{"version":3,"sources":["jsdelivr-header.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/helpers/bind.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/utils.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/core/AxiosError.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/delayed-stream/lib/delayed_stream.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/combined-stream/lib/combined_stream.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/mime-db/index.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/mime-types/index.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/asynckit/lib/defer.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/asynckit/lib/async.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/asynckit/lib/abort.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/asynckit/lib/iterate.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/asynckit/lib/state.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/asynckit/lib/terminator.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/asynckit/parallel.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/asynckit/serialOrdered.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/asynckit/serial.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/asynckit/index.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/es-object-atoms/index.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/es-errors/index.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/es-errors/eval.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/es-errors/range.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/es-errors/ref.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/es-errors/syntax.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/es-errors/type.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/es-errors/uri.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/math-intrinsics/abs.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/math-intrinsics/floor.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/math-intrinsics/max.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/math-intrinsics/min.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/math-intrinsics/pow.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/math-intrinsics/round.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/math-intrinsics/isNaN.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/math-intrinsics/sign.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/gopd/gOPD.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/gopd/index.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/es-define-property/index.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/has-symbols/shams.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/has-symbols/index.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/get-proto/Reflect.getPrototypeOf.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/get-proto/Object.getPrototypeOf.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/function-bind/implementation.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/function-bind/index.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/call-bind-apply-helpers/functionCall.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/call-bind-apply-helpers/functionApply.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/call-bind-apply-helpers/reflectApply.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/call-bind-apply-helpers/actualApply.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/call-bind-apply-helpers/index.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/dunder-proto/get.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/get-proto/index.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/hasown/index.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/get-intrinsic/index.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/has-tostringtag/shams.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/es-set-tostringtag/index.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/form-data/lib/populate.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/form-data/lib/form_data.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/helpers/toFormData.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/helpers/AxiosURLSearchParams.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/helpers/buildURL.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/core/InterceptorManager.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/defaults/transitional.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/platform/node/classes/URLSearchParams.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/platform/node/index.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/platform/common/utils.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/platform/index.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/helpers/toURLEncodedForm.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/helpers/formDataToJSON.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/defaults/index.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/helpers/parseHeaders.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/core/AxiosHeaders.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/core/transformData.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/cancel/isCancel.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/cancel/CanceledError.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/core/settle.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/helpers/isAbsoluteURL.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/helpers/combineURLs.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/core/buildFullPath.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/proxy-from-env/index.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/ms/index.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/debug/src/common.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/debug/src/browser.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/has-flag/index.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/supports-color/index.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/debug/src/node.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/debug/src/index.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/follow-redirects/debug.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/follow-redirects/index.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/env/data.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/helpers/parseProtocol.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/helpers/fromDataURI.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/helpers/AxiosTransformStream.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/helpers/readBlob.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/helpers/formDataToStream.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/helpers/callbackify.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/helpers/speedometer.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/helpers/throttle.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/helpers/progressEventReducer.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/adapters/http.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/helpers/isURLSameOrigin.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/helpers/cookies.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/core/mergeConfig.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/helpers/resolveConfig.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/adapters/xhr.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/helpers/composeSignals.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/helpers/trackStream.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/adapters/fetch.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/adapters/adapters.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/core/dispatchRequest.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/helpers/validator.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/core/Axios.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/cancel/CancelToken.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/helpers/spread.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/helpers/isAxiosError.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/helpers/HttpStatusCode.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/lib/axios.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/axios/index.js","/npm/@dimo-network/data-sdk@1.4.0/src/environments/index.ts","/npm/@dimo-network/data-sdk@1.4.0/src/errors/DimoError.ts","/npm/@dimo-network/data-sdk@1.4.0/src/constants.ts","/npm/@dimo-network/data-sdk@1.4.0/src/graphql/util/paginate.ts","/npm/@dimo-network/data-sdk@1.4.0/src/graphql/functions/getVehiclePrivileges.ts","/npm/@dimo-network/data-sdk@1.4.0/src/graphql/functions/getVin.ts","/npm/@dimo-network/data-sdk@1.4.0/src/graphql/Query.ts","/npm/@dimo-network/data-sdk@1.4.0/src/graphql/Resource.ts","/npm/@dimo-network/data-sdk@1.4.0/src/graphql/resources/Identity/index.ts","/npm/@dimo-network/data-sdk@1.4.0/src/graphql/resources/Telemetry/index.ts","/npm/@dimo-network/data-sdk@1.4.0/src/dimo.ts","/npm/@dimo-network/data-sdk@1.4.0/src/api/functions/getDeveloperJwt.ts","/npm/@dimo-network/data-sdk@1.4.0/node_modules/jwt-decode/build/esm/index.js","/npm/@dimo-network/data-sdk@1.4.0/src/util/decodeJwt.ts","/npm/@dimo-network/data-sdk@1.4.0/src/util/decodePermissions.ts","/npm/@dimo-network/data-sdk@1.4.0/src/api/functions/getVehicleJwt.ts","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-types/lib/esm/data_format_types.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-types/lib/esm/eth_types.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-types/lib/esm/primitives_types.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-types/lib/esm/web3_base_provider.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-types/lib/esm/web3_base_wallet.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-errors/lib/esm/error_codes.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-errors/lib/esm/web3_error_base.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-errors/lib/esm/errors/account_errors.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-errors/lib/esm/errors/connection_errors.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-errors/lib/esm/errors/contract_errors.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-errors/lib/esm/errors/ens_errors.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-errors/lib/esm/errors/generic_errors.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-errors/lib/esm/errors/provider_errors.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-errors/lib/esm/errors/signature_errors.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-errors/lib/esm/errors/transaction_errors.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-errors/lib/esm/errors/utils_errors.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-errors/lib/esm/errors/response_errors.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-errors/lib/esm/errors/core_errors.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-errors/lib/esm/errors/rpc_error_messages.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-errors/lib/esm/errors/rpc_errors.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-errors/lib/esm/errors/schema_errors.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/@noble/hashes/esm/_assert.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/@noble/hashes/esm/_u64.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/@noble/hashes/esm/crypto.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/@noble/hashes/esm/utils.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/@noble/hashes/esm/sha3.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/ethereum-cryptography/esm/utils.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/ethereum-cryptography/esm/keccak.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/zod/lib/index.mjs","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-validator/lib/esm/errors.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-validator/lib/esm/constants.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-validator/lib/esm/validation/abi.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-validator/lib/esm/validation/string.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-validator/lib/esm/utils.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-validator/lib/esm/validation/bytes.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-validator/lib/esm/validation/address.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-validator/lib/esm/validation/numbers.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-validator/lib/esm/validation/block.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-validator/lib/esm/validation/bloom.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-validator/lib/esm/validation/boolean.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-validator/lib/esm/validation/object.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-validator/lib/esm/validation/topic.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-validator/lib/esm/validation/filter.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-validator/lib/esm/formats.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-validator/lib/esm/validator.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-validator/lib/esm/web3_validator.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-validator/lib/esm/default_validator.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-utils/lib/esm/uint8array.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-utils/lib/esm/converters.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/eventemitter3/index.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-utils/lib/esm/event_emitter.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-utils/lib/esm/validation.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-utils/lib/esm/objects.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-utils/lib/esm/string_manipulation.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-utils/lib/esm/formatter.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-utils/lib/esm/hash.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/ethereum-cryptography/esm/random.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-utils/lib/esm/random.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-utils/lib/esm/promise_helpers.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-utils/lib/esm/uuid.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-utils/lib/esm/json_rpc.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-utils/lib/esm/web3_deferred_promise.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-utils/lib/esm/chunk_response_parser.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-utils/lib/esm/web3_eip1193_provider.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-utils/lib/esm/socket_provider.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-core/lib/esm/web3_config.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-core/lib/esm/web3_event_emitter.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/webidl-conversions/lib/index.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/whatwg-url/lib/utils.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/tr46/index.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/whatwg-url/lib/url-state-machine.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/whatwg-url/lib/URL-impl.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/whatwg-url/lib/URL.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/whatwg-url/lib/public-api.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/node-fetch/lib/index.mjs","/npm/@dimo-network/data-sdk@1.4.0/node_modules/cross-fetch/dist/node-ponyfill.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-providers-http/lib/esm/index.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/ws/lib/constants.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/ws/lib/buffer-util.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/ws/lib/limiter.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/ws/lib/permessage-deflate.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/ws/lib/validation.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/ws/lib/receiver.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/ws/lib/sender.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/ws/lib/event-target.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/ws/lib/extension.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/ws/lib/websocket.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/ws/lib/stream.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/ws/lib/subprotocol.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/ws/lib/websocket-server.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/ws/index.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/isomorphic-ws/node.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-providers-ws/lib/esm/index.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-core/lib/esm/utils.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-core/lib/esm/web3_request_manager.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-core/lib/esm/web3_subscription_manager.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-core/lib/esm/web3_subscriptions.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/wallet.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/ethereum-cryptography/esm/aes.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/@noble/hashes/esm/hmac.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/@noble/hashes/esm/pbkdf2.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/@noble/hashes/esm/_md.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/@noble/hashes/esm/sha256.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/ethereum-cryptography/esm/pbkdf2.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/@noble/hashes/esm/scrypt.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/ethereum-cryptography/esm/scrypt.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/@noble/curves/esm/abstract/utils.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/@noble/curves/esm/abstract/modular.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/@noble/curves/esm/abstract/curve.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/@noble/curves/esm/abstract/weierstrass.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/@noble/curves/esm/_shortw_utils.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/@noble/curves/esm/secp256k1.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/tx/constants.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/schemas.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/enums.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/types.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/utils.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/@ethereumjs/rlp/dist/index.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/crc-32/crc32.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/chains/goerli.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/chains/mainnet.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/chains/sepolia.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/eips/1153.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/eips/1559.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/eips/2315.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/eips/2537.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/eips/2565.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/eips/2718.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/eips/2929.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/eips/2930.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/eips/3198.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/eips/3529.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/eips/3540.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/eips/3541.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/eips/3554.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/eips/3607.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/eips/3651.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/eips/3670.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/eips/3675.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/eips/3855.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/eips/3860.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/eips/4345.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/eips/4399.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/eips/5133.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/eips/index.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/hardforks/chainstart.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/hardforks/dao.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/hardforks/homestead.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/hardforks/tangerineWhistle.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/hardforks/spuriousDragon.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/hardforks/byzantium.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/hardforks/constantinople.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/hardforks/petersburg.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/hardforks/istanbul.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/hardforks/muirGlacier.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/hardforks/berlin.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/hardforks/london.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/hardforks/shanghai.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/hardforks/arrowGlacier.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/hardforks/grayGlacier.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/hardforks/mergeForkIdTransition.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/hardforks/merge.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/hardforks/index.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/common/common.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/tx/types.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/tx/address.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/tx/utils.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/tx/baseTransaction.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/tx/eip1559Transaction.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/tx/eip2930Transaction.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/tx/legacyTransaction.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/tx/transactionFactory.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-accounts/lib/esm/account.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-core/lib/esm/web3_batch_request.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-core/lib/esm/web3_context.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-iban/lib/esm/iban.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-core/lib/esm/web3_promi_event.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/setimmediate/setImmediate.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-rpc-methods/lib/esm/eth_rpc_methods.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-rpc-methods/lib/esm/net_rpc_methods.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-rpc-methods/lib/esm/personal_rpc_methods.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth/lib/esm/utils/detect_transaction_type.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth/lib/esm/schemas.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth/lib/esm/utils/format_transaction.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth/lib/esm/utils/decode_signed_transaction.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-net/lib/esm/rpc_method_wrappers.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-net/lib/esm/net.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth/lib/esm/constants.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth/lib/esm/utils/get_transaction_gas_pricing.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth/lib/esm/utils/transaction_builder.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth/lib/esm/utils/reject_if_block_timeout.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth/lib/esm/utils/try_send_transaction.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth/lib/esm/utils/wait_for_transaction_receipt.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth/lib/esm/utils/watch_transaction_by_polling.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth/lib/esm/utils/watch_transaction_by_subscription.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth/lib/esm/utils/watch_transaction_for_confirmations.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-abi/lib/esm/utils.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-abi/lib/esm/api/errors_api.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-abi/lib/esm/api/events_api.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/abitype/dist/chunk-WP7KDV47.mjs","/npm/@dimo-network/data-sdk@1.4.0/node_modules/abitype/dist/chunk-NHABU752.mjs","/npm/@dimo-network/data-sdk@1.4.0/node_modules/abitype/dist/index.mjs","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-abi/lib/esm/coders/utils.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-abi/lib/esm/coders/base/address.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-abi/lib/esm/coders/base/numbersLimits.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-abi/lib/esm/coders/base/number.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-abi/lib/esm/coders/base/bool.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-abi/lib/esm/coders/base/bytes.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-abi/lib/esm/coders/base/string.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-abi/lib/esm/coders/base/utils.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-abi/lib/esm/coders/base/array.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-abi/lib/esm/coders/base/index.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-abi/lib/esm/coders/base/tuple.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-abi/lib/esm/coders/decode.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-abi/lib/esm/coders/encode.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-abi/lib/esm/api/parameters_api.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-abi/lib/esm/api/functions_api.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-abi/lib/esm/api/logs_api.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-abi/lib/esm/decode_contract_error_data.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth/lib/esm/utils/get_revert_reason.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth/lib/esm/utils/get_transaction_error.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth/lib/esm/utils/decoding.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth/lib/esm/utils/send_tx_helper.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth/lib/esm/rpc_method_wrappers.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth/lib/esm/filtering_rpc_method_wrappers.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth/lib/esm/web3_subscriptions.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth/lib/esm/web3_eth.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth/lib/esm/validation.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth/lib/esm/utils/prepare_transaction_for_signing.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-contract/lib/esm/encoding.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-contract/lib/esm/contract_log_subscription.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-contract/node_modules/@ethereumjs/rlp/dist/esm/index.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-contract/lib/esm/utils.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-contract/lib/esm/contract-deployer-method-class.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-contract/lib/esm/contract-subscription-manager.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-contract/lib/esm/contract.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-ens/lib/esm/config.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-ens/lib/esm/abi/ens/ENSRegistry.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-ens/lib/esm/abi/ens/PublicResolver.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/@adraffy/ens-normalize/dist/index.mjs","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-ens/lib/esm/utils.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-ens/lib/esm/registry.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-ens/lib/esm/resolver.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-ens/lib/esm/ens.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-personal/lib/esm/rpc_method_wrappers.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-eth-personal/lib/esm/personal.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-rpc-providers/lib/esm/types.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-rpc-providers/lib/esm/errors.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-rpc-providers/lib/esm/web3_provider.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-rpc-providers/lib/esm/web3_provider_quicknode.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-rpc-providers/lib/esm/web3_provider_publicnode.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3-rpc-providers/lib/esm/index.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3/lib/esm/abi.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3/lib/esm/accounts.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3/lib/esm/version.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3/lib/esm/web3_eip6963.js","/npm/@dimo-network/data-sdk@1.4.0/node_modules/web3/lib/esm/web3.js","/npm/@dimo-network/data-sdk@1.4.0/src/api/functions/signChallenge.ts","/npm/@dimo-network/data-sdk@1.4.0/src/api/Method.ts","/npm/@dimo-network/data-sdk@1.4.0/src/api/Resource.ts","/npm/@dimo-network/data-sdk@1.4.0/src/api/resources/Attestation/index.ts","/npm/@dimo-network/data-sdk@1.4.0/src/api/resources/Auth/index.ts","/npm/@dimo-network/data-sdk@1.4.0/src/api/resources/DeviceDefinitions/index.ts","/npm/@dimo-network/data-sdk@1.4.0/src/api/resources/Devices/index.ts","/npm/@dimo-network/data-sdk@1.4.0/src/api/resources/TokenExchange/index.ts","/npm/@dimo-network/data-sdk@1.4.0/src/api/resources/Trips/index.ts","/npm/@dimo-network/data-sdk@1.4.0/src/api/resources/Valuations/index.ts","/npm/@dimo-network/data-sdk@1.4.0/src/api/resources/VehicleTriggers/index.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,qdCJe,SAAS,KAAK,EAAI,GAC/B,OAAO,WACL,OAAO,EAAG,MAAM,EAAS,UAC7B,CACA,CCAA,MAAM,SAAC,UAAY,OAAO,WACpB,eAAC,gBAAkB,OAEnB,OAAS,CAAC,GAAS,IACrB,MAAM,EAAM,SAAS,KAAK,GAC1B,OAAO,EAAM,KAAS,EAAM,GAAO,EAAI,MAAM,GAAG,GAAI,cAAc,EAFvD,CAGZ,OAAO,OAAO,OAEX,WAAc,IAClB,EAAO,EAAK,cACJ,GAAU,OAAO,KAAW,GAGhC,WAAa,GAAQ,UAAgB,IAAU,GAS/C,QAAC,SAAW,MASZ,YAAc,WAAW,aAS/B,SAAS,SAAS,GAChB,OAAe,OAAR,IAAiB,YAAY,IAA4B,OAApB,EAAI,cAAyB,YAAY,EAAI,cACpF,WAAW,EAAI,YAAY,WAAa,EAAI,YAAY,SAAS,EACxE,CASA,MAAM,cAAgB,WAAW,eAUjC,SAAS,kBAAkB,GACzB,IAAI,EAMJ,OAJE,EAD0B,oBAAhB,aAAiC,YAAkB,OACpD,YAAY,OAAO,GAEnB,GAAU,EAAU,QAAM,cAAc,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AAsB,CACrB,OAAQ,OACR,KAAM,wCACN,KAAM,iBAEP,mBAAoB,CACnB,OAAQ,SACR,KAAM,gDACN,KAAM,iBAEP,uBAAwB,CACvB,OAAQ,SACR,KAAM,0CACN,KAAM,kB","file":"/npm/@dimo-network/data-sdk@1.4.0/dist/cjs/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@dimo-network/data-sdk@1.4.0/dist/cjs/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","'use strict';\n\nexport default function bind(fn, thisArg) {\n  return function wrap() {\n    return fn.apply(thisArg, arguments);\n  };\n}\n","'use strict';\n\nimport bind from './helpers/bind.js';\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n    const str = toString.call(thing);\n    return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n  type = type.toLowerCase();\n  return (thing) => kindOf(thing) === type\n}\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n  return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n    && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n  let result;\n  if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n    result = ArrayBuffer.isView(val);\n  } else {\n    result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n  }\n  return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n  if (kindOf(val) !== 'object') {\n    return false;\n  }\n\n  const prototype = getPrototypeOf(val);\n  return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n  let kind;\n  return thing && (\n    (typeof FormData === 'function' && thing instanceof FormData) || (\n      isFunction(thing.append) && (\n        (kind = kindOf(thing)) === 'formdata' ||\n        // detect form-data instance\n        (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n      )\n    )\n  )\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\nconst [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest);\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n  str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n  // Don't bother if no value provided\n  if (obj === null || typeof obj === 'undefined') {\n    return;\n  }\n\n  let i;\n  let l;\n\n  // Force an array if not already something iterable\n  if (typeof obj !== 'object') {\n    /*eslint no-param-reassign:0*/\n    obj = [obj];\n  }\n\n  if (isArray(obj)) {\n    // Iterate over array values\n    for (i = 0, l = obj.length; i < l; i++) {\n      fn.call(null, obj[i], i, obj);\n    }\n  } else {\n    // Iterate over object keys\n    const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n    const len = keys.length;\n    let key;\n\n    for (i = 0; i < len; i++) {\n      key = keys[i];\n      fn.call(null, obj[key], key, obj);\n    }\n  }\n}\n\nfunction findKey(obj, key) {\n  key = key.toLowerCase();\n  const keys = Object.keys(obj);\n  let i = keys.length;\n  let _key;\n  while (i-- > 0) {\n    _key = keys[i];\n    if (key === _key.toLowerCase()) {\n      return _key;\n    }\n  }\n  return null;\n}\n\nconst _global = (() => {\n  /*eslint no-undef:0*/\n  if (typeof globalThis !== \"undefined\") return globalThis;\n  return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n  const {caseless} = isContextDefined(this) && this || {};\n  const result = {};\n  const assignValue = (val, key) => {\n    const targetKey = caseless && findKey(result, key) || key;\n    if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n      result[targetKey] = merge(result[targetKey], val);\n    } else if (isPlainObject(val)) {\n      result[targetKey] = merge({}, val);\n    } else if (isArray(val)) {\n      result[targetKey] = val.slice();\n    } else {\n      result[targetKey] = val;\n    }\n  }\n\n  for (let i = 0, l = arguments.length; i < l; i++) {\n    arguments[i] && forEach(arguments[i], assignValue);\n  }\n  return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n  forEach(b, (val, key) => {\n    if (thisArg && isFunction(val)) {\n      a[key] = bind(val, thisArg);\n    } else {\n      a[key] = val;\n    }\n  }, {allOwnKeys});\n  return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n  if (content.charCodeAt(0) === 0xFEFF) {\n    content = content.slice(1);\n  }\n  return content;\n}\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n  constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n  constructor.prototype.constructor = constructor;\n  Object.defineProperty(constructor, 'super', {\n    value: superConstructor.prototype\n  });\n  props && Object.assign(constructor.prototype, props);\n}\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n  let props;\n  let i;\n  let prop;\n  const merged = {};\n\n  destObj = destObj || {};\n  // eslint-disable-next-line no-eq-null,eqeqeq\n  if (sourceObj == null) return destObj;\n\n  do {\n    props = Object.getOwnPropertyNames(sourceObj);\n    i = props.length;\n    while (i-- > 0) {\n      prop = props[i];\n      if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n        destObj[prop] = sourceObj[prop];\n        merged[prop] = true;\n      }\n    }\n    sourceObj = filter !== false && getPrototypeOf(sourceObj);\n  } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n  return destObj;\n}\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n  str = String(str);\n  if (position === undefined || position > str.length) {\n    position = str.length;\n  }\n  position -= searchString.length;\n  const lastIndex = str.indexOf(searchString, position);\n  return lastIndex !== -1 && lastIndex === position;\n}\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n  if (!thing) return null;\n  if (isArray(thing)) return thing;\n  let i = thing.length;\n  if (!isNumber(i)) return null;\n  const arr = new Array(i);\n  while (i-- > 0) {\n    arr[i] = thing[i];\n  }\n  return arr;\n}\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n  // eslint-disable-next-line func-names\n  return thing => {\n    return TypedArray && thing instanceof TypedArray;\n  };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object<any, any>} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n  const generator = obj && obj[Symbol.iterator];\n\n  const iterator = generator.call(obj);\n\n  let result;\n\n  while ((result = iterator.next()) && !result.done) {\n    const pair = result.value;\n    fn.call(obj, pair[0], pair[1]);\n  }\n}\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array<boolean>}\n */\nconst matchAll = (regExp, str) => {\n  let matches;\n  const arr = [];\n\n  while ((matches = regExp.exec(str)) !== null) {\n    arr.push(matches);\n  }\n\n  return arr;\n}\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n  return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n    function replacer(m, p1, p2) {\n      return p1.toUpperCase() + p2;\n    }\n  );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n  const descriptors = Object.getOwnPropertyDescriptors(obj);\n  const reducedDescriptors = {};\n\n  forEach(descriptors, (descriptor, name) => {\n    let ret;\n    if ((ret = reducer(descriptor, name, obj)) !== false) {\n      reducedDescriptors[name] = ret || descriptor;\n    }\n  });\n\n  Object.defineProperties(obj, reducedDescriptors);\n}\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n  reduceDescriptors(obj, (descriptor, name) => {\n    // skip restricted props in strict mode\n    if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n      return false;\n    }\n\n    const value = obj[name];\n\n    if (!isFunction(value)) return;\n\n    descriptor.enumerable = false;\n\n    if ('writable' in descriptor) {\n      descriptor.writable = false;\n      return;\n    }\n\n    if (!descriptor.set) {\n      descriptor.set = () => {\n        throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n      };\n    }\n  });\n}\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n  const obj = {};\n\n  const define = (arr) => {\n    arr.forEach(value => {\n      obj[value] = true;\n    });\n  }\n\n  isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n  return obj;\n}\n\nconst noop = () => {}\n\nconst toFiniteNumber = (value, defaultValue) => {\n  return value != null && Number.isFinite(value = +value) ? value : defaultValue;\n}\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n  return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n  const stack = new Array(10);\n\n  const visit = (source, i) => {\n\n    if (isObject(source)) {\n      if (stack.indexOf(source) >= 0) {\n        return;\n      }\n\n      if(!('toJSON' in source)) {\n        stack[i] = source;\n        const target = isArray(source) ? [] : {};\n\n        forEach(source, (value, key) => {\n          const reducedValue = visit(value, i + 1);\n          !isUndefined(reducedValue) && (target[key] = reducedValue);\n        });\n\n        stack[i] = undefined;\n\n        return target;\n      }\n    }\n\n    return source;\n  }\n\n  return visit(obj, 0);\n}\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n  thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\n// original code\n// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34\n\nconst _setImmediate = ((setImmediateSupported, postMessageSupported) => {\n  if (setImmediateSupported) {\n    return setImmediate;\n  }\n\n  return postMessageSupported ? ((token, callbacks) => {\n    _global.addEventListener(\"message\", ({source, data}) => {\n      if (source === _global && data === token) {\n        callbacks.length && callbacks.shift()();\n      }\n    }, false);\n\n    return (cb) => {\n      callbacks.push(cb);\n      _global.postMessage(token, \"*\");\n    }\n  })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);\n})(\n  typeof setImmediate === 'function',\n  isFunction(_global.postMessage)\n);\n\nconst asap = typeof queueMicrotask !== 'undefined' ?\n  queueMicrotask.bind(_global) : ( typeof process !== 'undefined' && process.nextTick || _setImmediate);\n\n// *********************\n\nexport default {\n  isArray,\n  isArrayBuffer,\n  isBuffer,\n  isFormData,\n  isArrayBufferView,\n  isString,\n  isNumber,\n  isBoolean,\n  isObject,\n  isPlainObject,\n  isReadableStream,\n  isRequest,\n  isResponse,\n  isHeaders,\n  isUndefined,\n  isDate,\n  isFile,\n  isBlob,\n  isRegExp,\n  isFunction,\n  isStream,\n  isURLSearchParams,\n  isTypedArray,\n  isFileList,\n  forEach,\n  merge,\n  extend,\n  trim,\n  stripBOM,\n  inherits,\n  toFlatObject,\n  kindOf,\n  kindOfTest,\n  endsWith,\n  toArray,\n  forEachEntry,\n  matchAll,\n  isHTMLForm,\n  hasOwnProperty,\n  hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n  reduceDescriptors,\n  freezeMethods,\n  toObjectSet,\n  toCamelCase,\n  noop,\n  toFiniteNumber,\n  findKey,\n  global: _global,\n  isContextDefined,\n  isSpecCompliantForm,\n  toJSONObject,\n  isAsyncFn,\n  isThenable,\n  setImmediate: _setImmediate,\n  asap\n};\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n  Error.call(this);\n\n  if (Error.captureStackTrace) {\n    Error.captureStackTrace(this, this.constructor);\n  } else {\n    this.stack = (new Error()).stack;\n  }\n\n  this.message = message;\n  this.name = 'AxiosError';\n  code && (this.code = code);\n  config && (this.config = config);\n  request && (this.request = request);\n  if (response) {\n    this.response = response;\n    this.status = response.status ? response.status : null;\n  }\n}\n\nutils.inherits(AxiosError, Error, {\n  toJSON: function toJSON() {\n    return {\n      // Standard\n      message: this.message,\n      name: this.name,\n      // Microsoft\n      description: this.description,\n      number: this.number,\n      // Mozilla\n      fileName: this.fileName,\n      lineNumber: this.lineNumber,\n      columnNumber: this.columnNumber,\n      stack: this.stack,\n      // Axios\n      config: utils.toJSONObject(this.config),\n      code: this.code,\n      status: this.status\n    };\n  }\n});\n\nconst prototype = AxiosError.prototype;\nconst descriptors = {};\n\n[\n  'ERR_BAD_OPTION_VALUE',\n  'ERR_BAD_OPTION',\n  'ECONNABORTED',\n  'ETIMEDOUT',\n  'ERR_NETWORK',\n  'ERR_FR_TOO_MANY_REDIRECTS',\n  'ERR_DEPRECATED',\n  'ERR_BAD_RESPONSE',\n  'ERR_BAD_REQUEST',\n  'ERR_CANCELED',\n  'ERR_NOT_SUPPORT',\n  'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n  descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n  const axiosError = Object.create(prototype);\n\n  utils.toFlatObject(error, axiosError, function filter(obj) {\n    return obj !== Error.prototype;\n  }, prop => {\n    return prop !== 'isAxiosError';\n  });\n\n  AxiosError.call(axiosError, error.message, code, config, request, response);\n\n  axiosError.cause = error;\n\n  axiosError.name = error.name;\n\n  customProps && Object.assign(axiosError, customProps);\n\n  return axiosError;\n};\n\nexport default AxiosError;\n","var Stream = require('stream').Stream;\nvar util = require('util');\n\nmodule.exports = DelayedStream;\nfunction DelayedStream() {\n  this.source = null;\n  this.dataSize = 0;\n  this.maxDataSize = 1024 * 1024;\n  this.pauseStream = true;\n\n  this._maxDataSizeExceeded = false;\n  this._released = false;\n  this._bufferedEvents = [];\n}\nutil.inherits(DelayedStream, Stream);\n\nDelayedStream.create = function(source, options) {\n  var delayedStream = new this();\n\n  options = options || {};\n  for (var option in options) {\n    delayedStream[option] = options[option];\n  }\n\n  delayedStream.source = source;\n\n  var realEmit = source.emit;\n  source.emit = function() {\n    delayedStream._handleEmit(arguments);\n    return realEmit.apply(source, arguments);\n  };\n\n  source.on('error', function() {});\n  if (delayedStream.pauseStream) {\n    source.pause();\n  }\n\n  return delayedStream;\n};\n\nObject.defineProperty(DelayedStream.prototype, 'readable', {\n  configurable: true,\n  enumerable: true,\n  get: function() {\n    return this.source.readable;\n  }\n});\n\nDelayedStream.prototype.setEncoding = function() {\n  return this.source.setEncoding.apply(this.source, arguments);\n};\n\nDelayedStream.prototype.resume = function() {\n  if (!this._released) {\n    this.release();\n  }\n\n  this.source.resume();\n};\n\nDelayedStream.prototype.pause = function() {\n  this.source.pause();\n};\n\nDelayedStream.prototype.release = function() {\n  this._released = true;\n\n  this._bufferedEvents.forEach(function(args) {\n    this.emit.apply(this, args);\n  }.bind(this));\n  this._bufferedEvents = [];\n};\n\nDelayedStream.prototype.pipe = function() {\n  var r = Stream.prototype.pipe.apply(this, arguments);\n  this.resume();\n  return r;\n};\n\nDelayedStream.prototype._handleEmit = function(args) {\n  if (this._released) {\n    this.emit.apply(this, args);\n    return;\n  }\n\n  if (args[0] === 'data') {\n    this.dataSize += args[1].length;\n    this._checkIfMaxDataSizeExceeded();\n  }\n\n  this._bufferedEvents.push(args);\n};\n\nDelayedStream.prototype._checkIfMaxDataSizeExceeded = function() {\n  if (this._maxDataSizeExceeded) {\n    return;\n  }\n\n  if (this.dataSize <= this.maxDataSize) {\n    return;\n  }\n\n  this._maxDataSizeExceeded = true;\n  var message =\n    'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.'\n  this.emit('error', new Error(message));\n};\n","var util = require('util');\nvar Stream = require('stream').Stream;\nvar DelayedStream = require('delayed-stream');\n\nmodule.exports = CombinedStream;\nfunction CombinedStream() {\n  this.writable = false;\n  this.readable = true;\n  this.dataSize = 0;\n  this.maxDataSize = 2 * 1024 * 1024;\n  this.pauseStreams = true;\n\n  this._released = false;\n  this._streams = [];\n  this._currentStream = null;\n  this._insideLoop = false;\n  this._pendingNext = false;\n}\nutil.inherits(CombinedStream, Stream);\n\nCombinedStream.create = function(options) {\n  var combinedStream = new this();\n\n  options = options || {};\n  for (var option in options) {\n    combinedStream[option] = options[option];\n  }\n\n  return combinedStream;\n};\n\nCombinedStream.isStreamLike = function(stream) {\n  return (typeof stream !== 'function')\n    && (typeof stream !== 'string')\n    && (typeof stream !== 'boolean')\n    && (typeof stream !== 'number')\n    && (!Buffer.isBuffer(stream));\n};\n\nCombinedStream.prototype.append = function(stream) {\n  var isStreamLike = CombinedStream.isStreamLike(stream);\n\n  if (isStreamLike) {\n    if (!(stream instanceof DelayedStream)) {\n      var newStream = DelayedStream.create(stream, {\n        maxDataSize: Infinity,\n        pauseStream: this.pauseStreams,\n      });\n      stream.on('data', this._checkDataSize.bind(this));\n      stream = newStream;\n    }\n\n    this._handleErrors(stream);\n\n    if (this.pauseStreams) {\n      stream.pause();\n    }\n  }\n\n  this._streams.push(stream);\n  return this;\n};\n\nCombinedStream.prototype.pipe = function(dest, options) {\n  Stream.prototype.pipe.call(this, dest, options);\n  this.resume();\n  return dest;\n};\n\nCombinedStream.prototype._getNext = function() {\n  this._currentStream = null;\n\n  if (this._insideLoop) {\n    this._pendingNext = true;\n    return; // defer call\n  }\n\n  this._insideLoop = true;\n  try {\n    do {\n      this._pendingNext = false;\n      this._realGetNext();\n    } while (this._pendingNext);\n  } finally {\n    this._insideLoop = false;\n  }\n};\n\nCombinedStream.prototype._realGetNext = function() {\n  var stream = this._streams.shift();\n\n\n  if (typeof stream == 'undefined') {\n    this.end();\n    return;\n  }\n\n  if (typeof stream !== 'function') {\n    this._pipeNext(stream);\n    return;\n  }\n\n  var getStream = stream;\n  getStream(function(stream) {\n    var isStreamLike = CombinedStream.isStreamLike(stream);\n    if (isStreamLike) {\n      stream.on('data', this._checkDataSize.bind(this));\n      this._handleErrors(stream);\n    }\n\n    this._pipeNext(stream);\n  }.bind(this));\n};\n\nCombinedStream.prototype._pipeNext = function(stream) {\n  this._currentStream = stream;\n\n  var isStreamLike = CombinedStream.isStreamLike(stream);\n  if (isStreamLike) {\n    stream.on('end', this._getNext.bind(this));\n    stream.pipe(this, {end: false});\n    return;\n  }\n\n  var value = stream;\n  this.write(value);\n  this._getNext();\n};\n\nCombinedStream.prototype._handleErrors = function(stream) {\n  var self = this;\n  stream.on('error', function(err) {\n    self._emitError(err);\n  });\n};\n\nCombinedStream.prototype.write = function(data) {\n  this.emit('data', data);\n};\n\nCombinedStream.prototype.pause = function() {\n  if (!this.pauseStreams) {\n    return;\n  }\n\n  if(this.pauseStreams && this._currentStream && typeof(this._currentStream.pause) == 'function') this._currentStream.pause();\n  this.emit('pause');\n};\n\nCombinedStream.prototype.resume = function() {\n  if (!this._released) {\n    this._released = true;\n    this.writable = true;\n    this._getNext();\n  }\n\n  if(this.pauseStreams && this._currentStream && typeof(this._currentStream.resume) == 'function') this._currentStream.resume();\n  this.emit('resume');\n};\n\nCombinedStream.prototype.end = function() {\n  this._reset();\n  this.emit('end');\n};\n\nCombinedStream.prototype.destroy = function() {\n  this._reset();\n  this.emit('close');\n};\n\nCombinedStream.prototype._reset = function() {\n  this.writable = false;\n  this._streams = [];\n  this._currentStream = null;\n};\n\nCombinedStream.prototype._checkDataSize = function() {\n  this._updateDataSize();\n  if (this.dataSize <= this.maxDataSize) {\n    return;\n  }\n\n  var message =\n    'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.';\n  this._emitError(new Error(message));\n};\n\nCombinedStream.prototype._updateDataSize = function() {\n  this.dataSize = 0;\n\n  var self = this;\n  this._streams.forEach(function(stream) {\n    if (!stream.dataSize) {\n      return;\n    }\n\n    self.dataSize += stream.dataSize;\n  });\n\n  if (this._currentStream && this._currentStream.dataSize) {\n    this.dataSize += this._currentStream.dataSize;\n  }\n};\n\nCombinedStream.prototype._emitError = function(err) {\n  this._reset();\n  this.emit('error', err);\n};\n","/*!\n * mime-db\n * Copyright(c) 2014 Jonathan Ong\n * Copyright(c) 2015-2022 Douglas Christopher Wilson\n * MIT Licensed\n */\n\n/**\n * Module exports.\n */\n\nmodule.exports = require('./db.json')\n","/*!\n * mime-types\n * Copyright(c) 2014 Jonathan Ong\n * Copyright(c) 2015 Douglas Christopher Wilson\n * MIT Licensed\n */\n\n'use strict'\n\n/**\n * Module dependencies.\n * @private\n */\n\nvar db = require('mime-db')\nvar extname = require('path').extname\n\n/**\n * Module variables.\n * @private\n */\n\nvar EXTRACT_TYPE_REGEXP = /^\\s*([^;\\s]*)(?:;|\\s|$)/\nvar TEXT_TYPE_REGEXP = /^text\\//i\n\n/**\n * Module exports.\n * @public\n */\n\nexports.charset = charset\nexports.charsets = { lookup: charset }\nexports.contentType = contentType\nexports.extension = extension\nexports.extensions = Object.create(null)\nexports.lookup = lookup\nexports.types = Object.create(null)\n\n// Populate the extensions/types maps\npopulateMaps(exports.extensions, exports.types)\n\n/**\n * Get the default charset for a MIME type.\n *\n * @param {string} type\n * @return {boolean|string}\n */\n\nfunction charset (type) {\n  if (!type || typeof type !== 'string') {\n    return false\n  }\n\n  // TODO: use media-typer\n  var match = EXTRACT_TYPE_REGEXP.exec(type)\n  var mime = match && db[match[1].toLowerCase()]\n\n  if (mime && mime.charset) {\n    return mime.charset\n  }\n\n  // default text/* to utf-8\n  if (match && TEXT_TYPE_REGEXP.test(match[1])) {\n    return 'UTF-8'\n  }\n\n  return false\n}\n\n/**\n * Create a full Content-Type header given a MIME type or extension.\n *\n * @param {string} str\n * @return {boolean|string}\n */\n\nfunction contentType (str) {\n  // TODO: should this even be in this module?\n  if (!str || typeof str !== 'string') {\n    return false\n  }\n\n  var mime = str.indexOf('/') === -1\n    ? exports.lookup(str)\n    : str\n\n  if (!mime) {\n    return false\n  }\n\n  // TODO: use content-type or other module\n  if (mime.indexOf('charset') === -1) {\n    var charset = exports.charset(mime)\n    if (charset) mime += '; charset=' + charset.toLowerCase()\n  }\n\n  return mime\n}\n\n/**\n * Get the default extension for a MIME type.\n *\n * @param {string} type\n * @return {boolean|string}\n */\n\nfunction extension (type) {\n  if (!type || typeof type !== 'string') {\n    return false\n  }\n\n  // TODO: use media-typer\n  var match = EXTRACT_TYPE_REGEXP.exec(type)\n\n  // get extensions\n  var exts = match && exports.extensions[match[1].toLowerCase()]\n\n  if (!exts || !exts.length) {\n    return false\n  }\n\n  return exts[0]\n}\n\n/**\n * Lookup the MIME type for a file path/extension.\n *\n * @param {string} path\n * @return {boolean|string}\n */\n\nfunction lookup (path) {\n  if (!path || typeof path !== 'string') {\n    return false\n  }\n\n  // get the extension (\"ext\" or \".ext\" or full path)\n  var extension = extname('x.' + path)\n    .toLowerCase()\n    .substr(1)\n\n  if (!extension) {\n    return false\n  }\n\n  return exports.types[extension] || false\n}\n\n/**\n * Populate the extensions and types maps.\n * @private\n */\n\nfunction populateMaps (extensions, types) {\n  // source preference (least -> most)\n  var preference = ['nginx', 'apache', undefined, 'iana']\n\n  Object.keys(db).forEach(function forEachMimeType (type) {\n    var mime = db[type]\n    var exts = mime.extensions\n\n    if (!exts || !exts.length) {\n      return\n    }\n\n    // mime -> extensions\n    extensions[type] = exts\n\n    // extension -> mime\n    for (var i = 0; i < exts.length; i++) {\n      var extension = exts[i]\n\n      if (types[extension]) {\n        var from = preference.indexOf(db[types[extension]].source)\n        var to = preference.indexOf(mime.source)\n\n        if (types[extension] !== 'application/octet-stream' &&\n          (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n          // skip the remapping\n          continue\n        }\n      }\n\n      // set the extension -> mime\n      types[extension] = type\n    }\n  })\n}\n","module.exports = defer;\n\n/**\n * Runs provided function on next iteration of the event loop\n *\n * @param {function} fn - function to run\n */\nfunction defer(fn)\n{\n  var nextTick = typeof setImmediate == 'function'\n    ? setImmediate\n    : (\n      typeof process == 'object' && typeof process.nextTick == 'function'\n      ? process.nextTick\n      : null\n    );\n\n  if (nextTick)\n  {\n    nextTick(fn);\n  }\n  else\n  {\n    setTimeout(fn, 0);\n  }\n}\n","var defer = require('./defer.js');\n\n// API\nmodule.exports = async;\n\n/**\n * Runs provided callback asynchronously\n * even if callback itself is not\n *\n * @param   {function} callback - callback to invoke\n * @returns {function} - augmented callback\n */\nfunction async(callback)\n{\n  var isAsync = false;\n\n  // check if async happened\n  defer(function() { isAsync = true; });\n\n  return function async_callback(err, result)\n  {\n    if (isAsync)\n    {\n      callback(err, result);\n    }\n    else\n    {\n      defer(function nextTick_callback()\n      {\n        callback(err, result);\n      });\n    }\n  };\n}\n","// API\nmodule.exports = abort;\n\n/**\n * Aborts leftover active jobs\n *\n * @param {object} state - current state object\n */\nfunction abort(state)\n{\n  Object.keys(state.jobs).forEach(clean.bind(state));\n\n  // reset leftover jobs\n  state.jobs = {};\n}\n\n/**\n * Cleans up leftover job by invoking abort function for the provided job id\n *\n * @this  state\n * @param {string|number} key - job id to abort\n */\nfunction clean(key)\n{\n  if (typeof this.jobs[key] == 'function')\n  {\n    this.jobs[key]();\n  }\n}\n","var async = require('./async.js')\n  , abort = require('./abort.js')\n  ;\n\n// API\nmodule.exports = iterate;\n\n/**\n * Iterates over each job object\n *\n * @param {array|object} list - array or object (named list) to iterate over\n * @param {function} iterator - iterator to run\n * @param {object} state - current job status\n * @param {function} callback - invoked when all elements processed\n */\nfunction iterate(list, iterator, state, callback)\n{\n  // store current index\n  var key = state['keyedList'] ? state['keyedList'][state.index] : state.index;\n\n  state.jobs[key] = runJob(iterator, key, list[key], function(error, output)\n  {\n    // don't repeat yourself\n    // skip secondary callbacks\n    if (!(key in state.jobs))\n    {\n      return;\n    }\n\n    // clean up jobs\n    delete state.jobs[key];\n\n    if (error)\n    {\n      // don't process rest of the results\n      // stop still active jobs\n      // and reset the list\n      abort(state);\n    }\n    else\n    {\n      state.results[key] = output;\n    }\n\n    // return salvaged results\n    callback(error, state.results);\n  });\n}\n\n/**\n * Runs iterator over provided job element\n *\n * @param   {function} iterator - iterator to invoke\n * @param   {string|number} key - key/index of the element in the list of jobs\n * @param   {mixed} item - job description\n * @param   {function} callback - invoked after iterator is done with the job\n * @returns {function|mixed} - job abort function or something else\n */\nfunction runJob(iterator, key, item, callback)\n{\n  var aborter;\n\n  // allow shortcut if iterator expects only two arguments\n  if (iterator.length == 2)\n  {\n    aborter = iterator(item, async(callback));\n  }\n  // otherwise go with full three arguments\n  else\n  {\n    aborter = iterator(item, key, async(callback));\n  }\n\n  return aborter;\n}\n","// API\nmodule.exports = state;\n\n/**\n * Creates initial state object\n * for iteration over list\n *\n * @param   {array|object} list - list to iterate over\n * @param   {function|null} sortMethod - function to use for keys sort,\n *                                     or `null` to keep them as is\n * @returns {object} - initial state object\n */\nfunction state(list, sortMethod)\n{\n  var isNamedList = !Array.isArray(list)\n    , initState =\n    {\n      index    : 0,\n      keyedList: isNamedList || sortMethod ? Object.keys(list) : null,\n      jobs     : {},\n      results  : isNamedList ? {} : [],\n      size     : isNamedList ? Object.keys(list).length : list.length\n    }\n    ;\n\n  if (sortMethod)\n  {\n    // sort array keys based on it's values\n    // sort object's keys just on own merit\n    initState.keyedList.sort(isNamedList ? sortMethod : function(a, b)\n    {\n      return sortMethod(list[a], list[b]);\n    });\n  }\n\n  return initState;\n}\n","var abort = require('./abort.js')\n  , async = require('./async.js')\n  ;\n\n// API\nmodule.exports = terminator;\n\n/**\n * Terminates jobs in the attached state context\n *\n * @this  AsyncKitState#\n * @param {function} callback - final callback to invoke after termination\n */\nfunction terminator(callback)\n{\n  if (!Object.keys(this.jobs).length)\n  {\n    return;\n  }\n\n  // fast forward iteration index\n  this.index = this.size;\n\n  // abort jobs\n  abort(this);\n\n  // send back results we have so far\n  async(callback)(null, this.results);\n}\n","var iterate    = require('./lib/iterate.js')\n  , initState  = require('./lib/state.js')\n  , terminator = require('./lib/terminator.js')\n  ;\n\n// Public API\nmodule.exports = parallel;\n\n/**\n * Runs iterator over provided array elements in parallel\n *\n * @param   {array|object} list - array or object (named list) to iterate over\n * @param   {function} iterator - iterator to run\n * @param   {function} callback - invoked when all elements processed\n * @returns {function} - jobs terminator\n */\nfunction parallel(list, iterator, callback)\n{\n  var state = initState(list);\n\n  while (state.index < (state['keyedList'] || list).length)\n  {\n    iterate(list, iterator, state, function(error, result)\n    {\n      if (error)\n      {\n        callback(error, result);\n        return;\n      }\n\n      // looks like it's the last one\n      if (Object.keys(state.jobs).length === 0)\n      {\n        callback(null, state.results);\n        return;\n      }\n    });\n\n    state.index++;\n  }\n\n  return terminator.bind(state, callback);\n}\n","var iterate    = require('./lib/iterate.js')\n  , initState  = require('./lib/state.js')\n  , terminator = require('./lib/terminator.js')\n  ;\n\n// Public API\nmodule.exports = serialOrdered;\n// sorting helpers\nmodule.exports.ascending  = ascending;\nmodule.exports.descending = descending;\n\n/**\n * Runs iterator over provided sorted array elements in series\n *\n * @param   {array|object} list - array or object (named list) to iterate over\n * @param   {function} iterator - iterator to run\n * @param   {function} sortMethod - custom sort function\n * @param   {function} callback - invoked when all elements processed\n * @returns {function} - jobs terminator\n */\nfunction serialOrdered(list, iterator, sortMethod, callback)\n{\n  var state = initState(list, sortMethod);\n\n  iterate(list, iterator, state, function iteratorHandler(error, result)\n  {\n    if (error)\n    {\n      callback(error, result);\n      return;\n    }\n\n    state.index++;\n\n    // are we there yet?\n    if (state.index < (state['keyedList'] || list).length)\n    {\n      iterate(list, iterator, state, iteratorHandler);\n      return;\n    }\n\n    // done here\n    callback(null, state.results);\n  });\n\n  return terminator.bind(state, callback);\n}\n\n/*\n * -- Sort methods\n */\n\n/**\n * sort helper to sort array elements in ascending order\n *\n * @param   {mixed} a - an item to compare\n * @param   {mixed} b - an item to compare\n * @returns {number} - comparison result\n */\nfunction ascending(a, b)\n{\n  return a < b ? -1 : a > b ? 1 : 0;\n}\n\n/**\n * sort helper to sort array elements in descending order\n *\n * @param   {mixed} a - an item to compare\n * @param   {mixed} b - an item to compare\n * @returns {number} - comparison result\n */\nfunction descending(a, b)\n{\n  return -1 * ascending(a, b);\n}\n","var serialOrdered = require('./serialOrdered.js');\n\n// Public API\nmodule.exports = serial;\n\n/**\n * Runs iterator over provided array elements in series\n *\n * @param   {array|object} list - array or object (named list) to iterate over\n * @param   {function} iterator - iterator to run\n * @param   {function} callback - invoked when all elements processed\n * @returns {function} - jobs terminator\n */\nfunction serial(list, iterator, callback)\n{\n  return serialOrdered(list, iterator, null, callback);\n}\n","module.exports =\n{\n  parallel      : require('./parallel.js'),\n  serial        : require('./serial.js'),\n  serialOrdered : require('./serialOrdered.js')\n};\n","'use strict';\n\n/** @type {import('.')} */\nmodule.exports = Object;\n","'use strict';\n\n/** @type {import('.')} */\nmodule.exports = Error;\n","'use strict';\n\n/** @type {import('./eval')} */\nmodule.exports = EvalError;\n","'use strict';\n\n/** @type {import('./range')} */\nmodule.exports = RangeError;\n","'use strict';\n\n/** @type {import('./ref')} */\nmodule.exports = ReferenceError;\n","'use strict';\n\n/** @type {import('./syntax')} */\nmodule.exports = SyntaxError;\n","'use strict';\n\n/** @type {import('./type')} */\nmodule.exports = TypeError;\n","'use strict';\n\n/** @type {import('./uri')} */\nmodule.exports = URIError;\n","'use strict';\n\n/** @type {import('./abs')} */\nmodule.exports = Math.abs;\n","'use strict';\n\n/** @type {import('./floor')} */\nmodule.exports = Math.floor;\n","'use strict';\n\n/** @type {import('./max')} */\nmodule.exports = Math.max;\n","'use strict';\n\n/** @type {import('./min')} */\nmodule.exports = Math.min;\n","'use strict';\n\n/** @type {import('./pow')} */\nmodule.exports = Math.pow;\n","'use strict';\n\n/** @type {import('./round')} */\nmodule.exports = Math.round;\n","'use strict';\n\n/** @type {import('./isNaN')} */\nmodule.exports = Number.isNaN || function isNaN(a) {\n\treturn a !== a;\n};\n","'use strict';\n\nvar $isNaN = require('./isNaN');\n\n/** @type {import('./sign')} */\nmodule.exports = function sign(number) {\n\tif ($isNaN(number) || number === 0) {\n\t\treturn number;\n\t}\n\treturn number < 0 ? -1 : +1;\n};\n","'use strict';\n\n/** @type {import('./gOPD')} */\nmodule.exports = Object.getOwnPropertyDescriptor;\n","'use strict';\n\n/** @type {import('.')} */\nvar $gOPD = require('./gOPD');\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n","'use strict';\n\n/** @type {import('.')} */\nvar $defineProperty = Object.defineProperty || false;\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = false;\n\t}\n}\n\nmodule.exports = $defineProperty;\n","'use strict';\n\n/** @type {import('./shams')} */\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\t/** @type {{ [k in symbol]?: unknown }} */\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (var _ in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\t// eslint-disable-next-line no-extra-parens\n\t\tvar descriptor = /** @type {PropertyDescriptor} */ (Object.getOwnPropertyDescriptor(obj, sym));\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\n/** @type {import('.')} */\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\n/** @type {import('./Reflect.getPrototypeOf')} */\nmodule.exports = (typeof Reflect !== 'undefined' && Reflect.getPrototypeOf) || null;\n","'use strict';\n\nvar $Object = require('es-object-atoms');\n\n/** @type {import('./Object.getPrototypeOf')} */\nmodule.exports = $Object.getPrototypeOf || null;\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar toStr = Object.prototype.toString;\nvar max = Math.max;\nvar funcType = '[object Function]';\n\nvar concatty = function concatty(a, b) {\n    var arr = [];\n\n    for (var i = 0; i < a.length; i += 1) {\n        arr[i] = a[i];\n    }\n    for (var j = 0; j < b.length; j += 1) {\n        arr[j + a.length] = b[j];\n    }\n\n    return arr;\n};\n\nvar slicy = function slicy(arrLike, offset) {\n    var arr = [];\n    for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {\n        arr[j] = arrLike[i];\n    }\n    return arr;\n};\n\nvar joiny = function (arr, joiner) {\n    var str = '';\n    for (var i = 0; i < arr.length; i += 1) {\n        str += arr[i];\n        if (i + 1 < arr.length) {\n            str += joiner;\n        }\n    }\n    return str;\n};\n\nmodule.exports = function bind(that) {\n    var target = this;\n    if (typeof target !== 'function' || toStr.apply(target) !== funcType) {\n        throw new TypeError(ERROR_MESSAGE + target);\n    }\n    var args = slicy(arguments, 1);\n\n    var bound;\n    var binder = function () {\n        if (this instanceof bound) {\n            var result = target.apply(\n                this,\n                concatty(args, arguments)\n            );\n            if (Object(result) === result) {\n                return result;\n            }\n            return this;\n        }\n        return target.apply(\n            that,\n            concatty(args, arguments)\n        );\n\n    };\n\n    var boundLength = max(0, target.length - args.length);\n    var boundArgs = [];\n    for (var i = 0; i < boundLength; i++) {\n        boundArgs[i] = '$' + i;\n    }\n\n    bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);\n\n    if (target.prototype) {\n        var Empty = function Empty() {};\n        Empty.prototype = target.prototype;\n        bound.prototype = new Empty();\n        Empty.prototype = null;\n    }\n\n    return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\n/** @type {import('./functionCall')} */\nmodule.exports = Function.prototype.call;\n","'use strict';\n\n/** @type {import('./functionApply')} */\nmodule.exports = Function.prototype.apply;\n","'use strict';\n\n/** @type {import('./reflectApply')} */\nmodule.exports = typeof Reflect !== 'undefined' && Reflect && Reflect.apply;\n","'use strict';\n\nvar bind = require('function-bind');\n\nvar $apply = require('./functionApply');\nvar $call = require('./functionCall');\nvar $reflectApply = require('./reflectApply');\n\n/** @type {import('./actualApply')} */\nmodule.exports = $reflectApply || bind.call($call, $apply);\n","'use strict';\n\nvar bind = require('function-bind');\nvar $TypeError = require('es-errors/type');\n\nvar $call = require('./functionCall');\nvar $actualApply = require('./actualApply');\n\n/** @type {(args: [Function, thisArg?: unknown, ...args: unknown[]]) => Function} TODO FIXME, find a way to use import('.') */\nmodule.exports = function callBindBasic(args) {\n\tif (args.length < 1 || typeof args[0] !== 'function') {\n\t\tthrow new $TypeError('a function is required');\n\t}\n\treturn $actualApply(bind, $call, args);\n};\n","'use strict';\n\nvar callBind = require('call-bind-apply-helpers');\nvar gOPD = require('gopd');\n\nvar hasProtoAccessor;\ntry {\n\t// eslint-disable-next-line no-extra-parens, no-proto\n\thasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */ ([]).__proto__ === Array.prototype;\n} catch (e) {\n\tif (!e || typeof e !== 'object' || !('code' in e) || e.code !== 'ERR_PROTO_ACCESS') {\n\t\tthrow e;\n\t}\n}\n\n// eslint-disable-next-line no-extra-parens\nvar desc = !!hasProtoAccessor && gOPD && gOPD(Object.prototype, /** @type {keyof typeof Object.prototype} */ ('__proto__'));\n\nvar $Object = Object;\nvar $getPrototypeOf = $Object.getPrototypeOf;\n\n/** @type {import('./get')} */\nmodule.exports = desc && typeof desc.get === 'function'\n\t? callBind([desc.get])\n\t: typeof $getPrototypeOf === 'function'\n\t\t? /** @type {import('./get')} */ function getDunder(value) {\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\treturn $getPrototypeOf(value == null ? value : $Object(value));\n\t\t}\n\t\t: false;\n","'use strict';\n\nvar reflectGetProto = require('./Reflect.getPrototypeOf');\nvar originalGetProto = require('./Object.getPrototypeOf');\n\nvar getDunderProto = require('dunder-proto/get');\n\n/** @type {import('.')} */\nmodule.exports = reflectGetProto\n\t? function getProto(O) {\n\t\t// @ts-expect-error TS can't narrow inside a closure, for some reason\n\t\treturn reflectGetProto(O);\n\t}\n\t: originalGetProto\n\t\t? function getProto(O) {\n\t\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\t\tthrow new TypeError('getProto: not an object');\n\t\t\t}\n\t\t\t// @ts-expect-error TS can't narrow inside a closure, for some reason\n\t\t\treturn originalGetProto(O);\n\t\t}\n\t\t: getDunderProto\n\t\t\t? function getProto(O) {\n\t\t\t\t// @ts-expect-error TS can't narrow inside a closure, for some reason\n\t\t\t\treturn getDunderProto(O);\n\t\t\t}\n\t\t\t: null;\n","'use strict';\n\nvar call = Function.prototype.call;\nvar $hasOwn = Object.prototype.hasOwnProperty;\nvar bind = require('function-bind');\n\n/** @type {import('.')} */\nmodule.exports = bind.call(call, $hasOwn);\n","'use strict';\n\nvar undefined;\n\nvar $Object = require('es-object-atoms');\n\nvar $Error = require('es-errors');\nvar $EvalError = require('es-errors/eval');\nvar $RangeError = require('es-errors/range');\nvar $ReferenceError = require('es-errors/ref');\nvar $SyntaxError = require('es-errors/syntax');\nvar $TypeError = require('es-errors/type');\nvar $URIError = require('es-errors/uri');\n\nvar abs = require('math-intrinsics/abs');\nvar floor = require('math-intrinsics/floor');\nvar max = require('math-intrinsics/max');\nvar min = require('math-intrinsics/min');\nvar pow = require('math-intrinsics/pow');\nvar round = require('math-intrinsics/round');\nvar sign = require('math-intrinsics/sign');\n\nvar $Function = Function;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = require('gopd');\nvar $defineProperty = require('es-define-property');\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\n\nvar getProto = require('get-proto');\nvar $ObjectGPO = require('get-proto/Object.getPrototypeOf');\nvar $ReflectGPO = require('get-proto/Reflect.getPrototypeOf');\n\nvar $apply = require('call-bind-apply-helpers/functionApply');\nvar $call = require('call-bind-apply-helpers/functionCall');\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t__proto__: null,\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': $Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': $EvalError,\n\t'%Float16Array%': typeof Float16Array === 'undefined' ? undefined : Float16Array,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': $Object,\n\t'%Object.getOwnPropertyDescriptor%': $gOPD,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': $RangeError,\n\t'%ReferenceError%': $ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': $URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet,\n\n\t'%Function.prototype.call%': $call,\n\t'%Function.prototype.apply%': $apply,\n\t'%Object.defineProperty%': $defineProperty,\n\t'%Object.getPrototypeOf%': $ObjectGPO,\n\t'%Math.abs%': abs,\n\t'%Math.floor%': floor,\n\t'%Math.max%': max,\n\t'%Math.min%': min,\n\t'%Math.pow%': pow,\n\t'%Math.round%': round,\n\t'%Math.sign%': sign,\n\t'%Reflect.getPrototypeOf%': $ReflectGPO\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t__proto__: null,\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('hasown');\nvar $concat = bind.call($call, Array.prototype.concat);\nvar $spliceApply = bind.call($apply, Array.prototype.splice);\nvar $replace = bind.call($call, String.prototype.replace);\nvar $strSlice = bind.call($call, String.prototype.slice);\nvar $exec = bind.call($call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar hasSymbols = require('has-symbols/shams');\n\n/** @type {import('.')} */\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar hasOwn = require('hasown');\nvar $TypeError = require('es-errors/type');\n\nvar toStringTag = hasToStringTag ? Symbol.toStringTag : null;\n\n/** @type {import('.')} */\nmodule.exports = function setToStringTag(object, value) {\n\tvar overrideIfSet = arguments.length > 2 && !!arguments[2] && arguments[2].force;\n\tvar nonConfigurable = arguments.length > 2 && !!arguments[2] && arguments[2].nonConfigurable;\n\tif (\n\t\t(typeof overrideIfSet !== 'undefined' && typeof overrideIfSet !== 'boolean')\n\t\t|| (typeof nonConfigurable !== 'undefined' && typeof nonConfigurable !== 'boolean')\n\t) {\n\t\tthrow new $TypeError('if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans');\n\t}\n\tif (toStringTag && (overrideIfSet || !hasOwn(object, toStringTag))) {\n\t\tif ($defineProperty) {\n\t\t\t$defineProperty(object, toStringTag, {\n\t\t\t\tconfigurable: !nonConfigurable,\n\t\t\t\tenumerable: false,\n\t\t\t\tvalue: value,\n\t\t\t\twritable: false\n\t\t\t});\n\t\t} else {\n\t\t\tobject[toStringTag] = value; // eslint-disable-line no-param-reassign\n\t\t}\n\t}\n};\n","// populates missing values\nmodule.exports = function(dst, src) {\n\n  Object.keys(src).forEach(function(prop)\n  {\n    dst[prop] = dst[prop] || src[prop];\n  });\n\n  return dst;\n};\n","var CombinedStream = require('combined-stream');\nvar util = require('util');\nvar path = require('path');\nvar http = require('http');\nvar https = require('https');\nvar parseUrl = require('url').parse;\nvar fs = require('fs');\nvar Stream = require('stream').Stream;\nvar mime = require('mime-types');\nvar asynckit = require('asynckit');\nvar setToStringTag = require('es-set-tostringtag');\nvar populate = require('./populate.js');\n\n// Public API\nmodule.exports = FormData;\n\n// make it a Stream\nutil.inherits(FormData, CombinedStream);\n\n/**\n * Create readable \"multipart/form-data\" streams.\n * Can be used to submit forms\n * and file uploads to other web applications.\n *\n * @constructor\n * @param {Object} options - Properties to be added/overriden for FormData and CombinedStream\n */\nfunction FormData(options) {\n  if (!(this instanceof FormData)) {\n    return new FormData(options);\n  }\n\n  this._overheadLength = 0;\n  this._valueLength = 0;\n  this._valuesToMeasure = [];\n\n  CombinedStream.call(this);\n\n  options = options || {};\n  for (var option in options) {\n    this[option] = options[option];\n  }\n}\n\nFormData.LINE_BREAK = '\\r\\n';\nFormData.DEFAULT_CONTENT_TYPE = 'application/octet-stream';\n\nFormData.prototype.append = function(field, value, options) {\n\n  options = options || {};\n\n  // allow filename as single option\n  if (typeof options == 'string') {\n    options = {filename: options};\n  }\n\n  var append = CombinedStream.prototype.append.bind(this);\n\n  // all that streamy business can't handle numbers\n  if (typeof value == 'number') {\n    value = '' + value;\n  }\n\n  // https://github.com/felixge/node-form-data/issues/38\n  if (Array.isArray(value)) {\n    // Please convert your array into string\n    // the way web server expects it\n    this._error(new Error('Arrays are not supported.'));\n    return;\n  }\n\n  var header = this._multiPartHeader(field, value, options);\n  var footer = this._multiPartFooter();\n\n  append(header);\n  append(value);\n  append(footer);\n\n  // pass along options.knownLength\n  this._trackLength(header, value, options);\n};\n\nFormData.prototype._trackLength = function(header, value, options) {\n  var valueLength = 0;\n\n  // used w/ getLengthSync(), when length is known.\n  // e.g. for streaming directly from a remote server,\n  // w/ a known file a size, and not wanting to wait for\n  // incoming file to finish to get its size.\n  if (options.knownLength != null) {\n    valueLength += +options.knownLength;\n  } else if (Buffer.isBuffer(value)) {\n    valueLength = value.length;\n  } else if (typeof value === 'string') {\n    valueLength = Buffer.byteLength(value);\n  }\n\n  this._valueLength += valueLength;\n\n  // @check why add CRLF? does this account for custom/multiple CRLFs?\n  this._overheadLength +=\n    Buffer.byteLength(header) +\n    FormData.LINE_BREAK.length;\n\n  // empty or either doesn't have path or not an http response or not a stream\n  if (!value || ( !value.path && !(value.readable && Object.prototype.hasOwnProperty.call(value, 'httpVersion')) && !(value instanceof Stream))) {\n    return;\n  }\n\n  // no need to bother with the length\n  if (!options.knownLength) {\n    this._valuesToMeasure.push(value);\n  }\n};\n\nFormData.prototype._lengthRetriever = function(value, callback) {\n  if (Object.prototype.hasOwnProperty.call(value, 'fd')) {\n\n    // take read range into a account\n    // `end` = Infinity –> read file till the end\n    //\n    // TODO: Looks like there is bug in Node fs.createReadStream\n    // it doesn't respect `end` options without `start` options\n    // Fix it when node fixes it.\n    // https://github.com/joyent/node/issues/7819\n    if (value.end != undefined && value.end != Infinity && value.start != undefined) {\n\n      // when end specified\n      // no need to calculate range\n      // inclusive, starts with 0\n      callback(null, value.end + 1 - (value.start ? value.start : 0));\n\n    // not that fast snoopy\n    } else {\n      // still need to fetch file size from fs\n      fs.stat(value.path, function(err, stat) {\n\n        var fileSize;\n\n        if (err) {\n          callback(err);\n          return;\n        }\n\n        // update final size based on the range options\n        fileSize = stat.size - (value.start ? value.start : 0);\n        callback(null, fileSize);\n      });\n    }\n\n  // or http response\n  } else if (Object.prototype.hasOwnProperty.call(value, 'httpVersion')) {\n    callback(null, +value.headers['content-length']);\n\n  // or request stream http://github.com/mikeal/request\n  } else if (Object.prototype.hasOwnProperty.call(value, 'httpModule')) {\n    // wait till response come back\n    value.on('response', function(response) {\n      value.pause();\n      callback(null, +response.headers['content-length']);\n    });\n    value.resume();\n\n  // something else\n  } else {\n    callback('Unknown stream');\n  }\n};\n\nFormData.prototype._multiPartHeader = function(field, value, options) {\n  // custom header specified (as string)?\n  // it becomes responsible for boundary\n  // (e.g. to handle extra CRLFs on .NET servers)\n  if (typeof options.header == 'string') {\n    return options.header;\n  }\n\n  var contentDisposition = this._getContentDisposition(value, options);\n  var contentType = this._getContentType(value, options);\n\n  var contents = '';\n  var headers  = {\n    // add custom disposition as third element or keep it two elements if not\n    'Content-Disposition': ['form-data', 'name=\"' + field + '\"'].concat(contentDisposition || []),\n    // if no content type. allow it to be empty array\n    'Content-Type': [].concat(contentType || [])\n  };\n\n  // allow custom headers.\n  if (typeof options.header == 'object') {\n    populate(headers, options.header);\n  }\n\n  var header;\n  for (var prop in headers) {\n    if (Object.prototype.hasOwnProperty.call(headers, prop)) {\n      header = headers[prop];\n\n      // skip nullish headers.\n      if (header == null) {\n        continue;\n      }\n\n      // convert all headers to arrays.\n      if (!Array.isArray(header)) {\n        header = [header];\n      }\n\n      // add non-empty headers.\n      if (header.length) {\n        contents += prop + ': ' + header.join('; ') + FormData.LINE_BREAK;\n      }\n    }\n  }\n\n  return '--' + this.getBoundary() + FormData.LINE_BREAK + contents + FormData.LINE_BREAK;\n};\n\nFormData.prototype._getContentDisposition = function(value, options) {\n\n  var filename\n    , contentDisposition\n    ;\n\n  if (typeof options.filepath === 'string') {\n    // custom filepath for relative paths\n    filename = path.normalize(options.filepath).replace(/\\\\/g, '/');\n  } else if (options.filename || value.name || value.path) {\n    // custom filename take precedence\n    // formidable and the browser add a name property\n    // fs- and request- streams have path property\n    filename = path.basename(options.filename || value.name || value.path);\n  } else if (value.readable && Object.prototype.hasOwnProperty.call(value, 'httpVersion')) {\n    // or try http response\n    filename = path.basename(value.client._httpMessage.path || '');\n  }\n\n  if (filename) {\n    contentDisposition = 'filename=\"' + filename + '\"';\n  }\n\n  return contentDisposition;\n};\n\nFormData.prototype._getContentType = function(value, options) {\n\n  // use custom content-type above all\n  var contentType = options.contentType;\n\n  // or try `name` from formidable, browser\n  if (!contentType && value.name) {\n    contentType = mime.lookup(value.name);\n  }\n\n  // or try `path` from fs-, request- streams\n  if (!contentType && value.path) {\n    contentType = mime.lookup(value.path);\n  }\n\n  // or if it's http-reponse\n  if (!contentType && value.readable && Object.prototype.hasOwnProperty.call(value, 'httpVersion')) {\n    contentType = value.headers['content-type'];\n  }\n\n  // or guess it from the filepath or filename\n  if (!contentType && (options.filepath || options.filename)) {\n    contentType = mime.lookup(options.filepath || options.filename);\n  }\n\n  // fallback to the default content type if `value` is not simple value\n  if (!contentType && typeof value == 'object') {\n    contentType = FormData.DEFAULT_CONTENT_TYPE;\n  }\n\n  return contentType;\n};\n\nFormData.prototype._multiPartFooter = function() {\n  return function(next) {\n    var footer = FormData.LINE_BREAK;\n\n    var lastPart = (this._streams.length === 0);\n    if (lastPart) {\n      footer += this._lastBoundary();\n    }\n\n    next(footer);\n  }.bind(this);\n};\n\nFormData.prototype._lastBoundary = function() {\n  return '--' + this.getBoundary() + '--' + FormData.LINE_BREAK;\n};\n\nFormData.prototype.getHeaders = function(userHeaders) {\n  var header;\n  var formHeaders = {\n    'content-type': 'multipart/form-data; boundary=' + this.getBoundary()\n  };\n\n  for (header in userHeaders) {\n    if (Object.prototype.hasOwnProperty.call(userHeaders, header)) {\n      formHeaders[header.toLowerCase()] = userHeaders[header];\n    }\n  }\n\n  return formHeaders;\n};\n\nFormData.prototype.setBoundary = function(boundary) {\n  this._boundary = boundary;\n};\n\nFormData.prototype.getBoundary = function() {\n  if (!this._boundary) {\n    this._generateBoundary();\n  }\n\n  return this._boundary;\n};\n\nFormData.prototype.getBuffer = function() {\n  var dataBuffer = new Buffer.alloc(0);\n  var boundary = this.getBoundary();\n\n  // Create the form content. Add Line breaks to the end of data.\n  for (var i = 0, len = this._streams.length; i < len; i++) {\n    if (typeof this._streams[i] !== 'function') {\n\n      // Add content to the buffer.\n      if(Buffer.isBuffer(this._streams[i])) {\n        dataBuffer = Buffer.concat( [dataBuffer, this._streams[i]]);\n      }else {\n        dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(this._streams[i])]);\n      }\n\n      // Add break after content.\n      if (typeof this._streams[i] !== 'string' || this._streams[i].substring( 2, boundary.length + 2 ) !== boundary) {\n        dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(FormData.LINE_BREAK)] );\n      }\n    }\n  }\n\n  // Add the footer and return the Buffer object.\n  return Buffer.concat( [dataBuffer, Buffer.from(this._lastBoundary())] );\n};\n\nFormData.prototype._generateBoundary = function() {\n  // This generates a 50 character boundary similar to those used by Firefox.\n  // They are optimized for boyer-moore parsing.\n  var boundary = '--------------------------';\n  for (var i = 0; i < 24; i++) {\n    boundary += Math.floor(Math.random() * 10).toString(16);\n  }\n\n  this._boundary = boundary;\n};\n\n// Note: getLengthSync DOESN'T calculate streams length\n// As workaround one can calculate file size manually\n// and add it as knownLength option\nFormData.prototype.getLengthSync = function() {\n  var knownLength = this._overheadLength + this._valueLength;\n\n  // Don't get confused, there are 3 \"internal\" streams for each keyval pair\n  // so it basically checks if there is any value added to the form\n  if (this._streams.length) {\n    knownLength += this._lastBoundary().length;\n  }\n\n  // https://github.com/form-data/form-data/issues/40\n  if (!this.hasKnownLength()) {\n    // Some async length retrievers are present\n    // therefore synchronous length calculation is false.\n    // Please use getLength(callback) to get proper length\n    this._error(new Error('Cannot calculate proper length in synchronous way.'));\n  }\n\n  return knownLength;\n};\n\n// Public API to check if length of added values is known\n// https://github.com/form-data/form-data/issues/196\n// https://github.com/form-data/form-data/issues/262\nFormData.prototype.hasKnownLength = function() {\n  var hasKnownLength = true;\n\n  if (this._valuesToMeasure.length) {\n    hasKnownLength = false;\n  }\n\n  return hasKnownLength;\n};\n\nFormData.prototype.getLength = function(cb) {\n  var knownLength = this._overheadLength + this._valueLength;\n\n  if (this._streams.length) {\n    knownLength += this._lastBoundary().length;\n  }\n\n  if (!this._valuesToMeasure.length) {\n    process.nextTick(cb.bind(this, null, knownLength));\n    return;\n  }\n\n  asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function(err, values) {\n    if (err) {\n      cb(err);\n      return;\n    }\n\n    values.forEach(function(length) {\n      knownLength += length;\n    });\n\n    cb(null, knownLength);\n  });\n};\n\nFormData.prototype.submit = function(params, cb) {\n  var request\n    , options\n    , defaults = {method: 'post'}\n    ;\n\n  // parse provided url if it's string\n  // or treat it as options object\n  if (typeof params == 'string') {\n\n    params = parseUrl(params);\n    options = populate({\n      port: params.port,\n      path: params.pathname,\n      host: params.hostname,\n      protocol: params.protocol\n    }, defaults);\n\n  // use custom params\n  } else {\n\n    options = populate(params, defaults);\n    // if no port provided use default one\n    if (!options.port) {\n      options.port = options.protocol == 'https:' ? 443 : 80;\n    }\n  }\n\n  // put that good code in getHeaders to some use\n  options.headers = this.getHeaders(params.headers);\n\n  // https if specified, fallback to http in any other case\n  if (options.protocol == 'https:') {\n    request = https.request(options);\n  } else {\n    request = http.request(options);\n  }\n\n  // get content length and fire away\n  this.getLength(function(err, length) {\n    if (err && err !== 'Unknown stream') {\n      this._error(err);\n      return;\n    }\n\n    // add content length\n    if (length) {\n      request.setHeader('Content-Length', length);\n    }\n\n    this.pipe(request);\n    if (cb) {\n      var onResponse;\n\n      var callback = function (error, responce) {\n        request.removeListener('error', callback);\n        request.removeListener('response', onResponse);\n\n        return cb.call(this, error, responce);\n      };\n\n      onResponse = callback.bind(this, null);\n\n      request.on('error', callback);\n      request.on('response', onResponse);\n    }\n  }.bind(this));\n\n  return request;\n};\n\nFormData.prototype._error = function(err) {\n  if (!this.error) {\n    this.error = err;\n    this.pause();\n    this.emit('error', err);\n  }\n};\n\nFormData.prototype.toString = function () {\n  return '[object FormData]';\n};\nsetToStringTag(FormData, 'FormData');\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\n// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored\nimport PlatformFormData from '../platform/node/classes/FormData.js';\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n  return utils.isPlainObject(thing) || utils.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n  return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n  if (!path) return key;\n  return path.concat(key).map(function each(token, i) {\n    // eslint-disable-next-line no-param-reassign\n    token = removeBrackets(token);\n    return !dots && i ? '[' + token + ']' : token;\n  }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array<any>} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n  return utils.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {\n  return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object<any, any>} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object<string, any>} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n  if (!utils.isObject(obj)) {\n    throw new TypeError('target must be an object');\n  }\n\n  // eslint-disable-next-line no-param-reassign\n  formData = formData || new (PlatformFormData || FormData)();\n\n  // eslint-disable-next-line no-param-reassign\n  options = utils.toFlatObject(options, {\n    metaTokens: true,\n    dots: false,\n    indexes: false\n  }, false, function defined(option, source) {\n    // eslint-disable-next-line no-eq-null,eqeqeq\n    return !utils.isUndefined(source[option]);\n  });\n\n  const metaTokens = options.metaTokens;\n  // eslint-disable-next-line no-use-before-define\n  const visitor = options.visitor || defaultVisitor;\n  const dots = options.dots;\n  const indexes = options.indexes;\n  const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n  const useBlob = _Blob && utils.isSpecCompliantForm(formData);\n\n  if (!utils.isFunction(visitor)) {\n    throw new TypeError('visitor must be a function');\n  }\n\n  function convertValue(value) {\n    if (value === null) return '';\n\n    if (utils.isDate(value)) {\n      return value.toISOString();\n    }\n\n    if (!useBlob && utils.isBlob(value)) {\n      throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n    }\n\n    if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n      return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n    }\n\n    return value;\n  }\n\n  /**\n   * Default visitor.\n   *\n   * @param {*} value\n   * @param {String|Number} key\n   * @param {Array<String|Number>} path\n   * @this {FormData}\n   *\n   * @returns {boolean} return true to visit the each prop of the value recursively\n   */\n  function defaultVisitor(value, key, path) {\n    let arr = value;\n\n    if (value && !path && typeof value === 'object') {\n      if (utils.endsWith(key, '{}')) {\n        // eslint-disable-next-line no-param-reassign\n        key = metaTokens ? key : key.slice(0, -2);\n        // eslint-disable-next-line no-param-reassign\n        value = JSON.stringify(value);\n      } else if (\n        (utils.isArray(value) && isFlatArray(value)) ||\n        ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))\n        )) {\n        // eslint-disable-next-line no-param-reassign\n        key = removeBrackets(key);\n\n        arr.forEach(function each(el, index) {\n          !(utils.isUndefined(el) || el === null) && formData.append(\n            // eslint-disable-next-line no-nested-ternary\n            indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n            convertValue(el)\n          );\n        });\n        return false;\n      }\n    }\n\n    if (isVisitable(value)) {\n      return true;\n    }\n\n    formData.append(renderKey(path, key, dots), convertValue(value));\n\n    return false;\n  }\n\n  const stack = [];\n\n  const exposedHelpers = Object.assign(predicates, {\n    defaultVisitor,\n    convertValue,\n    isVisitable\n  });\n\n  function build(value, path) {\n    if (utils.isUndefined(value)) return;\n\n    if (stack.indexOf(value) !== -1) {\n      throw Error('Circular reference detected in ' + path.join('.'));\n    }\n\n    stack.push(value);\n\n    utils.forEach(value, function each(el, key) {\n      const result = !(utils.isUndefined(el) || el === null) && visitor.call(\n        formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers\n      );\n\n      if (result === true) {\n        build(el, path ? path.concat(key) : [key]);\n      }\n    });\n\n    stack.pop();\n  }\n\n  if (!utils.isObject(obj)) {\n    throw new TypeError('data must be an object');\n  }\n\n  build(obj);\n\n  return formData;\n}\n\nexport default toFormData;\n","'use strict';\n\nimport toFormData from './toFormData.js';\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode(str) {\n  const charMap = {\n    '!': '%21',\n    \"'\": '%27',\n    '(': '%28',\n    ')': '%29',\n    '~': '%7E',\n    '%20': '+',\n    '%00': '\\x00'\n  };\n  return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n    return charMap[match];\n  });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object<string, any>} params - The parameters to be converted to a FormData object.\n * @param {Object<string, any>} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n  this._pairs = [];\n\n  params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n  this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n  const _encode = encoder ? function(value) {\n    return encoder.call(this, value, encode);\n  } : encode;\n\n  return this._pairs.map(function each(pair) {\n    return _encode(pair[0]) + '=' + _encode(pair[1]);\n  }, '').join('&');\n};\n\nexport default AxiosURLSearchParams;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosURLSearchParams from '../helpers/AxiosURLSearchParams.js';\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n  return encodeURIComponent(val).\n    replace(/%3A/gi, ':').\n    replace(/%24/g, '$').\n    replace(/%2C/gi, ',').\n    replace(/%20/g, '+').\n    replace(/%5B/gi, '[').\n    replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?(object|Function)} options\n *\n * @returns {string} The formatted url\n */\nexport default function buildURL(url, params, options) {\n  /*eslint no-param-reassign:0*/\n  if (!params) {\n    return url;\n  }\n  \n  const _encode = options && options.encode || encode;\n\n  if (utils.isFunction(options)) {\n    options = {\n      serialize: options\n    };\n  } \n\n  const serializeFn = options && options.serialize;\n\n  let serializedParams;\n\n  if (serializeFn) {\n    serializedParams = serializeFn(params, options);\n  } else {\n    serializedParams = utils.isURLSearchParams(params) ?\n      params.toString() :\n      new AxiosURLSearchParams(params, options).toString(_encode);\n  }\n\n  if (serializedParams) {\n    const hashmarkIndex = url.indexOf(\"#\");\n\n    if (hashmarkIndex !== -1) {\n      url = url.slice(0, hashmarkIndex);\n    }\n    url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n  }\n\n  return url;\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\nclass InterceptorManager {\n  constructor() {\n    this.handlers = [];\n  }\n\n  /**\n   * Add a new interceptor to the stack\n   *\n   * @param {Function} fulfilled The function to handle `then` for a `Promise`\n   * @param {Function} rejected The function to handle `reject` for a `Promise`\n   *\n   * @return {Number} An ID used to remove interceptor later\n   */\n  use(fulfilled, rejected, options) {\n    this.handlers.push({\n      fulfilled,\n      rejected,\n      synchronous: options ? options.synchronous : false,\n      runWhen: options ? options.runWhen : null\n    });\n    return this.handlers.length - 1;\n  }\n\n  /**\n   * Remove an interceptor from the stack\n   *\n   * @param {Number} id The ID that was returned by `use`\n   *\n   * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n   */\n  eject(id) {\n    if (this.handlers[id]) {\n      this.handlers[id] = null;\n    }\n  }\n\n  /**\n   * Clear all interceptors from the stack\n   *\n   * @returns {void}\n   */\n  clear() {\n    if (this.handlers) {\n      this.handlers = [];\n    }\n  }\n\n  /**\n   * Iterate over all the registered interceptors\n   *\n   * This method is particularly useful for skipping over any\n   * interceptors that may have become `null` calling `eject`.\n   *\n   * @param {Function} fn The function to call for each interceptor\n   *\n   * @returns {void}\n   */\n  forEach(fn) {\n    utils.forEach(this.handlers, function forEachHandler(h) {\n      if (h !== null) {\n        fn(h);\n      }\n    });\n  }\n}\n\nexport default InterceptorManager;\n","'use strict';\n\nexport default {\n  silentJSONParsing: true,\n  forcedJSONParsing: true,\n  clarifyTimeoutError: false\n};\n","'use strict';\n\nimport url from 'url';\nexport default url.URLSearchParams;\n","import crypto from 'crypto';\nimport URLSearchParams from './classes/URLSearchParams.js'\nimport FormData from './classes/FormData.js'\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz'\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n  DIGIT,\n  ALPHA,\n  ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n}\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n  let str = '';\n  const {length} = alphabet;\n  const randomValues = new Uint32Array(size);\n  crypto.randomFillSync(randomValues);\n  for (let i = 0; i < size; i++) {\n    str += alphabet[randomValues[i] % length];\n  }\n\n  return str;\n}\n\n\nexport default {\n  isNode: true,\n  classes: {\n    URLSearchParams,\n    FormData,\n    Blob: typeof Blob !== 'undefined' && Blob || null\n  },\n  ALPHABET,\n  generateString,\n  protocols: [ 'http', 'https', 'file', 'data' ]\n};\n","const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\nconst _navigator = typeof navigator === 'object' && navigator || undefined;\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n *  typeof window -> undefined\n *  typeof document -> undefined\n *\n * react-native:\n *  navigator.product -> 'ReactNative'\n * nativescript\n *  navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = hasBrowserEnv &&\n  (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n  return (\n    typeof WorkerGlobalScope !== 'undefined' &&\n    // eslint-disable-next-line no-undef\n    self instanceof WorkerGlobalScope &&\n    typeof self.importScripts === 'function'\n  );\n})();\n\nconst origin = hasBrowserEnv && window.location.href || 'http://localhost';\n\nexport {\n  hasBrowserEnv,\n  hasStandardBrowserWebWorkerEnv,\n  hasStandardBrowserEnv,\n  _navigator as navigator,\n  origin\n}\n","import platform from './node/index.js';\nimport * as utils from './common/utils.js';\n\nexport default {\n  ...utils,\n  ...platform\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport toFormData from './toFormData.js';\nimport platform from '../platform/index.js';\n\nexport default function toURLEncodedForm(data, options) {\n  return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n    visitor: function(value, key, path, helpers) {\n      if (platform.isNode && utils.isBuffer(value)) {\n        this.append(key, value.toString('base64'));\n        return false;\n      }\n\n      return helpers.defaultVisitor.apply(this, arguments);\n    }\n  }, options));\n}\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n  // foo[x][y][z]\n  // foo.x.y.z\n  // foo-x-y-z\n  // foo x y z\n  return utils.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n    return match[0] === '[]' ? '' : match[1] || match[0];\n  });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array<any>} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n  const obj = {};\n  const keys = Object.keys(arr);\n  let i;\n  const len = keys.length;\n  let key;\n  for (i = 0; i < len; i++) {\n    key = keys[i];\n    obj[key] = arr[key];\n  }\n  return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object<string, any> | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n  function buildPath(path, value, target, index) {\n    let name = path[index++];\n\n    if (name === '__proto__') return true;\n\n    const isNumericKey = Number.isFinite(+name);\n    const isLast = index >= path.length;\n    name = !name && utils.isArray(target) ? target.length : name;\n\n    if (isLast) {\n      if (utils.hasOwnProp(target, name)) {\n        target[name] = [target[name], value];\n      } else {\n        target[name] = value;\n      }\n\n      return !isNumericKey;\n    }\n\n    if (!target[name] || !utils.isObject(target[name])) {\n      target[name] = [];\n    }\n\n    const result = buildPath(path, value, target[name], index);\n\n    if (result && utils.isArray(target[name])) {\n      target[name] = arrayToObject(target[name]);\n    }\n\n    return !isNumericKey;\n  }\n\n  if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {\n    const obj = {};\n\n    utils.forEachEntry(formData, (name, value) => {\n      buildPath(parsePropPath(name), value, obj, 0);\n    });\n\n    return obj;\n  }\n\n  return null;\n}\n\nexport default formDataToJSON;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport transitionalDefaults from './transitional.js';\nimport toFormData from '../helpers/toFormData.js';\nimport toURLEncodedForm from '../helpers/toURLEncodedForm.js';\nimport platform from '../platform/index.js';\nimport formDataToJSON from '../helpers/formDataToJSON.js';\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n  if (utils.isString(rawValue)) {\n    try {\n      (parser || JSON.parse)(rawValue);\n      return utils.trim(rawValue);\n    } catch (e) {\n      if (e.name !== 'SyntaxError') {\n        throw e;\n      }\n    }\n  }\n\n  return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n  transitional: transitionalDefaults,\n\n  adapter: ['xhr', 'http', 'fetch'],\n\n  transformRequest: [function transformRequest(data, headers) {\n    const contentType = headers.getContentType() || '';\n    const hasJSONContentType = contentType.indexOf('application/json') > -1;\n    const isObjectPayload = utils.isObject(data);\n\n    if (isObjectPayload && utils.isHTMLForm(data)) {\n      data = new FormData(data);\n    }\n\n    const isFormData = utils.isFormData(data);\n\n    if (isFormData) {\n      return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n    }\n\n    if (utils.isArrayBuffer(data) ||\n      utils.isBuffer(data) ||\n      utils.isStream(data) ||\n      utils.isFile(data) ||\n      utils.isBlob(data) ||\n      utils.isReadableStream(data)\n    ) {\n      return data;\n    }\n    if (utils.isArrayBufferView(data)) {\n      return data.buffer;\n    }\n    if (utils.isURLSearchParams(data)) {\n      headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n      return data.toString();\n    }\n\n    let isFileList;\n\n    if (isObjectPayload) {\n      if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n        return toURLEncodedForm(data, this.formSerializer).toString();\n      }\n\n      if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n        const _FormData = this.env && this.env.FormData;\n\n        return toFormData(\n          isFileList ? {'files[]': data} : data,\n          _FormData && new _FormData(),\n          this.formSerializer\n        );\n      }\n    }\n\n    if (isObjectPayload || hasJSONContentType ) {\n      headers.setContentType('application/json', false);\n      return stringifySafely(data);\n    }\n\n    return data;\n  }],\n\n  transformResponse: [function transformResponse(data) {\n    const transitional = this.transitional || defaults.transitional;\n    const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n    const JSONRequested = this.responseType === 'json';\n\n    if (utils.isResponse(data) || utils.isReadableStream(data)) {\n      return data;\n    }\n\n    if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n      const silentJSONParsing = transitional && transitional.silentJSONParsing;\n      const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n      try {\n        return JSON.parse(data);\n      } catch (e) {\n        if (strictJSONParsing) {\n          if (e.name === 'SyntaxError') {\n            throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n          }\n          throw e;\n        }\n      }\n    }\n\n    return data;\n  }],\n\n  /**\n   * A timeout in milliseconds to abort a request. If set to 0 (default) a\n   * timeout is not created.\n   */\n  timeout: 0,\n\n  xsrfCookieName: 'XSRF-TOKEN',\n  xsrfHeaderName: 'X-XSRF-TOKEN',\n\n  maxContentLength: -1,\n  maxBodyLength: -1,\n\n  env: {\n    FormData: platform.classes.FormData,\n    Blob: platform.classes.Blob\n  },\n\n  validateStatus: function validateStatus(status) {\n    return status >= 200 && status < 300;\n  },\n\n  headers: {\n    common: {\n      'Accept': 'application/json, text/plain, */*',\n      'Content-Type': undefined\n    }\n  }\n};\n\nutils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n  defaults.headers[method] = {};\n});\n\nexport default defaults;\n","'use strict';\n\nimport utils from './../utils.js';\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils.toObjectSet([\n  'age', 'authorization', 'content-length', 'content-type', 'etag',\n  'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n  'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n  'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nexport default rawHeaders => {\n  const parsed = {};\n  let key;\n  let val;\n  let i;\n\n  rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n    i = line.indexOf(':');\n    key = line.substring(0, i).trim().toLowerCase();\n    val = line.substring(i + 1).trim();\n\n    if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n      return;\n    }\n\n    if (key === 'set-cookie') {\n      if (parsed[key]) {\n        parsed[key].push(val);\n      } else {\n        parsed[key] = [val];\n      }\n    } else {\n      parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n    }\n  });\n\n  return parsed;\n};\n","'use strict';\n\nimport utils from '../utils.js';\nimport parseHeaders from '../helpers/parseHeaders.js';\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n  return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n  if (value === false || value == null) {\n    return value;\n  }\n\n  return utils.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n  const tokens = Object.create(null);\n  const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n  let match;\n\n  while ((match = tokensRE.exec(str))) {\n    tokens[match[1]] = match[2];\n  }\n\n  return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n  if (utils.isFunction(filter)) {\n    return filter.call(this, value, header);\n  }\n\n  if (isHeaderNameFilter) {\n    value = header;\n  }\n\n  if (!utils.isString(value)) return;\n\n  if (utils.isString(filter)) {\n    return value.indexOf(filter) !== -1;\n  }\n\n  if (utils.isRegExp(filter)) {\n    return filter.test(value);\n  }\n}\n\nfunction formatHeader(header) {\n  return header.trim()\n    .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n      return char.toUpperCase() + str;\n    });\n}\n\nfunction buildAccessors(obj, header) {\n  const accessorName = utils.toCamelCase(' ' + header);\n\n  ['get', 'set', 'has'].forEach(methodName => {\n    Object.defineProperty(obj, methodName + accessorName, {\n      value: function(arg1, arg2, arg3) {\n        return this[methodName].call(this, header, arg1, arg2, arg3);\n      },\n      configurable: true\n    });\n  });\n}\n\nclass AxiosHeaders {\n  constructor(headers) {\n    headers && this.set(headers);\n  }\n\n  set(header, valueOrRewrite, rewrite) {\n    const self = this;\n\n    function setHeader(_value, _header, _rewrite) {\n      const lHeader = normalizeHeader(_header);\n\n      if (!lHeader) {\n        throw new Error('header name must be a non-empty string');\n      }\n\n      const key = utils.findKey(self, lHeader);\n\n      if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n        self[key || _header] = normalizeValue(_value);\n      }\n    }\n\n    const setHeaders = (headers, _rewrite) =>\n      utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n    if (utils.isPlainObject(header) || header instanceof this.constructor) {\n      setHeaders(header, valueOrRewrite)\n    } else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n      setHeaders(parseHeaders(header), valueOrRewrite);\n    } else if (utils.isHeaders(header)) {\n      for (const [key, value] of header.entries()) {\n        setHeader(value, key, rewrite);\n      }\n    } else {\n      header != null && setHeader(valueOrRewrite, header, rewrite);\n    }\n\n    return this;\n  }\n\n  get(header, parser) {\n    header = normalizeHeader(header);\n\n    if (header) {\n      const key = utils.findKey(this, header);\n\n      if (key) {\n        const value = this[key];\n\n        if (!parser) {\n          return value;\n        }\n\n        if (parser === true) {\n          return parseTokens(value);\n        }\n\n        if (utils.isFunction(parser)) {\n          return parser.call(this, value, key);\n        }\n\n        if (utils.isRegExp(parser)) {\n          return parser.exec(value);\n        }\n\n        throw new TypeError('parser must be boolean|regexp|function');\n      }\n    }\n  }\n\n  has(header, matcher) {\n    header = normalizeHeader(header);\n\n    if (header) {\n      const key = utils.findKey(this, header);\n\n      return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n    }\n\n    return false;\n  }\n\n  delete(header, matcher) {\n    const self = this;\n    let deleted = false;\n\n    function deleteHeader(_header) {\n      _header = normalizeHeader(_header);\n\n      if (_header) {\n        const key = utils.findKey(self, _header);\n\n        if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n          delete self[key];\n\n          deleted = true;\n        }\n      }\n    }\n\n    if (utils.isArray(header)) {\n      header.forEach(deleteHeader);\n    } else {\n      deleteHeader(header);\n    }\n\n    return deleted;\n  }\n\n  clear(matcher) {\n    const keys = Object.keys(this);\n    let i = keys.length;\n    let deleted = false;\n\n    while (i--) {\n      const key = keys[i];\n      if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n        delete this[key];\n        deleted = true;\n      }\n    }\n\n    return deleted;\n  }\n\n  normalize(format) {\n    const self = this;\n    const headers = {};\n\n    utils.forEach(this, (value, header) => {\n      const key = utils.findKey(headers, header);\n\n      if (key) {\n        self[key] = normalizeValue(value);\n        delete self[header];\n        return;\n      }\n\n      const normalized = format ? formatHeader(header) : String(header).trim();\n\n      if (normalized !== header) {\n        delete self[header];\n      }\n\n      self[normalized] = normalizeValue(value);\n\n      headers[normalized] = true;\n    });\n\n    return this;\n  }\n\n  concat(...targets) {\n    return this.constructor.concat(this, ...targets);\n  }\n\n  toJSON(asStrings) {\n    const obj = Object.create(null);\n\n    utils.forEach(this, (value, header) => {\n      value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);\n    });\n\n    return obj;\n  }\n\n  [Symbol.iterator]() {\n    return Object.entries(this.toJSON())[Symbol.iterator]();\n  }\n\n  toString() {\n    return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n  }\n\n  get [Symbol.toStringTag]() {\n    return 'AxiosHeaders';\n  }\n\n  static from(thing) {\n    return thing instanceof this ? thing : new this(thing);\n  }\n\n  static concat(first, ...targets) {\n    const computed = new this(first);\n\n    targets.forEach((target) => computed.set(target));\n\n    return computed;\n  }\n\n  static accessor(header) {\n    const internals = this[$internals] = (this[$internals] = {\n      accessors: {}\n    });\n\n    const accessors = internals.accessors;\n    const prototype = this.prototype;\n\n    function defineAccessor(_header) {\n      const lHeader = normalizeHeader(_header);\n\n      if (!accessors[lHeader]) {\n        buildAccessors(prototype, _header);\n        accessors[lHeader] = true;\n      }\n    }\n\n    utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n    return this;\n  }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n  let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n  return {\n    get: () => value,\n    set(headerValue) {\n      this[mapped] = headerValue;\n    }\n  }\n});\n\nutils.freezeMethods(AxiosHeaders);\n\nexport default AxiosHeaders;\n","'use strict';\n\nimport utils from './../utils.js';\nimport defaults from '../defaults/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nexport default function transformData(fns, response) {\n  const config = this || defaults;\n  const context = response || config;\n  const headers = AxiosHeaders.from(context.headers);\n  let data = context.data;\n\n  utils.forEach(fns, function transform(fn) {\n    data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n  });\n\n  headers.normalize();\n\n  return data;\n}\n","'use strict';\n\nexport default function isCancel(value) {\n  return !!(value && value.__CANCEL__);\n}\n","'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\nimport utils from '../utils.js';\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n  // eslint-disable-next-line no-eq-null,eqeqeq\n  AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n  this.name = 'CanceledError';\n}\n\nutils.inherits(CanceledError, AxiosError, {\n  __CANCEL__: true\n});\n\nexport default CanceledError;\n","'use strict';\n\nimport AxiosError from './AxiosError.js';\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nexport default function settle(resolve, reject, response) {\n  const validateStatus = response.config.validateStatus;\n  if (!response.status || !validateStatus || validateStatus(response.status)) {\n    resolve(response);\n  } else {\n    reject(new AxiosError(\n      'Request failed with status code ' + response.status,\n      [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n      response.config,\n      response.request,\n      response\n    ));\n  }\n}\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nexport default function isAbsoluteURL(url) {\n  // A URL is considered absolute if it begins with \"<scheme>://\" or \"//\" (protocol-relative URL).\n  // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n  // by any combination of letters, digits, plus, period, or hyphen.\n  return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nexport default function combineURLs(baseURL, relativeURL) {\n  return relativeURL\n    ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n    : baseURL;\n}\n","'use strict';\n\nimport isAbsoluteURL from '../helpers/isAbsoluteURL.js';\nimport combineURLs from '../helpers/combineURLs.js';\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nexport default function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {\n  let isRelativeUrl = !isAbsoluteURL(requestedURL);\n  if (baseURL && isRelativeUrl || allowAbsoluteUrls == false) {\n    return combineURLs(baseURL, requestedURL);\n  }\n  return requestedURL;\n}\n","'use strict';\n\nvar parseUrl = require('url').parse;\n\nvar DEFAULT_PORTS = {\n  ftp: 21,\n  gopher: 70,\n  http: 80,\n  https: 443,\n  ws: 80,\n  wss: 443,\n};\n\nvar stringEndsWith = String.prototype.endsWith || function(s) {\n  return s.length <= this.length &&\n    this.indexOf(s, this.length - s.length) !== -1;\n};\n\n/**\n * @param {string|object} url - The URL, or the result from url.parse.\n * @return {string} The URL of the proxy that should handle the request to the\n *  given URL. If no proxy is set, this will be an empty string.\n */\nfunction getProxyForUrl(url) {\n  var parsedUrl = typeof url === 'string' ? parseUrl(url) : url || {};\n  var proto = parsedUrl.protocol;\n  var hostname = parsedUrl.host;\n  var port = parsedUrl.port;\n  if (typeof hostname !== 'string' || !hostname || typeof proto !== 'string') {\n    return '';  // Don't proxy URLs without a valid scheme or host.\n  }\n\n  proto = proto.split(':', 1)[0];\n  // Stripping ports in this way instead of using parsedUrl.hostname to make\n  // sure that the brackets around IPv6 addresses are kept.\n  hostname = hostname.replace(/:\\d*$/, '');\n  port = parseInt(port) || DEFAULT_PORTS[proto] || 0;\n  if (!shouldProxy(hostname, port)) {\n    return '';  // Don't proxy URLs that match NO_PROXY.\n  }\n\n  var proxy =\n    getEnv('npm_config_' + proto + '_proxy') ||\n    getEnv(proto + '_proxy') ||\n    getEnv('npm_config_proxy') ||\n    getEnv('all_proxy');\n  if (proxy && proxy.indexOf('://') === -1) {\n    // Missing scheme in proxy, default to the requested URL's scheme.\n    proxy = proto + '://' + proxy;\n  }\n  return proxy;\n}\n\n/**\n * Determines whether a given URL should be proxied.\n *\n * @param {string} hostname - The host name of the URL.\n * @param {number} port - The effective port of the URL.\n * @returns {boolean} Whether the given URL should be proxied.\n * @private\n */\nfunction shouldProxy(hostname, port) {\n  var NO_PROXY =\n    (getEnv('npm_config_no_proxy') || getEnv('no_proxy')).toLowerCase();\n  if (!NO_PROXY) {\n    return true;  // Always proxy if NO_PROXY is not set.\n  }\n  if (NO_PROXY === '*') {\n    return false;  // Never proxy if wildcard is set.\n  }\n\n  return NO_PROXY.split(/[,\\s]/).every(function(proxy) {\n    if (!proxy) {\n      return true;  // Skip zero-length hosts.\n    }\n    var parsedProxy = proxy.match(/^(.+):(\\d+)$/);\n    var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy;\n    var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0;\n    if (parsedProxyPort && parsedProxyPort !== port) {\n      return true;  // Skip if ports don't match.\n    }\n\n    if (!/^[.*]/.test(parsedProxyHostname)) {\n      // No wildcards, so stop proxying if there is an exact match.\n      return hostname !== parsedProxyHostname;\n    }\n\n    if (parsedProxyHostname.charAt(0) === '*') {\n      // Remove leading wildcard.\n      parsedProxyHostname = parsedProxyHostname.slice(1);\n    }\n    // Stop proxying if the hostname ends with the no_proxy host.\n    return !stringEndsWith.call(hostname, parsedProxyHostname);\n  });\n}\n\n/**\n * Get the value for an environment variable.\n *\n * @param {string} key - The name of the environment variable.\n * @return {string} The value of the environment variable.\n * @private\n */\nfunction getEnv(key) {\n  return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || '';\n}\n\nexports.getProxyForUrl = getProxyForUrl;\n","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n *  - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function (val, options) {\n  options = options || {};\n  var type = typeof val;\n  if (type === 'string' && val.length > 0) {\n    return parse(val);\n  } else if (type === 'number' && isFinite(val)) {\n    return options.long ? fmtLong(val) : fmtShort(val);\n  }\n  throw new Error(\n    'val is not a non-empty string or a valid number. val=' +\n      JSON.stringify(val)\n  );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n  str = String(str);\n  if (str.length > 100) {\n    return;\n  }\n  var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n    str\n  );\n  if (!match) {\n    return;\n  }\n  var n = parseFloat(match[1]);\n  var type = (match[2] || 'ms').toLowerCase();\n  switch (type) {\n    case 'years':\n    case 'year':\n    case 'yrs':\n    case 'yr':\n    case 'y':\n      return n * y;\n    case 'weeks':\n    case 'week':\n    case 'w':\n      return n * w;\n    case 'days':\n    case 'day':\n    case 'd':\n      return n * d;\n    case 'hours':\n    case 'hour':\n    case 'hrs':\n    case 'hr':\n    case 'h':\n      return n * h;\n    case 'minutes':\n    case 'minute':\n    case 'mins':\n    case 'min':\n    case 'm':\n      return n * m;\n    case 'seconds':\n    case 'second':\n    case 'secs':\n    case 'sec':\n    case 's':\n      return n * s;\n    case 'milliseconds':\n    case 'millisecond':\n    case 'msecs':\n    case 'msec':\n    case 'ms':\n      return n;\n    default:\n      return undefined;\n  }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n  var msAbs = Math.abs(ms);\n  if (msAbs >= d) {\n    return Math.round(ms / d) + 'd';\n  }\n  if (msAbs >= h) {\n    return Math.round(ms / h) + 'h';\n  }\n  if (msAbs >= m) {\n    return Math.round(ms / m) + 'm';\n  }\n  if (msAbs >= s) {\n    return Math.round(ms / s) + 's';\n  }\n  return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n  var msAbs = Math.abs(ms);\n  if (msAbs >= d) {\n    return plural(ms, msAbs, d, 'day');\n  }\n  if (msAbs >= h) {\n    return plural(ms, msAbs, h, 'hour');\n  }\n  if (msAbs >= m) {\n    return plural(ms, msAbs, m, 'minute');\n  }\n  if (msAbs >= s) {\n    return plural(ms, msAbs, s, 'second');\n  }\n  return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n  var isPlural = msAbs >= n * 1.5;\n  return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '')\n\t\t\t.trim()\n\t\t\t.replace(' ', ',')\n\t\t\t.split(',')\n\t\t\t.filter(Boolean);\n\n\t\tfor (const ns of split) {\n\t\t\tif (ns[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(ns.slice(1));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(ns);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the given string matches a namespace template, honoring\n\t * asterisks as wildcards.\n\t *\n\t * @param {String} search\n\t * @param {String} template\n\t * @return {Boolean}\n\t */\n\tfunction matchesTemplate(search, template) {\n\t\tlet searchIndex = 0;\n\t\tlet templateIndex = 0;\n\t\tlet starIndex = -1;\n\t\tlet matchIndex = 0;\n\n\t\twhile (searchIndex < search.length) {\n\t\t\tif (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) {\n\t\t\t\t// Match character or proceed with wildcard\n\t\t\t\tif (template[templateIndex] === '*') {\n\t\t\t\t\tstarIndex = templateIndex;\n\t\t\t\t\tmatchIndex = searchIndex;\n\t\t\t\t\ttemplateIndex++; // Skip the '*'\n\t\t\t\t} else {\n\t\t\t\t\tsearchIndex++;\n\t\t\t\t\ttemplateIndex++;\n\t\t\t\t}\n\t\t\t} else if (starIndex !== -1) { // eslint-disable-line no-negated-condition\n\t\t\t\t// Backtrack to the last '*' and try to match more characters\n\t\t\t\ttemplateIndex = starIndex + 1;\n\t\t\t\tmatchIndex++;\n\t\t\t\tsearchIndex = matchIndex;\n\t\t\t} else {\n\t\t\t\treturn false; // No match\n\t\t\t}\n\t\t}\n\n\t\t// Handle trailing '*' in template\n\t\twhile (templateIndex < template.length && template[templateIndex] === '*') {\n\t\t\ttemplateIndex++;\n\t\t}\n\n\t\treturn templateIndex === template.length;\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names,\n\t\t\t...createDebug.skips.map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tfor (const skip of createDebug.skips) {\n\t\t\tif (matchesTemplate(name, skip)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (const ns of createDebug.names) {\n\t\t\tif (matchesTemplate(name, ns)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n","/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\nexports.destroy = (() => {\n\tlet warned = false;\n\n\treturn () => {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t\t}\n\t};\n})();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\tlet m;\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\t// eslint-disable-next-line no-return-assign\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)) && parseInt(m[1], 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug');\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n","'use strict';\n\nmodule.exports = (flag, argv = process.argv) => {\n\tconst prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');\n\tconst position = argv.indexOf(prefix + flag);\n\tconst terminatorPosition = argv.indexOf('--');\n\treturn position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);\n};\n","'use strict';\nconst os = require('os');\nconst tty = require('tty');\nconst hasFlag = require('has-flag');\n\nconst {env} = process;\n\nlet forceColor;\nif (hasFlag('no-color') ||\n\thasFlag('no-colors') ||\n\thasFlag('color=false') ||\n\thasFlag('color=never')) {\n\tforceColor = 0;\n} else if (hasFlag('color') ||\n\thasFlag('colors') ||\n\thasFlag('color=true') ||\n\thasFlag('color=always')) {\n\tforceColor = 1;\n}\n\nif ('FORCE_COLOR' in env) {\n\tif (env.FORCE_COLOR === 'true') {\n\t\tforceColor = 1;\n\t} else if (env.FORCE_COLOR === 'false') {\n\t\tforceColor = 0;\n\t} else {\n\t\tforceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);\n\t}\n}\n\nfunction translateLevel(level) {\n\tif (level === 0) {\n\t\treturn false;\n\t}\n\n\treturn {\n\t\tlevel,\n\t\thasBasic: true,\n\t\thas256: level >= 2,\n\t\thas16m: level >= 3\n\t};\n}\n\nfunction supportsColor(haveStream, streamIsTTY) {\n\tif (forceColor === 0) {\n\t\treturn 0;\n\t}\n\n\tif (hasFlag('color=16m') ||\n\t\thasFlag('color=full') ||\n\t\thasFlag('color=truecolor')) {\n\t\treturn 3;\n\t}\n\n\tif (hasFlag('color=256')) {\n\t\treturn 2;\n\t}\n\n\tif (haveStream && !streamIsTTY && forceColor === undefined) {\n\t\treturn 0;\n\t}\n\n\tconst min = forceColor || 0;\n\n\tif (env.TERM === 'dumb') {\n\t\treturn min;\n\t}\n\n\tif (process.platform === 'win32') {\n\t\t// Windows 10 build 10586 is the first Windows release that supports 256 colors.\n\t\t// Windows 10 build 14931 is the first release that supports 16m/TrueColor.\n\t\tconst osRelease = os.release().split('.');\n\t\tif (\n\t\t\tNumber(osRelease[0]) >= 10 &&\n\t\t\tNumber(osRelease[2]) >= 10586\n\t\t) {\n\t\t\treturn Number(osRelease[2]) >= 14931 ? 3 : 2;\n\t\t}\n\n\t\treturn 1;\n\t}\n\n\tif ('CI' in env) {\n\t\tif (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn min;\n\t}\n\n\tif ('TEAMCITY_VERSION' in env) {\n\t\treturn /^(9\\.(0*[1-9]\\d*)\\.|\\d{2,}\\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;\n\t}\n\n\tif (env.COLORTERM === 'truecolor') {\n\t\treturn 3;\n\t}\n\n\tif ('TERM_PROGRAM' in env) {\n\t\tconst version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);\n\n\t\tswitch (env.TERM_PROGRAM) {\n\t\t\tcase 'iTerm.app':\n\t\t\t\treturn version >= 3 ? 3 : 2;\n\t\t\tcase 'Apple_Terminal':\n\t\t\t\treturn 2;\n\t\t\t// No default\n\t\t}\n\t}\n\n\tif (/-256(color)?$/i.test(env.TERM)) {\n\t\treturn 2;\n\t}\n\n\tif (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {\n\t\treturn 1;\n\t}\n\n\tif ('COLORTERM' in env) {\n\t\treturn 1;\n\t}\n\n\treturn min;\n}\n\nfunction getSupportLevel(stream) {\n\tconst level = supportsColor(stream, stream && stream.isTTY);\n\treturn translateLevel(level);\n}\n\nmodule.exports = {\n\tsupportsColor: getSupportLevel,\n\tstdout: translateLevel(supportsColor(true, tty.isatty(1))),\n\tstderr: translateLevel(supportsColor(true, tty.isatty(2)))\n};\n","/**\n * Module dependencies.\n */\n\nconst tty = require('tty');\nconst util = require('util');\n\n/**\n * This is the Node.js implementation of `debug()`.\n */\n\nexports.init = init;\nexports.log = log;\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.destroy = util.deprecate(\n\t() => {},\n\t'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'\n);\n\n/**\n * Colors.\n */\n\nexports.colors = [6, 2, 3, 4, 5, 1];\n\ntry {\n\t// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)\n\t// eslint-disable-next-line import/no-extraneous-dependencies\n\tconst supportsColor = require('supports-color');\n\n\tif (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {\n\t\texports.colors = [\n\t\t\t20,\n\t\t\t21,\n\t\t\t26,\n\t\t\t27,\n\t\t\t32,\n\t\t\t33,\n\t\t\t38,\n\t\t\t39,\n\t\t\t40,\n\t\t\t41,\n\t\t\t42,\n\t\t\t43,\n\t\t\t44,\n\t\t\t45,\n\t\t\t56,\n\t\t\t57,\n\t\t\t62,\n\t\t\t63,\n\t\t\t68,\n\t\t\t69,\n\t\t\t74,\n\t\t\t75,\n\t\t\t76,\n\t\t\t77,\n\t\t\t78,\n\t\t\t79,\n\t\t\t80,\n\t\t\t81,\n\t\t\t92,\n\t\t\t93,\n\t\t\t98,\n\t\t\t99,\n\t\t\t112,\n\t\t\t113,\n\t\t\t128,\n\t\t\t129,\n\t\t\t134,\n\t\t\t135,\n\t\t\t148,\n\t\t\t149,\n\t\t\t160,\n\t\t\t161,\n\t\t\t162,\n\t\t\t163,\n\t\t\t164,\n\t\t\t165,\n\t\t\t166,\n\t\t\t167,\n\t\t\t168,\n\t\t\t169,\n\t\t\t170,\n\t\t\t171,\n\t\t\t172,\n\t\t\t173,\n\t\t\t178,\n\t\t\t179,\n\t\t\t184,\n\t\t\t185,\n\t\t\t196,\n\t\t\t197,\n\t\t\t198,\n\t\t\t199,\n\t\t\t200,\n\t\t\t201,\n\t\t\t202,\n\t\t\t203,\n\t\t\t204,\n\t\t\t205,\n\t\t\t206,\n\t\t\t207,\n\t\t\t208,\n\t\t\t209,\n\t\t\t214,\n\t\t\t215,\n\t\t\t220,\n\t\t\t221\n\t\t];\n\t}\n} catch (error) {\n\t// Swallow - we only care if `supports-color` is available; it doesn't have to be.\n}\n\n/**\n * Build up the default `inspectOpts` object from the environment variables.\n *\n *   $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js\n */\n\nexports.inspectOpts = Object.keys(process.env).filter(key => {\n\treturn /^debug_/i.test(key);\n}).reduce((obj, key) => {\n\t// Camel-case\n\tconst prop = key\n\t\t.substring(6)\n\t\t.toLowerCase()\n\t\t.replace(/_([a-z])/g, (_, k) => {\n\t\t\treturn k.toUpperCase();\n\t\t});\n\n\t// Coerce string value into JS value\n\tlet val = process.env[key];\n\tif (/^(yes|on|true|enabled)$/i.test(val)) {\n\t\tval = true;\n\t} else if (/^(no|off|false|disabled)$/i.test(val)) {\n\t\tval = false;\n\t} else if (val === 'null') {\n\t\tval = null;\n\t} else {\n\t\tval = Number(val);\n\t}\n\n\tobj[prop] = val;\n\treturn obj;\n}, {});\n\n/**\n * Is stdout a TTY? Colored output is enabled when `true`.\n */\n\nfunction useColors() {\n\treturn 'colors' in exports.inspectOpts ?\n\t\tBoolean(exports.inspectOpts.colors) :\n\t\ttty.isatty(process.stderr.fd);\n}\n\n/**\n * Adds ANSI color escape codes if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\tconst {namespace: name, useColors} = this;\n\n\tif (useColors) {\n\t\tconst c = this.color;\n\t\tconst colorCode = '\\u001B[3' + (c < 8 ? c : '8;5;' + c);\n\t\tconst prefix = `  ${colorCode};1m${name} \\u001B[0m`;\n\n\t\targs[0] = prefix + args[0].split('\\n').join('\\n' + prefix);\n\t\targs.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\\u001B[0m');\n\t} else {\n\t\targs[0] = getDate() + name + ' ' + args[0];\n\t}\n}\n\nfunction getDate() {\n\tif (exports.inspectOpts.hideDate) {\n\t\treturn '';\n\t}\n\treturn new Date().toISOString() + ' ';\n}\n\n/**\n * Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr.\n */\n\nfunction log(...args) {\n\treturn process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\\n');\n}\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\tif (namespaces) {\n\t\tprocess.env.DEBUG = namespaces;\n\t} else {\n\t\t// If you set a process.env field to null or undefined, it gets cast to the\n\t\t// string 'null' or 'undefined'. Just delete instead.\n\t\tdelete process.env.DEBUG;\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\n\nfunction load() {\n\treturn process.env.DEBUG;\n}\n\n/**\n * Init logic for `debug` instances.\n *\n * Create a new `inspectOpts` object in case `useColors` is set\n * differently for a particular `debug` instance.\n */\n\nfunction init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %o to `util.inspect()`, all on a single line.\n */\n\nformatters.o = function (v) {\n\tthis.inspectOpts.colors = this.useColors;\n\treturn util.inspect(v, this.inspectOpts)\n\t\t.split('\\n')\n\t\t.map(str => str.trim())\n\t\t.join(' ');\n};\n\n/**\n * Map %O to `util.inspect()`, allowing multiple lines if needed.\n */\n\nformatters.O = function (v) {\n\tthis.inspectOpts.colors = this.useColors;\n\treturn util.inspect(v, this.inspectOpts);\n};\n","/**\n * Detect Electron renderer / nwjs process, which is node, but we should\n * treat as a browser.\n */\n\nif (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {\n\tmodule.exports = require('./browser.js');\n} else {\n\tmodule.exports = require('./node.js');\n}\n","var debug;\n\nmodule.exports = function () {\n  if (!debug) {\n    try {\n      /* eslint global-require: off */\n      debug = require(\"debug\")(\"follow-redirects\");\n    }\n    catch (error) { /* */ }\n    if (typeof debug !== \"function\") {\n      debug = function () { /* */ };\n    }\n  }\n  debug.apply(null, arguments);\n};\n","var url = require(\"url\");\nvar URL = url.URL;\nvar http = require(\"http\");\nvar https = require(\"https\");\nvar Writable = require(\"stream\").Writable;\nvar assert = require(\"assert\");\nvar debug = require(\"./debug\");\n\n// Preventive platform detection\n// istanbul ignore next\n(function detectUnsupportedEnvironment() {\n  var looksLikeNode = typeof process !== \"undefined\";\n  var looksLikeBrowser = typeof window !== \"undefined\" && typeof document !== \"undefined\";\n  var looksLikeV8 = isFunction(Error.captureStackTrace);\n  if (!looksLikeNode && (looksLikeBrowser || !looksLikeV8)) {\n    console.warn(\"The follow-redirects package should be excluded from browser builds.\");\n  }\n}());\n\n// Whether to use the native URL object or the legacy url module\nvar useNativeURL = false;\ntry {\n  assert(new URL(\"\"));\n}\ncatch (error) {\n  useNativeURL = error.code === \"ERR_INVALID_URL\";\n}\n\n// URL fields to preserve in copy operations\nvar preservedUrlFields = [\n  \"auth\",\n  \"host\",\n  \"hostname\",\n  \"href\",\n  \"path\",\n  \"pathname\",\n  \"port\",\n  \"protocol\",\n  \"query\",\n  \"search\",\n  \"hash\",\n];\n\n// Create handlers that pass events from native requests\nvar events = [\"abort\", \"aborted\", \"connect\", \"error\", \"socket\", \"timeout\"];\nvar eventHandlers = Object.create(null);\nevents.forEach(function (event) {\n  eventHandlers[event] = function (arg1, arg2, arg3) {\n    this._redirectable.emit(event, arg1, arg2, arg3);\n  };\n});\n\n// Error types with codes\nvar InvalidUrlError = createErrorType(\n  \"ERR_INVALID_URL\",\n  \"Invalid URL\",\n  TypeError\n);\nvar RedirectionError = createErrorType(\n  \"ERR_FR_REDIRECTION_FAILURE\",\n  \"Redirected request failed\"\n);\nvar TooManyRedirectsError = createErrorType(\n  \"ERR_FR_TOO_MANY_REDIRECTS\",\n  \"Maximum number of redirects exceeded\",\n  RedirectionError\n);\nvar MaxBodyLengthExceededError = createErrorType(\n  \"ERR_FR_MAX_BODY_LENGTH_EXCEEDED\",\n  \"Request body larger than maxBodyLength limit\"\n);\nvar WriteAfterEndError = createErrorType(\n  \"ERR_STREAM_WRITE_AFTER_END\",\n  \"write after end\"\n);\n\n// istanbul ignore next\nvar destroy = Writable.prototype.destroy || noop;\n\n// An HTTP(S) request that can be redirected\nfunction RedirectableRequest(options, responseCallback) {\n  // Initialize the request\n  Writable.call(this);\n  this._sanitizeOptions(options);\n  this._options = options;\n  this._ended = false;\n  this._ending = false;\n  this._redirectCount = 0;\n  this._redirects = [];\n  this._requestBodyLength = 0;\n  this._requestBodyBuffers = [];\n\n  // Attach a callback if passed\n  if (responseCallback) {\n    this.on(\"response\", responseCallback);\n  }\n\n  // React to responses of native requests\n  var self = this;\n  this._onNativeResponse = function (response) {\n    try {\n      self._processResponse(response);\n    }\n    catch (cause) {\n      self.emit(\"error\", cause instanceof RedirectionError ?\n        cause : new RedirectionError({ cause: cause }));\n    }\n  };\n\n  // Perform the first request\n  this._performRequest();\n}\nRedirectableRequest.prototype = Object.create(Writable.prototype);\n\nRedirectableRequest.prototype.abort = function () {\n  destroyRequest(this._currentRequest);\n  this._currentRequest.abort();\n  this.emit(\"abort\");\n};\n\nRedirectableRequest.prototype.destroy = function (error) {\n  destroyRequest(this._currentRequest, error);\n  destroy.call(this, error);\n  return this;\n};\n\n// Writes buffered data to the current native request\nRedirectableRequest.prototype.write = function (data, encoding, callback) {\n  // Writing is not allowed if end has been called\n  if (this._ending) {\n    throw new WriteAfterEndError();\n  }\n\n  // Validate input and shift parameters if necessary\n  if (!isString(data) && !isBuffer(data)) {\n    throw new TypeError(\"data should be a string, Buffer or Uint8Array\");\n  }\n  if (isFunction(encoding)) {\n    callback = encoding;\n    encoding = null;\n  }\n\n  // Ignore empty buffers, since writing them doesn't invoke the callback\n  // https://github.com/nodejs/node/issues/22066\n  if (data.length === 0) {\n    if (callback) {\n      callback();\n    }\n    return;\n  }\n  // Only write when we don't exceed the maximum body length\n  if (this._requestBodyLength + data.length <= this._options.maxBodyLength) {\n    this._requestBodyLength += data.length;\n    this._requestBodyBuffers.push({ data: data, encoding: encoding });\n    this._currentRequest.write(data, encoding, callback);\n  }\n  // Error when we exceed the maximum body length\n  else {\n    this.emit(\"error\", new MaxBodyLengthExceededError());\n    this.abort();\n  }\n};\n\n// Ends the current native request\nRedirectableRequest.prototype.end = function (data, encoding, callback) {\n  // Shift parameters if necessary\n  if (isFunction(data)) {\n    callback = data;\n    data = encoding = null;\n  }\n  else if (isFunction(encoding)) {\n    callback = encoding;\n    encoding = null;\n  }\n\n  // Write data if needed and end\n  if (!data) {\n    this._ended = this._ending = true;\n    this._currentRequest.end(null, null, callback);\n  }\n  else {\n    var self = this;\n    var currentRequest = this._currentRequest;\n    this.write(data, encoding, function () {\n      self._ended = true;\n      currentRequest.end(null, null, callback);\n    });\n    this._ending = true;\n  }\n};\n\n// Sets a header value on the current native request\nRedirectableRequest.prototype.setHeader = function (name, value) {\n  this._options.headers[name] = value;\n  this._currentRequest.setHeader(name, value);\n};\n\n// Clears a header value on the current native request\nRedirectableRequest.prototype.removeHeader = function (name) {\n  delete this._options.headers[name];\n  this._currentRequest.removeHeader(name);\n};\n\n// Global timeout for all underlying requests\nRedirectableRequest.prototype.setTimeout = function (msecs, callback) {\n  var self = this;\n\n  // Destroys the socket on timeout\n  function destroyOnTimeout(socket) {\n    socket.setTimeout(msecs);\n    socket.removeListener(\"timeout\", socket.destroy);\n    socket.addListener(\"timeout\", socket.destroy);\n  }\n\n  // Sets up a timer to trigger a timeout event\n  function startTimer(socket) {\n    if (self._timeout) {\n      clearTimeout(self._timeout);\n    }\n    self._timeout = setTimeout(function () {\n      self.emit(\"timeout\");\n      clearTimer();\n    }, msecs);\n    destroyOnTimeout(socket);\n  }\n\n  // Stops a timeout from triggering\n  function clearTimer() {\n    // Clear the timeout\n    if (self._timeout) {\n      clearTimeout(self._timeout);\n      self._timeout = null;\n    }\n\n    // Clean up all attached listeners\n    self.removeListener(\"abort\", clearTimer);\n    self.removeListener(\"error\", clearTimer);\n    self.removeListener(\"response\", clearTimer);\n    self.removeListener(\"close\", clearTimer);\n    if (callback) {\n      self.removeListener(\"timeout\", callback);\n    }\n    if (!self.socket) {\n      self._currentRequest.removeListener(\"socket\", startTimer);\n    }\n  }\n\n  // Attach callback if passed\n  if (callback) {\n    this.on(\"timeout\", callback);\n  }\n\n  // Start the timer if or when the socket is opened\n  if (this.socket) {\n    startTimer(this.socket);\n  }\n  else {\n    this._currentRequest.once(\"socket\", startTimer);\n  }\n\n  // Clean up on events\n  this.on(\"socket\", destroyOnTimeout);\n  this.on(\"abort\", clearTimer);\n  this.on(\"error\", clearTimer);\n  this.on(\"response\", clearTimer);\n  this.on(\"close\", clearTimer);\n\n  return this;\n};\n\n// Proxy all other public ClientRequest methods\n[\n  \"flushHeaders\", \"getHeader\",\n  \"setNoDelay\", \"setSocketKeepAlive\",\n].forEach(function (method) {\n  RedirectableRequest.prototype[method] = function (a, b) {\n    return this._currentRequest[method](a, b);\n  };\n});\n\n// Proxy all public ClientRequest properties\n[\"aborted\", \"connection\", \"socket\"].forEach(function (property) {\n  Object.defineProperty(RedirectableRequest.prototype, property, {\n    get: function () { return this._currentRequest[property]; },\n  });\n});\n\nRedirectableRequest.prototype._sanitizeOptions = function (options) {\n  // Ensure headers are always present\n  if (!options.headers) {\n    options.headers = {};\n  }\n\n  // Since http.request treats host as an alias of hostname,\n  // but the url module interprets host as hostname plus port,\n  // eliminate the host property to avoid confusion.\n  if (options.host) {\n    // Use hostname if set, because it has precedence\n    if (!options.hostname) {\n      options.hostname = options.host;\n    }\n    delete options.host;\n  }\n\n  // Complete the URL object when necessary\n  if (!options.pathname && options.path) {\n    var searchPos = options.path.indexOf(\"?\");\n    if (searchPos < 0) {\n      options.pathname = options.path;\n    }\n    else {\n      options.pathname = options.path.substring(0, searchPos);\n      options.search = options.path.substring(searchPos);\n    }\n  }\n};\n\n\n// Executes the next native request (initial or redirect)\nRedirectableRequest.prototype._performRequest = function () {\n  // Load the native protocol\n  var protocol = this._options.protocol;\n  var nativeProtocol = this._options.nativeProtocols[protocol];\n  if (!nativeProtocol) {\n    throw new TypeError(\"Unsupported protocol \" + protocol);\n  }\n\n  // If specified, use the agent corresponding to the protocol\n  // (HTTP and HTTPS use different types of agents)\n  if (this._options.agents) {\n    var scheme = protocol.slice(0, -1);\n    this._options.agent = this._options.agents[scheme];\n  }\n\n  // Create the native request and set up its event handlers\n  var request = this._currentRequest =\n        nativeProtocol.request(this._options, this._onNativeResponse);\n  request._redirectable = this;\n  for (var event of events) {\n    request.on(event, eventHandlers[event]);\n  }\n\n  // RFC7230§5.3.1: When making a request directly to an origin server, […]\n  // a client MUST send only the absolute path […] as the request-target.\n  this._currentUrl = /^\\//.test(this._options.path) ?\n    url.format(this._options) :\n    // When making a request to a proxy, […]\n    // a client MUST send the target URI in absolute-form […].\n    this._options.path;\n\n  // End a redirected request\n  // (The first request must be ended explicitly with RedirectableRequest#end)\n  if (this._isRedirect) {\n    // Write the request entity and end\n    var i = 0;\n    var self = this;\n    var buffers = this._requestBodyBuffers;\n    (function writeNext(error) {\n      // Only write if this request has not been redirected yet\n      // istanbul ignore else\n      if (request === self._currentRequest) {\n        // Report any write errors\n        // istanbul ignore if\n        if (error) {\n          self.emit(\"error\", error);\n        }\n        // Write the next buffer if there are still left\n        else if (i < buffers.length) {\n          var buffer = buffers[i++];\n          // istanbul ignore else\n          if (!request.finished) {\n            request.write(buffer.data, buffer.encoding, writeNext);\n          }\n        }\n        // End the request if `end` has been called on us\n        else if (self._ended) {\n          request.end();\n        }\n      }\n    }());\n  }\n};\n\n// Processes a response from the current native request\nRedirectableRequest.prototype._processResponse = function (response) {\n  // Store the redirected response\n  var statusCode = response.statusCode;\n  if (this._options.trackRedirects) {\n    this._redirects.push({\n      url: this._currentUrl,\n      headers: response.headers,\n      statusCode: statusCode,\n    });\n  }\n\n  // RFC7231§6.4: The 3xx (Redirection) class of status code indicates\n  // that further action needs to be taken by the user agent in order to\n  // fulfill the request. If a Location header field is provided,\n  // the user agent MAY automatically redirect its request to the URI\n  // referenced by the Location field value,\n  // even if the specific status code is not understood.\n\n  // If the response is not a redirect; return it as-is\n  var location = response.headers.location;\n  if (!location || this._options.followRedirects === false ||\n      statusCode < 300 || statusCode >= 400) {\n    response.responseUrl = this._currentUrl;\n    response.redirects = this._redirects;\n    this.emit(\"response\", response);\n\n    // Clean up\n    this._requestBodyBuffers = [];\n    return;\n  }\n\n  // The response is a redirect, so abort the current request\n  destroyRequest(this._currentRequest);\n  // Discard the remainder of the response to avoid waiting for data\n  response.destroy();\n\n  // RFC7231§6.4: A client SHOULD detect and intervene\n  // in cyclical redirections (i.e., \"infinite\" redirection loops).\n  if (++this._redirectCount > this._options.maxRedirects) {\n    throw new TooManyRedirectsError();\n  }\n\n  // Store the request headers if applicable\n  var requestHeaders;\n  var beforeRedirect = this._options.beforeRedirect;\n  if (beforeRedirect) {\n    requestHeaders = Object.assign({\n      // The Host header was set by nativeProtocol.request\n      Host: response.req.getHeader(\"host\"),\n    }, this._options.headers);\n  }\n\n  // RFC7231§6.4: Automatic redirection needs to done with\n  // care for methods not known to be safe, […]\n  // RFC7231§6.4.2–3: For historical reasons, a user agent MAY change\n  // the request method from POST to GET for the subsequent request.\n  var method = this._options.method;\n  if ((statusCode === 301 || statusCode === 302) && this._options.method === \"POST\" ||\n      // RFC7231§6.4.4: The 303 (See Other) status code indicates that\n      // the server is redirecting the user agent to a different resource […]\n      // A user agent can perform a retrieval request targeting that URI\n      // (a GET or HEAD request if using HTTP) […]\n      (statusCode === 303) && !/^(?:GET|HEAD)$/.test(this._options.method)) {\n    this._options.method = \"GET\";\n    // Drop a possible entity and headers related to it\n    this._requestBodyBuffers = [];\n    removeMatchingHeaders(/^content-/i, this._options.headers);\n  }\n\n  // Drop the Host header, as the redirect might lead to a different host\n  var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers);\n\n  // If the redirect is relative, carry over the host of the last request\n  var currentUrlParts = parseUrl(this._currentUrl);\n  var currentHost = currentHostHeader || currentUrlParts.host;\n  var currentUrl = /^\\w+:/.test(location) ? this._currentUrl :\n    url.format(Object.assign(currentUrlParts, { host: currentHost }));\n\n  // Create the redirected request\n  var redirectUrl = resolveUrl(location, currentUrl);\n  debug(\"redirecting to\", redirectUrl.href);\n  this._isRedirect = true;\n  spreadUrlObject(redirectUrl, this._options);\n\n  // Drop confidential headers when redirecting to a less secure protocol\n  // or to a different domain that is not a superdomain\n  if (redirectUrl.protocol !== currentUrlParts.protocol &&\n     redirectUrl.protocol !== \"https:\" ||\n     redirectUrl.host !== currentHost &&\n     !isSubdomain(redirectUrl.host, currentHost)) {\n    removeMatchingHeaders(/^(?:(?:proxy-)?authorization|cookie)$/i, this._options.headers);\n  }\n\n  // Evaluate the beforeRedirect callback\n  if (isFunction(beforeRedirect)) {\n    var responseDetails = {\n      headers: response.headers,\n      statusCode: statusCode,\n    };\n    var requestDetails = {\n      url: currentUrl,\n      method: method,\n      headers: requestHeaders,\n    };\n    beforeRedirect(this._options, responseDetails, requestDetails);\n    this._sanitizeOptions(this._options);\n  }\n\n  // Perform the redirected request\n  this._performRequest();\n};\n\n// Wraps the key/value object of protocols with redirect functionality\nfunction wrap(protocols) {\n  // Default settings\n  var exports = {\n    maxRedirects: 21,\n    maxBodyLength: 10 * 1024 * 1024,\n  };\n\n  // Wrap each protocol\n  var nativeProtocols = {};\n  Object.keys(protocols).forEach(function (scheme) {\n    var protocol = scheme + \":\";\n    var nativeProtocol = nativeProtocols[protocol] = protocols[scheme];\n    var wrappedProtocol = exports[scheme] = Object.create(nativeProtocol);\n\n    // Executes a request, following redirects\n    function request(input, options, callback) {\n      // Parse parameters, ensuring that input is an object\n      if (isURL(input)) {\n        input = spreadUrlObject(input);\n      }\n      else if (isString(input)) {\n        input = spreadUrlObject(parseUrl(input));\n      }\n      else {\n        callback = options;\n        options = validateUrl(input);\n        input = { protocol: protocol };\n      }\n      if (isFunction(options)) {\n        callback = options;\n        options = null;\n      }\n\n      // Set defaults\n      options = Object.assign({\n        maxRedirects: exports.maxRedirects,\n        maxBodyLength: exports.maxBodyLength,\n      }, input, options);\n      options.nativeProtocols = nativeProtocols;\n      if (!isString(options.host) && !isString(options.hostname)) {\n        options.hostname = \"::1\";\n      }\n\n      assert.equal(options.protocol, protocol, \"protocol mismatch\");\n      debug(\"options\", options);\n      return new RedirectableRequest(options, callback);\n    }\n\n    // Executes a GET request, following redirects\n    function get(input, options, callback) {\n      var wrappedRequest = wrappedProtocol.request(input, options, callback);\n      wrappedRequest.end();\n      return wrappedRequest;\n    }\n\n    // Expose the properties on the wrapped protocol\n    Object.defineProperties(wrappedProtocol, {\n      request: { value: request, configurable: true, enumerable: true, writable: true },\n      get: { value: get, configurable: true, enumerable: true, writable: true },\n    });\n  });\n  return exports;\n}\n\nfunction noop() { /* empty */ }\n\nfunction parseUrl(input) {\n  var parsed;\n  // istanbul ignore else\n  if (useNativeURL) {\n    parsed = new URL(input);\n  }\n  else {\n    // Ensure the URL is valid and absolute\n    parsed = validateUrl(url.parse(input));\n    if (!isString(parsed.protocol)) {\n      throw new InvalidUrlError({ input });\n    }\n  }\n  return parsed;\n}\n\nfunction resolveUrl(relative, base) {\n  // istanbul ignore next\n  return useNativeURL ? new URL(relative, base) : parseUrl(url.resolve(base, relative));\n}\n\nfunction validateUrl(input) {\n  if (/^\\[/.test(input.hostname) && !/^\\[[:0-9a-f]+\\]$/i.test(input.hostname)) {\n    throw new InvalidUrlError({ input: input.href || input });\n  }\n  if (/^\\[/.test(input.host) && !/^\\[[:0-9a-f]+\\](:\\d+)?$/i.test(input.host)) {\n    throw new InvalidUrlError({ input: input.href || input });\n  }\n  return input;\n}\n\nfunction spreadUrlObject(urlObject, target) {\n  var spread = target || {};\n  for (var key of preservedUrlFields) {\n    spread[key] = urlObject[key];\n  }\n\n  // Fix IPv6 hostname\n  if (spread.hostname.startsWith(\"[\")) {\n    spread.hostname = spread.hostname.slice(1, -1);\n  }\n  // Ensure port is a number\n  if (spread.port !== \"\") {\n    spread.port = Number(spread.port);\n  }\n  // Concatenate path\n  spread.path = spread.search ? spread.pathname + spread.search : spread.pathname;\n\n  return spread;\n}\n\nfunction removeMatchingHeaders(regex, headers) {\n  var lastValue;\n  for (var header in headers) {\n    if (regex.test(header)) {\n      lastValue = headers[header];\n      delete headers[header];\n    }\n  }\n  return (lastValue === null || typeof lastValue === \"undefined\") ?\n    undefined : String(lastValue).trim();\n}\n\nfunction createErrorType(code, message, baseClass) {\n  // Create constructor\n  function CustomError(properties) {\n    // istanbul ignore else\n    if (isFunction(Error.captureStackTrace)) {\n      Error.captureStackTrace(this, this.constructor);\n    }\n    Object.assign(this, properties || {});\n    this.code = code;\n    this.message = this.cause ? message + \": \" + this.cause.message : message;\n  }\n\n  // Attach constructor and set default properties\n  CustomError.prototype = new (baseClass || Error)();\n  Object.defineProperties(CustomError.prototype, {\n    constructor: {\n      value: CustomError,\n      enumerable: false,\n    },\n    name: {\n      value: \"Error [\" + code + \"]\",\n      enumerable: false,\n    },\n  });\n  return CustomError;\n}\n\nfunction destroyRequest(request, error) {\n  for (var event of events) {\n    request.removeListener(event, eventHandlers[event]);\n  }\n  request.on(\"error\", noop);\n  request.destroy(error);\n}\n\nfunction isSubdomain(subdomain, domain) {\n  assert(isString(subdomain) && isString(domain));\n  var dot = subdomain.length - domain.length - 1;\n  return dot > 0 && subdomain[dot] === \".\" && subdomain.endsWith(domain);\n}\n\nfunction isString(value) {\n  return typeof value === \"string\" || value instanceof String;\n}\n\nfunction isFunction(value) {\n  return typeof value === \"function\";\n}\n\nfunction isBuffer(value) {\n  return typeof value === \"object\" && (\"length\" in value);\n}\n\nfunction isURL(value) {\n  return URL && value instanceof URL;\n}\n\n// Exports\nmodule.exports = wrap({ http: http, https: https });\nmodule.exports.wrap = wrap;\n","export const VERSION = \"1.8.2\";","'use strict';\n\nexport default function parseProtocol(url) {\n  const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n  return match && match[1] || '';\n}\n","'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\nimport parseProtocol from './parseProtocol.js';\nimport platform from '../platform/index.js';\n\nconst DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\\s\\S]*)$/;\n\n/**\n * Parse data uri to a Buffer or Blob\n *\n * @param {String} uri\n * @param {?Boolean} asBlob\n * @param {?Object} options\n * @param {?Function} options.Blob\n *\n * @returns {Buffer|Blob}\n */\nexport default function fromDataURI(uri, asBlob, options) {\n  const _Blob = options && options.Blob || platform.classes.Blob;\n  const protocol = parseProtocol(uri);\n\n  if (asBlob === undefined && _Blob) {\n    asBlob = true;\n  }\n\n  if (protocol === 'data') {\n    uri = protocol.length ? uri.slice(protocol.length + 1) : uri;\n\n    const match = DATA_URL_PATTERN.exec(uri);\n\n    if (!match) {\n      throw new AxiosError('Invalid URL', AxiosError.ERR_INVALID_URL);\n    }\n\n    const mime = match[1];\n    const isBase64 = match[2];\n    const body = match[3];\n    const buffer = Buffer.from(decodeURIComponent(body), isBase64 ? 'base64' : 'utf8');\n\n    if (asBlob) {\n      if (!_Blob) {\n        throw new AxiosError('Blob is not supported', AxiosError.ERR_NOT_SUPPORT);\n      }\n\n      return new _Blob([buffer], {type: mime});\n    }\n\n    return buffer;\n  }\n\n  throw new AxiosError('Unsupported protocol ' + protocol, AxiosError.ERR_NOT_SUPPORT);\n}\n","'use strict';\n\nimport stream from 'stream';\nimport utils from '../utils.js';\n\nconst kInternals = Symbol('internals');\n\nclass AxiosTransformStream extends stream.Transform{\n  constructor(options) {\n    options = utils.toFlatObject(options, {\n      maxRate: 0,\n      chunkSize: 64 * 1024,\n      minChunkSize: 100,\n      timeWindow: 500,\n      ticksRate: 2,\n      samplesCount: 15\n    }, null, (prop, source) => {\n      return !utils.isUndefined(source[prop]);\n    });\n\n    super({\n      readableHighWaterMark: options.chunkSize\n    });\n\n    const internals = this[kInternals] = {\n      timeWindow: options.timeWindow,\n      chunkSize: options.chunkSize,\n      maxRate: options.maxRate,\n      minChunkSize: options.minChunkSize,\n      bytesSeen: 0,\n      isCaptured: false,\n      notifiedBytesLoaded: 0,\n      ts: Date.now(),\n      bytes: 0,\n      onReadCallback: null\n    };\n\n    this.on('newListener', event => {\n      if (event === 'progress') {\n        if (!internals.isCaptured) {\n          internals.isCaptured = true;\n        }\n      }\n    });\n  }\n\n  _read(size) {\n    const internals = this[kInternals];\n\n    if (internals.onReadCallback) {\n      internals.onReadCallback();\n    }\n\n    return super._read(size);\n  }\n\n  _transform(chunk, encoding, callback) {\n    const internals = this[kInternals];\n    const maxRate = internals.maxRate;\n\n    const readableHighWaterMark = this.readableHighWaterMark;\n\n    const timeWindow = internals.timeWindow;\n\n    const divider = 1000 / timeWindow;\n    const bytesThreshold = (maxRate / divider);\n    const minChunkSize = internals.minChunkSize !== false ? Math.max(internals.minChunkSize, bytesThreshold * 0.01) : 0;\n\n    const pushChunk = (_chunk, _callback) => {\n      const bytes = Buffer.byteLength(_chunk);\n      internals.bytesSeen += bytes;\n      internals.bytes += bytes;\n\n      internals.isCaptured && this.emit('progress', internals.bytesSeen);\n\n      if (this.push(_chunk)) {\n        process.nextTick(_callback);\n      } else {\n        internals.onReadCallback = () => {\n          internals.onReadCallback = null;\n          process.nextTick(_callback);\n        };\n      }\n    }\n\n    const transformChunk = (_chunk, _callback) => {\n      const chunkSize = Buffer.byteLength(_chunk);\n      let chunkRemainder = null;\n      let maxChunkSize = readableHighWaterMark;\n      let bytesLeft;\n      let passed = 0;\n\n      if (maxRate) {\n        const now = Date.now();\n\n        if (!internals.ts || (passed = (now - internals.ts)) >= timeWindow) {\n          internals.ts = now;\n          bytesLeft = bytesThreshold - internals.bytes;\n          internals.bytes = bytesLeft < 0 ? -bytesLeft : 0;\n          passed = 0;\n        }\n\n        bytesLeft = bytesThreshold - internals.bytes;\n      }\n\n      if (maxRate) {\n        if (bytesLeft <= 0) {\n          // next time window\n          return setTimeout(() => {\n            _callback(null, _chunk);\n          }, timeWindow - passed);\n        }\n\n        if (bytesLeft < maxChunkSize) {\n          maxChunkSize = bytesLeft;\n        }\n      }\n\n      if (maxChunkSize && chunkSize > maxChunkSize && (chunkSize - maxChunkSize) > minChunkSize) {\n        chunkRemainder = _chunk.subarray(maxChunkSize);\n        _chunk = _chunk.subarray(0, maxChunkSize);\n      }\n\n      pushChunk(_chunk, chunkRemainder ? () => {\n        process.nextTick(_callback, null, chunkRemainder);\n      } : _callback);\n    };\n\n    transformChunk(chunk, function transformNextChunk(err, _chunk) {\n      if (err) {\n        return callback(err);\n      }\n\n      if (_chunk) {\n        transformChunk(_chunk, transformNextChunk);\n      } else {\n        callback(null);\n      }\n    });\n  }\n}\n\nexport default AxiosTransformStream;\n","const {asyncIterator} = Symbol;\n\nconst readBlob = async function* (blob) {\n  if (blob.stream) {\n    yield* blob.stream()\n  } else if (blob.arrayBuffer) {\n    yield await blob.arrayBuffer()\n  } else if (blob[asyncIterator]) {\n    yield* blob[asyncIterator]();\n  } else {\n    yield blob;\n  }\n}\n\nexport default readBlob;\n","import util from 'util';\nimport {Readable} from 'stream';\nimport utils from \"../utils.js\";\nimport readBlob from \"./readBlob.js\";\nimport platform from \"../platform/index.js\";\n\nconst BOUNDARY_ALPHABET = platform.ALPHABET.ALPHA_DIGIT + '-_';\n\nconst textEncoder = typeof TextEncoder === 'function' ? new TextEncoder() : new util.TextEncoder();\n\nconst CRLF = '\\r\\n';\nconst CRLF_BYTES = textEncoder.encode(CRLF);\nconst CRLF_BYTES_COUNT = 2;\n\nclass FormDataPart {\n  constructor(name, value) {\n    const {escapeName} = this.constructor;\n    const isStringValue = utils.isString(value);\n\n    let headers = `Content-Disposition: form-data; name=\"${escapeName(name)}\"${\n      !isStringValue && value.name ? `; filename=\"${escapeName(value.name)}\"` : ''\n    }${CRLF}`;\n\n    if (isStringValue) {\n      value = textEncoder.encode(String(value).replace(/\\r?\\n|\\r\\n?/g, CRLF));\n    } else {\n      headers += `Content-Type: ${value.type || \"application/octet-stream\"}${CRLF}`\n    }\n\n    this.headers = textEncoder.encode(headers + CRLF);\n\n    this.contentLength = isStringValue ? value.byteLength : value.size;\n\n    this.size = this.headers.byteLength + this.contentLength + CRLF_BYTES_COUNT;\n\n    this.name = name;\n    this.value = value;\n  }\n\n  async *encode(){\n    yield this.headers;\n\n    const {value} = this;\n\n    if(utils.isTypedArray(value)) {\n      yield value;\n    } else {\n      yield* readBlob(value);\n    }\n\n    yield CRLF_BYTES;\n  }\n\n  static escapeName(name) {\n      return String(name).replace(/[\\r\\n\"]/g, (match) => ({\n        '\\r' : '%0D',\n        '\\n' : '%0A',\n        '\"' : '%22',\n      }[match]));\n  }\n}\n\nconst formDataToStream = (form, headersHandler, options) => {\n  const {\n    tag = 'form-data-boundary',\n    size = 25,\n    boundary = tag + '-' + platform.generateString(size, BOUNDARY_ALPHABET)\n  } = options || {};\n\n  if(!utils.isFormData(form)) {\n    throw TypeError('FormData instance required');\n  }\n\n  if (boundary.length < 1 || boundary.length > 70) {\n    throw Error('boundary must be 10-70 characters long')\n  }\n\n  const boundaryBytes = textEncoder.encode('--' + boundary + CRLF);\n  const footerBytes = textEncoder.encode('--' + boundary + '--' + CRLF + CRLF);\n  let contentLength = footerBytes.byteLength;\n\n  const parts = Array.from(form.entries()).map(([name, value]) => {\n    const part = new FormDataPart(name, value);\n    contentLength += part.size;\n    return part;\n  });\n\n  contentLength += boundaryBytes.byteLength * parts.length;\n\n  contentLength = utils.toFiniteNumber(contentLength);\n\n  const computedHeaders = {\n    'Content-Type': `multipart/form-data; boundary=${boundary}`\n  }\n\n  if (Number.isFinite(contentLength)) {\n    computedHeaders['Content-Length'] = contentLength;\n  }\n\n  headersHandler && headersHandler(computedHeaders);\n\n  return Readable.from((async function *() {\n    for(const part of parts) {\n      yield boundaryBytes;\n      yield* part.encode();\n    }\n\n    yield footerBytes;\n  })());\n};\n\nexport default formDataToStream;\n","\"use strict\";\n\nimport stream from \"stream\";\n\nclass ZlibHeaderTransformStream extends stream.Transform {\n  __transform(chunk, encoding, callback) {\n    this.push(chunk);\n    callback();\n  }\n\n  _transform(chunk, encoding, callback) {\n    if (chunk.length !== 0) {\n      this._transform = this.__transform;\n\n      // Add Default Compression headers if no zlib headers are present\n      if (chunk[0] !== 120) { // Hex: 78\n        const header = Buffer.alloc(2);\n        header[0] = 120; // Hex: 78\n        header[1] = 156; // Hex: 9C \n        this.push(header, encoding);\n      }\n    }\n\n    this.__transform(chunk, encoding, callback);\n  }\n}\n\nexport default ZlibHeaderTransformStream;\n","import utils from \"../utils.js\";\n\nconst callbackify = (fn, reducer) => {\n  return utils.isAsyncFn(fn) ? function (...args) {\n    const cb = args.pop();\n    fn.apply(this, args).then((value) => {\n      try {\n        reducer ? cb(null, ...reducer(value)) : cb(null, value);\n      } catch (err) {\n        cb(err);\n      }\n    }, cb);\n  } : fn;\n}\n\nexport default callbackify;\n","'use strict';\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n  samplesCount = samplesCount || 10;\n  const bytes = new Array(samplesCount);\n  const timestamps = new Array(samplesCount);\n  let head = 0;\n  let tail = 0;\n  let firstSampleTS;\n\n  min = min !== undefined ? min : 1000;\n\n  return function push(chunkLength) {\n    const now = Date.now();\n\n    const startedAt = timestamps[tail];\n\n    if (!firstSampleTS) {\n      firstSampleTS = now;\n    }\n\n    bytes[head] = chunkLength;\n    timestamps[head] = now;\n\n    let i = tail;\n    let bytesCount = 0;\n\n    while (i !== head) {\n      bytesCount += bytes[i++];\n      i = i % samplesCount;\n    }\n\n    head = (head + 1) % samplesCount;\n\n    if (head === tail) {\n      tail = (tail + 1) % samplesCount;\n    }\n\n    if (now - firstSampleTS < min) {\n      return;\n    }\n\n    const passed = startedAt && now - startedAt;\n\n    return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n  };\n}\n\nexport default speedometer;\n","/**\n * Throttle decorator\n * @param {Function} fn\n * @param {Number} freq\n * @return {Function}\n */\nfunction throttle(fn, freq) {\n  let timestamp = 0;\n  let threshold = 1000 / freq;\n  let lastArgs;\n  let timer;\n\n  const invoke = (args, now = Date.now()) => {\n    timestamp = now;\n    lastArgs = null;\n    if (timer) {\n      clearTimeout(timer);\n      timer = null;\n    }\n    fn.apply(null, args);\n  }\n\n  const throttled = (...args) => {\n    const now = Date.now();\n    const passed = now - timestamp;\n    if ( passed >= threshold) {\n      invoke(args, now);\n    } else {\n      lastArgs = args;\n      if (!timer) {\n        timer = setTimeout(() => {\n          timer = null;\n          invoke(lastArgs)\n        }, threshold - passed);\n      }\n    }\n  }\n\n  const flush = () => lastArgs && invoke(lastArgs);\n\n  return [throttled, flush];\n}\n\nexport default throttle;\n","import speedometer from \"./speedometer.js\";\nimport throttle from \"./throttle.js\";\nimport utils from \"../utils.js\";\n\nexport const progressEventReducer = (listener, isDownloadStream, freq = 3) => {\n  let bytesNotified = 0;\n  const _speedometer = speedometer(50, 250);\n\n  return throttle(e => {\n    const loaded = e.loaded;\n    const total = e.lengthComputable ? e.total : undefined;\n    const progressBytes = loaded - bytesNotified;\n    const rate = _speedometer(progressBytes);\n    const inRange = loaded <= total;\n\n    bytesNotified = loaded;\n\n    const data = {\n      loaded,\n      total,\n      progress: total ? (loaded / total) : undefined,\n      bytes: progressBytes,\n      rate: rate ? rate : undefined,\n      estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n      event: e,\n      lengthComputable: total != null,\n      [isDownloadStream ? 'download' : 'upload']: true\n    };\n\n    listener(data);\n  }, freq);\n}\n\nexport const progressEventDecorator = (total, throttled) => {\n  const lengthComputable = total != null;\n\n  return [(loaded) => throttled[0]({\n    lengthComputable,\n    total,\n    loaded\n  }), throttled[1]];\n}\n\nexport const asyncDecorator = (fn) => (...args) => utils.asap(() => fn(...args));\n","'use strict';\n\nimport utils from './../utils.js';\nimport settle from './../core/settle.js';\nimport buildFullPath from '../core/buildFullPath.js';\nimport buildURL from './../helpers/buildURL.js';\nimport proxyFromEnv from 'proxy-from-env';\nimport http from 'http';\nimport https from 'https';\nimport util from 'util';\nimport followRedirects from 'follow-redirects';\nimport zlib from 'zlib';\nimport {VERSION} from '../env/data.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport platform from '../platform/index.js';\nimport fromDataURI from '../helpers/fromDataURI.js';\nimport stream from 'stream';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport AxiosTransformStream from '../helpers/AxiosTransformStream.js';\nimport {EventEmitter} from 'events';\nimport formDataToStream from \"../helpers/formDataToStream.js\";\nimport readBlob from \"../helpers/readBlob.js\";\nimport ZlibHeaderTransformStream from '../helpers/ZlibHeaderTransformStream.js';\nimport callbackify from \"../helpers/callbackify.js\";\nimport {progressEventReducer, progressEventDecorator, asyncDecorator} from \"../helpers/progressEventReducer.js\";\n\nconst zlibOptions = {\n  flush: zlib.constants.Z_SYNC_FLUSH,\n  finishFlush: zlib.constants.Z_SYNC_FLUSH\n};\n\nconst brotliOptions = {\n  flush: zlib.constants.BROTLI_OPERATION_FLUSH,\n  finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH\n}\n\nconst isBrotliSupported = utils.isFunction(zlib.createBrotliDecompress);\n\nconst {http: httpFollow, https: httpsFollow} = followRedirects;\n\nconst isHttps = /https:?/;\n\nconst supportedProtocols = platform.protocols.map(protocol => {\n  return protocol + ':';\n});\n\nconst flushOnFinish = (stream, [throttled, flush]) => {\n  stream\n    .on('end', flush)\n    .on('error', flush);\n\n  return throttled;\n}\n\n/**\n * If the proxy or config beforeRedirects functions are defined, call them with the options\n * object.\n *\n * @param {Object<string, any>} options - The options object that was passed to the request.\n *\n * @returns {Object<string, any>}\n */\nfunction dispatchBeforeRedirect(options, responseDetails) {\n  if (options.beforeRedirects.proxy) {\n    options.beforeRedirects.proxy(options);\n  }\n  if (options.beforeRedirects.config) {\n    options.beforeRedirects.config(options, responseDetails);\n  }\n}\n\n/**\n * If the proxy or config afterRedirects functions are defined, call them with the options\n *\n * @param {http.ClientRequestArgs} options\n * @param {AxiosProxyConfig} configProxy configuration from Axios options object\n * @param {string} location\n *\n * @returns {http.ClientRequestArgs}\n */\nfunction setProxy(options, configProxy, location) {\n  let proxy = configProxy;\n  if (!proxy && proxy !== false) {\n    const proxyUrl = proxyFromEnv.getProxyForUrl(location);\n    if (proxyUrl) {\n      proxy = new URL(proxyUrl);\n    }\n  }\n  if (proxy) {\n    // Basic proxy authorization\n    if (proxy.username) {\n      proxy.auth = (proxy.username || '') + ':' + (proxy.password || '');\n    }\n\n    if (proxy.auth) {\n      // Support proxy auth object form\n      if (proxy.auth.username || proxy.auth.password) {\n        proxy.auth = (proxy.auth.username || '') + ':' + (proxy.auth.password || '');\n      }\n      const base64 = Buffer\n        .from(proxy.auth, 'utf8')\n        .toString('base64');\n      options.headers['Proxy-Authorization'] = 'Basic ' + base64;\n    }\n\n    options.headers.host = options.hostname + (options.port ? ':' + options.port : '');\n    const proxyHost = proxy.hostname || proxy.host;\n    options.hostname = proxyHost;\n    // Replace 'host' since options is not a URL object\n    options.host = proxyHost;\n    options.port = proxy.port;\n    options.path = location;\n    if (proxy.protocol) {\n      options.protocol = proxy.protocol.includes(':') ? proxy.protocol : `${proxy.protocol}:`;\n    }\n  }\n\n  options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) {\n    // Configure proxy for redirected request, passing the original config proxy to apply\n    // the exact same logic as if the redirected request was performed by axios directly.\n    setProxy(redirectOptions, configProxy, redirectOptions.href);\n  };\n}\n\nconst isHttpAdapterSupported = typeof process !== 'undefined' && utils.kindOf(process) === 'process';\n\n// temporary hotfix\n\nconst wrapAsync = (asyncExecutor) => {\n  return new Promise((resolve, reject) => {\n    let onDone;\n    let isDone;\n\n    const done = (value, isRejected) => {\n      if (isDone) return;\n      isDone = true;\n      onDone && onDone(value, isRejected);\n    }\n\n    const _resolve = (value) => {\n      done(value);\n      resolve(value);\n    };\n\n    const _reject = (reason) => {\n      done(reason, true);\n      reject(reason);\n    }\n\n    asyncExecutor(_resolve, _reject, (onDoneHandler) => (onDone = onDoneHandler)).catch(_reject);\n  })\n};\n\nconst resolveFamily = ({address, family}) => {\n  if (!utils.isString(address)) {\n    throw TypeError('address must be a string');\n  }\n  return ({\n    address,\n    family: family || (address.indexOf('.') < 0 ? 6 : 4)\n  });\n}\n\nconst buildAddressEntry = (address, family) => resolveFamily(utils.isObject(address) ? address : {address, family});\n\n/*eslint consistent-return:0*/\nexport default isHttpAdapterSupported && function httpAdapter(config) {\n  return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {\n    let {data, lookup, family} = config;\n    const {responseType, responseEncoding} = config;\n    const method = config.method.toUpperCase();\n    let isDone;\n    let rejected = false;\n    let req;\n\n    if (lookup) {\n      const _lookup = callbackify(lookup, (value) => utils.isArray(value) ? value : [value]);\n      // hotfix to support opt.all option which is required for node 20.x\n      lookup = (hostname, opt, cb) => {\n        _lookup(hostname, opt, (err, arg0, arg1) => {\n          if (err) {\n            return cb(err);\n          }\n\n          const addresses = utils.isArray(arg0) ? arg0.map(addr => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)];\n\n          opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);\n        });\n      }\n    }\n\n    // temporary internal emitter until the AxiosRequest class will be implemented\n    const emitter = new EventEmitter();\n\n    const onFinished = () => {\n      if (config.cancelToken) {\n        config.cancelToken.unsubscribe(abort);\n      }\n\n      if (config.signal) {\n        config.signal.removeEventListener('abort', abort);\n      }\n\n      emitter.removeAllListeners();\n    }\n\n    onDone((value, isRejected) => {\n      isDone = true;\n      if (isRejected) {\n        rejected = true;\n        onFinished();\n      }\n    });\n\n    function abort(reason) {\n      emitter.emit('abort', !reason || reason.type ? new CanceledError(null, config, req) : reason);\n    }\n\n    emitter.once('abort', reject);\n\n    if (config.cancelToken || config.signal) {\n      config.cancelToken && config.cancelToken.subscribe(abort);\n      if (config.signal) {\n        config.signal.aborted ? abort() : config.signal.addEventListener('abort', abort);\n      }\n    }\n\n    // Parse url\n    const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);\n    const parsed = new URL(fullPath, platform.hasBrowserEnv ? platform.origin : undefined);\n    const protocol = parsed.protocol || supportedProtocols[0];\n\n    if (protocol === 'data:') {\n      let convertedData;\n\n      if (method !== 'GET') {\n        return settle(resolve, reject, {\n          status: 405,\n          statusText: 'method not allowed',\n          headers: {},\n          config\n        });\n      }\n\n      try {\n        convertedData = fromDataURI(config.url, responseType === 'blob', {\n          Blob: config.env && config.env.Blob\n        });\n      } catch (err) {\n        throw AxiosError.from(err, AxiosError.ERR_BAD_REQUEST, config);\n      }\n\n      if (responseType === 'text') {\n        convertedData = convertedData.toString(responseEncoding);\n\n        if (!responseEncoding || responseEncoding === 'utf8') {\n          convertedData = utils.stripBOM(convertedData);\n        }\n      } else if (responseType === 'stream') {\n        convertedData = stream.Readable.from(convertedData);\n      }\n\n      return settle(resolve, reject, {\n        data: convertedData,\n        status: 200,\n        statusText: 'OK',\n        headers: new AxiosHeaders(),\n        config\n      });\n    }\n\n    if (supportedProtocols.indexOf(protocol) === -1) {\n      return reject(new AxiosError(\n        'Unsupported protocol ' + protocol,\n        AxiosError.ERR_BAD_REQUEST,\n        config\n      ));\n    }\n\n    const headers = AxiosHeaders.from(config.headers).normalize();\n\n    // Set User-Agent (required by some servers)\n    // See https://github.com/axios/axios/issues/69\n    // User-Agent is specified; handle case where no UA header is desired\n    // Only set header if it hasn't been set in config\n    headers.set('User-Agent', 'axios/' + VERSION, false);\n\n    const {onUploadProgress, onDownloadProgress} = config;\n    const maxRate = config.maxRate;\n    let maxUploadRate = undefined;\n    let maxDownloadRate = undefined;\n\n    // support for spec compliant FormData objects\n    if (utils.isSpecCompliantForm(data)) {\n      const userBoundary = headers.getContentType(/boundary=([-_\\w\\d]{10,70})/i);\n\n      data = formDataToStream(data, (formHeaders) => {\n        headers.set(formHeaders);\n      }, {\n        tag: `axios-${VERSION}-boundary`,\n        boundary: userBoundary && userBoundary[1] || undefined\n      });\n      // support for https://www.npmjs.com/package/form-data api\n    } else if (utils.isFormData(data) && utils.isFunction(data.getHeaders)) {\n      headers.set(data.getHeaders());\n\n      if (!headers.hasContentLength()) {\n        try {\n          const knownLength = await util.promisify(data.getLength).call(data);\n          Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength);\n          /*eslint no-empty:0*/\n        } catch (e) {\n        }\n      }\n    } else if (utils.isBlob(data) || utils.isFile(data)) {\n      data.size && headers.setContentType(data.type || 'application/octet-stream');\n      headers.setContentLength(data.size || 0);\n      data = stream.Readable.from(readBlob(data));\n    } else if (data && !utils.isStream(data)) {\n      if (Buffer.isBuffer(data)) {\n        // Nothing to do...\n      } else if (utils.isArrayBuffer(data)) {\n        data = Buffer.from(new Uint8Array(data));\n      } else if (utils.isString(data)) {\n        data = Buffer.from(data, 'utf-8');\n      } else {\n        return reject(new AxiosError(\n          'Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream',\n          AxiosError.ERR_BAD_REQUEST,\n          config\n        ));\n      }\n\n      // Add Content-Length header if data exists\n      headers.setContentLength(data.length, false);\n\n      if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) {\n        return reject(new AxiosError(\n          'Request body larger than maxBodyLength limit',\n          AxiosError.ERR_BAD_REQUEST,\n          config\n        ));\n      }\n    }\n\n    const contentLength = utils.toFiniteNumber(headers.getContentLength());\n\n    if (utils.isArray(maxRate)) {\n      maxUploadRate = maxRate[0];\n      maxDownloadRate = maxRate[1];\n    } else {\n      maxUploadRate = maxDownloadRate = maxRate;\n    }\n\n    if (data && (onUploadProgress || maxUploadRate)) {\n      if (!utils.isStream(data)) {\n        data = stream.Readable.from(data, {objectMode: false});\n      }\n\n      data = stream.pipeline([data, new AxiosTransformStream({\n        maxRate: utils.toFiniteNumber(maxUploadRate)\n      })], utils.noop);\n\n      onUploadProgress && data.on('progress', flushOnFinish(\n        data,\n        progressEventDecorator(\n          contentLength,\n          progressEventReducer(asyncDecorator(onUploadProgress), false, 3)\n        )\n      ));\n    }\n\n    // HTTP basic authentication\n    let auth = undefined;\n    if (config.auth) {\n      const username = config.auth.username || '';\n      const password = config.auth.password || '';\n      auth = username + ':' + password;\n    }\n\n    if (!auth && parsed.username) {\n      const urlUsername = parsed.username;\n      const urlPassword = parsed.password;\n      auth = urlUsername + ':' + urlPassword;\n    }\n\n    auth && headers.delete('authorization');\n\n    let path;\n\n    try {\n      path = buildURL(\n        parsed.pathname + parsed.search,\n        config.params,\n        config.paramsSerializer\n      ).replace(/^\\?/, '');\n    } catch (err) {\n      const customErr = new Error(err.message);\n      customErr.config = config;\n      customErr.url = config.url;\n      customErr.exists = true;\n      return reject(customErr);\n    }\n\n    headers.set(\n      'Accept-Encoding',\n      'gzip, compress, deflate' + (isBrotliSupported ? ', br' : ''), false\n      );\n\n    const options = {\n      path,\n      method: method,\n      headers: headers.toJSON(),\n      agents: { http: config.httpAgent, https: config.httpsAgent },\n      auth,\n      protocol,\n      family,\n      beforeRedirect: dispatchBeforeRedirect,\n      beforeRedirects: {}\n    };\n\n    // cacheable-lookup integration hotfix\n    !utils.isUndefined(lookup) && (options.lookup = lookup);\n\n    if (config.socketPath) {\n      options.socketPath = config.socketPath;\n    } else {\n      options.hostname = parsed.hostname.startsWith(\"[\") ? parsed.hostname.slice(1, -1) : parsed.hostname;\n      options.port = parsed.port;\n      setProxy(options, config.proxy, protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path);\n    }\n\n    let transport;\n    const isHttpsRequest = isHttps.test(options.protocol);\n    options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;\n    if (config.transport) {\n      transport = config.transport;\n    } else if (config.maxRedirects === 0) {\n      transport = isHttpsRequest ? https : http;\n    } else {\n      if (config.maxRedirects) {\n        options.maxRedirects = config.maxRedirects;\n      }\n      if (config.beforeRedirect) {\n        options.beforeRedirects.config = config.beforeRedirect;\n      }\n      transport = isHttpsRequest ? httpsFollow : httpFollow;\n    }\n\n    if (config.maxBodyLength > -1) {\n      options.maxBodyLength = config.maxBodyLength;\n    } else {\n      // follow-redirects does not skip comparison, so it should always succeed for axios -1 unlimited\n      options.maxBodyLength = Infinity;\n    }\n\n    if (config.insecureHTTPParser) {\n      options.insecureHTTPParser = config.insecureHTTPParser;\n    }\n\n    // Create the request\n    req = transport.request(options, function handleResponse(res) {\n      if (req.destroyed) return;\n\n      const streams = [res];\n\n      const responseLength = +res.headers['content-length'];\n\n      if (onDownloadProgress || maxDownloadRate) {\n        const transformStream = new AxiosTransformStream({\n          maxRate: utils.toFiniteNumber(maxDownloadRate)\n        });\n\n        onDownloadProgress && transformStream.on('progress', flushOnFinish(\n          transformStream,\n          progressEventDecorator(\n            responseLength,\n            progressEventReducer(asyncDecorator(onDownloadProgress), true, 3)\n          )\n        ));\n\n        streams.push(transformStream);\n      }\n\n      // decompress the response body transparently if required\n      let responseStream = res;\n\n      // return the last request in case of redirects\n      const lastRequest = res.req || req;\n\n      // if decompress disabled we should not decompress\n      if (config.decompress !== false && res.headers['content-encoding']) {\n        // if no content, but headers still say that it is encoded,\n        // remove the header not confuse downstream operations\n        if (method === 'HEAD' || res.statusCode === 204) {\n          delete res.headers['content-encoding'];\n        }\n\n        switch ((res.headers['content-encoding'] || '').toLowerCase()) {\n        /*eslint default-case:0*/\n        case 'gzip':\n        case 'x-gzip':\n        case 'compress':\n        case 'x-compress':\n          // add the unzipper to the body stream processing pipeline\n          streams.push(zlib.createUnzip(zlibOptions));\n\n          // remove the content-encoding in order to not confuse downstream operations\n          delete res.headers['content-encoding'];\n          break;\n        case 'deflate':\n          streams.push(new ZlibHeaderTransformStream());\n\n          // add the unzipper to the body stream processing pipeline\n          streams.push(zlib.createUnzip(zlibOptions));\n\n          // remove the content-encoding in order to not confuse downstream operations\n          delete res.headers['content-encoding'];\n          break;\n        case 'br':\n          if (isBrotliSupported) {\n            streams.push(zlib.createBrotliDecompress(brotliOptions));\n            delete res.headers['content-encoding'];\n          }\n        }\n      }\n\n      responseStream = streams.length > 1 ? stream.pipeline(streams, utils.noop) : streams[0];\n\n      const offListeners = stream.finished(responseStream, () => {\n        offListeners();\n        onFinished();\n      });\n\n      const response = {\n        status: res.statusCode,\n        statusText: res.statusMessage,\n        headers: new AxiosHeaders(res.headers),\n        config,\n        request: lastRequest\n      };\n\n      if (responseType === 'stream') {\n        response.data = responseStream;\n        settle(resolve, reject, response);\n      } else {\n        const responseBuffer = [];\n        let totalResponseBytes = 0;\n\n        responseStream.on('data', function handleStreamData(chunk) {\n          responseBuffer.push(chunk);\n          totalResponseBytes += chunk.length;\n\n          // make sure the content length is not over the maxContentLength if specified\n          if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {\n            // stream.destroy() emit aborted event before calling reject() on Node.js v16\n            rejected = true;\n            responseStream.destroy();\n            reject(new AxiosError('maxContentLength size of ' + config.maxContentLength + ' exceeded',\n              AxiosError.ERR_BAD_RESPONSE, config, lastRequest));\n          }\n        });\n\n        responseStream.on('aborted', function handlerStreamAborted() {\n          if (rejected) {\n            return;\n          }\n\n          const err = new AxiosError(\n            'stream has been aborted',\n            AxiosError.ERR_BAD_RESPONSE,\n            config,\n            lastRequest\n          );\n          responseStream.destroy(err);\n          reject(err);\n        });\n\n        responseStream.on('error', function handleStreamError(err) {\n          if (req.destroyed) return;\n          reject(AxiosError.from(err, null, config, lastRequest));\n        });\n\n        responseStream.on('end', function handleStreamEnd() {\n          try {\n            let responseData = responseBuffer.length === 1 ? responseBuffer[0] : Buffer.concat(responseBuffer);\n            if (responseType !== 'arraybuffer') {\n              responseData = responseData.toString(responseEncoding);\n              if (!responseEncoding || responseEncoding === 'utf8') {\n                responseData = utils.stripBOM(responseData);\n              }\n            }\n            response.data = responseData;\n          } catch (err) {\n            return reject(AxiosError.from(err, null, config, response.request, response));\n          }\n          settle(resolve, reject, response);\n        });\n      }\n\n      emitter.once('abort', err => {\n        if (!responseStream.destroyed) {\n          responseStream.emit('error', err);\n          responseStream.destroy();\n        }\n      });\n    });\n\n    emitter.once('abort', err => {\n      reject(err);\n      req.destroy(err);\n    });\n\n    // Handle errors\n    req.on('error', function handleRequestError(err) {\n      // @todo remove\n      // if (req.aborted && err.code !== AxiosError.ERR_FR_TOO_MANY_REDIRECTS) return;\n      reject(AxiosError.from(err, null, config, req));\n    });\n\n    // set tcp keep alive to prevent drop connection by peer\n    req.on('socket', function handleRequestSocket(socket) {\n      // default interval of sending ack packet is 1 minute\n      socket.setKeepAlive(true, 1000 * 60);\n    });\n\n    // Handle request timeout\n    if (config.timeout) {\n      // This is forcing a int timeout to avoid problems if the `req` interface doesn't handle other types.\n      const timeout = parseInt(config.timeout, 10);\n\n      if (Number.isNaN(timeout)) {\n        reject(new AxiosError(\n          'error trying to parse `config.timeout` to int',\n          AxiosError.ERR_BAD_OPTION_VALUE,\n          config,\n          req\n        ));\n\n        return;\n      }\n\n      // Sometime, the response will be very slow, and does not respond, the connect event will be block by event loop system.\n      // And timer callback will be fired, and abort() will be invoked before connection, then get \"socket hang up\" and code ECONNRESET.\n      // At this time, if we have a large number of request, nodejs will hang up some socket on background. and the number will up and up.\n      // And then these socket which be hang up will devouring CPU little by little.\n      // ClientRequest.setTimeout will be fired on the specify milliseconds, and can make sure that abort() will be fired after connect.\n      req.setTimeout(timeout, function handleRequestTimeout() {\n        if (isDone) return;\n        let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n        const transitional = config.transitional || transitionalDefaults;\n        if (config.timeoutErrorMessage) {\n          timeoutErrorMessage = config.timeoutErrorMessage;\n        }\n        reject(new AxiosError(\n          timeoutErrorMessage,\n          transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n          config,\n          req\n        ));\n        abort();\n      });\n    }\n\n\n    // Send the request\n    if (utils.isStream(data)) {\n      let ended = false;\n      let errored = false;\n\n      data.on('end', () => {\n        ended = true;\n      });\n\n      data.once('error', err => {\n        errored = true;\n        req.destroy(err);\n      });\n\n      data.on('close', () => {\n        if (!ended && !errored) {\n          abort(new CanceledError('Request stream has been aborted', config, req));\n        }\n      });\n\n      data.pipe(req);\n    } else {\n      req.end(data);\n    }\n  });\n}\n\nexport const __setProxy = setProxy;\n","import platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => {\n  url = new URL(url, platform.origin);\n\n  return (\n    origin.protocol === url.protocol &&\n    origin.host === url.host &&\n    (isMSIE || origin.port === url.port)\n  );\n})(\n  new URL(platform.origin),\n  platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)\n) : () => true;\n","import utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n  // Standard browser envs support document.cookie\n  {\n    write(name, value, expires, path, domain, secure) {\n      const cookie = [name + '=' + encodeURIComponent(value)];\n\n      utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n      utils.isString(path) && cookie.push('path=' + path);\n\n      utils.isString(domain) && cookie.push('domain=' + domain);\n\n      secure === true && cookie.push('secure');\n\n      document.cookie = cookie.join('; ');\n    },\n\n    read(name) {\n      const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n      return (match ? decodeURIComponent(match[3]) : null);\n    },\n\n    remove(name) {\n      this.write(name, '', Date.now() - 86400000);\n    }\n  }\n\n  :\n\n  // Non-standard browser env (web workers, react-native) lack needed support.\n  {\n    write() {},\n    read() {\n      return null;\n    },\n    remove() {}\n  };\n\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from \"./AxiosHeaders.js\";\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders ? { ...thing } : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nexport default function mergeConfig(config1, config2) {\n  // eslint-disable-next-line no-param-reassign\n  config2 = config2 || {};\n  const config = {};\n\n  function getMergedValue(target, source, prop, caseless) {\n    if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n      return utils.merge.call({caseless}, target, source);\n    } else if (utils.isPlainObject(source)) {\n      return utils.merge({}, source);\n    } else if (utils.isArray(source)) {\n      return source.slice();\n    }\n    return source;\n  }\n\n  // eslint-disable-next-line consistent-return\n  function mergeDeepProperties(a, b, prop , caseless) {\n    if (!utils.isUndefined(b)) {\n      return getMergedValue(a, b, prop , caseless);\n    } else if (!utils.isUndefined(a)) {\n      return getMergedValue(undefined, a, prop , caseless);\n    }\n  }\n\n  // eslint-disable-next-line consistent-return\n  function valueFromConfig2(a, b) {\n    if (!utils.isUndefined(b)) {\n      return getMergedValue(undefined, b);\n    }\n  }\n\n  // eslint-disable-next-line consistent-return\n  function defaultToConfig2(a, b) {\n    if (!utils.isUndefined(b)) {\n      return getMergedValue(undefined, b);\n    } else if (!utils.isUndefined(a)) {\n      return getMergedValue(undefined, a);\n    }\n  }\n\n  // eslint-disable-next-line consistent-return\n  function mergeDirectKeys(a, b, prop) {\n    if (prop in config2) {\n      return getMergedValue(a, b);\n    } else if (prop in config1) {\n      return getMergedValue(undefined, a);\n    }\n  }\n\n  const mergeMap = {\n    url: valueFromConfig2,\n    method: valueFromConfig2,\n    data: valueFromConfig2,\n    baseURL: defaultToConfig2,\n    transformRequest: defaultToConfig2,\n    transformResponse: defaultToConfig2,\n    paramsSerializer: defaultToConfig2,\n    timeout: defaultToConfig2,\n    timeoutMessage: defaultToConfig2,\n    withCredentials: defaultToConfig2,\n    withXSRFToken: defaultToConfig2,\n    adapter: defaultToConfig2,\n    responseType: defaultToConfig2,\n    xsrfCookieName: defaultToConfig2,\n    xsrfHeaderName: defaultToConfig2,\n    onUploadProgress: defaultToConfig2,\n    onDownloadProgress: defaultToConfig2,\n    decompress: defaultToConfig2,\n    maxContentLength: defaultToConfig2,\n    maxBodyLength: defaultToConfig2,\n    beforeRedirect: defaultToConfig2,\n    transport: defaultToConfig2,\n    httpAgent: defaultToConfig2,\n    httpsAgent: defaultToConfig2,\n    cancelToken: defaultToConfig2,\n    socketPath: defaultToConfig2,\n    responseEncoding: defaultToConfig2,\n    validateStatus: mergeDirectKeys,\n    headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)\n  };\n\n  utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n    const merge = mergeMap[prop] || mergeDeepProperties;\n    const configValue = merge(config1[prop], config2[prop], prop);\n    (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n  });\n\n  return config;\n}\n","import platform from \"../platform/index.js\";\nimport utils from \"../utils.js\";\nimport isURLSameOrigin from \"./isURLSameOrigin.js\";\nimport cookies from \"./cookies.js\";\nimport buildFullPath from \"../core/buildFullPath.js\";\nimport mergeConfig from \"../core/mergeConfig.js\";\nimport AxiosHeaders from \"../core/AxiosHeaders.js\";\nimport buildURL from \"./buildURL.js\";\n\nexport default (config) => {\n  const newConfig = mergeConfig({}, config);\n\n  let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig;\n\n  newConfig.headers = headers = AxiosHeaders.from(headers);\n\n  newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer);\n\n  // HTTP basic authentication\n  if (auth) {\n    headers.set('Authorization', 'Basic ' +\n      btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : ''))\n    );\n  }\n\n  let contentType;\n\n  if (utils.isFormData(data)) {\n    if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n      headers.setContentType(undefined); // Let the browser set it\n    } else if ((contentType = headers.getContentType()) !== false) {\n      // fix semicolon duplication issue for ReactNative FormData implementation\n      const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n      headers.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n    }\n  }\n\n  // Add xsrf header\n  // This is only done if running in a standard browser environment.\n  // Specifically not if we're in a web worker, or react-native.\n\n  if (platform.hasStandardBrowserEnv) {\n    withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));\n\n    if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(newConfig.url))) {\n      // Add xsrf header\n      const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);\n\n      if (xsrfValue) {\n        headers.set(xsrfHeaderName, xsrfValue);\n      }\n    }\n  }\n\n  return newConfig;\n}\n\n","import utils from './../utils.js';\nimport settle from './../core/settle.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport parseProtocol from '../helpers/parseProtocol.js';\nimport platform from '../platform/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport {progressEventReducer} from '../helpers/progressEventReducer.js';\nimport resolveConfig from \"../helpers/resolveConfig.js\";\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nexport default isXHRAdapterSupported && function (config) {\n  return new Promise(function dispatchXhrRequest(resolve, reject) {\n    const _config = resolveConfig(config);\n    let requestData = _config.data;\n    const requestHeaders = AxiosHeaders.from(_config.headers).normalize();\n    let {responseType, onUploadProgress, onDownloadProgress} = _config;\n    let onCanceled;\n    let uploadThrottled, downloadThrottled;\n    let flushUpload, flushDownload;\n\n    function done() {\n      flushUpload && flushUpload(); // flush events\n      flushDownload && flushDownload(); // flush events\n\n      _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);\n\n      _config.signal && _config.signal.removeEventListener('abort', onCanceled);\n    }\n\n    let request = new XMLHttpRequest();\n\n    request.open(_config.method.toUpperCase(), _config.url, true);\n\n    // Set the request timeout in MS\n    request.timeout = _config.timeout;\n\n    function onloadend() {\n      if (!request) {\n        return;\n      }\n      // Prepare the response\n      const responseHeaders = AxiosHeaders.from(\n        'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n      );\n      const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n        request.responseText : request.response;\n      const response = {\n        data: responseData,\n        status: request.status,\n        statusText: request.statusText,\n        headers: responseHeaders,\n        config,\n        request\n      };\n\n      settle(function _resolve(value) {\n        resolve(value);\n        done();\n      }, function _reject(err) {\n        reject(err);\n        done();\n      }, response);\n\n      // Clean up request\n      request = null;\n    }\n\n    if ('onloadend' in request) {\n      // Use onloadend if available\n      request.onloadend = onloadend;\n    } else {\n      // Listen for ready state to emulate onloadend\n      request.onreadystatechange = function handleLoad() {\n        if (!request || request.readyState !== 4) {\n          return;\n        }\n\n        // The request errored out and we didn't get a response, this will be\n        // handled by onerror instead\n        // With one exception: request that using file: protocol, most browsers\n        // will return status as 0 even though it's a successful request\n        if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n          return;\n        }\n        // readystate handler is calling before onerror or ontimeout handlers,\n        // so we should call onloadend on the next 'tick'\n        setTimeout(onloadend);\n      };\n    }\n\n    // Handle browser request cancellation (as opposed to a manual cancellation)\n    request.onabort = function handleAbort() {\n      if (!request) {\n        return;\n      }\n\n      reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n      // Clean up request\n      request = null;\n    };\n\n    // Handle low level network errors\n    request.onerror = function handleError() {\n      // Real errors are hidden from us by the browser\n      // onerror should only fire if it's a network error\n      reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n      // Clean up request\n      request = null;\n    };\n\n    // Handle timeout\n    request.ontimeout = function handleTimeout() {\n      let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';\n      const transitional = _config.transitional || transitionalDefaults;\n      if (_config.timeoutErrorMessage) {\n        timeoutErrorMessage = _config.timeoutErrorMessage;\n      }\n      reject(new AxiosError(\n        timeoutErrorMessage,\n        transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n        config,\n        request));\n\n      // Clean up request\n      request = null;\n    };\n\n    // Remove Content-Type if data is undefined\n    requestData === undefined && requestHeaders.setContentType(null);\n\n    // Add headers to the request\n    if ('setRequestHeader' in request) {\n      utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n        request.setRequestHeader(key, val);\n      });\n    }\n\n    // Add withCredentials to request if needed\n    if (!utils.isUndefined(_config.withCredentials)) {\n      request.withCredentials = !!_config.withCredentials;\n    }\n\n    // Add responseType to request if needed\n    if (responseType && responseType !== 'json') {\n      request.responseType = _config.responseType;\n    }\n\n    // Handle progress if needed\n    if (onDownloadProgress) {\n      ([downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true));\n      request.addEventListener('progress', downloadThrottled);\n    }\n\n    // Not all browsers support upload events\n    if (onUploadProgress && request.upload) {\n      ([uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress));\n\n      request.upload.addEventListener('progress', uploadThrottled);\n\n      request.upload.addEventListener('loadend', flushUpload);\n    }\n\n    if (_config.cancelToken || _config.signal) {\n      // Handle cancellation\n      // eslint-disable-next-line func-names\n      onCanceled = cancel => {\n        if (!request) {\n          return;\n        }\n        reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n        request.abort();\n        request = null;\n      };\n\n      _config.cancelToken && _config.cancelToken.subscribe(onCanceled);\n      if (_config.signal) {\n        _config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled);\n      }\n    }\n\n    const protocol = parseProtocol(_config.url);\n\n    if (protocol && platform.protocols.indexOf(protocol) === -1) {\n      reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n      return;\n    }\n\n\n    // Send the request\n    request.send(requestData || null);\n  });\n}\n","import CanceledError from \"../cancel/CanceledError.js\";\nimport AxiosError from \"../core/AxiosError.js\";\nimport utils from '../utils.js';\n\nconst composeSignals = (signals, timeout) => {\n  const {length} = (signals = signals ? signals.filter(Boolean) : []);\n\n  if (timeout || length) {\n    let controller = new AbortController();\n\n    let aborted;\n\n    const onabort = function (reason) {\n      if (!aborted) {\n        aborted = true;\n        unsubscribe();\n        const err = reason instanceof Error ? reason : this.reason;\n        controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));\n      }\n    }\n\n    let timer = timeout && setTimeout(() => {\n      timer = null;\n      onabort(new AxiosError(`timeout ${timeout} of ms exceeded`, AxiosError.ETIMEDOUT))\n    }, timeout)\n\n    const unsubscribe = () => {\n      if (signals) {\n        timer && clearTimeout(timer);\n        timer = null;\n        signals.forEach(signal => {\n          signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort);\n        });\n        signals = null;\n      }\n    }\n\n    signals.forEach((signal) => signal.addEventListener('abort', onabort));\n\n    const {signal} = controller;\n\n    signal.unsubscribe = () => utils.asap(unsubscribe);\n\n    return signal;\n  }\n}\n\nexport default composeSignals;\n","\nexport const streamChunk = function* (chunk, chunkSize) {\n  let len = chunk.byteLength;\n\n  if (!chunkSize || len < chunkSize) {\n    yield chunk;\n    return;\n  }\n\n  let pos = 0;\n  let end;\n\n  while (pos < len) {\n    end = pos + chunkSize;\n    yield chunk.slice(pos, end);\n    pos = end;\n  }\n}\n\nexport const readBytes = async function* (iterable, chunkSize) {\n  for await (const chunk of readStream(iterable)) {\n    yield* streamChunk(chunk, chunkSize);\n  }\n}\n\nconst readStream = async function* (stream) {\n  if (stream[Symbol.asyncIterator]) {\n    yield* stream;\n    return;\n  }\n\n  const reader = stream.getReader();\n  try {\n    for (;;) {\n      const {done, value} = await reader.read();\n      if (done) {\n        break;\n      }\n      yield value;\n    }\n  } finally {\n    await reader.cancel();\n  }\n}\n\nexport const trackStream = (stream, chunkSize, onProgress, onFinish) => {\n  const iterator = readBytes(stream, chunkSize);\n\n  let bytes = 0;\n  let done;\n  let _onFinish = (e) => {\n    if (!done) {\n      done = true;\n      onFinish && onFinish(e);\n    }\n  }\n\n  return new ReadableStream({\n    async pull(controller) {\n      try {\n        const {done, value} = await iterator.next();\n\n        if (done) {\n         _onFinish();\n          controller.close();\n          return;\n        }\n\n        let len = value.byteLength;\n        if (onProgress) {\n          let loadedBytes = bytes += len;\n          onProgress(loadedBytes);\n        }\n        controller.enqueue(new Uint8Array(value));\n      } catch (err) {\n        _onFinish(err);\n        throw err;\n      }\n    },\n    cancel(reason) {\n      _onFinish(reason);\n      return iterator.return();\n    }\n  }, {\n    highWaterMark: 2\n  })\n}\n","import platform from \"../platform/index.js\";\nimport utils from \"../utils.js\";\nimport AxiosError from \"../core/AxiosError.js\";\nimport composeSignals from \"../helpers/composeSignals.js\";\nimport {trackStream} from \"../helpers/trackStream.js\";\nimport AxiosHeaders from \"../core/AxiosHeaders.js\";\nimport {progressEventReducer, progressEventDecorator, asyncDecorator} from \"../helpers/progressEventReducer.js\";\nimport resolveConfig from \"../helpers/resolveConfig.js\";\nimport settle from \"../core/settle.js\";\n\nconst isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function';\nconst isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function';\n\n// used only inside the fetch adapter\nconst encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?\n    ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :\n    async (str) => new Uint8Array(await new Response(str).arrayBuffer())\n);\n\nconst test = (fn, ...args) => {\n  try {\n    return !!fn(...args);\n  } catch (e) {\n    return false\n  }\n}\n\nconst supportsRequestStream = isReadableStreamSupported && test(() => {\n  let duplexAccessed = false;\n\n  const hasContentType = new Request(platform.origin, {\n    body: new ReadableStream(),\n    method: 'POST',\n    get duplex() {\n      duplexAccessed = true;\n      return 'half';\n    },\n  }).headers.has('Content-Type');\n\n  return duplexAccessed && !hasContentType;\n});\n\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst supportsResponseStream = isReadableStreamSupported &&\n  test(() => utils.isReadableStream(new Response('').body));\n\n\nconst resolvers = {\n  stream: supportsResponseStream && ((res) => res.body)\n};\n\nisFetchSupported && (((res) => {\n  ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {\n    !resolvers[type] && (resolvers[type] = utils.isFunction(res[type]) ? (res) => res[type]() :\n      (_, config) => {\n        throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);\n      })\n  });\n})(new Response));\n\nconst getBodyLength = async (body) => {\n  if (body == null) {\n    return 0;\n  }\n\n  if(utils.isBlob(body)) {\n    return body.size;\n  }\n\n  if(utils.isSpecCompliantForm(body)) {\n    const _request = new Request(platform.origin, {\n      method: 'POST',\n      body,\n    });\n    return (await _request.arrayBuffer()).byteLength;\n  }\n\n  if(utils.isArrayBufferView(body) || utils.isArrayBuffer(body)) {\n    return body.byteLength;\n  }\n\n  if(utils.isURLSearchParams(body)) {\n    body = body + '';\n  }\n\n  if(utils.isString(body)) {\n    return (await encodeText(body)).byteLength;\n  }\n}\n\nconst resolveBodyLength = async (headers, body) => {\n  const length = utils.toFiniteNumber(headers.getContentLength());\n\n  return length == null ? getBodyLength(body) : length;\n}\n\nexport default isFetchSupported && (async (config) => {\n  let {\n    url,\n    method,\n    data,\n    signal,\n    cancelToken,\n    timeout,\n    onDownloadProgress,\n    onUploadProgress,\n    responseType,\n    headers,\n    withCredentials = 'same-origin',\n    fetchOptions\n  } = resolveConfig(config);\n\n  responseType = responseType ? (responseType + '').toLowerCase() : 'text';\n\n  let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);\n\n  let request;\n\n  const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {\n      composedSignal.unsubscribe();\n  });\n\n  let requestContentLength;\n\n  try {\n    if (\n      onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' &&\n      (requestContentLength = await resolveBodyLength(headers, data)) !== 0\n    ) {\n      let _request = new Request(url, {\n        method: 'POST',\n        body: data,\n        duplex: \"half\"\n      });\n\n      let contentTypeHeader;\n\n      if (utils.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {\n        headers.setContentType(contentTypeHeader)\n      }\n\n      if (_request.body) {\n        const [onProgress, flush] = progressEventDecorator(\n          requestContentLength,\n          progressEventReducer(asyncDecorator(onUploadProgress))\n        );\n\n        data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);\n      }\n    }\n\n    if (!utils.isString(withCredentials)) {\n      withCredentials = withCredentials ? 'include' : 'omit';\n    }\n\n    // Cloudflare Workers throws when credentials are defined\n    // see https://github.com/cloudflare/workerd/issues/902\n    const isCredentialsSupported = \"credentials\" in Request.prototype;\n    request = new Request(url, {\n      ...fetchOptions,\n      signal: composedSignal,\n      method: method.toUpperCase(),\n      headers: headers.normalize().toJSON(),\n      body: data,\n      duplex: \"half\",\n      credentials: isCredentialsSupported ? withCredentials : undefined\n    });\n\n    let response = await fetch(request);\n\n    const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');\n\n    if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {\n      const options = {};\n\n      ['status', 'statusText', 'headers'].forEach(prop => {\n        options[prop] = response[prop];\n      });\n\n      const responseContentLength = utils.toFiniteNumber(response.headers.get('content-length'));\n\n      const [onProgress, flush] = onDownloadProgress && progressEventDecorator(\n        responseContentLength,\n        progressEventReducer(asyncDecorator(onDownloadProgress), true)\n      ) || [];\n\n      response = new Response(\n        trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {\n          flush && flush();\n          unsubscribe && unsubscribe();\n        }),\n        options\n      );\n    }\n\n    responseType = responseType || 'text';\n\n    let responseData = await resolvers[utils.findKey(resolvers, responseType) || 'text'](response, config);\n\n    !isStreamResponse && unsubscribe && unsubscribe();\n\n    return await new Promise((resolve, reject) => {\n      settle(resolve, reject, {\n        data: responseData,\n        headers: AxiosHeaders.from(response.headers),\n        status: response.status,\n        statusText: response.statusText,\n        config,\n        request\n      })\n    })\n  } catch (err) {\n    unsubscribe && unsubscribe();\n\n    if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) {\n      throw Object.assign(\n        new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request),\n        {\n          cause: err.cause || err\n        }\n      )\n    }\n\n    throw AxiosError.from(err, err && err.code, config, request);\n  }\n});\n\n\n","import utils from '../utils.js';\nimport httpAdapter from './http.js';\nimport xhrAdapter from './xhr.js';\nimport fetchAdapter from './fetch.js';\nimport AxiosError from \"../core/AxiosError.js\";\n\nconst knownAdapters = {\n  http: httpAdapter,\n  xhr: xhrAdapter,\n  fetch: fetchAdapter\n}\n\nutils.forEach(knownAdapters, (fn, value) => {\n  if (fn) {\n    try {\n      Object.defineProperty(fn, 'name', {value});\n    } catch (e) {\n      // eslint-disable-next-line no-empty\n    }\n    Object.defineProperty(fn, 'adapterName', {value});\n  }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;\n\nexport default {\n  getAdapter: (adapters) => {\n    adapters = utils.isArray(adapters) ? adapters : [adapters];\n\n    const {length} = adapters;\n    let nameOrAdapter;\n    let adapter;\n\n    const rejectedReasons = {};\n\n    for (let i = 0; i < length; i++) {\n      nameOrAdapter = adapters[i];\n      let id;\n\n      adapter = nameOrAdapter;\n\n      if (!isResolvedHandle(nameOrAdapter)) {\n        adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n        if (adapter === undefined) {\n          throw new AxiosError(`Unknown adapter '${id}'`);\n        }\n      }\n\n      if (adapter) {\n        break;\n      }\n\n      rejectedReasons[id || '#' + i] = adapter;\n    }\n\n    if (!adapter) {\n\n      const reasons = Object.entries(rejectedReasons)\n        .map(([id, state]) => `adapter ${id} ` +\n          (state === false ? 'is not supported by the environment' : 'is not available in the build')\n        );\n\n      let s = length ?\n        (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n        'as no adapter specified';\n\n      throw new AxiosError(\n        `There is no suitable adapter to dispatch the request ` + s,\n        'ERR_NOT_SUPPORT'\n      );\n    }\n\n    return adapter;\n  },\n  adapters: knownAdapters\n}\n","'use strict';\n\nimport transformData from './transformData.js';\nimport isCancel from '../cancel/isCancel.js';\nimport defaults from '../defaults/index.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport adapters from \"../adapters/adapters.js\";\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n  if (config.cancelToken) {\n    config.cancelToken.throwIfRequested();\n  }\n\n  if (config.signal && config.signal.aborted) {\n    throw new CanceledError(null, config);\n  }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nexport default function dispatchRequest(config) {\n  throwIfCancellationRequested(config);\n\n  config.headers = AxiosHeaders.from(config.headers);\n\n  // Transform request data\n  config.data = transformData.call(\n    config,\n    config.transformRequest\n  );\n\n  if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n    config.headers.setContentType('application/x-www-form-urlencoded', false);\n  }\n\n  const adapter = adapters.getAdapter(config.adapter || defaults.adapter);\n\n  return adapter(config).then(function onAdapterResolution(response) {\n    throwIfCancellationRequested(config);\n\n    // Transform response data\n    response.data = transformData.call(\n      config,\n      config.transformResponse,\n      response\n    );\n\n    response.headers = AxiosHeaders.from(response.headers);\n\n    return response;\n  }, function onAdapterRejection(reason) {\n    if (!isCancel(reason)) {\n      throwIfCancellationRequested(config);\n\n      // Transform response data\n      if (reason && reason.response) {\n        reason.response.data = transformData.call(\n          config,\n          config.transformResponse,\n          reason.response\n        );\n        reason.response.headers = AxiosHeaders.from(reason.response.headers);\n      }\n    }\n\n    return Promise.reject(reason);\n  });\n}\n","'use strict';\n\nimport {VERSION} from '../env/data.js';\nimport AxiosError from '../core/AxiosError.js';\n\nconst validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n  validators[type] = function validator(thing) {\n    return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n  };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n  function formatMessage(opt, desc) {\n    return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n  }\n\n  // eslint-disable-next-line func-names\n  return (value, opt, opts) => {\n    if (validator === false) {\n      throw new AxiosError(\n        formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n        AxiosError.ERR_DEPRECATED\n      );\n    }\n\n    if (version && !deprecatedWarnings[opt]) {\n      deprecatedWarnings[opt] = true;\n      // eslint-disable-next-line no-console\n      console.warn(\n        formatMessage(\n          opt,\n          ' has been deprecated since v' + version + ' and will be removed in the near future'\n        )\n      );\n    }\n\n    return validator ? validator(value, opt, opts) : true;\n  };\n};\n\nvalidators.spelling = function spelling(correctSpelling) {\n  return (value, opt) => {\n    // eslint-disable-next-line no-console\n    console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);\n    return true;\n  }\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n  if (typeof options !== 'object') {\n    throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n  }\n  const keys = Object.keys(options);\n  let i = keys.length;\n  while (i-- > 0) {\n    const opt = keys[i];\n    const validator = schema[opt];\n    if (validator) {\n      const value = options[opt];\n      const result = value === undefined || validator(value, opt, options);\n      if (result !== true) {\n        throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n      }\n      continue;\n    }\n    if (allowUnknown !== true) {\n      throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n    }\n  }\n}\n\nexport default {\n  assertOptions,\n  validators\n};\n","'use strict';\n\nimport utils from './../utils.js';\nimport buildURL from '../helpers/buildURL.js';\nimport InterceptorManager from './InterceptorManager.js';\nimport dispatchRequest from './dispatchRequest.js';\nimport mergeConfig from './mergeConfig.js';\nimport buildFullPath from './buildFullPath.js';\nimport validator from '../helpers/validator.js';\nimport AxiosHeaders from './AxiosHeaders.js';\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n  constructor(instanceConfig) {\n    this.defaults = instanceConfig;\n    this.interceptors = {\n      request: new InterceptorManager(),\n      response: new InterceptorManager()\n    };\n  }\n\n  /**\n   * Dispatch a request\n   *\n   * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n   * @param {?Object} config\n   *\n   * @returns {Promise} The Promise to be fulfilled\n   */\n  async request(configOrUrl, config) {\n    try {\n      return await this._request(configOrUrl, config);\n    } catch (err) {\n      if (err instanceof Error) {\n        let dummy = {};\n\n        Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());\n\n        // slice off the Error: ... line\n        const stack = dummy.stack ? dummy.stack.replace(/^.+\\n/, '') : '';\n        try {\n          if (!err.stack) {\n            err.stack = stack;\n            // match without the 2 top stack lines\n          } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\\n.+\\n/, ''))) {\n            err.stack += '\\n' + stack\n          }\n        } catch (e) {\n          // ignore the case where \"stack\" is an un-writable property\n        }\n      }\n\n      throw err;\n    }\n  }\n\n  _request(configOrUrl, config) {\n    /*eslint no-param-reassign:0*/\n    // Allow for axios('example/url'[, config]) a la fetch API\n    if (typeof configOrUrl === 'string') {\n      config = config || {};\n      config.url = configOrUrl;\n    } else {\n      config = configOrUrl || {};\n    }\n\n    config = mergeConfig(this.defaults, config);\n\n    const {transitional, paramsSerializer, headers} = config;\n\n    if (transitional !== undefined) {\n      validator.assertOptions(transitional, {\n        silentJSONParsing: validators.transitional(validators.boolean),\n        forcedJSONParsing: validators.transitional(validators.boolean),\n        clarifyTimeoutError: validators.transitional(validators.boolean)\n      }, false);\n    }\n\n    if (paramsSerializer != null) {\n      if (utils.isFunction(paramsSerializer)) {\n        config.paramsSerializer = {\n          serialize: paramsSerializer\n        }\n      } else {\n        validator.assertOptions(paramsSerializer, {\n          encode: validators.function,\n          serialize: validators.function\n        }, true);\n      }\n    }\n\n    // Set config.allowAbsoluteUrls\n    if (config.allowAbsoluteUrls !== undefined) {\n      // do nothing\n    } else if (this.defaults.allowAbsoluteUrls !== undefined) {\n      config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;\n    } else {\n      config.allowAbsoluteUrls = true;\n    }\n\n    validator.assertOptions(config, {\n      baseUrl: validators.spelling('baseURL'),\n      withXsrfToken: validators.spelling('withXSRFToken')\n    }, true);\n\n    // Set config.method\n    config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n    // Flatten headers\n    let contextHeaders = headers && utils.merge(\n      headers.common,\n      headers[config.method]\n    );\n\n    headers && utils.forEach(\n      ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n      (method) => {\n        delete headers[method];\n      }\n    );\n\n    config.headers = AxiosHeaders.concat(contextHeaders, headers);\n\n    // filter out skipped interceptors\n    const requestInterceptorChain = [];\n    let synchronousRequestInterceptors = true;\n    this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n      if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n        return;\n      }\n\n      synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n      requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n    });\n\n    const responseInterceptorChain = [];\n    this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n      responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n    });\n\n    let promise;\n    let i = 0;\n    let len;\n\n    if (!synchronousRequestInterceptors) {\n      const chain = [dispatchRequest.bind(this), undefined];\n      chain.unshift.apply(chain, requestInterceptorChain);\n      chain.push.apply(chain, responseInterceptorChain);\n      len = chain.length;\n\n      promise = Promise.resolve(config);\n\n      while (i < len) {\n        promise = promise.then(chain[i++], chain[i++]);\n      }\n\n      return promise;\n    }\n\n    len = requestInterceptorChain.length;\n\n    let newConfig = config;\n\n    i = 0;\n\n    while (i < len) {\n      const onFulfilled = requestInterceptorChain[i++];\n      const onRejected = requestInterceptorChain[i++];\n      try {\n        newConfig = onFulfilled(newConfig);\n      } catch (error) {\n        onRejected.call(this, error);\n        break;\n      }\n    }\n\n    try {\n      promise = dispatchRequest.call(this, newConfig);\n    } catch (error) {\n      return Promise.reject(error);\n    }\n\n    i = 0;\n    len = responseInterceptorChain.length;\n\n    while (i < len) {\n      promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n    }\n\n    return promise;\n  }\n\n  getUri(config) {\n    config = mergeConfig(this.defaults, config);\n    const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);\n    return buildURL(fullPath, config.params, config.paramsSerializer);\n  }\n}\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n  /*eslint func-names:0*/\n  Axios.prototype[method] = function(url, config) {\n    return this.request(mergeConfig(config || {}, {\n      method,\n      url,\n      data: (config || {}).data\n    }));\n  };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n  /*eslint func-names:0*/\n\n  function generateHTTPMethod(isForm) {\n    return function httpMethod(url, data, config) {\n      return this.request(mergeConfig(config || {}, {\n        method,\n        headers: isForm ? {\n          'Content-Type': 'multipart/form-data'\n        } : {},\n        url,\n        data\n      }));\n    };\n  }\n\n  Axios.prototype[method] = generateHTTPMethod();\n\n  Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nexport default Axios;\n","'use strict';\n\nimport CanceledError from './CanceledError.js';\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n  constructor(executor) {\n    if (typeof executor !== 'function') {\n      throw new TypeError('executor must be a function.');\n    }\n\n    let resolvePromise;\n\n    this.promise = new Promise(function promiseExecutor(resolve) {\n      resolvePromise = resolve;\n    });\n\n    const token = this;\n\n    // eslint-disable-next-line func-names\n    this.promise.then(cancel => {\n      if (!token._listeners) return;\n\n      let i = token._listeners.length;\n\n      while (i-- > 0) {\n        token._listeners[i](cancel);\n      }\n      token._listeners = null;\n    });\n\n    // eslint-disable-next-line func-names\n    this.promise.then = onfulfilled => {\n      let _resolve;\n      // eslint-disable-next-line func-names\n      const promise = new Promise(resolve => {\n        token.subscribe(resolve);\n        _resolve = resolve;\n      }).then(onfulfilled);\n\n      promise.cancel = function reject() {\n        token.unsubscribe(_resolve);\n      };\n\n      return promise;\n    };\n\n    executor(function cancel(message, config, request) {\n      if (token.reason) {\n        // Cancellation has already been requested\n        return;\n      }\n\n      token.reason = new CanceledError(message, config, request);\n      resolvePromise(token.reason);\n    });\n  }\n\n  /**\n   * Throws a `CanceledError` if cancellation has been requested.\n   */\n  throwIfRequested() {\n    if (this.reason) {\n      throw this.reason;\n    }\n  }\n\n  /**\n   * Subscribe to the cancel signal\n   */\n\n  subscribe(listener) {\n    if (this.reason) {\n      listener(this.reason);\n      return;\n    }\n\n    if (this._listeners) {\n      this._listeners.push(listener);\n    } else {\n      this._listeners = [listener];\n    }\n  }\n\n  /**\n   * Unsubscribe from the cancel signal\n   */\n\n  unsubscribe(listener) {\n    if (!this._listeners) {\n      return;\n    }\n    const index = this._listeners.indexOf(listener);\n    if (index !== -1) {\n      this._listeners.splice(index, 1);\n    }\n  }\n\n  toAbortSignal() {\n    const controller = new AbortController();\n\n    const abort = (err) => {\n      controller.abort(err);\n    };\n\n    this.subscribe(abort);\n\n    controller.signal.unsubscribe = () => this.unsubscribe(abort);\n\n    return controller.signal;\n  }\n\n  /**\n   * Returns an object that contains a new `CancelToken` and a function that, when called,\n   * cancels the `CancelToken`.\n   */\n  static source() {\n    let cancel;\n    const token = new CancelToken(function executor(c) {\n      cancel = c;\n    });\n    return {\n      token,\n      cancel\n    };\n  }\n}\n\nexport default CancelToken;\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n *  ```js\n *  function f(x, y, z) {}\n *  var args = [1, 2, 3];\n *  f.apply(null, args);\n *  ```\n *\n * With `spread` this example can be re-written.\n *\n *  ```js\n *  spread(function(x, y, z) {})([1, 2, 3]);\n *  ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nexport default function spread(callback) {\n  return function wrap(arr) {\n    return callback.apply(null, arr);\n  };\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nexport default function isAxiosError(payload) {\n  return utils.isObject(payload) && (payload.isAxiosError === true);\n}\n","const HttpStatusCode = {\n  Continue: 100,\n  SwitchingProtocols: 101,\n  Processing: 102,\n  EarlyHints: 103,\n  Ok: 200,\n  Created: 201,\n  Accepted: 202,\n  NonAuthoritativeInformation: 203,\n  NoContent: 204,\n  ResetContent: 205,\n  PartialContent: 206,\n  MultiStatus: 207,\n  AlreadyReported: 208,\n  ImUsed: 226,\n  MultipleChoices: 300,\n  MovedPermanently: 301,\n  Found: 302,\n  SeeOther: 303,\n  NotModified: 304,\n  UseProxy: 305,\n  Unused: 306,\n  TemporaryRedirect: 307,\n  PermanentRedirect: 308,\n  BadRequest: 400,\n  Unauthorized: 401,\n  PaymentRequired: 402,\n  Forbidden: 403,\n  NotFound: 404,\n  MethodNotAllowed: 405,\n  NotAcceptable: 406,\n  ProxyAuthenticationRequired: 407,\n  RequestTimeout: 408,\n  Conflict: 409,\n  Gone: 410,\n  LengthRequired: 411,\n  PreconditionFailed: 412,\n  PayloadTooLarge: 413,\n  UriTooLong: 414,\n  UnsupportedMediaType: 415,\n  RangeNotSatisfiable: 416,\n  ExpectationFailed: 417,\n  ImATeapot: 418,\n  MisdirectedRequest: 421,\n  UnprocessableEntity: 422,\n  Locked: 423,\n  FailedDependency: 424,\n  TooEarly: 425,\n  UpgradeRequired: 426,\n  PreconditionRequired: 428,\n  TooManyRequests: 429,\n  RequestHeaderFieldsTooLarge: 431,\n  UnavailableForLegalReasons: 451,\n  InternalServerError: 500,\n  NotImplemented: 501,\n  BadGateway: 502,\n  ServiceUnavailable: 503,\n  GatewayTimeout: 504,\n  HttpVersionNotSupported: 505,\n  VariantAlsoNegotiates: 506,\n  InsufficientStorage: 507,\n  LoopDetected: 508,\n  NotExtended: 510,\n  NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n  HttpStatusCode[value] = key;\n});\n\nexport default HttpStatusCode;\n","'use strict';\n\nimport utils from './utils.js';\nimport bind from './helpers/bind.js';\nimport Axios from './core/Axios.js';\nimport mergeConfig from './core/mergeConfig.js';\nimport defaults from './defaults/index.js';\nimport formDataToJSON from './helpers/formDataToJSON.js';\nimport CanceledError from './cancel/CanceledError.js';\nimport CancelToken from './cancel/CancelToken.js';\nimport isCancel from './cancel/isCancel.js';\nimport {VERSION} from './env/data.js';\nimport toFormData from './helpers/toFormData.js';\nimport AxiosError from './core/AxiosError.js';\nimport spread from './helpers/spread.js';\nimport isAxiosError from './helpers/isAxiosError.js';\nimport AxiosHeaders from \"./core/AxiosHeaders.js\";\nimport adapters from './adapters/adapters.js';\nimport HttpStatusCode from './helpers/HttpStatusCode.js';\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n  const context = new Axios(defaultConfig);\n  const instance = bind(Axios.prototype.request, context);\n\n  // Copy axios.prototype to instance\n  utils.extend(instance, Axios.prototype, context, {allOwnKeys: true});\n\n  // Copy context to instance\n  utils.extend(instance, context, null, {allOwnKeys: true});\n\n  // Factory for creating new instances\n  instance.create = function create(instanceConfig) {\n    return createInstance(mergeConfig(defaultConfig, instanceConfig));\n  };\n\n  return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n  return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders;\n\naxios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode;\n\naxios.default = axios;\n\n// this module should only have a default export\nexport default axios\n","import axios from './lib/axios.js';\n\n// This module is intended to unwrap Axios default export as named.\n// Keep top-level export same with static properties\n// so that it can keep same with es module or cjs\nconst {\n  Axios,\n  AxiosError,\n  CanceledError,\n  isCancel,\n  CancelToken,\n  VERSION,\n  all,\n  Cancel,\n  isAxiosError,\n  spread,\n  toFormData,\n  AxiosHeaders,\n  HttpStatusCode,\n  formToJSON,\n  getAdapter,\n  mergeConfig\n} = axios;\n\nexport {\n  axios as default,\n  Axios,\n  AxiosError,\n  CanceledError,\n  isCancel,\n  CancelToken,\n  VERSION,\n  all,\n  Cancel,\n  isAxiosError,\n  spread,\n  toFormData,\n  AxiosHeaders,\n  HttpStatusCode,\n  formToJSON,\n  getAdapter,\n  mergeConfig\n}\n","/** @format */\n\nexport const DimoEnvironment = {\n\tProduction: {\n\t\tAttestation: 'https://attestation-api.dimo.zone',\n\t\tAuth: 'https://auth.dimo.zone',\n\t\tIdentity: 'https://identity-api.dimo.zone/query',\n\t\tDevices: 'https://devices-api.dimo.zone',\n\t\tDeviceDefinitions: 'https://device-definitions-api.dimo.zone',\n\t\tTelemetry: 'https://telemetry-api.dimo.zone/query',\n\t\tTokenExchange: 'https://token-exchange-api.dimo.zone',\n\t\tTrips: 'https://trips-api.dimo.zone',\n\t\tValuations: 'https://valuations-api.dimo.zone',\n\t\tVehicleSignalDecoding: 'https://vehicle-signal-decoding.dimo.zone',\n\t\tVehicleTriggers: 'https://vehicle-triggers-api.dimo.zone',\n\t},\n\tDev: {\n\t\tAttestation: 'https://attestation-api.dev.dimo.zone',\n\t\tAuth: 'https://auth.dev.dimo.zone',\n\t\tIdentity: 'https://identity-api.dev.dimo.zone/query',\n\t\tDevices: 'https://devices-api.dev.dimo.zone',\n\t\tDeviceDefinitions: 'https://device-definitions-api.dev.dimo.zone',\n\t\tTelemetry: 'https://telemetry-api.dev.dimo.zone/query',\n\t\tTokenExchange: 'https://token-exchange-api.dev.dimo.zone',\n\t\tTrips: 'https://trips-api.dev.dimo.zone',\n\t\tValuations: 'https://valuations-api.dev.dimo.zone',\n\t\tVehicleSignalDecoding: 'https://vehicle-signal-decoding.dev.dimo.zone',\n\t\tVehicleTriggers: 'https://vehicle-triggers-api.dev.dimo.zone',\n\t},\n} as const;\n\nexport type DimoEnvironment =\n\t| typeof DimoEnvironment.Production\n\t| typeof DimoEnvironment.Dev;\n","export class DimoError extends Error {\n    readonly statusCode?: number;\n    readonly body?: unknown;\n\n    constructor({ message, statusCode, body}: { message?: string; statusCode?: number; body?: unknown }) {\n        super(buildMessage({ message, statusCode, body }));\n        Object.setPrototypeOf(this, DimoError.prototype);\n        if (statusCode != null) {\n            this.statusCode = statusCode;\n        }\n\n        if (body !== undefined) {\n            this.body = body;\n        }\n    }\n}\n\nfunction buildMessage({\n    message,\n    statusCode,\n    body,\n}: {\n    message: string | undefined;\n    statusCode: number | undefined;\n    body: unknown | undefined;\n}): string {\n    let lines: string[] = [];\n    if (message != null) {\n        lines.push(message);\n    }\n\n    if (statusCode != null) {\n        lines.push(`Status code: ${statusCode.toString()}`);\n    }\n\n    if (body != null) {\n        lines.push(`Body: ${JSON.stringify(body, undefined, 2)}`);\n    }\n\n    return lines.join('\\n');\n}","export const DimoConstants = {\n    Production: {\n        'NFT_address': '0xbA5738a18d83D41847dfFbDC6101d37C69c9B0cF',\n        'RPC_provider': 'https://eth.llamarpc.com',\n    },\n    Dev: {\n        'NFT_address': '0x45fbCD3ef7361d156e8b16F5538AE36DEdf61Da8',\n        'RPC_provider': 'https://eth.llamarpc.com',\n    },\n    Query: {\n        'PAGE_SIZE': 100\n    }\n} as const;\n\nexport type DimoConstants =\n    | typeof DimoConstants.Production\n    | typeof DimoConstants.Dev\n    | typeof DimoConstants.Query","import { DimoConstants } from '../../constants';\n\nconst pageSize = DimoConstants.Query.PAGE_SIZE;\n\nexport const paginate = async <T>(\n    fetchPage: (after: string | undefined) => Promise<{ nodes: { nodes: T[] }, pageInfo: { endCursor: string | null }, totalCount: number | null }>): Promise<T[]> => {\n    let after: string | null = null;\n    let result: T[] = [];\n    let totalCount: number | null = null;\n    let page = 0;\n\n    while (true) {\n        const response = await fetchPage(after ?? undefined);\n\n        const { nodes, pageInfo, totalCount: responseTotalCount } = response;\n\n        if (!nodes || !nodes.nodes) {\n            console.error('Invalid response: nodes is undefined or null', response);\n            throw new Error('Unexpected API response format');\n        }\n\n        // Capture totalCount from the first request\n        if (totalCount === null) {\n            totalCount = responseTotalCount ?? null; // Ensure fallback if totalCount is missing\n\n            if (totalCount === null) {\n                console.warn('Warning: totalCount is null. Defaulting to single page execution.');\n                totalCount = pageSize; // Assume at least one page if totalCount is unknown\n            }\n        }\n\n        result.push(...nodes.nodes);\n\n        page++;\n\n        const totalPages = Math.ceil(totalCount / pageSize);\n\n        if (page >= totalPages || nodes.nodes.length < pageSize) {\n            break;\n        }\n\n        // Update the cursor\n        after = pageInfo.endCursor ?? null;\n\n        if (after === null && page < totalPages) {\n            console.warn(`Expected more pages (${page}/${totalPages}), but endCursor is null. Stopping pagination.`);\n            break;\n        }\n    }\n\n    return result;\n};","import { DIMO } from '../../dimo';\nimport { DimoEnvironment } from '../../environments';\nimport { DimoError } from '../../errors';\nimport { paginate } from '../util/paginate';\n\nexport const getVehiclePrivileges = async (input: { headers: any, tokenId: string, clientId?: string }, env: keyof typeof DimoEnvironment) => {\n    const sdk = new DIMO(env);\n\n    try {\n        const getSacds = async (after: string | undefined) => {\n            const response = await sdk.identity.listSacdPerVehicleTokenId({\n                tokenId: input.tokenId,\n                after\n            });\n\n            const sacds = response.data?.vehicle?.sacds || [];\n            const pageInfo = response.data?.vehicle?.sacds.pageInfo || { endCursor: null };\n            const totalCount = response.data?.vehicle?.sacds?.totalCount || null;\n\n            if (input.clientId) {\n                const matchingSacd = sacds.nodes.find((sacd: any) => sacd.grantee === input.clientId);\n                if (matchingSacd) {\n                    return {\n                        nodes: [matchingSacd],\n                        pageInfo: { endCursor: null },\n                        totalCount: 1\n                    }\n                }\n            }\n\n            return {\n                nodes: sacds,\n                pageInfo,\n                totalCount\n            };\n        };\n        \n        if (input.clientId) {\n            const { nodes } = await getSacds(undefined);\n            if (nodes.length > 0) {\n                return nodes;\n            }\n        }\n\n        return await paginate(getSacds);\n\n    } catch (error: any) {\n        console.error(error);\n        throw new DimoError({\n            message: `Error getting vehicle privileges: ${error.message || error}`,\n            statusCode: 400\n        });\n    }\n};\n","import { DIMO } from '../../dimo';\nimport { DimoEnvironment } from '../../environments';\nimport { DimoError } from '../../errors';\n\nexport const getVin = async(input: { headers: any, tokenId: string }, env: keyof typeof DimoEnvironment) => {\n    const sdk = new DIMO(env);\n    let result;\n\n    try {\n        const getVinVC = await sdk.attestation.createVinVC({\n            headers: input.headers,\n            tokenId: input.tokenId\n        });\n        if (getVinVC) {\n            const vin = await sdk.telemetry.getLatestVinVC({\n                headers: input.headers,\n                tokenId: input.tokenId\n            });\n            result = vin.data.vinVCLatest.vin;\n            return result;\n        } else {\n            throw new DimoError({\n                message: `Error getting attestation, make sure that you have the correct permissions.`,\n                statusCode: 400\n            });\n        }\n    } catch(error: any) {\n        console.error(error);\n        throw new DimoError({\n            message: `Error getting VIN: ${error}`,\n            statusCode: 400\n        });\n    }\n}","import axios from 'axios';\nimport * as functionIndex from '../graphql/functions/';\nimport { DimoEnvironment } from '../environments';\nimport { DimoError } from '../errors';\n\n// GraphQL query factory function\nexport const Query = async(resource: any, baseUrl: any, params: any = {}, env: keyof typeof DimoEnvironment) => {\n    /**\n     * Headers\n     */\n    \n    let headers: Record<string, string> = {};\n    if (['developer_jwt', 'vehicle_jwt'].includes(resource.auth)) {\n        if (params.headers.Authorization) {\n            headers = params.headers;\n        } else {\n            throw new DimoError({\n                message: `Access token not provided for ${resource.auth} authentication`,\n                statusCode: 401\n            });\n        }\n    }\n    headers = { \n        ...headers, \n        ...{\n            'Content-Type': 'application/json',\n            'User-Agent': 'dimo-node-sdk'\n        }   \n    }\n\n    // If resource.method is 'FUNCTION', call the function defined\n    if (resource.method === 'FUNCTION') {\n        const functionName = resource.path;\n        const dynamicFunction = (functionIndex as Record<string, Function>)[functionName];\n        if (typeof dynamicFunction === 'function') {\n            // Call the dynamic function with params and pass the necessary arguments\n            return dynamicFunction(params, env);\n        } else {\n            throw new DimoError({\n                message: `Function in ${resource.path} is not a valid function.`,\n                statusCode: 400\n            });\n        }\n\n    }\n\n    const variables = resource.params || {};\n    let query = resource.query;\n\n    for (const key in variables) {\n        const placeholder = new RegExp(`\\\\$${key}\\\\b`, 'g');\n        if (variables[key] === true) {\n            if (params[key] === undefined || params[key] === null) {\n                // ACC-303: Replace the placeholder with null string to handle pagination\n                query = query.replace(placeholder, \"null\");\n            } else {\n                const value = typeof params[key] === 'string' ? `\"${params[key]}\"` : params[key];\n                query = query.replace(placeholder, value);\n            }\n        }\n    }\n\n    try {\n        const response = await axios({\n            method: 'POST',\n            url: baseUrl,\n            headers: headers,\n            data: {\n                query\n            }\n        });\n      \n        return response.data;\n    } catch (error) {\n        console.error('Error executing GraphQL query:', error);\n        throw new DimoError({\n            message: `Error`,\n            statusCode: 400\n        });\n    }\n};\n\nexport const CustomQuery = async (resource: any, baseUrl: string, params: any = {}) => {\n    /**\n     * Headers\n     */\n\n    let headers: Record<string, string> = {};\n    if (['developer_jwt', 'vehicle_jwt'].includes(resource.auth)) {\n        if (params.headers.Authorization) {\n            headers = params.headers;\n        } else {\n            throw new DimoError({\n                message: `Access token not provided for ${resource.auth} authentication`,\n                statusCode: 401\n            });\n        }\n    }\n    headers = { \n        ...headers, \n        ...{\n            'Content-Type': 'application/json',\n            'User-Agent': 'dimo-node-sdk'\n        }   \n    }\n\n    const query = params.query || {};\n    try {\n        const response = await axios({\n            method: 'POST',\n            url: baseUrl,\n            headers: headers,\n            data: {\n                query\n            }\n        });\n\n        return response.data;\n    } catch (error) {\n        console.error('Error executing Custom GraphQL query:', error);\n        throw new DimoError({\n            message: 'Error executing Custom GraphQL query',\n            statusCode: 400\n        });\n    }\n};\n\n","import { CustomQuery, Query } from './Query';\nimport { DimoEnvironment } from '../environments';\n\nexport interface Resource {\n    [key: string]: (...args: any) => any;\n}\n\nexport class Resource {\n    public api: any;\n    public resourceName: any;\n    public env: any;\n\n    constructor(api: any, resourceName: string, env: keyof typeof DimoEnvironment ) {\n        this.api = api;\n        this.resourceName = resourceName;\n        this.env = env;\n    }\n\n    protected setQueries(resources: any): void {\n        Object.keys(resources).forEach(key => {\n            this[key] = (params: any = {}) => Query(\n                resources[key], // Setup the endpoint resources\n                this.api, // Setup the base URL\n                params, // Pass through the params\n                this.env\n            );\n        });\n    }\n\n    /**\n     * Custom GraphQL Queries\n     * @param resources \n     */\n    query(resources: any): void {\n        Object.keys(resources).forEach(key => {\n            this[key] = (params: any = {}) => CustomQuery(\n                resources, // Setup the endpoint resources\n                this.api, // Setup the base URL\n                params, // Pass through the params\n            );\n        });\n\n    }\n}","import { Resource } from '../../Resource';\nimport { DimoEnvironment } from '../../../environments';\nimport { DimoConstants } from '../../../constants';\n\nexport class Identity extends Resource {\n    constructor(api: any, env: keyof typeof DimoEnvironment) {\n        super(api, 'Identity', env);\n        this.query({\n          query: true\n        }), \n        this.setQueries({\n          getVehiclePrivileges: {\n            method: 'FUNCTION',\n            path: 'getVehiclePrivileges',\n          },\n          listSacdPerVehicleTokenId: {\n            params: {\n              tokenId: true,\n              after: true\n            },\n            query: `\n            { \n              vehicle(tokenId: $tokenId) {\n                sacds(first: ${DimoConstants.Query.PAGE_SIZE}, after: $after) {\n                  nodes {\n                    permissions\n                    grantee\n                  }\n                  totalCount\n                  pageInfo {\n                    startCursor\n                    endCursor\n                  }\n                }\n              }\n            }\n            `\n          },\n          countDimoVehicles: {\n            query: `\n            { \n              vehicles (first: ${DimoConstants.Query.PAGE_SIZE}) {\n                  totalCount,\n              }\n            }\n            `\n          },\n          listVehicleDefinitionsPerAddress: {\n            params: {\n                address: true,\n                limit: true\n            },\n            query: `\n            {\n              vehicles(filterBy: {owner: $address}, first: $limit) {\n                nodes {\n                  aftermarketDevice {\n                      tokenId\n                      address\n                  }\n                    syntheticDevice {\n                      address\n                      tokenId\n                  }\n                  definition {\n                    make\n                    model\n                    year\n                  }\n                }\n              }\n            }\n          `\n          }\n        })\n    }\n}","import { Resource } from '../../Resource';\nimport { DimoEnvironment } from '../../../environments';\n\nexport class Telemetry extends Resource {\n    constructor(api: any, env: keyof typeof DimoEnvironment) {\n        super(api, 'Telemetry', env);\n        this.query({\n            auth: 'vehicle_jwt',\n            query: true,\n        }), \n        this.setQueries({\n            getLatestSignals: {\n                auth: 'vehicle_jwt',\n                params: {\n                    tokenId: true\n                },\n                query: `\n                query {\n                    SignalsLatest(tokenID: $tokenId){\n                        powertrainTransmissionTravelledDistance {\n                            timestamp\n                            value\n                        }\n                        exteriorAirTemperature {\n                            timestamp\n                            value\n                        }\n                        speed{\n                            timestamp\n                            value\n                        }\n                        powertrainType{\n                            timestamp\n                            value\n                        }\n                    }\n                }`\n            },\n            getLatestVinVC: {\n                auth: 'vehicle_jwt',\n                params: {\n                    tokenId: true\n                },\n                query: `\n                    query {\n                        vinVCLatest(tokenId: $tokenId) {\n                            vin\n                        }\n                }`\n            },\n            getVin: {\n                auth: 'vehicle_jwt',\n                method: 'FUNCTION',\n                path: 'getVin',\n            }\n        })\n    }\n\n}","/** @format */\n\nimport { DimoEnvironment } from \"./environments\";\nimport { DimoError } from \"./errors\";\n\nimport { Identity, Telemetry } from \"./graphql/resources/DimoGraphqlResources\";\n\nimport {\n\tAttestation,\n\tAuth,\n\tDeviceDefinitions,\n\tDevices,\n\tTokenExchange,\n\tTrips,\n\tValuations,\n\tVehicleTriggers,\n} from \"./api/resources/DimoRestResources\";\n\n// import { Stream } from './streamr';\n\nexport class DIMO {\n\tpublic attestation: Attestation;\n\tpublic auth: Auth;\n\tpublic devicedefinitions: DeviceDefinitions;\n\tpublic devices: Devices;\n\tpublic identity: Identity;\n\tpublic telemetry: Telemetry;\n\tpublic tokenexchange: TokenExchange;\n\tpublic trips: Trips;\n\tpublic valuations: Valuations;\n\tpublic vehicleTriggers: VehicleTriggers;\n\n\tconstructor(env: keyof typeof DimoEnvironment) {\n\t\tthis.identity = new Identity(DimoEnvironment[env].Identity, env);\n\t\tthis.telemetry = new Telemetry(DimoEnvironment[env].Telemetry, env);\n\n\t\t/**\n\t\t * Set up all REST Endpoints\n\t\t */\n\t\tthis.attestation = new Attestation(DimoEnvironment[env].Attestation, env);\n\t\tthis.auth = new Auth(DimoEnvironment[env].Auth, env);\n\t\tthis.devicedefinitions = new DeviceDefinitions(\n\t\t\tDimoEnvironment[env].DeviceDefinitions,\n\t\t\tenv,\n\t\t);\n\t\tthis.devices = new Devices(DimoEnvironment[env].Devices, env);\n\t\tthis.tokenexchange = new TokenExchange(\n\t\t\tDimoEnvironment[env].TokenExchange,\n\t\t\tenv,\n\t\t);\n\t\tthis.trips = new Trips(DimoEnvironment[env].Trips, env);\n\t\tthis.valuations = new Valuations(DimoEnvironment[env].Valuations, env);\n\t\tthis.vehicleTriggers = new VehicleTriggers(\n\t\t\tDimoEnvironment[env].VehicleTriggers,\n\t\t\tenv,\n\t\t);\n\t}\n\n\t// Helper Function\n\tasync authenticate() {\n\t\tlet fs;\n\t\ttry {\n\t\t\t// Dynamically import fs\n\t\t\tif (\n\t\t\t\ttypeof process !== \"undefined\" &&\n\t\t\t\tprocess.versions &&\n\t\t\t\tprocess.versions.node\n\t\t\t) {\n\t\t\t\tfs = await import(\"fs\");\n\t\t\t} else {\n\t\t\t\t// Optionally handle the case where 'fs' is not available, returns null\n\t\t\t\tconsole.log(\n\t\t\t\t\t\"Not in Node.js environment; `fs` module is not available.\",\n\t\t\t\t);\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif (!fs.existsSync(\".credentials.json\")) {\n\t\t\t\tthrow new DimoError({\n\t\t\t\t\tmessage: \"Credentials file does not exist\",\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tconst data = fs.readFileSync(\".credentials.json\", \"utf8\");\n\t\t\tconst credentials = JSON.parse(data);\n\n\t\t\tconst authHeader = await this.auth.getDeveloperJwt({\n\t\t\t\tclient_id: credentials.client_id,\n\t\t\t\tdomain: credentials.redirect_uri,\n\t\t\t\tprivate_key: credentials.private_key,\n\t\t\t});\n\n\t\t\treturn authHeader;\n\t\t} catch (error: any) {\n\t\t\t// Handle file not existing and other errors\n\t\t\tconsole.error(\"Failed to authenticate:\", error.message);\n\t\t\t// Decide whether to throw the error or handle it differently\n\t\t\tthrow new DimoError({\n\t\t\t\tmessage: \"Authentication failed\",\n\t\t\t});\n\t\t}\n\t}\n}\n","import { DIMO } from '../../dimo';\nimport { DimoEnvironment } from '../../environments';\n\nexport const getDeveloperJwt = async(input: { client_id: string, domain: string, private_key: string, address: string }, env: keyof typeof DimoEnvironment) => {\n    const sdk = new DIMO(env);\n\n    const challenge = await sdk.auth.generateChallenge({\n        client_id: input.client_id,\n        domain: input.domain,\n        address: input.client_id\n    });\n\n    const sign = await sdk.auth.signChallenge({\n        message: challenge.challenge, \n        private_key: input.private_key\n    });\n\n    const submit = await sdk.auth.submitChallenge({\n        client_id: input.client_id,\n        domain: input.domain,\n        state: challenge.state,\n        signature: sign\n    });\n\n    return submit;\n}","export class InvalidTokenError extends Error {\n}\nInvalidTokenError.prototype.name = \"InvalidTokenError\";\nfunction b64DecodeUnicode(str) {\n    return decodeURIComponent(atob(str).replace(/(.)/g, (m, p) => {\n        let code = p.charCodeAt(0).toString(16).toUpperCase();\n        if (code.length < 2) {\n            code = \"0\" + code;\n        }\n        return \"%\" + code;\n    }));\n}\nfunction base64UrlDecode(str) {\n    let output = str.replace(/-/g, \"+\").replace(/_/g, \"/\");\n    switch (output.length % 4) {\n        case 0:\n            break;\n        case 2:\n            output += \"==\";\n            break;\n        case 3:\n            output += \"=\";\n            break;\n        default:\n            throw new Error(\"base64 string is not of the correct length\");\n    }\n    try {\n        return b64DecodeUnicode(output);\n    }\n    catch (err) {\n        return atob(output);\n    }\n}\nexport function jwtDecode(token, options) {\n    if (typeof token !== \"string\") {\n        throw new InvalidTokenError(\"Invalid token specified: must be a string\");\n    }\n    options || (options = {});\n    const pos = options.header === true ? 0 : 1;\n    const part = token.split(\".\")[pos];\n    if (typeof part !== \"string\") {\n        throw new InvalidTokenError(`Invalid token specified: missing part #${pos + 1}`);\n    }\n    let decoded;\n    try {\n        decoded = base64UrlDecode(part);\n    }\n    catch (e) {\n        throw new InvalidTokenError(`Invalid token specified: invalid base64 for part #${pos + 1} (${e.message})`);\n    }\n    try {\n        return JSON.parse(decoded);\n    }\n    catch (e) {\n        throw new InvalidTokenError(`Invalid token specified: invalid json for part #${pos + 1} (${e.message})`);\n    }\n}\n","import { jwtDecode } from \"jwt-decode\";\n\nexport const decodeJwt = (token: string): any => {\n    try {\n        const decoded = jwtDecode(token);\n        return decoded;\n    } catch (error) {\n        console.error('Failed to decode JWT', error);\n        return null;\n    }\n}","export const decodePermissions = (permissionHex: string): number[] => {\n    const cleanHex = permissionHex.toLowerCase().replace(\"0x\", \"\");\n    const permissionBits = BigInt(\"0x\" + cleanHex);\n    \n    const grantedPermissions: number[] = [];\n    \n    for (let i = 0; i < 128; i++) {\n      const bitPair = (permissionBits >> BigInt(i * 2)) & BigInt(0b11);\n      if (bitPair === BigInt(0b11)) {\n        grantedPermissions.push(i);\n      }\n    }\n    \n    return grantedPermissions;\n}","import { DIMO } from '../../dimo';\nimport { DimoEnvironment } from '../../environments';\nimport { decodeJwt, decodePermissions } from '../../util';\n\nexport const getVehicleJwt = async(input: { headers: { Authorization: string }, tokenId: number }, env: keyof typeof DimoEnvironment) => {\n    const sdk = new DIMO(env);\n    const developerJwt = input.headers.Authorization;\n\n    if (!developerJwt || !developerJwt.startsWith('Bearer ')) {\n        throw new Error('Invalid Authorization header format');\n    }\n\n    // Remove \"Bearer \" prefix\n    const decodedToken = decodeJwt(developerJwt.slice(7));\n    const clientId = decodedToken.ethereum_address;\n\n    const privileges = await sdk.identity.getVehiclePrivileges({ \n        tokenId: input.tokenId,\n        clientId: clientId // We want to pass in the clientId\n    })\n\n    const decodedPrivileges = decodePermissions(privileges[0].permissions);\n\n    const vehicleJwt = await sdk.tokenexchange.exchange({\n        ...input,\n        privileges: decodedPrivileges,\n        tokenId: input.tokenId\n    });\n\n    return vehicleJwt;\n}","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nexport var FMT_NUMBER;\n(function (FMT_NUMBER) {\n    FMT_NUMBER[\"NUMBER\"] = \"NUMBER_NUMBER\";\n    FMT_NUMBER[\"HEX\"] = \"NUMBER_HEX\";\n    FMT_NUMBER[\"STR\"] = \"NUMBER_STR\";\n    FMT_NUMBER[\"BIGINT\"] = \"NUMBER_BIGINT\";\n})(FMT_NUMBER || (FMT_NUMBER = {}));\nexport var FMT_BYTES;\n(function (FMT_BYTES) {\n    FMT_BYTES[\"HEX\"] = \"BYTES_HEX\";\n    FMT_BYTES[\"UINT8ARRAY\"] = \"BYTES_UINT8ARRAY\";\n})(FMT_BYTES || (FMT_BYTES = {}));\nexport const DEFAULT_RETURN_FORMAT = {\n    number: FMT_NUMBER.BIGINT,\n    bytes: FMT_BYTES.HEX,\n};\nexport const ETH_DATA_FORMAT = { number: FMT_NUMBER.HEX, bytes: FMT_BYTES.HEX };\n//# sourceMappingURL=data_format_types.js.map","export var BlockTags;\n(function (BlockTags) {\n    BlockTags[\"EARLIEST\"] = \"earliest\";\n    BlockTags[\"LATEST\"] = \"latest\";\n    BlockTags[\"PENDING\"] = \"pending\";\n    BlockTags[\"SAFE\"] = \"safe\";\n    BlockTags[\"FINALIZED\"] = \"finalized\";\n    BlockTags[\"COMMITTED\"] = \"committed\";\n})(BlockTags || (BlockTags = {}));\n// This list of hardforks is expected to be in order\n// keep this in mind when making changes to it\nexport var HardforksOrdered;\n(function (HardforksOrdered) {\n    HardforksOrdered[\"chainstart\"] = \"chainstart\";\n    HardforksOrdered[\"frontier\"] = \"frontier\";\n    HardforksOrdered[\"homestead\"] = \"homestead\";\n    HardforksOrdered[\"dao\"] = \"dao\";\n    HardforksOrdered[\"tangerineWhistle\"] = \"tangerineWhistle\";\n    HardforksOrdered[\"spuriousDragon\"] = \"spuriousDragon\";\n    HardforksOrdered[\"byzantium\"] = \"byzantium\";\n    HardforksOrdered[\"constantinople\"] = \"constantinople\";\n    HardforksOrdered[\"petersburg\"] = \"petersburg\";\n    HardforksOrdered[\"istanbul\"] = \"istanbul\";\n    HardforksOrdered[\"muirGlacier\"] = \"muirGlacier\";\n    HardforksOrdered[\"berlin\"] = \"berlin\";\n    HardforksOrdered[\"london\"] = \"london\";\n    HardforksOrdered[\"altair\"] = \"altair\";\n    HardforksOrdered[\"arrowGlacier\"] = \"arrowGlacier\";\n    HardforksOrdered[\"grayGlacier\"] = \"grayGlacier\";\n    HardforksOrdered[\"bellatrix\"] = \"bellatrix\";\n    HardforksOrdered[\"merge\"] = \"merge\";\n    HardforksOrdered[\"capella\"] = \"capella\";\n    HardforksOrdered[\"shanghai\"] = \"shanghai\";\n})(HardforksOrdered || (HardforksOrdered = {}));\n//# sourceMappingURL=eth_types.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\n// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\nexport const TypedArray = Object.getPrototypeOf(Uint8Array);\n//# sourceMappingURL=primitives_types.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\nconst symbol = Symbol.for('web3/base-provider');\n// Provider interface compatible with EIP-1193\n// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1193.md\nexport class Web3BaseProvider {\n    static isWeb3Provider(provider) {\n        return (provider instanceof Web3BaseProvider ||\n            Boolean(provider && provider[symbol]));\n    }\n    // To match an object \"instanceof\" does not work if\n    // matcher class and object is using different package versions\n    // to overcome this bottleneck used this approach.\n    // The symbol value for one string will always remain same regardless of package versions\n    // eslint-disable-next-line class-methods-use-this\n    get [symbol]() {\n        return true;\n    }\n    /**\n     * @deprecated Please use `.request` instead.\n     * @param payload - Request Payload\n     * @param callback - Callback\n     */\n    send(payload, \n    // eslint-disable-next-line @typescript-eslint/ban-types\n    callback) {\n        this.request(payload)\n            .then(response => {\n            // eslint-disable-next-line no-null/no-null\n            callback(null, response);\n        })\n            .catch((err) => {\n            callback(err);\n        });\n    }\n    /**\n     * @deprecated Please use `.request` instead.\n     * @param payload - Request Payload\n     */\n    sendAsync(payload) {\n        return __awaiter(this, void 0, void 0, function* () {\n            return this.request(payload);\n        });\n    }\n    /**\n     * Modify the return type of the request method to be fully compatible with EIP-1193\n     *\n     * [deprecated] In the future major releases (\\>= v5) all providers are supposed to be fully compatible with EIP-1193.\n     * So this method will not be needed and would not be available in the future.\n     *\n     * @returns A new instance of the provider with the request method fully compatible with EIP-1193\n     *\n     * @example\n     * ```ts\n     * const provider = new Web3HttpProvider('http://localhost:8545');\n     * const fullyCompatibleProvider = provider.asEIP1193Provider();\n     * const result = await fullyCompatibleProvider.request({ method: 'eth_getBalance' });\n     * console.log(result); // '0x0234c8a3397aab58' or something like that\n     * ```\n     */\n    asEIP1193Provider() {\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n        const newObj = Object.create(this);\n        // eslint-disable-next-line @typescript-eslint/unbound-method\n        const originalRequest = newObj.request;\n        newObj.request = function request(args) {\n            return __awaiter(this, void 0, void 0, function* () {\n                // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n                const response = (yield originalRequest(args));\n                return response.result;\n            });\n        };\n        // @ts-expect-error the property should not be available in the new object because of using Object.create(this).\n        //\tBut it is available if we do not delete it.\n        newObj.asEIP1193Provider = undefined; // to prevent the user for calling this method again\n        return newObj;\n    }\n}\n//# sourceMappingURL=web3_base_provider.js.map","export class Web3BaseWallet extends Array {\n    constructor(accountProvider) {\n        super();\n        this._accountProvider = accountProvider;\n    }\n}\n//# sourceMappingURL=web3_base_wallet.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\n// Response error\nexport const ERR_RESPONSE = 100;\nexport const ERR_INVALID_RESPONSE = 101;\n// Generic errors\nexport const ERR_PARAM = 200;\nexport const ERR_FORMATTERS = 201;\nexport const ERR_METHOD_NOT_IMPLEMENTED = 202;\nexport const ERR_OPERATION_TIMEOUT = 203;\nexport const ERR_OPERATION_ABORT = 204;\nexport const ERR_ABI_ENCODING = 205;\nexport const ERR_EXISTING_PLUGIN_NAMESPACE = 206;\nexport const ERR_INVALID_METHOD_PARAMS = 207;\nexport const ERR_MULTIPLE_ERRORS = 208;\n// Contract error codes\nexport const ERR_CONTRACT = 300;\nexport const ERR_CONTRACT_RESOLVER_MISSING = 301;\nexport const ERR_CONTRACT_ABI_MISSING = 302;\nexport const ERR_CONTRACT_REQUIRED_CALLBACK = 303;\nexport const ERR_CONTRACT_EVENT_NOT_EXISTS = 304;\nexport const ERR_CONTRACT_RESERVED_EVENT = 305;\nexport const ERR_CONTRACT_MISSING_DEPLOY_DATA = 306;\nexport const ERR_CONTRACT_MISSING_ADDRESS = 307;\nexport const ERR_CONTRACT_MISSING_FROM_ADDRESS = 308;\nexport const ERR_CONTRACT_INSTANTIATION = 309;\nexport const ERR_CONTRACT_EXECUTION_REVERTED = 310;\nexport const ERR_CONTRACT_TX_DATA_AND_INPUT = 311;\n// Transaction error codes\nexport const ERR_TX = 400;\nexport const ERR_TX_REVERT_INSTRUCTION = 401;\nexport const ERR_TX_REVERT_TRANSACTION = 402;\nexport const ERR_TX_NO_CONTRACT_ADDRESS = 403;\nexport const ERR_TX_CONTRACT_NOT_STORED = 404;\nexport const ERR_TX_REVERT_WITHOUT_REASON = 405;\nexport const ERR_TX_OUT_OF_GAS = 406;\nexport const ERR_RAW_TX_UNDEFINED = 407;\nexport const ERR_TX_INVALID_SENDER = 408;\nexport const ERR_TX_INVALID_CALL = 409;\nexport const ERR_TX_MISSING_CUSTOM_CHAIN = 410;\nexport const ERR_TX_MISSING_CUSTOM_CHAIN_ID = 411;\nexport const ERR_TX_CHAIN_ID_MISMATCH = 412;\nexport const ERR_TX_INVALID_CHAIN_INFO = 413;\nexport const ERR_TX_MISSING_CHAIN_INFO = 414;\nexport const ERR_TX_MISSING_GAS = 415;\nexport const ERR_TX_INVALID_LEGACY_GAS = 416;\nexport const ERR_TX_INVALID_FEE_MARKET_GAS = 417;\nexport const ERR_TX_INVALID_FEE_MARKET_GAS_PRICE = 418;\nexport const ERR_TX_INVALID_LEGACY_FEE_MARKET = 419;\nexport const ERR_TX_INVALID_OBJECT = 420;\nexport const ERR_TX_INVALID_NONCE_OR_CHAIN_ID = 421;\nexport const ERR_TX_UNABLE_TO_POPULATE_NONCE = 422;\nexport const ERR_TX_UNSUPPORTED_EIP_1559 = 423;\nexport const ERR_TX_UNSUPPORTED_TYPE = 424;\nexport const ERR_TX_DATA_AND_INPUT = 425;\nexport const ERR_TX_POLLING_TIMEOUT = 426;\nexport const ERR_TX_RECEIPT_MISSING_OR_BLOCKHASH_NULL = 427;\nexport const ERR_TX_RECEIPT_MISSING_BLOCK_NUMBER = 428;\nexport const ERR_TX_LOCAL_WALLET_NOT_AVAILABLE = 429;\nexport const ERR_TX_NOT_FOUND = 430;\nexport const ERR_TX_SEND_TIMEOUT = 431;\nexport const ERR_TX_BLOCK_TIMEOUT = 432;\nexport const ERR_TX_SIGNING = 433;\nexport const ERR_TX_GAS_MISMATCH = 434;\nexport const ERR_TX_CHAIN_MISMATCH = 435;\nexport const ERR_TX_HARDFORK_MISMATCH = 436;\nexport const ERR_TX_INVALID_RECEIVER = 437;\nexport const ERR_TX_REVERT_TRANSACTION_CUSTOM_ERROR = 438;\nexport const ERR_TX_INVALID_PROPERTIES_FOR_TYPE = 439;\nexport const ERR_TX_MISSING_GAS_INNER_ERROR = 440;\nexport const ERR_TX_GAS_MISMATCH_INNER_ERROR = 441;\n// Connection error codes\nexport const ERR_CONN = 500;\nexport const ERR_CONN_INVALID = 501;\nexport const ERR_CONN_TIMEOUT = 502;\nexport const ERR_CONN_NOT_OPEN = 503;\nexport const ERR_CONN_CLOSE = 504;\nexport const ERR_CONN_MAX_ATTEMPTS = 505;\nexport const ERR_CONN_PENDING_REQUESTS = 506;\nexport const ERR_REQ_ALREADY_SENT = 507;\n// Provider error codes\nexport const ERR_PROVIDER = 600;\nexport const ERR_INVALID_PROVIDER = 601;\nexport const ERR_INVALID_CLIENT = 602;\nexport const ERR_SUBSCRIPTION = 603;\nexport const ERR_WS_PROVIDER = 604;\n// Account error codes\nexport const ERR_PRIVATE_KEY_LENGTH = 701;\nexport const ERR_INVALID_PRIVATE_KEY = 702;\nexport const ERR_UNSUPPORTED_KDF = 703;\nexport const ERR_KEY_DERIVATION_FAIL = 704;\nexport const ERR_KEY_VERSION_UNSUPPORTED = 705;\nexport const ERR_INVALID_PASSWORD = 706;\nexport const ERR_IV_LENGTH = 707;\nexport const ERR_INVALID_KEYSTORE = 708;\nexport const ERR_PBKDF2_ITERATIONS = 709;\n// Signature error codes\nexport const ERR_SIGNATURE_FAILED = 801;\nexport const ERR_INVALID_SIGNATURE = 802;\nexport const GENESIS_BLOCK_NUMBER = '0x0';\n// RPC error codes (EIP-1193)\n// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1193.md#provider-errors\nexport const JSONRPC_ERR_REJECTED_REQUEST = 4001;\nexport const JSONRPC_ERR_UNAUTHORIZED = 4100;\nexport const JSONRPC_ERR_UNSUPPORTED_METHOD = 4200;\nexport const JSONRPC_ERR_DISCONNECTED = 4900;\nexport const JSONRPC_ERR_CHAIN_DISCONNECTED = 4901;\n// ENS error codes\nexport const ERR_ENS_CHECK_INTERFACE_SUPPORT = 901;\nexport const ERR_ENS_UNSUPPORTED_NETWORK = 902;\nexport const ERR_ENS_NETWORK_NOT_SYNCED = 903;\n// Utils error codes\nexport const ERR_INVALID_STRING = 1001;\nexport const ERR_INVALID_BYTES = 1002;\nexport const ERR_INVALID_NUMBER = 1003;\nexport const ERR_INVALID_UNIT = 1004;\nexport const ERR_INVALID_ADDRESS = 1005;\nexport const ERR_INVALID_HEX = 1006;\nexport const ERR_INVALID_TYPE = 1007;\nexport const ERR_INVALID_BOOLEAN = 1008;\nexport const ERR_INVALID_UNSIGNED_INTEGER = 1009;\nexport const ERR_INVALID_SIZE = 1010;\nexport const ERR_INVALID_LARGE_VALUE = 1011;\nexport const ERR_INVALID_BLOCK = 1012;\nexport const ERR_INVALID_TYPE_ABI = 1013;\nexport const ERR_INVALID_NIBBLE_WIDTH = 1014;\nexport const ERR_INVALID_INTEGER = 1015;\n// Validation error codes\nexport const ERR_VALIDATION = 1100;\n// Core error codes\nexport const ERR_CORE_HARDFORK_MISMATCH = 1101;\nexport const ERR_CORE_CHAIN_MISMATCH = 1102;\n// Schema error codes\nexport const ERR_SCHEMA_FORMAT = 1200;\n// RPC error codes (EIP-1474)\n// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1474.md\nexport const ERR_RPC_INVALID_JSON = -32700;\nexport const ERR_RPC_INVALID_REQUEST = -32600;\nexport const ERR_RPC_INVALID_METHOD = -32601;\nexport const ERR_RPC_INVALID_PARAMS = -32602;\nexport const ERR_RPC_INTERNAL_ERROR = -32603;\nexport const ERR_RPC_INVALID_INPUT = -32000;\nexport const ERR_RPC_MISSING_RESOURCE = -32001;\nexport const ERR_RPC_UNAVAILABLE_RESOURCE = -32002;\nexport const ERR_RPC_TRANSACTION_REJECTED = -32003;\nexport const ERR_RPC_UNSUPPORTED_METHOD = -32004;\nexport const ERR_RPC_LIMIT_EXCEEDED = -32005;\nexport const ERR_RPC_NOT_SUPPORTED = -32006;\n//# sourceMappingURL=error_codes.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { ERR_MULTIPLE_ERRORS } from './error_codes.js';\n/**\n * Base class for Web3 errors.\n */\nexport class BaseWeb3Error extends Error {\n    /**\n     * @deprecated Use the `cause` property instead.\n     */\n    get innerError() {\n        // eslint-disable-next-line no-use-before-define\n        if (this.cause instanceof MultipleErrors) {\n            return this.cause.errors;\n        }\n        return this.cause;\n    }\n    /**\n     * @deprecated Use the `cause` property instead.\n     */\n    set innerError(cause) {\n        if (Array.isArray(cause)) {\n            // eslint-disable-next-line no-use-before-define\n            this.cause = new MultipleErrors(cause);\n        }\n        else {\n            this.cause = cause;\n        }\n    }\n    constructor(msg, cause) {\n        super(msg);\n        if (Array.isArray(cause)) {\n            // eslint-disable-next-line no-use-before-define\n            this.cause = new MultipleErrors(cause);\n        }\n        else {\n            this.cause = cause;\n        }\n        this.name = this.constructor.name;\n        if (typeof Error.captureStackTrace === 'function') {\n            Error.captureStackTrace(new.target.constructor);\n        }\n        else {\n            this.stack = new Error().stack;\n        }\n    }\n    static convertToString(value, unquotValue = false) {\n        // Using \"null\" value intentionally for validation\n        // eslint-disable-next-line no-null/no-null\n        if (value === null || value === undefined)\n            return 'undefined';\n        const result = JSON.stringify(value, (_, v) => (typeof v === 'bigint' ? v.toString() : v));\n        return unquotValue && ['bigint', 'string'].includes(typeof value)\n            ? result.replace(/['\\\\\"]+/g, '')\n            : result;\n    }\n    toJSON() {\n        return {\n            name: this.name,\n            code: this.code,\n            message: this.message,\n            cause: this.cause,\n            // deprecated\n            innerError: this.cause,\n        };\n    }\n}\nexport class MultipleErrors extends BaseWeb3Error {\n    constructor(errors) {\n        super(`Multiple errors occurred: [${errors.map(e => e.message).join('], [')}]`);\n        this.code = ERR_MULTIPLE_ERRORS;\n        this.errors = errors;\n    }\n}\nexport class InvalidValueError extends BaseWeb3Error {\n    constructor(value, msg) {\n        super(`Invalid value given \"${BaseWeb3Error.convertToString(value, true)}\". Error: ${msg}.`);\n        this.name = this.constructor.name;\n    }\n}\n//# sourceMappingURL=web3_error_base.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\n/* eslint-disable max-classes-per-file */\nimport { ERR_PRIVATE_KEY_LENGTH, ERR_INVALID_PRIVATE_KEY, ERR_INVALID_SIGNATURE, ERR_UNSUPPORTED_KDF, ERR_KEY_DERIVATION_FAIL, ERR_KEY_VERSION_UNSUPPORTED, ERR_INVALID_PASSWORD, ERR_IV_LENGTH, ERR_PBKDF2_ITERATIONS, } from '../error_codes.js';\nimport { BaseWeb3Error } from '../web3_error_base.js';\nexport class PrivateKeyLengthError extends BaseWeb3Error {\n    constructor() {\n        super(`Private key must be 32 bytes.`);\n        this.code = ERR_PRIVATE_KEY_LENGTH;\n    }\n}\nexport class InvalidPrivateKeyError extends BaseWeb3Error {\n    constructor() {\n        super(`Invalid Private Key, Not a valid string or uint8Array`);\n        this.code = ERR_INVALID_PRIVATE_KEY;\n    }\n}\nexport class InvalidSignatureError extends BaseWeb3Error {\n    constructor(errorDetails) {\n        super(`\"${errorDetails}\"`);\n        this.code = ERR_INVALID_SIGNATURE;\n    }\n}\nexport class InvalidKdfError extends BaseWeb3Error {\n    constructor() {\n        super(`Invalid key derivation function`);\n        this.code = ERR_UNSUPPORTED_KDF;\n    }\n}\nexport class KeyDerivationError extends BaseWeb3Error {\n    constructor() {\n        super(`Key derivation failed - possibly wrong password`);\n        this.code = ERR_KEY_DERIVATION_FAIL;\n    }\n}\nexport class KeyStoreVersionError extends BaseWeb3Error {\n    constructor() {\n        super('Unsupported key store version');\n        this.code = ERR_KEY_VERSION_UNSUPPORTED;\n    }\n}\nexport class InvalidPasswordError extends BaseWeb3Error {\n    constructor() {\n        super('Password cannot be empty');\n        this.code = ERR_INVALID_PASSWORD;\n    }\n}\nexport class IVLengthError extends BaseWeb3Error {\n    constructor() {\n        super('Initialization vector must be 16 bytes');\n        this.code = ERR_IV_LENGTH;\n    }\n}\nexport class PBKDF2IterationsError extends BaseWeb3Error {\n    constructor() {\n        super('c > 1000, pbkdf2 is less secure with less iterations');\n        this.code = ERR_PBKDF2_ITERATIONS;\n    }\n}\n//# sourceMappingURL=account_errors.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { ERR_CONN, ERR_CONN_INVALID, ERR_CONN_TIMEOUT, ERR_CONN_NOT_OPEN, ERR_CONN_CLOSE, ERR_CONN_MAX_ATTEMPTS, ERR_CONN_PENDING_REQUESTS, ERR_REQ_ALREADY_SENT, } from '../error_codes.js';\nimport { BaseWeb3Error } from '../web3_error_base.js';\nexport class ConnectionError extends BaseWeb3Error {\n    constructor(message, event) {\n        super(message);\n        this.code = ERR_CONN;\n        if (event) {\n            this.errorCode = event.code;\n            this.errorReason = event.reason;\n        }\n    }\n    toJSON() {\n        return Object.assign(Object.assign({}, super.toJSON()), { errorCode: this.errorCode, errorReason: this.errorReason });\n    }\n}\nexport class InvalidConnectionError extends ConnectionError {\n    constructor(host, event) {\n        super(`CONNECTION ERROR: Couldn't connect to node ${host}.`, event);\n        this.host = host;\n        this.code = ERR_CONN_INVALID;\n    }\n    toJSON() {\n        return Object.assign(Object.assign({}, super.toJSON()), { host: this.host });\n    }\n}\nexport class ConnectionTimeoutError extends ConnectionError {\n    constructor(duration) {\n        super(`CONNECTION TIMEOUT: timeout of ${duration}ms achieved`);\n        this.duration = duration;\n        this.code = ERR_CONN_TIMEOUT;\n    }\n    toJSON() {\n        return Object.assign(Object.assign({}, super.toJSON()), { duration: this.duration });\n    }\n}\nexport class ConnectionNotOpenError extends ConnectionError {\n    constructor(event) {\n        super('Connection not open', event);\n        this.code = ERR_CONN_NOT_OPEN;\n    }\n}\nexport class ConnectionCloseError extends ConnectionError {\n    constructor(event) {\n        var _a, _b;\n        super(`CONNECTION ERROR: The connection got closed with the close code ${(_a = event === null || event === void 0 ? void 0 : event.code) !== null && _a !== void 0 ? _a : ''} and the following reason string ${(_b = event === null || event === void 0 ? void 0 : event.reason) !== null && _b !== void 0 ? _b : ''}`, event);\n        this.code = ERR_CONN_CLOSE;\n    }\n}\nexport class MaxAttemptsReachedOnReconnectingError extends ConnectionError {\n    constructor(numberOfAttempts) {\n        super(`Maximum number of reconnect attempts reached! (${numberOfAttempts})`);\n        this.code = ERR_CONN_MAX_ATTEMPTS;\n    }\n}\nexport class PendingRequestsOnReconnectingError extends ConnectionError {\n    constructor() {\n        super('CONNECTION ERROR: Provider started to reconnect before the response got received!');\n        this.code = ERR_CONN_PENDING_REQUESTS;\n    }\n}\nexport class RequestAlreadySentError extends ConnectionError {\n    constructor(id) {\n        super(`Request already sent with following id: ${id}`);\n        this.code = ERR_REQ_ALREADY_SENT;\n    }\n}\n//# sourceMappingURL=connection_errors.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { ERR_CONTRACT, ERR_CONTRACT_ABI_MISSING, ERR_CONTRACT_EXECUTION_REVERTED, ERR_CONTRACT_EVENT_NOT_EXISTS, ERR_CONTRACT_INSTANTIATION, ERR_CONTRACT_MISSING_ADDRESS, ERR_CONTRACT_MISSING_DEPLOY_DATA, ERR_CONTRACT_MISSING_FROM_ADDRESS, ERR_CONTRACT_REQUIRED_CALLBACK, ERR_CONTRACT_RESERVED_EVENT, ERR_CONTRACT_RESOLVER_MISSING, ERR_CONTRACT_TX_DATA_AND_INPUT, } from '../error_codes.js';\nimport { BaseWeb3Error, InvalidValueError } from '../web3_error_base.js';\nexport class Web3ContractError extends BaseWeb3Error {\n    constructor(message, receipt) {\n        super(message);\n        this.code = ERR_CONTRACT;\n        this.receipt = receipt;\n    }\n}\nexport class ResolverMethodMissingError extends BaseWeb3Error {\n    constructor(address, name) {\n        super(`The resolver at ${address} does not implement requested method: \"${name}\".`);\n        this.address = address;\n        this.name = name;\n        this.code = ERR_CONTRACT_RESOLVER_MISSING;\n    }\n    toJSON() {\n        return Object.assign(Object.assign({}, super.toJSON()), { address: this.address, name: this.name });\n    }\n}\nexport class ContractMissingABIError extends BaseWeb3Error {\n    constructor() {\n        super('You must provide the json interface of the contract when instantiating a contract object.');\n        this.code = ERR_CONTRACT_ABI_MISSING;\n    }\n}\nexport class ContractOnceRequiresCallbackError extends BaseWeb3Error {\n    constructor() {\n        super('Once requires a callback as the second parameter.');\n        this.code = ERR_CONTRACT_REQUIRED_CALLBACK;\n    }\n}\nexport class ContractEventDoesNotExistError extends BaseWeb3Error {\n    constructor(eventName) {\n        super(`Event \"${eventName}\" doesn't exist in this contract.`);\n        this.eventName = eventName;\n        this.code = ERR_CONTRACT_EVENT_NOT_EXISTS;\n    }\n    toJSON() {\n        return Object.assign(Object.assign({}, super.toJSON()), { eventName: this.eventName });\n    }\n}\nexport class ContractReservedEventError extends BaseWeb3Error {\n    constructor(type) {\n        super(`Event \"${type}\" doesn't exist in this contract.`);\n        this.type = type;\n        this.code = ERR_CONTRACT_RESERVED_EVENT;\n    }\n    toJSON() {\n        return Object.assign(Object.assign({}, super.toJSON()), { type: this.type });\n    }\n}\nexport class ContractMissingDeployDataError extends BaseWeb3Error {\n    constructor() {\n        super(`No \"data\" specified in neither the given options, nor the default options.`);\n        this.code = ERR_CONTRACT_MISSING_DEPLOY_DATA;\n    }\n}\nexport class ContractNoAddressDefinedError extends BaseWeb3Error {\n    constructor() {\n        super(\"This contract object doesn't have address set yet, please set an address first.\");\n        this.code = ERR_CONTRACT_MISSING_ADDRESS;\n    }\n}\nexport class ContractNoFromAddressDefinedError extends BaseWeb3Error {\n    constructor() {\n        super('No \"from\" address specified in neither the given options, nor the default options.');\n        this.code = ERR_CONTRACT_MISSING_FROM_ADDRESS;\n    }\n}\nexport class ContractInstantiationError extends BaseWeb3Error {\n    constructor() {\n        super(...arguments);\n        this.code = ERR_CONTRACT_INSTANTIATION;\n    }\n}\n/**\n * This class is expected to be set as an `cause` inside ContractExecutionError\n * The properties would be typically decoded from the `data` if it was encoded according to EIP-838\n */\nexport class Eip838ExecutionError extends Web3ContractError {\n    constructor(error) {\n        super(error.message || 'Error');\n        this.name = ('name' in error && error.name) || this.constructor.name;\n        // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n        this.stack = ('stack' in error && error.stack) || undefined;\n        this.code = error.code;\n        // get embedded error details got from some providers like MetaMask\n        // and set this.data from the inner error data for easier read.\n        // note: the data is a hex string inside either:\n        //\t error.data, error.data.data or error.data.originalError.data (https://github.com/web3/web3.js/issues/4454#issuecomment-1485953455)\n        if (typeof error.data === 'object') {\n            let originalError;\n            if (error.data && 'originalError' in error.data) {\n                originalError = error.data.originalError;\n            }\n            else {\n                // Ganache has no `originalError` sub-object unlike others\n                originalError = error.data;\n            }\n            this.data = originalError.data;\n            this.cause = new Eip838ExecutionError(originalError);\n        }\n        else {\n            this.data = error.data;\n        }\n    }\n    setDecodedProperties(errorName, errorSignature, errorArgs) {\n        this.errorName = errorName;\n        this.errorSignature = errorSignature;\n        this.errorArgs = errorArgs;\n    }\n    toJSON() {\n        let json = Object.assign(Object.assign({}, super.toJSON()), { data: this.data });\n        if (this.errorName) {\n            json = Object.assign(Object.assign({}, json), { errorName: this.errorName, errorSignature: this.errorSignature, errorArgs: this.errorArgs });\n        }\n        return json;\n    }\n}\n/**\n * Used when an error is raised while executing a function inside a smart contract.\n * The data is expected to be encoded according to EIP-848.\n */\nexport class ContractExecutionError extends Web3ContractError {\n    constructor(rpcError) {\n        super('Error happened while trying to execute a function inside a smart contract');\n        this.code = ERR_CONTRACT_EXECUTION_REVERTED;\n        this.cause = new Eip838ExecutionError(rpcError);\n    }\n}\nexport class ContractTransactionDataAndInputError extends InvalidValueError {\n    constructor(value) {\n        var _a, _b;\n        super(`data: ${(_a = value.data) !== null && _a !== void 0 ? _a : 'undefined'}, input: ${(_b = value.input) !== null && _b !== void 0 ? _b : 'undefined'}`, 'You can\\'t have \"data\" and \"input\" as properties of a contract at the same time, please use either \"data\" or \"input\" instead.');\n        this.code = ERR_CONTRACT_TX_DATA_AND_INPUT;\n    }\n}\n//# sourceMappingURL=contract_errors.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\n/* eslint-disable max-classes-per-file */\nimport { ERR_ENS_CHECK_INTERFACE_SUPPORT, ERR_ENS_NETWORK_NOT_SYNCED, ERR_ENS_UNSUPPORTED_NETWORK, } from '../error_codes.js';\nimport { BaseWeb3Error } from '../web3_error_base.js';\nexport class ENSCheckInterfaceSupportError extends BaseWeb3Error {\n    constructor(errorDetails) {\n        super(`ENS resolver check interface support error. \"${errorDetails}\"`);\n        this.code = ERR_ENS_CHECK_INTERFACE_SUPPORT;\n    }\n}\nexport class ENSUnsupportedNetworkError extends BaseWeb3Error {\n    constructor(networkType) {\n        super(`ENS is not supported on network ${networkType}`);\n        this.code = ERR_ENS_UNSUPPORTED_NETWORK;\n    }\n}\nexport class ENSNetworkNotSyncedError extends BaseWeb3Error {\n    constructor() {\n        super(`Network not synced`);\n        this.code = ERR_ENS_NETWORK_NOT_SYNCED;\n    }\n}\n//# sourceMappingURL=ens_errors.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\n/* eslint-disable max-classes-per-file */\nimport { ERR_ABI_ENCODING, ERR_FORMATTERS, ERR_METHOD_NOT_IMPLEMENTED, ERR_OPERATION_ABORT, ERR_OPERATION_TIMEOUT, ERR_PARAM, ERR_EXISTING_PLUGIN_NAMESPACE, ERR_INVALID_METHOD_PARAMS, } from '../error_codes.js';\nimport { BaseWeb3Error } from '../web3_error_base.js';\nexport class InvalidNumberOfParamsError extends BaseWeb3Error {\n    constructor(got, expected, method) {\n        super(`Invalid number of parameters for \"${method}\". Got \"${got}\" expected \"${expected}\"!`);\n        this.got = got;\n        this.expected = expected;\n        this.method = method;\n        this.code = ERR_PARAM;\n    }\n    toJSON() {\n        return Object.assign(Object.assign({}, super.toJSON()), { got: this.got, expected: this.expected, method: this.method });\n    }\n}\nexport class InvalidMethodParamsError extends BaseWeb3Error {\n    constructor(hint) {\n        super(`Invalid parameters passed. \"${typeof hint !== 'undefined' ? hint : ''}\"`);\n        this.hint = hint;\n        this.code = ERR_INVALID_METHOD_PARAMS;\n    }\n    toJSON() {\n        return Object.assign(Object.assign({}, super.toJSON()), { hint: this.hint });\n    }\n}\nexport class FormatterError extends BaseWeb3Error {\n    constructor() {\n        super(...arguments);\n        this.code = ERR_FORMATTERS;\n    }\n}\nexport class MethodNotImplementedError extends BaseWeb3Error {\n    constructor() {\n        super(\"The method you're trying to call is not implemented.\");\n        this.code = ERR_METHOD_NOT_IMPLEMENTED;\n    }\n}\nexport class OperationTimeoutError extends BaseWeb3Error {\n    constructor() {\n        super(...arguments);\n        this.code = ERR_OPERATION_TIMEOUT;\n    }\n}\nexport class OperationAbortError extends BaseWeb3Error {\n    constructor() {\n        super(...arguments);\n        this.code = ERR_OPERATION_ABORT;\n    }\n}\nexport class AbiError extends BaseWeb3Error {\n    constructor(message, props) {\n        super(message);\n        this.code = ERR_ABI_ENCODING;\n        this.props = props !== null && props !== void 0 ? props : {};\n    }\n}\nexport class ExistingPluginNamespaceError extends BaseWeb3Error {\n    constructor(pluginNamespace) {\n        super(`A plugin with the namespace: ${pluginNamespace} has already been registered.`);\n        this.code = ERR_EXISTING_PLUGIN_NAMESPACE;\n    }\n}\n//# sourceMappingURL=generic_errors.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\n/* eslint-disable max-classes-per-file */\nimport { ERR_PROVIDER, ERR_INVALID_PROVIDER, ERR_INVALID_CLIENT, ERR_SUBSCRIPTION, ERR_WS_PROVIDER, } from '../error_codes.js';\nimport { BaseWeb3Error } from '../web3_error_base.js';\nexport class ProviderError extends BaseWeb3Error {\n    constructor() {\n        super(...arguments);\n        this.code = ERR_PROVIDER;\n    }\n}\nexport class InvalidProviderError extends BaseWeb3Error {\n    constructor(clientUrl) {\n        super(`Provider with url \"${clientUrl}\" is not set or invalid`);\n        this.clientUrl = clientUrl;\n        this.code = ERR_INVALID_PROVIDER;\n    }\n}\nexport class InvalidClientError extends BaseWeb3Error {\n    constructor(clientUrl) {\n        super(`Client URL \"${clientUrl}\" is invalid.`);\n        this.code = ERR_INVALID_CLIENT;\n    }\n}\nexport class SubscriptionError extends BaseWeb3Error {\n    constructor() {\n        super(...arguments);\n        this.code = ERR_SUBSCRIPTION;\n    }\n}\nexport class Web3WSProviderError extends BaseWeb3Error {\n    constructor() {\n        super(...arguments);\n        this.code = ERR_WS_PROVIDER; // this had duplicate code with generic provider\n    }\n}\n//# sourceMappingURL=provider_errors.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { ERR_SIGNATURE_FAILED } from '../error_codes.js';\nimport { InvalidValueError } from '../web3_error_base.js';\nexport class SignatureError extends InvalidValueError {\n    constructor() {\n        super(...arguments);\n        this.code = ERR_SIGNATURE_FAILED;\n    }\n}\n//# sourceMappingURL=signature_errors.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { ERR_RAW_TX_UNDEFINED, ERR_TX, ERR_TX_BLOCK_TIMEOUT, ERR_TX_CONTRACT_NOT_STORED, ERR_TX_CHAIN_ID_MISMATCH, ERR_TX_DATA_AND_INPUT, ERR_TX_GAS_MISMATCH, ERR_TX_CHAIN_MISMATCH, ERR_TX_HARDFORK_MISMATCH, ERR_TX_INVALID_CALL, ERR_TX_INVALID_CHAIN_INFO, ERR_TX_INVALID_FEE_MARKET_GAS, ERR_TX_INVALID_FEE_MARKET_GAS_PRICE, ERR_TX_INVALID_LEGACY_FEE_MARKET, ERR_TX_INVALID_LEGACY_GAS, ERR_TX_INVALID_NONCE_OR_CHAIN_ID, ERR_TX_INVALID_OBJECT, ERR_TX_INVALID_SENDER, ERR_TX_INVALID_RECEIVER, ERR_TX_LOCAL_WALLET_NOT_AVAILABLE, ERR_TX_MISSING_CHAIN_INFO, ERR_TX_MISSING_CUSTOM_CHAIN, ERR_TX_MISSING_CUSTOM_CHAIN_ID, ERR_TX_MISSING_GAS, ERR_TX_NO_CONTRACT_ADDRESS, ERR_TX_NOT_FOUND, ERR_TX_OUT_OF_GAS, ERR_TX_POLLING_TIMEOUT, ERR_TX_RECEIPT_MISSING_BLOCK_NUMBER, ERR_TX_RECEIPT_MISSING_OR_BLOCKHASH_NULL, ERR_TX_REVERT_INSTRUCTION, ERR_TX_REVERT_TRANSACTION, ERR_TX_REVERT_WITHOUT_REASON, ERR_TX_SEND_TIMEOUT, ERR_TX_SIGNING, ERR_TX_UNABLE_TO_POPULATE_NONCE, ERR_TX_UNSUPPORTED_EIP_1559, ERR_TX_UNSUPPORTED_TYPE, ERR_TX_REVERT_TRANSACTION_CUSTOM_ERROR, ERR_TX_INVALID_PROPERTIES_FOR_TYPE, ERR_TX_MISSING_GAS_INNER_ERROR, ERR_TX_GAS_MISMATCH_INNER_ERROR, } from '../error_codes.js';\nimport { InvalidValueError, BaseWeb3Error } from '../web3_error_base.js';\nexport class TransactionError extends BaseWeb3Error {\n    constructor(message, receipt) {\n        super(message);\n        this.receipt = receipt;\n        this.code = ERR_TX;\n    }\n    toJSON() {\n        return Object.assign(Object.assign({}, super.toJSON()), { receipt: this.receipt });\n    }\n}\nexport class RevertInstructionError extends BaseWeb3Error {\n    constructor(reason, signature) {\n        super(`Your request got reverted with the following reason string: ${reason}`);\n        this.reason = reason;\n        this.signature = signature;\n        this.code = ERR_TX_REVERT_INSTRUCTION;\n    }\n    toJSON() {\n        return Object.assign(Object.assign({}, super.toJSON()), { reason: this.reason, signature: this.signature });\n    }\n}\nexport class TransactionRevertInstructionError extends BaseWeb3Error {\n    constructor(reason, signature, receipt, data) {\n        super(`Transaction has been reverted by the EVM${receipt === undefined ? '' : `:\\n ${BaseWeb3Error.convertToString(receipt)}`}`);\n        this.reason = reason;\n        this.signature = signature;\n        this.receipt = receipt;\n        this.data = data;\n        this.code = ERR_TX_REVERT_TRANSACTION;\n    }\n    toJSON() {\n        return Object.assign(Object.assign({}, super.toJSON()), { reason: this.reason, signature: this.signature, receipt: this.receipt, data: this.data });\n    }\n}\n/**\n * This error is used when a transaction to a smart contract fails and\n * a custom user error (https://blog.soliditylang.org/2021/04/21/custom-errors/)\n * is able to be parsed from the revert reason\n */\nexport class TransactionRevertWithCustomError extends TransactionRevertInstructionError {\n    constructor(reason, customErrorName, customErrorDecodedSignature, customErrorArguments, signature, receipt, data) {\n        super(reason);\n        this.reason = reason;\n        this.customErrorName = customErrorName;\n        this.customErrorDecodedSignature = customErrorDecodedSignature;\n        this.customErrorArguments = customErrorArguments;\n        this.signature = signature;\n        this.receipt = receipt;\n        this.data = data;\n        this.code = ERR_TX_REVERT_TRANSACTION_CUSTOM_ERROR;\n    }\n    toJSON() {\n        return Object.assign(Object.assign({}, super.toJSON()), { reason: this.reason, customErrorName: this.customErrorName, customErrorDecodedSignature: this.customErrorDecodedSignature, customErrorArguments: this.customErrorArguments, signature: this.signature, receipt: this.receipt, data: this.data });\n    }\n}\nexport class NoContractAddressFoundError extends TransactionError {\n    constructor(receipt) {\n        super(\"The transaction receipt didn't contain a contract address.\", receipt);\n        this.code = ERR_TX_NO_CONTRACT_ADDRESS;\n    }\n    toJSON() {\n        return Object.assign(Object.assign({}, super.toJSON()), { receipt: this.receipt });\n    }\n}\nexport class ContractCodeNotStoredError extends TransactionError {\n    constructor(receipt) {\n        super(\"The contract code couldn't be stored, please check your gas limit.\", receipt);\n        this.code = ERR_TX_CONTRACT_NOT_STORED;\n    }\n}\nexport class TransactionRevertedWithoutReasonError extends TransactionError {\n    constructor(receipt) {\n        super(`Transaction has been reverted by the EVM${receipt === undefined ? '' : `:\\n ${BaseWeb3Error.convertToString(receipt)}`}`, receipt);\n        this.code = ERR_TX_REVERT_WITHOUT_REASON;\n    }\n}\nexport class TransactionOutOfGasError extends TransactionError {\n    constructor(receipt) {\n        super(`Transaction ran out of gas. Please provide more gas:\\n ${JSON.stringify(receipt, undefined, 2)}`, receipt);\n        this.code = ERR_TX_OUT_OF_GAS;\n    }\n}\nexport class UndefinedRawTransactionError extends TransactionError {\n    constructor() {\n        super(`Raw transaction undefined`);\n        this.code = ERR_RAW_TX_UNDEFINED;\n    }\n}\nexport class TransactionNotFound extends TransactionError {\n    constructor() {\n        super('Transaction not found');\n        this.code = ERR_TX_NOT_FOUND;\n    }\n}\nexport class InvalidTransactionWithSender extends InvalidValueError {\n    constructor(value) {\n        super(value, 'invalid transaction with invalid sender');\n        this.code = ERR_TX_INVALID_SENDER;\n    }\n}\nexport class InvalidTransactionWithReceiver extends InvalidValueError {\n    constructor(value) {\n        super(value, 'invalid transaction with invalid receiver');\n        this.code = ERR_TX_INVALID_RECEIVER;\n    }\n}\nexport class InvalidTransactionCall extends InvalidValueError {\n    constructor(value) {\n        super(value, 'invalid transaction call');\n        this.code = ERR_TX_INVALID_CALL;\n    }\n}\nexport class MissingCustomChainError extends InvalidValueError {\n    constructor() {\n        super('MissingCustomChainError', 'If tx.common is provided it must have tx.common.customChain');\n        this.code = ERR_TX_MISSING_CUSTOM_CHAIN;\n    }\n}\nexport class MissingCustomChainIdError extends InvalidValueError {\n    constructor() {\n        super('MissingCustomChainIdError', 'If tx.common is provided it must have tx.common.customChain and tx.common.customChain.chainId');\n        this.code = ERR_TX_MISSING_CUSTOM_CHAIN_ID;\n    }\n}\nexport class ChainIdMismatchError extends InvalidValueError {\n    constructor(value) {\n        super(JSON.stringify(value), \n        // https://github.com/ChainSafe/web3.js/blob/8783f4d64e424456bdc53b34ef1142d0a7cee4d7/packages/web3-eth-accounts/src/index.js#L176\n        'Chain Id doesnt match in tx.chainId tx.common.customChain.chainId');\n        this.code = ERR_TX_CHAIN_ID_MISMATCH;\n    }\n}\nexport class ChainMismatchError extends InvalidValueError {\n    constructor(value) {\n        super(JSON.stringify(value), 'Chain doesnt match in tx.chain tx.common.basechain');\n        this.code = ERR_TX_CHAIN_MISMATCH;\n    }\n}\nexport class HardforkMismatchError extends InvalidValueError {\n    constructor(value) {\n        super(JSON.stringify(value), 'hardfork doesnt match in tx.hardfork tx.common.hardfork');\n        this.code = ERR_TX_HARDFORK_MISMATCH;\n    }\n}\nexport class CommonOrChainAndHardforkError extends InvalidValueError {\n    constructor() {\n        super('CommonOrChainAndHardforkError', 'Please provide the common object or the chain and hardfork property but not all together.');\n        this.code = ERR_TX_INVALID_CHAIN_INFO;\n    }\n}\nexport class MissingChainOrHardforkError extends InvalidValueError {\n    constructor(value) {\n        var _a, _b;\n        super('MissingChainOrHardforkError', `When specifying chain and hardfork, both values must be defined. Received \"chain\": ${(_a = value.chain) !== null && _a !== void 0 ? _a : 'undefined'}, \"hardfork\": ${(_b = value.hardfork) !== null && _b !== void 0 ? _b : 'undefined'}`);\n        this.code = ERR_TX_MISSING_CHAIN_INFO;\n    }\n}\nexport class MissingGasInnerError extends BaseWeb3Error {\n    constructor() {\n        super('Missing properties in transaction, either define \"gas\" and \"gasPrice\" for type 0 transactions or \"gas\", \"maxPriorityFeePerGas\" and \"maxFeePerGas\" for type 2 transactions');\n        this.code = ERR_TX_MISSING_GAS_INNER_ERROR;\n    }\n}\nexport class MissingGasError extends InvalidValueError {\n    constructor(value) {\n        var _a, _b, _c, _d;\n        super(`gas: ${(_a = value.gas) !== null && _a !== void 0 ? _a : 'undefined'}, gasPrice: ${(_b = value.gasPrice) !== null && _b !== void 0 ? _b : 'undefined'}, maxPriorityFeePerGas: ${(_c = value.maxPriorityFeePerGas) !== null && _c !== void 0 ? _c : 'undefined'}, maxFeePerGas: ${(_d = value.maxFeePerGas) !== null && _d !== void 0 ? _d : 'undefined'}`, '\"gas\" is missing');\n        this.code = ERR_TX_MISSING_GAS;\n        this.cause = new MissingGasInnerError();\n    }\n}\nexport class TransactionGasMismatchInnerError extends BaseWeb3Error {\n    constructor() {\n        super('Missing properties in transaction, either define \"gas\" and \"gasPrice\" for type 0 transactions or \"gas\", \"maxPriorityFeePerGas\" and \"maxFeePerGas\" for type 2 transactions, not both');\n        this.code = ERR_TX_GAS_MISMATCH_INNER_ERROR;\n    }\n}\nexport class TransactionGasMismatchError extends InvalidValueError {\n    constructor(value) {\n        var _a, _b, _c, _d;\n        super(`gas: ${(_a = value.gas) !== null && _a !== void 0 ? _a : 'undefined'}, gasPrice: ${(_b = value.gasPrice) !== null && _b !== void 0 ? _b : 'undefined'}, maxPriorityFeePerGas: ${(_c = value.maxPriorityFeePerGas) !== null && _c !== void 0 ? _c : 'undefined'}, maxFeePerGas: ${(_d = value.maxFeePerGas) !== null && _d !== void 0 ? _d : 'undefined'}`, 'transaction must specify legacy or fee market gas properties, not both');\n        this.code = ERR_TX_GAS_MISMATCH;\n        this.cause = new TransactionGasMismatchInnerError();\n    }\n}\nexport class InvalidGasOrGasPrice extends InvalidValueError {\n    constructor(value) {\n        var _a, _b;\n        super(`gas: ${(_a = value.gas) !== null && _a !== void 0 ? _a : 'undefined'}, gasPrice: ${(_b = value.gasPrice) !== null && _b !== void 0 ? _b : 'undefined'}`, 'Gas or gasPrice is lower than 0');\n        this.code = ERR_TX_INVALID_LEGACY_GAS;\n    }\n}\nexport class InvalidMaxPriorityFeePerGasOrMaxFeePerGas extends InvalidValueError {\n    constructor(value) {\n        var _a, _b;\n        super(`maxPriorityFeePerGas: ${(_a = value.maxPriorityFeePerGas) !== null && _a !== void 0 ? _a : 'undefined'}, maxFeePerGas: ${(_b = value.maxFeePerGas) !== null && _b !== void 0 ? _b : 'undefined'}`, 'maxPriorityFeePerGas or maxFeePerGas is lower than 0');\n        this.code = ERR_TX_INVALID_FEE_MARKET_GAS;\n    }\n}\nexport class Eip1559GasPriceError extends InvalidValueError {\n    constructor(value) {\n        super(value, \"eip-1559 transactions don't support gasPrice\");\n        this.code = ERR_TX_INVALID_FEE_MARKET_GAS_PRICE;\n    }\n}\nexport class UnsupportedFeeMarketError extends InvalidValueError {\n    constructor(value) {\n        var _a, _b;\n        super(`maxPriorityFeePerGas: ${(_a = value.maxPriorityFeePerGas) !== null && _a !== void 0 ? _a : 'undefined'}, maxFeePerGas: ${(_b = value.maxFeePerGas) !== null && _b !== void 0 ? _b : 'undefined'}`, \"pre-eip-1559 transaction don't support maxFeePerGas/maxPriorityFeePerGas\");\n        this.code = ERR_TX_INVALID_LEGACY_FEE_MARKET;\n    }\n}\nexport class InvalidTransactionObjectError extends InvalidValueError {\n    constructor(value) {\n        super(value, 'invalid transaction object');\n        this.code = ERR_TX_INVALID_OBJECT;\n    }\n}\nexport class InvalidNonceOrChainIdError extends InvalidValueError {\n    constructor(value) {\n        var _a, _b;\n        super(`nonce: ${(_a = value.nonce) !== null && _a !== void 0 ? _a : 'undefined'}, chainId: ${(_b = value.chainId) !== null && _b !== void 0 ? _b : 'undefined'}`, 'Nonce or chainId is lower than 0');\n        this.code = ERR_TX_INVALID_NONCE_OR_CHAIN_ID;\n    }\n}\nexport class UnableToPopulateNonceError extends InvalidValueError {\n    constructor() {\n        super('UnableToPopulateNonceError', 'unable to populate nonce, no from address available');\n        this.code = ERR_TX_UNABLE_TO_POPULATE_NONCE;\n    }\n}\nexport class Eip1559NotSupportedError extends InvalidValueError {\n    constructor() {\n        super('Eip1559NotSupportedError', \"Network doesn't support eip-1559\");\n        this.code = ERR_TX_UNSUPPORTED_EIP_1559;\n    }\n}\nexport class UnsupportedTransactionTypeError extends InvalidValueError {\n    constructor(value) {\n        super(value, 'unsupported transaction type');\n        this.code = ERR_TX_UNSUPPORTED_TYPE;\n    }\n}\nexport class TransactionDataAndInputError extends InvalidValueError {\n    constructor(value) {\n        var _a, _b;\n        super(`data: ${(_a = value.data) !== null && _a !== void 0 ? _a : 'undefined'}, input: ${(_b = value.input) !== null && _b !== void 0 ? _b : 'undefined'}`, 'You can\\'t have \"data\" and \"input\" as properties of transactions at the same time, please use either \"data\" or \"input\" instead.');\n        this.code = ERR_TX_DATA_AND_INPUT;\n    }\n}\nexport class TransactionSendTimeoutError extends BaseWeb3Error {\n    constructor(value) {\n        super(`The connected Ethereum Node did not respond within ${value.numberOfSeconds} seconds, please make sure your transaction was properly sent and you are connected to a healthy Node. Be aware that transaction might still be pending or mined!\\n\\tTransaction Hash: ${value.transactionHash ? value.transactionHash.toString() : 'not available'}`);\n        this.code = ERR_TX_SEND_TIMEOUT;\n    }\n}\nfunction transactionTimeoutHint(transactionHash) {\n    return `Please make sure your transaction was properly sent and there are no previous pending transaction for the same account. However, be aware that it might still be mined!\\n\\tTransaction Hash: ${transactionHash ? transactionHash.toString() : 'not available'}`;\n}\nexport class TransactionPollingTimeoutError extends BaseWeb3Error {\n    constructor(value) {\n        super(`Transaction was not mined within ${value.numberOfSeconds} seconds. ${transactionTimeoutHint(value.transactionHash)}`);\n        this.code = ERR_TX_POLLING_TIMEOUT;\n    }\n}\nexport class TransactionBlockTimeoutError extends BaseWeb3Error {\n    constructor(value) {\n        super(`Transaction started at ${value.starterBlockNumber} but was not mined within ${value.numberOfBlocks} blocks. ${transactionTimeoutHint(value.transactionHash)}`);\n        this.code = ERR_TX_BLOCK_TIMEOUT;\n    }\n}\nexport class TransactionMissingReceiptOrBlockHashError extends InvalidValueError {\n    constructor(value) {\n        var _a, _b;\n        super(`receipt: ${JSON.stringify(value.receipt)}, blockHash: ${(_a = value.blockHash) === null || _a === void 0 ? void 0 : _a.toString()}, transactionHash: ${(_b = value.transactionHash) === null || _b === void 0 ? void 0 : _b.toString()}`, `Receipt missing or blockHash null`);\n        this.code = ERR_TX_RECEIPT_MISSING_OR_BLOCKHASH_NULL;\n    }\n}\nexport class TransactionReceiptMissingBlockNumberError extends InvalidValueError {\n    constructor(value) {\n        super(`receipt: ${JSON.stringify(value.receipt)}`, `Receipt missing block number`);\n        this.code = ERR_TX_RECEIPT_MISSING_BLOCK_NUMBER;\n    }\n}\nexport class TransactionSigningError extends BaseWeb3Error {\n    constructor(errorDetails) {\n        super(`Invalid signature. \"${errorDetails}\"`);\n        this.code = ERR_TX_SIGNING;\n    }\n}\nexport class LocalWalletNotAvailableError extends InvalidValueError {\n    constructor() {\n        super('LocalWalletNotAvailableError', `Attempted to index account in local wallet, but no wallet is available`);\n        this.code = ERR_TX_LOCAL_WALLET_NOT_AVAILABLE;\n    }\n}\nexport class InvalidPropertiesForTransactionTypeError extends BaseWeb3Error {\n    constructor(validationError, txType) {\n        const invalidPropertyNames = [];\n        validationError.forEach(error => invalidPropertyNames.push(error.keyword));\n        super(`The following properties are invalid for the transaction type ${txType}: ${invalidPropertyNames.join(', ')}`);\n        this.code = ERR_TX_INVALID_PROPERTIES_FOR_TYPE;\n    }\n}\n//# sourceMappingURL=transaction_errors.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\n/* eslint-disable max-classes-per-file */\nimport { ERR_INVALID_BYTES, ERR_INVALID_NUMBER, ERR_INVALID_ADDRESS, ERR_INVALID_BLOCK, ERR_INVALID_BOOLEAN, ERR_INVALID_HEX, ERR_INVALID_LARGE_VALUE, ERR_INVALID_NIBBLE_WIDTH, ERR_INVALID_SIZE, ERR_INVALID_STRING, ERR_INVALID_TYPE, ERR_INVALID_TYPE_ABI, ERR_INVALID_UNIT, ERR_INVALID_INTEGER, ERR_INVALID_UNSIGNED_INTEGER, } from '../error_codes.js';\nimport { InvalidValueError } from '../web3_error_base.js';\nexport class InvalidBytesError extends InvalidValueError {\n    constructor(value) {\n        super(value, 'can not parse as byte data');\n        this.code = ERR_INVALID_BYTES;\n    }\n}\nexport class InvalidNumberError extends InvalidValueError {\n    constructor(value) {\n        super(value, 'can not parse as number data');\n        this.code = ERR_INVALID_NUMBER;\n    }\n}\nexport class InvalidAddressError extends InvalidValueError {\n    constructor(value) {\n        super(value, 'invalid ethereum address');\n        this.code = ERR_INVALID_ADDRESS;\n    }\n}\nexport class InvalidStringError extends InvalidValueError {\n    constructor(value) {\n        super(value, 'not a valid string');\n        this.code = ERR_INVALID_STRING;\n    }\n}\nexport class InvalidUnitError extends InvalidValueError {\n    constructor(value) {\n        super(value, 'invalid unit');\n        this.code = ERR_INVALID_UNIT;\n    }\n}\nexport class InvalidIntegerError extends InvalidValueError {\n    constructor(value) {\n        super(value, 'not a valid unit. Must be a positive integer');\n        this.code = ERR_INVALID_INTEGER;\n    }\n}\nexport class HexProcessingError extends InvalidValueError {\n    constructor(value) {\n        super(value, 'can not be converted to hex');\n        this.code = ERR_INVALID_HEX;\n    }\n}\nexport class NibbleWidthError extends InvalidValueError {\n    constructor(value) {\n        super(value, 'value greater than the nibble width');\n        this.code = ERR_INVALID_NIBBLE_WIDTH;\n    }\n}\nexport class InvalidTypeError extends InvalidValueError {\n    constructor(value) {\n        super(value, 'invalid type, type not supported');\n        this.code = ERR_INVALID_TYPE;\n    }\n}\nexport class InvalidBooleanError extends InvalidValueError {\n    constructor(value) {\n        super(value, 'not a valid boolean.');\n        this.code = ERR_INVALID_BOOLEAN;\n    }\n}\nexport class InvalidUnsignedIntegerError extends InvalidValueError {\n    constructor(value) {\n        super(value, 'not a valid unsigned integer.');\n        this.code = ERR_INVALID_UNSIGNED_INTEGER;\n    }\n}\nexport class InvalidSizeError extends InvalidValueError {\n    constructor(value) {\n        super(value, 'invalid size given.');\n        this.code = ERR_INVALID_SIZE;\n    }\n}\nexport class InvalidLargeValueError extends InvalidValueError {\n    constructor(value) {\n        super(value, 'value is larger than size.');\n        this.code = ERR_INVALID_LARGE_VALUE;\n    }\n}\nexport class InvalidBlockError extends InvalidValueError {\n    constructor(value) {\n        super(value, 'invalid string given');\n        this.code = ERR_INVALID_BLOCK;\n    }\n}\nexport class InvalidTypeAbiInputError extends InvalidValueError {\n    constructor(value) {\n        super(value, 'components found but type is not tuple');\n        this.code = ERR_INVALID_TYPE_ABI;\n    }\n}\n//# sourceMappingURL=utils_errors.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { BaseWeb3Error, MultipleErrors } from '../web3_error_base.js';\nimport { ERR_INVALID_RESPONSE, ERR_RESPONSE } from '../error_codes.js';\n// To avoid circular package dependency, copied to code here. If you update this please update same function in `json_rpc.ts`\nconst isResponseWithError = (response) => !Array.isArray(response) &&\n    response.jsonrpc === '2.0' &&\n    !!response &&\n    // eslint-disable-next-line no-null/no-null\n    (response.result === undefined || response.result === null) &&\n    // JSON RPC consider \"null\" as valid response\n    'error' in response &&\n    (typeof response.id === 'number' || typeof response.id === 'string');\nconst buildErrorMessage = (response) => isResponseWithError(response) ? response.error.message : '';\nexport class ResponseError extends BaseWeb3Error {\n    constructor(response, message, request, statusCode) {\n        var _a;\n        super(message !== null && message !== void 0 ? message : `Returned error: ${Array.isArray(response)\n            ? response.map(r => buildErrorMessage(r)).join(',')\n            : buildErrorMessage(response)}`);\n        this.code = ERR_RESPONSE;\n        if (!message) {\n            this.data = Array.isArray(response)\n                ? response.map(r => { var _a; return (_a = r.error) === null || _a === void 0 ? void 0 : _a.data; })\n                : (_a = response === null || response === void 0 ? void 0 : response.error) === null || _a === void 0 ? void 0 : _a.data;\n        }\n        this.statusCode = statusCode;\n        this.request = request;\n        let errorOrErrors;\n        if (`error` in response) {\n            errorOrErrors = response.error;\n        }\n        else if (response instanceof Array) {\n            errorOrErrors = response.filter(r => r.error).map(r => r.error);\n        }\n        if (Array.isArray(errorOrErrors) && errorOrErrors.length > 0) {\n            this.cause = new MultipleErrors(errorOrErrors);\n        }\n        else {\n            this.cause = errorOrErrors;\n        }\n    }\n    toJSON() {\n        return Object.assign(Object.assign({}, super.toJSON()), { data: this.data, request: this.request, statusCode: this.statusCode });\n    }\n}\nexport class InvalidResponseError extends ResponseError {\n    constructor(result, request) {\n        super(result, undefined, request);\n        this.code = ERR_INVALID_RESPONSE;\n        let errorOrErrors;\n        if (`error` in result) {\n            errorOrErrors = result.error;\n        }\n        else if (result instanceof Array) {\n            errorOrErrors = result.map(r => r.error);\n        }\n        if (Array.isArray(errorOrErrors)) {\n            this.cause = new MultipleErrors(errorOrErrors);\n        }\n        else {\n            this.cause = errorOrErrors;\n        }\n    }\n}\n//# sourceMappingURL=response_errors.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\n/* eslint-disable max-classes-per-file */\nimport { BaseWeb3Error } from '../web3_error_base.js';\nimport { ERR_CORE_HARDFORK_MISMATCH } from '../error_codes.js';\nexport class ConfigHardforkMismatchError extends BaseWeb3Error {\n    constructor(defaultHardfork, commonHardFork) {\n        super(`Web3Config hardfork doesnt match in defaultHardfork ${defaultHardfork} and common.hardfork ${commonHardFork}`);\n        this.code = ERR_CORE_HARDFORK_MISMATCH;\n    }\n}\nexport class ConfigChainMismatchError extends BaseWeb3Error {\n    constructor(defaultHardfork, commonHardFork) {\n        super(`Web3Config chain doesnt match in defaultHardfork ${defaultHardfork} and common.hardfork ${commonHardFork}`);\n        this.code = ERR_CORE_HARDFORK_MISMATCH;\n    }\n}\n//# sourceMappingURL=core_errors.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { ERR_RPC_INTERNAL_ERROR, ERR_RPC_INVALID_INPUT, ERR_RPC_INVALID_JSON, ERR_RPC_INVALID_METHOD, ERR_RPC_INVALID_PARAMS, ERR_RPC_INVALID_REQUEST, ERR_RPC_LIMIT_EXCEEDED, ERR_RPC_MISSING_RESOURCE, ERR_RPC_NOT_SUPPORTED, ERR_RPC_TRANSACTION_REJECTED, ERR_RPC_UNAVAILABLE_RESOURCE, ERR_RPC_UNSUPPORTED_METHOD, JSONRPC_ERR_CHAIN_DISCONNECTED, JSONRPC_ERR_DISCONNECTED, JSONRPC_ERR_REJECTED_REQUEST, JSONRPC_ERR_UNAUTHORIZED, JSONRPC_ERR_UNSUPPORTED_METHOD, } from '../error_codes.js';\n/**\n * A template string for a generic Rpc Error. The `*code*` will be replaced with the code number.\n * Note: consider in next version that a spelling mistake could be corrected for `occured` and the value could be:\n * \t`An Rpc error has occurred with a code of *code*`\n */\nexport const genericRpcErrorMessageTemplate = 'An Rpc error has occured with a code of *code*';\n/* eslint-disable @typescript-eslint/naming-convention */\nexport const RpcErrorMessages = {\n    //  EIP-1474 & JSON RPC 2.0\n    // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1474.md\n    [ERR_RPC_INVALID_JSON]: {\n        message: 'Parse error',\n        description: 'Invalid JSON',\n    },\n    [ERR_RPC_INVALID_REQUEST]: {\n        message: 'Invalid request',\n        description: 'JSON is not a valid request object\t',\n    },\n    [ERR_RPC_INVALID_METHOD]: {\n        message: 'Method not found',\n        description: 'Method does not exist\t',\n    },\n    [ERR_RPC_INVALID_PARAMS]: {\n        message: 'Invalid params',\n        description: 'Invalid method parameters',\n    },\n    [ERR_RPC_INTERNAL_ERROR]: {\n        message: 'Internal error',\n        description: 'Internal JSON-RPC error',\n    },\n    [ERR_RPC_INVALID_INPUT]: {\n        message: 'Invalid input',\n        description: 'Missing or invalid parameters',\n    },\n    [ERR_RPC_MISSING_RESOURCE]: {\n        message: 'Resource not found',\n        description: 'Requested resource not found',\n    },\n    [ERR_RPC_UNAVAILABLE_RESOURCE]: {\n        message: 'Resource unavailable',\n        description: 'Requested resource not available',\n    },\n    [ERR_RPC_TRANSACTION_REJECTED]: {\n        message: 'Transaction rejected',\n        description: 'Transaction creation failed',\n    },\n    [ERR_RPC_UNSUPPORTED_METHOD]: {\n        message: 'Method not supported',\n        description: 'Method is not implemented',\n    },\n    [ERR_RPC_LIMIT_EXCEEDED]: {\n        message: 'Limit exceeded',\n        description: 'Request exceeds defined limit',\n    },\n    [ERR_RPC_NOT_SUPPORTED]: {\n        message: 'JSON-RPC version not supported',\n        description: 'Version of JSON-RPC protocol is not supported',\n    },\n    // EIP-1193\n    // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1193.md#provider-errors\n    [JSONRPC_ERR_REJECTED_REQUEST]: {\n        name: 'User Rejected Request',\n        message: 'The user rejected the request.',\n    },\n    [JSONRPC_ERR_UNAUTHORIZED]: {\n        name: 'Unauthorized',\n        message: 'The requested method and/or account has not been authorized by the user.',\n    },\n    [JSONRPC_ERR_UNSUPPORTED_METHOD]: {\n        name: 'Unsupported Method',\n        message: 'The Provider does not support the requested method.',\n    },\n    [JSONRPC_ERR_DISCONNECTED]: {\n        name: 'Disconnected',\n        message: 'The Provider is disconnected from all chains.',\n    },\n    [JSONRPC_ERR_CHAIN_DISCONNECTED]: {\n        name: 'Chain Disconnected',\n        message: 'The Provider is not connected to the requested chain.',\n    },\n    // EIP-1193 - CloseEvent\n    // https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent/code\n    '0-999': {\n        name: '',\n        message: 'Not used.',\n    },\n    1000: {\n        name: 'Normal Closure',\n        message: 'The connection successfully completed the purpose for which it was created.',\n    },\n    1001: {\n        name: 'Going Away',\n        message: 'The endpoint is going away, either because of a server failure or because the browser is navigating away from the page that opened the connection.',\n    },\n    1002: {\n        name: 'Protocol error',\n        message: 'The endpoint is terminating the connection due to a protocol error.',\n    },\n    1003: {\n        name: 'Unsupported Data',\n        message: 'The connection is being terminated because the endpoint received data of a type it cannot accept. (For example, a text-only endpoint received binary data.)',\n    },\n    1004: {\n        name: 'Reserved',\n        message: 'Reserved. A meaning might be defined in the future.',\n    },\n    1005: {\n        name: 'No Status Rcvd',\n        message: 'Reserved. Indicates that no status code was provided even though one was expected.',\n    },\n    1006: {\n        name: 'Abnormal Closure',\n        message: 'Reserved. Indicates that a connection was closed abnormally (that is, with no close frame being sent) when a status code is expected.',\n    },\n    1007: {\n        name: 'Invalid frame payload data',\n        message: 'The endpoint is terminating the connection because a message was received that contained inconsistent data (e.g., non-UTF-8 data within a text message).',\n    },\n    1008: {\n        name: 'Policy Violation',\n        message: 'The endpoint is terminating the connection because it received a message that violates its policy. This is a generic status code, used when codes 1003 and 1009 are not suitable.',\n    },\n    1009: {\n        name: 'Message Too Big',\n        message: 'The endpoint is terminating the connection because a data frame was received that is too large.',\n    },\n    1010: {\n        name: 'Mandatory Ext.',\n        message: \"The client is terminating the connection because it expected the server to negotiate one or more extension, but the server didn't.\",\n    },\n    1011: {\n        name: 'Internal Error',\n        message: 'The server is terminating the connection because it encountered an unexpected condition that prevented it from fulfilling the request.',\n    },\n    1012: {\n        name: 'Service Restart',\n        message: 'The server is terminating the connection because it is restarting.',\n    },\n    1013: {\n        name: 'Try Again Later',\n        message: 'The server is terminating the connection due to a temporary condition, e.g. it is overloaded and is casting off some of its clients.',\n    },\n    1014: {\n        name: 'Bad Gateway',\n        message: 'The server was acting as a gateway or proxy and received an invalid response from the upstream server. This is similar to 502 HTTP Status Code.',\n    },\n    1015: {\n        name: 'TLS handshake',\n        message: \"Reserved. Indicates that the connection was closed due to a failure to perform a TLS handshake (e.g., the server certificate can't be verified).\",\n    },\n    '1016-2999': {\n        name: '',\n        message: 'For definition by future revisions of the WebSocket Protocol specification, and for definition by extension specifications.',\n    },\n    '3000-3999': {\n        name: '',\n        message: 'For use by libraries, frameworks, and applications. These status codes are registered directly with IANA. The interpretation of these codes is undefined by the WebSocket protocol.',\n    },\n    '4000-4999': {\n        name: '',\n        message: \"For private use, and thus can't be registered. Such codes can be used by prior agreements between WebSocket applications. The interpretation of these codes is undefined by the WebSocket protocol.\",\n    },\n};\n//# sourceMappingURL=rpc_error_messages.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { BaseWeb3Error } from '../web3_error_base.js';\nimport { ERR_RPC_INTERNAL_ERROR, ERR_RPC_INVALID_INPUT, ERR_RPC_INVALID_JSON, ERR_RPC_INVALID_METHOD, ERR_RPC_INVALID_PARAMS, ERR_RPC_INVALID_REQUEST, ERR_RPC_LIMIT_EXCEEDED, ERR_RPC_MISSING_RESOURCE, ERR_RPC_NOT_SUPPORTED, ERR_RPC_TRANSACTION_REJECTED, ERR_RPC_UNAVAILABLE_RESOURCE, ERR_RPC_UNSUPPORTED_METHOD, } from '../error_codes.js';\nimport { RpcErrorMessages, genericRpcErrorMessageTemplate } from './rpc_error_messages.js';\nexport class RpcError extends BaseWeb3Error {\n    constructor(rpcError, message) {\n        super(message !== null && message !== void 0 ? message : genericRpcErrorMessageTemplate.replace('*code*', rpcError.error.code.toString()));\n        this.code = rpcError.error.code;\n        this.id = rpcError.id;\n        this.jsonrpc = rpcError.jsonrpc;\n        this.jsonRpcError = rpcError.error;\n    }\n    toJSON() {\n        return Object.assign(Object.assign({}, super.toJSON()), { error: this.jsonRpcError, id: this.id, jsonRpc: this.jsonrpc });\n    }\n}\nexport class EIP1193ProviderRpcError extends BaseWeb3Error {\n    constructor(code, data) {\n        var _a, _b, _c, _d;\n        if (!code) {\n            // this case should ideally not happen\n            super();\n        }\n        else if ((_a = RpcErrorMessages[code]) === null || _a === void 0 ? void 0 : _a.message) {\n            super(RpcErrorMessages[code].message);\n        }\n        else {\n            // Retrieve the status code object for the given code from the table, by searching through the appropriate range\n            const statusCodeRange = Object.keys(RpcErrorMessages).find(statusCode => typeof statusCode === 'string' &&\n                code >= parseInt(statusCode.split('-')[0], 10) &&\n                code <= parseInt(statusCode.split('-')[1], 10));\n            super((_c = (_b = RpcErrorMessages[statusCodeRange !== null && statusCodeRange !== void 0 ? statusCodeRange : '']) === null || _b === void 0 ? void 0 : _b.message) !== null && _c !== void 0 ? _c : genericRpcErrorMessageTemplate.replace('*code*', (_d = code === null || code === void 0 ? void 0 : code.toString()) !== null && _d !== void 0 ? _d : '\"\"'));\n        }\n        this.code = code;\n        this.data = data;\n    }\n}\nexport class ParseError extends RpcError {\n    constructor(rpcError) {\n        super(rpcError, RpcErrorMessages[ERR_RPC_INVALID_JSON].message);\n        this.code = ERR_RPC_INVALID_JSON;\n    }\n}\nexport class InvalidRequestError extends RpcError {\n    constructor(rpcError) {\n        super(rpcError, RpcErrorMessages[ERR_RPC_INVALID_REQUEST].message);\n        this.code = ERR_RPC_INVALID_REQUEST;\n    }\n}\nexport class MethodNotFoundError extends RpcError {\n    constructor(rpcError) {\n        super(rpcError, RpcErrorMessages[ERR_RPC_INVALID_METHOD].message);\n        this.code = ERR_RPC_INVALID_METHOD;\n    }\n}\nexport class InvalidParamsError extends RpcError {\n    constructor(rpcError) {\n        super(rpcError, RpcErrorMessages[ERR_RPC_INVALID_PARAMS].message);\n        this.code = ERR_RPC_INVALID_PARAMS;\n    }\n}\nexport class InternalError extends RpcError {\n    constructor(rpcError) {\n        super(rpcError, RpcErrorMessages[ERR_RPC_INTERNAL_ERROR].message);\n        this.code = ERR_RPC_INTERNAL_ERROR;\n    }\n}\nexport class InvalidInputError extends RpcError {\n    constructor(rpcError) {\n        super(rpcError, RpcErrorMessages[ERR_RPC_INVALID_INPUT].message);\n        this.code = ERR_RPC_INVALID_INPUT;\n    }\n}\nexport class MethodNotSupported extends RpcError {\n    constructor(rpcError) {\n        super(rpcError, RpcErrorMessages[ERR_RPC_UNSUPPORTED_METHOD].message);\n        this.code = ERR_RPC_UNSUPPORTED_METHOD;\n    }\n}\nexport class ResourceUnavailableError extends RpcError {\n    constructor(rpcError) {\n        super(rpcError, RpcErrorMessages[ERR_RPC_UNAVAILABLE_RESOURCE].message);\n        this.code = ERR_RPC_UNAVAILABLE_RESOURCE;\n    }\n}\nexport class ResourcesNotFoundError extends RpcError {\n    constructor(rpcError) {\n        super(rpcError, RpcErrorMessages[ERR_RPC_MISSING_RESOURCE].message);\n        this.code = ERR_RPC_MISSING_RESOURCE;\n    }\n}\nexport class VersionNotSupportedError extends RpcError {\n    constructor(rpcError) {\n        super(rpcError, RpcErrorMessages[ERR_RPC_NOT_SUPPORTED].message);\n        this.code = ERR_RPC_NOT_SUPPORTED;\n    }\n}\nexport class TransactionRejectedError extends RpcError {\n    constructor(rpcError) {\n        super(rpcError, RpcErrorMessages[ERR_RPC_TRANSACTION_REJECTED].message);\n        this.code = ERR_RPC_TRANSACTION_REJECTED;\n    }\n}\nexport class LimitExceededError extends RpcError {\n    constructor(rpcError) {\n        super(rpcError, RpcErrorMessages[ERR_RPC_LIMIT_EXCEEDED].message);\n        this.code = ERR_RPC_LIMIT_EXCEEDED;\n    }\n}\nexport const rpcErrorsMap = new Map();\nrpcErrorsMap.set(ERR_RPC_INVALID_JSON, { error: ParseError });\nrpcErrorsMap.set(ERR_RPC_INVALID_REQUEST, {\n    error: InvalidRequestError,\n});\nrpcErrorsMap.set(ERR_RPC_INVALID_METHOD, {\n    error: MethodNotFoundError,\n});\nrpcErrorsMap.set(ERR_RPC_INVALID_PARAMS, { error: InvalidParamsError });\nrpcErrorsMap.set(ERR_RPC_INTERNAL_ERROR, { error: InternalError });\nrpcErrorsMap.set(ERR_RPC_INVALID_INPUT, { error: InvalidInputError });\nrpcErrorsMap.set(ERR_RPC_UNSUPPORTED_METHOD, {\n    error: MethodNotSupported,\n});\nrpcErrorsMap.set(ERR_RPC_UNAVAILABLE_RESOURCE, {\n    error: ResourceUnavailableError,\n});\nrpcErrorsMap.set(ERR_RPC_TRANSACTION_REJECTED, {\n    error: TransactionRejectedError,\n});\nrpcErrorsMap.set(ERR_RPC_MISSING_RESOURCE, {\n    error: ResourcesNotFoundError,\n});\nrpcErrorsMap.set(ERR_RPC_NOT_SUPPORTED, {\n    error: VersionNotSupportedError,\n});\nrpcErrorsMap.set(ERR_RPC_LIMIT_EXCEEDED, { error: LimitExceededError });\n//# sourceMappingURL=rpc_errors.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { ERR_SCHEMA_FORMAT } from '../error_codes.js';\nimport { BaseWeb3Error } from '../web3_error_base.js';\nexport class SchemaFormatError extends BaseWeb3Error {\n    constructor(type) {\n        super(`Format for the type ${type} is unsupported`);\n        this.type = type;\n        this.code = ERR_SCHEMA_FORMAT;\n    }\n    toJSON() {\n        return Object.assign(Object.assign({}, super.toJSON()), { type: this.type });\n    }\n}\n//# sourceMappingURL=schema_errors.js.map","function number(n) {\n    if (!Number.isSafeInteger(n) || n < 0)\n        throw new Error(`positive integer expected, not ${n}`);\n}\nfunction bool(b) {\n    if (typeof b !== 'boolean')\n        throw new Error(`boolean expected, not ${b}`);\n}\n// copied from utils\nexport function isBytes(a) {\n    return (a instanceof Uint8Array ||\n        (a != null && typeof a === 'object' && a.constructor.name === 'Uint8Array'));\n}\nfunction bytes(b, ...lengths) {\n    if (!isBytes(b))\n        throw new Error('Uint8Array expected');\n    if (lengths.length > 0 && !lengths.includes(b.length))\n        throw new Error(`Uint8Array expected of length ${lengths}, not of length=${b.length}`);\n}\nfunction hash(h) {\n    if (typeof h !== 'function' || typeof h.create !== 'function')\n        throw new Error('Hash should be wrapped by utils.wrapConstructor');\n    number(h.outputLen);\n    number(h.blockLen);\n}\nfunction exists(instance, checkFinished = true) {\n    if (instance.destroyed)\n        throw new Error('Hash instance has been destroyed');\n    if (checkFinished && instance.finished)\n        throw new Error('Hash#digest() has already been called');\n}\nfunction output(out, instance) {\n    bytes(out);\n    const min = instance.outputLen;\n    if (out.length < min) {\n        throw new Error(`digestInto() expects output buffer of length at least ${min}`);\n    }\n}\nexport { number, bool, bytes, hash, exists, output };\nconst assert = { number, bool, bytes, hash, exists, output };\nexport default assert;\n//# sourceMappingURL=_assert.js.map","const U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);\nconst _32n = /* @__PURE__ */ BigInt(32);\n// We are not using BigUint64Array, because they are extremely slow as per 2022\nfunction fromBig(n, le = false) {\n    if (le)\n        return { h: Number(n & U32_MASK64), l: Number((n >> _32n) & U32_MASK64) };\n    return { h: Number((n >> _32n) & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };\n}\nfunction split(lst, le = false) {\n    let Ah = new Uint32Array(lst.length);\n    let Al = new Uint32Array(lst.length);\n    for (let i = 0; i < lst.length; i++) {\n        const { h, l } = fromBig(lst[i], le);\n        [Ah[i], Al[i]] = [h, l];\n    }\n    return [Ah, Al];\n}\nconst toBig = (h, l) => (BigInt(h >>> 0) << _32n) | BigInt(l >>> 0);\n// for Shift in [0, 32)\nconst shrSH = (h, _l, s) => h >>> s;\nconst shrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in [1, 32)\nconst rotrSH = (h, l, s) => (h >>> s) | (l << (32 - s));\nconst rotrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotrBH = (h, l, s) => (h << (64 - s)) | (l >>> (s - 32));\nconst rotrBL = (h, l, s) => (h >>> (s - 32)) | (l << (64 - s));\n// Right rotate for shift===32 (just swaps l&h)\nconst rotr32H = (_h, l) => l;\nconst rotr32L = (h, _l) => h;\n// Left rotate for Shift in [1, 32)\nconst rotlSH = (h, l, s) => (h << s) | (l >>> (32 - s));\nconst rotlSL = (h, l, s) => (l << s) | (h >>> (32 - s));\n// Left rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotlBH = (h, l, s) => (l << (s - 32)) | (h >>> (64 - s));\nconst rotlBL = (h, l, s) => (h << (s - 32)) | (l >>> (64 - s));\n// JS uses 32-bit signed integers for bitwise operations which means we cannot\n// simple take carry out of low bit sum by shift, we need to use division.\nfunction add(Ah, Al, Bh, Bl) {\n    const l = (Al >>> 0) + (Bl >>> 0);\n    return { h: (Ah + Bh + ((l / 2 ** 32) | 0)) | 0, l: l | 0 };\n}\n// Addition with more than 2 elements\nconst add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);\nconst add3H = (low, Ah, Bh, Ch) => (Ah + Bh + Ch + ((low / 2 ** 32) | 0)) | 0;\nconst add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);\nconst add4H = (low, Ah, Bh, Ch, Dh) => (Ah + Bh + Ch + Dh + ((low / 2 ** 32) | 0)) | 0;\nconst add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);\nconst add5H = (low, Ah, Bh, Ch, Dh, Eh) => (Ah + Bh + Ch + Dh + Eh + ((low / 2 ** 32) | 0)) | 0;\n// prettier-ignore\nexport { fromBig, split, toBig, shrSH, shrSL, rotrSH, rotrSL, rotrBH, rotrBL, rotr32H, rotr32L, rotlSH, rotlSL, rotlBH, rotlBL, add, add3L, add3H, add4L, add4H, add5H, add5L, };\n// prettier-ignore\nconst u64 = {\n    fromBig, split, toBig,\n    shrSH, shrSL,\n    rotrSH, rotrSL, rotrBH, rotrBL,\n    rotr32H, rotr32L,\n    rotlSH, rotlSL, rotlBH, rotlBL,\n    add, add3L, add3H, add4L, add4H, add5H, add5L,\n};\nexport default u64;\n//# sourceMappingURL=_u64.js.map","export const crypto = typeof globalThis === 'object' && 'crypto' in globalThis ? globalThis.crypto : undefined;\n//# sourceMappingURL=crypto.js.map","/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// We use WebCrypto aka globalThis.crypto, which exists in browsers and node.js 16+.\n// node.js versions earlier than v19 don't declare it in global scope.\n// For node.js, package.json#exports field mapping rewrites import\n// from `crypto` to `cryptoNode`, which imports native module.\n// Makes the utils un-importable in browsers without a bundler.\n// Once node.js 18 is deprecated (2025-04-30), we can just drop the import.\nimport { crypto } from '@noble/hashes/crypto';\nimport { bytes as abytes } from './_assert.js';\n// export { isBytes } from './_assert.js';\n// We can't reuse isBytes from _assert, because somehow this causes huge perf issues\nexport function isBytes(a) {\n    return (a instanceof Uint8Array ||\n        (a != null && typeof a === 'object' && a.constructor.name === 'Uint8Array'));\n}\n// Cast array to different type\nexport const u8 = (arr) => new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);\nexport const u32 = (arr) => new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n// Cast array to view\nexport const createView = (arr) => new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n// The rotate right (circular right shift) operation for uint32\nexport const rotr = (word, shift) => (word << (32 - shift)) | (word >>> shift);\n// The rotate left (circular left shift) operation for uint32\nexport const rotl = (word, shift) => (word << shift) | ((word >>> (32 - shift)) >>> 0);\nexport const isLE = new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44;\n// The byte swap operation for uint32\nexport const byteSwap = (word) => ((word << 24) & 0xff000000) |\n    ((word << 8) & 0xff0000) |\n    ((word >>> 8) & 0xff00) |\n    ((word >>> 24) & 0xff);\n// Conditionally byte swap if on a big-endian platform\nexport const byteSwapIfBE = isLE ? (n) => n : (n) => byteSwap(n);\n// In place byte swap for Uint32Array\nexport function byteSwap32(arr) {\n    for (let i = 0; i < arr.length; i++) {\n        arr[i] = byteSwap(arr[i]);\n    }\n}\n// Array where index 0xf0 (240) is mapped to string 'f0'\nconst hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, '0'));\n/**\n * @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'\n */\nexport function bytesToHex(bytes) {\n    abytes(bytes);\n    // pre-caching improves the speed 6x\n    let hex = '';\n    for (let i = 0; i < bytes.length; i++) {\n        hex += hexes[bytes[i]];\n    }\n    return hex;\n}\n// We use optimized technique to convert hex string to byte array\nconst asciis = { _0: 48, _9: 57, _A: 65, _F: 70, _a: 97, _f: 102 };\nfunction asciiToBase16(char) {\n    if (char >= asciis._0 && char <= asciis._9)\n        return char - asciis._0;\n    if (char >= asciis._A && char <= asciis._F)\n        return char - (asciis._A - 10);\n    if (char >= asciis._a && char <= asciis._f)\n        return char - (asciis._a - 10);\n    return;\n}\n/**\n * @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])\n */\nexport function hexToBytes(hex) {\n    if (typeof hex !== 'string')\n        throw new Error('hex string expected, got ' + typeof hex);\n    const hl = hex.length;\n    const al = hl / 2;\n    if (hl % 2)\n        throw new Error('padded hex string expected, got unpadded hex of length ' + hl);\n    const array = new Uint8Array(al);\n    for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {\n        const n1 = asciiToBase16(hex.charCodeAt(hi));\n        const n2 = asciiToBase16(hex.charCodeAt(hi + 1));\n        if (n1 === undefined || n2 === undefined) {\n            const char = hex[hi] + hex[hi + 1];\n            throw new Error('hex string expected, got non-hex character \"' + char + '\" at index ' + hi);\n        }\n        array[ai] = n1 * 16 + n2;\n    }\n    return array;\n}\n// There is no setImmediate in browser and setTimeout is slow.\n// call of async fn will return Promise, which will be fullfiled only on\n// next scheduler queue processing step and this is exactly what we need.\nexport const nextTick = async () => { };\n// Returns control to thread each 'tick' ms to avoid blocking\nexport async function asyncLoop(iters, tick, cb) {\n    let ts = Date.now();\n    for (let i = 0; i < iters; i++) {\n        cb(i);\n        // Date.now() is not monotonic, so in case if clock goes backwards we return return control too\n        const diff = Date.now() - ts;\n        if (diff >= 0 && diff < tick)\n            continue;\n        await nextTick();\n        ts += diff;\n    }\n}\n/**\n * @example utf8ToBytes('abc') // new Uint8Array([97, 98, 99])\n */\nexport function utf8ToBytes(str) {\n    if (typeof str !== 'string')\n        throw new Error(`utf8ToBytes expected string, got ${typeof str}`);\n    return new Uint8Array(new TextEncoder().encode(str)); // https://bugzil.la/1681809\n}\n/**\n * Normalizes (non-hex) string or Uint8Array to Uint8Array.\n * Warning: when Uint8Array is passed, it would NOT get copied.\n * Keep in mind for future mutable operations.\n */\nexport function toBytes(data) {\n    if (typeof data === 'string')\n        data = utf8ToBytes(data);\n    abytes(data);\n    return data;\n}\n/**\n * Copies several Uint8Arrays into one.\n */\nexport function concatBytes(...arrays) {\n    let sum = 0;\n    for (let i = 0; i < arrays.length; i++) {\n        const a = arrays[i];\n        abytes(a);\n        sum += a.length;\n    }\n    const res = new Uint8Array(sum);\n    for (let i = 0, pad = 0; i < arrays.length; i++) {\n        const a = arrays[i];\n        res.set(a, pad);\n        pad += a.length;\n    }\n    return res;\n}\n// For runtime check if class implements interface\nexport class Hash {\n    // Safe version that clones internal state\n    clone() {\n        return this._cloneInto();\n    }\n}\nconst toStr = {}.toString;\nexport function checkOpts(defaults, opts) {\n    if (opts !== undefined && toStr.call(opts) !== '[object Object]')\n        throw new Error('Options should be object or undefined');\n    const merged = Object.assign(defaults, opts);\n    return merged;\n}\nexport function wrapConstructor(hashCons) {\n    const hashC = (msg) => hashCons().update(toBytes(msg)).digest();\n    const tmp = hashCons();\n    hashC.outputLen = tmp.outputLen;\n    hashC.blockLen = tmp.blockLen;\n    hashC.create = () => hashCons();\n    return hashC;\n}\nexport function wrapConstructorWithOpts(hashCons) {\n    const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n    const tmp = hashCons({});\n    hashC.outputLen = tmp.outputLen;\n    hashC.blockLen = tmp.blockLen;\n    hashC.create = (opts) => hashCons(opts);\n    return hashC;\n}\nexport function wrapXOFConstructorWithOpts(hashCons) {\n    const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n    const tmp = hashCons({});\n    hashC.outputLen = tmp.outputLen;\n    hashC.blockLen = tmp.blockLen;\n    hashC.create = (opts) => hashCons(opts);\n    return hashC;\n}\n/**\n * Secure PRNG. Uses `crypto.getRandomValues`, which defers to OS.\n */\nexport function randomBytes(bytesLength = 32) {\n    if (crypto && typeof crypto.getRandomValues === 'function') {\n        return crypto.getRandomValues(new Uint8Array(bytesLength));\n    }\n    throw new Error('crypto.getRandomValues must be defined');\n}\n//# sourceMappingURL=utils.js.map","import { bytes, exists, number, output } from './_assert.js';\nimport { rotlBH, rotlBL, rotlSH, rotlSL, split } from './_u64.js';\nimport { Hash, u32, toBytes, wrapConstructor, wrapXOFConstructorWithOpts, isLE, byteSwap32, } from './utils.js';\n// SHA3 (keccak) is based on a new design: basically, the internal state is bigger than output size.\n// It's called a sponge function.\n// Various per round constants calculations\nconst SHA3_PI = [];\nconst SHA3_ROTL = [];\nconst _SHA3_IOTA = [];\nconst _0n = /* @__PURE__ */ BigInt(0);\nconst _1n = /* @__PURE__ */ BigInt(1);\nconst _2n = /* @__PURE__ */ BigInt(2);\nconst _7n = /* @__PURE__ */ BigInt(7);\nconst _256n = /* @__PURE__ */ BigInt(256);\nconst _0x71n = /* @__PURE__ */ BigInt(0x71);\nfor (let round = 0, R = _1n, x = 1, y = 0; round < 24; round++) {\n    // Pi\n    [x, y] = [y, (2 * x + 3 * y) % 5];\n    SHA3_PI.push(2 * (5 * y + x));\n    // Rotational\n    SHA3_ROTL.push((((round + 1) * (round + 2)) / 2) % 64);\n    // Iota\n    let t = _0n;\n    for (let j = 0; j < 7; j++) {\n        R = ((R << _1n) ^ ((R >> _7n) * _0x71n)) % _256n;\n        if (R & _2n)\n            t ^= _1n << ((_1n << /* @__PURE__ */ BigInt(j)) - _1n);\n    }\n    _SHA3_IOTA.push(t);\n}\nconst [SHA3_IOTA_H, SHA3_IOTA_L] = /* @__PURE__ */ split(_SHA3_IOTA, true);\n// Left rotation (without 0, 32, 64)\nconst rotlH = (h, l, s) => (s > 32 ? rotlBH(h, l, s) : rotlSH(h, l, s));\nconst rotlL = (h, l, s) => (s > 32 ? rotlBL(h, l, s) : rotlSL(h, l, s));\n// Same as keccakf1600, but allows to skip some rounds\nexport function keccakP(s, rounds = 24) {\n    const B = new Uint32Array(5 * 2);\n    // NOTE: all indices are x2 since we store state as u32 instead of u64 (bigints to slow in js)\n    for (let round = 24 - rounds; round < 24; round++) {\n        // Theta θ\n        for (let x = 0; x < 10; x++)\n            B[x] = s[x] ^ s[x + 10] ^ s[x + 20] ^ s[x + 30] ^ s[x + 40];\n        for (let x = 0; x < 10; x += 2) {\n            const idx1 = (x + 8) % 10;\n            const idx0 = (x + 2) % 10;\n            const B0 = B[idx0];\n            const B1 = B[idx0 + 1];\n            const Th = rotlH(B0, B1, 1) ^ B[idx1];\n            const Tl = rotlL(B0, B1, 1) ^ B[idx1 + 1];\n            for (let y = 0; y < 50; y += 10) {\n                s[x + y] ^= Th;\n                s[x + y + 1] ^= Tl;\n            }\n        }\n        // Rho (ρ) and Pi (π)\n        let curH = s[2];\n        let curL = s[3];\n        for (let t = 0; t < 24; t++) {\n            const shift = SHA3_ROTL[t];\n            const Th = rotlH(curH, curL, shift);\n            const Tl = rotlL(curH, curL, shift);\n            const PI = SHA3_PI[t];\n            curH = s[PI];\n            curL = s[PI + 1];\n            s[PI] = Th;\n            s[PI + 1] = Tl;\n        }\n        // Chi (χ)\n        for (let y = 0; y < 50; y += 10) {\n            for (let x = 0; x < 10; x++)\n                B[x] = s[y + x];\n            for (let x = 0; x < 10; x++)\n                s[y + x] ^= ~B[(x + 2) % 10] & B[(x + 4) % 10];\n        }\n        // Iota (ι)\n        s[0] ^= SHA3_IOTA_H[round];\n        s[1] ^= SHA3_IOTA_L[round];\n    }\n    B.fill(0);\n}\nexport class Keccak extends Hash {\n    // NOTE: we accept arguments in bytes instead of bits here.\n    constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {\n        super();\n        this.blockLen = blockLen;\n        this.suffix = suffix;\n        this.outputLen = outputLen;\n        this.enableXOF = enableXOF;\n        this.rounds = rounds;\n        this.pos = 0;\n        this.posOut = 0;\n        this.finished = false;\n        this.destroyed = false;\n        // Can be passed from user as dkLen\n        number(outputLen);\n        // 1600 = 5x5 matrix of 64bit.  1600 bits === 200 bytes\n        if (0 >= this.blockLen || this.blockLen >= 200)\n            throw new Error('Sha3 supports only keccak-f1600 function');\n        this.state = new Uint8Array(200);\n        this.state32 = u32(this.state);\n    }\n    keccak() {\n        if (!isLE)\n            byteSwap32(this.state32);\n        keccakP(this.state32, this.rounds);\n        if (!isLE)\n            byteSwap32(this.state32);\n        this.posOut = 0;\n        this.pos = 0;\n    }\n    update(data) {\n        exists(this);\n        const { blockLen, state } = this;\n        data = toBytes(data);\n        const len = data.length;\n        for (let pos = 0; pos < len;) {\n            const take = Math.min(blockLen - this.pos, len - pos);\n            for (let i = 0; i < take; i++)\n                state[this.pos++] ^= data[pos++];\n            if (this.pos === blockLen)\n                this.keccak();\n        }\n        return this;\n    }\n    finish() {\n        if (this.finished)\n            return;\n        this.finished = true;\n        const { state, suffix, pos, blockLen } = this;\n        // Do the padding\n        state[pos] ^= suffix;\n        if ((suffix & 0x80) !== 0 && pos === blockLen - 1)\n            this.keccak();\n        state[blockLen - 1] ^= 0x80;\n        this.keccak();\n    }\n    writeInto(out) {\n        exists(this, false);\n        bytes(out);\n        this.finish();\n        const bufferOut = this.state;\n        const { blockLen } = this;\n        for (let pos = 0, len = out.length; pos < len;) {\n            if (this.posOut >= blockLen)\n                this.keccak();\n            const take = Math.min(blockLen - this.posOut, len - pos);\n            out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);\n            this.posOut += take;\n            pos += take;\n        }\n        return out;\n    }\n    xofInto(out) {\n        // Sha3/Keccak usage with XOF is probably mistake, only SHAKE instances can do XOF\n        if (!this.enableXOF)\n            throw new Error('XOF is not possible for this instance');\n        return this.writeInto(out);\n    }\n    xof(bytes) {\n        number(bytes);\n        return this.xofInto(new Uint8Array(bytes));\n    }\n    digestInto(out) {\n        output(out, this);\n        if (this.finished)\n            throw new Error('digest() was already called');\n        this.writeInto(out);\n        this.destroy();\n        return out;\n    }\n    digest() {\n        return this.digestInto(new Uint8Array(this.outputLen));\n    }\n    destroy() {\n        this.destroyed = true;\n        this.state.fill(0);\n    }\n    _cloneInto(to) {\n        const { blockLen, suffix, outputLen, rounds, enableXOF } = this;\n        to || (to = new Keccak(blockLen, suffix, outputLen, enableXOF, rounds));\n        to.state32.set(this.state32);\n        to.pos = this.pos;\n        to.posOut = this.posOut;\n        to.finished = this.finished;\n        to.rounds = rounds;\n        // Suffix can change in cSHAKE\n        to.suffix = suffix;\n        to.outputLen = outputLen;\n        to.enableXOF = enableXOF;\n        to.destroyed = this.destroyed;\n        return to;\n    }\n}\nconst gen = (suffix, blockLen, outputLen) => wrapConstructor(() => new Keccak(blockLen, suffix, outputLen));\nexport const sha3_224 = /* @__PURE__ */ gen(0x06, 144, 224 / 8);\n/**\n * SHA3-256 hash function\n * @param message - that would be hashed\n */\nexport const sha3_256 = /* @__PURE__ */ gen(0x06, 136, 256 / 8);\nexport const sha3_384 = /* @__PURE__ */ gen(0x06, 104, 384 / 8);\nexport const sha3_512 = /* @__PURE__ */ gen(0x06, 72, 512 / 8);\nexport const keccak_224 = /* @__PURE__ */ gen(0x01, 144, 224 / 8);\n/**\n * keccak-256 hash function. Different from SHA3-256.\n * @param message - that would be hashed\n */\nexport const keccak_256 = /* @__PURE__ */ gen(0x01, 136, 256 / 8);\nexport const keccak_384 = /* @__PURE__ */ gen(0x01, 104, 384 / 8);\nexport const keccak_512 = /* @__PURE__ */ gen(0x01, 72, 512 / 8);\nconst genShake = (suffix, blockLen, outputLen) => wrapXOFConstructorWithOpts((opts = {}) => new Keccak(blockLen, suffix, opts.dkLen === undefined ? outputLen : opts.dkLen, true));\nexport const shake128 = /* @__PURE__ */ genShake(0x1f, 168, 128 / 8);\nexport const shake256 = /* @__PURE__ */ genShake(0x1f, 136, 256 / 8);\n//# sourceMappingURL=sha3.js.map","import assert from \"@noble/hashes/_assert\";\nimport { hexToBytes as _hexToBytes } from \"@noble/hashes/utils\";\nconst assertBool = assert.bool;\nconst assertBytes = assert.bytes;\nexport { assertBool, assertBytes };\nexport { bytesToHex, bytesToHex as toHex, concatBytes, createView, utf8ToBytes } from \"@noble/hashes/utils\";\n// buf.toString('utf8') -> bytesToUtf8(buf)\nexport function bytesToUtf8(data) {\n    if (!(data instanceof Uint8Array)) {\n        throw new TypeError(`bytesToUtf8 expected Uint8Array, got ${typeof data}`);\n    }\n    return new TextDecoder().decode(data);\n}\nexport function hexToBytes(data) {\n    const sliced = data.startsWith(\"0x\") ? data.substring(2) : data;\n    return _hexToBytes(sliced);\n}\n// buf.equals(buf2) -> equalsBytes(buf, buf2)\nexport function equalsBytes(a, b) {\n    if (a.length !== b.length) {\n        return false;\n    }\n    for (let i = 0; i < a.length; i++) {\n        if (a[i] !== b[i]) {\n            return false;\n        }\n    }\n    return true;\n}\n// Internal utils\nexport function wrapHash(hash) {\n    return (msg) => {\n        assert.bytes(msg);\n        return hash(msg);\n    };\n}\n// TODO(v3): switch away from node crypto, remove this unnecessary variable.\nexport const crypto = (() => {\n    const webCrypto = typeof globalThis === \"object\" && \"crypto\" in globalThis ? globalThis.crypto : undefined;\n    const nodeRequire = typeof module !== \"undefined\" &&\n        typeof module.require === \"function\" &&\n        module.require.bind(module);\n    return {\n        node: nodeRequire && !webCrypto ? nodeRequire(\"crypto\") : undefined,\n        web: webCrypto\n    };\n})();\n","import { keccak_224, keccak_256, keccak_384, keccak_512 } from \"@noble/hashes/sha3\";\nimport { wrapHash } from \"./utils.js\";\nexport const keccak224 = wrapHash(keccak_224);\nexport const keccak256 = (() => {\n    const k = wrapHash(keccak_256);\n    k.create = keccak_256.create;\n    return k;\n})();\nexport const keccak384 = wrapHash(keccak_384);\nexport const keccak512 = wrapHash(keccak_512);\n","var util;\n(function (util) {\n    util.assertEqual = (val) => val;\n    function assertIs(_arg) { }\n    util.assertIs = assertIs;\n    function assertNever(_x) {\n        throw new Error();\n    }\n    util.assertNever = assertNever;\n    util.arrayToEnum = (items) => {\n        const obj = {};\n        for (const item of items) {\n            obj[item] = item;\n        }\n        return obj;\n    };\n    util.getValidEnumValues = (obj) => {\n        const validKeys = util.objectKeys(obj).filter((k) => typeof obj[obj[k]] !== \"number\");\n        const filtered = {};\n        for (const k of validKeys) {\n            filtered[k] = obj[k];\n        }\n        return util.objectValues(filtered);\n    };\n    util.objectValues = (obj) => {\n        return util.objectKeys(obj).map(function (e) {\n            return obj[e];\n        });\n    };\n    util.objectKeys = typeof Object.keys === \"function\" // eslint-disable-line ban/ban\n        ? (obj) => Object.keys(obj) // eslint-disable-line ban/ban\n        : (object) => {\n            const keys = [];\n            for (const key in object) {\n                if (Object.prototype.hasOwnProperty.call(object, key)) {\n                    keys.push(key);\n                }\n            }\n            return keys;\n        };\n    util.find = (arr, checker) => {\n        for (const item of arr) {\n            if (checker(item))\n                return item;\n        }\n        return undefined;\n    };\n    util.isInteger = typeof Number.isInteger === \"function\"\n        ? (val) => Number.isInteger(val) // eslint-disable-line ban/ban\n        : (val) => typeof val === \"number\" && isFinite(val) && Math.floor(val) === val;\n    function joinValues(array, separator = \" | \") {\n        return array\n            .map((val) => (typeof val === \"string\" ? `'${val}'` : val))\n            .join(separator);\n    }\n    util.joinValues = joinValues;\n    util.jsonStringifyReplacer = (_, value) => {\n        if (typeof value === \"bigint\") {\n            return value.toString();\n        }\n        return value;\n    };\n})(util || (util = {}));\nvar objectUtil;\n(function (objectUtil) {\n    objectUtil.mergeShapes = (first, second) => {\n        return {\n            ...first,\n            ...second, // second overwrites first\n        };\n    };\n})(objectUtil || (objectUtil = {}));\nconst ZodParsedType = util.arrayToEnum([\n    \"string\",\n    \"nan\",\n    \"number\",\n    \"integer\",\n    \"float\",\n    \"boolean\",\n    \"date\",\n    \"bigint\",\n    \"symbol\",\n    \"function\",\n    \"undefined\",\n    \"null\",\n    \"array\",\n    \"object\",\n    \"unknown\",\n    \"promise\",\n    \"void\",\n    \"never\",\n    \"map\",\n    \"set\",\n]);\nconst getParsedType = (data) => {\n    const t = typeof data;\n    switch (t) {\n        case \"undefined\":\n            return ZodParsedType.undefined;\n        case \"string\":\n            return ZodParsedType.string;\n        case \"number\":\n            return isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;\n        case \"boolean\":\n            return ZodParsedType.boolean;\n        case \"function\":\n            return ZodParsedType.function;\n        case \"bigint\":\n            return ZodParsedType.bigint;\n        case \"symbol\":\n            return ZodParsedType.symbol;\n        case \"object\":\n            if (Array.isArray(data)) {\n                return ZodParsedType.array;\n            }\n            if (data === null) {\n                return ZodParsedType.null;\n            }\n            if (data.then &&\n                typeof data.then === \"function\" &&\n                data.catch &&\n                typeof data.catch === \"function\") {\n                return ZodParsedType.promise;\n            }\n            if (typeof Map !== \"undefined\" && data instanceof Map) {\n                return ZodParsedType.map;\n            }\n            if (typeof Set !== \"undefined\" && data instanceof Set) {\n                return ZodParsedType.set;\n            }\n            if (typeof Date !== \"undefined\" && data instanceof Date) {\n                return ZodParsedType.date;\n            }\n            return ZodParsedType.object;\n        default:\n            return ZodParsedType.unknown;\n    }\n};\n\nconst ZodIssueCode = util.arrayToEnum([\n    \"invalid_type\",\n    \"invalid_literal\",\n    \"custom\",\n    \"invalid_union\",\n    \"invalid_union_discriminator\",\n    \"invalid_enum_value\",\n    \"unrecognized_keys\",\n    \"invalid_arguments\",\n    \"invalid_return_type\",\n    \"invalid_date\",\n    \"invalid_string\",\n    \"too_small\",\n    \"too_big\",\n    \"invalid_intersection_types\",\n    \"not_multiple_of\",\n    \"not_finite\",\n]);\nconst quotelessJson = (obj) => {\n    const json = JSON.stringify(obj, null, 2);\n    return json.replace(/\"([^\"]+)\":/g, \"$1:\");\n};\nclass ZodError extends Error {\n    get errors() {\n        return this.issues;\n    }\n    constructor(issues) {\n        super();\n        this.issues = [];\n        this.addIssue = (sub) => {\n            this.issues = [...this.issues, sub];\n        };\n        this.addIssues = (subs = []) => {\n            this.issues = [...this.issues, ...subs];\n        };\n        const actualProto = new.target.prototype;\n        if (Object.setPrototypeOf) {\n            // eslint-disable-next-line ban/ban\n            Object.setPrototypeOf(this, actualProto);\n        }\n        else {\n            this.__proto__ = actualProto;\n        }\n        this.name = \"ZodError\";\n        this.issues = issues;\n    }\n    format(_mapper) {\n        const mapper = _mapper ||\n            function (issue) {\n                return issue.message;\n            };\n        const fieldErrors = { _errors: [] };\n        const processError = (error) => {\n            for (const issue of error.issues) {\n                if (issue.code === \"invalid_union\") {\n                    issue.unionErrors.map(processError);\n                }\n                else if (issue.code === \"invalid_return_type\") {\n                    processError(issue.returnTypeError);\n                }\n                else if (issue.code === \"invalid_arguments\") {\n                    processError(issue.argumentsError);\n                }\n                else if (issue.path.length === 0) {\n                    fieldErrors._errors.push(mapper(issue));\n                }\n                else {\n                    let curr = fieldErrors;\n                    let i = 0;\n                    while (i < issue.path.length) {\n                        const el = issue.path[i];\n                        const terminal = i === issue.path.length - 1;\n                        if (!terminal) {\n                            curr[el] = curr[el] || { _errors: [] };\n                            // if (typeof el === \"string\") {\n                            //   curr[el] = curr[el] || { _errors: [] };\n                            // } else if (typeof el === \"number\") {\n                            //   const errorArray: any = [];\n                            //   errorArray._errors = [];\n                            //   curr[el] = curr[el] || errorArray;\n                            // }\n                        }\n                        else {\n                            curr[el] = curr[el] || { _errors: [] };\n                            curr[el]._errors.push(mapper(issue));\n                        }\n                        curr = curr[el];\n                        i++;\n                    }\n                }\n            }\n        };\n        processError(this);\n        return fieldErrors;\n    }\n    static assert(value) {\n        if (!(value instanceof ZodError)) {\n            throw new Error(`Not a ZodError: ${value}`);\n        }\n    }\n    toString() {\n        return this.message;\n    }\n    get message() {\n        return JSON.stringify(this.issues, util.jsonStringifyReplacer, 2);\n    }\n    get isEmpty() {\n        return this.issues.length === 0;\n    }\n    flatten(mapper = (issue) => issue.message) {\n        const fieldErrors = {};\n        const formErrors = [];\n        for (const sub of this.issues) {\n            if (sub.path.length > 0) {\n                fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];\n                fieldErrors[sub.path[0]].push(mapper(sub));\n            }\n            else {\n                formErrors.push(mapper(sub));\n            }\n        }\n        return { formErrors, fieldErrors };\n    }\n    get formErrors() {\n        return this.flatten();\n    }\n}\nZodError.create = (issues) => {\n    const error = new ZodError(issues);\n    return error;\n};\n\nconst errorMap = (issue, _ctx) => {\n    let message;\n    switch (issue.code) {\n        case ZodIssueCode.invalid_type:\n            if (issue.received === ZodParsedType.undefined) {\n                message = \"Required\";\n            }\n            else {\n                message = `Expected ${issue.expected}, received ${issue.received}`;\n            }\n            break;\n        case ZodIssueCode.invalid_literal:\n            message = `Invalid literal value, expected ${JSON.stringify(issue.expected, util.jsonStringifyReplacer)}`;\n            break;\n        case ZodIssueCode.unrecognized_keys:\n            message = `Unrecognized key(s) in object: ${util.joinValues(issue.keys, \", \")}`;\n            break;\n        case ZodIssueCode.invalid_union:\n            message = `Invalid input`;\n            break;\n        case ZodIssueCode.invalid_union_discriminator:\n            message = `Invalid discriminator value. Expected ${util.joinValues(issue.options)}`;\n            break;\n        case ZodIssueCode.invalid_enum_value:\n            message = `Invalid enum value. Expected ${util.joinValues(issue.options)}, received '${issue.received}'`;\n            break;\n        case ZodIssueCode.invalid_arguments:\n            message = `Invalid function arguments`;\n            break;\n        case ZodIssueCode.invalid_return_type:\n            message = `Invalid function return type`;\n            break;\n        case ZodIssueCode.invalid_date:\n            message = `Invalid date`;\n            break;\n        case ZodIssueCode.invalid_string:\n            if (typeof issue.validation === \"object\") {\n                if (\"includes\" in issue.validation) {\n                    message = `Invalid input: must include \"${issue.validation.includes}\"`;\n                    if (typeof issue.validation.position === \"number\") {\n                        message = `${message} at one or more positions greater than or equal to ${issue.validation.position}`;\n                    }\n                }\n                else if (\"startsWith\" in issue.validation) {\n                    message = `Invalid input: must start with \"${issue.validation.startsWith}\"`;\n                }\n                else if (\"endsWith\" in issue.validation) {\n                    message = `Invalid input: must end with \"${issue.validation.endsWith}\"`;\n                }\n                else {\n                    util.assertNever(issue.validation);\n                }\n            }\n            else if (issue.validation !== \"regex\") {\n                message = `Invalid ${issue.validation}`;\n            }\n            else {\n                message = \"Invalid\";\n            }\n            break;\n        case ZodIssueCode.too_small:\n            if (issue.type === \"array\")\n                message = `Array must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `more than`} ${issue.minimum} element(s)`;\n            else if (issue.type === \"string\")\n                message = `String must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;\n            else if (issue.type === \"number\")\n                message = `Number must be ${issue.exact\n                    ? `exactly equal to `\n                    : issue.inclusive\n                        ? `greater than or equal to `\n                        : `greater than `}${issue.minimum}`;\n            else if (issue.type === \"date\")\n                message = `Date must be ${issue.exact\n                    ? `exactly equal to `\n                    : issue.inclusive\n                        ? `greater than or equal to `\n                        : `greater than `}${new Date(Number(issue.minimum))}`;\n            else\n                message = \"Invalid input\";\n            break;\n        case ZodIssueCode.too_big:\n            if (issue.type === \"array\")\n                message = `Array must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `less than`} ${issue.maximum} element(s)`;\n            else if (issue.type === \"string\")\n                message = `String must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`;\n            else if (issue.type === \"number\")\n                message = `Number must be ${issue.exact\n                    ? `exactly`\n                    : issue.inclusive\n                        ? `less than or equal to`\n                        : `less than`} ${issue.maximum}`;\n            else if (issue.type === \"bigint\")\n                message = `BigInt must be ${issue.exact\n                    ? `exactly`\n                    : issue.inclusive\n                        ? `less than or equal to`\n                        : `less than`} ${issue.maximum}`;\n            else if (issue.type === \"date\")\n                message = `Date must be ${issue.exact\n                    ? `exactly`\n                    : issue.inclusive\n                        ? `smaller than or equal to`\n                        : `smaller than`} ${new Date(Number(issue.maximum))}`;\n            else\n                message = \"Invalid input\";\n            break;\n        case ZodIssueCode.custom:\n            message = `Invalid input`;\n            break;\n        case ZodIssueCode.invalid_intersection_types:\n            message = `Intersection results could not be merged`;\n            break;\n        case ZodIssueCode.not_multiple_of:\n            message = `Number must be a multiple of ${issue.multipleOf}`;\n            break;\n        case ZodIssueCode.not_finite:\n            message = \"Number must be finite\";\n            break;\n        default:\n            message = _ctx.defaultError;\n            util.assertNever(issue);\n    }\n    return { message };\n};\n\nlet overrideErrorMap = errorMap;\nfunction setErrorMap(map) {\n    overrideErrorMap = map;\n}\nfunction getErrorMap() {\n    return overrideErrorMap;\n}\n\nconst makeIssue = (params) => {\n    const { data, path, errorMaps, issueData } = params;\n    const fullPath = [...path, ...(issueData.path || [])];\n    const fullIssue = {\n        ...issueData,\n        path: fullPath,\n    };\n    if (issueData.message !== undefined) {\n        return {\n            ...issueData,\n            path: fullPath,\n            message: issueData.message,\n        };\n    }\n    let errorMessage = \"\";\n    const maps = errorMaps\n        .filter((m) => !!m)\n        .slice()\n        .reverse();\n    for (const map of maps) {\n        errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message;\n    }\n    return {\n        ...issueData,\n        path: fullPath,\n        message: errorMessage,\n    };\n};\nconst EMPTY_PATH = [];\nfunction addIssueToContext(ctx, issueData) {\n    const overrideMap = getErrorMap();\n    const issue = makeIssue({\n        issueData: issueData,\n        data: ctx.data,\n        path: ctx.path,\n        errorMaps: [\n            ctx.common.contextualErrorMap, // contextual error map is first priority\n            ctx.schemaErrorMap, // then schema-bound map if available\n            overrideMap, // then global override map\n            overrideMap === errorMap ? undefined : errorMap, // then global default map\n        ].filter((x) => !!x),\n    });\n    ctx.common.issues.push(issue);\n}\nclass ParseStatus {\n    constructor() {\n        this.value = \"valid\";\n    }\n    dirty() {\n        if (this.value === \"valid\")\n            this.value = \"dirty\";\n    }\n    abort() {\n        if (this.value !== \"aborted\")\n            this.value = \"aborted\";\n    }\n    static mergeArray(status, results) {\n        const arrayValue = [];\n        for (const s of results) {\n            if (s.status === \"aborted\")\n                return INVALID;\n            if (s.status === \"dirty\")\n                status.dirty();\n            arrayValue.push(s.value);\n        }\n        return { status: status.value, value: arrayValue };\n    }\n    static async mergeObjectAsync(status, pairs) {\n        const syncPairs = [];\n        for (const pair of pairs) {\n            const key = await pair.key;\n            const value = await pair.value;\n            syncPairs.push({\n                key,\n                value,\n            });\n        }\n        return ParseStatus.mergeObjectSync(status, syncPairs);\n    }\n    static mergeObjectSync(status, pairs) {\n        const finalObject = {};\n        for (const pair of pairs) {\n            const { key, value } = pair;\n            if (key.status === \"aborted\")\n                return INVALID;\n            if (value.status === \"aborted\")\n                return INVALID;\n            if (key.status === \"dirty\")\n                status.dirty();\n            if (value.status === \"dirty\")\n                status.dirty();\n            if (key.value !== \"__proto__\" &&\n                (typeof value.value !== \"undefined\" || pair.alwaysSet)) {\n                finalObject[key.value] = value.value;\n            }\n        }\n        return { status: status.value, value: finalObject };\n    }\n}\nconst INVALID = Object.freeze({\n    status: \"aborted\",\n});\nconst DIRTY = (value) => ({ status: \"dirty\", value });\nconst OK = (value) => ({ status: \"valid\", value });\nconst isAborted = (x) => x.status === \"aborted\";\nconst isDirty = (x) => x.status === \"dirty\";\nconst isValid = (x) => x.status === \"valid\";\nconst isAsync = (x) => typeof Promise !== \"undefined\" && x instanceof Promise;\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nfunction __classPrivateFieldGet(receiver, state, kind, f) {\r\n    if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n    if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n    return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nfunction __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n    if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n    if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n    if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n    return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\ntypeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n    var e = new Error(message);\r\n    return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\n\nvar errorUtil;\n(function (errorUtil) {\n    errorUtil.errToObj = (message) => typeof message === \"string\" ? { message } : message || {};\n    errorUtil.toString = (message) => typeof message === \"string\" ? message : message === null || message === void 0 ? void 0 : message.message;\n})(errorUtil || (errorUtil = {}));\n\nvar _ZodEnum_cache, _ZodNativeEnum_cache;\nclass ParseInputLazyPath {\n    constructor(parent, value, path, key) {\n        this._cachedPath = [];\n        this.parent = parent;\n        this.data = value;\n        this._path = path;\n        this._key = key;\n    }\n    get path() {\n        if (!this._cachedPath.length) {\n            if (this._key instanceof Array) {\n                this._cachedPath.push(...this._path, ...this._key);\n            }\n            else {\n                this._cachedPath.push(...this._path, this._key);\n            }\n        }\n        return this._cachedPath;\n    }\n}\nconst handleResult = (ctx, result) => {\n    if (isValid(result)) {\n        return { success: true, data: result.value };\n    }\n    else {\n        if (!ctx.common.issues.length) {\n            throw new Error(\"Validation failed but no issues detected.\");\n        }\n        return {\n            success: false,\n            get error() {\n                if (this._error)\n                    return this._error;\n                const error = new ZodError(ctx.common.issues);\n                this._error = error;\n                return this._error;\n            },\n        };\n    }\n};\nfunction processCreateParams(params) {\n    if (!params)\n        return {};\n    const { errorMap, invalid_type_error, required_error, description } = params;\n    if (errorMap && (invalid_type_error || required_error)) {\n        throw new Error(`Can't use \"invalid_type_error\" or \"required_error\" in conjunction with custom error map.`);\n    }\n    if (errorMap)\n        return { errorMap: errorMap, description };\n    const customMap = (iss, ctx) => {\n        var _a, _b;\n        const { message } = params;\n        if (iss.code === \"invalid_enum_value\") {\n            return { message: message !== null && message !== void 0 ? message : ctx.defaultError };\n        }\n        if (typeof ctx.data === \"undefined\") {\n            return { message: (_a = message !== null && message !== void 0 ? message : required_error) !== null && _a !== void 0 ? _a : ctx.defaultError };\n        }\n        if (iss.code !== \"invalid_type\")\n            return { message: ctx.defaultError };\n        return { message: (_b = message !== null && message !== void 0 ? message : invalid_type_error) !== null && _b !== void 0 ? _b : ctx.defaultError };\n    };\n    return { errorMap: customMap, description };\n}\nclass ZodType {\n    get description() {\n        return this._def.description;\n    }\n    _getType(input) {\n        return getParsedType(input.data);\n    }\n    _getOrReturnCtx(input, ctx) {\n        return (ctx || {\n            common: input.parent.common,\n            data: input.data,\n            parsedType: getParsedType(input.data),\n            schemaErrorMap: this._def.errorMap,\n            path: input.path,\n            parent: input.parent,\n        });\n    }\n    _processInputParams(input) {\n        return {\n            status: new ParseStatus(),\n            ctx: {\n                common: input.parent.common,\n                data: input.data,\n                parsedType: getParsedType(input.data),\n                schemaErrorMap: this._def.errorMap,\n                path: input.path,\n                parent: input.parent,\n            },\n        };\n    }\n    _parseSync(input) {\n        const result = this._parse(input);\n        if (isAsync(result)) {\n            throw new Error(\"Synchronous parse encountered promise.\");\n        }\n        return result;\n    }\n    _parseAsync(input) {\n        const result = this._parse(input);\n        return Promise.resolve(result);\n    }\n    parse(data, params) {\n        const result = this.safeParse(data, params);\n        if (result.success)\n            return result.data;\n        throw result.error;\n    }\n    safeParse(data, params) {\n        var _a;\n        const ctx = {\n            common: {\n                issues: [],\n                async: (_a = params === null || params === void 0 ? void 0 : params.async) !== null && _a !== void 0 ? _a : false,\n                contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap,\n            },\n            path: (params === null || params === void 0 ? void 0 : params.path) || [],\n            schemaErrorMap: this._def.errorMap,\n            parent: null,\n            data,\n            parsedType: getParsedType(data),\n        };\n        const result = this._parseSync({ data, path: ctx.path, parent: ctx });\n        return handleResult(ctx, result);\n    }\n    \"~validate\"(data) {\n        var _a, _b;\n        const ctx = {\n            common: {\n                issues: [],\n                async: !!this[\"~standard\"].async,\n            },\n            path: [],\n            schemaErrorMap: this._def.errorMap,\n            parent: null,\n            data,\n            parsedType: getParsedType(data),\n        };\n        if (!this[\"~standard\"].async) {\n            try {\n                const result = this._parseSync({ data, path: [], parent: ctx });\n                return isValid(result)\n                    ? {\n                        value: result.value,\n                    }\n                    : {\n                        issues: ctx.common.issues,\n                    };\n            }\n            catch (err) {\n                if ((_b = (_a = err === null || err === void 0 ? void 0 : err.message) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === null || _b === void 0 ? void 0 : _b.includes(\"encountered\")) {\n                    this[\"~standard\"].async = true;\n                }\n                ctx.common = {\n                    issues: [],\n                    async: true,\n                };\n            }\n        }\n        return this._parseAsync({ data, path: [], parent: ctx }).then((result) => isValid(result)\n            ? {\n                value: result.value,\n            }\n            : {\n                issues: ctx.common.issues,\n            });\n    }\n    async parseAsync(data, params) {\n        const result = await this.safeParseAsync(data, params);\n        if (result.success)\n            return result.data;\n        throw result.error;\n    }\n    async safeParseAsync(data, params) {\n        const ctx = {\n            common: {\n                issues: [],\n                contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap,\n                async: true,\n            },\n            path: (params === null || params === void 0 ? void 0 : params.path) || [],\n            schemaErrorMap: this._def.errorMap,\n            parent: null,\n            data,\n            parsedType: getParsedType(data),\n        };\n        const maybeAsyncResult = this._parse({ data, path: ctx.path, parent: ctx });\n        const result = await (isAsync(maybeAsyncResult)\n            ? maybeAsyncResult\n            : Promise.resolve(maybeAsyncResult));\n        return handleResult(ctx, result);\n    }\n    refine(check, message) {\n        const getIssueProperties = (val) => {\n            if (typeof message === \"string\" || typeof message === \"undefined\") {\n                return { message };\n            }\n            else if (typeof message === \"function\") {\n                return message(val);\n            }\n            else {\n                return message;\n            }\n        };\n        return this._refinement((val, ctx) => {\n            const result = check(val);\n            const setError = () => ctx.addIssue({\n                code: ZodIssueCode.custom,\n                ...getIssueProperties(val),\n            });\n            if (typeof Promise !== \"undefined\" && result instanceof Promise) {\n                return result.then((data) => {\n                    if (!data) {\n                        setError();\n                        return false;\n                    }\n                    else {\n                        return true;\n                    }\n                });\n            }\n            if (!result) {\n                setError();\n                return false;\n            }\n            else {\n                return true;\n            }\n        });\n    }\n    refinement(check, refinementData) {\n        return this._refinement((val, ctx) => {\n            if (!check(val)) {\n                ctx.addIssue(typeof refinementData === \"function\"\n                    ? refinementData(val, ctx)\n                    : refinementData);\n                return false;\n            }\n            else {\n                return true;\n            }\n        });\n    }\n    _refinement(refinement) {\n        return new ZodEffects({\n            schema: this,\n            typeName: ZodFirstPartyTypeKind.ZodEffects,\n            effect: { type: \"refinement\", refinement },\n        });\n    }\n    superRefine(refinement) {\n        return this._refinement(refinement);\n    }\n    constructor(def) {\n        /** Alias of safeParseAsync */\n        this.spa = this.safeParseAsync;\n        this._def = def;\n        this.parse = this.parse.bind(this);\n        this.safeParse = this.safeParse.bind(this);\n        this.parseAsync = this.parseAsync.bind(this);\n        this.safeParseAsync = this.safeParseAsync.bind(this);\n        this.spa = this.spa.bind(this);\n        this.refine = this.refine.bind(this);\n        this.refinement = this.refinement.bind(this);\n        this.superRefine = this.superRefine.bind(this);\n        this.optional = this.optional.bind(this);\n        this.nullable = this.nullable.bind(this);\n        this.nullish = this.nullish.bind(this);\n        this.array = this.array.bind(this);\n        this.promise = this.promise.bind(this);\n        this.or = this.or.bind(this);\n        this.and = this.and.bind(this);\n        this.transform = this.transform.bind(this);\n        this.brand = this.brand.bind(this);\n        this.default = this.default.bind(this);\n        this.catch = this.catch.bind(this);\n        this.describe = this.describe.bind(this);\n        this.pipe = this.pipe.bind(this);\n        this.readonly = this.readonly.bind(this);\n        this.isNullable = this.isNullable.bind(this);\n        this.isOptional = this.isOptional.bind(this);\n        this[\"~standard\"] = {\n            version: 1,\n            vendor: \"zod\",\n            validate: (data) => this[\"~validate\"](data),\n        };\n    }\n    optional() {\n        return ZodOptional.create(this, this._def);\n    }\n    nullable() {\n        return ZodNullable.create(this, this._def);\n    }\n    nullish() {\n        return this.nullable().optional();\n    }\n    array() {\n        return ZodArray.create(this);\n    }\n    promise() {\n        return ZodPromise.create(this, this._def);\n    }\n    or(option) {\n        return ZodUnion.create([this, option], this._def);\n    }\n    and(incoming) {\n        return ZodIntersection.create(this, incoming, this._def);\n    }\n    transform(transform) {\n        return new ZodEffects({\n            ...processCreateParams(this._def),\n            schema: this,\n            typeName: ZodFirstPartyTypeKind.ZodEffects,\n            effect: { type: \"transform\", transform },\n        });\n    }\n    default(def) {\n        const defaultValueFunc = typeof def === \"function\" ? def : () => def;\n        return new ZodDefault({\n            ...processCreateParams(this._def),\n            innerType: this,\n            defaultValue: defaultValueFunc,\n            typeName: ZodFirstPartyTypeKind.ZodDefault,\n        });\n    }\n    brand() {\n        return new ZodBranded({\n            typeName: ZodFirstPartyTypeKind.ZodBranded,\n            type: this,\n            ...processCreateParams(this._def),\n        });\n    }\n    catch(def) {\n        const catchValueFunc = typeof def === \"function\" ? def : () => def;\n        return new ZodCatch({\n            ...processCreateParams(this._def),\n            innerType: this,\n            catchValue: catchValueFunc,\n            typeName: ZodFirstPartyTypeKind.ZodCatch,\n        });\n    }\n    describe(description) {\n        const This = this.constructor;\n        return new This({\n            ...this._def,\n            description,\n        });\n    }\n    pipe(target) {\n        return ZodPipeline.create(this, target);\n    }\n    readonly() {\n        return ZodReadonly.create(this);\n    }\n    isOptional() {\n        return this.safeParse(undefined).success;\n    }\n    isNullable() {\n        return this.safeParse(null).success;\n    }\n}\nconst cuidRegex = /^c[^\\s-]{8,}$/i;\nconst cuid2Regex = /^[0-9a-z]+$/;\nconst ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/i;\n// const uuidRegex =\n//   /^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i;\nconst uuidRegex = /^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$/i;\nconst nanoidRegex = /^[a-z0-9_-]{21}$/i;\nconst jwtRegex = /^[A-Za-z0-9-_]+\\.[A-Za-z0-9-_]+\\.[A-Za-z0-9-_]*$/;\nconst durationRegex = /^[-+]?P(?!$)(?:(?:[-+]?\\d+Y)|(?:[-+]?\\d+[.,]\\d+Y$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:(?:[-+]?\\d+W)|(?:[-+]?\\d+[.,]\\d+W$))?(?:(?:[-+]?\\d+D)|(?:[-+]?\\d+[.,]\\d+D$))?(?:T(?=[\\d+-])(?:(?:[-+]?\\d+H)|(?:[-+]?\\d+[.,]\\d+H$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:[-+]?\\d+(?:[.,]\\d+)?S)?)??$/;\n// from https://stackoverflow.com/a/46181/1550155\n// old version: too slow, didn't support unicode\n// const emailRegex = /^((([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(\\\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))$/i;\n//old email regex\n// const emailRegex = /^(([^<>()[\\].,;:\\s@\"]+(\\.[^<>()[\\].,;:\\s@\"]+)*)|(\".+\"))@((?!-)([^<>()[\\].,;:\\s@\"]+\\.)+[^<>()[\\].,;:\\s@\"]{1,})[^-<>()[\\].,;:\\s@\"]$/i;\n// eslint-disable-next-line\n// const emailRegex =\n//   /^(([^<>()[\\]\\\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@((\\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\])|(\\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\\.[A-Za-z]{2,})+))$/;\n// const emailRegex =\n//   /^[a-zA-Z0-9\\.\\!\\#\\$\\%\\&\\'\\*\\+\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~\\-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n// const emailRegex =\n//   /^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$/i;\nconst emailRegex = /^(?!\\.)(?!.*\\.\\.)([A-Z0-9_'+\\-\\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\\-]*\\.)+[A-Z]{2,}$/i;\n// const emailRegex =\n//   /^[a-z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-z0-9-]+(?:\\.[a-z0-9\\-]+)*$/i;\n// from https://thekevinscott.com/emojis-in-javascript/#writing-a-regular-expression\nconst _emojiRegex = `^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$`;\nlet emojiRegex;\n// faster, simpler, safer\nconst ipv4Regex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;\nconst ipv4CidrRegex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/(3[0-2]|[12]?[0-9])$/;\n// const ipv6Regex =\n// /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;\nconst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){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;\n// https://stackoverflow.com/questions/7860392/determine-if-string-is-in-base64-using-javascript\nconst base64Regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;\n// https://base64.guru/standards/base64url\nconst base64urlRegex = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/;\n// simple\n// const dateRegexSource = `\\\\d{4}-\\\\d{2}-\\\\d{2}`;\n// no leap year validation\n// const dateRegexSource = `\\\\d{4}-((0[13578]|10|12)-31|(0[13-9]|1[0-2])-30|(0[1-9]|1[0-2])-(0[1-9]|1\\\\d|2\\\\d))`;\n// with leap year validation\nconst dateRegexSource = `((\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\\\d|30)|(02)-(0[1-9]|1\\\\d|2[0-8])))`;\nconst dateRegex = new RegExp(`^${dateRegexSource}$`);\nfunction timeRegexSource(args) {\n    // let regex = `\\\\d{2}:\\\\d{2}:\\\\d{2}`;\n    let regex = `([01]\\\\d|2[0-3]):[0-5]\\\\d:[0-5]\\\\d`;\n    if (args.precision) {\n        regex = `${regex}\\\\.\\\\d{${args.precision}}`;\n    }\n    else if (args.precision == null) {\n        regex = `${regex}(\\\\.\\\\d+)?`;\n    }\n    return regex;\n}\nfunction timeRegex(args) {\n    return new RegExp(`^${timeRegexSource(args)}$`);\n}\n// Adapted from https://stackoverflow.com/a/3143231\nfunction datetimeRegex(args) {\n    let regex = `${dateRegexSource}T${timeRegexSource(args)}`;\n    const opts = [];\n    opts.push(args.local ? `Z?` : `Z`);\n    if (args.offset)\n        opts.push(`([+-]\\\\d{2}:?\\\\d{2})`);\n    regex = `${regex}(${opts.join(\"|\")})`;\n    return new RegExp(`^${regex}$`);\n}\nfunction isValidIP(ip, version) {\n    if ((version === \"v4\" || !version) && ipv4Regex.test(ip)) {\n        return true;\n    }\n    if ((version === \"v6\" || !version) && ipv6Regex.test(ip)) {\n        return true;\n    }\n    return false;\n}\nfunction isValidJWT(jwt, alg) {\n    if (!jwtRegex.test(jwt))\n        return false;\n    try {\n        const [header] = jwt.split(\".\");\n        // Convert base64url to base64\n        const base64 = header\n            .replace(/-/g, \"+\")\n            .replace(/_/g, \"/\")\n            .padEnd(header.length + ((4 - (header.length % 4)) % 4), \"=\");\n        const decoded = JSON.parse(atob(base64));\n        if (typeof decoded !== \"object\" || decoded === null)\n            return false;\n        if (!decoded.typ || !decoded.alg)\n            return false;\n        if (alg && decoded.alg !== alg)\n            return false;\n        return true;\n    }\n    catch (_a) {\n        return false;\n    }\n}\nfunction isValidCidr(ip, version) {\n    if ((version === \"v4\" || !version) && ipv4CidrRegex.test(ip)) {\n        return true;\n    }\n    if ((version === \"v6\" || !version) && ipv6CidrRegex.test(ip)) {\n        return true;\n    }\n    return false;\n}\nclass ZodString extends ZodType {\n    _parse(input) {\n        if (this._def.coerce) {\n            input.data = String(input.data);\n        }\n        const parsedType = this._getType(input);\n        if (parsedType !== ZodParsedType.string) {\n            const ctx = this._getOrReturnCtx(input);\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.string,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        const status = new ParseStatus();\n        let ctx = undefined;\n        for (const check of this._def.checks) {\n            if (check.kind === \"min\") {\n                if (input.data.length < check.value) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.too_small,\n                        minimum: check.value,\n                        type: \"string\",\n                        inclusive: true,\n                        exact: false,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"max\") {\n                if (input.data.length > check.value) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.too_big,\n                        maximum: check.value,\n                        type: \"string\",\n                        inclusive: true,\n                        exact: false,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"length\") {\n                const tooBig = input.data.length > check.value;\n                const tooSmall = input.data.length < check.value;\n                if (tooBig || tooSmall) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    if (tooBig) {\n                        addIssueToContext(ctx, {\n                            code: ZodIssueCode.too_big,\n                            maximum: check.value,\n                            type: \"string\",\n                            inclusive: true,\n                            exact: true,\n                            message: check.message,\n                        });\n                    }\n                    else if (tooSmall) {\n                        addIssueToContext(ctx, {\n                            code: ZodIssueCode.too_small,\n                            minimum: check.value,\n                            type: \"string\",\n                            inclusive: true,\n                            exact: true,\n                            message: check.message,\n                        });\n                    }\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"email\") {\n                if (!emailRegex.test(input.data)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        validation: \"email\",\n                        code: ZodIssueCode.invalid_string,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"emoji\") {\n                if (!emojiRegex) {\n                    emojiRegex = new RegExp(_emojiRegex, \"u\");\n                }\n                if (!emojiRegex.test(input.data)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        validation: \"emoji\",\n                        code: ZodIssueCode.invalid_string,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"uuid\") {\n                if (!uuidRegex.test(input.data)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        validation: \"uuid\",\n                        code: ZodIssueCode.invalid_string,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"nanoid\") {\n                if (!nanoidRegex.test(input.data)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        validation: \"nanoid\",\n                        code: ZodIssueCode.invalid_string,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"cuid\") {\n                if (!cuidRegex.test(input.data)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        validation: \"cuid\",\n                        code: ZodIssueCode.invalid_string,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"cuid2\") {\n                if (!cuid2Regex.test(input.data)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        validation: \"cuid2\",\n                        code: ZodIssueCode.invalid_string,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"ulid\") {\n                if (!ulidRegex.test(input.data)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        validation: \"ulid\",\n                        code: ZodIssueCode.invalid_string,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"url\") {\n                try {\n                    new URL(input.data);\n                }\n                catch (_a) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        validation: \"url\",\n                        code: ZodIssueCode.invalid_string,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"regex\") {\n                check.regex.lastIndex = 0;\n                const testResult = check.regex.test(input.data);\n                if (!testResult) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        validation: \"regex\",\n                        code: ZodIssueCode.invalid_string,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"trim\") {\n                input.data = input.data.trim();\n            }\n            else if (check.kind === \"includes\") {\n                if (!input.data.includes(check.value, check.position)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.invalid_string,\n                        validation: { includes: check.value, position: check.position },\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"toLowerCase\") {\n                input.data = input.data.toLowerCase();\n            }\n            else if (check.kind === \"toUpperCase\") {\n                input.data = input.data.toUpperCase();\n            }\n            else if (check.kind === \"startsWith\") {\n                if (!input.data.startsWith(check.value)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.invalid_string,\n                        validation: { startsWith: check.value },\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"endsWith\") {\n                if (!input.data.endsWith(check.value)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.invalid_string,\n                        validation: { endsWith: check.value },\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"datetime\") {\n                const regex = datetimeRegex(check);\n                if (!regex.test(input.data)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.invalid_string,\n                        validation: \"datetime\",\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"date\") {\n                const regex = dateRegex;\n                if (!regex.test(input.data)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.invalid_string,\n                        validation: \"date\",\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"time\") {\n                const regex = timeRegex(check);\n                if (!regex.test(input.data)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.invalid_string,\n                        validation: \"time\",\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"duration\") {\n                if (!durationRegex.test(input.data)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        validation: \"duration\",\n                        code: ZodIssueCode.invalid_string,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"ip\") {\n                if (!isValidIP(input.data, check.version)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        validation: \"ip\",\n                        code: ZodIssueCode.invalid_string,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"jwt\") {\n                if (!isValidJWT(input.data, check.alg)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        validation: \"jwt\",\n                        code: ZodIssueCode.invalid_string,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"cidr\") {\n                if (!isValidCidr(input.data, check.version)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        validation: \"cidr\",\n                        code: ZodIssueCode.invalid_string,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"base64\") {\n                if (!base64Regex.test(input.data)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        validation: \"base64\",\n                        code: ZodIssueCode.invalid_string,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"base64url\") {\n                if (!base64urlRegex.test(input.data)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        validation: \"base64url\",\n                        code: ZodIssueCode.invalid_string,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else {\n                util.assertNever(check);\n            }\n        }\n        return { status: status.value, value: input.data };\n    }\n    _regex(regex, validation, message) {\n        return this.refinement((data) => regex.test(data), {\n            validation,\n            code: ZodIssueCode.invalid_string,\n            ...errorUtil.errToObj(message),\n        });\n    }\n    _addCheck(check) {\n        return new ZodString({\n            ...this._def,\n            checks: [...this._def.checks, check],\n        });\n    }\n    email(message) {\n        return this._addCheck({ kind: \"email\", ...errorUtil.errToObj(message) });\n    }\n    url(message) {\n        return this._addCheck({ kind: \"url\", ...errorUtil.errToObj(message) });\n    }\n    emoji(message) {\n        return this._addCheck({ kind: \"emoji\", ...errorUtil.errToObj(message) });\n    }\n    uuid(message) {\n        return this._addCheck({ kind: \"uuid\", ...errorUtil.errToObj(message) });\n    }\n    nanoid(message) {\n        return this._addCheck({ kind: \"nanoid\", ...errorUtil.errToObj(message) });\n    }\n    cuid(message) {\n        return this._addCheck({ kind: \"cuid\", ...errorUtil.errToObj(message) });\n    }\n    cuid2(message) {\n        return this._addCheck({ kind: \"cuid2\", ...errorUtil.errToObj(message) });\n    }\n    ulid(message) {\n        return this._addCheck({ kind: \"ulid\", ...errorUtil.errToObj(message) });\n    }\n    base64(message) {\n        return this._addCheck({ kind: \"base64\", ...errorUtil.errToObj(message) });\n    }\n    base64url(message) {\n        // base64url encoding is a modification of base64 that can safely be used in URLs and filenames\n        return this._addCheck({\n            kind: \"base64url\",\n            ...errorUtil.errToObj(message),\n        });\n    }\n    jwt(options) {\n        return this._addCheck({ kind: \"jwt\", ...errorUtil.errToObj(options) });\n    }\n    ip(options) {\n        return this._addCheck({ kind: \"ip\", ...errorUtil.errToObj(options) });\n    }\n    cidr(options) {\n        return this._addCheck({ kind: \"cidr\", ...errorUtil.errToObj(options) });\n    }\n    datetime(options) {\n        var _a, _b;\n        if (typeof options === \"string\") {\n            return this._addCheck({\n                kind: \"datetime\",\n                precision: null,\n                offset: false,\n                local: false,\n                message: options,\n            });\n        }\n        return this._addCheck({\n            kind: \"datetime\",\n            precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === \"undefined\" ? null : options === null || options === void 0 ? void 0 : options.precision,\n            offset: (_a = options === null || options === void 0 ? void 0 : options.offset) !== null && _a !== void 0 ? _a : false,\n            local: (_b = options === null || options === void 0 ? void 0 : options.local) !== null && _b !== void 0 ? _b : false,\n            ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message),\n        });\n    }\n    date(message) {\n        return this._addCheck({ kind: \"date\", message });\n    }\n    time(options) {\n        if (typeof options === \"string\") {\n            return this._addCheck({\n                kind: \"time\",\n                precision: null,\n                message: options,\n            });\n        }\n        return this._addCheck({\n            kind: \"time\",\n            precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === \"undefined\" ? null : options === null || options === void 0 ? void 0 : options.precision,\n            ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message),\n        });\n    }\n    duration(message) {\n        return this._addCheck({ kind: \"duration\", ...errorUtil.errToObj(message) });\n    }\n    regex(regex, message) {\n        return this._addCheck({\n            kind: \"regex\",\n            regex: regex,\n            ...errorUtil.errToObj(message),\n        });\n    }\n    includes(value, options) {\n        return this._addCheck({\n            kind: \"includes\",\n            value: value,\n            position: options === null || options === void 0 ? void 0 : options.position,\n            ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message),\n        });\n    }\n    startsWith(value, message) {\n        return this._addCheck({\n            kind: \"startsWith\",\n            value: value,\n            ...errorUtil.errToObj(message),\n        });\n    }\n    endsWith(value, message) {\n        return this._addCheck({\n            kind: \"endsWith\",\n            value: value,\n            ...errorUtil.errToObj(message),\n        });\n    }\n    min(minLength, message) {\n        return this._addCheck({\n            kind: \"min\",\n            value: minLength,\n            ...errorUtil.errToObj(message),\n        });\n    }\n    max(maxLength, message) {\n        return this._addCheck({\n            kind: \"max\",\n            value: maxLength,\n            ...errorUtil.errToObj(message),\n        });\n    }\n    length(len, message) {\n        return this._addCheck({\n            kind: \"length\",\n            value: len,\n            ...errorUtil.errToObj(message),\n        });\n    }\n    /**\n     * Equivalent to `.min(1)`\n     */\n    nonempty(message) {\n        return this.min(1, errorUtil.errToObj(message));\n    }\n    trim() {\n        return new ZodString({\n            ...this._def,\n            checks: [...this._def.checks, { kind: \"trim\" }],\n        });\n    }\n    toLowerCase() {\n        return new ZodString({\n            ...this._def,\n            checks: [...this._def.checks, { kind: \"toLowerCase\" }],\n        });\n    }\n    toUpperCase() {\n        return new ZodString({\n            ...this._def,\n            checks: [...this._def.checks, { kind: \"toUpperCase\" }],\n        });\n    }\n    get isDatetime() {\n        return !!this._def.checks.find((ch) => ch.kind === \"datetime\");\n    }\n    get isDate() {\n        return !!this._def.checks.find((ch) => ch.kind === \"date\");\n    }\n    get isTime() {\n        return !!this._def.checks.find((ch) => ch.kind === \"time\");\n    }\n    get isDuration() {\n        return !!this._def.checks.find((ch) => ch.kind === \"duration\");\n    }\n    get isEmail() {\n        return !!this._def.checks.find((ch) => ch.kind === \"email\");\n    }\n    get isURL() {\n        return !!this._def.checks.find((ch) => ch.kind === \"url\");\n    }\n    get isEmoji() {\n        return !!this._def.checks.find((ch) => ch.kind === \"emoji\");\n    }\n    get isUUID() {\n        return !!this._def.checks.find((ch) => ch.kind === \"uuid\");\n    }\n    get isNANOID() {\n        return !!this._def.checks.find((ch) => ch.kind === \"nanoid\");\n    }\n    get isCUID() {\n        return !!this._def.checks.find((ch) => ch.kind === \"cuid\");\n    }\n    get isCUID2() {\n        return !!this._def.checks.find((ch) => ch.kind === \"cuid2\");\n    }\n    get isULID() {\n        return !!this._def.checks.find((ch) => ch.kind === \"ulid\");\n    }\n    get isIP() {\n        return !!this._def.checks.find((ch) => ch.kind === \"ip\");\n    }\n    get isCIDR() {\n        return !!this._def.checks.find((ch) => ch.kind === \"cidr\");\n    }\n    get isBase64() {\n        return !!this._def.checks.find((ch) => ch.kind === \"base64\");\n    }\n    get isBase64url() {\n        // base64url encoding is a modification of base64 that can safely be used in URLs and filenames\n        return !!this._def.checks.find((ch) => ch.kind === \"base64url\");\n    }\n    get minLength() {\n        let min = null;\n        for (const ch of this._def.checks) {\n            if (ch.kind === \"min\") {\n                if (min === null || ch.value > min)\n                    min = ch.value;\n            }\n        }\n        return min;\n    }\n    get maxLength() {\n        let max = null;\n        for (const ch of this._def.checks) {\n            if (ch.kind === \"max\") {\n                if (max === null || ch.value < max)\n                    max = ch.value;\n            }\n        }\n        return max;\n    }\n}\nZodString.create = (params) => {\n    var _a;\n    return new ZodString({\n        checks: [],\n        typeName: ZodFirstPartyTypeKind.ZodString,\n        coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,\n        ...processCreateParams(params),\n    });\n};\n// https://stackoverflow.com/questions/3966484/why-does-modulus-operator-return-fractional-number-in-javascript/31711034#31711034\nfunction floatSafeRemainder(val, step) {\n    const valDecCount = (val.toString().split(\".\")[1] || \"\").length;\n    const stepDecCount = (step.toString().split(\".\")[1] || \"\").length;\n    const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;\n    const valInt = parseInt(val.toFixed(decCount).replace(\".\", \"\"));\n    const stepInt = parseInt(step.toFixed(decCount).replace(\".\", \"\"));\n    return (valInt % stepInt) / Math.pow(10, decCount);\n}\nclass ZodNumber extends ZodType {\n    constructor() {\n        super(...arguments);\n        this.min = this.gte;\n        this.max = this.lte;\n        this.step = this.multipleOf;\n    }\n    _parse(input) {\n        if (this._def.coerce) {\n            input.data = Number(input.data);\n        }\n        const parsedType = this._getType(input);\n        if (parsedType !== ZodParsedType.number) {\n            const ctx = this._getOrReturnCtx(input);\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.number,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        let ctx = undefined;\n        const status = new ParseStatus();\n        for (const check of this._def.checks) {\n            if (check.kind === \"int\") {\n                if (!util.isInteger(input.data)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.invalid_type,\n                        expected: \"integer\",\n                        received: \"float\",\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"min\") {\n                const tooSmall = check.inclusive\n                    ? input.data < check.value\n                    : input.data <= check.value;\n                if (tooSmall) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.too_small,\n                        minimum: check.value,\n                        type: \"number\",\n                        inclusive: check.inclusive,\n                        exact: false,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"max\") {\n                const tooBig = check.inclusive\n                    ? input.data > check.value\n                    : input.data >= check.value;\n                if (tooBig) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.too_big,\n                        maximum: check.value,\n                        type: \"number\",\n                        inclusive: check.inclusive,\n                        exact: false,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"multipleOf\") {\n                if (floatSafeRemainder(input.data, check.value) !== 0) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.not_multiple_of,\n                        multipleOf: check.value,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"finite\") {\n                if (!Number.isFinite(input.data)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.not_finite,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else {\n                util.assertNever(check);\n            }\n        }\n        return { status: status.value, value: input.data };\n    }\n    gte(value, message) {\n        return this.setLimit(\"min\", value, true, errorUtil.toString(message));\n    }\n    gt(value, message) {\n        return this.setLimit(\"min\", value, false, errorUtil.toString(message));\n    }\n    lte(value, message) {\n        return this.setLimit(\"max\", value, true, errorUtil.toString(message));\n    }\n    lt(value, message) {\n        return this.setLimit(\"max\", value, false, errorUtil.toString(message));\n    }\n    setLimit(kind, value, inclusive, message) {\n        return new ZodNumber({\n            ...this._def,\n            checks: [\n                ...this._def.checks,\n                {\n                    kind,\n                    value,\n                    inclusive,\n                    message: errorUtil.toString(message),\n                },\n            ],\n        });\n    }\n    _addCheck(check) {\n        return new ZodNumber({\n            ...this._def,\n            checks: [...this._def.checks, check],\n        });\n    }\n    int(message) {\n        return this._addCheck({\n            kind: \"int\",\n            message: errorUtil.toString(message),\n        });\n    }\n    positive(message) {\n        return this._addCheck({\n            kind: \"min\",\n            value: 0,\n            inclusive: false,\n            message: errorUtil.toString(message),\n        });\n    }\n    negative(message) {\n        return this._addCheck({\n            kind: \"max\",\n            value: 0,\n            inclusive: false,\n            message: errorUtil.toString(message),\n        });\n    }\n    nonpositive(message) {\n        return this._addCheck({\n            kind: \"max\",\n            value: 0,\n            inclusive: true,\n            message: errorUtil.toString(message),\n        });\n    }\n    nonnegative(message) {\n        return this._addCheck({\n            kind: \"min\",\n            value: 0,\n            inclusive: true,\n            message: errorUtil.toString(message),\n        });\n    }\n    multipleOf(value, message) {\n        return this._addCheck({\n            kind: \"multipleOf\",\n            value: value,\n            message: errorUtil.toString(message),\n        });\n    }\n    finite(message) {\n        return this._addCheck({\n            kind: \"finite\",\n            message: errorUtil.toString(message),\n        });\n    }\n    safe(message) {\n        return this._addCheck({\n            kind: \"min\",\n            inclusive: true,\n            value: Number.MIN_SAFE_INTEGER,\n            message: errorUtil.toString(message),\n        })._addCheck({\n            kind: \"max\",\n            inclusive: true,\n            value: Number.MAX_SAFE_INTEGER,\n            message: errorUtil.toString(message),\n        });\n    }\n    get minValue() {\n        let min = null;\n        for (const ch of this._def.checks) {\n            if (ch.kind === \"min\") {\n                if (min === null || ch.value > min)\n                    min = ch.value;\n            }\n        }\n        return min;\n    }\n    get maxValue() {\n        let max = null;\n        for (const ch of this._def.checks) {\n            if (ch.kind === \"max\") {\n                if (max === null || ch.value < max)\n                    max = ch.value;\n            }\n        }\n        return max;\n    }\n    get isInt() {\n        return !!this._def.checks.find((ch) => ch.kind === \"int\" ||\n            (ch.kind === \"multipleOf\" && util.isInteger(ch.value)));\n    }\n    get isFinite() {\n        let max = null, min = null;\n        for (const ch of this._def.checks) {\n            if (ch.kind === \"finite\" ||\n                ch.kind === \"int\" ||\n                ch.kind === \"multipleOf\") {\n                return true;\n            }\n            else if (ch.kind === \"min\") {\n                if (min === null || ch.value > min)\n                    min = ch.value;\n            }\n            else if (ch.kind === \"max\") {\n                if (max === null || ch.value < max)\n                    max = ch.value;\n            }\n        }\n        return Number.isFinite(min) && Number.isFinite(max);\n    }\n}\nZodNumber.create = (params) => {\n    return new ZodNumber({\n        checks: [],\n        typeName: ZodFirstPartyTypeKind.ZodNumber,\n        coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,\n        ...processCreateParams(params),\n    });\n};\nclass ZodBigInt extends ZodType {\n    constructor() {\n        super(...arguments);\n        this.min = this.gte;\n        this.max = this.lte;\n    }\n    _parse(input) {\n        if (this._def.coerce) {\n            try {\n                input.data = BigInt(input.data);\n            }\n            catch (_a) {\n                return this._getInvalidInput(input);\n            }\n        }\n        const parsedType = this._getType(input);\n        if (parsedType !== ZodParsedType.bigint) {\n            return this._getInvalidInput(input);\n        }\n        let ctx = undefined;\n        const status = new ParseStatus();\n        for (const check of this._def.checks) {\n            if (check.kind === \"min\") {\n                const tooSmall = check.inclusive\n                    ? input.data < check.value\n                    : input.data <= check.value;\n                if (tooSmall) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.too_small,\n                        type: \"bigint\",\n                        minimum: check.value,\n                        inclusive: check.inclusive,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"max\") {\n                const tooBig = check.inclusive\n                    ? input.data > check.value\n                    : input.data >= check.value;\n                if (tooBig) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.too_big,\n                        type: \"bigint\",\n                        maximum: check.value,\n                        inclusive: check.inclusive,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"multipleOf\") {\n                if (input.data % check.value !== BigInt(0)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.not_multiple_of,\n                        multipleOf: check.value,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else {\n                util.assertNever(check);\n            }\n        }\n        return { status: status.value, value: input.data };\n    }\n    _getInvalidInput(input) {\n        const ctx = this._getOrReturnCtx(input);\n        addIssueToContext(ctx, {\n            code: ZodIssueCode.invalid_type,\n            expected: ZodParsedType.bigint,\n            received: ctx.parsedType,\n        });\n        return INVALID;\n    }\n    gte(value, message) {\n        return this.setLimit(\"min\", value, true, errorUtil.toString(message));\n    }\n    gt(value, message) {\n        return this.setLimit(\"min\", value, false, errorUtil.toString(message));\n    }\n    lte(value, message) {\n        return this.setLimit(\"max\", value, true, errorUtil.toString(message));\n    }\n    lt(value, message) {\n        return this.setLimit(\"max\", value, false, errorUtil.toString(message));\n    }\n    setLimit(kind, value, inclusive, message) {\n        return new ZodBigInt({\n            ...this._def,\n            checks: [\n                ...this._def.checks,\n                {\n                    kind,\n                    value,\n                    inclusive,\n                    message: errorUtil.toString(message),\n                },\n            ],\n        });\n    }\n    _addCheck(check) {\n        return new ZodBigInt({\n            ...this._def,\n            checks: [...this._def.checks, check],\n        });\n    }\n    positive(message) {\n        return this._addCheck({\n            kind: \"min\",\n            value: BigInt(0),\n            inclusive: false,\n            message: errorUtil.toString(message),\n        });\n    }\n    negative(message) {\n        return this._addCheck({\n            kind: \"max\",\n            value: BigInt(0),\n            inclusive: false,\n            message: errorUtil.toString(message),\n        });\n    }\n    nonpositive(message) {\n        return this._addCheck({\n            kind: \"max\",\n            value: BigInt(0),\n            inclusive: true,\n            message: errorUtil.toString(message),\n        });\n    }\n    nonnegative(message) {\n        return this._addCheck({\n            kind: \"min\",\n            value: BigInt(0),\n            inclusive: true,\n            message: errorUtil.toString(message),\n        });\n    }\n    multipleOf(value, message) {\n        return this._addCheck({\n            kind: \"multipleOf\",\n            value,\n            message: errorUtil.toString(message),\n        });\n    }\n    get minValue() {\n        let min = null;\n        for (const ch of this._def.checks) {\n            if (ch.kind === \"min\") {\n                if (min === null || ch.value > min)\n                    min = ch.value;\n            }\n        }\n        return min;\n    }\n    get maxValue() {\n        let max = null;\n        for (const ch of this._def.checks) {\n            if (ch.kind === \"max\") {\n                if (max === null || ch.value < max)\n                    max = ch.value;\n            }\n        }\n        return max;\n    }\n}\nZodBigInt.create = (params) => {\n    var _a;\n    return new ZodBigInt({\n        checks: [],\n        typeName: ZodFirstPartyTypeKind.ZodBigInt,\n        coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,\n        ...processCreateParams(params),\n    });\n};\nclass ZodBoolean extends ZodType {\n    _parse(input) {\n        if (this._def.coerce) {\n            input.data = Boolean(input.data);\n        }\n        const parsedType = this._getType(input);\n        if (parsedType !== ZodParsedType.boolean) {\n            const ctx = this._getOrReturnCtx(input);\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.boolean,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        return OK(input.data);\n    }\n}\nZodBoolean.create = (params) => {\n    return new ZodBoolean({\n        typeName: ZodFirstPartyTypeKind.ZodBoolean,\n        coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,\n        ...processCreateParams(params),\n    });\n};\nclass ZodDate extends ZodType {\n    _parse(input) {\n        if (this._def.coerce) {\n            input.data = new Date(input.data);\n        }\n        const parsedType = this._getType(input);\n        if (parsedType !== ZodParsedType.date) {\n            const ctx = this._getOrReturnCtx(input);\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.date,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        if (isNaN(input.data.getTime())) {\n            const ctx = this._getOrReturnCtx(input);\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_date,\n            });\n            return INVALID;\n        }\n        const status = new ParseStatus();\n        let ctx = undefined;\n        for (const check of this._def.checks) {\n            if (check.kind === \"min\") {\n                if (input.data.getTime() < check.value) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.too_small,\n                        message: check.message,\n                        inclusive: true,\n                        exact: false,\n                        minimum: check.value,\n                        type: \"date\",\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"max\") {\n                if (input.data.getTime() > check.value) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.too_big,\n                        message: check.message,\n                        inclusive: true,\n                        exact: false,\n                        maximum: check.value,\n                        type: \"date\",\n                    });\n                    status.dirty();\n                }\n            }\n            else {\n                util.assertNever(check);\n            }\n        }\n        return {\n            status: status.value,\n            value: new Date(input.data.getTime()),\n        };\n    }\n    _addCheck(check) {\n        return new ZodDate({\n            ...this._def,\n            checks: [...this._def.checks, check],\n        });\n    }\n    min(minDate, message) {\n        return this._addCheck({\n            kind: \"min\",\n            value: minDate.getTime(),\n            message: errorUtil.toString(message),\n        });\n    }\n    max(maxDate, message) {\n        return this._addCheck({\n            kind: \"max\",\n            value: maxDate.getTime(),\n            message: errorUtil.toString(message),\n        });\n    }\n    get minDate() {\n        let min = null;\n        for (const ch of this._def.checks) {\n            if (ch.kind === \"min\") {\n                if (min === null || ch.value > min)\n                    min = ch.value;\n            }\n        }\n        return min != null ? new Date(min) : null;\n    }\n    get maxDate() {\n        let max = null;\n        for (const ch of this._def.checks) {\n            if (ch.kind === \"max\") {\n                if (max === null || ch.value < max)\n                    max = ch.value;\n            }\n        }\n        return max != null ? new Date(max) : null;\n    }\n}\nZodDate.create = (params) => {\n    return new ZodDate({\n        checks: [],\n        coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,\n        typeName: ZodFirstPartyTypeKind.ZodDate,\n        ...processCreateParams(params),\n    });\n};\nclass ZodSymbol extends ZodType {\n    _parse(input) {\n        const parsedType = this._getType(input);\n        if (parsedType !== ZodParsedType.symbol) {\n            const ctx = this._getOrReturnCtx(input);\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.symbol,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        return OK(input.data);\n    }\n}\nZodSymbol.create = (params) => {\n    return new ZodSymbol({\n        typeName: ZodFirstPartyTypeKind.ZodSymbol,\n        ...processCreateParams(params),\n    });\n};\nclass ZodUndefined extends ZodType {\n    _parse(input) {\n        const parsedType = this._getType(input);\n        if (parsedType !== ZodParsedType.undefined) {\n            const ctx = this._getOrReturnCtx(input);\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.undefined,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        return OK(input.data);\n    }\n}\nZodUndefined.create = (params) => {\n    return new ZodUndefined({\n        typeName: ZodFirstPartyTypeKind.ZodUndefined,\n        ...processCreateParams(params),\n    });\n};\nclass ZodNull extends ZodType {\n    _parse(input) {\n        const parsedType = this._getType(input);\n        if (parsedType !== ZodParsedType.null) {\n            const ctx = this._getOrReturnCtx(input);\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.null,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        return OK(input.data);\n    }\n}\nZodNull.create = (params) => {\n    return new ZodNull({\n        typeName: ZodFirstPartyTypeKind.ZodNull,\n        ...processCreateParams(params),\n    });\n};\nclass ZodAny extends ZodType {\n    constructor() {\n        super(...arguments);\n        // to prevent instances of other classes from extending ZodAny. this causes issues with catchall in ZodObject.\n        this._any = true;\n    }\n    _parse(input) {\n        return OK(input.data);\n    }\n}\nZodAny.create = (params) => {\n    return new ZodAny({\n        typeName: ZodFirstPartyTypeKind.ZodAny,\n        ...processCreateParams(params),\n    });\n};\nclass ZodUnknown extends ZodType {\n    constructor() {\n        super(...arguments);\n        // required\n        this._unknown = true;\n    }\n    _parse(input) {\n        return OK(input.data);\n    }\n}\nZodUnknown.create = (params) => {\n    return new ZodUnknown({\n        typeName: ZodFirstPartyTypeKind.ZodUnknown,\n        ...processCreateParams(params),\n    });\n};\nclass ZodNever extends ZodType {\n    _parse(input) {\n        const ctx = this._getOrReturnCtx(input);\n        addIssueToContext(ctx, {\n            code: ZodIssueCode.invalid_type,\n            expected: ZodParsedType.never,\n            received: ctx.parsedType,\n        });\n        return INVALID;\n    }\n}\nZodNever.create = (params) => {\n    return new ZodNever({\n        typeName: ZodFirstPartyTypeKind.ZodNever,\n        ...processCreateParams(params),\n    });\n};\nclass ZodVoid extends ZodType {\n    _parse(input) {\n        const parsedType = this._getType(input);\n        if (parsedType !== ZodParsedType.undefined) {\n            const ctx = this._getOrReturnCtx(input);\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.void,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        return OK(input.data);\n    }\n}\nZodVoid.create = (params) => {\n    return new ZodVoid({\n        typeName: ZodFirstPartyTypeKind.ZodVoid,\n        ...processCreateParams(params),\n    });\n};\nclass ZodArray extends ZodType {\n    _parse(input) {\n        const { ctx, status } = this._processInputParams(input);\n        const def = this._def;\n        if (ctx.parsedType !== ZodParsedType.array) {\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.array,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        if (def.exactLength !== null) {\n            const tooBig = ctx.data.length > def.exactLength.value;\n            const tooSmall = ctx.data.length < def.exactLength.value;\n            if (tooBig || tooSmall) {\n                addIssueToContext(ctx, {\n                    code: tooBig ? ZodIssueCode.too_big : ZodIssueCode.too_small,\n                    minimum: (tooSmall ? def.exactLength.value : undefined),\n                    maximum: (tooBig ? def.exactLength.value : undefined),\n                    type: \"array\",\n                    inclusive: true,\n                    exact: true,\n                    message: def.exactLength.message,\n                });\n                status.dirty();\n            }\n        }\n        if (def.minLength !== null) {\n            if (ctx.data.length < def.minLength.value) {\n                addIssueToContext(ctx, {\n                    code: ZodIssueCode.too_small,\n                    minimum: def.minLength.value,\n                    type: \"array\",\n                    inclusive: true,\n                    exact: false,\n                    message: def.minLength.message,\n                });\n                status.dirty();\n            }\n        }\n        if (def.maxLength !== null) {\n            if (ctx.data.length > def.maxLength.value) {\n                addIssueToContext(ctx, {\n                    code: ZodIssueCode.too_big,\n                    maximum: def.maxLength.value,\n                    type: \"array\",\n                    inclusive: true,\n                    exact: false,\n                    message: def.maxLength.message,\n                });\n                status.dirty();\n            }\n        }\n        if (ctx.common.async) {\n            return Promise.all([...ctx.data].map((item, i) => {\n                return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i));\n            })).then((result) => {\n                return ParseStatus.mergeArray(status, result);\n            });\n        }\n        const result = [...ctx.data].map((item, i) => {\n            return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i));\n        });\n        return ParseStatus.mergeArray(status, result);\n    }\n    get element() {\n        return this._def.type;\n    }\n    min(minLength, message) {\n        return new ZodArray({\n            ...this._def,\n            minLength: { value: minLength, message: errorUtil.toString(message) },\n        });\n    }\n    max(maxLength, message) {\n        return new ZodArray({\n            ...this._def,\n            maxLength: { value: maxLength, message: errorUtil.toString(message) },\n        });\n    }\n    length(len, message) {\n        return new ZodArray({\n            ...this._def,\n            exactLength: { value: len, message: errorUtil.toString(message) },\n        });\n    }\n    nonempty(message) {\n        return this.min(1, message);\n    }\n}\nZodArray.create = (schema, params) => {\n    return new ZodArray({\n        type: schema,\n        minLength: null,\n        maxLength: null,\n        exactLength: null,\n        typeName: ZodFirstPartyTypeKind.ZodArray,\n        ...processCreateParams(params),\n    });\n};\nfunction deepPartialify(schema) {\n    if (schema instanceof ZodObject) {\n        const newShape = {};\n        for (const key in schema.shape) {\n            const fieldSchema = schema.shape[key];\n            newShape[key] = ZodOptional.create(deepPartialify(fieldSchema));\n        }\n        return new ZodObject({\n            ...schema._def,\n            shape: () => newShape,\n        });\n    }\n    else if (schema instanceof ZodArray) {\n        return new ZodArray({\n            ...schema._def,\n            type: deepPartialify(schema.element),\n        });\n    }\n    else if (schema instanceof ZodOptional) {\n        return ZodOptional.create(deepPartialify(schema.unwrap()));\n    }\n    else if (schema instanceof ZodNullable) {\n        return ZodNullable.create(deepPartialify(schema.unwrap()));\n    }\n    else if (schema instanceof ZodTuple) {\n        return ZodTuple.create(schema.items.map((item) => deepPartialify(item)));\n    }\n    else {\n        return schema;\n    }\n}\nclass ZodObject extends ZodType {\n    constructor() {\n        super(...arguments);\n        this._cached = null;\n        /**\n         * @deprecated In most cases, this is no longer needed - unknown properties are now silently stripped.\n         * If you want to pass through unknown properties, use `.passthrough()` instead.\n         */\n        this.nonstrict = this.passthrough;\n        // extend<\n        //   Augmentation extends ZodRawShape,\n        //   NewOutput extends util.flatten<{\n        //     [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation\n        //       ? Augmentation[k][\"_output\"]\n        //       : k extends keyof Output\n        //       ? Output[k]\n        //       : never;\n        //   }>,\n        //   NewInput extends util.flatten<{\n        //     [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation\n        //       ? Augmentation[k][\"_input\"]\n        //       : k extends keyof Input\n        //       ? Input[k]\n        //       : never;\n        //   }>\n        // >(\n        //   augmentation: Augmentation\n        // ): ZodObject<\n        //   extendShape<T, Augmentation>,\n        //   UnknownKeys,\n        //   Catchall,\n        //   NewOutput,\n        //   NewInput\n        // > {\n        //   return new ZodObject({\n        //     ...this._def,\n        //     shape: () => ({\n        //       ...this._def.shape(),\n        //       ...augmentation,\n        //     }),\n        //   }) as any;\n        // }\n        /**\n         * @deprecated Use `.extend` instead\n         *  */\n        this.augment = this.extend;\n    }\n    _getCached() {\n        if (this._cached !== null)\n            return this._cached;\n        const shape = this._def.shape();\n        const keys = util.objectKeys(shape);\n        return (this._cached = { shape, keys });\n    }\n    _parse(input) {\n        const parsedType = this._getType(input);\n        if (parsedType !== ZodParsedType.object) {\n            const ctx = this._getOrReturnCtx(input);\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.object,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        const { status, ctx } = this._processInputParams(input);\n        const { shape, keys: shapeKeys } = this._getCached();\n        const extraKeys = [];\n        if (!(this._def.catchall instanceof ZodNever &&\n            this._def.unknownKeys === \"strip\")) {\n            for (const key in ctx.data) {\n                if (!shapeKeys.includes(key)) {\n                    extraKeys.push(key);\n                }\n            }\n        }\n        const pairs = [];\n        for (const key of shapeKeys) {\n            const keyValidator = shape[key];\n            const value = ctx.data[key];\n            pairs.push({\n                key: { status: \"valid\", value: key },\n                value: keyValidator._parse(new ParseInputLazyPath(ctx, value, ctx.path, key)),\n                alwaysSet: key in ctx.data,\n            });\n        }\n        if (this._def.catchall instanceof ZodNever) {\n            const unknownKeys = this._def.unknownKeys;\n            if (unknownKeys === \"passthrough\") {\n                for (const key of extraKeys) {\n                    pairs.push({\n                        key: { status: \"valid\", value: key },\n                        value: { status: \"valid\", value: ctx.data[key] },\n                    });\n                }\n            }\n            else if (unknownKeys === \"strict\") {\n                if (extraKeys.length > 0) {\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.unrecognized_keys,\n                        keys: extraKeys,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (unknownKeys === \"strip\") ;\n            else {\n                throw new Error(`Internal ZodObject error: invalid unknownKeys value.`);\n            }\n        }\n        else {\n            // run catchall validation\n            const catchall = this._def.catchall;\n            for (const key of extraKeys) {\n                const value = ctx.data[key];\n                pairs.push({\n                    key: { status: \"valid\", value: key },\n                    value: catchall._parse(new ParseInputLazyPath(ctx, value, ctx.path, key) //, ctx.child(key), value, getParsedType(value)\n                    ),\n                    alwaysSet: key in ctx.data,\n                });\n            }\n        }\n        if (ctx.common.async) {\n            return Promise.resolve()\n                .then(async () => {\n                const syncPairs = [];\n                for (const pair of pairs) {\n                    const key = await pair.key;\n                    const value = await pair.value;\n                    syncPairs.push({\n                        key,\n                        value,\n                        alwaysSet: pair.alwaysSet,\n                    });\n                }\n                return syncPairs;\n            })\n                .then((syncPairs) => {\n                return ParseStatus.mergeObjectSync(status, syncPairs);\n            });\n        }\n        else {\n            return ParseStatus.mergeObjectSync(status, pairs);\n        }\n    }\n    get shape() {\n        return this._def.shape();\n    }\n    strict(message) {\n        errorUtil.errToObj;\n        return new ZodObject({\n            ...this._def,\n            unknownKeys: \"strict\",\n            ...(message !== undefined\n                ? {\n                    errorMap: (issue, ctx) => {\n                        var _a, _b, _c, _d;\n                        const defaultError = (_c = (_b = (_a = this._def).errorMap) === null || _b === void 0 ? void 0 : _b.call(_a, issue, ctx).message) !== null && _c !== void 0 ? _c : ctx.defaultError;\n                        if (issue.code === \"unrecognized_keys\")\n                            return {\n                                message: (_d = errorUtil.errToObj(message).message) !== null && _d !== void 0 ? _d : defaultError,\n                            };\n                        return {\n                            message: defaultError,\n                        };\n                    },\n                }\n                : {}),\n        });\n    }\n    strip() {\n        return new ZodObject({\n            ...this._def,\n            unknownKeys: \"strip\",\n        });\n    }\n    passthrough() {\n        return new ZodObject({\n            ...this._def,\n            unknownKeys: \"passthrough\",\n        });\n    }\n    // const AugmentFactory =\n    //   <Def extends ZodObjectDef>(def: Def) =>\n    //   <Augmentation extends ZodRawShape>(\n    //     augmentation: Augmentation\n    //   ): ZodObject<\n    //     extendShape<ReturnType<Def[\"shape\"]>, Augmentation>,\n    //     Def[\"unknownKeys\"],\n    //     Def[\"catchall\"]\n    //   > => {\n    //     return new ZodObject({\n    //       ...def,\n    //       shape: () => ({\n    //         ...def.shape(),\n    //         ...augmentation,\n    //       }),\n    //     }) as any;\n    //   };\n    extend(augmentation) {\n        return new ZodObject({\n            ...this._def,\n            shape: () => ({\n                ...this._def.shape(),\n                ...augmentation,\n            }),\n        });\n    }\n    /**\n     * Prior to zod@1.0.12 there was a bug in the\n     * inferred type of merged objects. Please\n     * upgrade if you are experiencing issues.\n     */\n    merge(merging) {\n        const merged = new ZodObject({\n            unknownKeys: merging._def.unknownKeys,\n            catchall: merging._def.catchall,\n            shape: () => ({\n                ...this._def.shape(),\n                ...merging._def.shape(),\n            }),\n            typeName: ZodFirstPartyTypeKind.ZodObject,\n        });\n        return merged;\n    }\n    // merge<\n    //   Incoming extends AnyZodObject,\n    //   Augmentation extends Incoming[\"shape\"],\n    //   NewOutput extends {\n    //     [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation\n    //       ? Augmentation[k][\"_output\"]\n    //       : k extends keyof Output\n    //       ? Output[k]\n    //       : never;\n    //   },\n    //   NewInput extends {\n    //     [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation\n    //       ? Augmentation[k][\"_input\"]\n    //       : k extends keyof Input\n    //       ? Input[k]\n    //       : never;\n    //   }\n    // >(\n    //   merging: Incoming\n    // ): ZodObject<\n    //   extendShape<T, ReturnType<Incoming[\"_def\"][\"shape\"]>>,\n    //   Incoming[\"_def\"][\"unknownKeys\"],\n    //   Incoming[\"_def\"][\"catchall\"],\n    //   NewOutput,\n    //   NewInput\n    // > {\n    //   const merged: any = new ZodObject({\n    //     unknownKeys: merging._def.unknownKeys,\n    //     catchall: merging._def.catchall,\n    //     shape: () =>\n    //       objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n    //     typeName: ZodFirstPartyTypeKind.ZodObject,\n    //   }) as any;\n    //   return merged;\n    // }\n    setKey(key, schema) {\n        return this.augment({ [key]: schema });\n    }\n    // merge<Incoming extends AnyZodObject>(\n    //   merging: Incoming\n    // ): //ZodObject<T & Incoming[\"_shape\"], UnknownKeys, Catchall> = (merging) => {\n    // ZodObject<\n    //   extendShape<T, ReturnType<Incoming[\"_def\"][\"shape\"]>>,\n    //   Incoming[\"_def\"][\"unknownKeys\"],\n    //   Incoming[\"_def\"][\"catchall\"]\n    // > {\n    //   // const mergedShape = objectUtil.mergeShapes(\n    //   //   this._def.shape(),\n    //   //   merging._def.shape()\n    //   // );\n    //   const merged: any = new ZodObject({\n    //     unknownKeys: merging._def.unknownKeys,\n    //     catchall: merging._def.catchall,\n    //     shape: () =>\n    //       objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n    //     typeName: ZodFirstPartyTypeKind.ZodObject,\n    //   }) as any;\n    //   return merged;\n    // }\n    catchall(index) {\n        return new ZodObject({\n            ...this._def,\n            catchall: index,\n        });\n    }\n    pick(mask) {\n        const shape = {};\n        util.objectKeys(mask).forEach((key) => {\n            if (mask[key] && this.shape[key]) {\n                shape[key] = this.shape[key];\n            }\n        });\n        return new ZodObject({\n            ...this._def,\n            shape: () => shape,\n        });\n    }\n    omit(mask) {\n        const shape = {};\n        util.objectKeys(this.shape).forEach((key) => {\n            if (!mask[key]) {\n                shape[key] = this.shape[key];\n            }\n        });\n        return new ZodObject({\n            ...this._def,\n            shape: () => shape,\n        });\n    }\n    /**\n     * @deprecated\n     */\n    deepPartial() {\n        return deepPartialify(this);\n    }\n    partial(mask) {\n        const newShape = {};\n        util.objectKeys(this.shape).forEach((key) => {\n            const fieldSchema = this.shape[key];\n            if (mask && !mask[key]) {\n                newShape[key] = fieldSchema;\n            }\n            else {\n                newShape[key] = fieldSchema.optional();\n            }\n        });\n        return new ZodObject({\n            ...this._def,\n            shape: () => newShape,\n        });\n    }\n    required(mask) {\n        const newShape = {};\n        util.objectKeys(this.shape).forEach((key) => {\n            if (mask && !mask[key]) {\n                newShape[key] = this.shape[key];\n            }\n            else {\n                const fieldSchema = this.shape[key];\n                let newField = fieldSchema;\n                while (newField instanceof ZodOptional) {\n                    newField = newField._def.innerType;\n                }\n                newShape[key] = newField;\n            }\n        });\n        return new ZodObject({\n            ...this._def,\n            shape: () => newShape,\n        });\n    }\n    keyof() {\n        return createZodEnum(util.objectKeys(this.shape));\n    }\n}\nZodObject.create = (shape, params) => {\n    return new ZodObject({\n        shape: () => shape,\n        unknownKeys: \"strip\",\n        catchall: ZodNever.create(),\n        typeName: ZodFirstPartyTypeKind.ZodObject,\n        ...processCreateParams(params),\n    });\n};\nZodObject.strictCreate = (shape, params) => {\n    return new ZodObject({\n        shape: () => shape,\n        unknownKeys: \"strict\",\n        catchall: ZodNever.create(),\n        typeName: ZodFirstPartyTypeKind.ZodObject,\n        ...processCreateParams(params),\n    });\n};\nZodObject.lazycreate = (shape, params) => {\n    return new ZodObject({\n        shape,\n        unknownKeys: \"strip\",\n        catchall: ZodNever.create(),\n        typeName: ZodFirstPartyTypeKind.ZodObject,\n        ...processCreateParams(params),\n    });\n};\nclass ZodUnion extends ZodType {\n    _parse(input) {\n        const { ctx } = this._processInputParams(input);\n        const options = this._def.options;\n        function handleResults(results) {\n            // return first issue-free validation if it exists\n            for (const result of results) {\n                if (result.result.status === \"valid\") {\n                    return result.result;\n                }\n            }\n            for (const result of results) {\n                if (result.result.status === \"dirty\") {\n                    // add issues from dirty option\n                    ctx.common.issues.push(...result.ctx.common.issues);\n                    return result.result;\n                }\n            }\n            // return invalid\n            const unionErrors = results.map((result) => new ZodError(result.ctx.common.issues));\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_union,\n                unionErrors,\n            });\n            return INVALID;\n        }\n        if (ctx.common.async) {\n            return Promise.all(options.map(async (option) => {\n                const childCtx = {\n                    ...ctx,\n                    common: {\n                        ...ctx.common,\n                        issues: [],\n                    },\n                    parent: null,\n                };\n                return {\n                    result: await option._parseAsync({\n                        data: ctx.data,\n                        path: ctx.path,\n                        parent: childCtx,\n                    }),\n                    ctx: childCtx,\n                };\n            })).then(handleResults);\n        }\n        else {\n            let dirty = undefined;\n            const issues = [];\n            for (const option of options) {\n                const childCtx = {\n                    ...ctx,\n                    common: {\n                        ...ctx.common,\n                        issues: [],\n                    },\n                    parent: null,\n                };\n                const result = option._parseSync({\n                    data: ctx.data,\n                    path: ctx.path,\n                    parent: childCtx,\n                });\n                if (result.status === \"valid\") {\n                    return result;\n                }\n                else if (result.status === \"dirty\" && !dirty) {\n                    dirty = { result, ctx: childCtx };\n                }\n                if (childCtx.common.issues.length) {\n                    issues.push(childCtx.common.issues);\n                }\n            }\n            if (dirty) {\n                ctx.common.issues.push(...dirty.ctx.common.issues);\n                return dirty.result;\n            }\n            const unionErrors = issues.map((issues) => new ZodError(issues));\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_union,\n                unionErrors,\n            });\n            return INVALID;\n        }\n    }\n    get options() {\n        return this._def.options;\n    }\n}\nZodUnion.create = (types, params) => {\n    return new ZodUnion({\n        options: types,\n        typeName: ZodFirstPartyTypeKind.ZodUnion,\n        ...processCreateParams(params),\n    });\n};\n/////////////////////////////////////////////////////\n/////////////////////////////////////////////////////\n//////////                                 //////////\n//////////      ZodDiscriminatedUnion      //////////\n//////////                                 //////////\n/////////////////////////////////////////////////////\n/////////////////////////////////////////////////////\nconst getDiscriminator = (type) => {\n    if (type instanceof ZodLazy) {\n        return getDiscriminator(type.schema);\n    }\n    else if (type instanceof ZodEffects) {\n        return getDiscriminator(type.innerType());\n    }\n    else if (type instanceof ZodLiteral) {\n        return [type.value];\n    }\n    else if (type instanceof ZodEnum) {\n        return type.options;\n    }\n    else if (type instanceof ZodNativeEnum) {\n        // eslint-disable-next-line ban/ban\n        return util.objectValues(type.enum);\n    }\n    else if (type instanceof ZodDefault) {\n        return getDiscriminator(type._def.innerType);\n    }\n    else if (type instanceof ZodUndefined) {\n        return [undefined];\n    }\n    else if (type instanceof ZodNull) {\n        return [null];\n    }\n    else if (type instanceof ZodOptional) {\n        return [undefined, ...getDiscriminator(type.unwrap())];\n    }\n    else if (type instanceof ZodNullable) {\n        return [null, ...getDiscriminator(type.unwrap())];\n    }\n    else if (type instanceof ZodBranded) {\n        return getDiscriminator(type.unwrap());\n    }\n    else if (type instanceof ZodReadonly) {\n        return getDiscriminator(type.unwrap());\n    }\n    else if (type instanceof ZodCatch) {\n        return getDiscriminator(type._def.innerType);\n    }\n    else {\n        return [];\n    }\n};\nclass ZodDiscriminatedUnion extends ZodType {\n    _parse(input) {\n        const { ctx } = this._processInputParams(input);\n        if (ctx.parsedType !== ZodParsedType.object) {\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.object,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        const discriminator = this.discriminator;\n        const discriminatorValue = ctx.data[discriminator];\n        const option = this.optionsMap.get(discriminatorValue);\n        if (!option) {\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_union_discriminator,\n                options: Array.from(this.optionsMap.keys()),\n                path: [discriminator],\n            });\n            return INVALID;\n        }\n        if (ctx.common.async) {\n            return option._parseAsync({\n                data: ctx.data,\n                path: ctx.path,\n                parent: ctx,\n            });\n        }\n        else {\n            return option._parseSync({\n                data: ctx.data,\n                path: ctx.path,\n                parent: ctx,\n            });\n        }\n    }\n    get discriminator() {\n        return this._def.discriminator;\n    }\n    get options() {\n        return this._def.options;\n    }\n    get optionsMap() {\n        return this._def.optionsMap;\n    }\n    /**\n     * The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor.\n     * However, it only allows a union of objects, all of which need to share a discriminator property. This property must\n     * have a different value for each object in the union.\n     * @param discriminator the name of the discriminator property\n     * @param types an array of object schemas\n     * @param params\n     */\n    static create(discriminator, options, params) {\n        // Get all the valid discriminator values\n        const optionsMap = new Map();\n        // try {\n        for (const type of options) {\n            const discriminatorValues = getDiscriminator(type.shape[discriminator]);\n            if (!discriminatorValues.length) {\n                throw new Error(`A discriminator value for key \\`${discriminator}\\` could not be extracted from all schema options`);\n            }\n            for (const value of discriminatorValues) {\n                if (optionsMap.has(value)) {\n                    throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value)}`);\n                }\n                optionsMap.set(value, type);\n            }\n        }\n        return new ZodDiscriminatedUnion({\n            typeName: ZodFirstPartyTypeKind.ZodDiscriminatedUnion,\n            discriminator,\n            options,\n            optionsMap,\n            ...processCreateParams(params),\n        });\n    }\n}\nfunction mergeValues(a, b) {\n    const aType = getParsedType(a);\n    const bType = getParsedType(b);\n    if (a === b) {\n        return { valid: true, data: a };\n    }\n    else if (aType === ZodParsedType.object && bType === ZodParsedType.object) {\n        const bKeys = util.objectKeys(b);\n        const sharedKeys = util\n            .objectKeys(a)\n            .filter((key) => bKeys.indexOf(key) !== -1);\n        const newObj = { ...a, ...b };\n        for (const key of sharedKeys) {\n            const sharedValue = mergeValues(a[key], b[key]);\n            if (!sharedValue.valid) {\n                return { valid: false };\n            }\n            newObj[key] = sharedValue.data;\n        }\n        return { valid: true, data: newObj };\n    }\n    else if (aType === ZodParsedType.array && bType === ZodParsedType.array) {\n        if (a.length !== b.length) {\n            return { valid: false };\n        }\n        const newArray = [];\n        for (let index = 0; index < a.length; index++) {\n            const itemA = a[index];\n            const itemB = b[index];\n            const sharedValue = mergeValues(itemA, itemB);\n            if (!sharedValue.valid) {\n                return { valid: false };\n            }\n            newArray.push(sharedValue.data);\n        }\n        return { valid: true, data: newArray };\n    }\n    else if (aType === ZodParsedType.date &&\n        bType === ZodParsedType.date &&\n        +a === +b) {\n        return { valid: true, data: a };\n    }\n    else {\n        return { valid: false };\n    }\n}\nclass ZodIntersection extends ZodType {\n    _parse(input) {\n        const { status, ctx } = this._processInputParams(input);\n        const handleParsed = (parsedLeft, parsedRight) => {\n            if (isAborted(parsedLeft) || isAborted(parsedRight)) {\n                return INVALID;\n            }\n            const merged = mergeValues(parsedLeft.value, parsedRight.value);\n            if (!merged.valid) {\n                addIssueToContext(ctx, {\n                    code: ZodIssueCode.invalid_intersection_types,\n                });\n                return INVALID;\n            }\n            if (isDirty(parsedLeft) || isDirty(parsedRight)) {\n                status.dirty();\n            }\n            return { status: status.value, value: merged.data };\n        };\n        if (ctx.common.async) {\n            return Promise.all([\n                this._def.left._parseAsync({\n                    data: ctx.data,\n                    path: ctx.path,\n                    parent: ctx,\n                }),\n                this._def.right._parseAsync({\n                    data: ctx.data,\n                    path: ctx.path,\n                    parent: ctx,\n                }),\n            ]).then(([left, right]) => handleParsed(left, right));\n        }\n        else {\n            return handleParsed(this._def.left._parseSync({\n                data: ctx.data,\n                path: ctx.path,\n                parent: ctx,\n            }), this._def.right._parseSync({\n                data: ctx.data,\n                path: ctx.path,\n                parent: ctx,\n            }));\n        }\n    }\n}\nZodIntersection.create = (left, right, params) => {\n    return new ZodIntersection({\n        left: left,\n        right: right,\n        typeName: ZodFirstPartyTypeKind.ZodIntersection,\n        ...processCreateParams(params),\n    });\n};\nclass ZodTuple extends ZodType {\n    _parse(input) {\n        const { status, ctx } = this._processInputParams(input);\n        if (ctx.parsedType !== ZodParsedType.array) {\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.array,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        if (ctx.data.length < this._def.items.length) {\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.too_small,\n                minimum: this._def.items.length,\n                inclusive: true,\n                exact: false,\n                type: \"array\",\n            });\n            return INVALID;\n        }\n        const rest = this._def.rest;\n        if (!rest && ctx.data.length > this._def.items.length) {\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.too_big,\n                maximum: this._def.items.length,\n                inclusive: true,\n                exact: false,\n                type: \"array\",\n            });\n            status.dirty();\n        }\n        const items = [...ctx.data]\n            .map((item, itemIndex) => {\n            const schema = this._def.items[itemIndex] || this._def.rest;\n            if (!schema)\n                return null;\n            return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex));\n        })\n            .filter((x) => !!x); // filter nulls\n        if (ctx.common.async) {\n            return Promise.all(items).then((results) => {\n                return ParseStatus.mergeArray(status, results);\n            });\n        }\n        else {\n            return ParseStatus.mergeArray(status, items);\n        }\n    }\n    get items() {\n        return this._def.items;\n    }\n    rest(rest) {\n        return new ZodTuple({\n            ...this._def,\n            rest,\n        });\n    }\n}\nZodTuple.create = (schemas, params) => {\n    if (!Array.isArray(schemas)) {\n        throw new Error(\"You must pass an array of schemas to z.tuple([ ... ])\");\n    }\n    return new ZodTuple({\n        items: schemas,\n        typeName: ZodFirstPartyTypeKind.ZodTuple,\n        rest: null,\n        ...processCreateParams(params),\n    });\n};\nclass ZodRecord extends ZodType {\n    get keySchema() {\n        return this._def.keyType;\n    }\n    get valueSchema() {\n        return this._def.valueType;\n    }\n    _parse(input) {\n        const { status, ctx } = this._processInputParams(input);\n        if (ctx.parsedType !== ZodParsedType.object) {\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.object,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        const pairs = [];\n        const keyType = this._def.keyType;\n        const valueType = this._def.valueType;\n        for (const key in ctx.data) {\n            pairs.push({\n                key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, key)),\n                value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key)),\n                alwaysSet: key in ctx.data,\n            });\n        }\n        if (ctx.common.async) {\n            return ParseStatus.mergeObjectAsync(status, pairs);\n        }\n        else {\n            return ParseStatus.mergeObjectSync(status, pairs);\n        }\n    }\n    get element() {\n        return this._def.valueType;\n    }\n    static create(first, second, third) {\n        if (second instanceof ZodType) {\n            return new ZodRecord({\n                keyType: first,\n                valueType: second,\n                typeName: ZodFirstPartyTypeKind.ZodRecord,\n                ...processCreateParams(third),\n            });\n        }\n        return new ZodRecord({\n            keyType: ZodString.create(),\n            valueType: first,\n            typeName: ZodFirstPartyTypeKind.ZodRecord,\n            ...processCreateParams(second),\n        });\n    }\n}\nclass ZodMap extends ZodType {\n    get keySchema() {\n        return this._def.keyType;\n    }\n    get valueSchema() {\n        return this._def.valueType;\n    }\n    _parse(input) {\n        const { status, ctx } = this._processInputParams(input);\n        if (ctx.parsedType !== ZodParsedType.map) {\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.map,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        const keyType = this._def.keyType;\n        const valueType = this._def.valueType;\n        const pairs = [...ctx.data.entries()].map(([key, value], index) => {\n            return {\n                key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, [index, \"key\"])),\n                value: valueType._parse(new ParseInputLazyPath(ctx, value, ctx.path, [index, \"value\"])),\n            };\n        });\n        if (ctx.common.async) {\n            const finalMap = new Map();\n            return Promise.resolve().then(async () => {\n                for (const pair of pairs) {\n                    const key = await pair.key;\n                    const value = await pair.value;\n                    if (key.status === \"aborted\" || value.status === \"aborted\") {\n                        return INVALID;\n                    }\n                    if (key.status === \"dirty\" || value.status === \"dirty\") {\n                        status.dirty();\n                    }\n                    finalMap.set(key.value, value.value);\n                }\n                return { status: status.value, value: finalMap };\n            });\n        }\n        else {\n            const finalMap = new Map();\n            for (const pair of pairs) {\n                const key = pair.key;\n                const value = pair.value;\n                if (key.status === \"aborted\" || value.status === \"aborted\") {\n                    return INVALID;\n                }\n                if (key.status === \"dirty\" || value.status === \"dirty\") {\n                    status.dirty();\n                }\n                finalMap.set(key.value, value.value);\n            }\n            return { status: status.value, value: finalMap };\n        }\n    }\n}\nZodMap.create = (keyType, valueType, params) => {\n    return new ZodMap({\n        valueType,\n        keyType,\n        typeName: ZodFirstPartyTypeKind.ZodMap,\n        ...processCreateParams(params),\n    });\n};\nclass ZodSet extends ZodType {\n    _parse(input) {\n        const { status, ctx } = this._processInputParams(input);\n        if (ctx.parsedType !== ZodParsedType.set) {\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.set,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        const def = this._def;\n        if (def.minSize !== null) {\n            if (ctx.data.size < def.minSize.value) {\n                addIssueToContext(ctx, {\n                    code: ZodIssueCode.too_small,\n                    minimum: def.minSize.value,\n                    type: \"set\",\n                    inclusive: true,\n                    exact: false,\n                    message: def.minSize.message,\n                });\n                status.dirty();\n            }\n        }\n        if (def.maxSize !== null) {\n            if (ctx.data.size > def.maxSize.value) {\n                addIssueToContext(ctx, {\n                    code: ZodIssueCode.too_big,\n                    maximum: def.maxSize.value,\n                    type: \"set\",\n                    inclusive: true,\n                    exact: false,\n                    message: def.maxSize.message,\n                });\n                status.dirty();\n            }\n        }\n        const valueType = this._def.valueType;\n        function finalizeSet(elements) {\n            const parsedSet = new Set();\n            for (const element of elements) {\n                if (element.status === \"aborted\")\n                    return INVALID;\n                if (element.status === \"dirty\")\n                    status.dirty();\n                parsedSet.add(element.value);\n            }\n            return { status: status.value, value: parsedSet };\n        }\n        const elements = [...ctx.data.values()].map((item, i) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i)));\n        if (ctx.common.async) {\n            return Promise.all(elements).then((elements) => finalizeSet(elements));\n        }\n        else {\n            return finalizeSet(elements);\n        }\n    }\n    min(minSize, message) {\n        return new ZodSet({\n            ...this._def,\n            minSize: { value: minSize, message: errorUtil.toString(message) },\n        });\n    }\n    max(maxSize, message) {\n        return new ZodSet({\n            ...this._def,\n            maxSize: { value: maxSize, message: errorUtil.toString(message) },\n        });\n    }\n    size(size, message) {\n        return this.min(size, message).max(size, message);\n    }\n    nonempty(message) {\n        return this.min(1, message);\n    }\n}\nZodSet.create = (valueType, params) => {\n    return new ZodSet({\n        valueType,\n        minSize: null,\n        maxSize: null,\n        typeName: ZodFirstPartyTypeKind.ZodSet,\n        ...processCreateParams(params),\n    });\n};\nclass ZodFunction extends ZodType {\n    constructor() {\n        super(...arguments);\n        this.validate = this.implement;\n    }\n    _parse(input) {\n        const { ctx } = this._processInputParams(input);\n        if (ctx.parsedType !== ZodParsedType.function) {\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.function,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        function makeArgsIssue(args, error) {\n            return makeIssue({\n                data: args,\n                path: ctx.path,\n                errorMaps: [\n                    ctx.common.contextualErrorMap,\n                    ctx.schemaErrorMap,\n                    getErrorMap(),\n                    errorMap,\n                ].filter((x) => !!x),\n                issueData: {\n                    code: ZodIssueCode.invalid_arguments,\n                    argumentsError: error,\n                },\n            });\n        }\n        function makeReturnsIssue(returns, error) {\n            return makeIssue({\n                data: returns,\n                path: ctx.path,\n                errorMaps: [\n                    ctx.common.contextualErrorMap,\n                    ctx.schemaErrorMap,\n                    getErrorMap(),\n                    errorMap,\n                ].filter((x) => !!x),\n                issueData: {\n                    code: ZodIssueCode.invalid_return_type,\n                    returnTypeError: error,\n                },\n            });\n        }\n        const params = { errorMap: ctx.common.contextualErrorMap };\n        const fn = ctx.data;\n        if (this._def.returns instanceof ZodPromise) {\n            // Would love a way to avoid disabling this rule, but we need\n            // an alias (using an arrow function was what caused 2651).\n            // eslint-disable-next-line @typescript-eslint/no-this-alias\n            const me = this;\n            return OK(async function (...args) {\n                const error = new ZodError([]);\n                const parsedArgs = await me._def.args\n                    .parseAsync(args, params)\n                    .catch((e) => {\n                    error.addIssue(makeArgsIssue(args, e));\n                    throw error;\n                });\n                const result = await Reflect.apply(fn, this, parsedArgs);\n                const parsedReturns = await me._def.returns._def.type\n                    .parseAsync(result, params)\n                    .catch((e) => {\n                    error.addIssue(makeReturnsIssue(result, e));\n                    throw error;\n                });\n                return parsedReturns;\n            });\n        }\n        else {\n            // Would love a way to avoid disabling this rule, but we need\n            // an alias (using an arrow function was what caused 2651).\n            // eslint-disable-next-line @typescript-eslint/no-this-alias\n            const me = this;\n            return OK(function (...args) {\n                const parsedArgs = me._def.args.safeParse(args, params);\n                if (!parsedArgs.success) {\n                    throw new ZodError([makeArgsIssue(args, parsedArgs.error)]);\n                }\n                const result = Reflect.apply(fn, this, parsedArgs.data);\n                const parsedReturns = me._def.returns.safeParse(result, params);\n                if (!parsedReturns.success) {\n                    throw new ZodError([makeReturnsIssue(result, parsedReturns.error)]);\n                }\n                return parsedReturns.data;\n            });\n        }\n    }\n    parameters() {\n        return this._def.args;\n    }\n    returnType() {\n        return this._def.returns;\n    }\n    args(...items) {\n        return new ZodFunction({\n            ...this._def,\n            args: ZodTuple.create(items).rest(ZodUnknown.create()),\n        });\n    }\n    returns(returnType) {\n        return new ZodFunction({\n            ...this._def,\n            returns: returnType,\n        });\n    }\n    implement(func) {\n        const validatedFunc = this.parse(func);\n        return validatedFunc;\n    }\n    strictImplement(func) {\n        const validatedFunc = this.parse(func);\n        return validatedFunc;\n    }\n    static create(args, returns, params) {\n        return new ZodFunction({\n            args: (args\n                ? args\n                : ZodTuple.create([]).rest(ZodUnknown.create())),\n            returns: returns || ZodUnknown.create(),\n            typeName: ZodFirstPartyTypeKind.ZodFunction,\n            ...processCreateParams(params),\n        });\n    }\n}\nclass ZodLazy extends ZodType {\n    get schema() {\n        return this._def.getter();\n    }\n    _parse(input) {\n        const { ctx } = this._processInputParams(input);\n        const lazySchema = this._def.getter();\n        return lazySchema._parse({ data: ctx.data, path: ctx.path, parent: ctx });\n    }\n}\nZodLazy.create = (getter, params) => {\n    return new ZodLazy({\n        getter: getter,\n        typeName: ZodFirstPartyTypeKind.ZodLazy,\n        ...processCreateParams(params),\n    });\n};\nclass ZodLiteral extends ZodType {\n    _parse(input) {\n        if (input.data !== this._def.value) {\n            const ctx = this._getOrReturnCtx(input);\n            addIssueToContext(ctx, {\n                received: ctx.data,\n                code: ZodIssueCode.invalid_literal,\n                expected: this._def.value,\n            });\n            return INVALID;\n        }\n        return { status: \"valid\", value: input.data };\n    }\n    get value() {\n        return this._def.value;\n    }\n}\nZodLiteral.create = (value, params) => {\n    return new ZodLiteral({\n        value: value,\n        typeName: ZodFirstPartyTypeKind.ZodLiteral,\n        ...processCreateParams(params),\n    });\n};\nfunction createZodEnum(values, params) {\n    return new ZodEnum({\n        values,\n        typeName: ZodFirstPartyTypeKind.ZodEnum,\n        ...processCreateParams(params),\n    });\n}\nclass ZodEnum extends ZodType {\n    constructor() {\n        super(...arguments);\n        _ZodEnum_cache.set(this, void 0);\n    }\n    _parse(input) {\n        if (typeof input.data !== \"string\") {\n            const ctx = this._getOrReturnCtx(input);\n            const expectedValues = this._def.values;\n            addIssueToContext(ctx, {\n                expected: util.joinValues(expectedValues),\n                received: ctx.parsedType,\n                code: ZodIssueCode.invalid_type,\n            });\n            return INVALID;\n        }\n        if (!__classPrivateFieldGet(this, _ZodEnum_cache, \"f\")) {\n            __classPrivateFieldSet(this, _ZodEnum_cache, new Set(this._def.values), \"f\");\n        }\n        if (!__classPrivateFieldGet(this, _ZodEnum_cache, \"f\").has(input.data)) {\n            const ctx = this._getOrReturnCtx(input);\n            const expectedValues = this._def.values;\n            addIssueToContext(ctx, {\n                received: ctx.data,\n                code: ZodIssueCode.invalid_enum_value,\n                options: expectedValues,\n            });\n            return INVALID;\n        }\n        return OK(input.data);\n    }\n    get options() {\n        return this._def.values;\n    }\n    get enum() {\n        const enumValues = {};\n        for (const val of this._def.values) {\n            enumValues[val] = val;\n        }\n        return enumValues;\n    }\n    get Values() {\n        const enumValues = {};\n        for (const val of this._def.values) {\n            enumValues[val] = val;\n        }\n        return enumValues;\n    }\n    get Enum() {\n        const enumValues = {};\n        for (const val of this._def.values) {\n            enumValues[val] = val;\n        }\n        return enumValues;\n    }\n    extract(values, newDef = this._def) {\n        return ZodEnum.create(values, {\n            ...this._def,\n            ...newDef,\n        });\n    }\n    exclude(values, newDef = this._def) {\n        return ZodEnum.create(this.options.filter((opt) => !values.includes(opt)), {\n            ...this._def,\n            ...newDef,\n        });\n    }\n}\n_ZodEnum_cache = new WeakMap();\nZodEnum.create = createZodEnum;\nclass ZodNativeEnum extends ZodType {\n    constructor() {\n        super(...arguments);\n        _ZodNativeEnum_cache.set(this, void 0);\n    }\n    _parse(input) {\n        const nativeEnumValues = util.getValidEnumValues(this._def.values);\n        const ctx = this._getOrReturnCtx(input);\n        if (ctx.parsedType !== ZodParsedType.string &&\n            ctx.parsedType !== ZodParsedType.number) {\n            const expectedValues = util.objectValues(nativeEnumValues);\n            addIssueToContext(ctx, {\n                expected: util.joinValues(expectedValues),\n                received: ctx.parsedType,\n                code: ZodIssueCode.invalid_type,\n            });\n            return INVALID;\n        }\n        if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache, \"f\")) {\n            __classPrivateFieldSet(this, _ZodNativeEnum_cache, new Set(util.getValidEnumValues(this._def.values)), \"f\");\n        }\n        if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache, \"f\").has(input.data)) {\n            const expectedValues = util.objectValues(nativeEnumValues);\n            addIssueToContext(ctx, {\n                received: ctx.data,\n                code: ZodIssueCode.invalid_enum_value,\n                options: expectedValues,\n            });\n            return INVALID;\n        }\n        return OK(input.data);\n    }\n    get enum() {\n        return this._def.values;\n    }\n}\n_ZodNativeEnum_cache = new WeakMap();\nZodNativeEnum.create = (values, params) => {\n    return new ZodNativeEnum({\n        values: values,\n        typeName: ZodFirstPartyTypeKind.ZodNativeEnum,\n        ...processCreateParams(params),\n    });\n};\nclass ZodPromise extends ZodType {\n    unwrap() {\n        return this._def.type;\n    }\n    _parse(input) {\n        const { ctx } = this._processInputParams(input);\n        if (ctx.parsedType !== ZodParsedType.promise &&\n            ctx.common.async === false) {\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.promise,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        const promisified = ctx.parsedType === ZodParsedType.promise\n            ? ctx.data\n            : Promise.resolve(ctx.data);\n        return OK(promisified.then((data) => {\n            return this._def.type.parseAsync(data, {\n                path: ctx.path,\n                errorMap: ctx.common.contextualErrorMap,\n            });\n        }));\n    }\n}\nZodPromise.create = (schema, params) => {\n    return new ZodPromise({\n        type: schema,\n        typeName: ZodFirstPartyTypeKind.ZodPromise,\n        ...processCreateParams(params),\n    });\n};\nclass ZodEffects extends ZodType {\n    innerType() {\n        return this._def.schema;\n    }\n    sourceType() {\n        return this._def.schema._def.typeName === ZodFirstPartyTypeKind.ZodEffects\n            ? this._def.schema.sourceType()\n            : this._def.schema;\n    }\n    _parse(input) {\n        const { status, ctx } = this._processInputParams(input);\n        const effect = this._def.effect || null;\n        const checkCtx = {\n            addIssue: (arg) => {\n                addIssueToContext(ctx, arg);\n                if (arg.fatal) {\n                    status.abort();\n                }\n                else {\n                    status.dirty();\n                }\n            },\n            get path() {\n                return ctx.path;\n            },\n        };\n        checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx);\n        if (effect.type === \"preprocess\") {\n            const processed = effect.transform(ctx.data, checkCtx);\n            if (ctx.common.async) {\n                return Promise.resolve(processed).then(async (processed) => {\n                    if (status.value === \"aborted\")\n                        return INVALID;\n                    const result = await this._def.schema._parseAsync({\n                        data: processed,\n                        path: ctx.path,\n                        parent: ctx,\n                    });\n                    if (result.status === \"aborted\")\n                        return INVALID;\n                    if (result.status === \"dirty\")\n                        return DIRTY(result.value);\n                    if (status.value === \"dirty\")\n                        return DIRTY(result.value);\n                    return result;\n                });\n            }\n            else {\n                if (status.value === \"aborted\")\n                    return INVALID;\n                const result = this._def.schema._parseSync({\n                    data: processed,\n                    path: ctx.path,\n                    parent: ctx,\n                });\n                if (result.status === \"aborted\")\n                    return INVALID;\n                if (result.status === \"dirty\")\n                    return DIRTY(result.value);\n                if (status.value === \"dirty\")\n                    return DIRTY(result.value);\n                return result;\n            }\n        }\n        if (effect.type === \"refinement\") {\n            const executeRefinement = (acc) => {\n                const result = effect.refinement(acc, checkCtx);\n                if (ctx.common.async) {\n                    return Promise.resolve(result);\n                }\n                if (result instanceof Promise) {\n                    throw new Error(\"Async refinement encountered during synchronous parse operation. Use .parseAsync instead.\");\n                }\n                return acc;\n            };\n            if (ctx.common.async === false) {\n                const inner = this._def.schema._parseSync({\n                    data: ctx.data,\n                    path: ctx.path,\n                    parent: ctx,\n                });\n                if (inner.status === \"aborted\")\n                    return INVALID;\n                if (inner.status === \"dirty\")\n                    status.dirty();\n                // return value is ignored\n                executeRefinement(inner.value);\n                return { status: status.value, value: inner.value };\n            }\n            else {\n                return this._def.schema\n                    ._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx })\n                    .then((inner) => {\n                    if (inner.status === \"aborted\")\n                        return INVALID;\n                    if (inner.status === \"dirty\")\n                        status.dirty();\n                    return executeRefinement(inner.value).then(() => {\n                        return { status: status.value, value: inner.value };\n                    });\n                });\n            }\n        }\n        if (effect.type === \"transform\") {\n            if (ctx.common.async === false) {\n                const base = this._def.schema._parseSync({\n                    data: ctx.data,\n                    path: ctx.path,\n                    parent: ctx,\n                });\n                if (!isValid(base))\n                    return base;\n                const result = effect.transform(base.value, checkCtx);\n                if (result instanceof Promise) {\n                    throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);\n                }\n                return { status: status.value, value: result };\n            }\n            else {\n                return this._def.schema\n                    ._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx })\n                    .then((base) => {\n                    if (!isValid(base))\n                        return base;\n                    return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({ status: status.value, value: result }));\n                });\n            }\n        }\n        util.assertNever(effect);\n    }\n}\nZodEffects.create = (schema, effect, params) => {\n    return new ZodEffects({\n        schema,\n        typeName: ZodFirstPartyTypeKind.ZodEffects,\n        effect,\n        ...processCreateParams(params),\n    });\n};\nZodEffects.createWithPreprocess = (preprocess, schema, params) => {\n    return new ZodEffects({\n        schema,\n        effect: { type: \"preprocess\", transform: preprocess },\n        typeName: ZodFirstPartyTypeKind.ZodEffects,\n        ...processCreateParams(params),\n    });\n};\nclass ZodOptional extends ZodType {\n    _parse(input) {\n        const parsedType = this._getType(input);\n        if (parsedType === ZodParsedType.undefined) {\n            return OK(undefined);\n        }\n        return this._def.innerType._parse(input);\n    }\n    unwrap() {\n        return this._def.innerType;\n    }\n}\nZodOptional.create = (type, params) => {\n    return new ZodOptional({\n        innerType: type,\n        typeName: ZodFirstPartyTypeKind.ZodOptional,\n        ...processCreateParams(params),\n    });\n};\nclass ZodNullable extends ZodType {\n    _parse(input) {\n        const parsedType = this._getType(input);\n        if (parsedType === ZodParsedType.null) {\n            return OK(null);\n        }\n        return this._def.innerType._parse(input);\n    }\n    unwrap() {\n        return this._def.innerType;\n    }\n}\nZodNullable.create = (type, params) => {\n    return new ZodNullable({\n        innerType: type,\n        typeName: ZodFirstPartyTypeKind.ZodNullable,\n        ...processCreateParams(params),\n    });\n};\nclass ZodDefault extends ZodType {\n    _parse(input) {\n        const { ctx } = this._processInputParams(input);\n        let data = ctx.data;\n        if (ctx.parsedType === ZodParsedType.undefined) {\n            data = this._def.defaultValue();\n        }\n        return this._def.innerType._parse({\n            data,\n            path: ctx.path,\n            parent: ctx,\n        });\n    }\n    removeDefault() {\n        return this._def.innerType;\n    }\n}\nZodDefault.create = (type, params) => {\n    return new ZodDefault({\n        innerType: type,\n        typeName: ZodFirstPartyTypeKind.ZodDefault,\n        defaultValue: typeof params.default === \"function\"\n            ? params.default\n            : () => params.default,\n        ...processCreateParams(params),\n    });\n};\nclass ZodCatch extends ZodType {\n    _parse(input) {\n        const { ctx } = this._processInputParams(input);\n        // newCtx is used to not collect issues from inner types in ctx\n        const newCtx = {\n            ...ctx,\n            common: {\n                ...ctx.common,\n                issues: [],\n            },\n        };\n        const result = this._def.innerType._parse({\n            data: newCtx.data,\n            path: newCtx.path,\n            parent: {\n                ...newCtx,\n            },\n        });\n        if (isAsync(result)) {\n            return result.then((result) => {\n                return {\n                    status: \"valid\",\n                    value: result.status === \"valid\"\n                        ? result.value\n                        : this._def.catchValue({\n                            get error() {\n                                return new ZodError(newCtx.common.issues);\n                            },\n                            input: newCtx.data,\n                        }),\n                };\n            });\n        }\n        else {\n            return {\n                status: \"valid\",\n                value: result.status === \"valid\"\n                    ? result.value\n                    : this._def.catchValue({\n                        get error() {\n                            return new ZodError(newCtx.common.issues);\n                        },\n                        input: newCtx.data,\n                    }),\n            };\n        }\n    }\n    removeCatch() {\n        return this._def.innerType;\n    }\n}\nZodCatch.create = (type, params) => {\n    return new ZodCatch({\n        innerType: type,\n        typeName: ZodFirstPartyTypeKind.ZodCatch,\n        catchValue: typeof params.catch === \"function\" ? params.catch : () => params.catch,\n        ...processCreateParams(params),\n    });\n};\nclass ZodNaN extends ZodType {\n    _parse(input) {\n        const parsedType = this._getType(input);\n        if (parsedType !== ZodParsedType.nan) {\n            const ctx = this._getOrReturnCtx(input);\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.nan,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        return { status: \"valid\", value: input.data };\n    }\n}\nZodNaN.create = (params) => {\n    return new ZodNaN({\n        typeName: ZodFirstPartyTypeKind.ZodNaN,\n        ...processCreateParams(params),\n    });\n};\nconst BRAND = Symbol(\"zod_brand\");\nclass ZodBranded extends ZodType {\n    _parse(input) {\n        const { ctx } = this._processInputParams(input);\n        const data = ctx.data;\n        return this._def.type._parse({\n            data,\n            path: ctx.path,\n            parent: ctx,\n        });\n    }\n    unwrap() {\n        return this._def.type;\n    }\n}\nclass ZodPipeline extends ZodType {\n    _parse(input) {\n        const { status, ctx } = this._processInputParams(input);\n        if (ctx.common.async) {\n            const handleAsync = async () => {\n                const inResult = await this._def.in._parseAsync({\n                    data: ctx.data,\n                    path: ctx.path,\n                    parent: ctx,\n                });\n                if (inResult.status === \"aborted\")\n                    return INVALID;\n                if (inResult.status === \"dirty\") {\n                    status.dirty();\n                    return DIRTY(inResult.value);\n                }\n                else {\n                    return this._def.out._parseAsync({\n                        data: inResult.value,\n                        path: ctx.path,\n                        parent: ctx,\n                    });\n                }\n            };\n            return handleAsync();\n        }\n        else {\n            const inResult = this._def.in._parseSync({\n                data: ctx.data,\n                path: ctx.path,\n                parent: ctx,\n            });\n            if (inResult.status === \"aborted\")\n                return INVALID;\n            if (inResult.status === \"dirty\") {\n                status.dirty();\n                return {\n                    status: \"dirty\",\n                    value: inResult.value,\n                };\n            }\n            else {\n                return this._def.out._parseSync({\n                    data: inResult.value,\n                    path: ctx.path,\n                    parent: ctx,\n                });\n            }\n        }\n    }\n    static create(a, b) {\n        return new ZodPipeline({\n            in: a,\n            out: b,\n            typeName: ZodFirstPartyTypeKind.ZodPipeline,\n        });\n    }\n}\nclass ZodReadonly extends ZodType {\n    _parse(input) {\n        const result = this._def.innerType._parse(input);\n        const freeze = (data) => {\n            if (isValid(data)) {\n                data.value = Object.freeze(data.value);\n            }\n            return data;\n        };\n        return isAsync(result)\n            ? result.then((data) => freeze(data))\n            : freeze(result);\n    }\n    unwrap() {\n        return this._def.innerType;\n    }\n}\nZodReadonly.create = (type, params) => {\n    return new ZodReadonly({\n        innerType: type,\n        typeName: ZodFirstPartyTypeKind.ZodReadonly,\n        ...processCreateParams(params),\n    });\n};\n////////////////////////////////////////\n////////////////////////////////////////\n//////////                    //////////\n//////////      z.custom      //////////\n//////////                    //////////\n////////////////////////////////////////\n////////////////////////////////////////\nfunction cleanParams(params, data) {\n    const p = typeof params === \"function\"\n        ? params(data)\n        : typeof params === \"string\"\n            ? { message: params }\n            : params;\n    const p2 = typeof p === \"string\" ? { message: p } : p;\n    return p2;\n}\nfunction custom(check, _params = {}, \n/**\n * @deprecated\n *\n * Pass `fatal` into the params object instead:\n *\n * ```ts\n * z.string().custom((val) => val.length > 5, { fatal: false })\n * ```\n *\n */\nfatal) {\n    if (check)\n        return ZodAny.create().superRefine((data, ctx) => {\n            var _a, _b;\n            const r = check(data);\n            if (r instanceof Promise) {\n                return r.then((r) => {\n                    var _a, _b;\n                    if (!r) {\n                        const params = cleanParams(_params, data);\n                        const _fatal = (_b = (_a = params.fatal) !== null && _a !== void 0 ? _a : fatal) !== null && _b !== void 0 ? _b : true;\n                        ctx.addIssue({ code: \"custom\", ...params, fatal: _fatal });\n                    }\n                });\n            }\n            if (!r) {\n                const params = cleanParams(_params, data);\n                const _fatal = (_b = (_a = params.fatal) !== null && _a !== void 0 ? _a : fatal) !== null && _b !== void 0 ? _b : true;\n                ctx.addIssue({ code: \"custom\", ...params, fatal: _fatal });\n            }\n            return;\n        });\n    return ZodAny.create();\n}\nconst late = {\n    object: ZodObject.lazycreate,\n};\nvar ZodFirstPartyTypeKind;\n(function (ZodFirstPartyTypeKind) {\n    ZodFirstPartyTypeKind[\"ZodString\"] = \"ZodString\";\n    ZodFirstPartyTypeKind[\"ZodNumber\"] = \"ZodNumber\";\n    ZodFirstPartyTypeKind[\"ZodNaN\"] = \"ZodNaN\";\n    ZodFirstPartyTypeKind[\"ZodBigInt\"] = \"ZodBigInt\";\n    ZodFirstPartyTypeKind[\"ZodBoolean\"] = \"ZodBoolean\";\n    ZodFirstPartyTypeKind[\"ZodDate\"] = \"ZodDate\";\n    ZodFirstPartyTypeKind[\"ZodSymbol\"] = \"ZodSymbol\";\n    ZodFirstPartyTypeKind[\"ZodUndefined\"] = \"ZodUndefined\";\n    ZodFirstPartyTypeKind[\"ZodNull\"] = \"ZodNull\";\n    ZodFirstPartyTypeKind[\"ZodAny\"] = \"ZodAny\";\n    ZodFirstPartyTypeKind[\"ZodUnknown\"] = \"ZodUnknown\";\n    ZodFirstPartyTypeKind[\"ZodNever\"] = \"ZodNever\";\n    ZodFirstPartyTypeKind[\"ZodVoid\"] = \"ZodVoid\";\n    ZodFirstPartyTypeKind[\"ZodArray\"] = \"ZodArray\";\n    ZodFirstPartyTypeKind[\"ZodObject\"] = \"ZodObject\";\n    ZodFirstPartyTypeKind[\"ZodUnion\"] = \"ZodUnion\";\n    ZodFirstPartyTypeKind[\"ZodDiscriminatedUnion\"] = \"ZodDiscriminatedUnion\";\n    ZodFirstPartyTypeKind[\"ZodIntersection\"] = \"ZodIntersection\";\n    ZodFirstPartyTypeKind[\"ZodTuple\"] = \"ZodTuple\";\n    ZodFirstPartyTypeKind[\"ZodRecord\"] = \"ZodRecord\";\n    ZodFirstPartyTypeKind[\"ZodMap\"] = \"ZodMap\";\n    ZodFirstPartyTypeKind[\"ZodSet\"] = \"ZodSet\";\n    ZodFirstPartyTypeKind[\"ZodFunction\"] = \"ZodFunction\";\n    ZodFirstPartyTypeKind[\"ZodLazy\"] = \"ZodLazy\";\n    ZodFirstPartyTypeKind[\"ZodLiteral\"] = \"ZodLiteral\";\n    ZodFirstPartyTypeKind[\"ZodEnum\"] = \"ZodEnum\";\n    ZodFirstPartyTypeKind[\"ZodEffects\"] = \"ZodEffects\";\n    ZodFirstPartyTypeKind[\"ZodNativeEnum\"] = \"ZodNativeEnum\";\n    ZodFirstPartyTypeKind[\"ZodOptional\"] = \"ZodOptional\";\n    ZodFirstPartyTypeKind[\"ZodNullable\"] = \"ZodNullable\";\n    ZodFirstPartyTypeKind[\"ZodDefault\"] = \"ZodDefault\";\n    ZodFirstPartyTypeKind[\"ZodCatch\"] = \"ZodCatch\";\n    ZodFirstPartyTypeKind[\"ZodPromise\"] = \"ZodPromise\";\n    ZodFirstPartyTypeKind[\"ZodBranded\"] = \"ZodBranded\";\n    ZodFirstPartyTypeKind[\"ZodPipeline\"] = \"ZodPipeline\";\n    ZodFirstPartyTypeKind[\"ZodReadonly\"] = \"ZodReadonly\";\n})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));\nconst instanceOfType = (\n// const instanceOfType = <T extends new (...args: any[]) => any>(\ncls, params = {\n    message: `Input not instance of ${cls.name}`,\n}) => custom((data) => data instanceof cls, params);\nconst stringType = ZodString.create;\nconst numberType = ZodNumber.create;\nconst nanType = ZodNaN.create;\nconst bigIntType = ZodBigInt.create;\nconst booleanType = ZodBoolean.create;\nconst dateType = ZodDate.create;\nconst symbolType = ZodSymbol.create;\nconst undefinedType = ZodUndefined.create;\nconst nullType = ZodNull.create;\nconst anyType = ZodAny.create;\nconst unknownType = ZodUnknown.create;\nconst neverType = ZodNever.create;\nconst voidType = ZodVoid.create;\nconst arrayType = ZodArray.create;\nconst objectType = ZodObject.create;\nconst strictObjectType = ZodObject.strictCreate;\nconst unionType = ZodUnion.create;\nconst discriminatedUnionType = ZodDiscriminatedUnion.create;\nconst intersectionType = ZodIntersection.create;\nconst tupleType = ZodTuple.create;\nconst recordType = ZodRecord.create;\nconst mapType = ZodMap.create;\nconst setType = ZodSet.create;\nconst functionType = ZodFunction.create;\nconst lazyType = ZodLazy.create;\nconst literalType = ZodLiteral.create;\nconst enumType = ZodEnum.create;\nconst nativeEnumType = ZodNativeEnum.create;\nconst promiseType = ZodPromise.create;\nconst effectsType = ZodEffects.create;\nconst optionalType = ZodOptional.create;\nconst nullableType = ZodNullable.create;\nconst preprocessType = ZodEffects.createWithPreprocess;\nconst pipelineType = ZodPipeline.create;\nconst ostring = () => stringType().optional();\nconst onumber = () => numberType().optional();\nconst oboolean = () => booleanType().optional();\nconst coerce = {\n    string: ((arg) => ZodString.create({ ...arg, coerce: true })),\n    number: ((arg) => ZodNumber.create({ ...arg, coerce: true })),\n    boolean: ((arg) => ZodBoolean.create({\n        ...arg,\n        coerce: true,\n    })),\n    bigint: ((arg) => ZodBigInt.create({ ...arg, coerce: true })),\n    date: ((arg) => ZodDate.create({ ...arg, coerce: true })),\n};\nconst NEVER = INVALID;\n\nvar z = /*#__PURE__*/Object.freeze({\n    __proto__: null,\n    defaultErrorMap: errorMap,\n    setErrorMap: setErrorMap,\n    getErrorMap: getErrorMap,\n    makeIssue: makeIssue,\n    EMPTY_PATH: EMPTY_PATH,\n    addIssueToContext: addIssueToContext,\n    ParseStatus: ParseStatus,\n    INVALID: INVALID,\n    DIRTY: DIRTY,\n    OK: OK,\n    isAborted: isAborted,\n    isDirty: isDirty,\n    isValid: isValid,\n    isAsync: isAsync,\n    get util () { return util; },\n    get objectUtil () { return objectUtil; },\n    ZodParsedType: ZodParsedType,\n    getParsedType: getParsedType,\n    ZodType: ZodType,\n    datetimeRegex: datetimeRegex,\n    ZodString: ZodString,\n    ZodNumber: ZodNumber,\n    ZodBigInt: ZodBigInt,\n    ZodBoolean: ZodBoolean,\n    ZodDate: ZodDate,\n    ZodSymbol: ZodSymbol,\n    ZodUndefined: ZodUndefined,\n    ZodNull: ZodNull,\n    ZodAny: ZodAny,\n    ZodUnknown: ZodUnknown,\n    ZodNever: ZodNever,\n    ZodVoid: ZodVoid,\n    ZodArray: ZodArray,\n    ZodObject: ZodObject,\n    ZodUnion: ZodUnion,\n    ZodDiscriminatedUnion: ZodDiscriminatedUnion,\n    ZodIntersection: ZodIntersection,\n    ZodTuple: ZodTuple,\n    ZodRecord: ZodRecord,\n    ZodMap: ZodMap,\n    ZodSet: ZodSet,\n    ZodFunction: ZodFunction,\n    ZodLazy: ZodLazy,\n    ZodLiteral: ZodLiteral,\n    ZodEnum: ZodEnum,\n    ZodNativeEnum: ZodNativeEnum,\n    ZodPromise: ZodPromise,\n    ZodEffects: ZodEffects,\n    ZodTransformer: ZodEffects,\n    ZodOptional: ZodOptional,\n    ZodNullable: ZodNullable,\n    ZodDefault: ZodDefault,\n    ZodCatch: ZodCatch,\n    ZodNaN: ZodNaN,\n    BRAND: BRAND,\n    ZodBranded: ZodBranded,\n    ZodPipeline: ZodPipeline,\n    ZodReadonly: ZodReadonly,\n    custom: custom,\n    Schema: ZodType,\n    ZodSchema: ZodType,\n    late: late,\n    get ZodFirstPartyTypeKind () { return ZodFirstPartyTypeKind; },\n    coerce: coerce,\n    any: anyType,\n    array: arrayType,\n    bigint: bigIntType,\n    boolean: booleanType,\n    date: dateType,\n    discriminatedUnion: discriminatedUnionType,\n    effect: effectsType,\n    'enum': enumType,\n    'function': functionType,\n    'instanceof': instanceOfType,\n    intersection: intersectionType,\n    lazy: lazyType,\n    literal: literalType,\n    map: mapType,\n    nan: nanType,\n    nativeEnum: nativeEnumType,\n    never: neverType,\n    'null': nullType,\n    nullable: nullableType,\n    number: numberType,\n    object: objectType,\n    oboolean: oboolean,\n    onumber: onumber,\n    optional: optionalType,\n    ostring: ostring,\n    pipeline: pipelineType,\n    preprocess: preprocessType,\n    promise: promiseType,\n    record: recordType,\n    set: setType,\n    strictObject: strictObjectType,\n    string: stringType,\n    symbol: symbolType,\n    transformer: effectsType,\n    tuple: tupleType,\n    'undefined': undefinedType,\n    union: unionType,\n    unknown: unknownType,\n    'void': voidType,\n    NEVER: NEVER,\n    ZodIssueCode: ZodIssueCode,\n    quotelessJson: quotelessJson,\n    ZodError: ZodError\n});\n\nexport { BRAND, DIRTY, EMPTY_PATH, INVALID, NEVER, OK, ParseStatus, ZodType as Schema, ZodAny, ZodArray, ZodBigInt, ZodBoolean, ZodBranded, ZodCatch, ZodDate, ZodDefault, ZodDiscriminatedUnion, ZodEffects, ZodEnum, ZodError, ZodFirstPartyTypeKind, ZodFunction, ZodIntersection, ZodIssueCode, ZodLazy, ZodLiteral, ZodMap, ZodNaN, ZodNativeEnum, ZodNever, ZodNull, ZodNullable, ZodNumber, ZodObject, ZodOptional, ZodParsedType, ZodPipeline, ZodPromise, ZodReadonly, ZodRecord, ZodType as ZodSchema, ZodSet, ZodString, ZodSymbol, ZodEffects as ZodTransformer, ZodTuple, ZodType, ZodUndefined, ZodUnion, ZodUnknown, ZodVoid, addIssueToContext, anyType as any, arrayType as array, bigIntType as bigint, booleanType as boolean, coerce, custom, dateType as date, datetimeRegex, z as default, errorMap as defaultErrorMap, discriminatedUnionType as discriminatedUnion, effectsType as effect, enumType as enum, functionType as function, getErrorMap, getParsedType, instanceOfType as instanceof, intersectionType as intersection, isAborted, isAsync, isDirty, isValid, late, lazyType as lazy, literalType as literal, makeIssue, mapType as map, nanType as nan, nativeEnumType as nativeEnum, neverType as never, nullType as null, nullableType as nullable, numberType as number, objectType as object, objectUtil, oboolean, onumber, optionalType as optional, ostring, pipelineType as pipeline, preprocessType as preprocess, promiseType as promise, quotelessJson, recordType as record, setType as set, setErrorMap, strictObjectType as strictObject, stringType as string, symbolType as symbol, effectsType as transformer, tupleType as tuple, undefinedType as undefined, unionType as union, unknownType as unknown, util, voidType as void, z };\n","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { BaseWeb3Error, ERR_VALIDATION } from 'web3-errors';\nconst errorFormatter = (error) => {\n    if (error.message) {\n        return error.message;\n    }\n    return 'unspecified error';\n};\nexport class Web3ValidatorError extends BaseWeb3Error {\n    constructor(errors) {\n        super();\n        this.code = ERR_VALIDATION;\n        this.errors = errors;\n        super.message = `Web3 validator found ${errors.length} error[s]:\\n${this._compileErrors().join('\\n')}`;\n    }\n    _compileErrors() {\n        return this.errors.map(errorFormatter);\n    }\n}\n//# sourceMappingURL=errors.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nexport const VALID_ETH_BASE_TYPES = ['bool', 'int', 'uint', 'bytes', 'string', 'address', 'tuple'];\n//# sourceMappingURL=constants.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nexport const isAbiParameterSchema = (schema) => typeof schema === 'object' && 'type' in schema && 'name' in schema;\n//# sourceMappingURL=abi.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\n/**\n * checks input if typeof data is valid string input\n */\nexport const isString = (value) => typeof value === 'string';\nexport const isHexStrict = (hex) => typeof hex === 'string' && /^((-)?0x[0-9a-f]+|(0x))$/i.test(hex);\n/**\n * Is the string a hex string.\n *\n * @param  value\n * @param  length\n * @returns  output the string is a hex string\n */\nexport function isHexString(value, length) {\n    if (typeof value !== 'string' || !value.match(/^0x[0-9A-Fa-f]*$/))\n        return false;\n    if (typeof length !== 'undefined' && length > 0 && value.length !== 2 + 2 * length)\n        return false;\n    return true;\n}\nexport const isHex = (hex) => typeof hex === 'number' ||\n    typeof hex === 'bigint' ||\n    (typeof hex === 'string' && /^((-0x|0x|-)?[0-9a-f]+|(0x))$/i.test(hex));\nexport const isHexString8Bytes = (value, prefixed = true) => prefixed ? isHexStrict(value) && value.length === 18 : isHex(value) && value.length === 16;\nexport const isHexString32Bytes = (value, prefixed = true) => prefixed ? isHexStrict(value) && value.length === 66 : isHex(value) && value.length === 64;\n/**\n * Returns a `Boolean` on whether or not the a `String` starts with '0x'\n * @param str the string input value\n * @return a boolean if it is or is not hex prefixed\n * @throws if the str input is not a string\n */\nexport function isHexPrefixed(str) {\n    if (typeof str !== 'string') {\n        throw new Error(`[isHexPrefixed] input must be type 'string', received type ${typeof str}`);\n    }\n    return str.startsWith('0x');\n}\n/**\n * Checks provided Uint8Array for leading zeroes and throws if found.\n *\n * Examples:\n *\n * Valid values: 0x1, 0x, 0x01, 0x1234\n * Invalid values: 0x0, 0x00, 0x001, 0x0001\n *\n * Note: This method is useful for validating that RLP encoded integers comply with the rule that all\n * integer values encoded to RLP must be in the most compact form and contain no leading zero bytes\n * @param values An object containing string keys and Uint8Array values\n * @throws if any provided value is found to have leading zero bytes\n */\nexport const validateNoLeadingZeroes = function (values) {\n    for (const [k, v] of Object.entries(values)) {\n        if (v !== undefined && v.length > 0 && v[0] === 0) {\n            throw new Error(`${k} cannot have leading zeroes, received: ${v.toString()}`);\n        }\n    }\n};\n//# sourceMappingURL=string.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { InvalidBytesError, InvalidNumberError } from 'web3-errors';\nimport { VALID_ETH_BASE_TYPES } from './constants.js';\nimport { isAbiParameterSchema } from './validation/abi.js';\nimport { isHexStrict } from './validation/string.js';\nimport { Web3ValidatorError } from './errors.js';\nconst extraTypes = ['hex', 'number', 'blockNumber', 'blockNumberOrTag', 'filter', 'bloom'];\nexport const parseBaseType = (type) => {\n    // Remove all empty spaces to avoid any parsing issue.\n    let strippedType = type.replace(/ /, '');\n    let baseTypeSize;\n    let isArray = false;\n    let arraySizes = [];\n    if (type.includes('[')) {\n        // Extract the array type\n        strippedType = strippedType.slice(0, strippedType.indexOf('['));\n        // Extract array indexes\n        arraySizes = [...type.matchAll(/(?:\\[(\\d*)\\])/g)]\n            .map(match => parseInt(match[1], 10))\n            .map(size => (Number.isNaN(size) ? -1 : size));\n        isArray = arraySizes.length > 0;\n    }\n    if (VALID_ETH_BASE_TYPES.includes(strippedType)) {\n        return { baseType: strippedType, isArray, baseTypeSize, arraySizes };\n    }\n    if (strippedType.startsWith('int')) {\n        baseTypeSize = parseInt(strippedType.substring(3), 10);\n        strippedType = 'int';\n    }\n    else if (strippedType.startsWith('uint')) {\n        baseTypeSize = parseInt(type.substring(4), 10);\n        strippedType = 'uint';\n    }\n    else if (strippedType.startsWith('bytes')) {\n        baseTypeSize = parseInt(strippedType.substring(5), 10);\n        strippedType = 'bytes';\n    }\n    else {\n        return { baseType: undefined, isArray: false, baseTypeSize: undefined, arraySizes };\n    }\n    return { baseType: strippedType, isArray, baseTypeSize, arraySizes };\n};\nconst convertEthType = (type, parentSchema = {}) => {\n    const typePropertyPresent = Object.keys(parentSchema).includes('type');\n    if (typePropertyPresent) {\n        throw new Web3ValidatorError([\n            {\n                keyword: 'eth',\n                message: 'Either \"eth\" or \"type\" can be presented in schema',\n                params: { eth: type },\n                instancePath: '',\n                schemaPath: '',\n            },\n        ]);\n    }\n    const { baseType, baseTypeSize } = parseBaseType(type);\n    if (!baseType && !extraTypes.includes(type)) {\n        throw new Web3ValidatorError([\n            {\n                keyword: 'eth',\n                message: `Eth data type \"${type}\" is not valid`,\n                params: { eth: type },\n                instancePath: '',\n                schemaPath: '',\n            },\n        ]);\n    }\n    if (baseType) {\n        if (baseType === 'tuple') {\n            throw new Error('\"tuple\" type is not implemented directly.');\n        }\n        return { format: `${baseType}${baseTypeSize !== null && baseTypeSize !== void 0 ? baseTypeSize : ''}`, required: true };\n    }\n    if (type) {\n        return { format: type, required: true };\n    }\n    return {};\n};\nexport const abiSchemaToJsonSchema = (abis, level = '/0') => {\n    const schema = {\n        type: 'array',\n        items: [],\n        maxItems: abis.length,\n        minItems: abis.length,\n    };\n    for (const [index, abi] of abis.entries()) {\n        // eslint-disable-next-line no-nested-ternary\n        let abiType;\n        let abiName;\n        let abiComponents = [];\n        // If it's a complete Abi Parameter\n        // e.g. {name: 'a', type: 'uint'}\n        if (isAbiParameterSchema(abi)) {\n            abiType = abi.type;\n            abiName = abi.name || `${level}/${index}`;\n            abiComponents = abi.components;\n            // If its short form string value e.g. ['uint']\n        }\n        else if (typeof abi === 'string') {\n            abiType = abi;\n            abiName = `${level}/${index}`;\n            // If it's provided in short form of tuple e.g. [['uint', 'string']]\n        }\n        else if (Array.isArray(abi)) {\n            // If its custom tuple e.g. ['tuple[2]', ['uint', 'string']]\n            if (abi[0] &&\n                typeof abi[0] === 'string' &&\n                abi[0].startsWith('tuple') &&\n                !Array.isArray(abi[0]) &&\n                abi[1] &&\n                Array.isArray(abi[1])) {\n                // eslint-disable-next-line prefer-destructuring\n                abiType = abi[0];\n                abiName = `${level}/${index}`;\n                abiComponents = abi[1];\n            }\n            else {\n                abiType = 'tuple';\n                abiName = `${level}/${index}`;\n                abiComponents = abi;\n            }\n        }\n        const { baseType, isArray, arraySizes } = parseBaseType(abiType);\n        let childSchema;\n        let lastSchema = schema;\n        for (let i = arraySizes.length - 1; i > 0; i -= 1) {\n            childSchema = {\n                type: 'array',\n                $id: abiName,\n                items: [],\n                maxItems: arraySizes[i],\n                minItems: arraySizes[i],\n            };\n            if (arraySizes[i] < 0) {\n                delete childSchema.maxItems;\n                delete childSchema.minItems;\n            }\n            // lastSchema.items is a Schema, concat with 'childSchema'\n            if (!Array.isArray(lastSchema.items)) {\n                lastSchema.items = [lastSchema.items, childSchema];\n            } // lastSchema.items is an empty Scheme array, set it to 'childSchema'\n            else if (lastSchema.items.length === 0) {\n                lastSchema.items = [childSchema];\n            } // lastSchema.items is a non-empty Scheme array, append 'childSchema'\n            else {\n                lastSchema.items.push(childSchema);\n            }\n            lastSchema = childSchema;\n        }\n        if (baseType === 'tuple' && !isArray) {\n            const nestedTuple = abiSchemaToJsonSchema(abiComponents, abiName);\n            nestedTuple.$id = abiName;\n            lastSchema.items.push(nestedTuple);\n        }\n        else if (baseType === 'tuple' && isArray) {\n            const arraySize = arraySizes[0];\n            const item = Object.assign({ type: 'array', $id: abiName, items: abiSchemaToJsonSchema(abiComponents, abiName) }, (arraySize >= 0 && { minItems: arraySize, maxItems: arraySize }));\n            lastSchema.items.push(item);\n        }\n        else if (isArray) {\n            const arraySize = arraySizes[0];\n            const item = Object.assign({ type: 'array', $id: abiName, items: convertEthType(abiType) }, (arraySize >= 0 && { minItems: arraySize, maxItems: arraySize }));\n            lastSchema.items.push(item);\n        }\n        else if (Array.isArray(lastSchema.items)) {\n            // Array of non-tuple items\n            lastSchema.items.push(Object.assign({ $id: abiName }, convertEthType(abiType)));\n        }\n        else {\n            // Nested object\n            lastSchema.items.push(Object.assign({ $id: abiName }, convertEthType(abiType)));\n        }\n        lastSchema = schema;\n    }\n    return schema;\n};\nexport const ethAbiToJsonSchema = (abis) => abiSchemaToJsonSchema(abis);\nexport const fetchArrayElement = (data, level) => {\n    if (level === 1) {\n        return data;\n    }\n    return fetchArrayElement(data[0], level - 1);\n};\nexport const transformJsonDataToAbiFormat = (abis, data, transformedData) => {\n    const newData = [];\n    for (const [index, abi] of abis.entries()) {\n        // eslint-disable-next-line no-nested-ternary\n        let abiType;\n        let abiName;\n        let abiComponents = [];\n        // If it's a complete Abi Parameter\n        // e.g. {name: 'a', type: 'uint'}\n        if (isAbiParameterSchema(abi)) {\n            abiType = abi.type;\n            abiName = abi.name;\n            abiComponents = abi.components;\n            // If its short form string value e.g. ['uint']\n        }\n        else if (typeof abi === 'string') {\n            abiType = abi;\n            // If it's provided in short form of tuple e.g. [['uint', 'string']]\n        }\n        else if (Array.isArray(abi)) {\n            // If its custom tuple e.g. ['tuple[2]', ['uint', 'string']]\n            if (abi[1] && Array.isArray(abi[1])) {\n                abiType = abi[0];\n                abiComponents = abi[1];\n            }\n            else {\n                abiType = 'tuple';\n                abiComponents = abi;\n            }\n        }\n        const { baseType, isArray, arraySizes } = parseBaseType(abiType);\n        const dataItem = Array.isArray(data)\n            ? data[index]\n            : data[abiName];\n        if (baseType === 'tuple' && !isArray) {\n            newData.push(transformJsonDataToAbiFormat(abiComponents, dataItem, transformedData));\n        }\n        else if (baseType === 'tuple' && isArray) {\n            const tupleData = [];\n            for (const tupleItem of dataItem) {\n                // Nested array\n                if (arraySizes.length > 1) {\n                    const nestedItems = fetchArrayElement(tupleItem, arraySizes.length - 1);\n                    const nestedData = [];\n                    for (const nestedItem of nestedItems) {\n                        nestedData.push(transformJsonDataToAbiFormat(abiComponents, nestedItem, transformedData));\n                    }\n                    tupleData.push(nestedData);\n                }\n                else {\n                    tupleData.push(transformJsonDataToAbiFormat(abiComponents, tupleItem, transformedData));\n                }\n            }\n            newData.push(tupleData);\n        }\n        else {\n            newData.push(dataItem);\n        }\n    }\n    // Have to reassign before pushing to transformedData\n    // eslint-disable-next-line no-param-reassign\n    transformedData = transformedData !== null && transformedData !== void 0 ? transformedData : [];\n    transformedData.push(...newData);\n    return transformedData;\n};\n/**\n * Code points to int\n */\nexport const codePointToInt = (codePoint) => {\n    if (codePoint >= 48 && codePoint <= 57) {\n        /* ['0'..'9'] -> [0..9] */\n        return codePoint - 48;\n    }\n    if (codePoint >= 65 && codePoint <= 70) {\n        /* ['A'..'F'] -> [10..15] */\n        return codePoint - 55;\n    }\n    if (codePoint >= 97 && codePoint <= 102) {\n        /* ['a'..'f'] -> [10..15] */\n        return codePoint - 87;\n    }\n    throw new Error(`Invalid code point: ${codePoint}`);\n};\n/**\n * Converts value to it's number representation\n */\nexport const hexToNumber = (value) => {\n    if (!isHexStrict(value)) {\n        throw new Error('Invalid hex string');\n    }\n    const [negative, hexValue] = value.startsWith('-') ? [true, value.slice(1)] : [false, value];\n    const num = BigInt(hexValue);\n    if (num > Number.MAX_SAFE_INTEGER) {\n        return negative ? -num : num;\n    }\n    if (num < Number.MIN_SAFE_INTEGER) {\n        return num;\n    }\n    return negative ? -1 * Number(num) : Number(num);\n};\n/**\n * Converts value to it's hex representation\n */\nexport const numberToHex = (value) => {\n    if ((typeof value === 'number' || typeof value === 'bigint') && value < 0) {\n        return `-0x${value.toString(16).slice(1)}`;\n    }\n    if ((typeof value === 'number' || typeof value === 'bigint') && value >= 0) {\n        return `0x${value.toString(16)}`;\n    }\n    if (typeof value === 'string' && isHexStrict(value)) {\n        const [negative, hex] = value.startsWith('-') ? [true, value.slice(1)] : [false, value];\n        const hexValue = hex.split(/^(-)?0(x|X)/).slice(-1)[0];\n        return `${negative ? '-' : ''}0x${hexValue.replace(/^0+/, '').toLowerCase()}`;\n    }\n    if (typeof value === 'string' && !isHexStrict(value)) {\n        return numberToHex(BigInt(value));\n    }\n    throw new InvalidNumberError(value);\n};\n/**\n * Adds a padding on the left of a string, if value is a integer or bigInt will be converted to a hex string.\n */\nexport const padLeft = (value, characterAmount, sign = '0') => {\n    if (typeof value === 'string' && !isHexStrict(value)) {\n        return value.padStart(characterAmount, sign);\n    }\n    const hex = typeof value === 'string' && isHexStrict(value) ? value : numberToHex(value);\n    const [prefix, hexValue] = hex.startsWith('-') ? ['-0x', hex.slice(3)] : ['0x', hex.slice(2)];\n    return `${prefix}${hexValue.padStart(characterAmount, sign)}`;\n};\nexport function uint8ArrayToHexString(uint8Array) {\n    let hexString = '0x';\n    for (const e of uint8Array) {\n        const hex = e.toString(16);\n        hexString += hex.length === 1 ? `0${hex}` : hex;\n    }\n    return hexString;\n}\n// for optimized technique for hex to bytes conversion\nconst charCodeMap = {\n    zero: 48,\n    nine: 57,\n    A: 65,\n    F: 70,\n    a: 97,\n    f: 102,\n};\nfunction charCodeToBase16(char) {\n    if (char >= charCodeMap.zero && char <= charCodeMap.nine)\n        return char - charCodeMap.zero;\n    if (char >= charCodeMap.A && char <= charCodeMap.F)\n        return char - (charCodeMap.A - 10);\n    if (char >= charCodeMap.a && char <= charCodeMap.f)\n        return char - (charCodeMap.a - 10);\n    return undefined;\n}\nexport function hexToUint8Array(hex) {\n    let offset = 0;\n    if (hex.startsWith('0') && (hex[1] === 'x' || hex[1] === 'X')) {\n        offset = 2;\n    }\n    if (hex.length % 2 !== 0) {\n        throw new InvalidBytesError(`hex string has odd length: ${hex}`);\n    }\n    const length = (hex.length - offset) / 2;\n    const bytes = new Uint8Array(length);\n    for (let index = 0, j = offset; index < length; index += 1) {\n        // eslint-disable-next-line no-plusplus\n        const nibbleLeft = charCodeToBase16(hex.charCodeAt(j++));\n        // eslint-disable-next-line no-plusplus\n        const nibbleRight = charCodeToBase16(hex.charCodeAt(j++));\n        if (nibbleLeft === undefined || nibbleRight === undefined) {\n            throw new InvalidBytesError(`Invalid byte sequence (\"${hex[j - 2]}${hex[j - 1]}\" in \"${hex}\").`);\n        }\n        bytes[index] = nibbleLeft * 16 + nibbleRight;\n    }\n    return bytes;\n}\n// @TODO: Remove this function and its usages once all sub dependencies uses version 1.3.3 or above of @noble/hashes\nexport function ensureIfUint8Array(data) {\n    var _a;\n    if (!(data instanceof Uint8Array) &&\n        ((_a = data === null || data === void 0 ? void 0 : data.constructor) === null || _a === void 0 ? void 0 : _a.name) === 'Uint8Array') {\n        return Uint8Array.from(data);\n    }\n    return data;\n}\n//# sourceMappingURL=utils.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { hexToUint8Array, parseBaseType } from '../utils.js';\nimport { isHexStrict } from './string.js';\n/**\n * checks input if typeof data is valid Uint8Array input\n */\nexport const isUint8Array = (data) => { var _a, _b; return data instanceof Uint8Array || ((_a = data === null || data === void 0 ? void 0 : data.constructor) === null || _a === void 0 ? void 0 : _a.name) === 'Uint8Array' || ((_b = data === null || data === void 0 ? void 0 : data.constructor) === null || _b === void 0 ? void 0 : _b.name) === 'Buffer'; };\nexport const isBytes = (value, options = {\n    abiType: 'bytes',\n}) => {\n    if (typeof value !== 'string' && !Array.isArray(value) && !isUint8Array(value)) {\n        return false;\n    }\n    // isHexStrict also accepts - prefix which can not exists in bytes\n    if (typeof value === 'string' && isHexStrict(value) && value.startsWith('-')) {\n        return false;\n    }\n    if (typeof value === 'string' && !isHexStrict(value)) {\n        return false;\n    }\n    let valueToCheck;\n    if (typeof value === 'string') {\n        if (value.length % 2 !== 0) {\n            // odd length hex\n            return false;\n        }\n        valueToCheck = hexToUint8Array(value);\n    }\n    else if (Array.isArray(value)) {\n        if (value.some(d => d < 0 || d > 255 || !Number.isInteger(d))) {\n            return false;\n        }\n        valueToCheck = new Uint8Array(value);\n    }\n    else {\n        valueToCheck = value;\n    }\n    if (options === null || options === void 0 ? void 0 : options.abiType) {\n        const { baseTypeSize } = parseBaseType(options.abiType);\n        return baseTypeSize ? valueToCheck.length === baseTypeSize : true;\n    }\n    if (options === null || options === void 0 ? void 0 : options.size) {\n        return valueToCheck.length === (options === null || options === void 0 ? void 0 : options.size);\n    }\n    return true;\n};\n//# sourceMappingURL=bytes.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { keccak256 } from 'ethereum-cryptography/keccak.js';\nimport { utf8ToBytes } from 'ethereum-cryptography/utils.js';\nimport { ensureIfUint8Array, uint8ArrayToHexString } from '../utils.js';\nimport { isHexStrict } from './string.js';\nimport { isUint8Array } from './bytes.js';\n/**\n * Checks the checksum of a given address. Will also return false on non-checksum addresses.\n */\nexport const checkAddressCheckSum = (data) => {\n    if (!/^(0x)?[0-9a-f]{40}$/i.test(data))\n        return false;\n    const address = data.slice(2);\n    const updatedData = utf8ToBytes(address.toLowerCase());\n    const addressHash = uint8ArrayToHexString(keccak256(ensureIfUint8Array(updatedData))).slice(2);\n    for (let i = 0; i < 40; i += 1) {\n        // the nth letter should be uppercase if the nth digit of casemap is 1\n        if ((parseInt(addressHash[i], 16) > 7 && address[i].toUpperCase() !== address[i]) ||\n            (parseInt(addressHash[i], 16) <= 7 && address[i].toLowerCase() !== address[i])) {\n            return false;\n        }\n    }\n    return true;\n};\n/**\n * Checks if a given string is a valid Ethereum address. It will also check the checksum, if the address has upper and lowercase letters.\n */\nexport const isAddress = (value, checkChecksum = true) => {\n    if (typeof value !== 'string' && !isUint8Array(value)) {\n        return false;\n    }\n    let valueToCheck;\n    if (isUint8Array(value)) {\n        valueToCheck = uint8ArrayToHexString(value);\n    }\n    else if (typeof value === 'string' && !isHexStrict(value)) {\n        valueToCheck = value.toLowerCase().startsWith('0x') ? value : `0x${value}`;\n    }\n    else {\n        valueToCheck = value;\n    }\n    // check if it has the basic requirements of an address\n    if (!/^(0x)?[0-9a-f]{40}$/i.test(valueToCheck)) {\n        return false;\n    }\n    // If it's ALL lowercase or ALL upppercase\n    if (/^(0x|0X)?[0-9a-f]{40}$/.test(valueToCheck) ||\n        /^(0x|0X)?[0-9A-F]{40}$/.test(valueToCheck)) {\n        return true;\n        // Otherwise check each case\n    }\n    return checkChecksum ? checkAddressCheckSum(valueToCheck) : true;\n};\n//# sourceMappingURL=address.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { parseBaseType, hexToNumber } from '../utils.js';\nimport { isHexStrict } from './string.js';\n/**\n * Checks if a given value is a valid big int\n */\nexport const isBigInt = (value) => typeof value === 'bigint';\n// Note: this could be simplified using ** operator, but babel does not handle it well\n// \tyou can find more at: https://github.com/babel/babel/issues/13109 and https://github.com/web3/web3.js/issues/6187\n/** @internal */\nexport const bigintPower = (base, expo) => {\n    // edge case\n    if (expo === BigInt(0)) {\n        return BigInt(1);\n    }\n    let res = base;\n    for (let index = 1; index < expo; index += 1) {\n        res *= base;\n    }\n    return res;\n};\nexport const isUInt = (value, options = {\n    abiType: 'uint',\n}) => {\n    if (!['number', 'string', 'bigint'].includes(typeof value) ||\n        (typeof value === 'string' && value.length === 0)) {\n        return false;\n    }\n    let size;\n    if (options === null || options === void 0 ? void 0 : options.abiType) {\n        const { baseTypeSize } = parseBaseType(options.abiType);\n        if (baseTypeSize) {\n            size = baseTypeSize;\n        }\n    }\n    else if (options.bitSize) {\n        size = options.bitSize;\n    }\n    const maxSize = bigintPower(BigInt(2), BigInt(size !== null && size !== void 0 ? size : 256)) - BigInt(1);\n    try {\n        const valueToCheck = typeof value === 'string' && isHexStrict(value)\n            ? BigInt(hexToNumber(value))\n            : BigInt(value);\n        return valueToCheck >= 0 && valueToCheck <= maxSize;\n    }\n    catch (error) {\n        // Some invalid number value given which can not be converted via BigInt\n        return false;\n    }\n};\nexport const isInt = (value, options = {\n    abiType: 'int',\n}) => {\n    if (!['number', 'string', 'bigint'].includes(typeof value)) {\n        return false;\n    }\n    if (typeof value === 'number' && value > Number.MAX_SAFE_INTEGER) {\n        return false;\n    }\n    let size;\n    if (options === null || options === void 0 ? void 0 : options.abiType) {\n        const { baseTypeSize, baseType } = parseBaseType(options.abiType);\n        if (baseType !== 'int') {\n            return false;\n        }\n        if (baseTypeSize) {\n            size = baseTypeSize;\n        }\n    }\n    else if (options.bitSize) {\n        size = options.bitSize;\n    }\n    const maxSize = bigintPower(BigInt(2), BigInt((size !== null && size !== void 0 ? size : 256) - 1));\n    const minSize = BigInt(-1) * bigintPower(BigInt(2), BigInt((size !== null && size !== void 0 ? size : 256) - 1));\n    try {\n        const valueToCheck = typeof value === 'string' && isHexStrict(value)\n            ? BigInt(hexToNumber(value))\n            : BigInt(value);\n        return valueToCheck >= minSize && valueToCheck <= maxSize;\n    }\n    catch (error) {\n        // Some invalid number value given which can not be converted via BigInt\n        return false;\n    }\n};\nexport const isNumber = (value) => {\n    if (isInt(value)) {\n        return true;\n    }\n    // It would be a decimal number\n    if (typeof value === 'string' &&\n        /[0-9.]/.test(value) &&\n        value.indexOf('.') === value.lastIndexOf('.')) {\n        return true;\n    }\n    if (typeof value === 'number') {\n        return true;\n    }\n    return false;\n};\n//# sourceMappingURL=numbers.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { BlockTags } from 'web3-types';\nimport { isUInt } from './numbers.js';\nexport const isBlockNumber = (value) => isUInt(value);\n/**\n * Returns true if the given blockNumber is 'latest', 'pending', 'earliest, 'safe' or 'finalized'\n */\nexport const isBlockTag = (value) => Object.values(BlockTags).includes(value);\n/**\n * Returns true if given value is valid hex string and not negative, or is a valid BlockTag\n */\nexport const isBlockNumberOrTag = (value) => isBlockTag(value) || isBlockNumber(value);\n//# sourceMappingURL=block.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { keccak256 } from 'ethereum-cryptography/keccak.js';\nimport { codePointToInt, hexToUint8Array, padLeft, uint8ArrayToHexString } from '../utils.js';\nimport { isAddress } from './address.js';\nimport { isHexStrict } from './string.js';\n/**\n * Returns true if the bloom is a valid bloom\n * https://github.com/joshstevens19/ethereum-bloom-filters/blob/fbeb47b70b46243c3963fe1c2988d7461ef17236/src/index.ts#L7\n */\nexport const isBloom = (bloom) => {\n    if (typeof bloom !== 'string') {\n        return false;\n    }\n    if (!/^(0x)?[0-9a-f]{512}$/i.test(bloom)) {\n        return false;\n    }\n    if (/^(0x)?[0-9a-f]{512}$/.test(bloom) || /^(0x)?[0-9A-F]{512}$/.test(bloom)) {\n        return true;\n    }\n    return false;\n};\n/**\n * Returns true if the value is part of the given bloom\n * note: false positives are possible.\n */\nexport const isInBloom = (bloom, value) => {\n    if (typeof value === 'string' && !isHexStrict(value)) {\n        return false;\n    }\n    if (!isBloom(bloom)) {\n        return false;\n    }\n    const uint8Array = typeof value === 'string' ? hexToUint8Array(value) : value;\n    const hash = uint8ArrayToHexString(keccak256(uint8Array)).slice(2);\n    for (let i = 0; i < 12; i += 4) {\n        // calculate bit position in bloom filter that must be active\n        const bitpos = \n        // eslint-disable-next-line no-bitwise\n        ((parseInt(hash.slice(i, i + 2), 16) << 8) + parseInt(hash.slice(i + 2, i + 4), 16)) &\n            2047;\n        // test if bitpos in bloom is active\n        const code = codePointToInt(bloom.charCodeAt(bloom.length - 1 - Math.floor(bitpos / 4)));\n        // eslint-disable-next-line no-bitwise\n        const offset = 1 << bitpos % 4;\n        // eslint-disable-next-line no-bitwise\n        if ((code & offset) !== offset) {\n            return false;\n        }\n    }\n    return true;\n};\n/**\n * Returns true if the ethereum users address is part of the given bloom note: false positives are possible.\n */\nexport const isUserEthereumAddressInBloom = (bloom, ethereumAddress) => {\n    if (!isBloom(bloom)) {\n        return false;\n    }\n    if (!isAddress(ethereumAddress)) {\n        return false;\n    }\n    // you have to pad the ethereum address to 32 bytes\n    // else the bloom filter does not work\n    // this is only if your matching the USERS\n    // ethereum address. Contract address do not need this\n    // hence why we have 2 methods\n    // (0x is not in the 2nd parameter of padleft so 64 chars is fine)\n    const address = padLeft(ethereumAddress, 64);\n    return isInBloom(bloom, address);\n};\n/**\n * Returns true if the contract address is part of the given bloom.\n * note: false positives are possible.\n */\nexport const isContractAddressInBloom = (bloom, contractAddress) => {\n    if (!isBloom(bloom)) {\n        return false;\n    }\n    if (!isAddress(contractAddress)) {\n        return false;\n    }\n    return isInBloom(bloom, contractAddress);\n};\n//# sourceMappingURL=bloom.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { isHexStrict } from './string.js';\nexport const isBoolean = (value) => {\n    if (!['number', 'string', 'boolean'].includes(typeof value)) {\n        return false;\n    }\n    if (typeof value === 'boolean') {\n        return true;\n    }\n    if (typeof value === 'string' && !isHexStrict(value)) {\n        return value === '1' || value === '0';\n    }\n    if (typeof value === 'string' && isHexStrict(value)) {\n        return value === '0x1' || value === '0x0';\n    }\n    // type === number\n    return value === 1 || value === 0;\n};\n//# sourceMappingURL=boolean.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { TypedArray } from 'web3-types';\n// Explicitly check for the\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport const isNullish = (item) => \n// Using \"null\" value intentionally for validation\n// eslint-disable-next-line no-null/no-null\nitem === undefined || item === null;\nexport const isObject = (item) => typeof item === 'object' &&\n    !isNullish(item) &&\n    !Array.isArray(item) &&\n    !(item instanceof TypedArray);\n//# sourceMappingURL=object.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { isBloom, isInBloom } from './bloom.js';\n/**\n * Checks if its a valid topic\n */\nexport const isTopic = (topic) => {\n    if (typeof topic !== 'string') {\n        return false;\n    }\n    if (!/^(0x)?[0-9a-f]{64}$/i.test(topic)) {\n        return false;\n    }\n    if (/^(0x)?[0-9a-f]{64}$/.test(topic) || /^(0x)?[0-9A-F]{64}$/.test(topic)) {\n        return true;\n    }\n    return false;\n};\n/**\n * Returns true if the topic is part of the given bloom.\n * note: false positives are possible.\n */\nexport const isTopicInBloom = (bloom, topic) => {\n    if (!isBloom(bloom)) {\n        return false;\n    }\n    if (!isTopic(topic)) {\n        return false;\n    }\n    return isInBloom(bloom, topic);\n};\n//# sourceMappingURL=topic.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { isAddress } from './address.js';\nimport { isBlockNumberOrTag } from './block.js';\nimport { isNullish } from './object.js';\nimport { isTopic } from './topic.js';\n/**\n * First we check if all properties in the provided value are expected,\n * then because all Filter properties are optional, we check if the expected properties\n * are defined. If defined and they're not the expected type, we immediately return false,\n * otherwise we return true after all checks pass.\n */\nexport const isFilterObject = (value) => {\n    const expectedFilterProperties = [\n        'fromBlock',\n        'toBlock',\n        'address',\n        'topics',\n        'blockHash',\n    ];\n    if (isNullish(value) || typeof value !== 'object')\n        return false;\n    if (!Object.keys(value).every(property => expectedFilterProperties.includes(property)))\n        return false;\n    if ((!isNullish(value.fromBlock) && !isBlockNumberOrTag(value.fromBlock)) ||\n        (!isNullish(value.toBlock) && !isBlockNumberOrTag(value.toBlock)))\n        return false;\n    if (!isNullish(value.address)) {\n        if (Array.isArray(value.address)) {\n            if (!value.address.every(address => isAddress(address)))\n                return false;\n        }\n        else if (!isAddress(value.address))\n            return false;\n    }\n    if (!isNullish(value.topics)) {\n        if (!value.topics.every(topic => {\n            if (isNullish(topic))\n                return true;\n            if (Array.isArray(topic)) {\n                return topic.every(nestedTopic => isTopic(nestedTopic));\n            }\n            if (isTopic(topic))\n                return true;\n            return false;\n        }))\n            return false;\n    }\n    return true;\n};\n//# sourceMappingURL=filter.js.map","import { isAddress } from './validation/address.js';\nimport { isBlockNumber, isBlockNumberOrTag, isBlockTag } from './validation/block.js';\nimport { isBloom } from './validation/bloom.js';\nimport { isBoolean } from './validation/boolean.js';\nimport { isBytes } from './validation/bytes.js';\nimport { isFilterObject } from './validation/filter.js';\nimport { isHexStrict, isString } from './validation/string.js';\nimport { isNumber, isInt, isUInt } from './validation/numbers.js';\nconst formats = {\n    address: (data) => isAddress(data),\n    bloom: (data) => isBloom(data),\n    blockNumber: (data) => isBlockNumber(data),\n    blockTag: (data) => isBlockTag(data),\n    blockNumberOrTag: (data) => isBlockNumberOrTag(data),\n    bool: (data) => isBoolean(data),\n    bytes: (data) => isBytes(data),\n    filter: (data) => isFilterObject(data),\n    hex: (data) => isHexStrict(data),\n    uint: (data) => isUInt(data),\n    int: (data) => isInt(data),\n    number: (data) => isNumber(data),\n    string: (data) => isString(data),\n};\n// generate formats for all numbers types\nfor (let bitSize = 8; bitSize <= 256; bitSize += 8) {\n    formats[`int${bitSize}`] = data => isInt(data, { bitSize });\n    formats[`uint${bitSize}`] = data => isUInt(data, { bitSize });\n}\n// generate bytes\nfor (let size = 1; size <= 32; size += 1) {\n    formats[`bytes${size}`] = data => isBytes(data, { size });\n}\nformats.bytes256 = formats.bytes;\nexport default formats;\n//# sourceMappingURL=formats.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { SchemaFormatError } from 'web3-errors';\nimport { z, ZodIssueCode } from 'zod';\nimport { Web3ValidatorError } from './errors.js';\nimport formats from './formats.js';\nconst convertToZod = (schema) => {\n    if ((!(schema === null || schema === void 0 ? void 0 : schema.type) || (schema === null || schema === void 0 ? void 0 : schema.type) === 'object') && (schema === null || schema === void 0 ? void 0 : schema.properties)) {\n        const obj = {};\n        for (const name of Object.keys(schema.properties)) {\n            const zItem = convertToZod(schema.properties[name]);\n            if (zItem) {\n                obj[name] = zItem;\n            }\n        }\n        if (Array.isArray(schema.required)) {\n            return z\n                .object(obj)\n                .partial()\n                .required(schema.required.reduce((acc, v) => (Object.assign(Object.assign({}, acc), { [v]: true })), {}));\n        }\n        return z.object(obj).partial();\n    }\n    if ((schema === null || schema === void 0 ? void 0 : schema.type) === 'array' && (schema === null || schema === void 0 ? void 0 : schema.items)) {\n        if (Array.isArray(schema.items) && schema.items.length > 1\n            && schema.maxItems !== undefined\n            && new Set(schema.items.map((item) => item.$id)).size === schema.items.length) {\n            const arr = [];\n            for (const item of schema.items) {\n                const zItem = convertToZod(item);\n                if (zItem) {\n                    arr.push(zItem);\n                }\n            }\n            return z.tuple(arr);\n        }\n        const nextSchema = Array.isArray(schema.items) ? schema.items[0] : schema.items;\n        let zodArraySchema = z.array(convertToZod(nextSchema));\n        zodArraySchema = schema.minItems !== undefined ? zodArraySchema.min(schema.minItems) : zodArraySchema;\n        zodArraySchema = schema.maxItems !== undefined ? zodArraySchema.max(schema.maxItems) : zodArraySchema;\n        return zodArraySchema;\n    }\n    if (schema.oneOf && Array.isArray(schema.oneOf)) {\n        return z.union(schema.oneOf.map(oneOfSchema => convertToZod(oneOfSchema)));\n    }\n    if (schema === null || schema === void 0 ? void 0 : schema.format) {\n        if (!formats[schema.format]) {\n            throw new SchemaFormatError(schema.format);\n        }\n        return z.any().refine(formats[schema.format], (value) => ({\n            params: { value, format: schema.format },\n        }));\n    }\n    if ((schema === null || schema === void 0 ? void 0 : schema.type) &&\n        (schema === null || schema === void 0 ? void 0 : schema.type) !== 'object' &&\n        typeof z[String(schema.type)] === 'function') {\n        return z[String(schema.type)]();\n    }\n    return z.object({ data: z.any() }).partial();\n};\nexport class Validator {\n    // eslint-disable-next-line no-useless-constructor, @typescript-eslint/no-empty-function\n    static factory() {\n        if (!Validator.validatorInstance) {\n            Validator.validatorInstance = new Validator();\n        }\n        return Validator.validatorInstance;\n    }\n    validate(schema, data, options) {\n        var _a, _b;\n        const zod = convertToZod(schema);\n        const result = zod.safeParse(data);\n        if (!result.success) {\n            const errors = this.convertErrors((_b = (_a = result.error) === null || _a === void 0 ? void 0 : _a.issues) !== null && _b !== void 0 ? _b : []);\n            if (errors) {\n                if (options === null || options === void 0 ? void 0 : options.silent) {\n                    return errors;\n                }\n                throw new Web3ValidatorError(errors);\n            }\n        }\n        return undefined;\n    }\n    // eslint-disable-next-line class-methods-use-this\n    convertErrors(errors) {\n        if (errors && Array.isArray(errors) && errors.length > 0) {\n            return errors.map((error) => {\n                var _a;\n                let message;\n                let keyword;\n                let params;\n                let schemaPath;\n                schemaPath = error.path.join('/');\n                const field = String(error.path[error.path.length - 1]);\n                const instancePath = error.path.join('/');\n                if (error.code === ZodIssueCode.too_big) {\n                    keyword = 'maxItems';\n                    schemaPath = `${instancePath}/maxItems`;\n                    params = { limit: error.maximum };\n                    message = `must NOT have more than ${error.maximum} items`;\n                }\n                else if (error.code === ZodIssueCode.too_small) {\n                    keyword = 'minItems';\n                    schemaPath = `${instancePath}/minItems`;\n                    params = { limit: error.minimum };\n                    message = `must NOT have fewer than ${error.minimum} items`;\n                }\n                else if (error.code === ZodIssueCode.custom) {\n                    const { value, format } = ((_a = error.params) !== null && _a !== void 0 ? _a : {});\n                    if (typeof value === 'undefined') {\n                        message = `value at \"/${schemaPath}\" is required`;\n                    }\n                    else {\n                        message = `value \"${\n                        // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n                        typeof value === 'object' ? JSON.stringify(value) : value}\" at \"/${schemaPath}\" must pass \"${format}\" validation`;\n                    }\n                    params = { value };\n                }\n                return {\n                    keyword: keyword !== null && keyword !== void 0 ? keyword : field,\n                    instancePath: instancePath ? `/${instancePath}` : '',\n                    schemaPath: schemaPath ? `#${schemaPath}` : '#',\n                    // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n                    params: params !== null && params !== void 0 ? params : { value: error.message },\n                    message: message !== null && message !== void 0 ? message : error.message,\n                };\n            });\n        }\n        return undefined;\n    }\n}\n//# sourceMappingURL=validator.js.map","import { Validator } from './validator.js';\nimport { ethAbiToJsonSchema } from './utils.js';\nimport { Web3ValidatorError } from './errors.js';\nexport class Web3Validator {\n    constructor() {\n        this._validator = Validator.factory();\n    }\n    validateJSONSchema(schema, data, options) {\n        return this._validator.validate(schema, data, options);\n    }\n    validate(schema, data, options = { silent: false }) {\n        var _a, _b;\n        const jsonSchema = ethAbiToJsonSchema(schema);\n        if (Array.isArray(jsonSchema.items) &&\n            ((_a = jsonSchema.items) === null || _a === void 0 ? void 0 : _a.length) === 0 &&\n            data.length === 0) {\n            return undefined;\n        }\n        if (Array.isArray(jsonSchema.items) &&\n            ((_b = jsonSchema.items) === null || _b === void 0 ? void 0 : _b.length) === 0 &&\n            data.length !== 0) {\n            throw new Web3ValidatorError([\n                {\n                    instancePath: '/0',\n                    schemaPath: '/',\n                    keyword: 'required',\n                    message: 'empty schema against data can not be validated',\n                    params: data,\n                },\n            ]);\n        }\n        return this._validator.validate(jsonSchema, data, options);\n    }\n}\n//# sourceMappingURL=web3_validator.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { Web3Validator } from './web3_validator.js';\nexport const validator = new Web3Validator();\n//# sourceMappingURL=default_validator.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nexport function isUint8Array(data) {\n    var _a, _b;\n    return (data instanceof Uint8Array ||\n        ((_a = data === null || data === void 0 ? void 0 : data.constructor) === null || _a === void 0 ? void 0 : _a.name) === 'Uint8Array' ||\n        ((_b = data === null || data === void 0 ? void 0 : data.constructor) === null || _b === void 0 ? void 0 : _b.name) === 'Buffer');\n}\nexport function uint8ArrayConcat(...parts) {\n    const length = parts.reduce((prev, part) => {\n        const agg = prev + part.length;\n        return agg;\n    }, 0);\n    const result = new Uint8Array(length);\n    let offset = 0;\n    for (const part of parts) {\n        result.set(part, offset);\n        offset += part.length;\n    }\n    return result;\n}\n/**\n * Returns true if the two passed Uint8Arrays have the same content\n */\nexport function uint8ArrayEquals(a, b) {\n    if (a === b) {\n        return true;\n    }\n    if (a.byteLength !== b.byteLength) {\n        return false;\n    }\n    for (let i = 0; i < a.byteLength; i += 1) {\n        if (a[i] !== b[i]) {\n            return false;\n        }\n    }\n    return true;\n}\n//# sourceMappingURL=uint8array.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\n/**\n * @module Utils\n */\nimport { keccak256 } from 'ethereum-cryptography/keccak.js';\nimport { bytesToUtf8, utf8ToBytes as ecUtf8ToBytes } from 'ethereum-cryptography/utils.js';\nimport { isAddress, isHex, isHexStrict, isInt, isUInt, isNullish, utils, utils as validatorUtils, validator, bigintPower, } from 'web3-validator';\nimport { HexProcessingError, InvalidAddressError, InvalidBooleanError, InvalidBytesError, InvalidNumberError, InvalidUnitError, InvalidIntegerError, } from 'web3-errors';\nimport { isUint8Array } from './uint8array.js';\n// Ref: https://ethdocs.org/en/latest/ether.html\n// Note: this could be simplified using ** operator, but babel does not handle it well (https://github.com/babel/babel/issues/13109)\n/** @internal */\nexport const ethUnitMap = {\n    noether: BigInt(0),\n    wei: BigInt(1),\n    kwei: BigInt(1000),\n    Kwei: BigInt(1000),\n    babbage: BigInt(1000),\n    femtoether: BigInt(1000),\n    mwei: BigInt(1000000),\n    Mwei: BigInt(1000000),\n    lovelace: BigInt(1000000),\n    picoether: BigInt(1000000),\n    gwei: BigInt(1000000000),\n    Gwei: BigInt(1000000000),\n    shannon: BigInt(1000000000),\n    nanoether: BigInt(1000000000),\n    nano: BigInt(1000000000),\n    szabo: BigInt(1000000000000),\n    microether: BigInt(1000000000000),\n    micro: BigInt(1000000000000),\n    finney: BigInt(1000000000000000),\n    milliether: BigInt(1000000000000000),\n    milli: BigInt(1000000000000000),\n    ether: BigInt('1000000000000000000'),\n    kether: BigInt('1000000000000000000000'),\n    grand: BigInt('1000000000000000000000'),\n    mether: BigInt('1000000000000000000000000'),\n    gether: BigInt('1000000000000000000000000000'),\n    tether: BigInt('1000000000000000000000000000000'),\n};\nconst PrecisionLossWarning = 'Warning: Using type `number` with values that are large or contain many decimals may cause loss of precision, it is recommended to use type `string` or `BigInt` when using conversion methods';\n/**\n * Convert a value from bytes to Uint8Array\n * @param data - Data to be converted\n * @returns - The Uint8Array representation of the input data\n *\n * @example\n * ```ts\n * console.log(web3.utils.bytesToUint8Array(\"0xab\")));\n * > Uint8Array(1) [ 171 ]\n * ```\n */\nexport const bytesToUint8Array = (data) => {\n    validator.validate(['bytes'], [data]);\n    if (isUint8Array(data)) {\n        return data;\n    }\n    if (Array.isArray(data)) {\n        return new Uint8Array(data);\n    }\n    if (typeof data === 'string') {\n        return validatorUtils.hexToUint8Array(data);\n    }\n    throw new InvalidBytesError(data);\n};\n/**\n * @internal\n */\nconst { uint8ArrayToHexString } = validatorUtils;\n/**\n * Convert a byte array to a hex string\n * @param bytes - Byte array to be converted\n * @returns - The hex string representation of the input byte array\n *\n * @example\n * ```ts\n * console.log(web3.utils.bytesToHex(new Uint8Array([72, 12])));\n * > \"0x480c\"\n *\n */\nexport const bytesToHex = (bytes) => uint8ArrayToHexString(bytesToUint8Array(bytes));\n/**\n * Convert a hex string to a byte array\n * @param hex - Hex string to be converted\n * @returns - The byte array representation of the input hex string\n *\n * @example\n * ```ts\n * console.log(web3.utils.hexToBytes('0x74657374'));\n * > Uint8Array(4) [ 116, 101, 115, 116 ]\n * ```\n */\nexport const hexToBytes = (bytes) => {\n    if (typeof bytes === 'string' && bytes.slice(0, 2).toLowerCase() !== '0x') {\n        return bytesToUint8Array(`0x${bytes}`);\n    }\n    return bytesToUint8Array(bytes);\n};\n/**\n * Converts value to it's number representation\n * @param value - Hex string to be converted\n * @returns - The number representation of the input value\n *\n * @example\n * ```ts\n * conoslle.log(web3.utils.hexToNumber('0xa'));\n * > 10\n * ```\n */\nexport const hexToNumber = (value) => {\n    validator.validate(['hex'], [value]);\n    // To avoid duplicate code and circular dependency we will\n    // use `hexToNumber` implementation from `web3-validator`\n    return validatorUtils.hexToNumber(value);\n};\n/**\n * Converts value to it's number representation @alias `hexToNumber`\n */\nexport const toDecimal = hexToNumber;\n/**\n * Converts value to it's hex representation\n * @param value - Value to be converted\n * @param hexstrict - Add padding to converted value if odd, to make it hexstrict\n * @returns - The hex representation of the input value\n *\n * @example\n * ```ts\n * console.log(web3.utils.numberToHex(10));\n * > \"0xa\"\n * ```\n */\nexport const numberToHex = (value, hexstrict) => {\n    if (typeof value !== 'bigint')\n        validator.validate(['int'], [value]);\n    // To avoid duplicate code and circular dependency we will\n    // use `numberToHex` implementation from `web3-validator`\n    let updatedValue = validatorUtils.numberToHex(value);\n    if (hexstrict) {\n        if (!updatedValue.startsWith('-') && updatedValue.length % 2 === 1) {\n            // To avoid duplicate a circular dependency we will not be using the padLeft method\n            updatedValue = '0x0'.concat(updatedValue.slice(2));\n        }\n        else if (updatedValue.length % 2 === 0 && updatedValue.startsWith('-'))\n            updatedValue = '-0x0'.concat(updatedValue.slice(3));\n    }\n    return updatedValue;\n};\n/**\n * Converts value to it's hex representation @alias `numberToHex`\n *\n */\nexport const fromDecimal = numberToHex;\n/**\n * Converts value to it's decimal representation in string\n * @param value - Hex string to be converted\n * @returns - The decimal representation of the input value\n *\n * @example\n * ```ts\n * console.log(web3.utils.hexToNumberString('0xa'));\n * > \"10\"\n * ```\n */\nexport const hexToNumberString = (data) => hexToNumber(data).toString();\n/**\n * Should be called to get hex representation (prefixed by 0x) of utf8 string\n * @param str - Utf8 string to be converted\n * @returns - The hex representation of the input string\n *\n * @example\n * ```ts\n * console.log(utf8ToHex('web3.js'));\n * > \"0x776562332e6a73\"\n * ```\n *\n */\nexport const utf8ToHex = (str) => {\n    validator.validate(['string'], [str]);\n    // To be compatible with 1.x trim null character\n    // eslint-disable-next-line no-control-regex\n    let strWithoutNullCharacter = str.replace(/^(?:\\u0000)/, '');\n    // eslint-disable-next-line no-control-regex\n    strWithoutNullCharacter = strWithoutNullCharacter.replace(/(?:\\u0000)$/, '');\n    return bytesToHex(new TextEncoder().encode(strWithoutNullCharacter));\n};\n/**\n * @alias utf8ToHex\n */\nexport const fromUtf8 = utf8ToHex;\n/**\n * @alias utf8ToHex\n */\nexport const stringToHex = utf8ToHex;\n/**\n * Should be called to get utf8 from it's hex representation\n * @param str - Hex string to be converted\n * @returns - Utf8 string\n *\n * @example\n * ```ts\n * console.log(web3.utils.hexToUtf8('0x48656c6c6f20576f726c64'));\n * > Hello World\n * ```\n */\nexport const hexToUtf8 = (str) => bytesToUtf8(hexToBytes(str));\n/**\n * @alias hexToUtf8\n */\nexport const toUtf8 = (input) => {\n    if (typeof input === 'string') {\n        return hexToUtf8(input);\n    }\n    validator.validate(['bytes'], [input]);\n    return bytesToUtf8(input);\n};\nexport const utf8ToBytes = ecUtf8ToBytes;\n/**\n * @alias hexToUtf8\n */\nexport const hexToString = hexToUtf8;\n/**\n * Should be called to get hex representation (prefixed by 0x) of ascii string\n * @param str - String to be converted to hex\n * @returns - Hex string\n *\n * @example\n * ```ts\n * console.log(web3.utils.asciiToHex('Hello World'));\n * > 0x48656c6c6f20576f726c64\n * ```\n */\nexport const asciiToHex = (str) => {\n    validator.validate(['string'], [str]);\n    let hexString = '';\n    for (let i = 0; i < str.length; i += 1) {\n        const hexCharCode = str.charCodeAt(i).toString(16);\n        // might need a leading 0\n        hexString += hexCharCode.length % 2 !== 0 ? `0${hexCharCode}` : hexCharCode;\n    }\n    return `0x${hexString}`;\n};\n/**\n * @alias asciiToHex\n */\nexport const fromAscii = asciiToHex;\n/**\n * Should be called to get ascii from it's hex representation\n * @param str - Hex string to be converted to ascii\n * @returns - Ascii string\n *\n * @example\n * ```ts\n * console.log(web3.utils.hexToAscii('0x48656c6c6f20576f726c64'));\n * > Hello World\n * ```\n */\nexport const hexToAscii = (str) => {\n    const decoder = new TextDecoder('ascii');\n    return decoder.decode(hexToBytes(str));\n};\n/**\n * @alias hexToAscii\n */\nexport const toAscii = hexToAscii;\n/**\n * Auto converts any given value into it's hex representation.\n * @param value - Value to be converted to hex\n * @param returnType - If true, it will return the type of the value\n *\n * @example\n * ```ts\n * console.log(web3.utils.toHex(10));\n * > 0xa\n *\n * console.log(web3.utils.toHex('0x123', true));\n * > bytes\n *```\n */\nexport const toHex = (value, returnType) => {\n    if (typeof value === 'string' && isAddress(value)) {\n        return returnType ? 'address' : `0x${value.toLowerCase().replace(/^0x/i, '')}`;\n    }\n    if (typeof value === 'boolean') {\n        // eslint-disable-next-line no-nested-ternary\n        return returnType ? 'bool' : value ? '0x01' : '0x00';\n    }\n    if (typeof value === 'number') {\n        // eslint-disable-next-line no-nested-ternary\n        return returnType ? (value < 0 ? 'int256' : 'uint256') : numberToHex(value);\n    }\n    if (typeof value === 'bigint') {\n        return returnType ? 'bigint' : numberToHex(value);\n    }\n    if (isUint8Array(value)) {\n        return returnType ? 'bytes' : bytesToHex(value);\n    }\n    if (typeof value === 'object' && !!value) {\n        return returnType ? 'string' : utf8ToHex(JSON.stringify(value));\n    }\n    if (typeof value === 'string') {\n        if (value.startsWith('-0x') || value.startsWith('-0X')) {\n            return returnType ? 'int256' : numberToHex(value);\n        }\n        if (isHexStrict(value)) {\n            return returnType ? 'bytes' : value;\n        }\n        if (isHex(value) && !isInt(value) && !isUInt(value)) {\n            return returnType ? 'bytes' : `0x${value}`;\n        }\n        if (isHex(value) && !isInt(value) && isUInt(value)) {\n            // This condition seems problematic because meeting\n            // both conditions `!isInt(value) && isUInt(value)` should be impossible.\n            // But a value pass for those conditions: \"101611154195520776335741463917853444671577865378275924493376429267637792638729\"\n            // Note that according to the docs: it is supposed to be treated as a string (https://docs.web3js.org/guides/web3_upgrade_guide/x/web3_utils_migration_guide#conversion-to-hex)\n            // In short, the strange is that isInt(value) is false but isUInt(value) is true for the value above.\n            // TODO: isUInt(value) should be investigated.\n            // However, if `toHex('101611154195520776335741463917853444671577865378275924493376429267637792638729', true)` is called, it will return `true`.\n            // But, if `toHex('101611154195520776335741463917853444671577865378275924493376429267637792638729')` is called, it will throw inside `numberToHex`.\n            return returnType ? 'uint' : numberToHex(value);\n        }\n        if (!Number.isFinite(value)) {\n            return returnType ? 'string' : utf8ToHex(value);\n        }\n    }\n    throw new HexProcessingError(value);\n};\n/**\n * Converts any given value into it's number representation, if possible, else into it's bigint representation.\n * @param value - The value to convert\n * @returns - Returns the value in number or bigint representation\n *\n * @example\n * ```ts\n * console.log(web3.utils.toNumber(1));\n * > 1\n * console.log(web3.utils.toNumber(Number.MAX_SAFE_INTEGER));\n * > 9007199254740991\n *\n * console.log(web3.utils.toNumber(BigInt(Number.MAX_SAFE_INTEGER)));\n * > 9007199254740991\n *\n * console.log(web3.utils.toNumber(BigInt(Number.MAX_SAFE_INTEGER) + BigInt(1)));\n * > 9007199254740992n\n *\n * ```\n */\nexport const toNumber = (value) => {\n    if (typeof value === 'number') {\n        if (value > 1e20) {\n            console.warn(PrecisionLossWarning);\n            // JavaScript converts numbers >= 10^21 to scientific notation when coerced to strings,\n            // leading to potential parsing errors and incorrect representations.\n            // For instance, String(10000000000000000000000) yields '1e+22'.\n            // Using BigInt prevents this\n            return BigInt(value);\n        }\n        return value;\n    }\n    if (typeof value === 'bigint') {\n        return value >= Number.MIN_SAFE_INTEGER && value <= Number.MAX_SAFE_INTEGER\n            ? Number(value)\n            : value;\n    }\n    if (typeof value === 'string' && isHexStrict(value)) {\n        return hexToNumber(value);\n    }\n    try {\n        return toNumber(BigInt(value));\n    }\n    catch (_a) {\n        throw new InvalidNumberError(value);\n    }\n};\n/**\n * Auto converts any given value into it's bigint representation\n *\n * @param value - The value to convert\n * @returns - Returns the value in bigint representation\n\n * @example\n * ```ts\n * console.log(web3.utils.toBigInt(1));\n * > 1n\n * ```\n */\nexport const toBigInt = (value) => {\n    if (typeof value === 'number') {\n        return BigInt(value);\n    }\n    if (typeof value === 'bigint') {\n        return value;\n    }\n    // isHex passes for dec, too\n    if (typeof value === 'string' && isHex(value)) {\n        if (value.startsWith('-')) {\n            return -BigInt(value.substring(1));\n        }\n        return BigInt(value);\n    }\n    throw new InvalidNumberError(value);\n};\n/**\n * Takes a number of wei and converts it to any other ether unit.\n * @param number - The value in wei\n * @param unit - The unit to convert to\n * @returns - Returns the converted value in the given unit\n *\n * @example\n * ```ts\n * console.log(web3.utils.fromWei(\"1\", \"ether\"));\n * > 0.000000000000000001\n *\n * console.log(web3.utils.fromWei(\"1\", \"shannon\"));\n * > 0.000000001\n * ```\n */\nexport const fromWei = (number, unit) => {\n    let denomination;\n    if (typeof unit === 'string') {\n        denomination = ethUnitMap[unit];\n        if (!denomination) {\n            throw new InvalidUnitError(unit);\n        }\n    }\n    else {\n        if (unit < 0 || !Number.isInteger(unit)) {\n            throw new InvalidIntegerError(unit);\n        }\n        denomination = bigintPower(BigInt(10), BigInt(unit));\n    }\n    // value in wei would always be integer\n    // 13456789, 1234\n    const value = String(toNumber(number));\n    // count number of zeros in denomination\n    // 1000000 -> 6\n    const numberOfZerosInDenomination = denomination.toString().length - 1;\n    if (numberOfZerosInDenomination <= 0) {\n        return value.toString();\n    }\n    // pad the value with required zeros\n    // 13456789 -> 13456789, 1234 -> 001234\n    const zeroPaddedValue = value.padStart(numberOfZerosInDenomination, '0');\n    // get the integer part of value by counting number of zeros from start\n    // 13456789 -> '13'\n    // 001234 -> ''\n    const integer = zeroPaddedValue.slice(0, -numberOfZerosInDenomination);\n    // get the fraction part of value by counting number of zeros backward\n    // 13456789 -> '456789'\n    // 001234 -> '001234'\n    const fraction = zeroPaddedValue.slice(-numberOfZerosInDenomination).replace(/\\.?0+$/, '');\n    if (integer === '') {\n        return fraction ? `0.${fraction}` : '0';\n    }\n    if (fraction === '') {\n        return integer;\n    }\n    const updatedValue = `${integer}.${fraction}`;\n    return updatedValue.slice(0, integer.length + numberOfZerosInDenomination + 1);\n};\n/**\n * Takes a number of a unit and converts it to wei.\n *\n * @param number - The number to convert.\n * @param unit - {@link EtherUnits} The unit of the number passed.\n * @returns The number converted to wei.\n *\n * @example\n * ```ts\n * console.log(web3.utils.toWei(\"0.001\", \"ether\"));\n * > 1000000000000000 //(wei)\n * ```\n */\n// todo in 1.x unit defaults to 'ether'\nexport const toWei = (number, unit) => {\n    validator.validate(['number'], [number]);\n    let denomination;\n    if (typeof unit === 'string') {\n        denomination = ethUnitMap[unit];\n        if (!denomination) {\n            throw new InvalidUnitError(unit);\n        }\n    }\n    else {\n        if (unit < 0 || !Number.isInteger(unit)) {\n            throw new InvalidIntegerError(unit);\n        }\n        denomination = bigintPower(BigInt(10), BigInt(unit));\n    }\n    let parsedNumber = number;\n    if (typeof parsedNumber === 'number') {\n        if (parsedNumber < 1e-15) {\n            console.warn(PrecisionLossWarning);\n        }\n        if (parsedNumber > 1e20) {\n            console.warn(PrecisionLossWarning);\n            parsedNumber = BigInt(parsedNumber);\n        }\n        else {\n            // in case there is a decimal point, we need to convert it to string\n            parsedNumber = parsedNumber.toLocaleString('fullwide', {\n                useGrouping: false,\n                maximumFractionDigits: 20,\n            });\n        }\n    }\n    // if value is decimal e.g. 24.56 extract `integer` and `fraction` part\n    // to avoid `fraction` to be null use `concat` with empty string\n    const [integer, fraction] = String(typeof parsedNumber === 'string' && !isHexStrict(parsedNumber)\n        ? parsedNumber\n        : toNumber(parsedNumber))\n        .split('.')\n        .concat('');\n    // join the value removing `.` from\n    // 24.56 -> 2456\n    const value = BigInt(`${integer}${fraction}`);\n    // multiply value with denomination\n    // 2456 * 1000000 -> 2456000000\n    const updatedValue = value * denomination;\n    // check if whole number was passed in\n    const decimals = fraction.length;\n    if (decimals === 0) {\n        return updatedValue.toString();\n    }\n    // trim the value to remove extra zeros\n    return updatedValue.toString().slice(0, -decimals);\n};\n/**\n * Will convert an upper or lowercase Ethereum address to a checksum address.\n * @param address - An address string\n * @returns\tThe checksum address\n * @example\n * ```ts\n * web3.utils.toChecksumAddress('0xc1912fee45d61c87cc5ea59dae31190fffff232d');\n * > \"0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d\"\n * ```\n */\nexport const toChecksumAddress = (address) => {\n    if (!isAddress(address, false)) {\n        throw new InvalidAddressError(address);\n    }\n    const lowerCaseAddress = address.toLowerCase().replace(/^0x/i, '');\n    // calling `Uint8Array.from` because `noble-hashes` checks with `instanceof Uint8Array` that fails in some edge cases:\n    // \thttps://github.com/paulmillr/noble-hashes/issues/25#issuecomment-1750106284\n    const hash = utils.uint8ArrayToHexString(keccak256(validatorUtils.ensureIfUint8Array(utf8ToBytes(lowerCaseAddress))));\n    if (isNullish(hash) ||\n        hash === '0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470')\n        return ''; // // EIP-1052 if hash is equal to c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470, keccak was given empty data\n    let checksumAddress = '0x';\n    const addressHash = hash.replace(/^0x/i, '');\n    for (let i = 0; i < lowerCaseAddress.length; i += 1) {\n        // If ith character is 8 to f then make it uppercase\n        if (parseInt(addressHash[i], 16) > 7) {\n            checksumAddress += lowerCaseAddress[i].toUpperCase();\n        }\n        else {\n            checksumAddress += lowerCaseAddress[i];\n        }\n    }\n    return checksumAddress;\n};\nexport const toBool = (value) => {\n    if (typeof value === 'boolean') {\n        return value;\n    }\n    if (typeof value === 'number' && (value === 0 || value === 1)) {\n        return Boolean(value);\n    }\n    if (typeof value === 'bigint' && (value === BigInt(0) || value === BigInt(1))) {\n        return Boolean(value);\n    }\n    if (typeof value === 'string' &&\n        !isHexStrict(value) &&\n        (value === '1' || value === '0' || value === 'false' || value === 'true')) {\n        if (value === 'true') {\n            return true;\n        }\n        if (value === 'false') {\n            return false;\n        }\n        return Boolean(Number(value));\n    }\n    if (typeof value === 'string' && isHexStrict(value) && (value === '0x1' || value === '0x0')) {\n        return Boolean(toNumber(value));\n    }\n    throw new InvalidBooleanError(value);\n};\n//# sourceMappingURL=converters.js.map","'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n  , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n  Events.prototype = Object.create(null);\n\n  //\n  // This hack is needed because the `__proto__` property is still inherited in\n  // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n  //\n  if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @private\n */\nfunction EE(fn, context, once) {\n  this.fn = fn;\n  this.context = context;\n  this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n  if (typeof fn !== 'function') {\n    throw new TypeError('The listener must be a function');\n  }\n\n  var listener = new EE(fn, context || emitter, once)\n    , evt = prefix ? prefix + event : event;\n\n  if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n  else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n  else emitter._events[evt] = [emitter._events[evt], listener];\n\n  return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n  if (--emitter._eventsCount === 0) emitter._events = new Events();\n  else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @public\n */\nfunction EventEmitter() {\n  this._events = new Events();\n  this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n  var names = []\n    , events\n    , name;\n\n  if (this._eventsCount === 0) return names;\n\n  for (name in (events = this._events)) {\n    if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n  }\n\n  if (Object.getOwnPropertySymbols) {\n    return names.concat(Object.getOwnPropertySymbols(events));\n  }\n\n  return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n  var evt = prefix ? prefix + event : event\n    , handlers = this._events[evt];\n\n  if (!handlers) return [];\n  if (handlers.fn) return [handlers.fn];\n\n  for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n    ee[i] = handlers[i].fn;\n  }\n\n  return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n  var evt = prefix ? prefix + event : event\n    , listeners = this._events[evt];\n\n  if (!listeners) return 0;\n  if (listeners.fn) return 1;\n  return listeners.length;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n  var evt = prefix ? prefix + event : event;\n\n  if (!this._events[evt]) return false;\n\n  var listeners = this._events[evt]\n    , len = arguments.length\n    , args\n    , i;\n\n  if (listeners.fn) {\n    if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n    switch (len) {\n      case 1: return listeners.fn.call(listeners.context), true;\n      case 2: return listeners.fn.call(listeners.context, a1), true;\n      case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n      case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n      case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n      case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n    }\n\n    for (i = 1, args = new Array(len -1); i < len; i++) {\n      args[i - 1] = arguments[i];\n    }\n\n    listeners.fn.apply(listeners.context, args);\n  } else {\n    var length = listeners.length\n      , j;\n\n    for (i = 0; i < length; i++) {\n      if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n      switch (len) {\n        case 1: listeners[i].fn.call(listeners[i].context); break;\n        case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n        case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n        case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n        default:\n          if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n            args[j - 1] = arguments[j];\n          }\n\n          listeners[i].fn.apply(listeners[i].context, args);\n      }\n    }\n  }\n\n  return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n  return addListener(this, event, fn, context, false);\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n  return addListener(this, event, fn, context, true);\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {*} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n  var evt = prefix ? prefix + event : event;\n\n  if (!this._events[evt]) return this;\n  if (!fn) {\n    clearEvent(this, evt);\n    return this;\n  }\n\n  var listeners = this._events[evt];\n\n  if (listeners.fn) {\n    if (\n      listeners.fn === fn &&\n      (!once || listeners.once) &&\n      (!context || listeners.context === context)\n    ) {\n      clearEvent(this, evt);\n    }\n  } else {\n    for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n      if (\n        listeners[i].fn !== fn ||\n        (once && !listeners[i].once) ||\n        (context && listeners[i].context !== context)\n      ) {\n        events.push(listeners[i]);\n      }\n    }\n\n    //\n    // Reset the array, or remove it completely if we have no more listeners.\n    //\n    if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n    else clearEvent(this, evt);\n  }\n\n  return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {(String|Symbol)} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n  var evt;\n\n  if (event) {\n    evt = prefix ? prefix + event : event;\n    if (this._events[evt]) clearEvent(this, evt);\n  } else {\n    this._events = new Events();\n    this._eventsCount = 0;\n  }\n\n  return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n  module.exports = EventEmitter;\n}\n","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\n/* eslint-disable max-classes-per-file */\nimport EventEmitter3 from 'eventemitter3';\n/**\n * This class copy the behavior of Node.js EventEmitter class.\n * It is used to provide the same interface for the browser environment.\n */\nexport class EventEmitter extends EventEmitter3 {\n    constructor() {\n        super(...arguments);\n        // must be defined for backwards compatibility\n        this.maxListeners = Number.MAX_SAFE_INTEGER;\n    }\n    setMaxListeners(maxListeners) {\n        this.maxListeners = maxListeners;\n        return this;\n    }\n    getMaxListeners() {\n        return this.maxListeners;\n    }\n}\n//# sourceMappingURL=event_emitter.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\n/**\n * @module Utils\n */\nimport { InvalidBlockError } from 'web3-errors';\nimport { checkAddressCheckSum as checkAddressCheckSumValidator, isAddress as isAddressValidator, isBlockTag, isBloom as isBloomValidator, isContractAddressInBloom as isContractAddressInBloomValidator, isHex as isHexValidator, isHexStrict as isHexStrictValidator, isInBloom as isInBloomValidator, isNullish as isNullishValidator, isTopic as isTopicValidator, isTopicInBloom as isTopicInBloomValidator, isUserEthereumAddressInBloom as isUserEthereumAddressInBloomValidator, } from 'web3-validator';\nimport { BlockTags } from 'web3-types';\n/**\n * @deprecated Will be removed in next release. Please use `web3-validator` package instead.\n */\nexport const isHexStrict = isHexStrictValidator;\n/**\n * returns true if input is a hexstring, number or bigint\n *\n * @deprecated Will be removed in next release. Please use `web3-validator` package instead.\n */\nexport const isHex = isHexValidator;\n/**\n * Checks the checksum of a given address. Will also return false on non-checksum addresses.\n *\n * @deprecated Will be removed in next release. Please use `web3-validator` package instead.\n */\nexport const checkAddressCheckSum = checkAddressCheckSumValidator;\n/**\n * Checks if a given string is a valid Ethereum address. It will also check the checksum, if the address has upper and lowercase letters.\n *\n * @deprecated Will be removed in next release. Please use `web3-validator` package instead.\n */\nexport const isAddress = isAddressValidator;\n/**\n * Returns true if the bloom is a valid bloom\n * https://github.com/joshstevens19/ethereum-bloom-filters/blob/fbeb47b70b46243c3963fe1c2988d7461ef17236/src/index.ts#L7\n *\n * @deprecated Will be removed in next release. Please use `web3-validator` package instead.\n */\nexport const isBloom = isBloomValidator;\n/**\n * Returns true if the value is part of the given bloom\n * note: false positives are possible.\n *\n * @deprecated Will be removed in next release. Please use `web3-validator` package instead.\n */\nexport const isInBloom = isInBloomValidator;\n/**\n * Returns true if the ethereum users address is part of the given bloom note: false positives are possible.\n *\n * @deprecated Will be removed in next release. Please use `web3-validator` package instead.\n */\nexport const isUserEthereumAddressInBloom = isUserEthereumAddressInBloomValidator;\n/**\n * Returns true if the contract address is part of the given bloom.\n * note: false positives are possible.\n *\n * @deprecated Will be removed in next release. Please use `web3-validator` package instead.\n */\nexport const isContractAddressInBloom = isContractAddressInBloomValidator;\n/**\n * Checks if its a valid topic\n *\n * @deprecated Will be removed in next release. Please use `web3-validator` package instead.\n */\nexport const isTopic = isTopicValidator;\n/**\n * Returns true if the topic is part of the given bloom.\n * note: false positives are possible.\n *\n * @deprecated Will be removed in next release. Please use `web3-validator` package instead.\n */\nexport const isTopicInBloom = isTopicInBloomValidator;\n/**\n * Compares between block A and block B\n * @param blockA - Block number or string\n * @param blockB - Block number or string\n *\n * @returns - Returns -1 if a \\< b, returns 1 if a \\> b and returns 0 if a == b\n *\n * @example\n * ```ts\n * console.log(web3.utils.compareBlockNumbers('latest', 'pending'));\n * > -1\n *\n * console.log(web3.utils.compareBlockNumbers(12, 11));\n * > 1\n * ```\n */\nexport const compareBlockNumbers = (blockA, blockB) => {\n    const isABlockTag = typeof blockA === 'string' && isBlockTag(blockA);\n    const isBBlockTag = typeof blockB === 'string' && isBlockTag(blockB);\n    if (blockA === blockB ||\n        ((blockA === 'earliest' || blockA === 0) && (blockB === 'earliest' || blockB === 0)) // only exception compare blocktag with number\n    ) {\n        return 0;\n    }\n    if (blockA === 'earliest') {\n        return -1;\n    }\n    if (blockB === 'earliest') {\n        return 1;\n    }\n    if (isABlockTag && isBBlockTag) {\n        // Increasing order:  earliest, finalized , safe, latest, pending\n        const tagsOrder = {\n            [BlockTags.EARLIEST]: 1,\n            [BlockTags.FINALIZED]: 2,\n            [BlockTags.SAFE]: 3,\n            [BlockTags.LATEST]: 4,\n            [BlockTags.PENDING]: 5,\n        };\n        if (tagsOrder[blockA] < tagsOrder[blockB]) {\n            return -1;\n        }\n        return 1;\n    }\n    if ((isABlockTag && !isBBlockTag) || (!isABlockTag && isBBlockTag)) {\n        throw new InvalidBlockError('Cannot compare blocktag with provided non-blocktag input.');\n    }\n    const bigIntA = BigInt(blockA);\n    const bigIntB = BigInt(blockB);\n    if (bigIntA < bigIntB) {\n        return -1;\n    }\n    if (bigIntA === bigIntB) {\n        return 0;\n    }\n    return 1;\n};\nexport const isContractInitOptions = (options) => typeof options === 'object' &&\n    !isNullishValidator(options) &&\n    Object.keys(options).length !== 0 &&\n    [\n        'input',\n        'data',\n        'from',\n        'gas',\n        'gasPrice',\n        'gasLimit',\n        'address',\n        'jsonInterface',\n        'syncWithContext',\n        'dataInputFill',\n    ].some(key => key in options);\nexport const isNullish = isNullishValidator;\n//# sourceMappingURL=validation.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { TypedArray } from 'web3-types';\nimport { isNullish } from 'web3-validator';\nconst isIterable = (item) => typeof item === 'object' &&\n    !isNullish(item) &&\n    !Array.isArray(item) &&\n    !(item instanceof TypedArray);\n// The following code is a derivative work of the code from the \"LiskHQ/lisk-sdk\" project,\n// which is licensed under Apache version 2.\n/**\n * Deep merge two objects.\n * @param destination - The destination object.\n * @param sources - An array of source objects.\n * @returns - The merged object.\n */\nexport const mergeDeep = (destination, ...sources) => {\n    if (!isIterable(destination)) {\n        return destination;\n    }\n    const result = Object.assign({}, destination); // clone deep here\n    for (const src of sources) {\n        // const src = { ..._src };\n        // eslint-disable-next-line no-restricted-syntax\n        for (const key in src) {\n            if (isIterable(src[key])) {\n                if (!result[key]) {\n                    result[key] = {};\n                }\n                result[key] = mergeDeep(result[key], src[key]);\n            }\n            else if (!isNullish(src[key]) && Object.hasOwnProperty.call(src, key)) {\n                if (Array.isArray(src[key]) || src[key] instanceof TypedArray) {\n                    result[key] = src[key].slice(0);\n                }\n                else {\n                    result[key] = src[key];\n                }\n            }\n        }\n    }\n    return result;\n};\n//# sourceMappingURL=objects.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { NibbleWidthError } from 'web3-errors';\nimport { isHexStrict, validator, utils as validatorUtils, bigintPower } from 'web3-validator';\nimport { numberToHex, toHex, toNumber } from './converters.js';\n/**\n * Adds a padding on the left of a string, if value is a integer or bigInt will be converted to a hex string.\n * @param value - The value to be padded.\n * @param characterAmount - The amount of characters the string should have.\n * @param sign - The sign to be added (default is 0).\n * @returns The padded string.\n *\n * @example\n * ```ts\n *\n * console.log(web3.utils.padLeft('0x123', 10));\n * >0x0000000123\n * ```\n */\nexport const padLeft = (value, characterAmount, sign = '0') => {\n    // To avoid duplicate code and circular dependency we will\n    // use `padLeft` implementation from `web3-validator`\n    if (typeof value === 'string') {\n        if (!isHexStrict(value)) {\n            return value.padStart(characterAmount, sign);\n        }\n        return validatorUtils.padLeft(value, characterAmount, sign);\n    }\n    validator.validate(['int'], [value]);\n    return validatorUtils.padLeft(value, characterAmount, sign);\n};\n/**\n * Adds a padding on the right of a string, if value is a integer or bigInt will be converted to a hex string.\n * @param value - The value to be padded.\n * @param characterAmount - The amount of characters the string should have.\n * @param sign - The sign to be added (default is 0).\n * @returns The padded string.\n *\n * @example\n * ```ts\n * console.log(web3.utils.padRight('0x123', 10));\n * > 0x1230000000\n *\n * console.log(web3.utils.padRight('0x123', 10, '1'));\n * > 0x1231111111\n * ```\n */\nexport const padRight = (value, characterAmount, sign = '0') => {\n    if (typeof value === 'string' && !isHexStrict(value)) {\n        return value.padEnd(characterAmount, sign);\n    }\n    const hexString = typeof value === 'string' && isHexStrict(value) ? value : numberToHex(value);\n    const prefixLength = hexString.startsWith('-') ? 3 : 2;\n    validator.validate([hexString.startsWith('-') ? 'int' : 'uint'], [value]);\n    return hexString.padEnd(characterAmount + prefixLength, sign);\n};\n/**\n * Adds a padding on the right of a string, if value is a integer or bigInt will be converted to a hex string. @alias `padRight`\n */\nexport const rightPad = padRight;\n/**\n * Adds a padding on the left of a string, if value is a integer or bigInt will be converted to a hex string. @alias `padLeft`\n */\nexport const leftPad = padLeft;\n/**\n * Converts a negative number into the two’s complement and return a hexstring of 64 nibbles.\n * @param value - The value to be converted.\n * @param nibbleWidth - The nibble width of the hex string (default is 64).\n *\n * @returns The hex string of the two’s complement.\n *\n * @example\n * ```ts\n * console.log(web3.utils.toTwosComplement(13, 32));\n * > 0x0000000000000000000000000000000d\n *\n * console.log(web3.utils.toTwosComplement('-0x1', 32));\n * > 0xffffffffffffffffffffffffffffffff\n *\n * console.log(web3.utils.toTwosComplement(BigInt('9007199254740992'), 32));\n * > 0x00000000000000000020000000000000\n * ```\n */\nexport const toTwosComplement = (value, nibbleWidth = 64) => {\n    validator.validate(['int'], [value]);\n    const val = toNumber(value);\n    if (val >= 0)\n        return padLeft(toHex(val), nibbleWidth);\n    const largestBit = bigintPower(BigInt(2), BigInt(nibbleWidth * 4));\n    if (-val >= largestBit) {\n        throw new NibbleWidthError(`value: ${value}, nibbleWidth: ${nibbleWidth}`);\n    }\n    const updatedVal = BigInt(val);\n    const complement = updatedVal + largestBit;\n    return padLeft(numberToHex(complement), nibbleWidth);\n};\n/**\n * Converts the twos complement into a decimal number or big int.\n * @param value - The value to be converted.\n * @param nibbleWidth - The nibble width of the hex string (default is 64).\n * @returns The decimal number or big int.\n *\n * @example\n * ```ts\n * console.log(web3.utils.fromTwosComplement('0x0000000000000000000000000000000d', 32'));\n * > 13\n *\n * console.log(web3.utils.fromTwosComplement('0x00000000000000000020000000000000', 32));\n * > 9007199254740992n\n * ```\n */\nexport const fromTwosComplement = (value, nibbleWidth = 64) => {\n    validator.validate(['int'], [value]);\n    const val = toNumber(value);\n    if (val < 0)\n        return val;\n    const largestBit = Math.ceil(Math.log(Number(val)) / Math.log(2));\n    if (largestBit > nibbleWidth * 4)\n        throw new NibbleWidthError(`value: \"${value}\", nibbleWidth: \"${nibbleWidth}\"`);\n    // check the largest bit to see if negative\n    if (nibbleWidth * 4 !== largestBit)\n        return val;\n    const complement = bigintPower(BigInt(2), BigInt(nibbleWidth) * BigInt(4));\n    return toNumber(BigInt(val) - complement);\n};\n//# sourceMappingURL=string_manipulation.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { FormatterError } from 'web3-errors';\nimport { FMT_BYTES, FMT_NUMBER, DEFAULT_RETURN_FORMAT, } from 'web3-types';\nimport { isNullish, isObject, utils } from 'web3-validator';\nimport { bytesToUint8Array, bytesToHex, numberToHex, toBigInt } from './converters.js';\nimport { mergeDeep } from './objects.js';\nimport { padLeft } from './string_manipulation.js';\nimport { isUint8Array, uint8ArrayConcat } from './uint8array.js';\nconst { parseBaseType } = utils;\nexport const isDataFormat = (dataFormat) => typeof dataFormat === 'object' &&\n    !isNullish(dataFormat) &&\n    'number' in dataFormat &&\n    'bytes' in dataFormat;\n/**\n * Finds the schema that corresponds to a specific data path within a larger JSON schema.\n * It works by iterating over the dataPath array and traversing the JSON schema one step at a time until it reaches the end of the path.\n *\n * @param schema - represents a JSON schema, which is an object that describes the structure of JSON data\n * @param dataPath - represents an array of strings that specifies the path to the data within the JSON schema\n * @param oneOfPath - represents an optional array of two-element tuples that specifies the \"oneOf\" option to choose, if the schema has oneOf and the data path can match multiple subschemas\n * @returns the JSON schema that matches the data path\n *\n */\nconst findSchemaByDataPath = (schema, dataPath, oneOfPath = []) => {\n    let result = Object.assign({}, schema);\n    let previousDataPath;\n    for (const dataPart of dataPath) {\n        if (result.oneOf && previousDataPath) {\n            const currentDataPath = previousDataPath;\n            const path = oneOfPath.find(([key]) => key === currentDataPath);\n            if (path && path[0] === previousDataPath) {\n                // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access\n                result = result.oneOf[path[1]];\n            }\n        }\n        if (!result.properties && !result.items) {\n            return undefined;\n        }\n        if (result.properties) {\n            result = result.properties[dataPart];\n        }\n        else if (result.items && result.items.properties) {\n            const node = result.items.properties;\n            result = node[dataPart];\n        }\n        else if (result.items && isObject(result.items)) {\n            result = result.items;\n        }\n        else if (result.items && Array.isArray(result.items)) {\n            result = result.items[parseInt(dataPart, 10)];\n        }\n        if (result && dataPart)\n            previousDataPath = dataPart;\n    }\n    return result;\n};\n/**\n * Converts a value depending on the format\n * @param value - value to convert\n * @param ethType - The type of the value to be parsed\n * @param format - The format to be converted to\n * @returns - The value converted to the specified format\n */\nexport const convertScalarValue = (value, ethType, format) => {\n    try {\n        const { baseType, baseTypeSize } = parseBaseType(ethType);\n        if (baseType === 'int' || baseType === 'uint') {\n            switch (format.number) {\n                case FMT_NUMBER.NUMBER:\n                    return Number(toBigInt(value));\n                case FMT_NUMBER.HEX:\n                    return numberToHex(toBigInt(value));\n                case FMT_NUMBER.STR:\n                    return toBigInt(value).toString();\n                case FMT_NUMBER.BIGINT:\n                    return toBigInt(value);\n                default:\n                    throw new FormatterError(`Invalid format: ${String(format.number)}`);\n            }\n        }\n        if (baseType === 'bytes') {\n            let paddedValue;\n            if (baseTypeSize) {\n                if (typeof value === 'string')\n                    paddedValue = padLeft(value, baseTypeSize * 2);\n                else if (isUint8Array(value)) {\n                    paddedValue = uint8ArrayConcat(new Uint8Array(baseTypeSize - value.length), value);\n                }\n            }\n            else {\n                paddedValue = value;\n            }\n            switch (format.bytes) {\n                case FMT_BYTES.HEX:\n                    return bytesToHex(bytesToUint8Array(paddedValue));\n                case FMT_BYTES.UINT8ARRAY:\n                    return bytesToUint8Array(paddedValue);\n                default:\n                    throw new FormatterError(`Invalid format: ${String(format.bytes)}`);\n            }\n        }\n        if (baseType === 'string') {\n            return String(value);\n        }\n    }\n    catch (error) {\n        // If someone didn't use `eth` keyword we can return original value\n        // as the scope of this code is formatting not validation\n        return value;\n    }\n    return value;\n};\nconst convertArray = ({ value, schemaProp, schema, object, key, dataPath, format, oneOfPath = [], }) => {\n    var _a, _b;\n    // If value is an array\n    if (Array.isArray(value)) {\n        let _schemaProp = schemaProp;\n        // TODO This is a naive approach to solving the issue of\n        // a schema using oneOf. This chunk of code was intended to handle\n        // BlockSchema.transactions\n        // TODO BlockSchema.transactions are not being formatted\n        if ((schemaProp === null || schemaProp === void 0 ? void 0 : schemaProp.oneOf) !== undefined) {\n            // The following code is basically saying:\n            // if the schema specifies oneOf, then we are to loop\n            // over each possible schema and check if they type of the schema\n            // matches the type of value[0], and if so we use the oneOfSchemaProp\n            // as the schema for formatting\n            // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call\n            schemaProp.oneOf.forEach((oneOfSchemaProp, index) => {\n                var _a, _b;\n                if (!Array.isArray(schemaProp === null || schemaProp === void 0 ? void 0 : schemaProp.items) &&\n                    ((typeof value[0] === 'object' &&\n                        ((_a = oneOfSchemaProp === null || oneOfSchemaProp === void 0 ? void 0 : oneOfSchemaProp.items) === null || _a === void 0 ? void 0 : _a.type) === 'object') ||\n                        (typeof value[0] === 'string' &&\n                            ((_b = oneOfSchemaProp === null || oneOfSchemaProp === void 0 ? void 0 : oneOfSchemaProp.items) === null || _b === void 0 ? void 0 : _b.type) !== 'object'))) {\n                    _schemaProp = oneOfSchemaProp;\n                    oneOfPath.push([key, index]);\n                }\n            });\n        }\n        if (isNullish(_schemaProp === null || _schemaProp === void 0 ? void 0 : _schemaProp.items)) {\n            // Can not find schema for array item, delete that item\n            // eslint-disable-next-line no-param-reassign\n            delete object[key];\n            dataPath.pop();\n            return true;\n        }\n        // If schema for array items is a single type\n        if (isObject(_schemaProp.items) && !isNullish(_schemaProp.items.format)) {\n            for (let i = 0; i < value.length; i += 1) {\n                // eslint-disable-next-line no-param-reassign\n                object[key][i] = convertScalarValue(value[i], \n                // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n                (_a = _schemaProp === null || _schemaProp === void 0 ? void 0 : _schemaProp.items) === null || _a === void 0 ? void 0 : _a.format, format);\n            }\n            dataPath.pop();\n            return true;\n        }\n        // If schema for array items is an object\n        if (!Array.isArray(_schemaProp === null || _schemaProp === void 0 ? void 0 : _schemaProp.items) && ((_b = _schemaProp === null || _schemaProp === void 0 ? void 0 : _schemaProp.items) === null || _b === void 0 ? void 0 : _b.type) === 'object') {\n            for (const arrObject of value) {\n                // eslint-disable-next-line no-use-before-define\n                convert(arrObject, schema, dataPath, format, oneOfPath);\n            }\n            dataPath.pop();\n            return true;\n        }\n        // If schema for array is a tuple\n        if (Array.isArray(_schemaProp === null || _schemaProp === void 0 ? void 0 : _schemaProp.items)) {\n            for (let i = 0; i < value.length; i += 1) {\n                // eslint-disable-next-line no-param-reassign\n                object[key][i] = convertScalarValue(value[i], _schemaProp.items[i].format, format);\n            }\n            dataPath.pop();\n            return true;\n        }\n    }\n    return false;\n};\n/**\n * Converts the data to the specified format\n * @param data - data to convert\n * @param schema - The JSON schema that describes the structure of the data\n * @param dataPath - A string array that specifies the path to the data within the JSON schema\n * @param format  - The format to be converted to\n * @param oneOfPath - An optional array of two-element tuples that specifies the \"oneOf\" option to choose, if the schema has oneOf and the data path can match multiple subschemas\n * @returns - The data converted to the specified format\n */\nexport const convert = (data, schema, dataPath, format, oneOfPath = []) => {\n    var _a;\n    // If it's a scalar value\n    if (!isObject(data) && !Array.isArray(data)) {\n        return convertScalarValue(data, schema === null || schema === void 0 ? void 0 : schema.format, format);\n    }\n    const object = data;\n    // case when schema is array and `items` is object\n    if (Array.isArray(object) &&\n        (schema === null || schema === void 0 ? void 0 : schema.type) === 'array' &&\n        ((_a = schema === null || schema === void 0 ? void 0 : schema.items) === null || _a === void 0 ? void 0 : _a.type) === 'object') {\n        convertArray({\n            value: object,\n            schemaProp: schema,\n            schema,\n            object,\n            key: '',\n            dataPath,\n            format,\n            oneOfPath,\n        });\n    }\n    else {\n        for (const [key, value] of Object.entries(object)) {\n            dataPath.push(key);\n            let schemaProp = findSchemaByDataPath(schema, dataPath, oneOfPath);\n            // If value is a scaler value\n            if (isNullish(schemaProp)) {\n                delete object[key];\n                dataPath.pop();\n                continue;\n            }\n            // If value is an object, recurse into it\n            if (isObject(value)) {\n                convert(value, schema, dataPath, format, oneOfPath);\n                dataPath.pop();\n                continue;\n            }\n            // If value is an array\n            if (convertArray({\n                value,\n                schemaProp,\n                schema,\n                object,\n                key,\n                dataPath,\n                format,\n                oneOfPath,\n            })) {\n                continue;\n            }\n            // The following code is basically saying:\n            // if the schema specifies oneOf, then we are to loop\n            // over each possible schema and check if they type of the schema specifies format\n            // and if so we use the oneOfSchemaProp as the schema for formatting\n            // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call\n            if ((schemaProp === null || schemaProp === void 0 ? void 0 : schemaProp.format) === undefined && (schemaProp === null || schemaProp === void 0 ? void 0 : schemaProp.oneOf) !== undefined) {\n                for (const [_index, oneOfSchemaProp] of schemaProp.oneOf.entries()) {\n                    if ((oneOfSchemaProp === null || oneOfSchemaProp === void 0 ? void 0 : oneOfSchemaProp.format) !== undefined) {\n                        schemaProp = oneOfSchemaProp;\n                        break;\n                    }\n                }\n            }\n            object[key] = convertScalarValue(value, schemaProp.format, format);\n            dataPath.pop();\n        }\n    }\n    return object;\n};\n/**\n * Given data that can be interpreted according to the provided schema, returns equivalent data that has been formatted\n * according to the provided return format.\n *\n * @param schema - how to interpret the data\n * @param data - data to be formatted\n * @param returnFormat - how to format the data\n * @returns - formatted data\n *\n * @example\n *\n * ```js\n * import { FMT_NUMBER, utils } from \"web3\";\n *\n * console.log(\n *   utils.format({ format: \"uint\" }, \"221\", { number: FMT_NUMBER.HEX }),\n * );\n * // 0xdd\n * ```\n *\n */\nexport const format = (schema, data, returnFormat = DEFAULT_RETURN_FORMAT) => {\n    let dataToParse;\n    if (isObject(data)) {\n        dataToParse = mergeDeep({}, data);\n    }\n    else if (Array.isArray(data)) {\n        dataToParse = [...data];\n    }\n    else {\n        dataToParse = data;\n    }\n    // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n    const jsonSchema = isObject(schema) ? schema : utils.ethAbiToJsonSchema(schema);\n    if (!jsonSchema.properties && !jsonSchema.items && !jsonSchema.format) {\n        throw new FormatterError('Invalid json schema for formatting');\n    }\n    return convert(dataToParse, jsonSchema, [], returnFormat);\n};\n//# sourceMappingURL=formatter.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\n/**\n * This package provides utility functions for Ethereum dapps and other web3.js packages.\n *\n * For using Utils functions, first install Web3 package using `npm i web3` or `yarn add web3`.\n * After that, Web3 Utils functions will be available as mentioned below.\n * ```ts\n * import { Web3 } from 'web3';\n * const web3 = new Web3();\n *\n * const value = web3.utils.fromWei(\"1\", \"ether\")\n *\n * ```\n *\n * For using individual package install `web3-utils` package using `npm i web3-utils` or `yarn add web3-utils` and only import required functions.\n * This is more efficient approach for building lightweight applications.\n * ```ts\n * import { fromWei, soliditySha3Raw } from 'web3-utils';\n *\n * console.log(fromWei(\"1\", \"ether\"));\n * console.log(soliditySha3Raw({ type: \"string\", value: \"helloworld\" }))\n *\n * ```\n * @module Utils\n */\nimport { keccak256 } from 'ethereum-cryptography/keccak.js';\nimport { utf8ToBytes } from 'ethereum-cryptography/utils.js';\nimport { InvalidAddressError, InvalidBooleanError, InvalidBytesError, InvalidLargeValueError, InvalidSizeError, InvalidStringError, InvalidUnsignedIntegerError, } from 'web3-errors';\nimport { utils as validatorUtils, isAddress, isNullish, isHexStrict } from 'web3-validator';\nimport { bytesToUint8Array, bytesToHex, hexToBytes, toBigInt, toHex, toNumber, utf8ToHex, } from './converters.js';\nimport { leftPad, rightPad, toTwosComplement } from './string_manipulation.js';\nconst SHA3_EMPTY_BYTES = '0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470';\n/**\n * A wrapper for ethereum-cryptography/keccak256 to allow hashing a `string` and a `bigint` in addition to `UInt8Array`\n * @param data - the input to hash\n * @returns - the Keccak-256 hash of the input\n *\n * @example\n * ```ts\n * console.log(web3.utils.keccak256Wrapper('web3.js'));\n * > 0x63667efb1961039c9bb0d6ea7a5abdd223a3aca7daa5044ad894226e1f83919a\n *\n * console.log(web3.utils.keccak256Wrapper(1));\n * > 0xc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6\n *\n * console.log(web3.utils.keccak256Wrapper(0xaf12fd));\n * > 0x358640fd4719fa923525d74ab5ae80a594301aba5543e3492b052bf4598b794c\n * ```\n */\nexport const keccak256Wrapper = (data) => {\n    let processedData;\n    if (typeof data === 'bigint' || typeof data === 'number') {\n        processedData = utf8ToBytes(data.toString());\n    }\n    else if (Array.isArray(data)) {\n        processedData = new Uint8Array(data);\n    }\n    else if (typeof data === 'string' && !isHexStrict(data)) {\n        processedData = utf8ToBytes(data);\n    }\n    else {\n        processedData = bytesToUint8Array(data);\n    }\n    return bytesToHex(keccak256(validatorUtils.ensureIfUint8Array(processedData)));\n};\nexport { keccak256Wrapper as keccak256 };\n/**\n * computes the Keccak-256 hash of the input and returns a hexstring\n * @param data - the input to hash\n * @returns - the Keccak-256 hash of the input\n *\n * @example\n * ```ts\n * console.log(web3.utils.sha3('web3.js'));\n * > 0x63667efb1961039c9bb0d6ea7a5abdd223a3aca7daa5044ad894226e1f83919a\n *\n * console.log(web3.utils.sha3(''));\n * > undefined\n * ```\n */\nexport const sha3 = (data) => {\n    let updatedData;\n    if (typeof data === 'string') {\n        if (data.startsWith('0x') && isHexStrict(data)) {\n            updatedData = hexToBytes(data);\n        }\n        else {\n            updatedData = utf8ToBytes(data);\n        }\n    }\n    else {\n        updatedData = data;\n    }\n    const hash = keccak256Wrapper(updatedData);\n    // EIP-1052 if hash is equal to c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470, keccak was given empty data\n    return hash === SHA3_EMPTY_BYTES ? undefined : hash;\n};\n/**\n * Will calculate the sha3 of the input but does return the hash value instead of null if for example a empty string is passed.\n * @param data - the input to hash\n * @returns - the Keccak-256 hash of the input\n *\n * @example\n * ```ts\n * conosle.log(web3.utils.sha3Raw('web3.js'));\n * > 0x63667efb1961039c9bb0d6ea7a5abdd223a3aca7daa5044ad894226e1f83919a\n *\n * console.log(web3.utils.sha3Raw(''));\n * > 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470\n * ```\n */\nexport const sha3Raw = (data) => {\n    const hash = sha3(data);\n    if (isNullish(hash)) {\n        return SHA3_EMPTY_BYTES;\n    }\n    return hash;\n};\n/**\n * returns type and value\n * @param arg - the input to return the type and value\n * @returns - the type and value of the input\n */\nconst getType = (arg) => {\n    if (Array.isArray(arg)) {\n        throw new Error('Autodetection of array types is not supported.');\n    }\n    let type;\n    let value;\n    // if type is given\n    if (typeof arg === 'object' &&\n        ('t' in arg || 'type' in arg) &&\n        ('v' in arg || 'value' in arg)) {\n        type = 't' in arg ? arg.t : arg.type;\n        value = 'v' in arg ? arg.v : arg.value;\n        type = type.toLowerCase() === 'bigint' ? 'int' : type;\n    }\n    else if (typeof arg === 'bigint') {\n        return ['int', arg];\n    }\n    // otherwise try to guess the type\n    else {\n        type = toHex(arg, true);\n        value = toHex(arg);\n        if (!type.startsWith('int') && !type.startsWith('uint')) {\n            type = 'bytes';\n        }\n    }\n    if ((type.startsWith('int') || type.startsWith('uint')) &&\n        typeof value === 'string' &&\n        !/^(-)?0x/i.test(value)) {\n        value = toBigInt(value);\n    }\n    return [type, value];\n};\n/**\n * returns the type with size if uint or int\n * @param name - the input to return the type with size\n * @returns - the type with size of the input\n */\nconst elementaryName = (name) => {\n    if (name.startsWith('int[')) {\n        return `int256${name.slice(3)}`;\n    }\n    if (name === 'int') {\n        return 'int256';\n    }\n    if (name.startsWith('uint[')) {\n        return `uint256'${name.slice(4)}`;\n    }\n    if (name === 'uint') {\n        return 'uint256';\n    }\n    return name;\n};\n/**\n * returns the size of the value of type 'byte'\n */\nconst parseTypeN = (value, typeLength) => {\n    const typesize = /^(\\d+).*$/.exec(value.slice(typeLength));\n    return typesize ? parseInt(typesize[1], 10) : 0;\n};\n/**\n * returns the bit length of the value\n * @param value - the input to return the bit length\n * @returns - the bit length of the input\n */\nconst bitLength = (value) => {\n    const updatedVal = value.toString(2);\n    return updatedVal.length;\n};\n/**\n * Pads the value based on size and type\n * returns a string of the padded value\n * @param type - the input to pad\n * @returns = the padded value\n */\nconst solidityPack = (type, val) => {\n    const value = val.toString();\n    if (type === 'string') {\n        if (typeof val === 'string')\n            return utf8ToHex(val);\n        throw new InvalidStringError(val);\n    }\n    if (type === 'bool' || type === 'boolean') {\n        if (typeof val === 'boolean')\n            return val ? '01' : '00';\n        throw new InvalidBooleanError(val);\n    }\n    if (type === 'address') {\n        if (!isAddress(value)) {\n            throw new InvalidAddressError(value);\n        }\n        return value;\n    }\n    const name = elementaryName(type);\n    if (type.startsWith('uint')) {\n        const size = parseTypeN(name, 'uint'.length);\n        if (size % 8 || size < 8 || size > 256) {\n            throw new InvalidSizeError(value);\n        }\n        const num = toNumber(value);\n        if (bitLength(num) > size) {\n            throw new InvalidLargeValueError(value);\n        }\n        if (num < BigInt(0)) {\n            throw new InvalidUnsignedIntegerError(value);\n        }\n        return size ? leftPad(num.toString(16), (size / 8) * 2) : num.toString(16);\n    }\n    if (type.startsWith('int')) {\n        const size = parseTypeN(name, 'int'.length);\n        if (size % 8 || size < 8 || size > 256) {\n            throw new InvalidSizeError(type);\n        }\n        const num = toNumber(value);\n        if (bitLength(num) > size) {\n            throw new InvalidLargeValueError(value);\n        }\n        if (num < BigInt(0)) {\n            return toTwosComplement(num.toString(), (size / 8) * 2);\n        }\n        return size ? leftPad(num.toString(16), size / 4) : num.toString(16);\n    }\n    if (name === 'bytes') {\n        if (value.replace(/^0x/i, '').length % 2 !== 0) {\n            throw new InvalidBytesError(value);\n        }\n        return value;\n    }\n    if (type.startsWith('bytes')) {\n        if (value.replace(/^0x/i, '').length % 2 !== 0) {\n            throw new InvalidBytesError(value);\n        }\n        const size = parseTypeN(type, 'bytes'.length);\n        if (!size || size < 1 || size > 64 || size < value.replace(/^0x/i, '').length / 2) {\n            throw new InvalidBytesError(value);\n        }\n        return rightPad(value, size * 2);\n    }\n    return '';\n};\n/**\n * returns a string of the tightly packed value given based on the type\n * @param arg - the input to return the tightly packed value\n * @returns - the tightly packed value\n */\nexport const processSolidityEncodePackedArgs = (arg) => {\n    const [type, val] = getType(arg);\n    // array case\n    if (Array.isArray(val)) {\n        // go through each element of the array and use map function to create new hexarg list\n        const hexArg = val.map((v) => solidityPack(type, v).replace('0x', ''));\n        return hexArg.join('');\n    }\n    const hexArg = solidityPack(type, val);\n    return hexArg.replace('0x', '');\n};\n/**\n * Encode packed arguments to a hexstring\n */\nexport const encodePacked = (...values) => {\n    const hexArgs = values.map(processSolidityEncodePackedArgs);\n    return `0x${hexArgs.join('').toLowerCase()}`;\n};\n/**\n * Will tightly pack values given in the same way solidity would then hash.\n * returns a hash string, or null if input is empty\n * @param values - the input to return the tightly packed values\n * @returns - the keccack246 of the tightly packed values\n *\n * @example\n * ```ts\n * console.log(web3.utils.soliditySha3({ type: \"string\", value: \"31323334\" }));\n * > 0xf15f8da2ad27e486d632dc37d24912f634398918d6f9913a0a0ff84e388be62b\n * ```\n */\nexport const soliditySha3 = (...values) => sha3(encodePacked(...values));\n/**\n * Will tightly pack values given in the same way solidity would then hash.\n * returns a hash string, if input is empty will return `0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470`\n * @param values - the input to return the tightly packed values\n * @returns - the keccack246 of the tightly packed values\n *\n * @example\n * ```ts\n * console.log(web3.utils.soliditySha3Raw({ type: \"string\", value: \"helloworld\" }))\n * > 0xfa26db7ca85ead399216e7c6316bc50ed24393c3122b582735e7f3b0f91b93f0\n * ```\n */\nexport const soliditySha3Raw = (...values) => sha3Raw(encodePacked(...values));\n/**\n * Get slot number for storage long string in contract. Basically for getStorage method\n * returns slotNumber where will data placed\n * @param mainSlotNumber - the slot number where will be stored hash of long string\n * @returns - the slot number where will be stored long string\n */\nexport const getStorageSlotNumForLongString = (mainSlotNumber) => sha3(`0x${(typeof mainSlotNumber === 'number'\n    ? mainSlotNumber.toString()\n    : mainSlotNumber).padStart(64, '0')}`);\n//# sourceMappingURL=hash.js.map","import { randomBytes } from \"@noble/hashes/utils\";\nexport function getRandomBytesSync(bytes) {\n    return randomBytes(bytes);\n}\nexport async function getRandomBytes(bytes) {\n    return randomBytes(bytes);\n}\n","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\n/**\n * @module Utils\n */\nimport { getRandomBytesSync } from 'ethereum-cryptography/random.js';\nimport { bytesToHex } from './converters.js';\n/**\n * Returns a random byte array by the given bytes size\n * @param size - The size of the random byte array returned\n * @returns - random byte array\n *\n * @example\n * ```ts\n * console.log(web3.utils.randomBytes(32));\n * > Uint8Array(32) [\n *       93, 172, 226,  32,  33, 176, 156, 156,\n *       182,  30, 240,   2,  69,  96, 174, 197,\n *       33, 136, 194, 241, 197, 156, 110, 111,\n *       66,  87,  17,  88,  67,  48, 245, 183\n *    ]\n * ```\n */\nexport const randomBytes = (size) => getRandomBytesSync(size);\n/**\n * Returns a random hex string by the given bytes size\n * @param byteSize - The size of the random hex string returned\n * @returns - random hex string\n *\n * ```ts\n * console.log(web3.utils.randomHex(32));\n * > 0x139f5b88b72a25eab053d3b57fe1f8a9dbc62a526b1cb1774d0d7db1c3e7ce9e\n * ```\n */\nexport const randomHex = (byteSize) => bytesToHex(randomBytes(byteSize));\n//# sourceMappingURL=random.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\nimport { isNullish } from 'web3-validator';\n/**\n * An alternative to the node function `isPromise` that exists in `util/types` because it is not available on the browser.\n * @param object - to check if it is a `Promise`\n * @returns `true` if it is an `object` or a `function` that has a `then` function. And returns `false` otherwise.\n */\nexport function isPromise(object) {\n    return ((typeof object === 'object' || typeof object === 'function') &&\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n        typeof object.then === 'function');\n}\n/**\n * Wait for a promise but interrupt it if it did not resolve within a given timeout.\n * If the timeout reached, before the promise code resolve, either throw an error if an error object was provided, or return `undefined`.\n * @param awaitable - The promise or function to wait for.\n * @param timeout - The timeout in milliseconds.\n * @param error - (Optional) The error to throw if the timeout reached.\n */\nexport function waitWithTimeout(awaitable, timeout, error) {\n    return __awaiter(this, void 0, void 0, function* () {\n        let timeoutId;\n        const result = yield Promise.race([\n            awaitable instanceof Promise ? awaitable : awaitable(),\n            new Promise((resolve, reject) => {\n                timeoutId = setTimeout(() => (error ? reject(error) : resolve(undefined)), timeout);\n            }),\n        ]);\n        if (timeoutId) {\n            clearTimeout(timeoutId);\n        }\n        if (result instanceof Error) {\n            throw result;\n        }\n        return result;\n    });\n}\n/**\n * Repeatedly calls an async function with a given interval until the result of the function is defined (not undefined or null),\n * or until a timeout is reached. It returns promise and intervalId.\n * @param func - The function to call.\n * @param interval - The interval in milliseconds.\n */\nexport function pollTillDefinedAndReturnIntervalId(func, interval) {\n    let intervalId;\n    const polledRes = new Promise((resolve, reject) => {\n        intervalId = setInterval((function intervalCallbackFunc() {\n            (() => __awaiter(this, void 0, void 0, function* () {\n                try {\n                    const res = yield waitWithTimeout(func, interval);\n                    if (!isNullish(res)) {\n                        clearInterval(intervalId);\n                        resolve(res);\n                    }\n                }\n                catch (error) {\n                    clearInterval(intervalId);\n                    reject(error);\n                }\n            }))();\n            return intervalCallbackFunc;\n        })(), // this will immediate invoke first call\n        interval);\n    });\n    return [polledRes, intervalId];\n}\n/**\n * Repeatedly calls an async function with a given interval until the result of the function is defined (not undefined or null),\n * or until a timeout is reached.\n * pollTillDefinedAndReturnIntervalId() function should be used instead of pollTillDefined if you need IntervalId in result.\n * This function will be deprecated in next major release so use pollTillDefinedAndReturnIntervalId().\n * @param func - The function to call.\n * @param interval - The interval in milliseconds.\n */\nexport function pollTillDefined(func, interval) {\n    return __awaiter(this, void 0, void 0, function* () {\n        return pollTillDefinedAndReturnIntervalId(func, interval)[0];\n    });\n}\n/**\n * Enforce a timeout on a promise, so that it can be rejected if it takes too long to complete\n * @param timeout - The timeout to enforced in milliseconds.\n * @param error - The error to throw if the timeout is reached.\n * @returns A tuple of the timeout id and the promise that will be rejected if the timeout is reached.\n *\n * @example\n * ```ts\n * const [timerId, promise] = web3.utils.rejectIfTimeout(100, new Error('time out'));\n * ```\n */\nexport function rejectIfTimeout(timeout, error) {\n    let timeoutId;\n    const rejectOnTimeout = new Promise((_, reject) => {\n        timeoutId = setTimeout(() => {\n            reject(error);\n        }, timeout);\n    });\n    return [timeoutId, rejectOnTimeout];\n}\n/**\n * Sets an interval that repeatedly executes the given cond function with the specified interval between each call.\n * If the condition is met, the interval is cleared and a Promise that rejects with the returned value is returned.\n * @param cond - The function/condition to call.\n * @param interval - The interval in milliseconds.\n * @returns - an array with the interval ID and the Promise.\n */\nexport function rejectIfConditionAtInterval(cond, interval) {\n    let intervalId;\n    const rejectIfCondition = new Promise((_, reject) => {\n        intervalId = setInterval(() => {\n            (() => __awaiter(this, void 0, void 0, function* () {\n                const error = yield cond();\n                if (error) {\n                    clearInterval(intervalId);\n                    reject(error);\n                }\n            }))();\n        }, interval);\n    });\n    return [intervalId, rejectIfCondition];\n}\n//# sourceMappingURL=promise_helpers.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\n/**\n * @module Utils\n */\nimport { bytesToHex } from './converters.js';\nimport { randomBytes } from './random.js';\n/**\n * Generate a version 4 (random) uuid\n * https://github.com/uuidjs/uuid/blob/main/src/v4.js#L5\n * @returns - A version 4 uuid of the form xxxxxxxx-xxxx-4xxx-xxxx-xxxxxxxxxxxx\n * @example\n * ```ts\n * console.log(web3.utils.uuidV4());\n * > \"1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed\"\n * ```\n */\nexport const uuidV4 = () => {\n    const bytes = randomBytes(16);\n    // https://github.com/ethers-io/ethers.js/blob/ce8f1e4015c0f27bf178238770b1325136e3351a/packages/json-wallets/src.ts/utils.ts#L54\n    // Section: 4.1.3:\n    // - time_hi_and_version[12:16] = 0b0100\n    /* eslint-disable-next-line */\n    bytes[6] = (bytes[6] & 0x0f) | 0x40;\n    // Section 4.4\n    // - clock_seq_hi_and_reserved[6] = 0b0\n    // - clock_seq_hi_and_reserved[7] = 0b1\n    /* eslint-disable-next-line */\n    bytes[8] = (bytes[8] & 0x3f) | 0x80;\n    const hexString = bytesToHex(bytes);\n    return [\n        hexString.substring(2, 10),\n        hexString.substring(10, 14),\n        hexString.substring(14, 18),\n        hexString.substring(18, 22),\n        hexString.substring(22, 34),\n    ].join('-');\n};\n//# sourceMappingURL=uuid.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { isNullish } from 'web3-validator';\nimport { rpcErrorsMap } from 'web3-errors';\nimport { uuidV4 } from './uuid.js';\n// check if code is a valid rpc server error code\nexport const isResponseRpcError = (rpcError) => {\n    const errorCode = rpcError.error.code;\n    return rpcErrorsMap.has(errorCode) || (errorCode >= -32099 && errorCode <= -32000);\n};\nexport const isResponseWithResult = (response) => !Array.isArray(response) &&\n    !!response &&\n    response.jsonrpc === '2.0' &&\n    // JSON RPC consider \"null\" as valid response\n    'result' in response &&\n    isNullish(response.error) &&\n    (typeof response.id === 'number' || typeof response.id === 'string');\n// To avoid circular package dependency, copied to code here. If you update this please update same function in `response_errors.ts`\nexport const isResponseWithError = (response) => !Array.isArray(response) &&\n    response.jsonrpc === '2.0' &&\n    !!response &&\n    isNullish(response.result) &&\n    // JSON RPC consider \"null\" as valid response\n    'error' in response &&\n    (typeof response.id === 'number' || typeof response.id === 'string');\nexport const isResponseWithNotification = (response) => !Array.isArray(response) &&\n    !!response &&\n    response.jsonrpc === '2.0' &&\n    !isNullish(response.params) &&\n    !isNullish(response.method);\nexport const isSubscriptionResult = (response) => !Array.isArray(response) &&\n    !!response &&\n    response.jsonrpc === '2.0' &&\n    'id' in response &&\n    // JSON RPC consider \"null\" as valid response\n    'result' in response;\nexport const validateResponse = (response) => isResponseWithResult(response) || isResponseWithError(response);\nexport const isValidResponse = (response) => Array.isArray(response) ? response.every(validateResponse) : validateResponse(response);\nexport const isBatchResponse = (response) => Array.isArray(response) && response.length > 0 && isValidResponse(response);\n// internal optional variable to increment and use for the jsonrpc `id`\nlet requestIdSeed;\n/**\n * Optionally use to make the jsonrpc `id` start from a specific number.\n * Without calling this function, the `id` will be filled with a Uuid.\n * But after this being called with a number, the `id` will be a number starting from the provided `start` variable.\n * However, if `undefined` was passed to this function, the `id` will be a Uuid again.\n * @param start - a number to start incrementing from.\n * \tOr `undefined` to use a new Uuid (this is the default behavior)\n */\nexport const setRequestIdStart = (start) => {\n    requestIdSeed = start;\n};\nexport const toPayload = (request) => {\n    var _a, _b, _c, _d;\n    if (typeof requestIdSeed !== 'undefined') {\n        requestIdSeed += 1;\n    }\n    return {\n        jsonrpc: (_a = request.jsonrpc) !== null && _a !== void 0 ? _a : '2.0',\n        id: (_c = (_b = request.id) !== null && _b !== void 0 ? _b : requestIdSeed) !== null && _c !== void 0 ? _c : uuidV4(),\n        method: request.method,\n        params: (_d = request.params) !== null && _d !== void 0 ? _d : undefined,\n    };\n};\nexport const toBatchPayload = (requests) => requests.map(request => toPayload(request));\nexport const isBatchRequest = (request) => Array.isArray(request) && request.length > 0;\n//# sourceMappingURL=json_rpc.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\nvar _a;\nimport { OperationTimeoutError } from 'web3-errors';\n/**\n * The class is a simple implementation of a deferred promise with optional timeout functionality,\n * which can be useful when dealing with asynchronous tasks.\n *\n */\nexport class Web3DeferredPromise {\n    /**\n     *\n     * @param timeout - (optional) The timeout in milliseconds.\n     * @param eagerStart - (optional) If true, the timer starts as soon as the promise is created.\n     * @param timeoutMessage - (optional) The message to include in the timeout erro that is thrown when the promise times out.\n     */\n    constructor({ timeout, eagerStart, timeoutMessage, } = {\n        timeout: 0,\n        eagerStart: false,\n        timeoutMessage: 'DeferredPromise timed out',\n    }) {\n        // public tag to treat object as promise by different libs\n        // eslint-disable-next-line @typescript-eslint/prefer-as-const\n        this[_a] = 'Promise';\n        this._state = 'pending';\n        this._promise = new Promise((resolve, reject) => {\n            this._resolve = resolve;\n            this._reject = reject;\n        });\n        this._timeoutMessage = timeoutMessage;\n        this._timeoutInterval = timeout;\n        if (eagerStart) {\n            this.startTimer();\n        }\n    }\n    /**\n     * Returns the current state of the promise.\n     * @returns 'pending' | 'fulfilled' | 'rejected'\n     */\n    get state() {\n        return this._state;\n    }\n    /**\n     *\n     * @param onfulfilled - (optional) The callback to execute when the promise is fulfilled.\n     * @param onrejected  - (optional) The callback to execute when the promise is rejected.\n     * @returns\n     */\n    then(onfulfilled, onrejected) {\n        return __awaiter(this, void 0, void 0, function* () {\n            return this._promise.then(onfulfilled, onrejected);\n        });\n    }\n    /**\n     *\n     * @param onrejected - (optional) The callback to execute when the promise is rejected.\n     * @returns\n     */\n    catch(\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    onrejected) {\n        return __awaiter(this, void 0, void 0, function* () {\n            return this._promise.catch(onrejected);\n        });\n    }\n    /**\n     *\n     * @param onfinally - (optional) The callback to execute when the promise is settled (fulfilled or rejected).\n     * @returns\n     */\n    finally(onfinally) {\n        return __awaiter(this, void 0, void 0, function* () {\n            return this._promise.finally(onfinally);\n        });\n    }\n    /**\n     * Resolves the current promise.\n     * @param value - The value to resolve the promise with.\n     */\n    resolve(value) {\n        this._resolve(value);\n        this._state = 'fulfilled';\n        this._clearTimeout();\n    }\n    /**\n     * Rejects the current promise.\n     * @param reason - The reason to reject the promise with.\n     */\n    reject(reason) {\n        this._reject(reason);\n        this._state = 'rejected';\n        this._clearTimeout();\n    }\n    /**\n     * Starts the timeout timer for the promise.\n     */\n    startTimer() {\n        if (this._timeoutInterval && this._timeoutInterval > 0) {\n            this._timeoutId = setTimeout(this._checkTimeout.bind(this), this._timeoutInterval);\n        }\n    }\n    _checkTimeout() {\n        if (this._state === 'pending' && this._timeoutId) {\n            this.reject(new OperationTimeoutError(this._timeoutMessage));\n        }\n    }\n    _clearTimeout() {\n        if (this._timeoutId) {\n            clearTimeout(this._timeoutId);\n        }\n    }\n}\n_a = Symbol.toStringTag;\n//# sourceMappingURL=web3_deferred_promise.js.map","import { InvalidResponseError } from 'web3-errors';\nexport class ChunkResponseParser {\n    constructor(eventEmitter, autoReconnect) {\n        this.eventEmitter = eventEmitter;\n        this.autoReconnect = autoReconnect;\n        this.chunkTimeout = 1000 * 15;\n    }\n    clearQueues() {\n        if (typeof this._clearQueues === 'function') {\n            this._clearQueues();\n        }\n    }\n    onError(clearQueues) {\n        this._clearQueues = clearQueues;\n    }\n    parseResponse(data) {\n        const returnValues = [];\n        // DE-CHUNKER\n        const dechunkedData = data\n            .replace(/\\}[\\n\\r]?\\{/g, '}|--|{') // }{\n            .replace(/\\}\\][\\n\\r]?\\[\\{/g, '}]|--|[{') // }][{\n            .replace(/\\}[\\n\\r]?\\[\\{/g, '}|--|[{') // }[{\n            .replace(/\\}\\][\\n\\r]?\\{/g, '}]|--|{') // }]{\n            .split('|--|');\n        dechunkedData.forEach(_chunkData => {\n            // prepend the last chunk\n            let chunkData = _chunkData;\n            if (this.lastChunk) {\n                chunkData = this.lastChunk + chunkData;\n            }\n            let result;\n            try {\n                result = JSON.parse(chunkData);\n            }\n            catch (e) {\n                this.lastChunk = chunkData;\n                // start timeout to cancel all requests\n                if (this.lastChunkTimeout) {\n                    clearTimeout(this.lastChunkTimeout);\n                }\n                this.lastChunkTimeout = setTimeout(() => {\n                    if (this.autoReconnect)\n                        return;\n                    this.clearQueues();\n                    this.eventEmitter.emit('error', new InvalidResponseError({\n                        id: 1,\n                        jsonrpc: '2.0',\n                        error: { code: 2, message: 'Chunk timeout' },\n                    }));\n                }, this.chunkTimeout);\n                return;\n            }\n            // cancel timeout and set chunk to null\n            clearTimeout(this.lastChunkTimeout);\n            this.lastChunk = undefined;\n            if (result)\n                returnValues.push(result);\n        });\n        return returnValues;\n    }\n}\n//# sourceMappingURL=chunk_response_parser.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\n/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { Web3BaseProvider, } from 'web3-types';\nimport { EventEmitter } from 'eventemitter3';\nimport { EIP1193ProviderRpcError } from 'web3-errors';\nimport { toPayload } from './json_rpc.js';\n/**\n * This is an abstract class, which extends {@link Web3BaseProvider} class. This class is used to implement a provider that adheres to the EIP-1193 standard for Ethereum providers.\n */\nexport class Eip1193Provider extends Web3BaseProvider {\n    constructor() {\n        super(...arguments);\n        this._eventEmitter = new EventEmitter();\n        this._chainId = '';\n        this._accounts = [];\n    }\n    _getChainId() {\n        return __awaiter(this, void 0, void 0, function* () {\n            var _a;\n            const data = yield this.request(toPayload({\n                method: 'eth_chainId',\n                params: [],\n            }));\n            return (_a = data === null || data === void 0 ? void 0 : data.result) !== null && _a !== void 0 ? _a : '';\n        });\n    }\n    _getAccounts() {\n        return __awaiter(this, void 0, void 0, function* () {\n            var _a;\n            const data = yield this.request(toPayload({\n                method: 'eth_accounts',\n                params: [],\n            }));\n            return (_a = data === null || data === void 0 ? void 0 : data.result) !== null && _a !== void 0 ? _a : [];\n        });\n    }\n    _onConnect() {\n        Promise.all([\n            this._getChainId()\n                .then(chainId => {\n                if (chainId !== this._chainId) {\n                    this._chainId = chainId;\n                    this._eventEmitter.emit('chainChanged', this._chainId);\n                }\n            })\n                .catch(err => {\n                // todo: add error handler\n                console.error(err);\n            }),\n            this._getAccounts()\n                .then(accounts => {\n                if (!(this._accounts.length === accounts.length &&\n                    accounts.every(v => accounts.includes(v)))) {\n                    this._accounts = accounts;\n                    this._onAccountsChanged();\n                }\n            })\n                .catch(err => {\n                // todo: add error handler\n                // eslint-disable-next-line no-console\n                console.error(err);\n            }),\n        ])\n            .then(() => this._eventEmitter.emit('connect', {\n            chainId: this._chainId,\n        }))\n            .catch(err => {\n            // todo: add error handler\n            // eslint-disable-next-line no-console\n            console.error(err);\n        });\n    }\n    // todo this must be ProvideRpcError with a message too\n    _onDisconnect(code, data) {\n        this._eventEmitter.emit('disconnect', new EIP1193ProviderRpcError(code, data));\n    }\n    _onAccountsChanged() {\n        // get chainId and safe to local\n        this._eventEmitter.emit('accountsChanged', this._accounts);\n    }\n}\n//# sourceMappingURL=web3_eip1193_provider.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\nimport { ConnectionError, ConnectionNotOpenError, InvalidClientError, MaxAttemptsReachedOnReconnectingError, PendingRequestsOnReconnectingError, RequestAlreadySentError, Web3WSProviderError, } from 'web3-errors';\nimport { Eip1193Provider } from './web3_eip1193_provider.js';\nimport { ChunkResponseParser } from './chunk_response_parser.js';\nimport { isNullish } from './validation.js';\nimport { Web3DeferredPromise } from './web3_deferred_promise.js';\nimport * as jsonRpc from './json_rpc.js';\nconst DEFAULT_RECONNECTION_OPTIONS = {\n    autoReconnect: true,\n    delay: 5000,\n    maxAttempts: 5,\n};\nconst NORMAL_CLOSE_CODE = 1000; // https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/close\nexport class SocketProvider extends Eip1193Provider {\n    get SocketConnection() {\n        return this._socketConnection;\n    }\n    /**\n     * This is an abstract class for implementing a socket provider (e.g. WebSocket, IPC). It extends the EIP-1193 provider {@link EIP1193Provider}.\n     * @param socketPath - The path to the socket (e.g. /ipc/path or ws://localhost:8546)\n     * @param socketOptions - The options for the socket connection. Its type is supposed to be specified in the inherited classes.\n     * @param reconnectOptions - The options for the socket reconnection {@link ReconnectOptions}\n     */\n    constructor(socketPath, socketOptions, reconnectOptions) {\n        super();\n        this._connectionStatus = 'connecting';\n        // Message handlers. Due to bounding of `this` and removing the listeners we have to keep it's reference.\n        this._onMessageHandler = this._onMessage.bind(this);\n        this._onOpenHandler = this._onConnect.bind(this);\n        this._onCloseHandler = this._onCloseEvent.bind(this);\n        this._onErrorHandler = this._onError.bind(this);\n        if (!this._validateProviderPath(socketPath))\n            throw new InvalidClientError(socketPath);\n        this._socketPath = socketPath;\n        this._socketOptions = socketOptions;\n        this._reconnectOptions = Object.assign(Object.assign({}, DEFAULT_RECONNECTION_OPTIONS), (reconnectOptions !== null && reconnectOptions !== void 0 ? reconnectOptions : {}));\n        this._pendingRequestsQueue = new Map();\n        this._sentRequestsQueue = new Map();\n        this._init();\n        this.connect();\n        this.chunkResponseParser = new ChunkResponseParser(this._eventEmitter, this._reconnectOptions.autoReconnect);\n        this.chunkResponseParser.onError(() => {\n            this._clearQueues();\n        });\n        this.isReconnecting = false;\n    }\n    _init() {\n        this._reconnectAttempts = 0;\n    }\n    /**\n     * Try to establish a connection to the socket\n     */\n    connect() {\n        try {\n            this._openSocketConnection();\n            this._connectionStatus = 'connecting';\n            this._addSocketListeners();\n        }\n        catch (e) {\n            if (!this.isReconnecting) {\n                this._connectionStatus = 'disconnected';\n                if (e && e.message) {\n                    throw new ConnectionError(`Error while connecting to ${this._socketPath}. Reason: ${e.message}`);\n                }\n                else {\n                    throw new InvalidClientError(this._socketPath);\n                }\n            }\n            else {\n                setImmediate(() => {\n                    this._reconnect();\n                });\n            }\n        }\n    }\n    // eslint-disable-next-line class-methods-use-this\n    _validateProviderPath(path) {\n        return !!path;\n    }\n    /**\n     *\n     * @returns the pendingRequestQueue size\n     */\n    // eslint-disable-next-line class-methods-use-this\n    getPendingRequestQueueSize() {\n        return this._pendingRequestsQueue.size;\n    }\n    /**\n     *\n     * @returns the sendPendingRequests size\n     */\n    // eslint-disable-next-line class-methods-use-this\n    getSentRequestsQueueSize() {\n        return this._sentRequestsQueue.size;\n    }\n    /**\n     *\n     * @returns `true` if the socket supports subscriptions\n     */\n    // eslint-disable-next-line class-methods-use-this\n    supportsSubscriptions() {\n        return true;\n    }\n    on(type, listener) {\n        this._eventEmitter.on(type, listener);\n    }\n    once(type, listener) {\n        this._eventEmitter.once(type, listener);\n    }\n    removeListener(type, listener) {\n        this._eventEmitter.removeListener(type, listener);\n    }\n    _onDisconnect(code, data) {\n        this._connectionStatus = 'disconnected';\n        super._onDisconnect(code, data);\n    }\n    /**\n     * Disconnects the socket\n     * @param code - The code to be sent to the server\n     * @param data - The data to be sent to the server\n     */\n    disconnect(code, data) {\n        const disconnectCode = code !== null && code !== void 0 ? code : NORMAL_CLOSE_CODE;\n        this._removeSocketListeners();\n        if (this.getStatus() !== 'disconnected') {\n            this._closeSocketConnection(disconnectCode, data);\n        }\n        this._onDisconnect(disconnectCode, data);\n    }\n    /**\n     * Safely disconnects the socket, async and waits for request size to be 0 before disconnecting\n     * @param forceDisconnect - If true, will clear queue after 5 attempts of waiting for both pending and sent queue to be 0\n     * @param ms - Determines the ms of setInterval\n     * @param code - The code to be sent to the server\n     * @param data - The data to be sent to the server\n     */\n    safeDisconnect(code_1, data_1) {\n        return __awaiter(this, arguments, void 0, function* (code, data, forceDisconnect = false, ms = 1000) {\n            let retryAttempt = 0;\n            const checkQueue = () => __awaiter(this, void 0, void 0, function* () {\n                return new Promise(resolve => {\n                    const interval = setInterval(() => {\n                        if (forceDisconnect && retryAttempt >= 5) {\n                            this.clearQueues();\n                        }\n                        if (this.getPendingRequestQueueSize() === 0 &&\n                            this.getSentRequestsQueueSize() === 0) {\n                            clearInterval(interval);\n                            resolve(true);\n                        }\n                        retryAttempt += 1;\n                    }, ms);\n                });\n            });\n            yield checkQueue();\n            this.disconnect(code, data);\n        });\n    }\n    /**\n     * Removes all listeners for the specified event type.\n     * @param type - The event type to remove the listeners for\n     */\n    removeAllListeners(type) {\n        this._eventEmitter.removeAllListeners(type);\n    }\n    _onError(event) {\n        // do not emit error while trying to reconnect\n        if (this.isReconnecting) {\n            this._reconnect();\n        }\n        else {\n            this._eventEmitter.emit('error', event);\n        }\n    }\n    /**\n     * Resets the socket, removing all listeners and pending requests\n     */\n    reset() {\n        this._sentRequestsQueue.clear();\n        this._pendingRequestsQueue.clear();\n        this._init();\n        this._removeSocketListeners();\n        this._addSocketListeners();\n    }\n    _reconnect() {\n        if (this.isReconnecting) {\n            return;\n        }\n        this.isReconnecting = true;\n        if (this._sentRequestsQueue.size > 0) {\n            this._sentRequestsQueue.forEach((request, key) => {\n                request.deferredPromise.reject(new PendingRequestsOnReconnectingError());\n                this._sentRequestsQueue.delete(key);\n            });\n        }\n        if (this._reconnectAttempts < this._reconnectOptions.maxAttempts) {\n            this._reconnectAttempts += 1;\n            setTimeout(() => {\n                this._removeSocketListeners();\n                this.connect(); // this can error out\n                this.isReconnecting = false;\n            }, this._reconnectOptions.delay);\n        }\n        else {\n            this.isReconnecting = false;\n            this._clearQueues();\n            this._removeSocketListeners();\n            this._eventEmitter.emit('error', new MaxAttemptsReachedOnReconnectingError(this._reconnectOptions.maxAttempts));\n        }\n    }\n    /**\n     *  Creates a request object to be sent to the server\n     */\n    request(request) {\n        return __awaiter(this, void 0, void 0, function* () {\n            if (isNullish(this._socketConnection)) {\n                throw new Error('Connection is undefined');\n            }\n            // if socket disconnected - open connection\n            if (this.getStatus() === 'disconnected') {\n                this.connect();\n            }\n            const requestId = jsonRpc.isBatchRequest(request)\n                ? request[0].id\n                : request.id;\n            if (!requestId) {\n                throw new Web3WSProviderError('Request Id not defined');\n            }\n            if (this._sentRequestsQueue.has(requestId)) {\n                throw new RequestAlreadySentError(requestId);\n            }\n            const deferredPromise = new Web3DeferredPromise();\n            deferredPromise.catch(error => {\n                this._eventEmitter.emit('error', error);\n            });\n            const reqItem = {\n                payload: request,\n                deferredPromise,\n            };\n            if (this.getStatus() === 'connecting') {\n                this._pendingRequestsQueue.set(requestId, reqItem);\n                return reqItem.deferredPromise;\n            }\n            this._sentRequestsQueue.set(requestId, reqItem);\n            try {\n                this._sendToSocket(reqItem.payload);\n            }\n            catch (error) {\n                this._sentRequestsQueue.delete(requestId);\n                this._eventEmitter.emit('error', error);\n            }\n            return deferredPromise;\n        });\n    }\n    _onConnect() {\n        this._connectionStatus = 'connected';\n        this._reconnectAttempts = 0;\n        super._onConnect();\n        this._sendPendingRequests();\n    }\n    _sendPendingRequests() {\n        for (const [id, value] of this._pendingRequestsQueue.entries()) {\n            try {\n                this._sendToSocket(value.payload);\n                this._pendingRequestsQueue.delete(id);\n                this._sentRequestsQueue.set(id, value);\n            }\n            catch (error) {\n                // catches if sendTosocket fails\n                this._pendingRequestsQueue.delete(id);\n                this._eventEmitter.emit('error', error);\n            }\n        }\n    }\n    _onMessage(event) {\n        const responses = this._parseResponses(event);\n        if (isNullish(responses) || responses.length === 0) {\n            return;\n        }\n        for (const response of responses) {\n            if (jsonRpc.isResponseWithNotification(response) &&\n                response.method.endsWith('_subscription')) {\n                this._eventEmitter.emit('message', response);\n                return;\n            }\n            const requestId = jsonRpc.isBatchResponse(response)\n                ? response[0].id\n                : response.id;\n            const requestItem = this._sentRequestsQueue.get(requestId);\n            if (!requestItem) {\n                return;\n            }\n            if (jsonRpc.isBatchResponse(response) ||\n                jsonRpc.isResponseWithResult(response) ||\n                jsonRpc.isResponseWithError(response)) {\n                this._eventEmitter.emit('message', response);\n                requestItem.deferredPromise.resolve(response);\n            }\n            this._sentRequestsQueue.delete(requestId);\n        }\n    }\n    clearQueues(event) {\n        this._clearQueues(event);\n    }\n    _clearQueues(event) {\n        if (this._pendingRequestsQueue.size > 0) {\n            this._pendingRequestsQueue.forEach((request, key) => {\n                request.deferredPromise.reject(new ConnectionNotOpenError(event));\n                this._pendingRequestsQueue.delete(key);\n            });\n        }\n        if (this._sentRequestsQueue.size > 0) {\n            this._sentRequestsQueue.forEach((request, key) => {\n                request.deferredPromise.reject(new ConnectionNotOpenError(event));\n                this._sentRequestsQueue.delete(key);\n            });\n        }\n        this._removeSocketListeners();\n    }\n}\n//# sourceMappingURL=socket_provider.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { DEFAULT_RETURN_FORMAT, } from 'web3-types';\nimport { ConfigHardforkMismatchError, ConfigChainMismatchError } from 'web3-errors';\nimport { isNullish, toHex } from 'web3-utils';\nimport { Web3EventEmitter } from './web3_event_emitter.js';\nexport var Web3ConfigEvent;\n(function (Web3ConfigEvent) {\n    Web3ConfigEvent[\"CONFIG_CHANGE\"] = \"CONFIG_CHANGE\";\n})(Web3ConfigEvent || (Web3ConfigEvent = {}));\nexport class Web3Config extends Web3EventEmitter {\n    constructor(options) {\n        super();\n        this.config = {\n            handleRevert: false,\n            defaultAccount: undefined,\n            defaultBlock: 'latest',\n            transactionBlockTimeout: 50,\n            transactionConfirmationBlocks: 24,\n            transactionPollingInterval: 1000,\n            transactionPollingTimeout: 750 * 1000,\n            transactionReceiptPollingInterval: undefined,\n            transactionSendTimeout: 750 * 1000,\n            transactionConfirmationPollingInterval: undefined,\n            blockHeaderTimeout: 10,\n            maxListenersWarningThreshold: 100,\n            contractDataInputFill: 'data',\n            defaultNetworkId: undefined,\n            defaultChain: 'mainnet',\n            defaultHardfork: 'london',\n            // TODO - Check if there is a default Common\n            defaultCommon: undefined,\n            defaultTransactionType: '0x2',\n            defaultMaxPriorityFeePerGas: toHex(2500000000),\n            enableExperimentalFeatures: {\n                useSubscriptionWhenCheckingBlockTimeout: false,\n                useRpcCallSpecification: false,\n            },\n            transactionBuilder: undefined,\n            transactionTypeParser: undefined,\n            customTransactionSchema: undefined,\n            defaultReturnFormat: DEFAULT_RETURN_FORMAT,\n            ignoreGasPricing: false,\n        };\n        this.setConfig(options !== null && options !== void 0 ? options : {});\n    }\n    setConfig(options) {\n        // TODO: Improve and add key check\n        const keys = Object.keys(options);\n        for (const key of keys) {\n            this._triggerConfigChange(key, options[key]);\n            if (!isNullish(options[key]) &&\n                typeof options[key] === 'number' &&\n                key === 'maxListenersWarningThreshold') {\n                // additionally set in event emitter\n                this.setMaxListenerWarningThreshold(Number(options[key]));\n            }\n        }\n        Object.assign(this.config, options);\n    }\n    /**\n     * The `handleRevert` options property returns the revert reason string if enabled for the following methods:\n     * - web3.eth.sendTransaction()\n     * - web3.eth.call()\n     * - myContract.methods.myMethod().call()\n     * - myContract.methods.myMethod().send()\n     * Default is `false`.\n     *\n     * `Note`: At the moment `handleRevert` is only supported for `sendTransaction` and not for `sendSignedTransaction`\n     */\n    get handleRevert() {\n        return this.config.handleRevert;\n    }\n    /**\n     * Will set the handleRevert\n     */\n    set handleRevert(val) {\n        this._triggerConfigChange('handleRevert', val);\n        this.config.handleRevert = val;\n    }\n    /**\n     * The `contractDataInputFill` options property will allow you to set the hash of the method signature and encoded parameters to the property\n     * either `data`, `input` or both within your contract.\n     * This will affect the contracts send, call and estimateGas methods\n     * Default is `data`.\n     */\n    get contractDataInputFill() {\n        return this.config.contractDataInputFill;\n    }\n    /**\n     * Will set the contractDataInputFill\n     */\n    set contractDataInputFill(val) {\n        this._triggerConfigChange('contractDataInputFill', val);\n        this.config.contractDataInputFill = val;\n    }\n    /**\n     * This default address is used as the default `from` property, if no `from` property is specified in for the following methods:\n     * - web3.eth.sendTransaction()\n     * - web3.eth.call()\n     * - myContract.methods.myMethod().call()\n     * - myContract.methods.myMethod().send()\n     */\n    get defaultAccount() {\n        return this.config.defaultAccount;\n    }\n    /**\n     * Will set the default account.\n     */\n    set defaultAccount(val) {\n        this._triggerConfigChange('defaultAccount', val);\n        this.config.defaultAccount = val;\n    }\n    /**\n     * The default block is used for certain methods. You can override it by passing in the defaultBlock as last parameter. The default value is `\"latest\"`.\n     * - web3.eth.getBalance()\n     * - web3.eth.getCode()\n     * - web3.eth.getTransactionCount()\n     * - web3.eth.getStorageAt()\n     * - web3.eth.call()\n     * - myContract.methods.myMethod().call()\n     */\n    get defaultBlock() {\n        return this.config.defaultBlock;\n    }\n    /**\n     * Will set the default block.\n     *\n     * - A block number\n     * - `\"earliest\"` - String: The genesis block\n     * - `\"latest\"` - String: The latest block (current head of the blockchain)\n     * - `\"pending\"` - String: The currently mined block (including pending transactions)\n     * - `\"finalized\"` - String: (For POS networks) The finalized block is one which has been accepted as canonical by greater than 2/3 of validators\n     * - `\"safe\"` - String: (For POS networks) The safe head block is one which under normal network conditions, is expected to be included in the canonical chain. Under normal network conditions the safe head and the actual tip of the chain will be equivalent (with safe head trailing only by a few seconds). Safe heads will be less likely to be reorged than the proof of work network's latest blocks.\n     */\n    set defaultBlock(val) {\n        this._triggerConfigChange('defaultBlock', val);\n        this.config.defaultBlock = val;\n    }\n    /**\n     * The time used to wait for Ethereum Node to return the sent transaction result.\n     * Note: If the RPC call stuck at the Node and therefor timed-out, the transaction may still be pending or even mined by the Network. We recommend checking the pending transactions in such a case.\n     * Default is `750` seconds (12.5 minutes).\n     */\n    get transactionSendTimeout() {\n        return this.config.transactionSendTimeout;\n    }\n    /**\n     * Will set the transactionSendTimeout.\n     */\n    set transactionSendTimeout(val) {\n        this._triggerConfigChange('transactionSendTimeout', val);\n        this.config.transactionSendTimeout = val;\n    }\n    /**\n     * The `transactionBlockTimeout` is used over socket-based connections. This option defines the amount of new blocks it should wait until the first confirmation happens, otherwise the PromiEvent rejects with a timeout error.\n     * Default is `50`.\n     */\n    get transactionBlockTimeout() {\n        return this.config.transactionBlockTimeout;\n    }\n    /**\n     * Will set the transactionBlockTimeout.\n     */\n    set transactionBlockTimeout(val) {\n        this._triggerConfigChange('transactionBlockTimeout', val);\n        this.config.transactionBlockTimeout = val;\n    }\n    /**\n     * This defines the number of blocks it requires until a transaction is considered confirmed.\n     * Default is `24`.\n     */\n    get transactionConfirmationBlocks() {\n        return this.config.transactionConfirmationBlocks;\n    }\n    /**\n     * Will set the transactionConfirmationBlocks.\n     */\n    set transactionConfirmationBlocks(val) {\n        this._triggerConfigChange('transactionConfirmationBlocks', val);\n        this.config.transactionConfirmationBlocks = val;\n    }\n    /**\n     * Used over HTTP connections. This option defines the number of seconds between Web3 calls for a receipt which confirms that a transaction was mined by the network.\n     * Default is `1000` ms.\n     */\n    get transactionPollingInterval() {\n        return this.config.transactionPollingInterval;\n    }\n    /**\n     * Will set the transactionPollingInterval.\n     */\n    set transactionPollingInterval(val) {\n        this._triggerConfigChange('transactionPollingInterval', val);\n        this.config.transactionPollingInterval = val;\n        this.transactionReceiptPollingInterval = val;\n        this.transactionConfirmationPollingInterval = val;\n    }\n    /**\n     * Used over HTTP connections. This option defines the number of seconds Web3 will wait for a receipt which confirms that a transaction was mined by the network. Note: If this method times out, the transaction may still be pending.\n     * Default is `750` seconds (12.5 minutes).\n     */\n    get transactionPollingTimeout() {\n        return this.config.transactionPollingTimeout;\n    }\n    /**\n     * Will set the transactionPollingTimeout.\n     */\n    set transactionPollingTimeout(val) {\n        this._triggerConfigChange('transactionPollingTimeout', val);\n        this.config.transactionPollingTimeout = val;\n    }\n    /**\n     * The `transactionPollingInterval` is used over HTTP connections. This option defines the number of seconds between Web3 calls for a receipt which confirms that a transaction was mined by the network.\n     * Default is `undefined`\n     */\n    get transactionReceiptPollingInterval() {\n        return this.config.transactionReceiptPollingInterval;\n    }\n    /**\n     * Will set the transactionReceiptPollingInterval\n     */\n    set transactionReceiptPollingInterval(val) {\n        this._triggerConfigChange('transactionReceiptPollingInterval', val);\n        this.config.transactionReceiptPollingInterval = val;\n    }\n    get transactionConfirmationPollingInterval() {\n        return this.config.transactionConfirmationPollingInterval;\n    }\n    set transactionConfirmationPollingInterval(val) {\n        this._triggerConfigChange('transactionConfirmationPollingInterval', val);\n        this.config.transactionConfirmationPollingInterval = val;\n    }\n    /**\n     * The blockHeaderTimeout is used over socket-based connections. This option defines the amount seconds it should wait for `'newBlockHeaders'` event before falling back to polling to fetch transaction receipt.\n     * Default is `10` seconds.\n     */\n    get blockHeaderTimeout() {\n        return this.config.blockHeaderTimeout;\n    }\n    /**\n     * Will set the blockHeaderTimeout\n     */\n    set blockHeaderTimeout(val) {\n        this._triggerConfigChange('blockHeaderTimeout', val);\n        this.config.blockHeaderTimeout = val;\n    }\n    /**\n     * The enableExperimentalFeatures is used to enable trying new experimental features that are still not fully implemented or not fully tested or still have some related issues.\n     * Default is `false` for every feature.\n     */\n    get enableExperimentalFeatures() {\n        return this.config.enableExperimentalFeatures;\n    }\n    /**\n     * Will set the enableExperimentalFeatures\n     */\n    set enableExperimentalFeatures(val) {\n        this._triggerConfigChange('enableExperimentalFeatures', val);\n        this.config.enableExperimentalFeatures = val;\n    }\n    get maxListenersWarningThreshold() {\n        return this.config.maxListenersWarningThreshold;\n    }\n    set maxListenersWarningThreshold(val) {\n        this._triggerConfigChange('maxListenersWarningThreshold', val);\n        this.setMaxListenerWarningThreshold(val);\n        this.config.maxListenersWarningThreshold = val;\n    }\n    get defaultReturnFormat() {\n        return this.config.defaultReturnFormat;\n    }\n    set defaultReturnFormat(val) {\n        this._triggerConfigChange('defaultReturnFormat', val);\n        this.config.defaultReturnFormat = val;\n    }\n    get defaultNetworkId() {\n        return this.config.defaultNetworkId;\n    }\n    set defaultNetworkId(val) {\n        this._triggerConfigChange('defaultNetworkId', val);\n        this.config.defaultNetworkId = val;\n    }\n    get defaultChain() {\n        return this.config.defaultChain;\n    }\n    set defaultChain(val) {\n        if (!isNullish(this.config.defaultCommon) &&\n            !isNullish(this.config.defaultCommon.baseChain) &&\n            val !== this.config.defaultCommon.baseChain)\n            throw new ConfigChainMismatchError(this.config.defaultChain, val);\n        this._triggerConfigChange('defaultChain', val);\n        this.config.defaultChain = val;\n    }\n    /**\n     * Will return the default hardfork. Default is `london`\n     * The default hardfork property can be one of the following:\n     * - `chainstart`\n     * - `homestead`\n     * - `dao`\n     * - `tangerineWhistle`\n     * - `spuriousDragon`\n     * - `byzantium`\n     * - `constantinople`\n     * - `petersburg`\n     * - `istanbul`\n     * - `berlin`\n     * - `london`\n     * - 'arrowGlacier',\n     * - 'tangerineWhistle',\n     * - 'muirGlacier'\n     *\n     */\n    get defaultHardfork() {\n        return this.config.defaultHardfork;\n    }\n    /**\n     * Will set the default hardfork.\n     *\n     */\n    set defaultHardfork(val) {\n        if (!isNullish(this.config.defaultCommon) &&\n            !isNullish(this.config.defaultCommon.hardfork) &&\n            val !== this.config.defaultCommon.hardfork)\n            throw new ConfigHardforkMismatchError(this.config.defaultCommon.hardfork, val);\n        this._triggerConfigChange('defaultHardfork', val);\n        this.config.defaultHardfork = val;\n    }\n    /**\n     *\n     * Will get the default common property\n     * The default common property does contain the following Common object:\n     * - `customChain` - `Object`: The custom chain properties\n     * \t- `name` - `string`: (optional) The name of the chain\n     * \t- `networkId` - `number`: Network ID of the custom chain\n     * \t- `chainId` - `number`: Chain ID of the custom chain\n     * - `baseChain` - `string`: (optional) mainnet, goerli, kovan, rinkeby, or ropsten\n     * - `hardfork` - `string`: (optional) chainstart, homestead, dao, tangerineWhistle, spuriousDragon, byzantium, constantinople, petersburg, istanbul, berlin, or london\n     * Default is `undefined`.\n     *\n     */\n    get defaultCommon() {\n        return this.config.defaultCommon;\n    }\n    /**\n     * Will set the default common property\n     *\n     */\n    set defaultCommon(val) {\n        // validation check if default hardfork is set and matches defaultCommon hardfork\n        if (!isNullish(this.config.defaultHardfork) &&\n            !isNullish(val) &&\n            !isNullish(val.hardfork) &&\n            this.config.defaultHardfork !== val.hardfork)\n            throw new ConfigHardforkMismatchError(this.config.defaultHardfork, val.hardfork);\n        if (!isNullish(this.config.defaultChain) &&\n            !isNullish(val) &&\n            !isNullish(val.baseChain) &&\n            this.config.defaultChain !== val.baseChain)\n            throw new ConfigChainMismatchError(this.config.defaultChain, val.baseChain);\n        this._triggerConfigChange('defaultCommon', val);\n        this.config.defaultCommon = val;\n    }\n    /**\n     *  Will get the ignoreGasPricing property. When true, the gasPrice, maxPriorityFeePerGas, and maxFeePerGas will not be autofilled in the transaction object.\n     *  Useful when you want wallets to handle gas pricing.\n     */\n    get ignoreGasPricing() {\n        return this.config.ignoreGasPricing;\n    }\n    set ignoreGasPricing(val) {\n        this._triggerConfigChange('ignoreGasPricing', val);\n        this.config.ignoreGasPricing = val;\n    }\n    get defaultTransactionType() {\n        return this.config.defaultTransactionType;\n    }\n    set defaultTransactionType(val) {\n        this._triggerConfigChange('defaultTransactionType', val);\n        this.config.defaultTransactionType = val;\n    }\n    get defaultMaxPriorityFeePerGas() {\n        return this.config.defaultMaxPriorityFeePerGas;\n    }\n    set defaultMaxPriorityFeePerGas(val) {\n        this._triggerConfigChange('defaultMaxPriorityFeePerGas', val);\n        this.config.defaultMaxPriorityFeePerGas = val;\n    }\n    get transactionBuilder() {\n        return this.config.transactionBuilder;\n    }\n    set transactionBuilder(val) {\n        this._triggerConfigChange('transactionBuilder', val);\n        this.config.transactionBuilder = val;\n    }\n    get transactionTypeParser() {\n        return this.config.transactionTypeParser;\n    }\n    set transactionTypeParser(val) {\n        this._triggerConfigChange('transactionTypeParser', val);\n        this.config.transactionTypeParser = val;\n    }\n    get customTransactionSchema() {\n        return this.config.customTransactionSchema;\n    }\n    set customTransactionSchema(schema) {\n        this._triggerConfigChange('customTransactionSchema', schema);\n        this.config.customTransactionSchema = schema;\n    }\n    _triggerConfigChange(config, newValue) {\n        this.emit(Web3ConfigEvent.CONFIG_CHANGE, {\n            name: config,\n            oldValue: this.config[config],\n            newValue,\n        });\n    }\n}\n//# sourceMappingURL=web3_config.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { EventEmitter } from 'web3-utils';\nexport class Web3EventEmitter {\n    constructor() {\n        this._emitter = new EventEmitter();\n    }\n    on(eventName, fn) {\n        // eslint-disable-next-line @typescript-eslint/no-misused-promises\n        this._emitter.on(eventName, fn);\n    }\n    once(eventName, fn) {\n        // eslint-disable-next-line @typescript-eslint/no-misused-promises\n        this._emitter.once(eventName, fn);\n    }\n    off(eventName, fn) {\n        // eslint-disable-next-line @typescript-eslint/no-misused-promises\n        this._emitter.off(eventName, fn);\n    }\n    emit(eventName, params) {\n        this._emitter.emit(eventName, params);\n    }\n    listenerCount(eventName) {\n        return this._emitter.listenerCount(eventName);\n    }\n    listeners(eventName) {\n        return this._emitter.listeners(eventName);\n    }\n    eventNames() {\n        return this._emitter.eventNames();\n    }\n    removeAllListeners() {\n        return this._emitter.removeAllListeners();\n    }\n    setMaxListenerWarningThreshold(maxListenersWarningThreshold) {\n        this._emitter.setMaxListeners(maxListenersWarningThreshold);\n    }\n    getMaxListeners() {\n        return this._emitter.getMaxListeners();\n    }\n}\n//# sourceMappingURL=web3_event_emitter.js.map","\"use strict\";\n\nvar conversions = {};\nmodule.exports = conversions;\n\nfunction sign(x) {\n    return x < 0 ? -1 : 1;\n}\n\nfunction evenRound(x) {\n    // Round x to the nearest integer, choosing the even integer if it lies halfway between two.\n    if ((x % 1) === 0.5 && (x & 1) === 0) { // [even number].5; round down (i.e. floor)\n        return Math.floor(x);\n    } else {\n        return Math.round(x);\n    }\n}\n\nfunction createNumberConversion(bitLength, typeOpts) {\n    if (!typeOpts.unsigned) {\n        --bitLength;\n    }\n    const lowerBound = typeOpts.unsigned ? 0 : -Math.pow(2, bitLength);\n    const upperBound = Math.pow(2, bitLength) - 1;\n\n    const moduloVal = typeOpts.moduloBitLength ? Math.pow(2, typeOpts.moduloBitLength) : Math.pow(2, bitLength);\n    const moduloBound = typeOpts.moduloBitLength ? Math.pow(2, typeOpts.moduloBitLength - 1) : Math.pow(2, bitLength - 1);\n\n    return function(V, opts) {\n        if (!opts) opts = {};\n\n        let x = +V;\n\n        if (opts.enforceRange) {\n            if (!Number.isFinite(x)) {\n                throw new TypeError(\"Argument is not a finite number\");\n            }\n\n            x = sign(x) * Math.floor(Math.abs(x));\n            if (x < lowerBound || x > upperBound) {\n                throw new TypeError(\"Argument is not in byte range\");\n            }\n\n            return x;\n        }\n\n        if (!isNaN(x) && opts.clamp) {\n            x = evenRound(x);\n\n            if (x < lowerBound) x = lowerBound;\n            if (x > upperBound) x = upperBound;\n            return x;\n        }\n\n        if (!Number.isFinite(x) || x === 0) {\n            return 0;\n        }\n\n        x = sign(x) * Math.floor(Math.abs(x));\n        x = x % moduloVal;\n\n        if (!typeOpts.unsigned && x >= moduloBound) {\n            return x - moduloVal;\n        } else if (typeOpts.unsigned) {\n            if (x < 0) {\n              x += moduloVal;\n            } else if (x === -0) { // don't return negative zero\n              return 0;\n            }\n        }\n\n        return x;\n    }\n}\n\nconversions[\"void\"] = function () {\n    return undefined;\n};\n\nconversions[\"boolean\"] = function (val) {\n    return !!val;\n};\n\nconversions[\"byte\"] = createNumberConversion(8, { unsigned: false });\nconversions[\"octet\"] = createNumberConversion(8, { unsigned: true });\n\nconversions[\"short\"] = createNumberConversion(16, { unsigned: false });\nconversions[\"unsigned short\"] = createNumberConversion(16, { unsigned: true });\n\nconversions[\"long\"] = createNumberConversion(32, { unsigned: false });\nconversions[\"unsigned long\"] = createNumberConversion(32, { unsigned: true });\n\nconversions[\"long long\"] = createNumberConversion(32, { unsigned: false, moduloBitLength: 64 });\nconversions[\"unsigned long long\"] = createNumberConversion(32, { unsigned: true, moduloBitLength: 64 });\n\nconversions[\"double\"] = function (V) {\n    const x = +V;\n\n    if (!Number.isFinite(x)) {\n        throw new TypeError(\"Argument is not a finite floating-point value\");\n    }\n\n    return x;\n};\n\nconversions[\"unrestricted double\"] = function (V) {\n    const x = +V;\n\n    if (isNaN(x)) {\n        throw new TypeError(\"Argument is NaN\");\n    }\n\n    return x;\n};\n\n// not quite valid, but good enough for JS\nconversions[\"float\"] = conversions[\"double\"];\nconversions[\"unrestricted float\"] = conversions[\"unrestricted double\"];\n\nconversions[\"DOMString\"] = function (V, opts) {\n    if (!opts) opts = {};\n\n    if (opts.treatNullAsEmptyString && V === null) {\n        return \"\";\n    }\n\n    return String(V);\n};\n\nconversions[\"ByteString\"] = function (V, opts) {\n    const x = String(V);\n    let c = undefined;\n    for (let i = 0; (c = x.codePointAt(i)) !== undefined; ++i) {\n        if (c > 255) {\n            throw new TypeError(\"Argument is not a valid bytestring\");\n        }\n    }\n\n    return x;\n};\n\nconversions[\"USVString\"] = function (V) {\n    const S = String(V);\n    const n = S.length;\n    const U = [];\n    for (let i = 0; i < n; ++i) {\n        const c = S.charCodeAt(i);\n        if (c < 0xD800 || c > 0xDFFF) {\n            U.push(String.fromCodePoint(c));\n        } else if (0xDC00 <= c && c <= 0xDFFF) {\n            U.push(String.fromCodePoint(0xFFFD));\n        } else {\n            if (i === n - 1) {\n                U.push(String.fromCodePoint(0xFFFD));\n            } else {\n                const d = S.charCodeAt(i + 1);\n                if (0xDC00 <= d && d <= 0xDFFF) {\n                    const a = c & 0x3FF;\n                    const b = d & 0x3FF;\n                    U.push(String.fromCodePoint((2 << 15) + (2 << 9) * a + b));\n                    ++i;\n                } else {\n                    U.push(String.fromCodePoint(0xFFFD));\n                }\n            }\n        }\n    }\n\n    return U.join('');\n};\n\nconversions[\"Date\"] = function (V, opts) {\n    if (!(V instanceof Date)) {\n        throw new TypeError(\"Argument is not a Date object\");\n    }\n    if (isNaN(V)) {\n        return undefined;\n    }\n\n    return V;\n};\n\nconversions[\"RegExp\"] = function (V, opts) {\n    if (!(V instanceof RegExp)) {\n        V = new RegExp(V);\n    }\n\n    return V;\n};\n","\"use strict\";\n\nmodule.exports.mixin = function mixin(target, source) {\n  const keys = Object.getOwnPropertyNames(source);\n  for (let i = 0; i < keys.length; ++i) {\n    Object.defineProperty(target, keys[i], Object.getOwnPropertyDescriptor(source, keys[i]));\n  }\n};\n\nmodule.exports.wrapperSymbol = Symbol(\"wrapper\");\nmodule.exports.implSymbol = Symbol(\"impl\");\n\nmodule.exports.wrapperForImpl = function (impl) {\n  return impl[module.exports.wrapperSymbol];\n};\n\nmodule.exports.implForWrapper = function (wrapper) {\n  return wrapper[module.exports.implSymbol];\n};\n\n","\"use strict\";\n\nvar punycode = require(\"punycode\");\nvar mappingTable = require(\"./lib/mappingTable.json\");\n\nvar PROCESSING_OPTIONS = {\n  TRANSITIONAL: 0,\n  NONTRANSITIONAL: 1\n};\n\nfunction normalize(str) { // fix bug in v8\n  return str.split('\\u0000').map(function (s) { return s.normalize('NFC'); }).join('\\u0000');\n}\n\nfunction findStatus(val) {\n  var start = 0;\n  var end = mappingTable.length - 1;\n\n  while (start <= end) {\n    var mid = Math.floor((start + end) / 2);\n\n    var target = mappingTable[mid];\n    if (target[0][0] <= val && target[0][1] >= val) {\n      return target;\n    } else if (target[0][0] > val) {\n      end = mid - 1;\n    } else {\n      start = mid + 1;\n    }\n  }\n\n  return null;\n}\n\nvar regexAstralSymbols = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;\n\nfunction countSymbols(string) {\n  return string\n    // replace every surrogate pair with a BMP symbol\n    .replace(regexAstralSymbols, '_')\n    // then get the length\n    .length;\n}\n\nfunction mapChars(domain_name, useSTD3, processing_option) {\n  var hasError = false;\n  var processed = \"\";\n\n  var len = countSymbols(domain_name);\n  for (var i = 0; i < len; ++i) {\n    var codePoint = domain_name.codePointAt(i);\n    var status = findStatus(codePoint);\n\n    switch (status[1]) {\n      case \"disallowed\":\n        hasError = true;\n        processed += String.fromCodePoint(codePoint);\n        break;\n      case \"ignored\":\n        break;\n      case \"mapped\":\n        processed += String.fromCodePoint.apply(String, status[2]);\n        break;\n      case \"deviation\":\n        if (processing_option === PROCESSING_OPTIONS.TRANSITIONAL) {\n          processed += String.fromCodePoint.apply(String, status[2]);\n        } else {\n          processed += String.fromCodePoint(codePoint);\n        }\n        break;\n      case \"valid\":\n        processed += String.fromCodePoint(codePoint);\n        break;\n      case \"disallowed_STD3_mapped\":\n        if (useSTD3) {\n          hasError = true;\n          processed += String.fromCodePoint(codePoint);\n        } else {\n          processed += String.fromCodePoint.apply(String, status[2]);\n        }\n        break;\n      case \"disallowed_STD3_valid\":\n        if (useSTD3) {\n          hasError = true;\n        }\n\n        processed += String.fromCodePoint(codePoint);\n        break;\n    }\n  }\n\n  return {\n    string: processed,\n    error: hasError\n  };\n}\n\nvar combiningMarksRegex = /[\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08E4-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B62\\u0B63\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0C00-\\u0C03\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81-\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0D01-\\u0D03\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D82\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EB9\\u0EBB\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102B-\\u103E\\u1056-\\u1059\\u105E-\\u1060\\u1062-\\u1064\\u1067-\\u106D\\u1071-\\u1074\\u1082-\\u108D\\u108F\\u109A-\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u180B-\\u180D\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u19B0-\\u19C0\\u19C8\\u19C9\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60-\\u1A7C\\u1A7F\\u1AB0-\\u1ABE\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF2-\\u1CF4\\u1CF8\\u1CF9\\u1DC0-\\u1DF5\\u1DFC-\\u1DFF\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA880\\uA881\\uA8B4-\\uA8C4\\uA8E0-\\uA8F1\\uA926-\\uA92D\\uA947-\\uA953\\uA980-\\uA983\\uA9B3-\\uA9C0\\uA9E5\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA7B-\\uAA7D\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2D]|\\uD800[\\uDDFD\\uDEE0\\uDF76-\\uDF7A]|\\uD802[\\uDE01-\\uDE03\\uDE05\\uDE06\\uDE0C-\\uDE0F\\uDE38-\\uDE3A\\uDE3F\\uDEE5\\uDEE6]|\\uD804[\\uDC00-\\uDC02\\uDC38-\\uDC46\\uDC7F-\\uDC82\\uDCB0-\\uDCBA\\uDD00-\\uDD02\\uDD27-\\uDD34\\uDD73\\uDD80-\\uDD82\\uDDB3-\\uDDC0\\uDE2C-\\uDE37\\uDEDF-\\uDEEA\\uDF01-\\uDF03\\uDF3C\\uDF3E-\\uDF44\\uDF47\\uDF48\\uDF4B-\\uDF4D\\uDF57\\uDF62\\uDF63\\uDF66-\\uDF6C\\uDF70-\\uDF74]|\\uD805[\\uDCB0-\\uDCC3\\uDDAF-\\uDDB5\\uDDB8-\\uDDC0\\uDE30-\\uDE40\\uDEAB-\\uDEB7]|\\uD81A[\\uDEF0-\\uDEF4\\uDF30-\\uDF36]|\\uD81B[\\uDF51-\\uDF7E\\uDF8F-\\uDF92]|\\uD82F[\\uDC9D\\uDC9E]|\\uD834[\\uDD65-\\uDD69\\uDD6D-\\uDD72\\uDD7B-\\uDD82\\uDD85-\\uDD8B\\uDDAA-\\uDDAD\\uDE42-\\uDE44]|\\uD83A[\\uDCD0-\\uDCD6]|\\uDB40[\\uDD00-\\uDDEF]/;\n\nfunction validateLabel(label, processing_option) {\n  if (label.substr(0, 4) === \"xn--\") {\n    label = punycode.toUnicode(label);\n    processing_option = PROCESSING_OPTIONS.NONTRANSITIONAL;\n  }\n\n  var error = false;\n\n  if (normalize(label) !== label ||\n      (label[3] === \"-\" && label[4] === \"-\") ||\n      label[0] === \"-\" || label[label.length - 1] === \"-\" ||\n      label.indexOf(\".\") !== -1 ||\n      label.search(combiningMarksRegex) === 0) {\n    error = true;\n  }\n\n  var len = countSymbols(label);\n  for (var i = 0; i < len; ++i) {\n    var status = findStatus(label.codePointAt(i));\n    if ((processing === PROCESSING_OPTIONS.TRANSITIONAL && status[1] !== \"valid\") ||\n        (processing === PROCESSING_OPTIONS.NONTRANSITIONAL &&\n         status[1] !== \"valid\" && status[1] !== \"deviation\")) {\n      error = true;\n      break;\n    }\n  }\n\n  return {\n    label: label,\n    error: error\n  };\n}\n\nfunction processing(domain_name, useSTD3, processing_option) {\n  var result = mapChars(domain_name, useSTD3, processing_option);\n  result.string = normalize(result.string);\n\n  var labels = result.string.split(\".\");\n  for (var i = 0; i < labels.length; ++i) {\n    try {\n      var validation = validateLabel(labels[i]);\n      labels[i] = validation.label;\n      result.error = result.error || validation.error;\n    } catch(e) {\n      result.error = true;\n    }\n  }\n\n  return {\n    string: labels.join(\".\"),\n    error: result.error\n  };\n}\n\nmodule.exports.toASCII = function(domain_name, useSTD3, processing_option, verifyDnsLength) {\n  var result = processing(domain_name, useSTD3, processing_option);\n  var labels = result.string.split(\".\");\n  labels = labels.map(function(l) {\n    try {\n      return punycode.toASCII(l);\n    } catch(e) {\n      result.error = true;\n      return l;\n    }\n  });\n\n  if (verifyDnsLength) {\n    var total = labels.slice(0, labels.length - 1).join(\".\").length;\n    if (total.length > 253 || total.length === 0) {\n      result.error = true;\n    }\n\n    for (var i=0; i < labels.length; ++i) {\n      if (labels.length > 63 || labels.length === 0) {\n        result.error = true;\n        break;\n      }\n    }\n  }\n\n  if (result.error) return null;\n  return labels.join(\".\");\n};\n\nmodule.exports.toUnicode = function(domain_name, useSTD3) {\n  var result = processing(domain_name, useSTD3, PROCESSING_OPTIONS.NONTRANSITIONAL);\n\n  return {\n    domain: result.string,\n    error: result.error\n  };\n};\n\nmodule.exports.PROCESSING_OPTIONS = PROCESSING_OPTIONS;\n","\"use strict\";\r\nconst punycode = require(\"punycode\");\r\nconst tr46 = require(\"tr46\");\r\n\r\nconst specialSchemes = {\r\n  ftp: 21,\r\n  file: null,\r\n  gopher: 70,\r\n  http: 80,\r\n  https: 443,\r\n  ws: 80,\r\n  wss: 443\r\n};\r\n\r\nconst failure = Symbol(\"failure\");\r\n\r\nfunction countSymbols(str) {\r\n  return punycode.ucs2.decode(str).length;\r\n}\r\n\r\nfunction at(input, idx) {\r\n  const c = input[idx];\r\n  return isNaN(c) ? undefined : String.fromCodePoint(c);\r\n}\r\n\r\nfunction isASCIIDigit(c) {\r\n  return c >= 0x30 && c <= 0x39;\r\n}\r\n\r\nfunction isASCIIAlpha(c) {\r\n  return (c >= 0x41 && c <= 0x5A) || (c >= 0x61 && c <= 0x7A);\r\n}\r\n\r\nfunction isASCIIAlphanumeric(c) {\r\n  return isASCIIAlpha(c) || isASCIIDigit(c);\r\n}\r\n\r\nfunction isASCIIHex(c) {\r\n  return isASCIIDigit(c) || (c >= 0x41 && c <= 0x46) || (c >= 0x61 && c <= 0x66);\r\n}\r\n\r\nfunction isSingleDot(buffer) {\r\n  return buffer === \".\" || buffer.toLowerCase() === \"%2e\";\r\n}\r\n\r\nfunction isDoubleDot(buffer) {\r\n  buffer = buffer.toLowerCase();\r\n  return buffer === \"..\" || buffer === \"%2e.\" || buffer === \".%2e\" || buffer === \"%2e%2e\";\r\n}\r\n\r\nfunction isWindowsDriveLetterCodePoints(cp1, cp2) {\r\n  return isASCIIAlpha(cp1) && (cp2 === 58 || cp2 === 124);\r\n}\r\n\r\nfunction isWindowsDriveLetterString(string) {\r\n  return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && (string[1] === \":\" || string[1] === \"|\");\r\n}\r\n\r\nfunction isNormalizedWindowsDriveLetterString(string) {\r\n  return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && string[1] === \":\";\r\n}\r\n\r\nfunction containsForbiddenHostCodePoint(string) {\r\n  return string.search(/\\u0000|\\u0009|\\u000A|\\u000D|\\u0020|#|%|\\/|:|\\?|@|\\[|\\\\|\\]/) !== -1;\r\n}\r\n\r\nfunction containsForbiddenHostCodePointExcludingPercent(string) {\r\n  return string.search(/\\u0000|\\u0009|\\u000A|\\u000D|\\u0020|#|\\/|:|\\?|@|\\[|\\\\|\\]/) !== -1;\r\n}\r\n\r\nfunction isSpecialScheme(scheme) {\r\n  return specialSchemes[scheme] !== undefined;\r\n}\r\n\r\nfunction isSpecial(url) {\r\n  return isSpecialScheme(url.scheme);\r\n}\r\n\r\nfunction defaultPort(scheme) {\r\n  return specialSchemes[scheme];\r\n}\r\n\r\nfunction percentEncode(c) {\r\n  let hex = c.toString(16).toUpperCase();\r\n  if (hex.length === 1) {\r\n    hex = \"0\" + hex;\r\n  }\r\n\r\n  return \"%\" + hex;\r\n}\r\n\r\nfunction utf8PercentEncode(c) {\r\n  const buf = new Buffer(c);\r\n\r\n  let str = \"\";\r\n\r\n  for (let i = 0; i < buf.length; ++i) {\r\n    str += percentEncode(buf[i]);\r\n  }\r\n\r\n  return str;\r\n}\r\n\r\nfunction utf8PercentDecode(str) {\r\n  const input = new Buffer(str);\r\n  const output = [];\r\n  for (let i = 0; i < input.length; ++i) {\r\n    if (input[i] !== 37) {\r\n      output.push(input[i]);\r\n    } else if (input[i] === 37 && isASCIIHex(input[i + 1]) && isASCIIHex(input[i + 2])) {\r\n      output.push(parseInt(input.slice(i + 1, i + 3).toString(), 16));\r\n      i += 2;\r\n    } else {\r\n      output.push(input[i]);\r\n    }\r\n  }\r\n  return new Buffer(output).toString();\r\n}\r\n\r\nfunction isC0ControlPercentEncode(c) {\r\n  return c <= 0x1F || c > 0x7E;\r\n}\r\n\r\nconst extraPathPercentEncodeSet = new Set([32, 34, 35, 60, 62, 63, 96, 123, 125]);\r\nfunction isPathPercentEncode(c) {\r\n  return isC0ControlPercentEncode(c) || extraPathPercentEncodeSet.has(c);\r\n}\r\n\r\nconst extraUserinfoPercentEncodeSet =\r\n  new Set([47, 58, 59, 61, 64, 91, 92, 93, 94, 124]);\r\nfunction isUserinfoPercentEncode(c) {\r\n  return isPathPercentEncode(c) || extraUserinfoPercentEncodeSet.has(c);\r\n}\r\n\r\nfunction percentEncodeChar(c, encodeSetPredicate) {\r\n  const cStr = String.fromCodePoint(c);\r\n\r\n  if (encodeSetPredicate(c)) {\r\n    return utf8PercentEncode(cStr);\r\n  }\r\n\r\n  return cStr;\r\n}\r\n\r\nfunction parseIPv4Number(input) {\r\n  let R = 10;\r\n\r\n  if (input.length >= 2 && input.charAt(0) === \"0\" && input.charAt(1).toLowerCase() === \"x\") {\r\n    input = input.substring(2);\r\n    R = 16;\r\n  } else if (input.length >= 2 && input.charAt(0) === \"0\") {\r\n    input = input.substring(1);\r\n    R = 8;\r\n  }\r\n\r\n  if (input === \"\") {\r\n    return 0;\r\n  }\r\n\r\n  const regex = R === 10 ? /[^0-9]/ : (R === 16 ? /[^0-9A-Fa-f]/ : /[^0-7]/);\r\n  if (regex.test(input)) {\r\n    return failure;\r\n  }\r\n\r\n  return parseInt(input, R);\r\n}\r\n\r\nfunction parseIPv4(input) {\r\n  const parts = input.split(\".\");\r\n  if (parts[parts.length - 1] === \"\") {\r\n    if (parts.length > 1) {\r\n      parts.pop();\r\n    }\r\n  }\r\n\r\n  if (parts.length > 4) {\r\n    return input;\r\n  }\r\n\r\n  const numbers = [];\r\n  for (const part of parts) {\r\n    if (part === \"\") {\r\n      return input;\r\n    }\r\n    const n = parseIPv4Number(part);\r\n    if (n === failure) {\r\n      return input;\r\n    }\r\n\r\n    numbers.push(n);\r\n  }\r\n\r\n  for (let i = 0; i < numbers.length - 1; ++i) {\r\n    if (numbers[i] > 255) {\r\n      return failure;\r\n    }\r\n  }\r\n  if (numbers[numbers.length - 1] >= Math.pow(256, 5 - numbers.length)) {\r\n    return failure;\r\n  }\r\n\r\n  let ipv4 = numbers.pop();\r\n  let counter = 0;\r\n\r\n  for (const n of numbers) {\r\n    ipv4 += n * Math.pow(256, 3 - counter);\r\n    ++counter;\r\n  }\r\n\r\n  return ipv4;\r\n}\r\n\r\nfunction serializeIPv4(address) {\r\n  let output = \"\";\r\n  let n = address;\r\n\r\n  for (let i = 1; i <= 4; ++i) {\r\n    output = String(n % 256) + output;\r\n    if (i !== 4) {\r\n      output = \".\" + output;\r\n    }\r\n    n = Math.floor(n / 256);\r\n  }\r\n\r\n  return output;\r\n}\r\n\r\nfunction parseIPv6(input) {\r\n  const address = [0, 0, 0, 0, 0, 0, 0, 0];\r\n  let pieceIndex = 0;\r\n  let compress = null;\r\n  let pointer = 0;\r\n\r\n  input = punycode.ucs2.decode(input);\r\n\r\n  if (input[pointer] === 58) {\r\n    if (input[pointer + 1] !== 58) {\r\n      return failure;\r\n    }\r\n\r\n    pointer += 2;\r\n    ++pieceIndex;\r\n    compress = pieceIndex;\r\n  }\r\n\r\n  while (pointer < input.length) {\r\n    if (pieceIndex === 8) {\r\n      return failure;\r\n    }\r\n\r\n    if (input[pointer] === 58) {\r\n      if (compress !== null) {\r\n        return failure;\r\n      }\r\n      ++pointer;\r\n      ++pieceIndex;\r\n      compress = pieceIndex;\r\n      continue;\r\n    }\r\n\r\n    let value = 0;\r\n    let length = 0;\r\n\r\n    while (length < 4 && isASCIIHex(input[pointer])) {\r\n      value = value * 0x10 + parseInt(at(input, pointer), 16);\r\n      ++pointer;\r\n      ++length;\r\n    }\r\n\r\n    if (input[pointer] === 46) {\r\n      if (length === 0) {\r\n        return failure;\r\n      }\r\n\r\n      pointer -= length;\r\n\r\n      if (pieceIndex > 6) {\r\n        return failure;\r\n      }\r\n\r\n      let numbersSeen = 0;\r\n\r\n      while (input[pointer] !== undefined) {\r\n        let ipv4Piece = null;\r\n\r\n        if (numbersSeen > 0) {\r\n          if (input[pointer] === 46 && numbersSeen < 4) {\r\n            ++pointer;\r\n          } else {\r\n            return failure;\r\n          }\r\n        }\r\n\r\n        if (!isASCIIDigit(input[pointer])) {\r\n          return failure;\r\n        }\r\n\r\n        while (isASCIIDigit(input[pointer])) {\r\n          const number = parseInt(at(input, pointer));\r\n          if (ipv4Piece === null) {\r\n            ipv4Piece = number;\r\n          } else if (ipv4Piece === 0) {\r\n            return failure;\r\n          } else {\r\n            ipv4Piece = ipv4Piece * 10 + number;\r\n          }\r\n          if (ipv4Piece > 255) {\r\n            return failure;\r\n          }\r\n          ++pointer;\r\n        }\r\n\r\n        address[pieceIndex] = address[pieceIndex] * 0x100 + ipv4Piece;\r\n\r\n        ++numbersSeen;\r\n\r\n        if (numbersSeen === 2 || numbersSeen === 4) {\r\n          ++pieceIndex;\r\n        }\r\n      }\r\n\r\n      if (numbersSeen !== 4) {\r\n        return failure;\r\n      }\r\n\r\n      break;\r\n    } else if (input[pointer] === 58) {\r\n      ++pointer;\r\n      if (input[pointer] === undefined) {\r\n        return failure;\r\n      }\r\n    } else if (input[pointer] !== undefined) {\r\n      return failure;\r\n    }\r\n\r\n    address[pieceIndex] = value;\r\n    ++pieceIndex;\r\n  }\r\n\r\n  if (compress !== null) {\r\n    let swaps = pieceIndex - compress;\r\n    pieceIndex = 7;\r\n    while (pieceIndex !== 0 && swaps > 0) {\r\n      const temp = address[compress + swaps - 1];\r\n      address[compress + swaps - 1] = address[pieceIndex];\r\n      address[pieceIndex] = temp;\r\n      --pieceIndex;\r\n      --swaps;\r\n    }\r\n  } else if (compress === null && pieceIndex !== 8) {\r\n    return failure;\r\n  }\r\n\r\n  return address;\r\n}\r\n\r\nfunction serializeIPv6(address) {\r\n  let output = \"\";\r\n  const seqResult = findLongestZeroSequence(address);\r\n  const compress = seqResult.idx;\r\n  let ignore0 = false;\r\n\r\n  for (let pieceIndex = 0; pieceIndex <= 7; ++pieceIndex) {\r\n    if (ignore0 && address[pieceIndex] === 0) {\r\n      continue;\r\n    } else if (ignore0) {\r\n      ignore0 = false;\r\n    }\r\n\r\n    if (compress === pieceIndex) {\r\n      const separator = pieceIndex === 0 ? \"::\" : \":\";\r\n      output += separator;\r\n      ignore0 = true;\r\n      continue;\r\n    }\r\n\r\n    output += address[pieceIndex].toString(16);\r\n\r\n    if (pieceIndex !== 7) {\r\n      output += \":\";\r\n    }\r\n  }\r\n\r\n  return output;\r\n}\r\n\r\nfunction parseHost(input, isSpecialArg) {\r\n  if (input[0] === \"[\") {\r\n    if (input[input.length - 1] !== \"]\") {\r\n      return failure;\r\n    }\r\n\r\n    return parseIPv6(input.substring(1, input.length - 1));\r\n  }\r\n\r\n  if (!isSpecialArg) {\r\n    return parseOpaqueHost(input);\r\n  }\r\n\r\n  const domain = utf8PercentDecode(input);\r\n  const asciiDomain = tr46.toASCII(domain, false, tr46.PROCESSING_OPTIONS.NONTRANSITIONAL, false);\r\n  if (asciiDomain === null) {\r\n    return failure;\r\n  }\r\n\r\n  if (containsForbiddenHostCodePoint(asciiDomain)) {\r\n    return failure;\r\n  }\r\n\r\n  const ipv4Host = parseIPv4(asciiDomain);\r\n  if (typeof ipv4Host === \"number\" || ipv4Host === failure) {\r\n    return ipv4Host;\r\n  }\r\n\r\n  return asciiDomain;\r\n}\r\n\r\nfunction parseOpaqueHost(input) {\r\n  if (containsForbiddenHostCodePointExcludingPercent(input)) {\r\n    return failure;\r\n  }\r\n\r\n  let output = \"\";\r\n  const decoded = punycode.ucs2.decode(input);\r\n  for (let i = 0; i < decoded.length; ++i) {\r\n    output += percentEncodeChar(decoded[i], isC0ControlPercentEncode);\r\n  }\r\n  return output;\r\n}\r\n\r\nfunction findLongestZeroSequence(arr) {\r\n  let maxIdx = null;\r\n  let maxLen = 1; // only find elements > 1\r\n  let currStart = null;\r\n  let currLen = 0;\r\n\r\n  for (let i = 0; i < arr.length; ++i) {\r\n    if (arr[i] !== 0) {\r\n      if (currLen > maxLen) {\r\n        maxIdx = currStart;\r\n        maxLen = currLen;\r\n      }\r\n\r\n      currStart = null;\r\n      currLen = 0;\r\n    } else {\r\n      if (currStart === null) {\r\n        currStart = i;\r\n      }\r\n      ++currLen;\r\n    }\r\n  }\r\n\r\n  // if trailing zeros\r\n  if (currLen > maxLen) {\r\n    maxIdx = currStart;\r\n    maxLen = currLen;\r\n  }\r\n\r\n  return {\r\n    idx: maxIdx,\r\n    len: maxLen\r\n  };\r\n}\r\n\r\nfunction serializeHost(host) {\r\n  if (typeof host === \"number\") {\r\n    return serializeIPv4(host);\r\n  }\r\n\r\n  // IPv6 serializer\r\n  if (host instanceof Array) {\r\n    return \"[\" + serializeIPv6(host) + \"]\";\r\n  }\r\n\r\n  return host;\r\n}\r\n\r\nfunction trimControlChars(url) {\r\n  return url.replace(/^[\\u0000-\\u001F\\u0020]+|[\\u0000-\\u001F\\u0020]+$/g, \"\");\r\n}\r\n\r\nfunction trimTabAndNewline(url) {\r\n  return url.replace(/\\u0009|\\u000A|\\u000D/g, \"\");\r\n}\r\n\r\nfunction shortenPath(url) {\r\n  const path = url.path;\r\n  if (path.length === 0) {\r\n    return;\r\n  }\r\n  if (url.scheme === \"file\" && path.length === 1 && isNormalizedWindowsDriveLetter(path[0])) {\r\n    return;\r\n  }\r\n\r\n  path.pop();\r\n}\r\n\r\nfunction includesCredentials(url) {\r\n  return url.username !== \"\" || url.password !== \"\";\r\n}\r\n\r\nfunction cannotHaveAUsernamePasswordPort(url) {\r\n  return url.host === null || url.host === \"\" || url.cannotBeABaseURL || url.scheme === \"file\";\r\n}\r\n\r\nfunction isNormalizedWindowsDriveLetter(string) {\r\n  return /^[A-Za-z]:$/.test(string);\r\n}\r\n\r\nfunction URLStateMachine(input, base, encodingOverride, url, stateOverride) {\r\n  this.pointer = 0;\r\n  this.input = input;\r\n  this.base = base || null;\r\n  this.encodingOverride = encodingOverride || \"utf-8\";\r\n  this.stateOverride = stateOverride;\r\n  this.url = url;\r\n  this.failure = false;\r\n  this.parseError = false;\r\n\r\n  if (!this.url) {\r\n    this.url = {\r\n      scheme: \"\",\r\n      username: \"\",\r\n      password: \"\",\r\n      host: null,\r\n      port: null,\r\n      path: [],\r\n      query: null,\r\n      fragment: null,\r\n\r\n      cannotBeABaseURL: false\r\n    };\r\n\r\n    const res = trimControlChars(this.input);\r\n    if (res !== this.input) {\r\n      this.parseError = true;\r\n    }\r\n    this.input = res;\r\n  }\r\n\r\n  const res = trimTabAndNewline(this.input);\r\n  if (res !== this.input) {\r\n    this.parseError = true;\r\n  }\r\n  this.input = res;\r\n\r\n  this.state = stateOverride || \"scheme start\";\r\n\r\n  this.buffer = \"\";\r\n  this.atFlag = false;\r\n  this.arrFlag = false;\r\n  this.passwordTokenSeenFlag = false;\r\n\r\n  this.input = punycode.ucs2.decode(this.input);\r\n\r\n  for (; this.pointer <= this.input.length; ++this.pointer) {\r\n    const c = this.input[this.pointer];\r\n    const cStr = isNaN(c) ? undefined : String.fromCodePoint(c);\r\n\r\n    // exec state machine\r\n    const ret = this[\"parse \" + this.state](c, cStr);\r\n    if (!ret) {\r\n      break; // terminate algorithm\r\n    } else if (ret === failure) {\r\n      this.failure = true;\r\n      break;\r\n    }\r\n  }\r\n}\r\n\r\nURLStateMachine.prototype[\"parse scheme start\"] = function parseSchemeStart(c, cStr) {\r\n  if (isASCIIAlpha(c)) {\r\n    this.buffer += cStr.toLowerCase();\r\n    this.state = \"scheme\";\r\n  } else if (!this.stateOverride) {\r\n    this.state = \"no scheme\";\r\n    --this.pointer;\r\n  } else {\r\n    this.parseError = true;\r\n    return failure;\r\n  }\r\n\r\n  return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse scheme\"] = function parseScheme(c, cStr) {\r\n  if (isASCIIAlphanumeric(c) || c === 43 || c === 45 || c === 46) {\r\n    this.buffer += cStr.toLowerCase();\r\n  } else if (c === 58) {\r\n    if (this.stateOverride) {\r\n      if (isSpecial(this.url) && !isSpecialScheme(this.buffer)) {\r\n        return false;\r\n      }\r\n\r\n      if (!isSpecial(this.url) && isSpecialScheme(this.buffer)) {\r\n        return false;\r\n      }\r\n\r\n      if ((includesCredentials(this.url) || this.url.port !== null) && this.buffer === \"file\") {\r\n        return false;\r\n      }\r\n\r\n      if (this.url.scheme === \"file\" && (this.url.host === \"\" || this.url.host === null)) {\r\n        return false;\r\n      }\r\n    }\r\n    this.url.scheme = this.buffer;\r\n    this.buffer = \"\";\r\n    if (this.stateOverride) {\r\n      return false;\r\n    }\r\n    if (this.url.scheme === \"file\") {\r\n      if (this.input[this.pointer + 1] !== 47 || this.input[this.pointer + 2] !== 47) {\r\n        this.parseError = true;\r\n      }\r\n      this.state = \"file\";\r\n    } else if (isSpecial(this.url) && this.base !== null && this.base.scheme === this.url.scheme) {\r\n      this.state = \"special relative or authority\";\r\n    } else if (isSpecial(this.url)) {\r\n      this.state = \"special authority slashes\";\r\n    } else if (this.input[this.pointer + 1] === 47) {\r\n      this.state = \"path or authority\";\r\n      ++this.pointer;\r\n    } else {\r\n      this.url.cannotBeABaseURL = true;\r\n      this.url.path.push(\"\");\r\n      this.state = \"cannot-be-a-base-URL path\";\r\n    }\r\n  } else if (!this.stateOverride) {\r\n    this.buffer = \"\";\r\n    this.state = \"no scheme\";\r\n    this.pointer = -1;\r\n  } else {\r\n    this.parseError = true;\r\n    return failure;\r\n  }\r\n\r\n  return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse no scheme\"] = function parseNoScheme(c) {\r\n  if (this.base === null || (this.base.cannotBeABaseURL && c !== 35)) {\r\n    return failure;\r\n  } else if (this.base.cannotBeABaseURL && c === 35) {\r\n    this.url.scheme = this.base.scheme;\r\n    this.url.path = this.base.path.slice();\r\n    this.url.query = this.base.query;\r\n    this.url.fragment = \"\";\r\n    this.url.cannotBeABaseURL = true;\r\n    this.state = \"fragment\";\r\n  } else if (this.base.scheme === \"file\") {\r\n    this.state = \"file\";\r\n    --this.pointer;\r\n  } else {\r\n    this.state = \"relative\";\r\n    --this.pointer;\r\n  }\r\n\r\n  return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse special relative or authority\"] = function parseSpecialRelativeOrAuthority(c) {\r\n  if (c === 47 && this.input[this.pointer + 1] === 47) {\r\n    this.state = \"special authority ignore slashes\";\r\n    ++this.pointer;\r\n  } else {\r\n    this.parseError = true;\r\n    this.state = \"relative\";\r\n    --this.pointer;\r\n  }\r\n\r\n  return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse path or authority\"] = function parsePathOrAuthority(c) {\r\n  if (c === 47) {\r\n    this.state = \"authority\";\r\n  } else {\r\n    this.state = \"path\";\r\n    --this.pointer;\r\n  }\r\n\r\n  return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse relative\"] = function parseRelative(c) {\r\n  this.url.scheme = this.base.scheme;\r\n  if (isNaN(c)) {\r\n    this.url.username = this.base.username;\r\n    this.url.password = this.base.password;\r\n    this.url.host = this.base.host;\r\n    this.url.port = this.base.port;\r\n    this.url.path = this.base.path.slice();\r\n    this.url.query = this.base.query;\r\n  } else if (c === 47) {\r\n    this.state = \"relative slash\";\r\n  } else if (c === 63) {\r\n    this.url.username = this.base.username;\r\n    this.url.password = this.base.password;\r\n    this.url.host = this.base.host;\r\n    this.url.port = this.base.port;\r\n    this.url.path = this.base.path.slice();\r\n    this.url.query = \"\";\r\n    this.state = \"query\";\r\n  } else if (c === 35) {\r\n    this.url.username = this.base.username;\r\n    this.url.password = this.base.password;\r\n    this.url.host = this.base.host;\r\n    this.url.port = this.base.port;\r\n    this.url.path = this.base.path.slice();\r\n    this.url.query = this.base.query;\r\n    this.url.fragment = \"\";\r\n    this.state = \"fragment\";\r\n  } else if (isSpecial(this.url) && c === 92) {\r\n    this.parseError = true;\r\n    this.state = \"relative slash\";\r\n  } else {\r\n    this.url.username = this.base.username;\r\n    this.url.password = this.base.password;\r\n    this.url.host = this.base.host;\r\n    this.url.port = this.base.port;\r\n    this.url.path = this.base.path.slice(0, this.base.path.length - 1);\r\n\r\n    this.state = \"path\";\r\n    --this.pointer;\r\n  }\r\n\r\n  return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse relative slash\"] = function parseRelativeSlash(c) {\r\n  if (isSpecial(this.url) && (c === 47 || c === 92)) {\r\n    if (c === 92) {\r\n      this.parseError = true;\r\n    }\r\n    this.state = \"special authority ignore slashes\";\r\n  } else if (c === 47) {\r\n    this.state = \"authority\";\r\n  } else {\r\n    this.url.username = this.base.username;\r\n    this.url.password = this.base.password;\r\n    this.url.host = this.base.host;\r\n    this.url.port = this.base.port;\r\n    this.state = \"path\";\r\n    --this.pointer;\r\n  }\r\n\r\n  return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse special authority slashes\"] = function parseSpecialAuthoritySlashes(c) {\r\n  if (c === 47 && this.input[this.pointer + 1] === 47) {\r\n    this.state = \"special authority ignore slashes\";\r\n    ++this.pointer;\r\n  } else {\r\n    this.parseError = true;\r\n    this.state = \"special authority ignore slashes\";\r\n    --this.pointer;\r\n  }\r\n\r\n  return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse special authority ignore slashes\"] = function parseSpecialAuthorityIgnoreSlashes(c) {\r\n  if (c !== 47 && c !== 92) {\r\n    this.state = \"authority\";\r\n    --this.pointer;\r\n  } else {\r\n    this.parseError = true;\r\n  }\r\n\r\n  return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse authority\"] = function parseAuthority(c, cStr) {\r\n  if (c === 64) {\r\n    this.parseError = true;\r\n    if (this.atFlag) {\r\n      this.buffer = \"%40\" + this.buffer;\r\n    }\r\n    this.atFlag = true;\r\n\r\n    // careful, this is based on buffer and has its own pointer (this.pointer != pointer) and inner chars\r\n    const len = countSymbols(this.buffer);\r\n    for (let pointer = 0; pointer < len; ++pointer) {\r\n      const codePoint = this.buffer.codePointAt(pointer);\r\n\r\n      if (codePoint === 58 && !this.passwordTokenSeenFlag) {\r\n        this.passwordTokenSeenFlag = true;\r\n        continue;\r\n      }\r\n      const encodedCodePoints = percentEncodeChar(codePoint, isUserinfoPercentEncode);\r\n      if (this.passwordTokenSeenFlag) {\r\n        this.url.password += encodedCodePoints;\r\n      } else {\r\n        this.url.username += encodedCodePoints;\r\n      }\r\n    }\r\n    this.buffer = \"\";\r\n  } else if (isNaN(c) || c === 47 || c === 63 || c === 35 ||\r\n             (isSpecial(this.url) && c === 92)) {\r\n    if (this.atFlag && this.buffer === \"\") {\r\n      this.parseError = true;\r\n      return failure;\r\n    }\r\n    this.pointer -= countSymbols(this.buffer) + 1;\r\n    this.buffer = \"\";\r\n    this.state = \"host\";\r\n  } else {\r\n    this.buffer += cStr;\r\n  }\r\n\r\n  return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse hostname\"] =\r\nURLStateMachine.prototype[\"parse host\"] = function parseHostName(c, cStr) {\r\n  if (this.stateOverride && this.url.scheme === \"file\") {\r\n    --this.pointer;\r\n    this.state = \"file host\";\r\n  } else if (c === 58 && !this.arrFlag) {\r\n    if (this.buffer === \"\") {\r\n      this.parseError = true;\r\n      return failure;\r\n    }\r\n\r\n    const host = parseHost(this.buffer, isSpecial(this.url));\r\n    if (host === failure) {\r\n      return failure;\r\n    }\r\n\r\n    this.url.host = host;\r\n    this.buffer = \"\";\r\n    this.state = \"port\";\r\n    if (this.stateOverride === \"hostname\") {\r\n      return false;\r\n    }\r\n  } else if (isNaN(c) || c === 47 || c === 63 || c === 35 ||\r\n             (isSpecial(this.url) && c === 92)) {\r\n    --this.pointer;\r\n    if (isSpecial(this.url) && this.buffer === \"\") {\r\n      this.parseError = true;\r\n      return failure;\r\n    } else if (this.stateOverride && this.buffer === \"\" &&\r\n               (includesCredentials(this.url) || this.url.port !== null)) {\r\n      this.parseError = true;\r\n      return false;\r\n    }\r\n\r\n    const host = parseHost(this.buffer, isSpecial(this.url));\r\n    if (host === failure) {\r\n      return failure;\r\n    }\r\n\r\n    this.url.host = host;\r\n    this.buffer = \"\";\r\n    this.state = \"path start\";\r\n    if (this.stateOverride) {\r\n      return false;\r\n    }\r\n  } else {\r\n    if (c === 91) {\r\n      this.arrFlag = true;\r\n    } else if (c === 93) {\r\n      this.arrFlag = false;\r\n    }\r\n    this.buffer += cStr;\r\n  }\r\n\r\n  return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse port\"] = function parsePort(c, cStr) {\r\n  if (isASCIIDigit(c)) {\r\n    this.buffer += cStr;\r\n  } else if (isNaN(c) || c === 47 || c === 63 || c === 35 ||\r\n             (isSpecial(this.url) && c === 92) ||\r\n             this.stateOverride) {\r\n    if (this.buffer !== \"\") {\r\n      const port = parseInt(this.buffer);\r\n      if (port > Math.pow(2, 16) - 1) {\r\n        this.parseError = true;\r\n        return failure;\r\n      }\r\n      this.url.port = port === defaultPort(this.url.scheme) ? null : port;\r\n      this.buffer = \"\";\r\n    }\r\n    if (this.stateOverride) {\r\n      return false;\r\n    }\r\n    this.state = \"path start\";\r\n    --this.pointer;\r\n  } else {\r\n    this.parseError = true;\r\n    return failure;\r\n  }\r\n\r\n  return true;\r\n};\r\n\r\nconst fileOtherwiseCodePoints = new Set([47, 92, 63, 35]);\r\n\r\nURLStateMachine.prototype[\"parse file\"] = function parseFile(c) {\r\n  this.url.scheme = \"file\";\r\n\r\n  if (c === 47 || c === 92) {\r\n    if (c === 92) {\r\n      this.parseError = true;\r\n    }\r\n    this.state = \"file slash\";\r\n  } else if (this.base !== null && this.base.scheme === \"file\") {\r\n    if (isNaN(c)) {\r\n      this.url.host = this.base.host;\r\n      this.url.path = this.base.path.slice();\r\n      this.url.query = this.base.query;\r\n    } else if (c === 63) {\r\n      this.url.host = this.base.host;\r\n      this.url.path = this.base.path.slice();\r\n      this.url.query = \"\";\r\n      this.state = \"query\";\r\n    } else if (c === 35) {\r\n      this.url.host = this.base.host;\r\n      this.url.path = this.base.path.slice();\r\n      this.url.query = this.base.query;\r\n      this.url.fragment = \"\";\r\n      this.state = \"fragment\";\r\n    } else {\r\n      if (this.input.length - this.pointer - 1 === 0 || // remaining consists of 0 code points\r\n          !isWindowsDriveLetterCodePoints(c, this.input[this.pointer + 1]) ||\r\n          (this.input.length - this.pointer - 1 >= 2 && // remaining has at least 2 code points\r\n           !fileOtherwiseCodePoints.has(this.input[this.pointer + 2]))) {\r\n        this.url.host = this.base.host;\r\n        this.url.path = this.base.path.slice();\r\n        shortenPath(this.url);\r\n      } else {\r\n        this.parseError = true;\r\n      }\r\n\r\n      this.state = \"path\";\r\n      --this.pointer;\r\n    }\r\n  } else {\r\n    this.state = \"path\";\r\n    --this.pointer;\r\n  }\r\n\r\n  return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse file slash\"] = function parseFileSlash(c) {\r\n  if (c === 47 || c === 92) {\r\n    if (c === 92) {\r\n      this.parseError = true;\r\n    }\r\n    this.state = \"file host\";\r\n  } else {\r\n    if (this.base !== null && this.base.scheme === \"file\") {\r\n      if (isNormalizedWindowsDriveLetterString(this.base.path[0])) {\r\n        this.url.path.push(this.base.path[0]);\r\n      } else {\r\n        this.url.host = this.base.host;\r\n      }\r\n    }\r\n    this.state = \"path\";\r\n    --this.pointer;\r\n  }\r\n\r\n  return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse file host\"] = function parseFileHost(c, cStr) {\r\n  if (isNaN(c) || c === 47 || c === 92 || c === 63 || c === 35) {\r\n    --this.pointer;\r\n    if (!this.stateOverride && isWindowsDriveLetterString(this.buffer)) {\r\n      this.parseError = true;\r\n      this.state = \"path\";\r\n    } else if (this.buffer === \"\") {\r\n      this.url.host = \"\";\r\n      if (this.stateOverride) {\r\n        return false;\r\n      }\r\n      this.state = \"path start\";\r\n    } else {\r\n      let host = parseHost(this.buffer, isSpecial(this.url));\r\n      if (host === failure) {\r\n        return failure;\r\n      }\r\n      if (host === \"localhost\") {\r\n        host = \"\";\r\n      }\r\n      this.url.host = host;\r\n\r\n      if (this.stateOverride) {\r\n        return false;\r\n      }\r\n\r\n      this.buffer = \"\";\r\n      this.state = \"path start\";\r\n    }\r\n  } else {\r\n    this.buffer += cStr;\r\n  }\r\n\r\n  return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse path start\"] = function parsePathStart(c) {\r\n  if (isSpecial(this.url)) {\r\n    if (c === 92) {\r\n      this.parseError = true;\r\n    }\r\n    this.state = \"path\";\r\n\r\n    if (c !== 47 && c !== 92) {\r\n      --this.pointer;\r\n    }\r\n  } else if (!this.stateOverride && c === 63) {\r\n    this.url.query = \"\";\r\n    this.state = \"query\";\r\n  } else if (!this.stateOverride && c === 35) {\r\n    this.url.fragment = \"\";\r\n    this.state = \"fragment\";\r\n  } else if (c !== undefined) {\r\n    this.state = \"path\";\r\n    if (c !== 47) {\r\n      --this.pointer;\r\n    }\r\n  }\r\n\r\n  return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse path\"] = function parsePath(c) {\r\n  if (isNaN(c) || c === 47 || (isSpecial(this.url) && c === 92) ||\r\n      (!this.stateOverride && (c === 63 || c === 35))) {\r\n    if (isSpecial(this.url) && c === 92) {\r\n      this.parseError = true;\r\n    }\r\n\r\n    if (isDoubleDot(this.buffer)) {\r\n      shortenPath(this.url);\r\n      if (c !== 47 && !(isSpecial(this.url) && c === 92)) {\r\n        this.url.path.push(\"\");\r\n      }\r\n    } else if (isSingleDot(this.buffer) && c !== 47 &&\r\n               !(isSpecial(this.url) && c === 92)) {\r\n      this.url.path.push(\"\");\r\n    } else if (!isSingleDot(this.buffer)) {\r\n      if (this.url.scheme === \"file\" && this.url.path.length === 0 && isWindowsDriveLetterString(this.buffer)) {\r\n        if (this.url.host !== \"\" && this.url.host !== null) {\r\n          this.parseError = true;\r\n          this.url.host = \"\";\r\n        }\r\n        this.buffer = this.buffer[0] + \":\";\r\n      }\r\n      this.url.path.push(this.buffer);\r\n    }\r\n    this.buffer = \"\";\r\n    if (this.url.scheme === \"file\" && (c === undefined || c === 63 || c === 35)) {\r\n      while (this.url.path.length > 1 && this.url.path[0] === \"\") {\r\n        this.parseError = true;\r\n        this.url.path.shift();\r\n      }\r\n    }\r\n    if (c === 63) {\r\n      this.url.query = \"\";\r\n      this.state = \"query\";\r\n    }\r\n    if (c === 35) {\r\n      this.url.fragment = \"\";\r\n      this.state = \"fragment\";\r\n    }\r\n  } else {\r\n    // TODO: If c is not a URL code point and not \"%\", parse error.\r\n\r\n    if (c === 37 &&\r\n      (!isASCIIHex(this.input[this.pointer + 1]) ||\r\n        !isASCIIHex(this.input[this.pointer + 2]))) {\r\n      this.parseError = true;\r\n    }\r\n\r\n    this.buffer += percentEncodeChar(c, isPathPercentEncode);\r\n  }\r\n\r\n  return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse cannot-be-a-base-URL path\"] = function parseCannotBeABaseURLPath(c) {\r\n  if (c === 63) {\r\n    this.url.query = \"\";\r\n    this.state = \"query\";\r\n  } else if (c === 35) {\r\n    this.url.fragment = \"\";\r\n    this.state = \"fragment\";\r\n  } else {\r\n    // TODO: Add: not a URL code point\r\n    if (!isNaN(c) && c !== 37) {\r\n      this.parseError = true;\r\n    }\r\n\r\n    if (c === 37 &&\r\n        (!isASCIIHex(this.input[this.pointer + 1]) ||\r\n         !isASCIIHex(this.input[this.pointer + 2]))) {\r\n      this.parseError = true;\r\n    }\r\n\r\n    if (!isNaN(c)) {\r\n      this.url.path[0] = this.url.path[0] + percentEncodeChar(c, isC0ControlPercentEncode);\r\n    }\r\n  }\r\n\r\n  return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse query\"] = function parseQuery(c, cStr) {\r\n  if (isNaN(c) || (!this.stateOverride && c === 35)) {\r\n    if (!isSpecial(this.url) || this.url.scheme === \"ws\" || this.url.scheme === \"wss\") {\r\n      this.encodingOverride = \"utf-8\";\r\n    }\r\n\r\n    const buffer = new Buffer(this.buffer); // TODO: Use encoding override instead\r\n    for (let i = 0; i < buffer.length; ++i) {\r\n      if (buffer[i] < 0x21 || buffer[i] > 0x7E || buffer[i] === 0x22 || buffer[i] === 0x23 ||\r\n          buffer[i] === 0x3C || buffer[i] === 0x3E) {\r\n        this.url.query += percentEncode(buffer[i]);\r\n      } else {\r\n        this.url.query += String.fromCodePoint(buffer[i]);\r\n      }\r\n    }\r\n\r\n    this.buffer = \"\";\r\n    if (c === 35) {\r\n      this.url.fragment = \"\";\r\n      this.state = \"fragment\";\r\n    }\r\n  } else {\r\n    // TODO: If c is not a URL code point and not \"%\", parse error.\r\n    if (c === 37 &&\r\n      (!isASCIIHex(this.input[this.pointer + 1]) ||\r\n        !isASCIIHex(this.input[this.pointer + 2]))) {\r\n      this.parseError = true;\r\n    }\r\n\r\n    this.buffer += cStr;\r\n  }\r\n\r\n  return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse fragment\"] = function parseFragment(c) {\r\n  if (isNaN(c)) { // do nothing\r\n  } else if (c === 0x0) {\r\n    this.parseError = true;\r\n  } else {\r\n    // TODO: If c is not a URL code point and not \"%\", parse error.\r\n    if (c === 37 &&\r\n      (!isASCIIHex(this.input[this.pointer + 1]) ||\r\n        !isASCIIHex(this.input[this.pointer + 2]))) {\r\n      this.parseError = true;\r\n    }\r\n\r\n    this.url.fragment += percentEncodeChar(c, isC0ControlPercentEncode);\r\n  }\r\n\r\n  return true;\r\n};\r\n\r\nfunction serializeURL(url, excludeFragment) {\r\n  let output = url.scheme + \":\";\r\n  if (url.host !== null) {\r\n    output += \"//\";\r\n\r\n    if (url.username !== \"\" || url.password !== \"\") {\r\n      output += url.username;\r\n      if (url.password !== \"\") {\r\n        output += \":\" + url.password;\r\n      }\r\n      output += \"@\";\r\n    }\r\n\r\n    output += serializeHost(url.host);\r\n\r\n    if (url.port !== null) {\r\n      output += \":\" + url.port;\r\n    }\r\n  } else if (url.host === null && url.scheme === \"file\") {\r\n    output += \"//\";\r\n  }\r\n\r\n  if (url.cannotBeABaseURL) {\r\n    output += url.path[0];\r\n  } else {\r\n    for (const string of url.path) {\r\n      output += \"/\" + string;\r\n    }\r\n  }\r\n\r\n  if (url.query !== null) {\r\n    output += \"?\" + url.query;\r\n  }\r\n\r\n  if (!excludeFragment && url.fragment !== null) {\r\n    output += \"#\" + url.fragment;\r\n  }\r\n\r\n  return output;\r\n}\r\n\r\nfunction serializeOrigin(tuple) {\r\n  let result = tuple.scheme + \"://\";\r\n  result += serializeHost(tuple.host);\r\n\r\n  if (tuple.port !== null) {\r\n    result += \":\" + tuple.port;\r\n  }\r\n\r\n  return result;\r\n}\r\n\r\nmodule.exports.serializeURL = serializeURL;\r\n\r\nmodule.exports.serializeURLOrigin = function (url) {\r\n  // https://url.spec.whatwg.org/#concept-url-origin\r\n  switch (url.scheme) {\r\n    case \"blob\":\r\n      try {\r\n        return module.exports.serializeURLOrigin(module.exports.parseURL(url.path[0]));\r\n      } catch (e) {\r\n        // serializing an opaque origin returns \"null\"\r\n        return \"null\";\r\n      }\r\n    case \"ftp\":\r\n    case \"gopher\":\r\n    case \"http\":\r\n    case \"https\":\r\n    case \"ws\":\r\n    case \"wss\":\r\n      return serializeOrigin({\r\n        scheme: url.scheme,\r\n        host: url.host,\r\n        port: url.port\r\n      });\r\n    case \"file\":\r\n      // spec says \"exercise to the reader\", chrome says \"file://\"\r\n      return \"file://\";\r\n    default:\r\n      // serializing an opaque origin returns \"null\"\r\n      return \"null\";\r\n  }\r\n};\r\n\r\nmodule.exports.basicURLParse = function (input, options) {\r\n  if (options === undefined) {\r\n    options = {};\r\n  }\r\n\r\n  const usm = new URLStateMachine(input, options.baseURL, options.encodingOverride, options.url, options.stateOverride);\r\n  if (usm.failure) {\r\n    return \"failure\";\r\n  }\r\n\r\n  return usm.url;\r\n};\r\n\r\nmodule.exports.setTheUsername = function (url, username) {\r\n  url.username = \"\";\r\n  const decoded = punycode.ucs2.decode(username);\r\n  for (let i = 0; i < decoded.length; ++i) {\r\n    url.username += percentEncodeChar(decoded[i], isUserinfoPercentEncode);\r\n  }\r\n};\r\n\r\nmodule.exports.setThePassword = function (url, password) {\r\n  url.password = \"\";\r\n  const decoded = punycode.ucs2.decode(password);\r\n  for (let i = 0; i < decoded.length; ++i) {\r\n    url.password += percentEncodeChar(decoded[i], isUserinfoPercentEncode);\r\n  }\r\n};\r\n\r\nmodule.exports.serializeHost = serializeHost;\r\n\r\nmodule.exports.cannotHaveAUsernamePasswordPort = cannotHaveAUsernamePasswordPort;\r\n\r\nmodule.exports.serializeInteger = function (integer) {\r\n  return String(integer);\r\n};\r\n\r\nmodule.exports.parseURL = function (input, options) {\r\n  if (options === undefined) {\r\n    options = {};\r\n  }\r\n\r\n  // We don't handle blobs, so this just delegates:\r\n  return module.exports.basicURLParse(input, { baseURL: options.baseURL, encodingOverride: options.encodingOverride });\r\n};\r\n","\"use strict\";\nconst usm = require(\"./url-state-machine\");\n\nexports.implementation = class URLImpl {\n  constructor(constructorArgs) {\n    const url = constructorArgs[0];\n    const base = constructorArgs[1];\n\n    let parsedBase = null;\n    if (base !== undefined) {\n      parsedBase = usm.basicURLParse(base);\n      if (parsedBase === \"failure\") {\n        throw new TypeError(\"Invalid base URL\");\n      }\n    }\n\n    const parsedURL = usm.basicURLParse(url, { baseURL: parsedBase });\n    if (parsedURL === \"failure\") {\n      throw new TypeError(\"Invalid URL\");\n    }\n\n    this._url = parsedURL;\n\n    // TODO: query stuff\n  }\n\n  get href() {\n    return usm.serializeURL(this._url);\n  }\n\n  set href(v) {\n    const parsedURL = usm.basicURLParse(v);\n    if (parsedURL === \"failure\") {\n      throw new TypeError(\"Invalid URL\");\n    }\n\n    this._url = parsedURL;\n  }\n\n  get origin() {\n    return usm.serializeURLOrigin(this._url);\n  }\n\n  get protocol() {\n    return this._url.scheme + \":\";\n  }\n\n  set protocol(v) {\n    usm.basicURLParse(v + \":\", { url: this._url, stateOverride: \"scheme start\" });\n  }\n\n  get username() {\n    return this._url.username;\n  }\n\n  set username(v) {\n    if (usm.cannotHaveAUsernamePasswordPort(this._url)) {\n      return;\n    }\n\n    usm.setTheUsername(this._url, v);\n  }\n\n  get password() {\n    return this._url.password;\n  }\n\n  set password(v) {\n    if (usm.cannotHaveAUsernamePasswordPort(this._url)) {\n      return;\n    }\n\n    usm.setThePassword(this._url, v);\n  }\n\n  get host() {\n    const url = this._url;\n\n    if (url.host === null) {\n      return \"\";\n    }\n\n    if (url.port === null) {\n      return usm.serializeHost(url.host);\n    }\n\n    return usm.serializeHost(url.host) + \":\" + usm.serializeInteger(url.port);\n  }\n\n  set host(v) {\n    if (this._url.cannotBeABaseURL) {\n      return;\n    }\n\n    usm.basicURLParse(v, { url: this._url, stateOverride: \"host\" });\n  }\n\n  get hostname() {\n    if (this._url.host === null) {\n      return \"\";\n    }\n\n    return usm.serializeHost(this._url.host);\n  }\n\n  set hostname(v) {\n    if (this._url.cannotBeABaseURL) {\n      return;\n    }\n\n    usm.basicURLParse(v, { url: this._url, stateOverride: \"hostname\" });\n  }\n\n  get port() {\n    if (this._url.port === null) {\n      return \"\";\n    }\n\n    return usm.serializeInteger(this._url.port);\n  }\n\n  set port(v) {\n    if (usm.cannotHaveAUsernamePasswordPort(this._url)) {\n      return;\n    }\n\n    if (v === \"\") {\n      this._url.port = null;\n    } else {\n      usm.basicURLParse(v, { url: this._url, stateOverride: \"port\" });\n    }\n  }\n\n  get pathname() {\n    if (this._url.cannotBeABaseURL) {\n      return this._url.path[0];\n    }\n\n    if (this._url.path.length === 0) {\n      return \"\";\n    }\n\n    return \"/\" + this._url.path.join(\"/\");\n  }\n\n  set pathname(v) {\n    if (this._url.cannotBeABaseURL) {\n      return;\n    }\n\n    this._url.path = [];\n    usm.basicURLParse(v, { url: this._url, stateOverride: \"path start\" });\n  }\n\n  get search() {\n    if (this._url.query === null || this._url.query === \"\") {\n      return \"\";\n    }\n\n    return \"?\" + this._url.query;\n  }\n\n  set search(v) {\n    // TODO: query stuff\n\n    const url = this._url;\n\n    if (v === \"\") {\n      url.query = null;\n      return;\n    }\n\n    const input = v[0] === \"?\" ? v.substring(1) : v;\n    url.query = \"\";\n    usm.basicURLParse(input, { url, stateOverride: \"query\" });\n  }\n\n  get hash() {\n    if (this._url.fragment === null || this._url.fragment === \"\") {\n      return \"\";\n    }\n\n    return \"#\" + this._url.fragment;\n  }\n\n  set hash(v) {\n    if (v === \"\") {\n      this._url.fragment = null;\n      return;\n    }\n\n    const input = v[0] === \"#\" ? v.substring(1) : v;\n    this._url.fragment = \"\";\n    usm.basicURLParse(input, { url: this._url, stateOverride: \"fragment\" });\n  }\n\n  toJSON() {\n    return this.href;\n  }\n};\n","\"use strict\";\n\nconst conversions = require(\"webidl-conversions\");\nconst utils = require(\"./utils.js\");\nconst Impl = require(\".//URL-impl.js\");\n\nconst impl = utils.implSymbol;\n\nfunction URL(url) {\n  if (!this || this[impl] || !(this instanceof URL)) {\n    throw new TypeError(\"Failed to construct 'URL': Please use the 'new' operator, this DOM object constructor cannot be called as a function.\");\n  }\n  if (arguments.length < 1) {\n    throw new TypeError(\"Failed to construct 'URL': 1 argument required, but only \" + arguments.length + \" present.\");\n  }\n  const args = [];\n  for (let i = 0; i < arguments.length && i < 2; ++i) {\n    args[i] = arguments[i];\n  }\n  args[0] = conversions[\"USVString\"](args[0]);\n  if (args[1] !== undefined) {\n  args[1] = conversions[\"USVString\"](args[1]);\n  }\n\n  module.exports.setup(this, args);\n}\n\nURL.prototype.toJSON = function toJSON() {\n  if (!this || !module.exports.is(this)) {\n    throw new TypeError(\"Illegal invocation\");\n  }\n  const args = [];\n  for (let i = 0; i < arguments.length && i < 0; ++i) {\n    args[i] = arguments[i];\n  }\n  return this[impl].toJSON.apply(this[impl], args);\n};\nObject.defineProperty(URL.prototype, \"href\", {\n  get() {\n    return this[impl].href;\n  },\n  set(V) {\n    V = conversions[\"USVString\"](V);\n    this[impl].href = V;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nURL.prototype.toString = function () {\n  if (!this || !module.exports.is(this)) {\n    throw new TypeError(\"Illegal invocation\");\n  }\n  return this.href;\n};\n\nObject.defineProperty(URL.prototype, \"origin\", {\n  get() {\n    return this[impl].origin;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"protocol\", {\n  get() {\n    return this[impl].protocol;\n  },\n  set(V) {\n    V = conversions[\"USVString\"](V);\n    this[impl].protocol = V;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"username\", {\n  get() {\n    return this[impl].username;\n  },\n  set(V) {\n    V = conversions[\"USVString\"](V);\n    this[impl].username = V;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"password\", {\n  get() {\n    return this[impl].password;\n  },\n  set(V) {\n    V = conversions[\"USVString\"](V);\n    this[impl].password = V;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"host\", {\n  get() {\n    return this[impl].host;\n  },\n  set(V) {\n    V = conversions[\"USVString\"](V);\n    this[impl].host = V;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"hostname\", {\n  get() {\n    return this[impl].hostname;\n  },\n  set(V) {\n    V = conversions[\"USVString\"](V);\n    this[impl].hostname = V;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"port\", {\n  get() {\n    return this[impl].port;\n  },\n  set(V) {\n    V = conversions[\"USVString\"](V);\n    this[impl].port = V;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"pathname\", {\n  get() {\n    return this[impl].pathname;\n  },\n  set(V) {\n    V = conversions[\"USVString\"](V);\n    this[impl].pathname = V;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"search\", {\n  get() {\n    return this[impl].search;\n  },\n  set(V) {\n    V = conversions[\"USVString\"](V);\n    this[impl].search = V;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"hash\", {\n  get() {\n    return this[impl].hash;\n  },\n  set(V) {\n    V = conversions[\"USVString\"](V);\n    this[impl].hash = V;\n  },\n  enumerable: true,\n  configurable: true\n});\n\n\nmodule.exports = {\n  is(obj) {\n    return !!obj && obj[impl] instanceof Impl.implementation;\n  },\n  create(constructorArgs, privateData) {\n    let obj = Object.create(URL.prototype);\n    this.setup(obj, constructorArgs, privateData);\n    return obj;\n  },\n  setup(obj, constructorArgs, privateData) {\n    if (!privateData) privateData = {};\n    privateData.wrapper = obj;\n\n    obj[impl] = new Impl.implementation(constructorArgs, privateData);\n    obj[impl][utils.wrapperSymbol] = obj;\n  },\n  interface: URL,\n  expose: {\n    Window: { URL: URL },\n    Worker: { URL: URL }\n  }\n};\n\n","\"use strict\";\n\nexports.URL = require(\"./URL\").interface;\nexports.serializeURL = require(\"./url-state-machine\").serializeURL;\nexports.serializeURLOrigin = require(\"./url-state-machine\").serializeURLOrigin;\nexports.basicURLParse = require(\"./url-state-machine\").basicURLParse;\nexports.setTheUsername = require(\"./url-state-machine\").setTheUsername;\nexports.setThePassword = require(\"./url-state-machine\").setThePassword;\nexports.serializeHost = require(\"./url-state-machine\").serializeHost;\nexports.serializeInteger = require(\"./url-state-machine\").serializeInteger;\nexports.parseURL = require(\"./url-state-machine\").parseURL;\n","import Stream from 'stream';\nimport http from 'http';\nimport Url from 'url';\nimport whatwgUrl from 'whatwg-url';\nimport https from 'https';\nimport zlib from 'zlib';\n\n// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js\n\n// fix for \"Readable\" isn't a named export issue\nconst Readable = Stream.Readable;\n\nconst BUFFER = Symbol('buffer');\nconst TYPE = Symbol('type');\n\nclass Blob {\n\tconstructor() {\n\t\tthis[TYPE] = '';\n\n\t\tconst blobParts = arguments[0];\n\t\tconst options = arguments[1];\n\n\t\tconst buffers = [];\n\t\tlet size = 0;\n\n\t\tif (blobParts) {\n\t\t\tconst a = blobParts;\n\t\t\tconst length = Number(a.length);\n\t\t\tfor (let i = 0; i < length; i++) {\n\t\t\t\tconst element = a[i];\n\t\t\t\tlet buffer;\n\t\t\t\tif (element instanceof Buffer) {\n\t\t\t\t\tbuffer = element;\n\t\t\t\t} else if (ArrayBuffer.isView(element)) {\n\t\t\t\t\tbuffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength);\n\t\t\t\t} else if (element instanceof ArrayBuffer) {\n\t\t\t\t\tbuffer = Buffer.from(element);\n\t\t\t\t} else if (element instanceof Blob) {\n\t\t\t\t\tbuffer = element[BUFFER];\n\t\t\t\t} else {\n\t\t\t\t\tbuffer = Buffer.from(typeof element === 'string' ? element : String(element));\n\t\t\t\t}\n\t\t\t\tsize += buffer.length;\n\t\t\t\tbuffers.push(buffer);\n\t\t\t}\n\t\t}\n\n\t\tthis[BUFFER] = Buffer.concat(buffers);\n\n\t\tlet type = options && options.type !== undefined && String(options.type).toLowerCase();\n\t\tif (type && !/[^\\u0020-\\u007E]/.test(type)) {\n\t\t\tthis[TYPE] = type;\n\t\t}\n\t}\n\tget size() {\n\t\treturn this[BUFFER].length;\n\t}\n\tget type() {\n\t\treturn this[TYPE];\n\t}\n\ttext() {\n\t\treturn Promise.resolve(this[BUFFER].toString());\n\t}\n\tarrayBuffer() {\n\t\tconst buf = this[BUFFER];\n\t\tconst ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);\n\t\treturn Promise.resolve(ab);\n\t}\n\tstream() {\n\t\tconst readable = new Readable();\n\t\treadable._read = function () {};\n\t\treadable.push(this[BUFFER]);\n\t\treadable.push(null);\n\t\treturn readable;\n\t}\n\ttoString() {\n\t\treturn '[object Blob]';\n\t}\n\tslice() {\n\t\tconst size = this.size;\n\n\t\tconst start = arguments[0];\n\t\tconst end = arguments[1];\n\t\tlet relativeStart, relativeEnd;\n\t\tif (start === undefined) {\n\t\t\trelativeStart = 0;\n\t\t} else if (start < 0) {\n\t\t\trelativeStart = Math.max(size + start, 0);\n\t\t} else {\n\t\t\trelativeStart = Math.min(start, size);\n\t\t}\n\t\tif (end === undefined) {\n\t\t\trelativeEnd = size;\n\t\t} else if (end < 0) {\n\t\t\trelativeEnd = Math.max(size + end, 0);\n\t\t} else {\n\t\t\trelativeEnd = Math.min(end, size);\n\t\t}\n\t\tconst span = Math.max(relativeEnd - relativeStart, 0);\n\n\t\tconst buffer = this[BUFFER];\n\t\tconst slicedBuffer = buffer.slice(relativeStart, relativeStart + span);\n\t\tconst blob = new Blob([], { type: arguments[2] });\n\t\tblob[BUFFER] = slicedBuffer;\n\t\treturn blob;\n\t}\n}\n\nObject.defineProperties(Blob.prototype, {\n\tsize: { enumerable: true },\n\ttype: { enumerable: true },\n\tslice: { enumerable: true }\n});\n\nObject.defineProperty(Blob.prototype, Symbol.toStringTag, {\n\tvalue: 'Blob',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\n/**\n * fetch-error.js\n *\n * FetchError interface for operational errors\n */\n\n/**\n * Create FetchError instance\n *\n * @param   String      message      Error message for human\n * @param   String      type         Error type for machine\n * @param   String      systemError  For Node.js system error\n * @return  FetchError\n */\nfunction FetchError(message, type, systemError) {\n  Error.call(this, message);\n\n  this.message = message;\n  this.type = type;\n\n  // when err.type is `system`, err.code contains system error code\n  if (systemError) {\n    this.code = this.errno = systemError.code;\n  }\n\n  // hide custom error implementation details from end-users\n  Error.captureStackTrace(this, this.constructor);\n}\n\nFetchError.prototype = Object.create(Error.prototype);\nFetchError.prototype.constructor = FetchError;\nFetchError.prototype.name = 'FetchError';\n\nlet convert;\ntry {\n\tconvert = require('encoding').convert;\n} catch (e) {}\n\nconst INTERNALS = Symbol('Body internals');\n\n// fix an issue where \"PassThrough\" isn't a named export for node <10\nconst PassThrough = Stream.PassThrough;\n\n/**\n * Body mixin\n *\n * Ref: https://fetch.spec.whatwg.org/#body\n *\n * @param   Stream  body  Readable stream\n * @param   Object  opts  Response options\n * @return  Void\n */\nfunction Body(body) {\n\tvar _this = this;\n\n\tvar _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n\t    _ref$size = _ref.size;\n\n\tlet size = _ref$size === undefined ? 0 : _ref$size;\n\tvar _ref$timeout = _ref.timeout;\n\tlet timeout = _ref$timeout === undefined ? 0 : _ref$timeout;\n\n\tif (body == null) {\n\t\t// body is undefined or null\n\t\tbody = null;\n\t} else if (isURLSearchParams(body)) {\n\t\t// body is a URLSearchParams\n\t\tbody = Buffer.from(body.toString());\n\t} else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') {\n\t\t// body is ArrayBuffer\n\t\tbody = Buffer.from(body);\n\t} else if (ArrayBuffer.isView(body)) {\n\t\t// body is ArrayBufferView\n\t\tbody = Buffer.from(body.buffer, body.byteOffset, body.byteLength);\n\t} else if (body instanceof Stream) ; else {\n\t\t// none of the above\n\t\t// coerce to string then buffer\n\t\tbody = Buffer.from(String(body));\n\t}\n\tthis[INTERNALS] = {\n\t\tbody,\n\t\tdisturbed: false,\n\t\terror: null\n\t};\n\tthis.size = size;\n\tthis.timeout = timeout;\n\n\tif (body instanceof Stream) {\n\t\tbody.on('error', function (err) {\n\t\t\tconst error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err);\n\t\t\t_this[INTERNALS].error = error;\n\t\t});\n\t}\n}\n\nBody.prototype = {\n\tget body() {\n\t\treturn this[INTERNALS].body;\n\t},\n\n\tget bodyUsed() {\n\t\treturn this[INTERNALS].disturbed;\n\t},\n\n\t/**\n  * Decode response as ArrayBuffer\n  *\n  * @return  Promise\n  */\n\tarrayBuffer() {\n\t\treturn consumeBody.call(this).then(function (buf) {\n\t\t\treturn buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);\n\t\t});\n\t},\n\n\t/**\n  * Return raw response as Blob\n  *\n  * @return Promise\n  */\n\tblob() {\n\t\tlet ct = this.headers && this.headers.get('content-type') || '';\n\t\treturn consumeBody.call(this).then(function (buf) {\n\t\t\treturn Object.assign(\n\t\t\t// Prevent copying\n\t\t\tnew Blob([], {\n\t\t\t\ttype: ct.toLowerCase()\n\t\t\t}), {\n\t\t\t\t[BUFFER]: buf\n\t\t\t});\n\t\t});\n\t},\n\n\t/**\n  * Decode response as json\n  *\n  * @return  Promise\n  */\n\tjson() {\n\t\tvar _this2 = this;\n\n\t\treturn consumeBody.call(this).then(function (buffer) {\n\t\t\ttry {\n\t\t\t\treturn JSON.parse(buffer.toString());\n\t\t\t} catch (err) {\n\t\t\t\treturn Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json'));\n\t\t\t}\n\t\t});\n\t},\n\n\t/**\n  * Decode response as text\n  *\n  * @return  Promise\n  */\n\ttext() {\n\t\treturn consumeBody.call(this).then(function (buffer) {\n\t\t\treturn buffer.toString();\n\t\t});\n\t},\n\n\t/**\n  * Decode response as buffer (non-spec api)\n  *\n  * @return  Promise\n  */\n\tbuffer() {\n\t\treturn consumeBody.call(this);\n\t},\n\n\t/**\n  * Decode response as text, while automatically detecting the encoding and\n  * trying to decode to UTF-8 (non-spec api)\n  *\n  * @return  Promise\n  */\n\ttextConverted() {\n\t\tvar _this3 = this;\n\n\t\treturn consumeBody.call(this).then(function (buffer) {\n\t\t\treturn convertBody(buffer, _this3.headers);\n\t\t});\n\t}\n};\n\n// In browsers, all properties are enumerable.\nObject.defineProperties(Body.prototype, {\n\tbody: { enumerable: true },\n\tbodyUsed: { enumerable: true },\n\tarrayBuffer: { enumerable: true },\n\tblob: { enumerable: true },\n\tjson: { enumerable: true },\n\ttext: { enumerable: true }\n});\n\nBody.mixIn = function (proto) {\n\tfor (const name of Object.getOwnPropertyNames(Body.prototype)) {\n\t\t// istanbul ignore else: future proof\n\t\tif (!(name in proto)) {\n\t\t\tconst desc = Object.getOwnPropertyDescriptor(Body.prototype, name);\n\t\t\tObject.defineProperty(proto, name, desc);\n\t\t}\n\t}\n};\n\n/**\n * Consume and convert an entire Body to a Buffer.\n *\n * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body\n *\n * @return  Promise\n */\nfunction consumeBody() {\n\tvar _this4 = this;\n\n\tif (this[INTERNALS].disturbed) {\n\t\treturn Body.Promise.reject(new TypeError(`body used already for: ${this.url}`));\n\t}\n\n\tthis[INTERNALS].disturbed = true;\n\n\tif (this[INTERNALS].error) {\n\t\treturn Body.Promise.reject(this[INTERNALS].error);\n\t}\n\n\tlet body = this.body;\n\n\t// body is null\n\tif (body === null) {\n\t\treturn Body.Promise.resolve(Buffer.alloc(0));\n\t}\n\n\t// body is blob\n\tif (isBlob(body)) {\n\t\tbody = body.stream();\n\t}\n\n\t// body is buffer\n\tif (Buffer.isBuffer(body)) {\n\t\treturn Body.Promise.resolve(body);\n\t}\n\n\t// istanbul ignore if: should never happen\n\tif (!(body instanceof Stream)) {\n\t\treturn Body.Promise.resolve(Buffer.alloc(0));\n\t}\n\n\t// body is stream\n\t// get ready to actually consume the body\n\tlet accum = [];\n\tlet accumBytes = 0;\n\tlet abort = false;\n\n\treturn new Body.Promise(function (resolve, reject) {\n\t\tlet resTimeout;\n\n\t\t// allow timeout on slow response body\n\t\tif (_this4.timeout) {\n\t\t\tresTimeout = setTimeout(function () {\n\t\t\t\tabort = true;\n\t\t\t\treject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout'));\n\t\t\t}, _this4.timeout);\n\t\t}\n\n\t\t// handle stream errors\n\t\tbody.on('error', function (err) {\n\t\t\tif (err.name === 'AbortError') {\n\t\t\t\t// if the request was aborted, reject with this Error\n\t\t\t\tabort = true;\n\t\t\t\treject(err);\n\t\t\t} else {\n\t\t\t\t// other errors, such as incorrect content-encoding\n\t\t\t\treject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err));\n\t\t\t}\n\t\t});\n\n\t\tbody.on('data', function (chunk) {\n\t\t\tif (abort || chunk === null) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (_this4.size && accumBytes + chunk.length > _this4.size) {\n\t\t\t\tabort = true;\n\t\t\t\treject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size'));\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\taccumBytes += chunk.length;\n\t\t\taccum.push(chunk);\n\t\t});\n\n\t\tbody.on('end', function () {\n\t\t\tif (abort) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tclearTimeout(resTimeout);\n\n\t\t\ttry {\n\t\t\t\tresolve(Buffer.concat(accum, accumBytes));\n\t\t\t} catch (err) {\n\t\t\t\t// handle streams that have accumulated too much data (issue #414)\n\t\t\t\treject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err));\n\t\t\t}\n\t\t});\n\t});\n}\n\n/**\n * Detect buffer encoding and convert to target encoding\n * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding\n *\n * @param   Buffer  buffer    Incoming buffer\n * @param   String  encoding  Target encoding\n * @return  String\n */\nfunction convertBody(buffer, headers) {\n\tif (typeof convert !== 'function') {\n\t\tthrow new Error('The package `encoding` must be installed to use the textConverted() function');\n\t}\n\n\tconst ct = headers.get('content-type');\n\tlet charset = 'utf-8';\n\tlet res, str;\n\n\t// header\n\tif (ct) {\n\t\tres = /charset=([^;]*)/i.exec(ct);\n\t}\n\n\t// no charset in content type, peek at response body for at most 1024 bytes\n\tstr = buffer.slice(0, 1024).toString();\n\n\t// html5\n\tif (!res && str) {\n\t\tres = /<meta.+?charset=(['\"])(.+?)\\1/i.exec(str);\n\t}\n\n\t// html4\n\tif (!res && str) {\n\t\tres = /<meta[\\s]+?http-equiv=(['\"])content-type\\1[\\s]+?content=(['\"])(.+?)\\2/i.exec(str);\n\t\tif (!res) {\n\t\t\tres = /<meta[\\s]+?content=(['\"])(.+?)\\1[\\s]+?http-equiv=(['\"])content-type\\3/i.exec(str);\n\t\t\tif (res) {\n\t\t\t\tres.pop(); // drop last quote\n\t\t\t}\n\t\t}\n\n\t\tif (res) {\n\t\t\tres = /charset=(.*)/i.exec(res.pop());\n\t\t}\n\t}\n\n\t// xml\n\tif (!res && str) {\n\t\tres = /<\\?xml.+?encoding=(['\"])(.+?)\\1/i.exec(str);\n\t}\n\n\t// found charset\n\tif (res) {\n\t\tcharset = res.pop();\n\n\t\t// prevent decode issues when sites use incorrect encoding\n\t\t// ref: https://hsivonen.fi/encoding-menu/\n\t\tif (charset === 'gb2312' || charset === 'gbk') {\n\t\t\tcharset = 'gb18030';\n\t\t}\n\t}\n\n\t// turn raw buffers into a single utf-8 buffer\n\treturn convert(buffer, 'UTF-8', charset).toString();\n}\n\n/**\n * Detect a URLSearchParams object\n * ref: https://github.com/bitinn/node-fetch/issues/296#issuecomment-307598143\n *\n * @param   Object  obj     Object to detect by type or brand\n * @return  String\n */\nfunction isURLSearchParams(obj) {\n\t// Duck-typing as a necessary condition.\n\tif (typeof obj !== 'object' || typeof obj.append !== 'function' || typeof obj.delete !== 'function' || typeof obj.get !== 'function' || typeof obj.getAll !== 'function' || typeof obj.has !== 'function' || typeof obj.set !== 'function') {\n\t\treturn false;\n\t}\n\n\t// Brand-checking and more duck-typing as optional condition.\n\treturn obj.constructor.name === 'URLSearchParams' || Object.prototype.toString.call(obj) === '[object URLSearchParams]' || typeof obj.sort === 'function';\n}\n\n/**\n * Check if `obj` is a W3C `Blob` object (which `File` inherits from)\n * @param  {*} obj\n * @return {boolean}\n */\nfunction isBlob(obj) {\n\treturn typeof obj === 'object' && typeof obj.arrayBuffer === 'function' && typeof obj.type === 'string' && typeof obj.stream === 'function' && typeof obj.constructor === 'function' && typeof obj.constructor.name === 'string' && /^(Blob|File)$/.test(obj.constructor.name) && /^(Blob|File)$/.test(obj[Symbol.toStringTag]);\n}\n\n/**\n * Clone body given Res/Req instance\n *\n * @param   Mixed  instance  Response or Request instance\n * @return  Mixed\n */\nfunction clone(instance) {\n\tlet p1, p2;\n\tlet body = instance.body;\n\n\t// don't allow cloning a used body\n\tif (instance.bodyUsed) {\n\t\tthrow new Error('cannot clone body after it is used');\n\t}\n\n\t// check that body is a stream and not form-data object\n\t// note: we can't clone the form-data object without having it as a dependency\n\tif (body instanceof Stream && typeof body.getBoundary !== 'function') {\n\t\t// tee instance body\n\t\tp1 = new PassThrough();\n\t\tp2 = new PassThrough();\n\t\tbody.pipe(p1);\n\t\tbody.pipe(p2);\n\t\t// set instance body to teed body and return the other teed body\n\t\tinstance[INTERNALS].body = p1;\n\t\tbody = p2;\n\t}\n\n\treturn body;\n}\n\n/**\n * Performs the operation \"extract a `Content-Type` value from |object|\" as\n * specified in the specification:\n * https://fetch.spec.whatwg.org/#concept-bodyinit-extract\n *\n * This function assumes that instance.body is present.\n *\n * @param   Mixed  instance  Any options.body input\n */\nfunction extractContentType(body) {\n\tif (body === null) {\n\t\t// body is null\n\t\treturn null;\n\t} else if (typeof body === 'string') {\n\t\t// body is string\n\t\treturn 'text/plain;charset=UTF-8';\n\t} else if (isURLSearchParams(body)) {\n\t\t// body is a URLSearchParams\n\t\treturn 'application/x-www-form-urlencoded;charset=UTF-8';\n\t} else if (isBlob(body)) {\n\t\t// body is blob\n\t\treturn body.type || null;\n\t} else if (Buffer.isBuffer(body)) {\n\t\t// body is buffer\n\t\treturn null;\n\t} else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') {\n\t\t// body is ArrayBuffer\n\t\treturn null;\n\t} else if (ArrayBuffer.isView(body)) {\n\t\t// body is ArrayBufferView\n\t\treturn null;\n\t} else if (typeof body.getBoundary === 'function') {\n\t\t// detect form data input from form-data module\n\t\treturn `multipart/form-data;boundary=${body.getBoundary()}`;\n\t} else if (body instanceof Stream) {\n\t\t// body is stream\n\t\t// can't really do much about this\n\t\treturn null;\n\t} else {\n\t\t// Body constructor defaults other things to string\n\t\treturn 'text/plain;charset=UTF-8';\n\t}\n}\n\n/**\n * The Fetch Standard treats this as if \"total bytes\" is a property on the body.\n * For us, we have to explicitly get it with a function.\n *\n * ref: https://fetch.spec.whatwg.org/#concept-body-total-bytes\n *\n * @param   Body    instance   Instance of Body\n * @return  Number?            Number of bytes, or null if not possible\n */\nfunction getTotalBytes(instance) {\n\tconst body = instance.body;\n\n\n\tif (body === null) {\n\t\t// body is null\n\t\treturn 0;\n\t} else if (isBlob(body)) {\n\t\treturn body.size;\n\t} else if (Buffer.isBuffer(body)) {\n\t\t// body is buffer\n\t\treturn body.length;\n\t} else if (body && typeof body.getLengthSync === 'function') {\n\t\t// detect form data input from form-data module\n\t\tif (body._lengthRetrievers && body._lengthRetrievers.length == 0 || // 1.x\n\t\tbody.hasKnownLength && body.hasKnownLength()) {\n\t\t\t// 2.x\n\t\t\treturn body.getLengthSync();\n\t\t}\n\t\treturn null;\n\t} else {\n\t\t// body is stream\n\t\treturn null;\n\t}\n}\n\n/**\n * Write a Body to a Node.js WritableStream (e.g. http.Request) object.\n *\n * @param   Body    instance   Instance of Body\n * @return  Void\n */\nfunction writeToStream(dest, instance) {\n\tconst body = instance.body;\n\n\n\tif (body === null) {\n\t\t// body is null\n\t\tdest.end();\n\t} else if (isBlob(body)) {\n\t\tbody.stream().pipe(dest);\n\t} else if (Buffer.isBuffer(body)) {\n\t\t// body is buffer\n\t\tdest.write(body);\n\t\tdest.end();\n\t} else {\n\t\t// body is stream\n\t\tbody.pipe(dest);\n\t}\n}\n\n// expose Promise\nBody.Promise = global.Promise;\n\n/**\n * headers.js\n *\n * Headers class offers convenient helpers\n */\n\nconst invalidTokenRegex = /[^\\^_`a-zA-Z\\-0-9!#$%&'*+.|~]/;\nconst invalidHeaderCharRegex = /[^\\t\\x20-\\x7e\\x80-\\xff]/;\n\nfunction validateName(name) {\n\tname = `${name}`;\n\tif (invalidTokenRegex.test(name) || name === '') {\n\t\tthrow new TypeError(`${name} is not a legal HTTP header name`);\n\t}\n}\n\nfunction validateValue(value) {\n\tvalue = `${value}`;\n\tif (invalidHeaderCharRegex.test(value)) {\n\t\tthrow new TypeError(`${value} is not a legal HTTP header value`);\n\t}\n}\n\n/**\n * Find the key in the map object given a header name.\n *\n * Returns undefined if not found.\n *\n * @param   String  name  Header name\n * @return  String|Undefined\n */\nfunction find(map, name) {\n\tname = name.toLowerCase();\n\tfor (const key in map) {\n\t\tif (key.toLowerCase() === name) {\n\t\t\treturn key;\n\t\t}\n\t}\n\treturn undefined;\n}\n\nconst MAP = Symbol('map');\nclass Headers {\n\t/**\n  * Headers class\n  *\n  * @param   Object  headers  Response headers\n  * @return  Void\n  */\n\tconstructor() {\n\t\tlet init = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n\n\t\tthis[MAP] = Object.create(null);\n\n\t\tif (init instanceof Headers) {\n\t\t\tconst rawHeaders = init.raw();\n\t\t\tconst headerNames = Object.keys(rawHeaders);\n\n\t\t\tfor (const headerName of headerNames) {\n\t\t\t\tfor (const value of rawHeaders[headerName]) {\n\t\t\t\t\tthis.append(headerName, value);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\t// We don't worry about converting prop to ByteString here as append()\n\t\t// will handle it.\n\t\tif (init == null) ; else if (typeof init === 'object') {\n\t\t\tconst method = init[Symbol.iterator];\n\t\t\tif (method != null) {\n\t\t\t\tif (typeof method !== 'function') {\n\t\t\t\t\tthrow new TypeError('Header pairs must be iterable');\n\t\t\t\t}\n\n\t\t\t\t// sequence<sequence<ByteString>>\n\t\t\t\t// Note: per spec we have to first exhaust the lists then process them\n\t\t\t\tconst pairs = [];\n\t\t\t\tfor (const pair of init) {\n\t\t\t\t\tif (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') {\n\t\t\t\t\t\tthrow new TypeError('Each header pair must be iterable');\n\t\t\t\t\t}\n\t\t\t\t\tpairs.push(Array.from(pair));\n\t\t\t\t}\n\n\t\t\t\tfor (const pair of pairs) {\n\t\t\t\t\tif (pair.length !== 2) {\n\t\t\t\t\t\tthrow new TypeError('Each header pair must be a name/value tuple');\n\t\t\t\t\t}\n\t\t\t\t\tthis.append(pair[0], pair[1]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// record<ByteString, ByteString>\n\t\t\t\tfor (const key of Object.keys(init)) {\n\t\t\t\t\tconst value = init[key];\n\t\t\t\t\tthis.append(key, value);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new TypeError('Provided initializer must be an object');\n\t\t}\n\t}\n\n\t/**\n  * Return combined header value given name\n  *\n  * @param   String  name  Header name\n  * @return  Mixed\n  */\n\tget(name) {\n\t\tname = `${name}`;\n\t\tvalidateName(name);\n\t\tconst key = find(this[MAP], name);\n\t\tif (key === undefined) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn this[MAP][key].join(', ');\n\t}\n\n\t/**\n  * Iterate over all headers\n  *\n  * @param   Function  callback  Executed for each item with parameters (value, name, thisArg)\n  * @param   Boolean   thisArg   `this` context for callback function\n  * @return  Void\n  */\n\tforEach(callback) {\n\t\tlet thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;\n\n\t\tlet pairs = getHeaders(this);\n\t\tlet i = 0;\n\t\twhile (i < pairs.length) {\n\t\t\tvar _pairs$i = pairs[i];\n\t\t\tconst name = _pairs$i[0],\n\t\t\t      value = _pairs$i[1];\n\n\t\t\tcallback.call(thisArg, value, name, this);\n\t\t\tpairs = getHeaders(this);\n\t\t\ti++;\n\t\t}\n\t}\n\n\t/**\n  * Overwrite header values given name\n  *\n  * @param   String  name   Header name\n  * @param   String  value  Header value\n  * @return  Void\n  */\n\tset(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tthis[MAP][key !== undefined ? key : name] = [value];\n\t}\n\n\t/**\n  * Append a value onto existing header\n  *\n  * @param   String  name   Header name\n  * @param   String  value  Header value\n  * @return  Void\n  */\n\tappend(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tif (key !== undefined) {\n\t\t\tthis[MAP][key].push(value);\n\t\t} else {\n\t\t\tthis[MAP][name] = [value];\n\t\t}\n\t}\n\n\t/**\n  * Check for header name existence\n  *\n  * @param   String   name  Header name\n  * @return  Boolean\n  */\n\thas(name) {\n\t\tname = `${name}`;\n\t\tvalidateName(name);\n\t\treturn find(this[MAP], name) !== undefined;\n\t}\n\n\t/**\n  * Delete all header values given name\n  *\n  * @param   String  name  Header name\n  * @return  Void\n  */\n\tdelete(name) {\n\t\tname = `${name}`;\n\t\tvalidateName(name);\n\t\tconst key = find(this[MAP], name);\n\t\tif (key !== undefined) {\n\t\t\tdelete this[MAP][key];\n\t\t}\n\t}\n\n\t/**\n  * Return raw headers (non-spec api)\n  *\n  * @return  Object\n  */\n\traw() {\n\t\treturn this[MAP];\n\t}\n\n\t/**\n  * Get an iterator on keys.\n  *\n  * @return  Iterator\n  */\n\tkeys() {\n\t\treturn createHeadersIterator(this, 'key');\n\t}\n\n\t/**\n  * Get an iterator on values.\n  *\n  * @return  Iterator\n  */\n\tvalues() {\n\t\treturn createHeadersIterator(this, 'value');\n\t}\n\n\t/**\n  * Get an iterator on entries.\n  *\n  * This is the default iterator of the Headers object.\n  *\n  * @return  Iterator\n  */\n\t[Symbol.iterator]() {\n\t\treturn createHeadersIterator(this, 'key+value');\n\t}\n}\nHeaders.prototype.entries = Headers.prototype[Symbol.iterator];\n\nObject.defineProperty(Headers.prototype, Symbol.toStringTag, {\n\tvalue: 'Headers',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\nObject.defineProperties(Headers.prototype, {\n\tget: { enumerable: true },\n\tforEach: { enumerable: true },\n\tset: { enumerable: true },\n\tappend: { enumerable: true },\n\thas: { enumerable: true },\n\tdelete: { enumerable: true },\n\tkeys: { enumerable: true },\n\tvalues: { enumerable: true },\n\tentries: { enumerable: true }\n});\n\nfunction getHeaders(headers) {\n\tlet kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value';\n\n\tconst keys = Object.keys(headers[MAP]).sort();\n\treturn keys.map(kind === 'key' ? function (k) {\n\t\treturn k.toLowerCase();\n\t} : kind === 'value' ? function (k) {\n\t\treturn headers[MAP][k].join(', ');\n\t} : function (k) {\n\t\treturn [k.toLowerCase(), headers[MAP][k].join(', ')];\n\t});\n}\n\nconst INTERNAL = Symbol('internal');\n\nfunction createHeadersIterator(target, kind) {\n\tconst iterator = Object.create(HeadersIteratorPrototype);\n\titerator[INTERNAL] = {\n\t\ttarget,\n\t\tkind,\n\t\tindex: 0\n\t};\n\treturn iterator;\n}\n\nconst HeadersIteratorPrototype = Object.setPrototypeOf({\n\tnext() {\n\t\t// istanbul ignore if\n\t\tif (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) {\n\t\t\tthrow new TypeError('Value of `this` is not a HeadersIterator');\n\t\t}\n\n\t\tvar _INTERNAL = this[INTERNAL];\n\t\tconst target = _INTERNAL.target,\n\t\t      kind = _INTERNAL.kind,\n\t\t      index = _INTERNAL.index;\n\n\t\tconst values = getHeaders(target, kind);\n\t\tconst len = values.length;\n\t\tif (index >= len) {\n\t\t\treturn {\n\t\t\t\tvalue: undefined,\n\t\t\t\tdone: true\n\t\t\t};\n\t\t}\n\n\t\tthis[INTERNAL].index = index + 1;\n\n\t\treturn {\n\t\t\tvalue: values[index],\n\t\t\tdone: false\n\t\t};\n\t}\n}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));\n\nObject.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, {\n\tvalue: 'HeadersIterator',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\n/**\n * Export the Headers object in a form that Node.js can consume.\n *\n * @param   Headers  headers\n * @return  Object\n */\nfunction exportNodeCompatibleHeaders(headers) {\n\tconst obj = Object.assign({ __proto__: null }, headers[MAP]);\n\n\t// http.request() only supports string as Host header. This hack makes\n\t// specifying custom Host header possible.\n\tconst hostHeaderKey = find(headers[MAP], 'Host');\n\tif (hostHeaderKey !== undefined) {\n\t\tobj[hostHeaderKey] = obj[hostHeaderKey][0];\n\t}\n\n\treturn obj;\n}\n\n/**\n * Create a Headers object from an object of headers, ignoring those that do\n * not conform to HTTP grammar productions.\n *\n * @param   Object  obj  Object of headers\n * @return  Headers\n */\nfunction createHeadersLenient(obj) {\n\tconst headers = new Headers();\n\tfor (const name of Object.keys(obj)) {\n\t\tif (invalidTokenRegex.test(name)) {\n\t\t\tcontinue;\n\t\t}\n\t\tif (Array.isArray(obj[name])) {\n\t\t\tfor (const val of obj[name]) {\n\t\t\t\tif (invalidHeaderCharRegex.test(val)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (headers[MAP][name] === undefined) {\n\t\t\t\t\theaders[MAP][name] = [val];\n\t\t\t\t} else {\n\t\t\t\t\theaders[MAP][name].push(val);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (!invalidHeaderCharRegex.test(obj[name])) {\n\t\t\theaders[MAP][name] = [obj[name]];\n\t\t}\n\t}\n\treturn headers;\n}\n\nconst INTERNALS$1 = Symbol('Response internals');\n\n// fix an issue where \"STATUS_CODES\" aren't a named export for node <10\nconst STATUS_CODES = http.STATUS_CODES;\n\n/**\n * Response class\n *\n * @param   Stream  body  Readable stream\n * @param   Object  opts  Response options\n * @return  Void\n */\nclass Response {\n\tconstructor() {\n\t\tlet body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n\t\tlet opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\t\tBody.call(this, body, opts);\n\n\t\tconst status = opts.status || 200;\n\t\tconst headers = new Headers(opts.headers);\n\n\t\tif (body != null && !headers.has('Content-Type')) {\n\t\t\tconst contentType = extractContentType(body);\n\t\t\tif (contentType) {\n\t\t\t\theaders.append('Content-Type', contentType);\n\t\t\t}\n\t\t}\n\n\t\tthis[INTERNALS$1] = {\n\t\t\turl: opts.url,\n\t\t\tstatus,\n\t\t\tstatusText: opts.statusText || STATUS_CODES[status],\n\t\t\theaders,\n\t\t\tcounter: opts.counter\n\t\t};\n\t}\n\n\tget url() {\n\t\treturn this[INTERNALS$1].url || '';\n\t}\n\n\tget status() {\n\t\treturn this[INTERNALS$1].status;\n\t}\n\n\t/**\n  * Convenience property representing if the request ended normally\n  */\n\tget ok() {\n\t\treturn this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300;\n\t}\n\n\tget redirected() {\n\t\treturn this[INTERNALS$1].counter > 0;\n\t}\n\n\tget statusText() {\n\t\treturn this[INTERNALS$1].statusText;\n\t}\n\n\tget headers() {\n\t\treturn this[INTERNALS$1].headers;\n\t}\n\n\t/**\n  * Clone this response\n  *\n  * @return  Response\n  */\n\tclone() {\n\t\treturn new Response(clone(this), {\n\t\t\turl: this.url,\n\t\t\tstatus: this.status,\n\t\t\tstatusText: this.statusText,\n\t\t\theaders: this.headers,\n\t\t\tok: this.ok,\n\t\t\tredirected: this.redirected\n\t\t});\n\t}\n}\n\nBody.mixIn(Response.prototype);\n\nObject.defineProperties(Response.prototype, {\n\turl: { enumerable: true },\n\tstatus: { enumerable: true },\n\tok: { enumerable: true },\n\tredirected: { enumerable: true },\n\tstatusText: { enumerable: true },\n\theaders: { enumerable: true },\n\tclone: { enumerable: true }\n});\n\nObject.defineProperty(Response.prototype, Symbol.toStringTag, {\n\tvalue: 'Response',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\nconst INTERNALS$2 = Symbol('Request internals');\nconst URL = Url.URL || whatwgUrl.URL;\n\n// fix an issue where \"format\", \"parse\" aren't a named export for node <10\nconst parse_url = Url.parse;\nconst format_url = Url.format;\n\n/**\n * Wrapper around `new URL` to handle arbitrary URLs\n *\n * @param  {string} urlStr\n * @return {void}\n */\nfunction parseURL(urlStr) {\n\t/*\n \tCheck whether the URL is absolute or not\n \t\tScheme: https://tools.ietf.org/html/rfc3986#section-3.1\n \tAbsolute URL: https://tools.ietf.org/html/rfc3986#section-4.3\n */\n\tif (/^[a-zA-Z][a-zA-Z\\d+\\-.]*:/.exec(urlStr)) {\n\t\turlStr = new URL(urlStr).toString();\n\t}\n\n\t// Fallback to old implementation for arbitrary URLs\n\treturn parse_url(urlStr);\n}\n\nconst streamDestructionSupported = 'destroy' in Stream.Readable.prototype;\n\n/**\n * Check if a value is an instance of Request.\n *\n * @param   Mixed   input\n * @return  Boolean\n */\nfunction isRequest(input) {\n\treturn typeof input === 'object' && typeof input[INTERNALS$2] === 'object';\n}\n\nfunction isAbortSignal(signal) {\n\tconst proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal);\n\treturn !!(proto && proto.constructor.name === 'AbortSignal');\n}\n\n/**\n * Request class\n *\n * @param   Mixed   input  Url or Request instance\n * @param   Object  init   Custom options\n * @return  Void\n */\nclass Request {\n\tconstructor(input) {\n\t\tlet init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\t\tlet parsedURL;\n\n\t\t// normalize input\n\t\tif (!isRequest(input)) {\n\t\t\tif (input && input.href) {\n\t\t\t\t// in order to support Node.js' Url objects; though WHATWG's URL objects\n\t\t\t\t// will fall into this branch also (since their `toString()` will return\n\t\t\t\t// `href` property anyway)\n\t\t\t\tparsedURL = parseURL(input.href);\n\t\t\t} else {\n\t\t\t\t// coerce input to a string before attempting to parse\n\t\t\t\tparsedURL = parseURL(`${input}`);\n\t\t\t}\n\t\t\tinput = {};\n\t\t} else {\n\t\t\tparsedURL = parseURL(input.url);\n\t\t}\n\n\t\tlet method = init.method || input.method || 'GET';\n\t\tmethod = method.toUpperCase();\n\n\t\tif ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) {\n\t\t\tthrow new TypeError('Request with GET/HEAD method cannot have body');\n\t\t}\n\n\t\tlet inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null;\n\n\t\tBody.call(this, inputBody, {\n\t\t\ttimeout: init.timeout || input.timeout || 0,\n\t\t\tsize: init.size || input.size || 0\n\t\t});\n\n\t\tconst headers = new Headers(init.headers || input.headers || {});\n\n\t\tif (inputBody != null && !headers.has('Content-Type')) {\n\t\t\tconst contentType = extractContentType(inputBody);\n\t\t\tif (contentType) {\n\t\t\t\theaders.append('Content-Type', contentType);\n\t\t\t}\n\t\t}\n\n\t\tlet signal = isRequest(input) ? input.signal : null;\n\t\tif ('signal' in init) signal = init.signal;\n\n\t\tif (signal != null && !isAbortSignal(signal)) {\n\t\t\tthrow new TypeError('Expected signal to be an instanceof AbortSignal');\n\t\t}\n\n\t\tthis[INTERNALS$2] = {\n\t\t\tmethod,\n\t\t\tredirect: init.redirect || input.redirect || 'follow',\n\t\t\theaders,\n\t\t\tparsedURL,\n\t\t\tsignal\n\t\t};\n\n\t\t// node-fetch-only options\n\t\tthis.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20;\n\t\tthis.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true;\n\t\tthis.counter = init.counter || input.counter || 0;\n\t\tthis.agent = init.agent || input.agent;\n\t}\n\n\tget method() {\n\t\treturn this[INTERNALS$2].method;\n\t}\n\n\tget url() {\n\t\treturn format_url(this[INTERNALS$2].parsedURL);\n\t}\n\n\tget headers() {\n\t\treturn this[INTERNALS$2].headers;\n\t}\n\n\tget redirect() {\n\t\treturn this[INTERNALS$2].redirect;\n\t}\n\n\tget signal() {\n\t\treturn this[INTERNALS$2].signal;\n\t}\n\n\t/**\n  * Clone this request\n  *\n  * @return  Request\n  */\n\tclone() {\n\t\treturn new Request(this);\n\t}\n}\n\nBody.mixIn(Request.prototype);\n\nObject.defineProperty(Request.prototype, Symbol.toStringTag, {\n\tvalue: 'Request',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\nObject.defineProperties(Request.prototype, {\n\tmethod: { enumerable: true },\n\turl: { enumerable: true },\n\theaders: { enumerable: true },\n\tredirect: { enumerable: true },\n\tclone: { enumerable: true },\n\tsignal: { enumerable: true }\n});\n\n/**\n * Convert a Request to Node.js http request options.\n *\n * @param   Request  A Request instance\n * @return  Object   The options object to be passed to http.request\n */\nfunction getNodeRequestOptions(request) {\n\tconst parsedURL = request[INTERNALS$2].parsedURL;\n\tconst headers = new Headers(request[INTERNALS$2].headers);\n\n\t// fetch step 1.3\n\tif (!headers.has('Accept')) {\n\t\theaders.set('Accept', '*/*');\n\t}\n\n\t// Basic fetch\n\tif (!parsedURL.protocol || !parsedURL.hostname) {\n\t\tthrow new TypeError('Only absolute URLs are supported');\n\t}\n\n\tif (!/^https?:$/.test(parsedURL.protocol)) {\n\t\tthrow new TypeError('Only HTTP(S) protocols are supported');\n\t}\n\n\tif (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) {\n\t\tthrow new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8');\n\t}\n\n\t// HTTP-network-or-cache fetch steps 2.4-2.7\n\tlet contentLengthValue = null;\n\tif (request.body == null && /^(POST|PUT)$/i.test(request.method)) {\n\t\tcontentLengthValue = '0';\n\t}\n\tif (request.body != null) {\n\t\tconst totalBytes = getTotalBytes(request);\n\t\tif (typeof totalBytes === 'number') {\n\t\t\tcontentLengthValue = String(totalBytes);\n\t\t}\n\t}\n\tif (contentLengthValue) {\n\t\theaders.set('Content-Length', contentLengthValue);\n\t}\n\n\t// HTTP-network-or-cache fetch step 2.11\n\tif (!headers.has('User-Agent')) {\n\t\theaders.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)');\n\t}\n\n\t// HTTP-network-or-cache fetch step 2.15\n\tif (request.compress && !headers.has('Accept-Encoding')) {\n\t\theaders.set('Accept-Encoding', 'gzip,deflate');\n\t}\n\n\tlet agent = request.agent;\n\tif (typeof agent === 'function') {\n\t\tagent = agent(parsedURL);\n\t}\n\n\t// HTTP-network fetch step 4.2\n\t// chunked encoding is handled by Node.js\n\n\treturn Object.assign({}, parsedURL, {\n\t\tmethod: request.method,\n\t\theaders: exportNodeCompatibleHeaders(headers),\n\t\tagent\n\t});\n}\n\n/**\n * abort-error.js\n *\n * AbortError interface for cancelled requests\n */\n\n/**\n * Create AbortError instance\n *\n * @param   String      message      Error message for human\n * @return  AbortError\n */\nfunction AbortError(message) {\n  Error.call(this, message);\n\n  this.type = 'aborted';\n  this.message = message;\n\n  // hide custom error implementation details from end-users\n  Error.captureStackTrace(this, this.constructor);\n}\n\nAbortError.prototype = Object.create(Error.prototype);\nAbortError.prototype.constructor = AbortError;\nAbortError.prototype.name = 'AbortError';\n\nconst URL$1 = Url.URL || whatwgUrl.URL;\n\n// fix an issue where \"PassThrough\", \"resolve\" aren't a named export for node <10\nconst PassThrough$1 = Stream.PassThrough;\n\nconst isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) {\n\tconst orig = new URL$1(original).hostname;\n\tconst dest = new URL$1(destination).hostname;\n\n\treturn orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest);\n};\n\n/**\n * isSameProtocol reports whether the two provided URLs use the same protocol.\n *\n * Both domains must already be in canonical form.\n * @param {string|URL} original\n * @param {string|URL} destination\n */\nconst isSameProtocol = function isSameProtocol(destination, original) {\n\tconst orig = new URL$1(original).protocol;\n\tconst dest = new URL$1(destination).protocol;\n\n\treturn orig === dest;\n};\n\n/**\n * Fetch function\n *\n * @param   Mixed    url   Absolute url or Request instance\n * @param   Object   opts  Fetch options\n * @return  Promise\n */\nfunction fetch(url, opts) {\n\n\t// allow custom promise\n\tif (!fetch.Promise) {\n\t\tthrow new Error('native promise missing, set fetch.Promise to your favorite alternative');\n\t}\n\n\tBody.Promise = fetch.Promise;\n\n\t// wrap http.request into fetch\n\treturn new fetch.Promise(function (resolve, reject) {\n\t\t// build request object\n\t\tconst request = new Request(url, opts);\n\t\tconst options = getNodeRequestOptions(request);\n\n\t\tconst send = (options.protocol === 'https:' ? https : http).request;\n\t\tconst signal = request.signal;\n\n\t\tlet response = null;\n\n\t\tconst abort = function abort() {\n\t\t\tlet error = new AbortError('The user aborted a request.');\n\t\t\treject(error);\n\t\t\tif (request.body && request.body instanceof Stream.Readable) {\n\t\t\t\tdestroyStream(request.body, error);\n\t\t\t}\n\t\t\tif (!response || !response.body) return;\n\t\t\tresponse.body.emit('error', error);\n\t\t};\n\n\t\tif (signal && signal.aborted) {\n\t\t\tabort();\n\t\t\treturn;\n\t\t}\n\n\t\tconst abortAndFinalize = function abortAndFinalize() {\n\t\t\tabort();\n\t\t\tfinalize();\n\t\t};\n\n\t\t// send request\n\t\tconst req = send(options);\n\t\tlet reqTimeout;\n\n\t\tif (signal) {\n\t\t\tsignal.addEventListener('abort', abortAndFinalize);\n\t\t}\n\n\t\tfunction finalize() {\n\t\t\treq.abort();\n\t\t\tif (signal) signal.removeEventListener('abort', abortAndFinalize);\n\t\t\tclearTimeout(reqTimeout);\n\t\t}\n\n\t\tif (request.timeout) {\n\t\t\treq.once('socket', function (socket) {\n\t\t\t\treqTimeout = setTimeout(function () {\n\t\t\t\t\treject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout'));\n\t\t\t\t\tfinalize();\n\t\t\t\t}, request.timeout);\n\t\t\t});\n\t\t}\n\n\t\treq.on('error', function (err) {\n\t\t\treject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err));\n\n\t\t\tif (response && response.body) {\n\t\t\t\tdestroyStream(response.body, err);\n\t\t\t}\n\n\t\t\tfinalize();\n\t\t});\n\n\t\tfixResponseChunkedTransferBadEnding(req, function (err) {\n\t\t\tif (signal && signal.aborted) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (response && response.body) {\n\t\t\t\tdestroyStream(response.body, err);\n\t\t\t}\n\t\t});\n\n\t\t/* c8 ignore next 18 */\n\t\tif (parseInt(process.version.substring(1)) < 14) {\n\t\t\t// Before Node.js 14, pipeline() does not fully support async iterators and does not always\n\t\t\t// properly handle when the socket close/end events are out of order.\n\t\t\treq.on('socket', function (s) {\n\t\t\t\ts.addListener('close', function (hadError) {\n\t\t\t\t\t// if a data listener is still present we didn't end cleanly\n\t\t\t\t\tconst hasDataListener = s.listenerCount('data') > 0;\n\n\t\t\t\t\t// if end happened before close but the socket didn't emit an error, do it now\n\t\t\t\t\tif (response && hasDataListener && !hadError && !(signal && signal.aborted)) {\n\t\t\t\t\t\tconst err = new Error('Premature close');\n\t\t\t\t\t\terr.code = 'ERR_STREAM_PREMATURE_CLOSE';\n\t\t\t\t\t\tresponse.body.emit('error', err);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\treq.on('response', function (res) {\n\t\t\tclearTimeout(reqTimeout);\n\n\t\t\tconst headers = createHeadersLenient(res.headers);\n\n\t\t\t// HTTP fetch step 5\n\t\t\tif (fetch.isRedirect(res.statusCode)) {\n\t\t\t\t// HTTP fetch step 5.2\n\t\t\t\tconst location = headers.get('Location');\n\n\t\t\t\t// HTTP fetch step 5.3\n\t\t\t\tlet locationURL = null;\n\t\t\t\ttry {\n\t\t\t\t\tlocationURL = location === null ? null : new URL$1(location, request.url).toString();\n\t\t\t\t} catch (err) {\n\t\t\t\t\t// error here can only be invalid URL in Location: header\n\t\t\t\t\t// do not throw when options.redirect == manual\n\t\t\t\t\t// let the user extract the errorneous redirect URL\n\t\t\t\t\tif (request.redirect !== 'manual') {\n\t\t\t\t\t\treject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect'));\n\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// HTTP fetch step 5.5\n\t\t\t\tswitch (request.redirect) {\n\t\t\t\t\tcase 'error':\n\t\t\t\t\t\treject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect'));\n\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\treturn;\n\t\t\t\t\tcase 'manual':\n\t\t\t\t\t\t// node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL.\n\t\t\t\t\t\tif (locationURL !== null) {\n\t\t\t\t\t\t\t// handle corrupted header\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\theaders.set('Location', locationURL);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\t// istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request\n\t\t\t\t\t\t\t\treject(err);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'follow':\n\t\t\t\t\t\t// HTTP-redirect fetch step 2\n\t\t\t\t\t\tif (locationURL === null) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 5\n\t\t\t\t\t\tif (request.counter >= request.follow) {\n\t\t\t\t\t\t\treject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect'));\n\t\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 6 (counter increment)\n\t\t\t\t\t\t// Create a new Request object.\n\t\t\t\t\t\tconst requestOpts = {\n\t\t\t\t\t\t\theaders: new Headers(request.headers),\n\t\t\t\t\t\t\tfollow: request.follow,\n\t\t\t\t\t\t\tcounter: request.counter + 1,\n\t\t\t\t\t\t\tagent: request.agent,\n\t\t\t\t\t\t\tcompress: request.compress,\n\t\t\t\t\t\t\tmethod: request.method,\n\t\t\t\t\t\t\tbody: request.body,\n\t\t\t\t\t\t\tsignal: request.signal,\n\t\t\t\t\t\t\ttimeout: request.timeout,\n\t\t\t\t\t\t\tsize: request.size\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tif (!isDomainOrSubdomain(request.url, locationURL) || !isSameProtocol(request.url, locationURL)) {\n\t\t\t\t\t\t\tfor (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) {\n\t\t\t\t\t\t\t\trequestOpts.headers.delete(name);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 9\n\t\t\t\t\t\tif (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) {\n\t\t\t\t\t\t\treject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect'));\n\t\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 11\n\t\t\t\t\t\tif (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') {\n\t\t\t\t\t\t\trequestOpts.method = 'GET';\n\t\t\t\t\t\t\trequestOpts.body = undefined;\n\t\t\t\t\t\t\trequestOpts.headers.delete('content-length');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 15\n\t\t\t\t\t\tresolve(fetch(new Request(locationURL, requestOpts)));\n\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// prepare response\n\t\t\tres.once('end', function () {\n\t\t\t\tif (signal) signal.removeEventListener('abort', abortAndFinalize);\n\t\t\t});\n\t\t\tlet body = res.pipe(new PassThrough$1());\n\n\t\t\tconst response_options = {\n\t\t\t\turl: request.url,\n\t\t\t\tstatus: res.statusCode,\n\t\t\t\tstatusText: res.statusMessage,\n\t\t\t\theaders: headers,\n\t\t\t\tsize: request.size,\n\t\t\t\ttimeout: request.timeout,\n\t\t\t\tcounter: request.counter\n\t\t\t};\n\n\t\t\t// HTTP-network fetch step 12.1.1.3\n\t\t\tconst codings = headers.get('Content-Encoding');\n\n\t\t\t// HTTP-network fetch step 12.1.1.4: handle content codings\n\n\t\t\t// in following scenarios we ignore compression support\n\t\t\t// 1. compression support is disabled\n\t\t\t// 2. HEAD request\n\t\t\t// 3. no Content-Encoding header\n\t\t\t// 4. no content response (204)\n\t\t\t// 5. content not modified response (304)\n\t\t\tif (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) {\n\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\tresolve(response);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// For Node v6+\n\t\t\t// Be less strict when decoding compressed responses, since sometimes\n\t\t\t// servers send slightly invalid responses that are still accepted\n\t\t\t// by common browsers.\n\t\t\t// Always using Z_SYNC_FLUSH is what cURL does.\n\t\t\tconst zlibOptions = {\n\t\t\t\tflush: zlib.Z_SYNC_FLUSH,\n\t\t\t\tfinishFlush: zlib.Z_SYNC_FLUSH\n\t\t\t};\n\n\t\t\t// for gzip\n\t\t\tif (codings == 'gzip' || codings == 'x-gzip') {\n\t\t\t\tbody = body.pipe(zlib.createGunzip(zlibOptions));\n\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\tresolve(response);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// for deflate\n\t\t\tif (codings == 'deflate' || codings == 'x-deflate') {\n\t\t\t\t// handle the infamous raw deflate response from old servers\n\t\t\t\t// a hack for old IIS and Apache servers\n\t\t\t\tconst raw = res.pipe(new PassThrough$1());\n\t\t\t\traw.once('data', function (chunk) {\n\t\t\t\t\t// see http://stackoverflow.com/questions/37519828\n\t\t\t\t\tif ((chunk[0] & 0x0F) === 0x08) {\n\t\t\t\t\t\tbody = body.pipe(zlib.createInflate());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbody = body.pipe(zlib.createInflateRaw());\n\t\t\t\t\t}\n\t\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\t\tresolve(response);\n\t\t\t\t});\n\t\t\t\traw.on('end', function () {\n\t\t\t\t\t// some old IIS servers return zero-length OK deflate responses, so 'data' is never emitted.\n\t\t\t\t\tif (!response) {\n\t\t\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\t\t\tresolve(response);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// for br\n\t\t\tif (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') {\n\t\t\t\tbody = body.pipe(zlib.createBrotliDecompress());\n\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\tresolve(response);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// otherwise, use response as-is\n\t\t\tresponse = new Response(body, response_options);\n\t\t\tresolve(response);\n\t\t});\n\n\t\twriteToStream(req, request);\n\t});\n}\nfunction fixResponseChunkedTransferBadEnding(request, errorCallback) {\n\tlet socket;\n\n\trequest.on('socket', function (s) {\n\t\tsocket = s;\n\t});\n\n\trequest.on('response', function (response) {\n\t\tconst headers = response.headers;\n\n\t\tif (headers['transfer-encoding'] === 'chunked' && !headers['content-length']) {\n\t\t\tresponse.once('close', function (hadError) {\n\t\t\t\t// tests for socket presence, as in some situations the\n\t\t\t\t// the 'socket' event is not triggered for the request\n\t\t\t\t// (happens in deno), avoids `TypeError`\n\t\t\t\t// if a data listener is still present we didn't end cleanly\n\t\t\t\tconst hasDataListener = socket && socket.listenerCount('data') > 0;\n\n\t\t\t\tif (hasDataListener && !hadError) {\n\t\t\t\t\tconst err = new Error('Premature close');\n\t\t\t\t\terr.code = 'ERR_STREAM_PREMATURE_CLOSE';\n\t\t\t\t\terrorCallback(err);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n}\n\nfunction destroyStream(stream, err) {\n\tif (stream.destroy) {\n\t\tstream.destroy(err);\n\t} else {\n\t\t// node < 8\n\t\tstream.emit('error', err);\n\t\tstream.end();\n\t}\n}\n\n/**\n * Redirect code matching\n *\n * @param   Number   code  Status code\n * @return  Boolean\n */\nfetch.isRedirect = function (code) {\n\treturn code === 301 || code === 302 || code === 303 || code === 307 || code === 308;\n};\n\n// expose Promise\nfetch.Promise = global.Promise;\n\nexport default fetch;\nexport { Headers, Request, Response, FetchError, AbortError };\n","const nodeFetch = require('node-fetch')\nconst realFetch = nodeFetch.default || nodeFetch\n\nconst fetch = function (url, options) {\n  // Support schemaless URIs on the server for parity with the browser.\n  // Ex: //github.com/ -> https://github.com/\n  if (/^\\/\\//.test(url)) {\n    url = 'https:' + url\n  }\n  return realFetch.call(this, url, options)\n}\n\nfetch.ponyfill = true\n\nmodule.exports = exports = fetch\nexports.fetch = fetch\nexports.Headers = nodeFetch.Headers\nexports.Request = nodeFetch.Request\nexports.Response = nodeFetch.Response\n\n// Needed for TypeScript consumers without esModuleInterop.\nexports.default = fetch\n","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\nimport fetch from 'cross-fetch';\nimport { Web3BaseProvider, } from 'web3-types';\nimport { InvalidClientError, MethodNotImplementedError, ResponseError } from 'web3-errors';\nexport default class HttpProvider extends Web3BaseProvider {\n    constructor(clientUrl, httpProviderOptions) {\n        super();\n        if (!HttpProvider.validateClientUrl(clientUrl))\n            throw new InvalidClientError(clientUrl);\n        this.clientUrl = clientUrl;\n        this.httpProviderOptions = httpProviderOptions;\n    }\n    static validateClientUrl(clientUrl) {\n        return typeof clientUrl === 'string' ? /^http(s)?:\\/\\//i.test(clientUrl) : false;\n    }\n    /* eslint-disable class-methods-use-this */\n    getStatus() {\n        throw new MethodNotImplementedError();\n    }\n    /* eslint-disable class-methods-use-this */\n    supportsSubscriptions() {\n        return false;\n    }\n    request(payload, requestOptions) {\n        var _a;\n        return __awaiter(this, void 0, void 0, function* () {\n            const providerOptionsCombined = Object.assign(Object.assign({}, (_a = this.httpProviderOptions) === null || _a === void 0 ? void 0 : _a.providerOptions), requestOptions);\n            const response = yield fetch(this.clientUrl, Object.assign(Object.assign({}, providerOptionsCombined), { method: 'POST', headers: Object.assign(Object.assign({}, providerOptionsCombined.headers), { 'Content-Type': 'application/json' }), body: JSON.stringify(payload) }));\n            if (!response.ok) {\n                // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n                throw new ResponseError(yield response.json(), undefined, undefined, response.status);\n            }\n            ;\n            return (yield response.json());\n        });\n    }\n    /* eslint-disable class-methods-use-this */\n    on() {\n        throw new MethodNotImplementedError();\n    }\n    /* eslint-disable class-methods-use-this */\n    removeListener() {\n        throw new MethodNotImplementedError();\n    }\n    /* eslint-disable class-methods-use-this */\n    once() {\n        throw new MethodNotImplementedError();\n    }\n    /* eslint-disable class-methods-use-this */\n    removeAllListeners() {\n        throw new MethodNotImplementedError();\n    }\n    /* eslint-disable class-methods-use-this */\n    connect() {\n        throw new MethodNotImplementedError();\n    }\n    /* eslint-disable class-methods-use-this */\n    disconnect() {\n        throw new MethodNotImplementedError();\n    }\n    /* eslint-disable class-methods-use-this */\n    reset() {\n        throw new MethodNotImplementedError();\n    }\n    /* eslint-disable class-methods-use-this */\n    reconnect() {\n        throw new MethodNotImplementedError();\n    }\n}\nexport { HttpProvider };\n//# sourceMappingURL=index.js.map","'use strict';\n\nconst BINARY_TYPES = ['nodebuffer', 'arraybuffer', 'fragments'];\nconst hasBlob = typeof Blob !== 'undefined';\n\nif (hasBlob) BINARY_TYPES.push('blob');\n\nmodule.exports = {\n  BINARY_TYPES,\n  EMPTY_BUFFER: Buffer.alloc(0),\n  GUID: '258EAFA5-E914-47DA-95CA-C5AB0DC85B11',\n  hasBlob,\n  kForOnEventAttribute: Symbol('kIsForOnEventAttribute'),\n  kListener: Symbol('kListener'),\n  kStatusCode: Symbol('status-code'),\n  kWebSocket: Symbol('websocket'),\n  NOOP: () => {}\n};\n","'use strict';\n\nconst { EMPTY_BUFFER } = require('./constants');\n\nconst FastBuffer = Buffer[Symbol.species];\n\n/**\n * Merges an array of buffers into a new buffer.\n *\n * @param {Buffer[]} list The array of buffers to concat\n * @param {Number} totalLength The total length of buffers in the list\n * @return {Buffer} The resulting buffer\n * @public\n */\nfunction concat(list, totalLength) {\n  if (list.length === 0) return EMPTY_BUFFER;\n  if (list.length === 1) return list[0];\n\n  const target = Buffer.allocUnsafe(totalLength);\n  let offset = 0;\n\n  for (let i = 0; i < list.length; i++) {\n    const buf = list[i];\n    target.set(buf, offset);\n    offset += buf.length;\n  }\n\n  if (offset < totalLength) {\n    return new FastBuffer(target.buffer, target.byteOffset, offset);\n  }\n\n  return target;\n}\n\n/**\n * Masks a buffer using the given mask.\n *\n * @param {Buffer} source The buffer to mask\n * @param {Buffer} mask The mask to use\n * @param {Buffer} output The buffer where to store the result\n * @param {Number} offset The offset at which to start writing\n * @param {Number} length The number of bytes to mask.\n * @public\n */\nfunction _mask(source, mask, output, offset, length) {\n  for (let i = 0; i < length; i++) {\n    output[offset + i] = source[i] ^ mask[i & 3];\n  }\n}\n\n/**\n * Unmasks a buffer using the given mask.\n *\n * @param {Buffer} buffer The buffer to unmask\n * @param {Buffer} mask The mask to use\n * @public\n */\nfunction _unmask(buffer, mask) {\n  for (let i = 0; i < buffer.length; i++) {\n    buffer[i] ^= mask[i & 3];\n  }\n}\n\n/**\n * Converts a buffer to an `ArrayBuffer`.\n *\n * @param {Buffer} buf The buffer to convert\n * @return {ArrayBuffer} Converted buffer\n * @public\n */\nfunction toArrayBuffer(buf) {\n  if (buf.length === buf.buffer.byteLength) {\n    return buf.buffer;\n  }\n\n  return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.length);\n}\n\n/**\n * Converts `data` to a `Buffer`.\n *\n * @param {*} data The data to convert\n * @return {Buffer} The buffer\n * @throws {TypeError}\n * @public\n */\nfunction toBuffer(data) {\n  toBuffer.readOnly = true;\n\n  if (Buffer.isBuffer(data)) return data;\n\n  let buf;\n\n  if (data instanceof ArrayBuffer) {\n    buf = new FastBuffer(data);\n  } else if (ArrayBuffer.isView(data)) {\n    buf = new FastBuffer(data.buffer, data.byteOffset, data.byteLength);\n  } else {\n    buf = Buffer.from(data);\n    toBuffer.readOnly = false;\n  }\n\n  return buf;\n}\n\nmodule.exports = {\n  concat,\n  mask: _mask,\n  toArrayBuffer,\n  toBuffer,\n  unmask: _unmask\n};\n\n/* istanbul ignore else  */\nif (!process.env.WS_NO_BUFFER_UTIL) {\n  try {\n    const bufferUtil = require('bufferutil');\n\n    module.exports.mask = function (source, mask, output, offset, length) {\n      if (length < 48) _mask(source, mask, output, offset, length);\n      else bufferUtil.mask(source, mask, output, offset, length);\n    };\n\n    module.exports.unmask = function (buffer, mask) {\n      if (buffer.length < 32) _unmask(buffer, mask);\n      else bufferUtil.unmask(buffer, mask);\n    };\n  } catch (e) {\n    // Continue regardless of the error.\n  }\n}\n","'use strict';\n\nconst kDone = Symbol('kDone');\nconst kRun = Symbol('kRun');\n\n/**\n * A very simple job queue with adjustable concurrency. Adapted from\n * https://github.com/STRML/async-limiter\n */\nclass Limiter {\n  /**\n   * Creates a new `Limiter`.\n   *\n   * @param {Number} [concurrency=Infinity] The maximum number of jobs allowed\n   *     to run concurrently\n   */\n  constructor(concurrency) {\n    this[kDone] = () => {\n      this.pending--;\n      this[kRun]();\n    };\n    this.concurrency = concurrency || Infinity;\n    this.jobs = [];\n    this.pending = 0;\n  }\n\n  /**\n   * Adds a job to the queue.\n   *\n   * @param {Function} job The job to run\n   * @public\n   */\n  add(job) {\n    this.jobs.push(job);\n    this[kRun]();\n  }\n\n  /**\n   * Removes a job from the queue and runs it if possible.\n   *\n   * @private\n   */\n  [kRun]() {\n    if (this.pending === this.concurrency) return;\n\n    if (this.jobs.length) {\n      const job = this.jobs.shift();\n\n      this.pending++;\n      job(this[kDone]);\n    }\n  }\n}\n\nmodule.exports = Limiter;\n","'use strict';\n\nconst zlib = require('zlib');\n\nconst bufferUtil = require('./buffer-util');\nconst Limiter = require('./limiter');\nconst { kStatusCode } = require('./constants');\n\nconst FastBuffer = Buffer[Symbol.species];\nconst TRAILER = Buffer.from([0x00, 0x00, 0xff, 0xff]);\nconst kPerMessageDeflate = Symbol('permessage-deflate');\nconst kTotalLength = Symbol('total-length');\nconst kCallback = Symbol('callback');\nconst kBuffers = Symbol('buffers');\nconst kError = Symbol('error');\n\n//\n// We limit zlib concurrency, which prevents severe memory fragmentation\n// as documented in https://github.com/nodejs/node/issues/8871#issuecomment-250915913\n// and https://github.com/websockets/ws/issues/1202\n//\n// Intentionally global; it's the global thread pool that's an issue.\n//\nlet zlibLimiter;\n\n/**\n * permessage-deflate implementation.\n */\nclass PerMessageDeflate {\n  /**\n   * Creates a PerMessageDeflate instance.\n   *\n   * @param {Object} [options] Configuration options\n   * @param {(Boolean|Number)} [options.clientMaxWindowBits] Advertise support\n   *     for, or request, a custom client window size\n   * @param {Boolean} [options.clientNoContextTakeover=false] Advertise/\n   *     acknowledge disabling of client context takeover\n   * @param {Number} [options.concurrencyLimit=10] The number of concurrent\n   *     calls to zlib\n   * @param {(Boolean|Number)} [options.serverMaxWindowBits] Request/confirm the\n   *     use of a custom server window size\n   * @param {Boolean} [options.serverNoContextTakeover=false] Request/accept\n   *     disabling of server context takeover\n   * @param {Number} [options.threshold=1024] Size (in bytes) below which\n   *     messages should not be compressed if context takeover is disabled\n   * @param {Object} [options.zlibDeflateOptions] Options to pass to zlib on\n   *     deflate\n   * @param {Object} [options.zlibInflateOptions] Options to pass to zlib on\n   *     inflate\n   * @param {Boolean} [isServer=false] Create the instance in either server or\n   *     client mode\n   * @param {Number} [maxPayload=0] The maximum allowed message length\n   */\n  constructor(options, isServer, maxPayload) {\n    this._maxPayload = maxPayload | 0;\n    this._options = options || {};\n    this._threshold =\n      this._options.threshold !== undefined ? this._options.threshold : 1024;\n    this._isServer = !!isServer;\n    this._deflate = null;\n    this._inflate = null;\n\n    this.params = null;\n\n    if (!zlibLimiter) {\n      const concurrency =\n        this._options.concurrencyLimit !== undefined\n          ? this._options.concurrencyLimit\n          : 10;\n      zlibLimiter = new Limiter(concurrency);\n    }\n  }\n\n  /**\n   * @type {String}\n   */\n  static get extensionName() {\n    return 'permessage-deflate';\n  }\n\n  /**\n   * Create an extension negotiation offer.\n   *\n   * @return {Object} Extension parameters\n   * @public\n   */\n  offer() {\n    const params = {};\n\n    if (this._options.serverNoContextTakeover) {\n      params.server_no_context_takeover = true;\n    }\n    if (this._options.clientNoContextTakeover) {\n      params.client_no_context_takeover = true;\n    }\n    if (this._options.serverMaxWindowBits) {\n      params.server_max_window_bits = this._options.serverMaxWindowBits;\n    }\n    if (this._options.clientMaxWindowBits) {\n      params.client_max_window_bits = this._options.clientMaxWindowBits;\n    } else if (this._options.clientMaxWindowBits == null) {\n      params.client_max_window_bits = true;\n    }\n\n    return params;\n  }\n\n  /**\n   * Accept an extension negotiation offer/response.\n   *\n   * @param {Array} configurations The extension negotiation offers/reponse\n   * @return {Object} Accepted configuration\n   * @public\n   */\n  accept(configurations) {\n    configurations = this.normalizeParams(configurations);\n\n    this.params = this._isServer\n      ? this.acceptAsServer(configurations)\n      : this.acceptAsClient(configurations);\n\n    return this.params;\n  }\n\n  /**\n   * Releases all resources used by the extension.\n   *\n   * @public\n   */\n  cleanup() {\n    if (this._inflate) {\n      this._inflate.close();\n      this._inflate = null;\n    }\n\n    if (this._deflate) {\n      const callback = this._deflate[kCallback];\n\n      this._deflate.close();\n      this._deflate = null;\n\n      if (callback) {\n        callback(\n          new Error(\n            'The deflate stream was closed while data was being processed'\n          )\n        );\n      }\n    }\n  }\n\n  /**\n   *  Accept an extension negotiation offer.\n   *\n   * @param {Array} offers The extension negotiation offers\n   * @return {Object} Accepted configuration\n   * @private\n   */\n  acceptAsServer(offers) {\n    const opts = this._options;\n    const accepted = offers.find((params) => {\n      if (\n        (opts.serverNoContextTakeover === false &&\n          params.server_no_context_takeover) ||\n        (params.server_max_window_bits &&\n          (opts.serverMaxWindowBits === false ||\n            (typeof opts.serverMaxWindowBits === 'number' &&\n              opts.serverMaxWindowBits > params.server_max_window_bits))) ||\n        (typeof opts.clientMaxWindowBits === 'number' &&\n          !params.client_max_window_bits)\n      ) {\n        return false;\n      }\n\n      return true;\n    });\n\n    if (!accepted) {\n      throw new Error('None of the extension offers can be accepted');\n    }\n\n    if (opts.serverNoContextTakeover) {\n      accepted.server_no_context_takeover = true;\n    }\n    if (opts.clientNoContextTakeover) {\n      accepted.client_no_context_takeover = true;\n    }\n    if (typeof opts.serverMaxWindowBits === 'number') {\n      accepted.server_max_window_bits = opts.serverMaxWindowBits;\n    }\n    if (typeof opts.clientMaxWindowBits === 'number') {\n      accepted.client_max_window_bits = opts.clientMaxWindowBits;\n    } else if (\n      accepted.client_max_window_bits === true ||\n      opts.clientMaxWindowBits === false\n    ) {\n      delete accepted.client_max_window_bits;\n    }\n\n    return accepted;\n  }\n\n  /**\n   * Accept the extension negotiation response.\n   *\n   * @param {Array} response The extension negotiation response\n   * @return {Object} Accepted configuration\n   * @private\n   */\n  acceptAsClient(response) {\n    const params = response[0];\n\n    if (\n      this._options.clientNoContextTakeover === false &&\n      params.client_no_context_takeover\n    ) {\n      throw new Error('Unexpected parameter \"client_no_context_takeover\"');\n    }\n\n    if (!params.client_max_window_bits) {\n      if (typeof this._options.clientMaxWindowBits === 'number') {\n        params.client_max_window_bits = this._options.clientMaxWindowBits;\n      }\n    } else if (\n      this._options.clientMaxWindowBits === false ||\n      (typeof this._options.clientMaxWindowBits === 'number' &&\n        params.client_max_window_bits > this._options.clientMaxWindowBits)\n    ) {\n      throw new Error(\n        'Unexpected or invalid parameter \"client_max_window_bits\"'\n      );\n    }\n\n    return params;\n  }\n\n  /**\n   * Normalize parameters.\n   *\n   * @param {Array} configurations The extension negotiation offers/reponse\n   * @return {Array} The offers/response with normalized parameters\n   * @private\n   */\n  normalizeParams(configurations) {\n    configurations.forEach((params) => {\n      Object.keys(params).forEach((key) => {\n        let value = params[key];\n\n        if (value.length > 1) {\n          throw new Error(`Parameter \"${key}\" must have only a single value`);\n        }\n\n        value = value[0];\n\n        if (key === 'client_max_window_bits') {\n          if (value !== true) {\n            const num = +value;\n            if (!Number.isInteger(num) || num < 8 || num > 15) {\n              throw new TypeError(\n                `Invalid value for parameter \"${key}\": ${value}`\n              );\n            }\n            value = num;\n          } else if (!this._isServer) {\n            throw new TypeError(\n              `Invalid value for parameter \"${key}\": ${value}`\n            );\n          }\n        } else if (key === 'server_max_window_bits') {\n          const num = +value;\n          if (!Number.isInteger(num) || num < 8 || num > 15) {\n            throw new TypeError(\n              `Invalid value for parameter \"${key}\": ${value}`\n            );\n          }\n          value = num;\n        } else if (\n          key === 'client_no_context_takeover' ||\n          key === 'server_no_context_takeover'\n        ) {\n          if (value !== true) {\n            throw new TypeError(\n              `Invalid value for parameter \"${key}\": ${value}`\n            );\n          }\n        } else {\n          throw new Error(`Unknown parameter \"${key}\"`);\n        }\n\n        params[key] = value;\n      });\n    });\n\n    return configurations;\n  }\n\n  /**\n   * Decompress data. Concurrency limited.\n   *\n   * @param {Buffer} data Compressed data\n   * @param {Boolean} fin Specifies whether or not this is the last fragment\n   * @param {Function} callback Callback\n   * @public\n   */\n  decompress(data, fin, callback) {\n    zlibLimiter.add((done) => {\n      this._decompress(data, fin, (err, result) => {\n        done();\n        callback(err, result);\n      });\n    });\n  }\n\n  /**\n   * Compress data. Concurrency limited.\n   *\n   * @param {(Buffer|String)} data Data to compress\n   * @param {Boolean} fin Specifies whether or not this is the last fragment\n   * @param {Function} callback Callback\n   * @public\n   */\n  compress(data, fin, callback) {\n    zlibLimiter.add((done) => {\n      this._compress(data, fin, (err, result) => {\n        done();\n        callback(err, result);\n      });\n    });\n  }\n\n  /**\n   * Decompress data.\n   *\n   * @param {Buffer} data Compressed data\n   * @param {Boolean} fin Specifies whether or not this is the last fragment\n   * @param {Function} callback Callback\n   * @private\n   */\n  _decompress(data, fin, callback) {\n    const endpoint = this._isServer ? 'client' : 'server';\n\n    if (!this._inflate) {\n      const key = `${endpoint}_max_window_bits`;\n      const windowBits =\n        typeof this.params[key] !== 'number'\n          ? zlib.Z_DEFAULT_WINDOWBITS\n          : this.params[key];\n\n      this._inflate = zlib.createInflateRaw({\n        ...this._options.zlibInflateOptions,\n        windowBits\n      });\n      this._inflate[kPerMessageDeflate] = this;\n      this._inflate[kTotalLength] = 0;\n      this._inflate[kBuffers] = [];\n      this._inflate.on('error', inflateOnError);\n      this._inflate.on('data', inflateOnData);\n    }\n\n    this._inflate[kCallback] = callback;\n\n    this._inflate.write(data);\n    if (fin) this._inflate.write(TRAILER);\n\n    this._inflate.flush(() => {\n      const err = this._inflate[kError];\n\n      if (err) {\n        this._inflate.close();\n        this._inflate = null;\n        callback(err);\n        return;\n      }\n\n      const data = bufferUtil.concat(\n        this._inflate[kBuffers],\n        this._inflate[kTotalLength]\n      );\n\n      if (this._inflate._readableState.endEmitted) {\n        this._inflate.close();\n        this._inflate = null;\n      } else {\n        this._inflate[kTotalLength] = 0;\n        this._inflate[kBuffers] = [];\n\n        if (fin && this.params[`${endpoint}_no_context_takeover`]) {\n          this._inflate.reset();\n        }\n      }\n\n      callback(null, data);\n    });\n  }\n\n  /**\n   * Compress data.\n   *\n   * @param {(Buffer|String)} data Data to compress\n   * @param {Boolean} fin Specifies whether or not this is the last fragment\n   * @param {Function} callback Callback\n   * @private\n   */\n  _compress(data, fin, callback) {\n    const endpoint = this._isServer ? 'server' : 'client';\n\n    if (!this._deflate) {\n      const key = `${endpoint}_max_window_bits`;\n      const windowBits =\n        typeof this.params[key] !== 'number'\n          ? zlib.Z_DEFAULT_WINDOWBITS\n          : this.params[key];\n\n      this._deflate = zlib.createDeflateRaw({\n        ...this._options.zlibDeflateOptions,\n        windowBits\n      });\n\n      this._deflate[kTotalLength] = 0;\n      this._deflate[kBuffers] = [];\n\n      this._deflate.on('data', deflateOnData);\n    }\n\n    this._deflate[kCallback] = callback;\n\n    this._deflate.write(data);\n    this._deflate.flush(zlib.Z_SYNC_FLUSH, () => {\n      if (!this._deflate) {\n        //\n        // The deflate stream was closed while data was being processed.\n        //\n        return;\n      }\n\n      let data = bufferUtil.concat(\n        this._deflate[kBuffers],\n        this._deflate[kTotalLength]\n      );\n\n      if (fin) {\n        data = new FastBuffer(data.buffer, data.byteOffset, data.length - 4);\n      }\n\n      //\n      // Ensure that the callback will not be called again in\n      // `PerMessageDeflate#cleanup()`.\n      //\n      this._deflate[kCallback] = null;\n\n      this._deflate[kTotalLength] = 0;\n      this._deflate[kBuffers] = [];\n\n      if (fin && this.params[`${endpoint}_no_context_takeover`]) {\n        this._deflate.reset();\n      }\n\n      callback(null, data);\n    });\n  }\n}\n\nmodule.exports = PerMessageDeflate;\n\n/**\n * The listener of the `zlib.DeflateRaw` stream `'data'` event.\n *\n * @param {Buffer} chunk A chunk of data\n * @private\n */\nfunction deflateOnData(chunk) {\n  this[kBuffers].push(chunk);\n  this[kTotalLength] += chunk.length;\n}\n\n/**\n * The listener of the `zlib.InflateRaw` stream `'data'` event.\n *\n * @param {Buffer} chunk A chunk of data\n * @private\n */\nfunction inflateOnData(chunk) {\n  this[kTotalLength] += chunk.length;\n\n  if (\n    this[kPerMessageDeflate]._maxPayload < 1 ||\n    this[kTotalLength] <= this[kPerMessageDeflate]._maxPayload\n  ) {\n    this[kBuffers].push(chunk);\n    return;\n  }\n\n  this[kError] = new RangeError('Max payload size exceeded');\n  this[kError].code = 'WS_ERR_UNSUPPORTED_MESSAGE_LENGTH';\n  this[kError][kStatusCode] = 1009;\n  this.removeListener('data', inflateOnData);\n  this.reset();\n}\n\n/**\n * The listener of the `zlib.InflateRaw` stream `'error'` event.\n *\n * @param {Error} err The emitted error\n * @private\n */\nfunction inflateOnError(err) {\n  //\n  // There is no need to call `Zlib#close()` as the handle is automatically\n  // closed when an error is emitted.\n  //\n  this[kPerMessageDeflate]._inflate = null;\n  err[kStatusCode] = 1007;\n  this[kCallback](err);\n}\n","'use strict';\n\nconst { isUtf8 } = require('buffer');\n\nconst { hasBlob } = require('./constants');\n\n//\n// Allowed token characters:\n//\n// '!', '#', '$', '%', '&', ''', '*', '+', '-',\n// '.', 0-9, A-Z, '^', '_', '`', a-z, '|', '~'\n//\n// tokenChars[32] === 0 // ' '\n// tokenChars[33] === 1 // '!'\n// tokenChars[34] === 0 // '\"'\n// ...\n//\n// prettier-ignore\nconst tokenChars = [\n  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 15\n  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 31\n  0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, // 32 - 47\n  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, // 48 - 63\n  0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 64 - 79\n  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, // 80 - 95\n  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 96 - 111\n  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0 // 112 - 127\n];\n\n/**\n * Checks if a status code is allowed in a close frame.\n *\n * @param {Number} code The status code\n * @return {Boolean} `true` if the status code is valid, else `false`\n * @public\n */\nfunction isValidStatusCode(code) {\n  return (\n    (code >= 1000 &&\n      code <= 1014 &&\n      code !== 1004 &&\n      code !== 1005 &&\n      code !== 1006) ||\n    (code >= 3000 && code <= 4999)\n  );\n}\n\n/**\n * Checks if a given buffer contains only correct UTF-8.\n * Ported from https://www.cl.cam.ac.uk/%7Emgk25/ucs/utf8_check.c by\n * Markus Kuhn.\n *\n * @param {Buffer} buf The buffer to check\n * @return {Boolean} `true` if `buf` contains only correct UTF-8, else `false`\n * @public\n */\nfunction _isValidUTF8(buf) {\n  const len = buf.length;\n  let i = 0;\n\n  while (i < len) {\n    if ((buf[i] & 0x80) === 0) {\n      // 0xxxxxxx\n      i++;\n    } else if ((buf[i] & 0xe0) === 0xc0) {\n      // 110xxxxx 10xxxxxx\n      if (\n        i + 1 === len ||\n        (buf[i + 1] & 0xc0) !== 0x80 ||\n        (buf[i] & 0xfe) === 0xc0 // Overlong\n      ) {\n        return false;\n      }\n\n      i += 2;\n    } else if ((buf[i] & 0xf0) === 0xe0) {\n      // 1110xxxx 10xxxxxx 10xxxxxx\n      if (\n        i + 2 >= len ||\n        (buf[i + 1] & 0xc0) !== 0x80 ||\n        (buf[i + 2] & 0xc0) !== 0x80 ||\n        (buf[i] === 0xe0 && (buf[i + 1] & 0xe0) === 0x80) || // Overlong\n        (buf[i] === 0xed && (buf[i + 1] & 0xe0) === 0xa0) // Surrogate (U+D800 - U+DFFF)\n      ) {\n        return false;\n      }\n\n      i += 3;\n    } else if ((buf[i] & 0xf8) === 0xf0) {\n      // 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx\n      if (\n        i + 3 >= len ||\n        (buf[i + 1] & 0xc0) !== 0x80 ||\n        (buf[i + 2] & 0xc0) !== 0x80 ||\n        (buf[i + 3] & 0xc0) !== 0x80 ||\n        (buf[i] === 0xf0 && (buf[i + 1] & 0xf0) === 0x80) || // Overlong\n        (buf[i] === 0xf4 && buf[i + 1] > 0x8f) ||\n        buf[i] > 0xf4 // > U+10FFFF\n      ) {\n        return false;\n      }\n\n      i += 4;\n    } else {\n      return false;\n    }\n  }\n\n  return true;\n}\n\n/**\n * Determines whether a value is a `Blob`.\n *\n * @param {*} value The value to be tested\n * @return {Boolean} `true` if `value` is a `Blob`, else `false`\n * @private\n */\nfunction isBlob(value) {\n  return (\n    hasBlob &&\n    typeof value === 'object' &&\n    typeof value.arrayBuffer === 'function' &&\n    typeof value.type === 'string' &&\n    typeof value.stream === 'function' &&\n    (value[Symbol.toStringTag] === 'Blob' ||\n      value[Symbol.toStringTag] === 'File')\n  );\n}\n\nmodule.exports = {\n  isBlob,\n  isValidStatusCode,\n  isValidUTF8: _isValidUTF8,\n  tokenChars\n};\n\nif (isUtf8) {\n  module.exports.isValidUTF8 = function (buf) {\n    return buf.length < 24 ? _isValidUTF8(buf) : isUtf8(buf);\n  };\n} /* istanbul ignore else  */ else if (!process.env.WS_NO_UTF_8_VALIDATE) {\n  try {\n    const isValidUTF8 = require('utf-8-validate');\n\n    module.exports.isValidUTF8 = function (buf) {\n      return buf.length < 32 ? _isValidUTF8(buf) : isValidUTF8(buf);\n    };\n  } catch (e) {\n    // Continue regardless of the error.\n  }\n}\n","'use strict';\n\nconst { Writable } = require('stream');\n\nconst PerMessageDeflate = require('./permessage-deflate');\nconst {\n  BINARY_TYPES,\n  EMPTY_BUFFER,\n  kStatusCode,\n  kWebSocket\n} = require('./constants');\nconst { concat, toArrayBuffer, unmask } = require('./buffer-util');\nconst { isValidStatusCode, isValidUTF8 } = require('./validation');\n\nconst FastBuffer = Buffer[Symbol.species];\n\nconst GET_INFO = 0;\nconst GET_PAYLOAD_LENGTH_16 = 1;\nconst GET_PAYLOAD_LENGTH_64 = 2;\nconst GET_MASK = 3;\nconst GET_DATA = 4;\nconst INFLATING = 5;\nconst DEFER_EVENT = 6;\n\n/**\n * HyBi Receiver implementation.\n *\n * @extends Writable\n */\nclass Receiver extends Writable {\n  /**\n   * Creates a Receiver instance.\n   *\n   * @param {Object} [options] Options object\n   * @param {Boolean} [options.allowSynchronousEvents=true] Specifies whether\n   *     any of the `'message'`, `'ping'`, and `'pong'` events can be emitted\n   *     multiple times in the same tick\n   * @param {String} [options.binaryType=nodebuffer] The type for binary data\n   * @param {Object} [options.extensions] An object containing the negotiated\n   *     extensions\n   * @param {Boolean} [options.isServer=false] Specifies whether to operate in\n   *     client or server mode\n   * @param {Number} [options.maxPayload=0] The maximum allowed message length\n   * @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or\n   *     not to skip UTF-8 validation for text and close messages\n   */\n  constructor(options = {}) {\n    super();\n\n    this._allowSynchronousEvents =\n      options.allowSynchronousEvents !== undefined\n        ? options.allowSynchronousEvents\n        : true;\n    this._binaryType = options.binaryType || BINARY_TYPES[0];\n    this._extensions = options.extensions || {};\n    this._isServer = !!options.isServer;\n    this._maxPayload = options.maxPayload | 0;\n    this._skipUTF8Validation = !!options.skipUTF8Validation;\n    this[kWebSocket] = undefined;\n\n    this._bufferedBytes = 0;\n    this._buffers = [];\n\n    this._compressed = false;\n    this._payloadLength = 0;\n    this._mask = undefined;\n    this._fragmented = 0;\n    this._masked = false;\n    this._fin = false;\n    this._opcode = 0;\n\n    this._totalPayloadLength = 0;\n    this._messageLength = 0;\n    this._fragments = [];\n\n    this._errored = false;\n    this._loop = false;\n    this._state = GET_INFO;\n  }\n\n  /**\n   * Implements `Writable.prototype._write()`.\n   *\n   * @param {Buffer} chunk The chunk of data to write\n   * @param {String} encoding The character encoding of `chunk`\n   * @param {Function} cb Callback\n   * @private\n   */\n  _write(chunk, encoding, cb) {\n    if (this._opcode === 0x08 && this._state == GET_INFO) return cb();\n\n    this._bufferedBytes += chunk.length;\n    this._buffers.push(chunk);\n    this.startLoop(cb);\n  }\n\n  /**\n   * Consumes `n` bytes from the buffered data.\n   *\n   * @param {Number} n The number of bytes to consume\n   * @return {Buffer} The consumed bytes\n   * @private\n   */\n  consume(n) {\n    this._bufferedBytes -= n;\n\n    if (n === this._buffers[0].length) return this._buffers.shift();\n\n    if (n < this._buffers[0].length) {\n      const buf = this._buffers[0];\n      this._buffers[0] = new FastBuffer(\n        buf.buffer,\n        buf.byteOffset + n,\n        buf.length - n\n      );\n\n      return new FastBuffer(buf.buffer, buf.byteOffset, n);\n    }\n\n    const dst = Buffer.allocUnsafe(n);\n\n    do {\n      const buf = this._buffers[0];\n      const offset = dst.length - n;\n\n      if (n >= buf.length) {\n        dst.set(this._buffers.shift(), offset);\n      } else {\n        dst.set(new Uint8Array(buf.buffer, buf.byteOffset, n), offset);\n        this._buffers[0] = new FastBuffer(\n          buf.buffer,\n          buf.byteOffset + n,\n          buf.length - n\n        );\n      }\n\n      n -= buf.length;\n    } while (n > 0);\n\n    return dst;\n  }\n\n  /**\n   * Starts the parsing loop.\n   *\n   * @param {Function} cb Callback\n   * @private\n   */\n  startLoop(cb) {\n    this._loop = true;\n\n    do {\n      switch (this._state) {\n        case GET_INFO:\n          this.getInfo(cb);\n          break;\n        case GET_PAYLOAD_LENGTH_16:\n          this.getPayloadLength16(cb);\n          break;\n        case GET_PAYLOAD_LENGTH_64:\n          this.getPayloadLength64(cb);\n          break;\n        case GET_MASK:\n          this.getMask();\n          break;\n        case GET_DATA:\n          this.getData(cb);\n          break;\n        case INFLATING:\n        case DEFER_EVENT:\n          this._loop = false;\n          return;\n      }\n    } while (this._loop);\n\n    if (!this._errored) cb();\n  }\n\n  /**\n   * Reads the first two bytes of a frame.\n   *\n   * @param {Function} cb Callback\n   * @private\n   */\n  getInfo(cb) {\n    if (this._bufferedBytes < 2) {\n      this._loop = false;\n      return;\n    }\n\n    const buf = this.consume(2);\n\n    if ((buf[0] & 0x30) !== 0x00) {\n      const error = this.createError(\n        RangeError,\n        'RSV2 and RSV3 must be clear',\n        true,\n        1002,\n        'WS_ERR_UNEXPECTED_RSV_2_3'\n      );\n\n      cb(error);\n      return;\n    }\n\n    const compressed = (buf[0] & 0x40) === 0x40;\n\n    if (compressed && !this._extensions[PerMessageDeflate.extensionName]) {\n      const error = this.createError(\n        RangeError,\n        'RSV1 must be clear',\n        true,\n        1002,\n        'WS_ERR_UNEXPECTED_RSV_1'\n      );\n\n      cb(error);\n      return;\n    }\n\n    this._fin = (buf[0] & 0x80) === 0x80;\n    this._opcode = buf[0] & 0x0f;\n    this._payloadLength = buf[1] & 0x7f;\n\n    if (this._opcode === 0x00) {\n      if (compressed) {\n        const error = this.createError(\n          RangeError,\n          'RSV1 must be clear',\n          true,\n          1002,\n          'WS_ERR_UNEXPECTED_RSV_1'\n        );\n\n        cb(error);\n        return;\n      }\n\n      if (!this._fragmented) {\n        const error = this.createError(\n          RangeError,\n          'invalid opcode 0',\n          true,\n          1002,\n          'WS_ERR_INVALID_OPCODE'\n        );\n\n        cb(error);\n        return;\n      }\n\n      this._opcode = this._fragmented;\n    } else if (this._opcode === 0x01 || this._opcode === 0x02) {\n      if (this._fragmented) {\n        const error = this.createError(\n          RangeError,\n          `invalid opcode ${this._opcode}`,\n          true,\n          1002,\n          'WS_ERR_INVALID_OPCODE'\n        );\n\n        cb(error);\n        return;\n      }\n\n      this._compressed = compressed;\n    } else if (this._opcode > 0x07 && this._opcode < 0x0b) {\n      if (!this._fin) {\n        const error = this.createError(\n          RangeError,\n          'FIN must be set',\n          true,\n          1002,\n          'WS_ERR_EXPECTED_FIN'\n        );\n\n        cb(error);\n        return;\n      }\n\n      if (compressed) {\n        const error = this.createError(\n          RangeError,\n          'RSV1 must be clear',\n          true,\n          1002,\n          'WS_ERR_UNEXPECTED_RSV_1'\n        );\n\n        cb(error);\n        return;\n      }\n\n      if (\n        this._payloadLength > 0x7d ||\n        (this._opcode === 0x08 && this._payloadLength === 1)\n      ) {\n        const error = this.createError(\n          RangeError,\n          `invalid payload length ${this._payloadLength}`,\n          true,\n          1002,\n          'WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH'\n        );\n\n        cb(error);\n        return;\n      }\n    } else {\n      const error = this.createError(\n        RangeError,\n        `invalid opcode ${this._opcode}`,\n        true,\n        1002,\n        'WS_ERR_INVALID_OPCODE'\n      );\n\n      cb(error);\n      return;\n    }\n\n    if (!this._fin && !this._fragmented) this._fragmented = this._opcode;\n    this._masked = (buf[1] & 0x80) === 0x80;\n\n    if (this._isServer) {\n      if (!this._masked) {\n        const error = this.createError(\n          RangeError,\n          'MASK must be set',\n          true,\n          1002,\n          'WS_ERR_EXPECTED_MASK'\n        );\n\n        cb(error);\n        return;\n      }\n    } else if (this._masked) {\n      const error = this.createError(\n        RangeError,\n        'MASK must be clear',\n        true,\n        1002,\n        'WS_ERR_UNEXPECTED_MASK'\n      );\n\n      cb(error);\n      return;\n    }\n\n    if (this._payloadLength === 126) this._state = GET_PAYLOAD_LENGTH_16;\n    else if (this._payloadLength === 127) this._state = GET_PAYLOAD_LENGTH_64;\n    else this.haveLength(cb);\n  }\n\n  /**\n   * Gets extended payload length (7+16).\n   *\n   * @param {Function} cb Callback\n   * @private\n   */\n  getPayloadLength16(cb) {\n    if (this._bufferedBytes < 2) {\n      this._loop = false;\n      return;\n    }\n\n    this._payloadLength = this.consume(2).readUInt16BE(0);\n    this.haveLength(cb);\n  }\n\n  /**\n   * Gets extended payload length (7+64).\n   *\n   * @param {Function} cb Callback\n   * @private\n   */\n  getPayloadLength64(cb) {\n    if (this._bufferedBytes < 8) {\n      this._loop = false;\n      return;\n    }\n\n    const buf = this.consume(8);\n    const num = buf.readUInt32BE(0);\n\n    //\n    // The maximum safe integer in JavaScript is 2^53 - 1. An error is returned\n    // if payload length is greater than this number.\n    //\n    if (num > Math.pow(2, 53 - 32) - 1) {\n      const error = this.createError(\n        RangeError,\n        'Unsupported WebSocket frame: payload length > 2^53 - 1',\n        false,\n        1009,\n        'WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH'\n      );\n\n      cb(error);\n      return;\n    }\n\n    this._payloadLength = num * Math.pow(2, 32) + buf.readUInt32BE(4);\n    this.haveLength(cb);\n  }\n\n  /**\n   * Payload length has been read.\n   *\n   * @param {Function} cb Callback\n   * @private\n   */\n  haveLength(cb) {\n    if (this._payloadLength && this._opcode < 0x08) {\n      this._totalPayloadLength += this._payloadLength;\n      if (this._totalPayloadLength > this._maxPayload && this._maxPayload > 0) {\n        const error = this.createError(\n          RangeError,\n          'Max payload size exceeded',\n          false,\n          1009,\n          'WS_ERR_UNSUPPORTED_MESSAGE_LENGTH'\n        );\n\n        cb(error);\n        return;\n      }\n    }\n\n    if (this._masked) this._state = GET_MASK;\n    else this._state = GET_DATA;\n  }\n\n  /**\n   * Reads mask bytes.\n   *\n   * @private\n   */\n  getMask() {\n    if (this._bufferedBytes < 4) {\n      this._loop = false;\n      return;\n    }\n\n    this._mask = this.consume(4);\n    this._state = GET_DATA;\n  }\n\n  /**\n   * Reads data bytes.\n   *\n   * @param {Function} cb Callback\n   * @private\n   */\n  getData(cb) {\n    let data = EMPTY_BUFFER;\n\n    if (this._payloadLength) {\n      if (this._bufferedBytes < this._payloadLength) {\n        this._loop = false;\n        return;\n      }\n\n      data = this.consume(this._payloadLength);\n\n      if (\n        this._masked &&\n        (this._mask[0] | this._mask[1] | this._mask[2] | this._mask[3]) !== 0\n      ) {\n        unmask(data, this._mask);\n      }\n    }\n\n    if (this._opcode > 0x07) {\n      this.controlMessage(data, cb);\n      return;\n    }\n\n    if (this._compressed) {\n      this._state = INFLATING;\n      this.decompress(data, cb);\n      return;\n    }\n\n    if (data.length) {\n      //\n      // This message is not compressed so its length is the sum of the payload\n      // length of all fragments.\n      //\n      this._messageLength = this._totalPayloadLength;\n      this._fragments.push(data);\n    }\n\n    this.dataMessage(cb);\n  }\n\n  /**\n   * Decompresses data.\n   *\n   * @param {Buffer} data Compressed data\n   * @param {Function} cb Callback\n   * @private\n   */\n  decompress(data, cb) {\n    const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName];\n\n    perMessageDeflate.decompress(data, this._fin, (err, buf) => {\n      if (err) return cb(err);\n\n      if (buf.length) {\n        this._messageLength += buf.length;\n        if (this._messageLength > this._maxPayload && this._maxPayload > 0) {\n          const error = this.createError(\n            RangeError,\n            'Max payload size exceeded',\n            false,\n            1009,\n            'WS_ERR_UNSUPPORTED_MESSAGE_LENGTH'\n          );\n\n          cb(error);\n          return;\n        }\n\n        this._fragments.push(buf);\n      }\n\n      this.dataMessage(cb);\n      if (this._state === GET_INFO) this.startLoop(cb);\n    });\n  }\n\n  /**\n   * Handles a data message.\n   *\n   * @param {Function} cb Callback\n   * @private\n   */\n  dataMessage(cb) {\n    if (!this._fin) {\n      this._state = GET_INFO;\n      return;\n    }\n\n    const messageLength = this._messageLength;\n    const fragments = this._fragments;\n\n    this._totalPayloadLength = 0;\n    this._messageLength = 0;\n    this._fragmented = 0;\n    this._fragments = [];\n\n    if (this._opcode === 2) {\n      let data;\n\n      if (this._binaryType === 'nodebuffer') {\n        data = concat(fragments, messageLength);\n      } else if (this._binaryType === 'arraybuffer') {\n        data = toArrayBuffer(concat(fragments, messageLength));\n      } else if (this._binaryType === 'blob') {\n        data = new Blob(fragments);\n      } else {\n        data = fragments;\n      }\n\n      if (this._allowSynchronousEvents) {\n        this.emit('message', data, true);\n        this._state = GET_INFO;\n      } else {\n        this._state = DEFER_EVENT;\n        setImmediate(() => {\n          this.emit('message', data, true);\n          this._state = GET_INFO;\n          this.startLoop(cb);\n        });\n      }\n    } else {\n      const buf = concat(fragments, messageLength);\n\n      if (!this._skipUTF8Validation && !isValidUTF8(buf)) {\n        const error = this.createError(\n          Error,\n          'invalid UTF-8 sequence',\n          true,\n          1007,\n          'WS_ERR_INVALID_UTF8'\n        );\n\n        cb(error);\n        return;\n      }\n\n      if (this._state === INFLATING || this._allowSynchronousEvents) {\n        this.emit('message', buf, false);\n        this._state = GET_INFO;\n      } else {\n        this._state = DEFER_EVENT;\n        setImmediate(() => {\n          this.emit('message', buf, false);\n          this._state = GET_INFO;\n          this.startLoop(cb);\n        });\n      }\n    }\n  }\n\n  /**\n   * Handles a control message.\n   *\n   * @param {Buffer} data Data to handle\n   * @return {(Error|RangeError|undefined)} A possible error\n   * @private\n   */\n  controlMessage(data, cb) {\n    if (this._opcode === 0x08) {\n      if (data.length === 0) {\n        this._loop = false;\n        this.emit('conclude', 1005, EMPTY_BUFFER);\n        this.end();\n      } else {\n        const code = data.readUInt16BE(0);\n\n        if (!isValidStatusCode(code)) {\n          const error = this.createError(\n            RangeError,\n            `invalid status code ${code}`,\n            true,\n            1002,\n            'WS_ERR_INVALID_CLOSE_CODE'\n          );\n\n          cb(error);\n          return;\n        }\n\n        const buf = new FastBuffer(\n          data.buffer,\n          data.byteOffset + 2,\n          data.length - 2\n        );\n\n        if (!this._skipUTF8Validation && !isValidUTF8(buf)) {\n          const error = this.createError(\n            Error,\n            'invalid UTF-8 sequence',\n            true,\n            1007,\n            'WS_ERR_INVALID_UTF8'\n          );\n\n          cb(error);\n          return;\n        }\n\n        this._loop = false;\n        this.emit('conclude', code, buf);\n        this.end();\n      }\n\n      this._state = GET_INFO;\n      return;\n    }\n\n    if (this._allowSynchronousEvents) {\n      this.emit(this._opcode === 0x09 ? 'ping' : 'pong', data);\n      this._state = GET_INFO;\n    } else {\n      this._state = DEFER_EVENT;\n      setImmediate(() => {\n        this.emit(this._opcode === 0x09 ? 'ping' : 'pong', data);\n        this._state = GET_INFO;\n        this.startLoop(cb);\n      });\n    }\n  }\n\n  /**\n   * Builds an error object.\n   *\n   * @param {function(new:Error|RangeError)} ErrorCtor The error constructor\n   * @param {String} message The error message\n   * @param {Boolean} prefix Specifies whether or not to add a default prefix to\n   *     `message`\n   * @param {Number} statusCode The status code\n   * @param {String} errorCode The exposed error code\n   * @return {(Error|RangeError)} The error\n   * @private\n   */\n  createError(ErrorCtor, message, prefix, statusCode, errorCode) {\n    this._loop = false;\n    this._errored = true;\n\n    const err = new ErrorCtor(\n      prefix ? `Invalid WebSocket frame: ${message}` : message\n    );\n\n    Error.captureStackTrace(err, this.createError);\n    err.code = errorCode;\n    err[kStatusCode] = statusCode;\n    return err;\n  }\n}\n\nmodule.exports = Receiver;\n","/* eslint no-unused-vars: [\"error\", { \"varsIgnorePattern\": \"^Duplex\" }] */\n\n'use strict';\n\nconst { Duplex } = require('stream');\nconst { randomFillSync } = require('crypto');\n\nconst PerMessageDeflate = require('./permessage-deflate');\nconst { EMPTY_BUFFER, kWebSocket, NOOP } = require('./constants');\nconst { isBlob, isValidStatusCode } = require('./validation');\nconst { mask: applyMask, toBuffer } = require('./buffer-util');\n\nconst kByteLength = Symbol('kByteLength');\nconst maskBuffer = Buffer.alloc(4);\nconst RANDOM_POOL_SIZE = 8 * 1024;\nlet randomPool;\nlet randomPoolPointer = RANDOM_POOL_SIZE;\n\nconst DEFAULT = 0;\nconst DEFLATING = 1;\nconst GET_BLOB_DATA = 2;\n\n/**\n * HyBi Sender implementation.\n */\nclass Sender {\n  /**\n   * Creates a Sender instance.\n   *\n   * @param {Duplex} socket The connection socket\n   * @param {Object} [extensions] An object containing the negotiated extensions\n   * @param {Function} [generateMask] The function used to generate the masking\n   *     key\n   */\n  constructor(socket, extensions, generateMask) {\n    this._extensions = extensions || {};\n\n    if (generateMask) {\n      this._generateMask = generateMask;\n      this._maskBuffer = Buffer.alloc(4);\n    }\n\n    this._socket = socket;\n\n    this._firstFragment = true;\n    this._compress = false;\n\n    this._bufferedBytes = 0;\n    this._queue = [];\n    this._state = DEFAULT;\n    this.onerror = NOOP;\n    this[kWebSocket] = undefined;\n  }\n\n  /**\n   * Frames a piece of data according to the HyBi WebSocket protocol.\n   *\n   * @param {(Buffer|String)} data The data to frame\n   * @param {Object} options Options object\n   * @param {Boolean} [options.fin=false] Specifies whether or not to set the\n   *     FIN bit\n   * @param {Function} [options.generateMask] The function used to generate the\n   *     masking key\n   * @param {Boolean} [options.mask=false] Specifies whether or not to mask\n   *     `data`\n   * @param {Buffer} [options.maskBuffer] The buffer used to store the masking\n   *     key\n   * @param {Number} options.opcode The opcode\n   * @param {Boolean} [options.readOnly=false] Specifies whether `data` can be\n   *     modified\n   * @param {Boolean} [options.rsv1=false] Specifies whether or not to set the\n   *     RSV1 bit\n   * @return {(Buffer|String)[]} The framed data\n   * @public\n   */\n  static frame(data, options) {\n    let mask;\n    let merge = false;\n    let offset = 2;\n    let skipMasking = false;\n\n    if (options.mask) {\n      mask = options.maskBuffer || maskBuffer;\n\n      if (options.generateMask) {\n        options.generateMask(mask);\n      } else {\n        if (randomPoolPointer === RANDOM_POOL_SIZE) {\n          /* istanbul ignore else  */\n          if (randomPool === undefined) {\n            //\n            // This is lazily initialized because server-sent frames must not\n            // be masked so it may never be used.\n            //\n            randomPool = Buffer.alloc(RANDOM_POOL_SIZE);\n          }\n\n          randomFillSync(randomPool, 0, RANDOM_POOL_SIZE);\n          randomPoolPointer = 0;\n        }\n\n        mask[0] = randomPool[randomPoolPointer++];\n        mask[1] = randomPool[randomPoolPointer++];\n        mask[2] = randomPool[randomPoolPointer++];\n        mask[3] = randomPool[randomPoolPointer++];\n      }\n\n      skipMasking = (mask[0] | mask[1] | mask[2] | mask[3]) === 0;\n      offset = 6;\n    }\n\n    let dataLength;\n\n    if (typeof data === 'string') {\n      if (\n        (!options.mask || skipMasking) &&\n        options[kByteLength] !== undefined\n      ) {\n        dataLength = options[kByteLength];\n      } else {\n        data = Buffer.from(data);\n        dataLength = data.length;\n      }\n    } else {\n      dataLength = data.length;\n      merge = options.mask && options.readOnly && !skipMasking;\n    }\n\n    let payloadLength = dataLength;\n\n    if (dataLength >= 65536) {\n      offset += 8;\n      payloadLength = 127;\n    } else if (dataLength > 125) {\n      offset += 2;\n      payloadLength = 126;\n    }\n\n    const target = Buffer.allocUnsafe(merge ? dataLength + offset : offset);\n\n    target[0] = options.fin ? options.opcode | 0x80 : options.opcode;\n    if (options.rsv1) target[0] |= 0x40;\n\n    target[1] = payloadLength;\n\n    if (payloadLength === 126) {\n      target.writeUInt16BE(dataLength, 2);\n    } else if (payloadLength === 127) {\n      target[2] = target[3] = 0;\n      target.writeUIntBE(dataLength, 4, 6);\n    }\n\n    if (!options.mask) return [target, data];\n\n    target[1] |= 0x80;\n    target[offset - 4] = mask[0];\n    target[offset - 3] = mask[1];\n    target[offset - 2] = mask[2];\n    target[offset - 1] = mask[3];\n\n    if (skipMasking) return [target, data];\n\n    if (merge) {\n      applyMask(data, mask, target, offset, dataLength);\n      return [target];\n    }\n\n    applyMask(data, mask, data, 0, dataLength);\n    return [target, data];\n  }\n\n  /**\n   * Sends a close message to the other peer.\n   *\n   * @param {Number} [code] The status code component of the body\n   * @param {(String|Buffer)} [data] The message component of the body\n   * @param {Boolean} [mask=false] Specifies whether or not to mask the message\n   * @param {Function} [cb] Callback\n   * @public\n   */\n  close(code, data, mask, cb) {\n    let buf;\n\n    if (code === undefined) {\n      buf = EMPTY_BUFFER;\n    } else if (typeof code !== 'number' || !isValidStatusCode(code)) {\n      throw new TypeError('First argument must be a valid error code number');\n    } else if (data === undefined || !data.length) {\n      buf = Buffer.allocUnsafe(2);\n      buf.writeUInt16BE(code, 0);\n    } else {\n      const length = Buffer.byteLength(data);\n\n      if (length > 123) {\n        throw new RangeError('The message must not be greater than 123 bytes');\n      }\n\n      buf = Buffer.allocUnsafe(2 + length);\n      buf.writeUInt16BE(code, 0);\n\n      if (typeof data === 'string') {\n        buf.write(data, 2);\n      } else {\n        buf.set(data, 2);\n      }\n    }\n\n    const options = {\n      [kByteLength]: buf.length,\n      fin: true,\n      generateMask: this._generateMask,\n      mask,\n      maskBuffer: this._maskBuffer,\n      opcode: 0x08,\n      readOnly: false,\n      rsv1: false\n    };\n\n    if (this._state !== DEFAULT) {\n      this.enqueue([this.dispatch, buf, false, options, cb]);\n    } else {\n      this.sendFrame(Sender.frame(buf, options), cb);\n    }\n  }\n\n  /**\n   * Sends a ping message to the other peer.\n   *\n   * @param {*} data The message to send\n   * @param {Boolean} [mask=false] Specifies whether or not to mask `data`\n   * @param {Function} [cb] Callback\n   * @public\n   */\n  ping(data, mask, cb) {\n    let byteLength;\n    let readOnly;\n\n    if (typeof data === 'string') {\n      byteLength = Buffer.byteLength(data);\n      readOnly = false;\n    } else if (isBlob(data)) {\n      byteLength = data.size;\n      readOnly = false;\n    } else {\n      data = toBuffer(data);\n      byteLength = data.length;\n      readOnly = toBuffer.readOnly;\n    }\n\n    if (byteLength > 125) {\n      throw new RangeError('The data size must not be greater than 125 bytes');\n    }\n\n    const options = {\n      [kByteLength]: byteLength,\n      fin: true,\n      generateMask: this._generateMask,\n      mask,\n      maskBuffer: this._maskBuffer,\n      opcode: 0x09,\n      readOnly,\n      rsv1: false\n    };\n\n    if (isBlob(data)) {\n      if (this._state !== DEFAULT) {\n        this.enqueue([this.getBlobData, data, false, options, cb]);\n      } else {\n        this.getBlobData(data, false, options, cb);\n      }\n    } else if (this._state !== DEFAULT) {\n      this.enqueue([this.dispatch, data, false, options, cb]);\n    } else {\n      this.sendFrame(Sender.frame(data, options), cb);\n    }\n  }\n\n  /**\n   * Sends a pong message to the other peer.\n   *\n   * @param {*} data The message to send\n   * @param {Boolean} [mask=false] Specifies whether or not to mask `data`\n   * @param {Function} [cb] Callback\n   * @public\n   */\n  pong(data, mask, cb) {\n    let byteLength;\n    let readOnly;\n\n    if (typeof data === 'string') {\n      byteLength = Buffer.byteLength(data);\n      readOnly = false;\n    } else if (isBlob(data)) {\n      byteLength = data.size;\n      readOnly = false;\n    } else {\n      data = toBuffer(data);\n      byteLength = data.length;\n      readOnly = toBuffer.readOnly;\n    }\n\n    if (byteLength > 125) {\n      throw new RangeError('The data size must not be greater than 125 bytes');\n    }\n\n    const options = {\n      [kByteLength]: byteLength,\n      fin: true,\n      generateMask: this._generateMask,\n      mask,\n      maskBuffer: this._maskBuffer,\n      opcode: 0x0a,\n      readOnly,\n      rsv1: false\n    };\n\n    if (isBlob(data)) {\n      if (this._state !== DEFAULT) {\n        this.enqueue([this.getBlobData, data, false, options, cb]);\n      } else {\n        this.getBlobData(data, false, options, cb);\n      }\n    } else if (this._state !== DEFAULT) {\n      this.enqueue([this.dispatch, data, false, options, cb]);\n    } else {\n      this.sendFrame(Sender.frame(data, options), cb);\n    }\n  }\n\n  /**\n   * Sends a data message to the other peer.\n   *\n   * @param {*} data The message to send\n   * @param {Object} options Options object\n   * @param {Boolean} [options.binary=false] Specifies whether `data` is binary\n   *     or text\n   * @param {Boolean} [options.compress=false] Specifies whether or not to\n   *     compress `data`\n   * @param {Boolean} [options.fin=false] Specifies whether the fragment is the\n   *     last one\n   * @param {Boolean} [options.mask=false] Specifies whether or not to mask\n   *     `data`\n   * @param {Function} [cb] Callback\n   * @public\n   */\n  send(data, options, cb) {\n    const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName];\n    let opcode = options.binary ? 2 : 1;\n    let rsv1 = options.compress;\n\n    let byteLength;\n    let readOnly;\n\n    if (typeof data === 'string') {\n      byteLength = Buffer.byteLength(data);\n      readOnly = false;\n    } else if (isBlob(data)) {\n      byteLength = data.size;\n      readOnly = false;\n    } else {\n      data = toBuffer(data);\n      byteLength = data.length;\n      readOnly = toBuffer.readOnly;\n    }\n\n    if (this._firstFragment) {\n      this._firstFragment = false;\n      if (\n        rsv1 &&\n        perMessageDeflate &&\n        perMessageDeflate.params[\n          perMessageDeflate._isServer\n            ? 'server_no_context_takeover'\n            : 'client_no_context_takeover'\n        ]\n      ) {\n        rsv1 = byteLength >= perMessageDeflate._threshold;\n      }\n      this._compress = rsv1;\n    } else {\n      rsv1 = false;\n      opcode = 0;\n    }\n\n    if (options.fin) this._firstFragment = true;\n\n    const opts = {\n      [kByteLength]: byteLength,\n      fin: options.fin,\n      generateMask: this._generateMask,\n      mask: options.mask,\n      maskBuffer: this._maskBuffer,\n      opcode,\n      readOnly,\n      rsv1\n    };\n\n    if (isBlob(data)) {\n      if (this._state !== DEFAULT) {\n        this.enqueue([this.getBlobData, data, this._compress, opts, cb]);\n      } else {\n        this.getBlobData(data, this._compress, opts, cb);\n      }\n    } else if (this._state !== DEFAULT) {\n      this.enqueue([this.dispatch, data, this._compress, opts, cb]);\n    } else {\n      this.dispatch(data, this._compress, opts, cb);\n    }\n  }\n\n  /**\n   * Gets the contents of a blob as binary data.\n   *\n   * @param {Blob} blob The blob\n   * @param {Boolean} [compress=false] Specifies whether or not to compress\n   *     the data\n   * @param {Object} options Options object\n   * @param {Boolean} [options.fin=false] Specifies whether or not to set the\n   *     FIN bit\n   * @param {Function} [options.generateMask] The function used to generate the\n   *     masking key\n   * @param {Boolean} [options.mask=false] Specifies whether or not to mask\n   *     `data`\n   * @param {Buffer} [options.maskBuffer] The buffer used to store the masking\n   *     key\n   * @param {Number} options.opcode The opcode\n   * @param {Boolean} [options.readOnly=false] Specifies whether `data` can be\n   *     modified\n   * @param {Boolean} [options.rsv1=false] Specifies whether or not to set the\n   *     RSV1 bit\n   * @param {Function} [cb] Callback\n   * @private\n   */\n  getBlobData(blob, compress, options, cb) {\n    this._bufferedBytes += options[kByteLength];\n    this._state = GET_BLOB_DATA;\n\n    blob\n      .arrayBuffer()\n      .then((arrayBuffer) => {\n        if (this._socket.destroyed) {\n          const err = new Error(\n            'The socket was closed while the blob was being read'\n          );\n\n          //\n          // `callCallbacks` is called in the next tick to ensure that errors\n          // that might be thrown in the callbacks behave like errors thrown\n          // outside the promise chain.\n          //\n          process.nextTick(callCallbacks, this, err, cb);\n          return;\n        }\n\n        this._bufferedBytes -= options[kByteLength];\n        const data = toBuffer(arrayBuffer);\n\n        if (!compress) {\n          this._state = DEFAULT;\n          this.sendFrame(Sender.frame(data, options), cb);\n          this.dequeue();\n        } else {\n          this.dispatch(data, compress, options, cb);\n        }\n      })\n      .catch((err) => {\n        //\n        // `onError` is called in the next tick for the same reason that\n        // `callCallbacks` above is.\n        //\n        process.nextTick(onError, this, err, cb);\n      });\n  }\n\n  /**\n   * Dispatches a message.\n   *\n   * @param {(Buffer|String)} data The message to send\n   * @param {Boolean} [compress=false] Specifies whether or not to compress\n   *     `data`\n   * @param {Object} options Options object\n   * @param {Boolean} [options.fin=false] Specifies whether or not to set the\n   *     FIN bit\n   * @param {Function} [options.generateMask] The function used to generate the\n   *     masking key\n   * @param {Boolean} [options.mask=false] Specifies whether or not to mask\n   *     `data`\n   * @param {Buffer} [options.maskBuffer] The buffer used to store the masking\n   *     key\n   * @param {Number} options.opcode The opcode\n   * @param {Boolean} [options.readOnly=false] Specifies whether `data` can be\n   *     modified\n   * @param {Boolean} [options.rsv1=false] Specifies whether or not to set the\n   *     RSV1 bit\n   * @param {Function} [cb] Callback\n   * @private\n   */\n  dispatch(data, compress, options, cb) {\n    if (!compress) {\n      this.sendFrame(Sender.frame(data, options), cb);\n      return;\n    }\n\n    const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName];\n\n    this._bufferedBytes += options[kByteLength];\n    this._state = DEFLATING;\n    perMessageDeflate.compress(data, options.fin, (_, buf) => {\n      if (this._socket.destroyed) {\n        const err = new Error(\n          'The socket was closed while data was being compressed'\n        );\n\n        callCallbacks(this, err, cb);\n        return;\n      }\n\n      this._bufferedBytes -= options[kByteLength];\n      this._state = DEFAULT;\n      options.readOnly = false;\n      this.sendFrame(Sender.frame(buf, options), cb);\n      this.dequeue();\n    });\n  }\n\n  /**\n   * Executes queued send operations.\n   *\n   * @private\n   */\n  dequeue() {\n    while (this._state === DEFAULT && this._queue.length) {\n      const params = this._queue.shift();\n\n      this._bufferedBytes -= params[3][kByteLength];\n      Reflect.apply(params[0], this, params.slice(1));\n    }\n  }\n\n  /**\n   * Enqueues a send operation.\n   *\n   * @param {Array} params Send operation parameters.\n   * @private\n   */\n  enqueue(params) {\n    this._bufferedBytes += params[3][kByteLength];\n    this._queue.push(params);\n  }\n\n  /**\n   * Sends a frame.\n   *\n   * @param {(Buffer | String)[]} list The frame to send\n   * @param {Function} [cb] Callback\n   * @private\n   */\n  sendFrame(list, cb) {\n    if (list.length === 2) {\n      this._socket.cork();\n      this._socket.write(list[0]);\n      this._socket.write(list[1], cb);\n      this._socket.uncork();\n    } else {\n      this._socket.write(list[0], cb);\n    }\n  }\n}\n\nmodule.exports = Sender;\n\n/**\n * Calls queued callbacks with an error.\n *\n * @param {Sender} sender The `Sender` instance\n * @param {Error} err The error to call the callbacks with\n * @param {Function} [cb] The first callback\n * @private\n */\nfunction callCallbacks(sender, err, cb) {\n  if (typeof cb === 'function') cb(err);\n\n  for (let i = 0; i < sender._queue.length; i++) {\n    const params = sender._queue[i];\n    const callback = params[params.length - 1];\n\n    if (typeof callback === 'function') callback(err);\n  }\n}\n\n/**\n * Handles a `Sender` error.\n *\n * @param {Sender} sender The `Sender` instance\n * @param {Error} err The error\n * @param {Function} [cb] The first pending callback\n * @private\n */\nfunction onError(sender, err, cb) {\n  callCallbacks(sender, err, cb);\n  sender.onerror(err);\n}\n","'use strict';\n\nconst { kForOnEventAttribute, kListener } = require('./constants');\n\nconst kCode = Symbol('kCode');\nconst kData = Symbol('kData');\nconst kError = Symbol('kError');\nconst kMessage = Symbol('kMessage');\nconst kReason = Symbol('kReason');\nconst kTarget = Symbol('kTarget');\nconst kType = Symbol('kType');\nconst kWasClean = Symbol('kWasClean');\n\n/**\n * Class representing an event.\n */\nclass Event {\n  /**\n   * Create a new `Event`.\n   *\n   * @param {String} type The name of the event\n   * @throws {TypeError} If the `type` argument is not specified\n   */\n  constructor(type) {\n    this[kTarget] = null;\n    this[kType] = type;\n  }\n\n  /**\n   * @type {*}\n   */\n  get target() {\n    return this[kTarget];\n  }\n\n  /**\n   * @type {String}\n   */\n  get type() {\n    return this[kType];\n  }\n}\n\nObject.defineProperty(Event.prototype, 'target', { enumerable: true });\nObject.defineProperty(Event.prototype, 'type', { enumerable: true });\n\n/**\n * Class representing a close event.\n *\n * @extends Event\n */\nclass CloseEvent extends Event {\n  /**\n   * Create a new `CloseEvent`.\n   *\n   * @param {String} type The name of the event\n   * @param {Object} [options] A dictionary object that allows for setting\n   *     attributes via object members of the same name\n   * @param {Number} [options.code=0] The status code explaining why the\n   *     connection was closed\n   * @param {String} [options.reason=''] A human-readable string explaining why\n   *     the connection was closed\n   * @param {Boolean} [options.wasClean=false] Indicates whether or not the\n   *     connection was cleanly closed\n   */\n  constructor(type, options = {}) {\n    super(type);\n\n    this[kCode] = options.code === undefined ? 0 : options.code;\n    this[kReason] = options.reason === undefined ? '' : options.reason;\n    this[kWasClean] = options.wasClean === undefined ? false : options.wasClean;\n  }\n\n  /**\n   * @type {Number}\n   */\n  get code() {\n    return this[kCode];\n  }\n\n  /**\n   * @type {String}\n   */\n  get reason() {\n    return this[kReason];\n  }\n\n  /**\n   * @type {Boolean}\n   */\n  get wasClean() {\n    return this[kWasClean];\n  }\n}\n\nObject.defineProperty(CloseEvent.prototype, 'code', { enumerable: true });\nObject.defineProperty(CloseEvent.prototype, 'reason', { enumerable: true });\nObject.defineProperty(CloseEvent.prototype, 'wasClean', { enumerable: true });\n\n/**\n * Class representing an error event.\n *\n * @extends Event\n */\nclass ErrorEvent extends Event {\n  /**\n   * Create a new `ErrorEvent`.\n   *\n   * @param {String} type The name of the event\n   * @param {Object} [options] A dictionary object that allows for setting\n   *     attributes via object members of the same name\n   * @param {*} [options.error=null] The error that generated this event\n   * @param {String} [options.message=''] The error message\n   */\n  constructor(type, options = {}) {\n    super(type);\n\n    this[kError] = options.error === undefined ? null : options.error;\n    this[kMessage] = options.message === undefined ? '' : options.message;\n  }\n\n  /**\n   * @type {*}\n   */\n  get error() {\n    return this[kError];\n  }\n\n  /**\n   * @type {String}\n   */\n  get message() {\n    return this[kMessage];\n  }\n}\n\nObject.defineProperty(ErrorEvent.prototype, 'error', { enumerable: true });\nObject.defineProperty(ErrorEvent.prototype, 'message', { enumerable: true });\n\n/**\n * Class representing a message event.\n *\n * @extends Event\n */\nclass MessageEvent extends Event {\n  /**\n   * Create a new `MessageEvent`.\n   *\n   * @param {String} type The name of the event\n   * @param {Object} [options] A dictionary object that allows for setting\n   *     attributes via object members of the same name\n   * @param {*} [options.data=null] The message content\n   */\n  constructor(type, options = {}) {\n    super(type);\n\n    this[kData] = options.data === undefined ? null : options.data;\n  }\n\n  /**\n   * @type {*}\n   */\n  get data() {\n    return this[kData];\n  }\n}\n\nObject.defineProperty(MessageEvent.prototype, 'data', { enumerable: true });\n\n/**\n * This provides methods for emulating the `EventTarget` interface. It's not\n * meant to be used directly.\n *\n * @mixin\n */\nconst EventTarget = {\n  /**\n   * Register an event listener.\n   *\n   * @param {String} type A string representing the event type to listen for\n   * @param {(Function|Object)} handler The listener to add\n   * @param {Object} [options] An options object specifies characteristics about\n   *     the event listener\n   * @param {Boolean} [options.once=false] A `Boolean` indicating that the\n   *     listener should be invoked at most once after being added. If `true`,\n   *     the listener would be automatically removed when invoked.\n   * @public\n   */\n  addEventListener(type, handler, options = {}) {\n    for (const listener of this.listeners(type)) {\n      if (\n        !options[kForOnEventAttribute] &&\n        listener[kListener] === handler &&\n        !listener[kForOnEventAttribute]\n      ) {\n        return;\n      }\n    }\n\n    let wrapper;\n\n    if (type === 'message') {\n      wrapper = function onMessage(data, isBinary) {\n        const event = new MessageEvent('message', {\n          data: isBinary ? data : data.toString()\n        });\n\n        event[kTarget] = this;\n        callListener(handler, this, event);\n      };\n    } else if (type === 'close') {\n      wrapper = function onClose(code, message) {\n        const event = new CloseEvent('close', {\n          code,\n          reason: message.toString(),\n          wasClean: this._closeFrameReceived && this._closeFrameSent\n        });\n\n        event[kTarget] = this;\n        callListener(handler, this, event);\n      };\n    } else if (type === 'error') {\n      wrapper = function onError(error) {\n        const event = new ErrorEvent('error', {\n          error,\n          message: error.message\n        });\n\n        event[kTarget] = this;\n        callListener(handler, this, event);\n      };\n    } else if (type === 'open') {\n      wrapper = function onOpen() {\n        const event = new Event('open');\n\n        event[kTarget] = this;\n        callListener(handler, this, event);\n      };\n    } else {\n      return;\n    }\n\n    wrapper[kForOnEventAttribute] = !!options[kForOnEventAttribute];\n    wrapper[kListener] = handler;\n\n    if (options.once) {\n      this.once(type, wrapper);\n    } else {\n      this.on(type, wrapper);\n    }\n  },\n\n  /**\n   * Remove an event listener.\n   *\n   * @param {String} type A string representing the event type to remove\n   * @param {(Function|Object)} handler The listener to remove\n   * @public\n   */\n  removeEventListener(type, handler) {\n    for (const listener of this.listeners(type)) {\n      if (listener[kListener] === handler && !listener[kForOnEventAttribute]) {\n        this.removeListener(type, listener);\n        break;\n      }\n    }\n  }\n};\n\nmodule.exports = {\n  CloseEvent,\n  ErrorEvent,\n  Event,\n  EventTarget,\n  MessageEvent\n};\n\n/**\n * Call an event listener\n *\n * @param {(Function|Object)} listener The listener to call\n * @param {*} thisArg The value to use as `this`` when calling the listener\n * @param {Event} event The event to pass to the listener\n * @private\n */\nfunction callListener(listener, thisArg, event) {\n  if (typeof listener === 'object' && listener.handleEvent) {\n    listener.handleEvent.call(listener, event);\n  } else {\n    listener.call(thisArg, event);\n  }\n}\n","'use strict';\n\nconst { tokenChars } = require('./validation');\n\n/**\n * Adds an offer to the map of extension offers or a parameter to the map of\n * parameters.\n *\n * @param {Object} dest The map of extension offers or parameters\n * @param {String} name The extension or parameter name\n * @param {(Object|Boolean|String)} elem The extension parameters or the\n *     parameter value\n * @private\n */\nfunction push(dest, name, elem) {\n  if (dest[name] === undefined) dest[name] = [elem];\n  else dest[name].push(elem);\n}\n\n/**\n * Parses the `Sec-WebSocket-Extensions` header into an object.\n *\n * @param {String} header The field value of the header\n * @return {Object} The parsed object\n * @public\n */\nfunction parse(header) {\n  const offers = Object.create(null);\n  let params = Object.create(null);\n  let mustUnescape = false;\n  let isEscaping = false;\n  let inQuotes = false;\n  let extensionName;\n  let paramName;\n  let start = -1;\n  let code = -1;\n  let end = -1;\n  let i = 0;\n\n  for (; i < header.length; i++) {\n    code = header.charCodeAt(i);\n\n    if (extensionName === undefined) {\n      if (end === -1 && tokenChars[code] === 1) {\n        if (start === -1) start = i;\n      } else if (\n        i !== 0 &&\n        (code === 0x20 /* ' ' */ || code === 0x09) /* '\\t' */\n      ) {\n        if (end === -1 && start !== -1) end = i;\n      } else if (code === 0x3b /* ';' */ || code === 0x2c /* ',' */) {\n        if (start === -1) {\n          throw new SyntaxError(`Unexpected character at index ${i}`);\n        }\n\n        if (end === -1) end = i;\n        const name = header.slice(start, end);\n        if (code === 0x2c) {\n          push(offers, name, params);\n          params = Object.create(null);\n        } else {\n          extensionName = name;\n        }\n\n        start = end = -1;\n      } else {\n        throw new SyntaxError(`Unexpected character at index ${i}`);\n      }\n    } else if (paramName === undefined) {\n      if (end === -1 && tokenChars[code] === 1) {\n        if (start === -1) start = i;\n      } else if (code === 0x20 || code === 0x09) {\n        if (end === -1 && start !== -1) end = i;\n      } else if (code === 0x3b || code === 0x2c) {\n        if (start === -1) {\n          throw new SyntaxError(`Unexpected character at index ${i}`);\n        }\n\n        if (end === -1) end = i;\n        push(params, header.slice(start, end), true);\n        if (code === 0x2c) {\n          push(offers, extensionName, params);\n          params = Object.create(null);\n          extensionName = undefined;\n        }\n\n        start = end = -1;\n      } else if (code === 0x3d /* '=' */ && start !== -1 && end === -1) {\n        paramName = header.slice(start, i);\n        start = end = -1;\n      } else {\n        throw new SyntaxError(`Unexpected character at index ${i}`);\n      }\n    } else {\n      //\n      // The value of a quoted-string after unescaping must conform to the\n      // token ABNF, so only token characters are valid.\n      // Ref: https://tools.ietf.org/html/rfc6455#section-9.1\n      //\n      if (isEscaping) {\n        if (tokenChars[code] !== 1) {\n          throw new SyntaxError(`Unexpected character at index ${i}`);\n        }\n        if (start === -1) start = i;\n        else if (!mustUnescape) mustUnescape = true;\n        isEscaping = false;\n      } else if (inQuotes) {\n        if (tokenChars[code] === 1) {\n          if (start === -1) start = i;\n        } else if (code === 0x22 /* '\"' */ && start !== -1) {\n          inQuotes = false;\n          end = i;\n        } else if (code === 0x5c /* '\\' */) {\n          isEscaping = true;\n        } else {\n          throw new SyntaxError(`Unexpected character at index ${i}`);\n        }\n      } else if (code === 0x22 && header.charCodeAt(i - 1) === 0x3d) {\n        inQuotes = true;\n      } else if (end === -1 && tokenChars[code] === 1) {\n        if (start === -1) start = i;\n      } else if (start !== -1 && (code === 0x20 || code === 0x09)) {\n        if (end === -1) end = i;\n      } else if (code === 0x3b || code === 0x2c) {\n        if (start === -1) {\n          throw new SyntaxError(`Unexpected character at index ${i}`);\n        }\n\n        if (end === -1) end = i;\n        let value = header.slice(start, end);\n        if (mustUnescape) {\n          value = value.replace(/\\\\/g, '');\n          mustUnescape = false;\n        }\n        push(params, paramName, value);\n        if (code === 0x2c) {\n          push(offers, extensionName, params);\n          params = Object.create(null);\n          extensionName = undefined;\n        }\n\n        paramName = undefined;\n        start = end = -1;\n      } else {\n        throw new SyntaxError(`Unexpected character at index ${i}`);\n      }\n    }\n  }\n\n  if (start === -1 || inQuotes || code === 0x20 || code === 0x09) {\n    throw new SyntaxError('Unexpected end of input');\n  }\n\n  if (end === -1) end = i;\n  const token = header.slice(start, end);\n  if (extensionName === undefined) {\n    push(offers, token, params);\n  } else {\n    if (paramName === undefined) {\n      push(params, token, true);\n    } else if (mustUnescape) {\n      push(params, paramName, token.replace(/\\\\/g, ''));\n    } else {\n      push(params, paramName, token);\n    }\n    push(offers, extensionName, params);\n  }\n\n  return offers;\n}\n\n/**\n * Builds the `Sec-WebSocket-Extensions` header field value.\n *\n * @param {Object} extensions The map of extensions and parameters to format\n * @return {String} A string representing the given object\n * @public\n */\nfunction format(extensions) {\n  return Object.keys(extensions)\n    .map((extension) => {\n      let configurations = extensions[extension];\n      if (!Array.isArray(configurations)) configurations = [configurations];\n      return configurations\n        .map((params) => {\n          return [extension]\n            .concat(\n              Object.keys(params).map((k) => {\n                let values = params[k];\n                if (!Array.isArray(values)) values = [values];\n                return values\n                  .map((v) => (v === true ? k : `${k}=${v}`))\n                  .join('; ');\n              })\n            )\n            .join('; ');\n        })\n        .join(', ');\n    })\n    .join(', ');\n}\n\nmodule.exports = { format, parse };\n","/* eslint no-unused-vars: [\"error\", { \"varsIgnorePattern\": \"^Duplex|Readable$\", \"caughtErrors\": \"none\" }] */\n\n'use strict';\n\nconst EventEmitter = require('events');\nconst https = require('https');\nconst http = require('http');\nconst net = require('net');\nconst tls = require('tls');\nconst { randomBytes, createHash } = require('crypto');\nconst { Duplex, Readable } = require('stream');\nconst { URL } = require('url');\n\nconst PerMessageDeflate = require('./permessage-deflate');\nconst Receiver = require('./receiver');\nconst Sender = require('./sender');\nconst { isBlob } = require('./validation');\n\nconst {\n  BINARY_TYPES,\n  EMPTY_BUFFER,\n  GUID,\n  kForOnEventAttribute,\n  kListener,\n  kStatusCode,\n  kWebSocket,\n  NOOP\n} = require('./constants');\nconst {\n  EventTarget: { addEventListener, removeEventListener }\n} = require('./event-target');\nconst { format, parse } = require('./extension');\nconst { toBuffer } = require('./buffer-util');\n\nconst closeTimeout = 30 * 1000;\nconst kAborted = Symbol('kAborted');\nconst protocolVersions = [8, 13];\nconst readyStates = ['CONNECTING', 'OPEN', 'CLOSING', 'CLOSED'];\nconst subprotocolRegex = /^[!#$%&'*+\\-.0-9A-Z^_`|a-z~]+$/;\n\n/**\n * Class representing a WebSocket.\n *\n * @extends EventEmitter\n */\nclass WebSocket extends EventEmitter {\n  /**\n   * Create a new `WebSocket`.\n   *\n   * @param {(String|URL)} address The URL to which to connect\n   * @param {(String|String[])} [protocols] The subprotocols\n   * @param {Object} [options] Connection options\n   */\n  constructor(address, protocols, options) {\n    super();\n\n    this._binaryType = BINARY_TYPES[0];\n    this._closeCode = 1006;\n    this._closeFrameReceived = false;\n    this._closeFrameSent = false;\n    this._closeMessage = EMPTY_BUFFER;\n    this._closeTimer = null;\n    this._errorEmitted = false;\n    this._extensions = {};\n    this._paused = false;\n    this._protocol = '';\n    this._readyState = WebSocket.CONNECTING;\n    this._receiver = null;\n    this._sender = null;\n    this._socket = null;\n\n    if (address !== null) {\n      this._bufferedAmount = 0;\n      this._isServer = false;\n      this._redirects = 0;\n\n      if (protocols === undefined) {\n        protocols = [];\n      } else if (!Array.isArray(protocols)) {\n        if (typeof protocols === 'object' && protocols !== null) {\n          options = protocols;\n          protocols = [];\n        } else {\n          protocols = [protocols];\n        }\n      }\n\n      initAsClient(this, address, protocols, options);\n    } else {\n      this._autoPong = options.autoPong;\n      this._isServer = true;\n    }\n  }\n\n  /**\n   * For historical reasons, the custom \"nodebuffer\" type is used by the default\n   * instead of \"blob\".\n   *\n   * @type {String}\n   */\n  get binaryType() {\n    return this._binaryType;\n  }\n\n  set binaryType(type) {\n    if (!BINARY_TYPES.includes(type)) return;\n\n    this._binaryType = type;\n\n    //\n    // Allow to change `binaryType` on the fly.\n    //\n    if (this._receiver) this._receiver._binaryType = type;\n  }\n\n  /**\n   * @type {Number}\n   */\n  get bufferedAmount() {\n    if (!this._socket) return this._bufferedAmount;\n\n    return this._socket._writableState.length + this._sender._bufferedBytes;\n  }\n\n  /**\n   * @type {String}\n   */\n  get extensions() {\n    return Object.keys(this._extensions).join();\n  }\n\n  /**\n   * @type {Boolean}\n   */\n  get isPaused() {\n    return this._paused;\n  }\n\n  /**\n   * @type {Function}\n   */\n  /* istanbul ignore next */\n  get onclose() {\n    return null;\n  }\n\n  /**\n   * @type {Function}\n   */\n  /* istanbul ignore next */\n  get onerror() {\n    return null;\n  }\n\n  /**\n   * @type {Function}\n   */\n  /* istanbul ignore next */\n  get onopen() {\n    return null;\n  }\n\n  /**\n   * @type {Function}\n   */\n  /* istanbul ignore next */\n  get onmessage() {\n    return null;\n  }\n\n  /**\n   * @type {String}\n   */\n  get protocol() {\n    return this._protocol;\n  }\n\n  /**\n   * @type {Number}\n   */\n  get readyState() {\n    return this._readyState;\n  }\n\n  /**\n   * @type {String}\n   */\n  get url() {\n    return this._url;\n  }\n\n  /**\n   * Set up the socket and the internal resources.\n   *\n   * @param {Duplex} socket The network socket between the server and client\n   * @param {Buffer} head The first packet of the upgraded stream\n   * @param {Object} options Options object\n   * @param {Boolean} [options.allowSynchronousEvents=false] Specifies whether\n   *     any of the `'message'`, `'ping'`, and `'pong'` events can be emitted\n   *     multiple times in the same tick\n   * @param {Function} [options.generateMask] The function used to generate the\n   *     masking key\n   * @param {Number} [options.maxPayload=0] The maximum allowed message size\n   * @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or\n   *     not to skip UTF-8 validation for text and close messages\n   * @private\n   */\n  setSocket(socket, head, options) {\n    const receiver = new Receiver({\n      allowSynchronousEvents: options.allowSynchronousEvents,\n      binaryType: this.binaryType,\n      extensions: this._extensions,\n      isServer: this._isServer,\n      maxPayload: options.maxPayload,\n      skipUTF8Validation: options.skipUTF8Validation\n    });\n\n    const sender = new Sender(socket, this._extensions, options.generateMask);\n\n    this._receiver = receiver;\n    this._sender = sender;\n    this._socket = socket;\n\n    receiver[kWebSocket] = this;\n    sender[kWebSocket] = this;\n    socket[kWebSocket] = this;\n\n    receiver.on('conclude', receiverOnConclude);\n    receiver.on('drain', receiverOnDrain);\n    receiver.on('error', receiverOnError);\n    receiver.on('message', receiverOnMessage);\n    receiver.on('ping', receiverOnPing);\n    receiver.on('pong', receiverOnPong);\n\n    sender.onerror = senderOnError;\n\n    //\n    // These methods may not be available if `socket` is just a `Duplex`.\n    //\n    if (socket.setTimeout) socket.setTimeout(0);\n    if (socket.setNoDelay) socket.setNoDelay();\n\n    if (head.length > 0) socket.unshift(head);\n\n    socket.on('close', socketOnClose);\n    socket.on('data', socketOnData);\n    socket.on('end', socketOnEnd);\n    socket.on('error', socketOnError);\n\n    this._readyState = WebSocket.OPEN;\n    this.emit('open');\n  }\n\n  /**\n   * Emit the `'close'` event.\n   *\n   * @private\n   */\n  emitClose() {\n    if (!this._socket) {\n      this._readyState = WebSocket.CLOSED;\n      this.emit('close', this._closeCode, this._closeMessage);\n      return;\n    }\n\n    if (this._extensions[PerMessageDeflate.extensionName]) {\n      this._extensions[PerMessageDeflate.extensionName].cleanup();\n    }\n\n    this._receiver.removeAllListeners();\n    this._readyState = WebSocket.CLOSED;\n    this.emit('close', this._closeCode, this._closeMessage);\n  }\n\n  /**\n   * Start a closing handshake.\n   *\n   *          +----------+   +-----------+   +----------+\n   *     - - -|ws.close()|-->|close frame|-->|ws.close()|- - -\n   *    |     +----------+   +-----------+   +----------+     |\n   *          +----------+   +-----------+         |\n   * CLOSING  |ws.close()|<--|close frame|<--+-----+       CLOSING\n   *          +----------+   +-----------+   |\n   *    |           |                        |   +---+        |\n   *                +------------------------+-->|fin| - - - -\n   *    |         +---+                      |   +---+\n   *     - - - - -|fin|<---------------------+\n   *              +---+\n   *\n   * @param {Number} [code] Status code explaining why the connection is closing\n   * @param {(String|Buffer)} [data] The reason why the connection is\n   *     closing\n   * @public\n   */\n  close(code, data) {\n    if (this.readyState === WebSocket.CLOSED) return;\n    if (this.readyState === WebSocket.CONNECTING) {\n      const msg = 'WebSocket was closed before the connection was established';\n      abortHandshake(this, this._req, msg);\n      return;\n    }\n\n    if (this.readyState === WebSocket.CLOSING) {\n      if (\n        this._closeFrameSent &&\n        (this._closeFrameReceived || this._receiver._writableState.errorEmitted)\n      ) {\n        this._socket.end();\n      }\n\n      return;\n    }\n\n    this._readyState = WebSocket.CLOSING;\n    this._sender.close(code, data, !this._isServer, (err) => {\n      //\n      // This error is handled by the `'error'` listener on the socket. We only\n      // want to know if the close frame has been sent here.\n      //\n      if (err) return;\n\n      this._closeFrameSent = true;\n\n      if (\n        this._closeFrameReceived ||\n        this._receiver._writableState.errorEmitted\n      ) {\n        this._socket.end();\n      }\n    });\n\n    setCloseTimer(this);\n  }\n\n  /**\n   * Pause the socket.\n   *\n   * @public\n   */\n  pause() {\n    if (\n      this.readyState === WebSocket.CONNECTING ||\n      this.readyState === WebSocket.CLOSED\n    ) {\n      return;\n    }\n\n    this._paused = true;\n    this._socket.pause();\n  }\n\n  /**\n   * Send a ping.\n   *\n   * @param {*} [data] The data to send\n   * @param {Boolean} [mask] Indicates whether or not to mask `data`\n   * @param {Function} [cb] Callback which is executed when the ping is sent\n   * @public\n   */\n  ping(data, mask, cb) {\n    if (this.readyState === WebSocket.CONNECTING) {\n      throw new Error('WebSocket is not open: readyState 0 (CONNECTING)');\n    }\n\n    if (typeof data === 'function') {\n      cb = data;\n      data = mask = undefined;\n    } else if (typeof mask === 'function') {\n      cb = mask;\n      mask = undefined;\n    }\n\n    if (typeof data === 'number') data = data.toString();\n\n    if (this.readyState !== WebSocket.OPEN) {\n      sendAfterClose(this, data, cb);\n      return;\n    }\n\n    if (mask === undefined) mask = !this._isServer;\n    this._sender.ping(data || EMPTY_BUFFER, mask, cb);\n  }\n\n  /**\n   * Send a pong.\n   *\n   * @param {*} [data] The data to send\n   * @param {Boolean} [mask] Indicates whether or not to mask `data`\n   * @param {Function} [cb] Callback which is executed when the pong is sent\n   * @public\n   */\n  pong(data, mask, cb) {\n    if (this.readyState === WebSocket.CONNECTING) {\n      throw new Error('WebSocket is not open: readyState 0 (CONNECTING)');\n    }\n\n    if (typeof data === 'function') {\n      cb = data;\n      data = mask = undefined;\n    } else if (typeof mask === 'function') {\n      cb = mask;\n      mask = undefined;\n    }\n\n    if (typeof data === 'number') data = data.toString();\n\n    if (this.readyState !== WebSocket.OPEN) {\n      sendAfterClose(this, data, cb);\n      return;\n    }\n\n    if (mask === undefined) mask = !this._isServer;\n    this._sender.pong(data || EMPTY_BUFFER, mask, cb);\n  }\n\n  /**\n   * Resume the socket.\n   *\n   * @public\n   */\n  resume() {\n    if (\n      this.readyState === WebSocket.CONNECTING ||\n      this.readyState === WebSocket.CLOSED\n    ) {\n      return;\n    }\n\n    this._paused = false;\n    if (!this._receiver._writableState.needDrain) this._socket.resume();\n  }\n\n  /**\n   * Send a data message.\n   *\n   * @param {*} data The message to send\n   * @param {Object} [options] Options object\n   * @param {Boolean} [options.binary] Specifies whether `data` is binary or\n   *     text\n   * @param {Boolean} [options.compress] Specifies whether or not to compress\n   *     `data`\n   * @param {Boolean} [options.fin=true] Specifies whether the fragment is the\n   *     last one\n   * @param {Boolean} [options.mask] Specifies whether or not to mask `data`\n   * @param {Function} [cb] Callback which is executed when data is written out\n   * @public\n   */\n  send(data, options, cb) {\n    if (this.readyState === WebSocket.CONNECTING) {\n      throw new Error('WebSocket is not open: readyState 0 (CONNECTING)');\n    }\n\n    if (typeof options === 'function') {\n      cb = options;\n      options = {};\n    }\n\n    if (typeof data === 'number') data = data.toString();\n\n    if (this.readyState !== WebSocket.OPEN) {\n      sendAfterClose(this, data, cb);\n      return;\n    }\n\n    const opts = {\n      binary: typeof data !== 'string',\n      mask: !this._isServer,\n      compress: true,\n      fin: true,\n      ...options\n    };\n\n    if (!this._extensions[PerMessageDeflate.extensionName]) {\n      opts.compress = false;\n    }\n\n    this._sender.send(data || EMPTY_BUFFER, opts, cb);\n  }\n\n  /**\n   * Forcibly close the connection.\n   *\n   * @public\n   */\n  terminate() {\n    if (this.readyState === WebSocket.CLOSED) return;\n    if (this.readyState === WebSocket.CONNECTING) {\n      const msg = 'WebSocket was closed before the connection was established';\n      abortHandshake(this, this._req, msg);\n      return;\n    }\n\n    if (this._socket) {\n      this._readyState = WebSocket.CLOSING;\n      this._socket.destroy();\n    }\n  }\n}\n\n/**\n * @constant {Number} CONNECTING\n * @memberof WebSocket\n */\nObject.defineProperty(WebSocket, 'CONNECTING', {\n  enumerable: true,\n  value: readyStates.indexOf('CONNECTING')\n});\n\n/**\n * @constant {Number} CONNECTING\n * @memberof WebSocket.prototype\n */\nObject.defineProperty(WebSocket.prototype, 'CONNECTING', {\n  enumerable: true,\n  value: readyStates.indexOf('CONNECTING')\n});\n\n/**\n * @constant {Number} OPEN\n * @memberof WebSocket\n */\nObject.defineProperty(WebSocket, 'OPEN', {\n  enumerable: true,\n  value: readyStates.indexOf('OPEN')\n});\n\n/**\n * @constant {Number} OPEN\n * @memberof WebSocket.prototype\n */\nObject.defineProperty(WebSocket.prototype, 'OPEN', {\n  enumerable: true,\n  value: readyStates.indexOf('OPEN')\n});\n\n/**\n * @constant {Number} CLOSING\n * @memberof WebSocket\n */\nObject.defineProperty(WebSocket, 'CLOSING', {\n  enumerable: true,\n  value: readyStates.indexOf('CLOSING')\n});\n\n/**\n * @constant {Number} CLOSING\n * @memberof WebSocket.prototype\n */\nObject.defineProperty(WebSocket.prototype, 'CLOSING', {\n  enumerable: true,\n  value: readyStates.indexOf('CLOSING')\n});\n\n/**\n * @constant {Number} CLOSED\n * @memberof WebSocket\n */\nObject.defineProperty(WebSocket, 'CLOSED', {\n  enumerable: true,\n  value: readyStates.indexOf('CLOSED')\n});\n\n/**\n * @constant {Number} CLOSED\n * @memberof WebSocket.prototype\n */\nObject.defineProperty(WebSocket.prototype, 'CLOSED', {\n  enumerable: true,\n  value: readyStates.indexOf('CLOSED')\n});\n\n[\n  'binaryType',\n  'bufferedAmount',\n  'extensions',\n  'isPaused',\n  'protocol',\n  'readyState',\n  'url'\n].forEach((property) => {\n  Object.defineProperty(WebSocket.prototype, property, { enumerable: true });\n});\n\n//\n// Add the `onopen`, `onerror`, `onclose`, and `onmessage` attributes.\n// See https://html.spec.whatwg.org/multipage/comms.html#the-websocket-interface\n//\n['open', 'error', 'close', 'message'].forEach((method) => {\n  Object.defineProperty(WebSocket.prototype, `on${method}`, {\n    enumerable: true,\n    get() {\n      for (const listener of this.listeners(method)) {\n        if (listener[kForOnEventAttribute]) return listener[kListener];\n      }\n\n      return null;\n    },\n    set(handler) {\n      for (const listener of this.listeners(method)) {\n        if (listener[kForOnEventAttribute]) {\n          this.removeListener(method, listener);\n          break;\n        }\n      }\n\n      if (typeof handler !== 'function') return;\n\n      this.addEventListener(method, handler, {\n        [kForOnEventAttribute]: true\n      });\n    }\n  });\n});\n\nWebSocket.prototype.addEventListener = addEventListener;\nWebSocket.prototype.removeEventListener = removeEventListener;\n\nmodule.exports = WebSocket;\n\n/**\n * Initialize a WebSocket client.\n *\n * @param {WebSocket} websocket The client to initialize\n * @param {(String|URL)} address The URL to which to connect\n * @param {Array} protocols The subprotocols\n * @param {Object} [options] Connection options\n * @param {Boolean} [options.allowSynchronousEvents=true] Specifies whether any\n *     of the `'message'`, `'ping'`, and `'pong'` events can be emitted multiple\n *     times in the same tick\n * @param {Boolean} [options.autoPong=true] Specifies whether or not to\n *     automatically send a pong in response to a ping\n * @param {Function} [options.finishRequest] A function which can be used to\n *     customize the headers of each http request before it is sent\n * @param {Boolean} [options.followRedirects=false] Whether or not to follow\n *     redirects\n * @param {Function} [options.generateMask] The function used to generate the\n *     masking key\n * @param {Number} [options.handshakeTimeout] Timeout in milliseconds for the\n *     handshake request\n * @param {Number} [options.maxPayload=104857600] The maximum allowed message\n *     size\n * @param {Number} [options.maxRedirects=10] The maximum number of redirects\n *     allowed\n * @param {String} [options.origin] Value of the `Origin` or\n *     `Sec-WebSocket-Origin` header\n * @param {(Boolean|Object)} [options.perMessageDeflate=true] Enable/disable\n *     permessage-deflate\n * @param {Number} [options.protocolVersion=13] Value of the\n *     `Sec-WebSocket-Version` header\n * @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or\n *     not to skip UTF-8 validation for text and close messages\n * @private\n */\nfunction initAsClient(websocket, address, protocols, options) {\n  const opts = {\n    allowSynchronousEvents: true,\n    autoPong: true,\n    protocolVersion: protocolVersions[1],\n    maxPayload: 100 * 1024 * 1024,\n    skipUTF8Validation: false,\n    perMessageDeflate: true,\n    followRedirects: false,\n    maxRedirects: 10,\n    ...options,\n    socketPath: undefined,\n    hostname: undefined,\n    protocol: undefined,\n    timeout: undefined,\n    method: 'GET',\n    host: undefined,\n    path: undefined,\n    port: undefined\n  };\n\n  websocket._autoPong = opts.autoPong;\n\n  if (!protocolVersions.includes(opts.protocolVersion)) {\n    throw new RangeError(\n      `Unsupported protocol version: ${opts.protocolVersion} ` +\n        `(supported versions: ${protocolVersions.join(', ')})`\n    );\n  }\n\n  let parsedUrl;\n\n  if (address instanceof URL) {\n    parsedUrl = address;\n  } else {\n    try {\n      parsedUrl = new URL(address);\n    } catch (e) {\n      throw new SyntaxError(`Invalid URL: ${address}`);\n    }\n  }\n\n  if (parsedUrl.protocol === 'http:') {\n    parsedUrl.protocol = 'ws:';\n  } else if (parsedUrl.protocol === 'https:') {\n    parsedUrl.protocol = 'wss:';\n  }\n\n  websocket._url = parsedUrl.href;\n\n  const isSecure = parsedUrl.protocol === 'wss:';\n  const isIpcUrl = parsedUrl.protocol === 'ws+unix:';\n  let invalidUrlMessage;\n\n  if (parsedUrl.protocol !== 'ws:' && !isSecure && !isIpcUrl) {\n    invalidUrlMessage =\n      'The URL\\'s protocol must be one of \"ws:\", \"wss:\", ' +\n      '\"http:\", \"https\", or \"ws+unix:\"';\n  } else if (isIpcUrl && !parsedUrl.pathname) {\n    invalidUrlMessage = \"The URL's pathname is empty\";\n  } else if (parsedUrl.hash) {\n    invalidUrlMessage = 'The URL contains a fragment identifier';\n  }\n\n  if (invalidUrlMessage) {\n    const err = new SyntaxError(invalidUrlMessage);\n\n    if (websocket._redirects === 0) {\n      throw err;\n    } else {\n      emitErrorAndClose(websocket, err);\n      return;\n    }\n  }\n\n  const defaultPort = isSecure ? 443 : 80;\n  const key = randomBytes(16).toString('base64');\n  const request = isSecure ? https.request : http.request;\n  const protocolSet = new Set();\n  let perMessageDeflate;\n\n  opts.createConnection =\n    opts.createConnection || (isSecure ? tlsConnect : netConnect);\n  opts.defaultPort = opts.defaultPort || defaultPort;\n  opts.port = parsedUrl.port || defaultPort;\n  opts.host = parsedUrl.hostname.startsWith('[')\n    ? parsedUrl.hostname.slice(1, -1)\n    : parsedUrl.hostname;\n  opts.headers = {\n    ...opts.headers,\n    'Sec-WebSocket-Version': opts.protocolVersion,\n    'Sec-WebSocket-Key': key,\n    Connection: 'Upgrade',\n    Upgrade: 'websocket'\n  };\n  opts.path = parsedUrl.pathname + parsedUrl.search;\n  opts.timeout = opts.handshakeTimeout;\n\n  if (opts.perMessageDeflate) {\n    perMessageDeflate = new PerMessageDeflate(\n      opts.perMessageDeflate !== true ? opts.perMessageDeflate : {},\n      false,\n      opts.maxPayload\n    );\n    opts.headers['Sec-WebSocket-Extensions'] = format({\n      [PerMessageDeflate.extensionName]: perMessageDeflate.offer()\n    });\n  }\n  if (protocols.length) {\n    for (const protocol of protocols) {\n      if (\n        typeof protocol !== 'string' ||\n        !subprotocolRegex.test(protocol) ||\n        protocolSet.has(protocol)\n      ) {\n        throw new SyntaxError(\n          'An invalid or duplicated subprotocol was specified'\n        );\n      }\n\n      protocolSet.add(protocol);\n    }\n\n    opts.headers['Sec-WebSocket-Protocol'] = protocols.join(',');\n  }\n  if (opts.origin) {\n    if (opts.protocolVersion < 13) {\n      opts.headers['Sec-WebSocket-Origin'] = opts.origin;\n    } else {\n      opts.headers.Origin = opts.origin;\n    }\n  }\n  if (parsedUrl.username || parsedUrl.password) {\n    opts.auth = `${parsedUrl.username}:${parsedUrl.password}`;\n  }\n\n  if (isIpcUrl) {\n    const parts = opts.path.split(':');\n\n    opts.socketPath = parts[0];\n    opts.path = parts[1];\n  }\n\n  let req;\n\n  if (opts.followRedirects) {\n    if (websocket._redirects === 0) {\n      websocket._originalIpc = isIpcUrl;\n      websocket._originalSecure = isSecure;\n      websocket._originalHostOrSocketPath = isIpcUrl\n        ? opts.socketPath\n        : parsedUrl.host;\n\n      const headers = options && options.headers;\n\n      //\n      // Shallow copy the user provided options so that headers can be changed\n      // without mutating the original object.\n      //\n      options = { ...options, headers: {} };\n\n      if (headers) {\n        for (const [key, value] of Object.entries(headers)) {\n          options.headers[key.toLowerCase()] = value;\n        }\n      }\n    } else if (websocket.listenerCount('redirect') === 0) {\n      const isSameHost = isIpcUrl\n        ? websocket._originalIpc\n          ? opts.socketPath === websocket._originalHostOrSocketPath\n          : false\n        : websocket._originalIpc\n          ? false\n          : parsedUrl.host === websocket._originalHostOrSocketPath;\n\n      if (!isSameHost || (websocket._originalSecure && !isSecure)) {\n        //\n        // Match curl 7.77.0 behavior and drop the following headers. These\n        // headers are also dropped when following a redirect to a subdomain.\n        //\n        delete opts.headers.authorization;\n        delete opts.headers.cookie;\n\n        if (!isSameHost) delete opts.headers.host;\n\n        opts.auth = undefined;\n      }\n    }\n\n    //\n    // Match curl 7.77.0 behavior and make the first `Authorization` header win.\n    // If the `Authorization` header is set, then there is nothing to do as it\n    // will take precedence.\n    //\n    if (opts.auth && !options.headers.authorization) {\n      options.headers.authorization =\n        'Basic ' + Buffer.from(opts.auth).toString('base64');\n    }\n\n    req = websocket._req = request(opts);\n\n    if (websocket._redirects) {\n      //\n      // Unlike what is done for the `'upgrade'` event, no early exit is\n      // triggered here if the user calls `websocket.close()` or\n      // `websocket.terminate()` from a listener of the `'redirect'` event. This\n      // is because the user can also call `request.destroy()` with an error\n      // before calling `websocket.close()` or `websocket.terminate()` and this\n      // would result in an error being emitted on the `request` object with no\n      // `'error'` event listeners attached.\n      //\n      websocket.emit('redirect', websocket.url, req);\n    }\n  } else {\n    req = websocket._req = request(opts);\n  }\n\n  if (opts.timeout) {\n    req.on('timeout', () => {\n      abortHandshake(websocket, req, 'Opening handshake has timed out');\n    });\n  }\n\n  req.on('error', (err) => {\n    if (req === null || req[kAborted]) return;\n\n    req = websocket._req = null;\n    emitErrorAndClose(websocket, err);\n  });\n\n  req.on('response', (res) => {\n    const location = res.headers.location;\n    const statusCode = res.statusCode;\n\n    if (\n      location &&\n      opts.followRedirects &&\n      statusCode >= 300 &&\n      statusCode < 400\n    ) {\n      if (++websocket._redirects > opts.maxRedirects) {\n        abortHandshake(websocket, req, 'Maximum redirects exceeded');\n        return;\n      }\n\n      req.abort();\n\n      let addr;\n\n      try {\n        addr = new URL(location, address);\n      } catch (e) {\n        const err = new SyntaxError(`Invalid URL: ${location}`);\n        emitErrorAndClose(websocket, err);\n        return;\n      }\n\n      initAsClient(websocket, addr, protocols, options);\n    } else if (!websocket.emit('unexpected-response', req, res)) {\n      abortHandshake(\n        websocket,\n        req,\n        `Unexpected server response: ${res.statusCode}`\n      );\n    }\n  });\n\n  req.on('upgrade', (res, socket, head) => {\n    websocket.emit('upgrade', res);\n\n    //\n    // The user may have closed the connection from a listener of the\n    // `'upgrade'` event.\n    //\n    if (websocket.readyState !== WebSocket.CONNECTING) return;\n\n    req = websocket._req = null;\n\n    const upgrade = res.headers.upgrade;\n\n    if (upgrade === undefined || upgrade.toLowerCase() !== 'websocket') {\n      abortHandshake(websocket, socket, 'Invalid Upgrade header');\n      return;\n    }\n\n    const digest = createHash('sha1')\n      .update(key + GUID)\n      .digest('base64');\n\n    if (res.headers['sec-websocket-accept'] !== digest) {\n      abortHandshake(websocket, socket, 'Invalid Sec-WebSocket-Accept header');\n      return;\n    }\n\n    const serverProt = res.headers['sec-websocket-protocol'];\n    let protError;\n\n    if (serverProt !== undefined) {\n      if (!protocolSet.size) {\n        protError = 'Server sent a subprotocol but none was requested';\n      } else if (!protocolSet.has(serverProt)) {\n        protError = 'Server sent an invalid subprotocol';\n      }\n    } else if (protocolSet.size) {\n      protError = 'Server sent no subprotocol';\n    }\n\n    if (protError) {\n      abortHandshake(websocket, socket, protError);\n      return;\n    }\n\n    if (serverProt) websocket._protocol = serverProt;\n\n    const secWebSocketExtensions = res.headers['sec-websocket-extensions'];\n\n    if (secWebSocketExtensions !== undefined) {\n      if (!perMessageDeflate) {\n        const message =\n          'Server sent a Sec-WebSocket-Extensions header but no extension ' +\n          'was requested';\n        abortHandshake(websocket, socket, message);\n        return;\n      }\n\n      let extensions;\n\n      try {\n        extensions = parse(secWebSocketExtensions);\n      } catch (err) {\n        const message = 'Invalid Sec-WebSocket-Extensions header';\n        abortHandshake(websocket, socket, message);\n        return;\n      }\n\n      const extensionNames = Object.keys(extensions);\n\n      if (\n        extensionNames.length !== 1 ||\n        extensionNames[0] !== PerMessageDeflate.extensionName\n      ) {\n        const message = 'Server indicated an extension that was not requested';\n        abortHandshake(websocket, socket, message);\n        return;\n      }\n\n      try {\n        perMessageDeflate.accept(extensions[PerMessageDeflate.extensionName]);\n      } catch (err) {\n        const message = 'Invalid Sec-WebSocket-Extensions header';\n        abortHandshake(websocket, socket, message);\n        return;\n      }\n\n      websocket._extensions[PerMessageDeflate.extensionName] =\n        perMessageDeflate;\n    }\n\n    websocket.setSocket(socket, head, {\n      allowSynchronousEvents: opts.allowSynchronousEvents,\n      generateMask: opts.generateMask,\n      maxPayload: opts.maxPayload,\n      skipUTF8Validation: opts.skipUTF8Validation\n    });\n  });\n\n  if (opts.finishRequest) {\n    opts.finishRequest(req, websocket);\n  } else {\n    req.end();\n  }\n}\n\n/**\n * Emit the `'error'` and `'close'` events.\n *\n * @param {WebSocket} websocket The WebSocket instance\n * @param {Error} The error to emit\n * @private\n */\nfunction emitErrorAndClose(websocket, err) {\n  websocket._readyState = WebSocket.CLOSING;\n  //\n  // The following assignment is practically useless and is done only for\n  // consistency.\n  //\n  websocket._errorEmitted = true;\n  websocket.emit('error', err);\n  websocket.emitClose();\n}\n\n/**\n * Create a `net.Socket` and initiate a connection.\n *\n * @param {Object} options Connection options\n * @return {net.Socket} The newly created socket used to start the connection\n * @private\n */\nfunction netConnect(options) {\n  options.path = options.socketPath;\n  return net.connect(options);\n}\n\n/**\n * Create a `tls.TLSSocket` and initiate a connection.\n *\n * @param {Object} options Connection options\n * @return {tls.TLSSocket} The newly created socket used to start the connection\n * @private\n */\nfunction tlsConnect(options) {\n  options.path = undefined;\n\n  if (!options.servername && options.servername !== '') {\n    options.servername = net.isIP(options.host) ? '' : options.host;\n  }\n\n  return tls.connect(options);\n}\n\n/**\n * Abort the handshake and emit an error.\n *\n * @param {WebSocket} websocket The WebSocket instance\n * @param {(http.ClientRequest|net.Socket|tls.Socket)} stream The request to\n *     abort or the socket to destroy\n * @param {String} message The error message\n * @private\n */\nfunction abortHandshake(websocket, stream, message) {\n  websocket._readyState = WebSocket.CLOSING;\n\n  const err = new Error(message);\n  Error.captureStackTrace(err, abortHandshake);\n\n  if (stream.setHeader) {\n    stream[kAborted] = true;\n    stream.abort();\n\n    if (stream.socket && !stream.socket.destroyed) {\n      //\n      // On Node.js >= 14.3.0 `request.abort()` does not destroy the socket if\n      // called after the request completed. See\n      // https://github.com/websockets/ws/issues/1869.\n      //\n      stream.socket.destroy();\n    }\n\n    process.nextTick(emitErrorAndClose, websocket, err);\n  } else {\n    stream.destroy(err);\n    stream.once('error', websocket.emit.bind(websocket, 'error'));\n    stream.once('close', websocket.emitClose.bind(websocket));\n  }\n}\n\n/**\n * Handle cases where the `ping()`, `pong()`, or `send()` methods are called\n * when the `readyState` attribute is `CLOSING` or `CLOSED`.\n *\n * @param {WebSocket} websocket The WebSocket instance\n * @param {*} [data] The data to send\n * @param {Function} [cb] Callback\n * @private\n */\nfunction sendAfterClose(websocket, data, cb) {\n  if (data) {\n    const length = isBlob(data) ? data.size : toBuffer(data).length;\n\n    //\n    // The `_bufferedAmount` property is used only when the peer is a client and\n    // the opening handshake fails. Under these circumstances, in fact, the\n    // `setSocket()` method is not called, so the `_socket` and `_sender`\n    // properties are set to `null`.\n    //\n    if (websocket._socket) websocket._sender._bufferedBytes += length;\n    else websocket._bufferedAmount += length;\n  }\n\n  if (cb) {\n    const err = new Error(\n      `WebSocket is not open: readyState ${websocket.readyState} ` +\n        `(${readyStates[websocket.readyState]})`\n    );\n    process.nextTick(cb, err);\n  }\n}\n\n/**\n * The listener of the `Receiver` `'conclude'` event.\n *\n * @param {Number} code The status code\n * @param {Buffer} reason The reason for closing\n * @private\n */\nfunction receiverOnConclude(code, reason) {\n  const websocket = this[kWebSocket];\n\n  websocket._closeFrameReceived = true;\n  websocket._closeMessage = reason;\n  websocket._closeCode = code;\n\n  if (websocket._socket[kWebSocket] === undefined) return;\n\n  websocket._socket.removeListener('data', socketOnData);\n  process.nextTick(resume, websocket._socket);\n\n  if (code === 1005) websocket.close();\n  else websocket.close(code, reason);\n}\n\n/**\n * The listener of the `Receiver` `'drain'` event.\n *\n * @private\n */\nfunction receiverOnDrain() {\n  const websocket = this[kWebSocket];\n\n  if (!websocket.isPaused) websocket._socket.resume();\n}\n\n/**\n * The listener of the `Receiver` `'error'` event.\n *\n * @param {(RangeError|Error)} err The emitted error\n * @private\n */\nfunction receiverOnError(err) {\n  const websocket = this[kWebSocket];\n\n  if (websocket._socket[kWebSocket] !== undefined) {\n    websocket._socket.removeListener('data', socketOnData);\n\n    //\n    // On Node.js < 14.0.0 the `'error'` event is emitted synchronously. See\n    // https://github.com/websockets/ws/issues/1940.\n    //\n    process.nextTick(resume, websocket._socket);\n\n    websocket.close(err[kStatusCode]);\n  }\n\n  if (!websocket._errorEmitted) {\n    websocket._errorEmitted = true;\n    websocket.emit('error', err);\n  }\n}\n\n/**\n * The listener of the `Receiver` `'finish'` event.\n *\n * @private\n */\nfunction receiverOnFinish() {\n  this[kWebSocket].emitClose();\n}\n\n/**\n * The listener of the `Receiver` `'message'` event.\n *\n * @param {Buffer|ArrayBuffer|Buffer[])} data The message\n * @param {Boolean} isBinary Specifies whether the message is binary or not\n * @private\n */\nfunction receiverOnMessage(data, isBinary) {\n  this[kWebSocket].emit('message', data, isBinary);\n}\n\n/**\n * The listener of the `Receiver` `'ping'` event.\n *\n * @param {Buffer} data The data included in the ping frame\n * @private\n */\nfunction receiverOnPing(data) {\n  const websocket = this[kWebSocket];\n\n  if (websocket._autoPong) websocket.pong(data, !this._isServer, NOOP);\n  websocket.emit('ping', data);\n}\n\n/**\n * The listener of the `Receiver` `'pong'` event.\n *\n * @param {Buffer} data The data included in the pong frame\n * @private\n */\nfunction receiverOnPong(data) {\n  this[kWebSocket].emit('pong', data);\n}\n\n/**\n * Resume a readable stream\n *\n * @param {Readable} stream The readable stream\n * @private\n */\nfunction resume(stream) {\n  stream.resume();\n}\n\n/**\n * The `Sender` error event handler.\n *\n * @param {Error} The error\n * @private\n */\nfunction senderOnError(err) {\n  const websocket = this[kWebSocket];\n\n  if (websocket.readyState === WebSocket.CLOSED) return;\n  if (websocket.readyState === WebSocket.OPEN) {\n    websocket._readyState = WebSocket.CLOSING;\n    setCloseTimer(websocket);\n  }\n\n  //\n  // `socket.end()` is used instead of `socket.destroy()` to allow the other\n  // peer to finish sending queued data. There is no need to set a timer here\n  // because `CLOSING` means that it is already set or not needed.\n  //\n  this._socket.end();\n\n  if (!websocket._errorEmitted) {\n    websocket._errorEmitted = true;\n    websocket.emit('error', err);\n  }\n}\n\n/**\n * Set a timer to destroy the underlying raw socket of a WebSocket.\n *\n * @param {WebSocket} websocket The WebSocket instance\n * @private\n */\nfunction setCloseTimer(websocket) {\n  websocket._closeTimer = setTimeout(\n    websocket._socket.destroy.bind(websocket._socket),\n    closeTimeout\n  );\n}\n\n/**\n * The listener of the socket `'close'` event.\n *\n * @private\n */\nfunction socketOnClose() {\n  const websocket = this[kWebSocket];\n\n  this.removeListener('close', socketOnClose);\n  this.removeListener('data', socketOnData);\n  this.removeListener('end', socketOnEnd);\n\n  websocket._readyState = WebSocket.CLOSING;\n\n  let chunk;\n\n  //\n  // The close frame might not have been received or the `'end'` event emitted,\n  // for example, if the socket was destroyed due to an error. Ensure that the\n  // `receiver` stream is closed after writing any remaining buffered data to\n  // it. If the readable side of the socket is in flowing mode then there is no\n  // buffered data as everything has been already written and `readable.read()`\n  // will return `null`. If instead, the socket is paused, any possible buffered\n  // data will be read as a single chunk.\n  //\n  if (\n    !this._readableState.endEmitted &&\n    !websocket._closeFrameReceived &&\n    !websocket._receiver._writableState.errorEmitted &&\n    (chunk = websocket._socket.read()) !== null\n  ) {\n    websocket._receiver.write(chunk);\n  }\n\n  websocket._receiver.end();\n\n  this[kWebSocket] = undefined;\n\n  clearTimeout(websocket._closeTimer);\n\n  if (\n    websocket._receiver._writableState.finished ||\n    websocket._receiver._writableState.errorEmitted\n  ) {\n    websocket.emitClose();\n  } else {\n    websocket._receiver.on('error', receiverOnFinish);\n    websocket._receiver.on('finish', receiverOnFinish);\n  }\n}\n\n/**\n * The listener of the socket `'data'` event.\n *\n * @param {Buffer} chunk A chunk of data\n * @private\n */\nfunction socketOnData(chunk) {\n  if (!this[kWebSocket]._receiver.write(chunk)) {\n    this.pause();\n  }\n}\n\n/**\n * The listener of the socket `'end'` event.\n *\n * @private\n */\nfunction socketOnEnd() {\n  const websocket = this[kWebSocket];\n\n  websocket._readyState = WebSocket.CLOSING;\n  websocket._receiver.end();\n  this.end();\n}\n\n/**\n * The listener of the socket `'error'` event.\n *\n * @private\n */\nfunction socketOnError() {\n  const websocket = this[kWebSocket];\n\n  this.removeListener('error', socketOnError);\n  this.on('error', NOOP);\n\n  if (websocket) {\n    websocket._readyState = WebSocket.CLOSING;\n    this.destroy();\n  }\n}\n","/* eslint no-unused-vars: [\"error\", { \"varsIgnorePattern\": \"^WebSocket$\" }] */\n'use strict';\n\nconst WebSocket = require('./websocket');\nconst { Duplex } = require('stream');\n\n/**\n * Emits the `'close'` event on a stream.\n *\n * @param {Duplex} stream The stream.\n * @private\n */\nfunction emitClose(stream) {\n  stream.emit('close');\n}\n\n/**\n * The listener of the `'end'` event.\n *\n * @private\n */\nfunction duplexOnEnd() {\n  if (!this.destroyed && this._writableState.finished) {\n    this.destroy();\n  }\n}\n\n/**\n * The listener of the `'error'` event.\n *\n * @param {Error} err The error\n * @private\n */\nfunction duplexOnError(err) {\n  this.removeListener('error', duplexOnError);\n  this.destroy();\n  if (this.listenerCount('error') === 0) {\n    // Do not suppress the throwing behavior.\n    this.emit('error', err);\n  }\n}\n\n/**\n * Wraps a `WebSocket` in a duplex stream.\n *\n * @param {WebSocket} ws The `WebSocket` to wrap\n * @param {Object} [options] The options for the `Duplex` constructor\n * @return {Duplex} The duplex stream\n * @public\n */\nfunction createWebSocketStream(ws, options) {\n  let terminateOnDestroy = true;\n\n  const duplex = new Duplex({\n    ...options,\n    autoDestroy: false,\n    emitClose: false,\n    objectMode: false,\n    writableObjectMode: false\n  });\n\n  ws.on('message', function message(msg, isBinary) {\n    const data =\n      !isBinary && duplex._readableState.objectMode ? msg.toString() : msg;\n\n    if (!duplex.push(data)) ws.pause();\n  });\n\n  ws.once('error', function error(err) {\n    if (duplex.destroyed) return;\n\n    // Prevent `ws.terminate()` from being called by `duplex._destroy()`.\n    //\n    // - If the `'error'` event is emitted before the `'open'` event, then\n    //   `ws.terminate()` is a noop as no socket is assigned.\n    // - Otherwise, the error is re-emitted by the listener of the `'error'`\n    //   event of the `Receiver` object. The listener already closes the\n    //   connection by calling `ws.close()`. This allows a close frame to be\n    //   sent to the other peer. If `ws.terminate()` is called right after this,\n    //   then the close frame might not be sent.\n    terminateOnDestroy = false;\n    duplex.destroy(err);\n  });\n\n  ws.once('close', function close() {\n    if (duplex.destroyed) return;\n\n    duplex.push(null);\n  });\n\n  duplex._destroy = function (err, callback) {\n    if (ws.readyState === ws.CLOSED) {\n      callback(err);\n      process.nextTick(emitClose, duplex);\n      return;\n    }\n\n    let called = false;\n\n    ws.once('error', function error(err) {\n      called = true;\n      callback(err);\n    });\n\n    ws.once('close', function close() {\n      if (!called) callback(err);\n      process.nextTick(emitClose, duplex);\n    });\n\n    if (terminateOnDestroy) ws.terminate();\n  };\n\n  duplex._final = function (callback) {\n    if (ws.readyState === ws.CONNECTING) {\n      ws.once('open', function open() {\n        duplex._final(callback);\n      });\n      return;\n    }\n\n    // If the value of the `_socket` property is `null` it means that `ws` is a\n    // client websocket and the handshake failed. In fact, when this happens, a\n    // socket is never assigned to the websocket. Wait for the `'error'` event\n    // that will be emitted by the websocket.\n    if (ws._socket === null) return;\n\n    if (ws._socket._writableState.finished) {\n      callback();\n      if (duplex._readableState.endEmitted) duplex.destroy();\n    } else {\n      ws._socket.once('finish', function finish() {\n        // `duplex` is not destroyed here because the `'end'` event will be\n        // emitted on `duplex` after this `'finish'` event. The EOF signaling\n        // `null` chunk is, in fact, pushed when the websocket emits `'close'`.\n        callback();\n      });\n      ws.close();\n    }\n  };\n\n  duplex._read = function () {\n    if (ws.isPaused) ws.resume();\n  };\n\n  duplex._write = function (chunk, encoding, callback) {\n    if (ws.readyState === ws.CONNECTING) {\n      ws.once('open', function open() {\n        duplex._write(chunk, encoding, callback);\n      });\n      return;\n    }\n\n    ws.send(chunk, callback);\n  };\n\n  duplex.on('end', duplexOnEnd);\n  duplex.on('error', duplexOnError);\n  return duplex;\n}\n\nmodule.exports = createWebSocketStream;\n","'use strict';\n\nconst { tokenChars } = require('./validation');\n\n/**\n * Parses the `Sec-WebSocket-Protocol` header into a set of subprotocol names.\n *\n * @param {String} header The field value of the header\n * @return {Set} The subprotocol names\n * @public\n */\nfunction parse(header) {\n  const protocols = new Set();\n  let start = -1;\n  let end = -1;\n  let i = 0;\n\n  for (i; i < header.length; i++) {\n    const code = header.charCodeAt(i);\n\n    if (end === -1 && tokenChars[code] === 1) {\n      if (start === -1) start = i;\n    } else if (\n      i !== 0 &&\n      (code === 0x20 /* ' ' */ || code === 0x09) /* '\\t' */\n    ) {\n      if (end === -1 && start !== -1) end = i;\n    } else if (code === 0x2c /* ',' */) {\n      if (start === -1) {\n        throw new SyntaxError(`Unexpected character at index ${i}`);\n      }\n\n      if (end === -1) end = i;\n\n      const protocol = header.slice(start, end);\n\n      if (protocols.has(protocol)) {\n        throw new SyntaxError(`The \"${protocol}\" subprotocol is duplicated`);\n      }\n\n      protocols.add(protocol);\n      start = end = -1;\n    } else {\n      throw new SyntaxError(`Unexpected character at index ${i}`);\n    }\n  }\n\n  if (start === -1 || end !== -1) {\n    throw new SyntaxError('Unexpected end of input');\n  }\n\n  const protocol = header.slice(start, i);\n\n  if (protocols.has(protocol)) {\n    throw new SyntaxError(`The \"${protocol}\" subprotocol is duplicated`);\n  }\n\n  protocols.add(protocol);\n  return protocols;\n}\n\nmodule.exports = { parse };\n","/* eslint no-unused-vars: [\"error\", { \"varsIgnorePattern\": \"^Duplex$\", \"caughtErrors\": \"none\" }] */\n\n'use strict';\n\nconst EventEmitter = require('events');\nconst http = require('http');\nconst { Duplex } = require('stream');\nconst { createHash } = require('crypto');\n\nconst extension = require('./extension');\nconst PerMessageDeflate = require('./permessage-deflate');\nconst subprotocol = require('./subprotocol');\nconst WebSocket = require('./websocket');\nconst { GUID, kWebSocket } = require('./constants');\n\nconst keyRegex = /^[+/0-9A-Za-z]{22}==$/;\n\nconst RUNNING = 0;\nconst CLOSING = 1;\nconst CLOSED = 2;\n\n/**\n * Class representing a WebSocket server.\n *\n * @extends EventEmitter\n */\nclass WebSocketServer extends EventEmitter {\n  /**\n   * Create a `WebSocketServer` instance.\n   *\n   * @param {Object} options Configuration options\n   * @param {Boolean} [options.allowSynchronousEvents=true] Specifies whether\n   *     any of the `'message'`, `'ping'`, and `'pong'` events can be emitted\n   *     multiple times in the same tick\n   * @param {Boolean} [options.autoPong=true] Specifies whether or not to\n   *     automatically send a pong in response to a ping\n   * @param {Number} [options.backlog=511] The maximum length of the queue of\n   *     pending connections\n   * @param {Boolean} [options.clientTracking=true] Specifies whether or not to\n   *     track clients\n   * @param {Function} [options.handleProtocols] A hook to handle protocols\n   * @param {String} [options.host] The hostname where to bind the server\n   * @param {Number} [options.maxPayload=104857600] The maximum allowed message\n   *     size\n   * @param {Boolean} [options.noServer=false] Enable no server mode\n   * @param {String} [options.path] Accept only connections matching this path\n   * @param {(Boolean|Object)} [options.perMessageDeflate=false] Enable/disable\n   *     permessage-deflate\n   * @param {Number} [options.port] The port where to bind the server\n   * @param {(http.Server|https.Server)} [options.server] A pre-created HTTP/S\n   *     server to use\n   * @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or\n   *     not to skip UTF-8 validation for text and close messages\n   * @param {Function} [options.verifyClient] A hook to reject connections\n   * @param {Function} [options.WebSocket=WebSocket] Specifies the `WebSocket`\n   *     class to use. It must be the `WebSocket` class or class that extends it\n   * @param {Function} [callback] A listener for the `listening` event\n   */\n  constructor(options, callback) {\n    super();\n\n    options = {\n      allowSynchronousEvents: true,\n      autoPong: true,\n      maxPayload: 100 * 1024 * 1024,\n      skipUTF8Validation: false,\n      perMessageDeflate: false,\n      handleProtocols: null,\n      clientTracking: true,\n      verifyClient: null,\n      noServer: false,\n      backlog: null, // use default (511 as implemented in net.js)\n      server: null,\n      host: null,\n      path: null,\n      port: null,\n      WebSocket,\n      ...options\n    };\n\n    if (\n      (options.port == null && !options.server && !options.noServer) ||\n      (options.port != null && (options.server || options.noServer)) ||\n      (options.server && options.noServer)\n    ) {\n      throw new TypeError(\n        'One and only one of the \"port\", \"server\", or \"noServer\" options ' +\n          'must be specified'\n      );\n    }\n\n    if (options.port != null) {\n      this._server = http.createServer((req, res) => {\n        const body = http.STATUS_CODES[426];\n\n        res.writeHead(426, {\n          'Content-Length': body.length,\n          'Content-Type': 'text/plain'\n        });\n        res.end(body);\n      });\n      this._server.listen(\n        options.port,\n        options.host,\n        options.backlog,\n        callback\n      );\n    } else if (options.server) {\n      this._server = options.server;\n    }\n\n    if (this._server) {\n      const emitConnection = this.emit.bind(this, 'connection');\n\n      this._removeListeners = addListeners(this._server, {\n        listening: this.emit.bind(this, 'listening'),\n        error: this.emit.bind(this, 'error'),\n        upgrade: (req, socket, head) => {\n          this.handleUpgrade(req, socket, head, emitConnection);\n        }\n      });\n    }\n\n    if (options.perMessageDeflate === true) options.perMessageDeflate = {};\n    if (options.clientTracking) {\n      this.clients = new Set();\n      this._shouldEmitClose = false;\n    }\n\n    this.options = options;\n    this._state = RUNNING;\n  }\n\n  /**\n   * Returns the bound address, the address family name, and port of the server\n   * as reported by the operating system if listening on an IP socket.\n   * If the server is listening on a pipe or UNIX domain socket, the name is\n   * returned as a string.\n   *\n   * @return {(Object|String|null)} The address of the server\n   * @public\n   */\n  address() {\n    if (this.options.noServer) {\n      throw new Error('The server is operating in \"noServer\" mode');\n    }\n\n    if (!this._server) return null;\n    return this._server.address();\n  }\n\n  /**\n   * Stop the server from accepting new connections and emit the `'close'` event\n   * when all existing connections are closed.\n   *\n   * @param {Function} [cb] A one-time listener for the `'close'` event\n   * @public\n   */\n  close(cb) {\n    if (this._state === CLOSED) {\n      if (cb) {\n        this.once('close', () => {\n          cb(new Error('The server is not running'));\n        });\n      }\n\n      process.nextTick(emitClose, this);\n      return;\n    }\n\n    if (cb) this.once('close', cb);\n\n    if (this._state === CLOSING) return;\n    this._state = CLOSING;\n\n    if (this.options.noServer || this.options.server) {\n      if (this._server) {\n        this._removeListeners();\n        this._removeListeners = this._server = null;\n      }\n\n      if (this.clients) {\n        if (!this.clients.size) {\n          process.nextTick(emitClose, this);\n        } else {\n          this._shouldEmitClose = true;\n        }\n      } else {\n        process.nextTick(emitClose, this);\n      }\n    } else {\n      const server = this._server;\n\n      this._removeListeners();\n      this._removeListeners = this._server = null;\n\n      //\n      // The HTTP/S server was created internally. Close it, and rely on its\n      // `'close'` event.\n      //\n      server.close(() => {\n        emitClose(this);\n      });\n    }\n  }\n\n  /**\n   * See if a given request should be handled by this server instance.\n   *\n   * @param {http.IncomingMessage} req Request object to inspect\n   * @return {Boolean} `true` if the request is valid, else `false`\n   * @public\n   */\n  shouldHandle(req) {\n    if (this.options.path) {\n      const index = req.url.indexOf('?');\n      const pathname = index !== -1 ? req.url.slice(0, index) : req.url;\n\n      if (pathname !== this.options.path) return false;\n    }\n\n    return true;\n  }\n\n  /**\n   * Handle a HTTP Upgrade request.\n   *\n   * @param {http.IncomingMessage} req The request object\n   * @param {Duplex} socket The network socket between the server and client\n   * @param {Buffer} head The first packet of the upgraded stream\n   * @param {Function} cb Callback\n   * @public\n   */\n  handleUpgrade(req, socket, head, cb) {\n    socket.on('error', socketOnError);\n\n    const key = req.headers['sec-websocket-key'];\n    const upgrade = req.headers.upgrade;\n    const version = +req.headers['sec-websocket-version'];\n\n    if (req.method !== 'GET') {\n      const message = 'Invalid HTTP method';\n      abortHandshakeOrEmitwsClientError(this, req, socket, 405, message);\n      return;\n    }\n\n    if (upgrade === undefined || upgrade.toLowerCase() !== 'websocket') {\n      const message = 'Invalid Upgrade header';\n      abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);\n      return;\n    }\n\n    if (key === undefined || !keyRegex.test(key)) {\n      const message = 'Missing or invalid Sec-WebSocket-Key header';\n      abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);\n      return;\n    }\n\n    if (version !== 8 && version !== 13) {\n      const message = 'Missing or invalid Sec-WebSocket-Version header';\n      abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);\n      return;\n    }\n\n    if (!this.shouldHandle(req)) {\n      abortHandshake(socket, 400);\n      return;\n    }\n\n    const secWebSocketProtocol = req.headers['sec-websocket-protocol'];\n    let protocols = new Set();\n\n    if (secWebSocketProtocol !== undefined) {\n      try {\n        protocols = subprotocol.parse(secWebSocketProtocol);\n      } catch (err) {\n        const message = 'Invalid Sec-WebSocket-Protocol header';\n        abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);\n        return;\n      }\n    }\n\n    const secWebSocketExtensions = req.headers['sec-websocket-extensions'];\n    const extensions = {};\n\n    if (\n      this.options.perMessageDeflate &&\n      secWebSocketExtensions !== undefined\n    ) {\n      const perMessageDeflate = new PerMessageDeflate(\n        this.options.perMessageDeflate,\n        true,\n        this.options.maxPayload\n      );\n\n      try {\n        const offers = extension.parse(secWebSocketExtensions);\n\n        if (offers[PerMessageDeflate.extensionName]) {\n          perMessageDeflate.accept(offers[PerMessageDeflate.extensionName]);\n          extensions[PerMessageDeflate.extensionName] = perMessageDeflate;\n        }\n      } catch (err) {\n        const message =\n          'Invalid or unacceptable Sec-WebSocket-Extensions header';\n        abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);\n        return;\n      }\n    }\n\n    //\n    // Optionally call external client verification handler.\n    //\n    if (this.options.verifyClient) {\n      const info = {\n        origin:\n          req.headers[`${version === 8 ? 'sec-websocket-origin' : 'origin'}`],\n        secure: !!(req.socket.authorized || req.socket.encrypted),\n        req\n      };\n\n      if (this.options.verifyClient.length === 2) {\n        this.options.verifyClient(info, (verified, code, message, headers) => {\n          if (!verified) {\n            return abortHandshake(socket, code || 401, message, headers);\n          }\n\n          this.completeUpgrade(\n            extensions,\n            key,\n            protocols,\n            req,\n            socket,\n            head,\n            cb\n          );\n        });\n        return;\n      }\n\n      if (!this.options.verifyClient(info)) return abortHandshake(socket, 401);\n    }\n\n    this.completeUpgrade(extensions, key, protocols, req, socket, head, cb);\n  }\n\n  /**\n   * Upgrade the connection to WebSocket.\n   *\n   * @param {Object} extensions The accepted extensions\n   * @param {String} key The value of the `Sec-WebSocket-Key` header\n   * @param {Set} protocols The subprotocols\n   * @param {http.IncomingMessage} req The request object\n   * @param {Duplex} socket The network socket between the server and client\n   * @param {Buffer} head The first packet of the upgraded stream\n   * @param {Function} cb Callback\n   * @throws {Error} If called more than once with the same socket\n   * @private\n   */\n  completeUpgrade(extensions, key, protocols, req, socket, head, cb) {\n    //\n    // Destroy the socket if the client has already sent a FIN packet.\n    //\n    if (!socket.readable || !socket.writable) return socket.destroy();\n\n    if (socket[kWebSocket]) {\n      throw new Error(\n        'server.handleUpgrade() was called more than once with the same ' +\n          'socket, possibly due to a misconfiguration'\n      );\n    }\n\n    if (this._state > RUNNING) return abortHandshake(socket, 503);\n\n    const digest = createHash('sha1')\n      .update(key + GUID)\n      .digest('base64');\n\n    const headers = [\n      'HTTP/1.1 101 Switching Protocols',\n      'Upgrade: websocket',\n      'Connection: Upgrade',\n      `Sec-WebSocket-Accept: ${digest}`\n    ];\n\n    const ws = new this.options.WebSocket(null, undefined, this.options);\n\n    if (protocols.size) {\n      //\n      // Optionally call external protocol selection handler.\n      //\n      const protocol = this.options.handleProtocols\n        ? this.options.handleProtocols(protocols, req)\n        : protocols.values().next().value;\n\n      if (protocol) {\n        headers.push(`Sec-WebSocket-Protocol: ${protocol}`);\n        ws._protocol = protocol;\n      }\n    }\n\n    if (extensions[PerMessageDeflate.extensionName]) {\n      const params = extensions[PerMessageDeflate.extensionName].params;\n      const value = extension.format({\n        [PerMessageDeflate.extensionName]: [params]\n      });\n      headers.push(`Sec-WebSocket-Extensions: ${value}`);\n      ws._extensions = extensions;\n    }\n\n    //\n    // Allow external modification/inspection of handshake headers.\n    //\n    this.emit('headers', headers, req);\n\n    socket.write(headers.concat('\\r\\n').join('\\r\\n'));\n    socket.removeListener('error', socketOnError);\n\n    ws.setSocket(socket, head, {\n      allowSynchronousEvents: this.options.allowSynchronousEvents,\n      maxPayload: this.options.maxPayload,\n      skipUTF8Validation: this.options.skipUTF8Validation\n    });\n\n    if (this.clients) {\n      this.clients.add(ws);\n      ws.on('close', () => {\n        this.clients.delete(ws);\n\n        if (this._shouldEmitClose && !this.clients.size) {\n          process.nextTick(emitClose, this);\n        }\n      });\n    }\n\n    cb(ws, req);\n  }\n}\n\nmodule.exports = WebSocketServer;\n\n/**\n * Add event listeners on an `EventEmitter` using a map of <event, listener>\n * pairs.\n *\n * @param {EventEmitter} server The event emitter\n * @param {Object.<String, Function>} map The listeners to add\n * @return {Function} A function that will remove the added listeners when\n *     called\n * @private\n */\nfunction addListeners(server, map) {\n  for (const event of Object.keys(map)) server.on(event, map[event]);\n\n  return function removeListeners() {\n    for (const event of Object.keys(map)) {\n      server.removeListener(event, map[event]);\n    }\n  };\n}\n\n/**\n * Emit a `'close'` event on an `EventEmitter`.\n *\n * @param {EventEmitter} server The event emitter\n * @private\n */\nfunction emitClose(server) {\n  server._state = CLOSED;\n  server.emit('close');\n}\n\n/**\n * Handle socket errors.\n *\n * @private\n */\nfunction socketOnError() {\n  this.destroy();\n}\n\n/**\n * Close the connection when preconditions are not fulfilled.\n *\n * @param {Duplex} socket The socket of the upgrade request\n * @param {Number} code The HTTP response status code\n * @param {String} [message] The HTTP response body\n * @param {Object} [headers] Additional HTTP response headers\n * @private\n */\nfunction abortHandshake(socket, code, message, headers) {\n  //\n  // The socket is writable unless the user destroyed or ended it before calling\n  // `server.handleUpgrade()` or in the `verifyClient` function, which is a user\n  // error. Handling this does not make much sense as the worst that can happen\n  // is that some of the data written by the user might be discarded due to the\n  // call to `socket.end()` below, which triggers an `'error'` event that in\n  // turn causes the socket to be destroyed.\n  //\n  message = message || http.STATUS_CODES[code];\n  headers = {\n    Connection: 'close',\n    'Content-Type': 'text/html',\n    'Content-Length': Buffer.byteLength(message),\n    ...headers\n  };\n\n  socket.once('finish', socket.destroy);\n\n  socket.end(\n    `HTTP/1.1 ${code} ${http.STATUS_CODES[code]}\\r\\n` +\n      Object.keys(headers)\n        .map((h) => `${h}: ${headers[h]}`)\n        .join('\\r\\n') +\n      '\\r\\n\\r\\n' +\n      message\n  );\n}\n\n/**\n * Emit a `'wsClientError'` event on a `WebSocketServer` if there is at least\n * one listener for it, otherwise call `abortHandshake()`.\n *\n * @param {WebSocketServer} server The WebSocket server\n * @param {http.IncomingMessage} req The request object\n * @param {Duplex} socket The socket of the upgrade request\n * @param {Number} code The HTTP response status code\n * @param {String} message The HTTP response body\n * @private\n */\nfunction abortHandshakeOrEmitwsClientError(server, req, socket, code, message) {\n  if (server.listenerCount('wsClientError')) {\n    const err = new Error(message);\n    Error.captureStackTrace(err, abortHandshakeOrEmitwsClientError);\n\n    server.emit('wsClientError', err, socket, req);\n  } else {\n    abortHandshake(socket, code, message);\n  }\n}\n","'use strict';\n\nconst WebSocket = require('./lib/websocket');\n\nWebSocket.createWebSocketStream = require('./lib/stream');\nWebSocket.Server = require('./lib/websocket-server');\nWebSocket.Receiver = require('./lib/receiver');\nWebSocket.Sender = require('./lib/sender');\n\nWebSocket.WebSocket = WebSocket;\nWebSocket.WebSocketServer = WebSocket.Server;\n\nmodule.exports = WebSocket;\n","\"use strict\";\n\nmodule.exports = require('ws');","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport WebSocket from 'isomorphic-ws';\nimport { isNullish, SocketProvider } from 'web3-utils';\nimport { ConnectionNotOpenError } from 'web3-errors';\n/**\n * Use WebSocketProvider to connect to a Node using a WebSocket connection, i.e. over the `ws` or `wss` protocol.\n *\n * @example\n * ```ts\n * const provider = new WebSocketProvider(\n * \t\t`ws://localhost:8545`,\n * \t\t{\n * \t\t\theaders: {\n * \t\t\t\t// to provide the API key if the Node requires the key to be inside the `headers` for example:\n * \t\t\t\t'x-api-key': '<Api key>',\n * \t\t\t},\n * \t\t},\n * \t\t{\n * \t\t\tdelay: 500,\n * \t\t\tautoReconnect: true,\n * \t\t\tmaxAttempts: 10,\n * \t\t},\n * \t);\n * ```\n *\n * The second and the third parameters are both optional. And you can for example, the second parameter could be an empty object or undefined.\n *  * @example\n * ```ts\n * const provider = new WebSocketProvider(\n * \t\t`ws://localhost:8545`,\n * \t\t{},\n * \t\t{\n * \t\t\tdelay: 500,\n * \t\t\tautoReconnect: true,\n * \t\t\tmaxAttempts: 10,\n * \t\t},\n * \t);\n * ```\n */\nexport default class WebSocketProvider extends SocketProvider {\n    /**\n     * This is a class used for Web Socket connections. It extends the abstract class SocketProvider {@link SocketProvider} that extends the EIP-1193 provider {@link EIP1193Provider}.\n     * @param socketPath - The path to the Web Socket.\n     * @param socketOptions - The options for the Web Socket client.\n     * @param reconnectOptions - The options for the socket reconnection {@link ReconnectOptions}\n     */\n    // this constructor is to specify the type for `socketOptions` for a better intellisense.\n    // eslint-disable-next-line no-useless-constructor\n    constructor(socketPath, socketOptions, reconnectOptions) {\n        super(socketPath, socketOptions, reconnectOptions);\n    }\n    // eslint-disable-next-line class-methods-use-this\n    _validateProviderPath(providerUrl) {\n        return typeof providerUrl === 'string' ? /^ws(s)?:\\/\\//i.test(providerUrl) : false;\n    }\n    getStatus() {\n        if (this._socketConnection && !isNullish(this._socketConnection)) {\n            switch (this._socketConnection.readyState) {\n                case this._socketConnection.CONNECTING: {\n                    return 'connecting';\n                }\n                case this._socketConnection.OPEN: {\n                    return 'connected';\n                }\n                default: {\n                    return 'disconnected';\n                }\n            }\n        }\n        return 'disconnected';\n    }\n    _openSocketConnection() {\n        this._socketConnection = new WebSocket(this._socketPath, undefined, this._socketOptions && Object.keys(this._socketOptions).length === 0\n            ? undefined\n            : this._socketOptions);\n    }\n    _closeSocketConnection(code, data) {\n        var _a;\n        (_a = this._socketConnection) === null || _a === void 0 ? void 0 : _a.close(code, data);\n    }\n    _sendToSocket(payload) {\n        var _a;\n        if (this.getStatus() === 'disconnected') {\n            throw new ConnectionNotOpenError();\n        }\n        (_a = this._socketConnection) === null || _a === void 0 ? void 0 : _a.send(JSON.stringify(payload));\n    }\n    _parseResponses(event) {\n        return this.chunkResponseParser.parseResponse(event.data);\n    }\n    _addSocketListeners() {\n        var _a, _b, _c, _d;\n        (_a = this._socketConnection) === null || _a === void 0 ? void 0 : _a.addEventListener('open', this._onOpenHandler);\n        (_b = this._socketConnection) === null || _b === void 0 ? void 0 : _b.addEventListener('message', this._onMessageHandler);\n        (_c = this._socketConnection) === null || _c === void 0 ? void 0 : _c.addEventListener('close', e => this._onCloseHandler(e));\n        (_d = this._socketConnection) === null || _d === void 0 ? void 0 : _d.addEventListener('error', this._onErrorHandler);\n    }\n    _removeSocketListeners() {\n        var _a, _b, _c;\n        (_a = this._socketConnection) === null || _a === void 0 ? void 0 : _a.removeEventListener('message', this._onMessageHandler);\n        (_b = this._socketConnection) === null || _b === void 0 ? void 0 : _b.removeEventListener('open', this._onOpenHandler);\n        (_c = this._socketConnection) === null || _c === void 0 ? void 0 : _c.removeEventListener('close', this._onCloseHandler);\n        // note: we intentionally keep the error event listener to be able to emit it in case an error happens when closing the connection\n    }\n    _onCloseEvent(event) {\n        var _a;\n        if (this._reconnectOptions.autoReconnect &&\n            (![1000, 1001].includes(event.code) || !event.wasClean)) {\n            this._reconnect();\n            return;\n        }\n        this._clearQueues(event);\n        this._removeSocketListeners();\n        this._onDisconnect(event.code, event.reason);\n        // disconnect was successful and can safely remove error listener\n        (_a = this._socketConnection) === null || _a === void 0 ? void 0 : _a.removeEventListener('error', this._onErrorHandler);\n    }\n}\nexport { WebSocketProvider };\n//# sourceMappingURL=index.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { Web3BaseProvider, } from 'web3-types';\nexport const isWeb3Provider = (provider) => Web3BaseProvider.isWeb3Provider(provider);\nexport const isMetaMaskProvider = (provider) => typeof provider !== 'string' &&\n    'request' in provider &&\n    provider.request.constructor.name === 'AsyncFunction' &&\n    'isMetaMask' in provider &&\n    provider.isMetaMask;\nexport const isLegacyRequestProvider = (provider) => typeof provider !== 'string' &&\n    'request' in provider &&\n    provider.request.constructor.name === 'Function';\nexport const isEIP1193Provider = (provider) => typeof provider !== 'string' &&\n    'request' in provider &&\n    provider.request.constructor.name === 'AsyncFunction';\nexport const isLegacySendProvider = (provider) => typeof provider !== 'string' && 'send' in provider;\nexport const isLegacySendAsyncProvider = (provider) => typeof provider !== 'string' && 'sendAsync' in provider;\nexport const isSupportedProvider = (provider) => provider &&\n    (isWeb3Provider(provider) ||\n        isEIP1193Provider(provider) ||\n        isLegacyRequestProvider(provider) ||\n        isLegacySendAsyncProvider(provider) ||\n        isLegacySendProvider(provider));\nexport const isSupportSubscriptions = (provider) => {\n    if (provider && 'supportsSubscriptions' in provider) {\n        return provider.supportsSubscriptions();\n    }\n    if (provider && typeof provider !== 'string' && 'on' in provider) {\n        return true;\n    }\n    return false;\n};\n//# sourceMappingURL=utils.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\nimport { ContractExecutionError, InvalidResponseError, ProviderError, ResponseError, rpcErrorsMap, RpcError, } from 'web3-errors';\nimport HttpProvider from 'web3-providers-http';\nimport WSProvider from 'web3-providers-ws';\nimport { isNullish, isPromise, jsonRpc, isResponseRpcError } from 'web3-utils';\nimport { isEIP1193Provider, isLegacyRequestProvider, isLegacySendAsyncProvider, isLegacySendProvider, isWeb3Provider, } from './utils.js';\nimport { Web3EventEmitter } from './web3_event_emitter.js';\nexport var Web3RequestManagerEvent;\n(function (Web3RequestManagerEvent) {\n    Web3RequestManagerEvent[\"PROVIDER_CHANGED\"] = \"PROVIDER_CHANGED\";\n    Web3RequestManagerEvent[\"BEFORE_PROVIDER_CHANGE\"] = \"BEFORE_PROVIDER_CHANGE\";\n})(Web3RequestManagerEvent || (Web3RequestManagerEvent = {}));\nconst availableProviders = {\n    HttpProvider: HttpProvider,\n    WebsocketProvider: WSProvider,\n};\nexport class Web3RequestManager extends Web3EventEmitter {\n    constructor(provider, useRpcCallSpecification, requestManagerMiddleware) {\n        super();\n        if (!isNullish(provider)) {\n            this.setProvider(provider);\n        }\n        this.useRpcCallSpecification = useRpcCallSpecification;\n        if (!isNullish(requestManagerMiddleware))\n            this.middleware = requestManagerMiddleware;\n    }\n    /**\n     * Will return all available providers\n     */\n    static get providers() {\n        return availableProviders;\n    }\n    /**\n     * Will return the current provider.\n     *\n     * @returns Returns the current provider\n     */\n    get provider() {\n        return this._provider;\n    }\n    /**\n     * Will return all available providers\n     */\n    // eslint-disable-next-line class-methods-use-this\n    get providers() {\n        return availableProviders;\n    }\n    /**\n     * Use to set provider. Provider can be a provider instance or a string.\n     *\n     * @param provider - The provider to set\n     */\n    setProvider(provider) {\n        let newProvider;\n        // autodetect provider\n        if (provider && typeof provider === 'string' && this.providers) {\n            // HTTP\n            if (/^http(s)?:\\/\\//i.test(provider)) {\n                newProvider = new this.providers.HttpProvider(provider);\n                // WS\n            }\n            else if (/^ws(s)?:\\/\\//i.test(provider)) {\n                newProvider = new this.providers.WebsocketProvider(provider);\n            }\n            else {\n                throw new ProviderError(`Can't autodetect provider for \"${provider}\"`);\n            }\n        }\n        else if (isNullish(provider)) {\n            // In case want to unset the provider\n            newProvider = undefined;\n        }\n        else {\n            newProvider = provider;\n        }\n        this.emit(Web3RequestManagerEvent.BEFORE_PROVIDER_CHANGE, this._provider);\n        this._provider = newProvider;\n        this.emit(Web3RequestManagerEvent.PROVIDER_CHANGED, this._provider);\n        return true;\n    }\n    setMiddleware(requestManagerMiddleware) {\n        this.middleware = requestManagerMiddleware;\n    }\n    /**\n     *\n     * Will execute a request\n     *\n     * @param request - {@link Web3APIRequest} The request to send\n     *\n     * @returns The response of the request {@link ResponseType}. If there is error\n     * in the response, will throw an error\n     */\n    send(request) {\n        return __awaiter(this, void 0, void 0, function* () {\n            const requestObj = Object.assign({}, request);\n            let response = yield this._sendRequest(requestObj);\n            if (!isNullish(this.middleware))\n                response = yield this.middleware.processResponse(response);\n            if (jsonRpc.isResponseWithResult(response)) {\n                return response.result;\n            }\n            throw new ResponseError(response);\n        });\n    }\n    /**\n     * Same as send, but, will execute a batch of requests\n     *\n     * @param request {@link JsonRpcBatchRequest} The batch request to send\n     */\n    sendBatch(request) {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield this._sendRequest(request);\n            return response;\n        });\n    }\n    _sendRequest(request) {\n        return __awaiter(this, void 0, void 0, function* () {\n            const { provider } = this;\n            if (isNullish(provider)) {\n                throw new ProviderError('Provider not available. Use `.setProvider` or `.provider=` to initialize the provider.');\n            }\n            let payload = (jsonRpc.isBatchRequest(request)\n                ? jsonRpc.toBatchPayload(request)\n                : jsonRpc.toPayload(request));\n            if (!isNullish(this.middleware)) {\n                payload = yield this.middleware.processRequest(payload);\n            }\n            if (isWeb3Provider(provider)) {\n                let response;\n                try {\n                    response = yield provider.request(payload);\n                }\n                catch (error) {\n                    // Check if the provider throw an error instead of reject with error\n                    response = error;\n                }\n                return this._processJsonRpcResponse(payload, response, { legacy: false, error: false });\n            }\n            if (isEIP1193Provider(provider)) {\n                return provider\n                    .request(payload)\n                    .then(res => this._processJsonRpcResponse(payload, res, {\n                    legacy: true,\n                    error: false,\n                }))\n                    .catch(error => this._processJsonRpcResponse(payload, error, { legacy: true, error: true }));\n            }\n            // TODO: This could be deprecated and removed.\n            if (isLegacyRequestProvider(provider)) {\n                return new Promise((resolve, reject) => {\n                    const rejectWithError = (err) => {\n                        reject(this._processJsonRpcResponse(payload, err, {\n                            legacy: true,\n                            error: true,\n                        }));\n                    };\n                    const resolveWithResponse = (response) => resolve(this._processJsonRpcResponse(payload, response, {\n                        legacy: true,\n                        error: false,\n                    }));\n                    const result = provider.request(payload, \n                    // a callback that is expected to be called after getting the response:\n                    (err, response) => {\n                        if (err) {\n                            return rejectWithError(err);\n                        }\n                        return resolveWithResponse(response);\n                    });\n                    // Some providers, that follow a previous drafted version of EIP1193, has a `request` function\n                    //\tthat is not defined as `async`, but it returns a promise.\n                    // Such providers would not be picked with if(isEIP1193Provider(provider)) above\n                    //\tbecause the `request` function was not defined with `async` and so the function definition is not `AsyncFunction`.\n                    // Like this provider: https://github.dev/NomicFoundation/hardhat/blob/62bea2600785595ba36f2105564076cf5cdf0fd8/packages/hardhat-core/src/internal/core/providers/backwards-compatibility.ts#L19\n                    // So check if the returned result is a Promise, and resolve with it accordingly.\n                    // Note: in this case we expect the callback provided above to never be called.\n                    if (isPromise(result)) {\n                        const responsePromise = result;\n                        responsePromise.then(resolveWithResponse).catch(error => {\n                            try {\n                                // Attempt to process the error response\n                                const processedError = this._processJsonRpcResponse(payload, error, { legacy: true, error: true });\n                                reject(processedError);\n                            }\n                            catch (processingError) {\n                                // Catch any errors that occur during the error processing\n                                reject(processingError);\n                            }\n                        });\n                    }\n                });\n            }\n            // TODO: This could be deprecated and removed.\n            if (isLegacySendProvider(provider)) {\n                return new Promise((resolve, reject) => {\n                    provider.send(payload, (err, response) => {\n                        if (err) {\n                            return reject(this._processJsonRpcResponse(payload, err, {\n                                legacy: true,\n                                error: true,\n                            }));\n                        }\n                        if (isNullish(response)) {\n                            throw new ResponseError({}, 'Got a \"nullish\" response from provider.');\n                        }\n                        return resolve(this._processJsonRpcResponse(payload, response, {\n                            legacy: true,\n                            error: false,\n                        }));\n                    });\n                });\n            }\n            // TODO: This could be deprecated and removed.\n            if (isLegacySendAsyncProvider(provider)) {\n                return provider\n                    .sendAsync(payload)\n                    .then(response => this._processJsonRpcResponse(payload, response, { legacy: true, error: false }))\n                    .catch(error => this._processJsonRpcResponse(payload, error, {\n                    legacy: true,\n                    error: true,\n                }));\n            }\n            throw new ProviderError('Provider does not have a request or send method to use.');\n        });\n    }\n    // eslint-disable-next-line class-methods-use-this\n    _processJsonRpcResponse(payload, response, { legacy, error }) {\n        if (isNullish(response)) {\n            return this._buildResponse(payload, \n            // Some providers uses \"null\" as valid empty response\n            // eslint-disable-next-line no-null/no-null\n            null, error);\n        }\n        // This is the majority of the cases so check these first\n        // A valid JSON-RPC response with error object\n        if (jsonRpc.isResponseWithError(response)) {\n            // check if its an rpc error\n            if (this.useRpcCallSpecification &&\n                isResponseRpcError(response)) {\n                const rpcErrorResponse = response;\n                // check if rpc error flag is on and response error code match an EIP-1474 or a standard rpc error code\n                if (rpcErrorsMap.get(rpcErrorResponse.error.code)) {\n                    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n                    const Err = rpcErrorsMap.get(rpcErrorResponse.error.code).error;\n                    throw new Err(rpcErrorResponse);\n                }\n                else {\n                    throw new RpcError(rpcErrorResponse);\n                }\n            }\n            else if (!Web3RequestManager._isReverted(response)) {\n                throw new InvalidResponseError(response, payload);\n            }\n        }\n        // This is the majority of the cases so check these first\n        // A valid JSON-RPC response with result object\n        if (jsonRpc.isResponseWithResult(response)) {\n            return response;\n        }\n        if (response instanceof Error) {\n            Web3RequestManager._isReverted(response);\n            throw response;\n        }\n        if (!legacy && jsonRpc.isBatchRequest(payload) && jsonRpc.isBatchResponse(response)) {\n            return response;\n        }\n        if (legacy && !error && jsonRpc.isBatchRequest(payload)) {\n            return response;\n        }\n        if (legacy && error && jsonRpc.isBatchRequest(payload)) {\n            // In case of error batch response we don't want to throw Invalid response\n            throw response;\n        }\n        if (legacy &&\n            !jsonRpc.isResponseWithError(response) &&\n            !jsonRpc.isResponseWithResult(response)) {\n            return this._buildResponse(payload, response, error);\n        }\n        if (jsonRpc.isBatchRequest(payload) && !Array.isArray(response)) {\n            throw new ResponseError(response, 'Got normal response for a batch request.');\n        }\n        if (!jsonRpc.isBatchRequest(payload) && Array.isArray(response)) {\n            throw new ResponseError(response, 'Got batch response for a normal request.');\n        }\n        throw new ResponseError(response, 'Invalid response');\n    }\n    static _isReverted(response) {\n        let error;\n        if (jsonRpc.isResponseWithError(response)) {\n            error = response.error;\n        }\n        else if (response instanceof Error) {\n            error = response;\n        }\n        // This message means that there was an error while executing the code of the smart contract\n        // However, more processing will happen at a higher level to decode the error data,\n        //\taccording to the Error ABI, if it was available as of EIP-838.\n        if (error === null || error === void 0 ? void 0 : error.message.includes('revert'))\n            throw new ContractExecutionError(error);\n        return false;\n    }\n    // Need to use same types as _processJsonRpcResponse so have to declare as instance method\n    // eslint-disable-next-line class-methods-use-this\n    _buildResponse(payload, response, error) {\n        const res = {\n            jsonrpc: '2.0',\n            // eslint-disable-next-line no-nested-ternary\n            id: jsonRpc.isBatchRequest(payload)\n                ? payload[0].id\n                : 'id' in payload\n                    ? payload.id\n                    : // Have to use the null here explicitly\n                        // eslint-disable-next-line no-null/no-null\n                        null,\n        };\n        if (error) {\n            return Object.assign(Object.assign({}, res), { error: response });\n        }\n        return Object.assign(Object.assign({}, res), { result: response });\n    }\n}\n//# sourceMappingURL=web3_request_manager.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\nimport { DEFAULT_RETURN_FORMAT, } from 'web3-types';\nimport { ProviderError, SubscriptionError } from 'web3-errors';\nimport { isNullish } from 'web3-utils';\nimport { isSupportSubscriptions } from './utils.js';\nimport { Web3RequestManagerEvent } from './web3_request_manager.js';\nexport class Web3SubscriptionManager {\n    constructor(requestManager, registeredSubscriptions, tolerateUnlinkedSubscription = false) {\n        this.requestManager = requestManager;\n        this.registeredSubscriptions = registeredSubscriptions;\n        this.tolerateUnlinkedSubscription = tolerateUnlinkedSubscription;\n        this._subscriptions = new Map();\n        this.requestManager.on(Web3RequestManagerEvent.BEFORE_PROVIDER_CHANGE, () => __awaiter(this, void 0, void 0, function* () {\n            yield this.unsubscribe();\n        }));\n        this.requestManager.on(Web3RequestManagerEvent.PROVIDER_CHANGED, () => {\n            this.clear();\n            this.listenToProviderEvents();\n        });\n        this.listenToProviderEvents();\n    }\n    listenToProviderEvents() {\n        const providerAsWebProvider = this.requestManager.provider;\n        if (!this.requestManager.provider ||\n            (typeof (providerAsWebProvider === null || providerAsWebProvider === void 0 ? void 0 : providerAsWebProvider.supportsSubscriptions) === 'function' &&\n                !(providerAsWebProvider === null || providerAsWebProvider === void 0 ? void 0 : providerAsWebProvider.supportsSubscriptions()))) {\n            return;\n        }\n        if (typeof this.requestManager.provider.on === 'function') {\n            if (typeof this.requestManager.provider.request === 'function') {\n                // Listen to provider messages and data\n                this.requestManager.provider.on('message', \n                // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument\n                (message) => this.messageListener(message));\n            }\n            else {\n                // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument\n                providerAsWebProvider.on('data', (data) => this.messageListener(data));\n            }\n        }\n    }\n    messageListener(data) {\n        var _a, _b, _c;\n        if (!data) {\n            throw new SubscriptionError('Should not call messageListener with no data. Type was');\n        }\n        const subscriptionId = ((_a = data.params) === null || _a === void 0 ? void 0 : _a.subscription) ||\n            ((_b = data.data) === null || _b === void 0 ? void 0 : _b.subscription) ||\n            ((_c = data.id) === null || _c === void 0 ? void 0 : _c.toString(16));\n        // Process if the received data is related to a subscription\n        if (subscriptionId) {\n            const sub = this._subscriptions.get(subscriptionId);\n            sub === null || sub === void 0 ? void 0 : sub.processSubscriptionData(data);\n        }\n    }\n    /**\n     * Will create a new subscription\n     *\n     * @param name - The subscription you want to subscribe to\n     * @param args - Optional additional parameters, depending on the subscription type\n     * @param returnFormat- ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) - Specifies how the return data from the call should be formatted.\n     *\n     * Will subscribe to a specific topic (note: name)\n     * @returns The subscription object\n     */\n    subscribe(name_1, args_1) {\n        return __awaiter(this, arguments, void 0, function* (name, args, returnFormat = DEFAULT_RETURN_FORMAT) {\n            const Klass = this.registeredSubscriptions[name];\n            if (!Klass) {\n                throw new SubscriptionError('Invalid subscription type');\n            }\n            // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n            const subscription = new Klass(args !== null && args !== void 0 ? args : undefined, {\n                subscriptionManager: this,\n                returnFormat,\n                // eslint.disable-next-line @typescript-eslint/no-unsafe-any\n            });\n            yield this.addSubscription(subscription);\n            return subscription;\n        });\n    }\n    /**\n     * Will returns all subscriptions.\n     */\n    get subscriptions() {\n        return this._subscriptions;\n    }\n    /**\n     *\n     * Adds an instance of {@link Web3Subscription} and subscribes to it\n     *\n     * @param sub - A {@link Web3Subscription} object\n     */\n    addSubscription(sub) {\n        return __awaiter(this, void 0, void 0, function* () {\n            if (!this.requestManager.provider) {\n                throw new ProviderError('Provider not available');\n            }\n            if (!this.supportsSubscriptions()) {\n                throw new SubscriptionError('The current provider does not support subscriptions');\n            }\n            if (sub.id && this._subscriptions.has(sub.id)) {\n                throw new SubscriptionError(`Subscription with id \"${sub.id}\" already exists`);\n            }\n            yield sub.sendSubscriptionRequest();\n            if (isNullish(sub.id)) {\n                throw new SubscriptionError('Subscription is not subscribed yet.');\n            }\n            this._subscriptions.set(sub.id, sub);\n            return sub.id;\n        });\n    }\n    /**\n     * Will clear a subscription\n     *\n     * @param id - The subscription of type {@link Web3Subscription}  to remove\n     */\n    removeSubscription(sub) {\n        return __awaiter(this, void 0, void 0, function* () {\n            const { id } = sub;\n            if (isNullish(id)) {\n                throw new SubscriptionError('Subscription is not subscribed yet. Or, had already been unsubscribed but not through the Subscription Manager.');\n            }\n            if (!this._subscriptions.has(id) && !this.tolerateUnlinkedSubscription) {\n                throw new SubscriptionError(`Subscription with id \"${id.toString()}\" does not exists`);\n            }\n            yield sub.sendUnsubscribeRequest();\n            this._subscriptions.delete(id);\n            return id;\n        });\n    }\n    /**\n     * Will unsubscribe all subscriptions that fulfill the condition\n     *\n     * @param condition - A function that access and `id` and a `subscription` and return `true` or `false`\n     * @returns An array of all the un-subscribed subscriptions\n     */\n    unsubscribe(condition) {\n        return __awaiter(this, void 0, void 0, function* () {\n            const result = [];\n            for (const [id, sub] of this.subscriptions.entries()) {\n                if (!condition || (typeof condition === 'function' && condition({ id, sub }))) {\n                    result.push(this.removeSubscription(sub));\n                }\n            }\n            return Promise.all(result);\n        });\n    }\n    /**\n     * Clears all subscriptions\n     */\n    clear() {\n        this._subscriptions.clear();\n    }\n    /**\n     * Check whether the current provider supports subscriptions.\n     *\n     * @returns `true` or `false` depending on if the current provider supports subscriptions\n     */\n    supportsSubscriptions() {\n        return isNullish(this.requestManager.provider)\n            ? false\n            : isSupportSubscriptions(this.requestManager.provider);\n    }\n}\n//# sourceMappingURL=web3_subscription_manager.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\n// eslint-disable-next-line max-classes-per-file\nimport { DEFAULT_RETURN_FORMAT, } from 'web3-types';\nimport { jsonRpc } from 'web3-utils';\n// eslint-disable-next-line import/no-cycle\nimport { Web3SubscriptionManager } from './web3_subscription_manager.js';\nimport { Web3EventEmitter } from './web3_event_emitter.js';\nexport class Web3Subscription extends Web3EventEmitter {\n    constructor(args, options) {\n        var _a;\n        super();\n        this.args = args;\n        const { requestManager } = options;\n        const { subscriptionManager } = options;\n        if (requestManager) {\n            // eslint-disable-next-line deprecation/deprecation\n            this._subscriptionManager = new Web3SubscriptionManager(requestManager, {}, true);\n        }\n        else {\n            this._subscriptionManager = subscriptionManager;\n        }\n        this._returnFormat = (_a = options === null || options === void 0 ? void 0 : options.returnFormat) !== null && _a !== void 0 ? _a : DEFAULT_RETURN_FORMAT;\n    }\n    get id() {\n        return this._id;\n    }\n    get lastBlock() {\n        return this._lastBlock;\n    }\n    subscribe() {\n        return __awaiter(this, void 0, void 0, function* () {\n            return this._subscriptionManager.addSubscription(this);\n        });\n    }\n    processSubscriptionData(data) {\n        var _a, _b;\n        if (data === null || data === void 0 ? void 0 : data.data) {\n            // for EIP-1193 provider\n            this._processSubscriptionResult((_b = (_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.result) !== null && _b !== void 0 ? _b : data === null || data === void 0 ? void 0 : data.data);\n        }\n        else if (data &&\n            jsonRpc.isResponseWithNotification(data)) {\n            this._processSubscriptionResult(data === null || data === void 0 ? void 0 : data.params.result);\n        }\n    }\n    sendSubscriptionRequest() {\n        return __awaiter(this, void 0, void 0, function* () {\n            this._id = yield this._subscriptionManager.requestManager.send({\n                method: 'eth_subscribe',\n                params: this._buildSubscriptionParams(),\n            });\n            this.emit('connected', this._id);\n            return this._id;\n        });\n    }\n    get returnFormat() {\n        return this._returnFormat;\n    }\n    get subscriptionManager() {\n        return this._subscriptionManager;\n    }\n    resubscribe() {\n        return __awaiter(this, void 0, void 0, function* () {\n            yield this.unsubscribe();\n            yield this.subscribe();\n        });\n    }\n    unsubscribe() {\n        return __awaiter(this, void 0, void 0, function* () {\n            if (!this.id) {\n                return;\n            }\n            yield this._subscriptionManager.removeSubscription(this);\n        });\n    }\n    sendUnsubscribeRequest() {\n        return __awaiter(this, void 0, void 0, function* () {\n            yield this._subscriptionManager.requestManager.send({\n                method: 'eth_unsubscribe',\n                params: [this.id],\n            });\n            this._id = undefined;\n        });\n    }\n    // eslint-disable-next-line class-methods-use-this\n    formatSubscriptionResult(data) {\n        return data;\n    }\n    _processSubscriptionResult(data) {\n        this.emit('data', this.formatSubscriptionResult(data));\n    }\n    _processSubscriptionError(error) {\n        this.emit('error', error);\n    }\n    // eslint-disable-next-line class-methods-use-this\n    _buildSubscriptionParams() {\n        // This should be overridden in the subclass\n        throw new Error('Implement in the child class');\n    }\n}\n//# sourceMappingURL=web3_subscriptions.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\nimport { Web3BaseWallet } from 'web3-types';\nimport { isNullish } from 'web3-validator';\n/**\n * Wallet is an in memory `wallet` that can hold multiple accounts.\n * These accounts can be used when using web3.eth.sendTransaction() or web3.eth.contract.methods.contractfunction().send();\n *\n * For using Wallet functionality, install Web3 package using `npm i web3` or `yarn add web3`.\n * After that, Wallet functionality will be available as mentioned below.\n *\n * ```ts\n * import { Web3 } from 'web3';\n * const web3 = new Web3('http://127.0.0.1:7545');\n *\n * const wallet = await web3.eth.accounts.wallet.create(2);\n *\n * const signature = wallet.at(0).sign(\"Test Data\"); // use wallet\n *\n * // fund account before sending following transaction ...\n *\n * const receipt = await web3.eth.sendTransaction({ // internally sign transaction using wallet\n *    from: wallet.at(0).address,\n *    to: \"0xdAC17F958D2ee523a2206206994597C13D831ec7\",\n *    value: 1\n *    //....\n * });\n * ```\n */\nexport class Wallet extends Web3BaseWallet {\n    constructor() {\n        super(...arguments);\n        this._addressMap = new Map();\n        this._defaultKeyName = 'web3js_wallet';\n    }\n    /**\n     * Get the storage object of the browser\n     *\n     * @returns the storage\n     */\n    static getStorage() {\n        let storage;\n        try {\n            storage = window.localStorage;\n            const x = '__storage_test__';\n            storage.setItem(x, x);\n            storage.removeItem(x);\n            return storage;\n        }\n        catch (e) {\n            return e &&\n                // everything except Firefox\n                (e.code === 22 ||\n                    // Firefox\n                    e.code === 1014 ||\n                    // test name field too, because code might not be present\n                    // everything except Firefox\n                    e.name === 'QuotaExceededError' ||\n                    // Firefox\n                    e.name === 'NS_ERROR_DOM_QUOTA_REACHED') &&\n                // acknowledge QuotaExceededError only if there's something already stored\n                !isNullish(storage) &&\n                storage.length !== 0\n                ? storage\n                : undefined;\n        }\n    }\n    /**\n     * Generates one or more accounts in the wallet. If wallets already exist they will not be overridden.\n     *\n     * @param numberOfAccounts - Number of accounts to create. Leave empty to create an empty wallet.\n     * @returns The wallet\n     * ```ts\n     * web3.eth.accounts.wallet.create(2)\n     * > Wallet(2) [\n     *   {\n     *     address: '0xde38310a42B751AE57d30cFFF4a0A3c52A442fCE',\n     *     privateKey: '0x6422c9d28efdcbee93c1d32a5fc6fd6fa081b985487885296cf8c9bbb5872600',\n     *     signTransaction: [Function: signTransaction],\n     *     sign: [Function: sign],\n     *     encrypt: [Function: encrypt]\n     *   },\n     *   {\n     *     address: '0x766BF755246d924B1d017Fdb5390f38a60166691',\n     *     privateKey: '0x756530f13c0eb636ebdda655335f5dea9921e3362e2e588b0ad59e556f7751f0',\n     *     signTransaction: [Function: signTransaction],\n     *     sign: [Function: sign],\n     *     encrypt: [Function: encrypt]\n     *   },\n     *   _accountProvider: {\n     *     create: [Function: create],\n     *     privateKeyToAccount: [Function: privateKeyToAccount],\n     *     decrypt: [Function: decrypt]\n     *   },\n     *   _addressMap: Map(2) {\n     *     '0xde38310a42b751ae57d30cfff4a0a3c52a442fce' => 0,\n     *     '0x766bf755246d924b1d017fdb5390f38a60166691' => 1\n     *   },\n     *   _defaultKeyName: 'web3js_wallet'\n     * ]\n     *\n     * ```\n     */\n    create(numberOfAccounts) {\n        for (let i = 0; i < numberOfAccounts; i += 1) {\n            this.add(this._accountProvider.create());\n        }\n        return this;\n    }\n    /**\n     * Adds an account using a private key or account object to the wallet.\n     *\n     * @param account - A private key or account object\n     * @returns The wallet\n     *\n     * ```ts\n     * web3.eth.accounts.wallet.add('0xbce9b59981303e76c4878b1a6d7b088ec6b9dd5c966b7d5f54d7a749ff683387');\n     * > Wallet(1) [\n     *   {\n     *     address: '0x85D70633b90e03e0276B98880286D0D055685ed7',\n     *     privateKey: '0xbce9b59981303e76c4878b1a6d7b088ec6b9dd5c966b7d5f54d7a749ff683387',\n     *     signTransaction: [Function: signTransaction],\n     *     sign: [Function: sign],\n     *     encrypt: [Function: encrypt]\n     *   },\n     *   _accountProvider: {\n     *     create: [Function: create],\n     *     privateKeyToAccount: [Function: privateKeyToAccount],\n     *     decrypt: [Function: decrypt]\n     *   },\n     *   _addressMap: Map(1) { '0x85d70633b90e03e0276b98880286d0d055685ed7' => 0 },\n     *   _defaultKeyName: 'web3js_wallet'\n     * ]\n     * ```\n     */\n    add(account) {\n        var _a;\n        if (typeof account === 'string') {\n            return this.add(this._accountProvider.privateKeyToAccount(account));\n        }\n        let index = this.length;\n        const existAccount = this.get(account.address);\n        if (existAccount) {\n            console.warn(`Account ${account.address.toLowerCase()} already exists.`);\n            index = (_a = this._addressMap.get(account.address.toLowerCase())) !== null && _a !== void 0 ? _a : index;\n        }\n        this._addressMap.set(account.address.toLowerCase(), index);\n        this[index] = account;\n        return this;\n    }\n    /**\n     * Get the account of the wallet with either the index or public address.\n     *\n     * @param addressOrIndex - A string of the address or number index within the wallet.\n     * @returns The account object or undefined if the account doesn't exist\n     */\n    get(addressOrIndex) {\n        if (typeof addressOrIndex === 'string') {\n            const index = this._addressMap.get(addressOrIndex.toLowerCase());\n            if (!isNullish(index)) {\n                return this[index];\n            }\n            return undefined;\n        }\n        return this[addressOrIndex];\n    }\n    /**\n     * Removes an account from the wallet.\n     *\n     * @param addressOrIndex - The account address, or index in the wallet.\n     * @returns true if the wallet was removed. false if it couldn't be found.\n     * ```ts\n     * web3.eth.accounts.wallet.add('0xbce9b59981303e76c4878b1a6d7b088ec6b9dd5c966b7d5f54d7a749ff683387');\n     *\n     * web3.eth.accounts.wallet.remove('0x85D70633b90e03e0276B98880286D0D055685ed7');\n     * > true\n     * web3.eth.accounts.wallet\n     * > Wallet(0) [\n     * _accountProvider: {\n     *   create: [Function: create],\n     *   privateKeyToAccount: [Function: privateKeyToAccount],\n     *   decrypt: [Function: decrypt]\n     * },\n     * _addressMap: Map(0) {},\n     * _defaultKeyName: 'web3js_wallet'\n     * ]\n     * ```\n     */\n    remove(addressOrIndex) {\n        if (typeof addressOrIndex === 'string') {\n            const index = this._addressMap.get(addressOrIndex.toLowerCase());\n            if (isNullish(index)) {\n                return false;\n            }\n            this._addressMap.delete(addressOrIndex.toLowerCase());\n            this.splice(index, 1);\n            return true;\n        }\n        if (this[addressOrIndex]) {\n            this.splice(addressOrIndex, 1);\n            return true;\n        }\n        return false;\n    }\n    /**\n     * Securely empties the wallet and removes all its accounts.\n     * Use this with *caution as it will remove all accounts stored in local wallet.\n     *\n     * @returns The wallet object\n     * ```ts\n     *\n     * web3.eth.accounts.wallet.clear();\n     * > Wallet(0) [\n     * _accountProvider: {\n     *   create: [Function: create],\n     *   privateKeyToAccount: [Function: privateKeyToAccount],\n     *   decrypt: [Function: decrypt]\n     * },\n     * _addressMap: Map(0) {},\n     * _defaultKeyName: 'web3js_wallet'\n     * ]\n     * ```\n     */\n    clear() {\n        this._addressMap.clear();\n        // Setting length clears the Array in JS.\n        this.length = 0;\n        return this;\n    }\n    /**\n     * Encrypts all wallet accounts to an array of encrypted keystore v3 objects.\n     *\n     * @param password - The password which will be used for encryption\n     * @param options - encryption options\n     * @returns An array of the encrypted keystore v3.\n     *\n     * ```ts\n     * web3.eth.accounts.wallet.create(1)\n     * web3.eth.accounts.wallet.encrypt(\"abc\").then(console.log);\n     * > [\n     * '{\"version\":3,\"id\":\"fa46e213-a7c3-4844-b903-dd14d39cc7db\",\n     * \"address\":\"fa3e41a401609103c241431cbdee8623ae2a321a\",\"crypto\":\n     * {\"ciphertext\":\"8d179a911d6146ad2924e86bf493ed89b8ff3596ffec0816e761c542016ab13c\",\n     * \"cipherparams\":{\"iv\":\"acc888c6cf4a19b86846cef0185a7164\"},\"cipher\":\"aes-128-ctr\",\n     * \"kdf\":\"scrypt\",\"kdfparams\":{\"n\":8192,\"r\":8,\"p\":1,\"dklen\":32,\"salt\":\"6a743c9b367d15f4758e4f3f3378ff0fd443708d1c64854e07588ea5331823ae\"},\n     * \"mac\":\"410544c8307e3691fda305eb3722d82c3431f212a87daa119a21587d96698b57\"}}'\n     * ]\n     * ```\n     */\n    encrypt(password, options) {\n        return __awaiter(this, void 0, void 0, function* () {\n            return Promise.all(this.map((account) => __awaiter(this, void 0, void 0, function* () { return account.encrypt(password, options); })));\n        });\n    }\n    /**\n     * Decrypts keystore v3 objects.\n     *\n     * @param encryptedWallets - An array of encrypted keystore v3 objects to decrypt\n     * @param password - The password to encrypt with\n     * @param options - decrypt options for the wallets\n     * @returns The decrypted wallet object\n     *\n     * ```ts\n     * web3.eth.accounts.wallet.decrypt([\n     * { version: 3,\n     * id: '83191a81-aaca-451f-b63d-0c5f3b849289',\n     * address: '06f702337909c06c82b09b7a22f0a2f0855d1f68',\n     * crypto:\n     * { ciphertext: '7d34deae112841fba86e3e6cf08f5398dda323a8e4d29332621534e2c4069e8d',\n     *   cipherparams: { iv: '497f4d26997a84d570778eae874b2333' },\n     *   cipher: 'aes-128-ctr',\n     *   kdf: 'scrypt',\n     *   kdfparams:\n     *    { dklen: 32,\n     *      salt: '208dd732a27aa4803bb760228dff18515d5313fd085bbce60594a3919ae2d88d',\n     *      n: 262144,\n     *      r: 8,\n     *      p: 1 },\n     *   mac: '0062a853de302513c57bfe3108ab493733034bf3cb313326f42cf26ea2619cf9' } },\n     * { version: 3,\n     * id: '7d6b91fa-3611-407b-b16b-396efb28f97e',\n     * address: 'b5d89661b59a9af0b34f58d19138baa2de48baaf',\n     * crypto:\n     * { ciphertext: 'cb9712d1982ff89f571fa5dbef447f14b7e5f142232bd2a913aac833730eeb43',\n     *   cipherparams: { iv: '8cccb91cb84e435437f7282ec2ffd2db' },\n     *   cipher: 'aes-128-ctr',\n     *   kdf: 'scrypt',\n     *   kdfparams:\n     *    { dklen: 32,\n     *      salt: '08ba6736363c5586434cd5b895e6fe41ea7db4785bd9b901dedce77a1514e8b8',\n     *      n: 262144,\n     *      r: 8,\n     *      p: 1 },\n     *   mac: 'd2eb068b37e2df55f56fa97a2bf4f55e072bef0dd703bfd917717d9dc54510f0' } }\n     * ], 'test').then(console.log)\n     * > Wallet {\n     *   _accountProvider: {\n     *     create: [Function: create],\n     *     privateKeyToAccount: [Function: privateKeyToAccount],\n     *     decrypt: [Function: decrypt]\n     *   },\n     *   _defaultKeyName: 'web3js_wallet',\n     *   _accounts: {\n     *     '0x85d70633b90e03e0276b98880286d0d055685ed7': {\n     *       address: '0x85D70633b90e03e0276B98880286D0D055685ed7',\n     *       privateKey: '0xbce9b59981303e76c4878b1a6d7b088ec6b9dd5c966b7d5f54d7a749ff683387',\n     *       signTransaction: [Function: signTransaction],\n     *       sign: [Function: sign],\n     *       encrypt: [Function: encrypt]\n     *     },\n     *     '0x06f702337909c06c82b09b7a22f0a2f0855d1f68': {\n     *       address: '0x06F702337909C06C82B09B7A22F0a2f0855d1F68',\n     *       privateKey: '87a51da18900da7398b3bab03996833138f269f8f66dd1237b98df6b9ce14573',\n     *       signTransaction: [Function: signTransaction],\n     *       sign: [Function: sign],\n     *       encrypt: [Function: encrypt]\n     *     },\n     *     '0xb5d89661b59a9af0b34f58d19138baa2de48baaf': {\n     *       address: '0xB5d89661B59a9aF0b34f58D19138bAa2de48BAaf',\n     *       privateKey: '7ee61c5282979aae9dd795bb6a54e8bdc2bfe009acb64eb9a67322eec3b3da6e',\n     *       signTransaction: [Function: signTransaction],\n     *       sign: [Function: sign],\n     *       encrypt: [Function: encrypt]\n     *     }\n     *   }\n     * }\n     * ```\n     */\n    decrypt(encryptedWallets, password, options) {\n        return __awaiter(this, void 0, void 0, function* () {\n            const results = yield Promise.all(encryptedWallets.map((wallet) => __awaiter(this, void 0, void 0, function* () { return this._accountProvider.decrypt(wallet, password, options); })));\n            for (const res of results) {\n                this.add(res);\n            }\n            return this;\n        });\n    }\n    /**\n     * Stores the wallet encrypted and as string in local storage.\n     * **__NOTE:__** Browser only\n     *\n     * @param password - The password to encrypt the wallet\n     * @param keyName - (optional) The key used for the local storage position, defaults to `\"web3js_wallet\"`.\n     * @returns Will return boolean value true if saved properly\n     * ```ts\n     * web3.eth.accounts.wallet.save('test#!$');\n     * >true\n     * ```\n     */\n    save(password, keyName) {\n        return __awaiter(this, void 0, void 0, function* () {\n            const storage = Wallet.getStorage();\n            if (!storage) {\n                throw new Error('Local storage not available.');\n            }\n            storage.setItem(keyName !== null && keyName !== void 0 ? keyName : this._defaultKeyName, JSON.stringify(yield this.encrypt(password)));\n            return true;\n        });\n    }\n    /**\n     * Loads a wallet from local storage and decrypts it.\n     * **__NOTE:__** Browser only\n     *\n     * @param password - The password to decrypt the wallet.\n     * @param keyName - (optional)The key used for local storage position, defaults to `web3js_wallet\"`\n     * @returns Returns the wallet object\n     *\n     * ```ts\n     * web3.eth.accounts.wallet.save('test#!$');\n     * > true\n     * web3.eth.accounts.wallet.load('test#!$');\n     * { defaultKeyName: \"web3js_wallet\",\n     *   length: 0,\n     *   _accounts: Accounts {_requestManager: RequestManager, givenProvider: Proxy, providers: {…}, _provider: WebsocketProvider, …},\n     *   [[Prototype]]: Object\n     * }\n     * ```\n     */\n    load(password, keyName) {\n        return __awaiter(this, void 0, void 0, function* () {\n            const storage = Wallet.getStorage();\n            if (!storage) {\n                throw new Error('Local storage not available.');\n            }\n            const keystore = storage.getItem(keyName !== null && keyName !== void 0 ? keyName : this._defaultKeyName);\n            if (keystore) {\n                yield this.decrypt(JSON.parse(keystore) || [], password);\n            }\n            return this;\n        });\n    }\n}\n//# sourceMappingURL=wallet.js.map","import { crypto as cr } from \"@noble/hashes/crypto\";\nimport { concatBytes, equalsBytes } from \"./utils.js\";\nconst crypto = { web: cr };\nfunction validateOpt(key, iv, mode) {\n    if (!mode.startsWith(\"aes-\")) {\n        throw new Error(`AES submodule doesn't support mode ${mode}`);\n    }\n    if (iv.length !== 16) {\n        throw new Error(\"AES: wrong IV length\");\n    }\n    if ((mode.startsWith(\"aes-128\") && key.length !== 16) ||\n        (mode.startsWith(\"aes-256\") && key.length !== 32)) {\n        throw new Error(\"AES: wrong key length\");\n    }\n}\nasync function getBrowserKey(mode, key, iv) {\n    if (!crypto.web) {\n        throw new Error(\"Browser crypto not available.\");\n    }\n    let keyMode;\n    if ([\"aes-128-cbc\", \"aes-256-cbc\"].includes(mode)) {\n        keyMode = \"cbc\";\n    }\n    if ([\"aes-128-ctr\", \"aes-256-ctr\"].includes(mode)) {\n        keyMode = \"ctr\";\n    }\n    if (!keyMode) {\n        throw new Error(\"AES: unsupported mode\");\n    }\n    const wKey = await crypto.web.subtle.importKey(\"raw\", key, { name: `AES-${keyMode.toUpperCase()}`, length: key.length * 8 }, true, [\"encrypt\", \"decrypt\"]);\n    // node.js uses whole 128 bit as a counter, without nonce, instead of 64 bit\n    // recommended by NIST SP800-38A\n    return [wKey, { name: `aes-${keyMode}`, iv, counter: iv, length: 128 }];\n}\nexport async function encrypt(msg, key, iv, mode = \"aes-128-ctr\", pkcs7PaddingEnabled = true) {\n    validateOpt(key, iv, mode);\n    if (crypto.web) {\n        const [wKey, wOpt] = await getBrowserKey(mode, key, iv);\n        const cipher = await crypto.web.subtle.encrypt(wOpt, wKey, msg);\n        // Remove PKCS7 padding on cbc mode by stripping end of message\n        let res = new Uint8Array(cipher);\n        if (!pkcs7PaddingEnabled && wOpt.name === \"aes-cbc\" && !(msg.length % 16)) {\n            res = res.slice(0, -16);\n        }\n        return res;\n    }\n    else if (crypto.node) {\n        const cipher = crypto.node.createCipheriv(mode, key, iv);\n        cipher.setAutoPadding(pkcs7PaddingEnabled);\n        return concatBytes(cipher.update(msg), cipher.final());\n    }\n    else {\n        throw new Error(\"The environment doesn't have AES module\");\n    }\n}\nasync function getPadding(cypherText, key, iv, mode) {\n    const lastBlock = cypherText.slice(-16);\n    for (let i = 0; i < 16; i++) {\n        // Undo xor of iv and fill with lastBlock ^ padding (16)\n        lastBlock[i] ^= iv[i] ^ 16;\n    }\n    const res = await encrypt(lastBlock, key, iv, mode);\n    return res.slice(0, 16);\n}\nexport async function decrypt(cypherText, key, iv, mode = \"aes-128-ctr\", pkcs7PaddingEnabled = true) {\n    validateOpt(key, iv, mode);\n    if (crypto.web) {\n        const [wKey, wOpt] = await getBrowserKey(mode, key, iv);\n        // Add empty padding so Chrome will correctly decrypt message\n        if (!pkcs7PaddingEnabled && wOpt.name === \"aes-cbc\") {\n            const padding = await getPadding(cypherText, key, iv, mode);\n            cypherText = concatBytes(cypherText, padding);\n        }\n        const msg = await crypto.web.subtle.decrypt(wOpt, wKey, cypherText);\n        const msgBytes = new Uint8Array(msg);\n        // Safari always ignores padding (if no padding -> broken message)\n        if (wOpt.name === \"aes-cbc\") {\n            const encrypted = await encrypt(msgBytes, key, iv, mode);\n            if (!equalsBytes(encrypted, cypherText)) {\n                throw new Error(\"AES: wrong padding\");\n            }\n        }\n        return msgBytes;\n    }\n    else if (crypto.node) {\n        const decipher = crypto.node.createDecipheriv(mode, key, iv);\n        decipher.setAutoPadding(pkcs7PaddingEnabled);\n        return concatBytes(decipher.update(cypherText), decipher.final());\n    }\n    else {\n        throw new Error(\"The environment doesn't have AES module\");\n    }\n}\n","import { hash as assertHash, bytes as assertBytes, exists as assertExists } from './_assert.js';\nimport { Hash, toBytes } from './utils.js';\n// HMAC (RFC 2104)\nexport class HMAC extends Hash {\n    constructor(hash, _key) {\n        super();\n        this.finished = false;\n        this.destroyed = false;\n        assertHash(hash);\n        const key = toBytes(_key);\n        this.iHash = hash.create();\n        if (typeof this.iHash.update !== 'function')\n            throw new Error('Expected instance of class which extends utils.Hash');\n        this.blockLen = this.iHash.blockLen;\n        this.outputLen = this.iHash.outputLen;\n        const blockLen = this.blockLen;\n        const pad = new Uint8Array(blockLen);\n        // blockLen can be bigger than outputLen\n        pad.set(key.length > blockLen ? hash.create().update(key).digest() : key);\n        for (let i = 0; i < pad.length; i++)\n            pad[i] ^= 0x36;\n        this.iHash.update(pad);\n        // By doing update (processing of first block) of outer hash here we can re-use it between multiple calls via clone\n        this.oHash = hash.create();\n        // Undo internal XOR && apply outer XOR\n        for (let i = 0; i < pad.length; i++)\n            pad[i] ^= 0x36 ^ 0x5c;\n        this.oHash.update(pad);\n        pad.fill(0);\n    }\n    update(buf) {\n        assertExists(this);\n        this.iHash.update(buf);\n        return this;\n    }\n    digestInto(out) {\n        assertExists(this);\n        assertBytes(out, this.outputLen);\n        this.finished = true;\n        this.iHash.digestInto(out);\n        this.oHash.update(out);\n        this.oHash.digestInto(out);\n        this.destroy();\n    }\n    digest() {\n        const out = new Uint8Array(this.oHash.outputLen);\n        this.digestInto(out);\n        return out;\n    }\n    _cloneInto(to) {\n        // Create new instance without calling constructor since key already in state and we don't know it.\n        to || (to = Object.create(Object.getPrototypeOf(this), {}));\n        const { oHash, iHash, finished, destroyed, blockLen, outputLen } = this;\n        to = to;\n        to.finished = finished;\n        to.destroyed = destroyed;\n        to.blockLen = blockLen;\n        to.outputLen = outputLen;\n        to.oHash = oHash._cloneInto(to.oHash);\n        to.iHash = iHash._cloneInto(to.iHash);\n        return to;\n    }\n    destroy() {\n        this.destroyed = true;\n        this.oHash.destroy();\n        this.iHash.destroy();\n    }\n}\n/**\n * HMAC: RFC2104 message authentication code.\n * @param hash - function that would be used e.g. sha256\n * @param key - message key\n * @param message - message data\n */\nexport const hmac = (hash, key, message) => new HMAC(hash, key).update(message).digest();\nhmac.create = (hash, key) => new HMAC(hash, key);\n//# sourceMappingURL=hmac.js.map","import { hash as assertHash, number as assertNumber } from './_assert.js';\nimport { hmac } from './hmac.js';\nimport { createView, toBytes, checkOpts, asyncLoop } from './utils.js';\n// Common prologue and epilogue for sync/async functions\nfunction pbkdf2Init(hash, _password, _salt, _opts) {\n    assertHash(hash);\n    const opts = checkOpts({ dkLen: 32, asyncTick: 10 }, _opts);\n    const { c, dkLen, asyncTick } = opts;\n    assertNumber(c);\n    assertNumber(dkLen);\n    assertNumber(asyncTick);\n    if (c < 1)\n        throw new Error('PBKDF2: iterations (c) should be >= 1');\n    const password = toBytes(_password);\n    const salt = toBytes(_salt);\n    // DK = PBKDF2(PRF, Password, Salt, c, dkLen);\n    const DK = new Uint8Array(dkLen);\n    // U1 = PRF(Password, Salt + INT_32_BE(i))\n    const PRF = hmac.create(hash, password);\n    const PRFSalt = PRF._cloneInto().update(salt);\n    return { c, dkLen, asyncTick, DK, PRF, PRFSalt };\n}\nfunction pbkdf2Output(PRF, PRFSalt, DK, prfW, u) {\n    PRF.destroy();\n    PRFSalt.destroy();\n    if (prfW)\n        prfW.destroy();\n    u.fill(0);\n    return DK;\n}\n/**\n * PBKDF2-HMAC: RFC 2898 key derivation function\n * @param hash - hash function that would be used e.g. sha256\n * @param password - password from which a derived key is generated\n * @param salt - cryptographic salt\n * @param opts - {c, dkLen} where c is work factor and dkLen is output message size\n */\nexport function pbkdf2(hash, password, salt, opts) {\n    const { c, dkLen, DK, PRF, PRFSalt } = pbkdf2Init(hash, password, salt, opts);\n    let prfW; // Working copy\n    const arr = new Uint8Array(4);\n    const view = createView(arr);\n    const u = new Uint8Array(PRF.outputLen);\n    // DK = T1 + T2 + ⋯ + Tdklen/hlen\n    for (let ti = 1, pos = 0; pos < dkLen; ti++, pos += PRF.outputLen) {\n        // Ti = F(Password, Salt, c, i)\n        const Ti = DK.subarray(pos, pos + PRF.outputLen);\n        view.setInt32(0, ti, false);\n        // F(Password, Salt, c, i) = U1 ^ U2 ^ ⋯ ^ Uc\n        // U1 = PRF(Password, Salt + INT_32_BE(i))\n        (prfW = PRFSalt._cloneInto(prfW)).update(arr).digestInto(u);\n        Ti.set(u.subarray(0, Ti.length));\n        for (let ui = 1; ui < c; ui++) {\n            // Uc = PRF(Password, Uc−1)\n            PRF._cloneInto(prfW).update(u).digestInto(u);\n            for (let i = 0; i < Ti.length; i++)\n                Ti[i] ^= u[i];\n        }\n    }\n    return pbkdf2Output(PRF, PRFSalt, DK, prfW, u);\n}\nexport async function pbkdf2Async(hash, password, salt, opts) {\n    const { c, dkLen, asyncTick, DK, PRF, PRFSalt } = pbkdf2Init(hash, password, salt, opts);\n    let prfW; // Working copy\n    const arr = new Uint8Array(4);\n    const view = createView(arr);\n    const u = new Uint8Array(PRF.outputLen);\n    // DK = T1 + T2 + ⋯ + Tdklen/hlen\n    for (let ti = 1, pos = 0; pos < dkLen; ti++, pos += PRF.outputLen) {\n        // Ti = F(Password, Salt, c, i)\n        const Ti = DK.subarray(pos, pos + PRF.outputLen);\n        view.setInt32(0, ti, false);\n        // F(Password, Salt, c, i) = U1 ^ U2 ^ ⋯ ^ Uc\n        // U1 = PRF(Password, Salt + INT_32_BE(i))\n        (prfW = PRFSalt._cloneInto(prfW)).update(arr).digestInto(u);\n        Ti.set(u.subarray(0, Ti.length));\n        await asyncLoop(c - 1, asyncTick, () => {\n            // Uc = PRF(Password, Uc−1)\n            PRF._cloneInto(prfW).update(u).digestInto(u);\n            for (let i = 0; i < Ti.length; i++)\n                Ti[i] ^= u[i];\n        });\n    }\n    return pbkdf2Output(PRF, PRFSalt, DK, prfW, u);\n}\n//# sourceMappingURL=pbkdf2.js.map","import { exists, output } from './_assert.js';\nimport { Hash, createView, toBytes } from './utils.js';\n// Polyfill for Safari 14\nfunction setBigUint64(view, byteOffset, value, isLE) {\n    if (typeof view.setBigUint64 === 'function')\n        return view.setBigUint64(byteOffset, value, isLE);\n    const _32n = BigInt(32);\n    const _u32_max = BigInt(0xffffffff);\n    const wh = Number((value >> _32n) & _u32_max);\n    const wl = Number(value & _u32_max);\n    const h = isLE ? 4 : 0;\n    const l = isLE ? 0 : 4;\n    view.setUint32(byteOffset + h, wh, isLE);\n    view.setUint32(byteOffset + l, wl, isLE);\n}\n// Choice: a ? b : c\nexport const Chi = (a, b, c) => (a & b) ^ (~a & c);\n// Majority function, true if any two inpust is true\nexport const Maj = (a, b, c) => (a & b) ^ (a & c) ^ (b & c);\n/**\n * Merkle-Damgard hash construction base class.\n * Could be used to create MD5, RIPEMD, SHA1, SHA2.\n */\nexport class HashMD extends Hash {\n    constructor(blockLen, outputLen, padOffset, isLE) {\n        super();\n        this.blockLen = blockLen;\n        this.outputLen = outputLen;\n        this.padOffset = padOffset;\n        this.isLE = isLE;\n        this.finished = false;\n        this.length = 0;\n        this.pos = 0;\n        this.destroyed = false;\n        this.buffer = new Uint8Array(blockLen);\n        this.view = createView(this.buffer);\n    }\n    update(data) {\n        exists(this);\n        const { view, buffer, blockLen } = this;\n        data = toBytes(data);\n        const len = data.length;\n        for (let pos = 0; pos < len;) {\n            const take = Math.min(blockLen - this.pos, len - pos);\n            // Fast path: we have at least one block in input, cast it to view and process\n            if (take === blockLen) {\n                const dataView = createView(data);\n                for (; blockLen <= len - pos; pos += blockLen)\n                    this.process(dataView, pos);\n                continue;\n            }\n            buffer.set(data.subarray(pos, pos + take), this.pos);\n            this.pos += take;\n            pos += take;\n            if (this.pos === blockLen) {\n                this.process(view, 0);\n                this.pos = 0;\n            }\n        }\n        this.length += data.length;\n        this.roundClean();\n        return this;\n    }\n    digestInto(out) {\n        exists(this);\n        output(out, this);\n        this.finished = true;\n        // Padding\n        // We can avoid allocation of buffer for padding completely if it\n        // was previously not allocated here. But it won't change performance.\n        const { buffer, view, blockLen, isLE } = this;\n        let { pos } = this;\n        // append the bit '1' to the message\n        buffer[pos++] = 0b10000000;\n        this.buffer.subarray(pos).fill(0);\n        // we have less than padOffset left in buffer, so we cannot put length in\n        // current block, need process it and pad again\n        if (this.padOffset > blockLen - pos) {\n            this.process(view, 0);\n            pos = 0;\n        }\n        // Pad until full block byte with zeros\n        for (let i = pos; i < blockLen; i++)\n            buffer[i] = 0;\n        // Note: sha512 requires length to be 128bit integer, but length in JS will overflow before that\n        // You need to write around 2 exabytes (u64_max / 8 / (1024**6)) for this to happen.\n        // So we just write lowest 64 bits of that value.\n        setBigUint64(view, blockLen - 8, BigInt(this.length * 8), isLE);\n        this.process(view, 0);\n        const oview = createView(out);\n        const len = this.outputLen;\n        // NOTE: we do division by 4 later, which should be fused in single op with modulo by JIT\n        if (len % 4)\n            throw new Error('_sha2: outputLen should be aligned to 32bit');\n        const outLen = len / 4;\n        const state = this.get();\n        if (outLen > state.length)\n            throw new Error('_sha2: outputLen bigger than state');\n        for (let i = 0; i < outLen; i++)\n            oview.setUint32(4 * i, state[i], isLE);\n    }\n    digest() {\n        const { buffer, outputLen } = this;\n        this.digestInto(buffer);\n        const res = buffer.slice(0, outputLen);\n        this.destroy();\n        return res;\n    }\n    _cloneInto(to) {\n        to || (to = new this.constructor());\n        to.set(...this.get());\n        const { blockLen, buffer, length, finished, destroyed, pos } = this;\n        to.length = length;\n        to.pos = pos;\n        to.finished = finished;\n        to.destroyed = destroyed;\n        if (length % blockLen)\n            to.buffer.set(buffer);\n        return to;\n    }\n}\n//# sourceMappingURL=_md.js.map","import { HashMD, Chi, Maj } from './_md.js';\nimport { rotr, wrapConstructor } from './utils.js';\n// SHA2-256 need to try 2^128 hashes to execute birthday attack.\n// BTC network is doing 2^67 hashes/sec as per early 2023.\n// Round constants:\n// first 32 bits of the fractional parts of the cube roots of the first 64 primes 2..311)\n// prettier-ignore\nconst SHA256_K = /* @__PURE__ */ new Uint32Array([\n    0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n    0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n    0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n    0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n    0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n    0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n    0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n    0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n]);\n// Initial state:\n// first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19\n// prettier-ignore\nconst SHA256_IV = /* @__PURE__ */ new Uint32Array([\n    0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19\n]);\n// Temporary buffer, not used to store anything between runs\n// Named this way because it matches specification.\nconst SHA256_W = /* @__PURE__ */ new Uint32Array(64);\nclass SHA256 extends HashMD {\n    constructor() {\n        super(64, 32, 8, false);\n        // We cannot use array here since array allows indexing by variable\n        // which means optimizer/compiler cannot use registers.\n        this.A = SHA256_IV[0] | 0;\n        this.B = SHA256_IV[1] | 0;\n        this.C = SHA256_IV[2] | 0;\n        this.D = SHA256_IV[3] | 0;\n        this.E = SHA256_IV[4] | 0;\n        this.F = SHA256_IV[5] | 0;\n        this.G = SHA256_IV[6] | 0;\n        this.H = SHA256_IV[7] | 0;\n    }\n    get() {\n        const { A, B, C, D, E, F, G, H } = this;\n        return [A, B, C, D, E, F, G, H];\n    }\n    // prettier-ignore\n    set(A, B, C, D, E, F, G, H) {\n        this.A = A | 0;\n        this.B = B | 0;\n        this.C = C | 0;\n        this.D = D | 0;\n        this.E = E | 0;\n        this.F = F | 0;\n        this.G = G | 0;\n        this.H = H | 0;\n    }\n    process(view, offset) {\n        // Extend the first 16 words into the remaining 48 words w[16..63] of the message schedule array\n        for (let i = 0; i < 16; i++, offset += 4)\n            SHA256_W[i] = view.getUint32(offset, false);\n        for (let i = 16; i < 64; i++) {\n            const W15 = SHA256_W[i - 15];\n            const W2 = SHA256_W[i - 2];\n            const s0 = rotr(W15, 7) ^ rotr(W15, 18) ^ (W15 >>> 3);\n            const s1 = rotr(W2, 17) ^ rotr(W2, 19) ^ (W2 >>> 10);\n            SHA256_W[i] = (s1 + SHA256_W[i - 7] + s0 + SHA256_W[i - 16]) | 0;\n        }\n        // Compression function main loop, 64 rounds\n        let { A, B, C, D, E, F, G, H } = this;\n        for (let i = 0; i < 64; i++) {\n            const sigma1 = rotr(E, 6) ^ rotr(E, 11) ^ rotr(E, 25);\n            const T1 = (H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;\n            const sigma0 = rotr(A, 2) ^ rotr(A, 13) ^ rotr(A, 22);\n            const T2 = (sigma0 + Maj(A, B, C)) | 0;\n            H = G;\n            G = F;\n            F = E;\n            E = (D + T1) | 0;\n            D = C;\n            C = B;\n            B = A;\n            A = (T1 + T2) | 0;\n        }\n        // Add the compressed chunk to the current hash value\n        A = (A + this.A) | 0;\n        B = (B + this.B) | 0;\n        C = (C + this.C) | 0;\n        D = (D + this.D) | 0;\n        E = (E + this.E) | 0;\n        F = (F + this.F) | 0;\n        G = (G + this.G) | 0;\n        H = (H + this.H) | 0;\n        this.set(A, B, C, D, E, F, G, H);\n    }\n    roundClean() {\n        SHA256_W.fill(0);\n    }\n    destroy() {\n        this.set(0, 0, 0, 0, 0, 0, 0, 0);\n        this.buffer.fill(0);\n    }\n}\n// Constants from https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf\nclass SHA224 extends SHA256 {\n    constructor() {\n        super();\n        this.A = 0xc1059ed8 | 0;\n        this.B = 0x367cd507 | 0;\n        this.C = 0x3070dd17 | 0;\n        this.D = 0xf70e5939 | 0;\n        this.E = 0xffc00b31 | 0;\n        this.F = 0x68581511 | 0;\n        this.G = 0x64f98fa7 | 0;\n        this.H = 0xbefa4fa4 | 0;\n        this.outputLen = 28;\n    }\n}\n/**\n * SHA2-256 hash function\n * @param message - data that would be hashed\n */\nexport const sha256 = /* @__PURE__ */ wrapConstructor(() => new SHA256());\nexport const sha224 = /* @__PURE__ */ wrapConstructor(() => new SHA224());\n//# sourceMappingURL=sha256.js.map","import { pbkdf2 as _pbkdf2, pbkdf2Async as _pbkdf2Async } from \"@noble/hashes/pbkdf2\";\nimport { sha256 } from \"@noble/hashes/sha256\";\nimport { sha512 } from \"@noble/hashes/sha512\";\nimport { assertBytes } from \"./utils.js\";\nexport async function pbkdf2(password, salt, iterations, keylen, digest) {\n    if (![\"sha256\", \"sha512\"].includes(digest)) {\n        throw new Error(\"Only sha256 and sha512 are supported\");\n    }\n    assertBytes(password);\n    assertBytes(salt);\n    return _pbkdf2Async(digest === \"sha256\" ? sha256 : sha512, password, salt, {\n        c: iterations,\n        dkLen: keylen\n    });\n}\nexport function pbkdf2Sync(password, salt, iterations, keylen, digest) {\n    if (![\"sha256\", \"sha512\"].includes(digest)) {\n        throw new Error(\"Only sha256 and sha512 are supported\");\n    }\n    assertBytes(password);\n    assertBytes(salt);\n    return _pbkdf2(digest === \"sha256\" ? sha256 : sha512, password, salt, {\n        c: iterations,\n        dkLen: keylen\n    });\n}\n","import { number as assertNumber } from './_assert.js';\nimport { sha256 } from './sha256.js';\nimport { pbkdf2 } from './pbkdf2.js';\nimport { rotl, asyncLoop, checkOpts, u32, isLE, byteSwap32 } from './utils.js';\n// RFC 7914 Scrypt KDF\n// The main Scrypt loop: uses Salsa extensively.\n// Six versions of the function were tried, this is the fastest one.\n// prettier-ignore\nfunction XorAndSalsa(prev, pi, input, ii, out, oi) {\n    // Based on https://cr.yp.to/salsa20.html\n    // Xor blocks\n    let y00 = prev[pi++] ^ input[ii++], y01 = prev[pi++] ^ input[ii++];\n    let y02 = prev[pi++] ^ input[ii++], y03 = prev[pi++] ^ input[ii++];\n    let y04 = prev[pi++] ^ input[ii++], y05 = prev[pi++] ^ input[ii++];\n    let y06 = prev[pi++] ^ input[ii++], y07 = prev[pi++] ^ input[ii++];\n    let y08 = prev[pi++] ^ input[ii++], y09 = prev[pi++] ^ input[ii++];\n    let y10 = prev[pi++] ^ input[ii++], y11 = prev[pi++] ^ input[ii++];\n    let y12 = prev[pi++] ^ input[ii++], y13 = prev[pi++] ^ input[ii++];\n    let y14 = prev[pi++] ^ input[ii++], y15 = prev[pi++] ^ input[ii++];\n    // Save state to temporary variables (salsa)\n    let x00 = y00, x01 = y01, x02 = y02, x03 = y03, x04 = y04, x05 = y05, x06 = y06, x07 = y07, x08 = y08, x09 = y09, x10 = y10, x11 = y11, x12 = y12, x13 = y13, x14 = y14, x15 = y15;\n    // Main loop (salsa)\n    for (let i = 0; i < 8; i += 2) {\n        x04 ^= rotl(x00 + x12 | 0, 7);\n        x08 ^= rotl(x04 + x00 | 0, 9);\n        x12 ^= rotl(x08 + x04 | 0, 13);\n        x00 ^= rotl(x12 + x08 | 0, 18);\n        x09 ^= rotl(x05 + x01 | 0, 7);\n        x13 ^= rotl(x09 + x05 | 0, 9);\n        x01 ^= rotl(x13 + x09 | 0, 13);\n        x05 ^= rotl(x01 + x13 | 0, 18);\n        x14 ^= rotl(x10 + x06 | 0, 7);\n        x02 ^= rotl(x14 + x10 | 0, 9);\n        x06 ^= rotl(x02 + x14 | 0, 13);\n        x10 ^= rotl(x06 + x02 | 0, 18);\n        x03 ^= rotl(x15 + x11 | 0, 7);\n        x07 ^= rotl(x03 + x15 | 0, 9);\n        x11 ^= rotl(x07 + x03 | 0, 13);\n        x15 ^= rotl(x11 + x07 | 0, 18);\n        x01 ^= rotl(x00 + x03 | 0, 7);\n        x02 ^= rotl(x01 + x00 | 0, 9);\n        x03 ^= rotl(x02 + x01 | 0, 13);\n        x00 ^= rotl(x03 + x02 | 0, 18);\n        x06 ^= rotl(x05 + x04 | 0, 7);\n        x07 ^= rotl(x06 + x05 | 0, 9);\n        x04 ^= rotl(x07 + x06 | 0, 13);\n        x05 ^= rotl(x04 + x07 | 0, 18);\n        x11 ^= rotl(x10 + x09 | 0, 7);\n        x08 ^= rotl(x11 + x10 | 0, 9);\n        x09 ^= rotl(x08 + x11 | 0, 13);\n        x10 ^= rotl(x09 + x08 | 0, 18);\n        x12 ^= rotl(x15 + x14 | 0, 7);\n        x13 ^= rotl(x12 + x15 | 0, 9);\n        x14 ^= rotl(x13 + x12 | 0, 13);\n        x15 ^= rotl(x14 + x13 | 0, 18);\n    }\n    // Write output (salsa)\n    out[oi++] = (y00 + x00) | 0;\n    out[oi++] = (y01 + x01) | 0;\n    out[oi++] = (y02 + x02) | 0;\n    out[oi++] = (y03 + x03) | 0;\n    out[oi++] = (y04 + x04) | 0;\n    out[oi++] = (y05 + x05) | 0;\n    out[oi++] = (y06 + x06) | 0;\n    out[oi++] = (y07 + x07) | 0;\n    out[oi++] = (y08 + x08) | 0;\n    out[oi++] = (y09 + x09) | 0;\n    out[oi++] = (y10 + x10) | 0;\n    out[oi++] = (y11 + x11) | 0;\n    out[oi++] = (y12 + x12) | 0;\n    out[oi++] = (y13 + x13) | 0;\n    out[oi++] = (y14 + x14) | 0;\n    out[oi++] = (y15 + x15) | 0;\n}\nfunction BlockMix(input, ii, out, oi, r) {\n    // The block B is r 128-byte chunks (which is equivalent of 2r 64-byte chunks)\n    let head = oi + 0;\n    let tail = oi + 16 * r;\n    for (let i = 0; i < 16; i++)\n        out[tail + i] = input[ii + (2 * r - 1) * 16 + i]; // X ← B[2r−1]\n    for (let i = 0; i < r; i++, head += 16, ii += 16) {\n        // We write odd & even Yi at same time. Even: 0bXXXXX0 Odd:  0bXXXXX1\n        XorAndSalsa(out, tail, input, ii, out, head); // head[i] = Salsa(blockIn[2*i] ^ tail[i-1])\n        if (i > 0)\n            tail += 16; // First iteration overwrites tmp value in tail\n        XorAndSalsa(out, head, input, (ii += 16), out, tail); // tail[i] = Salsa(blockIn[2*i+1] ^ head[i])\n    }\n}\n// Common prologue and epilogue for sync/async functions\nfunction scryptInit(password, salt, _opts) {\n    // Maxmem - 1GB+1KB by default\n    const opts = checkOpts({\n        dkLen: 32,\n        asyncTick: 10,\n        maxmem: 1024 ** 3 + 1024,\n    }, _opts);\n    const { N, r, p, dkLen, asyncTick, maxmem, onProgress } = opts;\n    assertNumber(N);\n    assertNumber(r);\n    assertNumber(p);\n    assertNumber(dkLen);\n    assertNumber(asyncTick);\n    assertNumber(maxmem);\n    if (onProgress !== undefined && typeof onProgress !== 'function')\n        throw new Error('progressCb should be function');\n    const blockSize = 128 * r;\n    const blockSize32 = blockSize / 4;\n    if (N <= 1 || (N & (N - 1)) !== 0 || N >= 2 ** (blockSize / 8) || N > 2 ** 32) {\n        // NOTE: we limit N to be less than 2**32 because of 32 bit variant of Integrify function\n        // There is no JS engines that allows alocate more than 4GB per single Uint8Array for now, but can change in future.\n        throw new Error('Scrypt: N must be larger than 1, a power of 2, less than 2^(128 * r / 8) and less than 2^32');\n    }\n    if (p < 0 || p > ((2 ** 32 - 1) * 32) / blockSize) {\n        throw new Error('Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)');\n    }\n    if (dkLen < 0 || dkLen > (2 ** 32 - 1) * 32) {\n        throw new Error('Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32');\n    }\n    const memUsed = blockSize * (N + p);\n    if (memUsed > maxmem) {\n        throw new Error(`Scrypt: parameters too large, ${memUsed} (128 * r * (N + p)) > ${maxmem} (maxmem)`);\n    }\n    // [B0...Bp−1] ← PBKDF2HMAC-SHA256(Passphrase, Salt, 1, blockSize*ParallelizationFactor)\n    // Since it has only one iteration there is no reason to use async variant\n    const B = pbkdf2(sha256, password, salt, { c: 1, dkLen: blockSize * p });\n    const B32 = u32(B);\n    // Re-used between parallel iterations. Array(iterations) of B\n    const V = u32(new Uint8Array(blockSize * N));\n    const tmp = u32(new Uint8Array(blockSize));\n    let blockMixCb = () => { };\n    if (onProgress) {\n        const totalBlockMix = 2 * N * p;\n        // Invoke callback if progress changes from 10.01 to 10.02\n        // Allows to draw smooth progress bar on up to 8K screen\n        const callbackPer = Math.max(Math.floor(totalBlockMix / 10000), 1);\n        let blockMixCnt = 0;\n        blockMixCb = () => {\n            blockMixCnt++;\n            if (onProgress && (!(blockMixCnt % callbackPer) || blockMixCnt === totalBlockMix))\n                onProgress(blockMixCnt / totalBlockMix);\n        };\n    }\n    return { N, r, p, dkLen, blockSize32, V, B32, B, tmp, blockMixCb, asyncTick };\n}\nfunction scryptOutput(password, dkLen, B, V, tmp) {\n    const res = pbkdf2(sha256, password, B, { c: 1, dkLen });\n    B.fill(0);\n    V.fill(0);\n    tmp.fill(0);\n    return res;\n}\n/**\n * Scrypt KDF from RFC 7914.\n * @param password - pass\n * @param salt - salt\n * @param opts - parameters\n * - `N` is cpu/mem work factor (power of 2 e.g. 2**18)\n * - `r` is block size (8 is common), fine-tunes sequential memory read size and performance\n * - `p` is parallelization factor (1 is common)\n * - `dkLen` is output key length in bytes e.g. 32.\n * - `asyncTick` - (default: 10) max time in ms for which async function can block execution\n * - `maxmem` - (default: `1024 ** 3 + 1024` aka 1GB+1KB). A limit that the app could use for scrypt\n * - `onProgress` - callback function that would be executed for progress report\n * @returns Derived key\n */\nexport function scrypt(password, salt, opts) {\n    const { N, r, p, dkLen, blockSize32, V, B32, B, tmp, blockMixCb } = scryptInit(password, salt, opts);\n    if (!isLE)\n        byteSwap32(B32);\n    for (let pi = 0; pi < p; pi++) {\n        const Pi = blockSize32 * pi;\n        for (let i = 0; i < blockSize32; i++)\n            V[i] = B32[Pi + i]; // V[0] = B[i]\n        for (let i = 0, pos = 0; i < N - 1; i++) {\n            BlockMix(V, pos, V, (pos += blockSize32), r); // V[i] = BlockMix(V[i-1]);\n            blockMixCb();\n        }\n        BlockMix(V, (N - 1) * blockSize32, B32, Pi, r); // Process last element\n        blockMixCb();\n        for (let i = 0; i < N; i++) {\n            // First u32 of the last 64-byte block (u32 is LE)\n            const j = B32[Pi + blockSize32 - 16] % N; // j = Integrify(X) % iterations\n            for (let k = 0; k < blockSize32; k++)\n                tmp[k] = B32[Pi + k] ^ V[j * blockSize32 + k]; // tmp = B ^ V[j]\n            BlockMix(tmp, 0, B32, Pi, r); // B = BlockMix(B ^ V[j])\n            blockMixCb();\n        }\n    }\n    if (!isLE)\n        byteSwap32(B32);\n    return scryptOutput(password, dkLen, B, V, tmp);\n}\n/**\n * Scrypt KDF from RFC 7914.\n */\nexport async function scryptAsync(password, salt, opts) {\n    const { N, r, p, dkLen, blockSize32, V, B32, B, tmp, blockMixCb, asyncTick } = scryptInit(password, salt, opts);\n    if (!isLE)\n        byteSwap32(B32);\n    for (let pi = 0; pi < p; pi++) {\n        const Pi = blockSize32 * pi;\n        for (let i = 0; i < blockSize32; i++)\n            V[i] = B32[Pi + i]; // V[0] = B[i]\n        let pos = 0;\n        await asyncLoop(N - 1, asyncTick, () => {\n            BlockMix(V, pos, V, (pos += blockSize32), r); // V[i] = BlockMix(V[i-1]);\n            blockMixCb();\n        });\n        BlockMix(V, (N - 1) * blockSize32, B32, Pi, r); // Process last element\n        blockMixCb();\n        await asyncLoop(N, asyncTick, () => {\n            // First u32 of the last 64-byte block (u32 is LE)\n            const j = B32[Pi + blockSize32 - 16] % N; // j = Integrify(X) % iterations\n            for (let k = 0; k < blockSize32; k++)\n                tmp[k] = B32[Pi + k] ^ V[j * blockSize32 + k]; // tmp = B ^ V[j]\n            BlockMix(tmp, 0, B32, Pi, r); // B = BlockMix(B ^ V[j])\n            blockMixCb();\n        });\n    }\n    if (!isLE)\n        byteSwap32(B32);\n    return scryptOutput(password, dkLen, B, V, tmp);\n}\n//# sourceMappingURL=scrypt.js.map","import { scrypt as _sync, scryptAsync as _async } from \"@noble/hashes/scrypt\";\nimport { assertBytes } from \"./utils.js\";\nexport async function scrypt(password, salt, n, p, r, dkLen, onProgress) {\n    assertBytes(password);\n    assertBytes(salt);\n    return _async(password, salt, { N: n, r, p, dkLen, onProgress });\n}\nexport function scryptSync(password, salt, n, p, r, dkLen, onProgress) {\n    assertBytes(password);\n    assertBytes(salt);\n    return _sync(password, salt, { N: n, r, p, dkLen, onProgress });\n}\n","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// 100 lines of code in the file are duplicated from noble-hashes (utils).\n// This is OK: `abstract` directory does not use noble-hashes.\n// User may opt-in into using different hashing library. This way, noble-hashes\n// won't be included into their bundle.\nconst _0n = /* @__PURE__ */ BigInt(0);\nconst _1n = /* @__PURE__ */ BigInt(1);\nconst _2n = /* @__PURE__ */ BigInt(2);\nexport function isBytes(a) {\n    return (a instanceof Uint8Array ||\n        (a != null && typeof a === 'object' && a.constructor.name === 'Uint8Array'));\n}\nexport function abytes(item) {\n    if (!isBytes(item))\n        throw new Error('Uint8Array expected');\n}\n// Array where index 0xf0 (240) is mapped to string 'f0'\nconst hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, '0'));\n/**\n * @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'\n */\nexport function bytesToHex(bytes) {\n    abytes(bytes);\n    // pre-caching improves the speed 6x\n    let hex = '';\n    for (let i = 0; i < bytes.length; i++) {\n        hex += hexes[bytes[i]];\n    }\n    return hex;\n}\nexport function numberToHexUnpadded(num) {\n    const hex = num.toString(16);\n    return hex.length & 1 ? `0${hex}` : hex;\n}\nexport function hexToNumber(hex) {\n    if (typeof hex !== 'string')\n        throw new Error('hex string expected, got ' + typeof hex);\n    // Big Endian\n    return BigInt(hex === '' ? '0' : `0x${hex}`);\n}\n// We use optimized technique to convert hex string to byte array\nconst asciis = { _0: 48, _9: 57, _A: 65, _F: 70, _a: 97, _f: 102 };\nfunction asciiToBase16(char) {\n    if (char >= asciis._0 && char <= asciis._9)\n        return char - asciis._0;\n    if (char >= asciis._A && char <= asciis._F)\n        return char - (asciis._A - 10);\n    if (char >= asciis._a && char <= asciis._f)\n        return char - (asciis._a - 10);\n    return;\n}\n/**\n * @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])\n */\nexport function hexToBytes(hex) {\n    if (typeof hex !== 'string')\n        throw new Error('hex string expected, got ' + typeof hex);\n    const hl = hex.length;\n    const al = hl / 2;\n    if (hl % 2)\n        throw new Error('padded hex string expected, got unpadded hex of length ' + hl);\n    const array = new Uint8Array(al);\n    for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {\n        const n1 = asciiToBase16(hex.charCodeAt(hi));\n        const n2 = asciiToBase16(hex.charCodeAt(hi + 1));\n        if (n1 === undefined || n2 === undefined) {\n            const char = hex[hi] + hex[hi + 1];\n            throw new Error('hex string expected, got non-hex character \"' + char + '\" at index ' + hi);\n        }\n        array[ai] = n1 * 16 + n2;\n    }\n    return array;\n}\n// BE: Big Endian, LE: Little Endian\nexport function bytesToNumberBE(bytes) {\n    return hexToNumber(bytesToHex(bytes));\n}\nexport function bytesToNumberLE(bytes) {\n    abytes(bytes);\n    return hexToNumber(bytesToHex(Uint8Array.from(bytes).reverse()));\n}\nexport function numberToBytesBE(n, len) {\n    return hexToBytes(n.toString(16).padStart(len * 2, '0'));\n}\nexport function numberToBytesLE(n, len) {\n    return numberToBytesBE(n, len).reverse();\n}\n// Unpadded, rarely used\nexport function numberToVarBytesBE(n) {\n    return hexToBytes(numberToHexUnpadded(n));\n}\n/**\n * Takes hex string or Uint8Array, converts to Uint8Array.\n * Validates output length.\n * Will throw error for other types.\n * @param title descriptive title for an error e.g. 'private key'\n * @param hex hex string or Uint8Array\n * @param expectedLength optional, will compare to result array's length\n * @returns\n */\nexport function ensureBytes(title, hex, expectedLength) {\n    let res;\n    if (typeof hex === 'string') {\n        try {\n            res = hexToBytes(hex);\n        }\n        catch (e) {\n            throw new Error(`${title} must be valid hex string, got \"${hex}\". Cause: ${e}`);\n        }\n    }\n    else if (isBytes(hex)) {\n        // Uint8Array.from() instead of hash.slice() because node.js Buffer\n        // is instance of Uint8Array, and its slice() creates **mutable** copy\n        res = Uint8Array.from(hex);\n    }\n    else {\n        throw new Error(`${title} must be hex string or Uint8Array`);\n    }\n    const len = res.length;\n    if (typeof expectedLength === 'number' && len !== expectedLength)\n        throw new Error(`${title} expected ${expectedLength} bytes, got ${len}`);\n    return res;\n}\n/**\n * Copies several Uint8Arrays into one.\n */\nexport function concatBytes(...arrays) {\n    let sum = 0;\n    for (let i = 0; i < arrays.length; i++) {\n        const a = arrays[i];\n        abytes(a);\n        sum += a.length;\n    }\n    const res = new Uint8Array(sum);\n    for (let i = 0, pad = 0; i < arrays.length; i++) {\n        const a = arrays[i];\n        res.set(a, pad);\n        pad += a.length;\n    }\n    return res;\n}\n// Compares 2 u8a-s in kinda constant time\nexport function equalBytes(a, b) {\n    if (a.length !== b.length)\n        return false;\n    let diff = 0;\n    for (let i = 0; i < a.length; i++)\n        diff |= a[i] ^ b[i];\n    return diff === 0;\n}\n/**\n * @example utf8ToBytes('abc') // new Uint8Array([97, 98, 99])\n */\nexport function utf8ToBytes(str) {\n    if (typeof str !== 'string')\n        throw new Error(`utf8ToBytes expected string, got ${typeof str}`);\n    return new Uint8Array(new TextEncoder().encode(str)); // https://bugzil.la/1681809\n}\n// Bit operations\n/**\n * Calculates amount of bits in a bigint.\n * Same as `n.toString(2).length`\n */\nexport function bitLen(n) {\n    let len;\n    for (len = 0; n > _0n; n >>= _1n, len += 1)\n        ;\n    return len;\n}\n/**\n * Gets single bit at position.\n * NOTE: first bit position is 0 (same as arrays)\n * Same as `!!+Array.from(n.toString(2)).reverse()[pos]`\n */\nexport function bitGet(n, pos) {\n    return (n >> BigInt(pos)) & _1n;\n}\n/**\n * Sets single bit at position.\n */\nexport function bitSet(n, pos, value) {\n    return n | ((value ? _1n : _0n) << BigInt(pos));\n}\n/**\n * Calculate mask for N bits. Not using ** operator with bigints because of old engines.\n * Same as BigInt(`0b${Array(i).fill('1').join('')}`)\n */\nexport const bitMask = (n) => (_2n << BigInt(n - 1)) - _1n;\n// DRBG\nconst u8n = (data) => new Uint8Array(data); // creates Uint8Array\nconst u8fr = (arr) => Uint8Array.from(arr); // another shortcut\n/**\n * Minimal HMAC-DRBG from NIST 800-90 for RFC6979 sigs.\n * @returns function that will call DRBG until 2nd arg returns something meaningful\n * @example\n *   const drbg = createHmacDRBG<Key>(32, 32, hmac);\n *   drbg(seed, bytesToKey); // bytesToKey must return Key or undefined\n */\nexport function createHmacDrbg(hashLen, qByteLen, hmacFn) {\n    if (typeof hashLen !== 'number' || hashLen < 2)\n        throw new Error('hashLen must be a number');\n    if (typeof qByteLen !== 'number' || qByteLen < 2)\n        throw new Error('qByteLen must be a number');\n    if (typeof hmacFn !== 'function')\n        throw new Error('hmacFn must be a function');\n    // Step B, Step C: set hashLen to 8*ceil(hlen/8)\n    let v = u8n(hashLen); // Minimal non-full-spec HMAC-DRBG from NIST 800-90 for RFC6979 sigs.\n    let k = u8n(hashLen); // Steps B and C of RFC6979 3.2: set hashLen, in our case always same\n    let i = 0; // Iterations counter, will throw when over 1000\n    const reset = () => {\n        v.fill(1);\n        k.fill(0);\n        i = 0;\n    };\n    const h = (...b) => hmacFn(k, v, ...b); // hmac(k)(v, ...values)\n    const reseed = (seed = u8n()) => {\n        // HMAC-DRBG reseed() function. Steps D-G\n        k = h(u8fr([0x00]), seed); // k = hmac(k || v || 0x00 || seed)\n        v = h(); // v = hmac(k || v)\n        if (seed.length === 0)\n            return;\n        k = h(u8fr([0x01]), seed); // k = hmac(k || v || 0x01 || seed)\n        v = h(); // v = hmac(k || v)\n    };\n    const gen = () => {\n        // HMAC-DRBG generate() function\n        if (i++ >= 1000)\n            throw new Error('drbg: tried 1000 values');\n        let len = 0;\n        const out = [];\n        while (len < qByteLen) {\n            v = h();\n            const sl = v.slice();\n            out.push(sl);\n            len += v.length;\n        }\n        return concatBytes(...out);\n    };\n    const genUntil = (seed, pred) => {\n        reset();\n        reseed(seed); // Steps D-G\n        let res = undefined; // Step H: grind until k is in [1..n-1]\n        while (!(res = pred(gen())))\n            reseed();\n        reset();\n        return res;\n    };\n    return genUntil;\n}\n// Validating curves and fields\nconst validatorFns = {\n    bigint: (val) => typeof val === 'bigint',\n    function: (val) => typeof val === 'function',\n    boolean: (val) => typeof val === 'boolean',\n    string: (val) => typeof val === 'string',\n    stringOrUint8Array: (val) => typeof val === 'string' || isBytes(val),\n    isSafeInteger: (val) => Number.isSafeInteger(val),\n    array: (val) => Array.isArray(val),\n    field: (val, object) => object.Fp.isValid(val),\n    hash: (val) => typeof val === 'function' && Number.isSafeInteger(val.outputLen),\n};\n// type Record<K extends string | number | symbol, T> = { [P in K]: T; }\nexport function validateObject(object, validators, optValidators = {}) {\n    const checkField = (fieldName, type, isOptional) => {\n        const checkVal = validatorFns[type];\n        if (typeof checkVal !== 'function')\n            throw new Error(`Invalid validator \"${type}\", expected function`);\n        const val = object[fieldName];\n        if (isOptional && val === undefined)\n            return;\n        if (!checkVal(val, object)) {\n            throw new Error(`Invalid param ${String(fieldName)}=${val} (${typeof val}), expected ${type}`);\n        }\n    };\n    for (const [fieldName, type] of Object.entries(validators))\n        checkField(fieldName, type, false);\n    for (const [fieldName, type] of Object.entries(optValidators))\n        checkField(fieldName, type, true);\n    return object;\n}\n// validate type tests\n// const o: { a: number; b: number; c: number } = { a: 1, b: 5, c: 6 };\n// const z0 = validateObject(o, { a: 'isSafeInteger' }, { c: 'bigint' }); // Ok!\n// // Should fail type-check\n// const z1 = validateObject(o, { a: 'tmp' }, { c: 'zz' });\n// const z2 = validateObject(o, { a: 'isSafeInteger' }, { c: 'zz' });\n// const z3 = validateObject(o, { test: 'boolean', z: 'bug' });\n// const z4 = validateObject(o, { a: 'boolean', z: 'bug' });\n//# sourceMappingURL=utils.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Utilities for modular arithmetics and finite fields\nimport { bitMask, bytesToNumberBE, bytesToNumberLE, ensureBytes, numberToBytesBE, numberToBytesLE, validateObject, } from './utils.js';\n// prettier-ignore\nconst _0n = BigInt(0), _1n = BigInt(1), _2n = BigInt(2), _3n = BigInt(3);\n// prettier-ignore\nconst _4n = BigInt(4), _5n = BigInt(5), _8n = BigInt(8);\n// prettier-ignore\nconst _9n = BigInt(9), _16n = BigInt(16);\n// Calculates a modulo b\nexport function mod(a, b) {\n    const result = a % b;\n    return result >= _0n ? result : b + result;\n}\n/**\n * Efficiently raise num to power and do modular division.\n * Unsafe in some contexts: uses ladder, so can expose bigint bits.\n * @example\n * pow(2n, 6n, 11n) // 64n % 11n == 9n\n */\n// TODO: use field version && remove\nexport function pow(num, power, modulo) {\n    if (modulo <= _0n || power < _0n)\n        throw new Error('Expected power/modulo > 0');\n    if (modulo === _1n)\n        return _0n;\n    let res = _1n;\n    while (power > _0n) {\n        if (power & _1n)\n            res = (res * num) % modulo;\n        num = (num * num) % modulo;\n        power >>= _1n;\n    }\n    return res;\n}\n// Does x ^ (2 ^ power) mod p. pow2(30, 4) == 30 ^ (2 ^ 4)\nexport function pow2(x, power, modulo) {\n    let res = x;\n    while (power-- > _0n) {\n        res *= res;\n        res %= modulo;\n    }\n    return res;\n}\n// Inverses number over modulo\nexport function invert(number, modulo) {\n    if (number === _0n || modulo <= _0n) {\n        throw new Error(`invert: expected positive integers, got n=${number} mod=${modulo}`);\n    }\n    // Euclidean GCD https://brilliant.org/wiki/extended-euclidean-algorithm/\n    // Fermat's little theorem \"CT-like\" version inv(n) = n^(m-2) mod m is 30x slower.\n    let a = mod(number, modulo);\n    let b = modulo;\n    // prettier-ignore\n    let x = _0n, y = _1n, u = _1n, v = _0n;\n    while (a !== _0n) {\n        // JIT applies optimization if those two lines follow each other\n        const q = b / a;\n        const r = b % a;\n        const m = x - u * q;\n        const n = y - v * q;\n        // prettier-ignore\n        b = a, a = r, x = u, y = v, u = m, v = n;\n    }\n    const gcd = b;\n    if (gcd !== _1n)\n        throw new Error('invert: does not exist');\n    return mod(x, modulo);\n}\n/**\n * Tonelli-Shanks square root search algorithm.\n * 1. https://eprint.iacr.org/2012/685.pdf (page 12)\n * 2. Square Roots from 1; 24, 51, 10 to Dan Shanks\n * Will start an infinite loop if field order P is not prime.\n * @param P field order\n * @returns function that takes field Fp (created from P) and number n\n */\nexport function tonelliShanks(P) {\n    // Legendre constant: used to calculate Legendre symbol (a | p),\n    // which denotes the value of a^((p-1)/2) (mod p).\n    // (a | p) ≡ 1    if a is a square (mod p)\n    // (a | p) ≡ -1   if a is not a square (mod p)\n    // (a | p) ≡ 0    if a ≡ 0 (mod p)\n    const legendreC = (P - _1n) / _2n;\n    let Q, S, Z;\n    // Step 1: By factoring out powers of 2 from p - 1,\n    // find q and s such that p - 1 = q*(2^s) with q odd\n    for (Q = P - _1n, S = 0; Q % _2n === _0n; Q /= _2n, S++)\n        ;\n    // Step 2: Select a non-square z such that (z | p) ≡ -1 and set c ≡ zq\n    for (Z = _2n; Z < P && pow(Z, legendreC, P) !== P - _1n; Z++)\n        ;\n    // Fast-path\n    if (S === 1) {\n        const p1div4 = (P + _1n) / _4n;\n        return function tonelliFast(Fp, n) {\n            const root = Fp.pow(n, p1div4);\n            if (!Fp.eql(Fp.sqr(root), n))\n                throw new Error('Cannot find square root');\n            return root;\n        };\n    }\n    // Slow-path\n    const Q1div2 = (Q + _1n) / _2n;\n    return function tonelliSlow(Fp, n) {\n        // Step 0: Check that n is indeed a square: (n | p) should not be ≡ -1\n        if (Fp.pow(n, legendreC) === Fp.neg(Fp.ONE))\n            throw new Error('Cannot find square root');\n        let r = S;\n        // TODO: will fail at Fp2/etc\n        let g = Fp.pow(Fp.mul(Fp.ONE, Z), Q); // will update both x and b\n        let x = Fp.pow(n, Q1div2); // first guess at the square root\n        let b = Fp.pow(n, Q); // first guess at the fudge factor\n        while (!Fp.eql(b, Fp.ONE)) {\n            if (Fp.eql(b, Fp.ZERO))\n                return Fp.ZERO; // https://en.wikipedia.org/wiki/Tonelli%E2%80%93Shanks_algorithm (4. If t = 0, return r = 0)\n            // Find m such b^(2^m)==1\n            let m = 1;\n            for (let t2 = Fp.sqr(b); m < r; m++) {\n                if (Fp.eql(t2, Fp.ONE))\n                    break;\n                t2 = Fp.sqr(t2); // t2 *= t2\n            }\n            // NOTE: r-m-1 can be bigger than 32, need to convert to bigint before shift, otherwise there will be overflow\n            const ge = Fp.pow(g, _1n << BigInt(r - m - 1)); // ge = 2^(r-m-1)\n            g = Fp.sqr(ge); // g = ge * ge\n            x = Fp.mul(x, ge); // x *= ge\n            b = Fp.mul(b, g); // b *= g\n            r = m;\n        }\n        return x;\n    };\n}\nexport function FpSqrt(P) {\n    // NOTE: different algorithms can give different roots, it is up to user to decide which one they want.\n    // For example there is FpSqrtOdd/FpSqrtEven to choice root based on oddness (used for hash-to-curve).\n    // P ≡ 3 (mod 4)\n    // √n = n^((P+1)/4)\n    if (P % _4n === _3n) {\n        // Not all roots possible!\n        // const ORDER =\n        //   0x1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaabn;\n        // const NUM = 72057594037927816n;\n        const p1div4 = (P + _1n) / _4n;\n        return function sqrt3mod4(Fp, n) {\n            const root = Fp.pow(n, p1div4);\n            // Throw if root**2 != n\n            if (!Fp.eql(Fp.sqr(root), n))\n                throw new Error('Cannot find square root');\n            return root;\n        };\n    }\n    // Atkin algorithm for q ≡ 5 (mod 8), https://eprint.iacr.org/2012/685.pdf (page 10)\n    if (P % _8n === _5n) {\n        const c1 = (P - _5n) / _8n;\n        return function sqrt5mod8(Fp, n) {\n            const n2 = Fp.mul(n, _2n);\n            const v = Fp.pow(n2, c1);\n            const nv = Fp.mul(n, v);\n            const i = Fp.mul(Fp.mul(nv, _2n), v);\n            const root = Fp.mul(nv, Fp.sub(i, Fp.ONE));\n            if (!Fp.eql(Fp.sqr(root), n))\n                throw new Error('Cannot find square root');\n            return root;\n        };\n    }\n    // P ≡ 9 (mod 16)\n    if (P % _16n === _9n) {\n        // NOTE: tonelli is too slow for bls-Fp2 calculations even on start\n        // Means we cannot use sqrt for constants at all!\n        //\n        // const c1 = Fp.sqrt(Fp.negate(Fp.ONE)); //  1. c1 = sqrt(-1) in F, i.e., (c1^2) == -1 in F\n        // const c2 = Fp.sqrt(c1);                //  2. c2 = sqrt(c1) in F, i.e., (c2^2) == c1 in F\n        // const c3 = Fp.sqrt(Fp.negate(c1));     //  3. c3 = sqrt(-c1) in F, i.e., (c3^2) == -c1 in F\n        // const c4 = (P + _7n) / _16n;           //  4. c4 = (q + 7) / 16        # Integer arithmetic\n        // sqrt = (x) => {\n        //   let tv1 = Fp.pow(x, c4);             //  1. tv1 = x^c4\n        //   let tv2 = Fp.mul(c1, tv1);           //  2. tv2 = c1 * tv1\n        //   const tv3 = Fp.mul(c2, tv1);         //  3. tv3 = c2 * tv1\n        //   let tv4 = Fp.mul(c3, tv1);           //  4. tv4 = c3 * tv1\n        //   const e1 = Fp.equals(Fp.square(tv2), x); //  5.  e1 = (tv2^2) == x\n        //   const e2 = Fp.equals(Fp.square(tv3), x); //  6.  e2 = (tv3^2) == x\n        //   tv1 = Fp.cmov(tv1, tv2, e1); //  7. tv1 = CMOV(tv1, tv2, e1)  # Select tv2 if (tv2^2) == x\n        //   tv2 = Fp.cmov(tv4, tv3, e2); //  8. tv2 = CMOV(tv4, tv3, e2)  # Select tv3 if (tv3^2) == x\n        //   const e3 = Fp.equals(Fp.square(tv2), x); //  9.  e3 = (tv2^2) == x\n        //   return Fp.cmov(tv1, tv2, e3); //  10.  z = CMOV(tv1, tv2, e3)  # Select the sqrt from tv1 and tv2\n        // }\n    }\n    // Other cases: Tonelli-Shanks algorithm\n    return tonelliShanks(P);\n}\n// Little-endian check for first LE bit (last BE bit);\nexport const isNegativeLE = (num, modulo) => (mod(num, modulo) & _1n) === _1n;\n// prettier-ignore\nconst FIELD_FIELDS = [\n    'create', 'isValid', 'is0', 'neg', 'inv', 'sqrt', 'sqr',\n    'eql', 'add', 'sub', 'mul', 'pow', 'div',\n    'addN', 'subN', 'mulN', 'sqrN'\n];\nexport function validateField(field) {\n    const initial = {\n        ORDER: 'bigint',\n        MASK: 'bigint',\n        BYTES: 'isSafeInteger',\n        BITS: 'isSafeInteger',\n    };\n    const opts = FIELD_FIELDS.reduce((map, val) => {\n        map[val] = 'function';\n        return map;\n    }, initial);\n    return validateObject(field, opts);\n}\n// Generic field functions\n/**\n * Same as `pow` but for Fp: non-constant-time.\n * Unsafe in some contexts: uses ladder, so can expose bigint bits.\n */\nexport function FpPow(f, num, power) {\n    // Should have same speed as pow for bigints\n    // TODO: benchmark!\n    if (power < _0n)\n        throw new Error('Expected power > 0');\n    if (power === _0n)\n        return f.ONE;\n    if (power === _1n)\n        return num;\n    let p = f.ONE;\n    let d = num;\n    while (power > _0n) {\n        if (power & _1n)\n            p = f.mul(p, d);\n        d = f.sqr(d);\n        power >>= _1n;\n    }\n    return p;\n}\n/**\n * Efficiently invert an array of Field elements.\n * `inv(0)` will return `undefined` here: make sure to throw an error.\n */\nexport function FpInvertBatch(f, nums) {\n    const tmp = new Array(nums.length);\n    // Walk from first to last, multiply them by each other MOD p\n    const lastMultiplied = nums.reduce((acc, num, i) => {\n        if (f.is0(num))\n            return acc;\n        tmp[i] = acc;\n        return f.mul(acc, num);\n    }, f.ONE);\n    // Invert last element\n    const inverted = f.inv(lastMultiplied);\n    // Walk from last to first, multiply them by inverted each other MOD p\n    nums.reduceRight((acc, num, i) => {\n        if (f.is0(num))\n            return acc;\n        tmp[i] = f.mul(acc, tmp[i]);\n        return f.mul(acc, num);\n    }, inverted);\n    return tmp;\n}\nexport function FpDiv(f, lhs, rhs) {\n    return f.mul(lhs, typeof rhs === 'bigint' ? invert(rhs, f.ORDER) : f.inv(rhs));\n}\n// This function returns True whenever the value x is a square in the field F.\nexport function FpIsSquare(f) {\n    const legendreConst = (f.ORDER - _1n) / _2n; // Integer arithmetic\n    return (x) => {\n        const p = f.pow(x, legendreConst);\n        return f.eql(p, f.ZERO) || f.eql(p, f.ONE);\n    };\n}\n// CURVE.n lengths\nexport function nLength(n, nBitLength) {\n    // Bit size, byte size of CURVE.n\n    const _nBitLength = nBitLength !== undefined ? nBitLength : n.toString(2).length;\n    const nByteLength = Math.ceil(_nBitLength / 8);\n    return { nBitLength: _nBitLength, nByteLength };\n}\n/**\n * Initializes a finite field over prime. **Non-primes are not supported.**\n * Do not init in loop: slow. Very fragile: always run a benchmark on a change.\n * Major performance optimizations:\n * * a) denormalized operations like mulN instead of mul\n * * b) same object shape: never add or remove keys\n * * c) Object.freeze\n * @param ORDER prime positive bigint\n * @param bitLen how many bits the field consumes\n * @param isLE (def: false) if encoding / decoding should be in little-endian\n * @param redef optional faster redefinitions of sqrt and other methods\n */\nexport function Field(ORDER, bitLen, isLE = false, redef = {}) {\n    if (ORDER <= _0n)\n        throw new Error(`Expected Field ORDER > 0, got ${ORDER}`);\n    const { nBitLength: BITS, nByteLength: BYTES } = nLength(ORDER, bitLen);\n    if (BYTES > 2048)\n        throw new Error('Field lengths over 2048 bytes are not supported');\n    const sqrtP = FpSqrt(ORDER);\n    const f = Object.freeze({\n        ORDER,\n        BITS,\n        BYTES,\n        MASK: bitMask(BITS),\n        ZERO: _0n,\n        ONE: _1n,\n        create: (num) => mod(num, ORDER),\n        isValid: (num) => {\n            if (typeof num !== 'bigint')\n                throw new Error(`Invalid field element: expected bigint, got ${typeof num}`);\n            return _0n <= num && num < ORDER; // 0 is valid element, but it's not invertible\n        },\n        is0: (num) => num === _0n,\n        isOdd: (num) => (num & _1n) === _1n,\n        neg: (num) => mod(-num, ORDER),\n        eql: (lhs, rhs) => lhs === rhs,\n        sqr: (num) => mod(num * num, ORDER),\n        add: (lhs, rhs) => mod(lhs + rhs, ORDER),\n        sub: (lhs, rhs) => mod(lhs - rhs, ORDER),\n        mul: (lhs, rhs) => mod(lhs * rhs, ORDER),\n        pow: (num, power) => FpPow(f, num, power),\n        div: (lhs, rhs) => mod(lhs * invert(rhs, ORDER), ORDER),\n        // Same as above, but doesn't normalize\n        sqrN: (num) => num * num,\n        addN: (lhs, rhs) => lhs + rhs,\n        subN: (lhs, rhs) => lhs - rhs,\n        mulN: (lhs, rhs) => lhs * rhs,\n        inv: (num) => invert(num, ORDER),\n        sqrt: redef.sqrt || ((n) => sqrtP(f, n)),\n        invertBatch: (lst) => FpInvertBatch(f, lst),\n        // TODO: do we really need constant cmov?\n        // We don't have const-time bigints anyway, so probably will be not very useful\n        cmov: (a, b, c) => (c ? b : a),\n        toBytes: (num) => (isLE ? numberToBytesLE(num, BYTES) : numberToBytesBE(num, BYTES)),\n        fromBytes: (bytes) => {\n            if (bytes.length !== BYTES)\n                throw new Error(`Fp.fromBytes: expected ${BYTES}, got ${bytes.length}`);\n            return isLE ? bytesToNumberLE(bytes) : bytesToNumberBE(bytes);\n        },\n    });\n    return Object.freeze(f);\n}\nexport function FpSqrtOdd(Fp, elm) {\n    if (!Fp.isOdd)\n        throw new Error(`Field doesn't have isOdd`);\n    const root = Fp.sqrt(elm);\n    return Fp.isOdd(root) ? root : Fp.neg(root);\n}\nexport function FpSqrtEven(Fp, elm) {\n    if (!Fp.isOdd)\n        throw new Error(`Field doesn't have isOdd`);\n    const root = Fp.sqrt(elm);\n    return Fp.isOdd(root) ? Fp.neg(root) : root;\n}\n/**\n * \"Constant-time\" private key generation utility.\n * Same as mapKeyToField, but accepts less bytes (40 instead of 48 for 32-byte field).\n * Which makes it slightly more biased, less secure.\n * @deprecated use mapKeyToField instead\n */\nexport function hashToPrivateScalar(hash, groupOrder, isLE = false) {\n    hash = ensureBytes('privateHash', hash);\n    const hashLen = hash.length;\n    const minLen = nLength(groupOrder).nByteLength + 8;\n    if (minLen < 24 || hashLen < minLen || hashLen > 1024)\n        throw new Error(`hashToPrivateScalar: expected ${minLen}-1024 bytes of input, got ${hashLen}`);\n    const num = isLE ? bytesToNumberLE(hash) : bytesToNumberBE(hash);\n    return mod(num, groupOrder - _1n) + _1n;\n}\n/**\n * Returns total number of bytes consumed by the field element.\n * For example, 32 bytes for usual 256-bit weierstrass curve.\n * @param fieldOrder number of field elements, usually CURVE.n\n * @returns byte length of field\n */\nexport function getFieldBytesLength(fieldOrder) {\n    if (typeof fieldOrder !== 'bigint')\n        throw new Error('field order must be bigint');\n    const bitLength = fieldOrder.toString(2).length;\n    return Math.ceil(bitLength / 8);\n}\n/**\n * Returns minimal amount of bytes that can be safely reduced\n * by field order.\n * Should be 2^-128 for 128-bit curve such as P256.\n * @param fieldOrder number of field elements, usually CURVE.n\n * @returns byte length of target hash\n */\nexport function getMinHashLength(fieldOrder) {\n    const length = getFieldBytesLength(fieldOrder);\n    return length + Math.ceil(length / 2);\n}\n/**\n * \"Constant-time\" private key generation utility.\n * Can take (n + n/2) or more bytes of uniform input e.g. from CSPRNG or KDF\n * and convert them into private scalar, with the modulo bias being negligible.\n * Needs at least 48 bytes of input for 32-byte private key.\n * https://research.kudelskisecurity.com/2020/07/28/the-definitive-guide-to-modulo-bias-and-how-to-avoid-it/\n * FIPS 186-5, A.2 https://csrc.nist.gov/publications/detail/fips/186/5/final\n * RFC 9380, https://www.rfc-editor.org/rfc/rfc9380#section-5\n * @param hash hash output from SHA3 or a similar function\n * @param groupOrder size of subgroup - (e.g. secp256k1.CURVE.n)\n * @param isLE interpret hash bytes as LE num\n * @returns valid private scalar\n */\nexport function mapHashToField(key, fieldOrder, isLE = false) {\n    const len = key.length;\n    const fieldLen = getFieldBytesLength(fieldOrder);\n    const minLen = getMinHashLength(fieldOrder);\n    // No small numbers: need to understand bias story. No huge numbers: easier to detect JS timings.\n    if (len < 16 || len < minLen || len > 1024)\n        throw new Error(`expected ${minLen}-1024 bytes of input, got ${len}`);\n    const num = isLE ? bytesToNumberBE(key) : bytesToNumberLE(key);\n    // `mod(x, 11)` can sometimes produce 0. `mod(x, 10) + 1` is the same, but no 0\n    const reduced = mod(num, fieldOrder - _1n) + _1n;\n    return isLE ? numberToBytesLE(reduced, fieldLen) : numberToBytesBE(reduced, fieldLen);\n}\n//# sourceMappingURL=modular.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Abelian group utilities\nimport { validateField, nLength } from './modular.js';\nimport { validateObject } from './utils.js';\nconst _0n = BigInt(0);\nconst _1n = BigInt(1);\n// Elliptic curve multiplication of Point by scalar. Fragile.\n// Scalars should always be less than curve order: this should be checked inside of a curve itself.\n// Creates precomputation tables for fast multiplication:\n// - private scalar is split by fixed size windows of W bits\n// - every window point is collected from window's table & added to accumulator\n// - since windows are different, same point inside tables won't be accessed more than once per calc\n// - each multiplication is 'Math.ceil(CURVE_ORDER / 𝑊) + 1' point additions (fixed for any scalar)\n// - +1 window is neccessary for wNAF\n// - wNAF reduces table size: 2x less memory + 2x faster generation, but 10% slower multiplication\n// TODO: Research returning 2d JS array of windows, instead of a single window. This would allow\n// windows to be in different memory locations\nexport function wNAF(c, bits) {\n    const constTimeNegate = (condition, item) => {\n        const neg = item.negate();\n        return condition ? neg : item;\n    };\n    const opts = (W) => {\n        const windows = Math.ceil(bits / W) + 1; // +1, because\n        const windowSize = 2 ** (W - 1); // -1 because we skip zero\n        return { windows, windowSize };\n    };\n    return {\n        constTimeNegate,\n        // non-const time multiplication ladder\n        unsafeLadder(elm, n) {\n            let p = c.ZERO;\n            let d = elm;\n            while (n > _0n) {\n                if (n & _1n)\n                    p = p.add(d);\n                d = d.double();\n                n >>= _1n;\n            }\n            return p;\n        },\n        /**\n         * Creates a wNAF precomputation window. Used for caching.\n         * Default window size is set by `utils.precompute()` and is equal to 8.\n         * Number of precomputed points depends on the curve size:\n         * 2^(𝑊−1) * (Math.ceil(𝑛 / 𝑊) + 1), where:\n         * - 𝑊 is the window size\n         * - 𝑛 is the bitlength of the curve order.\n         * For a 256-bit curve and window size 8, the number of precomputed points is 128 * 33 = 4224.\n         * @returns precomputed point tables flattened to a single array\n         */\n        precomputeWindow(elm, W) {\n            const { windows, windowSize } = opts(W);\n            const points = [];\n            let p = elm;\n            let base = p;\n            for (let window = 0; window < windows; window++) {\n                base = p;\n                points.push(base);\n                // =1, because we skip zero\n                for (let i = 1; i < windowSize; i++) {\n                    base = base.add(p);\n                    points.push(base);\n                }\n                p = base.double();\n            }\n            return points;\n        },\n        /**\n         * Implements ec multiplication using precomputed tables and w-ary non-adjacent form.\n         * @param W window size\n         * @param precomputes precomputed tables\n         * @param n scalar (we don't check here, but should be less than curve order)\n         * @returns real and fake (for const-time) points\n         */\n        wNAF(W, precomputes, n) {\n            // TODO: maybe check that scalar is less than group order? wNAF behavious is undefined otherwise\n            // But need to carefully remove other checks before wNAF. ORDER == bits here\n            const { windows, windowSize } = opts(W);\n            let p = c.ZERO;\n            let f = c.BASE;\n            const mask = BigInt(2 ** W - 1); // Create mask with W ones: 0b1111 for W=4 etc.\n            const maxNumber = 2 ** W;\n            const shiftBy = BigInt(W);\n            for (let window = 0; window < windows; window++) {\n                const offset = window * windowSize;\n                // Extract W bits.\n                let wbits = Number(n & mask);\n                // Shift number by W bits.\n                n >>= shiftBy;\n                // If the bits are bigger than max size, we'll split those.\n                // +224 => 256 - 32\n                if (wbits > windowSize) {\n                    wbits -= maxNumber;\n                    n += _1n;\n                }\n                // This code was first written with assumption that 'f' and 'p' will never be infinity point:\n                // since each addition is multiplied by 2 ** W, it cannot cancel each other. However,\n                // there is negate now: it is possible that negated element from low value\n                // would be the same as high element, which will create carry into next window.\n                // It's not obvious how this can fail, but still worth investigating later.\n                // Check if we're onto Zero point.\n                // Add random point inside current window to f.\n                const offset1 = offset;\n                const offset2 = offset + Math.abs(wbits) - 1; // -1 because we skip zero\n                const cond1 = window % 2 !== 0;\n                const cond2 = wbits < 0;\n                if (wbits === 0) {\n                    // The most important part for const-time getPublicKey\n                    f = f.add(constTimeNegate(cond1, precomputes[offset1]));\n                }\n                else {\n                    p = p.add(constTimeNegate(cond2, precomputes[offset2]));\n                }\n            }\n            // JIT-compiler should not eliminate f here, since it will later be used in normalizeZ()\n            // Even if the variable is still unused, there are some checks which will\n            // throw an exception, so compiler needs to prove they won't happen, which is hard.\n            // At this point there is a way to F be infinity-point even if p is not,\n            // which makes it less const-time: around 1 bigint multiply.\n            return { p, f };\n        },\n        wNAFCached(P, precomputesMap, n, transform) {\n            // @ts-ignore\n            const W = P._WINDOW_SIZE || 1;\n            // Calculate precomputes on a first run, reuse them after\n            let comp = precomputesMap.get(P);\n            if (!comp) {\n                comp = this.precomputeWindow(P, W);\n                if (W !== 1) {\n                    precomputesMap.set(P, transform(comp));\n                }\n            }\n            return this.wNAF(W, comp, n);\n        },\n    };\n}\nexport function validateBasic(curve) {\n    validateField(curve.Fp);\n    validateObject(curve, {\n        n: 'bigint',\n        h: 'bigint',\n        Gx: 'field',\n        Gy: 'field',\n    }, {\n        nBitLength: 'isSafeInteger',\n        nByteLength: 'isSafeInteger',\n    });\n    // Set defaults\n    return Object.freeze({\n        ...nLength(curve.n, curve.nBitLength),\n        ...curve,\n        ...{ p: curve.Fp.ORDER },\n    });\n}\n//# sourceMappingURL=curve.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Short Weierstrass curve. The formula is: y² = x³ + ax + b\nimport { validateBasic, wNAF } from './curve.js';\nimport * as mod from './modular.js';\nimport * as ut from './utils.js';\nimport { ensureBytes } from './utils.js';\nfunction validatePointOpts(curve) {\n    const opts = validateBasic(curve);\n    ut.validateObject(opts, {\n        a: 'field',\n        b: 'field',\n    }, {\n        allowedPrivateKeyLengths: 'array',\n        wrapPrivateKey: 'boolean',\n        isTorsionFree: 'function',\n        clearCofactor: 'function',\n        allowInfinityPoint: 'boolean',\n        fromBytes: 'function',\n        toBytes: 'function',\n    });\n    const { endo, Fp, a } = opts;\n    if (endo) {\n        if (!Fp.eql(a, Fp.ZERO)) {\n            throw new Error('Endomorphism can only be defined for Koblitz curves that have a=0');\n        }\n        if (typeof endo !== 'object' ||\n            typeof endo.beta !== 'bigint' ||\n            typeof endo.splitScalar !== 'function') {\n            throw new Error('Expected endomorphism with beta: bigint and splitScalar: function');\n        }\n    }\n    return Object.freeze({ ...opts });\n}\n// ASN.1 DER encoding utilities\nconst { bytesToNumberBE: b2n, hexToBytes: h2b } = ut;\nexport const DER = {\n    // asn.1 DER encoding utils\n    Err: class DERErr extends Error {\n        constructor(m = '') {\n            super(m);\n        }\n    },\n    _parseInt(data) {\n        const { Err: E } = DER;\n        if (data.length < 2 || data[0] !== 0x02)\n            throw new E('Invalid signature integer tag');\n        const len = data[1];\n        const res = data.subarray(2, len + 2);\n        if (!len || res.length !== len)\n            throw new E('Invalid signature integer: wrong length');\n        // https://crypto.stackexchange.com/a/57734 Leftmost bit of first byte is 'negative' flag,\n        // since we always use positive integers here. It must always be empty:\n        // - add zero byte if exists\n        // - if next byte doesn't have a flag, leading zero is not allowed (minimal encoding)\n        if (res[0] & 0b10000000)\n            throw new E('Invalid signature integer: negative');\n        if (res[0] === 0x00 && !(res[1] & 0b10000000))\n            throw new E('Invalid signature integer: unnecessary leading zero');\n        return { d: b2n(res), l: data.subarray(len + 2) }; // d is data, l is left\n    },\n    toSig(hex) {\n        // parse DER signature\n        const { Err: E } = DER;\n        const data = typeof hex === 'string' ? h2b(hex) : hex;\n        ut.abytes(data);\n        let l = data.length;\n        if (l < 2 || data[0] != 0x30)\n            throw new E('Invalid signature tag');\n        if (data[1] !== l - 2)\n            throw new E('Invalid signature: incorrect length');\n        const { d: r, l: sBytes } = DER._parseInt(data.subarray(2));\n        const { d: s, l: rBytesLeft } = DER._parseInt(sBytes);\n        if (rBytesLeft.length)\n            throw new E('Invalid signature: left bytes after parsing');\n        return { r, s };\n    },\n    hexFromSig(sig) {\n        // Add leading zero if first byte has negative bit enabled. More details in '_parseInt'\n        const slice = (s) => (Number.parseInt(s[0], 16) & 0b1000 ? '00' + s : s);\n        const h = (num) => {\n            const hex = num.toString(16);\n            return hex.length & 1 ? `0${hex}` : hex;\n        };\n        const s = slice(h(sig.s));\n        const r = slice(h(sig.r));\n        const shl = s.length / 2;\n        const rhl = r.length / 2;\n        const sl = h(shl);\n        const rl = h(rhl);\n        return `30${h(rhl + shl + 4)}02${rl}${r}02${sl}${s}`;\n    },\n};\n// Be friendly to bad ECMAScript parsers by not using bigint literals\n// prettier-ignore\nconst _0n = BigInt(0), _1n = BigInt(1), _2n = BigInt(2), _3n = BigInt(3), _4n = BigInt(4);\nexport function weierstrassPoints(opts) {\n    const CURVE = validatePointOpts(opts);\n    const { Fp } = CURVE; // All curves has same field / group length as for now, but they can differ\n    const toBytes = CURVE.toBytes ||\n        ((_c, point, _isCompressed) => {\n            const a = point.toAffine();\n            return ut.concatBytes(Uint8Array.from([0x04]), Fp.toBytes(a.x), Fp.toBytes(a.y));\n        });\n    const fromBytes = CURVE.fromBytes ||\n        ((bytes) => {\n            // const head = bytes[0];\n            const tail = bytes.subarray(1);\n            // if (head !== 0x04) throw new Error('Only non-compressed encoding is supported');\n            const x = Fp.fromBytes(tail.subarray(0, Fp.BYTES));\n            const y = Fp.fromBytes(tail.subarray(Fp.BYTES, 2 * Fp.BYTES));\n            return { x, y };\n        });\n    /**\n     * y² = x³ + ax + b: Short weierstrass curve formula\n     * @returns y²\n     */\n    function weierstrassEquation(x) {\n        const { a, b } = CURVE;\n        const x2 = Fp.sqr(x); // x * x\n        const x3 = Fp.mul(x2, x); // x2 * x\n        return Fp.add(Fp.add(x3, Fp.mul(x, a)), b); // x3 + a * x + b\n    }\n    // Validate whether the passed curve params are valid.\n    // We check if curve equation works for generator point.\n    // `assertValidity()` won't work: `isTorsionFree()` is not available at this point in bls12-381.\n    // ProjectivePoint class has not been initialized yet.\n    if (!Fp.eql(Fp.sqr(CURVE.Gy), weierstrassEquation(CURVE.Gx)))\n        throw new Error('bad generator point: equation left != right');\n    // Valid group elements reside in range 1..n-1\n    function isWithinCurveOrder(num) {\n        return typeof num === 'bigint' && _0n < num && num < CURVE.n;\n    }\n    function assertGE(num) {\n        if (!isWithinCurveOrder(num))\n            throw new Error('Expected valid bigint: 0 < bigint < curve.n');\n    }\n    // Validates if priv key is valid and converts it to bigint.\n    // Supports options allowedPrivateKeyLengths and wrapPrivateKey.\n    function normPrivateKeyToScalar(key) {\n        const { allowedPrivateKeyLengths: lengths, nByteLength, wrapPrivateKey, n } = CURVE;\n        if (lengths && typeof key !== 'bigint') {\n            if (ut.isBytes(key))\n                key = ut.bytesToHex(key);\n            // Normalize to hex string, pad. E.g. P521 would norm 130-132 char hex to 132-char bytes\n            if (typeof key !== 'string' || !lengths.includes(key.length))\n                throw new Error('Invalid key');\n            key = key.padStart(nByteLength * 2, '0');\n        }\n        let num;\n        try {\n            num =\n                typeof key === 'bigint'\n                    ? key\n                    : ut.bytesToNumberBE(ensureBytes('private key', key, nByteLength));\n        }\n        catch (error) {\n            throw new Error(`private key must be ${nByteLength} bytes, hex or bigint, not ${typeof key}`);\n        }\n        if (wrapPrivateKey)\n            num = mod.mod(num, n); // disabled by default, enabled for BLS\n        assertGE(num); // num in range [1..N-1]\n        return num;\n    }\n    const pointPrecomputes = new Map();\n    function assertPrjPoint(other) {\n        if (!(other instanceof Point))\n            throw new Error('ProjectivePoint expected');\n    }\n    /**\n     * Projective Point works in 3d / projective (homogeneous) coordinates: (x, y, z) ∋ (x=x/z, y=y/z)\n     * Default Point works in 2d / affine coordinates: (x, y)\n     * We're doing calculations in projective, because its operations don't require costly inversion.\n     */\n    class Point {\n        constructor(px, py, pz) {\n            this.px = px;\n            this.py = py;\n            this.pz = pz;\n            if (px == null || !Fp.isValid(px))\n                throw new Error('x required');\n            if (py == null || !Fp.isValid(py))\n                throw new Error('y required');\n            if (pz == null || !Fp.isValid(pz))\n                throw new Error('z required');\n        }\n        // Does not validate if the point is on-curve.\n        // Use fromHex instead, or call assertValidity() later.\n        static fromAffine(p) {\n            const { x, y } = p || {};\n            if (!p || !Fp.isValid(x) || !Fp.isValid(y))\n                throw new Error('invalid affine point');\n            if (p instanceof Point)\n                throw new Error('projective point not allowed');\n            const is0 = (i) => Fp.eql(i, Fp.ZERO);\n            // fromAffine(x:0, y:0) would produce (x:0, y:0, z:1), but we need (x:0, y:1, z:0)\n            if (is0(x) && is0(y))\n                return Point.ZERO;\n            return new Point(x, y, Fp.ONE);\n        }\n        get x() {\n            return this.toAffine().x;\n        }\n        get y() {\n            return this.toAffine().y;\n        }\n        /**\n         * Takes a bunch of Projective Points but executes only one\n         * inversion on all of them. Inversion is very slow operation,\n         * so this improves performance massively.\n         * Optimization: converts a list of projective points to a list of identical points with Z=1.\n         */\n        static normalizeZ(points) {\n            const toInv = Fp.invertBatch(points.map((p) => p.pz));\n            return points.map((p, i) => p.toAffine(toInv[i])).map(Point.fromAffine);\n        }\n        /**\n         * Converts hash string or Uint8Array to Point.\n         * @param hex short/long ECDSA hex\n         */\n        static fromHex(hex) {\n            const P = Point.fromAffine(fromBytes(ensureBytes('pointHex', hex)));\n            P.assertValidity();\n            return P;\n        }\n        // Multiplies generator point by privateKey.\n        static fromPrivateKey(privateKey) {\n            return Point.BASE.multiply(normPrivateKeyToScalar(privateKey));\n        }\n        // \"Private method\", don't use it directly\n        _setWindowSize(windowSize) {\n            this._WINDOW_SIZE = windowSize;\n            pointPrecomputes.delete(this);\n        }\n        // A point on curve is valid if it conforms to equation.\n        assertValidity() {\n            if (this.is0()) {\n                // (0, 1, 0) aka ZERO is invalid in most contexts.\n                // In BLS, ZERO can be serialized, so we allow it.\n                // (0, 0, 0) is wrong representation of ZERO and is always invalid.\n                if (CURVE.allowInfinityPoint && !Fp.is0(this.py))\n                    return;\n                throw new Error('bad point: ZERO');\n            }\n            // Some 3rd-party test vectors require different wording between here & `fromCompressedHex`\n            const { x, y } = this.toAffine();\n            // Check if x, y are valid field elements\n            if (!Fp.isValid(x) || !Fp.isValid(y))\n                throw new Error('bad point: x or y not FE');\n            const left = Fp.sqr(y); // y²\n            const right = weierstrassEquation(x); // x³ + ax + b\n            if (!Fp.eql(left, right))\n                throw new Error('bad point: equation left != right');\n            if (!this.isTorsionFree())\n                throw new Error('bad point: not in prime-order subgroup');\n        }\n        hasEvenY() {\n            const { y } = this.toAffine();\n            if (Fp.isOdd)\n                return !Fp.isOdd(y);\n            throw new Error(\"Field doesn't support isOdd\");\n        }\n        /**\n         * Compare one point to another.\n         */\n        equals(other) {\n            assertPrjPoint(other);\n            const { px: X1, py: Y1, pz: Z1 } = this;\n            const { px: X2, py: Y2, pz: Z2 } = other;\n            const U1 = Fp.eql(Fp.mul(X1, Z2), Fp.mul(X2, Z1));\n            const U2 = Fp.eql(Fp.mul(Y1, Z2), Fp.mul(Y2, Z1));\n            return U1 && U2;\n        }\n        /**\n         * Flips point to one corresponding to (x, -y) in Affine coordinates.\n         */\n        negate() {\n            return new Point(this.px, Fp.neg(this.py), this.pz);\n        }\n        // Renes-Costello-Batina exception-free doubling formula.\n        // There is 30% faster Jacobian formula, but it is not complete.\n        // https://eprint.iacr.org/2015/1060, algorithm 3\n        // Cost: 8M + 3S + 3*a + 2*b3 + 15add.\n        double() {\n            const { a, b } = CURVE;\n            const b3 = Fp.mul(b, _3n);\n            const { px: X1, py: Y1, pz: Z1 } = this;\n            let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO; // prettier-ignore\n            let t0 = Fp.mul(X1, X1); // step 1\n            let t1 = Fp.mul(Y1, Y1);\n            let t2 = Fp.mul(Z1, Z1);\n            let t3 = Fp.mul(X1, Y1);\n            t3 = Fp.add(t3, t3); // step 5\n            Z3 = Fp.mul(X1, Z1);\n            Z3 = Fp.add(Z3, Z3);\n            X3 = Fp.mul(a, Z3);\n            Y3 = Fp.mul(b3, t2);\n            Y3 = Fp.add(X3, Y3); // step 10\n            X3 = Fp.sub(t1, Y3);\n            Y3 = Fp.add(t1, Y3);\n            Y3 = Fp.mul(X3, Y3);\n            X3 = Fp.mul(t3, X3);\n            Z3 = Fp.mul(b3, Z3); // step 15\n            t2 = Fp.mul(a, t2);\n            t3 = Fp.sub(t0, t2);\n            t3 = Fp.mul(a, t3);\n            t3 = Fp.add(t3, Z3);\n            Z3 = Fp.add(t0, t0); // step 20\n            t0 = Fp.add(Z3, t0);\n            t0 = Fp.add(t0, t2);\n            t0 = Fp.mul(t0, t3);\n            Y3 = Fp.add(Y3, t0);\n            t2 = Fp.mul(Y1, Z1); // step 25\n            t2 = Fp.add(t2, t2);\n            t0 = Fp.mul(t2, t3);\n            X3 = Fp.sub(X3, t0);\n            Z3 = Fp.mul(t2, t1);\n            Z3 = Fp.add(Z3, Z3); // step 30\n            Z3 = Fp.add(Z3, Z3);\n            return new Point(X3, Y3, Z3);\n        }\n        // Renes-Costello-Batina exception-free addition formula.\n        // There is 30% faster Jacobian formula, but it is not complete.\n        // https://eprint.iacr.org/2015/1060, algorithm 1\n        // Cost: 12M + 0S + 3*a + 3*b3 + 23add.\n        add(other) {\n            assertPrjPoint(other);\n            const { px: X1, py: Y1, pz: Z1 } = this;\n            const { px: X2, py: Y2, pz: Z2 } = other;\n            let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO; // prettier-ignore\n            const a = CURVE.a;\n            const b3 = Fp.mul(CURVE.b, _3n);\n            let t0 = Fp.mul(X1, X2); // step 1\n            let t1 = Fp.mul(Y1, Y2);\n            let t2 = Fp.mul(Z1, Z2);\n            let t3 = Fp.add(X1, Y1);\n            let t4 = Fp.add(X2, Y2); // step 5\n            t3 = Fp.mul(t3, t4);\n            t4 = Fp.add(t0, t1);\n            t3 = Fp.sub(t3, t4);\n            t4 = Fp.add(X1, Z1);\n            let t5 = Fp.add(X2, Z2); // step 10\n            t4 = Fp.mul(t4, t5);\n            t5 = Fp.add(t0, t2);\n            t4 = Fp.sub(t4, t5);\n            t5 = Fp.add(Y1, Z1);\n            X3 = Fp.add(Y2, Z2); // step 15\n            t5 = Fp.mul(t5, X3);\n            X3 = Fp.add(t1, t2);\n            t5 = Fp.sub(t5, X3);\n            Z3 = Fp.mul(a, t4);\n            X3 = Fp.mul(b3, t2); // step 20\n            Z3 = Fp.add(X3, Z3);\n            X3 = Fp.sub(t1, Z3);\n            Z3 = Fp.add(t1, Z3);\n            Y3 = Fp.mul(X3, Z3);\n            t1 = Fp.add(t0, t0); // step 25\n            t1 = Fp.add(t1, t0);\n            t2 = Fp.mul(a, t2);\n            t4 = Fp.mul(b3, t4);\n            t1 = Fp.add(t1, t2);\n            t2 = Fp.sub(t0, t2); // step 30\n            t2 = Fp.mul(a, t2);\n            t4 = Fp.add(t4, t2);\n            t0 = Fp.mul(t1, t4);\n            Y3 = Fp.add(Y3, t0);\n            t0 = Fp.mul(t5, t4); // step 35\n            X3 = Fp.mul(t3, X3);\n            X3 = Fp.sub(X3, t0);\n            t0 = Fp.mul(t3, t1);\n            Z3 = Fp.mul(t5, Z3);\n            Z3 = Fp.add(Z3, t0); // step 40\n            return new Point(X3, Y3, Z3);\n        }\n        subtract(other) {\n            return this.add(other.negate());\n        }\n        is0() {\n            return this.equals(Point.ZERO);\n        }\n        wNAF(n) {\n            return wnaf.wNAFCached(this, pointPrecomputes, n, (comp) => {\n                const toInv = Fp.invertBatch(comp.map((p) => p.pz));\n                return comp.map((p, i) => p.toAffine(toInv[i])).map(Point.fromAffine);\n            });\n        }\n        /**\n         * Non-constant-time multiplication. Uses double-and-add algorithm.\n         * It's faster, but should only be used when you don't care about\n         * an exposed private key e.g. sig verification, which works over *public* keys.\n         */\n        multiplyUnsafe(n) {\n            const I = Point.ZERO;\n            if (n === _0n)\n                return I;\n            assertGE(n); // Will throw on 0\n            if (n === _1n)\n                return this;\n            const { endo } = CURVE;\n            if (!endo)\n                return wnaf.unsafeLadder(this, n);\n            // Apply endomorphism\n            let { k1neg, k1, k2neg, k2 } = endo.splitScalar(n);\n            let k1p = I;\n            let k2p = I;\n            let d = this;\n            while (k1 > _0n || k2 > _0n) {\n                if (k1 & _1n)\n                    k1p = k1p.add(d);\n                if (k2 & _1n)\n                    k2p = k2p.add(d);\n                d = d.double();\n                k1 >>= _1n;\n                k2 >>= _1n;\n            }\n            if (k1neg)\n                k1p = k1p.negate();\n            if (k2neg)\n                k2p = k2p.negate();\n            k2p = new Point(Fp.mul(k2p.px, endo.beta), k2p.py, k2p.pz);\n            return k1p.add(k2p);\n        }\n        /**\n         * Constant time multiplication.\n         * Uses wNAF method. Windowed method may be 10% faster,\n         * but takes 2x longer to generate and consumes 2x memory.\n         * Uses precomputes when available.\n         * Uses endomorphism for Koblitz curves.\n         * @param scalar by which the point would be multiplied\n         * @returns New point\n         */\n        multiply(scalar) {\n            assertGE(scalar);\n            let n = scalar;\n            let point, fake; // Fake point is used to const-time mult\n            const { endo } = CURVE;\n            if (endo) {\n                const { k1neg, k1, k2neg, k2 } = endo.splitScalar(n);\n                let { p: k1p, f: f1p } = this.wNAF(k1);\n                let { p: k2p, f: f2p } = this.wNAF(k2);\n                k1p = wnaf.constTimeNegate(k1neg, k1p);\n                k2p = wnaf.constTimeNegate(k2neg, k2p);\n                k2p = new Point(Fp.mul(k2p.px, endo.beta), k2p.py, k2p.pz);\n                point = k1p.add(k2p);\n                fake = f1p.add(f2p);\n            }\n            else {\n                const { p, f } = this.wNAF(n);\n                point = p;\n                fake = f;\n            }\n            // Normalize `z` for both points, but return only real one\n            return Point.normalizeZ([point, fake])[0];\n        }\n        /**\n         * Efficiently calculate `aP + bQ`. Unsafe, can expose private key, if used incorrectly.\n         * Not using Strauss-Shamir trick: precomputation tables are faster.\n         * The trick could be useful if both P and Q are not G (not in our case).\n         * @returns non-zero affine point\n         */\n        multiplyAndAddUnsafe(Q, a, b) {\n            const G = Point.BASE; // No Strauss-Shamir trick: we have 10% faster G precomputes\n            const mul = (P, a // Select faster multiply() method\n            ) => (a === _0n || a === _1n || !P.equals(G) ? P.multiplyUnsafe(a) : P.multiply(a));\n            const sum = mul(this, a).add(mul(Q, b));\n            return sum.is0() ? undefined : sum;\n        }\n        // Converts Projective point to affine (x, y) coordinates.\n        // Can accept precomputed Z^-1 - for example, from invertBatch.\n        // (x, y, z) ∋ (x=x/z, y=y/z)\n        toAffine(iz) {\n            const { px: x, py: y, pz: z } = this;\n            const is0 = this.is0();\n            // If invZ was 0, we return zero point. However we still want to execute\n            // all operations, so we replace invZ with a random number, 1.\n            if (iz == null)\n                iz = is0 ? Fp.ONE : Fp.inv(z);\n            const ax = Fp.mul(x, iz);\n            const ay = Fp.mul(y, iz);\n            const zz = Fp.mul(z, iz);\n            if (is0)\n                return { x: Fp.ZERO, y: Fp.ZERO };\n            if (!Fp.eql(zz, Fp.ONE))\n                throw new Error('invZ was invalid');\n            return { x: ax, y: ay };\n        }\n        isTorsionFree() {\n            const { h: cofactor, isTorsionFree } = CURVE;\n            if (cofactor === _1n)\n                return true; // No subgroups, always torsion-free\n            if (isTorsionFree)\n                return isTorsionFree(Point, this);\n            throw new Error('isTorsionFree() has not been declared for the elliptic curve');\n        }\n        clearCofactor() {\n            const { h: cofactor, clearCofactor } = CURVE;\n            if (cofactor === _1n)\n                return this; // Fast-path\n            if (clearCofactor)\n                return clearCofactor(Point, this);\n            return this.multiplyUnsafe(CURVE.h);\n        }\n        toRawBytes(isCompressed = true) {\n            this.assertValidity();\n            return toBytes(Point, this, isCompressed);\n        }\n        toHex(isCompressed = true) {\n            return ut.bytesToHex(this.toRawBytes(isCompressed));\n        }\n    }\n    Point.BASE = new Point(CURVE.Gx, CURVE.Gy, Fp.ONE);\n    Point.ZERO = new Point(Fp.ZERO, Fp.ONE, Fp.ZERO);\n    const _bits = CURVE.nBitLength;\n    const wnaf = wNAF(Point, CURVE.endo ? Math.ceil(_bits / 2) : _bits);\n    // Validate if generator point is on curve\n    return {\n        CURVE,\n        ProjectivePoint: Point,\n        normPrivateKeyToScalar,\n        weierstrassEquation,\n        isWithinCurveOrder,\n    };\n}\nfunction validateOpts(curve) {\n    const opts = validateBasic(curve);\n    ut.validateObject(opts, {\n        hash: 'hash',\n        hmac: 'function',\n        randomBytes: 'function',\n    }, {\n        bits2int: 'function',\n        bits2int_modN: 'function',\n        lowS: 'boolean',\n    });\n    return Object.freeze({ lowS: true, ...opts });\n}\nexport function weierstrass(curveDef) {\n    const CURVE = validateOpts(curveDef);\n    const { Fp, n: CURVE_ORDER } = CURVE;\n    const compressedLen = Fp.BYTES + 1; // e.g. 33 for 32\n    const uncompressedLen = 2 * Fp.BYTES + 1; // e.g. 65 for 32\n    function isValidFieldElement(num) {\n        return _0n < num && num < Fp.ORDER; // 0 is banned since it's not invertible FE\n    }\n    function modN(a) {\n        return mod.mod(a, CURVE_ORDER);\n    }\n    function invN(a) {\n        return mod.invert(a, CURVE_ORDER);\n    }\n    const { ProjectivePoint: Point, normPrivateKeyToScalar, weierstrassEquation, isWithinCurveOrder, } = weierstrassPoints({\n        ...CURVE,\n        toBytes(_c, point, isCompressed) {\n            const a = point.toAffine();\n            const x = Fp.toBytes(a.x);\n            const cat = ut.concatBytes;\n            if (isCompressed) {\n                return cat(Uint8Array.from([point.hasEvenY() ? 0x02 : 0x03]), x);\n            }\n            else {\n                return cat(Uint8Array.from([0x04]), x, Fp.toBytes(a.y));\n            }\n        },\n        fromBytes(bytes) {\n            const len = bytes.length;\n            const head = bytes[0];\n            const tail = bytes.subarray(1);\n            // this.assertValidity() is done inside of fromHex\n            if (len === compressedLen && (head === 0x02 || head === 0x03)) {\n                const x = ut.bytesToNumberBE(tail);\n                if (!isValidFieldElement(x))\n                    throw new Error('Point is not on curve');\n                const y2 = weierstrassEquation(x); // y² = x³ + ax + b\n                let y;\n                try {\n                    y = Fp.sqrt(y2); // y = y² ^ (p+1)/4\n                }\n                catch (sqrtError) {\n                    const suffix = sqrtError instanceof Error ? ': ' + sqrtError.message : '';\n                    throw new Error('Point is not on curve' + suffix);\n                }\n                const isYOdd = (y & _1n) === _1n;\n                // ECDSA\n                const isHeadOdd = (head & 1) === 1;\n                if (isHeadOdd !== isYOdd)\n                    y = Fp.neg(y);\n                return { x, y };\n            }\n            else if (len === uncompressedLen && head === 0x04) {\n                const x = Fp.fromBytes(tail.subarray(0, Fp.BYTES));\n                const y = Fp.fromBytes(tail.subarray(Fp.BYTES, 2 * Fp.BYTES));\n                return { x, y };\n            }\n            else {\n                throw new Error(`Point of length ${len} was invalid. Expected ${compressedLen} compressed bytes or ${uncompressedLen} uncompressed bytes`);\n            }\n        },\n    });\n    const numToNByteStr = (num) => ut.bytesToHex(ut.numberToBytesBE(num, CURVE.nByteLength));\n    function isBiggerThanHalfOrder(number) {\n        const HALF = CURVE_ORDER >> _1n;\n        return number > HALF;\n    }\n    function normalizeS(s) {\n        return isBiggerThanHalfOrder(s) ? modN(-s) : s;\n    }\n    // slice bytes num\n    const slcNum = (b, from, to) => ut.bytesToNumberBE(b.slice(from, to));\n    /**\n     * ECDSA signature with its (r, s) properties. Supports DER & compact representations.\n     */\n    class Signature {\n        constructor(r, s, recovery) {\n            this.r = r;\n            this.s = s;\n            this.recovery = recovery;\n            this.assertValidity();\n        }\n        // pair (bytes of r, bytes of s)\n        static fromCompact(hex) {\n            const l = CURVE.nByteLength;\n            hex = ensureBytes('compactSignature', hex, l * 2);\n            return new Signature(slcNum(hex, 0, l), slcNum(hex, l, 2 * l));\n        }\n        // DER encoded ECDSA signature\n        // https://bitcoin.stackexchange.com/questions/57644/what-are-the-parts-of-a-bitcoin-transaction-input-script\n        static fromDER(hex) {\n            const { r, s } = DER.toSig(ensureBytes('DER', hex));\n            return new Signature(r, s);\n        }\n        assertValidity() {\n            // can use assertGE here\n            if (!isWithinCurveOrder(this.r))\n                throw new Error('r must be 0 < r < CURVE.n');\n            if (!isWithinCurveOrder(this.s))\n                throw new Error('s must be 0 < s < CURVE.n');\n        }\n        addRecoveryBit(recovery) {\n            return new Signature(this.r, this.s, recovery);\n        }\n        recoverPublicKey(msgHash) {\n            const { r, s, recovery: rec } = this;\n            const h = bits2int_modN(ensureBytes('msgHash', msgHash)); // Truncate hash\n            if (rec == null || ![0, 1, 2, 3].includes(rec))\n                throw new Error('recovery id invalid');\n            const radj = rec === 2 || rec === 3 ? r + CURVE.n : r;\n            if (radj >= Fp.ORDER)\n                throw new Error('recovery id 2 or 3 invalid');\n            const prefix = (rec & 1) === 0 ? '02' : '03';\n            const R = Point.fromHex(prefix + numToNByteStr(radj));\n            const ir = invN(radj); // r^-1\n            const u1 = modN(-h * ir); // -hr^-1\n            const u2 = modN(s * ir); // sr^-1\n            const Q = Point.BASE.multiplyAndAddUnsafe(R, u1, u2); // (sr^-1)R-(hr^-1)G = -(hr^-1)G + (sr^-1)\n            if (!Q)\n                throw new Error('point at infinify'); // unsafe is fine: no priv data leaked\n            Q.assertValidity();\n            return Q;\n        }\n        // Signatures should be low-s, to prevent malleability.\n        hasHighS() {\n            return isBiggerThanHalfOrder(this.s);\n        }\n        normalizeS() {\n            return this.hasHighS() ? new Signature(this.r, modN(-this.s), this.recovery) : this;\n        }\n        // DER-encoded\n        toDERRawBytes() {\n            return ut.hexToBytes(this.toDERHex());\n        }\n        toDERHex() {\n            return DER.hexFromSig({ r: this.r, s: this.s });\n        }\n        // padded bytes of r, then padded bytes of s\n        toCompactRawBytes() {\n            return ut.hexToBytes(this.toCompactHex());\n        }\n        toCompactHex() {\n            return numToNByteStr(this.r) + numToNByteStr(this.s);\n        }\n    }\n    const utils = {\n        isValidPrivateKey(privateKey) {\n            try {\n                normPrivateKeyToScalar(privateKey);\n                return true;\n            }\n            catch (error) {\n                return false;\n            }\n        },\n        normPrivateKeyToScalar: normPrivateKeyToScalar,\n        /**\n         * Produces cryptographically secure private key from random of size\n         * (groupLen + ceil(groupLen / 2)) with modulo bias being negligible.\n         */\n        randomPrivateKey: () => {\n            const length = mod.getMinHashLength(CURVE.n);\n            return mod.mapHashToField(CURVE.randomBytes(length), CURVE.n);\n        },\n        /**\n         * Creates precompute table for an arbitrary EC point. Makes point \"cached\".\n         * Allows to massively speed-up `point.multiply(scalar)`.\n         * @returns cached point\n         * @example\n         * const fast = utils.precompute(8, ProjectivePoint.fromHex(someonesPubKey));\n         * fast.multiply(privKey); // much faster ECDH now\n         */\n        precompute(windowSize = 8, point = Point.BASE) {\n            point._setWindowSize(windowSize);\n            point.multiply(BigInt(3)); // 3 is arbitrary, just need any number here\n            return point;\n        },\n    };\n    /**\n     * Computes public key for a private key. Checks for validity of the private key.\n     * @param privateKey private key\n     * @param isCompressed whether to return compact (default), or full key\n     * @returns Public key, full when isCompressed=false; short when isCompressed=true\n     */\n    function getPublicKey(privateKey, isCompressed = true) {\n        return Point.fromPrivateKey(privateKey).toRawBytes(isCompressed);\n    }\n    /**\n     * Quick and dirty check for item being public key. Does not validate hex, or being on-curve.\n     */\n    function isProbPub(item) {\n        const arr = ut.isBytes(item);\n        const str = typeof item === 'string';\n        const len = (arr || str) && item.length;\n        if (arr)\n            return len === compressedLen || len === uncompressedLen;\n        if (str)\n            return len === 2 * compressedLen || len === 2 * uncompressedLen;\n        if (item instanceof Point)\n            return true;\n        return false;\n    }\n    /**\n     * ECDH (Elliptic Curve Diffie Hellman).\n     * Computes shared public key from private key and public key.\n     * Checks: 1) private key validity 2) shared key is on-curve.\n     * Does NOT hash the result.\n     * @param privateA private key\n     * @param publicB different public key\n     * @param isCompressed whether to return compact (default), or full key\n     * @returns shared public key\n     */\n    function getSharedSecret(privateA, publicB, isCompressed = true) {\n        if (isProbPub(privateA))\n            throw new Error('first arg must be private key');\n        if (!isProbPub(publicB))\n            throw new Error('second arg must be public key');\n        const b = Point.fromHex(publicB); // check for being on-curve\n        return b.multiply(normPrivateKeyToScalar(privateA)).toRawBytes(isCompressed);\n    }\n    // RFC6979: ensure ECDSA msg is X bytes and < N. RFC suggests optional truncating via bits2octets.\n    // FIPS 186-4 4.6 suggests the leftmost min(nBitLen, outLen) bits, which matches bits2int.\n    // bits2int can produce res>N, we can do mod(res, N) since the bitLen is the same.\n    // int2octets can't be used; pads small msgs with 0: unacceptatble for trunc as per RFC vectors\n    const bits2int = CURVE.bits2int ||\n        function (bytes) {\n            // For curves with nBitLength % 8 !== 0: bits2octets(bits2octets(m)) !== bits2octets(m)\n            // for some cases, since bytes.length * 8 is not actual bitLength.\n            const num = ut.bytesToNumberBE(bytes); // check for == u8 done here\n            const delta = bytes.length * 8 - CURVE.nBitLength; // truncate to nBitLength leftmost bits\n            return delta > 0 ? num >> BigInt(delta) : num;\n        };\n    const bits2int_modN = CURVE.bits2int_modN ||\n        function (bytes) {\n            return modN(bits2int(bytes)); // can't use bytesToNumberBE here\n        };\n    // NOTE: pads output with zero as per spec\n    const ORDER_MASK = ut.bitMask(CURVE.nBitLength);\n    /**\n     * Converts to bytes. Checks if num in `[0..ORDER_MASK-1]` e.g.: `[0..2^256-1]`.\n     */\n    function int2octets(num) {\n        if (typeof num !== 'bigint')\n            throw new Error('bigint expected');\n        if (!(_0n <= num && num < ORDER_MASK))\n            throw new Error(`bigint expected < 2^${CURVE.nBitLength}`);\n        // works with order, can have different size than numToField!\n        return ut.numberToBytesBE(num, CURVE.nByteLength);\n    }\n    // Steps A, D of RFC6979 3.2\n    // Creates RFC6979 seed; converts msg/privKey to numbers.\n    // Used only in sign, not in verify.\n    // NOTE: we cannot assume here that msgHash has same amount of bytes as curve order, this will be wrong at least for P521.\n    // Also it can be bigger for P224 + SHA256\n    function prepSig(msgHash, privateKey, opts = defaultSigOpts) {\n        if (['recovered', 'canonical'].some((k) => k in opts))\n            throw new Error('sign() legacy options not supported');\n        const { hash, randomBytes } = CURVE;\n        let { lowS, prehash, extraEntropy: ent } = opts; // generates low-s sigs by default\n        if (lowS == null)\n            lowS = true; // RFC6979 3.2: we skip step A, because we already provide hash\n        msgHash = ensureBytes('msgHash', msgHash);\n        if (prehash)\n            msgHash = ensureBytes('prehashed msgHash', hash(msgHash));\n        // We can't later call bits2octets, since nested bits2int is broken for curves\n        // with nBitLength % 8 !== 0. Because of that, we unwrap it here as int2octets call.\n        // const bits2octets = (bits) => int2octets(bits2int_modN(bits))\n        const h1int = bits2int_modN(msgHash);\n        const d = normPrivateKeyToScalar(privateKey); // validate private key, convert to bigint\n        const seedArgs = [int2octets(d), int2octets(h1int)];\n        // extraEntropy. RFC6979 3.6: additional k' (optional).\n        if (ent != null && ent !== false) {\n            // K = HMAC_K(V || 0x00 || int2octets(x) || bits2octets(h1) || k')\n            const e = ent === true ? randomBytes(Fp.BYTES) : ent; // generate random bytes OR pass as-is\n            seedArgs.push(ensureBytes('extraEntropy', e)); // check for being bytes\n        }\n        const seed = ut.concatBytes(...seedArgs); // Step D of RFC6979 3.2\n        const m = h1int; // NOTE: no need to call bits2int second time here, it is inside truncateHash!\n        // Converts signature params into point w r/s, checks result for validity.\n        function k2sig(kBytes) {\n            // RFC 6979 Section 3.2, step 3: k = bits2int(T)\n            const k = bits2int(kBytes); // Cannot use fields methods, since it is group element\n            if (!isWithinCurveOrder(k))\n                return; // Important: all mod() calls here must be done over N\n            const ik = invN(k); // k^-1 mod n\n            const q = Point.BASE.multiply(k).toAffine(); // q = Gk\n            const r = modN(q.x); // r = q.x mod n\n            if (r === _0n)\n                return;\n            // Can use scalar blinding b^-1(bm + bdr) where b ∈ [1,q−1] according to\n            // https://tches.iacr.org/index.php/TCHES/article/view/7337/6509. We've decided against it:\n            // a) dependency on CSPRNG b) 15% slowdown c) doesn't really help since bigints are not CT\n            const s = modN(ik * modN(m + r * d)); // Not using blinding here\n            if (s === _0n)\n                return;\n            let recovery = (q.x === r ? 0 : 2) | Number(q.y & _1n); // recovery bit (2 or 3, when q.x > n)\n            let normS = s;\n            if (lowS && isBiggerThanHalfOrder(s)) {\n                normS = normalizeS(s); // if lowS was passed, ensure s is always\n                recovery ^= 1; // // in the bottom half of N\n            }\n            return new Signature(r, normS, recovery); // use normS, not s\n        }\n        return { seed, k2sig };\n    }\n    const defaultSigOpts = { lowS: CURVE.lowS, prehash: false };\n    const defaultVerOpts = { lowS: CURVE.lowS, prehash: false };\n    /**\n     * Signs message hash with a private key.\n     * ```\n     * sign(m, d, k) where\n     *   (x, y) = G × k\n     *   r = x mod n\n     *   s = (m + dr)/k mod n\n     * ```\n     * @param msgHash NOT message. msg needs to be hashed to `msgHash`, or use `prehash`.\n     * @param privKey private key\n     * @param opts lowS for non-malleable sigs. extraEntropy for mixing randomness into k. prehash will hash first arg.\n     * @returns signature with recovery param\n     */\n    function sign(msgHash, privKey, opts = defaultSigOpts) {\n        const { seed, k2sig } = prepSig(msgHash, privKey, opts); // Steps A, D of RFC6979 3.2.\n        const C = CURVE;\n        const drbg = ut.createHmacDrbg(C.hash.outputLen, C.nByteLength, C.hmac);\n        return drbg(seed, k2sig); // Steps B, C, D, E, F, G\n    }\n    // Enable precomputes. Slows down first publicKey computation by 20ms.\n    Point.BASE._setWindowSize(8);\n    // utils.precompute(8, ProjectivePoint.BASE)\n    /**\n     * Verifies a signature against message hash and public key.\n     * Rejects lowS signatures by default: to override,\n     * specify option `{lowS: false}`. Implements section 4.1.4 from https://www.secg.org/sec1-v2.pdf:\n     *\n     * ```\n     * verify(r, s, h, P) where\n     *   U1 = hs^-1 mod n\n     *   U2 = rs^-1 mod n\n     *   R = U1⋅G - U2⋅P\n     *   mod(R.x, n) == r\n     * ```\n     */\n    function verify(signature, msgHash, publicKey, opts = defaultVerOpts) {\n        const sg = signature;\n        msgHash = ensureBytes('msgHash', msgHash);\n        publicKey = ensureBytes('publicKey', publicKey);\n        if ('strict' in opts)\n            throw new Error('options.strict was renamed to lowS');\n        const { lowS, prehash } = opts;\n        let _sig = undefined;\n        let P;\n        try {\n            if (typeof sg === 'string' || ut.isBytes(sg)) {\n                // Signature can be represented in 2 ways: compact (2*nByteLength) & DER (variable-length).\n                // Since DER can also be 2*nByteLength bytes, we check for it first.\n                try {\n                    _sig = Signature.fromDER(sg);\n                }\n                catch (derError) {\n                    if (!(derError instanceof DER.Err))\n                        throw derError;\n                    _sig = Signature.fromCompact(sg);\n                }\n            }\n            else if (typeof sg === 'object' && typeof sg.r === 'bigint' && typeof sg.s === 'bigint') {\n                const { r, s } = sg;\n                _sig = new Signature(r, s);\n            }\n            else {\n                throw new Error('PARSE');\n            }\n            P = Point.fromHex(publicKey);\n        }\n        catch (error) {\n            if (error.message === 'PARSE')\n                throw new Error(`signature must be Signature instance, Uint8Array or hex string`);\n            return false;\n        }\n        if (lowS && _sig.hasHighS())\n            return false;\n        if (prehash)\n            msgHash = CURVE.hash(msgHash);\n        const { r, s } = _sig;\n        const h = bits2int_modN(msgHash); // Cannot use fields methods, since it is group element\n        const is = invN(s); // s^-1\n        const u1 = modN(h * is); // u1 = hs^-1 mod n\n        const u2 = modN(r * is); // u2 = rs^-1 mod n\n        const R = Point.BASE.multiplyAndAddUnsafe(P, u1, u2)?.toAffine(); // R = u1⋅G + u2⋅P\n        if (!R)\n            return false;\n        const v = modN(R.x);\n        return v === r;\n    }\n    return {\n        CURVE,\n        getPublicKey,\n        getSharedSecret,\n        sign,\n        verify,\n        ProjectivePoint: Point,\n        Signature,\n        utils,\n    };\n}\n/**\n * Implementation of the Shallue and van de Woestijne method for any weierstrass curve.\n * TODO: check if there is a way to merge this with uvRatio in Edwards; move to modular.\n * b = True and y = sqrt(u / v) if (u / v) is square in F, and\n * b = False and y = sqrt(Z * (u / v)) otherwise.\n * @param Fp\n * @param Z\n * @returns\n */\nexport function SWUFpSqrtRatio(Fp, Z) {\n    // Generic implementation\n    const q = Fp.ORDER;\n    let l = _0n;\n    for (let o = q - _1n; o % _2n === _0n; o /= _2n)\n        l += _1n;\n    const c1 = l; // 1. c1, the largest integer such that 2^c1 divides q - 1.\n    // We need 2n ** c1 and 2n ** (c1-1). We can't use **; but we can use <<.\n    // 2n ** c1 == 2n << (c1-1)\n    const _2n_pow_c1_1 = _2n << (c1 - _1n - _1n);\n    const _2n_pow_c1 = _2n_pow_c1_1 * _2n;\n    const c2 = (q - _1n) / _2n_pow_c1; // 2. c2 = (q - 1) / (2^c1)  # Integer arithmetic\n    const c3 = (c2 - _1n) / _2n; // 3. c3 = (c2 - 1) / 2            # Integer arithmetic\n    const c4 = _2n_pow_c1 - _1n; // 4. c4 = 2^c1 - 1                # Integer arithmetic\n    const c5 = _2n_pow_c1_1; // 5. c5 = 2^(c1 - 1)                  # Integer arithmetic\n    const c6 = Fp.pow(Z, c2); // 6. c6 = Z^c2\n    const c7 = Fp.pow(Z, (c2 + _1n) / _2n); // 7. c7 = Z^((c2 + 1) / 2)\n    let sqrtRatio = (u, v) => {\n        let tv1 = c6; // 1. tv1 = c6\n        let tv2 = Fp.pow(v, c4); // 2. tv2 = v^c4\n        let tv3 = Fp.sqr(tv2); // 3. tv3 = tv2^2\n        tv3 = Fp.mul(tv3, v); // 4. tv3 = tv3 * v\n        let tv5 = Fp.mul(u, tv3); // 5. tv5 = u * tv3\n        tv5 = Fp.pow(tv5, c3); // 6. tv5 = tv5^c3\n        tv5 = Fp.mul(tv5, tv2); // 7. tv5 = tv5 * tv2\n        tv2 = Fp.mul(tv5, v); // 8. tv2 = tv5 * v\n        tv3 = Fp.mul(tv5, u); // 9. tv3 = tv5 * u\n        let tv4 = Fp.mul(tv3, tv2); // 10. tv4 = tv3 * tv2\n        tv5 = Fp.pow(tv4, c5); // 11. tv5 = tv4^c5\n        let isQR = Fp.eql(tv5, Fp.ONE); // 12. isQR = tv5 == 1\n        tv2 = Fp.mul(tv3, c7); // 13. tv2 = tv3 * c7\n        tv5 = Fp.mul(tv4, tv1); // 14. tv5 = tv4 * tv1\n        tv3 = Fp.cmov(tv2, tv3, isQR); // 15. tv3 = CMOV(tv2, tv3, isQR)\n        tv4 = Fp.cmov(tv5, tv4, isQR); // 16. tv4 = CMOV(tv5, tv4, isQR)\n        // 17. for i in (c1, c1 - 1, ..., 2):\n        for (let i = c1; i > _1n; i--) {\n            let tv5 = i - _2n; // 18.    tv5 = i - 2\n            tv5 = _2n << (tv5 - _1n); // 19.    tv5 = 2^tv5\n            let tvv5 = Fp.pow(tv4, tv5); // 20.    tv5 = tv4^tv5\n            const e1 = Fp.eql(tvv5, Fp.ONE); // 21.    e1 = tv5 == 1\n            tv2 = Fp.mul(tv3, tv1); // 22.    tv2 = tv3 * tv1\n            tv1 = Fp.mul(tv1, tv1); // 23.    tv1 = tv1 * tv1\n            tvv5 = Fp.mul(tv4, tv1); // 24.    tv5 = tv4 * tv1\n            tv3 = Fp.cmov(tv2, tv3, e1); // 25.    tv3 = CMOV(tv2, tv3, e1)\n            tv4 = Fp.cmov(tvv5, tv4, e1); // 26.    tv4 = CMOV(tv5, tv4, e1)\n        }\n        return { isValid: isQR, value: tv3 };\n    };\n    if (Fp.ORDER % _4n === _3n) {\n        // sqrt_ratio_3mod4(u, v)\n        const c1 = (Fp.ORDER - _3n) / _4n; // 1. c1 = (q - 3) / 4     # Integer arithmetic\n        const c2 = Fp.sqrt(Fp.neg(Z)); // 2. c2 = sqrt(-Z)\n        sqrtRatio = (u, v) => {\n            let tv1 = Fp.sqr(v); // 1. tv1 = v^2\n            const tv2 = Fp.mul(u, v); // 2. tv2 = u * v\n            tv1 = Fp.mul(tv1, tv2); // 3. tv1 = tv1 * tv2\n            let y1 = Fp.pow(tv1, c1); // 4. y1 = tv1^c1\n            y1 = Fp.mul(y1, tv2); // 5. y1 = y1 * tv2\n            const y2 = Fp.mul(y1, c2); // 6. y2 = y1 * c2\n            const tv3 = Fp.mul(Fp.sqr(y1), v); // 7. tv3 = y1^2; 8. tv3 = tv3 * v\n            const isQR = Fp.eql(tv3, u); // 9. isQR = tv3 == u\n            let y = Fp.cmov(y2, y1, isQR); // 10. y = CMOV(y2, y1, isQR)\n            return { isValid: isQR, value: y }; // 11. return (isQR, y) isQR ? y : y*c2\n        };\n    }\n    // No curves uses that\n    // if (Fp.ORDER % _8n === _5n) // sqrt_ratio_5mod8\n    return sqrtRatio;\n}\n/**\n * Simplified Shallue-van de Woestijne-Ulas Method\n * https://www.rfc-editor.org/rfc/rfc9380#section-6.6.2\n */\nexport function mapToCurveSimpleSWU(Fp, opts) {\n    mod.validateField(Fp);\n    if (!Fp.isValid(opts.A) || !Fp.isValid(opts.B) || !Fp.isValid(opts.Z))\n        throw new Error('mapToCurveSimpleSWU: invalid opts');\n    const sqrtRatio = SWUFpSqrtRatio(Fp, opts.Z);\n    if (!Fp.isOdd)\n        throw new Error('Fp.isOdd is not implemented!');\n    // Input: u, an element of F.\n    // Output: (x, y), a point on E.\n    return (u) => {\n        // prettier-ignore\n        let tv1, tv2, tv3, tv4, tv5, tv6, x, y;\n        tv1 = Fp.sqr(u); // 1.  tv1 = u^2\n        tv1 = Fp.mul(tv1, opts.Z); // 2.  tv1 = Z * tv1\n        tv2 = Fp.sqr(tv1); // 3.  tv2 = tv1^2\n        tv2 = Fp.add(tv2, tv1); // 4.  tv2 = tv2 + tv1\n        tv3 = Fp.add(tv2, Fp.ONE); // 5.  tv3 = tv2 + 1\n        tv3 = Fp.mul(tv3, opts.B); // 6.  tv3 = B * tv3\n        tv4 = Fp.cmov(opts.Z, Fp.neg(tv2), !Fp.eql(tv2, Fp.ZERO)); // 7.  tv4 = CMOV(Z, -tv2, tv2 != 0)\n        tv4 = Fp.mul(tv4, opts.A); // 8.  tv4 = A * tv4\n        tv2 = Fp.sqr(tv3); // 9.  tv2 = tv3^2\n        tv6 = Fp.sqr(tv4); // 10. tv6 = tv4^2\n        tv5 = Fp.mul(tv6, opts.A); // 11. tv5 = A * tv6\n        tv2 = Fp.add(tv2, tv5); // 12. tv2 = tv2 + tv5\n        tv2 = Fp.mul(tv2, tv3); // 13. tv2 = tv2 * tv3\n        tv6 = Fp.mul(tv6, tv4); // 14. tv6 = tv6 * tv4\n        tv5 = Fp.mul(tv6, opts.B); // 15. tv5 = B * tv6\n        tv2 = Fp.add(tv2, tv5); // 16. tv2 = tv2 + tv5\n        x = Fp.mul(tv1, tv3); // 17.   x = tv1 * tv3\n        const { isValid, value } = sqrtRatio(tv2, tv6); // 18. (is_gx1_square, y1) = sqrt_ratio(tv2, tv6)\n        y = Fp.mul(tv1, u); // 19.   y = tv1 * u  -> Z * u^3 * y1\n        y = Fp.mul(y, value); // 20.   y = y * y1\n        x = Fp.cmov(x, tv3, isValid); // 21.   x = CMOV(x, tv3, is_gx1_square)\n        y = Fp.cmov(y, value, isValid); // 22.   y = CMOV(y, y1, is_gx1_square)\n        const e1 = Fp.isOdd(u) === Fp.isOdd(y); // 23.  e1 = sgn0(u) == sgn0(y)\n        y = Fp.cmov(Fp.neg(y), y, e1); // 24.   y = CMOV(-y, y, e1)\n        x = Fp.div(x, tv4); // 25.   x = x / tv4\n        return { x, y };\n    };\n}\n//# sourceMappingURL=weierstrass.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nimport { hmac } from '@noble/hashes/hmac';\nimport { concatBytes, randomBytes } from '@noble/hashes/utils';\nimport { weierstrass } from './abstract/weierstrass.js';\n// connects noble-curves to noble-hashes\nexport function getHash(hash) {\n    return {\n        hash,\n        hmac: (key, ...msgs) => hmac(hash, key, concatBytes(...msgs)),\n        randomBytes,\n    };\n}\nexport function createCurve(curveDef, defHash) {\n    const create = (hash) => weierstrass({ ...curveDef, ...getHash(hash) });\n    return Object.freeze({ ...create(defHash), create });\n}\n//# sourceMappingURL=_shortw_utils.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nimport { sha256 } from '@noble/hashes/sha256';\nimport { randomBytes } from '@noble/hashes/utils';\nimport { createCurve } from './_shortw_utils.js';\nimport { createHasher, isogenyMap } from './abstract/hash-to-curve.js';\nimport { Field, mod, pow2 } from './abstract/modular.js';\nimport { bytesToNumberBE, concatBytes, ensureBytes, numberToBytesBE } from './abstract/utils.js';\nimport { mapToCurveSimpleSWU } from './abstract/weierstrass.js';\nconst secp256k1P = BigInt('0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f');\nconst secp256k1N = BigInt('0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141');\nconst _1n = BigInt(1);\nconst _2n = BigInt(2);\nconst divNearest = (a, b) => (a + b / _2n) / b;\n/**\n * √n = n^((p+1)/4) for fields p = 3 mod 4. We unwrap the loop and multiply bit-by-bit.\n * (P+1n/4n).toString(2) would produce bits [223x 1, 0, 22x 1, 4x 0, 11, 00]\n */\nfunction sqrtMod(y) {\n    const P = secp256k1P;\n    // prettier-ignore\n    const _3n = BigInt(3), _6n = BigInt(6), _11n = BigInt(11), _22n = BigInt(22);\n    // prettier-ignore\n    const _23n = BigInt(23), _44n = BigInt(44), _88n = BigInt(88);\n    const b2 = (y * y * y) % P; // x^3, 11\n    const b3 = (b2 * b2 * y) % P; // x^7\n    const b6 = (pow2(b3, _3n, P) * b3) % P;\n    const b9 = (pow2(b6, _3n, P) * b3) % P;\n    const b11 = (pow2(b9, _2n, P) * b2) % P;\n    const b22 = (pow2(b11, _11n, P) * b11) % P;\n    const b44 = (pow2(b22, _22n, P) * b22) % P;\n    const b88 = (pow2(b44, _44n, P) * b44) % P;\n    const b176 = (pow2(b88, _88n, P) * b88) % P;\n    const b220 = (pow2(b176, _44n, P) * b44) % P;\n    const b223 = (pow2(b220, _3n, P) * b3) % P;\n    const t1 = (pow2(b223, _23n, P) * b22) % P;\n    const t2 = (pow2(t1, _6n, P) * b2) % P;\n    const root = pow2(t2, _2n, P);\n    if (!Fp.eql(Fp.sqr(root), y))\n        throw new Error('Cannot find square root');\n    return root;\n}\nconst Fp = Field(secp256k1P, undefined, undefined, { sqrt: sqrtMod });\nexport const secp256k1 = createCurve({\n    a: BigInt(0), // equation params: a, b\n    b: BigInt(7), // Seem to be rigid: bitcointalk.org/index.php?topic=289795.msg3183975#msg3183975\n    Fp, // Field's prime: 2n**256n - 2n**32n - 2n**9n - 2n**8n - 2n**7n - 2n**6n - 2n**4n - 1n\n    n: secp256k1N, // Curve order, total count of valid points in the field\n    // Base point (x, y) aka generator point\n    Gx: BigInt('55066263022277343669578718895168534326250603453777594175500187360389116729240'),\n    Gy: BigInt('32670510020758816978083085130507043184471273380659243275938904335757337482424'),\n    h: BigInt(1), // Cofactor\n    lowS: true, // Allow only low-S signatures by default in sign() and verify()\n    /**\n     * secp256k1 belongs to Koblitz curves: it has efficiently computable endomorphism.\n     * Endomorphism uses 2x less RAM, speeds up precomputation by 2x and ECDH / key recovery by 20%.\n     * For precomputed wNAF it trades off 1/2 init time & 1/3 ram for 20% perf hit.\n     * Explanation: https://gist.github.com/paulmillr/eb670806793e84df628a7c434a873066\n     */\n    endo: {\n        beta: BigInt('0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee'),\n        splitScalar: (k) => {\n            const n = secp256k1N;\n            const a1 = BigInt('0x3086d221a7d46bcde86c90e49284eb15');\n            const b1 = -_1n * BigInt('0xe4437ed6010e88286f547fa90abfe4c3');\n            const a2 = BigInt('0x114ca50f7a8e2f3f657c1108d9d44cfd8');\n            const b2 = a1;\n            const POW_2_128 = BigInt('0x100000000000000000000000000000000'); // (2n**128n).toString(16)\n            const c1 = divNearest(b2 * k, n);\n            const c2 = divNearest(-b1 * k, n);\n            let k1 = mod(k - c1 * a1 - c2 * a2, n);\n            let k2 = mod(-c1 * b1 - c2 * b2, n);\n            const k1neg = k1 > POW_2_128;\n            const k2neg = k2 > POW_2_128;\n            if (k1neg)\n                k1 = n - k1;\n            if (k2neg)\n                k2 = n - k2;\n            if (k1 > POW_2_128 || k2 > POW_2_128) {\n                throw new Error('splitScalar: Endomorphism failed, k=' + k);\n            }\n            return { k1neg, k1, k2neg, k2 };\n        },\n    },\n}, sha256);\n// Schnorr signatures are superior to ECDSA from above. Below is Schnorr-specific BIP0340 code.\n// https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki\nconst _0n = BigInt(0);\nconst fe = (x) => typeof x === 'bigint' && _0n < x && x < secp256k1P;\nconst ge = (x) => typeof x === 'bigint' && _0n < x && x < secp256k1N;\n/** An object mapping tags to their tagged hash prefix of [SHA256(tag) | SHA256(tag)] */\nconst TAGGED_HASH_PREFIXES = {};\nfunction taggedHash(tag, ...messages) {\n    let tagP = TAGGED_HASH_PREFIXES[tag];\n    if (tagP === undefined) {\n        const tagH = sha256(Uint8Array.from(tag, (c) => c.charCodeAt(0)));\n        tagP = concatBytes(tagH, tagH);\n        TAGGED_HASH_PREFIXES[tag] = tagP;\n    }\n    return sha256(concatBytes(tagP, ...messages));\n}\n// ECDSA compact points are 33-byte. Schnorr is 32: we strip first byte 0x02 or 0x03\nconst pointToBytes = (point) => point.toRawBytes(true).slice(1);\nconst numTo32b = (n) => numberToBytesBE(n, 32);\nconst modP = (x) => mod(x, secp256k1P);\nconst modN = (x) => mod(x, secp256k1N);\nconst Point = secp256k1.ProjectivePoint;\nconst GmulAdd = (Q, a, b) => Point.BASE.multiplyAndAddUnsafe(Q, a, b);\n// Calculate point, scalar and bytes\nfunction schnorrGetExtPubKey(priv) {\n    let d_ = secp256k1.utils.normPrivateKeyToScalar(priv); // same method executed in fromPrivateKey\n    let p = Point.fromPrivateKey(d_); // P = d'⋅G; 0 < d' < n check is done inside\n    const scalar = p.hasEvenY() ? d_ : modN(-d_);\n    return { scalar: scalar, bytes: pointToBytes(p) };\n}\n/**\n * lift_x from BIP340. Convert 32-byte x coordinate to elliptic curve point.\n * @returns valid point checked for being on-curve\n */\nfunction lift_x(x) {\n    if (!fe(x))\n        throw new Error('bad x: need 0 < x < p'); // Fail if x ≥ p.\n    const xx = modP(x * x);\n    const c = modP(xx * x + BigInt(7)); // Let c = x³ + 7 mod p.\n    let y = sqrtMod(c); // Let y = c^(p+1)/4 mod p.\n    if (y % _2n !== _0n)\n        y = modP(-y); // Return the unique point P such that x(P) = x and\n    const p = new Point(x, y, _1n); // y(P) = y if y mod 2 = 0 or y(P) = p-y otherwise.\n    p.assertValidity();\n    return p;\n}\n/**\n * Create tagged hash, convert it to bigint, reduce modulo-n.\n */\nfunction challenge(...args) {\n    return modN(bytesToNumberBE(taggedHash('BIP0340/challenge', ...args)));\n}\n/**\n * Schnorr public key is just `x` coordinate of Point as per BIP340.\n */\nfunction schnorrGetPublicKey(privateKey) {\n    return schnorrGetExtPubKey(privateKey).bytes; // d'=int(sk). Fail if d'=0 or d'≥n. Ret bytes(d'⋅G)\n}\n/**\n * Creates Schnorr signature as per BIP340. Verifies itself before returning anything.\n * auxRand is optional and is not the sole source of k generation: bad CSPRNG won't be dangerous.\n */\nfunction schnorrSign(message, privateKey, auxRand = randomBytes(32)) {\n    const m = ensureBytes('message', message);\n    const { bytes: px, scalar: d } = schnorrGetExtPubKey(privateKey); // checks for isWithinCurveOrder\n    const a = ensureBytes('auxRand', auxRand, 32); // Auxiliary random data a: a 32-byte array\n    const t = numTo32b(d ^ bytesToNumberBE(taggedHash('BIP0340/aux', a))); // Let t be the byte-wise xor of bytes(d) and hash/aux(a)\n    const rand = taggedHash('BIP0340/nonce', t, px, m); // Let rand = hash/nonce(t || bytes(P) || m)\n    const k_ = modN(bytesToNumberBE(rand)); // Let k' = int(rand) mod n\n    if (k_ === _0n)\n        throw new Error('sign failed: k is zero'); // Fail if k' = 0.\n    const { bytes: rx, scalar: k } = schnorrGetExtPubKey(k_); // Let R = k'⋅G.\n    const e = challenge(rx, px, m); // Let e = int(hash/challenge(bytes(R) || bytes(P) || m)) mod n.\n    const sig = new Uint8Array(64); // Let sig = bytes(R) || bytes((k + ed) mod n).\n    sig.set(rx, 0);\n    sig.set(numTo32b(modN(k + e * d)), 32);\n    // If Verify(bytes(P), m, sig) (see below) returns failure, abort\n    if (!schnorrVerify(sig, m, px))\n        throw new Error('sign: Invalid signature produced');\n    return sig;\n}\n/**\n * Verifies Schnorr signature.\n * Will swallow errors & return false except for initial type validation of arguments.\n */\nfunction schnorrVerify(signature, message, publicKey) {\n    const sig = ensureBytes('signature', signature, 64);\n    const m = ensureBytes('message', message);\n    const pub = ensureBytes('publicKey', publicKey, 32);\n    try {\n        const P = lift_x(bytesToNumberBE(pub)); // P = lift_x(int(pk)); fail if that fails\n        const r = bytesToNumberBE(sig.subarray(0, 32)); // Let r = int(sig[0:32]); fail if r ≥ p.\n        if (!fe(r))\n            return false;\n        const s = bytesToNumberBE(sig.subarray(32, 64)); // Let s = int(sig[32:64]); fail if s ≥ n.\n        if (!ge(s))\n            return false;\n        const e = challenge(numTo32b(r), pointToBytes(P), m); // int(challenge(bytes(r)||bytes(P)||m))%n\n        const R = GmulAdd(P, s, modN(-e)); // R = s⋅G - e⋅P\n        if (!R || !R.hasEvenY() || R.toAffine().x !== r)\n            return false; // -eP == (n-e)P\n        return true; // Fail if is_infinite(R) / not has_even_y(R) / x(R) ≠ r.\n    }\n    catch (error) {\n        return false;\n    }\n}\nexport const schnorr = /* @__PURE__ */ (() => ({\n    getPublicKey: schnorrGetPublicKey,\n    sign: schnorrSign,\n    verify: schnorrVerify,\n    utils: {\n        randomPrivateKey: secp256k1.utils.randomPrivateKey,\n        lift_x,\n        pointToBytes,\n        numberToBytesBE,\n        bytesToNumberBE,\n        taggedHash,\n        mod,\n    },\n}))();\nconst isoMap = /* @__PURE__ */ (() => isogenyMap(Fp, [\n    // xNum\n    [\n        '0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7',\n        '0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581',\n        '0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262',\n        '0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c',\n    ],\n    // xDen\n    [\n        '0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b',\n        '0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14',\n        '0x0000000000000000000000000000000000000000000000000000000000000001', // LAST 1\n    ],\n    // yNum\n    [\n        '0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c',\n        '0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3',\n        '0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931',\n        '0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84',\n    ],\n    // yDen\n    [\n        '0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b',\n        '0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573',\n        '0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f',\n        '0x0000000000000000000000000000000000000000000000000000000000000001', // LAST 1\n    ],\n].map((i) => i.map((j) => BigInt(j)))))();\nconst mapSWU = /* @__PURE__ */ (() => mapToCurveSimpleSWU(Fp, {\n    A: BigInt('0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533'),\n    B: BigInt('1771'),\n    Z: Fp.create(BigInt('-11')),\n}))();\nconst htf = /* @__PURE__ */ (() => createHasher(secp256k1.ProjectivePoint, (scalars) => {\n    const { x, y } = mapSWU(Fp.create(scalars[0]));\n    return isoMap(x, y);\n}, {\n    DST: 'secp256k1_XMD:SHA-256_SSWU_RO_',\n    encodeDST: 'secp256k1_XMD:SHA-256_SSWU_NU_',\n    p: Fp.ORDER,\n    m: 1,\n    k: 128,\n    expand: 'xmd',\n    hash: sha256,\n}))();\nexport const hashToCurve = /* @__PURE__ */ (() => htf.hashToCurve)();\nexport const encodeToCurve = /* @__PURE__ */ (() => htf.encodeToCurve)();\n//# sourceMappingURL=secp256k1.js.map","var _a;\n/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\n// eslint-disable-next-line import/extensions\nimport * as ethereumCryptography from 'ethereum-cryptography/secp256k1.js';\nexport const secp256k1 = (_a = ethereumCryptography.secp256k1) !== null && _a !== void 0 ? _a : ethereumCryptography;\n/**\n * 2^64-1\n */\nexport const MAX_UINT64 = BigInt('0xffffffffffffffff');\n/**\n * The max integer that the evm can handle (2^256-1)\n */\nexport const MAX_INTEGER = BigInt('0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff');\nexport const SECP256K1_ORDER = secp256k1.CURVE.n;\nexport const SECP256K1_ORDER_DIV_2 = SECP256K1_ORDER / BigInt(2);\n//# sourceMappingURL=constants.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nexport const keyStoreSchema = {\n    type: 'object',\n    required: ['crypto', 'id', 'version', 'address'],\n    properties: {\n        crypto: {\n            type: 'object',\n            required: ['cipher', 'ciphertext', 'cipherparams', 'kdf', 'kdfparams', 'mac'],\n            properties: {\n                cipher: { type: 'string' },\n                ciphertext: { type: 'string' },\n                cipherparams: { type: 'object' },\n                kdf: { type: 'string' },\n                kdfparams: { type: 'object' },\n                salt: { type: 'string' },\n                mac: { type: 'string' },\n            },\n        },\n        id: { type: 'string' },\n        version: { type: 'number' },\n        address: { type: 'string' },\n    },\n};\n//# sourceMappingURL=schemas.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nexport var Chain;\n(function (Chain) {\n    Chain[Chain[\"Mainnet\"] = 1] = \"Mainnet\";\n    Chain[Chain[\"Goerli\"] = 5] = \"Goerli\";\n    Chain[Chain[\"Sepolia\"] = 11155111] = \"Sepolia\";\n})(Chain || (Chain = {}));\nexport var Hardfork;\n(function (Hardfork) {\n    Hardfork[\"Chainstart\"] = \"chainstart\";\n    Hardfork[\"Homestead\"] = \"homestead\";\n    Hardfork[\"Dao\"] = \"dao\";\n    Hardfork[\"TangerineWhistle\"] = \"tangerineWhistle\";\n    Hardfork[\"SpuriousDragon\"] = \"spuriousDragon\";\n    Hardfork[\"Byzantium\"] = \"byzantium\";\n    Hardfork[\"Constantinople\"] = \"constantinople\";\n    Hardfork[\"Petersburg\"] = \"petersburg\";\n    Hardfork[\"Istanbul\"] = \"istanbul\";\n    Hardfork[\"MuirGlacier\"] = \"muirGlacier\";\n    Hardfork[\"Berlin\"] = \"berlin\";\n    Hardfork[\"London\"] = \"london\";\n    Hardfork[\"ArrowGlacier\"] = \"arrowGlacier\";\n    Hardfork[\"GrayGlacier\"] = \"grayGlacier\";\n    Hardfork[\"MergeForkIdTransition\"] = \"mergeForkIdTransition\";\n    Hardfork[\"Merge\"] = \"merge\";\n    Hardfork[\"Shanghai\"] = \"shanghai\";\n    Hardfork[\"ShardingForkDev\"] = \"shardingFork\";\n})(Hardfork || (Hardfork = {}));\nexport var ConsensusType;\n(function (ConsensusType) {\n    ConsensusType[\"ProofOfStake\"] = \"pos\";\n    ConsensusType[\"ProofOfWork\"] = \"pow\";\n    ConsensusType[\"ProofOfAuthority\"] = \"poa\";\n})(ConsensusType || (ConsensusType = {}));\nexport var ConsensusAlgorithm;\n(function (ConsensusAlgorithm) {\n    ConsensusAlgorithm[\"Ethash\"] = \"ethash\";\n    ConsensusAlgorithm[\"Clique\"] = \"clique\";\n    ConsensusAlgorithm[\"Casper\"] = \"casper\";\n})(ConsensusAlgorithm || (ConsensusAlgorithm = {}));\nexport var CustomChain;\n(function (CustomChain) {\n    /**\n     * Polygon (Matic) Mainnet\n     *\n     * - [Documentation](https://docs.matic.network/docs/develop/network-details/network)\n     */\n    CustomChain[\"PolygonMainnet\"] = \"polygon-mainnet\";\n    /**\n     * Polygon (Matic) Mumbai Testnet\n     *\n     * - [Documentation](https://docs.matic.network/docs/develop/network-details/network)\n     */\n    CustomChain[\"PolygonMumbai\"] = \"polygon-mumbai\";\n    /**\n     * Arbitrum Rinkeby Testnet\n     *\n     * - [Documentation](https://developer.offchainlabs.com/docs/public_testnet)\n     */\n    CustomChain[\"ArbitrumRinkebyTestnet\"] = \"arbitrum-rinkeby-testnet\";\n    /**\n     * Arbitrum One - mainnet for Arbitrum roll-up\n     *\n     * - [Documentation](https://developer.offchainlabs.com/public-chains)\n     */\n    CustomChain[\"ArbitrumOne\"] = \"arbitrum-one\";\n    /**\n     * xDai EVM sidechain with a native stable token\n     *\n     * - [Documentation](https://www.xdaichain.com/)\n     */\n    CustomChain[\"xDaiChain\"] = \"x-dai-chain\";\n    /**\n     * Optimistic Kovan - testnet for Optimism roll-up\n     *\n     * - [Documentation](https://community.optimism.io/docs/developers/tutorials.html)\n     */\n    CustomChain[\"OptimisticKovan\"] = \"optimistic-kovan\";\n    /**\n     * Optimistic Ethereum - mainnet for Optimism roll-up\n     *\n     * - [Documentation](https://community.optimism.io/docs/developers/tutorials.html)\n     */\n    CustomChain[\"OptimisticEthereum\"] = \"optimistic-ethereum\";\n})(CustomChain || (CustomChain = {}));\n//# sourceMappingURL=enums.js.map","/**\n * Type output options\n */\nexport var TypeOutput;\n(function (TypeOutput) {\n    TypeOutput[TypeOutput[\"Number\"] = 0] = \"Number\";\n    TypeOutput[TypeOutput[\"BigInt\"] = 1] = \"BigInt\";\n    TypeOutput[TypeOutput[\"Uint8Array\"] = 2] = \"Uint8Array\";\n    TypeOutput[TypeOutput[\"PrefixedHexString\"] = 3] = \"PrefixedHexString\";\n})(TypeOutput || (TypeOutput = {}));\n//# sourceMappingURL=types.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { isHexPrefixed, isHexString } from 'web3-validator';\nimport { bytesToHex, hexToBytes, isUint8Array, numberToHex } from 'web3-utils';\nimport { secp256k1 } from '../tx/constants.js';\nimport { Hardfork } from './enums.js';\nimport { TypeOutput } from './types.js';\n/**\n * Removes '0x' from a given `String` if present\n * @param str the string value\n * @returns the string without 0x prefix\n */\nexport const stripHexPrefix = (str) => {\n    if (typeof str !== 'string')\n        throw new Error(`[stripHexPrefix] input must be type 'string', received ${typeof str}`);\n    return isHexPrefixed(str) ? str.slice(2) : str;\n};\n/**\n * Transforms Geth formatted nonce (i.e. hex string) to 8 byte 0x-prefixed string used internally\n * @param nonce string parsed from the Geth genesis file\n * @returns nonce as a 0x-prefixed 8 byte string\n */\nfunction formatNonce(nonce) {\n    if (!nonce || nonce === '0x0') {\n        return '0x0000000000000000';\n    }\n    if (isHexPrefixed(nonce)) {\n        return `0x${stripHexPrefix(nonce).padStart(16, '0')}`;\n    }\n    return `0x${nonce.padStart(16, '0')}`;\n}\n/**\n * Converts a `Number` into a hex `String`\n * @param {Number} i\n * @return {String}\n */\nconst intToHex = function (i) {\n    if (!Number.isSafeInteger(i) || i < 0) {\n        throw new Error(`Received an invalid integer type: ${i}`);\n    }\n    return `0x${i.toString(16)}`;\n};\n/**\n * Converts Geth genesis parameters to an EthereumJS compatible `CommonOpts` object\n * @param json object representing the Geth genesis file\n * @param optional mergeForkIdPostMerge which clarifies the placement of MergeForkIdTransition\n * hardfork, which by default is post merge as with the merged eth networks but could also come\n * before merge like in kiln genesis\n * @returns genesis parameters in a `CommonOpts` compliant object\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction parseGethParams(json, mergeForkIdPostMerge = true) {\n    var _a, _b;\n    // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n    const { name, config, difficulty, mixHash, gasLimit, coinbase, baseFeePerGas, } = json;\n    // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n    let { extraData, timestamp, nonce } = json;\n    const genesisTimestamp = Number(timestamp);\n    // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n    const { chainId } = config;\n    // geth is not strictly putting empty fields with a 0x prefix\n    if (extraData === '') {\n        extraData = '0x';\n    }\n    // geth may use number for timestamp\n    if (!isHexPrefixed(timestamp)) {\n        // eslint-disable-next-line radix\n        timestamp = intToHex(parseInt(timestamp));\n    }\n    // geth may not give us a nonce strictly formatted to an 8 byte hex string\n    if (nonce.length !== 18) {\n        nonce = formatNonce(nonce);\n    }\n    // EIP155 and EIP158 are both part of Spurious Dragon hardfork and must occur at the same time\n    // but have different configuration parameters in geth genesis parameters\n    // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n    if (config.eip155Block !== config.eip158Block) {\n        throw new Error('EIP155 block number must equal EIP 158 block number since both are part of SpuriousDragon hardfork and the client only supports activating the full hardfork');\n    }\n    const params = {\n        name,\n        chainId,\n        networkId: chainId,\n        genesis: {\n            timestamp,\n            // eslint-disable-next-line radix\n            gasLimit: parseInt(gasLimit), // geth gasLimit and difficulty are hex strings while ours are `number`s\n            // eslint-disable-next-line radix\n            difficulty: parseInt(difficulty),\n            nonce,\n            extraData,\n            mixHash,\n            coinbase,\n            baseFeePerGas,\n        },\n        hardfork: undefined,\n        hardforks: [],\n        bootstrapNodes: [],\n        consensus: \n        // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n        config.clique !== undefined\n            ? {\n                type: 'poa',\n                algorithm: 'clique',\n                clique: {\n                    // The recent geth genesis seems to be using blockperiodseconds\n                    // and epochlength for clique specification\n                    // see: https://hackmd.io/PqZgMpnkSWCWv5joJoFymQ\n                    // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment\n                    period: (_a = config.clique.period) !== null && _a !== void 0 ? _a : config.clique.blockperiodseconds,\n                    // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,  @typescript-eslint/no-unsafe-assignment\n                    epoch: (_b = config.clique.epoch) !== null && _b !== void 0 ? _b : config.clique.epochlength,\n                },\n            }\n            : {\n                type: 'pow',\n                algorithm: 'ethash',\n                ethash: {},\n            },\n    };\n    const forkMap = {\n        [Hardfork.Homestead]: { name: 'homesteadBlock' },\n        [Hardfork.Dao]: { name: 'daoForkBlock' },\n        [Hardfork.TangerineWhistle]: { name: 'eip150Block' },\n        [Hardfork.SpuriousDragon]: { name: 'eip155Block' },\n        [Hardfork.Byzantium]: { name: 'byzantiumBlock' },\n        [Hardfork.Constantinople]: { name: 'constantinopleBlock' },\n        [Hardfork.Petersburg]: { name: 'petersburgBlock' },\n        [Hardfork.Istanbul]: { name: 'istanbulBlock' },\n        [Hardfork.MuirGlacier]: { name: 'muirGlacierBlock' },\n        [Hardfork.Berlin]: { name: 'berlinBlock' },\n        [Hardfork.London]: { name: 'londonBlock' },\n        [Hardfork.MergeForkIdTransition]: {\n            name: 'mergeForkBlock',\n            postMerge: mergeForkIdPostMerge,\n        },\n        [Hardfork.Shanghai]: { name: 'shanghaiTime', postMerge: true, isTimestamp: true },\n        [Hardfork.ShardingForkDev]: {\n            name: 'shardingForkTime',\n            postMerge: true,\n            isTimestamp: true,\n        },\n    };\n    // forkMapRev is the map from config field name to Hardfork\n    const forkMapRev = Object.keys(forkMap).reduce((acc, elem) => {\n        acc[forkMap[elem].name] = elem;\n        return acc;\n    }, {});\n    // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n    const configHardforkNames = Object.keys(config).filter(\n    // eslint-disable-next-line no-null/no-null, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/prefer-optional-chain\n    key => forkMapRev[key] !== undefined && config[key] !== undefined && config[key] !== null);\n    params.hardforks = configHardforkNames\n        .map(nameBlock => ({\n        name: forkMapRev[nameBlock],\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n        block: \n        // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n        forkMap[forkMapRev[nameBlock]].isTimestamp === true ||\n            // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n            typeof config[nameBlock] !== 'number'\n            ? // eslint-disable-next-line no-null/no-null\n                null\n            : // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n                config[nameBlock],\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n        timestamp: \n        // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n        forkMap[forkMapRev[nameBlock]].isTimestamp === true &&\n            // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n            typeof config[nameBlock] === 'number'\n            ? // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n                config[nameBlock]\n            : undefined,\n    }))\n        // eslint-disable-next-line no-null/no-null\n        .filter(fork => fork.block !== null || fork.timestamp !== undefined);\n    params.hardforks.sort((a, b) => { var _a, _b; return ((_a = a.block) !== null && _a !== void 0 ? _a : Infinity) - ((_b = b.block) !== null && _b !== void 0 ? _b : Infinity); });\n    params.hardforks.sort((a, b) => { var _a, _b; return ((_a = a.timestamp) !== null && _a !== void 0 ? _a : genesisTimestamp) - ((_b = b.timestamp) !== null && _b !== void 0 ? _b : genesisTimestamp); });\n    // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n    if (config.terminalTotalDifficulty !== undefined) {\n        // Following points need to be considered for placement of merge hf\n        // - Merge hardfork can't be placed at genesis\n        // - Place merge hf before any hardforks that require CL participation for e.g. withdrawals\n        // - Merge hardfork has to be placed just after genesis if any of the genesis hardforks make CL\n        //   necessary for e.g. withdrawals\n        const mergeConfig = {\n            name: Hardfork.Merge,\n            // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment\n            ttd: config.terminalTotalDifficulty,\n            // eslint-disable-next-line no-null/no-null\n            block: null,\n        };\n        // Merge hardfork has to be placed before first hardfork that is dependent on merge\n        const postMergeIndex = params.hardforks.findIndex(\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n        hf => { var _a; return ((_a = forkMap[hf.name]) === null || _a === void 0 ? void 0 : _a.postMerge) === true; });\n        if (postMergeIndex !== -1) {\n            params.hardforks.splice(postMergeIndex, 0, mergeConfig);\n        }\n        else {\n            params.hardforks.push(mergeConfig);\n        }\n    }\n    const latestHardfork = params.hardforks.length > 0 ? params.hardforks.slice(-1)[0] : undefined;\n    params.hardfork = latestHardfork === null || latestHardfork === void 0 ? void 0 : latestHardfork.name;\n    params.hardforks.unshift({ name: Hardfork.Chainstart, block: 0 });\n    return params;\n}\n/**\n * Parses a genesis.json exported from Geth into parameters for Common instance\n * @param json representing the Geth genesis file\n * @param name optional chain name\n * @returns parsed params\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function parseGethGenesis(json, name, mergeForkIdPostMerge) {\n    try {\n        if (['config', 'difficulty', 'gasLimit', 'alloc'].some(field => !(field in json))) {\n            throw new Error('Invalid format, expected geth genesis fields missing');\n        }\n        if (name !== undefined) {\n            // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, no-param-reassign\n            json.name = name;\n        }\n        return parseGethParams(json, mergeForkIdPostMerge);\n    }\n    catch (e) {\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/restrict-template-expressions\n        throw new Error(`Error parsing parameters file: ${e.message}`);\n    }\n}\n/**\n * Pads a `String` to have an even length\n * @param value\n * @return output\n */\nexport function padToEven(value) {\n    let a = value;\n    if (typeof a !== 'string') {\n        throw new Error(`[padToEven] value must be type 'string', received ${typeof a}`);\n    }\n    if (a.length % 2)\n        a = `0${a}`;\n    return a;\n}\n/**\n * Converts an `Number` to a `Uint8Array`\n * @param {Number} i\n * @return {Uint8Array}\n */\nexport const intToUint8Array = function (i) {\n    const hex = intToHex(i);\n    return hexToBytes(`0x${padToEven(hex.slice(2))}`);\n};\n/**\n * Attempts to turn a value into a `Uint8Array`.\n * Inputs supported: `Uint8Array` `String` (hex-prefixed), `Number`, null/undefined, `BigInt` and other objects\n * with a `toArray()` or `toUint8Array()` method.\n * @param v the value\n */\nexport const toUint8Array = function (v) {\n    var _a;\n    // eslint-disable-next-line no-null/no-null\n    if (v === null || v === undefined) {\n        return new Uint8Array();\n    }\n    if (v instanceof Uint8Array) {\n        return v;\n    }\n    if (((_a = v === null || v === void 0 ? void 0 : v.constructor) === null || _a === void 0 ? void 0 : _a.name) === 'Uint8Array') {\n        return Uint8Array.from(v);\n    }\n    if (Array.isArray(v)) {\n        return Uint8Array.from(v);\n    }\n    if (typeof v === 'string') {\n        if (!isHexString(v)) {\n            throw new Error(`Cannot convert string to Uint8Array. only supports 0x-prefixed hex strings and this string was given: ${v}`);\n        }\n        return hexToBytes(padToEven(stripHexPrefix(v)));\n    }\n    if (typeof v === 'number') {\n        return toUint8Array(numberToHex(v));\n    }\n    if (typeof v === 'bigint') {\n        if (v < BigInt(0)) {\n            throw new Error(`Cannot convert negative bigint to Uint8Array. Given: ${v}`);\n        }\n        let n = v.toString(16);\n        if (n.length % 2)\n            n = `0${n}`;\n        return toUint8Array(`0x${n}`);\n    }\n    if (v.toArray) {\n        // converts a BN to a Uint8Array\n        return Uint8Array.from(v.toArray());\n    }\n    throw new Error('invalid type');\n};\n/**\n * Converts a {@link Uint8Array} to a {@link bigint}\n */\nexport function uint8ArrayToBigInt(buf) {\n    const hex = bytesToHex(buf);\n    if (hex === '0x') {\n        return BigInt(0);\n    }\n    return BigInt(hex);\n}\n/**\n * Converts a {@link bigint} to a {@link Uint8Array}\n */\nexport function bigIntToUint8Array(num) {\n    return toUint8Array(`0x${num.toString(16)}`);\n}\n/**\n * Returns a Uint8Array filled with 0s.\n * @param bytes the number of bytes the Uint8Array should be\n */\nexport const zeros = function (bytes) {\n    return new Uint8Array(bytes).fill(0);\n};\n/**\n * Pads a `Uint8Array` with zeros till it has `length` bytes.\n * Truncates the beginning or end of input if its length exceeds `length`.\n * @param msg the value to pad (Uint8Array)\n * @param length the number of bytes the output should be\n * @param right whether to start padding form the left or right\n * @return (Uint8Array)\n */\nconst setLength = function (msg, length, right) {\n    const buf = zeros(length);\n    if (right) {\n        if (msg.length < length) {\n            buf.set(msg);\n            return buf;\n        }\n        return msg.subarray(0, length);\n    }\n    if (msg.length < length) {\n        buf.set(msg, length - msg.length);\n        return buf;\n    }\n    return msg.subarray(-length);\n};\n/**\n * Throws if input is not a Uint8Array\n * @param {Uint8Array} input value to check\n */\nexport function assertIsUint8Array(input) {\n    if (!isUint8Array(input)) {\n        // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n        const msg = `This method only supports Uint8Array but input was: ${input}`;\n        throw new Error(msg);\n    }\n}\n/**\n * Left Pads a `Uint8Array` with leading zeros till it has `length` bytes.\n * Or it truncates the beginning if it exceeds.\n * @param msg the value to pad (Uint8Array)\n * @param length the number of bytes the output should be\n * @return (Uint8Array)\n */\nexport const setLengthLeft = function (msg, length) {\n    assertIsUint8Array(msg);\n    return setLength(msg, length, false);\n};\n/**\n * Trims leading zeros from a `Uint8Array`, `String` or `Number[]`.\n * @param a (Uint8Array|Array|String)\n * @return (Uint8Array|Array|String)\n */\nexport function stripZeros(a) {\n    // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment\n    let first = a[0];\n    // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call\n    while (a.length > 0 && first.toString() === '0') {\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment, prefer-destructuring, @typescript-eslint/no-unsafe-call, no-param-reassign\n        a = a.slice(1);\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, prefer-destructuring, @typescript-eslint/no-unsafe-member-access\n        first = a[0];\n    }\n    // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n    return a;\n}\n/**\n * Trims leading zeros from a `Uint8Array`.\n * @param a (Uint8Array)\n * @return (Uint8Array)\n */\nexport const unpadUint8Array = function (a) {\n    assertIsUint8Array(a);\n    return stripZeros(a);\n};\n/**\n * Converts a {@link bigint} to a `0x` prefixed hex string\n */\nexport const bigIntToHex = (num) => `0x${num.toString(16)}`;\n/**\n * Convert value from bigint to an unpadded Uint8Array\n * (useful for RLP transport)\n * @param value value to convert\n */\nexport function bigIntToUnpaddedUint8Array(value) {\n    return unpadUint8Array(bigIntToUint8Array(value));\n}\nfunction calculateSigRecovery(v, chainId) {\n    if (v === BigInt(0) || v === BigInt(1))\n        return v;\n    if (chainId === undefined) {\n        return v - BigInt(27);\n    }\n    return v - (chainId * BigInt(2) + BigInt(35));\n}\nfunction isValidSigRecovery(recovery) {\n    return recovery === BigInt(0) || recovery === BigInt(1);\n}\n/**\n * ECDSA public key recovery from signature.\n * NOTE: Accepts `v === 0 | v === 1` for EIP1559 transactions\n * @returns Recovered public key\n */\nexport const ecrecover = function (msgHash, v, r, s, chainId) {\n    const recovery = calculateSigRecovery(v, chainId);\n    if (!isValidSigRecovery(recovery)) {\n        throw new Error('Invalid signature v value');\n    }\n    const senderPubKey = new secp256k1.Signature(uint8ArrayToBigInt(r), uint8ArrayToBigInt(s))\n        .addRecoveryBit(Number(recovery))\n        .recoverPublicKey(msgHash)\n        .toRawBytes(false);\n    return senderPubKey.slice(1);\n};\nexport function toType(input, outputType) {\n    // eslint-disable-next-line no-null/no-null\n    if (input === null) {\n        // eslint-disable-next-line no-null/no-null\n        return null;\n    }\n    if (input === undefined) {\n        return undefined;\n    }\n    if (typeof input === 'string' && !isHexString(input)) {\n        throw new Error(`A string must be provided with a 0x-prefix, given: ${input}`);\n    }\n    else if (typeof input === 'number' && !Number.isSafeInteger(input)) {\n        throw new Error('The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)');\n    }\n    const output = toUint8Array(input);\n    switch (outputType) {\n        case TypeOutput.Uint8Array:\n            return output;\n        case TypeOutput.BigInt:\n            return uint8ArrayToBigInt(output);\n        case TypeOutput.Number: {\n            const bigInt = uint8ArrayToBigInt(output);\n            if (bigInt > BigInt(Number.MAX_SAFE_INTEGER)) {\n                throw new Error('The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)');\n            }\n            return Number(bigInt);\n        }\n        case TypeOutput.PrefixedHexString:\n            return bytesToHex(output);\n        default:\n            throw new Error('unknown outputType');\n    }\n}\n//# sourceMappingURL=utils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RLP = exports.utils = exports.decode = exports.encode = void 0;\n/**\n * RLP Encoding based on https://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp/\n * This function takes in data, converts it to Uint8Array if not,\n * and adds a length for recursion.\n * @param input Will be converted to Uint8Array\n * @returns Uint8Array of encoded data\n **/\nfunction encode(input) {\n    if (Array.isArray(input)) {\n        const output = [];\n        let outputLength = 0;\n        for (let i = 0; i < input.length; i++) {\n            const encoded = encode(input[i]);\n            output.push(encoded);\n            outputLength += encoded.length;\n        }\n        return concatBytes(encodeLength(outputLength, 192), ...output);\n    }\n    const inputBuf = toBytes(input);\n    if (inputBuf.length === 1 && inputBuf[0] < 128) {\n        return inputBuf;\n    }\n    return concatBytes(encodeLength(inputBuf.length, 128), inputBuf);\n}\nexports.encode = encode;\n/**\n * Slices a Uint8Array, throws if the slice goes out-of-bounds of the Uint8Array.\n * E.g. `safeSlice(hexToBytes('aa'), 1, 2)` will throw.\n * @param input\n * @param start\n * @param end\n */\nfunction safeSlice(input, start, end) {\n    if (end > input.length) {\n        throw new Error('invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds');\n    }\n    return input.slice(start, end);\n}\n/**\n * Parse integers. Check if there is no leading zeros\n * @param v The value to parse\n */\nfunction decodeLength(v) {\n    if (v[0] === 0) {\n        throw new Error('invalid RLP: extra zeros');\n    }\n    return parseHexByte(bytesToHex(v));\n}\nfunction encodeLength(len, offset) {\n    if (len < 56) {\n        return Uint8Array.from([len + offset]);\n    }\n    const hexLength = numberToHex(len);\n    const lLength = hexLength.length / 2;\n    const firstByte = numberToHex(offset + 55 + lLength);\n    return Uint8Array.from(hexToBytes(firstByte + hexLength));\n}\nfunction decode(input, stream = false) {\n    if (typeof input === 'undefined' || input === null || input.length === 0) {\n        return Uint8Array.from([]);\n    }\n    const inputBytes = toBytes(input);\n    const decoded = _decode(inputBytes);\n    if (stream) {\n        return decoded;\n    }\n    if (decoded.remainder.length !== 0) {\n        throw new Error('invalid RLP: remainder must be zero');\n    }\n    return decoded.data;\n}\nexports.decode = decode;\n/** Decode an input with RLP */\nfunction _decode(input) {\n    let length, llength, data, innerRemainder, d;\n    const decoded = [];\n    const firstByte = input[0];\n    if (firstByte <= 0x7f) {\n        // a single byte whose value is in the [0x00, 0x7f] range, that byte is its own RLP encoding.\n        return {\n            data: input.slice(0, 1),\n            remainder: input.slice(1),\n        };\n    }\n    else if (firstByte <= 0xb7) {\n        // string is 0-55 bytes long. A single byte with value 0x80 plus the length of the string followed by the string\n        // The range of the first byte is [0x80, 0xb7]\n        length = firstByte - 0x7f;\n        // set 0x80 null to 0\n        if (firstByte === 0x80) {\n            data = Uint8Array.from([]);\n        }\n        else {\n            data = safeSlice(input, 1, length);\n        }\n        if (length === 2 && data[0] < 0x80) {\n            throw new Error('invalid RLP encoding: invalid prefix, single byte < 0x80 are not prefixed');\n        }\n        return {\n            data,\n            remainder: input.slice(length),\n        };\n    }\n    else if (firstByte <= 0xbf) {\n        // string is greater than 55 bytes long. A single byte with the value (0xb7 plus the length of the length),\n        // followed by the length, followed by the string\n        llength = firstByte - 0xb6;\n        if (input.length - 1 < llength) {\n            throw new Error('invalid RLP: not enough bytes for string length');\n        }\n        length = decodeLength(safeSlice(input, 1, llength));\n        if (length <= 55) {\n            throw new Error('invalid RLP: expected string length to be greater than 55');\n        }\n        data = safeSlice(input, llength, length + llength);\n        return {\n            data,\n            remainder: input.slice(length + llength),\n        };\n    }\n    else if (firstByte <= 0xf7) {\n        // a list between 0-55 bytes long\n        length = firstByte - 0xbf;\n        innerRemainder = safeSlice(input, 1, length);\n        while (innerRemainder.length) {\n            d = _decode(innerRemainder);\n            decoded.push(d.data);\n            innerRemainder = d.remainder;\n        }\n        return {\n            data: decoded,\n            remainder: input.slice(length),\n        };\n    }\n    else {\n        // a list over 55 bytes long\n        llength = firstByte - 0xf6;\n        length = decodeLength(safeSlice(input, 1, llength));\n        if (length < 56) {\n            throw new Error('invalid RLP: encoded list too short');\n        }\n        const totalLength = llength + length;\n        if (totalLength > input.length) {\n            throw new Error('invalid RLP: total length is larger than the data');\n        }\n        innerRemainder = safeSlice(input, llength, totalLength);\n        while (innerRemainder.length) {\n            d = _decode(innerRemainder);\n            decoded.push(d.data);\n            innerRemainder = d.remainder;\n        }\n        return {\n            data: decoded,\n            remainder: input.slice(totalLength),\n        };\n    }\n}\nconst cachedHexes = Array.from({ length: 256 }, (_v, i) => i.toString(16).padStart(2, '0'));\nfunction bytesToHex(uint8a) {\n    // Pre-caching chars with `cachedHexes` speeds this up 6x\n    let hex = '';\n    for (let i = 0; i < uint8a.length; i++) {\n        hex += cachedHexes[uint8a[i]];\n    }\n    return hex;\n}\nfunction parseHexByte(hexByte) {\n    const byte = Number.parseInt(hexByte, 16);\n    if (Number.isNaN(byte))\n        throw new Error('Invalid byte sequence');\n    return byte;\n}\n// Caching slows it down 2-3x\nfunction hexToBytes(hex) {\n    if (typeof hex !== 'string') {\n        throw new TypeError('hexToBytes: expected string, got ' + typeof hex);\n    }\n    if (hex.length % 2)\n        throw new Error('hexToBytes: received invalid unpadded hex');\n    const array = new Uint8Array(hex.length / 2);\n    for (let i = 0; i < array.length; i++) {\n        const j = i * 2;\n        array[i] = parseHexByte(hex.slice(j, j + 2));\n    }\n    return array;\n}\n/** Concatenates two Uint8Arrays into one. */\nfunction concatBytes(...arrays) {\n    if (arrays.length === 1)\n        return arrays[0];\n    const length = arrays.reduce((a, arr) => a + arr.length, 0);\n    const result = new Uint8Array(length);\n    for (let i = 0, pad = 0; i < arrays.length; i++) {\n        const arr = arrays[i];\n        result.set(arr, pad);\n        pad += arr.length;\n    }\n    return result;\n}\nfunction utf8ToBytes(utf) {\n    return new TextEncoder().encode(utf);\n}\n/** Transform an integer into its hexadecimal value */\nfunction numberToHex(integer) {\n    if (integer < 0) {\n        throw new Error('Invalid integer as argument, must be unsigned!');\n    }\n    const hex = integer.toString(16);\n    return hex.length % 2 ? `0${hex}` : hex;\n}\n/** Pad a string to be even */\nfunction padToEven(a) {\n    return a.length % 2 ? `0${a}` : a;\n}\n/** Check if a string is prefixed by 0x */\nfunction isHexPrefixed(str) {\n    return str.length >= 2 && str[0] === '0' && str[1] === 'x';\n}\n/** Removes 0x from a given String */\nfunction stripHexPrefix(str) {\n    if (typeof str !== 'string') {\n        return str;\n    }\n    return isHexPrefixed(str) ? str.slice(2) : str;\n}\n/** Transform anything into a Uint8Array */\nfunction toBytes(v) {\n    if (v instanceof Uint8Array) {\n        return v;\n    }\n    if (typeof v === 'string') {\n        if (isHexPrefixed(v)) {\n            return hexToBytes(padToEven(stripHexPrefix(v)));\n        }\n        return utf8ToBytes(v);\n    }\n    if (typeof v === 'number' || typeof v === 'bigint') {\n        if (!v) {\n            return Uint8Array.from([]);\n        }\n        return hexToBytes(numberToHex(v));\n    }\n    if (v === null || v === undefined) {\n        return Uint8Array.from([]);\n    }\n    throw new Error('toBytes: received unsupported type ' + typeof v);\n}\nexports.utils = {\n    bytesToHex,\n    concatBytes,\n    hexToBytes,\n    utf8ToBytes,\n};\nexports.RLP = { encode, decode };\n//# sourceMappingURL=index.js.map","/*! crc32.js (C) 2014-present SheetJS -- http://sheetjs.com */\n/* vim: set ts=2: */\n/*exported CRC32 */\nvar CRC32;\n(function (factory) {\n\t/*jshint ignore:start */\n\t/*eslint-disable */\n\tif(typeof DO_NOT_EXPORT_CRC === 'undefined') {\n\t\tif('object' === typeof exports) {\n\t\t\tfactory(exports);\n\t\t} else if ('function' === typeof define && define.amd) {\n\t\t\tdefine(function () {\n\t\t\t\tvar module = {};\n\t\t\t\tfactory(module);\n\t\t\t\treturn module;\n\t\t\t});\n\t\t} else {\n\t\t\tfactory(CRC32 = {});\n\t\t}\n\t} else {\n\t\tfactory(CRC32 = {});\n\t}\n\t/*eslint-enable */\n\t/*jshint ignore:end */\n}(function(CRC32) {\nCRC32.version = '1.2.2';\n/*global Int32Array */\nfunction signed_crc_table() {\n\tvar c = 0, table = new Array(256);\n\n\tfor(var n =0; n != 256; ++n){\n\t\tc = n;\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\ttable[n] = c;\n\t}\n\n\treturn typeof Int32Array !== 'undefined' ? new Int32Array(table) : table;\n}\n\nvar T0 = signed_crc_table();\nfunction slice_by_16_tables(T) {\n\tvar c = 0, v = 0, n = 0, table = typeof Int32Array !== 'undefined' ? new Int32Array(4096) : new Array(4096) ;\n\n\tfor(n = 0; n != 256; ++n) table[n] = T[n];\n\tfor(n = 0; n != 256; ++n) {\n\t\tv = T[n];\n\t\tfor(c = 256 + n; c < 4096; c += 256) v = table[c] = (v >>> 8) ^ T[v & 0xFF];\n\t}\n\tvar out = [];\n\tfor(n = 1; n != 16; ++n) out[n - 1] = typeof Int32Array !== 'undefined' ? table.subarray(n * 256, n * 256 + 256) : table.slice(n * 256, n * 256 + 256);\n\treturn out;\n}\nvar TT = slice_by_16_tables(T0);\nvar T1 = TT[0],  T2 = TT[1],  T3 = TT[2],  T4 = TT[3],  T5 = TT[4];\nvar T6 = TT[5],  T7 = TT[6],  T8 = TT[7],  T9 = TT[8],  Ta = TT[9];\nvar Tb = TT[10], Tc = TT[11], Td = TT[12], Te = TT[13], Tf = TT[14];\nfunction crc32_bstr(bstr, seed) {\n\tvar C = seed ^ -1;\n\tfor(var i = 0, L = bstr.length; i < L;) C = (C>>>8) ^ T0[(C^bstr.charCodeAt(i++))&0xFF];\n\treturn ~C;\n}\n\nfunction crc32_buf(B, seed) {\n\tvar C = seed ^ -1, L = B.length - 15, i = 0;\n\tfor(; i < L;) C =\n\t\tTf[B[i++] ^ (C & 255)] ^\n\t\tTe[B[i++] ^ ((C >> 8) & 255)] ^\n\t\tTd[B[i++] ^ ((C >> 16) & 255)] ^\n\t\tTc[B[i++] ^ (C >>> 24)] ^\n\t\tTb[B[i++]] ^ Ta[B[i++]] ^ T9[B[i++]] ^ T8[B[i++]] ^\n\t\tT7[B[i++]] ^ T6[B[i++]] ^ T5[B[i++]] ^ T4[B[i++]] ^\n\t\tT3[B[i++]] ^ T2[B[i++]] ^ T1[B[i++]] ^ T0[B[i++]];\n\tL += 15;\n\twhile(i < L) C = (C>>>8) ^ T0[(C^B[i++])&0xFF];\n\treturn ~C;\n}\n\nfunction crc32_str(str, seed) {\n\tvar C = seed ^ -1;\n\tfor(var i = 0, L = str.length, c = 0, d = 0; i < L;) {\n\t\tc = str.charCodeAt(i++);\n\t\tif(c < 0x80) {\n\t\t\tC = (C>>>8) ^ T0[(C^c)&0xFF];\n\t\t} else if(c < 0x800) {\n\t\t\tC = (C>>>8) ^ T0[(C ^ (192|((c>>6)&31)))&0xFF];\n\t\t\tC = (C>>>8) ^ T0[(C ^ (128|(c&63)))&0xFF];\n\t\t} else if(c >= 0xD800 && c < 0xE000) {\n\t\t\tc = (c&1023)+64; d = str.charCodeAt(i++)&1023;\n\t\t\tC = (C>>>8) ^ T0[(C ^ (240|((c>>8)&7)))&0xFF];\n\t\t\tC = (C>>>8) ^ T0[(C ^ (128|((c>>2)&63)))&0xFF];\n\t\t\tC = (C>>>8) ^ T0[(C ^ (128|((d>>6)&15)|((c&3)<<4)))&0xFF];\n\t\t\tC = (C>>>8) ^ T0[(C ^ (128|(d&63)))&0xFF];\n\t\t} else {\n\t\t\tC = (C>>>8) ^ T0[(C ^ (224|((c>>12)&15)))&0xFF];\n\t\t\tC = (C>>>8) ^ T0[(C ^ (128|((c>>6)&63)))&0xFF];\n\t\t\tC = (C>>>8) ^ T0[(C ^ (128|(c&63)))&0xFF];\n\t\t}\n\t}\n\treturn ~C;\n}\nCRC32.table = T0;\n// $FlowIgnore\nCRC32.bstr = crc32_bstr;\n// $FlowIgnore\nCRC32.buf = crc32_buf;\n// $FlowIgnore\nCRC32.str = crc32_str;\n}));\n","export default {\n    name: 'goerli',\n    chainId: 5,\n    networkId: 5,\n    defaultHardfork: 'merge',\n    consensus: {\n        type: 'poa',\n        algorithm: 'clique',\n        clique: {\n            period: 15,\n            epoch: 30000,\n        },\n    },\n    comment: 'Cross-client PoA test network',\n    url: 'https://github.com/goerli/testnet',\n    genesis: {\n        timestamp: '0x5c51a607',\n        gasLimit: 10485760,\n        difficulty: 1,\n        nonce: '0x0000000000000000',\n        extraData: '0x22466c6578692069732061207468696e6722202d204166726900000000000000e0a2bd4258d2768837baa26a28fe71dc079f84c70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',\n    },\n    hardforks: [\n        {\n            name: 'chainstart',\n            block: 0,\n            forkHash: '0xa3f5ab08',\n        },\n        {\n            name: 'homestead',\n            block: 0,\n            forkHash: '0xa3f5ab08',\n        },\n        {\n            name: 'tangerineWhistle',\n            block: 0,\n            forkHash: '0xa3f5ab08',\n        },\n        {\n            name: 'spuriousDragon',\n            block: 0,\n            forkHash: '0xa3f5ab08',\n        },\n        {\n            name: 'byzantium',\n            block: 0,\n            forkHash: '0xa3f5ab08',\n        },\n        {\n            name: 'constantinople',\n            block: 0,\n            forkHash: '0xa3f5ab08',\n        },\n        {\n            name: 'petersburg',\n            block: 0,\n            forkHash: '0xa3f5ab08',\n        },\n        {\n            name: 'istanbul',\n            block: 1561651,\n            forkHash: '0xc25efa5c',\n        },\n        {\n            name: 'berlin',\n            block: 4460644,\n            forkHash: '0x757a1c47',\n        },\n        {\n            name: 'london',\n            block: 5062605,\n            forkHash: '0xb8c6299d',\n        },\n        {\n            '//_comment': 'The forkHash will remain same as mergeForkIdTransition is post merge, terminal block: https://goerli.etherscan.io/block/7382818',\n            name: 'merge',\n            ttd: '10790000',\n            block: 7382819,\n            forkHash: '0xb8c6299d',\n        },\n        {\n            name: 'mergeForkIdTransition',\n            block: null,\n            forkHash: null,\n        },\n        {\n            name: 'shanghai',\n            block: null,\n            forkHash: null,\n        },\n    ],\n    bootstrapNodes: [],\n    dnsNetworks: [\n        'enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.goerli.ethdisco.net',\n    ],\n};\n//# sourceMappingURL=goerli.js.map","export default {\n    name: 'mainnet',\n    chainId: 1,\n    networkId: 1,\n    defaultHardfork: 'merge',\n    consensus: {\n        type: 'pow',\n        algorithm: 'ethash',\n        ethash: {},\n    },\n    comment: 'The Ethereum main chain',\n    url: 'https://ethstats.net/',\n    genesis: {\n        gasLimit: 5000,\n        difficulty: 17179869184,\n        nonce: '0x0000000000000042',\n        extraData: '0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa',\n    },\n    hardforks: [\n        {\n            name: 'chainstart',\n            block: 0,\n            forkHash: '0xfc64ec04',\n        },\n        {\n            name: 'homestead',\n            block: 1150000,\n            forkHash: '0x97c2c34c',\n        },\n        {\n            name: 'dao',\n            block: 1920000,\n            forkHash: '0x91d1f948',\n        },\n        {\n            name: 'tangerineWhistle',\n            block: 2463000,\n            forkHash: '0x7a64da13',\n        },\n        {\n            name: 'spuriousDragon',\n            block: 2675000,\n            forkHash: '0x3edd5b10',\n        },\n        {\n            name: 'byzantium',\n            block: 4370000,\n            forkHash: '0xa00bc324',\n        },\n        {\n            name: 'constantinople',\n            block: 7280000,\n            forkHash: '0x668db0af',\n        },\n        {\n            name: 'petersburg',\n            block: 7280000,\n            forkHash: '0x668db0af',\n        },\n        {\n            name: 'istanbul',\n            block: 9069000,\n            forkHash: '0x879d6e30',\n        },\n        {\n            name: 'muirGlacier',\n            block: 9200000,\n            forkHash: '0xe029e991',\n        },\n        {\n            name: 'berlin',\n            block: 12244000,\n            forkHash: '0x0eb440f6',\n        },\n        {\n            name: 'london',\n            block: 12965000,\n            forkHash: '0xb715077d',\n        },\n        {\n            name: 'arrowGlacier',\n            block: 13773000,\n            forkHash: '0x20c327fc',\n        },\n        {\n            name: 'grayGlacier',\n            block: 15050000,\n            forkHash: '0xf0afd0e3',\n        },\n        {\n            '//_comment': 'The forkHash will remain same as mergeForkIdTransition is post merge, terminal block: https://etherscan.io/block/15537393',\n            name: 'merge',\n            ttd: '58750000000000000000000',\n            block: 15537394,\n            forkHash: '0xf0afd0e3',\n        },\n        {\n            name: 'mergeForkIdTransition',\n            block: null,\n            forkHash: null,\n        },\n        {\n            name: 'shanghai',\n            block: null,\n            forkHash: null,\n        },\n    ],\n    bootstrapNodes: [],\n    dnsNetworks: [\n        'enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.mainnet.ethdisco.net',\n    ],\n};\n//# sourceMappingURL=mainnet.js.map","export default {\n    name: 'sepolia',\n    chainId: 11155111,\n    networkId: 11155111,\n    defaultHardfork: 'merge',\n    consensus: {\n        type: 'pow',\n        algorithm: 'ethash',\n        ethash: {},\n    },\n    comment: 'PoW test network to replace Ropsten',\n    url: 'https://github.com/ethereum/go-ethereum/pull/23730',\n    genesis: {\n        timestamp: '0x6159af19',\n        gasLimit: 30000000,\n        difficulty: 131072,\n        nonce: '0x0000000000000000',\n        extraData: '0x5365706f6c69612c20417468656e732c204174746963612c2047726565636521',\n    },\n    hardforks: [\n        {\n            name: 'chainstart',\n            block: 0,\n            forkHash: '0xfe3366e7',\n        },\n        {\n            name: 'homestead',\n            block: 0,\n            forkHash: '0xfe3366e7',\n        },\n        {\n            name: 'tangerineWhistle',\n            block: 0,\n            forkHash: '0xfe3366e7',\n        },\n        {\n            name: 'spuriousDragon',\n            block: 0,\n            forkHash: '0xfe3366e7',\n        },\n        {\n            name: 'byzantium',\n            block: 0,\n            forkHash: '0xfe3366e7',\n        },\n        {\n            name: 'constantinople',\n            block: 0,\n            forkHash: '0xfe3366e7',\n        },\n        {\n            name: 'petersburg',\n            block: 0,\n            forkHash: '0xfe3366e7',\n        },\n        {\n            name: 'istanbul',\n            block: 0,\n            forkHash: '0xfe3366e7',\n        },\n        {\n            name: 'muirGlacier',\n            block: 0,\n            forkHash: '0xfe3366e7',\n        },\n        {\n            name: 'berlin',\n            block: 0,\n            forkHash: '0xfe3366e7',\n        },\n        {\n            name: 'london',\n            block: 0,\n            forkHash: '0xfe3366e7',\n        },\n        {\n            '//_comment': 'The forkHash will remain same as mergeForkIdTransition is post merge, terminal block: https://sepolia.etherscan.io/block/1450408',\n            name: 'merge',\n            ttd: '17000000000000000',\n            block: 1450409,\n            forkHash: '0xfe3366e7',\n        },\n        {\n            name: 'mergeForkIdTransition',\n            block: 1735371,\n            forkHash: '0xb96cbd13',\n        },\n        {\n            name: 'shanghai',\n            block: null,\n            timestamp: '1677557088',\n            forkHash: '0xf7f9bc08',\n        },\n    ],\n    bootstrapNodes: [],\n    dnsNetworks: [\n        'enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.sepolia.ethdisco.net',\n    ],\n};\n//# sourceMappingURL=sepolia.js.map","export default {\n    name: 'EIP-1153',\n    number: 1153,\n    comment: 'Transient Storage',\n    url: 'https://eips.ethereum.org/EIPS/eip-1153',\n    status: 'Review',\n    minimumHardfork: 'chainstart',\n    requiredEIPs: [],\n    gasConfig: {},\n    gasPrices: {\n        tstore: {\n            v: 100,\n            d: 'Base fee of the TSTORE opcode',\n        },\n        tload: {\n            v: 100,\n            d: 'Base fee of the TLOAD opcode',\n        },\n    },\n    vm: {},\n    pow: {},\n};\n//# sourceMappingURL=1153.js.map","export default {\n    name: 'EIP-1559',\n    number: 1559,\n    comment: 'Fee market change for ETH 1.0 chain',\n    url: 'https://eips.ethereum.org/EIPS/eip-1559',\n    status: 'Final',\n    minimumHardfork: 'berlin',\n    requiredEIPs: [2930],\n    gasConfig: {\n        baseFeeMaxChangeDenominator: {\n            v: 8,\n            d: 'Maximum base fee change denominator',\n        },\n        elasticityMultiplier: {\n            v: 2,\n            d: 'Maximum block gas target elasticity',\n        },\n        initialBaseFee: {\n            v: 1000000000,\n            d: 'Initial base fee on first EIP1559 block',\n        },\n    },\n    gasPrices: {},\n    vm: {},\n    pow: {},\n};\n//# sourceMappingURL=1559.js.map","export default {\n    name: 'EIP-2315',\n    number: 2315,\n    comment: 'Simple subroutines for the EVM',\n    url: 'https://eips.ethereum.org/EIPS/eip-2315',\n    status: 'Draft',\n    minimumHardfork: 'istanbul',\n    gasConfig: {},\n    gasPrices: {\n        beginsub: {\n            v: 2,\n            d: 'Base fee of the BEGINSUB opcode',\n        },\n        returnsub: {\n            v: 5,\n            d: 'Base fee of the RETURNSUB opcode',\n        },\n        jumpsub: {\n            v: 10,\n            d: 'Base fee of the JUMPSUB opcode',\n        },\n    },\n    vm: {},\n    pow: {},\n};\n//# sourceMappingURL=2315.js.map","export default {\n    name: 'EIP-2537',\n    number: 2537,\n    comment: 'BLS12-381 precompiles',\n    url: 'https://eips.ethereum.org/EIPS/eip-2537',\n    status: 'Draft',\n    minimumHardfork: 'chainstart',\n    gasConfig: {},\n    gasPrices: {\n        Bls12381G1AddGas: {\n            v: 600,\n            d: 'Gas cost of a single BLS12-381 G1 addition precompile-call',\n        },\n        Bls12381G1MulGas: {\n            v: 12000,\n            d: 'Gas cost of a single BLS12-381 G1 multiplication precompile-call',\n        },\n        Bls12381G2AddGas: {\n            v: 4500,\n            d: 'Gas cost of a single BLS12-381 G2 addition precompile-call',\n        },\n        Bls12381G2MulGas: {\n            v: 55000,\n            d: 'Gas cost of a single BLS12-381 G2 multiplication precompile-call',\n        },\n        Bls12381PairingBaseGas: {\n            v: 115000,\n            d: 'Base gas cost of BLS12-381 pairing check',\n        },\n        Bls12381PairingPerPairGas: {\n            v: 23000,\n            d: 'Per-pair gas cost of BLS12-381 pairing check',\n        },\n        Bls12381MapG1Gas: {\n            v: 5500,\n            d: 'Gas cost of BLS12-381 map field element to G1',\n        },\n        Bls12381MapG2Gas: {\n            v: 110000,\n            d: 'Gas cost of BLS12-381 map field element to G2',\n        },\n        Bls12381MultiExpGasDiscount: {\n            v: [\n                [1, 1200],\n                [2, 888],\n                [3, 764],\n                [4, 641],\n                [5, 594],\n                [6, 547],\n                [7, 500],\n                [8, 453],\n                [9, 438],\n                [10, 423],\n                [11, 408],\n                [12, 394],\n                [13, 379],\n                [14, 364],\n                [15, 349],\n                [16, 334],\n                [17, 330],\n                [18, 326],\n                [19, 322],\n                [20, 318],\n                [21, 314],\n                [22, 310],\n                [23, 306],\n                [24, 302],\n                [25, 298],\n                [26, 294],\n                [27, 289],\n                [28, 285],\n                [29, 281],\n                [30, 277],\n                [31, 273],\n                [32, 269],\n                [33, 268],\n                [34, 266],\n                [35, 265],\n                [36, 263],\n                [37, 262],\n                [38, 260],\n                [39, 259],\n                [40, 257],\n                [41, 256],\n                [42, 254],\n                [43, 253],\n                [44, 251],\n                [45, 250],\n                [46, 248],\n                [47, 247],\n                [48, 245],\n                [49, 244],\n                [50, 242],\n                [51, 241],\n                [52, 239],\n                [53, 238],\n                [54, 236],\n                [55, 235],\n                [56, 233],\n                [57, 232],\n                [58, 231],\n                [59, 229],\n                [60, 228],\n                [61, 226],\n                [62, 225],\n                [63, 223],\n                [64, 222],\n                [65, 221],\n                [66, 220],\n                [67, 219],\n                [68, 219],\n                [69, 218],\n                [70, 217],\n                [71, 216],\n                [72, 216],\n                [73, 215],\n                [74, 214],\n                [75, 213],\n                [76, 213],\n                [77, 212],\n                [78, 211],\n                [79, 211],\n                [80, 210],\n                [81, 209],\n                [82, 208],\n                [83, 208],\n                [84, 207],\n                [85, 206],\n                [86, 205],\n                [87, 205],\n                [88, 204],\n                [89, 203],\n                [90, 202],\n                [91, 202],\n                [92, 201],\n                [93, 200],\n                [94, 199],\n                [95, 199],\n                [96, 198],\n                [97, 197],\n                [98, 196],\n                [99, 196],\n                [100, 195],\n                [101, 194],\n                [102, 193],\n                [103, 193],\n                [104, 192],\n                [105, 191],\n                [106, 191],\n                [107, 190],\n                [108, 189],\n                [109, 188],\n                [110, 188],\n                [111, 187],\n                [112, 186],\n                [113, 185],\n                [114, 185],\n                [115, 184],\n                [116, 183],\n                [117, 182],\n                [118, 182],\n                [119, 181],\n                [120, 180],\n                [121, 179],\n                [122, 179],\n                [123, 178],\n                [124, 177],\n                [125, 176],\n                [126, 176],\n                [127, 175],\n                [128, 174],\n            ],\n            d: 'Discount gas costs of calls to the MultiExp precompiles with `k` (point, scalar) pair',\n        },\n    },\n    vm: {},\n    pow: {},\n};\n//# sourceMappingURL=2537.js.map","export default {\n    name: 'EIP-2565',\n    number: 2565,\n    comment: 'ModExp gas cost',\n    url: 'https://eips.ethereum.org/EIPS/eip-2565',\n    status: 'Final',\n    minimumHardfork: 'byzantium',\n    gasConfig: {},\n    gasPrices: {\n        modexpGquaddivisor: {\n            v: 3,\n            d: 'Gquaddivisor from modexp precompile for gas calculation',\n        },\n    },\n    vm: {},\n    pow: {},\n};\n//# sourceMappingURL=2565.js.map","export default {\n    name: 'EIP-2718',\n    comment: 'Typed Transaction Envelope',\n    url: 'https://eips.ethereum.org/EIPS/eip-2718',\n    status: 'Final',\n    minimumHardfork: 'chainstart',\n    gasConfig: {},\n    gasPrices: {},\n    vm: {},\n    pow: {},\n};\n//# sourceMappingURL=2718.js.map","export default {\n    name: 'EIP-2929',\n    comment: 'Gas cost increases for state access opcodes',\n    url: 'https://eips.ethereum.org/EIPS/eip-2929',\n    status: 'Final',\n    minimumHardfork: 'chainstart',\n    gasConfig: {},\n    gasPrices: {\n        coldsload: {\n            v: 2100,\n            d: 'Gas cost of the first read of storage from a given location (per transaction)',\n        },\n        coldaccountaccess: {\n            v: 2600,\n            d: 'Gas cost of the first read of a given address (per transaction)',\n        },\n        warmstorageread: {\n            v: 100,\n            d: \"Gas cost of reading storage locations which have already loaded 'cold'\",\n        },\n        sstoreCleanGasEIP2200: {\n            v: 2900,\n            d: 'Once per SSTORE operation from clean non-zero to something else',\n        },\n        sstoreNoopGasEIP2200: {\n            v: 100,\n            d: \"Once per SSTORE operation if the value doesn't change\",\n        },\n        sstoreDirtyGasEIP2200: {\n            v: 100,\n            d: 'Once per SSTORE operation if a dirty value is changed',\n        },\n        sstoreInitRefundEIP2200: {\n            v: 19900,\n            d: 'Once per SSTORE operation for resetting to the original zero value',\n        },\n        sstoreCleanRefundEIP2200: {\n            v: 4900,\n            d: 'Once per SSTORE operation for resetting to the original non-zero value',\n        },\n        call: {\n            v: 0,\n            d: 'Base fee of the CALL opcode',\n        },\n        callcode: {\n            v: 0,\n            d: 'Base fee of the CALLCODE opcode',\n        },\n        delegatecall: {\n            v: 0,\n            d: 'Base fee of the DELEGATECALL opcode',\n        },\n        staticcall: {\n            v: 0,\n            d: 'Base fee of the STATICCALL opcode',\n        },\n        balance: {\n            v: 0,\n            d: 'Base fee of the BALANCE opcode',\n        },\n        extcodesize: {\n            v: 0,\n            d: 'Base fee of the EXTCODESIZE opcode',\n        },\n        extcodecopy: {\n            v: 0,\n            d: 'Base fee of the EXTCODECOPY opcode',\n        },\n        extcodehash: {\n            v: 0,\n            d: 'Base fee of the EXTCODEHASH opcode',\n        },\n        sload: {\n            v: 0,\n            d: 'Base fee of the SLOAD opcode',\n        },\n        sstore: {\n            v: 0,\n            d: 'Base fee of the SSTORE opcode',\n        },\n    },\n    vm: {},\n    pow: {},\n};\n//# sourceMappingURL=2929.js.map","export default {\n    name: 'EIP-2930',\n    comment: 'Optional access lists',\n    url: 'https://eips.ethereum.org/EIPS/eip-2930',\n    status: 'Final',\n    minimumHardfork: 'istanbul',\n    requiredEIPs: [2718, 2929],\n    gasConfig: {},\n    gasPrices: {\n        accessListStorageKeyCost: {\n            v: 1900,\n            d: 'Gas cost per storage key in an Access List transaction',\n        },\n        accessListAddressCost: {\n            v: 2400,\n            d: 'Gas cost per storage key in an Access List transaction',\n        },\n    },\n    vm: {},\n    pow: {},\n};\n//# sourceMappingURL=2930.js.map","export default {\n    name: 'EIP-3198',\n    number: 3198,\n    comment: 'BASEFEE opcode',\n    url: 'https://eips.ethereum.org/EIPS/eip-3198',\n    status: 'Final',\n    minimumHardfork: 'london',\n    gasConfig: {},\n    gasPrices: {\n        basefee: {\n            v: 2,\n            d: 'Gas cost of the BASEFEE opcode',\n        },\n    },\n    vm: {},\n    pow: {},\n};\n//# sourceMappingURL=3198.js.map","export default {\n    name: 'EIP-3529',\n    comment: 'Reduction in refunds',\n    url: 'https://eips.ethereum.org/EIPS/eip-3529',\n    status: 'Final',\n    minimumHardfork: 'berlin',\n    requiredEIPs: [2929],\n    gasConfig: {\n        maxRefundQuotient: {\n            v: 5,\n            d: 'Maximum refund quotient; max tx refund is min(tx.gasUsed/maxRefundQuotient, tx.gasRefund)',\n        },\n    },\n    gasPrices: {\n        selfdestructRefund: {\n            v: 0,\n            d: 'Refunded following a selfdestruct operation',\n        },\n        sstoreClearRefundEIP2200: {\n            v: 4800,\n            d: 'Once per SSTORE operation for clearing an originally existing storage slot',\n        },\n    },\n    vm: {},\n    pow: {},\n};\n//# sourceMappingURL=3529.js.map","export default {\n    name: 'EIP-3540',\n    number: 3540,\n    comment: 'EVM Object Format (EOF) v1',\n    url: 'https://eips.ethereum.org/EIPS/eip-3540',\n    status: 'Review',\n    minimumHardfork: 'london',\n    requiredEIPs: [3541],\n    gasConfig: {},\n    gasPrices: {},\n    vm: {},\n    pow: {},\n};\n//# sourceMappingURL=3540.js.map","export default {\n    name: 'EIP-3541',\n    comment: 'Reject new contracts starting with the 0xEF byte',\n    url: 'https://eips.ethereum.org/EIPS/eip-3541',\n    status: 'Final',\n    minimumHardfork: 'berlin',\n    requiredEIPs: [],\n    gasConfig: {},\n    gasPrices: {},\n    vm: {},\n    pow: {},\n};\n//# sourceMappingURL=3541.js.map","export default {\n    name: 'EIP-3554',\n    comment: 'Reduction in refunds',\n    url: 'Difficulty Bomb Delay to December 1st 2021',\n    status: 'Final',\n    minimumHardfork: 'muirGlacier',\n    requiredEIPs: [],\n    gasConfig: {},\n    gasPrices: {},\n    vm: {},\n    pow: {\n        difficultyBombDelay: {\n            v: 9500000,\n            d: 'the amount of blocks to delay the difficulty bomb with',\n        },\n    },\n};\n//# sourceMappingURL=3554.js.map","export default {\n    name: 'EIP-3607',\n    number: 3607,\n    comment: 'Reject transactions from senders with deployed code',\n    url: 'https://eips.ethereum.org/EIPS/eip-3607',\n    status: 'Final',\n    minimumHardfork: 'chainstart',\n    requiredEIPs: [],\n    gasConfig: {},\n    gasPrices: {},\n    vm: {},\n    pow: {},\n};\n//# sourceMappingURL=3607.js.map","export default {\n    name: 'EIP-3651',\n    number: 3198,\n    comment: 'Warm COINBASE',\n    url: 'https://eips.ethereum.org/EIPS/eip-3651',\n    status: 'Review',\n    minimumHardfork: 'london',\n    requiredEIPs: [2929],\n    gasConfig: {},\n    gasPrices: {},\n    vm: {},\n    pow: {},\n};\n//# sourceMappingURL=3651.js.map","export default {\n    name: 'EIP-3670',\n    number: 3670,\n    comment: 'EOF - Code Validation',\n    url: 'https://eips.ethereum.org/EIPS/eip-3670',\n    status: 'Review',\n    minimumHardfork: 'london',\n    requiredEIPs: [3540],\n    gasConfig: {},\n    gasPrices: {},\n    vm: {},\n    pow: {},\n};\n//# sourceMappingURL=3670.js.map","export default {\n    name: 'EIP-3675',\n    number: 3675,\n    comment: 'Upgrade consensus to Proof-of-Stake',\n    url: 'https://eips.ethereum.org/EIPS/eip-3675',\n    status: 'Final',\n    minimumHardfork: 'london',\n    requiredEIPs: [],\n    gasConfig: {},\n    gasPrices: {},\n    vm: {},\n    pow: {},\n};\n//# sourceMappingURL=3675.js.map","export default {\n    name: 'EIP-3855',\n    number: 3855,\n    comment: 'PUSH0 instruction',\n    url: 'https://eips.ethereum.org/EIPS/eip-3855',\n    status: 'Review',\n    minimumHardfork: 'chainstart',\n    requiredEIPs: [],\n    gasConfig: {},\n    gasPrices: {\n        push0: {\n            v: 2,\n            d: 'Base fee of the PUSH0 opcode',\n        },\n    },\n    vm: {},\n    pow: {},\n};\n//# sourceMappingURL=3855.js.map","export default {\n    name: 'EIP-3860',\n    number: 3860,\n    comment: 'Limit and meter initcode',\n    url: 'https://eips.ethereum.org/EIPS/eip-3860',\n    status: 'Review',\n    minimumHardfork: 'spuriousDragon',\n    requiredEIPs: [],\n    gasConfig: {},\n    gasPrices: {\n        initCodeWordCost: {\n            v: 2,\n            d: 'Gas to pay for each word (32 bytes) of initcode when creating a contract',\n        },\n    },\n    vm: {\n        maxInitCodeSize: {\n            v: 49152,\n            d: 'Maximum length of initialization code when creating a contract',\n        },\n    },\n    pow: {},\n};\n//# sourceMappingURL=3860.js.map","export default {\n    name: 'EIP-4345',\n    number: 4345,\n    comment: 'Difficulty Bomb Delay to June 2022',\n    url: 'https://eips.ethereum.org/EIPS/eip-4345',\n    status: 'Final',\n    minimumHardfork: 'london',\n    gasConfig: {},\n    gasPrices: {},\n    vm: {},\n    pow: {\n        difficultyBombDelay: {\n            v: 10700000,\n            d: 'the amount of blocks to delay the difficulty bomb with',\n        },\n    },\n};\n//# sourceMappingURL=4345.js.map","export default {\n    name: 'EIP-4399',\n    number: 4399,\n    comment: 'Supplant DIFFICULTY opcode with PREVRANDAO',\n    url: 'https://eips.ethereum.org/EIPS/eip-4399',\n    status: 'Review',\n    minimumHardfork: 'london',\n    requiredEIPs: [],\n    gasConfig: {},\n    gasPrices: {},\n    vm: {},\n    pow: {},\n};\n//# sourceMappingURL=4399.js.map","export default {\n    name: 'EIP-5133',\n    number: 5133,\n    comment: 'Delaying Difficulty Bomb to mid-September 2022',\n    url: 'https://eips.ethereum.org/EIPS/eip-5133',\n    status: 'Draft',\n    minimumHardfork: 'grayGlacier',\n    gasConfig: {},\n    gasPrices: {},\n    vm: {},\n    pow: {\n        difficultyBombDelay: {\n            v: 11400000,\n            d: 'the amount of blocks to delay the difficulty bomb with',\n        },\n    },\n};\n//# sourceMappingURL=5133.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport e1153 from './1153.js';\nimport e1559 from './1559.js';\nimport e2315 from './2315.js';\nimport e2537 from './2537.js';\nimport e2565 from './2565.js';\nimport e2718 from './2718.js';\nimport e2929 from './2929.js';\nimport e2930 from './2930.js';\nimport e3198 from './3198.js';\nimport e3529 from './3529.js';\nimport e3540 from './3540.js';\nimport e3541 from './3541.js';\nimport e3554 from './3554.js';\nimport e3607 from './3607.js';\nimport e3651 from './3651.js';\nimport e3670 from './3670.js';\nimport e3675 from './3675.js';\nimport e3855 from './3855.js';\nimport e3860 from './3860.js';\nimport e4345 from './4345.js';\nimport e4399 from './4399.js';\nimport e5133 from './5133.js';\nexport const EIPs = {\n    1153: e1153,\n    1559: e1559,\n    2315: e2315,\n    2537: e2537,\n    2565: e2565,\n    2718: e2718,\n    2929: e2929,\n    2930: e2930,\n    3198: e3198,\n    3529: e3529,\n    3540: e3540,\n    3541: e3541,\n    3554: e3554,\n    3607: e3607,\n    3651: e3651,\n    3670: e3670,\n    3675: e3675,\n    3855: e3855,\n    3860: e3860,\n    4345: e4345,\n    4399: e4399,\n    5133: e5133,\n};\n//# sourceMappingURL=index.js.map","export default {\n    name: 'chainstart',\n    comment: 'Start of the Ethereum main chain',\n    url: '',\n    status: '',\n    gasConfig: {\n        minGasLimit: {\n            v: 5000,\n            d: 'Minimum the gas limit may ever be',\n        },\n        gasLimitBoundDivisor: {\n            v: 1024,\n            d: 'The bound divisor of the gas limit, used in update calculations',\n        },\n        maxRefundQuotient: {\n            v: 2,\n            d: 'Maximum refund quotient; max tx refund is min(tx.gasUsed/maxRefundQuotient, tx.gasRefund)',\n        },\n    },\n    gasPrices: {\n        base: {\n            v: 2,\n            d: 'Gas base cost, used e.g. for ChainID opcode (Istanbul)',\n        },\n        tierStep: {\n            v: [0, 2, 3, 5, 8, 10, 20],\n            d: 'Once per operation, for a selection of them',\n        },\n        exp: {\n            v: 10,\n            d: 'Base fee of the EXP opcode',\n        },\n        expByte: {\n            v: 10,\n            d: 'Times ceil(log256(exponent)) for the EXP instruction',\n        },\n        sha3: {\n            v: 30,\n            d: 'Base fee of the SHA3 opcode',\n        },\n        sha3Word: {\n            v: 6,\n            d: \"Once per word of the SHA3 operation's data\",\n        },\n        sload: {\n            v: 50,\n            d: 'Base fee of the SLOAD opcode',\n        },\n        sstoreSet: {\n            v: 20000,\n            d: 'Once per SSTORE operation if the zeroness changes from zero',\n        },\n        sstoreReset: {\n            v: 5000,\n            d: 'Once per SSTORE operation if the zeroness does not change from zero',\n        },\n        sstoreRefund: {\n            v: 15000,\n            d: 'Once per SSTORE operation if the zeroness changes to zero',\n        },\n        jumpdest: {\n            v: 1,\n            d: 'Base fee of the JUMPDEST opcode',\n        },\n        log: {\n            v: 375,\n            d: 'Base fee of the LOG opcode',\n        },\n        logData: {\n            v: 8,\n            d: \"Per byte in a LOG* operation's data\",\n        },\n        logTopic: {\n            v: 375,\n            d: 'Multiplied by the * of the LOG*, per LOG transaction. e.g. LOG0 incurs 0 * c_txLogTopicGas, LOG4 incurs 4 * c_txLogTopicGas',\n        },\n        create: {\n            v: 32000,\n            d: 'Base fee of the CREATE opcode',\n        },\n        call: {\n            v: 40,\n            d: 'Base fee of the CALL opcode',\n        },\n        callStipend: {\n            v: 2300,\n            d: 'Free gas given at beginning of call',\n        },\n        callValueTransfer: {\n            v: 9000,\n            d: 'Paid for CALL when the value transfor is non-zero',\n        },\n        callNewAccount: {\n            v: 25000,\n            d: \"Paid for CALL when the destination address didn't exist prior\",\n        },\n        selfdestructRefund: {\n            v: 24000,\n            d: 'Refunded following a selfdestruct operation',\n        },\n        memory: {\n            v: 3,\n            d: 'Times the address of the (highest referenced byte in memory + 1). NOTE: referencing happens on read, write and in instructions such as RETURN and CALL',\n        },\n        quadCoeffDiv: {\n            v: 512,\n            d: 'Divisor for the quadratic particle of the memory cost equation',\n        },\n        createData: {\n            v: 200,\n            d: '',\n        },\n        tx: {\n            v: 21000,\n            d: 'Per transaction. NOTE: Not payable on data of calls between transactions',\n        },\n        txCreation: {\n            v: 32000,\n            d: 'The cost of creating a contract via tx',\n        },\n        txDataZero: {\n            v: 4,\n            d: 'Per byte of data attached to a transaction that equals zero. NOTE: Not payable on data of calls between transactions',\n        },\n        txDataNonZero: {\n            v: 68,\n            d: 'Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions',\n        },\n        copy: {\n            v: 3,\n            d: 'Multiplied by the number of 32-byte words that are copied (round up) for any *COPY operation and added',\n        },\n        ecRecover: {\n            v: 3000,\n            d: '',\n        },\n        sha256: {\n            v: 60,\n            d: '',\n        },\n        sha256Word: {\n            v: 12,\n            d: '',\n        },\n        ripemd160: {\n            v: 600,\n            d: '',\n        },\n        ripemd160Word: {\n            v: 120,\n            d: '',\n        },\n        identity: {\n            v: 15,\n            d: '',\n        },\n        identityWord: {\n            v: 3,\n            d: '',\n        },\n        stop: {\n            v: 0,\n            d: 'Base fee of the STOP opcode',\n        },\n        add: {\n            v: 3,\n            d: 'Base fee of the ADD opcode',\n        },\n        mul: {\n            v: 5,\n            d: 'Base fee of the MUL opcode',\n        },\n        sub: {\n            v: 3,\n            d: 'Base fee of the SUB opcode',\n        },\n        div: {\n            v: 5,\n            d: 'Base fee of the DIV opcode',\n        },\n        sdiv: {\n            v: 5,\n            d: 'Base fee of the SDIV opcode',\n        },\n        mod: {\n            v: 5,\n            d: 'Base fee of the MOD opcode',\n        },\n        smod: {\n            v: 5,\n            d: 'Base fee of the SMOD opcode',\n        },\n        addmod: {\n            v: 8,\n            d: 'Base fee of the ADDMOD opcode',\n        },\n        mulmod: {\n            v: 8,\n            d: 'Base fee of the MULMOD opcode',\n        },\n        signextend: {\n            v: 5,\n            d: 'Base fee of the SIGNEXTEND opcode',\n        },\n        lt: {\n            v: 3,\n            d: 'Base fee of the LT opcode',\n        },\n        gt: {\n            v: 3,\n            d: 'Base fee of the GT opcode',\n        },\n        slt: {\n            v: 3,\n            d: 'Base fee of the SLT opcode',\n        },\n        sgt: {\n            v: 3,\n            d: 'Base fee of the SGT opcode',\n        },\n        eq: {\n            v: 3,\n            d: 'Base fee of the EQ opcode',\n        },\n        iszero: {\n            v: 3,\n            d: 'Base fee of the ISZERO opcode',\n        },\n        and: {\n            v: 3,\n            d: 'Base fee of the AND opcode',\n        },\n        or: {\n            v: 3,\n            d: 'Base fee of the OR opcode',\n        },\n        xor: {\n            v: 3,\n            d: 'Base fee of the XOR opcode',\n        },\n        not: {\n            v: 3,\n            d: 'Base fee of the NOT opcode',\n        },\n        byte: {\n            v: 3,\n            d: 'Base fee of the BYTE opcode',\n        },\n        address: {\n            v: 2,\n            d: 'Base fee of the ADDRESS opcode',\n        },\n        balance: {\n            v: 20,\n            d: 'Base fee of the BALANCE opcode',\n        },\n        origin: {\n            v: 2,\n            d: 'Base fee of the ORIGIN opcode',\n        },\n        caller: {\n            v: 2,\n            d: 'Base fee of the CALLER opcode',\n        },\n        callvalue: {\n            v: 2,\n            d: 'Base fee of the CALLVALUE opcode',\n        },\n        calldataload: {\n            v: 3,\n            d: 'Base fee of the CALLDATALOAD opcode',\n        },\n        calldatasize: {\n            v: 2,\n            d: 'Base fee of the CALLDATASIZE opcode',\n        },\n        calldatacopy: {\n            v: 3,\n            d: 'Base fee of the CALLDATACOPY opcode',\n        },\n        codesize: {\n            v: 2,\n            d: 'Base fee of the CODESIZE opcode',\n        },\n        codecopy: {\n            v: 3,\n            d: 'Base fee of the CODECOPY opcode',\n        },\n        gasprice: {\n            v: 2,\n            d: 'Base fee of the GASPRICE opcode',\n        },\n        extcodesize: {\n            v: 20,\n            d: 'Base fee of the EXTCODESIZE opcode',\n        },\n        extcodecopy: {\n            v: 20,\n            d: 'Base fee of the EXTCODECOPY opcode',\n        },\n        blockhash: {\n            v: 20,\n            d: 'Base fee of the BLOCKHASH opcode',\n        },\n        coinbase: {\n            v: 2,\n            d: 'Base fee of the COINBASE opcode',\n        },\n        timestamp: {\n            v: 2,\n            d: 'Base fee of the TIMESTAMP opcode',\n        },\n        number: {\n            v: 2,\n            d: 'Base fee of the NUMBER opcode',\n        },\n        difficulty: {\n            v: 2,\n            d: 'Base fee of the DIFFICULTY opcode',\n        },\n        gaslimit: {\n            v: 2,\n            d: 'Base fee of the GASLIMIT opcode',\n        },\n        pop: {\n            v: 2,\n            d: 'Base fee of the POP opcode',\n        },\n        mload: {\n            v: 3,\n            d: 'Base fee of the MLOAD opcode',\n        },\n        mstore: {\n            v: 3,\n            d: 'Base fee of the MSTORE opcode',\n        },\n        mstore8: {\n            v: 3,\n            d: 'Base fee of the MSTORE8 opcode',\n        },\n        sstore: {\n            v: 0,\n            d: 'Base fee of the SSTORE opcode',\n        },\n        jump: {\n            v: 8,\n            d: 'Base fee of the JUMP opcode',\n        },\n        jumpi: {\n            v: 10,\n            d: 'Base fee of the JUMPI opcode',\n        },\n        pc: {\n            v: 2,\n            d: 'Base fee of the PC opcode',\n        },\n        msize: {\n            v: 2,\n            d: 'Base fee of the MSIZE opcode',\n        },\n        gas: {\n            v: 2,\n            d: 'Base fee of the GAS opcode',\n        },\n        push: {\n            v: 3,\n            d: 'Base fee of the PUSH opcode',\n        },\n        dup: {\n            v: 3,\n            d: 'Base fee of the DUP opcode',\n        },\n        swap: {\n            v: 3,\n            d: 'Base fee of the SWAP opcode',\n        },\n        callcode: {\n            v: 40,\n            d: 'Base fee of the CALLCODE opcode',\n        },\n        return: {\n            v: 0,\n            d: 'Base fee of the RETURN opcode',\n        },\n        invalid: {\n            v: 0,\n            d: 'Base fee of the INVALID opcode',\n        },\n        selfdestruct: {\n            v: 0,\n            d: 'Base fee of the SELFDESTRUCT opcode',\n        },\n    },\n    vm: {\n        stackLimit: {\n            v: 1024,\n            d: 'Maximum size of VM stack allowed',\n        },\n        callCreateDepth: {\n            v: 1024,\n            d: 'Maximum depth of call/create stack',\n        },\n        maxExtraDataSize: {\n            v: 32,\n            d: 'Maximum size extra data may be after Genesis',\n        },\n    },\n    pow: {\n        minimumDifficulty: {\n            v: 131072,\n            d: 'The minimum that the difficulty may ever be',\n        },\n        difficultyBoundDivisor: {\n            v: 2048,\n            d: 'The bound divisor of the difficulty, used in the update calculations',\n        },\n        durationLimit: {\n            v: 13,\n            d: 'The decision boundary on the blocktime duration used to determine whether difficulty should go up or not',\n        },\n        epochDuration: {\n            v: 30000,\n            d: 'Duration between proof-of-work epochs',\n        },\n        timebombPeriod: {\n            v: 100000,\n            d: 'Exponential difficulty timebomb period',\n        },\n        minerReward: {\n            v: '5000000000000000000',\n            d: 'the amount a miner get rewarded for mining a block',\n        },\n        difficultyBombDelay: {\n            v: 0,\n            d: 'the amount of blocks to delay the difficulty bomb with',\n        },\n    },\n};\n//# sourceMappingURL=chainstart.js.map","export default {\n    name: 'dao',\n    comment: 'DAO rescue hardfork',\n    url: 'https://eips.ethereum.org/EIPS/eip-779',\n    status: 'Final',\n    gasConfig: {},\n    gasPrices: {},\n    vm: {},\n    pow: {},\n};\n//# sourceMappingURL=dao.js.map","export default {\n    name: 'homestead',\n    comment: 'Homestead hardfork with protocol and network changes',\n    url: 'https://eips.ethereum.org/EIPS/eip-606',\n    status: 'Final',\n    gasConfig: {},\n    gasPrices: {\n        delegatecall: {\n            v: 40,\n            d: 'Base fee of the DELEGATECALL opcode',\n        },\n    },\n    vm: {},\n    pow: {},\n};\n//# sourceMappingURL=homestead.js.map","export default {\n    name: 'tangerineWhistle',\n    comment: 'Hardfork with gas cost changes for IO-heavy operations',\n    url: 'https://eips.ethereum.org/EIPS/eip-608',\n    status: 'Final',\n    gasConfig: {},\n    gasPrices: {\n        sload: {\n            v: 200,\n            d: 'Once per SLOAD operation',\n        },\n        call: {\n            v: 700,\n            d: 'Once per CALL operation & message call transaction',\n        },\n        extcodesize: {\n            v: 700,\n            d: 'Base fee of the EXTCODESIZE opcode',\n        },\n        extcodecopy: {\n            v: 700,\n            d: 'Base fee of the EXTCODECOPY opcode',\n        },\n        balance: {\n            v: 400,\n            d: 'Base fee of the BALANCE opcode',\n        },\n        delegatecall: {\n            v: 700,\n            d: 'Base fee of the DELEGATECALL opcode',\n        },\n        callcode: {\n            v: 700,\n            d: 'Base fee of the CALLCODE opcode',\n        },\n        selfdestruct: {\n            v: 5000,\n            d: 'Base fee of the SELFDESTRUCT opcode',\n        },\n    },\n    vm: {},\n    pow: {},\n};\n//# sourceMappingURL=tangerineWhistle.js.map","export default {\n    name: 'spuriousDragon',\n    comment: 'HF with EIPs for simple replay attack protection, EXP cost increase, state trie clearing, contract code size limit',\n    url: 'https://eips.ethereum.org/EIPS/eip-607',\n    status: 'Final',\n    gasConfig: {},\n    gasPrices: {\n        expByte: {\n            v: 50,\n            d: 'Times ceil(log256(exponent)) for the EXP instruction',\n        },\n    },\n    vm: {\n        maxCodeSize: {\n            v: 24576,\n            d: 'Maximum length of contract code',\n        },\n    },\n    pow: {},\n};\n//# sourceMappingURL=spuriousDragon.js.map","export default {\n    name: 'byzantium',\n    comment: 'Hardfork with new precompiles, instructions and other protocol changes',\n    url: 'https://eips.ethereum.org/EIPS/eip-609',\n    status: 'Final',\n    gasConfig: {},\n    gasPrices: {\n        modexpGquaddivisor: {\n            v: 20,\n            d: 'Gquaddivisor from modexp precompile for gas calculation',\n        },\n        ecAdd: {\n            v: 500,\n            d: 'Gas costs for curve addition precompile',\n        },\n        ecMul: {\n            v: 40000,\n            d: 'Gas costs for curve multiplication precompile',\n        },\n        ecPairing: {\n            v: 100000,\n            d: 'Base gas costs for curve pairing precompile',\n        },\n        ecPairingWord: {\n            v: 80000,\n            d: 'Gas costs regarding curve pairing precompile input length',\n        },\n        revert: {\n            v: 0,\n            d: 'Base fee of the REVERT opcode',\n        },\n        staticcall: {\n            v: 700,\n            d: 'Base fee of the STATICCALL opcode',\n        },\n        returndatasize: {\n            v: 2,\n            d: 'Base fee of the RETURNDATASIZE opcode',\n        },\n        returndatacopy: {\n            v: 3,\n            d: 'Base fee of the RETURNDATACOPY opcode',\n        },\n    },\n    vm: {},\n    pow: {\n        minerReward: {\n            v: '3000000000000000000',\n            d: 'the amount a miner get rewarded for mining a block',\n        },\n        difficultyBombDelay: {\n            v: 3000000,\n            d: 'the amount of blocks to delay the difficulty bomb with',\n        },\n    },\n};\n//# sourceMappingURL=byzantium.js.map","export default {\n    name: 'constantinople',\n    comment: 'Postponed hardfork including EIP-1283 (SSTORE gas metering changes)',\n    url: 'https://eips.ethereum.org/EIPS/eip-1013',\n    status: 'Final',\n    gasConfig: {},\n    gasPrices: {\n        netSstoreNoopGas: {\n            v: 200,\n            d: \"Once per SSTORE operation if the value doesn't change\",\n        },\n        netSstoreInitGas: {\n            v: 20000,\n            d: 'Once per SSTORE operation from clean zero',\n        },\n        netSstoreCleanGas: {\n            v: 5000,\n            d: 'Once per SSTORE operation from clean non-zero',\n        },\n        netSstoreDirtyGas: {\n            v: 200,\n            d: 'Once per SSTORE operation from dirty',\n        },\n        netSstoreClearRefund: {\n            v: 15000,\n            d: 'Once per SSTORE operation for clearing an originally existing storage slot',\n        },\n        netSstoreResetRefund: {\n            v: 4800,\n            d: 'Once per SSTORE operation for resetting to the original non-zero value',\n        },\n        netSstoreResetClearRefund: {\n            v: 19800,\n            d: 'Once per SSTORE operation for resetting to the original zero value',\n        },\n        shl: {\n            v: 3,\n            d: 'Base fee of the SHL opcode',\n        },\n        shr: {\n            v: 3,\n            d: 'Base fee of the SHR opcode',\n        },\n        sar: {\n            v: 3,\n            d: 'Base fee of the SAR opcode',\n        },\n        extcodehash: {\n            v: 400,\n            d: 'Base fee of the EXTCODEHASH opcode',\n        },\n        create2: {\n            v: 32000,\n            d: 'Base fee of the CREATE2 opcode',\n        },\n    },\n    vm: {},\n    pow: {\n        minerReward: {\n            v: '2000000000000000000',\n            d: 'The amount a miner gets rewarded for mining a block',\n        },\n        difficultyBombDelay: {\n            v: 5000000,\n            d: 'the amount of blocks to delay the difficulty bomb with',\n        },\n    },\n};\n//# sourceMappingURL=constantinople.js.map","export default {\n    name: 'petersburg',\n    comment: 'Aka constantinopleFix, removes EIP-1283, activate together with or after constantinople',\n    url: 'https://eips.ethereum.org/EIPS/eip-1716',\n    status: 'Final',\n    gasConfig: {},\n    gasPrices: {\n        netSstoreNoopGas: {\n            v: null,\n            d: 'Removed along EIP-1283',\n        },\n        netSstoreInitGas: {\n            v: null,\n            d: 'Removed along EIP-1283',\n        },\n        netSstoreCleanGas: {\n            v: null,\n            d: 'Removed along EIP-1283',\n        },\n        netSstoreDirtyGas: {\n            v: null,\n            d: 'Removed along EIP-1283',\n        },\n        netSstoreClearRefund: {\n            v: null,\n            d: 'Removed along EIP-1283',\n        },\n        netSstoreResetRefund: {\n            v: null,\n            d: 'Removed along EIP-1283',\n        },\n        netSstoreResetClearRefund: {\n            v: null,\n            d: 'Removed along EIP-1283',\n        },\n    },\n    vm: {},\n    pow: {},\n};\n//# sourceMappingURL=petersburg.js.map","export default {\n    name: 'istanbul',\n    comment: 'HF targeted for December 2019 following the Constantinople/Petersburg HF',\n    url: 'https://eips.ethereum.org/EIPS/eip-1679',\n    status: 'Final',\n    gasConfig: {},\n    gasPrices: {\n        blake2Round: {\n            v: 1,\n            d: 'Gas cost per round for the Blake2 F precompile',\n        },\n        ecAdd: {\n            v: 150,\n            d: 'Gas costs for curve addition precompile',\n        },\n        ecMul: {\n            v: 6000,\n            d: 'Gas costs for curve multiplication precompile',\n        },\n        ecPairing: {\n            v: 45000,\n            d: 'Base gas costs for curve pairing precompile',\n        },\n        ecPairingWord: {\n            v: 34000,\n            d: 'Gas costs regarding curve pairing precompile input length',\n        },\n        txDataNonZero: {\n            v: 16,\n            d: 'Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions',\n        },\n        sstoreSentryGasEIP2200: {\n            v: 2300,\n            d: 'Minimum gas required to be present for an SSTORE call, not consumed',\n        },\n        sstoreNoopGasEIP2200: {\n            v: 800,\n            d: \"Once per SSTORE operation if the value doesn't change\",\n        },\n        sstoreDirtyGasEIP2200: {\n            v: 800,\n            d: 'Once per SSTORE operation if a dirty value is changed',\n        },\n        sstoreInitGasEIP2200: {\n            v: 20000,\n            d: 'Once per SSTORE operation from clean zero to non-zero',\n        },\n        sstoreInitRefundEIP2200: {\n            v: 19200,\n            d: 'Once per SSTORE operation for resetting to the original zero value',\n        },\n        sstoreCleanGasEIP2200: {\n            v: 5000,\n            d: 'Once per SSTORE operation from clean non-zero to something else',\n        },\n        sstoreCleanRefundEIP2200: {\n            v: 4200,\n            d: 'Once per SSTORE operation for resetting to the original non-zero value',\n        },\n        sstoreClearRefundEIP2200: {\n            v: 15000,\n            d: 'Once per SSTORE operation for clearing an originally existing storage slot',\n        },\n        balance: {\n            v: 700,\n            d: 'Base fee of the BALANCE opcode',\n        },\n        extcodehash: {\n            v: 700,\n            d: 'Base fee of the EXTCODEHASH opcode',\n        },\n        chainid: {\n            v: 2,\n            d: 'Base fee of the CHAINID opcode',\n        },\n        selfbalance: {\n            v: 5,\n            d: 'Base fee of the SELFBALANCE opcode',\n        },\n        sload: {\n            v: 800,\n            d: 'Base fee of the SLOAD opcode',\n        },\n    },\n    vm: {},\n    pow: {},\n};\n//# sourceMappingURL=istanbul.js.map","export default {\n    name: 'muirGlacier',\n    comment: 'HF to delay the difficulty bomb',\n    url: 'https://eips.ethereum.org/EIPS/eip-2384',\n    status: 'Final',\n    gasConfig: {},\n    gasPrices: {},\n    vm: {},\n    pow: {\n        difficultyBombDelay: {\n            v: 9000000,\n            d: 'the amount of blocks to delay the difficulty bomb with',\n        },\n    },\n};\n//# sourceMappingURL=muirGlacier.js.map","export default {\n    name: 'berlin',\n    comment: 'HF targeted for July 2020 following the Muir Glacier HF',\n    url: 'https://eips.ethereum.org/EIPS/eip-2070',\n    status: 'Final',\n    eips: [2565, 2929, 2718, 2930],\n};\n//# sourceMappingURL=berlin.js.map","export default {\n    name: 'london',\n    comment: 'HF targeted for July 2021 following the Berlin fork',\n    url: 'https://github.com/ethereum/eth1.0-specs/blob/master/network-upgrades/mainnet-upgrades/london.md',\n    status: 'Final',\n    eips: [1559, 3198, 3529, 3541],\n};\n//# sourceMappingURL=london.js.map","export default {\n    name: 'shanghai',\n    comment: 'Next feature hardfork after the merge hardfork having withdrawals, warm coinbase, push0, limit/meter initcode',\n    url: 'https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/shanghai.md',\n    status: 'Final',\n    eips: [3651, 3855, 3860, 4895],\n};\n//# sourceMappingURL=shanghai.js.map","export default {\n    name: 'arrowGlacier',\n    comment: 'HF to delay the difficulty bomb',\n    url: 'https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/arrow-glacier.md',\n    status: 'Final',\n    eips: [4345],\n    gasConfig: {},\n    gasPrices: {},\n    vm: {},\n    pow: {},\n};\n//# sourceMappingURL=arrowGlacier.js.map","export default {\n    name: 'grayGlacier',\n    comment: 'Delaying the difficulty bomb to Mid September 2022',\n    url: 'https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/gray-glacier.md',\n    status: 'Draft',\n    eips: [5133],\n    gasConfig: {},\n    gasPrices: {},\n    vm: {},\n    pow: {},\n};\n//# sourceMappingURL=grayGlacier.js.map","export default {\n    name: 'mergeForkIdTransition',\n    comment: 'Pre-merge hardfork to fork off non-upgraded clients',\n    url: 'https://eips.ethereum.org/EIPS/eip-3675',\n    status: 'Draft',\n    eips: [],\n};\n//# sourceMappingURL=mergeForkIdTransition.js.map","export default {\n    name: 'merge',\n    comment: 'Hardfork to upgrade the consensus mechanism to Proof-of-Stake',\n    url: 'https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/merge.md',\n    status: 'Final',\n    consensus: {\n        type: 'pos',\n        algorithm: 'casper',\n        casper: {},\n    },\n    eips: [3675, 4399],\n};\n//# sourceMappingURL=merge.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport chainstart from './chainstart.js';\nimport dao from './dao.js';\nimport homestead from './homestead.js';\nimport tangerineWhistle from './tangerineWhistle.js';\nimport spuriousDragon from './spuriousDragon.js';\nimport byzantium from './byzantium.js';\nimport constantinople from './constantinople.js';\nimport petersburg from './petersburg.js';\nimport istanbul from './istanbul.js';\nimport muirGlacier from './muirGlacier.js';\nimport berlin from './berlin.js';\nimport london from './london.js';\nimport shanghai from './shanghai.js';\nimport arrowGlacier from './arrowGlacier.js';\nimport grayGlacier from './grayGlacier.js';\nimport mergeForkIdTransition from './mergeForkIdTransition.js';\nimport merge from './merge.js';\nexport const hardforks = {\n    chainstart,\n    homestead,\n    dao,\n    tangerineWhistle,\n    spuriousDragon,\n    byzantium,\n    constantinople,\n    petersburg,\n    istanbul,\n    muirGlacier,\n    berlin,\n    london,\n    shanghai,\n    arrowGlacier,\n    grayGlacier,\n    mergeForkIdTransition,\n    merge,\n};\n//# sourceMappingURL=index.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport pkg from 'crc-32';\nimport { EventEmitter, bytesToHex, hexToBytes, uint8ArrayConcat } from 'web3-utils';\nimport { TypeOutput } from './types.js';\nimport { intToUint8Array, toType, parseGethGenesis } from './utils.js';\nimport goerli from './chains/goerli.js';\nimport mainnet from './chains/mainnet.js';\nimport sepolia from './chains/sepolia.js';\nimport { EIPs } from './eips/index.js';\nimport { Chain, CustomChain, Hardfork } from './enums.js';\nimport { hardforks as HARDFORK_SPECS } from './hardforks/index.js';\nconst { buf: crc32Uint8Array } = pkg;\n/**\n * Common class to access chain and hardfork parameters and to provide\n * a unified and shared view on the network and hardfork state.\n *\n * Use the {@link Common.custom} static constructor for creating simple\n * custom chain {@link Common} objects (more complete custom chain setups\n * can be created via the main constructor and the {@link CommonOpts.customChains} parameter).\n */\nexport class Common extends EventEmitter {\n    /**\n     * Creates a {@link Common} object for a custom chain, based on a standard one.\n     *\n     * It uses all the {@link Chain} parameters from the {@link baseChain} option except the ones overridden\n     * in a provided {@link chainParamsOrName} dictionary. Some usage example:\n     *\n     * ```javascript\n     * Common.custom({chainId: 123})\n     * ```\n     *\n     * There are also selected supported custom chains which can be initialized by using one of the\n     * {@link CustomChains} for {@link chainParamsOrName}, e.g.:\n     *\n     * ```javascript\n     * Common.custom(CustomChains.MaticMumbai)\n     * ```\n     *\n     * Note that these supported custom chains only provide some base parameters (usually the chain and\n     * network ID and a name) and can only be used for selected use cases (e.g. sending a tx with\n     * the `web3-utils/tx` library to a Layer-2 chain).\n     *\n     * @param chainParamsOrName Custom parameter dict (`name` will default to `custom-chain`) or string with name of a supported custom chain\n     * @param opts Custom chain options to set the {@link CustomCommonOpts.baseChain}, selected {@link CustomCommonOpts.hardfork} and others\n     */\n    static custom(chainParamsOrName, opts = {}) {\n        var _a;\n        const baseChain = (_a = opts.baseChain) !== null && _a !== void 0 ? _a : 'mainnet';\n        const standardChainParams = Object.assign({}, Common._getChainParams(baseChain));\n        standardChainParams.name = 'custom-chain';\n        if (typeof chainParamsOrName !== 'string') {\n            return new Common(Object.assign({ chain: Object.assign(Object.assign({}, standardChainParams), chainParamsOrName) }, opts));\n        }\n        if (chainParamsOrName === CustomChain.PolygonMainnet) {\n            return Common.custom({\n                name: CustomChain.PolygonMainnet,\n                chainId: 137,\n                networkId: 137,\n            }, opts);\n        }\n        if (chainParamsOrName === CustomChain.PolygonMumbai) {\n            return Common.custom({\n                name: CustomChain.PolygonMumbai,\n                chainId: 80001,\n                networkId: 80001,\n            }, opts);\n        }\n        if (chainParamsOrName === CustomChain.ArbitrumRinkebyTestnet) {\n            return Common.custom({\n                name: CustomChain.ArbitrumRinkebyTestnet,\n                chainId: 421611,\n                networkId: 421611,\n            }, opts);\n        }\n        if (chainParamsOrName === CustomChain.ArbitrumOne) {\n            return Common.custom({\n                name: CustomChain.ArbitrumOne,\n                chainId: 42161,\n                networkId: 42161,\n            }, opts);\n        }\n        if (chainParamsOrName === CustomChain.xDaiChain) {\n            return Common.custom({\n                name: CustomChain.xDaiChain,\n                chainId: 100,\n                networkId: 100,\n            }, opts);\n        }\n        if (chainParamsOrName === CustomChain.OptimisticKovan) {\n            return Common.custom({\n                name: CustomChain.OptimisticKovan,\n                chainId: 69,\n                networkId: 69,\n            }, Object.assign({ hardfork: Hardfork.Berlin }, opts));\n        }\n        if (chainParamsOrName === CustomChain.OptimisticEthereum) {\n            return Common.custom({\n                name: CustomChain.OptimisticEthereum,\n                chainId: 10,\n                networkId: 10,\n            }, Object.assign({ hardfork: Hardfork.Berlin }, opts));\n        }\n        // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n        throw new Error(`Custom chain ${chainParamsOrName} not supported`);\n    }\n    /**\n     * Static method to load and set common from a geth genesis json\n     * @param genesisJson json of geth configuration\n     * @param { chain, eips, genesisHash, hardfork, mergeForkIdPostMerge } to further configure the common instance\n     * @returns Common\n     */\n    static fromGethGenesis(\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    genesisJson, { chain, eips, genesisHash, hardfork, mergeForkIdPostMerge }) {\n        var _a;\n        const genesisParams = parseGethGenesis(genesisJson, chain, mergeForkIdPostMerge);\n        const common = new Common({\n            chain: (_a = genesisParams.name) !== null && _a !== void 0 ? _a : 'custom',\n            customChains: [genesisParams],\n            eips,\n            hardfork: hardfork !== null && hardfork !== void 0 ? hardfork : genesisParams.hardfork,\n        });\n        if (genesisHash !== undefined) {\n            common.setForkHashes(genesisHash);\n        }\n        return common;\n    }\n    /**\n     * Static method to determine if a {@link chainId} is supported as a standard chain\n     * @param chainId bigint id (`1`) of a standard chain\n     * @returns boolean\n     */\n    static isSupportedChainId(chainId) {\n        const initializedChains = this._getInitializedChains();\n        return Boolean(initializedChains.names[chainId.toString()]);\n    }\n    static _getChainParams(_chain, customChains) {\n        let chain = _chain;\n        const initializedChains = this._getInitializedChains(customChains);\n        if (typeof chain === 'number' || typeof chain === 'bigint') {\n            chain = chain.toString();\n            if (initializedChains.names[chain]) {\n                const name = initializedChains.names[chain];\n                return initializedChains[name];\n            }\n            throw new Error(`Chain with ID ${chain} not supported`);\n        }\n        if (initializedChains[chain] !== undefined) {\n            return initializedChains[chain];\n        }\n        throw new Error(`Chain with name ${chain} not supported`);\n    }\n    constructor(opts) {\n        var _a, _b;\n        super();\n        this._eips = [];\n        this._customChains = (_a = opts.customChains) !== null && _a !== void 0 ? _a : [];\n        this._chainParams = this.setChain(opts.chain);\n        this.DEFAULT_HARDFORK = (_b = this._chainParams.defaultHardfork) !== null && _b !== void 0 ? _b : Hardfork.Merge;\n        // Assign hardfork changes in the sequence of the applied hardforks\n        this.HARDFORK_CHANGES = this.hardforks().map(hf => [\n            hf.name,\n            HARDFORK_SPECS[hf.name],\n        ]);\n        this._hardfork = this.DEFAULT_HARDFORK;\n        if (opts.hardfork !== undefined) {\n            this.setHardfork(opts.hardfork);\n        }\n        if (opts.eips) {\n            this.setEIPs(opts.eips);\n        }\n    }\n    /**\n     * Sets the chain\n     * @param chain String ('mainnet') or Number (1) chain representation.\n     *              Or, a Dictionary of chain parameters for a private network.\n     * @returns The dictionary with parameters set as chain\n     */\n    setChain(chain) {\n        if (typeof chain === 'number' || typeof chain === 'bigint' || typeof chain === 'string') {\n            this._chainParams = Common._getChainParams(chain, this._customChains);\n        }\n        else if (typeof chain === 'object') {\n            if (this._customChains.length > 0) {\n                throw new Error('Chain must be a string, number, or bigint when initialized with customChains passed in');\n            }\n            const required = ['networkId', 'genesis', 'hardforks', 'bootstrapNodes'];\n            for (const param of required) {\n                if (!(param in chain)) {\n                    throw new Error(`Missing required chain parameter: ${param}`);\n                }\n            }\n            this._chainParams = chain;\n        }\n        else {\n            throw new Error('Wrong input format');\n        }\n        for (const hf of this.hardforks()) {\n            if (hf.block === undefined) {\n                throw new Error(`Hardfork cannot have undefined block number`);\n            }\n        }\n        return this._chainParams;\n    }\n    /**\n     * Sets the hardfork to get params for\n     * @param hardfork String identifier (e.g. 'byzantium') or {@link Hardfork} enum\n     */\n    setHardfork(hardfork) {\n        let existing = false;\n        for (const hfChanges of this.HARDFORK_CHANGES) {\n            if (hfChanges[0] === hardfork) {\n                if (this._hardfork !== hardfork) {\n                    this._hardfork = hardfork;\n                    this.emit('hardforkChanged', hardfork);\n                }\n                existing = true;\n            }\n        }\n        if (!existing) {\n            throw new Error(`Hardfork with name ${hardfork} not supported`);\n        }\n    }\n    /**\n     * Returns the hardfork based on the block number or an optional\n     * total difficulty (Merge HF) provided.\n     *\n     * An optional TD takes precedence in case the corresponding HF block\n     * is set to `null` or otherwise needs to match (if not an error\n     * will be thrown).\n     *\n     * @param blockNumber\n     * @param td : total difficulty of the parent block (for block hf) OR of the chain latest (for chain hf)\n     * @param timestamp: timestamp in seconds at which block was/is to be minted\n     * @returns The name of the HF\n     */\n    getHardforkByBlockNumber(_blockNumber, _td, _timestamp) {\n        const blockNumber = toType(_blockNumber, TypeOutput.BigInt);\n        const td = toType(_td, TypeOutput.BigInt);\n        const timestamp = toType(_timestamp, TypeOutput.Number);\n        // Filter out hardforks with no block number, no ttd or no timestamp (i.e. unapplied hardforks)\n        const hfs = this.hardforks().filter(hf => \n        // eslint-disable-next-line no-null/no-null\n        hf.block !== null ||\n            // eslint-disable-next-line no-null/no-null\n            (hf.ttd !== null && hf.ttd !== undefined) ||\n            hf.timestamp !== undefined);\n        // eslint-disable-next-line no-null/no-null\n        const mergeIndex = hfs.findIndex(hf => hf.ttd !== null && hf.ttd !== undefined);\n        const doubleTTDHF = hfs\n            .slice(mergeIndex + 1)\n            // eslint-disable-next-line no-null/no-null\n            .findIndex(hf => hf.ttd !== null && hf.ttd !== undefined);\n        if (doubleTTDHF >= 0) {\n            throw Error(`More than one merge hardforks found with ttd specified`);\n        }\n        // Find the first hardfork that has a block number greater than `blockNumber`\n        // (skips the merge hardfork since it cannot have a block number specified).\n        // If timestamp is not provided, it also skips timestamps hardforks to continue\n        // discovering/checking number hardforks.\n        let hfIndex = hfs.findIndex(hf => \n        // eslint-disable-next-line no-null/no-null\n        (hf.block !== null && hf.block > blockNumber) ||\n            (timestamp !== undefined && Number(hf.timestamp) > timestamp));\n        if (hfIndex === -1) {\n            // all hardforks apply, set hfIndex to the last one as that's the candidate\n            hfIndex = hfs.length;\n        }\n        else if (hfIndex === 0) {\n            // cannot have a case where a block number is before all applied hardforks\n            // since the chain has to start with a hardfork\n            throw Error('Must have at least one hardfork at block 0');\n        }\n        // If timestamp is not provided, we need to rollback to the last hf with block or ttd\n        if (timestamp === undefined) {\n            const stepBack = hfs\n                .slice(0, hfIndex)\n                .reverse()\n                // eslint-disable-next-line no-null/no-null\n                .findIndex(hf => hf.block !== null || hf.ttd !== undefined);\n            hfIndex -= stepBack;\n        }\n        // Move hfIndex one back to arrive at candidate hardfork\n        hfIndex -= 1;\n        // If the timestamp was not provided, we could have skipped timestamp hardforks to look for number\n        // hardforks. so it will now be needed to rollback\n        // eslint-disable-next-line no-null/no-null\n        if (hfs[hfIndex].block === null && hfs[hfIndex].timestamp === undefined) {\n            // We're on the merge hardfork.  Let's check the TTD\n            // eslint-disable-next-line no-null/no-null\n            if (td === undefined || td === null || BigInt(hfs[hfIndex].ttd) > td) {\n                // Merge ttd greater than current td so we're on hardfork before merge\n                hfIndex -= 1;\n            }\n            // eslint-disable-next-line no-null/no-null\n        }\n        else if (mergeIndex >= 0 && td !== undefined && td !== null) {\n            if (hfIndex >= mergeIndex && BigInt(hfs[mergeIndex].ttd) > td) {\n                throw Error('Maximum HF determined by total difficulty is lower than the block number HF');\n            }\n            else if (hfIndex < mergeIndex && BigInt(hfs[mergeIndex].ttd) <= td) {\n                throw Error('HF determined by block number is lower than the minimum total difficulty HF');\n            }\n        }\n        const hfStartIndex = hfIndex;\n        // Move the hfIndex to the end of the hardforks that might be scheduled on the same block/timestamp\n        // This won't anyway be the case with Merge hfs\n        for (; hfIndex < hfs.length - 1; hfIndex += 1) {\n            // break out if hfIndex + 1 is not scheduled at hfIndex\n            if (hfs[hfIndex].block !== hfs[hfIndex + 1].block ||\n                hfs[hfIndex].timestamp !== hfs[hfIndex + 1].timestamp) {\n                break;\n            }\n        }\n        if (timestamp) {\n            const minTimeStamp = hfs\n                .slice(0, hfStartIndex)\n                .reduce((acc, hf) => { var _a; return Math.max(Number((_a = hf.timestamp) !== null && _a !== void 0 ? _a : '0'), acc); }, 0);\n            if (minTimeStamp > timestamp) {\n                throw Error(`Maximum HF determined by timestamp is lower than the block number/ttd HF`);\n            }\n            const maxTimeStamp = hfs\n                .slice(hfIndex + 1)\n                .reduce((acc, hf) => { var _a; return Math.min(Number((_a = hf.timestamp) !== null && _a !== void 0 ? _a : timestamp), acc); }, timestamp);\n            if (maxTimeStamp < timestamp) {\n                throw Error(`Maximum HF determined by block number/ttd is lower than timestamp HF`);\n            }\n        }\n        const hardfork = hfs[hfIndex];\n        return hardfork.name;\n    }\n    /**\n     * Sets a new hardfork based on the block number or an optional\n     * total difficulty (Merge HF) provided.\n     *\n     * An optional TD takes precedence in case the corresponding HF block\n     * is set to `null` or otherwise needs to match (if not an error\n     * will be thrown).\n     *\n     * @param blockNumber\n     * @param td\n     * @param timestamp\n     * @returns The name of the HF set\n     */\n    setHardforkByBlockNumber(blockNumber, td, timestamp) {\n        const hardfork = this.getHardforkByBlockNumber(blockNumber, td, timestamp);\n        this.setHardfork(hardfork);\n        return hardfork;\n    }\n    /**\n     * Internal helper function, returns the params for the given hardfork for the chain set\n     * @param hardfork Hardfork name\n     * @returns Dictionary with hardfork params or null if hardfork not on chain\n     */\n    // eslint-disable-next-line @typescript-eslint/ban-types\n    _getHardfork(hardfork) {\n        const hfs = this.hardforks();\n        for (const hf of hfs) {\n            if (hf.name === hardfork)\n                return hf;\n        }\n        // eslint-disable-next-line no-null/no-null\n        return null;\n    }\n    /**\n     * Sets the active EIPs\n     * @param eips\n     */\n    setEIPs(eips = []) {\n        for (const eip of eips) {\n            if (!(eip in EIPs)) {\n                throw new Error(`${eip} not supported`);\n            }\n            // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-argument\n            const minHF = this.gteHardfork(EIPs[eip].minimumHardfork);\n            if (!minHF) {\n                throw new Error(\n                // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n                `${eip} cannot be activated on hardfork ${this.hardfork()}, minimumHardfork: ${minHF}`);\n            }\n            // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n            if (EIPs[eip].requiredEIPs !== undefined) {\n                // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n                for (const elem of EIPs[eip].requiredEIPs) {\n                    // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n                    if (!(eips.includes(elem) || this.isActivatedEIP(elem))) {\n                        throw new Error(\n                        // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n                        `${eip} requires EIP ${elem}, but is not included in the EIP list`);\n                    }\n                }\n            }\n        }\n        this._eips = eips;\n    }\n    /**\n     * Returns a parameter for the current chain setup\n     *\n     * If the parameter is present in an EIP, the EIP always takes precedence.\n     * Otherwise the parameter if taken from the latest applied HF with\n     * a change on the respective parameter.\n     *\n     * @param topic Parameter topic ('gasConfig', 'gasPrices', 'vm', 'pow')\n     * @param name Parameter name (e.g. 'minGasLimit' for 'gasConfig' topic)\n     * @returns The value requested or `BigInt(0)` if not found\n     */\n    param(topic, name) {\n        // TODO: consider the case that different active EIPs\n        // can change the same parameter\n        let value;\n        for (const eip of this._eips) {\n            value = this.paramByEIP(topic, name, eip);\n            if (value !== undefined)\n                return value;\n        }\n        return this.paramByHardfork(topic, name, this._hardfork);\n    }\n    /**\n     * Returns the parameter corresponding to a hardfork\n     * @param topic Parameter topic ('gasConfig', 'gasPrices', 'vm', 'pow')\n     * @param name Parameter name (e.g. 'minGasLimit' for 'gasConfig' topic)\n     * @param hardfork Hardfork name\n     * @returns The value requested or `BigInt(0)` if not found\n     */\n    paramByHardfork(topic, name, hardfork) {\n        // eslint-disable-next-line no-null/no-null\n        let value = null;\n        for (const hfChanges of this.HARDFORK_CHANGES) {\n            // EIP-referencing HF file (e.g. berlin.json)\n            if ('eips' in hfChanges[1]) {\n                // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment\n                const hfEIPs = hfChanges[1].eips;\n                for (const eip of hfEIPs) {\n                    // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n                    const valueEIP = this.paramByEIP(topic, name, eip);\n                    // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n                    value = typeof valueEIP === 'bigint' ? valueEIP : value;\n                }\n                // Parameter-inlining HF file (e.g. istanbul.json)\n            }\n            else {\n                // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n                if (hfChanges[1][topic] === undefined) {\n                    throw new Error(`Topic ${topic} not defined`);\n                }\n                // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n                if (hfChanges[1][topic][name] !== undefined) {\n                    // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment\n                    value = hfChanges[1][topic][name].v;\n                }\n            }\n            if (hfChanges[0] === hardfork)\n                break;\n        }\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n        return BigInt(value !== null && value !== void 0 ? value : 0);\n    }\n    /**\n     * Returns a parameter corresponding to an EIP\n     * @param topic Parameter topic ('gasConfig', 'gasPrices', 'vm', 'pow')\n     * @param name Parameter name (e.g. 'minGasLimit' for 'gasConfig' topic)\n     * @param eip Number of the EIP\n     * @returns The value requested or `undefined` if not found\n     */\n    // eslint-disable-next-line class-methods-use-this\n    paramByEIP(topic, name, eip) {\n        if (!(eip in EIPs)) {\n            throw new Error(`${eip} not supported`);\n        }\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n        const eipParams = EIPs[eip];\n        if (!(topic in eipParams)) {\n            throw new Error(`Topic ${topic} not defined`);\n        }\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n        if (eipParams[topic][name] === undefined) {\n            return undefined;\n        }\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment\n        const value = eipParams[topic][name].v;\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n        return BigInt(value);\n    }\n    /**\n     * Returns a parameter for the hardfork active on block number or\n     * optional provided total difficulty (Merge HF)\n     * @param topic Parameter topic\n     * @param name Parameter name\n     * @param blockNumber Block number\n     * @param td Total difficulty\n     *    * @returns The value requested or `BigInt(0)` if not found\n     */\n    paramByBlock(topic, name, blockNumber, td, timestamp) {\n        const hardfork = this.getHardforkByBlockNumber(blockNumber, td, timestamp);\n        return this.paramByHardfork(topic, name, hardfork);\n    }\n    /**\n     * Checks if an EIP is activated by either being included in the EIPs\n     * manually passed in with the {@link CommonOpts.eips} or in a\n     * hardfork currently being active\n     *\n     * Note: this method only works for EIPs being supported\n     * by the {@link CommonOpts.eips} constructor option\n     * @param eip\n     */\n    isActivatedEIP(eip) {\n        if (this.eips().includes(eip)) {\n            return true;\n        }\n        for (const hfChanges of this.HARDFORK_CHANGES) {\n            // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n            const hf = hfChanges[1];\n            // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-argument\n            if (this.gteHardfork(hf.name) && 'eips' in hf) {\n                // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n                if (hf.eips.includes(eip)) {\n                    return true;\n                }\n            }\n        }\n        return false;\n    }\n    /**\n     * Checks if set or provided hardfork is active on block number\n     * @param hardfork Hardfork name or null (for HF set)\n     * @param blockNumber\n     * @returns True if HF is active on block number\n     */\n    hardforkIsActiveOnBlock(\n    // eslint-disable-next-line @typescript-eslint/ban-types\n    _hardfork, _blockNumber) {\n        const blockNumber = toType(_blockNumber, TypeOutput.BigInt);\n        const hardfork = _hardfork !== null && _hardfork !== void 0 ? _hardfork : this._hardfork;\n        const hfBlock = this.hardforkBlock(hardfork);\n        if (typeof hfBlock === 'bigint' && hfBlock !== BigInt(0) && blockNumber >= hfBlock) {\n            return true;\n        }\n        return false;\n    }\n    /**\n     * Alias to hardforkIsActiveOnBlock when hardfork is set\n     * @param blockNumber\n     * @returns True if HF is active on block number\n     */\n    activeOnBlock(blockNumber) {\n        // eslint-disable-next-line no-null/no-null\n        return this.hardforkIsActiveOnBlock(null, blockNumber);\n    }\n    /**\n     * Sequence based check if given or set HF1 is greater than or equal HF2\n     * @param hardfork1 Hardfork name or null (if set)\n     * @param hardfork2 Hardfork name\n     * @param opts Hardfork options\n     * @returns True if HF1 gte HF2\n     */\n    hardforkGteHardfork(\n    // eslint-disable-next-line @typescript-eslint/ban-types\n    _hardfork1, hardfork2) {\n        const hardfork1 = _hardfork1 !== null && _hardfork1 !== void 0 ? _hardfork1 : this._hardfork;\n        const hardforks = this.hardforks();\n        let posHf1 = -1;\n        let posHf2 = -1;\n        let index = 0;\n        for (const hf of hardforks) {\n            if (hf.name === hardfork1)\n                posHf1 = index;\n            if (hf.name === hardfork2)\n                posHf2 = index;\n            index += 1;\n        }\n        return posHf1 >= posHf2 && posHf2 !== -1;\n    }\n    /**\n     * Alias to hardforkGteHardfork when hardfork is set\n     * @param hardfork Hardfork name\n     * @returns True if hardfork set is greater than hardfork provided\n     */\n    gteHardfork(hardfork) {\n        // eslint-disable-next-line no-null/no-null\n        return this.hardforkGteHardfork(null, hardfork);\n    }\n    /**\n     * Returns the hardfork change block for hardfork provided or set\n     * @param hardfork Hardfork name, optional if HF set\n     * @returns Block number or null if unscheduled\n     */\n    // eslint-disable-next-line @typescript-eslint/ban-types\n    hardforkBlock(_hardfork) {\n        var _a;\n        const hardfork = _hardfork !== null && _hardfork !== void 0 ? _hardfork : this._hardfork;\n        const block = (_a = this._getHardfork(hardfork)) === null || _a === void 0 ? void 0 : _a.block;\n        // eslint-disable-next-line no-null/no-null\n        if (block === undefined || block === null) {\n            // eslint-disable-next-line no-null/no-null\n            return null;\n        }\n        return BigInt(block);\n    }\n    // eslint-disable-next-line @typescript-eslint/ban-types\n    hardforkTimestamp(_hardfork) {\n        var _a;\n        const hardfork = _hardfork !== null && _hardfork !== void 0 ? _hardfork : this._hardfork;\n        const timestamp = (_a = this._getHardfork(hardfork)) === null || _a === void 0 ? void 0 : _a.timestamp;\n        // eslint-disable-next-line no-null/no-null\n        if (timestamp === undefined || timestamp === null) {\n            // eslint-disable-next-line no-null/no-null\n            return null;\n        }\n        return BigInt(timestamp);\n    }\n    /**\n     * Returns the hardfork change block for eip\n     * @param eip EIP number\n     * @returns Block number or null if unscheduled\n     */\n    // eslint-disable-next-line @typescript-eslint/ban-types\n    eipBlock(eip) {\n        for (const hfChanges of this.HARDFORK_CHANGES) {\n            // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n            const hf = hfChanges[1];\n            if ('eips' in hf) {\n                // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call\n                if (hf.eips.includes(eip)) {\n                    return this.hardforkBlock(typeof hfChanges[0] === 'number' ? String(hfChanges[0]) : hfChanges[0]);\n                }\n            }\n        }\n        // eslint-disable-next-line no-null/no-null\n        return null;\n    }\n    /**\n     * Returns the hardfork change total difficulty (Merge HF) for hardfork provided or set\n     * @param hardfork Hardfork name, optional if HF set\n     * @returns Total difficulty or null if no set\n     */\n    // eslint-disable-next-line @typescript-eslint/ban-types\n    hardforkTTD(_hardfork) {\n        var _a;\n        const hardfork = _hardfork !== null && _hardfork !== void 0 ? _hardfork : this._hardfork;\n        const ttd = (_a = this._getHardfork(hardfork)) === null || _a === void 0 ? void 0 : _a.ttd;\n        // eslint-disable-next-line no-null/no-null\n        if (ttd === undefined || ttd === null) {\n            // eslint-disable-next-line no-null/no-null\n            return null;\n        }\n        return BigInt(ttd);\n    }\n    /**\n     * True if block number provided is the hardfork (given or set) change block\n     * @param blockNumber Number of the block to check\n     * @param hardfork Hardfork name, optional if HF set\n     * @returns True if blockNumber is HF block\n     * @deprecated\n     */\n    isHardforkBlock(_blockNumber, _hardfork) {\n        const blockNumber = toType(_blockNumber, TypeOutput.BigInt);\n        const hardfork = _hardfork !== null && _hardfork !== void 0 ? _hardfork : this._hardfork;\n        const block = this.hardforkBlock(hardfork);\n        return typeof block === 'bigint' && block !== BigInt(0) ? block === blockNumber : false;\n    }\n    /**\n     * Returns the change block for the next hardfork after the hardfork provided or set\n     * @param hardfork Hardfork name, optional if HF set\n     * @returns Block timestamp, number or null if not available\n     */\n    // eslint-disable-next-line @typescript-eslint/ban-types\n    nextHardforkBlockOrTimestamp(_hardfork) {\n        var _a, _b, _c;\n        const hardfork = (_a = _hardfork) !== null && _a !== void 0 ? _a : this._hardfork;\n        const hfs = this.hardforks();\n        let hfIndex = hfs.findIndex(hf => hf.name === hardfork);\n        // If the current hardfork is merge, go one behind as merge hf is not part of these\n        // calcs even if the merge hf block is set\n        if (hardfork === Hardfork.Merge) {\n            hfIndex -= 1;\n        }\n        // Hardfork not found\n        if (hfIndex < 0) {\n            // eslint-disable-next-line no-null/no-null\n            return null;\n        }\n        let currHfTimeOrBlock = (_b = hfs[hfIndex].timestamp) !== null && _b !== void 0 ? _b : hfs[hfIndex].block;\n        currHfTimeOrBlock =\n            // eslint-disable-next-line no-null/no-null\n            currHfTimeOrBlock !== null && currHfTimeOrBlock !== undefined\n                ? Number(currHfTimeOrBlock)\n                : // eslint-disable-next-line no-null/no-null\n                    null;\n        const nextHf = hfs.slice(hfIndex + 1).find(hf => {\n            var _a;\n            let hfTimeOrBlock = (_a = hf.timestamp) !== null && _a !== void 0 ? _a : hf.block;\n            hfTimeOrBlock =\n                // eslint-disable-next-line no-null/no-null\n                hfTimeOrBlock !== null && hfTimeOrBlock !== undefined\n                    ? Number(hfTimeOrBlock)\n                    : // eslint-disable-next-line no-null/no-null\n                        null;\n            return (hf.name !== Hardfork.Merge &&\n                // eslint-disable-next-line no-null/no-null\n                hfTimeOrBlock !== null &&\n                hfTimeOrBlock !== undefined &&\n                hfTimeOrBlock !== currHfTimeOrBlock);\n        });\n        // If no next hf found with valid block or timestamp return null\n        if (nextHf === undefined) {\n            // eslint-disable-next-line no-null/no-null\n            return null;\n        }\n        const nextHfBlock = (_c = nextHf.timestamp) !== null && _c !== void 0 ? _c : nextHf.block;\n        // eslint-disable-next-line no-null/no-null\n        if (nextHfBlock === null || nextHfBlock === undefined) {\n            // eslint-disable-next-line no-null/no-null\n            return null;\n        }\n        return BigInt(nextHfBlock);\n    }\n    /**\n     * Returns the change block for the next hardfork after the hardfork provided or set\n     * @param hardfork Hardfork name, optional if HF set\n     * @returns Block number or null if not available\n     * @deprecated\n     */\n    // eslint-disable-next-line @typescript-eslint/ban-types\n    nextHardforkBlock(_hardfork) {\n        var _a;\n        const hardfork = (_a = _hardfork) !== null && _a !== void 0 ? _a : this._hardfork;\n        let hfBlock = this.hardforkBlock(hardfork);\n        // If this is a merge hardfork with block not set, then we fallback to previous hardfork\n        // to find the nextHardforkBlock\n        // eslint-disable-next-line no-null/no-null\n        if (hfBlock === null && hardfork === Hardfork.Merge) {\n            const hfs = this.hardforks();\n            // eslint-disable-next-line no-null/no-null\n            const mergeIndex = hfs.findIndex(hf => hf.ttd !== null && hf.ttd !== undefined);\n            if (mergeIndex < 0) {\n                throw Error(`Merge hardfork should have been found`);\n            }\n            hfBlock = this.hardforkBlock(hfs[mergeIndex - 1].name);\n        }\n        // eslint-disable-next-line no-null/no-null\n        if (hfBlock === null) {\n            // eslint-disable-next-line no-null/no-null\n            return null;\n        }\n        // Next fork block number or null if none available\n        // Logic: if accumulator is still null and on the first occurrence of\n        // a block greater than the current hfBlock set the accumulator,\n        // pass on the accumulator as the final result from this time on\n        // eslint-disable-next-line no-null/no-null, @typescript-eslint/ban-types\n        const nextHfBlock = this.hardforks().reduce((acc, hf) => {\n            // We need to ignore the merge block in our next hardfork calc\n            const block = BigInt(\n            // eslint-disable-next-line no-null/no-null\n            hf.block === null || (hf.ttd !== undefined && hf.ttd !== null) ? 0 : hf.block);\n            // TypeScript can't seem to follow that the hfBlock is not null at this point\n            // eslint-disable-next-line no-null/no-null\n            return block > hfBlock && acc === null ? block : acc;\n            // eslint-disable-next-line no-null/no-null\n        }, null);\n        return nextHfBlock;\n    }\n    /**\n     * True if block number provided is the hardfork change block following the hardfork given or set\n     * @param blockNumber Number of the block to check\n     * @param hardfork Hardfork name, optional if HF set\n     * @returns True if blockNumber is HF block\n     * @deprecated\n     */\n    isNextHardforkBlock(_blockNumber, _hardfork) {\n        const blockNumber = toType(_blockNumber, TypeOutput.BigInt);\n        const hardfork = _hardfork !== null && _hardfork !== void 0 ? _hardfork : this._hardfork;\n        // eslint-disable-next-line deprecation/deprecation\n        const nextHardforkBlock = this.nextHardforkBlock(hardfork);\n        // eslint-disable-next-line no-null/no-null\n        return nextHardforkBlock === null ? false : nextHardforkBlock === blockNumber;\n    }\n    /**\n     * Internal helper function to calculate a fork hash\n     * @param hardfork Hardfork name\n     * @param genesisHash Genesis block hash of the chain\n     * @returns Fork hash as hex string\n     */\n    _calcForkHash(hardfork, genesisHash) {\n        let hfUint8Array = new Uint8Array();\n        let prevBlockOrTime = 0;\n        for (const hf of this.hardforks()) {\n            const { block, timestamp, name } = hf;\n            // Timestamp to be used for timestamp based hfs even if we may bundle\n            // block number with them retrospectively\n            let blockOrTime = timestamp !== null && timestamp !== void 0 ? timestamp : block;\n            // eslint-disable-next-line no-null/no-null\n            blockOrTime = blockOrTime !== null ? Number(blockOrTime) : null;\n            // Skip for chainstart (0), not applied HFs (null) and\n            // when already applied on same blockOrTime HFs\n            // and on the merge since forkhash doesn't change on merge hf\n            if (typeof blockOrTime === 'number' &&\n                blockOrTime !== 0 &&\n                blockOrTime !== prevBlockOrTime &&\n                name !== Hardfork.Merge) {\n                const hfBlockUint8Array = hexToBytes(blockOrTime.toString(16).padStart(16, '0'));\n                hfUint8Array = uint8ArrayConcat(hfUint8Array, hfBlockUint8Array);\n                prevBlockOrTime = blockOrTime;\n            }\n            if (hf.name === hardfork)\n                break;\n        }\n        const inputUint8Array = uint8ArrayConcat(genesisHash, hfUint8Array);\n        // CRC32 delivers result as signed (negative) 32-bit integer,\n        // convert to hex string\n        // eslint-disable-next-line no-bitwise\n        const forkhash = bytesToHex(intToUint8Array(crc32Uint8Array(inputUint8Array) >>> 0));\n        return forkhash;\n    }\n    /**\n     * Returns an eth/64 compliant fork hash (EIP-2124)\n     * @param hardfork Hardfork name, optional if HF set\n     * @param genesisHash Genesis block hash of the chain, optional if already defined and not needed to be calculated\n     */\n    forkHash(_hardfork, genesisHash) {\n        const hardfork = _hardfork !== null && _hardfork !== void 0 ? _hardfork : this._hardfork;\n        const data = this._getHardfork(hardfork);\n        if (\n        // eslint-disable-next-line no-null/no-null\n        data === null ||\n            // eslint-disable-next-line no-null/no-null\n            ((data === null || data === void 0 ? void 0 : data.block) === null && (data === null || data === void 0 ? void 0 : data.timestamp) === undefined && (data === null || data === void 0 ? void 0 : data.ttd) === undefined)) {\n            const msg = 'No fork hash calculation possible for future hardfork';\n            throw new Error(msg);\n        }\n        // eslint-disable-next-line no-null/no-null\n        if ((data === null || data === void 0 ? void 0 : data.forkHash) !== null && (data === null || data === void 0 ? void 0 : data.forkHash) !== undefined) {\n            return data.forkHash;\n        }\n        if (!genesisHash)\n            throw new Error('genesisHash required for forkHash calculation');\n        return this._calcForkHash(hardfork, genesisHash);\n    }\n    /**\n     *\n     * @param forkHash Fork hash as a hex string\n     * @returns Array with hardfork data (name, block, forkHash)\n     */\n    // eslint-disable-next-line @typescript-eslint/ban-types\n    hardforkForForkHash(forkHash) {\n        const resArray = this.hardforks().filter((hf) => hf.forkHash === forkHash);\n        // eslint-disable-next-line no-null/no-null\n        return resArray.length >= 1 ? resArray[resArray.length - 1] : null;\n    }\n    /**\n     * Sets any missing forkHashes on the passed-in {@link Common} instance\n     * @param common The {@link Common} to set the forkHashes for\n     * @param genesisHash The genesis block hash\n     */\n    setForkHashes(genesisHash) {\n        var _a;\n        for (const hf of this.hardforks()) {\n            const blockOrTime = (_a = hf.timestamp) !== null && _a !== void 0 ? _a : hf.block;\n            if (\n            // eslint-disable-next-line no-null/no-null\n            (hf.forkHash === null || hf.forkHash === undefined) &&\n                // eslint-disable-next-line no-null/no-null\n                ((blockOrTime !== null && blockOrTime !== undefined) ||\n                    typeof hf.ttd !== 'undefined')) {\n                hf.forkHash = this.forkHash(hf.name, genesisHash);\n            }\n        }\n    }\n    /**\n     * Returns the Genesis parameters of the current chain\n     * @returns Genesis dictionary\n     */\n    genesis() {\n        return this._chainParams.genesis;\n    }\n    /**\n     * Returns the hardforks for current chain\n     * @returns {Array} Array with arrays of hardforks\n     */\n    hardforks() {\n        return this._chainParams.hardforks;\n    }\n    /**\n     * Returns bootstrap nodes for the current chain\n     * @returns {Dictionary} Dict with bootstrap nodes\n     */\n    bootstrapNodes() {\n        return this._chainParams.bootstrapNodes;\n    }\n    /**\n     * Returns DNS networks for the current chain\n     * @returns {String[]} Array of DNS ENR urls\n     */\n    dnsNetworks() {\n        return this._chainParams.dnsNetworks;\n    }\n    /**\n     * Returns the hardfork set\n     * @returns Hardfork name\n     */\n    hardfork() {\n        return this._hardfork;\n    }\n    /**\n     * Returns the Id of current chain\n     * @returns chain Id\n     */\n    chainId() {\n        return BigInt(this._chainParams.chainId);\n    }\n    /**\n     * Returns the name of current chain\n     * @returns chain name (lower case)\n     */\n    chainName() {\n        return this._chainParams.name;\n    }\n    /**\n     * Returns the Id of current network\n     * @returns network Id\n     */\n    networkId() {\n        return BigInt(this._chainParams.networkId);\n    }\n    /**\n     * Returns the active EIPs\n     * @returns List of EIPs\n     */\n    eips() {\n        return this._eips;\n    }\n    /**\n     * Returns the consensus type of the network\n     * Possible values: \"pow\"|\"poa\"|\"pos\"\n     *\n     * Note: This value can update along a Hardfork.\n     */\n    consensusType() {\n        const hardfork = this.hardfork();\n        let value;\n        for (const hfChanges of this.HARDFORK_CHANGES) {\n            if ('consensus' in hfChanges[1]) {\n                // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment\n                value = hfChanges[1].consensus.type;\n            }\n            if (hfChanges[0] === hardfork)\n                break;\n        }\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n        return value !== null && value !== void 0 ? value : this._chainParams.consensus.type;\n    }\n    /**\n     * Returns the concrete consensus implementation\n     * algorithm or protocol for the network\n     * e.g. \"ethash\" for \"pow\" consensus type,\n     * \"clique\" for \"poa\" consensus type or\n     * \"casper\" for \"pos\" consensus type.\n     *\n     * Note: This value can update along a Hardfork.\n     */\n    consensusAlgorithm() {\n        const hardfork = this.hardfork();\n        let value;\n        for (const hfChanges of this.HARDFORK_CHANGES) {\n            if ('consensus' in hfChanges[1]) {\n                // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment\n                value = hfChanges[1].consensus.algorithm;\n            }\n            if (hfChanges[0] === hardfork)\n                break;\n        }\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n        return value !== null && value !== void 0 ? value : this._chainParams.consensus.algorithm;\n    }\n    /**\n     * Returns a dictionary with consensus configuration\n     * parameters based on the consensus algorithm\n     *\n     * Expected returns (parameters must be present in\n     * the respective chain json files):\n     *\n     * ethash: empty object\n     * clique: period, epoch\n     * casper: empty object\n     *\n     * Note: This value can update along a Hardfork.\n     */\n    consensusConfig() {\n        var _a;\n        const hardfork = this.hardfork();\n        let value;\n        for (const hfChanges of this.HARDFORK_CHANGES) {\n            if ('consensus' in hfChanges[1]) {\n                // The config parameter is named after the respective consensus algorithm\n                // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment\n                value = hfChanges[1].consensus[hfChanges[1].consensus.algorithm];\n            }\n            if (hfChanges[0] === hardfork)\n                break;\n        }\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n        return ((_a = value !== null && value !== void 0 ? value : this._chainParams.consensus[this.consensusAlgorithm()]) !== null && _a !== void 0 ? _a : {});\n    }\n    /**\n     * Returns a deep copy of this {@link Common} instance.\n     */\n    copy() {\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-assignment\n        const copy = Object.assign(Object.create(Object.getPrototypeOf(this)), this);\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call\n        copy.removeAllListeners();\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n        return copy;\n    }\n    static _getInitializedChains(customChains) {\n        const names = {};\n        for (const [name, id] of Object.entries(Chain)) {\n            names[id] = name.toLowerCase();\n        }\n        const chains = { mainnet, goerli, sepolia };\n        if (customChains) {\n            for (const chain of customChains) {\n                const { name } = chain;\n                names[chain.chainId.toString()] = name;\n                chains[name] = chain;\n            }\n        }\n        chains.names = names;\n        return chains;\n    }\n}\n//# sourceMappingURL=common.js.map","/**\n * Can be used in conjunction with {@link Transaction.supports}\n * to query on tx capabilities\n */\nexport var Capability;\n(function (Capability) {\n    /**\n     * Tx supports EIP-155 replay protection\n     * See: [155](https://eips.ethereum.org/EIPS/eip-155) Replay Attack Protection EIP\n     */\n    Capability[Capability[\"EIP155ReplayProtection\"] = 155] = \"EIP155ReplayProtection\";\n    /**\n     * Tx supports EIP-1559 gas fee market mechanism\n     * See: [1559](https://eips.ethereum.org/EIPS/eip-1559) Fee Market EIP\n     */\n    Capability[Capability[\"EIP1559FeeMarket\"] = 1559] = \"EIP1559FeeMarket\";\n    /**\n     * Tx is a typed transaction as defined in EIP-2718\n     * See: [2718](https://eips.ethereum.org/EIPS/eip-2718) Transaction Type EIP\n     */\n    Capability[Capability[\"EIP2718TypedTransaction\"] = 2718] = \"EIP2718TypedTransaction\";\n    /**\n     * Tx supports access list generation as defined in EIP-2930\n     * See: [2930](https://eips.ethereum.org/EIPS/eip-2930) Access Lists EIP\n     */\n    Capability[Capability[\"EIP2930AccessLists\"] = 2930] = \"EIP2930AccessLists\";\n})(Capability || (Capability = {}));\nexport function isAccessListUint8Array(input) {\n    if (input.length === 0) {\n        return true;\n    }\n    const firstItem = input[0];\n    if (Array.isArray(firstItem)) {\n        return true;\n    }\n    return false;\n}\nexport function isAccessList(input) {\n    return !isAccessListUint8Array(input); // This is exactly the same method, except the output is negated.\n}\n//# sourceMappingURL=types.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { keccak256 } from 'ethereum-cryptography/keccak.js';\nimport { bytesToHex, uint8ArrayEquals } from 'web3-utils';\nimport { secp256k1 } from './constants.js';\nimport { assertIsUint8Array, zeros } from '../common/utils.js';\nexport class Address {\n    constructor(buf) {\n        if (buf.length !== 20) {\n            throw new Error('Invalid address length');\n        }\n        this.buf = buf;\n    }\n    /**\n     * Returns the zero address.\n     */\n    static zero() {\n        return new Address(zeros(20));\n    }\n    /**\n     * Is address equal to another.\n     */\n    equals(address) {\n        return uint8ArrayEquals(this.buf, address.buf);\n    }\n    /**\n     * Is address zero.\n     */\n    isZero() {\n        return this.equals(Address.zero());\n    }\n    /**\n     * Returns hex encoding of address.\n     */\n    toString() {\n        return bytesToHex(this.buf);\n    }\n    /**\n     * Returns Uint8Array representation of address.\n     */\n    toArray() {\n        return this.buf;\n    }\n    /**\n     * Returns the ethereum address of a given public key.\n     * Accepts \"Ethereum public keys\" and SEC1 encoded keys.\n     * @param pubKey The two points of an uncompressed key, unless sanitize is enabled\n     * @param sanitize Accept public keys in other formats\n     */\n    static publicToAddress(_pubKey, sanitize = false) {\n        let pubKey = _pubKey;\n        assertIsUint8Array(pubKey);\n        if (sanitize && pubKey.length !== 64) {\n            pubKey = secp256k1.ProjectivePoint.fromHex(pubKey).toRawBytes(false).slice(1);\n        }\n        if (pubKey.length !== 64) {\n            throw new Error('Expected pubKey to be of length 64');\n        }\n        // Only take the lower 160bits of the hash\n        return keccak256(pubKey).slice(-20);\n    }\n}\n//# sourceMappingURL=address.js.map","import { bytesToHex } from 'web3-utils';\nimport { setLengthLeft, toUint8Array } from '../common/utils.js';\nimport { isAccessList } from './types.js';\nexport const checkMaxInitCodeSize = (common, length) => {\n    const maxInitCodeSize = common.param('vm', 'maxInitCodeSize');\n    if (maxInitCodeSize && BigInt(length) > maxInitCodeSize) {\n        throw new Error(`the initcode size of this transaction is too large: it is ${length} while the max is ${common.param('vm', 'maxInitCodeSize')}`);\n    }\n};\nexport const getAccessListData = (accessList) => {\n    let AccessListJSON;\n    let uint8arrayAccessList;\n    if (isAccessList(accessList)) {\n        AccessListJSON = accessList;\n        const newAccessList = [];\n        // eslint-disable-next-line @typescript-eslint/prefer-for-of\n        for (let i = 0; i < accessList.length; i += 1) {\n            const item = accessList[i];\n            const addressBytes = toUint8Array(item.address);\n            const storageItems = [];\n            // eslint-disable-next-line @typescript-eslint/prefer-for-of\n            for (let index = 0; index < item.storageKeys.length; index += 1) {\n                storageItems.push(toUint8Array(item.storageKeys[index]));\n            }\n            newAccessList.push([addressBytes, storageItems]);\n        }\n        uint8arrayAccessList = newAccessList;\n    }\n    else {\n        uint8arrayAccessList = accessList !== null && accessList !== void 0 ? accessList : [];\n        // build the JSON\n        const json = [];\n        // eslint-disable-next-line @typescript-eslint/prefer-for-of\n        for (let i = 0; i < uint8arrayAccessList.length; i += 1) {\n            const data = uint8arrayAccessList[i];\n            const address = bytesToHex(data[0]);\n            const storageKeys = [];\n            // eslint-disable-next-line @typescript-eslint/prefer-for-of\n            for (let item = 0; item < data[1].length; item += 1) {\n                storageKeys.push(bytesToHex(data[1][item]));\n            }\n            const jsonItem = {\n                address,\n                storageKeys,\n            };\n            json.push(jsonItem);\n        }\n        AccessListJSON = json;\n    }\n    return {\n        AccessListJSON,\n        accessList: uint8arrayAccessList,\n    };\n};\nexport const verifyAccessList = (accessList) => {\n    // eslint-disable-next-line @typescript-eslint/prefer-for-of\n    for (let key = 0; key < accessList.length; key += 1) {\n        const accessListItem = accessList[key];\n        const address = accessListItem[0];\n        const storageSlots = accessListItem[1];\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/consistent-type-assertions\n        if (accessListItem[2] !== undefined) {\n            throw new Error('Access list item cannot have 3 elements. It can only have an address, and an array of storage slots.');\n        }\n        if (address.length !== 20) {\n            throw new Error('Invalid EIP-2930 transaction: address length should be 20 bytes');\n        }\n        // eslint-disable-next-line @typescript-eslint/prefer-for-of\n        for (let storageSlot = 0; storageSlot < storageSlots.length; storageSlot += 1) {\n            if (storageSlots[storageSlot].length !== 32) {\n                throw new Error('Invalid EIP-2930 transaction: storage slot length should be 32 bytes');\n            }\n        }\n    }\n};\nexport const getAccessListJSON = (accessList) => {\n    const accessListJSON = [];\n    // eslint-disable-next-line @typescript-eslint/prefer-for-of\n    for (let index = 0; index < accessList.length; index += 1) {\n        const item = accessList[index];\n        const JSONItem = {\n            address: bytesToHex(setLengthLeft(item[0], 20)),\n            storageKeys: [],\n        };\n        // eslint-disable-next-line @typescript-eslint/prefer-optional-chain\n        const storageSlots = item && item[1];\n        // eslint-disable-next-line @typescript-eslint/prefer-for-of\n        for (let slot = 0; slot < storageSlots.length; slot += 1) {\n            const storageSlot = storageSlots[slot];\n            JSONItem.storageKeys.push(bytesToHex(setLengthLeft(storageSlot, 32)));\n        }\n        accessListJSON.push(JSONItem);\n    }\n    return accessListJSON;\n};\nexport const getDataFeeEIP2930 = (accessList, common) => {\n    const accessListStorageKeyCost = common.param('gasPrices', 'accessListStorageKeyCost');\n    const accessListAddressCost = common.param('gasPrices', 'accessListAddressCost');\n    let slots = 0;\n    // eslint-disable-next-line @typescript-eslint/prefer-for-of\n    for (let index = 0; index < accessList.length; index += 1) {\n        const item = accessList[index];\n        const storageSlots = item[1];\n        slots += storageSlots.length;\n    }\n    const addresses = accessList.length;\n    return addresses * Number(accessListAddressCost) + slots * Number(accessListStorageKeyCost);\n};\n//# sourceMappingURL=utils.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { bytesToHex } from 'web3-utils';\nimport { MAX_INTEGER, MAX_UINT64, SECP256K1_ORDER_DIV_2, secp256k1 } from './constants.js';\nimport { toUint8Array, uint8ArrayToBigInt, unpadUint8Array } from '../common/utils.js';\nimport { Common } from '../common/common.js';\nimport { Hardfork, Chain } from '../common/enums.js';\nimport { Capability } from './types.js';\nimport { Address } from './address.js';\nimport { checkMaxInitCodeSize } from './utils.js';\n/**\n * This base class will likely be subject to further\n * refactoring along the introduction of additional tx types\n * on the Ethereum network.\n *\n * It is therefore not recommended to use directly.\n */\nexport class BaseTransaction {\n    constructor(txData, opts) {\n        var _a, _b;\n        this.cache = {\n            hash: undefined,\n            dataFee: undefined,\n        };\n        /**\n         * List of tx type defining EIPs,\n         * e.g. 1559 (fee market) and 2930 (access lists)\n         * for FeeMarketEIP1559Transaction objects\n         */\n        this.activeCapabilities = [];\n        /**\n         * The default chain the tx falls back to if no Common\n         * is provided and if the chain can't be derived from\n         * a passed in chainId (only EIP-2718 typed txs) or\n         * EIP-155 signature (legacy txs).\n         *\n         * @hidden\n         */\n        this.DEFAULT_CHAIN = Chain.Mainnet;\n        /**\n         * The default HF if the tx type is active on that HF\n         * or the first greater HF where the tx is active.\n         *\n         * @hidden\n         */\n        this.DEFAULT_HARDFORK = Hardfork.Merge;\n        const { nonce, gasLimit, to, value, data, v, r, s, type } = txData;\n        this._type = Number(uint8ArrayToBigInt(toUint8Array(type)));\n        this.txOptions = opts;\n        const toB = toUint8Array(to === '' ? '0x' : to);\n        const vB = toUint8Array(v === '' ? '0x' : v);\n        const rB = toUint8Array(r === '' ? '0x' : r);\n        const sB = toUint8Array(s === '' ? '0x' : s);\n        this.nonce = uint8ArrayToBigInt(toUint8Array(nonce === '' ? '0x' : nonce));\n        this.gasLimit = uint8ArrayToBigInt(toUint8Array(gasLimit === '' ? '0x' : gasLimit));\n        this.to = toB.length > 0 ? new Address(toB) : undefined;\n        this.value = uint8ArrayToBigInt(toUint8Array(value === '' ? '0x' : value));\n        this.data = toUint8Array(data === '' ? '0x' : data);\n        this.v = vB.length > 0 ? uint8ArrayToBigInt(vB) : undefined;\n        this.r = rB.length > 0 ? uint8ArrayToBigInt(rB) : undefined;\n        this.s = sB.length > 0 ? uint8ArrayToBigInt(sB) : undefined;\n        this._validateCannotExceedMaxInteger({ value: this.value, r: this.r, s: this.s });\n        // geth limits gasLimit to 2^64-1\n        this._validateCannotExceedMaxInteger({ gasLimit: this.gasLimit }, 64);\n        // EIP-2681 limits nonce to 2^64-1 (cannot equal 2^64-1)\n        this._validateCannotExceedMaxInteger({ nonce: this.nonce }, 64, true);\n        // eslint-disable-next-line no-null/no-null\n        const createContract = this.to === undefined || this.to === null;\n        const allowUnlimitedInitCodeSize = (_a = opts.allowUnlimitedInitCodeSize) !== null && _a !== void 0 ? _a : false;\n        const common = (_b = opts.common) !== null && _b !== void 0 ? _b : this._getCommon();\n        if (createContract && common.isActivatedEIP(3860) && !allowUnlimitedInitCodeSize) {\n            checkMaxInitCodeSize(common, this.data.length);\n        }\n    }\n    /**\n     * Returns the transaction type.\n     *\n     * Note: legacy txs will return tx type `0`.\n     */\n    get type() {\n        return this._type;\n    }\n    /**\n     * Checks if a tx type defining capability is active\n     * on a tx, for example the EIP-1559 fee market mechanism\n     * or the EIP-2930 access list feature.\n     *\n     * Note that this is different from the tx type itself,\n     * so EIP-2930 access lists can very well be active\n     * on an EIP-1559 tx for example.\n     *\n     * This method can be useful for feature checks if the\n     * tx type is unknown (e.g. when instantiated with\n     * the tx factory).\n     *\n     * See `Capabilites` in the `types` module for a reference\n     * on all supported capabilities.\n     */\n    supports(capability) {\n        return this.activeCapabilities.includes(capability);\n    }\n    validate(stringError = false) {\n        const errors = [];\n        if (this.getBaseFee() > this.gasLimit) {\n            errors.push(`gasLimit is too low. given ${this.gasLimit}, need at least ${this.getBaseFee()}`);\n        }\n        if (this.isSigned() && !this.verifySignature()) {\n            errors.push('Invalid Signature');\n        }\n        return stringError ? errors : errors.length === 0;\n    }\n    _validateYParity() {\n        const { v } = this;\n        if (v !== undefined && v !== BigInt(0) && v !== BigInt(1)) {\n            const msg = this._errorMsg('The y-parity of the transaction should either be 0 or 1');\n            throw new Error(msg);\n        }\n    }\n    /**\n     * EIP-2: All transaction signatures whose s-value is greater than secp256k1n/2are considered invalid.\n     * Reasoning: https://ethereum.stackexchange.com/a/55728\n     */\n    _validateHighS() {\n        const { s } = this;\n        if (this.common.gteHardfork('homestead') && s !== undefined && s > SECP256K1_ORDER_DIV_2) {\n            const msg = this._errorMsg('Invalid Signature: s-values greater than secp256k1n/2 are considered invalid');\n            throw new Error(msg);\n        }\n    }\n    /**\n     * The minimum amount of gas the tx must have (DataFee + TxFee + Creation Fee)\n     */\n    getBaseFee() {\n        const txFee = this.common.param('gasPrices', 'tx');\n        let fee = this.getDataFee();\n        if (txFee)\n            fee += txFee;\n        if (this.common.gteHardfork('homestead') && this.toCreationAddress()) {\n            const txCreationFee = this.common.param('gasPrices', 'txCreation');\n            if (txCreationFee)\n                fee += txCreationFee;\n        }\n        return fee;\n    }\n    /**\n     * The amount of gas paid for the data in this tx\n     */\n    getDataFee() {\n        const txDataZero = this.common.param('gasPrices', 'txDataZero');\n        const txDataNonZero = this.common.param('gasPrices', 'txDataNonZero');\n        let cost = BigInt(0);\n        // eslint-disable-next-line @typescript-eslint/prefer-for-of\n        for (let i = 0; i < this.data.length; i += 1) {\n            // eslint-disable-next-line @typescript-eslint/no-unused-expressions, no-unused-expressions\n            this.data[i] === 0 ? (cost += txDataZero) : (cost += txDataNonZero);\n        }\n        // eslint-disable-next-line no-null/no-null\n        if ((this.to === undefined || this.to === null) && this.common.isActivatedEIP(3860)) {\n            const dataLength = BigInt(Math.ceil(this.data.length / 32));\n            const initCodeCost = this.common.param('gasPrices', 'initCodeWordCost') * dataLength;\n            cost += initCodeCost;\n        }\n        return cost;\n    }\n    /**\n     * If the tx's `to` is to the creation address\n     */\n    toCreationAddress() {\n        return this.to === undefined || this.to.buf.length === 0;\n    }\n    isSigned() {\n        const { v, r, s } = this;\n        if (v === undefined || r === undefined || s === undefined) {\n            return false;\n        }\n        return true;\n    }\n    /**\n     * Determines if the signature is valid\n     */\n    verifySignature() {\n        try {\n            // Main signature verification is done in `getSenderPublicKey()`\n            const publicKey = this.getSenderPublicKey();\n            return unpadUint8Array(publicKey).length !== 0;\n        }\n        catch (e) {\n            return false;\n        }\n    }\n    /**\n     * Returns the sender's address\n     */\n    getSenderAddress() {\n        return new Address(Address.publicToAddress(this.getSenderPublicKey()));\n    }\n    /**\n     * Signs a transaction.\n     *\n     * Note that the signed tx is returned as a new object,\n     * use as follows:\n     * ```javascript\n     * const signedTx = tx.sign(privateKey)\n     * ```\n     */\n    sign(privateKey) {\n        if (privateKey.length !== 32) {\n            const msg = this._errorMsg('Private key must be 32 bytes in length.');\n            throw new Error(msg);\n        }\n        // Hack for the constellation that we have got a legacy tx after spuriousDragon with a non-EIP155 conforming signature\n        // and want to recreate a signature (where EIP155 should be applied)\n        // Leaving this hack lets the legacy.spec.ts -> sign(), verifySignature() test fail\n        // 2021-06-23\n        let hackApplied = false;\n        if (this.type === 0 &&\n            this.common.gteHardfork('spuriousDragon') &&\n            !this.supports(Capability.EIP155ReplayProtection)) {\n            this.activeCapabilities.push(Capability.EIP155ReplayProtection);\n            hackApplied = true;\n        }\n        const msgHash = this.getMessageToSign(true);\n        const { v, r, s } = this._ecsign(msgHash, privateKey);\n        const tx = this._processSignature(v, r, s);\n        // Hack part 2\n        if (hackApplied) {\n            const index = this.activeCapabilities.indexOf(Capability.EIP155ReplayProtection);\n            if (index > -1) {\n                this.activeCapabilities.splice(index, 1);\n            }\n        }\n        return tx;\n    }\n    /**\n     * Does chain ID checks on common and returns a common\n     * to be used on instantiation\n     * @hidden\n     *\n     * @param common - {@link Common} instance from tx options\n     * @param chainId - Chain ID from tx options (typed txs) or signature (legacy tx)\n     */\n    _getCommon(common, chainId) {\n        var _a, _b, _c, _d;\n        // TODO: this function needs to be reviewed and the code to be more clean\n        // check issue https://github.com/web3/web3.js/issues/6666\n        // Chain ID provided\n        if (chainId !== undefined) {\n            const chainIdBigInt = uint8ArrayToBigInt(toUint8Array(chainId));\n            if (common) {\n                if (common.chainId() !== chainIdBigInt) {\n                    const msg = this._errorMsg('The chain ID does not match the chain ID of Common');\n                    throw new Error(msg);\n                }\n                // Common provided, chain ID does match\n                // -> Return provided Common\n                return common.copy();\n            }\n            if (Common.isSupportedChainId(chainIdBigInt)) {\n                // No Common, chain ID supported by Common\n                // -> Instantiate Common with chain ID\n                return new Common({ chain: chainIdBigInt, hardfork: this.DEFAULT_HARDFORK });\n            }\n            // No Common, chain ID not supported by Common\n            // -> Instantiate custom Common derived from DEFAULT_CHAIN\n            return Common.custom({\n                name: 'custom-chain',\n                networkId: chainIdBigInt,\n                chainId: chainIdBigInt,\n            }, { baseChain: this.DEFAULT_CHAIN, hardfork: this.DEFAULT_HARDFORK });\n        }\n        // No chain ID provided\n        // -> return Common provided or create new default Common\n        if ((common === null || common === void 0 ? void 0 : common.copy) && typeof (common === null || common === void 0 ? void 0 : common.copy) === 'function') {\n            return common.copy();\n        }\n        // TODO: Recheck this next block when working on https://github.com/web3/web3.js/issues/6666\n        // This block is to handle when `chainId` was not passed and the `common` object does not have `copy()`\n        // If it was meant to be unsupported to process `common` in this case, an exception should be thrown instead of the following block\n        if (common) {\n            const hardfork = typeof common.hardfork === 'function'\n                ? common.hardfork()\n                : // eslint-disable-next-line @typescript-eslint/unbound-method\n                    common.hardfork;\n            return Common.custom({\n                name: 'custom-chain',\n                networkId: common.networkId\n                    ? common.networkId()\n                    : (_b = BigInt((_a = common.customChain) === null || _a === void 0 ? void 0 : _a.networkId)) !== null && _b !== void 0 ? _b : undefined,\n                chainId: common.chainId\n                    ? common.chainId()\n                    : (_d = BigInt((_c = common.customChain) === null || _c === void 0 ? void 0 : _c.chainId)) !== null && _d !== void 0 ? _d : undefined,\n            }, {\n                baseChain: this.DEFAULT_CHAIN,\n                hardfork: hardfork || this.DEFAULT_HARDFORK,\n            });\n        }\n        return new Common({ chain: this.DEFAULT_CHAIN, hardfork: this.DEFAULT_HARDFORK });\n    }\n    /**\n     * Validates that an object with BigInt values cannot exceed the specified bit limit.\n     * @param values Object containing string keys and BigInt values\n     * @param bits Number of bits to check (64 or 256)\n     * @param cannotEqual Pass true if the number also cannot equal one less the maximum value\n     */\n    _validateCannotExceedMaxInteger(values, bits = 256, cannotEqual = false) {\n        for (const [key, value] of Object.entries(values)) {\n            switch (bits) {\n                case 64:\n                    if (cannotEqual) {\n                        if (value !== undefined && value >= MAX_UINT64) {\n                            const msg = this._errorMsg(`${key} cannot equal or exceed MAX_UINT64 (2^64-1), given ${value}`);\n                            throw new Error(msg);\n                        }\n                    }\n                    else if (value !== undefined && value > MAX_UINT64) {\n                        const msg = this._errorMsg(`${key} cannot exceed MAX_UINT64 (2^64-1), given ${value}`);\n                        throw new Error(msg);\n                    }\n                    break;\n                case 256:\n                    if (cannotEqual) {\n                        if (value !== undefined && value >= MAX_INTEGER) {\n                            const msg = this._errorMsg(`${key} cannot equal or exceed MAX_INTEGER (2^256-1), given ${value}`);\n                            throw new Error(msg);\n                        }\n                    }\n                    else if (value !== undefined && value > MAX_INTEGER) {\n                        const msg = this._errorMsg(`${key} cannot exceed MAX_INTEGER (2^256-1), given ${value}`);\n                        throw new Error(msg);\n                    }\n                    break;\n                default: {\n                    const msg = this._errorMsg('unimplemented bits value');\n                    throw new Error(msg);\n                }\n            }\n        }\n    }\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    static _validateNotArray(values) {\n        const txDataKeys = [\n            'nonce',\n            'gasPrice',\n            'gasLimit',\n            'to',\n            'value',\n            'data',\n            'v',\n            'r',\n            's',\n            'type',\n            'baseFee',\n            'maxFeePerGas',\n            'chainId',\n        ];\n        for (const [key, value] of Object.entries(values)) {\n            if (txDataKeys.includes(key)) {\n                if (Array.isArray(value)) {\n                    throw new Error(`${key} cannot be an array`);\n                }\n            }\n        }\n    }\n    /**\n     * Returns the shared error postfix part for _error() method\n     * tx type implementations.\n     */\n    _getSharedErrorPostfix() {\n        let hash = '';\n        try {\n            hash = this.isSigned() ? bytesToHex(this.hash()) : 'not available (unsigned)';\n        }\n        catch (e) {\n            hash = 'error';\n        }\n        let isSigned = '';\n        try {\n            isSigned = this.isSigned().toString();\n        }\n        catch (e) {\n            hash = 'error';\n        }\n        let hf = '';\n        try {\n            hf = this.common.hardfork();\n        }\n        catch (e) {\n            hf = 'error';\n        }\n        let postfix = `tx type=${this.type} hash=${hash} nonce=${this.nonce} value=${this.value} `;\n        postfix += `signed=${isSigned} hf=${hf}`;\n        return postfix;\n    }\n    // eslint-disable-next-line class-methods-use-this\n    _ecsign(msgHash, privateKey, chainId) {\n        const signature = secp256k1.sign(msgHash, privateKey);\n        const signatureBytes = signature.toCompactRawBytes();\n        const r = signatureBytes.subarray(0, 32);\n        const s = signatureBytes.subarray(32, 64);\n        const v = chainId === undefined\n            ? BigInt(signature.recovery + 27)\n            : BigInt(signature.recovery + 35) + BigInt(chainId) * BigInt(2);\n        return { r, s, v };\n    }\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    static fromSerializedTx(\n    // @ts-expect-error unused variable\n    serialized, \n    // @ts-expect-error unused variable\n    opts = {}) { }\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    static fromTxData(\n    // @ts-expect-error unused variable\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    txData, \n    // @ts-expect-error unused variable\n    opts = {}) { }\n}\n//# sourceMappingURL=baseTransaction.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { keccak256 } from 'ethereum-cryptography/keccak.js';\nimport { validateNoLeadingZeroes } from 'web3-validator';\nimport { RLP } from '@ethereumjs/rlp';\nimport { bytesToHex, hexToBytes, uint8ArrayConcat, uint8ArrayEquals } from 'web3-utils';\nimport { MAX_INTEGER } from './constants.js';\nimport { BaseTransaction } from './baseTransaction.js';\nimport { getAccessListData, getAccessListJSON, getDataFeeEIP2930, verifyAccessList, } from './utils.js';\nimport { bigIntToHex, toUint8Array, ecrecover, uint8ArrayToBigInt, bigIntToUnpaddedUint8Array, } from '../common/utils.js';\nconst TRANSACTION_TYPE = 2;\nconst TRANSACTION_TYPE_UINT8ARRAY = hexToBytes(TRANSACTION_TYPE.toString(16).padStart(2, '0'));\n/**\n * Typed transaction with a new gas fee market mechanism\n *\n * - TransactionType: 2\n * - EIP: [EIP-1559](https://eips.ethereum.org/EIPS/eip-1559)\n */\n// eslint-disable-next-line no-use-before-define\nexport class FeeMarketEIP1559Transaction extends BaseTransaction {\n    /**\n     * Instantiate a transaction from a data dictionary.\n     *\n     * Format: { chainId, nonce, maxPriorityFeePerGas, maxFeePerGas, gasLimit, to, value, data,\n     * accessList, v, r, s }\n     *\n     * Notes:\n     * - `chainId` will be set automatically if not provided\n     * - All parameters are optional and have some basic default values\n     */\n    static fromTxData(txData, opts = {}) {\n        return new FeeMarketEIP1559Transaction(txData, opts);\n    }\n    /**\n     * Instantiate a transaction from the serialized tx.\n     *\n     * Format: `0x02 || rlp([chainId, nonce, maxPriorityFeePerGas, maxFeePerGas, gasLimit, to, value, data,\n     * accessList, signatureYParity, signatureR, signatureS])`\n     */\n    static fromSerializedTx(serialized, opts = {}) {\n        if (!uint8ArrayEquals(serialized.subarray(0, 1), TRANSACTION_TYPE_UINT8ARRAY)) {\n            throw new Error(`Invalid serialized tx input: not an EIP-1559 transaction (wrong tx type, expected: ${TRANSACTION_TYPE}, received: ${bytesToHex(serialized.subarray(0, 1))}`);\n        }\n        const values = RLP.decode(serialized.subarray(1));\n        if (!Array.isArray(values)) {\n            throw new Error('Invalid serialized tx input: must be array');\n        }\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n        return FeeMarketEIP1559Transaction.fromValuesArray(values, opts);\n    }\n    /**\n     * Create a transaction from a values array.\n     *\n     * Format: `[chainId, nonce, maxPriorityFeePerGas, maxFeePerGas, gasLimit, to, value, data,\n     * accessList, signatureYParity, signatureR, signatureS]`\n     */\n    static fromValuesArray(values, opts = {}) {\n        if (values.length !== 9 && values.length !== 12) {\n            throw new Error('Invalid EIP-1559 transaction. Only expecting 9 values (for unsigned tx) or 12 values (for signed tx).');\n        }\n        const [chainId, nonce, maxPriorityFeePerGas, maxFeePerGas, gasLimit, to, value, data, accessList, v, r, s,] = values;\n        this._validateNotArray({ chainId, v });\n        validateNoLeadingZeroes({\n            nonce,\n            maxPriorityFeePerGas,\n            maxFeePerGas,\n            gasLimit,\n            value,\n            v,\n            r,\n            s,\n        });\n        return new FeeMarketEIP1559Transaction({\n            chainId: uint8ArrayToBigInt(chainId),\n            nonce,\n            maxPriorityFeePerGas,\n            maxFeePerGas,\n            gasLimit,\n            to,\n            value,\n            data,\n            accessList: accessList !== null && accessList !== void 0 ? accessList : [],\n            v: v !== undefined ? uint8ArrayToBigInt(v) : undefined, // EIP2930 supports v's with value 0 (empty Uint8Array)\n            r,\n            s,\n        }, opts);\n    }\n    /**\n     * This constructor takes the values, validates them, assigns them and freezes the object.\n     *\n     * It is not recommended to use this constructor directly. Instead use\n     * the static factory methods to assist in creating a Transaction object from\n     * varying data types.\n     */\n    constructor(txData, opts = {}) {\n        var _a;\n        super(Object.assign(Object.assign({}, txData), { type: TRANSACTION_TYPE }), opts);\n        /**\n         * The default HF if the tx type is active on that HF\n         * or the first greater HF where the tx is active.\n         *\n         * @hidden\n         */\n        this.DEFAULT_HARDFORK = 'london';\n        const { chainId, accessList, maxFeePerGas, maxPriorityFeePerGas } = txData;\n        this.common = this._getCommon(opts.common, chainId);\n        this.chainId = this.common.chainId();\n        if (!this.common.isActivatedEIP(1559)) {\n            throw new Error('EIP-1559 not enabled on Common');\n        }\n        this.activeCapabilities = this.activeCapabilities.concat([1559, 2718, 2930]);\n        // Populate the access list fields\n        const accessListData = getAccessListData(accessList !== null && accessList !== void 0 ? accessList : []);\n        this.accessList = accessListData.accessList;\n        this.AccessListJSON = accessListData.AccessListJSON;\n        // Verify the access list format.\n        verifyAccessList(this.accessList);\n        this.maxFeePerGas = uint8ArrayToBigInt(toUint8Array(maxFeePerGas === '' ? '0x' : maxFeePerGas));\n        this.maxPriorityFeePerGas = uint8ArrayToBigInt(toUint8Array(maxPriorityFeePerGas === '' ? '0x' : maxPriorityFeePerGas));\n        this._validateCannotExceedMaxInteger({\n            maxFeePerGas: this.maxFeePerGas,\n            maxPriorityFeePerGas: this.maxPriorityFeePerGas,\n        });\n        BaseTransaction._validateNotArray(txData);\n        if (this.gasLimit * this.maxFeePerGas > MAX_INTEGER) {\n            const msg = this._errorMsg('gasLimit * maxFeePerGas cannot exceed MAX_INTEGER (2^256-1)');\n            throw new Error(msg);\n        }\n        if (this.maxFeePerGas < this.maxPriorityFeePerGas) {\n            const msg = this._errorMsg('maxFeePerGas cannot be less than maxPriorityFeePerGas (The total must be the larger of the two)');\n            throw new Error(msg);\n        }\n        this._validateYParity();\n        this._validateHighS();\n        const freeze = (_a = opts === null || opts === void 0 ? void 0 : opts.freeze) !== null && _a !== void 0 ? _a : true;\n        if (freeze) {\n            Object.freeze(this);\n        }\n    }\n    /**\n     * The amount of gas paid for the data in this tx\n     */\n    getDataFee() {\n        if (this.cache.dataFee && this.cache.dataFee.hardfork === this.common.hardfork()) {\n            return this.cache.dataFee.value;\n        }\n        let cost = super.getDataFee();\n        cost += BigInt(getDataFeeEIP2930(this.accessList, this.common));\n        if (Object.isFrozen(this)) {\n            this.cache.dataFee = {\n                value: cost,\n                hardfork: this.common.hardfork(),\n            };\n        }\n        return cost;\n    }\n    /**\n     * The up front amount that an account must have for this transaction to be valid\n     * @param baseFee The base fee of the block (will be set to 0 if not provided)\n     */\n    getUpfrontCost(baseFee = BigInt(0)) {\n        const prio = this.maxPriorityFeePerGas;\n        const maxBase = this.maxFeePerGas - baseFee;\n        const inclusionFeePerGas = prio < maxBase ? prio : maxBase;\n        const gasPrice = inclusionFeePerGas + baseFee;\n        return this.gasLimit * gasPrice + this.value;\n    }\n    /**\n     * Returns a Uint8Array Array of the raw Uint8Arrays of the EIP-1559 transaction, in order.\n     *\n     * Format: `[chainId, nonce, maxPriorityFeePerGas, maxFeePerGas, gasLimit, to, value, data,\n     * accessList, signatureYParity, signatureR, signatureS]`\n     *\n     * Use {@link FeeMarketEIP1559Transaction.serialize} to add a transaction to a block\n     * with {@link Block.fromValuesArray}.\n     *\n     * For an unsigned tx this method uses the empty Uint8Array values for the\n     * signature parameters `v`, `r` and `s` for encoding. For an EIP-155 compliant\n     * representation for external signing use {@link FeeMarketEIP1559Transaction.getMessageToSign}.\n     */\n    raw() {\n        return [\n            bigIntToUnpaddedUint8Array(this.chainId),\n            bigIntToUnpaddedUint8Array(this.nonce),\n            bigIntToUnpaddedUint8Array(this.maxPriorityFeePerGas),\n            bigIntToUnpaddedUint8Array(this.maxFeePerGas),\n            bigIntToUnpaddedUint8Array(this.gasLimit),\n            this.to !== undefined ? this.to.buf : Uint8Array.from([]),\n            bigIntToUnpaddedUint8Array(this.value),\n            this.data,\n            this.accessList,\n            this.v !== undefined ? bigIntToUnpaddedUint8Array(this.v) : Uint8Array.from([]),\n            this.r !== undefined ? bigIntToUnpaddedUint8Array(this.r) : Uint8Array.from([]),\n            this.s !== undefined ? bigIntToUnpaddedUint8Array(this.s) : Uint8Array.from([]),\n        ];\n    }\n    /**\n     * Returns the serialized encoding of the EIP-1559 transaction.\n     *\n     * Format: `0x02 || rlp([chainId, nonce, maxPriorityFeePerGas, maxFeePerGas, gasLimit, to, value, data,\n     * accessList, signatureYParity, signatureR, signatureS])`\n     *\n     * Note that in contrast to the legacy tx serialization format this is not\n     * valid RLP any more due to the raw tx type preceding and concatenated to\n     * the RLP encoding of the values.\n     */\n    serialize() {\n        const base = this.raw();\n        return uint8ArrayConcat(TRANSACTION_TYPE_UINT8ARRAY, RLP.encode(base));\n    }\n    /**\n     * Returns the serialized unsigned tx (hashed or raw), which can be used\n     * to sign the transaction (e.g. for sending to a hardware wallet).\n     *\n     * Note: in contrast to the legacy tx the raw message format is already\n     * serialized and doesn't need to be RLP encoded any more.\n     *\n     * ```javascript\n     * const serializedMessage = tx.getMessageToSign(false) // use this for the HW wallet input\n     * ```\n     *\n     * @param hashMessage - Return hashed message if set to true (default: true)\n     */\n    getMessageToSign(hashMessage = true) {\n        const base = this.raw().slice(0, 9);\n        const message = uint8ArrayConcat(TRANSACTION_TYPE_UINT8ARRAY, RLP.encode(base));\n        if (hashMessage) {\n            return keccak256(message);\n        }\n        return message;\n    }\n    /**\n     * Computes a sha3-256 hash of the serialized tx.\n     *\n     * This method can only be used for signed txs (it throws otherwise).\n     * Use {@link FeeMarketEIP1559Transaction.getMessageToSign} to get a tx hash for the purpose of signing.\n     */\n    hash() {\n        if (!this.isSigned()) {\n            const msg = this._errorMsg('Cannot call hash method if transaction is not signed');\n            throw new Error(msg);\n        }\n        if (Object.isFrozen(this)) {\n            if (!this.cache.hash) {\n                this.cache.hash = keccak256(this.serialize());\n            }\n            return this.cache.hash;\n        }\n        return keccak256(this.serialize());\n    }\n    /**\n     * Computes a sha3-256 hash which can be used to verify the signature\n     */\n    getMessageToVerifySignature() {\n        return this.getMessageToSign();\n    }\n    /**\n     * Returns the public key of the sender\n     */\n    getSenderPublicKey() {\n        if (!this.isSigned()) {\n            const msg = this._errorMsg('Cannot call this method if transaction is not signed');\n            throw new Error(msg);\n        }\n        const msgHash = this.getMessageToVerifySignature();\n        const { v, r, s } = this;\n        this._validateHighS();\n        try {\n            return ecrecover(msgHash, v + BigInt(27), // Recover the 27 which was stripped from ecsign\n            bigIntToUnpaddedUint8Array(r), bigIntToUnpaddedUint8Array(s));\n        }\n        catch (e) {\n            const msg = this._errorMsg('Invalid Signature');\n            throw new Error(msg);\n        }\n    }\n    _processSignature(v, r, s) {\n        const opts = Object.assign(Object.assign({}, this.txOptions), { common: this.common });\n        return FeeMarketEIP1559Transaction.fromTxData({\n            chainId: this.chainId,\n            nonce: this.nonce,\n            maxPriorityFeePerGas: this.maxPriorityFeePerGas,\n            maxFeePerGas: this.maxFeePerGas,\n            gasLimit: this.gasLimit,\n            to: this.to,\n            value: this.value,\n            data: this.data,\n            accessList: this.accessList,\n            v: v - BigInt(27), // This looks extremely hacky: /util actually adds 27 to the value, the recovery bit is either 0 or 1.\n            r: uint8ArrayToBigInt(r),\n            s: uint8ArrayToBigInt(s),\n        }, opts);\n    }\n    /**\n     * Returns an object with the JSON representation of the transaction\n     */\n    toJSON() {\n        const accessListJSON = getAccessListJSON(this.accessList);\n        return {\n            chainId: bigIntToHex(this.chainId),\n            nonce: bigIntToHex(this.nonce),\n            maxPriorityFeePerGas: bigIntToHex(this.maxPriorityFeePerGas),\n            maxFeePerGas: bigIntToHex(this.maxFeePerGas),\n            gasLimit: bigIntToHex(this.gasLimit),\n            to: this.to !== undefined ? this.to.toString() : undefined,\n            value: bigIntToHex(this.value),\n            data: bytesToHex(this.data),\n            accessList: accessListJSON,\n            v: this.v !== undefined ? bigIntToHex(this.v) : undefined,\n            r: this.r !== undefined ? bigIntToHex(this.r) : undefined,\n            s: this.s !== undefined ? bigIntToHex(this.s) : undefined,\n        };\n    }\n    /**\n     * Return a compact error string representation of the object\n     */\n    errorStr() {\n        let errorStr = this._getSharedErrorPostfix();\n        errorStr += ` maxFeePerGas=${this.maxFeePerGas} maxPriorityFeePerGas=${this.maxPriorityFeePerGas}`;\n        return errorStr;\n    }\n    /**\n     * Internal helper function to create an annotated error message\n     *\n     * @param msg Base error message\n     * @hidden\n     */\n    _errorMsg(msg) {\n        return `${msg} (${this.errorStr()})`;\n    }\n}\n//# sourceMappingURL=eip1559Transaction.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { keccak256 } from 'ethereum-cryptography/keccak.js';\nimport { validateNoLeadingZeroes } from 'web3-validator';\nimport { RLP } from '@ethereumjs/rlp';\nimport { bytesToHex, hexToBytes, uint8ArrayConcat, uint8ArrayEquals } from 'web3-utils';\nimport { MAX_INTEGER } from './constants.js';\nimport { getAccessListData, verifyAccessList, getAccessListJSON, getDataFeeEIP2930, } from './utils.js';\nimport { bigIntToHex, toUint8Array, ecrecover, uint8ArrayToBigInt, bigIntToUnpaddedUint8Array, } from '../common/utils.js';\nimport { BaseTransaction } from './baseTransaction.js';\nconst TRANSACTION_TYPE = 1;\nconst TRANSACTION_TYPE_UINT8ARRAY = hexToBytes(TRANSACTION_TYPE.toString(16).padStart(2, '0'));\n/**\n * Typed transaction with optional access lists\n *\n * - TransactionType: 1\n * - EIP: [EIP-2930](https://eips.ethereum.org/EIPS/eip-2930)\n */\n// eslint-disable-next-line no-use-before-define\nexport class AccessListEIP2930Transaction extends BaseTransaction {\n    /**\n     * Instantiate a transaction from a data dictionary.\n     *\n     * Format: { chainId, nonce, gasPrice, gasLimit, to, value, data, accessList,\n     * v, r, s }\n     *\n     * Notes:\n     * - `chainId` will be set automatically if not provided\n     * - All parameters are optional and have some basic default values\n     */\n    static fromTxData(txData, opts = {}) {\n        return new AccessListEIP2930Transaction(txData, opts);\n    }\n    /**\n     * Instantiate a transaction from the serialized tx.\n     *\n     * Format: `0x01 || rlp([chainId, nonce, gasPrice, gasLimit, to, value, data, accessList,\n     * signatureYParity (v), signatureR (r), signatureS (s)])`\n     */\n    static fromSerializedTx(serialized, opts = {}) {\n        if (!uint8ArrayEquals(serialized.subarray(0, 1), TRANSACTION_TYPE_UINT8ARRAY)) {\n            throw new Error(`Invalid serialized tx input: not an EIP-2930 transaction (wrong tx type, expected: ${TRANSACTION_TYPE}, received: ${bytesToHex(serialized.subarray(0, 1))}`);\n        }\n        const values = RLP.decode(Uint8Array.from(serialized.subarray(1)));\n        if (!Array.isArray(values)) {\n            throw new Error('Invalid serialized tx input: must be array');\n        }\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n        return AccessListEIP2930Transaction.fromValuesArray(values, opts);\n    }\n    /**\n     * Create a transaction from a values array.\n     *\n     * Format: `[chainId, nonce, gasPrice, gasLimit, to, value, data, accessList,\n     * signatureYParity (v), signatureR (r), signatureS (s)]`\n     */\n    static fromValuesArray(values, opts = {}) {\n        if (values.length !== 8 && values.length !== 11) {\n            throw new Error('Invalid EIP-2930 transaction. Only expecting 8 values (for unsigned tx) or 11 values (for signed tx).');\n        }\n        const [chainId, nonce, gasPrice, gasLimit, to, value, data, accessList, v, r, s] = values;\n        this._validateNotArray({ chainId, v });\n        validateNoLeadingZeroes({ nonce, gasPrice, gasLimit, value, v, r, s });\n        const emptyAccessList = [];\n        return new AccessListEIP2930Transaction({\n            chainId: uint8ArrayToBigInt(chainId),\n            nonce,\n            gasPrice,\n            gasLimit,\n            to,\n            value,\n            data,\n            accessList: accessList !== null && accessList !== void 0 ? accessList : emptyAccessList,\n            v: v !== undefined ? uint8ArrayToBigInt(v) : undefined, // EIP2930 supports v's with value 0 (empty Uint8Array)\n            r,\n            s,\n        }, opts);\n    }\n    /**\n     * This constructor takes the values, validates them, assigns them and freezes the object.\n     *\n     * It is not recommended to use this constructor directly. Instead use\n     * the static factory methods to assist in creating a Transaction object from\n     * varying data types.\n     */\n    constructor(txData, opts = {}) {\n        var _a;\n        super(Object.assign(Object.assign({}, txData), { type: TRANSACTION_TYPE }), opts);\n        /**\n         * The default HF if the tx type is active on that HF\n         * or the first greater HF where the tx is active.\n         *\n         * @hidden\n         */\n        this.DEFAULT_HARDFORK = 'berlin';\n        const { chainId, accessList, gasPrice } = txData;\n        this.common = this._getCommon(opts.common, chainId);\n        this.chainId = this.common.chainId();\n        // EIP-2718 check is done in Common\n        if (!this.common.isActivatedEIP(2930)) {\n            throw new Error('EIP-2930 not enabled on Common');\n        }\n        this.activeCapabilities = this.activeCapabilities.concat([2718, 2930]);\n        // Populate the access list fields\n        const accessListData = getAccessListData(accessList !== null && accessList !== void 0 ? accessList : []);\n        this.accessList = accessListData.accessList;\n        this.AccessListJSON = accessListData.AccessListJSON;\n        // Verify the access list format.\n        verifyAccessList(this.accessList);\n        this.gasPrice = uint8ArrayToBigInt(toUint8Array(gasPrice === '' ? '0x' : gasPrice));\n        this._validateCannotExceedMaxInteger({\n            gasPrice: this.gasPrice,\n        });\n        BaseTransaction._validateNotArray(txData);\n        if (this.gasPrice * this.gasLimit > MAX_INTEGER) {\n            const msg = this._errorMsg('gasLimit * gasPrice cannot exceed MAX_INTEGER');\n            throw new Error(msg);\n        }\n        this._validateYParity();\n        this._validateHighS();\n        const freeze = (_a = opts === null || opts === void 0 ? void 0 : opts.freeze) !== null && _a !== void 0 ? _a : true;\n        if (freeze) {\n            Object.freeze(this);\n        }\n    }\n    /**\n     * The amount of gas paid for the data in this tx\n     */\n    getDataFee() {\n        if (this.cache.dataFee && this.cache.dataFee.hardfork === this.common.hardfork()) {\n            return this.cache.dataFee.value;\n        }\n        let cost = super.getDataFee();\n        cost += BigInt(getDataFeeEIP2930(this.accessList, this.common));\n        if (Object.isFrozen(this)) {\n            this.cache.dataFee = {\n                value: cost,\n                hardfork: this.common.hardfork(),\n            };\n        }\n        return cost;\n    }\n    /**\n     * The up front amount that an account must have for this transaction to be valid\n     */\n    getUpfrontCost() {\n        return this.gasLimit * this.gasPrice + this.value;\n    }\n    /**\n     * Returns a Uint8Array Array of the raw Uint8Arrays of the EIP-2930 transaction, in order.\n     *\n     * Format: `[chainId, nonce, gasPrice, gasLimit, to, value, data, accessList,\n     * signatureYParity (v), signatureR (r), signatureS (s)]`\n     *\n     * Use {@link AccessListEIP2930Transaction.serialize} to add a transaction to a block\n     * with {@link Block.fromValuesArray}.\n     *\n     * For an unsigned tx this method uses the empty UINT8ARRAY values for the\n     * signature parameters `v`, `r` and `s` for encoding. For an EIP-155 compliant\n     * representation for external signing use {@link AccessListEIP2930Transaction.getMessageToSign}.\n     */\n    raw() {\n        return [\n            bigIntToUnpaddedUint8Array(this.chainId),\n            bigIntToUnpaddedUint8Array(this.nonce),\n            bigIntToUnpaddedUint8Array(this.gasPrice),\n            bigIntToUnpaddedUint8Array(this.gasLimit),\n            this.to !== undefined ? this.to.buf : Uint8Array.from([]),\n            bigIntToUnpaddedUint8Array(this.value),\n            this.data,\n            this.accessList,\n            this.v !== undefined ? bigIntToUnpaddedUint8Array(this.v) : Uint8Array.from([]),\n            this.r !== undefined ? bigIntToUnpaddedUint8Array(this.r) : Uint8Array.from([]),\n            this.s !== undefined ? bigIntToUnpaddedUint8Array(this.s) : Uint8Array.from([]),\n        ];\n    }\n    /**\n     * Returns the serialized encoding of the EIP-2930 transaction.\n     *\n     * Format: `0x01 || rlp([chainId, nonce, gasPrice, gasLimit, to, value, data, accessList,\n     * signatureYParity (v), signatureR (r), signatureS (s)])`\n     *\n     * Note that in contrast to the legacy tx serialization format this is not\n     * valid RLP any more due to the raw tx type preceding and concatenated to\n     * the RLP encoding of the values.\n     */\n    serialize() {\n        const base = this.raw();\n        return uint8ArrayConcat(TRANSACTION_TYPE_UINT8ARRAY, RLP.encode(base));\n    }\n    /**\n     * Returns the serialized unsigned tx (hashed or raw), which can be used\n     * to sign the transaction (e.g. for sending to a hardware wallet).\n     *\n     * Note: in contrast to the legacy tx the raw message format is already\n     * serialized and doesn't need to be RLP encoded any more.\n     *\n     * ```javascript\n     * const serializedMessage = tx.getMessageToSign(false) // use this for the HW wallet input\n     * ```\n     *\n     * @param hashMessage - Return hashed message if set to true (default: true)\n     */\n    getMessageToSign(hashMessage = true) {\n        const base = this.raw().slice(0, 8);\n        const message = uint8ArrayConcat(TRANSACTION_TYPE_UINT8ARRAY, RLP.encode(base));\n        if (hashMessage) {\n            return keccak256(message);\n        }\n        return message;\n    }\n    /**\n     * Computes a sha3-256 hash of the serialized tx.\n     *\n     * This method can only be used for signed txs (it throws otherwise).\n     * Use {@link AccessListEIP2930Transaction.getMessageToSign} to get a tx hash for the purpose of signing.\n     */\n    hash() {\n        if (!this.isSigned()) {\n            const msg = this._errorMsg('Cannot call hash method if transaction is not signed');\n            throw new Error(msg);\n        }\n        if (Object.isFrozen(this)) {\n            if (!this.cache.hash) {\n                this.cache.hash = keccak256(this.serialize());\n            }\n            return this.cache.hash;\n        }\n        return keccak256(this.serialize());\n    }\n    /**\n     * Computes a sha3-256 hash which can be used to verify the signature\n     */\n    getMessageToVerifySignature() {\n        return this.getMessageToSign();\n    }\n    /**\n     * Returns the public key of the sender\n     */\n    getSenderPublicKey() {\n        if (!this.isSigned()) {\n            const msg = this._errorMsg('Cannot call this method if transaction is not signed');\n            throw new Error(msg);\n        }\n        const msgHash = this.getMessageToVerifySignature();\n        const { v, r, s } = this;\n        this._validateHighS();\n        try {\n            return ecrecover(msgHash, v + BigInt(27), // Recover the 27 which was stripped from ecsign\n            bigIntToUnpaddedUint8Array(r), bigIntToUnpaddedUint8Array(s));\n        }\n        catch (e) {\n            const msg = this._errorMsg('Invalid Signature');\n            throw new Error(msg);\n        }\n    }\n    _processSignature(v, r, s) {\n        const opts = Object.assign(Object.assign({}, this.txOptions), { common: this.common });\n        return AccessListEIP2930Transaction.fromTxData({\n            chainId: this.chainId,\n            nonce: this.nonce,\n            gasPrice: this.gasPrice,\n            gasLimit: this.gasLimit,\n            to: this.to,\n            value: this.value,\n            data: this.data,\n            accessList: this.accessList,\n            v: v - BigInt(27), // This looks extremely hacky: /util actually adds 27 to the value, the recovery bit is either 0 or 1.\n            r: uint8ArrayToBigInt(r),\n            s: uint8ArrayToBigInt(s),\n        }, opts);\n    }\n    /**\n     * Returns an object with the JSON representation of the transaction\n     */\n    toJSON() {\n        const accessListJSON = getAccessListJSON(this.accessList);\n        return {\n            chainId: bigIntToHex(this.chainId),\n            nonce: bigIntToHex(this.nonce),\n            gasPrice: bigIntToHex(this.gasPrice),\n            gasLimit: bigIntToHex(this.gasLimit),\n            to: this.to !== undefined ? this.to.toString() : undefined,\n            value: bigIntToHex(this.value),\n            data: bytesToHex(this.data),\n            accessList: accessListJSON,\n            v: this.v !== undefined ? bigIntToHex(this.v) : undefined,\n            r: this.r !== undefined ? bigIntToHex(this.r) : undefined,\n            s: this.s !== undefined ? bigIntToHex(this.s) : undefined,\n        };\n    }\n    /**\n     * Return a compact error string representation of the object\n     */\n    errorStr() {\n        var _a, _b;\n        let errorStr = this._getSharedErrorPostfix();\n        // Keep ? for this.accessList since this otherwise causes Hardhat E2E tests to fail\n        errorStr += ` gasPrice=${this.gasPrice} accessListCount=${(_b = (_a = this.accessList) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0}`;\n        return errorStr;\n    }\n    /**\n     * Internal helper function to create an annotated error message\n     *\n     * @param msg Base error message\n     * @hidden\n     */\n    _errorMsg(msg) {\n        return `${msg} (${this.errorStr()})`;\n    }\n}\n//# sourceMappingURL=eip2930Transaction.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { RLP } from '@ethereumjs/rlp';\nimport { keccak256 } from 'ethereum-cryptography/keccak.js';\nimport { bytesToHex } from 'web3-utils';\nimport { validateNoLeadingZeroes } from 'web3-validator';\nimport { bigIntToHex, bigIntToUnpaddedUint8Array, ecrecover, toUint8Array, uint8ArrayToBigInt, unpadUint8Array, } from '../common/utils.js';\nimport { MAX_INTEGER } from './constants.js';\nimport { BaseTransaction } from './baseTransaction.js';\nimport { Capability } from './types.js';\nconst TRANSACTION_TYPE = 0;\nfunction meetsEIP155(_v, chainId) {\n    const v = Number(_v);\n    const chainIdDoubled = Number(chainId) * 2;\n    return v === chainIdDoubled + 35 || v === chainIdDoubled + 36;\n}\n/**\n * An Ethereum non-typed (legacy) transaction\n */\n// eslint-disable-next-line no-use-before-define\nexport class Transaction extends BaseTransaction {\n    /**\n     * Instantiate a transaction from a data dictionary.\n     *\n     * Format: { nonce, gasPrice, gasLimit, to, value, data, v, r, s }\n     *\n     * Notes:\n     * - All parameters are optional and have some basic default values\n     */\n    static fromTxData(txData, opts = {}) {\n        return new Transaction(txData, opts);\n    }\n    /**\n     * Instantiate a transaction from the serialized tx.\n     *\n     * Format: `rlp([nonce, gasPrice, gasLimit, to, value, data, v, r, s])`\n     */\n    static fromSerializedTx(serialized, opts = {}) {\n        const values = RLP.decode(serialized);\n        if (!Array.isArray(values)) {\n            throw new Error('Invalid serialized tx input. Must be array');\n        }\n        return this.fromValuesArray(values, opts);\n    }\n    /**\n     * Create a transaction from a values array.\n     *\n     * Format: `[nonce, gasPrice, gasLimit, to, value, data, v, r, s]`\n     */\n    static fromValuesArray(values, opts = {}) {\n        // If length is not 6, it has length 9. If v/r/s are empty Uint8Array, it is still an unsigned transaction\n        // This happens if you get the RLP data from `raw()`\n        if (values.length !== 6 && values.length !== 9) {\n            throw new Error('Invalid transaction. Only expecting 6 values (for unsigned tx) or 9 values (for signed tx).');\n        }\n        const [nonce, gasPrice, gasLimit, to, value, data, v, r, s] = values;\n        validateNoLeadingZeroes({ nonce, gasPrice, gasLimit, value, v, r, s });\n        return new Transaction({\n            nonce,\n            gasPrice,\n            gasLimit,\n            to,\n            value,\n            data,\n            v,\n            r,\n            s,\n        }, opts);\n    }\n    /**\n     * This constructor takes the values, validates them, assigns them and freezes the object.\n     *\n     * It is not recommended to use this constructor directly. Instead use\n     * the static factory methods to assist in creating a Transaction object from\n     * varying data types.\n     */\n    constructor(txData, opts = {}) {\n        var _a;\n        super(Object.assign(Object.assign({}, txData), { type: TRANSACTION_TYPE }), opts);\n        this.common = this._validateTxV(this.v, opts.common);\n        this.gasPrice = uint8ArrayToBigInt(toUint8Array(txData.gasPrice === '' ? '0x' : txData.gasPrice));\n        if (this.gasPrice * this.gasLimit > MAX_INTEGER) {\n            const msg = this._errorMsg('gas limit * gasPrice cannot exceed MAX_INTEGER (2^256-1)');\n            throw new Error(msg);\n        }\n        this._validateCannotExceedMaxInteger({ gasPrice: this.gasPrice });\n        BaseTransaction._validateNotArray(txData);\n        if (this.common.gteHardfork('spuriousDragon')) {\n            if (!this.isSigned()) {\n                this.activeCapabilities.push(Capability.EIP155ReplayProtection);\n            }\n            else {\n                // EIP155 spec:\n                // If block.number >= 2,675,000 and v = CHAIN_ID * 2 + 35 or v = CHAIN_ID * 2 + 36\n                // then when computing the hash of a transaction for purposes of signing or recovering\n                // instead of hashing only the first six elements (i.e. nonce, gasprice, startgas, to, value, data)\n                // hash nine elements, with v replaced by CHAIN_ID, r = 0 and s = 0.\n                // v and chain ID meet EIP-155 conditions\n                // eslint-disable-next-line no-lonely-if\n                if (meetsEIP155(this.v, this.common.chainId())) {\n                    this.activeCapabilities.push(Capability.EIP155ReplayProtection);\n                }\n            }\n        }\n        const freeze = (_a = opts === null || opts === void 0 ? void 0 : opts.freeze) !== null && _a !== void 0 ? _a : true;\n        if (freeze) {\n            Object.freeze(this);\n        }\n    }\n    /**\n     * Returns a Uint8Array Array of the raw Uint8Arrays of the legacy transaction, in order.\n     *\n     * Format: `[nonce, gasPrice, gasLimit, to, value, data, v, r, s]`\n     *\n     * For legacy txs this is also the correct format to add transactions\n     * to a block with {@link Block.fromValuesArray} (use the `serialize()` method\n     * for typed txs).\n     *\n     * For an unsigned tx this method returns the empty Uint8Array values\n     * for the signature parameters `v`, `r` and `s`. For an EIP-155 compliant\n     * representation have a look at {@link Transaction.getMessageToSign}.\n     */\n    raw() {\n        return [\n            bigIntToUnpaddedUint8Array(this.nonce),\n            bigIntToUnpaddedUint8Array(this.gasPrice),\n            bigIntToUnpaddedUint8Array(this.gasLimit),\n            this.to !== undefined ? this.to.buf : Uint8Array.from([]),\n            bigIntToUnpaddedUint8Array(this.value),\n            this.data,\n            this.v !== undefined ? bigIntToUnpaddedUint8Array(this.v) : Uint8Array.from([]),\n            this.r !== undefined ? bigIntToUnpaddedUint8Array(this.r) : Uint8Array.from([]),\n            this.s !== undefined ? bigIntToUnpaddedUint8Array(this.s) : Uint8Array.from([]),\n        ];\n    }\n    /**\n     * Returns the serialized encoding of the legacy transaction.\n     *\n     * Format: `rlp([nonce, gasPrice, gasLimit, to, value, data, v, r, s])`\n     *\n     * For an unsigned tx this method uses the empty Uint8Array values for the\n     * signature parameters `v`, `r` and `s` for encoding. For an EIP-155 compliant\n     * representation for external signing use {@link Transaction.getMessageToSign}.\n     */\n    serialize() {\n        return RLP.encode(this.raw());\n    }\n    _getMessageToSign() {\n        const values = [\n            bigIntToUnpaddedUint8Array(this.nonce),\n            bigIntToUnpaddedUint8Array(this.gasPrice),\n            bigIntToUnpaddedUint8Array(this.gasLimit),\n            this.to !== undefined ? this.to.buf : Uint8Array.from([]),\n            bigIntToUnpaddedUint8Array(this.value),\n            this.data,\n        ];\n        if (this.supports(Capability.EIP155ReplayProtection)) {\n            values.push(toUint8Array(this.common.chainId()));\n            values.push(unpadUint8Array(toUint8Array(0)));\n            values.push(unpadUint8Array(toUint8Array(0)));\n        }\n        return values;\n    }\n    getMessageToSign(hashMessage = true) {\n        const message = this._getMessageToSign();\n        if (hashMessage) {\n            return keccak256(RLP.encode(message));\n        }\n        return message;\n    }\n    /**\n     * The amount of gas paid for the data in this tx\n     */\n    getDataFee() {\n        if (this.cache.dataFee && this.cache.dataFee.hardfork === this.common.hardfork()) {\n            return this.cache.dataFee.value;\n        }\n        if (Object.isFrozen(this)) {\n            this.cache.dataFee = {\n                value: super.getDataFee(),\n                hardfork: this.common.hardfork(),\n            };\n        }\n        return super.getDataFee();\n    }\n    /**\n     * The up front amount that an account must have for this transaction to be valid\n     */\n    getUpfrontCost() {\n        return this.gasLimit * this.gasPrice + this.value;\n    }\n    /**\n     * Computes a sha3-256 hash of the serialized tx.\n     *\n     * This method can only be used for signed txs (it throws otherwise).\n     * Use {@link Transaction.getMessageToSign} to get a tx hash for the purpose of signing.\n     */\n    hash() {\n        if (!this.isSigned()) {\n            const msg = this._errorMsg('Cannot call hash method if transaction is not signed');\n            throw new Error(msg);\n        }\n        if (Object.isFrozen(this)) {\n            if (!this.cache.hash) {\n                this.cache.hash = keccak256(RLP.encode(this.raw()));\n            }\n            return this.cache.hash;\n        }\n        return keccak256(RLP.encode(this.raw()));\n    }\n    /**\n     * Computes a sha3-256 hash which can be used to verify the signature\n     */\n    getMessageToVerifySignature() {\n        if (!this.isSigned()) {\n            const msg = this._errorMsg('This transaction is not signed');\n            throw new Error(msg);\n        }\n        const message = this._getMessageToSign();\n        return keccak256(RLP.encode(message));\n    }\n    /**\n     * Returns the public key of the sender\n     */\n    getSenderPublicKey() {\n        const msgHash = this.getMessageToVerifySignature();\n        const { v, r, s } = this;\n        this._validateHighS();\n        try {\n            return ecrecover(msgHash, v, bigIntToUnpaddedUint8Array(r), bigIntToUnpaddedUint8Array(s), this.supports(Capability.EIP155ReplayProtection)\n                ? this.common.chainId()\n                : undefined);\n        }\n        catch (e) {\n            const msg = this._errorMsg('Invalid Signature');\n            throw new Error(msg);\n        }\n    }\n    /**\n     * Process the v, r, s values from the `sign` method of the base transaction.\n     */\n    _processSignature(_v, r, s) {\n        let v = _v;\n        if (this.supports(Capability.EIP155ReplayProtection)) {\n            v += this.common.chainId() * BigInt(2) + BigInt(8);\n        }\n        const opts = Object.assign(Object.assign({}, this.txOptions), { common: this.common });\n        return Transaction.fromTxData({\n            nonce: this.nonce,\n            gasPrice: this.gasPrice,\n            gasLimit: this.gasLimit,\n            to: this.to,\n            value: this.value,\n            data: this.data,\n            v,\n            r: uint8ArrayToBigInt(r),\n            s: uint8ArrayToBigInt(s),\n        }, opts);\n    }\n    /**\n     * Returns an object with the JSON representation of the transaction.\n     */\n    toJSON() {\n        return {\n            nonce: bigIntToHex(this.nonce),\n            gasPrice: bigIntToHex(this.gasPrice),\n            gasLimit: bigIntToHex(this.gasLimit),\n            to: this.to !== undefined ? this.to.toString() : undefined,\n            value: bigIntToHex(this.value),\n            data: bytesToHex(this.data),\n            v: this.v !== undefined ? bigIntToHex(this.v) : undefined,\n            r: this.r !== undefined ? bigIntToHex(this.r) : undefined,\n            s: this.s !== undefined ? bigIntToHex(this.s) : undefined,\n        };\n    }\n    /**\n     * Validates tx's `v` value\n     */\n    _validateTxV(_v, common) {\n        let chainIdBigInt;\n        const v = _v !== undefined ? Number(_v) : undefined;\n        // Check for valid v values in the scope of a signed legacy tx\n        if (v !== undefined) {\n            // v is 1. not matching the EIP-155 chainId included case and...\n            // v is 2. not matching the classic v=27 or v=28 case\n            if (v < 37 && v !== 27 && v !== 28) {\n                throw new Error(`Legacy txs need either v = 27/28 or v >= 37 (EIP-155 replay protection), got v = ${v}`);\n            }\n        }\n        // No unsigned tx and EIP-155 activated and chain ID included\n        if (v !== undefined &&\n            v !== 0 &&\n            (!common || common.gteHardfork('spuriousDragon')) &&\n            v !== 27 &&\n            v !== 28) {\n            if (common) {\n                if (!meetsEIP155(BigInt(v), common.chainId())) {\n                    throw new Error(`Incompatible EIP155-based V ${v} and chain id ${common.chainId()}. See the Common parameter of the Transaction constructor to set the chain id.`);\n                }\n            }\n            else {\n                // Derive the original chain ID\n                let numSub;\n                if ((v - 35) % 2 === 0) {\n                    numSub = 35;\n                }\n                else {\n                    numSub = 36;\n                }\n                // Use derived chain ID to create a proper Common\n                chainIdBigInt = BigInt(v - numSub) / BigInt(2);\n            }\n        }\n        return this._getCommon(common, chainIdBigInt);\n    }\n    /**\n     * Return a compact error string representation of the object\n     */\n    errorStr() {\n        let errorStr = this._getSharedErrorPostfix();\n        errorStr += ` gasPrice=${this.gasPrice}`;\n        return errorStr;\n    }\n    /**\n     * Internal helper function to create an annotated error message\n     *\n     * @param msg Base error message\n     * @hidden\n     */\n    _errorMsg(msg) {\n        return `${msg} (${this.errorStr()})`;\n    }\n}\n//# sourceMappingURL=legacyTransaction.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { isUint8Array } from 'web3-utils';\nimport { toUint8Array, uint8ArrayToBigInt } from '../common/utils.js';\nimport { FeeMarketEIP1559Transaction } from './eip1559Transaction.js';\nimport { AccessListEIP2930Transaction } from './eip2930Transaction.js';\nimport { Transaction } from './legacyTransaction.js';\nconst extraTxTypes = new Map();\n// eslint-disable-next-line @typescript-eslint/no-extraneous-class\nexport class TransactionFactory {\n    // It is not possible to instantiate a TransactionFactory object.\n    // eslint-disable-next-line no-useless-constructor, @typescript-eslint/no-empty-function\n    constructor() { }\n    static typeToInt(txType) {\n        return Number(uint8ArrayToBigInt(toUint8Array(txType)));\n    }\n    static registerTransactionType(type, txClass) {\n        const txType = TransactionFactory.typeToInt(type);\n        extraTxTypes.set(txType, txClass);\n    }\n    /**\n     * Create a transaction from a `txData` object\n     *\n     * @param txData - The transaction data. The `type` field will determine which transaction type is returned (if undefined, creates a legacy transaction)\n     * @param txOptions - Options to pass on to the constructor of the transaction\n     */\n    static fromTxData(txData, txOptions = {}) {\n        if (!('type' in txData) || txData.type === undefined) {\n            // Assume legacy transaction\n            return Transaction.fromTxData(txData, txOptions);\n        }\n        const txType = TransactionFactory.typeToInt(txData.type);\n        if (txType === 0) {\n            return Transaction.fromTxData(txData, txOptions);\n        }\n        if (txType === 1) {\n            // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n            return AccessListEIP2930Transaction.fromTxData(\n            // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n            txData, txOptions);\n        }\n        if (txType === 2) {\n            return FeeMarketEIP1559Transaction.fromTxData(\n            // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n            txData, txOptions);\n        }\n        const ExtraTransaction = extraTxTypes.get(txType);\n        if (ExtraTransaction === null || ExtraTransaction === void 0 ? void 0 : ExtraTransaction.fromTxData) {\n            return ExtraTransaction.fromTxData(txData, txOptions);\n        }\n        throw new Error(`Tx instantiation with type ${txType} not supported`);\n    }\n    /**\n     * This method tries to decode serialized data.\n     *\n     * @param data - The data Uint8Array\n     * @param txOptions - The transaction options\n     */\n    static fromSerializedData(data, txOptions = {}) {\n        if (data[0] <= 0x7f) {\n            // Determine the type.\n            switch (data[0]) {\n                case 1:\n                    return AccessListEIP2930Transaction.fromSerializedTx(data, txOptions);\n                case 2:\n                    return FeeMarketEIP1559Transaction.fromSerializedTx(data, txOptions);\n                default: {\n                    const ExtraTransaction = extraTxTypes.get(Number(data[0]));\n                    if (ExtraTransaction === null || ExtraTransaction === void 0 ? void 0 : ExtraTransaction.fromSerializedTx) {\n                        return ExtraTransaction.fromSerializedTx(data, txOptions);\n                    }\n                    throw new Error(`TypedTransaction with ID ${data[0]} unknown`);\n                }\n            }\n        }\n        else {\n            return Transaction.fromSerializedTx(data, txOptions);\n        }\n    }\n    /**\n     * When decoding a BlockBody, in the transactions field, a field is either:\n     * A Uint8Array (a TypedTransaction - encoded as TransactionType || rlp(TransactionPayload))\n     * A Uint8Array[] (Legacy Transaction)\n     * This method returns the right transaction.\n     *\n     * @param data - A Uint8Array or Uint8Array[]\n     * @param txOptions - The transaction options\n     */\n    static fromBlockBodyData(data, txOptions = {}) {\n        if (isUint8Array(data)) {\n            return this.fromSerializedData(data, txOptions);\n        }\n        if (Array.isArray(data)) {\n            // It is a legacy transaction\n            return Transaction.fromValuesArray(data, txOptions);\n        }\n        throw new Error('Cannot decode transaction: unknown type input');\n    }\n}\n//# sourceMappingURL=transactionFactory.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\n/**\n * The web3 accounts package contains functions to generate Ethereum accounts and sign transactions & data.\n *\n * For using accounts functions, first install Web3 package using `npm i web3` or `yarn add web3` based on your package manager usage.\n * After that, Accounts functions will be available as mentioned in following snippet.\n * ```ts\n * import {Web3} from 'web3';\n *\n * const web3 = new Web3();\n * const account = web3.eth.accounts.create();\n * const result = web3.eth.accounts.hashMessage(\"Test Message\");\n *\n * ```\n *\n * For using individual package install `web3-eth-accounts` package using `npm i web3-eth-accounts` or `yarn add web3-eth-accounts` and only import required functions.\n * This is more efficient approach for building lightweight applications.\n * ```ts\n * import {create,hashMessage} from 'web3-eth-accounts';\n *\n * const account = create();\n * const result = hashMessage(\"Test Message\");\n *\n * ```\n * @module Accounts\n *\n */\nimport { decrypt as createDecipheriv, encrypt as createCipheriv, } from 'ethereum-cryptography/aes.js';\nimport { pbkdf2Sync } from 'ethereum-cryptography/pbkdf2.js';\nimport { scryptSync } from 'ethereum-cryptography/scrypt.js';\nimport { InvalidKdfError, InvalidPasswordError, InvalidPrivateKeyError, InvalidSignatureError, IVLengthError, KeyDerivationError, KeyStoreVersionError, PBKDF2IterationsError, PrivateKeyLengthError, TransactionSigningError, UndefinedRawTransactionError, } from 'web3-errors';\nimport { bytesToUint8Array, bytesToHex, fromUtf8, hexToBytes, isUint8Array, numberToHex, randomBytes, sha3Raw, toChecksumAddress, uint8ArrayConcat, utf8ToHex, uuidV4, } from 'web3-utils';\nimport { isHexStrict, isNullish, isString, validator } from 'web3-validator';\nimport { secp256k1 } from './tx/constants.js';\nimport { keyStoreSchema } from './schemas.js';\nimport { TransactionFactory } from './tx/transactionFactory.js';\n/**\n * Get the private key Uint8Array after the validation.\n * Note: This function is not exported through main web3 package, so for using it directly import from accounts package.\n * @param data - Private key\n * @param ignoreLength - Optional, ignore length check during validation\n * @returns The Uint8Array private key\n *\n * ```ts\n * parseAndValidatePrivateKey(\"0x08c673022000ece7964ea4db2d9369c50442b2869cbd8fc21baaca59e18f642c\")\n *\n * > Uint8Array(32) [\n * 186,  26, 143, 168, 235, 179,  90,  75,\n * 101,  63,  84, 221, 152, 150,  30, 203,\n *   8, 113,  94, 226,  53, 213, 216,   5,\n * 194, 159,  17,  53, 219,  97, 121, 248\n * ]\n *\n * ```\n */\nexport const parseAndValidatePrivateKey = (data, ignoreLength) => {\n    let privateKeyUint8Array;\n    // To avoid the case of 1 character less in a hex string which is prefixed with '0' by using 'bytesToUint8Array'\n    if (!ignoreLength && typeof data === 'string' && isHexStrict(data) && data.length !== 66) {\n        throw new PrivateKeyLengthError();\n    }\n    try {\n        privateKeyUint8Array = isUint8Array(data) ? data : bytesToUint8Array(data);\n    }\n    catch (_a) {\n        throw new InvalidPrivateKeyError();\n    }\n    if (!ignoreLength && privateKeyUint8Array.byteLength !== 32) {\n        throw new PrivateKeyLengthError();\n    }\n    return privateKeyUint8Array;\n};\n/**\n *\n * Hashes the given message. The data will be `UTF-8 HEX` decoded and enveloped as follows:\n * `\"\\x19Ethereum Signed Message:\\n\" + message.length + message` and hashed using keccak256.\n *\n * @param message - A message to hash, if its HEX it will be UTF8 decoded.\n * @param skipPrefix - (default: false) If true, the message will be not prefixed with \"\\x19Ethereum Signed Message:\\n\" + message.length\n * @returns The hashed message\n *\n * ```ts\n * web3.eth.accounts.hashMessage(\"Hello world\")\n *\n * > \"0x8144a6fa26be252b86456491fbcd43c1de7e022241845ffea1c3df066f7cfede\"\n *\n * web3.eth.accounts.hashMessage(web3.utils.utf8ToHex(\"Hello world\")) // Will be hex decoded in hashMessage\n *\n * > \"0x8144a6fa26be252b86456491fbcd43c1de7e022241845ffea1c3df066f7cfede\"\n *\n * web3.eth.accounts.hashMessage(\"Hello world\", true)\n *\n * > \"0xed6c11b0b5b808960df26f5bfc471d04c1995b0ffd2055925ad1be28d6baadfd\"\n * ```\n */\nexport const hashMessage = (message, skipPrefix = false) => {\n    const messageHex = isHexStrict(message) ? message : utf8ToHex(message);\n    const messageBytes = hexToBytes(messageHex);\n    const preamble = hexToBytes(fromUtf8(`\\x19Ethereum Signed Message:\\n${messageBytes.byteLength}`));\n    const ethMessage = skipPrefix ? messageBytes : uint8ArrayConcat(preamble, messageBytes);\n    return sha3Raw(ethMessage); // using keccak in web3-utils.sha3Raw instead of SHA3 (NIST Standard) as both are different\n};\n/**\n * Takes a hash of a message and a private key, signs the message using the SECP256k1 elliptic curve algorithm, and returns the signature components.\n * @param hash - The hash of the message to be signed, represented as a hexadecimal string.\n * @param privateKey - The private key used to sign the message, represented as a byte array.\n * @returns - The signature Object containing the message, messageHash, signature r, s, v\n */\nexport const signMessageWithPrivateKey = (hash, privateKey) => {\n    const privateKeyUint8Array = parseAndValidatePrivateKey(privateKey);\n    const signature = secp256k1.sign(hash.substring(2), privateKeyUint8Array);\n    const signatureBytes = signature.toCompactRawBytes();\n    const r = signature.r.toString(16).padStart(64, '0');\n    const s = signature.s.toString(16).padStart(64, '0');\n    const v = signature.recovery + 27;\n    return {\n        messageHash: hash,\n        v: numberToHex(v),\n        r: `0x${r}`,\n        s: `0x${s}`,\n        signature: `${bytesToHex(signatureBytes)}${v.toString(16)}`,\n    };\n};\n/**\n * Signs arbitrary data with a given private key.\n * :::info\n * The value passed as the data parameter will be UTF-8 HEX decoded and wrapped as follows: \"\\\\x19Ethereum Signed Message:\\\\n\" + message.length + message\n * :::\n\n * @param data - The data to sign\n * @param privateKey - The 32 byte private key to sign with\n * @returns The signature Object containing the message, messageHash, signature r, s, v\n *\n * ```ts\n * web3.eth.accounts.sign('Some data', '0x4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318')\n * > {\n * message: 'Some data',\n * messageHash: '0x1da44b586eb0729ff70a73c326926f6ed5a25f5b056e7f47fbc6e58d86871655',\n * v: '0x1c',\n * r: '0xb91467e570a6466aa9e9876cbcd013baba02900b8979d43fe208a4a4f339f5fd',\n * s: '0x6007e74cd82e037b800186422fc2da167c747ef045e5d18a5f5d4300f8e1a029',\n * signature: '0xb91467e570a6466aa9e9876cbcd013baba02900b8979d43fe208a4a4f339f5fd6007e74cd82e037b800186422fc2da167c747ef045e5d18a5f5d4300f8e1a0291c'\n * }\n * ```\n */\nexport const sign = (data, privateKey) => {\n    const hash = hashMessage(data);\n    const { messageHash, v, r, s, signature } = signMessageWithPrivateKey(hash, privateKey);\n    return {\n        message: data,\n        messageHash,\n        v,\n        r,\n        s,\n        signature,\n    };\n};\n/**\n * Signs raw data with a given private key without adding the Ethereum-specific prefix.\n *\n * @param data - The raw data to sign. If it's a hex string, it will be used as-is. Otherwise, it will be UTF-8 encoded.\n * @param privateKey - The 32 byte private key to sign with\n * @returns The signature Object containing the message, messageHash, signature r, s, v\n *\n * ```ts\n * web3.eth.accounts.signRaw('Some data', '0x4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318')\n * > {\n *   message: 'Some data',\n *   messageHash: '0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c169350',\n *   v: '0x1b',\n *   r: '0x93da7e2ddd6b2ff1f5af0c752f052ed0d7d5bff19257db547a69cd9a879b37d4',\n *   s: '0x334485e42b33815fd2cf8a245a5393b282214060844a9681495df2257140e75c',\n *   signature: '0x93da7e2ddd6b2ff1f5af0c752f052ed0d7d5bff19257db547a69cd9a879b37d4334485e42b33815fd2cf8a245a5393b282214060844a9681495df2257140e75c1b'\n * }\n * ```\n */\nexport const signRaw = (data, privateKey) => {\n    // Hash the message without the Ethereum-specific prefix\n    const hash = hashMessage(data, true);\n    // Sign the hash with the private key\n    const { messageHash, v, r, s, signature } = signMessageWithPrivateKey(hash, privateKey);\n    return {\n        message: data,\n        messageHash,\n        v,\n        r,\n        s,\n        signature,\n    };\n};\n/**\n * Signs an Ethereum transaction with a given private key.\n *\n * @param transaction - The transaction, must be a legacy, EIP2930 or EIP 1559 transaction type\n * @param privateKey -  The private key to import. This is 32 bytes of random data.\n * @returns A signTransactionResult object that contains message hash, r, s, v, transaction hash and raw transaction.\n *\n * This function is not stateful here. We need network access to get the account `nonce` and `chainId` to sign the transaction.\n * This function will rely on user to provide the full transaction to be signed. If you want to sign a partial transaction object\n * Use {@link Web3.eth.accounts.sign} instead.\n *\n * Signing a legacy transaction\n * ```ts\n * import {signTransaction, Transaction} from 'web3-eth-accounts';\n *\n * signTransaction(new Transaction({\n *\tto: '0x118C2E5F57FD62C2B5b46a5ae9216F4FF4011a07',\n *\tvalue: '0x186A0',\n *\tgasLimit: '0x520812',\n *\tgasPrice: '0x09184e72a000',\n *\tdata: '',\n *\tchainId: 1,\n *\tnonce: 0 }),\n * '0x4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318')\n *\n * > {\n * messageHash: '0x28b7b75f7ba48d588a902c1ff4d5d13cc0ca9ac0aaa39562368146923fb853bf',\n * v: '0x25',\n * r: '0x601b0017b0e20dd0eeda4b895fbc1a9e8968990953482214f880bae593e71b5',\n * s: '0x690d984493560552e3ebdcc19a65b9c301ea9ddc82d3ab8cfde60485fd5722ce',\n * rawTransaction: '0xf869808609184e72a0008352081294118c2e5f57fd62c2b5b46a5ae9216f4ff4011a07830186a08025a00601b0017b0e20dd0eeda4b895fbc1a9e8968990953482214f880bae593e71b5a0690d984493560552e3ebdcc19a65b9c301ea9ddc82d3ab8cfde60485fd5722ce',\n * transactionHash: '0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470'\n * ```\n *\n * Signing an eip 1559 transaction\n * ```ts\n * import {signTransaction, Transaction} from 'web3-eth-accounts';\n *\n * signTransaction(new Transaction({\n *\tto: '0xF0109fC8DF283027b6285cc889F5aA624EaC1F55',\n *\tmaxPriorityFeePerGas: '0x3B9ACA00',\n *\tmaxFeePerGas: '0xB2D05E00',\n *\tgasLimit: '0x6A4012',\n *\tvalue: '0x186A0',\n *\tdata: '',\n *\tchainId: 1,\n *\tnonce: 0}),\n * \"0x4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318\")\n * > {\n *  messageHash: '0x5744f24d5f0aff6c70487c8e85adf07d8564e50b08558788f00479611d7bae5f',\n * v: '0x25',\n * r: '0x78a5a6b2876c3985f90f82073d18d57ac299b608cc76a4ba697b8bb085048347',\n * s: '0x9cfcb40cc7d505ed17ff2d3337b51b066648f10c6b7e746117de69b2eb6358d',\n * rawTransaction: '0xf8638080836a401294f0109fc8df283027b6285cc889f5aa624eac1f55830186a08025a078a5a6b2876c3985f90f82073d18d57ac299b608cc76a4ba697b8bb085048347a009cfcb40cc7d505ed17ff2d3337b51b066648f10c6b7e746117de69b2eb6358d',\n * transactionHash: '0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470'\n * }\n * ```\n *\n * Signing an eip 2930 transaction\n * ```ts\n * import {signTransaction, Transaction} from 'web3-eth-accounts';\n *\n * signTransaction(new Transaction ({\n *\tchainId: 1,\n *\tnonce: 0,\n *\tgasPrice: '0x09184e72a000',\n *\tgasLimit: '0x2710321',\n *\tto: '0xF0109fC8DF283027b6285cc889F5aA624EaC1F55',\n *\tvalue: '0x186A0',\n *\tdata: '',\n *\taccessList: [\n *\t\t{\n *\t\t\taddress: '0x0000000000000000000000000000000000000101',\n *\t\t\tstorageKeys: [\n *\t\t\t\t'0x0000000000000000000000000000000000000000000000000000000000000000',\n *\t\t\t\t'0x00000000000000000000000000000000000000000000000000000000000060a7',\n *\t\t\t],\n *\t\t},\n *\t],\n * }),\"0x4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318\")\n *\n * > {\n * messageHash: '0xc55ea24bdb4c379550a7c9a6818ac39ca33e75bc78ddb862bd82c31cc1c7a073',\n * v: '0x26',\n * r: '0x27344e77871c8b2068bc998bf28e0b5f9920867a69c455b2ed0c1c150fec098e',\n * s: '0x519f0130a1d662841d4a28082e9c9bb0a15e0e59bb46cfc39a52f0e285dec6b9',\n * rawTransaction: '0xf86a808609184e72a000840271032194f0109fc8df283027b6285cc889f5aa624eac1f55830186a08026a027344e77871c8b2068bc998bf28e0b5f9920867a69c455b2ed0c1c150fec098ea0519f0130a1d662841d4a28082e9c9bb0a15e0e59bb46cfc39a52f0e285dec6b9',\n * transactionHash: '0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470'\n * }\n * ```\n */\nexport const signTransaction = (transaction, privateKey) => __awaiter(void 0, void 0, void 0, function* () {\n    const signedTx = transaction.sign(hexToBytes(privateKey));\n    if (isNullish(signedTx.v) || isNullish(signedTx.r) || isNullish(signedTx.s))\n        throw new TransactionSigningError('Signer Error');\n    const validationErrors = signedTx.validate(true);\n    if (validationErrors.length > 0) {\n        let errorString = 'Signer Error ';\n        for (const validationError of validationErrors) {\n            errorString += `${errorString} ${validationError}.`;\n        }\n        throw new TransactionSigningError(errorString);\n    }\n    const rawTx = bytesToHex(signedTx.serialize());\n    const txHash = sha3Raw(rawTx); // using keccak in web3-utils.sha3Raw instead of SHA3 (NIST Standard) as both are different\n    return {\n        messageHash: bytesToHex(signedTx.getMessageToSign(true)),\n        v: `0x${signedTx.v.toString(16)}`,\n        r: `0x${signedTx.r.toString(16).padStart(64, '0')}`,\n        s: `0x${signedTx.s.toString(16).padStart(64, '0')}`,\n        rawTransaction: rawTx,\n        transactionHash: bytesToHex(txHash),\n    };\n});\n/**\n * Recovers the Ethereum address which was used to sign the given RLP encoded transaction.\n *\n * @param rawTransaction - The hex string having RLP encoded transaction\n * @returns The Ethereum address used to sign this transaction\n * ```ts\n * web3.eth.accounts.recoverTransaction('0xf869808504e3b29200831e848094f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008025a0c9cf86333bcb065d140032ecaab5d9281bde80f21b9687b3e94161de42d51895a0727a108a0b8d101465414033c3f705a9c7b826e596766046ee1183dbc8aeaa68');\n * > \"0x2c7536E3605D9C16a7a3D7b1898e529396a65c23\"\n * ```\n */\nexport const recoverTransaction = (rawTransaction) => {\n    if (isNullish(rawTransaction))\n        throw new UndefinedRawTransactionError();\n    const tx = TransactionFactory.fromSerializedData(hexToBytes(rawTransaction));\n    return toChecksumAddress(tx.getSenderAddress().toString());\n};\n/**\n * Recovers the Ethereum address which was used to sign the given data\n *\n * @param data - Either a signed message, hash, or the {@link signatureObject}\n * @param signature - The raw RLP encoded signature\n * @param signatureOrV - signature or V\n * @param prefixedOrR - prefixed or R\n * @param s - S value in signature\n * @param prefixed - (default: false) If the last parameter is true, the given message will NOT automatically be prefixed with `\"\\\\x19Ethereum Signed Message:\\\\n\" + message.length + message`, and assumed to be already prefixed and hashed.\n * @returns The Ethereum address used to sign this data\n *\n * ```ts\n * const data = 'Some data';\n * const sigObj = web3.eth.accounts.sign(data, '0xbe6383dad004f233317e46ddb46ad31b16064d14447a95cc1d8c8d4bc61c3728')\n *\n * > {\n *   message: 'Some data',\n *   messageHash: '0x1da44b586eb0729ff70a73c326926f6ed5a25f5b056e7f47fbc6e58d86871655',\n *   v: '0x1b',\n *   r: '0xa8037a6116c176a25e6fc224947fde9e79a2deaa0dd8b67b366fbdfdbffc01f9',\n *   s: '0x53e41351267b20d4a89ebfe9c8f03c04de9b345add4a52f15bd026b63c8fb150',\n *   signature: '0xa8037a6116c176a25e6fc224947fde9e79a2deaa0dd8b67b366fbdfdbffc01f953e41351267b20d4a89ebfe9c8f03c04de9b345add4a52f15bd026b63c8fb1501b'\n * }\n *\n * // now recover\n * web3.eth.accounts.recover(data, sigObj.v, sigObj.r, sigObj.s)\n *\n * > 0xEB014f8c8B418Db6b45774c326A0E64C78914dC0\n * ```\n */\nexport const recover = (data, signatureOrV, prefixedOrR, s, prefixed) => {\n    if (typeof data === 'object') {\n        const signatureStr = `${data.r}${data.s.slice(2)}${data.v.slice(2)}`;\n        return recover(data.messageHash, signatureStr, prefixedOrR);\n    }\n    if (typeof signatureOrV === 'string' && typeof prefixedOrR === 'string' && !isNullish(s)) {\n        const signatureStr = `${prefixedOrR}${s.slice(2)}${signatureOrV.slice(2)}`;\n        return recover(data, signatureStr, prefixed);\n    }\n    if (isNullish(signatureOrV))\n        throw new InvalidSignatureError('signature string undefined');\n    const V_INDEX = 130; // r = first 32 bytes, s = second 32 bytes, v = last byte of signature\n    const hashedMessage = prefixedOrR ? data : hashMessage(data);\n    let v = parseInt(signatureOrV.substring(V_INDEX), 16); // 0x + r + s + v\n    if (v > 26) {\n        v -= 27;\n    }\n    const ecPublicKey = secp256k1.Signature.fromCompact(signatureOrV.slice(2, V_INDEX))\n        .addRecoveryBit(v)\n        .recoverPublicKey(hashedMessage.replace('0x', ''))\n        .toRawBytes(false);\n    const publicHash = sha3Raw(ecPublicKey.subarray(1));\n    const address = toChecksumAddress(`0x${publicHash.slice(-40)}`);\n    return address;\n};\n/**\n * Get the ethereum Address from a private key\n *\n * @param privateKey - String or Uint8Array of 32 bytes\n * @param ignoreLength - if true, will not error check length\n * @returns The Ethereum address\n * @example\n * ```ts\n * web3.eth.accounts.privateKeyToAddress(\"0xbe6383dad004f233317e46ddb46ad31b16064d14447a95cc1d8c8d4bc61c3728\")\n *\n * > \"0xEB014f8c8B418Db6b45774c326A0E64C78914dC0\"\n * ```\n */\nexport const privateKeyToAddress = (privateKey) => {\n    const privateKeyUint8Array = parseAndValidatePrivateKey(privateKey);\n    // Get public key from private key in compressed format\n    const publicKey = secp256k1.getPublicKey(privateKeyUint8Array, false);\n    // Uncompressed ECDSA public key contains the prefix `0x04` which is not used in the Ethereum public key\n    const publicKeyHash = sha3Raw(publicKey.slice(1));\n    // The hash is returned as 256 bits (32 bytes) or 64 hex characters\n    // To get the address, take the last 20 bytes of the public hash\n    const address = publicKeyHash.slice(-40);\n    return toChecksumAddress(`0x${address}`);\n};\n/**\n * Get the public key from a private key\n *\n * @param privateKey - String or Uint8Array of 32 bytes\n * @param isCompressed - if true, will generate a 33 byte compressed public key instead of a 65 byte public key\n * @returns The public key\n * @example\n * ```ts\n * web3.eth.accounts.privateKeyToPublicKey(\"0x1e046a882bb38236b646c9f135cf90ad90a140810f439875f2a6dd8e50fa261f\", true)\n *\n * > \"0x42beb65f179720abaa3ec9a70a539629cbbc5ec65bb57e7fc78977796837e537662dd17042e6449dc843c281067a4d6d8d1a1775a13c41901670d5de7ee6503a\" // uncompressed public key\n * ```\n */\nexport const privateKeyToPublicKey = (privateKey, isCompressed) => {\n    const privateKeyUint8Array = parseAndValidatePrivateKey(privateKey);\n    // Get public key from private key in compressed format\n    return `0x${bytesToHex(secp256k1.getPublicKey(privateKeyUint8Array, isCompressed)).slice(4)}`; // 0x and removing compression byte\n};\n/**\n * encrypt a private key with a password, returns a V3 JSON Keystore\n *\n * Read more: https://github.com/ethereum/wiki/wiki/Web3-Secret-Storage-Definition\n *\n * @param privateKey - The private key to encrypt, 32 bytes.\n * @param password - The password used for encryption.\n * @param options - Options to configure to encrypt the keystore either scrypt or pbkdf2\n * @returns Returns a V3 JSON Keystore\n *\n * Encrypt using scrypt options:\n * ```ts\n *\n * web3.eth.accounts.encrypt(\n *    '0x67f476289210e3bef3c1c75e4de993ff0a00663df00def84e73aa7411eac18a6',\n *    '123',\n *    {\n *        n: 8192,\n *\t    iv: web3.utils.hexToBytes('0xbfb43120ae00e9de110f8325143a2709'),\n *\t    salt: web3.utils.hexToBytes('0x210d0ec956787d865358ac45716e6dd42e68d48e346d795746509523aeb477dd'),\n *\t}).then(console.log)\n *\n * > {\n * version: 3,\n * id: 'c0cb0a94-4702-4492-b6e6-eb2ac404344a',\n * address: 'cda9a91875fc35c8ac1320e098e584495d66e47c',\n * crypto: {\n *   ciphertext: 'cb3e13e3281ff3861a3f0257fad4c9a51b0eb046f9c7821825c46b210f040b8f',\n *   cipherparams: { iv: 'bfb43120ae00e9de110f8325143a2709' },\n *   cipher: 'aes-128-ctr',\n *   kdf: 'scrypt',\n *   kdfparams: {\n *     n: 8192,\n *     r: 8,\n *     p: 1,\n *     dklen: 32,\n *     salt: '210d0ec956787d865358ac45716e6dd42e68d48e346d795746509523aeb477dd'\n *   },\n *   mac: 'efbf6d3409f37c0084a79d5fdf9a6f5d97d11447517ef1ea8374f51e581b7efd'\n * }\n *}\n *```\n *\n * Encrypting using pbkdf2 options:\n * ```ts\n * web3.eth.accounts.encrypt('0x348ce564d427a3311b6536bbcff9390d69395b06ed6c486954e971d960fe8709',\n *'123',\n *{\n *\tiv: 'bfb43120ae00e9de110f8325143a2709',\n *\tsalt: '210d0ec956787d865358ac45716e6dd42e68d48e346d795746509523aeb477dd',\n *\tc: 262144,\n *\tkdf: 'pbkdf2',\n *}).then(console.log)\n *\n * >\n * {\n *   version: 3,\n *   id: '77381417-0973-4e4b-b590-8eb3ace0fe2d',\n *   address: 'b8ce9ab6943e0eced004cde8e3bbed6568b2fa01',\n *   crypto: {\n *     ciphertext: '76512156a34105fa6473ad040c666ae7b917d14c06543accc0d2dc28e6073b12',\n *     cipherparams: { iv: 'bfb43120ae00e9de110f8325143a2709' },\n *     cipher: 'aes-128-ctr',\n *     kdf: 'pbkdf2',\n *     kdfparams: {\n *       dklen: 32,\n *       salt: '210d0ec956787d865358ac45716e6dd42e68d48e346d795746509523aeb477dd',\n *       c: 262144,\n *       prf: 'hmac-sha256'\n *     },\n *   mac: '46eb4884e82dc43b5aa415faba53cc653b7038e9d61cc32fd643cf8c396189b7'\n *   }\n * }\n *```\n */\nexport const encrypt = (privateKey, password, options) => __awaiter(void 0, void 0, void 0, function* () {\n    var _a, _b, _c, _d, _e, _f, _g;\n    const privateKeyUint8Array = parseAndValidatePrivateKey(privateKey);\n    // if given salt or iv is a string, convert it to a Uint8Array\n    let salt;\n    if (options === null || options === void 0 ? void 0 : options.salt) {\n        salt = typeof options.salt === 'string' ? hexToBytes(options.salt) : options.salt;\n    }\n    else {\n        salt = randomBytes(32);\n    }\n    if (!(isString(password) || isUint8Array(password))) {\n        throw new InvalidPasswordError();\n    }\n    const uint8ArrayPassword = typeof password === 'string' ? hexToBytes(utf8ToHex(password)) : password;\n    let initializationVector;\n    if (options === null || options === void 0 ? void 0 : options.iv) {\n        initializationVector = typeof options.iv === 'string' ? hexToBytes(options.iv) : options.iv;\n        if (initializationVector.length !== 16) {\n            throw new IVLengthError();\n        }\n    }\n    else {\n        initializationVector = randomBytes(16);\n    }\n    const kdf = (_a = options === null || options === void 0 ? void 0 : options.kdf) !== null && _a !== void 0 ? _a : 'scrypt';\n    let derivedKey;\n    let kdfparams;\n    // derive key from key derivation function\n    if (kdf === 'pbkdf2') {\n        kdfparams = {\n            dklen: (_b = options === null || options === void 0 ? void 0 : options.dklen) !== null && _b !== void 0 ? _b : 32,\n            salt: bytesToHex(salt).replace('0x', ''),\n            c: (_c = options === null || options === void 0 ? void 0 : options.c) !== null && _c !== void 0 ? _c : 262144,\n            prf: 'hmac-sha256',\n        };\n        if (kdfparams.c < 1000) {\n            // error when c < 1000, pbkdf2 is less secure with less iterations\n            throw new PBKDF2IterationsError();\n        }\n        derivedKey = pbkdf2Sync(uint8ArrayPassword, salt, kdfparams.c, kdfparams.dklen, 'sha256');\n    }\n    else if (kdf === 'scrypt') {\n        kdfparams = {\n            n: (_d = options === null || options === void 0 ? void 0 : options.n) !== null && _d !== void 0 ? _d : 8192,\n            r: (_e = options === null || options === void 0 ? void 0 : options.r) !== null && _e !== void 0 ? _e : 8,\n            p: (_f = options === null || options === void 0 ? void 0 : options.p) !== null && _f !== void 0 ? _f : 1,\n            dklen: (_g = options === null || options === void 0 ? void 0 : options.dklen) !== null && _g !== void 0 ? _g : 32,\n            salt: bytesToHex(salt).replace('0x', ''),\n        };\n        derivedKey = scryptSync(uint8ArrayPassword, salt, kdfparams.n, kdfparams.p, kdfparams.r, kdfparams.dklen);\n    }\n    else {\n        throw new InvalidKdfError();\n    }\n    const cipher = yield createCipheriv(privateKeyUint8Array, derivedKey.slice(0, 16), initializationVector, 'aes-128-ctr');\n    const ciphertext = bytesToHex(cipher).slice(2);\n    const mac = sha3Raw(uint8ArrayConcat(derivedKey.slice(16, 32), cipher)).replace('0x', '');\n    return {\n        version: 3,\n        id: uuidV4(),\n        address: privateKeyToAddress(privateKeyUint8Array).toLowerCase().replace('0x', ''),\n        crypto: {\n            ciphertext,\n            cipherparams: {\n                iv: bytesToHex(initializationVector).replace('0x', ''),\n            },\n            cipher: 'aes-128-ctr',\n            kdf,\n            kdfparams,\n            mac,\n        },\n    };\n});\n/**\n * Get an Account object from the privateKey\n *\n * @param privateKey - String or Uint8Array of 32 bytes\n * @param ignoreLength - if true, will not error check length\n * @returns A Web3Account object\n *\n * :::info\n * The `Web3Account.signTransaction` is not stateful if directly imported from accounts package and used. Network access is required to get the account `nonce` and `chainId` to sign the transaction, so use {@link Web3.eth.accounts.signTransaction} for signing transactions.\n * ::::\n *\n * ```ts\n * web3.eth.accounts.privateKeyToAccount(\"0x348ce564d427a3311b6536bbcff9390d69395b06ed6c486954e971d960fe8709\");\n *\n * >    {\n * \t\t\taddress: '0xb8CE9ab6943e0eCED004cDe8e3bBed6568B2Fa01',\n * \t\t\tprivateKey: '0x348ce564d427a3311b6536bbcff9390d69395b06ed6c486954e971d960fe8709',\n * \t\t\tsign,\n * \t\t\tsignTransaction,\n * \t\t\tencrypt,\n * \t}\n * ```\n */\nexport const privateKeyToAccount = (privateKey, ignoreLength) => {\n    const privateKeyUint8Array = parseAndValidatePrivateKey(privateKey, ignoreLength);\n    return {\n        address: privateKeyToAddress(privateKeyUint8Array),\n        privateKey: bytesToHex(privateKeyUint8Array),\n        // eslint-disable-next-line @typescript-eslint/no-unused-vars\n        signTransaction: (_tx) => {\n            throw new TransactionSigningError('Do not have network access to sign the transaction');\n        },\n        sign: (data) => sign(typeof data === 'string' ? data : JSON.stringify(data), privateKeyUint8Array),\n        encrypt: (password, options) => __awaiter(void 0, void 0, void 0, function* () { return encrypt(privateKeyUint8Array, password, options); }),\n    };\n};\n/**\n *\n * Generates and returns a Web3Account object that includes the private and public key\n * For creation of private key, it uses an audited package ethereum-cryptography/secp256k1\n * that is cryptographically secure random number with certain characteristics.\n * Read more: https://www.npmjs.com/package/ethereum-cryptography#secp256k1-curve\n *\n * @returns A Web3Account object\n * ```ts\n * web3.eth.accounts.create();\n * {\n * address: '0xbD504f977021b5E5DdccD8741A368b147B3B38bB',\n * privateKey: '0x964ced1c69ad27a311c432fdc0d8211e987595f7eb34ab405a5f16bdc9563ec5',\n * signTransaction: [Function: signTransaction],\n * sign: [Function: sign],\n * encrypt: [AsyncFunction: encrypt]\n * }\n * ```\n */\nexport const create = () => {\n    const privateKey = secp256k1.utils.randomPrivateKey();\n    return privateKeyToAccount(`${bytesToHex(privateKey)}`);\n};\n/**\n * Decrypts a v3 keystore JSON, and creates the account.\n *\n * @param keystore - the encrypted Keystore object or string to decrypt\n * @param password - The password that was used for encryption\n * @param nonStrict - if true and given a json string, the keystore will be parsed as lowercase.\n * @returns Returns the decrypted Web3Account object\n * Decrypting scrypt\n *\n * ```ts\n * web3.eth.accounts.decrypt({\n *   version: 3,\n *   id: 'c0cb0a94-4702-4492-b6e6-eb2ac404344a',\n *   address: 'cda9a91875fc35c8ac1320e098e584495d66e47c',\n *   crypto: {\n *   ciphertext: 'cb3e13e3281ff3861a3f0257fad4c9a51b0eb046f9c7821825c46b210f040b8f',\n *      cipherparams: { iv: 'bfb43120ae00e9de110f8325143a2709' },\n *      cipher: 'aes-128-ctr',\n *      kdf: 'scrypt',\n *      kdfparams: {\n *        n: 8192,\n *        r: 8,\n *        p: 1,\n *        dklen: 32,\n *        salt: '210d0ec956787d865358ac45716e6dd42e68d48e346d795746509523aeb477dd'\n *      },\n *      mac: 'efbf6d3409f37c0084a79d5fdf9a6f5d97d11447517ef1ea8374f51e581b7efd'\n *    }\n *   }, '123').then(console.log);\n *\n *\n * > {\n * address: '0xcdA9A91875fc35c8Ac1320E098e584495d66e47c',\n * privateKey: '67f476289210e3bef3c1c75e4de993ff0a00663df00def84e73aa7411eac18a6',\n * signTransaction: [Function: signTransaction],\n * sign: [Function: sign],\n * encrypt: [AsyncFunction: encrypt]\n * }\n * ```\n */\nexport const decrypt = (keystore, password, nonStrict) => __awaiter(void 0, void 0, void 0, function* () {\n    const json = typeof keystore === 'object'\n        ? keystore\n        : JSON.parse(nonStrict ? keystore.toLowerCase() : keystore);\n    validator.validateJSONSchema(keyStoreSchema, json);\n    if (json.version !== 3)\n        throw new KeyStoreVersionError();\n    const uint8ArrayPassword = typeof password === 'string' ? hexToBytes(utf8ToHex(password)) : password;\n    validator.validate(['bytes'], [uint8ArrayPassword]);\n    let derivedKey;\n    if (json.crypto.kdf === 'scrypt') {\n        const kdfparams = json.crypto.kdfparams;\n        const uint8ArraySalt = typeof kdfparams.salt === 'string' ? hexToBytes(kdfparams.salt) : kdfparams.salt;\n        derivedKey = scryptSync(uint8ArrayPassword, uint8ArraySalt, kdfparams.n, kdfparams.p, kdfparams.r, kdfparams.dklen);\n    }\n    else if (json.crypto.kdf === 'pbkdf2') {\n        const kdfparams = json.crypto.kdfparams;\n        const uint8ArraySalt = typeof kdfparams.salt === 'string' ? hexToBytes(kdfparams.salt) : kdfparams.salt;\n        derivedKey = pbkdf2Sync(uint8ArrayPassword, uint8ArraySalt, kdfparams.c, kdfparams.dklen, 'sha256');\n    }\n    else {\n        throw new InvalidKdfError();\n    }\n    const ciphertext = hexToBytes(json.crypto.ciphertext);\n    const mac = sha3Raw(uint8ArrayConcat(derivedKey.slice(16, 32), ciphertext)).replace('0x', '');\n    if (mac !== json.crypto.mac) {\n        throw new KeyDerivationError();\n    }\n    const seed = yield createDecipheriv(hexToBytes(json.crypto.ciphertext), derivedKey.slice(0, 16), hexToBytes(json.crypto.cipherparams.iv));\n    return privateKeyToAccount(seed);\n});\n//# sourceMappingURL=account.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\nimport { jsonRpc, Web3DeferredPromise } from 'web3-utils';\nimport { OperationAbortError, OperationTimeoutError, ResponseError } from 'web3-errors';\nexport const DEFAULT_BATCH_REQUEST_TIMEOUT = 1000;\nexport class Web3BatchRequest {\n    constructor(requestManager) {\n        this._requestManager = requestManager;\n        this._requests = new Map();\n    }\n    get requests() {\n        return [...this._requests.values()].map(r => r.payload);\n    }\n    add(request) {\n        const payload = jsonRpc.toPayload(request);\n        const promise = new Web3DeferredPromise();\n        this._requests.set(payload.id, { payload, promise });\n        return promise;\n    }\n    // eslint-disable-next-line class-methods-use-this\n    execute(options) {\n        return __awaiter(this, void 0, void 0, function* () {\n            var _a;\n            if (this.requests.length === 0) {\n                return Promise.resolve([]);\n            }\n            const request = new Web3DeferredPromise({\n                timeout: (_a = options === null || options === void 0 ? void 0 : options.timeout) !== null && _a !== void 0 ? _a : DEFAULT_BATCH_REQUEST_TIMEOUT,\n                eagerStart: true,\n                timeoutMessage: 'Batch request timeout',\n            });\n            this._processBatchRequest(request).catch(err => request.reject(err));\n            request.catch((err) => {\n                if (err instanceof OperationTimeoutError) {\n                    this._abortAllRequests('Batch request timeout');\n                }\n                request.reject(err);\n            });\n            return request;\n        });\n    }\n    _processBatchRequest(promise) {\n        return __awaiter(this, void 0, void 0, function* () {\n            var _a, _b;\n            const response = yield this._requestManager.sendBatch([...this._requests.values()].map(r => r.payload));\n            if (response.length !== this._requests.size) {\n                this._abortAllRequests('Invalid batch response');\n                throw new ResponseError(response, `Batch request size mismatch the results size. Requests: ${this._requests.size}, Responses: ${response.length}`);\n            }\n            const requestIds = this.requests\n                .map(r => r.id)\n                .map(Number)\n                .sort((a, b) => a - b);\n            const responseIds = response\n                .map(r => r.id)\n                .map(Number)\n                .sort((a, b) => a - b);\n            if (JSON.stringify(requestIds) !== JSON.stringify(responseIds)) {\n                this._abortAllRequests('Invalid batch response');\n                throw new ResponseError(response, `Batch request mismatch the results. Requests: [${requestIds.join()}], Responses: [${responseIds.join()}]`);\n            }\n            for (const res of response) {\n                if (jsonRpc.isResponseWithResult(res)) {\n                    (_a = this._requests.get(res.id)) === null || _a === void 0 ? void 0 : _a.promise.resolve(res.result);\n                }\n                else if (jsonRpc.isResponseWithError(res)) {\n                    (_b = this._requests.get(res.id)) === null || _b === void 0 ? void 0 : _b.promise.reject(res.error);\n                }\n            }\n            promise.resolve(response);\n        });\n    }\n    _abortAllRequests(msg) {\n        for (const { promise } of this._requests.values()) {\n            promise.reject(new OperationAbortError(msg));\n        }\n    }\n}\n//# sourceMappingURL=web3_batch_request.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\n/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\n// eslint-disable-next-line max-classes-per-file\nimport { ExistingPluginNamespaceError } from 'web3-errors';\nimport { isNullish } from 'web3-utils';\nimport { TransactionFactory } from 'web3-eth-accounts';\nimport { isSupportedProvider } from './utils.js';\nimport { Web3BatchRequest } from './web3_batch_request.js';\n// eslint-disable-next-line import/no-cycle\nimport { Web3Config, Web3ConfigEvent } from './web3_config.js';\nimport { Web3RequestManager } from './web3_request_manager.js';\nimport { Web3SubscriptionManager } from './web3_subscription_manager.js';\nexport class Web3Context extends Web3Config {\n    constructor(providerOrContext) {\n        var _a;\n        super();\n        this.providers = Web3RequestManager.providers;\n        // If \"providerOrContext\" is provided as \"string\" or an objects matching \"SupportedProviders\" interface\n        if (isNullish(providerOrContext) ||\n            (typeof providerOrContext === 'string' && providerOrContext.trim() !== '') ||\n            isSupportedProvider(providerOrContext)) {\n            this._requestManager = new Web3RequestManager(providerOrContext);\n            this._subscriptionManager = new Web3SubscriptionManager(this._requestManager, {});\n            return;\n        }\n        const { config, provider, requestManager, subscriptionManager, registeredSubscriptions, accountProvider, wallet, requestManagerMiddleware, } = providerOrContext;\n        this.setConfig(config !== null && config !== void 0 ? config : {});\n        this._requestManager =\n            requestManager !== null && requestManager !== void 0 ? requestManager : new Web3RequestManager(provider, (_a = config === null || config === void 0 ? void 0 : config.enableExperimentalFeatures) === null || _a === void 0 ? void 0 : _a.useSubscriptionWhenCheckingBlockTimeout, requestManagerMiddleware);\n        if (subscriptionManager) {\n            this._subscriptionManager = subscriptionManager;\n        }\n        else {\n            this._subscriptionManager = new Web3SubscriptionManager(this.requestManager, registeredSubscriptions !== null && registeredSubscriptions !== void 0 ? registeredSubscriptions : {});\n        }\n        if (accountProvider) {\n            this._accountProvider = accountProvider;\n        }\n        if (wallet) {\n            this._wallet = wallet;\n        }\n    }\n    get requestManager() {\n        return this._requestManager;\n    }\n    /**\n     * Will return the current subscriptionManager ({@link Web3SubscriptionManager})\n     */\n    get subscriptionManager() {\n        return this._subscriptionManager;\n    }\n    get wallet() {\n        return this._wallet;\n    }\n    get accountProvider() {\n        return this._accountProvider;\n    }\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    static fromContextObject(...args) {\n        return new this(...args.reverse());\n    }\n    getContextObject() {\n        var _a;\n        return {\n            config: this.config,\n            provider: this.provider,\n            requestManager: this.requestManager,\n            subscriptionManager: this.subscriptionManager,\n            registeredSubscriptions: (_a = this.subscriptionManager) === null || _a === void 0 ? void 0 : _a.registeredSubscriptions,\n            providers: this.providers,\n            wallet: this.wallet,\n            accountProvider: this.accountProvider,\n        };\n    }\n    /**\n     * Use to create new object of any type extended by `Web3Context`\n     * and link it to current context. This can be used to initiate a global context object\n     * and then use it to create new objects of any type extended by `Web3Context`.\n     */\n    use(ContextRef, ...args) {\n        const newContextChild = new ContextRef(...[...args, this.getContextObject()]);\n        this.on(Web3ConfigEvent.CONFIG_CHANGE, event => {\n            // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n            newContextChild.setConfig({ [event.name]: event.newValue });\n        });\n        // @ts-expect-error No index signature with a parameter of type 'string' was found on type 'Web3Context<API, RegisteredSubs>'\n        this[ContextRef.name] = newContextChild;\n        return newContextChild;\n    }\n    /**\n     * Link current context to another context.\n     */\n    link(parentContext) {\n        this.setConfig(parentContext.config);\n        this._requestManager = parentContext.requestManager;\n        this.provider = parentContext.provider;\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n        this._subscriptionManager = parentContext.subscriptionManager;\n        this._wallet = parentContext.wallet;\n        this._accountProvider = parentContext._accountProvider;\n        parentContext.on(Web3ConfigEvent.CONFIG_CHANGE, event => {\n            // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n            this.setConfig({ [event.name]: event.newValue });\n        });\n    }\n    // eslint-disable-next-line no-use-before-define\n    registerPlugin(plugin) {\n        // @ts-expect-error No index signature with a parameter of type 'string' was found on type 'Web3Context<API, RegisteredSubs>'\n        if (this[plugin.pluginNamespace] !== undefined)\n            throw new ExistingPluginNamespaceError(plugin.pluginNamespace);\n        const _pluginObject = {\n            [plugin.pluginNamespace]: plugin,\n        };\n        _pluginObject[plugin.pluginNamespace].link(this);\n        Object.assign(this, _pluginObject);\n    }\n    /**\n     * Will return the current provider.\n     *\n     * @returns Returns the current provider\n     * @example\n     * ```ts\n     * const web3 = new Web3Context(\"http://localhost:8545\");\n     * console.log(web3.provider);\n     * > HttpProvider {\n     * \tclientUrl: 'http://localhost:8545',\n     * \thttpProviderOptions: undefined\n     *  }\n     * ```\n     */\n    get provider() {\n        return this.currentProvider;\n    }\n    /**\n     * Will set the current provider.\n     *\n     * @param provider - The provider to set\n     *\n     * Accepted providers are of type {@link SupportedProviders}\n     * @example\n     * ```ts\n     *  const web3Context = new web3ContextContext(\"http://localhost:8545\");\n     * web3Context.provider = \"ws://localhost:8545\";\n     * console.log(web3Context.provider);\n     * > WebSocketProvider {\n     * _eventEmitter: EventEmitter {\n     * _events: [Object: null prototype] {},\n     * _eventsCount: 0,\n     * ...\n     * }\n     * ```\n     */\n    set provider(provider) {\n        this.requestManager.setProvider(provider);\n    }\n    /**\n     * Will return the current provider. (The same as `provider`)\n     *\n     * @returns Returns the current provider\n     * @example\n     * ```ts\n     * const web3Context = new Web3Context(\"http://localhost:8545\");\n     * console.log(web3Context.provider);\n     * > HttpProvider {\n     * \tclientUrl: 'http://localhost:8545',\n     * \thttpProviderOptions: undefined\n     *  }\n     * ```\n     */\n    get currentProvider() {\n        return this.requestManager.provider;\n    }\n    /**\n     * Will set the current provider. (The same as `provider`)\n     *\n     * @param provider - {@link SupportedProviders} The provider to set\n     *\n     * @example\n     * ```ts\n     *  const web3Context = new Web3Context(\"http://localhost:8545\");\n     * web3Context.currentProvider = \"ws://localhost:8545\";\n     * console.log(web3Context.provider);\n     * > WebSocketProvider {\n     * _eventEmitter: EventEmitter {\n     * _events: [Object: null prototype] {},\n     * _eventsCount: 0,\n     * ...\n     * }\n     * ```\n     */\n    set currentProvider(provider) {\n        this.requestManager.setProvider(provider);\n    }\n    /**\n     * Will return the givenProvider if available.\n     *\n     * When using web3.js in an Ethereum compatible browser, it will set with the current native provider by that browser. Will return the given provider by the (browser) environment, otherwise `undefined`.\n     */\n    // eslint-disable-next-line class-methods-use-this\n    get givenProvider() {\n        return Web3Context.givenProvider;\n    }\n    /**\n     * Will set the provider.\n     *\n     * @param provider - {@link SupportedProviders} The provider to set\n     * @returns Returns true if the provider was set\n     */\n    setProvider(provider) {\n        this.provider = provider;\n        return true;\n    }\n    setRequestManagerMiddleware(requestManagerMiddleware) {\n        this.requestManager.setMiddleware(requestManagerMiddleware);\n    }\n    /**\n     * Will return the {@link Web3BatchRequest} constructor.\n     */\n    get BatchRequest() {\n        return Web3BatchRequest.bind(undefined, this._requestManager);\n    }\n    /**\n     * This method allows extending the web3 modules.\n     * Note: This method is only for backward compatibility, and It is recommended to use Web3 v4 Plugin feature for extending web3.js functionality if you are developing something new.\n     */\n    extend(extendObj) {\n        var _a;\n        // @ts-expect-error No index signature with a parameter of type 'string' was found on type 'Web3Context<API, RegisteredSubs>'\n        if (extendObj.property && !this[extendObj.property])\n            // @ts-expect-error No index signature with a parameter of type 'string' was found on type 'Web3Context<API, RegisteredSubs>'\n            this[extendObj.property] = {};\n        (_a = extendObj.methods) === null || _a === void 0 ? void 0 : _a.forEach(element => {\n            const method = (...givenParams) => __awaiter(this, void 0, void 0, function* () {\n                return this.requestManager.send({\n                    method: element.call,\n                    params: givenParams,\n                });\n            });\n            if (extendObj.property)\n                // @ts-expect-error No index signature with a parameter of type 'string' was found on type 'Web3Context<API, RegisteredSubs>'\n                // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n                this[extendObj.property][element.name] = method;\n            // @ts-expect-error No index signature with a parameter of type 'string' was found on type 'Web3Context<API, RegisteredSubs>'\n            else\n                this[element.name] = method;\n        });\n        return this;\n    }\n}\nWeb3Context.providers = Web3RequestManager.providers;\n/**\n * Extend this class when creating a plugin that either doesn't require {@link EthExecutionAPI},\n * or interacts with a RPC node that doesn't fully implement {@link EthExecutionAPI}.\n *\n * To add type support for RPC methods to the {@link Web3RequestManager},\n * define a {@link Web3APISpec} and pass it as a generic to Web3PluginBase like so:\n *\n * @example\n * ```ts\n * type CustomRpcApi = {\n *\tcustom_rpc_method: () => string;\n *\tcustom_rpc_method_with_parameters: (parameter1: string, parameter2: number) => string;\n * };\n *\n * class CustomPlugin extends Web3PluginBase<CustomRpcApi> {...}\n * ```\n */\nexport class Web3PluginBase extends Web3Context {\n    // eslint-disable-next-line class-methods-use-this\n    registerNewTransactionType(type, txClass) {\n        TransactionFactory.registerTransactionType(type, txClass);\n    }\n}\n/**\n * Extend this class when creating a plugin that makes use of {@link EthExecutionAPI},\n * or depends on other Web3 packages (such as `web3-eth-contract`) that depend on {@link EthExecutionAPI}.\n *\n * To add type support for RPC methods to the {@link Web3RequestManager} (in addition to {@link EthExecutionAPI}),\n * define a {@link Web3APISpec} and pass it as a generic to Web3PluginBase like so:\n *\n * @example\n * ```ts\n * type CustomRpcApi = {\n *\tcustom_rpc_method: () => string;\n *\tcustom_rpc_method_with_parameters: (parameter1: string, parameter2: number) => string;\n * };\n *\n * class CustomPlugin extends Web3PluginBase<CustomRpcApi> {...}\n * ```\n */\nexport class Web3EthPluginBase extends Web3PluginBase {\n}\n//# sourceMappingURL=web3_context.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { toChecksumAddress, leftPad, hexToNumber } from 'web3-utils';\nimport { isAddress } from 'web3-validator';\nimport { InvalidAddressError } from 'web3-errors';\n/**\n * Converts Ethereum addresses to IBAN or BBAN addresses and vice versa.\n */\nexport class Iban {\n    /**\n     * Construct a direct or indirect IBAN that has conversion methods and validity checks.\n     * If the provided string was not of either the length of a direct IBAN (34 or 35),\n     * nor the length of an indirect IBAN (20), an Error will be thrown ('Invalid IBAN was provided').\n     *\n     * @param iban - a Direct or an Indirect IBAN\n     * @returns - Iban instance\n     *\n     * @example\n     * ```ts\n     * const iban = new web3.eth.Iban(\"XE7338O073KYGTWWZN0F2WZ0R8PX5ZPPZS\");\n     * > Iban { _iban: 'XE7338O073KYGTWWZN0F2WZ0R8PX5ZPPZS' }\n     * ```\n     */\n    constructor(iban) {\n        /**\n         * This method should be used to create the equivalent ethereum address for the early provided Direct IBAN address.\n         * If the provided string was not a direct IBAN (has the length of 34 or 35), an Error will be thrown:\n         * ('Iban is indirect and cannot be converted. Must be length of 34 or 35').\n         * Note: this is also available as a static method.\n         *\n         * @return the equivalent ethereum address\n         *\n         * @example\n         * ```ts\n         * const iban = new web3.eth.Iban(\"XE7338O073KYGTWWZN0F2WZ0R8PX5ZPPZS\");\n         * iban.toAddress();\n         * > \"0x00c5496aEe77C1bA1f0854206A26DdA82a81D6D8\"\n         * ```\n         */\n        this.toAddress = () => {\n            if (this.isDirect()) {\n                // check if Iban can be converted to an address\n                const base36 = this._iban.slice(4);\n                const parsedBigInt = Iban._parseInt(base36, 36); // convert the base36 string to a bigint\n                const paddedBigInt = leftPad(parsedBigInt, 40);\n                return toChecksumAddress(paddedBigInt);\n            }\n            throw new Error('Iban is indirect and cannot be converted. Must be length of 34 or 35');\n        };\n        if (Iban.isIndirect(iban) || Iban.isDirect(iban)) {\n            this._iban = iban;\n        }\n        else {\n            throw new Error('Invalid IBAN was provided');\n        }\n    }\n    /**\n     * A static method that checks if an IBAN is Direct.\n     * It actually check the length of the provided variable and, only if it is 34 or 35, it returns true.\n     * Note: this is also available as a method at an Iban instance.\n     * @param iban - an IBAN to be checked\n     * @returns - `true` if the provided `iban` is a Direct IBAN, and `false` otherwise.\n     *\n     * @example\n     * ```ts\n     * web3.eth.Iban.isDirect(\"XE81ETHXREGGAVOFYORK\");\n     * > false\n     * ```\n     */\n    static isDirect(iban) {\n        return iban.length === 34 || iban.length === 35;\n    }\n    /**\n     * An instance method that checks if iban number is Direct.\n     * It actually check the length of the provided variable and, only if it is 34 or 35, it returns true.\n     * Note: this is also available as a static method.\n     * @param iban - an IBAN to be checked\n     * @returns - `true` if the provided `iban` is a Direct IBAN, and `false` otherwise.\n     *\n     * @example\n     * ```ts\n     * const iban = new web3.eth.Iban(\"XE81ETHXREGGAVOFYORK\");\n     * iban.isDirect();\n     * > false\n     * ```\n     */\n    isDirect() {\n        return Iban.isDirect(this._iban);\n    }\n    /**\n     * A static method that checks if an IBAN is Indirect.\n     * It actually check the length of the provided variable and, only if it is 20, it returns true.\n     * Note: this is also available as a method at an Iban instance.\n     * @param iban - an IBAN to be checked\n     * @returns - `true` if the provided `iban` is an Indirect IBAN, and `false` otherwise.\n     *\n     * @example\n     * ```ts\n     * web3.eth.Iban.isIndirect(\"XE81ETHXREGGAVOFYORK\");\n     * > true\n     * ```\n     */\n    static isIndirect(iban) {\n        return iban.length === 20;\n    }\n    /**\n     * check if iban number if indirect\n     * It actually check the length of the provided variable and, only if it is 20, it returns true.\n     * Note: this is also available as a static method.\n     * @param iban - an IBAN to be checked\n     * @returns - `true` if the provided `iban` is an Indirect IBAN, and `false` otherwise.\n     *\n     * @example\n     * ```ts\n     * const iban = new web3.eth.Iban(\"XE81ETHXREGGAVOFYORK\");\n     * iban.isIndirect();\n     * > true\n     * ```\n     */\n    isIndirect() {\n        return Iban.isIndirect(this._iban);\n    }\n    /**\n     * This method could be used to check if a given string is valid IBAN object.\n     * Note: this is also available as a method at an Iban instance.\n     *\n     * @param iban - a string to be checked if it is in IBAN\n     * @returns - true if it is valid IBAN\n     *\n     * @example\n     * ```ts\n     * web3.eth.Iban.isValid(\"XE81ETHXREGGAVOFYORK\");\n     * > true\n     *\n     * web3.eth.Iban.isValid(\"XE82ETHXREGGAVOFYORK\");\n     * > false // because the checksum is incorrect\n     * ```\n     */\n    static isValid(iban) {\n        return (/^XE[0-9]{2}(ETH[0-9A-Z]{13}|[0-9A-Z]{30,31})$/.test(iban) &&\n            Iban._mod9710(Iban._iso13616Prepare(iban)) === 1);\n    }\n    /**\n     * Should be called to check if the early provided IBAN is correct.\n     * Note: this is also available as a static method.\n     *\n     * @example\n     * ```ts\n     * const iban = new web3.eth.Iban(\"XE81ETHXREGGAVOFYORK\");\n     * iban.isValid();\n     * > true\n     *\n     * const iban = new web3.eth.Iban(\"XE82ETHXREGGAVOFYORK\");\n     * iban.isValid();\n     * > false // because the checksum is incorrect\n     * ```\n     */\n    isValid() {\n        return Iban.isValid(this._iban);\n    }\n    /**\n     * Convert the passed BBAN to an IBAN for this country specification.\n     * Please note that <i>\"generation of the IBAN shall be the exclusive responsibility of the bank/branch servicing the account\"</i>.\n     * This method implements the preferred algorithm described in http://en.wikipedia.org/wiki/International_Bank_Account_Number#Generating_IBAN_check_digits\n     *\n     * @param bban - the BBAN to convert to IBAN\n     * @returns an Iban class instance that holds the equivalent IBAN\n     *\n     * @example\n     * ```ts\n     * web3.eth.Iban.fromBban('ETHXREGGAVOFYORK');\n     * > Iban {_iban: \"XE7338O073KYGTWWZN0F2WZ0R8PX5ZPPZS\"}\n     * ```\n     */\n    static fromBban(bban) {\n        const countryCode = 'XE';\n        const remainder = this._mod9710(this._iso13616Prepare(`${countryCode}00${bban}`));\n        const checkDigit = `0${(98 - remainder).toString()}`.slice(-2);\n        return new Iban(`${countryCode}${checkDigit}${bban}`);\n    }\n    /**\n     * Should be used to create IBAN object for given institution and identifier\n     *\n     * @param options - an object holds the `institution` and the `identifier` which will be composed to create an `Iban` object from.\n     * @returns an Iban class instance that holds the equivalent IBAN\n     *\n     * @example\n     * ```ts\n     * web3.eth.Iban.createIndirect({\n     *     institution: \"XREG\",\n     *     identifier: \"GAVOFYORK\"\n     * });\n     * > Iban {_iban: \"XE7338O073KYGTWWZN0F2WZ0R8PX5ZPPZS\"}\n     * ```\n     */\n    static createIndirect(options) {\n        return Iban.fromBban(`ETH${options.institution}${options.identifier}`);\n    }\n    /**\n     * This method should be used to create iban object from an Ethereum address.\n     *\n     * @param address - an Ethereum address\n     * @returns an Iban class instance that holds the equivalent IBAN\n     *\n     * @example\n     * ```ts\n     * web3.eth.Iban.fromAddress(\"0x00c5496aEe77C1bA1f0854206A26DdA82a81D6D8\");\n     * > Iban {_iban: \"XE7338O073KYGTWWZN0F2WZ0R8PX5ZPPZS\"}\n     * ```\n     */\n    static fromAddress(address) {\n        if (!isAddress(address)) {\n            throw new InvalidAddressError(address);\n        }\n        const num = BigInt(hexToNumber(address));\n        const base36 = num.toString(36);\n        const padded = leftPad(base36, 15);\n        return Iban.fromBban(padded.toUpperCase());\n    }\n    /**\n     * This method should be used to create IBAN address from an Ethereum address\n     *\n     * @param address - an Ethereum address\n     * @return the equivalent IBAN address\n     *\n     * @example\n     * ```ts\n     * web3.eth.Iban.toIban(\"0x00c5496aEe77C1bA1f0854206A26DdA82a81D6D8\");\n     * > \"XE7338O073KYGTWWZN0F2WZ0R8PX5ZPPZS\"\n     * ```\n     */\n    static toIban(address) {\n        return Iban.fromAddress(address).toString();\n    }\n    /**\n     * Should be called to get client identifier within institution\n     *\n     * @return the client of the IBAN instance.\n     *\n     * @example\n     * ```ts\n     * const iban = new web3.eth.Iban(\"XE81ETHXREGGAVOFYORK\");\n     * iban.client();\n     * > 'GAVOFYORK'\n     * ```\n     */\n    client() {\n        return this.isIndirect() ? this._iban.slice(11) : '';\n    }\n    /**\n     * Returns the IBAN checksum of the early provided IBAN\n     *\n     * @example\n     * ```ts\n     * const iban = new web3.eth.Iban(\"XE81ETHXREGGAVOFYORK\");\n     * iban.checksum();\n     * > \"81\"\n     * ```\n     *\n     */\n    checksum() {\n        return this._iban.slice(2, 4);\n    }\n    /**\n     * Returns institution identifier from the early provided  IBAN\n     *\n     * @example\n     * ```ts\n     * const iban = new web3.eth.Iban(\"XE81ETHXREGGAVOFYORK\");\n     * iban.institution();\n     * > 'XREG'\n     * ```\n     */\n    institution() {\n        return this.isIndirect() ? this._iban.slice(7, 11) : '';\n    }\n    /**\n     * Simply returns the early provided IBAN\n     *\n     * @example\n     * ```ts\n     * const iban = new web3.eth.Iban('XE7338O073KYGTWWZN0F2WZ0R8PX5ZPPZS');\n     * iban.toString();\n     * > 'XE7338O073KYGTWWZN0F2WZ0R8PX5ZPPZS'\n     * ```\n     */\n    toString() {\n        return this._iban;\n    }\n}\n/**\n * Prepare an IBAN for mod 97 computation by moving the first 4 chars to the end and transforming the letters to\n * numbers (A = 10, B = 11, ..., Z = 35), as specified in ISO13616.\n */\nIban._iso13616Prepare = (iban) => {\n    const A = 'A'.charCodeAt(0);\n    const Z = 'Z'.charCodeAt(0);\n    const upperIban = iban.toUpperCase();\n    const modifiedIban = `${upperIban.slice(4)}${upperIban.slice(0, 4)}`;\n    return modifiedIban\n        .split('')\n        .map(n => {\n        const code = n.charCodeAt(0);\n        if (code >= A && code <= Z) {\n            // A = 10, B = 11, ... Z = 35\n            return code - A + 10;\n        }\n        return n;\n    })\n        .join('');\n};\n/**\n * return the bigint of the given string with the specified base\n */\nIban._parseInt = (str, base) => [...str].reduce((acc, curr) => BigInt(parseInt(curr, base)) + BigInt(base) * acc, BigInt(0));\n/**\n * Calculates the MOD 97 10 of the passed IBAN as specified in ISO7064.\n */\nIban._mod9710 = (iban) => {\n    let remainder = iban;\n    let block;\n    while (remainder.length > 2) {\n        block = remainder.slice(0, 9);\n        remainder = `${(parseInt(block, 10) % 97).toString()}${remainder.slice(block.length)}`;\n    }\n    return parseInt(remainder, 10) % 97;\n};\n/**\n * This method should be used to create an ethereum address from a Direct IBAN address.\n * If the provided string was not a direct IBAN (has the length of 34 or 35), an Error will be thrown:\n * ('Iban is indirect and cannot be converted. Must be length of 34 or 35').\n * Note: this is also available as a method at an Iban instance.\n *\n * @param iban - a Direct IBAN address\n * @return the equivalent ethereum address\n *\n * @example\n * ```ts\n * web3.eth.Iban.toAddress(\"XE7338O073KYGTWWZN0F2WZ0R8PX5ZPPZS\");\n * > \"0x00c5496aEe77C1bA1f0854206A26DdA82a81D6D8\"\n * ```\n */\nIban.toAddress = (iban) => {\n    const ibanObject = new Iban(iban);\n    return ibanObject.toAddress();\n};\n//# sourceMappingURL=iban.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\nvar _a;\nimport { Web3EventEmitter, } from './web3_event_emitter.js';\nexport class Web3PromiEvent extends Web3EventEmitter {\n    constructor(executor) {\n        super();\n        // public tag to treat object as promise by different libs\n        // eslint-disable-next-line @typescript-eslint/prefer-as-const\n        this[_a] = 'Promise';\n        this._promise = new Promise(executor);\n    }\n    then(onfulfilled, onrejected) {\n        return __awaiter(this, void 0, void 0, function* () {\n            return this._promise.then(onfulfilled, onrejected);\n        });\n    }\n    catch(onrejected) {\n        return __awaiter(this, void 0, void 0, function* () {\n            return this._promise.catch(onrejected);\n        });\n    }\n    finally(onfinally) {\n        return __awaiter(this, void 0, void 0, function* () {\n            return this._promise.finally(onfinally);\n        });\n    }\n    on(eventName, fn) {\n        super.on(eventName, fn);\n        return this;\n    }\n    once(eventName, fn) {\n        super.once(eventName, fn);\n        return this;\n    }\n}\n_a = Symbol.toStringTag;\n//# sourceMappingURL=web3_promi_event.js.map","(function (global, undefined) {\n    \"use strict\";\n\n    if (global.setImmediate) {\n        return;\n    }\n\n    var nextHandle = 1; // Spec says greater than zero\n    var tasksByHandle = {};\n    var currentlyRunningATask = false;\n    var doc = global.document;\n    var registerImmediate;\n\n    function setImmediate(callback) {\n      // Callback can either be a function or a string\n      if (typeof callback !== \"function\") {\n        callback = new Function(\"\" + callback);\n      }\n      // Copy function arguments\n      var args = new Array(arguments.length - 1);\n      for (var i = 0; i < args.length; i++) {\n          args[i] = arguments[i + 1];\n      }\n      // Store and register the task\n      var task = { callback: callback, args: args };\n      tasksByHandle[nextHandle] = task;\n      registerImmediate(nextHandle);\n      return nextHandle++;\n    }\n\n    function clearImmediate(handle) {\n        delete tasksByHandle[handle];\n    }\n\n    function run(task) {\n        var callback = task.callback;\n        var args = task.args;\n        switch (args.length) {\n        case 0:\n            callback();\n            break;\n        case 1:\n            callback(args[0]);\n            break;\n        case 2:\n            callback(args[0], args[1]);\n            break;\n        case 3:\n            callback(args[0], args[1], args[2]);\n            break;\n        default:\n            callback.apply(undefined, args);\n            break;\n        }\n    }\n\n    function runIfPresent(handle) {\n        // From the spec: \"Wait until any invocations of this algorithm started before this one have completed.\"\n        // So if we're currently running a task, we'll need to delay this invocation.\n        if (currentlyRunningATask) {\n            // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a\n            // \"too much recursion\" error.\n            setTimeout(runIfPresent, 0, handle);\n        } else {\n            var task = tasksByHandle[handle];\n            if (task) {\n                currentlyRunningATask = true;\n                try {\n                    run(task);\n                } finally {\n                    clearImmediate(handle);\n                    currentlyRunningATask = false;\n                }\n            }\n        }\n    }\n\n    function installNextTickImplementation() {\n        registerImmediate = function(handle) {\n            process.nextTick(function () { runIfPresent(handle); });\n        };\n    }\n\n    function canUsePostMessage() {\n        // The test against `importScripts` prevents this implementation from being installed inside a web worker,\n        // where `global.postMessage` means something completely different and can't be used for this purpose.\n        if (global.postMessage && !global.importScripts) {\n            var postMessageIsAsynchronous = true;\n            var oldOnMessage = global.onmessage;\n            global.onmessage = function() {\n                postMessageIsAsynchronous = false;\n            };\n            global.postMessage(\"\", \"*\");\n            global.onmessage = oldOnMessage;\n            return postMessageIsAsynchronous;\n        }\n    }\n\n    function installPostMessageImplementation() {\n        // Installs an event handler on `global` for the `message` event: see\n        // * https://developer.mozilla.org/en/DOM/window.postMessage\n        // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages\n\n        var messagePrefix = \"setImmediate$\" + Math.random() + \"$\";\n        var onGlobalMessage = function(event) {\n            if (event.source === global &&\n                typeof event.data === \"string\" &&\n                event.data.indexOf(messagePrefix) === 0) {\n                runIfPresent(+event.data.slice(messagePrefix.length));\n            }\n        };\n\n        if (global.addEventListener) {\n            global.addEventListener(\"message\", onGlobalMessage, false);\n        } else {\n            global.attachEvent(\"onmessage\", onGlobalMessage);\n        }\n\n        registerImmediate = function(handle) {\n            global.postMessage(messagePrefix + handle, \"*\");\n        };\n    }\n\n    function installMessageChannelImplementation() {\n        var channel = new MessageChannel();\n        channel.port1.onmessage = function(event) {\n            var handle = event.data;\n            runIfPresent(handle);\n        };\n\n        registerImmediate = function(handle) {\n            channel.port2.postMessage(handle);\n        };\n    }\n\n    function installReadyStateChangeImplementation() {\n        var html = doc.documentElement;\n        registerImmediate = function(handle) {\n            // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted\n            // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.\n            var script = doc.createElement(\"script\");\n            script.onreadystatechange = function () {\n                runIfPresent(handle);\n                script.onreadystatechange = null;\n                html.removeChild(script);\n                script = null;\n            };\n            html.appendChild(script);\n        };\n    }\n\n    function installSetTimeoutImplementation() {\n        registerImmediate = function(handle) {\n            setTimeout(runIfPresent, 0, handle);\n        };\n    }\n\n    // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.\n    var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);\n    attachTo = attachTo && attachTo.setTimeout ? attachTo : global;\n\n    // Don't get fooled by e.g. browserify environments.\n    if ({}.toString.call(global.process) === \"[object process]\") {\n        // For Node.js before 0.9\n        installNextTickImplementation();\n\n    } else if (canUsePostMessage()) {\n        // For non-IE10 modern browsers\n        installPostMessageImplementation();\n\n    } else if (global.MessageChannel) {\n        // For web workers, where supported\n        installMessageChannelImplementation();\n\n    } else if (doc && \"onreadystatechange\" in doc.createElement(\"script\")) {\n        // For IE 6–8\n        installReadyStateChangeImplementation();\n\n    } else {\n        // For older browsers\n        installSetTimeoutImplementation();\n    }\n\n    attachTo.setImmediate = setImmediate;\n    attachTo.clearImmediate = clearImmediate;\n}(typeof self === \"undefined\" ? typeof global === \"undefined\" ? this : global : self));\n","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\nimport { validator } from 'web3-validator';\nexport function getProtocolVersion(requestManager) {\n    return __awaiter(this, void 0, void 0, function* () {\n        return requestManager.send({\n            method: 'eth_protocolVersion',\n            params: [],\n        });\n    });\n}\nexport function getSyncing(requestManager) {\n    return __awaiter(this, void 0, void 0, function* () {\n        return requestManager.send({\n            method: 'eth_syncing',\n            params: [],\n        });\n    });\n}\nexport function getCoinbase(requestManager) {\n    return __awaiter(this, void 0, void 0, function* () {\n        return requestManager.send({\n            method: 'eth_coinbase',\n            params: [],\n        });\n    });\n}\nexport function getMining(requestManager) {\n    return __awaiter(this, void 0, void 0, function* () {\n        return requestManager.send({\n            method: 'eth_mining',\n            params: [],\n        });\n    });\n}\nexport function getHashRate(requestManager) {\n    return __awaiter(this, void 0, void 0, function* () {\n        return requestManager.send({\n            method: 'eth_hashrate',\n            params: [],\n        });\n    });\n}\nexport function getGasPrice(requestManager) {\n    return __awaiter(this, void 0, void 0, function* () {\n        return requestManager.send({\n            method: 'eth_gasPrice',\n            params: [],\n        });\n    });\n}\nexport function getMaxPriorityFeePerGas(requestManager) {\n    return __awaiter(this, void 0, void 0, function* () {\n        return requestManager.send({\n            method: 'eth_maxPriorityFeePerGas',\n            params: [],\n        });\n    });\n}\nexport function getAccounts(requestManager) {\n    return __awaiter(this, void 0, void 0, function* () {\n        return requestManager.send({\n            method: 'eth_accounts',\n            params: [],\n        });\n    });\n}\nexport function getBlockNumber(requestManager) {\n    return __awaiter(this, void 0, void 0, function* () {\n        return requestManager.send({\n            method: 'eth_blockNumber',\n            params: [],\n        });\n    });\n}\nexport function getBalance(requestManager, address, blockNumber) {\n    return __awaiter(this, void 0, void 0, function* () {\n        validator.validate(['address', 'blockNumberOrTag'], [address, blockNumber]);\n        return requestManager.send({\n            method: 'eth_getBalance',\n            params: [address, blockNumber],\n        });\n    });\n}\nexport function getStorageAt(requestManager, address, storageSlot, blockNumber) {\n    return __awaiter(this, void 0, void 0, function* () {\n        validator.validate(['address', 'hex', 'blockNumberOrTag'], [address, storageSlot, blockNumber]);\n        return requestManager.send({\n            method: 'eth_getStorageAt',\n            params: [address, storageSlot, blockNumber],\n        });\n    });\n}\nexport function getTransactionCount(requestManager, address, blockNumber) {\n    return __awaiter(this, void 0, void 0, function* () {\n        validator.validate(['address', 'blockNumberOrTag'], [address, blockNumber]);\n        return requestManager.send({\n            method: 'eth_getTransactionCount',\n            params: [address, blockNumber],\n        });\n    });\n}\nexport function getBlockTransactionCountByHash(requestManager, blockHash) {\n    return __awaiter(this, void 0, void 0, function* () {\n        validator.validate(['bytes32'], [blockHash]);\n        return requestManager.send({\n            method: 'eth_getBlockTransactionCountByHash',\n            params: [blockHash],\n        });\n    });\n}\nexport function getBlockTransactionCountByNumber(requestManager, blockNumber) {\n    return __awaiter(this, void 0, void 0, function* () {\n        validator.validate(['blockNumberOrTag'], [blockNumber]);\n        return requestManager.send({\n            method: 'eth_getBlockTransactionCountByNumber',\n            params: [blockNumber],\n        });\n    });\n}\nexport function getUncleCountByBlockHash(requestManager, blockHash) {\n    return __awaiter(this, void 0, void 0, function* () {\n        validator.validate(['bytes32'], [blockHash]);\n        return requestManager.send({\n            method: 'eth_getUncleCountByBlockHash',\n            params: [blockHash],\n        });\n    });\n}\nexport function getUncleCountByBlockNumber(requestManager, blockNumber) {\n    return __awaiter(this, void 0, void 0, function* () {\n        validator.validate(['blockNumberOrTag'], [blockNumber]);\n        return requestManager.send({\n            method: 'eth_getUncleCountByBlockNumber',\n            params: [blockNumber],\n        });\n    });\n}\nexport function getCode(requestManager, address, blockNumber) {\n    return __awaiter(this, void 0, void 0, function* () {\n        validator.validate(['address', 'blockNumberOrTag'], [address, blockNumber]);\n        return requestManager.send({\n            method: 'eth_getCode',\n            params: [address, blockNumber],\n        });\n    });\n}\nexport function sign(requestManager, address, message) {\n    return __awaiter(this, void 0, void 0, function* () {\n        validator.validate(['address', 'hex'], [address, message]);\n        return requestManager.send({\n            method: 'eth_sign',\n            params: [address, message],\n        });\n    });\n}\n// TODO - Validation should be:\n// isTransactionWithSender(transaction)\n// ? validateTransactionWithSender(transaction)\n// : validateTransactionWithSender(transaction, true) with true being a isPartial flag\nexport function signTransaction(requestManager, transaction) {\n    return __awaiter(this, void 0, void 0, function* () {\n        return requestManager.send({\n            method: 'eth_signTransaction',\n            params: [transaction],\n        });\n    });\n}\n// TODO - Validation should be:\n// isTransactionWithSender(transaction)\n// ? validateTransactionWithSender(transaction)\n// : validateTransactionWithSender(transaction, true) with true being a isPartial flag\nexport function sendTransaction(requestManager, transaction) {\n    return __awaiter(this, void 0, void 0, function* () {\n        return requestManager.send({\n            method: 'eth_sendTransaction',\n            params: [transaction],\n        });\n    });\n}\nexport function sendRawTransaction(requestManager, transaction) {\n    return __awaiter(this, void 0, void 0, function* () {\n        validator.validate(['hex'], [transaction]);\n        return requestManager.send({\n            method: 'eth_sendRawTransaction',\n            params: [transaction],\n        });\n    });\n}\n// TODO - validate transaction\nexport function call(requestManager, transaction, blockNumber) {\n    return __awaiter(this, void 0, void 0, function* () {\n        // validateTransactionCall(transaction);\n        validator.validate(['blockNumberOrTag'], [blockNumber]);\n        return requestManager.send({\n            method: 'eth_call',\n            params: [transaction, blockNumber],\n        });\n    });\n}\n// TODO Not sure how to best validate Partial<TransactionWithSender>\nexport function estimateGas(requestManager, transaction, blockNumber) {\n    return __awaiter(this, void 0, void 0, function* () {\n        validator.validate(['blockNumberOrTag'], [blockNumber]);\n        return requestManager.send({\n            method: 'eth_estimateGas',\n            params: [transaction, blockNumber],\n        });\n    });\n}\nexport function getBlockByHash(requestManager, blockHash, hydrated) {\n    return __awaiter(this, void 0, void 0, function* () {\n        validator.validate(['bytes32', 'bool'], [blockHash, hydrated]);\n        return requestManager.send({\n            method: 'eth_getBlockByHash',\n            params: [blockHash, hydrated],\n        });\n    });\n}\nexport function getBlockByNumber(requestManager, blockNumber, hydrated) {\n    return __awaiter(this, void 0, void 0, function* () {\n        validator.validate(['blockNumberOrTag', 'bool'], [blockNumber, hydrated]);\n        return requestManager.send({\n            method: 'eth_getBlockByNumber',\n            params: [blockNumber, hydrated],\n        });\n    });\n}\nexport function getTransactionByHash(requestManager, transactionHash) {\n    return __awaiter(this, void 0, void 0, function* () {\n        validator.validate(['bytes32'], [transactionHash]);\n        return requestManager.send({\n            method: 'eth_getTransactionByHash',\n            params: [transactionHash],\n        });\n    });\n}\nexport function getTransactionByBlockHashAndIndex(requestManager, blockHash, transactionIndex) {\n    return __awaiter(this, void 0, void 0, function* () {\n        validator.validate(['bytes32', 'hex'], [blockHash, transactionIndex]);\n        return requestManager.send({\n            method: 'eth_getTransactionByBlockHashAndIndex',\n            params: [blockHash, transactionIndex],\n        });\n    });\n}\nexport function getTransactionByBlockNumberAndIndex(requestManager, blockNumber, transactionIndex) {\n    return __awaiter(this, void 0, void 0, function* () {\n        validator.validate(['blockNumberOrTag', 'hex'], [blockNumber, transactionIndex]);\n        return requestManager.send({\n            method: 'eth_getTransactionByBlockNumberAndIndex',\n            params: [blockNumber, transactionIndex],\n        });\n    });\n}\nexport function getTransactionReceipt(requestManager, transactionHash) {\n    return __awaiter(this, void 0, void 0, function* () {\n        validator.validate(['bytes32'], [transactionHash]);\n        return requestManager.send({\n            method: 'eth_getTransactionReceipt',\n            params: [transactionHash],\n        });\n    });\n}\nexport function getUncleByBlockHashAndIndex(requestManager, blockHash, uncleIndex) {\n    return __awaiter(this, void 0, void 0, function* () {\n        validator.validate(['bytes32', 'hex'], [blockHash, uncleIndex]);\n        return requestManager.send({\n            method: 'eth_getUncleByBlockHashAndIndex',\n            params: [blockHash, uncleIndex],\n        });\n    });\n}\nexport function getUncleByBlockNumberAndIndex(requestManager, blockNumber, uncleIndex) {\n    return __awaiter(this, void 0, void 0, function* () {\n        validator.validate(['blockNumberOrTag', 'hex'], [blockNumber, uncleIndex]);\n        return requestManager.send({\n            method: 'eth_getUncleByBlockNumberAndIndex',\n            params: [blockNumber, uncleIndex],\n        });\n    });\n}\nexport function getCompilers(requestManager) {\n    return __awaiter(this, void 0, void 0, function* () {\n        return requestManager.send({\n            method: 'eth_getCompilers',\n            params: [],\n        });\n    });\n}\nexport function compileSolidity(requestManager, code) {\n    return __awaiter(this, void 0, void 0, function* () {\n        validator.validate(['string'], [code]);\n        return requestManager.send({\n            method: 'eth_compileSolidity',\n            params: [code],\n        });\n    });\n}\nexport function compileLLL(requestManager, code) {\n    return __awaiter(this, void 0, void 0, function* () {\n        validator.validate(['string'], [code]);\n        return requestManager.send({\n            method: 'eth_compileLLL',\n            params: [code],\n        });\n    });\n}\nexport function compileSerpent(requestManager, code) {\n    return __awaiter(this, void 0, void 0, function* () {\n        validator.validate(['string'], [code]);\n        return requestManager.send({\n            method: 'eth_compileSerpent',\n            params: [code],\n        });\n    });\n}\nexport function newFilter(requestManager, filter) {\n    return __awaiter(this, void 0, void 0, function* () {\n        validator.validate(['filter'], [filter]);\n        return requestManager.send({\n            method: 'eth_newFilter',\n            params: [filter],\n        });\n    });\n}\nexport function newBlockFilter(requestManager) {\n    return __awaiter(this, void 0, void 0, function* () {\n        return requestManager.send({\n            method: 'eth_newBlockFilter',\n            params: [],\n        });\n    });\n}\nexport function newPendingTransactionFilter(requestManager) {\n    return __awaiter(this, void 0, void 0, function* () {\n        return requestManager.send({\n            method: 'eth_newPendingTransactionFilter',\n            params: [],\n        });\n    });\n}\nexport function uninstallFilter(requestManager, filterIdentifier) {\n    return __awaiter(this, void 0, void 0, function* () {\n        validator.validate(['hex'], [filterIdentifier]);\n        return requestManager.send({\n            method: 'eth_uninstallFilter',\n            params: [filterIdentifier],\n        });\n    });\n}\nexport function getFilterChanges(requestManager, filterIdentifier) {\n    return __awaiter(this, void 0, void 0, function* () {\n        validator.validate(['hex'], [filterIdentifier]);\n        return requestManager.send({\n            method: 'eth_getFilterChanges',\n            params: [filterIdentifier],\n        });\n    });\n}\nexport function getFilterLogs(requestManager, filterIdentifier) {\n    return __awaiter(this, void 0, void 0, function* () {\n        validator.validate(['hex'], [filterIdentifier]);\n        return requestManager.send({\n            method: 'eth_getFilterLogs',\n            params: [filterIdentifier],\n        });\n    });\n}\nexport function getLogs(requestManager, filter) {\n    return __awaiter(this, void 0, void 0, function* () {\n        validator.validate(['filter'], [filter]);\n        return requestManager.send({\n            method: 'eth_getLogs',\n            params: [filter],\n        });\n    });\n}\nexport function getWork(requestManager) {\n    return __awaiter(this, void 0, void 0, function* () {\n        return requestManager.send({\n            method: 'eth_getWork',\n            params: [],\n        });\n    });\n}\nexport function submitWork(requestManager, nonce, hash, digest) {\n    return __awaiter(this, void 0, void 0, function* () {\n        validator.validate(['bytes8', 'bytes32', 'bytes32'], [nonce, hash, digest]);\n        return requestManager.send({\n            method: 'eth_submitWork',\n            params: [nonce, hash, digest],\n        });\n    });\n}\nexport function submitHashrate(requestManager, hashRate, id) {\n    return __awaiter(this, void 0, void 0, function* () {\n        validator.validate(['bytes32', 'bytes32'], [hashRate, id]);\n        return requestManager.send({\n            method: 'eth_submitHashrate',\n            params: [hashRate, id],\n        });\n    });\n}\nexport function getFeeHistory(requestManager, blockCount, newestBlock, rewardPercentiles) {\n    return __awaiter(this, void 0, void 0, function* () {\n        validator.validate(['hex', 'blockNumberOrTag'], [blockCount, newestBlock]);\n        for (const rewardPercentile of rewardPercentiles) {\n            validator.validate(['number'], [rewardPercentile]);\n        }\n        return requestManager.send({\n            method: 'eth_feeHistory',\n            params: [blockCount, newestBlock, rewardPercentiles],\n        });\n    });\n}\nexport function getPendingTransactions(requestManager) {\n    return __awaiter(this, void 0, void 0, function* () {\n        return requestManager.send({\n            method: 'eth_pendingTransactions',\n            params: [],\n        });\n    });\n}\nexport function requestAccounts(requestManager) {\n    return __awaiter(this, void 0, void 0, function* () {\n        return requestManager.send({\n            method: 'eth_requestAccounts',\n            params: [],\n        });\n    });\n}\nexport function getChainId(requestManager) {\n    return __awaiter(this, void 0, void 0, function* () {\n        return requestManager.send({\n            method: 'eth_chainId',\n            params: [],\n        });\n    });\n}\nexport function getProof(requestManager, address, storageKeys, blockNumber) {\n    return __awaiter(this, void 0, void 0, function* () {\n        validator.validate(['address', 'bytes32[]', 'blockNumberOrTag'], [address, storageKeys, blockNumber]);\n        return requestManager.send({\n            method: 'eth_getProof',\n            params: [address, storageKeys, blockNumber],\n        });\n    });\n}\nexport function getNodeInfo(requestManager) {\n    return __awaiter(this, void 0, void 0, function* () {\n        return requestManager.send({\n            method: 'web3_clientVersion',\n            params: [],\n        });\n    });\n}\nexport function createAccessList(requestManager, transaction, blockNumber) {\n    return __awaiter(this, void 0, void 0, function* () {\n        validator.validate(['blockNumberOrTag'], [blockNumber]);\n        return requestManager.send({\n            method: 'eth_createAccessList',\n            params: [transaction, blockNumber],\n        });\n    });\n}\nexport function signTypedData(requestManager, address, typedData, useLegacy = false) {\n    return __awaiter(this, void 0, void 0, function* () {\n        // TODO Add validation for typedData\n        validator.validate(['address'], [address]);\n        return requestManager.send({\n            method: `eth_signTypedData${useLegacy ? '' : '_v4'}`,\n            params: [address, typedData],\n        });\n    });\n}\n//# sourceMappingURL=eth_rpc_methods.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\nexport function getId(requestManager) {\n    return __awaiter(this, void 0, void 0, function* () {\n        return requestManager.send({\n            method: 'net_version',\n            params: [],\n        });\n    });\n}\nexport function getPeerCount(requestManager) {\n    return __awaiter(this, void 0, void 0, function* () {\n        return requestManager.send({\n            method: 'net_peerCount',\n            params: [],\n        });\n    });\n}\nexport function isListening(requestManager) {\n    return __awaiter(this, void 0, void 0, function* () {\n        return requestManager.send({\n            method: 'net_listening',\n            params: [],\n        });\n    });\n}\n//# sourceMappingURL=net_rpc_methods.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\nexport const getAccounts = (requestManager) => __awaiter(void 0, void 0, void 0, function* () {\n    return requestManager.send({\n        method: 'personal_listAccounts',\n        params: [],\n    });\n});\nexport const newAccount = (requestManager, password) => __awaiter(void 0, void 0, void 0, function* () {\n    return requestManager.send({\n        method: 'personal_newAccount',\n        params: [password],\n    });\n});\nexport const unlockAccount = (requestManager, address, password, unlockDuration) => __awaiter(void 0, void 0, void 0, function* () {\n    return requestManager.send({\n        method: 'personal_unlockAccount',\n        params: [address, password, unlockDuration],\n    });\n});\nexport const lockAccount = (requestManager, address) => __awaiter(void 0, void 0, void 0, function* () {\n    return requestManager.send({\n        method: 'personal_lockAccount',\n        params: [address],\n    });\n});\nexport const importRawKey = (requestManager, keyData, passphrase) => __awaiter(void 0, void 0, void 0, function* () {\n    return requestManager.send({\n        method: 'personal_importRawKey',\n        params: [keyData, passphrase],\n    });\n});\nexport const sendTransaction = (requestManager, tx, passphrase) => __awaiter(void 0, void 0, void 0, function* () {\n    return requestManager.send({\n        method: 'personal_sendTransaction',\n        params: [tx, passphrase],\n    });\n});\nexport const signTransaction = (requestManager, tx, passphrase) => __awaiter(void 0, void 0, void 0, function* () {\n    return requestManager.send({\n        method: 'personal_signTransaction',\n        params: [tx, passphrase],\n    });\n});\nexport const sign = (requestManager, data, address, passphrase) => __awaiter(void 0, void 0, void 0, function* () {\n    return requestManager.send({\n        method: 'personal_sign',\n        params: [data, address, passphrase],\n    });\n});\nexport const ecRecover = (requestManager, signedData, signature) => __awaiter(void 0, void 0, void 0, function* () {\n    return requestManager.send({\n        method: 'personal_ecRecover',\n        params: [signedData, signature],\n    });\n});\n//# sourceMappingURL=personal_rpc_methods.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { format, toHex } from 'web3-utils';\nimport { HardforksOrdered, ETH_DATA_FORMAT } from 'web3-types';\nimport { Web3ValidatorError, isNullish, validator } from 'web3-validator';\nimport { InvalidPropertiesForTransactionTypeError } from 'web3-errors';\n// undefined is treated as null for JSON schema validator\nconst transactionType0x0Schema = {\n    type: 'object',\n    properties: {\n        accessList: {\n            type: 'null',\n        },\n        maxFeePerGas: {\n            type: 'null',\n        },\n        maxPriorityFeePerGas: {\n            type: 'null',\n        },\n    },\n};\nconst transactionType0x1Schema = {\n    type: 'object',\n    properties: {\n        maxFeePerGas: {\n            type: 'null',\n        },\n        maxPriorityFeePerGas: {\n            type: 'null',\n        },\n    },\n};\nconst transactionType0x2Schema = {\n    type: 'object',\n    properties: {\n        gasPrice: {\n            type: 'null',\n        },\n    },\n};\nconst validateTxTypeAndHandleErrors = (txSchema, tx, txType) => {\n    try {\n        validator.validateJSONSchema(txSchema, tx);\n    }\n    catch (error) {\n        if (error instanceof Web3ValidatorError)\n            // Erroneously reported error\n            // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n            throw new InvalidPropertiesForTransactionTypeError(error.errors, txType);\n        throw error;\n    }\n};\nexport const defaultTransactionTypeParser = transaction => {\n    var _a, _b;\n    const tx = transaction;\n    if (!isNullish(tx.type)) {\n        let txSchema;\n        switch (tx.type) {\n            case '0x0':\n                txSchema = transactionType0x0Schema;\n                break;\n            case '0x1':\n                txSchema = transactionType0x1Schema;\n                break;\n            case '0x2':\n                txSchema = transactionType0x2Schema;\n                break;\n            default:\n                return format({ format: 'uint' }, tx.type, ETH_DATA_FORMAT);\n        }\n        validateTxTypeAndHandleErrors(txSchema, tx, tx.type);\n        return format({ format: 'uint' }, tx.type, ETH_DATA_FORMAT);\n    }\n    if (!isNullish(tx.maxFeePerGas) || !isNullish(tx.maxPriorityFeePerGas)) {\n        validateTxTypeAndHandleErrors(transactionType0x2Schema, tx, '0x2');\n        return '0x2';\n    }\n    if (!isNullish(tx.accessList)) {\n        validateTxTypeAndHandleErrors(transactionType0x1Schema, tx, '0x1');\n        return '0x1';\n    }\n    const givenHardfork = (_a = tx.hardfork) !== null && _a !== void 0 ? _a : (_b = tx.common) === null || _b === void 0 ? void 0 : _b.hardfork;\n    if (!isNullish(givenHardfork)) {\n        const hardforkIndex = Object.keys(HardforksOrdered).indexOf(givenHardfork);\n        // givenHardfork is London or later, so EIP-2718 is supported\n        if (hardforkIndex >= Object.keys(HardforksOrdered).indexOf('london'))\n            return !isNullish(tx.gasPrice) ? '0x0' : '0x2';\n        // givenHardfork is Berlin, tx.accessList is undefined, assume type is 0x0\n        if (hardforkIndex === Object.keys(HardforksOrdered).indexOf('berlin'))\n            return '0x0';\n    }\n    // gasprice is defined\n    if (!isNullish(tx.gasPrice)) {\n        validateTxTypeAndHandleErrors(transactionType0x0Schema, tx, '0x0');\n        return '0x0';\n    }\n    // no transaction type can be inferred from properties, use default transaction type\n    return undefined;\n};\nexport const detectTransactionType = (transaction, web3Context) => {\n    var _a;\n    return ((_a = web3Context === null || web3Context === void 0 ? void 0 : web3Context.transactionTypeParser) !== null && _a !== void 0 ? _a : defaultTransactionTypeParser)(transaction);\n};\nexport const detectRawTransactionType = (transaction) => transaction[0] > 0x7f ? '0x0' : toHex(transaction[0]);\n//# sourceMappingURL=detect_transaction_type.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nexport const accessListItemSchema = {\n    type: 'object',\n    properties: {\n        address: {\n            format: 'address',\n        },\n        storageKeys: {\n            type: 'array',\n            items: {\n                format: 'bytes32',\n            },\n        },\n    },\n};\nexport const accessListSchema = {\n    type: 'array',\n    items: Object.assign({}, accessListItemSchema),\n};\nexport const accessListResultSchema = {\n    type: 'object',\n    properties: {\n        accessList: Object.assign({}, accessListSchema),\n        gasUsed: {\n            type: 'string',\n        },\n    },\n};\nexport const chainSchema = {\n    type: 'string',\n    enum: ['goerli', 'kovan', 'mainnet', 'rinkeby', 'ropsten', 'sepolia'],\n};\nexport const hardforkSchema = {\n    type: 'string',\n    enum: [\n        'arrowGlacier',\n        'berlin',\n        'byzantium',\n        'chainstart',\n        'constantinople',\n        'dao',\n        'homestead',\n        'istanbul',\n        'london',\n        'merge',\n        'muirGlacier',\n        'petersburg',\n        'shanghai',\n        'spuriousDragon',\n        'tangerineWhistle',\n    ],\n};\nexport const customChainSchema = {\n    type: 'object',\n    properties: {\n        name: {\n            format: 'string',\n        },\n        networkId: {\n            format: 'uint',\n        },\n        chainId: {\n            format: 'uint',\n        },\n    },\n};\nexport const transactionSchema = {\n    type: 'object',\n    properties: {\n        from: {\n            format: 'address',\n        },\n        to: {\n            oneOf: [{ format: 'address' }, { type: 'null' }],\n        },\n        value: {\n            format: 'uint',\n        },\n        gas: {\n            format: 'uint',\n        },\n        gasPrice: {\n            format: 'uint',\n        },\n        effectiveGasPrice: {\n            format: 'uint',\n        },\n        type: {\n            format: 'uint',\n        },\n        maxFeePerGas: {\n            format: 'uint',\n        },\n        maxPriorityFeePerGas: {\n            format: 'uint',\n        },\n        accessList: Object.assign({}, accessListSchema),\n        data: {\n            format: 'bytes',\n        },\n        input: {\n            format: 'bytes',\n        },\n        nonce: {\n            format: 'uint',\n        },\n        chain: Object.assign({}, chainSchema),\n        hardfork: Object.assign({}, hardforkSchema),\n        chainId: {\n            format: 'uint',\n        },\n        networkId: {\n            format: 'uint',\n        },\n        common: {\n            type: 'object',\n            properties: {\n                customChain: Object.assign({}, customChainSchema),\n                baseChain: Object.assign({}, chainSchema),\n                hardfork: Object.assign({}, hardforkSchema),\n            },\n        },\n        gasLimit: {\n            format: 'uint',\n        },\n        v: {\n            format: 'uint',\n        },\n        r: {\n            format: 'bytes32',\n        },\n        s: {\n            format: 'bytes32',\n        },\n    },\n};\nexport const transactionInfoSchema = {\n    type: 'object',\n    properties: Object.assign(Object.assign({}, transactionSchema.properties), { blockHash: {\n            format: 'bytes32',\n        }, blockNumber: {\n            format: 'uint',\n        }, hash: {\n            format: 'bytes32',\n        }, transactionIndex: {\n            format: 'uint',\n        }, from: {\n            format: 'address',\n        }, to: {\n            oneOf: [{ format: 'address' }, { type: 'null' }],\n        }, value: {\n            format: 'uint',\n        }, gas: {\n            format: 'uint',\n        }, gasPrice: {\n            format: 'uint',\n        }, effectiveGasPrice: {\n            format: 'uint',\n        }, type: {\n            format: 'uint',\n        }, maxFeePerGas: {\n            format: 'uint',\n        }, maxPriorityFeePerGas: {\n            format: 'uint',\n        }, accessList: Object.assign({}, accessListSchema), data: {\n            format: 'bytes',\n        }, input: {\n            format: 'bytes',\n        }, nonce: {\n            format: 'uint',\n        }, gasLimit: {\n            format: 'uint',\n        }, v: {\n            format: 'uint',\n        }, r: {\n            format: 'bytes32',\n        }, s: {\n            format: 'bytes32',\n        } }),\n};\nexport const withdrawalsSchema = {\n    type: 'object',\n    properties: {\n        index: {\n            format: 'uint',\n        },\n        validatorIndex: {\n            format: 'uint',\n        },\n        address: {\n            format: 'address',\n        },\n        amount: {\n            format: 'uint',\n        },\n    },\n};\nexport const blockSchema = {\n    type: 'object',\n    properties: {\n        baseFeePerGas: {\n            format: 'uint',\n        },\n        blobGasUsed: {\n            format: 'uint',\n        },\n        difficulty: {\n            format: 'uint',\n        },\n        excessBlobGas: {\n            format: 'uint',\n        },\n        extraData: {\n            format: 'bytes',\n        },\n        gasLimit: {\n            format: 'uint',\n        },\n        gasUsed: {\n            format: 'uint',\n        },\n        hash: {\n            format: 'bytes32',\n        },\n        logsBloom: {\n            format: 'bytes256',\n        },\n        miner: {\n            format: 'bytes',\n        },\n        mixHash: {\n            format: 'bytes32',\n        },\n        nonce: {\n            format: 'uint',\n        },\n        number: {\n            format: 'uint',\n        },\n        parentBeaconBlockRoot: {\n            format: 'bytes32',\n        },\n        parentHash: {\n            format: 'bytes32',\n        },\n        receiptsRoot: {\n            format: 'bytes32',\n        },\n        sha3Uncles: {\n            format: 'bytes32',\n        },\n        size: {\n            format: 'uint',\n        },\n        stateRoot: {\n            format: 'bytes32',\n        },\n        timestamp: {\n            format: 'uint',\n        },\n        totalDifficulty: {\n            format: 'uint',\n        },\n        transactions: {\n            oneOf: [\n                {\n                    type: 'array',\n                    items: Object.assign({}, transactionInfoSchema),\n                },\n                {\n                    type: 'array',\n                    items: {\n                        format: 'bytes32',\n                    },\n                },\n            ],\n        },\n        transactionsRoot: {\n            format: 'bytes32',\n        },\n        uncles: {\n            type: 'array',\n            items: {\n                format: 'bytes32',\n            },\n        },\n        withdrawals: {\n            type: 'array',\n            items: Object.assign({}, withdrawalsSchema),\n        },\n        withdrawalsRoot: {\n            format: 'bytes32',\n        },\n    },\n};\nexport const blockHeaderSchema = {\n    type: 'object',\n    properties: {\n        author: {\n            format: 'bytes32',\n        },\n        excessDataGas: {\n            format: 'uint',\n        },\n        baseFeePerGas: {\n            format: 'uint',\n        },\n        blobGasUsed: {\n            format: 'uint',\n        },\n        difficulty: {\n            format: 'uint',\n        },\n        excessBlobGas: {\n            format: 'uint',\n        },\n        extraData: {\n            format: 'bytes',\n        },\n        gasLimit: {\n            format: 'uint',\n        },\n        gasUsed: {\n            format: 'uint',\n        },\n        hash: {\n            format: 'bytes32',\n        },\n        logsBloom: {\n            format: 'bytes256',\n        },\n        miner: {\n            format: 'bytes',\n        },\n        mixHash: {\n            format: 'bytes32',\n        },\n        nonce: {\n            format: 'uint',\n        },\n        number: {\n            format: 'uint',\n        },\n        parentBeaconBlockRoot: {\n            format: 'bytes32',\n        },\n        parentHash: {\n            format: 'bytes32',\n        },\n        receiptsRoot: {\n            format: 'bytes32',\n        },\n        sha3Uncles: {\n            format: 'bytes32',\n        },\n        size: {\n            format: 'uint',\n        },\n        stateRoot: {\n            format: 'bytes32',\n        },\n        timestamp: {\n            format: 'uint',\n        },\n        totalDifficulty: {\n            format: 'uint',\n        },\n        transactions: {\n            type: 'array',\n            items: {\n                format: 'bytes32',\n            },\n        },\n        transactionsRoot: {\n            format: 'bytes32',\n        },\n        uncles: {\n            type: 'array',\n            items: {\n                format: 'bytes32',\n            },\n        },\n        withdrawals: {\n            type: 'array',\n            items: Object.assign({}, withdrawalsSchema),\n        },\n        withdrawalsRoot: {\n            format: 'bytes32',\n        },\n    },\n};\nexport const logSchema = {\n    type: 'object',\n    properties: {\n        removed: {\n            format: 'bool',\n        },\n        logIndex: {\n            format: 'uint',\n        },\n        transactionIndex: {\n            format: 'uint',\n        },\n        transactionHash: {\n            format: 'bytes32',\n        },\n        blockHash: {\n            format: 'bytes32',\n        },\n        blockNumber: {\n            format: 'uint',\n        },\n        address: {\n            format: 'address',\n        },\n        data: {\n            format: 'bytes',\n        },\n        topics: {\n            type: 'array',\n            items: {\n                format: 'bytes32',\n            },\n        },\n    },\n};\nexport const syncSchema = {\n    type: 'object',\n    properties: {\n        startingBlock: {\n            format: 'string',\n        },\n        currentBlock: {\n            format: 'string',\n        },\n        highestBlock: {\n            format: 'string',\n        },\n        knownStates: {\n            format: 'string',\n        },\n        pulledStates: {\n            format: 'string',\n        },\n    },\n};\nexport const transactionReceiptSchema = {\n    type: 'object',\n    properties: {\n        transactionHash: {\n            format: 'bytes32',\n        },\n        transactionIndex: {\n            format: 'uint',\n        },\n        blockHash: {\n            format: 'bytes32',\n        },\n        blockNumber: {\n            format: 'uint',\n        },\n        from: {\n            format: 'address',\n        },\n        to: {\n            format: 'address',\n        },\n        cumulativeGasUsed: {\n            format: 'uint',\n        },\n        gasUsed: {\n            format: 'uint',\n        },\n        effectiveGasPrice: {\n            format: 'uint',\n        },\n        contractAddress: {\n            format: 'address',\n        },\n        logs: {\n            type: 'array',\n            items: Object.assign({}, logSchema),\n        },\n        logsBloom: {\n            format: 'bytes',\n        },\n        root: {\n            format: 'bytes',\n        },\n        status: {\n            format: 'uint',\n        },\n        type: {\n            format: 'uint',\n        },\n    },\n};\nexport const SignatureObjectSchema = {\n    type: 'object',\n    properties: {\n        messageHash: {\n            format: 'bytes',\n        },\n        r: {\n            format: 'bytes32',\n        },\n        s: {\n            format: 'bytes32',\n        },\n        v: {\n            format: 'bytes',\n        },\n        message: {\n            format: 'bytes',\n        },\n        signature: {\n            format: 'bytes',\n        },\n    },\n};\nexport const feeHistorySchema = {\n    type: 'object',\n    properties: {\n        oldestBlock: {\n            format: 'uint',\n        },\n        baseFeePerGas: {\n            type: 'array',\n            items: {\n                format: 'uint',\n            },\n        },\n        reward: {\n            type: 'array',\n            items: {\n                type: 'array',\n                items: {\n                    format: 'uint',\n                },\n            },\n        },\n        gasUsedRatio: {\n            type: 'array',\n            items: {\n                type: 'number',\n            },\n        },\n    },\n};\nexport const storageProofSchema = {\n    type: 'object',\n    properties: {\n        key: {\n            format: 'bytes32',\n        },\n        value: {\n            format: 'uint',\n        },\n        proof: {\n            type: 'array',\n            items: {\n                format: 'bytes32',\n            },\n        },\n    },\n};\nexport const accountSchema = {\n    type: 'object',\n    properties: {\n        balance: {\n            format: 'uint',\n        },\n        codeHash: {\n            format: 'bytes32',\n        },\n        nonce: {\n            format: 'uint',\n        },\n        storageHash: {\n            format: 'bytes32',\n        },\n        accountProof: {\n            type: 'array',\n            items: {\n                format: 'bytes32',\n            },\n        },\n        storageProof: {\n            type: 'array',\n            items: Object.assign({}, storageProofSchema),\n        },\n    },\n};\n//# sourceMappingURL=schemas.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { DEFAULT_RETURN_FORMAT } from 'web3-types';\nimport { isNullish } from 'web3-validator';\nimport { mergeDeep, format, bytesToHex, toHex } from 'web3-utils';\nimport { TransactionDataAndInputError } from 'web3-errors';\nimport { transactionInfoSchema } from '../schemas.js';\nexport function formatTransaction(transaction, returnFormat = DEFAULT_RETURN_FORMAT, options = {\n    transactionSchema: transactionInfoSchema,\n    fillInputAndData: false,\n}) {\n    var _a, _b;\n    let formattedTransaction = mergeDeep({}, transaction);\n    if (!isNullish(transaction === null || transaction === void 0 ? void 0 : transaction.common)) {\n        formattedTransaction.common = Object.assign({}, transaction.common);\n        if (!isNullish((_a = transaction.common) === null || _a === void 0 ? void 0 : _a.customChain))\n            formattedTransaction.common.customChain = Object.assign({}, transaction.common.customChain);\n    }\n    formattedTransaction = format((_b = options.transactionSchema) !== null && _b !== void 0 ? _b : transactionInfoSchema, formattedTransaction, returnFormat);\n    if (!isNullish(formattedTransaction.data) &&\n        !isNullish(formattedTransaction.input) &&\n        // Converting toHex is accounting for data and input being Uint8Arrays\n        // since comparing Uint8Array is not as straightforward as comparing strings\n        toHex(formattedTransaction.data) !== toHex(formattedTransaction.input))\n        throw new TransactionDataAndInputError({\n            data: bytesToHex(formattedTransaction.data),\n            input: bytesToHex(formattedTransaction.input),\n        });\n    if (options.fillInputAndData) {\n        if (!isNullish(formattedTransaction.data)) {\n            formattedTransaction.input = formattedTransaction.data;\n        }\n        else if (!isNullish(formattedTransaction.input)) {\n            formattedTransaction.data = formattedTransaction.input;\n        }\n    }\n    if (!isNullish(formattedTransaction.gasLimit)) {\n        formattedTransaction.gas = formattedTransaction.gasLimit;\n        delete formattedTransaction.gasLimit;\n    }\n    return formattedTransaction;\n}\n//# sourceMappingURL=format_transaction.js.map","import { bytesToHex, format, hexToBytes, keccak256 } from 'web3-utils';\nimport { TransactionFactory } from 'web3-eth-accounts';\nimport { detectRawTransactionType } from './detect_transaction_type.js';\nimport { formatTransaction } from './format_transaction.js';\n/**\n * Decodes an [RLP](https://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp/#top) encoded transaction.\n *\n * @param encodedSignedTransaction The RLP encoded transaction.\n * @param returnFormat ({@link DataFormat} Specifies how the return data should be formatted.\n * @returns {@link SignedTransactionInfoAPI}, an object containing the RLP encoded signed transaction (accessed via the `raw` property) and the signed transaction object (accessed via the `tx` property).\n */\nexport function decodeSignedTransaction(encodedSignedTransaction, returnFormat, options = {\n    fillInputAndData: false,\n}) {\n    return {\n        raw: format({ format: 'bytes' }, encodedSignedTransaction, returnFormat),\n        tx: formatTransaction(Object.assign(Object.assign({}, TransactionFactory.fromSerializedData(hexToBytes(encodedSignedTransaction)).toJSON()), { hash: bytesToHex(keccak256(hexToBytes(encodedSignedTransaction))), type: detectRawTransactionType(hexToBytes(encodedSignedTransaction)) }), returnFormat, {\n            fillInputAndData: options.fillInputAndData,\n            transactionSchema: options.transactionSchema,\n        }),\n    };\n}\n//# sourceMappingURL=decode_signed_transaction.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\nimport { format } from 'web3-utils';\nimport { netRpcMethods } from 'web3-rpc-methods';\nexport function getId(web3Context, returnFormat) {\n    return __awaiter(this, void 0, void 0, function* () {\n        const response = yield netRpcMethods.getId(web3Context.requestManager);\n        return format({ format: 'uint' }, response, returnFormat);\n    });\n}\nexport function getPeerCount(web3Context, returnFormat) {\n    return __awaiter(this, void 0, void 0, function* () {\n        const response = yield netRpcMethods.getPeerCount(web3Context.requestManager);\n        // Data returned is number in hex format\n        return format({ format: 'uint' }, response, returnFormat);\n    });\n}\nexport const isListening = (web3Context) => __awaiter(void 0, void 0, void 0, function* () { return netRpcMethods.isListening(web3Context.requestManager); });\n//# sourceMappingURL=rpc_method_wrappers.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\n/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { Web3Context } from 'web3-core';\nimport * as rpcMethodsWrappers from './rpc_method_wrappers.js';\n/**\n * Net class allows you to interact with an Ethereum node’s network properties.\n * For using Net package, first install Web3 package using: `npm i web3` or `yarn add web3` based on your package manager, after that Net features can be used.\n * ```ts\n *\n * import { Web3 } from 'web3';\n * const web3 = new Web3('https://mainnet.infura.io/v3/<YOURPROJID>');\n *\n * console.log(await web3.eth.net.getId());\n *\n * ```\n * For using individual package install `web3-net` packages using: `npm i web3-net` or `yarn add web3-net`.\n *\n * ```ts\n * import {Net} from 'web3-net';\n *\n *  const net = new Net('https://mainnet.infura.io/v3/<YOURPROJID>');\n *  console.log(await net.getId());\n * ```\n */\nexport class Net extends Web3Context {\n    /**\n     * Gets the current network ID\n     *\n     * @param returnFormat - Return format\n     * @returns A Promise of the network ID.\n     * @example\n     * ```ts\n     * const net = new Net(Net.givenProvider || 'ws://some.local-or-remote.node:8546');\n     * await net.getId();\n     * > 1\n     * ```\n     */\n    getId(returnFormat = this.defaultReturnFormat) {\n        return __awaiter(this, void 0, void 0, function* () {\n            return rpcMethodsWrappers.getId(this, returnFormat);\n        });\n    }\n    /**\n     * Get the number of peers connected to.\n     *\n     * @param returnFormat - Return format\n     * @returns A promise of the number of the peers connected to.\n     * @example\n     * ```ts\n     * const net = new Net(Net.givenProvider || 'ws://some.local-or-remote.node:8546');\n     * await net.getPeerCount();\n     * > 0\n     * ```\n     */\n    getPeerCount(returnFormat = this.defaultReturnFormat) {\n        return __awaiter(this, void 0, void 0, function* () {\n            return rpcMethodsWrappers.getPeerCount(this, returnFormat);\n        });\n    }\n    /**\n     * Check if the node is listening for peers\n     *\n     * @returns A promise of a boolean if the node is listening to peers\n     * @example\n     * ```ts\n     * const net = new Net(Net.givenProvider || 'ws://some.local-or-remote.node:8546');\n     * await net.isListening();\n     * > true\n     * ```\n     */\n    isListening() {\n        return __awaiter(this, void 0, void 0, function* () {\n            return rpcMethodsWrappers.isListening(this);\n        });\n    }\n}\n//# sourceMappingURL=net.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { FMT_BYTES, FMT_NUMBER } from 'web3-types';\nexport const ALL_EVENTS = 'ALLEVENTS';\nexport const ALL_EVENTS_ABI = {\n    name: ALL_EVENTS,\n    signature: '',\n    type: 'event',\n    inputs: [],\n};\nexport const NUMBER_DATA_FORMAT = { bytes: FMT_BYTES.HEX, number: FMT_NUMBER.NUMBER };\n//# sourceMappingURL=constants.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\nimport { ETH_DATA_FORMAT, } from 'web3-types';\nimport { isNullish } from 'web3-validator';\nimport { Eip1559NotSupportedError, UnsupportedTransactionTypeError } from 'web3-errors';\nimport { format } from 'web3-utils';\n// eslint-disable-next-line import/no-cycle\nimport { getBlock, getGasPrice } from '../rpc_method_wrappers.js';\n// eslint-disable-next-line import/no-cycle\nimport { getTransactionType } from './transaction_builder.js';\nfunction getEip1559GasPricing(transaction, web3Context, returnFormat) {\n    return __awaiter(this, void 0, void 0, function* () {\n        var _a, _b, _c, _d;\n        const block = yield getBlock(web3Context, web3Context.defaultBlock, false, ETH_DATA_FORMAT);\n        if (isNullish(block.baseFeePerGas))\n            throw new Eip1559NotSupportedError();\n        let gasPrice;\n        if (isNullish(transaction.gasPrice) && BigInt(block.baseFeePerGas) === BigInt(0)) {\n            gasPrice = yield getGasPrice(web3Context, returnFormat);\n        }\n        if (!isNullish(transaction.gasPrice) || !isNullish(gasPrice)) {\n            const convertedTransactionGasPrice = format({ format: 'uint' }, (_a = transaction.gasPrice) !== null && _a !== void 0 ? _a : gasPrice, returnFormat);\n            return {\n                maxPriorityFeePerGas: convertedTransactionGasPrice,\n                maxFeePerGas: convertedTransactionGasPrice,\n            };\n        }\n        return {\n            maxPriorityFeePerGas: format({ format: 'uint' }, (_b = transaction.maxPriorityFeePerGas) !== null && _b !== void 0 ? _b : web3Context.defaultMaxPriorityFeePerGas, returnFormat),\n            maxFeePerGas: format({ format: 'uint' }, ((_c = transaction.maxFeePerGas) !== null && _c !== void 0 ? _c : BigInt(block.baseFeePerGas) * BigInt(2) +\n                BigInt((_d = transaction.maxPriorityFeePerGas) !== null && _d !== void 0 ? _d : web3Context.defaultMaxPriorityFeePerGas)), returnFormat),\n        };\n    });\n}\nexport function getTransactionGasPricing(transaction, web3Context, returnFormat) {\n    return __awaiter(this, void 0, void 0, function* () {\n        const transactionType = getTransactionType(transaction, web3Context);\n        if (!isNullish(transactionType)) {\n            if (transactionType.startsWith('-'))\n                throw new UnsupportedTransactionTypeError(transactionType);\n            // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-2718.md#transactions\n            if (Number(transactionType) < 0 || Number(transactionType) > 127)\n                throw new UnsupportedTransactionTypeError(transactionType);\n            if (isNullish(transaction.gasPrice) &&\n                (transactionType === '0x0' || transactionType === '0x1'))\n                return {\n                    gasPrice: yield getGasPrice(web3Context, returnFormat),\n                    maxPriorityFeePerGas: undefined,\n                    maxFeePerGas: undefined,\n                };\n            if (transactionType === '0x2') {\n                return Object.assign({ gasPrice: undefined }, (yield getEip1559GasPricing(transaction, web3Context, returnFormat)));\n            }\n        }\n        return undefined;\n    });\n}\n//# sourceMappingURL=get_transaction_gas_pricing.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\nimport { ETH_DATA_FORMAT, } from 'web3-types';\nimport { privateKeyToAddress } from 'web3-eth-accounts';\nimport { getId } from 'web3-net';\nimport { isNullish, isNumber, isHexStrict, isAddress } from 'web3-validator';\nimport { InvalidTransactionWithSender, InvalidTransactionWithReceiver, LocalWalletNotAvailableError, TransactionDataAndInputError, UnableToPopulateNonceError, } from 'web3-errors';\nimport { bytesToHex, format } from 'web3-utils';\nimport { NUMBER_DATA_FORMAT } from '../constants.js';\n// eslint-disable-next-line import/no-cycle\nimport { getChainId, getTransactionCount, estimateGas } from '../rpc_method_wrappers.js';\nimport { detectTransactionType } from './detect_transaction_type.js';\nimport { transactionSchema } from '../schemas.js';\n// eslint-disable-next-line import/no-cycle\nimport { getTransactionGasPricing } from './get_transaction_gas_pricing.js';\nexport const getTransactionFromOrToAttr = (attr, web3Context, transaction, privateKey) => {\n    if (transaction !== undefined && attr in transaction && transaction[attr] !== undefined) {\n        if (typeof transaction[attr] === 'string' && isAddress(transaction[attr])) {\n            // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n            return transaction[attr];\n        }\n        if (!isHexStrict(transaction[attr]) && isNumber(transaction[attr])) {\n            if (web3Context.wallet) {\n                const account = web3Context.wallet.get(format({ format: 'uint' }, transaction[attr], NUMBER_DATA_FORMAT));\n                if (!isNullish(account)) {\n                    return account.address;\n                }\n                throw new LocalWalletNotAvailableError();\n            }\n            throw new LocalWalletNotAvailableError();\n        }\n        else {\n            throw attr === 'from'\n                ? new InvalidTransactionWithSender(transaction.from)\n                : // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n                    new InvalidTransactionWithReceiver(transaction.to);\n        }\n    }\n    if (attr === 'from') {\n        if (!isNullish(privateKey))\n            return privateKeyToAddress(privateKey);\n        if (!isNullish(web3Context.defaultAccount))\n            return web3Context.defaultAccount;\n    }\n    return undefined;\n};\nexport const getTransactionNonce = (web3Context_1, address_1, ...args_1) => __awaiter(void 0, [web3Context_1, address_1, ...args_1], void 0, function* (web3Context, address, returnFormat = web3Context.defaultReturnFormat) {\n    if (isNullish(address)) {\n        // TODO if (web3.eth.accounts.wallet) use address from local wallet\n        throw new UnableToPopulateNonceError();\n    }\n    return getTransactionCount(web3Context, address, web3Context.defaultBlock, returnFormat);\n});\nexport const getTransactionType = (transaction, web3Context) => {\n    const inferredType = detectTransactionType(transaction, web3Context);\n    if (!isNullish(inferredType))\n        return inferredType;\n    if (!isNullish(web3Context.defaultTransactionType))\n        return format({ format: 'uint' }, web3Context.defaultTransactionType, ETH_DATA_FORMAT);\n    return undefined;\n};\n// Keep in mind that the order the properties of populateTransaction get populated matters\n// as some of the properties are dependent on others\nexport function defaultTransactionBuilder(options) {\n    return __awaiter(this, void 0, void 0, function* () {\n        var _a, _b;\n        let populatedTransaction = format(transactionSchema, options.transaction, options.web3Context.defaultReturnFormat);\n        if (isNullish(populatedTransaction.from)) {\n            populatedTransaction.from = getTransactionFromOrToAttr('from', options.web3Context, undefined, options.privateKey);\n        }\n        // TODO: Debug why need to typecase getTransactionNonce\n        if (isNullish(populatedTransaction.nonce)) {\n            populatedTransaction.nonce = yield getTransactionNonce(options.web3Context, populatedTransaction.from, ETH_DATA_FORMAT);\n        }\n        if (isNullish(populatedTransaction.value)) {\n            populatedTransaction.value = '0x0';\n        }\n        if (!isNullish(populatedTransaction.data)) {\n            if (!isNullish(populatedTransaction.input) &&\n                populatedTransaction.data !== populatedTransaction.input)\n                throw new TransactionDataAndInputError({\n                    data: bytesToHex(populatedTransaction.data),\n                    input: bytesToHex(populatedTransaction.input),\n                });\n            if (!populatedTransaction.data.startsWith('0x'))\n                populatedTransaction.data = `0x${populatedTransaction.data}`;\n        }\n        else if (!isNullish(populatedTransaction.input)) {\n            if (!populatedTransaction.input.startsWith('0x'))\n                populatedTransaction.input = `0x${populatedTransaction.input}`;\n        }\n        else {\n            populatedTransaction.input = '0x';\n        }\n        if (isNullish(populatedTransaction.common)) {\n            if (options.web3Context.defaultCommon) {\n                const common = options.web3Context.defaultCommon;\n                const chainId = common.customChain.chainId;\n                const networkId = common.customChain.networkId;\n                const name = common.customChain.name;\n                populatedTransaction.common = Object.assign(Object.assign({}, common), { customChain: { chainId, networkId, name } });\n            }\n            if (isNullish(populatedTransaction.chain)) {\n                populatedTransaction.chain = options.web3Context.defaultChain;\n            }\n            if (isNullish(populatedTransaction.hardfork)) {\n                populatedTransaction.hardfork = options.web3Context.defaultHardfork;\n            }\n        }\n        if (isNullish(populatedTransaction.chainId) &&\n            isNullish((_a = populatedTransaction.common) === null || _a === void 0 ? void 0 : _a.customChain.chainId)) {\n            populatedTransaction.chainId = yield getChainId(options.web3Context, ETH_DATA_FORMAT);\n        }\n        if (isNullish(populatedTransaction.networkId)) {\n            populatedTransaction.networkId =\n                (_b = options.web3Context.defaultNetworkId) !== null && _b !== void 0 ? _b : (yield getId(options.web3Context, ETH_DATA_FORMAT));\n        }\n        if (isNullish(populatedTransaction.gasLimit) && !isNullish(populatedTransaction.gas)) {\n            populatedTransaction.gasLimit = populatedTransaction.gas;\n        }\n        populatedTransaction.type = getTransactionType(populatedTransaction, options.web3Context);\n        if (isNullish(populatedTransaction.accessList) &&\n            (populatedTransaction.type === '0x1' || populatedTransaction.type === '0x2')) {\n            populatedTransaction.accessList = [];\n        }\n        if (options.fillGasPrice)\n            populatedTransaction = Object.assign(Object.assign({}, populatedTransaction), (yield getTransactionGasPricing(populatedTransaction, options.web3Context, ETH_DATA_FORMAT)));\n        if (isNullish(populatedTransaction.gas) &&\n            isNullish(populatedTransaction.gasLimit) &&\n            options.fillGasLimit) {\n            const fillGasLimit = yield estimateGas(options.web3Context, populatedTransaction, 'latest', ETH_DATA_FORMAT);\n            populatedTransaction = Object.assign(Object.assign({}, populatedTransaction), { gas: format({ format: 'uint' }, fillGasLimit, ETH_DATA_FORMAT) });\n        }\n        return populatedTransaction;\n    });\n}\nexport const transactionBuilder = (options) => __awaiter(void 0, void 0, void 0, function* () {\n    var _a;\n    return ((_a = options.web3Context.transactionBuilder) !== null && _a !== void 0 ? _a : defaultTransactionBuilder)(Object.assign(Object.assign({}, options), { transaction: options.transaction }));\n});\n//# sourceMappingURL=transaction_builder.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\nimport { rejectIfConditionAtInterval } from 'web3-utils';\nimport { TransactionBlockTimeoutError } from 'web3-errors';\nimport { NUMBER_DATA_FORMAT } from '../constants.js';\n// eslint-disable-next-line import/no-cycle\nimport { getBlockNumber } from '../rpc_method_wrappers.js';\nfunction resolveByPolling(web3Context, starterBlockNumber, transactionHash) {\n    const pollingInterval = web3Context.transactionPollingInterval;\n    const [intervalId, promiseToError] = rejectIfConditionAtInterval(() => __awaiter(this, void 0, void 0, function* () {\n        let lastBlockNumber;\n        try {\n            lastBlockNumber = yield getBlockNumber(web3Context, NUMBER_DATA_FORMAT);\n        }\n        catch (error) {\n            console.warn('An error happen while trying to get the block number', error);\n            return undefined;\n        }\n        const numberOfBlocks = lastBlockNumber - starterBlockNumber;\n        if (numberOfBlocks >= web3Context.transactionBlockTimeout) {\n            return new TransactionBlockTimeoutError({\n                starterBlockNumber,\n                numberOfBlocks,\n                transactionHash,\n            });\n        }\n        return undefined;\n    }), pollingInterval);\n    const clean = () => {\n        clearInterval(intervalId);\n    };\n    return [promiseToError, { clean }];\n}\nfunction resolveBySubscription(web3Context, starterBlockNumber, transactionHash) {\n    return __awaiter(this, void 0, void 0, function* () {\n        var _a;\n        // The following variable will stay true except if the data arrived,\n        //\tor if watching started after an error had occurred.\n        let needToWatchLater = true;\n        let subscription;\n        let resourceCleaner;\n        // internal helper function\n        function revertToPolling(reject, previousError) {\n            if (previousError) {\n                console.warn('error happened at subscription. So revert to polling...', previousError);\n            }\n            resourceCleaner.clean();\n            needToWatchLater = false;\n            const [promiseToError, newResourceCleaner] = resolveByPolling(web3Context, starterBlockNumber, transactionHash);\n            resourceCleaner.clean = newResourceCleaner.clean;\n            promiseToError.catch(error => reject(error));\n        }\n        try {\n            subscription = (yield ((_a = web3Context.subscriptionManager) === null || _a === void 0 ? void 0 : _a.subscribe('newHeads')));\n            resourceCleaner = {\n                clean: () => {\n                    var _a;\n                    // Remove the subscription, if it was not removed somewhere\n                    // \telse by calling, for example, subscriptionManager.clear()\n                    if (subscription.id) {\n                        (_a = web3Context.subscriptionManager) === null || _a === void 0 ? void 0 : _a.removeSubscription(subscription).then(() => {\n                            // Subscription ended successfully\n                        }).catch(() => {\n                            // An error happened while ending subscription. But no need to take any action.\n                        });\n                    }\n                },\n            };\n        }\n        catch (error) {\n            return resolveByPolling(web3Context, starterBlockNumber, transactionHash);\n        }\n        const promiseToError = new Promise((_, reject) => {\n            try {\n                subscription.on('data', (lastBlockHeader) => {\n                    needToWatchLater = false;\n                    if (!(lastBlockHeader === null || lastBlockHeader === void 0 ? void 0 : lastBlockHeader.number)) {\n                        return;\n                    }\n                    const numberOfBlocks = Number(BigInt(lastBlockHeader.number) - BigInt(starterBlockNumber));\n                    if (numberOfBlocks >= web3Context.transactionBlockTimeout) {\n                        // Transaction Block Timeout is known to be reached by subscribing to new heads\n                        reject(new TransactionBlockTimeoutError({\n                            starterBlockNumber,\n                            numberOfBlocks,\n                            transactionHash,\n                        }));\n                    }\n                });\n                subscription.on('error', error => {\n                    revertToPolling(reject, error);\n                });\n            }\n            catch (error) {\n                revertToPolling(reject, error);\n            }\n            // Fallback to polling if tx receipt didn't arrived in \"blockHeaderTimeout\" [10 seconds]\n            setTimeout(() => {\n                if (needToWatchLater) {\n                    revertToPolling(reject);\n                }\n            }, web3Context.blockHeaderTimeout * 1000);\n        });\n        return [promiseToError, resourceCleaner];\n    });\n}\n/* TODO: After merge, there will be constant block mining time (exactly 12 second each block, except slot missed that currently happens in <1% of slots. ) so we can optimize following function\nfor POS NWs, we can skip checking getBlockNumber(); after interval and calculate only based on time  that certain num of blocked are mined after that for internal double check, can do one getBlockNumber() call and timeout.\n*/\nexport function rejectIfBlockTimeout(web3Context, transactionHash) {\n    return __awaiter(this, void 0, void 0, function* () {\n        var _a, _b;\n        const { provider } = web3Context.requestManager;\n        let callingRes;\n        const starterBlockNumber = yield getBlockNumber(web3Context, NUMBER_DATA_FORMAT);\n        // TODO: once https://github.com/web3/web3.js/issues/5521 is implemented, remove checking for `enableExperimentalFeatures.useSubscriptionWhenCheckingBlockTimeout`\n        if (((_b = (_a = provider).supportsSubscriptions) === null || _b === void 0 ? void 0 : _b.call(_a)) &&\n            web3Context.enableExperimentalFeatures.useSubscriptionWhenCheckingBlockTimeout) {\n            // eslint-disable-next-line @typescript-eslint/no-floating-promises\n            callingRes = yield resolveBySubscription(web3Context, starterBlockNumber, transactionHash);\n        }\n        else {\n            // eslint-disable-next-line @typescript-eslint/no-floating-promises\n            callingRes = resolveByPolling(web3Context, starterBlockNumber, transactionHash);\n        }\n        return callingRes;\n    });\n}\n//# sourceMappingURL=reject_if_block_timeout.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\nimport { rejectIfTimeout } from 'web3-utils';\nimport { TransactionSendTimeoutError } from 'web3-errors';\n// eslint-disable-next-line import/no-cycle\nimport { rejectIfBlockTimeout } from './reject_if_block_timeout.js';\n/**\n * An internal function to send a transaction or throws if sending did not finish during the timeout during the blocks-timeout.\n * @param web3Context - the context to read the configurations from\n * @param sendTransactionFunc - the function that will send the transaction (could be sendTransaction or sendRawTransaction)\n * @param transactionHash - to be used inside the exception message if there will be any exceptions.\n * @returns the Promise<string> returned by the `sendTransactionFunc`.\n */\nexport function trySendTransaction(web3Context, sendTransactionFunc, transactionHash) {\n    return __awaiter(this, void 0, void 0, function* () {\n        const [timeoutId, rejectOnTimeout] = rejectIfTimeout(web3Context.transactionSendTimeout, new TransactionSendTimeoutError({\n            numberOfSeconds: web3Context.transactionSendTimeout / 1000,\n            transactionHash,\n        }));\n        const [rejectOnBlockTimeout, blockTimeoutResourceCleaner] = yield rejectIfBlockTimeout(web3Context, transactionHash);\n        try {\n            // If an error happened here, do not catch it, just clear the resources before raising it to the caller function.\n            return yield Promise.race([\n                sendTransactionFunc(), // this is the function that will send the transaction\n                rejectOnTimeout, // this will throw an error on Transaction Send Timeout\n                rejectOnBlockTimeout, // this will throw an error on Transaction Block Timeout\n            ]);\n        }\n        finally {\n            clearTimeout(timeoutId);\n            blockTimeoutResourceCleaner.clean();\n        }\n    });\n}\n//# sourceMappingURL=try_send_transaction.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\nimport { TransactionPollingTimeoutError } from 'web3-errors';\n// eslint-disable-next-line import/no-cycle\nimport { pollTillDefinedAndReturnIntervalId, rejectIfTimeout } from 'web3-utils';\n// eslint-disable-next-line import/no-cycle\nimport { rejectIfBlockTimeout } from './reject_if_block_timeout.js';\n// eslint-disable-next-line import/no-cycle\nimport { getTransactionReceipt } from '../rpc_method_wrappers.js';\nexport function waitForTransactionReceipt(web3Context, transactionHash, returnFormat, customGetTransactionReceipt) {\n    return __awaiter(this, void 0, void 0, function* () {\n        var _a;\n        const pollingInterval = (_a = web3Context.transactionReceiptPollingInterval) !== null && _a !== void 0 ? _a : web3Context.transactionPollingInterval;\n        const [awaitableTransactionReceipt, IntervalId] = pollTillDefinedAndReturnIntervalId(() => __awaiter(this, void 0, void 0, function* () {\n            try {\n                return (customGetTransactionReceipt !== null && customGetTransactionReceipt !== void 0 ? customGetTransactionReceipt : getTransactionReceipt)(web3Context, transactionHash, returnFormat);\n            }\n            catch (error) {\n                console.warn('An error happen while trying to get the transaction receipt', error);\n                return undefined;\n            }\n        }), pollingInterval);\n        const [timeoutId, rejectOnTimeout] = rejectIfTimeout(web3Context.transactionPollingTimeout, new TransactionPollingTimeoutError({\n            numberOfSeconds: web3Context.transactionPollingTimeout / 1000,\n            transactionHash,\n        }));\n        const [rejectOnBlockTimeout, blockTimeoutResourceCleaner] = yield rejectIfBlockTimeout(web3Context, transactionHash);\n        try {\n            // If an error happened here, do not catch it, just clear the resources before raising it to the caller function.\n            return yield Promise.race([\n                awaitableTransactionReceipt,\n                rejectOnTimeout, // this will throw an error on Transaction Polling Timeout\n                rejectOnBlockTimeout, // this will throw an error on Transaction Block Timeout\n            ]);\n        }\n        finally {\n            if (timeoutId)\n                clearTimeout(timeoutId);\n            if (IntervalId)\n                clearInterval(IntervalId);\n            blockTimeoutResourceCleaner.clean();\n        }\n    });\n}\n//# sourceMappingURL=wait_for_transaction_receipt.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\nimport { format, numberToHex } from 'web3-utils';\nimport { ethRpcMethods } from 'web3-rpc-methods';\nimport { transactionReceiptSchema } from '../schemas.js';\n/**\n * This function watches a Transaction by subscribing to new heads.\n * It is used by `watchTransactionForConfirmations`, in case the provider does not support subscription.\n * And it is also used by `watchTransactionBySubscription`, as a fallback, if the subscription failed for any reason.\n */\nexport const watchTransactionByPolling = ({ web3Context, transactionReceipt, transactionPromiEvent, customTransactionReceiptSchema, returnFormat, }) => {\n    var _a;\n    // Having a transactionReceipt means that the transaction has already been included\n    // in at least one block, so we start with 1\n    let confirmations = 1;\n    const intervalId = setInterval(() => {\n        (() => __awaiter(void 0, void 0, void 0, function* () {\n            if (confirmations >= web3Context.transactionConfirmationBlocks) {\n                clearInterval(intervalId);\n                return;\n            }\n            const nextBlock = yield ethRpcMethods.getBlockByNumber(web3Context.requestManager, numberToHex(BigInt(transactionReceipt.blockNumber) + BigInt(confirmations)), false);\n            if (nextBlock === null || nextBlock === void 0 ? void 0 : nextBlock.hash) {\n                confirmations += 1;\n                transactionPromiEvent.emit('confirmation', {\n                    confirmations: format({ format: 'uint' }, confirmations, returnFormat),\n                    receipt: format(customTransactionReceiptSchema !== null && customTransactionReceiptSchema !== void 0 ? customTransactionReceiptSchema : transactionReceiptSchema, transactionReceipt, returnFormat),\n                    latestBlockHash: format({ format: 'bytes32' }, nextBlock.hash, returnFormat),\n                });\n            }\n        }))();\n    }, (_a = web3Context.transactionReceiptPollingInterval) !== null && _a !== void 0 ? _a : web3Context.transactionPollingInterval);\n};\n//# sourceMappingURL=watch_transaction_by_polling.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\nimport { format } from 'web3-utils';\nimport { transactionReceiptSchema } from '../schemas.js';\nimport { watchTransactionByPolling } from './watch_transaction_by_polling.js';\n/**\n * This function watches a Transaction by subscribing to new heads.\n * It is used by `watchTransactionForConfirmations`, in case the provider supports subscription.\n */\nexport const watchTransactionBySubscription = ({ web3Context, transactionReceipt, transactionPromiEvent, customTransactionReceiptSchema, returnFormat, }) => {\n    // The following variable will stay true except if the data arrived,\n    //\tor if watching started after an error had occurred.\n    let needToWatchLater = true;\n    let lastCaughtBlockHash;\n    setImmediate(() => {\n        var _a;\n        (_a = web3Context.subscriptionManager) === null || _a === void 0 ? void 0 : _a.subscribe('newHeads').then((subscription) => {\n            subscription.on('data', (newBlockHeader) => __awaiter(void 0, void 0, void 0, function* () {\n                var _a;\n                needToWatchLater = false;\n                if (!(newBlockHeader === null || newBlockHeader === void 0 ? void 0 : newBlockHeader.number) ||\n                    // For some cases, the on-data event is fired couple times for the same block!\n                    // This needs investigation but seems to be because of multiple `subscription.on('data'...)` even this should not cause that.\n                    lastCaughtBlockHash === (newBlockHeader === null || newBlockHeader === void 0 ? void 0 : newBlockHeader.parentHash)) {\n                    return;\n                }\n                lastCaughtBlockHash = newBlockHeader === null || newBlockHeader === void 0 ? void 0 : newBlockHeader.parentHash;\n                const confirmations = BigInt(newBlockHeader.number) -\n                    BigInt(transactionReceipt.blockNumber) +\n                    BigInt(1);\n                transactionPromiEvent.emit('confirmation', {\n                    confirmations: format({ format: 'uint' }, confirmations, returnFormat),\n                    receipt: format(customTransactionReceiptSchema !== null && customTransactionReceiptSchema !== void 0 ? customTransactionReceiptSchema : transactionReceiptSchema, transactionReceipt, returnFormat),\n                    latestBlockHash: format({ format: 'bytes32' }, newBlockHeader.parentHash, returnFormat),\n                });\n                if (confirmations >= web3Context.transactionConfirmationBlocks) {\n                    yield ((_a = web3Context.subscriptionManager) === null || _a === void 0 ? void 0 : _a.removeSubscription(subscription));\n                }\n            }));\n            subscription.on('error', () => __awaiter(void 0, void 0, void 0, function* () {\n                var _a;\n                yield ((_a = web3Context.subscriptionManager) === null || _a === void 0 ? void 0 : _a.removeSubscription(subscription));\n                needToWatchLater = false;\n                watchTransactionByPolling({\n                    web3Context,\n                    transactionReceipt,\n                    transactionPromiEvent,\n                    customTransactionReceiptSchema,\n                    returnFormat,\n                });\n            }));\n        }).catch(() => {\n            needToWatchLater = false;\n            watchTransactionByPolling({\n                web3Context,\n                transactionReceipt,\n                customTransactionReceiptSchema,\n                transactionPromiEvent,\n                returnFormat,\n            });\n        });\n    });\n    // Fallback to polling if tx receipt didn't arrived in \"blockHeaderTimeout\" [10 seconds]\n    setTimeout(() => {\n        if (needToWatchLater) {\n            watchTransactionByPolling({\n                web3Context,\n                transactionReceipt,\n                transactionPromiEvent,\n                returnFormat,\n            });\n        }\n    }, web3Context.blockHeaderTimeout * 1000);\n};\n//# sourceMappingURL=watch_transaction_by_subscription.js.map","import { format } from 'web3-utils';\nimport { isNullish } from 'web3-validator';\nimport { TransactionMissingReceiptOrBlockHashError, TransactionReceiptMissingBlockNumberError, } from 'web3-errors';\nimport { transactionReceiptSchema } from '../schemas.js';\nimport { watchTransactionByPolling, } from './watch_transaction_by_polling.js';\nimport { watchTransactionBySubscription } from './watch_transaction_by_subscription.js';\nexport function watchTransactionForConfirmations(web3Context, transactionPromiEvent, transactionReceipt, transactionHash, returnFormat, customTransactionReceiptSchema) {\n    if (isNullish(transactionReceipt) || isNullish(transactionReceipt.blockHash))\n        throw new TransactionMissingReceiptOrBlockHashError({\n            receipt: transactionReceipt,\n            blockHash: format({ format: 'bytes32' }, transactionReceipt === null || transactionReceipt === void 0 ? void 0 : transactionReceipt.blockHash, returnFormat),\n            transactionHash: format({ format: 'bytes32' }, transactionHash, returnFormat),\n        });\n    if (!transactionReceipt.blockNumber)\n        throw new TransactionReceiptMissingBlockNumberError({ receipt: transactionReceipt });\n    // As we have the receipt, it's the first confirmation that tx is accepted.\n    transactionPromiEvent.emit('confirmation', {\n        confirmations: format({ format: 'uint' }, 1, returnFormat),\n        receipt: format(customTransactionReceiptSchema !== null && customTransactionReceiptSchema !== void 0 ? customTransactionReceiptSchema : transactionReceiptSchema, transactionReceipt, returnFormat),\n        latestBlockHash: format({ format: 'bytes32' }, transactionReceipt.blockHash, returnFormat),\n    });\n    // so a subscription for newBlockHeaders can be made instead of polling\n    const provider = web3Context.requestManager.provider;\n    if (provider && 'supportsSubscriptions' in provider && provider.supportsSubscriptions()) {\n        watchTransactionBySubscription({\n            web3Context,\n            transactionReceipt,\n            transactionPromiEvent,\n            customTransactionReceiptSchema,\n            returnFormat,\n        });\n    }\n    else {\n        watchTransactionByPolling({\n            web3Context,\n            transactionReceipt,\n            transactionPromiEvent,\n            customTransactionReceiptSchema,\n            returnFormat,\n        });\n    }\n}\n//# sourceMappingURL=watch_transaction_for_confirmations.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { AbiError } from 'web3-errors';\nimport { isNullish, isUint8Array, leftPad, rightPad, toHex } from 'web3-utils';\nexport const isAbiFragment = (item) => !isNullish(item) &&\n    typeof item === 'object' &&\n    !isNullish(item.type) &&\n    ['function', 'event', 'constructor', 'error'].includes(item.type);\nexport const isAbiErrorFragment = (item) => !isNullish(item) &&\n    typeof item === 'object' &&\n    !isNullish(item.type) &&\n    item.type === 'error';\nexport const isAbiEventFragment = (item) => !isNullish(item) &&\n    typeof item === 'object' &&\n    !isNullish(item.type) &&\n    item.type === 'event';\nexport const isAbiFunctionFragment = (item) => !isNullish(item) &&\n    typeof item === 'object' &&\n    !isNullish(item.type) &&\n    item.type === 'function';\nexport const isAbiConstructorFragment = (item) => !isNullish(item) &&\n    typeof item === 'object' &&\n    !isNullish(item.type) &&\n    item.type === 'constructor';\n/**\n * Check if type is simplified struct format\n */\nexport const isSimplifiedStructFormat = (type) => typeof type === 'object' &&\n    typeof type.components === 'undefined' &&\n    typeof type.name === 'undefined';\n/**\n * Maps the correct tuple type and name when the simplified format in encode/decodeParameter is used\n */\nexport const mapStructNameAndType = (structName) => structName.includes('[]')\n    ? { type: 'tuple[]', name: structName.slice(0, -2) }\n    : { type: 'tuple', name: structName };\n/**\n * Maps the simplified format in to the expected format of the ABICoder\n */\nexport const mapStructToCoderFormat = (struct) => {\n    const components = [];\n    for (const key of Object.keys(struct)) {\n        const item = struct[key];\n        if (typeof item === 'object') {\n            components.push(Object.assign(Object.assign({}, mapStructNameAndType(key)), { components: mapStructToCoderFormat(item) }));\n        }\n        else {\n            components.push({\n                name: key,\n                type: struct[key],\n            });\n        }\n    }\n    return components;\n};\n/**\n * Map types if simplified format is used\n */\nexport const mapTypes = (types) => {\n    const mappedTypes = [];\n    for (const type of types) {\n        let modifiedType = type;\n        // Clone object\n        if (typeof type === 'object') {\n            modifiedType = Object.assign({}, type);\n        }\n        // Remap `function` type params to bytes24 since Ethers does not\n        // recognize former type. Solidity docs say `Function` is a bytes24\n        // encoding the contract address followed by the function selector hash.\n        if (typeof type === 'object' && type.type === 'function') {\n            modifiedType = Object.assign(Object.assign({}, type), { type: 'bytes24' });\n        }\n        if (isSimplifiedStructFormat(modifiedType)) {\n            const structName = Object.keys(modifiedType)[0];\n            mappedTypes.push(Object.assign(Object.assign({}, mapStructNameAndType(structName)), { components: mapStructToCoderFormat(modifiedType[structName]) }));\n        }\n        else {\n            mappedTypes.push(modifiedType);\n        }\n    }\n    return mappedTypes;\n};\n/**\n * returns true if input is a hexstring and is odd-lengthed\n */\nexport const isOddHexstring = (param) => typeof param === 'string' && /^(-)?0x[0-9a-f]*$/i.test(param) && param.length % 2 === 1;\n/**\n * format odd-length bytes to even-length\n */\nexport const formatOddHexstrings = (param) => isOddHexstring(param) ? `0x0${param.substring(2)}` : param;\nconst paramTypeBytes = /^bytes([0-9]*)$/;\nconst paramTypeBytesArray = /^bytes([0-9]*)\\[\\]$/;\nconst paramTypeNumber = /^(u?int)([0-9]*)$/;\nconst paramTypeNumberArray = /^(u?int)([0-9]*)\\[\\]$/;\n/**\n * Handle some formatting of params for backwards compatibility with Ethers V4\n */\nexport const formatParam = (type, _param) => {\n    // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n    // clone if _param is an object\n    const param = typeof _param === 'object' && !Array.isArray(_param) ? Object.assign({}, _param) : _param;\n    // Format BN to string\n    if (param instanceof BigInt || typeof param === 'bigint') {\n        return param.toString(10);\n    }\n    if (paramTypeBytesArray.exec(type) || paramTypeNumberArray.exec(type)) {\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n        const paramClone = [...param];\n        return paramClone.map(p => formatParam(type.replace('[]', ''), p));\n    }\n    // Format correct width for u?int[0-9]*\n    let match = paramTypeNumber.exec(type);\n    if (match) {\n        const size = parseInt(match[2] ? match[2] : '256', 10);\n        if (size / 8 < param.length) {\n            // pad to correct bit width\n            return leftPad(param, size);\n        }\n    }\n    // Format correct length for bytes[0-9]+\n    match = paramTypeBytes.exec(type);\n    if (match) {\n        const hexParam = isUint8Array(param) ? toHex(param) : param;\n        // format to correct length\n        const size = parseInt(match[1], 10);\n        if (size) {\n            let maxSize = size * 2;\n            if (param.startsWith('0x')) {\n                maxSize += 2;\n            }\n            // pad to correct length\n            const paddedParam = hexParam.length < maxSize\n                ? rightPad(param, size * 2)\n                : hexParam;\n            return formatOddHexstrings(paddedParam);\n        }\n        return formatOddHexstrings(hexParam);\n    }\n    return param;\n};\n/**\n *  used to flatten json abi inputs/outputs into an array of type-representing-strings\n */\nexport const flattenTypes = (includeTuple, puts) => {\n    const types = [];\n    puts.forEach(param => {\n        if (typeof param.components === 'object') {\n            if (!param.type.startsWith('tuple')) {\n                throw new AbiError(`Invalid value given \"${param.type}\". Error: components found but type is not tuple.`);\n            }\n            const arrayBracket = param.type.indexOf('[');\n            const suffix = arrayBracket >= 0 ? param.type.substring(arrayBracket) : '';\n            const result = flattenTypes(includeTuple, param.components);\n            if (Array.isArray(result) && includeTuple) {\n                types.push(`tuple(${result.join(',')})${suffix}`);\n            }\n            else if (!includeTuple) {\n                types.push(`(${result.join(',')})${suffix}`);\n            }\n            else {\n                types.push(`(${result.join()})`);\n            }\n        }\n        else {\n            types.push(param.type);\n        }\n    });\n    return types;\n};\n/**\n * Should be used to create full function/event name from json abi\n * returns a string\n */\nexport const jsonInterfaceMethodToString = (json) => {\n    var _a, _b, _c, _d;\n    // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n    if (isAbiErrorFragment(json) || isAbiEventFragment(json) || isAbiFunctionFragment(json)) {\n        if ((_a = json.name) === null || _a === void 0 ? void 0 : _a.includes('(')) {\n            return json.name;\n        }\n        return `${(_b = json.name) !== null && _b !== void 0 ? _b : ''}(${flattenTypes(false, (_c = json.inputs) !== null && _c !== void 0 ? _c : []).join(',')})`;\n    }\n    // Constructor fragment\n    return `(${flattenTypes(false, (_d = json.inputs) !== null && _d !== void 0 ? _d : []).join(',')})`;\n};\n//# sourceMappingURL=utils.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\n/**\n *\n *  @module ABI\n */\nimport { sha3Raw } from 'web3-utils';\nimport { AbiError } from 'web3-errors';\nimport { jsonInterfaceMethodToString, isAbiErrorFragment } from '../utils.js';\n/**\n * Encodes the error name to its ABI signature, which are the sha3 hash of the error name including input types.\n */\nexport const encodeErrorSignature = (functionName) => {\n    if (typeof functionName !== 'string' && !isAbiErrorFragment(functionName)) {\n        throw new AbiError('Invalid parameter value in encodeErrorSignature');\n    }\n    let name;\n    if (functionName && (typeof functionName === 'function' || typeof functionName === 'object')) {\n        name = jsonInterfaceMethodToString(functionName);\n    }\n    else {\n        name = functionName;\n    }\n    return sha3Raw(name);\n};\n//# sourceMappingURL=errors_api.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\n/**\n *\n *  @module ABI\n */\nimport { sha3Raw } from 'web3-utils';\nimport { AbiError } from 'web3-errors';\nimport { jsonInterfaceMethodToString, isAbiEventFragment } from '../utils.js';\n/**\n * Encodes the event name to its ABI signature, which are the sha3 hash of the event name including input types.\n * @param functionName - The event name to encode, or the {@link AbiEventFragment} object of the event. If string, it has to be in the form of `eventName(param1Type,param2Type,...)`. eg: myEvent(uint256,bytes32).\n * @returns - The ABI signature of the event.\n *\n * @example\n * ```ts\n * const event = web3.eth.abi.encodeEventSignature({\n *   name: \"myEvent\",\n *   type: \"event\",\n *   inputs: [\n *     {\n *       type: \"uint256\",\n *       name: \"myNumber\",\n *     },\n *     {\n *       type: \"bytes32\",\n *       name: \"myBytes\",\n *     },\n *   ],\n * });\n * console.log(event);\n * > 0xf2eeb729e636a8cb783be044acf6b7b1e2c5863735b60d6daae84c366ee87d97\n *\n *  const event = web3.eth.abi.encodeEventSignature({\n *   inputs: [\n *     {\n *       indexed: true,\n *       name: \"from\",\n *       type: \"address\",\n *     },\n *     {\n *       indexed: true,\n *       name: \"to\",\n *       type: \"address\",\n *     },\n *     {\n *       indexed: false,\n *       name: \"value\",\n *       type: \"uint256\",\n *     },\n *   ],\n *   name: \"Transfer\",\n *   type: \"event\",\n * });\n * console.log(event);\n * > 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef\n * ```\n */\nexport const encodeEventSignature = (functionName) => {\n    if (typeof functionName !== 'string' && !isAbiEventFragment(functionName)) {\n        throw new AbiError('Invalid parameter value in encodeEventSignature');\n    }\n    let name;\n    if (functionName && (typeof functionName === 'function' || typeof functionName === 'object')) {\n        name = jsonInterfaceMethodToString(functionName);\n    }\n    else {\n        name = functionName;\n    }\n    return sha3Raw(name);\n};\n//# sourceMappingURL=events_api.js.map","// src/regex.ts\nfunction execTyped(regex, string) {\n  const match = regex.exec(string);\n  return match?.groups;\n}\nvar bytesRegex = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/;\nvar integerRegex = /^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;\nvar isTupleRegex = /^\\(.+?\\).*?$/;\n\nexport {\n  execTyped,\n  bytesRegex,\n  integerRegex,\n  isTupleRegex\n};\n","var __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => {\n  __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n  return value;\n};\n\nexport {\n  __publicField\n};\n","import {\n  bytesRegex,\n  execTyped,\n  integerRegex,\n  isTupleRegex\n} from \"./chunk-WP7KDV47.mjs\";\nimport {\n  __publicField\n} from \"./chunk-NHABU752.mjs\";\n\n// package.json\nvar name = \"abitype\";\nvar version = \"0.7.1\";\n\n// src/errors.ts\nvar BaseError = class extends Error {\n  constructor(shortMessage, args = {}) {\n    const details = args.cause instanceof BaseError ? args.cause.details : args.cause?.message ? args.cause.message : args.details;\n    const docsPath = args.cause instanceof BaseError ? args.cause.docsPath || args.docsPath : args.docsPath;\n    const message = [\n      shortMessage || \"An error occurred.\",\n      \"\",\n      ...args.metaMessages ? [...args.metaMessages, \"\"] : [],\n      ...docsPath ? [`Docs: https://abitype.dev${docsPath}`] : [],\n      ...details ? [`Details: ${details}`] : [],\n      `Version: ${name}@${version}`\n    ].join(\"\\n\");\n    super(message);\n    __publicField(this, \"details\");\n    __publicField(this, \"docsPath\");\n    __publicField(this, \"metaMessages\");\n    __publicField(this, \"shortMessage\");\n    __publicField(this, \"name\", \"AbiTypeError\");\n    if (args.cause)\n      this.cause = args.cause;\n    this.details = details;\n    this.docsPath = docsPath;\n    this.metaMessages = args.metaMessages;\n    this.shortMessage = shortMessage;\n  }\n};\n\n// src/narrow.ts\nfunction narrow(value) {\n  return value;\n}\n\n// src/human-readable/runtime/signatures.ts\nvar errorSignatureRegex = /^error (?<name>[a-zA-Z0-9_]+)\\((?<parameters>.*?)\\)$/;\nfunction isErrorSignature(signature) {\n  return errorSignatureRegex.test(signature);\n}\nfunction execErrorSignature(signature) {\n  return execTyped(\n    errorSignatureRegex,\n    signature\n  );\n}\nvar eventSignatureRegex = /^event (?<name>[a-zA-Z0-9_]+)\\((?<parameters>.*?)\\)$/;\nfunction isEventSignature(signature) {\n  return eventSignatureRegex.test(signature);\n}\nfunction execEventSignature(signature) {\n  return execTyped(\n    eventSignatureRegex,\n    signature\n  );\n}\nvar functionSignatureRegex = /^function (?<name>[a-zA-Z0-9_]+)\\((?<parameters>.*?)\\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns \\((?<returns>.*?)\\))?$/;\nfunction isFunctionSignature(signature) {\n  return functionSignatureRegex.test(signature);\n}\nfunction execFunctionSignature(signature) {\n  return execTyped(functionSignatureRegex, signature);\n}\nvar structSignatureRegex = /^struct (?<name>[a-zA-Z0-9_]+) \\{(?<properties>.*?)\\}$/;\nfunction isStructSignature(signature) {\n  return structSignatureRegex.test(signature);\n}\nfunction execStructSignature(signature) {\n  return execTyped(\n    structSignatureRegex,\n    signature\n  );\n}\nvar constructorSignatureRegex = /^constructor\\((?<parameters>.*?)\\)(?:\\s(?<stateMutability>payable{1}))?$/;\nfunction isConstructorSignature(signature) {\n  return constructorSignatureRegex.test(signature);\n}\nfunction execConstructorSignature(signature) {\n  return execTyped(constructorSignatureRegex, signature);\n}\nvar fallbackSignatureRegex = /^fallback\\(\\)$/;\nfunction isFallbackSignature(signature) {\n  return fallbackSignatureRegex.test(signature);\n}\nvar receiveSignatureRegex = /^receive\\(\\) external payable$/;\nfunction isReceiveSignature(signature) {\n  return receiveSignatureRegex.test(signature);\n}\nvar modifiers = /* @__PURE__ */ new Set([\n  \"memory\",\n  \"indexed\",\n  \"storage\",\n  \"calldata\"\n]);\nvar eventModifiers = /* @__PURE__ */ new Set([\"indexed\"]);\nvar functionModifiers = /* @__PURE__ */ new Set([\n  \"calldata\",\n  \"memory\",\n  \"storage\"\n]);\n\n// src/human-readable/runtime/cache.ts\nfunction getParameterCacheKey(param, type) {\n  if (type)\n    return `${type}:${param}`;\n  return param;\n}\nvar parameterCache = /* @__PURE__ */ new Map([\n  // Unnamed\n  [\"address\", { type: \"address\" }],\n  [\"bool\", { type: \"bool\" }],\n  [\"bytes\", { type: \"bytes\" }],\n  [\"bytes32\", { type: \"bytes32\" }],\n  [\"int\", { type: \"int256\" }],\n  [\"int256\", { type: \"int256\" }],\n  [\"string\", { type: \"string\" }],\n  [\"uint\", { type: \"uint256\" }],\n  [\"uint8\", { type: \"uint8\" }],\n  [\"uint16\", { type: \"uint16\" }],\n  [\"uint24\", { type: \"uint24\" }],\n  [\"uint32\", { type: \"uint32\" }],\n  [\"uint64\", { type: \"uint64\" }],\n  [\"uint96\", { type: \"uint96\" }],\n  [\"uint112\", { type: \"uint112\" }],\n  [\"uint160\", { type: \"uint160\" }],\n  [\"uint192\", { type: \"uint192\" }],\n  [\"uint256\", { type: \"uint256\" }],\n  // Named\n  [\"address owner\", { type: \"address\", name: \"owner\" }],\n  [\"address to\", { type: \"address\", name: \"to\" }],\n  [\"bool approved\", { type: \"bool\", name: \"approved\" }],\n  [\"bytes _data\", { type: \"bytes\", name: \"_data\" }],\n  [\"bytes data\", { type: \"bytes\", name: \"data\" }],\n  [\"bytes signature\", { type: \"bytes\", name: \"signature\" }],\n  [\"bytes32 hash\", { type: \"bytes32\", name: \"hash\" }],\n  [\"bytes32 r\", { type: \"bytes32\", name: \"r\" }],\n  [\"bytes32 root\", { type: \"bytes32\", name: \"root\" }],\n  [\"bytes32 s\", { type: \"bytes32\", name: \"s\" }],\n  [\"string name\", { type: \"string\", name: \"name\" }],\n  [\"string symbol\", { type: \"string\", name: \"symbol\" }],\n  [\"string tokenURI\", { type: \"string\", name: \"tokenURI\" }],\n  [\"uint tokenId\", { type: \"uint256\", name: \"tokenId\" }],\n  [\"uint8 v\", { type: \"uint8\", name: \"v\" }],\n  [\"uint256 balance\", { type: \"uint256\", name: \"balance\" }],\n  [\"uint256 tokenId\", { type: \"uint256\", name: \"tokenId\" }],\n  [\"uint256 value\", { type: \"uint256\", name: \"value\" }],\n  // Indexed\n  [\n    \"event:address indexed from\",\n    { type: \"address\", name: \"from\", indexed: true }\n  ],\n  [\"event:address indexed to\", { type: \"address\", name: \"to\", indexed: true }],\n  [\n    \"event:uint indexed tokenId\",\n    { type: \"uint256\", name: \"tokenId\", indexed: true }\n  ],\n  [\n    \"event:uint256 indexed tokenId\",\n    { type: \"uint256\", name: \"tokenId\", indexed: true }\n  ]\n]);\n\n// src/human-readable/runtime/utils.ts\nfunction parseSignature(signature, structs = {}) {\n  if (isFunctionSignature(signature)) {\n    const match = execFunctionSignature(signature);\n    if (!match)\n      throw new BaseError(\"Invalid function signature.\", {\n        details: signature\n      });\n    const inputParams = splitParameters(match.parameters);\n    const inputs = [];\n    const inputLength = inputParams.length;\n    for (let i = 0; i < inputLength; i++) {\n      inputs.push(\n        parseAbiParameter(inputParams[i], {\n          modifiers: functionModifiers,\n          structs,\n          type: \"function\"\n        })\n      );\n    }\n    const outputs = [];\n    if (match.returns) {\n      const outputParams = splitParameters(match.returns);\n      const outputLength = outputParams.length;\n      for (let i = 0; i < outputLength; i++) {\n        outputs.push(\n          parseAbiParameter(outputParams[i], {\n            modifiers: functionModifiers,\n            structs,\n            type: \"function\"\n          })\n        );\n      }\n    }\n    return {\n      name: match.name,\n      type: \"function\",\n      stateMutability: match.stateMutability ?? \"nonpayable\",\n      inputs,\n      outputs\n    };\n  }\n  if (isEventSignature(signature)) {\n    const match = execEventSignature(signature);\n    if (!match)\n      throw new BaseError(\"Invalid event signature.\", {\n        details: signature\n      });\n    const params = splitParameters(match.parameters);\n    const abiParameters = [];\n    const length = params.length;\n    for (let i = 0; i < length; i++) {\n      abiParameters.push(\n        parseAbiParameter(params[i], {\n          modifiers: eventModifiers,\n          structs,\n          type: \"event\"\n        })\n      );\n    }\n    return { name: match.name, type: \"event\", inputs: abiParameters };\n  }\n  if (isErrorSignature(signature)) {\n    const match = execErrorSignature(signature);\n    if (!match)\n      throw new BaseError(\"Invalid error signature.\", {\n        details: signature\n      });\n    const params = splitParameters(match.parameters);\n    const abiParameters = [];\n    const length = params.length;\n    for (let i = 0; i < length; i++) {\n      abiParameters.push(\n        parseAbiParameter(params[i], { structs, type: \"error\" })\n      );\n    }\n    return { name: match.name, type: \"error\", inputs: abiParameters };\n  }\n  if (isConstructorSignature(signature)) {\n    const match = execConstructorSignature(signature);\n    if (!match)\n      throw new BaseError(\"Invalid constructor signature.\", {\n        details: signature\n      });\n    const params = splitParameters(match.parameters);\n    const abiParameters = [];\n    const length = params.length;\n    for (let i = 0; i < length; i++) {\n      abiParameters.push(\n        parseAbiParameter(params[i], { structs, type: \"constructor\" })\n      );\n    }\n    return {\n      type: \"constructor\",\n      stateMutability: match.stateMutability ?? \"nonpayable\",\n      inputs: abiParameters\n    };\n  }\n  if (isFallbackSignature(signature))\n    return { type: \"fallback\" };\n  if (isReceiveSignature(signature))\n    return {\n      type: \"receive\",\n      stateMutability: \"payable\"\n    };\n  throw new BaseError(\"Unknown signature.\", {\n    details: signature\n  });\n}\nvar abiParameterWithoutTupleRegex = /^(?<type>[a-zA-Z0-9_]+?)(?<array>(?:\\[\\d*?\\])+?)?(?:\\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\\s(?<name>[a-zA-Z0-9_]+))?$/;\nvar abiParameterWithTupleRegex = /^\\((?<type>.+?)\\)(?<array>(?:\\[\\d*?\\])+?)?(?:\\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\\s(?<name>[a-zA-Z0-9_]+))?$/;\nvar dynamicIntegerRegex = /^u?int$/;\nfunction parseAbiParameter(param, options) {\n  const parameterCacheKey = getParameterCacheKey(param, options?.type);\n  if (parameterCache.has(parameterCacheKey))\n    return parameterCache.get(parameterCacheKey);\n  const isTuple = isTupleRegex.test(param);\n  const match = execTyped(\n    isTuple ? abiParameterWithTupleRegex : abiParameterWithoutTupleRegex,\n    param\n  );\n  if (!match)\n    throw new BaseError(\"Invalid ABI parameter.\", {\n      details: param\n    });\n  if (match.name && isSolidityKeyword(match.name))\n    throw new BaseError(\"Invalid ABI parameter.\", {\n      details: param,\n      metaMessages: [\n        `\"${match.name}\" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`\n      ]\n    });\n  const name2 = match.name ? { name: match.name } : {};\n  const indexed = match.modifier === \"indexed\" ? { indexed: true } : {};\n  const structs = options?.structs ?? {};\n  let type;\n  let components = {};\n  if (isTuple) {\n    type = \"tuple\";\n    const params = splitParameters(match.type);\n    const components_ = [];\n    const length = params.length;\n    for (let i = 0; i < length; i++) {\n      components_.push(parseAbiParameter(params[i], { structs }));\n    }\n    components = { components: components_ };\n  } else if (match.type in structs) {\n    type = \"tuple\";\n    components = { components: structs[match.type] };\n  } else if (dynamicIntegerRegex.test(match.type)) {\n    type = `${match.type}256`;\n  } else {\n    type = match.type;\n    if (!(options?.type === \"struct\") && !isSolidityType(type))\n      throw new BaseError(\"Unknown type.\", {\n        metaMessages: [`Type \"${type}\" is not a valid ABI type.`]\n      });\n  }\n  if (match.modifier) {\n    if (!options?.modifiers?.has?.(match.modifier))\n      throw new BaseError(\"Invalid ABI parameter.\", {\n        details: param,\n        metaMessages: [\n          `Modifier \"${match.modifier}\" not allowed${options?.type ? ` in \"${options.type}\" type` : \"\"}.`\n        ]\n      });\n    if (functionModifiers.has(match.modifier) && !isValidDataLocation(type, !!match.array))\n      throw new BaseError(\"Invalid ABI parameter.\", {\n        details: param,\n        metaMessages: [\n          `Modifier \"${match.modifier}\" not allowed${options?.type ? ` in \"${options.type}\" type` : \"\"}.`,\n          `Data location can only be specified for array, struct, or mapping types, but \"${match.modifier}\" was given.`\n        ]\n      });\n  }\n  const abiParameter = {\n    type: `${type}${match.array ?? \"\"}`,\n    ...name2,\n    ...indexed,\n    ...components\n  };\n  parameterCache.set(parameterCacheKey, abiParameter);\n  return abiParameter;\n}\nfunction splitParameters(params, result = [], current = \"\", depth = 0) {\n  if (params === \"\") {\n    if (current === \"\")\n      return result;\n    if (depth !== 0)\n      throw new BaseError(\"Unbalanced parentheses.\", {\n        metaMessages: [\n          `\"${current.trim()}\" has too many ${depth > 0 ? \"opening\" : \"closing\"} parentheses.`\n        ],\n        details: `Depth \"${depth}\"`\n      });\n    return [...result, current.trim()];\n  }\n  const length = params.length;\n  for (let i = 0; i < length; i++) {\n    const char = params[i];\n    const tail = params.slice(i + 1);\n    switch (char) {\n      case \",\":\n        return depth === 0 ? splitParameters(tail, [...result, current.trim()]) : splitParameters(tail, result, `${current}${char}`, depth);\n      case \"(\":\n        return splitParameters(tail, result, `${current}${char}`, depth + 1);\n      case \")\":\n        return splitParameters(tail, result, `${current}${char}`, depth - 1);\n      default:\n        return splitParameters(tail, result, `${current}${char}`, depth);\n    }\n  }\n  return [];\n}\nfunction isSolidityType(type) {\n  return type === \"address\" || type === \"bool\" || type === \"function\" || type === \"string\" || bytesRegex.test(type) || integerRegex.test(type);\n}\nvar protectedKeywordsRegex = /^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;\nfunction isSolidityKeyword(name2) {\n  return name2 === \"address\" || name2 === \"bool\" || name2 === \"function\" || name2 === \"string\" || name2 === \"tuple\" || bytesRegex.test(name2) || integerRegex.test(name2) || protectedKeywordsRegex.test(name2);\n}\nfunction isValidDataLocation(type, isArray) {\n  return isArray || type === \"bytes\" || type === \"string\" || type === \"tuple\";\n}\n\n// src/human-readable/runtime/structs.ts\nfunction parseStructs(signatures) {\n  const shallowStructs = {};\n  const signaturesLength = signatures.length;\n  for (let i = 0; i < signaturesLength; i++) {\n    const signature = signatures[i];\n    if (!isStructSignature(signature))\n      continue;\n    const match = execStructSignature(signature);\n    if (!match)\n      throw new BaseError(\"Invalid struct signature.\", {\n        details: signature\n      });\n    const properties = match.properties.split(\";\");\n    const components = [];\n    const propertiesLength = properties.length;\n    for (let k = 0; k < propertiesLength; k++) {\n      const property = properties[k];\n      const trimmed = property.trim();\n      if (!trimmed)\n        continue;\n      const abiParameter = parseAbiParameter(trimmed, {\n        type: \"struct\"\n      });\n      components.push(abiParameter);\n    }\n    if (!components.length)\n      throw new BaseError(\"Invalid struct signature.\", {\n        details: signature,\n        metaMessages: [\"No properties exist.\"]\n      });\n    shallowStructs[match.name] = components;\n  }\n  const resolvedStructs = {};\n  const entries = Object.entries(shallowStructs);\n  const entriesLength = entries.length;\n  for (let i = 0; i < entriesLength; i++) {\n    const [name2, parameters] = entries[i];\n    resolvedStructs[name2] = resolveStructs(parameters, shallowStructs);\n  }\n  return resolvedStructs;\n}\nvar typeWithoutTupleRegex = /^(?<type>[a-zA-Z0-9_]+?)(?<array>(?:\\[\\d*?\\])+?)?$/;\nfunction resolveStructs(abiParameters, structs, ancestors = /* @__PURE__ */ new Set()) {\n  const components = [];\n  const length = abiParameters.length;\n  for (let i = 0; i < length; i++) {\n    const abiParameter = abiParameters[i];\n    const isTuple = isTupleRegex.test(abiParameter.type);\n    if (isTuple)\n      components.push(abiParameter);\n    else {\n      const match = execTyped(\n        typeWithoutTupleRegex,\n        abiParameter.type\n      );\n      if (!match?.type)\n        throw new BaseError(\"Invalid ABI parameter.\", {\n          details: JSON.stringify(abiParameter, null, 2),\n          metaMessages: [\"ABI parameter type is invalid.\"]\n        });\n      const { array, type } = match;\n      if (type in structs) {\n        if (ancestors.has(type))\n          throw new BaseError(\"Circular reference detected.\", {\n            metaMessages: [`Struct \"${type}\" is a circular reference.`]\n          });\n        components.push({\n          ...abiParameter,\n          type: `tuple${array ?? \"\"}`,\n          components: resolveStructs(\n            structs[type] ?? [],\n            structs,\n            /* @__PURE__ */ new Set([...ancestors, type])\n          )\n        });\n      } else {\n        if (isSolidityType(type))\n          components.push(abiParameter);\n        else\n          throw new BaseError(\"Unknown type.\", {\n            metaMessages: [\n              `Type \"${type}\" is not a valid ABI type. Perhaps you forgot to include a struct signature?`\n            ]\n          });\n      }\n    }\n  }\n  return components;\n}\n\n// src/human-readable/parseAbi.ts\nfunction parseAbi(signatures) {\n  const structs = parseStructs(signatures);\n  const abi = [];\n  const length = signatures.length;\n  for (let i = 0; i < length; i++) {\n    const signature = signatures[i];\n    if (isStructSignature(signature))\n      continue;\n    abi.push(parseSignature(signature, structs));\n  }\n  return abi;\n}\n\n// src/human-readable/parseAbiItem.ts\nfunction parseAbiItem(signature) {\n  let abiItem;\n  if (typeof signature === \"string\")\n    abiItem = parseSignature(signature);\n  else {\n    const structs = parseStructs(signature);\n    const length = signature.length;\n    for (let i = 0; i < length; i++) {\n      const signature_ = signature[i];\n      if (isStructSignature(signature_))\n        continue;\n      abiItem = parseSignature(signature_, structs);\n      break;\n    }\n  }\n  if (!abiItem)\n    throw new BaseError(\"Failed to parse ABI item.\", {\n      details: `parseAbiItem(${JSON.stringify(signature, null, 2)})`,\n      docsPath: \"/api/human.html#parseabiitem-1\"\n    });\n  return abiItem;\n}\n\n// src/human-readable/parseAbiParameter.ts\nfunction parseAbiParameter2(param) {\n  let abiParameter;\n  if (typeof param === \"string\")\n    abiParameter = parseAbiParameter(param, {\n      modifiers\n    });\n  else {\n    const structs = parseStructs(param);\n    const length = param.length;\n    for (let i = 0; i < length; i++) {\n      const signature = param[i];\n      if (isStructSignature(signature))\n        continue;\n      abiParameter = parseAbiParameter(signature, { modifiers, structs });\n      break;\n    }\n  }\n  if (!abiParameter)\n    throw new BaseError(\"Failed to parse ABI parameter.\", {\n      details: `parseAbiParameter(${JSON.stringify(param, null, 2)})`,\n      docsPath: \"/api/human.html#parseabiparameter-1\"\n    });\n  return abiParameter;\n}\n\n// src/human-readable/parseAbiParameters.ts\nfunction parseAbiParameters(params) {\n  const abiParameters = [];\n  if (typeof params === \"string\") {\n    const parameters = splitParameters(params);\n    const length = parameters.length;\n    for (let i = 0; i < length; i++) {\n      abiParameters.push(parseAbiParameter(parameters[i], { modifiers }));\n    }\n  } else {\n    const structs = parseStructs(params);\n    const length = params.length;\n    for (let i = 0; i < length; i++) {\n      const signature = params[i];\n      if (isStructSignature(signature))\n        continue;\n      const parameters = splitParameters(signature);\n      const length2 = parameters.length;\n      for (let k = 0; k < length2; k++) {\n        abiParameters.push(\n          parseAbiParameter(parameters[k], { modifiers, structs })\n        );\n      }\n    }\n  }\n  if (abiParameters.length === 0)\n    throw new BaseError(\"Failed to parse ABI parameters.\", {\n      details: `parseAbiParameters(${JSON.stringify(params, null, 2)})`,\n      docsPath: \"/api/human.html#parseabiparameters-1\"\n    });\n  return abiParameters;\n}\nexport {\n  BaseError,\n  narrow,\n  parseAbi,\n  parseAbiItem,\n  parseAbiParameter2 as parseAbiParameter,\n  parseAbiParameters\n};\n","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { parseAbiParameter } from 'abitype';\nimport { AbiError } from 'web3-errors';\nimport { isNullish } from 'web3-utils';\nimport { isSimplifiedStructFormat, mapStructNameAndType, mapStructToCoderFormat, } from '../utils.js';\nexport const WORD_SIZE = 32;\nexport function alloc(size = 0) {\n    var _a;\n    if (((_a = globalThis.Buffer) === null || _a === void 0 ? void 0 : _a.alloc) !== undefined) {\n        const buf = globalThis.Buffer.alloc(size);\n        return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);\n    }\n    return new Uint8Array(size);\n}\n/**\n * Where possible returns a Uint8Array of the requested size that references\n * uninitialized memory. Only use if you are certain you will immediately\n * overwrite every value in the returned `Uint8Array`.\n */\nexport function allocUnsafe(size = 0) {\n    var _a;\n    if (((_a = globalThis.Buffer) === null || _a === void 0 ? void 0 : _a.allocUnsafe) !== undefined) {\n        const buf = globalThis.Buffer.allocUnsafe(size);\n        return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);\n    }\n    return new Uint8Array(size);\n}\nexport function convertExternalAbiParameter(abiParam) {\n    var _a, _b;\n    return Object.assign(Object.assign({}, abiParam), { name: (_a = abiParam.name) !== null && _a !== void 0 ? _a : '', components: (_b = abiParam.components) === null || _b === void 0 ? void 0 : _b.map(c => convertExternalAbiParameter(c)) });\n}\nexport function isAbiParameter(param) {\n    return (!isNullish(param) &&\n        typeof param === 'object' &&\n        !isNullish(param.type) &&\n        typeof param.type === 'string');\n}\nexport function toAbiParams(abi) {\n    return abi.map(input => {\n        var _a;\n        if (isAbiParameter(input)) {\n            return input;\n        }\n        if (typeof input === 'string') {\n            return convertExternalAbiParameter(parseAbiParameter(input.replace(/tuple/, '')));\n        }\n        if (isSimplifiedStructFormat(input)) {\n            const structName = Object.keys(input)[0];\n            const structInfo = mapStructNameAndType(structName);\n            structInfo.name = (_a = structInfo.name) !== null && _a !== void 0 ? _a : '';\n            return Object.assign(Object.assign({}, structInfo), { components: mapStructToCoderFormat(input[structName]) });\n        }\n        throw new AbiError('Invalid abi');\n    });\n}\nexport function extractArrayType(param) {\n    const arrayParenthesisStart = param.type.lastIndexOf('[');\n    const arrayParamType = param.type.substring(0, arrayParenthesisStart);\n    const sizeString = param.type.substring(arrayParenthesisStart);\n    let size = -1;\n    if (sizeString !== '[]') {\n        size = Number(sizeString.slice(1, -1));\n        // eslint-disable-next-line no-restricted-globals\n        if (isNaN(size)) {\n            throw new AbiError('Invalid fixed array size', { size: sizeString });\n        }\n    }\n    return {\n        param: { type: arrayParamType, name: '', components: param.components },\n        size,\n    };\n}\n/**\n * Param is dynamic if it's dynamic base type or if some of his children (components, array items)\n * is of dynamic type\n * @param param\n */\nexport function isDynamic(param) {\n    var _a, _b;\n    if (param.type === 'string' || param.type === 'bytes' || param.type.endsWith('[]'))\n        return true;\n    if (param.type === 'tuple') {\n        return (_b = (_a = param.components) === null || _a === void 0 ? void 0 : _a.some(isDynamic)) !== null && _b !== void 0 ? _b : false;\n    }\n    if (param.type.endsWith(']')) {\n        return isDynamic(extractArrayType(param).param);\n    }\n    return false;\n}\n//# sourceMappingURL=utils.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { AbiError } from 'web3-errors';\nimport { toChecksumAddress } from 'web3-utils';\nimport { isAddress, utils } from 'web3-validator';\nimport { alloc, WORD_SIZE } from '../utils.js';\nconst ADDRESS_BYTES_COUNT = 20;\nconst ADDRESS_OFFSET = WORD_SIZE - ADDRESS_BYTES_COUNT;\nexport function encodeAddress(param, input) {\n    if (typeof input !== 'string') {\n        throw new AbiError('address type expects string as input type', {\n            value: input,\n            name: param.name,\n            type: param.type,\n        });\n    }\n    let address = input.toLowerCase();\n    if (!address.startsWith('0x')) {\n        address = `0x${address}`;\n    }\n    if (!isAddress(address)) {\n        throw new AbiError('provided input is not valid address', {\n            value: input,\n            name: param.name,\n            type: param.type,\n        });\n    }\n    // for better performance, we could convert hex to destination bytes directly (encoded var)\n    const addressBytes = utils.hexToUint8Array(address);\n    // expand address to WORD_SIZE\n    const encoded = alloc(WORD_SIZE);\n    encoded.set(addressBytes, ADDRESS_OFFSET);\n    return {\n        dynamic: false,\n        encoded,\n    };\n}\nexport function decodeAddress(_param, bytes) {\n    const addressBytes = bytes.subarray(ADDRESS_OFFSET, WORD_SIZE);\n    if (addressBytes.length !== ADDRESS_BYTES_COUNT) {\n        throw new AbiError('Invalid decoding input, not enough bytes to decode address', { bytes });\n    }\n    const result = utils.uint8ArrayToHexString(addressBytes);\n    // should we check is decoded value is valid address?\n    // if(!isAddress(result)) {\n    //     throw new AbiError(\"encoded data is not valid address\", {\n    //         address: result,\n    //     });\n    // }\n    return {\n        result: toChecksumAddress(result),\n        encoded: bytes.subarray(WORD_SIZE),\n        consumed: WORD_SIZE,\n    };\n}\n//# sourceMappingURL=address.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\n/*\n * this variable contains the precalculated limits for all the numbers for uint and int types\n */\nexport const numberLimits = new Map();\nlet base = BigInt(256); // 2 ^ 8 = 256\nfor (let i = 8; i <= 256; i += 8) {\n    numberLimits.set(`uint${i}`, {\n        min: BigInt(0),\n        max: base - BigInt(1),\n    });\n    numberLimits.set(`int${i}`, {\n        min: -base / BigInt(2),\n        max: base / BigInt(2) - BigInt(1),\n    });\n    base *= BigInt(256);\n}\n// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\nnumberLimits.set(`int`, numberLimits.get('int256'));\n// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\nnumberLimits.set(`uint`, numberLimits.get('uint256'));\n//# sourceMappingURL=numbersLimits.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { AbiError } from 'web3-errors';\nimport { padLeft, toBigInt } from 'web3-utils';\nimport { utils } from 'web3-validator';\nimport { WORD_SIZE } from '../utils.js';\nimport { numberLimits } from './numbersLimits.js';\n// eslint-disable-next-line no-bitwise\nconst mask = BigInt(1) << BigInt(256);\nfunction bigIntToUint8Array(value, byteLength = WORD_SIZE) {\n    let hexValue;\n    if (value < 0) {\n        hexValue = (mask + value).toString(16);\n    }\n    else {\n        hexValue = value.toString(16);\n    }\n    hexValue = padLeft(hexValue, byteLength * 2);\n    return utils.hexToUint8Array(hexValue);\n}\nfunction uint8ArrayToBigInt(value, max) {\n    const hexValue = utils.uint8ArrayToHexString(value);\n    const result = BigInt(hexValue);\n    if (result <= max)\n        return result;\n    return result - mask;\n}\nexport function encodeNumber(param, input) {\n    let value;\n    try {\n        value = toBigInt(input);\n    }\n    catch (e) {\n        throw new AbiError('provided input is not number value', {\n            type: param.type,\n            value: input,\n            name: param.name,\n        });\n    }\n    const limit = numberLimits.get(param.type);\n    if (!limit) {\n        throw new AbiError('provided abi contains invalid number datatype', { type: param.type });\n    }\n    if (value < limit.min) {\n        throw new AbiError('provided input is less then minimum for given type', {\n            type: param.type,\n            value: input,\n            name: param.name,\n            minimum: limit.min.toString(),\n        });\n    }\n    if (value > limit.max) {\n        throw new AbiError('provided input is greater then maximum for given type', {\n            type: param.type,\n            value: input,\n            name: param.name,\n            maximum: limit.max.toString(),\n        });\n    }\n    return {\n        dynamic: false,\n        encoded: bigIntToUint8Array(value),\n    };\n}\nexport function decodeNumber(param, bytes) {\n    if (bytes.length < WORD_SIZE) {\n        throw new AbiError('Not enough bytes left to decode', { param, bytesLeft: bytes.length });\n    }\n    const boolBytes = bytes.subarray(0, WORD_SIZE);\n    const limit = numberLimits.get(param.type);\n    if (!limit) {\n        throw new AbiError('provided abi contains invalid number datatype', { type: param.type });\n    }\n    const numberResult = uint8ArrayToBigInt(boolBytes, limit.max);\n    if (numberResult < limit.min) {\n        throw new AbiError('decoded value is less then minimum for given type', {\n            type: param.type,\n            value: numberResult,\n            name: param.name,\n            minimum: limit.min.toString(),\n        });\n    }\n    if (numberResult > limit.max) {\n        throw new AbiError('decoded value is greater then maximum for given type', {\n            type: param.type,\n            value: numberResult,\n            name: param.name,\n            maximum: limit.max.toString(),\n        });\n    }\n    return {\n        result: numberResult,\n        encoded: bytes.subarray(WORD_SIZE),\n        consumed: WORD_SIZE,\n    };\n}\n//# sourceMappingURL=number.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { AbiError, InvalidBooleanError } from 'web3-errors';\nimport { toBool } from 'web3-utils';\nimport { WORD_SIZE } from '../utils.js';\nimport { decodeNumber, encodeNumber } from './number.js';\nexport function encodeBoolean(param, input) {\n    let value;\n    try {\n        value = toBool(input);\n    }\n    catch (e) {\n        if (e instanceof InvalidBooleanError) {\n            throw new AbiError('provided input is not valid boolean value', {\n                type: param.type,\n                value: input,\n                name: param.name,\n            });\n        }\n    }\n    return encodeNumber({ type: 'uint8', name: '' }, Number(value));\n}\nexport function decodeBool(_param, bytes) {\n    const numberResult = decodeNumber({ type: 'uint8', name: '' }, bytes);\n    if (numberResult.result > 1 || numberResult.result < 0) {\n        throw new AbiError('Invalid boolean value encoded', {\n            boolBytes: bytes.subarray(0, WORD_SIZE),\n            numberResult,\n        });\n    }\n    return {\n        result: numberResult.result === BigInt(1),\n        encoded: numberResult.encoded,\n        consumed: WORD_SIZE,\n    };\n}\n//# sourceMappingURL=bool.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { AbiError } from 'web3-errors';\nimport { bytesToHex, bytesToUint8Array } from 'web3-utils';\nimport { isBytes } from 'web3-validator';\nimport { alloc, WORD_SIZE } from '../utils.js';\nimport { decodeNumber, encodeNumber } from './number.js';\nconst MAX_STATIC_BYTES_COUNT = 32;\nexport function encodeBytes(param, input) {\n    // hack for odd length hex strings\n    if (typeof input === 'string' && input.length % 2 !== 0) {\n        // eslint-disable-next-line no-param-reassign\n        input += '0';\n    }\n    if (!isBytes(input)) {\n        throw new AbiError('provided input is not valid bytes value', {\n            type: param.type,\n            value: input,\n            name: param.name,\n        });\n    }\n    const bytes = bytesToUint8Array(input);\n    const [, size] = param.type.split('bytes');\n    // fixed size\n    if (size) {\n        if (Number(size) > MAX_STATIC_BYTES_COUNT || Number(size) < 1) {\n            throw new AbiError('invalid bytes type. Static byte type can have between 1 and 32 bytes', {\n                type: param.type,\n            });\n        }\n        if (Number(size) < bytes.length) {\n            throw new AbiError('provided input size is different than type size', {\n                type: param.type,\n                value: input,\n                name: param.name,\n            });\n        }\n        const encoded = alloc(WORD_SIZE);\n        encoded.set(bytes);\n        return {\n            dynamic: false,\n            encoded,\n        };\n    }\n    const partsLength = Math.ceil(bytes.length / WORD_SIZE);\n    // one word for length of data + WORD for each part of actual data\n    const encoded = alloc(WORD_SIZE + partsLength * WORD_SIZE);\n    encoded.set(encodeNumber({ type: 'uint32', name: '' }, bytes.length).encoded);\n    encoded.set(bytes, WORD_SIZE);\n    return {\n        dynamic: true,\n        encoded,\n    };\n}\nexport function decodeBytes(param, bytes) {\n    const [, sizeString] = param.type.split('bytes');\n    let size = Number(sizeString);\n    let remainingBytes = bytes;\n    let partsCount = 1;\n    let consumed = 0;\n    if (!size) {\n        // dynamic bytes\n        const result = decodeNumber({ type: 'uint32', name: '' }, remainingBytes);\n        size = Number(result.result);\n        consumed += result.consumed;\n        remainingBytes = result.encoded;\n        partsCount = Math.ceil(size / WORD_SIZE);\n    }\n    if (size > bytes.length) {\n        throw new AbiError('there is not enough data to decode', {\n            type: param.type,\n            encoded: bytes,\n            size,\n        });\n    }\n    return {\n        result: bytesToHex(remainingBytes.subarray(0, size)),\n        encoded: remainingBytes.subarray(partsCount * WORD_SIZE),\n        consumed: consumed + partsCount * WORD_SIZE,\n    };\n}\n//# sourceMappingURL=bytes.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { AbiError } from 'web3-errors';\nimport { hexToUtf8, utf8ToBytes } from 'web3-utils';\nimport { decodeBytes, encodeBytes } from './bytes.js';\nexport function encodeString(_param, input) {\n    if (typeof input !== 'string') {\n        throw new AbiError('invalid input, should be string', { input });\n    }\n    const bytes = utf8ToBytes(input);\n    return encodeBytes({ type: 'bytes', name: '' }, bytes);\n}\nexport function decodeString(_param, bytes) {\n    const r = decodeBytes({ type: 'bytes', name: '' }, bytes);\n    return {\n        result: hexToUtf8(r.result),\n        encoded: r.encoded,\n        consumed: r.consumed,\n    };\n}\n//# sourceMappingURL=string.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { uint8ArrayConcat } from 'web3-utils';\nimport { WORD_SIZE } from '../utils.js';\nimport { encodeNumber } from './number.js';\nexport function encodeDynamicParams(encodedParams) {\n    let staticSize = 0;\n    let dynamicSize = 0;\n    const staticParams = [];\n    const dynamicParams = [];\n    // figure out static size\n    for (const encodedParam of encodedParams) {\n        if (encodedParam.dynamic) {\n            staticSize += WORD_SIZE;\n        }\n        else {\n            staticSize += encodedParam.encoded.length;\n        }\n    }\n    for (const encodedParam of encodedParams) {\n        if (encodedParam.dynamic) {\n            staticParams.push(encodeNumber({ type: 'uint256', name: '' }, staticSize + dynamicSize));\n            dynamicParams.push(encodedParam);\n            dynamicSize += encodedParam.encoded.length;\n        }\n        else {\n            staticParams.push(encodedParam);\n        }\n    }\n    return uint8ArrayConcat(...staticParams.map(p => p.encoded), ...dynamicParams.map(p => p.encoded));\n}\n//# sourceMappingURL=utils.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { AbiError } from 'web3-errors';\nimport { uint8ArrayConcat } from 'web3-utils';\n// eslint-disable-next-line import/no-cycle\nimport { decodeParamFromAbiParameter, encodeNumber, encodeParamFromAbiParameter } from './index.js';\nimport { extractArrayType, isDynamic, WORD_SIZE } from '../utils.js';\nimport { decodeNumber } from './number.js';\nimport { encodeDynamicParams } from './utils.js';\nexport function encodeArray(param, values) {\n    if (!Array.isArray(values)) {\n        throw new AbiError('Expected value to be array', { abi: param, values });\n    }\n    const { size, param: arrayItemParam } = extractArrayType(param);\n    const encodedParams = values.map(v => encodeParamFromAbiParameter(arrayItemParam, v));\n    const dynamic = size === -1;\n    const dynamicItems = encodedParams.length > 0 && encodedParams[0].dynamic;\n    if (!dynamic && values.length !== size) {\n        throw new AbiError(\"Given arguments count doesn't match array length\", {\n            arrayLength: size,\n            argumentsLength: values.length,\n        });\n    }\n    if (dynamic || dynamicItems) {\n        const encodingResult = encodeDynamicParams(encodedParams);\n        if (dynamic) {\n            const encodedLength = encodeNumber({ type: 'uint256', name: '' }, encodedParams.length).encoded;\n            return {\n                dynamic: true,\n                encoded: encodedParams.length > 0\n                    ? uint8ArrayConcat(encodedLength, encodingResult)\n                    : encodedLength,\n            };\n        }\n        return {\n            dynamic: true,\n            encoded: encodingResult,\n        };\n    }\n    return {\n        dynamic: false,\n        encoded: uint8ArrayConcat(...encodedParams.map(p => p.encoded)),\n    };\n}\nexport function decodeArray(param, bytes) {\n    // eslint-disable-next-line prefer-const\n    let { size, param: arrayItemParam } = extractArrayType(param);\n    const dynamic = size === -1;\n    let consumed = 0;\n    const result = [];\n    let remaining = bytes;\n    // dynamic array, we need to decode length\n    if (dynamic) {\n        const lengthResult = decodeNumber({ type: 'uint32', name: '' }, bytes);\n        size = Number(lengthResult.result);\n        consumed = lengthResult.consumed;\n        remaining = lengthResult.encoded;\n    }\n    const hasDynamicChild = isDynamic(arrayItemParam);\n    if (hasDynamicChild) {\n        // known length but dynamic child, each child is actually head element with encoded offset\n        for (let i = 0; i < size; i += 1) {\n            const offsetResult = decodeNumber({ type: 'uint32', name: '' }, remaining.subarray(i * WORD_SIZE));\n            consumed += offsetResult.consumed;\n            const decodedChildResult = decodeParamFromAbiParameter(arrayItemParam, remaining.subarray(Number(offsetResult.result)));\n            consumed += decodedChildResult.consumed;\n            result.push(decodedChildResult.result);\n        }\n        return {\n            result,\n            encoded: remaining.subarray(consumed),\n            consumed,\n        };\n    }\n    for (let i = 0; i < size; i += 1) {\n        // decode static params\n        const decodedChildResult = decodeParamFromAbiParameter(arrayItemParam, bytes.subarray(consumed));\n        consumed += decodedChildResult.consumed;\n        result.push(decodedChildResult.result);\n    }\n    return {\n        result,\n        encoded: bytes.subarray(consumed),\n        consumed,\n    };\n}\n//# sourceMappingURL=array.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { AbiError } from 'web3-errors';\nimport { decodeAddress, encodeAddress } from './address.js';\nimport { decodeBool, encodeBoolean } from './bool.js';\nimport { decodeBytes, encodeBytes } from './bytes.js';\nimport { decodeNumber, encodeNumber } from './number.js';\nimport { decodeString, encodeString } from './string.js';\n// eslint-disable-next-line import/no-cycle\nimport { decodeTuple, encodeTuple } from './tuple.js';\n// eslint-disable-next-line import/no-cycle\nimport { decodeArray, encodeArray } from './array.js';\nexport { encodeAddress, decodeAddress } from './address.js';\nexport { encodeBoolean, decodeBool } from './bool.js';\nexport { encodeBytes, decodeBytes } from './bytes.js';\nexport { encodeNumber, decodeNumber } from './number.js';\nexport { encodeString, decodeString } from './string.js';\n// eslint-disable-next-line import/no-cycle\nexport { encodeTuple, decodeTuple } from './tuple.js';\n// eslint-disable-next-line import/no-cycle\nexport { encodeArray, decodeArray } from './array.js';\nexport function encodeParamFromAbiParameter(param, value) {\n    if (param.type === 'string') {\n        return encodeString(param, value);\n    }\n    if (param.type === 'bool') {\n        return encodeBoolean(param, value);\n    }\n    if (param.type === 'address') {\n        return encodeAddress(param, value);\n    }\n    if (param.type === 'tuple') {\n        return encodeTuple(param, value);\n    }\n    if (param.type.endsWith(']')) {\n        return encodeArray(param, value);\n    }\n    if (param.type.startsWith('bytes')) {\n        return encodeBytes(param, value);\n    }\n    if (param.type.startsWith('uint') || param.type.startsWith('int')) {\n        return encodeNumber(param, value);\n    }\n    throw new AbiError('Unsupported', {\n        param,\n        value,\n    });\n}\nexport function decodeParamFromAbiParameter(param, bytes) {\n    if (param.type === 'string') {\n        return decodeString(param, bytes);\n    }\n    if (param.type === 'bool') {\n        return decodeBool(param, bytes);\n    }\n    if (param.type === 'address') {\n        return decodeAddress(param, bytes);\n    }\n    if (param.type === 'tuple') {\n        return decodeTuple(param, bytes);\n    }\n    if (param.type.endsWith(']')) {\n        return decodeArray(param, bytes);\n    }\n    if (param.type.startsWith('bytes')) {\n        return decodeBytes(param, bytes);\n    }\n    if (param.type.startsWith('uint') || param.type.startsWith('int')) {\n        return decodeNumber(param, bytes);\n    }\n    throw new AbiError('Unsupported', {\n        param,\n        bytes,\n    });\n}\n//# sourceMappingURL=index.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { AbiError } from 'web3-errors';\nimport { uint8ArrayConcat } from 'web3-utils';\n// eslint-disable-next-line import/no-cycle\nimport { decodeParamFromAbiParameter, encodeParamFromAbiParameter } from './index.js';\nimport { encodeDynamicParams } from './utils.js';\nimport { isDynamic } from '../utils.js';\nimport { decodeNumber } from './number.js';\nexport function encodeTuple(param, input) {\n    var _a, _b, _c;\n    let dynamic = false;\n    if (!Array.isArray(input) && typeof input !== 'object') {\n        throw new AbiError('param must be either Array or Object', {\n            param,\n            input,\n        });\n    }\n    const narrowedInput = input;\n    const encoded = [];\n    for (let i = 0; i < ((_b = (_a = param.components) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0); i += 1) {\n        // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n        const paramComponent = param.components[i];\n        let result;\n        if (Array.isArray(narrowedInput)) {\n            if (i >= narrowedInput.length) {\n                throw new AbiError('input param length missmatch', {\n                    param,\n                    input,\n                });\n            }\n            result = encodeParamFromAbiParameter(paramComponent, narrowedInput[i]);\n        }\n        else {\n            const paramInput = narrowedInput[(_c = paramComponent.name) !== null && _c !== void 0 ? _c : ''];\n            // eslint-disable-next-line no-null/no-null\n            if (paramInput === undefined || paramInput === null) {\n                throw new AbiError('missing input defined in abi', {\n                    param,\n                    input,\n                    paramName: paramComponent.name,\n                });\n            }\n            result = encodeParamFromAbiParameter(paramComponent, paramInput);\n        }\n        if (result.dynamic) {\n            dynamic = true;\n        }\n        encoded.push(result);\n    }\n    if (dynamic) {\n        return {\n            dynamic: true,\n            encoded: encodeDynamicParams(encoded),\n        };\n    }\n    return {\n        dynamic: false,\n        encoded: uint8ArrayConcat(...encoded.map(e => e.encoded)),\n    };\n}\nexport function decodeTuple(param, bytes) {\n    const result = {\n        __length__: 0,\n    };\n    // tracks how much static params consumed bytes\n    let consumed = 0;\n    if (!param.components) {\n        return {\n            result,\n            encoded: bytes,\n            consumed,\n        };\n    }\n    // track how much dynamic params consumed bytes\n    let dynamicConsumed = 0;\n    for (const [index, childParam] of param.components.entries()) {\n        let decodedResult;\n        if (isDynamic(childParam)) {\n            // if dynamic, we will have offset encoded\n            const offsetResult = decodeNumber({ type: 'uint32', name: '' }, bytes.subarray(consumed));\n            // offset counts from start of original byte sequence\n            decodedResult = decodeParamFromAbiParameter(childParam, bytes.subarray(Number(offsetResult.result)));\n            consumed += offsetResult.consumed;\n            dynamicConsumed += decodedResult.consumed;\n        }\n        else {\n            // static param, just decode\n            decodedResult = decodeParamFromAbiParameter(childParam, bytes.subarray(consumed));\n            consumed += decodedResult.consumed;\n        }\n        result.__length__ += 1;\n        result[index] = decodedResult.result;\n        if (childParam.name && childParam.name !== '') {\n            result[childParam.name] = decodedResult.result;\n        }\n    }\n    return {\n        encoded: bytes.subarray(consumed + dynamicConsumed),\n        result,\n        consumed: consumed + dynamicConsumed,\n    };\n}\n//# sourceMappingURL=tuple.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { utils } from 'web3-validator';\nimport { decodeTuple } from './base/tuple.js';\nimport { toAbiParams } from './utils.js';\nexport function decodeParameters(abis, bytes, _loose) {\n    const abiParams = toAbiParams(abis);\n    const bytesArray = utils.hexToUint8Array(bytes);\n    return decodeTuple({ type: 'tuple', name: '', components: abiParams }, bytesArray).result;\n}\n//# sourceMappingURL=decode.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { AbiError } from 'web3-errors';\nimport { toHex } from 'web3-utils';\nimport { utils } from 'web3-validator';\nimport { encodeTuple } from './base/index.js';\nimport { toAbiParams } from './utils.js';\n/**\n * @param params - The params to infer the ABI from\n * @returns The inferred ABI\n * @example\n * ```\n * inferParamsAbi([1, -1, 'hello', '0x1234', ])\n * ```\n * > [{ type: 'int256' }, { type: 'uint256' }, { type: 'string' }, { type: 'bytes' }]\n * ```\n */\nfunction inferParamsAbi(params) {\n    const abi = [];\n    params.forEach(param => {\n        if (Array.isArray(param)) {\n            const inferredParams = inferParamsAbi(param);\n            abi.push({\n                type: 'tuple',\n                components: inferredParams,\n                name: '',\n                // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n            });\n        }\n        else {\n            // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n            abi.push({ type: toHex(param, true) });\n        }\n    });\n    return abi;\n}\n/**\n * Encodes a parameter based on its type to its ABI representation.\n * @param abi - An array of {@link AbiInput}. See [Solidity's documentation](https://solidity.readthedocs.io/en/v0.5.3/abi-spec.html#json) for more details.\n * @param params - The actual parameters to encode.\n * @returns - The ABI encoded parameters\n * @example\n * ```ts\n * const res = web3.eth.abi.encodeParameters(\n *    [\"uint256\", \"string\"],\n *    [\"2345675643\", \"Hello!%\"]\n *  );\n *\n *  console.log(res);\n *  > 0x000000000000000000000000000000000000000000000000000000008bd02b7b0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000748656c6c6f212500000000000000000000000000000000000000000000000000\n * ```\n */\nexport function encodeParameters(abi, params) {\n    if ((abi === null || abi === void 0 ? void 0 : abi.length) !== params.length) {\n        throw new AbiError('Invalid number of values received for given ABI', {\n            expected: abi === null || abi === void 0 ? void 0 : abi.length,\n            received: params.length,\n        });\n    }\n    const abiParams = toAbiParams(abi);\n    return utils.uint8ArrayToHexString(encodeTuple({ type: 'tuple', name: '', components: abiParams }, params).encoded);\n}\n/**\n * Infer a smart contract method parameter type and then encode this parameter.\n * @param params - The parameters to encode.\n * @returns - The ABI encoded parameters\n *\n * @remarks\n * This method is useful when you don't know the type of the parameters you want to encode. It will infer the type of the parameters and then encode them.\n * However, it is not recommended to use this method when you know the type of the parameters you want to encode. In this case, use the {@link encodeParameters} method instead.\n * The type inference is not perfect and can lead to unexpected results. Especially when you want to encode an array, uint that is not uint256 or bytes....\n * @example\n * ```ts\n * const res = web3.eth.abi.encodeParameters(\n *    [\"2345675643\", \"Hello!%\"]\n *  );\n *\n *  console.log(res);\n *  > 0x000000000000000000000000000000000000000000000000000000008bd02b7b0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000748656c6c6f212500000000000000000000000000000000000000000000000000\n * ```\n */\nexport function inferTypesAndEncodeParameters(params) {\n    try {\n        const abiParams = inferParamsAbi(params);\n        return utils.uint8ArrayToHexString(encodeTuple({ type: 'tuple', name: '', components: abiParams }, params).encoded);\n    }\n    catch (e) {\n        // throws If the inferred params type caused an error\n        throw new AbiError('Could not infer types from given params', {\n            params,\n        });\n    }\n}\n//# sourceMappingURL=encode.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\n/**\n *\n *  @module ABI\n */\nimport { AbiError } from 'web3-errors';\nimport { decodeParameters as decodeParametersInternal } from '../coders/decode.js';\nimport { encodeParameters } from '../coders/encode.js';\nexport { encodeParameters, inferTypesAndEncodeParameters } from '../coders/encode.js';\n/**\n * Encodes a parameter based on its type to its ABI representation.\n * @param abi -  The type of the parameter. See the [Solidity documentation](https://docs.soliditylang.org/en/develop/types.html) for a list of types.\n * @param param - The actual parameter to encode.\n * @returns -  The ABI encoded parameter\n * @example\n * ```ts\n *  const res = web3.eth.abi.encodeParameter(\"uint256\", \"2345675643\");\n *  console.log(res);\n *  0x000000000000000000000000000000000000000000000000000000008bd02b7b\n *\n *  const res = web3.eth.abi.encodeParameter(\"uint\", \"2345675643\");\n *\n *  console.log(res);\n *  >0x000000000000000000000000000000000000000000000000000000008bd02b7b\n *\n *    const res = web3.eth.abi.encodeParameter(\"bytes32\", \"0xdf3234\");\n *\n *  console.log(res);\n *  >0xdf32340000000000000000000000000000000000000000000000000000000000\n *\n *   const res = web3.eth.abi.encodeParameter(\"bytes\", \"0xdf3234\");\n *\n *  console.log(res);\n *  > 0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000003df32340000000000000000000000000000000000000000000000000000000000\n *\n *   const res = web3.eth.abi.encodeParameter(\"bytes32[]\", [\"0xdf3234\", \"0xfdfd\"]);\n *\n *  console.log(res);\n *  > 0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002df32340000000000000000000000000000000000000000000000000000000000fdfd000000000000000000000000000000000000000000000000000000000000\n *\n *  const res = web3.eth.abi.encodeParameter(\n *    {\n *      ParentStruct: {\n *        propertyOne: \"uint256\",\n *        propertyTwo: \"uint256\",\n *        childStruct: {\n *          propertyOne: \"uint256\",\n *          propertyTwo: \"uint256\",\n *        },\n *      },\n *    },\n *    {\n *      propertyOne: 42,\n *      propertyTwo: 56,\n *      childStruct: {\n *        propertyOne: 45,\n *        propertyTwo: 78,\n *      },\n *    }\n *  );\n *\n *  console.log(res);\n *  > 0x000000000000000000000000000000000000000000000000000000000000002a0000000000000000000000000000000000000000000000000000000000000038000000000000000000000000000000000000000000000000000000000000002d000000000000000000000000000000000000000000000000000000000000004e\n * ```\n */\nexport const encodeParameter = (abi, param) => encodeParameters([abi], [param]);\n/**\n * Should be used to decode list of params\n */\nexport const decodeParametersWith = (abis, bytes, loose) => {\n    try {\n        if (abis.length > 0 && (!bytes || bytes === '0x' || bytes === '0X')) {\n            throw new AbiError(\"Returned values aren't valid, did it run Out of Gas? \" +\n                'You might also see this error if you are not using the ' +\n                'correct ABI for the contract you are retrieving data from, ' +\n                'requesting data from a block number that does not exist, ' +\n                'or querying a node which is not fully synced.');\n        }\n        return decodeParametersInternal(abis, `0x${bytes.replace(/0x/i, '')}`, loose);\n    }\n    catch (err) {\n        throw new AbiError(`Parameter decoding error: ${err.message}`, {\n            internalErr: err,\n        });\n    }\n};\n/**\n * Should be used to decode list of params\n */\n/**\n * Decodes ABI encoded parameters to its JavaScript types.\n * @param abi -  An array of {@link AbiInput}. See the [Solidity documentation](https://docs.soliditylang.org/en/develop/types.html) for a list of types.\n * @param bytes - The ABI byte code to decode\n * @returns - The result object containing the decoded parameters.\n * @example\n * ```ts\n * let res = web3.eth.abi.decodeParameters(\n *    [\"string\", \"uint256\"],\n *    \"0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000ea000000000000000000000000000000000000000000000000000000000000000848656c6c6f212521000000000000000000000000000000000000000000000000\"\n *  );\n *  console.log(res);\n *  > { '0': 'Hello!%!', '1': 234n, __length__: 2 }\n *\n * let res = web3.eth.abi.decodeParameters(\n *    [\n *      {\n *        type: \"string\",\n *        name: \"myString\",\n *      },\n *      {\n *        type: \"uint256\",\n *        name: \"myNumber\",\n *      },\n *    ],\n *    \"0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000ea000000000000000000000000000000000000000000000000000000000000000848656c6c6f212521000000000000000000000000000000000000000000000000\"\n *  );\n * console.log(res);\n *  > {\n *  '0': 'Hello!%!',\n *  '1': 234n,\n *  __length__: 2,\n *  myString: 'Hello!%!',\n *  myNumber: 234n\n * }\n *\n * const res = web3.eth.abi.decodeParameters(\n *    [\n *      \"uint8[]\",\n *      {\n *        ParentStruct: {\n *          propertyOne: \"uint256\",\n *          propertyTwo: \"uint256\",\n *          childStruct: {\n *            propertyOne: \"uint256\",\n *            propertyTwo: \"uint256\",\n *          },\n *        },\n *      },\n *    ],\n *    \"0x00000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000002a0000000000000000000000000000000000000000000000000000000000000038000000000000000000000000000000000000000000000000000000000000002d000000000000000000000000000000000000000000000000000000000000004e0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000002a0000000000000000000000000000000000000000000000000000000000000018\"\n *  );\n *  console.log(res);\n *  >\n *  '0': [ 42n, 24n ],\n *  '1': {\n *    '0': 42n,\n *    '1': 56n,\n *    '2': {\n *      '0': 45n,\n *      '1': 78n,\n *      __length__: 2,\n *      propertyOne: 45n,\n *      propertyTwo: 78n\n *    },\n *    __length__: 3,\n *    propertyOne: 42n,\n *    propertyTwo: 56n,\n *    childStruct: {\n *      '0': 45n,\n *      '1': 78n,\n *      __length__: 2,\n *      propertyOne: 45n,\n *      propertyTwo: 78n\n *    }\n *  },\n *  __length__: 2,\n *  ParentStruct: {\n *    '0': 42n,\n *    '1': 56n,\n *    '2': {\n *      '0': 45n,\n *      '1': 78n,\n *      __length__: 2,\n *      propertyOne: 45n,\n *      propertyTwo: 78n\n *    },\n *    __length__: 3,\n *    propertyOne: 42n,\n *    propertyTwo: 56n,\n *    childStruct: {\n *      '0': 45n,\n *      '1': 78n,\n *      __length__: 2,\n *      propertyOne: 45n,\n *      propertyTwo: 78n\n *    }\n *  }\n *}\n * ```\n */\nexport const decodeParameters = (abi, bytes) => decodeParametersWith(abi, bytes, false);\n/**\n * Should be used to decode bytes to plain param\n */\n/**\n * Decodes an ABI encoded parameter to its JavaScript type.\n * @param abi -  The type of the parameter. See the [Solidity documentation](https://docs.soliditylang.org/en/develop/types.html) for a list of types.\n * @param bytes - The ABI byte code to decode\n * @returns - The decoded parameter\n * @example\n * ```ts\n *   const res = web3.eth.abi.decodeParameter(\n *    \"uint256\",\n *    \"0x0000000000000000000000000000000000000000000000000000000000000010\"\n *  );\n *  console.log(res);\n * > 16n\n *\n *  const res = web3.eth.abi.decodeParameter(\n *    \"string\",\n *    \"0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000848656c6c6f212521000000000000000000000000000000000000000000000000\"\n *  );\n *\n *  console.log(res);\n *  > Hello!%!\n *\n *  const res = web3.eth.abi.decodeParameter(\n *    {\n *      ParentStruct: {\n *        propertyOne: \"uint256\",\n *        propertyTwo: \"uint256\",\n *        childStruct: {\n *          propertyOne: \"uint256\",\n *          propertyTwo: \"uint256\",\n *        },\n *      },\n *    },\n *    \"0x000000000000000000000000000000000000000000000000000000000000002a0000000000000000000000000000000000000000000000000000000000000038000000000000000000000000000000000000000000000000000000000000002d000000000000000000000000000000000000000000000000000000000000004e\"\n *  );\n *\n *  console.log(res);\n *   {\n *  '0': 42n,\n *  '1': 56n,\n *  '2': {\n *    '0': 45n,\n *    '1': 78n,\n *    __length__: 2,\n *    propertyOne: 45n,\n *    propertyTwo: 78n\n *  },\n *  __length__: 3,\n *  propertyOne: 42n,\n *  propertyTwo: 56n,\n *  childStruct: {\n *    '0': 45n,\n *    '1': 78n,\n *    __length__: 2,\n *    propertyOne: 45n,\n *    propertyTwo: 78n\n *  }\n *}\n * ```\n */\nexport const decodeParameter = (abi, bytes) => decodeParameters([abi], bytes)['0'];\n//# sourceMappingURL=parameters_api.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\n/**\n *\n *  @module ABI\n */\nimport { AbiError, Web3ContractError } from 'web3-errors';\nimport { sha3Raw } from 'web3-utils';\nimport { isAbiFunctionFragment, jsonInterfaceMethodToString } from '../utils.js';\nimport { decodeParameters, encodeParameters } from './parameters_api.js';\n/**\n * Encodes the function name to its ABI representation, which are the first 4 bytes of the sha3 of the function name including  types.\n * The JSON interface spec documentation https://docs.soliditylang.org/en/latest/abi-spec.html#json\n * @param functionName - The function name to encode or the `JSON interface` object of the function.\n * If the passed parameter is a string, it has to be in the form of `functionName(param1Type,param2Type,...)`. eg: myFunction(uint256,uint32[],bytes10,bytes)\n * @returns - The ABI signature of the function.\n * @example\n * ```ts\n * const signature = web3.eth.abi.encodeFunctionSignature({\n *   name: \"myMethod\",\n *   type: \"function\",\n *   inputs: [\n *     {\n *       type: \"uint256\",\n *       name: \"myNumber\",\n *     },\n *     {\n *       type: \"string\",\n *       name: \"myString\",\n *     },\n *   ],\n * });\n * console.log(signature);\n * > 0x24ee0097\n *\n * const signature = web3.eth.abi.encodeFunctionSignature('myMethod(uint256,string)')\n * console.log(signature);\n * > 0x24ee0097\n *\n * const signature = web3.eth.abi.encodeFunctionSignature('safeTransferFrom(address,address,uint256,bytes)');\n * console.log(signature);\n * > 0xb88d4fde\n * ```\n */\nexport const encodeFunctionSignature = (functionName) => {\n    if (typeof functionName !== 'string' && !isAbiFunctionFragment(functionName)) {\n        throw new AbiError('Invalid parameter value in encodeFunctionSignature');\n    }\n    let name;\n    if (functionName && (typeof functionName === 'function' || typeof functionName === 'object')) {\n        name = jsonInterfaceMethodToString(functionName);\n    }\n    else {\n        name = functionName;\n    }\n    return sha3Raw(name).slice(0, 10);\n};\n/**\n * Encodes a function call using its `JSON interface` object and given parameters.\n * The JSON interface spec documentation https://docs.soliditylang.org/en/latest/abi-spec.html#json\n * @param jsonInterface - The `JSON interface` object of the function.\n * @param params - The parameters to encode\n * @returns - The ABI encoded function call, which, means the function signature and the parameters passed.\n * @example\n * ```ts\n * const sig = web3.eth.abi.encodeFunctionCall(\n *   {\n *     name: \"myMethod\",\n *     type: \"function\",\n *     inputs: [\n *       {\n *         type: \"uint256\",\n *         name: \"myNumber\",\n *       },\n *       {\n *         type: \"string\",\n *         name: \"myString\",\n *       },\n *     ],\n *   },\n *   [\"2345675643\", \"Hello!%\"]\n * );\n * console.log(sig);\n * > 0x24ee0097000000000000000000000000000000000000000000000000000000008bd02b7b0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000748656c6c6f212500000000000000000000000000000000000000000000000000\n *\n *\n *\n * const sig = web3.eth.abi.encodeFunctionCall(\n *   {\n *     inputs: [\n *       {\n *         name: \"account\",\n *         type: \"address\",\n *       },\n *     ],\n *     name: \"balanceOf\",\n *     outputs: [\n *       {\n *         name: \"\",\n *         type: \"uint256\",\n *       },\n *     ],\n *     stateMutability: \"view\",\n *     type: \"function\",\n *   },\n *   [\"0x1234567890123456789012345678901234567890\"]\n * );\n *\n * console.log(sig);\n * > 0x70a082310000000000000000000000001234567890123456789012345678901234567890\n * ```\n */\nexport const encodeFunctionCall = (jsonInterface, params) => {\n    var _a;\n    if (!isAbiFunctionFragment(jsonInterface)) {\n        throw new AbiError('Invalid parameter value in encodeFunctionCall');\n    }\n    return `${encodeFunctionSignature(jsonInterface)}${encodeParameters((_a = jsonInterface.inputs) !== null && _a !== void 0 ? _a : [], params !== null && params !== void 0 ? params : []).replace('0x', '')}`;\n};\n/**\n * Decodes a function call data using its `JSON interface` object.\n * The JSON interface spec documentation https://docs.soliditylang.org/en/latest/abi-spec.html#json\n * @param functionsAbi - The `JSON interface` object of the function.\n * @param data - The data to decode\n * @param methodSignatureProvided - (Optional) if `false` do not remove the first 4 bytes that would rather contain the function signature.\n * @returns - The data decoded according to the passed ABI.\n * @example\n * ```ts\n * const data =\n * \t'0xa413686200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000548656c6c6f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010416e6f74686572204772656574696e6700000000000000000000000000000000';\n * const params = decodeFunctionCall(\n * \t{\n * \t\tinputs: [\n * \t\t\t{ internalType: 'string', name: '_greeting', type: 'string' },\n * \t\t\t{ internalType: 'string', name: '_second_greeting', type: 'string' },\n * \t\t],\n * \t\tname: 'setGreeting',\n * \t\toutputs: [\n * \t\t\t{ internalType: 'bool', name: '', type: 'bool' },\n * \t\t\t{ internalType: 'string', name: '', type: 'string' },\n * \t\t],\n * \t\tstateMutability: 'nonpayable',\n * \t\ttype: 'function',\n * \t},\n * \tdata,\n * );\n\n * console.log(params);\n * > {\n * > \t'0': 'Hello',\n * > \t'1': 'Another Greeting',\n * > \t__length__: 2,\n * > \t__method__: 'setGreeting(string,string)',\n * > \t_greeting: 'Hello',\n * > \t_second_greeting: 'Another Greeting',\n * > }\n * ```\n */\nexport const decodeFunctionCall = (functionsAbi, data, methodSignatureProvided = true) => {\n    const value = methodSignatureProvided && data && data.length >= 10 && data.startsWith('0x')\n        ? data.slice(10)\n        : data;\n    if (!functionsAbi.inputs) {\n        throw new Web3ContractError('No inputs found in the ABI');\n    }\n    const result = decodeParameters([...functionsAbi.inputs], value);\n    return Object.assign(Object.assign({}, result), { __method__: jsonInterfaceMethodToString(functionsAbi) });\n};\n/**\n * Decodes a function call data using its `JSON interface` object.\n * The JSON interface spec documentation https://docs.soliditylang.org/en/latest/abi-spec.html#json\n * @returns - The ABI encoded function call, which, means the function signature and the parameters passed.\n * @param functionsAbi - The `JSON interface` object of the function.\n * @param returnValues - The data (the function-returned-values) to decoded\n * @returns - The function-returned-values decoded according to the passed ABI. If there are multiple values, it returns them as an object as the example below. But if it is a single value, it returns it only for simplicity.\n * @example\n * ```ts\n * // decode a multi-value data of a method\n * const data =\n * \t'0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000548656c6c6f000000000000000000000000000000000000000000000000000000';\n * const decodedResult = decodeFunctionReturn(\n * \t{\n * \t\tinputs: [\n * \t\t\t{ internalType: 'string', name: '_greeting', type: 'string' }\n * \t\t],\n * \t\tname: 'setGreeting',\n * \t\toutputs: [\n * \t\t\t{ internalType: 'string', name: '', type: 'string' },\n * \t\t\t{ internalType: 'bool', name: '', type: 'bool' },\n * \t\t],\n * \t\tstateMutability: 'nonpayable',\n * \t\ttype: 'function',\n * \t},\n * \tdata,\n * );\n\n * console.log(decodedResult);\n * > { '0': 'Hello', '1': true, __length__: 2 }\n *\n *\n * // decode a single-value data of a method\n * const data =\n * \t'0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000548656c6c6f000000000000000000000000000000000000000000000000000000';\n * const decodedResult = decodeFunctionReturn(\n * \t{\n * \t\tinputs: [\n * \t\t\t{ internalType: 'string', name: '_greeting', type: 'string' }\n * \t\t],\n * \t\tname: 'setGreeting',\n * \t\toutputs: [{ internalType: 'string', name: '', type: 'string' }],\n * \t\tstateMutability: 'nonpayable',\n * \t\ttype: 'function',\n * \t},\n * \tdata,\n * );\n\n * console.log(decodedResult);\n * > 'Hello'\n * ```\n */\nexport const decodeFunctionReturn = (functionsAbi, returnValues) => {\n    // If it is a constructor there is nothing to decode!\n    if (functionsAbi.type === 'constructor') {\n        return returnValues;\n    }\n    if (!returnValues) {\n        // Using \"null\" value intentionally to match legacy behavior\n        // eslint-disable-next-line no-null/no-null\n        return null;\n    }\n    const value = returnValues.length >= 2 ? returnValues.slice(2) : returnValues;\n    if (!functionsAbi.outputs) {\n        // eslint-disable-next-line no-null/no-null\n        return null;\n    }\n    const result = decodeParameters([...functionsAbi.outputs], value);\n    if (result.__length__ === 1) {\n        return result[0];\n    }\n    return result;\n};\n//# sourceMappingURL=functions_api.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { decodeParameter, decodeParametersWith } from './parameters_api.js';\nconst STATIC_TYPES = ['bool', 'string', 'int', 'uint', 'address', 'fixed', 'ufixed'];\nconst _decodeParameter = (inputType, clonedTopic) => inputType === 'string' ? clonedTopic : decodeParameter(inputType, clonedTopic);\n/**\n * Decodes ABI-encoded log data and indexed topic data.\n * @param inputs - A {@link AbiParameter} input array. See the [Solidity documentation](https://docs.soliditylang.org/en/develop/types.html) for a list of types.\n * @param data - The ABI byte code in the `data` field of a log.\n * @param topics - An array with the index parameter topics of the log, without the topic[0] if its a non-anonymous event, otherwise with topic[0]\n * @returns - The result object containing the decoded parameters.\n *\n * @example\n * ```ts\n * let res = web3.eth.abi.decodeLog(\n *    [\n *      {\n *        type: \"string\",\n *        name: \"myString\",\n *      },\n *      {\n *        type: \"uint256\",\n *        name: \"myNumber\",\n *        indexed: true,\n *      },\n *      {\n *        type: \"uint8\",\n *        name: \"mySmallNumber\",\n *        indexed: true,\n *      },\n *    ],\n *    \"0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000748656c6c6f252100000000000000000000000000000000000000000000000000\",\n *    [\n *      \"0x000000000000000000000000000000000000000000000000000000000000f310\",\n *      \"0x0000000000000000000000000000000000000000000000000000000000000010\",\n *    ]\n *  );\n * > {\n *  '0': 'Hello%!',\n *  '1': 62224n,\n *  '2': 16n,\n *  __length__: 3,\n *  myString: 'Hello%!',\n *  myNumber: 62224n,\n *  mySmallNumber: 16n\n * }\n * ```\n */\nexport const decodeLog = (inputs, data, topics) => {\n    const clonedTopics = Array.isArray(topics) ? topics : [topics];\n    const indexedInputs = {};\n    const nonIndexedInputs = {};\n    for (const [i, input] of inputs.entries()) {\n        if (input.indexed) {\n            indexedInputs[i] = input;\n        }\n        else {\n            nonIndexedInputs[i] = input;\n        }\n    }\n    const decodedNonIndexedInputs = data\n        ? decodeParametersWith(Object.values(nonIndexedInputs), data, true)\n        : { __length__: 0 };\n    // If topics are more than indexed inputs, that means first topic is the event signature\n    const offset = clonedTopics.length - Object.keys(indexedInputs).length;\n    const decodedIndexedInputs = Object.values(indexedInputs).map((input, index) => STATIC_TYPES.some(s => input.type.startsWith(s))\n        ? _decodeParameter(input.type, clonedTopics[index + offset])\n        : clonedTopics[index + offset]);\n    const returnValues = { __length__: 0 };\n    let indexedCounter = 0;\n    let nonIndexedCounter = 0;\n    for (const [i, res] of inputs.entries()) {\n        returnValues[i] = res.type === 'string' ? '' : undefined;\n        if (indexedInputs[i]) {\n            returnValues[i] = decodedIndexedInputs[indexedCounter];\n            indexedCounter += 1;\n        }\n        if (nonIndexedInputs[i]) {\n            returnValues[i] = decodedNonIndexedInputs[String(nonIndexedCounter)];\n            nonIndexedCounter += 1;\n        }\n        if (res.name) {\n            returnValues[res.name] = returnValues[i];\n        }\n        returnValues.__length__ += 1;\n    }\n    return returnValues;\n};\n//# sourceMappingURL=logs_api.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { encodeErrorSignature } from './api/errors_api.js';\nimport { decodeParameters } from './api/parameters_api.js';\nimport { jsonInterfaceMethodToString } from './utils.js';\nexport const decodeContractErrorData = (errorsAbi, error) => {\n    if (error === null || error === void 0 ? void 0 : error.data) {\n        let errorName;\n        let errorSignature;\n        let errorArgs;\n        try {\n            const errorSha = error.data.slice(0, 10);\n            const errorAbi = errorsAbi.find(abi => encodeErrorSignature(abi).startsWith(errorSha));\n            if (errorAbi === null || errorAbi === void 0 ? void 0 : errorAbi.inputs) {\n                errorName = errorAbi.name;\n                errorSignature = jsonInterfaceMethodToString(errorAbi);\n                // decode abi.inputs according to EIP-838\n                errorArgs = decodeParameters([...errorAbi.inputs], error.data.substring(10));\n            }\n            else if (error.data.startsWith('0x08c379a0')) {\n                // If ABI was not provided, check for the 2 famous errors: 'Error(string)' or 'Panic(uint256)'\n                errorName = 'Error';\n                errorSignature = 'Error(string)';\n                // decode abi.inputs according to EIP-838\n                errorArgs = decodeParameters([\n                    {\n                        name: 'message',\n                        type: 'string',\n                    },\n                ], error.data.substring(10));\n            }\n            else if (error.data.startsWith('0x4e487b71')) {\n                errorName = 'Panic';\n                errorSignature = 'Panic(uint256)';\n                // decode abi.inputs according to EIP-838\n                errorArgs = decodeParameters([\n                    {\n                        name: 'code',\n                        type: 'uint256',\n                    },\n                ], error.data.substring(10));\n            }\n            else {\n                console.error('No matching error abi found for error data', error.data);\n            }\n        }\n        catch (err) {\n            console.error(err);\n        }\n        if (errorName) {\n            error.setDecodedProperties(errorName, errorSignature, errorArgs);\n        }\n    }\n};\n//# sourceMappingURL=decode_contract_error_data.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\nimport { ContractExecutionError, Eip838ExecutionError, InvalidResponseError, } from 'web3-errors';\nimport { decodeContractErrorData, isAbiErrorFragment } from 'web3-eth-abi';\n// eslint-disable-next-line import/no-cycle\nimport { call } from '../rpc_method_wrappers.js';\nexport const parseTransactionError = (error, contractAbi) => {\n    var _a, _b, _c, _d, _e;\n    if (error instanceof ContractExecutionError && error.cause instanceof Eip838ExecutionError) {\n        if (contractAbi !== undefined) {\n            const errorsAbi = contractAbi.filter(abi => isAbiErrorFragment(abi));\n            decodeContractErrorData(errorsAbi, error.cause);\n            return {\n                reason: error.cause.message,\n                signature: (_a = error.cause.data) === null || _a === void 0 ? void 0 : _a.slice(0, 10),\n                data: (_b = error.cause.data) === null || _b === void 0 ? void 0 : _b.substring(10),\n                customErrorName: error.cause.errorName,\n                customErrorDecodedSignature: error.cause.errorSignature,\n                customErrorArguments: error.cause.errorArgs,\n            };\n        }\n        return {\n            reason: error.cause.message,\n            signature: (_c = error.cause.data) === null || _c === void 0 ? void 0 : _c.slice(0, 10),\n            data: (_d = error.cause.data) === null || _d === void 0 ? void 0 : _d.substring(10),\n        };\n    }\n    if (error instanceof InvalidResponseError &&\n        !Array.isArray((_e = error.cause) === null || _e === void 0 ? void 0 : _e.errors) &&\n        error.cause !== undefined) {\n        return error.cause.message;\n    }\n    throw error;\n};\n/**\n *\tReturns the revert reason generated by the EVM if the transaction were to be executed.\n *\n * @param web3Context - ({@link Web3Context}) Web3 configuration object that contains things such as the provider, request manager, wallet, etc.\n * @param transaction - A transaction object where all properties are optional except `to`, however it's recommended to include the `from` property or it may default to `0x0000000000000000000000000000000000000000` depending on your node or provider.\n * @returns `undefined` if no revert reason was given, a revert reason object, a revert reason string, or an `unknown` error\n */\nexport function getRevertReason(web3Context_1, transaction_1, contractAbi_1) {\n    return __awaiter(this, arguments, void 0, function* (web3Context, transaction, contractAbi, returnFormat = web3Context.defaultReturnFormat) {\n        try {\n            yield call(web3Context, transaction, web3Context.defaultBlock, returnFormat);\n            return undefined;\n        }\n        catch (error) {\n            return parseTransactionError(error, contractAbi);\n        }\n    });\n}\n//# sourceMappingURL=get_revert_reason.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\nimport { TransactionRevertedWithoutReasonError, TransactionRevertInstructionError, TransactionRevertWithCustomError, } from 'web3-errors';\n// eslint-disable-next-line import/no-cycle\nimport { getRevertReason, parseTransactionError } from './get_revert_reason.js';\nexport function getTransactionError(web3Context, transactionFormatted, transactionReceiptFormatted, receivedError, contractAbi, knownReason) {\n    return __awaiter(this, void 0, void 0, function* () {\n        let _reason = knownReason;\n        if (_reason === undefined) {\n            if (receivedError !== undefined) {\n                _reason = parseTransactionError(receivedError);\n            }\n            else if (web3Context.handleRevert && transactionFormatted !== undefined) {\n                _reason = yield getRevertReason(web3Context, transactionFormatted, contractAbi);\n            }\n        }\n        let error;\n        if (_reason === undefined) {\n            error = new TransactionRevertedWithoutReasonError(transactionReceiptFormatted);\n        }\n        else if (typeof _reason === 'string') {\n            error = new TransactionRevertInstructionError(_reason, undefined, transactionReceiptFormatted);\n        }\n        else if (_reason.customErrorName !== undefined &&\n            _reason.customErrorDecodedSignature !== undefined &&\n            _reason.customErrorArguments !== undefined) {\n            const reasonWithCustomError = _reason;\n            error = new TransactionRevertWithCustomError(reasonWithCustomError.reason, reasonWithCustomError.customErrorName, reasonWithCustomError.customErrorDecodedSignature, reasonWithCustomError.customErrorArguments, reasonWithCustomError.signature, transactionReceiptFormatted, reasonWithCustomError.data);\n        }\n        else {\n            error = new TransactionRevertInstructionError(_reason.reason, _reason.signature, transactionReceiptFormatted, _reason.data);\n        }\n        return error;\n    });\n}\n//# sourceMappingURL=get_transaction_error.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { format } from 'web3-utils';\nimport { DEFAULT_RETURN_FORMAT, } from 'web3-types';\nimport { decodeLog } from 'web3-eth-abi';\nimport { logSchema } from '../schemas.js';\nimport { ALL_EVENTS } from '../constants.js';\nexport const decodeEventABI = (event, data, jsonInterface, returnFormat = DEFAULT_RETURN_FORMAT) => {\n    var _a, _b, _c, _d, _e, _f;\n    let modifiedEvent = Object.assign({}, event);\n    const result = format(logSchema, data, returnFormat);\n    // if allEvents get the right event\n    if ([ALL_EVENTS, 'allEvents'].includes(modifiedEvent.name)) {\n        const matchedEvent = jsonInterface.find(j => j.signature === data.topics[0]);\n        if (matchedEvent) {\n            modifiedEvent = matchedEvent;\n        }\n        else {\n            modifiedEvent = { anonymous: true };\n        }\n    }\n    // create empty inputs if none are present (e.g. anonymous events on allEvents)\n    modifiedEvent.inputs = (_b = (_a = modifiedEvent.inputs) !== null && _a !== void 0 ? _a : event.inputs) !== null && _b !== void 0 ? _b : [];\n    // Handle case where an event signature shadows the current ABI with non-identical\n    // arg indexing. If # of topics doesn't match, event is anon.\n    if (!modifiedEvent.anonymous) {\n        let indexedInputs = 0;\n        ((_c = modifiedEvent.inputs) !== null && _c !== void 0 ? _c : []).forEach(input => {\n            if (input.indexed) {\n                indexedInputs += 1;\n            }\n        });\n        if (indexedInputs > 0 && (data === null || data === void 0 ? void 0 : data.topics) && (data === null || data === void 0 ? void 0 : data.topics.length) !== indexedInputs + 1) {\n            // checks if event is anonymous\n            modifiedEvent = Object.assign(Object.assign({}, modifiedEvent), { anonymous: true, inputs: [] });\n        }\n    }\n    const argTopics = modifiedEvent.anonymous ? data.topics : ((_d = data.topics) !== null && _d !== void 0 ? _d : []).slice(1);\n    return Object.assign(Object.assign({}, result), { returnValues: decodeLog([...((_e = modifiedEvent.inputs) !== null && _e !== void 0 ? _e : [])], data.data, argTopics), event: modifiedEvent.name, signature: !modifiedEvent.anonymous && ((_f = data.topics) === null || _f === void 0 ? void 0 : _f.length) > 0 && data.topics[0]\n            ? data.topics[0]\n            : undefined, raw: {\n            data: data.data,\n            topics: data.topics,\n        } });\n};\n//# sourceMappingURL=decoding.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\n/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { ETH_DATA_FORMAT, } from 'web3-types';\nimport { isNullish } from 'web3-validator';\nimport { ContractExecutionError, InvalidResponseError, TransactionPollingTimeoutError, TransactionRevertedWithoutReasonError, TransactionRevertInstructionError, TransactionRevertWithCustomError, } from 'web3-errors';\nimport { ethRpcMethods } from 'web3-rpc-methods';\n// eslint-disable-next-line import/no-cycle\nimport { getTransactionGasPricing } from './get_transaction_gas_pricing.js';\n// eslint-disable-next-line import/no-cycle\nimport { trySendTransaction } from './try_send_transaction.js';\n// eslint-disable-next-line import/no-cycle\nimport { watchTransactionForConfirmations } from './watch_transaction_for_confirmations.js';\nimport { ALL_EVENTS_ABI } from '../constants.js';\n// eslint-disable-next-line import/no-cycle\nimport { getTransactionError } from './get_transaction_error.js';\n// eslint-disable-next-line import/no-cycle\nimport { getRevertReason } from './get_revert_reason.js';\nimport { decodeEventABI } from './decoding.js';\nexport class SendTxHelper {\n    constructor({ options, web3Context, promiEvent, returnFormat, }) {\n        this.options = {\n            checkRevertBeforeSending: true,\n        };\n        this.options = options;\n        this.web3Context = web3Context;\n        this.promiEvent = promiEvent;\n        this.returnFormat = returnFormat;\n    }\n    getReceiptWithEvents(data) {\n        var _a, _b;\n        const result = Object.assign({}, (data !== null && data !== void 0 ? data : {}));\n        if (((_a = this.options) === null || _a === void 0 ? void 0 : _a.contractAbi) && result.logs && result.logs.length > 0) {\n            result.events = {};\n            for (const log of result.logs) {\n                const event = decodeEventABI(ALL_EVENTS_ABI, log, (_b = this.options) === null || _b === void 0 ? void 0 : _b.contractAbi, this.returnFormat);\n                if (event.event) {\n                    result.events[event.event] = event;\n                }\n            }\n        }\n        return result;\n    }\n    checkRevertBeforeSending(tx) {\n        return __awaiter(this, void 0, void 0, function* () {\n            if (this.options.checkRevertBeforeSending !== false) {\n                let formatTx = tx;\n                if (isNullish(tx.data) && isNullish(tx.input) && isNullish(tx.gas)) {\n                    // eth.call runs into error if data isnt filled and gas is not defined, its a simple transaction so we fill it with 21000\n                    formatTx = Object.assign(Object.assign({}, tx), { gas: 21000 });\n                }\n                const reason = yield getRevertReason(this.web3Context, formatTx, this.options.contractAbi);\n                if (reason !== undefined) {\n                    throw yield getTransactionError(this.web3Context, tx, undefined, undefined, this.options.contractAbi, reason);\n                }\n            }\n        });\n    }\n    emitSending(tx) {\n        if (this.promiEvent.listenerCount('sending') > 0) {\n            this.promiEvent.emit('sending', tx);\n        }\n    }\n    populateGasPrice(_a) {\n        return __awaiter(this, arguments, void 0, function* ({ transactionFormatted, transaction, }) {\n            var _b;\n            let result = transactionFormatted;\n            if (!this.web3Context.config.ignoreGasPricing &&\n                !((_b = this.options) === null || _b === void 0 ? void 0 : _b.ignoreGasPricing) &&\n                isNullish(transactionFormatted.gasPrice) &&\n                (isNullish(transaction.maxPriorityFeePerGas) ||\n                    isNullish(transaction.maxFeePerGas))) {\n                result = Object.assign(Object.assign({}, transactionFormatted), (yield getTransactionGasPricing(transactionFormatted, this.web3Context, ETH_DATA_FORMAT)));\n            }\n            return result;\n        });\n    }\n    signAndSend(_a) {\n        return __awaiter(this, arguments, void 0, function* ({ wallet, tx, }) {\n            if (wallet) {\n                const signedTransaction = yield wallet.signTransaction(tx);\n                return trySendTransaction(this.web3Context, () => __awaiter(this, void 0, void 0, function* () {\n                    return ethRpcMethods.sendRawTransaction(this.web3Context.requestManager, signedTransaction.rawTransaction);\n                }), signedTransaction.transactionHash);\n            }\n            return trySendTransaction(this.web3Context, () => __awaiter(this, void 0, void 0, function* () {\n                return ethRpcMethods.sendTransaction(this.web3Context.requestManager, tx);\n            }));\n        });\n    }\n    emitSent(tx) {\n        if (this.promiEvent.listenerCount('sent') > 0) {\n            this.promiEvent.emit('sent', tx);\n        }\n    }\n    emitTransactionHash(hash) {\n        if (this.promiEvent.listenerCount('transactionHash') > 0) {\n            this.promiEvent.emit('transactionHash', hash);\n        }\n    }\n    emitReceipt(receipt) {\n        if (this.promiEvent.listenerCount('receipt') > 0) {\n            this.promiEvent.emit('receipt', \n            // @ts-expect-error unknown type fix\n            receipt);\n        }\n    }\n    handleError(_a) {\n        return __awaiter(this, arguments, void 0, function* ({ error, tx }) {\n            var _b;\n            let _error = error;\n            if (_error instanceof ContractExecutionError && this.web3Context.handleRevert) {\n                _error = yield getTransactionError(this.web3Context, tx, undefined, undefined, (_b = this.options) === null || _b === void 0 ? void 0 : _b.contractAbi);\n            }\n            if ((_error instanceof InvalidResponseError ||\n                _error instanceof ContractExecutionError ||\n                _error instanceof TransactionRevertWithCustomError ||\n                _error instanceof TransactionRevertedWithoutReasonError ||\n                _error instanceof TransactionRevertInstructionError ||\n                _error instanceof TransactionPollingTimeoutError) &&\n                this.promiEvent.listenerCount('error') > 0) {\n                this.promiEvent.emit('error', _error);\n            }\n            return _error;\n        });\n    }\n    emitConfirmation({ receipt, transactionHash, customTransactionReceiptSchema, }) {\n        if (this.promiEvent.listenerCount('confirmation') > 0) {\n            watchTransactionForConfirmations(this.web3Context, this.promiEvent, receipt, transactionHash, this.returnFormat, customTransactionReceiptSchema);\n        }\n    }\n    handleResolve(_a) {\n        return __awaiter(this, arguments, void 0, function* ({ receipt, tx }) {\n            var _b, _c, _d;\n            if ((_b = this.options) === null || _b === void 0 ? void 0 : _b.transactionResolver) {\n                return (_c = this.options) === null || _c === void 0 ? void 0 : _c.transactionResolver(receipt);\n            }\n            if (receipt.status === BigInt(0)) {\n                const error = yield getTransactionError(this.web3Context, tx, \n                // @ts-expect-error unknown type fix\n                receipt, undefined, (_d = this.options) === null || _d === void 0 ? void 0 : _d.contractAbi);\n                if (this.promiEvent.listenerCount('error') > 0) {\n                    this.promiEvent.emit('error', error);\n                }\n                throw error;\n            }\n            else {\n                return receipt;\n            }\n        });\n    }\n}\n//# sourceMappingURL=send_tx_helper.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n    var t = {};\n    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n        t[p] = s[p];\n    if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n                t[p[i]] = s[p[i]];\n        }\n    return t;\n};\n// Disabling because returnTypes must be last param to match 1.x params\n/* eslint-disable default-param-last */\nimport { ETH_DATA_FORMAT, DEFAULT_RETURN_FORMAT, } from 'web3-types';\nimport { Web3PromiEvent } from 'web3-core';\nimport { format, hexToBytes, bytesToUint8Array, numberToHex } from 'web3-utils';\nimport { TransactionFactory } from 'web3-eth-accounts';\nimport { isBlockTag, isBytes, isNullish, isString } from 'web3-validator';\nimport { SignatureError } from 'web3-errors';\nimport { ethRpcMethods } from 'web3-rpc-methods';\nimport { decodeSignedTransaction } from './utils/decode_signed_transaction.js';\nimport { accountSchema, blockSchema, feeHistorySchema, logSchema, transactionReceiptSchema, accessListResultSchema, SignatureObjectSchema, } from './schemas.js';\n// eslint-disable-next-line import/no-cycle\nimport { getTransactionFromOrToAttr } from './utils/transaction_builder.js';\nimport { formatTransaction } from './utils/format_transaction.js';\n// eslint-disable-next-line import/no-cycle\nimport { trySendTransaction } from './utils/try_send_transaction.js';\n// eslint-disable-next-line import/no-cycle\nimport { waitForTransactionReceipt } from './utils/wait_for_transaction_receipt.js';\nimport { NUMBER_DATA_FORMAT } from './constants.js';\n// eslint-disable-next-line import/no-cycle\nimport { SendTxHelper } from './utils/send_tx_helper.js';\n/**\n * View additional documentations here: {@link Web3Eth.getProtocolVersion}\n * @param web3Context ({@link Web3Context}) Web3 configuration object that contains things such as the provider, request manager, wallet, etc.\n */\nexport const getProtocolVersion = (web3Context) => __awaiter(void 0, void 0, void 0, function* () { return ethRpcMethods.getProtocolVersion(web3Context.requestManager); });\n// TODO Add returnFormat parameter\n/**\n * View additional documentations here: {@link Web3Eth.isSyncing}\n * @param web3Context ({@link Web3Context}) Web3 configuration object that contains things such as the provider, request manager, wallet, etc.\n */\nexport const isSyncing = (web3Context) => __awaiter(void 0, void 0, void 0, function* () { return ethRpcMethods.getSyncing(web3Context.requestManager); });\n// TODO consider adding returnFormat parameter (to format address as bytes)\n/**\n * View additional documentations here: {@link Web3Eth.getCoinbase}\n * @param web3Context ({@link Web3Context}) Web3 configuration object that contains things such as the provider, request manager, wallet, etc.\n */\nexport const getCoinbase = (web3Context) => __awaiter(void 0, void 0, void 0, function* () { return ethRpcMethods.getCoinbase(web3Context.requestManager); });\n/**\n * View additional documentations here: {@link Web3Eth.isMining}\n * @param web3Context ({@link Web3Context}) Web3 configuration object that contains things such as the provider, request manager, wallet, etc.\n */\nexport const isMining = (web3Context) => __awaiter(void 0, void 0, void 0, function* () { return ethRpcMethods.getMining(web3Context.requestManager); });\n/**\n * View additional documentations here: {@link Web3Eth.getHashRate}\n * @param web3Context ({@link Web3Context}) Web3 configuration object that contains things such as the provider, request manager, wallet, etc.\n */\nexport function getHashRate(web3Context, returnFormat) {\n    return __awaiter(this, void 0, void 0, function* () {\n        const response = yield ethRpcMethods.getHashRate(web3Context.requestManager);\n        return format({ format: 'uint' }, response, returnFormat !== null && returnFormat !== void 0 ? returnFormat : web3Context.defaultReturnFormat);\n    });\n}\n/**\n * View additional documentations here: {@link Web3Eth.getGasPrice}\n * @param web3Context ({@link Web3Context}) Web3 configuration object that contains things such as the provider, request manager, wallet, etc.\n */\nexport function getGasPrice(web3Context, returnFormat) {\n    return __awaiter(this, void 0, void 0, function* () {\n        const response = yield ethRpcMethods.getGasPrice(web3Context.requestManager);\n        return format({ format: 'uint' }, response, returnFormat !== null && returnFormat !== void 0 ? returnFormat : web3Context.defaultReturnFormat);\n    });\n}\n/**\n * View additional documentations here: {@link Web3Eth.getMaxPriorityFeePerGas}\n * @param web3Context ({@link Web3Context}) Web3 configuration object that contains things such as the provider, request manager, wallet, etc.\n */\nexport function getMaxPriorityFeePerGas(web3Context, returnFormat) {\n    return __awaiter(this, void 0, void 0, function* () {\n        const response = yield ethRpcMethods.getMaxPriorityFeePerGas(web3Context.requestManager);\n        return format({ format: 'uint' }, response, returnFormat !== null && returnFormat !== void 0 ? returnFormat : web3Context.defaultReturnFormat);\n    });\n}\n/**\n * View additional documentations here: {@link Web3Eth.getBlockNumber}\n * @param web3Context ({@link Web3Context}) Web3 configuration object that contains things such as the provider, request manager, wallet, etc.\n */\nexport function getBlockNumber(web3Context, returnFormat) {\n    return __awaiter(this, void 0, void 0, function* () {\n        const response = yield ethRpcMethods.getBlockNumber(web3Context.requestManager);\n        return format({ format: 'uint' }, response, returnFormat !== null && returnFormat !== void 0 ? returnFormat : web3Context.defaultReturnFormat);\n    });\n}\n/**\n * View additional documentations here: {@link Web3Eth.getBalance}\n * @param web3Context ({@link Web3Context}) Web3 configuration object that contains things such as the provider, request manager, wallet, etc.\n */\nexport function getBalance(web3Context_1, address_1) {\n    return __awaiter(this, arguments, void 0, function* (web3Context, address, blockNumber = web3Context.defaultBlock, returnFormat) {\n        const blockNumberFormatted = isBlockTag(blockNumber)\n            ? blockNumber\n            : format({ format: 'uint' }, blockNumber, ETH_DATA_FORMAT);\n        const response = yield ethRpcMethods.getBalance(web3Context.requestManager, address, blockNumberFormatted);\n        return format({ format: 'uint' }, response, returnFormat !== null && returnFormat !== void 0 ? returnFormat : web3Context.defaultReturnFormat);\n    });\n}\n/**\n * View additional documentations here: {@link Web3Eth.getStorageAt}\n * @param web3Context ({@link Web3Context}) Web3 configuration object that contains things such as the provider, request manager, wallet, etc.\n */\nexport function getStorageAt(web3Context_1, address_1, storageSlot_1) {\n    return __awaiter(this, arguments, void 0, function* (web3Context, address, storageSlot, blockNumber = web3Context.defaultBlock, returnFormat) {\n        const storageSlotFormatted = format({ format: 'uint' }, storageSlot, ETH_DATA_FORMAT);\n        const blockNumberFormatted = isBlockTag(blockNumber)\n            ? blockNumber\n            : format({ format: 'uint' }, blockNumber, ETH_DATA_FORMAT);\n        const response = yield ethRpcMethods.getStorageAt(web3Context.requestManager, address, storageSlotFormatted, blockNumberFormatted);\n        return format({ format: 'bytes' }, response, returnFormat !== null && returnFormat !== void 0 ? returnFormat : web3Context.defaultReturnFormat);\n    });\n}\n/**\n * View additional documentations here: {@link Web3Eth.getCode}\n * @param web3Context ({@link Web3Context}) Web3 configuration object that contains things such as the provider, request manager, wallet, etc.\n */\nexport function getCode(web3Context_1, address_1) {\n    return __awaiter(this, arguments, void 0, function* (web3Context, address, blockNumber = web3Context.defaultBlock, returnFormat) {\n        const blockNumberFormatted = isBlockTag(blockNumber)\n            ? blockNumber\n            : format({ format: 'uint' }, blockNumber, ETH_DATA_FORMAT);\n        const response = yield ethRpcMethods.getCode(web3Context.requestManager, address, blockNumberFormatted);\n        return format({ format: 'bytes' }, response, returnFormat !== null && returnFormat !== void 0 ? returnFormat : web3Context.defaultReturnFormat);\n    });\n}\n/**\n * View additional documentations here: {@link Web3Eth.getBlock}\n * @param web3Context ({@link Web3Context}) Web3 configuration object that contains things such as the provider, request manager, wallet, etc.\n */\nexport function getBlock(web3Context_1) {\n    return __awaiter(this, arguments, void 0, function* (web3Context, block = web3Context.defaultBlock, hydrated = false, returnFormat) {\n        var _a;\n        let response;\n        if (isBytes(block)) {\n            const blockHashFormatted = format({ format: 'bytes32' }, block, ETH_DATA_FORMAT);\n            response = yield ethRpcMethods.getBlockByHash(web3Context.requestManager, blockHashFormatted, hydrated);\n        }\n        else {\n            const blockNumberFormatted = isBlockTag(block)\n                ? block\n                : format({ format: 'uint' }, block, ETH_DATA_FORMAT);\n            response = yield ethRpcMethods.getBlockByNumber(web3Context.requestManager, blockNumberFormatted, hydrated);\n        }\n        const res = format(blockSchema, response, returnFormat !== null && returnFormat !== void 0 ? returnFormat : web3Context.defaultReturnFormat);\n        if (!isNullish(res)) {\n            const result = Object.assign(Object.assign({}, res), { transactions: (_a = res.transactions) !== null && _a !== void 0 ? _a : [] });\n            return result;\n        }\n        return res;\n    });\n}\n/**\n * View additional documentations here: {@link Web3Eth.getBlockTransactionCount}\n * @param web3Context ({@link Web3Context}) Web3 configuration object that contains things such as the provider, request manager, wallet, etc.\n */\nexport function getBlockTransactionCount(web3Context_1) {\n    return __awaiter(this, arguments, void 0, function* (web3Context, block = web3Context.defaultBlock, returnFormat) {\n        let response;\n        if (isBytes(block)) {\n            const blockHashFormatted = format({ format: 'bytes32' }, block, ETH_DATA_FORMAT);\n            response = yield ethRpcMethods.getBlockTransactionCountByHash(web3Context.requestManager, blockHashFormatted);\n        }\n        else {\n            const blockNumberFormatted = isBlockTag(block)\n                ? block\n                : format({ format: 'uint' }, block, ETH_DATA_FORMAT);\n            response = yield ethRpcMethods.getBlockTransactionCountByNumber(web3Context.requestManager, blockNumberFormatted);\n        }\n        return format({ format: 'uint' }, response, returnFormat !== null && returnFormat !== void 0 ? returnFormat : web3Context.defaultReturnFormat);\n    });\n}\n/**\n * View additional documentations here: {@link Web3Eth.getBlockUncleCount}\n * @param web3Context ({@link Web3Context}) Web3 configuration object that contains things such as the provider, request manager, wallet, etc.\n */\nexport function getBlockUncleCount(web3Context_1) {\n    return __awaiter(this, arguments, void 0, function* (web3Context, block = web3Context.defaultBlock, returnFormat) {\n        let response;\n        if (isBytes(block)) {\n            const blockHashFormatted = format({ format: 'bytes32' }, block, ETH_DATA_FORMAT);\n            response = yield ethRpcMethods.getUncleCountByBlockHash(web3Context.requestManager, blockHashFormatted);\n        }\n        else {\n            const blockNumberFormatted = isBlockTag(block)\n                ? block\n                : format({ format: 'uint' }, block, ETH_DATA_FORMAT);\n            response = yield ethRpcMethods.getUncleCountByBlockNumber(web3Context.requestManager, blockNumberFormatted);\n        }\n        return format({ format: 'uint' }, response, returnFormat !== null && returnFormat !== void 0 ? returnFormat : web3Context.defaultReturnFormat);\n    });\n}\n/**\n * View additional documentations here: {@link Web3Eth.getUncle}\n * @param web3Context ({@link Web3Context}) Web3 configuration object that contains things such as the provider, request manager, wallet, etc.\n */\nexport function getUncle(web3Context_1) {\n    return __awaiter(this, arguments, void 0, function* (web3Context, block = web3Context.defaultBlock, uncleIndex, returnFormat) {\n        const uncleIndexFormatted = format({ format: 'uint' }, uncleIndex, ETH_DATA_FORMAT);\n        let response;\n        if (isBytes(block)) {\n            const blockHashFormatted = format({ format: 'bytes32' }, block, ETH_DATA_FORMAT);\n            response = yield ethRpcMethods.getUncleByBlockHashAndIndex(web3Context.requestManager, blockHashFormatted, uncleIndexFormatted);\n        }\n        else {\n            const blockNumberFormatted = isBlockTag(block)\n                ? block\n                : format({ format: 'uint' }, block, ETH_DATA_FORMAT);\n            response = yield ethRpcMethods.getUncleByBlockNumberAndIndex(web3Context.requestManager, blockNumberFormatted, uncleIndexFormatted);\n        }\n        return format(blockSchema, response, returnFormat !== null && returnFormat !== void 0 ? returnFormat : web3Context.defaultReturnFormat);\n    });\n}\n/**\n * View additional documentations here: {@link Web3Eth.getTransaction}\n * @param web3Context ({@link Web3Context}) Web3 configuration object that contains things such as the provider, request manager, wallet, etc.\n */\nexport function getTransaction(web3Context_1, transactionHash_1) {\n    return __awaiter(this, arguments, void 0, function* (web3Context, transactionHash, returnFormat = web3Context.defaultReturnFormat) {\n        const transactionHashFormatted = format({ format: 'bytes32' }, transactionHash, DEFAULT_RETURN_FORMAT);\n        const response = yield ethRpcMethods.getTransactionByHash(web3Context.requestManager, transactionHashFormatted);\n        return isNullish(response)\n            ? response\n            : formatTransaction(response, returnFormat, {\n                transactionSchema: web3Context.config.customTransactionSchema,\n                fillInputAndData: true,\n            });\n    });\n}\n/**\n * View additional documentations here: {@link Web3Eth.getPendingTransactions}\n * @param web3Context ({@link Web3Context}) Web3 configuration object that contains things such as the provider, request manager, wallet, etc.\n */\nexport function getPendingTransactions(web3Context, returnFormat) {\n    return __awaiter(this, void 0, void 0, function* () {\n        const response = yield ethRpcMethods.getPendingTransactions(web3Context.requestManager);\n        return response.map(transaction => formatTransaction(transaction, returnFormat !== null && returnFormat !== void 0 ? returnFormat : web3Context.defaultReturnFormat, {\n            transactionSchema: web3Context.config.customTransactionSchema,\n            fillInputAndData: true,\n        }));\n    });\n}\n/**\n * View additional documentations here: {@link Web3Eth.getTransactionFromBlock}\n * @param web3Context ({@link Web3Context}) Web3 configuration object that contains things such as the provider, request manager, wallet, etc.\n */\nexport function getTransactionFromBlock(web3Context_1) {\n    return __awaiter(this, arguments, void 0, function* (web3Context, block = web3Context.defaultBlock, transactionIndex, returnFormat) {\n        const transactionIndexFormatted = format({ format: 'uint' }, transactionIndex, ETH_DATA_FORMAT);\n        let response;\n        if (isBytes(block)) {\n            const blockHashFormatted = format({ format: 'bytes32' }, block, ETH_DATA_FORMAT);\n            response = yield ethRpcMethods.getTransactionByBlockHashAndIndex(web3Context.requestManager, blockHashFormatted, transactionIndexFormatted);\n        }\n        else {\n            const blockNumberFormatted = isBlockTag(block)\n                ? block\n                : format({ format: 'uint' }, block, ETH_DATA_FORMAT);\n            response = yield ethRpcMethods.getTransactionByBlockNumberAndIndex(web3Context.requestManager, blockNumberFormatted, transactionIndexFormatted);\n        }\n        return isNullish(response)\n            ? response\n            : formatTransaction(response, returnFormat !== null && returnFormat !== void 0 ? returnFormat : web3Context.defaultReturnFormat, {\n                transactionSchema: web3Context.config.customTransactionSchema,\n                fillInputAndData: true,\n            });\n    });\n}\n/**\n * View additional documentations here: {@link Web3Eth.getTransactionReceipt}\n * @param web3Context ({@link Web3Context}) Web3 configuration object that contains things such as the provider, request manager, wallet, etc.\n */\nexport function getTransactionReceipt(web3Context, transactionHash, returnFormat) {\n    return __awaiter(this, void 0, void 0, function* () {\n        const transactionHashFormatted = format({ format: 'bytes32' }, transactionHash, DEFAULT_RETURN_FORMAT);\n        let response;\n        try {\n            response = yield ethRpcMethods.getTransactionReceipt(web3Context.requestManager, transactionHashFormatted);\n        }\n        catch (error) {\n            // geth indexing error, we poll until transactions stopped indexing\n            if (typeof error === 'object' &&\n                !isNullish(error) &&\n                'message' in error &&\n                error.message === 'transaction indexing is in progress') {\n                console.warn('Transaction indexing is in progress.');\n            }\n            else {\n                throw error;\n            }\n        }\n        return isNullish(response)\n            ? response\n            : format(transactionReceiptSchema, response, returnFormat !== null && returnFormat !== void 0 ? returnFormat : web3Context.defaultReturnFormat);\n    });\n}\n/**\n * View additional documentations here: {@link Web3Eth.getTransactionCount}\n * @param web3Context ({@link Web3Context}) Web3 configuration object that contains things such as the provider, request manager, wallet, etc.\n */\nexport function getTransactionCount(web3Context_1, address_1) {\n    return __awaiter(this, arguments, void 0, function* (web3Context, address, blockNumber = web3Context.defaultBlock, returnFormat) {\n        const blockNumberFormatted = isBlockTag(blockNumber)\n            ? blockNumber\n            : format({ format: 'uint' }, blockNumber, ETH_DATA_FORMAT);\n        const response = yield ethRpcMethods.getTransactionCount(web3Context.requestManager, address, blockNumberFormatted);\n        return format({ format: 'uint' }, response, returnFormat !== null && returnFormat !== void 0 ? returnFormat : web3Context.defaultReturnFormat);\n    });\n}\n/**\n * View additional documentations here: {@link Web3Eth.sendTransaction}\n * @param web3Context ({@link Web3Context}) Web3 configuration object that contains things such as the provider, request manager, wallet, etc.\n */\nexport function sendTransaction(web3Context, transactionObj, returnFormat, options = { checkRevertBeforeSending: true }, transactionMiddleware) {\n    const promiEvent = new Web3PromiEvent((resolve, reject) => {\n        setImmediate(() => {\n            (() => __awaiter(this, void 0, void 0, function* () {\n                const sendTxHelper = new SendTxHelper({\n                    web3Context,\n                    promiEvent,\n                    options,\n                    returnFormat,\n                });\n                let transaction = Object.assign({}, transactionObj);\n                if (!isNullish(transactionMiddleware)) {\n                    transaction = yield transactionMiddleware.processTransaction(transaction);\n                }\n                let transactionFormatted = formatTransaction(Object.assign(Object.assign({}, transaction), { from: getTransactionFromOrToAttr('from', web3Context, transaction), to: getTransactionFromOrToAttr('to', web3Context, transaction) }), ETH_DATA_FORMAT, {\n                    transactionSchema: web3Context.config.customTransactionSchema,\n                });\n                try {\n                    transactionFormatted = (yield sendTxHelper.populateGasPrice({\n                        transaction,\n                        transactionFormatted,\n                    }));\n                    yield sendTxHelper.checkRevertBeforeSending(transactionFormatted);\n                    sendTxHelper.emitSending(transactionFormatted);\n                    let wallet;\n                    if (web3Context.wallet && !isNullish(transactionFormatted.from)) {\n                        wallet = web3Context.wallet.get(transactionFormatted.from);\n                    }\n                    const transactionHash = yield sendTxHelper.signAndSend({\n                        wallet,\n                        tx: transactionFormatted,\n                    });\n                    const transactionHashFormatted = format({ format: 'bytes32' }, transactionHash, returnFormat !== null && returnFormat !== void 0 ? returnFormat : web3Context.defaultReturnFormat);\n                    sendTxHelper.emitSent(transactionFormatted);\n                    sendTxHelper.emitTransactionHash(transactionHashFormatted);\n                    const transactionReceipt = yield waitForTransactionReceipt(web3Context, transactionHash, returnFormat !== null && returnFormat !== void 0 ? returnFormat : web3Context.defaultReturnFormat);\n                    const transactionReceiptFormatted = sendTxHelper.getReceiptWithEvents(format(transactionReceiptSchema, transactionReceipt, returnFormat !== null && returnFormat !== void 0 ? returnFormat : web3Context.defaultReturnFormat));\n                    sendTxHelper.emitReceipt(transactionReceiptFormatted);\n                    resolve(yield sendTxHelper.handleResolve({\n                        receipt: transactionReceiptFormatted,\n                        tx: transactionFormatted,\n                    }));\n                    sendTxHelper.emitConfirmation({\n                        receipt: transactionReceiptFormatted,\n                        transactionHash,\n                    });\n                }\n                catch (error) {\n                    reject(yield sendTxHelper.handleError({\n                        error,\n                        tx: transactionFormatted,\n                    }));\n                }\n            }))();\n        });\n    });\n    return promiEvent;\n}\n/**\n * View additional documentations here: {@link Web3Eth.sendSignedTransaction}\n * @param web3Context ({@link Web3Context}) Web3 configuration object that contains things such as the provider, request manager, wallet, etc.\n */\nexport function sendSignedTransaction(web3Context, signedTransaction, returnFormat, options = { checkRevertBeforeSending: true }) {\n    // TODO - Promise returned in function argument where a void return was expected\n    // eslint-disable-next-line @typescript-eslint/no-misused-promises\n    const promiEvent = new Web3PromiEvent((resolve, reject) => {\n        setImmediate(() => {\n            (() => __awaiter(this, void 0, void 0, function* () {\n                const sendTxHelper = new SendTxHelper({\n                    web3Context,\n                    promiEvent,\n                    options,\n                    returnFormat,\n                });\n                // Formatting signedTransaction to be send to RPC endpoint\n                const signedTransactionFormattedHex = format({ format: 'bytes' }, signedTransaction, ETH_DATA_FORMAT);\n                const unSerializedTransaction = TransactionFactory.fromSerializedData(bytesToUint8Array(hexToBytes(signedTransactionFormattedHex)));\n                const unSerializedTransactionWithFrom = Object.assign(Object.assign({}, unSerializedTransaction.toJSON()), { \n                    // Some providers will default `from` to address(0) causing the error\n                    // reported from `eth_call` to not be the reason the user's tx failed\n                    // e.g. `eth_call` will return an Out of Gas error for a failed\n                    // smart contract execution contract, because the sender, address(0),\n                    // has no balance to pay for the gas of the transaction execution\n                    from: unSerializedTransaction.getSenderAddress().toString() });\n                try {\n                    const { v, r, s } = unSerializedTransactionWithFrom, txWithoutSigParams = __rest(unSerializedTransactionWithFrom, [\"v\", \"r\", \"s\"]);\n                    yield sendTxHelper.checkRevertBeforeSending(txWithoutSigParams);\n                    sendTxHelper.emitSending(signedTransactionFormattedHex);\n                    const transactionHash = yield trySendTransaction(web3Context, () => __awaiter(this, void 0, void 0, function* () {\n                        return ethRpcMethods.sendRawTransaction(web3Context.requestManager, signedTransactionFormattedHex);\n                    }));\n                    sendTxHelper.emitSent(signedTransactionFormattedHex);\n                    const transactionHashFormatted = format({ format: 'bytes32' }, transactionHash, returnFormat !== null && returnFormat !== void 0 ? returnFormat : web3Context.defaultReturnFormat);\n                    sendTxHelper.emitTransactionHash(transactionHashFormatted);\n                    const transactionReceipt = yield waitForTransactionReceipt(web3Context, transactionHash, returnFormat !== null && returnFormat !== void 0 ? returnFormat : web3Context.defaultReturnFormat);\n                    const transactionReceiptFormatted = sendTxHelper.getReceiptWithEvents(format(transactionReceiptSchema, transactionReceipt, returnFormat !== null && returnFormat !== void 0 ? returnFormat : web3Context.defaultReturnFormat));\n                    sendTxHelper.emitReceipt(transactionReceiptFormatted);\n                    resolve(yield sendTxHelper.handleResolve({\n                        receipt: transactionReceiptFormatted,\n                        tx: unSerializedTransactionWithFrom,\n                    }));\n                    sendTxHelper.emitConfirmation({\n                        receipt: transactionReceiptFormatted,\n                        transactionHash,\n                    });\n                }\n                catch (error) {\n                    reject(yield sendTxHelper.handleError({\n                        error,\n                        tx: unSerializedTransactionWithFrom,\n                    }));\n                }\n            }))();\n        });\n    });\n    return promiEvent;\n}\n/**\n * View additional documentations here: {@link Web3Eth.sign}\n * @param web3Context ({@link Web3Context}) Web3 configuration object that contains things such as the provider, request manager, wallet, etc.\n */\nexport function sign(web3Context_1, message_1, addressOrIndex_1) {\n    return __awaiter(this, arguments, void 0, function* (web3Context, message, addressOrIndex, returnFormat = web3Context.defaultReturnFormat) {\n        var _a;\n        const messageFormatted = format({ format: 'bytes' }, message, DEFAULT_RETURN_FORMAT);\n        if ((_a = web3Context.wallet) === null || _a === void 0 ? void 0 : _a.get(addressOrIndex)) {\n            const wallet = web3Context.wallet.get(addressOrIndex);\n            const signed = wallet.sign(messageFormatted);\n            return format(SignatureObjectSchema, signed, returnFormat);\n        }\n        if (typeof addressOrIndex === 'number') {\n            throw new SignatureError(message, 'RPC method \"eth_sign\" does not support index signatures');\n        }\n        const response = yield ethRpcMethods.sign(web3Context.requestManager, addressOrIndex, messageFormatted);\n        return format({ format: 'bytes' }, response, returnFormat);\n    });\n}\n/**\n * View additional documentations here: {@link Web3Eth.signTransaction}\n * @param web3Context ({@link Web3Context}) Web3 configuration object that contains things such as the provider, request manager, wallet, etc.\n */\nexport function signTransaction(web3Context_1, transaction_1) {\n    return __awaiter(this, arguments, void 0, function* (web3Context, transaction, returnFormat = web3Context.defaultReturnFormat) {\n        const response = yield ethRpcMethods.signTransaction(web3Context.requestManager, formatTransaction(transaction, ETH_DATA_FORMAT, {\n            transactionSchema: web3Context.config.customTransactionSchema,\n        }));\n        // Some clients only return the encoded signed transaction (e.g. Ganache)\n        // while clients such as Geth return the desired SignedTransactionInfoAPI object\n        return isString(response)\n            ? decodeSignedTransaction(response, returnFormat, {\n                fillInputAndData: true,\n            })\n            : {\n                raw: format({ format: 'bytes' }, response.raw, returnFormat),\n                tx: formatTransaction(response.tx, returnFormat, {\n                    transactionSchema: web3Context.config.customTransactionSchema,\n                    fillInputAndData: true,\n                }),\n            };\n    });\n}\n// TODO Decide what to do with transaction.to\n// https://github.com/ChainSafe/web3.js/pull/4525#issuecomment-982330076\n/**\n * View additional documentations here: {@link Web3Eth.call}\n * @param web3Context ({@link Web3Context}) Web3 configuration object that contains things such as the provider, request manager, wallet, etc.\n */\nexport function call(web3Context_1, transaction_1) {\n    return __awaiter(this, arguments, void 0, function* (web3Context, transaction, blockNumber = web3Context.defaultBlock, returnFormat = web3Context.defaultReturnFormat) {\n        const blockNumberFormatted = isBlockTag(blockNumber)\n            ? blockNumber\n            : format({ format: 'uint' }, blockNumber, ETH_DATA_FORMAT);\n        const response = yield ethRpcMethods.call(web3Context.requestManager, formatTransaction(transaction, ETH_DATA_FORMAT, {\n            transactionSchema: web3Context.config.customTransactionSchema,\n        }), blockNumberFormatted);\n        return format({ format: 'bytes' }, response, returnFormat);\n    });\n}\n// TODO - Investigate whether response is padded as 1.x docs suggest\n/**\n * View additional documentations here: {@link Web3Eth.estimateGas}\n * @param web3Context ({@link Web3Context}) Web3 configuration object that contains things such as the provider, request manager, wallet, etc.\n */\nexport function estimateGas(web3Context_1, transaction_1) {\n    return __awaiter(this, arguments, void 0, function* (web3Context, transaction, blockNumber = web3Context.defaultBlock, returnFormat) {\n        const transactionFormatted = formatTransaction(transaction, ETH_DATA_FORMAT, {\n            transactionSchema: web3Context.config.customTransactionSchema,\n        });\n        const blockNumberFormatted = isBlockTag(blockNumber)\n            ? blockNumber\n            : format({ format: 'uint' }, blockNumber, ETH_DATA_FORMAT);\n        const response = yield ethRpcMethods.estimateGas(web3Context.requestManager, transactionFormatted, blockNumberFormatted);\n        return format({ format: 'uint' }, response, returnFormat !== null && returnFormat !== void 0 ? returnFormat : web3Context.defaultReturnFormat);\n    });\n}\n// TODO - Add input formatting to filter\n/**\n * View additional documentations here: {@link Web3Eth.getPastLogs}\n * @param web3Context ({@link Web3Context}) Web3 configuration object that contains things such as the provider, request manager, wallet, etc.\n */\nexport function getLogs(web3Context, filter, returnFormat) {\n    return __awaiter(this, void 0, void 0, function* () {\n        // format type bigint or number toBlock and fromBlock to hexstring.\n        let { toBlock, fromBlock } = filter;\n        if (!isNullish(toBlock)) {\n            if (typeof toBlock === 'number' || typeof toBlock === 'bigint') {\n                toBlock = numberToHex(toBlock);\n            }\n        }\n        if (!isNullish(fromBlock)) {\n            if (typeof fromBlock === 'number' || typeof fromBlock === 'bigint') {\n                fromBlock = numberToHex(fromBlock);\n            }\n        }\n        const formattedFilter = Object.assign(Object.assign({}, filter), { fromBlock, toBlock });\n        const response = yield ethRpcMethods.getLogs(web3Context.requestManager, formattedFilter);\n        const result = response.map(res => {\n            if (typeof res === 'string') {\n                return res;\n            }\n            return format(logSchema, res, returnFormat !== null && returnFormat !== void 0 ? returnFormat : web3Context.defaultReturnFormat);\n        });\n        return result;\n    });\n}\n/**\n * View additional documentations here: {@link Web3Eth.getChainId}\n * @param web3Context ({@link Web3Context}) Web3 configuration object that contains things such as the provider, request manager, wallet, etc.\n */\nexport function getChainId(web3Context, returnFormat) {\n    return __awaiter(this, void 0, void 0, function* () {\n        const response = yield ethRpcMethods.getChainId(web3Context.requestManager);\n        return format({ format: 'uint' }, \n        // Response is number in hex formatted string\n        response, returnFormat !== null && returnFormat !== void 0 ? returnFormat : web3Context.defaultReturnFormat);\n    });\n}\n/**\n * View additional documentations here: {@link Web3Eth.getProof}\n * @param web3Context ({@link Web3Context}) Web3 configuration object that contains things such as the provider, request manager, wallet, etc.\n */\nexport function getProof(web3Context_1, address_1, storageKeys_1) {\n    return __awaiter(this, arguments, void 0, function* (web3Context, address, storageKeys, blockNumber = web3Context.defaultBlock, returnFormat) {\n        const storageKeysFormatted = storageKeys.map(storageKey => format({ format: 'bytes' }, storageKey, ETH_DATA_FORMAT));\n        const blockNumberFormatted = isBlockTag(blockNumber)\n            ? blockNumber\n            : format({ format: 'uint' }, blockNumber, ETH_DATA_FORMAT);\n        const response = yield ethRpcMethods.getProof(web3Context.requestManager, address, storageKeysFormatted, blockNumberFormatted);\n        return format(accountSchema, response, returnFormat !== null && returnFormat !== void 0 ? returnFormat : web3Context.defaultReturnFormat);\n    });\n}\n// TODO Throwing an error with Geth, but not Infura\n// TODO gasUsedRatio and reward not formatting\n/**\n * View additional documentations here: {@link Web3Eth.getFeeHistory}\n * @param web3Context ({@link Web3Context}) Web3 configuration object that contains things such as the provider, request manager, wallet, etc.\n */\nexport function getFeeHistory(web3Context_1, blockCount_1) {\n    return __awaiter(this, arguments, void 0, function* (web3Context, blockCount, newestBlock = web3Context.defaultBlock, rewardPercentiles, returnFormat) {\n        const blockCountFormatted = format({ format: 'uint' }, blockCount, ETH_DATA_FORMAT);\n        const newestBlockFormatted = isBlockTag(newestBlock)\n            ? newestBlock\n            : format({ format: 'uint' }, newestBlock, ETH_DATA_FORMAT);\n        const rewardPercentilesFormatted = format({\n            type: 'array',\n            items: {\n                format: 'uint',\n            },\n        }, rewardPercentiles, NUMBER_DATA_FORMAT);\n        const response = yield ethRpcMethods.getFeeHistory(web3Context.requestManager, blockCountFormatted, newestBlockFormatted, rewardPercentilesFormatted);\n        return format(feeHistorySchema, response, returnFormat !== null && returnFormat !== void 0 ? returnFormat : web3Context.defaultReturnFormat);\n    });\n}\n/**\n * View additional documentations here: {@link Web3Eth.createAccessList}\n * @param web3Context ({@link Web3Context}) Web3 configuration object that contains things such as the provider, request manager, wallet, etc.\n */\nexport function createAccessList(web3Context_1, transaction_1) {\n    return __awaiter(this, arguments, void 0, function* (web3Context, transaction, blockNumber = web3Context.defaultBlock, returnFormat) {\n        const blockNumberFormatted = isBlockTag(blockNumber)\n            ? blockNumber\n            : format({ format: 'uint' }, blockNumber, ETH_DATA_FORMAT);\n        const response = (yield ethRpcMethods.createAccessList(web3Context.requestManager, formatTransaction(transaction, ETH_DATA_FORMAT, {\n            transactionSchema: web3Context.config.customTransactionSchema,\n        }), blockNumberFormatted));\n        return format(accessListResultSchema, response, returnFormat !== null && returnFormat !== void 0 ? returnFormat : web3Context.defaultReturnFormat);\n    });\n}\n/**\n * View additional documentations here: {@link Web3Eth.signTypedData}\n * @param web3Context ({@link Web3Context}) Web3 configuration object that contains things such as the provider, request manager, wallet, etc.\n */\nexport function signTypedData(web3Context, address, typedData, useLegacy, returnFormat) {\n    return __awaiter(this, void 0, void 0, function* () {\n        const response = yield ethRpcMethods.signTypedData(web3Context.requestManager, address, typedData, useLegacy);\n        return format({ format: 'bytes' }, response, returnFormat !== null && returnFormat !== void 0 ? returnFormat : web3Context.defaultReturnFormat);\n    });\n}\n//# sourceMappingURL=rpc_method_wrappers.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\nimport { ethRpcMethods } from 'web3-rpc-methods';\nimport { format, numberToHex } from 'web3-utils';\nimport { isNullish } from 'web3-validator';\nimport { logSchema } from './schemas.js';\n/**\n * View additional documentations here: {@link Web3Eth.createNewPendingTransactionFilter}\n * @param web3Context ({@link Web3Context}) Web3 configuration object that contains things such as the provider, request manager, wallet, etc.\n * @param returnFormat ({@link DataFormat}) Return format\n */\nexport function createNewPendingTransactionFilter(web3Context, returnFormat) {\n    return __awaiter(this, void 0, void 0, function* () {\n        const response = yield ethRpcMethods.newPendingTransactionFilter(web3Context.requestManager);\n        return format({ format: 'uint' }, response, returnFormat !== null && returnFormat !== void 0 ? returnFormat : web3Context.defaultReturnFormat);\n    });\n}\n/**\n * View additional documentations here: {@link Web3Eth.createNewFilter}\n * @param web3Context ({@link Web3Context}) Web3 configuration object that contains things such as the provider, request manager, wallet, etc.\n * @param filter ({@link FilterParam}) Filter param optional having from-block to-block address or params\n * @param returnFormat ({@link DataFormat}) Return format\n */\nexport function createNewFilter(web3Context, filter, returnFormat) {\n    return __awaiter(this, void 0, void 0, function* () {\n        // format type bigint or number toBlock and fromBlock to hexstring.\n        let { toBlock, fromBlock } = filter;\n        if (!isNullish(toBlock)) {\n            if (typeof toBlock === 'number' || typeof toBlock === 'bigint') {\n                toBlock = numberToHex(toBlock);\n            }\n        }\n        if (!isNullish(fromBlock)) {\n            if (typeof fromBlock === 'number' || typeof fromBlock === 'bigint') {\n                fromBlock = numberToHex(fromBlock);\n            }\n        }\n        const formattedFilter = Object.assign(Object.assign({}, filter), { fromBlock, toBlock });\n        const response = yield ethRpcMethods.newFilter(web3Context.requestManager, formattedFilter);\n        return format({ format: 'uint' }, response, returnFormat !== null && returnFormat !== void 0 ? returnFormat : web3Context.defaultReturnFormat);\n    });\n}\n/**\n * View additional documentations here: {@link Web3Eth.createNewBlockFilter}\n * @param web3Context ({@link Web3Context}) Web3 configuration object that contains things such as the provider, request manager, wallet, etc.\n * @param returnFormat ({@link DataFormat}) Return format\n */\nexport function createNewBlockFilter(web3Context, returnFormat) {\n    return __awaiter(this, void 0, void 0, function* () {\n        const response = yield ethRpcMethods.newBlockFilter(web3Context.requestManager);\n        return format({ format: 'uint' }, response, returnFormat !== null && returnFormat !== void 0 ? returnFormat : web3Context.defaultReturnFormat);\n    });\n}\n/**\n * View additional documentations here: {@link Web3Eth.uninstallFilter}\n * @param web3Context ({@link Web3Context}) Web3 configuration object that contains things such as the provider, request manager, wallet, etc.\n * @param filterIdentifier ({@link Numbers}) filter id\n */\nexport function uninstallFilter(web3Context, filterIdentifier) {\n    return __awaiter(this, void 0, void 0, function* () {\n        const response = yield ethRpcMethods.uninstallFilter(web3Context.requestManager, numberToHex(filterIdentifier));\n        return response;\n    });\n}\n/**\n * View additional documentations here: {@link Web3Eth.getFilterChanges}\n * @param web3Context ({@link Web3Context}) Web3 configuration object that contains things such as the provider, request manager, wallet, etc.\n * @param filterIdentifier ({@link Numbers}) filter id\n */\nexport function getFilterChanges(web3Context, filterIdentifier, returnFormat) {\n    return __awaiter(this, void 0, void 0, function* () {\n        const response = yield ethRpcMethods.getFilterChanges(web3Context.requestManager, numberToHex(filterIdentifier));\n        const result = response.map(res => {\n            if (typeof res === 'string') {\n                return res;\n            }\n            return format(logSchema, res, returnFormat !== null && returnFormat !== void 0 ? returnFormat : web3Context.defaultReturnFormat);\n        });\n        return result;\n    });\n}\n/**\n * View additional documentations here: {@link Web3Eth.getFilterLogs}\n * @param web3Context ({@link Web3Context}) Web3 configuration object that contains things such as the provider, request manager, wallet, etc.\n * @param filterIdentifier ({@link Numbers}) filter id\n */\nexport function getFilterLogs(web3Context, filterIdentifier, returnFormat) {\n    return __awaiter(this, void 0, void 0, function* () {\n        const response = yield ethRpcMethods.getFilterLogs(web3Context.requestManager, numberToHex(filterIdentifier));\n        const result = response.map(res => {\n            if (typeof res === 'string') {\n                return res;\n            }\n            return format(logSchema, res, returnFormat !== null && returnFormat !== void 0 ? returnFormat : web3Context.defaultReturnFormat);\n        });\n        return result;\n    });\n}\n//# sourceMappingURL=filtering_rpc_method_wrappers.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\n/* eslint-disable-next-line max-classes-per-file */\nimport { format } from 'web3-utils';\nimport { Web3Subscription } from 'web3-core';\nimport { blockHeaderSchema, logSchema, syncSchema } from './schemas.js';\n/**\n * ## subscribe('logs')\n * Subscribes to incoming logs, filtered by the given options. If a valid numerical fromBlock options property is set, web3.js will retrieve logs beginning from this point, backfilling the response as necessary.\n *\n * You can subscribe to logs matching a given filter object, which can take the following parameters:\n * - `fromBlock`: (optional, default: 'latest') Integer block number, or `'latest'` for the last mined block or `'pending'`, `'earliest'` for not yet mined transactions.\n * - `address`: (optional) Contract address or a list of addresses from which logs should originate.\n * - `topics`: (optional) Array of 32 Bytes DATA topics. Topics are order-dependent. Each topic can also be an array of DATA with `or` options.\n *\n */\nexport class LogsSubscription extends Web3Subscription {\n    _buildSubscriptionParams() {\n        return ['logs', this.args];\n    }\n    formatSubscriptionResult(data) {\n        return format(logSchema, data, super.returnFormat);\n    }\n}\n/**\n * ## subscribe('pendingTransactions')\n * Subscribes to incoming pending transactions.\n *\n * You can subscribe to pending transactions by calling web3.eth.subscribe('pendingTransactions').\n * @example\n * ```ts\n * (await web3.eth.subscribe('pendingTransactions')).on('data', console.log);\n * ```\n */\nexport class NewPendingTransactionsSubscription extends Web3Subscription {\n    // eslint-disable-next-line\n    _buildSubscriptionParams() {\n        return ['newPendingTransactions'];\n    }\n    formatSubscriptionResult(data) {\n        return format({ format: 'string' }, data, super.returnFormat);\n    }\n}\n/**\n * ## subscribe('newHeads') ( same as subscribe('newBlockHeaders'))\n *\n * Subscribes to incoming block headers. This can be used as timer to check for changes on the blockchain.\n *\n * The structure of a returned block header is {@link BlockHeaderOutput}:\n * @example\n * ```ts\n * (await web3.eth.subscribe('newHeads')).on( // 'newBlockHeaders' would work as well\n *  'data',\n * console.log\n * );\n * >{\n * parentHash: '0x9e746a1d906b299def98c75b06f714d62dacadd567c7515d76eeaa8c8074c738',\n * sha3Uncles: '0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347',\n * miner: '0x0000000000000000000000000000000000000000',\n * stateRoot: '0xe0f04b04861ecfa95e82a9310d6a7ef7aef8d7417f5209c182582bfb98a8e307',\n * transactionsRoot: '0x31ab4ea571a9e10d3a19aaed07d190595b1dfa34e03960c04293fec565dea536',\n * logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',\n * difficulty: 2n,\n * number: 21n,\n * gasLimit: 11738125n,\n * gasUsed: 830006n,\n * timestamp: 1678797237n,\n * extraData: '0xd883010b02846765746888676f312e32302e31856c696e757800000000000000e0a6e93cf40e2e71a72e493272210c3f43738ccc7e7d7b14ffd51833797d896c09117e8dc4fbcbc969bd21b42e5af3e276a911524038c001b2109b63b8e0352601',\n * nonce: 0n\n * }\n * ```\n */\nexport class NewHeadsSubscription extends Web3Subscription {\n    // eslint-disable-next-line\n    _buildSubscriptionParams() {\n        return ['newHeads'];\n    }\n    formatSubscriptionResult(data) {\n        return format(blockHeaderSchema, data, super.returnFormat);\n    }\n}\n/**\n * ## subscribe('syncing')\n *\n * Subscribe to syncing events. This will return `true` when the node is syncing and when it’s finished syncing will return `false`, for the `changed` event.\n * @example\n * ```ts\n * (await web3.eth.subscribe('syncing')).on('changed', console.log);\n * > `true` // when syncing\n *\n * (await web3.eth.subscribe('syncing')).on('data', console.log);\n * > {\n *      startingBlock: 0,\n *      currentBlock: 0,\n *      highestBlock: 0,\n *      pulledStates: 0,\n *      knownStates: 0\n *   }\n * ```\n */\nexport class SyncingSubscription extends Web3Subscription {\n    // eslint-disable-next-line\n    _buildSubscriptionParams() {\n        return ['syncing'];\n    }\n    _processSubscriptionResult(data) {\n        if (typeof data === 'boolean') {\n            this.emit('changed', data);\n        }\n        else {\n            const mappedData = Object.fromEntries(Object.entries((data === null || data === void 0 ? void 0 : data.status) || data).map(([key, value]) => [\n                key.charAt(0).toLowerCase() + key.substring(1),\n                value,\n            ]));\n            this.emit('changed', data.syncing);\n            this.emit('data', format(syncSchema, mappedData, super.returnFormat));\n        }\n    }\n}\n//# sourceMappingURL=web3_subscriptions.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\n// Disabling because returnTypes must be last param to match 1.x params\n/* eslint-disable default-param-last */\nimport { DEFAULT_RETURN_FORMAT, } from 'web3-types';\nimport { isSupportedProvider, Web3Context } from 'web3-core';\nimport { TransactionNotFound } from 'web3-errors';\nimport { toChecksumAddress, isNullish, ethUnitMap } from 'web3-utils';\nimport { ethRpcMethods } from 'web3-rpc-methods';\nimport * as rpcMethodsWrappers from './rpc_method_wrappers.js';\nimport * as filteringRpcMethodsWrappers from './filtering_rpc_method_wrappers.js';\nimport { LogsSubscription, NewPendingTransactionsSubscription, NewHeadsSubscription, SyncingSubscription, } from './web3_subscriptions.js';\nexport const registeredSubscriptions = {\n    logs: LogsSubscription,\n    newPendingTransactions: NewPendingTransactionsSubscription,\n    newHeads: NewHeadsSubscription,\n    syncing: SyncingSubscription,\n    pendingTransactions: NewPendingTransactionsSubscription, // the same as newPendingTransactions. just for support API like in version 1.x\n    newBlockHeaders: NewHeadsSubscription, // the same as newHeads. just for support API like in version 1.x\n};\n/**\n *\n * The Web3Eth allows you to interact with an Ethereum blockchain.\n *\n * For using Web3 Eth functions, first install Web3 package using `npm i web3` or `yarn add web3` based on your package manager usage.\n * After that, Web3 Eth functions will be available as mentioned in following snippet.\n * ```ts\n * import { Web3 } from 'web3';\n * const web3 = new Web3('https://mainnet.infura.io/v3/<YOURPROJID>');\n *\n * const block = await web3.eth.getBlock(0);\n *\n * ```\n *\n * For using individual package install `web3-eth` package using `npm i web3-eth` or `yarn add web3-eth` and only import required functions.\n * This is more efficient approach for building lightweight applications.\n * ```ts\n * import { Web3Eth } from 'web3-eth';\n *\n * const eth = new Web3Eth('https://mainnet.infura.io/v3/<YOURPROJID>');\n * const block = await eth.getBlock(0);\n *\n * ```\n */\nexport class Web3Eth extends Web3Context {\n    constructor(\n    // eslint-disable-next-line  @typescript-eslint/no-explicit-any\n    providerOrContext) {\n        if (typeof providerOrContext === 'string' ||\n            // eslint-disable-next-line  @typescript-eslint/no-explicit-any\n            isSupportedProvider(providerOrContext)) {\n            // @ts-expect-error disable the error: \"A 'super' call must be a root-level statement within a constructor of a derived class that contains initialized properties, parameter properties, or private identifiers.\"\n            super({\n                // eslint-disable-next-line  @typescript-eslint/no-explicit-any\n                provider: providerOrContext,\n                registeredSubscriptions,\n            });\n            return;\n        }\n        if (providerOrContext.registeredSubscriptions) {\n            super(providerOrContext);\n            return;\n        }\n        super(Object.assign(Object.assign({}, providerOrContext), { registeredSubscriptions }));\n        // an alias for calculateFeeData\n        // eslint-disable-next-line\n        this.getFeeData = this.calculateFeeData;\n    }\n    setTransactionMiddleware(transactionMiddleware) {\n        this.transactionMiddleware = transactionMiddleware;\n    }\n    getTransactionMiddleware() {\n        return this.transactionMiddleware;\n    }\n    /**\n     * @returns Returns the ethereum protocol version of the node.\n     *\n     * ```ts\n     * web3.eth.getProtocolVersion().then(console.log);\n     * > \"63\"\n     * ```\n     */\n    getProtocolVersion() {\n        return __awaiter(this, void 0, void 0, function* () {\n            return ethRpcMethods.getProtocolVersion(this.requestManager);\n        });\n    }\n    // TODO Add returnFormat parameter\n    /**\n     * Checks if the node is currently syncing.\n     *\n     * @returns Either a {@link SyncingStatusAPI}, or `false`.\n     *\n     * ```ts\n     * web3.eth.isSyncing().then(console.log);\n     * > {\n     *     startingBlock: 100,\n     *     currentBlock: 312,\n     *     highestBlock: 512,\n     *     knownStates: 234566,\n     *     pulledStates: 123455\n     * }\n     * ```\n     */\n    isSyncing() {\n        return __awaiter(this, void 0, void 0, function* () {\n            return ethRpcMethods.getSyncing(this.requestManager);\n        });\n    }\n    // TODO consider adding returnFormat parameter (to format address as bytes)\n    /**\n     * @returns Returns the coinbase address to which mining rewards will go.\n     *\n     * ```ts\n     * web3.eth.getCoinbase().then(console.log);\n     * > \"0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe\"\n     * ```\n     */\n    getCoinbase() {\n        return __awaiter(this, void 0, void 0, function* () {\n            return ethRpcMethods.getCoinbase(this.requestManager);\n        });\n    }\n    /**\n     * Checks whether the node is mining or not.\n     *\n     * @returns `true` if the node is mining, otherwise `false`.\n     *\n     * ```ts\n     * web3.eth.isMining().then(console.log);\n     * > true\n     * ```\n     */\n    isMining() {\n        return __awaiter(this, void 0, void 0, function* () {\n            return ethRpcMethods.getMining(this.requestManager);\n        });\n    }\n    /**\n     * @deprecated Will be removed in the future, please use {@link Web3Eth.getHashRate} method instead.\n     *\n     * @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) Specifies how the return data should be formatted.\n     * @returns The number of hashes per second that the node is mining with.\n     *\n     * ```ts\n     * web3.eth.getHashrate().then(console.log);\n     * > 493736n\n     *\n     * web3.eth.getHashrate({ number: FMT_NUMBER.HEX , bytes: FMT_BYTES.HEX }).then(console.log);\n     * > \"0x788a8\"\n     * ```\n     */\n    getHashrate(returnFormat) {\n        return __awaiter(this, void 0, void 0, function* () {\n            var _a;\n            if (returnFormat === void 0) { returnFormat = ((_a = this.defaultReturnFormat) !== null && _a !== void 0 ? _a : DEFAULT_RETURN_FORMAT); }\n            return this.getHashRate(returnFormat);\n        });\n    }\n    /**\n     * @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) Specifies how the return data should be formatted.\n     * @returns The number of hashes per second that the node is mining with.\n     *\n     * ```ts\n     * web3.eth.getHashRate().then(console.log);\n     * > 493736n\n     *\n     * web3.eth.getHashRate({ number: FMT_NUMBER.HEX , bytes: FMT_BYTES.HEX }).then(console.log);\n     * > \"0x788a8\"\n     * ```\n     */\n    getHashRate() {\n        return __awaiter(this, arguments, void 0, function* (returnFormat = this.defaultReturnFormat) {\n            return rpcMethodsWrappers.getHashRate(this, returnFormat);\n        });\n    }\n    /**\n     * @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) Specifies how the return data should be formatted.\n     * @returns The gas price determined by the last few blocks median gas price.\n     *\n     * ```ts\n     * web3.eth.getGasPrice().then(console.log);\n     * > 20000000000n\n     *\n     * web3.eth.getGasPrice({ number: FMT_NUMBER.HEX , bytes: FMT_BYTES.HEX }).then(console.log);\n     * > \"0x4a817c800\"\n     * ```\n     */\n    getGasPrice() {\n        return __awaiter(this, arguments, void 0, function* (returnFormat = this.defaultReturnFormat) {\n            return rpcMethodsWrappers.getGasPrice(this, returnFormat);\n        });\n    }\n    /**\n     * @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) Specifies how the return data should be formatted.\n     * @returns the current maxPriorityFeePerGas per gas in wei.\n     *\n     * ```ts\n     * web3.eth.getMaxPriorityFeePerGas().then(console.log);\n     * > 20000000000n\n     *\n     * web3.eth.getMaxPriorityFeePerGas({ number: FMT_NUMBER.HEX , bytes: FMT_BYTES.HEX }).then(console.log);\n     * > \"0x4a817c800\"\n     * ```\n     */\n    getMaxPriorityFeePerGas() {\n        return __awaiter(this, arguments, void 0, function* (returnFormat = this.defaultReturnFormat) {\n            return rpcMethodsWrappers.getMaxPriorityFeePerGas(this, returnFormat);\n        });\n    }\n    /**\n     * Calculates the current Fee Data.\n     * If the node supports EIP-1559, then `baseFeePerGas` and `maxPriorityFeePerGas` will be returned along with the calculated `maxFeePerGas` value.\n     * `maxFeePerGas` is calculated as `baseFeePerGas` * `baseFeePerGasFactor` + `maxPriorityFeePerGas`.\n     * If the node does not support EIP-1559, then the `gasPrice` will be returned and the other values will be undefined.\n     *\n     * @param baseFeePerGasFactor (optional) The factor to multiply the `baseFeePerGas` with when calculating `maxFeePerGas`, if the node supports EIP-1559. This can be a `bigint` for precise calculation or a `number` to support decimals. The default value is 2 (BigInt).\n     * If a `number` is provided, it will be converted to `bigint` with three decimal precision.\n     * @param alternativeMaxPriorityFeePerGas (optional) The alternative `maxPriorityFeePerGas` to use when calculating `maxFeePerGas`, if the node supports EIP-1559 but does not support the method `eth_maxPriorityFeePerGas`. The default value is 1 gwei.\n     * @returns The current fee data.\n     *\n     * @example\n     * web3.eth.calculateFeeData().then(console.log);\n     * > {\n     *     gasPrice: 20000000000n,\n     *     maxFeePerGas: 60000000000n,\n     *     maxPriorityFeePerGas: 20000000000n,\n     *     baseFeePerGas: 20000000000n\n     * }\n     *\n     * @example\n     * // Using a `bigint` for baseFeePerGasFactor\n     * web3.eth.calculateFeeData(1n).then(console.log);\n     * > {\n     *     gasPrice: 20000000000n,\n     *     maxFeePerGas: 40000000000n,\n     *     maxPriorityFeePerGas: 20000000000n,\n     *     baseFeePerGas: 20000000000n\n     * }\n     *\n     * @example\n     * // Using a `number` for baseFeePerGasFactor (with decimals)\n     * web3.eth.calculateFeeData(1.5).then(console.log);\n     * > {\n     *     gasPrice: 20000000000n,\n     *     maxFeePerGas: 50000000000n,  // baseFeePerGasFactor is converted to BigInt(1.500)\n     *     maxPriorityFeePerGas: 20000000000n,\n     *     baseFeePerGas: 20000000000n\n     * }\n     *\n     * @example\n     * web3.eth.calculateFeeData(3n).then(console.log);\n     * > {\n     *     gasPrice: 20000000000n,\n     *     maxFeePerGas: 80000000000n,\n     *     maxPriorityFeePerGas: 20000000000n,\n     *     baseFeePerGas: 20000000000n\n     * }\n     */\n    calculateFeeData() {\n        return __awaiter(this, arguments, void 0, function* (baseFeePerGasFactor = BigInt(2), alternativeMaxPriorityFeePerGas = ethUnitMap.Gwei) {\n            var _a;\n            const block = yield this.getBlock(undefined, false);\n            const baseFeePerGas = (_a = block === null || block === void 0 ? void 0 : block.baseFeePerGas) !== null && _a !== void 0 ? _a : undefined; // use undefined if it was null\n            let gasPrice;\n            try {\n                gasPrice = yield this.getGasPrice();\n            }\n            catch (error) {\n                // do nothing\n            }\n            let maxPriorityFeePerGas;\n            try {\n                maxPriorityFeePerGas = yield this.getMaxPriorityFeePerGas();\n            }\n            catch (error) {\n                // do nothing\n            }\n            let maxFeePerGas;\n            // if the `block.baseFeePerGas` is available, then EIP-1559 is supported\n            // and we can calculate the `maxFeePerGas` from the `block.baseFeePerGas`\n            if (baseFeePerGas) {\n                // tip the miner with alternativeMaxPriorityFeePerGas, if no value available from getMaxPriorityFeePerGas\n                maxPriorityFeePerGas = maxPriorityFeePerGas !== null && maxPriorityFeePerGas !== void 0 ? maxPriorityFeePerGas : alternativeMaxPriorityFeePerGas;\n                // basically maxFeePerGas = (baseFeePerGas +- 12.5%) + maxPriorityFeePerGas\n                // and we multiply the `baseFeePerGas` by `baseFeePerGasFactor`, to allow\n                // trying to include the transaction in the next few blocks even if the\n                // baseFeePerGas is increasing fast\n                let baseFeeMultiplier;\n                if (typeof baseFeePerGasFactor === 'number') {\n                    // Convert number to bigint with three decimal places\n                    baseFeeMultiplier = BigInt(Math.floor(baseFeePerGasFactor * 1000)) / BigInt(1000);\n                }\n                else {\n                    // It's already a BigInt, so just use it as-is\n                    baseFeeMultiplier = baseFeePerGasFactor;\n                }\n                maxFeePerGas = baseFeePerGas * baseFeeMultiplier + maxPriorityFeePerGas;\n            }\n            return { gasPrice, maxFeePerGas, maxPriorityFeePerGas, baseFeePerGas };\n        });\n    }\n    /**\n     * @returns A list of accounts the node controls (addresses are checksummed).\n     *\n     * ```ts\n     * web3.eth.getAccounts().then(console.log);\n     * > [\"0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe\", \"0xDCc6960376d6C6dEa93647383FfB245CfCed97Cf\"]\n     * ```\n     */\n    getAccounts() {\n        return __awaiter(this, void 0, void 0, function* () {\n            var _a;\n            const hexAddresses = (_a = (yield ethRpcMethods.getAccounts(this.requestManager))) !== null && _a !== void 0 ? _a : [];\n            return hexAddresses.map(address => toChecksumAddress(address));\n        });\n    }\n    /**\n     * @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) Specifies how the return data should be formatted.\n     * @returns The current block number.\n     *\n     * ```ts\n     * web3.eth.getBlockNumber().then(console.log);\n     * > 2744n\n     *\n     * web3.eth.getBlockNumber({ number: FMT_NUMBER.HEX , bytes: FMT_BYTES.HEX }).then(console.log);\n     * > \"0xab8\"\n     * ```\n     */\n    getBlockNumber() {\n        return __awaiter(this, arguments, void 0, function* (returnFormat = this.defaultReturnFormat) {\n            return rpcMethodsWrappers.getBlockNumber(this, returnFormat);\n        });\n    }\n    /**\n     * Get the balance of an address at a given block.\n     *\n     * @param address The address to get the balance of.\n     * @param blockNumber ({@link BlockNumberOrTag} defaults to {@link Web3Eth.defaultBlock}) Specifies what block to use as the current state for the balance query.\n     * @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) Specifies how the return data should be formatted.\n     * @returns The current balance for the given address in `wei`.\n     *\n     * ```ts\n     * web3.eth.getBalance(\"0x407d73d8a49eeb85d32cf465507dd71d507100c1\").then(console.log);\n     * > 1000000000000n\n     *\n     * web3.eth.getBalance(\"0x407d73d8a49eeb85d32cf465507dd71d507100c1\").then(console.log);\n     * > \"0xe8d4a51000\"\n     * ```\n     */\n    getBalance(address_1) {\n        return __awaiter(this, arguments, void 0, function* (address, blockNumber = this.defaultBlock, returnFormat = this.defaultReturnFormat) {\n            return rpcMethodsWrappers.getBalance(this, address, blockNumber, returnFormat);\n        });\n    }\n    /**\n     * Get the storage at a specific position of an address.\n     *\n     * @param address The address to get the storage from.\n     * @param storageSlot The index position of the storage.\n     * @param blockNumber ({@link BlockNumberOrTag} defaults to {@link Web3Eth.defaultBlock}) Specifies what block to use as the current state for the storage query.\n     * @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) Specifies how the return data should be formatted.\n     * @returns The value in storage at the given position.\n     *\n     * ```ts\n     * web3.eth.getStorageAt(\"0x033456732123ffff2342342dd12342434324234234fd234fd23fd4f23d4234\", 0).then(console.log);\n     * > \"0x033456732123ffff2342342dd12342434324234234fd234fd23fd4f23d4234\"\n     *\n     * web3.eth.getStorageAt(\n     *      \"0x033456732123ffff2342342dd12342434324234234fd234fd23fd4f23d4234\",\n     *      0,\n     *      undefined,\n     *      { number: FMT_NUMBER.HEX , bytes: FMT_BYTES.UINT8ARRAY }\n     * ).then(console.log);\n     * > Uint8Array(31) [\n     *       3, 52,  86, 115,  33,  35, 255, 255,\n     *       35, 66,  52,  45, 209,  35,  66,  67,\n     *       67, 36,  35,  66,  52, 253,  35,  79,\n     *       210, 63, 212, 242,  61,  66,  52\n     *    ]\n     * ```\n     */\n    getStorageAt(address_1, storageSlot_1) {\n        return __awaiter(this, arguments, void 0, function* (address, storageSlot, blockNumber = this.defaultBlock, returnFormat = this.defaultReturnFormat) {\n            return rpcMethodsWrappers.getStorageAt(this, address, storageSlot, blockNumber, returnFormat);\n        });\n    }\n    /**\n     * Get the code at a specific address.\n     *\n     * @param address The address to get the code from.\n     * @param blockNumber ({@link BlockNumberOrTag} defaults to {@link Web3Eth.defaultBlock}) Specifies what block to use as the current state for the code query.\n     * @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) Specifies how the return data should be formatted.\n     * @returns The [data](https://ethereum.org/en/developers/docs/transactions/#the-data-field) at the provided `address`.\n     *\n     * ```ts\n     * web3.eth.getCode(\"0x033456732123ffff2342342dd12342434324234234fd234fd23fd4f23d4234\").then(console.log);\n     * > \"0x600160008035811a818181146012578301005b601b6001356025565b8060005260206000f25b600060078202905091905056\"\n     *\n     * web3.eth.getCode(\n     *      \"0x407d73d8a49eeb85d32cf465507dd71d507100c1\",\n     *      undefined,\n     *      { number: FMT_NUMBER.HEX , bytes: FMT_BYTES.UINT8ARRAY }\n     * ).then(console.log);\n     * > Uint8Array(50) [\n     *   96,  1,  96,   0, 128, 53, 129, 26, 129, 129, 129,\n     *   20, 96,  18,  87, 131,  1,   0, 91,  96,  27,  96,\n     *   1, 53,  96,  37,  86, 91, 128, 96,   0,  82,  96,\n     *   32, 96,   0, 242,  91, 96,   0, 96,   7, 130,   2,\n     *   144, 80, 145, 144,  80, 86\n     * ]\n     * ```\n     */\n    getCode(address_1) {\n        return __awaiter(this, arguments, void 0, function* (address, blockNumber = this.defaultBlock, returnFormat = this.defaultReturnFormat) {\n            return rpcMethodsWrappers.getCode(this, address, blockNumber, returnFormat);\n        });\n    }\n    /**\n     * Retrieves a {@link Block} matching the provided block number, block hash or block tag.\n     *\n     * @param block The {@link BlockNumberOrTag} (defaults to {@link Web3Eth.defaultBlock}) or block hash of the desired block.\n     * @param hydrated If specified `true`, the returned block will contain all transactions as objects. If `false` it will only contain transaction hashes.\n     * @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) Specifies how the return data should be formatted (does not format transaction objects or hashes).\n     * @returns A {@link Block} object matching the provided block number or block hash.\n     *\n     * ```ts\n     * web3.eth.getBlock(0).then(console.log);\n     * > {\n     *    hash: '0x7dbfdc6a7a67a670cb9b0c3f81ca60c007762f1e4e598cb027a470678ff26d0d',\n     *    parentHash: '0x0000000000000000000000000000000000000000000000000000000000000000',\n     *    sha3Uncles: '0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347',\n     *    miner: '0x0000000000000000000000000000000000000000',\n     *    stateRoot: '0x5ed9882897d363c4632a6e67fba6203df61bd994813dcf048da59be442a9c6c4',\n     *    transactionsRoot: '0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421',\n     *    receiptsRoot: '0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421',\n     *    logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',\n     *    difficulty: 1n,\n     *    number: 0n,\n     *    gasLimit: 30000000n,\n     *    gasUsed: 0n,\n     *    timestamp: 1658281638n,\n     *    extraData: '0x',\n     *    mixHash: '0x0000000000000000000000000000000000000000000000000000000000000000',\n     *    nonce: 0n,\n     *    totalDifficulty: 1n,\n     *    baseFeePerGas: 1000000000n,\n     *    size: 514n,\n     *    transactions: [],\n     *    uncles: []\n     *  }\n     *\n     * web3.eth.getBlock(\n     *      \"0x7dbfdc6a7a67a670cb9b0c3f81ca60c007762f1e4e598cb027a470678ff26d0d\",\n     *      false,\n     *      { number: FMT_NUMBER.NUMBER , bytes: FMT_BYTES.HEX }\n     * ).then(console.log);\n     * > {\n     *    hash: '0x7dbfdc6a7a67a670cb9b0c3f81ca60c007762f1e4e598cb027a470678ff26d0d',\n     *    parentHash: '0x0000000000000000000000000000000000000000000000000000000000000000',\n     *    sha3Uncles: '0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347',\n     *    miner: '0x0000000000000000000000000000000000000000',\n     *    stateRoot: '0x5ed9882897d363c4632a6e67fba6203df61bd994813dcf048da59be442a9c6c4',\n     *    transactionsRoot: '0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421',\n     *    receiptsRoot: '0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421',\n     *    logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',\n     *    difficulty: 1,\n     *    number: 0,\n     *    gasLimit: 30000000,\n     *    gasUsed: 0,\n     *    timestamp: 1658281638,\n     *    extraData: '0x',\n     *    mixHash: '0x0000000000000000000000000000000000000000000000000000000000000000',\n     *    nonce: 0,\n     *    totalDifficulty: 1,\n     *    baseFeePerGas: 1000000000,\n     *    size: 514,\n     *    transactions: [],\n     *    uncles: []\n     *  }\n     * ```\n     */\n    getBlock() {\n        return __awaiter(this, arguments, void 0, function* (block = this.defaultBlock, hydrated = false, returnFormat = this.defaultReturnFormat) {\n            return rpcMethodsWrappers.getBlock(this, block, hydrated, returnFormat);\n        });\n    }\n    /**\n     * @param block The {@link BlockNumberOrTag} (defaults to {@link Web3Eth.defaultBlock}) or block hash of the desired block.\n     * @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) Specifies how the return data should be formatted.\n     * @returns The number of transactions in the provided block.\n     *\n     * ```ts\n     * web3.eth.getBlockTransactionCount(\"0x407d73d8a49eeb85d32cf465507dd71d507100c1\").then(console.log);\n     * > 1n\n     *\n     * web3.eth.getBlockTransactionCount(\n     *     \"0x407d73d8a49eeb85d32cf465507dd71d507100c1\",\n     *     { number: FMT_NUMBER.NUMBER , bytes: FMT_BYTES.HEX }\n     * ).then(console.log);\n     * > 1\n     * ```\n     */\n    getBlockTransactionCount() {\n        return __awaiter(this, arguments, void 0, function* (block = this.defaultBlock, returnFormat = this.defaultReturnFormat) {\n            return rpcMethodsWrappers.getBlockTransactionCount(this, block, returnFormat);\n        });\n    }\n    /**\n     * @param block The {@link BlockNumberOrTag} (defaults to {@link Web3Eth.defaultBlock}) or block hash of the desired block.\n     * @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) Specifies how the return data should be formatted.\n     * @returns The number of [uncles](https://ethereum.org/en/glossary/#ommer) in the provided block.\n     *\n     * ```ts\n     * web3.eth.getBlockUncleCount(\"0x407d73d8a49eeb85d32cf465507dd71d507100c1\").then(console.log);\n     * > 1n\n     *\n     * web3.eth.getBlockUncleCount(\n     *     \"0x407d73d8a49eeb85d32cf465507dd71d507100c1\",\n     *     { number: FMT_NUMBER.NUMBER , bytes: FMT_BYTES.HEX }\n     * ).then(console.log);\n     * > 1\n     * ```\n     */\n    getBlockUncleCount() {\n        return __awaiter(this, arguments, void 0, function* (block = this.defaultBlock, returnFormat = this.defaultReturnFormat) {\n            return rpcMethodsWrappers.getBlockUncleCount(this, block, returnFormat);\n        });\n    }\n    /**\n     *\n     * @param block The {@link BlockNumberOrTag} (defaults to {@link Web3Eth.defaultBlock}) or block hash of the desired block.\n     * @param uncleIndex The index position of the uncle.\n     * @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) Specifies how the return data should be formatted.\n     * @returns A blocks [uncle](https://ethereum.org/en/glossary/#ommer) by a given uncle index position.\n     *\n     * ```ts\n     * web3.eth.getUncle(0, 1).then(console.log);\n     * > {\n     *    hash: '0x7dbfdc6a7a67a670cb9b0c3f81ca60c007762f1e4e598cb027a470678ff26d0d',\n     *    parentHash: '0x0000000000000000000000000000000000000000000000000000000000000000',\n     *    sha3Uncles: '0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347',\n     *    miner: '0x0000000000000000000000000000000000000000',\n     *    stateRoot: '0x5ed9882897d363c4632a6e67fba6203df61bd994813dcf048da59be442a9c6c4',\n     *    transactionsRoot: '0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421',\n     *    receiptsRoot: '0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421',\n     *    logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',\n     *    difficulty: 1n,\n     *    number: 0n,\n     *    gasLimit: 30000000n,\n     *    gasUsed: 0n,\n     *    timestamp: 1658281638n,\n     *    extraData: '0x',\n     *    mixHash: '0x0000000000000000000000000000000000000000000000000000000000000000',\n     *    nonce: 0n,\n     *    totalDifficulty: 1n,\n     *    baseFeePerGas: 1000000000n,\n     *    size: 514n,\n     *    transactions: [],\n     *    uncles: []\n     *  }\n     *\n     * web3.eth.getUncle(\n     *      \"0x7dbfdc6a7a67a670cb9b0c3f81ca60c007762f1e4e598cb027a470678ff26d0d\",\n     *      1,\n     *      { number: FMT_NUMBER.NUMBER , bytes: FMT_BYTES.HEX }\n     * ).then(console.log);\n     * > {\n     *    hash: '0x7dbfdc6a7a67a670cb9b0c3f81ca60c007762f1e4e598cb027a470678ff26d0d',\n     *    parentHash: '0x0000000000000000000000000000000000000000000000000000000000000000',\n     *    sha3Uncles: '0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347',\n     *    miner: '0x0000000000000000000000000000000000000000',\n     *    stateRoot: '0x5ed9882897d363c4632a6e67fba6203df61bd994813dcf048da59be442a9c6c4',\n     *    transactionsRoot: '0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421',\n     *    receiptsRoot: '0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421',\n     *    logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',\n     *    difficulty: 1,\n     *    number: 0,\n     *    gasLimit: 30000000,\n     *    gasUsed: 0,\n     *    timestamp: 1658281638,\n     *    extraData: '0x',\n     *    mixHash: '0x0000000000000000000000000000000000000000000000000000000000000000',\n     *    nonce: 0,\n     *    totalDifficulty: 1,\n     *    baseFeePerGas: 1000000000,\n     *    size: 514,\n     *    transactions: [],\n     *    uncles: []\n     *  }\n     * ```\n     */\n    getUncle() {\n        return __awaiter(this, arguments, void 0, function* (block = this.defaultBlock, uncleIndex, returnFormat = this.defaultReturnFormat) {\n            return rpcMethodsWrappers.getUncle(this, block, uncleIndex, returnFormat);\n        });\n    }\n    /**\n     * @param transactionHash The hash of the desired transaction.\n     * @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) Specifies how the return data should be formatted.\n     * @returns The desired transaction object.\n     *\n     * ```ts\n     * web3.eth.getTransaction('0x73aea70e969941f23f9d24103e91aa1f55c7964eb13daf1c9360c308a72686dc').then(console.log);\n     * {\n     *    hash: '0x73aea70e969941f23f9d24103e91aa1f55c7964eb13daf1c9360c308a72686dc',\n     *    type: 0n,\n     *    nonce: 0n,\n     *    blockHash: '0x43202bd16b6bd54bea1b310736bd78bdbe93a64ad940f7586739d9eb25ad8d00',\n     *    blockNumber: 1n,\n     *    transactionIndex: 0n,\n     *    from: '0x6e599da0bff7a6598ac1224e4985430bf16458a4',\n     *    to: '0x6f1df96865d09d21e8f3f9a7fba3b17a11c7c53c',\n     *    value: 1n,\n     *    gas: 90000n,\n     *    gasPrice: 2000000000n,\n     *    input: '0x',\n     *    v: 2709n,\n     *    r: '0x8b336c290f6d7b2af3ccb2c02203a8356cc7d5b150ab19cce549d55636a3a78c',\n     *    s: '0x5a83c6f816befc5cd4b0c997a347224a8aa002e5799c4b082a3ec726d0e9531d'\n     *  }\n     *\n     * web3.eth.getTransaction(\n     *     web3.utils.hexToBytes(\"0x30755ed65396facf86c53e6217c52b4daebe72aa4941d89635409de4c9c7f9466d4e9aaec7977f05e923889b33c0d0dd27d7226b6e6f56ce737465c5cfd04be400\"),\n     *     { number: FMT_NUMBER.NUMBER , bytes: FMT_BYTES.HEX }\n     * ).then(console.log);\n     * {\n     *    hash: '0x73aea70e969941f23f9d24103e91aa1f55c7964eb13daf1c9360c308a72686dc',\n     *    type: 0,\n     *    nonce: 0,\n     *    blockHash: '0x43202bd16b6bd54bea1b310736bd78bdbe93a64ad940f7586739d9eb25ad8d00',\n     *    blockNumber: 1,\n     *    transactionIndex: 0,\n     *    from: '0x6e599da0bff7a6598ac1224e4985430bf16458a4',\n     *    to: '0x6f1df96865d09d21e8f3f9a7fba3b17a11c7c53c',\n     *    value: 1,\n     *    gas: 90000,\n     *    gasPrice: 2000000000,\n     *    input: '0x',\n     *    v: 2709,\n     *    r: '0x8b336c290f6d7b2af3ccb2c02203a8356cc7d5b150ab19cce549d55636a3a78c',\n     *    s: '0x5a83c6f816befc5cd4b0c997a347224a8aa002e5799c4b082a3ec726d0e9531d'\n     *  }\n     * ```\n     */\n    getTransaction(transactionHash_1) {\n        return __awaiter(this, arguments, void 0, function* (transactionHash, returnFormat = this.defaultReturnFormat) {\n            const response = yield rpcMethodsWrappers.getTransaction(this, transactionHash, returnFormat);\n            if (!response)\n                throw new TransactionNotFound();\n            return response;\n        });\n    }\n    /**\n     * @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) Specifies how the return data should be formatted.\n     * @returns A list of pending transactions.\n     *\n     * ```ts\n     * web3.eth.getPendingTransactions().then(console.log);\n     * > [\n     *      {\n     *          hash: '0x73aea70e969941f23f9d24103e91aa1f55c7964eb13daf1c9360c308a72686dc',\n     *          type: 0n,\n     *          nonce: 0n,\n     *          blockHash: '0x0000000000000000000000000000000000000000000000000000000000000000',\n     *          blockNumber: null,\n     *          transactionIndex: 0n,\n     *          from: '0x6e599da0bff7a6598ac1224e4985430bf16458a4',\n     *          to: '0x6f1df96865d09d21e8f3f9a7fba3b17a11c7c53c',\n     *          value: 1n,\n     *          gas: 90000n,\n     *          gasPrice: 2000000000n,\n     *          input: '0x',\n     *          v: 2709n,\n     *          r: '0x8b336c290f6d7b2af3ccb2c02203a8356cc7d5b150ab19cce549d55636a3a78c',\n     *          s: '0x5a83c6f816befc5cd4b0c997a347224a8aa002e5799c4b082a3ec726d0e9531d'\n     *      },\n     *      {\n     *          hash: '0xdf7756865c2056ce34c4eabe4eff42ad251a9f920a1c620c00b4ea0988731d3f',\n     *          type: 0n,\n     *          nonce: 1n,\n     *          blockHash: '0x0000000000000000000000000000000000000000000000000000000000000000',\n     *          blockNumber: null,\n     *          transactionIndex: 0n,\n     *          from: '0x6e599da0bff7a6598ac1224e4985430bf16458a4',\n     *          to: '0x6f1df96865d09d21e8f3f9a7fba3b17a11c7c53c',\n     *          value: 1n,\n     *          gas: 90000n,\n     *          gasPrice: 2000000000n,\n     *          input: '0x',\n     *          v: 2710n,\n     *          r: '0x55ac19fade21db035a1b7ea0a8d49e265e05dbb926e75f273f836ad67ce5c96a',\n     *          s: '0x6550036a7c3fd426d5c3d35d96a7075cd673957620b7889846a980d2d017ec08'\n     *      }\n     *   ]\n     *\n     * * web3.eth.getPendingTransactions({ number: FMT_NUMBER.NUMBER , bytes: FMT_BYTES.HEX }).then(console.log);\n     * > [\n     *      {\n     *          hash: '0x73aea70e969941f23f9d24103e91aa1f55c7964eb13daf1c9360c308a72686dc',\n     *          type: 0,\n     *          nonce: 0,\n     *          blockHash: '0x0000000000000000000000000000000000000000000000000000000000000000',\n     *          blockNumber: null,\n     *          transactionIndex: 0,\n     *          from: '0x6e599da0bff7a6598ac1224e4985430bf16458a4',\n     *          to: '0x6f1df96865d09d21e8f3f9a7fba3b17a11c7c53c',\n     *          value: 1,\n     *          gas: 90000,\n     *          gasPrice: 2000000000,\n     *          input: '0x',\n     *          v: 2709,\n     *          r: '0x8b336c290f6d7b2af3ccb2c02203a8356cc7d5b150ab19cce549d55636a3a78c',\n     *          s: '0x5a83c6f816befc5cd4b0c997a347224a8aa002e5799c4b082a3ec726d0e9531d'\n     *      },\n     *      {\n     *          hash: '0xdf7756865c2056ce34c4eabe4eff42ad251a9f920a1c620c00b4ea0988731d3f',\n     *          type: 0,\n     *          nonce: 1,\n     *          blockHash: '0x0000000000000000000000000000000000000000000000000000000000000000',\n     *          blockNumber: null,\n     *          transactionIndex: 0,\n     *          from: '0x6e599da0bff7a6598ac1224e4985430bf16458a4',\n     *          to: '0x6f1df96865d09d21e8f3f9a7fba3b17a11c7c53c',\n     *          value: 1,\n     *          gas: 90000,\n     *          gasPrice: 2000000000,\n     *          input: '0x',\n     *          v: 2710,\n     *          r: '0x55ac19fade21db035a1b7ea0a8d49e265e05dbb926e75f273f836ad67ce5c96a',\n     *          s: '0x6550036a7c3fd426d5c3d35d96a7075cd673957620b7889846a980d2d017ec08'\n     *      }\n     *   ]\n     * ```\n     */\n    getPendingTransactions() {\n        return __awaiter(this, arguments, void 0, function* (returnFormat = this.defaultReturnFormat) {\n            return rpcMethodsWrappers.getPendingTransactions(this, returnFormat);\n        });\n    }\n    /**\n     * @param block The {@link BlockNumberOrTag} (defaults to {@link Web3Eth.defaultBlock}) or block hash of the desired block.\n     * @param transactionIndex The index position of the transaction.\n     * @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) Specifies how the return data should be formatted.\n     * @returns The desired transaction object.\n     *\n     * ```ts\n     * web3.eth.getTransactionFromBlock('0x43202bd16b6bd54bea1b310736bd78bdbe93a64ad940f7586739d9eb25ad8d00', 0).then(console.log);\n     * {\n     *    hash: '0x73aea70e969941f23f9d24103e91aa1f55c7964eb13daf1c9360c308a72686dc',\n     *    type: 0n,\n     *    nonce: 0n,\n     *    blockHash: '0x43202bd16b6bd54bea1b310736bd78bdbe93a64ad940f7586739d9eb25ad8d00',\n     *    blockNumber: 1n,\n     *    transactionIndex: 0n,\n     *    from: '0x6e599da0bff7a6598ac1224e4985430bf16458a4',\n     *    to: '0x6f1df96865d09d21e8f3f9a7fba3b17a11c7c53c',\n     *    value: 1n,\n     *    gas: 90000n,\n     *    gasPrice: 2000000000n,\n     *    input: '0x',\n     *    v: 2709n,\n     *    r: '0x8b336c290f6d7b2af3ccb2c02203a8356cc7d5b150ab19cce549d55636a3a78c',\n     *    s: '0x5a83c6f816befc5cd4b0c997a347224a8aa002e5799c4b082a3ec726d0e9531d'\n     *  }\n     *\n     * web3.eth.getTransactionFromBlock(\n     *     hexToBytes(\"0x30755ed65396facf86c53e6217c52b4daebe72aa4941d89635409de4c9c7f9466d4e9aaec7977f05e923889b33c0d0dd27d7226b6e6f56ce737465c5cfd04be400\"),\n     *     0,\n     *     { number: FMT_NUMBER.NUMBER , bytes: FMT_BYTES.HEX }\n     * ).then(console.log);\n     * {\n     *    hash: '0x73aea70e969941f23f9d24103e91aa1f55c7964eb13daf1c9360c308a72686dc',\n     *    type: 0,\n     *    nonce: 0,\n     *    blockHash: '0x43202bd16b6bd54bea1b310736bd78bdbe93a64ad940f7586739d9eb25ad8d00',\n     *    blockNumber: 1,\n     *    transactionIndex: 0,\n     *    from: '0x6e599da0bff7a6598ac1224e4985430bf16458a4',\n     *    to: '0x6f1df96865d09d21e8f3f9a7fba3b17a11c7c53c',\n     *    value: 1,\n     *    gas: 90000,\n     *    gasPrice: 2000000000,\n     *    input: '0x',\n     *    v: 2709,\n     *    r: '0x8b336c290f6d7b2af3ccb2c02203a8356cc7d5b150ab19cce549d55636a3a78c',\n     *    s: '0x5a83c6f816befc5cd4b0c997a347224a8aa002e5799c4b082a3ec726d0e9531d'\n     *  }\n     * ```\n     */\n    getTransactionFromBlock() {\n        return __awaiter(this, arguments, void 0, function* (block = this.defaultBlock, transactionIndex, returnFormat = this.defaultReturnFormat) {\n            return rpcMethodsWrappers.getTransactionFromBlock(this, block, transactionIndex, returnFormat);\n        });\n    }\n    /**\n     * @param transactionHash Hash of the transaction to retrieve the receipt for.\n     * @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) Specifies how the return data should be formatted.\n     * @returns The desired {@link TransactionReceipt} object.\n     *\n     * ```ts\n     * web3.eth.getTransactionReceipt(\"0xdf7756865c2056ce34c4eabe4eff42ad251a9f920a1c620c00b4ea0988731d3f\").then(console.log);\n     * > {\n     *      transactionHash: '0xdf7756865c2056ce34c4eabe4eff42ad251a9f920a1c620c00b4ea0988731d3f',\n     *      transactionIndex: 0n,\n     *      blockNumber: 2n,\n     *      blockHash: '0xeb1565a08b23429552dafa92e32409f42eb43944f7611963c63ce40e7243941a',\n     *      from: '0x6e599da0bff7a6598ac1224e4985430bf16458a4',\n     *      to: '0x6f1df96865d09d21e8f3f9a7fba3b17a11c7c53c',\n     *      cumulativeGasUsed: 21000n,\n     *      gasUsed: 21000n,\n     *      logs: [],\n     *      logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',\n     *      status: 1n,\n     *      effectiveGasPrice: 2000000000n,\n     *      type: 0n\n     *  }\n     *\n     * web3.eth.getTransactionReceipt(\n     *      \"0xdf7756865c2056ce34c4eabe4eff42ad251a9f920a1c620c00b4ea0988731d3f\",\n     *      { number: FMT_NUMBER.NUMBER , bytes: FMT_BYTES.HEX }\n     * ).then(console.log);\n     * > {\n     *      transactionHash: '0xdf7756865c2056ce34c4eabe4eff42ad251a9f920a1c620c00b4ea0988731d3f',\n     *      transactionIndex: 0,\n     *      blockNumber: 2,\n     *      blockHash: '0xeb1565a08b23429552dafa92e32409f42eb43944f7611963c63ce40e7243941a',\n     *      from: '0x6e599da0bff7a6598ac1224e4985430bf16458a4',\n     *      to: '0x6f1df96865d09d21e8f3f9a7fba3b17a11c7c53c',\n     *      cumulativeGasUsed: 21000,\n     *      gasUsed: 21000,\n     *      logs: [],\n     *      logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',\n     *      status: 1,\n     *      effectiveGasPrice: 2000000000,\n     *      type: 0n\n     *  }\n     * ```\n     */\n    getTransactionReceipt(transactionHash_1) {\n        return __awaiter(this, arguments, void 0, function* (transactionHash, returnFormat = this.defaultReturnFormat) {\n            const response = yield rpcMethodsWrappers.getTransactionReceipt(this, transactionHash, returnFormat);\n            if (!response)\n                throw new TransactionNotFound();\n            return response;\n        });\n    }\n    /**\n     * @param address The address to get the number of transactions for.\n     * @param blockNumber ({@link BlockNumberOrTag} defaults to {@link Web3Eth.defaultBlock}) Specifies what block to use as the current state for the query.\n     * @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) Specifies how the return data should be formatted.\n     * @returns The number of transactions sent from the provided address.\n     *\n     * ```ts\n     * web3.eth.getTransactionCount(\"0x407d73d8a49eeb85d32cf465507dd71d507100c1\").then(console.log);\n     * > 1n\n     *\n     * web3.eth.getTransactionCount(\n     *     \"0x407d73d8a49eeb85d32cf465507dd71d507100c1\",\n     *     undefined,\n     *     { number: FMT_NUMBER.NUMBER , bytes: FMT_BYTES.HEX }\n     * ).then(console.log);\n     * > 1\n     * ```\n     */\n    getTransactionCount(address_1) {\n        return __awaiter(this, arguments, void 0, function* (address, blockNumber = this.defaultBlock, returnFormat = this.defaultReturnFormat) {\n            return rpcMethodsWrappers.getTransactionCount(this, address, blockNumber, returnFormat);\n        });\n    }\n    /**\n     * @param transaction The {@link Transaction}, {@link TransactionWithFromLocalWalletIndex}, {@link TransactionWithToLocalWalletIndex} or {@link TransactionWithFromAndToLocalWalletIndex} to send. __Note:__ In the `to` and `from` fields when hex strings are used, it is assumed they are addresses, for any other form (number, string number, etc.) it is assumed they are wallet indexes.\n     * @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) Specifies how the return data should be formatted.\n     * @param options A configuration object used to change the behavior of the `sendTransaction` method.\n     * @returns If `await`ed or `.then`d (i.e. the promise resolves), the transaction hash is returned.\n     * ```ts\n     * const transaction = {\n     *   from: '0x6E599DA0bfF7A6598AC1224E4985430Bf16458a4',\n     *   to: '0x6f1DF96865D09d21e8f3f9a7fbA3b17A11c7C53C',\n     *   value: '0x1'\n     * }\n     *\n     * const transactionReceipt = await web3.eth.sendTransaction(transaction);\n     * console.log(transactionReceipt);\n     * > {\n     *      blockHash: '0x39cee0da843293ae3136cee0de4c0803745868b6e72b7cd05fba395bffa0ee85',\n     *      blockNumber: 6659547n,\n     *      cumulativeGasUsed: 1029036n,\n     *      effectiveGasPrice: 6765796845n,\n     *      from: '0x6E599DA0bfF7A6598AC1224E4985430Bf16458a4',\n     *      gasUsed: 21000n,\n     *      logs: [],\n     *      logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',\n     *      status: 1n,\n     *      to: '0x6f1df96865d09d21e8f3f9a7fba3b17a11c7c53c',\n     *      transactionHash: '0x619de868dd73c07bd0c096adcd405c93c1e924fdf741e684a127a52324c28bb9',\n     *      transactionIndex: 16n,\n     *      type: 2n\n     *}\n     *\n     * web3.eth.sendTransaction(transaction).then(console.log);\n     * > {\n     *      blockHash: '0x39cee0da843293ae3136cee0de4c0803745868b6e72b7cd05fba395bffa0ee85',\n     *      blockNumber: 6659547n,\n     *      cumulativeGasUsed: 1029036n,\n     *      effectiveGasPrice: 6765796845n,\n     *      from: '0x6E599DA0bfF7A6598AC1224E4985430Bf16458a4',\n     *      gasUsed: 21000n,\n     *      logs: [],\n     *      logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',\n     *      status: 1n,\n     *      to: '0x6f1df96865d09d21e8f3f9a7fba3b17a11c7c53c',\n     *      transactionHash: '0x619de868dd73c07bd0c096adcd405c93c1e924fdf741e684a127a52324c28bb9',\n     *      transactionIndex: 16n,\n     *      type: 2n\n     *}\n     *\n     * web3.eth.sendTransaction(transaction).catch(console.log);\n     * > <Some TransactionError>\n     *\n     * // Example using options.ignoreGasPricing = true\n     * web3.eth.sendTransaction(transaction, undefined, { ignoreGasPricing: true }).then(console.log);\n     * > {\n     *      blockHash: '0x39cee0da843293ae3136cee0de4c0803745868b6e72b7cd05fba395bffa0ee85',\n     *      blockNumber: 6659547n,\n     *      cumulativeGasUsed: 1029036n,\n     *      effectiveGasPrice: 6765796845n,\n     *      from: '0x6E599DA0bfF7A6598AC1224E4985430Bf16458a4',\n     *      gasUsed: 21000n,\n     *      logs: [],\n     *      logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',\n     *      status: 1n,\n     *      to: '0x6f1df96865d09d21e8f3f9a7fba3b17a11c7c53c',\n     *      transactionHash: '0x619de868dd73c07bd0c096adcd405c93c1e924fdf741e684a127a52324c28bb9',\n     *      transactionIndex: 16n,\n     *      type: 2n\n     *}\n     * ```\n     *\n     *\n     * Otherwise, a {@link Web3PromiEvent} is returned which has several events than can be listened to using the `.on` syntax, such as:\n     * - `sending`\n     * ```ts\n     * web3.eth.sendTransaction(transaction).on('sending', transactionToBeSent => console.log(transactionToBeSent));\n     * > {\n     *      from: '0x6E599DA0bfF7A6598AC1224E4985430Bf16458a4',\n     *      to: '0x6f1DF96865D09d21e8f3f9a7fbA3b17A11c7C53C',\n     *      value: '0x1',\n     *      gasPrice: '0x77359400',\n     *      maxPriorityFeePerGas: undefined,\n     *      maxFeePerGas: undefined\n     * }\n     * ```\n     * - `sent`\n     * ```ts\n     * web3.eth.sendTransaction(transaction).on('sent', sentTransaction => console.log(sentTransaction));\n     * > {\n     *      from: '0x6E599DA0bfF7A6598AC1224E4985430Bf16458a4',\n     *      to: '0x6f1DF96865D09d21e8f3f9a7fbA3b17A11c7C53C',\n     *      value: '0x1',\n     *      gasPrice: '0x77359400',\n     *      maxPriorityFeePerGas: undefined,\n     *      maxFeePerGas: undefined\n     * }\n     * ```\n     * - `transactionHash`\n     * ```ts\n     * web3.eth.sendTransaction(transaction).on('transactionHash', transactionHash => console.log(transactionHash));\n     * > 0xdf7756865c2056ce34c4eabe4eff42ad251a9f920a1c620c00b4ea0988731d3f\n     * ```\n     * - `receipt`\n     * ```ts\n     * web3.eth.sendTransaction(transaction).on('receipt', receipt => console.log(receipt));\n     * > {\n     *      transactionHash: '0xdf7756865c2056ce34c4eabe4eff42ad251a9f920a1c620c00b4ea0988731d3f',\n     *      transactionIndex: 0n,\n     *      blockNumber: 2n,\n     *      blockHash: '0xeb1565a08b23429552dafa92e32409f42eb43944f7611963c63ce40e7243941a',\n     *      from: '0x6e599da0bff7a6598ac1224e4985430bf16458a4',\n     *      to: '0x6f1df96865d09d21e8f3f9a7fba3b17a11c7c53c',\n     *      cumulativeGasUsed: 21000n,\n     *      gasUsed: 21000n,\n     *      logs: [],\n     *      logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',\n     *      status: 1n,\n     *      effectiveGasPrice: 2000000000n,\n     *      type: 0n\n     * }\n     * ```\n     * - `confirmation`\n     * ```ts\n     * web3.eth.sendTransaction(transaction).on('confirmation', confirmation => console.log(confirmation));\n     * > {\n     *      confirmations: 1n,\n     *      receipt: {\n     *         transactionHash: '0xb4a3a35ae0f3e77ef0ff7be42010d948d011b21a4e341072ee18717b67e99ab8',\n     *         transactionIndex: 0n,\n     *         blockNumber: 5n,\n     *         blockHash: '0xb57fbe6f145cefd86a305a9a024a4351d15d4d39607d7af53d69a319bc3b5548',\n     *         from: '0x6e599da0bff7a6598ac1224e4985430bf16458a4',\n     *         to: '0x6f1df96865d09d21e8f3f9a7fba3b17a11c7c53c',\n     *         cumulativeGasUsed: 21000n,\n     *         gasUsed: 21000n,\n     *         logs: [],\n     *         logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',\n     *         status: 1n,\n     *         effectiveGasPrice: 2000000000n,\n     *         type: 0n\n     *      },\n     *      latestBlockHash: '0xb57fbe6f145cefd86a305a9a024a4351d15d4d39607d7af53d69a319bc3b5548'\n     * }\n     * ```\n     * - `error`\n     * ```ts\n     * web3.eth.sendTransaction(transaction).on('error', error => console.log);\n     * > <Some TransactionError>\n     * ```\n     */\n    sendTransaction(transaction, returnFormat = this.defaultReturnFormat, options) {\n        return rpcMethodsWrappers.sendTransaction(this, transaction, returnFormat, options, this.transactionMiddleware);\n    }\n    /**\n     * @param transaction Signed transaction in one of the valid {@link Bytes} format.\n     * @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) Specifies how the return data should be formatted.\n     * @param options A configuration object used to change the behavior of the method\n     * @returns If `await`ed or `.then`d (i.e. the promise resolves), the transaction hash is returned.\n     * ```ts\n     * const signedTransaction = \"0xf86580843b9aca0182520894e899f0130fd099c0b896b2ce4e5e15a25b23139a0180820a95a03a42d53ca5b71f845e1cd4c65359b05446a85d16881372d3bfaab8980935cb04a0711497bc8dd3b541152e2fed14fe650a647f1f0edab0d386ad9506f0e642410f\"\n     *\n     * const transactionHash = await web3.eth.sendSignedTransaction(signedTransaction);\n     * console.log(transactionHash);\n     * > 0xed8c241ea44d57f4605dc22c63500de46254d6c7844fd65fa438b128c80cf700\n     *\n     * web3.eth.sendSignedTransaction(signedTransaction).then(console.log);\n     * > 0xed8c241ea44d57f4605dc22c63500de46254d6c7844fd65fa438b128c80cf700\n     *\n     * web3.eth.sendSignedTransaction(signedTransaction).catch(console.log);\n     * > <Some TransactionError>\n     * ```\n     *\n     *\n     * Otherwise, a {@link Web3PromiEvent} is returned which has several events than can be listened to using the `.on` syntax, such as:\n     * - `sending`\n     * ```ts\n     * web3.eth.sendSignedTransaction(signedTransaction).on('sending', transactionToBeSent => console.log(transactionToBeSent));\n     * > \"0xf86580843b9aca0182520894e899f0130fd099c0b896b2ce4e5e15a25b23139a0180820a95a03a42d53ca5b71f845e1cd4c65359b05446a85d16881372d3bfaab8980935cb04a0711497bc8dd3b541152e2fed14fe650a647f1f0edab0d386ad9506f0e642410f\"\n     * ```\n     * - `sent`\n     * ```ts\n     * web3.eth.sendSignedTransaction(signedTransaction).on('sent', sentTransaction => console.log(sentTransaction));\n     * > \"0xf86580843b9aca0182520894e899f0130fd099c0b896b2ce4e5e15a25b23139a0180820a95a03a42d53ca5b71f845e1cd4c65359b05446a85d16881372d3bfaab8980935cb04a0711497bc8dd3b541152e2fed14fe650a647f1f0edab0d386ad9506f0e642410f\"\n     * ```\n     * - `transactionHash`\n     * ```ts\n     * web3.eth.sendSignedTransaction(signedTransaction).on('transactionHash', transactionHash => console.log(transactionHash));\n     * > 0xed8c241ea44d57f4605dc22c63500de46254d6c7844fd65fa438b128c80cf700\n     * ```\n     * - `receipt`\n     * ```ts\n     * web3.eth.sendSignedTransaction(signedTransaction).on('receipt', receipt => console.log(receipt));\n     * > {\n     *      blockHash: '0xff2b1687995d81066361bc6affe4455746120a7d4bb75fc938211a2692a50081',\n     *      blockNumber: 1n,\n     *      cumulativeGasUsed: 21000n,\n     *      effectiveGasPrice: 1000000001n,\n     *      from: '0xe899f0130fd099c0b896b2ce4e5e15a25b23139a',\n     *      gasUsed: 21000n,\n     *      logs: [],\n     *      logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',\n     *      status: 1n,\n     *      to: '0xe899f0130fd099c0b896b2ce4e5e15a25b23139a',\n     *      transactionHash: '0xed8c241ea44d57f4605dc22c63500de46254d6c7844fd65fa438b128c80cf700',\n     *      transactionIndex: 0n,\n     *      type: 0n\n     * }\n     * ```\n     * - `confirmation`\n     * ```ts\n     * web3.eth.sendSignedTransaction(signedTransaction).on('confirmation', confirmation => console.log(confirmation));\n     * > {\n     *     confirmations: 1n,\n     *     receipt: {\n     *          blockHash: '0xff2b1687995d81066361bc6affe4455746120a7d4bb75fc938211a2692a50081',\n     *          blockNumber: 1n,\n     *          cumulativeGasUsed: 21000n,\n     *          effectiveGasPrice: 1000000001n,\n     *          from: '0xe899f0130fd099c0b896b2ce4e5e15a25b23139a',\n     *          gasUsed: 21000n,\n     *          logs: [],\n     *          logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',\n     *          status: 1n,\n     *          to: '0xe899f0130fd099c0b896b2ce4e5e15a25b23139a',\n     *          transactionHash: '0xed8c241ea44d57f4605dc22c63500de46254d6c7844fd65fa438b128c80cf700',\n     *          transactionIndex: 0n,\n     *          type: 0n\n     *     },\n     *     latestBlockHash: '0xff2b1687995d81066361bc6affe4455746120a7d4bb75fc938211a2692a50081'\n     * }\n     * ```\n     * - `error`\n     * ```ts\n     * web3.eth.sendSignedTransaction(signedTransaction).on('error', error => console.log(error));\n     * > <Some TransactionError>\n     * ```\n     */\n    sendSignedTransaction(transaction, returnFormat = this.defaultReturnFormat, options) {\n        return rpcMethodsWrappers.sendSignedTransaction(this, transaction, returnFormat, options);\n    }\n    /**\n     * @param message Data to sign in one of the valid {@link Bytes} format.\n     * @param address Address to sign data with, can be an address or the index of a local wallet.\n     * @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) Specifies how the return data should be formatted.\n     * @returns The signed `message`.\n     *\n     * ```ts\n     * // Using an unlocked account managed by connected RPC client\n     * web3.eth.sign(\"0x48656c6c6f20776f726c64\", \"0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe\").then(console.log);\n     * > \"0x30755ed65396facf86c53e6217c52b4daebe72aa4941d89635409de4c9c7f9466d4e9aaec7977f05e923889b33c0d0dd27d7226b6e6f56ce737465c5cfd04be400\"\n     *\n     * // Using an unlocked account managed by connected RPC client\n     * web3.eth.sign(\"0x48656c6c6f20776f726c64\", \"0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe\", { number: FMT_NUMBER.NUMBER , bytes: FMT_BYTES.UINT8ARRAY }).then(console.log);\n     * > Uint8Array(65) [\n     *    48, 117,  94, 214,  83, 150, 250, 207, 134, 197,  62,\n     *    98,  23, 197,  43,  77, 174, 190, 114, 170,  73,  65,\n     *   216, 150,  53,  64, 157, 228, 201, 199, 249,  70, 109,\n     *    78, 154, 174, 199, 151, 127,   5, 233,  35, 136, 155,\n     *    51, 192, 208, 221,  39, 215,  34, 107, 110, 111,  86,\n     *   206, 115, 116, 101, 197, 207, 208,  75, 228,   0\n     * ]\n     * ```\n     *\n     * // Using an indexed account managed by local Web3 wallet\n     * web3.eth.sign(\"0x48656c6c6f20776f726c64\", 0).then(console.log);\n     * > \"0x30755ed65396facf86c53e6217c52b4daebe72aa4941d89635409de4c9c7f9466d4e9aaec7977f05e923889b33c0d0dd27d7226b6e6f56ce737465c5cfd04be400\"\n     */\n    sign(message_1, addressOrIndex_1) {\n        return __awaiter(this, arguments, void 0, function* (message, addressOrIndex, returnFormat = this.defaultReturnFormat) {\n            return rpcMethodsWrappers.sign(this, message, addressOrIndex, returnFormat);\n        });\n    }\n    /**\n     * @param transaction The transaction object to sign.\n     * @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) Specifies how the return data should be formatted.\n     * @returns {@link SignedTransactionInfoAPI}, an object containing the [RLP](https://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp/#top) encoded signed transaction (accessed via the `raw` property) and the signed transaction object (accessed via the `tx` property).\n     *\n     * ```ts\n     * const transaction = {\n     *      from: '0xe899f0130FD099c0b896B2cE4E5E15A25b23139a',\n     *      to: '0xe899f0130FD099c0b896B2cE4E5E15A25b23139a',\n     *      value: '0x1',\n     *      gas: '21000',\n     *      gasPrice: await web3Eth.getGasPrice(),\n     *      nonce: '0x1',\n     *      type: '0x0'\n     * }\n     *\n     * web3.eth.signTransaction(transaction).then(console.log);\n     * > {\n     *   raw: '0xf86501843b9aca0182520894e899f0130fd099c0b896b2ce4e5e15a25b23139a0180820a96a0adb3468dbb4dce89fe1785ea9182e85fb56b399b378f82b93af7a8a12a4f9679a027d37d736e9bcf00121f78b2d10e4404fa5c45856d62b746574345f5cd278097',\n     *   tx: {\n     *      type: 0n,\n     *      nonce: 1n,\n     *      gasPrice: 1000000001n,\n     *      gas: 21000n,\n     *      value: 1n,\n     *      v: 2710n,\n     *      r: '0xadb3468dbb4dce89fe1785ea9182e85fb56b399b378f82b93af7a8a12a4f9679',\n     *      s: '0x27d37d736e9bcf00121f78b2d10e4404fa5c45856d62b746574345f5cd278097',\n     *      to: '0xe899f0130fd099c0b896b2ce4e5e15a25b23139a',\n     *      data: '0x'\n     *   }\n     * }\n     *\n     * web3.eth.signTransaction(transaction, { number: FMT_NUMBER.NUMBER , bytes: FMT_BYTES.HEX }).then(console.log);\n     * > {\n     *   raw: '0xf86501843b9aca0182520894e899f0130fd099c0b896b2ce4e5e15a25b23139a0180820a96a0adb3468dbb4dce89fe1785ea9182e85fb56b399b378f82b93af7a8a12a4f9679a027d37d736e9bcf00121f78b2d10e4404fa5c45856d62b746574345f5cd278097',\n     *   tx: {\n     *      type: 0,\n     *      nonce: 1,\n     *      gasPrice: 1000000001,\n     *      gas: 21000,\n     *      value: 1,\n     *      v: 2710,\n     *      r: '0xadb3468dbb4dce89fe1785ea9182e85fb56b399b378f82b93af7a8a12a4f9679',\n     *      s: '0x27d37d736e9bcf00121f78b2d10e4404fa5c45856d62b746574345f5cd278097',\n     *      to: '0xe899f0130fd099c0b896b2ce4e5e15a25b23139a',\n     *      data: '0x'\n     *   }\n     * }\n     * ```\n     */\n    signTransaction(transaction_1) {\n        return __awaiter(this, arguments, void 0, function* (transaction, returnFormat = this.defaultReturnFormat) {\n            return rpcMethodsWrappers.signTransaction(this, transaction, returnFormat);\n        });\n    }\n    // TODO Decide what to do with transaction.to\n    // https://github.com/ChainSafe/web3.js/pull/4525#issuecomment-982330076\n    /**\n     * Executes a message call within the EVM without creating a transaction.\n     * It does not publish anything to the blockchain and does not consume any gas.\n     *\n     * @param transaction - A transaction object where all properties are optional except `to`, however it's recommended to include the `from` property or it may default to `0x0000000000000000000000000000000000000000` depending on your node or provider.\n     * @param blockNumber ({@link BlockNumberOrTag} defaults to {@link Web3Eth.defaultBlock}) - Specifies what block to use as the current state of the blockchain while processing the transaction.\n     * @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) - Specifies how the return data from the call should be formatted.\n     * @returns The returned data of the call, e.g. a smart contract function's return value.\n     */\n    call(transaction_1) {\n        return __awaiter(this, arguments, void 0, function* (transaction, blockNumber = this.defaultBlock, returnFormat = this.defaultReturnFormat) {\n            return rpcMethodsWrappers.call(this, transaction, blockNumber, returnFormat);\n        });\n    }\n    /**\n     * Simulates the transaction within the EVM to estimate the amount of gas to be used by the transaction.\n     * The transaction will not be added to the blockchain, and actual gas usage can vary when interacting\n     * with a contract as a result of updating the contract's state.\n     *\n     * @param transaction The {@link Transaction} object to estimate the gas for.\n     * @param blockNumber ({@link BlockNumberOrTag} defaults to {@link Web3Eth.defaultBlock}) - Specifies what block to use as the current state of the blockchain while processing the gas estimation.\n     * @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) - Specifies how the return data from the call should be formatted.\n     * @returns The used gas for the simulated transaction execution.\n     *\n     * ```ts\n     * const transaction = {\n     *       from: '0xe899f0130FD099c0b896B2cE4E5E15A25b23139a',\n     *       to: '0xe899f0130FD099c0b896B2cE4E5E15A25b23139a',\n     *       value: '0x1',\n     *       nonce: '0x1',\n     *       type: '0x0'\n     * }\n     *\n     * web3.eth.estimateGas(transaction).then(console.log);\n     * > 21000n\n     *\n     * web3.eth.estimateGas(transaction, { number: FMT_NUMBER.NUMBER , bytes: FMT_BYTES.HEX }).then(console.log);\n     * > 21000\n     * ```\n     */\n    estimateGas(transaction_1) {\n        return __awaiter(this, arguments, void 0, function* (transaction, blockNumber = this.defaultBlock, returnFormat = this.defaultReturnFormat) {\n            return rpcMethodsWrappers.estimateGas(this, transaction, blockNumber, returnFormat);\n        });\n    }\n    /**\n     * Gets past logs, matching the provided `filter`.\n     *\n     * @param filter A {@link Filter} object containing the properties for the desired logs.\n     * @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) - Specifies how the return data from the call should be formatted.\n     * @returns {@link FilterResultsAPI}, an array of {@link Log} objects.\n     *\n     * ```ts\n     * web3.eth.getPastLogs({\n     *      address: \"0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe\",\n     *      topics: [\"0x033456732123ffff2342342dd12342434324234234fd234fd23fd4f23d4234\"]\n     *  }).then(console.log);\n     * > [{\n     *       data: '0x7f9fade1c0d57a7af66ab4ead79fade1c0d57a7af66ab4ead7c2c2eb7b11a91385',\n     *       topics: ['0xfd43ade1c09fade1c0d57a7af66ab4ead7c2c2eb7b11a91ffdd57a7af66ab4ead7', '0x7f9fade1c0d57a7af66ab4ead79fade1c0d57a7af66ab4ead7c2c2eb7b11a91385']\n     *       logIndex: 0n,\n     *       transactionIndex: 0n,\n     *       transactionHash: '0x7f9fade1c0d57a7af66ab4ead79fade1c0d57a7af66ab4ead7c2c2eb7b11a91385',\n     *       blockHash: '0xfd43ade1c09fade1c0d57a7af66ab4ead7c2c2eb7b11a91ffdd57a7af66ab4ead7',\n     *       blockNumber: 1234n,\n     *       address: '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe'\n     *   },\n     *   {...}]\n     *\n     * web3.eth.getPastLogs(\n     *     {\n     *       address: \"0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe\",\n     *       topics: [\"0x033456732123ffff2342342dd12342434324234234fd234fd23fd4f23d4234\"]\n     *     },\n     *     { number: FMT_NUMBER.NUMBER , bytes: FMT_BYTES.HEX }\n     * ).then(console.log);\n     * > [{\n     *       data: '0x7f9fade1c0d57a7af66ab4ead79fade1c0d57a7af66ab4ead7c2c2eb7b11a91385',\n     *       topics: ['0xfd43ade1c09fade1c0d57a7af66ab4ead7c2c2eb7b11a91ffdd57a7af66ab4ead7', '0x7f9fade1c0d57a7af66ab4ead79fade1c0d57a7af66ab4ead7c2c2eb7b11a91385']\n     *       logIndex: 0,\n     *       transactionIndex: 0,\n     *       transactionHash: '0x7f9fade1c0d57a7af66ab4ead79fade1c0d57a7af66ab4ead7c2c2eb7b11a91385',\n     *       blockHash: '0xfd43ade1c09fade1c0d57a7af66ab4ead7c2c2eb7b11a91ffdd57a7af66ab4ead7',\n     *       blockNumber: 1234,\n     *       address: '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe'\n     *   },\n     *   {...}]\n     * ```\n     */\n    getPastLogs(filter_1) {\n        return __awaiter(this, arguments, void 0, function* (filter, returnFormat = this.defaultReturnFormat) {\n            return rpcMethodsWrappers.getLogs(this, filter, returnFormat);\n        });\n    }\n    /**\n     * Gets work for miners to mine on. Returns the hash of the current block, the seedHash, and the boundary condition to be met ('target').\n     *\n     * @returns The mining work as an array of strings with the following structure:\n     *\n     * String 32 Bytes - at index 0: current block header pow-hash\n     * String 32 Bytes - at index 1: the seed hash used for the DAG.\n     * String 32 Bytes - at index 2: the boundary condition ('target'), 2^256 / difficulty.\n     *\n     * ```ts\n     * web3.eth.getWork().then(console.log);\n     * > [\n     *     \"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef\",\n     *     \"0x5EED00000000000000000000000000005EED0000000000000000000000000000\",\n     *     \"0xd1ff1c01710000000000000000000000d1ff1c01710000000000000000000000\"\n     * ]\n     * ```\n     */\n    getWork() {\n        return __awaiter(this, void 0, void 0, function* () {\n            return ethRpcMethods.getWork(this.requestManager);\n        });\n    }\n    /**\n     * Used for submitting a proof-of-work solution.\n     *\n     * @param nonce The nonce found (8 bytes).\n     * @param hash  The header’s pow-hash (32 bytes).\n     * @param digest The mix digest (32 bytes).\n     * @returns Returns `true` if the provided solution is valid, otherwise `false`.\n     *\n     * ```ts\n     * web3.eth.submitWork([\n     *     \"0x0000000000000001\",\n     *     \"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef\",\n     *     \"0xD1FE5700000000000000000000000000D1FE5700000000000000000000000000\"\n     * ]).then(console.log);\n     * > true\n     * ```\n     */\n    submitWork(nonce, hash, digest) {\n        return __awaiter(this, void 0, void 0, function* () {\n            return ethRpcMethods.submitWork(this.requestManager, nonce, hash, digest);\n        });\n    }\n    // TODO - Format addresses\n    /**\n     * This method will request/enable the accounts from the current environment and for supporting [EIP 1102](https://eips.ethereum.org/EIPS/eip-1102)\n     * This method will only work if you’re using the injected provider from a application like Metamask, Status or TrustWallet.\n     * It doesn’t work if you’re connected to a node with a default Web3.js provider (WebsocketProvider, HttpProvider and IpcProvider).\n     * For more information about the behavior of this method please read [EIP-1102](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1102.md): Opt-in account exposure.\n     *\n     * @returns An array of enabled accounts.\n     *\n     * ```ts\n     * web3.eth.requestAccounts().then(console.log);\n     * > ['0aae0B295369a9FD31d5F28D9Ec85E40f4cb692BAf', '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe']\n     * ```\n     */\n    requestAccounts() {\n        return __awaiter(this, void 0, void 0, function* () {\n            return ethRpcMethods.requestAccounts(this.requestManager);\n        });\n    }\n    /**\n     * @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) - Specifies how the return data from the call should be formatted.\n     * @returns The chain ID of the current connected node as described in the [EIP-695](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-695.md).\n     *\n     * ```ts\n     * web3.eth.getChainId().then(console.log);\n     * > 61n\n     *\n     * web3.eth.getChainId({ number: FMT_NUMBER.NUMBER , bytes: FMT_BYTES.HEX }).then(console.log);\n     * > 61\n     * ```\n     */\n    getChainId() {\n        return __awaiter(this, arguments, void 0, function* (returnFormat = this.defaultReturnFormat) {\n            return rpcMethodsWrappers.getChainId(this, returnFormat);\n        });\n    }\n    /**\n     * @returns The current client version.\n     *\n     * ```ts\n     * web3.eth.getNodeInfo().then(console.log);\n     * > \"Mist/v0.9.3/darwin/go1.4.1\"\n     * ```\n     */\n    getNodeInfo() {\n        return __awaiter(this, void 0, void 0, function* () {\n            return ethRpcMethods.getNodeInfo(this.requestManager);\n        });\n    }\n    /**\n     * @param address The Address of the account or contract.\n     * @param storageKeys Array of storage-keys which should be proofed and included. See {@link web3.getStorageAt}.\n     * @param blockNumber ({@link BlockNumberOrTag} defaults to {@link Web3Eth.defaultBlock}) - Specifies what block to use as the current state of the blockchain while processing the gas estimation.\n     * @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) - Specifies how the return data from the call should be formatted.\n     * @returns The account and storage-values of the specified account including the Merkle-proof as described in [EIP-1186](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1186.md).\n     *\n     * ```ts\n     * web3.eth.getProof(\n     *     \"0x1234567890123456789012345678901234567890\",\n     *     [\"0x0000000000000000000000000000000000000000000000000000000000000000\",\"0x0000000000000000000000000000000000000000000000000000000000000001\"],\n     *     \"latest\"\n     * ).then(console.log);\n     * > {\n     *     \"address\": \"0x1234567890123456789012345678901234567890\",\n     *     \"accountProof\": [\n     *         \"0xf90211a090dcaf88c40c7bbc95a912cbdde67c175767b31173df9ee4b0d733bfdd511c43a0babe369f6b12092f49181ae04ca173fb68d1a5456f18d20fa32cba73954052bda0473ecf8a7e36a829e75039a3b055e51b8332cbf03324ab4af2066bbd6fbf0021a0bbda34753d7aa6c38e603f360244e8f59611921d9e1f128372fec0d586d4f9e0a04e44caecff45c9891f74f6a2156735886eedf6f1a733628ebc802ec79d844648a0a5f3f2f7542148c973977c8a1e154c4300fec92f755f7846f1b734d3ab1d90e7a0e823850f50bf72baae9d1733a36a444ab65d0a6faaba404f0583ce0ca4dad92da0f7a00cbe7d4b30b11faea3ae61b7f1f2b315b61d9f6bd68bfe587ad0eeceb721a07117ef9fc932f1a88e908eaead8565c19b5645dc9e5b1b6e841c5edbdfd71681a069eb2de283f32c11f859d7bcf93da23990d3e662935ed4d6b39ce3673ec84472a0203d26456312bbc4da5cd293b75b840fc5045e493d6f904d180823ec22bfed8ea09287b5c21f2254af4e64fca76acc5cd87399c7f1ede818db4326c98ce2dc2208a06fc2d754e304c48ce6a517753c62b1a9c1d5925b89707486d7fc08919e0a94eca07b1c54f15e299bd58bdfef9741538c7828b5d7d11a489f9c20d052b3471df475a051f9dd3739a927c89e357580a4c97b40234aa01ed3d5e0390dc982a7975880a0a089d613f26159af43616fd9455bb461f4869bfede26f2130835ed067a8b967bfb80\",\n     *         \"0xf90211a0395d87a95873cd98c21cf1df9421af03f7247880a2554e20738eec2c7507a494a0bcf6546339a1e7e14eb8fb572a968d217d2a0d1f3bc4257b22ef5333e9e4433ca012ae12498af8b2752c99efce07f3feef8ec910493be749acd63822c3558e6671a0dbf51303afdc36fc0c2d68a9bb05dab4f4917e7531e4a37ab0a153472d1b86e2a0ae90b50f067d9a2244e3d975233c0a0558c39ee152969f6678790abf773a9621a01d65cd682cc1be7c5e38d8da5c942e0a73eeaef10f387340a40a106699d494c3a06163b53d956c55544390c13634ea9aa75309f4fd866f312586942daf0f60fb37a058a52c1e858b1382a8893eb9c1f111f266eb9e21e6137aff0dddea243a567000a037b4b100761e02de63ea5f1fcfcf43e81a372dafb4419d126342136d329b7a7ba032472415864b08f808ba4374092003c8d7c40a9f7f9fe9cc8291f62538e1cc14a074e238ff5ec96b810364515551344100138916594d6af966170ff326a092fab0a0d31ac4eef14a79845200a496662e92186ca8b55e29ed0f9f59dbc6b521b116fea090607784fe738458b63c1942bba7c0321ae77e18df4961b2bc66727ea996464ea078f757653c1b63f72aff3dcc3f2a2e4c8cb4a9d36d1117c742833c84e20de994a0f78407de07f4b4cb4f899dfb95eedeb4049aeb5fc1635d65cf2f2f4dfd25d1d7a0862037513ba9d45354dd3e36264aceb2b862ac79d2050f14c95657e43a51b85c80\",\n     *         \"0xf90171a04ad705ea7bf04339fa36b124fa221379bd5a38ffe9a6112cb2d94be3a437b879a08e45b5f72e8149c01efcb71429841d6a8879d4bbe27335604a5bff8dfdf85dcea00313d9b2f7c03733d6549ea3b810e5262ed844ea12f70993d87d3e0f04e3979ea0b59e3cdd6750fa8b15164612a5cb6567cdfb386d4e0137fccee5f35ab55d0efda0fe6db56e42f2057a071c980a778d9a0b61038f269dd74a0e90155b3f40f14364a08538587f2378a0849f9608942cf481da4120c360f8391bbcc225d811823c6432a026eac94e755534e16f9552e73025d6d9c30d1d7682a4cb5bd7741ddabfd48c50a041557da9a74ca68da793e743e81e2029b2835e1cc16e9e25bd0c1e89d4ccad6980a041dda0a40a21ade3a20fcd1a4abb2a42b74e9a32b02424ff8db4ea708a5e0fb9a09aaf8326a51f613607a8685f57458329b41e938bb761131a5747e066b81a0a16808080a022e6cef138e16d2272ef58434ddf49260dc1de1f8ad6dfca3da5d2a92aaaadc58080\",\n     *         \"0xf851808080a009833150c367df138f1538689984b8a84fc55692d3d41fe4d1e5720ff5483a6980808080808080808080a0a319c1c415b271afc0adcb664e67738d103ac168e0bc0b7bd2da7966165cb9518080\"\n     *     ],\n     *     \"balance\": 0n,\n     *     \"codeHash\": \"0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470\",\n     *     \"nonce\": 0n,\n     *     \"storageHash\": \"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421\",\n     *     \"storageProof\": [\n     *         {\n     *             \"key\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n     *             \"value\": 0n,\n     *             \"proof\": []\n     *         },\n     *         {\n     *             \"key\": \"0x0000000000000000000000000000000000000000000000000000000000000001\",\n     *             \"value\": 0n,\n     *             \"proof\": []\n     *         }\n     *     ]\n     * }\n     *\n     * web3.eth.getProof(\n     *     \"0x1234567890123456789012345678901234567890\",\n     *     [\"0x0000000000000000000000000000000000000000000000000000000000000000\",\"0x0000000000000000000000000000000000000000000000000000000000000001\"],\n     *     undefined,\n     *     { number: FMT_NUMBER.NUMBER , bytes: FMT_BYTES.HEX }\n     * ).then(console.log);\n     * > {\n     *     \"address\": \"0x1234567890123456789012345678901234567890\",\n     *     \"accountProof\": [\n     *         \"0xf90211a090dcaf88c40c7bbc95a912cbdde67c175767b31173df9ee4b0d733bfdd511c43a0babe369f6b12092f49181ae04ca173fb68d1a5456f18d20fa32cba73954052bda0473ecf8a7e36a829e75039a3b055e51b8332cbf03324ab4af2066bbd6fbf0021a0bbda34753d7aa6c38e603f360244e8f59611921d9e1f128372fec0d586d4f9e0a04e44caecff45c9891f74f6a2156735886eedf6f1a733628ebc802ec79d844648a0a5f3f2f7542148c973977c8a1e154c4300fec92f755f7846f1b734d3ab1d90e7a0e823850f50bf72baae9d1733a36a444ab65d0a6faaba404f0583ce0ca4dad92da0f7a00cbe7d4b30b11faea3ae61b7f1f2b315b61d9f6bd68bfe587ad0eeceb721a07117ef9fc932f1a88e908eaead8565c19b5645dc9e5b1b6e841c5edbdfd71681a069eb2de283f32c11f859d7bcf93da23990d3e662935ed4d6b39ce3673ec84472a0203d26456312bbc4da5cd293b75b840fc5045e493d6f904d180823ec22bfed8ea09287b5c21f2254af4e64fca76acc5cd87399c7f1ede818db4326c98ce2dc2208a06fc2d754e304c48ce6a517753c62b1a9c1d5925b89707486d7fc08919e0a94eca07b1c54f15e299bd58bdfef9741538c7828b5d7d11a489f9c20d052b3471df475a051f9dd3739a927c89e357580a4c97b40234aa01ed3d5e0390dc982a7975880a0a089d613f26159af43616fd9455bb461f4869bfede26f2130835ed067a8b967bfb80\",\n     *         \"0xf90211a0395d87a95873cd98c21cf1df9421af03f7247880a2554e20738eec2c7507a494a0bcf6546339a1e7e14eb8fb572a968d217d2a0d1f3bc4257b22ef5333e9e4433ca012ae12498af8b2752c99efce07f3feef8ec910493be749acd63822c3558e6671a0dbf51303afdc36fc0c2d68a9bb05dab4f4917e7531e4a37ab0a153472d1b86e2a0ae90b50f067d9a2244e3d975233c0a0558c39ee152969f6678790abf773a9621a01d65cd682cc1be7c5e38d8da5c942e0a73eeaef10f387340a40a106699d494c3a06163b53d956c55544390c13634ea9aa75309f4fd866f312586942daf0f60fb37a058a52c1e858b1382a8893eb9c1f111f266eb9e21e6137aff0dddea243a567000a037b4b100761e02de63ea5f1fcfcf43e81a372dafb4419d126342136d329b7a7ba032472415864b08f808ba4374092003c8d7c40a9f7f9fe9cc8291f62538e1cc14a074e238ff5ec96b810364515551344100138916594d6af966170ff326a092fab0a0d31ac4eef14a79845200a496662e92186ca8b55e29ed0f9f59dbc6b521b116fea090607784fe738458b63c1942bba7c0321ae77e18df4961b2bc66727ea996464ea078f757653c1b63f72aff3dcc3f2a2e4c8cb4a9d36d1117c742833c84e20de994a0f78407de07f4b4cb4f899dfb95eedeb4049aeb5fc1635d65cf2f2f4dfd25d1d7a0862037513ba9d45354dd3e36264aceb2b862ac79d2050f14c95657e43a51b85c80\",\n     *         \"0xf90171a04ad705ea7bf04339fa36b124fa221379bd5a38ffe9a6112cb2d94be3a437b879a08e45b5f72e8149c01efcb71429841d6a8879d4bbe27335604a5bff8dfdf85dcea00313d9b2f7c03733d6549ea3b810e5262ed844ea12f70993d87d3e0f04e3979ea0b59e3cdd6750fa8b15164612a5cb6567cdfb386d4e0137fccee5f35ab55d0efda0fe6db56e42f2057a071c980a778d9a0b61038f269dd74a0e90155b3f40f14364a08538587f2378a0849f9608942cf481da4120c360f8391bbcc225d811823c6432a026eac94e755534e16f9552e73025d6d9c30d1d7682a4cb5bd7741ddabfd48c50a041557da9a74ca68da793e743e81e2029b2835e1cc16e9e25bd0c1e89d4ccad6980a041dda0a40a21ade3a20fcd1a4abb2a42b74e9a32b02424ff8db4ea708a5e0fb9a09aaf8326a51f613607a8685f57458329b41e938bb761131a5747e066b81a0a16808080a022e6cef138e16d2272ef58434ddf49260dc1de1f8ad6dfca3da5d2a92aaaadc58080\",\n     *         \"0xf851808080a009833150c367df138f1538689984b8a84fc55692d3d41fe4d1e5720ff5483a6980808080808080808080a0a319c1c415b271afc0adcb664e67738d103ac168e0bc0b7bd2da7966165cb9518080\"\n     *     ],\n     *     \"balance\": 0,\n     *     \"codeHash\": \"0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470\",\n     *     \"nonce\": 0,\n     *     \"storageHash\": \"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421\",\n     *     \"storageProof\": [\n     *         {\n     *             \"key\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n     *             \"value\": 0,\n     *             \"proof\": []\n     *         },\n     *         {\n     *             \"key\": \"0x0000000000000000000000000000000000000000000000000000000000000001\",\n     *             \"value\": 0,\n     *             \"proof\": []\n     *         }\n     *     ]\n     * }\n     * ```\n     */\n    getProof(address_1, storageKeys_1) {\n        return __awaiter(this, arguments, void 0, function* (address, storageKeys, blockNumber = this.defaultBlock, returnFormat = this.defaultReturnFormat) {\n            return rpcMethodsWrappers.getProof(this, address, storageKeys, blockNumber, returnFormat);\n        });\n    }\n    // TODO Throwing an error with Geth, but not Infura\n    // TODO gasUsedRatio and reward not formatting\n    /**\n     * @param blockCount Number of blocks in the requested range. Between `1` and `1024` blocks can be requested in a single query. Less than requested may be returned if not all blocks are available.\n     * @param newestBlock Highest number block of the requested range.\n     * @param rewardPercentiles A monotonically increasing list of percentile values to sample from each block’s effective priority fees per gas in ascending order, weighted by gas used. Example: `['0', '25', '50', '75', '100']` or `['0', '0.5', '1', '1.5', '3', '80']`\n     * @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) - Specifies how the return data from the call should be formatted.\n     * @returns `baseFeePerGas` and transaction effective `priorityFeePerGas` history for the requested block range if available.\n     * The range between `headBlock - 4` and `headBlock` is guaranteed to be available while retrieving data from the `pending` block and older history are optional to support.\n     * For pre-EIP-1559 blocks the `gasPrice`s are returned as `rewards` and zeroes are returned for the `baseFeePerGas`.\n     *\n     * ```ts\n     * web3.eth.getFeeHistory(4, 'pending', [0, 25, 75, 100]).then(console.log);\n     * > {\n     *     baseFeePerGas: [\n     *         22983878621n,\n     *         21417903463n,\n     *         19989260230n,\n     *         17770954829n,\n     *         18850641304n\n     *     ],\n     *     gasUsedRatio: [\n     *         0.22746546666666667,\n     *         0.2331871,\n     *         0.05610054885262125,\n     *         0.7430227268212117\n     *     ],\n     *     oldestBlock: 15216343n,\n     *     reward: [\n     *         [ '0x3b9aca00', '0x53724e00', '0x77359400', '0x1d92c03423' ],\n     *         [ '0x3b9aca00', '0x3b9aca00', '0x3b9aca00', '0xee6b2800' ],\n     *         [ '0x3b9aca00', '0x4f86a721', '0x77d9743a', '0x9502f900' ],\n     *         [ '0xcc8ff9e', '0x53724e00', '0x77359400', '0x1ec9771bb3' ]\n     *     ]\n     * }\n     *\n     * web3.eth.getFeeHistory(4, BlockTags.LATEST, [0, 25, 75, 100], { number: FMT_NUMBER.NUMBER , bytes: FMT_BYTES.HEX }).then(console.log);\n     * > {\n     *     baseFeePerGas: [\n     *         22983878621,\n     *         21417903463,\n     *         19989260230,\n     *         17770954829,\n     *         18850641304\n     *     ],\n     *     gasUsedRatio: [\n     *         0.22746546666666667,\n     *         0.2331871,\n     *         0.05610054885262125,\n     *         0.7430227268212117\n     *     ],\n     *     oldestBlock: 15216343,\n     *     reward: [\n     *         [ '0x3b9aca00', '0x53724e00', '0x77359400', '0x1d92c03423' ],\n     *         [ '0x3b9aca00', '0x3b9aca00', '0x3b9aca00', '0xee6b2800' ],\n     *         [ '0x3b9aca00', '0x4f86a721', '0x77d9743a', '0x9502f900' ],\n     *         [ '0xcc8ff9e', '0x53724e00', '0x77359400', '0x1ec9771bb3' ]\n     *     ]\n     * }\n     * ```\n     */\n    getFeeHistory(blockCount_1) {\n        return __awaiter(this, arguments, void 0, function* (blockCount, newestBlock = this.defaultBlock, rewardPercentiles, returnFormat = this.defaultReturnFormat) {\n            return rpcMethodsWrappers.getFeeHistory(this, blockCount, newestBlock, rewardPercentiles, returnFormat);\n        });\n    }\n    /**\n     * This method generates an access list for a transaction.\n     *\n     * @param transaction - A transaction object where all properties are optional except `from`, however it's recommended to include the `to` property.\n     * @param blockNumber ({@link BlockNumberOrTag} defaults to {@link Web3Eth.defaultBlock}) - Specifies what block to use as the current state of the blockchain while processing the transaction.\n     * @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) - Specifies how the return data from the createAccessList should be formatted.\n     * @returns The returned data of the createAccessList,  e.g. The generated access list for transaction.\n     * @example\n     * ```ts\n     * web3.eth.createAccessList({\n     * from: '0xDe95305a63302C3aa4d3A9B42654659AeA72b694',\n     * data: '0x9a67c8b100000000000000000000000000000000000000000000000000000000000004d0',\n     * gasPrice: '0x3b9aca00',\n     * gas: '0x3d0900',\n     * to: '0x940b25304947ae863568B3804434EC77E2160b87'\n     * })\n     * .then(console.log);\n     *\n     * > {\n     *  \"accessList\": [\n     *     {\n     *       \"address\": \"0x15859bdf5aff2080a9968f6a410361e9598df62f\",\n     *       \"storageKeys\": [\n     *         \"0x0000000000000000000000000000000000000000000000000000000000000000\"\n     *       ]\n     *     }\n     *   ],\n     *   \"gasUsed\": \"0x7671\"\n     * }\n     * ```\n     */\n    createAccessList(transaction_1) {\n        return __awaiter(this, arguments, void 0, function* (transaction, blockNumber = this.defaultBlock, returnFormat = this.defaultReturnFormat) {\n            return rpcMethodsWrappers.createAccessList(this, transaction, blockNumber, returnFormat);\n        });\n    }\n    /**\n     * This method sends EIP-712 typed data to the RPC provider to be signed.\n     *\n     * @param address The address that corresponds with the private key used to sign the typed data.\n     * @param typedData The EIP-712 typed data object.\n     * @param useLegacy A boolean flag determining whether the RPC call uses the legacy method `eth_signTypedData` or the newer method `eth_signTypedData_v4`\n     * @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) - Specifies how the signed typed data should be formatted.\n     * @returns The signed typed data.\n     */\n    signTypedData(address, typedData, useLegacy, returnFormat) {\n        return __awaiter(this, void 0, void 0, function* () {\n            var _a;\n            if (useLegacy === void 0) { useLegacy = false; }\n            if (returnFormat === void 0) { returnFormat = ((_a = this.defaultReturnFormat) !== null && _a !== void 0 ? _a : DEFAULT_RETURN_FORMAT); }\n            return rpcMethodsWrappers.signTypedData(this, address, typedData, useLegacy, returnFormat);\n        });\n    }\n    /**\n     * Lets you subscribe to specific events in the blockchain.\n     *\n     * @param name - The subscription you want to subscribe to.\n     * @param args - Optional additional parameters, depending on the subscription type.\n     * @returns A subscription object of type {@link RegisteredSubscription}. The object contains:\n     *  - subscription.id: The subscription id, used to identify and unsubscribing the subscription.\n     *  - subscription.subscribe(): Can be used to re-subscribe with the same parameters.\n     *  - subscription.unsubscribe(): Unsubscribes the subscription and returns TRUE in the callback if successful.\n     *  - subscription.args: The subscription arguments, used when re-subscribing.\n     *\n     *\n     * You can use the subscription object to listen on:\n     *\n     * - on(\"data\") - Fires on each incoming log with the log object as argument.\n     * - on(\"changed\") - Fires on each log which was removed from the blockchain. The log will have the additional property \"removed: true\".\n     * - on(\"error\") - Fires when an error in the subscription occurs.\n     * - on(\"connected\") - Fires once after the subscription successfully connected. Returns the subscription id.\n     *\n     * @example **Subscribe to Smart Contract events**\n     * ```ts\n     * // Subscribe to `logs`\n     * const logSubscription = web3.eth.subscribe('logs', {\n     *     address: '0x1234567890123456789012345678901234567890',\n     *     topics: ['0x033456732123ffff2342342dd12342434324234234fd234fd23fd4f23d4234']\n     * });\n     * logSubscription.on('data', (data: any) => console.log(data));\n     * logSubscription.on('error', (error: any) => console.log(error));\n     *\n     * ```\n     *\n     * @example **Subscribe to new block headers**\n     * ```ts\n     * // Subscribe to `newBlockHeaders`\n     * const newBlocksSubscription = await web3.eth.subscribe('newBlockHeaders');\n     *\n     * newBlocksSubscription.on('data', async blockhead => {\n     * \tconsole.log('New block header: ', blockhead);\n     *\n     * \t// You do not need the next line, if you like to keep notified for every new block\n     * \tawait newBlocksSubscription.unsubscribe();\n     * \tconsole.log('Unsubscribed from new block headers.');\n     * });\n     * newBlocksSubscription.on('error', error =>\n     * \tconsole.log('Error when subscribing to New block header: ', error),\n     * );\n     * ```\n     *\n     * \t### subscribe('pendingTransactions')\n     *\n     * Subscribes to incoming pending transactions.\n     * You can subscribe to pending transactions by calling web3.eth.subscribe('pendingTransactions').\n     *\n     * ```ts\n     * (await web3.eth.subscribe('pendingTransactions')).on('data', console.log);\n     * ```\n     *\n     * ### subscribe('newHeads')\n     * ( same as subscribe('newBlockHeaders'))\n     * Subscribes to incoming block headers. This can be used as timer to check for changes on the blockchain.\n     *\n     * The structure of a returned block header is {@link BlockHeaderOutput}:\n     *\n     * ```ts\n     * (await web3.eth.subscribe('newHeads')).on( // 'newBlockHeaders' would work as well\n     *  'data',\n     * console.log\n     * );\n     * >{\n     * parentHash: '0x9e746a1d906b299def98c75b06f714d62dacadd567c7515d76eeaa8c8074c738',\n     * sha3Uncles: '0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347',\n     * miner: '0x0000000000000000000000000000000000000000',\n     * stateRoot: '0xe0f04b04861ecfa95e82a9310d6a7ef7aef8d7417f5209c182582bfb98a8e307',\n     * transactionsRoot: '0x31ab4ea571a9e10d3a19aaed07d190595b1dfa34e03960c04293fec565dea536',\n     * logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',\n     * difficulty: 2n,\n     * number: 21n,\n     * gasLimit: 11738125n,\n     * gasUsed: 830006n,\n     * timestamp: 1678797237n,\n     * extraData: '0xd883010b02846765746888676f312e32302e31856c696e757800000000000000e0a6e93cf40e2e71a72e493272210c3f43738ccc7e7d7b14ffd51833797d896c09117e8dc4fbcbc969bd21b42e5af3e276a911524038c001b2109b63b8e0352601',\n     * nonce: 0n\n     * }\n     * ```\n     *\n     * ### subscribe('syncing')\n     * Subscribe to syncing events. This will return `true` when the node is syncing and when it’s finished syncing will return `false`, for the `changed` event.\n     *\n     * ```ts\n     * (await web3.eth.subscribe('syncing')).on('changed', console.log);\n     * > `true` // when syncing\n     *\n     * (await web3.eth.subscribe('syncing')).on('data', console.log);\n     * > {\n     *      startingBlock: 0,\n     *      currentBlock: 0,\n     *      highestBlock: 0,\n     *      pulledStates: 0,\n     *      knownStates: 0\n     *   }\n     * ```\n     *\n     * ### subscribe('logs', options)\n     * Subscribes to incoming logs, filtered by the given options. If a valid numerical fromBlock options property is set, web3.js will retrieve logs beginning from this point, backfilling the response as necessary.\n     *\n     * options: You can subscribe to logs matching a given filter object, which can take the following parameters:\n     * - `fromBlock`: (optional, default: 'latest') Integer block number, or `'latest'` for the last mined block or `'pending'`, `'earliest'` for not yet mined transactions.\n     * - `address`: (optional) Contract address or a list of addresses from which logs should originate.\n     * - `topics`: (optional) Array of 32 Bytes DATA topics. Topics are order-dependent. Each topic can also be an array of DATA with `or` options.\n     *\n     * ```ts\n     *  (await web3.eth.subscribe('logs', {\n     *    address: '0xdac17f958d2ee523a2206206994597c13d831ec7',\n     *   })).on('data', console.log);\n     *\n     * > {\n     * removed: false,\n     * logIndex: 119n,\n     * transactionIndex: 58n,\n     * transactionHash: '0x61533efa77937360215069d5d6cb0be09a22af9721e6dc3df59d957833ed8870',\n     * blockHash: '0xe32bb97084479d32247f66f8b46d00af2fbc3c2db2bc6e5843fe2e4d1ca9b099',\n     * blockNumber: 18771966n,\n     * address: '0xdac17f958d2ee523a2206206994597c13d831ec7',\n     * data: '0x00000000000000000000000000000000000000000000000000000000d88b2e40',\n     * topics: [\n     * '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef',\n     * '0x0000000000000000000000002fb2457f6ec1865dc0d4e7300c696b69c2a1b989',\n     * '0x00000000000000000000000027fd43babfbe83a81d14665b1a6fb8030a60c9b4'\n     * ]\n     * }\n     *```\n     */\n    subscribe(name, args, returnFormat) {\n        return __awaiter(this, void 0, void 0, function* () {\n            var _a, _b;\n            if (returnFormat === void 0) { returnFormat = ((_a = this.defaultReturnFormat) !== null && _a !== void 0 ? _a : DEFAULT_RETURN_FORMAT); }\n            const subscription = yield ((_b = this.subscriptionManager) === null || _b === void 0 ? void 0 : _b.subscribe(name, args, returnFormat));\n            if (subscription instanceof LogsSubscription &&\n                name === 'logs' &&\n                typeof args === 'object' &&\n                !isNullish(args.fromBlock) &&\n                Number.isFinite(Number(args.fromBlock))) {\n                setImmediate(() => {\n                    this.getPastLogs(args)\n                        .then(logs => {\n                        for (const log of logs) {\n                            subscription._processSubscriptionResult(log);\n                        }\n                    })\n                        .catch(e => {\n                        subscription._processSubscriptionError(e);\n                    });\n                });\n            }\n            return subscription;\n        });\n    }\n    static shouldClearSubscription({ sub }) {\n        return !(sub instanceof SyncingSubscription);\n    }\n    /**\n     * Resets subscriptions.\n     *\n     * @param notClearSyncing If `true` it keeps the `syncing` subscription.\n     * @returns A promise to an array of subscription ids that were cleared.\n     *\n     * ```ts\n     * web3.eth.clearSubscriptions().then(console.log);\n     * > [...] An array of subscription ids that were cleared\n     * ```\n     */\n    clearSubscriptions(notClearSyncing = false) {\n        var _a;\n        return (_a = this.subscriptionManager) === null || _a === void 0 ? void 0 : _a.unsubscribe(\n        // eslint-disable-next-line\n        notClearSyncing ? Web3Eth.shouldClearSubscription : undefined);\n    }\n    /**\n     * Creates a filter in the node, to notify when new pending transactions arrive. To check if the state has changed.\n     *\n     * @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) Specifies how the return data should be formatted.\n     * @returns A filter id.\n     *\n     * ```ts\n     * web3.eth.createNewPendingTransactionFilter().then(console.log);\n     * > 1n\n     *\n     * web3.eth.createNewPendingTransactionFilter({ number: FMT_NUMBER.HEX , bytes: FMT_BYTES.HEX }).then(console.log);\n     * > \"0x1\"\n     * ```\n     */\n    createNewPendingTransactionFilter() {\n        return __awaiter(this, arguments, void 0, function* (returnFormat = this.defaultReturnFormat) {\n            return filteringRpcMethodsWrappers.createNewPendingTransactionFilter(this, returnFormat);\n        });\n    }\n    /**\n     * Creates a filter object, based on filter options, to notify when the state changes (logs)\n     *\n     * @param filter A {@link FilterParams} object containing the filter properties.\n     * @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) Specifies how the return data should be formatted.\n     * @returns A filter id.\n     *\n     * ```ts\n     * web3.eth.createNewFilter(filterParams).then(console.log);\n     * > 1n\n     *\n     * web3.eth.createNewFilter(filterParams, { number: FMT_NUMBER.HEX , bytes: FMT_BYTES.HEX }).then(console.log);\n     * > \"0x1\"\n     * ```\n     */\n    createNewFilter(filter_1) {\n        return __awaiter(this, arguments, void 0, function* (filter, returnFormat = this.defaultReturnFormat) {\n            return filteringRpcMethodsWrappers.createNewFilter(this, filter, returnFormat);\n        });\n    }\n    /**\n     * Creates a filter in the node, to notify when a new block arrives.\n     *\n     * @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) Specifies how the return data should be formatted.\n     * @returns A filter id.\n     *\n     * ```ts\n     * web3.eth.createNewBlockFilter().then(console.log);\n     * > 1n\n     *\n     * web3.eth.createNewBlockFilter({ number: FMT_NUMBER.HEX , bytes: FMT_BYTES.HEX }).then(console.log);\n     * > \"0x1\"\n     * ```\n     */\n    createNewBlockFilter() {\n        return __awaiter(this, arguments, void 0, function* (returnFormat = this.defaultReturnFormat) {\n            return filteringRpcMethodsWrappers.createNewBlockFilter(this, returnFormat);\n        });\n    }\n    /**\n     * Uninstalls a filter with given id. Should always be called when watch is no longer needed.\n     *\n     * @param filterIdentifier ({@link Numbers} filter id\n     * @returns true if the filter was successfully uninstalled, otherwise false.\n     *\n     * ```ts\n     * web3.eth.uninstallFilter(123).then(console.log);\n     * > true\n     *\n     * web3.eth.uninstallFilter('0x123').then(console.log);\n     * > true\n     *\n     * web3.eth.uninstallFilter(12n).then(console.log);\n     * > true\n     * ```\n     */\n    uninstallFilter(filterIdentifier) {\n        return __awaiter(this, void 0, void 0, function* () {\n            return filteringRpcMethodsWrappers.uninstallFilter(this, filterIdentifier);\n        });\n    }\n    /**\n     *  Polling method for a filter, which returns an array of logs which occurred since last poll.\n     *\n     * @param filterIdentifier ({@link Numbers} filter id\n     * @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) - Specifies how the return data from the call should be formatted.\n     * @returns {@link FilterResultsAPI}, an array of {@link Log} objects.\n     *\n     * ```ts\n     * web3.eth.getFilterChanges(123).then(console.log);\n     * > [{\n     *       data: '0x7f9fade1c0d57a7af66ab4ead79fade1c0d57a7af66ab4ead7c2c2eb7b11a91385',\n     *       topics: ['0xfd43ade1c09fade1c0d57a7af66ab4ead7c2c2eb7b11a91ffdd57a7af66ab4ead7', '0x7f9fade1c0d57a7af66ab4ead79fade1c0d57a7af66ab4ead7c2c2eb7b11a91385']\n     *       logIndex: 0n,\n     *       transactionIndex: 0n,\n     *       transactionHash: '0x7f9fade1c0d57a7af66ab4ead79fade1c0d57a7af66ab4ead7c2c2eb7b11a91385',\n     *       blockHash: '0xfd43ade1c09fade1c0d57a7af66ab4ead7c2c2eb7b11a91ffdd57a7af66ab4ead7',\n     *       blockNumber: 1234n,\n     *       address: '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe'\n     *   },\n     *   {...}]\n     */\n    getFilterChanges(filterIdentifier_1) {\n        return __awaiter(this, arguments, void 0, function* (filterIdentifier, returnFormat = this.defaultReturnFormat) {\n            return filteringRpcMethodsWrappers.getFilterChanges(this, filterIdentifier, returnFormat);\n        });\n    }\n    /**\n     *  Returns an array of all logs matching filter with given id.\n     *\n     * @param filterIdentifier ({@link Numbers} filter id\n     * @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) - Specifies how the return data from the call should be formatted.\n     * @returns {@link FilterResultsAPI}, an array of {@link Log} objects.\n     *\n     * ```ts\n     * web3.eth.getFilterLogs(123).then(console.log);\n     * > [{\n     *       data: '0x7f9fade1c0d57a7af66ab4ead79fade1c0d57a7af66ab4ead7c2c2eb7b11a91385',\n     *       topics: ['0xfd43ade1c09fade1c0d57a7af66ab4ead7c2c2eb7b11a91ffdd57a7af66ab4ead7', '0x7f9fade1c0d57a7af66ab4ead79fade1c0d57a7af66ab4ead7c2c2eb7b11a91385']\n     *       logIndex: 0n,\n     *       transactionIndex: 0n,\n     *       transactionHash: '0x7f9fade1c0d57a7af66ab4ead79fade1c0d57a7af66ab4ead7c2c2eb7b11a91385',\n     *       blockHash: '0xfd43ade1c09fade1c0d57a7af66ab4ead7c2c2eb7b11a91ffdd57a7af66ab4ead7',\n     *       blockNumber: 1234n,\n     *       address: '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe'\n     *   },\n     *   {...}]\n     */\n    getFilterLogs(filterIdentifier_1) {\n        return __awaiter(this, arguments, void 0, function* (filterIdentifier, returnFormat = this.defaultReturnFormat) {\n            return filteringRpcMethodsWrappers.getFilterLogs(this, filterIdentifier, returnFormat);\n        });\n    }\n}\n//# sourceMappingURL=web3_eth.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { ETH_DATA_FORMAT, } from 'web3-types';\nimport { isAddress, isHexStrict, isHexString32Bytes, isNullish, isUInt } from 'web3-validator';\nimport { ChainMismatchError, HardforkMismatchError, ChainIdMismatchError, CommonOrChainAndHardforkError, Eip1559GasPriceError, InvalidGasOrGasPrice, InvalidMaxPriorityFeePerGasOrMaxFeePerGas, InvalidNonceOrChainIdError, InvalidTransactionCall, InvalidTransactionObjectError, InvalidTransactionWithSender, MissingChainOrHardforkError, MissingCustomChainError, MissingCustomChainIdError, MissingGasError, TransactionGasMismatchError, UnsupportedFeeMarketError, } from 'web3-errors';\nimport { formatTransaction } from './utils/format_transaction.js';\nexport function isBaseTransaction(value) {\n    if (!isNullish(value.to) && !isAddress(value.to))\n        return false;\n    if (!isHexStrict(value.type) && !isNullish(value.type) && value.type.length !== 2)\n        return false;\n    if (!isHexStrict(value.nonce))\n        return false;\n    if (!isHexStrict(value.gas))\n        return false;\n    if (!isHexStrict(value.value))\n        return false;\n    if (!isHexStrict(value.input))\n        return false;\n    if (value.chainId && !isHexStrict(value.chainId))\n        return false;\n    return true;\n}\nexport function isAccessListEntry(value) {\n    if (!isNullish(value.address) && !isAddress(value.address))\n        return false;\n    if (!isNullish(value.storageKeys) &&\n        !value.storageKeys.every(storageKey => isHexString32Bytes(storageKey)))\n        return false;\n    return true;\n}\nexport function isAccessList(value) {\n    if (!Array.isArray(value) ||\n        !value.every(accessListEntry => isAccessListEntry(accessListEntry)))\n        return false;\n    return true;\n}\nexport function isTransaction1559Unsigned(value) {\n    if (!isBaseTransaction(value))\n        return false;\n    if (!isHexStrict(value.maxFeePerGas))\n        return false;\n    if (!isHexStrict(value.maxPriorityFeePerGas))\n        return false;\n    if (!isAccessList(value.accessList))\n        return false;\n    return true;\n}\nexport function isTransaction2930Unsigned(value) {\n    if (!isBaseTransaction(value))\n        return false;\n    if (!isHexStrict(value.gasPrice))\n        return false;\n    if (!isAccessList(value.accessList))\n        return false;\n    return true;\n}\nexport function isTransactionLegacyUnsigned(value) {\n    if (!isBaseTransaction(value))\n        return false;\n    if (!isHexStrict(value.gasPrice))\n        return false;\n    return true;\n}\nexport function isTransactionWithSender(value) {\n    if (!isAddress(value.from))\n        return false;\n    if (!isBaseTransaction(value))\n        return false;\n    if (!isTransaction1559Unsigned(value) &&\n        !isTransaction2930Unsigned(value) &&\n        !isTransactionLegacyUnsigned(value))\n        return false;\n    return true;\n}\nexport function validateTransactionWithSender(value) {\n    if (!isTransactionWithSender(value))\n        throw new InvalidTransactionWithSender(value);\n}\nexport function isTransactionCall(value) {\n    if (!isNullish(value.from) && !isAddress(value.from))\n        return false;\n    if (!isAddress(value.to))\n        return false;\n    if (!isNullish(value.gas) && !isHexStrict(value.gas))\n        return false;\n    if (!isNullish(value.gasPrice) && !isHexStrict(value.gasPrice))\n        return false;\n    if (!isNullish(value.value) && !isHexStrict(value.value))\n        return false;\n    if (!isNullish(value.data) && !isHexStrict(value.data))\n        return false;\n    if (!isNullish(value.input) && !isHexStrict(value.input))\n        return false;\n    if (!isNullish(value.type))\n        return false;\n    if (isTransaction1559Unsigned(value))\n        return false;\n    if (isTransaction2930Unsigned(value))\n        return false;\n    return true;\n}\nexport function validateTransactionCall(value) {\n    if (!isTransactionCall(value))\n        throw new InvalidTransactionCall(value);\n}\nexport const validateCustomChainInfo = (transaction) => {\n    if (!isNullish(transaction.common)) {\n        if (isNullish(transaction.common.customChain))\n            throw new MissingCustomChainError();\n        if (isNullish(transaction.common.customChain.chainId))\n            throw new MissingCustomChainIdError();\n        if (!isNullish(transaction.chainId) &&\n            transaction.chainId !== transaction.common.customChain.chainId)\n            throw new ChainIdMismatchError({\n                txChainId: transaction.chainId,\n                customChainId: transaction.common.customChain.chainId,\n            });\n    }\n};\nexport const validateChainInfo = (transaction) => {\n    if (!isNullish(transaction.common) &&\n        !isNullish(transaction.chain) &&\n        !isNullish(transaction.hardfork)) {\n        throw new CommonOrChainAndHardforkError();\n    }\n    if ((!isNullish(transaction.chain) && isNullish(transaction.hardfork)) ||\n        (!isNullish(transaction.hardfork) && isNullish(transaction.chain)))\n        throw new MissingChainOrHardforkError({\n            chain: transaction.chain,\n            hardfork: transaction.hardfork,\n        });\n};\nexport const validateBaseChain = (transaction) => {\n    if (!isNullish(transaction.common))\n        if (!isNullish(transaction.common.baseChain))\n            if (!isNullish(transaction.chain) &&\n                transaction.chain !== transaction.common.baseChain) {\n                throw new ChainMismatchError({\n                    txChain: transaction.chain,\n                    baseChain: transaction.common.baseChain,\n                });\n            }\n};\nexport const validateHardfork = (transaction) => {\n    if (!isNullish(transaction.common))\n        if (!isNullish(transaction.common.hardfork))\n            if (!isNullish(transaction.hardfork) &&\n                transaction.hardfork !== transaction.common.hardfork) {\n                throw new HardforkMismatchError({\n                    txHardfork: transaction.hardfork,\n                    commonHardfork: transaction.common.hardfork,\n                });\n            }\n};\nexport const validateLegacyGas = (transaction) => {\n    if (\n    // This check is verifying gas and gasPrice aren't less than 0.\n    isNullish(transaction.gas) ||\n        !isUInt(transaction.gas) ||\n        isNullish(transaction.gasPrice) ||\n        !isUInt(transaction.gasPrice))\n        throw new InvalidGasOrGasPrice({\n            gas: transaction.gas,\n            gasPrice: transaction.gasPrice,\n        });\n    if (!isNullish(transaction.maxFeePerGas) || !isNullish(transaction.maxPriorityFeePerGas))\n        throw new UnsupportedFeeMarketError({\n            maxFeePerGas: transaction.maxFeePerGas,\n            maxPriorityFeePerGas: transaction.maxPriorityFeePerGas,\n        });\n};\nexport const validateFeeMarketGas = (transaction) => {\n    // These errors come from 1.x, so they must be checked before\n    // InvalidMaxPriorityFeePerGasOrMaxFeePerGas to throw the same error\n    // for the same code executing in 1.x\n    if (!isNullish(transaction.gasPrice) && transaction.type === '0x2')\n        throw new Eip1559GasPriceError(transaction.gasPrice);\n    if (transaction.type === '0x0' || transaction.type === '0x1')\n        throw new UnsupportedFeeMarketError({\n            maxFeePerGas: transaction.maxFeePerGas,\n            maxPriorityFeePerGas: transaction.maxPriorityFeePerGas,\n        });\n    if (isNullish(transaction.maxFeePerGas) ||\n        !isUInt(transaction.maxFeePerGas) ||\n        isNullish(transaction.maxPriorityFeePerGas) ||\n        !isUInt(transaction.maxPriorityFeePerGas))\n        throw new InvalidMaxPriorityFeePerGasOrMaxFeePerGas({\n            maxPriorityFeePerGas: transaction.maxPriorityFeePerGas,\n            maxFeePerGas: transaction.maxFeePerGas,\n        });\n};\n/**\n * This method checks if all required gas properties are present for either\n * legacy gas (type 0x0 and 0x1) OR fee market transactions (0x2)\n */\nexport const validateGas = (transaction) => {\n    const gasPresent = !isNullish(transaction.gas) || !isNullish(transaction.gasLimit);\n    const legacyGasPresent = gasPresent && !isNullish(transaction.gasPrice);\n    const feeMarketGasPresent = gasPresent &&\n        !isNullish(transaction.maxPriorityFeePerGas) &&\n        !isNullish(transaction.maxFeePerGas);\n    if (!legacyGasPresent && !feeMarketGasPresent)\n        throw new MissingGasError({\n            gas: transaction.gas,\n            gasPrice: transaction.gasPrice,\n            maxPriorityFeePerGas: transaction.maxPriorityFeePerGas,\n            maxFeePerGas: transaction.maxFeePerGas,\n        });\n    if (legacyGasPresent && feeMarketGasPresent)\n        throw new TransactionGasMismatchError({\n            gas: transaction.gas,\n            gasPrice: transaction.gasPrice,\n            maxPriorityFeePerGas: transaction.maxPriorityFeePerGas,\n            maxFeePerGas: transaction.maxFeePerGas,\n        });\n    (legacyGasPresent ? validateLegacyGas : validateFeeMarketGas)(transaction);\n    (!isNullish(transaction.type) && transaction.type > '0x1'\n        ? validateFeeMarketGas\n        : validateLegacyGas)(transaction);\n};\nexport const validateTransactionForSigning = (transaction, overrideMethod, options = { transactionSchema: undefined }) => {\n    if (!isNullish(overrideMethod)) {\n        overrideMethod(transaction);\n        return;\n    }\n    if (typeof transaction !== 'object' || isNullish(transaction))\n        throw new InvalidTransactionObjectError(transaction);\n    validateCustomChainInfo(transaction);\n    validateChainInfo(transaction);\n    validateBaseChain(transaction);\n    validateHardfork(transaction);\n    const formattedTransaction = formatTransaction(transaction, ETH_DATA_FORMAT, {\n        transactionSchema: options.transactionSchema,\n    });\n    validateGas(formattedTransaction);\n    if (isNullish(formattedTransaction.nonce) ||\n        isNullish(formattedTransaction.chainId) ||\n        formattedTransaction.nonce.startsWith('-') ||\n        formattedTransaction.chainId.startsWith('-'))\n        throw new InvalidNonceOrChainIdError({\n            nonce: transaction.nonce,\n            chainId: transaction.chainId,\n        });\n};\n//# sourceMappingURL=validation.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\nimport { ETH_DATA_FORMAT, } from 'web3-types';\nimport { toNumber } from 'web3-utils';\nimport { TransactionFactory, Common } from 'web3-eth-accounts';\nimport { isNullish } from 'web3-validator';\nimport { validateTransactionForSigning } from '../validation.js';\nimport { formatTransaction } from './format_transaction.js';\nimport { transactionBuilder } from './transaction_builder.js';\nconst getEthereumjsTxDataFromTransaction = (transaction) => {\n    var _a, _b;\n    return (Object.assign(Object.assign({}, transaction), { nonce: transaction.nonce, gasPrice: transaction.gasPrice, gasLimit: (_a = transaction.gasLimit) !== null && _a !== void 0 ? _a : transaction.gas, to: transaction.to, value: transaction.value, data: (_b = transaction.data) !== null && _b !== void 0 ? _b : transaction.input, type: transaction.type, chainId: transaction.chainId, accessList: transaction.accessList, maxPriorityFeePerGas: transaction.maxPriorityFeePerGas, maxFeePerGas: transaction.maxFeePerGas }));\n};\nconst getEthereumjsTransactionOptions = (transaction, web3Context) => {\n    var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;\n    const hasTransactionSigningOptions = (!isNullish(transaction.chain) && !isNullish(transaction.hardfork)) ||\n        !isNullish(transaction.common);\n    let common;\n    if (!hasTransactionSigningOptions) {\n        // if defaultcommon is specified, use that.\n        if (web3Context.defaultCommon) {\n            common = Object.assign({}, web3Context.defaultCommon);\n            if (isNullish(common.hardfork))\n                common.hardfork = (_a = transaction.hardfork) !== null && _a !== void 0 ? _a : web3Context.defaultHardfork;\n            if (isNullish(common.baseChain))\n                common.baseChain = web3Context.defaultChain;\n        }\n        else {\n            common = Common.custom({\n                name: 'custom-network',\n                chainId: toNumber(transaction.chainId),\n                networkId: !isNullish(transaction.networkId)\n                    ? toNumber(transaction.networkId)\n                    : undefined,\n                defaultHardfork: (_b = transaction.hardfork) !== null && _b !== void 0 ? _b : web3Context.defaultHardfork,\n            }, {\n                baseChain: web3Context.defaultChain,\n            });\n        }\n    }\n    else {\n        const name = (_f = (_e = (_d = (_c = transaction === null || transaction === void 0 ? void 0 : transaction.common) === null || _c === void 0 ? void 0 : _c.customChain) === null || _d === void 0 ? void 0 : _d.name) !== null && _e !== void 0 ? _e : transaction.chain) !== null && _f !== void 0 ? _f : 'custom-network';\n        const chainId = toNumber((_j = (_h = (_g = transaction === null || transaction === void 0 ? void 0 : transaction.common) === null || _g === void 0 ? void 0 : _g.customChain) === null || _h === void 0 ? void 0 : _h.chainId) !== null && _j !== void 0 ? _j : transaction === null || transaction === void 0 ? void 0 : transaction.chainId);\n        const networkId = toNumber((_m = (_l = (_k = transaction === null || transaction === void 0 ? void 0 : transaction.common) === null || _k === void 0 ? void 0 : _k.customChain) === null || _l === void 0 ? void 0 : _l.networkId) !== null && _m !== void 0 ? _m : transaction === null || transaction === void 0 ? void 0 : transaction.networkId);\n        const defaultHardfork = (_q = (_p = (_o = transaction === null || transaction === void 0 ? void 0 : transaction.common) === null || _o === void 0 ? void 0 : _o.hardfork) !== null && _p !== void 0 ? _p : transaction === null || transaction === void 0 ? void 0 : transaction.hardfork) !== null && _q !== void 0 ? _q : web3Context.defaultHardfork;\n        const baseChain = (_t = (_s = (_r = transaction.common) === null || _r === void 0 ? void 0 : _r.baseChain) !== null && _s !== void 0 ? _s : transaction.chain) !== null && _t !== void 0 ? _t : web3Context.defaultChain;\n        if (chainId && networkId && name) {\n            common = Common.custom({\n                name,\n                chainId,\n                networkId,\n                defaultHardfork,\n            }, {\n                baseChain,\n            });\n        }\n    }\n    return { common };\n};\nexport const prepareTransactionForSigning = (transaction_1, web3Context_1, privateKey_1, ...args_1) => __awaiter(void 0, [transaction_1, web3Context_1, privateKey_1, ...args_1], void 0, function* (transaction, web3Context, privateKey, fillGasPrice = false, fillGasLimit = true) {\n    const populatedTransaction = (yield transactionBuilder({\n        transaction,\n        web3Context,\n        privateKey,\n        fillGasPrice,\n        fillGasLimit,\n    }));\n    const formattedTransaction = formatTransaction(populatedTransaction, ETH_DATA_FORMAT, {\n        transactionSchema: web3Context.config.customTransactionSchema,\n    });\n    validateTransactionForSigning(formattedTransaction, undefined, {\n        transactionSchema: web3Context.config.customTransactionSchema,\n    });\n    return TransactionFactory.fromTxData(getEthereumjsTxDataFromTransaction(formattedTransaction), getEthereumjsTransactionOptions(formattedTransaction, web3Context));\n});\n//# sourceMappingURL=prepare_transaction_for_signing.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { format, isNullish, keccak256 } from 'web3-utils';\nimport { FMT_NUMBER, FMT_BYTES, } from 'web3-types';\nimport { decodeFunctionCall, decodeFunctionReturn, encodeEventSignature, encodeFunctionSignature, encodeParameter, encodeParameters, inferTypesAndEncodeParameters, isAbiConstructorFragment, jsonInterfaceMethodToString, } from 'web3-eth-abi';\nimport { blockSchema, ALL_EVENTS } from 'web3-eth';\nimport { Web3ContractError } from 'web3-errors';\nexport { decodeEventABI } from 'web3-eth';\nexport const encodeEventABI = ({ address }, event, options) => {\n    var _a, _b;\n    const topics = options === null || options === void 0 ? void 0 : options.topics;\n    const filter = (_a = options === null || options === void 0 ? void 0 : options.filter) !== null && _a !== void 0 ? _a : {};\n    const opts = {};\n    if (!isNullish(options === null || options === void 0 ? void 0 : options.fromBlock)) {\n        opts.fromBlock = format(blockSchema.properties.number, options === null || options === void 0 ? void 0 : options.fromBlock, {\n            number: FMT_NUMBER.HEX,\n            bytes: FMT_BYTES.HEX,\n        });\n    }\n    if (!isNullish(options === null || options === void 0 ? void 0 : options.toBlock)) {\n        opts.toBlock = format(blockSchema.properties.number, options === null || options === void 0 ? void 0 : options.toBlock, {\n            number: FMT_NUMBER.HEX,\n            bytes: FMT_BYTES.HEX,\n        });\n    }\n    if (topics && Array.isArray(topics)) {\n        opts.topics = [...topics];\n    }\n    else {\n        opts.topics = [];\n        // add event signature\n        if (event && !event.anonymous && ![ALL_EVENTS, 'allEvents'].includes(event.name)) {\n            opts.topics.push((_b = event.signature) !== null && _b !== void 0 ? _b : encodeEventSignature(jsonInterfaceMethodToString(event)));\n        }\n        // add event topics (indexed arguments)\n        if (![ALL_EVENTS, 'allEvents'].includes(event.name) && event.inputs) {\n            for (const input of event.inputs) {\n                if (!input.indexed) {\n                    continue;\n                }\n                const value = filter[input.name];\n                if (!value) {\n                    // eslint-disable-next-line no-null/no-null\n                    opts.topics.push(null);\n                    continue;\n                }\n                // TODO: https://github.com/ethereum/web3.js/issues/344\n                // TODO: deal properly with components\n                if (Array.isArray(value)) {\n                    opts.topics.push(value.map(v => encodeParameter(input.type, v)));\n                }\n                else if (input.type === 'string') {\n                    opts.topics.push(keccak256(value));\n                }\n                else {\n                    opts.topics.push(encodeParameter(input.type, value));\n                }\n            }\n        }\n    }\n    if (!opts.topics.length)\n        delete opts.topics;\n    if (address) {\n        opts.address = address.toLowerCase();\n    }\n    return opts;\n};\nexport const encodeMethodABI = (abi, args, deployData) => {\n    const inputLength = Array.isArray(abi.inputs) ? abi.inputs.length : 0;\n    if (abi.inputs && inputLength !== args.length) {\n        throw new Web3ContractError(`The number of arguments is not matching the methods required number. You need to pass ${inputLength} arguments.`);\n    }\n    let params;\n    if (abi.inputs) {\n        params = encodeParameters(Array.isArray(abi.inputs) ? abi.inputs : [], args).replace('0x', '');\n    }\n    else {\n        params = inferTypesAndEncodeParameters(args).replace('0x', '');\n    }\n    if (isAbiConstructorFragment(abi)) {\n        if (!deployData)\n            throw new Web3ContractError('The contract has no contract data option set. This is necessary to append the constructor parameters.');\n        if (!deployData.startsWith('0x')) {\n            return `0x${deployData}${params}`;\n        }\n        return `${deployData}${params}`;\n    }\n    return `${encodeFunctionSignature(abi)}${params}`;\n};\n/** @deprecated import `decodeFunctionCall` from ''web3-eth-abi' instead. */\nexport const decodeMethodParams = decodeFunctionCall;\n/** @deprecated import `decodeFunctionReturn` from ''web3-eth-abi' instead. */\nexport const decodeMethodReturn = decodeFunctionReturn;\n//# sourceMappingURL=encoding.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { Web3Subscription } from 'web3-core';\nimport { decodeEventABI } from 'web3-eth';\n/**\n * ContractLogsSubscription to be used to subscribe to events logs.\n *\n * Following events are supported and can be accessed with either {@link ContractLogsSubscription.once} or ${@link ContractLogsSubscription.on} methods.\n *\n * - **connected**: Emitted when the subscription is connected.\n * - **data**: Fires on each incoming event with the event object as argument.\n * - **changed**: Fires on each event which was removed from the blockchain. The event will have the additional property `removed: true`.\n * - **error**: Fires on each error.\n *\n * ```ts\n * const subscription = await myContract.events.MyEvent({\n *   filter: {myIndexedParam: [20,23], myOtherIndexedParam: '0x123456789...'}, // Using an array means OR: e.g. 20 or 23\n *   fromBlock: 0\n * });\n *\n * subscription.on(\"connected\", function(subscriptionId){\n *   console.log(subscriptionId);\n * });\n *\n * subscription.on('data', function(event){\n *   console.log(event); // same results as the optional callback above\n * });\n *\n * subscription.on('changed', function(event){\n *   // remove event from local database\n * })\n *\n * subscription.on('error', function(error, receipt) { // If the transaction was rejected by the network with a receipt, the second parameter will be the receipt.\n *   ...\n * });\n *\n * // event output example\n * > {\n *   returnValues: {\n *       myIndexedParam: 20,\n *       myOtherIndexedParam: '0x123456789...',\n *       myNonIndexParam: 'My String'\n *   },\n *   raw: {\n *       data: '0x7f9fade1c0d57a7af66ab4ead79fade1c0d57a7af66ab4ead7c2c2eb7b11a91385',\n *       topics: ['0xfd43ade1c09fade1c0d57a7af66ab4ead7c2c2eb7b11a91ffdd57a7af66ab4ead7', '0x7f9fade1c0d57a7af66ab4ead79fade1c0d57a7af66ab4ead7c2c2eb7b11a91385']\n *   },\n *   event: 'MyEvent',\n *   signature: '0xfd43ade1c09fade1c0d57a7af66ab4ead7c2c2eb7b11a91ffdd57a7af66ab4ead7',\n *   logIndex: 0,\n *   transactionIndex: 0,\n *   transactionHash: '0x7f9fade1c0d57a7af66ab4ead79fade1c0d57a7af66ab4ead7c2c2eb7b11a91385',\n *   blockHash: '0xfd43ade1c09fade1c0d57a7af66ab4ead7c2c2eb7b11a91ffdd57a7af66ab4ead7',\n *   blockNumber: 1234,\n *   address: '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe'\n * }\n * ```\n */\nexport class ContractLogsSubscription extends Web3Subscription {\n    constructor(args, options) {\n        super(args, options);\n        this.address = args.address;\n        this.topics = args.topics;\n        this.abi = args.abi;\n        this.jsonInterface = args.jsonInterface;\n    }\n    _buildSubscriptionParams() {\n        return ['logs', { address: this.address, topics: this.topics }];\n    }\n    formatSubscriptionResult(data) {\n        return decodeEventABI(this.abi, data, this.jsonInterface, super.returnFormat);\n    }\n}\n/**\n * @deprecated LogsSubscription is renamed to ContractLogsSubscription in this package to not be confused with LogsSubscription at 'web3-eth'.\n */\nexport const LogsSubscription = ContractLogsSubscription;\n//# sourceMappingURL=contract_log_subscription.js.map","/**\n * RLP Encoding based on https://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp/\n * This function takes in data, converts it to Uint8Array if not,\n * and adds a length for recursion.\n * @param input Will be converted to Uint8Array\n * @returns Uint8Array of encoded data\n **/\nexport function encode(input) {\n    if (Array.isArray(input)) {\n        const output = [];\n        let outputLength = 0;\n        for (let i = 0; i < input.length; i++) {\n            const encoded = encode(input[i]);\n            output.push(encoded);\n            outputLength += encoded.length;\n        }\n        return concatBytes(encodeLength(outputLength, 192), ...output);\n    }\n    const inputBuf = toBytes(input);\n    if (inputBuf.length === 1 && inputBuf[0] < 128) {\n        return inputBuf;\n    }\n    return concatBytes(encodeLength(inputBuf.length, 128), inputBuf);\n}\n/**\n * Slices a Uint8Array, throws if the slice goes out-of-bounds of the Uint8Array.\n * E.g. `safeSlice(hexToBytes('aa'), 1, 2)` will throw.\n * @param input\n * @param start\n * @param end\n */\nfunction safeSlice(input, start, end) {\n    if (end > input.length) {\n        throw new Error('invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds');\n    }\n    return input.slice(start, end);\n}\n/**\n * Parse integers. Check if there is no leading zeros\n * @param v The value to parse\n */\nfunction decodeLength(v) {\n    if (v[0] === 0) {\n        throw new Error('invalid RLP: extra zeros');\n    }\n    return parseHexByte(bytesToHex(v));\n}\nfunction encodeLength(len, offset) {\n    if (len < 56) {\n        return Uint8Array.from([len + offset]);\n    }\n    const hexLength = numberToHex(len);\n    const lLength = hexLength.length / 2;\n    const firstByte = numberToHex(offset + 55 + lLength);\n    return Uint8Array.from(hexToBytes(firstByte + hexLength));\n}\nexport function decode(input, stream = false) {\n    if (typeof input === 'undefined' || input === null || input.length === 0) {\n        return Uint8Array.from([]);\n    }\n    const inputBytes = toBytes(input);\n    const decoded = _decode(inputBytes);\n    if (stream) {\n        return {\n            data: decoded.data,\n            remainder: decoded.remainder.slice(),\n        };\n    }\n    if (decoded.remainder.length !== 0) {\n        throw new Error('invalid RLP: remainder must be zero');\n    }\n    return decoded.data;\n}\n/** Decode an input with RLP */\nfunction _decode(input) {\n    let length, llength, data, innerRemainder, d;\n    const decoded = [];\n    const firstByte = input[0];\n    if (firstByte <= 0x7f) {\n        // a single byte whose value is in the [0x00, 0x7f] range, that byte is its own RLP encoding.\n        return {\n            data: input.slice(0, 1),\n            remainder: input.subarray(1),\n        };\n    }\n    else if (firstByte <= 0xb7) {\n        // string is 0-55 bytes long. A single byte with value 0x80 plus the length of the string followed by the string\n        // The range of the first byte is [0x80, 0xb7]\n        length = firstByte - 0x7f;\n        // set 0x80 null to 0\n        if (firstByte === 0x80) {\n            data = Uint8Array.from([]);\n        }\n        else {\n            data = safeSlice(input, 1, length);\n        }\n        if (length === 2 && data[0] < 0x80) {\n            throw new Error('invalid RLP encoding: invalid prefix, single byte < 0x80 are not prefixed');\n        }\n        return {\n            data,\n            remainder: input.subarray(length),\n        };\n    }\n    else if (firstByte <= 0xbf) {\n        // string is greater than 55 bytes long. A single byte with the value (0xb7 plus the length of the length),\n        // followed by the length, followed by the string\n        llength = firstByte - 0xb6;\n        if (input.length - 1 < llength) {\n            throw new Error('invalid RLP: not enough bytes for string length');\n        }\n        length = decodeLength(safeSlice(input, 1, llength));\n        if (length <= 55) {\n            throw new Error('invalid RLP: expected string length to be greater than 55');\n        }\n        data = safeSlice(input, llength, length + llength);\n        return {\n            data,\n            remainder: input.subarray(length + llength),\n        };\n    }\n    else if (firstByte <= 0xf7) {\n        // a list between 0-55 bytes long\n        length = firstByte - 0xbf;\n        innerRemainder = safeSlice(input, 1, length);\n        while (innerRemainder.length) {\n            d = _decode(innerRemainder);\n            decoded.push(d.data);\n            innerRemainder = d.remainder;\n        }\n        return {\n            data: decoded,\n            remainder: input.subarray(length),\n        };\n    }\n    else {\n        // a list over 55 bytes long\n        llength = firstByte - 0xf6;\n        length = decodeLength(safeSlice(input, 1, llength));\n        if (length < 56) {\n            throw new Error('invalid RLP: encoded list too short');\n        }\n        const totalLength = llength + length;\n        if (totalLength > input.length) {\n            throw new Error('invalid RLP: total length is larger than the data');\n        }\n        innerRemainder = safeSlice(input, llength, totalLength);\n        while (innerRemainder.length) {\n            d = _decode(innerRemainder);\n            decoded.push(d.data);\n            innerRemainder = d.remainder;\n        }\n        return {\n            data: decoded,\n            remainder: input.subarray(totalLength),\n        };\n    }\n}\nconst cachedHexes = Array.from({ length: 256 }, (_v, i) => i.toString(16).padStart(2, '0'));\nfunction bytesToHex(uint8a) {\n    // Pre-caching chars with `cachedHexes` speeds this up 6x\n    let hex = '';\n    for (let i = 0; i < uint8a.length; i++) {\n        hex += cachedHexes[uint8a[i]];\n    }\n    return hex;\n}\nfunction parseHexByte(hexByte) {\n    const byte = Number.parseInt(hexByte, 16);\n    if (Number.isNaN(byte))\n        throw new Error('Invalid byte sequence');\n    return byte;\n}\n// Caching slows it down 2-3x\nfunction hexToBytes(hex) {\n    if (typeof hex !== 'string') {\n        throw new TypeError('hexToBytes: expected string, got ' + typeof hex);\n    }\n    if (hex.length % 2)\n        throw new Error('hexToBytes: received invalid unpadded hex');\n    const array = new Uint8Array(hex.length / 2);\n    for (let i = 0; i < array.length; i++) {\n        const j = i * 2;\n        array[i] = parseHexByte(hex.slice(j, j + 2));\n    }\n    return array;\n}\n/** Concatenates two Uint8Arrays into one. */\nfunction concatBytes(...arrays) {\n    if (arrays.length === 1)\n        return arrays[0];\n    const length = arrays.reduce((a, arr) => a + arr.length, 0);\n    const result = new Uint8Array(length);\n    for (let i = 0, pad = 0; i < arrays.length; i++) {\n        const arr = arrays[i];\n        result.set(arr, pad);\n        pad += arr.length;\n    }\n    return result;\n}\nfunction utf8ToBytes(utf) {\n    return new TextEncoder().encode(utf);\n}\n/** Transform an integer into its hexadecimal value */\nfunction numberToHex(integer) {\n    if (integer < 0) {\n        throw new Error('Invalid integer as argument, must be unsigned!');\n    }\n    const hex = integer.toString(16);\n    return hex.length % 2 ? `0${hex}` : hex;\n}\n/** Pad a string to be even */\nfunction padToEven(a) {\n    return a.length % 2 ? `0${a}` : a;\n}\n/** Check if a string is prefixed by 0x */\nfunction isHexPrefixed(str) {\n    return str.length >= 2 && str[0] === '0' && str[1] === 'x';\n}\n/** Removes 0x from a given String */\nfunction stripHexPrefix(str) {\n    if (typeof str !== 'string') {\n        return str;\n    }\n    return isHexPrefixed(str) ? str.slice(2) : str;\n}\n/** Transform anything into a Uint8Array */\nfunction toBytes(v) {\n    if (v instanceof Uint8Array) {\n        return v;\n    }\n    if (typeof v === 'string') {\n        if (isHexPrefixed(v)) {\n            return hexToBytes(padToEven(stripHexPrefix(v)));\n        }\n        return utf8ToBytes(v);\n    }\n    if (typeof v === 'number' || typeof v === 'bigint') {\n        if (!v) {\n            return Uint8Array.from([]);\n        }\n        return hexToBytes(numberToHex(v));\n    }\n    if (v === null || v === undefined) {\n        return Uint8Array.from([]);\n    }\n    throw new Error('toBytes: received unsupported type ' + typeof v);\n}\nexport const utils = {\n    bytesToHex,\n    concatBytes,\n    hexToBytes,\n    utf8ToBytes,\n};\nexport const RLP = { encode, decode };\n//# sourceMappingURL=index.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { RLP } from '@ethereumjs/rlp';\nimport { InvalidAddressError, InvalidMethodParamsError, InvalidNumberError, Web3ContractError, } from 'web3-errors';\nimport { isNullish, mergeDeep, isContractInitOptions, keccak256, toChecksumAddress, hexToNumber, } from 'web3-utils';\nimport { isAddress, isHexString } from 'web3-validator';\nimport { encodeMethodABI } from './encoding.js';\nconst dataInputEncodeMethodHelper = (txParams, abi, params, dataInputFill) => {\n    var _a, _b;\n    const tx = {};\n    if (!isNullish(txParams.data) || dataInputFill === 'both') {\n        tx.data = encodeMethodABI(abi, params, ((_a = txParams.data) !== null && _a !== void 0 ? _a : txParams.input));\n    }\n    if (!isNullish(txParams.input) || dataInputFill === 'both') {\n        tx.input = encodeMethodABI(abi, params, ((_b = txParams.input) !== null && _b !== void 0 ? _b : txParams.data));\n    }\n    // if input and data is empty, use web3config default\n    if (isNullish(tx.input) && isNullish(tx.data)) {\n        tx[dataInputFill] = encodeMethodABI(abi, params);\n    }\n    return { data: tx.data, input: tx.input };\n};\nexport const getSendTxParams = ({ abi, params, options, contractOptions, }) => {\n    var _a, _b, _c;\n    const deploymentCall = (_c = (_b = (_a = options === null || options === void 0 ? void 0 : options.input) !== null && _a !== void 0 ? _a : options === null || options === void 0 ? void 0 : options.data) !== null && _b !== void 0 ? _b : contractOptions.input) !== null && _c !== void 0 ? _c : contractOptions.data;\n    if (!deploymentCall && !(options === null || options === void 0 ? void 0 : options.to) && !contractOptions.address) {\n        throw new Web3ContractError('Contract address not specified');\n    }\n    if (!(options === null || options === void 0 ? void 0 : options.from) && !contractOptions.from) {\n        throw new Web3ContractError('Contract \"from\" address not specified');\n    }\n    let txParams = mergeDeep({\n        to: contractOptions.address,\n        gas: contractOptions.gas,\n        gasPrice: contractOptions.gasPrice,\n        from: contractOptions.from,\n        input: contractOptions.input,\n        maxPriorityFeePerGas: contractOptions.maxPriorityFeePerGas,\n        maxFeePerGas: contractOptions.maxFeePerGas,\n        data: contractOptions.data,\n    }, options);\n    const dataInput = dataInputEncodeMethodHelper(txParams, abi, params, options === null || options === void 0 ? void 0 : options.dataInputFill);\n    txParams = Object.assign(Object.assign({}, txParams), { data: dataInput.data, input: dataInput.input });\n    return txParams;\n};\nexport const getEthTxCallParams = ({ abi, params, options, contractOptions, }) => {\n    if (!(options === null || options === void 0 ? void 0 : options.to) && !contractOptions.address) {\n        throw new Web3ContractError('Contract address not specified');\n    }\n    let txParams = mergeDeep({\n        to: contractOptions.address,\n        gas: contractOptions.gas,\n        gasPrice: contractOptions.gasPrice,\n        from: contractOptions.from,\n        input: contractOptions.input,\n        maxPriorityFeePerGas: contractOptions.maxPriorityFeePerGas,\n        maxFeePerGas: contractOptions.maxFeePerGas,\n        data: contractOptions.data,\n    }, options);\n    const dataInput = dataInputEncodeMethodHelper(txParams, abi, params, options === null || options === void 0 ? void 0 : options.dataInputFill);\n    txParams = Object.assign(Object.assign({}, txParams), { data: dataInput.data, input: dataInput.input });\n    return txParams;\n};\nexport const getEstimateGasParams = ({ abi, params, options, contractOptions, }) => {\n    let txParams = mergeDeep({\n        to: contractOptions.address,\n        gas: contractOptions.gas,\n        gasPrice: contractOptions.gasPrice,\n        from: contractOptions.from,\n        input: contractOptions.input,\n        data: contractOptions.data,\n    }, options);\n    const dataInput = dataInputEncodeMethodHelper(txParams, abi, params, options === null || options === void 0 ? void 0 : options.dataInputFill);\n    txParams = Object.assign(Object.assign({}, txParams), { data: dataInput.data, input: dataInput.input });\n    return txParams;\n};\nexport const isWeb3ContractContext = (options) => typeof options === 'object' &&\n    !isNullish(options) &&\n    Object.keys(options).length !== 0 &&\n    !isContractInitOptions(options);\nexport const getCreateAccessListParams = ({ abi, params, options, contractOptions, }) => {\n    if (!(options === null || options === void 0 ? void 0 : options.to) && !contractOptions.address) {\n        throw new Web3ContractError('Contract address not specified');\n    }\n    if (!(options === null || options === void 0 ? void 0 : options.from) && !contractOptions.from) {\n        throw new Web3ContractError('Contract \"from\" address not specified');\n    }\n    let txParams = mergeDeep({\n        to: contractOptions.address,\n        gas: contractOptions.gas,\n        gasPrice: contractOptions.gasPrice,\n        from: contractOptions.from,\n        input: contractOptions.input,\n        maxPriorityFeePerGas: contractOptions.maxPriorityFeePerGas,\n        maxFeePerGas: contractOptions.maxFeePerGas,\n        data: contractOptions.data,\n    }, options);\n    const dataInput = dataInputEncodeMethodHelper(txParams, abi, params, options === null || options === void 0 ? void 0 : options.dataInputFill);\n    txParams = Object.assign(Object.assign({}, txParams), { data: dataInput.data, input: dataInput.input });\n    return txParams;\n};\nexport const createContractAddress = (from, nonce) => {\n    if (!isAddress(from))\n        throw new InvalidAddressError(`Invalid address given ${from}`);\n    let nonceValue = nonce;\n    if (typeof nonce === 'string' && isHexString(nonce))\n        nonceValue = hexToNumber(nonce);\n    else if (typeof nonce === 'string' && !isHexString(nonce))\n        throw new InvalidNumberError('Invalid nonce value format');\n    const rlpEncoded = RLP.encode([from, nonceValue]);\n    const result = keccak256(rlpEncoded);\n    const contractAddress = '0x'.concat(result.substring(26));\n    return toChecksumAddress(contractAddress);\n};\nexport const create2ContractAddress = (from, salt, initCode) => {\n    if (!isAddress(from))\n        throw new InvalidAddressError(`Invalid address given ${from}`);\n    if (!isHexString(salt))\n        throw new InvalidMethodParamsError(`Invalid salt value ${salt}`);\n    if (!isHexString(initCode))\n        throw new InvalidMethodParamsError(`Invalid initCode value ${initCode}`);\n    const initCodeHash = keccak256(initCode);\n    const initCodeHashPadded = initCodeHash.padStart(64, '0'); // Pad to 32 bytes (64 hex characters)\n    const create2Params = ['0xff', from, salt, initCodeHashPadded].map(x => x.replace(/0x/, ''));\n    const create2Address = `0x${create2Params.join('')}`;\n    return toChecksumAddress(`0x${keccak256(create2Address).slice(26)}`); // Slice to get the last 20 bytes (40 hex characters) & checksum\n};\n//# sourceMappingURL=utils.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\nimport { Web3ContractError } from 'web3-errors';\nimport { sendTransaction } from 'web3-eth';\nimport { decodeFunctionCall } from 'web3-eth-abi';\nimport { DEFAULT_RETURN_FORMAT, } from 'web3-types';\nimport { format } from 'web3-utils';\nimport { isNullish } from 'web3-validator';\nimport { encodeMethodABI } from './encoding.js';\nimport { getSendTxParams } from './utils.js';\n/*\n * This class is only supposed to be used for the return of `new Contract(...).deploy(...)` method.\n */\nexport class DeployerMethodClass {\n    _contractMethodDeploySend(tx) {\n        // eslint-disable-next-line no-use-before-define\n        const returnTxOptions = {\n            transactionResolver: (receipt) => {\n                if (receipt.status === BigInt(0)) {\n                    throw new Web3ContractError(\"code couldn't be stored\", receipt);\n                }\n                const newContract = this.parent.clone();\n                // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n                newContract.options.address = receipt.contractAddress;\n                return newContract;\n            },\n            contractAbi: this.parent.options.jsonInterface,\n            // TODO Should make this configurable by the user\n            checkRevertBeforeSending: false,\n        };\n        return isNullish(this.parent.getTransactionMiddleware())\n            ? sendTransaction(this.parent, tx, this.parent.defaultReturnFormat, returnTxOptions) // not calling this with undefined Middleware because it will not break if Eth package is not updated\n            : sendTransaction(this.parent, tx, this.parent.defaultReturnFormat, returnTxOptions, this.parent.getTransactionMiddleware());\n    }\n    constructor(\n    // eslint-disable-next-line no-use-before-define\n    parent, deployOptions) {\n        this.parent = parent;\n        this.deployOptions = deployOptions;\n        const { args, abi, contractOptions, deployData } = this.calculateDeployParams();\n        this.args = args;\n        this.constructorAbi = abi;\n        this.contractOptions = contractOptions;\n        this.deployData = deployData;\n    }\n    send(options) {\n        const modifiedOptions = Object.assign({}, options);\n        const tx = this.populateTransaction(modifiedOptions);\n        return this._contractMethodDeploySend(tx);\n    }\n    populateTransaction(txOptions) {\n        var _a, _b;\n        const modifiedContractOptions = Object.assign(Object.assign({}, this.contractOptions), { from: (_b = (_a = this.contractOptions.from) !== null && _a !== void 0 ? _a : this.parent.defaultAccount) !== null && _b !== void 0 ? _b : undefined });\n        // args, abi, contractOptions, deployData\n        const tx = getSendTxParams({\n            abi: this.constructorAbi,\n            params: this.args,\n            options: Object.assign(Object.assign({}, txOptions), { dataInputFill: this.parent.contractDataInputFill }),\n            contractOptions: modifiedContractOptions,\n        });\n        // @ts-expect-error remove unnecessary field\n        if (tx.dataInputFill) {\n            // @ts-expect-error remove unnecessary field\n            delete tx.dataInputFill;\n        }\n        return tx;\n    }\n    calculateDeployParams() {\n        var _a, _b, _c, _d, _e, _f;\n        let abi = this.parent.options.jsonInterface.find(j => j.type === 'constructor');\n        if (!abi) {\n            abi = {\n                type: 'constructor',\n                stateMutability: '',\n            };\n        }\n        const _input = format({ format: 'bytes' }, (_b = (_a = this.deployOptions) === null || _a === void 0 ? void 0 : _a.input) !== null && _b !== void 0 ? _b : this.parent.options.input, DEFAULT_RETURN_FORMAT);\n        const _data = format({ format: 'bytes' }, (_d = (_c = this.deployOptions) === null || _c === void 0 ? void 0 : _c.data) !== null && _d !== void 0 ? _d : this.parent.options.data, DEFAULT_RETURN_FORMAT);\n        if ((!_input || _input.trim() === '0x') && (!_data || _data.trim() === '0x')) {\n            throw new Web3ContractError('contract creation without any data provided.');\n        }\n        const args = (_f = (_e = this.deployOptions) === null || _e === void 0 ? void 0 : _e.arguments) !== null && _f !== void 0 ? _f : [];\n        const contractOptions = Object.assign(Object.assign({}, this.parent.options), { input: _input, data: _data });\n        const deployData = _input !== null && _input !== void 0 ? _input : _data;\n        return { args, abi, contractOptions, deployData };\n    }\n    estimateGas(options_1) {\n        return __awaiter(this, arguments, void 0, function* (options, returnFormat = this.parent.defaultReturnFormat) {\n            const modifiedOptions = Object.assign({}, options);\n            return this.parent.contractMethodEstimateGas({\n                abi: this.constructorAbi,\n                params: this.args,\n                returnFormat,\n                options: modifiedOptions,\n                contractOptions: this.contractOptions,\n            });\n        });\n    }\n    encodeABI() {\n        return encodeMethodABI(this.constructorAbi, this.args, format({ format: 'bytes' }, this.deployData, this.parent.defaultReturnFormat));\n    }\n    decodeData(data) {\n        return Object.assign(Object.assign({}, decodeFunctionCall(this.constructorAbi, data.replace(this.deployData, ''), false)), { __method__: this.constructorAbi.type });\n    }\n}\n//# sourceMappingURL=contract-deployer-method-class.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\nimport { Web3SubscriptionManager } from 'web3-core';\nimport { DEFAULT_RETURN_FORMAT } from 'web3-types';\n/**\n * Similar to `Web3SubscriptionManager` but has a reference to the Contract that uses\n */\nexport class ContractSubscriptionManager extends Web3SubscriptionManager {\n    /**\n     *\n     * @param - Web3SubscriptionManager\n     * @param - parentContract\n     *\n     * @example\n     * ```ts\n     * const requestManager = new Web3RequestManager(\"ws://localhost:8545\");\n     * const contract = new Contract(...)\n     * const subscriptionManager = new Web3SubscriptionManager(requestManager, {}, contract);\n     * ```\n     */\n    constructor(self, parentContract) {\n        super(self.requestManager, self.registeredSubscriptions);\n        this.parentContract = parentContract;\n    }\n    /**\n     * Will create a new subscription\n     *\n     * @param name - The subscription you want to subscribe to\n     * @param args - Optional additional parameters, depending on the subscription type\n     * @param returnFormat- ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) - Specifies how the return data from the call should be formatted.\n     *\n     * Will subscribe to a specific topic (note: name)\n     * @returns The subscription object\n     */\n    subscribe(name_1, args_1) {\n        const _super = Object.create(null, {\n            subscribe: { get: () => super.subscribe }\n        });\n        return __awaiter(this, arguments, void 0, function* (name, args, returnFormat = DEFAULT_RETURN_FORMAT) {\n            return _super.subscribe.call(this, name, args !== null && args !== void 0 ? args : this.parentContract.options, returnFormat);\n        });\n    }\n}\n//# sourceMappingURL=contract-subscription-manager.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\nimport { Web3Context, Web3ConfigEvent, } from 'web3-core';\nimport { ContractExecutionError, ContractTransactionDataAndInputError, SubscriptionError, Web3ContractError, } from 'web3-errors';\nimport { createAccessList, call, estimateGas, getLogs, sendTransaction, decodeEventABI, NewHeadsSubscription, ALL_EVENTS, ALL_EVENTS_ABI, } from 'web3-eth';\nimport { decodeFunctionCall, decodeFunctionReturn, encodeEventSignature, encodeFunctionSignature, decodeContractErrorData, isAbiErrorFragment, isAbiEventFragment, isAbiFunctionFragment, jsonInterfaceMethodToString, } from 'web3-eth-abi';\nimport { BlockTags, } from 'web3-types';\nimport { format, isDataFormat, keccak256, toChecksumAddress, isContractInitOptions, } from 'web3-utils';\nimport { isNullish, validator, utils as validatorUtils, Web3ValidatorError, } from 'web3-validator';\nimport { encodeEventABI, encodeMethodABI } from './encoding.js';\nimport { ContractLogsSubscription } from './contract_log_subscription.js';\nimport { getCreateAccessListParams, getEstimateGasParams, getEthTxCallParams, getSendTxParams, isWeb3ContractContext, } from './utils.js';\n// eslint-disable-next-line import/no-cycle\nimport { DeployerMethodClass } from './contract-deployer-method-class.js';\n// eslint-disable-next-line import/no-cycle\nimport { ContractSubscriptionManager } from './contract-subscription-manager.js';\nconst contractSubscriptions = {\n    logs: ContractLogsSubscription,\n    newHeads: NewHeadsSubscription,\n    newBlockHeaders: NewHeadsSubscription,\n};\n/**\n * The `web3.eth.Contract` makes it easy to interact with smart contracts on the ethereum blockchain.\n * For using contract package, first install Web3 package using: `npm i web3` or `yarn add web3` based on your package manager, after that contracts features can be used as mentioned in following snippet.\n * ```ts\n *\n * import { Web3 } from 'web3';\n *\n * const web3 = new Web3('https://127.0.0.1:4545');\n * const abi = [...] as const; // your contract ABI\n *\n * let contract = new web3.eth.Contract(abi,'0xdAC17F958D2ee523a2206206994597C13D831ec7');\n * await contract.methods.balanceOf('0xdAC17F958D2ee523a2206206994597C13D831ec7').call();\n * ```\n * For using individual package install `web3-eth-contract` and `web3-core` packages using: `npm i web3-eth-contract web3-core` or `yarn add web3-eth-contract web3-core`. This is more efficient approach for building lightweight applications.\n * ```ts\n *\n * import { Web3Context } from 'web3-core';\n * import { Contract } from 'web3-eth-contract';\n *\n * const abi = [...] as const; // your contract ABI\n *\n * let contract = new web3.eth.Contract(\n * \tabi,\n * \t'0xdAC17F958D2ee523a2206206994597C13D831ec7'\n * \t new Web3Context('http://127.0.0.1:8545'));\n *\n * await contract.methods.balanceOf('0xdAC17F958D2ee523a2206206994597C13D831ec7').call();\n * ```\n * ## Generated Methods\n * Following methods are generated by web3.js contract object for each of contract functions by using its ABI.\n *\n * ### send\n * This is used to send a transaction to the smart contract and execute its method. Note this can alter the smart contract state.\n *\n * #### Parameters\n * options?: PayableTxOptions | NonPayableTxOptions\n *\n * #### Returns\n * [Web3PromiEvent](/api/web3/namespace/core#Web3PromiEvent) : Web3 Promi Event\n *\n * ```ts\n * // using the promise\n * myContract.methods.myMethod(123).send({from: '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe'})\n * \t.then(function(receipt){\n * \t\t// other parts of code to use receipt\n * \t});\n *\n *\n * // using the event emitter\n * myContract.methods.myMethod(123).send({from: '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe'})\n * \t.on('transactionHash', function(hash){\n * \t\t// ...\n * \t})\n * \t.on('confirmation', function(confirmationNumber, receipt){\n * \t\t// ...\n * \t})\n * \t.on('receipt', function(receipt){\n * \t\t// ...\n * \t})\n * \t.on('error', function(error, receipt) {\n * \t\t// ...\n * \t});\n *\n * ```\n *\n * ### call\n * This will execute smart contract method in the EVM without sending any transaction. Note calling cannot alter the smart contract state.\n *\n * #### Parameters\n * options?: PayableCallOptions | NonPayableCallOptions,\n * block?: BlockNumberOrTag,\n *\n * #### Returns\n * Promise : having results of call\n *\n * ```ts\n *\n * let myContract = new web3.eth.Contract(abi, address);\n *\n * myContract.methods.myFunction().call()\n * .then(console.log);\n *\n * ```\n * ### estimateGas\n * Returns the amount of gas consumed by executing the method in EVM without creating a new transaction on the blockchain. The returned amount can be used as a gas estimate for executing the transaction publicly. The actual gas used can be different when sending the transaction later, as the state of the smart contract can be different at that time.\n *\n * #### Parameters\n * options?: PayableCallOptions,\n * returnFormat: ReturnFormat = DEFAULT_RETURN_FORMAT as ReturnFormat,\n *\n * #### Returns\n * Promise: The gas amount estimated.\n *\n * ```ts\n * const estimatedGas = await contract.methods.approve('0xdAC17F958D2ee523a2206206994597C13D831ec7', 300)\n *     .estimateGas();\n *\n * ```\n *\n * ### encodeABI\n * Encodes the ABI for this method. The resulting hex string is 32-bit function signature hash plus the passed parameters in Solidity tightly packed format. This can be used to send a transaction, call a method, or pass it into another smart contract’s method as arguments. Set the data field on web3.eth.sendTransaction options as the encodeABI() result and it is the same as calling the contract method with contract.myMethod.send().\n *\n * Some use cases for encodeABI() include: preparing a smart contract transaction for a multisignature wallet, working with offline wallets and cold storage and creating transaction payload for complex smart contract proxy calls.\n *\n * #### Parameters\n * None\n *\n * #### Returns\n * String: The encoded ABI.\n *\n * ```ts\n * const encodedABI = await contract.methods.approve('0xdAC17F958D2ee523a2206206994597C13D831ec7', 300)\n *     .encodeABI();\n *\n * ```\n *\n\n * ### decodeMethodData\n * Decodes the given ABI-encoded data, revealing both the method name and the parameters used in the smart contract call.\n * This function reverses the encoding process happens at the method `encodeABI`.\n * It's particularly useful for debugging and understanding the interactions with and between smart contracts.\n *\n * #### Parameters\n *\n * - `data` **HexString**: The string of ABI-encoded data that needs to be decoded. This should include the method signature and the encoded parameters.\n *\n * #### Returns\n *\n * - **Object**: This object combines both the decoded parameters and the method name in a readable format. Specifically, the returned object contains:\n *   - `__method__` **String**: The name of the contract method, reconstructed from the ABI.\n *   - `__length__` **Number**: The number of parameters decoded.\n *   - Additional properties representing each parameter by name, as well as their position and values.\n *\n * #### Example\n *\n * Given an ABI-encoded string from a transaction, you can decode this data to identify the method called and the parameters passed.\n * Here's a simplified example:\n *\n *\n * ```typescript\n * const GreeterAbi = [\n * \t{\n * \t\tinputs: [\n * \t\t\t{\n * \t\t\t\tinternalType: 'string',\n * \t\t\t\tname: '_greeting',\n * \t\t\t\ttype: 'string',\n * \t\t\t},\n * \t\t],\n * \t\tname: 'setGreeting',\n * \t\toutputs: [],\n * \t\ttype: 'function',\n * \t},\n * ];\n * const contract = new Contract(GreeterAbi); // Initialize with your contract's ABI\n *\n * // The ABI-encoded data string for \"setGreeting('Hello World')\"\n * const encodedData =\n * \t'0xa41368620000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000b48656c6c6f20576f726c64000000000000000000000000000000000000000000';\n *\n * try {\n * \tconst decoded = contract.decodeMethodData(encodedData);\n * \tconsole.log(decoded.__method__); // Outputs: \"setGreeting(string)\"\n * \tconsole.log(decoded); // Outputs the detailed parameter data\n * \t// This tells that the method called was `setGreeting` with a single string parameter \"Hello World\":\n * \t// {\n * \t//   __method__: 'setGreeting(string)',\n * \t//   __length__: 1,\n * \t//   '0': 'Hello World',\n * \t//   _greeting: 'Hello World'\n * \t// }\n * } catch (error) {\n * \tconsole.error(error);\n * }\n * ```\n *\n\n * ### createAccessList\n * This will create an access list a method execution will access when executed in the EVM.\n * Note: You must specify a from address and gas if it’s not specified in options when instantiating parent contract object.\n *\n * #### Parameters\n * options?: PayableCallOptions | NonPayableCallOptions,\n * block?: BlockNumberOrTag,\n *\n * #### Returns\n * Promise: The generated access list for transaction.\n *\n * ```ts\n * const accessList = await contract.methods.approve('0xbEe634C21c16F05B03B704BaE071536121e6cFeA', 300)\n *     .createAccessList({\n *         from: \"0x9992695e1053bb737d3cfae4743dcfc4b94f203d\"\n *    });\n * ```\n *\n */\nexport class Contract extends Web3Context {\n    get subscriptionManager() {\n        return this._subscriptionManager;\n    }\n    constructor(jsonInterface, addressOrOptionsOrContext, optionsOrContextOrReturnFormat, contextOrReturnFormat, returnFormat) {\n        var _a, _b, _c;\n        // eslint-disable-next-line no-nested-ternary\n        const options = isContractInitOptions(addressOrOptionsOrContext)\n            ? addressOrOptionsOrContext\n            : isContractInitOptions(optionsOrContextOrReturnFormat)\n                ? optionsOrContextOrReturnFormat\n                : undefined;\n        let contractContext;\n        if (isWeb3ContractContext(addressOrOptionsOrContext)) {\n            contractContext = addressOrOptionsOrContext;\n        }\n        else if (isWeb3ContractContext(optionsOrContextOrReturnFormat)) {\n            contractContext = optionsOrContextOrReturnFormat;\n        }\n        else {\n            contractContext = contextOrReturnFormat;\n        }\n        let provider;\n        if (typeof addressOrOptionsOrContext === 'object' &&\n            'provider' in addressOrOptionsOrContext) {\n            provider = addressOrOptionsOrContext.provider;\n        }\n        else if (typeof optionsOrContextOrReturnFormat === 'object' &&\n            'provider' in optionsOrContextOrReturnFormat) {\n            provider = optionsOrContextOrReturnFormat.provider;\n        }\n        else if (typeof contextOrReturnFormat === 'object' &&\n            'provider' in contextOrReturnFormat) {\n            provider = contextOrReturnFormat.provider;\n        }\n        else {\n            provider = Contract.givenProvider;\n        }\n        super(Object.assign(Object.assign({}, contractContext), { provider, registeredSubscriptions: contractSubscriptions }));\n        /**\n         * Set to true if you want contracts' defaults to sync with global defaults.\n         */\n        this.syncWithContext = false;\n        this._functions = {};\n        this._subscriptionManager = new ContractSubscriptionManager(super.subscriptionManager, this);\n        // Init protected properties\n        if (contractContext === null || contractContext === void 0 ? void 0 : contractContext.wallet) {\n            this._wallet = contractContext.wallet;\n        }\n        if (contractContext === null || contractContext === void 0 ? void 0 : contractContext.accountProvider) {\n            this._accountProvider = contractContext.accountProvider;\n        }\n        if (!isNullish(options) &&\n            !isNullish(options.data) &&\n            !isNullish(options.input) &&\n            this.config.contractDataInputFill !== 'both')\n            throw new ContractTransactionDataAndInputError({\n                data: options.data,\n                input: options.input,\n            });\n        this._overloadedMethodAbis = new Map();\n        // eslint-disable-next-line no-nested-ternary\n        const returnDataFormat = isDataFormat(contextOrReturnFormat)\n            ? contextOrReturnFormat\n            : isDataFormat(optionsOrContextOrReturnFormat)\n                ? optionsOrContextOrReturnFormat\n                : returnFormat !== null && returnFormat !== void 0 ? returnFormat : this.defaultReturnFormat;\n        const address = typeof addressOrOptionsOrContext === 'string' ? addressOrOptionsOrContext : undefined;\n        this.config.contractDataInputFill =\n            (_a = options === null || options === void 0 ? void 0 : options.dataInputFill) !== null && _a !== void 0 ? _a : this.config.contractDataInputFill;\n        this._parseAndSetJsonInterface(jsonInterface, returnDataFormat);\n        if (this.defaultReturnFormat !== returnDataFormat) {\n            this.defaultReturnFormat = returnDataFormat;\n        }\n        if (!isNullish(address)) {\n            this._parseAndSetAddress(address, returnDataFormat);\n        }\n        this.options = {\n            address,\n            jsonInterface: this._jsonInterface,\n            gas: (_b = options === null || options === void 0 ? void 0 : options.gas) !== null && _b !== void 0 ? _b : options === null || options === void 0 ? void 0 : options.gasLimit,\n            gasPrice: options === null || options === void 0 ? void 0 : options.gasPrice,\n            from: options === null || options === void 0 ? void 0 : options.from,\n            input: options === null || options === void 0 ? void 0 : options.input,\n            data: options === null || options === void 0 ? void 0 : options.data,\n        };\n        this.syncWithContext = (_c = options === null || options === void 0 ? void 0 : options.syncWithContext) !== null && _c !== void 0 ? _c : false;\n        if (contractContext instanceof Web3Context) {\n            this.subscribeToContextEvents(contractContext);\n        }\n        Object.defineProperty(this.options, 'address', {\n            set: (value) => this._parseAndSetAddress(value, returnDataFormat),\n            get: () => this._address,\n        });\n        Object.defineProperty(this.options, 'jsonInterface', {\n            set: (value) => this._parseAndSetJsonInterface(value, returnDataFormat),\n            get: () => this._jsonInterface,\n        });\n        if (contractContext instanceof Web3Context) {\n            contractContext.on(Web3ConfigEvent.CONFIG_CHANGE, event => {\n                // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n                this.setConfig({ [event.name]: event.newValue });\n            });\n        }\n    }\n    setTransactionMiddleware(transactionMiddleware) {\n        this.transactionMiddleware = transactionMiddleware;\n    }\n    getTransactionMiddleware() {\n        return this.transactionMiddleware;\n    }\n    /**\n     * Subscribe to an event.\n     *\n     * ```ts\n     * await myContract.events.MyEvent([options])\n     * ```\n     *\n     * There is a special event `allEvents` that can be used to subscribe all events.\n     *\n     * ```ts\n     * await myContract.events.allEvents([options])\n     * ```\n     *\n     * @returns - When individual event is accessed will returns {@link ContractBoundEvent} object\n     */\n    get events() {\n        return this._events;\n    }\n    /**\n     * Creates a transaction object for that method, which then can be `called`, `send`, `estimated`, `createAccessList` , or `ABI encoded`.\n     *\n     * The methods of this smart contract are available through:\n     *\n     * The name: `myContract.methods.myMethod(123)`\n     * The name with parameters: `myContract.methods['myMethod(uint256)'](123)`\n     * The signature `myContract.methods['0x58cf5f10'](123)`\n     *\n     * This allows calling functions with same name but different parameters from the JavaScript contract object.\n     *\n     * \\> The method signature does not provide a type safe interface, so we recommend to use method `name` instead.\n     *\n     * ```ts\n     * // calling a method\n     * const result = await myContract.methods.myMethod(123).call({from: '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe'});\n     *\n     * // or sending and using a promise\n     * const receipt = await myContract.methods.myMethod(123).send({from: '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe'});\n     *\n     * // or sending and using the events\n     * const sendObject = myContract.methods.myMethod(123).send({from: '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe'});\n     * sendObject.on('transactionHash', function(hash){\n     *   ...\n     * });\n     * sendObject.on('receipt', function(receipt){\n     *   ...\n     * });\n     * sendObject.on('confirmation', function(confirmationNumber, receipt){\n     *   ...\n     * });\n     * sendObject.on('error', function(error, receipt) {\n     *   ...\n     * });\n     * ```\n     *\n     * @returns - Either returns {@link PayableMethodObject} or {@link NonPayableMethodObject} based on the definitions of the ABI of that contract.\n     */\n    get methods() {\n        return this._methods;\n    }\n    /**\n     * Clones the current contract instance. This doesn't deploy contract on blockchain and only creates a local clone.\n     *\n     * @returns - The new contract instance.\n     *\n     * ```ts\n     * const contract1 = new web3.eth.Contract(abi, address, {gasPrice: '12345678', from: fromAddress});\n     *\n     * const contract2 = contract1.clone();\n     * contract2.options.address = '0xdAC17F958D2ee523a2206206994597C13D831ec7';\n     *\n     * (contract1.options.address !== contract2.options.address);\n     * > true\n     * ```\n     */\n    clone() {\n        let newContract;\n        if (this.options.address) {\n            newContract = new Contract([...this._jsonInterface, ...this._errorsInterface], this.options.address, {\n                gas: this.options.gas,\n                gasPrice: this.options.gasPrice,\n                from: this.options.from,\n                input: this.options.input,\n                data: this.options.data,\n                provider: this.currentProvider,\n                syncWithContext: this.syncWithContext,\n                dataInputFill: this.config.contractDataInputFill,\n            }, this.getContextObject());\n        }\n        else {\n            newContract = new Contract([...this._jsonInterface, ...this._errorsInterface], {\n                gas: this.options.gas,\n                gasPrice: this.options.gasPrice,\n                from: this.options.from,\n                input: this.options.input,\n                data: this.options.data,\n                provider: this.currentProvider,\n                syncWithContext: this.syncWithContext,\n                dataInputFill: this.config.contractDataInputFill,\n            }, this.getContextObject());\n        }\n        if (this.context)\n            newContract.subscribeToContextEvents(this.context);\n        return newContract;\n    }\n    /**\n     * Call this function to deploy the contract to the blockchain. After successful deployment the promise will resolve with a new contract instance.\n     *\n     * ```ts\n     * myContract.deploy({\n     *   input: '0x12345...', // data keyword can be used, too.\n     *   arguments: [123, 'My String']\n     * })\n     * .send({\n     *   from: '0x1234567890123456789012345678901234567891',\n     *   gas: 1500000,\n     *   gasPrice: '30000000000000'\n     * }, function(error, transactionHash){ ... })\n     * .on('error', function(error){ ... })\n     * .on('transactionHash', function(transactionHash){ ... })\n     * .on('receipt', function(receipt){\n     *  console.log(receipt.contractAddress) // contains the new contract address\n     * })\n     * .on('confirmation', function(confirmationNumber, receipt){ ... })\n     * .then(function(newContractInstance){\n     *   console.log(newContractInstance.options.address) // instance with the new contract address\n     * });\n     *\n     *\n     * // When the data is already set as an option to the contract itself\n     * myContract.options.data = '0x12345...';\n     *\n     * myContract.deploy({\n     *   arguments: [123, 'My String']\n     * })\n     * .send({\n     *   from: '0x1234567890123456789012345678901234567891',\n     *   gas: 1500000,\n     *   gasPrice: '30000000000000'\n     * })\n     * .then(function(newContractInstance){\n     *   console.log(newContractInstance.options.address) // instance with the new contract address\n     * });\n     *\n     *\n     * // Simply encoding\n     * myContract.deploy({\n     *   input: '0x12345...',\n     *   arguments: [123, 'My String']\n     * })\n     * .encodeABI();\n     * > '0x12345...0000012345678765432'\n     *\n     *\n     * // decoding\n     * myContract.deploy({\n     *   input: '0x12345...',\n     *   // arguments: [123, 'My Greeting'] if you just need to decode the data, you can skip the arguments\n     * })\n     * .decodeData('0x12345...0000012345678765432');\n     * > {\n     *      __method__: 'constructor',\n     *      __length__: 2,\n     *      '0': '123',\n     *      _id: '123',\n     *      '1': 'My Greeting',\n     *      _greeting: 'My Greeting',\n     *   }\n     *\n     *\n     * // Gas estimation\n     * myContract.deploy({\n     *   input: '0x12345...',\n     *   arguments: [123, 'My String']\n     * })\n     * .estimateGas(function(err, gas){\n     *   console.log(gas);\n     * });\n     * ```\n     *\n     * @returns - The transaction object\n     */\n    deploy(deployOptions) {\n        return new DeployerMethodClass(this, deployOptions);\n    }\n    getPastEvents(param1, param2, param3) {\n        return __awaiter(this, void 0, void 0, function* () {\n            var _a;\n            const eventName = typeof param1 === 'string' ? param1 : ALL_EVENTS;\n            const options = \n            // eslint-disable-next-line no-nested-ternary\n            typeof param1 !== 'string' && !isDataFormat(param1)\n                ? param1\n                : !isDataFormat(param2)\n                    ? param2\n                    : {};\n            // eslint-disable-next-line no-nested-ternary\n            const returnFormat = isDataFormat(param1)\n                ? param1\n                : isDataFormat(param2)\n                    ? param2\n                    : param3 !== null && param3 !== void 0 ? param3 : this.defaultReturnFormat;\n            const abi = eventName === 'allEvents' || eventName === ALL_EVENTS\n                ? ALL_EVENTS_ABI\n                : this._jsonInterface.find(j => 'name' in j && j.name === eventName);\n            if (!abi) {\n                throw new Web3ContractError(`Event ${String(eventName)} not found.`);\n            }\n            const { fromBlock, toBlock, topics, address } = encodeEventABI(this.options, abi, options !== null && options !== void 0 ? options : {});\n            const logs = yield getLogs(this, { fromBlock, toBlock, topics, address }, returnFormat);\n            const decodedLogs = logs\n                ? logs.map(log => typeof log === 'string'\n                    ? log\n                    : decodeEventABI(abi, log, this._jsonInterface, returnFormat))\n                : [];\n            const filter = (_a = options === null || options === void 0 ? void 0 : options.filter) !== null && _a !== void 0 ? _a : {};\n            const filterKeys = Object.keys(filter);\n            if (filterKeys.length > 0) {\n                return decodedLogs.filter(log => {\n                    if (typeof log === 'string')\n                        return true;\n                    return filterKeys.every((key) => {\n                        var _a;\n                        if (Array.isArray(filter[key])) {\n                            return filter[key].some((v) => String(log.returnValues[key]).toUpperCase() ===\n                                String(v).toUpperCase());\n                        }\n                        const inputAbi = (_a = abi.inputs) === null || _a === void 0 ? void 0 : _a.filter(input => input.name === key)[0];\n                        if ((inputAbi === null || inputAbi === void 0 ? void 0 : inputAbi.indexed) && inputAbi.type === 'string') {\n                            const hashedIndexedString = keccak256(filter[key]);\n                            if (hashedIndexedString === String(log.returnValues[key]))\n                                return true;\n                        }\n                        return (String(log.returnValues[key]).toUpperCase() ===\n                            String(filter[key]).toUpperCase());\n                    });\n                });\n            }\n            return decodedLogs;\n        });\n    }\n    _parseAndSetAddress(value, returnFormat = this.defaultReturnFormat) {\n        this._address = value\n            ? toChecksumAddress(format({ format: 'address' }, value, returnFormat))\n            : value;\n    }\n    decodeMethodData(data) {\n        const methodSignature = data.slice(0, 10);\n        const functionsAbis = this._jsonInterface.filter(j => j.type !== 'error');\n        const abi = functionsAbis.find(a => methodSignature === encodeFunctionSignature(jsonInterfaceMethodToString(a)));\n        if (!abi) {\n            throw new Web3ContractError(`The ABI for the provided method signature ${methodSignature} was not found.`);\n        }\n        return decodeFunctionCall(abi, data);\n    }\n    _parseAndSetJsonInterface(abis, returnFormat = this.defaultReturnFormat) {\n        var _a, _b;\n        this._functions = {};\n        this._methods = {};\n        this._events = {};\n        let result = [];\n        const functionsAbi = abis.filter(abi => abi.type !== 'error');\n        const errorsAbi = abis.filter(abi => isAbiErrorFragment(abi));\n        for (const a of functionsAbi) {\n            const abi = Object.assign(Object.assign({}, a), { signature: '' });\n            if (isAbiFunctionFragment(abi)) {\n                const methodName = jsonInterfaceMethodToString(abi);\n                const methodSignature = encodeFunctionSignature(methodName);\n                abi.methodNameWithInputs = methodName;\n                abi.signature = methodSignature;\n                // make constant and payable backwards compatible\n                abi.constant =\n                    abi.stateMutability === 'view' ||\n                        abi.stateMutability === 'pure' ||\n                        abi.constant;\n                abi.payable = abi.stateMutability === 'payable' || abi.payable;\n                this._overloadedMethodAbis.set(abi.name, [\n                    ...((_a = this._overloadedMethodAbis.get(abi.name)) !== null && _a !== void 0 ? _a : []),\n                    abi,\n                ]);\n                const abiFragment = (_b = this._overloadedMethodAbis.get(abi.name)) !== null && _b !== void 0 ? _b : [];\n                const contractMethod = this._createContractMethod(abiFragment, errorsAbi);\n                const exactContractMethod = this._createContractMethod(abiFragment, errorsAbi, true);\n                this._functions[methodName] = {\n                    signature: methodSignature,\n                    method: exactContractMethod,\n                };\n                // We don't know a particular type of the Abi method so can't type check\n                this._methods[abi.name] =\n                    contractMethod;\n                // We don't know a particular type of the Abi method so can't type check\n                this._methods[methodName] =\n                    exactContractMethod;\n                // We don't know a particular type of the Abi method so can't type check\n                this._methods[methodSignature] =\n                    exactContractMethod;\n            }\n            else if (isAbiEventFragment(abi)) {\n                const eventName = jsonInterfaceMethodToString(abi);\n                const eventSignature = encodeEventSignature(eventName);\n                const event = this._createContractEvent(abi, returnFormat);\n                abi.signature = eventSignature;\n                if (!(eventName in this._events) || abi.name === 'bound') {\n                    // It's a private type and we don't want to expose it and no need to check\n                    this._events[eventName] = event;\n                }\n                // It's a private type and we don't want to expose it and no need to check\n                this._events[abi.name] = event;\n                // It's a private type and we don't want to expose it and no need to check\n                this._events[eventSignature] = event;\n            }\n            result = [...result, abi];\n        }\n        this._events.allEvents = this._createContractEvent(ALL_EVENTS_ABI, returnFormat);\n        this._jsonInterface = [...result];\n        this._errorsInterface = errorsAbi;\n    }\n    // eslint-disable-next-line class-methods-use-this\n    _getAbiParams(abi, params) {\n        var _a;\n        try {\n            return validatorUtils.transformJsonDataToAbiFormat((_a = abi.inputs) !== null && _a !== void 0 ? _a : [], params);\n        }\n        catch (error) {\n            throw new Web3ContractError(`Invalid parameters for method ${abi.name}: ${error.message}`);\n        }\n    }\n    _createContractMethod(abiArr, errorsAbis, exact = false) {\n        const abi = abiArr[abiArr.length - 1];\n        return (...params) => {\n            var _a, _b, _c;\n            let abiParams;\n            const abis = (_b = (exact\n                ? (_a = this._overloadedMethodAbis\n                    .get(abi.name)) === null || _a === void 0 ? void 0 : _a.filter(_abi => _abi.signature === abi.signature)\n                : this._overloadedMethodAbis.get(abi.name))) !== null && _b !== void 0 ? _b : [];\n            let methodAbi = abis[0];\n            const internalErrorsAbis = errorsAbis;\n            const arrayOfAbis = abis.filter(_abi => { var _a; return ((_a = _abi.inputs) !== null && _a !== void 0 ? _a : []).length === params.length; });\n            if (abis.length === 1 || arrayOfAbis.length === 0) {\n                abiParams = this._getAbiParams(methodAbi, params);\n                validator.validate((_c = abi.inputs) !== null && _c !== void 0 ? _c : [], abiParams);\n            }\n            else {\n                const errors = [];\n                // all the methods that have is valid for the given inputs\n                const applicableMethodAbi = [];\n                for (const _abi of arrayOfAbis) {\n                    try {\n                        abiParams = this._getAbiParams(_abi, params);\n                        validator.validate(_abi.inputs, abiParams);\n                        applicableMethodAbi.push(_abi);\n                    }\n                    catch (e) {\n                        errors.push(e);\n                    }\n                }\n                if (applicableMethodAbi.length === 1) {\n                    [methodAbi] = applicableMethodAbi; // take the first item that is the only item in the array\n                }\n                else if (applicableMethodAbi.length > 1) {\n                    [methodAbi] = applicableMethodAbi; // take the first item in the array\n                    console.warn(`Multiple methods found that is compatible with the given inputs.\\n\\tFound ${applicableMethodAbi.length} compatible methods: ${JSON.stringify(applicableMethodAbi.map(m => `${m.methodNameWithInputs} (signature: ${m.signature})`))} \\n\\tThe first one will be used: ${methodAbi.methodNameWithInputs}`);\n                    // TODO: 5.x Should throw a new error with the list of methods found.\n                    // Related issue: https://github.com/web3/web3.js/issues/6923\n                    // This is in order to provide an error message when there is more than one method found that fits the inputs.\n                    // To do that, replace the pervious line of code with something like the following line:\n                    // throw new Web3ValidatorError({ message: 'Multiple methods found',  ... list of applicable methods }));\n                }\n                if (errors.length === arrayOfAbis.length) {\n                    throw new Web3ValidatorError(errors);\n                }\n            }\n            const methods = {\n                arguments: abiParams,\n                call: (options, block) => __awaiter(this, void 0, void 0, function* () {\n                    return this._contractMethodCall(methodAbi, abiParams, internalErrorsAbis, options, block);\n                }),\n                send: (options) => this._contractMethodSend(methodAbi, abiParams, internalErrorsAbis, options),\n                populateTransaction: (options, contractOptions) => {\n                    var _a, _b;\n                    let modifiedContractOptions = contractOptions !== null && contractOptions !== void 0 ? contractOptions : this.options;\n                    modifiedContractOptions = Object.assign(Object.assign({}, modifiedContractOptions), { input: undefined, from: (_b = (_a = modifiedContractOptions === null || modifiedContractOptions === void 0 ? void 0 : modifiedContractOptions.from) !== null && _a !== void 0 ? _a : this.defaultAccount) !== null && _b !== void 0 ? _b : undefined });\n                    const tx = getSendTxParams({\n                        abi,\n                        params,\n                        options: Object.assign(Object.assign({}, options), { dataInputFill: this.config.contractDataInputFill }),\n                        contractOptions: modifiedContractOptions,\n                    });\n                    // @ts-expect-error remove unnecessary field\n                    if (tx.dataInputFill) {\n                        // @ts-expect-error remove unnecessary field\n                        delete tx.dataInputFill;\n                    }\n                    return tx;\n                },\n                estimateGas: (options_1, ...args_1) => __awaiter(this, [options_1, ...args_1], void 0, function* (options, returnFormat = this\n                    .defaultReturnFormat) {\n                    return this.contractMethodEstimateGas({\n                        abi: methodAbi,\n                        params: abiParams,\n                        returnFormat,\n                        options,\n                    });\n                }),\n                encodeABI: () => encodeMethodABI(methodAbi, abiParams),\n                decodeData: (data) => decodeFunctionCall(methodAbi, data),\n                createAccessList: (options, block) => __awaiter(this, void 0, void 0, function* () {\n                    return this._contractMethodCreateAccessList(methodAbi, abiParams, internalErrorsAbis, options, block);\n                }),\n            };\n            if (methodAbi.stateMutability === 'payable') {\n                return methods;\n            }\n            return methods;\n        };\n    }\n    _contractMethodCall(abi, params, errorsAbi, options, block) {\n        return __awaiter(this, void 0, void 0, function* () {\n            var _a;\n            const tx = getEthTxCallParams({\n                abi,\n                params,\n                options: Object.assign(Object.assign({}, options), { dataInputFill: this.config.contractDataInputFill }),\n                contractOptions: Object.assign(Object.assign({}, this.options), { from: (_a = this.options.from) !== null && _a !== void 0 ? _a : this.config.defaultAccount }),\n            });\n            try {\n                const result = yield call(this, tx, block, this.defaultReturnFormat);\n                return decodeFunctionReturn(abi, result);\n            }\n            catch (error) {\n                if (error instanceof ContractExecutionError) {\n                    // this will parse the error data by trying to decode the ABI error inputs according to EIP-838\n                    decodeContractErrorData(errorsAbi, error.cause);\n                }\n                throw error;\n            }\n        });\n    }\n    _contractMethodCreateAccessList(abi, params, errorsAbi, options, block) {\n        return __awaiter(this, void 0, void 0, function* () {\n            var _a;\n            const tx = getCreateAccessListParams({\n                abi,\n                params,\n                options: Object.assign(Object.assign({}, options), { dataInputFill: this.config.contractDataInputFill }),\n                contractOptions: Object.assign(Object.assign({}, this.options), { from: (_a = this.options.from) !== null && _a !== void 0 ? _a : this.config.defaultAccount }),\n            });\n            try {\n                return createAccessList(this, tx, block, this.defaultReturnFormat);\n            }\n            catch (error) {\n                if (error instanceof ContractExecutionError) {\n                    // this will parse the error data by trying to decode the ABI error inputs according to EIP-838\n                    decodeContractErrorData(errorsAbi, error.cause);\n                }\n                throw error;\n            }\n        });\n    }\n    _contractMethodSend(abi, params, errorsAbi, options, contractOptions) {\n        var _a, _b;\n        let modifiedContractOptions = contractOptions !== null && contractOptions !== void 0 ? contractOptions : this.options;\n        modifiedContractOptions = Object.assign(Object.assign({}, modifiedContractOptions), { input: undefined, from: (_b = (_a = modifiedContractOptions.from) !== null && _a !== void 0 ? _a : this.defaultAccount) !== null && _b !== void 0 ? _b : undefined });\n        const tx = getSendTxParams({\n            abi,\n            params,\n            options: Object.assign(Object.assign({}, options), { dataInputFill: this.config.contractDataInputFill }),\n            contractOptions: modifiedContractOptions,\n        });\n        const transactionToSend = isNullish(this.transactionMiddleware)\n            ? sendTransaction(this, tx, this.defaultReturnFormat, {\n                // TODO Should make this configurable by the user\n                checkRevertBeforeSending: false,\n                contractAbi: this._jsonInterface, // explicitly not passing middleware so if some one is using old eth package it will not break\n            })\n            : sendTransaction(this, tx, this.defaultReturnFormat, {\n                // TODO Should make this configurable by the user\n                checkRevertBeforeSending: false,\n                contractAbi: this._jsonInterface,\n            }, this.transactionMiddleware);\n        // eslint-disable-next-line no-void\n        void transactionToSend.on('error', (error) => {\n            if (error instanceof ContractExecutionError) {\n                // this will parse the error data by trying to decode the ABI error inputs according to EIP-838\n                decodeContractErrorData(errorsAbi, error.cause);\n            }\n        });\n        return transactionToSend;\n    }\n    contractMethodEstimateGas(_a) {\n        return __awaiter(this, arguments, void 0, function* ({ abi, params, returnFormat, options, contractOptions, }) {\n            const tx = getEstimateGasParams({\n                abi,\n                params,\n                options: Object.assign(Object.assign({}, options), { dataInputFill: this.config.contractDataInputFill }),\n                contractOptions: contractOptions !== null && contractOptions !== void 0 ? contractOptions : this.options,\n            });\n            return estimateGas(this, tx, BlockTags.LATEST, returnFormat !== null && returnFormat !== void 0 ? returnFormat : this.defaultReturnFormat);\n        });\n    }\n    // eslint-disable-next-line class-methods-use-this\n    _createContractEvent(abi, returnFormat = this.defaultReturnFormat) {\n        return (...params) => {\n            var _a;\n            const { topics, fromBlock } = encodeEventABI(this.options, abi, params[0]);\n            const sub = new ContractLogsSubscription({\n                address: this.options.address,\n                topics,\n                abi,\n                jsonInterface: this._jsonInterface,\n            }, {\n                subscriptionManager: this.subscriptionManager,\n                returnFormat,\n            });\n            if (!isNullish(fromBlock)) {\n                // emit past events when fromBlock is defined\n                this.getPastEvents(abi.name, { fromBlock, topics }, returnFormat)\n                    .then(logs => {\n                    if (logs) {\n                        logs.forEach(log => sub.emit('data', log));\n                    }\n                })\n                    .catch((error) => {\n                    sub.emit('error', new SubscriptionError('Failed to get past events.', error));\n                });\n            }\n            (_a = this.subscriptionManager) === null || _a === void 0 ? void 0 : _a.addSubscription(sub).catch((error) => {\n                sub.emit('error', new SubscriptionError('Failed to subscribe.', error));\n            });\n            return sub;\n        };\n    }\n    subscribeToContextEvents(context) {\n        // eslint-disable-next-line @typescript-eslint/no-this-alias\n        const contractThis = this;\n        this.context = context;\n        if (contractThis.syncWithContext) {\n            context.on(Web3ConfigEvent.CONFIG_CHANGE, event => {\n                contractThis.setConfig({ [event.name]: event.newValue });\n            });\n        }\n    }\n}\n//# sourceMappingURL=contract.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\n//\n/**\n * An object holding the interface Ids of the ENS resolver contracts. Please see [how to write a resolver](https://docs.ens.domains/contract-developer-guide/writing-a-resolver).\n */\nexport const interfaceIds = {\n    addr: '0x3b3b57de',\n    name: '0x691f3431',\n    abi: '0x2203ab56',\n    pubkey: '0xc8690233',\n    text: '0x59d1d43c',\n    contenthash: '0xbc1c58d1',\n};\n/**\n * An object holding the functions that are supported by the ENS resolver contracts/interfaces.\n */\nexport const methodsInInterface = {\n    setAddr: 'addr',\n    addr: 'addr',\n    setPubkey: 'pubkey',\n    pubkey: 'pubkey',\n    setContenthash: 'contenthash',\n    contenthash: 'contenthash',\n    text: 'text',\n    name: 'name',\n};\n/**\n * An object holding the addressed of the ENS registries on the different networks (mainnet, goerli).\n */\nexport const registryAddresses = {\n    main: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e',\n    goerli: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e',\n};\nexport const networkIds = {\n    '0x1': 'main',\n    '0x5': 'goerli',\n};\n//# sourceMappingURL=config.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\n// https://github.com/ensdomains/ens-contracts/blob/master/contracts/registry/ENSRegistry.sol\nexport const ENSRegistryAbi = [\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: 'bytes32',\n                name: 'node',\n                type: 'bytes32',\n            },\n            {\n                indexed: true,\n                internalType: 'bytes32',\n                name: 'label',\n                type: 'bytes32',\n            },\n            {\n                indexed: false,\n                internalType: 'address',\n                name: 'owner',\n                type: 'address',\n            },\n        ],\n        name: 'NewOwner',\n        type: 'event',\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: 'bytes32',\n                name: 'node',\n                type: 'bytes32',\n            },\n            {\n                indexed: false,\n                internalType: 'address',\n                name: 'resolver',\n                type: 'address',\n            },\n        ],\n        name: 'NewResolver',\n        type: 'event',\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: 'bytes32',\n                name: 'node',\n                type: 'bytes32',\n            },\n            {\n                indexed: false,\n                internalType: 'address',\n                name: 'owner',\n                type: 'address',\n            },\n        ],\n        name: 'Transfer',\n        type: 'event',\n    },\n    {\n        inputs: [\n            {\n                internalType: 'address',\n                name: 'owner',\n                type: 'address',\n            },\n            {\n                internalType: 'address',\n                name: 'operator',\n                type: 'address',\n            },\n        ],\n        name: 'isApprovedForAll',\n        outputs: [\n            {\n                internalType: 'bool',\n                name: '',\n                type: 'bool',\n            },\n        ],\n        stateMutability: 'view',\n        type: 'function',\n    },\n    {\n        inputs: [\n            {\n                internalType: 'bytes32',\n                name: 'node',\n                type: 'bytes32',\n            },\n        ],\n        name: 'owner',\n        outputs: [\n            {\n                internalType: 'address',\n                name: '',\n                type: 'address',\n            },\n        ],\n        stateMutability: 'view',\n        type: 'function',\n    },\n    {\n        inputs: [\n            {\n                internalType: 'bytes32',\n                name: 'node',\n                type: 'bytes32',\n            },\n        ],\n        name: 'recordExists',\n        outputs: [\n            {\n                internalType: 'bool',\n                name: '',\n                type: 'bool',\n            },\n        ],\n        stateMutability: 'view',\n        type: 'function',\n    },\n    {\n        inputs: [\n            {\n                internalType: 'bytes32',\n                name: 'node',\n                type: 'bytes32',\n            },\n        ],\n        name: 'resolver',\n        outputs: [\n            {\n                internalType: 'address',\n                name: '',\n                type: 'address',\n            },\n        ],\n        stateMutability: 'view',\n        type: 'function',\n    },\n    {\n        inputs: [\n            {\n                internalType: 'bytes32',\n                name: 'node',\n                type: 'bytes32',\n            },\n        ],\n        name: 'ttl',\n        outputs: [\n            {\n                internalType: 'uint64',\n                name: '',\n                type: 'uint64',\n            },\n        ],\n        stateMutability: 'view',\n        type: 'function',\n    },\n];\n//# sourceMappingURL=ENSRegistry.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\n// https://github.com/ensdomains/ens-contracts/blob/master/contracts/resolvers/PublicResolver.sol\nexport const PublicResolverAbi = [\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: 'bytes32',\n                name: 'node',\n                type: 'bytes32',\n            },\n            {\n                indexed: false,\n                internalType: 'address',\n                name: 'a',\n                type: 'address',\n            },\n        ],\n        name: 'AddrChanged',\n        type: 'event',\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: 'bytes32',\n                name: 'node',\n                type: 'bytes32',\n            },\n            {\n                indexed: false,\n                internalType: 'uint256',\n                name: 'coinType',\n                type: 'uint256',\n            },\n            {\n                indexed: false,\n                internalType: 'bytes',\n                name: 'newAddress',\n                type: 'bytes',\n            },\n        ],\n        name: 'AddressChanged',\n        type: 'event',\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: 'address',\n                name: 'owner',\n                type: 'address',\n            },\n            {\n                indexed: true,\n                internalType: 'address',\n                name: 'operator',\n                type: 'address',\n            },\n            {\n                indexed: false,\n                internalType: 'bool',\n                name: 'approved',\n                type: 'bool',\n            },\n        ],\n        name: 'ApprovalForAll',\n        type: 'event',\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: 'bytes32',\n                name: 'node',\n                type: 'bytes32',\n            },\n            {\n                indexed: false,\n                internalType: 'bytes',\n                name: 'hash',\n                type: 'bytes',\n            },\n        ],\n        name: 'ContenthashChanged',\n        type: 'event',\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: 'bytes32',\n                name: 'node',\n                type: 'bytes32',\n            },\n            {\n                indexed: false,\n                internalType: 'bytes',\n                name: 'name',\n                type: 'bytes',\n            },\n            {\n                indexed: false,\n                internalType: 'uint16',\n                name: 'resource',\n                type: 'uint16',\n            },\n            {\n                indexed: false,\n                internalType: 'bytes',\n                name: 'record',\n                type: 'bytes',\n            },\n        ],\n        name: 'DNSRecordChanged',\n        type: 'event',\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: 'bytes32',\n                name: 'node',\n                type: 'bytes32',\n            },\n            {\n                indexed: false,\n                internalType: 'bytes',\n                name: 'name',\n                type: 'bytes',\n            },\n            {\n                indexed: false,\n                internalType: 'uint16',\n                name: 'resource',\n                type: 'uint16',\n            },\n        ],\n        name: 'DNSRecordDeleted',\n        type: 'event',\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: 'bytes32',\n                name: 'node',\n                type: 'bytes32',\n            },\n        ],\n        name: 'DNSZoneCleared',\n        type: 'event',\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: 'bytes32',\n                name: 'node',\n                type: 'bytes32',\n            },\n            {\n                indexed: false,\n                internalType: 'bytes',\n                name: 'lastzonehash',\n                type: 'bytes',\n            },\n            {\n                indexed: false,\n                internalType: 'bytes',\n                name: 'zonehash',\n                type: 'bytes',\n            },\n        ],\n        name: 'DNSZonehashChanged',\n        type: 'event',\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: 'bytes32',\n                name: 'node',\n                type: 'bytes32',\n            },\n            {\n                indexed: true,\n                internalType: 'bytes4',\n                name: 'interfaceID',\n                type: 'bytes4',\n            },\n            {\n                indexed: false,\n                internalType: 'address',\n                name: 'implementer',\n                type: 'address',\n            },\n        ],\n        name: 'InterfaceChanged',\n        type: 'event',\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: 'bytes32',\n                name: 'node',\n                type: 'bytes32',\n            },\n            {\n                indexed: false,\n                internalType: 'string',\n                name: 'name',\n                type: 'string',\n            },\n        ],\n        name: 'NameChanged',\n        type: 'event',\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: 'bytes32',\n                name: 'node',\n                type: 'bytes32',\n            },\n            {\n                indexed: false,\n                internalType: 'bytes32',\n                name: 'x',\n                type: 'bytes32',\n            },\n            {\n                indexed: false,\n                internalType: 'bytes32',\n                name: 'y',\n                type: 'bytes32',\n            },\n        ],\n        name: 'PubkeyChanged',\n        type: 'event',\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: 'bytes32',\n                name: 'node',\n                type: 'bytes32',\n            },\n            {\n                indexed: true,\n                internalType: 'string',\n                name: 'indexedKey',\n                type: 'string',\n            },\n            {\n                indexed: false,\n                internalType: 'string',\n                name: 'key',\n                type: 'string',\n            },\n        ],\n        name: 'TextChanged',\n        type: 'event',\n    },\n    {\n        inputs: [\n            {\n                internalType: 'bytes32',\n                name: 'node',\n                type: 'bytes32',\n            },\n            {\n                internalType: 'uint256',\n                name: 'contentTypes',\n                type: 'uint256',\n            },\n        ],\n        name: 'ABI',\n        outputs: [\n            {\n                internalType: 'uint256',\n                name: '',\n                type: 'uint256',\n            },\n            {\n                internalType: 'bytes',\n                name: '',\n                type: 'bytes',\n            },\n        ],\n        stateMutability: 'view',\n        type: 'function',\n    },\n    {\n        inputs: [\n            {\n                internalType: 'bytes32',\n                name: 'node',\n                type: 'bytes32',\n            },\n        ],\n        name: 'addr',\n        outputs: [\n            {\n                internalType: 'address payable',\n                name: '',\n                type: 'address',\n            },\n        ],\n        stateMutability: 'view',\n        type: 'function',\n    },\n    {\n        inputs: [\n            {\n                internalType: 'bytes32',\n                name: 'node',\n                type: 'bytes32',\n            },\n            {\n                internalType: 'uint256',\n                name: 'coinType',\n                type: 'uint256',\n            },\n        ],\n        name: 'addr',\n        outputs: [\n            {\n                internalType: 'bytes',\n                name: '',\n                type: 'bytes',\n            },\n        ],\n        stateMutability: 'view',\n        type: 'function',\n    },\n    {\n        inputs: [\n            {\n                internalType: 'bytes32',\n                name: 'node',\n                type: 'bytes32',\n            },\n        ],\n        name: 'contenthash',\n        outputs: [\n            {\n                internalType: 'bytes',\n                name: '',\n                type: 'bytes',\n            },\n        ],\n        stateMutability: 'view',\n        type: 'function',\n    },\n    {\n        inputs: [\n            {\n                internalType: 'bytes32',\n                name: 'node',\n                type: 'bytes32',\n            },\n            {\n                internalType: 'bytes32',\n                name: 'name',\n                type: 'bytes32',\n            },\n            {\n                internalType: 'uint16',\n                name: 'resource',\n                type: 'uint16',\n            },\n        ],\n        name: 'dnsRecord',\n        outputs: [\n            {\n                internalType: 'bytes',\n                name: '',\n                type: 'bytes',\n            },\n        ],\n        stateMutability: 'view',\n        type: 'function',\n    },\n    {\n        inputs: [\n            {\n                internalType: 'bytes32',\n                name: 'node',\n                type: 'bytes32',\n            },\n            {\n                internalType: 'bytes32',\n                name: 'name',\n                type: 'bytes32',\n            },\n        ],\n        name: 'hasDNSRecords',\n        outputs: [\n            {\n                internalType: 'bool',\n                name: '',\n                type: 'bool',\n            },\n        ],\n        stateMutability: 'view',\n        type: 'function',\n    },\n    {\n        inputs: [\n            {\n                internalType: 'bytes32',\n                name: 'node',\n                type: 'bytes32',\n            },\n            {\n                internalType: 'bytes4',\n                name: 'interfaceID',\n                type: 'bytes4',\n            },\n        ],\n        name: 'interfaceImplementer',\n        outputs: [\n            {\n                internalType: 'address',\n                name: '',\n                type: 'address',\n            },\n        ],\n        stateMutability: 'view',\n        type: 'function',\n    },\n    {\n        inputs: [\n            {\n                internalType: 'address',\n                name: 'account',\n                type: 'address',\n            },\n            {\n                internalType: 'address',\n                name: 'operator',\n                type: 'address',\n            },\n        ],\n        name: 'isApprovedForAll',\n        outputs: [\n            {\n                internalType: 'bool',\n                name: '',\n                type: 'bool',\n            },\n        ],\n        stateMutability: 'view',\n        type: 'function',\n    },\n    {\n        inputs: [\n            {\n                internalType: 'bytes32',\n                name: 'node',\n                type: 'bytes32',\n            },\n        ],\n        name: 'name',\n        outputs: [\n            {\n                internalType: 'string',\n                name: '',\n                type: 'string',\n            },\n        ],\n        stateMutability: 'view',\n        type: 'function',\n    },\n    {\n        inputs: [\n            {\n                internalType: 'bytes32',\n                name: 'node',\n                type: 'bytes32',\n            },\n        ],\n        name: 'pubkey',\n        outputs: [\n            {\n                internalType: 'bytes32',\n                name: 'x',\n                type: 'bytes32',\n            },\n            {\n                internalType: 'bytes32',\n                name: 'y',\n                type: 'bytes32',\n            },\n        ],\n        stateMutability: 'view',\n        type: 'function',\n    },\n    {\n        inputs: [\n            {\n                internalType: 'bytes4',\n                name: 'interfaceID',\n                type: 'bytes4',\n            },\n        ],\n        name: 'supportsInterface',\n        outputs: [\n            {\n                internalType: 'bool',\n                name: '',\n                type: 'bool',\n            },\n        ],\n        stateMutability: 'view',\n        type: 'function',\n    },\n    {\n        inputs: [\n            {\n                internalType: 'bytes32',\n                name: 'node',\n                type: 'bytes32',\n            },\n            {\n                internalType: 'string',\n                name: 'key',\n                type: 'string',\n            },\n        ],\n        name: 'text',\n        outputs: [\n            {\n                internalType: 'string',\n                name: '',\n                type: 'string',\n            },\n        ],\n        stateMutability: 'view',\n        type: 'function',\n    },\n    {\n        inputs: [\n            {\n                internalType: 'bytes32',\n                name: 'node',\n                type: 'bytes32',\n            },\n        ],\n        name: 'zonehash',\n        outputs: [\n            {\n                internalType: 'bytes',\n                name: '',\n                type: 'bytes',\n            },\n        ],\n        stateMutability: 'view',\n        type: 'function',\n    },\n    {\n        inputs: [\n            {\n                internalType: 'bytes32',\n                name: 'node',\n                type: 'bytes32',\n            },\n            {\n                internalType: 'address',\n                name: 'a',\n                type: 'address',\n            },\n        ],\n        name: 'setAddr',\n        outputs: [],\n        stateMutability: 'nonpayable',\n        type: 'function',\n    },\n];\n//# sourceMappingURL=PublicResolver.js.map","// created 2024-09-13T06:42:45.675Z\n// compressed base64-encoded blob for include-ens data\n// source: https://github.com/adraffy/ens-normalize.js/blob/main/src/make.js\n// see: https://github.com/adraffy/ens-normalize.js#security\n// SHA-256: 0ca3917bee1eee342d64c631cb1dbaac37b167d848887d59f6d68328dc99ac09\nvar COMPRESSED$1 = 'AEkU4AngDVgB0QKRAQYBOwDqATEAnwDbAIUApABsAOAAbwCRAEYAiQBPAHYAPgA+ACsANwAlAGMAHwAvACsAJQAWAC8AGwAiACIALwAUACsAEQAiAAsAGwARABcAGAA6ACkALAAsADUAFgAsABEAHQAhAA8AGwAdABUAFgAZAA0ADQAXABAAGQAUABIEqgYJAR4UFjfDBdMAsQCuPwFnAKUBA10jAK5/Ly8vLwE/pwUJ6/0HPwbkMQVXBVgAPSs5APa2EQbIwQuUCkEDyJ4zAsUKLwKOoQKG2D+Ob4kCxcsCg/IBH98JAPKtAUECLY0K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ySZFeV3t2Rqqs5JMzMYzGRgq4o+UaKRgBf9GHi/9X9HXA3wxkCsd/UhnHSh2zUVDiraio/6nP4y3XJqs8ABfALAtCYU7DHPMPRjgcM6Ad/HiSXDAbOdSMkvGZPAkHs8wuQTy6X2Ov/JFvcPuKfV3/r9Q28';\nconst FENCED = new Map([[8217,\"apostrophe\"],[8260,\"fraction slash\"],[12539,\"middle dot\"]]);\nconst NSM_MAX = 4;\n\nfunction decode_arithmetic(bytes) {\r\n\tlet pos = 0;\r\n\tfunction u16() { return (bytes[pos++] << 8) | bytes[pos++]; }\r\n\t\r\n\t// decode the frequency table\r\n\tlet symbol_count = u16();\r\n\tlet total = 1;\r\n\tlet acc = [0, 1]; // first symbol has frequency 1\r\n\tfor (let i = 1; i < symbol_count; i++) {\r\n\t\tacc.push(total += u16());\r\n\t}\r\n\r\n\t// skip the sized-payload that the last 3 symbols index into\r\n\tlet skip = u16();\r\n\tlet pos_payload = pos;\r\n\tpos += skip;\r\n\r\n\tlet read_width = 0;\r\n\tlet read_buffer = 0; \r\n\tfunction read_bit() {\r\n\t\tif (read_width == 0) {\r\n\t\t\t// this will read beyond end of buffer\r\n\t\t\t// but (undefined|0) => zero pad\r\n\t\t\tread_buffer = (read_buffer << 8) | bytes[pos++];\r\n\t\t\tread_width = 8;\r\n\t\t}\r\n\t\treturn (read_buffer >> --read_width) & 1;\r\n\t}\r\n\r\n\tconst N = 31;\r\n\tconst FULL = 2**N;\r\n\tconst HALF = FULL >>> 1;\r\n\tconst QRTR = HALF >> 1;\r\n\tconst MASK = FULL - 1;\r\n\r\n\t// fill register\r\n\tlet register = 0;\r\n\tfor (let i = 0; i < N; i++) register = (register << 1) | read_bit();\r\n\r\n\tlet symbols = [];\r\n\tlet low = 0;\r\n\tlet range = FULL; // treat like a float\r\n\twhile (true) {\r\n\t\tlet value = Math.floor((((register - low + 1) * total) - 1) / range);\r\n\t\tlet start = 0;\r\n\t\tlet end = symbol_count;\r\n\t\twhile (end - start > 1) { // binary search\r\n\t\t\tlet mid = (start + end) >>> 1;\r\n\t\t\tif (value < acc[mid]) {\r\n\t\t\t\tend = mid;\r\n\t\t\t} else {\r\n\t\t\t\tstart = mid;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (start == 0) break; // first symbol is end mark\r\n\t\tsymbols.push(start);\r\n\t\tlet a = low + Math.floor(range * acc[start]   / total);\r\n\t\tlet b = low + Math.floor(range * acc[start+1] / total) - 1;\r\n\t\twhile (((a ^ b) & HALF) == 0) {\r\n\t\t\tregister = (register << 1) & MASK | read_bit();\r\n\t\t\ta = (a << 1) & MASK;\r\n\t\t\tb = (b << 1) & MASK | 1;\r\n\t\t}\r\n\t\twhile (a & ~b & QRTR) {\r\n\t\t\tregister = (register & HALF) | ((register << 1) & (MASK >>> 1)) | read_bit();\r\n\t\t\ta = (a << 1) ^ HALF;\r\n\t\t\tb = ((b ^ HALF) << 1) | HALF | 1;\r\n\t\t}\r\n\t\tlow = a;\r\n\t\trange = 1 + b - a;\r\n\t}\r\n\tlet offset = symbol_count - 4;\r\n\treturn symbols.map(x => { // index into payload\r\n\t\tswitch (x - offset) {\r\n\t\t\tcase 3: return offset + 0x10100 + ((bytes[pos_payload++] << 16) | (bytes[pos_payload++] << 8) | bytes[pos_payload++]);\r\n\t\t\tcase 2: return offset + 0x100 + ((bytes[pos_payload++] << 8) | bytes[pos_payload++]);\r\n\t\t\tcase 1: return offset + bytes[pos_payload++];\r\n\t\t\tdefault: return x - 1;\r\n\t\t}\r\n\t});\r\n}\t\r\n\r\n// returns an iterator which returns the next symbol\r\nfunction read_payload(v) {\r\n\tlet pos = 0;\r\n\treturn () => v[pos++];\r\n}\r\nfunction read_compressed_payload(s) {\r\n\treturn read_payload(decode_arithmetic(unsafe_atob(s)));\r\n}\r\n\r\n// unsafe in the sense:\r\n// expected well-formed Base64 w/o padding \r\n// 20220922: added for https://github.com/adraffy/ens-normalize.js/issues/4\r\nfunction unsafe_atob(s) {\r\n\tlet lookup = [];\r\n\t[...'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'].forEach((c, i) => lookup[c.charCodeAt(0)] = i);\r\n\tlet n = s.length;\r\n\tlet ret = new Uint8Array((6 * n) >> 3);\r\n\tfor (let i = 0, pos = 0, width = 0, carry = 0; i < n; i++) {\r\n\t\tcarry = (carry << 6) | lookup[s.charCodeAt(i)];\r\n\t\twidth += 6;\r\n\t\tif (width >= 8) {\r\n\t\t\tret[pos++] = (carry >> (width -= 8));\r\n\t\t}\r\n\t}\r\n\treturn ret;\r\n}\r\n\r\n// eg. [0,1,2,3...] => [0,-1,1,-2,...]\r\nfunction signed(i) { \r\n\treturn (i & 1) ? (~i >> 1) : (i >> 1);\r\n}\r\n\r\nfunction read_deltas(n, next) {\r\n\tlet v = Array(n);\r\n\tfor (let i = 0, x = 0; i < n; i++) v[i] = x += signed(next());\r\n\treturn v;\r\n}\r\n\r\n// [123][5] => [0 3] [1 1] [0 0]\r\nfunction read_sorted(next, prev = 0) {\r\n\tlet ret = [];\r\n\twhile (true) {\r\n\t\tlet x = next();\r\n\t\tlet n = next();\r\n\t\tif (!n) break;\r\n\t\tprev += x;\r\n\t\tfor (let i = 0; i < n; i++) {\r\n\t\t\tret.push(prev + i);\r\n\t\t}\r\n\t\tprev += n + 1;\r\n\t}\r\n\treturn ret;\r\n}\r\n\r\nfunction read_sorted_arrays(next) {\r\n\treturn read_array_while(() => { \r\n\t\tlet v = read_sorted(next);\r\n\t\tif (v.length) return v;\r\n\t});\r\n}\r\n\r\n// returns map of x => ys\r\nfunction read_mapped(next) {\r\n\tlet ret = [];\r\n\twhile (true) {\r\n\t\tlet w = next();\r\n\t\tif (w == 0) break;\r\n\t\tret.push(read_linear_table(w, next));\r\n\t}\r\n\twhile (true) {\r\n\t\tlet w = next() - 1;\r\n\t\tif (w < 0) break;\r\n\t\tret.push(read_replacement_table(w, next));\r\n\t}\r\n\treturn ret.flat();\r\n}\r\n\r\n// read until next is falsy\r\n// return array of read values\r\nfunction read_array_while(next) {\r\n\tlet v = [];\r\n\twhile (true) {\r\n\t\tlet x = next(v.length);\r\n\t\tif (!x) break;\r\n\t\tv.push(x);\r\n\t}\r\n\treturn v;\r\n}\r\n\r\n// read w columns of length n\r\n// return as n rows of length w\r\nfunction read_transposed(n, w, next) {\r\n\tlet m = Array(n).fill().map(() => []);\r\n\tfor (let i = 0; i < w; i++) {\r\n\t\tread_deltas(n, next).forEach((x, j) => m[j].push(x));\r\n\t}\r\n\treturn m;\r\n}\r\n \r\n// returns [[x, ys], [x+dx, ys+dy], [x+2*dx, ys+2*dy], ...]\r\n// where dx/dy = steps, n = run size, w = length of y\r\nfunction read_linear_table(w, next) {\r\n\tlet dx = 1 + next();\r\n\tlet dy = next();\r\n\tlet vN = read_array_while(next);\r\n\tlet m = read_transposed(vN.length, 1+w, next);\r\n\treturn m.flatMap((v, i) => {\r\n\t\tlet [x, ...ys] = v;\r\n\t\treturn Array(vN[i]).fill().map((_, j) => {\r\n\t\t\tlet j_dy = j * dy;\r\n\t\t\treturn [x + j * dx, ys.map(y => y + j_dy)];\r\n\t\t});\r\n\t});\r\n}\r\n\r\n// return [[x, ys...], ...]\r\n// where w = length of y\r\nfunction read_replacement_table(w, next) { \r\n\tlet n = 1 + next();\r\n\tlet m = read_transposed(n, 1+w, next);\r\n\treturn m.map(v => [v[0], v.slice(1)]);\r\n}\r\n\r\n\r\nfunction read_trie(next) {\r\n\tlet ret = [];\r\n\tlet sorted = read_sorted(next); \r\n\texpand(decode([]), []);\r\n\treturn ret; // not sorted\r\n\tfunction decode(Q) { // characters that lead into this node\r\n\t\tlet S = next(); // state: valid, save, check\r\n\t\tlet B = read_array_while(() => { // buckets leading to new nodes\r\n\t\t\tlet cps = read_sorted(next).map(i => sorted[i]);\r\n\t\t\tif (cps.length) return decode(cps);\r\n\t\t});\r\n\t\treturn {S, B, Q};\r\n\t}\r\n\tfunction expand({S, B}, cps, saved) {\r\n\t\tif (S & 4 && saved === cps[cps.length-1]) return;\r\n\t\tif (S & 2) saved = cps[cps.length-1];\r\n\t\tif (S & 1) ret.push(cps); \r\n\t\tfor (let br of B) {\r\n\t\t\tfor (let cp of br.Q) {\r\n\t\t\t\texpand(br, [...cps, cp], saved);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\n\nfunction hex_cp(cp) {\r\n\treturn cp.toString(16).toUpperCase().padStart(2, '0');\r\n}\r\n\r\nfunction quote_cp(cp) {\r\n\treturn `{${hex_cp(cp)}}`; // raffy convention: like \"\\u{X}\" w/o the \"\\u\"\r\n}\r\n\r\n/*\r\nexport function explode_cp(s) {\r\n\treturn [...s].map(c => c.codePointAt(0));\r\n}\r\n*/\r\nfunction explode_cp(s) { // this is about 2x faster\r\n\tlet cps = [];\r\n\tfor (let pos = 0, len = s.length; pos < len; ) {\r\n\t\tlet cp = s.codePointAt(pos);\r\n\t\tpos += cp < 0x10000 ? 1 : 2;\r\n\t\tcps.push(cp);\r\n\t}\r\n\treturn cps;\r\n}\r\n\r\nfunction str_from_cps(cps) {\r\n\tconst chunk = 4096;\r\n\tlet len = cps.length;\r\n\tif (len < chunk) return String.fromCodePoint(...cps);\r\n\tlet buf = [];\r\n\tfor (let i = 0; i < len; ) {\r\n\t\tbuf.push(String.fromCodePoint(...cps.slice(i, i += chunk)));\r\n\t}\r\n\treturn buf.join('');\r\n}\r\n\r\nfunction compare_arrays(a, b) {\r\n\tlet n = a.length;\r\n\tlet c = n - b.length;\r\n\tfor (let i = 0; c == 0 && i < n; i++) c = a[i] - b[i];\r\n\treturn c;\r\n}\r\n\r\nfunction array_replace(v, a, b) {\r\n\tlet prev = 0;\r\n\twhile (true) {\r\n\t\tlet next = v.indexOf(a, prev);\r\n\t\tif (next < 0) break;\r\n\t\tv[next] = b; \r\n\t\tprev = next + 1;\r\n\t}\r\n}\n\n// created 2024-09-13T06:42:45.675Z\n// compressed base64-encoded blob for include-nf data\n// source: https://github.com/adraffy/ens-normalize.js/blob/main/src/make.js\n// see: https://github.com/adraffy/ens-normalize.js#security\n// SHA-256: a79d5f9b1879a7b416aa659f4a3d788f80a8cf5f0ab955a456592c02f556a28c\nvar COMPRESSED = 'AEUDVgHLCGMATwDUADIAdAAhADQAFAAtABQAIQAPACcADQASAAoAGAAJABIACQARAAUACwAFAAwABQAQAAMABwAEAAoABQAJAAIACgABAAQAFAALAAIACwABAAIAAQAHAAMAAwAEAAsADAAMAAwACwANAA0AAwAKAAkABAAdAAYAZwDTAeYDMwCxCl8B8xhZAqfoC190UGcThgBurwf7PT09Pb09AjgJum8OjDllxHYUKXAPxzq6tABAxgK8ysUvWAgMPT09PT09PSs6LT2HcgWXWwFLoSMEEEl5RFVMKvO0XQ8ExDdJMnIgPi89uj00MsvBXxEPAGPCDwBnQKoEbwRwBHEEcgRzBHQEdQR2BHcEeAR6BHsEfAR+BIAEgfndBQoBYgULAWIFDAFiBNcE2ATZBRAFEQUvBdALFAsVDPcNBw13DYcOMA4xDjMB4BllHI0B2grbAMDpHLkQ7QHVAPRNQQFnGRUEg0yEB2uaJF8AJpIBpob5AERSMAKNoAXqaQLUBMCzEiC+AZ4EWRJJFbEu7QDQLARtEbgECxDwAb/RyAk1AV4nD2cEQQKTAzsAGpobWgAahAGPCrysdy0OAKwAfFIcBAQFUmoA/PtZADkBIadVj2UMUgx5Il4ANQC9vAITAdQZWxDzALN9AhsZVwIcGSkCBAgXOhG7AqMZ4M7+1M0UAPDNAWsC+mcJDe8AAQA99zkEXLICyQozAo6lAobcP5JvjQLFzwKD9gU/OD8FEQCtEQL6bW+nAKUEvzjDHsuRyUvOFHcacUz5AqIFRSE2kzsBEQCuaQL5DQTlcgO6twSpTiUgCwIFCAUXBHQEqQV6swAVxUlmTmsCwjqsP/wKJQmXb793UgZBEBsnpRD3DDMBtQE7De1L2ATxBjsEyR99GRkPzZWcCKUt3QztJuMuoYBaI/UqgwXtS/Q83QtNUWgPWQtlCeM6Y4FOAyEBDSKLCt0NOQhtEPMKyWsN5RFFBzkD1UmaAKUHAQsRHTUV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/Q04JeS1ReCCubL3J7sx86spkP4eNpp95UF+8K748icIs8vdILFklk9skQqi1So6cx3X906pvy1vz+KipTJ8fiVJxsV5MmT0XwA';\n\n// https://unicode.org/reports/tr15/\r\n// for reference implementation\r\n// see: /derive/nf.js\r\n\r\n\r\n// algorithmic hangul\r\n// https://www.unicode.org/versions/Unicode15.0.0/ch03.pdf (page 144)\r\nconst S0 = 0xAC00;\r\nconst L0 = 0x1100;\r\nconst V0 = 0x1161;\r\nconst T0 = 0x11A7;\r\nconst L_COUNT = 19;\r\nconst V_COUNT = 21;\r\nconst T_COUNT = 28;\r\nconst N_COUNT = V_COUNT * T_COUNT;\r\nconst S_COUNT = L_COUNT * N_COUNT;\r\nconst S1 = S0 + S_COUNT;\r\nconst L1 = L0 + L_COUNT;\r\nconst V1 = V0 + V_COUNT;\r\nconst T1 = T0 + T_COUNT;\r\n\r\nfunction unpack_cc(packed) {\r\n\treturn (packed >> 24) & 0xFF;\r\n}\r\nfunction unpack_cp(packed) {\r\n\treturn packed & 0xFFFFFF;\r\n}\r\n\r\nlet SHIFTED_RANK, EXCLUSIONS, DECOMP, RECOMP;\r\n\r\n// export function nf_deinit() {\r\n// \tif (!SHIFTED_RANK) return;\r\n// \tSHIFTED_RANK = EXCLUSIONS = DECOMP = RECOMP = undefined;\r\n// }\r\n\r\nfunction init$1() {\r\n\t//console.time('nf');\r\n\tlet r = read_compressed_payload(COMPRESSED);\r\n\tSHIFTED_RANK = new Map(read_sorted_arrays(r).flatMap((v, i) => v.map(x => [x, (i+1) << 24]))); // pre-shifted\r\n\tEXCLUSIONS = new Set(read_sorted(r));\r\n\tDECOMP = new Map();\r\n\tRECOMP = new Map();\r\n\tfor (let [cp, cps] of read_mapped(r)) {\r\n\t\tif (!EXCLUSIONS.has(cp) && cps.length == 2) {\r\n\t\t\tlet [a, b] = cps;\r\n\t\t\tlet bucket = RECOMP.get(a);\r\n\t\t\tif (!bucket) {\r\n\t\t\t\tbucket = new Map();\r\n\t\t\t\tRECOMP.set(a, bucket);\r\n\t\t\t}\r\n\t\t\tbucket.set(b, cp);\r\n\t\t}\r\n\t\tDECOMP.set(cp, cps.reverse()); // stored reversed\r\n\t}\r\n\t//console.timeEnd('nf');\r\n\t// 20230905: 11ms\r\n}\r\n\r\nfunction is_hangul(cp) {\r\n\treturn cp >= S0 && cp < S1;\r\n}\r\n\r\nfunction compose_pair(a, b) {\r\n\tif (a >= L0 && a < L1 && b >= V0 && b < V1) {\r\n\t\treturn S0 + (a - L0) * N_COUNT + (b - V0) * T_COUNT;\r\n\t} else if (is_hangul(a) && b > T0 && b < T1 && (a - S0) % T_COUNT == 0) {\r\n\t\treturn a + (b - T0);\r\n\t} else {\r\n\t\tlet recomp = RECOMP.get(a);\r\n\t\tif (recomp) {\r\n\t\t\trecomp = recomp.get(b);\r\n\t\t\tif (recomp) {\r\n\t\t\t\treturn recomp;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn -1;\r\n\t}\r\n}\r\n\r\nfunction decomposed(cps) {\r\n\tif (!SHIFTED_RANK) init$1();\r\n\tlet ret = [];\r\n\tlet buf = [];\r\n\tlet check_order = false;\r\n\tfunction add(cp) {\r\n\t\tlet cc = SHIFTED_RANK.get(cp);\r\n\t\tif (cc) {\r\n\t\t\tcheck_order = true;\r\n\t\t\tcp |= cc;\r\n\t\t}\r\n\t\tret.push(cp);\r\n\t}\r\n\tfor (let cp of cps) {\r\n\t\twhile (true) {\r\n\t\t\tif (cp < 0x80) {\r\n\t\t\t\tret.push(cp);\r\n\t\t\t} else if (is_hangul(cp)) {\r\n\t\t\t\tlet s_index = cp - S0;\r\n\t\t\t\tlet l_index = s_index / N_COUNT | 0;\r\n\t\t\t\tlet v_index = (s_index % N_COUNT) / T_COUNT | 0;\r\n\t\t\t\tlet t_index = s_index % T_COUNT;\r\n\t\t\t\tadd(L0 + l_index);\r\n\t\t\t\tadd(V0 + v_index);\r\n\t\t\t\tif (t_index > 0) add(T0 + t_index);\r\n\t\t\t} else {\r\n\t\t\t\tlet mapped = DECOMP.get(cp);\r\n\t\t\t\tif (mapped) {\r\n\t\t\t\t\tbuf.push(...mapped);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tadd(cp);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (!buf.length) break;\r\n\t\t\tcp = buf.pop();\r\n\t\t}\r\n\t}\r\n\tif (check_order && ret.length > 1) {\r\n\t\tlet prev_cc = unpack_cc(ret[0]);\r\n\t\tfor (let i = 1; i < ret.length; i++) {\r\n\t\t\tlet cc = unpack_cc(ret[i]);\r\n\t\t\tif (cc == 0 || prev_cc <= cc) {\r\n\t\t\t\tprev_cc = cc;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tlet j = i-1;\r\n\t\t\twhile (true) {\r\n\t\t\t\tlet tmp = ret[j+1];\r\n\t\t\t\tret[j+1] = ret[j];\r\n\t\t\t\tret[j] = tmp;\r\n\t\t\t\tif (!j) break;\r\n\t\t\t\tprev_cc = unpack_cc(ret[--j]);\r\n\t\t\t\tif (prev_cc <= cc) break;\r\n\t\t\t}\r\n\t\t\tprev_cc = unpack_cc(ret[i]);\r\n\t\t}\r\n\t}\r\n\treturn ret;\r\n}\r\n\r\nfunction composed_from_decomposed(v) {\r\n\tlet ret = [];\r\n\tlet stack = [];\r\n\tlet prev_cp = -1;\r\n\tlet prev_cc = 0;\r\n\tfor (let packed of v) {\r\n\t\tlet cc = unpack_cc(packed);\r\n\t\tlet cp = unpack_cp(packed);\r\n\t\tif (prev_cp == -1) {\r\n\t\t\tif (cc == 0) {\r\n\t\t\t\tprev_cp = cp;\r\n\t\t\t} else {\r\n\t\t\t\tret.push(cp);\r\n\t\t\t}\r\n\t\t} else if (prev_cc > 0 && prev_cc >= cc) {\r\n\t\t\tif (cc == 0) {\r\n\t\t\t\tret.push(prev_cp, ...stack);\r\n\t\t\t\tstack.length = 0;\r\n\t\t\t\tprev_cp = cp;\r\n\t\t\t} else {\r\n\t\t\t\tstack.push(cp);\r\n\t\t\t}\r\n\t\t\tprev_cc = cc;\r\n\t\t} else {\r\n\t\t\tlet composed = compose_pair(prev_cp, cp);\r\n\t\t\tif (composed >= 0) {\r\n\t\t\t\tprev_cp = composed;\r\n\t\t\t} else if (prev_cc == 0 && cc == 0) {\r\n\t\t\t\tret.push(prev_cp);\r\n\t\t\t\tprev_cp = cp;\r\n\t\t\t} else {\r\n\t\t\t\tstack.push(cp);\r\n\t\t\t\tprev_cc = cc;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (prev_cp >= 0) {\r\n\t\tret.push(prev_cp, ...stack);\t\r\n\t}\r\n\treturn ret;\r\n}\r\n\r\n// note: cps can be iterable\r\nfunction nfd(cps) {\r\n\treturn decomposed(cps).map(unpack_cp);\r\n}\r\nfunction nfc(cps) {\r\n\treturn composed_from_decomposed(decomposed(cps));\r\n}\n\nconst HYPHEN = 0x2D;\r\nconst STOP = 0x2E;\r\nconst STOP_CH = '.';\r\nconst FE0F = 0xFE0F;\r\nconst UNIQUE_PH = 1;\r\n\r\n// 20230913: replace [...v] with Array_from(v) to avoid large spreads\r\nconst Array_from = x => Array.from(x); // Array.from.bind(Array);\r\n\r\nfunction group_has_cp(g, cp) {\r\n\t// 20230913: keep primary and secondary distinct instead of creating valid union\r\n\treturn g.P.has(cp) || g.Q.has(cp);\r\n}\r\n\r\nclass Emoji extends Array {\r\n\tget is_emoji() { return true; } // free tagging system\r\n}\r\n\r\nlet MAPPED, IGNORED, CM, NSM, ESCAPE, NFC_CHECK, GROUPS, WHOLE_VALID, WHOLE_MAP, VALID, EMOJI_LIST, EMOJI_ROOT;\r\n\r\n// export function ens_deinit() {\r\n// \tnf_deinit();\r\n// \tif (!MAPPED) return;\r\n// \tMAPPED = IGNORED = CM = NSM = ESCAPE = NFC_CHECK = GROUPS = WHOLE_VALID = WHOLE_MAP = VALID = EMOJI_LIST = EMOJI_ROOT = undefined;\r\n// }\r\n\r\nfunction init() {\r\n\tif (MAPPED) return;\r\n\t\r\n\tlet r = read_compressed_payload(COMPRESSED$1);\r\n\tconst read_sorted_array = () => read_sorted(r);\r\n\tconst read_sorted_set = () => new Set(read_sorted_array());\r\n\tconst set_add_many = (set, v) => v.forEach(x => set.add(x));\r\n\r\n\tMAPPED = new Map(read_mapped(r)); \r\n\tIGNORED = read_sorted_set(); // ignored characters are not valid, so just read raw codepoints\r\n\r\n\t/*\r\n\t// direct include from payload is smaller than the decompression code\r\n\tconst FENCED = new Map(read_array_while(() => {\r\n\t\tlet cp = r();\r\n\t\tif (cp) return [cp, read_str(r())];\r\n\t}));\r\n\t*/\r\n\t// 20230217: we still need all CM for proper error formatting\r\n\t// but norm only needs NSM subset that are potentially-valid\r\n\tCM = read_sorted_array();\r\n\tNSM = new Set(read_sorted_array().map(i => CM[i]));\r\n\tCM = new Set(CM);\r\n\t\r\n\tESCAPE = read_sorted_set(); // characters that should not be printed\r\n\tNFC_CHECK = read_sorted_set(); // only needed to illustrate ens_tokenize() transformations\r\n\r\n\tlet chunks = read_sorted_arrays(r);\r\n\tlet unrestricted = r();\r\n\t//const read_chunked = () => new Set(read_sorted_array().flatMap(i => chunks[i]).concat(read_sorted_array()));\r\n\tconst read_chunked = () => {\r\n\t\t// 20230921: build set in parts, 2x faster\r\n\t\tlet set = new Set();\r\n\t\tread_sorted_array().forEach(i => set_add_many(set, chunks[i]));\r\n\t\tset_add_many(set, read_sorted_array());\r\n\t\treturn set; \r\n\t};\r\n\tGROUPS = read_array_while(i => {\r\n\t\t// minifier property mangling seems unsafe\r\n\t\t// so these are manually renamed to single chars\r\n\t\tlet N = read_array_while(r).map(x => x+0x60);\r\n\t\tif (N.length) {\r\n\t\t\tlet R = i >= unrestricted; // unrestricted then restricted\r\n\t\t\tN[0] -= 32; // capitalize\r\n\t\t\tN = str_from_cps(N);\r\n\t\t\tif (R) N=`Restricted[${N}]`;\r\n\t\t\tlet P = read_chunked(); // primary\r\n\t\t\tlet Q = read_chunked(); // secondary\r\n\t\t\tlet M = !r(); // not-whitelisted, check for NSM\r\n\t\t\t// *** this code currently isn't needed ***\r\n\t\t\t/*\r\n\t\t\tlet V = [...P, ...Q].sort((a, b) => a-b); // derive: sorted valid\r\n\t\t\tlet M = r()-1; // number of combining mark\r\n\t\t\tif (M < 0) { // whitelisted\r\n\t\t\t\tM = new Map(read_array_while(() => {\r\n\t\t\t\t\tlet i = r();\r\n\t\t\t\t\tif (i) return [V[i-1], read_array_while(() => {\r\n\t\t\t\t\t\tlet v = read_array_while(r);\r\n\t\t\t\t\t\tif (v.length) return v.map(x => x-1);\r\n\t\t\t\t\t})];\r\n\t\t\t\t}));\r\n\t\t\t}*/\r\n\t\t\treturn {N, P, Q, M, R};\r\n\t\t}\r\n\t});\r\n\r\n\t// decode compressed wholes\r\n\tWHOLE_VALID = read_sorted_set();\r\n\tWHOLE_MAP = new Map();\r\n\tlet wholes = read_sorted_array().concat(Array_from(WHOLE_VALID)).sort((a, b) => a-b); // must be sorted\r\n\twholes.forEach((cp, i) => {\r\n\t\tlet d = r(); \r\n\t\tlet w = wholes[i] = d ? wholes[i-d] : {V: [], M: new Map()};\r\n\t\tw.V.push(cp); // add to member set\r\n\t\tif (!WHOLE_VALID.has(cp)) {\r\n\t\t\tWHOLE_MAP.set(cp, w);  // register with whole map\r\n\t\t}\r\n\t});\r\n\r\n\t// compute confusable-extent complements\r\n\t// usage: WHOLE_MAP.get(cp).M.get(cp) = complement set\r\n\tfor (let {V, M} of new Set(WHOLE_MAP.values())) {\r\n\t\t// connect all groups that have each whole character\r\n\t\tlet recs = [];\r\n\t\tfor (let cp of V) {\r\n\t\t\tlet gs = GROUPS.filter(g => group_has_cp(g, cp));\r\n\t\t\tlet rec = recs.find(({G}) => gs.some(g => G.has(g)));\r\n\t\t\tif (!rec) {\r\n\t\t\t\trec = {G: new Set(), V: []};\r\n\t\t\t\trecs.push(rec);\r\n\t\t\t}\r\n\t\t\trec.V.push(cp);\r\n\t\t\tset_add_many(rec.G, gs);\r\n\t\t}\r\n\t\t// per character cache groups which are not a member of the extent\r\n\t\tlet union = recs.flatMap(x => Array_from(x.G)); // all of the groups used by this whole\r\n\t\tfor (let {G, V} of recs) {\r\n\t\t\tlet complement = new Set(union.filter(g => !G.has(g))); // groups not covered by the extent\r\n\t\t\tfor (let cp of V) {\r\n\t\t\t\tM.set(cp, complement); // this is the same reference\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// compute valid set\r\n\t// 20230924: VALID was union but can be re-used\r\n\tVALID = new Set(); // exists in 1+ groups\r\n\tlet multi = new Set(); // exists in 2+ groups\r\n\tconst add_to_union = cp => VALID.has(cp) ? multi.add(cp) : VALID.add(cp);\r\n\tfor (let g of GROUPS) {\r\n\t\tfor (let cp of g.P) add_to_union(cp);\r\n\t\tfor (let cp of g.Q) add_to_union(cp);\r\n\t}\r\n\t// dual purpose WHOLE_MAP: return placeholder if unique non-confusable\r\n\tfor (let cp of VALID) {\r\n\t\tif (!WHOLE_MAP.has(cp) && !multi.has(cp)) {\r\n\t\t\tWHOLE_MAP.set(cp, UNIQUE_PH);\r\n\t\t}\r\n\t}\r\n\t// add all decomposed parts\r\n\t// see derive: \"Valid is Closed (via Brute-force)\"\r\n\tset_add_many(VALID, nfd(VALID));\r\n\t\r\n\t// decode emoji\r\n\t// 20230719: emoji are now fully-expanded to avoid quirk logic \r\n\tEMOJI_LIST = read_trie(r).map(v => Emoji.from(v)).sort(compare_arrays);\r\n\tEMOJI_ROOT = new Map(); // this has approx 7K nodes (2+ per emoji)\r\n\tfor (let cps of EMOJI_LIST) {\r\n\t\t// 20230719: change to *slightly* stricter algorithm which disallows \r\n\t\t// insertion of misplaced FE0F in emoji sequences (matching ENSIP-15)\r\n\t\t// example: beautified [A B] (eg. flag emoji) \r\n\t\t//  before: allow: [A FE0F B], error: [A FE0F FE0F B] \r\n\t\t//   after: error: both\r\n\t\t// note: this code now matches ENSNormalize.{cs,java} logic\r\n\t\tlet prev = [EMOJI_ROOT];\r\n\t\tfor (let cp of cps) {\r\n\t\t\tlet next = prev.map(node => {\r\n\t\t\t\tlet child = node.get(cp);\r\n\t\t\t\tif (!child) {\r\n\t\t\t\t\t// should this be object? \r\n\t\t\t\t\t// (most have 1-2 items, few have many)\r\n\t\t\t\t\t// 20230719: no, v8 default map is 4?\r\n\t\t\t\t\tchild = new Map();\r\n\t\t\t\t\tnode.set(cp, child);\r\n\t\t\t\t}\r\n\t\t\t\treturn child;\r\n\t\t\t});\r\n\t\t\tif (cp === FE0F) {\r\n\t\t\t\tprev.push(...next); // less than 20 elements\r\n\t\t\t} else {\r\n\t\t\t\tprev = next;\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (let x of prev) {\r\n\t\t\tx.V = cps;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n// if escaped: {HEX}\r\n//       else: \"x\" {HEX}\r\nfunction quoted_cp(cp) {\r\n\treturn (should_escape(cp) ? '' : `${bidi_qq(safe_str_from_cps([cp]))} `) + quote_cp(cp);\r\n}\r\n\r\n// 20230211: some messages can be mixed-directional and result in spillover\r\n// use 200E after a quoted string to force the remainder of a string from \r\n// acquring the direction of the quote\r\n// https://www.w3.org/International/questions/qa-bidi-unicode-controls#exceptions\r\nfunction bidi_qq(s) {\r\n\treturn `\"${s}\"\\u200E`; // strong LTR\r\n}\r\n\r\nfunction check_label_extension(cps) {\r\n\tif (cps.length >= 4 && cps[2] == HYPHEN && cps[3] == HYPHEN) {\r\n\t\tthrow new Error(`invalid label extension: \"${str_from_cps(cps.slice(0, 4))}\"`); // this can only be ascii so cant be bidi\r\n\t}\r\n}\r\nfunction check_leading_underscore(cps) {\r\n\tconst UNDERSCORE = 0x5F;\r\n\tfor (let i = cps.lastIndexOf(UNDERSCORE); i > 0; ) {\r\n\t\tif (cps[--i] !== UNDERSCORE) {\r\n\t\t\tthrow new Error('underscore allowed only at start');\r\n\t\t}\r\n\t}\r\n}\r\n// check that a fenced cp is not leading, trailing, or touching another fenced cp\r\nfunction check_fenced(cps) {\r\n\tlet cp = cps[0];\r\n\tlet prev = FENCED.get(cp);\r\n\tif (prev) throw error_placement(`leading ${prev}`);\r\n\tlet n = cps.length;\r\n\tlet last = -1; // prevents trailing from throwing\r\n\tfor (let i = 1; i < n; i++) {\r\n\t\tcp = cps[i];\r\n\t\tlet match = FENCED.get(cp);\r\n\t\tif (match) {\r\n\t\t\t// since cps[0] isn't fenced, cps[1] cannot throw\r\n\t\t\tif (last == i) throw error_placement(`${prev} + ${match}`);\r\n\t\t\tlast = i + 1;\r\n\t\t\tprev = match;\r\n\t\t}\r\n\t}\r\n\tif (last == n) throw error_placement(`trailing ${prev}`);\r\n}\r\n\r\n// create a safe to print string \r\n// invisibles are escaped\r\n// leading cm uses placeholder\r\n// if cps exceed max, middle truncate with ellipsis\r\n// quoter(cp) => string, eg. 3000 => \"{3000}\"\r\n// note: in html, you'd call this function then replace [<>&] with entities\r\nfunction safe_str_from_cps(cps, max = Infinity, quoter = quote_cp) {\r\n\t//if (Number.isInteger(cps)) cps = [cps];\r\n\t//if (!Array.isArray(cps)) throw new TypeError(`expected codepoints`);\r\n\tlet buf = [];\r\n\tif (is_combining_mark(cps[0])) buf.push('◌');\r\n\tif (cps.length > max) {\r\n\t\tmax >>= 1;\r\n\t\tcps = [...cps.slice(0, max), 0x2026, ...cps.slice(-max)];\r\n\t}\r\n\tlet prev = 0;\r\n\tlet n = cps.length;\r\n\tfor (let i = 0; i < n; i++) {\r\n\t\tlet cp = cps[i];\r\n\t\tif (should_escape(cp)) {\r\n\t\t\tbuf.push(str_from_cps(cps.slice(prev, i)));\r\n\t\t\tbuf.push(quoter(cp));\r\n\t\t\tprev = i + 1;\r\n\t\t}\r\n\t}\r\n\tbuf.push(str_from_cps(cps.slice(prev, n)));\r\n\treturn buf.join('');\r\n}\r\n\r\n// note: set(s) cannot be exposed because they can be modified\r\n// note: Object.freeze() doesn't work\r\nfunction is_combining_mark(cp, only_nsm) { // 20240127: add extra argument\r\n\tinit();\r\n\treturn only_nsm ? NSM.has(cp) : CM.has(cp);\r\n}\r\nfunction should_escape(cp) {\r\n\tinit();\r\n\treturn ESCAPE.has(cp);\r\n}\r\n\r\n// return all supported emoji as fully-qualified emoji \r\n// ordered by length then lexicographic \r\nfunction ens_emoji() {\r\n\tinit();\r\n\treturn EMOJI_LIST.map(x => x.slice()); // emoji are exposed so copy\r\n}\r\n\r\nfunction ens_normalize_fragment(frag, decompose) {\r\n\tinit();\r\n\tlet nf = decompose ? nfd : nfc;\r\n\treturn frag.split(STOP_CH).map(label => str_from_cps(tokens_from_str(explode_cp(label), nf, filter_fe0f).flat())).join(STOP_CH);\r\n}\r\n\r\nfunction ens_normalize(name) {\r\n\treturn flatten(split(name, nfc, filter_fe0f));\r\n}\r\n\r\nfunction ens_beautify(name) {\r\n\tlet labels = split(name, nfc, x => x); // emoji not exposed\r\n\tfor (let {type, output, error} of labels) {\r\n\t\tif (error) break; // flatten will throw\r\n\r\n\t\t// replace leading/trailing hyphen\r\n\t\t// 20230121: consider beautifing all or leading/trailing hyphen to unicode variant\r\n\t\t// not exactly the same in every font, but very similar: \"-\" vs \"‐\"\r\n\t\t/*\r\n\t\tconst UNICODE_HYPHEN = 0x2010;\r\n\t\t// maybe this should replace all for visual consistancy?\r\n\t\t// `node tools/reg-count.js regex ^-\\{2,\\}` => 592\r\n\t\t//for (let i = 0; i < output.length; i++) if (output[i] == 0x2D) output[i] = 0x2010;\r\n\t\tif (output[0] == HYPHEN) output[0] = UNICODE_HYPHEN;\r\n\t\tlet end = output.length-1;\r\n\t\tif (output[end] == HYPHEN) output[end] = UNICODE_HYPHEN;\r\n\t\t*/\r\n\t\t// 20230123: WHATWG URL uses \"CheckHyphens\" false\r\n\t\t// https://url.spec.whatwg.org/#idna\r\n\r\n\t\t// update ethereum symbol\r\n\t\t// ξ => Ξ if not greek\r\n\t\tif (type !== 'Greek') array_replace(output, 0x3BE, 0x39E);\r\n\r\n\t\t// 20221213: fixes bidi subdomain issue, but breaks invariant (200E is disallowed)\r\n\t\t// could be fixed with special case for: 2D (.) + 200E (LTR)\r\n\t\t// https://discuss.ens.domains/t/bidi-label-ordering-spoof/15824\r\n\t\t//output.splice(0, 0, 0x200E);\r\n\t}\r\n\treturn flatten(labels);\r\n}\r\n\r\nfunction ens_split(name, preserve_emoji) {\r\n\treturn split(name, nfc, preserve_emoji ? x => x.slice() : filter_fe0f); // emoji are exposed so copy\r\n}\r\n\r\nfunction split(name, nf, ef) {\r\n\tif (!name) return []; // 20230719: empty name allowance\r\n\tinit();\r\n\tlet offset = 0;\r\n\t// https://unicode.org/reports/tr46/#Validity_Criteria\r\n\t// 4.) \"The label must not contain a U+002E ( . ) FULL STOP.\"\r\n\treturn name.split(STOP_CH).map(label => {\r\n\t\tlet input = explode_cp(label);\r\n\t\tlet info = {\r\n\t\t\tinput,\r\n\t\t\toffset, // codepoint, not substring!\r\n\t\t};\r\n\t\toffset += input.length + 1; // + stop\r\n\t\ttry {\r\n\t\t\t// 1.) \"The label must be in Unicode Normalization Form NFC\"\r\n\t\t\tlet tokens = info.tokens = tokens_from_str(input, nf, ef);\r\n\t\t\tlet token_count = tokens.length;\r\n\t\t\tlet type;\r\n\t\t\tif (!token_count) { // the label was effectively empty (could of had ignored characters)\r\n\t\t\t\t//norm = [];\r\n\t\t\t\t//type = 'None'; // use this instead of next match, \"ASCII\"\r\n\t\t\t\t// 20230120: change to strict\r\n\t\t\t\t// https://discuss.ens.domains/t/ens-name-normalization-2nd/14564/59\r\n\t\t\t\tthrow new Error(`empty label`);\r\n\t\t\t} \r\n\t\t\tlet norm = info.output = tokens.flat();\r\n\t\t\tcheck_leading_underscore(norm);\r\n\t\t\tlet emoji = info.emoji = token_count > 1 || tokens[0].is_emoji; // same as: tokens.some(x => x.is_emoji);\r\n\t\t\tif (!emoji && norm.every(cp => cp < 0x80)) { // special case for ascii\r\n\t\t\t\t// 20230123: matches matches WHATWG, see note 3.3\r\n\t\t\t\tcheck_label_extension(norm); // only needed for ascii\r\n\t\t\t\t// cant have fenced\r\n\t\t\t\t// cant have cm\r\n\t\t\t\t// cant have wholes\r\n\t\t\t\t// see derive: \"Fastpath ASCII\"\r\n\t\t\t\ttype = 'ASCII';\r\n\t\t\t} else {\r\n\t\t\t\tlet chars = tokens.flatMap(x => x.is_emoji ? [] : x); // all of the nfc tokens concat together\r\n\t\t\t\tif (!chars.length) { // theres no text, just emoji\r\n\t\t\t\t\ttype = 'Emoji';\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// 5.) \"The label must not begin with a combining mark, that is: General_Category=Mark.\"\r\n\t\t\t\t\tif (CM.has(norm[0])) throw error_placement('leading combining mark');\r\n\t\t\t\t\tfor (let i = 1; i < token_count; i++) { // we've already checked the first token\r\n\t\t\t\t\t\tlet cps = tokens[i];\r\n\t\t\t\t\t\tif (!cps.is_emoji && CM.has(cps[0])) { // every text token has emoji neighbors, eg. EtEEEtEt...\r\n\t\t\t\t\t\t\t// bidi_qq() not needed since emoji is LTR and cps is a CM\r\n\t\t\t\t\t\t\tthrow error_placement(`emoji + combining mark: \"${str_from_cps(tokens[i-1])} + ${safe_str_from_cps([cps[0]])}\"`); \r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcheck_fenced(norm);\r\n\t\t\t\t\tlet unique = Array_from(new Set(chars));\r\n\t\t\t\t\tlet [g] = determine_group(unique); // take the first match\r\n\t\t\t\t\t// see derive: \"Matching Groups have Same CM Style\"\r\n\t\t\t\t\t// alternative: could form a hybrid type: Latin/Japanese/...\t\r\n\t\t\t\t\tcheck_group(g, chars); // need text in order\r\n\t\t\t\t\tcheck_whole(g, unique); // only need unique text (order would be required for multiple-char confusables)\r\n\t\t\t\t\ttype = g.N;\r\n\t\t\t\t\t// 20230121: consider exposing restricted flag\r\n\t\t\t\t\t// it's simpler to just check for 'Restricted'\r\n\t\t\t\t\t// or even better: type.endsWith(']')\r\n\t\t\t\t\t//if (g.R) info.restricted = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tinfo.type = type;\r\n\t\t} catch (err) {\r\n\t\t\tinfo.error = err; // use full error object\r\n\t\t}\r\n\t\treturn info;\r\n\t});\r\n}\r\n\r\nfunction check_whole(group, unique) {\r\n\tlet maker;\r\n\tlet shared = [];\r\n\tfor (let cp of unique) {\r\n\t\tlet whole = WHOLE_MAP.get(cp);\r\n\t\tif (whole === UNIQUE_PH) return; // unique, non-confusable\r\n\t\tif (whole) {\r\n\t\t\tlet set = whole.M.get(cp); // groups which have a character that look-like this character\r\n\t\t\tmaker = maker ? maker.filter(g => set.has(g)) : Array_from(set);\r\n\t\t\tif (!maker.length) return; // confusable intersection is empty\r\n\t\t} else {\r\n\t\t\tshared.push(cp); \r\n\t\t}\r\n\t}\r\n\tif (maker) {\r\n\t\t// we have 1+ confusable\r\n\t\t// check if any of the remaining groups\r\n\t\t// contain the shared characters too\r\n\t\tfor (let g of maker) {\r\n\t\t\tif (shared.every(cp => group_has_cp(g, cp))) {\r\n\t\t\t\tthrow new Error(`whole-script confusable: ${group.N}/${g.N}`);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n// assumption: unique.size > 0\r\n// returns list of matching groups\r\nfunction determine_group(unique) {\r\n\tlet groups = GROUPS;\r\n\tfor (let cp of unique) {\r\n\t\t// note: we need to dodge CM that are whitelisted\r\n\t\t// but that code isn't currently necessary\r\n\t\tlet gs = groups.filter(g => group_has_cp(g, cp));\r\n\t\tif (!gs.length) {\r\n\t\t\tif (!GROUPS.some(g => group_has_cp(g, cp))) { \r\n\t\t\t\t// the character was composed of valid parts\r\n\t\t\t\t// but it's NFC form is invalid\r\n\t\t\t\t// 20230716: change to more exact statement, see: ENSNormalize.{cs,java}\r\n\t\t\t\t// note: this doesn't have to be a composition\r\n\t\t\t\t// 20230720: change to full check\r\n\t\t\t\tthrow error_disallowed(cp); // this should be rare\r\n\t\t\t} else {\r\n\t\t\t\t// there is no group that contains all these characters\r\n\t\t\t\t// throw using the highest priority group that matched\r\n\t\t\t\t// https://www.unicode.org/reports/tr39/#mixed_script_confusables\r\n\t\t\t\tthrow error_group_member(groups[0], cp);\r\n\t\t\t}\r\n\t\t}\r\n\t\tgroups = gs;\r\n\t\tif (gs.length == 1) break; // there is only one group left\r\n\t}\r\n\t// there are at least 1 group(s) with all of these characters\r\n\treturn groups;\r\n}\r\n\r\n// throw on first error\r\nfunction flatten(split) {\r\n\treturn split.map(({input, error, output}) => {\r\n\t\tif (error) {\r\n\t\t\t// don't print label again if just a single label\r\n\t\t\tlet msg = error.message;\r\n\t\t\t// bidi_qq() only necessary if msg is digits\r\n\t\t\tthrow new Error(split.length == 1 ? msg : `Invalid label ${bidi_qq(safe_str_from_cps(input, 63))}: ${msg}`); \r\n\t\t}\r\n\t\treturn str_from_cps(output);\r\n\t}).join(STOP_CH);\r\n}\r\n\r\nfunction error_disallowed(cp) {\r\n\t// TODO: add cp to error?\r\n\treturn new Error(`disallowed character: ${quoted_cp(cp)}`); \r\n}\r\nfunction error_group_member(g, cp) {\r\n\tlet quoted = quoted_cp(cp);\r\n\tlet gg = GROUPS.find(g => g.P.has(cp)); // only check primary\r\n\tif (gg) {\r\n\t\tquoted = `${gg.N} ${quoted}`;\r\n\t}\r\n\treturn new Error(`illegal mixture: ${g.N} + ${quoted}`);\r\n}\r\nfunction error_placement(where) {\r\n\treturn new Error(`illegal placement: ${where}`);\r\n}\r\n\r\n// assumption: cps.length > 0\r\n// assumption: cps[0] isn't a CM\r\n// assumption: the previous character isn't an emoji\r\nfunction check_group(g, cps) {\r\n\tfor (let cp of cps) {\r\n\t\tif (!group_has_cp(g, cp)) {\r\n\t\t\t// for whitelisted scripts, this will throw illegal mixture on invalid cm, eg. \"e{300}{300}\"\r\n\t\t\t// at the moment, it's unnecessary to introduce an extra error type\r\n\t\t\t// until there exists a whitelisted multi-character\r\n\t\t\t//   eg. if (M < 0 && is_combining_mark(cp)) { ... }\r\n\t\t\t// there are 3 cases:\r\n\t\t\t//   1. illegal cm for wrong group => mixture error\r\n\t\t\t//   2. illegal cm for same group => cm error\r\n\t\t\t//       requires set of whitelist cm per group: \r\n\t\t\t//        eg. new Set([...g.P, ...g.Q].flatMap(nfc).filter(cp => CM.has(cp)))\r\n\t\t\t//   3. wrong group => mixture error\r\n\t\t\tthrow error_group_member(g, cp);\r\n\t\t}\r\n\t}\r\n\t//if (M >= 0) { // we have a known fixed cm count\r\n\tif (g.M) { // we need to check for NSM\r\n\t\tlet decomposed = nfd(cps);\r\n\t\tfor (let i = 1, e = decomposed.length; i < e; i++) { // see: assumption\r\n\t\t\t// 20230210: bugfix: using cps instead of decomposed h/t Carbon225\r\n\t\t\t/*\r\n\t\t\tif (CM.has(decomposed[i])) {\r\n\t\t\t\tlet j = i + 1;\r\n\t\t\t\twhile (j < e && CM.has(decomposed[j])) j++;\r\n\t\t\t\tif (j - i > M) {\r\n\t\t\t\t\tthrow new Error(`too many combining marks: ${g.N} ${bidi_qq(str_from_cps(decomposed.slice(i-1, j)))} (${j-i}/${M})`);\r\n\t\t\t\t}\r\n\t\t\t\ti = j;\r\n\t\t\t}\r\n\t\t\t*/\r\n\t\t\t// 20230217: switch to NSM counting\r\n\t\t\t// https://www.unicode.org/reports/tr39/#Optional_Detection\r\n\t\t\tif (NSM.has(decomposed[i])) {\r\n\t\t\t\tlet j = i + 1;\r\n\t\t\t\tfor (let cp; j < e && NSM.has(cp = decomposed[j]); j++) {\r\n\t\t\t\t\t// a. Forbid sequences of the same nonspacing mark.\r\n\t\t\t\t\tfor (let k = i; k < j; k++) { // O(n^2) but n < 100\r\n\t\t\t\t\t\tif (decomposed[k] == cp) {\r\n\t\t\t\t\t\t\tthrow new Error(`duplicate non-spacing marks: ${quoted_cp(cp)}`);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// parse to end so we have full nsm count\r\n\t\t\t\t// b. Forbid sequences of more than 4 nonspacing marks (gc=Mn or gc=Me).\r\n\t\t\t\tif (j - i > NSM_MAX) {\r\n\t\t\t\t\t// note: this slice starts with a base char or spacing-mark cm\r\n\t\t\t\t\tthrow new Error(`excessive non-spacing marks: ${bidi_qq(safe_str_from_cps(decomposed.slice(i-1, j)))} (${j-i}/${NSM_MAX})`);\r\n\t\t\t\t}\r\n\t\t\t\ti = j;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t// *** this code currently isn't needed ***\r\n\t/*\r\n\tlet cm_whitelist = M instanceof Map;\r\n\tfor (let i = 0, e = cps.length; i < e; ) {\r\n\t\tlet cp = cps[i++];\r\n\t\tlet seqs = cm_whitelist && M.get(cp);\r\n\t\tif (seqs) { \r\n\t\t\t// list of codepoints that can follow\r\n\t\t\t// if this exists, this will always be 1+\r\n\t\t\tlet j = i;\r\n\t\t\twhile (j < e && CM.has(cps[j])) j++;\r\n\t\t\tlet cms = cps.slice(i, j);\r\n\t\t\tlet match = seqs.find(seq => !compare_arrays(seq, cms));\r\n\t\t\tif (!match) throw new Error(`disallowed combining mark sequence: \"${safe_str_from_cps([cp, ...cms])}\"`);\r\n\t\t\ti = j;\r\n\t\t} else if (!V.has(cp)) {\r\n\t\t\t// https://www.unicode.org/reports/tr39/#mixed_script_confusables\r\n\t\t\tlet quoted = quoted_cp(cp);\r\n\t\t\tfor (let cp of cps) {\r\n\t\t\t\tlet u = UNIQUE.get(cp);\r\n\t\t\t\tif (u && u !== g) {\r\n\t\t\t\t\t// if both scripts are restricted this error is confusing\r\n\t\t\t\t\t// because we don't differentiate RestrictedA from RestrictedB \r\n\t\t\t\t\tif (!u.R) quoted = `${quoted} is ${u.N}`;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tthrow new Error(`disallowed ${g.N} character: ${quoted}`);\r\n\t\t\t//throw new Error(`disallowed character: ${quoted} (expected ${g.N})`);\r\n\t\t\t//throw new Error(`${g.N} does not allow: ${quoted}`);\r\n\t\t}\r\n\t}\r\n\tif (!cm_whitelist) {\r\n\t\tlet decomposed = nfd(cps);\r\n\t\tfor (let i = 1, e = decomposed.length; i < e; i++) { // we know it can't be cm leading\r\n\t\t\tif (CM.has(decomposed[i])) {\r\n\t\t\t\tlet j = i + 1;\r\n\t\t\t\twhile (j < e && CM.has(decomposed[j])) j++;\r\n\t\t\t\tif (j - i > M) {\r\n\t\t\t\t\tthrow new Error(`too many combining marks: \"${str_from_cps(decomposed.slice(i-1, j))}\" (${j-i}/${M})`);\r\n\t\t\t\t}\r\n\t\t\t\ti = j;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t*/\r\n}\r\n\r\n// given a list of codepoints\r\n// returns a list of lists, where emoji are a fully-qualified (as Array subclass)\r\n// eg. explode_cp(\"abc💩d\") => [[61, 62, 63], Emoji[1F4A9, FE0F], [64]]\r\n// 20230818: rename for 'process' name collision h/t Javarome\r\n// https://github.com/adraffy/ens-normalize.js/issues/23\r\nfunction tokens_from_str(input, nf, ef) {\r\n\tlet ret = [];\r\n\tlet chars = [];\r\n\tinput = input.slice().reverse(); // flip so we can pop\r\n\twhile (input.length) {\r\n\t\tlet emoji = consume_emoji_reversed(input);\r\n\t\tif (emoji) {\r\n\t\t\tif (chars.length) {\r\n\t\t\t\tret.push(nf(chars));\r\n\t\t\t\tchars = [];\r\n\t\t\t}\r\n\t\t\tret.push(ef(emoji));\r\n\t\t} else {\r\n\t\t\tlet cp = input.pop();\r\n\t\t\tif (VALID.has(cp)) {\r\n\t\t\t\tchars.push(cp);\r\n\t\t\t} else {\r\n\t\t\t\tlet cps = MAPPED.get(cp);\r\n\t\t\t\tif (cps) {\r\n\t\t\t\t\tchars.push(...cps); // less than 10 elements\r\n\t\t\t\t} else if (!IGNORED.has(cp)) {\r\n\t\t\t\t\t// 20230912: unicode 15.1 changed the order of processing such that\r\n\t\t\t\t\t// disallowed parts are only rejected after NFC\r\n\t\t\t\t\t// https://unicode.org/reports/tr46/#Validity_Criteria\r\n\t\t\t\t\t// this doesn't impact normalization as of today\r\n\t\t\t\t\t// technically, this error can be removed as the group logic will apply similar logic\r\n\t\t\t\t\t// however the error type might be less clear\r\n\t\t\t\t\tthrow error_disallowed(cp);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (chars.length) {\r\n\t\tret.push(nf(chars));\r\n\t}\r\n\treturn ret;\r\n}\r\n\r\nfunction filter_fe0f(cps) {\r\n\treturn cps.filter(cp => cp != FE0F);\r\n}\r\n\r\n// given array of codepoints\r\n// returns the longest valid emoji sequence (or undefined if no match)\r\n// *MUTATES* the supplied array\r\n// disallows interleaved ignored characters\r\n// fills (optional) eaten array with matched codepoints\r\nfunction consume_emoji_reversed(cps, eaten) {\r\n\tlet node = EMOJI_ROOT;\r\n\tlet emoji;\r\n\tlet pos = cps.length;\r\n\twhile (pos) {\r\n\t\tnode = node.get(cps[--pos]);\r\n\t\tif (!node) break;\r\n\t\tlet {V} = node;\r\n\t\tif (V) { // this is a valid emoji (so far)\r\n\t\t\temoji = V;\r\n\t\t\tif (eaten) eaten.push(...cps.slice(pos).reverse()); // (optional) copy input, used for ens_tokenize()\r\n\t\t\tcps.length = pos; // truncate\r\n\t\t}\r\n\t}\r\n\treturn emoji;\r\n}\r\n\r\n// ************************************************************\r\n// tokenizer \r\n\r\nconst TY_VALID = 'valid';\r\nconst TY_MAPPED = 'mapped';\r\nconst TY_IGNORED = 'ignored';\r\nconst TY_DISALLOWED = 'disallowed';\r\nconst TY_EMOJI = 'emoji';\r\nconst TY_NFC = 'nfc';\r\nconst TY_STOP = 'stop';\r\n\r\nfunction ens_tokenize(name, {\r\n\tnf = true, // collapse unnormalized runs into a single token\r\n} = {}) {\r\n\tinit();\r\n\tlet input = explode_cp(name).reverse();\r\n\tlet eaten = [];\r\n\tlet tokens = [];\r\n\twhile (input.length) {\r\n\t\tlet emoji = consume_emoji_reversed(input, eaten);\r\n\t\tif (emoji) {\r\n\t\t\ttokens.push({\r\n\t\t\t\ttype: TY_EMOJI,\r\n\t\t\t\temoji: emoji.slice(), // copy emoji\r\n\t\t\t\tinput: eaten,\r\n\t\t\t\tcps: filter_fe0f(emoji)\r\n\t\t\t});\r\n\t\t\teaten = []; // reset buffer\r\n\t\t} else {\r\n\t\t\tlet cp = input.pop();\r\n\t\t\tif (cp == STOP) {\r\n\t\t\t\ttokens.push({type: TY_STOP, cp});\r\n\t\t\t} else if (VALID.has(cp)) {\r\n\t\t\t\ttokens.push({type: TY_VALID, cps: [cp]});\r\n\t\t\t} else if (IGNORED.has(cp)) {\r\n\t\t\t\ttokens.push({type: TY_IGNORED, cp});\r\n\t\t\t} else {\r\n\t\t\t\tlet cps = MAPPED.get(cp);\r\n\t\t\t\tif (cps) {\r\n\t\t\t\t\ttokens.push({type: TY_MAPPED, cp, cps: cps.slice()});\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttokens.push({type: TY_DISALLOWED, cp});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (nf) {\r\n\t\tfor (let i = 0, start = -1; i < tokens.length; i++) {\r\n\t\t\tlet token = tokens[i];\r\n\t\t\tif (is_valid_or_mapped(token.type)) {\r\n\t\t\t\tif (requires_check(token.cps)) { // normalization might be needed\r\n\t\t\t\t\tlet end = i + 1;\r\n\t\t\t\t\tfor (let pos = end; pos < tokens.length; pos++) { // find adjacent text\r\n\t\t\t\t\t\tlet {type, cps} = tokens[pos];\r\n\t\t\t\t\t\tif (is_valid_or_mapped(type)) {\r\n\t\t\t\t\t\t\tif (!requires_check(cps)) break;\r\n\t\t\t\t\t\t\tend = pos + 1;\r\n\t\t\t\t\t\t} else if (type !== TY_IGNORED) { // || type !== TY_DISALLOWED) { \r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (start < 0) start = i;\r\n\t\t\t\t\tlet slice = tokens.slice(start, end);\r\n\t\t\t\t\tlet cps0 = slice.flatMap(x => is_valid_or_mapped(x.type) ? x.cps : []); // strip junk tokens\r\n\t\t\t\t\tlet cps = nfc(cps0);\r\n\t\t\t\t\tif (compare_arrays(cps, cps0)) { // bundle into an nfc token\r\n\t\t\t\t\t\ttokens.splice(start, end - start, {\r\n\t\t\t\t\t\t\ttype: TY_NFC, \r\n\t\t\t\t\t\t\tinput: cps0, // there are 3 states: tokens0 ==(process)=> input ==(nfc)=> tokens/cps\r\n\t\t\t\t\t\t\tcps, \r\n\t\t\t\t\t\t\ttokens0: collapse_valid_tokens(slice),\r\n\t\t\t\t\t\t\ttokens: ens_tokenize(str_from_cps(cps), {nf: false})\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\ti = start;\r\n\t\t\t\t\t} else { \r\n\t\t\t\t\t\ti = end - 1; // skip to end of slice\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstart = -1; // reset\r\n\t\t\t\t} else {\r\n\t\t\t\t\tstart = i; // remember last\r\n\t\t\t\t}\r\n\t\t\t} else if (token.type !== TY_IGNORED) { // 20221024: is this correct?\r\n\t\t\t\tstart = -1; // reset\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn collapse_valid_tokens(tokens);\r\n}\r\n\r\nfunction is_valid_or_mapped(type) {\r\n\treturn type == TY_VALID || type == TY_MAPPED;\r\n}\r\n\r\nfunction requires_check(cps) {\r\n\treturn cps.some(cp => NFC_CHECK.has(cp));\r\n}\r\n\r\nfunction collapse_valid_tokens(tokens) {\r\n\tfor (let i = 0; i < tokens.length; i++) {\r\n\t\tif (tokens[i].type == TY_VALID) {\r\n\t\t\tlet j = i + 1;\r\n\t\t\twhile (j < tokens.length && tokens[j].type == TY_VALID) j++;\r\n\t\t\ttokens.splice(i, j - i, {type: TY_VALID, cps: tokens.slice(i, j).flatMap(x => x.cps)});\r\n\t\t}\r\n\t}\r\n\treturn tokens;\r\n}\n\nexport { ens_beautify, ens_emoji, ens_normalize, ens_normalize_fragment, ens_split, ens_tokenize, is_combining_mark, nfc, nfd, safe_str_from_cps, should_escape };\n","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { sha3Raw } from 'web3-utils';\n// eslint-disable-next-line camelcase\nimport { ens_normalize } from '@adraffy/ens-normalize';\nexport const normalize = (name) => ens_normalize(name);\nexport const namehash = (inputName) => {\n    // Reject empty names:\n    let node = '';\n    for (let i = 0; i < 32; i += 1) {\n        node += '00';\n    }\n    if (inputName) {\n        const name = normalize(inputName);\n        const labels = name.split('.');\n        for (let i = labels.length - 1; i >= 0; i -= 1) {\n            const labelSha = sha3Raw(labels[i]).slice(2);\n            node = sha3Raw(`0x${node}${labelSha}`).slice(2);\n        }\n    }\n    return `0x${node}`;\n};\n//# sourceMappingURL=utils.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\nimport { Contract } from 'web3-eth-contract';\nimport { ENSRegistryAbi } from './abi/ens/ENSRegistry.js';\nimport { PublicResolverAbi } from './abi/ens/PublicResolver.js';\nimport { registryAddresses } from './config.js';\nimport { namehash } from './utils.js';\nexport class Registry {\n    constructor(context, customRegistryAddress) {\n        this.contract = new Contract(ENSRegistryAbi, customRegistryAddress !== null && customRegistryAddress !== void 0 ? customRegistryAddress : registryAddresses.main, context);\n        this.context = context;\n    }\n    getOwner(name) {\n        return __awaiter(this, void 0, void 0, function* () {\n            try {\n                const result = this.contract.methods.owner(namehash(name)).call();\n                return result;\n            }\n            catch (error) {\n                throw new Error(); // TODO: TransactionRevertInstructionError Needs to be added after web3-eth call method is implemented\n            }\n        });\n    }\n    getTTL(name) {\n        return __awaiter(this, void 0, void 0, function* () {\n            try {\n                return this.contract.methods.ttl(namehash(name)).call();\n            }\n            catch (error) {\n                throw new Error(); // TODO: TransactionRevertInstructionError Needs to be added after web3-eth call method is implemented\n            }\n        });\n    }\n    recordExists(name) {\n        return __awaiter(this, void 0, void 0, function* () {\n            try {\n                const promise = this.contract.methods.recordExists(namehash(name)).call();\n                return promise;\n            }\n            catch (error) {\n                throw new Error(); // TODO: TransactionRevertInstructionError Needs to be added after web3-eth call method is implemented\n            }\n        });\n    }\n    getResolver(name) {\n        return __awaiter(this, void 0, void 0, function* () {\n            try {\n                return this.contract.methods\n                    .resolver(namehash(name))\n                    .call()\n                    .then(address => {\n                    // address type is unknown, not sure why\n                    if (typeof address === 'string') {\n                        const contract = new Contract(PublicResolverAbi, address, this.context);\n                        // TODO: set contract provider needs to be added when ens current provider\n                        return contract;\n                    }\n                    throw new Error();\n                });\n            }\n            catch (error) {\n                throw new Error(); // TODO: TransactionRevertInstructionError Needs to be added after web3-eth call method is implemented\n            }\n        });\n    }\n    get events() {\n        return this.contract.events;\n    }\n}\n//# sourceMappingURL=registry.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\nimport { ResolverMethodMissingError } from 'web3-errors';\nimport { isNullish, sha3 } from 'web3-utils';\nimport { isHexStrict } from 'web3-validator';\nimport { interfaceIds, methodsInInterface } from './config.js';\nimport { namehash } from './utils.js';\n//  Default public resolver\n//  https://github.com/ensdomains/resolvers/blob/master/contracts/PublicResolver.sol\nexport class Resolver {\n    constructor(registry) {\n        this.registry = registry;\n    }\n    getResolverContractAdapter(ENSName) {\n        return __awaiter(this, void 0, void 0, function* () {\n            //  TODO : (Future 4.1.0 TDB) cache resolver contract if frequently queried same ENS name, refresh cache based on TTL and usage, also limit cache size, optional cache with a flag\n            return this.registry.getResolver(ENSName);\n        });\n    }\n    //  https://eips.ethereum.org/EIPS/eip-165\n    // eslint-disable-next-line class-methods-use-this\n    checkInterfaceSupport(resolverContract, methodName) {\n        var _a, _b;\n        return __awaiter(this, void 0, void 0, function* () {\n            if (isNullish(interfaceIds[methodName]))\n                throw new ResolverMethodMissingError((_a = resolverContract.options.address) !== null && _a !== void 0 ? _a : '', methodName);\n            const supported = yield resolverContract.methods\n                .supportsInterface(interfaceIds[methodName])\n                .call();\n            if (!supported)\n                throw new ResolverMethodMissingError((_b = resolverContract.options.address) !== null && _b !== void 0 ? _b : '', methodName);\n        });\n    }\n    supportsInterface(ENSName, interfaceId) {\n        var _a;\n        return __awaiter(this, void 0, void 0, function* () {\n            const resolverContract = yield this.getResolverContractAdapter(ENSName);\n            let interfaceIdParam = interfaceId;\n            if (!isHexStrict(interfaceIdParam)) {\n                interfaceIdParam = (_a = sha3(interfaceId)) !== null && _a !== void 0 ? _a : '';\n                if (interfaceId === '')\n                    throw new Error('Invalid interface Id');\n                interfaceIdParam = interfaceIdParam.slice(0, 10);\n            }\n            return resolverContract.methods.supportsInterface(interfaceIdParam).call();\n        });\n    }\n    // eslint-disable-next-line @typescript-eslint/no-inferrable-types\n    getAddress(ENSName, coinType = 60) {\n        return __awaiter(this, void 0, void 0, function* () {\n            const resolverContract = yield this.getResolverContractAdapter(ENSName);\n            yield this.checkInterfaceSupport(resolverContract, methodsInInterface.addr);\n            return resolverContract.methods.addr(namehash(ENSName), coinType).call();\n        });\n    }\n    getPubkey(ENSName) {\n        return __awaiter(this, void 0, void 0, function* () {\n            const resolverContract = yield this.getResolverContractAdapter(ENSName);\n            yield this.checkInterfaceSupport(resolverContract, methodsInInterface.pubkey);\n            return resolverContract.methods.pubkey(namehash(ENSName)).call();\n        });\n    }\n    getContenthash(ENSName) {\n        return __awaiter(this, void 0, void 0, function* () {\n            const resolverContract = yield this.getResolverContractAdapter(ENSName);\n            yield this.checkInterfaceSupport(resolverContract, methodsInInterface.contenthash);\n            return resolverContract.methods.contenthash(namehash(ENSName)).call();\n        });\n    }\n    setAddress(ENSName, address, txConfig) {\n        return __awaiter(this, void 0, void 0, function* () {\n            const resolverContract = yield this.getResolverContractAdapter(ENSName);\n            yield this.checkInterfaceSupport(resolverContract, methodsInInterface.setAddr);\n            return resolverContract.methods\n                .setAddr(namehash(ENSName), address)\n                .send(txConfig);\n        });\n    }\n    getText(ENSName, key) {\n        return __awaiter(this, void 0, void 0, function* () {\n            const resolverContract = yield this.getResolverContractAdapter(ENSName);\n            yield this.checkInterfaceSupport(resolverContract, methodsInInterface.text);\n            return resolverContract.methods\n                .text(namehash(ENSName), key).call();\n        });\n    }\n    getName(address, checkInterfaceSupport = true) {\n        return __awaiter(this, void 0, void 0, function* () {\n            const reverseName = `${address.toLowerCase().substring(2)}.addr.reverse`;\n            const resolverContract = yield this.getResolverContractAdapter(reverseName);\n            if (checkInterfaceSupport)\n                yield this.checkInterfaceSupport(resolverContract, methodsInInterface.name);\n            return resolverContract.methods\n                .name(namehash(reverseName)).call();\n        });\n    }\n}\n//# sourceMappingURL=resolver.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\nimport { Web3Context } from 'web3-core';\nimport { ENSNetworkNotSyncedError, ENSUnsupportedNetworkError, } from 'web3-errors';\nimport { isSyncing } from 'web3-eth';\nimport { getId } from 'web3-net';\nimport { FMT_NUMBER, } from 'web3-types';\nimport { isAddress } from 'web3-validator';\nimport { networkIds, registryAddresses } from './config.js';\nimport { Registry } from './registry.js';\nimport { Resolver } from './resolver.js';\n/**\n * This class is designed to interact with the ENS system on the Ethereum blockchain.\n * For using ENS package, first install Web3 package using: `npm i web3` or `yarn add web3` based on your package manager, after that ENS features can be used as mentioned in following snippet.\n * ```ts\n *\n * import { Web3 } from 'web3';\n *\n * const web3 = new Web3('https://127.0.0.1:4545');\n *\n * console.log(await web3.eth.ens.getAddress('ethereum.eth'))\n * ```\n * For using individual package install `web3-eth-ens` packages using: `npm i web3-eth-ens` or `yarn add web3-eth-ens`. This is more efficient approach for building lightweight applications.\n *\n * ```ts\n *import { ENS } from 'web3-eth-ens';\n *\n * const ens = new ENS(undefined,'https://127.0.0.1:4545');\n *\n * console.log(await ens.getAddress('vitalik.eth'));\n * ```\n */\nexport class ENS extends Web3Context {\n    /**\n     * Use to create an instance of ENS\n     * @param registryAddr - (Optional) The address of the ENS registry (default: mainnet registry address)\n     * @param provider - (Optional) The provider to use for the ENS instance\n     * @example\n     * ```ts\n     * const ens = new ENS(\n     * \t\"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\",\n     * \t\"http://localhost:8545\"\n     * );\n     *\n     * console.log( ens.defaultChain);\n     * > mainnet\n     * ```\n     */\n    constructor(registryAddr, provider) {\n        super(provider !== null && provider !== void 0 ? provider : '');\n        this.registryAddress = registryAddr !== null && registryAddr !== void 0 ? registryAddr : registryAddresses.main; // will default to main registry address\n        this._registry = new Registry(this.getContextObject(), registryAddr);\n        this._resolver = new Resolver(this._registry);\n    }\n    /**\n     * Returns the Resolver by the given address\n     * @param name - The name of the ENS domain\n     * @returns - An contract instance of the resolver\n     *\n     * @example\n     * ```ts\n     * const resolver = await ens.getResolver('resolver');\n     *\n     * console.log(resolver.options.address);\n     * > '0x1234567890123456789012345678901234567890'\n     * ```\n     */\n    getResolver(name) {\n        return __awaiter(this, void 0, void 0, function* () {\n            return this._registry.getResolver(name);\n        });\n    }\n    /**\n     * Returns true if the record exists\n     * @param name - The ENS name\n     * @returns - Returns `true` if node exists in this ENS registry. This will return `false` for records that are in the legacy ENS registry but have not yet been migrated to the new one.\n     * @example\n     * ```ts\n     * const exists = await web3.eth.ens.recordExists('ethereum.eth');\n     * ```\n     */\n    recordExists(name) {\n        return __awaiter(this, void 0, void 0, function* () {\n            return this._registry.recordExists(name);\n        });\n    }\n    /**\n     * Returns the caching TTL (time-to-live) of an ENS name.\n     * @param name - The ENS name\n     * @returns - Returns the caching TTL (time-to-live) of a name.\n     * @example\n     * ```ts\n     * const owner = await web3.eth.ens.getTTL('ethereum.eth');\n     * ```\n     */\n    getTTL(name) {\n        return __awaiter(this, void 0, void 0, function* () {\n            return this._registry.getTTL(name);\n        });\n    }\n    /**\n     * Returns the owner by the given name and current configured or detected Registry\n     * @param name - The ENS name\n     * @returns - Returns the address of the owner of the name.\n     * @example\n     * ```ts\n     * const owner = await web3.eth.ens.getOwner('ethereum.eth');\n     * ```\n     */\n    getOwner(name) {\n        return __awaiter(this, void 0, void 0, function* () {\n            return this._registry.getOwner(name);\n        });\n    }\n    /**\n     * Resolves an ENS name to an Ethereum address.\n     * @param ENSName - The ENS name to resolve\n     * @param coinType - (Optional) The coin type, defaults to 60 (ETH)\n     * @returns - The Ethereum address of the given name\n     * ```ts\n     * const address = await web3.eth.ens.getAddress('ethereum.eth');\n     * console.log(address);\n     * > '0xfB6916095ca1df60bB79Ce92cE3Ea74c37c5d359'\n     * ```\n     */\n    getAddress(ENSName, coinType = 60) {\n        return __awaiter(this, void 0, void 0, function* () {\n            return this._resolver.getAddress(ENSName, coinType);\n        });\n    }\n    /**\n     * ERC-634 - Returns the text content stored in the resolver for the specified key.\n     * @param ENSName - The ENS name to resolve\n     * @param key - The key to resolve https://github.com/ethereum/ercs/blob/master/ERCS/erc-634.md#global-keys\n     * @returns - The value content stored in the resolver for the specified key\n     */\n    getText(ENSNameOrAddr, key) {\n        return __awaiter(this, void 0, void 0, function* () {\n            if (isAddress(ENSNameOrAddr))\n                return this._resolver.getText(yield (this._resolver.getName(ENSNameOrAddr, false)), key);\n            return this._resolver.getText(ENSNameOrAddr, key);\n        });\n    }\n    /**\n     * Resolves the name of an ENS node.\n     * @param ENSName - The node to resolve\n     * @returns - The name\n     */\n    getName(ENSName, checkInterfaceSupport = true) {\n        return __awaiter(this, void 0, void 0, function* () {\n            return this._resolver.getName(ENSName, checkInterfaceSupport);\n        });\n    }\n    /**\n     * Returns the X and Y coordinates of the curve point for the public key.\n     * @param ENSName - The ENS name\n     * @returns - The X and Y coordinates of the curve point for the public key\n     * @example\n     * ```ts\n     * const key = await web3.eth.ens.getPubkey('ethereum.eth');\n     * console.log(key);\n     * > {\n     * \"0\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n     * \"1\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n     * \"x\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n     * \"y\": \"0x0000000000000000000000000000000000000000000000000000000000000000\"\n     * }\n     * ```\n     */\n    getPubkey(ENSName) {\n        return __awaiter(this, void 0, void 0, function* () {\n            return this._resolver.getPubkey(ENSName);\n        });\n    }\n    /**\n     * Returns the content hash object associated with an ENS node.\n     * @param ENSName - The ENS name\n     * @returns - The content hash object associated with an ENS node\n     * @example\n     * ```ts\n     * const hash = await web3.eth.ens.getContenthash('ethereum.eth');\n     * console.log(hash);\n     * > 'QmaEBknbGT4bTQiQoe2VNgBJbRfygQGktnaW5TbuKixjYL'\n     * ```\n     */\n    getContenthash(ENSName) {\n        return __awaiter(this, void 0, void 0, function* () {\n            return this._resolver.getContenthash(ENSName);\n        });\n    }\n    /**\n     * Checks if the current used network is synced and looks for ENS support there.\n     * Throws an error if not.\n     * @returns - The address of the ENS registry if the network has been detected successfully\n     * @example\n     * ```ts\n     * console.log(await web3.eth.ens.checkNetwork());\n     * > '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e'\n     * ```\n     */\n    checkNetwork() {\n        return __awaiter(this, void 0, void 0, function* () {\n            const now = Date.now() / 1000;\n            if (!this._lastSyncCheck || now - this._lastSyncCheck > 3600) {\n                const syncInfo = yield isSyncing(this);\n                if (!(typeof syncInfo === 'boolean' && !syncInfo)) {\n                    throw new ENSNetworkNotSyncedError();\n                }\n                this._lastSyncCheck = now;\n            }\n            if (this._detectedAddress) {\n                return this._detectedAddress;\n            }\n            const networkType = yield getId(this, Object.assign(Object.assign({}, this.defaultReturnFormat), { number: FMT_NUMBER.HEX })); // get the network from provider\n            const addr = registryAddresses[networkIds[networkType]];\n            if (typeof addr === 'undefined') {\n                throw new ENSUnsupportedNetworkError(networkType);\n            }\n            this._detectedAddress = addr;\n            return this._detectedAddress;\n        });\n    }\n    /**\n     * Returns true if the related Resolver does support the given signature or interfaceId.\n     * @param ENSName - The ENS name\n     * @param interfaceId - The signature of the function or the interfaceId as described in the ENS documentation\n     * @returns - `true` if the related Resolver does support the given signature or interfaceId.\n     * @example\n     * ```ts\n     * const supports = await web3.eth.ens.supportsInterface('ethereum.eth', 'addr(bytes32');\n     * console.log(supports);\n     * > true\n     * ```\n     */\n    supportsInterface(ENSName, interfaceId) {\n        return __awaiter(this, void 0, void 0, function* () {\n            return this._resolver.supportsInterface(ENSName, interfaceId);\n        });\n    }\n    /**\n     * @returns - Returns all events that can be emitted by the ENS registry.\n     */\n    get events() {\n        return this._registry.events;\n    }\n    /**\n     * Sets the address of an ENS name in his resolver.\n     * @param name - The ENS name\n     * @param address - The address to set\n     * @param txConfig - (Optional) The transaction config\n     * @returns - The transaction receipt\n     * ```ts\n     * const receipt = await ens.setAddress('web3js.eth','0xe2597eb05cf9a87eb1309e86750c903ec38e527e');\n     *```\n     */\n    setAddress(name, address, txConfig) {\n        return __awaiter(this, void 0, void 0, function* () {\n            return this._resolver.setAddress(name, address, txConfig);\n        });\n    }\n}\n//# sourceMappingURL=ens.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\nimport { toChecksumAddress, utf8ToHex } from 'web3-utils';\nimport { formatTransaction } from 'web3-eth';\nimport { ETH_DATA_FORMAT } from 'web3-types';\nimport { validator, isHexStrict } from 'web3-validator';\nimport { personalRpcMethods } from 'web3-rpc-methods';\nexport const getAccounts = (requestManager) => __awaiter(void 0, void 0, void 0, function* () {\n    const result = yield personalRpcMethods.getAccounts(requestManager);\n    return result.map(toChecksumAddress);\n});\nexport const newAccount = (requestManager, password) => __awaiter(void 0, void 0, void 0, function* () {\n    validator.validate(['string'], [password]);\n    const result = yield personalRpcMethods.newAccount(requestManager, password);\n    return toChecksumAddress(result);\n});\nexport const unlockAccount = (requestManager, address, password, unlockDuration) => __awaiter(void 0, void 0, void 0, function* () {\n    validator.validate(['address', 'string', 'uint'], [address, password, unlockDuration]);\n    return personalRpcMethods.unlockAccount(requestManager, address, password, unlockDuration);\n});\nexport const lockAccount = (requestManager, address) => __awaiter(void 0, void 0, void 0, function* () {\n    validator.validate(['address'], [address]);\n    return personalRpcMethods.lockAccount(requestManager, address);\n});\nexport const importRawKey = (requestManager, keyData, passphrase) => __awaiter(void 0, void 0, void 0, function* () {\n    validator.validate(['string', 'string'], [keyData, passphrase]);\n    return personalRpcMethods.importRawKey(requestManager, keyData, passphrase);\n});\nexport const sendTransaction = (requestManager, tx, passphrase, config) => __awaiter(void 0, void 0, void 0, function* () {\n    const formattedTx = formatTransaction(tx, ETH_DATA_FORMAT, {\n        transactionSchema: config === null || config === void 0 ? void 0 : config.customTransactionSchema,\n    });\n    return personalRpcMethods.sendTransaction(requestManager, formattedTx, passphrase);\n});\nexport const signTransaction = (requestManager, tx, passphrase, config) => __awaiter(void 0, void 0, void 0, function* () {\n    const formattedTx = formatTransaction(tx, ETH_DATA_FORMAT, {\n        transactionSchema: config === null || config === void 0 ? void 0 : config.customTransactionSchema,\n    });\n    return personalRpcMethods.signTransaction(requestManager, formattedTx, passphrase);\n});\nexport const sign = (requestManager, data, address, passphrase) => __awaiter(void 0, void 0, void 0, function* () {\n    validator.validate(['string', 'address', 'string'], [data, address, passphrase]);\n    const dataToSign = isHexStrict(data) ? data : utf8ToHex(data);\n    return personalRpcMethods.sign(requestManager, dataToSign, address, passphrase);\n});\nexport const ecRecover = (requestManager, signedData, signature) => __awaiter(void 0, void 0, void 0, function* () {\n    validator.validate(['string', 'string'], [signedData, signature]);\n    const signedDataString = isHexStrict(signedData) ? signedData : utf8ToHex(signedData);\n    return personalRpcMethods.ecRecover(requestManager, signedDataString, signature);\n});\n//# sourceMappingURL=rpc_method_wrappers.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\nimport { Web3Context } from 'web3-core';\nimport * as rpcWrappers from './rpc_method_wrappers.js';\n/**\n * Eth Personal allows you to interact with the Ethereum node’s accounts.\n * For using Eth Personal package, first install Web3 package using: `npm i web3` or `yarn add web3` based on your package manager.\n * ```ts\n *\n *import { Web3 } from 'web3';\n *  const web3 = new Web3('http://127.0.0.1:7545');\n *\n *  console.log(await web3.eth.personal.getAccounts());\n *\n * ```\n * For using individual package install `web3-eth-personal` packages using: `npm i web3-eth-personal` or `yarn add web3-eth-personal`.\n *\n * ```ts\n * import {Personal} from 'web3-eth-personal';\n *\n * const personal = new Personal('http://127.0.0.1:7545');\n * console.log(await personal.getAccounts());\n * ```\n */\nexport class Personal extends Web3Context {\n    /**\n     *Returns a list of accounts the node controls by using the provider and calling the RPC method personal_listAccounts. Using `web3.eth.accounts.create()` will not add accounts into this list. For that use `web3.eth.personal.newAccount()`.\n     * @returns - An array of addresses controlled by the node.\n     * @example\n     * ```ts\n     *  const accounts = await personal.getAccounts();\n     * console.log(accounts);\n     * >\n     * [\n     * \t'0x79D7BbaC53C9aF700d0B250e9AE789E503Fcd6AE',\n     * \t'0xe2597eB05CF9a87eB1309e86750C903EC38E527e',\n     * \t'0x7eD0e85B8E1E925600B4373e6d108F34AB38a401',\n     * \t'0xE4bEEf667408b99053dC147Ed19592aDa0d77F59',\n     * \t'0x7AB80aeB6bb488B7f6c41c58e83Ef248eB39c882',\n     * \t'0x12B1D9d74d73b1C3A245B19C1C5501c653aF1af9',\n     * \t'0x1a6075A263Ee140e00Dbf8E374Fc5A443d097894',\n     * \t'0x4FEC0A51024B13030D26E70904B066C6d41157A5',\n     * \t'0x03095dc4857BB26f3a4550c5651Df8b7f6b6B1Ef',\n     * \t'0xac0B9b6e8A17991cb172B2ABAF45Fb5eb769E540'\n     * ]\n     * ```\n     */\n    getAccounts() {\n        return __awaiter(this, void 0, void 0, function* () {\n            return rpcWrappers.getAccounts(this.requestManager);\n        });\n    }\n    /**\n     * Creates a new account and returns its address.\n     * **_NOTE:_**  This function sends a sensitive information like password. Never call this function over a unsecured Websocket or HTTP provider, as your password will be sent in plain text!\n     * @param password - The password to encrypt the account with.\n     * @returns - The address of the new account.\n     * @example\n     * ```ts\n     * const addr = await web3.eth.personal.newAccount('password');\n     * console.log(addr);\n     * > '0x1234567891011121314151617181920212223456'\n     * ```\n     */\n    newAccount(password) {\n        return __awaiter(this, void 0, void 0, function* () {\n            return rpcWrappers.newAccount(this.requestManager, password);\n        });\n    }\n    /**\n     * Unlocks an account for a given duration.\n     * @param address - The address of the account to unlock.\n     * @param password - The password of the account to unlock.\n     * @param unlockDuration - The duration in seconds to unlock the account for.\n     * @example\n     * ```ts\n     * await personal.unlockAccount(\n     * \t\"0x0d4aa485ecbc499c70860feb7e5aaeaf5fd8172e\",\n     * \t\"123456\",\n     * \t600\n     * );\n     * ```\n     */\n    unlockAccount(address, password, unlockDuration) {\n        return __awaiter(this, void 0, void 0, function* () {\n            return rpcWrappers.unlockAccount(this.requestManager, address, password, unlockDuration);\n        });\n    }\n    /**\n     * Locks the given account\n     * @param address - The address of the account to lock.\n     * @returns - `true` if the account was locked, otherwise `false`.\n     * @example\n     * ```ts\n     * await personal.lockAccount(\n     * \t\"0x0d4aa485ecbc499c70860feb7e5aaeaf5fd8172e\"\n     * );\n     * ```\n     */\n    lockAccount(address) {\n        return __awaiter(this, void 0, void 0, function* () {\n            return rpcWrappers.lockAccount(this.requestManager, address);\n        });\n    }\n    /**\n     * Imports the given private key into the key store, encrypting it with the passphrase.\n     * @param keyData - An unencrypted private key (hex string).\n     * @param passphrase  - The password of the account\n     * @returns - The address of the new account.\n     * @example\n     * ```ts\n     * const accountAddress = await personal.importRawKey(\n     * \t\"abe40cb08850da918ee951b237fa87946499b2d8643e4aa12b0610b050c731f6\",\n     * \t\"123456\"\n     * );\n     *\n     * console.log(unlockTx);\n     * > 0x8727a8b34ec833154b72b62cac05d69f86eb6556\n     * ```\n     */\n    importRawKey(keyData, passphrase) {\n        return __awaiter(this, void 0, void 0, function* () {\n            return rpcWrappers.importRawKey(this.requestManager, keyData, passphrase);\n        });\n    }\n    /**\n     * This method sends a transaction over the management API.\n     * **_NOTE:_** Sending your account password over an unsecured HTTP RPC connection is highly unsecure.\n     * @param tx - The transaction options\n     * @param passphrase - The passphrase of the current account\n     * @returns - The transaction hash\n     * @example\n     * ```ts\n     * const txHash = personal\n     * .sendTransaction({\n     *  \tfrom: \"0x0d4aa485ecbc499c70860feb7e5aaeaf5fd8172e\",\n     * \tgasPrice: \"20000000000\",\n     * \tgas: \"21000\",\n     * \tto: \"0x3535353535353535353535353535353535353535\",\n     * \tvalue: \"1000000\",\n     * \tdata: \"\",\n     * \tnonce: 0,\n     * },\n     * \"123456\");\n     *\n     * console.log(txHash);\n     * > 0x9445325c3c5638c9fe425b003b8c32f03e9f99d409555a650a6838ba712bb51b\n     * ```\n     */\n    sendTransaction(tx, passphrase) {\n        return __awaiter(this, void 0, void 0, function* () {\n            return rpcWrappers.sendTransaction(this.requestManager, tx, passphrase, this.config);\n        });\n    }\n    /**\n     * Signs a transaction. This account needs to be unlocked.\n     * **_NOTE:_** Sending your account password over an unsecured HTTP RPC connection is highly unsecure.\n     * @param tx - The transaction data to sign. See sendTransaction  for more information.\n     * @param passphrase - The password of the `from` account, to sign the transaction with.\n     * @returns - The RLP encoded transaction. The `raw` property can be used to send the transaction using  sendSignedTransaction.\n     * @example\n     * ```ts\n     * const tx = personal\n     * .signTransaction({\n     * \tfrom: \"0x0d4aa485ecbc499c70860feb7e5aaeaf5fd8172e\",\n     * \tgasPrice: \"20000000000\",\n     * \tgas: \"21000\",\n     * \tto: \"0x3535353535353535353535353535353535353535\",\n     * \tvalue: \"1000000000000000000\",\n     * \tdata: \"\",\n     * \tnonce: 0,\n     * },\n     * \"123456\");\n     *\n     * console.log(tx);\n     *\n     * > {\n     * \traw: '0xf86e808504a817c800825208943535353535353535353535353535353535353535880de0b6b3a764000080820a95a0c951c03238fe930e6e69ab9d6af9f29248a514048e44884f0e60c4de40de3526a038b71399bf0c8925749ab79e91ce6cd2fc068c84c18ff6a197b48c4cbef01e00',\n     * \ttx: {\n     * \ttype: '0x0',\n     * \tnonce: '0x0',\n     * \tgasPrice: '0x4a817c800',\n     * \tmaxPriorityFeePerGas: null,\n     * \tmaxFeePerGas: null,\n     * \tgas: '0x5208',\n     * \tvalue: '0xde0b6b3a7640000',\n     * \tinput: '0x',\n     * \tv: '0xa95',\n     * \tr: '0xc951c03238fe930e6e69ab9d6af9f29248a514048e44884f0e60c4de40de3526',\n     * \ts: '0x38b71399bf0c8925749ab79e91ce6cd2fc068c84c18ff6a197b48c4cbef01e00',\n     * \tto: '0x3535353535353535353535353535353535353535',\n     * \thash: '0x65e3df790ab2a32068b13cff970b26445b8995229ae4abbed61bd996f09fce69'\n     * \t}\n     * }\n     * ```\n     */\n    signTransaction(tx, passphrase) {\n        return __awaiter(this, void 0, void 0, function* () {\n            return rpcWrappers.signTransaction(this.requestManager, tx, passphrase, this.config);\n        });\n    }\n    /**\n     * Calculates an Ethereum specific signature with:\n     * sign(keccak256(\"\\x19Ethereum Signed Message:\\n\" + dataToSign.length + dataToSign)))\n     * Adding a prefix to the message makes the calculated signature recognisable as an Ethereum specific signature.\n     *\n     * If you have the original message and the signed message, you can discover the signing account address using web3.eth.personal.ecRecover\n     * **_NOTE:_** Sending your account password over an unsecured HTTP RPC connection is highly unsecure.\n     * @param data - The data to sign.\n     * @param address - The address to sign with.\n     * @param passphrase - The passphrase to decrypt the account with.\n     * @returns - The signature.\n     * @example\n     * ```ts\n     * const sig = await personal.sign(\"Hello world\", \"0x0D4Aa485ECbC499c70860fEb7e5AaeAf5fd8172E\", \"123456\")\n     * console.log(sig)\n     * > 0x5d21d01b3198ac34d0585a9d76c4d1c8123e5e06746c8962318a1c08ffb207596e6fce4a6f377b7c0fc98c5f646cd73438c80e8a1a95cbec55a84c2889dca0301b\n     * ```\n     */\n    sign(data, address, passphrase) {\n        return __awaiter(this, void 0, void 0, function* () {\n            return rpcWrappers.sign(this.requestManager, data, address, passphrase);\n        });\n    }\n    /**\n     * Recovers the account that signed the data.\n     * @param signedData - Data that was signed. If String it will be converted using {@link utf8ToHex}\n     * @param signature - The signature\n     * @returns - The address of the account that signed the data.\n     * @example\n     * ```ts\n     *  const address = await personal.ecRecover(\n     * \t\"Hello world\",\n     * \t\"0x5d21d01b3198ac34d0585a9d76c4d1c8123e5e06746c8962318a1c08ffb207596e6fce4a6f377b7c0fc98c5f646cd73438c80e8a1a95cbec55a84c2889dca0301b\"\n     * );\n     * console.log(address);\n     * > 0x0d4aa485ecbc499c70860feb7e5aaeaf5fd8172e\n     * ```\n     */\n    ecRecover(signedData, signature) {\n        return __awaiter(this, void 0, void 0, function* () {\n            return rpcWrappers.ecRecover(this.requestManager, signedData, signature);\n        });\n    }\n}\n//# sourceMappingURL=personal.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nexport var Transport;\n(function (Transport) {\n    Transport[\"HTTPS\"] = \"https\";\n    Transport[\"WebSocket\"] = \"wss\";\n})(Transport || (Transport = {}));\nexport var Network;\n(function (Network) {\n    Network[\"ETH_MAINNET\"] = \"eth_mainnet\";\n    Network[\"ETH_SEPOLIA\"] = \"eth_sepolia\";\n    Network[\"ETH_HOLESKY\"] = \"eth_holesky\";\n    Network[\"POLYGON_MAINNET\"] = \"polygon_mainnet\";\n    Network[\"POLYGON_AMOY\"] = \"polygon_amoy\";\n    Network[\"AVALANCHE_C_MAINNET\"] = \"avalanche_c_mainnet\";\n    Network[\"AVALANCHE_P_MAINNET\"] = \"avalanche_p_mainnet\";\n    Network[\"AVALANCHE_X_MAINNET\"] = \"avalanche_x_mainnet\";\n    Network[\"ARBITRUM_MAINNET\"] = \"arbitrum_mainnet\";\n    Network[\"ARBITRUM_SEPOLIA\"] = \"arbitrum_sepolia\";\n    Network[\"BASE_MAINNET\"] = \"base_mainnet\";\n    Network[\"BASE_SEPOLIA\"] = \"base_sepolia\";\n    Network[\"OPTIMISM_MAINNET\"] = \"optimism_mainnet\";\n    Network[\"OPTIMISM_SEPOLIA\"] = \"optimism_sepolia\";\n    Network[\"FANTOM_MAINNET\"] = \"fantom_mainnet\";\n    Network[\"FANTOM_TESTNET\"] = \"fantom_testnet\";\n    Network[\"DYMENSION_MAINNET\"] = \"dymension_mainnet\";\n    Network[\"DYMENSION_TESTNET\"] = \"dymension_testnet\";\n    Network[\"BNB_MAINNET\"] = \"bnb_mainnet\";\n    Network[\"BNB_TESTNET\"] = \"bnb_testnet\";\n    Network[\"BSC_MAINNET\"] = \"bsc_mainnet\";\n    Network[\"BSC_TESTNET\"] = \"bsc_testnet\";\n    Network[\"ARBITRUM_ONE\"] = \"arbitrum_one\";\n    Network[\"ARBITRUM_NOVA\"] = \"arbitrum_nova\";\n    Network[\"AVALANCHE_FUJI_C\"] = \"avalanche_fuji_c\";\n    Network[\"AVALANCHE_FUJI_P\"] = \"avalanche_fuji_p\";\n    Network[\"AVALANCHE_FUJI_X\"] = \"avalanche_fuji_x\";\n    Network[\"BLAST_MAINNET\"] = \"blast_mainnet\";\n    Network[\"OPBNB_MAINNET\"] = \"opbnb_mainnet\";\n    Network[\"OPBNB_TESTNET\"] = \"opbnb_testnet\";\n    Network[\"GNOSIS_MAINNET\"] = \"gnosis_mainnet\";\n    Network[\"GNOSIS_CHIADO\"] = \"gnosis_chiado\";\n    Network[\"PULSECHAIN_MAINNET\"] = \"pulsechain_mainnet\";\n    Network[\"PULSECHAIN_TESTNET\"] = \"pulsechain_testnet\";\n    Network[\"KAVA_MAINNET\"] = \"kava_mainnet\";\n    Network[\"CRONOS_MAINNET\"] = \"cronos_mainnet\";\n    Network[\"MANTLE_MAINNET\"] = \"mantle_mainnet\";\n    Network[\"CHILIZ_MAINNET\"] = \"chiliz_mainnet\";\n    Network[\"CHILIZ_SPICY\"] = \"chiliz_spicy\";\n    Network[\"MOONBEAM_MAINNET\"] = \"moonbeam_mainnet\";\n    Network[\"TAIKO_MAINNET\"] = \"taiko_mainnet\";\n    Network[\"TAIKO_HEKLA\"] = \"taiko_hekla\";\n    Network[\"LINEA_MAINNET\"] = \"linea_mainnet\";\n    Network[\"LINEA_SEPOLIA\"] = \"linea_sepolia\";\n    Network[\"BAHAMUT_MAINNET\"] = \"bahamut_mainnet\";\n    Network[\"SCROLL_MAINNET\"] = \"scroll_mainnet\";\n    Network[\"SCROLL_SEPOLIA\"] = \"scroll_sepolia\";\n    Network[\"TRON_MAINNET\"] = \"tron_mainnet\";\n    Network[\"SYSCOIN_MAINNET\"] = \"syscoin_mainnet\";\n    Network[\"SYSCOIN_TANENBAUM\"] = \"syscoin_tanenbaum\";\n    Network[\"MOONRIVER_MAINNET\"] = \"moonriver_mainnet\";\n    Network[\"HAQQ_MAINNET\"] = \"haqq_mainnet\";\n    Network[\"EVMOS_MAINNET\"] = \"evmos_mainnet\";\n    Network[\"EVMOS_TESTNET\"] = \"evmos_testnet\";\n    Network[\"BERACHAIN_TESTNET\"] = \"berachain_testnet\";\n})(Network || (Network = {}));\n//# sourceMappingURL=types.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\n/* eslint-disable max-classes-per-file */\nimport { BaseWeb3Error } from 'web3-errors';\nconst ERR_QUICK_NODE_RATE_LIMIT = 1300;\nexport class QuickNodeRateLimitError extends BaseWeb3Error {\n    constructor(error) {\n        super(`You've reach the rate limit of free RPC calls from our Partner Quick Nodes. There are two options you can either create a paid Quick Nodes account and get 20% off for 2 months using WEB3JS referral code, or use Free public RPC endpoint.`, error);\n        this.code = ERR_QUICK_NODE_RATE_LIMIT;\n    }\n}\nconst ERR_PROVIDER_CONFIG_OPTIONS = 1301;\nexport class ProviderConfigOptionsError extends BaseWeb3Error {\n    constructor(msg) {\n        super(`Invalid provider config options given for ${msg}`);\n        this.code = ERR_PROVIDER_CONFIG_OPTIONS;\n    }\n}\n/* eslint-enable max-classes-per-file */\n//# sourceMappingURL=errors.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\nimport HttpProvider from 'web3-providers-http';\nimport WebSocketProvider from 'web3-providers-ws';\nimport { Eip1193Provider } from 'web3-utils';\nimport { Transport } from './types.js';\nimport { ProviderConfigOptionsError } from './errors.js';\n/*\nThis class can be used to create new providers only when there is custom logic required in each Request method like\nchecking specific HTTP status codes and performing any action, throwing new error types or setting additional HTTP headers in requests, or even modifying requests.\n\nAnother simpler approach can be a function simply returning URL strings instead of using the following class in case if\nno additional logic implementation is required in the provider.\n*/\nexport class Web3ExternalProvider extends Eip1193Provider {\n    constructor(network, transport, token, host, providerConfigOptions) {\n        super();\n        if (providerConfigOptions !== undefined &&\n            transport === Transport.HTTPS &&\n            !('providerOptions' in providerConfigOptions)) {\n            throw new ProviderConfigOptionsError('HTTP Provider');\n        }\n        else if (providerConfigOptions !== undefined &&\n            transport === Transport.WebSocket &&\n            !('socketOptions' in providerConfigOptions ||\n                'reconnectOptions' in providerConfigOptions)) {\n            throw new ProviderConfigOptionsError('Websocket Provider');\n        }\n        this.transport = transport;\n        if (transport === Transport.HTTPS) {\n            this.provider = new HttpProvider(this.getRPCURL(network, transport, token, host), providerConfigOptions);\n        }\n        else if (transport === Transport.WebSocket) {\n            this.provider = new WebSocketProvider(this.getRPCURL(network, transport, token, host), providerConfigOptions === null || providerConfigOptions === void 0 ? void 0 : providerConfigOptions.socketOptions, providerConfigOptions === null || providerConfigOptions === void 0 ? void 0 : providerConfigOptions.reconnectOptions);\n        }\n    }\n    request(payload, requestOptions) {\n        return __awaiter(this, void 0, void 0, function* () {\n            if (this.transport === Transport.HTTPS) {\n                return (yield this.provider.request(payload, requestOptions));\n            }\n            return this.provider.request(payload);\n        });\n    }\n    getStatus() {\n        return this.provider.getStatus();\n    }\n    supportsSubscriptions() {\n        return this.provider.supportsSubscriptions();\n    }\n    once(_type, _listener) {\n        var _a;\n        if ((_a = this.provider) === null || _a === void 0 ? void 0 : _a.once) {\n            // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n            this.provider.once(_type, _listener);\n        }\n    }\n    removeAllListeners(_type) {\n        var _a;\n        if ((_a = this.provider) === null || _a === void 0 ? void 0 : _a.removeAllListeners)\n            this.provider.removeAllListeners(_type);\n    }\n    connect() {\n        var _a;\n        if ((_a = this.provider) === null || _a === void 0 ? void 0 : _a.connect)\n            this.provider.connect();\n    }\n    disconnect(_code, _data) {\n        var _a;\n        if ((_a = this.provider) === null || _a === void 0 ? void 0 : _a.disconnect)\n            this.provider.disconnect(_code, _data);\n    }\n    reset() {\n        var _a;\n        if ((_a = this.provider) === null || _a === void 0 ? void 0 : _a.reset)\n            this.provider.reset();\n    }\n    on(_type, _listener) {\n        if (this.provider)\n            // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n            this.provider.on(_type, _listener);\n    }\n    removeListener(_type, _listener) {\n        if (this.provider)\n            this.provider.removeListener(_type, _listener);\n    }\n}\n//# sourceMappingURL=web3_provider.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\nimport { ResponseError } from 'web3-errors';\nimport { Transport, Network } from './types.js';\nimport { Web3ExternalProvider } from './web3_provider.js';\nimport { QuickNodeRateLimitError } from './errors.js';\nconst isValid = (str) => str !== undefined && str.trim().length > 0;\nexport class QuickNodeProvider extends Web3ExternalProvider {\n    // eslint-disable-next-line default-param-last\n    constructor(network = Network.ETH_MAINNET, transport = Transport.HTTPS, token = '', host = '', providerConfigOptions) {\n        super(network, transport, token, host, providerConfigOptions);\n    }\n    request(payload, requestOptions) {\n        const _super = Object.create(null, {\n            request: { get: () => super.request }\n        });\n        return __awaiter(this, void 0, void 0, function* () {\n            try {\n                return yield _super.request.call(this, payload, requestOptions);\n            }\n            catch (error) {\n                if (error instanceof ResponseError && error.statusCode === 429) {\n                    throw new QuickNodeRateLimitError(error);\n                }\n                throw error;\n            }\n        });\n    }\n    // eslint-disable-next-line class-methods-use-this\n    getRPCURL(network, transport, _token, _host) {\n        let host = '';\n        let token = '';\n        switch (network) {\n            case Network.ETH_MAINNET:\n                host = isValid(_host) ? _host : 'powerful-holy-bush.quiknode.pro';\n                token = isValid(_token) ? _token : '3240624a343867035925ff7561eb60dfdba2a668';\n                break;\n            case Network.ETH_SEPOLIA:\n                host = isValid(_host)\n                    ? _host\n                    : 'dimensional-fabled-glitter.ethereum-sepolia.quiknode.pro';\n                token = isValid(_token) ? _token : '382a3b5a4b938f2d6e8686c19af4b22921fde2cd';\n                break;\n            case Network.ETH_HOLESKY:\n                host = isValid(_host) ? _host : 'yolo-morning-card.ethereum-holesky.quiknode.pro';\n                token = isValid(_token) ? _token : '481ebe70638c4dcf176af617a16d02ab866b9af9';\n                break;\n            case Network.ARBITRUM_MAINNET:\n                host = isValid(_host)\n                    ? _host\n                    : 'autumn-divine-dinghy.arbitrum-mainnet.quiknode.pro';\n                token = isValid(_token) ? _token : 'a5d7bfbf60b5ae9ce3628e53d69ef50d529e9a8c';\n                break;\n            case Network.ARBITRUM_SEPOLIA:\n                host = isValid(_host) ? _host : 'few-patient-pond.arbitrum-sepolia.quiknode.pro';\n                token = isValid(_token) ? _token : '3be985450970628c860b959c65cd2642dcafe53c';\n                break;\n            case Network.BNB_MAINNET:\n                host = isValid(_host) ? _host : 'purple-empty-reel.bsc.quiknode.pro';\n                token = isValid(_token) ? _token : 'ebf6c532961e21f092ff2facce1ec4c89c540158';\n                break;\n            case Network.BNB_TESTNET:\n                host = isValid(_host) ? _host : 'floral-rough-scion.bsc-testnet.quiknode.pro';\n                token = isValid(_token) ? _token : '5b297e5acff5f81f4c37ebf6f235f7299b6f9d28';\n                break;\n            case Network.POLYGON_MAINNET:\n                host = isValid(_host) ? _host : 'small-chaotic-moon.matic.quiknode.pro';\n                token = isValid(_token) ? _token : '847569f8a017e84d985e10d0f44365d965a951f1';\n                break;\n            case Network.POLYGON_AMOY:\n                host = isValid(_host) ? _host : 'prettiest-side-shape.matic-amoy.quiknode.pro';\n                token = isValid(_token) ? _token : '79a9476eea661d4f82de614db1d8a895b14b881c';\n                break;\n            default:\n                throw new Error('Network info not avalible.');\n        }\n        return `${transport}://${host}/${token}`;\n    }\n}\n//# sourceMappingURL=web3_provider_quicknode.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { Network, Transport } from './types.js';\nimport { Web3ExternalProvider } from './web3_provider.js';\nconst isValid = (str) => str !== undefined && str.trim().length > 0;\nconst websocketExclusions = [\n    Network.DYMENSION_MAINNET,\n    Network.DYMENSION_TESTNET,\n    Network.KAVA_MAINNET,\n    Network.CRONOS_MAINNET,\n    // deprecated\n    Network.POLYGON_MAINNET,\n];\nexport class PublicNodeProvider extends Web3ExternalProvider {\n    // eslint-disable-next-line default-param-last\n    constructor(network = Network.ETH_MAINNET, transport = Transport.HTTPS, host = '', providerConfigOptions) {\n        super(network, transport, '', host, providerConfigOptions);\n    }\n    // eslint-disable-next-line class-methods-use-this\n    getRPCURL(network, transport, _, _host) {\n        if (!PublicNodeProvider.networkHostMap[network]) {\n            throw new Error('Network info not avalible.');\n        }\n        const defaultHost = `${PublicNodeProvider.networkHostMap[network]}.publicnode.com`;\n        const host = isValid(_host) ? _host : defaultHost;\n        if (websocketExclusions.includes(network) && transport === Transport.WebSocket) {\n            return `${transport}://${host}/websocket`;\n        }\n        return `${transport}://${host}`;\n    }\n}\nPublicNodeProvider.networkHostMap = {\n    [Network.POLYGON_AMOY]: 'polygon-amoy-bor-rpc',\n    [Network.DYMENSION_MAINNET]: 'dymension-evm-rpc',\n    [Network.DYMENSION_TESTNET]: 'dymension-testnet-evm-rpc',\n    [Network.BLAST_MAINNET]: 'blast-rpc',\n    [Network.GNOSIS_MAINNET]: 'gnosis-rpc',\n    [Network.PULSECHAIN_MAINNET]: 'pulsechain-rpc',\n    [Network.PULSECHAIN_TESTNET]: 'pulsechain-testnet-rpc',\n    [Network.KAVA_MAINNET]: 'kava-evm-rpc',\n    [Network.CRONOS_MAINNET]: 'cronos-evm-rpc',\n    [Network.MANTLE_MAINNET]: 'mantle-rpc',\n    [Network.TAIKO_MAINNET]: 'taiko-rpc',\n    [Network.TAIKO_HEKLA]: 'taiko-hekla-rpc',\n    [Network.LINEA_MAINNET]: 'linea-rpc',\n    [Network.LINEA_SEPOLIA]: 'linea-sepolia-rpc',\n    [Network.SCROLL_MAINNET]: 'scroll-rpc',\n    [Network.SCROLL_SEPOLIA]: 'scroll-sepolia-rpc',\n    [Network.SYSCOIN_MAINNET]: 'syscoin-evm-rpc',\n    [Network.SYSCOIN_TANENBAUM]: 'syscoin-tanenbaum-evm-rpc',\n    [Network.HAQQ_MAINNET]: 'haqq-evm-rpc',\n    [Network.EVMOS_MAINNET]: 'evmos-evm-rpc',\n    [Network.EVMOS_TESTNET]: 'evmos-testnet-evm-rpc',\n    [Network.BERACHAIN_TESTNET]: 'berachain-testnet-evm-rpc',\n    [Network.ETH_MAINNET]: 'ethereum-rpc',\n    [Network.ETH_SEPOLIA]: 'ethereum-sepolia-rpc',\n    [Network.ETH_HOLESKY]: 'ethereum-holesky-rpc',\n    [Network.BSC_MAINNET]: 'bsc-rpc',\n    [Network.BSC_TESTNET]: 'bsc-testnet-rpc',\n    [Network.POLYGON_MAINNET]: 'polygon-bor-rpc',\n    [Network.BASE_MAINNET]: 'base-rpc',\n    [Network.BASE_SEPOLIA]: 'base-sepolia-rpc',\n    [Network.ARBITRUM_ONE]: 'arbitrum-one-rpc',\n    [Network.ARBITRUM_NOVA]: 'arbitrum-nova-rpc',\n    [Network.ARBITRUM_SEPOLIA]: 'arbitrum-sepolia-rpc',\n    [Network.AVALANCHE_C_MAINNET]: 'avalanche-c-chain-rpc',\n    [Network.AVALANCHE_P_MAINNET]: 'avalanche-p-chain-rpc',\n    [Network.AVALANCHE_X_MAINNET]: 'avalanche-x-chain-rpc',\n    [Network.AVALANCHE_FUJI_C]: 'avalanche-fuji-c-chain-rpc',\n    [Network.AVALANCHE_FUJI_P]: 'avalanche-fuji-p-chain-rpc',\n    [Network.AVALANCHE_FUJI_X]: 'avalanche-fuji-x-chain-rpc',\n    [Network.OPTIMISM_MAINNET]: 'optimism-rpc',\n    [Network.OPTIMISM_SEPOLIA]: 'optimism-sepolia-rpc',\n    [Network.FANTOM_MAINNET]: 'fantom-rpc',\n    [Network.FANTOM_TESTNET]: 'fantom-testnet-rpc',\n    [Network.OPBNB_MAINNET]: 'opbnb-rpc',\n    [Network.OPBNB_TESTNET]: 'opbnb-testnet-rpc',\n    [Network.GNOSIS_CHIADO]: 'gnosis-chiado-rpc',\n    [Network.CHILIZ_MAINNET]: 'chiliz-rpc',\n    [Network.CHILIZ_SPICY]: 'chiliz-spicy-rpc',\n    [Network.MOONBEAM_MAINNET]: 'moonbeam-rpc',\n    [Network.BAHAMUT_MAINNET]: 'bahamut-rpc',\n    [Network.TRON_MAINNET]: 'tron-evm-rpc',\n    [Network.MOONRIVER_MAINNET]: 'moonriver-rpc',\n};\n//# sourceMappingURL=web3_provider_publicnode.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { QuickNodeProvider } from './web3_provider_quicknode.js';\nexport * from './types.js';\nexport * from './web3_provider_quicknode.js';\nexport * from './web3_provider_publicnode.js';\nexport * from './web3_provider.js';\nexport * from './errors.js';\n// default providers\nexport const mainnet = new QuickNodeProvider();\n//# sourceMappingURL=index.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nimport { decodeLog, decodeParameter, decodeParameters, encodeEventSignature, encodeFunctionCall, encodeFunctionSignature, encodeParameter, encodeParameters, } from 'web3-eth-abi';\n/**\n * The object for `web3.abi`\n */\nexport default {\n    encodeEventSignature,\n    encodeFunctionCall,\n    encodeFunctionSignature,\n    encodeParameter,\n    encodeParameters,\n    decodeParameter,\n    decodeParameters,\n    decodeLog,\n};\n//# sourceMappingURL=abi.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\nimport { ETH_DATA_FORMAT } from 'web3-types';\nimport { format } from 'web3-utils';\nimport { prepareTransactionForSigning } from 'web3-eth';\nimport { create, decrypt, encrypt, hashMessage, privateKeyToAccount, recover, recoverTransaction, signTransaction, sign, Wallet, privateKeyToAddress, parseAndValidatePrivateKey, privateKeyToPublicKey, } from 'web3-eth-accounts';\n/**\n * Initialize the accounts module for the given context.\n *\n * To avoid multiple package dependencies for `web3-eth-accounts` we are creating\n * this function in `web3` package. In future the actual `web3-eth-accounts` package\n * should be converted to context aware.\n */\nexport const initAccountsForContext = (context) => {\n    const signTransactionWithContext = (transaction, privateKey) => __awaiter(void 0, void 0, void 0, function* () {\n        const tx = yield prepareTransactionForSigning(transaction, context);\n        const privateKeyBytes = format({ format: 'bytes' }, privateKey, ETH_DATA_FORMAT);\n        return signTransaction(tx, privateKeyBytes);\n    });\n    const privateKeyToAccountWithContext = (privateKey) => {\n        const account = privateKeyToAccount(privateKey);\n        return Object.assign(Object.assign({}, account), { signTransaction: (transaction) => __awaiter(void 0, void 0, void 0, function* () { return signTransactionWithContext(transaction, account.privateKey); }) });\n    };\n    const decryptWithContext = (keystore, password, options) => __awaiter(void 0, void 0, void 0, function* () {\n        var _a;\n        const account = yield decrypt(keystore, password, (_a = options === null || options === void 0 ? void 0 : options.nonStrict) !== null && _a !== void 0 ? _a : true);\n        return Object.assign(Object.assign({}, account), { signTransaction: (transaction) => __awaiter(void 0, void 0, void 0, function* () { return signTransactionWithContext(transaction, account.privateKey); }) });\n    });\n    const createWithContext = () => {\n        const account = create();\n        return Object.assign(Object.assign({}, account), { signTransaction: (transaction) => __awaiter(void 0, void 0, void 0, function* () { return signTransactionWithContext(transaction, account.privateKey); }) });\n    };\n    const wallet = new Wallet({\n        create: createWithContext,\n        privateKeyToAccount: privateKeyToAccountWithContext,\n        decrypt: decryptWithContext,\n    });\n    return {\n        signTransaction: signTransactionWithContext,\n        create: createWithContext,\n        privateKeyToAccount: privateKeyToAccountWithContext,\n        decrypt: decryptWithContext,\n        recoverTransaction,\n        hashMessage,\n        sign,\n        recover,\n        encrypt,\n        wallet,\n        privateKeyToAddress,\n        parseAndValidatePrivateKey,\n        privateKeyToPublicKey,\n    };\n};\n//# sourceMappingURL=accounts.js.map","/* eslint-disable header/header */ export const Web3PkgInfo = { version: '4.16.0' };\n//# sourceMappingURL=version.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\nexport var Eip6963EventName;\n(function (Eip6963EventName) {\n    Eip6963EventName[\"eip6963announceProvider\"] = \"eip6963:announceProvider\";\n    Eip6963EventName[\"eip6963requestProvider\"] = \"eip6963:requestProvider\";\n})(Eip6963EventName || (Eip6963EventName = {}));\nexport const eip6963ProvidersMap = new Map();\nexport const web3ProvidersMapUpdated = 'web3:providersMapUpdated';\nexport const requestEIP6963Providers = () => __awaiter(void 0, void 0, void 0, function* () {\n    return new Promise((resolve, reject) => {\n        if (typeof window === 'undefined') {\n            reject(new Error('window object not available, EIP-6963 is intended to be used within a browser'));\n        }\n        window.addEventListener(Eip6963EventName.eip6963announceProvider, ((event) => {\n            eip6963ProvidersMap.set(event.detail.info.uuid, event.detail);\n            const newEvent = new CustomEvent(web3ProvidersMapUpdated, { detail: eip6963ProvidersMap });\n            window.dispatchEvent(newEvent);\n            resolve(eip6963ProvidersMap);\n        }));\n        window.dispatchEvent(new Event(Eip6963EventName.eip6963requestProvider));\n    });\n});\nexport const onNewProviderDiscovered = (callback) => {\n    if (typeof window === 'undefined') {\n        throw new Error('window object not available, EIP-6963 is intended to be used within a browser');\n    }\n    window.addEventListener(web3ProvidersMapUpdated, callback);\n};\n//# sourceMappingURL=web3_eip6963.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n*/\n// eslint-disable-next-line max-classes-per-file\nimport { Web3Context, isSupportedProvider, } from 'web3-core';\nimport { Web3Eth, registeredSubscriptions } from 'web3-eth';\nimport Contract from 'web3-eth-contract';\nimport { ENS, registryAddresses } from 'web3-eth-ens';\nimport { Iban } from 'web3-eth-iban';\nimport { Personal } from 'web3-eth-personal';\nimport { Net } from 'web3-net';\nimport * as utils from 'web3-utils';\nimport { isNullish, isDataFormat, isContractInitOptions } from 'web3-utils';\nimport { mainnet } from 'web3-rpc-providers';\nimport { InvalidMethodParamsError } from 'web3-errors';\nimport abi from './abi.js';\nimport { initAccountsForContext } from './accounts.js';\nimport { Web3PkgInfo } from './version.js';\nimport { onNewProviderDiscovered, requestEIP6963Providers } from './web3_eip6963.js';\nexport class Web3 extends Web3Context {\n    constructor(providerOrContext = mainnet) {\n        var _a;\n        if (isNullish(providerOrContext) ||\n            (typeof providerOrContext === 'string' && providerOrContext.trim() === '') ||\n            (typeof providerOrContext !== 'string' &&\n                !isSupportedProvider(providerOrContext) &&\n                !providerOrContext.provider)) {\n            console.warn('NOTE: web3.js is running without provider. You need to pass a provider in order to interact with the network!');\n        }\n        let contextInitOptions = {};\n        if (typeof providerOrContext === 'string' ||\n            isSupportedProvider(providerOrContext)) {\n            contextInitOptions.provider = providerOrContext;\n        }\n        else if (providerOrContext) {\n            contextInitOptions = providerOrContext;\n        }\n        else {\n            contextInitOptions = {};\n        }\n        contextInitOptions.registeredSubscriptions = Object.assign(Object.assign({}, registeredSubscriptions), ((_a = contextInitOptions.registeredSubscriptions) !== null && _a !== void 0 ? _a : {}));\n        super(contextInitOptions);\n        const accounts = initAccountsForContext(this);\n        // Init protected properties\n        this._wallet = accounts.wallet;\n        this._accountProvider = accounts;\n        this.utils = utils;\n        // Have to use local alias to initiate contract context\n        // eslint-disable-next-line @typescript-eslint/no-this-alias\n        const self = this;\n        class ContractBuilder extends Contract {\n            constructor(jsonInterface, addressOrOptionsOrContext, optionsOrContextOrReturnFormat, contextOrReturnFormat, returnFormat) {\n                if (isContractInitOptions(addressOrOptionsOrContext) &&\n                    isContractInitOptions(optionsOrContextOrReturnFormat)) {\n                    throw new InvalidMethodParamsError('Should not provide options at both 2nd and 3rd parameters');\n                }\n                let address;\n                let options = {};\n                let context;\n                let dataFormat;\n                // add validation so its not a breaking change\n                if (!isNullish(addressOrOptionsOrContext) &&\n                    typeof addressOrOptionsOrContext !== 'object' &&\n                    typeof addressOrOptionsOrContext !== 'string') {\n                    throw new InvalidMethodParamsError();\n                }\n                if (typeof addressOrOptionsOrContext === 'string') {\n                    address = addressOrOptionsOrContext;\n                }\n                if (isContractInitOptions(addressOrOptionsOrContext)) {\n                    options = addressOrOptionsOrContext;\n                }\n                else if (isContractInitOptions(optionsOrContextOrReturnFormat)) {\n                    options = optionsOrContextOrReturnFormat;\n                }\n                else {\n                    options = {};\n                }\n                if (addressOrOptionsOrContext instanceof Web3Context) {\n                    context = addressOrOptionsOrContext;\n                }\n                else if (optionsOrContextOrReturnFormat instanceof Web3Context) {\n                    context = optionsOrContextOrReturnFormat;\n                }\n                else if (contextOrReturnFormat instanceof Web3Context) {\n                    context = contextOrReturnFormat;\n                }\n                else {\n                    context = self.getContextObject();\n                }\n                if (returnFormat) {\n                    dataFormat = returnFormat;\n                }\n                else if (isDataFormat(optionsOrContextOrReturnFormat)) {\n                    dataFormat = optionsOrContextOrReturnFormat;\n                }\n                else if (isDataFormat(contextOrReturnFormat)) {\n                    dataFormat = contextOrReturnFormat;\n                }\n                super(jsonInterface, address, options, context, dataFormat);\n                super.subscribeToContextEvents(self);\n                // eslint-disable-next-line no-use-before-define\n                if (!isNullish(eth)) {\n                    // eslint-disable-next-line no-use-before-define\n                    const TxMiddleware = eth.getTransactionMiddleware();\n                    if (!isNullish(TxMiddleware)) {\n                        super.setTransactionMiddleware(TxMiddleware);\n                    }\n                }\n            }\n        }\n        const eth = self.use(Web3Eth);\n        // Eth Module\n        this.eth = Object.assign(eth, {\n            // ENS module\n            ens: self.use(ENS, registryAddresses.main), // registry address defaults to main network\n            // Iban helpers\n            Iban,\n            net: self.use(Net),\n            personal: self.use(Personal),\n            // Contract helper and module\n            Contract: ContractBuilder,\n            // ABI Helpers\n            abi,\n            // Accounts helper\n            accounts,\n        });\n    }\n}\nWeb3.version = Web3PkgInfo.version;\nWeb3.utils = utils;\nWeb3.requestEIP6963Providers = requestEIP6963Providers;\nWeb3.onNewProviderDiscovered = onNewProviderDiscovered;\nWeb3.modules = {\n    Web3Eth,\n    Iban,\n    Net,\n    ENS,\n    Personal,\n};\nexport default Web3;\n//# sourceMappingURL=web3.js.map","import { Web3 } from 'web3';\nimport { DimoConstants } from '../../constants';\nimport { DimoEnvironment } from '../../environments';\n\nexport const signChallenge = async(input: { message: string, private_key: string }, env: keyof typeof DimoEnvironment) => {\n    const web3 = new Web3(DimoConstants[env].RPC_provider);\n    const formatted_key = '0x' + Buffer.from(input.private_key, 'utf8');\n    const response = web3.eth.accounts.sign(input.message, formatted_key);\n    return response.signature;\n}","import axios from 'axios';\nimport * as functionIndex from '../api/functions/';\nimport { DimoEnvironment } from '../environments';\nimport { DimoError } from '../errors';\n\nexport const Method = async(resource: any, baseUrl: any, params: any = {}, env: keyof typeof DimoEnvironment) => {\n    /**\n     * Headers\n     */\n\n    let headers: Record<string, string> = {};\n    if (['developer_jwt', 'vehicle_jwt'].includes(resource.auth)) {\n        if (params.headers.Authorization) {\n            headers = params.headers;\n        } else {\n            throw new DimoError({\n                message: `Access token not provided for ${resource.auth} authentication`,\n                statusCode: 401\n            });\n        }\n    }\n\n    if (resource.headers) {\n        headers = { ...headers, ...resource.headers }\n    }\n\n    // If resource.method is 'FUNCTION', call the function defined by 'resource.path'\n    if (resource.method === 'FUNCTION') {\n        const functionName = resource.path; \n        const dynamicFunction = (functionIndex as Record<string, Function>)[functionName];\n        if (typeof dynamicFunction === 'function') {\n            // Call the dynamic function with params and pass the necessary arguments\n            return dynamicFunction(params, env);\n        } else {\n            throw new DimoError({\n                message: `Function in ${resource.path} is not a valid function.`,\n                statusCode: 400\n            });\n        }\n    }\n    \n    /**\n     * Query Parameters\n     * Extract required queryParams from the resource object\n     */ \n\n    const queryParams = resource.queryParams || {};\n    // Check if required queryParams match with incoming params\n    for (const key in queryParams) {\n        // We'll fail early if there's a missing required query param from the user\n        if (queryParams[key] === true && !params[key]) {\n            console.error(`Missing required query parameter: ${key}`);\n            throw new DimoError({\n                message: `Missing required query parameter: ${key}`,\n                statusCode: 400\n            });\n        }\n        if (queryParams[key][0] === '$') {\n            const variableKey = queryParams[key].substring(1); // Remove the leading $\n            if (params[variableKey]) {\n                params[key] = params[variableKey]; // Set the value based on the value of the variable key\n            } else {\n                console.error(`Variable key '${variableKey}' not found in params`);\n                throw new DimoError({\n                    message: `Variable key '${variableKey}' not found in params`,\n                    statusCode: 400\n                });\n            }\n        } else if (typeof queryParams[key] === 'string') {\n            params[key] = queryParams[key];\n        }\n    }\n\n    /**\n     * URL Parameters\n     * Check for placeholders in the resource path and replace them with values from params\n     */ \n\n    let url = baseUrl + resource.path;\n\n    const placeholderRegex = /:([\\w]+)/g;\n    let match;\n    while ((match = placeholderRegex.exec(resource.path)) !== null) {\n        const key = match[1];\n        const value = params[key];\n        if (value !== undefined) {\n            url = url.replace(match[0], value.toString());\n        }\n    }\n    \n    /**\n     * Body Parameters\n     */\n\n    let body: Record<string, string> = {};\n\n    if (resource.body) {\n        for (const key in resource.body) {\n            if (typeof resource.body[key] === 'boolean') {\n                if (!params[key]) {\n                    console.error(`Missing required body parameter: ${key}`);\n                    throw new DimoError({\n                        message: `Missing required body parameter: ${key}`\n                    });\n                } else {\n                    body[key] = params[key];\n                }\n            } else if (typeof resource.body[key] === 'string') {\n                body[key] = resource.body[key];\n            }\n        }\n    }\n\n    try {\n        const response = await axios({\n            method: resource.method,\n            url: url,\n            params: resource.queryParams ? params : {},\n            data: resource.body ? body : '',\n            headers: headers\n        });\n\n        // Return response.data directly if resource.return does not exist\n        if (!resource.return) {\n            return response.data; \n        }\n    \n        // Special returns for different JWTs\n        let authHeader = {};\n    \n        if (resource.return === 'developer_jwt') {\n            authHeader = { Authorization: `Bearer ${response.data.access_token}` };\n        } else if (resource.return === 'vehicle_jwt') {\n            authHeader = { Authorization: `Bearer ${response.data.token}` };\n        }\n    \n        return { headers: authHeader };\n    } catch (error: any) {\n        console.error('API call error:', error.response.data);\n        throw new DimoError({\n            message: `API call error: ${error.response.data.message}`,\n            statusCode: error.response.data.code,\n            body: error.response.data\n        });\n    }\n}","/** @format */\n\nimport { Method } from './Method';\nimport { DimoEnvironment } from '../environments';\nimport { ResourceMap } from './types/Endpoint';\n\nexport class Resource<TApi = string> {\n\t[key: string]: any;\n\tpublic api: TApi;\n\tpublic resourceName: string;\n\tpublic env: keyof typeof DimoEnvironment;\n\n\tconstructor(\n\t\tapi: TApi,\n\t\tresourceName: string,\n\t\tenv: keyof typeof DimoEnvironment,\n\t) {\n\t\tthis.api = api;\n\t\tthis.resourceName = resourceName;\n\t\tthis.env = env;\n\t}\n\n\tprotected setResource<T extends ResourceMap>(resources: T): void {\n\t\tObject.keys(resources).forEach((key) => {\n\t\t\tthis[key] = (params: any = {}) =>\n\t\t\t\tMethod(resources[key], this.api, params, this.env);\n\t\t});\n\t}\n}\n","import { Resource } from '../../Resource';\nimport { DimoEnvironment } from '../../../environments';\n\nexport class Attestation extends Resource {\n\n    constructor(api: any, env: keyof typeof DimoEnvironment) {\n        super(api, 'Attestation', env);\n        this.setResource({\n            createVinVC: {\n                method: 'POST',\n                path: '/v2/attestation/vin/:tokenId',\n                auth: 'vehicle_jwt'\n            },\n            createOdometerStatementVC: {\n                method: 'POST',\n                path: '/v2/attestation/odometer-statement/:tokenId',\n                auth: 'vehicle_jwt',\n                body: {\n                    'timestamp': false  // Optional parameter\n                }\n            },\n            createVehicleHealthVC: {\n                method: 'POST',\n                path: '/v2/attestation/vehicle-health/:tokenId',\n                auth: 'vehicle_jwt',\n                body: {\n                    'startTime': true,  // Required parameter\n                    'endTime': true     // Required parameter\n                }\n            },\n            createVehiclePositionVC: {\n                method: 'POST',\n                path: '/v2/attestation/vehicle-position/:tokenId',\n                auth: 'vehicle_jwt',\n                body: {\n                    'timestamp': true   // Required parameter\n                }\n            }\n        })\n    }\n}\n","import { Resource } from '../../Resource';\nimport { DimoEnvironment } from '../../../environments';\n\nexport class Auth extends Resource {\n\n    constructor(api: any, env: keyof typeof DimoEnvironment) {\n        super(api, 'Auth', env);\n        this.setResource({\n            generateChallenge: {\n                method: 'POST',\n                path: '/auth/web3/generate_challenge',\n                queryParams: {\n                    'client_id': true,\n                    'domain': true,\n                    'scope': 'openid email',\n                    'response_type': 'code',\n                    'address': '$client_id'\n                }\n            },\n            signChallenge: {\n                method: 'FUNCTION',\n                path: 'signChallenge'\n            },\n            submitChallenge: {\n                method: 'POST',\n                path: '/auth/web3/submit_challenge',\n                body: {\n                    'client_id': true,\n                    'domain': true,\n                    'grant_type': 'authorization_code',\n                    'state': true,\n                    'signature': true\n                },\n                headers: {\n                    'content-type': 'application/x-www-form-urlencoded'\n                },\n                return: 'developer_jwt'\n            },\n            getDeveloperJwt: {\n                method: 'FUNCTION',\n                path: 'getDeveloperJwt'\n            }\n        })\n    }\n        \n}","import { Resource } from '../../Resource';\nimport { DimoEnvironment } from '../../../environments';\n\nexport class DeviceDefinitions extends Resource {\n\n    constructor(api: any, env: keyof typeof DimoEnvironment) {\n        super(api, 'DeviceDefinitions', env);\n        this.setResource({\n            decodeVin: {\n                method: 'POST',\n                path: '/device-definitions/decode-vin',\n                body: {\n                    countryCode: true,\n                    vin: true\n                },\n                auth: 'developer_jwt'\n            },\n            search: {\n                method: 'GET',\n                path: '/device-definitions/search',\n                queryParams: {\n                    query: true,\n                    makeSlug: false,\n                    modelSlug: false,\n                    year: false,\n                    page: false,\n                    pageSize: false\n                }\n            }\n        })\n    }\n        \n}","import { Resource } from '../../Resource';\nimport { DimoEnvironment } from '../../../environments';\n\nexport class Devices extends Resource {\n\n    constructor(api: any, env: keyof typeof DimoEnvironment) {\n        super(api, 'Devices', env);\n        this.setResource({\n        })\n    }\n}","import { Resource } from '../../Resource';\nimport { DimoConstants } from '../../../constants';\nimport { DimoEnvironment } from '../../../environments';\n\nexport class TokenExchange extends Resource {\n\n    constructor(api: any, env: keyof typeof DimoEnvironment) {\n        super(api, 'TokenExchange', env);\n        this.setResource({\n            exchange: {\n                method: 'POST',\n                path: '/v1/tokens/exchange',\n                body: {\n                    nftContractAddress: DimoConstants[env].NFT_address,\n                    privileges: true,\n                    tokenId: true\n                },\n                auth: 'developer_jwt',\n                return: 'vehicle_jwt'\n            },\n            getVehicleJwt: {\n                method: 'FUNCTION',\n                path: 'getVehicleJwt'\n            }\n        })\n    }\n}","import { Resource } from '../../Resource';\nimport { DimoEnvironment } from '../../../environments';\n\nexport class Trips extends Resource {\n\n    constructor(api: any, env: keyof typeof DimoEnvironment) {\n        super(api, 'Trips', env);\n        this.setResource({\n            list: {\n                method: 'GET',\n                path: '/v1/vehicle/:tokenId/trips',\n                queryParams: {\n                    page: false\n                },\n                auth: 'vehicle_jwt'\n            }\n        })\n    }\n}","import { Resource } from '../../Resource';\nimport { DimoEnvironment } from '../../../environments';\n\nexport class Valuations extends Resource {\n\n    constructor(api: any, env: keyof typeof DimoEnvironment) {\n        super(api, 'Valuations', env);\n        this.setResource({\n            getValuations: {\n                method: 'GET',\n                path: '/v2/vehicles/:tokenId/valuations',\n                auth: 'vehicle_jwt'\n            },\n            getInstantOffers: {\n                method: 'GET',\n                path: '/v2/vehicles/:tokenId/instant-offer',\n                auth: 'vehicle_jwt'\n            },\n            getOffers: {\n                method: 'GET',\n                path: '/v2/vehicles/:tokenId/offers',\n                auth: 'vehicle_jwt'\n            }\n        })\n    }\n}","/** @format */\n\nimport { Resource } from '../../Resource';\nimport { DimoEnvironment } from '../../../environments';\n\nclass VehicleTriggers extends Resource {\n\tconstructor(api: any, env: keyof typeof DimoEnvironment) {\n\t\tsuper(api, 'VehicleTriggers', env);\n\t\tthis.setResource({\n\t\t\tlistWebhooks: {\n\t\t\t\tmethod: 'GET',\n\t\t\t\tpath: '/v1/webhooks',\n\t\t\t\tauth: 'developer_jwt',\n\t\t\t},\n\t\t\tcreateWebhook: {\n\t\t\t\tmethod: 'POST',\n\t\t\t\tpath: '/v1/webhooks',\n\t\t\t\tbody: {\n\t\t\t\t\tservice: true,\n\t\t\t\t\tmetricName: true,\n\t\t\t\t\tcondition: true,\n\t\t\t\t\tcoolDownPeriod: true,\n\t\t\t\t\tdescription: false,\n\t\t\t\t\ttargetURL: true,\n\t\t\t\t\tstatus: true,\n\t\t\t\t\tverificationToken: true,\n\t\t\t\t\tdisplayName: false\n\t\t\t\t},\n\t\t\t\tauth: 'developer_jwt',\n\t\t\t},\n\t\t\tupdateWebhook: {\n\t\t\t\tmethod: 'PUT',\n\t\t\t\tpath: '/v1/webhooks/:webhookId',\n\t\t\t\tbody: {\n\t\t\t\t\trequest: true\n\t\t\t\t},\n\t\t\t\tauth: 'developer_jwt',\n\t\t\t},\n\t\t\tdeleteWebhook: {\n\t\t\t\tmethod: 'DELETE',\n\t\t\t\tpath: '/v1/webhooks/:webhookId',\n\t\t\t\tauth: 'developer_jwt',\n\t\t\t},\n\t\t\tgetWebhookSignalNames: {\n\t\t\t\tmethod: 'GET',\n\t\t\t\tpath: '/v1/webhooks/signals',\n\t\t\t\tauth: 'developer_jwt',\n\t\t\t},\n\t\t\tlistSubscribedVehicles: {\n\t\t\t\tmethod: 'GET',\n\t\t\t\tpath: '/v1/webhooks/:webhookId',\n\t\t\t\tauth: 'developer_jwt',\n\t\t\t},\n\t\t\tlistVehicleSubscriptions: {\n\t\t\t\tmethod: 'GET',\n\t\t\t\tpath: '/v1/webhooks/vehicles/:tokenDID',\n\t\t\t\tauth: 'developer_jwt',\n\t\t\t},\n\t\t\tsubscribeVehicle: {\n\t\t\t\tmethod: 'POST',\n\t\t\t\tpath: '/v1/webhooks/:webhookId/subscribe/:tokenDID',\n\t\t\t\tauth: 'developer_jwt',\n\t\t\t},\n\t\t\tsubscribeAllVehicles: {\n\t\t\t\tmethod: 'POST',\n\t\t\t\tpath: '/v1/webhooks/:webhookId/subscribe/all',\n\t\t\t\tauth: 'developer_jwt',\n\t\t\t},\n\t\t\tunsubscribeVehicle: {\n\t\t\t\tmethod: 'DELETE',\n\t\t\t\tpath: '/v1/webhooks/:webhookId/unsubscribe/:tokenDID',\n\t\t\t\tauth: 'developer_jwt',\n\t\t\t},\n\t\t\tunsubscribeAllVehicles: {\n\t\t\t\tmethod: 'DELETE',\n\t\t\t\tpath: '/v1/webhooks/:webhookId/unsubscribe/all',\n\t\t\t\tauth: 'developer_jwt',\n\t\t\t},\n\t\t});\n\t}\n}\n\nexport { VehicleTriggers };\n"]}