6499 lines
3.3 MiB
JavaScript
Raw Normal View History

2023-10-02 23:05:37 +00:00
/*
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
* This devtool is neither made for production nor for readable output files.
* It uses "eval()" calls to create a separate source file in the browser devtools.
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
* or disable the default devtool with "devtool: false".
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
*/
/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({
/***/ "./index.js":
/*!******************!*\
!*** ./index.js ***!
\******************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _waku_sdk__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @waku/sdk */ \"./node_modules/@waku/sdk/dist/index.js\");\n/* harmony import */ var _libp2p_websockets__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/websockets */ \"./node_modules/@libp2p/websockets/dist/src/index.js\");\n/* harmony import */ var _libp2p_websockets_filters__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @libp2p/websockets/filters */ \"./node_modules/@libp2p/websockets/dist/src/filters.js\");\n/* harmony import */ var _libp2p_webrtc__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @libp2p/webrtc */ \"./node_modules/@libp2p/webrtc/dist/src/index.js\");\n/* harmony import */ var libp2p_circuit_relay__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! libp2p/circuit-relay */ \"./node_modules/libp2p/dist/src/circuit-relay/index.js\");\n\n\n\n\n\n\n\n\nconst CONTENT_TOPIC = \"/toy-chat/2/huilong/proto\";\n\nconst ui = initUI();\nrunApp(ui).catch((err) => {\n console.error(err);\n ui.setStatus(`error: ${err.message}`, \"error\");\n});\n\nasync function runApp(ui) {\n const {\n info,\n sendMessage,\n unsubscribeFromMessages,\n dial,\n dialWebRTCpeer,\n dropNetworkConnections,\n ensureWebRTCconnectionInRelayMesh,\n } = await initWakuContext({\n ui,\n contentTopic: CONTENT_TOPIC,\n });\n\n ui.setLocalPeer(info.localPeerId);\n ui.setContentTopic(info.contentTopic);\n\n ui.onSendMessage(sendMessage);\n ui.onRemoteNodeConnect(dial);\n ui.onWebrtcConnect(dialWebRTCpeer);\n ui.onRelayWebRTC(ensureWebRTCconnectionInRelayMesh);\n ui.onDropNonWebRTC(dropNetworkConnections);\n\n ui.onExit(async () => {\n ui.setStatus(\"disconnecting...\", \"progress\");\n await unsubscribeFromMessages();\n ui.setStatus(\"disconnected\", \"terminated\");\n ui.resetMessages();\n });\n}\n\nasync function initWakuContext({ ui, contentTopic }) {\n const Decoder = (0,_waku_sdk__WEBPACK_IMPORTED_MODULE_0__.createDecoder)(contentTopic);\n const Encoder = (0,_waku_sdk__WEBPACK_IMPORTED_MODULE_0__.createEncoder)({ contentTopic });\n\n const ChatMessage = new protobuf.Type(\"ChatMessage\")\n .add(new protobuf.Field(\"timestamp\", 1, \"uint64\"))\n .add(new protobuf.Field(\"nick\", 2, \"string\"))\n .add(new protobuf.Field(\"text\", 3, \"bytes\"));\n\n ui.setStatus(\"starting...\", \"progress\");\n\n const node = await (0,_waku_sdk__WEBPACK_IMPORTED_MODULE_0__.createRelayNode)({\n libp2p: {\n addresses: {\n listen: [\"/webrtc\"],\n },\n connectionGater: {\n denyDialMultiaddr: () => {\n // refuse to deny localhost addresses\n return false;\n },\n },\n transports: [\n (0,_libp2p_webrtc__WEBPACK_IMPORTED_MODULE_3__.webRTC)({}),\n (0,libp2p_circuit_relay__WEBPACK_IMPORTED_MODULE_4__.circuitRelayTransport)({\n discoverRelays: 1,\n }),\n (0,_libp2p_websockets__WEBPACK_IMPORTED_MODULE_1__.webSockets)({ filter: _libp2p_websockets_filters__WEBPACK_IMPORTED_MODULE_2__.all }),\n ],\n },\n });\n\n await node.start();\n\n // Set a filter by using Decoder for a given ContentTopic\n const unsubscribeFromMessages = await node.relay.subscribe(\n [Decoder],\n (wakuMessage) => {\n const messageObj = ChatMessage.decode(wakuMessage.payload);\n ui.renderMessage({\n ...messageObj,\n text: (0,_waku_sdk__WEBPACK_IMPORTED_MODULE_0__.bytesToUtf8)(messageObj.text),\n });\n }\n );\n\n ui.setStatus(\"started\", \"success\");\n\n const localPeerId = node.libp2p.peerId.toString();\n\n const remotePeers = await node.libp2p.peerStore.all();\n const remotePeerIds = new Set(remotePeers.map((peer) => peer.id.toString()));\n\n ui.setRemotePeer(Array.from(remotePeerIds.keys()));\n\n node.libp2p.addEventListener(\"peer:connect\", async (event) => {\n remotePeerIds.add(event.detail.toString());\n ui.setRemotePeer(Array.from(remotePeerIds.keys()));\n ui.setRelayMeshInfo(node.relay.gossipS
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/minimal.js":
/*!*************************************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/minimal.js ***!
\*************************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
eval("// minimal library entry point.\n\n\nmodule.exports = __webpack_require__(/*! ./src/index-minimal */ \"./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/src/index-minimal.js\");\n\n\n//# sourceURL=webpack://light/./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/minimal.js?");
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/src/index-minimal.js":
/*!***********************************************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/src/index-minimal.js ***!
\***********************************************************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
eval("\nvar protobuf = exports;\n\n/**\n * Build type, one of `\"full\"`, `\"light\"` or `\"minimal\"`.\n * @name build\n * @type {string}\n * @const\n */\nprotobuf.build = \"minimal\";\n\n// Serialization\nprotobuf.Writer = __webpack_require__(/*! ./writer */ \"./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/src/writer.js\");\nprotobuf.BufferWriter = __webpack_require__(/*! ./writer_buffer */ \"./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/src/writer_buffer.js\");\nprotobuf.Reader = __webpack_require__(/*! ./reader */ \"./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/src/reader.js\");\nprotobuf.BufferReader = __webpack_require__(/*! ./reader_buffer */ \"./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/src/reader_buffer.js\");\n\n// Utility\nprotobuf.util = __webpack_require__(/*! ./util/minimal */ \"./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/src/util/minimal.js\");\nprotobuf.rpc = __webpack_require__(/*! ./rpc */ \"./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/src/rpc.js\");\nprotobuf.roots = __webpack_require__(/*! ./roots */ \"./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/src/roots.js\");\nprotobuf.configure = configure;\n\n/* istanbul ignore next */\n/**\n * Reconfigures the library according to the environment.\n * @returns {undefined}\n */\nfunction configure() {\n protobuf.util._configure();\n protobuf.Writer._configure(protobuf.BufferWriter);\n protobuf.Reader._configure(protobuf.BufferReader);\n}\n\n// Set up buffer utility according to the environment\nconfigure();\n\n\n//# sourceURL=webpack://light/./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/src/index-minimal.js?");
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/src/reader.js":
/*!****************************************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/src/reader.js ***!
\****************************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
eval("\nmodule.exports = Reader;\n\nvar util = __webpack_require__(/*! ./util/minimal */ \"./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/src/util/minimal.js\");\n\nvar BufferReader; // cyclic\n\nvar LongBits = util.LongBits,\n utf8 = util.utf8;\n\n/* istanbul ignore next */\nfunction indexOutOfRange(reader, writeLength) {\n return RangeError(\"index out of range: \" + reader.pos + \" + \" + (writeLength || 1) + \" > \" + reader.len);\n}\n\n/**\n * Constructs a new reader instance using the specified buffer.\n * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n * @param {Uint8Array} buffer Buffer to read from\n */\nfunction Reader(buffer) {\n\n /**\n * Read buffer.\n * @type {Uint8Array}\n */\n this.buf = buffer;\n\n /**\n * Read buffer position.\n * @type {number}\n */\n this.pos = 0;\n\n /**\n * Read buffer length.\n * @type {number}\n */\n this.len = buffer.length;\n}\n\nvar create_array = typeof Uint8Array !== \"undefined\"\n ? function create_typed_array(buffer) {\n if (buffer instanceof Uint8Array || Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n }\n /* istanbul ignore next */\n : function create_array(buffer) {\n if (Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n };\n\nvar create = function create() {\n return util.Buffer\n ? function create_buffer_setup(buffer) {\n return (Reader.create = function create_buffer(buffer) {\n return util.Buffer.isBuffer(buffer)\n ? new BufferReader(buffer)\n /* istanbul ignore next */\n : create_array(buffer);\n })(buffer);\n }\n /* istanbul ignore next */\n : create_array;\n};\n\n/**\n * Creates a new reader using the specified buffer.\n * @function\n * @param {Uint8Array|Buffer} buffer Buffer to read from\n * @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}\n * @throws {Error} If `buffer` is not a valid buffer\n */\nReader.create = create();\n\nReader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ util.Array.prototype.slice;\n\n/**\n * Reads a varint as an unsigned 32 bit value.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.uint32 = (function read_uint32_setup() {\n var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!)\n return function read_uint32() {\n value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value;\n\n /* istanbul ignore if */\n if ((this.pos += 5) > this.len) {\n this.pos = this.len;\n throw indexOutOfRange(this, 10);\n }\n return value;\n };\n})();\n\n/**\n * Reads a varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.int32 = function read_int32() {\n return this.uint32() | 0;\n};\n\n/**\n * Reads a zig-zag encoded varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.sint32 = function read_sint32() {\n var value = this.uint32();\n return value >>> 1 ^ -(value & 1) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readLongVarint() {\n // tends to deopt with local vars for octet etc.\n var bits = new LongBits(0, 0);\n var i = 0;\n if (this.len - this.pos > 4) { // fast
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/src/reader_buffer.js":
/*!***********************************************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/src/reader_buffer.js ***!
\***********************************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
eval("\nmodule.exports = BufferReader;\n\n// extends Reader\nvar Reader = __webpack_require__(/*! ./reader */ \"./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/src/reader.js\");\n(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader;\n\nvar util = __webpack_require__(/*! ./util/minimal */ \"./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/src/util/minimal.js\");\n\n/**\n * Constructs a new buffer reader instance.\n * @classdesc Wire format reader using node buffers.\n * @extends Reader\n * @constructor\n * @param {Buffer} buffer Buffer to read from\n */\nfunction BufferReader(buffer) {\n Reader.call(this, buffer);\n\n /**\n * Read buffer.\n * @name BufferReader#buf\n * @type {Buffer}\n */\n}\n\nBufferReader._configure = function () {\n /* istanbul ignore else */\n if (util.Buffer)\n BufferReader.prototype._slice = util.Buffer.prototype.slice;\n};\n\n\n/**\n * @override\n */\nBufferReader.prototype.string = function read_string_buffer() {\n var len = this.uint32(); // modifies pos\n return this.buf.utf8Slice\n ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len))\n : this.buf.toString(\"utf-8\", this.pos, this.pos = Math.min(this.pos + len, this.len));\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @name BufferReader#bytes\n * @function\n * @returns {Buffer} Value read\n */\n\nBufferReader._configure();\n\n\n//# sourceURL=webpack://light/./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/src/reader_buffer.js?");
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/src/roots.js":
/*!***************************************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/src/roots.js ***!
\***************************************************************************************/
/***/ ((module) => {
"use strict";
eval("\nmodule.exports = {};\n\n/**\n * Named roots.\n * This is where pbjs stores generated structures (the option `-r, --root` specifies a name).\n * Can also be used manually to make roots available accross modules.\n * @name roots\n * @type {Object.<string,Root>}\n * @example\n * // pbjs -r myroot -o compiled.js ...\n *\n * // in another module:\n * require(\"./compiled.js\");\n *\n * // in any subsequent module:\n * var root = protobuf.roots[\"myroot\"];\n */\n\n\n//# sourceURL=webpack://light/./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/src/roots.js?");
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/src/rpc.js":
/*!*************************************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/src/rpc.js ***!
\*************************************************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
eval("\n\n/**\n * Streaming RPC helpers.\n * @namespace\n */\nvar rpc = exports;\n\n/**\n * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets.\n * @typedef RPCImpl\n * @type {function}\n * @param {Method|rpc.ServiceMethod<Message<{}>,Message<{}>>} method Reflected or static method being called\n * @param {Uint8Array} requestData Request data\n * @param {RPCImplCallback} callback Callback function\n * @returns {undefined}\n * @example\n * function rpcImpl(method, requestData, callback) {\n * if (protobuf.util.lcFirst(method.name) !== \"myMethod\") // compatible with static code\n * throw Error(\"no such method\");\n * asynchronouslyObtainAResponse(requestData, function(err, responseData) {\n * callback(err, responseData);\n * });\n * }\n */\n\n/**\n * Node-style callback as used by {@link RPCImpl}.\n * @typedef RPCImplCallback\n * @type {function}\n * @param {Error|null} error Error, if any, otherwise `null`\n * @param {Uint8Array|null} [response] Response data or `null` to signal end of stream, if there hasn't been an error\n * @returns {undefined}\n */\n\nrpc.Service = __webpack_require__(/*! ./rpc/service */ \"./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/src/rpc/service.js\");\n\n\n//# sourceURL=webpack://light/./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/src/rpc.js?");
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/src/rpc/service.js":
/*!*********************************************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/src/rpc/service.js ***!
\*********************************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
eval("\nmodule.exports = Service;\n\nvar util = __webpack_require__(/*! ../util/minimal */ \"./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/src/util/minimal.js\");\n\n// Extends EventEmitter\n(Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service;\n\n/**\n * A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}.\n *\n * Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`.\n * @typedef rpc.ServiceMethodCallback\n * @template TRes extends Message<TRes>\n * @type {function}\n * @param {Error|null} error Error, if any\n * @param {TRes} [response] Response message\n * @returns {undefined}\n */\n\n/**\n * A service method part of a {@link rpc.Service} as created by {@link Service.create}.\n * @typedef rpc.ServiceMethod\n * @template TReq extends Message<TReq>\n * @template TRes extends Message<TRes>\n * @type {function}\n * @param {TReq|Properties<TReq>} request Request message or plain object\n * @param {rpc.ServiceMethodCallback<TRes>} [callback] Node-style callback called with the error, if any, and the response message\n * @returns {Promise<Message<TRes>>} Promise if `callback` has been omitted, otherwise `undefined`\n */\n\n/**\n * Constructs a new RPC service instance.\n * @classdesc An RPC service as returned by {@link Service#create}.\n * @exports rpc.Service\n * @extends util.EventEmitter\n * @constructor\n * @param {RPCImpl} rpcImpl RPC implementation\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\n */\nfunction Service(rpcImpl, requestDelimited, responseDelimited) {\n\n if (typeof rpcImpl !== \"function\")\n throw TypeError(\"rpcImpl must be a function\");\n\n util.EventEmitter.call(this);\n\n /**\n * RPC implementation. Becomes `null` once the service is ended.\n * @type {RPCImpl|null}\n */\n this.rpcImpl = rpcImpl;\n\n /**\n * Whether requests are length-delimited.\n * @type {boolean}\n */\n this.requestDelimited = Boolean(requestDelimited);\n\n /**\n * Whether responses are length-delimited.\n * @type {boolean}\n */\n this.responseDelimited = Boolean(responseDelimited);\n}\n\n/**\n * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}.\n * @param {Method|rpc.ServiceMethod<TReq,TRes>} method Reflected or static method\n * @param {Constructor<TReq>} requestCtor Request constructor\n * @param {Constructor<TRes>} responseCtor Response constructor\n * @param {TReq|Properties<TReq>} request Request message or plain object\n * @param {rpc.ServiceMethodCallback<TRes>} callback Service callback\n * @returns {undefined}\n * @template TReq extends Message<TReq>\n * @template TRes extends Message<TRes>\n */\nService.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) {\n\n if (!request)\n throw TypeError(\"request must be specified\");\n\n var self = this;\n if (!callback)\n return util.asPromise(rpcCall, self, method, requestCtor, responseCtor, request);\n\n if (!self.rpcImpl) {\n setTimeout(function() { callback(Error(\"already ended\")); }, 0);\n return undefined;\n }\n\n try {\n return self.rpcImpl(\n method,\n requestCtor[self.requestDelimited ? \"encodeDelimited\" : \"encode\"](request).finish(),\n function rpcCallback(err, response) {\n\n if (err) {\n self.emit(\"error\", err, method);\n return callback(err);\n }\n\n if (response === null) {\n self.end(/* endedByRPC */ true);\n return undefined;\n }\n\n if (!(response instanceof responseCtor)) {\n try {\n response = responseCtor[self.responseDelimited ? \"decodeDelimited\" : \"decode\"](response);\n
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/src/util/longbits.js":
/*!***********************************************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/src/util/longbits.js ***!
\***********************************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
eval("\nmodule.exports = LongBits;\n\nvar util = __webpack_require__(/*! ../util/minimal */ \"./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/src/util/minimal.js\");\n\n/**\n * Constructs new long bits.\n * @classdesc Helper class for working with the low and high bits of a 64 bit value.\n * @memberof util\n * @constructor\n * @param {number} lo Low 32 bits, unsigned\n * @param {number} hi High 32 bits, unsigned\n */\nfunction LongBits(lo, hi) {\n\n // note that the casts below are theoretically unnecessary as of today, but older statically\n // generated converter code might still call the ctor with signed 32bits. kept for compat.\n\n /**\n * Low bits.\n * @type {number}\n */\n this.lo = lo >>> 0;\n\n /**\n * High bits.\n * @type {number}\n */\n this.hi = hi >>> 0;\n}\n\n/**\n * Zero bits.\n * @memberof util.LongBits\n * @type {util.LongBits}\n */\nvar zero = LongBits.zero = new LongBits(0, 0);\n\nzero.toNumber = function() { return 0; };\nzero.zzEncode = zero.zzDecode = function() { return this; };\nzero.length = function() { return 1; };\n\n/**\n * Zero hash.\n * @memberof util.LongBits\n * @type {string}\n */\nvar zeroHash = LongBits.zeroHash = \"\\0\\0\\0\\0\\0\\0\\0\\0\";\n\n/**\n * Constructs new long bits from the specified number.\n * @param {number} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.fromNumber = function fromNumber(value) {\n if (value === 0)\n return zero;\n var sign = value < 0;\n if (sign)\n value = -value;\n var lo = value >>> 0,\n hi = (value - lo) / 4294967296 >>> 0;\n if (sign) {\n hi = ~hi >>> 0;\n lo = ~lo >>> 0;\n if (++lo > 4294967295) {\n lo = 0;\n if (++hi > 4294967295)\n hi = 0;\n }\n }\n return new LongBits(lo, hi);\n};\n\n/**\n * Constructs new long bits from a number, long or string.\n * @param {Long|number|string} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.from = function from(value) {\n if (typeof value === \"number\")\n return LongBits.fromNumber(value);\n if (util.isString(value)) {\n /* istanbul ignore else */\n if (util.Long)\n value = util.Long.fromString(value);\n else\n return LongBits.fromNumber(parseInt(value, 10));\n }\n return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;\n};\n\n/**\n * Converts this long bits to a possibly unsafe JavaScript number.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {number} Possibly unsafe number\n */\nLongBits.prototype.toNumber = function toNumber(unsigned) {\n if (!unsigned && this.hi >>> 31) {\n var lo = ~this.lo + 1 >>> 0,\n hi = ~this.hi >>> 0;\n if (!lo)\n hi = hi + 1 >>> 0;\n return -(lo + hi * 4294967296);\n }\n return this.lo + this.hi * 4294967296;\n};\n\n/**\n * Converts this long bits to a long.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {Long} Long\n */\nLongBits.prototype.toLong = function toLong(unsigned) {\n return util.Long\n ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned))\n /* istanbul ignore next */\n : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };\n};\n\nvar charCodeAt = String.prototype.charCodeAt;\n\n/**\n * Constructs new long bits from the specified 8 characters long hash.\n * @param {string} hash Hash\n * @returns {util.LongBits} Bits\n */\nLongBits.fromHash = function fromHash(hash) {\n if (hash === zeroHash)\n return zero;\n return new LongBits(\n ( charCodeAt.call(hash, 0)\n | charCodeAt.call(hash, 1) << 8\n | charCodeAt.call(hash, 2) << 16\n | charCodeAt.call(hash, 3) << 24) >>> 0\n ,\n ( charCodeAt.call(hash, 4)\n | charCodeAt.call(hash, 5) << 8\n | charCodeAt.call(hash, 6) << 16\n | charCodeAt.call(hash, 7) << 24) >>> 0\n );\n};\n\n/**\n * Converts this long
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/src/util/minimal.js":
/*!**********************************************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/src/util/minimal.js ***!
\**********************************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
eval("\nvar util = exports;\n\n// used to return a Promise where callback is omitted\nutil.asPromise = __webpack_require__(/*! @protobufjs/aspromise */ \"./node_modules/@protobufjs/aspromise/index.js\");\n\n// converts to / from base64 encoded strings\nutil.base64 = __webpack_require__(/*! @protobufjs/base64 */ \"./node_modules/@protobufjs/base64/index.js\");\n\n// base class of rpc.Service\nutil.EventEmitter = __webpack_require__(/*! @protobufjs/eventemitter */ \"./node_modules/@protobufjs/eventemitter/index.js\");\n\n// float handling accross browsers\nutil.float = __webpack_require__(/*! @protobufjs/float */ \"./node_modules/@protobufjs/float/index.js\");\n\n// requires modules optionally and hides the call from bundlers\nutil.inquire = __webpack_require__(/*! @protobufjs/inquire */ \"./node_modules/@protobufjs/inquire/index.js\");\n\n// converts to / from utf8 encoded strings\nutil.utf8 = __webpack_require__(/*! @protobufjs/utf8 */ \"./node_modules/@protobufjs/utf8/index.js\");\n\n// provides a node-like buffer pool in the browser\nutil.pool = __webpack_require__(/*! @protobufjs/pool */ \"./node_modules/@protobufjs/pool/index.js\");\n\n// utility to work with the low and high bits of a 64 bit value\nutil.LongBits = __webpack_require__(/*! ./longbits */ \"./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/src/util/longbits.js\");\n\n/**\n * Whether running within node or not.\n * @memberof util\n * @type {boolean}\n */\nutil.isNode = Boolean(typeof __webpack_require__.g !== \"undefined\"\n && __webpack_require__.g\n && __webpack_require__.g.process\n && __webpack_require__.g.process.versions\n && __webpack_require__.g.process.versions.node);\n\n/**\n * Global object reference.\n * @memberof util\n * @type {Object}\n */\nutil.global = util.isNode && __webpack_require__.g\n || typeof window !== \"undefined\" && window\n || typeof self !== \"undefined\" && self\n || this; // eslint-disable-line no-invalid-this\n\n/**\n * An immuable empty array.\n * @memberof util\n * @type {Array.<*>}\n * @const\n */\nutil.emptyArray = Object.freeze ? Object.freeze([]) : /* istanbul ignore next */ []; // used on prototypes\n\n/**\n * An immutable empty object.\n * @type {Object}\n * @const\n */\nutil.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next */ {}; // used on prototypes\n\n/**\n * Tests if the specified value is an integer.\n * @function\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is an integer\n */\nutil.isInteger = Number.isInteger || /* istanbul ignore next */ function isInteger(value) {\n return typeof value === \"number\" && isFinite(value) && Math.floor(value) === value;\n};\n\n/**\n * Tests if the specified value is a string.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a string\n */\nutil.isString = function isString(value) {\n return typeof value === \"string\" || value instanceof String;\n};\n\n/**\n * Tests if the specified value is a non-null object.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a non-null object\n */\nutil.isObject = function isObject(value) {\n return value && typeof value === \"object\";\n};\n\n/**\n * Checks if a property on a message is considered to be present.\n * This is an alias of {@link util.isSet}.\n * @function\n * @param {Object} obj Plain object or message instance\n * @param {string} prop Property name\n * @returns {boolean} `true` if considered to be present, otherwise `false`\n */\nutil.isset =\n\n/**\n * Checks if a property on a message is considered to be present.\n * @param {Object} obj Plain object or message instance\n * @param {string} prop Property name\n * @returns {boolean} `true` if considered to be present, otherwise `false`\n */\nutil.isSet = function isSet(obj, prop) {\n var value = obj[prop];\n if (value != null && obj.hasOwnProperty(prop)) // eslint-disable-line eqeqeq, no-prototype-builtins\n return
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/src/writer.js":
/*!****************************************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/src/writer.js ***!
\****************************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
eval("\nmodule.exports = Writer;\n\nvar util = __webpack_require__(/*! ./util/minimal */ \"./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/src/util/minimal.js\");\n\nvar BufferWriter; // cyclic\n\nvar LongBits = util.LongBits,\n base64 = util.base64,\n utf8 = util.utf8;\n\n/**\n * Constructs a new writer operation instance.\n * @classdesc Scheduled writer operation.\n * @constructor\n * @param {function(*, Uint8Array, number)} fn Function to call\n * @param {number} len Value byte length\n * @param {*} val Value to write\n * @ignore\n */\nfunction Op(fn, len, val) {\n\n /**\n * Function to call.\n * @type {function(Uint8Array, number, *)}\n */\n this.fn = fn;\n\n /**\n * Value byte length.\n * @type {number}\n */\n this.len = len;\n\n /**\n * Next operation.\n * @type {Writer.Op|undefined}\n */\n this.next = undefined;\n\n /**\n * Value to write.\n * @type {*}\n */\n this.val = val; // type varies\n}\n\n/* istanbul ignore next */\nfunction noop() {} // eslint-disable-line no-empty-function\n\n/**\n * Constructs a new writer state instance.\n * @classdesc Copied writer state.\n * @memberof Writer\n * @constructor\n * @param {Writer} writer Writer to copy state from\n * @ignore\n */\nfunction State(writer) {\n\n /**\n * Current head.\n * @type {Writer.Op}\n */\n this.head = writer.head;\n\n /**\n * Current tail.\n * @type {Writer.Op}\n */\n this.tail = writer.tail;\n\n /**\n * Current buffer length.\n * @type {number}\n */\n this.len = writer.len;\n\n /**\n * Next state.\n * @type {State|null}\n */\n this.next = writer.states;\n}\n\n/**\n * Constructs a new writer instance.\n * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n */\nfunction Writer() {\n\n /**\n * Current length.\n * @type {number}\n */\n this.len = 0;\n\n /**\n * Operations head.\n * @type {Object}\n */\n this.head = new Op(noop, 0, 0);\n\n /**\n * Operations tail\n * @type {Object}\n */\n this.tail = this.head;\n\n /**\n * Linked forked states.\n * @type {Object|null}\n */\n this.states = null;\n\n // When a value is written, the writer calculates its byte length and puts it into a linked\n // list of operations to perform when finish() is called. This both allows us to allocate\n // buffers of the exact required size and reduces the amount of work we have to do compared\n // to first calculating over objects and then encoding over objects. In our case, the encoding\n // part is just a linked list walk calling operations with already prepared values.\n}\n\nvar create = function create() {\n return util.Buffer\n ? function create_buffer_setup() {\n return (Writer.create = function create_buffer() {\n return new BufferWriter();\n })();\n }\n /* istanbul ignore next */\n : function create_array() {\n return new Writer();\n };\n};\n\n/**\n * Creates a new writer.\n * @function\n * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer}\n */\nWriter.create = create();\n\n/**\n * Allocates a buffer of the specified size.\n * @param {number} size Buffer size\n * @returns {Uint8Array} Buffer\n */\nWriter.alloc = function alloc(size) {\n return new util.Array(size);\n};\n\n// Use Uint8Array buffer pool in the browser, just like node does with buffers\n/* istanbul ignore else */\nif (util.Array !== Array)\n Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);\n\n/**\n * Pushes a new operation to the queue.\n * @param {function(Uint8Array, number, *)} fn Function to call\n * @param {number} len Value byte length\n * @param {number} val Value to write\n * @returns {Writer} `this`\n * @private\n */\nWriter.prototype._push = function push(fn, len, val) {\n this.tail = this.tail.next = new Op
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/src/writer_buffer.js":
/*!***********************************************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/src/writer_buffer.js ***!
\***********************************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
eval("\nmodule.exports = BufferWriter;\n\n// extends Writer\nvar Writer = __webpack_require__(/*! ./writer */ \"./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/src/writer.js\");\n(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter;\n\nvar util = __webpack_require__(/*! ./util/minimal */ \"./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/src/util/minimal.js\");\n\n/**\n * Constructs a new buffer writer instance.\n * @classdesc Wire format writer using node buffers.\n * @extends Writer\n * @constructor\n */\nfunction BufferWriter() {\n Writer.call(this);\n}\n\nBufferWriter._configure = function () {\n /**\n * Allocates a buffer of the specified size.\n * @function\n * @param {number} size Buffer size\n * @returns {Buffer} Buffer\n */\n BufferWriter.alloc = util._Buffer_allocUnsafe;\n\n BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === \"set\"\n ? function writeBytesBuffer_set(val, buf, pos) {\n buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited)\n // also works for plain array values\n }\n /* istanbul ignore next */\n : function writeBytesBuffer_copy(val, buf, pos) {\n if (val.copy) // Buffer values\n val.copy(buf, pos, 0, val.length);\n else for (var i = 0; i < val.length;) // plain array values\n buf[pos++] = val[i++];\n };\n};\n\n\n/**\n * @override\n */\nBufferWriter.prototype.bytes = function write_bytes_buffer(value) {\n if (util.isString(value))\n value = util._Buffer_from(value, \"base64\");\n var len = value.length >>> 0;\n this.uint32(len);\n if (len)\n this._push(BufferWriter.writeBytesBuffer, len, value);\n return this;\n};\n\nfunction writeStringBuffer(val, buf, pos) {\n if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions)\n util.utf8.write(val, buf, pos);\n else if (buf.utf8Write)\n buf.utf8Write(val, pos);\n else\n buf.write(val, pos);\n}\n\n/**\n * @override\n */\nBufferWriter.prototype.string = function write_string_buffer(value) {\n var len = util.Buffer.byteLength(value);\n this.uint32(len);\n if (len)\n this._push(writeStringBuffer, len, value);\n return this;\n};\n\n\n/**\n * Finishes the write operation.\n * @name BufferWriter#finish\n * @function\n * @returns {Buffer} Finished buffer\n */\n\nBufferWriter._configure();\n\n\n//# sourceURL=webpack://light/./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/src/writer_buffer.js?");
/***/ }),
/***/ "./node_modules/@ethersproject/bytes/lib.esm/_version.js":
/*!***************************************************************!*\
!*** ./node_modules/@ethersproject/bytes/lib.esm/_version.js ***!
\***************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ version: () => (/* binding */ version)\n/* harmony export */ });\nconst version = \"bytes/5.7.0\";\n//# sourceMappingURL=_version.js.map\n\n//# sourceURL=webpack://light/./node_modules/@ethersproject/bytes/lib.esm/_version.js?");
/***/ }),
/***/ "./node_modules/@ethersproject/bytes/lib.esm/index.js":
/*!************************************************************!*\
!*** ./node_modules/@ethersproject/bytes/lib.esm/index.js ***!
\************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ arrayify: () => (/* binding */ arrayify),\n/* harmony export */ concat: () => (/* binding */ concat),\n/* harmony export */ hexConcat: () => (/* binding */ hexConcat),\n/* harmony export */ hexDataLength: () => (/* binding */ hexDataLength),\n/* harmony export */ hexDataSlice: () => (/* binding */ hexDataSlice),\n/* harmony export */ hexStripZeros: () => (/* binding */ hexStripZeros),\n/* harmony export */ hexValue: () => (/* binding */ hexValue),\n/* harmony export */ hexZeroPad: () => (/* binding */ hexZeroPad),\n/* harmony export */ hexlify: () => (/* binding */ hexlify),\n/* harmony export */ isBytes: () => (/* binding */ isBytes),\n/* harmony export */ isBytesLike: () => (/* binding */ isBytesLike),\n/* harmony export */ isHexString: () => (/* binding */ isHexString),\n/* harmony export */ joinSignature: () => (/* binding */ joinSignature),\n/* harmony export */ splitSignature: () => (/* binding */ splitSignature),\n/* harmony export */ stripZeros: () => (/* binding */ stripZeros),\n/* harmony export */ zeroPad: () => (/* binding */ zeroPad)\n/* harmony export */ });\n/* harmony import */ var _ethersproject_logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ethersproject/logger */ \"./node_modules/@ethersproject/logger/lib.esm/index.js\");\n/* harmony import */ var _version__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_version */ \"./node_modules/@ethersproject/bytes/lib.esm/_version.js\");\n\n\n\nconst logger = new _ethersproject_logger__WEBPACK_IMPORTED_MODULE_0__.Logger(_version__WEBPACK_IMPORTED_MODULE_1__.version);\n///////////////////////////////\nfunction isHexable(value) {\n return !!(value.toHexString);\n}\nfunction addSlice(array) {\n if (array.slice) {\n return array;\n }\n array.slice = function () {\n const args = Array.prototype.slice.call(arguments);\n return addSlice(new Uint8Array(Array.prototype.slice.apply(array, args)));\n };\n return array;\n}\nfunction isBytesLike(value) {\n return ((isHexString(value) && !(value.length % 2)) || isBytes(value));\n}\nfunction isInteger(value) {\n return (typeof (value) === \"number\" && value == value && (value % 1) === 0);\n}\nfunction isBytes(value) {\n if (value == null) {\n return false;\n }\n if (value.constructor === Uint8Array) {\n return true;\n }\n if (typeof (value) === \"string\") {\n return false;\n }\n if (!isInteger(value.length) || value.length < 0) {\n return false;\n }\n for (let i = 0; i < value.length; i++) {\n const v = value[i];\n if (!isInteger(v) || v < 0 || v >= 256) {\n return false;\n }\n }\n return true;\n}\nfunction arrayify(value, options) {\n if (!options) {\n options = {};\n }\n if (typeof (value) === \"number\") {\n logger.checkSafeUint53(value, \"invalid arrayify value\");\n const result = [];\n while (value) {\n result.unshift(value & 0xff);\n value = parseInt(String(value / 256));\n }\n if (result.length === 0) {\n result.push(0);\n }\n return addSlice(new Uint8Array(result));\n }\n if (options.allowMissingPrefix && typeof (value) === \"string\" && value.substring(0, 2) !== \"0x\") {\n value = \"0x\" + value;\n }\n if (isHexable(value)) {\n value = value.toHexString();\n }\n if (isHexString(value)) {\n let hex = value.substring(2);\n if (hex.length % 2) {\n if (options.hexPad === \"left\") {\n hex = \"0\" + hex;\n }\n else if (options.hexPad === \"right\") {\n hex += \"0\";\n }\n else {\n logger.throwArgumentError(\"hex data is odd-length\", \"value\", value);\n }\n }\n const result = [];\n for (let i = 0; i < hex.length; i += 2)
/***/ }),
/***/ "./node_modules/@ethersproject/logger/lib.esm/_version.js":
/*!****************************************************************!*\
!*** ./node_modules/@ethersproject/logger/lib.esm/_version.js ***!
\****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ version: () => (/* binding */ version)\n/* harmony export */ });\nconst version = \"logger/5.7.0\";\n//# sourceMappingURL=_version.js.map\n\n//# sourceURL=webpack://light/./node_modules/@ethersproject/logger/lib.esm/_version.js?");
/***/ }),
/***/ "./node_modules/@ethersproject/logger/lib.esm/index.js":
/*!*************************************************************!*\
!*** ./node_modules/@ethersproject/logger/lib.esm/index.js ***!
\*************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ErrorCode: () => (/* binding */ ErrorCode),\n/* harmony export */ LogLevel: () => (/* binding */ LogLevel),\n/* harmony export */ Logger: () => (/* binding */ Logger)\n/* harmony export */ });\n/* harmony import */ var _version__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_version */ \"./node_modules/@ethersproject/logger/lib.esm/_version.js\");\n\nlet _permanentCensorErrors = false;\nlet _censorErrors = false;\nconst LogLevels = { debug: 1, \"default\": 2, info: 2, warning: 3, error: 4, off: 5 };\nlet _logLevel = LogLevels[\"default\"];\n\nlet _globalLogger = null;\nfunction _checkNormalize() {\n try {\n const missing = [];\n // Make sure all forms of normalization are supported\n [\"NFD\", \"NFC\", \"NFKD\", \"NFKC\"].forEach((form) => {\n try {\n if (\"test\".normalize(form) !== \"test\") {\n throw new Error(\"bad normalize\");\n }\n ;\n }\n catch (error) {\n missing.push(form);\n }\n });\n if (missing.length) {\n throw new Error(\"missing \" + missing.join(\", \"));\n }\n if (String.fromCharCode(0xe9).normalize(\"NFD\") !== String.fromCharCode(0x65, 0x0301)) {\n throw new Error(\"broken implementation\");\n }\n }\n catch (error) {\n return error.message;\n }\n return null;\n}\nconst _normalizeError = _checkNormalize();\nvar LogLevel;\n(function (LogLevel) {\n LogLevel[\"DEBUG\"] = \"DEBUG\";\n LogLevel[\"INFO\"] = \"INFO\";\n LogLevel[\"WARNING\"] = \"WARNING\";\n LogLevel[\"ERROR\"] = \"ERROR\";\n LogLevel[\"OFF\"] = \"OFF\";\n})(LogLevel || (LogLevel = {}));\nvar ErrorCode;\n(function (ErrorCode) {\n ///////////////////\n // Generic Errors\n // Unknown Error\n ErrorCode[\"UNKNOWN_ERROR\"] = \"UNKNOWN_ERROR\";\n // Not Implemented\n ErrorCode[\"NOT_IMPLEMENTED\"] = \"NOT_IMPLEMENTED\";\n // Unsupported Operation\n // - operation\n ErrorCode[\"UNSUPPORTED_OPERATION\"] = \"UNSUPPORTED_OPERATION\";\n // Network Error (i.e. Ethereum Network, such as an invalid chain ID)\n // - event (\"noNetwork\" is not re-thrown in provider.ready; otherwise thrown)\n ErrorCode[\"NETWORK_ERROR\"] = \"NETWORK_ERROR\";\n // Some sort of bad response from the server\n ErrorCode[\"SERVER_ERROR\"] = \"SERVER_ERROR\";\n // Timeout\n ErrorCode[\"TIMEOUT\"] = \"TIMEOUT\";\n ///////////////////\n // Operational Errors\n // Buffer Overrun\n ErrorCode[\"BUFFER_OVERRUN\"] = \"BUFFER_OVERRUN\";\n // Numeric Fault\n // - operation: the operation being executed\n // - fault: the reason this faulted\n ErrorCode[\"NUMERIC_FAULT\"] = \"NUMERIC_FAULT\";\n ///////////////////\n // Argument Errors\n // Missing new operator to an object\n // - name: The name of the class\n ErrorCode[\"MISSING_NEW\"] = \"MISSING_NEW\";\n // Invalid argument (e.g. value is incompatible with type) to a function:\n // - argument: The argument name that was invalid\n // - value: The value of the argument\n ErrorCode[\"INVALID_ARGUMENT\"] = \"INVALID_ARGUMENT\";\n // Missing argument to a function:\n // - count: The number of arguments received\n // - expectedCount: The number of arguments expected\n ErrorCode[\"MISSING_ARGUMENT\"] = \"MISSING_ARGUMENT\";\n // Too many arguments\n // - count: The number of arguments received\n // - expectedCount: The number of arguments expected\n ErrorCode[\"UNEXPECTED_ARGUMENT\"] = \"UNEXPECTED_ARGUMENT\";\n ///////////////////\n // Blockchain Errors\n // Call exception\n // - transaction: the transaction\n // - address?: the contract address\n // - args?: The arguments passed into the function\n // - method?: The Solidity method signature\n // - errorSignature?: The EIP848 error signa
/***/ }),
/***/ "./node_modules/@ethersproject/rlp/lib.esm/_version.js":
/*!*************************************************************!*\
!*** ./node_modules/@ethersproject/rlp/lib.esm/_version.js ***!
\*************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ version: () => (/* binding */ version)\n/* harmony export */ });\nconst version = \"rlp/5.7.0\";\n//# sourceMappingURL=_version.js.map\n\n//# sourceURL=webpack://light/./node_modules/@ethersproject/rlp/lib.esm/_version.js?");
/***/ }),
/***/ "./node_modules/@ethersproject/rlp/lib.esm/index.js":
/*!**********************************************************!*\
!*** ./node_modules/@ethersproject/rlp/lib.esm/index.js ***!
\**********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ decode: () => (/* binding */ decode),\n/* harmony export */ encode: () => (/* binding */ encode)\n/* harmony export */ });\n/* harmony import */ var _ethersproject_bytes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @ethersproject/bytes */ \"./node_modules/@ethersproject/bytes/lib.esm/index.js\");\n/* harmony import */ var _ethersproject_logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ethersproject/logger */ \"./node_modules/@ethersproject/logger/lib.esm/index.js\");\n/* harmony import */ var _version__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_version */ \"./node_modules/@ethersproject/rlp/lib.esm/_version.js\");\n\n//See: https://github.com/ethereum/wiki/wiki/RLP\n\n\n\nconst logger = new _ethersproject_logger__WEBPACK_IMPORTED_MODULE_0__.Logger(_version__WEBPACK_IMPORTED_MODULE_1__.version);\nfunction arrayifyInteger(value) {\n const result = [];\n while (value) {\n result.unshift(value & 0xff);\n value >>= 8;\n }\n return result;\n}\nfunction unarrayifyInteger(data, offset, length) {\n let result = 0;\n for (let i = 0; i < length; i++) {\n result = (result * 256) + data[offset + i];\n }\n return result;\n}\nfunction _encode(object) {\n if (Array.isArray(object)) {\n let payload = [];\n object.forEach(function (child) {\n payload = payload.concat(_encode(child));\n });\n if (payload.length <= 55) {\n payload.unshift(0xc0 + payload.length);\n return payload;\n }\n const length = arrayifyInteger(payload.length);\n length.unshift(0xf7 + length.length);\n return length.concat(payload);\n }\n if (!(0,_ethersproject_bytes__WEBPACK_IMPORTED_MODULE_2__.isBytesLike)(object)) {\n logger.throwArgumentError(\"RLP object must be BytesLike\", \"object\", object);\n }\n const data = Array.prototype.slice.call((0,_ethersproject_bytes__WEBPACK_IMPORTED_MODULE_2__.arrayify)(object));\n if (data.length === 1 && data[0] <= 0x7f) {\n return data;\n }\n else if (data.length <= 55) {\n data.unshift(0x80 + data.length);\n return data;\n }\n const length = arrayifyInteger(data.length);\n length.unshift(0xb7 + length.length);\n return length.concat(data);\n}\nfunction encode(object) {\n return (0,_ethersproject_bytes__WEBPACK_IMPORTED_MODULE_2__.hexlify)(_encode(object));\n}\nfunction _decodeChildren(data, offset, childOffset, length) {\n const result = [];\n while (childOffset < offset + 1 + length) {\n const decoded = _decode(data, childOffset);\n result.push(decoded.result);\n childOffset += decoded.consumed;\n if (childOffset > offset + 1 + length) {\n logger.throwError(\"child data too short\", _ethersproject_logger__WEBPACK_IMPORTED_MODULE_0__.Logger.errors.BUFFER_OVERRUN, {});\n }\n }\n return { consumed: (1 + length), result: result };\n}\n// returns { consumed: number, result: Object }\nfunction _decode(data, offset) {\n if (data.length === 0) {\n logger.throwError(\"data too short\", _ethersproject_logger__WEBPACK_IMPORTED_MODULE_0__.Logger.errors.BUFFER_OVERRUN, {});\n }\n // Array with extra length prefix\n if (data[offset] >= 0xf8) {\n const lengthLength = data[offset] - 0xf7;\n if (offset + 1 + lengthLength > data.length) {\n logger.throwError(\"data short segment too short\", _ethersproject_logger__WEBPACK_IMPORTED_MODULE_0__.Logger.errors.BUFFER_OVERRUN, {});\n }\n const length = unarrayifyInteger(data, offset + 1, lengthLength);\n if (offset + 1 + lengthLength + length > data.length) {\n logger.throwError(\"data long segment too short\", _ethersproject_logger__WEBPACK_IMPORTED_MODULE_0__.Logger.errors.BUFFER_OVERRUN, {});\n }\n return _decodeChildren(data, offset, offset + 1 + lengthLength, lengthLength +
/***/ }),
/***/ "./node_modules/@multiformats/base-x/src/index.js":
/*!********************************************************!*\
!*** ./node_modules/@multiformats/base-x/src/index.js ***!
\********************************************************/
/***/ ((module) => {
"use strict";
eval("\n// base-x encoding / decoding\n// Copyright (c) 2018 base-x contributors\n// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)\n// Distributed under the MIT software license, see the accompanying\n// file LICENSE or http://www.opensource.org/licenses/mit-license.php.\nfunction base (ALPHABET) {\n if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }\n var BASE_MAP = new Uint8Array(256)\n for (var j = 0; j < BASE_MAP.length; j++) {\n BASE_MAP[j] = 255\n }\n for (var i = 0; i < ALPHABET.length; i++) {\n var x = ALPHABET.charAt(i)\n var xc = x.charCodeAt(0)\n if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') }\n BASE_MAP[xc] = i\n }\n var BASE = ALPHABET.length\n var LEADER = ALPHABET.charAt(0)\n var FACTOR = Math.log(BASE) / Math.log(256) // log(BASE) / log(256), rounded up\n var iFACTOR = Math.log(256) / Math.log(BASE) // log(256) / log(BASE), rounded up\n function encode (source) {\n if (source instanceof Uint8Array) {\n } else if (ArrayBuffer.isView(source)) {\n source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength)\n } else if (Array.isArray(source)) {\n source = Uint8Array.from(source)\n }\n if (!(source instanceof Uint8Array)) { throw new TypeError('Expected Uint8Array') }\n if (source.length === 0) { return '' }\n // Skip & count leading zeroes.\n var zeroes = 0\n var length = 0\n var pbegin = 0\n var pend = source.length\n while (pbegin !== pend && source[pbegin] === 0) {\n pbegin++\n zeroes++\n }\n // Allocate enough space in big-endian base58 representation.\n var size = ((pend - pbegin) * iFACTOR + 1) >>> 0\n var b58 = new Uint8Array(size)\n // Process the bytes.\n while (pbegin !== pend) {\n var carry = source[pbegin]\n // Apply \"b58 = b58 * 256 + ch\".\n var i = 0\n for (var it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {\n carry += (256 * b58[it1]) >>> 0\n b58[it1] = (carry % BASE) >>> 0\n carry = (carry / BASE) >>> 0\n }\n if (carry !== 0) { throw new Error('Non-zero carry') }\n length = i\n pbegin++\n }\n // Skip leading zeroes in base58 result.\n var it2 = size - length\n while (it2 !== size && b58[it2] === 0) {\n it2++\n }\n // Translate the result into a string.\n var str = LEADER.repeat(zeroes)\n for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]) }\n return str\n }\n function decodeUnsafe (source) {\n if (typeof source !== 'string') { throw new TypeError('Expected String') }\n if (source.length === 0) { return new Uint8Array() }\n var psz = 0\n // Skip leading spaces.\n if (source[psz] === ' ') { return }\n // Skip and count leading '1's.\n var zeroes = 0\n var length = 0\n while (source[psz] === LEADER) {\n zeroes++\n psz++\n }\n // Allocate enough space in big-endian base256 representation.\n var size = (((source.length - psz) * FACTOR) + 1) >>> 0 // log(58) / log(256), rounded up.\n var b256 = new Uint8Array(size)\n // Process the characters.\n while (source[psz]) {\n // Decode character\n var carry = BASE_MAP[source.charCodeAt(psz)]\n // Invalid character\n if (carry === 255) { return }\n var i = 0\n for (var it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {\n carry += (BASE * b256[it3]) >>> 0\n b256[it3] = (carry % 256) >>> 0\n carry = (carry / 256) >>> 0\n }\n if (carry !== 0) { throw new Error('Non-zero carry') }\n length = i\n psz++\n }\n // Skip trailing spaces.\n if (source[psz] === ' ') { return }\n // Skip leading zeroes in b256.\n var it4 = size - length\n while (it4 !== size && b256[it4] === 0) {\n it4++\n }\n var vch = new Uint8Array(zeroes + (size - it4))\n var j = zeroes\n while (it4 !== size) {\n vch[j++] = b256[it4++]\n }\
/***/ }),
/***/ "./node_modules/@protobufjs/aspromise/index.js":
/*!*****************************************************!*\
!*** ./node_modules/@protobufjs/aspromise/index.js ***!
\*****************************************************/
/***/ ((module) => {
"use strict";
eval("\r\nmodule.exports = asPromise;\r\n\r\n/**\r\n * Callback as used by {@link util.asPromise}.\r\n * @typedef asPromiseCallback\r\n * @type {function}\r\n * @param {Error|null} error Error, if any\r\n * @param {...*} params Additional arguments\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Returns a promise from a node-style callback function.\r\n * @memberof util\r\n * @param {asPromiseCallback} fn Function to call\r\n * @param {*} ctx Function context\r\n * @param {...*} params Function arguments\r\n * @returns {Promise<*>} Promisified function\r\n */\r\nfunction asPromise(fn, ctx/*, varargs */) {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0,\r\n index = 2,\r\n pending = true;\r\n while (index < arguments.length)\r\n params[offset++] = arguments[index++];\r\n return new Promise(function executor(resolve, reject) {\r\n params[offset] = function callback(err/*, varargs */) {\r\n if (pending) {\r\n pending = false;\r\n if (err)\r\n reject(err);\r\n else {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0;\r\n while (offset < params.length)\r\n params[offset++] = arguments[offset];\r\n resolve.apply(null, params);\r\n }\r\n }\r\n };\r\n try {\r\n fn.apply(ctx || null, params);\r\n } catch (err) {\r\n if (pending) {\r\n pending = false;\r\n reject(err);\r\n }\r\n }\r\n });\r\n}\r\n\n\n//# sourceURL=webpack://light/./node_modules/@protobufjs/aspromise/index.js?");
/***/ }),
/***/ "./node_modules/@protobufjs/base64/index.js":
/*!**************************************************!*\
!*** ./node_modules/@protobufjs/base64/index.js ***!
\**************************************************/
/***/ ((__unused_webpack_module, exports) => {
"use strict";
eval("\r\n\r\n/**\r\n * A minimal base64 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar base64 = exports;\r\n\r\n/**\r\n * Calculates the byte length of a base64 encoded string.\r\n * @param {string} string Base64 encoded string\r\n * @returns {number} Byte length\r\n */\r\nbase64.length = function length(string) {\r\n var p = string.length;\r\n if (!p)\r\n return 0;\r\n var n = 0;\r\n while (--p % 4 > 1 && string.charAt(p) === \"=\")\r\n ++n;\r\n return Math.ceil(string.length * 3) / 4 - n;\r\n};\r\n\r\n// Base64 encoding table\r\nvar b64 = new Array(64);\r\n\r\n// Base64 decoding table\r\nvar s64 = new Array(123);\r\n\r\n// 65..90, 97..122, 48..57, 43, 47\r\nfor (var i = 0; i < 64;)\r\n s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;\r\n\r\n/**\r\n * Encodes a buffer to a base64 encoded string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} Base64 encoded string\r\n */\r\nbase64.encode = function encode(buffer, start, end) {\r\n var parts = null,\r\n chunk = [];\r\n var i = 0, // output index\r\n j = 0, // goto index\r\n t; // temporary\r\n while (start < end) {\r\n var b = buffer[start++];\r\n switch (j) {\r\n case 0:\r\n chunk[i++] = b64[b >> 2];\r\n t = (b & 3) << 4;\r\n j = 1;\r\n break;\r\n case 1:\r\n chunk[i++] = b64[t | b >> 4];\r\n t = (b & 15) << 2;\r\n j = 2;\r\n break;\r\n case 2:\r\n chunk[i++] = b64[t | b >> 6];\r\n chunk[i++] = b64[b & 63];\r\n j = 0;\r\n break;\r\n }\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (j) {\r\n chunk[i++] = b64[t];\r\n chunk[i++] = 61;\r\n if (j === 1)\r\n chunk[i++] = 61;\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n};\r\n\r\nvar invalidEncoding = \"invalid encoding\";\r\n\r\n/**\r\n * Decodes a base64 encoded string to a buffer.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Number of bytes written\r\n * @throws {Error} If encoding is invalid\r\n */\r\nbase64.decode = function decode(string, buffer, offset) {\r\n var start = offset;\r\n var j = 0, // goto index\r\n t; // temporary\r\n for (var i = 0; i < string.length;) {\r\n var c = string.charCodeAt(i++);\r\n if (c === 61 && j > 1)\r\n break;\r\n if ((c = s64[c]) === undefined)\r\n throw Error(invalidEncoding);\r\n switch (j) {\r\n case 0:\r\n t = c;\r\n j = 1;\r\n break;\r\n case 1:\r\n buffer[offset++] = t << 2 | (c & 48) >> 4;\r\n t = c;\r\n j = 2;\r\n break;\r\n case 2:\r\n buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;\r\n t = c;\r\n j = 3;\r\n break;\r\n case 3:\r\n buffer[offset++] = (t & 3) << 6 | c;\r\n j = 0;\r\n break;\r\n }\r\n }\r\n if (j === 1)\r\n throw Error(invalidEncoding);\r\n return offset - start;\r\n};\r\n\r\n/**\r\n * Tests if the specified string appears to be base64 encoded.\r\n * @param {string} string String to test\r\n * @returns {boolean} `true` if probably base64 encoded, otherwise false\r\n */\r\nbase64.test = fun
/***/ }),
/***/ "./node_modules/@protobufjs/eventemitter/index.js":
/*!********************************************************!*\
!*** ./node_modules/@protobufjs/eventemitter/index.js ***!
\********************************************************/
/***/ ((module) => {
"use strict";
eval("\r\nmodule.exports = EventEmitter;\r\n\r\n/**\r\n * Constructs a new event emitter instance.\r\n * @classdesc A minimal event emitter.\r\n * @memberof util\r\n * @constructor\r\n */\r\nfunction EventEmitter() {\r\n\r\n /**\r\n * Registered listeners.\r\n * @type {Object.<string,*>}\r\n * @private\r\n */\r\n this._listeners = {};\r\n}\r\n\r\n/**\r\n * Registers an event listener.\r\n * @param {string} evt Event name\r\n * @param {function} fn Listener\r\n * @param {*} [ctx] Listener context\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.on = function on(evt, fn, ctx) {\r\n (this._listeners[evt] || (this._listeners[evt] = [])).push({\r\n fn : fn,\r\n ctx : ctx || this\r\n });\r\n return this;\r\n};\r\n\r\n/**\r\n * Removes an event listener or any matching listeners if arguments are omitted.\r\n * @param {string} [evt] Event name. Removes all listeners if omitted.\r\n * @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted.\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.off = function off(evt, fn) {\r\n if (evt === undefined)\r\n this._listeners = {};\r\n else {\r\n if (fn === undefined)\r\n this._listeners[evt] = [];\r\n else {\r\n var listeners = this._listeners[evt];\r\n for (var i = 0; i < listeners.length;)\r\n if (listeners[i].fn === fn)\r\n listeners.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Emits an event by calling its listeners with the specified arguments.\r\n * @param {string} evt Event name\r\n * @param {...*} args Arguments\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.emit = function emit(evt) {\r\n var listeners = this._listeners[evt];\r\n if (listeners) {\r\n var args = [],\r\n i = 1;\r\n for (; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n for (i = 0; i < listeners.length;)\r\n listeners[i].fn.apply(listeners[i++].ctx, args);\r\n }\r\n return this;\r\n};\r\n\n\n//# sourceURL=webpack://light/./node_modules/@protobufjs/eventemitter/index.js?");
/***/ }),
/***/ "./node_modules/@protobufjs/float/index.js":
/*!*************************************************!*\
!*** ./node_modules/@protobufjs/float/index.js ***!
\*************************************************/
/***/ ((module) => {
"use strict";
eval("\r\n\r\nmodule.exports = factory(factory);\r\n\r\n/**\r\n * Reads / writes floats / doubles from / to buffers.\r\n * @name util.float\r\n * @namespace\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using little endian byte order.\r\n * @name util.float.writeFloatLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using big endian byte order.\r\n * @name util.float.writeFloatBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using little endian byte order.\r\n * @name util.float.readFloatLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using big endian byte order.\r\n * @name util.float.readFloatBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using little endian byte order.\r\n * @name util.float.writeDoubleLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using big endian byte order.\r\n * @name util.float.writeDoubleBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using little endian byte order.\r\n * @name util.float.readDoubleLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using big endian byte order.\r\n * @name util.float.readDoubleBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n// Factory function for the purpose of node-based testing in modified global environments\r\nfunction factory(exports) {\r\n\r\n // float: typed array\r\n if (typeof Float32Array !== \"undefined\") (function() {\r\n\r\n var f32 = new Float32Array([ -0 ]),\r\n f8b = new Uint8Array(f32.buffer),\r\n le = f8b[3] === 128;\r\n\r\n function writeFloat_f32_cpy(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n }\r\n\r\n function writeFloat_f32_rev(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[3];\r\n buf[pos + 1] = f8b[2];\r\n buf[pos + 2] = f8b[1];\r\n buf[pos + 3] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy;\r\n\r\n function readFloat_f32_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n function readFloat_f32_rev(buf, pos) {\r\n f8b[3] = buf[pos ];\r\n f8b[2] = buf[pos + 1];\r\n f8b[1] = buf[pos + 2];\r\n f8b[0] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n
/***/ }),
/***/ "./node_modules/@protobufjs/inquire/index.js":
/*!***************************************************!*\
!*** ./node_modules/@protobufjs/inquire/index.js ***!
\***************************************************/
/***/ ((module) => {
"use strict";
eval("\r\nmodule.exports = inquire;\r\n\r\n/**\r\n * Requires a module only if available.\r\n * @memberof util\r\n * @param {string} moduleName Module to require\r\n * @returns {?Object} Required module if available and not empty, otherwise `null`\r\n */\r\nfunction inquire(moduleName) {\r\n try {\r\n var mod = eval(\"quire\".replace(/^/,\"re\"))(moduleName); // eslint-disable-line no-eval\r\n if (mod && (mod.length || Object.keys(mod).length))\r\n return mod;\r\n } catch (e) {} // eslint-disable-line no-empty\r\n return null;\r\n}\r\n\n\n//# sourceURL=webpack://light/./node_modules/@protobufjs/inquire/index.js?");
/***/ }),
/***/ "./node_modules/@protobufjs/pool/index.js":
/*!************************************************!*\
!*** ./node_modules/@protobufjs/pool/index.js ***!
\************************************************/
/***/ ((module) => {
"use strict";
eval("\r\nmodule.exports = pool;\r\n\r\n/**\r\n * An allocator as used by {@link util.pool}.\r\n * @typedef PoolAllocator\r\n * @type {function}\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\n\r\n/**\r\n * A slicer as used by {@link util.pool}.\r\n * @typedef PoolSlicer\r\n * @type {function}\r\n * @param {number} start Start offset\r\n * @param {number} end End offset\r\n * @returns {Uint8Array} Buffer slice\r\n * @this {Uint8Array}\r\n */\r\n\r\n/**\r\n * A general purpose buffer pool.\r\n * @memberof util\r\n * @function\r\n * @param {PoolAllocator} alloc Allocator\r\n * @param {PoolSlicer} slice Slicer\r\n * @param {number} [size=8192] Slab size\r\n * @returns {PoolAllocator} Pooled allocator\r\n */\r\nfunction pool(alloc, slice, size) {\r\n var SIZE = size || 8192;\r\n var MAX = SIZE >>> 1;\r\n var slab = null;\r\n var offset = SIZE;\r\n return function pool_alloc(size) {\r\n if (size < 1 || size > MAX)\r\n return alloc(size);\r\n if (offset + size > SIZE) {\r\n slab = alloc(SIZE);\r\n offset = 0;\r\n }\r\n var buf = slice.call(slab, offset, offset += size);\r\n if (offset & 7) // align to 32 bit\r\n offset = (offset | 7) + 1;\r\n return buf;\r\n };\r\n}\r\n\n\n//# sourceURL=webpack://light/./node_modules/@protobufjs/pool/index.js?");
/***/ }),
/***/ "./node_modules/@protobufjs/utf8/index.js":
/*!************************************************!*\
!*** ./node_modules/@protobufjs/utf8/index.js ***!
\************************************************/
/***/ ((__unused_webpack_module, exports) => {
"use strict";
eval("\r\n\r\n/**\r\n * A minimal UTF8 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar utf8 = exports;\r\n\r\n/**\r\n * Calculates the UTF8 byte length of a string.\r\n * @param {string} string String\r\n * @returns {number} Byte length\r\n */\r\nutf8.length = function utf8_length(string) {\r\n var len = 0,\r\n c = 0;\r\n for (var i = 0; i < string.length; ++i) {\r\n c = string.charCodeAt(i);\r\n if (c < 128)\r\n len += 1;\r\n else if (c < 2048)\r\n len += 2;\r\n else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) {\r\n ++i;\r\n len += 4;\r\n } else\r\n len += 3;\r\n }\r\n return len;\r\n};\r\n\r\n/**\r\n * Reads UTF8 bytes as a string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} String read\r\n */\r\nutf8.read = function utf8_read(buffer, start, end) {\r\n var len = end - start;\r\n if (len < 1)\r\n return \"\";\r\n var parts = null,\r\n chunk = [],\r\n i = 0, // char offset\r\n t; // temporary\r\n while (start < end) {\r\n t = buffer[start++];\r\n if (t < 128)\r\n chunk[i++] = t;\r\n else if (t > 191 && t < 224)\r\n chunk[i++] = (t & 31) << 6 | buffer[start++] & 63;\r\n else if (t > 239 && t < 365) {\r\n t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 0x10000;\r\n chunk[i++] = 0xD800 + (t >> 10);\r\n chunk[i++] = 0xDC00 + (t & 1023);\r\n } else\r\n chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63;\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n};\r\n\r\n/**\r\n * Writes a string as UTF8 bytes.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Bytes written\r\n */\r\nutf8.write = function utf8_write(string, buffer, offset) {\r\n var start = offset,\r\n c1, // character 1\r\n c2; // character 2\r\n for (var i = 0; i < string.length; ++i) {\r\n c1 = string.charCodeAt(i);\r\n if (c1 < 128) {\r\n buffer[offset++] = c1;\r\n } else if (c1 < 2048) {\r\n buffer[offset++] = c1 >> 6 | 192;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) {\r\n c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF);\r\n ++i;\r\n buffer[offset++] = c1 >> 18 | 240;\r\n buffer[offset++] = c1 >> 12 & 63 | 128;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else {\r\n buffer[offset++] = c1 >> 12 | 224;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n }\r\n }\r\n return offset - start;\r\n};\r\n\n\n//# sourceURL=webpack://light/./node_modules/@protobufjs/utf8/index.js?");
/***/ }),
/***/ "./node_modules/debug/src/browser.js":
/*!*******************************************!*\
!*** ./node_modules/debug/src/browser.js ***!
\*******************************************/
/***/ ((module, exports, __webpack_require__) => {
eval("/* 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\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\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 && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$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/
/***/ }),
/***/ "./node_modules/debug/src/common.js":
/*!******************************************!*\
!*** ./node_modules/debug/src/common.js ***!
\******************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
eval("\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 = __webpack_require__(/*! ms */ \"./node_modules/ms/index.js\");\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\
/***/ }),
/***/ "./node_modules/denque/index.js":
/*!**************************************!*\
!*** ./node_modules/denque/index.js ***!
\**************************************/
/***/ ((module) => {
"use strict";
eval("\n\n/**\n * Custom implementation of a double ended queue.\n */\nfunction Denque(array, options) {\n var options = options || {};\n\n this._head = 0;\n this._tail = 0;\n this._capacity = options.capacity;\n this._capacityMask = 0x3;\n this._list = new Array(4);\n if (Array.isArray(array)) {\n this._fromArray(array);\n }\n}\n\n/**\n * -------------\n * PUBLIC API\n * -------------\n */\n\n/**\n * Returns the item at the specified index from the list.\n * 0 is the first element, 1 is the second, and so on...\n * Elements at negative values are that many from the end: -1 is one before the end\n * (the last element), -2 is two before the end (one before last), etc.\n * @param index\n * @returns {*}\n */\nDenque.prototype.peekAt = function peekAt(index) {\n var i = index;\n // expect a number or return undefined\n if ((i !== (i | 0))) {\n return void 0;\n }\n var len = this.size();\n if (i >= len || i < -len) return undefined;\n if (i < 0) i += len;\n i = (this._head + i) & this._capacityMask;\n return this._list[i];\n};\n\n/**\n * Alias for peekAt()\n * @param i\n * @returns {*}\n */\nDenque.prototype.get = function get(i) {\n return this.peekAt(i);\n};\n\n/**\n * Returns the first item in the list without removing it.\n * @returns {*}\n */\nDenque.prototype.peek = function peek() {\n if (this._head === this._tail) return undefined;\n return this._list[this._head];\n};\n\n/**\n * Alias for peek()\n * @returns {*}\n */\nDenque.prototype.peekFront = function peekFront() {\n return this.peek();\n};\n\n/**\n * Returns the item that is at the back of the queue without removing it.\n * Uses peekAt(-1)\n */\nDenque.prototype.peekBack = function peekBack() {\n return this.peekAt(-1);\n};\n\n/**\n * Returns the current length of the queue\n * @return {Number}\n */\nObject.defineProperty(Denque.prototype, 'length', {\n get: function length() {\n return this.size();\n }\n});\n\n/**\n * Return the number of items on the list, or 0 if empty.\n * @returns {number}\n */\nDenque.prototype.size = function size() {\n if (this._head === this._tail) return 0;\n if (this._head < this._tail) return this._tail - this._head;\n else return this._capacityMask + 1 - (this._head - this._tail);\n};\n\n/**\n * Add an item at the beginning of the list.\n * @param item\n */\nDenque.prototype.unshift = function unshift(item) {\n if (item === undefined) return this.size();\n var len = this._list.length;\n this._head = (this._head - 1 + len) & this._capacityMask;\n this._list[this._head] = item;\n if (this._tail === this._head) this._growArray();\n if (this._capacity && this.size() > this._capacity) this.pop();\n if (this._head < this._tail) return this._tail - this._head;\n else return this._capacityMask + 1 - (this._head - this._tail);\n};\n\n/**\n * Remove and return the first item on the list,\n * Returns undefined if the list is empty.\n * @returns {*}\n */\nDenque.prototype.shift = function shift() {\n var head = this._head;\n if (head === this._tail) return undefined;\n var item = this._list[head];\n this._list[head] = undefined;\n this._head = (head + 1) & this._capacityMask;\n if (head < 2 && this._tail > 10000 && this._tail <= this._list.length >>> 2) this._shrinkArray();\n return item;\n};\n\n/**\n * Add an item to the bottom of the list.\n * @param item\n */\nDenque.prototype.push = function push(item) {\n if (item === undefined) return this.size();\n var tail = this._tail;\n this._list[tail] = item;\n this._tail = (tail + 1) & this._capacityMask;\n if (this._tail === this._head) {\n this._growArray();\n }\n if (this._capacity && this.size() > this._capacity) {\n this.shift();\n }\n if (this._head < this._tail) return this._tail - this._head;\n else return this._capacityMask + 1 - (this._head - this._tail);\n};\n\n/**\n * Remove and return the last item on the list.\n * Returns undefined if the list is empty.\n * @returns {*}\n */\nDenque.prototype.pop = function pop() {\n var tail = this._tail;\n if (tail === this._head) return undefined;\n var len = this._list.length;\
/***/ }),
/***/ "./node_modules/detect-browser/es/index.js":
/*!*************************************************!*\
!*** ./node_modules/detect-browser/es/index.js ***!
\*************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ BotInfo: () => (/* binding */ BotInfo),\n/* harmony export */ BrowserInfo: () => (/* binding */ BrowserInfo),\n/* harmony export */ NodeInfo: () => (/* binding */ NodeInfo),\n/* harmony export */ ReactNativeInfo: () => (/* binding */ ReactNativeInfo),\n/* harmony export */ SearchBotDeviceInfo: () => (/* binding */ SearchBotDeviceInfo),\n/* harmony export */ browserName: () => (/* binding */ browserName),\n/* harmony export */ detect: () => (/* binding */ detect),\n/* harmony export */ detectOS: () => (/* binding */ detectOS),\n/* harmony export */ getNodeVersion: () => (/* binding */ getNodeVersion),\n/* harmony export */ parseUserAgent: () => (/* binding */ parseUserAgent)\n/* harmony export */ });\nvar __spreadArray = (undefined && undefined.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nvar BrowserInfo = /** @class */ (function () {\n function BrowserInfo(name, version, os) {\n this.name = name;\n this.version = version;\n this.os = os;\n this.type = 'browser';\n }\n return BrowserInfo;\n}());\n\nvar NodeInfo = /** @class */ (function () {\n function NodeInfo(version) {\n this.version = version;\n this.type = 'node';\n this.name = 'node';\n this.os = process.platform;\n }\n return NodeInfo;\n}());\n\nvar SearchBotDeviceInfo = /** @class */ (function () {\n function SearchBotDeviceInfo(name, version, os, bot) {\n this.name = name;\n this.version = version;\n this.os = os;\n this.bot = bot;\n this.type = 'bot-device';\n }\n return SearchBotDeviceInfo;\n}());\n\nvar BotInfo = /** @class */ (function () {\n function BotInfo() {\n this.type = 'bot';\n this.bot = true; // NOTE: deprecated test name instead\n this.name = 'bot';\n this.version = null;\n this.os = null;\n }\n return BotInfo;\n}());\n\nvar ReactNativeInfo = /** @class */ (function () {\n function ReactNativeInfo() {\n this.type = 'react-native';\n this.name = 'react-native';\n this.version = null;\n this.os = null;\n }\n return ReactNativeInfo;\n}());\n\n// tslint:disable-next-line:max-line-length\nvar SEARCHBOX_UA_REGEX = /alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/;\nvar SEARCHBOT_OS_REGEX = /(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\\ Jeeves\\/Teoma|ia_archiver)/;\nvar REQUIRED_VERSION_PARTS = 3;\nvar userAgentRules = [\n ['aol', /AOLShield\\/([0-9\\._]+)/],\n ['edge', /Edge\\/([0-9\\._]+)/],\n ['edge-ios', /EdgiOS\\/([0-9\\._]+)/],\n ['yandexbrowser', /YaBrowser\\/([0-9\\._]+)/],\n ['kakaotalk', /KAKAOTALK\\s([0-9\\.]+)/],\n ['samsung', /SamsungBrowser\\/([0-9\\.]+)/],\n ['silk', /\\bSilk\\/([0-9._-]+)\\b/],\n ['miui', /MiuiBrowser\\/([0-9\\.]+)$/],\n ['beaker', /BeakerBrowser\\/([0-9\\.]+)/],\n ['edge-chromium', /EdgA?\\/([0-9\\.]+)/],\n [\n 'chromium-webview',\n /(?!Chrom.*OPR)wv\\).*Chrom(?:e|ium)\\/([0-9\\.]+)(:?\\s|$)/,\n ],\n ['chrome', /(?!Chrom.*OPR)Chrom(?:e|ium)\\/([0-9\\.]+)(:?\\s|$)/],\n ['phantomjs', /PhantomJS\\/([0-9\\.]+)(:?\\s|$)/],\n ['crios', /CriOS\\/([0-9\\.]+)(:?\\s|$)/],\n ['firefox', /Firefox\\/([0-9\\.]+)(?:\\s|$)/],\n ['fxios', /FxiOS\\/([0-9\\.]+)/],\n ['opera-mini', /Opera Mini.*Version\\/([0-9\\.]+)/],\n ['opera', /Opera\\/([0-9\\.]+)(?:\\s|$)/],\n ['opera', /OPR\\/([0-9\\.]+)(:?\\s|$)/],\n ['pie', /^Microsoft Pocket Internet Explorer\\/(\\d+\\.\\d+)$/],\n ['pie', /^Mozilla\\/\\d\\.\\d+\\s\\(compatible
/***/ }),
/***/ "./node_modules/err-code/index.js":
/*!****************************************!*\
!*** ./node_modules/err-code/index.js ***!
\****************************************/
/***/ ((module) => {
"use strict";
eval("\n\n/**\n * @typedef {{ [key: string]: any }} Extensions\n * @typedef {Error} Err\n * @property {string} message\n */\n\n/**\n *\n * @param {Error} obj\n * @param {Extensions} props\n * @returns {Error & Extensions}\n */\nfunction assign(obj, props) {\n for (const key in props) {\n Object.defineProperty(obj, key, {\n value: props[key],\n enumerable: true,\n configurable: true,\n });\n }\n\n return obj;\n}\n\n/**\n *\n * @param {any} err - An Error\n * @param {string|Extensions} code - A string code or props to set on the error\n * @param {Extensions} [props] - Props to set on the error\n * @returns {Error & Extensions}\n */\nfunction createError(err, code, props) {\n if (!err || typeof err === 'string') {\n throw new TypeError('Please pass an Error to err-code');\n }\n\n if (!props) {\n props = {};\n }\n\n if (typeof code === 'object') {\n props = code;\n code = '';\n }\n\n if (code) {\n props.code = code;\n }\n\n try {\n return assign(err, props);\n } catch (_) {\n props.message = err.message;\n props.stack = err.stack;\n\n const ErrClass = function () {};\n\n ErrClass.prototype = Object.create(Object.getPrototypeOf(err));\n\n // @ts-ignore\n const output = assign(new ErrClass(), props);\n\n return output;\n }\n}\n\nmodule.exports = createError;\n\n\n//# sourceURL=webpack://light/./node_modules/err-code/index.js?");
/***/ }),
/***/ "./node_modules/event-iterator/lib/dom.js":
/*!************************************************!*\
!*** ./node_modules/event-iterator/lib/dom.js ***!
\************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst event_iterator_1 = __webpack_require__(/*! ./event-iterator */ \"./node_modules/event-iterator/lib/event-iterator.js\");\nexports.EventIterator = event_iterator_1.EventIterator;\nfunction subscribe(event, options, evOptions) {\n return new event_iterator_1.EventIterator(({ push }) => {\n this.addEventListener(event, push, options);\n return () => this.removeEventListener(event, push, options);\n }, evOptions);\n}\nexports.subscribe = subscribe;\nexports[\"default\"] = event_iterator_1.EventIterator;\n\n\n//# sourceURL=webpack://light/./node_modules/event-iterator/lib/dom.js?");
/***/ }),
/***/ "./node_modules/event-iterator/lib/event-iterator.js":
/*!***********************************************************!*\
!*** ./node_modules/event-iterator/lib/event-iterator.js ***!
\***********************************************************/
/***/ ((__unused_webpack_module, exports) => {
"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nclass EventQueue {\n constructor() {\n this.pullQueue = [];\n this.pushQueue = [];\n this.eventHandlers = {};\n this.isPaused = false;\n this.isStopped = false;\n }\n push(value) {\n if (this.isStopped)\n return;\n const resolution = { value, done: false };\n if (this.pullQueue.length) {\n const placeholder = this.pullQueue.shift();\n if (placeholder)\n placeholder.resolve(resolution);\n }\n else {\n this.pushQueue.push(Promise.resolve(resolution));\n if (this.highWaterMark !== undefined &&\n this.pushQueue.length >= this.highWaterMark &&\n !this.isPaused) {\n this.isPaused = true;\n if (this.eventHandlers.highWater) {\n this.eventHandlers.highWater();\n }\n else if (console) {\n console.warn(`EventIterator queue reached ${this.pushQueue.length} items`);\n }\n }\n }\n }\n stop() {\n if (this.isStopped)\n return;\n this.isStopped = true;\n this.remove();\n for (const placeholder of this.pullQueue) {\n placeholder.resolve({ value: undefined, done: true });\n }\n this.pullQueue.length = 0;\n }\n fail(error) {\n if (this.isStopped)\n return;\n this.isStopped = true;\n this.remove();\n if (this.pullQueue.length) {\n for (const placeholder of this.pullQueue) {\n placeholder.reject(error);\n }\n this.pullQueue.length = 0;\n }\n else {\n const rejection = Promise.reject(error);\n /* Attach error handler to avoid leaking an unhandled promise rejection. */\n rejection.catch(() => { });\n this.pushQueue.push(rejection);\n }\n }\n remove() {\n Promise.resolve().then(() => {\n if (this.removeCallback)\n this.removeCallback();\n });\n }\n [Symbol.asyncIterator]() {\n return {\n next: (value) => {\n const result = this.pushQueue.shift();\n if (result) {\n if (this.lowWaterMark !== undefined &&\n this.pushQueue.length <= this.lowWaterMark &&\n this.isPaused) {\n this.isPaused = false;\n if (this.eventHandlers.lowWater) {\n this.eventHandlers.lowWater();\n }\n }\n return result;\n }\n else if (this.isStopped) {\n return Promise.resolve({ value: undefined, done: true });\n }\n else {\n return new Promise((resolve, reject) => {\n this.pullQueue.push({ resolve, reject });\n });\n }\n },\n return: () => {\n this.isStopped = true;\n this.pushQueue.length = 0;\n this.remove();\n return Promise.resolve({ value: undefined, done: true });\n },\n };\n }\n}\nclass EventIterator {\n constructor(listen, { highWaterMark = 100, lowWaterMark = 1 } = {}) {\n const queue = new EventQueue();\n queue.highWaterMark = highWaterMark;\n queue.lowWaterMark = lowWaterMark;\n queue.removeCallback =\n listen({\n push: value => queue.push(value),\n stop: () => queue.stop(),\n fail: error => queue.fail(error),\n on: (event, fn) => {\n queue.eventHandlers[event] = fn;\n },\n }) || (() => { });\n this[Symbol.asyncIterator] = () => queue[Symbol.asyncIterator]();\n
/***/ }),
/***/ "./node_modules/eventemitter3/index.js":
/*!*********************************************!*\
!*** ./node_modules/eventemitter3/index.js ***!
\*********************************************/
/***/ ((module) => {
"use strict";
eval("\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.proto
/***/ }),
/***/ "./node_modules/events/events.js":
/*!***************************************!*\
!*** ./node_modules/events/events.js ***!
\***************************************/
/***/ ((module) => {
"use strict";
eval("// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.g
/***/ }),
/***/ "./node_modules/hi-base32/src/base32.js":
/*!**********************************************!*\
!*** ./node_modules/hi-base32/src/base32.js ***!
\**********************************************/
/***/ ((module, exports, __webpack_require__) => {
eval("var __WEBPACK_AMD_DEFINE_RESULT__;/*\n * [hi-base32]{@link https://github.com/emn178/hi-base32}\n *\n * @version 0.5.0\n * @author Chen, Yi-Cyuan [emn178@gmail.com]\n * @copyright Chen, Yi-Cyuan 2015-2018\n * @license MIT\n */\n/*jslint bitwise: true */\n(function () {\n 'use strict';\n\n var root = typeof window === 'object' ? window : {};\n var NODE_JS = !root.HI_BASE32_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node;\n if (NODE_JS) {\n root = __webpack_require__.g;\n }\n var COMMON_JS = !root.HI_BASE32_NO_COMMON_JS && \"object\" === 'object' && module.exports;\n var AMD = true && __webpack_require__.amdO;\n var BASE32_ENCODE_CHAR = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567'.split('');\n var BASE32_DECODE_CHAR = {\n 'A': 0, 'B': 1, 'C': 2, 'D': 3, 'E': 4, 'F': 5, 'G': 6, 'H': 7, 'I': 8,\n 'J': 9, 'K': 10, 'L': 11, 'M': 12, 'N': 13, 'O': 14, 'P': 15, 'Q': 16,\n 'R': 17, 'S': 18, 'T': 19, 'U': 20, 'V': 21, 'W': 22, 'X': 23, 'Y': 24,\n 'Z': 25, '2': 26, '3': 27, '4': 28, '5': 29, '6': 30, '7': 31\n };\n\n var blocks = [0, 0, 0, 0, 0, 0, 0, 0];\n\n var throwInvalidUtf8 = function (position, partial) {\n if (partial.length > 10) {\n partial = '...' + partial.substr(-10);\n }\n var err = new Error('Decoded data is not valid UTF-8.'\n + ' Maybe try base32.decode.asBytes()?'\n + ' Partial data after reading ' + position + ' bytes: ' + partial + ' <-');\n err.position = position;\n throw err;\n };\n\n var toUtf8String = function (bytes) {\n var str = '', length = bytes.length, i = 0, followingChars = 0, b, c;\n while (i < length) {\n b = bytes[i++];\n if (b <= 0x7F) {\n str += String.fromCharCode(b);\n continue;\n } else if (b > 0xBF && b <= 0xDF) {\n c = b & 0x1F;\n followingChars = 1;\n } else if (b <= 0xEF) {\n c = b & 0x0F;\n followingChars = 2;\n } else if (b <= 0xF7) {\n c = b & 0x07;\n followingChars = 3;\n } else {\n throwInvalidUtf8(i, str);\n }\n\n for (var j = 0; j < followingChars; ++j) {\n b = bytes[i++];\n if (b < 0x80 || b > 0xBF) {\n throwInvalidUtf8(i, str);\n }\n c <<= 6;\n c += b & 0x3F;\n }\n if (c >= 0xD800 && c <= 0xDFFF) {\n throwInvalidUtf8(i, str);\n }\n if (c > 0x10FFFF) {\n throwInvalidUtf8(i, str);\n }\n\n if (c <= 0xFFFF) {\n str += String.fromCharCode(c);\n } else {\n c -= 0x10000;\n str += String.fromCharCode((c >> 10) + 0xD800);\n str += String.fromCharCode((c & 0x3FF) + 0xDC00);\n }\n }\n return str;\n };\n\n var decodeAsBytes = function (base32Str) {\n if (base32Str === '') {\n return [];\n } else if (!/^[A-Z2-7=]+$/.test(base32Str)) {\n throw new Error('Invalid base32 characters');\n }\n base32Str = base32Str.replace(/=/g, '');\n var v1, v2, v3, v4, v5, v6, v7, v8, bytes = [], index = 0, length = base32Str.length;\n\n // 4 char to 3 bytes\n for (var i = 0, count = length >> 3 << 3; i < count;) {\n v1 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v2 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v3 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v4 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v5 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v6 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v7 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v8 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n bytes[index++] = (v1 << 3 | v2 >>> 2) & 255;\n bytes[index++] = (v2 << 6 | v3 << 1 | v4 >>> 4) & 255;\n bytes[index++] = (v4 << 4 | v5 >>> 1) & 255;\n bytes[index++] = (v5 << 7 | v6 << 2 | v7 >>> 3) & 255;\n bytes[index++] = (v7 << 5 | v8) & 255;\n }\n\n // remain bytes\n var remain = length - count;\n if (remain === 2) {\n v1 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v2 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n bytes[index++] = (v1 << 3 | v2
/***/ }),
/***/ "./node_modules/ipaddr.js/lib/ipaddr.js":
/*!**********************************************!*\
!*** ./node_modules/ipaddr.js/lib/ipaddr.js ***!
\**********************************************/
/***/ (function(module) {
eval("(function (root) {\n 'use strict';\n // A list of regular expressions that match arbitrary IPv4 addresses,\n // for which a number of weird notations exist.\n // Note that an address like 0010.0xa5.1.1 is considered legal.\n const ipv4Part = '(0?\\\\d+|0x[a-f0-9]+)';\n const ipv4Regexes = {\n fourOctet: new RegExp(`^${ipv4Part}\\\\.${ipv4Part}\\\\.${ipv4Part}\\\\.${ipv4Part}$`, 'i'),\n threeOctet: new RegExp(`^${ipv4Part}\\\\.${ipv4Part}\\\\.${ipv4Part}$`, 'i'),\n twoOctet: new RegExp(`^${ipv4Part}\\\\.${ipv4Part}$`, 'i'),\n longValue: new RegExp(`^${ipv4Part}$`, 'i')\n };\n\n // Regular Expression for checking Octal numbers\n const octalRegex = new RegExp(`^0[0-7]+$`, 'i');\n const hexRegex = new RegExp(`^0x[a-f0-9]+$`, 'i');\n\n const zoneIndex = '%[0-9a-z]{1,}';\n\n // IPv6-matching regular expressions.\n // For IPv6, the task is simpler: it is enough to match the colon-delimited\n // hexadecimal IPv6 and a transitional variant with dotted-decimal IPv4 at\n // the end.\n const ipv6Part = '(?:[0-9a-f]+::?)+';\n const ipv6Regexes = {\n zoneIndex: new RegExp(zoneIndex, 'i'),\n 'native': new RegExp(`^(::)?(${ipv6Part})?([0-9a-f]+)?(::)?(${zoneIndex})?$`, 'i'),\n deprecatedTransitional: new RegExp(`^(?:::)(${ipv4Part}\\\\.${ipv4Part}\\\\.${ipv4Part}\\\\.${ipv4Part}(${zoneIndex})?)$`, 'i'),\n transitional: new RegExp(`^((?:${ipv6Part})|(?:::)(?:${ipv6Part})?)${ipv4Part}\\\\.${ipv4Part}\\\\.${ipv4Part}\\\\.${ipv4Part}(${zoneIndex})?$`, 'i')\n };\n\n // Expand :: in an IPv6 address or address part consisting of `parts` groups.\n function expandIPv6 (string, parts) {\n // More than one '::' means invalid adddress\n if (string.indexOf('::') !== string.lastIndexOf('::')) {\n return null;\n }\n\n let colonCount = 0;\n let lastColon = -1;\n let zoneId = (string.match(ipv6Regexes.zoneIndex) || [])[0];\n let replacement, replacementCount;\n\n // Remove zone index and save it for later\n if (zoneId) {\n zoneId = zoneId.substring(1);\n string = string.replace(/%.+$/, '');\n }\n\n // How many parts do we already have?\n while ((lastColon = string.indexOf(':', lastColon + 1)) >= 0) {\n colonCount++;\n }\n\n // 0::0 is two parts more than ::\n if (string.substr(0, 2) === '::') {\n colonCount--;\n }\n\n if (string.substr(-2, 2) === '::') {\n colonCount--;\n }\n\n // The following loop would hang if colonCount > parts\n if (colonCount > parts) {\n return null;\n }\n\n // replacement = ':' + '0:' * (parts - colonCount)\n replacementCount = parts - colonCount;\n replacement = ':';\n while (replacementCount--) {\n replacement += '0:';\n }\n\n // Insert the missing zeroes\n string = string.replace('::', replacement);\n\n // Trim any garbage which may be hanging around if :: was at the edge in\n // the source strin\n if (string[0] === ':') {\n string = string.slice(1);\n }\n\n if (string[string.length - 1] === ':') {\n string = string.slice(0, -1);\n }\n\n parts = (function () {\n const ref = string.split(':');\n const results = [];\n\n for (let i = 0; i < ref.length; i++) {\n results.push(parseInt(ref[i], 16));\n }\n\n return results;\n })();\n\n return {\n parts: parts,\n zoneId: zoneId\n };\n }\n\n // A generic CIDR (Classless Inter-Domain Routing) RFC1518 range matcher.\n function matchCIDR (first, second, partSize, cidrBits) {\n if (first.length !== second.length) {\n throw new Error('ipaddr: cannot match CIDR for objects with different lengths');\n }\n\n let part = 0;\n let shift;\n\n while (cidrBits > 0)
/***/ }),
/***/ "./node_modules/is-electron/index.js":
/*!*******************************************!*\
!*** ./node_modules/is-electron/index.js ***!
\*******************************************/
/***/ ((module) => {
eval("// https://github.com/electron/electron/issues/2288\nfunction isElectron() {\n // Renderer process\n if (typeof window !== 'undefined' && typeof window.process === 'object' && window.process.type === 'renderer') {\n return true;\n }\n\n // Main process\n if (typeof process !== 'undefined' && typeof process.versions === 'object' && !!process.versions.electron) {\n return true;\n }\n\n // Detect the user agent when the `nodeIntegration` option is set to false\n if (typeof navigator === 'object' && typeof navigator.userAgent === 'string' && navigator.userAgent.indexOf('Electron') >= 0) {\n return true;\n }\n\n return false;\n}\n\nmodule.exports = isElectron;\n\n\n//# sourceURL=webpack://light/./node_modules/is-electron/index.js?");
/***/ }),
/***/ "./node_modules/is-plain-obj/index.js":
/*!********************************************!*\
!*** ./node_modules/is-plain-obj/index.js ***!
\********************************************/
/***/ ((module) => {
"use strict";
eval("\n\nmodule.exports = value => {\n\tif (Object.prototype.toString.call(value) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tconst prototype = Object.getPrototypeOf(value);\n\treturn prototype === null || prototype === Object.prototype;\n};\n\n\n//# sourceURL=webpack://light/./node_modules/is-plain-obj/index.js?");
/***/ }),
/***/ "./node_modules/iso-url/index.js":
/*!***************************************!*\
!*** ./node_modules/iso-url/index.js ***!
\***************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
eval("\n\nconst {\n URLWithLegacySupport,\n format,\n URLSearchParams,\n defaultBase\n} = __webpack_require__(/*! ./src/url */ \"./node_modules/iso-url/src/url-browser.js\")\nconst relative = __webpack_require__(/*! ./src/relative */ \"./node_modules/iso-url/src/relative.js\")\n\nmodule.exports = {\n URL: URLWithLegacySupport,\n URLSearchParams,\n format,\n relative,\n defaultBase\n}\n\n\n//# sourceURL=webpack://light/./node_modules/iso-url/index.js?");
/***/ }),
/***/ "./node_modules/iso-url/src/relative.js":
/*!**********************************************!*\
!*** ./node_modules/iso-url/src/relative.js ***!
\**********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
eval("\n\nconst { URLWithLegacySupport, format } = __webpack_require__(/*! ./url */ \"./node_modules/iso-url/src/url-browser.js\")\n\n/**\n * @param {string | undefined} url\n * @param {any} [location]\n * @param {any} [protocolMap]\n * @param {any} [defaultProtocol]\n */\nmodule.exports = (url, location = {}, protocolMap = {}, defaultProtocol) => {\n let protocol = location.protocol\n ? location.protocol.replace(':', '')\n : 'http'\n\n // Check protocol map\n protocol = (protocolMap[protocol] || defaultProtocol || protocol) + ':'\n let urlParsed\n\n try {\n urlParsed = new URLWithLegacySupport(url)\n } catch (err) {\n urlParsed = {}\n }\n\n const base = Object.assign({}, location, {\n protocol: protocol || urlParsed.protocol,\n host: location.host || urlParsed.host\n })\n\n return new URLWithLegacySupport(url, format(base)).toString()\n}\n\n\n//# sourceURL=webpack://light/./node_modules/iso-url/src/relative.js?");
/***/ }),
/***/ "./node_modules/iso-url/src/url-browser.js":
/*!*************************************************!*\
!*** ./node_modules/iso-url/src/url-browser.js ***!
\*************************************************/
/***/ ((module) => {
"use strict";
eval("\n\nconst isReactNative =\n typeof navigator !== 'undefined' &&\n navigator.product === 'ReactNative'\n\nfunction getDefaultBase () {\n if (isReactNative) {\n return 'http://localhost'\n }\n // in some environments i.e. cloudflare workers location is not available\n if (!self.location) {\n return ''\n }\n\n return self.location.protocol + '//' + self.location.host\n}\n\nconst URL = self.URL\nconst defaultBase = getDefaultBase()\n\nclass URLWithLegacySupport {\n constructor (url = '', base = defaultBase) {\n this.super = new URL(url, base)\n this.path = this.pathname + this.search\n this.auth =\n this.username && this.password\n ? this.username + ':' + this.password\n : null\n\n this.query =\n this.search && this.search.startsWith('?')\n ? this.search.slice(1)\n : null\n }\n\n get hash () {\n return this.super.hash\n }\n\n get host () {\n return this.super.host\n }\n\n get hostname () {\n return this.super.hostname\n }\n\n get href () {\n return this.super.href\n }\n\n get origin () {\n return this.super.origin\n }\n\n get password () {\n return this.super.password\n }\n\n get pathname () {\n return this.super.pathname\n }\n\n get port () {\n return this.super.port\n }\n\n get protocol () {\n return this.super.protocol\n }\n\n get search () {\n return this.super.search\n }\n\n get searchParams () {\n return this.super.searchParams\n }\n\n get username () {\n return this.super.username\n }\n\n set hash (hash) {\n this.super.hash = hash\n }\n\n set host (host) {\n this.super.host = host\n }\n\n set hostname (hostname) {\n this.super.hostname = hostname\n }\n\n set href (href) {\n this.super.href = href\n }\n\n set password (password) {\n this.super.password = password\n }\n\n set pathname (pathname) {\n this.super.pathname = pathname\n }\n\n set port (port) {\n this.super.port = port\n }\n\n set protocol (protocol) {\n this.super.protocol = protocol\n }\n\n set search (search) {\n this.super.search = search\n }\n\n set username (username) {\n this.super.username = username\n }\n\n /**\n * @param {any} o\n */\n static createObjectURL (o) {\n return URL.createObjectURL(o)\n }\n\n /**\n * @param {string} o\n */\n static revokeObjectURL (o) {\n URL.revokeObjectURL(o)\n }\n\n toJSON () {\n return this.super.toJSON()\n }\n\n toString () {\n return this.super.toString()\n }\n\n format () {\n return this.toString()\n }\n}\n\n/**\n * @param {string | import('url').UrlObject} obj\n */\nfunction format (obj) {\n if (typeof obj === 'string') {\n const url = new URL(obj)\n\n return url.toString()\n }\n\n if (!(obj instanceof URL)) {\n const userPass =\n // @ts-ignore its not supported in node but we normalise\n obj.username && obj.password\n // @ts-ignore its not supported in node but we normalise\n ? `${obj.username}:${obj.password}@`\n : ''\n const auth = obj.auth ? obj.auth + '@' : ''\n const port = obj.port ? ':' + obj.port : ''\n const protocol = obj.protocol ? obj.protocol + '//' : ''\n const host = obj.host || ''\n const hostname = obj.hostname || ''\n const search = obj.search || (obj.query ? '?' + obj.query : '')\n const hash = obj.hash || ''\n const pathname = obj.pathname || ''\n // @ts-ignore - path is not supported in node but we normalise\n const path = obj.path || pathname + search\n\n return `${protocol}${userPass || auth}${\n host || hostname + port\n }${path}${hash}`\n }\n}\n\nmodule.exports = {\n URLWithLegacySupport,\n URLSearchParams: self.URLSearchParams,\n defaultBase,\n format\n}\n\n\n//# sourceURL=webpack://light/./node_modules/iso-url/src/url-browser.js?");
/***/ }),
/***/ "./node_modules/js-sha3/src/sha3.js":
/*!******************************************!*\
!*** ./node_modules/js-sha3/src/sha3.js ***!
\******************************************/
/***/ ((module, exports, __webpack_require__) => {
eval("var __WEBPACK_AMD_DEFINE_RESULT__;/**\n * [js-sha3]{@link https://github.com/emn178/js-sha3}\n *\n * @version 0.8.0\n * @author Chen, Yi-Cyuan [emn178@gmail.com]\n * @copyright Chen, Yi-Cyuan 2015-2018\n * @license MIT\n */\n/*jslint bitwise: true */\n(function () {\n 'use strict';\n\n var INPUT_ERROR = 'input is invalid type';\n var FINALIZE_ERROR = 'finalize already called';\n var WINDOW = typeof window === 'object';\n var root = WINDOW ? window : {};\n if (root.JS_SHA3_NO_WINDOW) {\n WINDOW = false;\n }\n var WEB_WORKER = !WINDOW && typeof self === 'object';\n var NODE_JS = !root.JS_SHA3_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node;\n if (NODE_JS) {\n root = __webpack_require__.g;\n } else if (WEB_WORKER) {\n root = self;\n }\n var COMMON_JS = !root.JS_SHA3_NO_COMMON_JS && \"object\" === 'object' && module.exports;\n var AMD = true && __webpack_require__.amdO;\n var ARRAY_BUFFER = !root.JS_SHA3_NO_ARRAY_BUFFER && typeof ArrayBuffer !== 'undefined';\n var HEX_CHARS = '0123456789abcdef'.split('');\n var SHAKE_PADDING = [31, 7936, 2031616, 520093696];\n var CSHAKE_PADDING = [4, 1024, 262144, 67108864];\n var KECCAK_PADDING = [1, 256, 65536, 16777216];\n var PADDING = [6, 1536, 393216, 100663296];\n var SHIFT = [0, 8, 16, 24];\n var RC = [1, 0, 32898, 0, 32906, 2147483648, 2147516416, 2147483648, 32907, 0, 2147483649,\n 0, 2147516545, 2147483648, 32777, 2147483648, 138, 0, 136, 0, 2147516425, 0,\n 2147483658, 0, 2147516555, 0, 139, 2147483648, 32905, 2147483648, 32771,\n 2147483648, 32770, 2147483648, 128, 2147483648, 32778, 0, 2147483658, 2147483648,\n 2147516545, 2147483648, 32896, 2147483648, 2147483649, 0, 2147516424, 2147483648];\n var BITS = [224, 256, 384, 512];\n var SHAKE_BITS = [128, 256];\n var OUTPUT_TYPES = ['hex', 'buffer', 'arrayBuffer', 'array', 'digest'];\n var CSHAKE_BYTEPAD = {\n '128': 168,\n '256': 136\n };\n\n if (root.JS_SHA3_NO_NODE_JS || !Array.isArray) {\n Array.isArray = function (obj) {\n return Object.prototype.toString.call(obj) === '[object Array]';\n };\n }\n\n if (ARRAY_BUFFER && (root.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView)) {\n ArrayBuffer.isView = function (obj) {\n return typeof obj === 'object' && obj.buffer && obj.buffer.constructor === ArrayBuffer;\n };\n }\n\n var createOutputMethod = function (bits, padding, outputType) {\n return function (message) {\n return new Keccak(bits, padding, bits).update(message)[outputType]();\n };\n };\n\n var createShakeOutputMethod = function (bits, padding, outputType) {\n return function (message, outputBits) {\n return new Keccak(bits, padding, outputBits).update(message)[outputType]();\n };\n };\n\n var createCshakeOutputMethod = function (bits, padding, outputType) {\n return function (message, outputBits, n, s) {\n return methods['cshake' + bits].update(message, outputBits, n, s)[outputType]();\n };\n };\n\n var createKmacOutputMethod = function (bits, padding, outputType) {\n return function (key, message, outputBits, s) {\n return methods['kmac' + bits].update(key, message, outputBits, s)[outputType]();\n };\n };\n\n var createOutputMethods = function (method, createMethod, bits, padding) {\n for (var i = 0; i < OUTPUT_TYPES.length; ++i) {\n var type = OUTPUT_TYPES[i];\n method[type] = createMethod(bits, padding, type);\n }\n return method;\n };\n\n var createMethod = function (bits, padding) {\n var method = createOutputMethod(bits, padding, 'hex');\n method.create = function () {\n return new Keccak(bits, padding, bits);\n };\n method.update = function (message) {\n return method.create().update(message);\n };\n return createOutputMethods(method, createOutputMethod, bits, padding);\n };\n\n var createShakeMethod = function (bits, padding) {\n var method = createShakeOutputMethod(bits, padding, 'hex');\n method.create = function (outputBits) {\n return new Keccak(bits, padding, output
/***/ }),
/***/ "./node_modules/merge-options/index.js":
/*!*********************************************!*\
!*** ./node_modules/merge-options/index.js ***!
\*********************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict";
eval("\nconst isOptionObject = __webpack_require__(/*! is-plain-obj */ \"./node_modules/is-plain-obj/index.js\");\n\nconst {hasOwnProperty} = Object.prototype;\nconst {propertyIsEnumerable} = Object;\nconst defineProperty = (object, name, value) => Object.defineProperty(object, name, {\n\tvalue,\n\twritable: true,\n\tenumerable: true,\n\tconfigurable: true\n});\n\nconst globalThis = this;\nconst defaultMergeOptions = {\n\tconcatArrays: false,\n\tignoreUndefined: false\n};\n\nconst getEnumerableOwnPropertyKeys = value => {\n\tconst keys = [];\n\n\tfor (const key in value) {\n\t\tif (hasOwnProperty.call(value, key)) {\n\t\t\tkeys.push(key);\n\t\t}\n\t}\n\n\t/* istanbul ignore else */\n\tif (Object.getOwnPropertySymbols) {\n\t\tconst symbols = Object.getOwnPropertySymbols(value);\n\n\t\tfor (const symbol of symbols) {\n\t\t\tif (propertyIsEnumerable.call(value, symbol)) {\n\t\t\t\tkeys.push(symbol);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn keys;\n};\n\nfunction clone(value) {\n\tif (Array.isArray(value)) {\n\t\treturn cloneArray(value);\n\t}\n\n\tif (isOptionObject(value)) {\n\t\treturn cloneOptionObject(value);\n\t}\n\n\treturn value;\n}\n\nfunction cloneArray(array) {\n\tconst result = array.slice(0, 0);\n\n\tgetEnumerableOwnPropertyKeys(array).forEach(key => {\n\t\tdefineProperty(result, key, clone(array[key]));\n\t});\n\n\treturn result;\n}\n\nfunction cloneOptionObject(object) {\n\tconst result = Object.getPrototypeOf(object) === null ? Object.create(null) : {};\n\n\tgetEnumerableOwnPropertyKeys(object).forEach(key => {\n\t\tdefineProperty(result, key, clone(object[key]));\n\t});\n\n\treturn result;\n}\n\n/**\n * @param {*} merged already cloned\n * @param {*} source something to merge\n * @param {string[]} keys keys to merge\n * @param {Object} config Config Object\n * @returns {*} cloned Object\n */\nconst mergeKeys = (merged, source, keys, config) => {\n\tkeys.forEach(key => {\n\t\tif (typeof source[key] === 'undefined' && config.ignoreUndefined) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Do not recurse into prototype chain of merged\n\t\tif (key in merged && merged[key] !== Object.getPrototypeOf(merged)) {\n\t\t\tdefineProperty(merged, key, merge(merged[key], source[key], config));\n\t\t} else {\n\t\t\tdefineProperty(merged, key, clone(source[key]));\n\t\t}\n\t});\n\n\treturn merged;\n};\n\n/**\n * @param {*} merged already cloned\n * @param {*} source something to merge\n * @param {Object} config Config Object\n * @returns {*} cloned Object\n *\n * see [Array.prototype.concat ( ...arguments )](http://www.ecma-international.org/ecma-262/6.0/#sec-array.prototype.concat)\n */\nconst concatArrays = (merged, source, config) => {\n\tlet result = merged.slice(0, 0);\n\tlet resultIndex = 0;\n\n\t[merged, source].forEach(array => {\n\t\tconst indices = [];\n\n\t\t// `result.concat(array)` with cloning\n\t\tfor (let k = 0; k < array.length; k++) {\n\t\t\tif (!hasOwnProperty.call(array, k)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tindices.push(String(k));\n\n\t\t\tif (array === merged) {\n\t\t\t\t// Already cloned\n\t\t\t\tdefineProperty(result, resultIndex++, array[k]);\n\t\t\t} else {\n\t\t\t\tdefineProperty(result, resultIndex++, clone(array[k]));\n\t\t\t}\n\t\t}\n\n\t\t// Merge non-index keys\n\t\tresult = mergeKeys(result, array, getEnumerableOwnPropertyKeys(array).filter(key => !indices.includes(key)), config);\n\t});\n\n\treturn result;\n};\n\n/**\n * @param {*} merged already cloned\n * @param {*} source something to merge\n * @param {Object} config Config Object\n * @returns {*} cloned Object\n */\nfunction merge(merged, source, config) {\n\tif (config.concatArrays && Array.isArray(merged) && Array.isArray(source)) {\n\t\treturn concatArrays(merged, source, config);\n\t}\n\n\tif (!isOptionObject(source) || !isOptionObject(merged)) {\n\t\treturn clone(source);\n\t}\n\n\treturn mergeKeys(merged, source, getEnumerableOwnPropertyKeys(source), config);\n}\n\nmodule.exports = function (...options) {\n\tconst config = merge(clone(defaultMergeOptions), (this !== globalThis && this) || {}, defaultMergeOptions);\n\tlet merged = {_: {}};\n\n\t
/***/ }),
/***/ "./node_modules/ms/index.js":
/*!**********************************!*\
!*** ./node_modules/ms/index.js ***!
\**********************************/
/***/ ((module) => {
eval("/**\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//# sourceURL=webpack://light/./node_modules/ms/index.js?");
/***/ }),
/***/ "./node_modules/multibase/src/base.js":
/*!********************************************!*\
!*** ./node_modules/multibase/src/base.js ***!
\********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
eval("\n\nconst { encodeText } = __webpack_require__(/*! ./util */ \"./node_modules/multibase/src/util.js\")\n\n/** @typedef {import('./types').CodecFactory} CodecFactory */\n/** @typedef {import(\"./types\").BaseName} BaseName */\n/** @typedef {import(\"./types\").BaseCode} BaseCode */\n\n/**\n * Class to encode/decode in the supported Bases\n *\n */\nclass Base {\n /**\n * @param {BaseName} name\n * @param {BaseCode} code\n * @param {CodecFactory} factory\n * @param {string} alphabet\n */\n constructor (name, code, factory, alphabet) {\n this.name = name\n this.code = code\n this.codeBuf = encodeText(this.code)\n this.alphabet = alphabet\n this.codec = factory(alphabet)\n }\n\n /**\n * @param {Uint8Array} buf\n * @returns {string}\n */\n encode (buf) {\n return this.codec.encode(buf)\n }\n\n /**\n * @param {string} string\n * @returns {Uint8Array}\n */\n decode (string) {\n for (const char of string) {\n if (this.alphabet && this.alphabet.indexOf(char) < 0) {\n throw new Error(`invalid character '${char}' in '${string}'`)\n }\n }\n return this.codec.decode(string)\n }\n}\n\nmodule.exports = Base\n\n\n//# sourceURL=webpack://light/./node_modules/multibase/src/base.js?");
/***/ }),
/***/ "./node_modules/multibase/src/constants.js":
/*!*************************************************!*\
!*** ./node_modules/multibase/src/constants.js ***!
\*************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
eval("\n\nconst baseX = __webpack_require__(/*! @multiformats/base-x */ \"./node_modules/@multiformats/base-x/src/index.js\")\nconst Base = __webpack_require__(/*! ./base.js */ \"./node_modules/multibase/src/base.js\")\nconst { rfc4648 } = __webpack_require__(/*! ./rfc4648 */ \"./node_modules/multibase/src/rfc4648.js\")\nconst { decodeText, encodeText } = __webpack_require__(/*! ./util */ \"./node_modules/multibase/src/util.js\")\n\n/** @typedef {import('./types').CodecFactory} CodecFactory */\n/** @typedef {import('./types').Codec} Codec */\n/** @typedef {import('./types').BaseName} BaseName */\n/** @typedef {import('./types').BaseCode} BaseCode */\n\n/** @type {CodecFactory} */\nconst identity = () => {\n return {\n encode: decodeText,\n decode: encodeText\n }\n}\n\n/**\n *\n * name, code, implementation, alphabet\n *\n * @type {Array<[BaseName, BaseCode, CodecFactory, string]>}\n */\nconst constants = [\n ['identity', '\\x00', identity, ''],\n ['base2', '0', rfc4648(1), '01'],\n ['base8', '7', rfc4648(3), '01234567'],\n ['base10', '9', baseX, '0123456789'],\n ['base16', 'f', rfc4648(4), '0123456789abcdef'],\n ['base16upper', 'F', rfc4648(4), '0123456789ABCDEF'],\n ['base32hex', 'v', rfc4648(5), '0123456789abcdefghijklmnopqrstuv'],\n ['base32hexupper', 'V', rfc4648(5), '0123456789ABCDEFGHIJKLMNOPQRSTUV'],\n ['base32hexpad', 't', rfc4648(5), '0123456789abcdefghijklmnopqrstuv='],\n ['base32hexpadupper', 'T', rfc4648(5), '0123456789ABCDEFGHIJKLMNOPQRSTUV='],\n ['base32', 'b', rfc4648(5), 'abcdefghijklmnopqrstuvwxyz234567'],\n ['base32upper', 'B', rfc4648(5), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567'],\n ['base32pad', 'c', rfc4648(5), 'abcdefghijklmnopqrstuvwxyz234567='],\n ['base32padupper', 'C', rfc4648(5), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567='],\n ['base32z', 'h', rfc4648(5), 'ybndrfg8ejkmcpqxot1uwisza345h769'],\n ['base36', 'k', baseX, '0123456789abcdefghijklmnopqrstuvwxyz'],\n ['base36upper', 'K', baseX, '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'],\n ['base58btc', 'z', baseX, '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'],\n ['base58flickr', 'Z', baseX, '123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ'],\n ['base64', 'm', rfc4648(6), 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'],\n ['base64pad', 'M', rfc4648(6), 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='],\n ['base64url', 'u', rfc4648(6), 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_'],\n ['base64urlpad', 'U', rfc4648(6), 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=']\n]\n\n/** @type {Record<BaseName,Base>} */\nconst names = constants.reduce((prev, tupple) => {\n prev[tupple[0]] = new Base(tupple[0], tupple[1], tupple[2], tupple[3])\n return prev\n}, /** @type {Record<BaseName,Base>} */({}))\n\n/** @type {Record<BaseCode,Base>} */\nconst codes = constants.reduce((prev, tupple) => {\n prev[tupple[1]] = names[tupple[0]]\n return prev\n}, /** @type {Record<BaseCode,Base>} */({}))\n\nmodule.exports = {\n names,\n codes\n}\n\n\n//# sourceURL=webpack://light/./node_modules/multibase/src/constants.js?");
/***/ }),
/***/ "./node_modules/multibase/src/index.js":
/*!*********************************************!*\
!*** ./node_modules/multibase/src/index.js ***!
\*********************************************/
/***/ ((module, exports, __webpack_require__) => {
"use strict";
eval("/**\n * Implementation of the [multibase](https://github.com/multiformats/multibase) specification.\n *\n */\n\n\nconst constants = __webpack_require__(/*! ./constants */ \"./node_modules/multibase/src/constants.js\")\nconst { encodeText, decodeText, concat } = __webpack_require__(/*! ./util */ \"./node_modules/multibase/src/util.js\")\n\n/** @typedef {import('./base')} Base */\n/** @typedef {import(\"./types\").BaseNameOrCode} BaseNameOrCode */\n/** @typedef {import(\"./types\").BaseCode} BaseCode */\n/** @typedef {import(\"./types\").BaseName} BaseName */\n\n/**\n * Create a new Uint8Array with the multibase varint+code.\n *\n * @param {BaseNameOrCode} nameOrCode - The multibase name or code number.\n * @param {Uint8Array} buf - The data to be prefixed with multibase.\n * @returns {Uint8Array}\n * @throws {Error} Will throw if the encoding is not supported\n */\nfunction multibase (nameOrCode, buf) {\n if (!buf) {\n throw new Error('requires an encoded Uint8Array')\n }\n const { name, codeBuf } = encoding(nameOrCode)\n validEncode(name, buf)\n\n return concat([codeBuf, buf], codeBuf.length + buf.length)\n}\n\n/**\n * Encode data with the specified base and add the multibase prefix.\n *\n * @param {BaseNameOrCode} nameOrCode - The multibase name or code number.\n * @param {Uint8Array} buf - The data to be encoded.\n * @returns {Uint8Array}\n * @throws {Error} Will throw if the encoding is not supported\n *\n */\nfunction encode (nameOrCode, buf) {\n const enc = encoding(nameOrCode)\n const data = encodeText(enc.encode(buf))\n\n return concat([enc.codeBuf, data], enc.codeBuf.length + data.length)\n}\n\n/**\n * Takes a Uint8Array or string encoded with multibase header, decodes it and\n * returns the decoded buffer\n *\n * @param {Uint8Array|string} data\n * @returns {Uint8Array}\n * @throws {Error} Will throw if the encoding is not supported\n *\n */\nfunction decode (data) {\n if (data instanceof Uint8Array) {\n data = decodeText(data)\n }\n const prefix = data[0]\n\n // Make all encodings case-insensitive except the ones that include upper and lower chars in the alphabet\n if (['f', 'F', 'v', 'V', 't', 'T', 'b', 'B', 'c', 'C', 'h', 'k', 'K'].includes(prefix)) {\n data = data.toLowerCase()\n }\n const enc = encoding(/** @type {BaseCode} */(data[0]))\n return enc.decode(data.substring(1))\n}\n\n/**\n * Is the given data multibase encoded?\n *\n * @param {Uint8Array|string} data\n */\nfunction isEncoded (data) {\n if (data instanceof Uint8Array) {\n data = decodeText(data)\n }\n\n // Ensure bufOrString is a string\n if (Object.prototype.toString.call(data) !== '[object String]') {\n return false\n }\n\n try {\n const enc = encoding(/** @type {BaseCode} */(data[0]))\n return enc.name\n } catch (err) {\n return false\n }\n}\n\n/**\n * Validate encoded data\n *\n * @param {BaseNameOrCode} name\n * @param {Uint8Array} buf\n * @returns {void}\n * @throws {Error} Will throw if the encoding is not supported\n */\nfunction validEncode (name, buf) {\n const enc = encoding(name)\n enc.decode(decodeText(buf))\n}\n\n/**\n * Get the encoding by name or code\n *\n * @param {BaseNameOrCode} nameOrCode\n * @returns {Base}\n * @throws {Error} Will throw if the encoding is not supported\n */\nfunction encoding (nameOrCode) {\n if (Object.prototype.hasOwnProperty.call(constants.names, /** @type {BaseName} */(nameOrCode))) {\n return constants.names[/** @type {BaseName} */(nameOrCode)]\n } else if (Object.prototype.hasOwnProperty.call(constants.codes, /** @type {BaseCode} */(nameOrCode))) {\n return constants.codes[/** @type {BaseCode} */(nameOrCode)]\n } else {\n throw new Error(`Unsupported encoding: ${nameOrCode}`)\n }\n}\n\n/**\n * Get encoding from data\n *\n * @param {string|Uint8Array} data\n * @returns {Base}\n * @throws {Error} Will throw if the encoding is not supported\n */\nfunction encodingFromData (data) {\n if (data instanceof Uint8Array) {\n data = decodeText(data)\n }\n\n return encoding(/** @type {BaseCode} */(data[0]))\n}\n\nexports = module.export
/***/ }),
/***/ "./node_modules/multibase/src/rfc4648.js":
/*!***********************************************!*\
!*** ./node_modules/multibase/src/rfc4648.js ***!
\***********************************************/
/***/ ((module) => {
"use strict";
eval("\n\n/** @typedef {import('./types').CodecFactory} CodecFactory */\n\n/**\n * @param {string} string\n * @param {string} alphabet\n * @param {number} bitsPerChar\n * @returns {Uint8Array}\n */\nconst decode = (string, alphabet, bitsPerChar) => {\n // Build the character lookup table:\n /** @type {Record<string, number>} */\n const codes = {}\n for (let i = 0; i < alphabet.length; ++i) {\n codes[alphabet[i]] = i\n }\n\n // Count the padding bytes:\n let end = string.length\n while (string[end - 1] === '=') {\n --end\n }\n\n // Allocate the output:\n const out = new Uint8Array((end * bitsPerChar / 8) | 0)\n\n // Parse the data:\n let bits = 0 // Number of bits currently in the buffer\n let buffer = 0 // Bits waiting to be written out, MSB first\n let written = 0 // Next byte to write\n for (let i = 0; i < end; ++i) {\n // Read one character from the string:\n const value = codes[string[i]]\n if (value === undefined) {\n throw new SyntaxError('Invalid character ' + string[i])\n }\n\n // Append the bits to the buffer:\n buffer = (buffer << bitsPerChar) | value\n bits += bitsPerChar\n\n // Write out some bits if the buffer has a byte's worth:\n if (bits >= 8) {\n bits -= 8\n out[written++] = 0xff & (buffer >> bits)\n }\n }\n\n // Verify that we have received just enough bits:\n if (bits >= bitsPerChar || 0xff & (buffer << (8 - bits))) {\n throw new SyntaxError('Unexpected end of data')\n }\n\n return out\n}\n\n/**\n * @param {Uint8Array} data\n * @param {string} alphabet\n * @param {number} bitsPerChar\n * @returns {string}\n */\nconst encode = (data, alphabet, bitsPerChar) => {\n const pad = alphabet[alphabet.length - 1] === '='\n const mask = (1 << bitsPerChar) - 1\n let out = ''\n\n let bits = 0 // Number of bits currently in the buffer\n let buffer = 0 // Bits waiting to be written out, MSB first\n for (let i = 0; i < data.length; ++i) {\n // Slurp data into the buffer:\n buffer = (buffer << 8) | data[i]\n bits += 8\n\n // Write out as much as we can:\n while (bits > bitsPerChar) {\n bits -= bitsPerChar\n out += alphabet[mask & (buffer >> bits)]\n }\n }\n\n // Partial character:\n if (bits) {\n out += alphabet[mask & (buffer << (bitsPerChar - bits))]\n }\n\n // Add padding characters until we hit a byte boundary:\n if (pad) {\n while ((out.length * bitsPerChar) & 7) {\n out += '='\n }\n }\n\n return out\n}\n\n/**\n * RFC4648 Factory\n *\n * @param {number} bitsPerChar\n * @returns {CodecFactory}\n */\nconst rfc4648 = (bitsPerChar) => (alphabet) => {\n return {\n /**\n * @param {Uint8Array} input\n * @returns {string}\n */\n encode (input) {\n return encode(input, alphabet, bitsPerChar)\n },\n /**\n * @param {string} input\n * @returns {Uint8Array}\n */\n decode (input) {\n return decode(input, alphabet, bitsPerChar)\n }\n }\n}\n\nmodule.exports = { rfc4648 }\n\n\n//# sourceURL=webpack://light/./node_modules/multibase/src/rfc4648.js?");
/***/ }),
/***/ "./node_modules/multibase/src/util.js":
/*!********************************************!*\
!*** ./node_modules/multibase/src/util.js ***!
\********************************************/
/***/ ((module) => {
"use strict";
eval("\n\nconst textDecoder = new TextDecoder()\n/**\n * @param {ArrayBufferView|ArrayBuffer} bytes\n * @returns {string}\n */\nconst decodeText = (bytes) => textDecoder.decode(bytes)\n\nconst textEncoder = new TextEncoder()\n/**\n * @param {string} text\n * @returns {Uint8Array}\n */\nconst encodeText = (text) => textEncoder.encode(text)\n\n/**\n * Returns a new Uint8Array created by concatenating the passed Arrays\n *\n * @param {Array<ArrayLike<number>>} arrs\n * @param {number} length\n * @returns {Uint8Array}\n */\nfunction concat (arrs, length) {\n const output = new Uint8Array(length)\n let offset = 0\n\n for (const arr of arrs) {\n output.set(arr, offset)\n offset += arr.length\n }\n\n return output\n}\n\nmodule.exports = { decodeText, encodeText, concat }\n\n\n//# sourceURL=webpack://light/./node_modules/multibase/src/util.js?");
/***/ }),
/***/ "./node_modules/multihashes/node_modules/varint/decode.js":
/*!****************************************************************!*\
!*** ./node_modules/multihashes/node_modules/varint/decode.js ***!
\****************************************************************/
/***/ ((module) => {
eval("module.exports = read\n\nvar MSB = 0x80\n , REST = 0x7F\n\nfunction read(buf, offset) {\n var res = 0\n , offset = offset || 0\n , shift = 0\n , counter = offset\n , b\n , l = buf.length\n\n do {\n if (counter >= l) {\n read.bytes = 0\n throw new RangeError('Could not decode varint')\n }\n b = buf[counter++]\n res += shift < 28\n ? (b & REST) << shift\n : (b & REST) * Math.pow(2, shift)\n shift += 7\n } while (b >= MSB)\n\n read.bytes = counter - offset\n\n return res\n}\n\n\n//# sourceURL=webpack://light/./node_modules/multihashes/node_modules/varint/decode.js?");
/***/ }),
/***/ "./node_modules/multihashes/node_modules/varint/encode.js":
/*!****************************************************************!*\
!*** ./node_modules/multihashes/node_modules/varint/encode.js ***!
\****************************************************************/
/***/ ((module) => {
eval("module.exports = encode\n\nvar MSB = 0x80\n , REST = 0x7F\n , MSBALL = ~REST\n , INT = Math.pow(2, 31)\n\nfunction encode(num, out, offset) {\n out = out || []\n offset = offset || 0\n var oldOffset = offset\n\n while(num >= INT) {\n out[offset++] = (num & 0xFF) | MSB\n num /= 128\n }\n while(num & MSBALL) {\n out[offset++] = (num & 0xFF) | MSB\n num >>>= 7\n }\n out[offset] = num | 0\n \n encode.bytes = offset - oldOffset + 1\n \n return out\n}\n\n\n//# sourceURL=webpack://light/./node_modules/multihashes/node_modules/varint/encode.js?");
/***/ }),
/***/ "./node_modules/multihashes/node_modules/varint/index.js":
/*!***************************************************************!*\
!*** ./node_modules/multihashes/node_modules/varint/index.js ***!
\***************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
eval("module.exports = {\n encode: __webpack_require__(/*! ./encode.js */ \"./node_modules/multihashes/node_modules/varint/encode.js\")\n , decode: __webpack_require__(/*! ./decode.js */ \"./node_modules/multihashes/node_modules/varint/decode.js\")\n , encodingLength: __webpack_require__(/*! ./length.js */ \"./node_modules/multihashes/node_modules/varint/length.js\")\n}\n\n\n//# sourceURL=webpack://light/./node_modules/multihashes/node_modules/varint/index.js?");
/***/ }),
/***/ "./node_modules/multihashes/node_modules/varint/length.js":
/*!****************************************************************!*\
!*** ./node_modules/multihashes/node_modules/varint/length.js ***!
\****************************************************************/
/***/ ((module) => {
eval("\nvar N1 = Math.pow(2, 7)\nvar N2 = Math.pow(2, 14)\nvar N3 = Math.pow(2, 21)\nvar N4 = Math.pow(2, 28)\nvar N5 = Math.pow(2, 35)\nvar N6 = Math.pow(2, 42)\nvar N7 = Math.pow(2, 49)\nvar N8 = Math.pow(2, 56)\nvar N9 = Math.pow(2, 63)\n\nmodule.exports = function (value) {\n return (\n value < N1 ? 1\n : value < N2 ? 2\n : value < N3 ? 3\n : value < N4 ? 4\n : value < N5 ? 5\n : value < N6 ? 6\n : value < N7 ? 7\n : value < N8 ? 8\n : value < N9 ? 9\n : 10\n )\n}\n\n\n//# sourceURL=webpack://light/./node_modules/multihashes/node_modules/varint/length.js?");
/***/ }),
/***/ "./node_modules/multihashes/src/constants.js":
/*!***************************************************!*\
!*** ./node_modules/multihashes/src/constants.js ***!
\***************************************************/
/***/ ((module) => {
"use strict";
eval("/* eslint quote-props: off */\n\n\n/**\n * Names for all available hashes\n *\n * @typedef { \"identity\" | \"sha1\" | \"sha2-256\" | \"sha2-512\" | \"sha3-512\" | \"sha3-384\" | \"sha3-256\" | \"sha3-224\" | \"shake-128\" | \"shake-256\" | \"keccak-224\" | \"keccak-256\" | \"keccak-384\" | \"keccak-512\" | \"blake3\" | \"murmur3-128\" | \"murmur3-32\" | \"dbl-sha2-256\" | \"md4\" | \"md5\" | \"bmt\" | \"sha2-256-trunc254-padded\" | \"ripemd-128\" | \"ripemd-160\" | \"ripemd-256\" | \"ripemd-320\" | \"x11\" | \"kangarootwelve\" | \"sm3-256\" | \"blake2b-8\" | \"blake2b-16\" | \"blake2b-24\" | \"blake2b-32\" | \"blake2b-40\" | \"blake2b-48\" | \"blake2b-56\" | \"blake2b-64\" | \"blake2b-72\" | \"blake2b-80\" | \"blake2b-88\" | \"blake2b-96\" | \"blake2b-104\" | \"blake2b-112\" | \"blake2b-120\" | \"blake2b-128\" | \"blake2b-136\" | \"blake2b-144\" | \"blake2b-152\" | \"blake2b-160\" | \"blake2b-168\" | \"blake2b-176\" | \"blake2b-184\" | \"blake2b-192\" | \"blake2b-200\" | \"blake2b-208\" | \"blake2b-216\" | \"blake2b-224\" | \"blake2b-232\" | \"blake2b-240\" | \"blake2b-248\" | \"blake2b-256\" | \"blake2b-264\" | \"blake2b-272\" | \"blake2b-280\" | \"blake2b-288\" | \"blake2b-296\" | \"blake2b-304\" | \"blake2b-312\" | \"blake2b-320\" | \"blake2b-328\" | \"blake2b-336\" | \"blake2b-344\" | \"blake2b-352\" | \"blake2b-360\" | \"blake2b-368\" | \"blake2b-376\" | \"blake2b-384\" | \"blake2b-392\" | \"blake2b-400\" | \"blake2b-408\" | \"blake2b-416\" | \"blake2b-424\" | \"blake2b-432\" | \"blake2b-440\" | \"blake2b-448\" | \"blake2b-456\" | \"blake2b-464\" | \"blake2b-472\" | \"blake2b-480\" | \"blake2b-488\" | \"blake2b-496\" | \"blake2b-504\" | \"blake2b-512\" | \"blake2s-8\" | \"blake2s-16\" | \"blake2s-24\" | \"blake2s-32\" | \"blake2s-40\" | \"blake2s-48\" | \"blake2s-56\" | \"blake2s-64\" | \"blake2s-72\" | \"blake2s-80\" | \"blake2s-88\" | \"blake2s-96\" | \"blake2s-104\" | \"blake2s-112\" | \"blake2s-120\" | \"blake2s-128\" | \"blake2s-136\" | \"blake2s-144\" | \"blake2s-152\" | \"blake2s-160\" | \"blake2s-168\" | \"blake2s-176\" | \"blake2s-184\" | \"blake2s-192\" | \"blake2s-200\" | \"blake2s-208\" | \"blake2s-216\" | \"blake2s-224\" | \"blake2s-232\" | \"blake2s-240\" | \"blake2s-248\" | \"blake2s-256\" | \"skein256-8\" | \"skein256-16\" | \"skein256-24\" | \"skein256-32\" | \"skein256-40\" | \"skein256-48\" | \"skein256-56\" | \"skein256-64\" | \"skein256-72\" | \"skein256-80\" | \"skein256-88\" | \"skein256-96\" | \"skein256-104\" | \"skein256-112\" | \"skein256-120\" | \"skein256-128\" | \"skein256-136\" | \"skein256-144\" | \"skein256-152\" | \"skein256-160\" | \"skein256-168\" | \"skein256-176\" | \"skein256-184\" | \"skein256-192\" | \"skein256-200\" | \"skein256-208\" | \"skein256-216\" | \"skein256-224\" | \"skein256-232\" | \"skein256-240\" | \"skein256-248\" | \"skein256-256\" | \"skein512-8\" | \"skein512-16\" | \"skein512-24\" | \"skein512-32\" | \"skein512-40\" | \"skein512-48\" | \"skein512-56\" | \"skein512-64\" | \"skein512-72\" | \"skein512-80\" | \"skein512-88\" | \"skein512-96\" | \"skein512-104\" | \"skein512-112\" | \"skein512-120\" | \"skein512-128\" | \"skein512-136\" | \"skein512-144\" | \"skein512-152\" | \"skein512-160\" | \"skein512-168\" | \"skein512-176\" | \"skein512-184\" | \"skein512-192\" | \"skein512-200\" | \"skein512-208\" | \"skein512-216\" | \"skein512-224\" | \"skein512-232\" | \"skein512-240\" | \"skein512-248\" | \"skein512-256\" | \"skein512-264\" | \"skein512-272\" | \"skein512-280\" | \"skein512-288\" | \"skein512-296\" | \"skein512-304\" | \"skein512-312\" | \"skein512-320\" | \"skein512-328\" | \"skein512-336\" | \"skein512-344\" | \"skein512-352\" | \"skein512-360\" | \"skein512-368\" | \"skein512-376\" | \"skein512-384\" | \"skein512-392\" | \"skein512-400\" | \"skein512-408\" | \"skein512-416\" | \"skein512-424\" | \"skein512-432\" | \"skein512-440\" | \"skein512-448\" | \"skein512-456\" | \"skein512-464\" | \"skein512-472\" | \"skein512-480\" | \"skein512-488\" | \"skein512-496\" | \"skein512-504\" | \"skein512-512\" | \"skein1024-8\" | \"skein1024-16\" | \"
/***/ }),
/***/ "./node_modules/multihashes/src/index.js":
/*!***********************************************!*\
!*** ./node_modules/multihashes/src/index.js ***!
\***********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
eval("/**\n * Multihash implementation in JavaScript.\n */\n\n\nconst multibase = __webpack_require__(/*! multibase */ \"./node_modules/multibase/src/index.js\")\nconst varint = __webpack_require__(/*! varint */ \"./node_modules/multihashes/node_modules/varint/index.js\")\nconst { names } = __webpack_require__(/*! ./constants */ \"./node_modules/multihashes/src/constants.js\")\nconst { toString: uint8ArrayToString } = __webpack_require__(/*! uint8arrays/to-string */ \"./node_modules/multihashes/node_modules/uint8arrays/esm/src/to-string.js\")\nconst { fromString: uint8ArrayFromString } = __webpack_require__(/*! uint8arrays/from-string */ \"./node_modules/multihashes/node_modules/uint8arrays/esm/src/from-string.js\")\nconst { concat: uint8ArrayConcat } = __webpack_require__(/*! uint8arrays/concat */ \"./node_modules/multihashes/node_modules/uint8arrays/esm/src/concat.js\")\n\nconst codes = /** @type {import('./types').CodeNameMap} */({})\n\n// eslint-disable-next-line guard-for-in\nfor (const key in names) {\n const name = /** @type {HashName} */(key)\n codes[names[name]] = name\n}\nObject.freeze(codes)\n\n/**\n * Convert the given multihash to a hex encoded string.\n *\n * @param {Uint8Array} hash\n * @returns {string}\n */\nfunction toHexString (hash) {\n if (!(hash instanceof Uint8Array)) {\n throw new Error('must be passed a Uint8Array')\n }\n\n return uint8ArrayToString(hash, 'base16')\n}\n\n/**\n * Convert the given hex encoded string to a multihash.\n *\n * @param {string} hash\n * @returns {Uint8Array}\n */\nfunction fromHexString (hash) {\n return uint8ArrayFromString(hash, 'base16')\n}\n\n/**\n * Convert the given multihash to a base58 encoded string.\n *\n * @param {Uint8Array} hash\n * @returns {string}\n */\nfunction toB58String (hash) {\n if (!(hash instanceof Uint8Array)) {\n throw new Error('must be passed a Uint8Array')\n }\n\n return uint8ArrayToString(multibase.encode('base58btc', hash)).slice(1)\n}\n\n/**\n * Convert the given base58 encoded string to a multihash.\n *\n * @param {string|Uint8Array} hash\n * @returns {Uint8Array}\n */\nfunction fromB58String (hash) {\n const encoded = hash instanceof Uint8Array\n ? uint8ArrayToString(hash)\n : hash\n\n return multibase.decode('z' + encoded)\n}\n\n/**\n * Decode a hash from the given multihash.\n *\n * @param {Uint8Array} bytes\n * @returns {{code: HashCode, name: HashName, length: number, digest: Uint8Array}} result\n */\nfunction decode (bytes) {\n if (!(bytes instanceof Uint8Array)) {\n throw new Error('multihash must be a Uint8Array')\n }\n\n if (bytes.length < 2) {\n throw new Error('multihash too short. must be > 2 bytes.')\n }\n\n const code = /** @type {HashCode} */(varint.decode(bytes))\n if (!isValidCode(code)) {\n throw new Error(`multihash unknown function code: 0x${code.toString(16)}`)\n }\n bytes = bytes.slice(varint.decode.bytes)\n\n const len = varint.decode(bytes)\n if (len < 0) {\n throw new Error(`multihash invalid length: ${len}`)\n }\n bytes = bytes.slice(varint.decode.bytes)\n\n if (bytes.length !== len) {\n throw new Error(`multihash length inconsistent: 0x${uint8ArrayToString(bytes, 'base16')}`)\n }\n\n return {\n code,\n name: codes[code],\n length: len,\n digest: bytes\n }\n}\n\n/**\n * Encode a hash digest along with the specified function code.\n *\n * > **Note:** the length is derived from the length of the digest itself.\n *\n * @param {Uint8Array} digest\n * @param {HashName | HashCode} code\n * @param {number} [length]\n * @returns {Uint8Array}\n */\nfunction encode (digest, code, length) {\n if (!digest || code === undefined) {\n throw new Error('multihash encode requires at least two args: digest, code')\n }\n\n // ensure it's a hashfunction code.\n const hashfn = coerceCode(code)\n\n if (!(digest instanceof Uint8Array)) {\n throw new Error('digest should be a Uint8Array')\n }\n\n if (length == null) {\n length = digest.length\n }\n\n if (length && digest.length !== length) {\n throw new Error('digest length should be equal to specifi
/***/ }),
/***/ "./node_modules/netmask/lib/netmask.js":
/*!*********************************************!*\
!*** ./node_modules/netmask/lib/netmask.js ***!
\*********************************************/
/***/ (function(__unused_webpack_module, exports) {
eval("// Generated by CoffeeScript 1.12.7\n(function() {\n var Netmask, atob, chr, chr0, chrA, chra, ip2long, long2ip;\n\n long2ip = function(long) {\n var a, b, c, d;\n a = (long & (0xff << 24)) >>> 24;\n b = (long & (0xff << 16)) >>> 16;\n c = (long & (0xff << 8)) >>> 8;\n d = long & 0xff;\n return [a, b, c, d].join('.');\n };\n\n ip2long = function(ip) {\n var b, c, i, j, n, ref;\n b = [];\n for (i = j = 0; j <= 3; i = ++j) {\n if (ip.length === 0) {\n break;\n }\n if (i > 0) {\n if (ip[0] !== '.') {\n throw new Error('Invalid IP');\n }\n ip = ip.substring(1);\n }\n ref = atob(ip), n = ref[0], c = ref[1];\n ip = ip.substring(c);\n b.push(n);\n }\n if (ip.length !== 0) {\n throw new Error('Invalid IP');\n }\n switch (b.length) {\n case 1:\n if (b[0] > 0xFFFFFFFF) {\n throw new Error('Invalid IP');\n }\n return b[0] >>> 0;\n case 2:\n if (b[0] > 0xFF || b[1] > 0xFFFFFF) {\n throw new Error('Invalid IP');\n }\n return (b[0] << 24 | b[1]) >>> 0;\n case 3:\n if (b[0] > 0xFF || b[1] > 0xFF || b[2] > 0xFFFF) {\n throw new Error('Invalid IP');\n }\n return (b[0] << 24 | b[1] << 16 | b[2]) >>> 0;\n case 4:\n if (b[0] > 0xFF || b[1] > 0xFF || b[2] > 0xFF || b[3] > 0xFF) {\n throw new Error('Invalid IP');\n }\n return (b[0] << 24 | b[1] << 16 | b[2] << 8 | b[3]) >>> 0;\n default:\n throw new Error('Invalid IP');\n }\n };\n\n chr = function(b) {\n return b.charCodeAt(0);\n };\n\n chr0 = chr('0');\n\n chra = chr('a');\n\n chrA = chr('A');\n\n atob = function(s) {\n var base, dmax, i, n, start;\n n = 0;\n base = 10;\n dmax = '9';\n i = 0;\n if (s.length > 1 && s[i] === '0') {\n if (s[i + 1] === 'x' || s[i + 1] === 'X') {\n i += 2;\n base = 16;\n } else if ('0' <= s[i + 1] && s[i + 1] <= '9') {\n i++;\n base = 8;\n dmax = '7';\n }\n }\n start = i;\n while (i < s.length) {\n if ('0' <= s[i] && s[i] <= dmax) {\n n = (n * base + (chr(s[i]) - chr0)) >>> 0;\n } else if (base === 16) {\n if ('a' <= s[i] && s[i] <= 'f') {\n n = (n * base + (10 + chr(s[i]) - chra)) >>> 0;\n } else if ('A' <= s[i] && s[i] <= 'F') {\n n = (n * base + (10 + chr(s[i]) - chrA)) >>> 0;\n } else {\n break;\n }\n } else {\n break;\n }\n if (n > 0xFFFFFFFF) {\n throw new Error('too large');\n }\n i++;\n }\n if (i === start) {\n throw new Error('empty octet');\n }\n return [n, i];\n };\n\n Netmask = (function() {\n function Netmask(net, mask) {\n var error, i, j, ref;\n if (typeof net !== 'string') {\n throw new Error(\"Missing `net' parameter\");\n }\n if (!mask) {\n ref = net.split('/', 2), net = ref[0], mask = ref[1];\n }\n if (!mask) {\n mask = 32;\n }\n if (typeof mask === 'string' && mask.indexOf('.') > -1) {\n try {\n this.maskLong = ip2long(mask);\n } catch (error1) {\n error = error1;\n throw new Error(\"Invalid mask: \" + mask);\n }\n for (i = j = 32; j >= 0; i = --j) {\n if (this.maskLong === (0xffffffff << (32 - i)) >>> 0) {\n this.bitmask = i;\n break;\n }\n }\n } else if (mask || mask === 0) {\n this.bitmask = parseInt(mask, 10);\n this.maskLong = 0;\n if (this.bitmask > 0) {\n this.maskLong = (0xffffffff << (32 - this.bitmask)) >>> 0;\n }\n } else {\n throw new Error(\"Invalid mask: empty\");\n }\n try {\n this.netLong = (ip2long(net) & this.maskLong) >>> 0;\n } catch (error1) {\n error = error1;\n throw new Error(\"Invalid net address: \" + net);\n }\n if (!(this.bitmask <= 32)) {\n throw new Error(\
/***/ }),
/***/ "./node_modules/node-forge/lib/aes.js":
/*!********************************************!*\
!*** ./node_modules/node-forge/lib/aes.js ***!
\********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
eval("/**\n * Advanced Encryption Standard (AES) implementation.\n *\n * This implementation is based on the public domain library 'jscrypto' which\n * was written by:\n *\n * Emily Stark (estark@stanford.edu)\n * Mike Hamburg (mhamburg@stanford.edu)\n * Dan Boneh (dabo@cs.stanford.edu)\n *\n * Parts of this code are based on the OpenSSL implementation of AES:\n * http://www.openssl.org\n *\n * @author Dave Longley\n *\n * Copyright (c) 2010-2014 Digital Bazaar, Inc.\n */\nvar forge = __webpack_require__(/*! ./forge */ \"./node_modules/node-forge/lib/forge.js\");\n__webpack_require__(/*! ./cipher */ \"./node_modules/node-forge/lib/cipher.js\");\n__webpack_require__(/*! ./cipherModes */ \"./node_modules/node-forge/lib/cipherModes.js\");\n__webpack_require__(/*! ./util */ \"./node_modules/node-forge/lib/util.js\");\n\n/* AES API */\nmodule.exports = forge.aes = forge.aes || {};\n\n/**\n * Deprecated. Instead, use:\n *\n * var cipher = forge.cipher.createCipher('AES-<mode>', key);\n * cipher.start({iv: iv});\n *\n * Creates an AES cipher object to encrypt data using the given symmetric key.\n * The output will be stored in the 'output' member of the returned cipher.\n *\n * The key and iv may be given as a string of bytes, an array of bytes,\n * a byte buffer, or an array of 32-bit words.\n *\n * @param key the symmetric key to use.\n * @param iv the initialization vector to use.\n * @param output the buffer to write to, null to create one.\n * @param mode the cipher mode to use (default: 'CBC').\n *\n * @return the cipher.\n */\nforge.aes.startEncrypting = function(key, iv, output, mode) {\n var cipher = _createCipher({\n key: key,\n output: output,\n decrypt: false,\n mode: mode\n });\n cipher.start(iv);\n return cipher;\n};\n\n/**\n * Deprecated. Instead, use:\n *\n * var cipher = forge.cipher.createCipher('AES-<mode>', key);\n *\n * Creates an AES cipher object to encrypt data using the given symmetric key.\n *\n * The key may be given as a string of bytes, an array of bytes, a\n * byte buffer, or an array of 32-bit words.\n *\n * @param key the symmetric key to use.\n * @param mode the cipher mode to use (default: 'CBC').\n *\n * @return the cipher.\n */\nforge.aes.createEncryptionCipher = function(key, mode) {\n return _createCipher({\n key: key,\n output: null,\n decrypt: false,\n mode: mode\n });\n};\n\n/**\n * Deprecated. Instead, use:\n *\n * var decipher = forge.cipher.createDecipher('AES-<mode>', key);\n * decipher.start({iv: iv});\n *\n * Creates an AES cipher object to decrypt data using the given symmetric key.\n * The output will be stored in the 'output' member of the returned cipher.\n *\n * The key and iv may be given as a string of bytes, an array of bytes,\n * a byte buffer, or an array of 32-bit words.\n *\n * @param key the symmetric key to use.\n * @param iv the initialization vector to use.\n * @param output the buffer to write to, null to create one.\n * @param mode the cipher mode to use (default: 'CBC').\n *\n * @return the cipher.\n */\nforge.aes.startDecrypting = function(key, iv, output, mode) {\n var cipher = _createCipher({\n key: key,\n output: output,\n decrypt: true,\n mode: mode\n });\n cipher.start(iv);\n return cipher;\n};\n\n/**\n * Deprecated. Instead, use:\n *\n * var decipher = forge.cipher.createDecipher('AES-<mode>', key);\n *\n * Creates an AES cipher object to decrypt data using the given symmetric key.\n *\n * The key may be given as a string of bytes, an array of bytes, a\n * byte buffer, or an array of 32-bit words.\n *\n * @param key the symmetric key to use.\n * @param mode the cipher mode to use (default: 'CBC').\n *\n * @return the cipher.\n */\nforge.aes.createDecryptionCipher = function(key, mode) {\n return _createCipher({\n key: key,\n output: null,\n decrypt: true,\n mode: mode\n });\n};\n\n/**\n * Creates a new AES cipher algorithm object.\n *\n * @param name the name of the algorithm.\n * @param mode the mode factory function.\n *\n * @return the AES algorithm object.\n */\nforge.aes.Algorithm = function
/***/ }),
/***/ "./node_modules/node-forge/lib/asn1.js":
/*!*********************************************!*\
!*** ./node_modules/node-forge/lib/asn1.js ***!
\*********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
eval("/**\n * Javascript implementation of Abstract Syntax Notation Number One.\n *\n * @author Dave Longley\n *\n * Copyright (c) 2010-2015 Digital Bazaar, Inc.\n *\n * An API for storing data using the Abstract Syntax Notation Number One\n * format using DER (Distinguished Encoding Rules) encoding. This encoding is\n * commonly used to store data for PKI, i.e. X.509 Certificates, and this\n * implementation exists for that purpose.\n *\n * Abstract Syntax Notation Number One (ASN.1) is used to define the abstract\n * syntax of information without restricting the way the information is encoded\n * for transmission. It provides a standard that allows for open systems\n * communication. ASN.1 defines the syntax of information data and a number of\n * simple data types as well as a notation for describing them and specifying\n * values for them.\n *\n * The RSA algorithm creates public and private keys that are often stored in\n * X.509 or PKCS#X formats -- which use ASN.1 (encoded in DER format). This\n * class provides the most basic functionality required to store and load DSA\n * keys that are encoded according to ASN.1.\n *\n * The most common binary encodings for ASN.1 are BER (Basic Encoding Rules)\n * and DER (Distinguished Encoding Rules). DER is just a subset of BER that\n * has stricter requirements for how data must be encoded.\n *\n * Each ASN.1 structure has a tag (a byte identifying the ASN.1 structure type)\n * and a byte array for the value of this ASN1 structure which may be data or a\n * list of ASN.1 structures.\n *\n * Each ASN.1 structure using BER is (Tag-Length-Value):\n *\n * | byte 0 | bytes X | bytes Y |\n * |--------|---------|----------\n * | tag | length | value |\n *\n * ASN.1 allows for tags to be of \"High-tag-number form\" which allows a tag to\n * be two or more octets, but that is not supported by this class. A tag is\n * only 1 byte. Bits 1-5 give the tag number (ie the data type within a\n * particular 'class'), 6 indicates whether or not the ASN.1 value is\n * constructed from other ASN.1 values, and bits 7 and 8 give the 'class'. If\n * bits 7 and 8 are both zero, the class is UNIVERSAL. If only bit 7 is set,\n * then the class is APPLICATION. If only bit 8 is set, then the class is\n * CONTEXT_SPECIFIC. If both bits 7 and 8 are set, then the class is PRIVATE.\n * The tag numbers for the data types for the class UNIVERSAL are listed below:\n *\n * UNIVERSAL 0 Reserved for use by the encoding rules\n * UNIVERSAL 1 Boolean type\n * UNIVERSAL 2 Integer type\n * UNIVERSAL 3 Bitstring type\n * UNIVERSAL 4 Octetstring type\n * UNIVERSAL 5 Null type\n * UNIVERSAL 6 Object identifier type\n * UNIVERSAL 7 Object descriptor type\n * UNIVERSAL 8 External type and Instance-of type\n * UNIVERSAL 9 Real type\n * UNIVERSAL 10 Enumerated type\n * UNIVERSAL 11 Embedded-pdv type\n * UNIVERSAL 12 UTF8String type\n * UNIVERSAL 13 Relative object identifier type\n * UNIVERSAL 14-15 Reserved for future editions\n * UNIVERSAL 16 Sequence and Sequence-of types\n * UNIVERSAL 17 Set and Set-of types\n * UNIVERSAL 18-22, 25-30 Character string types\n * UNIVERSAL 23-24 Time types\n *\n * The length of an ASN.1 structure is specified after the tag identifier.\n * There is a definite form and an indefinite form. The indefinite form may\n * be used if the encoding is constructed and not all immediately available.\n * The indefinite form is encoded using a length byte with only the 8th bit\n * set. The end of the constructed object is marked using end-of-contents\n * octets (two zero bytes).\n *\n * The definite form looks like this:\n *\n * The length may take up 1 or more bytes, it depends on the length of the\n * value of the ASN.1 structure. DER encoding requires that if the ASN.1\n * structure has a value that has a length greater than 127, more than 1 byte\n * will be used to store its length, otherwise just one byte will be used.\n * This is strict.\n *\n * In the case that the length of the ASN.1 value is less than 127, 1 octet\n * (byte) is used to store the \"short form\" length. The 8th bit has a
/***/ }),
/***/ "./node_modules/node-forge/lib/baseN.js":
/*!**********************************************!*\
!*** ./node_modules/node-forge/lib/baseN.js ***!
\**********************************************/
/***/ ((module) => {
eval("/**\n * Base-N/Base-X encoding/decoding functions.\n *\n * Original implementation from base-x:\n * https://github.com/cryptocoinjs/base-x\n *\n * Which is MIT licensed:\n *\n * The MIT License (MIT)\n *\n * Copyright base-x contributors (c) 2016\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n * DEALINGS IN THE SOFTWARE.\n */\nvar api = {};\nmodule.exports = api;\n\n// baseN alphabet indexes\nvar _reverseAlphabets = {};\n\n/**\n * BaseN-encodes a Uint8Array using the given alphabet.\n *\n * @param input the Uint8Array to encode.\n * @param maxline the maximum number of encoded characters per line to use,\n * defaults to none.\n *\n * @return the baseN-encoded output string.\n */\napi.encode = function(input, alphabet, maxline) {\n if(typeof alphabet !== 'string') {\n throw new TypeError('\"alphabet\" must be a string.');\n }\n if(maxline !== undefined && typeof maxline !== 'number') {\n throw new TypeError('\"maxline\" must be a number.');\n }\n\n var output = '';\n\n if(!(input instanceof Uint8Array)) {\n // assume forge byte buffer\n output = _encodeWithByteBuffer(input, alphabet);\n } else {\n var i = 0;\n var base = alphabet.length;\n var first = alphabet.charAt(0);\n var digits = [0];\n for(i = 0; i < input.length; ++i) {\n for(var j = 0, carry = input[i]; j < digits.length; ++j) {\n carry += digits[j] << 8;\n digits[j] = carry % base;\n carry = (carry / base) | 0;\n }\n\n while(carry > 0) {\n digits.push(carry % base);\n carry = (carry / base) | 0;\n }\n }\n\n // deal with leading zeros\n for(i = 0; input[i] === 0 && i < input.length - 1; ++i) {\n output += first;\n }\n // convert digits to a string\n for(i = digits.length - 1; i >= 0; --i) {\n output += alphabet[digits[i]];\n }\n }\n\n if(maxline) {\n var regex = new RegExp('.{1,' + maxline + '}', 'g');\n output = output.match(regex).join('\\r\\n');\n }\n\n return output;\n};\n\n/**\n * Decodes a baseN-encoded (using the given alphabet) string to a\n * Uint8Array.\n *\n * @param input the baseN-encoded input string.\n *\n * @return the Uint8Array.\n */\napi.decode = function(input, alphabet) {\n if(typeof input !== 'string') {\n throw new TypeError('\"input\" must be a string.');\n }\n if(typeof alphabet !== 'string') {\n throw new TypeError('\"alphabet\" must be a string.');\n }\n\n var table = _reverseAlphabets[alphabet];\n if(!table) {\n // compute reverse alphabet\n table = _reverseAlphabets[alphabet] = [];\n for(var i = 0; i < alphabet.length; ++i) {\n table[alphabet.charCodeAt(i)] = i;\n }\n }\n\n // remove whitespace characters\n input = input.replace(/\\s/g, '');\n\n var base = alphabet.length;\n var first = alphabet.charAt(0);\n var bytes = [0];\n for(var i = 0; i < input.length; i++) {\n var value = table[input.charCodeAt(i)];\n if(value === undefined) {\n return;\n }\n\n for(var j = 0, carry = value; j < bytes.length; ++j) {\n carry += bytes[j] * base;
/***/ }),
/***/ "./node_modules/node-forge/lib/cipher.js":
/*!***********************************************!*\
!*** ./node_modules/node-forge/lib/cipher.js ***!
\***********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
eval("/**\n * Cipher base API.\n *\n * @author Dave Longley\n *\n * Copyright (c) 2010-2014 Digital Bazaar, Inc.\n */\nvar forge = __webpack_require__(/*! ./forge */ \"./node_modules/node-forge/lib/forge.js\");\n__webpack_require__(/*! ./util */ \"./node_modules/node-forge/lib/util.js\");\n\nmodule.exports = forge.cipher = forge.cipher || {};\n\n// registered algorithms\nforge.cipher.algorithms = forge.cipher.algorithms || {};\n\n/**\n * Creates a cipher object that can be used to encrypt data using the given\n * algorithm and key. The algorithm may be provided as a string value for a\n * previously registered algorithm or it may be given as a cipher algorithm\n * API object.\n *\n * @param algorithm the algorithm to use, either a string or an algorithm API\n * object.\n * @param key the key to use, as a binary-encoded string of bytes or a\n * byte buffer.\n *\n * @return the cipher.\n */\nforge.cipher.createCipher = function(algorithm, key) {\n var api = algorithm;\n if(typeof api === 'string') {\n api = forge.cipher.getAlgorithm(api);\n if(api) {\n api = api();\n }\n }\n if(!api) {\n throw new Error('Unsupported algorithm: ' + algorithm);\n }\n\n // assume block cipher\n return new forge.cipher.BlockCipher({\n algorithm: api,\n key: key,\n decrypt: false\n });\n};\n\n/**\n * Creates a decipher object that can be used to decrypt data using the given\n * algorithm and key. The algorithm may be provided as a string value for a\n * previously registered algorithm or it may be given as a cipher algorithm\n * API object.\n *\n * @param algorithm the algorithm to use, either a string or an algorithm API\n * object.\n * @param key the key to use, as a binary-encoded string of bytes or a\n * byte buffer.\n *\n * @return the cipher.\n */\nforge.cipher.createDecipher = function(algorithm, key) {\n var api = algorithm;\n if(typeof api === 'string') {\n api = forge.cipher.getAlgorithm(api);\n if(api) {\n api = api();\n }\n }\n if(!api) {\n throw new Error('Unsupported algorithm: ' + algorithm);\n }\n\n // assume block cipher\n return new forge.cipher.BlockCipher({\n algorithm: api,\n key: key,\n decrypt: true\n });\n};\n\n/**\n * Registers an algorithm by name. If the name was already registered, the\n * algorithm API object will be overwritten.\n *\n * @param name the name of the algorithm.\n * @param algorithm the algorithm API object.\n */\nforge.cipher.registerAlgorithm = function(name, algorithm) {\n name = name.toUpperCase();\n forge.cipher.algorithms[name] = algorithm;\n};\n\n/**\n * Gets a registered algorithm by name.\n *\n * @param name the name of the algorithm.\n *\n * @return the algorithm, if found, null if not.\n */\nforge.cipher.getAlgorithm = function(name) {\n name = name.toUpperCase();\n if(name in forge.cipher.algorithms) {\n return forge.cipher.algorithms[name];\n }\n return null;\n};\n\nvar BlockCipher = forge.cipher.BlockCipher = function(options) {\n this.algorithm = options.algorithm;\n this.mode = this.algorithm.mode;\n this.blockSize = this.mode.blockSize;\n this._finish = false;\n this._input = null;\n this.output = null;\n this._op = options.decrypt ? this.mode.decrypt : this.mode.encrypt;\n this._decrypt = options.decrypt;\n this.algorithm.initialize(options);\n};\n\n/**\n * Starts or restarts the encryption or decryption process, whichever\n * was previously configured.\n *\n * For non-GCM mode, the IV may be a binary-encoded string of bytes, an array\n * of bytes, a byte buffer, or an array of 32-bit integers. If the IV is in\n * bytes, then it must be Nb (16) bytes in length. If the IV is given in as\n * 32-bit integers, then it must be 4 integers long.\n *\n * Note: an IV is not required or used in ECB mode.\n *\n * For GCM-mode, the IV must be given as a binary-encoded string of bytes or\n * a byte buffer. The number of bytes should be 12 (96 bits) as recommended\n * by NIST SP-800-38D but another length may be given.\n *\n * @param options the options to use:\n * iv
/***/ }),
/***/ "./node_modules/node-forge/lib/cipherModes.js":
/*!****************************************************!*\
!*** ./node_modules/node-forge/lib/cipherModes.js ***!
\****************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
eval("/**\n * Supported cipher modes.\n *\n * @author Dave Longley\n *\n * Copyright (c) 2010-2014 Digital Bazaar, Inc.\n */\nvar forge = __webpack_require__(/*! ./forge */ \"./node_modules/node-forge/lib/forge.js\");\n__webpack_require__(/*! ./util */ \"./node_modules/node-forge/lib/util.js\");\n\nforge.cipher = forge.cipher || {};\n\n// supported cipher modes\nvar modes = module.exports = forge.cipher.modes = forge.cipher.modes || {};\n\n/** Electronic codebook (ECB) (Don't use this; it's not secure) **/\n\nmodes.ecb = function(options) {\n options = options || {};\n this.name = 'ECB';\n this.cipher = options.cipher;\n this.blockSize = options.blockSize || 16;\n this._ints = this.blockSize / 4;\n this._inBlock = new Array(this._ints);\n this._outBlock = new Array(this._ints);\n};\n\nmodes.ecb.prototype.start = function(options) {};\n\nmodes.ecb.prototype.encrypt = function(input, output, finish) {\n // not enough input to encrypt\n if(input.length() < this.blockSize && !(finish && input.length() > 0)) {\n return true;\n }\n\n // get next block\n for(var i = 0; i < this._ints; ++i) {\n this._inBlock[i] = input.getInt32();\n }\n\n // encrypt block\n this.cipher.encrypt(this._inBlock, this._outBlock);\n\n // write output\n for(var i = 0; i < this._ints; ++i) {\n output.putInt32(this._outBlock[i]);\n }\n};\n\nmodes.ecb.prototype.decrypt = function(input, output, finish) {\n // not enough input to decrypt\n if(input.length() < this.blockSize && !(finish && input.length() > 0)) {\n return true;\n }\n\n // get next block\n for(var i = 0; i < this._ints; ++i) {\n this._inBlock[i] = input.getInt32();\n }\n\n // decrypt block\n this.cipher.decrypt(this._inBlock, this._outBlock);\n\n // write output\n for(var i = 0; i < this._ints; ++i) {\n output.putInt32(this._outBlock[i]);\n }\n};\n\nmodes.ecb.prototype.pad = function(input, options) {\n // add PKCS#7 padding to block (each pad byte is the\n // value of the number of pad bytes)\n var padding = (input.length() === this.blockSize ?\n this.blockSize : (this.blockSize - input.length()));\n input.fillWithByte(padding, padding);\n return true;\n};\n\nmodes.ecb.prototype.unpad = function(output, options) {\n // check for error: input data not a multiple of blockSize\n if(options.overflow > 0) {\n return false;\n }\n\n // ensure padding byte count is valid\n var len = output.length();\n var count = output.at(len - 1);\n if(count > (this.blockSize << 2)) {\n return false;\n }\n\n // trim off padding bytes\n output.truncate(count);\n return true;\n};\n\n/** Cipher-block Chaining (CBC) **/\n\nmodes.cbc = function(options) {\n options = options || {};\n this.name = 'CBC';\n this.cipher = options.cipher;\n this.blockSize = options.blockSize || 16;\n this._ints = this.blockSize / 4;\n this._inBlock = new Array(this._ints);\n this._outBlock = new Array(this._ints);\n};\n\nmodes.cbc.prototype.start = function(options) {\n // Note: legacy support for using IV residue (has security flaws)\n // if IV is null, reuse block from previous processing\n if(options.iv === null) {\n // must have a previous block\n if(!this._prev) {\n throw new Error('Invalid IV parameter.');\n }\n this._iv = this._prev.slice(0);\n } else if(!('iv' in options)) {\n throw new Error('Invalid IV parameter.');\n } else {\n // save IV as \"previous\" block\n this._iv = transformIV(options.iv, this.blockSize);\n this._prev = this._iv.slice(0);\n }\n};\n\nmodes.cbc.prototype.encrypt = function(input, output, finish) {\n // not enough input to encrypt\n if(input.length() < this.blockSize && !(finish && input.length() > 0)) {\n return true;\n }\n\n // get next block\n // CBC XOR's IV (or previous block) with plaintext\n for(var i = 0; i < this._ints; ++i) {\n this._inBlock[i] = this._prev[i] ^ input.getInt32();\n }\n\n // encrypt block\n this.cipher.encrypt(this._inBlock, this._outBlock);\n\n // write output, save previous block\n for(var i = 0; i < this._ints; ++i) {\n output.putInt32(this._outBl
/***/ }),
/***/ "./node_modules/node-forge/lib/des.js":
/*!********************************************!*\
!*** ./node_modules/node-forge/lib/des.js ***!
\********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
eval("/**\n * DES (Data Encryption Standard) implementation.\n *\n * This implementation supports DES as well as 3DES-EDE in ECB and CBC mode.\n * It is based on the BSD-licensed implementation by Paul Tero:\n *\n * Paul Tero, July 2001\n * http://www.tero.co.uk/des/\n *\n * Optimised for performance with large blocks by\n * Michael Hayworth, November 2001\n * http://www.netdealing.com\n *\n * THIS SOFTWARE IS PROVIDED \"AS IS\" AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * @author Stefan Siegl\n * @author Dave Longley\n *\n * Copyright (c) 2012 Stefan Siegl <stesie@brokenpipe.de>\n * Copyright (c) 2012-2014 Digital Bazaar, Inc.\n */\nvar forge = __webpack_require__(/*! ./forge */ \"./node_modules/node-forge/lib/forge.js\");\n__webpack_require__(/*! ./cipher */ \"./node_modules/node-forge/lib/cipher.js\");\n__webpack_require__(/*! ./cipherModes */ \"./node_modules/node-forge/lib/cipherModes.js\");\n__webpack_require__(/*! ./util */ \"./node_modules/node-forge/lib/util.js\");\n\n/* DES API */\nmodule.exports = forge.des = forge.des || {};\n\n/**\n * Deprecated. Instead, use:\n *\n * var cipher = forge.cipher.createCipher('DES-<mode>', key);\n * cipher.start({iv: iv});\n *\n * Creates an DES cipher object to encrypt data using the given symmetric key.\n * The output will be stored in the 'output' member of the returned cipher.\n *\n * The key and iv may be given as binary-encoded strings of bytes or\n * byte buffers.\n *\n * @param key the symmetric key to use (64 or 192 bits).\n * @param iv the initialization vector to use.\n * @param output the buffer to write to, null to create one.\n * @param mode the cipher mode to use (default: 'CBC' if IV is\n * given, 'ECB' if null).\n *\n * @return the cipher.\n */\nforge.des.startEncrypting = function(key, iv, output, mode) {\n var cipher = _createCipher({\n key: key,\n output: output,\n decrypt: false,\n mode: mode || (iv === null ? 'ECB' : 'CBC')\n });\n cipher.start(iv);\n return cipher;\n};\n\n/**\n * Deprecated. Instead, use:\n *\n * var cipher = forge.cipher.createCipher('DES-<mode>', key);\n *\n * Creates an DES cipher object to encrypt data using the given symmetric key.\n *\n * The key may be given as a binary-encoded string of bytes or a byte buffer.\n *\n * @param key the symmetric key to use (64 or 192 bits).\n * @param mode the cipher mode to use (default: 'CBC').\n *\n * @return the cipher.\n */\nforge.des.createEncryptionCipher = function(key, mode) {\n return _createCipher({\n key: key,\n output: null,\n decrypt: false,\n mode: mode\n });\n};\n\n/**\n * Deprecated. Instead, use:\n *\n * var decipher = forge.cipher.createDecipher('DES-<mode>', key);\n * decipher.start({iv: iv});\n *\n * Creates an DES cipher object to decrypt data using the given symmetric key.\n * The output will be stored in the 'output' member of the returned cipher.\n *\n * The key and iv may be given as binary-encoded strings of bytes or\n * byte buffers.\n *\n * @param key the symmetric key to use (64 or 192 bits).\n * @param iv the initialization vector to use.\n * @param output the buffer to write to, null to create one.\n * @param mode the cipher mode to use (default: 'CBC' if IV is\n * given, 'ECB' if null).\n *\n * @return the cipher.\n */\nforge.des.startDecrypting = function(key, iv, output, mode) {\n var cipher = _createCipher({\n key: key,\n output: output,\n decryp
/***/ }),
/***/ "./node_modules/node-forge/lib/forge.js":
/*!**********************************************!*\
!*** ./node_modules/node-forge/lib/forge.js ***!
\**********************************************/
/***/ ((module) => {
eval("/**\n * Node.js module for Forge.\n *\n * @author Dave Longley\n *\n * Copyright 2011-2016 Digital Bazaar, Inc.\n */\nmodule.exports = {\n // default options\n options: {\n usePureJavaScript: false\n }\n};\n\n\n//# sourceURL=webpack://light/./node_modules/node-forge/lib/forge.js?");
/***/ }),
/***/ "./node_modules/node-forge/lib/hmac.js":
/*!*********************************************!*\
!*** ./node_modules/node-forge/lib/hmac.js ***!
\*********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
eval("/**\n * Hash-based Message Authentication Code implementation. Requires a message\n * digest object that can be obtained, for example, from forge.md.sha1 or\n * forge.md.md5.\n *\n * @author Dave Longley\n *\n * Copyright (c) 2010-2012 Digital Bazaar, Inc. All rights reserved.\n */\nvar forge = __webpack_require__(/*! ./forge */ \"./node_modules/node-forge/lib/forge.js\");\n__webpack_require__(/*! ./md */ \"./node_modules/node-forge/lib/md.js\");\n__webpack_require__(/*! ./util */ \"./node_modules/node-forge/lib/util.js\");\n\n/* HMAC API */\nvar hmac = module.exports = forge.hmac = forge.hmac || {};\n\n/**\n * Creates an HMAC object that uses the given message digest object.\n *\n * @return an HMAC object.\n */\nhmac.create = function() {\n // the hmac key to use\n var _key = null;\n\n // the message digest to use\n var _md = null;\n\n // the inner padding\n var _ipadding = null;\n\n // the outer padding\n var _opadding = null;\n\n // hmac context\n var ctx = {};\n\n /**\n * Starts or restarts the HMAC with the given key and message digest.\n *\n * @param md the message digest to use, null to reuse the previous one,\n * a string to use builtin 'sha1', 'md5', 'sha256'.\n * @param key the key to use as a string, array of bytes, byte buffer,\n * or null to reuse the previous key.\n */\n ctx.start = function(md, key) {\n if(md !== null) {\n if(typeof md === 'string') {\n // create builtin message digest\n md = md.toLowerCase();\n if(md in forge.md.algorithms) {\n _md = forge.md.algorithms[md].create();\n } else {\n throw new Error('Unknown hash algorithm \"' + md + '\"');\n }\n } else {\n // store message digest\n _md = md;\n }\n }\n\n if(key === null) {\n // reuse previous key\n key = _key;\n } else {\n if(typeof key === 'string') {\n // convert string into byte buffer\n key = forge.util.createBuffer(key);\n } else if(forge.util.isArray(key)) {\n // convert byte array into byte buffer\n var tmp = key;\n key = forge.util.createBuffer();\n for(var i = 0; i < tmp.length; ++i) {\n key.putByte(tmp[i]);\n }\n }\n\n // if key is longer than blocksize, hash it\n var keylen = key.length();\n if(keylen > _md.blockLength) {\n _md.start();\n _md.update(key.bytes());\n key = _md.digest();\n }\n\n // mix key into inner and outer padding\n // ipadding = [0x36 * blocksize] ^ key\n // opadding = [0x5C * blocksize] ^ key\n _ipadding = forge.util.createBuffer();\n _opadding = forge.util.createBuffer();\n keylen = key.length();\n for(var i = 0; i < keylen; ++i) {\n var tmp = key.at(i);\n _ipadding.putByte(0x36 ^ tmp);\n _opadding.putByte(0x5C ^ tmp);\n }\n\n // if key is shorter than blocksize, add additional padding\n if(keylen < _md.blockLength) {\n var tmp = _md.blockLength - keylen;\n for(var i = 0; i < tmp; ++i) {\n _ipadding.putByte(0x36);\n _opadding.putByte(0x5C);\n }\n }\n _key = key;\n _ipadding = _ipadding.bytes();\n _opadding = _opadding.bytes();\n }\n\n // digest is done like so: hash(opadding | hash(ipadding | message))\n\n // prepare to do inner hash\n // hash(ipadding | message)\n _md.start();\n _md.update(_ipadding);\n };\n\n /**\n * Updates the HMAC with the given message bytes.\n *\n * @param bytes the bytes to update with.\n */\n ctx.update = function(bytes) {\n _md.update(bytes);\n };\n\n /**\n * Produces the Message Authentication Code (MAC).\n *\n * @return a byte buffer containing the digest value.\n */\n ctx.getMac = function() {\n // digest is done like so: hash(opadding | hash(ipadding | message))\n // here we do the outer hashing\n var inner = _md.digest().bytes();\n _md.start();\n _md.update(_opadding);\n _md.update(inner);\n return _md.digest();\n };\n //
/***/ }),
/***/ "./node_modules/node-forge/lib/jsbn.js":
/*!*********************************************!*\
!*** ./node_modules/node-forge/lib/jsbn.js ***!
\*********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
eval("// Copyright (c) 2005 Tom Wu\n// All Rights Reserved.\n// See \"LICENSE\" for details.\n\n// Basic JavaScript BN library - subset useful for RSA encryption.\n\n/*\nLicensing (LICENSE)\n-------------------\n\nThis software is covered under the following copyright:\n*/\n/*\n * Copyright (c) 2003-2005 Tom Wu\n * All Rights Reserved.\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS-IS\" AND WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY\n * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.\n *\n * IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL,\n * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER\n * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF\n * THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT\n * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n *\n * In addition, the following condition applies:\n *\n * All redistributions must retain an intact copy of this copyright notice\n * and disclaimer.\n */\n/*\nAddress all questions regarding this license to:\n\n Tom Wu\n tjw@cs.Stanford.EDU\n*/\nvar forge = __webpack_require__(/*! ./forge */ \"./node_modules/node-forge/lib/forge.js\");\n\nmodule.exports = forge.jsbn = forge.jsbn || {};\n\n// Bits per digit\nvar dbits;\n\n// JavaScript engine analysis\nvar canary = 0xdeadbeefcafe;\nvar j_lm = ((canary&0xffffff)==0xefcafe);\n\n// (public) Constructor\nfunction BigInteger(a,b,c) {\n this.data = [];\n if(a != null)\n if(\"number\" == typeof a) this.fromNumber(a,b,c);\n else if(b == null && \"string\" != typeof a) this.fromString(a,256);\n else this.fromString(a,b);\n}\nforge.jsbn.BigInteger = BigInteger;\n\n// return new, unset BigInteger\nfunction nbi() { return new BigInteger(null); }\n\n// am: Compute w_j += (x*this_i), propagate carries,\n// c is initial carry, returns final carry.\n// c < 3*dvalue, x < 2*dvalue, this_i < dvalue\n// We need to select the fastest one that works in this environment.\n\n// am1: use a single mult and divide to get the high bits,\n// max digit bits should be 26 because\n// max internal value = 2*dvalue^2-2*dvalue (< 2^53)\nfunction am1(i,x,w,j,c,n) {\n while(--n >= 0) {\n var v = x*this.data[i++]+w.data[j]+c;\n c = Math.floor(v/0x4000000);\n w.data[j++] = v&0x3ffffff;\n }\n return c;\n}\n// am2 avoids a big mult-and-extract completely.\n// Max digit bits should be <= 30 because we do bitwise ops\n// on values up to 2*hdvalue^2-hdvalue-1 (< 2^31)\nfunction am2(i,x,w,j,c,n) {\n var xl = x&0x7fff, xh = x>>15;\n while(--n >= 0) {\n var l = this.data[i]&0x7fff;\n var h = this.data[i++]>>15;\n var m = xh*l+h*xl;\n l = xl*l+((m&0x7fff)<<15)+w.data[j]+(c&0x3fffffff);\n c = (l>>>30)+(m>>>15)+xh*h+(c>>>30);\n w.data[j++] = l&0x3fffffff;\n }\n return c;\n}\n// Alternately, set max digit bits to 28 since some\n// browsers slow down when dealing with 32-bit numbers.\nfunction am3(i,x,w,j,c,n) {\n var xl = x&0x3fff, xh = x>>14;\n while(--n >= 0) {\n var l = this.data[i]&0x3fff;\n var h = this.data[i++]>>14;\n var m = xh*l+h*xl;\n l = xl*l+((m&0x3fff)<<14)+w.data[j]+c;\n c = (l>>28)+(m>>14)+xh*h;\n w.data[j++] = l&0xfffffff;\n }\n return c;\n}\n\n// node.js (no browser)\nif(typeof(navigator) === 'undefined')\n{\n BigInteger.prototype.am = am3;\n dbits = 28;\n} else if(j_lm && (navigator.appName == \"Microsoft Internet Explorer\")
/***/ }),
/***/ "./node_modules/node-forge/lib/md.js":
/*!*******************************************!*\
!*** ./node_modules/node-forge/lib/md.js ***!
\*******************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
eval("/**\n * Node.js module for Forge message digests.\n *\n * @author Dave Longley\n *\n * Copyright 2011-2017 Digital Bazaar, Inc.\n */\nvar forge = __webpack_require__(/*! ./forge */ \"./node_modules/node-forge/lib/forge.js\");\n\nmodule.exports = forge.md = forge.md || {};\nforge.md.algorithms = forge.md.algorithms || {};\n\n\n//# sourceURL=webpack://light/./node_modules/node-forge/lib/md.js?");
/***/ }),
/***/ "./node_modules/node-forge/lib/oids.js":
/*!*********************************************!*\
!*** ./node_modules/node-forge/lib/oids.js ***!
\*********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
eval("/**\n * Object IDs for ASN.1.\n *\n * @author Dave Longley\n *\n * Copyright (c) 2010-2013 Digital Bazaar, Inc.\n */\nvar forge = __webpack_require__(/*! ./forge */ \"./node_modules/node-forge/lib/forge.js\");\n\nforge.pki = forge.pki || {};\nvar oids = module.exports = forge.pki.oids = forge.oids = forge.oids || {};\n\n// set id to name mapping and name to id mapping\nfunction _IN(id, name) {\n oids[id] = name;\n oids[name] = id;\n}\n// set id to name mapping only\nfunction _I_(id, name) {\n oids[id] = name;\n}\n\n// algorithm OIDs\n_IN('1.2.840.113549.1.1.1', 'rsaEncryption');\n// Note: md2 & md4 not implemented\n//_IN('1.2.840.113549.1.1.2', 'md2WithRSAEncryption');\n//_IN('1.2.840.113549.1.1.3', 'md4WithRSAEncryption');\n_IN('1.2.840.113549.1.1.4', 'md5WithRSAEncryption');\n_IN('1.2.840.113549.1.1.5', 'sha1WithRSAEncryption');\n_IN('1.2.840.113549.1.1.7', 'RSAES-OAEP');\n_IN('1.2.840.113549.1.1.8', 'mgf1');\n_IN('1.2.840.113549.1.1.9', 'pSpecified');\n_IN('1.2.840.113549.1.1.10', 'RSASSA-PSS');\n_IN('1.2.840.113549.1.1.11', 'sha256WithRSAEncryption');\n_IN('1.2.840.113549.1.1.12', 'sha384WithRSAEncryption');\n_IN('1.2.840.113549.1.1.13', 'sha512WithRSAEncryption');\n// Edwards-curve Digital Signature Algorithm (EdDSA) Ed25519\n_IN('1.3.101.112', 'EdDSA25519');\n\n_IN('1.2.840.10040.4.3', 'dsa-with-sha1');\n\n_IN('1.3.14.3.2.7', 'desCBC');\n\n_IN('1.3.14.3.2.26', 'sha1');\n// Deprecated equivalent of sha1WithRSAEncryption\n_IN('1.3.14.3.2.29', 'sha1WithRSASignature');\n_IN('2.16.840.1.101.3.4.2.1', 'sha256');\n_IN('2.16.840.1.101.3.4.2.2', 'sha384');\n_IN('2.16.840.1.101.3.4.2.3', 'sha512');\n_IN('2.16.840.1.101.3.4.2.4', 'sha224');\n_IN('2.16.840.1.101.3.4.2.5', 'sha512-224');\n_IN('2.16.840.1.101.3.4.2.6', 'sha512-256');\n_IN('1.2.840.113549.2.2', 'md2');\n_IN('1.2.840.113549.2.5', 'md5');\n\n// pkcs#7 content types\n_IN('1.2.840.113549.1.7.1', 'data');\n_IN('1.2.840.113549.1.7.2', 'signedData');\n_IN('1.2.840.113549.1.7.3', 'envelopedData');\n_IN('1.2.840.113549.1.7.4', 'signedAndEnvelopedData');\n_IN('1.2.840.113549.1.7.5', 'digestedData');\n_IN('1.2.840.113549.1.7.6', 'encryptedData');\n\n// pkcs#9 oids\n_IN('1.2.840.113549.1.9.1', 'emailAddress');\n_IN('1.2.840.113549.1.9.2', 'unstructuredName');\n_IN('1.2.840.113549.1.9.3', 'contentType');\n_IN('1.2.840.113549.1.9.4', 'messageDigest');\n_IN('1.2.840.113549.1.9.5', 'signingTime');\n_IN('1.2.840.113549.1.9.6', 'counterSignature');\n_IN('1.2.840.113549.1.9.7', 'challengePassword');\n_IN('1.2.840.113549.1.9.8', 'unstructuredAddress');\n_IN('1.2.840.113549.1.9.14', 'extensionRequest');\n\n_IN('1.2.840.113549.1.9.20', 'friendlyName');\n_IN('1.2.840.113549.1.9.21', 'localKeyId');\n_IN('1.2.840.113549.1.9.22.1', 'x509Certificate');\n\n// pkcs#12 safe bags\n_IN('1.2.840.113549.1.12.10.1.1', 'keyBag');\n_IN('1.2.840.113549.1.12.10.1.2', 'pkcs8ShroudedKeyBag');\n_IN('1.2.840.113549.1.12.10.1.3', 'certBag');\n_IN('1.2.840.113549.1.12.10.1.4', 'crlBag');\n_IN('1.2.840.113549.1.12.10.1.5', 'secretBag');\n_IN('1.2.840.113549.1.12.10.1.6', 'safeContentsBag');\n\n// password-based-encryption for pkcs#12\n_IN('1.2.840.113549.1.5.13', 'pkcs5PBES2');\n_IN('1.2.840.113549.1.5.12', 'pkcs5PBKDF2');\n\n_IN('1.2.840.113549.1.12.1.1', 'pbeWithSHAAnd128BitRC4');\n_IN('1.2.840.113549.1.12.1.2', 'pbeWithSHAAnd40BitRC4');\n_IN('1.2.840.113549.1.12.1.3', 'pbeWithSHAAnd3-KeyTripleDES-CBC');\n_IN('1.2.840.113549.1.12.1.4', 'pbeWithSHAAnd2-KeyTripleDES-CBC');\n_IN('1.2.840.113549.1.12.1.5', 'pbeWithSHAAnd128BitRC2-CBC');\n_IN('1.2.840.113549.1.12.1.6', 'pbewithSHAAnd40BitRC2-CBC');\n\n// hmac OIDs\n_IN('1.2.840.113549.2.7', 'hmacWithSHA1');\n_IN('1.2.840.113549.2.8', 'hmacWithSHA224');\n_IN('1.2.840.113549.2.9', 'hmacWithSHA256');\n_IN('1.2.840.113549.2.10', 'hmacWithSHA384');\n_IN('1.2.840.113549.2.11', 'hmacWithSHA512');\n\n// symmetric key algorithm oids\n_IN('1.2.840.113549.3.7', 'des-EDE3-CBC');\n_IN('2.16.840.1.101.3.4.1.2', 'aes128-CBC');\n_IN('2.16.840.1.101.3.4.1.22', 'aes192-CBC');\n_IN('2.16.840.1.101.3.4.1.42', 'aes256-CBC');\n\n// certificate issuer/subject OIDs\n_IN('2.5
/***/ }),
/***/ "./node_modules/node-forge/lib/pbe.js":
/*!********************************************!*\
!*** ./node_modules/node-forge/lib/pbe.js ***!
\********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
eval("/**\n * Password-based encryption functions.\n *\n * @author Dave Longley\n * @author Stefan Siegl <stesie@brokenpipe.de>\n *\n * Copyright (c) 2010-2013 Digital Bazaar, Inc.\n * Copyright (c) 2012 Stefan Siegl <stesie@brokenpipe.de>\n *\n * An EncryptedPrivateKeyInfo:\n *\n * EncryptedPrivateKeyInfo ::= SEQUENCE {\n * encryptionAlgorithm EncryptionAlgorithmIdentifier,\n * encryptedData EncryptedData }\n *\n * EncryptionAlgorithmIdentifier ::= AlgorithmIdentifier\n *\n * EncryptedData ::= OCTET STRING\n */\nvar forge = __webpack_require__(/*! ./forge */ \"./node_modules/node-forge/lib/forge.js\");\n__webpack_require__(/*! ./aes */ \"./node_modules/node-forge/lib/aes.js\");\n__webpack_require__(/*! ./asn1 */ \"./node_modules/node-forge/lib/asn1.js\");\n__webpack_require__(/*! ./des */ \"./node_modules/node-forge/lib/des.js\");\n__webpack_require__(/*! ./md */ \"./node_modules/node-forge/lib/md.js\");\n__webpack_require__(/*! ./oids */ \"./node_modules/node-forge/lib/oids.js\");\n__webpack_require__(/*! ./pbkdf2 */ \"./node_modules/node-forge/lib/pbkdf2.js\");\n__webpack_require__(/*! ./pem */ \"./node_modules/node-forge/lib/pem.js\");\n__webpack_require__(/*! ./random */ \"./node_modules/node-forge/lib/random.js\");\n__webpack_require__(/*! ./rc2 */ \"./node_modules/node-forge/lib/rc2.js\");\n__webpack_require__(/*! ./rsa */ \"./node_modules/node-forge/lib/rsa.js\");\n__webpack_require__(/*! ./util */ \"./node_modules/node-forge/lib/util.js\");\n\nif(typeof BigInteger === 'undefined') {\n var BigInteger = forge.jsbn.BigInteger;\n}\n\n// shortcut for asn.1 API\nvar asn1 = forge.asn1;\n\n/* Password-based encryption implementation. */\nvar pki = forge.pki = forge.pki || {};\nmodule.exports = pki.pbe = forge.pbe = forge.pbe || {};\nvar oids = pki.oids;\n\n// validator for an EncryptedPrivateKeyInfo structure\n// Note: Currently only works w/algorithm params\nvar encryptedPrivateKeyValidator = {\n name: 'EncryptedPrivateKeyInfo',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n value: [{\n name: 'EncryptedPrivateKeyInfo.encryptionAlgorithm',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n value: [{\n name: 'AlgorithmIdentifier.algorithm',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.OID,\n constructed: false,\n capture: 'encryptionOid'\n }, {\n name: 'AlgorithmIdentifier.parameters',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n captureAsn1: 'encryptionParams'\n }]\n }, {\n // encryptedData\n name: 'EncryptedPrivateKeyInfo.encryptedData',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.OCTETSTRING,\n constructed: false,\n capture: 'encryptedData'\n }]\n};\n\n// validator for a PBES2Algorithms structure\n// Note: Currently only works w/PBKDF2 + AES encryption schemes\nvar PBES2AlgorithmsValidator = {\n name: 'PBES2Algorithms',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n value: [{\n name: 'PBES2Algorithms.keyDerivationFunc',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n value: [{\n name: 'PBES2Algorithms.keyDerivationFunc.oid',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.OID,\n constructed: false,\n capture: 'kdfOid'\n }, {\n name: 'PBES2Algorithms.params',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n value: [{\n name: 'PBES2Algorithms.params.salt',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.OCTETSTRING,\n constructed: false,\n capture: 'kdfSalt'\n }, {\n name: 'PBES2Algorithms.params.iterationCount',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.INTEGER,\n constructed: false,\n capture: 'kdfIterationCount'\n }, {\n name: 'PBES2Algorithms.params.keyLength',\n tagClass: asn1.Class.UNIVERSAL
/***/ }),
/***/ "./node_modules/node-forge/lib/pbkdf2.js":
/*!***********************************************!*\
!*** ./node_modules/node-forge/lib/pbkdf2.js ***!
\***********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
eval("/**\n * Password-Based Key-Derivation Function #2 implementation.\n *\n * See RFC 2898 for details.\n *\n * @author Dave Longley\n *\n * Copyright (c) 2010-2013 Digital Bazaar, Inc.\n */\nvar forge = __webpack_require__(/*! ./forge */ \"./node_modules/node-forge/lib/forge.js\");\n__webpack_require__(/*! ./hmac */ \"./node_modules/node-forge/lib/hmac.js\");\n__webpack_require__(/*! ./md */ \"./node_modules/node-forge/lib/md.js\");\n__webpack_require__(/*! ./util */ \"./node_modules/node-forge/lib/util.js\");\n\nvar pkcs5 = forge.pkcs5 = forge.pkcs5 || {};\n\nvar crypto;\nif(forge.util.isNodejs && !forge.options.usePureJavaScript) {\n crypto = __webpack_require__(/*! crypto */ \"?b254\");\n}\n\n/**\n * Derives a key from a password.\n *\n * @param p the password as a binary-encoded string of bytes.\n * @param s the salt as a binary-encoded string of bytes.\n * @param c the iteration count, a positive integer.\n * @param dkLen the intended length, in bytes, of the derived key,\n * (max: 2^32 - 1) * hash length of the PRF.\n * @param [md] the message digest (or algorithm identifier as a string) to use\n * in the PRF, defaults to SHA-1.\n * @param [callback(err, key)] presence triggers asynchronous version, called\n * once the operation completes.\n *\n * @return the derived key, as a binary-encoded string of bytes, for the\n * synchronous version (if no callback is specified).\n */\nmodule.exports = forge.pbkdf2 = pkcs5.pbkdf2 = function(\n p, s, c, dkLen, md, callback) {\n if(typeof md === 'function') {\n callback = md;\n md = null;\n }\n\n // use native implementation if possible and not disabled, note that\n // some node versions only support SHA-1, others allow digest to be changed\n if(forge.util.isNodejs && !forge.options.usePureJavaScript &&\n crypto.pbkdf2 && (md === null || typeof md !== 'object') &&\n (crypto.pbkdf2Sync.length > 4 || (!md || md === 'sha1'))) {\n if(typeof md !== 'string') {\n // default prf to SHA-1\n md = 'sha1';\n }\n p = Buffer.from(p, 'binary');\n s = Buffer.from(s, 'binary');\n if(!callback) {\n if(crypto.pbkdf2Sync.length === 4) {\n return crypto.pbkdf2Sync(p, s, c, dkLen).toString('binary');\n }\n return crypto.pbkdf2Sync(p, s, c, dkLen, md).toString('binary');\n }\n if(crypto.pbkdf2Sync.length === 4) {\n return crypto.pbkdf2(p, s, c, dkLen, function(err, key) {\n if(err) {\n return callback(err);\n }\n callback(null, key.toString('binary'));\n });\n }\n return crypto.pbkdf2(p, s, c, dkLen, md, function(err, key) {\n if(err) {\n return callback(err);\n }\n callback(null, key.toString('binary'));\n });\n }\n\n if(typeof md === 'undefined' || md === null) {\n // default prf to SHA-1\n md = 'sha1';\n }\n if(typeof md === 'string') {\n if(!(md in forge.md.algorithms)) {\n throw new Error('Unknown hash algorithm: ' + md);\n }\n md = forge.md[md].create();\n }\n\n var hLen = md.digestLength;\n\n /* 1. If dkLen > (2^32 - 1) * hLen, output \"derived key too long\" and\n stop. */\n if(dkLen > (0xFFFFFFFF * hLen)) {\n var err = new Error('Derived key is too long.');\n if(callback) {\n return callback(err);\n }\n throw err;\n }\n\n /* 2. Let len be the number of hLen-octet blocks in the derived key,\n rounding up, and let r be the number of octets in the last\n block:\n\n len = CEIL(dkLen / hLen),\n r = dkLen - (len - 1) * hLen. */\n var len = Math.ceil(dkLen / hLen);\n var r = dkLen - (len - 1) * hLen;\n\n /* 3. For each block of the derived key apply the function F defined\n below to the password P, the salt S, the iteration count c, and\n the block index to compute the block:\n\n T_1 = F(P, S, c, 1),\n T_2 = F(P, S, c, 2),\n ...\n T_len = F(P, S, c, len),\n\n where the function F is defined as the exclusive-or sum of the\n first c iterates of the underlying pseudorandom function PRF\n applied to the password P and the concate
/***/ }),
/***/ "./node_modules/node-forge/lib/pem.js":
/*!********************************************!*\
!*** ./node_modules/node-forge/lib/pem.js ***!
\********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
eval("/**\n * Javascript implementation of basic PEM (Privacy Enhanced Mail) algorithms.\n *\n * See: RFC 1421.\n *\n * @author Dave Longley\n *\n * Copyright (c) 2013-2014 Digital Bazaar, Inc.\n *\n * A Forge PEM object has the following fields:\n *\n * type: identifies the type of message (eg: \"RSA PRIVATE KEY\").\n *\n * procType: identifies the type of processing performed on the message,\n * it has two subfields: version and type, eg: 4,ENCRYPTED.\n *\n * contentDomain: identifies the type of content in the message, typically\n * only uses the value: \"RFC822\".\n *\n * dekInfo: identifies the message encryption algorithm and mode and includes\n * any parameters for the algorithm, it has two subfields: algorithm and\n * parameters, eg: DES-CBC,F8143EDE5960C597.\n *\n * headers: contains all other PEM encapsulated headers -- where order is\n * significant (for pairing data like recipient ID + key info).\n *\n * body: the binary-encoded body.\n */\nvar forge = __webpack_require__(/*! ./forge */ \"./node_modules/node-forge/lib/forge.js\");\n__webpack_require__(/*! ./util */ \"./node_modules/node-forge/lib/util.js\");\n\n// shortcut for pem API\nvar pem = module.exports = forge.pem = forge.pem || {};\n\n/**\n * Encodes (serializes) the given PEM object.\n *\n * @param msg the PEM message object to encode.\n * @param options the options to use:\n * maxline the maximum characters per line for the body, (default: 64).\n *\n * @return the PEM-formatted string.\n */\npem.encode = function(msg, options) {\n options = options || {};\n var rval = '-----BEGIN ' + msg.type + '-----\\r\\n';\n\n // encode special headers\n var header;\n if(msg.procType) {\n header = {\n name: 'Proc-Type',\n values: [String(msg.procType.version), msg.procType.type]\n };\n rval += foldHeader(header);\n }\n if(msg.contentDomain) {\n header = {name: 'Content-Domain', values: [msg.contentDomain]};\n rval += foldHeader(header);\n }\n if(msg.dekInfo) {\n header = {name: 'DEK-Info', values: [msg.dekInfo.algorithm]};\n if(msg.dekInfo.parameters) {\n header.values.push(msg.dekInfo.parameters);\n }\n rval += foldHeader(header);\n }\n\n if(msg.headers) {\n // encode all other headers\n for(var i = 0; i < msg.headers.length; ++i) {\n rval += foldHeader(msg.headers[i]);\n }\n }\n\n // terminate header\n if(msg.procType) {\n rval += '\\r\\n';\n }\n\n // add body\n rval += forge.util.encode64(msg.body, options.maxline || 64) + '\\r\\n';\n\n rval += '-----END ' + msg.type + '-----\\r\\n';\n return rval;\n};\n\n/**\n * Decodes (deserializes) all PEM messages found in the given string.\n *\n * @param str the PEM-formatted string to decode.\n *\n * @return the PEM message objects in an array.\n */\npem.decode = function(str) {\n var rval = [];\n\n // split string into PEM messages (be lenient w/EOF on BEGIN line)\n var rMessage = /\\s*-----BEGIN ([A-Z0-9- ]+)-----\\r?\\n?([\\x21-\\x7e\\s]+?(?:\\r?\\n\\r?\\n))?([:A-Za-z0-9+\\/=\\s]+?)-----END \\1-----/g;\n var rHeader = /([\\x21-\\x7e]+):\\s*([\\x21-\\x7e\\s^:]+)/;\n var rCRLF = /\\r?\\n/;\n var match;\n while(true) {\n match = rMessage.exec(str);\n if(!match) {\n break;\n }\n\n // accept \"NEW CERTIFICATE REQUEST\" as \"CERTIFICATE REQUEST\"\n // https://datatracker.ietf.org/doc/html/rfc7468#section-7\n var type = match[1];\n if(type === 'NEW CERTIFICATE REQUEST') {\n type = 'CERTIFICATE REQUEST';\n }\n\n var msg = {\n type: type,\n procType: null,\n contentDomain: null,\n dekInfo: null,\n headers: [],\n body: forge.util.decode64(match[3])\n };\n rval.push(msg);\n\n // no headers\n if(!match[2]) {\n continue;\n }\n\n // parse headers\n var lines = match[2].split(rCRLF);\n var li = 0;\n while(match && li < lines.length) {\n // get line, trim any rhs whitespace\n var line = lines[li].replace(/\\s+$/, '');\n\n // RFC2822 unfold any following folded lines\n for(var nl = li + 1; nl < lines.length; ++nl
/***/ }),
/***/ "./node_modules/node-forge/lib/pkcs1.js":
/*!**********************************************!*\
!*** ./node_modules/node-forge/lib/pkcs1.js ***!
\**********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
eval("/**\n * Partial implementation of PKCS#1 v2.2: RSA-OEAP\n *\n * Modified but based on the following MIT and BSD licensed code:\n *\n * https://github.com/kjur/jsjws/blob/master/rsa.js:\n *\n * The 'jsjws'(JSON Web Signature JavaScript Library) License\n *\n * Copyright (c) 2012 Kenji Urushima\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *\n * http://webrsa.cvs.sourceforge.net/viewvc/webrsa/Client/RSAES-OAEP.js?content-type=text%2Fplain:\n *\n * RSAES-OAEP.js\n * $Id: RSAES-OAEP.js,v 1.1.1.1 2003/03/19 15:37:20 ellispritchard Exp $\n * JavaScript Implementation of PKCS #1 v2.1 RSA CRYPTOGRAPHY STANDARD (RSA Laboratories, June 14, 2002)\n * Copyright (C) Ellis Pritchard, Guardian Unlimited 2003.\n * Contact: ellis@nukinetics.com\n * Distributed under the BSD License.\n *\n * Official documentation: http://www.rsa.com/rsalabs/node.asp?id=2125\n *\n * @author Evan Jones (http://evanjones.ca/)\n * @author Dave Longley\n *\n * Copyright (c) 2013-2014 Digital Bazaar, Inc.\n */\nvar forge = __webpack_require__(/*! ./forge */ \"./node_modules/node-forge/lib/forge.js\");\n__webpack_require__(/*! ./util */ \"./node_modules/node-forge/lib/util.js\");\n__webpack_require__(/*! ./random */ \"./node_modules/node-forge/lib/random.js\");\n__webpack_require__(/*! ./sha1 */ \"./node_modules/node-forge/lib/sha1.js\");\n\n// shortcut for PKCS#1 API\nvar pkcs1 = module.exports = forge.pkcs1 = forge.pkcs1 || {};\n\n/**\n * Encode the given RSAES-OAEP message (M) using key, with optional label (L)\n * and seed.\n *\n * This method does not perform RSA encryption, it only encodes the message\n * using RSAES-OAEP.\n *\n * @param key the RSA key to use.\n * @param message the message to encode.\n * @param options the options to use:\n * label an optional label to use.\n * seed the seed to use.\n * md the message digest object to use, undefined for SHA-1.\n * mgf1 optional mgf1 parameters:\n * md the message digest object to use for MGF1.\n *\n * @return the encoded message bytes.\n */\npkcs1.encode_rsa_oaep = function(key, message, options) {\n // parse arguments\n var label;\n var seed;\n var md;\n var mgf1Md;\n // legacy args (label, seed, md)\n if(typeof options === 'string') {\n label = options;\n seed = arguments[3] || undefined;\n md = arguments[4] || undefined;\n } else if(options) {\n label = options.label || undefined;\n seed = options.seed || undefined;\n md = options.md || undefined;\n if(options.mgf1 && options.mgf1.md) {\n mgf1Md = options.mgf1.md;\n }\n }\n\n // default OAEP to SHA-1 message digest\n if(!md) {\n md = forge.md.sha1.create();\n } else {\n md.start();\n }\n\n // default MGF-1 to same as OAEP\n if(!mgf1Md) {\n mgf1Md = md;\n }\n\n // compute length in bytes and check output\n var keyLength = Math.ceil(key.n.bitLength() / 8);\n var maxLength = keyLength - 2 * md.digestLength - 2;\n if(message.length > maxLength) {\n var error = new Error('RSAES-OAEP input message length is too
/***/ }),
/***/ "./node_modules/node-forge/lib/prime.js":
/*!**********************************************!*\
!*** ./node_modules/node-forge/lib/prime.js ***!
\**********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
eval("/**\n * Prime number generation API.\n *\n * @author Dave Longley\n *\n * Copyright (c) 2014 Digital Bazaar, Inc.\n */\nvar forge = __webpack_require__(/*! ./forge */ \"./node_modules/node-forge/lib/forge.js\");\n__webpack_require__(/*! ./util */ \"./node_modules/node-forge/lib/util.js\");\n__webpack_require__(/*! ./jsbn */ \"./node_modules/node-forge/lib/jsbn.js\");\n__webpack_require__(/*! ./random */ \"./node_modules/node-forge/lib/random.js\");\n\n(function() {\n\n// forge.prime already defined\nif(forge.prime) {\n module.exports = forge.prime;\n return;\n}\n\n/* PRIME API */\nvar prime = module.exports = forge.prime = forge.prime || {};\n\nvar BigInteger = forge.jsbn.BigInteger;\n\n// primes are 30k+i for i = 1, 7, 11, 13, 17, 19, 23, 29\nvar GCD_30_DELTA = [6, 4, 2, 4, 2, 4, 6, 2];\nvar THIRTY = new BigInteger(null);\nTHIRTY.fromInt(30);\nvar op_or = function(x, y) {return x|y;};\n\n/**\n * Generates a random probable prime with the given number of bits.\n *\n * Alternative algorithms can be specified by name as a string or as an\n * object with custom options like so:\n *\n * {\n * name: 'PRIMEINC',\n * options: {\n * maxBlockTime: <the maximum amount of time to block the main\n * thread before allowing I/O other JS to run>,\n * millerRabinTests: <the number of miller-rabin tests to run>,\n * workerScript: <the worker script URL>,\n * workers: <the number of web workers (if supported) to use,\n * -1 to use estimated cores minus one>.\n * workLoad: the size of the work load, ie: number of possible prime\n * numbers for each web worker to check per work assignment,\n * (default: 100).\n * }\n * }\n *\n * @param bits the number of bits for the prime number.\n * @param options the options to use.\n * [algorithm] the algorithm to use (default: 'PRIMEINC').\n * [prng] a custom crypto-secure pseudo-random number generator to use,\n * that must define \"getBytesSync\".\n *\n * @return callback(err, num) called once the operation completes.\n */\nprime.generateProbablePrime = function(bits, options, callback) {\n if(typeof options === 'function') {\n callback = options;\n options = {};\n }\n options = options || {};\n\n // default to PRIMEINC algorithm\n var algorithm = options.algorithm || 'PRIMEINC';\n if(typeof algorithm === 'string') {\n algorithm = {name: algorithm};\n }\n algorithm.options = algorithm.options || {};\n\n // create prng with api that matches BigInteger secure random\n var prng = options.prng || forge.random;\n var rng = {\n // x is an array to fill with bytes\n nextBytes: function(x) {\n var b = prng.getBytesSync(x.length);\n for(var i = 0; i < x.length; ++i) {\n x[i] = b.charCodeAt(i);\n }\n }\n };\n\n if(algorithm.name === 'PRIMEINC') {\n return primeincFindPrime(bits, rng, algorithm.options, callback);\n }\n\n throw new Error('Invalid prime generation algorithm: ' + algorithm.name);\n};\n\nfunction primeincFindPrime(bits, rng, options, callback) {\n if('workers' in options) {\n return primeincFindPrimeWithWorkers(bits, rng, options, callback);\n }\n return primeincFindPrimeWithoutWorkers(bits, rng, options, callback);\n}\n\nfunction primeincFindPrimeWithoutWorkers(bits, rng, options, callback) {\n // initialize random number\n var num = generateRandom(bits, rng);\n\n /* Note: All primes are of the form 30k+i for i < 30 and gcd(30, i)=1. The\n number we are given is always aligned at 30k + 1. Each time the number is\n determined not to be prime we add to get to the next 'i', eg: if the number\n was at 30k + 1 we add 6. */\n var deltaIdx = 0;\n\n // get required number of MR tests\n var mrTests = getMillerRabinTests(num.bitLength());\n if('millerRabinTests' in options) {\n mrTests = options.millerRabinTests;\n }\n\n // find prime nearest to 'num' for maxBlockTime ms\n // 10 ms gives 5ms of leeway for other calculations before dropping\n // below 60fps (1000/60 == 16.67), but in reality, the number will\n // likely be higher due to an
/***/ }),
/***/ "./node_modules/node-forge/lib/prng.js":
/*!*********************************************!*\
!*** ./node_modules/node-forge/lib/prng.js ***!
\*********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
eval("/**\n * A javascript implementation of a cryptographically-secure\n * Pseudo Random Number Generator (PRNG). The Fortuna algorithm is followed\n * here though the use of SHA-256 is not enforced; when generating an\n * a PRNG context, the hashing algorithm and block cipher used for\n * the generator are specified via a plugin.\n *\n * @author Dave Longley\n *\n * Copyright (c) 2010-2014 Digital Bazaar, Inc.\n */\nvar forge = __webpack_require__(/*! ./forge */ \"./node_modules/node-forge/lib/forge.js\");\n__webpack_require__(/*! ./util */ \"./node_modules/node-forge/lib/util.js\");\n\nvar _crypto = null;\nif(forge.util.isNodejs && !forge.options.usePureJavaScript &&\n !process.versions['node-webkit']) {\n _crypto = __webpack_require__(/*! crypto */ \"?b254\");\n}\n\n/* PRNG API */\nvar prng = module.exports = forge.prng = forge.prng || {};\n\n/**\n * Creates a new PRNG context.\n *\n * A PRNG plugin must be passed in that will provide:\n *\n * 1. A function that initializes the key and seed of a PRNG context. It\n * will be given a 16 byte key and a 16 byte seed. Any key expansion\n * or transformation of the seed from a byte string into an array of\n * integers (or similar) should be performed.\n * 2. The cryptographic function used by the generator. It takes a key and\n * a seed.\n * 3. A seed increment function. It takes the seed and returns seed + 1.\n * 4. An api to create a message digest.\n *\n * For an example, see random.js.\n *\n * @param plugin the PRNG plugin to use.\n */\nprng.create = function(plugin) {\n var ctx = {\n plugin: plugin,\n key: null,\n seed: null,\n time: null,\n // number of reseeds so far\n reseeds: 0,\n // amount of data generated so far\n generated: 0,\n // no initial key bytes\n keyBytes: ''\n };\n\n // create 32 entropy pools (each is a message digest)\n var md = plugin.md;\n var pools = new Array(32);\n for(var i = 0; i < 32; ++i) {\n pools[i] = md.create();\n }\n ctx.pools = pools;\n\n // entropy pools are written to cyclically, starting at index 0\n ctx.pool = 0;\n\n /**\n * Generates random bytes. The bytes may be generated synchronously or\n * asynchronously. Web workers must use the asynchronous interface or\n * else the behavior is undefined.\n *\n * @param count the number of random bytes to generate.\n * @param [callback(err, bytes)] called once the operation completes.\n *\n * @return count random bytes as a string.\n */\n ctx.generate = function(count, callback) {\n // do synchronously\n if(!callback) {\n return ctx.generateSync(count);\n }\n\n // simple generator using counter-based CBC\n var cipher = ctx.plugin.cipher;\n var increment = ctx.plugin.increment;\n var formatKey = ctx.plugin.formatKey;\n var formatSeed = ctx.plugin.formatSeed;\n var b = forge.util.createBuffer();\n\n // paranoid deviation from Fortuna:\n // reset key for every request to protect previously\n // generated random bytes should the key be discovered;\n // there is no 100ms based reseeding because of this\n // forced reseed for every `generate` call\n ctx.key = null;\n\n generate();\n\n function generate(err) {\n if(err) {\n return callback(err);\n }\n\n // sufficient bytes generated\n if(b.length() >= count) {\n return callback(null, b.getBytes(count));\n }\n\n // if amount of data generated is greater than 1 MiB, trigger reseed\n if(ctx.generated > 0xfffff) {\n ctx.key = null;\n }\n\n if(ctx.key === null) {\n // prevent stack overflow\n return forge.util.nextTick(function() {\n _reseed(generate);\n });\n }\n\n // generate the random bytes\n var bytes = cipher(ctx.key, ctx.seed);\n ctx.generated += bytes.length;\n b.putBytes(bytes);\n\n // generate bytes for a new key and seed\n ctx.key = formatKey(cipher(ctx.key, increment(ctx.seed)));\n ctx.seed = formatSeed(cipher(ctx.key, ctx.seed));\n\n forge.util.setImmediate(generate);\n
/***/ }),
/***/ "./node_modules/node-forge/lib/random.js":
/*!***********************************************!*\
!*** ./node_modules/node-forge/lib/random.js ***!
\***********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
eval("/**\n * An API for getting cryptographically-secure random bytes. The bytes are\n * generated using the Fortuna algorithm devised by Bruce Schneier and\n * Niels Ferguson.\n *\n * Getting strong random bytes is not yet easy to do in javascript. The only\n * truish random entropy that can be collected is from the mouse, keyboard, or\n * from timing with respect to page loads, etc. This generator makes a poor\n * attempt at providing random bytes when those sources haven't yet provided\n * enough entropy to initially seed or to reseed the PRNG.\n *\n * @author Dave Longley\n *\n * Copyright (c) 2009-2014 Digital Bazaar, Inc.\n */\nvar forge = __webpack_require__(/*! ./forge */ \"./node_modules/node-forge/lib/forge.js\");\n__webpack_require__(/*! ./aes */ \"./node_modules/node-forge/lib/aes.js\");\n__webpack_require__(/*! ./sha256 */ \"./node_modules/node-forge/lib/sha256.js\");\n__webpack_require__(/*! ./prng */ \"./node_modules/node-forge/lib/prng.js\");\n__webpack_require__(/*! ./util */ \"./node_modules/node-forge/lib/util.js\");\n\n(function() {\n\n// forge.random already defined\nif(forge.random && forge.random.getBytes) {\n module.exports = forge.random;\n return;\n}\n\n(function(jQuery) {\n\n// the default prng plugin, uses AES-128\nvar prng_aes = {};\nvar _prng_aes_output = new Array(4);\nvar _prng_aes_buffer = forge.util.createBuffer();\nprng_aes.formatKey = function(key) {\n // convert the key into 32-bit integers\n var tmp = forge.util.createBuffer(key);\n key = new Array(4);\n key[0] = tmp.getInt32();\n key[1] = tmp.getInt32();\n key[2] = tmp.getInt32();\n key[3] = tmp.getInt32();\n\n // return the expanded key\n return forge.aes._expandKey(key, false);\n};\nprng_aes.formatSeed = function(seed) {\n // convert seed into 32-bit integers\n var tmp = forge.util.createBuffer(seed);\n seed = new Array(4);\n seed[0] = tmp.getInt32();\n seed[1] = tmp.getInt32();\n seed[2] = tmp.getInt32();\n seed[3] = tmp.getInt32();\n return seed;\n};\nprng_aes.cipher = function(key, seed) {\n forge.aes._updateBlock(key, seed, _prng_aes_output, false);\n _prng_aes_buffer.putInt32(_prng_aes_output[0]);\n _prng_aes_buffer.putInt32(_prng_aes_output[1]);\n _prng_aes_buffer.putInt32(_prng_aes_output[2]);\n _prng_aes_buffer.putInt32(_prng_aes_output[3]);\n return _prng_aes_buffer.getBytes();\n};\nprng_aes.increment = function(seed) {\n // FIXME: do we care about carry or signed issues?\n ++seed[3];\n return seed;\n};\nprng_aes.md = forge.md.sha256;\n\n/**\n * Creates a new PRNG.\n */\nfunction spawnPrng() {\n var ctx = forge.prng.create(prng_aes);\n\n /**\n * Gets random bytes. If a native secure crypto API is unavailable, this\n * method tries to make the bytes more unpredictable by drawing from data that\n * can be collected from the user of the browser, eg: mouse movement.\n *\n * If a callback is given, this method will be called asynchronously.\n *\n * @param count the number of random bytes to get.\n * @param [callback(err, bytes)] called once the operation completes.\n *\n * @return the random bytes in a string.\n */\n ctx.getBytes = function(count, callback) {\n return ctx.generate(count, callback);\n };\n\n /**\n * Gets random bytes asynchronously. If a native secure crypto API is\n * unavailable, this method tries to make the bytes more unpredictable by\n * drawing from data that can be collected from the user of the browser,\n * eg: mouse movement.\n *\n * @param count the number of random bytes to get.\n *\n * @return the random bytes in a string.\n */\n ctx.getBytesSync = function(count) {\n return ctx.generate(count);\n };\n\n return ctx;\n}\n\n// create default prng context\nvar _ctx = spawnPrng();\n\n// add other sources of entropy only if window.crypto.getRandomValues is not\n// available -- otherwise this source will be automatically used by the prng\nvar getRandomValues = null;\nvar globalScope = forge.util.globalScope;\nvar _crypto = globalScope.crypto || globalScope.msCrypto;\nif(_crypto && _crypto.getRandomValues) {\n getRandomVal
/***/ }),
/***/ "./node_modules/node-forge/lib/rc2.js":
/*!********************************************!*\
!*** ./node_modules/node-forge/lib/rc2.js ***!
\********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
eval("/**\n * RC2 implementation.\n *\n * @author Stefan Siegl\n *\n * Copyright (c) 2012 Stefan Siegl <stesie@brokenpipe.de>\n *\n * Information on the RC2 cipher is available from RFC #2268,\n * http://www.ietf.org/rfc/rfc2268.txt\n */\nvar forge = __webpack_require__(/*! ./forge */ \"./node_modules/node-forge/lib/forge.js\");\n__webpack_require__(/*! ./util */ \"./node_modules/node-forge/lib/util.js\");\n\nvar piTable = [\n 0xd9, 0x78, 0xf9, 0xc4, 0x19, 0xdd, 0xb5, 0xed, 0x28, 0xe9, 0xfd, 0x79, 0x4a, 0xa0, 0xd8, 0x9d,\n 0xc6, 0x7e, 0x37, 0x83, 0x2b, 0x76, 0x53, 0x8e, 0x62, 0x4c, 0x64, 0x88, 0x44, 0x8b, 0xfb, 0xa2,\n 0x17, 0x9a, 0x59, 0xf5, 0x87, 0xb3, 0x4f, 0x13, 0x61, 0x45, 0x6d, 0x8d, 0x09, 0x81, 0x7d, 0x32,\n 0xbd, 0x8f, 0x40, 0xeb, 0x86, 0xb7, 0x7b, 0x0b, 0xf0, 0x95, 0x21, 0x22, 0x5c, 0x6b, 0x4e, 0x82,\n 0x54, 0xd6, 0x65, 0x93, 0xce, 0x60, 0xb2, 0x1c, 0x73, 0x56, 0xc0, 0x14, 0xa7, 0x8c, 0xf1, 0xdc,\n 0x12, 0x75, 0xca, 0x1f, 0x3b, 0xbe, 0xe4, 0xd1, 0x42, 0x3d, 0xd4, 0x30, 0xa3, 0x3c, 0xb6, 0x26,\n 0x6f, 0xbf, 0x0e, 0xda, 0x46, 0x69, 0x07, 0x57, 0x27, 0xf2, 0x1d, 0x9b, 0xbc, 0x94, 0x43, 0x03,\n 0xf8, 0x11, 0xc7, 0xf6, 0x90, 0xef, 0x3e, 0xe7, 0x06, 0xc3, 0xd5, 0x2f, 0xc8, 0x66, 0x1e, 0xd7,\n 0x08, 0xe8, 0xea, 0xde, 0x80, 0x52, 0xee, 0xf7, 0x84, 0xaa, 0x72, 0xac, 0x35, 0x4d, 0x6a, 0x2a,\n 0x96, 0x1a, 0xd2, 0x71, 0x5a, 0x15, 0x49, 0x74, 0x4b, 0x9f, 0xd0, 0x5e, 0x04, 0x18, 0xa4, 0xec,\n 0xc2, 0xe0, 0x41, 0x6e, 0x0f, 0x51, 0xcb, 0xcc, 0x24, 0x91, 0xaf, 0x50, 0xa1, 0xf4, 0x70, 0x39,\n 0x99, 0x7c, 0x3a, 0x85, 0x23, 0xb8, 0xb4, 0x7a, 0xfc, 0x02, 0x36, 0x5b, 0x25, 0x55, 0x97, 0x31,\n 0x2d, 0x5d, 0xfa, 0x98, 0xe3, 0x8a, 0x92, 0xae, 0x05, 0xdf, 0x29, 0x10, 0x67, 0x6c, 0xba, 0xc9,\n 0xd3, 0x00, 0xe6, 0xcf, 0xe1, 0x9e, 0xa8, 0x2c, 0x63, 0x16, 0x01, 0x3f, 0x58, 0xe2, 0x89, 0xa9,\n 0x0d, 0x38, 0x34, 0x1b, 0xab, 0x33, 0xff, 0xb0, 0xbb, 0x48, 0x0c, 0x5f, 0xb9, 0xb1, 0xcd, 0x2e,\n 0xc5, 0xf3, 0xdb, 0x47, 0xe5, 0xa5, 0x9c, 0x77, 0x0a, 0xa6, 0x20, 0x68, 0xfe, 0x7f, 0xc1, 0xad\n];\n\nvar s = [1, 2, 3, 5];\n\n/**\n * Rotate a word left by given number of bits.\n *\n * Bits that are shifted out on the left are put back in on the right\n * hand side.\n *\n * @param word The word to shift left.\n * @param bits The number of bits to shift by.\n * @return The rotated word.\n */\nvar rol = function(word, bits) {\n return ((word << bits) & 0xffff) | ((word & 0xffff) >> (16 - bits));\n};\n\n/**\n * Rotate a word right by given number of bits.\n *\n * Bits that are shifted out on the right are put back in on the left\n * hand side.\n *\n * @param word The word to shift right.\n * @param bits The number of bits to shift by.\n * @return The rotated word.\n */\nvar ror = function(word, bits) {\n return ((word & 0xffff) >> bits) | ((word << (16 - bits)) & 0xffff);\n};\n\n/* RC2 API */\nmodule.exports = forge.rc2 = forge.rc2 || {};\n\n/**\n * Perform RC2 key expansion as per RFC #2268, section 2.\n *\n * @param key variable-length user key (between 1 and 128 bytes)\n * @param effKeyBits number of effective key bits (default: 128)\n * @return the expanded RC2 key (ByteBuffer of 128 bytes)\n */\nforge.rc2.expandKey = function(key, effKeyBits) {\n if(typeof key === 'string') {\n key = forge.util.createBuffer(key);\n }\n effKeyBits = effKeyBits || 128;\n\n /* introduce variables that match the names used in RFC #2268 */\n var L = key;\n var T = key.length();\n var T1 = effKeyBits;\n var T8 = Math.ceil(T1 / 8);\n var TM = 0xff >> (T1 & 0x07);\n var i;\n\n for(i = T; i < 128; i++) {\n L.putByte(piTable[(L.at(i - 1) + L.at(i - T)) & 0xff]);\n }\n\n L.setAt(128 - T8, piTable[L.at(128 - T8) & TM]);\n\n for(i = 127 - T8; i >= 0; i--) {\n L.setAt(i, piTable[L.at(i + 1) ^ L.at(i + T8)]);\n }\n\n return L;\n};\n\n/**\n * Creates a RC2 cipher object.\n *\n * @param key the symmetric key to use (as base for key generation).\n * @param bits the number of effective key bits.\n * @param encrypt false for decryption, true for encryption.\n *\n * @return the cipher.\n */\nvar createCipher = function(key, bits, encrypt) {\n var
/***/ }),
/***/ "./node_modules/node-forge/lib/rsa.js":
/*!********************************************!*\
!*** ./node_modules/node-forge/lib/rsa.js ***!
\********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
eval("/**\n * Javascript implementation of basic RSA algorithms.\n *\n * @author Dave Longley\n *\n * Copyright (c) 2010-2014 Digital Bazaar, Inc.\n *\n * The only algorithm currently supported for PKI is RSA.\n *\n * An RSA key is often stored in ASN.1 DER format. The SubjectPublicKeyInfo\n * ASN.1 structure is composed of an algorithm of type AlgorithmIdentifier\n * and a subjectPublicKey of type bit string.\n *\n * The AlgorithmIdentifier contains an Object Identifier (OID) and parameters\n * for the algorithm, if any. In the case of RSA, there aren't any.\n *\n * SubjectPublicKeyInfo ::= SEQUENCE {\n * algorithm AlgorithmIdentifier,\n * subjectPublicKey BIT STRING\n * }\n *\n * AlgorithmIdentifer ::= SEQUENCE {\n * algorithm OBJECT IDENTIFIER,\n * parameters ANY DEFINED BY algorithm OPTIONAL\n * }\n *\n * For an RSA public key, the subjectPublicKey is:\n *\n * RSAPublicKey ::= SEQUENCE {\n * modulus INTEGER, -- n\n * publicExponent INTEGER -- e\n * }\n *\n * PrivateKeyInfo ::= SEQUENCE {\n * version Version,\n * privateKeyAlgorithm PrivateKeyAlgorithmIdentifier,\n * privateKey PrivateKey,\n * attributes [0] IMPLICIT Attributes OPTIONAL\n * }\n *\n * Version ::= INTEGER\n * PrivateKeyAlgorithmIdentifier ::= AlgorithmIdentifier\n * PrivateKey ::= OCTET STRING\n * Attributes ::= SET OF Attribute\n *\n * An RSA private key as the following structure:\n *\n * RSAPrivateKey ::= SEQUENCE {\n * version Version,\n * modulus INTEGER, -- n\n * publicExponent INTEGER, -- e\n * privateExponent INTEGER, -- d\n * prime1 INTEGER, -- p\n * prime2 INTEGER, -- q\n * exponent1 INTEGER, -- d mod (p-1)\n * exponent2 INTEGER, -- d mod (q-1)\n * coefficient INTEGER -- (inverse of q) mod p\n * }\n *\n * Version ::= INTEGER\n *\n * The OID for the RSA key algorithm is: 1.2.840.113549.1.1.1\n */\nvar forge = __webpack_require__(/*! ./forge */ \"./node_modules/node-forge/lib/forge.js\");\n__webpack_require__(/*! ./asn1 */ \"./node_modules/node-forge/lib/asn1.js\");\n__webpack_require__(/*! ./jsbn */ \"./node_modules/node-forge/lib/jsbn.js\");\n__webpack_require__(/*! ./oids */ \"./node_modules/node-forge/lib/oids.js\");\n__webpack_require__(/*! ./pkcs1 */ \"./node_modules/node-forge/lib/pkcs1.js\");\n__webpack_require__(/*! ./prime */ \"./node_modules/node-forge/lib/prime.js\");\n__webpack_require__(/*! ./random */ \"./node_modules/node-forge/lib/random.js\");\n__webpack_require__(/*! ./util */ \"./node_modules/node-forge/lib/util.js\");\n\nif(typeof BigInteger === 'undefined') {\n var BigInteger = forge.jsbn.BigInteger;\n}\n\nvar _crypto = forge.util.isNodejs ? __webpack_require__(/*! crypto */ \"?b254\") : null;\n\n// shortcut for asn.1 API\nvar asn1 = forge.asn1;\n\n// shortcut for util API\nvar util = forge.util;\n\n/*\n * RSA encryption and decryption, see RFC 2313.\n */\nforge.pki = forge.pki || {};\nmodule.exports = forge.pki.rsa = forge.rsa = forge.rsa || {};\nvar pki = forge.pki;\n\n// for finding primes, which are 30k+i for i = 1, 7, 11, 13, 17, 19, 23, 29\nvar GCD_30_DELTA = [6, 4, 2, 4, 2, 4, 6, 2];\n\n// validator for a PrivateKeyInfo structure\nvar privateKeyValidator = {\n // PrivateKeyInfo\n name: 'PrivateKeyInfo',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n value: [{\n // Version (INTEGER)\n name: 'PrivateKeyInfo.version',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.INTEGER,\n constructed: false,\n capture: 'privateKeyVersion'\n }, {\n // privateKeyAlgorithm\n name: 'PrivateKeyInfo.privateKeyAlgorithm',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.SEQUENCE,\n constructed: true,\n value: [{\n name: 'AlgorithmIdentifier.algorithm',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.OID,\n constructed: false,\n capture: 'privateKeyOid'\n }]\n }, {\n // PrivateKey\n name: 'PrivateKeyInfo',\n tagClass: asn1.Class.UNIVERSAL,\n type: asn1.Type.OCTETSTRING,\n constructed: false,\n
/***/ }),
/***/ "./node_modules/node-forge/lib/sha1.js":
/*!*********************************************!*\
!*** ./node_modules/node-forge/lib/sha1.js ***!
\*********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
eval("/**\n * Secure Hash Algorithm with 160-bit digest (SHA-1) implementation.\n *\n * @author Dave Longley\n *\n * Copyright (c) 2010-2015 Digital Bazaar, Inc.\n */\nvar forge = __webpack_require__(/*! ./forge */ \"./node_modules/node-forge/lib/forge.js\");\n__webpack_require__(/*! ./md */ \"./node_modules/node-forge/lib/md.js\");\n__webpack_require__(/*! ./util */ \"./node_modules/node-forge/lib/util.js\");\n\nvar sha1 = module.exports = forge.sha1 = forge.sha1 || {};\nforge.md.sha1 = forge.md.algorithms.sha1 = sha1;\n\n/**\n * Creates a SHA-1 message digest object.\n *\n * @return a message digest object.\n */\nsha1.create = function() {\n // do initialization as necessary\n if(!_initialized) {\n _init();\n }\n\n // SHA-1 state contains five 32-bit integers\n var _state = null;\n\n // input buffer\n var _input = forge.util.createBuffer();\n\n // used for word storage\n var _w = new Array(80);\n\n // message digest object\n var md = {\n algorithm: 'sha1',\n blockLength: 64,\n digestLength: 20,\n // 56-bit length of message so far (does not including padding)\n messageLength: 0,\n // true message length\n fullMessageLength: null,\n // size of message length in bytes\n messageLengthSize: 8\n };\n\n /**\n * Starts the digest.\n *\n * @return this digest object.\n */\n md.start = function() {\n // up to 56-bit message length for convenience\n md.messageLength = 0;\n\n // full message length (set md.messageLength64 for backwards-compatibility)\n md.fullMessageLength = md.messageLength64 = [];\n var int32s = md.messageLengthSize / 4;\n for(var i = 0; i < int32s; ++i) {\n md.fullMessageLength.push(0);\n }\n _input = forge.util.createBuffer();\n _state = {\n h0: 0x67452301,\n h1: 0xEFCDAB89,\n h2: 0x98BADCFE,\n h3: 0x10325476,\n h4: 0xC3D2E1F0\n };\n return md;\n };\n // start digest automatically for first time\n md.start();\n\n /**\n * Updates the digest with the given message input. The given input can\n * treated as raw input (no encoding will be applied) or an encoding of\n * 'utf8' maybe given to encode the input using UTF-8.\n *\n * @param msg the message input to update with.\n * @param encoding the encoding to use (default: 'raw', other: 'utf8').\n *\n * @return this digest object.\n */\n md.update = function(msg, encoding) {\n if(encoding === 'utf8') {\n msg = forge.util.encodeUtf8(msg);\n }\n\n // update message length\n var len = msg.length;\n md.messageLength += len;\n len = [(len / 0x100000000) >>> 0, len >>> 0];\n for(var i = md.fullMessageLength.length - 1; i >= 0; --i) {\n md.fullMessageLength[i] += len[1];\n len[1] = len[0] + ((md.fullMessageLength[i] / 0x100000000) >>> 0);\n md.fullMessageLength[i] = md.fullMessageLength[i] >>> 0;\n len[0] = ((len[1] / 0x100000000) >>> 0);\n }\n\n // add bytes to input buffer\n _input.putBytes(msg);\n\n // process bytes\n _update(_state, _w, _input);\n\n // compact input buffer every 2K or if empty\n if(_input.read > 2048 || _input.length() === 0) {\n _input.compact();\n }\n\n return md;\n };\n\n /**\n * Produces the digest.\n *\n * @return a byte buffer containing the digest value.\n */\n md.digest = function() {\n /* Note: Here we copy the remaining bytes in the input buffer and\n add the appropriate SHA-1 padding. Then we do the final update\n on a copy of the state so that if the user wants to get\n intermediate digests they can do so. */\n\n /* Determine the number of bytes that must be added to the message\n to ensure its length is congruent to 448 mod 512. In other words,\n the data to be digested must be a multiple of 512 bits (or 128 bytes).\n This data includes the message, some padding, and the length of the\n message. Since the length of the message will be encoded as 8 bytes (64\n bits), that means that the last segment of the data must have 56 bytes\n (448 bits) of message and padding. Therefore, the len
/***/ }),
/***/ "./node_modules/node-forge/lib/sha256.js":
/*!***********************************************!*\
!*** ./node_modules/node-forge/lib/sha256.js ***!
\***********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
eval("/**\n * Secure Hash Algorithm with 256-bit digest (SHA-256) implementation.\n *\n * See FIPS 180-2 for details.\n *\n * @author Dave Longley\n *\n * Copyright (c) 2010-2015 Digital Bazaar, Inc.\n */\nvar forge = __webpack_require__(/*! ./forge */ \"./node_modules/node-forge/lib/forge.js\");\n__webpack_require__(/*! ./md */ \"./node_modules/node-forge/lib/md.js\");\n__webpack_require__(/*! ./util */ \"./node_modules/node-forge/lib/util.js\");\n\nvar sha256 = module.exports = forge.sha256 = forge.sha256 || {};\nforge.md.sha256 = forge.md.algorithms.sha256 = sha256;\n\n/**\n * Creates a SHA-256 message digest object.\n *\n * @return a message digest object.\n */\nsha256.create = function() {\n // do initialization as necessary\n if(!_initialized) {\n _init();\n }\n\n // SHA-256 state contains eight 32-bit integers\n var _state = null;\n\n // input buffer\n var _input = forge.util.createBuffer();\n\n // used for word storage\n var _w = new Array(64);\n\n // message digest object\n var md = {\n algorithm: 'sha256',\n blockLength: 64,\n digestLength: 32,\n // 56-bit length of message so far (does not including padding)\n messageLength: 0,\n // true message length\n fullMessageLength: null,\n // size of message length in bytes\n messageLengthSize: 8\n };\n\n /**\n * Starts the digest.\n *\n * @return this digest object.\n */\n md.start = function() {\n // up to 56-bit message length for convenience\n md.messageLength = 0;\n\n // full message length (set md.messageLength64 for backwards-compatibility)\n md.fullMessageLength = md.messageLength64 = [];\n var int32s = md.messageLengthSize / 4;\n for(var i = 0; i < int32s; ++i) {\n md.fullMessageLength.push(0);\n }\n _input = forge.util.createBuffer();\n _state = {\n h0: 0x6A09E667,\n h1: 0xBB67AE85,\n h2: 0x3C6EF372,\n h3: 0xA54FF53A,\n h4: 0x510E527F,\n h5: 0x9B05688C,\n h6: 0x1F83D9AB,\n h7: 0x5BE0CD19\n };\n return md;\n };\n // start digest automatically for first time\n md.start();\n\n /**\n * Updates the digest with the given message input. The given input can\n * treated as raw input (no encoding will be applied) or an encoding of\n * 'utf8' maybe given to encode the input using UTF-8.\n *\n * @param msg the message input to update with.\n * @param encoding the encoding to use (default: 'raw', other: 'utf8').\n *\n * @return this digest object.\n */\n md.update = function(msg, encoding) {\n if(encoding === 'utf8') {\n msg = forge.util.encodeUtf8(msg);\n }\n\n // update message length\n var len = msg.length;\n md.messageLength += len;\n len = [(len / 0x100000000) >>> 0, len >>> 0];\n for(var i = md.fullMessageLength.length - 1; i >= 0; --i) {\n md.fullMessageLength[i] += len[1];\n len[1] = len[0] + ((md.fullMessageLength[i] / 0x100000000) >>> 0);\n md.fullMessageLength[i] = md.fullMessageLength[i] >>> 0;\n len[0] = ((len[1] / 0x100000000) >>> 0);\n }\n\n // add bytes to input buffer\n _input.putBytes(msg);\n\n // process bytes\n _update(_state, _w, _input);\n\n // compact input buffer every 2K or if empty\n if(_input.read > 2048 || _input.length() === 0) {\n _input.compact();\n }\n\n return md;\n };\n\n /**\n * Produces the digest.\n *\n * @return a byte buffer containing the digest value.\n */\n md.digest = function() {\n /* Note: Here we copy the remaining bytes in the input buffer and\n add the appropriate SHA-256 padding. Then we do the final update\n on a copy of the state so that if the user wants to get\n intermediate digests they can do so. */\n\n /* Determine the number of bytes that must be added to the message\n to ensure its length is congruent to 448 mod 512. In other words,\n the data to be digested must be a multiple of 512 bits (or 128 bytes).\n This data includes the message, some padding, and the length of the\n message. Since the length of the message will be encoded as 8 bytes (64\n
/***/ }),
/***/ "./node_modules/node-forge/lib/sha512.js":
/*!***********************************************!*\
!*** ./node_modules/node-forge/lib/sha512.js ***!
\***********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
eval("/**\n * Secure Hash Algorithm with a 1024-bit block size implementation.\n *\n * This includes: SHA-512, SHA-384, SHA-512/224, and SHA-512/256. For\n * SHA-256 (block size 512 bits), see sha256.js.\n *\n * See FIPS 180-4 for details.\n *\n * @author Dave Longley\n *\n * Copyright (c) 2014-2015 Digital Bazaar, Inc.\n */\nvar forge = __webpack_require__(/*! ./forge */ \"./node_modules/node-forge/lib/forge.js\");\n__webpack_require__(/*! ./md */ \"./node_modules/node-forge/lib/md.js\");\n__webpack_require__(/*! ./util */ \"./node_modules/node-forge/lib/util.js\");\n\nvar sha512 = module.exports = forge.sha512 = forge.sha512 || {};\n\n// SHA-512\nforge.md.sha512 = forge.md.algorithms.sha512 = sha512;\n\n// SHA-384\nvar sha384 = forge.sha384 = forge.sha512.sha384 = forge.sha512.sha384 || {};\nsha384.create = function() {\n return sha512.create('SHA-384');\n};\nforge.md.sha384 = forge.md.algorithms.sha384 = sha384;\n\n// SHA-512/256\nforge.sha512.sha256 = forge.sha512.sha256 || {\n create: function() {\n return sha512.create('SHA-512/256');\n }\n};\nforge.md['sha512/256'] = forge.md.algorithms['sha512/256'] =\n forge.sha512.sha256;\n\n// SHA-512/224\nforge.sha512.sha224 = forge.sha512.sha224 || {\n create: function() {\n return sha512.create('SHA-512/224');\n }\n};\nforge.md['sha512/224'] = forge.md.algorithms['sha512/224'] =\n forge.sha512.sha224;\n\n/**\n * Creates a SHA-2 message digest object.\n *\n * @param algorithm the algorithm to use (SHA-512, SHA-384, SHA-512/224,\n * SHA-512/256).\n *\n * @return a message digest object.\n */\nsha512.create = function(algorithm) {\n // do initialization as necessary\n if(!_initialized) {\n _init();\n }\n\n if(typeof algorithm === 'undefined') {\n algorithm = 'SHA-512';\n }\n\n if(!(algorithm in _states)) {\n throw new Error('Invalid SHA-512 algorithm: ' + algorithm);\n }\n\n // SHA-512 state contains eight 64-bit integers (each as two 32-bit ints)\n var _state = _states[algorithm];\n var _h = null;\n\n // input buffer\n var _input = forge.util.createBuffer();\n\n // used for 64-bit word storage\n var _w = new Array(80);\n for(var wi = 0; wi < 80; ++wi) {\n _w[wi] = new Array(2);\n }\n\n // determine digest length by algorithm name (default)\n var digestLength = 64;\n switch(algorithm) {\n case 'SHA-384':\n digestLength = 48;\n break;\n case 'SHA-512/256':\n digestLength = 32;\n break;\n case 'SHA-512/224':\n digestLength = 28;\n break;\n }\n\n // message digest object\n var md = {\n // SHA-512 => sha512\n algorithm: algorithm.replace('-', '').toLowerCase(),\n blockLength: 128,\n digestLength: digestLength,\n // 56-bit length of message so far (does not including padding)\n messageLength: 0,\n // true message length\n fullMessageLength: null,\n // size of message length in bytes\n messageLengthSize: 16\n };\n\n /**\n * Starts the digest.\n *\n * @return this digest object.\n */\n md.start = function() {\n // up to 56-bit message length for convenience\n md.messageLength = 0;\n\n // full message length (set md.messageLength128 for backwards-compatibility)\n md.fullMessageLength = md.messageLength128 = [];\n var int32s = md.messageLengthSize / 4;\n for(var i = 0; i < int32s; ++i) {\n md.fullMessageLength.push(0);\n }\n _input = forge.util.createBuffer();\n _h = new Array(_state.length);\n for(var i = 0; i < _state.length; ++i) {\n _h[i] = _state[i].slice(0);\n }\n return md;\n };\n // start digest automatically for first time\n md.start();\n\n /**\n * Updates the digest with the given message input. The given input can\n * treated as raw input (no encoding will be applied) or an encoding of\n * 'utf8' maybe given to encode the input using UTF-8.\n *\n * @param msg the message input to update with.\n * @param encoding the encoding to use (default: 'raw', other: 'utf8').\n *\n * @return this digest object.\n */\n md.update = function(msg, encoding) {\n if(encoding === 'utf8')
/***/ }),
/***/ "./node_modules/node-forge/lib/util.js":
/*!*********************************************!*\
!*** ./node_modules/node-forge/lib/util.js ***!
\*********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
eval("/**\n * Utility functions for web applications.\n *\n * @author Dave Longley\n *\n * Copyright (c) 2010-2018 Digital Bazaar, Inc.\n */\nvar forge = __webpack_require__(/*! ./forge */ \"./node_modules/node-forge/lib/forge.js\");\nvar baseN = __webpack_require__(/*! ./baseN */ \"./node_modules/node-forge/lib/baseN.js\");\n\n/* Utilities API */\nvar util = module.exports = forge.util = forge.util || {};\n\n// define setImmediate and nextTick\n(function() {\n // use native nextTick (unless we're in webpack)\n // webpack (or better node-libs-browser polyfill) sets process.browser.\n // this way we can detect webpack properly\n if(typeof process !== 'undefined' && process.nextTick && !process.browser) {\n util.nextTick = process.nextTick;\n if(typeof setImmediate === 'function') {\n util.setImmediate = setImmediate;\n } else {\n // polyfill setImmediate with nextTick, older versions of node\n // (those w/o setImmediate) won't totally starve IO\n util.setImmediate = util.nextTick;\n }\n return;\n }\n\n // polyfill nextTick with native setImmediate\n if(typeof setImmediate === 'function') {\n util.setImmediate = function() { return setImmediate.apply(undefined, arguments); };\n util.nextTick = function(callback) {\n return setImmediate(callback);\n };\n return;\n }\n\n /* Note: A polyfill upgrade pattern is used here to allow combining\n polyfills. For example, MutationObserver is fast, but blocks UI updates,\n so it needs to allow UI updates periodically, so it falls back on\n postMessage or setTimeout. */\n\n // polyfill with setTimeout\n util.setImmediate = function(callback) {\n setTimeout(callback, 0);\n };\n\n // upgrade polyfill to use postMessage\n if(typeof window !== 'undefined' &&\n typeof window.postMessage === 'function') {\n var msg = 'forge.setImmediate';\n var callbacks = [];\n util.setImmediate = function(callback) {\n callbacks.push(callback);\n // only send message when one hasn't been sent in\n // the current turn of the event loop\n if(callbacks.length === 1) {\n window.postMessage(msg, '*');\n }\n };\n function handler(event) {\n if(event.source === window && event.data === msg) {\n event.stopPropagation();\n var copy = callbacks.slice();\n callbacks.length = 0;\n copy.forEach(function(callback) {\n callback();\n });\n }\n }\n window.addEventListener('message', handler, true);\n }\n\n // upgrade polyfill to use MutationObserver\n if(typeof MutationObserver !== 'undefined') {\n // polyfill with MutationObserver\n var now = Date.now();\n var attr = true;\n var div = document.createElement('div');\n var callbacks = [];\n new MutationObserver(function() {\n var copy = callbacks.slice();\n callbacks.length = 0;\n copy.forEach(function(callback) {\n callback();\n });\n }).observe(div, {attributes: true});\n var oldSetImmediate = util.setImmediate;\n util.setImmediate = function(callback) {\n if(Date.now() - now > 15) {\n now = Date.now();\n oldSetImmediate(callback);\n } else {\n callbacks.push(callback);\n // only trigger observer when it hasn't been triggered in\n // the current turn of the event loop\n if(callbacks.length === 1) {\n div.setAttribute('a', attr = !attr);\n }\n }\n };\n }\n\n util.nextTick = util.setImmediate;\n})();\n\n// check if running under Node.js\nutil.isNodejs =\n typeof process !== 'undefined' && process.versions && process.versions.node;\n\n\n// 'self' will also work in Web Workers (instance of WorkerGlobalScope) while\n// it will point to `window` in the main thread.\n// To remain compatible with older browsers, we fall back to 'window' if 'self'\n// is not available.\nutil.globalScope = (function() {\n if(util.isNodejs) {\n return __webpack_require__.g;\n }\n\n return typeof self === 'undefined' ? window : self;\n})();\n\n// define isArray\nutil.isArray = Arra
/***/ }),
/***/ "./node_modules/protobufjs/src/reader.js":
/*!***********************************************!*\
!*** ./node_modules/protobufjs/src/reader.js ***!
\***********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
eval("\nmodule.exports = Reader;\n\nvar util = __webpack_require__(/*! ./util/minimal */ \"./node_modules/protobufjs/src/util/minimal.js\");\n\nvar BufferReader; // cyclic\n\nvar LongBits = util.LongBits,\n utf8 = util.utf8;\n\n/* istanbul ignore next */\nfunction indexOutOfRange(reader, writeLength) {\n return RangeError(\"index out of range: \" + reader.pos + \" + \" + (writeLength || 1) + \" > \" + reader.len);\n}\n\n/**\n * Constructs a new reader instance using the specified buffer.\n * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n * @param {Uint8Array} buffer Buffer to read from\n */\nfunction Reader(buffer) {\n\n /**\n * Read buffer.\n * @type {Uint8Array}\n */\n this.buf = buffer;\n\n /**\n * Read buffer position.\n * @type {number}\n */\n this.pos = 0;\n\n /**\n * Read buffer length.\n * @type {number}\n */\n this.len = buffer.length;\n}\n\nvar create_array = typeof Uint8Array !== \"undefined\"\n ? function create_typed_array(buffer) {\n if (buffer instanceof Uint8Array || Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n }\n /* istanbul ignore next */\n : function create_array(buffer) {\n if (Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n };\n\nvar create = function create() {\n return util.Buffer\n ? function create_buffer_setup(buffer) {\n return (Reader.create = function create_buffer(buffer) {\n return util.Buffer.isBuffer(buffer)\n ? new BufferReader(buffer)\n /* istanbul ignore next */\n : create_array(buffer);\n })(buffer);\n }\n /* istanbul ignore next */\n : create_array;\n};\n\n/**\n * Creates a new reader using the specified buffer.\n * @function\n * @param {Uint8Array|Buffer} buffer Buffer to read from\n * @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}\n * @throws {Error} If `buffer` is not a valid buffer\n */\nReader.create = create();\n\nReader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ util.Array.prototype.slice;\n\n/**\n * Reads a varint as an unsigned 32 bit value.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.uint32 = (function read_uint32_setup() {\n var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!)\n return function read_uint32() {\n value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value;\n\n /* istanbul ignore if */\n if ((this.pos += 5) > this.len) {\n this.pos = this.len;\n throw indexOutOfRange(this, 10);\n }\n return value;\n };\n})();\n\n/**\n * Reads a varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.int32 = function read_int32() {\n return this.uint32() | 0;\n};\n\n/**\n * Reads a zig-zag encoded varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.sint32 = function read_sint32() {\n var value = this.uint32();\n return value >>> 1 ^ -(value & 1) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readLongVarint() {\n // tends to deopt with local vars for octet etc.\n var bits = new LongBits(0, 0);\n var i = 0;\n if (this.len - this.pos > 4) { // fast route (lo)\n for (; i < 4; ++i) {
/***/ }),
/***/ "./node_modules/protobufjs/src/reader_buffer.js":
/*!******************************************************!*\
!*** ./node_modules/protobufjs/src/reader_buffer.js ***!
\******************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
eval("\nmodule.exports = BufferReader;\n\n// extends Reader\nvar Reader = __webpack_require__(/*! ./reader */ \"./node_modules/protobufjs/src/reader.js\");\n(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader;\n\nvar util = __webpack_require__(/*! ./util/minimal */ \"./node_modules/protobufjs/src/util/minimal.js\");\n\n/**\n * Constructs a new buffer reader instance.\n * @classdesc Wire format reader using node buffers.\n * @extends Reader\n * @constructor\n * @param {Buffer} buffer Buffer to read from\n */\nfunction BufferReader(buffer) {\n Reader.call(this, buffer);\n\n /**\n * Read buffer.\n * @name BufferReader#buf\n * @type {Buffer}\n */\n}\n\nBufferReader._configure = function () {\n /* istanbul ignore else */\n if (util.Buffer)\n BufferReader.prototype._slice = util.Buffer.prototype.slice;\n};\n\n\n/**\n * @override\n */\nBufferReader.prototype.string = function read_string_buffer() {\n var len = this.uint32(); // modifies pos\n return this.buf.utf8Slice\n ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len))\n : this.buf.toString(\"utf-8\", this.pos, this.pos = Math.min(this.pos + len, this.len));\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @name BufferReader#bytes\n * @function\n * @returns {Buffer} Value read\n */\n\nBufferReader._configure();\n\n\n//# sourceURL=webpack://light/./node_modules/protobufjs/src/reader_buffer.js?");
/***/ }),
/***/ "./node_modules/protobufjs/src/util/longbits.js":
/*!******************************************************!*\
!*** ./node_modules/protobufjs/src/util/longbits.js ***!
\******************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
eval("\nmodule.exports = LongBits;\n\nvar util = __webpack_require__(/*! ../util/minimal */ \"./node_modules/protobufjs/src/util/minimal.js\");\n\n/**\n * Constructs new long bits.\n * @classdesc Helper class for working with the low and high bits of a 64 bit value.\n * @memberof util\n * @constructor\n * @param {number} lo Low 32 bits, unsigned\n * @param {number} hi High 32 bits, unsigned\n */\nfunction LongBits(lo, hi) {\n\n // note that the casts below are theoretically unnecessary as of today, but older statically\n // generated converter code might still call the ctor with signed 32bits. kept for compat.\n\n /**\n * Low bits.\n * @type {number}\n */\n this.lo = lo >>> 0;\n\n /**\n * High bits.\n * @type {number}\n */\n this.hi = hi >>> 0;\n}\n\n/**\n * Zero bits.\n * @memberof util.LongBits\n * @type {util.LongBits}\n */\nvar zero = LongBits.zero = new LongBits(0, 0);\n\nzero.toNumber = function() { return 0; };\nzero.zzEncode = zero.zzDecode = function() { return this; };\nzero.length = function() { return 1; };\n\n/**\n * Zero hash.\n * @memberof util.LongBits\n * @type {string}\n */\nvar zeroHash = LongBits.zeroHash = \"\\0\\0\\0\\0\\0\\0\\0\\0\";\n\n/**\n * Constructs new long bits from the specified number.\n * @param {number} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.fromNumber = function fromNumber(value) {\n if (value === 0)\n return zero;\n var sign = value < 0;\n if (sign)\n value = -value;\n var lo = value >>> 0,\n hi = (value - lo) / 4294967296 >>> 0;\n if (sign) {\n hi = ~hi >>> 0;\n lo = ~lo >>> 0;\n if (++lo > 4294967295) {\n lo = 0;\n if (++hi > 4294967295)\n hi = 0;\n }\n }\n return new LongBits(lo, hi);\n};\n\n/**\n * Constructs new long bits from a number, long or string.\n * @param {Long|number|string} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.from = function from(value) {\n if (typeof value === \"number\")\n return LongBits.fromNumber(value);\n if (util.isString(value)) {\n /* istanbul ignore else */\n if (util.Long)\n value = util.Long.fromString(value);\n else\n return LongBits.fromNumber(parseInt(value, 10));\n }\n return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;\n};\n\n/**\n * Converts this long bits to a possibly unsafe JavaScript number.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {number} Possibly unsafe number\n */\nLongBits.prototype.toNumber = function toNumber(unsigned) {\n if (!unsigned && this.hi >>> 31) {\n var lo = ~this.lo + 1 >>> 0,\n hi = ~this.hi >>> 0;\n if (!lo)\n hi = hi + 1 >>> 0;\n return -(lo + hi * 4294967296);\n }\n return this.lo + this.hi * 4294967296;\n};\n\n/**\n * Converts this long bits to a long.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {Long} Long\n */\nLongBits.prototype.toLong = function toLong(unsigned) {\n return util.Long\n ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned))\n /* istanbul ignore next */\n : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };\n};\n\nvar charCodeAt = String.prototype.charCodeAt;\n\n/**\n * Constructs new long bits from the specified 8 characters long hash.\n * @param {string} hash Hash\n * @returns {util.LongBits} Bits\n */\nLongBits.fromHash = function fromHash(hash) {\n if (hash === zeroHash)\n return zero;\n return new LongBits(\n ( charCodeAt.call(hash, 0)\n | charCodeAt.call(hash, 1) << 8\n | charCodeAt.call(hash, 2) << 16\n | charCodeAt.call(hash, 3) << 24) >>> 0\n ,\n ( charCodeAt.call(hash, 4)\n | charCodeAt.call(hash, 5) << 8\n | charCodeAt.call(hash, 6) << 16\n | charCodeAt.call(hash, 7) << 24) >>> 0\n );\n};\n\n/**\n * Converts this long bits to a 8 characters long hash.\n * @re
/***/ }),
/***/ "./node_modules/protobufjs/src/util/minimal.js":
/*!*****************************************************!*\
!*** ./node_modules/protobufjs/src/util/minimal.js ***!
\*****************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
eval("\nvar util = exports;\n\n// used to return a Promise where callback is omitted\nutil.asPromise = __webpack_require__(/*! @protobufjs/aspromise */ \"./node_modules/@protobufjs/aspromise/index.js\");\n\n// converts to / from base64 encoded strings\nutil.base64 = __webpack_require__(/*! @protobufjs/base64 */ \"./node_modules/@protobufjs/base64/index.js\");\n\n// base class of rpc.Service\nutil.EventEmitter = __webpack_require__(/*! @protobufjs/eventemitter */ \"./node_modules/@protobufjs/eventemitter/index.js\");\n\n// float handling accross browsers\nutil.float = __webpack_require__(/*! @protobufjs/float */ \"./node_modules/@protobufjs/float/index.js\");\n\n// requires modules optionally and hides the call from bundlers\nutil.inquire = __webpack_require__(/*! @protobufjs/inquire */ \"./node_modules/@protobufjs/inquire/index.js\");\n\n// converts to / from utf8 encoded strings\nutil.utf8 = __webpack_require__(/*! @protobufjs/utf8 */ \"./node_modules/@protobufjs/utf8/index.js\");\n\n// provides a node-like buffer pool in the browser\nutil.pool = __webpack_require__(/*! @protobufjs/pool */ \"./node_modules/@protobufjs/pool/index.js\");\n\n// utility to work with the low and high bits of a 64 bit value\nutil.LongBits = __webpack_require__(/*! ./longbits */ \"./node_modules/protobufjs/src/util/longbits.js\");\n\n/**\n * Whether running within node or not.\n * @memberof util\n * @type {boolean}\n */\nutil.isNode = Boolean(typeof __webpack_require__.g !== \"undefined\"\n && __webpack_require__.g\n && __webpack_require__.g.process\n && __webpack_require__.g.process.versions\n && __webpack_require__.g.process.versions.node);\n\n/**\n * Global object reference.\n * @memberof util\n * @type {Object}\n */\nutil.global = util.isNode && __webpack_require__.g\n || typeof window !== \"undefined\" && window\n || typeof self !== \"undefined\" && self\n || this; // eslint-disable-line no-invalid-this\n\n/**\n * An immuable empty array.\n * @memberof util\n * @type {Array.<*>}\n * @const\n */\nutil.emptyArray = Object.freeze ? Object.freeze([]) : /* istanbul ignore next */ []; // used on prototypes\n\n/**\n * An immutable empty object.\n * @type {Object}\n * @const\n */\nutil.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next */ {}; // used on prototypes\n\n/**\n * Tests if the specified value is an integer.\n * @function\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is an integer\n */\nutil.isInteger = Number.isInteger || /* istanbul ignore next */ function isInteger(value) {\n return typeof value === \"number\" && isFinite(value) && Math.floor(value) === value;\n};\n\n/**\n * Tests if the specified value is a string.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a string\n */\nutil.isString = function isString(value) {\n return typeof value === \"string\" || value instanceof String;\n};\n\n/**\n * Tests if the specified value is a non-null object.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a non-null object\n */\nutil.isObject = function isObject(value) {\n return value && typeof value === \"object\";\n};\n\n/**\n * Checks if a property on a message is considered to be present.\n * This is an alias of {@link util.isSet}.\n * @function\n * @param {Object} obj Plain object or message instance\n * @param {string} prop Property name\n * @returns {boolean} `true` if considered to be present, otherwise `false`\n */\nutil.isset =\n\n/**\n * Checks if a property on a message is considered to be present.\n * @param {Object} obj Plain object or message instance\n * @param {string} prop Property name\n * @returns {boolean} `true` if considered to be present, otherwise `false`\n */\nutil.isSet = function isSet(obj, prop) {\n var value = obj[prop];\n if (value != null && obj.hasOwnProperty(prop)) // eslint-disable-line eqeqeq, no-prototype-builtins\n return typeof value !== \"object\" || (Array.is
/***/ }),
/***/ "./node_modules/protobufjs/src/writer.js":
/*!***********************************************!*\
!*** ./node_modules/protobufjs/src/writer.js ***!
\***********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
eval("\nmodule.exports = Writer;\n\nvar util = __webpack_require__(/*! ./util/minimal */ \"./node_modules/protobufjs/src/util/minimal.js\");\n\nvar BufferWriter; // cyclic\n\nvar LongBits = util.LongBits,\n base64 = util.base64,\n utf8 = util.utf8;\n\n/**\n * Constructs a new writer operation instance.\n * @classdesc Scheduled writer operation.\n * @constructor\n * @param {function(*, Uint8Array, number)} fn Function to call\n * @param {number} len Value byte length\n * @param {*} val Value to write\n * @ignore\n */\nfunction Op(fn, len, val) {\n\n /**\n * Function to call.\n * @type {function(Uint8Array, number, *)}\n */\n this.fn = fn;\n\n /**\n * Value byte length.\n * @type {number}\n */\n this.len = len;\n\n /**\n * Next operation.\n * @type {Writer.Op|undefined}\n */\n this.next = undefined;\n\n /**\n * Value to write.\n * @type {*}\n */\n this.val = val; // type varies\n}\n\n/* istanbul ignore next */\nfunction noop() {} // eslint-disable-line no-empty-function\n\n/**\n * Constructs a new writer state instance.\n * @classdesc Copied writer state.\n * @memberof Writer\n * @constructor\n * @param {Writer} writer Writer to copy state from\n * @ignore\n */\nfunction State(writer) {\n\n /**\n * Current head.\n * @type {Writer.Op}\n */\n this.head = writer.head;\n\n /**\n * Current tail.\n * @type {Writer.Op}\n */\n this.tail = writer.tail;\n\n /**\n * Current buffer length.\n * @type {number}\n */\n this.len = writer.len;\n\n /**\n * Next state.\n * @type {State|null}\n */\n this.next = writer.states;\n}\n\n/**\n * Constructs a new writer instance.\n * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n */\nfunction Writer() {\n\n /**\n * Current length.\n * @type {number}\n */\n this.len = 0;\n\n /**\n * Operations head.\n * @type {Object}\n */\n this.head = new Op(noop, 0, 0);\n\n /**\n * Operations tail\n * @type {Object}\n */\n this.tail = this.head;\n\n /**\n * Linked forked states.\n * @type {Object|null}\n */\n this.states = null;\n\n // When a value is written, the writer calculates its byte length and puts it into a linked\n // list of operations to perform when finish() is called. This both allows us to allocate\n // buffers of the exact required size and reduces the amount of work we have to do compared\n // to first calculating over objects and then encoding over objects. In our case, the encoding\n // part is just a linked list walk calling operations with already prepared values.\n}\n\nvar create = function create() {\n return util.Buffer\n ? function create_buffer_setup() {\n return (Writer.create = function create_buffer() {\n return new BufferWriter();\n })();\n }\n /* istanbul ignore next */\n : function create_array() {\n return new Writer();\n };\n};\n\n/**\n * Creates a new writer.\n * @function\n * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer}\n */\nWriter.create = create();\n\n/**\n * Allocates a buffer of the specified size.\n * @param {number} size Buffer size\n * @returns {Uint8Array} Buffer\n */\nWriter.alloc = function alloc(size) {\n return new util.Array(size);\n};\n\n// Use Uint8Array buffer pool in the browser, just like node does with buffers\n/* istanbul ignore else */\nif (util.Array !== Array)\n Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);\n\n/**\n * Pushes a new operation to the queue.\n * @param {function(Uint8Array, number, *)} fn Function to call\n * @param {number} len Value byte length\n * @param {number} val Value to write\n * @returns {Writer} `this`\n * @private\n */\nWriter.prototype._push = function push(fn, len, val) {\n this.tail = this.tail.next = new Op(fn, len, val);\n this.len += len;\n
/***/ }),
/***/ "./node_modules/protobufjs/src/writer_buffer.js":
/*!******************************************************!*\
!*** ./node_modules/protobufjs/src/writer_buffer.js ***!
\******************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
eval("\nmodule.exports = BufferWriter;\n\n// extends Writer\nvar Writer = __webpack_require__(/*! ./writer */ \"./node_modules/protobufjs/src/writer.js\");\n(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter;\n\nvar util = __webpack_require__(/*! ./util/minimal */ \"./node_modules/protobufjs/src/util/minimal.js\");\n\n/**\n * Constructs a new buffer writer instance.\n * @classdesc Wire format writer using node buffers.\n * @extends Writer\n * @constructor\n */\nfunction BufferWriter() {\n Writer.call(this);\n}\n\nBufferWriter._configure = function () {\n /**\n * Allocates a buffer of the specified size.\n * @function\n * @param {number} size Buffer size\n * @returns {Buffer} Buffer\n */\n BufferWriter.alloc = util._Buffer_allocUnsafe;\n\n BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === \"set\"\n ? function writeBytesBuffer_set(val, buf, pos) {\n buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited)\n // also works for plain array values\n }\n /* istanbul ignore next */\n : function writeBytesBuffer_copy(val, buf, pos) {\n if (val.copy) // Buffer values\n val.copy(buf, pos, 0, val.length);\n else for (var i = 0; i < val.length;) // plain array values\n buf[pos++] = val[i++];\n };\n};\n\n\n/**\n * @override\n */\nBufferWriter.prototype.bytes = function write_bytes_buffer(value) {\n if (util.isString(value))\n value = util._Buffer_from(value, \"base64\");\n var len = value.length >>> 0;\n this.uint32(len);\n if (len)\n this._push(BufferWriter.writeBytesBuffer, len, value);\n return this;\n};\n\nfunction writeStringBuffer(val, buf, pos) {\n if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions)\n util.utf8.write(val, buf, pos);\n else if (buf.utf8Write)\n buf.utf8Write(val, pos);\n else\n buf.write(val, pos);\n}\n\n/**\n * @override\n */\nBufferWriter.prototype.string = function write_string_buffer(value) {\n var len = util.Buffer.byteLength(value);\n this.uint32(len);\n if (len)\n this._push(writeStringBuffer, len, value);\n return this;\n};\n\n\n/**\n * Finishes the write operation.\n * @name BufferWriter#finish\n * @function\n * @returns {Buffer} Finished buffer\n */\n\nBufferWriter._configure();\n\n\n//# sourceURL=webpack://light/./node_modules/protobufjs/src/writer_buffer.js?");
/***/ }),
/***/ "./node_modules/rate-limiter-flexible/index.js":
/*!*****************************************************!*\
!*** ./node_modules/rate-limiter-flexible/index.js ***!
\*****************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
eval("const RateLimiterRedis = __webpack_require__(/*! ./lib/RateLimiterRedis */ \"./node_modules/rate-limiter-flexible/lib/RateLimiterRedis.js\");\nconst RateLimiterMongo = __webpack_require__(/*! ./lib/RateLimiterMongo */ \"./node_modules/rate-limiter-flexible/lib/RateLimiterMongo.js\");\nconst RateLimiterMySQL = __webpack_require__(/*! ./lib/RateLimiterMySQL */ \"./node_modules/rate-limiter-flexible/lib/RateLimiterMySQL.js\");\nconst RateLimiterPostgres = __webpack_require__(/*! ./lib/RateLimiterPostgres */ \"./node_modules/rate-limiter-flexible/lib/RateLimiterPostgres.js\");\nconst {RateLimiterClusterMaster, RateLimiterClusterMasterPM2, RateLimiterCluster} = __webpack_require__(/*! ./lib/RateLimiterCluster */ \"./node_modules/rate-limiter-flexible/lib/RateLimiterCluster.js\");\nconst RateLimiterMemory = __webpack_require__(/*! ./lib/RateLimiterMemory */ \"./node_modules/rate-limiter-flexible/lib/RateLimiterMemory.js\");\nconst RateLimiterMemcache = __webpack_require__(/*! ./lib/RateLimiterMemcache */ \"./node_modules/rate-limiter-flexible/lib/RateLimiterMemcache.js\");\nconst RLWrapperBlackAndWhite = __webpack_require__(/*! ./lib/RLWrapperBlackAndWhite */ \"./node_modules/rate-limiter-flexible/lib/RLWrapperBlackAndWhite.js\");\nconst RateLimiterUnion = __webpack_require__(/*! ./lib/RateLimiterUnion */ \"./node_modules/rate-limiter-flexible/lib/RateLimiterUnion.js\");\nconst RateLimiterQueue = __webpack_require__(/*! ./lib/RateLimiterQueue */ \"./node_modules/rate-limiter-flexible/lib/RateLimiterQueue.js\");\nconst BurstyRateLimiter = __webpack_require__(/*! ./lib/BurstyRateLimiter */ \"./node_modules/rate-limiter-flexible/lib/BurstyRateLimiter.js\");\nconst RateLimiterRes = __webpack_require__(/*! ./lib/RateLimiterRes */ \"./node_modules/rate-limiter-flexible/lib/RateLimiterRes.js\");\n\nmodule.exports = {\n RateLimiterRedis,\n RateLimiterMongo,\n RateLimiterMySQL,\n RateLimiterPostgres,\n RateLimiterMemory,\n RateLimiterMemcache,\n RateLimiterClusterMaster,\n RateLimiterClusterMasterPM2,\n RateLimiterCluster,\n RLWrapperBlackAndWhite,\n RateLimiterUnion,\n RateLimiterQueue,\n BurstyRateLimiter,\n RateLimiterRes,\n};\n\n\n//# sourceURL=webpack://light/./node_modules/rate-limiter-flexible/index.js?");
/***/ }),
/***/ "./node_modules/rate-limiter-flexible/lib/BurstyRateLimiter.js":
/*!*********************************************************************!*\
!*** ./node_modules/rate-limiter-flexible/lib/BurstyRateLimiter.js ***!
\*********************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
eval("const RateLimiterRes = __webpack_require__(/*! ./RateLimiterRes */ \"./node_modules/rate-limiter-flexible/lib/RateLimiterRes.js\");\n\n/**\n * Bursty rate limiter exposes only msBeforeNext time and doesn't expose points from bursty limiter by default\n * @type {BurstyRateLimiter}\n */\nmodule.exports = class BurstyRateLimiter {\n constructor(rateLimiter, burstLimiter) {\n this._rateLimiter = rateLimiter;\n this._burstLimiter = burstLimiter\n }\n\n /**\n * Merge rate limiter response objects. Responses can be null\n *\n * @param {RateLimiterRes} [rlRes] Rate limiter response\n * @param {RateLimiterRes} [blRes] Bursty limiter response\n */\n _combineRes(rlRes, blRes) {\n return new RateLimiterRes(\n rlRes.remainingPoints,\n Math.min(rlRes.msBeforeNext, blRes.msBeforeNext),\n rlRes.consumedPoints,\n rlRes.isFirstInDuration\n )\n }\n\n /**\n * @param key\n * @param pointsToConsume\n * @param options\n * @returns {Promise<any>}\n */\n consume(key, pointsToConsume = 1, options = {}) {\n return this._rateLimiter.consume(key, pointsToConsume, options)\n .catch((rlRej) => {\n if (rlRej instanceof RateLimiterRes) {\n return this._burstLimiter.consume(key, pointsToConsume, options)\n .then((blRes) => {\n return Promise.resolve(this._combineRes(rlRej, blRes))\n })\n .catch((blRej) => {\n if (blRej instanceof RateLimiterRes) {\n return Promise.reject(this._combineRes(rlRej, blRej))\n } else {\n return Promise.reject(blRej)\n }\n }\n )\n } else {\n return Promise.reject(rlRej)\n }\n })\n }\n\n /**\n * It doesn't expose available points from burstLimiter\n *\n * @param key\n * @returns {Promise<RateLimiterRes>}\n */\n get(key) {\n return Promise.all([\n this._rateLimiter.get(key),\n this._burstLimiter.get(key),\n ]).then(([rlRes, blRes]) => {\n return this._combineRes(rlRes, blRes);\n });\n }\n\n get points() {\n return this._rateLimiter.points;\n }\n};\n\n\n//# sourceURL=webpack://light/./node_modules/rate-limiter-flexible/lib/BurstyRateLimiter.js?");
/***/ }),
/***/ "./node_modules/rate-limiter-flexible/lib/RLWrapperBlackAndWhite.js":
/*!**************************************************************************!*\
!*** ./node_modules/rate-limiter-flexible/lib/RLWrapperBlackAndWhite.js ***!
\**************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
eval("const RateLimiterRes = __webpack_require__(/*! ./RateLimiterRes */ \"./node_modules/rate-limiter-flexible/lib/RateLimiterRes.js\");\n\nmodule.exports = class RLWrapperBlackAndWhite {\n constructor(opts = {}) {\n this.limiter = opts.limiter;\n this.blackList = opts.blackList;\n this.whiteList = opts.whiteList;\n this.isBlackListed = opts.isBlackListed;\n this.isWhiteListed = opts.isWhiteListed;\n this.runActionAnyway = opts.runActionAnyway;\n }\n\n get limiter() {\n return this._limiter;\n }\n\n set limiter(value) {\n if (typeof value === 'undefined') {\n throw new Error('limiter is not set');\n }\n\n this._limiter = value;\n }\n\n get runActionAnyway() {\n return this._runActionAnyway;\n }\n\n set runActionAnyway(value) {\n this._runActionAnyway = typeof value === 'undefined' ? false : value;\n }\n\n get blackList() {\n return this._blackList;\n }\n\n set blackList(value) {\n this._blackList = Array.isArray(value) ? value : [];\n }\n\n get isBlackListed() {\n return this._isBlackListed;\n }\n\n set isBlackListed(func) {\n if (typeof func === 'undefined') {\n func = () => false;\n }\n if (typeof func !== 'function') {\n throw new Error('isBlackListed must be function');\n }\n this._isBlackListed = func;\n }\n\n get whiteList() {\n return this._whiteList;\n }\n\n set whiteList(value) {\n this._whiteList = Array.isArray(value) ? value : [];\n }\n\n get isWhiteListed() {\n return this._isWhiteListed;\n }\n\n set isWhiteListed(func) {\n if (typeof func === 'undefined') {\n func = () => false;\n }\n if (typeof func !== 'function') {\n throw new Error('isWhiteListed must be function');\n }\n this._isWhiteListed = func;\n }\n\n isBlackListedSomewhere(key) {\n return this.blackList.indexOf(key) >= 0 || this.isBlackListed(key);\n }\n\n isWhiteListedSomewhere(key) {\n return this.whiteList.indexOf(key) >= 0 || this.isWhiteListed(key);\n }\n\n getBlackRes() {\n return new RateLimiterRes(0, Number.MAX_SAFE_INTEGER, 0, false);\n }\n\n getWhiteRes() {\n return new RateLimiterRes(Number.MAX_SAFE_INTEGER, 0, 0, false);\n }\n\n rejectBlack() {\n return Promise.reject(this.getBlackRes());\n }\n\n resolveBlack() {\n return Promise.resolve(this.getBlackRes());\n }\n\n resolveWhite() {\n return Promise.resolve(this.getWhiteRes());\n }\n\n consume(key, pointsToConsume = 1) {\n let res;\n if (this.isWhiteListedSomewhere(key)) {\n res = this.resolveWhite();\n } else if (this.isBlackListedSomewhere(key)) {\n res = this.rejectBlack();\n }\n\n if (typeof res === 'undefined') {\n return this.limiter.consume(key, pointsToConsume);\n }\n\n if (this.runActionAnyway) {\n this.limiter.consume(key, pointsToConsume).catch(() => {});\n }\n return res;\n }\n\n block(key, secDuration) {\n let res;\n if (this.isWhiteListedSomewhere(key)) {\n res = this.resolveWhite();\n } else if (this.isBlackListedSomewhere(key)) {\n res = this.resolveBlack();\n }\n\n if (typeof res === 'undefined') {\n return this.limiter.block(key, secDuration);\n }\n\n if (this.runActionAnyway) {\n this.limiter.block(key, secDuration).catch(() => {});\n }\n return res;\n }\n\n penalty(key, points) {\n let res;\n if (this.isWhiteListedSomewhere(key)) {\n res = this.resolveWhite();\n } else if (this.isBlackListedSomewhere(key)) {\n res = this.resolveBlack();\n }\n\n if (typeof res === 'undefined') {\n return this.limiter.penalty(key, points);\n }\n\n if (this.runActionAnyway) {\n this.limiter.penalty(key, points).catch(() => {});\n }\n return res;\n }\n\n reward(key, points) {\n let res;\n if (this.isWhiteListedSomewhere(key)) {\n res = this.resolveWhite();\n } else if (this.isBlackListedSomewhere(key)) {\n res = this.resolveBlack();\n }\n\n if (typeof res === 'undefined') {\n return this.limiter.reward(key, points);\n }\n\n if (this.run
/***/ }),
/***/ "./node_modules/rate-limiter-flexible/lib/RateLimiterAbstract.js":
/*!***********************************************************************!*\
!*** ./node_modules/rate-limiter-flexible/lib/RateLimiterAbstract.js ***!
\***********************************************************************/
/***/ ((module) => {
eval("module.exports = class RateLimiterAbstract {\n /**\n *\n * @param opts Object Defaults {\n * points: 4, // Number of points\n * duration: 1, // Per seconds\n * blockDuration: 0, // Block if consumed more than points in current duration for blockDuration seconds\n * execEvenly: false, // Execute allowed actions evenly over duration\n * execEvenlyMinDelayMs: duration * 1000 / points, // ms, works with execEvenly=true option\n * keyPrefix: 'rlflx',\n * }\n */\n constructor(opts = {}) {\n this.points = opts.points;\n this.duration = opts.duration;\n this.blockDuration = opts.blockDuration;\n this.execEvenly = opts.execEvenly;\n this.execEvenlyMinDelayMs = opts.execEvenlyMinDelayMs;\n this.keyPrefix = opts.keyPrefix;\n }\n\n get points() {\n return this._points;\n }\n\n set points(value) {\n this._points = value >= 0 ? value : 4;\n }\n\n get duration() {\n return this._duration;\n }\n\n set duration(value) {\n this._duration = typeof value === 'undefined' ? 1 : value;\n }\n\n get msDuration() {\n return this.duration * 1000;\n }\n\n get blockDuration() {\n return this._blockDuration;\n }\n\n set blockDuration(value) {\n this._blockDuration = typeof value === 'undefined' ? 0 : value;\n }\n\n get msBlockDuration() {\n return this.blockDuration * 1000;\n }\n\n get execEvenly() {\n return this._execEvenly;\n }\n\n set execEvenly(value) {\n this._execEvenly = typeof value === 'undefined' ? false : Boolean(value);\n }\n\n get execEvenlyMinDelayMs() {\n return this._execEvenlyMinDelayMs;\n }\n\n set execEvenlyMinDelayMs(value) {\n this._execEvenlyMinDelayMs = typeof value === 'undefined' ? Math.ceil(this.msDuration / this.points) : value;\n }\n\n get keyPrefix() {\n return this._keyPrefix;\n }\n\n set keyPrefix(value) {\n if (typeof value === 'undefined') {\n value = 'rlflx';\n }\n if (typeof value !== 'string') {\n throw new Error('keyPrefix must be string');\n }\n this._keyPrefix = value;\n }\n\n _getKeySecDuration(options = {}) {\n return options && options.customDuration >= 0\n ? options.customDuration\n : this.duration;\n }\n\n getKey(key) {\n return this.keyPrefix.length > 0 ? `${this.keyPrefix}:${key}` : key;\n }\n\n parseKey(rlKey) {\n return rlKey.substring(this.keyPrefix.length);\n }\n\n consume() {\n throw new Error(\"You have to implement the method 'consume'!\");\n }\n\n penalty() {\n throw new Error(\"You have to implement the method 'penalty'!\");\n }\n\n reward() {\n throw new Error(\"You have to implement the method 'reward'!\");\n }\n\n get() {\n throw new Error(\"You have to implement the method 'get'!\");\n }\n\n set() {\n throw new Error(\"You have to implement the method 'set'!\");\n }\n\n block() {\n throw new Error(\"You have to implement the method 'block'!\");\n }\n\n delete() {\n throw new Error(\"You have to implement the method 'delete'!\");\n }\n};\n\n\n//# sourceURL=webpack://light/./node_modules/rate-limiter-flexible/lib/RateLimiterAbstract.js?");
/***/ }),
/***/ "./node_modules/rate-limiter-flexible/lib/RateLimiterCluster.js":
/*!**********************************************************************!*\
!*** ./node_modules/rate-limiter-flexible/lib/RateLimiterCluster.js ***!
\**********************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
eval("/**\n * Implements rate limiting in cluster using built-in IPC\n *\n * Two classes are described here: master and worker\n * Master have to be create in the master process without any options.\n * Any number of rate limiters can be created in workers, but each rate limiter must be with unique keyPrefix\n *\n * Workflow:\n * 1. master rate limiter created in master process\n * 2. worker rate limiter sends 'init' message with necessary options during creating\n * 3. master receives options and adds new rate limiter by keyPrefix if it isn't created yet\n * 4. master sends 'init' back to worker's rate limiter\n * 5. worker can process requests immediately,\n * but they will be postponed by 'workerWaitInit' until master sends 'init' to worker\n * 6. every request to worker rate limiter creates a promise\n * 7. if master doesn't response for 'timeout', promise is rejected\n * 8. master sends 'resolve' or 'reject' command to worker\n * 9. worker resolves or rejects promise depending on message from master\n *\n */\n\nconst cluster = __webpack_require__(/*! cluster */ \"?76c6\");\nconst crypto = __webpack_require__(/*! crypto */ \"?4a7d\");\nconst RateLimiterAbstract = __webpack_require__(/*! ./RateLimiterAbstract */ \"./node_modules/rate-limiter-flexible/lib/RateLimiterAbstract.js\");\nconst RateLimiterMemory = __webpack_require__(/*! ./RateLimiterMemory */ \"./node_modules/rate-limiter-flexible/lib/RateLimiterMemory.js\");\nconst RateLimiterRes = __webpack_require__(/*! ./RateLimiterRes */ \"./node_modules/rate-limiter-flexible/lib/RateLimiterRes.js\");\n\nconst channel = 'rate_limiter_flexible';\nlet masterInstance = null;\n\nconst masterSendToWorker = function (worker, msg, type, res) {\n let data;\n if (res === null || res === true || res === false) {\n data = res;\n } else {\n data = {\n remainingPoints: res.remainingPoints,\n msBeforeNext: res.msBeforeNext,\n consumedPoints: res.consumedPoints,\n isFirstInDuration: res.isFirstInDuration,\n };\n }\n worker.send({\n channel,\n keyPrefix: msg.keyPrefix, // which rate limiter exactly\n promiseId: msg.promiseId,\n type,\n data,\n });\n};\n\nconst workerWaitInit = function (payload) {\n setTimeout(() => {\n if (this._initiated) {\n process.send(payload);\n // Promise will be removed by timeout if too long\n } else if (typeof this._promises[payload.promiseId] !== 'undefined') {\n workerWaitInit.call(this, payload);\n }\n }, 30);\n};\n\nconst workerSendToMaster = function (func, promiseId, key, arg, opts) {\n const payload = {\n channel,\n keyPrefix: this.keyPrefix,\n func,\n promiseId,\n data: {\n key,\n arg,\n opts,\n },\n };\n\n if (!this._initiated) {\n // Wait init before sending messages to master\n workerWaitInit.call(this, payload);\n } else {\n process.send(payload);\n }\n};\n\nconst masterProcessMsg = function (worker, msg) {\n if (!msg || msg.channel !== channel || typeof this._rateLimiters[msg.keyPrefix] === 'undefined') {\n return false;\n }\n\n let promise;\n\n switch (msg.func) {\n case 'consume':\n promise = this._rateLimiters[msg.keyPrefix].consume(msg.data.key, msg.data.arg, msg.data.opts);\n break;\n case 'penalty':\n promise = this._rateLimiters[msg.keyPrefix].penalty(msg.data.key, msg.data.arg, msg.data.opts);\n break;\n case 'reward':\n promise = this._rateLimiters[msg.keyPrefix].reward(msg.data.key, msg.data.arg, msg.data.opts);\n break;\n case 'block':\n promise = this._rateLimiters[msg.keyPrefix].block(msg.data.key, msg.data.arg, msg.data.opts);\n break;\n case 'get':\n promise = this._rateLimiters[msg.keyPrefix].get(msg.data.key, msg.data.opts);\n break;\n case 'delete':\n promise = this._rateLimiters[msg.keyPrefix].delete(msg.data.key, msg.data.opts);\n break;\n default:\n return false;\n }\n\n if (promise) {\n promise\n .then((res) => {\n masterSendToWorker(worker, msg, 'resolve', res);\n })\n .catch((re
/***/ }),
/***/ "./node_modules/rate-limiter-flexible/lib/RateLimiterMemcache.js":
/*!***********************************************************************!*\
!*** ./node_modules/rate-limiter-flexible/lib/RateLimiterMemcache.js ***!
\***********************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
eval("const RateLimiterStoreAbstract = __webpack_require__(/*! ./RateLimiterStoreAbstract */ \"./node_modules/rate-limiter-flexible/lib/RateLimiterStoreAbstract.js\");\nconst RateLimiterRes = __webpack_require__(/*! ./RateLimiterRes */ \"./node_modules/rate-limiter-flexible/lib/RateLimiterRes.js\");\n\nclass RateLimiterMemcache extends RateLimiterStoreAbstract {\n /**\n *\n * @param {Object} opts\n * Defaults {\n * ... see other in RateLimiterStoreAbstract\n *\n * storeClient: memcacheClient\n * }\n */\n constructor(opts) {\n super(opts);\n\n this.client = opts.storeClient;\n }\n\n _getRateLimiterRes(rlKey, changedPoints, result) {\n const res = new RateLimiterRes();\n res.consumedPoints = parseInt(result.consumedPoints);\n res.isFirstInDuration = result.consumedPoints === changedPoints;\n res.remainingPoints = Math.max(this.points - res.consumedPoints, 0);\n res.msBeforeNext = result.msBeforeNext;\n\n return res;\n }\n\n _upsert(rlKey, points, msDuration, forceExpire = false, options = {}) {\n return new Promise((resolve, reject) => {\n const nowMs = Date.now();\n const secDuration = Math.floor(msDuration / 1000);\n\n if (forceExpire) {\n this.client.set(rlKey, points, secDuration, (err) => {\n if (!err) {\n this.client.set(\n `${rlKey}_expire`,\n secDuration > 0 ? nowMs + (secDuration * 1000) : -1,\n secDuration,\n () => {\n const res = {\n consumedPoints: points,\n msBeforeNext: secDuration > 0 ? secDuration * 1000 : -1,\n };\n resolve(res);\n }\n );\n } else {\n reject(err);\n }\n });\n } else {\n this.client.incr(rlKey, points, (err, consumedPoints) => {\n if (err || consumedPoints === false) {\n this.client.add(rlKey, points, secDuration, (errAddKey, createdNew) => {\n if (errAddKey || !createdNew) {\n // Try to upsert again in case of race condition\n if (typeof options.attemptNumber === 'undefined' || options.attemptNumber < 3) {\n const nextOptions = Object.assign({}, options);\n nextOptions.attemptNumber = nextOptions.attemptNumber ? (nextOptions.attemptNumber + 1) : 1;\n\n this._upsert(rlKey, points, msDuration, forceExpire, nextOptions)\n .then(resUpsert => resolve(resUpsert))\n .catch(errUpsert => reject(errUpsert));\n } else {\n reject(new Error('Can not add key'));\n }\n } else {\n this.client.add(\n `${rlKey}_expire`,\n secDuration > 0 ? nowMs + (secDuration * 1000) : -1,\n secDuration,\n () => {\n const res = {\n consumedPoints: points,\n msBeforeNext: secDuration > 0 ? secDuration * 1000 : -1,\n };\n resolve(res);\n }\n );\n }\n });\n } else {\n this.client.get(`${rlKey}_expire`, (errGetExpire, resGetExpireMs) => {\n if (errGetExpire) {\n reject(errGetExpire);\n } else {\n const expireMs = resGetExpireMs === false ? 0 : resGetExpireMs;\n const res = {\n consumedPoints,\n msBeforeNext: expireMs >= 0 ? Math.max(expireMs - nowMs, 0) : -1,\n };\n resolve(res);\n }\n });\n }\n });\n }\n });\n }\n\n _get(rlKey) {\n return new Promise((resolve, reject) => {\n const nowMs = Date.now();\n\n this.client.get(rlKey, (err, consumedPoints) => {\n if (!consumedPoints) {\n resolve(null);\n } else {\n this.client.get(`${rlKey}_expire`, (err
/***/ }),
/***/ "./node_modules/rate-limiter-flexible/lib/RateLimiterMemory.js":
/*!*********************************************************************!*\
!*** ./node_modules/rate-limiter-flexible/lib/RateLimiterMemory.js ***!
\*********************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
eval("const RateLimiterAbstract = __webpack_require__(/*! ./RateLimiterAbstract */ \"./node_modules/rate-limiter-flexible/lib/RateLimiterAbstract.js\");\nconst MemoryStorage = __webpack_require__(/*! ./component/MemoryStorage/MemoryStorage */ \"./node_modules/rate-limiter-flexible/lib/component/MemoryStorage/MemoryStorage.js\");\nconst RateLimiterRes = __webpack_require__(/*! ./RateLimiterRes */ \"./node_modules/rate-limiter-flexible/lib/RateLimiterRes.js\");\n\nclass RateLimiterMemory extends RateLimiterAbstract {\n constructor(opts = {}) {\n super(opts);\n\n this._memoryStorage = new MemoryStorage();\n }\n /**\n *\n * @param key\n * @param pointsToConsume\n * @param {Object} options\n * @returns {Promise<RateLimiterRes>}\n */\n consume(key, pointsToConsume = 1, options = {}) {\n return new Promise((resolve, reject) => {\n const rlKey = this.getKey(key);\n const secDuration = this._getKeySecDuration(options);\n let res = this._memoryStorage.incrby(rlKey, pointsToConsume, secDuration);\n res.remainingPoints = Math.max(this.points - res.consumedPoints, 0);\n\n if (res.consumedPoints > this.points) {\n // Block only first time when consumed more than points\n if (this.blockDuration > 0 && res.consumedPoints <= (this.points + pointsToConsume)) {\n // Block key\n res = this._memoryStorage.set(rlKey, res.consumedPoints, this.blockDuration);\n }\n reject(res);\n } else if (this.execEvenly && res.msBeforeNext > 0 && !res.isFirstInDuration) {\n // Execute evenly\n let delay = Math.ceil(res.msBeforeNext / (res.remainingPoints + 2));\n if (delay < this.execEvenlyMinDelayMs) {\n delay = res.consumedPoints * this.execEvenlyMinDelayMs;\n }\n\n setTimeout(resolve, delay, res);\n } else {\n resolve(res);\n }\n });\n }\n\n penalty(key, points = 1, options = {}) {\n const rlKey = this.getKey(key);\n return new Promise((resolve) => {\n const secDuration = this._getKeySecDuration(options);\n const res = this._memoryStorage.incrby(rlKey, points, secDuration);\n res.remainingPoints = Math.max(this.points - res.consumedPoints, 0);\n resolve(res);\n });\n }\n\n reward(key, points = 1, options = {}) {\n const rlKey = this.getKey(key);\n return new Promise((resolve) => {\n const secDuration = this._getKeySecDuration(options);\n const res = this._memoryStorage.incrby(rlKey, -points, secDuration);\n res.remainingPoints = Math.max(this.points - res.consumedPoints, 0);\n resolve(res);\n });\n }\n\n /**\n * Block any key for secDuration seconds\n *\n * @param key\n * @param secDuration\n */\n block(key, secDuration) {\n const msDuration = secDuration * 1000;\n const initPoints = this.points + 1;\n\n this._memoryStorage.set(this.getKey(key), initPoints, secDuration);\n return Promise.resolve(\n new RateLimiterRes(0, msDuration === 0 ? -1 : msDuration, initPoints)\n );\n }\n\n set(key, points, secDuration) {\n const msDuration = (secDuration >= 0 ? secDuration : this.duration) * 1000;\n\n this._memoryStorage.set(this.getKey(key), points, secDuration);\n return Promise.resolve(\n new RateLimiterRes(0, msDuration === 0 ? -1 : msDuration, points)\n );\n }\n\n get(key) {\n const res = this._memoryStorage.get(this.getKey(key));\n if (res !== null) {\n res.remainingPoints = Math.max(this.points - res.consumedPoints, 0);\n }\n\n return Promise.resolve(res);\n }\n\n delete(key) {\n return Promise.resolve(this._memoryStorage.delete(this.getKey(key)));\n }\n}\n\nmodule.exports = RateLimiterMemory;\n\n\n\n//# sourceURL=webpack://light/./node_modules/rate-limiter-flexible/lib/RateLimiterMemory.js?");
/***/ }),
/***/ "./node_modules/rate-limiter-flexible/lib/RateLimiterMongo.js":
/*!********************************************************************!*\
!*** ./node_modules/rate-limiter-flexible/lib/RateLimiterMongo.js ***!
\********************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
eval("const RateLimiterStoreAbstract = __webpack_require__(/*! ./RateLimiterStoreAbstract */ \"./node_modules/rate-limiter-flexible/lib/RateLimiterStoreAbstract.js\");\nconst RateLimiterRes = __webpack_require__(/*! ./RateLimiterRes */ \"./node_modules/rate-limiter-flexible/lib/RateLimiterRes.js\");\n\n/**\n * Get MongoDB driver version as upsert options differ\n * @params {Object} Client instance\n * @returns {Object} Version Object containing major, feature & minor versions.\n */\nfunction getDriverVersion(client) {\n try {\n const _client = client.client ? client.client : client;\n\n const { version } = _client.topology.s.options.metadata.driver;\n const _v = version.split('.').map(v => parseInt(v));\n\n return {\n major: _v[0],\n feature: _v[1],\n patch: _v[2],\n };\n } catch (err) {\n return { major: 0, feature: 0, patch: 0 };\n }\n}\n\nclass RateLimiterMongo extends RateLimiterStoreAbstract {\n /**\n *\n * @param {Object} opts\n * Defaults {\n * indexKeyPrefix: {attr1: 1, attr2: 1}\n * ... see other in RateLimiterStoreAbstract\n *\n * mongo: MongoClient\n * }\n */\n constructor(opts) {\n super(opts);\n\n this.dbName = opts.dbName;\n this.tableName = opts.tableName;\n this.indexKeyPrefix = opts.indexKeyPrefix;\n\n if (opts.mongo) {\n this.client = opts.mongo;\n } else {\n this.client = opts.storeClient;\n }\n if (typeof this.client.then === 'function') {\n // If Promise\n this.client\n .then((conn) => {\n this.client = conn;\n this._initCollection();\n this._driverVersion = getDriverVersion(this.client);\n });\n } else {\n this._initCollection();\n this._driverVersion = getDriverVersion(this.client);\n }\n }\n\n get dbName() {\n return this._dbName;\n }\n\n set dbName(value) {\n this._dbName = typeof value === 'undefined' ? RateLimiterMongo.getDbName() : value;\n }\n\n static getDbName() {\n return 'node-rate-limiter-flexible';\n }\n\n get tableName() {\n return this._tableName;\n }\n\n set tableName(value) {\n this._tableName = typeof value === 'undefined' ? this.keyPrefix : value;\n }\n\n get client() {\n return this._client;\n }\n\n set client(value) {\n if (typeof value === 'undefined') {\n throw new Error('mongo is not set');\n }\n this._client = value;\n }\n\n get indexKeyPrefix() {\n return this._indexKeyPrefix;\n }\n\n set indexKeyPrefix(obj) {\n this._indexKeyPrefix = obj || {};\n }\n\n _initCollection() {\n const db = typeof this.client.db === 'function'\n ? this.client.db(this.dbName)\n : this.client;\n\n const collection = db.collection(this.tableName);\n collection.createIndex({ expire: -1 }, { expireAfterSeconds: 0 });\n collection.createIndex(Object.assign({}, this.indexKeyPrefix, { key: 1 }), { unique: true });\n\n this._collection = collection;\n }\n\n _getRateLimiterRes(rlKey, changedPoints, result) {\n const res = new RateLimiterRes();\n\n let doc;\n if (typeof result.value === 'undefined') {\n doc = result;\n } else {\n doc = result.value;\n }\n\n res.isFirstInDuration = doc.points === changedPoints;\n res.consumedPoints = doc.points;\n\n res.remainingPoints = Math.max(this.points - res.consumedPoints, 0);\n res.msBeforeNext = doc.expire !== null\n ? Math.max(new Date(doc.expire).getTime() - Date.now(), 0)\n : -1;\n\n return res;\n }\n\n _upsert(key, points, msDuration, forceExpire = false, options = {}) {\n if (!this._collection) {\n return Promise.reject(Error('Mongo connection is not established'));\n }\n\n const docAttrs = options.attrs || {};\n\n let where;\n let upsertData;\n if (forceExpire) {\n where = { key };\n where = Object.assign(where, docAttrs);\n upsertData = {\n $set: {\n key,\n points,\n expire: msDuration > 0 ? new Date(Date.now() + msDuration) : null,\n },\n };\n upsertData.$set = Object.assign
/***/ }),
/***/ "./node_modules/rate-limiter-flexible/lib/RateLimiterMySQL.js":
/*!********************************************************************!*\
!*** ./node_modules/rate-limiter-flexible/lib/RateLimiterMySQL.js ***!
\********************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
eval("const RateLimiterStoreAbstract = __webpack_require__(/*! ./RateLimiterStoreAbstract */ \"./node_modules/rate-limiter-flexible/lib/RateLimiterStoreAbstract.js\");\nconst RateLimiterRes = __webpack_require__(/*! ./RateLimiterRes */ \"./node_modules/rate-limiter-flexible/lib/RateLimiterRes.js\");\n\nclass RateLimiterMySQL extends RateLimiterStoreAbstract {\n /**\n * @callback callback\n * @param {Object} err\n *\n * @param {Object} opts\n * @param {callback} cb\n * Defaults {\n * ... see other in RateLimiterStoreAbstract\n *\n * storeClient: anySqlClient,\n * storeType: 'knex', // required only for Knex instance\n * dbName: 'string',\n * tableName: 'string',\n * }\n */\n constructor(opts, cb = null) {\n super(opts);\n\n this.client = opts.storeClient;\n this.clientType = opts.storeType;\n\n this.dbName = opts.dbName;\n this.tableName = opts.tableName;\n\n this.clearExpiredByTimeout = opts.clearExpiredByTimeout;\n\n this.tableCreated = opts.tableCreated;\n if (!this.tableCreated) {\n this._createDbAndTable()\n .then(() => {\n this.tableCreated = true;\n if (this.clearExpiredByTimeout) {\n this._clearExpiredHourAgo();\n }\n if (typeof cb === 'function') {\n cb();\n }\n })\n .catch((err) => {\n if (typeof cb === 'function') {\n cb(err);\n } else {\n throw err;\n }\n });\n } else {\n if (this.clearExpiredByTimeout) {\n this._clearExpiredHourAgo();\n }\n if (typeof cb === 'function') {\n cb();\n }\n }\n }\n\n clearExpired(expire) {\n return new Promise((resolve) => {\n this._getConnection()\n .then((conn) => {\n conn.query(`DELETE FROM ??.?? WHERE expire < ?`, [this.dbName, this.tableName, expire], () => {\n this._releaseConnection(conn);\n resolve();\n });\n })\n .catch(() => {\n resolve();\n });\n });\n }\n\n _clearExpiredHourAgo() {\n if (this._clearExpiredTimeoutId) {\n clearTimeout(this._clearExpiredTimeoutId);\n }\n this._clearExpiredTimeoutId = setTimeout(() => {\n this.clearExpired(Date.now() - 3600000) // Never rejected\n .then(() => {\n this._clearExpiredHourAgo();\n });\n }, 300000);\n this._clearExpiredTimeoutId.unref();\n }\n\n /**\n *\n * @return Promise<any>\n * @private\n */\n _getConnection() {\n switch (this.clientType) {\n case 'pool':\n return new Promise((resolve, reject) => {\n this.client.getConnection((errConn, conn) => {\n if (errConn) {\n return reject(errConn);\n }\n\n resolve(conn);\n });\n });\n case 'sequelize':\n return this.client.connectionManager.getConnection();\n case 'knex':\n return this.client.client.acquireConnection();\n default:\n return Promise.resolve(this.client);\n }\n }\n\n _releaseConnection(conn) {\n switch (this.clientType) {\n case 'pool':\n return conn.release();\n case 'sequelize':\n return this.client.connectionManager.releaseConnection(conn);\n case 'knex':\n return this.client.client.releaseConnection(conn);\n default:\n return true;\n }\n }\n\n /**\n *\n * @returns {Promise<any>}\n * @private\n */\n _createDbAndTable() {\n return new Promise((resolve, reject) => {\n this._getConnection()\n .then((conn) => {\n conn.query(`CREATE DATABASE IF NOT EXISTS \\`${this.dbName}\\`;`, (errDb) => {\n if (errDb) {\n this._releaseConnection(conn);\n return reject(errDb);\n }\n conn.query(this._getCreateTableStmt(), (err) => {\n if (err) {\n this._releaseConnection(conn);\n return reject(err);\n }\n this._releaseConnection(conn);\n re
/***/ }),
/***/ "./node_modules/rate-limiter-flexible/lib/RateLimiterPostgres.js":
/*!***********************************************************************!*\
!*** ./node_modules/rate-limiter-flexible/lib/RateLimiterPostgres.js ***!
\***********************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
eval("const RateLimiterStoreAbstract = __webpack_require__(/*! ./RateLimiterStoreAbstract */ \"./node_modules/rate-limiter-flexible/lib/RateLimiterStoreAbstract.js\");\nconst RateLimiterRes = __webpack_require__(/*! ./RateLimiterRes */ \"./node_modules/rate-limiter-flexible/lib/RateLimiterRes.js\");\n\nclass RateLimiterPostgres extends RateLimiterStoreAbstract {\n /**\n * @callback callback\n * @param {Object} err\n *\n * @param {Object} opts\n * @param {callback} cb\n * Defaults {\n * ... see other in RateLimiterStoreAbstract\n *\n * storeClient: postgresClient,\n * storeType: 'knex', // required only for Knex instance\n * tableName: 'string',\n * }\n */\n constructor(opts, cb = null) {\n super(opts);\n\n this.client = opts.storeClient;\n this.clientType = opts.storeType;\n\n this.tableName = opts.tableName;\n\n this.clearExpiredByTimeout = opts.clearExpiredByTimeout;\n\n this.tableCreated = opts.tableCreated;\n if (!this.tableCreated) {\n this._createTable()\n .then(() => {\n this.tableCreated = true;\n if (this.clearExpiredByTimeout) {\n this._clearExpiredHourAgo();\n }\n if (typeof cb === 'function') {\n cb();\n }\n })\n .catch((err) => {\n if (typeof cb === 'function') {\n cb(err);\n } else {\n throw err;\n }\n });\n } else {\n if (typeof cb === 'function') {\n cb();\n }\n }\n }\n\n clearExpired(expire) {\n return new Promise((resolve) => {\n const q = {\n name: 'rlflx-clear-expired',\n text: `DELETE FROM ${this.tableName} WHERE expire < $1`,\n values: [expire],\n };\n this._query(q)\n .then(() => {\n resolve();\n })\n .catch(() => {\n // Deleting expired query is not critical\n resolve();\n });\n });\n }\n\n /**\n * Delete all rows expired 1 hour ago once per 5 minutes\n *\n * @private\n */\n _clearExpiredHourAgo() {\n if (this._clearExpiredTimeoutId) {\n clearTimeout(this._clearExpiredTimeoutId);\n }\n this._clearExpiredTimeoutId = setTimeout(() => {\n this.clearExpired(Date.now() - 3600000) // Never rejected\n .then(() => {\n this._clearExpiredHourAgo();\n });\n }, 300000);\n this._clearExpiredTimeoutId.unref();\n }\n\n /**\n *\n * @return Promise<any>\n * @private\n */\n _getConnection() {\n switch (this.clientType) {\n case 'pool':\n return Promise.resolve(this.client);\n case 'sequelize':\n return this.client.connectionManager.getConnection();\n case 'knex':\n return this.client.client.acquireConnection();\n case 'typeorm':\n return Promise.resolve(this.client.driver.master);\n default:\n return Promise.resolve(this.client);\n }\n }\n\n _releaseConnection(conn) {\n switch (this.clientType) {\n case 'pool':\n return true;\n case 'sequelize':\n return this.client.connectionManager.releaseConnection(conn);\n case 'knex':\n return this.client.client.releaseConnection(conn);\n case 'typeorm':\n return true;\n default:\n return true;\n }\n }\n\n /**\n *\n * @returns {Promise<any>}\n * @private\n */\n _createTable() {\n return new Promise((resolve, reject) => {\n this._query({\n text: this._getCreateTableStmt(),\n })\n .then(() => {\n resolve();\n })\n .catch((err) => {\n if (err.code === '23505') {\n // Error: duplicate key value violates unique constraint \"pg_type_typname_nsp_index\"\n // Postgres doesn't handle concurrent table creation\n // It is supposed, that table is created by another worker\n resolve();\n } else {\n reject(err);\n }\n });\n });\n }\n\n _getCreateTableStmt() {\n return `CREATE TABLE IF NOT EXISTS ${this.tableName}
/***/ }),
/***/ "./node_modules/rate-limiter-flexible/lib/RateLimiterQueue.js":
/*!********************************************************************!*\
!*** ./node_modules/rate-limiter-flexible/lib/RateLimiterQueue.js ***!
\********************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
eval("const RateLimiterQueueError = __webpack_require__(/*! ./component/RateLimiterQueueError */ \"./node_modules/rate-limiter-flexible/lib/component/RateLimiterQueueError.js\")\nconst MAX_QUEUE_SIZE = 4294967295;\nconst KEY_DEFAULT = 'limiter';\n\nmodule.exports = class RateLimiterQueue {\n constructor(limiterFlexible, opts = {\n maxQueueSize: MAX_QUEUE_SIZE,\n }) {\n this._queueLimiters = {\n KEY_DEFAULT: new RateLimiterQueueInternal(limiterFlexible, opts)\n };\n this._limiterFlexible = limiterFlexible;\n this._maxQueueSize = opts.maxQueueSize\n }\n\n getTokensRemaining(key = KEY_DEFAULT) {\n if (this._queueLimiters[key]) {\n return this._queueLimiters[key].getTokensRemaining()\n } else {\n return Promise.resolve(this._limiterFlexible.points)\n }\n }\n\n removeTokens(tokens, key = KEY_DEFAULT) {\n if (!this._queueLimiters[key]) {\n this._queueLimiters[key] = new RateLimiterQueueInternal(\n this._limiterFlexible, {\n key,\n maxQueueSize: this._maxQueueSize,\n })\n }\n\n return this._queueLimiters[key].removeTokens(tokens)\n }\n};\n\nclass RateLimiterQueueInternal {\n\n constructor(limiterFlexible, opts = {\n maxQueueSize: MAX_QUEUE_SIZE,\n key: KEY_DEFAULT,\n }) {\n this._key = opts.key;\n this._waitTimeout = null;\n this._queue = [];\n this._limiterFlexible = limiterFlexible;\n\n this._maxQueueSize = opts.maxQueueSize\n }\n\n getTokensRemaining() {\n return this._limiterFlexible.get(this._key)\n .then((rlRes) => {\n return rlRes !== null ? rlRes.remainingPoints : this._limiterFlexible.points;\n })\n }\n\n removeTokens(tokens) {\n const _this = this;\n\n return new Promise((resolve, reject) => {\n if (tokens > _this._limiterFlexible.points) {\n reject(new RateLimiterQueueError(`Requested tokens ${tokens} exceeds maximum ${_this._limiterFlexible.points} tokens per interval`));\n return\n }\n\n if (_this._queue.length > 0) {\n _this._queueRequest.call(_this, resolve, reject, tokens);\n } else {\n _this._limiterFlexible.consume(_this._key, tokens)\n .then((res) => {\n resolve(res.remainingPoints);\n })\n .catch((rej) => {\n if (rej instanceof Error) {\n reject(rej);\n } else {\n _this._queueRequest.call(_this, resolve, reject, tokens);\n if (_this._waitTimeout === null) {\n _this._waitTimeout = setTimeout(_this._processFIFO.bind(_this), rej.msBeforeNext);\n }\n }\n });\n }\n })\n }\n\n _queueRequest(resolve, reject, tokens) {\n const _this = this;\n if (_this._queue.length < _this._maxQueueSize) {\n _this._queue.push({resolve, reject, tokens});\n } else {\n reject(new RateLimiterQueueError(`Number of requests reached it's maximum ${_this._maxQueueSize}`))\n }\n }\n\n _processFIFO() {\n const _this = this;\n\n if (_this._waitTimeout !== null) {\n clearTimeout(_this._waitTimeout);\n _this._waitTimeout = null;\n }\n\n if (_this._queue.length === 0) {\n return;\n }\n\n const item = _this._queue.shift();\n _this._limiterFlexible.consume(_this._key, item.tokens)\n .then((res) => {\n item.resolve(res.remainingPoints);\n _this._processFIFO.call(_this);\n })\n .catch((rej) => {\n if (rej instanceof Error) {\n item.reject(rej);\n _this._processFIFO.call(_this);\n } else {\n _this._queue.unshift(item);\n if (_this._waitTimeout === null) {\n _this._waitTimeout = setTimeout(_this._processFIFO.bind(_this), rej.msBeforeNext);\n }\n }\n });\n }\n}\n\n\n//# sourceURL=webpack://light/./node_modules/rate-limiter-flexible/lib/RateLimiterQueue.js?");
/***/ }),
/***/ "./node_modules/rate-limiter-flexible/lib/RateLimiterRedis.js":
/*!********************************************************************!*\
!*** ./node_modules/rate-limiter-flexible/lib/RateLimiterRedis.js ***!
\********************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
eval("const RateLimiterStoreAbstract = __webpack_require__(/*! ./RateLimiterStoreAbstract */ \"./node_modules/rate-limiter-flexible/lib/RateLimiterStoreAbstract.js\");\nconst RateLimiterRes = __webpack_require__(/*! ./RateLimiterRes */ \"./node_modules/rate-limiter-flexible/lib/RateLimiterRes.js\");\n\nconst incrTtlLuaScript = `redis.call('set', KEYS[1], 0, 'EX', ARGV[2], 'NX') \\\nlocal consumed = redis.call('incrby', KEYS[1], ARGV[1]) \\\nlocal ttl = redis.call('pttl', KEYS[1]) \\\nif ttl == -1 then \\\n redis.call('expire', KEYS[1], ARGV[2]) \\\n ttl = 1000 * ARGV[2] \\\nend \\\nreturn {consumed, ttl} \\\n`;\n\nclass RateLimiterRedis extends RateLimiterStoreAbstract {\n /**\n *\n * @param {Object} opts\n * Defaults {\n * ... see other in RateLimiterStoreAbstract\n *\n * redis: RedisClient\n * rejectIfRedisNotReady: boolean = false - reject / invoke insuranceLimiter immediately when redis connection is not \"ready\"\n * }\n */\n constructor(opts) {\n super(opts);\n if (opts.redis) {\n this.client = opts.redis;\n } else {\n this.client = opts.storeClient;\n }\n\n this._rejectIfRedisNotReady = !!opts.rejectIfRedisNotReady;\n\n if (typeof this.client.defineCommand === 'function') {\n this.client.defineCommand(\"rlflxIncr\", {\n numberOfKeys: 1,\n lua: incrTtlLuaScript,\n });\n }\n }\n\n /**\n * Prevent actual redis call if redis connection is not ready\n * Because of different connection state checks for ioredis and node-redis, only this clients would be actually checked.\n * For any other clients all the requests would be passed directly to redis client\n * @return {boolean}\n * @private\n */\n _isRedisReady() {\n if (!this._rejectIfRedisNotReady) {\n return true;\n }\n // ioredis client\n if (this.client.status && this.client.status !== 'ready') {\n return false;\n }\n // node-redis client\n if (typeof this.client.isReady === 'function' && !this.client.isReady()) {\n return false;\n }\n return true;\n }\n\n _getRateLimiterRes(rlKey, changedPoints, result) {\n let [consumed, resTtlMs] = result;\n // Support ioredis results format\n if (Array.isArray(consumed)) {\n [, consumed] = consumed;\n [, resTtlMs] = resTtlMs;\n }\n\n const res = new RateLimiterRes();\n res.consumedPoints = parseInt(consumed);\n res.isFirstInDuration = res.consumedPoints === changedPoints;\n res.remainingPoints = Math.max(this.points - res.consumedPoints, 0);\n res.msBeforeNext = resTtlMs;\n\n return res;\n }\n\n _upsert(rlKey, points, msDuration, forceExpire = false) {\n return new Promise((resolve, reject) => {\n if (!this._isRedisReady()) {\n return reject(new Error('Redis connection is not ready'));\n }\n\n const secDuration = Math.floor(msDuration / 1000);\n const multi = this.client.multi();\n if (forceExpire) {\n if (secDuration > 0) {\n multi.set(rlKey, points, 'EX', secDuration);\n } else {\n multi.set(rlKey, points);\n }\n\n multi.pttl(rlKey)\n .exec((err, res) => {\n if (err) {\n return reject(err);\n }\n\n return resolve(res);\n });\n } else {\n if (secDuration > 0) {\n const incrCallback = function(err, result) {\n if (err) {\n return reject(err);\n }\n\n return resolve(result);\n };\n\n if (typeof this.client.rlflxIncr === 'function') {\n this.client.rlflxIncr(rlKey, points, secDuration, incrCallback);\n } else {\n this.client.eval(incrTtlLuaScript, 1, rlKey, points, secDuration, incrCallback);\n }\n } else {\n multi.incrby(rlKey, points)\n .pttl(rlKey)\n .exec((err, res) => {\n if (err) {\n return reject(err);\n }\n\n return resolve(res);\n });\n }\n }\n });\n }\n\n _get
/***/ }),
/***/ "./node_modules/rate-limiter-flexible/lib/RateLimiterRes.js":
/*!******************************************************************!*\
!*** ./node_modules/rate-limiter-flexible/lib/RateLimiterRes.js ***!
\******************************************************************/
/***/ ((module) => {
eval("module.exports = class RateLimiterRes {\n constructor(remainingPoints, msBeforeNext, consumedPoints, isFirstInDuration) {\n this.remainingPoints = typeof remainingPoints === 'undefined' ? 0 : remainingPoints; // Remaining points in current duration\n this.msBeforeNext = typeof msBeforeNext === 'undefined' ? 0 : msBeforeNext; // Milliseconds before next action\n this.consumedPoints = typeof consumedPoints === 'undefined' ? 0 : consumedPoints; // Consumed points in current duration\n this.isFirstInDuration = typeof isFirstInDuration === 'undefined' ? false : isFirstInDuration;\n }\n\n get msBeforeNext() {\n return this._msBeforeNext;\n }\n\n set msBeforeNext(ms) {\n this._msBeforeNext = ms;\n return this;\n }\n\n get remainingPoints() {\n return this._remainingPoints;\n }\n\n set remainingPoints(p) {\n this._remainingPoints = p;\n return this;\n }\n\n get consumedPoints() {\n return this._consumedPoints;\n }\n\n set consumedPoints(p) {\n this._consumedPoints = p;\n return this;\n }\n\n get isFirstInDuration() {\n return this._isFirstInDuration;\n }\n\n set isFirstInDuration(value) {\n this._isFirstInDuration = Boolean(value);\n }\n\n _getDecoratedProperties() {\n return {\n remainingPoints: this.remainingPoints,\n msBeforeNext: this.msBeforeNext,\n consumedPoints: this.consumedPoints,\n isFirstInDuration: this.isFirstInDuration,\n };\n }\n\n [Symbol.for(\"nodejs.util.inspect.custom\")]() {\n return this._getDecoratedProperties();\n }\n\n toString() {\n return JSON.stringify(this._getDecoratedProperties());\n }\n\n toJSON() {\n return this._getDecoratedProperties();\n }\n};\n\n\n//# sourceURL=webpack://light/./node_modules/rate-limiter-flexible/lib/RateLimiterRes.js?");
/***/ }),
/***/ "./node_modules/rate-limiter-flexible/lib/RateLimiterStoreAbstract.js":
/*!****************************************************************************!*\
!*** ./node_modules/rate-limiter-flexible/lib/RateLimiterStoreAbstract.js ***!
\****************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
eval("const RateLimiterAbstract = __webpack_require__(/*! ./RateLimiterAbstract */ \"./node_modules/rate-limiter-flexible/lib/RateLimiterAbstract.js\");\nconst BlockedKeys = __webpack_require__(/*! ./component/BlockedKeys */ \"./node_modules/rate-limiter-flexible/lib/component/BlockedKeys/index.js\");\nconst RateLimiterRes = __webpack_require__(/*! ./RateLimiterRes */ \"./node_modules/rate-limiter-flexible/lib/RateLimiterRes.js\");\n\nmodule.exports = class RateLimiterStoreAbstract extends RateLimiterAbstract {\n /**\n *\n * @param opts Object Defaults {\n * ... see other in RateLimiterAbstract\n *\n * inMemoryBlockOnConsumed: 40, // Number of points when key is blocked\n * inMemoryBlockDuration: 10, // Block duration in seconds\n * insuranceLimiter: RateLimiterAbstract\n * }\n */\n constructor(opts = {}) {\n super(opts);\n\n this.inMemoryBlockOnConsumed = opts.inMemoryBlockOnConsumed || opts.inmemoryBlockOnConsumed;\n this.inMemoryBlockDuration = opts.inMemoryBlockDuration || opts.inmemoryBlockDuration;\n this.insuranceLimiter = opts.insuranceLimiter;\n this._inMemoryBlockedKeys = new BlockedKeys();\n }\n\n get client() {\n return this._client;\n }\n\n set client(value) {\n if (typeof value === 'undefined') {\n throw new Error('storeClient is not set');\n }\n this._client = value;\n }\n\n /**\n * Have to be launched after consume\n * It blocks key and execute evenly depending on result from store\n *\n * It uses _getRateLimiterRes function to prepare RateLimiterRes from store result\n *\n * @param resolve\n * @param reject\n * @param rlKey\n * @param changedPoints\n * @param storeResult\n * @param {Object} options\n * @private\n */\n _afterConsume(resolve, reject, rlKey, changedPoints, storeResult, options = {}) {\n const res = this._getRateLimiterRes(rlKey, changedPoints, storeResult);\n\n if (this.inMemoryBlockOnConsumed > 0 && !(this.inMemoryBlockDuration > 0)\n && res.consumedPoints >= this.inMemoryBlockOnConsumed\n ) {\n this._inMemoryBlockedKeys.addMs(rlKey, res.msBeforeNext);\n if (res.consumedPoints > this.points) {\n return reject(res);\n } else {\n return resolve(res)\n }\n } else if (res.consumedPoints > this.points) {\n let blockPromise = Promise.resolve();\n // Block only first time when consumed more than points\n if (this.blockDuration > 0 && res.consumedPoints <= (this.points + changedPoints)) {\n res.msBeforeNext = this.msBlockDuration;\n blockPromise = this._block(rlKey, res.consumedPoints, this.msBlockDuration, options);\n }\n\n if (this.inMemoryBlockOnConsumed > 0 && res.consumedPoints >= this.inMemoryBlockOnConsumed) {\n // Block key for this.inMemoryBlockDuration seconds\n this._inMemoryBlockedKeys.add(rlKey, this.inMemoryBlockDuration);\n res.msBeforeNext = this.msInMemoryBlockDuration;\n }\n\n blockPromise\n .then(() => {\n reject(res);\n })\n .catch((err) => {\n reject(err);\n });\n } else if (this.execEvenly && res.msBeforeNext > 0 && !res.isFirstInDuration) {\n let delay = Math.ceil(res.msBeforeNext / (res.remainingPoints + 2));\n if (delay < this.execEvenlyMinDelayMs) {\n delay = res.consumedPoints * this.execEvenlyMinDelayMs;\n }\n\n setTimeout(resolve, delay, res);\n } else {\n resolve(res);\n }\n }\n\n _handleError(err, funcName, resolve, reject, key, data = false, options = {}) {\n if (!(this.insuranceLimiter instanceof RateLimiterAbstract)) {\n reject(err);\n } else {\n this.insuranceLimiter[funcName](key, data, options)\n .then((res) => {\n resolve(res);\n })\n .catch((res) => {\n reject(res);\n });\n }\n }\n\n /**\n * @deprecated Use camelCase version\n * @returns {BlockedKeys}\n * @private\n */\n get _inmemoryBlockedKeys() {\n return this._inMemoryBlockedKeys\n }\n\n /**\n * @deprecated Use camelCase vers
/***/ }),
/***/ "./node_modules/rate-limiter-flexible/lib/RateLimiterUnion.js":
/*!********************************************************************!*\
!*** ./node_modules/rate-limiter-flexible/lib/RateLimiterUnion.js ***!
\********************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
eval("const RateLimiterAbstract = __webpack_require__(/*! ./RateLimiterAbstract */ \"./node_modules/rate-limiter-flexible/lib/RateLimiterAbstract.js\");\n\nmodule.exports = class RateLimiterUnion {\n constructor(...limiters) {\n if (limiters.length < 1) {\n throw new Error('RateLimiterUnion: at least one limiter have to be passed');\n }\n limiters.forEach((limiter) => {\n if (!(limiter instanceof RateLimiterAbstract)) {\n throw new Error('RateLimiterUnion: all limiters have to be instance of RateLimiterAbstract');\n }\n });\n\n this._limiters = limiters;\n }\n\n consume(key, points = 1) {\n return new Promise((resolve, reject) => {\n const promises = [];\n this._limiters.forEach((limiter) => {\n promises.push(limiter.consume(key, points).catch(rej => ({ rejected: true, rej })));\n });\n\n Promise.all(promises)\n .then((res) => {\n const resObj = {};\n let rejected = false;\n\n res.forEach((item) => {\n if (item.rejected === true) {\n rejected = true;\n }\n });\n\n for (let i = 0; i < res.length; i++) {\n if (rejected && res[i].rejected === true) {\n resObj[this._limiters[i].keyPrefix] = res[i].rej;\n } else if (!rejected) {\n resObj[this._limiters[i].keyPrefix] = res[i];\n }\n }\n\n if (rejected) {\n reject(resObj);\n } else {\n resolve(resObj);\n }\n });\n });\n }\n};\n\n\n//# sourceURL=webpack://light/./node_modules/rate-limiter-flexible/lib/RateLimiterUnion.js?");
/***/ }),
/***/ "./node_modules/rate-limiter-flexible/lib/component/BlockedKeys/BlockedKeys.js":
/*!*************************************************************************************!*\
!*** ./node_modules/rate-limiter-flexible/lib/component/BlockedKeys/BlockedKeys.js ***!
\*************************************************************************************/
/***/ ((module) => {
eval("module.exports = class BlockedKeys {\n constructor() {\n this._keys = {}; // {'key': 1526279430331}\n this._addedKeysAmount = 0;\n }\n\n collectExpired() {\n const now = Date.now();\n\n Object.keys(this._keys).forEach((key) => {\n if (this._keys[key] <= now) {\n delete this._keys[key];\n }\n });\n\n this._addedKeysAmount = Object.keys(this._keys).length;\n }\n\n /**\n * Add new blocked key\n *\n * @param key String\n * @param sec Number\n */\n add(key, sec) {\n this.addMs(key, sec * 1000);\n }\n\n /**\n * Add new blocked key for ms\n *\n * @param key String\n * @param ms Number\n */\n addMs(key, ms) {\n this._keys[key] = Date.now() + ms;\n this._addedKeysAmount++;\n if (this._addedKeysAmount > 999) {\n this.collectExpired();\n }\n }\n\n /**\n * 0 means not blocked\n *\n * @param key\n * @returns {number}\n */\n msBeforeExpire(key) {\n const expire = this._keys[key];\n\n if (expire && expire >= Date.now()) {\n this.collectExpired();\n const now = Date.now();\n return expire >= now ? expire - now : 0;\n }\n\n return 0;\n }\n\n /**\n * If key is not given, delete all data in memory\n * \n * @param {string|undefined} key\n */\n delete(key) {\n if (key) {\n delete this._keys[key];\n } else {\n Object.keys(this._keys).forEach((key) => {\n delete this._keys[key];\n });\n }\n }\n};\n\n\n//# sourceURL=webpack://light/./node_modules/rate-limiter-flexible/lib/component/BlockedKeys/BlockedKeys.js?");
/***/ }),
/***/ "./node_modules/rate-limiter-flexible/lib/component/BlockedKeys/index.js":
/*!*******************************************************************************!*\
!*** ./node_modules/rate-limiter-flexible/lib/component/BlockedKeys/index.js ***!
\*******************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
eval("const BlockedKeys = __webpack_require__(/*! ./BlockedKeys */ \"./node_modules/rate-limiter-flexible/lib/component/BlockedKeys/BlockedKeys.js\");\n\nmodule.exports = BlockedKeys;\n\n\n//# sourceURL=webpack://light/./node_modules/rate-limiter-flexible/lib/component/BlockedKeys/index.js?");
/***/ }),
/***/ "./node_modules/rate-limiter-flexible/lib/component/MemoryStorage/MemoryStorage.js":
/*!*****************************************************************************************!*\
!*** ./node_modules/rate-limiter-flexible/lib/component/MemoryStorage/MemoryStorage.js ***!
\*****************************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
eval("const Record = __webpack_require__(/*! ./Record */ \"./node_modules/rate-limiter-flexible/lib/component/MemoryStorage/Record.js\");\nconst RateLimiterRes = __webpack_require__(/*! ../../RateLimiterRes */ \"./node_modules/rate-limiter-flexible/lib/RateLimiterRes.js\");\n\nmodule.exports = class MemoryStorage {\n constructor() {\n /**\n * @type {Object.<string, Record>}\n * @private\n */\n this._storage = {};\n }\n\n incrby(key, value, durationSec) {\n if (this._storage[key]) {\n const msBeforeExpires = this._storage[key].expiresAt\n ? this._storage[key].expiresAt.getTime() - new Date().getTime()\n : -1;\n if (msBeforeExpires !== 0) {\n // Change value\n this._storage[key].value = this._storage[key].value + value;\n\n return new RateLimiterRes(0, msBeforeExpires, this._storage[key].value, false);\n }\n\n return this.set(key, value, durationSec);\n }\n return this.set(key, value, durationSec);\n }\n\n set(key, value, durationSec) {\n const durationMs = durationSec * 1000;\n\n if (this._storage[key] && this._storage[key].timeoutId) {\n clearTimeout(this._storage[key].timeoutId);\n }\n\n this._storage[key] = new Record(\n value,\n durationMs > 0 ? new Date(Date.now() + durationMs) : null\n );\n if (durationMs > 0) {\n this._storage[key].timeoutId = setTimeout(() => {\n delete this._storage[key];\n }, durationMs);\n if (this._storage[key].timeoutId.unref) {\n this._storage[key].timeoutId.unref();\n }\n }\n\n return new RateLimiterRes(0, durationMs === 0 ? -1 : durationMs, this._storage[key].value, true);\n }\n\n /**\n *\n * @param key\n * @returns {*}\n */\n get(key) {\n if (this._storage[key]) {\n const msBeforeExpires = this._storage[key].expiresAt\n ? this._storage[key].expiresAt.getTime() - new Date().getTime()\n : -1;\n return new RateLimiterRes(0, msBeforeExpires, this._storage[key].value, false);\n }\n return null;\n }\n\n /**\n *\n * @param key\n * @returns {boolean}\n */\n delete(key) {\n if (this._storage[key]) {\n if (this._storage[key].timeoutId) {\n clearTimeout(this._storage[key].timeoutId);\n }\n delete this._storage[key];\n return true;\n }\n return false;\n }\n};\n\n\n//# sourceURL=webpack://light/./node_modules/rate-limiter-flexible/lib/component/MemoryStorage/MemoryStorage.js?");
/***/ }),
/***/ "./node_modules/rate-limiter-flexible/lib/component/MemoryStorage/Record.js":
/*!**********************************************************************************!*\
!*** ./node_modules/rate-limiter-flexible/lib/component/MemoryStorage/Record.js ***!
\**********************************************************************************/
/***/ ((module) => {
eval("module.exports = class Record {\n /**\n *\n * @param value int\n * @param expiresAt Date|int\n * @param timeoutId\n */\n constructor(value, expiresAt, timeoutId = null) {\n this.value = value;\n this.expiresAt = expiresAt;\n this.timeoutId = timeoutId;\n }\n\n get value() {\n return this._value;\n }\n\n set value(value) {\n this._value = parseInt(value);\n }\n\n get expiresAt() {\n return this._expiresAt;\n }\n\n set expiresAt(value) {\n if (!(value instanceof Date) && Number.isInteger(value)) {\n value = new Date(value);\n }\n this._expiresAt = value;\n }\n\n get timeoutId() {\n return this._timeoutId;\n }\n\n set timeoutId(value) {\n this._timeoutId = value;\n }\n};\n\n\n//# sourceURL=webpack://light/./node_modules/rate-limiter-flexible/lib/component/MemoryStorage/Record.js?");
/***/ }),
/***/ "./node_modules/rate-limiter-flexible/lib/component/RateLimiterQueueError.js":
/*!***********************************************************************************!*\
!*** ./node_modules/rate-limiter-flexible/lib/component/RateLimiterQueueError.js ***!
\***********************************************************************************/
/***/ ((module) => {
eval("module.exports = class RateLimiterQueueError extends Error {\n constructor(message, extra) {\n super();\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n this.name = 'CustomError';\n this.message = message;\n if (extra) {\n this.extra = extra;\n }\n }\n};\n\n\n//# sourceURL=webpack://light/./node_modules/rate-limiter-flexible/lib/component/RateLimiterQueueError.js?");
/***/ }),
/***/ "./node_modules/receptacle/index.js":
/*!******************************************!*\
!*** ./node_modules/receptacle/index.js ***!
\******************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
eval("\n\nmodule.exports = Receptacle\nvar toMS = __webpack_require__(/*! ms */ \"./node_modules/ms/index.js\")\nvar cache = Receptacle.prototype\nvar counter = new Date() % 1e9\n\nfunction getUID () { return (Math.random() * 1e9 >>> 0) + (counter++) }\n\n/**\n * Creates a cache with a maximum key size.\n *\n * @constructor\n * @param {Object} options\n * @param {Number} [options.max=Infinity] the maximum number of keys allowed in the cache (lru).\n * @param {Array} [options.items=[]] the default items in the cache.\n */\nfunction Receptacle (options) {\n options = options || {}\n this.id = options.id || getUID()\n this.max = options.max || Infinity\n this.items = options.items || []\n this._lookup = {}\n this.size = this.items.length\n this.lastModified = new Date(options.lastModified || new Date())\n\n // Setup initial timers and indexes for the cache.\n for (var item, ttl, i = this.items.length; i--;) {\n item = this.items[i]\n ttl = new Date(item.expires) - new Date()\n this._lookup[item.key] = item\n if (ttl > 0) this.expire(item.key, ttl)\n else if (ttl <= 0) this.delete(item.key)\n }\n}\n\n/**\n * Tests if a key is currently in the cache.\n * Does not check if slot is empty.\n *\n * @param {String} key - the key to retrieve from the cache.\n * @return {Boolean}\n */\ncache.has = function (key) {\n return key in this._lookup\n}\n\n/**\n * Retrieves a key from the cache and marks it as recently used.\n *\n * @param {String} key - the key to retrieve from the cache.\n * @return {*}\n */\ncache.get = function (key) {\n if (!this.has(key)) return null\n var record = this._lookup[key]\n // Update expiry for \"refresh\" keys\n if (record.refresh) this.expire(key, record.refresh)\n // Move to front of the line.\n this.items.splice(this.items.indexOf(record), 1)\n this.items.push(record)\n return record.value\n}\n\n/**\n * Retrieves user meta data for a cached item.\n *\n * @param {String} key - the key to retrieve meta data from the cache.\n * @return {*}\n */\ncache.meta = function (key) {\n if (!this.has(key)) return null\n var record = this._lookup[key]\n if (!('meta' in record)) return null\n return record.meta\n}\n\n/**\n * Puts a key into the cache with an optional expiry time.\n *\n * @param {String} key - the key for the value in the cache.\n * @param {*} value - the value to place at the key.\n * @param {Number} [options.ttl] - a time after which the key will be removed.\n * @return {Receptacle}\n */\ncache.set = function (key, value, options) {\n var oldRecord = this._lookup[key]\n var record = this._lookup[key] = { key: key, value: value }\n // Mark cache as modified.\n this.lastModified = new Date()\n\n if (oldRecord) {\n // Replace an old key.\n clearTimeout(oldRecord.timeout)\n this.items.splice(this.items.indexOf(oldRecord), 1, record)\n } else {\n // Remove least used item if needed.\n if (this.size >= this.max) this.delete(this.items[0].key)\n // Add a new key.\n this.items.push(record)\n this.size++\n }\n\n if (options) {\n // Setup key expiry.\n if ('ttl' in options) this.expire(key, options.ttl)\n // Store user options in the record.\n if ('meta' in options) record.meta = options.meta\n // Mark a auto refresh key.\n if (options.refresh) record.refresh = options.ttl\n }\n\n return this\n}\n\n/**\n * Deletes an item from the cache.\n *\n * @param {String} key - the key to remove.\n * @return {Receptacle}\n */\ncache.delete = function (key) {\n var record = this._lookup[key]\n if (!record) return false\n this.lastModified = new Date()\n this.items.splice(this.items.indexOf(record), 1)\n clearTimeout(record.timeout)\n delete this._lookup[key]\n this.size--\n return this\n}\n\n/**\n * Utility to register a key that will be removed after some time.\n *\n * @param {String} key - the key to remove.\n * @param {Number} [ms] - the timeout before removal.\n * @return {Receptacle}\n */\ncache.expire = function (key, ttl) {\n var ms = ttl || 0\n var record = this._lookup[key]\n if (!record) return this\n if (typeo
/***/ }),
/***/ "./node_modules/retry/index.js":
/*!*************************************!*\
!*** ./node_modules/retry/index.js ***!
\*************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
eval("module.exports = __webpack_require__(/*! ./lib/retry */ \"./node_modules/retry/lib/retry.js\");\n\n//# sourceURL=webpack://light/./node_modules/retry/index.js?");
/***/ }),
/***/ "./node_modules/retry/lib/retry.js":
/*!*****************************************!*\
!*** ./node_modules/retry/lib/retry.js ***!
\*****************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
eval("var RetryOperation = __webpack_require__(/*! ./retry_operation */ \"./node_modules/retry/lib/retry_operation.js\");\n\nexports.operation = function(options) {\n var timeouts = exports.timeouts(options);\n return new RetryOperation(timeouts, {\n forever: options && (options.forever || options.retries === Infinity),\n unref: options && options.unref,\n maxRetryTime: options && options.maxRetryTime\n });\n};\n\nexports.timeouts = function(options) {\n if (options instanceof Array) {\n return [].concat(options);\n }\n\n var opts = {\n retries: 10,\n factor: 2,\n minTimeout: 1 * 1000,\n maxTimeout: Infinity,\n randomize: false\n };\n for (var key in options) {\n opts[key] = options[key];\n }\n\n if (opts.minTimeout > opts.maxTimeout) {\n throw new Error('minTimeout is greater than maxTimeout');\n }\n\n var timeouts = [];\n for (var i = 0; i < opts.retries; i++) {\n timeouts.push(this.createTimeout(i, opts));\n }\n\n if (options && options.forever && !timeouts.length) {\n timeouts.push(this.createTimeout(i, opts));\n }\n\n // sort the array numerically ascending\n timeouts.sort(function(a,b) {\n return a - b;\n });\n\n return timeouts;\n};\n\nexports.createTimeout = function(attempt, opts) {\n var random = (opts.randomize)\n ? (Math.random() + 1)\n : 1;\n\n var timeout = Math.round(random * Math.max(opts.minTimeout, 1) * Math.pow(opts.factor, attempt));\n timeout = Math.min(timeout, opts.maxTimeout);\n\n return timeout;\n};\n\nexports.wrap = function(obj, options, methods) {\n if (options instanceof Array) {\n methods = options;\n options = null;\n }\n\n if (!methods) {\n methods = [];\n for (var key in obj) {\n if (typeof obj[key] === 'function') {\n methods.push(key);\n }\n }\n }\n\n for (var i = 0; i < methods.length; i++) {\n var method = methods[i];\n var original = obj[method];\n\n obj[method] = function retryWrapper(original) {\n var op = exports.operation(options);\n var args = Array.prototype.slice.call(arguments, 1);\n var callback = args.pop();\n\n args.push(function(err) {\n if (op.retry(err)) {\n return;\n }\n if (err) {\n arguments[0] = op.mainError();\n }\n callback.apply(this, arguments);\n });\n\n op.attempt(function() {\n original.apply(obj, args);\n });\n }.bind(obj, original);\n obj[method].options = options;\n }\n};\n\n\n//# sourceURL=webpack://light/./node_modules/retry/lib/retry.js?");
/***/ }),
/***/ "./node_modules/retry/lib/retry_operation.js":
/*!***************************************************!*\
!*** ./node_modules/retry/lib/retry_operation.js ***!
\***************************************************/
/***/ ((module) => {
eval("function RetryOperation(timeouts, options) {\n // Compatibility for the old (timeouts, retryForever) signature\n if (typeof options === 'boolean') {\n options = { forever: options };\n }\n\n this._originalTimeouts = JSON.parse(JSON.stringify(timeouts));\n this._timeouts = timeouts;\n this._options = options || {};\n this._maxRetryTime = options && options.maxRetryTime || Infinity;\n this._fn = null;\n this._errors = [];\n this._attempts = 1;\n this._operationTimeout = null;\n this._operationTimeoutCb = null;\n this._timeout = null;\n this._operationStart = null;\n this._timer = null;\n\n if (this._options.forever) {\n this._cachedTimeouts = this._timeouts.slice(0);\n }\n}\nmodule.exports = RetryOperation;\n\nRetryOperation.prototype.reset = function() {\n this._attempts = 1;\n this._timeouts = this._originalTimeouts.slice(0);\n}\n\nRetryOperation.prototype.stop = function() {\n if (this._timeout) {\n clearTimeout(this._timeout);\n }\n if (this._timer) {\n clearTimeout(this._timer);\n }\n\n this._timeouts = [];\n this._cachedTimeouts = null;\n};\n\nRetryOperation.prototype.retry = function(err) {\n if (this._timeout) {\n clearTimeout(this._timeout);\n }\n\n if (!err) {\n return false;\n }\n var currentTime = new Date().getTime();\n if (err && currentTime - this._operationStart >= this._maxRetryTime) {\n this._errors.push(err);\n this._errors.unshift(new Error('RetryOperation timeout occurred'));\n return false;\n }\n\n this._errors.push(err);\n\n var timeout = this._timeouts.shift();\n if (timeout === undefined) {\n if (this._cachedTimeouts) {\n // retry forever, only keep last error\n this._errors.splice(0, this._errors.length - 1);\n timeout = this._cachedTimeouts.slice(-1);\n } else {\n return false;\n }\n }\n\n var self = this;\n this._timer = setTimeout(function() {\n self._attempts++;\n\n if (self._operationTimeoutCb) {\n self._timeout = setTimeout(function() {\n self._operationTimeoutCb(self._attempts);\n }, self._operationTimeout);\n\n if (self._options.unref) {\n self._timeout.unref();\n }\n }\n\n self._fn(self._attempts);\n }, timeout);\n\n if (this._options.unref) {\n this._timer.unref();\n }\n\n return true;\n};\n\nRetryOperation.prototype.attempt = function(fn, timeoutOps) {\n this._fn = fn;\n\n if (timeoutOps) {\n if (timeoutOps.timeout) {\n this._operationTimeout = timeoutOps.timeout;\n }\n if (timeoutOps.cb) {\n this._operationTimeoutCb = timeoutOps.cb;\n }\n }\n\n var self = this;\n if (this._operationTimeoutCb) {\n this._timeout = setTimeout(function() {\n self._operationTimeoutCb();\n }, self._operationTimeout);\n }\n\n this._operationStart = new Date().getTime();\n\n this._fn(this._attempts);\n};\n\nRetryOperation.prototype.try = function(fn) {\n console.log('Using RetryOperation.try() is deprecated');\n this.attempt(fn);\n};\n\nRetryOperation.prototype.start = function(fn) {\n console.log('Using RetryOperation.start() is deprecated');\n this.attempt(fn);\n};\n\nRetryOperation.prototype.start = RetryOperation.prototype.try;\n\nRetryOperation.prototype.errors = function() {\n return this._errors;\n};\n\nRetryOperation.prototype.attempts = function() {\n return this._attempts;\n};\n\nRetryOperation.prototype.mainError = function() {\n if (this._errors.length === 0) {\n return null;\n }\n\n var counts = {};\n var mainError = null;\n var mainErrorCount = 0;\n\n for (var i = 0; i < this._errors.length; i++) {\n var error = this._errors[i];\n var message = error.message;\n var count = (counts[message] || 0) + 1;\n\n counts[message] = count;\n\n if (count >= mainErrorCount) {\n mainError = error;\n mainErrorCount = count;\n }\n }\n\n return mainError;\n};\n\n\n//# sourceURL=webpack://light/./node_modules/retry/lib/retry_operation.js?");
/***/ }),
/***/ "./node_modules/sanitize-filename/index.js":
/*!*************************************************!*\
!*** ./node_modules/sanitize-filename/index.js ***!
\*************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
eval("/*jshint node:true*/\n\n\n/**\n * Replaces characters in strings that are illegal/unsafe for filenames.\n * Unsafe characters are either removed or replaced by a substitute set\n * in the optional `options` object.\n *\n * Illegal Characters on Various Operating Systems\n * / ? < > \\ : * | \"\n * https://kb.acronis.com/content/39790\n *\n * Unicode Control codes\n * C0 0x00-0x1f & C1 (0x80-0x9f)\n * http://en.wikipedia.org/wiki/C0_and_C1_control_codes\n *\n * Reserved filenames on Unix-based systems (\".\", \"..\")\n * Reserved filenames in Windows (\"CON\", \"PRN\", \"AUX\", \"NUL\", \"COM1\",\n * \"COM2\", \"COM3\", \"COM4\", \"COM5\", \"COM6\", \"COM7\", \"COM8\", \"COM9\",\n * \"LPT1\", \"LPT2\", \"LPT3\", \"LPT4\", \"LPT5\", \"LPT6\", \"LPT7\", \"LPT8\", and\n * \"LPT9\") case-insesitively and with or without filename extensions.\n *\n * Capped at 255 characters in length.\n * http://unix.stackexchange.com/questions/32795/what-is-the-maximum-allowed-filename-and-folder-size-with-ecryptfs\n *\n * @param {String} input Original filename\n * @param {Object} options {replacement: String | Function }\n * @return {String} Sanitized filename\n */\n\nvar truncate = __webpack_require__(/*! truncate-utf8-bytes */ \"./node_modules/truncate-utf8-bytes/browser.js\");\n\nvar illegalRe = /[\\/\\?<>\\\\:\\*\\|\"]/g;\nvar controlRe = /[\\x00-\\x1f\\x80-\\x9f]/g;\nvar reservedRe = /^\\.+$/;\nvar windowsReservedRe = /^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\\..*)?$/i;\nvar windowsTrailingRe = /[\\. ]+$/;\n\nfunction sanitize(input, replacement) {\n if (typeof input !== 'string') {\n throw new Error('Input must be string');\n }\n var sanitized = input\n .replace(illegalRe, replacement)\n .replace(controlRe, replacement)\n .replace(reservedRe, replacement)\n .replace(windowsReservedRe, replacement)\n .replace(windowsTrailingRe, replacement);\n return truncate(sanitized, 255);\n}\n\nmodule.exports = function (input, options) {\n var replacement = (options && options.replacement) || '';\n var output = sanitize(input, replacement);\n if (replacement === '') {\n return output;\n }\n return sanitize(output, '');\n};\n\n\n//# sourceURL=webpack://light/./node_modules/sanitize-filename/index.js?");
/***/ }),
/***/ "./node_modules/truncate-utf8-bytes/browser.js":
/*!*****************************************************!*\
!*** ./node_modules/truncate-utf8-bytes/browser.js ***!
\*****************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
eval("\n\nvar truncate = __webpack_require__(/*! ./lib/truncate */ \"./node_modules/truncate-utf8-bytes/lib/truncate.js\");\nvar getLength = __webpack_require__(/*! utf8-byte-length/browser */ \"./node_modules/utf8-byte-length/browser.js\");\nmodule.exports = truncate.bind(null, getLength);\n\n\n//# sourceURL=webpack://light/./node_modules/truncate-utf8-bytes/browser.js?");
/***/ }),
/***/ "./node_modules/truncate-utf8-bytes/lib/truncate.js":
/*!**********************************************************!*\
!*** ./node_modules/truncate-utf8-bytes/lib/truncate.js ***!
\**********************************************************/
/***/ ((module) => {
"use strict";
eval("\n\nfunction isHighSurrogate(codePoint) {\n return codePoint >= 0xd800 && codePoint <= 0xdbff;\n}\n\nfunction isLowSurrogate(codePoint) {\n return codePoint >= 0xdc00 && codePoint <= 0xdfff;\n}\n\n// Truncate string by size in bytes\nmodule.exports = function truncate(getLength, string, byteLength) {\n if (typeof string !== \"string\") {\n throw new Error(\"Input must be string\");\n }\n\n var charLength = string.length;\n var curByteLength = 0;\n var codePoint;\n var segment;\n\n for (var i = 0; i < charLength; i += 1) {\n codePoint = string.charCodeAt(i);\n segment = string[i];\n\n if (isHighSurrogate(codePoint) && isLowSurrogate(string.charCodeAt(i + 1))) {\n i += 1;\n segment += string[i];\n }\n\n curByteLength += getLength(segment);\n\n if (curByteLength === byteLength) {\n return string.slice(0, i + 1);\n }\n else if (curByteLength > byteLength) {\n return string.slice(0, i - segment.length + 1);\n }\n }\n\n return string;\n};\n\n\n\n//# sourceURL=webpack://light/./node_modules/truncate-utf8-bytes/lib/truncate.js?");
/***/ }),
/***/ "./node_modules/utf8-byte-length/browser.js":
/*!**************************************************!*\
!*** ./node_modules/utf8-byte-length/browser.js ***!
\**************************************************/
/***/ ((module) => {
"use strict";
eval("\n\nfunction isHighSurrogate(codePoint) {\n return codePoint >= 0xd800 && codePoint <= 0xdbff;\n}\n\nfunction isLowSurrogate(codePoint) {\n return codePoint >= 0xdc00 && codePoint <= 0xdfff;\n}\n\n// Truncate string by size in bytes\nmodule.exports = function getByteLength(string) {\n if (typeof string !== \"string\") {\n throw new Error(\"Input must be string\");\n }\n\n var charLength = string.length;\n var byteLength = 0;\n var codePoint = null;\n var prevCodePoint = null;\n for (var i = 0; i < charLength; i++) {\n codePoint = string.charCodeAt(i);\n // handle 4-byte non-BMP chars\n // low surrogate\n if (isLowSurrogate(codePoint)) {\n // when parsing previous hi-surrogate, 3 is added to byteLength\n if (prevCodePoint != null && isHighSurrogate(prevCodePoint)) {\n byteLength += 1;\n }\n else {\n byteLength += 3;\n }\n }\n else if (codePoint <= 0x7f ) {\n byteLength += 1;\n }\n else if (codePoint >= 0x80 && codePoint <= 0x7ff) {\n byteLength += 2;\n }\n else if (codePoint >= 0x800 && codePoint <= 0xffff) {\n byteLength += 3;\n }\n prevCodePoint = codePoint;\n }\n\n return byteLength;\n};\n\n\n//# sourceURL=webpack://light/./node_modules/utf8-byte-length/browser.js?");
/***/ }),
/***/ "./node_modules/uuid/dist/esm-browser/native.js":
/*!******************************************************!*\
!*** ./node_modules/uuid/dist/esm-browser/native.js ***!
\******************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\nconst randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n randomUUID\n});\n\n//# sourceURL=webpack://light/./node_modules/uuid/dist/esm-browser/native.js?");
/***/ }),
/***/ "./node_modules/uuid/dist/esm-browser/regex.js":
/*!*****************************************************!*\
!*** ./node_modules/uuid/dist/esm-browser/regex.js ***!
\*****************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i);\n\n//# sourceURL=webpack://light/./node_modules/uuid/dist/esm-browser/regex.js?");
/***/ }),
/***/ "./node_modules/uuid/dist/esm-browser/rng.js":
/*!***************************************************!*\
!*** ./node_modules/uuid/dist/esm-browser/rng.js ***!
\***************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ rng)\n/* harmony export */ });\n// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nlet getRandomValues;\nconst rnds8 = new Uint8Array(16);\nfunction rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}\n\n//# sourceURL=webpack://light/./node_modules/uuid/dist/esm-browser/rng.js?");
/***/ }),
/***/ "./node_modules/uuid/dist/esm-browser/stringify.js":
/*!*********************************************************!*\
!*** ./node_modules/uuid/dist/esm-browser/stringify.js ***!
\*********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */ unsafeStringify: () => (/* binding */ unsafeStringify)\n/* harmony export */ });\n/* harmony import */ var _validate_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./validate.js */ \"./node_modules/uuid/dist/esm-browser/validate.js\");\n\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\n\nfunction unsafeStringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();\n}\n\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!(0,_validate_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (stringify);\n\n//# sourceURL=webpack://light/./node_modules/uuid/dist/esm-browser/stringify.js?");
/***/ }),
/***/ "./node_modules/uuid/dist/esm-browser/v4.js":
/*!**************************************************!*\
!*** ./node_modules/uuid/dist/esm-browser/v4.js ***!
\**************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _native_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./native.js */ \"./node_modules/uuid/dist/esm-browser/native.js\");\n/* harmony import */ var _rng_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./rng.js */ \"./node_modules/uuid/dist/esm-browser/rng.js\");\n/* harmony import */ var _stringify_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./stringify.js */ \"./node_modules/uuid/dist/esm-browser/stringify.js\");\n\n\n\n\nfunction v4(options, buf, offset) {\n if (_native_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].randomUUID && !buf && !options) {\n return _native_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].randomUUID();\n }\n\n options = options || {};\n const rnds = options.random || (options.rng || _rng_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return (0,_stringify_js__WEBPACK_IMPORTED_MODULE_2__.unsafeStringify)(rnds);\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (v4);\n\n//# sourceURL=webpack://light/./node_modules/uuid/dist/esm-browser/v4.js?");
/***/ }),
/***/ "./node_modules/uuid/dist/esm-browser/validate.js":
/*!********************************************************!*\
!*** ./node_modules/uuid/dist/esm-browser/validate.js ***!
\********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _regex_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./regex.js */ \"./node_modules/uuid/dist/esm-browser/regex.js\");\n\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && _regex_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].test(uuid);\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (validate);\n\n//# sourceURL=webpack://light/./node_modules/uuid/dist/esm-browser/validate.js?");
/***/ }),
/***/ "./node_modules/varint/decode.js":
/*!***************************************!*\
!*** ./node_modules/varint/decode.js ***!
\***************************************/
/***/ ((module) => {
eval("module.exports = read\n\nvar MSB = 0x80\n , REST = 0x7F\n\nfunction read(buf, offset) {\n var res = 0\n , offset = offset || 0\n , shift = 0\n , counter = offset\n , b\n , l = buf.length\n\n do {\n if (counter >= l || shift > 49) {\n read.bytes = 0\n throw new RangeError('Could not decode varint')\n }\n b = buf[counter++]\n res += shift < 28\n ? (b & REST) << shift\n : (b & REST) * Math.pow(2, shift)\n shift += 7\n } while (b >= MSB)\n\n read.bytes = counter - offset\n\n return res\n}\n\n\n//# sourceURL=webpack://light/./node_modules/varint/decode.js?");
/***/ }),
/***/ "./node_modules/varint/encode.js":
/*!***************************************!*\
!*** ./node_modules/varint/encode.js ***!
\***************************************/
/***/ ((module) => {
eval("module.exports = encode\n\nvar MSB = 0x80\n , REST = 0x7F\n , MSBALL = ~REST\n , INT = Math.pow(2, 31)\n\nfunction encode(num, out, offset) {\n if (Number.MAX_SAFE_INTEGER && num > Number.MAX_SAFE_INTEGER) {\n encode.bytes = 0\n throw new RangeError('Could not encode varint')\n }\n out = out || []\n offset = offset || 0\n var oldOffset = offset\n\n while(num >= INT) {\n out[offset++] = (num & 0xFF) | MSB\n num /= 128\n }\n while(num & MSBALL) {\n out[offset++] = (num & 0xFF) | MSB\n num >>>= 7\n }\n out[offset] = num | 0\n \n encode.bytes = offset - oldOffset + 1\n \n return out\n}\n\n\n//# sourceURL=webpack://light/./node_modules/varint/encode.js?");
/***/ }),
/***/ "./node_modules/varint/index.js":
/*!**************************************!*\
!*** ./node_modules/varint/index.js ***!
\**************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
eval("module.exports = {\n encode: __webpack_require__(/*! ./encode.js */ \"./node_modules/varint/encode.js\")\n , decode: __webpack_require__(/*! ./decode.js */ \"./node_modules/varint/decode.js\")\n , encodingLength: __webpack_require__(/*! ./length.js */ \"./node_modules/varint/length.js\")\n}\n\n\n//# sourceURL=webpack://light/./node_modules/varint/index.js?");
/***/ }),
/***/ "./node_modules/varint/length.js":
/*!***************************************!*\
!*** ./node_modules/varint/length.js ***!
\***************************************/
/***/ ((module) => {
eval("\nvar N1 = Math.pow(2, 7)\nvar N2 = Math.pow(2, 14)\nvar N3 = Math.pow(2, 21)\nvar N4 = Math.pow(2, 28)\nvar N5 = Math.pow(2, 35)\nvar N6 = Math.pow(2, 42)\nvar N7 = Math.pow(2, 49)\nvar N8 = Math.pow(2, 56)\nvar N9 = Math.pow(2, 63)\n\nmodule.exports = function (value) {\n return (\n value < N1 ? 1\n : value < N2 ? 2\n : value < N3 ? 3\n : value < N4 ? 4\n : value < N5 ? 5\n : value < N6 ? 6\n : value < N7 ? 7\n : value < N8 ? 8\n : value < N9 ? 9\n : 10\n )\n}\n\n\n//# sourceURL=webpack://light/./node_modules/varint/length.js?");
/***/ }),
/***/ "?51ea":
/*!************************!*\
!*** crypto (ignored) ***!
\************************/
/***/ (() => {
eval("/* (ignored) */\n\n//# sourceURL=webpack://light/crypto_(ignored)?");
/***/ }),
/***/ "?ce41":
/*!************************!*\
!*** crypto (ignored) ***!
\************************/
/***/ (() => {
eval("/* (ignored) */\n\n//# sourceURL=webpack://light/crypto_(ignored)?");
/***/ }),
/***/ "?b254":
/*!************************!*\
!*** crypto (ignored) ***!
\************************/
/***/ (() => {
eval("/* (ignored) */\n\n//# sourceURL=webpack://light/crypto_(ignored)?");
/***/ }),
/***/ "?76c6":
/*!*************************!*\
!*** cluster (ignored) ***!
\*************************/
/***/ (() => {
eval("/* (ignored) */\n\n//# sourceURL=webpack://light/cluster_(ignored)?");
/***/ }),
/***/ "?4a7d":
/*!************************!*\
!*** crypto (ignored) ***!
\************************/
/***/ (() => {
eval("/* (ignored) */\n\n//# sourceURL=webpack://light/crypto_(ignored)?");
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-gossipsub/dist/src/message/rpc.cjs":
/*!***************************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-gossipsub/dist/src/message/rpc.cjs ***!
\***************************************************************************/
/***/ (function(module, exports, __webpack_require__) {
eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// @ts-nocheck\n/*eslint-disable*/\n(function(global, factory) { /* global define, require, module */\n\n /* AMD */ if (true)\n !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! protobufjs/minimal */ \"./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/minimal.js\")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\n /* CommonJS */ else {}\n\n})(this, function($protobuf) {\n \"use strict\";\n\n // Common aliases\n var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;\n\n // Exported root namespace\n var $root = $protobuf.roots[\"default\"] || ($protobuf.roots[\"default\"] = {});\n\n $root.RPC = (function() {\n\n /**\n * Properties of a RPC.\n * @exports IRPC\n * @interface IRPC\n * @property {Array.<RPC.ISubOpts>|null} [subscriptions] RPC subscriptions\n * @property {Array.<RPC.IMessage>|null} [messages] RPC messages\n * @property {RPC.IControlMessage|null} [control] RPC control\n */\n\n /**\n * Constructs a new RPC.\n * @exports RPC\n * @classdesc Represents a RPC.\n * @implements IRPC\n * @constructor\n * @param {IRPC=} [p] Properties to set\n */\n function RPC(p) {\n this.subscriptions = [];\n this.messages = [];\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * RPC subscriptions.\n * @member {Array.<RPC.ISubOpts>} subscriptions\n * @memberof RPC\n * @instance\n */\n RPC.prototype.subscriptions = $util.emptyArray;\n\n /**\n * RPC messages.\n * @member {Array.<RPC.IMessage>} messages\n * @memberof RPC\n * @instance\n */\n RPC.prototype.messages = $util.emptyArray;\n\n /**\n * RPC control.\n * @member {RPC.IControlMessage|null|undefined} control\n * @memberof RPC\n * @instance\n */\n RPC.prototype.control = null;\n\n // OneOf field names bound to virtual getters and setters\n var $oneOfFields;\n\n /**\n * RPC _control.\n * @member {\"control\"|undefined} _control\n * @memberof RPC\n * @instance\n */\n Object.defineProperty(RPC.prototype, \"_control\", {\n get: $util.oneOfGetter($oneOfFields = [\"control\"]),\n set: $util.oneOfSetter($oneOfFields)\n });\n\n /**\n * Encodes the specified RPC message. Does not implicitly {@link RPC.verify|verify} messages.\n * @function encode\n * @memberof RPC\n * @static\n * @param {IRPC} m RPC message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n RPC.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.subscriptions != null && m.subscriptions.length) {\n for (var i = 0; i < m.subscriptions.length; ++i)\n $root.RPC.SubOpts.encode(m.subscriptions[i], w.uint32(10).fork()).ldelim();\n }\n if (m.messages != null && m.messages.length) {\n for (var i = 0; i < m.messages.length; ++i)\n $root.RPC.Message.encode(m.messages[i], w.uint32(18).fork()).ldelim();\n }\n if (m.control != null && Object.hasOwnProperty.call(m, \"co
/***/ }),
/***/ "./node_modules/@chainsafe/is-ip/lib/is-ip.js":
/*!****************************************************!*\
!*** ./node_modules/@chainsafe/is-ip/lib/is-ip.js ***!
\****************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ipVersion: () => (/* binding */ ipVersion),\n/* harmony export */ isIP: () => (/* binding */ isIP),\n/* harmony export */ isIPv4: () => (/* binding */ isIPv4),\n/* harmony export */ isIPv6: () => (/* binding */ isIPv6)\n/* harmony export */ });\n/* harmony import */ var _parse_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./parse.js */ \"./node_modules/@chainsafe/is-ip/lib/parse.js\");\n\n/** Check if `input` is IPv4. */\nfunction isIPv4(input) {\n return Boolean((0,_parse_js__WEBPACK_IMPORTED_MODULE_0__.parseIPv4)(input));\n}\n/** Check if `input` is IPv6. */\nfunction isIPv6(input) {\n return Boolean((0,_parse_js__WEBPACK_IMPORTED_MODULE_0__.parseIPv6)(input));\n}\n/** Check if `input` is IPv4 or IPv6. */\nfunction isIP(input) {\n return Boolean((0,_parse_js__WEBPACK_IMPORTED_MODULE_0__.parseIP)(input));\n}\n/**\n * @returns `6` if `input` is IPv6, `4` if `input` is IPv4, or `undefined` if `input` is neither.\n */\nfunction ipVersion(input) {\n if (isIPv4(input)) {\n return 4;\n }\n else if (isIPv6(input)) {\n return 6;\n }\n else {\n return undefined;\n }\n}\n//# sourceMappingURL=is-ip.js.map\n\n//# sourceURL=webpack://light/./node_modules/@chainsafe/is-ip/lib/is-ip.js?");
/***/ }),
/***/ "./node_modules/@chainsafe/is-ip/lib/parse.js":
/*!****************************************************!*\
!*** ./node_modules/@chainsafe/is-ip/lib/parse.js ***!
\****************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ parseIP: () => (/* binding */ parseIP),\n/* harmony export */ parseIPv4: () => (/* binding */ parseIPv4),\n/* harmony export */ parseIPv6: () => (/* binding */ parseIPv6)\n/* harmony export */ });\n/* harmony import */ var _parser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./parser.js */ \"./node_modules/@chainsafe/is-ip/lib/parser.js\");\n\n// See https://stackoverflow.com/questions/166132/maximum-length-of-the-textual-representation-of-an-ipv6-address\nconst MAX_IPV6_LENGTH = 45;\nconst MAX_IPV4_LENGTH = 15;\nconst parser = new _parser_js__WEBPACK_IMPORTED_MODULE_0__.Parser();\n/** Parse `input` into IPv4 bytes. */\nfunction parseIPv4(input) {\n if (input.length > MAX_IPV4_LENGTH) {\n return undefined;\n }\n return parser.new(input).parseWith(() => parser.readIPv4Addr());\n}\n/** Parse `input` into IPv6 bytes. */\nfunction parseIPv6(input) {\n if (input.length > MAX_IPV6_LENGTH) {\n return undefined;\n }\n return parser.new(input).parseWith(() => parser.readIPv6Addr());\n}\n/** Parse `input` into IPv4 or IPv6 bytes. */\nfunction parseIP(input) {\n if (input.length > MAX_IPV6_LENGTH) {\n return undefined;\n }\n return parser.new(input).parseWith(() => parser.readIPAddr());\n}\n//# sourceMappingURL=parse.js.map\n\n//# sourceURL=webpack://light/./node_modules/@chainsafe/is-ip/lib/parse.js?");
/***/ }),
/***/ "./node_modules/@chainsafe/is-ip/lib/parser.js":
/*!*****************************************************!*\
!*** ./node_modules/@chainsafe/is-ip/lib/parser.js ***!
\*****************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Parser: () => (/* binding */ Parser)\n/* harmony export */ });\n/* eslint-disable @typescript-eslint/no-unsafe-return */\nclass Parser {\n index = 0;\n input = \"\";\n new(input) {\n this.index = 0;\n this.input = input;\n return this;\n }\n /** Run a parser, and restore the pre-parse state if it fails. */\n readAtomically(fn) {\n const index = this.index;\n const result = fn();\n if (result === undefined) {\n this.index = index;\n }\n return result;\n }\n /** Run a parser, but fail if the entire input wasn't consumed. Doesn't run atomically. */\n parseWith(fn) {\n const result = fn();\n if (this.index !== this.input.length) {\n return undefined;\n }\n return result;\n }\n /** Peek the next character from the input */\n peekChar() {\n if (this.index >= this.input.length) {\n return undefined;\n }\n return this.input[this.index];\n }\n /** Read the next character from the input */\n readChar() {\n if (this.index >= this.input.length) {\n return undefined;\n }\n return this.input[this.index++];\n }\n /** Read the next character from the input if it matches the target. */\n readGivenChar(target) {\n return this.readAtomically(() => {\n const char = this.readChar();\n if (char !== target) {\n return undefined;\n }\n return char;\n });\n }\n /**\n * Helper for reading separators in an indexed loop. Reads the separator\n * character iff index > 0, then runs the parser. When used in a loop,\n * the separator character will only be read on index > 0 (see\n * readIPv4Addr for an example)\n */\n readSeparator(sep, index, inner) {\n return this.readAtomically(() => {\n if (index > 0) {\n if (this.readGivenChar(sep) === undefined) {\n return undefined;\n }\n }\n return inner();\n });\n }\n /**\n * Read a number off the front of the input in the given radix, stopping\n * at the first non-digit character or eof. Fails if the number has more\n * digits than max_digits or if there is no number.\n */\n readNumber(radix, maxDigits, allowZeroPrefix, maxBytes) {\n return this.readAtomically(() => {\n let result = 0;\n let digitCount = 0;\n const leadingChar = this.peekChar();\n if (leadingChar === undefined) {\n return undefined;\n }\n const hasLeadingZero = leadingChar === \"0\";\n const maxValue = 2 ** (8 * maxBytes) - 1;\n // eslint-disable-next-line no-constant-condition\n while (true) {\n const digit = this.readAtomically(() => {\n const char = this.readChar();\n if (char === undefined) {\n return undefined;\n }\n const num = Number.parseInt(char, radix);\n if (Number.isNaN(num)) {\n return undefined;\n }\n return num;\n });\n if (digit === undefined) {\n break;\n }\n result *= radix;\n result += digit;\n if (result > maxValue) {\n return undefined;\n }\n digitCount += 1;\n if (maxDigits !== undefined) {\n if (digitCount > maxDigits) {\n return undefined;\n }\n }\n }\n if (digitCount === 0) {\n return undefined;\n }\n else if (!allowZeroPrefix &&
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-gossipsub/dist/src/constants.js":
/*!************************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-gossipsub/dist/src/constants.js ***!
\************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ACCEPT_FROM_WHITELIST_DURATION_MS: () => (/* binding */ ACCEPT_FROM_WHITELIST_DURATION_MS),\n/* harmony export */ ACCEPT_FROM_WHITELIST_MAX_MESSAGES: () => (/* binding */ ACCEPT_FROM_WHITELIST_MAX_MESSAGES),\n/* harmony export */ ACCEPT_FROM_WHITELIST_THRESHOLD_SCORE: () => (/* binding */ ACCEPT_FROM_WHITELIST_THRESHOLD_SCORE),\n/* harmony export */ BACKOFF_SLACK: () => (/* binding */ BACKOFF_SLACK),\n/* harmony export */ DEFAULT_METRIC_MESH_MESSAGE_DELIVERIES_WINDOWS: () => (/* binding */ DEFAULT_METRIC_MESH_MESSAGE_DELIVERIES_WINDOWS),\n/* harmony export */ ERR_TOPIC_VALIDATOR_IGNORE: () => (/* binding */ ERR_TOPIC_VALIDATOR_IGNORE),\n/* harmony export */ ERR_TOPIC_VALIDATOR_REJECT: () => (/* binding */ ERR_TOPIC_VALIDATOR_REJECT),\n/* harmony export */ FloodsubID: () => (/* binding */ FloodsubID),\n/* harmony export */ GossipsubConnectionTimeout: () => (/* binding */ GossipsubConnectionTimeout),\n/* harmony export */ GossipsubConnectors: () => (/* binding */ GossipsubConnectors),\n/* harmony export */ GossipsubD: () => (/* binding */ GossipsubD),\n/* harmony export */ GossipsubDhi: () => (/* binding */ GossipsubDhi),\n/* harmony export */ GossipsubDirectConnectInitialDelay: () => (/* binding */ GossipsubDirectConnectInitialDelay),\n/* harmony export */ GossipsubDirectConnectTicks: () => (/* binding */ GossipsubDirectConnectTicks),\n/* harmony export */ GossipsubDlazy: () => (/* binding */ GossipsubDlazy),\n/* harmony export */ GossipsubDlo: () => (/* binding */ GossipsubDlo),\n/* harmony export */ GossipsubDout: () => (/* binding */ GossipsubDout),\n/* harmony export */ GossipsubDscore: () => (/* binding */ GossipsubDscore),\n/* harmony export */ GossipsubFanoutTTL: () => (/* binding */ GossipsubFanoutTTL),\n/* harmony export */ GossipsubGossipFactor: () => (/* binding */ GossipsubGossipFactor),\n/* harmony export */ GossipsubGossipRetransmission: () => (/* binding */ GossipsubGossipRetransmission),\n/* harmony export */ GossipsubGraftFloodThreshold: () => (/* binding */ GossipsubGraftFloodThreshold),\n/* harmony export */ GossipsubHeartbeatInitialDelay: () => (/* binding */ GossipsubHeartbeatInitialDelay),\n/* harmony export */ GossipsubHeartbeatInterval: () => (/* binding */ GossipsubHeartbeatInterval),\n/* harmony export */ GossipsubHistoryGossip: () => (/* binding */ GossipsubHistoryGossip),\n/* harmony export */ GossipsubHistoryLength: () => (/* binding */ GossipsubHistoryLength),\n/* harmony export */ GossipsubIDv10: () => (/* binding */ GossipsubIDv10),\n/* harmony export */ GossipsubIDv11: () => (/* binding */ GossipsubIDv11),\n/* harmony export */ GossipsubIWantFollowupTime: () => (/* binding */ GossipsubIWantFollowupTime),\n/* harmony export */ GossipsubMaxIHaveLength: () => (/* binding */ GossipsubMaxIHaveLength),\n/* harmony export */ GossipsubMaxIHaveMessages: () => (/* binding */ GossipsubMaxIHaveMessages),\n/* harmony export */ GossipsubMaxPendingConnections: () => (/* binding */ GossipsubMaxPendingConnections),\n/* harmony export */ GossipsubOpportunisticGraftPeers: () => (/* binding */ GossipsubOpportunisticGraftPeers),\n/* harmony export */ GossipsubOpportunisticGraftTicks: () => (/* binding */ GossipsubOpportunisticGraftTicks),\n/* harmony export */ GossipsubPruneBackoff: () => (/* binding */ GossipsubPruneBackoff),\n/* harmony export */ GossipsubPruneBackoffTicks: () => (/* binding */ GossipsubPruneBackoffTicks),\n/* harmony export */ GossipsubPrunePeers: () => (/* binding */ GossipsubPrunePeers),\n/* harmony export */ GossipsubSeenTTL: () => (/* binding */ GossipsubSeenTTL),\n/* harmony export */ GossipsubUnsubscribeBackoff: () => (/* binding */ GossipsubUnsubscribeBackoff),\n/* harmony export */ TimeCacheDuration: () => (/* binding */ TimeCacheDuration),\n/* harmony export */ minute: () => (/* binding */ minute),\n/* harmony export */ second: () => (/* binding */ second)\n/* h
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-gossipsub/dist/src/index.js":
/*!********************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-gossipsub/dist/src/index.js ***!
\********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ GossipSub: () => (/* binding */ GossipSub),\n/* harmony export */ gossipsub: () => (/* binding */ gossipsub),\n/* harmony export */ multicodec: () => (/* binding */ multicodec)\n/* harmony export */ });\n/* harmony import */ var it_pipe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! it-pipe */ \"./node_modules/it-pipe/dist/src/index.js\");\n/* harmony import */ var _libp2p_peer_id__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/peer-id */ \"./node_modules/@libp2p/peer-id/dist/src/index.js\");\n/* harmony import */ var _libp2p_logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @libp2p/logger */ \"./node_modules/@libp2p/logger/dist/src/index.js\");\n/* harmony import */ var _libp2p_topology__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @libp2p/topology */ \"./node_modules/@libp2p/topology/dist/src/index.js\");\n/* harmony import */ var _libp2p_interfaces_events__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @libp2p/interfaces/events */ \"./node_modules/@libp2p/interfaces/dist/src/events.js\");\n/* harmony import */ var _message_cache_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./message-cache.js */ \"./node_modules/@chainsafe/libp2p-gossipsub/dist/src/message-cache.js\");\n/* harmony import */ var _message_rpc_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./message/rpc.js */ \"./node_modules/@chainsafe/libp2p-gossipsub/dist/src/message/rpc.js\");\n/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./constants.js */ \"./node_modules/@chainsafe/libp2p-gossipsub/dist/src/constants.js\");\n/* harmony import */ var _utils_index_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./utils/index.js */ \"./node_modules/@chainsafe/libp2p-gossipsub/dist/src/utils/index.js\");\n/* harmony import */ var _score_index_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./score/index.js */ \"./node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/index.js\");\n/* harmony import */ var _tracer_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./tracer.js */ \"./node_modules/@chainsafe/libp2p-gossipsub/dist/src/tracer.js\");\n/* harmony import */ var _utils_time_cache_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utils/time-cache.js */ \"./node_modules/@chainsafe/libp2p-gossipsub/dist/src/utils/time-cache.js\");\n/* harmony import */ var _metrics_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./metrics.js */ \"./node_modules/@chainsafe/libp2p-gossipsub/dist/src/metrics.js\");\n/* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./types.js */ \"./node_modules/@chainsafe/libp2p-gossipsub/dist/src/types.js\");\n/* harmony import */ var _utils_buildRawMessage_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./utils/buildRawMessage.js */ \"./node_modules/@chainsafe/libp2p-gossipsub/dist/src/utils/buildRawMessage.js\");\n/* harmony import */ var _utils_msgIdFn_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./utils/msgIdFn.js */ \"./node_modules/@chainsafe/libp2p-gossipsub/dist/src/utils/msgIdFn.js\");\n/* harmony import */ var _score_scoreMetrics_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./score/scoreMetrics.js */ \"./node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/scoreMetrics.js\");\n/* harmony import */ var _utils_publishConfig_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./utils/publishConfig.js */ \"./node_modules/@chainsafe/libp2p-gossipsub/dist/src/utils/publishConfig.js\");\n/* harmony import */ var _libp2p_interface_pubsub__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @libp2p/interface-pubsub */ \"./node_modules/@libp2p/interface-pubsub/dist/src/index.js\");\n/* harmony import */ var _utils_set_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./utils/set.js */ \"./node_modules/@chainsafe/libp2p-gossipsub/dist/
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-gossipsub/dist/src/message-cache.js":
/*!****************************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-gossipsub/dist/src/message-cache.js ***!
\****************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ MessageCache: () => (/* binding */ MessageCache)\n/* harmony export */ });\nclass MessageCache {\n /**\n * Holds history of messages in timebounded history arrays\n */\n constructor(\n /**\n * The number of indices in the cache history used for gossiping. That means that a message\n * won't get gossiped anymore when shift got called `gossip` many times after inserting the\n * message in the cache.\n */\n gossip, historyCapacity, msgIdToStrFn) {\n this.gossip = gossip;\n this.msgs = new Map();\n this.history = [];\n /** Track with accounting of messages in the mcache that are not yet validated */\n this.notValidatedCount = 0;\n this.msgIdToStrFn = msgIdToStrFn;\n for (let i = 0; i < historyCapacity; i++) {\n this.history[i] = [];\n }\n }\n get size() {\n return this.msgs.size;\n }\n /**\n * Adds a message to the current window and the cache\n * Returns true if the message is not known and is inserted in the cache\n */\n put(messageId, msg, validated = false) {\n const { msgIdStr } = messageId;\n // Don't add duplicate entries to the cache.\n if (this.msgs.has(msgIdStr)) {\n return false;\n }\n this.msgs.set(msgIdStr, {\n message: msg,\n validated,\n originatingPeers: new Set(),\n iwantCounts: new Map()\n });\n this.history[0].push({ ...messageId, topic: msg.topic });\n if (!validated) {\n this.notValidatedCount++;\n }\n return true;\n }\n observeDuplicate(msgId, fromPeerIdStr) {\n const entry = this.msgs.get(msgId);\n if (entry &&\n // if the message is already validated, we don't need to store extra peers sending us\n // duplicates as the message has already been forwarded\n !entry.validated) {\n entry.originatingPeers.add(fromPeerIdStr);\n }\n }\n /**\n * Retrieves a message from the cache by its ID, if it is still present\n */\n get(msgId) {\n return this.msgs.get(this.msgIdToStrFn(msgId))?.message;\n }\n /**\n * Increases the iwant count for the given message by one and returns the message together\n * with the iwant if the message exists.\n */\n getWithIWantCount(msgIdStr, p) {\n const msg = this.msgs.get(msgIdStr);\n if (!msg) {\n return null;\n }\n const count = (msg.iwantCounts.get(p) ?? 0) + 1;\n msg.iwantCounts.set(p, count);\n return { msg: msg.message, count };\n }\n /**\n * Retrieves a list of message IDs for a set of topics\n */\n getGossipIDs(topics) {\n const msgIdsByTopic = new Map();\n for (let i = 0; i < this.gossip; i++) {\n this.history[i].forEach((entry) => {\n const msg = this.msgs.get(entry.msgIdStr);\n if (msg && msg.validated && topics.has(entry.topic)) {\n let msgIds = msgIdsByTopic.get(entry.topic);\n if (!msgIds) {\n msgIds = [];\n msgIdsByTopic.set(entry.topic, msgIds);\n }\n msgIds.push(entry.msgId);\n }\n });\n }\n return msgIdsByTopic;\n }\n /**\n * Gets a message with msgId and tags it as validated.\n * This function also returns the known peers that have sent us this message. This is used to\n * prevent us sending redundant messages to peers who have already propagated it.\n */\n validate(msgId) {\n const entry = this.msgs.get(msgId);\n if (!entry) {\n return null;\n }\n if (!entry.validated) {\n this.notValidatedCount--;\n }\n const { message, originatingPeers } = entry;\n entry.validated =
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-gossipsub/dist/src/message/decodeRpc.js":
/*!********************************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-gossipsub/dist/src/message/decodeRpc.js ***!
\********************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ decodeRpc: () => (/* binding */ decodeRpc),\n/* harmony export */ defaultDecodeRpcLimits: () => (/* binding */ defaultDecodeRpcLimits)\n/* harmony export */ });\n/* harmony import */ var protobufjs_minimal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! protobufjs/minimal.js */ \"./node_modules/@chainsafe/libp2p-gossipsub/node_modules/protobufjs/minimal.js\");\n\nconst defaultDecodeRpcLimits = {\n maxSubscriptions: Infinity,\n maxMessages: Infinity,\n maxIhaveMessageIDs: Infinity,\n maxIwantMessageIDs: Infinity,\n maxControlMessages: Infinity,\n maxPeerInfos: Infinity\n};\n/**\n * Copied code from src/message/rpc.cjs but with decode limits to prevent OOM attacks\n */\nfunction decodeRpc(bytes, opts) {\n // Mutate to use the option as stateful counter. Must limit the total count of messageIDs across all IWANT, IHAVE\n // else one count put 100 messageIDs into each 100 IWANT and \"get around\" the limit\n opts = { ...opts };\n const r = protobufjs_minimal_js__WEBPACK_IMPORTED_MODULE_0__.Reader.create(bytes);\n const l = bytes.length;\n const c = l === undefined ? r.len : r.pos + l;\n const m = {};\n while (r.pos < c) {\n const t = r.uint32();\n switch (t >>> 3) {\n case 1:\n if (!(m.subscriptions && m.subscriptions.length))\n m.subscriptions = [];\n if (m.subscriptions.length < opts.maxSubscriptions)\n m.subscriptions.push(decodeSubOpts(r, r.uint32()));\n else\n r.skipType(t & 7);\n break;\n case 2:\n if (!(m.messages && m.messages.length))\n m.messages = [];\n if (m.messages.length < opts.maxMessages)\n m.messages.push(decodeMessage(r, r.uint32()));\n else\n r.skipType(t & 7);\n break;\n case 3:\n m.control = decodeControlMessage(r, r.uint32(), opts);\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n}\nfunction decodeSubOpts(r, l) {\n const c = l === undefined ? r.len : r.pos + l;\n const m = {};\n while (r.pos < c) {\n const t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.subscribe = r.bool();\n break;\n case 2:\n m.topic = r.string();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n}\nfunction decodeMessage(r, l) {\n const c = l === undefined ? r.len : r.pos + l;\n const m = {};\n while (r.pos < c) {\n const t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.from = r.bytes();\n break;\n case 2:\n m.data = r.bytes();\n break;\n case 3:\n m.seqno = r.bytes();\n break;\n case 4:\n m.topic = r.string();\n break;\n case 5:\n m.signature = r.bytes();\n break;\n case 6:\n m.key = r.bytes();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n if (!m.topic)\n throw Error(\"missing required 'topic'\");\n return m;\n}\nfunction decodeControlMessage(r, l, opts) {\n const c = l === undefined ? r.len : r.pos + l;\n const m = {};\n while (r.pos < c) {\n const t = r.uint32();\n switch (t >>> 3) {\n case 1:\n if (!(m.ihave && m.ihave.length))\n m.ihave = [];\n if (m.ihave.length < opts.maxControlMessages)\n m.ihave.push(decodeControlIHave(r, r.uint3
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-gossipsub/dist/src/message/rpc.js":
/*!**************************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-gossipsub/dist/src/message/rpc.js ***!
\**************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ RPC: () => (/* binding */ RPC)\n/* harmony export */ });\n/* harmony import */ var _rpc_cjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./rpc.cjs */ \"./node_modules/@chainsafe/libp2p-gossipsub/dist/src/message/rpc.cjs\");\n\n\nconst {RPC} = _rpc_cjs__WEBPACK_IMPORTED_MODULE_0__\n\n\n//# sourceURL=webpack://light/./node_modules/@chainsafe/libp2p-gossipsub/dist/src/message/rpc.js?");
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-gossipsub/dist/src/metrics.js":
/*!**********************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-gossipsub/dist/src/metrics.js ***!
\**********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ChurnReason: () => (/* binding */ ChurnReason),\n/* harmony export */ IHaveIgnoreReason: () => (/* binding */ IHaveIgnoreReason),\n/* harmony export */ InclusionReason: () => (/* binding */ InclusionReason),\n/* harmony export */ MessageSource: () => (/* binding */ MessageSource),\n/* harmony export */ ScorePenalty: () => (/* binding */ ScorePenalty),\n/* harmony export */ ScoreThreshold: () => (/* binding */ ScoreThreshold),\n/* harmony export */ getMetrics: () => (/* binding */ getMetrics)\n/* harmony export */ });\n/* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./types.js */ \"./node_modules/@chainsafe/libp2p-gossipsub/dist/src/types.js\");\n\nvar MessageSource;\n(function (MessageSource) {\n MessageSource[\"forward\"] = \"forward\";\n MessageSource[\"publish\"] = \"publish\";\n})(MessageSource || (MessageSource = {}));\nvar InclusionReason;\n(function (InclusionReason) {\n /** Peer was a fanaout peer. */\n InclusionReason[\"Fanout\"] = \"fanout\";\n /** Included from random selection. */\n InclusionReason[\"Random\"] = \"random\";\n /** Peer subscribed. */\n InclusionReason[\"Subscribed\"] = \"subscribed\";\n /** On heartbeat, peer was included to fill the outbound quota. */\n InclusionReason[\"Outbound\"] = \"outbound\";\n /** On heartbeat, not enough peers in mesh */\n InclusionReason[\"NotEnough\"] = \"not_enough\";\n /** On heartbeat opportunistic grafting due to low mesh score */\n InclusionReason[\"Opportunistic\"] = \"opportunistic\";\n})(InclusionReason || (InclusionReason = {}));\n/// Reasons why a peer was removed from the mesh.\nvar ChurnReason;\n(function (ChurnReason) {\n /// Peer disconnected.\n ChurnReason[\"Dc\"] = \"disconnected\";\n /// Peer had a bad score.\n ChurnReason[\"BadScore\"] = \"bad_score\";\n /// Peer sent a PRUNE.\n ChurnReason[\"Prune\"] = \"prune\";\n /// Too many peers.\n ChurnReason[\"Excess\"] = \"excess\";\n})(ChurnReason || (ChurnReason = {}));\n/// Kinds of reasons a peer's score has been penalized\nvar ScorePenalty;\n(function (ScorePenalty) {\n /// A peer grafted before waiting the back-off time.\n ScorePenalty[\"GraftBackoff\"] = \"graft_backoff\";\n /// A Peer did not respond to an IWANT request in time.\n ScorePenalty[\"BrokenPromise\"] = \"broken_promise\";\n /// A Peer did not send enough messages as expected.\n ScorePenalty[\"MessageDeficit\"] = \"message_deficit\";\n /// Too many peers under one IP address.\n ScorePenalty[\"IPColocation\"] = \"IP_colocation\";\n})(ScorePenalty || (ScorePenalty = {}));\nvar IHaveIgnoreReason;\n(function (IHaveIgnoreReason) {\n IHaveIgnoreReason[\"LowScore\"] = \"low_score\";\n IHaveIgnoreReason[\"MaxIhave\"] = \"max_ihave\";\n IHaveIgnoreReason[\"MaxIasked\"] = \"max_iasked\";\n})(IHaveIgnoreReason || (IHaveIgnoreReason = {}));\nvar ScoreThreshold;\n(function (ScoreThreshold) {\n ScoreThreshold[\"graylist\"] = \"graylist\";\n ScoreThreshold[\"publish\"] = \"publish\";\n ScoreThreshold[\"gossip\"] = \"gossip\";\n ScoreThreshold[\"mesh\"] = \"mesh\";\n})(ScoreThreshold || (ScoreThreshold = {}));\n/**\n * A collection of metrics used throughout the Gossipsub behaviour.\n * NOTE: except for special reasons, do not add more than 1 label for frequent metrics,\n * there's a performance penalty as of June 2023.\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nfunction getMetrics(register, topicStrToLabel, opts) {\n // Using function style instead of class to prevent having to re-declare all MetricsPrometheus types.\n return {\n /* Metrics for static config */\n protocolsEnabled: register.gauge({\n name: 'gossipsub_protocol',\n help: 'Status of enabled protocols',\n labelNames: ['protocol']\n }),\n /* Metrics per known topic */\n /** St
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/compute-score.js":
/*!**********************************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/compute-score.js ***!
\**********************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ computeScore: () => (/* binding */ computeScore)\n/* harmony export */ });\nfunction computeScore(peer, pstats, params, peerIPs) {\n let score = 0;\n // topic stores\n Object.entries(pstats.topics).forEach(([topic, tstats]) => {\n // the topic parameters\n const topicParams = params.topics[topic];\n if (topicParams === undefined) {\n // we are not scoring this topic\n return;\n }\n let topicScore = 0;\n // P1: time in Mesh\n if (tstats.inMesh) {\n let p1 = tstats.meshTime / topicParams.timeInMeshQuantum;\n if (p1 > topicParams.timeInMeshCap) {\n p1 = topicParams.timeInMeshCap;\n }\n topicScore += p1 * topicParams.timeInMeshWeight;\n }\n // P2: first message deliveries\n let p2 = tstats.firstMessageDeliveries;\n if (p2 > topicParams.firstMessageDeliveriesCap) {\n p2 = topicParams.firstMessageDeliveriesCap;\n }\n topicScore += p2 * topicParams.firstMessageDeliveriesWeight;\n // P3: mesh message deliveries\n if (tstats.meshMessageDeliveriesActive &&\n tstats.meshMessageDeliveries < topicParams.meshMessageDeliveriesThreshold) {\n const deficit = topicParams.meshMessageDeliveriesThreshold - tstats.meshMessageDeliveries;\n const p3 = deficit * deficit;\n topicScore += p3 * topicParams.meshMessageDeliveriesWeight;\n }\n // P3b:\n // NOTE: the weight of P3b is negative (validated in validateTopicScoreParams) so this detracts\n const p3b = tstats.meshFailurePenalty;\n topicScore += p3b * topicParams.meshFailurePenaltyWeight;\n // P4: invalid messages\n // NOTE: the weight of P4 is negative (validated in validateTopicScoreParams) so this detracts\n const p4 = tstats.invalidMessageDeliveries * tstats.invalidMessageDeliveries;\n topicScore += p4 * topicParams.invalidMessageDeliveriesWeight;\n // update score, mixing with topic weight\n score += topicScore * topicParams.topicWeight;\n });\n // apply the topic score cap, if any\n if (params.topicScoreCap > 0 && score > params.topicScoreCap) {\n score = params.topicScoreCap;\n }\n // P5: application-specific score\n const p5 = params.appSpecificScore(peer);\n score += p5 * params.appSpecificWeight;\n // P6: IP colocation factor\n pstats.knownIPs.forEach((ip) => {\n if (params.IPColocationFactorWhitelist.has(ip)) {\n return;\n }\n // P6 has a cliff (IPColocationFactorThreshold)\n // It's only applied if at least that many peers are connected to us from that source IP addr.\n // It is quadratic, and the weight is negative (validated in validatePeerScoreParams)\n const peersInIP = peerIPs.get(ip);\n const numPeersInIP = peersInIP ? peersInIP.size : 0;\n if (numPeersInIP > params.IPColocationFactorThreshold) {\n const surplus = numPeersInIP - params.IPColocationFactorThreshold;\n const p6 = surplus * surplus;\n score += p6 * params.IPColocationFactorWeight;\n }\n });\n // P7: behavioural pattern penalty\n if (pstats.behaviourPenalty > params.behaviourPenaltyThreshold) {\n const excess = pstats.behaviourPenalty - params.behaviourPenaltyThreshold;\n const p7 = excess * excess;\n score += p7 * params.behaviourPenaltyWeight;\n }\n return score;\n}\n//# sourceMappingURL=compute-score.js.map\n\n//# sourceURL=webpack://light/./node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/compute-score.js?");
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/constants.js":
/*!******************************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/constants.js ***!
\******************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ERR_INVALID_PEER_SCORE_PARAMS: () => (/* binding */ ERR_INVALID_PEER_SCORE_PARAMS),\n/* harmony export */ ERR_INVALID_PEER_SCORE_THRESHOLDS: () => (/* binding */ ERR_INVALID_PEER_SCORE_THRESHOLDS)\n/* harmony export */ });\nconst ERR_INVALID_PEER_SCORE_PARAMS = 'ERR_INVALID_PEER_SCORE_PARAMS';\nconst ERR_INVALID_PEER_SCORE_THRESHOLDS = 'ERR_INVALID_PEER_SCORE_THRESHOLDS';\n//# sourceMappingURL=constants.js.map\n\n//# sourceURL=webpack://light/./node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/constants.js?");
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/index.js":
/*!**************************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/index.js ***!
\**************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PeerScore: () => (/* reexport safe */ _peer_score_js__WEBPACK_IMPORTED_MODULE_2__.PeerScore),\n/* harmony export */ createPeerScoreParams: () => (/* reexport safe */ _peer_score_params_js__WEBPACK_IMPORTED_MODULE_0__.createPeerScoreParams),\n/* harmony export */ createPeerScoreThresholds: () => (/* reexport safe */ _peer_score_thresholds_js__WEBPACK_IMPORTED_MODULE_1__.createPeerScoreThresholds),\n/* harmony export */ createTopicScoreParams: () => (/* reexport safe */ _peer_score_params_js__WEBPACK_IMPORTED_MODULE_0__.createTopicScoreParams),\n/* harmony export */ defaultPeerScoreParams: () => (/* reexport safe */ _peer_score_params_js__WEBPACK_IMPORTED_MODULE_0__.defaultPeerScoreParams),\n/* harmony export */ defaultPeerScoreThresholds: () => (/* reexport safe */ _peer_score_thresholds_js__WEBPACK_IMPORTED_MODULE_1__.defaultPeerScoreThresholds),\n/* harmony export */ defaultTopicScoreParams: () => (/* reexport safe */ _peer_score_params_js__WEBPACK_IMPORTED_MODULE_0__.defaultTopicScoreParams),\n/* harmony export */ validatePeerScoreParams: () => (/* reexport safe */ _peer_score_params_js__WEBPACK_IMPORTED_MODULE_0__.validatePeerScoreParams),\n/* harmony export */ validatePeerScoreThresholds: () => (/* reexport safe */ _peer_score_thresholds_js__WEBPACK_IMPORTED_MODULE_1__.validatePeerScoreThresholds),\n/* harmony export */ validateTopicScoreParams: () => (/* reexport safe */ _peer_score_params_js__WEBPACK_IMPORTED_MODULE_0__.validateTopicScoreParams)\n/* harmony export */ });\n/* harmony import */ var _peer_score_params_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./peer-score-params.js */ \"./node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/peer-score-params.js\");\n/* harmony import */ var _peer_score_thresholds_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./peer-score-thresholds.js */ \"./node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/peer-score-thresholds.js\");\n/* harmony import */ var _peer_score_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./peer-score.js */ \"./node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/peer-score.js\");\n\n\n\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/index.js?");
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/message-deliveries.js":
/*!***************************************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/message-deliveries.js ***!
\***************************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DeliveryRecordStatus: () => (/* binding */ DeliveryRecordStatus),\n/* harmony export */ MessageDeliveries: () => (/* binding */ MessageDeliveries)\n/* harmony export */ });\n/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants.js */ \"./node_modules/@chainsafe/libp2p-gossipsub/dist/src/constants.js\");\n/* harmony import */ var denque__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! denque */ \"./node_modules/denque/index.js\");\n\n\nvar DeliveryRecordStatus;\n(function (DeliveryRecordStatus) {\n /**\n * we don't know (yet) if the message is valid\n */\n DeliveryRecordStatus[DeliveryRecordStatus[\"unknown\"] = 0] = \"unknown\";\n /**\n * we know the message is valid\n */\n DeliveryRecordStatus[DeliveryRecordStatus[\"valid\"] = 1] = \"valid\";\n /**\n * we know the message is invalid\n */\n DeliveryRecordStatus[DeliveryRecordStatus[\"invalid\"] = 2] = \"invalid\";\n /**\n * we were instructed by the validator to ignore the message\n */\n DeliveryRecordStatus[DeliveryRecordStatus[\"ignored\"] = 3] = \"ignored\";\n})(DeliveryRecordStatus || (DeliveryRecordStatus = {}));\n/**\n * Map of canonical message ID to DeliveryRecord\n *\n * Maintains an internal queue for efficient gc of old messages\n */\nclass MessageDeliveries {\n constructor() {\n this.records = new Map();\n this.queue = new denque__WEBPACK_IMPORTED_MODULE_1__();\n }\n getRecord(msgIdStr) {\n return this.records.get(msgIdStr);\n }\n ensureRecord(msgIdStr) {\n let drec = this.records.get(msgIdStr);\n if (drec) {\n return drec;\n }\n // record doesn't exist yet\n // create record\n drec = {\n status: DeliveryRecordStatus.unknown,\n firstSeenTsMs: Date.now(),\n validated: 0,\n peers: new Set()\n };\n this.records.set(msgIdStr, drec);\n // and add msgId to the queue\n const entry = {\n msgId: msgIdStr,\n expire: Date.now() + _constants_js__WEBPACK_IMPORTED_MODULE_0__.TimeCacheDuration\n };\n this.queue.push(entry);\n return drec;\n }\n gc() {\n const now = Date.now();\n // queue is sorted by expiry time\n // remove expired messages, remove from queue until first un-expired message found\n let head = this.queue.peekFront();\n while (head && head.expire < now) {\n this.records.delete(head.msgId);\n this.queue.shift();\n head = this.queue.peekFront();\n }\n }\n clear() {\n this.records.clear();\n this.queue.clear();\n }\n}\n//# sourceMappingURL=message-deliveries.js.map\n\n//# sourceURL=webpack://light/./node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/message-deliveries.js?");
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/peer-score-params.js":
/*!**************************************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/peer-score-params.js ***!
\**************************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ createPeerScoreParams: () => (/* binding */ createPeerScoreParams),\n/* harmony export */ createTopicScoreParams: () => (/* binding */ createTopicScoreParams),\n/* harmony export */ defaultPeerScoreParams: () => (/* binding */ defaultPeerScoreParams),\n/* harmony export */ defaultTopicScoreParams: () => (/* binding */ defaultTopicScoreParams),\n/* harmony export */ validatePeerScoreParams: () => (/* binding */ validatePeerScoreParams),\n/* harmony export */ validateTopicScoreParams: () => (/* binding */ validateTopicScoreParams)\n/* harmony export */ });\n/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constants.js */ \"./node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/constants.js\");\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n\n\nconst defaultPeerScoreParams = {\n topics: {},\n topicScoreCap: 10.0,\n appSpecificScore: () => 0.0,\n appSpecificWeight: 10.0,\n IPColocationFactorWeight: -5.0,\n IPColocationFactorThreshold: 10.0,\n IPColocationFactorWhitelist: new Set(),\n behaviourPenaltyWeight: -10.0,\n behaviourPenaltyThreshold: 0.0,\n behaviourPenaltyDecay: 0.2,\n decayInterval: 1000.0,\n decayToZero: 0.1,\n retainScore: 3600 * 1000\n};\nconst defaultTopicScoreParams = {\n topicWeight: 0.5,\n timeInMeshWeight: 1,\n timeInMeshQuantum: 1,\n timeInMeshCap: 3600,\n firstMessageDeliveriesWeight: 1,\n firstMessageDeliveriesDecay: 0.5,\n firstMessageDeliveriesCap: 2000,\n meshMessageDeliveriesWeight: -1,\n meshMessageDeliveriesDecay: 0.5,\n meshMessageDeliveriesCap: 100,\n meshMessageDeliveriesThreshold: 20,\n meshMessageDeliveriesWindow: 10,\n meshMessageDeliveriesActivation: 5000,\n meshFailurePenaltyWeight: -1,\n meshFailurePenaltyDecay: 0.5,\n invalidMessageDeliveriesWeight: -1,\n invalidMessageDeliveriesDecay: 0.3\n};\nfunction createPeerScoreParams(p = {}) {\n return {\n ...defaultPeerScoreParams,\n ...p,\n topics: p.topics\n ? Object.entries(p.topics).reduce((topics, [topic, topicScoreParams]) => {\n topics[topic] = createTopicScoreParams(topicScoreParams);\n return topics;\n }, {})\n : {}\n };\n}\nfunction createTopicScoreParams(p = {}) {\n return {\n ...defaultTopicScoreParams,\n ...p\n };\n}\n// peer score parameter validation\nfunction validatePeerScoreParams(p) {\n for (const [topic, params] of Object.entries(p.topics)) {\n try {\n validateTopicScoreParams(params);\n }\n catch (e) {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_1__.CodeError(`invalid score parameters for topic ${topic}: ${e.message}`, _constants_js__WEBPACK_IMPORTED_MODULE_0__.ERR_INVALID_PEER_SCORE_PARAMS);\n }\n }\n // check that the topic score is 0 or something positive\n if (p.topicScoreCap < 0) {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_1__.CodeError('invalid topic score cap; must be positive (or 0 for no cap)', _constants_js__WEBPACK_IMPORTED_MODULE_0__.ERR_INVALID_PEER_SCORE_PARAMS);\n }\n // check that we have an app specific score; the weight can be anything (but expected positive)\n if (p.appSpecificScore === null || p.appSpecificScore === undefined) {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_1__.CodeError('missing application specific score function', _constants_js__WEBPACK_IMPORTED_MODULE_0__.ERR_INVALID_PEER_SCORE_PARAMS);\n }\n // check the IP colocation factor\n if (p.IPColocationFactorWeight > 0) {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_1__.CodeError('invalid IPColocationFactorWeight; must be negati
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/peer-score-thresholds.js":
/*!******************************************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/peer-score-thresholds.js ***!
\******************************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ createPeerScoreThresholds: () => (/* binding */ createPeerScoreThresholds),\n/* harmony export */ defaultPeerScoreThresholds: () => (/* binding */ defaultPeerScoreThresholds),\n/* harmony export */ validatePeerScoreThresholds: () => (/* binding */ validatePeerScoreThresholds)\n/* harmony export */ });\n/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constants.js */ \"./node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/constants.js\");\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n\n\nconst defaultPeerScoreThresholds = {\n gossipThreshold: -10,\n publishThreshold: -50,\n graylistThreshold: -80,\n acceptPXThreshold: 10,\n opportunisticGraftThreshold: 20\n};\nfunction createPeerScoreThresholds(p = {}) {\n return {\n ...defaultPeerScoreThresholds,\n ...p\n };\n}\nfunction validatePeerScoreThresholds(p) {\n if (p.gossipThreshold > 0) {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_1__.CodeError('invalid gossip threshold; it must be <= 0', _constants_js__WEBPACK_IMPORTED_MODULE_0__.ERR_INVALID_PEER_SCORE_THRESHOLDS);\n }\n if (p.publishThreshold > 0 || p.publishThreshold > p.gossipThreshold) {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_1__.CodeError('invalid publish threshold; it must be <= 0 and <= gossip threshold', _constants_js__WEBPACK_IMPORTED_MODULE_0__.ERR_INVALID_PEER_SCORE_THRESHOLDS);\n }\n if (p.graylistThreshold > 0 || p.graylistThreshold > p.publishThreshold) {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_1__.CodeError('invalid graylist threshold; it must be <= 0 and <= publish threshold', _constants_js__WEBPACK_IMPORTED_MODULE_0__.ERR_INVALID_PEER_SCORE_THRESHOLDS);\n }\n if (p.acceptPXThreshold < 0) {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_1__.CodeError('invalid accept PX threshold; it must be >= 0', _constants_js__WEBPACK_IMPORTED_MODULE_0__.ERR_INVALID_PEER_SCORE_THRESHOLDS);\n }\n if (p.opportunisticGraftThreshold < 0) {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_1__.CodeError('invalid opportunistic grafting threshold; it must be >= 0', _constants_js__WEBPACK_IMPORTED_MODULE_0__.ERR_INVALID_PEER_SCORE_THRESHOLDS);\n }\n}\n//# sourceMappingURL=peer-score-thresholds.js.map\n\n//# sourceURL=webpack://light/./node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/peer-score-thresholds.js?");
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/peer-score.js":
/*!*******************************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/peer-score.js ***!
\*******************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PeerScore: () => (/* binding */ PeerScore)\n/* harmony export */ });\n/* harmony import */ var _peer_score_params_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./peer-score-params.js */ \"./node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/peer-score-params.js\");\n/* harmony import */ var _compute_score_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./compute-score.js */ \"./node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/compute-score.js\");\n/* harmony import */ var _message_deliveries_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./message-deliveries.js */ \"./node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/message-deliveries.js\");\n/* harmony import */ var _libp2p_logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @libp2p/logger */ \"./node_modules/@libp2p/logger/dist/src/index.js\");\n/* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../types.js */ \"./node_modules/@chainsafe/libp2p-gossipsub/dist/src/types.js\");\n/* harmony import */ var _utils_set_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/set.js */ \"./node_modules/@chainsafe/libp2p-gossipsub/dist/src/utils/set.js\");\n\n\n\n\n\n\nconst log = (0,_libp2p_logger__WEBPACK_IMPORTED_MODULE_3__.logger)('libp2p:gossipsub:score');\nclass PeerScore {\n constructor(params, metrics, opts) {\n this.params = params;\n this.metrics = metrics;\n /**\n * Per-peer stats for score calculation\n */\n this.peerStats = new Map();\n /**\n * IP colocation tracking; maps IP => set of peers.\n */\n this.peerIPs = new _utils_set_js__WEBPACK_IMPORTED_MODULE_5__.MapDef(() => new Set());\n /**\n * Cache score up to decayInterval if topic stats are unchanged.\n */\n this.scoreCache = new Map();\n /**\n * Recent message delivery timing/participants\n */\n this.deliveryRecords = new _message_deliveries_js__WEBPACK_IMPORTED_MODULE_2__.MessageDeliveries();\n (0,_peer_score_params_js__WEBPACK_IMPORTED_MODULE_0__.validatePeerScoreParams)(params);\n this.scoreCacheValidityMs = opts.scoreCacheValidityMs;\n this.computeScore = opts.computeScore ?? _compute_score_js__WEBPACK_IMPORTED_MODULE_1__.computeScore;\n }\n get size() {\n return this.peerStats.size;\n }\n /**\n * Start PeerScore instance\n */\n start() {\n if (this._backgroundInterval) {\n log('Peer score already running');\n return;\n }\n this._backgroundInterval = setInterval(() => this.background(), this.params.decayInterval);\n log('started');\n }\n /**\n * Stop PeerScore instance\n */\n stop() {\n if (!this._backgroundInterval) {\n log('Peer score already stopped');\n return;\n }\n clearInterval(this._backgroundInterval);\n delete this._backgroundInterval;\n this.peerIPs.clear();\n this.peerStats.clear();\n this.deliveryRecords.clear();\n log('stopped');\n }\n /**\n * Periodic maintenance\n */\n background() {\n this.refreshScores();\n this.deliveryRecords.gc();\n }\n dumpPeerScoreStats() {\n return Object.fromEntries(Array.from(this.peerStats.entries()).map(([peer, stats]) => [peer, stats]));\n }\n messageFirstSeenTimestampMs(msgIdStr) {\n const drec = this.deliveryRecords.getRecord(msgIdStr);\n return drec ? drec.firstSeenTsMs : null;\n }\n /**\n * Decays scores, and purges score records for disconnected peers once their expiry has elapsed.\n */\n refreshScores() {\n const now = Date.now();\n const decayToZero = this.params.decayToZero;\n this.peerStats.forEach((pstats, id) => {\n if (!pstats.connected) {\n // has
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/scoreMetrics.js":
/*!*********************************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/scoreMetrics.js ***!
\*********************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ computeAllPeersScoreWeights: () => (/* binding */ computeAllPeersScoreWeights),\n/* harmony export */ computeScoreWeights: () => (/* binding */ computeScoreWeights)\n/* harmony export */ });\nfunction computeScoreWeights(peer, pstats, params, peerIPs, topicStrToLabel) {\n let score = 0;\n const byTopic = new Map();\n // topic stores\n Object.entries(pstats.topics).forEach(([topic, tstats]) => {\n // the topic parameters\n // Aggregate by known topicLabel or throw to 'unknown'. This prevent too high cardinality\n const topicLabel = topicStrToLabel.get(topic) ?? 'unknown';\n const topicParams = params.topics[topic];\n if (topicParams === undefined) {\n // we are not scoring this topic\n return;\n }\n let topicScores = byTopic.get(topicLabel);\n if (!topicScores) {\n topicScores = {\n p1w: 0,\n p2w: 0,\n p3w: 0,\n p3bw: 0,\n p4w: 0\n };\n byTopic.set(topicLabel, topicScores);\n }\n let p1w = 0;\n let p2w = 0;\n let p3w = 0;\n let p3bw = 0;\n let p4w = 0;\n // P1: time in Mesh\n if (tstats.inMesh) {\n const p1 = Math.max(tstats.meshTime / topicParams.timeInMeshQuantum, topicParams.timeInMeshCap);\n p1w += p1 * topicParams.timeInMeshWeight;\n }\n // P2: first message deliveries\n let p2 = tstats.firstMessageDeliveries;\n if (p2 > topicParams.firstMessageDeliveriesCap) {\n p2 = topicParams.firstMessageDeliveriesCap;\n }\n p2w += p2 * topicParams.firstMessageDeliveriesWeight;\n // P3: mesh message deliveries\n if (tstats.meshMessageDeliveriesActive &&\n tstats.meshMessageDeliveries < topicParams.meshMessageDeliveriesThreshold) {\n const deficit = topicParams.meshMessageDeliveriesThreshold - tstats.meshMessageDeliveries;\n const p3 = deficit * deficit;\n p3w += p3 * topicParams.meshMessageDeliveriesWeight;\n }\n // P3b:\n // NOTE: the weight of P3b is negative (validated in validateTopicScoreParams) so this detracts\n const p3b = tstats.meshFailurePenalty;\n p3bw += p3b * topicParams.meshFailurePenaltyWeight;\n // P4: invalid messages\n // NOTE: the weight of P4 is negative (validated in validateTopicScoreParams) so this detracts\n const p4 = tstats.invalidMessageDeliveries * tstats.invalidMessageDeliveries;\n p4w += p4 * topicParams.invalidMessageDeliveriesWeight;\n // update score, mixing with topic weight\n score += (p1w + p2w + p3w + p3bw + p4w) * topicParams.topicWeight;\n topicScores.p1w += p1w;\n topicScores.p2w += p2w;\n topicScores.p3w += p3w;\n topicScores.p3bw += p3bw;\n topicScores.p4w += p4w;\n });\n // apply the topic score cap, if any\n if (params.topicScoreCap > 0 && score > params.topicScoreCap) {\n score = params.topicScoreCap;\n // Proportionally apply cap to all individual contributions\n const capF = params.topicScoreCap / score;\n for (const ws of byTopic.values()) {\n ws.p1w *= capF;\n ws.p2w *= capF;\n ws.p3w *= capF;\n ws.p3bw *= capF;\n ws.p4w *= capF;\n }\n }\n let p5w = 0;\n let p6w = 0;\n let p7w = 0;\n // P5: application-specific score\n const p5 = params.appSpecificScore(peer);\n p5w += p5 * params.appSpecificWeight;\n // P6: IP colocation factor\n pstats.knownIPs.forEach((ip) => {\n if (params.IPColocationFactorWhitelist.has(ip)) {\n return;\n }\n // P6 has a cliff (IPColocationFactorThreshold)\n // It's only applied if at least that many peers are connected to us from that source IP addr.\n // It
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-gossipsub/dist/src/stream.js":
/*!*********************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-gossipsub/dist/src/stream.js ***!
\*********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ InboundStream: () => (/* binding */ InboundStream),\n/* harmony export */ OutboundStream: () => (/* binding */ OutboundStream)\n/* harmony export */ });\n/* harmony import */ var abortable_iterator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! abortable-iterator */ \"./node_modules/abortable-iterator/dist/src/index.js\");\n/* harmony import */ var it_pipe__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! it-pipe */ \"./node_modules/it-pipe/dist/src/index.js\");\n/* harmony import */ var it_pushable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! it-pushable */ \"./node_modules/it-pushable/dist/src/index.js\");\n/* harmony import */ var it_length_prefixed__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! it-length-prefixed */ \"./node_modules/it-length-prefixed/dist/src/index.js\");\n\n\n\n\nclass OutboundStream {\n constructor(rawStream, errCallback, opts) {\n this.rawStream = rawStream;\n this.pushable = (0,it_pushable__WEBPACK_IMPORTED_MODULE_2__.pushable)({ objectMode: false });\n this.closeController = new AbortController();\n this.maxBufferSize = opts.maxBufferSize ?? Infinity;\n (0,it_pipe__WEBPACK_IMPORTED_MODULE_1__.pipe)((0,abortable_iterator__WEBPACK_IMPORTED_MODULE_0__.abortableSource)(this.pushable, this.closeController.signal, { returnOnAbort: true }), (source) => (0,it_length_prefixed__WEBPACK_IMPORTED_MODULE_3__.encode)(source), this.rawStream).catch(errCallback);\n }\n get protocol() {\n // TODO remove this non-nullish assertion after https://github.com/libp2p/js-libp2p-interfaces/pull/265 is incorporated\n return this.rawStream.stat.protocol;\n }\n push(data) {\n if (this.pushable.readableLength > this.maxBufferSize) {\n throw Error(`OutboundStream buffer full, size > ${this.maxBufferSize}`);\n }\n this.pushable.push(data);\n }\n close() {\n this.closeController.abort();\n // similar to pushable.end() but clear the internal buffer\n this.pushable.return();\n this.rawStream.close();\n }\n}\nclass InboundStream {\n constructor(rawStream, opts = {}) {\n this.rawStream = rawStream;\n this.closeController = new AbortController();\n this.source = (0,abortable_iterator__WEBPACK_IMPORTED_MODULE_0__.abortableSource)((0,it_pipe__WEBPACK_IMPORTED_MODULE_1__.pipe)(this.rawStream, (source) => (0,it_length_prefixed__WEBPACK_IMPORTED_MODULE_3__.decode)(source, opts)), this.closeController.signal, {\n returnOnAbort: true\n });\n }\n close() {\n this.closeController.abort();\n this.rawStream.close();\n }\n}\n//# sourceMappingURL=stream.js.map\n\n//# sourceURL=webpack://light/./node_modules/@chainsafe/libp2p-gossipsub/dist/src/stream.js?");
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-gossipsub/dist/src/tracer.js":
/*!*********************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-gossipsub/dist/src/tracer.js ***!
\*********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ IWantTracer: () => (/* binding */ IWantTracer)\n/* harmony export */ });\n/* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./types.js */ \"./node_modules/@chainsafe/libp2p-gossipsub/dist/src/types.js\");\n\n/**\n * IWantTracer is an internal tracer that tracks IWANT requests in order to penalize\n * peers who don't follow up on IWANT requests after an IHAVE advertisement.\n * The tracking of promises is probabilistic to avoid using too much memory.\n *\n * Note: Do not confuse these 'promises' with JS Promise objects.\n * These 'promises' are merely expectations of a peer's behavior.\n */\nclass IWantTracer {\n constructor(gossipsubIWantFollowupMs, msgIdToStrFn, metrics) {\n this.gossipsubIWantFollowupMs = gossipsubIWantFollowupMs;\n this.msgIdToStrFn = msgIdToStrFn;\n this.metrics = metrics;\n /**\n * Promises to deliver a message\n * Map per message id, per peer, promise expiration time\n */\n this.promises = new Map();\n /**\n * First request time by msgId. Used for metrics to track expire times.\n * Necessary to know if peers are actually breaking promises or simply sending them a bit later\n */\n this.requestMsByMsg = new Map();\n this.requestMsByMsgExpire = 10 * gossipsubIWantFollowupMs;\n }\n get size() {\n return this.promises.size;\n }\n get requestMsByMsgSize() {\n return this.requestMsByMsg.size;\n }\n /**\n * Track a promise to deliver a message from a list of msgIds we are requesting\n */\n addPromise(from, msgIds) {\n // pick msgId randomly from the list\n const ix = Math.floor(Math.random() * msgIds.length);\n const msgId = msgIds[ix];\n const msgIdStr = this.msgIdToStrFn(msgId);\n let expireByPeer = this.promises.get(msgIdStr);\n if (!expireByPeer) {\n expireByPeer = new Map();\n this.promises.set(msgIdStr, expireByPeer);\n }\n const now = Date.now();\n // If a promise for this message id and peer already exists we don't update the expiry\n if (!expireByPeer.has(from)) {\n expireByPeer.set(from, now + this.gossipsubIWantFollowupMs);\n if (this.metrics) {\n this.metrics.iwantPromiseStarted.inc(1);\n if (!this.requestMsByMsg.has(msgIdStr)) {\n this.requestMsByMsg.set(msgIdStr, now);\n }\n }\n }\n }\n /**\n * Returns the number of broken promises for each peer who didn't follow up on an IWANT request.\n *\n * This should be called not too often relative to the expire times, since it iterates over the whole data.\n */\n getBrokenPromises() {\n const now = Date.now();\n const result = new Map();\n let brokenPromises = 0;\n this.promises.forEach((expireByPeer, msgId) => {\n expireByPeer.forEach((expire, p) => {\n // the promise has been broken\n if (expire < now) {\n // add 1 to result\n result.set(p, (result.get(p) ?? 0) + 1);\n // delete from tracked promises\n expireByPeer.delete(p);\n // for metrics\n brokenPromises++;\n }\n });\n // clean up empty promises for a msgId\n if (!expireByPeer.size) {\n this.promises.delete(msgId);\n }\n });\n this.metrics?.iwantPromiseBroken.inc(brokenPromises);\n return result;\n }\n /**\n * Someone delivered a message, stop tracking promises for it\n */\n deliverMessage(msgIdStr, isDuplicate = false) {\n this.trackMessage(msgIdStr);\n const expireByPeer = this.promises.get(msgIdStr);\n // Expired promise, check requestMsBy
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-gossipsub/dist/src/types.js":
/*!********************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-gossipsub/dist/src/types.js ***!
\********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ MessageStatus: () => (/* binding */ MessageStatus),\n/* harmony export */ PublishConfigType: () => (/* binding */ PublishConfigType),\n/* harmony export */ RejectReason: () => (/* binding */ RejectReason),\n/* harmony export */ SignaturePolicy: () => (/* binding */ SignaturePolicy),\n/* harmony export */ ValidateError: () => (/* binding */ ValidateError),\n/* harmony export */ rejectReasonFromAcceptance: () => (/* binding */ rejectReasonFromAcceptance)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interface_pubsub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interface-pubsub */ \"./node_modules/@libp2p/interface-pubsub/dist/src/index.js\");\n\nvar SignaturePolicy;\n(function (SignaturePolicy) {\n /**\n * On the producing side:\n * - Build messages with the signature, key (from may be enough for certain inlineable public key types), from and seqno fields.\n *\n * On the consuming side:\n * - Enforce the fields to be present, reject otherwise.\n * - Propagate only if the fields are valid and signature can be verified, reject otherwise.\n */\n SignaturePolicy[\"StrictSign\"] = \"StrictSign\";\n /**\n * On the producing side:\n * - Build messages without the signature, key, from and seqno fields.\n * - The corresponding protobuf key-value pairs are absent from the marshalled message, not just empty.\n *\n * On the consuming side:\n * - Enforce the fields to be absent, reject otherwise.\n * - Propagate only if the fields are absent, reject otherwise.\n * - A message_id function will not be able to use the above fields, and should instead rely on the data field. A commonplace strategy is to calculate a hash.\n */\n SignaturePolicy[\"StrictNoSign\"] = \"StrictNoSign\";\n})(SignaturePolicy || (SignaturePolicy = {}));\nvar PublishConfigType;\n(function (PublishConfigType) {\n PublishConfigType[PublishConfigType[\"Signing\"] = 0] = \"Signing\";\n PublishConfigType[PublishConfigType[\"Anonymous\"] = 1] = \"Anonymous\";\n})(PublishConfigType || (PublishConfigType = {}));\nvar RejectReason;\n(function (RejectReason) {\n /**\n * The message failed the configured validation during decoding.\n * SelfOrigin is considered a ValidationError\n */\n RejectReason[\"Error\"] = \"error\";\n /**\n * Custom validator fn reported status IGNORE.\n */\n RejectReason[\"Ignore\"] = \"ignore\";\n /**\n * Custom validator fn reported status REJECT.\n */\n RejectReason[\"Reject\"] = \"reject\";\n /**\n * The peer that sent the message OR the source from field is blacklisted.\n * Causes messages to be ignored, not penalized, neither do score record creation.\n */\n RejectReason[\"Blacklisted\"] = \"blacklisted\";\n})(RejectReason || (RejectReason = {}));\nvar ValidateError;\n(function (ValidateError) {\n /// The message has an invalid signature,\n ValidateError[\"InvalidSignature\"] = \"invalid_signature\";\n /// The sequence number was the incorrect size\n ValidateError[\"InvalidSeqno\"] = \"invalid_seqno\";\n /// The PeerId was invalid\n ValidateError[\"InvalidPeerId\"] = \"invalid_peerid\";\n /// Signature existed when validation has been sent to\n /// [`crate::behaviour::MessageAuthenticity::Anonymous`].\n ValidateError[\"SignaturePresent\"] = \"signature_present\";\n /// Sequence number existed when validation has been sent to\n /// [`crate::behaviour::MessageAuthenticity::Anonymous`].\n ValidateError[\"SeqnoPresent\"] = \"seqno_present\";\n /// Message source existed when validation has been sent to\n /// [`crate::behaviour::MessageAuthenticity::Anonymous`].\n ValidateError[\"FromPresent\"] = \"from_present\";\n /// The data transformation failed.\n ValidateError[\"TransformFailed\"] = \"transform_failed\";\n})(ValidateError || (ValidateError = {}));\nvar MessageStatus;\n(fun
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-gossipsub/dist/src/utils/buildRawMessage.js":
/*!************************************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-gossipsub/dist/src/utils/buildRawMessage.js ***!
\************************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ SignPrefix: () => (/* binding */ SignPrefix),\n/* harmony export */ buildRawMessage: () => (/* binding */ buildRawMessage),\n/* harmony export */ validateToRawMessage: () => (/* binding */ validateToRawMessage)\n/* harmony export */ });\n/* harmony import */ var uint8arrays_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! uint8arrays/concat */ \"./node_modules/uint8arrays/dist/src/concat.js\");\n/* harmony import */ var uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! uint8arrays/from-string */ \"./node_modules/uint8arrays/dist/src/from-string.js\");\n/* harmony import */ var _libp2p_crypto_keys__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @libp2p/crypto/keys */ \"./node_modules/@libp2p/crypto/dist/src/keys/index.js\");\n/* harmony import */ var _libp2p_crypto__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @libp2p/crypto */ \"./node_modules/@libp2p/crypto/dist/src/index.js\");\n/* harmony import */ var _libp2p_peer_id__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @libp2p/peer-id */ \"./node_modules/@libp2p/peer-id/dist/src/index.js\");\n/* harmony import */ var uint8arrays_equals__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! uint8arrays/equals */ \"./node_modules/uint8arrays/dist/src/equals.js\");\n/* harmony import */ var _message_rpc_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../message/rpc.js */ \"./node_modules/@chainsafe/libp2p-gossipsub/dist/src/message/rpc.js\");\n/* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../types.js */ \"./node_modules/@chainsafe/libp2p-gossipsub/dist/src/types.js\");\n/* harmony import */ var _libp2p_interface_pubsub__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @libp2p/interface-pubsub */ \"./node_modules/@libp2p/interface-pubsub/dist/src/index.js\");\n/* harmony import */ var uint8arrays_to_string__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! uint8arrays/to-string */ \"./node_modules/uint8arrays/dist/src/to-string.js\");\n\n\n\n\n\n\n\n\n\n\nconst SignPrefix = (0,uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_1__.fromString)('libp2p-pubsub:');\nasync function buildRawMessage(publishConfig, topic, originalData, transformedData) {\n switch (publishConfig.type) {\n case _types_js__WEBPACK_IMPORTED_MODULE_7__.PublishConfigType.Signing: {\n const rpcMsg = {\n from: publishConfig.author.toBytes(),\n data: transformedData,\n seqno: (0,_libp2p_crypto__WEBPACK_IMPORTED_MODULE_3__.randomBytes)(8),\n topic,\n signature: undefined,\n key: undefined // Exclude key field for signing\n };\n // Get the message in bytes, and prepend with the pubsub prefix\n // the signature is over the bytes \"libp2p-pubsub:<protobuf-message>\"\n const bytes = (0,uint8arrays_concat__WEBPACK_IMPORTED_MODULE_0__.concat)([SignPrefix, _message_rpc_js__WEBPACK_IMPORTED_MODULE_6__.RPC.Message.encode(rpcMsg).finish()]);\n rpcMsg.signature = await publishConfig.privateKey.sign(bytes);\n rpcMsg.key = publishConfig.key;\n const msg = {\n type: 'signed',\n from: publishConfig.author,\n data: originalData,\n sequenceNumber: BigInt(`0x${(0,uint8arrays_to_string__WEBPACK_IMPORTED_MODULE_9__.toString)(rpcMsg.seqno, 'base16')}`),\n topic,\n signature: rpcMsg.signature,\n key: rpcMsg.key\n };\n return {\n raw: rpcMsg,\n msg: msg\n };\n }\n case _types_js__WEBPACK_IMPORTED_MODULE_7__.PublishConfigType.Anonymous: {\n return {\n raw: {\n from: undefined,\n data: transformedData,\n seqno: undefined,\n
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-gossipsub/dist/src/utils/index.js":
/*!**************************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-gossipsub/dist/src/utils/index.js ***!
\**************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ getPublishConfigFromPeerId: () => (/* reexport safe */ _publishConfig_js__WEBPACK_IMPORTED_MODULE_2__.getPublishConfigFromPeerId),\n/* harmony export */ messageIdToString: () => (/* reexport safe */ _messageIdToString_js__WEBPACK_IMPORTED_MODULE_1__.messageIdToString),\n/* harmony export */ shuffle: () => (/* reexport safe */ _shuffle_js__WEBPACK_IMPORTED_MODULE_0__.shuffle)\n/* harmony export */ });\n/* harmony import */ var _shuffle_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./shuffle.js */ \"./node_modules/@chainsafe/libp2p-gossipsub/dist/src/utils/shuffle.js\");\n/* harmony import */ var _messageIdToString_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./messageIdToString.js */ \"./node_modules/@chainsafe/libp2p-gossipsub/dist/src/utils/messageIdToString.js\");\n/* harmony import */ var _publishConfig_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./publishConfig.js */ \"./node_modules/@chainsafe/libp2p-gossipsub/dist/src/utils/publishConfig.js\");\n\n\n\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/@chainsafe/libp2p-gossipsub/dist/src/utils/index.js?");
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-gossipsub/dist/src/utils/messageIdToString.js":
/*!**************************************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-gossipsub/dist/src/utils/messageIdToString.js ***!
\**************************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ messageIdToString: () => (/* binding */ messageIdToString)\n/* harmony export */ });\n/* harmony import */ var uint8arrays_to_string__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! uint8arrays/to-string */ \"./node_modules/uint8arrays/dist/src/to-string.js\");\n\n/**\n * Browser friendly function to convert Uint8Array message id to base64 string.\n */\nfunction messageIdToString(msgId) {\n return (0,uint8arrays_to_string__WEBPACK_IMPORTED_MODULE_0__.toString)(msgId, 'base64');\n}\n//# sourceMappingURL=messageIdToString.js.map\n\n//# sourceURL=webpack://light/./node_modules/@chainsafe/libp2p-gossipsub/dist/src/utils/messageIdToString.js?");
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-gossipsub/dist/src/utils/msgIdFn.js":
/*!****************************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-gossipsub/dist/src/utils/msgIdFn.js ***!
\****************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ msgIdFnStrictNoSign: () => (/* binding */ msgIdFnStrictNoSign),\n/* harmony export */ msgIdFnStrictSign: () => (/* binding */ msgIdFnStrictSign)\n/* harmony export */ });\n/* harmony import */ var multiformats_hashes_sha2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! multiformats/hashes/sha2 */ \"./node_modules/multiformats/src/hashes/sha2-browser.js\");\n/* harmony import */ var _libp2p_pubsub_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/pubsub/utils */ \"./node_modules/@libp2p/pubsub/dist/src/utils.js\");\n\n\n/**\n * Generate a message id, based on the `key` and `seqno`\n */\nfunction msgIdFnStrictSign(msg) {\n if (msg.type !== 'signed') {\n throw new Error('expected signed message type');\n }\n // Should never happen\n if (msg.sequenceNumber == null)\n throw Error('missing seqno field');\n // TODO: Should use .from here or key?\n return (0,_libp2p_pubsub_utils__WEBPACK_IMPORTED_MODULE_1__.msgId)(msg.from.toBytes(), msg.sequenceNumber);\n}\n/**\n * Generate a message id, based on message `data`\n */\nasync function msgIdFnStrictNoSign(msg) {\n return await multiformats_hashes_sha2__WEBPACK_IMPORTED_MODULE_0__.sha256.encode(msg.data);\n}\n//# sourceMappingURL=msgIdFn.js.map\n\n//# sourceURL=webpack://light/./node_modules/@chainsafe/libp2p-gossipsub/dist/src/utils/msgIdFn.js?");
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-gossipsub/dist/src/utils/multiaddr.js":
/*!******************************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-gossipsub/dist/src/utils/multiaddr.js ***!
\******************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ multiaddrToIPStr: () => (/* binding */ multiaddrToIPStr)\n/* harmony export */ });\n/* harmony import */ var _multiformats_multiaddr_convert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @multiformats/multiaddr/convert */ \"./node_modules/@multiformats/multiaddr/dist/src/convert.js\");\n\n// Protocols https://github.com/multiformats/multiaddr/blob/master/protocols.csv\n// code size name\n// 4 32 ip4\n// 41 128 ip6\nvar Protocol;\n(function (Protocol) {\n Protocol[Protocol[\"ip4\"] = 4] = \"ip4\";\n Protocol[Protocol[\"ip6\"] = 41] = \"ip6\";\n})(Protocol || (Protocol = {}));\nfunction multiaddrToIPStr(multiaddr) {\n for (const tuple of multiaddr.tuples()) {\n switch (tuple[0]) {\n case Protocol.ip4:\n case Protocol.ip6:\n return (0,_multiformats_multiaddr_convert__WEBPACK_IMPORTED_MODULE_0__.convertToString)(tuple[0], tuple[1]);\n }\n }\n return null;\n}\n//# sourceMappingURL=multiaddr.js.map\n\n//# sourceURL=webpack://light/./node_modules/@chainsafe/libp2p-gossipsub/dist/src/utils/multiaddr.js?");
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-gossipsub/dist/src/utils/publishConfig.js":
/*!**********************************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-gossipsub/dist/src/utils/publishConfig.js ***!
\**********************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ getPublishConfigFromPeerId: () => (/* binding */ getPublishConfigFromPeerId)\n/* harmony export */ });\n/* harmony import */ var _libp2p_crypto_keys__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/crypto/keys */ \"./node_modules/@libp2p/crypto/dist/src/keys/index.js\");\n/* harmony import */ var _libp2p_interface_pubsub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/interface-pubsub */ \"./node_modules/@libp2p/interface-pubsub/dist/src/index.js\");\n/* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../types.js */ \"./node_modules/@chainsafe/libp2p-gossipsub/dist/src/types.js\");\n\n\n\n/**\n * Prepare a PublishConfig object from a PeerId.\n */\nasync function getPublishConfigFromPeerId(signaturePolicy, peerId) {\n switch (signaturePolicy) {\n case _libp2p_interface_pubsub__WEBPACK_IMPORTED_MODULE_1__.StrictSign: {\n if (!peerId) {\n throw Error('Must provide PeerId');\n }\n if (peerId.privateKey == null) {\n throw Error('Cannot sign message, no private key present');\n }\n if (peerId.publicKey == null) {\n throw Error('Cannot sign message, no public key present');\n }\n // Transform privateKey once at initialization time instead of once per message\n const privateKey = await (0,_libp2p_crypto_keys__WEBPACK_IMPORTED_MODULE_0__.unmarshalPrivateKey)(peerId.privateKey);\n return {\n type: _types_js__WEBPACK_IMPORTED_MODULE_2__.PublishConfigType.Signing,\n author: peerId,\n key: peerId.publicKey,\n privateKey\n };\n }\n case _libp2p_interface_pubsub__WEBPACK_IMPORTED_MODULE_1__.StrictNoSign:\n return {\n type: _types_js__WEBPACK_IMPORTED_MODULE_2__.PublishConfigType.Anonymous\n };\n default:\n throw new Error(`Unknown signature policy \"${signaturePolicy}\"`);\n }\n}\n//# sourceMappingURL=publishConfig.js.map\n\n//# sourceURL=webpack://light/./node_modules/@chainsafe/libp2p-gossipsub/dist/src/utils/publishConfig.js?");
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-gossipsub/dist/src/utils/set.js":
/*!************************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-gossipsub/dist/src/utils/set.js ***!
\************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ MapDef: () => (/* binding */ MapDef),\n/* harmony export */ removeFirstNItemsFromSet: () => (/* binding */ removeFirstNItemsFromSet),\n/* harmony export */ removeItemsFromSet: () => (/* binding */ removeItemsFromSet)\n/* harmony export */ });\n/**\n * Exclude up to `ineed` items from a set if item meets condition `cond`\n */\nfunction removeItemsFromSet(superSet, ineed, cond = () => true) {\n const subset = new Set();\n if (ineed <= 0)\n return subset;\n for (const id of superSet) {\n if (subset.size >= ineed)\n break;\n if (cond(id)) {\n subset.add(id);\n superSet.delete(id);\n }\n }\n return subset;\n}\n/**\n * Exclude up to `ineed` items from a set\n */\nfunction removeFirstNItemsFromSet(superSet, ineed) {\n return removeItemsFromSet(superSet, ineed, () => true);\n}\nclass MapDef extends Map {\n constructor(getDefault) {\n super();\n this.getDefault = getDefault;\n }\n getOrDefault(key) {\n let value = super.get(key);\n if (value === undefined) {\n value = this.getDefault();\n this.set(key, value);\n }\n return value;\n }\n}\n//# sourceMappingURL=set.js.map\n\n//# sourceURL=webpack://light/./node_modules/@chainsafe/libp2p-gossipsub/dist/src/utils/set.js?");
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-gossipsub/dist/src/utils/shuffle.js":
/*!****************************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-gossipsub/dist/src/utils/shuffle.js ***!
\****************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ shuffle: () => (/* binding */ shuffle)\n/* harmony export */ });\n/**\n * Pseudo-randomly shuffles an array\n *\n * Mutates the input array\n */\nfunction shuffle(arr) {\n if (arr.length <= 1) {\n return arr;\n }\n const randInt = () => {\n return Math.floor(Math.random() * Math.floor(arr.length));\n };\n for (let i = 0; i < arr.length; i++) {\n const j = randInt();\n const tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n }\n return arr;\n}\n//# sourceMappingURL=shuffle.js.map\n\n//# sourceURL=webpack://light/./node_modules/@chainsafe/libp2p-gossipsub/dist/src/utils/shuffle.js?");
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-gossipsub/dist/src/utils/time-cache.js":
/*!*******************************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-gossipsub/dist/src/utils/time-cache.js ***!
\*******************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ SimpleTimeCache: () => (/* binding */ SimpleTimeCache)\n/* harmony export */ });\n/**\n * This is similar to https://github.com/daviddias/time-cache/blob/master/src/index.js\n * for our own need, we don't use lodash throttle to improve performance.\n * This gives 4x - 5x performance gain compared to npm TimeCache\n */\nclass SimpleTimeCache {\n constructor(opts) {\n this.entries = new Map();\n this.validityMs = opts.validityMs;\n // allow negative validityMs so that this does not cache anything, spec test compliance.spec.js\n // sends duplicate messages and expect peer to receive all. Application likely uses positive validityMs\n }\n get size() {\n return this.entries.size;\n }\n /** Returns true if there was a key collision and the entry is dropped */\n put(key, value) {\n if (this.entries.has(key)) {\n // Key collisions break insertion order in the entries cache, which break prune logic.\n // prune relies on each iterated entry to have strictly ascending validUntilMs, else it\n // won't prune expired entries and SimpleTimeCache will grow unexpectedly.\n // As of Oct 2022 NodeJS v16, inserting the same key twice with different value does not\n // change the key position in the iterator stream. A unit test asserts this behaviour.\n return true;\n }\n this.entries.set(key, { value, validUntilMs: Date.now() + this.validityMs });\n return false;\n }\n prune() {\n const now = Date.now();\n for (const [k, v] of this.entries.entries()) {\n if (v.validUntilMs < now) {\n this.entries.delete(k);\n }\n else {\n // Entries are inserted with strictly ascending validUntilMs.\n // Stop early to save iterations\n break;\n }\n }\n }\n has(key) {\n return this.entries.has(key);\n }\n get(key) {\n const value = this.entries.get(key);\n return value && value.validUntilMs >= Date.now() ? value.value : undefined;\n }\n clear() {\n this.entries.clear();\n }\n}\n//# sourceMappingURL=time-cache.js.map\n\n//# sourceURL=webpack://light/./node_modules/@chainsafe/libp2p-gossipsub/dist/src/utils/time-cache.js?");
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-noise/dist/src/constants.js":
/*!********************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-noise/dist/src/constants.js ***!
\********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DUMP_SESSION_KEYS: () => (/* binding */ DUMP_SESSION_KEYS),\n/* harmony export */ NOISE_MSG_MAX_LENGTH_BYTES: () => (/* binding */ NOISE_MSG_MAX_LENGTH_BYTES),\n/* harmony export */ NOISE_MSG_MAX_LENGTH_BYTES_WITHOUT_TAG: () => (/* binding */ NOISE_MSG_MAX_LENGTH_BYTES_WITHOUT_TAG)\n/* harmony export */ });\nconst NOISE_MSG_MAX_LENGTH_BYTES = 65535;\nconst NOISE_MSG_MAX_LENGTH_BYTES_WITHOUT_TAG = NOISE_MSG_MAX_LENGTH_BYTES - 16;\nconst DUMP_SESSION_KEYS = Boolean(globalThis.process?.env?.DUMP_SESSION_KEYS);\n//# sourceMappingURL=constants.js.map\n\n//# sourceURL=webpack://light/./node_modules/@chainsafe/libp2p-noise/dist/src/constants.js?");
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-noise/dist/src/crypto/js.js":
/*!********************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-noise/dist/src/crypto/js.js ***!
\********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ pureJsCrypto: () => (/* binding */ pureJsCrypto)\n/* harmony export */ });\n/* harmony import */ var _noble_ciphers_chacha__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @noble/ciphers/chacha */ \"./node_modules/@noble/ciphers/esm/chacha.js\");\n/* harmony import */ var _noble_curves_ed25519__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @noble/curves/ed25519 */ \"./node_modules/@noble/curves/esm/ed25519.js\");\n/* harmony import */ var _noble_hashes_hkdf__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @noble/hashes/hkdf */ \"./node_modules/@noble/hashes/esm/hkdf.js\");\n/* harmony import */ var _noble_hashes_sha256__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @noble/hashes/sha256 */ \"./node_modules/@noble/hashes/esm/sha256.js\");\n\n\n\n\nconst pureJsCrypto = {\n hashSHA256(data) {\n return (0,_noble_hashes_sha256__WEBPACK_IMPORTED_MODULE_3__.sha256)(data);\n },\n getHKDF(ck, ikm) {\n const prk = (0,_noble_hashes_hkdf__WEBPACK_IMPORTED_MODULE_2__.extract)(_noble_hashes_sha256__WEBPACK_IMPORTED_MODULE_3__.sha256, ikm, ck);\n const okmU8Array = (0,_noble_hashes_hkdf__WEBPACK_IMPORTED_MODULE_2__.expand)(_noble_hashes_sha256__WEBPACK_IMPORTED_MODULE_3__.sha256, prk, undefined, 96);\n const okm = okmU8Array;\n const k1 = okm.subarray(0, 32);\n const k2 = okm.subarray(32, 64);\n const k3 = okm.subarray(64, 96);\n return [k1, k2, k3];\n },\n generateX25519KeyPair() {\n const secretKey = _noble_curves_ed25519__WEBPACK_IMPORTED_MODULE_1__.x25519.utils.randomPrivateKey();\n const publicKey = _noble_curves_ed25519__WEBPACK_IMPORTED_MODULE_1__.x25519.getPublicKey(secretKey);\n return {\n publicKey,\n privateKey: secretKey\n };\n },\n generateX25519KeyPairFromSeed(seed) {\n const publicKey = _noble_curves_ed25519__WEBPACK_IMPORTED_MODULE_1__.x25519.getPublicKey(seed);\n return {\n publicKey,\n privateKey: seed\n };\n },\n generateX25519SharedKey(privateKey, publicKey) {\n return _noble_curves_ed25519__WEBPACK_IMPORTED_MODULE_1__.x25519.getSharedSecret(privateKey, publicKey);\n },\n chaCha20Poly1305Encrypt(plaintext, nonce, ad, k) {\n return (0,_noble_ciphers_chacha__WEBPACK_IMPORTED_MODULE_0__.chacha20_poly1305)(k, nonce, ad).encrypt(plaintext);\n },\n chaCha20Poly1305Decrypt(ciphertext, nonce, ad, k, dst) {\n const result = (0,_noble_ciphers_chacha__WEBPACK_IMPORTED_MODULE_0__.chacha20_poly1305)(k, nonce, ad).decrypt(ciphertext);\n if (dst) {\n dst.set(result);\n return result;\n }\n return result;\n }\n};\n//# sourceMappingURL=js.js.map\n\n//# sourceURL=webpack://light/./node_modules/@chainsafe/libp2p-noise/dist/src/crypto/js.js?");
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-noise/dist/src/crypto/streaming.js":
/*!***************************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-noise/dist/src/crypto/streaming.js ***!
\***************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ decryptStream: () => (/* binding */ decryptStream),\n/* harmony export */ encryptStream: () => (/* binding */ encryptStream)\n/* harmony export */ });\n/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants.js */ \"./node_modules/@chainsafe/libp2p-noise/dist/src/constants.js\");\n/* harmony import */ var _encoder_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../encoder.js */ \"./node_modules/@chainsafe/libp2p-noise/dist/src/encoder.js\");\n\n\nconst CHACHA_TAG_LENGTH = 16;\n// Returns generator that encrypts payload from the user\nfunction encryptStream(handshake, metrics) {\n return async function* (source) {\n for await (const chunk of source) {\n for (let i = 0; i < chunk.length; i += _constants_js__WEBPACK_IMPORTED_MODULE_0__.NOISE_MSG_MAX_LENGTH_BYTES_WITHOUT_TAG) {\n let end = i + _constants_js__WEBPACK_IMPORTED_MODULE_0__.NOISE_MSG_MAX_LENGTH_BYTES_WITHOUT_TAG;\n if (end > chunk.length) {\n end = chunk.length;\n }\n const data = handshake.encrypt(chunk.subarray(i, end), handshake.session);\n metrics?.encryptedPackets.increment();\n yield (0,_encoder_js__WEBPACK_IMPORTED_MODULE_1__.uint16BEEncode)(data.byteLength);\n yield data;\n }\n }\n };\n}\n// Decrypt received payload to the user\nfunction decryptStream(handshake, metrics) {\n return async function* (source) {\n for await (const chunk of source) {\n for (let i = 0; i < chunk.length; i += _constants_js__WEBPACK_IMPORTED_MODULE_0__.NOISE_MSG_MAX_LENGTH_BYTES) {\n let end = i + _constants_js__WEBPACK_IMPORTED_MODULE_0__.NOISE_MSG_MAX_LENGTH_BYTES;\n if (end > chunk.length) {\n end = chunk.length;\n }\n if (end - CHACHA_TAG_LENGTH < i) {\n throw new Error('Invalid chunk');\n }\n const encrypted = chunk.subarray(i, end);\n // memory allocation is not cheap so reuse the encrypted Uint8Array\n // see https://github.com/ChainSafe/js-libp2p-noise/pull/242#issue-1422126164\n // this is ok because chacha20 reads bytes one by one and don't reread after that\n // it's also tested in https://github.com/ChainSafe/as-chacha20poly1305/pull/1/files#diff-25252846b58979dcaf4e41d47b3eadd7e4f335e7fb98da6c049b1f9cd011f381R48\n const dst = chunk.subarray(i, end - CHACHA_TAG_LENGTH);\n const { plaintext: decrypted, valid } = handshake.decrypt(encrypted, handshake.session, dst);\n if (!valid) {\n metrics?.decryptErrors.increment();\n throw new Error('Failed to validate decrypted chunk');\n }\n metrics?.decryptedPackets.increment();\n yield decrypted;\n }\n }\n };\n}\n//# sourceMappingURL=streaming.js.map\n\n//# sourceURL=webpack://light/./node_modules/@chainsafe/libp2p-noise/dist/src/crypto/streaming.js?");
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-noise/dist/src/encoder.js":
/*!******************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-noise/dist/src/encoder.js ***!
\******************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ decode0: () => (/* binding */ decode0),\n/* harmony export */ decode1: () => (/* binding */ decode1),\n/* harmony export */ decode2: () => (/* binding */ decode2),\n/* harmony export */ encode0: () => (/* binding */ encode0),\n/* harmony export */ encode1: () => (/* binding */ encode1),\n/* harmony export */ encode2: () => (/* binding */ encode2),\n/* harmony export */ uint16BEDecode: () => (/* binding */ uint16BEDecode),\n/* harmony export */ uint16BEEncode: () => (/* binding */ uint16BEEncode)\n/* harmony export */ });\n/* harmony import */ var uint8arrays_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! uint8arrays/concat */ \"./node_modules/uint8arrays/dist/src/concat.js\");\n\nconst allocUnsafe = (len) => {\n if (globalThis.Buffer) {\n return globalThis.Buffer.allocUnsafe(len);\n }\n return new Uint8Array(len);\n};\nconst uint16BEEncode = (value) => {\n const target = allocUnsafe(2);\n new DataView(target.buffer, target.byteOffset, target.byteLength).setUint16(0, value, false);\n return target;\n};\nuint16BEEncode.bytes = 2;\nconst uint16BEDecode = (data) => {\n if (data.length < 2)\n throw RangeError('Could not decode int16BE');\n if (data instanceof Uint8Array) {\n return new DataView(data.buffer, data.byteOffset, data.byteLength).getUint16(0, false);\n }\n return data.getUint16(0);\n};\nuint16BEDecode.bytes = 2;\n// Note: IK and XX encoder usage is opposite (XX uses in stages encode0 where IK uses encode1)\nfunction encode0(message) {\n return (0,uint8arrays_concat__WEBPACK_IMPORTED_MODULE_0__.concat)([message.ne, message.ciphertext], message.ne.length + message.ciphertext.length);\n}\nfunction encode1(message) {\n return (0,uint8arrays_concat__WEBPACK_IMPORTED_MODULE_0__.concat)([message.ne, message.ns, message.ciphertext], message.ne.length + message.ns.length + message.ciphertext.length);\n}\nfunction encode2(message) {\n return (0,uint8arrays_concat__WEBPACK_IMPORTED_MODULE_0__.concat)([message.ns, message.ciphertext], message.ns.length + message.ciphertext.length);\n}\nfunction decode0(input) {\n if (input.length < 32) {\n throw new Error('Cannot decode stage 0 MessageBuffer: length less than 32 bytes.');\n }\n return {\n ne: input.subarray(0, 32),\n ciphertext: input.subarray(32, input.length),\n ns: new Uint8Array(0)\n };\n}\nfunction decode1(input) {\n if (input.length < 80) {\n throw new Error('Cannot decode stage 1 MessageBuffer: length less than 80 bytes.');\n }\n return {\n ne: input.subarray(0, 32),\n ns: input.subarray(32, 80),\n ciphertext: input.subarray(80, input.length)\n };\n}\nfunction decode2(input) {\n if (input.length < 48) {\n throw new Error('Cannot decode stage 2 MessageBuffer: length less than 48 bytes.');\n }\n return {\n ne: new Uint8Array(0),\n ns: input.subarray(0, 48),\n ciphertext: input.subarray(48, input.length)\n };\n}\n//# sourceMappingURL=encoder.js.map\n\n//# sourceURL=webpack://light/./node_modules/@chainsafe/libp2p-noise/dist/src/encoder.js?");
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-noise/dist/src/handshake-xx.js":
/*!***********************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-noise/dist/src/handshake-xx.js ***!
\***********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ XXHandshake: () => (/* binding */ XXHandshake)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interface_connection_encrypter_errors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interface-connection-encrypter/errors */ \"./node_modules/@libp2p/interface-connection-encrypter/dist/src/errors.js\");\n/* harmony import */ var _encoder_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./encoder.js */ \"./node_modules/@chainsafe/libp2p-noise/dist/src/encoder.js\");\n/* harmony import */ var _handshakes_xx_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./handshakes/xx.js */ \"./node_modules/@chainsafe/libp2p-noise/dist/src/handshakes/xx.js\");\n/* harmony import */ var _logger_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./logger.js */ \"./node_modules/@chainsafe/libp2p-noise/dist/src/logger.js\");\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils.js */ \"./node_modules/@chainsafe/libp2p-noise/dist/src/utils.js\");\n\n\n\n\n\nclass XXHandshake {\n isInitiator;\n session;\n remotePeer;\n remoteExtensions = { webtransportCerthashes: [] };\n payload;\n connection;\n xx;\n staticKeypair;\n prologue;\n constructor(isInitiator, payload, prologue, crypto, staticKeypair, connection, remotePeer, handshake) {\n this.isInitiator = isInitiator;\n this.payload = payload;\n this.prologue = prologue;\n this.staticKeypair = staticKeypair;\n this.connection = connection;\n if (remotePeer) {\n this.remotePeer = remotePeer;\n }\n this.xx = handshake ?? new _handshakes_xx_js__WEBPACK_IMPORTED_MODULE_2__.XX(crypto);\n this.session = this.xx.initSession(this.isInitiator, this.prologue, this.staticKeypair);\n }\n // stage 0\n async propose() {\n (0,_logger_js__WEBPACK_IMPORTED_MODULE_3__.logLocalStaticKeys)(this.session.hs.s);\n if (this.isInitiator) {\n _logger_js__WEBPACK_IMPORTED_MODULE_3__.logger.trace('Stage 0 - Initiator starting to send first message.');\n const messageBuffer = this.xx.sendMessage(this.session, new Uint8Array(0));\n this.connection.writeLP((0,_encoder_js__WEBPACK_IMPORTED_MODULE_1__.encode0)(messageBuffer));\n _logger_js__WEBPACK_IMPORTED_MODULE_3__.logger.trace('Stage 0 - Initiator finished sending first message.');\n (0,_logger_js__WEBPACK_IMPORTED_MODULE_3__.logLocalEphemeralKeys)(this.session.hs.e);\n }\n else {\n _logger_js__WEBPACK_IMPORTED_MODULE_3__.logger.trace('Stage 0 - Responder waiting to receive first message...');\n const receivedMessageBuffer = (0,_encoder_js__WEBPACK_IMPORTED_MODULE_1__.decode0)((await this.connection.readLP()).subarray());\n const { valid } = this.xx.recvMessage(this.session, receivedMessageBuffer);\n if (!valid) {\n throw new _libp2p_interface_connection_encrypter_errors__WEBPACK_IMPORTED_MODULE_0__.InvalidCryptoExchangeError('xx handshake stage 0 validation fail');\n }\n _logger_js__WEBPACK_IMPORTED_MODULE_3__.logger.trace('Stage 0 - Responder received first message.');\n (0,_logger_js__WEBPACK_IMPORTED_MODULE_3__.logRemoteEphemeralKey)(this.session.hs.re);\n }\n }\n // stage 1\n async exchange() {\n if (this.isInitiator) {\n _logger_js__WEBPACK_IMPORTED_MODULE_3__.logger.trace('Stage 1 - Initiator waiting to receive first message from responder...');\n const receivedMessageBuffer = (0,_encoder_js__WEBPACK_IMPORTED_MODULE_1__.decode1)((await this.connection.readLP()).subarray());\n const { plaintext, valid } = this.xx.recvMessage(this.session, receivedMessageBuffer);\n if (!valid) {\n throw new _libp2p_interface_connection_encrypter_errors__WEBPACK_IMPORTED_MODULE_0__.InvalidCryp
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-noise/dist/src/handshakes/abstract-handshake.js":
/*!****************************************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-noise/dist/src/handshakes/abstract-handshake.js ***!
\****************************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AbstractHandshake: () => (/* binding */ AbstractHandshake)\n/* harmony export */ });\n/* harmony import */ var uint8arrays__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! uint8arrays */ \"./node_modules/uint8arrays/dist/src/index.js\");\n/* harmony import */ var uint8arrays_concat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! uint8arrays/concat */ \"./node_modules/uint8arrays/dist/src/concat.js\");\n/* harmony import */ var uint8arrays_equals__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! uint8arrays/equals */ \"./node_modules/uint8arrays/dist/src/equals.js\");\n/* harmony import */ var _logger_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../logger.js */ \"./node_modules/@chainsafe/libp2p-noise/dist/src/logger.js\");\n/* harmony import */ var _nonce_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../nonce.js */ \"./node_modules/@chainsafe/libp2p-noise/dist/src/nonce.js\");\n\n\n\n\n\nclass AbstractHandshake {\n crypto;\n constructor(crypto) {\n this.crypto = crypto;\n }\n encryptWithAd(cs, ad, plaintext) {\n const e = this.encrypt(cs.k, cs.n, ad, plaintext);\n cs.n.increment();\n return e;\n }\n decryptWithAd(cs, ad, ciphertext, dst) {\n const { plaintext, valid } = this.decrypt(cs.k, cs.n, ad, ciphertext, dst);\n if (valid)\n cs.n.increment();\n return { plaintext, valid };\n }\n // Cipher state related\n hasKey(cs) {\n return !this.isEmptyKey(cs.k);\n }\n createEmptyKey() {\n return new Uint8Array(32);\n }\n isEmptyKey(k) {\n const emptyKey = this.createEmptyKey();\n return (0,uint8arrays_equals__WEBPACK_IMPORTED_MODULE_2__.equals)(emptyKey, k);\n }\n encrypt(k, n, ad, plaintext) {\n n.assertValue();\n return this.crypto.chaCha20Poly1305Encrypt(plaintext, n.getBytes(), ad, k);\n }\n encryptAndHash(ss, plaintext) {\n let ciphertext;\n if (this.hasKey(ss.cs)) {\n ciphertext = this.encryptWithAd(ss.cs, ss.h, plaintext);\n }\n else {\n ciphertext = plaintext;\n }\n this.mixHash(ss, ciphertext);\n return ciphertext;\n }\n decrypt(k, n, ad, ciphertext, dst) {\n n.assertValue();\n const encryptedMessage = this.crypto.chaCha20Poly1305Decrypt(ciphertext, n.getBytes(), ad, k, dst);\n if (encryptedMessage) {\n return {\n plaintext: encryptedMessage,\n valid: true\n };\n }\n else {\n return {\n plaintext: new Uint8Array(0),\n valid: false\n };\n }\n }\n decryptAndHash(ss, ciphertext) {\n let plaintext;\n let valid = true;\n if (this.hasKey(ss.cs)) {\n ({ plaintext, valid } = this.decryptWithAd(ss.cs, ss.h, ciphertext));\n }\n else {\n plaintext = ciphertext;\n }\n this.mixHash(ss, ciphertext);\n return { plaintext, valid };\n }\n dh(privateKey, publicKey) {\n try {\n const derivedU8 = this.crypto.generateX25519SharedKey(privateKey, publicKey);\n if (derivedU8.length === 32) {\n return derivedU8;\n }\n return derivedU8.subarray(0, 32);\n }\n catch (e) {\n const err = e;\n _logger_js__WEBPACK_IMPORTED_MODULE_3__.logger.error(err);\n return new Uint8Array(32);\n }\n }\n mixHash(ss, data) {\n ss.h = this.getHash(ss.h, data);\n }\n getHash(a, b) {\n const u = this.crypto.hashSHA256((0,uint8arrays_concat__WEBPACK_IMPORTED_MODULE_1__.concat)([a, b], a.length + b.length));\n return u;\n }\n mixKey(ss, ikm) {\n const [ck, tempK] = this.crypto.getHKDF(ss.ck, ikm);\n ss.cs = this.initializeKey(tempK);\n ss.ck = ck;\n }\
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-noise/dist/src/handshakes/xx.js":
/*!************************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-noise/dist/src/handshakes/xx.js ***!
\************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ XX: () => (/* binding */ XX)\n/* harmony export */ });\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ \"./node_modules/@chainsafe/libp2p-noise/dist/src/utils.js\");\n/* harmony import */ var _abstract_handshake_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./abstract-handshake.js */ \"./node_modules/@chainsafe/libp2p-noise/dist/src/handshakes/abstract-handshake.js\");\n\n\nclass XX extends _abstract_handshake_js__WEBPACK_IMPORTED_MODULE_1__.AbstractHandshake {\n initializeInitiator(prologue, s, rs, psk) {\n const name = 'Noise_XX_25519_ChaChaPoly_SHA256';\n const ss = this.initializeSymmetric(name);\n this.mixHash(ss, prologue);\n const re = new Uint8Array(32);\n return { ss, s, rs, psk, re };\n }\n initializeResponder(prologue, s, rs, psk) {\n const name = 'Noise_XX_25519_ChaChaPoly_SHA256';\n const ss = this.initializeSymmetric(name);\n this.mixHash(ss, prologue);\n const re = new Uint8Array(32);\n return { ss, s, rs, psk, re };\n }\n writeMessageA(hs, payload, e) {\n const ns = new Uint8Array(0);\n if (e !== undefined) {\n hs.e = e;\n }\n else {\n hs.e = this.crypto.generateX25519KeyPair();\n }\n const ne = hs.e.publicKey;\n this.mixHash(hs.ss, ne);\n const ciphertext = this.encryptAndHash(hs.ss, payload);\n return { ne, ns, ciphertext };\n }\n writeMessageB(hs, payload) {\n hs.e = this.crypto.generateX25519KeyPair();\n const ne = hs.e.publicKey;\n this.mixHash(hs.ss, ne);\n this.mixKey(hs.ss, this.dh(hs.e.privateKey, hs.re));\n const spk = hs.s.publicKey;\n const ns = this.encryptAndHash(hs.ss, spk);\n this.mixKey(hs.ss, this.dh(hs.s.privateKey, hs.re));\n const ciphertext = this.encryptAndHash(hs.ss, payload);\n return { ne, ns, ciphertext };\n }\n writeMessageC(hs, payload) {\n const spk = hs.s.publicKey;\n const ns = this.encryptAndHash(hs.ss, spk);\n this.mixKey(hs.ss, this.dh(hs.s.privateKey, hs.re));\n const ciphertext = this.encryptAndHash(hs.ss, payload);\n const ne = this.createEmptyKey();\n const messageBuffer = { ne, ns, ciphertext };\n const { cs1, cs2 } = this.split(hs.ss);\n return { h: hs.ss.h, messageBuffer, cs1, cs2 };\n }\n readMessageA(hs, message) {\n if ((0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.isValidPublicKey)(message.ne)) {\n hs.re = message.ne;\n }\n this.mixHash(hs.ss, hs.re);\n return this.decryptAndHash(hs.ss, message.ciphertext);\n }\n readMessageB(hs, message) {\n if ((0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.isValidPublicKey)(message.ne)) {\n hs.re = message.ne;\n }\n this.mixHash(hs.ss, hs.re);\n if (!hs.e) {\n throw new Error('Handshake state `e` param is missing.');\n }\n this.mixKey(hs.ss, this.dh(hs.e.privateKey, hs.re));\n const { plaintext: ns, valid: valid1 } = this.decryptAndHash(hs.ss, message.ns);\n if (valid1 && (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.isValidPublicKey)(ns)) {\n hs.rs = ns;\n }\n this.mixKey(hs.ss, this.dh(hs.e.privateKey, hs.rs));\n const { plaintext, valid: valid2 } = this.decryptAndHash(hs.ss, message.ciphertext);\n return { plaintext, valid: (valid1 && valid2) };\n }\n readMessageC(hs, message) {\n const { plaintext: ns, valid: valid1 } = this.decryptAndHash(hs.ss, message.ns);\n if (valid1 && (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.isValidPublicKey)(ns)) {\n hs.rs = ns;\n }\n if (!hs.e) {\n throw new Error('Handshake state `e` param is missing.');\n }\n this.mixKey(hs.ss, this.dh(hs.e.privateKey, hs.rs));\n
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-noise/dist/src/index.js":
/*!****************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-noise/dist/src/index.js ***!
\****************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ noise: () => (/* binding */ noise),\n/* harmony export */ pureJsCrypto: () => (/* reexport safe */ _crypto_js_js__WEBPACK_IMPORTED_MODULE_1__.pureJsCrypto)\n/* harmony export */ });\n/* harmony import */ var _noise_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./noise.js */ \"./node_modules/@chainsafe/libp2p-noise/dist/src/noise.js\");\n/* harmony import */ var _crypto_js_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./crypto/js.js */ \"./node_modules/@chainsafe/libp2p-noise/dist/src/crypto/js.js\");\n\n\nfunction noise(init = {}) {\n return () => new _noise_js__WEBPACK_IMPORTED_MODULE_0__.Noise(init);\n}\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/@chainsafe/libp2p-noise/dist/src/index.js?");
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-noise/dist/src/logger.js":
/*!*****************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-noise/dist/src/logger.js ***!
\*****************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ logCipherState: () => (/* binding */ logCipherState),\n/* harmony export */ logLocalEphemeralKeys: () => (/* binding */ logLocalEphemeralKeys),\n/* harmony export */ logLocalStaticKeys: () => (/* binding */ logLocalStaticKeys),\n/* harmony export */ logRemoteEphemeralKey: () => (/* binding */ logRemoteEphemeralKey),\n/* harmony export */ logRemoteStaticKey: () => (/* binding */ logRemoteStaticKey),\n/* harmony export */ logger: () => (/* binding */ log)\n/* harmony export */ });\n/* harmony import */ var _libp2p_logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/logger */ \"./node_modules/@libp2p/logger/dist/src/index.js\");\n/* harmony import */ var uint8arrays_to_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! uint8arrays/to-string */ \"./node_modules/uint8arrays/dist/src/to-string.js\");\n/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constants.js */ \"./node_modules/@chainsafe/libp2p-noise/dist/src/constants.js\");\n\n\n\nconst log = (0,_libp2p_logger__WEBPACK_IMPORTED_MODULE_0__.logger)('libp2p:noise');\n\nlet keyLogger;\nif (_constants_js__WEBPACK_IMPORTED_MODULE_2__.DUMP_SESSION_KEYS) {\n keyLogger = log;\n}\nelse {\n keyLogger = Object.assign(() => { }, {\n enabled: false,\n trace: () => { },\n error: () => { }\n });\n}\nfunction logLocalStaticKeys(s) {\n keyLogger(`LOCAL_STATIC_PUBLIC_KEY ${(0,uint8arrays_to_string__WEBPACK_IMPORTED_MODULE_1__.toString)(s.publicKey, 'hex')}`);\n keyLogger(`LOCAL_STATIC_PRIVATE_KEY ${(0,uint8arrays_to_string__WEBPACK_IMPORTED_MODULE_1__.toString)(s.privateKey, 'hex')}`);\n}\nfunction logLocalEphemeralKeys(e) {\n if (e) {\n keyLogger(`LOCAL_PUBLIC_EPHEMERAL_KEY ${(0,uint8arrays_to_string__WEBPACK_IMPORTED_MODULE_1__.toString)(e.publicKey, 'hex')}`);\n keyLogger(`LOCAL_PRIVATE_EPHEMERAL_KEY ${(0,uint8arrays_to_string__WEBPACK_IMPORTED_MODULE_1__.toString)(e.privateKey, 'hex')}`);\n }\n else {\n keyLogger('Missing local ephemeral keys.');\n }\n}\nfunction logRemoteStaticKey(rs) {\n keyLogger(`REMOTE_STATIC_PUBLIC_KEY ${(0,uint8arrays_to_string__WEBPACK_IMPORTED_MODULE_1__.toString)(rs, 'hex')}`);\n}\nfunction logRemoteEphemeralKey(re) {\n keyLogger(`REMOTE_EPHEMERAL_PUBLIC_KEY ${(0,uint8arrays_to_string__WEBPACK_IMPORTED_MODULE_1__.toString)(re, 'hex')}`);\n}\nfunction logCipherState(session) {\n if (session.cs1 && session.cs2) {\n keyLogger(`CIPHER_STATE_1 ${session.cs1.n.getUint64()} ${(0,uint8arrays_to_string__WEBPACK_IMPORTED_MODULE_1__.toString)(session.cs1.k, 'hex')}`);\n keyLogger(`CIPHER_STATE_2 ${session.cs2.n.getUint64()} ${(0,uint8arrays_to_string__WEBPACK_IMPORTED_MODULE_1__.toString)(session.cs2.k, 'hex')}`);\n }\n else {\n keyLogger('Missing cipher state.');\n }\n}\n//# sourceMappingURL=logger.js.map\n\n//# sourceURL=webpack://light/./node_modules/@chainsafe/libp2p-noise/dist/src/logger.js?");
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-noise/dist/src/metrics.js":
/*!******************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-noise/dist/src/metrics.js ***!
\******************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ registerMetrics: () => (/* binding */ registerMetrics)\n/* harmony export */ });\nfunction registerMetrics(metrics) {\n return {\n xxHandshakeSuccesses: metrics.registerCounter('libp2p_noise_xxhandshake_successes_total', {\n help: 'Total count of noise xxHandshakes successes_'\n }),\n xxHandshakeErrors: metrics.registerCounter('libp2p_noise_xxhandshake_error_total', {\n help: 'Total count of noise xxHandshakes errors'\n }),\n encryptedPackets: metrics.registerCounter('libp2p_noise_encrypted_packets_total', {\n help: 'Total count of noise encrypted packets successfully'\n }),\n decryptedPackets: metrics.registerCounter('libp2p_noise_decrypted_packets_total', {\n help: 'Total count of noise decrypted packets'\n }),\n decryptErrors: metrics.registerCounter('libp2p_noise_decrypt_errors_total', {\n help: 'Total count of noise decrypt errors'\n })\n };\n}\n//# sourceMappingURL=metrics.js.map\n\n//# sourceURL=webpack://light/./node_modules/@chainsafe/libp2p-noise/dist/src/metrics.js?");
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-noise/dist/src/noise.js":
/*!****************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-noise/dist/src/noise.js ***!
\****************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Noise: () => (/* binding */ Noise)\n/* harmony export */ });\n/* harmony import */ var it_length_prefixed__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! it-length-prefixed */ \"./node_modules/it-length-prefixed/dist/src/index.js\");\n/* harmony import */ var it_pair_duplex__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! it-pair/duplex */ \"./node_modules/it-pair/dist/src/duplex.js\");\n/* harmony import */ var it_pb_stream__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! it-pb-stream */ \"./node_modules/it-pb-stream/dist/src/index.js\");\n/* harmony import */ var it_pipe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! it-pipe */ \"./node_modules/it-pipe/dist/src/index.js\");\n/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./constants.js */ \"./node_modules/@chainsafe/libp2p-noise/dist/src/constants.js\");\n/* harmony import */ var _crypto_js_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./crypto/js.js */ \"./node_modules/@chainsafe/libp2p-noise/dist/src/crypto/js.js\");\n/* harmony import */ var _crypto_streaming_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./crypto/streaming.js */ \"./node_modules/@chainsafe/libp2p-noise/dist/src/crypto/streaming.js\");\n/* harmony import */ var _encoder_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./encoder.js */ \"./node_modules/@chainsafe/libp2p-noise/dist/src/encoder.js\");\n/* harmony import */ var _handshake_xx_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./handshake-xx.js */ \"./node_modules/@chainsafe/libp2p-noise/dist/src/handshake-xx.js\");\n/* harmony import */ var _metrics_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./metrics.js */ \"./node_modules/@chainsafe/libp2p-noise/dist/src/metrics.js\");\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./utils.js */ \"./node_modules/@chainsafe/libp2p-noise/dist/src/utils.js\");\n\n\n\n\n\n\n\n\n\n\n\nclass Noise {\n protocol = '/noise';\n crypto;\n prologue;\n staticKeys;\n extensions;\n metrics;\n constructor(init = {}) {\n const { staticNoiseKey, extensions, crypto, prologueBytes, metrics } = init;\n this.crypto = crypto ?? _crypto_js_js__WEBPACK_IMPORTED_MODULE_5__.pureJsCrypto;\n this.extensions = extensions;\n this.metrics = metrics ? (0,_metrics_js__WEBPACK_IMPORTED_MODULE_9__.registerMetrics)(metrics) : undefined;\n if (staticNoiseKey) {\n // accepts x25519 private key of length 32\n this.staticKeys = this.crypto.generateX25519KeyPairFromSeed(staticNoiseKey);\n }\n else {\n this.staticKeys = this.crypto.generateX25519KeyPair();\n }\n this.prologue = prologueBytes ?? new Uint8Array(0);\n }\n /**\n * Encrypt outgoing data to the remote party (handshake as initiator)\n *\n * @param {PeerId} localPeer - PeerId of the receiving peer\n * @param {Duplex<AsyncGenerator<Uint8Array>, AsyncIterable<Uint8Array>, Promise<void>>} connection - streaming iterable duplex that will be encrypted\n * @param {PeerId} remotePeer - PeerId of the remote peer. Used to validate the integrity of the remote peer.\n * @returns {Promise<SecuredConnection>}\n */\n async secureOutbound(localPeer, connection, remotePeer) {\n const wrappedConnection = (0,it_pb_stream__WEBPACK_IMPORTED_MODULE_2__.pbStream)(connection, {\n lengthEncoder: _encoder_js__WEBPACK_IMPORTED_MODULE_7__.uint16BEEncode,\n lengthDecoder: _encoder_js__WEBPACK_IMPORTED_MODULE_7__.uint16BEDecode,\n maxDataLength: _constants_js__WEBPACK_IMPORTED_MODULE_4__.NOISE_MSG_MAX_LENGTH_BYTES\n });\n const handshake = await this.performHandshake({\n connection: wrappedConnection,\n isInitiator: true,\n localPeer,\n remotePeer\n })
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-noise/dist/src/nonce.js":
/*!****************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-noise/dist/src/nonce.js ***!
\****************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ MAX_NONCE: () => (/* binding */ MAX_NONCE),\n/* harmony export */ MIN_NONCE: () => (/* binding */ MIN_NONCE),\n/* harmony export */ Nonce: () => (/* binding */ Nonce)\n/* harmony export */ });\nconst MIN_NONCE = 0;\n// For performance reasons, the nonce is represented as a JS `number`\n// Although JS `number` can safely represent integers up to 2 ** 53 - 1, we choose to only use\n// 4 bytes to store the data for performance reason.\n// This is a slight deviation from the noise spec, which describes the max nonce as 2 ** 64 - 2\n// The effect is that this implementation will need a new handshake to be performed after fewer messages are exchanged than other implementations with full uint64 nonces.\n// this MAX_NONCE is still a large number of messages, so the practical effect of this is negligible.\nconst MAX_NONCE = 0xffffffff;\nconst ERR_MAX_NONCE = 'Cipherstate has reached maximum n, a new handshake must be performed';\n/**\n * The nonce is an uint that's increased over time.\n * Maintaining different representations help improve performance.\n */\nclass Nonce {\n n;\n bytes;\n view;\n constructor(n = MIN_NONCE) {\n this.n = n;\n this.bytes = new Uint8Array(12);\n this.view = new DataView(this.bytes.buffer, this.bytes.byteOffset, this.bytes.byteLength);\n this.view.setUint32(4, n, true);\n }\n increment() {\n this.n++;\n // Even though we're treating the nonce as 8 bytes, RFC7539 specifies 12 bytes for a nonce.\n this.view.setUint32(4, this.n, true);\n }\n getBytes() {\n return this.bytes;\n }\n getUint64() {\n return this.n;\n }\n assertValue() {\n if (this.n > MAX_NONCE) {\n throw new Error(ERR_MAX_NONCE);\n }\n }\n}\n//# sourceMappingURL=nonce.js.map\n\n//# sourceURL=webpack://light/./node_modules/@chainsafe/libp2p-noise/dist/src/nonce.js?");
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-noise/dist/src/proto/payload.js":
/*!************************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-noise/dist/src/proto/payload.js ***!
\************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ NoiseExtensions: () => (/* binding */ NoiseExtensions),\n/* harmony export */ NoiseHandshakePayload: () => (/* binding */ NoiseHandshakePayload)\n/* harmony export */ });\n/* harmony import */ var protons_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! protons-runtime */ \"./node_modules/protons-runtime/dist/src/index.js\");\n/* eslint-disable import/export */\n/* eslint-disable complexity */\n/* eslint-disable @typescript-eslint/no-namespace */\n/* eslint-disable @typescript-eslint/no-unnecessary-boolean-literal-compare */\n/* eslint-disable @typescript-eslint/no-empty-interface */\n\nvar NoiseExtensions;\n(function (NoiseExtensions) {\n let _codec;\n NoiseExtensions.codec = () => {\n if (_codec == null) {\n _codec = (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.message)((obj, w, opts = {}) => {\n if (opts.lengthDelimited !== false) {\n w.fork();\n }\n if (obj.webtransportCerthashes != null) {\n for (const value of obj.webtransportCerthashes) {\n w.uint32(10);\n w.bytes(value);\n }\n }\n if (opts.lengthDelimited !== false) {\n w.ldelim();\n }\n }, (reader, length) => {\n const obj = {\n webtransportCerthashes: []\n };\n const end = length == null ? reader.len : reader.pos + length;\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n obj.webtransportCerthashes.push(reader.bytes());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return obj;\n });\n }\n return _codec;\n };\n NoiseExtensions.encode = (obj) => {\n return (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.encodeMessage)(obj, NoiseExtensions.codec());\n };\n NoiseExtensions.decode = (buf) => {\n return (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.decodeMessage)(buf, NoiseExtensions.codec());\n };\n})(NoiseExtensions || (NoiseExtensions = {}));\nvar NoiseHandshakePayload;\n(function (NoiseHandshakePayload) {\n let _codec;\n NoiseHandshakePayload.codec = () => {\n if (_codec == null) {\n _codec = (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.message)((obj, w, opts = {}) => {\n if (opts.lengthDelimited !== false) {\n w.fork();\n }\n if (opts.writeDefaults === true || (obj.identityKey != null && obj.identityKey.byteLength > 0)) {\n w.uint32(10);\n w.bytes(obj.identityKey ?? new Uint8Array(0));\n }\n if (opts.writeDefaults === true || (obj.identitySig != null && obj.identitySig.byteLength > 0)) {\n w.uint32(18);\n w.bytes(obj.identitySig ?? new Uint8Array(0));\n }\n if (obj.extensions != null) {\n w.uint32(34);\n NoiseExtensions.codec().encode(obj.extensions, w, {\n writeDefaults: false\n });\n }\n if (opts.lengthDelimited !== false) {\n w.ldelim();\n }\n }, (reader, length) => {\n const obj = {\n identityKey: new Uint8Array(0),\n identitySig: new Uint8Array(0)\n };\n const end = length == null ? reader.len : reader.pos + length;\n while (reader.pos < end) {\n
/***/ }),
/***/ "./node_modules/@chainsafe/libp2p-noise/dist/src/utils.js":
/*!****************************************************************!*\
!*** ./node_modules/@chainsafe/libp2p-noise/dist/src/utils.js ***!
\****************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ createHandshakePayload: () => (/* binding */ createHandshakePayload),\n/* harmony export */ decodePayload: () => (/* binding */ decodePayload),\n/* harmony export */ getHandshakePayload: () => (/* binding */ getHandshakePayload),\n/* harmony export */ getPayload: () => (/* binding */ getPayload),\n/* harmony export */ getPeerIdFromPayload: () => (/* binding */ getPeerIdFromPayload),\n/* harmony export */ isValidPublicKey: () => (/* binding */ isValidPublicKey),\n/* harmony export */ signPayload: () => (/* binding */ signPayload),\n/* harmony export */ verifySignedPayload: () => (/* binding */ verifySignedPayload)\n/* harmony export */ });\n/* harmony import */ var _libp2p_crypto_keys__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/crypto/keys */ \"./node_modules/@libp2p/crypto/dist/src/keys/index.js\");\n/* harmony import */ var _libp2p_peer_id__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/peer-id */ \"./node_modules/@libp2p/peer-id/dist/src/index.js\");\n/* harmony import */ var uint8arrays_concat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! uint8arrays/concat */ \"./node_modules/uint8arrays/dist/src/concat.js\");\n/* harmony import */ var uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! uint8arrays/from-string */ \"./node_modules/uint8arrays/dist/src/from-string.js\");\n/* harmony import */ var _proto_payload_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./proto/payload.js */ \"./node_modules/@chainsafe/libp2p-noise/dist/src/proto/payload.js\");\n\n\n\n\n\nasync function getPayload(localPeer, staticPublicKey, extensions) {\n const signedPayload = await signPayload(localPeer, getHandshakePayload(staticPublicKey));\n if (localPeer.publicKey == null) {\n throw new Error('PublicKey was missing from local PeerId');\n }\n return createHandshakePayload(localPeer.publicKey, signedPayload, extensions);\n}\nfunction createHandshakePayload(libp2pPublicKey, signedPayload, extensions) {\n return _proto_payload_js__WEBPACK_IMPORTED_MODULE_4__.NoiseHandshakePayload.encode({\n identityKey: libp2pPublicKey,\n identitySig: signedPayload,\n extensions: extensions ?? { webtransportCerthashes: [] }\n }).subarray();\n}\nasync function signPayload(peerId, payload) {\n if (peerId.privateKey == null) {\n throw new Error('PrivateKey was missing from PeerId');\n }\n const privateKey = await (0,_libp2p_crypto_keys__WEBPACK_IMPORTED_MODULE_0__.unmarshalPrivateKey)(peerId.privateKey);\n return privateKey.sign(payload);\n}\nasync function getPeerIdFromPayload(payload) {\n return (0,_libp2p_peer_id__WEBPACK_IMPORTED_MODULE_1__.peerIdFromKeys)(payload.identityKey);\n}\nfunction decodePayload(payload) {\n return _proto_payload_js__WEBPACK_IMPORTED_MODULE_4__.NoiseHandshakePayload.decode(payload);\n}\nfunction getHandshakePayload(publicKey) {\n const prefix = (0,uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_3__.fromString)('noise-libp2p-static-key:');\n return (0,uint8arrays_concat__WEBPACK_IMPORTED_MODULE_2__.concat)([prefix, publicKey], prefix.length + publicKey.length);\n}\n/**\n * Verifies signed payload, throws on any irregularities.\n *\n * @param {bytes} noiseStaticKey - owner's noise static key\n * @param {bytes} payload - decoded payload\n * @param {PeerId} remotePeer - owner's libp2p peer ID\n * @returns {Promise<PeerId>} - peer ID of payload owner\n */\nasync function verifySignedPayload(noiseStaticKey, payload, remotePeer) {\n // Unmarshaling from PublicKey protobuf\n const payloadPeerId = await (0,_libp2p_peer_id__WEBPACK_IMPORTED_MODULE_1__.peerIdFromKeys)(payload.identityKey);\n if (!payloadPeerId.equals(remotePeer)) {\n throw new Error(`Payload identity key ${payloadPeerId.toString()} does not match expected remote peer ${remotePeer.toString()}`);\n }\n const generatedPayload = getHandshakePayload(nois
/***/ }),
/***/ "./node_modules/@chainsafe/netmask/dist/src/cidr.js":
/*!**********************************************************!*\
!*** ./node_modules/@chainsafe/netmask/dist/src/cidr.js ***!
\**********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ cidrMask: () => (/* binding */ cidrMask),\n/* harmony export */ parseCidr: () => (/* binding */ parseCidr)\n/* harmony export */ });\n/* harmony import */ var _chainsafe_is_ip_parse__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @chainsafe/is-ip/parse */ \"./node_modules/@chainsafe/is-ip/lib/parse.js\");\n/* harmony import */ var _ip_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ip.js */ \"./node_modules/@chainsafe/netmask/dist/src/ip.js\");\n\n\nfunction parseCidr(s) {\n const [address, maskString] = s.split(\"/\");\n if (!address || !maskString)\n throw new Error(\"Failed to parse given CIDR: \" + s);\n let ipLength = _ip_js__WEBPACK_IMPORTED_MODULE_1__.IPv4Len;\n let ip = (0,_chainsafe_is_ip_parse__WEBPACK_IMPORTED_MODULE_0__.parseIPv4)(address);\n if (ip == null) {\n ipLength = _ip_js__WEBPACK_IMPORTED_MODULE_1__.IPv6Len;\n ip = (0,_chainsafe_is_ip_parse__WEBPACK_IMPORTED_MODULE_0__.parseIPv6)(address);\n if (ip == null)\n throw new Error(\"Failed to parse given CIDR: \" + s);\n }\n const m = parseInt(maskString, 10);\n if (Number.isNaN(m) ||\n String(m).length !== maskString.length ||\n m < 0 ||\n m > ipLength * 8) {\n throw new Error(\"Failed to parse given CIDR: \" + s);\n }\n const mask = cidrMask(m, 8 * ipLength);\n return {\n network: (0,_ip_js__WEBPACK_IMPORTED_MODULE_1__.maskIp)(ip, mask),\n mask,\n };\n}\nfunction cidrMask(ones, bits) {\n if (bits !== 8 * _ip_js__WEBPACK_IMPORTED_MODULE_1__.IPv4Len && bits !== 8 * _ip_js__WEBPACK_IMPORTED_MODULE_1__.IPv6Len)\n throw new Error(\"Invalid CIDR mask\");\n if (ones < 0 || ones > bits)\n throw new Error(\"Invalid CIDR mask\");\n const l = bits / 8;\n const m = new Uint8Array(l);\n for (let i = 0; i < l; i++) {\n if (ones >= 8) {\n m[i] = 0xff;\n ones -= 8;\n continue;\n }\n m[i] = 255 - (0xff >> ones);\n ones = 0;\n }\n return m;\n}\n//# sourceMappingURL=cidr.js.map\n\n//# sourceURL=webpack://light/./node_modules/@chainsafe/netmask/dist/src/cidr.js?");
/***/ }),
/***/ "./node_modules/@chainsafe/netmask/dist/src/index.js":
/*!***********************************************************!*\
!*** ./node_modules/@chainsafe/netmask/dist/src/index.js ***!
\***********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ IpNet: () => (/* reexport safe */ _ipnet_js__WEBPACK_IMPORTED_MODULE_0__.IpNet),\n/* harmony export */ cidrContains: () => (/* binding */ cidrContains),\n/* harmony export */ iPv4FromIPv6: () => (/* reexport safe */ _ip_js__WEBPACK_IMPORTED_MODULE_2__.iPv4FromIPv6),\n/* harmony export */ ipToString: () => (/* reexport safe */ _util_js__WEBPACK_IMPORTED_MODULE_1__.ipToString),\n/* harmony export */ isIPv4mappedIPv6: () => (/* reexport safe */ _ip_js__WEBPACK_IMPORTED_MODULE_2__.isIPv4mappedIPv6),\n/* harmony export */ maskIp: () => (/* reexport safe */ _ip_js__WEBPACK_IMPORTED_MODULE_2__.maskIp),\n/* harmony export */ parseCidr: () => (/* reexport safe */ _cidr_js__WEBPACK_IMPORTED_MODULE_3__.parseCidr)\n/* harmony export */ });\n/* harmony import */ var _ipnet_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ipnet.js */ \"./node_modules/@chainsafe/netmask/dist/src/ipnet.js\");\n/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util.js */ \"./node_modules/@chainsafe/netmask/dist/src/util.js\");\n/* harmony import */ var _ip_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ip.js */ \"./node_modules/@chainsafe/netmask/dist/src/ip.js\");\n/* harmony import */ var _cidr_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./cidr.js */ \"./node_modules/@chainsafe/netmask/dist/src/cidr.js\");\n\n\n\n\n\n/**\n * Checks if cidr block contains ip address\n * @param cidr ipv4 or ipv6 formatted cidr . Example 198.51.100.14/24 or 2001:db8::/48\n * @param ip ipv4 or ipv6 address Example 198.51.100.14 or 2001:db8::\n *\n */\nfunction cidrContains(cidr, ip) {\n const ipnet = new _ipnet_js__WEBPACK_IMPORTED_MODULE_0__.IpNet(cidr);\n return ipnet.contains(ip);\n}\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/@chainsafe/netmask/dist/src/index.js?");
/***/ }),
/***/ "./node_modules/@chainsafe/netmask/dist/src/ip.js":
/*!********************************************************!*\
!*** ./node_modules/@chainsafe/netmask/dist/src/ip.js ***!
\********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ IPv4Len: () => (/* binding */ IPv4Len),\n/* harmony export */ IPv6Len: () => (/* binding */ IPv6Len),\n/* harmony export */ containsIp: () => (/* binding */ containsIp),\n/* harmony export */ iPv4FromIPv6: () => (/* binding */ iPv4FromIPv6),\n/* harmony export */ ipv4Prefix: () => (/* binding */ ipv4Prefix),\n/* harmony export */ isIPv4mappedIPv6: () => (/* binding */ isIPv4mappedIPv6),\n/* harmony export */ maskIp: () => (/* binding */ maskIp),\n/* harmony export */ maxIPv6Octet: () => (/* binding */ maxIPv6Octet)\n/* harmony export */ });\n/* harmony import */ var _chainsafe_is_ip_parse__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @chainsafe/is-ip/parse */ \"./node_modules/@chainsafe/is-ip/lib/parse.js\");\n/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util.js */ \"./node_modules/@chainsafe/netmask/dist/src/util.js\");\n\n\nconst IPv4Len = 4;\nconst IPv6Len = 16;\nconst maxIPv6Octet = parseInt(\"0xFFFF\", 16);\nconst ipv4Prefix = new Uint8Array([\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255,\n]);\nfunction maskIp(ip, mask) {\n if (mask.length === IPv6Len && ip.length === IPv4Len && (0,_util_js__WEBPACK_IMPORTED_MODULE_1__.allFF)(mask, 0, 11)) {\n mask = mask.slice(12);\n }\n if (mask.length === IPv4Len &&\n ip.length === IPv6Len &&\n (0,_util_js__WEBPACK_IMPORTED_MODULE_1__.deepEqual)(ip, ipv4Prefix, 0, 11)) {\n ip = ip.slice(12);\n }\n const n = ip.length;\n if (n != mask.length) {\n throw new Error(\"Failed to mask ip\");\n }\n const out = new Uint8Array(n);\n for (let i = 0; i < n; i++) {\n out[i] = ip[i] & mask[i];\n }\n return out;\n}\nfunction containsIp(net, ip) {\n if (typeof ip === \"string\") {\n ip = (0,_chainsafe_is_ip_parse__WEBPACK_IMPORTED_MODULE_0__.parseIP)(ip);\n }\n if (ip == null)\n throw new Error(\"Invalid ip\");\n if (ip.length !== net.network.length) {\n return false;\n }\n for (let i = 0; i < ip.length; i++) {\n if ((net.network[i] & net.mask[i]) !== (ip[i] & net.mask[i])) {\n return false;\n }\n }\n return true;\n}\nfunction iPv4FromIPv6(ip) {\n if (!isIPv4mappedIPv6(ip)) {\n throw new Error(\"Must have 0xffff prefix\");\n }\n return ip.slice(12);\n}\nfunction isIPv4mappedIPv6(ip) {\n return (0,_util_js__WEBPACK_IMPORTED_MODULE_1__.deepEqual)(ip, ipv4Prefix, 0, 11);\n}\n//# sourceMappingURL=ip.js.map\n\n//# sourceURL=webpack://light/./node_modules/@chainsafe/netmask/dist/src/ip.js?");
/***/ }),
/***/ "./node_modules/@chainsafe/netmask/dist/src/ipnet.js":
/*!***********************************************************!*\
!*** ./node_modules/@chainsafe/netmask/dist/src/ipnet.js ***!
\***********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ IpNet: () => (/* binding */ IpNet)\n/* harmony export */ });\n/* harmony import */ var _chainsafe_is_ip_parse__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @chainsafe/is-ip/parse */ \"./node_modules/@chainsafe/is-ip/lib/parse.js\");\n/* harmony import */ var _cidr_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cidr.js */ \"./node_modules/@chainsafe/netmask/dist/src/cidr.js\");\n/* harmony import */ var _ip_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ip.js */ \"./node_modules/@chainsafe/netmask/dist/src/ip.js\");\n/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./util.js */ \"./node_modules/@chainsafe/netmask/dist/src/util.js\");\n\n\n\n\nclass IpNet {\n /**\n *\n * @param ipOrCidr either network ip or full cidr address\n * @param mask in case ipOrCidr is network this can be either mask in decimal format or as ip address\n */\n constructor(ipOrCidr, mask) {\n if (mask == null) {\n ({ network: this.network, mask: this.mask } = (0,_cidr_js__WEBPACK_IMPORTED_MODULE_1__.parseCidr)(ipOrCidr));\n }\n else {\n const ipResult = (0,_chainsafe_is_ip_parse__WEBPACK_IMPORTED_MODULE_0__.parseIP)(ipOrCidr);\n if (ipResult == null) {\n throw new Error(\"Failed to parse network\");\n }\n mask = String(mask);\n const m = parseInt(mask, 10);\n if (Number.isNaN(m) ||\n String(m).length !== mask.length ||\n m < 0 ||\n m > ipResult.length * 8) {\n const maskResult = (0,_chainsafe_is_ip_parse__WEBPACK_IMPORTED_MODULE_0__.parseIP)(mask);\n if (maskResult == null) {\n throw new Error(\"Failed to parse mask\");\n }\n this.mask = maskResult;\n }\n else {\n this.mask = (0,_cidr_js__WEBPACK_IMPORTED_MODULE_1__.cidrMask)(m, 8 * ipResult.length);\n }\n this.network = (0,_ip_js__WEBPACK_IMPORTED_MODULE_2__.maskIp)(ipResult, this.mask);\n }\n }\n /**\n * Checks if netmask contains ip address\n * @param ip\n * @returns\n */\n contains(ip) {\n return (0,_ip_js__WEBPACK_IMPORTED_MODULE_2__.containsIp)({ network: this.network, mask: this.mask }, ip);\n }\n /**Serializes back to string format */\n toString() {\n const l = (0,_util_js__WEBPACK_IMPORTED_MODULE_3__.simpleMaskLength)(this.mask);\n const mask = l !== -1 ? String(l) : (0,_util_js__WEBPACK_IMPORTED_MODULE_3__.maskToHex)(this.mask);\n return (0,_util_js__WEBPACK_IMPORTED_MODULE_3__.ipToString)(this.network) + \"/\" + mask;\n }\n}\n//# sourceMappingURL=ipnet.js.map\n\n//# sourceURL=webpack://light/./node_modules/@chainsafe/netmask/dist/src/ipnet.js?");
/***/ }),
/***/ "./node_modules/@chainsafe/netmask/dist/src/util.js":
/*!**********************************************************!*\
!*** ./node_modules/@chainsafe/netmask/dist/src/util.js ***!
\**********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ allFF: () => (/* binding */ allFF),\n/* harmony export */ deepEqual: () => (/* binding */ deepEqual),\n/* harmony export */ ipToString: () => (/* binding */ ipToString),\n/* harmony export */ maskToHex: () => (/* binding */ maskToHex),\n/* harmony export */ simpleMaskLength: () => (/* binding */ simpleMaskLength)\n/* harmony export */ });\n/* harmony import */ var _ip_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ip.js */ \"./node_modules/@chainsafe/netmask/dist/src/ip.js\");\n\nfunction allFF(a, from, to) {\n let i = 0;\n for (const e of a) {\n if (i < from)\n continue;\n if (i > to)\n break;\n if (e !== 0xff)\n return false;\n i++;\n }\n return true;\n}\nfunction deepEqual(a, b, from, to) {\n let i = 0;\n for (const e of a) {\n if (i < from)\n continue;\n if (i > to)\n break;\n if (e !== b[i])\n return false;\n i++;\n }\n return true;\n}\n/***\n * Returns long ip format\n */\nfunction ipToString(ip) {\n switch (ip.length) {\n case _ip_js__WEBPACK_IMPORTED_MODULE_0__.IPv4Len: {\n return ip.join(\".\");\n }\n case _ip_js__WEBPACK_IMPORTED_MODULE_0__.IPv6Len: {\n const result = [];\n for (let i = 0; i < ip.length; i++) {\n if (i % 2 === 0) {\n result.push(ip[i].toString(16).padStart(2, \"0\") +\n ip[i + 1].toString(16).padStart(2, \"0\"));\n }\n }\n return result.join(\":\");\n }\n default: {\n throw new Error(\"Invalid ip length\");\n }\n }\n}\n/**\n * If mask is a sequence of 1 bits followed by 0 bits, return number of 1 bits else -1\n */\nfunction simpleMaskLength(mask) {\n let ones = 0;\n // eslint-disable-next-line prefer-const\n for (let [index, byte] of mask.entries()) {\n if (byte === 0xff) {\n ones += 8;\n continue;\n }\n while ((byte & 0x80) != 0) {\n ones++;\n byte = byte << 1;\n }\n if ((byte & 0x80) != 0) {\n return -1;\n }\n for (let i = index + 1; i < mask.length; i++) {\n if (mask[i] != 0) {\n return -1;\n }\n }\n break;\n }\n return ones;\n}\nfunction maskToHex(mask) {\n let hex = \"0x\";\n for (const byte of mask) {\n hex += (byte >> 4).toString(16) + (byte & 0x0f).toString(16);\n }\n return hex;\n}\n//# sourceMappingURL=util.js.map\n\n//# sourceURL=webpack://light/./node_modules/@chainsafe/netmask/dist/src/util.js?");
/***/ }),
/***/ "./node_modules/@leichtgewicht/base64-codec/index.mjs":
/*!************************************************************!*\
!*** ./node_modules/@leichtgewicht/base64-codec/index.mjs ***!
\************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PREFERS_NO_PADDING: () => (/* binding */ PREFERS_NO_PADDING),\n/* harmony export */ PREFERS_PADDING: () => (/* binding */ PREFERS_PADDING),\n/* harmony export */ base64: () => (/* binding */ base64),\n/* harmony export */ base64URL: () => (/* binding */ base64URL),\n/* harmony export */ make: () => (/* binding */ make)\n/* harmony export */ });\nconst PREFERS_PADDING = 1\nconst PREFERS_NO_PADDING = 2\n\nfunction make (name, charset, padding, paddingMode) {\n if (charset.length !== 64) {\n throw new Error(`Charset needs to be 64 characters long! (${charset.length})`)\n }\n const byCharCode = new Uint8Array(256)\n const byNum = new Uint8Array(64)\n for (let i = 0; i < 64; i += 1) {\n const code = charset.charCodeAt(i)\n if (code > 255) {\n throw new Error(`Character #${i} in charset [code=${code}, char=${charset.charAt(i)}] is too high! (max=255)`)\n }\n if (byCharCode[code] !== 0) {\n throw new Error(`Character [code=${code}, char=${charset.charAt(i)}] is more than once in the charset!`)\n }\n byCharCode[code] = i\n byNum[i] = code\n }\n const padCode = padding.charCodeAt(0)\n const codec = {\n name,\n encodingLength (str) {\n const strLen = str.length\n const len = strLen * 0.75 | 0\n if (str.charCodeAt(strLen - 1) === padCode) {\n if (str.charCodeAt(strLen - 2) === padCode) {\n return len - 2\n }\n return len - 1\n }\n return len\n },\n encode (str, buffer, offset) {\n if (buffer === null || buffer === undefined) {\n buffer = new Uint8Array(codec.encodingLength(str))\n }\n if (offset === null || offset === undefined) {\n offset = 0\n }\n\n let strLen = str.length\n if (str.charCodeAt(strLen - 1) === padCode) {\n if (str.charCodeAt(strLen - 2) === padCode) {\n strLen -= 2\n } else {\n strLen -= 1\n }\n }\n\n const padding = strLen % 4\n const safeLen = strLen - padding\n\n let off = offset\n let i = 0\n while (i < safeLen) {\n const code =\n (byCharCode[str.charCodeAt(i)] << 18) |\n (byCharCode[str.charCodeAt(i + 1)] << 12) |\n (byCharCode[str.charCodeAt(i + 2)] << 6) |\n byCharCode[str.charCodeAt(i + 3)]\n buffer[off++] = code >> 16\n buffer[off++] = code >> 8\n buffer[off++] = code\n i += 4\n }\n\n if (padding === 3) {\n const code =\n (byCharCode[str.charCodeAt(i)] << 10) |\n (byCharCode[str.charCodeAt(i + 1)] << 4) |\n (byCharCode[str.charCodeAt(i + 2)] >> 2)\n buffer[off++] = code >> 8\n buffer[off++] = code\n } else if (padding === 2) {\n buffer[off++] = (byCharCode[str.charCodeAt(i)] << 2) |\n (byCharCode[str.charCodeAt(i + 1)] >> 4)\n }\n\n codec.encode.bytes = off - offset\n return buffer\n },\n decode (buffer, start, end) {\n if (start === null || start === undefined) {\n start = 0\n }\n if (end === null || end === undefined) {\n end = buffer.length\n }\n\n const length = end - start\n const pad = length % 3\n const safeEnd = start + length - pad\n const codes = []\n for (let off = start; off < safeEnd; off += 3) {\n const num = (buffer[off] << 16) | ((buffer[off + 1] << 8)) | buffer[off + 2]\n codes.push(\n byNum[num >> 18 & 0x3F],\n byNum[num >> 12 & 0x3F],\n byNum[num >> 6 & 0x3F],\n byNum[num & 0x3F]\n )\n }\n\n if (pad === 2) {\n const num = (buffer[end - 2] << 8) + buffer[end - 1]\n codes.push(\n byNum[num >> 10],\n byNum[(num >> 4) & 0x3F],\n byNum[(num << 2) & 0x3F]\n )\n if (paddingMode === PREFERS_PADDING) {\n codes.push(padCode)\n }\n } else if (pad === 1) {\n co
/***/ }),
/***/ "./node_modules/@leichtgewicht/dns-packet/buffer_utils.mjs":
/*!*****************************************************************!*\
!*** ./node_modules/@leichtgewicht/dns-packet/buffer_utils.mjs ***!
\*****************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ bytelength: () => (/* binding */ bytelength),\n/* harmony export */ copy: () => (/* binding */ copy),\n/* harmony export */ from: () => (/* binding */ from),\n/* harmony export */ isU8Arr: () => (/* binding */ isU8Arr),\n/* harmony export */ readUInt16BE: () => (/* binding */ readUInt16BE),\n/* harmony export */ readUInt32BE: () => (/* binding */ readUInt32BE),\n/* harmony export */ toHex: () => (/* binding */ toHex),\n/* harmony export */ write: () => (/* binding */ write),\n/* harmony export */ writeUInt16BE: () => (/* binding */ writeUInt16BE),\n/* harmony export */ writeUInt32BE: () => (/* binding */ writeUInt32BE)\n/* harmony export */ });\n/* harmony import */ var utf8_codec__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! utf8-codec */ \"./node_modules/utf8-codec/index.mjs\");\n\n\nconst isU8Arr = input => input instanceof Uint8Array\n\nfunction bytelength (input) {\n return typeof input === 'string' ? utf8_codec__WEBPACK_IMPORTED_MODULE_0__.encodingLength(input) : input.byteLength\n}\n\nfunction from (input) {\n if (input instanceof Uint8Array) {\n return input\n }\n if (Array.isArray(input)) {\n return new Uint8Array(input)\n }\n return utf8_codec__WEBPACK_IMPORTED_MODULE_0__.encode(input)\n}\n\nfunction write (arr, str, start) {\n if (typeof str !== 'string') {\n throw new Error('unknown input type')\n }\n utf8_codec__WEBPACK_IMPORTED_MODULE_0__.encode(str, arr, start)\n return utf8_codec__WEBPACK_IMPORTED_MODULE_0__.encode.bytes\n}\n\nfunction toHex (buf, start, end) {\n let result = ''\n for (let offset = start; offset < end;) {\n const num = buf[offset++]\n const str = num.toString(16)\n result += (str.length === 1) ? '0' + str : str\n }\n return result\n}\n\nconst P_24 = Math.pow(2, 24)\nconst P_16 = Math.pow(2, 16)\nconst P_8 = Math.pow(2, 8)\nconst readUInt32BE = (buf, offset) => buf[offset] * P_24 +\n buf[offset + 1] * P_16 +\n buf[offset + 2] * P_8 +\n buf[offset + 3]\n\nconst readUInt16BE = (buf, offset) => (buf[offset] << 8) | buf[offset + 1]\nconst writeUInt32BE = (buf, value, offset) => {\n value = +value\n buf[offset + 3] = value\n value = value >>> 8\n buf[offset + 2] = value\n value = value >>> 8\n buf[offset + 1] = value\n value = value >>> 8\n buf[offset] = value\n return offset + 4\n}\nconst writeUInt16BE = (buf, value, offset) => {\n buf[offset] = value >> 8\n buf[offset + 1] = value & 0xFF\n return offset + 2\n}\n\nfunction copy (source, target, targetStart, sourceStart, sourceEnd) {\n if (targetStart < 0) {\n sourceStart -= targetStart\n targetStart = 0\n }\n\n if (sourceStart < 0) {\n sourceStart = 0\n }\n\n if (sourceEnd < 0) {\n return new Uint8Array(0)\n }\n\n if (targetStart >= target.length || sourceStart >= sourceEnd) {\n return 0\n }\n\n return _copyActual(source, target, targetStart, sourceStart, sourceEnd)\n}\n\nfunction _copyActual (source, target, targetStart, sourceStart, sourceEnd) {\n if (sourceEnd - sourceStart > target.length - targetStart) {\n sourceEnd = sourceStart + target.length - targetStart\n }\n\n let nb = sourceEnd - sourceStart\n const sourceLen = source.length - sourceStart\n if (nb > sourceLen) {\n nb = sourceLen\n }\n\n if (sourceStart !== 0 || sourceEnd < source.length) {\n source = new Uint8Array(source.buffer, source.byteOffset + sourceStart, nb)\n }\n\n target.set(source, targetStart)\n\n return nb\n}\n\n\n//# sourceURL=webpack://light/./node_modules/@leichtgewicht/dns-packet/buffer_utils.mjs?");
/***/ }),
/***/ "./node_modules/@leichtgewicht/dns-packet/classes.mjs":
/*!************************************************************!*\
!*** ./node_modules/@leichtgewicht/dns-packet/classes.mjs ***!
\************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ toClass: () => (/* binding */ toClass),\n/* harmony export */ toString: () => (/* binding */ toString)\n/* harmony export */ });\nfunction toString (klass) {\n switch (klass) {\n case 1: return 'IN'\n case 2: return 'CS'\n case 3: return 'CH'\n case 4: return 'HS'\n case 255: return 'ANY'\n }\n return 'UNKNOWN_' + klass\n}\n\nfunction toClass (name) {\n switch (name.toUpperCase()) {\n case 'IN': return 1\n case 'CS': return 2\n case 'CH': return 3\n case 'HS': return 4\n case 'ANY': return 255\n }\n return 0\n}\n\n\n//# sourceURL=webpack://light/./node_modules/@leichtgewicht/dns-packet/classes.mjs?");
/***/ }),
/***/ "./node_modules/@leichtgewicht/dns-packet/index.mjs":
/*!**********************************************************!*\
!*** ./node_modules/@leichtgewicht/dns-packet/index.mjs ***!
\**********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AUTHENTIC_DATA: () => (/* binding */ AUTHENTIC_DATA),\n/* harmony export */ AUTHORITATIVE_ANSWER: () => (/* binding */ AUTHORITATIVE_ANSWER),\n/* harmony export */ CHECKING_DISABLED: () => (/* binding */ CHECKING_DISABLED),\n/* harmony export */ DNSSEC_OK: () => (/* binding */ DNSSEC_OK),\n/* harmony export */ RECURSION_AVAILABLE: () => (/* binding */ RECURSION_AVAILABLE),\n/* harmony export */ RECURSION_DESIRED: () => (/* binding */ RECURSION_DESIRED),\n/* harmony export */ TRUNCATED_RESPONSE: () => (/* binding */ TRUNCATED_RESPONSE),\n/* harmony export */ a: () => (/* binding */ ra),\n/* harmony export */ aaaa: () => (/* binding */ raaaa),\n/* harmony export */ answer: () => (/* binding */ answer),\n/* harmony export */ caa: () => (/* binding */ rcaa),\n/* harmony export */ cname: () => (/* binding */ rptr),\n/* harmony export */ decode: () => (/* binding */ decode),\n/* harmony export */ decodeList: () => (/* binding */ decodeList),\n/* harmony export */ dname: () => (/* binding */ rptr),\n/* harmony export */ dnskey: () => (/* binding */ rdnskey),\n/* harmony export */ ds: () => (/* binding */ rds),\n/* harmony export */ enc: () => (/* binding */ renc),\n/* harmony export */ encode: () => (/* binding */ encode),\n/* harmony export */ encodeList: () => (/* binding */ encodeList),\n/* harmony export */ encodingLength: () => (/* binding */ encodingLength),\n/* harmony export */ encodingLengthList: () => (/* binding */ encodingLengthList),\n/* harmony export */ hinfo: () => (/* binding */ rhinfo),\n/* harmony export */ mx: () => (/* binding */ rmx),\n/* harmony export */ name: () => (/* binding */ name),\n/* harmony export */ ns: () => (/* binding */ rns),\n/* harmony export */ nsec: () => (/* binding */ rnsec),\n/* harmony export */ nsec3: () => (/* binding */ rnsec3),\n/* harmony export */ \"null\": () => (/* binding */ rnull),\n/* harmony export */ opt: () => (/* binding */ ropt),\n/* harmony export */ option: () => (/* binding */ roption),\n/* harmony export */ packet: () => (/* binding */ packet),\n/* harmony export */ ptr: () => (/* binding */ rptr),\n/* harmony export */ query: () => (/* binding */ query),\n/* harmony export */ question: () => (/* binding */ question),\n/* harmony export */ response: () => (/* binding */ response),\n/* harmony export */ rp: () => (/* binding */ rrp),\n/* harmony export */ rrsig: () => (/* binding */ rrrsig),\n/* harmony export */ soa: () => (/* binding */ rsoa),\n/* harmony export */ srv: () => (/* binding */ rsrv),\n/* harmony export */ streamDecode: () => (/* binding */ streamDecode),\n/* harmony export */ streamEncode: () => (/* binding */ streamEncode),\n/* harmony export */ txt: () => (/* binding */ rtxt),\n/* harmony export */ unknown: () => (/* binding */ runknown)\n/* harmony export */ });\n/* harmony import */ var _leichtgewicht_ip_codec__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @leichtgewicht/ip-codec */ \"./node_modules/@leichtgewicht/ip-codec/index.mjs\");\n/* harmony import */ var _types_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./types.mjs */ \"./node_modules/@leichtgewicht/dns-packet/types.mjs\");\n/* harmony import */ var _rcodes_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./rcodes.mjs */ \"./node_modules/@leichtgewicht/dns-packet/rcodes.mjs\");\n/* harmony import */ var _opcodes_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./opcodes.mjs */ \"./node_modules/@leichtgewicht/dns-packet/opcodes.mjs\");\n/* harmony import */ var _classes_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./classes.mjs */ \"./node_modules/@leichtgewicht/dns-packet/classes.mjs\");\n/* harmony import */ var _optioncodes_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./optioncodes.mjs */ \"./node_modules/@leichtgewicht/dns-packet/optioncodes.mjs\");\n/* harmony import */ var _buffer_utils_
/***/ }),
/***/ "./node_modules/@leichtgewicht/dns-packet/opcodes.mjs":
/*!************************************************************!*\
!*** ./node_modules/@leichtgewicht/dns-packet/opcodes.mjs ***!
\************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ toOpcode: () => (/* binding */ toOpcode),\n/* harmony export */ toString: () => (/* binding */ toString)\n/* harmony export */ });\n/*\n * Traditional DNS header OPCODEs (4-bits) defined by IANA in\n * https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-5\n */\n\nfunction toString (opcode) {\n switch (opcode) {\n case 0: return 'QUERY'\n case 1: return 'IQUERY'\n case 2: return 'STATUS'\n case 3: return 'OPCODE_3'\n case 4: return 'NOTIFY'\n case 5: return 'UPDATE'\n case 6: return 'OPCODE_6'\n case 7: return 'OPCODE_7'\n case 8: return 'OPCODE_8'\n case 9: return 'OPCODE_9'\n case 10: return 'OPCODE_10'\n case 11: return 'OPCODE_11'\n case 12: return 'OPCODE_12'\n case 13: return 'OPCODE_13'\n case 14: return 'OPCODE_14'\n case 15: return 'OPCODE_15'\n }\n return 'OPCODE_' + opcode\n}\n\nfunction toOpcode (code) {\n switch (code.toUpperCase()) {\n case 'QUERY': return 0\n case 'IQUERY': return 1\n case 'STATUS': return 2\n case 'OPCODE_3': return 3\n case 'NOTIFY': return 4\n case 'UPDATE': return 5\n case 'OPCODE_6': return 6\n case 'OPCODE_7': return 7\n case 'OPCODE_8': return 8\n case 'OPCODE_9': return 9\n case 'OPCODE_10': return 10\n case 'OPCODE_11': return 11\n case 'OPCODE_12': return 12\n case 'OPCODE_13': return 13\n case 'OPCODE_14': return 14\n case 'OPCODE_15': return 15\n }\n return 0\n}\n\n\n//# sourceURL=webpack://light/./node_modules/@leichtgewicht/dns-packet/opcodes.mjs?");
/***/ }),
/***/ "./node_modules/@leichtgewicht/dns-packet/optioncodes.mjs":
/*!****************************************************************!*\
!*** ./node_modules/@leichtgewicht/dns-packet/optioncodes.mjs ***!
\****************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ toCode: () => (/* binding */ toCode),\n/* harmony export */ toString: () => (/* binding */ toString)\n/* harmony export */ });\nfunction toString (type) {\n switch (type) {\n // list at\n // https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-11\n case 1: return 'LLQ'\n case 2: return 'UL'\n case 3: return 'NSID'\n case 5: return 'DAU'\n case 6: return 'DHU'\n case 7: return 'N3U'\n case 8: return 'CLIENT_SUBNET'\n case 9: return 'EXPIRE'\n case 10: return 'COOKIE'\n case 11: return 'TCP_KEEPALIVE'\n case 12: return 'PADDING'\n case 13: return 'CHAIN'\n case 14: return 'KEY_TAG'\n case 26946: return 'DEVICEID'\n }\n if (type < 0) {\n return null\n }\n return `OPTION_${type}`\n}\n\nfunction toCode (name) {\n if (typeof name === 'number') {\n return name\n }\n if (!name) {\n return -1\n }\n switch (name.toUpperCase()) {\n case 'OPTION_0': return 0\n case 'LLQ': return 1\n case 'UL': return 2\n case 'NSID': return 3\n case 'OPTION_4': return 4\n case 'DAU': return 5\n case 'DHU': return 6\n case 'N3U': return 7\n case 'CLIENT_SUBNET': return 8\n case 'EXPIRE': return 9\n case 'COOKIE': return 10\n case 'TCP_KEEPALIVE': return 11\n case 'PADDING': return 12\n case 'CHAIN': return 13\n case 'KEY_TAG': return 14\n case 'DEVICEID': return 26946\n case 'OPTION_65535': return 65535\n }\n const m = name.match(/_(\\d+)$/)\n if (m) {\n return parseInt(m[1], 10)\n }\n return -1\n}\n\n\n//# sourceURL=webpack://light/./node_modules/@leichtgewicht/dns-packet/optioncodes.mjs?");
/***/ }),
/***/ "./node_modules/@leichtgewicht/dns-packet/rcodes.mjs":
/*!***********************************************************!*\
!*** ./node_modules/@leichtgewicht/dns-packet/rcodes.mjs ***!
\***********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ toRcode: () => (/* binding */ toRcode),\n/* harmony export */ toString: () => (/* binding */ toString)\n/* harmony export */ });\n/*\n * Traditional DNS header RCODEs (4-bits) defined by IANA in\n * https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml\n */\n\nfunction toString (rcode) {\n switch (rcode) {\n case 0: return 'NOERROR'\n case 1: return 'FORMERR'\n case 2: return 'SERVFAIL'\n case 3: return 'NXDOMAIN'\n case 4: return 'NOTIMP'\n case 5: return 'REFUSED'\n case 6: return 'YXDOMAIN'\n case 7: return 'YXRRSET'\n case 8: return 'NXRRSET'\n case 9: return 'NOTAUTH'\n case 10: return 'NOTZONE'\n case 11: return 'RCODE_11'\n case 12: return 'RCODE_12'\n case 13: return 'RCODE_13'\n case 14: return 'RCODE_14'\n case 15: return 'RCODE_15'\n }\n return 'RCODE_' + rcode\n}\n\nfunction toRcode (code) {\n switch (code.toUpperCase()) {\n case 'NOERROR': return 0\n case 'FORMERR': return 1\n case 'SERVFAIL': return 2\n case 'NXDOMAIN': return 3\n case 'NOTIMP': return 4\n case 'REFUSED': return 5\n case 'YXDOMAIN': return 6\n case 'YXRRSET': return 7\n case 'NXRRSET': return 8\n case 'NOTAUTH': return 9\n case 'NOTZONE': return 10\n case 'RCODE_11': return 11\n case 'RCODE_12': return 12\n case 'RCODE_13': return 13\n case 'RCODE_14': return 14\n case 'RCODE_15': return 15\n }\n return 0\n}\n\n\n//# sourceURL=webpack://light/./node_modules/@leichtgewicht/dns-packet/rcodes.mjs?");
/***/ }),
/***/ "./node_modules/@leichtgewicht/dns-packet/types.mjs":
/*!**********************************************************!*\
!*** ./node_modules/@leichtgewicht/dns-packet/types.mjs ***!
\**********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ toString: () => (/* binding */ toString),\n/* harmony export */ toType: () => (/* binding */ toType)\n/* harmony export */ });\nfunction toString (type) {\n switch (type) {\n case 1: return 'A'\n case 10: return 'NULL'\n case 28: return 'AAAA'\n case 18: return 'AFSDB'\n case 42: return 'APL'\n case 257: return 'CAA'\n case 60: return 'CDNSKEY'\n case 59: return 'CDS'\n case 37: return 'CERT'\n case 5: return 'CNAME'\n case 49: return 'DHCID'\n case 32769: return 'DLV'\n case 39: return 'DNAME'\n case 48: return 'DNSKEY'\n case 43: return 'DS'\n case 55: return 'HIP'\n case 13: return 'HINFO'\n case 45: return 'IPSECKEY'\n case 25: return 'KEY'\n case 36: return 'KX'\n case 29: return 'LOC'\n case 15: return 'MX'\n case 35: return 'NAPTR'\n case 2: return 'NS'\n case 47: return 'NSEC'\n case 50: return 'NSEC3'\n case 51: return 'NSEC3PARAM'\n case 12: return 'PTR'\n case 46: return 'RRSIG'\n case 17: return 'RP'\n case 24: return 'SIG'\n case 6: return 'SOA'\n case 99: return 'SPF'\n case 33: return 'SRV'\n case 44: return 'SSHFP'\n case 32768: return 'TA'\n case 249: return 'TKEY'\n case 52: return 'TLSA'\n case 250: return 'TSIG'\n case 16: return 'TXT'\n case 252: return 'AXFR'\n case 251: return 'IXFR'\n case 41: return 'OPT'\n case 255: return 'ANY'\n }\n return 'UNKNOWN_' + type\n}\n\nfunction toType (name) {\n switch (name.toUpperCase()) {\n case 'A': return 1\n case 'NULL': return 10\n case 'AAAA': return 28\n case 'AFSDB': return 18\n case 'APL': return 42\n case 'CAA': return 257\n case 'CDNSKEY': return 60\n case 'CDS': return 59\n case 'CERT': return 37\n case 'CNAME': return 5\n case 'DHCID': return 49\n case 'DLV': return 32769\n case 'DNAME': return 39\n case 'DNSKEY': return 48\n case 'DS': return 43\n case 'HIP': return 55\n case 'HINFO': return 13\n case 'IPSECKEY': return 45\n case 'KEY': return 25\n case 'KX': return 36\n case 'LOC': return 29\n case 'MX': return 15\n case 'NAPTR': return 35\n case 'NS': return 2\n case 'NSEC': return 47\n case 'NSEC3': return 50\n case 'NSEC3PARAM': return 51\n case 'PTR': return 12\n case 'RRSIG': return 46\n case 'RP': return 17\n case 'SIG': return 24\n case 'SOA': return 6\n case 'SPF': return 99\n case 'SRV': return 33\n case 'SSHFP': return 44\n case 'TA': return 32768\n case 'TKEY': return 249\n case 'TLSA': return 52\n case 'TSIG': return 250\n case 'TXT': return 16\n case 'AXFR': return 252\n case 'IXFR': return 251\n case 'OPT': return 41\n case 'ANY': return 255\n case '*': return 255\n }\n if (name.toUpperCase().startsWith('UNKNOWN_')) return parseInt(name.slice(8))\n return 0\n}\n\n\n//# sourceURL=webpack://light/./node_modules/@leichtgewicht/dns-packet/types.mjs?");
/***/ }),
/***/ "./node_modules/@leichtgewicht/ip-codec/index.mjs":
/*!********************************************************!*\
!*** ./node_modules/@leichtgewicht/ip-codec/index.mjs ***!
\********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ decode: () => (/* binding */ decode),\n/* harmony export */ encode: () => (/* binding */ encode),\n/* harmony export */ familyOf: () => (/* binding */ familyOf),\n/* harmony export */ name: () => (/* binding */ name),\n/* harmony export */ sizeOf: () => (/* binding */ sizeOf),\n/* harmony export */ v4: () => (/* binding */ v4),\n/* harmony export */ v6: () => (/* binding */ v6)\n/* harmony export */ });\nconst v4Regex = /^(\\d{1,3}\\.){3,3}\\d{1,3}$/\nconst v4Size = 4\nconst v6Regex = /^(::)?(((\\d{1,3}\\.){3}(\\d{1,3}){1})?([0-9a-f]){0,4}:{0,2}){1,8}(::)?$/i\nconst v6Size = 16\n\nconst v4 = {\n name: 'v4',\n size: v4Size,\n isFormat: ip => v4Regex.test(ip),\n encode (ip, buff, offset) {\n offset = ~~offset\n buff = buff || new Uint8Array(offset + v4Size)\n const max = ip.length\n let n = 0\n for (let i = 0; i < max;) {\n const c = ip.charCodeAt(i++)\n if (c === 46) { // \".\"\n buff[offset++] = n\n n = 0\n } else {\n n = n * 10 + (c - 48)\n }\n }\n buff[offset] = n\n return buff\n },\n decode (buff, offset) {\n offset = ~~offset\n return `${buff[offset++]}.${buff[offset++]}.${buff[offset++]}.${buff[offset]}`\n }\n}\n\nconst v6 = {\n name: 'v6',\n size: v6Size,\n isFormat: ip => ip.length > 0 && v6Regex.test(ip),\n encode (ip, buff, offset) {\n offset = ~~offset\n let end = offset + v6Size\n let fill = -1\n let hexN = 0\n let decN = 0\n let prevColon = true\n let useDec = false\n buff = buff || new Uint8Array(offset + v6Size)\n // Note: This algorithm needs to check if the offset\n // could exceed the buffer boundaries as it supports\n // non-standard compliant encodings that may go beyond\n // the boundary limits. if (offset < end) checks should\n // not be necessary...\n for (let i = 0; i < ip.length; i++) {\n let c = ip.charCodeAt(i)\n if (c === 58) { // :\n if (prevColon) {\n if (fill !== -1) {\n // Not Standard! (standard doesn't allow multiple ::)\n // We need to treat\n if (offset < end) buff[offset] = 0\n if (offset < end - 1) buff[offset + 1] = 0\n offset += 2\n } else if (offset < end) {\n // :: in the middle\n fill = offset\n }\n } else {\n // : ends the previous number\n if (useDec === true) {\n // Non-standard! (ipv4 should be at end only)\n // A ipv4 address should not be found anywhere else but at\n // the end. This codec also support putting characters\n // after the ipv4 address..\n if (offset < end) buff[offset] = decN\n offset++\n } else {\n if (offset < end) buff[offset] = hexN >> 8\n if (offset < end - 1) buff[offset + 1] = hexN & 0xff\n offset += 2\n }\n hexN = 0\n decN = 0\n }\n prevColon = true\n useDec = false\n } else if (c === 46) { // . indicates IPV4 notation\n if (offset < end) buff[offset] = decN\n offset++\n decN = 0\n hexN = 0\n prevColon = false\n useDec = true\n } else {\n prevColon = false\n if (c >= 97) {\n c -= 87 // a-f ... 97~102 -87 => 10~15\n } else if (c >= 65) {\n c -= 55 // A-F ... 65~70 -55 => 10~15\n } else {\n c -= 48 // 0-9 ... starting from charCode 48\n decN = decN * 10 + c\n }\n // We don't know yet if its a dec or hex number\n hexN = (hexN << 4) + c\n }\n }\n if (prevColon === false) {\n // Commiting last number\n if (useDec === true) {\n if (offset < end) buff[offset] = decN\n offset++\n } else {\n if (offset < end) buff[offset] = hexN >> 8\n if (offset < end - 1) buff[offset + 1] = hexN & 0xff\n offset +
/***/ }),
/***/ "./node_modules/@libp2p/crypto/dist/src/aes/cipher-mode.js":
/*!*****************************************************************!*\
!*** ./node_modules/@libp2p/crypto/dist/src/aes/cipher-mode.js ***!
\*****************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ cipherMode: () => (/* binding */ cipherMode)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n\nconst CIPHER_MODES = {\n 16: 'aes-128-ctr',\n 32: 'aes-256-ctr'\n};\nfunction cipherMode(key) {\n if (key.length === 16 || key.length === 32) {\n return CIPHER_MODES[key.length];\n }\n const modes = Object.entries(CIPHER_MODES).map(([k, v]) => `${k} (${v})`).join(' / ');\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__.CodeError(`Invalid key length ${key.length} bytes. Must be ${modes}`, 'ERR_INVALID_KEY_LENGTH');\n}\n//# sourceMappingURL=cipher-mode.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/crypto/dist/src/aes/cipher-mode.js?");
/***/ }),
/***/ "./node_modules/@libp2p/crypto/dist/src/aes/ciphers-browser.js":
/*!*********************************************************************!*\
!*** ./node_modules/@libp2p/crypto/dist/src/aes/ciphers-browser.js ***!
\*********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ createCipheriv: () => (/* binding */ createCipheriv),\n/* harmony export */ createDecipheriv: () => (/* binding */ createDecipheriv)\n/* harmony export */ });\n/* harmony import */ var node_forge_lib_aes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! node-forge/lib/aes.js */ \"./node_modules/node-forge/lib/aes.js\");\n/* harmony import */ var node_forge_lib_forge_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! node-forge/lib/forge.js */ \"./node_modules/node-forge/lib/forge.js\");\n/* harmony import */ var uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! uint8arrays/from-string */ \"./node_modules/uint8arrays/dist/src/from-string.js\");\n/* harmony import */ var uint8arrays_to_string__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! uint8arrays/to-string */ \"./node_modules/uint8arrays/dist/src/to-string.js\");\n\n// @ts-expect-error types are missing\n\n\n\nfunction createCipheriv(mode, key, iv) {\n const cipher2 = node_forge_lib_forge_js__WEBPACK_IMPORTED_MODULE_1__.cipher.createCipher('AES-CTR', (0,uint8arrays_to_string__WEBPACK_IMPORTED_MODULE_3__.toString)(key, 'ascii'));\n cipher2.start({ iv: (0,uint8arrays_to_string__WEBPACK_IMPORTED_MODULE_3__.toString)(iv, 'ascii') });\n return {\n update: (data) => {\n cipher2.update(node_forge_lib_forge_js__WEBPACK_IMPORTED_MODULE_1__.util.createBuffer((0,uint8arrays_to_string__WEBPACK_IMPORTED_MODULE_3__.toString)(data, 'ascii')));\n return (0,uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_2__.fromString)(cipher2.output.getBytes(), 'ascii');\n }\n };\n}\nfunction createDecipheriv(mode, key, iv) {\n const cipher2 = node_forge_lib_forge_js__WEBPACK_IMPORTED_MODULE_1__.cipher.createDecipher('AES-CTR', (0,uint8arrays_to_string__WEBPACK_IMPORTED_MODULE_3__.toString)(key, 'ascii'));\n cipher2.start({ iv: (0,uint8arrays_to_string__WEBPACK_IMPORTED_MODULE_3__.toString)(iv, 'ascii') });\n return {\n update: (data) => {\n cipher2.update(node_forge_lib_forge_js__WEBPACK_IMPORTED_MODULE_1__.util.createBuffer((0,uint8arrays_to_string__WEBPACK_IMPORTED_MODULE_3__.toString)(data, 'ascii')));\n return (0,uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_2__.fromString)(cipher2.output.getBytes(), 'ascii');\n }\n };\n}\n//# sourceMappingURL=ciphers-browser.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/crypto/dist/src/aes/ciphers-browser.js?");
/***/ }),
/***/ "./node_modules/@libp2p/crypto/dist/src/aes/index.js":
/*!***********************************************************!*\
!*** ./node_modules/@libp2p/crypto/dist/src/aes/index.js ***!
\***********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ create: () => (/* binding */ create)\n/* harmony export */ });\n/* harmony import */ var _cipher_mode_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cipher-mode.js */ \"./node_modules/@libp2p/crypto/dist/src/aes/cipher-mode.js\");\n/* harmony import */ var _ciphers_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ciphers.js */ \"./node_modules/@libp2p/crypto/dist/src/aes/ciphers-browser.js\");\n\n\nasync function create(key, iv) {\n const mode = (0,_cipher_mode_js__WEBPACK_IMPORTED_MODULE_0__.cipherMode)(key);\n const cipher = _ciphers_js__WEBPACK_IMPORTED_MODULE_1__.createCipheriv(mode, key, iv);\n const decipher = _ciphers_js__WEBPACK_IMPORTED_MODULE_1__.createDecipheriv(mode, key, iv);\n const res = {\n async encrypt(data) {\n return cipher.update(data);\n },\n async decrypt(data) {\n return decipher.update(data);\n }\n };\n return res;\n}\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/crypto/dist/src/aes/index.js?");
/***/ }),
/***/ "./node_modules/@libp2p/crypto/dist/src/ciphers/aes-gcm.browser.js":
/*!*************************************************************************!*\
!*** ./node_modules/@libp2p/crypto/dist/src/ciphers/aes-gcm.browser.js ***!
\*************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ create: () => (/* binding */ create),\n/* harmony export */ derivedEmptyPasswordKey: () => (/* binding */ derivedEmptyPasswordKey)\n/* harmony export */ });\n/* harmony import */ var uint8arrays_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! uint8arrays/concat */ \"./node_modules/uint8arrays/dist/src/concat.js\");\n/* harmony import */ var uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! uint8arrays/from-string */ \"./node_modules/uint8arrays/dist/src/from-string.js\");\n/* harmony import */ var _webcrypto_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../webcrypto.js */ \"./node_modules/@libp2p/crypto/dist/src/webcrypto.js\");\n\n\n\n// WebKit on Linux does not support deriving a key from an empty PBKDF2 key.\n// So, as a workaround, we provide the generated key as a constant. We test that\n// this generated key is accurate in test/workaround.spec.ts\n// Generated via:\n// await crypto.subtle.exportKey('jwk',\n// await crypto.subtle.deriveKey(\n// { name: 'PBKDF2', salt: new Uint8Array(16), iterations: 32767, hash: { name: 'SHA-256' } },\n// await crypto.subtle.importKey('raw', new Uint8Array(0), { name: 'PBKDF2' }, false, ['deriveKey']),\n// { name: 'AES-GCM', length: 128 }, true, ['encrypt', 'decrypt'])\n// )\nconst derivedEmptyPasswordKey = { alg: 'A128GCM', ext: true, k: 'scm9jmO_4BJAgdwWGVulLg', key_ops: ['encrypt', 'decrypt'], kty: 'oct' };\n// Based off of code from https://github.com/luke-park/SecureCompatibleEncryptionExamples\nfunction create(opts) {\n const algorithm = opts?.algorithm ?? 'AES-GCM';\n let keyLength = opts?.keyLength ?? 16;\n const nonceLength = opts?.nonceLength ?? 12;\n const digest = opts?.digest ?? 'SHA-256';\n const saltLength = opts?.saltLength ?? 16;\n const iterations = opts?.iterations ?? 32767;\n const crypto = _webcrypto_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].get();\n keyLength *= 8; // Browser crypto uses bits instead of bytes\n /**\n * Uses the provided password to derive a pbkdf2 key. The key\n * will then be used to encrypt the data.\n */\n async function encrypt(data, password) {\n const salt = crypto.getRandomValues(new Uint8Array(saltLength));\n const nonce = crypto.getRandomValues(new Uint8Array(nonceLength));\n const aesGcm = { name: algorithm, iv: nonce };\n if (typeof password === 'string') {\n password = (0,uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_1__.fromString)(password);\n }\n let cryptoKey;\n if (password.length === 0) {\n cryptoKey = await crypto.subtle.importKey('jwk', derivedEmptyPasswordKey, { name: 'AES-GCM' }, true, ['encrypt']);\n try {\n const deriveParams = { name: 'PBKDF2', salt, iterations, hash: { name: digest } };\n const runtimeDerivedEmptyPassword = await crypto.subtle.importKey('raw', password, { name: 'PBKDF2' }, false, ['deriveKey']);\n cryptoKey = await crypto.subtle.deriveKey(deriveParams, runtimeDerivedEmptyPassword, { name: algorithm, length: keyLength }, true, ['encrypt']);\n }\n catch {\n cryptoKey = await crypto.subtle.importKey('jwk', derivedEmptyPasswordKey, { name: 'AES-GCM' }, true, ['encrypt']);\n }\n }\n else {\n // Derive a key using PBKDF2.\n const deriveParams = { name: 'PBKDF2', salt, iterations, hash: { name: digest } };\n const rawKey = await crypto.subtle.importKey('raw', password, { name: 'PBKDF2' }, false, ['deriveKey']);\n cryptoKey = await crypto.subtle.deriveKey(deriveParams, rawKey, { name: algorithm, length: keyLength }, true, ['encrypt']);\n }\n // Encrypt the string.\n const ciphertext = await crypto.subtle.encrypt(aesGcm, cryptoKey, data);\n return (0,uint8arrays_concat__WEBPACK_IMPORTED_MODULE_0__.c
/***/ }),
/***/ "./node_modules/@libp2p/crypto/dist/src/hmac/index-browser.js":
/*!********************************************************************!*\
!*** ./node_modules/@libp2p/crypto/dist/src/hmac/index-browser.js ***!
\********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ create: () => (/* binding */ create)\n/* harmony export */ });\n/* harmony import */ var _webcrypto_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../webcrypto.js */ \"./node_modules/@libp2p/crypto/dist/src/webcrypto.js\");\n/* harmony import */ var _lengths_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lengths.js */ \"./node_modules/@libp2p/crypto/dist/src/hmac/lengths.js\");\n\n\nconst hashTypes = {\n SHA1: 'SHA-1',\n SHA256: 'SHA-256',\n SHA512: 'SHA-512'\n};\nconst sign = async (key, data) => {\n const buf = await _webcrypto_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].get().subtle.sign({ name: 'HMAC' }, key, data);\n return new Uint8Array(buf, 0, buf.byteLength);\n};\nasync function create(hashType, secret) {\n const hash = hashTypes[hashType];\n const key = await _webcrypto_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].get().subtle.importKey('raw', secret, {\n name: 'HMAC',\n hash: { name: hash }\n }, false, ['sign']);\n return {\n async digest(data) {\n return sign(key, data);\n },\n length: _lengths_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"][hashType]\n };\n}\n//# sourceMappingURL=index-browser.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/crypto/dist/src/hmac/index-browser.js?");
/***/ }),
/***/ "./node_modules/@libp2p/crypto/dist/src/hmac/lengths.js":
/*!**************************************************************!*\
!*** ./node_modules/@libp2p/crypto/dist/src/hmac/lengths.js ***!
\**************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n SHA1: 20,\n SHA256: 32,\n SHA512: 64\n});\n//# sourceMappingURL=lengths.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/crypto/dist/src/hmac/lengths.js?");
/***/ }),
/***/ "./node_modules/@libp2p/crypto/dist/src/index.js":
/*!*******************************************************!*\
!*** ./node_modules/@libp2p/crypto/dist/src/index.js ***!
\*******************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ aes: () => (/* reexport module object */ _aes_index_js__WEBPACK_IMPORTED_MODULE_0__),\n/* harmony export */ hmac: () => (/* reexport module object */ _hmac_index_js__WEBPACK_IMPORTED_MODULE_1__),\n/* harmony export */ keys: () => (/* reexport module object */ _keys_index_js__WEBPACK_IMPORTED_MODULE_2__),\n/* harmony export */ pbkdf2: () => (/* reexport safe */ _pbkdf2_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]),\n/* harmony export */ randomBytes: () => (/* reexport safe */ _random_bytes_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])\n/* harmony export */ });\n/* harmony import */ var _aes_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./aes/index.js */ \"./node_modules/@libp2p/crypto/dist/src/aes/index.js\");\n/* harmony import */ var _hmac_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./hmac/index.js */ \"./node_modules/@libp2p/crypto/dist/src/hmac/index-browser.js\");\n/* harmony import */ var _keys_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./keys/index.js */ \"./node_modules/@libp2p/crypto/dist/src/keys/index.js\");\n/* harmony import */ var _pbkdf2_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./pbkdf2.js */ \"./node_modules/@libp2p/crypto/dist/src/pbkdf2.js\");\n/* harmony import */ var _random_bytes_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./random-bytes.js */ \"./node_modules/@libp2p/crypto/dist/src/random-bytes.js\");\n\n\n\n\n\n\n\n\n\n\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/crypto/dist/src/index.js?");
/***/ }),
/***/ "./node_modules/@libp2p/crypto/dist/src/keys/ecdh-browser.js":
/*!*******************************************************************!*\
!*** ./node_modules/@libp2p/crypto/dist/src/keys/ecdh-browser.js ***!
\*******************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ generateEphmeralKeyPair: () => (/* binding */ generateEphmeralKeyPair)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n/* harmony import */ var uint8arrays_concat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! uint8arrays/concat */ \"./node_modules/uint8arrays/dist/src/concat.js\");\n/* harmony import */ var uint8arrays_equals__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! uint8arrays/equals */ \"./node_modules/uint8arrays/dist/src/equals.js\");\n/* harmony import */ var uint8arrays_to_string__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! uint8arrays/to-string */ \"./node_modules/uint8arrays/dist/src/to-string.js\");\n/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util.js */ \"./node_modules/@libp2p/crypto/dist/src/util.js\");\n/* harmony import */ var _webcrypto_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../webcrypto.js */ \"./node_modules/@libp2p/crypto/dist/src/webcrypto.js\");\n\n\n\n\n\n\nconst bits = {\n 'P-256': 256,\n 'P-384': 384,\n 'P-521': 521\n};\nconst curveTypes = Object.keys(bits);\nconst names = curveTypes.join(' / ');\nasync function generateEphmeralKeyPair(curve) {\n if (curve !== 'P-256' && curve !== 'P-384' && curve !== 'P-521') {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__.CodeError(`Unknown curve: ${curve}. Must be ${names}`, 'ERR_INVALID_CURVE');\n }\n const pair = await _webcrypto_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"].get().subtle.generateKey({\n name: 'ECDH',\n namedCurve: curve\n }, true, ['deriveBits']);\n // forcePrivate is used for testing only\n const genSharedKey = async (theirPub, forcePrivate) => {\n let privateKey;\n if (forcePrivate != null) {\n privateKey = await _webcrypto_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"].get().subtle.importKey('jwk', unmarshalPrivateKey(curve, forcePrivate), {\n name: 'ECDH',\n namedCurve: curve\n }, false, ['deriveBits']);\n }\n else {\n privateKey = pair.privateKey;\n }\n const key = await _webcrypto_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"].get().subtle.importKey('jwk', unmarshalPublicKey(curve, theirPub), {\n name: 'ECDH',\n namedCurve: curve\n }, false, []);\n const buffer = await _webcrypto_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"].get().subtle.deriveBits({\n name: 'ECDH',\n // @ts-expect-error namedCurve is missing from the types\n namedCurve: curve,\n public: key\n }, privateKey, bits[curve]);\n return new Uint8Array(buffer, 0, buffer.byteLength);\n };\n const publicKey = await _webcrypto_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"].get().subtle.exportKey('jwk', pair.publicKey);\n const ecdhKey = {\n key: marshalPublicKey(publicKey),\n genSharedKey\n };\n return ecdhKey;\n}\nconst curveLengths = {\n 'P-256': 32,\n 'P-384': 48,\n 'P-521': 66\n};\n// Marshal converts a jwk encoded ECDH public key into the\n// form specified in section 4.3.6 of ANSI X9.62. (This is the format\n// go-ipfs uses)\nfunction marshalPublicKey(jwk) {\n if (jwk.crv == null || jwk.x == null || jwk.y == null) {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__.CodeError('JWK was missing components', 'ERR_INVALID_PARAMETERS');\n }\n if (jwk.crv !== 'P-256' && jwk.crv !== 'P-384' && jwk.crv !== 'P-521') {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__.CodeError(`Unknown curve: ${jwk.crv}. Must be ${names}`, 'ERR_INVALID_CURVE');\n }\n const byteLen = curveLengths[jwk.crv];\n return (0,uint8arrays_concat_
/***/ }),
/***/ "./node_modules/@libp2p/crypto/dist/src/keys/ed25519-browser.js":
/*!**********************************************************************!*\
!*** ./node_modules/@libp2p/crypto/dist/src/keys/ed25519-browser.js ***!
\**********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ generateKey: () => (/* binding */ generateKey),\n/* harmony export */ generateKeyFromSeed: () => (/* binding */ generateKeyFromSeed),\n/* harmony export */ hashAndSign: () => (/* binding */ hashAndSign),\n/* harmony export */ hashAndVerify: () => (/* binding */ hashAndVerify),\n/* harmony export */ privateKeyLength: () => (/* binding */ PRIVATE_KEY_BYTE_LENGTH),\n/* harmony export */ publicKeyLength: () => (/* binding */ PUBLIC_KEY_BYTE_LENGTH)\n/* harmony export */ });\n/* harmony import */ var _noble_ed25519__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @noble/ed25519 */ \"./node_modules/@noble/ed25519/lib/esm/index.js\");\n\nconst PUBLIC_KEY_BYTE_LENGTH = 32;\nconst PRIVATE_KEY_BYTE_LENGTH = 64; // private key is actually 32 bytes but for historical reasons we concat private and public keys\nconst KEYS_BYTE_LENGTH = 32;\n\n\nasync function generateKey() {\n // the actual private key (32 bytes)\n const privateKeyRaw = _noble_ed25519__WEBPACK_IMPORTED_MODULE_0__.utils.randomPrivateKey();\n const publicKey = await _noble_ed25519__WEBPACK_IMPORTED_MODULE_0__.getPublicKey(privateKeyRaw);\n // concatenated the public key to the private key\n const privateKey = concatKeys(privateKeyRaw, publicKey);\n return {\n privateKey,\n publicKey\n };\n}\n/**\n * Generate keypair from a 32 byte uint8array\n */\nasync function generateKeyFromSeed(seed) {\n if (seed.length !== KEYS_BYTE_LENGTH) {\n throw new TypeError('\"seed\" must be 32 bytes in length.');\n }\n else if (!(seed instanceof Uint8Array)) {\n throw new TypeError('\"seed\" must be a node.js Buffer, or Uint8Array.');\n }\n // based on node forges algorithm, the seed is used directly as private key\n const privateKeyRaw = seed;\n const publicKey = await _noble_ed25519__WEBPACK_IMPORTED_MODULE_0__.getPublicKey(privateKeyRaw);\n const privateKey = concatKeys(privateKeyRaw, publicKey);\n return {\n privateKey,\n publicKey\n };\n}\nasync function hashAndSign(privateKey, msg) {\n const privateKeyRaw = privateKey.subarray(0, KEYS_BYTE_LENGTH);\n return _noble_ed25519__WEBPACK_IMPORTED_MODULE_0__.sign(msg, privateKeyRaw);\n}\nasync function hashAndVerify(publicKey, sig, msg) {\n return _noble_ed25519__WEBPACK_IMPORTED_MODULE_0__.verify(sig, msg, publicKey);\n}\nfunction concatKeys(privateKeyRaw, publicKey) {\n const privateKey = new Uint8Array(PRIVATE_KEY_BYTE_LENGTH);\n for (let i = 0; i < KEYS_BYTE_LENGTH; i++) {\n privateKey[i] = privateKeyRaw[i];\n privateKey[KEYS_BYTE_LENGTH + i] = publicKey[i];\n }\n return privateKey;\n}\n//# sourceMappingURL=ed25519-browser.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/crypto/dist/src/keys/ed25519-browser.js?");
/***/ }),
/***/ "./node_modules/@libp2p/crypto/dist/src/keys/ed25519-class.js":
/*!********************************************************************!*\
!*** ./node_modules/@libp2p/crypto/dist/src/keys/ed25519-class.js ***!
\********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Ed25519PrivateKey: () => (/* binding */ Ed25519PrivateKey),\n/* harmony export */ Ed25519PublicKey: () => (/* binding */ Ed25519PublicKey),\n/* harmony export */ generateKeyPair: () => (/* binding */ generateKeyPair),\n/* harmony export */ generateKeyPairFromSeed: () => (/* binding */ generateKeyPairFromSeed),\n/* harmony export */ unmarshalEd25519PrivateKey: () => (/* binding */ unmarshalEd25519PrivateKey),\n/* harmony export */ unmarshalEd25519PublicKey: () => (/* binding */ unmarshalEd25519PublicKey)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n/* harmony import */ var multiformats_bases_base58__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! multiformats/bases/base58 */ \"./node_modules/multiformats/src/bases/base58.js\");\n/* harmony import */ var multiformats_hashes_identity__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! multiformats/hashes/identity */ \"./node_modules/multiformats/src/hashes/identity.js\");\n/* harmony import */ var multiformats_hashes_sha2__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! multiformats/hashes/sha2 */ \"./node_modules/multiformats/src/hashes/sha2-browser.js\");\n/* harmony import */ var uint8arrays_equals__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! uint8arrays/equals */ \"./node_modules/uint8arrays/dist/src/equals.js\");\n/* harmony import */ var _ed25519_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ed25519.js */ \"./node_modules/@libp2p/crypto/dist/src/keys/ed25519-browser.js\");\n/* harmony import */ var _exporter_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./exporter.js */ \"./node_modules/@libp2p/crypto/dist/src/keys/exporter.js\");\n/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./keys.js */ \"./node_modules/@libp2p/crypto/dist/src/keys/keys.js\");\n\n\n\n\n\n\n\n\nclass Ed25519PublicKey {\n _key;\n constructor(key) {\n this._key = ensureKey(key, _ed25519_js__WEBPACK_IMPORTED_MODULE_5__.publicKeyLength);\n }\n async verify(data, sig) {\n return _ed25519_js__WEBPACK_IMPORTED_MODULE_5__.hashAndVerify(this._key, sig, data);\n }\n marshal() {\n return this._key;\n }\n get bytes() {\n return _keys_js__WEBPACK_IMPORTED_MODULE_7__.PublicKey.encode({\n Type: _keys_js__WEBPACK_IMPORTED_MODULE_7__.KeyType.Ed25519,\n Data: this.marshal()\n }).subarray();\n }\n equals(key) {\n return (0,uint8arrays_equals__WEBPACK_IMPORTED_MODULE_4__.equals)(this.bytes, key.bytes);\n }\n async hash() {\n const { bytes } = await multiformats_hashes_sha2__WEBPACK_IMPORTED_MODULE_3__.sha256.digest(this.bytes);\n return bytes;\n }\n}\nclass Ed25519PrivateKey {\n _key;\n _publicKey;\n // key - 64 byte Uint8Array containing private key\n // publicKey - 32 byte Uint8Array containing public key\n constructor(key, publicKey) {\n this._key = ensureKey(key, _ed25519_js__WEBPACK_IMPORTED_MODULE_5__.privateKeyLength);\n this._publicKey = ensureKey(publicKey, _ed25519_js__WEBPACK_IMPORTED_MODULE_5__.publicKeyLength);\n }\n async sign(message) {\n return _ed25519_js__WEBPACK_IMPORTED_MODULE_5__.hashAndSign(this._key, message);\n }\n get public() {\n return new Ed25519PublicKey(this._publicKey);\n }\n marshal() {\n return this._key;\n }\n get bytes() {\n return _keys_js__WEBPACK_IMPORTED_MODULE_7__.PrivateKey.encode({\n Type: _keys_js__WEBPACK_IMPORTED_MODULE_7__.KeyType.Ed25519,\n Data: this.marshal()\n }).subarray();\n }\n equals(key) {\n return (0,uint8arrays_equals__WEBPACK_IMPORTED_MODULE_4__.equals)(this.bytes, key.bytes);\n }\n async hash() {\n
/***/ }),
/***/ "./node_modules/@libp2p/crypto/dist/src/keys/ephemeral-keys.js":
/*!*********************************************************************!*\
!*** ./node_modules/@libp2p/crypto/dist/src/keys/ephemeral-keys.js ***!
\*********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _ecdh_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ecdh.js */ \"./node_modules/@libp2p/crypto/dist/src/keys/ecdh-browser.js\");\n\n/**\n * Generates an ephemeral public key and returns a function that will compute\n * the shared secret key.\n *\n * Focuses only on ECDH now, but can be made more general in the future.\n */\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_ecdh_js__WEBPACK_IMPORTED_MODULE_0__.generateEphmeralKeyPair);\n//# sourceMappingURL=ephemeral-keys.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/crypto/dist/src/keys/ephemeral-keys.js?");
/***/ }),
/***/ "./node_modules/@libp2p/crypto/dist/src/keys/exporter.js":
/*!***************************************************************!*\
!*** ./node_modules/@libp2p/crypto/dist/src/keys/exporter.js ***!
\***************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ exporter: () => (/* binding */ exporter)\n/* harmony export */ });\n/* harmony import */ var multiformats_bases_base64__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! multiformats/bases/base64 */ \"./node_modules/multiformats/src/bases/base64.js\");\n/* harmony import */ var _ciphers_aes_gcm_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ciphers/aes-gcm.js */ \"./node_modules/@libp2p/crypto/dist/src/ciphers/aes-gcm.browser.js\");\n\n\n/**\n * Exports the given PrivateKey as a base64 encoded string.\n * The PrivateKey is encrypted via a password derived PBKDF2 key\n * leveraging the aes-gcm cipher algorithm.\n */\nasync function exporter(privateKey, password) {\n const cipher = _ciphers_aes_gcm_js__WEBPACK_IMPORTED_MODULE_1__.create();\n const encryptedKey = await cipher.encrypt(privateKey, password);\n return multiformats_bases_base64__WEBPACK_IMPORTED_MODULE_0__.base64.encode(encryptedKey);\n}\n//# sourceMappingURL=exporter.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/crypto/dist/src/keys/exporter.js?");
/***/ }),
/***/ "./node_modules/@libp2p/crypto/dist/src/keys/importer.js":
/*!***************************************************************!*\
!*** ./node_modules/@libp2p/crypto/dist/src/keys/importer.js ***!
\***************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ importer: () => (/* binding */ importer)\n/* harmony export */ });\n/* harmony import */ var multiformats_bases_base64__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! multiformats/bases/base64 */ \"./node_modules/multiformats/src/bases/base64.js\");\n/* harmony import */ var _ciphers_aes_gcm_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ciphers/aes-gcm.js */ \"./node_modules/@libp2p/crypto/dist/src/ciphers/aes-gcm.browser.js\");\n\n\n/**\n * Attempts to decrypt a base64 encoded PrivateKey string\n * with the given password. The privateKey must have been exported\n * using the same password and underlying cipher (aes-gcm)\n */\nasync function importer(privateKey, password) {\n const encryptedKey = multiformats_bases_base64__WEBPACK_IMPORTED_MODULE_0__.base64.decode(privateKey);\n const cipher = _ciphers_aes_gcm_js__WEBPACK_IMPORTED_MODULE_1__.create();\n return cipher.decrypt(encryptedKey, password);\n}\n//# sourceMappingURL=importer.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/crypto/dist/src/keys/importer.js?");
/***/ }),
/***/ "./node_modules/@libp2p/crypto/dist/src/keys/index.js":
/*!************************************************************!*\
!*** ./node_modules/@libp2p/crypto/dist/src/keys/index.js ***!
\************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ generateEphemeralKeyPair: () => (/* reexport safe */ _ephemeral_keys_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"]),\n/* harmony export */ generateKeyPair: () => (/* binding */ generateKeyPair),\n/* harmony export */ generateKeyPairFromSeed: () => (/* binding */ generateKeyPairFromSeed),\n/* harmony export */ importKey: () => (/* binding */ importKey),\n/* harmony export */ keyStretcher: () => (/* reexport safe */ _key_stretcher_js__WEBPACK_IMPORTED_MODULE_8__.keyStretcher),\n/* harmony export */ keysPBM: () => (/* reexport module object */ _keys_js__WEBPACK_IMPORTED_MODULE_9__),\n/* harmony export */ marshalPrivateKey: () => (/* binding */ marshalPrivateKey),\n/* harmony export */ marshalPublicKey: () => (/* binding */ marshalPublicKey),\n/* harmony export */ supportedKeys: () => (/* binding */ supportedKeys),\n/* harmony export */ unmarshalPrivateKey: () => (/* binding */ unmarshalPrivateKey),\n/* harmony export */ unmarshalPublicKey: () => (/* binding */ unmarshalPublicKey)\n/* harmony export */ });\n/* harmony import */ var node_forge_lib_asn1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! node-forge/lib/asn1.js */ \"./node_modules/node-forge/lib/asn1.js\");\n/* harmony import */ var node_forge_lib_pbe_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! node-forge/lib/pbe.js */ \"./node_modules/node-forge/lib/pbe.js\");\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n/* harmony import */ var node_forge_lib_forge_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! node-forge/lib/forge.js */ \"./node_modules/node-forge/lib/forge.js\");\n/* harmony import */ var uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! uint8arrays/from-string */ \"./node_modules/uint8arrays/dist/src/from-string.js\");\n/* harmony import */ var _ed25519_class_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ed25519-class.js */ \"./node_modules/@libp2p/crypto/dist/src/keys/ed25519-class.js\");\n/* harmony import */ var _ephemeral_keys_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ephemeral-keys.js */ \"./node_modules/@libp2p/crypto/dist/src/keys/ephemeral-keys.js\");\n/* harmony import */ var _importer_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./importer.js */ \"./node_modules/@libp2p/crypto/dist/src/keys/importer.js\");\n/* harmony import */ var _key_stretcher_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./key-stretcher.js */ \"./node_modules/@libp2p/crypto/dist/src/keys/key-stretcher.js\");\n/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./keys.js */ \"./node_modules/@libp2p/crypto/dist/src/keys/keys.js\");\n/* harmony import */ var _rsa_class_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./rsa-class.js */ \"./node_modules/@libp2p/crypto/dist/src/keys/rsa-class.js\");\n/* harmony import */ var _secp256k1_class_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./secp256k1-class.js */ \"./node_modules/@libp2p/crypto/dist/src/keys/secp256k1-class.js\");\n\n\n\n// @ts-expect-error types are missing\n\n\n\n\n\n\n\n\n\n\n\n\nconst supportedKeys = {\n rsa: _rsa_class_js__WEBPACK_IMPORTED_MODULE_10__,\n ed25519: _ed25519_class_js__WEBPACK_IMPORTED_MODULE_5__,\n secp256k1: _secp256k1_class_js__WEBPACK_IMPORTED_MODULE_11__\n};\nfunction unsupportedKey(type) {\n const supported = Object.keys(supportedKeys).join(' / ');\n return new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_2__.CodeError(`invalid or unsupported key type ${type}. Must be ${supported}`, 'ERR_UNSUPPORTED_KEY_TYPE');\n}\nfunction typeToKey(type) {\n type = type.toLowerCase();\n if (type === 'rsa' || type === 'ed25519' || type === 'secp256k1') {\n return supportedKeys[type];\n }\n t
/***/ }),
/***/ "./node_modules/@libp2p/crypto/dist/src/keys/jwk2pem.js":
/*!**************************************************************!*\
!*** ./node_modules/@libp2p/crypto/dist/src/keys/jwk2pem.js ***!
\**************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ jwk2priv: () => (/* binding */ jwk2priv),\n/* harmony export */ jwk2pub: () => (/* binding */ jwk2pub)\n/* harmony export */ });\n/* harmony import */ var node_forge_lib_rsa_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! node-forge/lib/rsa.js */ \"./node_modules/node-forge/lib/rsa.js\");\n/* harmony import */ var node_forge_lib_forge_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! node-forge/lib/forge.js */ \"./node_modules/node-forge/lib/forge.js\");\n/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util.js */ \"./node_modules/@libp2p/crypto/dist/src/util.js\");\n\n// @ts-expect-error types are missing\n\n\nfunction convert(key, types) {\n return types.map(t => (0,_util_js__WEBPACK_IMPORTED_MODULE_2__.base64urlToBigInteger)(key[t]));\n}\nfunction jwk2priv(key) {\n return node_forge_lib_forge_js__WEBPACK_IMPORTED_MODULE_1__.pki.setRsaPrivateKey(...convert(key, ['n', 'e', 'd', 'p', 'q', 'dp', 'dq', 'qi']));\n}\nfunction jwk2pub(key) {\n return node_forge_lib_forge_js__WEBPACK_IMPORTED_MODULE_1__.pki.setRsaPublicKey(...convert(key, ['n', 'e']));\n}\n//# sourceMappingURL=jwk2pem.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/crypto/dist/src/keys/jwk2pem.js?");
/***/ }),
/***/ "./node_modules/@libp2p/crypto/dist/src/keys/key-stretcher.js":
/*!********************************************************************!*\
!*** ./node_modules/@libp2p/crypto/dist/src/keys/key-stretcher.js ***!
\********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ keyStretcher: () => (/* binding */ keyStretcher)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n/* harmony import */ var uint8arrays_concat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! uint8arrays/concat */ \"./node_modules/uint8arrays/dist/src/concat.js\");\n/* harmony import */ var uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! uint8arrays/from-string */ \"./node_modules/uint8arrays/dist/src/from-string.js\");\n/* harmony import */ var _hmac_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../hmac/index.js */ \"./node_modules/@libp2p/crypto/dist/src/hmac/index-browser.js\");\n\n\n\n\nconst cipherMap = {\n 'AES-128': {\n ivSize: 16,\n keySize: 16\n },\n 'AES-256': {\n ivSize: 16,\n keySize: 32\n },\n Blowfish: {\n ivSize: 8,\n keySize: 32\n }\n};\n/**\n * Generates a set of keys for each party by stretching the shared key.\n * (myIV, theirIV, myCipherKey, theirCipherKey, myMACKey, theirMACKey)\n */\nasync function keyStretcher(cipherType, hash, secret) {\n const cipher = cipherMap[cipherType];\n if (cipher == null) {\n const allowed = Object.keys(cipherMap).join(' / ');\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__.CodeError(`unknown cipher type '${cipherType}'. Must be ${allowed}`, 'ERR_INVALID_CIPHER_TYPE');\n }\n if (hash == null) {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__.CodeError('missing hash type', 'ERR_MISSING_HASH_TYPE');\n }\n const cipherKeySize = cipher.keySize;\n const ivSize = cipher.ivSize;\n const hmacKeySize = 20;\n const seed = (0,uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_2__.fromString)('key expansion');\n const resultLength = 2 * (ivSize + cipherKeySize + hmacKeySize);\n const m = await _hmac_index_js__WEBPACK_IMPORTED_MODULE_3__.create(hash, secret);\n let a = await m.digest(seed);\n const result = [];\n let j = 0;\n while (j < resultLength) {\n const b = await m.digest((0,uint8arrays_concat__WEBPACK_IMPORTED_MODULE_1__.concat)([a, seed]));\n let todo = b.length;\n if (j + todo > resultLength) {\n todo = resultLength - j;\n }\n result.push(b);\n j += todo;\n a = await m.digest(a);\n }\n const half = resultLength / 2;\n const resultBuffer = (0,uint8arrays_concat__WEBPACK_IMPORTED_MODULE_1__.concat)(result);\n const r1 = resultBuffer.subarray(0, half);\n const r2 = resultBuffer.subarray(half, resultLength);\n const createKey = (res) => ({\n iv: res.subarray(0, ivSize),\n cipherKey: res.subarray(ivSize, ivSize + cipherKeySize),\n macKey: res.subarray(ivSize + cipherKeySize)\n });\n return {\n k1: createKey(r1),\n k2: createKey(r2)\n };\n}\n//# sourceMappingURL=key-stretcher.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/crypto/dist/src/keys/key-stretcher.js?");
/***/ }),
/***/ "./node_modules/@libp2p/crypto/dist/src/keys/keys.js":
/*!***********************************************************!*\
!*** ./node_modules/@libp2p/crypto/dist/src/keys/keys.js ***!
\***********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ KeyType: () => (/* binding */ KeyType),\n/* harmony export */ PrivateKey: () => (/* binding */ PrivateKey),\n/* harmony export */ PublicKey: () => (/* binding */ PublicKey)\n/* harmony export */ });\n/* harmony import */ var protons_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! protons-runtime */ \"./node_modules/protons-runtime/dist/src/index.js\");\n/* eslint-disable import/export */\n/* eslint-disable complexity */\n/* eslint-disable @typescript-eslint/no-namespace */\n/* eslint-disable @typescript-eslint/no-unnecessary-boolean-literal-compare */\n/* eslint-disable @typescript-eslint/no-empty-interface */\n\nvar KeyType;\n(function (KeyType) {\n KeyType[\"RSA\"] = \"RSA\";\n KeyType[\"Ed25519\"] = \"Ed25519\";\n KeyType[\"Secp256k1\"] = \"Secp256k1\";\n})(KeyType || (KeyType = {}));\nvar __KeyTypeValues;\n(function (__KeyTypeValues) {\n __KeyTypeValues[__KeyTypeValues[\"RSA\"] = 0] = \"RSA\";\n __KeyTypeValues[__KeyTypeValues[\"Ed25519\"] = 1] = \"Ed25519\";\n __KeyTypeValues[__KeyTypeValues[\"Secp256k1\"] = 2] = \"Secp256k1\";\n})(__KeyTypeValues || (__KeyTypeValues = {}));\n(function (KeyType) {\n KeyType.codec = () => {\n return (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.enumeration)(__KeyTypeValues);\n };\n})(KeyType || (KeyType = {}));\nvar PublicKey;\n(function (PublicKey) {\n let _codec;\n PublicKey.codec = () => {\n if (_codec == null) {\n _codec = (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.message)((obj, w, opts = {}) => {\n if (opts.lengthDelimited !== false) {\n w.fork();\n }\n if (obj.Type != null) {\n w.uint32(8);\n KeyType.codec().encode(obj.Type, w);\n }\n if (obj.Data != null) {\n w.uint32(18);\n w.bytes(obj.Data);\n }\n if (opts.lengthDelimited !== false) {\n w.ldelim();\n }\n }, (reader, length) => {\n const obj = {};\n const end = length == null ? reader.len : reader.pos + length;\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n obj.Type = KeyType.codec().decode(reader);\n break;\n case 2:\n obj.Data = reader.bytes();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return obj;\n });\n }\n return _codec;\n };\n PublicKey.encode = (obj) => {\n return (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.encodeMessage)(obj, PublicKey.codec());\n };\n PublicKey.decode = (buf) => {\n return (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.decodeMessage)(buf, PublicKey.codec());\n };\n})(PublicKey || (PublicKey = {}));\nvar PrivateKey;\n(function (PrivateKey) {\n let _codec;\n PrivateKey.codec = () => {\n if (_codec == null) {\n _codec = (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.message)((obj, w, opts = {}) => {\n if (opts.lengthDelimited !== false) {\n w.fork();\n }\n if (obj.Type != null) {\n w.uint32(8);\n KeyType.codec().encode(obj.Type, w);\n }\n if (obj.Data != null) {\n w.uint32(18);\n w.bytes(obj.Data);\n }\n if (opts.lengthDelimited !== false) {\n w.ldelim();\n }\n }, (reader, length) => {\n
/***/ }),
/***/ "./node_modules/@libp2p/crypto/dist/src/keys/rsa-browser.js":
/*!******************************************************************!*\
!*** ./node_modules/@libp2p/crypto/dist/src/keys/rsa-browser.js ***!
\******************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ decrypt: () => (/* binding */ decrypt),\n/* harmony export */ encrypt: () => (/* binding */ encrypt),\n/* harmony export */ generateKey: () => (/* binding */ generateKey),\n/* harmony export */ getRandomValues: () => (/* reexport safe */ _random_bytes_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]),\n/* harmony export */ hashAndSign: () => (/* binding */ hashAndSign),\n/* harmony export */ hashAndVerify: () => (/* binding */ hashAndVerify),\n/* harmony export */ unmarshalPrivateKey: () => (/* binding */ unmarshalPrivateKey),\n/* harmony export */ utils: () => (/* reexport module object */ _rsa_utils_js__WEBPACK_IMPORTED_MODULE_6__)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n/* harmony import */ var uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! uint8arrays/from-string */ \"./node_modules/uint8arrays/dist/src/from-string.js\");\n/* harmony import */ var uint8arrays_to_string__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! uint8arrays/to-string */ \"./node_modules/uint8arrays/dist/src/to-string.js\");\n/* harmony import */ var _random_bytes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../random-bytes.js */ \"./node_modules/@libp2p/crypto/dist/src/random-bytes.js\");\n/* harmony import */ var _webcrypto_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../webcrypto.js */ \"./node_modules/@libp2p/crypto/dist/src/webcrypto.js\");\n/* harmony import */ var _jwk2pem_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./jwk2pem.js */ \"./node_modules/@libp2p/crypto/dist/src/keys/jwk2pem.js\");\n/* harmony import */ var _rsa_utils_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./rsa-utils.js */ \"./node_modules/@libp2p/crypto/dist/src/keys/rsa-utils.js\");\n\n\n\n\n\n\n\n\nasync function generateKey(bits) {\n const pair = await _webcrypto_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].get().subtle.generateKey({\n name: 'RSASSA-PKCS1-v1_5',\n modulusLength: bits,\n publicExponent: new Uint8Array([0x01, 0x00, 0x01]),\n hash: { name: 'SHA-256' }\n }, true, ['sign', 'verify']);\n const keys = await exportKey(pair);\n return {\n privateKey: keys[0],\n publicKey: keys[1]\n };\n}\n// Takes a jwk key\nasync function unmarshalPrivateKey(key) {\n const privateKey = await _webcrypto_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].get().subtle.importKey('jwk', key, {\n name: 'RSASSA-PKCS1-v1_5',\n hash: { name: 'SHA-256' }\n }, true, ['sign']);\n const pair = [\n privateKey,\n await derivePublicFromPrivate(key)\n ];\n const keys = await exportKey({\n privateKey: pair[0],\n publicKey: pair[1]\n });\n return {\n privateKey: keys[0],\n publicKey: keys[1]\n };\n}\n\nasync function hashAndSign(key, msg) {\n const privateKey = await _webcrypto_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].get().subtle.importKey('jwk', key, {\n name: 'RSASSA-PKCS1-v1_5',\n hash: { name: 'SHA-256' }\n }, false, ['sign']);\n const sig = await _webcrypto_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].get().subtle.sign({ name: 'RSASSA-PKCS1-v1_5' }, privateKey, Uint8Array.from(msg));\n return new Uint8Array(sig, 0, sig.byteLength);\n}\nasync function hashAndVerify(key, sig, msg) {\n const publicKey = await _webcrypto_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].get().subtle.importKey('jwk', key, {\n name: 'RSASSA-PKCS1-v1_5',\n hash: { name: 'SHA-256' }\n }, false, ['verify']);\n return _webcrypto_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].get().subtle.verify({ name: 'RSASSA-PKCS1-v1_5' }, publicKey, sig, msg);\n}\nasync function exportKey(pair) {\n if (pair.privateKey == null || pair.pu
/***/ }),
/***/ "./node_modules/@libp2p/crypto/dist/src/keys/rsa-class.js":
/*!****************************************************************!*\
!*** ./node_modules/@libp2p/crypto/dist/src/keys/rsa-class.js ***!
\****************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ RsaPrivateKey: () => (/* binding */ RsaPrivateKey),\n/* harmony export */ RsaPublicKey: () => (/* binding */ RsaPublicKey),\n/* harmony export */ fromJwk: () => (/* binding */ fromJwk),\n/* harmony export */ generateKeyPair: () => (/* binding */ generateKeyPair),\n/* harmony export */ unmarshalRsaPrivateKey: () => (/* binding */ unmarshalRsaPrivateKey),\n/* harmony export */ unmarshalRsaPublicKey: () => (/* binding */ unmarshalRsaPublicKey)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n/* harmony import */ var multiformats_hashes_sha2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! multiformats/hashes/sha2 */ \"./node_modules/multiformats/src/hashes/sha2-browser.js\");\n/* harmony import */ var node_forge_lib_forge_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! node-forge/lib/forge.js */ \"./node_modules/node-forge/lib/forge.js\");\n/* harmony import */ var uint8arrays_equals__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! uint8arrays/equals */ \"./node_modules/uint8arrays/dist/src/equals.js\");\n/* harmony import */ var node_forge_lib_sha512_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! node-forge/lib/sha512.js */ \"./node_modules/node-forge/lib/sha512.js\");\n/* harmony import */ var uint8arrays_to_string__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! uint8arrays/to-string */ \"./node_modules/uint8arrays/dist/src/to-string.js\");\n/* harmony import */ var _exporter_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./exporter.js */ \"./node_modules/@libp2p/crypto/dist/src/keys/exporter.js\");\n/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./keys.js */ \"./node_modules/@libp2p/crypto/dist/src/keys/keys.js\");\n/* harmony import */ var _rsa_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./rsa.js */ \"./node_modules/@libp2p/crypto/dist/src/keys/rsa-browser.js\");\n\n\n// @ts-expect-error types are missing\n\n\n\n\n\n\n\nclass RsaPublicKey {\n _key;\n constructor(key) {\n this._key = key;\n }\n async verify(data, sig) {\n return _rsa_js__WEBPACK_IMPORTED_MODULE_8__.hashAndVerify(this._key, sig, data);\n }\n marshal() {\n return _rsa_js__WEBPACK_IMPORTED_MODULE_8__.utils.jwkToPkix(this._key);\n }\n get bytes() {\n return _keys_js__WEBPACK_IMPORTED_MODULE_7__.PublicKey.encode({\n Type: _keys_js__WEBPACK_IMPORTED_MODULE_7__.KeyType.RSA,\n Data: this.marshal()\n }).subarray();\n }\n encrypt(bytes) {\n return _rsa_js__WEBPACK_IMPORTED_MODULE_8__.encrypt(this._key, bytes);\n }\n equals(key) {\n return (0,uint8arrays_equals__WEBPACK_IMPORTED_MODULE_3__.equals)(this.bytes, key.bytes);\n }\n async hash() {\n const { bytes } = await multiformats_hashes_sha2__WEBPACK_IMPORTED_MODULE_1__.sha256.digest(this.bytes);\n return bytes;\n }\n}\nclass RsaPrivateKey {\n _key;\n _publicKey;\n constructor(key, publicKey) {\n this._key = key;\n this._publicKey = publicKey;\n }\n genSecret() {\n return _rsa_js__WEBPACK_IMPORTED_MODULE_8__.getRandomValues(16);\n }\n async sign(message) {\n return _rsa_js__WEBPACK_IMPORTED_MODULE_8__.hashAndSign(this._key, message);\n }\n get public() {\n if (this._publicKey == null) {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__.CodeError('public key not provided', 'ERR_PUBKEY_NOT_PROVIDED');\n }\n return new RsaPublicKey(this._publicKey);\n }\n decrypt(bytes) {\n return _rsa_js__WEBPACK_IMPORTED_MODULE_8__.decrypt(this._key, bytes);\n }\n marshal() {\n return _rsa_js__WEBPACK_IMPORTED_MODULE_8__.utils.jwkToPkcs1(this._key);\n
/***/ }),
/***/ "./node_modules/@libp2p/crypto/dist/src/keys/rsa-utils.js":
/*!****************************************************************!*\
!*** ./node_modules/@libp2p/crypto/dist/src/keys/rsa-utils.js ***!
\****************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ jwkToPkcs1: () => (/* binding */ jwkToPkcs1),\n/* harmony export */ jwkToPkix: () => (/* binding */ jwkToPkix),\n/* harmony export */ pkcs1ToJwk: () => (/* binding */ pkcs1ToJwk),\n/* harmony export */ pkixToJwk: () => (/* binding */ pkixToJwk)\n/* harmony export */ });\n/* harmony import */ var node_forge_lib_asn1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! node-forge/lib/asn1.js */ \"./node_modules/node-forge/lib/asn1.js\");\n/* harmony import */ var node_forge_lib_rsa_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! node-forge/lib/rsa.js */ \"./node_modules/node-forge/lib/rsa.js\");\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n/* harmony import */ var node_forge_lib_forge_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! node-forge/lib/forge.js */ \"./node_modules/node-forge/lib/forge.js\");\n/* harmony import */ var uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! uint8arrays/from-string */ \"./node_modules/uint8arrays/dist/src/from-string.js\");\n/* harmony import */ var uint8arrays_to_string__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! uint8arrays/to-string */ \"./node_modules/uint8arrays/dist/src/to-string.js\");\n/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./../util.js */ \"./node_modules/@libp2p/crypto/dist/src/util.js\");\n\n\n\n// @ts-expect-error types are missing\n\n\n\n\n// Convert a PKCS#1 in ASN1 DER format to a JWK key\nfunction pkcs1ToJwk(bytes) {\n const asn1 = node_forge_lib_forge_js__WEBPACK_IMPORTED_MODULE_3__.asn1.fromDer((0,uint8arrays_to_string__WEBPACK_IMPORTED_MODULE_5__.toString)(bytes, 'ascii'));\n const privateKey = node_forge_lib_forge_js__WEBPACK_IMPORTED_MODULE_3__.pki.privateKeyFromAsn1(asn1);\n // https://tools.ietf.org/html/rfc7518#section-6.3.1\n return {\n kty: 'RSA',\n n: (0,_util_js__WEBPACK_IMPORTED_MODULE_6__.bigIntegerToUintBase64url)(privateKey.n),\n e: (0,_util_js__WEBPACK_IMPORTED_MODULE_6__.bigIntegerToUintBase64url)(privateKey.e),\n d: (0,_util_js__WEBPACK_IMPORTED_MODULE_6__.bigIntegerToUintBase64url)(privateKey.d),\n p: (0,_util_js__WEBPACK_IMPORTED_MODULE_6__.bigIntegerToUintBase64url)(privateKey.p),\n q: (0,_util_js__WEBPACK_IMPORTED_MODULE_6__.bigIntegerToUintBase64url)(privateKey.q),\n dp: (0,_util_js__WEBPACK_IMPORTED_MODULE_6__.bigIntegerToUintBase64url)(privateKey.dP),\n dq: (0,_util_js__WEBPACK_IMPORTED_MODULE_6__.bigIntegerToUintBase64url)(privateKey.dQ),\n qi: (0,_util_js__WEBPACK_IMPORTED_MODULE_6__.bigIntegerToUintBase64url)(privateKey.qInv),\n alg: 'RS256'\n };\n}\n// Convert a JWK key into PKCS#1 in ASN1 DER format\nfunction jwkToPkcs1(jwk) {\n if (jwk.n == null || jwk.e == null || jwk.d == null || jwk.p == null || jwk.q == null || jwk.dp == null || jwk.dq == null || jwk.qi == null) {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_2__.CodeError('JWK was missing components', 'ERR_INVALID_PARAMETERS');\n }\n const asn1 = node_forge_lib_forge_js__WEBPACK_IMPORTED_MODULE_3__.pki.privateKeyToAsn1({\n n: (0,_util_js__WEBPACK_IMPORTED_MODULE_6__.base64urlToBigInteger)(jwk.n),\n e: (0,_util_js__WEBPACK_IMPORTED_MODULE_6__.base64urlToBigInteger)(jwk.e),\n d: (0,_util_js__WEBPACK_IMPORTED_MODULE_6__.base64urlToBigInteger)(jwk.d),\n p: (0,_util_js__WEBPACK_IMPORTED_MODULE_6__.base64urlToBigInteger)(jwk.p),\n q: (0,_util_js__WEBPACK_IMPORTED_MODULE_6__.base64urlToBigInteger)(jwk.q),\n dP: (0,_util_js__WEBPACK_IMPORTED_MODULE_6__.base64urlToBigInteger)(jwk.dp),\n dQ: (0,_util_js__WEBPACK_IMPORTED_MODULE_6__.base64urlToBigInteger)(jwk.dq),\n qInv: (0,_util_js__WEBPACK_IMPORTED_MODULE_6__.base64u
/***/ }),
/***/ "./node_modules/@libp2p/crypto/dist/src/keys/secp256k1-class.js":
/*!**********************************************************************!*\
!*** ./node_modules/@libp2p/crypto/dist/src/keys/secp256k1-class.js ***!
\**********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Secp256k1PrivateKey: () => (/* binding */ Secp256k1PrivateKey),\n/* harmony export */ Secp256k1PublicKey: () => (/* binding */ Secp256k1PublicKey),\n/* harmony export */ generateKeyPair: () => (/* binding */ generateKeyPair),\n/* harmony export */ unmarshalSecp256k1PrivateKey: () => (/* binding */ unmarshalSecp256k1PrivateKey),\n/* harmony export */ unmarshalSecp256k1PublicKey: () => (/* binding */ unmarshalSecp256k1PublicKey)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n/* harmony import */ var multiformats_hashes_sha2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! multiformats/hashes/sha2 */ \"./node_modules/multiformats/src/hashes/sha2-browser.js\");\n/* harmony import */ var uint8arrays_equals__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! uint8arrays/equals */ \"./node_modules/uint8arrays/dist/src/equals.js\");\n/* harmony import */ var uint8arrays_to_string__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! uint8arrays/to-string */ \"./node_modules/uint8arrays/dist/src/to-string.js\");\n/* harmony import */ var _exporter_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./exporter.js */ \"./node_modules/@libp2p/crypto/dist/src/keys/exporter.js\");\n/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./keys.js */ \"./node_modules/@libp2p/crypto/dist/src/keys/keys.js\");\n/* harmony import */ var _secp256k1_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./secp256k1.js */ \"./node_modules/@libp2p/crypto/dist/src/keys/secp256k1.js\");\n\n\n\n\n\n\n\nclass Secp256k1PublicKey {\n _key;\n constructor(key) {\n _secp256k1_js__WEBPACK_IMPORTED_MODULE_6__.validatePublicKey(key);\n this._key = key;\n }\n async verify(data, sig) {\n return _secp256k1_js__WEBPACK_IMPORTED_MODULE_6__.hashAndVerify(this._key, sig, data);\n }\n marshal() {\n return _secp256k1_js__WEBPACK_IMPORTED_MODULE_6__.compressPublicKey(this._key);\n }\n get bytes() {\n return _keys_js__WEBPACK_IMPORTED_MODULE_5__.PublicKey.encode({\n Type: _keys_js__WEBPACK_IMPORTED_MODULE_5__.KeyType.Secp256k1,\n Data: this.marshal()\n }).subarray();\n }\n equals(key) {\n return (0,uint8arrays_equals__WEBPACK_IMPORTED_MODULE_2__.equals)(this.bytes, key.bytes);\n }\n async hash() {\n const { bytes } = await multiformats_hashes_sha2__WEBPACK_IMPORTED_MODULE_1__.sha256.digest(this.bytes);\n return bytes;\n }\n}\nclass Secp256k1PrivateKey {\n _key;\n _publicKey;\n constructor(key, publicKey) {\n this._key = key;\n this._publicKey = publicKey ?? _secp256k1_js__WEBPACK_IMPORTED_MODULE_6__.computePublicKey(key);\n _secp256k1_js__WEBPACK_IMPORTED_MODULE_6__.validatePrivateKey(this._key);\n _secp256k1_js__WEBPACK_IMPORTED_MODULE_6__.validatePublicKey(this._publicKey);\n }\n async sign(message) {\n return _secp256k1_js__WEBPACK_IMPORTED_MODULE_6__.hashAndSign(this._key, message);\n }\n get public() {\n return new Secp256k1PublicKey(this._publicKey);\n }\n marshal() {\n return this._key;\n }\n get bytes() {\n return _keys_js__WEBPACK_IMPORTED_MODULE_5__.PrivateKey.encode({\n Type: _keys_js__WEBPACK_IMPORTED_MODULE_5__.KeyType.Secp256k1,\n Data: this.marshal()\n }).subarray();\n }\n equals(key) {\n return (0,uint8arrays_equals__WEBPACK_IMPORTED_MODULE_2__.equals)(this.bytes, key.bytes);\n }\n async hash() {\n const { bytes } = await multiformats_hashes_sha2__WEBPACK_IMPORTED_MODULE_1__.sha256.digest(this.bytes);\n return bytes;\n }\n /**\n * Gets the ID of the key.\n *\n * The key id is the base58 encodi
/***/ }),
/***/ "./node_modules/@libp2p/crypto/dist/src/keys/secp256k1.js":
/*!****************************************************************!*\
!*** ./node_modules/@libp2p/crypto/dist/src/keys/secp256k1.js ***!
\****************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ compressPublicKey: () => (/* binding */ compressPublicKey),\n/* harmony export */ computePublicKey: () => (/* binding */ computePublicKey),\n/* harmony export */ decompressPublicKey: () => (/* binding */ decompressPublicKey),\n/* harmony export */ generateKey: () => (/* binding */ generateKey),\n/* harmony export */ hashAndSign: () => (/* binding */ hashAndSign),\n/* harmony export */ hashAndVerify: () => (/* binding */ hashAndVerify),\n/* harmony export */ privateKeyLength: () => (/* binding */ PRIVATE_KEY_BYTE_LENGTH),\n/* harmony export */ validatePrivateKey: () => (/* binding */ validatePrivateKey),\n/* harmony export */ validatePublicKey: () => (/* binding */ validatePublicKey)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n/* harmony import */ var _noble_secp256k1__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @noble/secp256k1 */ \"./node_modules/@noble/secp256k1/lib/esm/index.js\");\n/* harmony import */ var multiformats_hashes_sha2__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! multiformats/hashes/sha2 */ \"./node_modules/multiformats/src/hashes/sha2-browser.js\");\n\n\n\nconst PRIVATE_KEY_BYTE_LENGTH = 32;\n\nfunction generateKey() {\n return _noble_secp256k1__WEBPACK_IMPORTED_MODULE_1__.utils.randomPrivateKey();\n}\n/**\n * Hash and sign message with private key\n */\nasync function hashAndSign(key, msg) {\n const { digest } = await multiformats_hashes_sha2__WEBPACK_IMPORTED_MODULE_2__.sha256.digest(msg);\n try {\n return await _noble_secp256k1__WEBPACK_IMPORTED_MODULE_1__.sign(digest, key);\n }\n catch (err) {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__.CodeError(String(err), 'ERR_INVALID_INPUT');\n }\n}\n/**\n * Hash message and verify signature with public key\n */\nasync function hashAndVerify(key, sig, msg) {\n try {\n const { digest } = await multiformats_hashes_sha2__WEBPACK_IMPORTED_MODULE_2__.sha256.digest(msg);\n return _noble_secp256k1__WEBPACK_IMPORTED_MODULE_1__.verify(sig, digest, key);\n }\n catch (err) {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__.CodeError(String(err), 'ERR_INVALID_INPUT');\n }\n}\nfunction compressPublicKey(key) {\n const point = _noble_secp256k1__WEBPACK_IMPORTED_MODULE_1__.Point.fromHex(key).toRawBytes(true);\n return point;\n}\nfunction decompressPublicKey(key) {\n const point = _noble_secp256k1__WEBPACK_IMPORTED_MODULE_1__.Point.fromHex(key).toRawBytes(false);\n return point;\n}\nfunction validatePrivateKey(key) {\n try {\n _noble_secp256k1__WEBPACK_IMPORTED_MODULE_1__.getPublicKey(key, true);\n }\n catch (err) {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__.CodeError(String(err), 'ERR_INVALID_PRIVATE_KEY');\n }\n}\nfunction validatePublicKey(key) {\n try {\n _noble_secp256k1__WEBPACK_IMPORTED_MODULE_1__.Point.fromHex(key);\n }\n catch (err) {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__.CodeError(String(err), 'ERR_INVALID_PUBLIC_KEY');\n }\n}\nfunction computePublicKey(privateKey) {\n try {\n return _noble_secp256k1__WEBPACK_IMPORTED_MODULE_1__.getPublicKey(privateKey, true);\n }\n catch (err) {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__.CodeError(String(err), 'ERR_INVALID_PRIVATE_KEY');\n }\n}\n//# sourceMappingURL=secp256k1.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/crypto/dist/src/keys/secp256k1.js?");
/***/ }),
/***/ "./node_modules/@libp2p/crypto/dist/src/pbkdf2.js":
/*!********************************************************!*\
!*** ./node_modules/@libp2p/crypto/dist/src/pbkdf2.js ***!
\********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ pbkdf2)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n/* harmony import */ var node_forge_lib_pbkdf2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! node-forge/lib/pbkdf2.js */ \"./node_modules/node-forge/lib/pbkdf2.js\");\n/* harmony import */ var node_forge_lib_util_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! node-forge/lib/util.js */ \"./node_modules/node-forge/lib/util.js\");\n\n// @ts-expect-error types are missing\n\n// @ts-expect-error types are missing\n\n/**\n * Maps an IPFS hash name to its node-forge equivalent.\n *\n * See https://github.com/multiformats/multihash/blob/master/hashtable.csv\n *\n * @private\n */\nconst hashName = {\n sha1: 'sha1',\n 'sha2-256': 'sha256',\n 'sha2-512': 'sha512'\n};\n/**\n * Computes the Password-Based Key Derivation Function 2.\n */\nfunction pbkdf2(password, salt, iterations, keySize, hash) {\n if (hash !== 'sha1' && hash !== 'sha2-256' && hash !== 'sha2-512') {\n const types = Object.keys(hashName).join(' / ');\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__.CodeError(`Hash '${hash}' is unknown or not supported. Must be ${types}`, 'ERR_UNSUPPORTED_HASH_TYPE');\n }\n const hasher = hashName[hash];\n const dek = node_forge_lib_pbkdf2_js__WEBPACK_IMPORTED_MODULE_1__(password, salt, iterations, keySize, hasher);\n return node_forge_lib_util_js__WEBPACK_IMPORTED_MODULE_2__.encode64(dek, null);\n}\n//# sourceMappingURL=pbkdf2.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/crypto/dist/src/pbkdf2.js?");
/***/ }),
/***/ "./node_modules/@libp2p/crypto/dist/src/random-bytes.js":
/*!**************************************************************!*\
!*** ./node_modules/@libp2p/crypto/dist/src/random-bytes.js ***!
\**************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ randomBytes)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n/* harmony import */ var _noble_secp256k1__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @noble/secp256k1 */ \"./node_modules/@noble/secp256k1/lib/esm/index.js\");\n\n\nfunction randomBytes(length) {\n if (isNaN(length) || length <= 0) {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__.CodeError('random bytes length must be a Number bigger than 0', 'ERR_INVALID_LENGTH');\n }\n return _noble_secp256k1__WEBPACK_IMPORTED_MODULE_1__.utils.randomBytes(length);\n}\n//# sourceMappingURL=random-bytes.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/crypto/dist/src/random-bytes.js?");
/***/ }),
/***/ "./node_modules/@libp2p/crypto/dist/src/util.js":
/*!******************************************************!*\
!*** ./node_modules/@libp2p/crypto/dist/src/util.js ***!
\******************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ base64urlToBigInteger: () => (/* binding */ base64urlToBigInteger),\n/* harmony export */ base64urlToBuffer: () => (/* binding */ base64urlToBuffer),\n/* harmony export */ bigIntegerToUintBase64url: () => (/* binding */ bigIntegerToUintBase64url)\n/* harmony export */ });\n/* harmony import */ var node_forge_lib_util_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! node-forge/lib/util.js */ \"./node_modules/node-forge/lib/util.js\");\n/* harmony import */ var node_forge_lib_jsbn_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! node-forge/lib/jsbn.js */ \"./node_modules/node-forge/lib/jsbn.js\");\n/* harmony import */ var node_forge_lib_forge_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! node-forge/lib/forge.js */ \"./node_modules/node-forge/lib/forge.js\");\n/* harmony import */ var uint8arrays_concat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! uint8arrays/concat */ \"./node_modules/uint8arrays/dist/src/concat.js\");\n/* harmony import */ var uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! uint8arrays/from-string */ \"./node_modules/uint8arrays/dist/src/from-string.js\");\n/* harmony import */ var uint8arrays_to_string__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! uint8arrays/to-string */ \"./node_modules/uint8arrays/dist/src/to-string.js\");\n\n\n// @ts-expect-error types are missing\n\n\n\n\nfunction bigIntegerToUintBase64url(num, len) {\n // Call `.abs()` to convert to unsigned\n let buf = Uint8Array.from(num.abs().toByteArray()); // toByteArray converts to big endian\n // toByteArray() gives us back a signed array, which will include a leading 0\n // byte if the most significant bit of the number is 1:\n // https://docs.microsoft.com/en-us/windows/win32/seccertenroll/about-integer\n // Our number will always be positive so we should remove the leading padding.\n buf = buf[0] === 0 ? buf.subarray(1) : buf;\n if (len != null) {\n if (buf.length > len)\n throw new Error('byte array longer than desired length');\n buf = (0,uint8arrays_concat__WEBPACK_IMPORTED_MODULE_3__.concat)([new Uint8Array(len - buf.length), buf]);\n }\n return (0,uint8arrays_to_string__WEBPACK_IMPORTED_MODULE_5__.toString)(buf, 'base64url');\n}\n// Convert a base64url encoded string to a BigInteger\nfunction base64urlToBigInteger(str) {\n const buf = base64urlToBuffer(str);\n return new node_forge_lib_forge_js__WEBPACK_IMPORTED_MODULE_2__.jsbn.BigInteger((0,uint8arrays_to_string__WEBPACK_IMPORTED_MODULE_5__.toString)(buf, 'base16'), 16);\n}\nfunction base64urlToBuffer(str, len) {\n let buf = (0,uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_4__.fromString)(str, 'base64urlpad');\n if (len != null) {\n if (buf.length > len)\n throw new Error('byte array longer than desired length');\n buf = (0,uint8arrays_concat__WEBPACK_IMPORTED_MODULE_3__.concat)([new Uint8Array(len - buf.length), buf]);\n }\n return buf;\n}\n//# sourceMappingURL=util.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/crypto/dist/src/util.js?");
/***/ }),
/***/ "./node_modules/@libp2p/crypto/dist/src/webcrypto.js":
/*!***********************************************************!*\
!*** ./node_modules/@libp2p/crypto/dist/src/webcrypto.js ***!
\***********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* eslint-env browser */\n// Check native crypto exists and is enabled (In insecure context `self.crypto`\n// exists but `self.crypto.subtle` does not).\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n get(win = globalThis) {\n const nativeCrypto = win.crypto;\n if (nativeCrypto == null || nativeCrypto.subtle == null) {\n throw Object.assign(new Error('Missing Web Crypto API. ' +\n 'The most likely cause of this error is that this page is being accessed ' +\n 'from an insecure context (i.e. not HTTPS). For more information and ' +\n 'possible resolutions see ' +\n 'https://github.com/libp2p/js-libp2p-crypto/blob/master/README.md#web-crypto-api'), { code: 'ERR_MISSING_WEB_CRYPTO' });\n }\n return nativeCrypto;\n }\n});\n//# sourceMappingURL=webcrypto.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/crypto/dist/src/webcrypto.js?");
/***/ }),
/***/ "./node_modules/@libp2p/interface-connection-encrypter/dist/src/errors.js":
/*!********************************************************************************!*\
!*** ./node_modules/@libp2p/interface-connection-encrypter/dist/src/errors.js ***!
\********************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ InvalidCryptoExchangeError: () => (/* binding */ InvalidCryptoExchangeError),\n/* harmony export */ InvalidCryptoTransmissionError: () => (/* binding */ InvalidCryptoTransmissionError),\n/* harmony export */ UnexpectedPeerError: () => (/* binding */ UnexpectedPeerError)\n/* harmony export */ });\nclass UnexpectedPeerError extends Error {\n code;\n constructor(message = 'Unexpected Peer') {\n super(message);\n this.code = UnexpectedPeerError.code;\n }\n static code = 'ERR_UNEXPECTED_PEER';\n}\nclass InvalidCryptoExchangeError extends Error {\n code;\n constructor(message = 'Invalid crypto exchange') {\n super(message);\n this.code = InvalidCryptoExchangeError.code;\n }\n static code = 'ERR_INVALID_CRYPTO_EXCHANGE';\n}\nclass InvalidCryptoTransmissionError extends Error {\n code;\n constructor(message = 'Invalid crypto transmission') {\n super(message);\n this.code = InvalidCryptoTransmissionError.code;\n }\n static code = 'ERR_INVALID_CRYPTO_TRANSMISSION';\n}\n//# sourceMappingURL=errors.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/interface-connection-encrypter/dist/src/errors.js?");
/***/ }),
/***/ "./node_modules/@libp2p/interface-connection/dist/src/index.js":
/*!*********************************************************************!*\
!*** ./node_modules/@libp2p/interface-connection/dist/src/index.js ***!
\*********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ isConnection: () => (/* binding */ isConnection),\n/* harmony export */ symbol: () => (/* binding */ symbol)\n/* harmony export */ });\nconst symbol = Symbol.for('@libp2p/connection');\nfunction isConnection(other) {\n return other != null && Boolean(other[symbol]);\n}\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/interface-connection/dist/src/index.js?");
/***/ }),
/***/ "./node_modules/@libp2p/interface-connection/dist/src/status.js":
/*!**********************************************************************!*\
!*** ./node_modules/@libp2p/interface-connection/dist/src/status.js ***!
\**********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ CLOSED: () => (/* binding */ CLOSED),\n/* harmony export */ CLOSING: () => (/* binding */ CLOSING),\n/* harmony export */ OPEN: () => (/* binding */ OPEN)\n/* harmony export */ });\nconst OPEN = 'OPEN';\nconst CLOSING = 'CLOSING';\nconst CLOSED = 'CLOSED';\n//# sourceMappingURL=status.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/interface-connection/dist/src/status.js?");
/***/ }),
/***/ "./node_modules/@libp2p/interface-content-routing/dist/src/index.js":
/*!**************************************************************************!*\
!*** ./node_modules/@libp2p/interface-content-routing/dist/src/index.js ***!
\**************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ contentRouting: () => (/* binding */ contentRouting)\n/* harmony export */ });\n/**\n * Any object that implements this Symbol as a property should return a\n * ContentRouting instance as the property value, similar to how\n * `Symbol.Iterable` can be used to return an `Iterable` from an `Iterator`.\n *\n * @example\n *\n * ```js\n * import { contentRouting, ContentRouting } from '@libp2p/content-routing'\n *\n * class MyContentRouter implements ContentRouting {\n * get [contentRouting] () {\n * return this\n * }\n *\n * // ...other methods\n * }\n * ```\n */\nconst contentRouting = Symbol.for('@libp2p/content-routing');\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/interface-content-routing/dist/src/index.js?");
/***/ }),
/***/ "./node_modules/@libp2p/interface-peer-discovery/dist/src/index.js":
/*!*************************************************************************!*\
!*** ./node_modules/@libp2p/interface-peer-discovery/dist/src/index.js ***!
\*************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ peerDiscovery: () => (/* binding */ peerDiscovery)\n/* harmony export */ });\n/**\n * Any object that implements this Symbol as a property should return a\n * PeerDiscovery instance as the property value, similar to how\n * `Symbol.Iterable` can be used to return an `Iterable` from an `Iterator`.\n *\n * @example\n *\n * ```js\n * import { peerDiscovery, PeerDiscovery } from '@libp2p/peer-discovery'\n *\n * class MyPeerDiscoverer implements PeerDiscovery {\n * get [peerDiscovery] () {\n * return this\n * }\n *\n * // ...other methods\n * }\n * ```\n */\nconst peerDiscovery = Symbol.for('@libp2p/peer-discovery');\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/interface-peer-discovery/dist/src/index.js?");
/***/ }),
/***/ "./node_modules/@libp2p/interface-peer-id/dist/src/index.js":
/*!******************************************************************!*\
!*** ./node_modules/@libp2p/interface-peer-id/dist/src/index.js ***!
\******************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ isPeerId: () => (/* binding */ isPeerId),\n/* harmony export */ symbol: () => (/* binding */ symbol)\n/* harmony export */ });\nconst symbol = Symbol.for('@libp2p/peer-id');\nfunction isPeerId(other) {\n return other != null && Boolean(other[symbol]);\n}\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/interface-peer-id/dist/src/index.js?");
/***/ }),
/***/ "./node_modules/@libp2p/interface-peer-routing/dist/src/index.js":
/*!***********************************************************************!*\
!*** ./node_modules/@libp2p/interface-peer-routing/dist/src/index.js ***!
\***********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ peerRouting: () => (/* binding */ peerRouting)\n/* harmony export */ });\n/**\n * Any object that implements this Symbol as a property should return a\n * PeerRouting instance as the property value, similar to how\n * `Symbol.Iterable` can be used to return an `Iterable` from an `Iterator`.\n *\n * @example\n *\n * ```js\n * import { peerRouting, PeerRouting } from '@libp2p/peer-routing'\n *\n * class MyPeerRouter implements PeerRouting {\n * get [peerRouting] () {\n * return this\n * }\n *\n * // ...other methods\n * }\n * ```\n */\nconst peerRouting = Symbol.for('@libp2p/peer-routing');\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/interface-peer-routing/dist/src/index.js?");
/***/ }),
/***/ "./node_modules/@libp2p/interface-peer-store/dist/src/tags.js":
/*!********************************************************************!*\
!*** ./node_modules/@libp2p/interface-peer-store/dist/src/tags.js ***!
\********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ KEEP_ALIVE: () => (/* binding */ KEEP_ALIVE)\n/* harmony export */ });\nconst KEEP_ALIVE = 'keep-alive';\n//# sourceMappingURL=tags.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/interface-peer-store/dist/src/tags.js?");
/***/ }),
/***/ "./node_modules/@libp2p/interface-pubsub/dist/src/index.js":
/*!*****************************************************************!*\
!*** ./node_modules/@libp2p/interface-pubsub/dist/src/index.js ***!
\*****************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ StrictNoSign: () => (/* binding */ StrictNoSign),\n/* harmony export */ StrictSign: () => (/* binding */ StrictSign),\n/* harmony export */ TopicValidatorResult: () => (/* binding */ TopicValidatorResult)\n/* harmony export */ });\n/**\n * On the producing side:\n * * Build messages with the signature, key (from may be enough for certain inlineable public key types), from and seqno fields.\n *\n * On the consuming side:\n * * Enforce the fields to be present, reject otherwise.\n * * Propagate only if the fields are valid and signature can be verified, reject otherwise.\n */\nconst StrictSign = 'StrictSign';\n/**\n * On the producing side:\n * * Build messages without the signature, key, from and seqno fields.\n * * The corresponding protobuf key-value pairs are absent from the marshalled message, not just empty.\n *\n * On the consuming side:\n * * Enforce the fields to be absent, reject otherwise.\n * * Propagate only if the fields are absent, reject otherwise.\n * * A message_id function will not be able to use the above fields, and should instead rely on the data field. A commonplace strategy is to calculate a hash.\n */\nconst StrictNoSign = 'StrictNoSign';\nvar TopicValidatorResult;\n(function (TopicValidatorResult) {\n /**\n * The message is considered valid, and it should be delivered and forwarded to the network\n */\n TopicValidatorResult[\"Accept\"] = \"accept\";\n /**\n * The message is neither delivered nor forwarded to the network\n */\n TopicValidatorResult[\"Ignore\"] = \"ignore\";\n /**\n * The message is considered invalid, and it should be rejected\n */\n TopicValidatorResult[\"Reject\"] = \"reject\";\n})(TopicValidatorResult || (TopicValidatorResult = {}));\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/interface-pubsub/dist/src/index.js?");
/***/ }),
/***/ "./node_modules/@libp2p/interface-registrar/dist/src/index.js":
/*!********************************************************************!*\
!*** ./node_modules/@libp2p/interface-registrar/dist/src/index.js ***!
\********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ isTopology: () => (/* binding */ isTopology),\n/* harmony export */ topologySymbol: () => (/* binding */ topologySymbol)\n/* harmony export */ });\nconst topologySymbol = Symbol.for('@libp2p/topology');\nfunction isTopology(other) {\n return other != null && Boolean(other[topologySymbol]);\n}\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/interface-registrar/dist/src/index.js?");
/***/ }),
/***/ "./node_modules/@libp2p/interface-stream-muxer/dist/src/stream.js":
/*!************************************************************************!*\
!*** ./node_modules/@libp2p/interface-stream-muxer/dist/src/stream.js ***!
\************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AbstractStream: () => (/* binding */ AbstractStream)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n/* harmony import */ var _libp2p_logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/logger */ \"./node_modules/@libp2p/logger/dist/src/index.js\");\n/* harmony import */ var abortable_iterator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! abortable-iterator */ \"./node_modules/abortable-iterator/dist/src/index.js\");\n/* harmony import */ var any_signal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! any-signal */ \"./node_modules/any-signal/dist/src/index.js\");\n/* harmony import */ var it_pushable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! it-pushable */ \"./node_modules/it-pushable/dist/src/index.js\");\n/* harmony import */ var uint8arraylist__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! uint8arraylist */ \"./node_modules/uint8arraylist/dist/src/index.js\");\n\n\n\n\n\n\nconst log = (0,_libp2p_logger__WEBPACK_IMPORTED_MODULE_1__.logger)('libp2p:stream');\nconst ERR_STREAM_RESET = 'ERR_STREAM_RESET';\nconst ERR_STREAM_ABORT = 'ERR_STREAM_ABORT';\nconst ERR_SINK_ENDED = 'ERR_SINK_ENDED';\nconst ERR_DOUBLE_SINK = 'ERR_DOUBLE_SINK';\nfunction isPromise(res) {\n return res != null && typeof res.then === 'function';\n}\nclass AbstractStream {\n id;\n stat;\n metadata;\n source;\n abortController;\n resetController;\n closeController;\n sourceEnded;\n sinkEnded;\n sinkSunk;\n endErr;\n streamSource;\n onEnd;\n maxDataSize;\n constructor(init) {\n this.abortController = new AbortController();\n this.resetController = new AbortController();\n this.closeController = new AbortController();\n this.sourceEnded = false;\n this.sinkEnded = false;\n this.sinkSunk = false;\n this.id = init.id;\n this.metadata = init.metadata ?? {};\n this.stat = {\n direction: init.direction,\n timeline: {\n open: Date.now()\n }\n };\n this.maxDataSize = init.maxDataSize;\n this.onEnd = init.onEnd;\n this.source = this.streamSource = (0,it_pushable__WEBPACK_IMPORTED_MODULE_4__.pushable)({\n onEnd: () => {\n // already sent a reset message\n if (this.stat.timeline.reset !== null) {\n const res = this.sendCloseRead();\n if (isPromise(res)) {\n res.catch(err => {\n log.error('error while sending close read', err);\n });\n }\n }\n this.onSourceEnd();\n }\n });\n // necessary because the libp2p upgrader wraps the sink function\n this.sink = this.sink.bind(this);\n }\n onSourceEnd(err) {\n if (this.sourceEnded) {\n return;\n }\n this.stat.timeline.closeRead = Date.now();\n this.sourceEnded = true;\n log.trace('%s stream %s source end - err: %o', this.stat.direction, this.id, err);\n if (err != null && this.endErr == null) {\n this.endErr = err;\n }\n if (this.sinkEnded) {\n this.stat.timeline.close = Date.now();\n if (this.onEnd != null) {\n this.onEnd(this.endErr);\n }\n }\n }\n onSinkEnd(err) {\n if (this.sinkEnded) {\n return;\n }\n this.stat.timeline.closeWrite = Date.now();\n this.sinkEnded = true;\n log.trace('%s stream %s sink end - err: %o', this.stat.direction, this.id, err);\n if (err != null && this.endErr == null) {\n this.endErr = err;\n }\n if (th
/***/ }),
/***/ "./node_modules/@libp2p/interface-transport/dist/src/index.js":
/*!********************************************************************!*\
!*** ./node_modules/@libp2p/interface-transport/dist/src/index.js ***!
\********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ FaultTolerance: () => (/* binding */ FaultTolerance),\n/* harmony export */ isTransport: () => (/* binding */ isTransport),\n/* harmony export */ symbol: () => (/* binding */ symbol)\n/* harmony export */ });\nconst symbol = Symbol.for('@libp2p/transport');\nfunction isTransport(other) {\n return other != null && Boolean(other[symbol]);\n}\n/**\n * Enum Transport Manager Fault Tolerance values\n */\nvar FaultTolerance;\n(function (FaultTolerance) {\n /**\n * should be used for failing in any listen circumstance\n */\n FaultTolerance[FaultTolerance[\"FATAL_ALL\"] = 0] = \"FATAL_ALL\";\n /**\n * should be used for not failing when not listening\n */\n FaultTolerance[FaultTolerance[\"NO_FATAL\"] = 1] = \"NO_FATAL\";\n})(FaultTolerance || (FaultTolerance = {}));\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/interface-transport/dist/src/index.js?");
/***/ }),
/***/ "./node_modules/@libp2p/interfaces/dist/src/errors.js":
/*!************************************************************!*\
!*** ./node_modules/@libp2p/interfaces/dist/src/errors.js ***!
\************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AbortError: () => (/* binding */ AbortError),\n/* harmony export */ CodeError: () => (/* binding */ CodeError)\n/* harmony export */ });\n/**\n * When this error is thrown it means an operation was aborted,\n * usually in response to the `abort` event being emitted by an\n * AbortSignal.\n */\nclass AbortError extends Error {\n code;\n type;\n constructor(message = 'The operation was aborted') {\n super(message);\n this.code = AbortError.code;\n this.type = AbortError.type;\n }\n static code = 'ABORT_ERR';\n static type = 'aborted';\n}\nclass CodeError extends Error {\n code;\n props;\n constructor(message, code, props) {\n super(message);\n this.code = code;\n this.name = props?.name ?? 'CodeError';\n this.props = props ?? {}; // eslint-disable-line @typescript-eslint/consistent-type-assertions\n }\n}\n//# sourceMappingURL=errors.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/interfaces/dist/src/errors.js?");
/***/ }),
/***/ "./node_modules/@libp2p/interfaces/dist/src/events.js":
/*!************************************************************!*\
!*** ./node_modules/@libp2p/interfaces/dist/src/events.js ***!
\************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ CustomEvent: () => (/* binding */ CustomEvent),\n/* harmony export */ EventEmitter: () => (/* binding */ EventEmitter)\n/* harmony export */ });\n/**\n * Adds types to the EventTarget class. Hopefully this won't be necessary forever.\n *\n * https://github.com/microsoft/TypeScript/issues/28357\n * https://github.com/microsoft/TypeScript/issues/43477\n * https://github.com/microsoft/TypeScript/issues/299\n * etc\n */\nclass EventEmitter extends EventTarget {\n #listeners = new Map();\n listenerCount(type) {\n const listeners = this.#listeners.get(type);\n if (listeners == null) {\n return 0;\n }\n return listeners.length;\n }\n addEventListener(type, listener, options) {\n super.addEventListener(type, listener, options);\n let list = this.#listeners.get(type);\n if (list == null) {\n list = [];\n this.#listeners.set(type, list);\n }\n list.push({\n callback: listener,\n once: (options !== true && options !== false && options?.once) ?? false\n });\n }\n removeEventListener(type, listener, options) {\n super.removeEventListener(type.toString(), listener ?? null, options);\n let list = this.#listeners.get(type);\n if (list == null) {\n return;\n }\n list = list.filter(({ callback }) => callback !== listener);\n this.#listeners.set(type, list);\n }\n dispatchEvent(event) {\n const result = super.dispatchEvent(event);\n let list = this.#listeners.get(event.type);\n if (list == null) {\n return result;\n }\n list = list.filter(({ once }) => !once);\n this.#listeners.set(event.type, list);\n return result;\n }\n safeDispatchEvent(type, detail) {\n return this.dispatchEvent(new CustomEvent(type, detail));\n }\n}\n/**\n * CustomEvent is a standard event but it's not supported by node.\n *\n * Remove this when https://github.com/nodejs/node/issues/40678 is closed.\n *\n * Ref: https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent\n */\nclass CustomEventPolyfill extends Event {\n /** Returns any custom data event was created with. Typically used for synthetic events. */\n detail;\n constructor(message, data) {\n super(message, data);\n // @ts-expect-error could be undefined\n this.detail = data?.detail;\n }\n}\nconst CustomEvent = globalThis.CustomEvent ?? CustomEventPolyfill;\n//# sourceMappingURL=events.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/interfaces/dist/src/events.js?");
/***/ }),
/***/ "./node_modules/@libp2p/interfaces/dist/src/startable.js":
/*!***************************************************************!*\
!*** ./node_modules/@libp2p/interfaces/dist/src/startable.js ***!
\***************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ isStartable: () => (/* binding */ isStartable),\n/* harmony export */ start: () => (/* binding */ start),\n/* harmony export */ stop: () => (/* binding */ stop)\n/* harmony export */ });\nfunction isStartable(obj) {\n return obj != null && typeof obj.start === 'function' && typeof obj.stop === 'function';\n}\nasync function start(...objs) {\n const startables = [];\n for (const obj of objs) {\n if (isStartable(obj)) {\n startables.push(obj);\n }\n }\n await Promise.all(startables.map(async (s) => {\n if (s.beforeStart != null) {\n await s.beforeStart();\n }\n }));\n await Promise.all(startables.map(async (s) => {\n await s.start();\n }));\n await Promise.all(startables.map(async (s) => {\n if (s.afterStart != null) {\n await s.afterStart();\n }\n }));\n}\nasync function stop(...objs) {\n const startables = [];\n for (const obj of objs) {\n if (isStartable(obj)) {\n startables.push(obj);\n }\n }\n await Promise.all(startables.map(async (s) => {\n if (s.beforeStop != null) {\n await s.beforeStop();\n }\n }));\n await Promise.all(startables.map(async (s) => {\n await s.stop();\n }));\n await Promise.all(startables.map(async (s) => {\n if (s.afterStop != null) {\n await s.afterStop();\n }\n }));\n}\n//# sourceMappingURL=startable.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/interfaces/dist/src/startable.js?");
/***/ }),
/***/ "./node_modules/@libp2p/keychain/dist/src/errors.js":
/*!**********************************************************!*\
!*** ./node_modules/@libp2p/keychain/dist/src/errors.js ***!
\**********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ codes: () => (/* binding */ codes)\n/* harmony export */ });\nvar codes;\n(function (codes) {\n codes[\"ERR_INVALID_PARAMETERS\"] = \"ERR_INVALID_PARAMETERS\";\n codes[\"ERR_INVALID_KEY_NAME\"] = \"ERR_INVALID_KEY_NAME\";\n codes[\"ERR_INVALID_KEY_TYPE\"] = \"ERR_INVALID_KEY_TYPE\";\n codes[\"ERR_KEY_ALREADY_EXISTS\"] = \"ERR_KEY_ALREADY_EXISTS\";\n codes[\"ERR_INVALID_KEY_SIZE\"] = \"ERR_INVALID_KEY_SIZE\";\n codes[\"ERR_KEY_NOT_FOUND\"] = \"ERR_KEY_NOT_FOUND\";\n codes[\"ERR_OLD_KEY_NAME_INVALID\"] = \"ERR_OLD_KEY_NAME_INVALID\";\n codes[\"ERR_NEW_KEY_NAME_INVALID\"] = \"ERR_NEW_KEY_NAME_INVALID\";\n codes[\"ERR_PASSWORD_REQUIRED\"] = \"ERR_PASSWORD_REQUIRED\";\n codes[\"ERR_PEM_REQUIRED\"] = \"ERR_PEM_REQUIRED\";\n codes[\"ERR_CANNOT_READ_KEY\"] = \"ERR_CANNOT_READ_KEY\";\n codes[\"ERR_MISSING_PRIVATE_KEY\"] = \"ERR_MISSING_PRIVATE_KEY\";\n codes[\"ERR_INVALID_OLD_PASS_TYPE\"] = \"ERR_INVALID_OLD_PASS_TYPE\";\n codes[\"ERR_INVALID_NEW_PASS_TYPE\"] = \"ERR_INVALID_NEW_PASS_TYPE\";\n codes[\"ERR_INVALID_PASS_LENGTH\"] = \"ERR_INVALID_PASS_LENGTH\";\n})(codes || (codes = {}));\n//# sourceMappingURL=errors.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/keychain/dist/src/errors.js?");
/***/ }),
/***/ "./node_modules/@libp2p/keychain/dist/src/index.js":
/*!*********************************************************!*\
!*** ./node_modules/@libp2p/keychain/dist/src/index.js ***!
\*********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DefaultKeyChain: () => (/* binding */ DefaultKeyChain)\n/* harmony export */ });\n/* harmony import */ var _libp2p_crypto__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/crypto */ \"./node_modules/@libp2p/crypto/dist/src/index.js\");\n/* harmony import */ var _libp2p_crypto_keys__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/crypto/keys */ \"./node_modules/@libp2p/crypto/dist/src/keys/index.js\");\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n/* harmony import */ var _libp2p_logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @libp2p/logger */ \"./node_modules/@libp2p/logger/dist/src/index.js\");\n/* harmony import */ var _libp2p_peer_id__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @libp2p/peer-id */ \"./node_modules/@libp2p/peer-id/dist/src/index.js\");\n/* harmony import */ var interface_datastore_key__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! interface-datastore/key */ \"./node_modules/interface-datastore/dist/src/key.js\");\n/* harmony import */ var merge_options__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! merge-options */ \"./node_modules/merge-options/index.mjs\");\n/* harmony import */ var sanitize_filename__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! sanitize-filename */ \"./node_modules/sanitize-filename/index.js\");\n/* harmony import */ var uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! uint8arrays/from-string */ \"./node_modules/uint8arrays/dist/src/from-string.js\");\n/* harmony import */ var uint8arrays_to_string__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! uint8arrays/to-string */ \"./node_modules/uint8arrays/dist/src/to-string.js\");\n/* harmony import */ var _errors_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./errors.js */ \"./node_modules/@libp2p/keychain/dist/src/errors.js\");\n/* eslint max-nested-callbacks: [\"error\", 5] */\n\n\n\n\n\n\n\n\n\n\n\nconst log = (0,_libp2p_logger__WEBPACK_IMPORTED_MODULE_3__.logger)('libp2p:keychain');\nconst keyPrefix = '/pkcs8/';\nconst infoPrefix = '/info/';\nconst privates = new WeakMap();\n// NIST SP 800-132\nconst NIST = {\n minKeyLength: 112 / 8,\n minSaltLength: 128 / 8,\n minIterationCount: 1000\n};\nconst defaultOptions = {\n // See https://cryptosense.com/parametesr-choice-for-pbkdf2/\n dek: {\n keyLength: 512 / 8,\n iterationCount: 10000,\n salt: 'you should override this value with a crypto secure random number',\n hash: 'sha2-512'\n }\n};\nfunction validateKeyName(name) {\n if (name == null) {\n return false;\n }\n if (typeof name !== 'string') {\n return false;\n }\n return name === sanitize_filename__WEBPACK_IMPORTED_MODULE_7__(name.trim()) && name.length > 0;\n}\n/**\n * Throws an error after a delay\n *\n * This assumes than an error indicates that the keychain is under attack. Delay returning an\n * error to make brute force attacks harder.\n */\nasync function randomDelay() {\n const min = 200;\n const max = 1000;\n const delay = Math.random() * (max - min) + min;\n await new Promise(resolve => setTimeout(resolve, delay));\n}\n/**\n * Converts a key name into a datastore name\n */\nfunction DsName(name) {\n return new interface_datastore_key__WEBPACK_IMPORTED_MODULE_5__.Key(keyPrefix + name);\n}\n/**\n * Converts a key name into a datastore info name\n */\nfunction DsInfoName(name) {\n return new interface_datastore_key__WEBPACK_IMPORTED_MODULE_5__.Key(infoPrefix + name);\n}\n/**\n * Manages the lifecycle of a key. Keys are encrypted at rest using PKCS #8.\n *\n * A key in the store has two entries\n * - '/info/*key-name*', contains the KeyInfo for the key\n * - '/pkcs8/*key-name*', contains the PKCS #8 for the key\n *\n */\nclass De
/***/ }),
/***/ "./node_modules/@libp2p/logger/dist/src/index.js":
/*!*******************************************************!*\
!*** ./node_modules/@libp2p/logger/dist/src/index.js ***!
\*******************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ disable: () => (/* binding */ disable),\n/* harmony export */ enable: () => (/* binding */ enable),\n/* harmony export */ enabled: () => (/* binding */ enabled),\n/* harmony export */ logger: () => (/* binding */ logger)\n/* harmony export */ });\n/* harmony import */ var debug__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! debug */ \"./node_modules/debug/src/browser.js\");\n/* harmony import */ var multiformats_bases_base58__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! multiformats/bases/base58 */ \"./node_modules/multiformats/src/bases/base58.js\");\n/* harmony import */ var multiformats_bases_base32__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! multiformats/bases/base32 */ \"./node_modules/multiformats/src/bases/base32.js\");\n/* harmony import */ var multiformats_bases_base64__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! multiformats/bases/base64 */ \"./node_modules/multiformats/src/bases/base64.js\");\n\n\n\n\n// Add a formatter for converting to a base58 string\ndebug__WEBPACK_IMPORTED_MODULE_0__.formatters.b = (v) => {\n return v == null ? 'undefined' : multiformats_bases_base58__WEBPACK_IMPORTED_MODULE_1__.base58btc.baseEncode(v);\n};\n// Add a formatter for converting to a base32 string\ndebug__WEBPACK_IMPORTED_MODULE_0__.formatters.t = (v) => {\n return v == null ? 'undefined' : multiformats_bases_base32__WEBPACK_IMPORTED_MODULE_2__.base32.baseEncode(v);\n};\n// Add a formatter for converting to a base64 string\ndebug__WEBPACK_IMPORTED_MODULE_0__.formatters.m = (v) => {\n return v == null ? 'undefined' : multiformats_bases_base64__WEBPACK_IMPORTED_MODULE_3__.base64.baseEncode(v);\n};\n// Add a formatter for stringifying peer ids\ndebug__WEBPACK_IMPORTED_MODULE_0__.formatters.p = (v) => {\n return v == null ? 'undefined' : v.toString();\n};\n// Add a formatter for stringifying CIDs\ndebug__WEBPACK_IMPORTED_MODULE_0__.formatters.c = (v) => {\n return v == null ? 'undefined' : v.toString();\n};\n// Add a formatter for stringifying Datastore keys\ndebug__WEBPACK_IMPORTED_MODULE_0__.formatters.k = (v) => {\n return v == null ? 'undefined' : v.toString();\n};\n// Add a formatter for stringifying Multiaddrs\ndebug__WEBPACK_IMPORTED_MODULE_0__.formatters.a = (v) => {\n return v == null ? 'undefined' : v.toString();\n};\nfunction createDisabledLogger(namespace) {\n const logger = () => { };\n logger.enabled = false;\n logger.color = '';\n logger.diff = 0;\n logger.log = () => { };\n logger.namespace = namespace;\n logger.destroy = () => true;\n logger.extend = () => logger;\n return logger;\n}\nfunction logger(name) {\n // trace logging is a no-op by default\n let trace = createDisabledLogger(`${name}:trace`);\n // look at all the debug names and see if trace logging has explicitly been enabled\n if (debug__WEBPACK_IMPORTED_MODULE_0__.enabled(`${name}:trace`) && debug__WEBPACK_IMPORTED_MODULE_0__.names.map(r => r.toString()).find(n => n.includes(':trace')) != null) {\n trace = debug__WEBPACK_IMPORTED_MODULE_0__(`${name}:trace`);\n }\n return Object.assign(debug__WEBPACK_IMPORTED_MODULE_0__(name), {\n error: debug__WEBPACK_IMPORTED_MODULE_0__(`${name}:error`),\n trace\n });\n}\nfunction disable() {\n debug__WEBPACK_IMPORTED_MODULE_0__.disable();\n}\nfunction enable(namespaces) {\n debug__WEBPACK_IMPORTED_MODULE_0__.enable(namespaces);\n}\nfunction enabled(namespaces) {\n return debug__WEBPACK_IMPORTED_MODULE_0__.enabled(namespaces);\n}\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/logger/dist/src/index.js?");
/***/ }),
/***/ "./node_modules/@libp2p/mplex/dist/src/alloc-unsafe-browser.js":
/*!*********************************************************************!*\
!*** ./node_modules/@libp2p/mplex/dist/src/alloc-unsafe-browser.js ***!
\*********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ allocUnsafe: () => (/* binding */ allocUnsafe)\n/* harmony export */ });\nfunction allocUnsafe(size) {\n return new Uint8Array(size);\n}\n//# sourceMappingURL=alloc-unsafe-browser.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/mplex/dist/src/alloc-unsafe-browser.js?");
/***/ }),
/***/ "./node_modules/@libp2p/mplex/dist/src/decode.js":
/*!*******************************************************!*\
!*** ./node_modules/@libp2p/mplex/dist/src/decode.js ***!
\*******************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Decoder: () => (/* binding */ Decoder),\n/* harmony export */ MAX_MSG_QUEUE_SIZE: () => (/* binding */ MAX_MSG_QUEUE_SIZE),\n/* harmony export */ MAX_MSG_SIZE: () => (/* binding */ MAX_MSG_SIZE)\n/* harmony export */ });\n/* harmony import */ var uint8arraylist__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! uint8arraylist */ \"./node_modules/uint8arraylist/dist/src/index.js\");\n/* harmony import */ var _message_types_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./message-types.js */ \"./node_modules/@libp2p/mplex/dist/src/message-types.js\");\n\n\nconst MAX_MSG_SIZE = 1 << 20; // 1MB\nconst MAX_MSG_QUEUE_SIZE = 4 << 20; // 4MB\nclass Decoder {\n _buffer;\n _headerInfo;\n _maxMessageSize;\n _maxUnprocessedMessageQueueSize;\n constructor(maxMessageSize = MAX_MSG_SIZE, maxUnprocessedMessageQueueSize = MAX_MSG_QUEUE_SIZE) {\n this._buffer = new uint8arraylist__WEBPACK_IMPORTED_MODULE_0__.Uint8ArrayList();\n this._headerInfo = null;\n this._maxMessageSize = maxMessageSize;\n this._maxUnprocessedMessageQueueSize = maxUnprocessedMessageQueueSize;\n }\n write(chunk) {\n if (chunk == null || chunk.length === 0) {\n return [];\n }\n this._buffer.append(chunk);\n if (this._buffer.byteLength > this._maxUnprocessedMessageQueueSize) {\n throw Object.assign(new Error('unprocessed message queue size too large!'), { code: 'ERR_MSG_QUEUE_TOO_BIG' });\n }\n const msgs = [];\n while (this._buffer.length !== 0) {\n if (this._headerInfo == null) {\n try {\n this._headerInfo = this._decodeHeader(this._buffer);\n }\n catch (err) {\n if (err.code === 'ERR_MSG_TOO_BIG') {\n throw err;\n }\n break; // We haven't received enough data yet\n }\n }\n const { id, type, length, offset } = this._headerInfo;\n const bufferedDataLength = this._buffer.length - offset;\n if (bufferedDataLength < length) {\n break; // not enough data yet\n }\n const msg = {\n id,\n type\n };\n if (type === _message_types_js__WEBPACK_IMPORTED_MODULE_1__.MessageTypes.NEW_STREAM || type === _message_types_js__WEBPACK_IMPORTED_MODULE_1__.MessageTypes.MESSAGE_INITIATOR || type === _message_types_js__WEBPACK_IMPORTED_MODULE_1__.MessageTypes.MESSAGE_RECEIVER) {\n msg.data = this._buffer.sublist(offset, offset + length);\n }\n msgs.push(msg);\n this._buffer.consume(offset + length);\n this._headerInfo = null;\n }\n return msgs;\n }\n /**\n * Attempts to decode the message header from the buffer\n */\n _decodeHeader(data) {\n const { value: h, offset } = readVarInt(data);\n const { value: length, offset: end } = readVarInt(data, offset);\n const type = h & 7;\n // @ts-expect-error h is a number not a CODE\n if (_message_types_js__WEBPACK_IMPORTED_MODULE_1__.MessageTypeNames[type] == null) {\n throw new Error(`Invalid type received: ${type}`);\n }\n // test message type varint + data length\n if (length > this._maxMessageSize) {\n throw Object.assign(new Error('message size too large!'), { code: 'ERR_MSG_TOO_BIG' });\n }\n // @ts-expect-error h is a number not a CODE\n return { id: h >> 3, type, offset: offset + end, length };\n }\n}\nconst MSB = 0x80;\nconst REST = 0x7F;\nfunction readVarInt(buf, offset = 0) {\n let res = 0;\n let shift = 0;\n let counter = offset;\n let b;\n const l = buf.length;\n do {\n if (counter >= l || shift > 49) {\n offset = 0;\n throw new Range
/***/ }),
/***/ "./node_modules/@libp2p/mplex/dist/src/encode.js":
/*!*******************************************************!*\
!*** ./node_modules/@libp2p/mplex/dist/src/encode.js ***!
\*******************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ encode: () => (/* binding */ encode)\n/* harmony export */ });\n/* harmony import */ var it_batched_bytes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! it-batched-bytes */ \"./node_modules/it-batched-bytes/dist/src/index.js\");\n/* harmony import */ var uint8arraylist__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! uint8arraylist */ \"./node_modules/uint8arraylist/dist/src/index.js\");\n/* harmony import */ var varint__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! varint */ \"./node_modules/varint/index.js\");\n/* harmony import */ var _alloc_unsafe_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./alloc-unsafe.js */ \"./node_modules/@libp2p/mplex/dist/src/alloc-unsafe-browser.js\");\n/* harmony import */ var _message_types_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./message-types.js */ \"./node_modules/@libp2p/mplex/dist/src/message-types.js\");\n\n\n\n\n\nconst POOL_SIZE = 10 * 1024;\nclass Encoder {\n _pool;\n _poolOffset;\n constructor() {\n this._pool = (0,_alloc_unsafe_js__WEBPACK_IMPORTED_MODULE_3__.allocUnsafe)(POOL_SIZE);\n this._poolOffset = 0;\n }\n /**\n * Encodes the given message and adds it to the passed list\n */\n write(msg, list) {\n const pool = this._pool;\n let offset = this._poolOffset;\n varint__WEBPACK_IMPORTED_MODULE_2__.encode(msg.id << 3 | msg.type, pool, offset);\n offset += varint__WEBPACK_IMPORTED_MODULE_2__.encode.bytes ?? 0;\n if ((msg.type === _message_types_js__WEBPACK_IMPORTED_MODULE_4__.MessageTypes.NEW_STREAM || msg.type === _message_types_js__WEBPACK_IMPORTED_MODULE_4__.MessageTypes.MESSAGE_INITIATOR || msg.type === _message_types_js__WEBPACK_IMPORTED_MODULE_4__.MessageTypes.MESSAGE_RECEIVER) && msg.data != null) {\n varint__WEBPACK_IMPORTED_MODULE_2__.encode(msg.data.length, pool, offset);\n }\n else {\n varint__WEBPACK_IMPORTED_MODULE_2__.encode(0, pool, offset);\n }\n offset += varint__WEBPACK_IMPORTED_MODULE_2__.encode.bytes ?? 0;\n const header = pool.subarray(this._poolOffset, offset);\n if (POOL_SIZE - offset < 100) {\n this._pool = (0,_alloc_unsafe_js__WEBPACK_IMPORTED_MODULE_3__.allocUnsafe)(POOL_SIZE);\n this._poolOffset = 0;\n }\n else {\n this._poolOffset = offset;\n }\n list.append(header);\n if ((msg.type === _message_types_js__WEBPACK_IMPORTED_MODULE_4__.MessageTypes.NEW_STREAM || msg.type === _message_types_js__WEBPACK_IMPORTED_MODULE_4__.MessageTypes.MESSAGE_INITIATOR || msg.type === _message_types_js__WEBPACK_IMPORTED_MODULE_4__.MessageTypes.MESSAGE_RECEIVER) && msg.data != null) {\n list.append(msg.data);\n }\n }\n}\nconst encoder = new Encoder();\n/**\n * Encode and yield one or more messages\n */\nasync function* encode(source, minSendBytes = 0) {\n if (minSendBytes == null || minSendBytes === 0) {\n // just send the messages\n for await (const messages of source) {\n const list = new uint8arraylist__WEBPACK_IMPORTED_MODULE_1__.Uint8ArrayList();\n for (const msg of messages) {\n encoder.write(msg, list);\n }\n yield list.subarray();\n }\n return;\n }\n // batch messages up for sending\n yield* (0,it_batched_bytes__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(source, {\n size: minSendBytes,\n serialize: (obj, list) => {\n for (const m of obj) {\n encoder.write(m, list);\n }\n }\n });\n}\n//# sourceMappingURL=encode.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/mplex/dist/src/encode.js?");
/***/ }),
/***/ "./node_modules/@libp2p/mplex/dist/src/index.js":
/*!******************************************************!*\
!*** ./node_modules/@libp2p/mplex/dist/src/index.js ***!
\******************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ mplex: () => (/* binding */ mplex)\n/* harmony export */ });\n/* harmony import */ var _mplex_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./mplex.js */ \"./node_modules/@libp2p/mplex/dist/src/mplex.js\");\n\nclass Mplex {\n protocol = '/mplex/6.7.0';\n _init;\n constructor(init = {}) {\n this._init = init;\n }\n createStreamMuxer(init = {}) {\n return new _mplex_js__WEBPACK_IMPORTED_MODULE_0__.MplexStreamMuxer({\n ...init,\n ...this._init\n });\n }\n}\nfunction mplex(init = {}) {\n return () => new Mplex(init);\n}\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/mplex/dist/src/index.js?");
/***/ }),
/***/ "./node_modules/@libp2p/mplex/dist/src/message-types.js":
/*!**************************************************************!*\
!*** ./node_modules/@libp2p/mplex/dist/src/message-types.js ***!
\**************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ InitiatorMessageTypes: () => (/* binding */ InitiatorMessageTypes),\n/* harmony export */ MessageTypeNames: () => (/* binding */ MessageTypeNames),\n/* harmony export */ MessageTypes: () => (/* binding */ MessageTypes),\n/* harmony export */ ReceiverMessageTypes: () => (/* binding */ ReceiverMessageTypes)\n/* harmony export */ });\nvar MessageTypes;\n(function (MessageTypes) {\n MessageTypes[MessageTypes[\"NEW_STREAM\"] = 0] = \"NEW_STREAM\";\n MessageTypes[MessageTypes[\"MESSAGE_RECEIVER\"] = 1] = \"MESSAGE_RECEIVER\";\n MessageTypes[MessageTypes[\"MESSAGE_INITIATOR\"] = 2] = \"MESSAGE_INITIATOR\";\n MessageTypes[MessageTypes[\"CLOSE_RECEIVER\"] = 3] = \"CLOSE_RECEIVER\";\n MessageTypes[MessageTypes[\"CLOSE_INITIATOR\"] = 4] = \"CLOSE_INITIATOR\";\n MessageTypes[MessageTypes[\"RESET_RECEIVER\"] = 5] = \"RESET_RECEIVER\";\n MessageTypes[MessageTypes[\"RESET_INITIATOR\"] = 6] = \"RESET_INITIATOR\";\n})(MessageTypes || (MessageTypes = {}));\nconst MessageTypeNames = Object.freeze({\n 0: 'NEW_STREAM',\n 1: 'MESSAGE_RECEIVER',\n 2: 'MESSAGE_INITIATOR',\n 3: 'CLOSE_RECEIVER',\n 4: 'CLOSE_INITIATOR',\n 5: 'RESET_RECEIVER',\n 6: 'RESET_INITIATOR'\n});\nconst InitiatorMessageTypes = Object.freeze({\n NEW_STREAM: MessageTypes.NEW_STREAM,\n MESSAGE: MessageTypes.MESSAGE_INITIATOR,\n CLOSE: MessageTypes.CLOSE_INITIATOR,\n RESET: MessageTypes.RESET_INITIATOR\n});\nconst ReceiverMessageTypes = Object.freeze({\n MESSAGE: MessageTypes.MESSAGE_RECEIVER,\n CLOSE: MessageTypes.CLOSE_RECEIVER,\n RESET: MessageTypes.RESET_RECEIVER\n});\n//# sourceMappingURL=message-types.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/mplex/dist/src/message-types.js?");
/***/ }),
/***/ "./node_modules/@libp2p/mplex/dist/src/mplex.js":
/*!******************************************************!*\
!*** ./node_modules/@libp2p/mplex/dist/src/mplex.js ***!
\******************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ MplexStreamMuxer: () => (/* binding */ MplexStreamMuxer)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n/* harmony import */ var _libp2p_logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/logger */ \"./node_modules/@libp2p/logger/dist/src/index.js\");\n/* harmony import */ var abortable_iterator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! abortable-iterator */ \"./node_modules/abortable-iterator/dist/src/index.js\");\n/* harmony import */ var any_signal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! any-signal */ \"./node_modules/any-signal/dist/src/index.js\");\n/* harmony import */ var it_pushable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! it-pushable */ \"./node_modules/it-pushable/dist/src/index.js\");\n/* harmony import */ var rate_limiter_flexible__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rate-limiter-flexible */ \"./node_modules/rate-limiter-flexible/index.js\");\n/* harmony import */ var uint8arrays__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! uint8arrays */ \"./node_modules/uint8arrays/dist/src/index.js\");\n/* harmony import */ var _decode_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./decode.js */ \"./node_modules/@libp2p/mplex/dist/src/decode.js\");\n/* harmony import */ var _encode_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./encode.js */ \"./node_modules/@libp2p/mplex/dist/src/encode.js\");\n/* harmony import */ var _message_types_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./message-types.js */ \"./node_modules/@libp2p/mplex/dist/src/message-types.js\");\n/* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./stream.js */ \"./node_modules/@libp2p/mplex/dist/src/stream.js\");\n\n\n\n\n\n\n\n\n\n\n\nconst log = (0,_libp2p_logger__WEBPACK_IMPORTED_MODULE_1__.logger)('libp2p:mplex');\nconst MAX_STREAMS_INBOUND_STREAMS_PER_CONNECTION = 1024;\nconst MAX_STREAMS_OUTBOUND_STREAMS_PER_CONNECTION = 1024;\nconst MAX_STREAM_BUFFER_SIZE = 1024 * 1024 * 4; // 4MB\nconst DISCONNECT_THRESHOLD = 5;\nfunction printMessage(msg) {\n const output = {\n ...msg,\n type: `${_message_types_js__WEBPACK_IMPORTED_MODULE_9__.MessageTypeNames[msg.type]} (${msg.type})`\n };\n if (msg.type === _message_types_js__WEBPACK_IMPORTED_MODULE_9__.MessageTypes.NEW_STREAM) {\n output.data = (0,uint8arrays__WEBPACK_IMPORTED_MODULE_6__.toString)(msg.data instanceof Uint8Array ? msg.data : msg.data.subarray());\n }\n if (msg.type === _message_types_js__WEBPACK_IMPORTED_MODULE_9__.MessageTypes.MESSAGE_INITIATOR || msg.type === _message_types_js__WEBPACK_IMPORTED_MODULE_9__.MessageTypes.MESSAGE_RECEIVER) {\n output.data = (0,uint8arrays__WEBPACK_IMPORTED_MODULE_6__.toString)(msg.data instanceof Uint8Array ? msg.data : msg.data.subarray(), 'base16');\n }\n return output;\n}\nclass MplexStreamMuxer {\n protocol = '/mplex/6.7.0';\n sink;\n source;\n _streamId;\n _streams;\n _init;\n _source;\n closeController;\n rateLimiter;\n constructor(init) {\n init = init ?? {};\n this._streamId = 0;\n this._streams = {\n /**\n * Stream to ids map\n */\n initiators: new Map(),\n /**\n * Stream to ids map\n */\n receivers: new Map()\n };\n this._init = init;\n /**\n * An iterable sink\n */\n this.sink = this._createSink();\n /**\n * An iterable source\n */\n const source = this._createSource();\n this._source = source;\n this.source = source;\n /**\n * Close controller\n */\n this.closeController = ne
/***/ }),
/***/ "./node_modules/@libp2p/mplex/dist/src/stream.js":
/*!*******************************************************!*\
!*** ./node_modules/@libp2p/mplex/dist/src/stream.js ***!
\*******************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ createStream: () => (/* binding */ createStream)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interface_stream_muxer_stream__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interface-stream-muxer/stream */ \"./node_modules/@libp2p/interface-stream-muxer/dist/src/stream.js\");\n/* harmony import */ var uint8arraylist__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! uint8arraylist */ \"./node_modules/uint8arraylist/dist/src/index.js\");\n/* harmony import */ var uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! uint8arrays/from-string */ \"./node_modules/uint8arrays/dist/src/from-string.js\");\n/* harmony import */ var _decode_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./decode.js */ \"./node_modules/@libp2p/mplex/dist/src/decode.js\");\n/* harmony import */ var _message_types_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./message-types.js */ \"./node_modules/@libp2p/mplex/dist/src/message-types.js\");\n\n\n\n\n\nclass MplexStream extends _libp2p_interface_stream_muxer_stream__WEBPACK_IMPORTED_MODULE_0__.AbstractStream {\n name;\n streamId;\n send;\n types;\n constructor(init) {\n super(init);\n this.types = init.direction === 'outbound' ? _message_types_js__WEBPACK_IMPORTED_MODULE_4__.InitiatorMessageTypes : _message_types_js__WEBPACK_IMPORTED_MODULE_4__.ReceiverMessageTypes;\n this.send = init.send;\n this.name = init.name;\n this.streamId = init.streamId;\n }\n sendNewStream() {\n this.send({ id: this.streamId, type: _message_types_js__WEBPACK_IMPORTED_MODULE_4__.InitiatorMessageTypes.NEW_STREAM, data: new uint8arraylist__WEBPACK_IMPORTED_MODULE_1__.Uint8ArrayList((0,uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_2__.fromString)(this.name)) });\n }\n sendData(data) {\n this.send({ id: this.streamId, type: this.types.MESSAGE, data });\n }\n sendReset() {\n this.send({ id: this.streamId, type: this.types.RESET });\n }\n sendCloseWrite() {\n this.send({ id: this.streamId, type: this.types.CLOSE });\n }\n sendCloseRead() {\n // mplex does not support close read, only close write\n }\n}\nfunction createStream(options) {\n const { id, name, send, onEnd, type = 'initiator', maxMsgSize = _decode_js__WEBPACK_IMPORTED_MODULE_3__.MAX_MSG_SIZE } = options;\n return new MplexStream({\n id: type === 'initiator' ? (`i${id}`) : `r${id}`,\n streamId: id,\n name: `${name == null ? id : name}`,\n direction: type === 'initiator' ? 'outbound' : 'inbound',\n maxDataSize: maxMsgSize,\n onEnd,\n send\n });\n}\n//# sourceMappingURL=stream.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/mplex/dist/src/stream.js?");
/***/ }),
/***/ "./node_modules/@libp2p/multistream-select/dist/src/constants.js":
/*!***********************************************************************!*\
!*** ./node_modules/@libp2p/multistream-select/dist/src/constants.js ***!
\***********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ MAX_PROTOCOL_LENGTH: () => (/* binding */ MAX_PROTOCOL_LENGTH),\n/* harmony export */ PROTOCOL_ID: () => (/* binding */ PROTOCOL_ID)\n/* harmony export */ });\nconst PROTOCOL_ID = '/multistream/1.0.0';\n// Conforming to go-libp2p\n// See https://github.com/multiformats/go-multistream/blob/master/multistream.go#L297\nconst MAX_PROTOCOL_LENGTH = 1024;\n//# sourceMappingURL=constants.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/multistream-select/dist/src/constants.js?");
/***/ }),
/***/ "./node_modules/@libp2p/multistream-select/dist/src/handle.js":
/*!********************************************************************!*\
!*** ./node_modules/@libp2p/multistream-select/dist/src/handle.js ***!
\********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ handle: () => (/* binding */ handle)\n/* harmony export */ });\n/* harmony import */ var _libp2p_logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/logger */ \"./node_modules/@libp2p/logger/dist/src/index.js\");\n/* harmony import */ var it_handshake__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! it-handshake */ \"./node_modules/it-handshake/dist/src/index.js\");\n/* harmony import */ var uint8arraylist__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! uint8arraylist */ \"./node_modules/uint8arraylist/dist/src/index.js\");\n/* harmony import */ var uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! uint8arrays/from-string */ \"./node_modules/uint8arrays/dist/src/from-string.js\");\n/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./constants.js */ \"./node_modules/@libp2p/multistream-select/dist/src/constants.js\");\n/* harmony import */ var _multistream_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./multistream.js */ \"./node_modules/@libp2p/multistream-select/dist/src/multistream.js\");\n\n\n\n\n\n\nconst log = (0,_libp2p_logger__WEBPACK_IMPORTED_MODULE_0__.logger)('libp2p:mss:handle');\nasync function handle(stream, protocols, options) {\n protocols = Array.isArray(protocols) ? protocols : [protocols];\n const { writer, reader, rest, stream: shakeStream } = (0,it_handshake__WEBPACK_IMPORTED_MODULE_1__.handshake)(stream);\n while (true) {\n const protocol = await _multistream_js__WEBPACK_IMPORTED_MODULE_5__.readString(reader, options);\n log.trace('read \"%s\"', protocol);\n if (protocol === _constants_js__WEBPACK_IMPORTED_MODULE_4__.PROTOCOL_ID) {\n log.trace('respond with \"%s\" for \"%s\"', _constants_js__WEBPACK_IMPORTED_MODULE_4__.PROTOCOL_ID, protocol);\n _multistream_js__WEBPACK_IMPORTED_MODULE_5__.write(writer, (0,uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_3__.fromString)(_constants_js__WEBPACK_IMPORTED_MODULE_4__.PROTOCOL_ID), options);\n continue;\n }\n if (protocols.includes(protocol)) {\n _multistream_js__WEBPACK_IMPORTED_MODULE_5__.write(writer, (0,uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_3__.fromString)(protocol), options);\n log.trace('respond with \"%s\" for \"%s\"', protocol, protocol);\n rest();\n return { stream: shakeStream, protocol };\n }\n if (protocol === 'ls') {\n // <varint-msg-len><varint-proto-name-len><proto-name>\\n<varint-proto-name-len><proto-name>\\n\\n\n _multistream_js__WEBPACK_IMPORTED_MODULE_5__.write(writer, new uint8arraylist__WEBPACK_IMPORTED_MODULE_2__.Uint8ArrayList(...protocols.map(p => _multistream_js__WEBPACK_IMPORTED_MODULE_5__.encode((0,uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_3__.fromString)(p)))), options);\n // multistream.writeAll(writer, protocols.map(p => uint8ArrayFromString(p)))\n log.trace('respond with \"%s\" for %s', protocols, protocol);\n continue;\n }\n _multistream_js__WEBPACK_IMPORTED_MODULE_5__.write(writer, (0,uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_3__.fromString)('na'), options);\n log('respond with \"na\" for \"%s\"', protocol);\n }\n}\n//# sourceMappingURL=handle.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/multistream-select/dist/src/handle.js?");
/***/ }),
/***/ "./node_modules/@libp2p/multistream-select/dist/src/index.js":
/*!*******************************************************************!*\
!*** ./node_modules/@libp2p/multistream-select/dist/src/index.js ***!
\*******************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PROTOCOL_ID: () => (/* reexport safe */ _constants_js__WEBPACK_IMPORTED_MODULE_0__.PROTOCOL_ID),\n/* harmony export */ handle: () => (/* reexport safe */ _handle_js__WEBPACK_IMPORTED_MODULE_2__.handle),\n/* harmony export */ lazySelect: () => (/* reexport safe */ _select_js__WEBPACK_IMPORTED_MODULE_1__.lazySelect),\n/* harmony export */ select: () => (/* reexport safe */ _select_js__WEBPACK_IMPORTED_MODULE_1__.select)\n/* harmony export */ });\n/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constants.js */ \"./node_modules/@libp2p/multistream-select/dist/src/constants.js\");\n/* harmony import */ var _select_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./select.js */ \"./node_modules/@libp2p/multistream-select/dist/src/select.js\");\n/* harmony import */ var _handle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./handle.js */ \"./node_modules/@libp2p/multistream-select/dist/src/handle.js\");\n\n\n\n\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/multistream-select/dist/src/index.js?");
/***/ }),
/***/ "./node_modules/@libp2p/multistream-select/dist/src/multistream.js":
/*!*************************************************************************!*\
!*** ./node_modules/@libp2p/multistream-select/dist/src/multistream.js ***!
\*************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ encode: () => (/* binding */ encode),\n/* harmony export */ read: () => (/* binding */ read),\n/* harmony export */ readString: () => (/* binding */ readString),\n/* harmony export */ write: () => (/* binding */ write),\n/* harmony export */ writeAll: () => (/* binding */ writeAll)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n/* harmony import */ var _libp2p_logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/logger */ \"./node_modules/@libp2p/logger/dist/src/index.js\");\n/* harmony import */ var abortable_iterator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! abortable-iterator */ \"./node_modules/abortable-iterator/dist/src/index.js\");\n/* harmony import */ var it_first__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! it-first */ \"./node_modules/it-first/dist/src/index.js\");\n/* harmony import */ var it_length_prefixed__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! it-length-prefixed */ \"./node_modules/it-length-prefixed/dist/src/index.js\");\n/* harmony import */ var it_pipe__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! it-pipe */ \"./node_modules/it-pipe/dist/src/index.js\");\n/* harmony import */ var uint8arraylist__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! uint8arraylist */ \"./node_modules/uint8arraylist/dist/src/index.js\");\n/* harmony import */ var uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! uint8arrays/from-string */ \"./node_modules/uint8arrays/dist/src/from-string.js\");\n/* harmony import */ var uint8arrays_to_string__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! uint8arrays/to-string */ \"./node_modules/uint8arrays/dist/src/to-string.js\");\n/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./constants.js */ \"./node_modules/@libp2p/multistream-select/dist/src/constants.js\");\n\n\n\n\n\n\n\n\n\n\nconst log = (0,_libp2p_logger__WEBPACK_IMPORTED_MODULE_1__.logger)('libp2p:mss');\nconst NewLine = (0,uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_7__.fromString)('\\n');\nfunction encode(buffer) {\n const list = new uint8arraylist__WEBPACK_IMPORTED_MODULE_6__.Uint8ArrayList(buffer, NewLine);\n return it_length_prefixed__WEBPACK_IMPORTED_MODULE_4__.encode.single(list);\n}\n/**\n * `write` encodes and writes a single buffer\n */\nfunction write(writer, buffer, options = {}) {\n const encoded = encode(buffer);\n if (options.writeBytes === true) {\n writer.push(encoded.subarray());\n }\n else {\n writer.push(encoded);\n }\n}\n/**\n * `writeAll` behaves like `write`, except it encodes an array of items as a single write\n */\nfunction writeAll(writer, buffers, options = {}) {\n const list = new uint8arraylist__WEBPACK_IMPORTED_MODULE_6__.Uint8ArrayList();\n for (const buf of buffers) {\n list.append(encode(buf));\n }\n if (options.writeBytes === true) {\n writer.push(list.subarray());\n }\n else {\n writer.push(list);\n }\n}\nasync function read(reader, options) {\n let byteLength = 1; // Read single byte chunks until the length is known\n const varByteSource = {\n [Symbol.asyncIterator]: () => varByteSource,\n next: async () => reader.next(byteLength)\n };\n let input = varByteSource;\n // If we have been passed an abort signal, wrap the input source in an abortable\n // iterator that will throw if the operation is aborted\n if (options?.signal != null) {\n input = (0,abortable_iterator__WEBPACK_IMPORTED_MODULE_2__.abortableSource)(varByteSource, options.signal);\n }\n // Once the length has been parsed, read chunk for that length\n const onLength = (l) => {\n byteLength = l;\n };\n const buf = await (
/***/ }),
/***/ "./node_modules/@libp2p/multistream-select/dist/src/select.js":
/*!********************************************************************!*\
!*** ./node_modules/@libp2p/multistream-select/dist/src/select.js ***!
\********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ lazySelect: () => (/* binding */ lazySelect),\n/* harmony export */ select: () => (/* binding */ select)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n/* harmony import */ var _libp2p_logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/logger */ \"./node_modules/@libp2p/logger/dist/src/index.js\");\n/* harmony import */ var it_handshake__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! it-handshake */ \"./node_modules/it-handshake/dist/src/index.js\");\n/* harmony import */ var it_merge__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! it-merge */ \"./node_modules/it-merge/dist/src/index.js\");\n/* harmony import */ var it_pushable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! it-pushable */ \"./node_modules/it-pushable/dist/src/index.js\");\n/* harmony import */ var it_reader__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! it-reader */ \"./node_modules/it-reader/dist/src/index.js\");\n/* harmony import */ var uint8arraylist__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! uint8arraylist */ \"./node_modules/uint8arraylist/dist/src/index.js\");\n/* harmony import */ var uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! uint8arrays/from-string */ \"./node_modules/uint8arrays/dist/src/from-string.js\");\n/* harmony import */ var _multistream_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./multistream.js */ \"./node_modules/@libp2p/multistream-select/dist/src/multistream.js\");\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./index.js */ \"./node_modules/@libp2p/multistream-select/dist/src/index.js\");\n\n\n\n\n\n\n\n\n\n\nconst log = (0,_libp2p_logger__WEBPACK_IMPORTED_MODULE_1__.logger)('libp2p:mss:select');\nasync function select(stream, protocols, options = {}) {\n protocols = Array.isArray(protocols) ? [...protocols] : [protocols];\n const { reader, writer, rest, stream: shakeStream } = (0,it_handshake__WEBPACK_IMPORTED_MODULE_2__.handshake)(stream);\n const protocol = protocols.shift();\n if (protocol == null) {\n throw new Error('At least one protocol must be specified');\n }\n log.trace('select: write [\"%s\", \"%s\"]', _index_js__WEBPACK_IMPORTED_MODULE_9__.PROTOCOL_ID, protocol);\n const p1 = (0,uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_7__.fromString)(_index_js__WEBPACK_IMPORTED_MODULE_9__.PROTOCOL_ID);\n const p2 = (0,uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_7__.fromString)(protocol);\n _multistream_js__WEBPACK_IMPORTED_MODULE_8__.writeAll(writer, [p1, p2], options);\n let response = await _multistream_js__WEBPACK_IMPORTED_MODULE_8__.readString(reader, options);\n log.trace('select: read \"%s\"', response);\n // Read the protocol response if we got the protocolId in return\n if (response === _index_js__WEBPACK_IMPORTED_MODULE_9__.PROTOCOL_ID) {\n response = await _multistream_js__WEBPACK_IMPORTED_MODULE_8__.readString(reader, options);\n log.trace('select: read \"%s\"', response);\n }\n // We're done\n if (response === protocol) {\n rest();\n return { stream: shakeStream, protocol };\n }\n // We haven't gotten a valid ack, try the other protocols\n for (const protocol of protocols) {\n log.trace('select: write \"%s\"', protocol);\n _multistream_js__WEBPACK_IMPORTED_MODULE_8__.write(writer, (0,uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_7__.fromString)(protocol), options);\n const response = await _multistream_js__WEBPACK_IMPORTED_MODULE_8__.readString(reader, options);\n log.trace('select: read \"%s\" for \"%s\"', response, protocol);\n if (response === protocol) {\n rest(); // End our writer so others can start
/***/ }),
/***/ "./node_modules/@libp2p/peer-collections/dist/src/index.js":
/*!*****************************************************************!*\
!*** ./node_modules/@libp2p/peer-collections/dist/src/index.js ***!
\*****************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PeerList: () => (/* reexport safe */ _list_js__WEBPACK_IMPORTED_MODULE_2__.PeerList),\n/* harmony export */ PeerMap: () => (/* reexport safe */ _map_js__WEBPACK_IMPORTED_MODULE_0__.PeerMap),\n/* harmony export */ PeerSet: () => (/* reexport safe */ _set_js__WEBPACK_IMPORTED_MODULE_1__.PeerSet)\n/* harmony export */ });\n/* harmony import */ var _map_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./map.js */ \"./node_modules/@libp2p/peer-collections/dist/src/map.js\");\n/* harmony import */ var _set_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./set.js */ \"./node_modules/@libp2p/peer-collections/dist/src/set.js\");\n/* harmony import */ var _list_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./list.js */ \"./node_modules/@libp2p/peer-collections/dist/src/list.js\");\n\n\n\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/peer-collections/dist/src/index.js?");
/***/ }),
/***/ "./node_modules/@libp2p/peer-collections/dist/src/list.js":
/*!****************************************************************!*\
!*** ./node_modules/@libp2p/peer-collections/dist/src/list.js ***!
\****************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PeerList: () => (/* binding */ PeerList)\n/* harmony export */ });\n/* harmony import */ var _libp2p_peer_id__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/peer-id */ \"./node_modules/@libp2p/peer-id/dist/src/index.js\");\n/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util.js */ \"./node_modules/@libp2p/peer-collections/dist/src/util.js\");\n\n\n/**\n * We can't use PeerIds as list entries because list entries are\n * compared using same-value-zero equality, so this is just\n * a map that stringifies the PeerIds before storing them.\n *\n * PeerIds cache stringified versions of themselves so this\n * should be a cheap operation.\n *\n * @example\n *\n * ```JavaScript\n * import { peerList } from '@libp2p/peer-collections'\n *\n * const list = peerList()\n * list.push(peerId)\n * ```\n */\nclass PeerList {\n list;\n constructor(list) {\n this.list = [];\n if (list != null) {\n for (const value of list) {\n this.list.push(value.toString());\n }\n }\n }\n [Symbol.iterator]() {\n return (0,_util_js__WEBPACK_IMPORTED_MODULE_1__.mapIterable)(this.list.entries(), (val) => {\n return (0,_libp2p_peer_id__WEBPACK_IMPORTED_MODULE_0__.peerIdFromString)(val[1]);\n });\n }\n concat(list) {\n const output = new PeerList(this);\n for (const value of list) {\n output.push(value);\n }\n return output;\n }\n entries() {\n return (0,_util_js__WEBPACK_IMPORTED_MODULE_1__.mapIterable)(this.list.entries(), (val) => {\n return [val[0], (0,_libp2p_peer_id__WEBPACK_IMPORTED_MODULE_0__.peerIdFromString)(val[1])];\n });\n }\n every(predicate) {\n return this.list.every((str, index) => {\n return predicate((0,_libp2p_peer_id__WEBPACK_IMPORTED_MODULE_0__.peerIdFromString)(str), index, this);\n });\n }\n filter(predicate) {\n const output = new PeerList();\n this.list.forEach((str, index) => {\n const peerId = (0,_libp2p_peer_id__WEBPACK_IMPORTED_MODULE_0__.peerIdFromString)(str);\n if (predicate(peerId, index, this)) {\n output.push(peerId);\n }\n });\n return output;\n }\n find(predicate) {\n const str = this.list.find((str, index) => {\n return predicate((0,_libp2p_peer_id__WEBPACK_IMPORTED_MODULE_0__.peerIdFromString)(str), index, this);\n });\n if (str == null) {\n return undefined;\n }\n return (0,_libp2p_peer_id__WEBPACK_IMPORTED_MODULE_0__.peerIdFromString)(str);\n }\n findIndex(predicate) {\n return this.list.findIndex((str, index) => {\n return predicate((0,_libp2p_peer_id__WEBPACK_IMPORTED_MODULE_0__.peerIdFromString)(str), index, this);\n });\n }\n forEach(predicate) {\n this.list.forEach((str, index) => {\n predicate((0,_libp2p_peer_id__WEBPACK_IMPORTED_MODULE_0__.peerIdFromString)(str), index, this);\n });\n }\n includes(peerId) {\n return this.list.includes(peerId.toString());\n }\n indexOf(peerId) {\n return this.list.indexOf(peerId.toString());\n }\n pop() {\n const str = this.list.pop();\n if (str == null) {\n return undefined;\n }\n return (0,_libp2p_peer_id__WEBPACK_IMPORTED_MODULE_0__.peerIdFromString)(str);\n }\n push(...peerIds) {\n for (const peerId of peerIds) {\n this.list.push(peerId.toString());\n }\n }\n shift() {\n const str = this.list.shift();\n if (str == null) {\n return undefined;\n }\n return (0,_libp2p_peer_id__WEBPACK_IMPORTED_MODULE_0__.peerIdFromString)(str);\n }\n unshift(...peerIds) {\n let len = this.list.length;\n for (let i = peerIds.length -
/***/ }),
/***/ "./node_modules/@libp2p/peer-collections/dist/src/map.js":
/*!***************************************************************!*\
!*** ./node_modules/@libp2p/peer-collections/dist/src/map.js ***!
\***************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PeerMap: () => (/* binding */ PeerMap)\n/* harmony export */ });\n/* harmony import */ var _libp2p_peer_id__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/peer-id */ \"./node_modules/@libp2p/peer-id/dist/src/index.js\");\n/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util.js */ \"./node_modules/@libp2p/peer-collections/dist/src/util.js\");\n\n\n/**\n * We can't use PeerIds as map keys because map keys are\n * compared using same-value-zero equality, so this is just\n * a map that stringifies the PeerIds before storing them.\n *\n * PeerIds cache stringified versions of themselves so this\n * should be a cheap operation.\n *\n * @example\n *\n * ```JavaScript\n * import { peerMap } from '@libp2p/peer-collections'\n *\n * const map = peerMap<string>()\n * map.set(peerId, 'value')\n * ```\n */\nclass PeerMap {\n map;\n constructor(map) {\n this.map = new Map();\n if (map != null) {\n for (const [key, value] of map.entries()) {\n this.map.set(key.toString(), value);\n }\n }\n }\n [Symbol.iterator]() {\n return this.entries();\n }\n clear() {\n this.map.clear();\n }\n delete(peer) {\n this.map.delete(peer.toString());\n }\n entries() {\n return (0,_util_js__WEBPACK_IMPORTED_MODULE_1__.mapIterable)(this.map.entries(), (val) => {\n return [(0,_libp2p_peer_id__WEBPACK_IMPORTED_MODULE_0__.peerIdFromString)(val[0]), val[1]];\n });\n }\n forEach(fn) {\n this.map.forEach((value, key) => {\n fn(value, (0,_libp2p_peer_id__WEBPACK_IMPORTED_MODULE_0__.peerIdFromString)(key), this);\n });\n }\n get(peer) {\n return this.map.get(peer.toString());\n }\n has(peer) {\n return this.map.has(peer.toString());\n }\n set(peer, value) {\n this.map.set(peer.toString(), value);\n }\n keys() {\n return (0,_util_js__WEBPACK_IMPORTED_MODULE_1__.mapIterable)(this.map.keys(), (val) => {\n return (0,_libp2p_peer_id__WEBPACK_IMPORTED_MODULE_0__.peerIdFromString)(val);\n });\n }\n values() {\n return this.map.values();\n }\n get size() {\n return this.map.size;\n }\n}\n//# sourceMappingURL=map.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/peer-collections/dist/src/map.js?");
/***/ }),
/***/ "./node_modules/@libp2p/peer-collections/dist/src/set.js":
/*!***************************************************************!*\
!*** ./node_modules/@libp2p/peer-collections/dist/src/set.js ***!
\***************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PeerSet: () => (/* binding */ PeerSet)\n/* harmony export */ });\n/* harmony import */ var _libp2p_peer_id__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/peer-id */ \"./node_modules/@libp2p/peer-id/dist/src/index.js\");\n/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util.js */ \"./node_modules/@libp2p/peer-collections/dist/src/util.js\");\n\n\n/**\n * We can't use PeerIds as set entries because set entries are\n * compared using same-value-zero equality, so this is just\n * a map that stringifies the PeerIds before storing them.\n *\n * PeerIds cache stringified versions of themselves so this\n * should be a cheap operation.\n *\n * @example\n *\n * ```JavaScript\n * import { peerSet } from '@libp2p/peer-collections'\n *\n * const set = peerSet()\n * set.add(peerId)\n * ```\n */\nclass PeerSet {\n set;\n constructor(set) {\n this.set = new Set();\n if (set != null) {\n for (const key of set) {\n this.set.add(key.toString());\n }\n }\n }\n get size() {\n return this.set.size;\n }\n [Symbol.iterator]() {\n return this.values();\n }\n add(peer) {\n this.set.add(peer.toString());\n }\n clear() {\n this.set.clear();\n }\n delete(peer) {\n this.set.delete(peer.toString());\n }\n entries() {\n return (0,_util_js__WEBPACK_IMPORTED_MODULE_1__.mapIterable)(this.set.entries(), (val) => {\n const peerId = (0,_libp2p_peer_id__WEBPACK_IMPORTED_MODULE_0__.peerIdFromString)(val[0]);\n return [peerId, peerId];\n });\n }\n forEach(predicate) {\n this.set.forEach((str) => {\n const id = (0,_libp2p_peer_id__WEBPACK_IMPORTED_MODULE_0__.peerIdFromString)(str);\n predicate(id, id, this);\n });\n }\n has(peer) {\n return this.set.has(peer.toString());\n }\n values() {\n return (0,_util_js__WEBPACK_IMPORTED_MODULE_1__.mapIterable)(this.set.values(), (val) => {\n return (0,_libp2p_peer_id__WEBPACK_IMPORTED_MODULE_0__.peerIdFromString)(val);\n });\n }\n intersection(other) {\n const output = new PeerSet();\n for (const peerId of other) {\n if (this.has(peerId)) {\n output.add(peerId);\n }\n }\n return output;\n }\n difference(other) {\n const output = new PeerSet();\n for (const peerId of this) {\n if (!other.has(peerId)) {\n output.add(peerId);\n }\n }\n return output;\n }\n union(other) {\n const output = new PeerSet();\n for (const peerId of other) {\n output.add(peerId);\n }\n for (const peerId of this) {\n output.add(peerId);\n }\n return output;\n }\n}\n//# sourceMappingURL=set.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/peer-collections/dist/src/set.js?");
/***/ }),
/***/ "./node_modules/@libp2p/peer-collections/dist/src/util.js":
/*!****************************************************************!*\
!*** ./node_modules/@libp2p/peer-collections/dist/src/util.js ***!
\****************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ mapIterable: () => (/* binding */ mapIterable)\n/* harmony export */ });\n/**\n * Calls the passed map function on every entry of the passed iterable iterator\n */\nfunction mapIterable(iter, map) {\n const iterator = {\n [Symbol.iterator]: () => {\n return iterator;\n },\n next: () => {\n const next = iter.next();\n const val = next.value;\n if (next.done === true || val == null) {\n const result = {\n done: true,\n value: undefined\n };\n return result;\n }\n return {\n done: false,\n value: map(val)\n };\n }\n };\n return iterator;\n}\n//# sourceMappingURL=util.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/peer-collections/dist/src/util.js?");
/***/ }),
/***/ "./node_modules/@libp2p/peer-id-factory/dist/src/index.js":
/*!****************************************************************!*\
!*** ./node_modules/@libp2p/peer-id-factory/dist/src/index.js ***!
\****************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ createEd25519PeerId: () => (/* binding */ createEd25519PeerId),\n/* harmony export */ createFromJSON: () => (/* binding */ createFromJSON),\n/* harmony export */ createFromPrivKey: () => (/* binding */ createFromPrivKey),\n/* harmony export */ createFromProtobuf: () => (/* binding */ createFromProtobuf),\n/* harmony export */ createFromPubKey: () => (/* binding */ createFromPubKey),\n/* harmony export */ createRSAPeerId: () => (/* binding */ createRSAPeerId),\n/* harmony export */ createSecp256k1PeerId: () => (/* binding */ createSecp256k1PeerId),\n/* harmony export */ exportToProtobuf: () => (/* binding */ exportToProtobuf)\n/* harmony export */ });\n/* harmony import */ var _libp2p_crypto_keys__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/crypto/keys */ \"./node_modules/@libp2p/crypto/dist/src/keys/index.js\");\n/* harmony import */ var _libp2p_peer_id__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/peer-id */ \"./node_modules/@libp2p/peer-id/dist/src/index.js\");\n/* harmony import */ var uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! uint8arrays/from-string */ \"./node_modules/uint8arrays/dist/src/from-string.js\");\n/* harmony import */ var _proto_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./proto.js */ \"./node_modules/@libp2p/peer-id-factory/dist/src/proto.js\");\n\n\n\n\nconst createEd25519PeerId = async () => {\n const key = await (0,_libp2p_crypto_keys__WEBPACK_IMPORTED_MODULE_0__.generateKeyPair)('Ed25519');\n const id = await createFromPrivKey(key);\n if (id.type === 'Ed25519') {\n return id;\n }\n throw new Error(`Generated unexpected PeerId type \"${id.type}\"`);\n};\nconst createSecp256k1PeerId = async () => {\n const key = await (0,_libp2p_crypto_keys__WEBPACK_IMPORTED_MODULE_0__.generateKeyPair)('secp256k1');\n const id = await createFromPrivKey(key);\n if (id.type === 'secp256k1') {\n return id;\n }\n throw new Error(`Generated unexpected PeerId type \"${id.type}\"`);\n};\nconst createRSAPeerId = async (opts) => {\n const key = await (0,_libp2p_crypto_keys__WEBPACK_IMPORTED_MODULE_0__.generateKeyPair)('RSA', opts?.bits ?? 2048);\n const id = await createFromPrivKey(key);\n if (id.type === 'RSA') {\n return id;\n }\n throw new Error(`Generated unexpected PeerId type \"${id.type}\"`);\n};\nasync function createFromPubKey(publicKey) {\n return (0,_libp2p_peer_id__WEBPACK_IMPORTED_MODULE_1__.peerIdFromKeys)((0,_libp2p_crypto_keys__WEBPACK_IMPORTED_MODULE_0__.marshalPublicKey)(publicKey));\n}\nasync function createFromPrivKey(privateKey) {\n return (0,_libp2p_peer_id__WEBPACK_IMPORTED_MODULE_1__.peerIdFromKeys)((0,_libp2p_crypto_keys__WEBPACK_IMPORTED_MODULE_0__.marshalPublicKey)(privateKey.public), (0,_libp2p_crypto_keys__WEBPACK_IMPORTED_MODULE_0__.marshalPrivateKey)(privateKey));\n}\nfunction exportToProtobuf(peerId, excludePrivateKey) {\n return _proto_js__WEBPACK_IMPORTED_MODULE_3__.PeerIdProto.encode({\n id: peerId.multihash.bytes,\n pubKey: peerId.publicKey,\n privKey: excludePrivateKey === true || peerId.privateKey == null ? undefined : peerId.privateKey\n });\n}\nasync function createFromProtobuf(buf) {\n const { id, privKey, pubKey } = _proto_js__WEBPACK_IMPORTED_MODULE_3__.PeerIdProto.decode(buf);\n return createFromParts(id ?? new Uint8Array(0), privKey, pubKey);\n}\nasync function createFromJSON(obj) {\n return createFromParts((0,uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_2__.fromString)(obj.id, 'base58btc'), obj.privKey != null ? (0,uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_2__.fromString)(obj.privKey, 'base64pad') : undefined, obj.pubKey != null ? (0,uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_2__.fromString)(obj.pubKey, 'base64pad') : undefined);\n}\nasync function createFromParts(multihash, privKey, pubKey) {\n if (privKey != null) {\
/***/ }),
/***/ "./node_modules/@libp2p/peer-id-factory/dist/src/proto.js":
/*!****************************************************************!*\
!*** ./node_modules/@libp2p/peer-id-factory/dist/src/proto.js ***!
\****************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PeerIdProto: () => (/* binding */ PeerIdProto)\n/* harmony export */ });\n/* harmony import */ var protons_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! protons-runtime */ \"./node_modules/protons-runtime/dist/src/index.js\");\n/* eslint-disable import/export */\n/* eslint-disable complexity */\n/* eslint-disable @typescript-eslint/no-namespace */\n/* eslint-disable @typescript-eslint/no-unnecessary-boolean-literal-compare */\n/* eslint-disable @typescript-eslint/no-empty-interface */\n\nvar PeerIdProto;\n(function (PeerIdProto) {\n let _codec;\n PeerIdProto.codec = () => {\n if (_codec == null) {\n _codec = (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.message)((obj, w, opts = {}) => {\n if (opts.lengthDelimited !== false) {\n w.fork();\n }\n if (obj.id != null) {\n w.uint32(10);\n w.bytes(obj.id);\n }\n if (obj.pubKey != null) {\n w.uint32(18);\n w.bytes(obj.pubKey);\n }\n if (obj.privKey != null) {\n w.uint32(26);\n w.bytes(obj.privKey);\n }\n if (opts.lengthDelimited !== false) {\n w.ldelim();\n }\n }, (reader, length) => {\n const obj = {};\n const end = length == null ? reader.len : reader.pos + length;\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n obj.id = reader.bytes();\n break;\n case 2:\n obj.pubKey = reader.bytes();\n break;\n case 3:\n obj.privKey = reader.bytes();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return obj;\n });\n }\n return _codec;\n };\n PeerIdProto.encode = (obj) => {\n return (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.encodeMessage)(obj, PeerIdProto.codec());\n };\n PeerIdProto.decode = (buf) => {\n return (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.decodeMessage)(buf, PeerIdProto.codec());\n };\n})(PeerIdProto || (PeerIdProto = {}));\n//# sourceMappingURL=proto.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/peer-id-factory/dist/src/proto.js?");
/***/ }),
/***/ "./node_modules/@libp2p/peer-id/dist/src/index.js":
/*!********************************************************!*\
!*** ./node_modules/@libp2p/peer-id/dist/src/index.js ***!
\********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ createPeerId: () => (/* binding */ createPeerId),\n/* harmony export */ peerIdFromBytes: () => (/* binding */ peerIdFromBytes),\n/* harmony export */ peerIdFromCID: () => (/* binding */ peerIdFromCID),\n/* harmony export */ peerIdFromKeys: () => (/* binding */ peerIdFromKeys),\n/* harmony export */ peerIdFromPeerId: () => (/* binding */ peerIdFromPeerId),\n/* harmony export */ peerIdFromString: () => (/* binding */ peerIdFromString)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interface_peer_id__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interface-peer-id */ \"./node_modules/@libp2p/interface-peer-id/dist/src/index.js\");\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n/* harmony import */ var multiformats_bases_base58__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! multiformats/bases/base58 */ \"./node_modules/multiformats/src/bases/base58.js\");\n/* harmony import */ var multiformats_basics__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! multiformats/basics */ \"./node_modules/multiformats/src/basics.js\");\n/* harmony import */ var multiformats_cid__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! multiformats/cid */ \"./node_modules/multiformats/src/cid.js\");\n/* harmony import */ var multiformats_hashes_digest__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! multiformats/hashes/digest */ \"./node_modules/multiformats/src/hashes/digest.js\");\n/* harmony import */ var multiformats_hashes_identity__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! multiformats/hashes/identity */ \"./node_modules/multiformats/src/hashes/identity.js\");\n/* harmony import */ var multiformats_hashes_sha2__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! multiformats/hashes/sha2 */ \"./node_modules/multiformats/src/hashes/sha2-browser.js\");\n/* harmony import */ var uint8arrays_equals__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! uint8arrays/equals */ \"./node_modules/uint8arrays/dist/src/equals.js\");\n\n\n\n\n\n\n\n\n\nconst inspect = Symbol.for('nodejs.util.inspect.custom');\nconst baseDecoder = Object\n .values(multiformats_basics__WEBPACK_IMPORTED_MODULE_3__.bases)\n .map(codec => codec.decoder)\n // @ts-expect-error https://github.com/multiformats/js-multiformats/issues/141\n .reduce((acc, curr) => acc.or(curr), multiformats_basics__WEBPACK_IMPORTED_MODULE_3__.bases.identity.decoder);\n// these values are from https://github.com/multiformats/multicodec/blob/master/table.csv\nconst LIBP2P_KEY_CODE = 0x72;\nconst MARSHALLED_ED225519_PUBLIC_KEY_LENGTH = 36;\nconst MARSHALLED_SECP256K1_PUBLIC_KEY_LENGTH = 37;\nclass PeerIdImpl {\n type;\n multihash;\n privateKey;\n publicKey;\n string;\n constructor(init) {\n this.type = init.type;\n this.multihash = init.multihash;\n this.privateKey = init.privateKey;\n // mark string cache as non-enumerable\n Object.defineProperty(this, 'string', {\n enumerable: false,\n writable: true\n });\n }\n get [Symbol.toStringTag]() {\n return `PeerId(${this.toString()})`;\n }\n [_libp2p_interface_peer_id__WEBPACK_IMPORTED_MODULE_0__.symbol] = true;\n toString() {\n if (this.string == null) {\n this.string = multiformats_bases_base58__WEBPACK_IMPORTED_MODULE_2__.base58btc.encode(this.multihash.bytes).slice(1);\n }\n return this.string;\n }\n // return self-describing String representation\n // in default format from RFC 0001: https://github.com/libp2p/specs/pull/209\n toCID() {\n return multiformats_cid__WEBPACK_IMPORTED_MODULE_4__.CID.createV1(LIBP2P_KEY_CODE, this.multihash);\n }\n toBytes() {\n return this.multihash.bytes;\n }\n /**\n * Returns Mult
/***/ }),
/***/ "./node_modules/@libp2p/peer-record/dist/src/envelope/envelope.js":
/*!************************************************************************!*\
!*** ./node_modules/@libp2p/peer-record/dist/src/envelope/envelope.js ***!
\************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Envelope: () => (/* binding */ Envelope)\n/* harmony export */ });\n/* harmony import */ var protons_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! protons-runtime */ \"./node_modules/protons-runtime/dist/src/index.js\");\n/* eslint-disable import/export */\n/* eslint-disable complexity */\n/* eslint-disable @typescript-eslint/no-namespace */\n/* eslint-disable @typescript-eslint/no-unnecessary-boolean-literal-compare */\n/* eslint-disable @typescript-eslint/no-empty-interface */\n\nvar Envelope;\n(function (Envelope) {\n let _codec;\n Envelope.codec = () => {\n if (_codec == null) {\n _codec = (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.message)((obj, w, opts = {}) => {\n if (opts.lengthDelimited !== false) {\n w.fork();\n }\n if ((obj.publicKey != null && obj.publicKey.byteLength > 0)) {\n w.uint32(10);\n w.bytes(obj.publicKey);\n }\n if ((obj.payloadType != null && obj.payloadType.byteLength > 0)) {\n w.uint32(18);\n w.bytes(obj.payloadType);\n }\n if ((obj.payload != null && obj.payload.byteLength > 0)) {\n w.uint32(26);\n w.bytes(obj.payload);\n }\n if ((obj.signature != null && obj.signature.byteLength > 0)) {\n w.uint32(42);\n w.bytes(obj.signature);\n }\n if (opts.lengthDelimited !== false) {\n w.ldelim();\n }\n }, (reader, length) => {\n const obj = {\n publicKey: new Uint8Array(0),\n payloadType: new Uint8Array(0),\n payload: new Uint8Array(0),\n signature: new Uint8Array(0)\n };\n const end = length == null ? reader.len : reader.pos + length;\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n obj.publicKey = reader.bytes();\n break;\n case 2:\n obj.payloadType = reader.bytes();\n break;\n case 3:\n obj.payload = reader.bytes();\n break;\n case 5:\n obj.signature = reader.bytes();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return obj;\n });\n }\n return _codec;\n };\n Envelope.encode = (obj) => {\n return (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.encodeMessage)(obj, Envelope.codec());\n };\n Envelope.decode = (buf) => {\n return (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.decodeMessage)(buf, Envelope.codec());\n };\n})(Envelope || (Envelope = {}));\n//# sourceMappingURL=envelope.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/peer-record/dist/src/envelope/envelope.js?");
/***/ }),
/***/ "./node_modules/@libp2p/peer-record/dist/src/envelope/index.js":
/*!*********************************************************************!*\
!*** ./node_modules/@libp2p/peer-record/dist/src/envelope/index.js ***!
\*********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ RecordEnvelope: () => (/* binding */ RecordEnvelope)\n/* harmony export */ });\n/* harmony import */ var _libp2p_crypto_keys__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/crypto/keys */ \"./node_modules/@libp2p/crypto/dist/src/keys/index.js\");\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n/* harmony import */ var _libp2p_peer_id__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @libp2p/peer-id */ \"./node_modules/@libp2p/peer-id/dist/src/index.js\");\n/* harmony import */ var uint8_varint__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! uint8-varint */ \"./node_modules/uint8-varint/dist/src/index.js\");\n/* harmony import */ var uint8arraylist__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! uint8arraylist */ \"./node_modules/uint8arraylist/dist/src/index.js\");\n/* harmony import */ var uint8arrays_equals__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! uint8arrays/equals */ \"./node_modules/uint8arrays/dist/src/equals.js\");\n/* harmony import */ var uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! uint8arrays/from-string */ \"./node_modules/uint8arrays/dist/src/from-string.js\");\n/* harmony import */ var _errors_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../errors.js */ \"./node_modules/@libp2p/peer-record/dist/src/errors.js\");\n/* harmony import */ var _envelope_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./envelope.js */ \"./node_modules/@libp2p/peer-record/dist/src/envelope/envelope.js\");\n\n\n\n\n\n\n\n\n\nclass RecordEnvelope {\n /**\n * Unmarshal a serialized Envelope protobuf message\n */\n static createFromProtobuf = async (data) => {\n const envelopeData = _envelope_js__WEBPACK_IMPORTED_MODULE_8__.Envelope.decode(data);\n const peerId = await (0,_libp2p_peer_id__WEBPACK_IMPORTED_MODULE_2__.peerIdFromKeys)(envelopeData.publicKey);\n return new RecordEnvelope({\n peerId,\n payloadType: envelopeData.payloadType,\n payload: envelopeData.payload,\n signature: envelopeData.signature\n });\n };\n /**\n * Seal marshals the given Record, places the marshaled bytes inside an Envelope\n * and signs it with the given peerId's private key\n */\n static seal = async (record, peerId) => {\n if (peerId.privateKey == null) {\n throw new Error('Missing private key');\n }\n const domain = record.domain;\n const payloadType = record.codec;\n const payload = record.marshal();\n const signData = formatSignaturePayload(domain, payloadType, payload);\n const key = await (0,_libp2p_crypto_keys__WEBPACK_IMPORTED_MODULE_0__.unmarshalPrivateKey)(peerId.privateKey);\n const signature = await key.sign(signData.subarray());\n return new RecordEnvelope({\n peerId,\n payloadType,\n payload,\n signature\n });\n };\n /**\n * Open and certify a given marshalled envelope.\n * Data is unmarshalled and the signature validated for the given domain.\n */\n static openAndCertify = async (data, domain) => {\n const envelope = await RecordEnvelope.createFromProtobuf(data);\n const valid = await envelope.validate(domain);\n if (!valid) {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_1__.CodeError('envelope signature is not valid for the given domain', _errors_js__WEBPACK_IMPORTED_MODULE_7__.codes.ERR_SIGNATURE_NOT_VALID);\n }\n return envelope;\n };\n peerId;\n payloadType;\n payload;\n signature;\n marshaled;\n /**\n * The Envelope is responsible for keeping an arbitrary signed record\n * by a libp2p peer.\n */\n constr
/***/ }),
/***/ "./node_modules/@libp2p/peer-record/dist/src/errors.js":
/*!*************************************************************!*\
!*** ./node_modules/@libp2p/peer-record/dist/src/errors.js ***!
\*************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ codes: () => (/* binding */ codes)\n/* harmony export */ });\nconst codes = {\n ERR_SIGNATURE_NOT_VALID: 'ERR_SIGNATURE_NOT_VALID'\n};\n//# sourceMappingURL=errors.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/peer-record/dist/src/errors.js?");
/***/ }),
/***/ "./node_modules/@libp2p/peer-record/dist/src/index.js":
/*!************************************************************!*\
!*** ./node_modules/@libp2p/peer-record/dist/src/index.js ***!
\************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PeerRecord: () => (/* reexport safe */ _peer_record_index_js__WEBPACK_IMPORTED_MODULE_1__.PeerRecord),\n/* harmony export */ RecordEnvelope: () => (/* reexport safe */ _envelope_index_js__WEBPACK_IMPORTED_MODULE_0__.RecordEnvelope)\n/* harmony export */ });\n/* harmony import */ var _envelope_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./envelope/index.js */ \"./node_modules/@libp2p/peer-record/dist/src/envelope/index.js\");\n/* harmony import */ var _peer_record_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./peer-record/index.js */ \"./node_modules/@libp2p/peer-record/dist/src/peer-record/index.js\");\n\n\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/peer-record/dist/src/index.js?");
/***/ }),
/***/ "./node_modules/@libp2p/peer-record/dist/src/peer-record/consts.js":
/*!*************************************************************************!*\
!*** ./node_modules/@libp2p/peer-record/dist/src/peer-record/consts.js ***!
\*************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ENVELOPE_DOMAIN_PEER_RECORD: () => (/* binding */ ENVELOPE_DOMAIN_PEER_RECORD),\n/* harmony export */ ENVELOPE_PAYLOAD_TYPE_PEER_RECORD: () => (/* binding */ ENVELOPE_PAYLOAD_TYPE_PEER_RECORD)\n/* harmony export */ });\n// The domain string used for peer records contained in a Envelope.\nconst ENVELOPE_DOMAIN_PEER_RECORD = 'libp2p-peer-record';\n// The type hint used to identify peer records in a Envelope.\n// Defined in https://github.com/multiformats/multicodec/blob/master/table.csv\n// with name \"libp2p-peer-record\"\nconst ENVELOPE_PAYLOAD_TYPE_PEER_RECORD = Uint8Array.from([3, 1]);\n//# sourceMappingURL=consts.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/peer-record/dist/src/peer-record/consts.js?");
/***/ }),
/***/ "./node_modules/@libp2p/peer-record/dist/src/peer-record/index.js":
/*!************************************************************************!*\
!*** ./node_modules/@libp2p/peer-record/dist/src/peer-record/index.js ***!
\************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PeerRecord: () => (/* binding */ PeerRecord)\n/* harmony export */ });\n/* harmony import */ var _libp2p_peer_id__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/peer-id */ \"./node_modules/@libp2p/peer-id/dist/src/index.js\");\n/* harmony import */ var _libp2p_utils_array_equals__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/utils/array-equals */ \"./node_modules/@libp2p/utils/dist/src/array-equals.js\");\n/* harmony import */ var _multiformats_multiaddr__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @multiformats/multiaddr */ \"./node_modules/@multiformats/multiaddr/dist/src/index.js\");\n/* harmony import */ var _consts_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./consts.js */ \"./node_modules/@libp2p/peer-record/dist/src/peer-record/consts.js\");\n/* harmony import */ var _peer_record_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./peer-record.js */ \"./node_modules/@libp2p/peer-record/dist/src/peer-record/peer-record.js\");\n\n\n\n\n\n/**\n * The PeerRecord is used for distributing peer routing records across the network.\n * It contains the peer's reachable listen addresses.\n */\nclass PeerRecord {\n /**\n * Unmarshal Peer Record Protobuf\n */\n static createFromProtobuf = (buf) => {\n const peerRecord = _peer_record_js__WEBPACK_IMPORTED_MODULE_4__.PeerRecord.decode(buf);\n const peerId = (0,_libp2p_peer_id__WEBPACK_IMPORTED_MODULE_0__.peerIdFromBytes)(peerRecord.peerId);\n const multiaddrs = (peerRecord.addresses ?? []).map((a) => (0,_multiformats_multiaddr__WEBPACK_IMPORTED_MODULE_2__.multiaddr)(a.multiaddr));\n const seqNumber = peerRecord.seq;\n return new PeerRecord({ peerId, multiaddrs, seqNumber });\n };\n static DOMAIN = _consts_js__WEBPACK_IMPORTED_MODULE_3__.ENVELOPE_DOMAIN_PEER_RECORD;\n static CODEC = _consts_js__WEBPACK_IMPORTED_MODULE_3__.ENVELOPE_PAYLOAD_TYPE_PEER_RECORD;\n peerId;\n multiaddrs;\n seqNumber;\n domain = PeerRecord.DOMAIN;\n codec = PeerRecord.CODEC;\n marshaled;\n constructor(init) {\n const { peerId, multiaddrs, seqNumber } = init;\n this.peerId = peerId;\n this.multiaddrs = multiaddrs ?? [];\n this.seqNumber = seqNumber ?? BigInt(Date.now());\n }\n /**\n * Marshal a record to be used in an envelope\n */\n marshal() {\n if (this.marshaled == null) {\n this.marshaled = _peer_record_js__WEBPACK_IMPORTED_MODULE_4__.PeerRecord.encode({\n peerId: this.peerId.toBytes(),\n seq: BigInt(this.seqNumber),\n addresses: this.multiaddrs.map((m) => ({\n multiaddr: m.bytes\n }))\n });\n }\n return this.marshaled;\n }\n /**\n * Returns true if `this` record equals the `other`\n */\n equals(other) {\n if (!(other instanceof PeerRecord)) {\n return false;\n }\n // Validate PeerId\n if (!this.peerId.equals(other.peerId)) {\n return false;\n }\n // Validate seqNumber\n if (this.seqNumber !== other.seqNumber) {\n return false;\n }\n // Validate multiaddrs\n if (!(0,_libp2p_utils_array_equals__WEBPACK_IMPORTED_MODULE_1__.arrayEquals)(this.multiaddrs, other.multiaddrs)) {\n return false;\n }\n return true;\n }\n}\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/peer-record/dist/src/peer-record/index.js?");
/***/ }),
/***/ "./node_modules/@libp2p/peer-record/dist/src/peer-record/peer-record.js":
/*!******************************************************************************!*\
!*** ./node_modules/@libp2p/peer-record/dist/src/peer-record/peer-record.js ***!
\******************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PeerRecord: () => (/* binding */ PeerRecord)\n/* harmony export */ });\n/* harmony import */ var protons_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! protons-runtime */ \"./node_modules/protons-runtime/dist/src/index.js\");\n/* eslint-disable import/export */\n/* eslint-disable complexity */\n/* eslint-disable @typescript-eslint/no-namespace */\n/* eslint-disable @typescript-eslint/no-unnecessary-boolean-literal-compare */\n/* eslint-disable @typescript-eslint/no-empty-interface */\n\nvar PeerRecord;\n(function (PeerRecord) {\n let AddressInfo;\n (function (AddressInfo) {\n let _codec;\n AddressInfo.codec = () => {\n if (_codec == null) {\n _codec = (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.message)((obj, w, opts = {}) => {\n if (opts.lengthDelimited !== false) {\n w.fork();\n }\n if ((obj.multiaddr != null && obj.multiaddr.byteLength > 0)) {\n w.uint32(10);\n w.bytes(obj.multiaddr);\n }\n if (opts.lengthDelimited !== false) {\n w.ldelim();\n }\n }, (reader, length) => {\n const obj = {\n multiaddr: new Uint8Array(0)\n };\n const end = length == null ? reader.len : reader.pos + length;\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n obj.multiaddr = reader.bytes();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return obj;\n });\n }\n return _codec;\n };\n AddressInfo.encode = (obj) => {\n return (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.encodeMessage)(obj, AddressInfo.codec());\n };\n AddressInfo.decode = (buf) => {\n return (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.decodeMessage)(buf, AddressInfo.codec());\n };\n })(AddressInfo = PeerRecord.AddressInfo || (PeerRecord.AddressInfo = {}));\n let _codec;\n PeerRecord.codec = () => {\n if (_codec == null) {\n _codec = (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.message)((obj, w, opts = {}) => {\n if (opts.lengthDelimited !== false) {\n w.fork();\n }\n if ((obj.peerId != null && obj.peerId.byteLength > 0)) {\n w.uint32(10);\n w.bytes(obj.peerId);\n }\n if ((obj.seq != null && obj.seq !== 0n)) {\n w.uint32(16);\n w.uint64(obj.seq);\n }\n if (obj.addresses != null) {\n for (const value of obj.addresses) {\n w.uint32(26);\n PeerRecord.AddressInfo.codec().encode(value, w);\n }\n }\n if (opts.lengthDelimited !== false) {\n w.ldelim();\n }\n }, (reader, length) => {\n const obj = {\n peerId: new Uint8Array(0),\n seq: 0n,\n addresses: []\n };\n const end = length == null ? reader.len : reader.pos + length;\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n obj.peerId = reader.bytes();\
/***/ }),
/***/ "./node_modules/@libp2p/peer-store/dist/src/errors.js":
/*!************************************************************!*\
!*** ./node_modules/@libp2p/peer-store/dist/src/errors.js ***!
\************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ codes: () => (/* binding */ codes)\n/* harmony export */ });\nconst codes = {\n ERR_INVALID_PARAMETERS: 'ERR_INVALID_PARAMETERS'\n};\n//# sourceMappingURL=errors.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/peer-store/dist/src/errors.js?");
/***/ }),
/***/ "./node_modules/@libp2p/peer-store/dist/src/index.js":
/*!***********************************************************!*\
!*** ./node_modules/@libp2p/peer-store/dist/src/index.js ***!
\***********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PersistentPeerStore: () => (/* binding */ PersistentPeerStore)\n/* harmony export */ });\n/* harmony import */ var _libp2p_logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/logger */ \"./node_modules/@libp2p/logger/dist/src/index.js\");\n/* harmony import */ var _libp2p_peer_record__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/peer-record */ \"./node_modules/@libp2p/peer-record/dist/src/index.js\");\n/* harmony import */ var it_all__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! it-all */ \"./node_modules/it-all/dist/src/index.js\");\n/* harmony import */ var _store_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./store.js */ \"./node_modules/@libp2p/peer-store/dist/src/store.js\");\n\n\n\n\nconst log = (0,_libp2p_logger__WEBPACK_IMPORTED_MODULE_0__.logger)('libp2p:peer-store');\n/**\n * An implementation of PeerStore that stores data in a Datastore\n */\nclass PersistentPeerStore {\n store;\n events;\n peerId;\n constructor(components, init = {}) {\n this.events = components.events;\n this.peerId = components.peerId;\n this.store = new _store_js__WEBPACK_IMPORTED_MODULE_3__.PersistentStore(components, init);\n }\n async forEach(fn, query) {\n log.trace('forEach await read lock');\n const release = await this.store.lock.readLock();\n log.trace('forEach got read lock');\n try {\n for await (const peer of this.store.all(query)) {\n fn(peer);\n }\n }\n finally {\n log.trace('forEach release read lock');\n release();\n }\n }\n async all(query) {\n log.trace('all await read lock');\n const release = await this.store.lock.readLock();\n log.trace('all got read lock');\n try {\n return await (0,it_all__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(this.store.all(query));\n }\n finally {\n log.trace('all release read lock');\n release();\n }\n }\n async delete(peerId) {\n log.trace('delete await write lock');\n const release = await this.store.lock.writeLock();\n log.trace('delete got write lock');\n try {\n await this.store.delete(peerId);\n }\n finally {\n log.trace('delete release write lock');\n release();\n }\n }\n async has(peerId) {\n log.trace('has await read lock');\n const release = await this.store.lock.readLock();\n log.trace('has got read lock');\n try {\n return await this.store.has(peerId);\n }\n finally {\n log.trace('has release read lock');\n release();\n }\n }\n async get(peerId) {\n log.trace('get await read lock');\n const release = await this.store.lock.readLock();\n log.trace('get got read lock');\n try {\n return await this.store.load(peerId);\n }\n finally {\n log.trace('get release read lock');\n release();\n }\n }\n async save(id, data) {\n log.trace('save await write lock');\n const release = await this.store.lock.writeLock();\n log.trace('save got write lock');\n try {\n const result = await this.store.save(id, data);\n this.#emitIfUpdated(id, result);\n return result.peer;\n }\n finally {\n log.trace('save release write lock');\n release();\n }\n }\n async patch(id, data) {\n log.trace('patch await write lock');\n const release = await this.store.lock.writeLock();\n log.trace('patch got write lock');\n try {\n const result = await this.store.patch(id, data);\n this.#emitIfUpdated(id, result);\n return result.peer;\n }\n finally {\n
/***/ }),
/***/ "./node_modules/@libp2p/peer-store/dist/src/pb/peer.js":
/*!*************************************************************!*\
!*** ./node_modules/@libp2p/peer-store/dist/src/pb/peer.js ***!
\*************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Address: () => (/* binding */ Address),\n/* harmony export */ Peer: () => (/* binding */ Peer),\n/* harmony export */ Tag: () => (/* binding */ Tag)\n/* harmony export */ });\n/* harmony import */ var protons_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! protons-runtime */ \"./node_modules/protons-runtime/dist/src/index.js\");\n/* eslint-disable import/export */\n/* eslint-disable complexity */\n/* eslint-disable @typescript-eslint/no-namespace */\n/* eslint-disable @typescript-eslint/no-unnecessary-boolean-literal-compare */\n/* eslint-disable @typescript-eslint/no-empty-interface */\n\nvar Peer;\n(function (Peer) {\n let Peer$metadataEntry;\n (function (Peer$metadataEntry) {\n let _codec;\n Peer$metadataEntry.codec = () => {\n if (_codec == null) {\n _codec = (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.message)((obj, w, opts = {}) => {\n if (opts.lengthDelimited !== false) {\n w.fork();\n }\n if ((obj.key != null && obj.key !== '')) {\n w.uint32(10);\n w.string(obj.key);\n }\n if ((obj.value != null && obj.value.byteLength > 0)) {\n w.uint32(18);\n w.bytes(obj.value);\n }\n if (opts.lengthDelimited !== false) {\n w.ldelim();\n }\n }, (reader, length) => {\n const obj = {\n key: '',\n value: new Uint8Array(0)\n };\n const end = length == null ? reader.len : reader.pos + length;\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n obj.key = reader.string();\n break;\n case 2:\n obj.value = reader.bytes();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return obj;\n });\n }\n return _codec;\n };\n Peer$metadataEntry.encode = (obj) => {\n return (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.encodeMessage)(obj, Peer$metadataEntry.codec());\n };\n Peer$metadataEntry.decode = (buf) => {\n return (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.decodeMessage)(buf, Peer$metadataEntry.codec());\n };\n })(Peer$metadataEntry = Peer.Peer$metadataEntry || (Peer.Peer$metadataEntry = {}));\n let Peer$tagsEntry;\n (function (Peer$tagsEntry) {\n let _codec;\n Peer$tagsEntry.codec = () => {\n if (_codec == null) {\n _codec = (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.message)((obj, w, opts = {}) => {\n if (opts.lengthDelimited !== false) {\n w.fork();\n }\n if ((obj.key != null && obj.key !== '')) {\n w.uint32(10);\n w.string(obj.key);\n }\n if (obj.value != null) {\n w.uint32(18);\n Tag.codec().encode(obj.value, w);\n }\n if (opts.lengthDelimited !== false) {\n w.ldelim();\n }\n }, (reader, length) => {\n const obj = {\n key: ''\n };\n const end = length ==
/***/ }),
/***/ "./node_modules/@libp2p/peer-store/dist/src/store.js":
/*!***********************************************************!*\
!*** ./node_modules/@libp2p/peer-store/dist/src/store.js ***!
\***********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PersistentStore: () => (/* binding */ PersistentStore)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n/* harmony import */ var _libp2p_peer_collections__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/peer-collections */ \"./node_modules/@libp2p/peer-collections/dist/src/index.js\");\n/* harmony import */ var _libp2p_peer_id__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @libp2p/peer-id */ \"./node_modules/@libp2p/peer-id/dist/src/index.js\");\n/* harmony import */ var mortice__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! mortice */ \"./node_modules/mortice/dist/src/index.js\");\n/* harmony import */ var multiformats_bases_base32__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! multiformats/bases/base32 */ \"./node_modules/multiformats/src/bases/base32.js\");\n/* harmony import */ var uint8arrays_equals__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! uint8arrays/equals */ \"./node_modules/uint8arrays/dist/src/equals.js\");\n/* harmony import */ var _errors_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./errors.js */ \"./node_modules/@libp2p/peer-store/dist/src/errors.js\");\n/* harmony import */ var _pb_peer_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./pb/peer.js */ \"./node_modules/@libp2p/peer-store/dist/src/pb/peer.js\");\n/* harmony import */ var _utils_bytes_to_peer_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./utils/bytes-to-peer.js */ \"./node_modules/@libp2p/peer-store/dist/src/utils/bytes-to-peer.js\");\n/* harmony import */ var _utils_peer_id_to_datastore_key_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utils/peer-id-to-datastore-key.js */ \"./node_modules/@libp2p/peer-store/dist/src/utils/peer-id-to-datastore-key.js\");\n/* harmony import */ var _utils_to_peer_pb_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./utils/to-peer-pb.js */ \"./node_modules/@libp2p/peer-store/dist/src/utils/to-peer-pb.js\");\n\n\n\n\n\n\n\n\n\n\n\nfunction decodePeer(key, value, cache) {\n // /peers/${peer-id-as-libp2p-key-cid-string-in-base-32}\n const base32Str = key.toString().split('/')[2];\n const buf = multiformats_bases_base32__WEBPACK_IMPORTED_MODULE_4__.base32.decode(base32Str);\n const peerId = (0,_libp2p_peer_id__WEBPACK_IMPORTED_MODULE_2__.peerIdFromBytes)(buf);\n const cached = cache.get(peerId);\n if (cached != null) {\n return cached;\n }\n const peer = (0,_utils_bytes_to_peer_js__WEBPACK_IMPORTED_MODULE_8__.bytesToPeer)(peerId, value);\n cache.set(peerId, peer);\n return peer;\n}\nfunction mapQuery(query, cache) {\n if (query == null) {\n return {};\n }\n return {\n prefix: _utils_peer_id_to_datastore_key_js__WEBPACK_IMPORTED_MODULE_9__.NAMESPACE_COMMON,\n filters: (query.filters ?? []).map(fn => ({ key, value }) => {\n return fn(decodePeer(key, value, cache));\n }),\n orders: (query.orders ?? []).map(fn => (a, b) => {\n return fn(decodePeer(a.key, a.value, cache), decodePeer(b.key, b.value, cache));\n })\n };\n}\nclass PersistentStore {\n peerId;\n datastore;\n lock;\n addressFilter;\n constructor(components, init = {}) {\n this.peerId = components.peerId;\n this.datastore = components.datastore;\n this.addressFilter = init.addressFilter;\n this.lock = (0,mortice__WEBPACK_IMPORTED_MODULE_3__[\"default\"])({\n name: 'peer-store',\n singleProcess: true\n });\n }\n async has(peerId) {\n return this.datastore.has((0,_utils_peer_id_to_datastore_key_js__WEBPACK_IMPORTED_MODULE_9__.peerIdToDatastoreKey)(peerId));\n }\n async delete(peerId) {\n if (this.peerId.equals(peerId)) {\n throw
/***/ }),
/***/ "./node_modules/@libp2p/peer-store/dist/src/utils/bytes-to-peer.js":
/*!*************************************************************************!*\
!*** ./node_modules/@libp2p/peer-store/dist/src/utils/bytes-to-peer.js ***!
\*************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ bytesToPeer: () => (/* binding */ bytesToPeer)\n/* harmony export */ });\n/* harmony import */ var _libp2p_peer_id__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/peer-id */ \"./node_modules/@libp2p/peer-id/dist/src/index.js\");\n/* harmony import */ var _multiformats_multiaddr__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @multiformats/multiaddr */ \"./node_modules/@multiformats/multiaddr/dist/src/index.js\");\n/* harmony import */ var _pb_peer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../pb/peer.js */ \"./node_modules/@libp2p/peer-store/dist/src/pb/peer.js\");\n\n\n\nfunction bytesToPeer(peerId, buf) {\n const peer = _pb_peer_js__WEBPACK_IMPORTED_MODULE_2__.Peer.decode(buf);\n if (peer.publicKey != null && peerId.publicKey == null) {\n peerId = (0,_libp2p_peer_id__WEBPACK_IMPORTED_MODULE_0__.peerIdFromPeerId)({\n ...peerId,\n publicKey: peerId.publicKey\n });\n }\n const tags = new Map();\n // remove any expired tags\n const now = BigInt(Date.now());\n for (const [key, tag] of peer.tags.entries()) {\n if (tag.expiry != null && tag.expiry < now) {\n continue;\n }\n tags.set(key, tag);\n }\n return {\n ...peer,\n id: peerId,\n addresses: peer.addresses.map(({ multiaddr: ma, isCertified }) => {\n return {\n multiaddr: (0,_multiformats_multiaddr__WEBPACK_IMPORTED_MODULE_1__.multiaddr)(ma),\n isCertified: isCertified ?? false\n };\n }),\n metadata: peer.metadata,\n peerRecordEnvelope: peer.peerRecordEnvelope ?? undefined,\n tags\n };\n}\n//# sourceMappingURL=bytes-to-peer.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/peer-store/dist/src/utils/bytes-to-peer.js?");
/***/ }),
/***/ "./node_modules/@libp2p/peer-store/dist/src/utils/dedupe-addresses.js":
/*!****************************************************************************!*\
!*** ./node_modules/@libp2p/peer-store/dist/src/utils/dedupe-addresses.js ***!
\****************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ dedupeFilterAndSortAddresses: () => (/* binding */ dedupeFilterAndSortAddresses)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n/* harmony import */ var _multiformats_multiaddr__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @multiformats/multiaddr */ \"./node_modules/@multiformats/multiaddr/dist/src/index.js\");\n/* harmony import */ var _errors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../errors.js */ \"./node_modules/@libp2p/peer-store/dist/src/errors.js\");\n\n\n\nasync function dedupeFilterAndSortAddresses(peerId, filter, addresses) {\n const addressMap = new Map();\n for (const addr of addresses) {\n if (addr == null) {\n continue;\n }\n if (addr.multiaddr instanceof Uint8Array) {\n addr.multiaddr = (0,_multiformats_multiaddr__WEBPACK_IMPORTED_MODULE_1__.multiaddr)(addr.multiaddr);\n }\n if (!(0,_multiformats_multiaddr__WEBPACK_IMPORTED_MODULE_1__.isMultiaddr)(addr.multiaddr)) {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__.CodeError('Multiaddr was invalid', _errors_js__WEBPACK_IMPORTED_MODULE_2__.codes.ERR_INVALID_PARAMETERS);\n }\n if (!(await filter(peerId, addr.multiaddr))) {\n continue;\n }\n const isCertified = addr.isCertified ?? false;\n const maStr = addr.multiaddr.toString();\n const existingAddr = addressMap.get(maStr);\n if (existingAddr != null) {\n addr.isCertified = existingAddr.isCertified || isCertified;\n }\n else {\n addressMap.set(maStr, {\n multiaddr: addr.multiaddr,\n isCertified\n });\n }\n }\n return [...addressMap.values()]\n .sort((a, b) => {\n return a.multiaddr.toString().localeCompare(b.multiaddr.toString());\n })\n .map(({ isCertified, multiaddr }) => ({\n isCertified,\n multiaddr: multiaddr.bytes\n }));\n}\n//# sourceMappingURL=dedupe-addresses.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/peer-store/dist/src/utils/dedupe-addresses.js?");
/***/ }),
/***/ "./node_modules/@libp2p/peer-store/dist/src/utils/peer-id-to-datastore-key.js":
/*!************************************************************************************!*\
!*** ./node_modules/@libp2p/peer-store/dist/src/utils/peer-id-to-datastore-key.js ***!
\************************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ NAMESPACE_COMMON: () => (/* binding */ NAMESPACE_COMMON),\n/* harmony export */ peerIdToDatastoreKey: () => (/* binding */ peerIdToDatastoreKey)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interface_peer_id__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interface-peer-id */ \"./node_modules/@libp2p/interface-peer-id/dist/src/index.js\");\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n/* harmony import */ var interface_datastore_key__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! interface-datastore/key */ \"./node_modules/interface-datastore/dist/src/key.js\");\n/* harmony import */ var _errors_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../errors.js */ \"./node_modules/@libp2p/peer-store/dist/src/errors.js\");\n\n\n\n\nconst NAMESPACE_COMMON = '/peers/';\nfunction peerIdToDatastoreKey(peerId) {\n if (!(0,_libp2p_interface_peer_id__WEBPACK_IMPORTED_MODULE_0__.isPeerId)(peerId) || peerId.type == null) {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_1__.CodeError('Invalid PeerId', _errors_js__WEBPACK_IMPORTED_MODULE_3__.codes.ERR_INVALID_PARAMETERS);\n }\n const b32key = peerId.toCID().toString();\n return new interface_datastore_key__WEBPACK_IMPORTED_MODULE_2__.Key(`${NAMESPACE_COMMON}${b32key}`);\n}\n//# sourceMappingURL=peer-id-to-datastore-key.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/peer-store/dist/src/utils/peer-id-to-datastore-key.js?");
/***/ }),
/***/ "./node_modules/@libp2p/peer-store/dist/src/utils/to-peer-pb.js":
/*!**********************************************************************!*\
!*** ./node_modules/@libp2p/peer-store/dist/src/utils/to-peer-pb.js ***!
\**********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ toPeerPB: () => (/* binding */ toPeerPB)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n/* harmony import */ var uint8arrays_equals__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! uint8arrays/equals */ \"./node_modules/uint8arrays/dist/src/equals.js\");\n/* harmony import */ var _errors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../errors.js */ \"./node_modules/@libp2p/peer-store/dist/src/errors.js\");\n/* harmony import */ var _dedupe_addresses_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./dedupe-addresses.js */ \"./node_modules/@libp2p/peer-store/dist/src/utils/dedupe-addresses.js\");\n\n\n\n\nasync function toPeerPB(peerId, data, strategy, options) {\n if (data == null) {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__.CodeError('Invalid PeerData', _errors_js__WEBPACK_IMPORTED_MODULE_2__.codes.ERR_INVALID_PARAMETERS);\n }\n if (data.publicKey != null && peerId.publicKey != null && !(0,uint8arrays_equals__WEBPACK_IMPORTED_MODULE_1__.equals)(data.publicKey, peerId.publicKey)) {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__.CodeError('publicKey bytes do not match peer id publicKey bytes', _errors_js__WEBPACK_IMPORTED_MODULE_2__.codes.ERR_INVALID_PARAMETERS);\n }\n const existingPeer = options.existingPeer;\n if (existingPeer != null && !peerId.equals(existingPeer.id)) {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__.CodeError('peer id did not match existing peer id', _errors_js__WEBPACK_IMPORTED_MODULE_2__.codes.ERR_INVALID_PARAMETERS);\n }\n let addresses = existingPeer?.addresses ?? [];\n let protocols = new Set(existingPeer?.protocols ?? []);\n let metadata = existingPeer?.metadata ?? new Map();\n let tags = existingPeer?.tags ?? new Map();\n let peerRecordEnvelope = existingPeer?.peerRecordEnvelope;\n // when patching, we replace the original fields with passed values\n if (strategy === 'patch') {\n if (data.multiaddrs != null || data.addresses != null) {\n addresses = [];\n if (data.multiaddrs != null) {\n addresses.push(...data.multiaddrs.map(multiaddr => ({\n isCertified: false,\n multiaddr\n })));\n }\n if (data.addresses != null) {\n addresses.push(...data.addresses);\n }\n }\n if (data.protocols != null) {\n protocols = new Set(data.protocols);\n }\n if (data.metadata != null) {\n const metadataEntries = data.metadata instanceof Map ? [...data.metadata.entries()] : Object.entries(data.metadata);\n metadata = createSortedMap(metadataEntries, {\n validate: validateMetadata\n });\n }\n if (data.tags != null) {\n const tagsEntries = data.tags instanceof Map ? [...data.tags.entries()] : Object.entries(data.tags);\n tags = createSortedMap(tagsEntries, {\n validate: validateTag,\n map: mapTag\n });\n }\n if (data.peerRecordEnvelope != null) {\n peerRecordEnvelope = data.peerRecordEnvelope;\n }\n }\n // when merging, we join the original fields with passed values\n if (strategy === 'merge') {\n if (data.multiaddrs != null) {\n addresses.push(...data.multiaddrs.map(multiaddr => ({\n isCertified: false,\n multiaddr\n })));\n }\n if (data.addresses != null) {\n addresses.push(...data.addresses);\n }\n if (data.protocols != null) {\n protocols = new Set([...protocols, ...data.protocols]);\n }\n
/***/ }),
/***/ "./node_modules/@libp2p/pubsub/dist/src/errors.js":
/*!********************************************************!*\
!*** ./node_modules/@libp2p/pubsub/dist/src/errors.js ***!
\********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ codes: () => (/* binding */ codes)\n/* harmony export */ });\nconst codes = {\n /**\n * Signature policy is invalid\n */\n ERR_INVALID_SIGNATURE_POLICY: 'ERR_INVALID_SIGNATURE_POLICY',\n /**\n * Signature policy is unhandled\n */\n ERR_UNHANDLED_SIGNATURE_POLICY: 'ERR_UNHANDLED_SIGNATURE_POLICY',\n // Strict signing codes\n /**\n * Message expected to have a `signature`, but doesn't\n */\n ERR_MISSING_SIGNATURE: 'ERR_MISSING_SIGNATURE',\n /**\n * Message expected to have a `seqno`, but doesn't\n */\n ERR_MISSING_SEQNO: 'ERR_MISSING_SEQNO',\n /**\n * Message expected to have a `key`, but doesn't\n */\n ERR_MISSING_KEY: 'ERR_MISSING_KEY',\n /**\n * Message `signature` is invalid\n */\n ERR_INVALID_SIGNATURE: 'ERR_INVALID_SIGNATURE',\n /**\n * Message expected to have a `from`, but doesn't\n */\n ERR_MISSING_FROM: 'ERR_MISSING_FROM',\n // Strict no-signing codes\n /**\n * Message expected to not have a `from`, but does\n */\n ERR_UNEXPECTED_FROM: 'ERR_UNEXPECTED_FROM',\n /**\n * Message expected to not have a `signature`, but does\n */\n ERR_UNEXPECTED_SIGNATURE: 'ERR_UNEXPECTED_SIGNATURE',\n /**\n * Message expected to not have a `key`, but does\n */\n ERR_UNEXPECTED_KEY: 'ERR_UNEXPECTED_KEY',\n /**\n * Message expected to not have a `seqno`, but does\n */\n ERR_UNEXPECTED_SEQNO: 'ERR_UNEXPECTED_SEQNO',\n /**\n * Message failed topic validator\n */\n ERR_TOPIC_VALIDATOR_REJECT: 'ERR_TOPIC_VALIDATOR_REJECT'\n};\n//# sourceMappingURL=errors.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/pubsub/dist/src/errors.js?");
/***/ }),
/***/ "./node_modules/@libp2p/pubsub/dist/src/utils.js":
/*!*******************************************************!*\
!*** ./node_modules/@libp2p/pubsub/dist/src/utils.js ***!
\*******************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ anyMatch: () => (/* binding */ anyMatch),\n/* harmony export */ bigIntFromBytes: () => (/* binding */ bigIntFromBytes),\n/* harmony export */ bigIntToBytes: () => (/* binding */ bigIntToBytes),\n/* harmony export */ ensureArray: () => (/* binding */ ensureArray),\n/* harmony export */ msgId: () => (/* binding */ msgId),\n/* harmony export */ noSignMsgId: () => (/* binding */ noSignMsgId),\n/* harmony export */ randomSeqno: () => (/* binding */ randomSeqno),\n/* harmony export */ toMessage: () => (/* binding */ toMessage),\n/* harmony export */ toRpcMessage: () => (/* binding */ toRpcMessage)\n/* harmony export */ });\n/* harmony import */ var _libp2p_crypto__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/crypto */ \"./node_modules/@libp2p/crypto/dist/src/index.js\");\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n/* harmony import */ var _libp2p_peer_id__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @libp2p/peer-id */ \"./node_modules/@libp2p/peer-id/dist/src/index.js\");\n/* harmony import */ var multiformats_hashes_sha2__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! multiformats/hashes/sha2 */ \"./node_modules/multiformats/src/hashes/sha2-browser.js\");\n/* harmony import */ var uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! uint8arrays/from-string */ \"./node_modules/uint8arrays/dist/src/from-string.js\");\n/* harmony import */ var uint8arrays_to_string__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! uint8arrays/to-string */ \"./node_modules/uint8arrays/dist/src/to-string.js\");\n/* harmony import */ var _errors_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./errors.js */ \"./node_modules/@libp2p/pubsub/dist/src/errors.js\");\n\n\n\n\n\n\n\n/**\n * Generate a random sequence number\n */\nfunction randomSeqno() {\n return BigInt(`0x${(0,uint8arrays_to_string__WEBPACK_IMPORTED_MODULE_5__.toString)((0,_libp2p_crypto__WEBPACK_IMPORTED_MODULE_0__.randomBytes)(8), 'base16')}`);\n}\n/**\n * Generate a message id, based on the `key` and `seqno`\n */\nconst msgId = (key, seqno) => {\n const seqnoBytes = (0,uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_4__.fromString)(seqno.toString(16).padStart(16, '0'), 'base16');\n const msgId = new Uint8Array(key.length + seqnoBytes.length);\n msgId.set(key, 0);\n msgId.set(seqnoBytes, key.length);\n return msgId;\n};\n/**\n * Generate a message id, based on message `data`\n */\nconst noSignMsgId = (data) => {\n return multiformats_hashes_sha2__WEBPACK_IMPORTED_MODULE_3__.sha256.encode(data);\n};\n/**\n * Check if any member of the first set is also a member\n * of the second set\n */\nconst anyMatch = (a, b) => {\n let bHas;\n if (Array.isArray(b)) {\n bHas = (val) => b.includes(val);\n }\n else {\n bHas = (val) => b.has(val);\n }\n for (const val of a) {\n if (bHas(val)) {\n return true;\n }\n }\n return false;\n};\n/**\n * Make everything an array\n */\nconst ensureArray = function (maybeArray) {\n if (!Array.isArray(maybeArray)) {\n return [maybeArray];\n }\n return maybeArray;\n};\nconst isSigned = async (message) => {\n if ((message.sequenceNumber == null) || (message.from == null) || (message.signature == null)) {\n return false;\n }\n // if a public key is present in the `from` field, the message should be signed\n const fromID = (0,_libp2p_peer_id__WEBPACK_IMPORTED_MODULE_2__.peerIdFromBytes)(message.from);\n if (fromID.publicKey != null) {\n return true;\n }\n if (message.key != null) {\n const signingID = await (0,_libp2p_peer_id__WEBPACK_IMPORTED_MODULE_2__.peerIdFromKeys)(message.key);\n return signingID.equals(fromID);\n }\n return false;\n
/***/ }),
/***/ "./node_modules/@libp2p/topology/dist/src/index.js":
/*!*********************************************************!*\
!*** ./node_modules/@libp2p/topology/dist/src/index.js ***!
\*********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ createTopology: () => (/* binding */ createTopology)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interface_registrar__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interface-registrar */ \"./node_modules/@libp2p/interface-registrar/dist/src/index.js\");\n\nconst noop = () => { };\nclass TopologyImpl {\n min;\n max;\n /**\n * Set of peers that support the protocol\n */\n peers;\n onConnect;\n onDisconnect;\n registrar;\n constructor(init) {\n this.min = init.min ?? 0;\n this.max = init.max ?? Infinity;\n this.peers = new Set();\n this.onConnect = init.onConnect ?? noop;\n this.onDisconnect = init.onDisconnect ?? noop;\n }\n get [Symbol.toStringTag]() {\n return _libp2p_interface_registrar__WEBPACK_IMPORTED_MODULE_0__.topologySymbol.toString();\n }\n [_libp2p_interface_registrar__WEBPACK_IMPORTED_MODULE_0__.topologySymbol] = true;\n async setRegistrar(registrar) {\n this.registrar = registrar;\n }\n /**\n * Notify about peer disconnected event\n */\n disconnect(peerId) {\n this.onDisconnect(peerId);\n }\n}\nfunction createTopology(init) {\n return new TopologyImpl(init);\n}\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/topology/dist/src/index.js?");
/***/ }),
/***/ "./node_modules/@libp2p/tracked-map/dist/src/index.js":
/*!************************************************************!*\
!*** ./node_modules/@libp2p/tracked-map/dist/src/index.js ***!
\************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ trackedMap: () => (/* binding */ trackedMap)\n/* harmony export */ });\nclass TrackedMap extends Map {\n metric;\n constructor(init) {\n super();\n const { name, metrics } = init;\n this.metric = metrics.registerMetric(name);\n this.updateComponentMetric();\n }\n set(key, value) {\n super.set(key, value);\n this.updateComponentMetric();\n return this;\n }\n delete(key) {\n const deleted = super.delete(key);\n this.updateComponentMetric();\n return deleted;\n }\n clear() {\n super.clear();\n this.updateComponentMetric();\n }\n updateComponentMetric() {\n this.metric.update(this.size);\n }\n}\nfunction trackedMap(config) {\n const { name, metrics } = config;\n let map;\n if (metrics != null) {\n map = new TrackedMap({ name, metrics });\n }\n else {\n map = new Map();\n }\n return map;\n}\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/tracked-map/dist/src/index.js?");
/***/ }),
/***/ "./node_modules/@libp2p/utils/dist/src/address-sort.js":
/*!*************************************************************!*\
!*** ./node_modules/@libp2p/utils/dist/src/address-sort.js ***!
\*************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ publicAddressesFirst: () => (/* binding */ publicAddressesFirst),\n/* harmony export */ something: () => (/* binding */ something)\n/* harmony export */ });\n/* harmony import */ var _multiaddr_is_private_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./multiaddr/is-private.js */ \"./node_modules/@libp2p/utils/dist/src/multiaddr/is-private.js\");\n/**\n * @packageDocumentation\n *\n * Provides strategies to sort a list of multiaddrs.\n *\n * @example\n *\n * ```typescript\n * import { publicAddressesFirst } from '@libp2p/utils/address-sort'\n * import { multiaddr } from '@multformats/multiaddr'\n *\n *\n * const addresses = [\n * multiaddr('/ip4/127.0.0.1/tcp/9000'),\n * multiaddr('/ip4/82.41.53.1/tcp/9000')\n * ].sort(publicAddressesFirst)\n *\n * console.info(addresses)\n * // ['/ip4/82.41.53.1/tcp/9000', '/ip4/127.0.0.1/tcp/9000']\n * ```\n */\n\n/**\n * Compare function for array.sort().\n * This sort aims to move the private addresses to the end of the array.\n * In case of equality, a certified address will come first.\n */\nfunction publicAddressesFirst(a, b) {\n const isAPrivate = (0,_multiaddr_is_private_js__WEBPACK_IMPORTED_MODULE_0__.isPrivate)(a.multiaddr);\n const isBPrivate = (0,_multiaddr_is_private_js__WEBPACK_IMPORTED_MODULE_0__.isPrivate)(b.multiaddr);\n if (isAPrivate && !isBPrivate) {\n return 1;\n }\n else if (!isAPrivate && isBPrivate) {\n return -1;\n }\n // Check certified?\n if (a.isCertified && !b.isCertified) {\n return -1;\n }\n else if (!a.isCertified && b.isCertified) {\n return 1;\n }\n return 0;\n}\n/**\n * A test thing\n */\nasync function something() {\n return Uint8Array.from([0, 1, 2]);\n}\n//# sourceMappingURL=address-sort.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/utils/dist/src/address-sort.js?");
/***/ }),
/***/ "./node_modules/@libp2p/utils/dist/src/array-equals.js":
/*!*************************************************************!*\
!*** ./node_modules/@libp2p/utils/dist/src/array-equals.js ***!
\*************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ arrayEquals: () => (/* binding */ arrayEquals)\n/* harmony export */ });\n/**\n * @packageDocumentation\n *\n * Provides strategies ensure arrays are equivalent.\n *\n * @example\n *\n * ```typescript\n * import { arrayEquals } from '@libp2p/utils/array-equals'\n * import { multiaddr } from '@multformats/multiaddr'\n *\n * const ma1 = multiaddr('/ip4/127.0.0.1/tcp/9000'),\n * const ma2 = multiaddr('/ip4/82.41.53.1/tcp/9000')\n *\n * console.info(arrayEquals([ma1], [ma1])) // true\n * console.info(arrayEquals([ma1], [ma2])) // false\n * ```\n */\n/**\n * Verify if two arrays of non primitive types with the \"equals\" function are equal.\n * Compatible with multiaddr, peer-id and others.\n */\nfunction arrayEquals(a, b) {\n const sort = (a, b) => a.toString().localeCompare(b.toString());\n if (a.length !== b.length) {\n return false;\n }\n b.sort(sort);\n return a.sort(sort).every((item, index) => b[index].equals(item));\n}\n//# sourceMappingURL=array-equals.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/utils/dist/src/array-equals.js?");
/***/ }),
/***/ "./node_modules/@libp2p/utils/dist/src/multiaddr/is-private.js":
/*!*********************************************************************!*\
!*** ./node_modules/@libp2p/utils/dist/src/multiaddr/is-private.js ***!
\*********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ isPrivate: () => (/* binding */ isPrivate)\n/* harmony export */ });\n/* harmony import */ var private_ip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! private-ip */ \"./node_modules/private-ip/index.js\");\n\n/**\n * Check if a given multiaddr has a private address.\n */\nfunction isPrivate(ma) {\n try {\n const { address } = ma.nodeAddress();\n return Boolean((0,private_ip__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(address));\n }\n catch {\n return true;\n }\n}\n//# sourceMappingURL=is-private.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/utils/dist/src/multiaddr/is-private.js?");
/***/ }),
/***/ "./node_modules/@libp2p/utils/dist/src/stream-to-ma-conn.js":
/*!******************************************************************!*\
!*** ./node_modules/@libp2p/utils/dist/src/stream-to-ma-conn.js ***!
\******************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ streamToMaConnection: () => (/* binding */ streamToMaConnection)\n/* harmony export */ });\n/* harmony import */ var _libp2p_logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/logger */ \"./node_modules/@libp2p/logger/dist/src/index.js\");\n/* harmony import */ var abortable_iterator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! abortable-iterator */ \"./node_modules/abortable-iterator/dist/src/index.js\");\n\n\nconst log = (0,_libp2p_logger__WEBPACK_IMPORTED_MODULE_0__.logger)('libp2p:stream:converter');\n/**\n * Convert a duplex iterable into a MultiaddrConnection.\n * https://github.com/libp2p/interface-transport#multiaddrconnection\n */\nfunction streamToMaConnection(props, options = {}) {\n const { stream, remoteAddr } = props;\n const { sink, source } = stream;\n const mapSource = (async function* () {\n for await (const list of source) {\n if (list instanceof Uint8Array) {\n yield list;\n }\n else {\n yield* list;\n }\n }\n }());\n const maConn = {\n async sink(source) {\n if (options.signal != null) {\n source = (0,abortable_iterator__WEBPACK_IMPORTED_MODULE_1__.abortableSource)(source, options.signal);\n }\n try {\n await sink(source);\n await close();\n }\n catch (err) {\n // If aborted we can safely ignore\n if (err.type !== 'aborted') {\n // If the source errored the socket will already have been destroyed by\n // toIterable.duplex(). If the socket errored it will already be\n // destroyed. There's nothing to do here except log the error & return.\n log(err);\n }\n }\n },\n source: (options.signal != null) ? (0,abortable_iterator__WEBPACK_IMPORTED_MODULE_1__.abortableSource)(mapSource, options.signal) : mapSource,\n remoteAddr,\n timeline: { open: Date.now(), close: undefined },\n async close() {\n await sink(async function* () {\n yield new Uint8Array(0);\n }());\n await close();\n }\n };\n async function close() {\n if (maConn.timeline.close == null) {\n maConn.timeline.close = Date.now();\n }\n await Promise.resolve();\n }\n return maConn;\n}\n//# sourceMappingURL=stream-to-ma-conn.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/utils/dist/src/stream-to-ma-conn.js?");
/***/ }),
/***/ "./node_modules/@libp2p/webrtc/dist/src/error.js":
/*!*******************************************************!*\
!*** ./node_modules/@libp2p/webrtc/dist/src/error.js ***!
\*******************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ConnectionClosedError: () => (/* binding */ ConnectionClosedError),\n/* harmony export */ DataChannelError: () => (/* binding */ DataChannelError),\n/* harmony export */ InappropriateMultiaddrError: () => (/* binding */ InappropriateMultiaddrError),\n/* harmony export */ InvalidArgumentError: () => (/* binding */ InvalidArgumentError),\n/* harmony export */ InvalidFingerprintError: () => (/* binding */ InvalidFingerprintError),\n/* harmony export */ OperationAbortedError: () => (/* binding */ OperationAbortedError),\n/* harmony export */ OverStreamLimitError: () => (/* binding */ OverStreamLimitError),\n/* harmony export */ UnimplementedError: () => (/* binding */ UnimplementedError),\n/* harmony export */ UnsupportedHashAlgorithmError: () => (/* binding */ UnsupportedHashAlgorithmError),\n/* harmony export */ WebRTCTransportError: () => (/* binding */ WebRTCTransportError),\n/* harmony export */ codes: () => (/* binding */ codes),\n/* harmony export */ connectionClosedError: () => (/* binding */ connectionClosedError),\n/* harmony export */ dataChannelError: () => (/* binding */ dataChannelError),\n/* harmony export */ inappropriateMultiaddr: () => (/* binding */ inappropriateMultiaddr),\n/* harmony export */ invalidArgument: () => (/* binding */ invalidArgument),\n/* harmony export */ invalidFingerprint: () => (/* binding */ invalidFingerprint),\n/* harmony export */ operationAborted: () => (/* binding */ operationAborted),\n/* harmony export */ overStreamLimit: () => (/* binding */ overStreamLimit),\n/* harmony export */ unimplemented: () => (/* binding */ unimplemented),\n/* harmony export */ unsupportedHashAlgorithm: () => (/* binding */ unsupportedHashAlgorithm)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n\nvar codes;\n(function (codes) {\n codes[\"ERR_ALREADY_ABORTED\"] = \"ERR_ALREADY_ABORTED\";\n codes[\"ERR_DATA_CHANNEL\"] = \"ERR_DATA_CHANNEL\";\n codes[\"ERR_CONNECTION_CLOSED\"] = \"ERR_CONNECTION_CLOSED\";\n codes[\"ERR_HASH_NOT_SUPPORTED\"] = \"ERR_HASH_NOT_SUPPORTED\";\n codes[\"ERR_INVALID_MULTIADDR\"] = \"ERR_INVALID_MULTIADDR\";\n codes[\"ERR_INVALID_FINGERPRINT\"] = \"ERR_INVALID_FINGERPRINT\";\n codes[\"ERR_INVALID_PARAMETERS\"] = \"ERR_INVALID_PARAMETERS\";\n codes[\"ERR_NOT_IMPLEMENTED\"] = \"ERR_NOT_IMPLEMENTED\";\n codes[\"ERR_TOO_MANY_INBOUND_PROTOCOL_STREAMS\"] = \"ERR_TOO_MANY_INBOUND_PROTOCOL_STREAMS\";\n codes[\"ERR_TOO_MANY_OUTBOUND_PROTOCOL_STREAMS\"] = \"ERR_TOO_MANY_OUTBOUND_PROTOCOL_STREAMS\";\n})(codes || (codes = {}));\nclass WebRTCTransportError extends _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__.CodeError {\n constructor(msg, code) {\n super(`WebRTC transport error: ${msg}`, code ?? '');\n this.name = 'WebRTCTransportError';\n }\n}\nclass ConnectionClosedError extends WebRTCTransportError {\n constructor(state, msg) {\n super(`peerconnection moved to state: ${state}: ${msg}`, codes.ERR_CONNECTION_CLOSED);\n this.name = 'WebRTC/ConnectionClosed';\n }\n}\nfunction connectionClosedError(state, msg) {\n return new ConnectionClosedError(state, msg);\n}\nclass DataChannelError extends WebRTCTransportError {\n constructor(streamLabel, msg) {\n super(`[stream: ${streamLabel}] data channel error: ${msg}`, codes.ERR_DATA_CHANNEL);\n this.name = 'WebRTC/DataChannelError';\n }\n}\nfunction dataChannelError(streamLabel, msg) {\n return new DataChannelError(streamLabel, msg);\n}\nclass InappropriateMultiaddrError extends WebRTCTransportError {\n constructor(msg) {\n super(`There was a problem with the Multiaddr which was passed in: ${msg}`, codes.ERR_INVALID_MULTIADDR);\n this.name = 'WebRTC/InappropriateMultiaddrError';\n
/***/ }),
/***/ "./node_modules/@libp2p/webrtc/dist/src/index.js":
/*!*******************************************************!*\
!*** ./node_modules/@libp2p/webrtc/dist/src/index.js ***!
\*******************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ webRTC: () => (/* binding */ webRTC),\n/* harmony export */ webRTCDirect: () => (/* binding */ webRTCDirect)\n/* harmony export */ });\n/* harmony import */ var _private_to_private_transport_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./private-to-private/transport.js */ \"./node_modules/@libp2p/webrtc/dist/src/private-to-private/transport.js\");\n/* harmony import */ var _private_to_public_transport_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./private-to-public/transport.js */ \"./node_modules/@libp2p/webrtc/dist/src/private-to-public/transport.js\");\n\n\n/**\n * @param {WebRTCTransportDirectInit} init - WebRTC direct transport configuration\n * @param init.dataChannel - DataChannel configurations\n * @param {number} init.dataChannel.maxMessageSize - Max message size that can be sent through the DataChannel. Larger messages will be chunked into smaller messages below this size (default 16kb)\n * @param {number} init.dataChannel.maxBufferedAmount - Max buffered amount a DataChannel can have (default 16mb)\n * @param {number} init.dataChannel.bufferedAmountLowEventTimeout - If max buffered amount is reached, this is the max time that is waited before the buffer is cleared (default 30 seconds)\n * @returns\n */\nfunction webRTCDirect(init) {\n return (components) => new _private_to_public_transport_js__WEBPACK_IMPORTED_MODULE_1__.WebRTCDirectTransport(components, init);\n}\n/**\n * @param {WebRTCTransportInit} init - WebRTC transport configuration\n * @param {RTCConfiguration} init.rtcConfiguration - RTCConfiguration\n * @param init.dataChannel - DataChannel configurations\n * @param {number} init.dataChannel.maxMessageSize - Max message size that can be sent through the DataChannel. Larger messages will be chunked into smaller messages below this size (default 16kb)\n * @param {number} init.dataChannel.maxBufferedAmount - Max buffered amount a DataChannel can have (default 16mb)\n * @param {number} init.dataChannel.bufferedAmountLowEventTimeout - If max buffered amount is reached, this is the max time that is waited before the buffer is cleared (default 30 seconds)\n * @returns\n */\nfunction webRTC(init) {\n return (components) => new _private_to_private_transport_js__WEBPACK_IMPORTED_MODULE_0__.WebRTCTransport(components, init);\n}\n\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/webrtc/dist/src/index.js?");
/***/ }),
/***/ "./node_modules/@libp2p/webrtc/dist/src/maconn.js":
/*!********************************************************!*\
!*** ./node_modules/@libp2p/webrtc/dist/src/maconn.js ***!
\********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ WebRTCMultiaddrConnection: () => (/* binding */ WebRTCMultiaddrConnection)\n/* harmony export */ });\n/* harmony import */ var _libp2p_logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/logger */ \"./node_modules/@libp2p/logger/dist/src/index.js\");\n/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util.js */ \"./node_modules/@libp2p/webrtc/dist/src/util.js\");\n\n\nconst log = (0,_libp2p_logger__WEBPACK_IMPORTED_MODULE_0__.logger)('libp2p:webrtc:connection');\nclass WebRTCMultiaddrConnection {\n /**\n * WebRTC Peer Connection\n */\n peerConnection;\n /**\n * The multiaddr address used to communicate with the remote peer\n */\n remoteAddr;\n /**\n * Holds the lifecycle times of the connection\n */\n timeline;\n /**\n * Optional metrics counter group for this connection\n */\n metrics;\n /**\n * The stream source, a no-op as the transport natively supports multiplexing\n */\n source = (0,_util_js__WEBPACK_IMPORTED_MODULE_1__.nopSource)();\n /**\n * The stream destination, a no-op as the transport natively supports multiplexing\n */\n sink = _util_js__WEBPACK_IMPORTED_MODULE_1__.nopSink;\n constructor(init) {\n this.remoteAddr = init.remoteAddr;\n this.timeline = init.timeline;\n this.peerConnection = init.peerConnection;\n this.peerConnection.onconnectionstatechange = () => {\n if (this.peerConnection.connectionState === 'closed' || this.peerConnection.connectionState === 'disconnected' || this.peerConnection.connectionState === 'failed') {\n this.timeline.close = Date.now();\n }\n };\n }\n async close(err) {\n if (err !== undefined) {\n log.error('error closing connection', err);\n }\n log.trace('closing connection');\n this.timeline.close = Date.now();\n this.peerConnection.close();\n this.metrics?.increment({ close: true });\n }\n}\n//# sourceMappingURL=maconn.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/webrtc/dist/src/maconn.js?");
/***/ }),
/***/ "./node_modules/@libp2p/webrtc/dist/src/muxer.js":
/*!*******************************************************!*\
!*** ./node_modules/@libp2p/webrtc/dist/src/muxer.js ***!
\*******************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DataChannelMuxer: () => (/* binding */ DataChannelMuxer),\n/* harmony export */ DataChannelMuxerFactory: () => (/* binding */ DataChannelMuxerFactory)\n/* harmony export */ });\n/* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./stream.js */ \"./node_modules/@libp2p/webrtc/dist/src/stream.js\");\n/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util.js */ \"./node_modules/@libp2p/webrtc/dist/src/util.js\");\n\n\nconst PROTOCOL = '/webrtc';\nclass DataChannelMuxerFactory {\n protocol;\n /**\n * WebRTC Peer Connection\n */\n peerConnection;\n streamBuffer = [];\n metrics;\n dataChannelOptions;\n constructor(init) {\n this.peerConnection = init.peerConnection;\n this.metrics = init.metrics;\n this.protocol = init.protocol ?? PROTOCOL;\n this.dataChannelOptions = init.dataChannelOptions;\n // store any datachannels opened before upgrade has been completed\n this.peerConnection.ondatachannel = ({ channel }) => {\n const stream = (0,_stream_js__WEBPACK_IMPORTED_MODULE_0__.createStream)({\n channel,\n direction: 'inbound',\n dataChannelOptions: init.dataChannelOptions,\n onEnd: () => {\n this.streamBuffer = this.streamBuffer.filter(s => s.id !== stream.id);\n }\n });\n this.streamBuffer.push(stream);\n };\n }\n createStreamMuxer(init) {\n return new DataChannelMuxer({\n ...init,\n peerConnection: this.peerConnection,\n dataChannelOptions: this.dataChannelOptions,\n metrics: this.metrics,\n streams: this.streamBuffer,\n protocol: this.protocol\n });\n }\n}\n/**\n * A libp2p data channel stream muxer\n */\nclass DataChannelMuxer {\n init;\n /**\n * Array of streams in the data channel\n */\n streams;\n protocol;\n peerConnection;\n dataChannelOptions;\n metrics;\n /**\n * Close or abort all tracked streams and stop the muxer\n */\n close = () => { };\n /**\n * The stream source, a no-op as the transport natively supports multiplexing\n */\n source = (0,_util_js__WEBPACK_IMPORTED_MODULE_1__.nopSource)();\n /**\n * The stream destination, a no-op as the transport natively supports multiplexing\n */\n sink = _util_js__WEBPACK_IMPORTED_MODULE_1__.nopSink;\n constructor(init) {\n this.init = init;\n this.streams = init.streams;\n this.peerConnection = init.peerConnection;\n this.protocol = init.protocol ?? PROTOCOL;\n this.metrics = init.metrics;\n /**\n * Fired when a data channel has been added to the connection has been\n * added by the remote peer.\n *\n * {@link https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/datachannel_event}\n */\n this.peerConnection.ondatachannel = ({ channel }) => {\n const stream = (0,_stream_js__WEBPACK_IMPORTED_MODULE_0__.createStream)({\n channel,\n direction: 'inbound',\n dataChannelOptions: this.dataChannelOptions,\n onEnd: () => {\n this.streams = this.streams.filter(s => s.id !== stream.id);\n this.metrics?.increment({ stream_end: true });\n init?.onStreamEnd?.(stream);\n }\n });\n this.streams.push(stream);\n if ((init?.onIncomingStream) != null) {\n this.metrics?.increment({ incoming_stream: true });\n init.onIncomingStream(stream);\n }\n };\n const onIncomingStream = init?.onIncomingStream;\n if (onIncomingStream != null) {\n this.streams.forEach(s => { onIncomi
/***/ }),
/***/ "./node_modules/@libp2p/webrtc/dist/src/pb/message.js":
/*!************************************************************!*\
!*** ./node_modules/@libp2p/webrtc/dist/src/pb/message.js ***!
\************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Message: () => (/* binding */ Message)\n/* harmony export */ });\n/* harmony import */ var protons_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! protons-runtime */ \"./node_modules/protons-runtime/dist/src/index.js\");\n/* eslint-disable import/export */\n/* eslint-disable complexity */\n/* eslint-disable @typescript-eslint/no-namespace */\n/* eslint-disable @typescript-eslint/no-unnecessary-boolean-literal-compare */\n/* eslint-disable @typescript-eslint/no-empty-interface */\n\nvar Message;\n(function (Message) {\n let Flag;\n (function (Flag) {\n Flag[\"FIN\"] = \"FIN\";\n Flag[\"STOP_SENDING\"] = \"STOP_SENDING\";\n Flag[\"RESET\"] = \"RESET\";\n })(Flag = Message.Flag || (Message.Flag = {}));\n let __FlagValues;\n (function (__FlagValues) {\n __FlagValues[__FlagValues[\"FIN\"] = 0] = \"FIN\";\n __FlagValues[__FlagValues[\"STOP_SENDING\"] = 1] = \"STOP_SENDING\";\n __FlagValues[__FlagValues[\"RESET\"] = 2] = \"RESET\";\n })(__FlagValues || (__FlagValues = {}));\n (function (Flag) {\n Flag.codec = () => {\n return (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.enumeration)(__FlagValues);\n };\n })(Flag = Message.Flag || (Message.Flag = {}));\n let _codec;\n Message.codec = () => {\n if (_codec == null) {\n _codec = (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.message)((obj, w, opts = {}) => {\n if (opts.lengthDelimited !== false) {\n w.fork();\n }\n if (obj.flag != null) {\n w.uint32(8);\n Message.Flag.codec().encode(obj.flag, w);\n }\n if (obj.message != null) {\n w.uint32(18);\n w.bytes(obj.message);\n }\n if (opts.lengthDelimited !== false) {\n w.ldelim();\n }\n }, (reader, length) => {\n const obj = {};\n const end = length == null ? reader.len : reader.pos + length;\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n obj.flag = Message.Flag.codec().decode(reader);\n break;\n case 2:\n obj.message = reader.bytes();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return obj;\n });\n }\n return _codec;\n };\n Message.encode = (obj) => {\n return (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.encodeMessage)(obj, Message.codec());\n };\n Message.decode = (buf) => {\n return (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.decodeMessage)(buf, Message.codec());\n };\n})(Message || (Message = {}));\n//# sourceMappingURL=message.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/webrtc/dist/src/pb/message.js?");
/***/ }),
/***/ "./node_modules/@libp2p/webrtc/dist/src/private-to-private/handler.js":
/*!****************************************************************************!*\
!*** ./node_modules/@libp2p/webrtc/dist/src/private-to-private/handler.js ***!
\****************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ handleIncomingStream: () => (/* binding */ handleIncomingStream),\n/* harmony export */ initiateConnection: () => (/* binding */ initiateConnection)\n/* harmony export */ });\n/* harmony import */ var _libp2p_logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/logger */ \"./node_modules/@libp2p/logger/dist/src/index.js\");\n/* harmony import */ var abortable_iterator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! abortable-iterator */ \"./node_modules/abortable-iterator/dist/src/index.js\");\n/* harmony import */ var it_pb_stream__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! it-pb-stream */ \"./node_modules/it-pb-stream/dist/src/index.js\");\n/* harmony import */ var p_defer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! p-defer */ \"./node_modules/p-defer/index.js\");\n/* harmony import */ var _muxer_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../muxer.js */ \"./node_modules/@libp2p/webrtc/dist/src/muxer.js\");\n/* harmony import */ var _pb_message_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./pb/message.js */ \"./node_modules/@libp2p/webrtc/dist/src/private-to-private/pb/message.js\");\n/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./util.js */ \"./node_modules/@libp2p/webrtc/dist/src/private-to-private/util.js\");\n\n\n\n\n\n\n\nconst DEFAULT_TIMEOUT = 30 * 1000;\nconst log = (0,_libp2p_logger__WEBPACK_IMPORTED_MODULE_0__.logger)('libp2p:webrtc:peer');\nasync function handleIncomingStream({ rtcConfiguration, dataChannelOptions, stream: rawStream }) {\n const signal = AbortSignal.timeout(DEFAULT_TIMEOUT);\n const stream = (0,it_pb_stream__WEBPACK_IMPORTED_MODULE_2__.pbStream)((0,abortable_iterator__WEBPACK_IMPORTED_MODULE_1__.abortableDuplex)(rawStream, signal)).pb(_pb_message_js__WEBPACK_IMPORTED_MODULE_5__.Message);\n const pc = new RTCPeerConnection(rtcConfiguration);\n const muxerFactory = new _muxer_js__WEBPACK_IMPORTED_MODULE_4__.DataChannelMuxerFactory({ peerConnection: pc, dataChannelOptions });\n const connectedPromise = (0,p_defer__WEBPACK_IMPORTED_MODULE_3__[\"default\"])();\n const answerSentPromise = (0,p_defer__WEBPACK_IMPORTED_MODULE_3__[\"default\"])();\n signal.onabort = () => { connectedPromise.reject(); };\n // candidate callbacks\n pc.onicecandidate = ({ candidate }) => {\n answerSentPromise.promise.then(() => {\n stream.write({\n type: _pb_message_js__WEBPACK_IMPORTED_MODULE_5__.Message.Type.ICE_CANDIDATE,\n data: (candidate != null) ? JSON.stringify(candidate.toJSON()) : ''\n });\n }, (err) => {\n log.error('cannot set candidate since sending answer failed', err);\n });\n };\n (0,_util_js__WEBPACK_IMPORTED_MODULE_6__.resolveOnConnected)(pc, connectedPromise);\n // read an SDP offer\n const pbOffer = await stream.read();\n if (pbOffer.type !== _pb_message_js__WEBPACK_IMPORTED_MODULE_5__.Message.Type.SDP_OFFER) {\n throw new Error(`expected message type SDP_OFFER, received: ${pbOffer.type ?? 'undefined'} `);\n }\n const offer = new RTCSessionDescription({\n type: 'offer',\n sdp: pbOffer.data\n });\n await pc.setRemoteDescription(offer).catch(err => {\n log.error('could not execute setRemoteDescription', err);\n throw new Error('Failed to set remoteDescription');\n });\n // create and write an SDP answer\n const answer = await pc.createAnswer().catch(err => {\n log.error('could not execute createAnswer', err);\n answerSentPromise.reject(err);\n throw new Error('Failed to create answer');\n });\n // write the answer to the remote\n stream.write({ type: _pb_message_js__WEBPACK_IMPORTED_MODULE_5__.Message.Type.SDP_ANSWER, data: answer.sdp });\n await pc.setLocalDescription(answer).catch(err => {\n log.error('could not execute setLoc
/***/ }),
/***/ "./node_modules/@libp2p/webrtc/dist/src/private-to-private/listener.js":
/*!*****************************************************************************!*\
!*** ./node_modules/@libp2p/webrtc/dist/src/private-to-private/listener.js ***!
\*****************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ WebRTCPeerListener: () => (/* binding */ WebRTCPeerListener)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interfaces_events__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interfaces/events */ \"./node_modules/@libp2p/interfaces/dist/src/events.js\");\n/* harmony import */ var _multiformats_mafmt__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @multiformats/mafmt */ \"./node_modules/@multiformats/mafmt/dist/src/index.js\");\n\n\nclass WebRTCPeerListener extends _libp2p_interfaces_events__WEBPACK_IMPORTED_MODULE_0__.EventEmitter {\n peerId;\n transportManager;\n constructor(opts) {\n super();\n this.peerId = opts.peerId;\n this.transportManager = opts.transportManager;\n }\n async listen() {\n this.safeDispatchEvent('listening', {});\n }\n getAddrs() {\n return this.transportManager\n .getListeners()\n .filter(l => l !== this)\n .map(l => l.getAddrs()\n .filter(ma => _multiformats_mafmt__WEBPACK_IMPORTED_MODULE_1__.Circuit.matches(ma))\n .map(ma => {\n return ma.encapsulate(`/webrtc/p2p/${this.peerId}`);\n }))\n .flat();\n }\n async close() {\n this.safeDispatchEvent('close', {});\n }\n}\n//# sourceMappingURL=listener.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/webrtc/dist/src/private-to-private/listener.js?");
/***/ }),
/***/ "./node_modules/@libp2p/webrtc/dist/src/private-to-private/pb/message.js":
/*!*******************************************************************************!*\
!*** ./node_modules/@libp2p/webrtc/dist/src/private-to-private/pb/message.js ***!
\*******************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Message: () => (/* binding */ Message)\n/* harmony export */ });\n/* harmony import */ var protons_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! protons-runtime */ \"./node_modules/protons-runtime/dist/src/index.js\");\n/* eslint-disable import/export */\n/* eslint-disable complexity */\n/* eslint-disable @typescript-eslint/no-namespace */\n/* eslint-disable @typescript-eslint/no-unnecessary-boolean-literal-compare */\n/* eslint-disable @typescript-eslint/no-empty-interface */\n\nvar Message;\n(function (Message) {\n let Type;\n (function (Type) {\n Type[\"SDP_OFFER\"] = \"SDP_OFFER\";\n Type[\"SDP_ANSWER\"] = \"SDP_ANSWER\";\n Type[\"ICE_CANDIDATE\"] = \"ICE_CANDIDATE\";\n })(Type = Message.Type || (Message.Type = {}));\n let __TypeValues;\n (function (__TypeValues) {\n __TypeValues[__TypeValues[\"SDP_OFFER\"] = 0] = \"SDP_OFFER\";\n __TypeValues[__TypeValues[\"SDP_ANSWER\"] = 1] = \"SDP_ANSWER\";\n __TypeValues[__TypeValues[\"ICE_CANDIDATE\"] = 2] = \"ICE_CANDIDATE\";\n })(__TypeValues || (__TypeValues = {}));\n (function (Type) {\n Type.codec = () => {\n return (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.enumeration)(__TypeValues);\n };\n })(Type = Message.Type || (Message.Type = {}));\n let _codec;\n Message.codec = () => {\n if (_codec == null) {\n _codec = (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.message)((obj, w, opts = {}) => {\n if (opts.lengthDelimited !== false) {\n w.fork();\n }\n if (obj.type != null) {\n w.uint32(8);\n Message.Type.codec().encode(obj.type, w);\n }\n if (obj.data != null) {\n w.uint32(18);\n w.string(obj.data);\n }\n if (opts.lengthDelimited !== false) {\n w.ldelim();\n }\n }, (reader, length) => {\n const obj = {};\n const end = length == null ? reader.len : reader.pos + length;\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n obj.type = Message.Type.codec().decode(reader);\n break;\n case 2:\n obj.data = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return obj;\n });\n }\n return _codec;\n };\n Message.encode = (obj) => {\n return (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.encodeMessage)(obj, Message.codec());\n };\n Message.decode = (buf) => {\n return (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.decodeMessage)(buf, Message.codec());\n };\n})(Message || (Message = {}));\n//# sourceMappingURL=message.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/webrtc/dist/src/private-to-private/pb/message.js?");
/***/ }),
/***/ "./node_modules/@libp2p/webrtc/dist/src/private-to-private/transport.js":
/*!******************************************************************************!*\
!*** ./node_modules/@libp2p/webrtc/dist/src/private-to-private/transport.js ***!
\******************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ WebRTCTransport: () => (/* binding */ WebRTCTransport),\n/* harmony export */ splitAddr: () => (/* binding */ splitAddr)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interface_transport__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interface-transport */ \"./node_modules/@libp2p/interface-transport/dist/src/index.js\");\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n/* harmony import */ var _libp2p_logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @libp2p/logger */ \"./node_modules/@libp2p/logger/dist/src/index.js\");\n/* harmony import */ var _libp2p_peer_id__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @libp2p/peer-id */ \"./node_modules/@libp2p/peer-id/dist/src/index.js\");\n/* harmony import */ var _multiformats_multiaddr__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @multiformats/multiaddr */ \"./node_modules/@multiformats/multiaddr/dist/src/index.js\");\n/* harmony import */ var _error_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../error.js */ \"./node_modules/@libp2p/webrtc/dist/src/error.js\");\n/* harmony import */ var _maconn_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../maconn.js */ \"./node_modules/@libp2p/webrtc/dist/src/maconn.js\");\n/* harmony import */ var _handler_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./handler.js */ \"./node_modules/@libp2p/webrtc/dist/src/private-to-private/handler.js\");\n/* harmony import */ var _listener_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./listener.js */ \"./node_modules/@libp2p/webrtc/dist/src/private-to-private/listener.js\");\n\n\n\n\n\n\n\n\n\nconst log = (0,_libp2p_logger__WEBPACK_IMPORTED_MODULE_2__.logger)('libp2p:webrtc:peer');\nconst WEBRTC_TRANSPORT = '/webrtc';\nconst CIRCUIT_RELAY_TRANSPORT = '/p2p-circuit';\nconst SIGNALING_PROTO_ID = '/webrtc-signaling/0.0.1';\nconst WEBRTC_CODE = (0,_multiformats_multiaddr__WEBPACK_IMPORTED_MODULE_4__.protocols)('webrtc').code;\nclass WebRTCTransport {\n components;\n init;\n _started = false;\n constructor(components, init = {}) {\n this.components = components;\n this.init = init;\n }\n isStarted() {\n return this._started;\n }\n async start() {\n await this.components.registrar.handle(SIGNALING_PROTO_ID, (data) => {\n this._onProtocol(data).catch(err => { log.error('failed to handle incoming connect from %p', data.connection.remotePeer, err); });\n });\n this._started = true;\n }\n async stop() {\n await this.components.registrar.unhandle(SIGNALING_PROTO_ID);\n this._started = false;\n }\n createListener(options) {\n return new _listener_js__WEBPACK_IMPORTED_MODULE_8__.WebRTCPeerListener(this.components);\n }\n [Symbol.toStringTag] = '@libp2p/webrtc';\n [_libp2p_interface_transport__WEBPACK_IMPORTED_MODULE_0__.symbol] = true;\n filter(multiaddrs) {\n return multiaddrs.filter((ma) => {\n const codes = ma.protoCodes();\n return codes.includes(WEBRTC_CODE);\n });\n }\n /*\n * dial connects to a remote via the circuit relay or any other protocol\n * and proceeds to upgrade to a webrtc connection.\n * multiaddr of the form: <multiaddr>/webrtc/p2p/<destination-peer>\n * For a circuit relay, this will be of the form\n * <relay address>/p2p/<relay-peer>/p2p-circuit/webrtc/p2p/<destination-peer>\n */\n async dial(ma, options) {\n log.trace('dialing address: ', ma);\n const { baseAddr, peerId } = splitAddr(ma);\n if (options.signal == null) {\n const controller = new AbortController();\n options.signal = controller.signal;\n }\n const connection = await this.components.transport
/***/ }),
/***/ "./node_modules/@libp2p/webrtc/dist/src/private-to-private/util.js":
/*!*************************************************************************!*\
!*** ./node_modules/@libp2p/webrtc/dist/src/private-to-private/util.js ***!
\*************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ readCandidatesUntilConnected: () => (/* binding */ readCandidatesUntilConnected),\n/* harmony export */ resolveOnConnected: () => (/* binding */ resolveOnConnected)\n/* harmony export */ });\n/* harmony import */ var _libp2p_logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/logger */ \"./node_modules/@libp2p/logger/dist/src/index.js\");\n/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util.js */ \"./node_modules/@libp2p/webrtc/dist/src/util.js\");\n/* harmony import */ var _pb_message_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./pb/message.js */ \"./node_modules/@libp2p/webrtc/dist/src/private-to-private/pb/message.js\");\n\n\n\nconst log = (0,_libp2p_logger__WEBPACK_IMPORTED_MODULE_0__.logger)('libp2p:webrtc:peer:util');\nconst readCandidatesUntilConnected = async (connectedPromise, pc, stream) => {\n while (true) {\n const readResult = await Promise.race([connectedPromise.promise, stream.read()]);\n // check if readResult is a message\n if (readResult instanceof Object) {\n const message = readResult;\n if (message.type !== _pb_message_js__WEBPACK_IMPORTED_MODULE_2__.Message.Type.ICE_CANDIDATE) {\n throw new Error('expected only ice candidates');\n }\n // end of candidates has been signalled\n if (message.data == null || message.data === '') {\n log.trace('end-of-candidates received');\n break;\n }\n log.trace('received new ICE candidate: %s', message.data);\n try {\n await pc.addIceCandidate(new RTCIceCandidate(JSON.parse(message.data)));\n }\n catch (err) {\n log.error('bad candidate received: ', err);\n throw new Error('bad candidate received');\n }\n }\n else {\n // connected promise resolved\n break;\n }\n }\n await connectedPromise.promise;\n};\nfunction resolveOnConnected(pc, promise) {\n pc[_util_js__WEBPACK_IMPORTED_MODULE_1__.isFirefox ? 'oniceconnectionstatechange' : 'onconnectionstatechange'] = (_) => {\n log.trace('receiver peerConnectionState state: ', pc.connectionState);\n switch (_util_js__WEBPACK_IMPORTED_MODULE_1__.isFirefox ? pc.iceConnectionState : pc.connectionState) {\n case 'connected':\n promise.resolve();\n break;\n case 'failed':\n case 'disconnected':\n case 'closed':\n promise.reject(new Error('RTCPeerConnection was closed'));\n break;\n default:\n break;\n }\n };\n}\n//# sourceMappingURL=util.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/webrtc/dist/src/private-to-private/util.js?");
/***/ }),
/***/ "./node_modules/@libp2p/webrtc/dist/src/private-to-public/sdp.js":
/*!***********************************************************************!*\
!*** ./node_modules/@libp2p/webrtc/dist/src/private-to-public/sdp.js ***!
\***********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ certhash: () => (/* binding */ certhash),\n/* harmony export */ decodeCerthash: () => (/* binding */ decodeCerthash),\n/* harmony export */ fromMultiAddr: () => (/* binding */ fromMultiAddr),\n/* harmony export */ getFingerprintFromSdp: () => (/* binding */ getFingerprintFromSdp),\n/* harmony export */ getLocalFingerprint: () => (/* binding */ getLocalFingerprint),\n/* harmony export */ ma2Fingerprint: () => (/* binding */ ma2Fingerprint),\n/* harmony export */ mbdecoder: () => (/* binding */ mbdecoder),\n/* harmony export */ munge: () => (/* binding */ munge),\n/* harmony export */ toSupportedHashFunction: () => (/* binding */ toSupportedHashFunction)\n/* harmony export */ });\n/* harmony import */ var _libp2p_logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/logger */ \"./node_modules/@libp2p/logger/dist/src/index.js\");\n/* harmony import */ var multiformats_basics__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! multiformats/basics */ \"./node_modules/multiformats/src/basics.js\");\n/* harmony import */ var multihashes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! multihashes */ \"./node_modules/multihashes/src/index.js\");\n/* harmony import */ var _error_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../error.js */ \"./node_modules/@libp2p/webrtc/dist/src/error.js\");\n/* harmony import */ var _transport_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./transport.js */ \"./node_modules/@libp2p/webrtc/dist/src/private-to-public/transport.js\");\n\n\n\n\n\nconst log = (0,_libp2p_logger__WEBPACK_IMPORTED_MODULE_0__.logger)('libp2p:webrtc:sdp');\n/**\n * Get base2 | identity decoders\n */\n// @ts-expect-error - Not easy to combine these types.\nconst mbdecoder = Object.values(multiformats_basics__WEBPACK_IMPORTED_MODULE_1__.bases).map(b => b.decoder).reduce((d, b) => d.or(b));\nfunction getLocalFingerprint(pc) {\n // try to fetch fingerprint from local certificate\n const localCert = pc.getConfiguration().certificates?.at(0);\n if (localCert == null || localCert.getFingerprints == null) {\n log.trace('fetching fingerprint from local SDP');\n const localDescription = pc.localDescription;\n if (localDescription == null) {\n return undefined;\n }\n return getFingerprintFromSdp(localDescription.sdp);\n }\n log.trace('fetching fingerprint from local certificate');\n if (localCert.getFingerprints().length === 0) {\n return undefined;\n }\n const fingerprint = localCert.getFingerprints()[0].value;\n if (fingerprint == null) {\n throw (0,_error_js__WEBPACK_IMPORTED_MODULE_3__.invalidFingerprint)('', 'no fingerprint on local certificate');\n }\n return fingerprint;\n}\nconst fingerprintRegex = /^a=fingerprint:(?:\\w+-[0-9]+)\\s(?<fingerprint>(:?[0-9a-fA-F]{2})+)$/m;\nfunction getFingerprintFromSdp(sdp) {\n const searchResult = sdp.match(fingerprintRegex);\n return searchResult?.groups?.fingerprint;\n}\n/**\n * Get base2 | identity decoders\n */\nfunction ipv(ma) {\n for (const proto of ma.protoNames()) {\n if (proto.startsWith('ip')) {\n return proto.toUpperCase();\n }\n }\n log('Warning: multiaddr does not appear to contain IP4 or IP6, defaulting to IP6', ma);\n return 'IP6';\n}\n// Extract the certhash from a multiaddr\nfunction certhash(ma) {\n const tups = ma.stringTuples();\n const certhash = tups.filter((tup) => tup[0] === _transport_js__WEBPACK_IMPORTED_MODULE_4__.CERTHASH_CODE).map((tup) => tup[1])[0];\n if (certhash === undefined || certhash === '') {\n throw (0,_error_js__WEBPACK_IMPORTED_MODULE_3__.inappropriateMultiaddr)(`Couldn't find a certhash component of multiaddr: ${ma.toString()}`);\n }\n return certhash;\n}\n/**\n * Convert a certhash into a multihash\n */\nfunction decodeCerthash(certhash) {\n const mbdecoded = mbdecoder.decode(certhash);\
/***/ }),
/***/ "./node_modules/@libp2p/webrtc/dist/src/private-to-public/transport.js":
/*!*****************************************************************************!*\
!*** ./node_modules/@libp2p/webrtc/dist/src/private-to-public/transport.js ***!
\*****************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ CERTHASH_CODE: () => (/* binding */ CERTHASH_CODE),\n/* harmony export */ WEBRTC_CODE: () => (/* binding */ WEBRTC_CODE),\n/* harmony export */ WebRTCDirectTransport: () => (/* binding */ WebRTCDirectTransport)\n/* harmony export */ });\n/* harmony import */ var _chainsafe_libp2p_noise__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @chainsafe/libp2p-noise */ \"./node_modules/@chainsafe/libp2p-noise/dist/src/index.js\");\n/* harmony import */ var _libp2p_interface_transport__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/interface-transport */ \"./node_modules/@libp2p/interface-transport/dist/src/index.js\");\n/* harmony import */ var _libp2p_logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @libp2p/logger */ \"./node_modules/@libp2p/logger/dist/src/index.js\");\n/* harmony import */ var _libp2p_peer_id__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @libp2p/peer-id */ \"./node_modules/@libp2p/peer-id/dist/src/index.js\");\n/* harmony import */ var _multiformats_multiaddr__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @multiformats/multiaddr */ \"./node_modules/@multiformats/multiaddr/dist/src/index.js\");\n/* harmony import */ var multihashes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! multihashes */ \"./node_modules/multihashes/src/index.js\");\n/* harmony import */ var uint8arrays_concat__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! uint8arrays/concat */ \"./node_modules/uint8arrays/dist/src/concat.js\");\n/* harmony import */ var uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! uint8arrays/from-string */ \"./node_modules/uint8arrays/dist/src/from-string.js\");\n/* harmony import */ var _error_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../error.js */ \"./node_modules/@libp2p/webrtc/dist/src/error.js\");\n/* harmony import */ var _maconn_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../maconn.js */ \"./node_modules/@libp2p/webrtc/dist/src/maconn.js\");\n/* harmony import */ var _muxer_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../muxer.js */ \"./node_modules/@libp2p/webrtc/dist/src/muxer.js\");\n/* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../stream.js */ \"./node_modules/@libp2p/webrtc/dist/src/stream.js\");\n/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../util.js */ \"./node_modules/@libp2p/webrtc/dist/src/util.js\");\n/* harmony import */ var _sdp_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./sdp.js */ \"./node_modules/@libp2p/webrtc/dist/src/private-to-public/sdp.js\");\n/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./util.js */ \"./node_modules/@libp2p/webrtc/dist/src/private-to-public/util.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst log = (0,_libp2p_logger__WEBPACK_IMPORTED_MODULE_2__.logger)('libp2p:webrtc:transport');\n/**\n * The time to wait, in milliseconds, for the data channel handshake to complete\n */\nconst HANDSHAKE_TIMEOUT_MS = 10000;\n/**\n * Created by converting the hexadecimal protocol code to an integer.\n *\n * {@link https://github.com/multiformats/multiaddr/blob/master/protocols.csv}\n */\nconst WEBRTC_CODE = (0,_multiformats_multiaddr__WEBPACK_IMPORTED_MODULE_4__.protocols)('webrtc-direct').code;\n/**\n * Created by converting the hexadecimal protocol code to an integer.\n *\n * {@link https://github.com/multiformats/multiaddr/blob/master/protocols.csv}\n */\nconst CERTHASH_CODE = (0,_multiformats_multiaddr__WEBPACK_IMPORTED_MODULE_4__.protocols)('certhash').code;\nclass WebRTCDirectTransport {\n metrics;\n components;\n init;\n constructor(components, init = {}) {\n this.components = components;\n this.init = init;\n if (components.metrics != null) {\n this.metrics = {\n dialerEvents: components.metrics
/***/ }),
/***/ "./node_modules/@libp2p/webrtc/dist/src/private-to-public/util.js":
/*!************************************************************************!*\
!*** ./node_modules/@libp2p/webrtc/dist/src/private-to-public/util.js ***!
\************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ genUfrag: () => (/* binding */ genUfrag)\n/* harmony export */ });\nconst charset = Array.from('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/');\nconst genUfrag = (len) => [...Array(len)].map(() => charset.at(Math.floor(Math.random() * charset.length))).join('');\n//# sourceMappingURL=util.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/webrtc/dist/src/private-to-public/util.js?");
/***/ }),
/***/ "./node_modules/@libp2p/webrtc/dist/src/stream.js":
/*!********************************************************!*\
!*** ./node_modules/@libp2p/webrtc/dist/src/stream.js ***!
\********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ createStream: () => (/* binding */ createStream)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interface_stream_muxer_stream__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interface-stream-muxer/stream */ \"./node_modules/@libp2p/interface-stream-muxer/dist/src/stream.js\");\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n/* harmony import */ var _libp2p_logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @libp2p/logger */ \"./node_modules/@libp2p/logger/dist/src/index.js\");\n/* harmony import */ var it_length_prefixed__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! it-length-prefixed */ \"./node_modules/it-length-prefixed/dist/src/index.js\");\n/* harmony import */ var it_pushable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! it-pushable */ \"./node_modules/it-pushable/dist/src/index.js\");\n/* harmony import */ var p_event__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! p-event */ \"./node_modules/p-event/index.js\");\n/* harmony import */ var uint8arraylist__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! uint8arraylist */ \"./node_modules/uint8arraylist/dist/src/index.js\");\n/* harmony import */ var _pb_message_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./pb/message.js */ \"./node_modules/@libp2p/webrtc/dist/src/pb/message.js\");\n\n\n\n\n\n\n\n\nconst log = (0,_libp2p_logger__WEBPACK_IMPORTED_MODULE_2__.logger)('libp2p:webrtc:stream');\n// Max message size that can be sent to the DataChannel\nconst MAX_MESSAGE_SIZE = 16 * 1024;\n// How much can be buffered to the DataChannel at once\nconst MAX_BUFFERED_AMOUNT = 16 * 1024 * 1024;\n// How long time we wait for the 'bufferedamountlow' event to be emitted\nconst BUFFERED_AMOUNT_LOW_TIMEOUT = 30 * 1000;\n// protobuf field definition overhead\nconst PROTOBUF_OVERHEAD = 3;\nclass WebRTCStream extends _libp2p_interface_stream_muxer_stream__WEBPACK_IMPORTED_MODULE_0__.AbstractStream {\n /**\n * The data channel used to send and receive data\n */\n channel;\n /**\n * Data channel options\n */\n dataChannelOptions;\n /**\n * push data from the underlying datachannel to the length prefix decoder\n * and then the protobuf decoder.\n */\n incomingData;\n messageQueue;\n constructor(init) {\n super(init);\n this.channel = init.channel;\n this.channel.binaryType = 'arraybuffer';\n this.incomingData = (0,it_pushable__WEBPACK_IMPORTED_MODULE_4__.pushable)();\n this.messageQueue = new uint8arraylist__WEBPACK_IMPORTED_MODULE_6__.Uint8ArrayList();\n this.dataChannelOptions = {\n bufferedAmountLowEventTimeout: init.dataChannelOptions?.bufferedAmountLowEventTimeout ?? BUFFERED_AMOUNT_LOW_TIMEOUT,\n maxBufferedAmount: init.dataChannelOptions?.maxBufferedAmount ?? MAX_BUFFERED_AMOUNT,\n maxMessageSize: init.dataChannelOptions?.maxMessageSize ?? MAX_MESSAGE_SIZE\n };\n // set up initial state\n switch (this.channel.readyState) {\n case 'open':\n break;\n case 'closed':\n case 'closing':\n if (this.stat.timeline.close === undefined || this.stat.timeline.close === 0) {\n this.stat.timeline.close = Date.now();\n }\n break;\n case 'connecting':\n // noop\n break;\n default:\n log.error('unknown datachannel state %s', this.channel.readyState);\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_1__.CodeError('Unknown datachannel state', 'ERR_INVALID_STATE');\n }\n // handle RTCDataChannel events\n this.channel.onopen = (_evt) => {\n this.stat.timelin
/***/ }),
/***/ "./node_modules/@libp2p/webrtc/dist/src/util.js":
/*!******************************************************!*\
!*** ./node_modules/@libp2p/webrtc/dist/src/util.js ***!
\******************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ isFirefox: () => (/* binding */ isFirefox),\n/* harmony export */ nopSink: () => (/* binding */ nopSink),\n/* harmony export */ nopSource: () => (/* binding */ nopSource)\n/* harmony export */ });\n/* harmony import */ var detect_browser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! detect-browser */ \"./node_modules/detect-browser/es/index.js\");\n\nconst browser = (0,detect_browser__WEBPACK_IMPORTED_MODULE_0__.detect)();\nconst isFirefox = ((browser != null) && browser.name === 'firefox');\nconst nopSource = async function* nop() { };\nconst nopSink = async (_) => { };\n//# sourceMappingURL=util.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/webrtc/dist/src/util.js?");
/***/ }),
/***/ "./node_modules/@libp2p/websockets/dist/src/constants.js":
/*!***************************************************************!*\
!*** ./node_modules/@libp2p/websockets/dist/src/constants.js ***!
\***************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ CLOSE_TIMEOUT: () => (/* binding */ CLOSE_TIMEOUT),\n/* harmony export */ CODE_CIRCUIT: () => (/* binding */ CODE_CIRCUIT),\n/* harmony export */ CODE_P2P: () => (/* binding */ CODE_P2P),\n/* harmony export */ CODE_TCP: () => (/* binding */ CODE_TCP),\n/* harmony export */ CODE_WS: () => (/* binding */ CODE_WS),\n/* harmony export */ CODE_WSS: () => (/* binding */ CODE_WSS)\n/* harmony export */ });\n// p2p multi-address code\nconst CODE_P2P = 421;\nconst CODE_CIRCUIT = 290;\nconst CODE_TCP = 6;\nconst CODE_WS = 477;\nconst CODE_WSS = 478;\n// Time to wait for a connection to close gracefully before destroying it manually\nconst CLOSE_TIMEOUT = 2000;\n//# sourceMappingURL=constants.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/websockets/dist/src/constants.js?");
/***/ }),
/***/ "./node_modules/@libp2p/websockets/dist/src/filters.js":
/*!*************************************************************!*\
!*** ./node_modules/@libp2p/websockets/dist/src/filters.js ***!
\*************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ all: () => (/* binding */ all),\n/* harmony export */ dnsWsOrWss: () => (/* binding */ dnsWsOrWss),\n/* harmony export */ dnsWss: () => (/* binding */ dnsWss),\n/* harmony export */ wss: () => (/* binding */ wss)\n/* harmony export */ });\n/* harmony import */ var _multiformats_mafmt__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @multiformats/mafmt */ \"./node_modules/@multiformats/mafmt/dist/src/index.js\");\n/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constants.js */ \"./node_modules/@libp2p/websockets/dist/src/constants.js\");\n\n\nfunction all(multiaddrs) {\n return multiaddrs.filter((ma) => {\n if (ma.protoCodes().includes(_constants_js__WEBPACK_IMPORTED_MODULE_1__.CODE_CIRCUIT)) {\n return false;\n }\n const testMa = ma.decapsulateCode(_constants_js__WEBPACK_IMPORTED_MODULE_1__.CODE_P2P);\n return _multiformats_mafmt__WEBPACK_IMPORTED_MODULE_0__.WebSockets.matches(testMa) ||\n _multiformats_mafmt__WEBPACK_IMPORTED_MODULE_0__.WebSocketsSecure.matches(testMa);\n });\n}\nfunction wss(multiaddrs) {\n return multiaddrs.filter((ma) => {\n if (ma.protoCodes().includes(_constants_js__WEBPACK_IMPORTED_MODULE_1__.CODE_CIRCUIT)) {\n return false;\n }\n const testMa = ma.decapsulateCode(_constants_js__WEBPACK_IMPORTED_MODULE_1__.CODE_P2P);\n return _multiformats_mafmt__WEBPACK_IMPORTED_MODULE_0__.WebSocketsSecure.matches(testMa);\n });\n}\nfunction dnsWss(multiaddrs) {\n return multiaddrs.filter((ma) => {\n if (ma.protoCodes().includes(_constants_js__WEBPACK_IMPORTED_MODULE_1__.CODE_CIRCUIT)) {\n return false;\n }\n const testMa = ma.decapsulateCode(_constants_js__WEBPACK_IMPORTED_MODULE_1__.CODE_P2P);\n return _multiformats_mafmt__WEBPACK_IMPORTED_MODULE_0__.WebSocketsSecure.matches(testMa) &&\n _multiformats_mafmt__WEBPACK_IMPORTED_MODULE_0__.DNS.matches(testMa.decapsulateCode(_constants_js__WEBPACK_IMPORTED_MODULE_1__.CODE_TCP).decapsulateCode(_constants_js__WEBPACK_IMPORTED_MODULE_1__.CODE_WSS));\n });\n}\nfunction dnsWsOrWss(multiaddrs) {\n return multiaddrs.filter((ma) => {\n if (ma.protoCodes().includes(_constants_js__WEBPACK_IMPORTED_MODULE_1__.CODE_CIRCUIT)) {\n return false;\n }\n const testMa = ma.decapsulateCode(_constants_js__WEBPACK_IMPORTED_MODULE_1__.CODE_P2P);\n // WS\n if (_multiformats_mafmt__WEBPACK_IMPORTED_MODULE_0__.WebSockets.matches(testMa)) {\n return _multiformats_mafmt__WEBPACK_IMPORTED_MODULE_0__.DNS.matches(testMa.decapsulateCode(_constants_js__WEBPACK_IMPORTED_MODULE_1__.CODE_TCP).decapsulateCode(_constants_js__WEBPACK_IMPORTED_MODULE_1__.CODE_WS));\n }\n // WSS\n return _multiformats_mafmt__WEBPACK_IMPORTED_MODULE_0__.WebSocketsSecure.matches(testMa) &&\n _multiformats_mafmt__WEBPACK_IMPORTED_MODULE_0__.DNS.matches(testMa.decapsulateCode(_constants_js__WEBPACK_IMPORTED_MODULE_1__.CODE_TCP).decapsulateCode(_constants_js__WEBPACK_IMPORTED_MODULE_1__.CODE_WSS));\n });\n}\n//# sourceMappingURL=filters.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/websockets/dist/src/filters.js?");
/***/ }),
/***/ "./node_modules/@libp2p/websockets/dist/src/index.js":
/*!***********************************************************!*\
!*** ./node_modules/@libp2p/websockets/dist/src/index.js ***!
\***********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ webSockets: () => (/* binding */ webSockets)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interface_transport__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interface-transport */ \"./node_modules/@libp2p/interface-transport/dist/src/index.js\");\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n/* harmony import */ var _libp2p_logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @libp2p/logger */ \"./node_modules/@libp2p/logger/dist/src/index.js\");\n/* harmony import */ var _multiformats_multiaddr_to_uri__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @multiformats/multiaddr-to-uri */ \"./node_modules/@multiformats/multiaddr-to-uri/dist/src/index.js\");\n/* harmony import */ var it_ws_client__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! it-ws/client */ \"./node_modules/it-ws/dist/src/client.js\");\n/* harmony import */ var p_defer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! p-defer */ \"./node_modules/p-defer/index.js\");\n/* harmony import */ var wherearewe__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! wherearewe */ \"./node_modules/wherearewe/src/index.js\");\n/* harmony import */ var _filters_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./filters.js */ \"./node_modules/@libp2p/websockets/dist/src/filters.js\");\n/* harmony import */ var _listener_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./listener.js */ \"./node_modules/@libp2p/websockets/dist/src/listener.browser.js\");\n/* harmony import */ var _socket_to_conn_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./socket-to-conn.js */ \"./node_modules/@libp2p/websockets/dist/src/socket-to-conn.js\");\n\n\n\n\n\n\n\n\n\n\nconst log = (0,_libp2p_logger__WEBPACK_IMPORTED_MODULE_2__.logger)('libp2p:websockets');\nclass WebSockets {\n init;\n constructor(init) {\n this.init = init;\n }\n [Symbol.toStringTag] = '@libp2p/websockets';\n [_libp2p_interface_transport__WEBPACK_IMPORTED_MODULE_0__.symbol] = true;\n async dial(ma, options) {\n log('dialing %s', ma);\n options = options ?? {};\n const socket = await this._connect(ma, options);\n const maConn = (0,_socket_to_conn_js__WEBPACK_IMPORTED_MODULE_9__.socketToMaConn)(socket, ma);\n log('new outbound connection %s', maConn.remoteAddr);\n const conn = await options.upgrader.upgradeOutbound(maConn);\n log('outbound connection %s upgraded', maConn.remoteAddr);\n return conn;\n }\n async _connect(ma, options) {\n if (options?.signal?.aborted === true) {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_1__.AbortError();\n }\n const cOpts = ma.toOptions();\n log('dialing %s:%s', cOpts.host, cOpts.port);\n const errorPromise = (0,p_defer__WEBPACK_IMPORTED_MODULE_5__[\"default\"])();\n const errfn = (err) => {\n log.error('connection error:', err);\n errorPromise.reject(err);\n };\n const rawSocket = (0,it_ws_client__WEBPACK_IMPORTED_MODULE_4__.connect)((0,_multiformats_multiaddr_to_uri__WEBPACK_IMPORTED_MODULE_3__.multiaddrToUri)(ma), this.init);\n if (rawSocket.socket.on != null) {\n rawSocket.socket.on('error', errfn);\n }\n else {\n rawSocket.socket.onerror = errfn;\n }\n if (options.signal == null) {\n await Promise.race([rawSocket.connected(), errorPromise.promise]);\n log('connected %s', ma);\n return rawSocket;\n }\n // Allow abort via signal during connect\n let onAbort;\n const abort = new Promise((resolve, reject) => {\n onAbort = () => {\n reject(new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MOD
/***/ }),
/***/ "./node_modules/@libp2p/websockets/dist/src/listener.browser.js":
/*!**********************************************************************!*\
!*** ./node_modules/@libp2p/websockets/dist/src/listener.browser.js ***!
\**********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ createListener: () => (/* binding */ createListener)\n/* harmony export */ });\nfunction createListener() {\n throw new Error('WebSocket Servers can not be created in the browser!');\n}\n//# sourceMappingURL=listener.browser.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/websockets/dist/src/listener.browser.js?");
/***/ }),
/***/ "./node_modules/@libp2p/websockets/dist/src/socket-to-conn.js":
/*!********************************************************************!*\
!*** ./node_modules/@libp2p/websockets/dist/src/socket-to-conn.js ***!
\********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ socketToMaConn: () => (/* binding */ socketToMaConn)\n/* harmony export */ });\n/* harmony import */ var _libp2p_logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/logger */ \"./node_modules/@libp2p/logger/dist/src/index.js\");\n/* harmony import */ var abortable_iterator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! abortable-iterator */ \"./node_modules/abortable-iterator/dist/src/index.js\");\n/* harmony import */ var p_timeout__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! p-timeout */ \"./node_modules/p-timeout/index.js\");\n/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./constants.js */ \"./node_modules/@libp2p/websockets/dist/src/constants.js\");\n\n\n\n\nconst log = (0,_libp2p_logger__WEBPACK_IMPORTED_MODULE_0__.logger)('libp2p:websockets:socket');\n// Convert a stream into a MultiaddrConnection\n// https://github.com/libp2p/interface-transport#multiaddrconnection\nfunction socketToMaConn(stream, remoteAddr, options) {\n options = options ?? {};\n const maConn = {\n async sink(source) {\n if ((options?.signal) != null) {\n source = (0,abortable_iterator__WEBPACK_IMPORTED_MODULE_1__.abortableSource)(source, options.signal);\n }\n try {\n await stream.sink(source);\n }\n catch (err) {\n if (err.type !== 'aborted') {\n log.error(err);\n }\n }\n },\n source: (options.signal != null) ? (0,abortable_iterator__WEBPACK_IMPORTED_MODULE_1__.abortableSource)(stream.source, options.signal) : stream.source,\n remoteAddr,\n timeline: { open: Date.now() },\n async close() {\n const start = Date.now();\n try {\n await (0,p_timeout__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(stream.close(), {\n milliseconds: _constants_js__WEBPACK_IMPORTED_MODULE_3__.CLOSE_TIMEOUT\n });\n }\n catch (err) {\n const { host, port } = maConn.remoteAddr.toOptions();\n log('timeout closing stream to %s:%s after %dms, destroying it manually', host, port, Date.now() - start);\n stream.destroy();\n }\n finally {\n maConn.timeline.close = Date.now();\n }\n }\n };\n stream.socket.addEventListener('close', () => {\n // In instances where `close` was not explicitly called,\n // such as an iterable stream ending, ensure we have set the close\n // timeline\n if (maConn.timeline.close == null) {\n maConn.timeline.close = Date.now();\n }\n }, { once: true });\n return maConn;\n}\n//# sourceMappingURL=socket-to-conn.js.map\n\n//# sourceURL=webpack://light/./node_modules/@libp2p/websockets/dist/src/socket-to-conn.js?");
/***/ }),
/***/ "./node_modules/@multiformats/mafmt/dist/src/index.js":
/*!************************************************************!*\
!*** ./node_modules/@multiformats/mafmt/dist/src/index.js ***!
\************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Circuit: () => (/* binding */ Circuit),\n/* harmony export */ DNS: () => (/* binding */ DNS),\n/* harmony export */ DNS4: () => (/* binding */ DNS4),\n/* harmony export */ DNS6: () => (/* binding */ DNS6),\n/* harmony export */ DNSADDR: () => (/* binding */ DNSADDR),\n/* harmony export */ HTTP: () => (/* binding */ HTTP),\n/* harmony export */ HTTPS: () => (/* binding */ HTTPS),\n/* harmony export */ IP: () => (/* binding */ IP),\n/* harmony export */ IPFS: () => (/* binding */ IPFS),\n/* harmony export */ P2P: () => (/* binding */ P2P),\n/* harmony export */ P2PWebRTCDirect: () => (/* binding */ P2PWebRTCDirect),\n/* harmony export */ P2PWebRTCStar: () => (/* binding */ P2PWebRTCStar),\n/* harmony export */ QUIC: () => (/* binding */ QUIC),\n/* harmony export */ QUICV1: () => (/* binding */ QUICV1),\n/* harmony export */ Reliable: () => (/* binding */ Reliable),\n/* harmony export */ Stardust: () => (/* binding */ Stardust),\n/* harmony export */ TCP: () => (/* binding */ TCP),\n/* harmony export */ UDP: () => (/* binding */ UDP),\n/* harmony export */ UTP: () => (/* binding */ UTP),\n/* harmony export */ WebRTC: () => (/* binding */ WebRTC),\n/* harmony export */ WebRTCDirect: () => (/* binding */ WebRTCDirect),\n/* harmony export */ WebSocketStar: () => (/* binding */ WebSocketStar),\n/* harmony export */ WebSockets: () => (/* binding */ WebSockets),\n/* harmony export */ WebSocketsSecure: () => (/* binding */ WebSocketsSecure),\n/* harmony export */ WebTransport: () => (/* binding */ WebTransport)\n/* harmony export */ });\n/* harmony import */ var _multiformats_multiaddr__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @multiformats/multiaddr */ \"./node_modules/@multiformats/multiaddr/dist/src/index.js\");\n\n/*\n * Valid combinations\n */\nconst DNS4 = base('dns4');\nconst DNS6 = base('dns6');\nconst DNSADDR = base('dnsaddr');\nconst DNS = or(base('dns'), DNSADDR, DNS4, DNS6);\nconst IP = or(base('ip4'), base('ip6'));\nconst TCP = or(and(IP, base('tcp')), and(DNS, base('tcp')));\nconst UDP = and(IP, base('udp'));\nconst UTP = and(UDP, base('utp'));\nconst QUIC = and(UDP, base('quic'));\nconst QUICV1 = and(UDP, base('quic-v1'));\nconst _WebSockets = or(and(TCP, base('ws')), and(DNS, base('ws')));\nconst WebSockets = or(and(_WebSockets, base('p2p')), _WebSockets);\nconst _WebSocketsSecure = or(and(TCP, base('wss')), and(DNS, base('wss')), and(TCP, base('tls'), base('ws')), and(DNS, base('tls'), base('ws')));\nconst WebSocketsSecure = or(and(_WebSocketsSecure, base('p2p')), _WebSocketsSecure);\nconst HTTP = or(and(TCP, base('http')), and(IP, base('http')), and(DNS, base('http')));\nconst HTTPS = or(and(TCP, base('https')), and(IP, base('https')), and(DNS, base('https')));\nconst _WebRTCDirect = and(UDP, base('webrtc-direct'), base('certhash'));\nconst WebRTCDirect = or(and(_WebRTCDirect, base('p2p')), _WebRTCDirect);\nconst _WebTransport = and(QUICV1, base('webtransport'), base('certhash'), base('certhash'));\nconst WebTransport = or(and(_WebTransport, base('p2p')), _WebTransport);\n/**\n * @deprecated\n */\nconst P2PWebRTCStar = or(and(WebSockets, base('p2p-webrtc-star'), base('p2p')), and(WebSocketsSecure, base('p2p-webrtc-star'), base('p2p')), and(WebSockets, base('p2p-webrtc-star')), and(WebSocketsSecure, base('p2p-webrtc-star')));\nconst WebSocketStar = or(and(WebSockets, base('p2p-websocket-star'), base('p2p')), and(WebSocketsSecure, base('p2p-websocket-star'), base('p2p')), and(WebSockets, base('p2p-websocket-star')), and(WebSocketsSecure, base('p2p-websocket-star')));\n/**\n * @deprecated\n */\nconst P2PWebRTCDirect = or(and(HTTP, base('p2p-webrtc-direct'), base('p2p')), and(HTTPS, base('p2p-webrtc-direct'), base('p2p')), and(HTTP, base('p2p-webrtc-direct')), and(HTTPS, base('p2p-webrtc-direct')));\nconst Reliable = or(_WebSockets, _WebSocketsSecure, HTTP, HTTPS, P2PWebRTCStar, P2PWebRTCDirect, TCP, UTP, QUIC, DNS, W
/***/ }),
/***/ "./node_modules/@multiformats/multiaddr-to-uri/dist/src/index.js":
/*!***********************************************************************!*\
!*** ./node_modules/@multiformats/multiaddr-to-uri/dist/src/index.js ***!
\***********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ multiaddrToUri: () => (/* binding */ multiaddrToUri)\n/* harmony export */ });\n/* harmony import */ var _multiformats_multiaddr__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @multiformats/multiaddr */ \"./node_modules/@multiformats/multiaddr/dist/src/index.js\");\n\nfunction extractSNI(ma) {\n let sniProtoCode;\n try {\n sniProtoCode = (0,_multiformats_multiaddr__WEBPACK_IMPORTED_MODULE_0__.protocols)('sni').code;\n }\n catch (e) {\n // No SNI protocol in multiaddr\n return null;\n }\n for (const [proto, value] of ma) {\n if (proto === sniProtoCode && value !== undefined) {\n return value;\n }\n }\n return null;\n}\nfunction hasTLS(ma) {\n return ma.some(([proto, _]) => proto === (0,_multiformats_multiaddr__WEBPACK_IMPORTED_MODULE_0__.protocols)('tls').code);\n}\nfunction interpretNext(headProtoCode, headProtoVal, restMa) {\n const interpreter = interpreters[(0,_multiformats_multiaddr__WEBPACK_IMPORTED_MODULE_0__.protocols)(headProtoCode).name];\n if (interpreter === undefined) {\n throw new Error(`Can't interpret protocol ${(0,_multiformats_multiaddr__WEBPACK_IMPORTED_MODULE_0__.protocols)(headProtoCode).name}`);\n }\n const restVal = interpreter(headProtoVal, restMa);\n if (headProtoCode === (0,_multiformats_multiaddr__WEBPACK_IMPORTED_MODULE_0__.protocols)('ip6').code) {\n return `[${restVal}]`;\n }\n return restVal;\n}\nconst interpreters = {\n ip4: (value, restMa) => value,\n ip6: (value, restMa) => {\n if (restMa.length === 0) {\n return value;\n }\n return `[${value}]`;\n },\n tcp: (value, restMa) => {\n const tailProto = restMa.pop();\n if (tailProto === undefined) {\n throw new Error('Unexpected end of multiaddr');\n }\n return `tcp://${interpretNext(tailProto[0], tailProto[1] ?? '', restMa)}:${value}`;\n },\n udp: (value, restMa) => {\n const tailProto = restMa.pop();\n if (tailProto === undefined) {\n throw new Error('Unexpected end of multiaddr');\n }\n return `udp://${interpretNext(tailProto[0], tailProto[1] ?? '', restMa)}:${value}`;\n },\n dnsaddr: (value, restMa) => value,\n dns4: (value, restMa) => value,\n dns6: (value, restMa) => value,\n dns: (value, restMa) => value,\n ipfs: (value, restMa) => {\n const tailProto = restMa.pop();\n if (tailProto === undefined) {\n throw new Error('Unexpected end of multiaddr');\n }\n return `${interpretNext(tailProto[0], tailProto[1] ?? '', restMa)}/ipfs/${value}`;\n },\n p2p: (value, restMa) => {\n const tailProto = restMa.pop();\n if (tailProto === undefined) {\n throw new Error('Unexpected end of multiaddr');\n }\n return `${interpretNext(tailProto[0], tailProto[1] ?? '', restMa)}/p2p/${value}`;\n },\n http: (value, restMa) => {\n const maHasTLS = hasTLS(restMa);\n const sni = extractSNI(restMa);\n if (maHasTLS && sni !== null) {\n return `https://${sni}`;\n }\n const protocol = maHasTLS ? 'https://' : 'http://';\n const tailProto = restMa.pop();\n if (tailProto === undefined) {\n throw new Error('Unexpected end of multiaddr');\n }\n let baseVal = interpretNext(tailProto[0], tailProto[1] ?? '', restMa);\n // We are reinterpreting the base as http, so we need to remove the tcp:// if it's there\n baseVal = baseVal.replace('tcp://', '');\n return `${protocol}${baseVal}`;\n },\n tls: (value, restMa) => {\n // Noop, the parent context knows that it's tls. We don't need to do\n // anything here\n const tailProto = restMa.pop();\n if (tailProto === undefined) {\n throw new Error('Unexpected end of multiaddr');\n }\n return
/***/ }),
/***/ "./node_modules/@multiformats/multiaddr/dist/src/codec.js":
/*!****************************************************************!*\
!*** ./node_modules/@multiformats/multiaddr/dist/src/codec.js ***!
\****************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ParseError: () => (/* binding */ ParseError),\n/* harmony export */ bytesToString: () => (/* binding */ bytesToString),\n/* harmony export */ bytesToTuples: () => (/* binding */ bytesToTuples),\n/* harmony export */ cleanPath: () => (/* binding */ cleanPath),\n/* harmony export */ fromBytes: () => (/* binding */ fromBytes),\n/* harmony export */ fromString: () => (/* binding */ fromString),\n/* harmony export */ isValidBytes: () => (/* binding */ isValidBytes),\n/* harmony export */ protoFromTuple: () => (/* binding */ protoFromTuple),\n/* harmony export */ sizeForAddr: () => (/* binding */ sizeForAddr),\n/* harmony export */ stringToBytes: () => (/* binding */ stringToBytes),\n/* harmony export */ stringToStringTuples: () => (/* binding */ stringToStringTuples),\n/* harmony export */ stringTuplesToString: () => (/* binding */ stringTuplesToString),\n/* harmony export */ stringTuplesToTuples: () => (/* binding */ stringTuplesToTuples),\n/* harmony export */ tuplesToBytes: () => (/* binding */ tuplesToBytes),\n/* harmony export */ tuplesToStringTuples: () => (/* binding */ tuplesToStringTuples),\n/* harmony export */ validateBytes: () => (/* binding */ validateBytes)\n/* harmony export */ });\n/* harmony import */ var uint8arrays_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! uint8arrays/concat */ \"./node_modules/uint8arrays/dist/src/concat.js\");\n/* harmony import */ var uint8arrays_to_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! uint8arrays/to-string */ \"./node_modules/uint8arrays/dist/src/to-string.js\");\n/* harmony import */ var varint__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! varint */ \"./node_modules/varint/index.js\");\n/* harmony import */ var _convert_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./convert.js */ \"./node_modules/@multiformats/multiaddr/dist/src/convert.js\");\n/* harmony import */ var _protocols_table_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./protocols-table.js */ \"./node_modules/@multiformats/multiaddr/dist/src/protocols-table.js\");\n\n\n\n\n\n/**\n * string -> [[str name, str addr]... ]\n */\nfunction stringToStringTuples(str) {\n const tuples = [];\n const parts = str.split('/').slice(1); // skip first empty elem\n if (parts.length === 1 && parts[0] === '') {\n return [];\n }\n for (let p = 0; p < parts.length; p++) {\n const part = parts[p];\n const proto = (0,_protocols_table_js__WEBPACK_IMPORTED_MODULE_4__.getProtocol)(part);\n if (proto.size === 0) {\n tuples.push([part]);\n // eslint-disable-next-line no-continue\n continue;\n }\n p++; // advance addr part\n if (p >= parts.length) {\n throw ParseError('invalid address: ' + str);\n }\n // if it's a path proto, take the rest\n if (proto.path === true) {\n tuples.push([\n part,\n // should we need to check each path part to see if it's a proto?\n // This would allow for other protocols to be added after a unix path,\n // however it would have issues if the path had a protocol name in the path\n cleanPath(parts.slice(p).join('/'))\n ]);\n break;\n }\n tuples.push([part, parts[p]]);\n }\n return tuples;\n}\n/**\n * [[str name, str addr]... ] -> string\n */\nfunction stringTuplesToString(tuples) {\n const parts = [];\n tuples.map((tup) => {\n const proto = protoFromTuple(tup);\n parts.push(proto.name);\n if (tup.length > 1 && tup[1] != null) {\n parts.push(tup[1]);\n }\n return null;\n });\n return cleanPath(parts.join('/'));\n}\n/**\n * [[str name, str addr]... ] -> [[int code, Uint8Array]... ]\n */\nfunction stringTuplesToTuples(tuples) {\n return tuples.map((tup) => {\n if
/***/ }),
/***/ "./node_modules/@multiformats/multiaddr/dist/src/convert.js":
/*!******************************************************************!*\
!*** ./node_modules/@multiformats/multiaddr/dist/src/convert.js ***!
\******************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ convert: () => (/* binding */ convert),\n/* harmony export */ convertToBytes: () => (/* binding */ convertToBytes),\n/* harmony export */ convertToIpNet: () => (/* binding */ convertToIpNet),\n/* harmony export */ convertToString: () => (/* binding */ convertToString)\n/* harmony export */ });\n/* harmony import */ var _chainsafe_netmask__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @chainsafe/netmask */ \"./node_modules/@chainsafe/netmask/dist/src/index.js\");\n/* harmony import */ var multiformats_bases_base32__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! multiformats/bases/base32 */ \"./node_modules/multiformats/src/bases/base32.js\");\n/* harmony import */ var multiformats_bases_base58__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! multiformats/bases/base58 */ \"./node_modules/multiformats/src/bases/base58.js\");\n/* harmony import */ var multiformats_basics__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! multiformats/basics */ \"./node_modules/multiformats/src/basics.js\");\n/* harmony import */ var multiformats_cid__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! multiformats/cid */ \"./node_modules/multiformats/src/cid.js\");\n/* harmony import */ var multiformats_hashes_digest__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! multiformats/hashes/digest */ \"./node_modules/multiformats/src/hashes/digest.js\");\n/* harmony import */ var uint8arrays_concat__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! uint8arrays/concat */ \"./node_modules/uint8arrays/dist/src/concat.js\");\n/* harmony import */ var uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! uint8arrays/from-string */ \"./node_modules/uint8arrays/dist/src/from-string.js\");\n/* harmony import */ var uint8arrays_to_string__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! uint8arrays/to-string */ \"./node_modules/uint8arrays/dist/src/to-string.js\");\n/* harmony import */ var varint__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! varint */ \"./node_modules/varint/index.js\");\n/* harmony import */ var _ip_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./ip.js */ \"./node_modules/@multiformats/multiaddr/dist/src/ip.js\");\n/* harmony import */ var _protocols_table_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./protocols-table.js */ \"./node_modules/@multiformats/multiaddr/dist/src/protocols-table.js\");\n/**\n * @packageDocumentation\n *\n * Provides methods for converting\n */\n\n\n\n\n\n\n\n\n\n\n\n\nconst ip4Protocol = (0,_protocols_table_js__WEBPACK_IMPORTED_MODULE_11__.getProtocol)('ip4');\nconst ip6Protocol = (0,_protocols_table_js__WEBPACK_IMPORTED_MODULE_11__.getProtocol)('ip6');\nconst ipcidrProtocol = (0,_protocols_table_js__WEBPACK_IMPORTED_MODULE_11__.getProtocol)('ipcidr');\nfunction convert(proto, a) {\n if (a instanceof Uint8Array) {\n return convertToString(proto, a);\n }\n else {\n return convertToBytes(proto, a);\n }\n}\n/**\n * Convert [code,Uint8Array] to string\n */\nfunction convertToString(proto, buf) {\n const protocol = (0,_protocols_table_js__WEBPACK_IMPORTED_MODULE_11__.getProtocol)(proto);\n switch (protocol.code) {\n case 4: // ipv4\n case 41: // ipv6\n return bytes2ip(buf);\n case 42: // ipv6zone\n return bytes2str(buf);\n case 6: // tcp\n case 273: // udp\n case 33: // dccp\n case 132: // sctp\n return bytes2port(buf).toString();\n case 53: // dns\n case 54: // dns4\n case 55: // dns6\n case 56: // dnsaddr\n case 400: // unix\n case 449: // sni\n case 777: // memory\n return bytes2str(buf);\n case 421: // ipfs\n return bytes2mh(buf);\n case 444: // onion\n return bytes2onion(buf);\n case 445: // onion3\n return bytes2onion(buf);\n case 46
/***/ }),
/***/ "./node_modules/@multiformats/multiaddr/dist/src/filter/multiaddr-filter.js":
/*!**********************************************************************************!*\
!*** ./node_modules/@multiformats/multiaddr/dist/src/filter/multiaddr-filter.js ***!
\**********************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ MultiaddrFilter: () => (/* binding */ MultiaddrFilter)\n/* harmony export */ });\n/* harmony import */ var _convert_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../convert.js */ \"./node_modules/@multiformats/multiaddr/dist/src/convert.js\");\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../index.js */ \"./node_modules/@multiformats/multiaddr/dist/src/index.js\");\n\n\n/**\n * A utility class to determine if a Multiaddr contains another\n * multiaddr.\n *\n * This can be used with ipcidr ranges to determine if a given\n * multiaddr is in a ipcidr range.\n *\n * @example\n *\n * ```js\n * import { multiaddr, MultiaddrFilter } from '@multiformats/multiaddr'\n *\n * const range = multiaddr('/ip4/192.168.10.10/ipcidr/24')\n * const filter = new MultiaddrFilter(range)\n *\n * const input = multiaddr('/ip4/192.168.10.2/udp/60')\n * console.info(filter.contains(input)) // true\n * ```\n */\nclass MultiaddrFilter {\n multiaddr;\n netmask;\n constructor(input) {\n this.multiaddr = (0,_index_js__WEBPACK_IMPORTED_MODULE_1__.multiaddr)(input);\n this.netmask = (0,_convert_js__WEBPACK_IMPORTED_MODULE_0__.convertToIpNet)(this.multiaddr);\n }\n contains(input) {\n if (input == null)\n return false;\n const m = (0,_index_js__WEBPACK_IMPORTED_MODULE_1__.multiaddr)(input);\n let ip;\n for (const [code, value] of m.stringTuples()) {\n if (code === 4 || code === 41) {\n ip = value;\n break;\n }\n }\n if (ip === undefined)\n return false;\n return this.netmask.contains(ip);\n }\n}\n//# sourceMappingURL=multiaddr-filter.js.map\n\n//# sourceURL=webpack://light/./node_modules/@multiformats/multiaddr/dist/src/filter/multiaddr-filter.js?");
/***/ }),
/***/ "./node_modules/@multiformats/multiaddr/dist/src/index.js":
/*!****************************************************************!*\
!*** ./node_modules/@multiformats/multiaddr/dist/src/index.js ***!
\****************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ MultiaddrFilter: () => (/* reexport safe */ _filter_multiaddr_filter_js__WEBPACK_IMPORTED_MODULE_8__.MultiaddrFilter),\n/* harmony export */ fromNodeAddress: () => (/* binding */ fromNodeAddress),\n/* harmony export */ isMultiaddr: () => (/* binding */ isMultiaddr),\n/* harmony export */ isName: () => (/* binding */ isName),\n/* harmony export */ multiaddr: () => (/* binding */ multiaddr),\n/* harmony export */ protocols: () => (/* reexport safe */ _protocols_table_js__WEBPACK_IMPORTED_MODULE_7__.getProtocol),\n/* harmony export */ resolvers: () => (/* binding */ resolvers)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n/* harmony import */ var multiformats_bases_base58__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! multiformats/bases/base58 */ \"./node_modules/multiformats/src/bases/base58.js\");\n/* harmony import */ var multiformats_cid__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! multiformats/cid */ \"./node_modules/multiformats/src/cid.js\");\n/* harmony import */ var uint8arrays_equals__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! uint8arrays/equals */ \"./node_modules/uint8arrays/dist/src/equals.js\");\n/* harmony import */ var uint8arrays_to_string__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! uint8arrays/to-string */ \"./node_modules/uint8arrays/dist/src/to-string.js\");\n/* harmony import */ var varint__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! varint */ \"./node_modules/varint/index.js\");\n/* harmony import */ var _codec_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./codec.js */ \"./node_modules/@multiformats/multiaddr/dist/src/codec.js\");\n/* harmony import */ var _protocols_table_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./protocols-table.js */ \"./node_modules/@multiformats/multiaddr/dist/src/protocols-table.js\");\n/* harmony import */ var _filter_multiaddr_filter_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./filter/multiaddr-filter.js */ \"./node_modules/@multiformats/multiaddr/dist/src/filter/multiaddr-filter.js\");\n/**\n * @packageDocumentation\n *\n * An implementation of a Multiaddr in JavaScript\n *\n * @example\n *\n * ```js\n * import { multiaddr } from '@multiformats/multiaddr'\n *\n * const ma = multiaddr('/ip4/127.0.0.1/tcp/1234')\n * ```\n */\n\n\n\n\n\n\n\n\nconst inspect = Symbol.for('nodejs.util.inspect.custom');\nconst DNS_CODES = [\n (0,_protocols_table_js__WEBPACK_IMPORTED_MODULE_7__.getProtocol)('dns').code,\n (0,_protocols_table_js__WEBPACK_IMPORTED_MODULE_7__.getProtocol)('dns4').code,\n (0,_protocols_table_js__WEBPACK_IMPORTED_MODULE_7__.getProtocol)('dns6').code,\n (0,_protocols_table_js__WEBPACK_IMPORTED_MODULE_7__.getProtocol)('dnsaddr').code\n];\n/**\n * All configured {@link Resolver}s\n */\nconst resolvers = new Map();\nconst symbol = Symbol.for('@multiformats/js-multiaddr/multiaddr');\n\n/**\n * Creates a Multiaddr from a node-friendly address object\n *\n * @example\n * ```js\n * import { fromNodeAddress } from '@multiformats/multiaddr'\n *\n * fromNodeAddress({address: '127.0.0.1', port: '4001'}, 'tcp')\n * // Multiaddr(/ip4/127.0.0.1/tcp/4001)\n * ```\n */\nfunction fromNodeAddress(addr, transport) {\n if (addr == null) {\n throw new Error('requires node address object');\n }\n if (transport == null) {\n throw new Error('requires transport protocol');\n }\n let ip;\n let host = addr.address;\n switch (addr.family) {\n case 4:\n ip = 'ip4';\n break;\n case 6:\n ip = 'ip6';\n if (host.includes('%')) {\n const parts = host.split('%');\n if (parts.length !== 2) {\n throw Error('Multiple ip6 zones in multiaddr');\
/***/ }),
/***/ "./node_modules/@multiformats/multiaddr/dist/src/ip.js":
/*!*************************************************************!*\
!*** ./node_modules/@multiformats/multiaddr/dist/src/ip.js ***!
\*************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ isIP: () => (/* reexport safe */ _chainsafe_is_ip__WEBPACK_IMPORTED_MODULE_0__.isIP),\n/* harmony export */ isV4: () => (/* binding */ isV4),\n/* harmony export */ isV6: () => (/* binding */ isV6),\n/* harmony export */ toBytes: () => (/* binding */ toBytes),\n/* harmony export */ toString: () => (/* binding */ toString)\n/* harmony export */ });\n/* harmony import */ var _chainsafe_is_ip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @chainsafe/is-ip */ \"./node_modules/@chainsafe/is-ip/lib/is-ip.js\");\n/* harmony import */ var uint8arrays_to_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! uint8arrays/to-string */ \"./node_modules/uint8arrays/dist/src/to-string.js\");\n\n\n\nconst isV4 = _chainsafe_is_ip__WEBPACK_IMPORTED_MODULE_0__.isIPv4;\nconst isV6 = _chainsafe_is_ip__WEBPACK_IMPORTED_MODULE_0__.isIPv6;\n// Copied from https://github.com/indutny/node-ip/blob/master/lib/ip.js#L7\n// but with buf/offset args removed because we don't use them\nconst toBytes = function (ip) {\n let offset = 0;\n ip = ip.toString().trim();\n if (isV4(ip)) {\n const bytes = new Uint8Array(offset + 4);\n ip.split(/\\./g).forEach((byte) => {\n bytes[offset++] = parseInt(byte, 10) & 0xff;\n });\n return bytes;\n }\n if (isV6(ip)) {\n const sections = ip.split(':', 8);\n let i;\n for (i = 0; i < sections.length; i++) {\n const isv4 = isV4(sections[i]);\n let v4Buffer;\n if (isv4) {\n v4Buffer = toBytes(sections[i]);\n sections[i] = (0,uint8arrays_to_string__WEBPACK_IMPORTED_MODULE_1__.toString)(v4Buffer.slice(0, 2), 'base16');\n }\n if (v4Buffer != null && ++i < 8) {\n sections.splice(i, 0, (0,uint8arrays_to_string__WEBPACK_IMPORTED_MODULE_1__.toString)(v4Buffer.slice(2, 4), 'base16'));\n }\n }\n if (sections[0] === '') {\n while (sections.length < 8)\n sections.unshift('0');\n }\n else if (sections[sections.length - 1] === '') {\n while (sections.length < 8)\n sections.push('0');\n }\n else if (sections.length < 8) {\n for (i = 0; i < sections.length && sections[i] !== ''; i++)\n ;\n const argv = [i, 1];\n for (i = 9 - sections.length; i > 0; i--) {\n argv.push('0');\n }\n sections.splice.apply(sections, argv);\n }\n const bytes = new Uint8Array(offset + 16);\n for (i = 0; i < sections.length; i++) {\n const word = parseInt(sections[i], 16);\n bytes[offset++] = (word >> 8) & 0xff;\n bytes[offset++] = word & 0xff;\n }\n return bytes;\n }\n throw new Error('invalid ip address');\n};\n// Copied from https://github.com/indutny/node-ip/blob/master/lib/ip.js#L63\nconst toString = function (buf, offset = 0, length) {\n offset = ~~offset;\n length = length ?? (buf.length - offset);\n const view = new DataView(buf.buffer);\n if (length === 4) {\n const result = [];\n // IPv4\n for (let i = 0; i < length; i++) {\n result.push(buf[offset + i]);\n }\n return result.join('.');\n }\n if (length === 16) {\n const result = [];\n // IPv6\n for (let i = 0; i < length; i += 2) {\n result.push(view.getUint16(offset + i).toString(16));\n }\n return result.join(':')\n .replace(/(^|:)0(:0)*:0(:|$)/, '$1::$3')\n .replace(/:{3,4}/, '::');\n }\n return '';\n};\n//# sourceMappingURL=ip.js.map\n\n//# sourceURL=webpack://light/./node_modules/@multiformats/multiaddr/dist/src/ip.js?");
/***/ }),
/***/ "./node_modules/@multiformats/multiaddr/dist/src/protocols-table.js":
/*!**************************************************************************!*\
!*** ./node_modules/@multiformats/multiaddr/dist/src/protocols-table.js ***!
\**************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ codes: () => (/* binding */ codes),\n/* harmony export */ createProtocol: () => (/* binding */ createProtocol),\n/* harmony export */ getProtocol: () => (/* binding */ getProtocol),\n/* harmony export */ names: () => (/* binding */ names),\n/* harmony export */ table: () => (/* binding */ table)\n/* harmony export */ });\nconst V = -1;\nconst names = {};\nconst codes = {};\nconst table = [\n [4, 32, 'ip4'],\n [6, 16, 'tcp'],\n [33, 16, 'dccp'],\n [41, 128, 'ip6'],\n [42, V, 'ip6zone'],\n [43, 8, 'ipcidr'],\n [53, V, 'dns', true],\n [54, V, 'dns4', true],\n [55, V, 'dns6', true],\n [56, V, 'dnsaddr', true],\n [132, 16, 'sctp'],\n [273, 16, 'udp'],\n [275, 0, 'p2p-webrtc-star'],\n [276, 0, 'p2p-webrtc-direct'],\n [277, 0, 'p2p-stardust'],\n [280, 0, 'webrtc-direct'],\n [281, 0, 'webrtc'],\n [290, 0, 'p2p-circuit'],\n [301, 0, 'udt'],\n [302, 0, 'utp'],\n [400, V, 'unix', false, true],\n // `ipfs` is added before `p2p` for legacy support.\n // All text representations will default to `p2p`, but `ipfs` will\n // still be supported\n [421, V, 'ipfs'],\n // `p2p` is the preferred name for 421, and is now the default\n [421, V, 'p2p'],\n [443, 0, 'https'],\n [444, 96, 'onion'],\n [445, 296, 'onion3'],\n [446, V, 'garlic64'],\n [448, 0, 'tls'],\n [449, V, 'sni'],\n [460, 0, 'quic'],\n [461, 0, 'quic-v1'],\n [465, 0, 'webtransport'],\n [466, V, 'certhash'],\n [477, 0, 'ws'],\n [478, 0, 'wss'],\n [479, 0, 'p2p-websocket-star'],\n [480, 0, 'http'],\n [777, V, 'memory']\n];\n// populate tables\ntable.forEach(row => {\n const proto = createProtocol(...row);\n codes[proto.code] = proto;\n names[proto.name] = proto;\n});\nfunction createProtocol(code, size, name, resolvable, path) {\n return {\n code,\n size,\n name,\n resolvable: Boolean(resolvable),\n path: Boolean(path)\n };\n}\n/**\n * For the passed proto string or number, return a {@link Protocol}\n *\n * @example\n *\n * ```js\n * import { protocol } from '@multiformats/multiaddr'\n *\n * console.info(protocol(4))\n * // { code: 4, size: 32, name: 'ip4', resolvable: false, path: false }\n * ```\n */\nfunction getProtocol(proto) {\n if (typeof proto === 'number') {\n if (codes[proto] != null) {\n return codes[proto];\n }\n throw new Error(`no protocol with code: ${proto}`);\n }\n else if (typeof proto === 'string') {\n if (names[proto] != null) {\n return names[proto];\n }\n throw new Error(`no protocol with name: ${proto}`);\n }\n throw new Error(`invalid protocol id type: ${typeof proto}`);\n}\n//# sourceMappingURL=protocols-table.js.map\n\n//# sourceURL=webpack://light/./node_modules/@multiformats/multiaddr/dist/src/protocols-table.js?");
/***/ }),
/***/ "./node_modules/@multiformats/multiaddr/dist/src/resolvers/dns.browser.js":
/*!********************************************************************************!*\
!*** ./node_modules/@multiformats/multiaddr/dist/src/resolvers/dns.browser.js ***!
\********************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var dns_over_http_resolver__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! dns-over-http-resolver */ \"./node_modules/dns-over-http-resolver/dist/src/index.js\");\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (dns_over_http_resolver__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n//# sourceMappingURL=dns.browser.js.map\n\n//# sourceURL=webpack://light/./node_modules/@multiformats/multiaddr/dist/src/resolvers/dns.browser.js?");
/***/ }),
/***/ "./node_modules/@multiformats/multiaddr/dist/src/resolvers/index.js":
/*!**************************************************************************!*\
!*** ./node_modules/@multiformats/multiaddr/dist/src/resolvers/index.js ***!
\**************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ dnsaddrResolver: () => (/* binding */ dnsaddrResolver)\n/* harmony export */ });\n/* harmony import */ var _protocols_table_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../protocols-table.js */ \"./node_modules/@multiformats/multiaddr/dist/src/protocols-table.js\");\n/* harmony import */ var _dns_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./dns.js */ \"./node_modules/@multiformats/multiaddr/dist/src/resolvers/dns.browser.js\");\n/**\n * @packageDocumentation\n *\n * Provides strategies for resolving multiaddrs.\n */\n\n\nconst { code: dnsaddrCode } = (0,_protocols_table_js__WEBPACK_IMPORTED_MODULE_0__.getProtocol)('dnsaddr');\n/**\n * Resolver for dnsaddr addresses.\n *\n * @example\n *\n * ```typescript\n * import { dnsaddrResolver } from '@multiformats/multiaddr/resolvers'\n * import { multiaddr } from '@multiformats/multiaddr'\n *\n * const ma = multiaddr('/dnsaddr/bootstrap.libp2p.io')\n * const addresses = await dnsaddrResolver(ma)\n *\n * console.info(addresses)\n * //[\n * // '/dnsaddr/am6.bootstrap.libp2p.io/p2p/QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb',\n * // '/dnsaddr/ny5.bootstrap.libp2p.io/p2p/QmQCU2EcMqAqQPR2i9bChDtGNJchTbq5TbXJJ16u19uLTa',\n * // '/dnsaddr/sg1.bootstrap.libp2p.io/p2p/QmcZf59bWwK5XFi76CZX8cbJ4BhTzzA3gU1ZjYZcYW3dwt',\n * // '/dnsaddr/sv15.bootstrap.libp2p.io/p2p/QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJN'\n * //]\n * ```\n */\nasync function dnsaddrResolver(addr, options = {}) {\n const resolver = new _dns_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]();\n if (options.signal != null) {\n options.signal.addEventListener('abort', () => {\n resolver.cancel();\n });\n }\n const peerId = addr.getPeerId();\n const [, hostname] = addr.stringTuples().find(([proto]) => proto === dnsaddrCode) ?? [];\n if (hostname == null) {\n throw new Error('No hostname found in multiaddr');\n }\n const records = await resolver.resolveTxt(`_dnsaddr.${hostname}`);\n let addresses = records.flat().map((a) => a.split('=')[1]).filter(Boolean);\n if (peerId != null) {\n addresses = addresses.filter((entry) => entry.includes(peerId));\n }\n return addresses;\n}\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/@multiformats/multiaddr/dist/src/resolvers/index.js?");
/***/ }),
/***/ "./node_modules/@noble/ciphers/esm/_assert.js":
/*!****************************************************!*\
!*** ./node_modules/@noble/ciphers/esm/_assert.js ***!
\****************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ bool: () => (/* binding */ bool),\n/* harmony export */ bytes: () => (/* binding */ bytes),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */ exists: () => (/* binding */ exists),\n/* harmony export */ hash: () => (/* binding */ hash),\n/* harmony export */ number: () => (/* binding */ number),\n/* harmony export */ output: () => (/* binding */ output)\n/* harmony export */ });\nfunction number(n) {\n if (!Number.isSafeInteger(n) || n < 0)\n throw new Error(`Wrong positive integer: ${n}`);\n}\nfunction bool(b) {\n if (typeof b !== 'boolean')\n throw new Error(`Expected boolean, not ${b}`);\n}\nfunction bytes(b, ...lengths) {\n if (!(b instanceof Uint8Array))\n throw new Error('Expected Uint8Array');\n if (lengths.length > 0 && !lengths.includes(b.length))\n throw new Error(`Expected Uint8Array of length ${lengths}, not of length=${b.length}`);\n}\nfunction hash(hash) {\n if (typeof hash !== 'function' || typeof hash.create !== 'function')\n throw new Error('Hash should be wrapped by utils.wrapConstructor');\n number(hash.outputLen);\n number(hash.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}\n\nconst assert = { number, bool, bytes, hash, exists, output };\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (assert);\n//# sourceMappingURL=_assert.js.map\n\n//# sourceURL=webpack://light/./node_modules/@noble/ciphers/esm/_assert.js?");
/***/ }),
/***/ "./node_modules/@noble/ciphers/esm/_poly1305.js":
/*!******************************************************!*\
!*** ./node_modules/@noble/ciphers/esm/_poly1305.js ***!
\******************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ poly1305: () => (/* binding */ poly1305),\n/* harmony export */ wrapConstructorWithKey: () => (/* binding */ wrapConstructorWithKey)\n/* harmony export */ });\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils.js */ \"./node_modules/@noble/ciphers/esm/utils.js\");\n/* harmony import */ var _assert_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_assert.js */ \"./node_modules/@noble/ciphers/esm/_assert.js\");\n\n\n// Poly1305 is a fast and parallel secret-key message-authentication code.\n// https://cr.yp.to/mac.html, https://cr.yp.to/mac/poly1305-20050329.pdf\n// https://datatracker.ietf.org/doc/html/rfc8439\n// Based on Public Domain poly1305-donna https://github.com/floodyberry/poly1305-donna\nconst u8to16 = (a, i) => (a[i++] & 0xff) | ((a[i++] & 0xff) << 8);\nclass Poly1305 {\n constructor(key) {\n this.blockLen = 16;\n this.outputLen = 16;\n this.buffer = new Uint8Array(16);\n this.r = new Uint16Array(10);\n this.h = new Uint16Array(10);\n this.pad = new Uint16Array(8);\n this.pos = 0;\n this.finished = false;\n key = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.toBytes)(key);\n (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.ensureBytes)(key, 32);\n const t0 = u8to16(key, 0);\n const t1 = u8to16(key, 2);\n const t2 = u8to16(key, 4);\n const t3 = u8to16(key, 6);\n const t4 = u8to16(key, 8);\n const t5 = u8to16(key, 10);\n const t6 = u8to16(key, 12);\n const t7 = u8to16(key, 14);\n // https://github.com/floodyberry/poly1305-donna/blob/e6ad6e091d30d7f4ec2d4f978be1fcfcbce72781/poly1305-donna-16.h#L47\n this.r[0] = t0 & 0x1fff;\n this.r[1] = ((t0 >>> 13) | (t1 << 3)) & 0x1fff;\n this.r[2] = ((t1 >>> 10) | (t2 << 6)) & 0x1f03;\n this.r[3] = ((t2 >>> 7) | (t3 << 9)) & 0x1fff;\n this.r[4] = ((t3 >>> 4) | (t4 << 12)) & 0x00ff;\n this.r[5] = (t4 >>> 1) & 0x1ffe;\n this.r[6] = ((t4 >>> 14) | (t5 << 2)) & 0x1fff;\n this.r[7] = ((t5 >>> 11) | (t6 << 5)) & 0x1f81;\n this.r[8] = ((t6 >>> 8) | (t7 << 8)) & 0x1fff;\n this.r[9] = (t7 >>> 5) & 0x007f;\n for (let i = 0; i < 8; i++)\n this.pad[i] = u8to16(key, 16 + 2 * i);\n }\n process(data, offset, isLast = false) {\n const hibit = isLast ? 0 : 1 << 11;\n const { h, r } = this;\n const r0 = r[0];\n const r1 = r[1];\n const r2 = r[2];\n const r3 = r[3];\n const r4 = r[4];\n const r5 = r[5];\n const r6 = r[6];\n const r7 = r[7];\n const r8 = r[8];\n const r9 = r[9];\n const t0 = u8to16(data, offset + 0);\n const t1 = u8to16(data, offset + 2);\n const t2 = u8to16(data, offset + 4);\n const t3 = u8to16(data, offset + 6);\n const t4 = u8to16(data, offset + 8);\n const t5 = u8to16(data, offset + 10);\n const t6 = u8to16(data, offset + 12);\n const t7 = u8to16(data, offset + 14);\n let h0 = h[0] + (t0 & 0x1fff);\n let h1 = h[1] + (((t0 >>> 13) | (t1 << 3)) & 0x1fff);\n let h2 = h[2] + (((t1 >>> 10) | (t2 << 6)) & 0x1fff);\n let h3 = h[3] + (((t2 >>> 7) | (t3 << 9)) & 0x1fff);\n let h4 = h[4] + (((t3 >>> 4) | (t4 << 12)) & 0x1fff);\n let h5 = h[5] + ((t4 >>> 1) & 0x1fff);\n let h6 = h[6] + (((t4 >>> 14) | (t5 << 2)) & 0x1fff);\n let h7 = h[7] + (((t5 >>> 11) | (t6 << 5)) & 0x1fff);\n let h8 = h[8] + (((t6 >>> 8) | (t7 << 8)) & 0x1fff);\n let h9 = h[9] + ((t7 >>> 5) | hibit);\n let c = 0;\n let d0 = c + h0 * r0 + h1 * (5 * r9) + h2 * (5 * r8) + h3 * (5 * r7) + h4 * (5 * r6);\n c = d0 >>> 13;\n d0 &= 0x1fff;\n d0 += h5 * (5 * r5) + h6 * (5 * r4) + h7 * (5 * r3) + h8 * (5 * r2) + h9 * (5 * r1);\n c += d0 >>> 13;\n d0 &= 0x1f
/***/ }),
/***/ "./node_modules/@noble/ciphers/esm/_salsa.js":
/*!***************************************************!*\
!*** ./node_modules/@noble/ciphers/esm/_salsa.js ***!
\***************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ salsaBasic: () => (/* binding */ salsaBasic)\n/* harmony export */ });\n/* harmony import */ var _assert_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_assert.js */ \"./node_modules/@noble/ciphers/esm/_assert.js\");\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils.js */ \"./node_modules/@noble/ciphers/esm/utils.js\");\n// Basic utils for salsa-like ciphers\n// Check out _micro.ts for descriptive documentation.\n\n\n/*\nRFC8439 requires multi-step cipher stream, where\nauthKey starts with counter: 0, actual msg with counter: 1.\n\nFor this, we need a way to re-use nonce / counter:\n\n const counter = new Uint8Array(4);\n chacha(..., counter, ...); // counter is now 1\n chacha(..., counter, ...); // counter is now 2\n\nThis is complicated:\n\n- Original papers don't allow mutating counters\n- Counter overflow is undefined: https://mailarchive.ietf.org/arch/msg/cfrg/gsOnTJzcbgG6OqD8Sc0GO5aR_tU/\n- 3rd-party library stablelib implementation uses an approach where you can provide\n nonce and counter instead of just nonce - and it will re-use it\n- We could have did something similar, but ChaCha has different counter position\n (counter | nonce), which is not composable with XChaCha, because full counter\n is (nonce16 | counter | nonce16). Stablelib doesn't support in-place counter for XChaCha.\n- We could separate nonce & counter and provide separate API for counter re-use, but\n there are different counter sizes depending on an algorithm.\n- Salsa & ChaCha also differ in structures of key / sigma:\n\n salsa: c0 | k(4) | c1 | nonce(2) | ctr(2) | c2 | k(4) | c4\n chacha: c(4) | k(8) | ctr(1) | nonce(3)\n chachaDJB: c(4) | k(8) | ctr(2) | nonce(2)\n- Creating function such as `setSalsaState(key, nonce, sigma, data)` won't work,\n because we can't re-use counter array\n- 32-bit nonce is `2 ** 32 * 64` = 256GB with 32-bit counter\n- JS does not allow UintArrays bigger than 4GB, so supporting 64-bit counters doesn't matter\n\nStructure is as following:\n\nkey=16 -> sigma16, k=key|key\nkey=32 -> sigma32, k=key\n\nnonces:\nsalsa20: 8 (8-byte counter)\nchacha20djb: 8 (8-byte counter)\nchacha20tls: 12 (4-byte counter)\nxsalsa: 24 (16 -> hsalsa, 8 -> old nonce)\nxchacha: 24 (16 -> hchacha, 8 -> old nonce)\n\nhttps://datatracker.ietf.org/doc/html/draft-irtf-cfrg-xchacha#appendix-A.2\nUse the subkey and remaining 8 byte nonce with ChaCha20 as normal\n(prefixed by 4 NUL bytes, since [RFC8439] specifies a 12-byte nonce).\n*/\nconst sigma16 = (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.utf8ToBytes)('expand 16-byte k');\nconst sigma32 = (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.utf8ToBytes)('expand 32-byte k');\nconst sigma16_32 = (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.u32)(sigma16);\nconst sigma32_32 = (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.u32)(sigma32);\n// Is byte array aligned to 4 byte offset (u32)?\nconst isAligned32 = (b) => !(b.byteOffset % 4);\nconst salsaBasic = (opts) => {\n const { core, rounds, counterRight, counterLen, allow128bitKeys, extendNonceFn, blockLen } = (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.checkOpts)({ rounds: 20, counterRight: false, counterLen: 8, allow128bitKeys: true, blockLen: 64 }, opts);\n _assert_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].number(counterLen);\n _assert_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].number(rounds);\n _assert_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].number(blockLen);\n _assert_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].bool(counterRight);\n _assert_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].bool(allow128bitKeys);\n const blockLen32 = blockLen / 4;\n if (blockLen % 4 !== 0)\n throw new Error('Salsa/ChaCha: blockLen should be aligned to 4 bytes');\n return (key, nonce, data, output, counter = 0) => {\n _assert_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].bytes(key);\n
/***/ }),
/***/ "./node_modules/@noble/ciphers/esm/chacha.js":
/*!***************************************************!*\
!*** ./node_modules/@noble/ciphers/esm/chacha.js ***!
\***************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ _poly1305_aead: () => (/* binding */ _poly1305_aead),\n/* harmony export */ chacha12: () => (/* binding */ chacha12),\n/* harmony export */ chacha20: () => (/* binding */ chacha20),\n/* harmony export */ chacha20_poly1305: () => (/* binding */ chacha20_poly1305),\n/* harmony export */ chacha20orig: () => (/* binding */ chacha20orig),\n/* harmony export */ chacha8: () => (/* binding */ chacha8),\n/* harmony export */ hchacha: () => (/* binding */ hchacha),\n/* harmony export */ xchacha20: () => (/* binding */ xchacha20),\n/* harmony export */ xchacha20_poly1305: () => (/* binding */ xchacha20_poly1305)\n/* harmony export */ });\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils.js */ \"./node_modules/@noble/ciphers/esm/utils.js\");\n/* harmony import */ var _poly1305_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_poly1305.js */ \"./node_modules/@noble/ciphers/esm/_poly1305.js\");\n/* harmony import */ var _salsa_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_salsa.js */ \"./node_modules/@noble/ciphers/esm/_salsa.js\");\n\n\n\n// ChaCha20 stream cipher was released in 2008. ChaCha aims to increase\n// the diffusion per round, but had slightly less cryptanalysis.\n// https://cr.yp.to/chacha.html, http://cr.yp.to/chacha/chacha-20080128.pdf\n// Left rotate for uint32\nconst rotl = (a, b) => (a << b) | (a >>> (32 - b));\n/**\n * ChaCha core function.\n */\n// prettier-ignore\nfunction chachaCore(c, k, n, out, cnt, rounds = 20) {\n let y00 = c[0], y01 = c[1], y02 = c[2], y03 = c[3]; // \"expa\" \"nd 3\" \"2-by\" \"te k\"\n let y04 = k[0], y05 = k[1], y06 = k[2], y07 = k[3]; // Key Key Key Key\n let y08 = k[4], y09 = k[5], y10 = k[6], y11 = k[7]; // Key Key Key Key\n let y12 = cnt, y13 = n[0], y14 = n[1], y15 = n[2]; // Counter Counter\tNonce Nonce\n // Save state to temporary variables\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\n for (let i = 0; i < rounds; i += 2) {\n x00 = (x00 + x04) | 0;\n x12 = rotl(x12 ^ x00, 16);\n x08 = (x08 + x12) | 0;\n x04 = rotl(x04 ^ x08, 12);\n x00 = (x00 + x04) | 0;\n x12 = rotl(x12 ^ x00, 8);\n x08 = (x08 + x12) | 0;\n x04 = rotl(x04 ^ x08, 7);\n x01 = (x01 + x05) | 0;\n x13 = rotl(x13 ^ x01, 16);\n x09 = (x09 + x13) | 0;\n x05 = rotl(x05 ^ x09, 12);\n x01 = (x01 + x05) | 0;\n x13 = rotl(x13 ^ x01, 8);\n x09 = (x09 + x13) | 0;\n x05 = rotl(x05 ^ x09, 7);\n x02 = (x02 + x06) | 0;\n x14 = rotl(x14 ^ x02, 16);\n x10 = (x10 + x14) | 0;\n x06 = rotl(x06 ^ x10, 12);\n x02 = (x02 + x06) | 0;\n x14 = rotl(x14 ^ x02, 8);\n x10 = (x10 + x14) | 0;\n x06 = rotl(x06 ^ x10, 7);\n x03 = (x03 + x07) | 0;\n x15 = rotl(x15 ^ x03, 16);\n x11 = (x11 + x15) | 0;\n x07 = rotl(x07 ^ x11, 12);\n x03 = (x03 + x07) | 0;\n x15 = rotl(x15 ^ x03, 8);\n x11 = (x11 + x15) | 0;\n x07 = rotl(x07 ^ x11, 7);\n x00 = (x00 + x05) | 0;\n x15 = rotl(x15 ^ x00, 16);\n x10 = (x10 + x15) | 0;\n x05 = rotl(x05 ^ x10, 12);\n x00 = (x00 + x05) | 0;\n x15 = rotl(x15 ^ x00, 8);\n x10 = (x10 + x15) | 0;\n x05 = rotl(x05 ^ x10, 7);\n x01 = (x01 + x06) | 0;\n x12 = rotl(x12 ^ x01, 16);\n x11 = (x11 + x12) | 0;\n x06 = rotl(x06 ^ x11, 12);\n x01 = (x01 + x06) | 0;\n x12 = rotl(x12 ^ x01, 8);\n x11 = (x11 + x12) | 0;\n x06 = rotl(x06 ^ x11, 7);\n x02 = (x02 + x07) | 0;\n x13 = rotl(x13 ^ x02, 16);\n x08 = (x08 + x13) | 0;\n x07 = rotl(x07 ^ x08, 12);\n
/***/ }),
/***/ "./node_modules/@noble/ciphers/esm/utils.js":
/*!**************************************************!*\
!*** ./node_modules/@noble/ciphers/esm/utils.js ***!
\**************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Hash: () => (/* binding */ Hash),\n/* harmony export */ asyncLoop: () => (/* binding */ asyncLoop),\n/* harmony export */ bytesToHex: () => (/* binding */ bytesToHex),\n/* harmony export */ bytesToUtf8: () => (/* binding */ bytesToUtf8),\n/* harmony export */ checkOpts: () => (/* binding */ checkOpts),\n/* harmony export */ concatBytes: () => (/* binding */ concatBytes),\n/* harmony export */ createView: () => (/* binding */ createView),\n/* harmony export */ ensureBytes: () => (/* binding */ ensureBytes),\n/* harmony export */ equalBytes: () => (/* binding */ equalBytes),\n/* harmony export */ hexToBytes: () => (/* binding */ hexToBytes),\n/* harmony export */ isLE: () => (/* binding */ isLE),\n/* harmony export */ nextTick: () => (/* binding */ nextTick),\n/* harmony export */ setBigUint64: () => (/* binding */ setBigUint64),\n/* harmony export */ toBytes: () => (/* binding */ toBytes),\n/* harmony export */ u16: () => (/* binding */ u16),\n/* harmony export */ u32: () => (/* binding */ u32),\n/* harmony export */ u8: () => (/* binding */ u8),\n/* harmony export */ utf8ToBytes: () => (/* binding */ utf8ToBytes)\n/* harmony export */ });\n/*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */\nconst u8a = (a) => a instanceof Uint8Array;\n// Cast array to different type\nconst u8 = (arr) => new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);\nconst u16 = (arr) => new Uint16Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 2));\nconst u32 = (arr) => new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n// Cast array to view\nconst createView = (arr) => new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n// big-endian hardware is rare. Just in case someone still decides to run ciphers:\n// early-throw an error because we don't support BE yet.\nconst isLE = new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44;\nif (!isLE)\n throw new Error('Non little-endian hardware is not supported');\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 */\nfunction bytesToHex(bytes) {\n if (!u8a(bytes))\n throw new Error('Uint8Array expected');\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/**\n * @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])\n */\nfunction hexToBytes(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n const len = hex.length;\n if (len % 2)\n throw new Error('padded hex string expected, got unpadded hex of length ' + len);\n const array = new Uint8Array(len / 2);\n for (let i = 0; i < array.length; i++) {\n const j = i * 2;\n const hexByte = hex.slice(j, j + 2);\n const byte = Number.parseInt(hexByte, 16);\n if (Number.isNaN(byte) || byte < 0)\n throw new Error('Invalid byte sequence');\n array[i] = byte;\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.\nconst nextTick = async () => { };\n// Returns control to thread each 'tick' ms to avoid blocking\nasync 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
/***/ }),
/***/ "./node_modules/@noble/curves/esm/abstract/curve.js":
/*!**********************************************************!*\
!*** ./node_modules/@noble/curves/esm/abstract/curve.js ***!
\**********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ validateBasic: () => (/* binding */ validateBasic),\n/* harmony export */ wNAF: () => (/* binding */ wNAF)\n/* harmony export */ });\n/* harmony import */ var _modular_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./modular.js */ \"./node_modules/@noble/curves/esm/abstract/modular.js\");\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils.js */ \"./node_modules/@noble/curves/esm/abstract/utils.js\");\n/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Abelian group utilities\n\n\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\nfunction 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 check
/***/ }),
/***/ "./node_modules/@noble/curves/esm/abstract/edwards.js":
/*!************************************************************!*\
!*** ./node_modules/@noble/curves/esm/abstract/edwards.js ***!
\************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ twistedEdwards: () => (/* binding */ twistedEdwards)\n/* harmony export */ });\n/* harmony import */ var _modular_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./modular.js */ \"./node_modules/@noble/curves/esm/abstract/modular.js\");\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils.js */ \"./node_modules/@noble/curves/esm/abstract/utils.js\");\n/* harmony import */ var _curve_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./curve.js */ \"./node_modules/@noble/curves/esm/abstract/curve.js\");\n/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Twisted Edwards curve. The formula is: ax² + y² = 1 + dx²y²\n\n\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), _8n = BigInt(8);\n// verification rule is either zip215 or rfc8032 / nist186-5. Consult fromHex:\nconst VERIFY_DEFAULT = { zip215: true };\nfunction validateOpts(curve) {\n const opts = (0,_curve_js__WEBPACK_IMPORTED_MODULE_2__.validateBasic)(curve);\n _utils_js__WEBPACK_IMPORTED_MODULE_1__.validateObject(curve, {\n hash: 'function',\n a: 'bigint',\n d: 'bigint',\n randomBytes: 'function',\n }, {\n adjustScalarBytes: 'function',\n domain: 'function',\n uvRatio: 'function',\n mapToCurve: 'function',\n });\n // Set defaults\n return Object.freeze({ ...opts });\n}\n// It is not generic twisted curve for now, but ed25519/ed448 generic implementation\nfunction twistedEdwards(curveDef) {\n const CURVE = validateOpts(curveDef);\n const { Fp, n: CURVE_ORDER, prehash: prehash, hash: cHash, randomBytes, nByteLength, h: cofactor, } = CURVE;\n const MASK = _2n << (BigInt(nByteLength * 8) - _1n);\n const modP = Fp.create; // Function overrides\n // sqrt(u/v)\n const uvRatio = CURVE.uvRatio ||\n ((u, v) => {\n try {\n return { isValid: true, value: Fp.sqrt(u * Fp.inv(v)) };\n }\n catch (e) {\n return { isValid: false, value: _0n };\n }\n });\n const adjustScalarBytes = CURVE.adjustScalarBytes || ((bytes) => bytes); // NOOP\n const domain = CURVE.domain ||\n ((data, ctx, phflag) => {\n if (ctx.length || phflag)\n throw new Error('Contexts/pre-hash are not supported');\n return data;\n }); // NOOP\n const inBig = (n) => typeof n === 'bigint' && _0n < n; // n in [1..]\n const inRange = (n, max) => inBig(n) && inBig(max) && n < max; // n in [1..max-1]\n const in0MaskRange = (n) => n === _0n || inRange(n, MASK); // n in [0..MASK-1]\n function assertInRange(n, max) {\n // n in [1..max-1]\n if (inRange(n, max))\n return n;\n throw new Error(`Expected valid scalar < ${max}, got ${typeof n} ${n}`);\n }\n function assertGE0(n) {\n // n in [0..CURVE_ORDER-1]\n return n === _0n ? n : assertInRange(n, CURVE_ORDER); // GE = prime subgroup, not full group\n }\n const pointPrecomputes = new Map();\n function isPoint(other) {\n if (!(other instanceof Point))\n throw new Error('ExtendedPoint expected');\n }\n // Extended Point works in extended coordinates: (x, y, z, t) ∋ (x=x/z, y=y/z, t=xy).\n // https://en.wikipedia.org/wiki/Twisted_Edwards_curve#Extended_coordinates\n class Point {\n constructor(ex, ey, ez, et) {\n this.ex = ex;\n this.ey = ey;\n this.ez = ez;\n this.et = et;\n if (!in0MaskRange(ex))\n throw new Error('x required');\n if (!in0MaskRange(ey))\n throw new Error('y required');\n if (!in0MaskRange(ez))\n throw new Error('z required');\n if (!in0MaskRange(et))\n
/***/ }),
/***/ "./node_modules/@noble/curves/esm/abstract/hash-to-curve.js":
/*!******************************************************************!*\
!*** ./node_modules/@noble/curves/esm/abstract/hash-to-curve.js ***!
\******************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ createHasher: () => (/* binding */ createHasher),\n/* harmony export */ expand_message_xmd: () => (/* binding */ expand_message_xmd),\n/* harmony export */ expand_message_xof: () => (/* binding */ expand_message_xof),\n/* harmony export */ hash_to_field: () => (/* binding */ hash_to_field),\n/* harmony export */ isogenyMap: () => (/* binding */ isogenyMap)\n/* harmony export */ });\n/* harmony import */ var _modular_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./modular.js */ \"./node_modules/@noble/curves/esm/abstract/modular.js\");\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils.js */ \"./node_modules/@noble/curves/esm/abstract/utils.js\");\n\n\nfunction validateDST(dst) {\n if (dst instanceof Uint8Array)\n return dst;\n if (typeof dst === 'string')\n return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.utf8ToBytes)(dst);\n throw new Error('DST must be Uint8Array or string');\n}\n// Octet Stream to Integer. \"spec\" implementation of os2ip is 2.5x slower vs bytesToNumberBE.\nconst os2ip = _utils_js__WEBPACK_IMPORTED_MODULE_1__.bytesToNumberBE;\n// Integer to Octet Stream (numberToBytesBE)\nfunction i2osp(value, length) {\n if (value < 0 || value >= 1 << (8 * length)) {\n throw new Error(`bad I2OSP call: value=${value} length=${length}`);\n }\n const res = Array.from({ length }).fill(0);\n for (let i = length - 1; i >= 0; i--) {\n res[i] = value & 0xff;\n value >>>= 8;\n }\n return new Uint8Array(res);\n}\nfunction strxor(a, b) {\n const arr = new Uint8Array(a.length);\n for (let i = 0; i < a.length; i++) {\n arr[i] = a[i] ^ b[i];\n }\n return arr;\n}\nfunction isBytes(item) {\n if (!(item instanceof Uint8Array))\n throw new Error('Uint8Array expected');\n}\nfunction isNum(item) {\n if (!Number.isSafeInteger(item))\n throw new Error('number expected');\n}\n// Produces a uniformly random byte string using a cryptographic hash function H that outputs b bits\n// https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-hash-to-curve-11#section-5.4.1\nfunction expand_message_xmd(msg, DST, lenInBytes, H) {\n isBytes(msg);\n isBytes(DST);\n isNum(lenInBytes);\n // https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-hash-to-curve-16#section-5.3.3\n if (DST.length > 255)\n DST = H((0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.concatBytes)((0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.utf8ToBytes)('H2C-OVERSIZE-DST-'), DST));\n const { outputLen: b_in_bytes, blockLen: r_in_bytes } = H;\n const ell = Math.ceil(lenInBytes / b_in_bytes);\n if (ell > 255)\n throw new Error('Invalid xmd length');\n const DST_prime = (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.concatBytes)(DST, i2osp(DST.length, 1));\n const Z_pad = i2osp(0, r_in_bytes);\n const l_i_b_str = i2osp(lenInBytes, 2); // len_in_bytes_str\n const b = new Array(ell);\n const b_0 = H((0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.concatBytes)(Z_pad, msg, l_i_b_str, i2osp(0, 1), DST_prime));\n b[0] = H((0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.concatBytes)(b_0, i2osp(1, 1), DST_prime));\n for (let i = 1; i <= ell; i++) {\n const args = [strxor(b_0, b[i - 1]), i2osp(i + 1, 1), DST_prime];\n b[i] = H((0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.concatBytes)(...args));\n }\n const pseudo_random_bytes = (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.concatBytes)(...b);\n return pseudo_random_bytes.slice(0, lenInBytes);\n}\nfunction expand_message_xof(msg, DST, lenInBytes, k, H) {\n isBytes(msg);\n isBytes(DST);\n isNum(lenInBytes);\n // https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-hash-to-curve-16#section-5.3.3\n // DST = H('H2C-OVERSIZE-DST-' || a_very_long_DST, Math.ceil((lenInBytes * k) / 8));\n if (DST.length > 255) {\n const dkLen = Math.ceil((2 * k) / 8);\n DST = H.create({
/***/ }),
/***/ "./node_modules/@noble/curves/esm/abstract/modular.js":
/*!************************************************************!*\
!*** ./node_modules/@noble/curves/esm/abstract/modular.js ***!
\************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Field: () => (/* binding */ Field),\n/* harmony export */ FpDiv: () => (/* binding */ FpDiv),\n/* harmony export */ FpInvertBatch: () => (/* binding */ FpInvertBatch),\n/* harmony export */ FpIsSquare: () => (/* binding */ FpIsSquare),\n/* harmony export */ FpPow: () => (/* binding */ FpPow),\n/* harmony export */ FpSqrt: () => (/* binding */ FpSqrt),\n/* harmony export */ FpSqrtEven: () => (/* binding */ FpSqrtEven),\n/* harmony export */ FpSqrtOdd: () => (/* binding */ FpSqrtOdd),\n/* harmony export */ hashToPrivateScalar: () => (/* binding */ hashToPrivateScalar),\n/* harmony export */ invert: () => (/* binding */ invert),\n/* harmony export */ isNegativeLE: () => (/* binding */ isNegativeLE),\n/* harmony export */ mod: () => (/* binding */ mod),\n/* harmony export */ nLength: () => (/* binding */ nLength),\n/* harmony export */ pow: () => (/* binding */ pow),\n/* harmony export */ pow2: () => (/* binding */ pow2),\n/* harmony export */ tonelliShanks: () => (/* binding */ tonelliShanks),\n/* harmony export */ validateField: () => (/* binding */ validateField)\n/* harmony export */ });\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils.js */ \"./node_modules/@noble/curves/esm/abstract/utils.js\");\n/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Utilities for modular arithmetics and finite fields\n\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\nfunction 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\nfunction 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)\nfunction 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\nfunction 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// Tonelli-Shanks algorithm\n// Paper 1: https://eprint.iacr.org/2012/685.pdf (page 12)\n// Paper 2: Square Roots from 1; 24, 51, 10 to Dan Shanks\nfunction 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
/***/ }),
/***/ "./node_modules/@noble/curves/esm/abstract/montgomery.js":
/*!***************************************************************!*\
!*** ./node_modules/@noble/curves/esm/abstract/montgomery.js ***!
\***************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ montgomery: () => (/* binding */ montgomery)\n/* harmony export */ });\n/* harmony import */ var _modular_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./modular.js */ \"./node_modules/@noble/curves/esm/abstract/modular.js\");\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils.js */ \"./node_modules/@noble/curves/esm/abstract/utils.js\");\n/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n\n\nconst _0n = BigInt(0);\nconst _1n = BigInt(1);\nfunction validateOpts(curve) {\n (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.validateObject)(curve, {\n a: 'bigint',\n }, {\n montgomeryBits: 'isSafeInteger',\n nByteLength: 'isSafeInteger',\n adjustScalarBytes: 'function',\n domain: 'function',\n powPminus2: 'function',\n Gu: 'bigint',\n });\n // Set defaults\n return Object.freeze({ ...curve });\n}\n// NOTE: not really montgomery curve, just bunch of very specific methods for X25519/X448 (RFC 7748, https://www.rfc-editor.org/rfc/rfc7748)\n// Uses only one coordinate instead of two\nfunction montgomery(curveDef) {\n const CURVE = validateOpts(curveDef);\n const { P } = CURVE;\n const modP = (n) => (0,_modular_js__WEBPACK_IMPORTED_MODULE_0__.mod)(n, P);\n const montgomeryBits = CURVE.montgomeryBits;\n const montgomeryBytes = Math.ceil(montgomeryBits / 8);\n const fieldLen = CURVE.nByteLength;\n const adjustScalarBytes = CURVE.adjustScalarBytes || ((bytes) => bytes);\n const powPminus2 = CURVE.powPminus2 || ((x) => (0,_modular_js__WEBPACK_IMPORTED_MODULE_0__.pow)(x, P - BigInt(2), P));\n // cswap from RFC7748. But it is not from RFC7748!\n /*\n cswap(swap, x_2, x_3):\n dummy = mask(swap) AND (x_2 XOR x_3)\n x_2 = x_2 XOR dummy\n x_3 = x_3 XOR dummy\n Return (x_2, x_3)\n Where mask(swap) is the all-1 or all-0 word of the same length as x_2\n and x_3, computed, e.g., as mask(swap) = 0 - swap.\n */\n function cswap(swap, x_2, x_3) {\n const dummy = modP(swap * (x_2 - x_3));\n x_2 = modP(x_2 - dummy);\n x_3 = modP(x_3 + dummy);\n return [x_2, x_3];\n }\n // Accepts 0 as well\n function assertFieldElement(n) {\n if (typeof n === 'bigint' && _0n <= n && n < P)\n return n;\n throw new Error('Expected valid scalar 0 < scalar < CURVE.P');\n }\n // x25519 from 4\n // The constant a24 is (486662 - 2) / 4 = 121665 for curve25519/X25519\n const a24 = (CURVE.a - BigInt(2)) / BigInt(4);\n /**\n *\n * @param pointU u coordinate (x) on Montgomery Curve 25519\n * @param scalar by which the point would be multiplied\n * @returns new Point on Montgomery curve\n */\n function montgomeryLadder(pointU, scalar) {\n const u = assertFieldElement(pointU);\n // Section 5: Implementations MUST accept non-canonical values and process them as\n // if they had been reduced modulo the field prime.\n const k = assertFieldElement(scalar);\n const x_1 = u;\n let x_2 = _1n;\n let z_2 = _0n;\n let x_3 = u;\n let z_3 = _1n;\n let swap = _0n;\n let sw;\n for (let t = BigInt(montgomeryBits - 1); t >= _0n; t--) {\n const k_t = (k >> t) & _1n;\n swap ^= k_t;\n sw = cswap(swap, x_2, x_3);\n x_2 = sw[0];\n x_3 = sw[1];\n sw = cswap(swap, z_2, z_3);\n z_2 = sw[0];\n z_3 = sw[1];\n swap = k_t;\n const A = x_2 + z_2;\n const AA = modP(A * A);\n const B = x_2 - z_2;\n const BB = modP(B * B);\n const E = AA - BB;\n const C = x_3 + z_3;\n const D = x_3 - z_3;\n const DA = modP(D * A);\n const CB = modP(C * B);\n const dacb = DA + CB;\
/***/ }),
/***/ "./node_modules/@noble/curves/esm/abstract/utils.js":
/*!**********************************************************!*\
!*** ./node_modules/@noble/curves/esm/abstract/utils.js ***!
\**********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ bitGet: () => (/* binding */ bitGet),\n/* harmony export */ bitLen: () => (/* binding */ bitLen),\n/* harmony export */ bitMask: () => (/* binding */ bitMask),\n/* harmony export */ bitSet: () => (/* binding */ bitSet),\n/* harmony export */ bytesToHex: () => (/* binding */ bytesToHex),\n/* harmony export */ bytesToNumberBE: () => (/* binding */ bytesToNumberBE),\n/* harmony export */ bytesToNumberLE: () => (/* binding */ bytesToNumberLE),\n/* harmony export */ concatBytes: () => (/* binding */ concatBytes),\n/* harmony export */ createHmacDrbg: () => (/* binding */ createHmacDrbg),\n/* harmony export */ ensureBytes: () => (/* binding */ ensureBytes),\n/* harmony export */ equalBytes: () => (/* binding */ equalBytes),\n/* harmony export */ hexToBytes: () => (/* binding */ hexToBytes),\n/* harmony export */ hexToNumber: () => (/* binding */ hexToNumber),\n/* harmony export */ numberToBytesBE: () => (/* binding */ numberToBytesBE),\n/* harmony export */ numberToBytesLE: () => (/* binding */ numberToBytesLE),\n/* harmony export */ numberToHexUnpadded: () => (/* binding */ numberToHexUnpadded),\n/* harmony export */ numberToVarBytesBE: () => (/* binding */ numberToVarBytesBE),\n/* harmony export */ utf8ToBytes: () => (/* binding */ utf8ToBytes),\n/* harmony export */ validateObject: () => (/* binding */ validateObject)\n/* harmony export */ });\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 = BigInt(0);\nconst _1n = BigInt(1);\nconst _2n = BigInt(2);\nconst u8a = (a) => a instanceof Uint8Array;\nconst hexes = Array.from({ length: 256 }, (v, i) => i.toString(16).padStart(2, '0'));\n/**\n * @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'\n */\nfunction bytesToHex(bytes) {\n if (!u8a(bytes))\n throw new Error('Uint8Array expected');\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}\nfunction numberToHexUnpadded(num) {\n const hex = num.toString(16);\n return hex.length & 1 ? `0${hex}` : hex;\n}\nfunction 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/**\n * @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])\n */\nfunction hexToBytes(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n const len = hex.length;\n if (len % 2)\n throw new Error('padded hex string expected, got unpadded hex of length ' + len);\n const array = new Uint8Array(len / 2);\n for (let i = 0; i < array.length; i++) {\n const j = i * 2;\n const hexByte = hex.slice(j, j + 2);\n const byte = Number.parseInt(hexByte, 16);\n if (Number.isNaN(byte) || byte < 0)\n throw new Error('Invalid byte sequence');\n array[i] = byte;\n }\n return array;\n}\n// BE: Big Endian, LE: Little Endian\nfunction bytesToNumberBE(bytes) {\n return hexToNumber(bytesToHex(bytes));\n}\nfunction bytesToNumberLE(bytes) {\n if (!u8a(bytes))\n throw new Error('Uint8Array expected');\n return hexToNumber(bytesToHex(Uint8Array.from(bytes).reverse()));\n}\nfunction numberToBytesBE(n, len) {\n return hexToBytes(n.toString(16).padStart(len * 2, '0'));\n}\nfunction numberToBytesLE(n, len) {\n return numberToBytesBE(n, len).reverse();\n}\n// Unpadded, rarely used\nfunction numberToVarBytesBE(n) {\n return hexToBytes(numberToHexUnpadded(n));\n}\n/**\n
/***/ }),
/***/ "./node_modules/@noble/curves/esm/ed25519.js":
/*!***************************************************!*\
!*** ./node_modules/@noble/curves/esm/ed25519.js ***!
\***************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ED25519_TORSION_SUBGROUP: () => (/* binding */ ED25519_TORSION_SUBGROUP),\n/* harmony export */ RistrettoPoint: () => (/* binding */ RistrettoPoint),\n/* harmony export */ ed25519: () => (/* binding */ ed25519),\n/* harmony export */ ed25519ctx: () => (/* binding */ ed25519ctx),\n/* harmony export */ ed25519ph: () => (/* binding */ ed25519ph),\n/* harmony export */ edwardsToMontgomery: () => (/* binding */ edwardsToMontgomery),\n/* harmony export */ edwardsToMontgomeryPriv: () => (/* binding */ edwardsToMontgomeryPriv),\n/* harmony export */ edwardsToMontgomeryPub: () => (/* binding */ edwardsToMontgomeryPub),\n/* harmony export */ encodeToCurve: () => (/* binding */ encodeToCurve),\n/* harmony export */ hashToCurve: () => (/* binding */ hashToCurve),\n/* harmony export */ hash_to_ristretto255: () => (/* binding */ hash_to_ristretto255),\n/* harmony export */ x25519: () => (/* binding */ x25519)\n/* harmony export */ });\n/* harmony import */ var _noble_hashes_sha512__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @noble/hashes/sha512 */ \"./node_modules/@noble/hashes/esm/sha512.js\");\n/* harmony import */ var _noble_hashes_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @noble/hashes/utils */ \"./node_modules/@noble/hashes/esm/utils.js\");\n/* harmony import */ var _abstract_edwards_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./abstract/edwards.js */ \"./node_modules/@noble/curves/esm/abstract/edwards.js\");\n/* harmony import */ var _abstract_montgomery_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./abstract/montgomery.js */ \"./node_modules/@noble/curves/esm/abstract/montgomery.js\");\n/* harmony import */ var _abstract_modular_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./abstract/modular.js */ \"./node_modules/@noble/curves/esm/abstract/modular.js\");\n/* harmony import */ var _abstract_utils_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./abstract/utils.js */ \"./node_modules/@noble/curves/esm/abstract/utils.js\");\n/* harmony import */ var _abstract_hash_to_curve_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./abstract/hash-to-curve.js */ \"./node_modules/@noble/curves/esm/abstract/hash-to-curve.js\");\n/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n\n\n\n\n\n\n\n/**\n * ed25519 Twisted Edwards curve with following addons:\n * - X25519 ECDH\n * - Ristretto cofactor elimination\n * - Elligator hash-to-group / point indistinguishability\n */\nconst ED25519_P = BigInt('57896044618658097711785492504343953926634992332820282019728792003956564819949');\n// √(-1) aka √(a) aka 2^((p-1)/4)\nconst ED25519_SQRT_M1 = BigInt('19681161376707505956807079304988542015446066515923890162744021073123829784752');\n// prettier-ignore\nconst _0n = BigInt(0), _1n = BigInt(1), _2n = BigInt(2), _5n = BigInt(5);\n// prettier-ignore\nconst _10n = BigInt(10), _20n = BigInt(20), _40n = BigInt(40), _80n = BigInt(80);\nfunction ed25519_pow_2_252_3(x) {\n const P = ED25519_P;\n const x2 = (x * x) % P;\n const b2 = (x2 * x) % P; // x^3, 11\n const b4 = ((0,_abstract_modular_js__WEBPACK_IMPORTED_MODULE_4__.pow2)(b2, _2n, P) * b2) % P; // x^15, 1111\n const b5 = ((0,_abstract_modular_js__WEBPACK_IMPORTED_MODULE_4__.pow2)(b4, _1n, P) * x) % P; // x^31\n const b10 = ((0,_abstract_modular_js__WEBPACK_IMPORTED_MODULE_4__.pow2)(b5, _5n, P) * b5) % P;\n const b20 = ((0,_abstract_modular_js__WEBPACK_IMPORTED_MODULE_4__.pow2)(b10, _10n, P) * b10) % P;\n const b40 = ((0,_abstract_modular_js__WEBPACK_IMPORTED_MODULE_4__.pow2)(b20, _20n, P) * b20) % P;\n const b80 = ((0,_abstract_modular_js__WEBPACK_IMPORTED_MODULE_4__.pow2)(b40, _40n, P) * b40) % P;\n const b160 = ((0,_abstract_modular_js__WEBPACK_IMPORTED_MODULE_4__.pow2)(b80, _80n, P) * b80) % P;\n const b240 = ((0,_abstract_modular_js__WEBPACK_IMPORTED_MODULE_4__.pow2)(b160, _80n, P) * b80) % P;\n
/***/ }),
/***/ "./node_modules/@noble/ed25519/lib/esm/index.js":
/*!******************************************************!*\
!*** ./node_modules/@noble/ed25519/lib/esm/index.js ***!
\******************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("var crypto__WEBPACK_IMPORTED_MODULE_0___namespace_cache;\n__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ CURVE: () => (/* binding */ CURVE),\n/* harmony export */ ExtendedPoint: () => (/* binding */ ExtendedPoint),\n/* harmony export */ Point: () => (/* binding */ Point),\n/* harmony export */ RistrettoPoint: () => (/* binding */ RistrettoPoint),\n/* harmony export */ Signature: () => (/* binding */ Signature),\n/* harmony export */ curve25519: () => (/* binding */ curve25519),\n/* harmony export */ getPublicKey: () => (/* binding */ getPublicKey),\n/* harmony export */ getSharedSecret: () => (/* binding */ getSharedSecret),\n/* harmony export */ sign: () => (/* binding */ sign),\n/* harmony export */ sync: () => (/* binding */ sync),\n/* harmony export */ utils: () => (/* binding */ utils),\n/* harmony export */ verify: () => (/* binding */ verify)\n/* harmony export */ });\n/* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! crypto */ \"?51ea\");\n/*! noble-ed25519 - MIT License (c) 2019 Paul Miller (paulmillr.com) */\n\nconst _0n = BigInt(0);\nconst _1n = BigInt(1);\nconst _2n = BigInt(2);\nconst _8n = BigInt(8);\nconst CU_O = BigInt('7237005577332262213973186563042994240857116359379907606001950938285454250989');\nconst CURVE = Object.freeze({\n a: BigInt(-1),\n d: BigInt('37095705934669439343138083508754565189542113879843219016388785533085940283555'),\n P: BigInt('57896044618658097711785492504343953926634992332820282019728792003956564819949'),\n l: CU_O,\n n: CU_O,\n h: BigInt(8),\n Gx: BigInt('15112221349535400772501151409588531511454012693041857206046113283949847762202'),\n Gy: BigInt('46316835694926478169428394003475163141307993866256225615783033603165251855960'),\n});\n\nconst POW_2_256 = BigInt('0x10000000000000000000000000000000000000000000000000000000000000000');\nconst SQRT_M1 = BigInt('19681161376707505956807079304988542015446066515923890162744021073123829784752');\nconst SQRT_D = BigInt('6853475219497561581579357271197624642482790079785650197046958215289687604742');\nconst SQRT_AD_MINUS_ONE = BigInt('25063068953384623474111414158702152701244531502492656460079210482610430750235');\nconst INVSQRT_A_MINUS_D = BigInt('54469307008909316920995813868745141605393597292927456921205312896311721017578');\nconst ONE_MINUS_D_SQ = BigInt('1159843021668779879193775521855586647937357759715417654439879720876111806838');\nconst D_MINUS_ONE_SQ = BigInt('40440834346308536858101042469323190826248399146238708352240133220865137265952');\nclass ExtendedPoint {\n constructor(x, y, z, t) {\n this.x = x;\n this.y = y;\n this.z = z;\n this.t = t;\n }\n static fromAffine(p) {\n if (!(p instanceof Point)) {\n throw new TypeError('ExtendedPoint#fromAffine: expected Point');\n }\n if (p.equals(Point.ZERO))\n return ExtendedPoint.ZERO;\n return new ExtendedPoint(p.x, p.y, _1n, mod(p.x * p.y));\n }\n static toAffineBatch(points) {\n const toInv = invertBatch(points.map((p) => p.z));\n return points.map((p, i) => p.toAffine(toInv[i]));\n }\n static normalizeZ(points) {\n return this.toAffineBatch(points).map(this.fromAffine);\n }\n equals(other) {\n assertExtPoint(other);\n const { x: X1, y: Y1, z: Z1 } = this;\n const { x: X2, y: Y2, z: Z2 } = other;\n const X1Z2 = mod(X1 * Z2);\n const X2Z1 = mod(X2 * Z1);\n const Y1Z2 = mod(Y1 * Z2);\n const Y2Z1 = mod(Y2 * Z1);\n return X1Z2 === X2Z1 && Y1Z2 === Y2Z1;\n }\n negate() {\n return new ExtendedPoint(mod(-this.x), this.y, this.z, mod(-this.t));\n }\n double() {\n const { x: X1, y: Y1, z: Z1 } = this;\n const { a } = CURVE;\n const A = mod(X1 * X1);\n const B = mod(Y1 * Y1);\n const C = mod(_2n * mod(Z1 * Z1));\n const D = mod(a * A);\n const x1y1 = X1 + Y1;\n const E =
/***/ }),
/***/ "./node_modules/@noble/hashes/esm/_assert.js":
/*!***************************************************!*\
!*** ./node_modules/@noble/hashes/esm/_assert.js ***!
\***************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ bool: () => (/* binding */ bool),\n/* harmony export */ bytes: () => (/* binding */ bytes),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */ exists: () => (/* binding */ exists),\n/* harmony export */ hash: () => (/* binding */ hash),\n/* harmony export */ number: () => (/* binding */ number),\n/* harmony export */ output: () => (/* binding */ output)\n/* harmony export */ });\nfunction number(n) {\n if (!Number.isSafeInteger(n) || n < 0)\n throw new Error(`Wrong positive integer: ${n}`);\n}\nfunction bool(b) {\n if (typeof b !== 'boolean')\n throw new Error(`Expected boolean, not ${b}`);\n}\nfunction bytes(b, ...lengths) {\n if (!(b instanceof Uint8Array))\n throw new Error('Expected Uint8Array');\n if (lengths.length > 0 && !lengths.includes(b.length))\n throw new Error(`Expected Uint8Array of length ${lengths}, not of length=${b.length}`);\n}\nfunction hash(hash) {\n if (typeof hash !== 'function' || typeof hash.create !== 'function')\n throw new Error('Hash should be wrapped by utils.wrapConstructor');\n number(hash.outputLen);\n number(hash.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}\nconst assert = {\n number,\n bool,\n bytes,\n hash,\n exists,\n output,\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (assert);\n//# sourceMappingURL=_assert.js.map\n\n//# sourceURL=webpack://light/./node_modules/@noble/hashes/esm/_assert.js?");
/***/ }),
/***/ "./node_modules/@noble/hashes/esm/_sha2.js":
/*!*************************************************!*\
!*** ./node_modules/@noble/hashes/esm/_sha2.js ***!
\*************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ SHA2: () => (/* binding */ SHA2)\n/* harmony export */ });\n/* harmony import */ var _assert_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_assert.js */ \"./node_modules/@noble/hashes/esm/_assert.js\");\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils.js */ \"./node_modules/@noble/hashes/esm/utils.js\");\n\n\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// Base SHA2 class (RFC 6234)\nclass SHA2 extends _utils_js__WEBPACK_IMPORTED_MODULE_1__.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 = (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.createView)(this.buffer);\n }\n update(data) {\n _assert_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].exists(this);\n const { view, buffer, blockLen } = this;\n data = (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.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 = (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.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 _assert_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].exists(this);\n _assert_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].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 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 = (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.cr
/***/ }),
/***/ "./node_modules/@noble/hashes/esm/_u64.js":
/*!************************************************!*\
!*** ./node_modules/@noble/hashes/esm/_u64.js ***!
\************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ add: () => (/* binding */ add),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */ fromBig: () => (/* binding */ fromBig),\n/* harmony export */ split: () => (/* binding */ split),\n/* harmony export */ toBig: () => (/* binding */ toBig)\n/* harmony export */ });\nconst U32_MASK64 = BigInt(2 ** 32 - 1);\nconst _32n = 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.\n// Removing \"export\" has 5% perf penalty -_-\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\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};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (u64);\n//# sourceMappingURL=_u64.js.map\n\n//# sourceURL=webpack://light/./node_modules/@noble/hashes/esm/_u64.js?");
/***/ }),
/***/ "./node_modules/@noble/hashes/esm/crypto.js":
/*!**************************************************!*\
!*** ./node_modules/@noble/hashes/esm/crypto.js ***!
\**************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ crypto: () => (/* binding */ crypto)\n/* harmony export */ });\nconst crypto = typeof globalThis === 'object' && 'crypto' in globalThis ? globalThis.crypto : undefined;\n//# sourceMappingURL=crypto.js.map\n\n//# sourceURL=webpack://light/./node_modules/@noble/hashes/esm/crypto.js?");
/***/ }),
/***/ "./node_modules/@noble/hashes/esm/hkdf.js":
/*!************************************************!*\
!*** ./node_modules/@noble/hashes/esm/hkdf.js ***!
\************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ expand: () => (/* binding */ expand),\n/* harmony export */ extract: () => (/* binding */ extract),\n/* harmony export */ hkdf: () => (/* binding */ hkdf)\n/* harmony export */ });\n/* harmony import */ var _assert_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_assert.js */ \"./node_modules/@noble/hashes/esm/_assert.js\");\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils.js */ \"./node_modules/@noble/hashes/esm/utils.js\");\n/* harmony import */ var _hmac_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./hmac.js */ \"./node_modules/@noble/hashes/esm/hmac.js\");\n\n\n\n// HKDF (RFC 5869)\n// https://soatok.blog/2021/11/17/understanding-hkdf/\n/**\n * HKDF-Extract(IKM, salt) -> PRK\n * Arguments position differs from spec (IKM is first one, since it is not optional)\n * @param hash\n * @param ikm\n * @param salt\n * @returns\n */\nfunction extract(hash, ikm, salt) {\n _assert_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].hash(hash);\n // NOTE: some libraries treat zero-length array as 'not provided';\n // we don't, since we have undefined as 'not provided'\n // https://github.com/RustCrypto/KDFs/issues/15\n if (salt === undefined)\n salt = new Uint8Array(hash.outputLen); // if not provided, it is set to a string of HashLen zeros\n return (0,_hmac_js__WEBPACK_IMPORTED_MODULE_2__.hmac)(hash, (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.toBytes)(salt), (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.toBytes)(ikm));\n}\n// HKDF-Expand(PRK, info, L) -> OKM\nconst HKDF_COUNTER = new Uint8Array([0]);\nconst EMPTY_BUFFER = new Uint8Array();\n/**\n * HKDF-expand from the spec.\n * @param prk - a pseudorandom key of at least HashLen octets (usually, the output from the extract step)\n * @param info - optional context and application specific information (can be a zero-length string)\n * @param length - length of output keying material in octets\n */\nfunction expand(hash, prk, info, length = 32) {\n _assert_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].hash(hash);\n _assert_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].number(length);\n if (length > 255 * hash.outputLen)\n throw new Error('Length should be <= 255*HashLen');\n const blocks = Math.ceil(length / hash.outputLen);\n if (info === undefined)\n info = EMPTY_BUFFER;\n // first L(ength) octets of T\n const okm = new Uint8Array(blocks * hash.outputLen);\n // Re-use HMAC instance between blocks\n const HMAC = _hmac_js__WEBPACK_IMPORTED_MODULE_2__.hmac.create(hash, prk);\n const HMACTmp = HMAC._cloneInto();\n const T = new Uint8Array(HMAC.outputLen);\n for (let counter = 0; counter < blocks; counter++) {\n HKDF_COUNTER[0] = counter + 1;\n // T(0) = empty string (zero length)\n // T(N) = HMAC-Hash(PRK, T(N-1) | info | N)\n HMACTmp.update(counter === 0 ? EMPTY_BUFFER : T)\n .update(info)\n .update(HKDF_COUNTER)\n .digestInto(T);\n okm.set(T, hash.outputLen * counter);\n HMAC._cloneInto(HMACTmp);\n }\n HMAC.destroy();\n HMACTmp.destroy();\n T.fill(0);\n HKDF_COUNTER.fill(0);\n return okm.slice(0, length);\n}\n/**\n * HKDF (RFC 5869): extract + expand in one step.\n * @param hash - hash function that would be used (e.g. sha256)\n * @param ikm - input keying material, the initial key\n * @param salt - optional salt value (a non-secret random value)\n * @param info - optional context and application specific information\n * @param length - length of output keying material in octets\n */\nconst hkdf = (hash, ikm, salt, info, length) => expand(hash, extract(hash, ikm, salt), info, length);\n//# sourceMappingURL=hkdf.js.map\n\n//# sourceURL=webpack://light/./node_modules/@noble/hashes/esm/hkdf.js?");
/***/ }),
/***/ "./node_modules/@noble/hashes/esm/hmac.js":
/*!************************************************!*\
!*** ./node_modules/@noble/hashes/esm/hmac.js ***!
\************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ HMAC: () => (/* binding */ HMAC),\n/* harmony export */ hmac: () => (/* binding */ hmac)\n/* harmony export */ });\n/* harmony import */ var _assert_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_assert.js */ \"./node_modules/@noble/hashes/esm/_assert.js\");\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils.js */ \"./node_modules/@noble/hashes/esm/utils.js\");\n\n\n// HMAC (RFC 2104)\nclass HMAC extends _utils_js__WEBPACK_IMPORTED_MODULE_1__.Hash {\n constructor(hash, _key) {\n super();\n this.finished = false;\n this.destroyed = false;\n _assert_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].hash(hash);\n const key = (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.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 _assert_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].exists(this);\n this.iHash.update(buf);\n return this;\n }\n digestInto(out) {\n _assert_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].exists(this);\n _assert_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].bytes(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 */\nconst hmac = (hash, key, message) => new HMAC(hash, key).update(message).digest();\nhmac.create = (hash, key) => new HMAC(hash, key);\n//# sourceMappingURL=hmac.js.map\n\n//# sourceURL=webpack://light/./node_modules/@noble/hashes/esm/hmac.js?");
/***/ }),
/***/ "./node_modules/@noble/hashes/esm/sha256.js":
/*!**************************************************!*\
!*** ./node_modules/@noble/hashes/esm/sha256.js ***!
\**************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ sha224: () => (/* binding */ sha224),\n/* harmony export */ sha256: () => (/* binding */ sha256)\n/* harmony export */ });\n/* harmony import */ var _sha2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_sha2.js */ \"./node_modules/@noble/hashes/esm/_sha2.js\");\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils.js */ \"./node_modules/@noble/hashes/esm/utils.js\");\n\n\n// Choice: a ? b : c\nconst Chi = (a, b, c) => (a & b) ^ (~a & c);\n// Majority function, true if any two inpust is true\nconst Maj = (a, b, c) => (a & b) ^ (a & c) ^ (b & c);\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 = 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 (first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19):\n// prettier-ignore\nconst IV = 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 = new Uint32Array(64);\nclass SHA256 extends _sha2_js__WEBPACK_IMPORTED_MODULE_0__.SHA2 {\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 = IV[0] | 0;\n this.B = IV[1] | 0;\n this.C = IV[2] | 0;\n this.D = IV[3] | 0;\n this.E = IV[4] | 0;\n this.F = IV[5] | 0;\n this.G = IV[6] | 0;\n this.H = 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 = (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.rotr)(W15, 7) ^ (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.rotr)(W15, 18) ^ (W15 >>> 3);\n const s1 = (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.rotr)(W2, 17) ^ (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.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 = (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.rotr)(E, 6) ^ (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.rotr)(E, 11) ^ (0,_utils_js__WEB
/***/ }),
/***/ "./node_modules/@noble/hashes/esm/sha512.js":
/*!**************************************************!*\
!*** ./node_modules/@noble/hashes/esm/sha512.js ***!
\**************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ SHA512: () => (/* binding */ SHA512),\n/* harmony export */ sha384: () => (/* binding */ sha384),\n/* harmony export */ sha512: () => (/* binding */ sha512),\n/* harmony export */ sha512_224: () => (/* binding */ sha512_224),\n/* harmony export */ sha512_256: () => (/* binding */ sha512_256)\n/* harmony export */ });\n/* harmony import */ var _sha2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_sha2.js */ \"./node_modules/@noble/hashes/esm/_sha2.js\");\n/* harmony import */ var _u64_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_u64.js */ \"./node_modules/@noble/hashes/esm/_u64.js\");\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils.js */ \"./node_modules/@noble/hashes/esm/utils.js\");\n\n\n\n// Round contants (first 32 bits of the fractional parts of the cube roots of the first 80 primes 2..409):\n// prettier-ignore\nconst [SHA512_Kh, SHA512_Kl] = _u64_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].split([\n '0x428a2f98d728ae22', '0x7137449123ef65cd', '0xb5c0fbcfec4d3b2f', '0xe9b5dba58189dbbc',\n '0x3956c25bf348b538', '0x59f111f1b605d019', '0x923f82a4af194f9b', '0xab1c5ed5da6d8118',\n '0xd807aa98a3030242', '0x12835b0145706fbe', '0x243185be4ee4b28c', '0x550c7dc3d5ffb4e2',\n '0x72be5d74f27b896f', '0x80deb1fe3b1696b1', '0x9bdc06a725c71235', '0xc19bf174cf692694',\n '0xe49b69c19ef14ad2', '0xefbe4786384f25e3', '0x0fc19dc68b8cd5b5', '0x240ca1cc77ac9c65',\n '0x2de92c6f592b0275', '0x4a7484aa6ea6e483', '0x5cb0a9dcbd41fbd4', '0x76f988da831153b5',\n '0x983e5152ee66dfab', '0xa831c66d2db43210', '0xb00327c898fb213f', '0xbf597fc7beef0ee4',\n '0xc6e00bf33da88fc2', '0xd5a79147930aa725', '0x06ca6351e003826f', '0x142929670a0e6e70',\n '0x27b70a8546d22ffc', '0x2e1b21385c26c926', '0x4d2c6dfc5ac42aed', '0x53380d139d95b3df',\n '0x650a73548baf63de', '0x766a0abb3c77b2a8', '0x81c2c92e47edaee6', '0x92722c851482353b',\n '0xa2bfe8a14cf10364', '0xa81a664bbc423001', '0xc24b8b70d0f89791', '0xc76c51a30654be30',\n '0xd192e819d6ef5218', '0xd69906245565a910', '0xf40e35855771202a', '0x106aa07032bbd1b8',\n '0x19a4c116b8d2d0c8', '0x1e376c085141ab53', '0x2748774cdf8eeb99', '0x34b0bcb5e19b48a8',\n '0x391c0cb3c5c95a63', '0x4ed8aa4ae3418acb', '0x5b9cca4f7763e373', '0x682e6ff3d6b2b8a3',\n '0x748f82ee5defb2fc', '0x78a5636f43172f60', '0x84c87814a1f0ab72', '0x8cc702081a6439ec',\n '0x90befffa23631e28', '0xa4506cebde82bde9', '0xbef9a3f7b2c67915', '0xc67178f2e372532b',\n '0xca273eceea26619c', '0xd186b8c721c0c207', '0xeada7dd6cde0eb1e', '0xf57d4f7fee6ed178',\n '0x06f067aa72176fba', '0x0a637dc5a2c898a6', '0x113f9804bef90dae', '0x1b710b35131c471b',\n '0x28db77f523047d84', '0x32caab7b40c72493', '0x3c9ebe0a15c9bebc', '0x431d67c49c100d4c',\n '0x4cc5d4becb3e42b6', '0x597f299cfc657e2a', '0x5fcb6fab3ad6faec', '0x6c44198c4a475817'\n].map(n => BigInt(n)));\n// Temporary buffer, not used to store anything between runs\nconst SHA512_W_H = new Uint32Array(80);\nconst SHA512_W_L = new Uint32Array(80);\nclass SHA512 extends _sha2_js__WEBPACK_IMPORTED_MODULE_0__.SHA2 {\n constructor() {\n super(128, 64, 16, false);\n // We cannot use array here since array allows indexing by variable which means optimizer/compiler cannot use registers.\n // Also looks cleaner and easier to verify with spec.\n // Initial state (first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19):\n // h -- high 32 bits, l -- low 32 bits\n this.Ah = 0x6a09e667 | 0;\n this.Al = 0xf3bcc908 | 0;\n this.Bh = 0xbb67ae85 | 0;\n this.Bl = 0x84caa73b | 0;\n this.Ch = 0x3c6ef372 | 0;\n this.Cl = 0xfe94f82b | 0;\n this.Dh = 0xa54ff53a | 0;\n this.Dl = 0x5f1d36f1 | 0;\n this.Eh = 0x510e527f | 0;\n this.El = 0xade682d1 | 0;\n this.Fh = 0x9b05688c | 0;\n this.Fl = 0x2b3e6c1f | 0;\n this.Gh = 0x
/***/ }),
/***/ "./node_modules/@noble/hashes/esm/utils.js":
/*!*************************************************!*\
!*** ./node_modules/@noble/hashes/esm/utils.js ***!
\*************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Hash: () => (/* binding */ Hash),\n/* harmony export */ asyncLoop: () => (/* binding */ asyncLoop),\n/* harmony export */ bytesToHex: () => (/* binding */ bytesToHex),\n/* harmony export */ checkOpts: () => (/* binding */ checkOpts),\n/* harmony export */ concatBytes: () => (/* binding */ concatBytes),\n/* harmony export */ createView: () => (/* binding */ createView),\n/* harmony export */ hexToBytes: () => (/* binding */ hexToBytes),\n/* harmony export */ isLE: () => (/* binding */ isLE),\n/* harmony export */ nextTick: () => (/* binding */ nextTick),\n/* harmony export */ randomBytes: () => (/* binding */ randomBytes),\n/* harmony export */ rotr: () => (/* binding */ rotr),\n/* harmony export */ toBytes: () => (/* binding */ toBytes),\n/* harmony export */ u32: () => (/* binding */ u32),\n/* harmony export */ u8: () => (/* binding */ u8),\n/* harmony export */ utf8ToBytes: () => (/* binding */ utf8ToBytes),\n/* harmony export */ wrapConstructor: () => (/* binding */ wrapConstructor),\n/* harmony export */ wrapConstructorWithOpts: () => (/* binding */ wrapConstructorWithOpts),\n/* harmony export */ wrapXOFConstructorWithOpts: () => (/* binding */ wrapXOFConstructorWithOpts)\n/* harmony export */ });\n/* harmony import */ var _noble_hashes_crypto__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @noble/hashes/crypto */ \"./node_modules/@noble/hashes/esm/crypto.js\");\n/*! 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, we can just drop the import.\n\nconst u8a = (a) => a instanceof Uint8Array;\n// Cast array to different type\nconst u8 = (arr) => new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);\nconst u32 = (arr) => new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n// Cast array to view\nconst createView = (arr) => new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n// The rotate right (circular right shift) operation for uint32\nconst rotr = (word, shift) => (word << (32 - shift)) | (word >>> shift);\n// big-endian hardware is rare. Just in case someone still decides to run hashes:\n// early-throw an error because we don't support BE yet.\nconst isLE = new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44;\nif (!isLE)\n throw new Error('Non little-endian hardware is not supported');\nconst hexes = Array.from({ length: 256 }, (v, i) => i.toString(16).padStart(2, '0'));\n/**\n * @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'\n */\nfunction bytesToHex(bytes) {\n if (!u8a(bytes))\n throw new Error('Uint8Array expected');\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/**\n * @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])\n */\nfunction hexToBytes(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n const len = hex.length;\n if (len % 2)\n throw new Error('padded hex string expected, got unpadded hex of length ' + len);\n const array = new Uint8Array(len / 2);\n for (let i = 0; i < array.length; i++) {\n const j = i * 2;\n const hexByte = hex.slice(j, j + 2);\n const byte = Number.parseInt(hexByte, 16);\n if (Number.isNaN(byte) || byte < 0)\n throw new Error('Invalid byte sequence');\n array[i] = byte;\n }\n return array;\n}\n// There is no setImmediate in browser and setT
/***/ }),
/***/ "./node_modules/@noble/secp256k1/lib/esm/index.js":
/*!********************************************************!*\
!*** ./node_modules/@noble/secp256k1/lib/esm/index.js ***!
\********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("var crypto__WEBPACK_IMPORTED_MODULE_0___namespace_cache;\n__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ CURVE: () => (/* binding */ CURVE),\n/* harmony export */ Point: () => (/* binding */ Point),\n/* harmony export */ Signature: () => (/* binding */ Signature),\n/* harmony export */ getPublicKey: () => (/* binding */ getPublicKey),\n/* harmony export */ getSharedSecret: () => (/* binding */ getSharedSecret),\n/* harmony export */ recoverPublicKey: () => (/* binding */ recoverPublicKey),\n/* harmony export */ schnorr: () => (/* binding */ schnorr),\n/* harmony export */ sign: () => (/* binding */ sign),\n/* harmony export */ signSync: () => (/* binding */ signSync),\n/* harmony export */ utils: () => (/* binding */ utils),\n/* harmony export */ verify: () => (/* binding */ verify)\n/* harmony export */ });\n/* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! crypto */ \"?ce41\");\n/*! noble-secp256k1 - MIT License (c) 2019 Paul Miller (paulmillr.com) */\n\nconst _0n = BigInt(0);\nconst _1n = BigInt(1);\nconst _2n = BigInt(2);\nconst _3n = BigInt(3);\nconst _8n = BigInt(8);\nconst CURVE = Object.freeze({\n a: _0n,\n b: BigInt(7),\n P: BigInt('0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f'),\n n: BigInt('0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141'),\n h: _1n,\n Gx: BigInt('55066263022277343669578718895168534326250603453777594175500187360389116729240'),\n Gy: BigInt('32670510020758816978083085130507043184471273380659243275938904335757337482424'),\n beta: BigInt('0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee'),\n});\nconst divNearest = (a, b) => (a + b / _2n) / b;\nconst endo = {\n beta: BigInt('0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee'),\n splitScalar(k) {\n const { n } = CURVE;\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');\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('splitScalarEndo: Endomorphism failed, k=' + k);\n }\n return { k1neg, k1, k2neg, k2 };\n },\n};\nconst fieldLen = 32;\nconst groupLen = 32;\nconst hashLen = 32;\nconst compressedLen = fieldLen + 1;\nconst uncompressedLen = 2 * fieldLen + 1;\n\nfunction weierstrass(x) {\n const { a, b } = CURVE;\n const x2 = mod(x * x);\n const x3 = mod(x2 * x);\n return mod(x3 + a * x + b);\n}\nconst USE_ENDOMORPHISM = CURVE.a === _0n;\nclass ShaError extends Error {\n constructor(message) {\n super(message);\n }\n}\nfunction assertJacPoint(other) {\n if (!(other instanceof JacobianPoint))\n throw new TypeError('JacobianPoint expected');\n}\nclass JacobianPoint {\n constructor(x, y, z) {\n this.x = x;\n this.y = y;\n this.z = z;\n }\n static fromAffine(p) {\n if (!(p instanceof Point)) {\n throw new TypeError('JacobianPoint#fromAffine: expected Point');\n }\n if (p.equals(Point.ZERO))\n return JacobianPoint.ZERO;\n return new JacobianPoint(p.x, p.y, _1n);\n }\n static toAffineBatch(points) {\n const toInv = invertBatch(points.map((p) => p.z));\n return points.map((p, i) => p.toAffine(toInv[i]));\n }\n static normalizeZ(points) {\n return JacobianPoint.toAffineBatch(points).map(JacobianPoint.fromAffine);\n
/***/ }),
/***/ "./node_modules/@waku/core/dist/index.js":
/*!***********************************************!*\
!*** ./node_modules/@waku/core/dist/index.js ***!
\***********************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ConnectionManager: () => (/* reexport safe */ _lib_connection_manager_js__WEBPACK_IMPORTED_MODULE_8__.ConnectionManager),\n/* harmony export */ DefaultPubSubTopic: () => (/* reexport safe */ _lib_constants_js__WEBPACK_IMPORTED_MODULE_1__.DefaultPubSubTopic),\n/* harmony export */ DefaultUserAgent: () => (/* reexport safe */ _lib_waku_js__WEBPACK_IMPORTED_MODULE_0__.DefaultUserAgent),\n/* harmony export */ KeepAliveManager: () => (/* reexport safe */ _lib_keep_alive_manager_js__WEBPACK_IMPORTED_MODULE_9__.KeepAliveManager),\n/* harmony export */ LightPushCodec: () => (/* reexport safe */ _lib_light_push_index_js__WEBPACK_IMPORTED_MODULE_5__.LightPushCodec),\n/* harmony export */ PageDirection: () => (/* reexport safe */ _lib_store_index_js__WEBPACK_IMPORTED_MODULE_6__.PageDirection),\n/* harmony export */ StoreCodec: () => (/* reexport safe */ _lib_store_index_js__WEBPACK_IMPORTED_MODULE_6__.StoreCodec),\n/* harmony export */ WakuNode: () => (/* reexport safe */ _lib_waku_js__WEBPACK_IMPORTED_MODULE_0__.WakuNode),\n/* harmony export */ createCursor: () => (/* reexport safe */ _lib_store_index_js__WEBPACK_IMPORTED_MODULE_6__.createCursor),\n/* harmony export */ createDecoder: () => (/* reexport safe */ _lib_message_version_0_js__WEBPACK_IMPORTED_MODULE_2__.createDecoder),\n/* harmony export */ createEncoder: () => (/* reexport safe */ _lib_message_version_0_js__WEBPACK_IMPORTED_MODULE_2__.createEncoder),\n/* harmony export */ message: () => (/* reexport module object */ _lib_message_index_js__WEBPACK_IMPORTED_MODULE_3__),\n/* harmony export */ waitForRemotePeer: () => (/* reexport safe */ _lib_wait_for_remote_peer_js__WEBPACK_IMPORTED_MODULE_7__.waitForRemotePeer),\n/* harmony export */ waku: () => (/* reexport module object */ _lib_waku_js__WEBPACK_IMPORTED_MODULE_0__),\n/* harmony export */ wakuFilter: () => (/* reexport safe */ _lib_filter_index_js__WEBPACK_IMPORTED_MODULE_4__.wakuFilter),\n/* harmony export */ wakuLightPush: () => (/* reexport safe */ _lib_light_push_index_js__WEBPACK_IMPORTED_MODULE_5__.wakuLightPush),\n/* harmony export */ wakuStore: () => (/* reexport safe */ _lib_store_index_js__WEBPACK_IMPORTED_MODULE_6__.wakuStore),\n/* harmony export */ waku_filter: () => (/* reexport module object */ _lib_filter_index_js__WEBPACK_IMPORTED_MODULE_4__),\n/* harmony export */ waku_light_push: () => (/* reexport module object */ _lib_light_push_index_js__WEBPACK_IMPORTED_MODULE_5__),\n/* harmony export */ waku_store: () => (/* reexport module object */ _lib_store_index_js__WEBPACK_IMPORTED_MODULE_6__)\n/* harmony export */ });\n/* harmony import */ var _lib_waku_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib/waku.js */ \"./node_modules/@waku/core/dist/lib/waku.js\");\n/* harmony import */ var _lib_constants_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lib/constants.js */ \"./node_modules/@waku/core/dist/lib/constants.js\");\n/* harmony import */ var _lib_message_version_0_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lib/message/version_0.js */ \"./node_modules/@waku/core/dist/lib/message/version_0.js\");\n/* harmony import */ var _lib_message_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./lib/message/index.js */ \"./node_modules/@waku/core/dist/lib/message/index.js\");\n/* harmony import */ var _lib_filter_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./lib/filter/index.js */ \"./node_modules/@waku/core/dist/lib/filter/index.js\");\n/* harmony import */ var _lib_light_push_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./lib/light_push/index.js */ \"./node_modules/@waku/core/dist/lib/light_push/index.js\");\n/* harmony import */ var _lib_store_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./lib/store/index.js */ \"./node_modules/@waku/core/dist/lib/store/index.js\");\n/* harmony import */ var _lib_wait_for_remote_peer_js_
/***/ }),
/***/ "./node_modules/@waku/core/dist/lib/base_protocol.js":
/*!***********************************************************!*\
!*** ./node_modules/@waku/core/dist/lib/base_protocol.js ***!
\***********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ BaseProtocol: () => (/* binding */ BaseProtocol)\n/* harmony export */ });\n/* harmony import */ var _waku_utils_libp2p__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @waku/utils/libp2p */ \"./node_modules/@waku/utils/dist/libp2p/index.js\");\n\n/**\n * A class with predefined helpers, to be used as a base to implement Waku\n * Protocols.\n */\nclass BaseProtocol {\n multicodec;\n components;\n addLibp2pEventListener;\n removeLibp2pEventListener;\n constructor(multicodec, components) {\n this.multicodec = multicodec;\n this.components = components;\n this.addLibp2pEventListener = components.events.addEventListener.bind(components.events);\n this.removeLibp2pEventListener = components.events.removeEventListener.bind(components.events);\n }\n get peerStore() {\n return this.components.peerStore;\n }\n /**\n * Returns known peers from the address book (`libp2p.peerStore`) that support\n * the class protocol. Waku may or may not be currently connected to these\n * peers.\n */\n async peers() {\n return (0,_waku_utils_libp2p__WEBPACK_IMPORTED_MODULE_0__.getPeersForProtocol)(this.peerStore, [this.multicodec]);\n }\n async getPeer(peerId) {\n const { peer } = await (0,_waku_utils_libp2p__WEBPACK_IMPORTED_MODULE_0__.selectPeerForProtocol)(this.peerStore, [this.multicodec], peerId);\n return peer;\n }\n async newStream(peer) {\n const connections = this.components.connectionManager.getConnections(peer.id);\n const connection = (0,_waku_utils_libp2p__WEBPACK_IMPORTED_MODULE_0__.selectConnection)(connections);\n if (!connection) {\n throw new Error(\"Failed to get a connection to the peer\");\n }\n return connection.newStream(this.multicodec);\n }\n}\n//# sourceMappingURL=base_protocol.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/core/dist/lib/base_protocol.js?");
/***/ }),
/***/ "./node_modules/@waku/core/dist/lib/connection_manager.js":
/*!****************************************************************!*\
!*** ./node_modules/@waku/core/dist/lib/connection_manager.js ***!
\****************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ConnectionManager: () => (/* binding */ ConnectionManager),\n/* harmony export */ DEFAULT_MAX_BOOTSTRAP_PEERS_ALLOWED: () => (/* binding */ DEFAULT_MAX_BOOTSTRAP_PEERS_ALLOWED),\n/* harmony export */ DEFAULT_MAX_DIAL_ATTEMPTS_FOR_PEER: () => (/* binding */ DEFAULT_MAX_DIAL_ATTEMPTS_FOR_PEER),\n/* harmony export */ DEFAULT_MAX_PARALLEL_DIALS: () => (/* binding */ DEFAULT_MAX_PARALLEL_DIALS)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interfaces_events__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interfaces/events */ \"./node_modules/@libp2p/interfaces/dist/src/events.js\");\n/* harmony import */ var _waku_interfaces__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @waku/interfaces */ \"./node_modules/@waku/interfaces/dist/index.js\");\n/* harmony import */ var debug__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! debug */ \"./node_modules/debug/src/browser.js\");\n/* harmony import */ var _keep_alive_manager_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./keep_alive_manager.js */ \"./node_modules/@waku/core/dist/lib/keep_alive_manager.js\");\n\n\n\n\n\nconst log = debug__WEBPACK_IMPORTED_MODULE_2__(\"waku:connection-manager\");\nconst DEFAULT_MAX_BOOTSTRAP_PEERS_ALLOWED = 1;\nconst DEFAULT_MAX_DIAL_ATTEMPTS_FOR_PEER = 3;\nconst DEFAULT_MAX_PARALLEL_DIALS = 3;\nclass ConnectionManager extends _libp2p_interfaces_events__WEBPACK_IMPORTED_MODULE_0__.EventEmitter {\n static instances = new Map();\n keepAliveManager;\n options;\n libp2p;\n dialAttemptsForPeer = new Map();\n dialErrorsForPeer = new Map();\n currentActiveDialCount = 0;\n pendingPeerDialQueue = [];\n static create(peerId, libp2p, keepAliveOptions, relay, options) {\n let instance = ConnectionManager.instances.get(peerId);\n if (!instance) {\n instance = new ConnectionManager(libp2p, keepAliveOptions, relay, options);\n ConnectionManager.instances.set(peerId, instance);\n }\n return instance;\n }\n async getPeersByDiscovery() {\n const peersDiscovered = await this.libp2p.peerStore.all();\n const peersConnected = this.libp2p\n .getConnections()\n .map((conn) => conn.remotePeer);\n const peersDiscoveredByBootstrap = [];\n const peersDiscoveredByPeerExchange = [];\n const peersConnectedByBootstrap = [];\n const peersConnectedByPeerExchange = [];\n for (const peer of peersDiscovered) {\n const tags = await this.getTagNamesForPeer(peer.id);\n if (tags.includes(_waku_interfaces__WEBPACK_IMPORTED_MODULE_1__.Tags.BOOTSTRAP)) {\n peersDiscoveredByBootstrap.push(peer);\n }\n else if (tags.includes(_waku_interfaces__WEBPACK_IMPORTED_MODULE_1__.Tags.PEER_EXCHANGE)) {\n peersDiscoveredByPeerExchange.push(peer);\n }\n }\n for (const peerId of peersConnected) {\n const peer = await this.libp2p.peerStore.get(peerId);\n const tags = await this.getTagNamesForPeer(peerId);\n if (tags.includes(_waku_interfaces__WEBPACK_IMPORTED_MODULE_1__.Tags.BOOTSTRAP)) {\n peersConnectedByBootstrap.push(peer);\n }\n else if (tags.includes(_waku_interfaces__WEBPACK_IMPORTED_MODULE_1__.Tags.PEER_EXCHANGE)) {\n peersConnectedByPeerExchange.push(peer);\n }\n }\n return {\n DISCOVERED: {\n [_waku_interfaces__WEBPACK_IMPORTED_MODULE_1__.Tags.BOOTSTRAP]: peersDiscoveredByBootstrap,\n [_waku_interfaces__WEBPACK_IMPORTED_MODULE_1__.Tags.PEER_EXCHANGE]: peersDiscoveredByPeerExchange,\n },\n CONNECTED: {\n [_waku_interfaces__WEBPACK_IMPORTED_MODULE_1__.Tags.BOOTSTRAP]: peersConnectedByBootstrap,\n [_waku_interfaces__WEBPACK_IMPORTED_MODULE_1__.Tags.PEER_EXCHA
/***/ }),
/***/ "./node_modules/@waku/core/dist/lib/constants.js":
/*!*******************************************************!*\
!*** ./node_modules/@waku/core/dist/lib/constants.js ***!
\*******************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DefaultPubSubTopic: () => (/* binding */ DefaultPubSubTopic)\n/* harmony export */ });\n/**\n * DefaultPubSubTopic is the default gossipsub topic to use for Waku.\n */\nconst DefaultPubSubTopic = \"/waku/2/default-waku/proto\";\n//# sourceMappingURL=constants.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/core/dist/lib/constants.js?");
/***/ }),
/***/ "./node_modules/@waku/core/dist/lib/filter/filter_rpc.js":
/*!***************************************************************!*\
!*** ./node_modules/@waku/core/dist/lib/filter/filter_rpc.js ***!
\***************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ FilterPushRpc: () => (/* binding */ FilterPushRpc),\n/* harmony export */ FilterSubscribeResponse: () => (/* binding */ FilterSubscribeResponse),\n/* harmony export */ FilterSubscribeRpc: () => (/* binding */ FilterSubscribeRpc)\n/* harmony export */ });\n/* harmony import */ var _waku_proto__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @waku/proto */ \"./node_modules/@waku/proto/dist/index.js\");\n/* harmony import */ var uuid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! uuid */ \"./node_modules/uuid/dist/esm-browser/v4.js\");\n\n\n/**\n * FilterPushRPC represents a message conforming to the Waku FilterPush protocol.\n * Protocol documentation: https://rfc.vac.dev/spec/12/\n */\nclass FilterPushRpc {\n proto;\n constructor(proto) {\n this.proto = proto;\n }\n static decode(bytes) {\n const res = _waku_proto__WEBPACK_IMPORTED_MODULE_0__.proto_filter_v2.MessagePush.decode(bytes);\n return new FilterPushRpc(res);\n }\n encode() {\n return _waku_proto__WEBPACK_IMPORTED_MODULE_0__.proto_filter_v2.MessagePush.encode(this.proto);\n }\n get wakuMessage() {\n return this.proto.wakuMessage;\n }\n /**\n * Get the pubsub topic from the FilterPushRpc object.\n * @returns string\n */\n get pubsubTopic() {\n return this.proto.pubsubTopic;\n }\n}\nclass FilterSubscribeRpc {\n proto;\n constructor(proto) {\n this.proto = proto;\n }\n static createSubscribeRequest(pubsubTopic, contentTopics) {\n return new FilterSubscribeRpc({\n requestId: (0,uuid__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(),\n filterSubscribeType: _waku_proto__WEBPACK_IMPORTED_MODULE_0__.proto_filter_v2.FilterSubscribeRequest.FilterSubscribeType.SUBSCRIBE,\n pubsubTopic,\n contentTopics,\n });\n }\n static createUnsubscribeRequest(pubsubTopic, contentTopics) {\n return new FilterSubscribeRpc({\n requestId: (0,uuid__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(),\n filterSubscribeType: _waku_proto__WEBPACK_IMPORTED_MODULE_0__.proto_filter_v2.FilterSubscribeRequest.FilterSubscribeType.UNSUBSCRIBE,\n pubsubTopic,\n contentTopics,\n });\n }\n static createUnsubscribeAllRequest(pubsubTopic) {\n return new FilterSubscribeRpc({\n requestId: (0,uuid__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(),\n filterSubscribeType: _waku_proto__WEBPACK_IMPORTED_MODULE_0__.proto_filter_v2.FilterSubscribeRequest.FilterSubscribeType.UNSUBSCRIBE_ALL,\n pubsubTopic,\n contentTopics: [],\n });\n }\n static createSubscriberPingRequest() {\n return new FilterSubscribeRpc({\n requestId: (0,uuid__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(),\n filterSubscribeType: _waku_proto__WEBPACK_IMPORTED_MODULE_0__.proto_filter_v2.FilterSubscribeRequest.FilterSubscribeType.SUBSCRIBER_PING,\n pubsubTopic: \"\",\n contentTopics: [],\n });\n }\n static decode(bytes) {\n const res = _waku_proto__WEBPACK_IMPORTED_MODULE_0__.proto_filter_v2.FilterSubscribeRequest.decode(bytes);\n return new FilterSubscribeRpc(res);\n }\n encode() {\n return _waku_proto__WEBPACK_IMPORTED_MODULE_0__.proto_filter_v2.FilterSubscribeRequest.encode(this.proto);\n }\n get filterSubscribeType() {\n return this.proto.filterSubscribeType;\n }\n get requestId() {\n return this.proto.requestId;\n }\n get pubsubTopic() {\n return this.proto.pubsubTopic;\n }\n get contentTopics() {\n return this.proto.contentTopics;\n }\n}\nclass FilterSubscribeResponse {\n proto;\n constructor(proto) {\n this.proto = proto;\n }\n static decode(bytes) {\n const res = _waku_proto__WEBPACK_IMPORTED_MODULE_0__.proto_filter_v2.FilterSubscribeRespon
/***/ }),
/***/ "./node_modules/@waku/core/dist/lib/filter/index.js":
/*!**********************************************************!*\
!*** ./node_modules/@waku/core/dist/lib/filter/index.js ***!
\**********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ wakuFilter: () => (/* binding */ wakuFilter)\n/* harmony export */ });\n/* harmony import */ var _waku_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @waku/utils */ \"./node_modules/@waku/utils/dist/index.js\");\n/* harmony import */ var debug__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! debug */ \"./node_modules/debug/src/browser.js\");\n/* harmony import */ var it_all__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! it-all */ \"./node_modules/it-all/dist/src/index.js\");\n/* harmony import */ var it_length_prefixed__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! it-length-prefixed */ \"./node_modules/it-length-prefixed/dist/src/index.js\");\n/* harmony import */ var it_pipe__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! it-pipe */ \"./node_modules/it-pipe/dist/src/index.js\");\n/* harmony import */ var _base_protocol_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../base_protocol.js */ \"./node_modules/@waku/core/dist/lib/base_protocol.js\");\n/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../constants.js */ \"./node_modules/@waku/core/dist/lib/constants.js\");\n/* harmony import */ var _filter_rpc_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./filter_rpc.js */ \"./node_modules/@waku/core/dist/lib/filter/filter_rpc.js\");\n\n\n\n\n\n\n\n\nconst log = debug__WEBPACK_IMPORTED_MODULE_1__(\"waku:filter:v2\");\nconst FilterCodecs = {\n SUBSCRIBE: \"/vac/waku/filter-subscribe/2.0.0-beta1\",\n PUSH: \"/vac/waku/filter-push/2.0.0-beta1\",\n};\nclass Subscription {\n peer;\n pubSubTopic;\n newStream;\n subscriptionCallbacks;\n constructor(pubSubTopic, remotePeer, newStream) {\n this.peer = remotePeer;\n this.pubSubTopic = pubSubTopic;\n this.newStream = newStream;\n this.subscriptionCallbacks = new Map();\n }\n async subscribe(decoders, callback) {\n const decodersArray = Array.isArray(decoders) ? decoders : [decoders];\n const decodersGroupedByCT = (0,_waku_utils__WEBPACK_IMPORTED_MODULE_0__.groupByContentTopic)(decodersArray);\n const contentTopics = Array.from(decodersGroupedByCT.keys());\n const stream = await this.newStream(this.peer);\n const request = _filter_rpc_js__WEBPACK_IMPORTED_MODULE_7__.FilterSubscribeRpc.createSubscribeRequest(this.pubSubTopic, contentTopics);\n try {\n const res = await (0,it_pipe__WEBPACK_IMPORTED_MODULE_4__.pipe)([request.encode()], it_length_prefixed__WEBPACK_IMPORTED_MODULE_3__.encode, stream, it_length_prefixed__WEBPACK_IMPORTED_MODULE_3__.decode, async (source) => await (0,it_all__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(source));\n const { statusCode, requestId, statusDesc } = _filter_rpc_js__WEBPACK_IMPORTED_MODULE_7__.FilterSubscribeResponse.decode(res[0].slice());\n if (statusCode < 200 || statusCode >= 300) {\n throw new Error(`Filter subscribe request ${requestId} failed with status code ${statusCode}: ${statusDesc}`);\n }\n log(\"Subscribed to peer \", this.peer.id.toString(), \"for content topics\", contentTopics);\n }\n catch (e) {\n throw new Error(\"Error subscribing to peer: \" +\n this.peer.id.toString() +\n \" for content topics: \" +\n contentTopics +\n \": \" +\n e);\n }\n // Save the callback functions by content topics so they\n // can easily be removed (reciprocally replaced) if `unsubscribe` (reciprocally `subscribe`)\n // is called for those content topics\n decodersGroupedByCT.forEach((decoders, contentTopic) => {\n // Cast the type because a given `subscriptionCallbacks` map may hold\n // Decoder that decode to different implementations of `IDecodedMessage`\n const subscriptionCallba
/***/ }),
/***/ "./node_modules/@waku/core/dist/lib/keep_alive_manager.js":
/*!****************************************************************!*\
!*** ./node_modules/@waku/core/dist/lib/keep_alive_manager.js ***!
\****************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ KeepAliveManager: () => (/* binding */ KeepAliveManager),\n/* harmony export */ RelayPingContentTopic: () => (/* binding */ RelayPingContentTopic)\n/* harmony export */ });\n/* harmony import */ var debug__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! debug */ \"./node_modules/debug/src/browser.js\");\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../index.js */ \"./node_modules/@waku/core/dist/index.js\");\n\n\nconst RelayPingContentTopic = \"/relay-ping/1/ping/null\";\nconst log = debug__WEBPACK_IMPORTED_MODULE_0__(\"waku:keep-alive\");\nclass KeepAliveManager {\n pingKeepAliveTimers;\n relayKeepAliveTimers;\n options;\n relay;\n constructor(options, relay) {\n this.pingKeepAliveTimers = new Map();\n this.relayKeepAliveTimers = new Map();\n this.options = options;\n this.relay = relay;\n }\n start(peerId, libp2pPing) {\n // Just in case a timer already exist for this peer\n this.stop(peerId);\n const { pingKeepAlive: pingPeriodSecs, relayKeepAlive: relayPeriodSecs } = this.options;\n const peerIdStr = peerId.toString();\n if (pingPeriodSecs !== 0) {\n const interval = setInterval(() => {\n libp2pPing.ping(peerId).catch((e) => {\n log(`Ping failed (${peerIdStr})`, e);\n });\n }, pingPeriodSecs * 1000);\n this.pingKeepAliveTimers.set(peerIdStr, interval);\n }\n const relay = this.relay;\n if (relay && relayPeriodSecs !== 0) {\n const encoder = (0,_index_js__WEBPACK_IMPORTED_MODULE_1__.createEncoder)({\n contentTopic: RelayPingContentTopic,\n ephemeral: true,\n });\n const interval = setInterval(() => {\n log(\"Sending Waku Relay ping message\");\n relay\n .send(encoder, { payload: new Uint8Array([1]) })\n .catch((e) => log(\"Failed to send relay ping\", e));\n }, relayPeriodSecs * 1000);\n this.relayKeepAliveTimers.set(peerId, interval);\n }\n }\n stop(peerId) {\n const peerIdStr = peerId.toString();\n if (this.pingKeepAliveTimers.has(peerIdStr)) {\n clearInterval(this.pingKeepAliveTimers.get(peerIdStr));\n this.pingKeepAliveTimers.delete(peerIdStr);\n }\n if (this.relayKeepAliveTimers.has(peerId)) {\n clearInterval(this.relayKeepAliveTimers.get(peerId));\n this.relayKeepAliveTimers.delete(peerId);\n }\n }\n stopAll() {\n for (const timer of [\n ...Object.values(this.pingKeepAliveTimers),\n ...Object.values(this.relayKeepAliveTimers),\n ]) {\n clearInterval(timer);\n }\n this.pingKeepAliveTimers.clear();\n this.relayKeepAliveTimers.clear();\n }\n}\n//# sourceMappingURL=keep_alive_manager.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/core/dist/lib/keep_alive_manager.js?");
/***/ }),
/***/ "./node_modules/@waku/core/dist/lib/light_push/index.js":
/*!**************************************************************!*\
!*** ./node_modules/@waku/core/dist/lib/light_push/index.js ***!
\**************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ LightPushCodec: () => (/* binding */ LightPushCodec),\n/* harmony export */ PushResponse: () => (/* reexport safe */ _waku_proto__WEBPACK_IMPORTED_MODULE_1__.PushResponse),\n/* harmony export */ wakuLightPush: () => (/* binding */ wakuLightPush)\n/* harmony export */ });\n/* harmony import */ var _waku_interfaces__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @waku/interfaces */ \"./node_modules/@waku/interfaces/dist/index.js\");\n/* harmony import */ var _waku_proto__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @waku/proto */ \"./node_modules/@waku/proto/dist/index.js\");\n/* harmony import */ var _waku_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @waku/utils */ \"./node_modules/@waku/utils/dist/index.js\");\n/* harmony import */ var debug__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! debug */ \"./node_modules/debug/src/browser.js\");\n/* harmony import */ var it_all__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! it-all */ \"./node_modules/it-all/dist/src/index.js\");\n/* harmony import */ var it_length_prefixed__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! it-length-prefixed */ \"./node_modules/it-length-prefixed/dist/src/index.js\");\n/* harmony import */ var it_pipe__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! it-pipe */ \"./node_modules/it-pipe/dist/src/index.js\");\n/* harmony import */ var uint8arraylist__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! uint8arraylist */ \"./node_modules/uint8arraylist/dist/src/index.js\");\n/* harmony import */ var _base_protocol_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../base_protocol.js */ \"./node_modules/@waku/core/dist/lib/base_protocol.js\");\n/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../constants.js */ \"./node_modules/@waku/core/dist/lib/constants.js\");\n/* harmony import */ var _push_rpc_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./push_rpc.js */ \"./node_modules/@waku/core/dist/lib/light_push/push_rpc.js\");\n\n\n\n\n\n\n\n\n\n\n\nconst log = debug__WEBPACK_IMPORTED_MODULE_3__(\"waku:light-push\");\nconst LightPushCodec = \"/vac/waku/lightpush/2.0.0-beta1\";\n\n/**\n * Implements the [Waku v2 Light Push protocol](https://rfc.vac.dev/spec/19/).\n */\nclass LightPush extends _base_protocol_js__WEBPACK_IMPORTED_MODULE_8__.BaseProtocol {\n options;\n constructor(libp2p, options) {\n super(LightPushCodec, libp2p.components);\n this.options = options || {};\n }\n async send(encoder, message, opts) {\n const { pubSubTopic = _constants_js__WEBPACK_IMPORTED_MODULE_9__.DefaultPubSubTopic } = this.options;\n const peer = await this.getPeer(opts?.peerId);\n const stream = await this.newStream(peer);\n const recipients = [];\n let error = undefined;\n try {\n if (!(0,_waku_utils__WEBPACK_IMPORTED_MODULE_2__.isSizeValid)(message.payload)) {\n log(\"Failed to send waku light push: message is bigger that 1MB\");\n return {\n recipients,\n error: _waku_interfaces__WEBPACK_IMPORTED_MODULE_0__.SendError.SIZE_TOO_BIG,\n };\n }\n const protoMessage = await encoder.toProtoObj(message);\n if (!protoMessage) {\n log(\"Failed to encode to protoMessage, aborting push\");\n return {\n recipients,\n error: _waku_interfaces__WEBPACK_IMPORTED_MODULE_0__.SendError.ENCODE_FAILED,\n };\n }\n const query = _push_rpc_js__WEBPACK_IMPORTED_MODULE_10__.PushRpc.createRequest(protoMessage, pubSubTopic);\n const res = await (0,it_pipe__WEBPACK_IMPORTED_MODULE_6__.pipe)([query.encode()], it_length_prefixed__WEBPACK_IMPORTED_MODULE_5__.encode, stream, it_length_prefixed__WEBPACK_IMPORTED_MODULE_5__.decode,
/***/ }),
/***/ "./node_modules/@waku/core/dist/lib/light_push/push_rpc.js":
/*!*****************************************************************!*\
!*** ./node_modules/@waku/core/dist/lib/light_push/push_rpc.js ***!
\*****************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PushRpc: () => (/* binding */ PushRpc)\n/* harmony export */ });\n/* harmony import */ var _waku_proto__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @waku/proto */ \"./node_modules/@waku/proto/dist/index.js\");\n/* harmony import */ var uuid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! uuid */ \"./node_modules/uuid/dist/esm-browser/v4.js\");\n\n\nclass PushRpc {\n proto;\n constructor(proto) {\n this.proto = proto;\n }\n static createRequest(message, pubSubTopic) {\n return new PushRpc({\n requestId: (0,uuid__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(),\n request: {\n message: message,\n pubsubTopic: pubSubTopic,\n },\n response: undefined,\n });\n }\n static decode(bytes) {\n const res = _waku_proto__WEBPACK_IMPORTED_MODULE_0__.proto_lightpush.PushRpc.decode(bytes);\n return new PushRpc(res);\n }\n encode() {\n return _waku_proto__WEBPACK_IMPORTED_MODULE_0__.proto_lightpush.PushRpc.encode(this.proto);\n }\n get query() {\n return this.proto.request;\n }\n get response() {\n return this.proto.response;\n }\n}\n//# sourceMappingURL=push_rpc.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/core/dist/lib/light_push/push_rpc.js?");
/***/ }),
/***/ "./node_modules/@waku/core/dist/lib/message/index.js":
/*!***********************************************************!*\
!*** ./node_modules/@waku/core/dist/lib/message/index.js ***!
\***********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ version_0: () => (/* reexport module object */ _version_0_js__WEBPACK_IMPORTED_MODULE_0__)\n/* harmony export */ });\n/* harmony import */ var _version_0_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./version_0.js */ \"./node_modules/@waku/core/dist/lib/message/version_0.js\");\n\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/core/dist/lib/message/index.js?");
/***/ }),
/***/ "./node_modules/@waku/core/dist/lib/message/version_0.js":
/*!***************************************************************!*\
!*** ./node_modules/@waku/core/dist/lib/message/version_0.js ***!
\***************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DecodedMessage: () => (/* binding */ DecodedMessage),\n/* harmony export */ Decoder: () => (/* binding */ Decoder),\n/* harmony export */ Encoder: () => (/* binding */ Encoder),\n/* harmony export */ Version: () => (/* binding */ Version),\n/* harmony export */ createDecoder: () => (/* binding */ createDecoder),\n/* harmony export */ createEncoder: () => (/* binding */ createEncoder),\n/* harmony export */ proto: () => (/* reexport safe */ _waku_proto__WEBPACK_IMPORTED_MODULE_0__.proto_message)\n/* harmony export */ });\n/* harmony import */ var _waku_proto__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @waku/proto */ \"./node_modules/@waku/proto/dist/index.js\");\n/* harmony import */ var debug__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! debug */ \"./node_modules/debug/src/browser.js\");\n\n\nconst log = debug__WEBPACK_IMPORTED_MODULE_1__(\"waku:message:version-0\");\nconst OneMillion = BigInt(1000000);\nconst Version = 0;\n\nclass DecodedMessage {\n pubSubTopic;\n proto;\n constructor(pubSubTopic, proto) {\n this.pubSubTopic = pubSubTopic;\n this.proto = proto;\n }\n get ephemeral() {\n return Boolean(this.proto.ephemeral);\n }\n get payload() {\n return this.proto.payload;\n }\n get contentTopic() {\n return this.proto.contentTopic;\n }\n get _rawTimestamp() {\n return this.proto.timestamp;\n }\n get timestamp() {\n // In the case we receive a value that is bigger than JS's max number,\n // we catch the error and return undefined.\n try {\n if (this.proto.timestamp) {\n // nanoseconds 10^-9 to milliseconds 10^-3\n const timestamp = this.proto.timestamp / OneMillion;\n return new Date(Number(timestamp));\n }\n return;\n }\n catch (e) {\n return;\n }\n }\n get meta() {\n return this.proto.meta;\n }\n get version() {\n // https://rfc.vac.dev/spec/14/\n // > If omitted, the value SHOULD be interpreted as version 0.\n return this.proto.version ?? 0;\n }\n get rateLimitProof() {\n return this.proto.rateLimitProof;\n }\n}\nclass Encoder {\n contentTopic;\n ephemeral;\n metaSetter;\n constructor(contentTopic, ephemeral = false, metaSetter) {\n this.contentTopic = contentTopic;\n this.ephemeral = ephemeral;\n this.metaSetter = metaSetter;\n if (!contentTopic || contentTopic === \"\") {\n throw new Error(\"Content topic must be specified\");\n }\n }\n async toWire(message) {\n return _waku_proto__WEBPACK_IMPORTED_MODULE_0__.proto_message.WakuMessage.encode(await this.toProtoObj(message));\n }\n async toProtoObj(message) {\n const timestamp = message.timestamp ?? new Date();\n const protoMessage = {\n payload: message.payload,\n version: Version,\n contentTopic: this.contentTopic,\n timestamp: BigInt(timestamp.valueOf()) * OneMillion,\n meta: undefined,\n rateLimitProof: message.rateLimitProof,\n ephemeral: this.ephemeral,\n };\n if (this.metaSetter) {\n const meta = this.metaSetter(protoMessage);\n return { ...protoMessage, meta };\n }\n return protoMessage;\n }\n}\n/**\n * Creates an encoder that encode messages without Waku level encryption or signature.\n *\n * An encoder is used to encode messages in the [`14/WAKU2-MESSAGE](https://rfc.vac.dev/spec/14/)\n * format to be sent over the Waku network. The resulting encoder can then be\n * pass to { @link @waku/interfaces.LightPush.push } or\n * { @link @waku/interfaces.Relay.send } to automatically encode outgoing\n * messages.\n */\nfunction createEncoder({ contentTopic, ephemeral, metaSetter, }) {\n return new Encoder(conte
/***/ }),
/***/ "./node_modules/@waku/core/dist/lib/store/history_rpc.js":
/*!***************************************************************!*\
!*** ./node_modules/@waku/core/dist/lib/store/history_rpc.js ***!
\***************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ HistoryRpc: () => (/* binding */ HistoryRpc),\n/* harmony export */ PageDirection: () => (/* binding */ PageDirection)\n/* harmony export */ });\n/* harmony import */ var _waku_proto__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @waku/proto */ \"./node_modules/@waku/proto/dist/index.js\");\n/* harmony import */ var uuid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! uuid */ \"./node_modules/uuid/dist/esm-browser/v4.js\");\n\n\nconst OneMillion = BigInt(1000000);\nvar PageDirection;\n(function (PageDirection) {\n PageDirection[\"BACKWARD\"] = \"backward\";\n PageDirection[\"FORWARD\"] = \"forward\";\n})(PageDirection || (PageDirection = {}));\nclass HistoryRpc {\n proto;\n constructor(proto) {\n this.proto = proto;\n }\n get query() {\n return this.proto.query;\n }\n get response() {\n return this.proto.response;\n }\n /**\n * Create History Query.\n */\n static createQuery(params) {\n const contentFilters = params.contentTopics.map((contentTopic) => {\n return { contentTopic };\n });\n const direction = directionToProto(params.pageDirection);\n const pagingInfo = {\n pageSize: BigInt(params.pageSize),\n cursor: params.cursor,\n direction,\n };\n let startTime, endTime;\n if (params.startTime) {\n // milliseconds 10^-3 to nanoseconds 10^-9\n startTime = BigInt(params.startTime.valueOf()) * OneMillion;\n }\n if (params.endTime) {\n // milliseconds 10^-3 to nanoseconds 10^-9\n endTime = BigInt(params.endTime.valueOf()) * OneMillion;\n }\n return new HistoryRpc({\n requestId: (0,uuid__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(),\n query: {\n pubsubTopic: params.pubSubTopic,\n contentFilters,\n pagingInfo,\n startTime,\n endTime,\n },\n response: undefined,\n });\n }\n decode(bytes) {\n const res = _waku_proto__WEBPACK_IMPORTED_MODULE_0__.proto_store.HistoryRpc.decode(bytes);\n return new HistoryRpc(res);\n }\n encode() {\n return _waku_proto__WEBPACK_IMPORTED_MODULE_0__.proto_store.HistoryRpc.encode(this.proto);\n }\n}\nfunction directionToProto(pageDirection) {\n switch (pageDirection) {\n case PageDirection.BACKWARD:\n return _waku_proto__WEBPACK_IMPORTED_MODULE_0__.proto_store.PagingInfo.Direction.BACKWARD;\n case PageDirection.FORWARD:\n return _waku_proto__WEBPACK_IMPORTED_MODULE_0__.proto_store.PagingInfo.Direction.FORWARD;\n default:\n return _waku_proto__WEBPACK_IMPORTED_MODULE_0__.proto_store.PagingInfo.Direction.BACKWARD;\n }\n}\n//# sourceMappingURL=history_rpc.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/core/dist/lib/store/history_rpc.js?");
/***/ }),
/***/ "./node_modules/@waku/core/dist/lib/store/index.js":
/*!*********************************************************!*\
!*** ./node_modules/@waku/core/dist/lib/store/index.js ***!
\*********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DefaultPageSize: () => (/* binding */ DefaultPageSize),\n/* harmony export */ PageDirection: () => (/* reexport safe */ _history_rpc_js__WEBPACK_IMPORTED_MODULE_12__.PageDirection),\n/* harmony export */ StoreCodec: () => (/* binding */ StoreCodec),\n/* harmony export */ createCursor: () => (/* binding */ createCursor),\n/* harmony export */ wakuStore: () => (/* binding */ wakuStore)\n/* harmony export */ });\n/* harmony import */ var _noble_hashes_sha256__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @noble/hashes/sha256 */ \"./node_modules/@noble/hashes/esm/sha256.js\");\n/* harmony import */ var _waku_proto__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @waku/proto */ \"./node_modules/@waku/proto/dist/index.js\");\n/* harmony import */ var _waku_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @waku/utils */ \"./node_modules/@waku/utils/dist/index.js\");\n/* harmony import */ var _waku_utils_bytes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @waku/utils/bytes */ \"./node_modules/@waku/utils/dist/bytes/index.js\");\n/* harmony import */ var debug__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! debug */ \"./node_modules/debug/src/browser.js\");\n/* harmony import */ var it_all__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! it-all */ \"./node_modules/it-all/dist/src/index.js\");\n/* harmony import */ var it_length_prefixed__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! it-length-prefixed */ \"./node_modules/it-length-prefixed/dist/src/index.js\");\n/* harmony import */ var it_pipe__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! it-pipe */ \"./node_modules/it-pipe/dist/src/index.js\");\n/* harmony import */ var uint8arraylist__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! uint8arraylist */ \"./node_modules/uint8arraylist/dist/src/index.js\");\n/* harmony import */ var _base_protocol_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../base_protocol.js */ \"./node_modules/@waku/core/dist/lib/base_protocol.js\");\n/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../constants.js */ \"./node_modules/@waku/core/dist/lib/constants.js\");\n/* harmony import */ var _to_proto_message_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../to_proto_message.js */ \"./node_modules/@waku/core/dist/lib/to_proto_message.js\");\n/* harmony import */ var _history_rpc_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./history_rpc.js */ \"./node_modules/@waku/core/dist/lib/store/history_rpc.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar HistoryError = _waku_proto__WEBPACK_IMPORTED_MODULE_1__.proto_store.HistoryResponse.HistoryError;\nconst log = debug__WEBPACK_IMPORTED_MODULE_4__(\"waku:store\");\nconst StoreCodec = \"/vac/waku/store/2.0.0-beta4\";\nconst DefaultPageSize = 10;\n\n/**\n * Implements the [Waku v2 Store protocol](https://rfc.vac.dev/spec/13/).\n *\n * The Waku Store protocol can be used to retrieved historical messages.\n */\nclass Store extends _base_protocol_js__WEBPACK_IMPORTED_MODULE_9__.BaseProtocol {\n options;\n constructor(libp2p, options) {\n super(StoreCodec, libp2p.components);\n this.options = options ?? {};\n }\n /**\n * Do a query to a Waku Store to retrieve historical/missed messages.\n *\n * The callback function takes a `WakuMessage` in input,\n * messages are processed in order:\n * - oldest to latest if `options.pageDirection` == { @link PageDirection.FORWARD }\n * - latest to oldest if `options.pageDirection` == { @link PageDirection.BACKWARD }\n *\n * The ordering may affect performance.\n * The ordering depends on the behavior of the remote store node.\n * If strong ordering is needed, you may need to handle this at application level\n * and set your own timestamps too (the WakuMessage timestamps are not certified).\n *\n * @throws If not able to
/***/ }),
/***/ "./node_modules/@waku/core/dist/lib/to_proto_message.js":
/*!**************************************************************!*\
!*** ./node_modules/@waku/core/dist/lib/to_proto_message.js ***!
\**************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ toProtoMessage: () => (/* binding */ toProtoMessage)\n/* harmony export */ });\nconst EmptyMessage = {\n payload: new Uint8Array(),\n contentTopic: \"\",\n version: undefined,\n timestamp: undefined,\n meta: undefined,\n rateLimitProof: undefined,\n ephemeral: undefined,\n};\nfunction toProtoMessage(wire) {\n return { ...EmptyMessage, ...wire };\n}\n//# sourceMappingURL=to_proto_message.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/core/dist/lib/to_proto_message.js?");
/***/ }),
/***/ "./node_modules/@waku/core/dist/lib/wait_for_remote_peer.js":
/*!******************************************************************!*\
!*** ./node_modules/@waku/core/dist/lib/wait_for_remote_peer.js ***!
\******************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ waitForRemotePeer: () => (/* binding */ waitForRemotePeer)\n/* harmony export */ });\n/* harmony import */ var _waku_interfaces__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @waku/interfaces */ \"./node_modules/@waku/interfaces/dist/index.js\");\n/* harmony import */ var debug__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! debug */ \"./node_modules/debug/src/browser.js\");\n/* harmony import */ var p_event__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! p-event */ \"./node_modules/@waku/core/node_modules/p-event/index.js\");\n\n\n\nconst log = debug__WEBPACK_IMPORTED_MODULE_1__(\"waku:wait-for-remote-peer\");\n/**\n * Wait for a remote peer to be ready given the passed protocols.\n * Must be used after attempting to connect to nodes, using\n * {@link @waku/core.WakuNode.dial} or a bootstrap method with\n * {@link @waku/sdk.createLightNode}.\n *\n * If the passed protocols is a GossipSub protocol, then it resolves only once\n * a peer is in a mesh, to help ensure that other peers will send and receive\n * message to us.\n *\n * @param waku The Waku Node\n * @param protocols The protocols that need to be enabled by remote peers.\n * @param timeoutMs A timeout value in milliseconds..\n *\n * @returns A promise that **resolves** if all desired protocols are fulfilled by\n * remote nodes, **rejects** if the timeoutMs is reached.\n * @throws If passing a protocol that is not mounted\n * @default Wait for remote peers with protocols enabled locally and no time out is applied.\n */\nasync function waitForRemotePeer(waku, protocols, timeoutMs) {\n protocols = protocols ?? getEnabledProtocols(waku);\n if (!waku.isStarted())\n return Promise.reject(\"Waku node is not started\");\n const promises = [];\n if (protocols.includes(_waku_interfaces__WEBPACK_IMPORTED_MODULE_0__.Protocols.Relay)) {\n if (!waku.relay)\n throw new Error(\"Cannot wait for Relay peer: protocol not mounted\");\n promises.push(waitForGossipSubPeerInMesh(waku.relay));\n }\n if (protocols.includes(_waku_interfaces__WEBPACK_IMPORTED_MODULE_0__.Protocols.Store)) {\n if (!waku.store)\n throw new Error(\"Cannot wait for Store peer: protocol not mounted\");\n promises.push(waitForConnectedPeer(waku.store));\n }\n if (protocols.includes(_waku_interfaces__WEBPACK_IMPORTED_MODULE_0__.Protocols.LightPush)) {\n if (!waku.lightPush)\n throw new Error(\"Cannot wait for LightPush peer: protocol not mounted\");\n promises.push(waitForConnectedPeer(waku.lightPush));\n }\n if (protocols.includes(_waku_interfaces__WEBPACK_IMPORTED_MODULE_0__.Protocols.Filter)) {\n if (!waku.filter)\n throw new Error(\"Cannot wait for Filter peer: protocol not mounted\");\n promises.push(waitForConnectedPeer(waku.filter));\n }\n if (timeoutMs) {\n await rejectOnTimeout(Promise.all(promises), timeoutMs, \"Timed out waiting for a remote peer.\");\n }\n else {\n await Promise.all(promises);\n }\n}\n/**\n * Wait for a peer with the given protocol to be connected.\n */\nasync function waitForConnectedPeer(protocol) {\n const codec = protocol.multicodec;\n const peers = await protocol.peers();\n if (peers.length) {\n log(`${codec} peer found: `, peers[0].id.toString());\n return;\n }\n await new Promise((resolve) => {\n const cb = (evt) => {\n if (evt.detail?.protocols?.includes(codec)) {\n log(\"Resolving for\", codec, evt.detail.protocols);\n protocol.removeLibp2pEventListener(\"peer:identify\", cb);\n resolve();\n }\n };\n protocol.addLibp2pEventListener(\"peer:identify\", cb);\n });\n}\n/**\n * Wait for a peer with the given protocol to be connected and in the gossipsub\n * mesh.\n */\nasync function waitForGossipSubPeerInMesh(waku) {\n let peers = waku.
/***/ }),
/***/ "./node_modules/@waku/core/dist/lib/waku.js":
/*!**************************************************!*\
!*** ./node_modules/@waku/core/dist/lib/waku.js ***!
\**************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DefaultPingKeepAliveValueSecs: () => (/* binding */ DefaultPingKeepAliveValueSecs),\n/* harmony export */ DefaultRelayKeepAliveValueSecs: () => (/* binding */ DefaultRelayKeepAliveValueSecs),\n/* harmony export */ DefaultUserAgent: () => (/* binding */ DefaultUserAgent),\n/* harmony export */ WakuNode: () => (/* binding */ WakuNode)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interface_peer_id__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interface-peer-id */ \"./node_modules/@libp2p/interface-peer-id/dist/src/index.js\");\n/* harmony import */ var _multiformats_multiaddr__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @multiformats/multiaddr */ \"./node_modules/@multiformats/multiaddr/dist/src/index.js\");\n/* harmony import */ var _waku_interfaces__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @waku/interfaces */ \"./node_modules/@waku/interfaces/dist/index.js\");\n/* harmony import */ var debug__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! debug */ \"./node_modules/debug/src/browser.js\");\n/* harmony import */ var _connection_manager_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./connection_manager.js */ \"./node_modules/@waku/core/dist/lib/connection_manager.js\");\n\n\n\n\n\nconst DefaultPingKeepAliveValueSecs = 0;\nconst DefaultRelayKeepAliveValueSecs = 5 * 60;\nconst DefaultUserAgent = \"js-waku\";\nconst log = debug__WEBPACK_IMPORTED_MODULE_3__(\"waku:waku\");\nclass WakuNode {\n libp2p;\n relay;\n store;\n filter;\n lightPush;\n connectionManager;\n constructor(options, libp2p, store, lightPush, filter, relay) {\n this.libp2p = libp2p;\n if (store) {\n this.store = store(libp2p);\n }\n if (filter) {\n this.filter = filter(libp2p);\n }\n if (lightPush) {\n this.lightPush = lightPush(libp2p);\n }\n if (relay) {\n this.relay = relay(libp2p);\n }\n const pingKeepAlive = options.pingKeepAlive || DefaultPingKeepAliveValueSecs;\n const relayKeepAlive = this.relay\n ? options.relayKeepAlive || DefaultRelayKeepAliveValueSecs\n : 0;\n const peerId = this.libp2p.peerId.toString();\n this.connectionManager = _connection_manager_js__WEBPACK_IMPORTED_MODULE_4__.ConnectionManager.create(peerId, libp2p, { pingKeepAlive, relayKeepAlive }, this.relay);\n log(\"Waku node created\", peerId, `relay: ${!!this.relay}, store: ${!!this.store}, light push: ${!!this\n .lightPush}, filter: ${!!this.filter}`);\n }\n /**\n * Dials to the provided peer.\n *\n * @param peer The peer to dial\n * @param protocols Waku protocols we expect from the peer; Defaults to mounted protocols\n */\n async dial(peer, protocols) {\n const _protocols = protocols ?? [];\n const peerId = mapToPeerIdOrMultiaddr(peer);\n if (typeof protocols === \"undefined\") {\n this.relay && _protocols.push(_waku_interfaces__WEBPACK_IMPORTED_MODULE_2__.Protocols.Relay);\n this.store && _protocols.push(_waku_interfaces__WEBPACK_IMPORTED_MODULE_2__.Protocols.Store);\n this.filter && _protocols.push(_waku_interfaces__WEBPACK_IMPORTED_MODULE_2__.Protocols.Filter);\n this.lightPush && _protocols.push(_waku_interfaces__WEBPACK_IMPORTED_MODULE_2__.Protocols.LightPush);\n }\n const codecs = [];\n if (_protocols.includes(_waku_interfaces__WEBPACK_IMPORTED_MODULE_2__.Protocols.Relay)) {\n if (this.relay) {\n this.relay.gossipSub.multicodecs.forEach((codec) => codecs.push(codec));\n }\n else {\n log(\"Relay codec not included in dial codec: protocol not mounted locally\");\n }\n }\n if (_protocols.includes(_waku_interfaces__WEBPACK_IMPORTED_MODULE_2__.Protocols.Store)) {\n
/***/ }),
/***/ "./node_modules/@waku/core/node_modules/p-event/index.js":
/*!***************************************************************!*\
!*** ./node_modules/@waku/core/node_modules/p-event/index.js ***!
\***************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ TimeoutError: () => (/* reexport safe */ p_timeout__WEBPACK_IMPORTED_MODULE_0__.TimeoutError),\n/* harmony export */ pEvent: () => (/* binding */ pEvent),\n/* harmony export */ pEventIterator: () => (/* binding */ pEventIterator),\n/* harmony export */ pEventMultiple: () => (/* binding */ pEventMultiple)\n/* harmony export */ });\n/* harmony import */ var p_timeout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! p-timeout */ \"./node_modules/@waku/core/node_modules/p-timeout/index.js\");\n\n\nconst normalizeEmitter = emitter => {\n\tconst addListener = emitter.on || emitter.addListener || emitter.addEventListener;\n\tconst removeListener = emitter.off || emitter.removeListener || emitter.removeEventListener;\n\n\tif (!addListener || !removeListener) {\n\t\tthrow new TypeError('Emitter is not compatible');\n\t}\n\n\treturn {\n\t\taddListener: addListener.bind(emitter),\n\t\tremoveListener: removeListener.bind(emitter),\n\t};\n};\n\nfunction pEventMultiple(emitter, event, options) {\n\tlet cancel;\n\tconst returnValue = new Promise((resolve, reject) => {\n\t\toptions = {\n\t\t\trejectionEvents: ['error'],\n\t\t\tmultiArgs: false,\n\t\t\tresolveImmediately: false,\n\t\t\t...options,\n\t\t};\n\n\t\tif (!(options.count >= 0 && (options.count === Number.POSITIVE_INFINITY || Number.isInteger(options.count)))) {\n\t\t\tthrow new TypeError('The `count` option should be at least 0 or more');\n\t\t}\n\n\t\t// Allow multiple events\n\t\tconst events = [event].flat();\n\n\t\tconst items = [];\n\t\tconst {addListener, removeListener} = normalizeEmitter(emitter);\n\n\t\tconst onItem = (...arguments_) => {\n\t\t\tconst value = options.multiArgs ? arguments_ : arguments_[0];\n\n\t\t\t// eslint-disable-next-line unicorn/no-array-callback-reference\n\t\t\tif (options.filter && !options.filter(value)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\titems.push(value);\n\n\t\t\tif (options.count === items.length) {\n\t\t\t\tcancel();\n\t\t\t\tresolve(items);\n\t\t\t}\n\t\t};\n\n\t\tconst rejectHandler = error => {\n\t\t\tcancel();\n\t\t\treject(error);\n\t\t};\n\n\t\tcancel = () => {\n\t\t\tfor (const event of events) {\n\t\t\t\tremoveListener(event, onItem);\n\t\t\t}\n\n\t\t\tfor (const rejectionEvent of options.rejectionEvents) {\n\t\t\t\tremoveListener(rejectionEvent, rejectHandler);\n\t\t\t}\n\t\t};\n\n\t\tfor (const event of events) {\n\t\t\taddListener(event, onItem);\n\t\t}\n\n\t\tfor (const rejectionEvent of options.rejectionEvents) {\n\t\t\taddListener(rejectionEvent, rejectHandler);\n\t\t}\n\n\t\tif (options.resolveImmediately) {\n\t\t\tresolve(items);\n\t\t}\n\t});\n\n\treturnValue.cancel = cancel;\n\n\tif (typeof options.timeout === 'number') {\n\t\tconst timeout = (0,p_timeout__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(returnValue, options.timeout);\n\t\ttimeout.cancel = cancel;\n\t\treturn timeout;\n\t}\n\n\treturn returnValue;\n}\n\nfunction pEvent(emitter, event, options) {\n\tif (typeof options === 'function') {\n\t\toptions = {filter: options};\n\t}\n\n\toptions = {\n\t\t...options,\n\t\tcount: 1,\n\t\tresolveImmediately: false,\n\t};\n\n\tconst arrayPromise = pEventMultiple(emitter, event, options);\n\tconst promise = arrayPromise.then(array => array[0]); // eslint-disable-line promise/prefer-await-to-then\n\tpromise.cancel = arrayPromise.cancel;\n\n\treturn promise;\n}\n\nfunction pEventIterator(emitter, event, options) {\n\tif (typeof options === 'function') {\n\t\toptions = {filter: options};\n\t}\n\n\t// Allow multiple events\n\tconst events = [event].flat();\n\n\toptions = {\n\t\trejectionEvents: ['error'],\n\t\tresolutionEvents: [],\n\t\tlimit: Number.POSITIVE_INFINITY,\n\t\tmultiArgs: false,\n\t\t...options,\n\t};\n\n\tconst {limit} = options;\n\tconst isValidLimit = limit >= 0 && (limit === Number.POSITIVE_INFINITY || Number.isInteger(limit));\n\tif (!isValidLimit) {\n\t\tthrow new TypeError('The `limit` option should be a non-negative integer or Infinity');\n\t}\n\n\tif (li
/***/ }),
/***/ "./node_modules/@waku/core/node_modules/p-timeout/index.js":
/*!*****************************************************************!*\
!*** ./node_modules/@waku/core/node_modules/p-timeout/index.js ***!
\*****************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AbortError: () => (/* binding */ AbortError),\n/* harmony export */ TimeoutError: () => (/* binding */ TimeoutError),\n/* harmony export */ \"default\": () => (/* binding */ pTimeout)\n/* harmony export */ });\nclass TimeoutError extends Error {\n\tconstructor(message) {\n\t\tsuper(message);\n\t\tthis.name = 'TimeoutError';\n\t}\n}\n\n/**\nAn error to be thrown when the request is aborted by AbortController.\nDOMException is thrown instead of this Error when DOMException is available.\n*/\nclass AbortError extends Error {\n\tconstructor(message) {\n\t\tsuper();\n\t\tthis.name = 'AbortError';\n\t\tthis.message = message;\n\t}\n}\n\n/**\nTODO: Remove AbortError and just throw DOMException when targeting Node 18.\n*/\nconst getDOMException = errorMessage => globalThis.DOMException === undefined ?\n\tnew AbortError(errorMessage) :\n\tnew DOMException(errorMessage);\n\n/**\nTODO: Remove below function and just 'reject(signal.reason)' when targeting Node 18.\n*/\nconst getAbortedReason = signal => {\n\tconst reason = signal.reason === undefined ?\n\t\tgetDOMException('This operation was aborted.') :\n\t\tsignal.reason;\n\n\treturn reason instanceof Error ? reason : getDOMException(reason);\n};\n\nfunction pTimeout(promise, milliseconds, fallback, options) {\n\tlet timer;\n\n\tconst cancelablePromise = new Promise((resolve, reject) => {\n\t\tif (typeof milliseconds !== 'number' || Math.sign(milliseconds) !== 1) {\n\t\t\tthrow new TypeError(`Expected \\`milliseconds\\` to be a positive number, got \\`${milliseconds}\\``);\n\t\t}\n\n\t\tif (milliseconds === Number.POSITIVE_INFINITY) {\n\t\t\tresolve(promise);\n\t\t\treturn;\n\t\t}\n\n\t\toptions = {\n\t\t\tcustomTimers: {setTimeout, clearTimeout},\n\t\t\t...options\n\t\t};\n\n\t\tif (options.signal) {\n\t\t\tconst {signal} = options;\n\t\t\tif (signal.aborted) {\n\t\t\t\treject(getAbortedReason(signal));\n\t\t\t}\n\n\t\t\tsignal.addEventListener('abort', () => {\n\t\t\t\treject(getAbortedReason(signal));\n\t\t\t});\n\t\t}\n\n\t\ttimer = options.customTimers.setTimeout.call(undefined, () => {\n\t\t\tif (typeof fallback === 'function') {\n\t\t\t\ttry {\n\t\t\t\t\tresolve(fallback());\n\t\t\t\t} catch (error) {\n\t\t\t\t\treject(error);\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst message = typeof fallback === 'string' ? fallback : `Promise timed out after ${milliseconds} milliseconds`;\n\t\t\tconst timeoutError = fallback instanceof Error ? fallback : new TimeoutError(message);\n\n\t\t\tif (typeof promise.cancel === 'function') {\n\t\t\t\tpromise.cancel();\n\t\t\t}\n\n\t\t\treject(timeoutError);\n\t\t}, milliseconds);\n\n\t\t(async () => {\n\t\t\ttry {\n\t\t\t\tresolve(await promise);\n\t\t\t} catch (error) {\n\t\t\t\treject(error);\n\t\t\t} finally {\n\t\t\t\toptions.customTimers.clearTimeout.call(undefined, timer);\n\t\t\t}\n\t\t})();\n\t});\n\n\tcancelablePromise.clear = () => {\n\t\tclearTimeout(timer);\n\t\ttimer = undefined;\n\t};\n\n\treturn cancelablePromise;\n}\n\n\n//# sourceURL=webpack://light/./node_modules/@waku/core/node_modules/p-timeout/index.js?");
/***/ }),
/***/ "./node_modules/@waku/dns-discovery/dist/dns.js":
/*!******************************************************!*\
!*** ./node_modules/@waku/dns-discovery/dist/dns.js ***!
\******************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DnsNodeDiscovery: () => (/* binding */ DnsNodeDiscovery)\n/* harmony export */ });\n/* harmony import */ var _waku_enr__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @waku/enr */ \"./node_modules/@waku/enr/dist/index.js\");\n/* harmony import */ var debug__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! debug */ \"./node_modules/debug/src/browser.js\");\n/* harmony import */ var _dns_over_https_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./dns_over_https.js */ \"./node_modules/@waku/dns-discovery/dist/dns_over_https.js\");\n/* harmony import */ var _enrtree_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./enrtree.js */ \"./node_modules/@waku/dns-discovery/dist/enrtree.js\");\n/* harmony import */ var _fetch_nodes_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./fetch_nodes.js */ \"./node_modules/@waku/dns-discovery/dist/fetch_nodes.js\");\n\n\n\n\n\nconst log = debug__WEBPACK_IMPORTED_MODULE_1__(\"waku:discovery:dns\");\nclass DnsNodeDiscovery {\n dns;\n _DNSTreeCache;\n _errorTolerance = 10;\n static async dnsOverHttp(dnsClient) {\n if (!dnsClient) {\n dnsClient = await _dns_over_https_js__WEBPACK_IMPORTED_MODULE_2__.DnsOverHttps.create();\n }\n return new DnsNodeDiscovery(dnsClient);\n }\n /**\n * Returns a list of verified peers listed in an EIP-1459 DNS tree. Method may\n * return fewer peers than requested if @link wantedNodeCapabilityCount requires\n * larger quantity of peers than available or the number of errors/duplicate\n * peers encountered by randomized search exceeds the sum of the fields of\n * @link wantedNodeCapabilityCount plus the @link _errorTolerance factor.\n */\n async getPeers(enrTreeUrls, wantedNodeCapabilityCount) {\n const networkIndex = Math.floor(Math.random() * enrTreeUrls.length);\n const { publicKey, domain } = _enrtree_js__WEBPACK_IMPORTED_MODULE_3__.ENRTree.parseTree(enrTreeUrls[networkIndex]);\n const context = {\n domain,\n publicKey,\n visits: {},\n };\n const peers = await (0,_fetch_nodes_js__WEBPACK_IMPORTED_MODULE_4__.fetchNodesUntilCapabilitiesFulfilled)(wantedNodeCapabilityCount, this._errorTolerance, () => this._search(domain, context));\n log(\"retrieved peers: \", peers.map((peer) => {\n return {\n id: peer.peerId?.toString(),\n multiaddrs: peer.multiaddrs?.map((ma) => ma.toString()),\n };\n }));\n return peers;\n }\n constructor(dns) {\n this._DNSTreeCache = {};\n this.dns = dns;\n }\n /**\n * {@inheritDoc getPeers}\n */\n async *getNextPeer(enrTreeUrls, wantedNodeCapabilityCount) {\n const networkIndex = Math.floor(Math.random() * enrTreeUrls.length);\n const { publicKey, domain } = _enrtree_js__WEBPACK_IMPORTED_MODULE_3__.ENRTree.parseTree(enrTreeUrls[networkIndex]);\n const context = {\n domain,\n publicKey,\n visits: {},\n };\n for await (const peer of (0,_fetch_nodes_js__WEBPACK_IMPORTED_MODULE_4__.yieldNodesUntilCapabilitiesFulfilled)(wantedNodeCapabilityCount, this._errorTolerance, () => this._search(domain, context))) {\n yield peer;\n }\n }\n /**\n * Runs a recursive, randomized descent of the DNS tree to retrieve a single\n * ENR record as an ENR. Returns null if parsing or DNS resolution fails.\n */\n async _search(subdomain, context) {\n try {\n const entry = await this._getTXTRecord(subdomain, context);\n context.visits[subdomain] = true;\n let next;\n let branches;\n const entryType = getEntryType(entry);\n try {\n switch (entryType) {\n case _enrtree_js__WEBPACK_IMPORTED_MODULE_3__.ENRTree.ROOT_PREFIX:\n
/***/ }),
/***/ "./node_modules/@waku/dns-discovery/dist/dns_over_https.js":
/*!*****************************************************************!*\
!*** ./node_modules/@waku/dns-discovery/dist/dns_over_https.js ***!
\*****************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DnsOverHttps: () => (/* binding */ DnsOverHttps)\n/* harmony export */ });\n/* harmony import */ var _waku_utils_bytes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @waku/utils/bytes */ \"./node_modules/@waku/utils/dist/bytes/index.js\");\n/* harmony import */ var debug__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! debug */ \"./node_modules/debug/src/browser.js\");\n/* harmony import */ var dns_query__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! dns-query */ \"./node_modules/dns-query/index.mjs\");\n\n\n\nconst log = debug__WEBPACK_IMPORTED_MODULE_1__(\"waku:dns-over-https\");\nclass DnsOverHttps {\n endpoints;\n retries;\n /**\n * Create new Dns-Over-Http DNS client.\n *\n * @param endpoints The endpoints for Dns-Over-Https queries;\n * Defaults to using dns-query's API..\n * @param retries Retries if a given endpoint fails.\n *\n * @throws {code: string} If DNS query fails.\n */\n static async create(endpoints, retries) {\n const _endpoints = endpoints ?? (await dns_query__WEBPACK_IMPORTED_MODULE_2__.wellknown.endpoints(\"doh\"));\n return new DnsOverHttps(_endpoints, retries);\n }\n constructor(endpoints, retries = 3) {\n this.endpoints = endpoints;\n this.retries = retries;\n }\n /**\n * Resolves a TXT record\n *\n * @param domain The domain name\n *\n * @throws if the query fails\n */\n async resolveTXT(domain) {\n let answers;\n try {\n const res = await (0,dns_query__WEBPACK_IMPORTED_MODULE_2__.query)({\n question: { type: \"TXT\", name: domain },\n }, {\n endpoints: this.endpoints,\n retries: this.retries,\n });\n answers = res.answers;\n }\n catch (error) {\n log(\"query failed: \", error);\n throw new Error(\"DNS query failed\");\n }\n if (!answers)\n throw new Error(`Could not resolve ${domain}`);\n const data = answers.map((a) => a.data);\n const result = [];\n data.forEach((d) => {\n if (typeof d === \"string\") {\n result.push(d);\n }\n else if (Array.isArray(d)) {\n d.forEach((sd) => {\n if (typeof sd === \"string\") {\n result.push(sd);\n }\n else {\n result.push((0,_waku_utils_bytes__WEBPACK_IMPORTED_MODULE_0__.bytesToUtf8)(sd));\n }\n });\n }\n else {\n result.push((0,_waku_utils_bytes__WEBPACK_IMPORTED_MODULE_0__.bytesToUtf8)(d));\n }\n });\n return result;\n }\n}\n//# sourceMappingURL=dns_over_https.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/dns-discovery/dist/dns_over_https.js?");
/***/ }),
/***/ "./node_modules/@waku/dns-discovery/dist/enrtree.js":
/*!**********************************************************!*\
!*** ./node_modules/@waku/dns-discovery/dist/enrtree.js ***!
\**********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ENRTree: () => (/* binding */ ENRTree)\n/* harmony export */ });\n/* harmony import */ var _waku_enr__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @waku/enr */ \"./node_modules/@waku/enr/dist/index.js\");\n/* harmony import */ var _waku_utils_bytes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @waku/utils/bytes */ \"./node_modules/@waku/utils/dist/bytes/index.js\");\n/* harmony import */ var hi_base32__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! hi-base32 */ \"./node_modules/hi-base32/src/base32.js\");\n/* harmony import */ var uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! uint8arrays/from-string */ \"./node_modules/uint8arrays/dist/src/from-string.js\");\n\n\n\n\n\nclass ENRTree {\n static RECORD_PREFIX = _waku_enr__WEBPACK_IMPORTED_MODULE_0__.ENR.RECORD_PREFIX;\n static TREE_PREFIX = \"enrtree:\";\n static BRANCH_PREFIX = \"enrtree-branch:\";\n static ROOT_PREFIX = \"enrtree-root:\";\n /**\n * Extracts the branch subdomain referenced by a DNS tree root string after verifying\n * the root record signature with its base32 compressed public key.\n */\n static parseAndVerifyRoot(root, publicKey) {\n if (!root.startsWith(this.ROOT_PREFIX))\n throw new Error(`ENRTree root entry must start with '${this.ROOT_PREFIX}'`);\n const rootValues = ENRTree.parseRootValues(root);\n const decodedPublicKey = hi_base32__WEBPACK_IMPORTED_MODULE_2__.decode.asBytes(publicKey);\n // The signature is a 65-byte secp256k1 over the keccak256 hash\n // of the record content, excluding the `sig=` part, encoded as URL-safe base64 string\n // (Trailing recovery bit must be trimmed to pass `ecdsaVerify` method)\n const signedComponent = root.split(\" sig\")[0];\n const signedComponentBuffer = (0,_waku_utils_bytes__WEBPACK_IMPORTED_MODULE_1__.utf8ToBytes)(signedComponent);\n const signatureBuffer = (0,uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_3__.fromString)(rootValues.signature, \"base64url\").slice(0, 64);\n const isVerified = (0,_waku_enr__WEBPACK_IMPORTED_MODULE_0__.verifySignature)(signatureBuffer, (0,_waku_enr__WEBPACK_IMPORTED_MODULE_0__.keccak256)(signedComponentBuffer), new Uint8Array(decodedPublicKey));\n if (!isVerified)\n throw new Error(\"Unable to verify ENRTree root signature\");\n return rootValues.eRoot;\n }\n static parseRootValues(txt) {\n const matches = txt.match(/^enrtree-root:v1 e=([^ ]+) l=([^ ]+) seq=(\\d+) sig=([^ ]+)$/);\n if (!Array.isArray(matches))\n throw new Error(\"Could not parse ENRTree root entry\");\n matches.shift(); // The first entry is the full match\n const [eRoot, lRoot, seq, signature] = matches;\n if (!eRoot)\n throw new Error(\"Could not parse 'e' value from ENRTree root entry\");\n if (!lRoot)\n throw new Error(\"Could not parse 'l' value from ENRTree root entry\");\n if (!seq)\n throw new Error(\"Could not parse 'seq' value from ENRTree root entry\");\n if (!signature)\n throw new Error(\"Could not parse 'sig' value from ENRTree root entry\");\n return { eRoot, lRoot, seq: Number(seq), signature };\n }\n /**\n * Returns the public key and top level domain of an ENR tree entry.\n * The domain is the starting point for traversing a set of linked DNS TXT records\n * and the public key is used to verify the root entry record\n */\n static parseTree(tree) {\n if (!tree.startsWith(this.TREE_PREFIX))\n throw new Error(`ENRTree tree entry must start with '${this.TREE_PREFIX}'`);\n const matches = tree.match(/^enrtree:\\/\\/([^@]+)@(.+)$/);\n if (!Array.isArray(matches))\n throw new Error(\"Could not parse ENRTree tree entry\");\n matches.shift(); // The first entry is the full m
/***/ }),
/***/ "./node_modules/@waku/dns-discovery/dist/fetch_nodes.js":
/*!**************************************************************!*\
!*** ./node_modules/@waku/dns-discovery/dist/fetch_nodes.js ***!
\**************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ fetchNodesUntilCapabilitiesFulfilled: () => (/* binding */ fetchNodesUntilCapabilitiesFulfilled),\n/* harmony export */ yieldNodesUntilCapabilitiesFulfilled: () => (/* binding */ yieldNodesUntilCapabilitiesFulfilled)\n/* harmony export */ });\n/* harmony import */ var debug__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! debug */ \"./node_modules/debug/src/browser.js\");\n\nconst log = debug__WEBPACK_IMPORTED_MODULE_0__(\"waku:discovery:fetch_nodes\");\n/**\n * Fetch nodes using passed [[getNode]] until all wanted capabilities are\n * fulfilled or the number of [[getNode]] call exceeds the sum of\n * [[wantedNodeCapabilityCount]] plus [[errorTolerance]].\n */\nasync function fetchNodesUntilCapabilitiesFulfilled(wantedNodeCapabilityCount, errorTolerance, getNode) {\n const wanted = {\n relay: wantedNodeCapabilityCount.relay ?? 0,\n store: wantedNodeCapabilityCount.store ?? 0,\n filter: wantedNodeCapabilityCount.filter ?? 0,\n lightPush: wantedNodeCapabilityCount.lightPush ?? 0,\n };\n const maxSearches = wanted.relay + wanted.store + wanted.filter + wanted.lightPush;\n const actual = {\n relay: 0,\n store: 0,\n filter: 0,\n lightPush: 0,\n };\n let totalSearches = 0;\n const peers = [];\n while (!isSatisfied(wanted, actual) &&\n totalSearches < maxSearches + errorTolerance) {\n const peer = await getNode();\n if (peer && isNewPeer(peer, peers)) {\n // ENRs without a waku2 key are ignored.\n if (peer.waku2) {\n if (helpsSatisfyCapabilities(peer.waku2, wanted, actual)) {\n addCapabilities(peer.waku2, actual);\n peers.push(peer);\n }\n }\n log(`got new peer candidate from DNS address=${peer.nodeId}@${peer.ip}`);\n }\n totalSearches++;\n }\n return peers;\n}\n/**\n * Fetch nodes using passed [[getNode]] until all wanted capabilities are\n * fulfilled or the number of [[getNode]] call exceeds the sum of\n * [[wantedNodeCapabilityCount]] plus [[errorTolerance]].\n */\nasync function* yieldNodesUntilCapabilitiesFulfilled(wantedNodeCapabilityCount, errorTolerance, getNode) {\n const wanted = {\n relay: wantedNodeCapabilityCount.relay ?? 0,\n store: wantedNodeCapabilityCount.store ?? 0,\n filter: wantedNodeCapabilityCount.filter ?? 0,\n lightPush: wantedNodeCapabilityCount.lightPush ?? 0,\n };\n const maxSearches = wanted.relay + wanted.store + wanted.filter + wanted.lightPush;\n const actual = {\n relay: 0,\n store: 0,\n filter: 0,\n lightPush: 0,\n };\n let totalSearches = 0;\n const peerNodeIds = new Set();\n while (!isSatisfied(wanted, actual) &&\n totalSearches < maxSearches + errorTolerance) {\n const peer = await getNode();\n if (peer && peer.nodeId && !peerNodeIds.has(peer.nodeId)) {\n peerNodeIds.add(peer.nodeId);\n // ENRs without a waku2 key are ignored.\n if (peer.waku2) {\n if (helpsSatisfyCapabilities(peer.waku2, wanted, actual)) {\n addCapabilities(peer.waku2, actual);\n yield peer;\n }\n }\n log(`got new peer candidate from DNS address=${peer.nodeId}@${peer.ip}`);\n }\n totalSearches++;\n }\n}\nfunction isSatisfied(wanted, actual) {\n return (actual.relay >= wanted.relay &&\n actual.store >= wanted.store &&\n actual.filter >= wanted.filter &&\n actual.lightPush >= wanted.lightPush);\n}\nfunction isNewPeer(peer, peers) {\n if (!peer.nodeId)\n return false;\n for (const existingPeer of peers) {\n if (peer.nodeId === existingPeer.nodeId) {\n return false;\n }\n }\n return true;\n}\nfunction addCapabilities(node, total) {\n if (node.rel
/***/ }),
/***/ "./node_modules/@waku/dns-discovery/dist/index.js":
/*!********************************************************!*\
!*** ./node_modules/@waku/dns-discovery/dist/index.js ***!
\********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DnsNodeDiscovery: () => (/* reexport safe */ _dns_js__WEBPACK_IMPORTED_MODULE_3__.DnsNodeDiscovery),\n/* harmony export */ PeerDiscoveryDns: () => (/* binding */ PeerDiscoveryDns),\n/* harmony export */ enrTree: () => (/* binding */ enrTree),\n/* harmony export */ wakuDnsDiscovery: () => (/* binding */ wakuDnsDiscovery)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interface_peer_discovery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interface-peer-discovery */ \"./node_modules/@libp2p/interface-peer-discovery/dist/src/index.js\");\n/* harmony import */ var _libp2p_interfaces_events__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/interfaces/events */ \"./node_modules/@libp2p/interfaces/dist/src/events.js\");\n/* harmony import */ var debug__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! debug */ \"./node_modules/debug/src/browser.js\");\n/* harmony import */ var _dns_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./dns.js */ \"./node_modules/@waku/dns-discovery/dist/dns.js\");\n\n\n\n\nconst log = debug__WEBPACK_IMPORTED_MODULE_2__(\"waku:peer-discovery-dns\");\nconst enrTree = {\n TEST: \"enrtree://AOGECG2SPND25EEFMAJ5WF3KSGJNSGV356DSTL2YVLLZWIV6SAYBM@test.waku.nodes.status.im\",\n PROD: \"enrtree://AOGECG2SPND25EEFMAJ5WF3KSGJNSGV356DSTL2YVLLZWIV6SAYBM@prod.waku.nodes.status.im\",\n};\nconst DEFAULT_BOOTSTRAP_TAG_NAME = \"bootstrap\";\nconst DEFAULT_BOOTSTRAP_TAG_VALUE = 50;\nconst DEFAULT_BOOTSTRAP_TAG_TTL = 120000;\n/**\n * Parse options and expose function to return bootstrap peer addresses.\n */\nclass PeerDiscoveryDns extends _libp2p_interfaces_events__WEBPACK_IMPORTED_MODULE_1__.EventEmitter {\n nextPeer;\n _started;\n _components;\n _options;\n constructor(components, options) {\n super();\n this._started = false;\n this._components = components;\n this._options = options;\n const { enrUrls } = options;\n log(\"Use following EIP-1459 ENR Tree URLs: \", enrUrls);\n }\n /**\n * Start discovery process\n */\n async start() {\n log(\"Starting peer discovery via dns\");\n this._started = true;\n if (this.nextPeer === undefined) {\n let { enrUrls } = this._options;\n if (!Array.isArray(enrUrls))\n enrUrls = [enrUrls];\n const { wantedNodeCapabilityCount } = this._options;\n const dns = await _dns_js__WEBPACK_IMPORTED_MODULE_3__.DnsNodeDiscovery.dnsOverHttp();\n this.nextPeer = dns.getNextPeer.bind(dns, enrUrls, wantedNodeCapabilityCount);\n }\n for await (const peerEnr of this.nextPeer()) {\n if (!this._started) {\n return;\n }\n const peerInfo = peerEnr.peerInfo;\n if (!peerInfo) {\n continue;\n }\n const tagsToUpdate = {\n tags: {\n [DEFAULT_BOOTSTRAP_TAG_NAME]: {\n value: this._options.tagValue ?? DEFAULT_BOOTSTRAP_TAG_VALUE,\n ttl: this._options.tagTTL ?? DEFAULT_BOOTSTRAP_TAG_TTL,\n },\n },\n };\n let isPeerChanged = false;\n const isPeerExists = await this._components.peerStore.has(peerInfo.id);\n if (isPeerExists) {\n const peer = await this._components.peerStore.get(peerInfo.id);\n const hasBootstrapTag = peer.tags.has(DEFAULT_BOOTSTRAP_TAG_NAME);\n if (!hasBootstrapTag) {\n isPeerChanged = true;\n await this._components.peerStore.merge(peerInfo.id, tagsToUpdate);\n }\n }\n else {\n isPeerChanged = true;\n await this._components.peerStore.save(peerInfo.id, tagsToUpdate);\n }\n if (isPeerChanged) {\n
/***/ }),
/***/ "./node_modules/@waku/enr/dist/constants.js":
/*!**************************************************!*\
!*** ./node_modules/@waku/enr/dist/constants.js ***!
\**************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ERR_INVALID_ID: () => (/* binding */ ERR_INVALID_ID),\n/* harmony export */ ERR_NO_SIGNATURE: () => (/* binding */ ERR_NO_SIGNATURE),\n/* harmony export */ MAX_RECORD_SIZE: () => (/* binding */ MAX_RECORD_SIZE),\n/* harmony export */ MULTIADDR_LENGTH_SIZE: () => (/* binding */ MULTIADDR_LENGTH_SIZE)\n/* harmony export */ });\n// Maximum encoded size of an ENR\nconst MAX_RECORD_SIZE = 300;\nconst ERR_INVALID_ID = \"Invalid record id\";\nconst ERR_NO_SIGNATURE = \"No valid signature found\";\n// The maximum length of byte size of a multiaddr to encode in the `multiaddr` field\n// The size is a big endian 16-bit unsigned integer\nconst MULTIADDR_LENGTH_SIZE = 2;\n//# sourceMappingURL=constants.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/enr/dist/constants.js?");
/***/ }),
/***/ "./node_modules/@waku/enr/dist/creator.js":
/*!************************************************!*\
!*** ./node_modules/@waku/enr/dist/creator.js ***!
\************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ EnrCreator: () => (/* binding */ EnrCreator)\n/* harmony export */ });\n/* harmony import */ var _waku_utils_bytes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @waku/utils/bytes */ \"./node_modules/@waku/utils/dist/bytes/index.js\");\n/* harmony import */ var _crypto_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./crypto.js */ \"./node_modules/@waku/enr/dist/crypto.js\");\n/* harmony import */ var _enr_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./enr.js */ \"./node_modules/@waku/enr/dist/enr.js\");\n/* harmony import */ var _peer_id_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./peer_id.js */ \"./node_modules/@waku/enr/dist/peer_id.js\");\n\n\n\n\nclass EnrCreator {\n static fromPublicKey(publicKey, kvs = {}) {\n // EIP-778 specifies that the key must be in compressed format, 33 bytes\n if (publicKey.length !== 33) {\n publicKey = (0,_crypto_js__WEBPACK_IMPORTED_MODULE_1__.compressPublicKey)(publicKey);\n }\n return _enr_js__WEBPACK_IMPORTED_MODULE_2__.ENR.create({\n ...kvs,\n id: (0,_waku_utils_bytes__WEBPACK_IMPORTED_MODULE_0__.utf8ToBytes)(\"v4\"),\n secp256k1: publicKey,\n });\n }\n static async fromPeerId(peerId, kvs = {}) {\n switch (peerId.type) {\n case \"secp256k1\":\n return EnrCreator.fromPublicKey((0,_peer_id_js__WEBPACK_IMPORTED_MODULE_3__.getPublicKeyFromPeerId)(peerId), kvs);\n default:\n throw new Error();\n }\n }\n}\n//# sourceMappingURL=creator.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/enr/dist/creator.js?");
/***/ }),
/***/ "./node_modules/@waku/enr/dist/crypto.js":
/*!***********************************************!*\
!*** ./node_modules/@waku/enr/dist/crypto.js ***!
\***********************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ compressPublicKey: () => (/* binding */ compressPublicKey),\n/* harmony export */ keccak256: () => (/* binding */ keccak256),\n/* harmony export */ sign: () => (/* binding */ sign),\n/* harmony export */ verifySignature: () => (/* binding */ verifySignature)\n/* harmony export */ });\n/* harmony import */ var _noble_secp256k1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @noble/secp256k1 */ \"./node_modules/@noble/secp256k1/lib/esm/index.js\");\n/* harmony import */ var _waku_utils_bytes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @waku/utils/bytes */ \"./node_modules/@waku/utils/dist/bytes/index.js\");\n/* harmony import */ var js_sha3__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! js-sha3 */ \"./node_modules/js-sha3/src/sha3.js\");\n\n\n\n/**\n * ECDSA Sign a message with the given private key.\n *\n * @param message The message to sign, usually a hash.\n * @param privateKey The ECDSA private key to use to sign the message.\n *\n * @returns The signature and the recovery id concatenated.\n */\nasync function sign(message, privateKey) {\n const [signature, recoveryId] = await _noble_secp256k1__WEBPACK_IMPORTED_MODULE_0__.sign(message, privateKey, {\n recovered: true,\n der: false,\n });\n return (0,_waku_utils_bytes__WEBPACK_IMPORTED_MODULE_1__.concat)([signature, new Uint8Array([recoveryId])], signature.length + 1);\n}\nfunction keccak256(input) {\n return new Uint8Array(js_sha3__WEBPACK_IMPORTED_MODULE_2__.keccak256.arrayBuffer(input));\n}\nfunction compressPublicKey(publicKey) {\n if (publicKey.length === 64) {\n publicKey = (0,_waku_utils_bytes__WEBPACK_IMPORTED_MODULE_1__.concat)([new Uint8Array([4]), publicKey], 65);\n }\n const point = _noble_secp256k1__WEBPACK_IMPORTED_MODULE_0__.Point.fromHex(publicKey);\n return point.toRawBytes(true);\n}\n/**\n * Verify an ECDSA signature.\n */\nfunction verifySignature(signature, message, publicKey) {\n try {\n const _signature = _noble_secp256k1__WEBPACK_IMPORTED_MODULE_0__.Signature.fromCompact(signature.slice(0, 64));\n return _noble_secp256k1__WEBPACK_IMPORTED_MODULE_0__.verify(_signature, message, publicKey);\n }\n catch {\n return false;\n }\n}\n//# sourceMappingURL=crypto.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/enr/dist/crypto.js?");
/***/ }),
/***/ "./node_modules/@waku/enr/dist/decoder.js":
/*!************************************************!*\
!*** ./node_modules/@waku/enr/dist/decoder.js ***!
\************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ EnrDecoder: () => (/* binding */ EnrDecoder)\n/* harmony export */ });\n/* harmony import */ var _ethersproject_rlp__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @ethersproject/rlp */ \"./node_modules/@ethersproject/rlp/lib.esm/index.js\");\n/* harmony import */ var _waku_utils_bytes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @waku/utils/bytes */ \"./node_modules/@waku/utils/dist/bytes/index.js\");\n/* harmony import */ var debug__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! debug */ \"./node_modules/debug/src/browser.js\");\n/* harmony import */ var uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! uint8arrays/from-string */ \"./node_modules/uint8arrays/dist/src/from-string.js\");\n/* harmony import */ var _enr_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./enr.js */ \"./node_modules/@waku/enr/dist/enr.js\");\n\n\n\n\n\nclass EnrDecoder {\n static fromString(encoded) {\n if (!encoded.startsWith(_enr_js__WEBPACK_IMPORTED_MODULE_3__.ENR.RECORD_PREFIX)) {\n throw new Error(`\"string encoded ENR must start with '${_enr_js__WEBPACK_IMPORTED_MODULE_3__.ENR.RECORD_PREFIX}'`);\n }\n return EnrDecoder.fromRLP((0,uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_2__.fromString)(encoded.slice(4), \"base64url\"));\n }\n static fromRLP(encoded) {\n const decoded = _ethersproject_rlp__WEBPACK_IMPORTED_MODULE_4__.decode(encoded).map(_waku_utils_bytes__WEBPACK_IMPORTED_MODULE_0__.hexToBytes);\n return fromValues(decoded);\n }\n}\nasync function fromValues(values) {\n const { signature, seq, kvs } = checkValues(values);\n const obj = {};\n for (let i = 0; i < kvs.length; i += 2) {\n try {\n obj[(0,_waku_utils_bytes__WEBPACK_IMPORTED_MODULE_0__.bytesToUtf8)(kvs[i])] = kvs[i + 1];\n }\n catch (e) {\n (0,debug__WEBPACK_IMPORTED_MODULE_1__.log)(\"Failed to decode ENR key to UTF-8, skipping it\", kvs[i], e);\n }\n }\n const _seq = decodeSeq(seq);\n const enr = await _enr_js__WEBPACK_IMPORTED_MODULE_3__.ENR.create(obj, _seq, signature);\n checkSignature(seq, kvs, enr, signature);\n return enr;\n}\nfunction decodeSeq(seq) {\n // If seq is an empty array, translate as value 0\n if (!seq.length)\n return BigInt(0);\n return BigInt(\"0x\" + (0,_waku_utils_bytes__WEBPACK_IMPORTED_MODULE_0__.bytesToHex)(seq));\n}\nfunction checkValues(values) {\n if (!Array.isArray(values)) {\n throw new Error(\"Decoded ENR must be an array\");\n }\n if (values.length % 2 !== 0) {\n throw new Error(\"Decoded ENR must have an even number of elements\");\n }\n const [signature, seq, ...kvs] = values;\n if (!signature || Array.isArray(signature)) {\n throw new Error(\"Decoded ENR invalid signature: must be a byte array\");\n }\n if (!seq || Array.isArray(seq)) {\n throw new Error(\"Decoded ENR invalid sequence number: must be a byte array\");\n }\n return { signature, seq, kvs };\n}\nfunction checkSignature(seq, kvs, enr, signature) {\n const rlpEncodedBytes = (0,_waku_utils_bytes__WEBPACK_IMPORTED_MODULE_0__.hexToBytes)(_ethersproject_rlp__WEBPACK_IMPORTED_MODULE_4__.encode([seq, ...kvs]));\n if (!enr.verify(rlpEncodedBytes, signature)) {\n throw new Error(\"Unable to verify ENR signature\");\n }\n}\n//# sourceMappingURL=decoder.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/enr/dist/decoder.js?");
/***/ }),
/***/ "./node_modules/@waku/enr/dist/enr.js":
/*!********************************************!*\
!*** ./node_modules/@waku/enr/dist/enr.js ***!
\********************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ENR: () => (/* binding */ ENR),\n/* harmony export */ TransportProtocol: () => (/* binding */ TransportProtocol),\n/* harmony export */ TransportProtocolPerIpVersion: () => (/* binding */ TransportProtocolPerIpVersion)\n/* harmony export */ });\n/* harmony import */ var debug__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! debug */ \"./node_modules/debug/src/browser.js\");\n/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constants.js */ \"./node_modules/@waku/enr/dist/constants.js\");\n/* harmony import */ var _crypto_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./crypto.js */ \"./node_modules/@waku/enr/dist/crypto.js\");\n/* harmony import */ var _get_multiaddr_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./get_multiaddr.js */ \"./node_modules/@waku/enr/dist/get_multiaddr.js\");\n/* harmony import */ var _peer_id_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./peer_id.js */ \"./node_modules/@waku/enr/dist/peer_id.js\");\n/* harmony import */ var _raw_enr_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./raw_enr.js */ \"./node_modules/@waku/enr/dist/raw_enr.js\");\n/* harmony import */ var _v4_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./v4.js */ \"./node_modules/@waku/enr/dist/v4.js\");\n\n\n\n\n\n\n\nconst log = debug__WEBPACK_IMPORTED_MODULE_0__(\"waku:enr\");\nvar TransportProtocol;\n(function (TransportProtocol) {\n TransportProtocol[\"TCP\"] = \"tcp\";\n TransportProtocol[\"UDP\"] = \"udp\";\n})(TransportProtocol || (TransportProtocol = {}));\nvar TransportProtocolPerIpVersion;\n(function (TransportProtocolPerIpVersion) {\n TransportProtocolPerIpVersion[\"TCP4\"] = \"tcp4\";\n TransportProtocolPerIpVersion[\"UDP4\"] = \"udp4\";\n TransportProtocolPerIpVersion[\"TCP6\"] = \"tcp6\";\n TransportProtocolPerIpVersion[\"UDP6\"] = \"udp6\";\n})(TransportProtocolPerIpVersion || (TransportProtocolPerIpVersion = {}));\nclass ENR extends _raw_enr_js__WEBPACK_IMPORTED_MODULE_5__.RawEnr {\n static RECORD_PREFIX = \"enr:\";\n peerId;\n static async create(kvs = {}, seq = BigInt(1), signature) {\n const enr = new ENR(kvs, seq, signature);\n try {\n const publicKey = enr.publicKey;\n if (publicKey) {\n enr.peerId = await (0,_peer_id_js__WEBPACK_IMPORTED_MODULE_4__.createPeerIdFromPublicKey)(publicKey);\n }\n }\n catch (e) {\n log(\"Could not calculate peer id for ENR\", e);\n }\n return enr;\n }\n get nodeId() {\n switch (this.id) {\n case \"v4\":\n return this.publicKey ? _v4_js__WEBPACK_IMPORTED_MODULE_6__.nodeId(this.publicKey) : undefined;\n default:\n throw new Error(_constants_js__WEBPACK_IMPORTED_MODULE_1__.ERR_INVALID_ID);\n }\n }\n getLocationMultiaddr = _get_multiaddr_js__WEBPACK_IMPORTED_MODULE_3__.locationMultiaddrFromEnrFields.bind({}, this);\n setLocationMultiaddr(multiaddr) {\n const protoNames = multiaddr.protoNames();\n if (protoNames.length !== 2 &&\n protoNames[1] !== \"udp\" &&\n protoNames[1] !== \"tcp\") {\n throw new Error(\"Invalid multiaddr\");\n }\n const tuples = multiaddr.tuples();\n if (!tuples[0][1] || !tuples[1][1]) {\n throw new Error(\"Invalid multiaddr\");\n }\n // IPv4\n if (tuples[0][0] === 4) {\n this.set(\"ip\", tuples[0][1]);\n this.set(protoNames[1], tuples[1][1]);\n }\n else {\n this.set(\"ip6\", tuples[0][1]);\n this.set(protoNames[1] + \"6\", tuples[1][1]);\n }\n }\n getAllLocationMultiaddrs() {\n const multiaddrs = [];\n for (const protocol of Object.values(TransportProtocolPerIpVersion)) {\n const ma = this.getLocationMultiaddr(pr
/***/ }),
/***/ "./node_modules/@waku/enr/dist/get_multiaddr.js":
/*!******************************************************!*\
!*** ./node_modules/@waku/enr/dist/get_multiaddr.js ***!
\******************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ locationMultiaddrFromEnrFields: () => (/* binding */ locationMultiaddrFromEnrFields)\n/* harmony export */ });\n/* harmony import */ var _multiaddr_from_fields_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./multiaddr_from_fields.js */ \"./node_modules/@waku/enr/dist/multiaddr_from_fields.js\");\n\nfunction locationMultiaddrFromEnrFields(enr, protocol) {\n switch (protocol) {\n case \"udp\":\n return (locationMultiaddrFromEnrFields(enr, \"udp4\") ||\n locationMultiaddrFromEnrFields(enr, \"udp6\"));\n case \"tcp\":\n return (locationMultiaddrFromEnrFields(enr, \"tcp4\") ||\n locationMultiaddrFromEnrFields(enr, \"tcp6\"));\n }\n const isIpv6 = protocol.endsWith(\"6\");\n const ipVal = enr.get(isIpv6 ? \"ip6\" : \"ip\");\n if (!ipVal)\n return;\n const protoName = protocol.slice(0, 3);\n let protoVal;\n switch (protoName) {\n case \"udp\":\n protoVal = isIpv6 ? enr.get(\"udp6\") : enr.get(\"udp\");\n break;\n case \"tcp\":\n protoVal = isIpv6 ? enr.get(\"tcp6\") : enr.get(\"tcp\");\n break;\n default:\n return;\n }\n if (!protoVal)\n return;\n return (0,_multiaddr_from_fields_js__WEBPACK_IMPORTED_MODULE_0__.multiaddrFromFields)(isIpv6 ? \"ip6\" : \"ip4\", protoName, ipVal, protoVal);\n}\n//# sourceMappingURL=get_multiaddr.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/enr/dist/get_multiaddr.js?");
/***/ }),
/***/ "./node_modules/@waku/enr/dist/index.js":
/*!**********************************************!*\
!*** ./node_modules/@waku/enr/dist/index.js ***!
\**********************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ENR: () => (/* reexport safe */ _enr_js__WEBPACK_IMPORTED_MODULE_3__.ENR),\n/* harmony export */ ERR_INVALID_ID: () => (/* reexport safe */ _constants_js__WEBPACK_IMPORTED_MODULE_0__.ERR_INVALID_ID),\n/* harmony export */ ERR_NO_SIGNATURE: () => (/* reexport safe */ _constants_js__WEBPACK_IMPORTED_MODULE_0__.ERR_NO_SIGNATURE),\n/* harmony export */ EnrCreator: () => (/* reexport safe */ _creator_js__WEBPACK_IMPORTED_MODULE_1__.EnrCreator),\n/* harmony export */ EnrDecoder: () => (/* reexport safe */ _decoder_js__WEBPACK_IMPORTED_MODULE_2__.EnrDecoder),\n/* harmony export */ MAX_RECORD_SIZE: () => (/* reexport safe */ _constants_js__WEBPACK_IMPORTED_MODULE_0__.MAX_RECORD_SIZE),\n/* harmony export */ MULTIADDR_LENGTH_SIZE: () => (/* reexport safe */ _constants_js__WEBPACK_IMPORTED_MODULE_0__.MULTIADDR_LENGTH_SIZE),\n/* harmony export */ TransportProtocol: () => (/* reexport safe */ _enr_js__WEBPACK_IMPORTED_MODULE_3__.TransportProtocol),\n/* harmony export */ TransportProtocolPerIpVersion: () => (/* reexport safe */ _enr_js__WEBPACK_IMPORTED_MODULE_3__.TransportProtocolPerIpVersion),\n/* harmony export */ compressPublicKey: () => (/* reexport safe */ _crypto_js__WEBPACK_IMPORTED_MODULE_6__.compressPublicKey),\n/* harmony export */ createPeerIdFromPublicKey: () => (/* reexport safe */ _peer_id_js__WEBPACK_IMPORTED_MODULE_4__.createPeerIdFromPublicKey),\n/* harmony export */ decodeWaku2: () => (/* reexport safe */ _waku2_codec_js__WEBPACK_IMPORTED_MODULE_5__.decodeWaku2),\n/* harmony export */ encodeWaku2: () => (/* reexport safe */ _waku2_codec_js__WEBPACK_IMPORTED_MODULE_5__.encodeWaku2),\n/* harmony export */ getPrivateKeyFromPeerId: () => (/* reexport safe */ _peer_id_js__WEBPACK_IMPORTED_MODULE_4__.getPrivateKeyFromPeerId),\n/* harmony export */ getPublicKeyFromPeerId: () => (/* reexport safe */ _peer_id_js__WEBPACK_IMPORTED_MODULE_4__.getPublicKeyFromPeerId),\n/* harmony export */ keccak256: () => (/* reexport safe */ _crypto_js__WEBPACK_IMPORTED_MODULE_6__.keccak256),\n/* harmony export */ sign: () => (/* reexport safe */ _crypto_js__WEBPACK_IMPORTED_MODULE_6__.sign),\n/* harmony export */ verifySignature: () => (/* reexport safe */ _crypto_js__WEBPACK_IMPORTED_MODULE_6__.verifySignature)\n/* harmony export */ });\n/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constants.js */ \"./node_modules/@waku/enr/dist/constants.js\");\n/* harmony import */ var _creator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./creator.js */ \"./node_modules/@waku/enr/dist/creator.js\");\n/* harmony import */ var _decoder_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./decoder.js */ \"./node_modules/@waku/enr/dist/decoder.js\");\n/* harmony import */ var _enr_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./enr.js */ \"./node_modules/@waku/enr/dist/enr.js\");\n/* harmony import */ var _peer_id_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./peer_id.js */ \"./node_modules/@waku/enr/dist/peer_id.js\");\n/* harmony import */ var _waku2_codec_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./waku2_codec.js */ \"./node_modules/@waku/enr/dist/waku2_codec.js\");\n/* harmony import */ var _crypto_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./crypto.js */ \"./node_modules/@waku/enr/dist/crypto.js\");\n\n\n\n\n\n\n\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/enr/dist/index.js?");
/***/ }),
/***/ "./node_modules/@waku/enr/dist/multiaddr_from_fields.js":
/*!**************************************************************!*\
!*** ./node_modules/@waku/enr/dist/multiaddr_from_fields.js ***!
\**************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ multiaddrFromFields: () => (/* binding */ multiaddrFromFields)\n/* harmony export */ });\n/* harmony import */ var _multiformats_multiaddr__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @multiformats/multiaddr */ \"./node_modules/@multiformats/multiaddr/dist/src/index.js\");\n/* harmony import */ var _multiformats_multiaddr_convert__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @multiformats/multiaddr/convert */ \"./node_modules/@multiformats/multiaddr/dist/src/convert.js\");\n\n\nfunction multiaddrFromFields(ipFamily, protocol, ipBytes, protocolBytes) {\n let ma = (0,_multiformats_multiaddr__WEBPACK_IMPORTED_MODULE_0__.multiaddr)(\"/\" + ipFamily + \"/\" + (0,_multiformats_multiaddr_convert__WEBPACK_IMPORTED_MODULE_1__.convertToString)(ipFamily, ipBytes));\n ma = ma.encapsulate((0,_multiformats_multiaddr__WEBPACK_IMPORTED_MODULE_0__.multiaddr)(\"/\" + protocol + \"/\" + (0,_multiformats_multiaddr_convert__WEBPACK_IMPORTED_MODULE_1__.convertToString)(protocol, protocolBytes)));\n return ma;\n}\n//# sourceMappingURL=multiaddr_from_fields.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/enr/dist/multiaddr_from_fields.js?");
/***/ }),
/***/ "./node_modules/@waku/enr/dist/multiaddrs_codec.js":
/*!*********************************************************!*\
!*** ./node_modules/@waku/enr/dist/multiaddrs_codec.js ***!
\*********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ decodeMultiaddrs: () => (/* binding */ decodeMultiaddrs),\n/* harmony export */ encodeMultiaddrs: () => (/* binding */ encodeMultiaddrs)\n/* harmony export */ });\n/* harmony import */ var _multiformats_multiaddr__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @multiformats/multiaddr */ \"./node_modules/@multiformats/multiaddr/dist/src/index.js\");\n/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constants.js */ \"./node_modules/@waku/enr/dist/constants.js\");\n\n\nfunction decodeMultiaddrs(bytes) {\n const multiaddrs = [];\n let index = 0;\n while (index < bytes.length) {\n const sizeDataView = new DataView(bytes.buffer, index, _constants_js__WEBPACK_IMPORTED_MODULE_1__.MULTIADDR_LENGTH_SIZE);\n const size = sizeDataView.getUint16(0);\n index += _constants_js__WEBPACK_IMPORTED_MODULE_1__.MULTIADDR_LENGTH_SIZE;\n const multiaddrBytes = bytes.slice(index, index + size);\n index += size;\n multiaddrs.push((0,_multiformats_multiaddr__WEBPACK_IMPORTED_MODULE_0__.multiaddr)(multiaddrBytes));\n }\n return multiaddrs;\n}\nfunction encodeMultiaddrs(multiaddrs) {\n const totalLength = multiaddrs.reduce((acc, ma) => acc + _constants_js__WEBPACK_IMPORTED_MODULE_1__.MULTIADDR_LENGTH_SIZE + ma.bytes.length, 0);\n const bytes = new Uint8Array(totalLength);\n const dataView = new DataView(bytes.buffer);\n let index = 0;\n multiaddrs.forEach((multiaddr) => {\n if (multiaddr.getPeerId())\n throw new Error(\"`multiaddr` field MUST not contain peer id\");\n // Prepend the size of the next entry\n dataView.setUint16(index, multiaddr.bytes.length);\n index += _constants_js__WEBPACK_IMPORTED_MODULE_1__.MULTIADDR_LENGTH_SIZE;\n bytes.set(multiaddr.bytes, index);\n index += multiaddr.bytes.length;\n });\n return bytes;\n}\n//# sourceMappingURL=multiaddrs_codec.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/enr/dist/multiaddrs_codec.js?");
/***/ }),
/***/ "./node_modules/@waku/enr/dist/peer_id.js":
/*!************************************************!*\
!*** ./node_modules/@waku/enr/dist/peer_id.js ***!
\************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ createPeerIdFromPublicKey: () => (/* binding */ createPeerIdFromPublicKey),\n/* harmony export */ getPrivateKeyFromPeerId: () => (/* binding */ getPrivateKeyFromPeerId),\n/* harmony export */ getPublicKeyFromPeerId: () => (/* binding */ getPublicKeyFromPeerId)\n/* harmony export */ });\n/* harmony import */ var _libp2p_crypto_keys__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/crypto/keys */ \"./node_modules/@libp2p/crypto/dist/src/keys/index.js\");\n/* harmony import */ var _libp2p_peer_id__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/peer-id */ \"./node_modules/@libp2p/peer-id/dist/src/index.js\");\n\n\n\nfunction createPeerIdFromPublicKey(publicKey) {\n const _publicKey = new _libp2p_crypto_keys__WEBPACK_IMPORTED_MODULE_0__.supportedKeys.secp256k1.Secp256k1PublicKey(publicKey);\n return (0,_libp2p_peer_id__WEBPACK_IMPORTED_MODULE_1__.peerIdFromKeys)(_publicKey.bytes, undefined);\n}\nfunction getPublicKeyFromPeerId(peerId) {\n if (peerId.type !== \"secp256k1\") {\n throw new Error(\"Unsupported peer id type\");\n }\n return (0,_libp2p_crypto_keys__WEBPACK_IMPORTED_MODULE_0__.unmarshalPublicKey)(peerId.publicKey).marshal();\n}\n// Only used in tests\nasync function getPrivateKeyFromPeerId(peerId) {\n if (peerId.type !== \"secp256k1\") {\n throw new Error(\"Unsupported peer id type\");\n }\n if (!peerId.privateKey) {\n throw new Error(\"Private key not present on peer id\");\n }\n const privateKey = await (0,_libp2p_crypto_keys__WEBPACK_IMPORTED_MODULE_0__.unmarshalPrivateKey)(peerId.privateKey);\n return privateKey.marshal();\n}\n//# sourceMappingURL=peer_id.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/enr/dist/peer_id.js?");
/***/ }),
/***/ "./node_modules/@waku/enr/dist/raw_enr.js":
/*!************************************************!*\
!*** ./node_modules/@waku/enr/dist/raw_enr.js ***!
\************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ RawEnr: () => (/* binding */ RawEnr)\n/* harmony export */ });\n/* harmony import */ var _multiformats_multiaddr_convert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @multiformats/multiaddr/convert */ \"./node_modules/@multiformats/multiaddr/dist/src/convert.js\");\n/* harmony import */ var _waku_utils_bytes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @waku/utils/bytes */ \"./node_modules/@waku/utils/dist/bytes/index.js\");\n/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constants.js */ \"./node_modules/@waku/enr/dist/constants.js\");\n/* harmony import */ var _multiaddrs_codec_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./multiaddrs_codec.js */ \"./node_modules/@waku/enr/dist/multiaddrs_codec.js\");\n/* harmony import */ var _waku2_codec_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./waku2_codec.js */ \"./node_modules/@waku/enr/dist/waku2_codec.js\");\n\n\n\n\n\nclass RawEnr extends Map {\n seq;\n signature;\n constructor(kvs = {}, seq = BigInt(1), signature) {\n super(Object.entries(kvs));\n this.seq = seq;\n this.signature = signature;\n }\n set(k, v) {\n this.signature = undefined;\n this.seq++;\n return super.set(k, v);\n }\n get id() {\n const id = this.get(\"id\");\n if (!id)\n throw new Error(\"id not found.\");\n return (0,_waku_utils_bytes__WEBPACK_IMPORTED_MODULE_1__.bytesToUtf8)(id);\n }\n get publicKey() {\n switch (this.id) {\n case \"v4\":\n return this.get(\"secp256k1\");\n default:\n throw new Error(_constants_js__WEBPACK_IMPORTED_MODULE_2__.ERR_INVALID_ID);\n }\n }\n get ip() {\n return getStringValue(this, \"ip\", \"ip4\");\n }\n set ip(ip) {\n setStringValue(this, \"ip\", \"ip4\", ip);\n }\n get tcp() {\n return getNumberAsStringValue(this, \"tcp\", \"tcp\");\n }\n set tcp(port) {\n setNumberAsStringValue(this, \"tcp\", \"tcp\", port);\n }\n get udp() {\n return getNumberAsStringValue(this, \"udp\", \"udp\");\n }\n set udp(port) {\n setNumberAsStringValue(this, \"udp\", \"udp\", port);\n }\n get ip6() {\n return getStringValue(this, \"ip6\", \"ip6\");\n }\n set ip6(ip) {\n setStringValue(this, \"ip6\", \"ip6\", ip);\n }\n get tcp6() {\n return getNumberAsStringValue(this, \"tcp6\", \"tcp\");\n }\n set tcp6(port) {\n setNumberAsStringValue(this, \"tcp6\", \"tcp\", port);\n }\n get udp6() {\n return getNumberAsStringValue(this, \"udp6\", \"udp\");\n }\n set udp6(port) {\n setNumberAsStringValue(this, \"udp6\", \"udp\", port);\n }\n /**\n * Get the `multiaddrs` field from ENR.\n *\n * This field is used to store multiaddresses that cannot be stored with the current ENR pre-defined keys.\n * These can be a multiaddresses that include encapsulation (e.g. wss) or do not use `ip4` nor `ip6` for the host\n * address (e.g. `dns4`, `dnsaddr`, etc)..\n *\n * If the peer information only contains information that can be represented with the ENR pre-defined keys\n * (ip, tcp, etc) then the usage of { @link ENR.getLocationMultiaddr } should be preferred.\n *\n * The multiaddresses stored in this field are expected to be location multiaddresses, ie, peer id less.\n */\n get multiaddrs() {\n const raw = this.get(\"multiaddrs\");\n if (raw)\n return (0,_multiaddrs_codec_js__WEBPACK_IMPORTED_MODULE_3__.decodeMultiaddrs)(raw);\n return;\n }\n /**\n * Set the `multiaddrs` field on the ENR.\n *\n * This field is used to store multiaddresses that cannot be stored with the current ENR pre-defined keys.\n * These can be a multiaddresses that include encapsulation (e.g.
/***/ }),
/***/ "./node_modules/@waku/enr/dist/v4.js":
/*!*******************************************!*\
!*** ./node_modules/@waku/enr/dist/v4.js ***!
\*******************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ nodeId: () => (/* binding */ nodeId),\n/* harmony export */ sign: () => (/* binding */ sign)\n/* harmony export */ });\n/* harmony import */ var _noble_secp256k1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @noble/secp256k1 */ \"./node_modules/@noble/secp256k1/lib/esm/index.js\");\n/* harmony import */ var _waku_utils_bytes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @waku/utils/bytes */ \"./node_modules/@waku/utils/dist/bytes/index.js\");\n/* harmony import */ var _crypto_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./crypto.js */ \"./node_modules/@waku/enr/dist/crypto.js\");\n\n\n\nasync function sign(privKey, msg) {\n return _noble_secp256k1__WEBPACK_IMPORTED_MODULE_0__.sign((0,_crypto_js__WEBPACK_IMPORTED_MODULE_2__.keccak256)(msg), privKey, {\n der: false,\n });\n}\nfunction nodeId(pubKey) {\n const publicKey = _noble_secp256k1__WEBPACK_IMPORTED_MODULE_0__.Point.fromHex(pubKey);\n const uncompressedPubkey = publicKey.toRawBytes(false);\n return (0,_waku_utils_bytes__WEBPACK_IMPORTED_MODULE_1__.bytesToHex)((0,_crypto_js__WEBPACK_IMPORTED_MODULE_2__.keccak256)(uncompressedPubkey.slice(1)));\n}\n//# sourceMappingURL=v4.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/enr/dist/v4.js?");
/***/ }),
/***/ "./node_modules/@waku/enr/dist/waku2_codec.js":
/*!****************************************************!*\
!*** ./node_modules/@waku/enr/dist/waku2_codec.js ***!
\****************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ decodeWaku2: () => (/* binding */ decodeWaku2),\n/* harmony export */ encodeWaku2: () => (/* binding */ encodeWaku2)\n/* harmony export */ });\nfunction encodeWaku2(protocols) {\n let byte = 0;\n if (protocols.lightPush)\n byte += 1;\n byte = byte << 1;\n if (protocols.filter)\n byte += 1;\n byte = byte << 1;\n if (protocols.store)\n byte += 1;\n byte = byte << 1;\n if (protocols.relay)\n byte += 1;\n return byte;\n}\nfunction decodeWaku2(byte) {\n const waku2 = {\n relay: false,\n store: false,\n filter: false,\n lightPush: false,\n };\n if (byte % 2)\n waku2.relay = true;\n byte = byte >> 1;\n if (byte % 2)\n waku2.store = true;\n byte = byte >> 1;\n if (byte % 2)\n waku2.filter = true;\n byte = byte >> 1;\n if (byte % 2)\n waku2.lightPush = true;\n return waku2;\n}\n//# sourceMappingURL=waku2_codec.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/enr/dist/waku2_codec.js?");
/***/ }),
/***/ "./node_modules/@waku/interfaces/dist/connection_manager.js":
/*!******************************************************************!*\
!*** ./node_modules/@waku/interfaces/dist/connection_manager.js ***!
\******************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ EPeersByDiscoveryEvents: () => (/* binding */ EPeersByDiscoveryEvents),\n/* harmony export */ Tags: () => (/* binding */ Tags)\n/* harmony export */ });\nvar Tags;\n(function (Tags) {\n Tags[\"BOOTSTRAP\"] = \"bootstrap\";\n Tags[\"PEER_EXCHANGE\"] = \"peer-exchange\";\n})(Tags || (Tags = {}));\nvar EPeersByDiscoveryEvents;\n(function (EPeersByDiscoveryEvents) {\n EPeersByDiscoveryEvents[\"PEER_DISCOVERY_BOOTSTRAP\"] = \"peer:discovery:bootstrap\";\n EPeersByDiscoveryEvents[\"PEER_DISCOVERY_PEER_EXCHANGE\"] = \"peer:discovery:peer-exchange\";\n EPeersByDiscoveryEvents[\"PEER_CONNECT_BOOTSTRAP\"] = \"peer:connected:bootstrap\";\n EPeersByDiscoveryEvents[\"PEER_CONNECT_PEER_EXCHANGE\"] = \"peer:connected:peer-exchange\";\n})(EPeersByDiscoveryEvents || (EPeersByDiscoveryEvents = {}));\n//# sourceMappingURL=connection_manager.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/interfaces/dist/connection_manager.js?");
/***/ }),
/***/ "./node_modules/@waku/interfaces/dist/enr.js":
/*!***************************************************!*\
!*** ./node_modules/@waku/interfaces/dist/enr.js ***!
\***************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n\n//# sourceMappingURL=enr.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/interfaces/dist/enr.js?");
/***/ }),
/***/ "./node_modules/@waku/interfaces/dist/filter.js":
/*!******************************************************!*\
!*** ./node_modules/@waku/interfaces/dist/filter.js ***!
\******************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n\n//# sourceMappingURL=filter.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/interfaces/dist/filter.js?");
/***/ }),
/***/ "./node_modules/@waku/interfaces/dist/index.js":
/*!*****************************************************!*\
!*** ./node_modules/@waku/interfaces/dist/index.js ***!
\*****************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ EPeersByDiscoveryEvents: () => (/* reexport safe */ _connection_manager_js__WEBPACK_IMPORTED_MODULE_9__.EPeersByDiscoveryEvents),\n/* harmony export */ PageDirection: () => (/* reexport safe */ _store_js__WEBPACK_IMPORTED_MODULE_7__.PageDirection),\n/* harmony export */ Protocols: () => (/* reexport safe */ _protocols_js__WEBPACK_IMPORTED_MODULE_5__.Protocols),\n/* harmony export */ SendError: () => (/* reexport safe */ _protocols_js__WEBPACK_IMPORTED_MODULE_5__.SendError),\n/* harmony export */ Tags: () => (/* reexport safe */ _connection_manager_js__WEBPACK_IMPORTED_MODULE_9__.Tags)\n/* harmony export */ });\n/* harmony import */ var _enr_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./enr.js */ \"./node_modules/@waku/interfaces/dist/enr.js\");\n/* harmony import */ var _filter_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./filter.js */ \"./node_modules/@waku/interfaces/dist/filter.js\");\n/* harmony import */ var _light_push_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./light_push.js */ \"./node_modules/@waku/interfaces/dist/light_push.js\");\n/* harmony import */ var _message_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./message.js */ \"./node_modules/@waku/interfaces/dist/message.js\");\n/* harmony import */ var _peer_exchange_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./peer_exchange.js */ \"./node_modules/@waku/interfaces/dist/peer_exchange.js\");\n/* harmony import */ var _protocols_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./protocols.js */ \"./node_modules/@waku/interfaces/dist/protocols.js\");\n/* harmony import */ var _relay_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./relay.js */ \"./node_modules/@waku/interfaces/dist/relay.js\");\n/* harmony import */ var _store_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./store.js */ \"./node_modules/@waku/interfaces/dist/store.js\");\n/* harmony import */ var _waku_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./waku.js */ \"./node_modules/@waku/interfaces/dist/waku.js\");\n/* harmony import */ var _connection_manager_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./connection_manager.js */ \"./node_modules/@waku/interfaces/dist/connection_manager.js\");\n/* harmony import */ var _sender_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./sender.js */ \"./node_modules/@waku/interfaces/dist/sender.js\");\n/* harmony import */ var _receiver_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./receiver.js */ \"./node_modules/@waku/interfaces/dist/receiver.js\");\n/* harmony import */ var _misc_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./misc.js */ \"./node_modules/@waku/interfaces/dist/misc.js\");\n/* harmony import */ var _libp2p_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./libp2p.js */ \"./node_modules/@waku/interfaces/dist/libp2p.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/interfaces/dist/index.js?");
/***/ }),
/***/ "./node_modules/@waku/interfaces/dist/libp2p.js":
/*!******************************************************!*\
!*** ./node_modules/@waku/interfaces/dist/libp2p.js ***!
\******************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n\n//# sourceMappingURL=libp2p.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/interfaces/dist/libp2p.js?");
/***/ }),
/***/ "./node_modules/@waku/interfaces/dist/light_push.js":
/*!**********************************************************!*\
!*** ./node_modules/@waku/interfaces/dist/light_push.js ***!
\**********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n\n//# sourceMappingURL=light_push.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/interfaces/dist/light_push.js?");
/***/ }),
/***/ "./node_modules/@waku/interfaces/dist/message.js":
/*!*******************************************************!*\
!*** ./node_modules/@waku/interfaces/dist/message.js ***!
\*******************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n\n//# sourceMappingURL=message.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/interfaces/dist/message.js?");
/***/ }),
/***/ "./node_modules/@waku/interfaces/dist/misc.js":
/*!****************************************************!*\
!*** ./node_modules/@waku/interfaces/dist/misc.js ***!
\****************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n\n//# sourceMappingURL=misc.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/interfaces/dist/misc.js?");
/***/ }),
/***/ "./node_modules/@waku/interfaces/dist/peer_exchange.js":
/*!*************************************************************!*\
!*** ./node_modules/@waku/interfaces/dist/peer_exchange.js ***!
\*************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n\n//# sourceMappingURL=peer_exchange.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/interfaces/dist/peer_exchange.js?");
/***/ }),
/***/ "./node_modules/@waku/interfaces/dist/protocols.js":
/*!*********************************************************!*\
!*** ./node_modules/@waku/interfaces/dist/protocols.js ***!
\*********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Protocols: () => (/* binding */ Protocols),\n/* harmony export */ SendError: () => (/* binding */ SendError)\n/* harmony export */ });\nvar Protocols;\n(function (Protocols) {\n Protocols[\"Relay\"] = \"relay\";\n Protocols[\"Store\"] = \"store\";\n Protocols[\"LightPush\"] = \"lightpush\";\n Protocols[\"Filter\"] = \"filter\";\n})(Protocols || (Protocols = {}));\nvar SendError;\n(function (SendError) {\n SendError[\"GENERIC_FAIL\"] = \"Generic error\";\n SendError[\"ENCODE_FAILED\"] = \"Failed to encode\";\n SendError[\"DECODE_FAILED\"] = \"Failed to decode\";\n SendError[\"SIZE_TOO_BIG\"] = \"Size is too big\";\n SendError[\"NO_RPC_RESPONSE\"] = \"No RPC response\";\n})(SendError || (SendError = {}));\n//# sourceMappingURL=protocols.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/interfaces/dist/protocols.js?");
/***/ }),
/***/ "./node_modules/@waku/interfaces/dist/receiver.js":
/*!********************************************************!*\
!*** ./node_modules/@waku/interfaces/dist/receiver.js ***!
\********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n\n//# sourceMappingURL=receiver.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/interfaces/dist/receiver.js?");
/***/ }),
/***/ "./node_modules/@waku/interfaces/dist/relay.js":
/*!*****************************************************!*\
!*** ./node_modules/@waku/interfaces/dist/relay.js ***!
\*****************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n\n//# sourceMappingURL=relay.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/interfaces/dist/relay.js?");
/***/ }),
/***/ "./node_modules/@waku/interfaces/dist/sender.js":
/*!******************************************************!*\
!*** ./node_modules/@waku/interfaces/dist/sender.js ***!
\******************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n\n//# sourceMappingURL=sender.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/interfaces/dist/sender.js?");
/***/ }),
/***/ "./node_modules/@waku/interfaces/dist/store.js":
/*!*****************************************************!*\
!*** ./node_modules/@waku/interfaces/dist/store.js ***!
\*****************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PageDirection: () => (/* binding */ PageDirection)\n/* harmony export */ });\nvar PageDirection;\n(function (PageDirection) {\n PageDirection[\"BACKWARD\"] = \"backward\";\n PageDirection[\"FORWARD\"] = \"forward\";\n})(PageDirection || (PageDirection = {}));\n//# sourceMappingURL=store.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/interfaces/dist/store.js?");
/***/ }),
/***/ "./node_modules/@waku/interfaces/dist/waku.js":
/*!****************************************************!*\
!*** ./node_modules/@waku/interfaces/dist/waku.js ***!
\****************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n\n//# sourceMappingURL=waku.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/interfaces/dist/waku.js?");
/***/ }),
/***/ "./node_modules/@waku/proto/dist/index.js":
/*!************************************************!*\
!*** ./node_modules/@waku/proto/dist/index.js ***!
\************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PushResponse: () => (/* reexport safe */ _lib_light_push_js__WEBPACK_IMPORTED_MODULE_4__.PushResponse),\n/* harmony export */ TopicOnlyMessage: () => (/* reexport safe */ _lib_topic_only_message_js__WEBPACK_IMPORTED_MODULE_2__.TopicOnlyMessage),\n/* harmony export */ WakuMessage: () => (/* reexport safe */ _lib_filter_js__WEBPACK_IMPORTED_MODULE_1__.WakuMessage),\n/* harmony export */ proto_filter: () => (/* reexport module object */ _lib_filter_js__WEBPACK_IMPORTED_MODULE_1__),\n/* harmony export */ proto_filter_v2: () => (/* reexport module object */ _lib_filter_v2_js__WEBPACK_IMPORTED_MODULE_3__),\n/* harmony export */ proto_lightpush: () => (/* reexport module object */ _lib_light_push_js__WEBPACK_IMPORTED_MODULE_4__),\n/* harmony export */ proto_message: () => (/* reexport module object */ _lib_message_js__WEBPACK_IMPORTED_MODULE_0__),\n/* harmony export */ proto_peer_exchange: () => (/* reexport module object */ _lib_peer_exchange_js__WEBPACK_IMPORTED_MODULE_6__),\n/* harmony export */ proto_store: () => (/* reexport module object */ _lib_store_js__WEBPACK_IMPORTED_MODULE_5__),\n/* harmony export */ proto_topic_only_message: () => (/* reexport module object */ _lib_topic_only_message_js__WEBPACK_IMPORTED_MODULE_2__)\n/* harmony export */ });\n/* harmony import */ var _lib_message_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib/message.js */ \"./node_modules/@waku/proto/dist/lib/message.js\");\n/* harmony import */ var _lib_filter_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lib/filter.js */ \"./node_modules/@waku/proto/dist/lib/filter.js\");\n/* harmony import */ var _lib_topic_only_message_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lib/topic_only_message.js */ \"./node_modules/@waku/proto/dist/lib/topic_only_message.js\");\n/* harmony import */ var _lib_filter_v2_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./lib/filter_v2.js */ \"./node_modules/@waku/proto/dist/lib/filter_v2.js\");\n/* harmony import */ var _lib_light_push_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./lib/light_push.js */ \"./node_modules/@waku/proto/dist/lib/light_push.js\");\n/* harmony import */ var _lib_store_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./lib/store.js */ \"./node_modules/@waku/proto/dist/lib/store.js\");\n/* harmony import */ var _lib_peer_exchange_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./lib/peer_exchange.js */ \"./node_modules/@waku/proto/dist/lib/peer_exchange.js\");\n\n\n\n\n\n\n\n\n\n\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/proto/dist/index.js?");
/***/ }),
/***/ "./node_modules/@waku/proto/dist/lib/filter.js":
/*!*****************************************************!*\
!*** ./node_modules/@waku/proto/dist/lib/filter.js ***!
\*****************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ FilterRequest: () => (/* binding */ FilterRequest),\n/* harmony export */ FilterRpc: () => (/* binding */ FilterRpc),\n/* harmony export */ MessagePush: () => (/* binding */ MessagePush),\n/* harmony export */ RateLimitProof: () => (/* binding */ RateLimitProof),\n/* harmony export */ WakuMessage: () => (/* binding */ WakuMessage)\n/* harmony export */ });\n/* harmony import */ var protons_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! protons-runtime */ \"./node_modules/protons-runtime/dist/src/index.js\");\n/* eslint-disable import/export */\n/* eslint-disable complexity */\n/* eslint-disable @typescript-eslint/no-namespace */\n/* eslint-disable @typescript-eslint/no-unnecessary-boolean-literal-compare */\n/* eslint-disable @typescript-eslint/no-empty-interface */\n\nvar FilterRequest;\n(function (FilterRequest) {\n let ContentFilter;\n (function (ContentFilter) {\n let _codec;\n ContentFilter.codec = () => {\n if (_codec == null) {\n _codec = (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.message)((obj, w, opts = {}) => {\n if (opts.lengthDelimited !== false) {\n w.fork();\n }\n if (obj.contentTopic != null && obj.contentTopic !== \"\") {\n w.uint32(10);\n w.string(obj.contentTopic);\n }\n if (opts.lengthDelimited !== false) {\n w.ldelim();\n }\n }, (reader, length) => {\n const obj = {\n contentTopic: \"\",\n };\n const end = length == null ? reader.len : reader.pos + length;\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n obj.contentTopic = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return obj;\n });\n }\n return _codec;\n };\n ContentFilter.encode = (obj) => {\n return (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.encodeMessage)(obj, ContentFilter.codec());\n };\n ContentFilter.decode = (buf) => {\n return (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.decodeMessage)(buf, ContentFilter.codec());\n };\n })(ContentFilter = FilterRequest.ContentFilter || (FilterRequest.ContentFilter = {}));\n let _codec;\n FilterRequest.codec = () => {\n if (_codec == null) {\n _codec = (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.message)((obj, w, opts = {}) => {\n if (opts.lengthDelimited !== false) {\n w.fork();\n }\n if (obj.subscribe != null && obj.subscribe !== false) {\n w.uint32(8);\n w.bool(obj.subscribe);\n }\n if (obj.topic != null && obj.topic !== \"\") {\n w.uint32(18);\n w.string(obj.topic);\n }\n if (obj.contentFilters != null) {\n for (const value of obj.contentFilters) {\n w.uint32(26);\n FilterRequest.ContentFilter.codec().encode(value, w);\n }\n }\n if (opts.lengthDelimited !== false) {\n w.ldelim();\n }\n }, (reader, length) => {\n const obj = {\n subscribe: false,\n topic: \"\",\n
/***/ }),
/***/ "./node_modules/@waku/proto/dist/lib/filter_v2.js":
/*!********************************************************!*\
!*** ./node_modules/@waku/proto/dist/lib/filter_v2.js ***!
\********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ FilterSubscribeRequest: () => (/* binding */ FilterSubscribeRequest),\n/* harmony export */ FilterSubscribeResponse: () => (/* binding */ FilterSubscribeResponse),\n/* harmony export */ MessagePush: () => (/* binding */ MessagePush),\n/* harmony export */ RateLimitProof: () => (/* binding */ RateLimitProof),\n/* harmony export */ WakuMessage: () => (/* binding */ WakuMessage)\n/* harmony export */ });\n/* harmony import */ var protons_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! protons-runtime */ \"./node_modules/protons-runtime/dist/src/index.js\");\n/* eslint-disable import/export */\n/* eslint-disable complexity */\n/* eslint-disable @typescript-eslint/no-namespace */\n/* eslint-disable @typescript-eslint/no-unnecessary-boolean-literal-compare */\n/* eslint-disable @typescript-eslint/no-empty-interface */\n\nvar FilterSubscribeRequest;\n(function (FilterSubscribeRequest) {\n let FilterSubscribeType;\n (function (FilterSubscribeType) {\n FilterSubscribeType[\"SUBSCRIBER_PING\"] = \"SUBSCRIBER_PING\";\n FilterSubscribeType[\"SUBSCRIBE\"] = \"SUBSCRIBE\";\n FilterSubscribeType[\"UNSUBSCRIBE\"] = \"UNSUBSCRIBE\";\n FilterSubscribeType[\"UNSUBSCRIBE_ALL\"] = \"UNSUBSCRIBE_ALL\";\n })(FilterSubscribeType = FilterSubscribeRequest.FilterSubscribeType || (FilterSubscribeRequest.FilterSubscribeType = {}));\n let __FilterSubscribeTypeValues;\n (function (__FilterSubscribeTypeValues) {\n __FilterSubscribeTypeValues[__FilterSubscribeTypeValues[\"SUBSCRIBER_PING\"] = 0] = \"SUBSCRIBER_PING\";\n __FilterSubscribeTypeValues[__FilterSubscribeTypeValues[\"SUBSCRIBE\"] = 1] = \"SUBSCRIBE\";\n __FilterSubscribeTypeValues[__FilterSubscribeTypeValues[\"UNSUBSCRIBE\"] = 2] = \"UNSUBSCRIBE\";\n __FilterSubscribeTypeValues[__FilterSubscribeTypeValues[\"UNSUBSCRIBE_ALL\"] = 3] = \"UNSUBSCRIBE_ALL\";\n })(__FilterSubscribeTypeValues || (__FilterSubscribeTypeValues = {}));\n (function (FilterSubscribeType) {\n FilterSubscribeType.codec = () => {\n return (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.enumeration)(__FilterSubscribeTypeValues);\n };\n })(FilterSubscribeType = FilterSubscribeRequest.FilterSubscribeType || (FilterSubscribeRequest.FilterSubscribeType = {}));\n let _codec;\n FilterSubscribeRequest.codec = () => {\n if (_codec == null) {\n _codec = (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.message)((obj, w, opts = {}) => {\n if (opts.lengthDelimited !== false) {\n w.fork();\n }\n if (obj.requestId != null && obj.requestId !== \"\") {\n w.uint32(10);\n w.string(obj.requestId);\n }\n if (obj.filterSubscribeType != null &&\n __FilterSubscribeTypeValues[obj.filterSubscribeType] !== 0) {\n w.uint32(16);\n FilterSubscribeRequest.FilterSubscribeType.codec().encode(obj.filterSubscribeType, w);\n }\n if (obj.pubsubTopic != null) {\n w.uint32(82);\n w.string(obj.pubsubTopic);\n }\n if (obj.contentTopics != null) {\n for (const value of obj.contentTopics) {\n w.uint32(90);\n w.string(value);\n }\n }\n if (opts.lengthDelimited !== false) {\n w.ldelim();\n }\n }, (reader, length) => {\n const obj = {\n requestId: \"\",\n filterSubscribeType: FilterSubscribeType.SUBSCRIBER_PING,\n contentTopics: [],\n };\n const end = length == null ? reader.len : reader.pos + length;\n while (reader.pos < end) {\n
/***/ }),
/***/ "./node_modules/@waku/proto/dist/lib/light_push.js":
/*!*********************************************************!*\
!*** ./node_modules/@waku/proto/dist/lib/light_push.js ***!
\*********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PushRequest: () => (/* binding */ PushRequest),\n/* harmony export */ PushResponse: () => (/* binding */ PushResponse),\n/* harmony export */ PushRpc: () => (/* binding */ PushRpc),\n/* harmony export */ RateLimitProof: () => (/* binding */ RateLimitProof),\n/* harmony export */ WakuMessage: () => (/* binding */ WakuMessage)\n/* harmony export */ });\n/* harmony import */ var protons_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! protons-runtime */ \"./node_modules/protons-runtime/dist/src/index.js\");\n/* eslint-disable import/export */\n/* eslint-disable complexity */\n/* eslint-disable @typescript-eslint/no-namespace */\n/* eslint-disable @typescript-eslint/no-unnecessary-boolean-literal-compare */\n/* eslint-disable @typescript-eslint/no-empty-interface */\n\nvar PushRequest;\n(function (PushRequest) {\n let _codec;\n PushRequest.codec = () => {\n if (_codec == null) {\n _codec = (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.message)((obj, w, opts = {}) => {\n if (opts.lengthDelimited !== false) {\n w.fork();\n }\n if (obj.pubsubTopic != null && obj.pubsubTopic !== \"\") {\n w.uint32(10);\n w.string(obj.pubsubTopic);\n }\n if (obj.message != null) {\n w.uint32(18);\n WakuMessage.codec().encode(obj.message, w);\n }\n if (opts.lengthDelimited !== false) {\n w.ldelim();\n }\n }, (reader, length) => {\n const obj = {\n pubsubTopic: \"\",\n };\n const end = length == null ? reader.len : reader.pos + length;\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n obj.pubsubTopic = reader.string();\n break;\n case 2:\n obj.message = WakuMessage.codec().decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return obj;\n });\n }\n return _codec;\n };\n PushRequest.encode = (obj) => {\n return (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.encodeMessage)(obj, PushRequest.codec());\n };\n PushRequest.decode = (buf) => {\n return (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.decodeMessage)(buf, PushRequest.codec());\n };\n})(PushRequest || (PushRequest = {}));\nvar PushResponse;\n(function (PushResponse) {\n let _codec;\n PushResponse.codec = () => {\n if (_codec == null) {\n _codec = (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.message)((obj, w, opts = {}) => {\n if (opts.lengthDelimited !== false) {\n w.fork();\n }\n if (obj.isSuccess != null && obj.isSuccess !== false) {\n w.uint32(8);\n w.bool(obj.isSuccess);\n }\n if (obj.info != null) {\n w.uint32(18);\n w.string(obj.info);\n }\n if (opts.lengthDelimited !== false) {\n w.ldelim();\n }\n }, (reader, length) => {\n const obj = {\n isSuccess: false,\n };\n const end = length == null ? reader.len : reader.pos + length;\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n
/***/ }),
/***/ "./node_modules/@waku/proto/dist/lib/message.js":
/*!******************************************************!*\
!*** ./node_modules/@waku/proto/dist/lib/message.js ***!
\******************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ RateLimitProof: () => (/* binding */ RateLimitProof),\n/* harmony export */ WakuMessage: () => (/* binding */ WakuMessage)\n/* harmony export */ });\n/* harmony import */ var protons_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! protons-runtime */ \"./node_modules/protons-runtime/dist/src/index.js\");\n/* eslint-disable import/export */\n/* eslint-disable complexity */\n/* eslint-disable @typescript-eslint/no-namespace */\n/* eslint-disable @typescript-eslint/no-unnecessary-boolean-literal-compare */\n/* eslint-disable @typescript-eslint/no-empty-interface */\n\nvar RateLimitProof;\n(function (RateLimitProof) {\n let _codec;\n RateLimitProof.codec = () => {\n if (_codec == null) {\n _codec = (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.message)((obj, w, opts = {}) => {\n if (opts.lengthDelimited !== false) {\n w.fork();\n }\n if (obj.proof != null && obj.proof.byteLength > 0) {\n w.uint32(10);\n w.bytes(obj.proof);\n }\n if (obj.merkleRoot != null && obj.merkleRoot.byteLength > 0) {\n w.uint32(18);\n w.bytes(obj.merkleRoot);\n }\n if (obj.epoch != null && obj.epoch.byteLength > 0) {\n w.uint32(26);\n w.bytes(obj.epoch);\n }\n if (obj.shareX != null && obj.shareX.byteLength > 0) {\n w.uint32(34);\n w.bytes(obj.shareX);\n }\n if (obj.shareY != null && obj.shareY.byteLength > 0) {\n w.uint32(42);\n w.bytes(obj.shareY);\n }\n if (obj.nullifier != null && obj.nullifier.byteLength > 0) {\n w.uint32(50);\n w.bytes(obj.nullifier);\n }\n if (obj.rlnIdentifier != null && obj.rlnIdentifier.byteLength > 0) {\n w.uint32(58);\n w.bytes(obj.rlnIdentifier);\n }\n if (opts.lengthDelimited !== false) {\n w.ldelim();\n }\n }, (reader, length) => {\n const obj = {\n proof: new Uint8Array(0),\n merkleRoot: new Uint8Array(0),\n epoch: new Uint8Array(0),\n shareX: new Uint8Array(0),\n shareY: new Uint8Array(0),\n nullifier: new Uint8Array(0),\n rlnIdentifier: new Uint8Array(0),\n };\n const end = length == null ? reader.len : reader.pos + length;\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n obj.proof = reader.bytes();\n break;\n case 2:\n obj.merkleRoot = reader.bytes();\n break;\n case 3:\n obj.epoch = reader.bytes();\n break;\n case 4:\n obj.shareX = reader.bytes();\n break;\n case 5:\n obj.shareY = reader.bytes();\n break;\n case 6:\n obj.nullifier = reader.bytes();\n break;\n case 7:\n obj.rlnIdentifier = reader.bytes();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n
/***/ }),
/***/ "./node_modules/@waku/proto/dist/lib/peer_exchange.js":
/*!************************************************************!*\
!*** ./node_modules/@waku/proto/dist/lib/peer_exchange.js ***!
\************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PeerExchangeQuery: () => (/* binding */ PeerExchangeQuery),\n/* harmony export */ PeerExchangeRPC: () => (/* binding */ PeerExchangeRPC),\n/* harmony export */ PeerExchangeResponse: () => (/* binding */ PeerExchangeResponse),\n/* harmony export */ PeerInfo: () => (/* binding */ PeerInfo)\n/* harmony export */ });\n/* harmony import */ var protons_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! protons-runtime */ \"./node_modules/protons-runtime/dist/src/index.js\");\n/* eslint-disable import/export */\n/* eslint-disable complexity */\n/* eslint-disable @typescript-eslint/no-namespace */\n/* eslint-disable @typescript-eslint/no-unnecessary-boolean-literal-compare */\n/* eslint-disable @typescript-eslint/no-empty-interface */\n\nvar PeerInfo;\n(function (PeerInfo) {\n let _codec;\n PeerInfo.codec = () => {\n if (_codec == null) {\n _codec = (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.message)((obj, w, opts = {}) => {\n if (opts.lengthDelimited !== false) {\n w.fork();\n }\n if (obj.enr != null) {\n w.uint32(10);\n w.bytes(obj.enr);\n }\n if (opts.lengthDelimited !== false) {\n w.ldelim();\n }\n }, (reader, length) => {\n const obj = {};\n const end = length == null ? reader.len : reader.pos + length;\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n obj.enr = reader.bytes();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return obj;\n });\n }\n return _codec;\n };\n PeerInfo.encode = (obj) => {\n return (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.encodeMessage)(obj, PeerInfo.codec());\n };\n PeerInfo.decode = (buf) => {\n return (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.decodeMessage)(buf, PeerInfo.codec());\n };\n})(PeerInfo || (PeerInfo = {}));\nvar PeerExchangeQuery;\n(function (PeerExchangeQuery) {\n let _codec;\n PeerExchangeQuery.codec = () => {\n if (_codec == null) {\n _codec = (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.message)((obj, w, opts = {}) => {\n if (opts.lengthDelimited !== false) {\n w.fork();\n }\n if (obj.numPeers != null) {\n w.uint32(8);\n w.uint64(obj.numPeers);\n }\n if (opts.lengthDelimited !== false) {\n w.ldelim();\n }\n }, (reader, length) => {\n const obj = {};\n const end = length == null ? reader.len : reader.pos + length;\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n obj.numPeers = reader.uint64();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return obj;\n });\n }\n return _codec;\n };\n PeerExchangeQuery.encode = (obj) => {\n return (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.encodeMessage)(obj, PeerExchangeQuery.codec());\n };\n PeerExchangeQuery.decode = (buf) => {\n return (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.decodeMessage)(buf, PeerExchangeQuery.codec());\n };\n})(PeerExchangeQuery || (PeerExchange
/***/ }),
/***/ "./node_modules/@waku/proto/dist/lib/store.js":
/*!****************************************************!*\
!*** ./node_modules/@waku/proto/dist/lib/store.js ***!
\****************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ContentFilter: () => (/* binding */ ContentFilter),\n/* harmony export */ HistoryQuery: () => (/* binding */ HistoryQuery),\n/* harmony export */ HistoryResponse: () => (/* binding */ HistoryResponse),\n/* harmony export */ HistoryRpc: () => (/* binding */ HistoryRpc),\n/* harmony export */ Index: () => (/* binding */ Index),\n/* harmony export */ PagingInfo: () => (/* binding */ PagingInfo),\n/* harmony export */ RateLimitProof: () => (/* binding */ RateLimitProof),\n/* harmony export */ WakuMessage: () => (/* binding */ WakuMessage)\n/* harmony export */ });\n/* harmony import */ var protons_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! protons-runtime */ \"./node_modules/protons-runtime/dist/src/index.js\");\n/* eslint-disable import/export */\n/* eslint-disable complexity */\n/* eslint-disable @typescript-eslint/no-namespace */\n/* eslint-disable @typescript-eslint/no-unnecessary-boolean-literal-compare */\n/* eslint-disable @typescript-eslint/no-empty-interface */\n\nvar Index;\n(function (Index) {\n let _codec;\n Index.codec = () => {\n if (_codec == null) {\n _codec = (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.message)((obj, w, opts = {}) => {\n if (opts.lengthDelimited !== false) {\n w.fork();\n }\n if (obj.digest != null && obj.digest.byteLength > 0) {\n w.uint32(10);\n w.bytes(obj.digest);\n }\n if (obj.receiverTime != null && obj.receiverTime !== 0n) {\n w.uint32(16);\n w.sint64(obj.receiverTime);\n }\n if (obj.senderTime != null && obj.senderTime !== 0n) {\n w.uint32(24);\n w.sint64(obj.senderTime);\n }\n if (obj.pubsubTopic != null && obj.pubsubTopic !== \"\") {\n w.uint32(34);\n w.string(obj.pubsubTopic);\n }\n if (opts.lengthDelimited !== false) {\n w.ldelim();\n }\n }, (reader, length) => {\n const obj = {\n digest: new Uint8Array(0),\n receiverTime: 0n,\n senderTime: 0n,\n pubsubTopic: \"\",\n };\n const end = length == null ? reader.len : reader.pos + length;\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n obj.digest = reader.bytes();\n break;\n case 2:\n obj.receiverTime = reader.sint64();\n break;\n case 3:\n obj.senderTime = reader.sint64();\n break;\n case 4:\n obj.pubsubTopic = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return obj;\n });\n }\n return _codec;\n };\n Index.encode = (obj) => {\n return (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.encodeMessage)(obj, Index.codec());\n };\n Index.decode = (buf) => {\n return (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.decodeMessage)(buf, Index.codec());\n };\n})(Index || (Index = {}));\nvar PagingInfo;\n(function (PagingInfo) {\n let Direction;\n (function (Direction) {\n Direction[\"BACKWARD\"] = \"BACKWARD\";\n Direction[\"FORWARD\"] = \"FORWARD\";\n })(Direction = PagingInfo.Direction || (PagingInfo.Direction = {}
/***/ }),
/***/ "./node_modules/@waku/proto/dist/lib/topic_only_message.js":
/*!*****************************************************************!*\
!*** ./node_modules/@waku/proto/dist/lib/topic_only_message.js ***!
\*****************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ TopicOnlyMessage: () => (/* binding */ TopicOnlyMessage)\n/* harmony export */ });\n/* harmony import */ var protons_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! protons-runtime */ \"./node_modules/protons-runtime/dist/src/index.js\");\n/* eslint-disable import/export */\n/* eslint-disable complexity */\n/* eslint-disable @typescript-eslint/no-namespace */\n/* eslint-disable @typescript-eslint/no-unnecessary-boolean-literal-compare */\n/* eslint-disable @typescript-eslint/no-empty-interface */\n\nvar TopicOnlyMessage;\n(function (TopicOnlyMessage) {\n let _codec;\n TopicOnlyMessage.codec = () => {\n if (_codec == null) {\n _codec = (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.message)((obj, w, opts = {}) => {\n if (opts.lengthDelimited !== false) {\n w.fork();\n }\n if (obj.contentTopic != null && obj.contentTopic !== \"\") {\n w.uint32(18);\n w.string(obj.contentTopic);\n }\n if (opts.lengthDelimited !== false) {\n w.ldelim();\n }\n }, (reader, length) => {\n const obj = {\n contentTopic: \"\",\n };\n const end = length == null ? reader.len : reader.pos + length;\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 2:\n obj.contentTopic = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return obj;\n });\n }\n return _codec;\n };\n TopicOnlyMessage.encode = (obj) => {\n return (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.encodeMessage)(obj, TopicOnlyMessage.codec());\n };\n TopicOnlyMessage.decode = (buf) => {\n return (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.decodeMessage)(buf, TopicOnlyMessage.codec());\n };\n})(TopicOnlyMessage || (TopicOnlyMessage = {}));\n//# sourceMappingURL=topic_only_message.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/proto/dist/lib/topic_only_message.js?");
/***/ }),
/***/ "./node_modules/@waku/relay/dist/constants.js":
/*!****************************************************!*\
!*** ./node_modules/@waku/relay/dist/constants.js ***!
\****************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ RelayCodecs: () => (/* binding */ RelayCodecs),\n/* harmony export */ RelayFanoutTTL: () => (/* binding */ RelayFanoutTTL),\n/* harmony export */ RelayGossipFactor: () => (/* binding */ RelayGossipFactor),\n/* harmony export */ RelayHeartbeatInitialDelay: () => (/* binding */ RelayHeartbeatInitialDelay),\n/* harmony export */ RelayHeartbeatInterval: () => (/* binding */ RelayHeartbeatInterval),\n/* harmony export */ RelayMaxIHaveLength: () => (/* binding */ RelayMaxIHaveLength),\n/* harmony export */ RelayOpportunisticGraftPeers: () => (/* binding */ RelayOpportunisticGraftPeers),\n/* harmony export */ RelayOpportunisticGraftTicks: () => (/* binding */ RelayOpportunisticGraftTicks),\n/* harmony export */ RelayPruneBackoff: () => (/* binding */ RelayPruneBackoff),\n/* harmony export */ RelayPrunePeers: () => (/* binding */ RelayPrunePeers),\n/* harmony export */ minute: () => (/* binding */ minute),\n/* harmony export */ second: () => (/* binding */ second)\n/* harmony export */ });\nconst second = 1000;\nconst minute = 60 * second;\n/**\n * RelayCodec is the libp2p identifier for the waku relay protocol\n */\nconst RelayCodecs = [\"/vac/waku/relay/2.0.0\"];\n/**\n * RelayGossipFactor affects how many peers we will emit gossip to at each heartbeat.\n * We will send gossip to RelayGossipFactor * (total number of non-mesh peers), or\n * RelayDlazy, whichever is greater.\n */\nconst RelayGossipFactor = 0.25;\n/**\n * GossipsubHeartbeatInitialDelay is the short delay before the heartbeat timer begins\n * after the router is initialized.\n */\nconst RelayHeartbeatInitialDelay = 100;\n/**\n * RelayHeartbeatInterval controls the time between heartbeats.\n */\nconst RelayHeartbeatInterval = second;\n/**\n * RelayPrunePeers controls the number of peers to include in prune Peer eXchange.\n * When we prune a peer that's eligible for PX (has a good score, etc), we will try to\n * send them signed peer records for up to RelayPrunePeers other peers that we\n * know of.\n */\nconst RelayPrunePeers = 16;\n/**\n * RelayPruneBackoff controls the backoff time for pruned peers. This is how long\n * a peer must wait before attempting to graft into our mesh again after being pruned.\n * When pruning a peer, we send them our value of RelayPruneBackoff so they know\n * the minimum time to wait. Peers running older versions may not send a backoff time,\n * so if we receive a prune message without one, we will wait at least RelayPruneBackoff\n * before attempting to re-graft.\n */\nconst RelayPruneBackoff = minute;\n/**\n * RelayFanoutTTL controls how long we keep track of the fanout state. If it's been\n * RelayFanoutTTL since we've published to a topic that we're not subscribed to,\n * we'll delete the fanout map for that topic.\n */\nconst RelayFanoutTTL = minute;\n/**\n * RelayOpportunisticGraftTicks is the number of heartbeat ticks for attempting to improve the mesh\n * with opportunistic grafting. Every RelayOpportunisticGraftTicks we will attempt to select some\n * high-scoring mesh peers to replace lower-scoring ones, if the median score of our mesh peers falls\n * below a threshold\n */\nconst RelayOpportunisticGraftTicks = 60;\n/**\n * RelayOpportunisticGraftPeers is the number of peers to opportunistically graft.\n */\nconst RelayOpportunisticGraftPeers = 2;\n/**\n * RelayMaxIHaveLength is the maximum number of messages to include in an IHAVE message.\n * Also controls the maximum number of IHAVE ids we will accept and request with IWANT from a\n * peer within a heartbeat, to protect from IHAVE floods. You should adjust this value from the\n * default if your system is pushing more than 5000 messages in GossipsubHistoryGossip heartbeats;\n * with the defaults this is 1666 messages/s.\n */\nconst RelayMaxIHaveLength = 5000;\n//# sourceMappingURL=constants.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/relay/dist/constants.js?");
/***/ }),
/***/ "./node_modules/@waku/relay/dist/index.js":
/*!************************************************!*\
!*** ./node_modules/@waku/relay/dist/index.js ***!
\************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ wakuGossipSub: () => (/* binding */ wakuGossipSub),\n/* harmony export */ wakuRelay: () => (/* binding */ wakuRelay)\n/* harmony export */ });\n/* harmony import */ var _chainsafe_libp2p_gossipsub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @chainsafe/libp2p-gossipsub */ \"./node_modules/@chainsafe/libp2p-gossipsub/dist/src/index.js\");\n/* harmony import */ var _chainsafe_libp2p_gossipsub_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @chainsafe/libp2p-gossipsub/types */ \"./node_modules/@chainsafe/libp2p-gossipsub/dist/src/types.js\");\n/* harmony import */ var _noble_hashes_sha256__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @noble/hashes/sha256 */ \"./node_modules/@noble/hashes/esm/sha256.js\");\n/* harmony import */ var _waku_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @waku/core */ \"./node_modules/@waku/core/dist/index.js\");\n/* harmony import */ var _waku_interfaces__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @waku/interfaces */ \"./node_modules/@waku/interfaces/dist/index.js\");\n/* harmony import */ var _waku_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @waku/utils */ \"./node_modules/@waku/utils/dist/index.js\");\n/* harmony import */ var debug__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! debug */ \"./node_modules/debug/src/browser.js\");\n/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./constants.js */ \"./node_modules/@waku/relay/dist/constants.js\");\n/* harmony import */ var _message_validator_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./message_validator.js */ \"./node_modules/@waku/relay/dist/message_validator.js\");\n/* harmony import */ var _topic_only_message_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./topic_only_message.js */ \"./node_modules/@waku/relay/dist/topic_only_message.js\");\n\n\n\n\n\n\n\n\n\n\nconst log = debug__WEBPACK_IMPORTED_MODULE_6__(\"waku:relay\");\n/**\n * Implements the [Waku v2 Relay protocol](https://rfc.vac.dev/spec/11/).\n * Throws if libp2p.pubsub does not support Waku Relay\n */\nclass Relay {\n pubSubTopic;\n defaultDecoder;\n static multicodec = _constants_js__WEBPACK_IMPORTED_MODULE_7__.RelayCodecs[0];\n gossipSub;\n /**\n * observers called when receiving new message.\n * Observers under key `\"\"` are always called.\n */\n observers;\n constructor(libp2p, options) {\n if (!this.isRelayPubSub(libp2p.services.pubsub)) {\n throw Error(`Failed to initialize Relay. libp2p.pubsub does not support ${Relay.multicodec}`);\n }\n this.gossipSub = libp2p.services.pubsub;\n this.pubSubTopic = options?.pubSubTopic ?? _waku_core__WEBPACK_IMPORTED_MODULE_3__.DefaultPubSubTopic;\n if (this.gossipSub.isStarted()) {\n this.gossipSubSubscribe(this.pubSubTopic);\n }\n this.observers = new Map();\n // TODO: User might want to decide what decoder should be used (e.g. for RLN)\n this.defaultDecoder = new _topic_only_message_js__WEBPACK_IMPORTED_MODULE_9__.TopicOnlyDecoder();\n }\n /**\n * Mounts the gossipsub protocol onto the libp2p node\n * and subscribes to the default topic.\n *\n * @override\n * @returns {void}\n */\n async start() {\n if (this.gossipSub.isStarted()) {\n throw Error(\"GossipSub already started.\");\n }\n await this.gossipSub.start();\n this.gossipSubSubscribe(this.pubSubTopic);\n }\n /**\n * Send Waku message.\n */\n async send(encoder, message) {\n if (!(0,_waku_utils__WEBPACK_IMPORTED_MODULE_5__.isSizeValid)(message.payload)) {\n log(\"Failed to send waku relay: message is bigger that 1MB\");\n return {\n recipients: [],\n error: _waku_interfaces__WEBPACK_IMPORTED_MODULE_4__.SendError.SIZE_TOO_BIG,\n
/***/ }),
/***/ "./node_modules/@waku/relay/dist/message_validator.js":
/*!************************************************************!*\
!*** ./node_modules/@waku/relay/dist/message_validator.js ***!
\************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ messageValidator: () => (/* binding */ messageValidator)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interface_pubsub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interface-pubsub */ \"./node_modules/@libp2p/interface-pubsub/dist/src/index.js\");\n/* harmony import */ var _waku_proto__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @waku/proto */ \"./node_modules/@waku/proto/dist/index.js\");\n/* harmony import */ var debug__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! debug */ \"./node_modules/debug/src/browser.js\");\n\n\n\nconst log = debug__WEBPACK_IMPORTED_MODULE_2__(\"waku:relay\");\nfunction messageValidator(peer, message) {\n const startTime = performance.now();\n log(`validating message from ${peer} received on ${message.topic}`);\n let result = _libp2p_interface_pubsub__WEBPACK_IMPORTED_MODULE_0__.TopicValidatorResult.Accept;\n try {\n const protoMessage = _waku_proto__WEBPACK_IMPORTED_MODULE_1__.proto_message.WakuMessage.decode(message.data);\n if (!protoMessage.contentTopic ||\n !protoMessage.contentTopic.length ||\n !protoMessage.payload ||\n !protoMessage.payload.length) {\n result = _libp2p_interface_pubsub__WEBPACK_IMPORTED_MODULE_0__.TopicValidatorResult.Reject;\n }\n }\n catch (e) {\n result = _libp2p_interface_pubsub__WEBPACK_IMPORTED_MODULE_0__.TopicValidatorResult.Reject;\n }\n const endTime = performance.now();\n log(`Validation time (must be <100ms): ${endTime - startTime}ms`);\n return result;\n}\n//# sourceMappingURL=message_validator.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/relay/dist/message_validator.js?");
/***/ }),
/***/ "./node_modules/@waku/relay/dist/topic_only_message.js":
/*!*************************************************************!*\
!*** ./node_modules/@waku/relay/dist/topic_only_message.js ***!
\*************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ TopicOnlyDecoder: () => (/* binding */ TopicOnlyDecoder),\n/* harmony export */ TopicOnlyMessage: () => (/* binding */ TopicOnlyMessage)\n/* harmony export */ });\n/* harmony import */ var _waku_proto__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @waku/proto */ \"./node_modules/@waku/proto/dist/index.js\");\n/* harmony import */ var debug__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! debug */ \"./node_modules/debug/src/browser.js\");\n\n\nconst log = debug__WEBPACK_IMPORTED_MODULE_1__(\"waku:message:topic-only\");\nclass TopicOnlyMessage {\n pubSubTopic;\n proto;\n payload = new Uint8Array();\n rateLimitProof;\n timestamp;\n meta;\n ephemeral;\n constructor(pubSubTopic, proto) {\n this.pubSubTopic = pubSubTopic;\n this.proto = proto;\n }\n get contentTopic() {\n return this.proto.contentTopic;\n }\n}\nclass TopicOnlyDecoder {\n contentTopic = \"\";\n fromWireToProtoObj(bytes) {\n const protoMessage = _waku_proto__WEBPACK_IMPORTED_MODULE_0__.TopicOnlyMessage.decode(bytes);\n log(\"Message decoded\", protoMessage);\n return Promise.resolve({\n contentTopic: protoMessage.contentTopic,\n payload: new Uint8Array(),\n rateLimitProof: undefined,\n timestamp: undefined,\n meta: undefined,\n version: undefined,\n ephemeral: undefined,\n });\n }\n async fromProtoObj(pubSubTopic, proto) {\n return new TopicOnlyMessage(pubSubTopic, proto);\n }\n}\n//# sourceMappingURL=topic_only_message.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/relay/dist/topic_only_message.js?");
/***/ }),
/***/ "./node_modules/@waku/sdk/dist/create.js":
/*!***********************************************!*\
!*** ./node_modules/@waku/sdk/dist/create.js ***!
\***********************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ createFullNode: () => (/* binding */ createFullNode),\n/* harmony export */ createLightNode: () => (/* binding */ createLightNode),\n/* harmony export */ createRelayNode: () => (/* binding */ createRelayNode),\n/* harmony export */ defaultLibp2p: () => (/* binding */ defaultLibp2p),\n/* harmony export */ defaultPeerDiscovery: () => (/* binding */ defaultPeerDiscovery)\n/* harmony export */ });\n/* harmony import */ var _chainsafe_libp2p_noise__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @chainsafe/libp2p-noise */ \"./node_modules/@chainsafe/libp2p-noise/dist/src/index.js\");\n/* harmony import */ var _libp2p_mplex__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/mplex */ \"./node_modules/@libp2p/mplex/dist/src/index.js\");\n/* harmony import */ var _libp2p_websockets__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @libp2p/websockets */ \"./node_modules/@libp2p/websockets/dist/src/index.js\");\n/* harmony import */ var _libp2p_websockets_filters__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @libp2p/websockets/filters */ \"./node_modules/@libp2p/websockets/dist/src/filters.js\");\n/* harmony import */ var _waku_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @waku/core */ \"./node_modules/@waku/core/dist/index.js\");\n/* harmony import */ var _waku_dns_discovery__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @waku/dns-discovery */ \"./node_modules/@waku/dns-discovery/dist/index.js\");\n/* harmony import */ var _waku_relay__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @waku/relay */ \"./node_modules/@waku/relay/dist/index.js\");\n/* harmony import */ var libp2p__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! libp2p */ \"./node_modules/libp2p/dist/src/index.js\");\n/* harmony import */ var libp2p_identify__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! libp2p/identify */ \"./node_modules/libp2p/dist/src/identify/index.js\");\n/* harmony import */ var libp2p_ping__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! libp2p/ping */ \"./node_modules/libp2p/dist/src/ping/index.js\");\n\n\n\n\n\n\n\n\n\n\nconst DEFAULT_NODE_REQUIREMENTS = {\n lightPush: 1,\n filter: 1,\n store: 1,\n};\n/**\n * Create a Waku node that uses Waku Light Push, Filter and Store to send and\n * receive messages, enabling low resource consumption.\n * Uses Waku Filter V2 by default.\n */\nasync function createLightNode(options) {\n const libp2pOptions = options?.libp2p ?? {};\n const peerDiscovery = libp2pOptions.peerDiscovery ?? [];\n if (options?.defaultBootstrap) {\n peerDiscovery.push(defaultPeerDiscovery());\n Object.assign(libp2pOptions, { peerDiscovery });\n }\n const libp2p = await defaultLibp2p(undefined, libp2pOptions, options?.userAgent);\n const store = (0,_waku_core__WEBPACK_IMPORTED_MODULE_4__.wakuStore)(options);\n const lightPush = (0,_waku_core__WEBPACK_IMPORTED_MODULE_4__.wakuLightPush)(options);\n const filter = (0,_waku_core__WEBPACK_IMPORTED_MODULE_4__.wakuFilter)(options);\n return new _waku_core__WEBPACK_IMPORTED_MODULE_4__.WakuNode(options ?? {}, libp2p, store, lightPush, filter);\n}\n/**\n * Create a Waku node that uses Waku Relay to send and receive messages,\n * enabling some privacy preserving properties.\n */\nasync function createRelayNode(options) {\n const libp2pOptions = options?.libp2p ?? {};\n const peerDiscovery = libp2pOptions.peerDiscovery ?? [];\n if (options?.defaultBootstrap) {\n peerDiscovery.push(defaultPeerDiscovery());\n Object.assign(libp2pOptions, { peerDiscovery });\n }\n const libp2p = await defaultLibp2p((0,_waku_relay__WEBPACK_IMPORTED_MODULE_6__.wakuGossipSub)(options), libp2pOptions, options?.userAgent);\n const relay = (0,_waku_relay__WEBPACK_IMPORTED_MODULE_6__.wakuRelay)(options);\n return new _waku_core__WEBPACK_IMPORTED_MODULE_4__.WakuNode(options ?? {}, libp2p, undefined, undefined,
/***/ }),
/***/ "./node_modules/@waku/sdk/dist/index.js":
/*!**********************************************!*\
!*** ./node_modules/@waku/sdk/dist/index.js ***!
\**********************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DecodedMessage: () => (/* reexport safe */ _waku_core_lib_message_version_0__WEBPACK_IMPORTED_MODULE_1__.DecodedMessage),\n/* harmony export */ Decoder: () => (/* reexport safe */ _waku_core_lib_message_version_0__WEBPACK_IMPORTED_MODULE_1__.Decoder),\n/* harmony export */ EPeersByDiscoveryEvents: () => (/* reexport safe */ _waku_interfaces__WEBPACK_IMPORTED_MODULE_5__.EPeersByDiscoveryEvents),\n/* harmony export */ Encoder: () => (/* reexport safe */ _waku_core_lib_message_version_0__WEBPACK_IMPORTED_MODULE_1__.Encoder),\n/* harmony export */ PageDirection: () => (/* reexport safe */ _waku_interfaces__WEBPACK_IMPORTED_MODULE_5__.PageDirection),\n/* harmony export */ Protocols: () => (/* reexport safe */ _waku_interfaces__WEBPACK_IMPORTED_MODULE_5__.Protocols),\n/* harmony export */ SendError: () => (/* reexport safe */ _waku_interfaces__WEBPACK_IMPORTED_MODULE_5__.SendError),\n/* harmony export */ Tags: () => (/* reexport safe */ _waku_interfaces__WEBPACK_IMPORTED_MODULE_5__.Tags),\n/* harmony export */ WakuNode: () => (/* reexport safe */ _waku_core__WEBPACK_IMPORTED_MODULE_0__.WakuNode),\n/* harmony export */ bytesToUtf8: () => (/* reexport safe */ _waku_utils_bytes__WEBPACK_IMPORTED_MODULE_2__.bytesToUtf8),\n/* harmony export */ createDecoder: () => (/* reexport safe */ _waku_core__WEBPACK_IMPORTED_MODULE_0__.createDecoder),\n/* harmony export */ createEncoder: () => (/* reexport safe */ _waku_core__WEBPACK_IMPORTED_MODULE_0__.createEncoder),\n/* harmony export */ createFullNode: () => (/* reexport safe */ _create_js__WEBPACK_IMPORTED_MODULE_3__.createFullNode),\n/* harmony export */ createLightNode: () => (/* reexport safe */ _create_js__WEBPACK_IMPORTED_MODULE_3__.createLightNode),\n/* harmony export */ createRelayNode: () => (/* reexport safe */ _create_js__WEBPACK_IMPORTED_MODULE_3__.createRelayNode),\n/* harmony export */ defaultLibp2p: () => (/* reexport safe */ _create_js__WEBPACK_IMPORTED_MODULE_3__.defaultLibp2p),\n/* harmony export */ defaultPeerDiscovery: () => (/* reexport safe */ _create_js__WEBPACK_IMPORTED_MODULE_3__.defaultPeerDiscovery),\n/* harmony export */ relay: () => (/* reexport module object */ _waku_relay__WEBPACK_IMPORTED_MODULE_6__),\n/* harmony export */ utf8ToBytes: () => (/* reexport safe */ _waku_utils_bytes__WEBPACK_IMPORTED_MODULE_2__.utf8ToBytes),\n/* harmony export */ utils: () => (/* reexport module object */ _waku_utils__WEBPACK_IMPORTED_MODULE_4__),\n/* harmony export */ waitForRemotePeer: () => (/* reexport safe */ _waku_core__WEBPACK_IMPORTED_MODULE_0__.waitForRemotePeer),\n/* harmony export */ waku: () => (/* reexport module object */ _waku_core__WEBPACK_IMPORTED_MODULE_0__)\n/* harmony export */ });\n/* harmony import */ var _waku_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @waku/core */ \"./node_modules/@waku/core/dist/index.js\");\n/* harmony import */ var _waku_core_lib_message_version_0__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @waku/core/lib/message/version_0 */ \"./node_modules/@waku/core/dist/lib/message/version_0.js\");\n/* harmony import */ var _waku_utils_bytes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @waku/utils/bytes */ \"./node_modules/@waku/utils/dist/bytes/index.js\");\n/* harmony import */ var _create_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./create.js */ \"./node_modules/@waku/sdk/dist/create.js\");\n/* harmony import */ var _waku_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @waku/utils */ \"./node_modules/@waku/utils/dist/index.js\");\n/* harmony import */ var _waku_interfaces__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @waku/interfaces */ \"./node_modules/@waku/interfaces/dist/index.js\");\n/* harmony import */ var _waku_relay__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @waku/relay */ \"./node_modules/@waku/relay/dist/index.js\");\n\n\n\n\n\n\n\n\n//# sourceMappingURL=index.js.ma
/***/ }),
/***/ "./node_modules/@waku/utils/dist/bytes/index.js":
/*!******************************************************!*\
!*** ./node_modules/@waku/utils/dist/bytes/index.js ***!
\******************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ bytesToHex: () => (/* binding */ bytesToHex),\n/* harmony export */ bytesToUtf8: () => (/* binding */ bytesToUtf8),\n/* harmony export */ concat: () => (/* binding */ concat),\n/* harmony export */ hexToBytes: () => (/* binding */ hexToBytes),\n/* harmony export */ utf8ToBytes: () => (/* binding */ utf8ToBytes)\n/* harmony export */ });\n/* harmony import */ var uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! uint8arrays/from-string */ \"./node_modules/uint8arrays/dist/src/from-string.js\");\n/* harmony import */ var uint8arrays_to_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! uint8arrays/to-string */ \"./node_modules/uint8arrays/dist/src/to-string.js\");\n\n\n/**\n * Convert input to a byte array.\n *\n * Handles both `0x` prefixed and non-prefixed strings.\n */\nfunction hexToBytes(hex) {\n if (typeof hex === \"string\") {\n const _hex = hex.replace(/^0x/i, \"\");\n return (0,uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_0__.fromString)(_hex.toLowerCase(), \"base16\");\n }\n return hex;\n}\n/**\n * Convert byte array to hex string (no `0x` prefix).\n */\nconst bytesToHex = (bytes) => (0,uint8arrays_to_string__WEBPACK_IMPORTED_MODULE_1__.toString)(bytes, \"base16\");\n/**\n * Decode byte array to utf-8 string.\n */\nconst bytesToUtf8 = (b) => (0,uint8arrays_to_string__WEBPACK_IMPORTED_MODULE_1__.toString)(b, \"utf8\");\n/**\n * Encode utf-8 string to byte array.\n */\nconst utf8ToBytes = (s) => (0,uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_0__.fromString)(s, \"utf8\");\n/**\n * Concatenate using Uint8Arrays as `Buffer` has a different behavior with `DataView`\n */\nfunction concat(byteArrays, totalLength) {\n const len = totalLength ?? byteArrays.reduce((acc, curr) => acc + curr.length, 0);\n const res = new Uint8Array(len);\n let offset = 0;\n for (const bytes of byteArrays) {\n res.set(bytes, offset);\n offset += bytes.length;\n }\n return res;\n}\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/utils/dist/bytes/index.js?");
/***/ }),
/***/ "./node_modules/@waku/utils/dist/common/group_by.js":
/*!**********************************************************!*\
!*** ./node_modules/@waku/utils/dist/common/group_by.js ***!
\**********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ groupByContentTopic: () => (/* binding */ groupByContentTopic)\n/* harmony export */ });\nfunction groupByContentTopic(values) {\n const groupedDecoders = new Map();\n values.forEach((value) => {\n let decs = groupedDecoders.get(value.contentTopic);\n if (!decs) {\n groupedDecoders.set(value.contentTopic, []);\n decs = groupedDecoders.get(value.contentTopic);\n }\n decs.push(value);\n });\n return groupedDecoders;\n}\n//# sourceMappingURL=group_by.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/utils/dist/common/group_by.js?");
/***/ }),
/***/ "./node_modules/@waku/utils/dist/common/index.js":
/*!*******************************************************!*\
!*** ./node_modules/@waku/utils/dist/common/index.js ***!
\*******************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ getPseudoRandomSubset: () => (/* reexport safe */ _random_subset_js__WEBPACK_IMPORTED_MODULE_1__.getPseudoRandomSubset),\n/* harmony export */ groupByContentTopic: () => (/* reexport safe */ _group_by_js__WEBPACK_IMPORTED_MODULE_2__.groupByContentTopic),\n/* harmony export */ isDefined: () => (/* reexport safe */ _is_defined_js__WEBPACK_IMPORTED_MODULE_0__.isDefined),\n/* harmony export */ isSizeValid: () => (/* reexport safe */ _is_size_valid_js__WEBPACK_IMPORTED_MODULE_4__.isSizeValid),\n/* harmony export */ removeItemFromArray: () => (/* binding */ removeItemFromArray),\n/* harmony export */ toAsyncIterator: () => (/* reexport safe */ _to_async_iterator_js__WEBPACK_IMPORTED_MODULE_3__.toAsyncIterator)\n/* harmony export */ });\n/* harmony import */ var _is_defined_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is_defined.js */ \"./node_modules/@waku/utils/dist/common/is_defined.js\");\n/* harmony import */ var _random_subset_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./random_subset.js */ \"./node_modules/@waku/utils/dist/common/random_subset.js\");\n/* harmony import */ var _group_by_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./group_by.js */ \"./node_modules/@waku/utils/dist/common/group_by.js\");\n/* harmony import */ var _to_async_iterator_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./to_async_iterator.js */ \"./node_modules/@waku/utils/dist/common/to_async_iterator.js\");\n/* harmony import */ var _is_size_valid_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./is_size_valid.js */ \"./node_modules/@waku/utils/dist/common/is_size_valid.js\");\n\n\nfunction removeItemFromArray(arr, value) {\n const index = arr.indexOf(value);\n if (index > -1) {\n arr.splice(index, 1);\n }\n return arr;\n}\n\n\n\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/utils/dist/common/index.js?");
/***/ }),
/***/ "./node_modules/@waku/utils/dist/common/is_defined.js":
/*!************************************************************!*\
!*** ./node_modules/@waku/utils/dist/common/is_defined.js ***!
\************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ isDefined: () => (/* binding */ isDefined)\n/* harmony export */ });\nfunction isDefined(value) {\n return Boolean(value);\n}\n//# sourceMappingURL=is_defined.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/utils/dist/common/is_defined.js?");
/***/ }),
/***/ "./node_modules/@waku/utils/dist/common/is_size_valid.js":
/*!***************************************************************!*\
!*** ./node_modules/@waku/utils/dist/common/is_size_valid.js ***!
\***************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ isSizeValid: () => (/* binding */ isSizeValid)\n/* harmony export */ });\nconst MB = 1024 ** 2;\nconst SIZE_CAP = 1; // 1 MB\nconst isSizeValid = (payload) => {\n if (payload.length / MB > SIZE_CAP) {\n return false;\n }\n return true;\n};\n//# sourceMappingURL=is_size_valid.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/utils/dist/common/is_size_valid.js?");
/***/ }),
/***/ "./node_modules/@waku/utils/dist/common/random_subset.js":
/*!***************************************************************!*\
!*** ./node_modules/@waku/utils/dist/common/random_subset.js ***!
\***************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ getPseudoRandomSubset: () => (/* binding */ getPseudoRandomSubset)\n/* harmony export */ });\n/**\n * Return pseudo random subset of the input.\n */\nfunction getPseudoRandomSubset(values, wantedNumber) {\n if (values.length <= wantedNumber || values.length <= 1) {\n return values;\n }\n return shuffle(values).slice(0, wantedNumber);\n}\nfunction shuffle(arr) {\n if (arr.length <= 1) {\n return arr;\n }\n const randInt = () => {\n return Math.floor(Math.random() * Math.floor(arr.length));\n };\n for (let i = 0; i < arr.length; i++) {\n const j = randInt();\n const tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n }\n return arr;\n}\n//# sourceMappingURL=random_subset.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/utils/dist/common/random_subset.js?");
/***/ }),
/***/ "./node_modules/@waku/utils/dist/common/to_async_iterator.js":
/*!*******************************************************************!*\
!*** ./node_modules/@waku/utils/dist/common/to_async_iterator.js ***!
\*******************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ toAsyncIterator: () => (/* binding */ toAsyncIterator)\n/* harmony export */ });\nconst FRAME_RATE = 60;\n/**\n * Function that transforms IReceiver subscription to iterable stream of data.\n * @param receiver - object that allows to be subscribed to;\n * @param decoder - parameter to be passed to receiver for subscription;\n * @param options - options for receiver for subscription;\n * @param iteratorOptions - optional configuration for iterator;\n * @returns iterator and stop function to terminate it.\n */\nasync function toAsyncIterator(receiver, decoder, options, iteratorOptions) {\n const iteratorDelay = iteratorOptions?.iteratorDelay ?? FRAME_RATE;\n const messages = [];\n let unsubscribe;\n unsubscribe = await receiver.subscribe(decoder, (message) => {\n messages.push(message);\n }, options);\n const isWithTimeout = Number.isInteger(iteratorOptions?.timeoutMs);\n const timeoutMs = iteratorOptions?.timeoutMs ?? 0;\n const startTime = Date.now();\n async function* iterator() {\n while (true) {\n if (isWithTimeout && Date.now() - startTime >= timeoutMs) {\n return;\n }\n await wait(iteratorDelay);\n const message = messages.shift();\n if (!unsubscribe && messages.length === 0) {\n return message;\n }\n if (!message && unsubscribe) {\n continue;\n }\n yield message;\n }\n }\n return {\n iterator: iterator(),\n async stop() {\n if (unsubscribe) {\n await unsubscribe();\n unsubscribe = undefined;\n }\n },\n };\n}\nfunction wait(ms) {\n return new Promise((resolve) => {\n setTimeout(resolve, ms);\n });\n}\n//# sourceMappingURL=to_async_iterator.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/utils/dist/common/to_async_iterator.js?");
/***/ }),
/***/ "./node_modules/@waku/utils/dist/index.js":
/*!************************************************!*\
!*** ./node_modules/@waku/utils/dist/index.js ***!
\************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ getPseudoRandomSubset: () => (/* reexport safe */ _common_index_js__WEBPACK_IMPORTED_MODULE_0__.getPseudoRandomSubset),\n/* harmony export */ groupByContentTopic: () => (/* reexport safe */ _common_index_js__WEBPACK_IMPORTED_MODULE_0__.groupByContentTopic),\n/* harmony export */ isDefined: () => (/* reexport safe */ _common_index_js__WEBPACK_IMPORTED_MODULE_0__.isDefined),\n/* harmony export */ isSizeValid: () => (/* reexport safe */ _common_index_js__WEBPACK_IMPORTED_MODULE_0__.isSizeValid),\n/* harmony export */ removeItemFromArray: () => (/* reexport safe */ _common_index_js__WEBPACK_IMPORTED_MODULE_0__.removeItemFromArray),\n/* harmony export */ toAsyncIterator: () => (/* reexport safe */ _common_index_js__WEBPACK_IMPORTED_MODULE_0__.toAsyncIterator)\n/* harmony export */ });\n/* harmony import */ var _common_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common/index.js */ \"./node_modules/@waku/utils/dist/common/index.js\");\n\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/utils/dist/index.js?");
/***/ }),
/***/ "./node_modules/@waku/utils/dist/libp2p/index.js":
/*!*******************************************************!*\
!*** ./node_modules/@waku/utils/dist/libp2p/index.js ***!
\*******************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ getPeersForProtocol: () => (/* binding */ getPeersForProtocol),\n/* harmony export */ selectConnection: () => (/* binding */ selectConnection),\n/* harmony export */ selectPeerForProtocol: () => (/* binding */ selectPeerForProtocol),\n/* harmony export */ selectRandomPeer: () => (/* binding */ selectRandomPeer)\n/* harmony export */ });\n/* harmony import */ var debug__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! debug */ \"./node_modules/debug/src/browser.js\");\n\nconst log = debug__WEBPACK_IMPORTED_MODULE_0__(\"waku:libp2p-utils\");\n/**\n * Returns a pseudo-random peer that supports the given protocol.\n * Useful for protocols such as store and light push\n */\nfunction selectRandomPeer(peers) {\n if (peers.length === 0)\n return;\n const index = Math.round(Math.random() * (peers.length - 1));\n return peers[index];\n}\n/**\n * Returns the list of peers that supports the given protocol.\n */\nasync function getPeersForProtocol(peerStore, protocols) {\n const peers = [];\n await peerStore.forEach((peer) => {\n for (let i = 0; i < protocols.length; i++) {\n if (peer.protocols.includes(protocols[i])) {\n peers.push(peer);\n break;\n }\n }\n });\n return peers;\n}\nasync function selectPeerForProtocol(peerStore, protocols, peerId) {\n let peer;\n if (peerId) {\n peer = await peerStore.get(peerId);\n if (!peer) {\n throw new Error(`Failed to retrieve connection details for provided peer in peer store: ${peerId.toString()}`);\n }\n }\n else {\n const peers = await getPeersForProtocol(peerStore, protocols);\n peer = selectRandomPeer(peers);\n if (!peer) {\n throw new Error(`Failed to find known peer that registers protocols: ${protocols}`);\n }\n }\n let protocol;\n for (const codec of protocols) {\n if (peer.protocols.includes(codec)) {\n protocol = codec;\n // Do not break as we want to keep the last value\n }\n }\n log(`Using codec ${protocol}`);\n if (!protocol) {\n throw new Error(`Peer does not register required protocols (${peer.id.toString()}): ${protocols}`);\n }\n return { peer, protocol };\n}\nfunction selectConnection(connections) {\n if (!connections.length)\n return;\n if (connections.length === 1)\n return connections[0];\n let latestConnection;\n connections.forEach((connection) => {\n if (connection.stat.status === \"OPEN\") {\n if (!latestConnection) {\n latestConnection = connection;\n }\n else if (connection.stat.timeline.open > latestConnection.stat.timeline.open) {\n latestConnection = connection;\n }\n }\n });\n return latestConnection;\n}\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/@waku/utils/dist/libp2p/index.js?");
/***/ }),
/***/ "./node_modules/abortable-iterator/dist/src/abort-error.js":
/*!*****************************************************************!*\
!*** ./node_modules/abortable-iterator/dist/src/abort-error.js ***!
\*****************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AbortError: () => (/* binding */ AbortError)\n/* harmony export */ });\nclass AbortError extends Error {\n constructor(message, code) {\n super(message ?? 'The operation was aborted');\n this.type = 'aborted';\n this.code = code ?? 'ABORT_ERR';\n }\n}\n//# sourceMappingURL=abort-error.js.map\n\n//# sourceURL=webpack://light/./node_modules/abortable-iterator/dist/src/abort-error.js?");
/***/ }),
/***/ "./node_modules/abortable-iterator/dist/src/index.js":
/*!***********************************************************!*\
!*** ./node_modules/abortable-iterator/dist/src/index.js ***!
\***********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AbortError: () => (/* reexport safe */ _abort_error_js__WEBPACK_IMPORTED_MODULE_0__.AbortError),\n/* harmony export */ abortableDuplex: () => (/* binding */ abortableDuplex),\n/* harmony export */ abortableSink: () => (/* binding */ abortableSink),\n/* harmony export */ abortableSource: () => (/* binding */ abortableSource),\n/* harmony export */ abortableTransform: () => (/* binding */ abortableSink)\n/* harmony export */ });\n/* harmony import */ var _abort_error_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./abort-error.js */ \"./node_modules/abortable-iterator/dist/src/abort-error.js\");\n/* harmony import */ var get_iterator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! get-iterator */ \"./node_modules/get-iterator/dist/src/index.js\");\n/**\n * @packageDocumentation\n *\n * @example\n *\n * ```js\n * import { abortableSource } from 'abortable-iterator'\n *\n * async function main () {\n * // An example function that creates an async iterator that yields an increasing\n * // number every x milliseconds and NEVER ENDS!\n * const asyncCounter = async function * (start, delay) {\n * let i = start\n * while (true) {\n * yield new Promise(resolve => setTimeout(() => resolve(i++), delay))\n * }\n * }\n *\n * // Create a counter that'll yield numbers from 0 upwards every second\n * const everySecond = asyncCounter(0, 1000)\n *\n * // Make everySecond abortable!\n * const controller = new AbortController()\n * const abortableEverySecond = abortableSource(everySecond, controller.signal)\n *\n * // Abort after 5 seconds\n * setTimeout(() => controller.abort(), 5000)\n *\n * try {\n * // Start the iteration, which will throw after 5 seconds when it is aborted\n * for await (const n of abortableEverySecond) {\n * console.log(n)\n * }\n * } catch (err) {\n * if (err.code === 'ERR_ABORTED') {\n * // Expected - all ok :D\n * } else {\n * throw err\n * }\n * }\n * }\n *\n * main()\n * ```\n */\n\n\n/**\n * Wrap an iterator to make it abortable, allow cleanup when aborted via onAbort\n */\nfunction abortableSource(source, signal, options) {\n const opts = options ?? {};\n const iterator = (0,get_iterator__WEBPACK_IMPORTED_MODULE_1__.getIterator)(source);\n async function* abortable() {\n let nextAbortHandler;\n const abortHandler = () => {\n if (nextAbortHandler != null)\n nextAbortHandler();\n };\n signal.addEventListener('abort', abortHandler);\n while (true) {\n let result;\n try {\n if (signal.aborted) {\n const { abortMessage, abortCode } = opts;\n throw new _abort_error_js__WEBPACK_IMPORTED_MODULE_0__.AbortError(abortMessage, abortCode);\n }\n const abort = new Promise((resolve, reject) => {\n nextAbortHandler = () => {\n const { abortMessage, abortCode } = opts;\n reject(new _abort_error_js__WEBPACK_IMPORTED_MODULE_0__.AbortError(abortMessage, abortCode));\n };\n });\n // Race the iterator and the abort signals\n result = await Promise.race([abort, iterator.next()]);\n nextAbortHandler = null;\n }\n catch (err) {\n signal.removeEventListener('abort', abortHandler);\n // Might not have been aborted by a known signal\n const isKnownAborter = err.type === 'aborted' && signal.aborted;\n if (isKnownAborter && (opts.onAbort != null)) {\n // Do any custom abort handling for the iterator\n opts.onAbort(source);\n }\n // End the iterator if it is a generator\n if (typeof iterator.return === 'function') {\
/***/ }),
/***/ "./node_modules/any-signal/dist/src/index.js":
/*!***************************************************!*\
!*** ./node_modules/any-signal/dist/src/index.js ***!
\***************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ anySignal: () => (/* binding */ anySignal)\n/* harmony export */ });\n/**\n * Takes an array of AbortSignals and returns a single signal.\n * If any signals are aborted, the returned signal will be aborted.\n */\nfunction anySignal(signals) {\n const controller = new globalThis.AbortController();\n function onAbort() {\n controller.abort();\n for (const signal of signals) {\n if (signal?.removeEventListener != null) {\n signal.removeEventListener('abort', onAbort);\n }\n }\n }\n for (const signal of signals) {\n if (signal?.aborted === true) {\n onAbort();\n break;\n }\n if (signal?.addEventListener != null) {\n signal.addEventListener('abort', onAbort);\n }\n }\n function clear() {\n for (const signal of signals) {\n if (signal?.removeEventListener != null) {\n signal.removeEventListener('abort', onAbort);\n }\n }\n }\n const signal = controller.signal;\n signal.clear = clear;\n return signal;\n}\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/any-signal/dist/src/index.js?");
/***/ }),
/***/ "./node_modules/byte-access/dist/src/index.js":
/*!****************************************************!*\
!*** ./node_modules/byte-access/dist/src/index.js ***!
\****************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ accessor)\n/* harmony export */ });\nfunction accessor(buf) {\n if (buf instanceof Uint8Array) {\n return {\n get(index) {\n return buf[index];\n },\n set(index, value) {\n buf[index] = value;\n }\n };\n }\n return {\n get(index) {\n return buf.get(index);\n },\n set(index, value) {\n buf.set(index, value);\n }\n };\n}\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/byte-access/dist/src/index.js?");
/***/ }),
/***/ "./node_modules/datastore-core/dist/src/base.js":
/*!******************************************************!*\
!*** ./node_modules/datastore-core/dist/src/base.js ***!
\******************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ BaseDatastore: () => (/* binding */ BaseDatastore)\n/* harmony export */ });\n/* harmony import */ var it_drain__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! it-drain */ \"./node_modules/it-drain/dist/src/index.js\");\n/* harmony import */ var it_filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! it-filter */ \"./node_modules/it-filter/dist/src/index.js\");\n/* harmony import */ var it_sort__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! it-sort */ \"./node_modules/it-sort/dist/src/index.js\");\n/* harmony import */ var it_take__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! it-take */ \"./node_modules/it-take/dist/src/index.js\");\n\n\n\n\nclass BaseDatastore {\n put(key, val, options) {\n return Promise.reject(new Error('.put is not implemented'));\n }\n get(key, options) {\n return Promise.reject(new Error('.get is not implemented'));\n }\n has(key, options) {\n return Promise.reject(new Error('.has is not implemented'));\n }\n delete(key, options) {\n return Promise.reject(new Error('.delete is not implemented'));\n }\n async *putMany(source, options = {}) {\n for await (const { key, value } of source) {\n await this.put(key, value, options);\n yield key;\n }\n }\n async *getMany(source, options = {}) {\n for await (const key of source) {\n yield {\n key,\n value: await this.get(key, options)\n };\n }\n }\n async *deleteMany(source, options = {}) {\n for await (const key of source) {\n await this.delete(key, options);\n yield key;\n }\n }\n batch() {\n let puts = [];\n let dels = [];\n return {\n put(key, value) {\n puts.push({ key, value });\n },\n delete(key) {\n dels.push(key);\n },\n commit: async (options) => {\n await (0,it_drain__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this.putMany(puts, options));\n puts = [];\n await (0,it_drain__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this.deleteMany(dels, options));\n dels = [];\n }\n };\n }\n /**\n * Extending classes should override `query` or implement this method\n */\n // eslint-disable-next-line require-yield\n async *_all(q, options) {\n throw new Error('._all is not implemented');\n }\n /**\n * Extending classes should override `queryKeys` or implement this method\n */\n // eslint-disable-next-line require-yield\n async *_allKeys(q, options) {\n throw new Error('._allKeys is not implemented');\n }\n query(q, options) {\n let it = this._all(q, options);\n if (q.prefix != null) {\n const prefix = q.prefix;\n it = (0,it_filter__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(it, (e) => e.key.toString().startsWith(prefix));\n }\n if (Array.isArray(q.filters)) {\n it = q.filters.reduce((it, f) => (0,it_filter__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(it, f), it);\n }\n if (Array.isArray(q.orders)) {\n it = q.orders.reduce((it, f) => (0,it_sort__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(it, f), it);\n }\n if (q.offset != null) {\n let i = 0;\n const offset = q.offset;\n it = (0,it_filter__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(it, () => i++ >= offset);\n }\n if (q.limit != null) {\n it = (0,it_take__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(it, q.limit);\n }\n return it;\n }\n queryKeys(q, options) {\n let it = this._allKeys(q, options);\n if (q.prefix != null) {\n const prefix = q.prefix;\n it = (0,it_filter__WEBPACK_IMPORTED_MODULE_1__[\"
/***/ }),
/***/ "./node_modules/datastore-core/dist/src/errors.js":
/*!********************************************************!*\
!*** ./node_modules/datastore-core/dist/src/errors.js ***!
\********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ abortedError: () => (/* binding */ abortedError),\n/* harmony export */ dbDeleteFailedError: () => (/* binding */ dbDeleteFailedError),\n/* harmony export */ dbOpenFailedError: () => (/* binding */ dbOpenFailedError),\n/* harmony export */ dbReadFailedError: () => (/* binding */ dbReadFailedError),\n/* harmony export */ dbWriteFailedError: () => (/* binding */ dbWriteFailedError),\n/* harmony export */ notFoundError: () => (/* binding */ notFoundError)\n/* harmony export */ });\n/* harmony import */ var err_code__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! err-code */ \"./node_modules/err-code/index.js\");\n\nfunction dbOpenFailedError(err) {\n err = err ?? new Error('Cannot open database');\n return err_code__WEBPACK_IMPORTED_MODULE_0__(err, 'ERR_DB_OPEN_FAILED');\n}\nfunction dbDeleteFailedError(err) {\n err = err ?? new Error('Delete failed');\n return err_code__WEBPACK_IMPORTED_MODULE_0__(err, 'ERR_DB_DELETE_FAILED');\n}\nfunction dbWriteFailedError(err) {\n err = err ?? new Error('Write failed');\n return err_code__WEBPACK_IMPORTED_MODULE_0__(err, 'ERR_DB_WRITE_FAILED');\n}\nfunction dbReadFailedError(err) {\n err = err ?? new Error('Read failed');\n return err_code__WEBPACK_IMPORTED_MODULE_0__(err, 'ERR_DB_READ_FAILED');\n}\nfunction notFoundError(err) {\n err = err ?? new Error('Not Found');\n return err_code__WEBPACK_IMPORTED_MODULE_0__(err, 'ERR_NOT_FOUND');\n}\nfunction abortedError(err) {\n err = err ?? new Error('Aborted');\n return err_code__WEBPACK_IMPORTED_MODULE_0__(err, 'ERR_ABORTED');\n}\n//# sourceMappingURL=errors.js.map\n\n//# sourceURL=webpack://light/./node_modules/datastore-core/dist/src/errors.js?");
/***/ }),
/***/ "./node_modules/datastore-core/dist/src/memory.js":
/*!********************************************************!*\
!*** ./node_modules/datastore-core/dist/src/memory.js ***!
\********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ MemoryDatastore: () => (/* binding */ MemoryDatastore)\n/* harmony export */ });\n/* harmony import */ var interface_datastore_key__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! interface-datastore/key */ \"./node_modules/interface-datastore/dist/src/key.js\");\n/* harmony import */ var _base_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base.js */ \"./node_modules/datastore-core/dist/src/base.js\");\n/* harmony import */ var _errors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./errors.js */ \"./node_modules/datastore-core/dist/src/errors.js\");\n\n\n\nclass MemoryDatastore extends _base_js__WEBPACK_IMPORTED_MODULE_1__.BaseDatastore {\n data;\n constructor() {\n super();\n this.data = new Map();\n }\n put(key, val) {\n this.data.set(key.toString(), val);\n return key;\n }\n get(key) {\n const result = this.data.get(key.toString());\n if (result == null) {\n throw _errors_js__WEBPACK_IMPORTED_MODULE_2__.notFoundError();\n }\n return result;\n }\n has(key) {\n return this.data.has(key.toString());\n }\n delete(key) {\n this.data.delete(key.toString());\n }\n *_all() {\n for (const [key, value] of this.data.entries()) {\n yield { key: new interface_datastore_key__WEBPACK_IMPORTED_MODULE_0__.Key(key), value };\n }\n }\n *_allKeys() {\n for (const key of this.data.keys()) {\n yield new interface_datastore_key__WEBPACK_IMPORTED_MODULE_0__.Key(key);\n }\n }\n}\n//# sourceMappingURL=memory.js.map\n\n//# sourceURL=webpack://light/./node_modules/datastore-core/dist/src/memory.js?");
/***/ }),
/***/ "./node_modules/dns-over-http-resolver/dist/src/index.js":
/*!***************************************************************!*\
!*** ./node_modules/dns-over-http-resolver/dist/src/index.js ***!
\***************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var debug__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! debug */ \"./node_modules/debug/src/browser.js\");\n/* harmony import */ var receptacle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! receptacle */ \"./node_modules/receptacle/index.js\");\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils.js */ \"./node_modules/dns-over-http-resolver/dist/src/utils.js\");\n\n\n\nconst log = Object.assign(debug__WEBPACK_IMPORTED_MODULE_0__('dns-over-http-resolver'), {\n error: debug__WEBPACK_IMPORTED_MODULE_0__('dns-over-http-resolver:error')\n});\n/**\n * DNS over HTTP resolver.\n * Uses a list of servers to resolve DNS records with HTTP requests.\n */\nclass Resolver {\n /**\n * @class\n * @param {object} [options]\n * @param {number} [options.maxCache = 100] - maximum number of cached dns records\n * @param {Request} [options.request] - function to return DNSJSON\n */\n constructor(options = {}) {\n this._cache = new receptacle__WEBPACK_IMPORTED_MODULE_1__({ max: options?.maxCache ?? 100 });\n this._TXTcache = new receptacle__WEBPACK_IMPORTED_MODULE_1__({ max: options?.maxCache ?? 100 });\n this._servers = [\n 'https://cloudflare-dns.com/dns-query',\n 'https://dns.google/resolve'\n ];\n this._request = options.request ?? _utils_js__WEBPACK_IMPORTED_MODULE_2__.request;\n this._abortControllers = [];\n }\n /**\n * Cancel all outstanding DNS queries made by this resolver. Any outstanding\n * requests will be aborted and promises rejected.\n */\n cancel() {\n this._abortControllers.forEach(controller => controller.abort());\n }\n /**\n * Get an array of the IP addresses currently configured for DNS resolution.\n * These addresses are formatted according to RFC 5952. It can include a custom port.\n */\n getServers() {\n return this._servers;\n }\n /**\n * Get a shuffled array of the IP addresses currently configured for DNS resolution.\n * These addresses are formatted according to RFC 5952. It can include a custom port.\n */\n _getShuffledServers() {\n const newServers = [...this._servers];\n for (let i = newServers.length - 1; i > 0; i--) {\n const j = Math.floor(Math.random() * i);\n const temp = newServers[i];\n newServers[i] = newServers[j];\n newServers[j] = temp;\n }\n return newServers;\n }\n /**\n * Sets the IP address and port of servers to be used when performing DNS resolution.\n *\n * @param {string[]} servers - array of RFC 5952 formatted addresses.\n */\n setServers(servers) {\n this._servers = servers;\n }\n /**\n * Uses the DNS protocol to resolve the given host name into the appropriate DNS record\n *\n * @param {string} hostname - host name to resolve\n * @param {string} [rrType = 'A'] - resource record type\n */\n async resolve(hostname, rrType = 'A') {\n switch (rrType) {\n case 'A':\n return await this.resolve4(hostname);\n case 'AAAA':\n return await this.resolve6(hostname);\n case 'TXT':\n return await this.resolveTxt(hostname);\n default:\n throw new Error(`${rrType} is not supported`);\n }\n }\n /**\n * Uses the DNS protocol to resolve the given host name into IPv4 addresses\n *\n * @param {string} hostname - host name to resolve\n */\n async resolve4(hostname) {\n const recordType = 'A';\n const cached = this._cache.get(_utils_js__WEBPACK_IMPORTED_MODULE_2__.getCacheKey(hostname, recordType));\n if (cached != null) {\n return cached;\n
/***/ }),
/***/ "./node_modules/dns-over-http-resolver/dist/src/utils.js":
/*!***************************************************************!*\
!*** ./node_modules/dns-over-http-resolver/dist/src/utils.js ***!
\***************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ buildResource: () => (/* binding */ buildResource),\n/* harmony export */ getCacheKey: () => (/* binding */ getCacheKey),\n/* harmony export */ request: () => (/* binding */ request)\n/* harmony export */ });\n/* harmony import */ var native_fetch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! native-fetch */ \"./node_modules/native-fetch/esm/src/index.js\");\n\n/**\n * Build fetch resource for request\n */\nfunction buildResource(serverResolver, hostname, recordType) {\n return `${serverResolver}?name=${hostname}&type=${recordType}`;\n}\n/**\n * Use fetch to find the record\n */\nasync function request(resource, signal) {\n const req = await (0,native_fetch__WEBPACK_IMPORTED_MODULE_0__.fetch)(resource, {\n headers: new native_fetch__WEBPACK_IMPORTED_MODULE_0__.Headers({\n accept: 'application/dns-json'\n }),\n signal\n });\n const res = await req.json();\n return res;\n}\n/**\n * Creates cache key composed by recordType and hostname\n *\n * @param {string} hostname\n * @param {string} recordType\n */\nfunction getCacheKey(hostname, recordType) {\n return `${recordType}_${hostname}`;\n}\n//# sourceMappingURL=utils.js.map\n\n//# sourceURL=webpack://light/./node_modules/dns-over-http-resolver/dist/src/utils.js?");
/***/ }),
/***/ "./node_modules/dns-query/common.mjs":
/*!*******************************************!*\
!*** ./node_modules/dns-query/common.mjs ***!
\*******************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AbortError: () => (/* binding */ AbortError),\n/* harmony export */ BaseEndpoint: () => (/* binding */ BaseEndpoint),\n/* harmony export */ HTTPEndpoint: () => (/* binding */ HTTPEndpoint),\n/* harmony export */ HTTPStatusError: () => (/* binding */ HTTPStatusError),\n/* harmony export */ InvalidProtocolError: () => (/* binding */ InvalidProtocolError),\n/* harmony export */ ResponseError: () => (/* binding */ ResponseError),\n/* harmony export */ TimeoutError: () => (/* binding */ TimeoutError),\n/* harmony export */ UDP4Endpoint: () => (/* binding */ UDP4Endpoint),\n/* harmony export */ UDP6Endpoint: () => (/* binding */ UDP6Endpoint),\n/* harmony export */ UDPEndpoint: () => (/* binding */ UDPEndpoint),\n/* harmony export */ URL: () => (/* binding */ URL),\n/* harmony export */ parseEndpoint: () => (/* binding */ parseEndpoint),\n/* harmony export */ reduceError: () => (/* binding */ reduceError),\n/* harmony export */ supportedProtocols: () => (/* binding */ supportedProtocols),\n/* harmony export */ toEndpoint: () => (/* binding */ toEndpoint)\n/* harmony export */ });\nlet AbortError = typeof global !== 'undefined' ? global.AbortError : typeof window !== 'undefined' ? window.AbortError : null\nif (!AbortError) {\n AbortError = class AbortError extends Error {\n constructor (message = 'Request aborted.') {\n super(message)\n }\n }\n}\nAbortError.prototype.name = 'AbortError'\nAbortError.prototype.code = 'ABORT_ERR'\n\nconst URL = (typeof globalThis !== 'undefined' && globalThis.URL) || require('url').URL\n\n\n\nclass HTTPStatusError extends Error {\n constructor (uri, code, method) {\n super('status=' + code + ' while requesting ' + uri + ' [' + method + ']')\n this.uri = uri\n this.status = code\n this.method = method\n }\n\n toJSON () {\n return {\n code: this.code,\n uri: this.uri,\n status: this.status,\n method: this.method,\n endpoint: this.endpoint\n }\n }\n}\nHTTPStatusError.prototype.name = 'HTTPStatusError'\nHTTPStatusError.prototype.code = 'HTTP_STATUS'\n\nclass ResponseError extends Error {\n constructor (message, cause) {\n super(message)\n this.cause = cause\n }\n\n toJSON () {\n return {\n message: this.message,\n endpoint: this.endpoint,\n code: this.code,\n cause: reduceError(this.cause)\n }\n }\n}\nResponseError.prototype.name = 'ResponseError'\nResponseError.prototype.code = 'RESPONSE_ERR'\n\nclass TimeoutError extends Error {\n constructor (timeout) {\n super('Timeout (t=' + timeout + ').')\n this.timeout = timeout\n }\n\n toJSON () {\n return {\n code: this.code,\n endpoint: this.endpoint,\n timeout: this.timeout\n }\n }\n}\nTimeoutError.prototype.name = 'TimeoutError'\nTimeoutError.prototype.code = 'ETIMEOUT'\n\nconst v4Regex = /^((\\d{1,3}\\.){3,3}\\d{1,3})(:(\\d{2,5}))?$/\nconst v6Regex = /^((::)?(((\\d{1,3}\\.){3}(\\d{1,3}){1})?([0-9a-f]){0,4}:{0,2}){1,8}(::)?)(:(\\d{2,5}))?$/i\n\nfunction reduceError (err) {\n if (typeof err === 'string') {\n return {\n message: err\n }\n }\n try {\n const json = JSON.stringify(err)\n if (json !== '{}') {\n return JSON.parse(json)\n }\n } catch (e) {}\n const error = {\n message: String(err.message || err)\n }\n if (err.code !== undefined) {\n error.code = String(err.code)\n }\n return error\n}\n\nconst baseParts = /^(([a-z0-9]+:)\\/\\/)?([^/[\\s:]+|\\[[^\\]]+\\])?(:([^/\\s]+))?(\\/[^\\s]*)?(.*)$/\nconst httpFlags = /\\[(post|get|((ipv4|ipv6|name)=([^\\]]+)))\\]/ig\nconst updFlags = /\\[(((pk|name)=([^\\]]+)))\\]/ig\n\nfunction parseEndpoint (endpoint) {\n const parts = baseParts.exec(endpoint)\n const protocol = parts[2] || 'https:'\n const host = parts[3]\n const port = parts[5]\n const path = parts[6]\n const rest = parts[7]\n if (protocol === 'https:' || protocol === 'http:') {\n const flags = parseFlags(rest, ht
/***/ }),
/***/ "./node_modules/dns-query/index.mjs":
/*!******************************************!*\
!*** ./node_modules/dns-query/index.mjs ***!
\******************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AbortError: () => (/* reexport safe */ _common_mjs__WEBPACK_IMPORTED_MODULE_5__.AbortError),\n/* harmony export */ BaseEndpoint: () => (/* reexport safe */ _common_mjs__WEBPACK_IMPORTED_MODULE_5__.BaseEndpoint),\n/* harmony export */ DNSRcodeError: () => (/* binding */ DNSRcodeError),\n/* harmony export */ DNS_RCODE_ERROR: () => (/* binding */ DNS_RCODE_ERROR),\n/* harmony export */ DNS_RCODE_MESSAGE: () => (/* binding */ DNS_RCODE_MESSAGE),\n/* harmony export */ HTTPEndpoint: () => (/* reexport safe */ _common_mjs__WEBPACK_IMPORTED_MODULE_5__.HTTPEndpoint),\n/* harmony export */ HTTPStatusError: () => (/* reexport safe */ _common_mjs__WEBPACK_IMPORTED_MODULE_5__.HTTPStatusError),\n/* harmony export */ ResponseError: () => (/* reexport safe */ _common_mjs__WEBPACK_IMPORTED_MODULE_5__.ResponseError),\n/* harmony export */ TimeoutError: () => (/* reexport safe */ _common_mjs__WEBPACK_IMPORTED_MODULE_5__.TimeoutError),\n/* harmony export */ UDP4Endpoint: () => (/* reexport safe */ _common_mjs__WEBPACK_IMPORTED_MODULE_5__.UDP4Endpoint),\n/* harmony export */ UDP6Endpoint: () => (/* reexport safe */ _common_mjs__WEBPACK_IMPORTED_MODULE_5__.UDP6Endpoint),\n/* harmony export */ Wellknown: () => (/* binding */ Wellknown),\n/* harmony export */ backup: () => (/* binding */ backup),\n/* harmony export */ combineTXT: () => (/* binding */ combineTXT),\n/* harmony export */ lookupTxt: () => (/* binding */ lookupTxt),\n/* harmony export */ parseEndpoint: () => (/* reexport safe */ _common_mjs__WEBPACK_IMPORTED_MODULE_5__.parseEndpoint),\n/* harmony export */ query: () => (/* binding */ query),\n/* harmony export */ toEndpoint: () => (/* reexport safe */ _common_mjs__WEBPACK_IMPORTED_MODULE_5__.toEndpoint),\n/* harmony export */ validateResponse: () => (/* binding */ validateResponse),\n/* harmony export */ wellknown: () => (/* binding */ wellknown)\n/* harmony export */ });\n/* harmony import */ var _leichtgewicht_dns_packet__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @leichtgewicht/dns-packet */ \"./node_modules/@leichtgewicht/dns-packet/index.mjs\");\n/* harmony import */ var _leichtgewicht_dns_packet_rcodes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @leichtgewicht/dns-packet/rcodes.js */ \"./node_modules/@leichtgewicht/dns-packet/rcodes.mjs\");\n/* harmony import */ var utf8_codec__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! utf8-codec */ \"./node_modules/utf8-codec/index.mjs\");\n/* harmony import */ var _lib_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./lib.mjs */ \"./node_modules/dns-query/lib.browser.mjs\");\n/* harmony import */ var _resolvers_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./resolvers.mjs */ \"./node_modules/dns-query/resolvers.mjs\");\n/* harmony import */ var _common_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./common.mjs */ \"./node_modules/dns-query/common.mjs\");\n\n\n\n\n\n\n\n\n\nconst DNS_RCODE_ERROR = {\n 1: 'FormErr',\n 2: 'ServFail',\n 3: 'NXDomain',\n 4: 'NotImp',\n 5: 'Refused',\n 6: 'YXDomain',\n 7: 'YXRRSet',\n 8: 'NXRRSet',\n 9: 'NotAuth',\n 10: 'NotZone',\n 11: 'DSOTYPENI'\n}\n\nconst DNS_RCODE_MESSAGE = {\n // https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-6\n 1: 'The name server was unable to interpret the query.',\n 2: 'The name server was unable to process this query due to a problem with the name server.',\n 3: 'Non-Existent Domain.',\n 4: 'The name server does not support the requested kind of query.',\n 5: 'The name server refuses to perform the specified operation for policy reasons.',\n 6: 'Name Exists when it should not.',\n 7: 'RR Set Exists when it should not.',\n 8: 'RR Set that should exist does not.',\n 9: 'Server Not Authoritative for zone / Not Authorized.',\n 10: 'Name not contained in zone.',\n 11: 'DSO-TYPE Not Implemented.'\n}\n\nclass DNSRcodeError extends E
/***/ }),
/***/ "./node_modules/dns-query/lib.browser.mjs":
/*!************************************************!*\
!*** ./node_modules/dns-query/lib.browser.mjs ***!
\************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadJSON: () => (/* binding */ loadJSON),\n/* harmony export */ processResolvers: () => (/* binding */ processResolvers),\n/* harmony export */ queryDns: () => (/* binding */ queryDns),\n/* harmony export */ request: () => (/* binding */ request)\n/* harmony export */ });\n/* harmony import */ var utf8_codec__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! utf8-codec */ \"./node_modules/utf8-codec/index.mjs\");\n/* harmony import */ var _leichtgewicht_base64_codec__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @leichtgewicht/base64-codec */ \"./node_modules/@leichtgewicht/base64-codec/index.mjs\");\n/* harmony import */ var _common_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./common.mjs */ \"./node_modules/dns-query/common.mjs\");\n/* global XMLHttpRequest, localStorage */\n\n\n\nconst contentType = 'application/dns-message'\n\nfunction noop () { }\n\nfunction queryDns () {\n throw new Error('Only \"doh\" endpoints are supported in the browser')\n}\n\nasync function loadJSON (url, cache, timeout, abortSignal) {\n const cacheKey = cache ? cache.localStoragePrefix + cache.name : null\n if (cacheKey) {\n try {\n const cached = JSON.parse(localStorage.getItem(cacheKey))\n if (cached && cached.time > cache.maxTime) {\n return cached\n }\n } catch (err) {}\n }\n const { data } = await requestRaw(url, 'GET', null, timeout, abortSignal)\n const result = {\n time: Date.now(),\n data: JSON.parse(utf8_codec__WEBPACK_IMPORTED_MODULE_0__.decode(data))\n }\n if (cacheKey) {\n try {\n localStorage.setItem(cacheKey, JSON.stringify(result))\n } catch (err) {\n result.time = null\n }\n }\n return result\n}\n\nfunction requestRaw (url, method, data, timeout, abortSignal) {\n return new Promise((resolve, reject) => {\n const target = new _common_mjs__WEBPACK_IMPORTED_MODULE_2__.URL(url)\n if (method === 'GET' && data) {\n target.search = '?dns=' + _leichtgewicht_base64_codec__WEBPACK_IMPORTED_MODULE_1__.base64URL.decode(data)\n }\n const uri = target.toString()\n const xhr = new XMLHttpRequest()\n xhr.open(method, uri, true)\n xhr.setRequestHeader('Accept', contentType)\n if (method === 'POST') {\n xhr.setRequestHeader('Content-Type', contentType)\n }\n xhr.responseType = 'arraybuffer'\n xhr.timeout = timeout\n xhr.ontimeout = ontimeout\n xhr.onreadystatechange = onreadystatechange\n xhr.onerror = onerror\n xhr.onload = onload\n if (method === 'POST') {\n xhr.send(data)\n } else {\n xhr.send()\n }\n\n if (abortSignal) {\n abortSignal.addEventListener('abort', onabort)\n }\n\n function ontimeout () {\n finish(new _common_mjs__WEBPACK_IMPORTED_MODULE_2__.TimeoutError(timeout))\n try {\n xhr.abort()\n } catch (e) { }\n }\n\n function onload () {\n if (xhr.status !== 200) {\n finish(new _common_mjs__WEBPACK_IMPORTED_MODULE_2__.HTTPStatusError(uri, xhr.status, method))\n } else {\n let buf\n if (typeof xhr.response === 'string') {\n buf = utf8_codec__WEBPACK_IMPORTED_MODULE_0__.encode(xhr.response)\n } else if (xhr.response instanceof Uint8Array) {\n buf = xhr.response\n } else if (Array.isArray(xhr.response) || xhr.response instanceof ArrayBuffer) {\n buf = new Uint8Array(xhr.response)\n } else {\n throw new Error('Unprocessable response ' + xhr.response)\n }\n finish(null, buf)\n }\n }\n\n function onreadystatechange () {\n if (xhr.readyState > 1 && xhr.status !== 200 && xhr.status !== 0) {\n finish(new _common_mjs__WEBPACK_IMPORTED_MODULE_2__.HTTPStatusError(uri, xhr.status, method))\n try {\n xhr.abort()\n } catch (e) { }\n }\n }\n\n let finish = function (error, data) {\n finish = noop\n if (abortSignal) {\n abortSig
/***/ }),
/***/ "./node_modules/dns-query/resolvers.mjs":
/*!**********************************************!*\
!*** ./node_modules/dns-query/resolvers.mjs ***!
\**********************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ resolvers: () => (/* binding */ resolvers)\n/* harmony export */ });\nconst resolvers = {\n data: [\n {\n name: 'adfree.usableprivacy.net',\n endpoint: {\n protocol: 'https:',\n host: 'adfree.usableprivacy.net'\n },\n description: 'Public updns DoH service with advertising, tracker and malware filters.\\nHosted in Europe by @usableprivacy, details see: https://docs.usableprivacy.com',\n country: 'Germany',\n location: {\n lat: 51.2993,\n long: 9.491\n },\n filter: true\n },\n {\n name: 'adguard-dns-doh',\n endpoint: {\n protocol: 'https:',\n host: 'dns.adguard.com',\n ipv4: '94.140.15.15'\n },\n description: 'Remove ads and protect your computer from malware (over DoH)',\n country: 'France',\n location: {\n lat: 48.8582,\n long: 2.3387\n },\n filter: true\n },\n {\n name: 'adguard-dns-family-doh',\n endpoint: {\n protocol: 'https:',\n host: 'dns-family.adguard.com',\n ipv4: '94.140.15.16'\n },\n description: 'Adguard DNS with safesearch and adult content blocking (over DoH)',\n country: 'France',\n location: {\n lat: 48.8582,\n long: 2.3387\n },\n filter: true\n },\n {\n name: 'adguard-dns-unfiltered-doh',\n endpoint: {\n protocol: 'https:',\n host: 'dns-unfiltered.adguard.com',\n ipv4: '94.140.14.140'\n },\n description: 'AdGuard public DNS servers without filters (over DoH)',\n country: 'France',\n location: {\n lat: 48.8582,\n long: 2.3387\n }\n },\n {\n name: 'ahadns-doh-chi',\n endpoint: {\n protocol: 'https:',\n host: 'doh.chi.ahadns.net',\n cors: true\n },\n description: 'A zero logging DNS with support for DNS-over-HTTPS (DoH) & DNS-over-TLS (DoT). Blocks ads, malware, trackers, viruses, ransomware, telemetry and more. No persistent logs. DNSSEC. Hosted in Chicago, USA. By https://ahadns.com/\\nServer statistics can be seen at: https://statistics.ahadns.com/?server=chi',\n country: 'United States',\n location: {\n lat: 41.8483,\n long: -87.6517\n },\n filter: true,\n cors: true\n },\n {\n name: 'ahadns-doh-in',\n endpoint: {\n protocol: 'https:',\n host: 'doh.in.ahadns.net',\n cors: true\n },\n description: 'A zero logging DNS with support for DNS-over-HTTPS (DoH) & DNS-over-TLS (DoT). Blocks ads, malware, trackers, viruses, ransomware, telemetry and more. No persistent logs. DNSSEC. Hosted in Mumbai, India. By https://ahadns.com/\\nServer statistics can be seen at: https://statistics.ahadns.com/?server=in',\n country: 'India',\n location: {\n lat: 19.0748,\n long: 72.8856\n },\n filter: true,\n cors: true\n },\n {\n name: 'ahadns-doh-la',\n endpoint: {\n protocol: 'https:',\n host: 'doh.la.ahadns.net',\n cors: true\n },\n description: 'A zero logging DNS with support for DNS-over-HTTPS (DoH) & DNS-over-TLS (DoT). Blocks ads, malware, trackers, viruses, ransomware, telemetry and more. No persistent logs. DNSSEC. Hosted in Los Angeles, USA. By https://ahadns.com/\\nServer statistics can be seen at: https://statistics.ahadns.com/?server=la',\n country: 'United States',\n location: {\n lat: 34.0549,\n long: -118.2578\n },\n filter: true,\n cors: true\n },\n {\n name: 'ahadns-doh-nl',\n endpoint: {\n protocol: 'https:',\n host: 'doh.nl.ahadns.net',\n cors: true\n },\n description: 'A zero logging DNS with support for DNS-over-HTTPS (DoH) & DNS-over-TLS (DoT). Blocks ads, malware, trackers, viruses, ransomware, telemetry and more. No persistent logs. DNSSEC. Hosted in Amsterd
/***/ }),
/***/ "./node_modules/get-iterator/dist/src/index.js":
/*!*****************************************************!*\
!*** ./node_modules/get-iterator/dist/src/index.js ***!
\*****************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ getIterator: () => (/* binding */ getIterator)\n/* harmony export */ });\nfunction getIterator(obj) {\n if (obj != null) {\n if (typeof obj[Symbol.iterator] === 'function') {\n return obj[Symbol.iterator]();\n }\n if (typeof obj[Symbol.asyncIterator] === 'function') {\n return obj[Symbol.asyncIterator]();\n }\n if (typeof obj.next === 'function') {\n return obj; // probably an iterator\n }\n }\n throw new Error('argument is not an iterator or iterable');\n}\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/get-iterator/dist/src/index.js?");
/***/ }),
/***/ "./node_modules/interface-datastore/dist/src/key.js":
/*!**********************************************************!*\
!*** ./node_modules/interface-datastore/dist/src/key.js ***!
\**********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Key: () => (/* binding */ Key)\n/* harmony export */ });\n/* harmony import */ var nanoid__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! nanoid */ \"./node_modules/nanoid/index.browser.js\");\n/* harmony import */ var uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! uint8arrays/from-string */ \"./node_modules/uint8arrays/dist/src/from-string.js\");\n/* harmony import */ var uint8arrays_to_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! uint8arrays/to-string */ \"./node_modules/uint8arrays/dist/src/to-string.js\");\n\n\n\nconst pathSepS = '/';\nconst pathSepB = new TextEncoder().encode(pathSepS);\nconst pathSep = pathSepB[0];\n/**\n * A Key represents the unique identifier of an object.\n * Our Key scheme is inspired by file systems and Google App Engine key model.\n * Keys are meant to be unique across a system. Keys are hierarchical,\n * incorporating more and more specific namespaces. Thus keys can be deemed\n * 'children' or 'ancestors' of other keys:\n * - `new Key('/Comedy')`\n * - `new Key('/Comedy/MontyPython')`\n * Also, every namespace can be parametrized to embed relevant object\n * information. For example, the Key `name` (most specific namespace) could\n * include the object type:\n * - `new Key('/Comedy/MontyPython/Actor:JohnCleese')`\n * - `new Key('/Comedy/MontyPython/Sketch:CheeseShop')`\n * - `new Key('/Comedy/MontyPython/Sketch:CheeseShop/Character:Mousebender')`\n *\n */\nclass Key {\n _buf;\n /**\n * @param {string | Uint8Array} s\n * @param {boolean} [clean]\n */\n constructor(s, clean) {\n if (typeof s === 'string') {\n this._buf = (0,uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_0__.fromString)(s);\n }\n else if (s instanceof Uint8Array) {\n this._buf = s;\n }\n else {\n throw new Error('Invalid key, should be String of Uint8Array');\n }\n if (clean == null) {\n clean = true;\n }\n if (clean) {\n this.clean();\n }\n if (this._buf.byteLength === 0 || this._buf[0] !== pathSep) {\n throw new Error('Invalid key');\n }\n }\n /**\n * Convert to the string representation\n *\n * @param {import('uint8arrays/to-string').SupportedEncodings} [encoding='utf8'] - The encoding to use.\n * @returns {string}\n */\n toString(encoding = 'utf8') {\n return (0,uint8arrays_to_string__WEBPACK_IMPORTED_MODULE_1__.toString)(this._buf, encoding);\n }\n /**\n * Return the Uint8Array representation of the key\n *\n * @returns {Uint8Array}\n */\n uint8Array() {\n return this._buf;\n }\n /**\n * Return string representation of the key\n *\n * @returns {string}\n */\n get [Symbol.toStringTag]() {\n return `Key(${this.toString()})`;\n }\n /**\n * Constructs a key out of a namespace array.\n *\n * @param {Array<string>} list - The array of namespaces\n * @returns {Key}\n *\n * @example\n * ```js\n * Key.withNamespaces(['one', 'two'])\n * // => Key('/one/two')\n * ```\n */\n static withNamespaces(list) {\n return new Key(list.join(pathSepS));\n }\n /**\n * Returns a randomly (uuid) generated key.\n *\n * @returns {Key}\n *\n * @example\n * ```js\n * Key.random()\n * // => Key('/f98719ea086343f7b71f32ea9d9d521d')\n * ```\n */\n static random() {\n return new Key((0,nanoid__WEBPACK_IMPORTED_MODULE_2__.nanoid)().replace(/-/g, ''));\n }\n /**\n * @param {*} other\n */\n static asKey(other) {\n if (other instanceof Uint8Array || typeof other === 'string') {\n // we can create a key from this\n return new Key(other);\n }\n if (typeof other.uint8Array === 'function') {\n // this is an older vers
/***/ }),
/***/ "./node_modules/ip-regex/index.js":
/*!****************************************!*\
!*** ./node_modules/ip-regex/index.js ***!
\****************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\nconst word = '[a-fA-F\\\\d:]';\n\nconst boundry = options => options && options.includeBoundaries\n\t? `(?:(?<=\\\\s|^)(?=${word})|(?<=${word})(?=\\\\s|$))`\n\t: '';\n\nconst v4 = '(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)(?:\\\\.(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)){3}';\n\nconst v6segment = '[a-fA-F\\\\d]{1,4}';\n\nconst v6 = `\n(?:\n(?:${v6segment}:){7}(?:${v6segment}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:${v6segment}:){6}(?:${v4}|:${v6segment}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:${v6segment}:){5}(?::${v4}|(?::${v6segment}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:${v6segment}:){4}(?:(?::${v6segment}){0,1}:${v4}|(?::${v6segment}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:${v6segment}:){3}(?:(?::${v6segment}){0,2}:${v4}|(?::${v6segment}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:${v6segment}:){2}(?:(?::${v6segment}){0,3}:${v4}|(?::${v6segment}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:${v6segment}:){1}(?:(?::${v6segment}){0,4}:${v4}|(?::${v6segment}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::(?:(?::${v6segment}){0,5}:${v4}|(?::${v6segment}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1\n`.replace(/\\s*\\/\\/.*$/gm, '').replace(/\\n/g, '').trim();\n\n// Pre-compile only the exact regexes because adding a global flag make regexes stateful\nconst v46Exact = new RegExp(`(?:^${v4}$)|(?:^${v6}$)`);\nconst v4exact = new RegExp(`^${v4}$`);\nconst v6exact = new RegExp(`^${v6}$`);\n\nconst ipRegex = options => options && options.exact\n\t? v46Exact\n\t: new RegExp(`(?:${boundry(options)}${v4}${boundry(options)})|(?:${boundry(options)}${v6}${boundry(options)})`, 'g');\n\nipRegex.v4 = options => options && options.exact ? v4exact : new RegExp(`${boundry(options)}${v4}${boundry(options)}`, 'g');\nipRegex.v6 = options => options && options.exact ? v6exact : new RegExp(`${boundry(options)}${v6}${boundry(options)}`, 'g');\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ipRegex);\n\n\n//# sourceURL=webpack://light/./node_modules/ip-regex/index.js?");
/***/ }),
/***/ "./node_modules/it-all/dist/src/index.js":
/*!***********************************************!*\
!*** ./node_modules/it-all/dist/src/index.js ***!
\***********************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\nfunction isAsyncIterable(thing) {\n return thing[Symbol.asyncIterator] != null;\n}\nfunction all(source) {\n if (isAsyncIterable(source)) {\n return (async () => {\n const arr = [];\n for await (const entry of source) {\n arr.push(entry);\n }\n return arr;\n })();\n }\n const arr = [];\n for (const entry of source) {\n arr.push(entry);\n }\n return arr;\n}\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (all);\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/it-all/dist/src/index.js?");
/***/ }),
/***/ "./node_modules/it-batched-bytes/dist/src/index.js":
/*!*********************************************************!*\
!*** ./node_modules/it-batched-bytes/dist/src/index.js ***!
\*********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var p_defer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! p-defer */ \"./node_modules/p-defer/index.js\");\n/* harmony import */ var uint8arraylist__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! uint8arraylist */ \"./node_modules/uint8arraylist/dist/src/index.js\");\n\n\nfunction isAsyncIterable(thing) {\n return thing[Symbol.asyncIterator] != null;\n}\nconst DEFAULT_BATCH_SIZE = 1024 * 1024;\nconst DEFAULT_SERIALIZE = (buf, list) => { list.append(buf); };\nfunction batchedBytes(source, options) {\n if (isAsyncIterable(source)) {\n return (async function* () {\n let buffer = new uint8arraylist__WEBPACK_IMPORTED_MODULE_1__.Uint8ArrayList();\n let ended = false;\n let deferred = (0,p_defer__WEBPACK_IMPORTED_MODULE_0__[\"default\"])();\n let size = Number(options?.size ?? DEFAULT_BATCH_SIZE);\n if (isNaN(size) || size === 0 || size < 0) {\n size = DEFAULT_BATCH_SIZE;\n }\n if (size !== Math.round(size)) {\n throw new Error('Batch size must be an integer');\n }\n const yieldAfter = options?.yieldAfter ?? 0;\n const serialize = options?.serialize ?? DEFAULT_SERIALIZE;\n void Promise.resolve().then(async () => {\n try {\n let timeout;\n for await (const buf of source) {\n // @ts-expect-error - if buf is not `Uint8Array | Uint8ArrayList` we cannot use the default serializer\n serialize(buf, buffer);\n if (buffer.byteLength >= size) {\n clearTimeout(timeout);\n deferred.resolve();\n continue;\n }\n timeout = setTimeout(() => {\n deferred.resolve();\n }, yieldAfter);\n }\n clearTimeout(timeout);\n deferred.resolve();\n }\n catch (err) {\n deferred.reject(err);\n }\n finally {\n ended = true;\n }\n });\n while (!ended) { // eslint-disable-line no-unmodified-loop-condition\n await deferred.promise;\n deferred = (0,p_defer__WEBPACK_IMPORTED_MODULE_0__[\"default\"])();\n if (buffer.byteLength > 0) {\n const b = buffer;\n buffer = new uint8arraylist__WEBPACK_IMPORTED_MODULE_1__.Uint8ArrayList();\n yield b.subarray();\n }\n }\n })();\n }\n return (function* () {\n const buffer = new uint8arraylist__WEBPACK_IMPORTED_MODULE_1__.Uint8ArrayList();\n let size = Number(options?.size ?? DEFAULT_BATCH_SIZE);\n if (isNaN(size) || size === 0 || size < 0) {\n size = DEFAULT_BATCH_SIZE;\n }\n if (size !== Math.round(size)) {\n throw new Error('Batch size must be an integer');\n }\n const serialize = options?.serialize ?? DEFAULT_SERIALIZE;\n for (const buf of source) {\n // @ts-expect-error - if buf is not `Uint8Array | Uint8ArrayList` we cannot use the default serializer\n serialize(buf, buffer);\n if (buffer.byteLength >= size) {\n yield buffer.subarray(0, size);\n buffer.consume(size);\n }\n }\n if (buffer.byteLength > 0) {\n yield buffer.subarray();\n }\n })();\n}\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (batchedBytes);\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/it-b
/***/ }),
/***/ "./node_modules/it-drain/dist/src/index.js":
/*!*************************************************!*\
!*** ./node_modules/it-drain/dist/src/index.js ***!
\*************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\nfunction isAsyncIterable(thing) {\n return thing[Symbol.asyncIterator] != null;\n}\nfunction drain(source) {\n if (isAsyncIterable(source)) {\n return (async () => {\n for await (const _ of source) { } // eslint-disable-line no-unused-vars,no-empty,@typescript-eslint/no-unused-vars\n })();\n }\n else {\n for (const _ of source) { } // eslint-disable-line no-unused-vars,no-empty,@typescript-eslint/no-unused-vars\n }\n}\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (drain);\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/it-drain/dist/src/index.js?");
/***/ }),
/***/ "./node_modules/it-filter/dist/src/index.js":
/*!**************************************************!*\
!*** ./node_modules/it-filter/dist/src/index.js ***!
\**************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var it_peekable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! it-peekable */ \"./node_modules/it-peekable/dist/src/index.js\");\n\nfunction isAsyncIterable(thing) {\n return thing[Symbol.asyncIterator] != null;\n}\nfunction filter(source, fn) {\n if (isAsyncIterable(source)) {\n return (async function* () {\n for await (const entry of source) {\n if (await fn(entry)) {\n yield entry;\n }\n }\n })();\n }\n // if mapping function returns a promise we have to return an async generator\n const peekable = (0,it_peekable__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(source);\n const { value, done } = peekable.next();\n if (done === true) {\n return (function* () { }());\n }\n const res = fn(value);\n // @ts-expect-error .then is not present on O\n if (typeof res.then === 'function') {\n return (async function* () {\n if (await res) {\n yield value;\n }\n for await (const entry of peekable) {\n if (await fn(entry)) {\n yield entry;\n }\n }\n })();\n }\n const func = fn;\n return (function* () {\n if (res === true) {\n yield value;\n }\n for (const entry of peekable) {\n if (func(entry)) {\n yield entry;\n }\n }\n })();\n}\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (filter);\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/it-filter/dist/src/index.js?");
/***/ }),
/***/ "./node_modules/it-first/dist/src/index.js":
/*!*************************************************!*\
!*** ./node_modules/it-first/dist/src/index.js ***!
\*************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\nfunction isAsyncIterable(thing) {\n return thing[Symbol.asyncIterator] != null;\n}\nfunction first(source) {\n if (isAsyncIterable(source)) {\n return (async () => {\n for await (const entry of source) { // eslint-disable-line no-unreachable-loop\n return entry;\n }\n return undefined;\n })();\n }\n for (const entry of source) { // eslint-disable-line no-unreachable-loop\n return entry;\n }\n return undefined;\n}\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (first);\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/it-first/dist/src/index.js?");
/***/ }),
/***/ "./node_modules/it-handshake/dist/src/index.js":
/*!*****************************************************!*\
!*** ./node_modules/it-handshake/dist/src/index.js ***!
\*****************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ handshake: () => (/* binding */ handshake)\n/* harmony export */ });\n/* harmony import */ var it_reader__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! it-reader */ \"./node_modules/it-reader/dist/src/index.js\");\n/* harmony import */ var it_pushable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! it-pushable */ \"./node_modules/it-pushable/dist/src/index.js\");\n/* harmony import */ var p_defer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! p-defer */ \"./node_modules/p-defer/index.js\");\n/**\n * @packageDocumentation\n *\n * @example\n *\n * ```js\n *\n * import { pipe } from 'it-pipe'\n * import { duplexPair } from 'it-pair/duplex'\n * import { handshake } from 'it-handshake'\n *\n * // Create connected duplex streams\n * const [client, server] = duplexPair()\n * const clientShake = handshake(client)\n * const serverShake = handshake(server)\n *\n * clientShake.write('hello')\n * console.log('client: %s', await serverShake.read())\n * // > client: hello\n * serverShake.write('hi')\n * serverShake.rest() // the server has finished the handshake\n * console.log('server: %s', await clientShake.read())\n * // > server: hi\n * clientShake.rest() // the client has finished the handshake\n *\n * // Make the server echo responses\n * pipe(\n * serverShake.stream,\n * async function * (source) {\n * for await (const message of source) {\n * yield message\n * }\n * },\n * serverShake.stream\n * )\n *\n * // Send and receive an echo through the handshake stream\n * pipe(\n * ['echo'],\n * clientShake.stream,\n * async function * (source) {\n * for await (const bufferList of source) {\n * console.log('Echo response: %s', bufferList.slice())\n * // > Echo response: echo\n * }\n * }\n * )\n * ```\n */\n\n\n\n// Convert a duplex stream into a reader and writer and rest stream\nfunction handshake(stream) {\n const writer = (0,it_pushable__WEBPACK_IMPORTED_MODULE_1__.pushable)(); // Write bytes on demand to the sink\n const source = (0,it_reader__WEBPACK_IMPORTED_MODULE_0__.reader)(stream.source); // Read bytes on demand from the source\n // Waits for a source to be passed to the rest stream's sink\n const sourcePromise = (0,p_defer__WEBPACK_IMPORTED_MODULE_2__[\"default\"])();\n let sinkErr;\n const sinkPromise = stream.sink((async function* () {\n yield* writer;\n const source = await sourcePromise.promise;\n yield* source;\n })());\n sinkPromise.catch(err => {\n sinkErr = err;\n });\n const rest = {\n sink: async (source) => {\n if (sinkErr != null) {\n await Promise.reject(sinkErr);\n return;\n }\n sourcePromise.resolve(source);\n await sinkPromise;\n },\n source\n };\n return {\n reader: source,\n writer,\n stream: rest,\n rest: () => writer.end(),\n write: writer.push,\n read: async () => {\n const res = await source.next();\n if (res.value != null) {\n return res.value;\n }\n }\n };\n}\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/it-handshake/dist/src/index.js?");
/***/ }),
/***/ "./node_modules/it-length-prefixed/dist/src/decode.js":
/*!************************************************************!*\
!*** ./node_modules/it-length-prefixed/dist/src/decode.js ***!
\************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ MAX_DATA_LENGTH: () => (/* binding */ MAX_DATA_LENGTH),\n/* harmony export */ MAX_LENGTH_LENGTH: () => (/* binding */ MAX_LENGTH_LENGTH),\n/* harmony export */ decode: () => (/* binding */ decode)\n/* harmony export */ });\n/* harmony import */ var uint8arraylist__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! uint8arraylist */ \"./node_modules/uint8arraylist/dist/src/index.js\");\n/* harmony import */ var uint8_varint__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! uint8-varint */ \"./node_modules/uint8-varint/dist/src/index.js\");\n/* harmony import */ var err_code__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! err-code */ \"./node_modules/err-code/index.js\");\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils.js */ \"./node_modules/it-length-prefixed/dist/src/utils.js\");\n/* eslint max-depth: [\"error\", 6] */\n\n\n\n\n// Maximum length of the length section of the message\nconst MAX_LENGTH_LENGTH = 8; // Varint.encode(Number.MAX_SAFE_INTEGER).length\n// Maximum length of the data section of the message\nconst MAX_DATA_LENGTH = 1024 * 1024 * 4;\nvar ReadMode;\n(function (ReadMode) {\n ReadMode[ReadMode[\"LENGTH\"] = 0] = \"LENGTH\";\n ReadMode[ReadMode[\"DATA\"] = 1] = \"DATA\";\n})(ReadMode || (ReadMode = {}));\nconst defaultDecoder = (buf) => {\n const length = uint8_varint__WEBPACK_IMPORTED_MODULE_1__.unsigned.decode(buf);\n defaultDecoder.bytes = uint8_varint__WEBPACK_IMPORTED_MODULE_1__.unsigned.encodingLength(length);\n return length;\n};\ndefaultDecoder.bytes = 0;\nfunction decode(source, options) {\n const buffer = new uint8arraylist__WEBPACK_IMPORTED_MODULE_0__.Uint8ArrayList();\n let mode = ReadMode.LENGTH;\n let dataLength = -1;\n const lengthDecoder = options?.lengthDecoder ?? defaultDecoder;\n const maxLengthLength = options?.maxLengthLength ?? MAX_LENGTH_LENGTH;\n const maxDataLength = options?.maxDataLength ?? MAX_DATA_LENGTH;\n function* maybeYield() {\n while (buffer.byteLength > 0) {\n if (mode === ReadMode.LENGTH) {\n // read length, ignore errors for short reads\n try {\n dataLength = lengthDecoder(buffer);\n if (dataLength < 0) {\n throw err_code__WEBPACK_IMPORTED_MODULE_2__(new Error('invalid message length'), 'ERR_INVALID_MSG_LENGTH');\n }\n if (dataLength > maxDataLength) {\n throw err_code__WEBPACK_IMPORTED_MODULE_2__(new Error('message length too long'), 'ERR_MSG_DATA_TOO_LONG');\n }\n const dataLengthLength = lengthDecoder.bytes;\n buffer.consume(dataLengthLength);\n if (options?.onLength != null) {\n options.onLength(dataLength);\n }\n mode = ReadMode.DATA;\n }\n catch (err) {\n if (err instanceof RangeError) {\n if (buffer.byteLength > maxLengthLength) {\n throw err_code__WEBPACK_IMPORTED_MODULE_2__(new Error('message length length too long'), 'ERR_MSG_LENGTH_TOO_LONG');\n }\n break;\n }\n throw err;\n }\n }\n if (mode === ReadMode.DATA) {\n if (buffer.byteLength < dataLength) {\n // not enough data, wait for more\n break;\n }\n const data = buffer.sublist(0, dataLength);\n buffer.consume(dataLength);\n if (options?.onData != null) {\n options.onData(data);\n }\n yield data;\n mode = ReadMode.LENGTH;\n }\n }\n }\n if ((0,_util
/***/ }),
/***/ "./node_modules/it-length-prefixed/dist/src/encode.js":
/*!************************************************************!*\
!*** ./node_modules/it-length-prefixed/dist/src/encode.js ***!
\************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ encode: () => (/* binding */ encode)\n/* harmony export */ });\n/* harmony import */ var uint8arraylist__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! uint8arraylist */ \"./node_modules/uint8arraylist/dist/src/index.js\");\n/* harmony import */ var uint8_varint__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! uint8-varint */ \"./node_modules/uint8-varint/dist/src/index.js\");\n/* harmony import */ var uint8arrays_alloc__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! uint8arrays/alloc */ \"./node_modules/uint8arrays/dist/src/alloc.js\");\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils.js */ \"./node_modules/it-length-prefixed/dist/src/utils.js\");\n\n\n\n\nconst defaultEncoder = (length) => {\n const lengthLength = uint8_varint__WEBPACK_IMPORTED_MODULE_1__.unsigned.encodingLength(length);\n const lengthBuf = (0,uint8arrays_alloc__WEBPACK_IMPORTED_MODULE_2__.allocUnsafe)(lengthLength);\n uint8_varint__WEBPACK_IMPORTED_MODULE_1__.unsigned.encode(length, lengthBuf);\n defaultEncoder.bytes = lengthLength;\n return lengthBuf;\n};\ndefaultEncoder.bytes = 0;\nfunction encode(source, options) {\n options = options ?? {};\n const encodeLength = options.lengthEncoder ?? defaultEncoder;\n function* maybeYield(chunk) {\n // length + data\n const length = encodeLength(chunk.byteLength);\n // yield only Uint8Arrays\n if (length instanceof Uint8Array) {\n yield length;\n }\n else {\n yield* length;\n }\n // yield only Uint8Arrays\n if (chunk instanceof Uint8Array) {\n yield chunk;\n }\n else {\n yield* chunk;\n }\n }\n if ((0,_utils_js__WEBPACK_IMPORTED_MODULE_3__.isAsyncIterable)(source)) {\n return (async function* () {\n for await (const chunk of source) {\n yield* maybeYield(chunk);\n }\n })();\n }\n return (function* () {\n for (const chunk of source) {\n yield* maybeYield(chunk);\n }\n })();\n}\nencode.single = (chunk, options) => {\n options = options ?? {};\n const encodeLength = options.lengthEncoder ?? defaultEncoder;\n return new uint8arraylist__WEBPACK_IMPORTED_MODULE_0__.Uint8ArrayList(encodeLength(chunk.byteLength), chunk);\n};\n//# sourceMappingURL=encode.js.map\n\n//# sourceURL=webpack://light/./node_modules/it-length-prefixed/dist/src/encode.js?");
/***/ }),
/***/ "./node_modules/it-length-prefixed/dist/src/index.js":
/*!***********************************************************!*\
!*** ./node_modules/it-length-prefixed/dist/src/index.js ***!
\***********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ decode: () => (/* reexport safe */ _decode_js__WEBPACK_IMPORTED_MODULE_1__.decode),\n/* harmony export */ encode: () => (/* reexport safe */ _encode_js__WEBPACK_IMPORTED_MODULE_0__.encode)\n/* harmony export */ });\n/* harmony import */ var _encode_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./encode.js */ \"./node_modules/it-length-prefixed/dist/src/encode.js\");\n/* harmony import */ var _decode_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./decode.js */ \"./node_modules/it-length-prefixed/dist/src/decode.js\");\n\n\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/it-length-prefixed/dist/src/index.js?");
/***/ }),
/***/ "./node_modules/it-length-prefixed/dist/src/utils.js":
/*!***********************************************************!*\
!*** ./node_modules/it-length-prefixed/dist/src/utils.js ***!
\***********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ isAsyncIterable: () => (/* binding */ isAsyncIterable)\n/* harmony export */ });\nfunction isAsyncIterable(thing) {\n return thing[Symbol.asyncIterator] != null;\n}\n//# sourceMappingURL=utils.js.map\n\n//# sourceURL=webpack://light/./node_modules/it-length-prefixed/dist/src/utils.js?");
/***/ }),
/***/ "./node_modules/it-map/dist/src/index.js":
/*!***********************************************!*\
!*** ./node_modules/it-map/dist/src/index.js ***!
\***********************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var it_peekable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! it-peekable */ \"./node_modules/it-peekable/dist/src/index.js\");\n\nfunction isAsyncIterable(thing) {\n return thing[Symbol.asyncIterator] != null;\n}\nfunction map(source, func) {\n if (isAsyncIterable(source)) {\n return (async function* () {\n for await (const val of source) {\n yield func(val);\n }\n })();\n }\n // if mapping function returns a promise we have to return an async generator\n const peekable = (0,it_peekable__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(source);\n const { value, done } = peekable.next();\n if (done === true) {\n return (function* () { }());\n }\n const res = func(value);\n // @ts-expect-error .then is not present on O\n if (typeof res.then === 'function') {\n return (async function* () {\n yield await res;\n for await (const val of peekable) {\n yield func(val);\n }\n })();\n }\n const fn = func;\n return (function* () {\n yield res;\n for (const val of peekable) {\n yield fn(val);\n }\n })();\n}\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (map);\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/it-map/dist/src/index.js?");
/***/ }),
/***/ "./node_modules/it-merge/dist/src/index.js":
/*!*************************************************!*\
!*** ./node_modules/it-merge/dist/src/index.js ***!
\*************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var it_pushable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! it-pushable */ \"./node_modules/it-pushable/dist/src/index.js\");\n\nfunction isAsyncIterable(thing) {\n return thing[Symbol.asyncIterator] != null;\n}\nfunction merge(...sources) {\n const syncSources = [];\n for (const source of sources) {\n if (!isAsyncIterable(source)) {\n syncSources.push(source);\n }\n }\n if (syncSources.length === sources.length) {\n // all sources are synchronous\n return (function* () {\n for (const source of syncSources) {\n yield* source;\n }\n })();\n }\n return (async function* () {\n const output = (0,it_pushable__WEBPACK_IMPORTED_MODULE_0__.pushable)({\n objectMode: true\n });\n void Promise.resolve().then(async () => {\n try {\n await Promise.all(sources.map(async (source) => {\n for await (const item of source) {\n output.push(item);\n }\n }));\n output.end();\n }\n catch (err) {\n output.end(err);\n }\n });\n yield* output;\n })();\n}\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (merge);\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/it-merge/dist/src/index.js?");
/***/ }),
/***/ "./node_modules/it-pair/dist/src/duplex.js":
/*!*************************************************!*\
!*** ./node_modules/it-pair/dist/src/duplex.js ***!
\*************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ duplexPair: () => (/* binding */ duplexPair)\n/* harmony export */ });\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ \"./node_modules/it-pair/dist/src/index.js\");\n\n/**\n * Two duplex streams that are attached to each other\n */\nfunction duplexPair() {\n const a = (0,_index_js__WEBPACK_IMPORTED_MODULE_0__.pair)();\n const b = (0,_index_js__WEBPACK_IMPORTED_MODULE_0__.pair)();\n return [\n {\n source: a.source,\n sink: b.sink\n },\n {\n source: b.source,\n sink: a.sink\n }\n ];\n}\n//# sourceMappingURL=duplex.js.map\n\n//# sourceURL=webpack://light/./node_modules/it-pair/dist/src/duplex.js?");
/***/ }),
/***/ "./node_modules/it-pair/dist/src/index.js":
/*!************************************************!*\
!*** ./node_modules/it-pair/dist/src/index.js ***!
\************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ pair: () => (/* binding */ pair)\n/* harmony export */ });\n/* harmony import */ var p_defer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! p-defer */ \"./node_modules/p-defer/index.js\");\n\n/**\n * A pair of streams where one drains from the other\n */\nfunction pair() {\n const deferred = (0,p_defer__WEBPACK_IMPORTED_MODULE_0__[\"default\"])();\n let piped = false;\n return {\n sink: async (source) => {\n if (piped) {\n throw new Error('already piped');\n }\n piped = true;\n deferred.resolve(source);\n },\n source: (async function* () {\n const source = await deferred.promise;\n yield* source;\n }())\n };\n}\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/it-pair/dist/src/index.js?");
/***/ }),
/***/ "./node_modules/it-pb-stream/dist/src/index.js":
/*!*****************************************************!*\
!*** ./node_modules/it-pb-stream/dist/src/index.js ***!
\*****************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ pbStream: () => (/* binding */ pbStream)\n/* harmony export */ });\n/* harmony import */ var err_code__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! err-code */ \"./node_modules/err-code/index.js\");\n/* harmony import */ var it_length_prefixed__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! it-length-prefixed */ \"./node_modules/it-length-prefixed/dist/src/index.js\");\n/* harmony import */ var it_pushable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! it-pushable */ \"./node_modules/it-pushable/dist/src/index.js\");\n/* harmony import */ var uint8_varint__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! uint8-varint */ \"./node_modules/uint8-varint/dist/src/index.js\");\n/* harmony import */ var uint8arraylist__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! uint8arraylist */ \"./node_modules/uint8arraylist/dist/src/index.js\");\n/**\n * @packageDocumentation\n *\n * This module makes it easy to send and receive Protobuf encoded messages over\n * streams.\n *\n * @example\n *\n * ```typescript\n * import { pbStream } from 'it-pb-stream'\n * import { MessageType } from './src/my-message-type.js'\n *\n * // RequestType and ResponseType have been generate from `.proto` files and have\n * // `.encode` and `.decode` methods for serialization/deserialization\n *\n * const stream = pbStream(duplex)\n * stream.writePB({\n * foo: 'bar'\n * }, MessageType)\n * const res = await stream.readPB(MessageType)\n * ```\n */\n\n\n\n\n\nconst defaultLengthDecoder = (buf) => {\n return uint8_varint__WEBPACK_IMPORTED_MODULE_3__.unsigned.decode(buf);\n};\ndefaultLengthDecoder.bytes = 0;\nfunction pbStream(duplex, opts) {\n const write = (0,it_pushable__WEBPACK_IMPORTED_MODULE_2__.pushable)();\n duplex.sink(write).catch((err) => {\n write.end(err);\n });\n duplex.sink = async (source) => {\n for await (const buf of source) {\n write.push(buf);\n }\n write.end();\n };\n let source = duplex.source;\n if (duplex.source[Symbol.iterator] != null) {\n source = duplex.source[Symbol.iterator]();\n }\n else if (duplex.source[Symbol.asyncIterator] != null) {\n source = duplex.source[Symbol.asyncIterator]();\n }\n const readBuffer = new uint8arraylist__WEBPACK_IMPORTED_MODULE_4__.Uint8ArrayList();\n const W = {\n read: async (bytes) => {\n if (bytes == null) {\n // just read whatever arrives\n const { done, value } = await source.next();\n if (done === true) {\n return new uint8arraylist__WEBPACK_IMPORTED_MODULE_4__.Uint8ArrayList();\n }\n return value;\n }\n while (readBuffer.byteLength < bytes) {\n const { value, done } = await source.next();\n if (done === true) {\n throw err_code__WEBPACK_IMPORTED_MODULE_0__(new Error('unexpected end of input'), 'ERR_UNEXPECTED_EOF');\n }\n readBuffer.append(value);\n }\n const buf = readBuffer.sublist(0, bytes);\n readBuffer.consume(bytes);\n return buf;\n },\n readLP: async () => {\n let dataLength = -1;\n const lengthBuffer = new uint8arraylist__WEBPACK_IMPORTED_MODULE_4__.Uint8ArrayList();\n const decodeLength = opts?.lengthDecoder ?? defaultLengthDecoder;\n while (true) {\n // read one byte at a time until we can decode a varint\n lengthBuffer.append(await W.read(1));\n try {\n dataLength = decodeLength(lengthBuffer);\n }\n catch (err) {\n if (err instanceof RangeError) {\n continue;\n }\n throw err;\n }\n if (dataLength > -1) {\n
/***/ }),
/***/ "./node_modules/it-peekable/dist/src/index.js":
/*!****************************************************!*\
!*** ./node_modules/it-peekable/dist/src/index.js ***!
\****************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\nfunction peekable(iterable) {\n // @ts-expect-error can't use Symbol.asyncIterator to index iterable since it might be Iterable\n const [iterator, symbol] = iterable[Symbol.asyncIterator] != null\n // @ts-expect-error can't use Symbol.asyncIterator to index iterable since it might be Iterable\n ? [iterable[Symbol.asyncIterator](), Symbol.asyncIterator]\n // @ts-expect-error can't use Symbol.iterator to index iterable since it might be AsyncIterable\n : [iterable[Symbol.iterator](), Symbol.iterator];\n const queue = [];\n // @ts-expect-error can't use symbol to index peekable\n return {\n peek: () => {\n return iterator.next();\n },\n push: (value) => {\n queue.push(value);\n },\n next: () => {\n if (queue.length > 0) {\n return {\n done: false,\n value: queue.shift()\n };\n }\n return iterator.next();\n },\n [symbol]() {\n return this;\n }\n };\n}\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (peekable);\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/it-peekable/dist/src/index.js?");
/***/ }),
/***/ "./node_modules/it-pipe/dist/src/index.js":
/*!************************************************!*\
!*** ./node_modules/it-pipe/dist/src/index.js ***!
\************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ pipe: () => (/* binding */ pipe),\n/* harmony export */ rawPipe: () => (/* binding */ rawPipe)\n/* harmony export */ });\n/* harmony import */ var it_pushable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! it-pushable */ \"./node_modules/it-pushable/dist/src/index.js\");\n/* harmony import */ var it_merge__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! it-merge */ \"./node_modules/it-merge/dist/src/index.js\");\n\n\nfunction pipe(first, ...rest) {\n if (first == null) {\n throw new Error('Empty pipeline');\n }\n // Duplex at start: wrap in function and return duplex source\n if (isDuplex(first)) {\n const duplex = first;\n first = () => duplex.source;\n // Iterable at start: wrap in function\n }\n else if (isIterable(first) || isAsyncIterable(first)) {\n const source = first;\n first = () => source;\n }\n const fns = [first, ...rest];\n if (fns.length > 1) {\n // Duplex at end: use duplex sink\n if (isDuplex(fns[fns.length - 1])) {\n fns[fns.length - 1] = fns[fns.length - 1].sink;\n }\n }\n if (fns.length > 2) {\n // Duplex in the middle, consume source with duplex sink and return duplex source\n for (let i = 1; i < fns.length - 1; i++) {\n if (isDuplex(fns[i])) {\n fns[i] = duplexPipelineFn(fns[i]);\n }\n }\n }\n return rawPipe(...fns);\n}\nconst rawPipe = (...fns) => {\n let res;\n while (fns.length > 0) {\n res = fns.shift()(res);\n }\n return res;\n};\nconst isAsyncIterable = (obj) => {\n return obj?.[Symbol.asyncIterator] != null;\n};\nconst isIterable = (obj) => {\n return obj?.[Symbol.iterator] != null;\n};\nconst isDuplex = (obj) => {\n if (obj == null) {\n return false;\n }\n return obj.sink != null && obj.source != null;\n};\nconst duplexPipelineFn = (duplex) => {\n return (source) => {\n const p = duplex.sink(source);\n if (p?.then != null) {\n const stream = (0,it_pushable__WEBPACK_IMPORTED_MODULE_0__.pushable)({\n objectMode: true\n });\n p.then(() => {\n stream.end();\n }, (err) => {\n stream.end(err);\n });\n let sourceWrap;\n const source = duplex.source;\n if (isAsyncIterable(source)) {\n sourceWrap = async function* () {\n yield* source;\n stream.end();\n };\n }\n else if (isIterable(source)) {\n sourceWrap = function* () {\n yield* source;\n stream.end();\n };\n }\n else {\n throw new Error('Unknown duplex source type - must be Iterable or AsyncIterable');\n }\n return (0,it_merge__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(stream, sourceWrap());\n }\n return duplex.source;\n };\n};\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/it-pipe/dist/src/index.js?");
/***/ }),
/***/ "./node_modules/it-pushable/dist/src/fifo.js":
/*!***************************************************!*\
!*** ./node_modules/it-pushable/dist/src/fifo.js ***!
\***************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ FIFO: () => (/* binding */ FIFO)\n/* harmony export */ });\n// ported from https://www.npmjs.com/package/fast-fifo\nclass FixedFIFO {\n buffer;\n mask;\n top;\n btm;\n next;\n constructor(hwm) {\n if (!(hwm > 0) || ((hwm - 1) & hwm) !== 0) {\n throw new Error('Max size for a FixedFIFO should be a power of two');\n }\n this.buffer = new Array(hwm);\n this.mask = hwm - 1;\n this.top = 0;\n this.btm = 0;\n this.next = null;\n }\n push(data) {\n if (this.buffer[this.top] !== undefined) {\n return false;\n }\n this.buffer[this.top] = data;\n this.top = (this.top + 1) & this.mask;\n return true;\n }\n shift() {\n const last = this.buffer[this.btm];\n if (last === undefined) {\n return undefined;\n }\n this.buffer[this.btm] = undefined;\n this.btm = (this.btm + 1) & this.mask;\n return last;\n }\n isEmpty() {\n return this.buffer[this.btm] === undefined;\n }\n}\nclass FIFO {\n size;\n hwm;\n head;\n tail;\n constructor(options = {}) {\n this.hwm = options.splitLimit ?? 16;\n this.head = new FixedFIFO(this.hwm);\n this.tail = this.head;\n this.size = 0;\n }\n calculateSize(obj) {\n if (obj?.byteLength != null) {\n return obj.byteLength;\n }\n return 1;\n }\n push(val) {\n if (val?.value != null) {\n this.size += this.calculateSize(val.value);\n }\n if (!this.head.push(val)) {\n const prev = this.head;\n this.head = prev.next = new FixedFIFO(2 * this.head.buffer.length);\n this.head.push(val);\n }\n }\n shift() {\n let val = this.tail.shift();\n if (val === undefined && (this.tail.next != null)) {\n const next = this.tail.next;\n this.tail.next = null;\n this.tail = next;\n val = this.tail.shift();\n }\n if (val?.value != null) {\n this.size -= this.calculateSize(val.value);\n }\n return val;\n }\n isEmpty() {\n return this.head.isEmpty();\n }\n}\n//# sourceMappingURL=fifo.js.map\n\n//# sourceURL=webpack://light/./node_modules/it-pushable/dist/src/fifo.js?");
/***/ }),
/***/ "./node_modules/it-pushable/dist/src/index.js":
/*!****************************************************!*\
!*** ./node_modules/it-pushable/dist/src/index.js ***!
\****************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AbortError: () => (/* binding */ AbortError),\n/* harmony export */ pushable: () => (/* binding */ pushable),\n/* harmony export */ pushableV: () => (/* binding */ pushableV)\n/* harmony export */ });\n/* harmony import */ var p_defer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! p-defer */ \"./node_modules/p-defer/index.js\");\n/* harmony import */ var _fifo_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./fifo.js */ \"./node_modules/it-pushable/dist/src/fifo.js\");\n/**\n * @packageDocumentation\n *\n * An iterable that you can push values into.\n *\n * @example\n *\n * ```js\n * import { pushable } from 'it-pushable'\n *\n * const source = pushable()\n *\n * setTimeout(() => source.push('hello'), 100)\n * setTimeout(() => source.push('world'), 200)\n * setTimeout(() => source.end(), 300)\n *\n * const start = Date.now()\n *\n * for await (const value of source) {\n * console.log(`got \"${value}\" after ${Date.now() - start}ms`)\n * }\n * console.log(`done after ${Date.now() - start}ms`)\n *\n * // Output:\n * // got \"hello\" after 105ms\n * // got \"world\" after 207ms\n * // done after 309ms\n * ```\n *\n * @example\n *\n * ```js\n * import { pushableV } from 'it-pushable'\n * import all from 'it-all'\n *\n * const source = pushableV()\n *\n * source.push(1)\n * source.push(2)\n * source.push(3)\n * source.end()\n *\n * console.info(await all(source))\n *\n * // Output:\n * // [ [1, 2, 3] ]\n * ```\n */\n\n\nclass AbortError extends Error {\n type;\n code;\n constructor(message, code) {\n super(message ?? 'The operation was aborted');\n this.type = 'aborted';\n this.code = code ?? 'ABORT_ERR';\n }\n}\nfunction pushable(options = {}) {\n const getNext = (buffer) => {\n const next = buffer.shift();\n if (next == null) {\n return { done: true };\n }\n if (next.error != null) {\n throw next.error;\n }\n return {\n done: next.done === true,\n // @ts-expect-error if done is false, value will be present\n value: next.value\n };\n };\n return _pushable(getNext, options);\n}\nfunction pushableV(options = {}) {\n const getNext = (buffer) => {\n let next;\n const values = [];\n while (!buffer.isEmpty()) {\n next = buffer.shift();\n if (next == null) {\n break;\n }\n if (next.error != null) {\n throw next.error;\n }\n if (next.done === false) {\n // @ts-expect-error if done is false value should be pushed\n values.push(next.value);\n }\n }\n if (next == null) {\n return { done: true };\n }\n return {\n done: next.done === true,\n value: values\n };\n };\n return _pushable(getNext, options);\n}\nfunction _pushable(getNext, options) {\n options = options ?? {};\n let onEnd = options.onEnd;\n let buffer = new _fifo_js__WEBPACK_IMPORTED_MODULE_1__.FIFO();\n let pushable;\n let onNext;\n let ended;\n let drain = (0,p_defer__WEBPACK_IMPORTED_MODULE_0__[\"default\"])();\n const waitNext = async () => {\n try {\n if (!buffer.isEmpty()) {\n return getNext(buffer);\n }\n if (ended) {\n return { done: true };\n }\n return await new Promise((resolve, reject) => {\n onNext = (next) => {\n onNext = null;\n buffer.push(next);\n try {\n resolve(getNext(buffer));\n }\n catch (err) {\n reject(err);\n }\n return pushable;\n };\n });\n }\n finally {\n if
/***/ }),
/***/ "./node_modules/it-reader/dist/src/index.js":
/*!**************************************************!*\
!*** ./node_modules/it-reader/dist/src/index.js ***!
\**************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ reader: () => (/* binding */ reader)\n/* harmony export */ });\n/* harmony import */ var uint8arraylist__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! uint8arraylist */ \"./node_modules/uint8arraylist/dist/src/index.js\");\n\n/**\n * Returns an `AsyncGenerator` that allows reading a set number of bytes from the passed source.\n *\n * @example\n *\n * ```javascript\n * import { reader } from 'it-reader'\n *\n * const stream = reader(source)\n *\n * // read 10 bytes from the stream\n * const { done, value } = await stream.next(10)\n *\n * if (done === true) {\n * // stream finished\n * }\n *\n * if (value != null) {\n * // do something with value\n * }\n * ```\n */\nfunction reader(source) {\n const reader = (async function* () {\n // @ts-expect-error first yield in stream is ignored\n let bytes = yield; // Allows us to receive 8 when reader.next(8) is called\n let bl = new uint8arraylist__WEBPACK_IMPORTED_MODULE_0__.Uint8ArrayList();\n for await (const chunk of source) {\n if (bytes == null) {\n bl.append(chunk);\n bytes = yield bl;\n bl = new uint8arraylist__WEBPACK_IMPORTED_MODULE_0__.Uint8ArrayList();\n continue;\n }\n bl.append(chunk);\n while (bl.length >= bytes) {\n const data = bl.sublist(0, bytes);\n bl.consume(bytes);\n bytes = yield data;\n // If we no longer want a specific byte length, we yield the rest now\n if (bytes == null) {\n if (bl.length > 0) {\n bytes = yield bl;\n bl = new uint8arraylist__WEBPACK_IMPORTED_MODULE_0__.Uint8ArrayList();\n }\n break; // bytes is null and/or no more buffer to yield\n }\n }\n }\n // Consumer wants more bytes but the source has ended and our buffer\n // is not big enough to satisfy.\n if (bytes != null) {\n throw Object.assign(new Error(`stream ended before ${bytes} bytes became available`), { code: 'ERR_UNDER_READ', buffer: bl });\n }\n })();\n void reader.next();\n return reader;\n}\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/it-reader/dist/src/index.js?");
/***/ }),
/***/ "./node_modules/it-sort/dist/src/index.js":
/*!************************************************!*\
!*** ./node_modules/it-sort/dist/src/index.js ***!
\************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var it_all__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! it-all */ \"./node_modules/it-all/dist/src/index.js\");\n\nfunction isAsyncIterable(thing) {\n return thing[Symbol.asyncIterator] != null;\n}\nfunction sort(source, sorter) {\n if (isAsyncIterable(source)) {\n return (async function* () {\n const arr = await (0,it_all__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(source);\n yield* arr.sort(sorter);\n })();\n }\n return (function* () {\n const arr = (0,it_all__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(source);\n yield* arr.sort(sorter);\n })();\n}\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (sort);\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/it-sort/dist/src/index.js?");
/***/ }),
/***/ "./node_modules/it-take/dist/src/index.js":
/*!************************************************!*\
!*** ./node_modules/it-take/dist/src/index.js ***!
\************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\nfunction isAsyncIterable(thing) {\n return thing[Symbol.asyncIterator] != null;\n}\nfunction take(source, limit) {\n if (isAsyncIterable(source)) {\n return (async function* () {\n let items = 0;\n if (limit < 1) {\n return;\n }\n for await (const entry of source) {\n yield entry;\n items++;\n if (items === limit) {\n return;\n }\n }\n })();\n }\n return (function* () {\n let items = 0;\n if (limit < 1) {\n return;\n }\n for (const entry of source) {\n yield entry;\n items++;\n if (items === limit) {\n return;\n }\n }\n })();\n}\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (take);\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/it-take/dist/src/index.js?");
/***/ }),
/***/ "./node_modules/it-ws/dist/src/client.js":
/*!***********************************************!*\
!*** ./node_modules/it-ws/dist/src/client.js ***!
\***********************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ connect: () => (/* binding */ connect)\n/* harmony export */ });\n/* harmony import */ var _web_socket_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./web-socket.js */ \"./node_modules/it-ws/dist/src/web-socket.browser.js\");\n/* harmony import */ var _duplex_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duplex.js */ \"./node_modules/it-ws/dist/src/duplex.js\");\n/* harmony import */ var _ws_url_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ws-url.js */ \"./node_modules/it-ws/dist/src/ws-url.js\");\n// load websocket library if we are not in the browser\n\n\n\nfunction connect(addr, opts) {\n const location = typeof window === 'undefined' ? '' : window.location;\n opts = opts ?? {};\n const url = (0,_ws_url_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(addr, location.toString());\n const socket = new _web_socket_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](url, opts.websocket);\n return (0,_duplex_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(socket, opts);\n}\n//# sourceMappingURL=client.js.map\n\n//# sourceURL=webpack://light/./node_modules/it-ws/dist/src/client.js?");
/***/ }),
/***/ "./node_modules/it-ws/dist/src/duplex.js":
/*!***********************************************!*\
!*** ./node_modules/it-ws/dist/src/duplex.js ***!
\***********************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _source_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./source.js */ \"./node_modules/it-ws/dist/src/source.js\");\n/* harmony import */ var _sink_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./sink.js */ \"./node_modules/it-ws/dist/src/sink.js\");\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((socket, options) => {\n options = options ?? {};\n const connectedSource = (0,_source_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(socket);\n let remoteAddress = options.remoteAddress;\n let remotePort = options.remotePort;\n if (socket.url != null) {\n // only client->server sockets have urls, server->client connections do not\n try {\n const url = new URL(socket.url);\n remoteAddress = url.hostname;\n remotePort = parseInt(url.port, 10);\n }\n catch { }\n }\n if (remoteAddress == null || remotePort == null) {\n throw new Error('Remote connection did not have address and/or port');\n }\n const duplex = {\n sink: (0,_sink_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(socket, options),\n source: connectedSource,\n connected: async () => { await connectedSource.connected(); },\n close: async () => {\n if (socket.readyState === socket.CONNECTING || socket.readyState === socket.OPEN) {\n await new Promise((resolve) => {\n socket.addEventListener('close', () => {\n resolve();\n });\n socket.close();\n });\n }\n },\n destroy: () => {\n if (socket.terminate != null) {\n socket.terminate();\n }\n else {\n socket.close();\n }\n },\n remoteAddress,\n remotePort,\n socket\n };\n return duplex;\n});\n//# sourceMappingURL=duplex.js.map\n\n//# sourceURL=webpack://light/./node_modules/it-ws/dist/src/duplex.js?");
/***/ }),
/***/ "./node_modules/it-ws/dist/src/ready.js":
/*!**********************************************!*\
!*** ./node_modules/it-ws/dist/src/ready.js ***!
\**********************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (async (socket) => {\n // if the socket is closing or closed, return end\n if (socket.readyState >= 2) {\n throw new Error('socket closed');\n }\n // if open, return\n if (socket.readyState === 1) {\n return;\n }\n await new Promise((resolve, reject) => {\n function cleanup() {\n socket.removeEventListener('open', handleOpen);\n socket.removeEventListener('error', handleErr);\n }\n function handleOpen() {\n cleanup();\n resolve();\n }\n function handleErr(event) {\n cleanup();\n reject(event.error ?? new Error(`connect ECONNREFUSED ${socket.url}`));\n }\n socket.addEventListener('open', handleOpen);\n socket.addEventListener('error', handleErr);\n });\n});\n//# sourceMappingURL=ready.js.map\n\n//# sourceURL=webpack://light/./node_modules/it-ws/dist/src/ready.js?");
/***/ }),
/***/ "./node_modules/it-ws/dist/src/sink.js":
/*!*********************************************!*\
!*** ./node_modules/it-ws/dist/src/sink.js ***!
\*********************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _ready_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ready.js */ \"./node_modules/it-ws/dist/src/ready.js\");\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((socket, options) => {\n options = options ?? {};\n options.closeOnEnd = options.closeOnEnd !== false;\n const sink = async (source) => {\n for await (const data of source) {\n try {\n await (0,_ready_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(socket);\n }\n catch (err) {\n if (err.message === 'socket closed')\n break;\n throw err;\n }\n socket.send(data);\n }\n if (options.closeOnEnd != null && socket.readyState <= 1) {\n await new Promise((resolve, reject) => {\n socket.addEventListener('close', event => {\n if (event.wasClean || event.code === 1006) {\n resolve();\n }\n else {\n const err = Object.assign(new Error('ws error'), { event });\n reject(err);\n }\n });\n setTimeout(() => { socket.close(); });\n });\n }\n };\n return sink;\n});\n//# sourceMappingURL=sink.js.map\n\n//# sourceURL=webpack://light/./node_modules/it-ws/dist/src/sink.js?");
/***/ }),
/***/ "./node_modules/it-ws/dist/src/source.js":
/*!***********************************************!*\
!*** ./node_modules/it-ws/dist/src/source.js ***!
\***********************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var event_iterator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! event-iterator */ \"./node_modules/event-iterator/lib/dom.js\");\n/* harmony import */ var uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! uint8arrays/from-string */ \"./node_modules/uint8arrays/dist/src/from-string.js\");\n\n\n// copied from github.com/feross/buffer\n// Some ArrayBuffers are not passing the instanceof check, so we need to do a bit more work :(\nfunction isArrayBuffer(obj) {\n return (obj instanceof ArrayBuffer) ||\n (obj?.constructor?.name === 'ArrayBuffer' && typeof obj?.byteLength === 'number');\n}\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((socket) => {\n socket.binaryType = 'arraybuffer';\n const connected = async () => {\n await new Promise((resolve, reject) => {\n if (isConnected) {\n resolve();\n return;\n }\n if (connError != null) {\n reject(connError);\n return;\n }\n const cleanUp = (cont) => {\n socket.removeEventListener('open', onOpen);\n socket.removeEventListener('error', onError);\n cont();\n };\n const onOpen = () => { cleanUp(resolve); };\n const onError = (event) => {\n cleanUp(() => { reject(event.error ?? new Error(`connect ECONNREFUSED ${socket.url}`)); });\n };\n socket.addEventListener('open', onOpen);\n socket.addEventListener('error', onError);\n });\n };\n const source = (async function* () {\n const messages = new event_iterator__WEBPACK_IMPORTED_MODULE_0__.EventIterator(({ push, stop, fail }) => {\n const onMessage = (event) => {\n let data = null;\n if (typeof event.data === 'string') {\n data = (0,uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_1__.fromString)(event.data);\n }\n if (isArrayBuffer(event.data)) {\n data = new Uint8Array(event.data);\n }\n if (event.data instanceof Uint8Array) {\n data = event.data;\n }\n if (data == null) {\n return;\n }\n push(data);\n };\n const onError = (event) => { fail(event.error ?? new Error('Socket error')); };\n socket.addEventListener('message', onMessage);\n socket.addEventListener('error', onError);\n socket.addEventListener('close', stop);\n return () => {\n socket.removeEventListener('message', onMessage);\n socket.removeEventListener('error', onError);\n socket.removeEventListener('close', stop);\n };\n }, { highWaterMark: Infinity });\n await connected();\n for await (const chunk of messages) {\n yield isArrayBuffer(chunk) ? new Uint8Array(chunk) : chunk;\n }\n }());\n let isConnected = socket.readyState === 1;\n let connError;\n socket.addEventListener('open', () => {\n isConnected = true;\n connError = null;\n });\n socket.addEventListener('close', () => {\n isConnected = false;\n connError = null;\n });\n socket.addEventListener('error', event => {\n if (!isConnected) {\n connError = event.error ?? new Error(`connect ECONNREFUSED ${socket.url}`);\n }\n });\n return Object.assign(source, {\n connected\n });\n});\n//# sourceMappingURL=source.js.map\n\n//# sourceURL=webpack://light/./node_modules/it-ws/dist/src/source.js?");
/***/ }),
/***/ "./node_modules/it-ws/dist/src/web-socket.browser.js":
/*!***********************************************************!*\
!*** ./node_modules/it-ws/dist/src/web-socket.browser.js ***!
\***********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* eslint-env browser */\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (WebSocket);\n//# sourceMappingURL=web-socket.browser.js.map\n\n//# sourceURL=webpack://light/./node_modules/it-ws/dist/src/web-socket.browser.js?");
/***/ }),
/***/ "./node_modules/it-ws/dist/src/ws-url.js":
/*!***********************************************!*\
!*** ./node_modules/it-ws/dist/src/ws-url.js ***!
\***********************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var iso_url__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! iso-url */ \"./node_modules/iso-url/index.js\");\n\nconst map = { http: 'ws', https: 'wss' };\nconst def = 'ws';\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((url, location) => (0,iso_url__WEBPACK_IMPORTED_MODULE_0__.relative)(url, location, map, def));\n//# sourceMappingURL=ws-url.js.map\n\n//# sourceURL=webpack://light/./node_modules/it-ws/dist/src/ws-url.js?");
/***/ }),
/***/ "./node_modules/libp2p/dist/src/address-manager/index.js":
/*!***************************************************************!*\
!*** ./node_modules/libp2p/dist/src/address-manager/index.js ***!
\***************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DefaultAddressManager: () => (/* binding */ DefaultAddressManager)\n/* harmony export */ });\n/* harmony import */ var _libp2p_logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/logger */ \"./node_modules/@libp2p/logger/dist/src/index.js\");\n/* harmony import */ var _libp2p_peer_id__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/peer-id */ \"./node_modules/@libp2p/peer-id/dist/src/index.js\");\n/* harmony import */ var _multiformats_multiaddr__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @multiformats/multiaddr */ \"./node_modules/@multiformats/multiaddr/dist/src/index.js\");\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils.js */ \"./node_modules/libp2p/dist/src/address-manager/utils.js\");\n\n\n\n\nconst log = (0,_libp2p_logger__WEBPACK_IMPORTED_MODULE_0__.logger)('libp2p:address-manager');\nconst defaultAddressFilter = (addrs) => addrs;\n/**\n * If the passed multiaddr contains the passed peer id, remove it\n */\nfunction stripPeerId(ma, peerId) {\n const observedPeerIdStr = ma.getPeerId();\n // strip our peer id if it has been passed\n if (observedPeerIdStr != null) {\n const observedPeerId = (0,_libp2p_peer_id__WEBPACK_IMPORTED_MODULE_1__.peerIdFromString)(observedPeerIdStr);\n // use same encoding for comparison\n if (observedPeerId.equals(peerId)) {\n ma = ma.decapsulate((0,_multiformats_multiaddr__WEBPACK_IMPORTED_MODULE_2__.multiaddr)(`/p2p/${peerId.toString()}`));\n }\n }\n return ma;\n}\nclass DefaultAddressManager {\n components;\n // this is an array to allow for duplicates, e.g. multiples of `/ip4/0.0.0.0/tcp/0`\n listen;\n announce;\n observed;\n announceFilter;\n /**\n * Responsible for managing the peer addresses.\n * Peers can specify their listen and announce addresses.\n * The listen addresses will be used by the libp2p transports to listen for new connections,\n * while the announce addresses will be used for the peer addresses' to other peers in the network.\n */\n constructor(components, init = {}) {\n const { listen = [], announce = [] } = init;\n this.components = components;\n this.listen = listen.map(ma => ma.toString());\n this.announce = new Set(announce.map(ma => ma.toString()));\n this.observed = new Map();\n this.announceFilter = init.announceFilter ?? defaultAddressFilter;\n // this method gets called repeatedly on startup when transports start listening so\n // debounce it so we don't cause multiple self:peer:update events to be emitted\n this._updatePeerStoreAddresses = (0,_utils_js__WEBPACK_IMPORTED_MODULE_3__.debounce)(this._updatePeerStoreAddresses.bind(this), 1000);\n // update our stored addresses when new transports listen\n components.events.addEventListener('transport:listening', () => {\n this._updatePeerStoreAddresses();\n });\n // update our stored addresses when existing transports stop listening\n components.events.addEventListener('transport:close', () => {\n this._updatePeerStoreAddresses();\n });\n }\n _updatePeerStoreAddresses() {\n // if announce addresses have been configured, ensure they make it into our peer\n // record for things like identify\n const addrs = this.getAnnounceAddrs()\n .concat(this.components.transportManager.getAddrs())\n .concat([...this.observed.entries()]\n .filter(([_, metadata]) => metadata.confident)\n .map(([str]) => (0,_multiformats_multiaddr__WEBPACK_IMPORTED_MODULE_2__.multiaddr)(str))).map(ma => {\n // strip our peer id if it is present\n if (ma.getPeerId() === this.components.peerId.toString()) {\n return ma.decapsulate(`/p2p/${this.components.peerId.toString()}`);\n }
/***/ }),
/***/ "./node_modules/libp2p/dist/src/address-manager/utils.js":
/*!***************************************************************!*\
!*** ./node_modules/libp2p/dist/src/address-manager/utils.js ***!
\***************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ debounce: () => (/* binding */ debounce)\n/* harmony export */ });\nfunction debounce(func, wait) {\n let timeout;\n return function () {\n const later = function () {\n timeout = undefined;\n func();\n };\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n };\n}\n//# sourceMappingURL=utils.js.map\n\n//# sourceURL=webpack://light/./node_modules/libp2p/dist/src/address-manager/utils.js?");
/***/ }),
/***/ "./node_modules/libp2p/dist/src/circuit-relay/constants.js":
/*!*****************************************************************!*\
!*** ./node_modules/libp2p/dist/src/circuit-relay/constants.js ***!
\*****************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ADVERTISE_BOOT_DELAY: () => (/* binding */ ADVERTISE_BOOT_DELAY),\n/* harmony export */ ADVERTISE_TTL: () => (/* binding */ ADVERTISE_TTL),\n/* harmony export */ CIRCUIT_PROTO_CODE: () => (/* binding */ CIRCUIT_PROTO_CODE),\n/* harmony export */ DEFAULT_ADVERT_BOOT_DELAY: () => (/* binding */ DEFAULT_ADVERT_BOOT_DELAY),\n/* harmony export */ DEFAULT_DATA_LIMIT: () => (/* binding */ DEFAULT_DATA_LIMIT),\n/* harmony export */ DEFAULT_DURATION_LIMIT: () => (/* binding */ DEFAULT_DURATION_LIMIT),\n/* harmony export */ DEFAULT_HOP_TIMEOUT: () => (/* binding */ DEFAULT_HOP_TIMEOUT),\n/* harmony export */ DEFAULT_MAX_RESERVATION_CLEAR_INTERVAL: () => (/* binding */ DEFAULT_MAX_RESERVATION_CLEAR_INTERVAL),\n/* harmony export */ DEFAULT_MAX_RESERVATION_STORE_SIZE: () => (/* binding */ DEFAULT_MAX_RESERVATION_STORE_SIZE),\n/* harmony export */ DEFAULT_MAX_RESERVATION_TTL: () => (/* binding */ DEFAULT_MAX_RESERVATION_TTL),\n/* harmony export */ DEFAULT_RESERVATION_CONCURRENCY: () => (/* binding */ DEFAULT_RESERVATION_CONCURRENCY),\n/* harmony export */ RELAY_RENDEZVOUS_NS: () => (/* binding */ RELAY_RENDEZVOUS_NS),\n/* harmony export */ RELAY_SOURCE_TAG: () => (/* binding */ RELAY_SOURCE_TAG),\n/* harmony export */ RELAY_TAG: () => (/* binding */ RELAY_TAG),\n/* harmony export */ RELAY_V2_HOP_CODEC: () => (/* binding */ RELAY_V2_HOP_CODEC),\n/* harmony export */ RELAY_V2_STOP_CODEC: () => (/* binding */ RELAY_V2_STOP_CODEC)\n/* harmony export */ });\nconst second = 1000;\nconst minute = 60 * second;\n/**\n * Delay before HOP relay service is advertised on the network\n */\nconst ADVERTISE_BOOT_DELAY = 15 * minute;\n/**\n * Delay Between HOP relay service advertisements on the network\n */\nconst ADVERTISE_TTL = 30 * minute;\n/**\n * Multicodec code\n */\nconst CIRCUIT_PROTO_CODE = 290;\n/**\n * Relay HOP relay service namespace for discovery\n */\nconst RELAY_RENDEZVOUS_NS = '/libp2p/relay';\n/**\n * The maximum number of relay reservations the relay server will accept\n */\nconst DEFAULT_MAX_RESERVATION_STORE_SIZE = 15;\n/**\n * How often to check for reservation expiry\n */\nconst DEFAULT_MAX_RESERVATION_CLEAR_INTERVAL = 300 * second;\n/**\n * How often to check for reservation expiry\n */\nconst DEFAULT_MAX_RESERVATION_TTL = 2 * 60 * minute;\nconst DEFAULT_RESERVATION_CONCURRENCY = 1;\nconst RELAY_SOURCE_TAG = 'circuit-relay-source';\nconst RELAY_TAG = 'circuit-relay-relay';\n// circuit v2 connection limits\n// https://github.com/libp2p/go-libp2p/blob/master/p2p/protocol/circuitv2/relay/resources.go#L61-L66\n// 2 min is the default connection duration\nconst DEFAULT_DURATION_LIMIT = 2 * minute;\n// 128k is the default data limit\nconst DEFAULT_DATA_LIMIT = BigInt(1 << 17);\n/**\n * The hop protocol\n */\nconst RELAY_V2_HOP_CODEC = '/libp2p/circuit/relay/0.2.0/hop';\n/**\n * the stop protocol\n */\nconst RELAY_V2_STOP_CODEC = '/libp2p/circuit/relay/0.2.0/stop';\n/**\n * Hop messages must be exchanged inside this timeout\n */\nconst DEFAULT_HOP_TIMEOUT = 30 * second;\n/**\n * How long to wait before starting to advertise the relay service\n */\nconst DEFAULT_ADVERT_BOOT_DELAY = 30 * second;\n//# sourceMappingURL=constants.js.map\n\n//# sourceURL=webpack://light/./node_modules/libp2p/dist/src/circuit-relay/constants.js?");
/***/ }),
/***/ "./node_modules/libp2p/dist/src/circuit-relay/index.js":
/*!*************************************************************!*\
!*** ./node_modules/libp2p/dist/src/circuit-relay/index.js ***!
\*************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ circuitRelayServer: () => (/* reexport safe */ _server_index_js__WEBPACK_IMPORTED_MODULE_0__.circuitRelayServer),\n/* harmony export */ circuitRelayTransport: () => (/* reexport safe */ _transport_index_js__WEBPACK_IMPORTED_MODULE_1__.circuitRelayTransport)\n/* harmony export */ });\n/* harmony import */ var _server_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./server/index.js */ \"./node_modules/libp2p/dist/src/circuit-relay/server/index.js\");\n/* harmony import */ var _transport_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transport/index.js */ \"./node_modules/libp2p/dist/src/circuit-relay/transport/index.js\");\n\n\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/libp2p/dist/src/circuit-relay/index.js?");
/***/ }),
/***/ "./node_modules/libp2p/dist/src/circuit-relay/pb/index.js":
/*!****************************************************************!*\
!*** ./node_modules/libp2p/dist/src/circuit-relay/pb/index.js ***!
\****************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ HopMessage: () => (/* binding */ HopMessage),\n/* harmony export */ Limit: () => (/* binding */ Limit),\n/* harmony export */ Peer: () => (/* binding */ Peer),\n/* harmony export */ Reservation: () => (/* binding */ Reservation),\n/* harmony export */ ReservationVoucher: () => (/* binding */ ReservationVoucher),\n/* harmony export */ Status: () => (/* binding */ Status),\n/* harmony export */ StopMessage: () => (/* binding */ StopMessage)\n/* harmony export */ });\n/* harmony import */ var protons_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! protons-runtime */ \"./node_modules/protons-runtime/dist/src/index.js\");\n/* eslint-disable import/export */\n/* eslint-disable complexity */\n/* eslint-disable @typescript-eslint/no-namespace */\n/* eslint-disable @typescript-eslint/no-unnecessary-boolean-literal-compare */\n/* eslint-disable @typescript-eslint/no-empty-interface */\n\nvar HopMessage;\n(function (HopMessage) {\n let Type;\n (function (Type) {\n Type[\"RESERVE\"] = \"RESERVE\";\n Type[\"CONNECT\"] = \"CONNECT\";\n Type[\"STATUS\"] = \"STATUS\";\n })(Type = HopMessage.Type || (HopMessage.Type = {}));\n let __TypeValues;\n (function (__TypeValues) {\n __TypeValues[__TypeValues[\"RESERVE\"] = 0] = \"RESERVE\";\n __TypeValues[__TypeValues[\"CONNECT\"] = 1] = \"CONNECT\";\n __TypeValues[__TypeValues[\"STATUS\"] = 2] = \"STATUS\";\n })(__TypeValues || (__TypeValues = {}));\n (function (Type) {\n Type.codec = () => {\n return (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.enumeration)(__TypeValues);\n };\n })(Type = HopMessage.Type || (HopMessage.Type = {}));\n let _codec;\n HopMessage.codec = () => {\n if (_codec == null) {\n _codec = (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.message)((obj, w, opts = {}) => {\n if (opts.lengthDelimited !== false) {\n w.fork();\n }\n if (obj.type != null) {\n w.uint32(8);\n HopMessage.Type.codec().encode(obj.type, w);\n }\n if (obj.peer != null) {\n w.uint32(18);\n Peer.codec().encode(obj.peer, w);\n }\n if (obj.reservation != null) {\n w.uint32(26);\n Reservation.codec().encode(obj.reservation, w);\n }\n if (obj.limit != null) {\n w.uint32(34);\n Limit.codec().encode(obj.limit, w);\n }\n if (obj.status != null) {\n w.uint32(40);\n Status.codec().encode(obj.status, w);\n }\n if (opts.lengthDelimited !== false) {\n w.ldelim();\n }\n }, (reader, length) => {\n const obj = {};\n const end = length == null ? reader.len : reader.pos + length;\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n obj.type = HopMessage.Type.codec().decode(reader);\n break;\n case 2:\n obj.peer = Peer.codec().decode(reader, reader.uint32());\n break;\n case 3:\n obj.reservation = Reservation.codec().decode(reader, reader.uint32());\n break;\n case 4:\n obj.limit = Limit.codec().decode(reader, reader.uint32());\n break;\n case 5:\n obj.status = Status.codec().decode(reader);\n break;\n
/***/ }),
/***/ "./node_modules/libp2p/dist/src/circuit-relay/server/advert-service.js":
/*!*****************************************************************************!*\
!*** ./node_modules/libp2p/dist/src/circuit-relay/server/advert-service.js ***!
\*****************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AdvertService: () => (/* binding */ AdvertService)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interfaces_events__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interfaces/events */ \"./node_modules/@libp2p/interfaces/dist/src/events.js\");\n/* harmony import */ var _libp2p_logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/logger */ \"./node_modules/@libp2p/logger/dist/src/index.js\");\n/* harmony import */ var p_retry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! p-retry */ \"./node_modules/p-retry/index.js\");\n/* harmony import */ var _errors_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../errors.js */ \"./node_modules/libp2p/dist/src/errors.js\");\n/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../constants.js */ \"./node_modules/libp2p/dist/src/circuit-relay/constants.js\");\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils.js */ \"./node_modules/libp2p/dist/src/circuit-relay/utils.js\");\n\n\n\n\n\n\nconst log = (0,_libp2p_logger__WEBPACK_IMPORTED_MODULE_1__.logger)('libp2p:circuit-relay:advert-service');\nclass AdvertService extends _libp2p_interfaces_events__WEBPACK_IMPORTED_MODULE_0__.EventEmitter {\n contentRouting;\n timeout;\n started;\n bootDelay;\n /**\n * Creates an instance of Relay\n */\n constructor(components, init) {\n super();\n this.contentRouting = components.contentRouting;\n this.bootDelay = init?.bootDelay ?? _constants_js__WEBPACK_IMPORTED_MODULE_4__.DEFAULT_ADVERT_BOOT_DELAY;\n this.started = false;\n }\n isStarted() {\n return this.started;\n }\n /**\n * Start Relay service\n */\n start() {\n if (this.started) {\n return;\n }\n // Advertise service if HOP enabled and advertising enabled\n this.timeout = setTimeout(() => {\n this._advertiseService().catch(err => {\n log.error('could not advertise service', err);\n });\n }, this.bootDelay);\n this.started = true;\n }\n /**\n * Stop Relay service\n */\n stop() {\n try {\n clearTimeout(this.timeout);\n }\n catch (err) { }\n this.started = false;\n }\n /**\n * Advertise hop relay service in the network.\n */\n async _advertiseService() {\n await (0,p_retry__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(async () => {\n try {\n const cid = await (0,_utils_js__WEBPACK_IMPORTED_MODULE_5__.namespaceToCid)(_constants_js__WEBPACK_IMPORTED_MODULE_4__.RELAY_RENDEZVOUS_NS);\n await this.contentRouting.provide(cid);\n this.safeDispatchEvent('advert:success', { detail: undefined });\n }\n catch (err) {\n this.safeDispatchEvent('advert:error', { detail: err });\n if (err.code === _errors_js__WEBPACK_IMPORTED_MODULE_3__.codes.ERR_NO_ROUTERS_AVAILABLE) {\n log.error('a content router, such as a DHT, must be provided in order to advertise the relay service', err);\n this.stop();\n return;\n }\n log.error('could not advertise service', err);\n throw err;\n }\n });\n }\n}\n//# sourceMappingURL=advert-service.js.map\n\n//# sourceURL=webpack://light/./node_modules/libp2p/dist/src/circuit-relay/server/advert-service.js?");
/***/ }),
/***/ "./node_modules/libp2p/dist/src/circuit-relay/server/index.js":
/*!********************************************************************!*\
!*** ./node_modules/libp2p/dist/src/circuit-relay/server/index.js ***!
\********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ circuitRelayServer: () => (/* binding */ circuitRelayServer)\n/* harmony export */ });\n/* harmony import */ var events__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! events */ \"./node_modules/events/events.js\");\n/* harmony import */ var _libp2p_interfaces_events__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/interfaces/events */ \"./node_modules/@libp2p/interfaces/dist/src/events.js\");\n/* harmony import */ var _libp2p_logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @libp2p/logger */ \"./node_modules/@libp2p/logger/dist/src/index.js\");\n/* harmony import */ var _libp2p_peer_id__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @libp2p/peer-id */ \"./node_modules/@libp2p/peer-id/dist/src/index.js\");\n/* harmony import */ var _libp2p_peer_record__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @libp2p/peer-record */ \"./node_modules/@libp2p/peer-record/dist/src/index.js\");\n/* harmony import */ var _multiformats_multiaddr__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @multiformats/multiaddr */ \"./node_modules/@multiformats/multiaddr/dist/src/index.js\");\n/* harmony import */ var it_pb_stream__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! it-pb-stream */ \"./node_modules/it-pb-stream/dist/src/index.js\");\n/* harmony import */ var p_defer__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! p-defer */ \"./node_modules/p-defer/index.js\");\n/* harmony import */ var _connection_manager_constants_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../connection-manager/constants.js */ \"./node_modules/libp2p/dist/src/connection-manager/constants.js\");\n/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../constants.js */ \"./node_modules/libp2p/dist/src/circuit-relay/constants.js\");\n/* harmony import */ var _pb_index_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../pb/index.js */ \"./node_modules/libp2p/dist/src/circuit-relay/pb/index.js\");\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils.js */ \"./node_modules/libp2p/dist/src/circuit-relay/utils.js\");\n/* harmony import */ var _advert_service_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./advert-service.js */ \"./node_modules/libp2p/dist/src/circuit-relay/server/advert-service.js\");\n/* harmony import */ var _reservation_store_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./reservation-store.js */ \"./node_modules/libp2p/dist/src/circuit-relay/server/reservation-store.js\");\n/* harmony import */ var _reservation_voucher_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./reservation-voucher.js */ \"./node_modules/libp2p/dist/src/circuit-relay/server/reservation-voucher.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst log = (0,_libp2p_logger__WEBPACK_IMPORTED_MODULE_2__.logger)('libp2p:circuit-relay:server');\nconst isRelayAddr = (ma) => ma.protoCodes().includes(_constants_js__WEBPACK_IMPORTED_MODULE_9__.CIRCUIT_PROTO_CODE);\nconst defaults = {\n maxOutboundStopStreams: _connection_manager_constants_js__WEBPACK_IMPORTED_MODULE_8__.MAX_CONNECTIONS\n};\nclass CircuitRelayServer extends _libp2p_interfaces_events__WEBPACK_IMPORTED_MODULE_1__.EventEmitter {\n registrar;\n peerStore;\n addressManager;\n peerId;\n connectionManager;\n connectionGater;\n reservationStore;\n advertService;\n started;\n hopTimeout;\n shutdownController;\n maxInboundHopStreams;\n maxOutboundHopStreams;\n maxOutboundStopStreams;\n /**\n * Creates an instance of Relay\n */\n constructor(components, init = {}) {\n super();\n this.registrar = components.registrar;\n this.peerStore = components.peerStore;\n this.addressManager = components.addressManager;\n this.peerId = components.peerId;\n this.connectionManager = components.connectionManage
/***/ }),
/***/ "./node_modules/libp2p/dist/src/circuit-relay/server/reservation-store.js":
/*!********************************************************************************!*\
!*** ./node_modules/libp2p/dist/src/circuit-relay/server/reservation-store.js ***!
\********************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ReservationStore: () => (/* binding */ ReservationStore)\n/* harmony export */ });\n/* harmony import */ var _libp2p_peer_collections__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/peer-collections */ \"./node_modules/@libp2p/peer-collections/dist/src/index.js\");\n/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../constants.js */ \"./node_modules/libp2p/dist/src/circuit-relay/constants.js\");\n/* harmony import */ var _pb_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../pb/index.js */ \"./node_modules/libp2p/dist/src/circuit-relay/pb/index.js\");\n\n\n\nclass ReservationStore {\n reservations = new _libp2p_peer_collections__WEBPACK_IMPORTED_MODULE_0__.PeerMap();\n _started = false;\n interval;\n maxReservations;\n reservationClearInterval;\n applyDefaultLimit;\n reservationTtl;\n defaultDurationLimit;\n defaultDataLimit;\n constructor(options = {}) {\n this.maxReservations = options.maxReservations ?? _constants_js__WEBPACK_IMPORTED_MODULE_1__.DEFAULT_MAX_RESERVATION_STORE_SIZE;\n this.reservationClearInterval = options.reservationClearInterval ?? _constants_js__WEBPACK_IMPORTED_MODULE_1__.DEFAULT_MAX_RESERVATION_CLEAR_INTERVAL;\n this.applyDefaultLimit = options.applyDefaultLimit !== false;\n this.reservationTtl = options.reservationTtl ?? _constants_js__WEBPACK_IMPORTED_MODULE_1__.DEFAULT_MAX_RESERVATION_TTL;\n this.defaultDurationLimit = options.defaultDurationLimit ?? _constants_js__WEBPACK_IMPORTED_MODULE_1__.DEFAULT_DURATION_LIMIT;\n this.defaultDataLimit = options.defaultDataLimit ?? _constants_js__WEBPACK_IMPORTED_MODULE_1__.DEFAULT_DATA_LIMIT;\n }\n isStarted() {\n return this._started;\n }\n start() {\n if (this._started) {\n return;\n }\n this._started = true;\n this.interval = setInterval(() => {\n const now = (new Date()).getTime();\n this.reservations.forEach((r, k) => {\n if (r.expire.getTime() < now) {\n this.reservations.delete(k);\n }\n });\n }, this.reservationClearInterval);\n }\n stop() {\n clearInterval(this.interval);\n }\n reserve(peer, addr, limit) {\n if (this.reservations.size >= this.maxReservations && !this.reservations.has(peer)) {\n return { status: _pb_index_js__WEBPACK_IMPORTED_MODULE_2__.Status.RESERVATION_REFUSED };\n }\n const expire = new Date(Date.now() + this.reservationTtl);\n let checkedLimit;\n if (this.applyDefaultLimit) {\n checkedLimit = limit ?? { data: this.defaultDataLimit, duration: this.defaultDurationLimit };\n }\n this.reservations.set(peer, { addr, expire, limit: checkedLimit });\n // return expiry time in seconds\n return { status: _pb_index_js__WEBPACK_IMPORTED_MODULE_2__.Status.OK, expire: Math.round(expire.getTime() / 1000) };\n }\n removeReservation(peer) {\n this.reservations.delete(peer);\n }\n hasReservation(dst) {\n return this.reservations.has(dst);\n }\n get(peer) {\n return this.reservations.get(peer);\n }\n}\n//# sourceMappingURL=reservation-store.js.map\n\n//# sourceURL=webpack://light/./node_modules/libp2p/dist/src/circuit-relay/server/reservation-store.js?");
/***/ }),
/***/ "./node_modules/libp2p/dist/src/circuit-relay/server/reservation-voucher.js":
/*!**********************************************************************************!*\
!*** ./node_modules/libp2p/dist/src/circuit-relay/server/reservation-voucher.js ***!
\**********************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ReservationVoucherRecord: () => (/* binding */ ReservationVoucherRecord)\n/* harmony export */ });\n/* harmony import */ var _pb_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../pb/index.js */ \"./node_modules/libp2p/dist/src/circuit-relay/pb/index.js\");\n\nclass ReservationVoucherRecord {\n domain = 'libp2p-relay-rsvp';\n codec = new Uint8Array([0x03, 0x02]);\n relay;\n peer;\n expiration;\n constructor({ relay, peer, expiration }) {\n this.relay = relay;\n this.peer = peer;\n this.expiration = expiration;\n }\n marshal() {\n return _pb_index_js__WEBPACK_IMPORTED_MODULE_0__.ReservationVoucher.encode({\n relay: this.relay.toBytes(),\n peer: this.peer.toBytes(),\n expiration: BigInt(this.expiration)\n });\n }\n equals(other) {\n if (!(other instanceof ReservationVoucherRecord)) {\n return false;\n }\n if (!this.peer.equals(other.peer)) {\n return false;\n }\n if (!this.relay.equals(other.relay)) {\n return false;\n }\n if (this.expiration !== other.expiration) {\n return false;\n }\n return true;\n }\n}\n//# sourceMappingURL=reservation-voucher.js.map\n\n//# sourceURL=webpack://light/./node_modules/libp2p/dist/src/circuit-relay/server/reservation-voucher.js?");
/***/ }),
/***/ "./node_modules/libp2p/dist/src/circuit-relay/transport/discovery.js":
/*!***************************************************************************!*\
!*** ./node_modules/libp2p/dist/src/circuit-relay/transport/discovery.js ***!
\***************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ RelayDiscovery: () => (/* binding */ RelayDiscovery)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interfaces_events__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interfaces/events */ \"./node_modules/@libp2p/interfaces/dist/src/events.js\");\n/* harmony import */ var _libp2p_logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/logger */ \"./node_modules/@libp2p/logger/dist/src/index.js\");\n/* harmony import */ var _libp2p_topology__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @libp2p/topology */ \"./node_modules/@libp2p/topology/dist/src/index.js\");\n/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../constants.js */ \"./node_modules/libp2p/dist/src/circuit-relay/constants.js\");\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils.js */ \"./node_modules/libp2p/dist/src/circuit-relay/utils.js\");\n\n\n\n\n\nconst log = (0,_libp2p_logger__WEBPACK_IMPORTED_MODULE_1__.logger)('libp2p:circuit-relay:discover-relays');\n/**\n * ReservationManager automatically makes a circuit v2 reservation on any connected\n * peers that support the circuit v2 HOP protocol.\n */\nclass RelayDiscovery extends _libp2p_interfaces_events__WEBPACK_IMPORTED_MODULE_0__.EventEmitter {\n peerId;\n peerStore;\n contentRouting;\n registrar;\n started;\n topologyId;\n constructor(components) {\n super();\n this.started = false;\n this.peerId = components.peerId;\n this.peerStore = components.peerStore;\n this.contentRouting = components.contentRouting;\n this.registrar = components.registrar;\n }\n isStarted() {\n return this.started;\n }\n async start() {\n // register a topology listener for when new peers are encountered\n // that support the hop protocol\n this.topologyId = await this.registrar.register(_constants_js__WEBPACK_IMPORTED_MODULE_3__.RELAY_V2_HOP_CODEC, (0,_libp2p_topology__WEBPACK_IMPORTED_MODULE_2__.createTopology)({\n onConnect: (peerId) => {\n this.safeDispatchEvent('relay:discover', { detail: peerId });\n }\n }));\n void this.discover()\n .catch(err => {\n log.error('error listening on relays', err);\n });\n this.started = true;\n }\n stop() {\n if (this.topologyId != null) {\n this.registrar.unregister(this.topologyId);\n }\n this.started = false;\n }\n /**\n * Try to listen on available hop relay connections.\n * The following order will happen while we do not have enough relays:\n *\n * 1. Check the metadata store for known relays, try to listen on the ones we are already connected\n * 2. Dial and try to listen on the peers we know that support hop but are not connected\n * 3. Search the network\n */\n async discover() {\n log('searching peer store for relays');\n const peers = (await this.peerStore.all({\n filters: [\n // filter by a list of peers supporting RELAY_V2_HOP and ones we are not listening on\n (peer) => {\n return peer.protocols.includes(_constants_js__WEBPACK_IMPORTED_MODULE_3__.RELAY_V2_HOP_CODEC);\n }\n ],\n orders: [\n () => Math.random() < 0.5 ? 1 : -1\n ]\n }));\n for (const peer of peers) {\n log('found relay peer %p in content peer store', peer.id);\n this.safeDispatchEvent('relay:discover', { detail: peer.id });\n }\n log('found %d relay peers in peer store', peers.length);\n try {\n log('searching content routing for relays');\n const cid = await (0,_utils_js__WEBPACK_IMPORTED_MODULE_4__.namespaceToCid)(_constants_js__WEBPACK_IMPORTED_MODULE_3__.RE
/***/ }),
/***/ "./node_modules/libp2p/dist/src/circuit-relay/transport/index.js":
/*!***********************************************************************!*\
!*** ./node_modules/libp2p/dist/src/circuit-relay/transport/index.js ***!
\***********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ circuitRelayTransport: () => (/* binding */ circuitRelayTransport)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interface_transport__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interface-transport */ \"./node_modules/@libp2p/interface-transport/dist/src/index.js\");\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n/* harmony import */ var _libp2p_logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @libp2p/logger */ \"./node_modules/@libp2p/logger/dist/src/index.js\");\n/* harmony import */ var _libp2p_peer_id__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @libp2p/peer-id */ \"./node_modules/@libp2p/peer-id/dist/src/index.js\");\n/* harmony import */ var _libp2p_utils_stream_to_ma_conn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @libp2p/utils/stream-to-ma-conn */ \"./node_modules/@libp2p/utils/dist/src/stream-to-ma-conn.js\");\n/* harmony import */ var _multiformats_mafmt__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @multiformats/mafmt */ \"./node_modules/@multiformats/mafmt/dist/src/index.js\");\n/* harmony import */ var _multiformats_multiaddr__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @multiformats/multiaddr */ \"./node_modules/@multiformats/multiaddr/dist/src/index.js\");\n/* harmony import */ var it_pb_stream__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! it-pb-stream */ \"./node_modules/it-pb-stream/dist/src/index.js\");\n/* harmony import */ var _connection_manager_constants_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../connection-manager/constants.js */ \"./node_modules/libp2p/dist/src/connection-manager/constants.js\");\n/* harmony import */ var _errors_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../errors.js */ \"./node_modules/libp2p/dist/src/errors.js\");\n/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../constants.js */ \"./node_modules/libp2p/dist/src/circuit-relay/constants.js\");\n/* harmony import */ var _pb_index_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../pb/index.js */ \"./node_modules/libp2p/dist/src/circuit-relay/pb/index.js\");\n/* harmony import */ var _discovery_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./discovery.js */ \"./node_modules/libp2p/dist/src/circuit-relay/transport/discovery.js\");\n/* harmony import */ var _listener_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./listener.js */ \"./node_modules/libp2p/dist/src/circuit-relay/transport/listener.js\");\n/* harmony import */ var _reservation_store_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./reservation-store.js */ \"./node_modules/libp2p/dist/src/circuit-relay/transport/reservation-store.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst log = (0,_libp2p_logger__WEBPACK_IMPORTED_MODULE_2__.logger)('libp2p:circuit-relay:transport');\nconst isValidStop = (request) => {\n if (request.peer == null) {\n return false;\n }\n try {\n request.peer.addrs.forEach(_multiformats_multiaddr__WEBPACK_IMPORTED_MODULE_6__.multiaddr);\n }\n catch {\n return false;\n }\n return true;\n};\nconst defaults = {\n maxInboundStopStreams: _connection_manager_constants_js__WEBPACK_IMPORTED_MODULE_8__.MAX_CONNECTIONS,\n maxOutboundStopStreams: _connection_manager_constants_js__WEBPACK_IMPORTED_MODULE_8__.MAX_CONNECTIONS\n};\nclass CircuitRelayTransport {\n discovery;\n registrar;\n peerStore;\n connectionManager;\n peerId;\n upgrader;\n addressManager;\n connectionGater;\n reservationStore;\n maxInboundStopStreams;\n maxOutboundStopStreams;\n started;\n constructor(components, init) {\n this.registrar = components.registrar;\n this.peerStore = components.p
/***/ }),
/***/ "./node_modules/libp2p/dist/src/circuit-relay/transport/listener.js":
/*!**************************************************************************!*\
!*** ./node_modules/libp2p/dist/src/circuit-relay/transport/listener.js ***!
\**************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ createListener: () => (/* binding */ createListener)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n/* harmony import */ var _libp2p_interfaces_events__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/interfaces/events */ \"./node_modules/@libp2p/interfaces/dist/src/events.js\");\n/* harmony import */ var _libp2p_logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @libp2p/logger */ \"./node_modules/@libp2p/logger/dist/src/index.js\");\n/* harmony import */ var _libp2p_peer_collections__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @libp2p/peer-collections */ \"./node_modules/@libp2p/peer-collections/dist/src/index.js\");\n/* harmony import */ var _libp2p_peer_id__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @libp2p/peer-id */ \"./node_modules/@libp2p/peer-id/dist/src/index.js\");\n/* harmony import */ var _multiformats_multiaddr__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @multiformats/multiaddr */ \"./node_modules/@multiformats/multiaddr/dist/src/index.js\");\n\n\n\n\n\n\nconst log = (0,_libp2p_logger__WEBPACK_IMPORTED_MODULE_2__.logger)('libp2p:circuit-relay:transport:listener');\nclass CircuitRelayTransportListener extends _libp2p_interfaces_events__WEBPACK_IMPORTED_MODULE_1__.EventEmitter {\n connectionManager;\n relayStore;\n listeningAddrs;\n constructor(components) {\n super();\n this.connectionManager = components.connectionManager;\n this.relayStore = components.relayStore;\n this.listeningAddrs = new _libp2p_peer_collections__WEBPACK_IMPORTED_MODULE_3__.PeerMap();\n // remove listening addrs when a relay is removed\n this.relayStore.addEventListener('relay:removed', (evt) => {\n this.#removeRelayPeer(evt.detail);\n });\n }\n async listen(addr) {\n log('listen on %s', addr);\n const relayPeerStr = addr.getPeerId();\n let relayConn;\n // check if we already have a connection to the relay\n if (relayPeerStr != null) {\n const relayPeer = (0,_libp2p_peer_id__WEBPACK_IMPORTED_MODULE_4__.peerIdFromString)(relayPeerStr);\n const connections = this.connectionManager.getConnectionsMap().get(relayPeer) ?? [];\n if (connections.length > 0) {\n relayConn = connections[0];\n }\n }\n // open a new connection as we don't already have one\n if (relayConn == null) {\n const addrString = addr.toString().split('/p2p-circuit').find(a => a !== '');\n const ma = (0,_multiformats_multiaddr__WEBPACK_IMPORTED_MODULE_5__.multiaddr)(addrString);\n relayConn = await this.connectionManager.openConnection(ma);\n }\n if (!this.relayStore.hasReservation(relayConn.remotePeer)) {\n // addRelay calls transportManager.listen which calls this listen method\n await this.relayStore.addRelay(relayConn.remotePeer, 'configured');\n return;\n }\n const reservation = this.relayStore.getReservation(relayConn.remotePeer);\n if (reservation == null) {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__.CodeError('Did not have reservation after making reservation', 'ERR_NO_RESERVATION');\n }\n if (this.listeningAddrs.has(relayConn.remotePeer)) {\n log('already listening on relay %p', relayConn.remotePeer);\n return;\n }\n // add all addresses from the relay reservation\n this.listeningAddrs.set(relayConn.remotePeer, reservation.addrs.map(buf => {\n return (0,_multiformats_multiaddr__WEBPACK_IMPORTED_MODULE_5__.multiaddr)(buf).encapsulate('/p2p-circuit');\n }));\n this.safeDispatchEvent('listening', {});
/***/ }),
/***/ "./node_modules/libp2p/dist/src/circuit-relay/transport/reservation-store.js":
/*!***********************************************************************************!*\
!*** ./node_modules/libp2p/dist/src/circuit-relay/transport/reservation-store.js ***!
\***********************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ReservationStore: () => (/* binding */ ReservationStore)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interfaces_events__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interfaces/events */ \"./node_modules/@libp2p/interfaces/dist/src/events.js\");\n/* harmony import */ var _libp2p_logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/logger */ \"./node_modules/@libp2p/logger/dist/src/index.js\");\n/* harmony import */ var _libp2p_peer_collections__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @libp2p/peer-collections */ \"./node_modules/@libp2p/peer-collections/dist/src/index.js\");\n/* harmony import */ var _multiformats_multiaddr__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @multiformats/multiaddr */ \"./node_modules/@multiformats/multiaddr/dist/src/index.js\");\n/* harmony import */ var it_pb_stream__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! it-pb-stream */ \"./node_modules/it-pb-stream/dist/src/index.js\");\n/* harmony import */ var _utils_peer_job_queue_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/peer-job-queue.js */ \"./node_modules/libp2p/dist/src/utils/peer-job-queue.js\");\n/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../constants.js */ \"./node_modules/libp2p/dist/src/circuit-relay/constants.js\");\n/* harmony import */ var _pb_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../pb/index.js */ \"./node_modules/libp2p/dist/src/circuit-relay/pb/index.js\");\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils.js */ \"./node_modules/libp2p/dist/src/circuit-relay/utils.js\");\n\n\n\n\n\n\n\n\n\nconst log = (0,_libp2p_logger__WEBPACK_IMPORTED_MODULE_1__.logger)('libp2p:circuit-relay:transport:reservation-store');\n// allow refreshing a relay reservation if it will expire in the next 10 minutes\nconst REFRESH_WINDOW = (60 * 1000) * 10;\n// try to refresh relay reservations 5 minutes before expiry\nconst REFRESH_TIMEOUT = (60 * 1000) * 5;\n// minimum duration before which a reservation must not be refreshed\nconst REFRESH_TIMEOUT_MIN = 30 * 1000;\nclass ReservationStore extends _libp2p_interfaces_events__WEBPACK_IMPORTED_MODULE_0__.EventEmitter {\n peerId;\n connectionManager;\n transportManager;\n peerStore;\n events;\n reserveQueue;\n reservations;\n maxDiscoveredRelays;\n maxReservationQueueLength;\n started;\n constructor(components, init) {\n super();\n this.peerId = components.peerId;\n this.connectionManager = components.connectionManager;\n this.transportManager = components.transportManager;\n this.peerStore = components.peerStore;\n this.events = components.events;\n this.reservations = new _libp2p_peer_collections__WEBPACK_IMPORTED_MODULE_2__.PeerMap();\n this.maxDiscoveredRelays = init?.discoverRelays ?? 0;\n this.maxReservationQueueLength = init?.maxReservationQueueLength ?? 100;\n this.started = false;\n // ensure we don't listen on multiple relays simultaneously\n this.reserveQueue = new _utils_peer_job_queue_js__WEBPACK_IMPORTED_MODULE_5__.PeerJobQueue({\n concurrency: init?.reservationConcurrency ?? _constants_js__WEBPACK_IMPORTED_MODULE_6__.DEFAULT_RESERVATION_CONCURRENCY\n });\n // When a peer disconnects, if we had a reservation on that peer\n // remove the reservation and multiaddr and maybe trigger search\n // for new relays\n this.events.addEventListener('peer:disconnect', (evt) => {\n this.#removeRelay(evt.detail);\n });\n }\n isStarted() {\n return this.started;\n }\n async start() {\n this.started = true;\n }\n async stop() {\n this.reservations.forEach(({ timeout }) => {\n clearTimeout(timeout);\n });\n
/***/ }),
/***/ "./node_modules/libp2p/dist/src/circuit-relay/utils.js":
/*!*************************************************************!*\
!*** ./node_modules/libp2p/dist/src/circuit-relay/utils.js ***!
\*************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ createLimitedRelay: () => (/* binding */ createLimitedRelay),\n/* harmony export */ getExpirationMilliseconds: () => (/* binding */ getExpirationMilliseconds),\n/* harmony export */ namespaceToCid: () => (/* binding */ namespaceToCid)\n/* harmony export */ });\n/* harmony import */ var _libp2p_logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/logger */ \"./node_modules/@libp2p/logger/dist/src/index.js\");\n/* harmony import */ var abortable_iterator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! abortable-iterator */ \"./node_modules/abortable-iterator/dist/src/index.js\");\n/* harmony import */ var any_signal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! any-signal */ \"./node_modules/any-signal/dist/src/index.js\");\n/* harmony import */ var multiformats_cid__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! multiformats/cid */ \"./node_modules/multiformats/src/cid.js\");\n/* harmony import */ var multiformats_hashes_sha2__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! multiformats/hashes/sha2 */ \"./node_modules/multiformats/src/hashes/sha2-browser.js\");\n/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./constants.js */ \"./node_modules/libp2p/dist/src/circuit-relay/constants.js\");\n\n\n\n\n\n\nconst log = (0,_libp2p_logger__WEBPACK_IMPORTED_MODULE_0__.logger)('libp2p:circuit-relay:utils');\nasync function* countStreamBytes(source, limit) {\n for await (const buf of source) {\n const len = BigInt(buf.byteLength);\n if ((limit.remaining - len) < 0) {\n // this is a safe downcast since len is guarantee to be in the range for a number\n const remaining = Number(limit.remaining);\n limit.remaining = 0n;\n try {\n if (remaining !== 0) {\n yield buf.subarray(0, remaining);\n }\n }\n catch (err) {\n log.error(err);\n }\n throw new Error('data limit exceeded');\n }\n limit.remaining -= len;\n yield buf;\n }\n}\nconst doRelay = (src, dst, abortSignal, limit) => {\n function abortStreams(err) {\n src.abort(err);\n dst.abort(err);\n clearTimeout(timeout);\n }\n const abortController = new AbortController();\n const signal = (0,any_signal__WEBPACK_IMPORTED_MODULE_2__.anySignal)([abortSignal, abortController.signal]);\n const timeout = setTimeout(() => {\n abortController.abort();\n }, limit.duration);\n let srcDstFinished = false;\n let dstSrcFinished = false;\n const dataLimit = {\n remaining: limit.data\n };\n queueMicrotask(() => {\n void dst.sink(countStreamBytes((0,abortable_iterator__WEBPACK_IMPORTED_MODULE_1__.abortableSource)(src.source, signal, {\n abortMessage: 'duration limit exceeded'\n }), dataLimit))\n .catch(err => {\n log.error('error while relaying streams src -> dst', err);\n abortStreams(err);\n })\n .finally(() => {\n srcDstFinished = true;\n if (dstSrcFinished) {\n signal.clear();\n clearTimeout(timeout);\n }\n });\n });\n queueMicrotask(() => {\n void src.sink(countStreamBytes((0,abortable_iterator__WEBPACK_IMPORTED_MODULE_1__.abortableSource)(dst.source, signal, {\n abortMessage: 'duration limit exceeded'\n }), dataLimit))\n .catch(err => {\n log.error('error while relaying streams dst -> src', err);\n abortStreams(err);\n })\n .finally(() => {\n dstSrcFinished = true;\n if (srcDstFinished) {\n signal.clear();\n clearTimeout(timeout);\n }\n });\n });\n};\nfunction createLimitedRelay(source, destination, abortSignal, li
/***/ }),
/***/ "./node_modules/libp2p/dist/src/components.js":
/*!****************************************************!*\
!*** ./node_modules/libp2p/dist/src/components.js ***!
\****************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ defaultComponents: () => (/* binding */ defaultComponents)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n/* harmony import */ var _libp2p_interfaces_startable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/interfaces/startable */ \"./node_modules/@libp2p/interfaces/dist/src/startable.js\");\n\n\nclass DefaultComponents {\n components = {};\n _started = false;\n constructor(init = {}) {\n this.components = {};\n for (const [key, value] of Object.entries(init)) {\n this.components[key] = value;\n }\n }\n isStarted() {\n return this._started;\n }\n async _invokeStartableMethod(methodName) {\n await Promise.all(Object.values(this.components)\n .filter(obj => (0,_libp2p_interfaces_startable__WEBPACK_IMPORTED_MODULE_1__.isStartable)(obj))\n .map(async (startable) => {\n await startable[methodName]?.();\n }));\n }\n async beforeStart() {\n await this._invokeStartableMethod('beforeStart');\n }\n async start() {\n await this._invokeStartableMethod('start');\n this._started = true;\n }\n async afterStart() {\n await this._invokeStartableMethod('afterStart');\n }\n async beforeStop() {\n await this._invokeStartableMethod('beforeStop');\n }\n async stop() {\n await this._invokeStartableMethod('stop');\n this._started = false;\n }\n async afterStop() {\n await this._invokeStartableMethod('afterStop');\n }\n}\nconst OPTIONAL_SERVICES = [\n 'metrics',\n 'connectionProtector'\n];\nconst NON_SERVICE_PROPERTIES = [\n 'components',\n 'isStarted',\n 'beforeStart',\n 'start',\n 'afterStart',\n 'beforeStop',\n 'stop',\n 'afterStop',\n 'then',\n '_invokeStartableMethod'\n];\nfunction defaultComponents(init = {}) {\n const components = new DefaultComponents(init);\n const proxy = new Proxy(components, {\n get(target, prop, receiver) {\n if (typeof prop === 'string' && !NON_SERVICE_PROPERTIES.includes(prop)) {\n const service = components.components[prop];\n if (service == null && !OPTIONAL_SERVICES.includes(prop)) {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__.CodeError(`${prop} not set`, 'ERR_SERVICE_MISSING');\n }\n return service;\n }\n return Reflect.get(target, prop, receiver);\n },\n set(target, prop, value) {\n if (typeof prop === 'string') {\n components.components[prop] = value;\n }\n else {\n Reflect.set(target, prop, value);\n }\n return true;\n }\n });\n // @ts-expect-error component keys are proxied\n return proxy;\n}\n//# sourceMappingURL=components.js.map\n\n//# sourceURL=webpack://light/./node_modules/libp2p/dist/src/components.js?");
/***/ }),
/***/ "./node_modules/libp2p/dist/src/config.js":
/*!************************************************!*\
!*** ./node_modules/libp2p/dist/src/config.js ***!
\************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ validateConfig: () => (/* binding */ validateConfig)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interface_transport__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interface-transport */ \"./node_modules/@libp2p/interface-transport/dist/src/index.js\");\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n/* harmony import */ var _libp2p_utils_address_sort__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @libp2p/utils/address-sort */ \"./node_modules/@libp2p/utils/dist/src/address-sort.js\");\n/* harmony import */ var _multiformats_multiaddr_resolvers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @multiformats/multiaddr/resolvers */ \"./node_modules/@multiformats/multiaddr/dist/src/resolvers/index.js\");\n/* harmony import */ var merge_options__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! merge-options */ \"./node_modules/merge-options/index.mjs\");\n/* harmony import */ var _errors_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./errors.js */ \"./node_modules/libp2p/dist/src/errors.js\");\n\n\n\n\n\n\nconst DefaultConfig = {\n addresses: {\n listen: [],\n announce: [],\n noAnnounce: [],\n announceFilter: (multiaddrs) => multiaddrs\n },\n connectionManager: {\n resolvers: {\n dnsaddr: _multiformats_multiaddr_resolvers__WEBPACK_IMPORTED_MODULE_3__.dnsaddrResolver\n },\n addressSorter: _libp2p_utils_address_sort__WEBPACK_IMPORTED_MODULE_2__.publicAddressesFirst\n },\n transportManager: {\n faultTolerance: _libp2p_interface_transport__WEBPACK_IMPORTED_MODULE_0__.FaultTolerance.FATAL_ALL\n }\n};\nfunction validateConfig(opts) {\n const resultingOptions = (0,merge_options__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(DefaultConfig, opts);\n if (resultingOptions.transports == null || resultingOptions.transports.length < 1) {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_1__.CodeError(_errors_js__WEBPACK_IMPORTED_MODULE_5__.messages.ERR_TRANSPORTS_REQUIRED, _errors_js__WEBPACK_IMPORTED_MODULE_5__.codes.ERR_TRANSPORTS_REQUIRED);\n }\n if (resultingOptions.connectionProtector === null && globalThis.process?.env?.LIBP2P_FORCE_PNET != null) { // eslint-disable-line no-undef\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_1__.CodeError(_errors_js__WEBPACK_IMPORTED_MODULE_5__.messages.ERR_PROTECTOR_REQUIRED, _errors_js__WEBPACK_IMPORTED_MODULE_5__.codes.ERR_PROTECTOR_REQUIRED);\n }\n return resultingOptions;\n}\n//# sourceMappingURL=config.js.map\n\n//# sourceURL=webpack://light/./node_modules/libp2p/dist/src/config.js?");
/***/ }),
/***/ "./node_modules/libp2p/dist/src/config/connection-gater.browser.js":
/*!*************************************************************************!*\
!*** ./node_modules/libp2p/dist/src/config/connection-gater.browser.js ***!
\*************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ connectionGater: () => (/* binding */ connectionGater)\n/* harmony export */ });\n/* harmony import */ var private_ip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! private-ip */ \"./node_modules/private-ip/index.js\");\n\n/**\n * Returns a connection gater that disallows dialling private addresses by\n * default. Browsers are severely limited in their resource usage so don't\n * waste time trying to dial undiallable addresses.\n */\nfunction connectionGater(gater = {}) {\n return {\n denyDialPeer: async () => false,\n denyDialMultiaddr: async (multiaddr) => {\n const tuples = multiaddr.stringTuples();\n if (tuples[0][0] === 4 || tuples[0][0] === 41) {\n return Boolean((0,private_ip__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(`${tuples[0][1]}`));\n }\n return false;\n },\n denyInboundConnection: async () => false,\n denyOutboundConnection: async () => false,\n denyInboundEncryptedConnection: async () => false,\n denyOutboundEncryptedConnection: async () => false,\n denyInboundUpgradedConnection: async () => false,\n denyOutboundUpgradedConnection: async () => false,\n filterMultiaddrForPeer: async () => true,\n ...gater\n };\n}\n//# sourceMappingURL=connection-gater.browser.js.map\n\n//# sourceURL=webpack://light/./node_modules/libp2p/dist/src/config/connection-gater.browser.js?");
/***/ }),
/***/ "./node_modules/libp2p/dist/src/connection-manager/auto-dial.js":
/*!**********************************************************************!*\
!*** ./node_modules/libp2p/dist/src/connection-manager/auto-dial.js ***!
\**********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AutoDial: () => (/* binding */ AutoDial)\n/* harmony export */ });\n/* harmony import */ var _libp2p_logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/logger */ \"./node_modules/@libp2p/logger/dist/src/index.js\");\n/* harmony import */ var _libp2p_peer_collections__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/peer-collections */ \"./node_modules/@libp2p/peer-collections/dist/src/index.js\");\n/* harmony import */ var _utils_peer_job_queue_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/peer-job-queue.js */ \"./node_modules/libp2p/dist/src/utils/peer-job-queue.js\");\n/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./constants.js */ \"./node_modules/libp2p/dist/src/connection-manager/constants.js\");\n\n\n\n\nconst log = (0,_libp2p_logger__WEBPACK_IMPORTED_MODULE_0__.logger)('libp2p:connection-manager:auto-dial');\nconst defaultOptions = {\n minConnections: _constants_js__WEBPACK_IMPORTED_MODULE_3__.MIN_CONNECTIONS,\n maxQueueLength: _constants_js__WEBPACK_IMPORTED_MODULE_3__.AUTO_DIAL_MAX_QUEUE_LENGTH,\n autoDialConcurrency: _constants_js__WEBPACK_IMPORTED_MODULE_3__.AUTO_DIAL_CONCURRENCY,\n autoDialPriority: _constants_js__WEBPACK_IMPORTED_MODULE_3__.AUTO_DIAL_PRIORITY,\n autoDialInterval: _constants_js__WEBPACK_IMPORTED_MODULE_3__.AUTO_DIAL_INTERVAL\n};\nclass AutoDial {\n connectionManager;\n peerStore;\n queue;\n minConnections;\n autoDialPriority;\n autoDialIntervalMs;\n autoDialMaxQueueLength;\n autoDialInterval;\n started;\n running;\n /**\n * Proactively tries to connect to known peers stored in the PeerStore.\n * It will keep the number of connections below the upper limit and sort\n * the peers to connect based on whether we know their keys and protocols.\n */\n constructor(components, init) {\n this.connectionManager = components.connectionManager;\n this.peerStore = components.peerStore;\n this.minConnections = init.minConnections ?? defaultOptions.minConnections;\n this.autoDialPriority = init.autoDialPriority ?? defaultOptions.autoDialPriority;\n this.autoDialIntervalMs = init.autoDialInterval ?? defaultOptions.autoDialInterval;\n this.autoDialMaxQueueLength = init.maxQueueLength ?? defaultOptions.maxQueueLength;\n this.started = false;\n this.running = false;\n this.queue = new _utils_peer_job_queue_js__WEBPACK_IMPORTED_MODULE_2__.PeerJobQueue({\n concurrency: init.autoDialConcurrency ?? defaultOptions.autoDialConcurrency\n });\n this.queue.addListener('error', (err) => {\n log.error('error during auto-dial', err);\n });\n // check the min connection limit whenever a peer disconnects\n components.events.addEventListener('connection:close', () => {\n this.autoDial()\n .catch(err => {\n log.error(err);\n });\n });\n }\n isStarted() {\n return this.started;\n }\n start() {\n this.autoDialInterval = setTimeout(() => {\n this.autoDial()\n .catch(err => {\n log.error('error while autodialing', err);\n });\n }, this.autoDialIntervalMs);\n this.started = true;\n }\n afterStart() {\n this.autoDial()\n .catch(err => {\n log.error('error while autodialing', err);\n });\n }\n stop() {\n // clear the queue\n this.queue.clear();\n clearTimeout(this.autoDialInterval);\n this.started = false;\n this.running = false;\n }\n async autoDial() {\n if (!this.started) {\n return;\n }\n const connections = this.connectionManager.getConnectionsMap();\n const numConnections = connections.size;\n // Already has enough connection
/***/ }),
/***/ "./node_modules/libp2p/dist/src/connection-manager/connection-pruner.js":
/*!******************************************************************************!*\
!*** ./node_modules/libp2p/dist/src/connection-manager/connection-pruner.js ***!
\******************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ConnectionPruner: () => (/* binding */ ConnectionPruner)\n/* harmony export */ });\n/* harmony import */ var _libp2p_logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/logger */ \"./node_modules/@libp2p/logger/dist/src/index.js\");\n/* harmony import */ var _libp2p_peer_collections__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/peer-collections */ \"./node_modules/@libp2p/peer-collections/dist/src/index.js\");\n/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constants.js */ \"./node_modules/libp2p/dist/src/connection-manager/constants.js\");\n\n\n\nconst log = (0,_libp2p_logger__WEBPACK_IMPORTED_MODULE_0__.logger)('libp2p:connection-manager:connection-pruner');\nconst defaultOptions = {\n maxConnections: _constants_js__WEBPACK_IMPORTED_MODULE_2__.MAX_CONNECTIONS,\n allow: []\n};\n/**\n * If we go over the max connections limit, choose some connections to close\n */\nclass ConnectionPruner {\n maxConnections;\n connectionManager;\n peerStore;\n allow;\n events;\n constructor(components, init = {}) {\n this.maxConnections = init.maxConnections ?? defaultOptions.maxConnections;\n this.allow = init.allow ?? defaultOptions.allow;\n this.connectionManager = components.connectionManager;\n this.peerStore = components.peerStore;\n this.events = components.events;\n // check the max connection limit whenever a peer connects\n components.events.addEventListener('connection:open', () => {\n this.maybePruneConnections()\n .catch(err => {\n log.error(err);\n });\n });\n }\n /**\n * If we have more connections than our maximum, select some excess connections\n * to prune based on peer value\n */\n async maybePruneConnections() {\n const connections = this.connectionManager.getConnections();\n const numConnections = connections.length;\n const toPrune = Math.max(numConnections - this.maxConnections, 0);\n log('checking max connections limit %d/%d', numConnections, this.maxConnections);\n if (numConnections <= this.maxConnections) {\n return;\n }\n log('max connections limit exceeded %d/%d, pruning %d connection(s)', numConnections, this.maxConnections, toPrune);\n const peerValues = new _libp2p_peer_collections__WEBPACK_IMPORTED_MODULE_1__.PeerMap();\n // work out peer values\n for (const connection of connections) {\n const remotePeer = connection.remotePeer;\n if (peerValues.has(remotePeer)) {\n continue;\n }\n peerValues.set(remotePeer, 0);\n try {\n const peer = await this.peerStore.get(remotePeer);\n // sum all tag values\n peerValues.set(remotePeer, [...peer.tags.values()].reduce((acc, curr) => {\n return acc + curr.value;\n }, 0));\n }\n catch (err) {\n if (err.code !== 'ERR_NOT_FOUND') {\n log.error('error loading peer tags', err);\n }\n }\n }\n // sort by value, lowest to highest\n const sortedConnections = connections.sort((a, b) => {\n const peerAValue = peerValues.get(a.remotePeer) ?? 0;\n const peerBValue = peerValues.get(b.remotePeer) ?? 0;\n if (peerAValue > peerBValue) {\n return 1;\n }\n if (peerAValue < peerBValue) {\n return -1;\n }\n // if the peers have an equal tag value then we want to close short-lived connections first\n const connectionALifespan = a.stat.timeline.open;\n const connectionBLifespan = b.stat.timeline.open;\n if (connectionALifespan < connectionBLifespan) {\n
/***/ }),
/***/ "./node_modules/libp2p/dist/src/connection-manager/constants.js":
/*!**********************************************************************!*\
!*** ./node_modules/libp2p/dist/src/connection-manager/constants.js ***!
\**********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AUTO_DIAL_CONCURRENCY: () => (/* binding */ AUTO_DIAL_CONCURRENCY),\n/* harmony export */ AUTO_DIAL_INTERVAL: () => (/* binding */ AUTO_DIAL_INTERVAL),\n/* harmony export */ AUTO_DIAL_MAX_QUEUE_LENGTH: () => (/* binding */ AUTO_DIAL_MAX_QUEUE_LENGTH),\n/* harmony export */ AUTO_DIAL_PRIORITY: () => (/* binding */ AUTO_DIAL_PRIORITY),\n/* harmony export */ DIAL_TIMEOUT: () => (/* binding */ DIAL_TIMEOUT),\n/* harmony export */ INBOUND_CONNECTION_THRESHOLD: () => (/* binding */ INBOUND_CONNECTION_THRESHOLD),\n/* harmony export */ INBOUND_UPGRADE_TIMEOUT: () => (/* binding */ INBOUND_UPGRADE_TIMEOUT),\n/* harmony export */ MAX_CONNECTIONS: () => (/* binding */ MAX_CONNECTIONS),\n/* harmony export */ MAX_INCOMING_PENDING_CONNECTIONS: () => (/* binding */ MAX_INCOMING_PENDING_CONNECTIONS),\n/* harmony export */ MAX_PARALLEL_DIALS: () => (/* binding */ MAX_PARALLEL_DIALS),\n/* harmony export */ MAX_PARALLEL_DIALS_PER_PEER: () => (/* binding */ MAX_PARALLEL_DIALS_PER_PEER),\n/* harmony export */ MAX_PEER_ADDRS_TO_DIAL: () => (/* binding */ MAX_PEER_ADDRS_TO_DIAL),\n/* harmony export */ MIN_CONNECTIONS: () => (/* binding */ MIN_CONNECTIONS)\n/* harmony export */ });\n/**\n * @see https://libp2p.github.io/js-libp2p/interfaces/index._internal_.ConnectionManagerConfig.html#dialTimeout\n */\nconst DIAL_TIMEOUT = 30e3;\n/**\n * @see https://libp2p.github.io/js-libp2p/interfaces/index._internal_.ConnectionManagerConfig.html#inboundUpgradeTimeout\n */\nconst INBOUND_UPGRADE_TIMEOUT = 30e3;\n/**\n * @see https://libp2p.github.io/js-libp2p/interfaces/index._internal_.ConnectionManagerConfig.html#maxParallelDials\n */\nconst MAX_PARALLEL_DIALS = 100;\n/**\n * @see https://libp2p.github.io/js-libp2p/interfaces/index._internal_.ConnectionManagerConfig.html#maxPeerAddrsToDial\n */\nconst MAX_PEER_ADDRS_TO_DIAL = 25;\n/**\n * @see https://libp2p.github.io/js-libp2p/interfaces/index._internal_.ConnectionManagerConfig.html#maxParallelDialsPerPeer\n */\nconst MAX_PARALLEL_DIALS_PER_PEER = 10;\n/**\n * @see https://libp2p.github.io/js-libp2p/interfaces/index._internal_.ConnectionManagerConfig.html#minConnections\n */\nconst MIN_CONNECTIONS = 50;\n/**\n * @see https://libp2p.github.io/js-libp2p/interfaces/index._internal_.ConnectionManagerConfig.html#maxConnections\n */\nconst MAX_CONNECTIONS = 300;\n/**\n * @see https://libp2p.github.io/js-libp2p/interfaces/index._internal_.ConnectionManagerConfig.html#autoDialInterval\n */\nconst AUTO_DIAL_INTERVAL = 5000;\n/**\n * @see https://libp2p.github.io/js-libp2p/interfaces/index._internal_.ConnectionManagerConfig.html#autoDialConcurrency\n */\nconst AUTO_DIAL_CONCURRENCY = 25;\n/**\n * @see https://libp2p.github.io/js-libp2p/interfaces/index._internal_.ConnectionManagerConfig.html#autoDialPriority\n */\nconst AUTO_DIAL_PRIORITY = 0;\n/**\n * @see https://libp2p.github.io/js-libp2p/interfaces/index._internal_.ConnectionManagerConfig.html#autoDialMaxQueueLength\n */\nconst AUTO_DIAL_MAX_QUEUE_LENGTH = 100;\n/**\n * @see https://libp2p.github.io/js-libp2p/interfaces/index._internal_.ConnectionManagerConfig.html#inboundConnectionThreshold\n */\nconst INBOUND_CONNECTION_THRESHOLD = 5;\n/**\n * @see https://libp2p.github.io/js-libp2p/interfaces/index._internal_.ConnectionManagerConfig.html#maxIncomingPendingConnections\n */\nconst MAX_INCOMING_PENDING_CONNECTIONS = 10;\n//# sourceMappingURL=constants.js.map\n\n//# sourceURL=webpack://light/./node_modules/libp2p/dist/src/connection-manager/constants.js?");
/***/ }),
/***/ "./node_modules/libp2p/dist/src/connection-manager/dial-queue.js":
/*!***********************************************************************!*\
!*** ./node_modules/libp2p/dist/src/connection-manager/dial-queue.js ***!
\***********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DialQueue: () => (/* binding */ DialQueue)\n/* harmony export */ });\n/* harmony import */ var events__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! events */ \"./node_modules/events/events.js\");\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n/* harmony import */ var _libp2p_logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @libp2p/logger */ \"./node_modules/@libp2p/logger/dist/src/index.js\");\n/* harmony import */ var _libp2p_utils_address_sort__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @libp2p/utils/address-sort */ \"./node_modules/@libp2p/utils/dist/src/address-sort.js\");\n/* harmony import */ var _multiformats_multiaddr__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @multiformats/multiaddr */ \"./node_modules/@multiformats/multiaddr/dist/src/index.js\");\n/* harmony import */ var _multiformats_multiaddr_resolvers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @multiformats/multiaddr/resolvers */ \"./node_modules/@multiformats/multiaddr/dist/src/resolvers/index.js\");\n/* harmony import */ var any_signal__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! any-signal */ \"./node_modules/any-signal/dist/src/index.js\");\n/* harmony import */ var p_defer__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! p-defer */ \"./node_modules/p-defer/index.js\");\n/* harmony import */ var p_queue__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! p-queue */ \"./node_modules/p-queue/dist/index.js\");\n/* harmony import */ var _errors_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../errors.js */ \"./node_modules/libp2p/dist/src/errors.js\");\n/* harmony import */ var _get_peer_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../get-peer.js */ \"./node_modules/libp2p/dist/src/get-peer.js\");\n/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./constants.js */ \"./node_modules/libp2p/dist/src/connection-manager/constants.js\");\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./utils.js */ \"./node_modules/libp2p/dist/src/connection-manager/utils.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst log = (0,_libp2p_logger__WEBPACK_IMPORTED_MODULE_2__.logger)('libp2p:connection-manager:dial-queue');\nconst defaultOptions = {\n addressSorter: _libp2p_utils_address_sort__WEBPACK_IMPORTED_MODULE_3__.publicAddressesFirst,\n maxParallelDials: _constants_js__WEBPACK_IMPORTED_MODULE_11__.MAX_PARALLEL_DIALS,\n maxPeerAddrsToDial: _constants_js__WEBPACK_IMPORTED_MODULE_11__.MAX_PEER_ADDRS_TO_DIAL,\n maxParallelDialsPerPeer: _constants_js__WEBPACK_IMPORTED_MODULE_11__.MAX_PARALLEL_DIALS_PER_PEER,\n dialTimeout: _constants_js__WEBPACK_IMPORTED_MODULE_11__.DIAL_TIMEOUT,\n resolvers: {\n dnsaddr: _multiformats_multiaddr_resolvers__WEBPACK_IMPORTED_MODULE_5__.dnsaddrResolver\n }\n};\nclass DialQueue {\n pendingDials;\n queue;\n peerId;\n peerStore;\n connectionGater;\n transportManager;\n addressSorter;\n maxPeerAddrsToDial;\n maxParallelDialsPerPeer;\n dialTimeout;\n inProgressDialCount;\n pendingDialCount;\n shutDownController;\n constructor(components, init = {}) {\n this.addressSorter = init.addressSorter ?? defaultOptions.addressSorter;\n this.maxPeerAddrsToDial = init.maxPeerAddrsToDial ?? defaultOptions.maxPeerAddrsToDial;\n this.maxParallelDialsPerPeer = init.maxParallelDialsPerPeer ?? defaultOptions.maxParallelDialsPerPeer;\n this.dialTimeout = init.dialTimeout ?? defaultOptions.dialTimeout;\n this.peerId = components.peerId;\n this.peerStore = components.peerStore;\n this.connectionGater = components.connectionGater;\n this.transportManager = components.transportManager;\n
/***/ }),
/***/ "./node_modules/libp2p/dist/src/connection-manager/index.js":
/*!******************************************************************!*\
!*** ./node_modules/libp2p/dist/src/connection-manager/index.js ***!
\******************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DefaultConnectionManager: () => (/* binding */ DefaultConnectionManager)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interface_peer_store_tags__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interface-peer-store/tags */ \"./node_modules/@libp2p/interface-peer-store/dist/src/tags.js\");\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n/* harmony import */ var _libp2p_logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @libp2p/logger */ \"./node_modules/@libp2p/logger/dist/src/index.js\");\n/* harmony import */ var _libp2p_peer_collections__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @libp2p/peer-collections */ \"./node_modules/@libp2p/peer-collections/dist/src/index.js\");\n/* harmony import */ var _libp2p_utils_address_sort__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @libp2p/utils/address-sort */ \"./node_modules/@libp2p/utils/dist/src/address-sort.js\");\n/* harmony import */ var _multiformats_multiaddr__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @multiformats/multiaddr */ \"./node_modules/@multiformats/multiaddr/dist/src/index.js\");\n/* harmony import */ var _multiformats_multiaddr_resolvers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @multiformats/multiaddr/resolvers */ \"./node_modules/@multiformats/multiaddr/dist/src/resolvers/index.js\");\n/* harmony import */ var rate_limiter_flexible__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rate-limiter-flexible */ \"./node_modules/rate-limiter-flexible/index.js\");\n/* harmony import */ var _errors_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../errors.js */ \"./node_modules/libp2p/dist/src/errors.js\");\n/* harmony import */ var _get_peer_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../get-peer.js */ \"./node_modules/libp2p/dist/src/get-peer.js\");\n/* harmony import */ var _auto_dial_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./auto-dial.js */ \"./node_modules/libp2p/dist/src/connection-manager/auto-dial.js\");\n/* harmony import */ var _connection_pruner_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./connection-pruner.js */ \"./node_modules/libp2p/dist/src/connection-manager/connection-pruner.js\");\n/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./constants.js */ \"./node_modules/libp2p/dist/src/connection-manager/constants.js\");\n/* harmony import */ var _dial_queue_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./dial-queue.js */ \"./node_modules/libp2p/dist/src/connection-manager/dial-queue.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst log = (0,_libp2p_logger__WEBPACK_IMPORTED_MODULE_2__.logger)('libp2p:connection-manager');\nconst DEFAULT_DIAL_PRIORITY = 50;\nconst defaultOptions = {\n minConnections: _constants_js__WEBPACK_IMPORTED_MODULE_12__.MIN_CONNECTIONS,\n maxConnections: _constants_js__WEBPACK_IMPORTED_MODULE_12__.MAX_CONNECTIONS,\n inboundConnectionThreshold: _constants_js__WEBPACK_IMPORTED_MODULE_12__.INBOUND_CONNECTION_THRESHOLD,\n maxIncomingPendingConnections: _constants_js__WEBPACK_IMPORTED_MODULE_12__.MAX_INCOMING_PENDING_CONNECTIONS,\n autoDialConcurrency: _constants_js__WEBPACK_IMPORTED_MODULE_12__.AUTO_DIAL_CONCURRENCY,\n autoDialPriority: _constants_js__WEBPACK_IMPORTED_MODULE_12__.AUTO_DIAL_PRIORITY,\n autoDialMaxQueueLength: _constants_js__WEBPACK_IMPORTED_MODULE_12__.AUTO_DIAL_MAX_QUEUE_LENGTH\n};\n/**\n * Responsible for managing known connections.\n */\nclass DefaultConnectionManager {\n started;\n connections;\n allow;\n deny;\n maxIncomingPendingConnections;\n incomingPendingConnections;\n maxConnections;\n dialQueue;\n autoDial;\n connectionPruner;\n inboundConnectionRateLimiter;\n peerStore;\n
/***/ }),
/***/ "./node_modules/libp2p/dist/src/connection-manager/utils.js":
/*!******************************************************************!*\
!*** ./node_modules/libp2p/dist/src/connection-manager/utils.js ***!
\******************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ combineSignals: () => (/* binding */ combineSignals),\n/* harmony export */ resolveMultiaddrs: () => (/* binding */ resolveMultiaddrs)\n/* harmony export */ });\n/* harmony import */ var events__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! events */ \"./node_modules/events/events.js\");\n/* harmony import */ var _libp2p_logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/logger */ \"./node_modules/@libp2p/logger/dist/src/index.js\");\n/* harmony import */ var _multiformats_multiaddr__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @multiformats/multiaddr */ \"./node_modules/@multiformats/multiaddr/dist/src/index.js\");\n/* harmony import */ var any_signal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! any-signal */ \"./node_modules/any-signal/dist/src/index.js\");\n\n\n\n\nconst log = (0,_libp2p_logger__WEBPACK_IMPORTED_MODULE_1__.logger)('libp2p:connection-manager:utils');\n/**\n * Resolve multiaddr recursively\n */\nasync function resolveMultiaddrs(ma, options) {\n // TODO: recursive logic should live in multiaddr once dns4/dns6 support is in place\n // Now only supporting resolve for dnsaddr\n const resolvableProto = ma.protoNames().includes('dnsaddr');\n // Multiaddr is not resolvable? End recursion!\n if (!resolvableProto) {\n return [ma];\n }\n const resolvedMultiaddrs = await resolveRecord(ma, options);\n const recursiveMultiaddrs = await Promise.all(resolvedMultiaddrs.map(async (nm) => {\n return resolveMultiaddrs(nm, options);\n }));\n const addrs = recursiveMultiaddrs.flat();\n const output = addrs.reduce((array, newM) => {\n if (array.find(m => m.equals(newM)) == null) {\n array.push(newM);\n }\n return array;\n }, ([]));\n log('resolved %s to', ma, output.map(ma => ma.toString()));\n return output;\n}\n/**\n * Resolve a given multiaddr. If this fails, an empty array will be returned\n */\nasync function resolveRecord(ma, options) {\n try {\n ma = (0,_multiformats_multiaddr__WEBPACK_IMPORTED_MODULE_2__.multiaddr)(ma.toString()); // Use current multiaddr module\n const multiaddrs = await ma.resolve(options);\n return multiaddrs;\n }\n catch (err) {\n log.error(`multiaddr ${ma.toString()} could not be resolved`, err);\n return [];\n }\n}\nfunction combineSignals(...signals) {\n const sigs = [];\n for (const sig of signals) {\n if (sig != null) {\n try {\n // fails on node < 15.4\n (0,events__WEBPACK_IMPORTED_MODULE_0__.setMaxListeners)?.(Infinity, sig);\n }\n catch { }\n sigs.push(sig);\n }\n }\n // let any signal abort the dial\n const signal = (0,any_signal__WEBPACK_IMPORTED_MODULE_3__.anySignal)(sigs);\n try {\n // fails on node < 15.4\n (0,events__WEBPACK_IMPORTED_MODULE_0__.setMaxListeners)?.(Infinity, signal);\n }\n catch { }\n return signal;\n}\n//# sourceMappingURL=utils.js.map\n\n//# sourceURL=webpack://light/./node_modules/libp2p/dist/src/connection-manager/utils.js?");
/***/ }),
/***/ "./node_modules/libp2p/dist/src/connection/index.js":
/*!**********************************************************!*\
!*** ./node_modules/libp2p/dist/src/connection/index.js ***!
\**********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ConnectionImpl: () => (/* binding */ ConnectionImpl),\n/* harmony export */ createConnection: () => (/* binding */ createConnection)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interface_connection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interface-connection */ \"./node_modules/@libp2p/interface-connection/dist/src/index.js\");\n/* harmony import */ var _libp2p_interface_connection_status__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/interface-connection/status */ \"./node_modules/@libp2p/interface-connection/dist/src/status.js\");\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n/* harmony import */ var _libp2p_logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @libp2p/logger */ \"./node_modules/@libp2p/logger/dist/src/index.js\");\n\n\n\n\nconst log = (0,_libp2p_logger__WEBPACK_IMPORTED_MODULE_3__.logger)('libp2p:connection');\n/**\n * An implementation of the js-libp2p connection.\n * Any libp2p transport should use an upgrader to return this connection.\n */\nclass ConnectionImpl {\n /**\n * Connection identifier.\n */\n id;\n /**\n * Observed multiaddr of the remote peer\n */\n remoteAddr;\n /**\n * Remote peer id\n */\n remotePeer;\n /**\n * Connection metadata\n */\n stat;\n /**\n * User provided tags\n *\n */\n tags;\n /**\n * Reference to the new stream function of the multiplexer\n */\n _newStream;\n /**\n * Reference to the close function of the raw connection\n */\n _close;\n /**\n * Reference to the getStreams function of the muxer\n */\n _getStreams;\n _closing;\n /**\n * An implementation of the js-libp2p connection.\n * Any libp2p transport should use an upgrader to return this connection.\n */\n constructor(init) {\n const { remoteAddr, remotePeer, newStream, close, getStreams, stat } = init;\n this.id = `${(parseInt(String(Math.random() * 1e9))).toString(36)}${Date.now()}`;\n this.remoteAddr = remoteAddr;\n this.remotePeer = remotePeer;\n this.stat = {\n ...stat,\n status: _libp2p_interface_connection_status__WEBPACK_IMPORTED_MODULE_1__.OPEN\n };\n this._newStream = newStream;\n this._close = close;\n this._getStreams = getStreams;\n this.tags = [];\n this._closing = false;\n }\n [Symbol.toStringTag] = 'Connection';\n [_libp2p_interface_connection__WEBPACK_IMPORTED_MODULE_0__.symbol] = true;\n /**\n * Get all the streams of the muxer\n */\n get streams() {\n return this._getStreams();\n }\n /**\n * Create a new stream from this connection\n */\n async newStream(protocols, options) {\n if (this.stat.status === _libp2p_interface_connection_status__WEBPACK_IMPORTED_MODULE_1__.CLOSING) {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_2__.CodeError('the connection is being closed', 'ERR_CONNECTION_BEING_CLOSED');\n }\n if (this.stat.status === _libp2p_interface_connection_status__WEBPACK_IMPORTED_MODULE_1__.CLOSED) {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_2__.CodeError('the connection is closed', 'ERR_CONNECTION_CLOSED');\n }\n if (!Array.isArray(protocols)) {\n protocols = [protocols];\n }\n const stream = await this._newStream(protocols, options);\n stream.stat.direction = 'outbound';\n return stream;\n }\n /**\n * Add a stream when it is opened to the registry\n */\n addStream(stream) {\n stream.stat.direction = 'inbound';\n }\n /**\n * Remove stream registry after it is closed\n */\n removeStream(id) {
/***/ }),
/***/ "./node_modules/libp2p/dist/src/content-routing/index.js":
/*!***************************************************************!*\
!*** ./node_modules/libp2p/dist/src/content-routing/index.js ***!
\***************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ CompoundContentRouting: () => (/* binding */ CompoundContentRouting)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n/* harmony import */ var it_merge__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! it-merge */ \"./node_modules/it-merge/dist/src/index.js\");\n/* harmony import */ var it_pipe__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! it-pipe */ \"./node_modules/it-pipe/dist/src/index.js\");\n/* harmony import */ var _errors_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../errors.js */ \"./node_modules/libp2p/dist/src/errors.js\");\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils.js */ \"./node_modules/libp2p/dist/src/content-routing/utils.js\");\n\n\n\n\n\nclass CompoundContentRouting {\n routers;\n started;\n components;\n constructor(components, init) {\n this.routers = init.routers ?? [];\n this.started = false;\n this.components = components;\n }\n isStarted() {\n return this.started;\n }\n async start() {\n this.started = true;\n }\n async stop() {\n this.started = false;\n }\n /**\n * Iterates over all content routers in parallel to find providers of the given key\n */\n async *findProviders(key, options = {}) {\n if (this.routers.length === 0) {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__.CodeError('No content routers available', _errors_js__WEBPACK_IMPORTED_MODULE_3__.codes.ERR_NO_ROUTERS_AVAILABLE);\n }\n yield* (0,it_pipe__WEBPACK_IMPORTED_MODULE_2__.pipe)((0,it_merge__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(...this.routers.map(router => router.findProviders(key, options))), (source) => (0,_utils_js__WEBPACK_IMPORTED_MODULE_4__.storeAddresses)(source, this.components.peerStore), (source) => (0,_utils_js__WEBPACK_IMPORTED_MODULE_4__.uniquePeers)(source), (source) => (0,_utils_js__WEBPACK_IMPORTED_MODULE_4__.requirePeers)(source));\n }\n /**\n * Iterates over all content routers in parallel to notify it is\n * a provider of the given key\n */\n async provide(key, options = {}) {\n if (this.routers.length === 0) {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__.CodeError('No content routers available', _errors_js__WEBPACK_IMPORTED_MODULE_3__.codes.ERR_NO_ROUTERS_AVAILABLE);\n }\n await Promise.all(this.routers.map(async (router) => { await router.provide(key, options); }));\n }\n /**\n * Store the given key/value pair in the available content routings\n */\n async put(key, value, options) {\n if (!this.isStarted()) {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__.CodeError(_errors_js__WEBPACK_IMPORTED_MODULE_3__.messages.NOT_STARTED_YET, _errors_js__WEBPACK_IMPORTED_MODULE_3__.codes.DHT_NOT_STARTED);\n }\n await Promise.all(this.routers.map(async (router) => {\n await router.put(key, value, options);\n }));\n }\n /**\n * Get the value to the given key.\n * Times out after 1 minute by default.\n */\n async get(key, options) {\n if (!this.isStarted()) {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__.CodeError(_errors_js__WEBPACK_IMPORTED_MODULE_3__.messages.NOT_STARTED_YET, _errors_js__WEBPACK_IMPORTED_MODULE_3__.codes.DHT_NOT_STARTED);\n }\n return Promise.any(this.routers.map(async (router) => {\n return router.get(key, options);\n }));\n }\n}\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/libp2p/dist/src/content-routing/index.js?");
/***/ }),
/***/ "./node_modules/libp2p/dist/src/content-routing/utils.js":
/*!***************************************************************!*\
!*** ./node_modules/libp2p/dist/src/content-routing/utils.js ***!
\***************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ requirePeers: () => (/* binding */ requirePeers),\n/* harmony export */ storeAddresses: () => (/* binding */ storeAddresses),\n/* harmony export */ uniquePeers: () => (/* binding */ uniquePeers)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n/* harmony import */ var it_filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! it-filter */ \"./node_modules/it-filter/dist/src/index.js\");\n/* harmony import */ var it_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! it-map */ \"./node_modules/it-map/dist/src/index.js\");\n\n\n\n/**\n * Store the multiaddrs from every peer in the passed peer store\n */\nasync function* storeAddresses(source, peerStore) {\n yield* (0,it_map__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(source, async (peer) => {\n // ensure we have the addresses for a given peer\n await peerStore.merge(peer.id, {\n multiaddrs: peer.multiaddrs\n });\n return peer;\n });\n}\n/**\n * Filter peers by unique peer id\n */\nfunction uniquePeers(source) {\n /** @type Set<string> */\n const seen = new Set();\n return (0,it_filter__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(source, (peer) => {\n // dedupe by peer id\n if (seen.has(peer.id.toString())) {\n return false;\n }\n seen.add(peer.id.toString());\n return true;\n });\n}\n/**\n * Require at least `min` peers to be yielded from `source`\n */\nasync function* requirePeers(source, min = 1) {\n let seen = 0;\n for await (const peer of source) {\n seen++;\n yield peer;\n }\n if (seen < min) {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__.CodeError(`more peers required, seen: ${seen} min: ${min}`, 'NOT_FOUND');\n }\n}\n//# sourceMappingURL=utils.js.map\n\n//# sourceURL=webpack://light/./node_modules/libp2p/dist/src/content-routing/utils.js?");
/***/ }),
/***/ "./node_modules/libp2p/dist/src/errors.js":
/*!************************************************!*\
!*** ./node_modules/libp2p/dist/src/errors.js ***!
\************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ codes: () => (/* binding */ codes),\n/* harmony export */ messages: () => (/* binding */ messages)\n/* harmony export */ });\nvar messages;\n(function (messages) {\n messages[\"NOT_STARTED_YET\"] = \"The libp2p node is not started yet\";\n messages[\"DHT_DISABLED\"] = \"DHT is not available\";\n messages[\"PUBSUB_DISABLED\"] = \"PubSub is not available\";\n messages[\"CONN_ENCRYPTION_REQUIRED\"] = \"At least one connection encryption module is required\";\n messages[\"ERR_TRANSPORTS_REQUIRED\"] = \"At least one transport module is required\";\n messages[\"ERR_PROTECTOR_REQUIRED\"] = \"Private network is enforced, but no protector was provided\";\n messages[\"NOT_FOUND\"] = \"Not found\";\n})(messages || (messages = {}));\nvar codes;\n(function (codes) {\n codes[\"DHT_DISABLED\"] = \"ERR_DHT_DISABLED\";\n codes[\"ERR_PUBSUB_DISABLED\"] = \"ERR_PUBSUB_DISABLED\";\n codes[\"PUBSUB_NOT_STARTED\"] = \"ERR_PUBSUB_NOT_STARTED\";\n codes[\"DHT_NOT_STARTED\"] = \"ERR_DHT_NOT_STARTED\";\n codes[\"CONN_ENCRYPTION_REQUIRED\"] = \"ERR_CONN_ENCRYPTION_REQUIRED\";\n codes[\"ERR_TRANSPORTS_REQUIRED\"] = \"ERR_TRANSPORTS_REQUIRED\";\n codes[\"ERR_PROTECTOR_REQUIRED\"] = \"ERR_PROTECTOR_REQUIRED\";\n codes[\"ERR_PEER_DIAL_INTERCEPTED\"] = \"ERR_PEER_DIAL_INTERCEPTED\";\n codes[\"ERR_CONNECTION_INTERCEPTED\"] = \"ERR_CONNECTION_INTERCEPTED\";\n codes[\"ERR_INVALID_PROTOCOLS_FOR_STREAM\"] = \"ERR_INVALID_PROTOCOLS_FOR_STREAM\";\n codes[\"ERR_CONNECTION_ENDED\"] = \"ERR_CONNECTION_ENDED\";\n codes[\"ERR_CONNECTION_FAILED\"] = \"ERR_CONNECTION_FAILED\";\n codes[\"ERR_NODE_NOT_STARTED\"] = \"ERR_NODE_NOT_STARTED\";\n codes[\"ERR_ALREADY_ABORTED\"] = \"ERR_ALREADY_ABORTED\";\n codes[\"ERR_TOO_MANY_ADDRESSES\"] = \"ERR_TOO_MANY_ADDRESSES\";\n codes[\"ERR_NO_VALID_ADDRESSES\"] = \"ERR_NO_VALID_ADDRESSES\";\n codes[\"ERR_RELAYED_DIAL\"] = \"ERR_RELAYED_DIAL\";\n codes[\"ERR_DIALED_SELF\"] = \"ERR_DIALED_SELF\";\n codes[\"ERR_DISCOVERED_SELF\"] = \"ERR_DISCOVERED_SELF\";\n codes[\"ERR_DUPLICATE_TRANSPORT\"] = \"ERR_DUPLICATE_TRANSPORT\";\n codes[\"ERR_ENCRYPTION_FAILED\"] = \"ERR_ENCRYPTION_FAILED\";\n codes[\"ERR_HOP_REQUEST_FAILED\"] = \"ERR_HOP_REQUEST_FAILED\";\n codes[\"ERR_INVALID_KEY\"] = \"ERR_INVALID_KEY\";\n codes[\"ERR_INVALID_MESSAGE\"] = \"ERR_INVALID_MESSAGE\";\n codes[\"ERR_INVALID_PARAMETERS\"] = \"ERR_INVALID_PARAMETERS\";\n codes[\"ERR_INVALID_PEER\"] = \"ERR_INVALID_PEER\";\n codes[\"ERR_MUXER_UNAVAILABLE\"] = \"ERR_MUXER_UNAVAILABLE\";\n codes[\"ERR_NOT_FOUND\"] = \"ERR_NOT_FOUND\";\n codes[\"ERR_TIMEOUT\"] = \"ERR_TIMEOUT\";\n codes[\"ERR_TRANSPORT_UNAVAILABLE\"] = \"ERR_TRANSPORT_UNAVAILABLE\";\n codes[\"ERR_TRANSPORT_DIAL_FAILED\"] = \"ERR_TRANSPORT_DIAL_FAILED\";\n codes[\"ERR_UNSUPPORTED_PROTOCOL\"] = \"ERR_UNSUPPORTED_PROTOCOL\";\n codes[\"ERR_PROTOCOL_HANDLER_ALREADY_REGISTERED\"] = \"ERR_PROTOCOL_HANDLER_ALREADY_REGISTERED\";\n codes[\"ERR_INVALID_MULTIADDR\"] = \"ERR_INVALID_MULTIADDR\";\n codes[\"ERR_SIGNATURE_NOT_VALID\"] = \"ERR_SIGNATURE_NOT_VALID\";\n codes[\"ERR_FIND_SELF\"] = \"ERR_FIND_SELF\";\n codes[\"ERR_NO_ROUTERS_AVAILABLE\"] = \"ERR_NO_ROUTERS_AVAILABLE\";\n codes[\"ERR_CONNECTION_NOT_MULTIPLEXED\"] = \"ERR_CONNECTION_NOT_MULTIPLEXED\";\n codes[\"ERR_NO_DIAL_TOKENS\"] = \"ERR_NO_DIAL_TOKENS\";\n codes[\"ERR_KEYCHAIN_REQUIRED\"] = \"ERR_KEYCHAIN_REQUIRED\";\n codes[\"ERR_INVALID_CMS\"] = \"ERR_INVALID_CMS\";\n codes[\"ERR_MISSING_KEYS\"] = \"ERR_MISSING_KEYS\";\n codes[\"ERR_NO_KEY\"] = \"ERR_NO_KEY\";\n codes[\"ERR_INVALID_KEY_NAME\"] = \"ERR_INVALID_KEY_NAME\";\n codes[\"ERR_INVALID_KEY_TYPE\"] = \"ERR_INVALID_KEY_TYPE\";\n codes[\"ERR_KEY_ALREADY_EXISTS\"] = \"ERR_KEY_ALREADY_EXISTS\";\n codes[\"ERR_INVALID_KEY_SIZE\"] = \"ERR_INVALID_KEY_SIZE\";\n codes[\"ERR_KEY_NOT_FOUND\"] = \"ERR_KEY_NOT_FOUND\";
/***/ }),
/***/ "./node_modules/libp2p/dist/src/get-peer.js":
/*!**************************************************!*\
!*** ./node_modules/libp2p/dist/src/get-peer.js ***!
\**************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ getPeerAddress: () => (/* binding */ getPeerAddress)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interface_peer_id__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interface-peer-id */ \"./node_modules/@libp2p/interface-peer-id/dist/src/index.js\");\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n/* harmony import */ var _libp2p_logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @libp2p/logger */ \"./node_modules/@libp2p/logger/dist/src/index.js\");\n/* harmony import */ var _libp2p_peer_id__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @libp2p/peer-id */ \"./node_modules/@libp2p/peer-id/dist/src/index.js\");\n/* harmony import */ var _multiformats_multiaddr__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @multiformats/multiaddr */ \"./node_modules/@multiformats/multiaddr/dist/src/index.js\");\n/* harmony import */ var _errors_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./errors.js */ \"./node_modules/libp2p/dist/src/errors.js\");\n\n\n\n\n\n\nconst log = (0,_libp2p_logger__WEBPACK_IMPORTED_MODULE_2__.logger)('libp2p:get-peer');\n/**\n * Extracts a PeerId and/or multiaddr from the passed PeerId or Multiaddr or an array of Multiaddrs\n */\nfunction getPeerAddress(peer) {\n if ((0,_libp2p_interface_peer_id__WEBPACK_IMPORTED_MODULE_0__.isPeerId)(peer)) {\n return { peerId: peer, multiaddrs: [] };\n }\n if (!Array.isArray(peer)) {\n peer = [peer];\n }\n let peerId;\n if (peer.length > 0) {\n const peerIdStr = peer[0].getPeerId();\n peerId = peerIdStr == null ? undefined : (0,_libp2p_peer_id__WEBPACK_IMPORTED_MODULE_3__.peerIdFromString)(peerIdStr);\n // ensure PeerId is either not set or is consistent\n peer.forEach(ma => {\n if (!(0,_multiformats_multiaddr__WEBPACK_IMPORTED_MODULE_4__.isMultiaddr)(ma)) {\n log.error('multiaddr %s was invalid', ma);\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_1__.CodeError('Invalid Multiaddr', _errors_js__WEBPACK_IMPORTED_MODULE_5__.codes.ERR_INVALID_MULTIADDR);\n }\n const maPeerIdStr = ma.getPeerId();\n if (maPeerIdStr == null) {\n if (peerId != null) {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_1__.CodeError('Multiaddrs must all have the same peer id or have no peer id', _errors_js__WEBPACK_IMPORTED_MODULE_5__.codes.ERR_INVALID_PARAMETERS);\n }\n }\n else {\n const maPeerId = (0,_libp2p_peer_id__WEBPACK_IMPORTED_MODULE_3__.peerIdFromString)(maPeerIdStr);\n if (peerId == null || !peerId.equals(maPeerId)) {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_1__.CodeError('Multiaddrs must all have the same peer id or have no peer id', _errors_js__WEBPACK_IMPORTED_MODULE_5__.codes.ERR_INVALID_PARAMETERS);\n }\n }\n });\n }\n return {\n peerId,\n multiaddrs: peer\n };\n}\n//# sourceMappingURL=get-peer.js.map\n\n//# sourceURL=webpack://light/./node_modules/libp2p/dist/src/get-peer.js?");
/***/ }),
/***/ "./node_modules/libp2p/dist/src/identify/consts.js":
/*!*********************************************************!*\
!*** ./node_modules/libp2p/dist/src/identify/consts.js ***!
\*********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AGENT_VERSION: () => (/* binding */ AGENT_VERSION),\n/* harmony export */ IDENTIFY_PROTOCOL_VERSION: () => (/* binding */ IDENTIFY_PROTOCOL_VERSION),\n/* harmony export */ MULTICODEC_IDENTIFY: () => (/* binding */ MULTICODEC_IDENTIFY),\n/* harmony export */ MULTICODEC_IDENTIFY_PROTOCOL_NAME: () => (/* binding */ MULTICODEC_IDENTIFY_PROTOCOL_NAME),\n/* harmony export */ MULTICODEC_IDENTIFY_PROTOCOL_VERSION: () => (/* binding */ MULTICODEC_IDENTIFY_PROTOCOL_VERSION),\n/* harmony export */ MULTICODEC_IDENTIFY_PUSH: () => (/* binding */ MULTICODEC_IDENTIFY_PUSH),\n/* harmony export */ MULTICODEC_IDENTIFY_PUSH_PROTOCOL_NAME: () => (/* binding */ MULTICODEC_IDENTIFY_PUSH_PROTOCOL_NAME),\n/* harmony export */ MULTICODEC_IDENTIFY_PUSH_PROTOCOL_VERSION: () => (/* binding */ MULTICODEC_IDENTIFY_PUSH_PROTOCOL_VERSION),\n/* harmony export */ PROTOCOL_VERSION: () => (/* binding */ PROTOCOL_VERSION)\n/* harmony export */ });\n/* harmony import */ var _version_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../version.js */ \"./node_modules/libp2p/dist/src/version.js\");\n\nconst PROTOCOL_VERSION = 'ipfs/0.1.0'; // deprecated\nconst AGENT_VERSION = `js-libp2p/${_version_js__WEBPACK_IMPORTED_MODULE_0__.version}`;\nconst MULTICODEC_IDENTIFY = '/ipfs/id/1.0.0'; // deprecated\nconst MULTICODEC_IDENTIFY_PUSH = '/ipfs/id/push/1.0.0'; // deprecated\nconst IDENTIFY_PROTOCOL_VERSION = '0.1.0';\nconst MULTICODEC_IDENTIFY_PROTOCOL_NAME = 'id';\nconst MULTICODEC_IDENTIFY_PUSH_PROTOCOL_NAME = 'id/push';\nconst MULTICODEC_IDENTIFY_PROTOCOL_VERSION = '1.0.0';\nconst MULTICODEC_IDENTIFY_PUSH_PROTOCOL_VERSION = '1.0.0';\n//# sourceMappingURL=consts.js.map\n\n//# sourceURL=webpack://light/./node_modules/libp2p/dist/src/identify/consts.js?");
/***/ }),
/***/ "./node_modules/libp2p/dist/src/identify/identify.js":
/*!***********************************************************!*\
!*** ./node_modules/libp2p/dist/src/identify/identify.js ***!
\***********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DefaultIdentifyService: () => (/* binding */ DefaultIdentifyService)\n/* harmony export */ });\n/* harmony import */ var events__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! events */ \"./node_modules/events/events.js\");\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n/* harmony import */ var _libp2p_logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @libp2p/logger */ \"./node_modules/@libp2p/logger/dist/src/index.js\");\n/* harmony import */ var _libp2p_peer_id__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @libp2p/peer-id */ \"./node_modules/@libp2p/peer-id/dist/src/index.js\");\n/* harmony import */ var _libp2p_peer_record__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @libp2p/peer-record */ \"./node_modules/@libp2p/peer-record/dist/src/index.js\");\n/* harmony import */ var _multiformats_multiaddr__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @multiformats/multiaddr */ \"./node_modules/@multiformats/multiaddr/dist/src/index.js\");\n/* harmony import */ var abortable_iterator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! abortable-iterator */ \"./node_modules/abortable-iterator/dist/src/index.js\");\n/* harmony import */ var any_signal__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! any-signal */ \"./node_modules/any-signal/dist/src/index.js\");\n/* harmony import */ var it_first__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! it-first */ \"./node_modules/it-first/dist/src/index.js\");\n/* harmony import */ var it_length_prefixed__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! it-length-prefixed */ \"./node_modules/it-length-prefixed/dist/src/index.js\");\n/* harmony import */ var it_pb_stream__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! it-pb-stream */ \"./node_modules/it-pb-stream/dist/src/index.js\");\n/* harmony import */ var it_pipe__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! it-pipe */ \"./node_modules/it-pipe/dist/src/index.js\");\n/* harmony import */ var uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! uint8arrays/from-string */ \"./node_modules/uint8arrays/dist/src/from-string.js\");\n/* harmony import */ var uint8arrays_to_string__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! uint8arrays/to-string */ \"./node_modules/uint8arrays/dist/src/to-string.js\");\n/* harmony import */ var wherearewe__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! wherearewe */ \"./node_modules/wherearewe/src/index.js\");\n/* harmony import */ var _errors_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../errors.js */ \"./node_modules/libp2p/dist/src/errors.js\");\n/* harmony import */ var _consts_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./consts.js */ \"./node_modules/libp2p/dist/src/identify/consts.js\");\n/* harmony import */ var _pb_message_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./pb/message.js */ \"./node_modules/libp2p/dist/src/identify/pb/message.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst log = (0,_libp2p_logger__WEBPACK_IMPORTED_MODULE_2__.logger)('libp2p:identify');\n// https://github.com/libp2p/go-libp2p/blob/8d2e54e1637041d5cf4fac1e531287560bd1f4ac/p2p/protocol/identify/id.go#L52\nconst MAX_IDENTIFY_MESSAGE_SIZE = 1024 * 8;\nconst defaultValues = {\n protocolPrefix: 'ipfs',\n agentVersion: _consts_js__WEBPACK_IMPORTED_MODULE_16__.AGENT_VERSION,\n // https://github.com/libp2p/go-libp2p/blob/8d2e54e1637041d5cf4fac1e531287560bd1f4ac/p2p/protocol/identify/id.go#L48\n timeout: 60000,\n maxInboundStreams: 1,\n maxOutboundStreams: 1,\n maxPushIncomingStreams: 1,\n maxPushOutgoingStreams: 1,\n maxObservedAddresses: 10,\n maxIdentifyMessageSize: 8192\n};\nclass DefaultIdentifyService {\n identifyProtocolStr;\n id
/***/ }),
/***/ "./node_modules/libp2p/dist/src/identify/index.js":
/*!********************************************************!*\
!*** ./node_modules/libp2p/dist/src/identify/index.js ***!
\********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Message: () => (/* binding */ Message),\n/* harmony export */ identifyService: () => (/* binding */ identifyService),\n/* harmony export */ multicodecs: () => (/* binding */ multicodecs)\n/* harmony export */ });\n/* harmony import */ var _consts_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./consts.js */ \"./node_modules/libp2p/dist/src/identify/consts.js\");\n/* harmony import */ var _identify_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./identify.js */ \"./node_modules/libp2p/dist/src/identify/identify.js\");\n/* harmony import */ var _pb_message_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./pb/message.js */ \"./node_modules/libp2p/dist/src/identify/pb/message.js\");\n\n\n\n/**\n * The protocols the IdentifyService supports\n */\nconst multicodecs = {\n IDENTIFY: _consts_js__WEBPACK_IMPORTED_MODULE_0__.MULTICODEC_IDENTIFY,\n IDENTIFY_PUSH: _consts_js__WEBPACK_IMPORTED_MODULE_0__.MULTICODEC_IDENTIFY_PUSH\n};\nconst Message = { Identify: _pb_message_js__WEBPACK_IMPORTED_MODULE_2__.Identify };\nfunction identifyService(init = {}) {\n return (components) => new _identify_js__WEBPACK_IMPORTED_MODULE_1__.DefaultIdentifyService(components, init);\n}\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/libp2p/dist/src/identify/index.js?");
/***/ }),
/***/ "./node_modules/libp2p/dist/src/identify/pb/message.js":
/*!*************************************************************!*\
!*** ./node_modules/libp2p/dist/src/identify/pb/message.js ***!
\*************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Identify: () => (/* binding */ Identify)\n/* harmony export */ });\n/* harmony import */ var protons_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! protons-runtime */ \"./node_modules/protons-runtime/dist/src/index.js\");\n/* eslint-disable import/export */\n/* eslint-disable complexity */\n/* eslint-disable @typescript-eslint/no-namespace */\n/* eslint-disable @typescript-eslint/no-unnecessary-boolean-literal-compare */\n/* eslint-disable @typescript-eslint/no-empty-interface */\n\nvar Identify;\n(function (Identify) {\n let _codec;\n Identify.codec = () => {\n if (_codec == null) {\n _codec = (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.message)((obj, w, opts = {}) => {\n if (opts.lengthDelimited !== false) {\n w.fork();\n }\n if (obj.protocolVersion != null) {\n w.uint32(42);\n w.string(obj.protocolVersion);\n }\n if (obj.agentVersion != null) {\n w.uint32(50);\n w.string(obj.agentVersion);\n }\n if (obj.publicKey != null) {\n w.uint32(10);\n w.bytes(obj.publicKey);\n }\n if (obj.listenAddrs != null) {\n for (const value of obj.listenAddrs) {\n w.uint32(18);\n w.bytes(value);\n }\n }\n if (obj.observedAddr != null) {\n w.uint32(34);\n w.bytes(obj.observedAddr);\n }\n if (obj.protocols != null) {\n for (const value of obj.protocols) {\n w.uint32(26);\n w.string(value);\n }\n }\n if (obj.signedPeerRecord != null) {\n w.uint32(66);\n w.bytes(obj.signedPeerRecord);\n }\n if (opts.lengthDelimited !== false) {\n w.ldelim();\n }\n }, (reader, length) => {\n const obj = {\n listenAddrs: [],\n protocols: []\n };\n const end = length == null ? reader.len : reader.pos + length;\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 5:\n obj.protocolVersion = reader.string();\n break;\n case 6:\n obj.agentVersion = reader.string();\n break;\n case 1:\n obj.publicKey = reader.bytes();\n break;\n case 2:\n obj.listenAddrs.push(reader.bytes());\n break;\n case 4:\n obj.observedAddr = reader.bytes();\n break;\n case 3:\n obj.protocols.push(reader.string());\n break;\n case 8:\n obj.signedPeerRecord = reader.bytes();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return obj;\n });\n }\n return _codec;\n };\n Identify.encode = (obj) => {\n return (0,protons_runtime__WEBPACK_IMPORTED_MODULE_0__.encodeMessage)(obj, Identify.codec());\n };\n Identify.decode = (buf) => {\n return (0,protons_runtime__WEBPA
/***/ }),
/***/ "./node_modules/libp2p/dist/src/index.js":
/*!***********************************************!*\
!*** ./node_modules/libp2p/dist/src/index.js ***!
\***********************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ createLibp2p: () => (/* binding */ createLibp2p)\n/* harmony export */ });\n/* harmony import */ var _libp2p_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./libp2p.js */ \"./node_modules/libp2p/dist/src/libp2p.js\");\n/**\n * @packageDocumentation\n *\n * Use the `createLibp2p` function to create a libp2p node.\n *\n * @example\n *\n * ```typescript\n * import { createLibp2p } from 'libp2p'\n *\n * const node = await createLibp2p({\n * // ...other options\n * })\n * ```\n */\n\n/**\n * Returns a new instance of the Libp2p interface, generating a new PeerId\n * if one is not passed as part of the options.\n *\n * The node will be started unless `start: false` is passed as an option.\n *\n * @example\n *\n * ```js\n * import { createLibp2p } from 'libp2p'\n * import { tcp } from '@libp2p/tcp'\n * import { mplex } from '@libp2p/mplex'\n * import { noise } from '@chainsafe/libp2p-noise'\n * import { yamux } from '@chainsafe/libp2p-yamux'\n *\n * // specify options\n * const options = {\n * transports: [tcp()],\n * streamMuxers: [yamux(), mplex()],\n * connectionEncryption: [noise()]\n * }\n *\n * // create libp2p\n * const libp2p = await createLibp2p(options)\n * ```\n */\nasync function createLibp2p(options) {\n const node = await (0,_libp2p_js__WEBPACK_IMPORTED_MODULE_0__.createLibp2pNode)(options);\n if (options.start !== false) {\n await node.start();\n }\n return node;\n}\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/libp2p/dist/src/index.js?");
/***/ }),
/***/ "./node_modules/libp2p/dist/src/libp2p.js":
/*!************************************************!*\
!*** ./node_modules/libp2p/dist/src/libp2p.js ***!
\************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Libp2pNode: () => (/* binding */ Libp2pNode),\n/* harmony export */ createLibp2pNode: () => (/* binding */ createLibp2pNode)\n/* harmony export */ });\n/* harmony import */ var events__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! events */ \"./node_modules/events/events.js\");\n/* harmony import */ var _libp2p_crypto_keys__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/crypto/keys */ \"./node_modules/@libp2p/crypto/dist/src/keys/index.js\");\n/* harmony import */ var _libp2p_interface_content_routing__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @libp2p/interface-content-routing */ \"./node_modules/@libp2p/interface-content-routing/dist/src/index.js\");\n/* harmony import */ var _libp2p_interface_peer_discovery__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @libp2p/interface-peer-discovery */ \"./node_modules/@libp2p/interface-peer-discovery/dist/src/index.js\");\n/* harmony import */ var _libp2p_interface_peer_routing__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @libp2p/interface-peer-routing */ \"./node_modules/@libp2p/interface-peer-routing/dist/src/index.js\");\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n/* harmony import */ var _libp2p_interfaces_events__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @libp2p/interfaces/events */ \"./node_modules/@libp2p/interfaces/dist/src/events.js\");\n/* harmony import */ var _libp2p_keychain__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @libp2p/keychain */ \"./node_modules/@libp2p/keychain/dist/src/index.js\");\n/* harmony import */ var _libp2p_logger__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @libp2p/logger */ \"./node_modules/@libp2p/logger/dist/src/index.js\");\n/* harmony import */ var _libp2p_peer_collections__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @libp2p/peer-collections */ \"./node_modules/@libp2p/peer-collections/dist/src/index.js\");\n/* harmony import */ var _libp2p_peer_id__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @libp2p/peer-id */ \"./node_modules/@libp2p/peer-id/dist/src/index.js\");\n/* harmony import */ var _libp2p_peer_id_factory__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @libp2p/peer-id-factory */ \"./node_modules/@libp2p/peer-id-factory/dist/src/index.js\");\n/* harmony import */ var _libp2p_peer_store__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @libp2p/peer-store */ \"./node_modules/@libp2p/peer-store/dist/src/index.js\");\n/* harmony import */ var _multiformats_multiaddr__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @multiformats/multiaddr */ \"./node_modules/@multiformats/multiaddr/dist/src/index.js\");\n/* harmony import */ var datastore_core_memory__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! datastore-core/memory */ \"./node_modules/datastore-core/dist/src/memory.js\");\n/* harmony import */ var merge_options__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! merge-options */ \"./node_modules/merge-options/index.mjs\");\n/* harmony import */ var uint8arrays_concat__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! uint8arrays/concat */ \"./node_modules/uint8arrays/dist/src/concat.js\");\n/* harmony import */ var uint8arrays_from_string__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! uint8arrays/from-string */ \"./node_modules/uint8arrays/dist/src/from-string.js\");\n/* harmony import */ var _address_manager_index_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./address-manager/index.js */ \"./node_modules/libp2p/dist/src/address-manager/index.js\");\n/* harmony import */ var _components_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./components.js */ \"./node_modules/libp2p/dist/src/components.js\");\n/* harmony import */ var _config_connection_gater_js__WEBPACK_IMPORTE
/***/ }),
/***/ "./node_modules/libp2p/dist/src/peer-routing.js":
/*!******************************************************!*\
!*** ./node_modules/libp2p/dist/src/peer-routing.js ***!
\******************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DefaultPeerRouting: () => (/* binding */ DefaultPeerRouting)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n/* harmony import */ var _libp2p_logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/logger */ \"./node_modules/@libp2p/logger/dist/src/index.js\");\n/* harmony import */ var it_filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! it-filter */ \"./node_modules/it-filter/dist/src/index.js\");\n/* harmony import */ var it_first__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! it-first */ \"./node_modules/it-first/dist/src/index.js\");\n/* harmony import */ var it_merge__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! it-merge */ \"./node_modules/it-merge/dist/src/index.js\");\n/* harmony import */ var it_pipe__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! it-pipe */ \"./node_modules/it-pipe/dist/src/index.js\");\n/* harmony import */ var _content_routing_utils_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./content-routing/utils.js */ \"./node_modules/libp2p/dist/src/content-routing/utils.js\");\n/* harmony import */ var _errors_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./errors.js */ \"./node_modules/libp2p/dist/src/errors.js\");\n\n\n\n\n\n\n\n\nconst log = (0,_libp2p_logger__WEBPACK_IMPORTED_MODULE_1__.logger)('libp2p:peer-routing');\nclass DefaultPeerRouting {\n components;\n routers;\n constructor(components, init) {\n this.components = components;\n this.routers = init.routers ?? [];\n }\n /**\n * Iterates over all peer routers in parallel to find the given peer\n */\n async findPeer(id, options) {\n if (this.routers.length === 0) {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__.CodeError('No peer routers available', _errors_js__WEBPACK_IMPORTED_MODULE_7__.codes.ERR_NO_ROUTERS_AVAILABLE);\n }\n if (id.toString() === this.components.peerId.toString()) {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__.CodeError('Should not try to find self', _errors_js__WEBPACK_IMPORTED_MODULE_7__.codes.ERR_FIND_SELF);\n }\n const output = await (0,it_pipe__WEBPACK_IMPORTED_MODULE_5__.pipe)((0,it_merge__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(...this.routers.map(router => (async function* () {\n try {\n yield await router.findPeer(id, options);\n }\n catch (err) {\n log.error(err);\n }\n })())), (source) => (0,it_filter__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(source, Boolean), (source) => (0,_content_routing_utils_js__WEBPACK_IMPORTED_MODULE_6__.storeAddresses)(source, this.components.peerStore), async (source) => (0,it_first__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(source));\n if (output != null) {\n return output;\n }\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__.CodeError(_errors_js__WEBPACK_IMPORTED_MODULE_7__.messages.NOT_FOUND, _errors_js__WEBPACK_IMPORTED_MODULE_7__.codes.ERR_NOT_FOUND);\n }\n /**\n * Attempt to find the closest peers on the network to the given key\n */\n async *getClosestPeers(key, options) {\n if (this.routers.length === 0) {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__.CodeError('No peer routers available', _errors_js__WEBPACK_IMPORTED_MODULE_7__.codes.ERR_NO_ROUTERS_AVAILABLE);\n }\n yield* (0,it_pipe__WEBPACK_IMPORTED_MODULE_5__.pipe)((0,it_merge__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(...this.routers.map(router => router.getClosestPeers(key, options))), (source) => (0,_content_routing_utils_js__WEBPACK_IMPORTED_MODULE_6__.storeAddresses)(source, this.components.peerStore
/***/ }),
/***/ "./node_modules/libp2p/dist/src/ping/constants.js":
/*!********************************************************!*\
!*** ./node_modules/libp2p/dist/src/ping/constants.js ***!
\********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ MAX_INBOUND_STREAMS: () => (/* binding */ MAX_INBOUND_STREAMS),\n/* harmony export */ MAX_OUTBOUND_STREAMS: () => (/* binding */ MAX_OUTBOUND_STREAMS),\n/* harmony export */ PING_LENGTH: () => (/* binding */ PING_LENGTH),\n/* harmony export */ PROTOCOL: () => (/* binding */ PROTOCOL),\n/* harmony export */ PROTOCOL_NAME: () => (/* binding */ PROTOCOL_NAME),\n/* harmony export */ PROTOCOL_PREFIX: () => (/* binding */ PROTOCOL_PREFIX),\n/* harmony export */ PROTOCOL_VERSION: () => (/* binding */ PROTOCOL_VERSION),\n/* harmony export */ TIMEOUT: () => (/* binding */ TIMEOUT)\n/* harmony export */ });\nconst PROTOCOL = '/ipfs/ping/1.0.0';\nconst PING_LENGTH = 32;\nconst PROTOCOL_VERSION = '1.0.0';\nconst PROTOCOL_NAME = 'ping';\nconst PROTOCOL_PREFIX = 'ipfs';\nconst TIMEOUT = 10000;\n// See https://github.com/libp2p/specs/blob/d4b5fb0152a6bb86cfd9ea/ping/ping.md?plain=1#L38-L43\n// The dialing peer MUST NOT keep more than one outbound stream for the ping protocol per peer.\n// The listening peer SHOULD accept at most two streams per peer since cross-stream behavior is\n// non-linear and stream writes occur asynchronously. The listening peer may perceive the\n// dialing peer closing and opening the wrong streams (for instance, closing stream B and\n// opening stream A even though the dialing peer is opening stream B and closing stream A).\nconst MAX_INBOUND_STREAMS = 2;\nconst MAX_OUTBOUND_STREAMS = 1;\n//# sourceMappingURL=constants.js.map\n\n//# sourceURL=webpack://light/./node_modules/libp2p/dist/src/ping/constants.js?");
/***/ }),
/***/ "./node_modules/libp2p/dist/src/ping/index.js":
/*!****************************************************!*\
!*** ./node_modules/libp2p/dist/src/ping/index.js ***!
\****************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ pingService: () => (/* binding */ pingService)\n/* harmony export */ });\n/* harmony import */ var events__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! events */ \"./node_modules/events/events.js\");\n/* harmony import */ var _libp2p_crypto__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/crypto */ \"./node_modules/@libp2p/crypto/dist/src/index.js\");\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n/* harmony import */ var _libp2p_logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @libp2p/logger */ \"./node_modules/@libp2p/logger/dist/src/index.js\");\n/* harmony import */ var abortable_iterator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! abortable-iterator */ \"./node_modules/abortable-iterator/dist/src/index.js\");\n/* harmony import */ var any_signal__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! any-signal */ \"./node_modules/any-signal/dist/src/index.js\");\n/* harmony import */ var it_first__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! it-first */ \"./node_modules/it-first/dist/src/index.js\");\n/* harmony import */ var it_pipe__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! it-pipe */ \"./node_modules/it-pipe/dist/src/index.js\");\n/* harmony import */ var uint8arrays_equals__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! uint8arrays/equals */ \"./node_modules/uint8arrays/dist/src/equals.js\");\n/* harmony import */ var _errors_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../errors.js */ \"./node_modules/libp2p/dist/src/errors.js\");\n/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./constants.js */ \"./node_modules/libp2p/dist/src/ping/constants.js\");\n\n\n\n\n\n\n\n\n\n\n\nconst log = (0,_libp2p_logger__WEBPACK_IMPORTED_MODULE_3__.logger)('libp2p:ping');\nclass DefaultPingService {\n protocol;\n components;\n started;\n timeout;\n maxInboundStreams;\n maxOutboundStreams;\n constructor(components, init) {\n this.components = components;\n this.started = false;\n this.protocol = `/${init.protocolPrefix ?? _constants_js__WEBPACK_IMPORTED_MODULE_10__.PROTOCOL_PREFIX}/${_constants_js__WEBPACK_IMPORTED_MODULE_10__.PROTOCOL_NAME}/${_constants_js__WEBPACK_IMPORTED_MODULE_10__.PROTOCOL_VERSION}`;\n this.timeout = init.timeout ?? _constants_js__WEBPACK_IMPORTED_MODULE_10__.TIMEOUT;\n this.maxInboundStreams = init.maxInboundStreams ?? _constants_js__WEBPACK_IMPORTED_MODULE_10__.MAX_INBOUND_STREAMS;\n this.maxOutboundStreams = init.maxOutboundStreams ?? _constants_js__WEBPACK_IMPORTED_MODULE_10__.MAX_OUTBOUND_STREAMS;\n }\n async start() {\n await this.components.registrar.handle(this.protocol, this.handleMessage, {\n maxInboundStreams: this.maxInboundStreams,\n maxOutboundStreams: this.maxOutboundStreams\n });\n this.started = true;\n }\n async stop() {\n await this.components.registrar.unhandle(this.protocol);\n this.started = false;\n }\n isStarted() {\n return this.started;\n }\n /**\n * A handler to register with Libp2p to process ping messages\n */\n handleMessage(data) {\n const { stream } = data;\n void (0,it_pipe__WEBPACK_IMPORTED_MODULE_7__.pipe)(stream, stream)\n .catch(err => {\n log.error(err);\n });\n }\n /**\n * Ping a given peer and wait for its response, getting the operation latency.\n *\n * @param {PeerId|Multiaddr} peer\n * @returns {Promise<number>}\n */\n async ping(peer, options = {}) {\n log('dialing %s to %p', this.protocol, peer);\n const start = Date.now();\n const data = (0,_libp2p_crypto__WEBPACK_IMPORTED_MODULE_1__.randomByte
/***/ }),
/***/ "./node_modules/libp2p/dist/src/registrar.js":
/*!***************************************************!*\
!*** ./node_modules/libp2p/dist/src/registrar.js ***!
\***************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DEFAULT_MAX_INBOUND_STREAMS: () => (/* binding */ DEFAULT_MAX_INBOUND_STREAMS),\n/* harmony export */ DEFAULT_MAX_OUTBOUND_STREAMS: () => (/* binding */ DEFAULT_MAX_OUTBOUND_STREAMS),\n/* harmony export */ DefaultRegistrar: () => (/* binding */ DefaultRegistrar)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interface_registrar__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interface-registrar */ \"./node_modules/@libp2p/interface-registrar/dist/src/index.js\");\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n/* harmony import */ var _libp2p_logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @libp2p/logger */ \"./node_modules/@libp2p/logger/dist/src/index.js\");\n/* harmony import */ var merge_options__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! merge-options */ \"./node_modules/merge-options/index.mjs\");\n/* harmony import */ var _errors_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./errors.js */ \"./node_modules/libp2p/dist/src/errors.js\");\n\n\n\n\n\nconst log = (0,_libp2p_logger__WEBPACK_IMPORTED_MODULE_2__.logger)('libp2p:registrar');\nconst DEFAULT_MAX_INBOUND_STREAMS = 32;\nconst DEFAULT_MAX_OUTBOUND_STREAMS = 64;\n/**\n * Responsible for notifying registered protocols of events in the network.\n */\nclass DefaultRegistrar {\n topologies;\n handlers;\n components;\n constructor(components) {\n this.topologies = new Map();\n this.handlers = new Map();\n this.components = components;\n this._onDisconnect = this._onDisconnect.bind(this);\n this._onPeerUpdate = this._onPeerUpdate.bind(this);\n this._onConnect = this._onConnect.bind(this);\n this.components.events.addEventListener('peer:disconnect', this._onDisconnect);\n this.components.events.addEventListener('peer:connect', this._onConnect);\n this.components.events.addEventListener('peer:update', this._onPeerUpdate);\n }\n getProtocols() {\n return Array.from(new Set([\n ...this.handlers.keys()\n ])).sort();\n }\n getHandler(protocol) {\n const handler = this.handlers.get(protocol);\n if (handler == null) {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_1__.CodeError(`No handler registered for protocol ${protocol}`, _errors_js__WEBPACK_IMPORTED_MODULE_4__.codes.ERR_NO_HANDLER_FOR_PROTOCOL);\n }\n return handler;\n }\n getTopologies(protocol) {\n const topologies = this.topologies.get(protocol);\n if (topologies == null) {\n return [];\n }\n return [\n ...topologies.values()\n ];\n }\n /**\n * Registers the `handler` for each protocol\n */\n async handle(protocol, handler, opts) {\n if (this.handlers.has(protocol)) {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_1__.CodeError(`Handler already registered for protocol ${protocol}`, _errors_js__WEBPACK_IMPORTED_MODULE_4__.codes.ERR_PROTOCOL_HANDLER_ALREADY_REGISTERED);\n }\n const options = merge_options__WEBPACK_IMPORTED_MODULE_3__[\"default\"].bind({ ignoreUndefined: true })({\n maxInboundStreams: DEFAULT_MAX_INBOUND_STREAMS,\n maxOutboundStreams: DEFAULT_MAX_OUTBOUND_STREAMS\n }, opts);\n this.handlers.set(protocol, {\n handler,\n options\n });\n // Add new protocol to self protocols in the peer store\n await this.components.peerStore.merge(this.components.peerId, {\n protocols: [protocol]\n });\n }\n /**\n * Removes the handler for each protocol. The protocol\n * will no longer be supported on streams.\n */\n async unhandle(protocols) {\n const proto
/***/ }),
/***/ "./node_modules/libp2p/dist/src/transport-manager.js":
/*!***********************************************************!*\
!*** ./node_modules/libp2p/dist/src/transport-manager.js ***!
\***********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DefaultTransportManager: () => (/* binding */ DefaultTransportManager)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interface_transport__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interface-transport */ \"./node_modules/@libp2p/interface-transport/dist/src/index.js\");\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n/* harmony import */ var _libp2p_logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @libp2p/logger */ \"./node_modules/@libp2p/logger/dist/src/index.js\");\n/* harmony import */ var _libp2p_tracked_map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @libp2p/tracked-map */ \"./node_modules/@libp2p/tracked-map/dist/src/index.js\");\n/* harmony import */ var _errors_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./errors.js */ \"./node_modules/libp2p/dist/src/errors.js\");\n\n\n\n\n\nconst log = (0,_libp2p_logger__WEBPACK_IMPORTED_MODULE_2__.logger)('libp2p:transports');\nclass DefaultTransportManager {\n components;\n transports;\n listeners;\n faultTolerance;\n started;\n constructor(components, init = {}) {\n this.components = components;\n this.started = false;\n this.transports = new Map();\n this.listeners = (0,_libp2p_tracked_map__WEBPACK_IMPORTED_MODULE_3__.trackedMap)({\n name: 'libp2p_transport_manager_listeners',\n metrics: this.components.metrics\n });\n this.faultTolerance = init.faultTolerance ?? _libp2p_interface_transport__WEBPACK_IMPORTED_MODULE_0__.FaultTolerance.FATAL_ALL;\n }\n /**\n * Adds a `Transport` to the manager\n */\n add(transport) {\n const tag = transport[Symbol.toStringTag];\n if (tag == null) {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_1__.CodeError('Transport must have a valid tag', _errors_js__WEBPACK_IMPORTED_MODULE_4__.codes.ERR_INVALID_KEY);\n }\n if (this.transports.has(tag)) {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_1__.CodeError(`There is already a transport with the tag ${tag}`, _errors_js__WEBPACK_IMPORTED_MODULE_4__.codes.ERR_DUPLICATE_TRANSPORT);\n }\n log('adding transport %s', tag);\n this.transports.set(tag, transport);\n if (!this.listeners.has(tag)) {\n this.listeners.set(tag, []);\n }\n }\n isStarted() {\n return this.started;\n }\n start() {\n this.started = true;\n }\n async afterStart() {\n // Listen on the provided transports for the provided addresses\n const addrs = this.components.addressManager.getListenAddrs();\n await this.listen(addrs);\n }\n /**\n * Stops all listeners\n */\n async stop() {\n const tasks = [];\n for (const [key, listeners] of this.listeners) {\n log('closing listeners for %s', key);\n while (listeners.length > 0) {\n const listener = listeners.pop();\n if (listener == null) {\n continue;\n }\n tasks.push(listener.close());\n }\n }\n await Promise.all(tasks);\n log('all listeners closed');\n for (const key of this.listeners.keys()) {\n this.listeners.set(key, []);\n }\n this.started = false;\n }\n /**\n * Dials the given Multiaddr over it's supported transport\n */\n async dial(ma, options) {\n const transport = this.transportForMultiaddr(ma);\n if (transport == null) {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_1__.CodeError(`No transport available for address ${String(ma)}`, _errors_js__WEBPACK_IMPORTED_MODULE_4__.codes.ERR_TRANSPORT_UNAVAILABLE);
/***/ }),
/***/ "./node_modules/libp2p/dist/src/upgrader.js":
/*!**************************************************!*\
!*** ./node_modules/libp2p/dist/src/upgrader.js ***!
\**************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DefaultUpgrader: () => (/* binding */ DefaultUpgrader)\n/* harmony export */ });\n/* harmony import */ var events__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! events */ \"./node_modules/events/events.js\");\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n/* harmony import */ var _libp2p_logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @libp2p/logger */ \"./node_modules/@libp2p/logger/dist/src/index.js\");\n/* harmony import */ var _libp2p_multistream_select__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @libp2p/multistream-select */ \"./node_modules/@libp2p/multistream-select/dist/src/index.js\");\n/* harmony import */ var _libp2p_peer_id__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @libp2p/peer-id */ \"./node_modules/@libp2p/peer-id/dist/src/index.js\");\n/* harmony import */ var abortable_iterator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! abortable-iterator */ \"./node_modules/abortable-iterator/dist/src/index.js\");\n/* harmony import */ var any_signal__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! any-signal */ \"./node_modules/any-signal/dist/src/index.js\");\n/* harmony import */ var _connection_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./connection/index.js */ \"./node_modules/libp2p/dist/src/connection/index.js\");\n/* harmony import */ var _connection_manager_constants_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./connection-manager/constants.js */ \"./node_modules/libp2p/dist/src/connection-manager/constants.js\");\n/* harmony import */ var _errors_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./errors.js */ \"./node_modules/libp2p/dist/src/errors.js\");\n/* harmony import */ var _registrar_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./registrar.js */ \"./node_modules/libp2p/dist/src/registrar.js\");\n\n\n\n\n\n\n\n\n\n\n\nconst log = (0,_libp2p_logger__WEBPACK_IMPORTED_MODULE_2__.logger)('libp2p:upgrader');\nfunction findIncomingStreamLimit(protocol, registrar) {\n try {\n const { options } = registrar.getHandler(protocol);\n return options.maxInboundStreams;\n }\n catch (err) {\n if (err.code !== _errors_js__WEBPACK_IMPORTED_MODULE_9__.codes.ERR_NO_HANDLER_FOR_PROTOCOL) {\n throw err;\n }\n }\n return _registrar_js__WEBPACK_IMPORTED_MODULE_10__.DEFAULT_MAX_INBOUND_STREAMS;\n}\nfunction findOutgoingStreamLimit(protocol, registrar, options = {}) {\n try {\n const { options } = registrar.getHandler(protocol);\n if (options.maxOutboundStreams != null) {\n return options.maxOutboundStreams;\n }\n }\n catch (err) {\n if (err.code !== _errors_js__WEBPACK_IMPORTED_MODULE_9__.codes.ERR_NO_HANDLER_FOR_PROTOCOL) {\n throw err;\n }\n }\n return options.maxOutboundStreams ?? _registrar_js__WEBPACK_IMPORTED_MODULE_10__.DEFAULT_MAX_OUTBOUND_STREAMS;\n}\nfunction countStreams(protocol, direction, connection) {\n let streamCount = 0;\n connection.streams.forEach(stream => {\n if (stream.stat.direction === direction && stream.stat.protocol === protocol) {\n streamCount++;\n }\n });\n return streamCount;\n}\nclass DefaultUpgrader {\n components;\n connectionEncryption;\n muxers;\n inboundUpgradeTimeout;\n events;\n constructor(components, init) {\n this.components = components;\n this.connectionEncryption = new Map();\n init.connectionEncryption.forEach(encrypter => {\n this.connectionEncryption.set(encrypter.protocol, encrypter);\n });\n this.muxers = new Map();\n init.muxers.forEach(muxer => {\n this.muxers.set(muxer.protocol, muxer);\n });\n this.inboundUpgradeTim
/***/ }),
/***/ "./node_modules/libp2p/dist/src/utils/peer-job-queue.js":
/*!**************************************************************!*\
!*** ./node_modules/libp2p/dist/src/utils/peer-job-queue.js ***!
\**************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PeerJobQueue: () => (/* binding */ PeerJobQueue)\n/* harmony export */ });\n/* harmony import */ var _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @libp2p/interfaces/errors */ \"./node_modules/@libp2p/interfaces/dist/src/errors.js\");\n/* harmony import */ var p_queue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! p-queue */ \"./node_modules/p-queue/dist/index.js\");\n/* harmony import */ var _errors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../errors.js */ \"./node_modules/libp2p/dist/src/errors.js\");\n/* eslint-disable @typescript-eslint/no-non-null-assertion */\n\n\n\n// Port of lower_bound from https://en.cppreference.com/w/cpp/algorithm/lower_bound\n// Used to compute insertion index to keep queue sorted after insertion\nfunction lowerBound(array, value, comparator) {\n let first = 0;\n let count = array.length;\n while (count > 0) {\n const step = Math.trunc(count / 2);\n let it = first + step;\n if (comparator(array[it], value) <= 0) {\n first = ++it;\n count -= step + 1;\n }\n else {\n count = step;\n }\n }\n return first;\n}\n/**\n * Port of https://github.com/sindresorhus/p-queue/blob/main/source/priority-queue.ts\n * that adds support for filtering jobs by peer id\n */\nclass PeerPriorityQueue {\n #queue = [];\n enqueue(run, options) {\n const peerId = options?.peerId;\n const priority = options?.priority ?? 0;\n if (peerId == null) {\n throw new _libp2p_interfaces_errors__WEBPACK_IMPORTED_MODULE_0__.CodeError('missing peer id', _errors_js__WEBPACK_IMPORTED_MODULE_2__.codes.ERR_INVALID_PARAMETERS);\n }\n const element = {\n priority,\n peerId,\n run\n };\n if (this.size > 0 && this.#queue[this.size - 1].priority >= priority) {\n this.#queue.push(element);\n return;\n }\n const index = lowerBound(this.#queue, element, (a, b) => b.priority - a.priority);\n this.#queue.splice(index, 0, element);\n }\n dequeue() {\n const item = this.#queue.shift();\n return item?.run;\n }\n filter(options) {\n if (options.peerId != null) {\n const peerId = options.peerId;\n return this.#queue.filter((element) => peerId.equals(element.peerId)).map((element) => element.run);\n }\n return this.#queue.filter((element) => element.priority === options.priority).map((element) => element.run);\n }\n get size() {\n return this.#queue.length;\n }\n}\n/**\n * Extends PQueue to add support for querying queued jobs by peer id\n */\nclass PeerJobQueue extends p_queue__WEBPACK_IMPORTED_MODULE_1__[\"default\"] {\n constructor(options = {}) {\n super({\n ...options,\n queueClass: PeerPriorityQueue\n });\n }\n /**\n * Returns true if this queue has a job for the passed peer id that has not yet\n * started to run\n */\n hasJob(peerId) {\n return this.sizeBy({\n peerId\n }) > 0;\n }\n}\n//# sourceMappingURL=peer-job-queue.js.map\n\n//# sourceURL=webpack://light/./node_modules/libp2p/dist/src/utils/peer-job-queue.js?");
/***/ }),
/***/ "./node_modules/libp2p/dist/src/version.js":
/*!*************************************************!*\
!*** ./node_modules/libp2p/dist/src/version.js ***!
\*************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ name: () => (/* binding */ name),\n/* harmony export */ version: () => (/* binding */ version)\n/* harmony export */ });\nconst version = '0.45.9';\nconst name = 'libp2p';\n//# sourceMappingURL=version.js.map\n\n//# sourceURL=webpack://light/./node_modules/libp2p/dist/src/version.js?");
/***/ }),
/***/ "./node_modules/longbits/dist/src/index.js":
/*!*************************************************!*\
!*** ./node_modules/longbits/dist/src/index.js ***!
\*************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ LongBits: () => (/* binding */ LongBits)\n/* harmony export */ });\n/* harmony import */ var byte_access__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! byte-access */ \"./node_modules/byte-access/dist/src/index.js\");\n\nconst TWO_32 = 4294967296;\nclass LongBits {\n constructor(hi = 0, lo = 0) {\n this.hi = hi;\n this.lo = lo;\n }\n /**\n * Returns these hi/lo bits as a BigInt\n */\n toBigInt(unsigned) {\n if (unsigned === true) {\n return BigInt(this.lo >>> 0) + (BigInt(this.hi >>> 0) << 32n);\n }\n if ((this.hi >>> 31) !== 0) {\n const lo = ~this.lo + 1 >>> 0;\n let hi = ~this.hi >>> 0;\n if (lo === 0) {\n hi = hi + 1 >>> 0;\n }\n return -(BigInt(lo) + (BigInt(hi) << 32n));\n }\n return BigInt(this.lo >>> 0) + (BigInt(this.hi >>> 0) << 32n);\n }\n /**\n * Returns these hi/lo bits as a Number - this may overflow, toBigInt\n * should be preferred\n */\n toNumber(unsigned) {\n return Number(this.toBigInt(unsigned));\n }\n /**\n * ZigZag decode a LongBits object\n */\n zzDecode() {\n const mask = -(this.lo & 1);\n const lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;\n const hi = (this.hi >>> 1 ^ mask) >>> 0;\n return new LongBits(hi, lo);\n }\n /**\n * ZigZag encode a LongBits object\n */\n zzEncode() {\n const mask = this.hi >> 31;\n const hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;\n const lo = (this.lo << 1 ^ mask) >>> 0;\n return new LongBits(hi, lo);\n }\n /**\n * Encode a LongBits object as a varint byte array\n */\n toBytes(buf, offset = 0) {\n const access = (0,byte_access__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(buf);\n while (this.hi > 0) {\n access.set(offset++, this.lo & 127 | 128);\n this.lo = (this.lo >>> 7 | this.hi << 25) >>> 0;\n this.hi >>>= 7;\n }\n while (this.lo > 127) {\n access.set(offset++, this.lo & 127 | 128);\n this.lo = this.lo >>> 7;\n }\n access.set(offset++, this.lo);\n }\n /**\n * Parse a LongBits object from a BigInt\n */\n static fromBigInt(value) {\n if (value === 0n) {\n return new LongBits();\n }\n const negative = value < 0;\n if (negative) {\n value = -value;\n }\n let hi = Number(value >> 32n) | 0;\n let lo = Number(value - (BigInt(hi) << 32n)) | 0;\n if (negative) {\n hi = ~hi >>> 0;\n lo = ~lo >>> 0;\n if (++lo > TWO_32) {\n lo = 0;\n if (++hi > TWO_32) {\n hi = 0;\n }\n }\n }\n return new LongBits(hi, lo);\n }\n /**\n * Parse a LongBits object from a Number\n */\n static fromNumber(value) {\n if (value === 0) {\n return new LongBits();\n }\n const sign = value < 0;\n if (sign) {\n value = -value;\n }\n let lo = value >>> 0;\n let hi = (value - lo) / 4294967296 >>> 0;\n if (sign) {\n hi = ~hi >>> 0;\n lo = ~lo >>> 0;\n if (++lo > 4294967295) {\n lo = 0;\n if (++hi > 4294967295) {\n hi = 0;\n }\n }\n }\n return new LongBits(hi, lo);\n }\n /**\n * Parse a LongBits object from a varint byte array\n */\n static fromBytes(buf, offset = 0) {\n const access = (0,byte_access__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(buf);\n // tends to deopt with local vars for octet etc.\n const bits = new LongBits();\n let i = 0;\n if (buf.length - offset > 4) { // fast route (lo)\n
/***/ }),
/***/ "./node_modules/merge-options/index.mjs":
/*!**********************************************!*\
!*** ./node_modules/merge-options/index.mjs ***!
\**********************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ \"./node_modules/merge-options/index.js\");\n/**\n * Thin ESM wrapper for CJS named exports.\n *\n * Ref: https://redfin.engineering/node-modules-at-war-why-commonjs-and-es-modules-cant-get-along-9617135eeca1\n */\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_index_js__WEBPACK_IMPORTED_MODULE_0__);\n\n\n//# sourceURL=webpack://light/./node_modules/merge-options/index.mjs?");
/***/ }),
/***/ "./node_modules/mortice/dist/src/browser.js":
/*!**************************************************!*\
!*** ./node_modules/mortice/dist/src/browser.js ***!
\**************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var nanoid__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! nanoid */ \"./node_modules/nanoid/index.browser.js\");\n/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constants.js */ \"./node_modules/mortice/dist/src/constants.js\");\n/* harmony import */ var observable_webworkers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! observable-webworkers */ \"./node_modules/observable-webworkers/dist/src/index.js\");\n\n\n\nconst handleWorkerLockRequest = (emitter, masterEvent, requestType, releaseType, grantType) => {\n return (worker, event) => {\n if (event.data.type !== requestType) {\n return;\n }\n const requestEvent = {\n type: event.data.type,\n name: event.data.name,\n identifier: event.data.identifier\n };\n emitter.dispatchEvent(new MessageEvent(masterEvent, {\n data: {\n name: requestEvent.name,\n handler: async () => {\n // grant lock to worker\n worker.postMessage({\n type: grantType,\n name: requestEvent.name,\n identifier: requestEvent.identifier\n });\n // wait for worker to finish\n return await new Promise((resolve) => {\n const releaseEventListener = (event) => {\n if (event == null || event.data == null) {\n return;\n }\n const releaseEvent = {\n type: event.data.type,\n name: event.data.name,\n identifier: event.data.identifier\n };\n if (releaseEvent.type === releaseType && releaseEvent.identifier === requestEvent.identifier) {\n worker.removeEventListener('message', releaseEventListener);\n resolve();\n }\n };\n worker.addEventListener('message', releaseEventListener);\n });\n }\n }\n }));\n };\n};\nconst makeWorkerLockRequest = (name, requestType, grantType, releaseType) => {\n return async () => {\n const id = (0,nanoid__WEBPACK_IMPORTED_MODULE_2__.nanoid)();\n globalThis.postMessage({\n type: requestType,\n identifier: id,\n name\n });\n return await new Promise((resolve) => {\n const listener = (event) => {\n if (event == null || event.data == null) {\n return;\n }\n const responseEvent = {\n type: event.data.type,\n identifier: event.data.identifier\n };\n if (responseEvent.type === grantType && responseEvent.identifier === id) {\n globalThis.removeEventListener('message', listener);\n // grant lock\n resolve(() => {\n // release lock\n globalThis.postMessage({\n type: releaseType,\n identifier: id,\n name\n });\n });\n }\n };\n globalThis.addEventListener('message', listener);\n });\n };\n};\nconst defaultOptions = {\n singleProcess: false\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((options) => {\n options = Object.assign({}, defaultOptions, options);\n co
/***/ }),
/***/ "./node_modules/mortice/dist/src/constants.js":
/*!****************************************************!*\
!*** ./node_modules/mortice/dist/src/constants.js ***!
\****************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ MASTER_GRANT_READ_LOCK: () => (/* binding */ MASTER_GRANT_READ_LOCK),\n/* harmony export */ MASTER_GRANT_WRITE_LOCK: () => (/* binding */ MASTER_GRANT_WRITE_LOCK),\n/* harmony export */ WORKER_RELEASE_READ_LOCK: () => (/* binding */ WORKER_RELEASE_READ_LOCK),\n/* harmony export */ WORKER_RELEASE_WRITE_LOCK: () => (/* binding */ WORKER_RELEASE_WRITE_LOCK),\n/* harmony export */ WORKER_REQUEST_READ_LOCK: () => (/* binding */ WORKER_REQUEST_READ_LOCK),\n/* harmony export */ WORKER_REQUEST_WRITE_LOCK: () => (/* binding */ WORKER_REQUEST_WRITE_LOCK)\n/* harmony export */ });\nconst WORKER_REQUEST_READ_LOCK = 'lock:worker:request-read';\nconst WORKER_RELEASE_READ_LOCK = 'lock:worker:release-read';\nconst MASTER_GRANT_READ_LOCK = 'lock:master:grant-read';\nconst WORKER_REQUEST_WRITE_LOCK = 'lock:worker:request-write';\nconst WORKER_RELEASE_WRITE_LOCK = 'lock:worker:release-write';\nconst MASTER_GRANT_WRITE_LOCK = 'lock:master:grant-write';\n//# sourceMappingURL=constants.js.map\n\n//# sourceURL=webpack://light/./node_modules/mortice/dist/src/constants.js?");
/***/ }),
/***/ "./node_modules/mortice/dist/src/index.js":
/*!************************************************!*\
!*** ./node_modules/mortice/dist/src/index.js ***!
\************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ createMortice)\n/* harmony export */ });\n/* harmony import */ var p_queue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! p-queue */ \"./node_modules/p-queue/dist/index.js\");\n/* harmony import */ var p_timeout__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! p-timeout */ \"./node_modules/p-timeout/index.js\");\n/* harmony import */ var _node_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node.js */ \"./node_modules/mortice/dist/src/browser.js\");\n\n\n\nconst mutexes = {};\nlet implementation;\nasync function createReleaseable(queue, options) {\n let res;\n const p = new Promise((resolve) => {\n res = resolve;\n });\n void queue.add(async () => await (0,p_timeout__WEBPACK_IMPORTED_MODULE_1__[\"default\"])((async () => {\n return await new Promise((resolve) => {\n res(() => {\n resolve();\n });\n });\n })(), {\n milliseconds: options.timeout\n }));\n return await p;\n}\nconst createMutex = (name, options) => {\n if (implementation.isWorker === true) {\n return {\n readLock: implementation.readLock(name, options),\n writeLock: implementation.writeLock(name, options)\n };\n }\n const masterQueue = new p_queue__WEBPACK_IMPORTED_MODULE_0__[\"default\"]({ concurrency: 1 });\n let readQueue;\n return {\n async readLock() {\n // If there's already a read queue, just add the task to it\n if (readQueue != null) {\n return await createReleaseable(readQueue, options);\n }\n // Create a new read queue\n readQueue = new p_queue__WEBPACK_IMPORTED_MODULE_0__[\"default\"]({\n concurrency: options.concurrency,\n autoStart: false\n });\n const localReadQueue = readQueue;\n // Add the task to the read queue\n const readPromise = createReleaseable(readQueue, options);\n void masterQueue.add(async () => {\n // Start the task only once the master queue has completed processing\n // any previous tasks\n localReadQueue.start();\n // Once all the tasks in the read queue have completed, remove it so\n // that the next read lock will occur after any write locks that were\n // started in the interim\n return await localReadQueue.onIdle()\n .then(() => {\n if (readQueue === localReadQueue) {\n readQueue = null;\n }\n });\n });\n return await readPromise;\n },\n async writeLock() {\n // Remove the read queue reference, so that any later read locks will be\n // added to a new queue that starts after this write lock has been\n // released\n readQueue = null;\n return await createReleaseable(masterQueue, options);\n }\n };\n};\nconst defaultOptions = {\n name: 'lock',\n concurrency: Infinity,\n timeout: 84600000,\n singleProcess: false\n};\nfunction createMortice(options) {\n const opts = Object.assign({}, defaultOptions, options);\n if (implementation == null) {\n implementation = (0,_node_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(opts);\n if (implementation.isWorker !== true) {\n // we are master, set up worker requests\n implementation.addEventListener('requestReadLock', (event) => {\n if (mutexes[event.data.name] == null) {\n return;\n }\n void mutexes[event.data.name].readLock()\n .then(async (release) => await event.data.handler().finally(() => release()));\n });\n implementation.addEventListener('r
/***/ }),
/***/ "./node_modules/multiformats/src/bases/base.js":
/*!*****************************************************!*\
!*** ./node_modules/multiformats/src/bases/base.js ***!
\*****************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Codec: () => (/* binding */ Codec),\n/* harmony export */ baseX: () => (/* binding */ baseX),\n/* harmony export */ from: () => (/* binding */ from),\n/* harmony export */ or: () => (/* binding */ or),\n/* harmony export */ rfc4648: () => (/* binding */ rfc4648)\n/* harmony export */ });\n/* harmony import */ var _vendor_base_x_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../vendor/base-x.js */ \"./node_modules/multiformats/vendor/base-x.js\");\n/* harmony import */ var _bytes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../bytes.js */ \"./node_modules/multiformats/src/bytes.js\");\n/* harmony import */ var _interface_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./interface.js */ \"./node_modules/multiformats/src/bases/interface.js\");\n\n\n// Linter can't see that API is used in types.\n// eslint-disable-next-line\n\n\n/**\n * Class represents both BaseEncoder and MultibaseEncoder meaning it\n * can be used to encode to multibase or base encode without multibase\n * prefix.\n *\n * @class\n * @template {string} Base\n * @template {string} Prefix\n * @implements {API.MultibaseEncoder<Prefix>}\n * @implements {API.BaseEncoder}\n */\nclass Encoder {\n /**\n * @param {Base} name\n * @param {Prefix} prefix\n * @param {(bytes:Uint8Array) => string} baseEncode\n */\n constructor (name, prefix, baseEncode) {\n this.name = name\n this.prefix = prefix\n this.baseEncode = baseEncode\n }\n\n /**\n * @param {Uint8Array} bytes\n * @returns {API.Multibase<Prefix>}\n */\n encode (bytes) {\n if (bytes instanceof Uint8Array) {\n return `${this.prefix}${this.baseEncode(bytes)}`\n } else {\n throw Error('Unknown type, must be binary type')\n }\n }\n}\n\n/**\n * @template {string} Prefix\n */\n/**\n * Class represents both BaseDecoder and MultibaseDecoder so it could be used\n * to decode multibases (with matching prefix) or just base decode strings\n * with corresponding base encoding.\n *\n * @class\n * @template {string} Base\n * @template {string} Prefix\n * @implements {API.MultibaseDecoder<Prefix>}\n * @implements {API.UnibaseDecoder<Prefix>}\n * @implements {API.BaseDecoder}\n */\nclass Decoder {\n /**\n * @param {Base} name\n * @param {Prefix} prefix\n * @param {(text:string) => Uint8Array} baseDecode\n */\n constructor (name, prefix, baseDecode) {\n this.name = name\n this.prefix = prefix\n /* c8 ignore next 3 */\n if (prefix.codePointAt(0) === undefined) {\n throw new Error('Invalid prefix character')\n }\n /** @private */\n this.prefixCodePoint = /** @type {number} */ (prefix.codePointAt(0))\n this.baseDecode = baseDecode\n }\n\n /**\n * @param {string} text\n */\n decode (text) {\n if (typeof text === 'string') {\n if (text.codePointAt(0) !== this.prefixCodePoint) {\n throw Error(`Unable to decode multibase string ${JSON.stringify(text)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`)\n }\n return this.baseDecode(text.slice(this.prefix.length))\n } else {\n throw Error('Can only multibase decode strings')\n }\n }\n\n /**\n * @template {string} OtherPrefix\n * @param {API.UnibaseDecoder<OtherPrefix>|ComposedDecoder<OtherPrefix>} decoder\n * @returns {ComposedDecoder<Prefix|OtherPrefix>}\n */\n or (decoder) {\n return or(this, decoder)\n }\n}\n\n/**\n * @template {string} Prefix\n * @typedef {Record<Prefix, API.UnibaseDecoder<Prefix>>} Decoders\n */\n\n/**\n * @template {string} Prefix\n * @implements {API.MultibaseDecoder<Prefix>}\n * @implements {API.CombobaseDecoder<Prefix>}\n */\nclass ComposedDecoder {\n /**\n * @param {Decoders<Prefix>} decoders\n */\n constructor (decoders) {\n this.decoders = decoders\n }\n\n /**\n * @template {string} OtherPrefix\n * @param {API.UnibaseDecoder<OtherPrefix>|ComposedDecoder<OtherPrefix>} decoder\n * @returns {Composed
/***/ }),
/***/ "./node_modules/multiformats/src/bases/base10.js":
/*!*******************************************************!*\
!*** ./node_modules/multiformats/src/bases/base10.js ***!
\*******************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ base10: () => (/* binding */ base10)\n/* harmony export */ });\n/* harmony import */ var _base_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base.js */ \"./node_modules/multiformats/src/bases/base.js\");\n\n\nconst base10 = (0,_base_js__WEBPACK_IMPORTED_MODULE_0__.baseX)({\n prefix: '9',\n name: 'base10',\n alphabet: '0123456789'\n})\n\n\n//# sourceURL=webpack://light/./node_modules/multiformats/src/bases/base10.js?");
/***/ }),
/***/ "./node_modules/multiformats/src/bases/base16.js":
/*!*******************************************************!*\
!*** ./node_modules/multiformats/src/bases/base16.js ***!
\*******************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ base16: () => (/* binding */ base16),\n/* harmony export */ base16upper: () => (/* binding */ base16upper)\n/* harmony export */ });\n/* harmony import */ var _base_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base.js */ \"./node_modules/multiformats/src/bases/base.js\");\n// @ts-check\n\n\n\nconst base16 = (0,_base_js__WEBPACK_IMPORTED_MODULE_0__.rfc4648)({\n prefix: 'f',\n name: 'base16',\n alphabet: '0123456789abcdef',\n bitsPerChar: 4\n})\n\nconst base16upper = (0,_base_js__WEBPACK_IMPORTED_MODULE_0__.rfc4648)({\n prefix: 'F',\n name: 'base16upper',\n alphabet: '0123456789ABCDEF',\n bitsPerChar: 4\n})\n\n\n//# sourceURL=webpack://light/./node_modules/multiformats/src/bases/base16.js?");
/***/ }),
/***/ "./node_modules/multiformats/src/bases/base2.js":
/*!******************************************************!*\
!*** ./node_modules/multiformats/src/bases/base2.js ***!
\******************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ base2: () => (/* binding */ base2)\n/* harmony export */ });\n/* harmony import */ var _base_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base.js */ \"./node_modules/multiformats/src/bases/base.js\");\n// @ts-check\n\n\n\nconst base2 = (0,_base_js__WEBPACK_IMPORTED_MODULE_0__.rfc4648)({\n prefix: '0',\n name: 'base2',\n alphabet: '01',\n bitsPerChar: 1\n})\n\n\n//# sourceURL=webpack://light/./node_modules/multiformats/src/bases/base2.js?");
/***/ }),
/***/ "./node_modules/multiformats/src/bases/base256emoji.js":
/*!*************************************************************!*\
!*** ./node_modules/multiformats/src/bases/base256emoji.js ***!
\*************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ base256emoji: () => (/* binding */ base256emoji)\n/* harmony export */ });\n/* harmony import */ var _base_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base.js */ \"./node_modules/multiformats/src/bases/base.js\");\n\n\nconst alphabet = Array.from('🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂')\nconst alphabetBytesToChars = /** @type {string[]} */ (alphabet.reduce((p, c, i) => { p[i] = c; return p }, /** @type {string[]} */([])))\nconst alphabetCharsToBytes = /** @type {number[]} */ (alphabet.reduce((p, c, i) => { p[/** @type {number} */ (c.codePointAt(0))] = i; return p }, /** @type {number[]} */([])))\n\n/**\n * @param {Uint8Array} data\n * @returns {string}\n */\nfunction encode (data) {\n return data.reduce((p, c) => {\n p += alphabetBytesToChars[c]\n return p\n }, '')\n}\n\n/**\n * @param {string} str\n * @returns {Uint8Array}\n */\nfunction decode (str) {\n const byts = []\n for (const char of str) {\n const byt = alphabetCharsToBytes[/** @type {number} */ (char.codePointAt(0))]\n if (byt === undefined) {\n throw new Error(`Non-base256emoji character: ${char}`)\n }\n byts.push(byt)\n }\n return new Uint8Array(byts)\n}\n\nconst base256emoji = (0,_base_js__WEBPACK_IMPORTED_MODULE_0__.from)({\n prefix: '🚀',\n name: 'base256emoji',\n encode,\n decode\n})\n\n\n//# sourceURL=webpack://light/./node_modules/multiformats/src/bases/base256emoji.js?");
/***/ }),
/***/ "./node_modules/multiformats/src/bases/base32.js":
/*!*******************************************************!*\
!*** ./node_modules/multiformats/src/bases/base32.js ***!
\*******************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ base32: () => (/* binding */ base32),\n/* harmony export */ base32hex: () => (/* binding */ base32hex),\n/* harmony export */ base32hexpad: () => (/* binding */ base32hexpad),\n/* harmony export */ base32hexpadupper: () => (/* binding */ base32hexpadupper),\n/* harmony export */ base32hexupper: () => (/* binding */ base32hexupper),\n/* harmony export */ base32pad: () => (/* binding */ base32pad),\n/* harmony export */ base32padupper: () => (/* binding */ base32padupper),\n/* harmony export */ base32upper: () => (/* binding */ base32upper),\n/* harmony export */ base32z: () => (/* binding */ base32z)\n/* harmony export */ });\n/* harmony import */ var _base_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base.js */ \"./node_modules/multiformats/src/bases/base.js\");\n\n\nconst base32 = (0,_base_js__WEBPACK_IMPORTED_MODULE_0__.rfc4648)({\n prefix: 'b',\n name: 'base32',\n alphabet: 'abcdefghijklmnopqrstuvwxyz234567',\n bitsPerChar: 5\n})\n\nconst base32upper = (0,_base_js__WEBPACK_IMPORTED_MODULE_0__.rfc4648)({\n prefix: 'B',\n name: 'base32upper',\n alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567',\n bitsPerChar: 5\n})\n\nconst base32pad = (0,_base_js__WEBPACK_IMPORTED_MODULE_0__.rfc4648)({\n prefix: 'c',\n name: 'base32pad',\n alphabet: 'abcdefghijklmnopqrstuvwxyz234567=',\n bitsPerChar: 5\n})\n\nconst base32padupper = (0,_base_js__WEBPACK_IMPORTED_MODULE_0__.rfc4648)({\n prefix: 'C',\n name: 'base32padupper',\n alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=',\n bitsPerChar: 5\n})\n\nconst base32hex = (0,_base_js__WEBPACK_IMPORTED_MODULE_0__.rfc4648)({\n prefix: 'v',\n name: 'base32hex',\n alphabet: '0123456789abcdefghijklmnopqrstuv',\n bitsPerChar: 5\n})\n\nconst base32hexupper = (0,_base_js__WEBPACK_IMPORTED_MODULE_0__.rfc4648)({\n prefix: 'V',\n name: 'base32hexupper',\n alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV',\n bitsPerChar: 5\n})\n\nconst base32hexpad = (0,_base_js__WEBPACK_IMPORTED_MODULE_0__.rfc4648)({\n prefix: 't',\n name: 'base32hexpad',\n alphabet: '0123456789abcdefghijklmnopqrstuv=',\n bitsPerChar: 5\n})\n\nconst base32hexpadupper = (0,_base_js__WEBPACK_IMPORTED_MODULE_0__.rfc4648)({\n prefix: 'T',\n name: 'base32hexpadupper',\n alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV=',\n bitsPerChar: 5\n})\n\nconst base32z = (0,_base_js__WEBPACK_IMPORTED_MODULE_0__.rfc4648)({\n prefix: 'h',\n name: 'base32z',\n alphabet: 'ybndrfg8ejkmcpqxot1uwisza345h769',\n bitsPerChar: 5\n})\n\n\n//# sourceURL=webpack://light/./node_modules/multiformats/src/bases/base32.js?");
/***/ }),
/***/ "./node_modules/multiformats/src/bases/base36.js":
/*!*******************************************************!*\
!*** ./node_modules/multiformats/src/bases/base36.js ***!
\*******************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ base36: () => (/* binding */ base36),\n/* harmony export */ base36upper: () => (/* binding */ base36upper)\n/* harmony export */ });\n/* harmony import */ var _base_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base.js */ \"./node_modules/multiformats/src/bases/base.js\");\n\n\nconst base36 = (0,_base_js__WEBPACK_IMPORTED_MODULE_0__.baseX)({\n prefix: 'k',\n name: 'base36',\n alphabet: '0123456789abcdefghijklmnopqrstuvwxyz'\n})\n\nconst base36upper = (0,_base_js__WEBPACK_IMPORTED_MODULE_0__.baseX)({\n prefix: 'K',\n name: 'base36upper',\n alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'\n})\n\n\n//# sourceURL=webpack://light/./node_modules/multiformats/src/bases/base36.js?");
/***/ }),
/***/ "./node_modules/multiformats/src/bases/base58.js":
/*!*******************************************************!*\
!*** ./node_modules/multiformats/src/bases/base58.js ***!
\*******************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ base58btc: () => (/* binding */ base58btc),\n/* harmony export */ base58flickr: () => (/* binding */ base58flickr)\n/* harmony export */ });\n/* harmony import */ var _base_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base.js */ \"./node_modules/multiformats/src/bases/base.js\");\n\n\nconst base58btc = (0,_base_js__WEBPACK_IMPORTED_MODULE_0__.baseX)({\n name: 'base58btc',\n prefix: 'z',\n alphabet: '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'\n})\n\nconst base58flickr = (0,_base_js__WEBPACK_IMPORTED_MODULE_0__.baseX)({\n name: 'base58flickr',\n prefix: 'Z',\n alphabet: '123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ'\n})\n\n\n//# sourceURL=webpack://light/./node_modules/multiformats/src/bases/base58.js?");
/***/ }),
/***/ "./node_modules/multiformats/src/bases/base64.js":
/*!*******************************************************!*\
!*** ./node_modules/multiformats/src/bases/base64.js ***!
\*******************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ base64: () => (/* binding */ base64),\n/* harmony export */ base64pad: () => (/* binding */ base64pad),\n/* harmony export */ base64url: () => (/* binding */ base64url),\n/* harmony export */ base64urlpad: () => (/* binding */ base64urlpad)\n/* harmony export */ });\n/* harmony import */ var _base_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base.js */ \"./node_modules/multiformats/src/bases/base.js\");\n// @ts-check\n\n\n\nconst base64 = (0,_base_js__WEBPACK_IMPORTED_MODULE_0__.rfc4648)({\n prefix: 'm',\n name: 'base64',\n alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',\n bitsPerChar: 6\n})\n\nconst base64pad = (0,_base_js__WEBPACK_IMPORTED_MODULE_0__.rfc4648)({\n prefix: 'M',\n name: 'base64pad',\n alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=',\n bitsPerChar: 6\n})\n\nconst base64url = (0,_base_js__WEBPACK_IMPORTED_MODULE_0__.rfc4648)({\n prefix: 'u',\n name: 'base64url',\n alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_',\n bitsPerChar: 6\n})\n\nconst base64urlpad = (0,_base_js__WEBPACK_IMPORTED_MODULE_0__.rfc4648)({\n prefix: 'U',\n name: 'base64urlpad',\n alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=',\n bitsPerChar: 6\n})\n\n\n//# sourceURL=webpack://light/./node_modules/multiformats/src/bases/base64.js?");
/***/ }),
/***/ "./node_modules/multiformats/src/bases/base8.js":
/*!******************************************************!*\
!*** ./node_modules/multiformats/src/bases/base8.js ***!
\******************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ base8: () => (/* binding */ base8)\n/* harmony export */ });\n/* harmony import */ var _base_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base.js */ \"./node_modules/multiformats/src/bases/base.js\");\n// @ts-check\n\n\n\nconst base8 = (0,_base_js__WEBPACK_IMPORTED_MODULE_0__.rfc4648)({\n prefix: '7',\n name: 'base8',\n alphabet: '01234567',\n bitsPerChar: 3\n})\n\n\n//# sourceURL=webpack://light/./node_modules/multiformats/src/bases/base8.js?");
/***/ }),
/***/ "./node_modules/multiformats/src/bases/identity.js":
/*!*********************************************************!*\
!*** ./node_modules/multiformats/src/bases/identity.js ***!
\*********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ identity: () => (/* binding */ identity)\n/* harmony export */ });\n/* harmony import */ var _base_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base.js */ \"./node_modules/multiformats/src/bases/base.js\");\n/* harmony import */ var _bytes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../bytes.js */ \"./node_modules/multiformats/src/bytes.js\");\n// @ts-check\n\n\n\n\nconst identity = (0,_base_js__WEBPACK_IMPORTED_MODULE_0__.from)({\n prefix: '\\x00',\n name: 'identity',\n encode: (buf) => (0,_bytes_js__WEBPACK_IMPORTED_MODULE_1__.toString)(buf),\n decode: (str) => (0,_bytes_js__WEBPACK_IMPORTED_MODULE_1__.fromString)(str)\n})\n\n\n//# sourceURL=webpack://light/./node_modules/multiformats/src/bases/identity.js?");
/***/ }),
/***/ "./node_modules/multiformats/src/bases/interface.js":
/*!**********************************************************!*\
!*** ./node_modules/multiformats/src/bases/interface.js ***!
\**********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n// this is dummy module overlayed by interface.ts\n\n\n//# sourceURL=webpack://light/./node_modules/multiformats/src/bases/interface.js?");
/***/ }),
/***/ "./node_modules/multiformats/src/basics.js":
/*!*************************************************!*\
!*** ./node_modules/multiformats/src/basics.js ***!
\*************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ CID: () => (/* reexport safe */ _index_js__WEBPACK_IMPORTED_MODULE_14__.CID),\n/* harmony export */ bases: () => (/* binding */ bases),\n/* harmony export */ bytes: () => (/* reexport safe */ _index_js__WEBPACK_IMPORTED_MODULE_14__.bytes),\n/* harmony export */ codecs: () => (/* binding */ codecs),\n/* harmony export */ digest: () => (/* reexport safe */ _index_js__WEBPACK_IMPORTED_MODULE_14__.digest),\n/* harmony export */ hasher: () => (/* reexport safe */ _index_js__WEBPACK_IMPORTED_MODULE_14__.hasher),\n/* harmony export */ hashes: () => (/* binding */ hashes),\n/* harmony export */ varint: () => (/* reexport safe */ _index_js__WEBPACK_IMPORTED_MODULE_14__.varint)\n/* harmony export */ });\n/* harmony import */ var _bases_identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./bases/identity.js */ \"./node_modules/multiformats/src/bases/identity.js\");\n/* harmony import */ var _bases_base2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./bases/base2.js */ \"./node_modules/multiformats/src/bases/base2.js\");\n/* harmony import */ var _bases_base8_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./bases/base8.js */ \"./node_modules/multiformats/src/bases/base8.js\");\n/* harmony import */ var _bases_base10_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./bases/base10.js */ \"./node_modules/multiformats/src/bases/base10.js\");\n/* harmony import */ var _bases_base16_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./bases/base16.js */ \"./node_modules/multiformats/src/bases/base16.js\");\n/* harmony import */ var _bases_base32_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./bases/base32.js */ \"./node_modules/multiformats/src/bases/base32.js\");\n/* harmony import */ var _bases_base36_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./bases/base36.js */ \"./node_modules/multiformats/src/bases/base36.js\");\n/* harmony import */ var _bases_base58_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./bases/base58.js */ \"./node_modules/multiformats/src/bases/base58.js\");\n/* harmony import */ var _bases_base64_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./bases/base64.js */ \"./node_modules/multiformats/src/bases/base64.js\");\n/* harmony import */ var _bases_base256emoji_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./bases/base256emoji.js */ \"./node_modules/multiformats/src/bases/base256emoji.js\");\n/* harmony import */ var _hashes_sha2_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./hashes/sha2.js */ \"./node_modules/multiformats/src/hashes/sha2-browser.js\");\n/* harmony import */ var _hashes_identity_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./hashes/identity.js */ \"./node_modules/multiformats/src/hashes/identity.js\");\n/* harmony import */ var _codecs_raw_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./codecs/raw.js */ \"./node_modules/multiformats/src/codecs/raw.js\");\n/* harmony import */ var _codecs_json_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./codecs/json.js */ \"./node_modules/multiformats/src/codecs/json.js\");\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./index.js */ \"./node_modules/multiformats/src/index.js\");\n// @ts-check\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst bases = { ..._bases_identity_js__WEBPACK_IMPORTED_MODULE_0__, ..._bases_base2_js__WEBPACK_IMPORTED_MODULE_1__, ..._bases_base8_js__WEBPACK_IMPORTED_MODULE_2__, ..._bases_base10_js__WEBPACK_IMPORTED_MODULE_3__, ..._bases_base16_js__WEBPACK_IMPORTED_MODULE_4__, ..._bases_base32_js__WEBPACK_IMPORTED_MODULE_5__, ..._bases_base36_js__WEBPACK_IMPORTED_MODULE_6__, ..._bases_base58_js__WEBPACK_IMPORTED_MODULE_7__, ..._bases_base64_js__WEBPACK_IMPORTED_MODULE_8__, ..._bases_base256emoji_js__WEBPACK_IMPORTED_MODULE_9__ }\nconst hashes = { ..._hashes_sha2_js__WEBPACK_IMPORTED_MODU
/***/ }),
/***/ "./node_modules/multiformats/src/bytes.js":
/*!************************************************!*\
!*** ./node_modules/multiformats/src/bytes.js ***!
\************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ coerce: () => (/* binding */ coerce),\n/* harmony export */ empty: () => (/* binding */ empty),\n/* harmony export */ equals: () => (/* binding */ equals),\n/* harmony export */ fromHex: () => (/* binding */ fromHex),\n/* harmony export */ fromString: () => (/* binding */ fromString),\n/* harmony export */ isBinary: () => (/* binding */ isBinary),\n/* harmony export */ toHex: () => (/* binding */ toHex),\n/* harmony export */ toString: () => (/* binding */ toString)\n/* harmony export */ });\nconst empty = new Uint8Array(0)\n\n/**\n * @param {Uint8Array} d\n */\nconst toHex = d => d.reduce((hex, byte) => hex + byte.toString(16).padStart(2, '0'), '')\n\n/**\n * @param {string} hex\n */\nconst fromHex = hex => {\n const hexes = hex.match(/../g)\n return hexes ? new Uint8Array(hexes.map(b => parseInt(b, 16))) : empty\n}\n\n/**\n * @param {Uint8Array} aa\n * @param {Uint8Array} bb\n */\nconst equals = (aa, bb) => {\n if (aa === bb) return true\n if (aa.byteLength !== bb.byteLength) {\n return false\n }\n\n for (let ii = 0; ii < aa.byteLength; ii++) {\n if (aa[ii] !== bb[ii]) {\n return false\n }\n }\n\n return true\n}\n\n/**\n * @param {ArrayBufferView|ArrayBuffer|Uint8Array} o\n * @returns {Uint8Array}\n */\nconst coerce = o => {\n if (o instanceof Uint8Array && o.constructor.name === 'Uint8Array') return o\n if (o instanceof ArrayBuffer) return new Uint8Array(o)\n if (ArrayBuffer.isView(o)) {\n return new Uint8Array(o.buffer, o.byteOffset, o.byteLength)\n }\n throw new Error('Unknown type, must be binary type')\n}\n\n/**\n * @param {any} o\n * @returns {o is ArrayBuffer|ArrayBufferView}\n */\nconst isBinary = o =>\n o instanceof ArrayBuffer || ArrayBuffer.isView(o)\n\n/**\n * @param {string} str\n * @returns {Uint8Array}\n */\nconst fromString = str => (new TextEncoder()).encode(str)\n\n/**\n * @param {Uint8Array} b\n * @returns {string}\n */\nconst toString = b => (new TextDecoder()).decode(b)\n\n\n\n\n//# sourceURL=webpack://light/./node_modules/multiformats/src/bytes.js?");
/***/ }),
/***/ "./node_modules/multiformats/src/cid.js":
/*!**********************************************!*\
!*** ./node_modules/multiformats/src/cid.js ***!
\**********************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ CID: () => (/* binding */ CID),\n/* harmony export */ format: () => (/* binding */ format),\n/* harmony export */ fromJSON: () => (/* binding */ fromJSON),\n/* harmony export */ toJSON: () => (/* binding */ toJSON)\n/* harmony export */ });\n/* harmony import */ var _varint_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./varint.js */ \"./node_modules/multiformats/src/varint.js\");\n/* harmony import */ var _hashes_digest_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./hashes/digest.js */ \"./node_modules/multiformats/src/hashes/digest.js\");\n/* harmony import */ var _bases_base58_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./bases/base58.js */ \"./node_modules/multiformats/src/bases/base58.js\");\n/* harmony import */ var _bases_base32_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./bases/base32.js */ \"./node_modules/multiformats/src/bases/base32.js\");\n/* harmony import */ var _bytes_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./bytes.js */ \"./node_modules/multiformats/src/bytes.js\");\n/* harmony import */ var _link_interface_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./link/interface.js */ \"./node_modules/multiformats/src/link/interface.js\");\n\n\n\n\n\n// Linter can see that API is used in types.\n// eslint-disable-next-line\n\n\n// This way TS will also expose all the types from module\n\n\n/**\n * @template {API.Link<unknown, number, number, API.Version>} T\n * @template {string} Prefix\n * @param {T} link\n * @param {API.MultibaseEncoder<Prefix>} [base]\n * @returns {API.ToString<T, Prefix>}\n */\nconst format = (link, base) => {\n const { bytes, version } = link\n switch (version) {\n case 0:\n return toStringV0(\n bytes,\n baseCache(link),\n /** @type {API.MultibaseEncoder<\"z\">} */ (base) || _bases_base58_js__WEBPACK_IMPORTED_MODULE_2__.base58btc.encoder\n )\n default:\n return toStringV1(\n bytes,\n baseCache(link),\n /** @type {API.MultibaseEncoder<Prefix>} */ (base || _bases_base32_js__WEBPACK_IMPORTED_MODULE_3__.base32.encoder)\n )\n }\n}\n\n/**\n * @template {API.UnknownLink} Link\n * @param {Link} link\n * @returns {API.LinkJSON<Link>}\n */\nconst toJSON = (link) => ({\n '/': format(link)\n})\n\n/**\n * @template {API.UnknownLink} Link\n * @param {API.LinkJSON<Link>} json\n */\nconst fromJSON = (json) =>\n CID.parse(json['/'])\n\n/** @type {WeakMap<API.UnknownLink, Map<string, string>>} */\nconst cache = new WeakMap()\n\n/**\n * @param {API.UnknownLink} cid\n * @returns {Map<string, string>}\n */\nconst baseCache = cid => {\n const baseCache = cache.get(cid)\n if (baseCache == null) {\n const baseCache = new Map()\n cache.set(cid, baseCache)\n return baseCache\n }\n return baseCache\n}\n\n/**\n * @template {unknown} [Data=unknown]\n * @template {number} [Format=number]\n * @template {number} [Alg=number]\n * @template {API.Version} [Version=API.Version]\n * @implements {API.Link<Data, Format, Alg, Version>}\n */\n\nclass CID {\n /**\n * @param {Version} version - Version of the CID\n * @param {Format} code - Code of the codec content is encoded in, see https://github.com/multiformats/multicodec/blob/master/table.csv\n * @param {API.MultihashDigest<Alg>} multihash - (Multi)hash of the of the content.\n * @param {Uint8Array} bytes\n *\n */\n constructor (version, code, multihash, bytes) {\n /** @readonly */\n this.code = code\n /** @readonly */\n this.version = version\n /** @readonly */\n this.multihash = multihash\n /** @readonly */\n this.bytes = bytes\n\n // flag to serializers that this is a CID and\n // should be treated specially\n /** @readonly */\n this['/'] = bytes\n }\n\n /**\n * Signalling `cid.asCID === cid` has been replaced with `cid['/'] === cid.bytes`\n * please either use `CID.asCID(cid)` or switch to new signalling mech
/***/ }),
/***/ "./node_modules/multiformats/src/codecs/json.js":
/*!******************************************************!*\
!*** ./node_modules/multiformats/src/codecs/json.js ***!
\******************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ code: () => (/* binding */ code),\n/* harmony export */ decode: () => (/* binding */ decode),\n/* harmony export */ encode: () => (/* binding */ encode),\n/* harmony export */ name: () => (/* binding */ name)\n/* harmony export */ });\n// @ts-check\n\n/**\n * @template T\n * @typedef {import('./interface.js').ByteView<T>} ByteView\n */\n\nconst textEncoder = new TextEncoder()\nconst textDecoder = new TextDecoder()\n\nconst name = 'json'\nconst code = 0x0200\n\n/**\n * @template T\n * @param {T} node\n * @returns {ByteView<T>}\n */\nconst encode = (node) => textEncoder.encode(JSON.stringify(node))\n\n/**\n * @template T\n * @param {ByteView<T>} data\n * @returns {T}\n */\nconst decode = (data) => JSON.parse(textDecoder.decode(data))\n\n\n//# sourceURL=webpack://light/./node_modules/multiformats/src/codecs/json.js?");
/***/ }),
/***/ "./node_modules/multiformats/src/codecs/raw.js":
/*!*****************************************************!*\
!*** ./node_modules/multiformats/src/codecs/raw.js ***!
\*****************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ code: () => (/* binding */ code),\n/* harmony export */ decode: () => (/* binding */ decode),\n/* harmony export */ encode: () => (/* binding */ encode),\n/* harmony export */ name: () => (/* binding */ name)\n/* harmony export */ });\n/* harmony import */ var _bytes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../bytes.js */ \"./node_modules/multiformats/src/bytes.js\");\n// @ts-check\n\n\n\n/**\n * @template T\n * @typedef {import('./interface.js').ByteView<T>} ByteView\n */\n\nconst name = 'raw'\nconst code = 0x55\n\n/**\n * @param {Uint8Array} node\n * @returns {ByteView<Uint8Array>}\n */\nconst encode = (node) => (0,_bytes_js__WEBPACK_IMPORTED_MODULE_0__.coerce)(node)\n\n/**\n * @param {ByteView<Uint8Array>} data\n * @returns {Uint8Array}\n */\nconst decode = (data) => (0,_bytes_js__WEBPACK_IMPORTED_MODULE_0__.coerce)(data)\n\n\n//# sourceURL=webpack://light/./node_modules/multiformats/src/codecs/raw.js?");
/***/ }),
/***/ "./node_modules/multiformats/src/hashes/digest.js":
/*!********************************************************!*\
!*** ./node_modules/multiformats/src/hashes/digest.js ***!
\********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Digest: () => (/* binding */ Digest),\n/* harmony export */ create: () => (/* binding */ create),\n/* harmony export */ decode: () => (/* binding */ decode),\n/* harmony export */ equals: () => (/* binding */ equals)\n/* harmony export */ });\n/* harmony import */ var _bytes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../bytes.js */ \"./node_modules/multiformats/src/bytes.js\");\n/* harmony import */ var _varint_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../varint.js */ \"./node_modules/multiformats/src/varint.js\");\n\n\n\n/**\n * Creates a multihash digest.\n *\n * @template {number} Code\n * @param {Code} code\n * @param {Uint8Array} digest\n */\nconst create = (code, digest) => {\n const size = digest.byteLength\n const sizeOffset = _varint_js__WEBPACK_IMPORTED_MODULE_1__.encodingLength(code)\n const digestOffset = sizeOffset + _varint_js__WEBPACK_IMPORTED_MODULE_1__.encodingLength(size)\n\n const bytes = new Uint8Array(digestOffset + size)\n _varint_js__WEBPACK_IMPORTED_MODULE_1__.encodeTo(code, bytes, 0)\n _varint_js__WEBPACK_IMPORTED_MODULE_1__.encodeTo(size, bytes, sizeOffset)\n bytes.set(digest, digestOffset)\n\n return new Digest(code, size, digest, bytes)\n}\n\n/**\n * Turns bytes representation of multihash digest into an instance.\n *\n * @param {Uint8Array} multihash\n * @returns {MultihashDigest}\n */\nconst decode = (multihash) => {\n const bytes = (0,_bytes_js__WEBPACK_IMPORTED_MODULE_0__.coerce)(multihash)\n const [code, sizeOffset] = _varint_js__WEBPACK_IMPORTED_MODULE_1__.decode(bytes)\n const [size, digestOffset] = _varint_js__WEBPACK_IMPORTED_MODULE_1__.decode(bytes.subarray(sizeOffset))\n const digest = bytes.subarray(sizeOffset + digestOffset)\n\n if (digest.byteLength !== size) {\n throw new Error('Incorrect length')\n }\n\n return new Digest(code, size, digest, bytes)\n}\n\n/**\n * @param {MultihashDigest} a\n * @param {unknown} b\n * @returns {b is MultihashDigest}\n */\nconst equals = (a, b) => {\n if (a === b) {\n return true\n } else {\n const data = /** @type {{code?:unknown, size?:unknown, bytes?:unknown}} */(b)\n\n return (\n a.code === data.code &&\n a.size === data.size &&\n data.bytes instanceof Uint8Array &&\n (0,_bytes_js__WEBPACK_IMPORTED_MODULE_0__.equals)(a.bytes, data.bytes)\n )\n }\n}\n\n/**\n * @typedef {import('./interface.js').MultihashDigest} MultihashDigest\n */\n\n/**\n * Represents a multihash digest which carries information about the\n * hashing algorithm and an actual hash digest.\n *\n * @template {number} Code\n * @template {number} Size\n * @class\n * @implements {MultihashDigest}\n */\nclass Digest {\n /**\n * Creates a multihash digest.\n *\n * @param {Code} code\n * @param {Size} size\n * @param {Uint8Array} digest\n * @param {Uint8Array} bytes\n */\n constructor (code, size, digest, bytes) {\n this.code = code\n this.size = size\n this.digest = digest\n this.bytes = bytes\n }\n}\n\n\n//# sourceURL=webpack://light/./node_modules/multiformats/src/hashes/digest.js?");
/***/ }),
/***/ "./node_modules/multiformats/src/hashes/hasher.js":
/*!********************************************************!*\
!*** ./node_modules/multiformats/src/hashes/hasher.js ***!
\********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Hasher: () => (/* binding */ Hasher),\n/* harmony export */ from: () => (/* binding */ from)\n/* harmony export */ });\n/* harmony import */ var _digest_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./digest.js */ \"./node_modules/multiformats/src/hashes/digest.js\");\n\n\n/**\n * @template {string} Name\n * @template {number} Code\n * @param {object} options\n * @param {Name} options.name\n * @param {Code} options.code\n * @param {(input: Uint8Array) => Await<Uint8Array>} options.encode\n */\nconst from = ({ name, code, encode }) => new Hasher(name, code, encode)\n\n/**\n * Hasher represents a hashing algorithm implementation that produces as\n * `MultihashDigest`.\n *\n * @template {string} Name\n * @template {number} Code\n * @class\n * @implements {MultihashHasher<Code>}\n */\nclass Hasher {\n /**\n *\n * @param {Name} name\n * @param {Code} code\n * @param {(input: Uint8Array) => Await<Uint8Array>} encode\n */\n constructor (name, code, encode) {\n this.name = name\n this.code = code\n this.encode = encode\n }\n\n /**\n * @param {Uint8Array} input\n * @returns {Await<Digest.Digest<Code, number>>}\n */\n digest (input) {\n if (input instanceof Uint8Array) {\n const result = this.encode(input)\n return result instanceof Uint8Array\n ? _digest_js__WEBPACK_IMPORTED_MODULE_0__.create(this.code, result)\n /* c8 ignore next 1 */\n : result.then(digest => _digest_js__WEBPACK_IMPORTED_MODULE_0__.create(this.code, digest))\n } else {\n throw Error('Unknown type, must be binary type')\n /* c8 ignore next 1 */\n }\n }\n}\n\n/**\n * @template {number} Alg\n * @typedef {import('./interface.js').MultihashHasher} MultihashHasher\n */\n\n/**\n * @template T\n * @typedef {Promise<T>|T} Await\n */\n\n\n//# sourceURL=webpack://light/./node_modules/multiformats/src/hashes/hasher.js?");
/***/ }),
/***/ "./node_modules/multiformats/src/hashes/identity.js":
/*!**********************************************************!*\
!*** ./node_modules/multiformats/src/hashes/identity.js ***!
\**********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ identity: () => (/* binding */ identity)\n/* harmony export */ });\n/* harmony import */ var _bytes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../bytes.js */ \"./node_modules/multiformats/src/bytes.js\");\n/* harmony import */ var _digest_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./digest.js */ \"./node_modules/multiformats/src/hashes/digest.js\");\n\n\n\nconst code = 0x0\nconst name = 'identity'\n\n/** @type {(input:Uint8Array) => Uint8Array} */\nconst encode = _bytes_js__WEBPACK_IMPORTED_MODULE_0__.coerce\n\n/**\n * @param {Uint8Array} input\n * @returns {Digest.Digest<typeof code, number>}\n */\nconst digest = (input) => _digest_js__WEBPACK_IMPORTED_MODULE_1__.create(code, encode(input))\n\nconst identity = { code, name, encode, digest }\n\n\n//# sourceURL=webpack://light/./node_modules/multiformats/src/hashes/identity.js?");
/***/ }),
/***/ "./node_modules/multiformats/src/hashes/sha2-browser.js":
/*!**************************************************************!*\
!*** ./node_modules/multiformats/src/hashes/sha2-browser.js ***!
\**************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ sha256: () => (/* binding */ sha256),\n/* harmony export */ sha512: () => (/* binding */ sha512)\n/* harmony export */ });\n/* harmony import */ var _hasher_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./hasher.js */ \"./node_modules/multiformats/src/hashes/hasher.js\");\n/* global crypto */\n\n\n\n/**\n * @param {AlgorithmIdentifier} name\n */\nconst sha = name =>\n /**\n * @param {Uint8Array} data\n */\n async data => new Uint8Array(await crypto.subtle.digest(name, data))\n\nconst sha256 = (0,_hasher_js__WEBPACK_IMPORTED_MODULE_0__.from)({\n name: 'sha2-256',\n code: 0x12,\n encode: sha('SHA-256')\n})\n\nconst sha512 = (0,_hasher_js__WEBPACK_IMPORTED_MODULE_0__.from)({\n name: 'sha2-512',\n code: 0x13,\n encode: sha('SHA-512')\n})\n\n\n//# sourceURL=webpack://light/./node_modules/multiformats/src/hashes/sha2-browser.js?");
/***/ }),
/***/ "./node_modules/multiformats/src/index.js":
/*!************************************************!*\
!*** ./node_modules/multiformats/src/index.js ***!
\************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ CID: () => (/* reexport safe */ _cid_js__WEBPACK_IMPORTED_MODULE_0__.CID),\n/* harmony export */ bytes: () => (/* reexport module object */ _bytes_js__WEBPACK_IMPORTED_MODULE_2__),\n/* harmony export */ digest: () => (/* reexport module object */ _hashes_digest_js__WEBPACK_IMPORTED_MODULE_4__),\n/* harmony export */ hasher: () => (/* reexport module object */ _hashes_hasher_js__WEBPACK_IMPORTED_MODULE_3__),\n/* harmony export */ varint: () => (/* reexport module object */ _varint_js__WEBPACK_IMPORTED_MODULE_1__)\n/* harmony export */ });\n/* harmony import */ var _cid_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cid.js */ \"./node_modules/multiformats/src/cid.js\");\n/* harmony import */ var _varint_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./varint.js */ \"./node_modules/multiformats/src/varint.js\");\n/* harmony import */ var _bytes_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./bytes.js */ \"./node_modules/multiformats/src/bytes.js\");\n/* harmony import */ var _hashes_hasher_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./hashes/hasher.js */ \"./node_modules/multiformats/src/hashes/hasher.js\");\n/* harmony import */ var _hashes_digest_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hashes/digest.js */ \"./node_modules/multiformats/src/hashes/digest.js\");\n/* harmony import */ var _interface_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./interface.js */ \"./node_modules/multiformats/src/interface.js\");\n\n\n\n\n\n// This way TS will also expose all the types from module\n\n\n\n\n\n//# sourceURL=webpack://light/./node_modules/multiformats/src/index.js?");
/***/ }),
/***/ "./node_modules/multiformats/src/interface.js":
/*!****************************************************!*\
!*** ./node_modules/multiformats/src/interface.js ***!
\****************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n// this is dummy module overlayed by interface.ts\n\n\n//# sourceURL=webpack://light/./node_modules/multiformats/src/interface.js?");
/***/ }),
/***/ "./node_modules/multiformats/src/link/interface.js":
/*!*********************************************************!*\
!*** ./node_modules/multiformats/src/link/interface.js ***!
\*********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n// this is dummy module overlayed by interface.ts\n\n\n//# sourceURL=webpack://light/./node_modules/multiformats/src/link/interface.js?");
/***/ }),
/***/ "./node_modules/multiformats/src/varint.js":
/*!*************************************************!*\
!*** ./node_modules/multiformats/src/varint.js ***!
\*************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ decode: () => (/* binding */ decode),\n/* harmony export */ encodeTo: () => (/* binding */ encodeTo),\n/* harmony export */ encodingLength: () => (/* binding */ encodingLength)\n/* harmony export */ });\n/* harmony import */ var _vendor_varint_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../vendor/varint.js */ \"./node_modules/multiformats/vendor/varint.js\");\n\n\n/**\n * @param {Uint8Array} data\n * @param {number} [offset=0]\n * @returns {[number, number]}\n */\nconst decode = (data, offset = 0) => {\n const code = _vendor_varint_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].decode(data, offset)\n return [code, _vendor_varint_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].decode.bytes]\n}\n\n/**\n * @param {number} int\n * @param {Uint8Array} target\n * @param {number} [offset=0]\n */\nconst encodeTo = (int, target, offset = 0) => {\n _vendor_varint_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].encode(int, target, offset)\n return target\n}\n\n/**\n * @param {number} int\n * @returns {number}\n */\nconst encodingLength = (int) => {\n return _vendor_varint_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].encodingLength(int)\n}\n\n\n//# sourceURL=webpack://light/./node_modules/multiformats/src/varint.js?");
/***/ }),
/***/ "./node_modules/multiformats/vendor/base-x.js":
/*!****************************************************!*\
!*** ./node_modules/multiformats/vendor/base-x.js ***!
\****************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// base-x encoding / decoding\n// Copyright (c) 2018 base-x contributors\n// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)\n// Distributed under the MIT software license, see the accompanying\n// file LICENSE or http://www.opensource.org/licenses/mit-license.php.\nfunction base (ALPHABET, name) {\n if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }\n var BASE_MAP = new Uint8Array(256);\n for (var j = 0; j < BASE_MAP.length; j++) {\n BASE_MAP[j] = 255;\n }\n for (var i = 0; i < ALPHABET.length; i++) {\n var x = ALPHABET.charAt(i);\n var xc = x.charCodeAt(0);\n if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') }\n BASE_MAP[xc] = i;\n }\n var BASE = ALPHABET.length;\n var LEADER = ALPHABET.charAt(0);\n var FACTOR = Math.log(BASE) / Math.log(256); // log(BASE) / log(256), rounded up\n var iFACTOR = Math.log(256) / Math.log(BASE); // log(256) / log(BASE), rounded up\n function encode (source) {\n if (source instanceof Uint8Array) ; else if (ArrayBuffer.isView(source)) {\n source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength);\n } else if (Array.isArray(source)) {\n source = Uint8Array.from(source);\n }\n if (!(source instanceof Uint8Array)) { throw new TypeError('Expected Uint8Array') }\n if (source.length === 0) { return '' }\n // Skip & count leading zeroes.\n var zeroes = 0;\n var length = 0;\n var pbegin = 0;\n var pend = source.length;\n while (pbegin !== pend && source[pbegin] === 0) {\n pbegin++;\n zeroes++;\n }\n // Allocate enough space in big-endian base58 representation.\n var size = ((pend - pbegin) * iFACTOR + 1) >>> 0;\n var b58 = new Uint8Array(size);\n // Process the bytes.\n while (pbegin !== pend) {\n var carry = source[pbegin];\n // Apply \"b58 = b58 * 256 + ch\".\n var i = 0;\n for (var it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {\n carry += (256 * b58[it1]) >>> 0;\n b58[it1] = (carry % BASE) >>> 0;\n carry = (carry / BASE) >>> 0;\n }\n if (carry !== 0) { throw new Error('Non-zero carry') }\n length = i;\n pbegin++;\n }\n // Skip leading zeroes in base58 result.\n var it2 = size - length;\n while (it2 !== size && b58[it2] === 0) {\n it2++;\n }\n // Translate the result into a string.\n var str = LEADER.repeat(zeroes);\n for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]); }\n return str\n }\n function decodeUnsafe (source) {\n if (typeof source !== 'string') { throw new TypeError('Expected String') }\n if (source.length === 0) { return new Uint8Array() }\n var psz = 0;\n // Skip leading spaces.\n if (source[psz] === ' ') { return }\n // Skip and count leading '1's.\n var zeroes = 0;\n var length = 0;\n while (source[psz] === LEADER) {\n zeroes++;\n psz++;\n }\n // Allocate enough space in big-endian base256 representation.\n var size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up.\n var b256 = new Uint8Array(size);\n // Process the characters.\n while (source[psz]) {\n // Decode character\n var carry = BASE_MAP[source.charCodeAt(psz)];\n // Invalid character\n if (carry === 255) { return }\n var i = 0;\n for (var it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {\n carry += (BASE * b256[it3]) >>> 0;\n b256[it3] = (carry % 256) >>> 0;\n carry = (carry / 256) >>> 0;\n }\n if (carry !== 0) { throw new Error('Non-zero carry') }\n length = i;\n psz++;\n }\n // Skip trailing spaces.\n if (source[psz] === ' ') { return }\n // Skip leading
/***/ }),
/***/ "./node_modules/multiformats/vendor/varint.js":
/*!****************************************************!*\
!*** ./node_modules/multiformats/vendor/varint.js ***!
\****************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\nvar encode_1 = encode;\n\nvar MSB = 0x80\n , REST = 0x7F\n , MSBALL = ~REST\n , INT = Math.pow(2, 31);\n\nfunction encode(num, out, offset) {\n out = out || [];\n offset = offset || 0;\n var oldOffset = offset;\n\n while(num >= INT) {\n out[offset++] = (num & 0xFF) | MSB;\n num /= 128;\n }\n while(num & MSBALL) {\n out[offset++] = (num & 0xFF) | MSB;\n num >>>= 7;\n }\n out[offset] = num | 0;\n \n encode.bytes = offset - oldOffset + 1;\n \n return out\n}\n\nvar decode = read;\n\nvar MSB$1 = 0x80\n , REST$1 = 0x7F;\n\nfunction read(buf, offset) {\n var res = 0\n , offset = offset || 0\n , shift = 0\n , counter = offset\n , b\n , l = buf.length;\n\n do {\n if (counter >= l) {\n read.bytes = 0;\n throw new RangeError('Could not decode varint')\n }\n b = buf[counter++];\n res += shift < 28\n ? (b & REST$1) << shift\n : (b & REST$1) * Math.pow(2, shift);\n shift += 7;\n } while (b >= MSB$1)\n\n read.bytes = counter - offset;\n\n return res\n}\n\nvar N1 = Math.pow(2, 7);\nvar N2 = Math.pow(2, 14);\nvar N3 = Math.pow(2, 21);\nvar N4 = Math.pow(2, 28);\nvar N5 = Math.pow(2, 35);\nvar N6 = Math.pow(2, 42);\nvar N7 = Math.pow(2, 49);\nvar N8 = Math.pow(2, 56);\nvar N9 = Math.pow(2, 63);\n\nvar length = function (value) {\n return (\n value < N1 ? 1\n : value < N2 ? 2\n : value < N3 ? 3\n : value < N4 ? 4\n : value < N5 ? 5\n : value < N6 ? 6\n : value < N7 ? 7\n : value < N8 ? 8\n : value < N9 ? 9\n : 10\n )\n};\n\nvar varint = {\n encode: encode_1\n , decode: decode\n , encodingLength: length\n};\n\nvar _brrp_varint = varint;\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_brrp_varint);\n\n\n//# sourceURL=webpack://light/./node_modules/multiformats/vendor/varint.js?");
/***/ }),
/***/ "./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base.js":
/*!**********************************************************************************!*\
!*** ./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base.js ***!
\**********************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Codec: () => (/* binding */ Codec),\n/* harmony export */ baseX: () => (/* binding */ baseX),\n/* harmony export */ from: () => (/* binding */ from),\n/* harmony export */ or: () => (/* binding */ or),\n/* harmony export */ rfc4648: () => (/* binding */ rfc4648)\n/* harmony export */ });\n/* harmony import */ var _vendor_base_x_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../vendor/base-x.js */ \"./node_modules/multihashes/node_modules/multiformats/esm/vendor/base-x.js\");\n/* harmony import */ var _bytes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../bytes.js */ \"./node_modules/multihashes/node_modules/multiformats/esm/src/bytes.js\");\n\n\nclass Encoder {\n constructor(name, prefix, baseEncode) {\n this.name = name;\n this.prefix = prefix;\n this.baseEncode = baseEncode;\n }\n encode(bytes) {\n if (bytes instanceof Uint8Array) {\n return `${ this.prefix }${ this.baseEncode(bytes) }`;\n } else {\n throw Error('Unknown type, must be binary type');\n }\n }\n}\nclass Decoder {\n constructor(name, prefix, baseDecode) {\n this.name = name;\n this.prefix = prefix;\n if (prefix.codePointAt(0) === undefined) {\n throw new Error('Invalid prefix character');\n }\n this.prefixCodePoint = prefix.codePointAt(0);\n this.baseDecode = baseDecode;\n }\n decode(text) {\n if (typeof text === 'string') {\n if (text.codePointAt(0) !== this.prefixCodePoint) {\n throw Error(`Unable to decode multibase string ${ JSON.stringify(text) }, ${ this.name } decoder only supports inputs prefixed with ${ this.prefix }`);\n }\n return this.baseDecode(text.slice(this.prefix.length));\n } else {\n throw Error('Can only multibase decode strings');\n }\n }\n or(decoder) {\n return or(this, decoder);\n }\n}\nclass ComposedDecoder {\n constructor(decoders) {\n this.decoders = decoders;\n }\n or(decoder) {\n return or(this, decoder);\n }\n decode(input) {\n const prefix = input[0];\n const decoder = this.decoders[prefix];\n if (decoder) {\n return decoder.decode(input);\n } else {\n throw RangeError(`Unable to decode multibase string ${ JSON.stringify(input) }, only inputs prefixed with ${ Object.keys(this.decoders) } are supported`);\n }\n }\n}\nconst or = (left, right) => new ComposedDecoder({\n ...left.decoders || { [left.prefix]: left },\n ...right.decoders || { [right.prefix]: right }\n});\nclass Codec {\n constructor(name, prefix, baseEncode, baseDecode) {\n this.name = name;\n this.prefix = prefix;\n this.baseEncode = baseEncode;\n this.baseDecode = baseDecode;\n this.encoder = new Encoder(name, prefix, baseEncode);\n this.decoder = new Decoder(name, prefix, baseDecode);\n }\n encode(input) {\n return this.encoder.encode(input);\n }\n decode(input) {\n return this.decoder.decode(input);\n }\n}\nconst from = ({name, prefix, encode, decode}) => new Codec(name, prefix, encode, decode);\nconst baseX = ({prefix, name, alphabet}) => {\n const {encode, decode} = (0,_vendor_base_x_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(alphabet, name);\n return from({\n prefix,\n name,\n encode,\n decode: text => (0,_bytes_js__WEBPACK_IMPORTED_MODULE_1__.coerce)(decode(text))\n });\n};\nconst decode = (string, alphabet, bitsPerChar, name) => {\n const codes = {};\n for (let i = 0; i < alphabet.length; ++i) {\n codes[alphabet[i]] = i;\n }\n let end = string.length;\n while (string[end - 1] === '=') {\n --end;\n }\n const out = new Uint8Array(end * bitsPerChar / 8 | 0);\n let bits = 0;\n let buffer = 0;\n let written = 0;\n for (let i = 0; i < end; ++i) {\n const value = codes[string[i]];\n if (value === undefined) {\n throw new SyntaxError(`Non-${ name } character`);\n }\n buffer = buffer << bitsPerChar | value;\n bits += bitsPerChar;\n if (bits >= 8) {\n bits -= 8;\n
/***/ }),
/***/ "./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base10.js":
/*!************************************************************************************!*\
!*** ./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base10.js ***!
\************************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ base10: () => (/* binding */ base10)\n/* harmony export */ });\n/* harmony import */ var _base_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base.js */ \"./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base.js\");\n\nconst base10 = (0,_base_js__WEBPACK_IMPORTED_MODULE_0__.baseX)({\n prefix: '9',\n name: 'base10',\n alphabet: '0123456789'\n});\n\n//# sourceURL=webpack://light/./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base10.js?");
/***/ }),
/***/ "./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base16.js":
/*!************************************************************************************!*\
!*** ./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base16.js ***!
\************************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ base16: () => (/* binding */ base16),\n/* harmony export */ base16upper: () => (/* binding */ base16upper)\n/* harmony export */ });\n/* harmony import */ var _base_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base.js */ \"./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base.js\");\n\nconst base16 = (0,_base_js__WEBPACK_IMPORTED_MODULE_0__.rfc4648)({\n prefix: 'f',\n name: 'base16',\n alphabet: '0123456789abcdef',\n bitsPerChar: 4\n});\nconst base16upper = (0,_base_js__WEBPACK_IMPORTED_MODULE_0__.rfc4648)({\n prefix: 'F',\n name: 'base16upper',\n alphabet: '0123456789ABCDEF',\n bitsPerChar: 4\n});\n\n//# sourceURL=webpack://light/./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base16.js?");
/***/ }),
/***/ "./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base2.js":
/*!***********************************************************************************!*\
!*** ./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base2.js ***!
\***********************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ base2: () => (/* binding */ base2)\n/* harmony export */ });\n/* harmony import */ var _base_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base.js */ \"./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base.js\");\n\nconst base2 = (0,_base_js__WEBPACK_IMPORTED_MODULE_0__.rfc4648)({\n prefix: '0',\n name: 'base2',\n alphabet: '01',\n bitsPerChar: 1\n});\n\n//# sourceURL=webpack://light/./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base2.js?");
/***/ }),
/***/ "./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base256emoji.js":
/*!******************************************************************************************!*\
!*** ./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base256emoji.js ***!
\******************************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ base256emoji: () => (/* binding */ base256emoji)\n/* harmony export */ });\n/* harmony import */ var _base_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base.js */ \"./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base.js\");\n\nconst alphabet = Array.from('\\uD83D\\uDE80\\uD83E\\uDE90\\u2604\\uD83D\\uDEF0\\uD83C\\uDF0C\\uD83C\\uDF11\\uD83C\\uDF12\\uD83C\\uDF13\\uD83C\\uDF14\\uD83C\\uDF15\\uD83C\\uDF16\\uD83C\\uDF17\\uD83C\\uDF18\\uD83C\\uDF0D\\uD83C\\uDF0F\\uD83C\\uDF0E\\uD83D\\uDC09\\u2600\\uD83D\\uDCBB\\uD83D\\uDDA5\\uD83D\\uDCBE\\uD83D\\uDCBF\\uD83D\\uDE02\\u2764\\uD83D\\uDE0D\\uD83E\\uDD23\\uD83D\\uDE0A\\uD83D\\uDE4F\\uD83D\\uDC95\\uD83D\\uDE2D\\uD83D\\uDE18\\uD83D\\uDC4D\\uD83D\\uDE05\\uD83D\\uDC4F\\uD83D\\uDE01\\uD83D\\uDD25\\uD83E\\uDD70\\uD83D\\uDC94\\uD83D\\uDC96\\uD83D\\uDC99\\uD83D\\uDE22\\uD83E\\uDD14\\uD83D\\uDE06\\uD83D\\uDE44\\uD83D\\uDCAA\\uD83D\\uDE09\\u263A\\uD83D\\uDC4C\\uD83E\\uDD17\\uD83D\\uDC9C\\uD83D\\uDE14\\uD83D\\uDE0E\\uD83D\\uDE07\\uD83C\\uDF39\\uD83E\\uDD26\\uD83C\\uDF89\\uD83D\\uDC9E\\u270C\\u2728\\uD83E\\uDD37\\uD83D\\uDE31\\uD83D\\uDE0C\\uD83C\\uDF38\\uD83D\\uDE4C\\uD83D\\uDE0B\\uD83D\\uDC97\\uD83D\\uDC9A\\uD83D\\uDE0F\\uD83D\\uDC9B\\uD83D\\uDE42\\uD83D\\uDC93\\uD83E\\uDD29\\uD83D\\uDE04\\uD83D\\uDE00\\uD83D\\uDDA4\\uD83D\\uDE03\\uD83D\\uDCAF\\uD83D\\uDE48\\uD83D\\uDC47\\uD83C\\uDFB6\\uD83D\\uDE12\\uD83E\\uDD2D\\u2763\\uD83D\\uDE1C\\uD83D\\uDC8B\\uD83D\\uDC40\\uD83D\\uDE2A\\uD83D\\uDE11\\uD83D\\uDCA5\\uD83D\\uDE4B\\uD83D\\uDE1E\\uD83D\\uDE29\\uD83D\\uDE21\\uD83E\\uDD2A\\uD83D\\uDC4A\\uD83E\\uDD73\\uD83D\\uDE25\\uD83E\\uDD24\\uD83D\\uDC49\\uD83D\\uDC83\\uD83D\\uDE33\\u270B\\uD83D\\uDE1A\\uD83D\\uDE1D\\uD83D\\uDE34\\uD83C\\uDF1F\\uD83D\\uDE2C\\uD83D\\uDE43\\uD83C\\uDF40\\uD83C\\uDF37\\uD83D\\uDE3B\\uD83D\\uDE13\\u2B50\\u2705\\uD83E\\uDD7A\\uD83C\\uDF08\\uD83D\\uDE08\\uD83E\\uDD18\\uD83D\\uDCA6\\u2714\\uD83D\\uDE23\\uD83C\\uDFC3\\uD83D\\uDC90\\u2639\\uD83C\\uDF8A\\uD83D\\uDC98\\uD83D\\uDE20\\u261D\\uD83D\\uDE15\\uD83C\\uDF3A\\uD83C\\uDF82\\uD83C\\uDF3B\\uD83D\\uDE10\\uD83D\\uDD95\\uD83D\\uDC9D\\uD83D\\uDE4A\\uD83D\\uDE39\\uD83D\\uDDE3\\uD83D\\uDCAB\\uD83D\\uDC80\\uD83D\\uDC51\\uD83C\\uDFB5\\uD83E\\uDD1E\\uD83D\\uDE1B\\uD83D\\uDD34\\uD83D\\uDE24\\uD83C\\uDF3C\\uD83D\\uDE2B\\u26BD\\uD83E\\uDD19\\u2615\\uD83C\\uDFC6\\uD83E\\uDD2B\\uD83D\\uDC48\\uD83D\\uDE2E\\uD83D\\uDE46\\uD83C\\uDF7B\\uD83C\\uDF43\\uD83D\\uDC36\\uD83D\\uDC81\\uD83D\\uDE32\\uD83C\\uDF3F\\uD83E\\uDDE1\\uD83C\\uDF81\\u26A1\\uD83C\\uDF1E\\uD83C\\uDF88\\u274C\\u270A\\uD83D\\uDC4B\\uD83D\\uDE30\\uD83E\\uDD28\\uD83D\\uDE36\\uD83E\\uDD1D\\uD83D\\uDEB6\\uD83D\\uDCB0\\uD83C\\uDF53\\uD83D\\uDCA2\\uD83E\\uDD1F\\uD83D\\uDE41\\uD83D\\uDEA8\\uD83D\\uDCA8\\uD83E\\uDD2C\\u2708\\uD83C\\uDF80\\uD83C\\uDF7A\\uD83E\\uDD13\\uD83D\\uDE19\\uD83D\\uDC9F\\uD83C\\uDF31\\uD83D\\uDE16\\uD83D\\uDC76\\uD83E\\uDD74\\u25B6\\u27A1\\u2753\\uD83D\\uDC8E\\uD83D\\uDCB8\\u2B07\\uD83D\\uDE28\\uD83C\\uDF1A\\uD83E\\uDD8B\\uD83D\\uDE37\\uD83D\\uDD7A\\u26A0\\uD83D\\uDE45\\uD83D\\uDE1F\\uD83D\\uDE35\\uD83D\\uDC4E\\uD83E\\uDD32\\uD83E\\uDD20\\uD83E\\uDD27\\uD83D\\uDCCC\\uD83D\\uDD35\\uD83D\\uDC85\\uD83E\\uDDD0\\uD83D\\uDC3E\\uD83C\\uDF52\\uD83D\\uDE17\\uD83E\\uDD11\\uD83C\\uDF0A\\uD83E\\uDD2F\\uD83D\\uDC37\\u260E\\uD83D\\uDCA7\\uD83D\\uDE2F\\uD83D\\uDC86\\uD83D\\uDC46\\uD83C\\uDFA4\\uD83D\\uDE47\\uD83C\\uDF51\\u2744\\uD83C\\uDF34\\uD83D\\uDCA3\\uD83D\\uDC38\\uD83D\\uDC8C\\uD83D\\uDCCD\\uD83E\\uDD40\\uD83E\\uDD22\\uD83D\\uDC45\\uD83D\\uDCA1\\uD83D\\uDCA9\\uD83D\\uDC50\\uD83D\\uDCF8\\uD83D\\uDC7B\\uD83E\\uDD10\\uD83E\\uDD2E\\uD83C\\uDFBC\\uD83E\\uDD75\\uD83D\\uDEA9\\uD83C\\uDF4E\\uD83C\\uDF4A\\uD83D\\uDC7C\\uD83D\\uDC8D\\uD83D\\uDCE3\\uD83E\\uDD42');\nconst alphabetBytesToChars = alphabet.reduce((p, c, i) => {\n p[i] = c;\n return p;\n}, []);\nconst alphabetCharsToBytes = alphabet.reduce((p, c, i) => {\n p[c.codePointAt(0)] = i;\n return p;\n}, []);\nfunction encode(data) {\n return data.reduce((p,
/***/ }),
/***/ "./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base32.js":
/*!************************************************************************************!*\
!*** ./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base32.js ***!
\************************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ base32: () => (/* binding */ base32),\n/* harmony export */ base32hex: () => (/* binding */ base32hex),\n/* harmony export */ base32hexpad: () => (/* binding */ base32hexpad),\n/* harmony export */ base32hexpadupper: () => (/* binding */ base32hexpadupper),\n/* harmony export */ base32hexupper: () => (/* binding */ base32hexupper),\n/* harmony export */ base32pad: () => (/* binding */ base32pad),\n/* harmony export */ base32padupper: () => (/* binding */ base32padupper),\n/* harmony export */ base32upper: () => (/* binding */ base32upper),\n/* harmony export */ base32z: () => (/* binding */ base32z)\n/* harmony export */ });\n/* harmony import */ var _base_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base.js */ \"./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base.js\");\n\nconst base32 = (0,_base_js__WEBPACK_IMPORTED_MODULE_0__.rfc4648)({\n prefix: 'b',\n name: 'base32',\n alphabet: 'abcdefghijklmnopqrstuvwxyz234567',\n bitsPerChar: 5\n});\nconst base32upper = (0,_base_js__WEBPACK_IMPORTED_MODULE_0__.rfc4648)({\n prefix: 'B',\n name: 'base32upper',\n alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567',\n bitsPerChar: 5\n});\nconst base32pad = (0,_base_js__WEBPACK_IMPORTED_MODULE_0__.rfc4648)({\n prefix: 'c',\n name: 'base32pad',\n alphabet: 'abcdefghijklmnopqrstuvwxyz234567=',\n bitsPerChar: 5\n});\nconst base32padupper = (0,_base_js__WEBPACK_IMPORTED_MODULE_0__.rfc4648)({\n prefix: 'C',\n name: 'base32padupper',\n alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=',\n bitsPerChar: 5\n});\nconst base32hex = (0,_base_js__WEBPACK_IMPORTED_MODULE_0__.rfc4648)({\n prefix: 'v',\n name: 'base32hex',\n alphabet: '0123456789abcdefghijklmnopqrstuv',\n bitsPerChar: 5\n});\nconst base32hexupper = (0,_base_js__WEBPACK_IMPORTED_MODULE_0__.rfc4648)({\n prefix: 'V',\n name: 'base32hexupper',\n alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV',\n bitsPerChar: 5\n});\nconst base32hexpad = (0,_base_js__WEBPACK_IMPORTED_MODULE_0__.rfc4648)({\n prefix: 't',\n name: 'base32hexpad',\n alphabet: '0123456789abcdefghijklmnopqrstuv=',\n bitsPerChar: 5\n});\nconst base32hexpadupper = (0,_base_js__WEBPACK_IMPORTED_MODULE_0__.rfc4648)({\n prefix: 'T',\n name: 'base32hexpadupper',\n alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV=',\n bitsPerChar: 5\n});\nconst base32z = (0,_base_js__WEBPACK_IMPORTED_MODULE_0__.rfc4648)({\n prefix: 'h',\n name: 'base32z',\n alphabet: 'ybndrfg8ejkmcpqxot1uwisza345h769',\n bitsPerChar: 5\n});\n\n//# sourceURL=webpack://light/./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base32.js?");
/***/ }),
/***/ "./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base36.js":
/*!************************************************************************************!*\
!*** ./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base36.js ***!
\************************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ base36: () => (/* binding */ base36),\n/* harmony export */ base36upper: () => (/* binding */ base36upper)\n/* harmony export */ });\n/* harmony import */ var _base_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base.js */ \"./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base.js\");\n\nconst base36 = (0,_base_js__WEBPACK_IMPORTED_MODULE_0__.baseX)({\n prefix: 'k',\n name: 'base36',\n alphabet: '0123456789abcdefghijklmnopqrstuvwxyz'\n});\nconst base36upper = (0,_base_js__WEBPACK_IMPORTED_MODULE_0__.baseX)({\n prefix: 'K',\n name: 'base36upper',\n alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'\n});\n\n//# sourceURL=webpack://light/./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base36.js?");
/***/ }),
/***/ "./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base58.js":
/*!************************************************************************************!*\
!*** ./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base58.js ***!
\************************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ base58btc: () => (/* binding */ base58btc),\n/* harmony export */ base58flickr: () => (/* binding */ base58flickr)\n/* harmony export */ });\n/* harmony import */ var _base_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base.js */ \"./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base.js\");\n\nconst base58btc = (0,_base_js__WEBPACK_IMPORTED_MODULE_0__.baseX)({\n name: 'base58btc',\n prefix: 'z',\n alphabet: '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'\n});\nconst base58flickr = (0,_base_js__WEBPACK_IMPORTED_MODULE_0__.baseX)({\n name: 'base58flickr',\n prefix: 'Z',\n alphabet: '123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ'\n});\n\n//# sourceURL=webpack://light/./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base58.js?");
/***/ }),
/***/ "./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base64.js":
/*!************************************************************************************!*\
!*** ./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base64.js ***!
\************************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ base64: () => (/* binding */ base64),\n/* harmony export */ base64pad: () => (/* binding */ base64pad),\n/* harmony export */ base64url: () => (/* binding */ base64url),\n/* harmony export */ base64urlpad: () => (/* binding */ base64urlpad)\n/* harmony export */ });\n/* harmony import */ var _base_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base.js */ \"./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base.js\");\n\nconst base64 = (0,_base_js__WEBPACK_IMPORTED_MODULE_0__.rfc4648)({\n prefix: 'm',\n name: 'base64',\n alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',\n bitsPerChar: 6\n});\nconst base64pad = (0,_base_js__WEBPACK_IMPORTED_MODULE_0__.rfc4648)({\n prefix: 'M',\n name: 'base64pad',\n alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=',\n bitsPerChar: 6\n});\nconst base64url = (0,_base_js__WEBPACK_IMPORTED_MODULE_0__.rfc4648)({\n prefix: 'u',\n name: 'base64url',\n alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_',\n bitsPerChar: 6\n});\nconst base64urlpad = (0,_base_js__WEBPACK_IMPORTED_MODULE_0__.rfc4648)({\n prefix: 'U',\n name: 'base64urlpad',\n alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=',\n bitsPerChar: 6\n});\n\n//# sourceURL=webpack://light/./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base64.js?");
/***/ }),
/***/ "./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base8.js":
/*!***********************************************************************************!*\
!*** ./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base8.js ***!
\***********************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ base8: () => (/* binding */ base8)\n/* harmony export */ });\n/* harmony import */ var _base_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base.js */ \"./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base.js\");\n\nconst base8 = (0,_base_js__WEBPACK_IMPORTED_MODULE_0__.rfc4648)({\n prefix: '7',\n name: 'base8',\n alphabet: '01234567',\n bitsPerChar: 3\n});\n\n//# sourceURL=webpack://light/./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base8.js?");
/***/ }),
/***/ "./node_modules/multihashes/node_modules/multiformats/esm/src/bases/identity.js":
/*!**************************************************************************************!*\
!*** ./node_modules/multihashes/node_modules/multiformats/esm/src/bases/identity.js ***!
\**************************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ identity: () => (/* binding */ identity)\n/* harmony export */ });\n/* harmony import */ var _base_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base.js */ \"./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base.js\");\n/* harmony import */ var _bytes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../bytes.js */ \"./node_modules/multihashes/node_modules/multiformats/esm/src/bytes.js\");\n\n\nconst identity = (0,_base_js__WEBPACK_IMPORTED_MODULE_0__.from)({\n prefix: '\\0',\n name: 'identity',\n encode: buf => (0,_bytes_js__WEBPACK_IMPORTED_MODULE_1__.toString)(buf),\n decode: str => (0,_bytes_js__WEBPACK_IMPORTED_MODULE_1__.fromString)(str)\n});\n\n//# sourceURL=webpack://light/./node_modules/multihashes/node_modules/multiformats/esm/src/bases/identity.js?");
/***/ }),
/***/ "./node_modules/multihashes/node_modules/multiformats/esm/src/basics.js":
/*!******************************************************************************!*\
!*** ./node_modules/multihashes/node_modules/multiformats/esm/src/basics.js ***!
\******************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ CID: () => (/* reexport safe */ _index_js__WEBPACK_IMPORTED_MODULE_14__.CID),\n/* harmony export */ bases: () => (/* binding */ bases),\n/* harmony export */ bytes: () => (/* reexport safe */ _index_js__WEBPACK_IMPORTED_MODULE_14__.bytes),\n/* harmony export */ codecs: () => (/* binding */ codecs),\n/* harmony export */ digest: () => (/* reexport safe */ _index_js__WEBPACK_IMPORTED_MODULE_14__.digest),\n/* harmony export */ hasher: () => (/* reexport safe */ _index_js__WEBPACK_IMPORTED_MODULE_14__.hasher),\n/* harmony export */ hashes: () => (/* binding */ hashes),\n/* harmony export */ varint: () => (/* reexport safe */ _index_js__WEBPACK_IMPORTED_MODULE_14__.varint)\n/* harmony export */ });\n/* harmony import */ var _bases_identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./bases/identity.js */ \"./node_modules/multihashes/node_modules/multiformats/esm/src/bases/identity.js\");\n/* harmony import */ var _bases_base2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./bases/base2.js */ \"./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base2.js\");\n/* harmony import */ var _bases_base8_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./bases/base8.js */ \"./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base8.js\");\n/* harmony import */ var _bases_base10_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./bases/base10.js */ \"./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base10.js\");\n/* harmony import */ var _bases_base16_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./bases/base16.js */ \"./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base16.js\");\n/* harmony import */ var _bases_base32_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./bases/base32.js */ \"./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base32.js\");\n/* harmony import */ var _bases_base36_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./bases/base36.js */ \"./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base36.js\");\n/* harmony import */ var _bases_base58_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./bases/base58.js */ \"./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base58.js\");\n/* harmony import */ var _bases_base64_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./bases/base64.js */ \"./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base64.js\");\n/* harmony import */ var _bases_base256emoji_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./bases/base256emoji.js */ \"./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base256emoji.js\");\n/* harmony import */ var _hashes_sha2_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./hashes/sha2.js */ \"./node_modules/multihashes/node_modules/multiformats/esm/src/hashes/sha2-browser.js\");\n/* harmony import */ var _hashes_identity_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./hashes/identity.js */ \"./node_modules/multihashes/node_modules/multiformats/esm/src/hashes/identity.js\");\n/* harmony import */ var _codecs_raw_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./codecs/raw.js */ \"./node_modules/multihashes/node_modules/multiformats/esm/src/codecs/raw.js\");\n/* harmony import */ var _codecs_json_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./codecs/json.js */ \"./node_modules/multihashes/node_modules/multiformats/esm/src/codecs/json.js\");\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./index.js */ \"./node_modules/multihashes/node_modules/multiformats/esm/src/index.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst bases = {\n ..._bases_identity_js__WEBPACK_IMPORTED_MODULE_0__,\n ..._bases_base2_js__WEBPACK_IMPORTED_MODULE_1__,\n ..._bases_base8_js__WEBPACK_IMPORTED_MODULE
/***/ }),
/***/ "./node_modules/multihashes/node_modules/multiformats/esm/src/bytes.js":
/*!*****************************************************************************!*\
!*** ./node_modules/multihashes/node_modules/multiformats/esm/src/bytes.js ***!
\*****************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ coerce: () => (/* binding */ coerce),\n/* harmony export */ empty: () => (/* binding */ empty),\n/* harmony export */ equals: () => (/* binding */ equals),\n/* harmony export */ fromHex: () => (/* binding */ fromHex),\n/* harmony export */ fromString: () => (/* binding */ fromString),\n/* harmony export */ isBinary: () => (/* binding */ isBinary),\n/* harmony export */ toHex: () => (/* binding */ toHex),\n/* harmony export */ toString: () => (/* binding */ toString)\n/* harmony export */ });\nconst empty = new Uint8Array(0);\nconst toHex = d => d.reduce((hex, byte) => hex + byte.toString(16).padStart(2, '0'), '');\nconst fromHex = hex => {\n const hexes = hex.match(/../g);\n return hexes ? new Uint8Array(hexes.map(b => parseInt(b, 16))) : empty;\n};\nconst equals = (aa, bb) => {\n if (aa === bb)\n return true;\n if (aa.byteLength !== bb.byteLength) {\n return false;\n }\n for (let ii = 0; ii < aa.byteLength; ii++) {\n if (aa[ii] !== bb[ii]) {\n return false;\n }\n }\n return true;\n};\nconst coerce = o => {\n if (o instanceof Uint8Array && o.constructor.name === 'Uint8Array')\n return o;\n if (o instanceof ArrayBuffer)\n return new Uint8Array(o);\n if (ArrayBuffer.isView(o)) {\n return new Uint8Array(o.buffer, o.byteOffset, o.byteLength);\n }\n throw new Error('Unknown type, must be binary type');\n};\nconst isBinary = o => o instanceof ArrayBuffer || ArrayBuffer.isView(o);\nconst fromString = str => new TextEncoder().encode(str);\nconst toString = b => new TextDecoder().decode(b);\n\n\n//# sourceURL=webpack://light/./node_modules/multihashes/node_modules/multiformats/esm/src/bytes.js?");
/***/ }),
/***/ "./node_modules/multihashes/node_modules/multiformats/esm/src/cid.js":
/*!***************************************************************************!*\
!*** ./node_modules/multihashes/node_modules/multiformats/esm/src/cid.js ***!
\***************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ CID: () => (/* binding */ CID)\n/* harmony export */ });\n/* harmony import */ var _varint_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./varint.js */ \"./node_modules/multihashes/node_modules/multiformats/esm/src/varint.js\");\n/* harmony import */ var _hashes_digest_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./hashes/digest.js */ \"./node_modules/multihashes/node_modules/multiformats/esm/src/hashes/digest.js\");\n/* harmony import */ var _bases_base58_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./bases/base58.js */ \"./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base58.js\");\n/* harmony import */ var _bases_base32_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./bases/base32.js */ \"./node_modules/multihashes/node_modules/multiformats/esm/src/bases/base32.js\");\n/* harmony import */ var _bytes_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./bytes.js */ \"./node_modules/multihashes/node_modules/multiformats/esm/src/bytes.js\");\n\n\n\n\n\nclass CID {\n constructor(version, code, multihash, bytes) {\n this.code = code;\n this.version = version;\n this.multihash = multihash;\n this.bytes = bytes;\n this.byteOffset = bytes.byteOffset;\n this.byteLength = bytes.byteLength;\n this.asCID = this;\n this._baseCache = new Map();\n Object.defineProperties(this, {\n byteOffset: hidden,\n byteLength: hidden,\n code: readonly,\n version: readonly,\n multihash: readonly,\n bytes: readonly,\n _baseCache: hidden,\n asCID: hidden\n });\n }\n toV0() {\n switch (this.version) {\n case 0: {\n return this;\n }\n default: {\n const {code, multihash} = this;\n if (code !== DAG_PB_CODE) {\n throw new Error('Cannot convert a non dag-pb CID to CIDv0');\n }\n if (multihash.code !== SHA_256_CODE) {\n throw new Error('Cannot convert non sha2-256 multihash CID to CIDv0');\n }\n return CID.createV0(multihash);\n }\n }\n }\n toV1() {\n switch (this.version) {\n case 0: {\n const {code, digest} = this.multihash;\n const multihash = _hashes_digest_js__WEBPACK_IMPORTED_MODULE_1__.create(code, digest);\n return CID.createV1(this.code, multihash);\n }\n case 1: {\n return this;\n }\n default: {\n throw Error(`Can not convert CID version ${ this.version } to version 0. This is a bug please report`);\n }\n }\n }\n equals(other) {\n return other && this.code === other.code && this.version === other.version && _hashes_digest_js__WEBPACK_IMPORTED_MODULE_1__.equals(this.multihash, other.multihash);\n }\n toString(base) {\n const {bytes, version, _baseCache} = this;\n switch (version) {\n case 0:\n return toStringV0(bytes, _baseCache, base || _bases_base58_js__WEBPACK_IMPORTED_MODULE_2__.base58btc.encoder);\n default:\n return toStringV1(bytes, _baseCache, base || _bases_base32_js__WEBPACK_IMPORTED_MODULE_3__.base32.encoder);\n }\n }\n toJSON() {\n return {\n code: this.code,\n version: this.version,\n hash: this.multihash.bytes\n };\n }\n get [Symbol.toStringTag]() {\n return 'CID';\n }\n [Symbol.for('nodejs.util.inspect.custom')]() {\n return 'CID(' + this.toString() + ')';\n }\n static isCID(value) {\n deprecate(/^0\\.0/, IS_CID_DEPRECATION);\n return !!(value && (value[cidSymbol] || value.asCID === value));\n }\n get toBaseEncodedString() {\n throw new Error('Deprecated, use .toString()');\n }\n get codec() {\n throw new Error('\"codec\" property is deprecated, use integer \"code\" property instead');\n }\n get buffer() {\n throw new Error('Deprecated .buffer property, use .bytes to get Uint8Array instead');\n }\n get multibaseName() {\n throw new Error('\"multibaseName\" property is deprecated');\n }\n get prefix()
/***/ }),
/***/ "./node_modules/multihashes/node_modules/multiformats/esm/src/codecs/json.js":
/*!***********************************************************************************!*\
!*** ./node_modules/multihashes/node_modules/multiformats/esm/src/codecs/json.js ***!
\***********************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ code: () => (/* binding */ code),\n/* harmony export */ decode: () => (/* binding */ decode),\n/* harmony export */ encode: () => (/* binding */ encode),\n/* harmony export */ name: () => (/* binding */ name)\n/* harmony export */ });\nconst textEncoder = new TextEncoder();\nconst textDecoder = new TextDecoder();\nconst name = 'json';\nconst code = 512;\nconst encode = node => textEncoder.encode(JSON.stringify(node));\nconst decode = data => JSON.parse(textDecoder.decode(data));\n\n//# sourceURL=webpack://light/./node_modules/multihashes/node_modules/multiformats/esm/src/codecs/json.js?");
/***/ }),
/***/ "./node_modules/multihashes/node_modules/multiformats/esm/src/codecs/raw.js":
/*!**********************************************************************************!*\
!*** ./node_modules/multihashes/node_modules/multiformats/esm/src/codecs/raw.js ***!
\**********************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ code: () => (/* binding */ code),\n/* harmony export */ decode: () => (/* binding */ decode),\n/* harmony export */ encode: () => (/* binding */ encode),\n/* harmony export */ name: () => (/* binding */ name)\n/* harmony export */ });\n/* harmony import */ var _bytes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../bytes.js */ \"./node_modules/multihashes/node_modules/multiformats/esm/src/bytes.js\");\n\nconst name = 'raw';\nconst code = 85;\nconst encode = node => (0,_bytes_js__WEBPACK_IMPORTED_MODULE_0__.coerce)(node);\nconst decode = data => (0,_bytes_js__WEBPACK_IMPORTED_MODULE_0__.coerce)(data);\n\n//# sourceURL=webpack://light/./node_modules/multihashes/node_modules/multiformats/esm/src/codecs/raw.js?");
/***/ }),
/***/ "./node_modules/multihashes/node_modules/multiformats/esm/src/hashes/digest.js":
/*!*************************************************************************************!*\
!*** ./node_modules/multihashes/node_modules/multiformats/esm/src/hashes/digest.js ***!
\*************************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Digest: () => (/* binding */ Digest),\n/* harmony export */ create: () => (/* binding */ create),\n/* harmony export */ decode: () => (/* binding */ decode),\n/* harmony export */ equals: () => (/* binding */ equals)\n/* harmony export */ });\n/* harmony import */ var _bytes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../bytes.js */ \"./node_modules/multihashes/node_modules/multiformats/esm/src/bytes.js\");\n/* harmony import */ var _varint_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../varint.js */ \"./node_modules/multihashes/node_modules/multiformats/esm/src/varint.js\");\n\n\nconst create = (code, digest) => {\n const size = digest.byteLength;\n const sizeOffset = _varint_js__WEBPACK_IMPORTED_MODULE_1__.encodingLength(code);\n const digestOffset = sizeOffset + _varint_js__WEBPACK_IMPORTED_MODULE_1__.encodingLength(size);\n const bytes = new Uint8Array(digestOffset + size);\n _varint_js__WEBPACK_IMPORTED_MODULE_1__.encodeTo(code, bytes, 0);\n _varint_js__WEBPACK_IMPORTED_MODULE_1__.encodeTo(size, bytes, sizeOffset);\n bytes.set(digest, digestOffset);\n return new Digest(code, size, digest, bytes);\n};\nconst decode = multihash => {\n const bytes = (0,_bytes_js__WEBPACK_IMPORTED_MODULE_0__.coerce)(multihash);\n const [code, sizeOffset] = _varint_js__WEBPACK_IMPORTED_MODULE_1__.decode(bytes);\n const [size, digestOffset] = _varint_js__WEBPACK_IMPORTED_MODULE_1__.decode(bytes.subarray(sizeOffset));\n const digest = bytes.subarray(sizeOffset + digestOffset);\n if (digest.byteLength !== size) {\n throw new Error('Incorrect length');\n }\n return new Digest(code, size, digest, bytes);\n};\nconst equals = (a, b) => {\n if (a === b) {\n return true;\n } else {\n return a.code === b.code && a.size === b.size && (0,_bytes_js__WEBPACK_IMPORTED_MODULE_0__.equals)(a.bytes, b.bytes);\n }\n};\nclass Digest {\n constructor(code, size, digest, bytes) {\n this.code = code;\n this.size = size;\n this.digest = digest;\n this.bytes = bytes;\n }\n}\n\n//# sourceURL=webpack://light/./node_modules/multihashes/node_modules/multiformats/esm/src/hashes/digest.js?");
/***/ }),
/***/ "./node_modules/multihashes/node_modules/multiformats/esm/src/hashes/hasher.js":
/*!*************************************************************************************!*\
!*** ./node_modules/multihashes/node_modules/multiformats/esm/src/hashes/hasher.js ***!
\*************************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Hasher: () => (/* binding */ Hasher),\n/* harmony export */ from: () => (/* binding */ from)\n/* harmony export */ });\n/* harmony import */ var _digest_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./digest.js */ \"./node_modules/multihashes/node_modules/multiformats/esm/src/hashes/digest.js\");\n\nconst from = ({name, code, encode}) => new Hasher(name, code, encode);\nclass Hasher {\n constructor(name, code, encode) {\n this.name = name;\n this.code = code;\n this.encode = encode;\n }\n digest(input) {\n if (input instanceof Uint8Array) {\n const result = this.encode(input);\n return result instanceof Uint8Array ? _digest_js__WEBPACK_IMPORTED_MODULE_0__.create(this.code, result) : result.then(digest => _digest_js__WEBPACK_IMPORTED_MODULE_0__.create(this.code, digest));\n } else {\n throw Error('Unknown type, must be binary type');\n }\n }\n}\n\n//# sourceURL=webpack://light/./node_modules/multihashes/node_modules/multiformats/esm/src/hashes/hasher.js?");
/***/ }),
/***/ "./node_modules/multihashes/node_modules/multiformats/esm/src/hashes/identity.js":
/*!***************************************************************************************!*\
!*** ./node_modules/multihashes/node_modules/multiformats/esm/src/hashes/identity.js ***!
\***************************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ identity: () => (/* binding */ identity)\n/* harmony export */ });\n/* harmony import */ var _bytes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../bytes.js */ \"./node_modules/multihashes/node_modules/multiformats/esm/src/bytes.js\");\n/* harmony import */ var _digest_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./digest.js */ \"./node_modules/multihashes/node_modules/multiformats/esm/src/hashes/digest.js\");\n\n\nconst code = 0;\nconst name = 'identity';\nconst encode = _bytes_js__WEBPACK_IMPORTED_MODULE_0__.coerce;\nconst digest = input => _digest_js__WEBPACK_IMPORTED_MODULE_1__.create(code, encode(input));\nconst identity = {\n code,\n name,\n encode,\n digest\n};\n\n//# sourceURL=webpack://light/./node_modules/multihashes/node_modules/multiformats/esm/src/hashes/identity.js?");
/***/ }),
/***/ "./node_modules/multihashes/node_modules/multiformats/esm/src/hashes/sha2-browser.js":
/*!*******************************************************************************************!*\
!*** ./node_modules/multihashes/node_modules/multiformats/esm/src/hashes/sha2-browser.js ***!
\*******************************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ sha256: () => (/* binding */ sha256),\n/* harmony export */ sha512: () => (/* binding */ sha512)\n/* harmony export */ });\n/* harmony import */ var _hasher_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./hasher.js */ \"./node_modules/multihashes/node_modules/multiformats/esm/src/hashes/hasher.js\");\n\nconst sha = name => async data => new Uint8Array(await crypto.subtle.digest(name, data));\nconst sha256 = (0,_hasher_js__WEBPACK_IMPORTED_MODULE_0__.from)({\n name: 'sha2-256',\n code: 18,\n encode: sha('SHA-256')\n});\nconst sha512 = (0,_hasher_js__WEBPACK_IMPORTED_MODULE_0__.from)({\n name: 'sha2-512',\n code: 19,\n encode: sha('SHA-512')\n});\n\n//# sourceURL=webpack://light/./node_modules/multihashes/node_modules/multiformats/esm/src/hashes/sha2-browser.js?");
/***/ }),
/***/ "./node_modules/multihashes/node_modules/multiformats/esm/src/index.js":
/*!*****************************************************************************!*\
!*** ./node_modules/multihashes/node_modules/multiformats/esm/src/index.js ***!
\*****************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ CID: () => (/* reexport safe */ _cid_js__WEBPACK_IMPORTED_MODULE_0__.CID),\n/* harmony export */ bytes: () => (/* reexport module object */ _bytes_js__WEBPACK_IMPORTED_MODULE_2__),\n/* harmony export */ digest: () => (/* reexport module object */ _hashes_digest_js__WEBPACK_IMPORTED_MODULE_4__),\n/* harmony export */ hasher: () => (/* reexport module object */ _hashes_hasher_js__WEBPACK_IMPORTED_MODULE_3__),\n/* harmony export */ varint: () => (/* reexport module object */ _varint_js__WEBPACK_IMPORTED_MODULE_1__)\n/* harmony export */ });\n/* harmony import */ var _cid_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cid.js */ \"./node_modules/multihashes/node_modules/multiformats/esm/src/cid.js\");\n/* harmony import */ var _varint_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./varint.js */ \"./node_modules/multihashes/node_modules/multiformats/esm/src/varint.js\");\n/* harmony import */ var _bytes_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./bytes.js */ \"./node_modules/multihashes/node_modules/multiformats/esm/src/bytes.js\");\n/* harmony import */ var _hashes_hasher_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./hashes/hasher.js */ \"./node_modules/multihashes/node_modules/multiformats/esm/src/hashes/hasher.js\");\n/* harmony import */ var _hashes_digest_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hashes/digest.js */ \"./node_modules/multihashes/node_modules/multiformats/esm/src/hashes/digest.js\");\n\n\n\n\n\n\n\n//# sourceURL=webpack://light/./node_modules/multihashes/node_modules/multiformats/esm/src/index.js?");
/***/ }),
/***/ "./node_modules/multihashes/node_modules/multiformats/esm/src/varint.js":
/*!******************************************************************************!*\
!*** ./node_modules/multihashes/node_modules/multiformats/esm/src/varint.js ***!
\******************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ decode: () => (/* binding */ decode),\n/* harmony export */ encodeTo: () => (/* binding */ encodeTo),\n/* harmony export */ encodingLength: () => (/* binding */ encodingLength)\n/* harmony export */ });\n/* harmony import */ var _vendor_varint_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../vendor/varint.js */ \"./node_modules/multihashes/node_modules/multiformats/esm/vendor/varint.js\");\n\nconst decode = (data, offset = 0) => {\n const code = _vendor_varint_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].decode(data, offset);\n return [\n code,\n _vendor_varint_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].decode.bytes\n ];\n};\nconst encodeTo = (int, target, offset = 0) => {\n _vendor_varint_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].encode(int, target, offset);\n return target;\n};\nconst encodingLength = int => {\n return _vendor_varint_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].encodingLength(int);\n};\n\n//# sourceURL=webpack://light/./node_modules/multihashes/node_modules/multiformats/esm/src/varint.js?");
/***/ }),
/***/ "./node_modules/multihashes/node_modules/multiformats/esm/vendor/base-x.js":
/*!*********************************************************************************!*\
!*** ./node_modules/multihashes/node_modules/multiformats/esm/vendor/base-x.js ***!
\*********************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\nfunction base(ALPHABET, name) {\n if (ALPHABET.length >= 255) {\n throw new TypeError('Alphabet too long');\n }\n var BASE_MAP = new Uint8Array(256);\n for (var j = 0; j < BASE_MAP.length; j++) {\n BASE_MAP[j] = 255;\n }\n for (var i = 0; i < ALPHABET.length; i++) {\n var x = ALPHABET.charAt(i);\n var xc = x.charCodeAt(0);\n if (BASE_MAP[xc] !== 255) {\n throw new TypeError(x + ' is ambiguous');\n }\n BASE_MAP[xc] = i;\n }\n var BASE = ALPHABET.length;\n var LEADER = ALPHABET.charAt(0);\n var FACTOR = Math.log(BASE) / Math.log(256);\n var iFACTOR = Math.log(256) / Math.log(BASE);\n function encode(source) {\n if (source instanceof Uint8Array);\n else if (ArrayBuffer.isView(source)) {\n source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength);\n } else if (Array.isArray(source)) {\n source = Uint8Array.from(source);\n }\n if (!(source instanceof Uint8Array)) {\n throw new TypeError('Expected Uint8Array');\n }\n if (source.length === 0) {\n return '';\n }\n var zeroes = 0;\n var length = 0;\n var pbegin = 0;\n var pend = source.length;\n while (pbegin !== pend && source[pbegin] === 0) {\n pbegin++;\n zeroes++;\n }\n var size = (pend - pbegin) * iFACTOR + 1 >>> 0;\n var b58 = new Uint8Array(size);\n while (pbegin !== pend) {\n var carry = source[pbegin];\n var i = 0;\n for (var it1 = size - 1; (carry !== 0 || i < length) && it1 !== -1; it1--, i++) {\n carry += 256 * b58[it1] >>> 0;\n b58[it1] = carry % BASE >>> 0;\n carry = carry / BASE >>> 0;\n }\n if (carry !== 0) {\n throw new Error('Non-zero carry');\n }\n length = i;\n pbegin++;\n }\n var it2 = size - length;\n while (it2 !== size && b58[it2] === 0) {\n it2++;\n }\n var str = LEADER.repeat(zeroes);\n for (; it2 < size; ++it2) {\n str += ALPHABET.charAt(b58[it2]);\n }\n return str;\n }\n function decodeUnsafe(source) {\n if (typeof source !== 'string') {\n throw new TypeError('Expected String');\n }\n if (source.length === 0) {\n return new Uint8Array();\n }\n var psz = 0;\n if (source[psz] === ' ') {\n return;\n }\n var zeroes = 0;\n var length = 0;\n while (source[psz] === LEADER) {\n zeroes++;\n psz++;\n }\n var size = (source.length - psz) * FACTOR + 1 >>> 0;\n var b256 = new Uint8Array(size);\n while (source[psz]) {\n var carry = BASE_MAP[source.charCodeAt(psz)];\n if (carry === 255) {\n return;\n }\n var i = 0;\n for (var it3 = size - 1; (carry !== 0 || i < length) && it3 !== -1; it3--, i++) {\n carry += BASE * b256[it3] >>> 0;\n b256[it3] = carry % 256 >>> 0;\n carry = carry / 256 >>> 0;\n }\n if (carry !== 0) {\n throw new Error('Non-zero carry');\n }\n length = i;\n psz++;\n }\n if (source[psz] === ' ') {\n return;\n }\n var it4 = size - length;\n while (it4 !== size && b256[it4] === 0) {\n it4++;\n }\n var vch = new Uint8Array(zeroes + (size - it4));\n var j = zeroes;\n while (it4 !== size) {\n vch[j++] = b256[it4++];\n }\n return vch;\n }\n function decode(string) {\n var buffer = decodeUnsafe(string);\n if (buffer) {\n return buffer;\n }\n throw new Error(`Non-${ name } character`);\n }\n return {\n encode: encode,\n decodeUnsafe: decodeUnsafe,\n decode: decode\n };\n}\nvar src = base;\nvar _brrp__multiformats_scope_baseX = src;\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_brrp__multiformats_scope_baseX);\n\n//# sourceURL=webpack://light/./node_modules/multihashes/node_modules/multiformats/esm/vendor/base-x.js?");
/***/ }),
/***/ "./node_modules/multihashes/node_modules/multiformats/esm/vendor/varint.js":
/*!*********************************************************************************!*\
!*** ./node_modules/multihashes/node_modules/multiformats/esm/vendor/varint.js ***!
\*********************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\nvar encode_1 = encode;\nvar MSB = 128, REST = 127, MSBALL = ~REST, INT = Math.pow(2, 31);\nfunction encode(num, out, offset) {\n out = out || [];\n offset = offset || 0;\n var oldOffset = offset;\n while (num >= INT) {\n out[offset++] = num & 255 | MSB;\n num /= 128;\n }\n while (num & MSBALL) {\n out[offset++] = num & 255 | MSB;\n num >>>= 7;\n }\n out[offset] = num | 0;\n encode.bytes = offset - oldOffset + 1;\n return out;\n}\nvar decode = read;\nvar MSB$1 = 128, REST$1 = 127;\nfunction read(buf, offset) {\n var res = 0, offset = offset || 0, shift = 0, counter = offset, b, l = buf.length;\n do {\n if (counter >= l) {\n read.bytes = 0;\n throw new RangeError('Could not decode varint');\n }\n b = buf[counter++];\n res += shift < 28 ? (b & REST$1) << shift : (b & REST$1) * Math.pow(2, shift);\n shift += 7;\n } while (b >= MSB$1);\n read.bytes = counter - offset;\n return res;\n}\nvar N1 = Math.pow(2, 7);\nvar N2 = Math.pow(2, 14);\nvar N3 = Math.pow(2, 21);\nvar N4 = Math.pow(2, 28);\nvar N5 = Math.pow(2, 35);\nvar N6 = Math.pow(2, 42);\nvar N7 = Math.pow(2, 49);\nvar N8 = Math.pow(2, 56);\nvar N9 = Math.pow(2, 63);\nvar length = function (value) {\n return value < N1 ? 1 : value < N2 ? 2 : value < N3 ? 3 : value < N4 ? 4 : value < N5 ? 5 : value < N6 ? 6 : value < N7 ? 7 : value < N8 ? 8 : value < N9 ? 9 : 10;\n};\nvar varint = {\n encode: encode_1,\n decode: decode,\n encodingLength: length\n};\nvar _brrp_varint = varint;\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_brrp_varint);\n\n//# sourceURL=webpack://light/./node_modules/multihashes/node_modules/multiformats/esm/vendor/varint.js?");
/***/ }),
/***/ "./node_modules/multihashes/node_modules/uint8arrays/esm/src/alloc.js":
/*!****************************************************************************!*\
!*** ./node_modules/multihashes/node_modules/uint8arrays/esm/src/alloc.js ***!
\****************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ alloc: () => (/* binding */ alloc),\n/* harmony export */ allocUnsafe: () => (/* binding */ allocUnsafe)\n/* harmony export */ });\n/* harmony import */ var _util_as_uint8array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util/as-uint8array.js */ \"./node_modules/multihashes/node_modules/uint8arrays/esm/src/util/as-uint8array.js\");\n\nfunction alloc(size = 0) {\n if (globalThis.Buffer != null && globalThis.Buffer.alloc != null) {\n return (0,_util_as_uint8array_js__WEBPACK_IMPORTED_MODULE_0__.asUint8Array)(globalThis.Buffer.alloc(size));\n }\n return new Uint8Array(size);\n}\nfunction allocUnsafe(size = 0) {\n if (globalThis.Buffer != null && globalThis.Buffer.allocUnsafe != null) {\n return (0,_util_as_uint8array_js__WEBPACK_IMPORTED_MODULE_0__.asUint8Array)(globalThis.Buffer.allocUnsafe(size));\n }\n return new Uint8Array(size);\n}\n\n//# sourceURL=webpack://light/./node_modules/multihashes/node_modules/uint8arrays/esm/src/alloc.js?");
/***/ }),
/***/ "./node_modules/multihashes/node_modules/uint8arrays/esm/src/concat.js":
/*!*****************************************************************************!*\
!*** ./node_modules/multihashes/node_modules/uint8arrays/esm/src/concat.js ***!
\*****************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ concat: () => (/* binding */ concat)\n/* harmony export */ });\n/* harmony import */ var _alloc_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./alloc.js */ \"./node_modules/multihashes/node_modules/uint8arrays/esm/src/alloc.js\");\n/* harmony import */ var _util_as_uint8array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util/as-uint8array.js */ \"./node_modules/multihashes/node_modules/uint8arrays/esm/src/util/as-uint8array.js\");\n\n\nfunction concat(arrays, length) {\n if (!length) {\n length = arrays.reduce((acc, curr) => acc + curr.length, 0);\n }\n const output = (0,_alloc_js__WEBPACK_IMPORTED_MODULE_0__.allocUnsafe)(length);\n let offset = 0;\n for (const arr of arrays) {\n output.set(arr, offset);\n offset += arr.length;\n }\n return (0,_util_as_uint8array_js__WEBPACK_IMPORTED_MODULE_1__.asUint8Array)(output);\n}\n\n//# sourceURL=webpack://light/./node_modules/multihashes/node_modules/uint8arrays/esm/src/concat.js?");
/***/ }),
/***/ "./node_modules/multihashes/node_modules/uint8arrays/esm/src/from-string.js":
/*!**********************************************************************************!*\
!*** ./node_modules/multihashes/node_modules/uint8arrays/esm/src/from-string.js ***!
\**********************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ fromString: () => (/* binding */ fromString)\n/* harmony export */ });\n/* harmony import */ var _util_bases_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util/bases.js */ \"./node_modules/multihashes/node_modules/uint8arrays/esm/src/util/bases.js\");\n/* harmony import */ var _util_as_uint8array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util/as-uint8array.js */ \"./node_modules/multihashes/node_modules/uint8arrays/esm/src/util/as-uint8array.js\");\n\n\nfunction fromString(string, encoding = 'utf8') {\n const base = _util_bases_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"][encoding];\n if (!base) {\n throw new Error(`Unsupported encoding \"${ encoding }\"`);\n }\n if ((encoding === 'utf8' || encoding === 'utf-8') && globalThis.Buffer != null && globalThis.Buffer.from != null) {\n return (0,_util_as_uint8array_js__WEBPACK_IMPORTED_MODULE_1__.asUint8Array)(globalThis.Buffer.from(string, 'utf-8'));\n }\n return base.decoder.decode(`${ base.prefix }${ string }`);\n}\n\n//# sourceURL=webpack://light/./node_modules/multihashes/node_modules/uint8arrays/esm/src/from-string.js?");
/***/ }),
/***/ "./node_modules/multihashes/node_modules/uint8arrays/esm/src/to-string.js":
/*!********************************************************************************!*\
!*** ./node_modules/multihashes/node_modules/uint8arrays/esm/src/to-string.js ***!
\********************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ toString: () => (/* binding */ toString)\n/* harmony export */ });\n/* harmony import */ var _util_bases_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util/bases.js */ \"./node_modules/multihashes/node_modules/uint8arrays/esm/src/util/bases.js\");\n\nfunction toString(array, encoding = 'utf8') {\n const base = _util_bases_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"][encoding];\n if (!base) {\n throw new Error(`Unsupported encoding \"${ encoding }\"`);\n }\n if ((encoding === 'utf8' || encoding === 'utf-8') && globalThis.Buffer != null && globalThis.Buffer.from != null) {\n return globalThis.Buffer.from(array.buffer, array.byteOffset, array.byteLength).toString('utf8');\n }\n return base.encoder.encode(array).substring(1);\n}\n\n//# sourceURL=webpack://light/./node_modules/multihashes/node_modules/uint8arrays/esm/src/to-string.js?");
/***/ }),
/***/ "./node_modules/multihashes/node_modules/uint8arrays/esm/src/util/as-uint8array.js":
/*!*****************************************************************************************!*\
!*** ./node_modules/multihashes/node_modules/uint8arrays/esm/src/util/as-uint8array.js ***!
\*****************************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ asUint8Array: () => (/* binding */ asUint8Array)\n/* harmony export */ });\nfunction asUint8Array(buf) {\n if (globalThis.Buffer != null) {\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);\n }\n return buf;\n}\n\n//# sourceURL=webpack://light/./node_modules/multihashes/node_modules/uint8arrays/esm/src/util/as-uint8array.js?");
/***/ }),
/***/ "./node_modules/multihashes/node_modules/uint8arrays/esm/src/util/bases.js":
/*!*********************************************************************************!*\
!*** ./node_modules/multihashes/node_modules/uint8arrays/esm/src/util/bases.js ***!
\*********************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var multiformats_basics__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! multiformats/basics */ \"./node_modules/multihashes/node_modules/multiformats/esm/src/basics.js\");\n/* harmony import */ var _alloc_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../alloc.js */ \"./node_modules/multihashes/node_modules/uint8arrays/esm/src/alloc.js\");\n\n\nfunction createCodec(name, prefix, encode, decode) {\n return {\n name,\n prefix,\n encoder: {\n name,\n prefix,\n encode\n },\n decoder: { decode }\n };\n}\nconst string = createCodec('utf8', 'u', buf => {\n const decoder = new TextDecoder('utf8');\n return 'u' + decoder.decode(buf);\n}, str => {\n const encoder = new TextEncoder();\n return encoder.encode(str.substring(1));\n});\nconst ascii = createCodec('ascii', 'a', buf => {\n let string = 'a';\n for (let i = 0; i < buf.length; i++) {\n string += String.fromCharCode(buf[i]);\n }\n return string;\n}, str => {\n str = str.substring(1);\n const buf = (0,_alloc_js__WEBPACK_IMPORTED_MODULE_1__.allocUnsafe)(str.length);\n for (let i = 0; i < str.length; i++) {\n buf[i] = str.charCodeAt(i);\n }\n return buf;\n});\nconst BASES = {\n utf8: string,\n 'utf-8': string,\n hex: multiformats_basics__WEBPACK_IMPORTED_MODULE_0__.bases.base16,\n latin1: ascii,\n ascii: ascii,\n binary: ascii,\n ...multiformats_basics__WEBPACK_IMPORTED_MODULE_0__.bases\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (BASES);\n\n//# sourceURL=webpack://light/./node_modules/multihashes/node_modules/uint8arrays/esm/src/util/bases.js?");
/***/ }),
/***/ "./node_modules/nanoid/index.browser.js":
/*!**********************************************!*\
!*** ./node_modules/nanoid/index.browser.js ***!
\**********************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ customAlphabet: () => (/* binding */ customAlphabet),\n/* harmony export */ customRandom: () => (/* binding */ customRandom),\n/* harmony export */ nanoid: () => (/* binding */ nanoid),\n/* harmony export */ random: () => (/* binding */ random),\n/* harmony export */ urlAlphabet: () => (/* reexport safe */ _url_alphabet_index_js__WEBPACK_IMPORTED_MODULE_0__.urlAlphabet)\n/* harmony export */ });\n/* harmony import */ var _url_alphabet_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./url-alphabet/index.js */ \"./node_modules/nanoid/url-alphabet/index.js\");\n\nlet random = bytes => crypto.getRandomValues(new Uint8Array(bytes))\nlet customRandom = (alphabet, defaultSize, getRandom) => {\n let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1\n let step = -~((1.6 * mask * defaultSize) / alphabet.length)\n return (size = defaultSize) => {\n let id = ''\n while (true) {\n let bytes = getRandom(step)\n let j = step\n while (j--) {\n id += alphabet[bytes[j] & mask] || ''\n if (id.length === size) return id\n }\n }\n }\n}\nlet customAlphabet = (alphabet, size = 21) =>\n customRandom(alphabet, size, random)\nlet nanoid = (size = 21) =>\n crypto.getRandomValues(new Uint8Array(size)).reduce((id, byte) => {\n byte &= 63\n if (byte < 36) {\n id += byte.toString(36)\n } else if (byte < 62) {\n id += (byte - 26).toString(36).toUpperCase()\n } else if (byte > 62) {\n id += '-'\n } else {\n id += '_'\n }\n return id\n }, '')\n\n\n//# sourceURL=webpack://light/./node_modules/nanoid/index.browser.js?");
/***/ }),
/***/ "./node_modules/nanoid/url-alphabet/index.js":
/*!***************************************************!*\
!*** ./node_modules/nanoid/url-alphabet/index.js ***!
\***************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ urlAlphabet: () => (/* binding */ urlAlphabet)\n/* harmony export */ });\nconst urlAlphabet =\n 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'\n\n\n//# sourceURL=webpack://light/./node_modules/nanoid/url-alphabet/index.js?");
/***/ }),
/***/ "./node_modules/native-fetch/esm/src/index.js":
/*!****************************************************!*\
!*** ./node_modules/native-fetch/esm/src/index.js ***!
\****************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Headers: () => (/* binding */ globalHeaders),\n/* harmony export */ Request: () => (/* binding */ globalRequest),\n/* harmony export */ Response: () => (/* binding */ globalResponse),\n/* harmony export */ fetch: () => (/* binding */ globalFetch)\n/* harmony export */ });\nconst globalFetch = globalThis.fetch;\nconst globalHeaders = globalThis.Headers;\nconst globalRequest = globalThis.Request;\nconst globalResponse = globalThis.Response;\n\n\n\n\n\n//# sourceURL=webpack://light/./node_modules/native-fetch/esm/src/index.js?");
/***/ }),
/***/ "./node_modules/observable-webworkers/dist/src/index.js":
/*!**************************************************************!*\
!*** ./node_modules/observable-webworkers/dist/src/index.js ***!
\**************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\nconst events = {};\nconst observable = (worker) => {\n worker.addEventListener('message', (event) => {\n observable.dispatchEvent('message', worker, event);\n });\n if (worker.port != null) {\n worker.port.addEventListener('message', (event) => {\n observable.dispatchEvent('message', worker, event);\n });\n }\n};\nobservable.addEventListener = (type, fn) => {\n if (events[type] == null) {\n events[type] = [];\n }\n events[type].push(fn);\n};\nobservable.removeEventListener = (type, fn) => {\n if (events[type] == null) {\n return;\n }\n events[type] = events[type]\n .filter(listener => listener === fn);\n};\nobservable.dispatchEvent = function (type, worker, event) {\n if (events[type] == null) {\n return;\n }\n events[type].forEach(fn => fn(worker, event));\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (observable);\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/observable-webworkers/dist/src/index.js?");
/***/ }),
/***/ "./node_modules/p-defer/index.js":
/*!***************************************!*\
!*** ./node_modules/p-defer/index.js ***!
\***************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ pDefer)\n/* harmony export */ });\nfunction pDefer() {\n\tconst deferred = {};\n\n\tdeferred.promise = new Promise((resolve, reject) => {\n\t\tdeferred.resolve = resolve;\n\t\tdeferred.reject = reject;\n\t});\n\n\treturn deferred;\n}\n\n\n//# sourceURL=webpack://light/./node_modules/p-defer/index.js?");
/***/ }),
/***/ "./node_modules/p-event/index.js":
/*!***************************************!*\
!*** ./node_modules/p-event/index.js ***!
\***************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ TimeoutError: () => (/* reexport safe */ p_timeout__WEBPACK_IMPORTED_MODULE_0__.TimeoutError),\n/* harmony export */ pEvent: () => (/* binding */ pEvent),\n/* harmony export */ pEventIterator: () => (/* binding */ pEventIterator),\n/* harmony export */ pEventMultiple: () => (/* binding */ pEventMultiple)\n/* harmony export */ });\n/* harmony import */ var p_timeout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! p-timeout */ \"./node_modules/p-timeout/index.js\");\n\n\nconst normalizeEmitter = emitter => {\n\tconst addListener = emitter.on || emitter.addListener || emitter.addEventListener;\n\tconst removeListener = emitter.off || emitter.removeListener || emitter.removeEventListener;\n\n\tif (!addListener || !removeListener) {\n\t\tthrow new TypeError('Emitter is not compatible');\n\t}\n\n\treturn {\n\t\taddListener: addListener.bind(emitter),\n\t\tremoveListener: removeListener.bind(emitter),\n\t};\n};\n\nfunction pEventMultiple(emitter, event, options) {\n\tlet cancel;\n\tconst returnValue = new Promise((resolve, reject) => {\n\t\toptions = {\n\t\t\trejectionEvents: ['error'],\n\t\t\tmultiArgs: false,\n\t\t\tresolveImmediately: false,\n\t\t\t...options,\n\t\t};\n\n\t\tif (!(options.count >= 0 && (options.count === Number.POSITIVE_INFINITY || Number.isInteger(options.count)))) {\n\t\t\tthrow new TypeError('The `count` option should be at least 0 or more');\n\t\t}\n\n\t\toptions.signal?.throwIfAborted();\n\n\t\t// Allow multiple events\n\t\tconst events = [event].flat();\n\n\t\tconst items = [];\n\t\tconst {addListener, removeListener} = normalizeEmitter(emitter);\n\n\t\tconst onItem = (...arguments_) => {\n\t\t\tconst value = options.multiArgs ? arguments_ : arguments_[0];\n\n\t\t\t// eslint-disable-next-line unicorn/no-array-callback-reference\n\t\t\tif (options.filter && !options.filter(value)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\titems.push(value);\n\n\t\t\tif (options.count === items.length) {\n\t\t\t\tcancel();\n\t\t\t\tresolve(items);\n\t\t\t}\n\t\t};\n\n\t\tconst rejectHandler = error => {\n\t\t\tcancel();\n\t\t\treject(error);\n\t\t};\n\n\t\tcancel = () => {\n\t\t\tfor (const event of events) {\n\t\t\t\tremoveListener(event, onItem);\n\t\t\t}\n\n\t\t\tfor (const rejectionEvent of options.rejectionEvents) {\n\t\t\t\tremoveListener(rejectionEvent, rejectHandler);\n\t\t\t}\n\t\t};\n\n\t\tfor (const event of events) {\n\t\t\taddListener(event, onItem);\n\t\t}\n\n\t\tfor (const rejectionEvent of options.rejectionEvents) {\n\t\t\taddListener(rejectionEvent, rejectHandler);\n\t\t}\n\n\t\tif (options.signal) {\n\t\t\toptions.signal.addEventListener('abort', () => {\n\t\t\t\trejectHandler(options.signal.reason);\n\t\t\t}, {once: true});\n\t\t}\n\n\t\tif (options.resolveImmediately) {\n\t\t\tresolve(items);\n\t\t}\n\t});\n\n\treturnValue.cancel = cancel;\n\n\tif (typeof options.timeout === 'number') {\n\t\tconst timeout = (0,p_timeout__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(returnValue, {milliseconds: options.timeout});\n\t\ttimeout.cancel = cancel;\n\t\treturn timeout;\n\t}\n\n\treturn returnValue;\n}\n\nfunction pEvent(emitter, event, options) {\n\tif (typeof options === 'function') {\n\t\toptions = {filter: options};\n\t}\n\n\toptions = {\n\t\t...options,\n\t\tcount: 1,\n\t\tresolveImmediately: false,\n\t};\n\n\tconst arrayPromise = pEventMultiple(emitter, event, options);\n\tconst promise = arrayPromise.then(array => array[0]);\n\tpromise.cancel = arrayPromise.cancel;\n\n\treturn promise;\n}\n\nfunction pEventIterator(emitter, event, options) {\n\tif (typeof options === 'function') {\n\t\toptions = {filter: options};\n\t}\n\n\t// Allow multiple events\n\tconst events = [event].flat();\n\n\toptions = {\n\t\trejectionEvents: ['error'],\n\t\tresolutionEvents: [],\n\t\tlimit: Number.POSITIVE_INFINITY,\n\t\tmultiArgs: false,\n\t\t...options,\n\t};\n\n\tconst {limit} = options;\n\tconst isValidLimit = limit >= 0 && (limit === Number.POSITIVE_INFINITY || Number.isInteg
/***/ }),
/***/ "./node_modules/p-queue/dist/index.js":
/*!********************************************!*\
!*** ./node_modules/p-queue/dist/index.js ***!
\********************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AbortError: () => (/* binding */ AbortError),\n/* harmony export */ \"default\": () => (/* binding */ PQueue)\n/* harmony export */ });\n/* harmony import */ var eventemitter3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\n/* harmony import */ var p_timeout__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! p-timeout */ \"./node_modules/p-queue/node_modules/p-timeout/index.js\");\n/* harmony import */ var _priority_queue_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./priority-queue.js */ \"./node_modules/p-queue/dist/priority-queue.js\");\nvar __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\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\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\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\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _PQueue_instances, _PQueue_carryoverConcurrencyCount, _PQueue_isIntervalIgnored, _PQueue_intervalCount, _PQueue_intervalCap, _PQueue_interval, _PQueue_intervalEnd, _PQueue_intervalId, _PQueue_timeoutId, _PQueue_queue, _PQueue_queueClass, _PQueue_pending, _PQueue_concurrency, _PQueue_isPaused, _PQueue_throwOnTimeout, _PQueue_doesIntervalAllowAnother_get, _PQueue_doesConcurrentAllowAnother_get, _PQueue_next, _PQueue_onResumeInterval, _PQueue_isIntervalPaused_get, _PQueue_tryToStartAnother, _PQueue_initializeIntervalIfNeeded, _PQueue_onInterval, _PQueue_processQueue, _PQueue_throwOnAbort, _PQueue_onEvent;\n\n\n\n/**\nThe error thrown by `queue.add()` when a job is aborted before it is run. See `signal`.\n*/\nclass AbortError extends Error {\n}\n/**\nPromise queue with concurrency control.\n*/\nclass PQueue extends eventemitter3__WEBPACK_IMPORTED_MODULE_0__ {\n // TODO: The `throwOnTimeout` option should affect the return types of `add()` and `addAll()`\n constructor(options) {\n var _a, _b, _c, _d;\n super();\n _PQueue_instances.add(this);\n _PQueue_carryoverConcurrencyCount.set(this, void 0);\n _PQueue_isIntervalIgnored.set(this, void 0);\n _PQueue_intervalCount.set(this, 0);\n _PQueue_intervalCap.set(this, void 0);\n _PQueue_interval.set(this, void 0);\n _PQueue_intervalEnd.set(this, 0);\n _PQueue_intervalId.set(this, void 0);\n _PQueue_timeoutId.set(this, void 0);\n _PQueue_queue.set(this, void 0);\n _PQueue_queueClass.set(this, void 0);\n _PQueue_pending.set(this, 0);\n // The `!` is needed because of https://github.com/microsoft/TypeScript/issues/32194\n _PQueue_concurrency.set(this, void 0);\n _PQueue_isPaused.set(this, void 0);\n _PQueue_throwOnTimeout.set(this, void 0);\n /**\n Per-operation timeout in milliseconds. Operations fulfill once `timeout` elapses if they haven't already.\n \n Applies to each future operation.\n */\n Object.defineProperty(this, \"timeout\", {\n enumerable: true,\n configurable: true,\n writable: true,\n
/***/ }),
/***/ "./node_modules/p-queue/dist/lower-bound.js":
/*!**************************************************!*\
!*** ./node_modules/p-queue/dist/lower-bound.js ***!
\**************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ lowerBound)\n/* harmony export */ });\n// Port of lower_bound from https://en.cppreference.com/w/cpp/algorithm/lower_bound\n// Used to compute insertion index to keep queue sorted after insertion\nfunction lowerBound(array, value, comparator) {\n let first = 0;\n let count = array.length;\n while (count > 0) {\n const step = Math.trunc(count / 2);\n let it = first + step;\n if (comparator(array[it], value) <= 0) {\n first = ++it;\n count -= step + 1;\n }\n else {\n count = step;\n }\n }\n return first;\n}\n\n\n//# sourceURL=webpack://light/./node_modules/p-queue/dist/lower-bound.js?");
/***/ }),
/***/ "./node_modules/p-queue/dist/priority-queue.js":
/*!*****************************************************!*\
!*** ./node_modules/p-queue/dist/priority-queue.js ***!
\*****************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ PriorityQueue)\n/* harmony export */ });\n/* harmony import */ var _lower_bound_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lower-bound.js */ \"./node_modules/p-queue/dist/lower-bound.js\");\nvar __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\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\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _PriorityQueue_queue;\n\nclass PriorityQueue {\n constructor() {\n _PriorityQueue_queue.set(this, []);\n }\n enqueue(run, options) {\n options = {\n priority: 0,\n ...options,\n };\n const element = {\n priority: options.priority,\n run,\n };\n if (this.size && __classPrivateFieldGet(this, _PriorityQueue_queue, \"f\")[this.size - 1].priority >= options.priority) {\n __classPrivateFieldGet(this, _PriorityQueue_queue, \"f\").push(element);\n return;\n }\n const index = (0,_lower_bound_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(__classPrivateFieldGet(this, _PriorityQueue_queue, \"f\"), element, (a, b) => b.priority - a.priority);\n __classPrivateFieldGet(this, _PriorityQueue_queue, \"f\").splice(index, 0, element);\n }\n dequeue() {\n const item = __classPrivateFieldGet(this, _PriorityQueue_queue, \"f\").shift();\n return item === null || item === void 0 ? void 0 : item.run;\n }\n filter(options) {\n return __classPrivateFieldGet(this, _PriorityQueue_queue, \"f\").filter((element) => element.priority === options.priority).map((element) => element.run);\n }\n get size() {\n return __classPrivateFieldGet(this, _PriorityQueue_queue, \"f\").length;\n }\n}\n_PriorityQueue_queue = new WeakMap();\n\n\n//# sourceURL=webpack://light/./node_modules/p-queue/dist/priority-queue.js?");
/***/ }),
/***/ "./node_modules/p-queue/node_modules/p-timeout/index.js":
/*!**************************************************************!*\
!*** ./node_modules/p-queue/node_modules/p-timeout/index.js ***!
\**************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AbortError: () => (/* binding */ AbortError),\n/* harmony export */ TimeoutError: () => (/* binding */ TimeoutError),\n/* harmony export */ \"default\": () => (/* binding */ pTimeout)\n/* harmony export */ });\nclass TimeoutError extends Error {\n\tconstructor(message) {\n\t\tsuper(message);\n\t\tthis.name = 'TimeoutError';\n\t}\n}\n\n/**\nAn error to be thrown when the request is aborted by AbortController.\nDOMException is thrown instead of this Error when DOMException is available.\n*/\nclass AbortError extends Error {\n\tconstructor(message) {\n\t\tsuper();\n\t\tthis.name = 'AbortError';\n\t\tthis.message = message;\n\t}\n}\n\n/**\nTODO: Remove AbortError and just throw DOMException when targeting Node 18.\n*/\nconst getDOMException = errorMessage => globalThis.DOMException === undefined ?\n\tnew AbortError(errorMessage) :\n\tnew DOMException(errorMessage);\n\n/**\nTODO: Remove below function and just 'reject(signal.reason)' when targeting Node 18.\n*/\nconst getAbortedReason = signal => {\n\tconst reason = signal.reason === undefined ?\n\t\tgetDOMException('This operation was aborted.') :\n\t\tsignal.reason;\n\n\treturn reason instanceof Error ? reason : getDOMException(reason);\n};\n\nfunction pTimeout(promise, milliseconds, fallback, options) {\n\tlet timer;\n\n\tconst cancelablePromise = new Promise((resolve, reject) => {\n\t\tif (typeof milliseconds !== 'number' || Math.sign(milliseconds) !== 1) {\n\t\t\tthrow new TypeError(`Expected \\`milliseconds\\` to be a positive number, got \\`${milliseconds}\\``);\n\t\t}\n\n\t\tif (milliseconds === Number.POSITIVE_INFINITY) {\n\t\t\tresolve(promise);\n\t\t\treturn;\n\t\t}\n\n\t\toptions = {\n\t\t\tcustomTimers: {setTimeout, clearTimeout},\n\t\t\t...options\n\t\t};\n\n\t\tif (options.signal) {\n\t\t\tconst {signal} = options;\n\t\t\tif (signal.aborted) {\n\t\t\t\treject(getAbortedReason(signal));\n\t\t\t}\n\n\t\t\tsignal.addEventListener('abort', () => {\n\t\t\t\treject(getAbortedReason(signal));\n\t\t\t});\n\t\t}\n\n\t\ttimer = options.customTimers.setTimeout.call(undefined, () => {\n\t\t\tif (typeof fallback === 'function') {\n\t\t\t\ttry {\n\t\t\t\t\tresolve(fallback());\n\t\t\t\t} catch (error) {\n\t\t\t\t\treject(error);\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst message = typeof fallback === 'string' ? fallback : `Promise timed out after ${milliseconds} milliseconds`;\n\t\t\tconst timeoutError = fallback instanceof Error ? fallback : new TimeoutError(message);\n\n\t\t\tif (typeof promise.cancel === 'function') {\n\t\t\t\tpromise.cancel();\n\t\t\t}\n\n\t\t\treject(timeoutError);\n\t\t}, milliseconds);\n\n\t\t(async () => {\n\t\t\ttry {\n\t\t\t\tresolve(await promise);\n\t\t\t} catch (error) {\n\t\t\t\treject(error);\n\t\t\t} finally {\n\t\t\t\toptions.customTimers.clearTimeout.call(undefined, timer);\n\t\t\t}\n\t\t})();\n\t});\n\n\tcancelablePromise.clear = () => {\n\t\tclearTimeout(timer);\n\t\ttimer = undefined;\n\t};\n\n\treturn cancelablePromise;\n}\n\n\n//# sourceURL=webpack://light/./node_modules/p-queue/node_modules/p-timeout/index.js?");
/***/ }),
/***/ "./node_modules/p-retry/index.js":
/*!***************************************!*\
!*** ./node_modules/p-retry/index.js ***!
\***************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AbortError: () => (/* binding */ AbortError),\n/* harmony export */ \"default\": () => (/* binding */ pRetry)\n/* harmony export */ });\n/* harmony import */ var retry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! retry */ \"./node_modules/retry/index.js\");\n\n\nconst networkErrorMsgs = new Set([\n\t'Failed to fetch', // Chrome\n\t'NetworkError when attempting to fetch resource.', // Firefox\n\t'The Internet connection appears to be offline.', // Safari\n\t'Network request failed', // `cross-fetch`\n\t'fetch failed', // Undici (Node.js)\n]);\n\nclass AbortError extends Error {\n\tconstructor(message) {\n\t\tsuper();\n\n\t\tif (message instanceof Error) {\n\t\t\tthis.originalError = message;\n\t\t\t({message} = message);\n\t\t} else {\n\t\t\tthis.originalError = new Error(message);\n\t\t\tthis.originalError.stack = this.stack;\n\t\t}\n\n\t\tthis.name = 'AbortError';\n\t\tthis.message = message;\n\t}\n}\n\nconst decorateErrorWithCounts = (error, attemptNumber, options) => {\n\t// Minus 1 from attemptNumber because the first attempt does not count as a retry\n\tconst retriesLeft = options.retries - (attemptNumber - 1);\n\n\terror.attemptNumber = attemptNumber;\n\terror.retriesLeft = retriesLeft;\n\treturn error;\n};\n\nconst isNetworkError = errorMessage => networkErrorMsgs.has(errorMessage);\n\nconst getDOMException = errorMessage => globalThis.DOMException === undefined\n\t? new Error(errorMessage)\n\t: new DOMException(errorMessage);\n\nasync function pRetry(input, options) {\n\treturn new Promise((resolve, reject) => {\n\t\toptions = {\n\t\t\tonFailedAttempt() {},\n\t\t\tretries: 10,\n\t\t\t...options,\n\t\t};\n\n\t\tconst operation = retry__WEBPACK_IMPORTED_MODULE_0__.operation(options);\n\n\t\toperation.attempt(async attemptNumber => {\n\t\t\ttry {\n\t\t\t\tresolve(await input(attemptNumber));\n\t\t\t} catch (error) {\n\t\t\t\tif (!(error instanceof Error)) {\n\t\t\t\t\treject(new TypeError(`Non-error was thrown: \"${error}\". You should only throw errors.`));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (error instanceof AbortError) {\n\t\t\t\t\toperation.stop();\n\t\t\t\t\treject(error.originalError);\n\t\t\t\t} else if (error instanceof TypeError && !isNetworkError(error.message)) {\n\t\t\t\t\toperation.stop();\n\t\t\t\t\treject(error);\n\t\t\t\t} else {\n\t\t\t\t\tdecorateErrorWithCounts(error, attemptNumber, options);\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tawait options.onFailedAttempt(error);\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\treject(error);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!operation.retry(error)) {\n\t\t\t\t\t\treject(operation.mainError());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tif (options.signal && !options.signal.aborted) {\n\t\t\toptions.signal.addEventListener('abort', () => {\n\t\t\t\toperation.stop();\n\t\t\t\tconst reason = options.signal.reason === undefined\n\t\t\t\t\t? getDOMException('The operation was aborted.')\n\t\t\t\t\t: options.signal.reason;\n\t\t\t\treject(reason instanceof Error ? reason : getDOMException(reason));\n\t\t\t}, {\n\t\t\t\tonce: true,\n\t\t\t});\n\t\t}\n\t});\n}\n\n\n//# sourceURL=webpack://light/./node_modules/p-retry/index.js?");
/***/ }),
/***/ "./node_modules/p-timeout/index.js":
/*!*****************************************!*\
!*** ./node_modules/p-timeout/index.js ***!
\*****************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AbortError: () => (/* binding */ AbortError),\n/* harmony export */ TimeoutError: () => (/* binding */ TimeoutError),\n/* harmony export */ \"default\": () => (/* binding */ pTimeout)\n/* harmony export */ });\nclass TimeoutError extends Error {\n\tconstructor(message) {\n\t\tsuper(message);\n\t\tthis.name = 'TimeoutError';\n\t}\n}\n\n/**\nAn error to be thrown when the request is aborted by AbortController.\nDOMException is thrown instead of this Error when DOMException is available.\n*/\nclass AbortError extends Error {\n\tconstructor(message) {\n\t\tsuper();\n\t\tthis.name = 'AbortError';\n\t\tthis.message = message;\n\t}\n}\n\n/**\nTODO: Remove AbortError and just throw DOMException when targeting Node 18.\n*/\nconst getDOMException = errorMessage => globalThis.DOMException === undefined\n\t? new AbortError(errorMessage)\n\t: new DOMException(errorMessage);\n\n/**\nTODO: Remove below function and just 'reject(signal.reason)' when targeting Node 18.\n*/\nconst getAbortedReason = signal => {\n\tconst reason = signal.reason === undefined\n\t\t? getDOMException('This operation was aborted.')\n\t\t: signal.reason;\n\n\treturn reason instanceof Error ? reason : getDOMException(reason);\n};\n\nfunction pTimeout(promise, options) {\n\tconst {\n\t\tmilliseconds,\n\t\tfallback,\n\t\tmessage,\n\t\tcustomTimers = {setTimeout, clearTimeout},\n\t} = options;\n\n\tlet timer;\n\n\tconst wrappedPromise = new Promise((resolve, reject) => {\n\t\tif (typeof milliseconds !== 'number' || Math.sign(milliseconds) !== 1) {\n\t\t\tthrow new TypeError(`Expected \\`milliseconds\\` to be a positive number, got \\`${milliseconds}\\``);\n\t\t}\n\n\t\tif (options.signal) {\n\t\t\tconst {signal} = options;\n\t\t\tif (signal.aborted) {\n\t\t\t\treject(getAbortedReason(signal));\n\t\t\t}\n\n\t\t\tsignal.addEventListener('abort', () => {\n\t\t\t\treject(getAbortedReason(signal));\n\t\t\t});\n\t\t}\n\n\t\tif (milliseconds === Number.POSITIVE_INFINITY) {\n\t\t\tpromise.then(resolve, reject);\n\t\t\treturn;\n\t\t}\n\n\t\t// We create the error outside of `setTimeout` to preserve the stack trace.\n\t\tconst timeoutError = new TimeoutError();\n\n\t\ttimer = customTimers.setTimeout.call(undefined, () => {\n\t\t\tif (fallback) {\n\t\t\t\ttry {\n\t\t\t\t\tresolve(fallback());\n\t\t\t\t} catch (error) {\n\t\t\t\t\treject(error);\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (typeof promise.cancel === 'function') {\n\t\t\t\tpromise.cancel();\n\t\t\t}\n\n\t\t\tif (message === false) {\n\t\t\t\tresolve();\n\t\t\t} else if (message instanceof Error) {\n\t\t\t\treject(message);\n\t\t\t} else {\n\t\t\t\ttimeoutError.message = message ?? `Promise timed out after ${milliseconds} milliseconds`;\n\t\t\t\treject(timeoutError);\n\t\t\t}\n\t\t}, milliseconds);\n\n\t\t(async () => {\n\t\t\ttry {\n\t\t\t\tresolve(await promise);\n\t\t\t} catch (error) {\n\t\t\t\treject(error);\n\t\t\t}\n\t\t})();\n\t});\n\n\tconst cancelablePromise = wrappedPromise.finally(() => {\n\t\tcancelablePromise.clear();\n\t});\n\n\tcancelablePromise.clear = () => {\n\t\tcustomTimers.clearTimeout.call(undefined, timer);\n\t\ttimer = undefined;\n\t};\n\n\treturn cancelablePromise;\n}\n\n\n//# sourceURL=webpack://light/./node_modules/p-timeout/index.js?");
/***/ }),
/***/ "./node_modules/private-ip/index.js":
/*!******************************************!*\
!*** ./node_modules/private-ip/index.js ***!
\******************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _lib_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib/index.js */ \"./node_modules/private-ip/lib/index.js\");\n\n\n;\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_lib_index_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n//# sourceURL=webpack://light/./node_modules/private-ip/index.js?");
/***/ }),
/***/ "./node_modules/private-ip/lib/index.js":
/*!**********************************************!*\
!*** ./node_modules/private-ip/lib/index.js ***!
\**********************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var netmask__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! netmask */ \"./node_modules/netmask/lib/netmask.js\");\n/* harmony import */ var ip_regex__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ip-regex */ \"./node_modules/ip-regex/index.js\");\n/* harmony import */ var _chainsafe_is_ip__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @chainsafe/is-ip */ \"./node_modules/@chainsafe/is-ip/lib/is-ip.js\");\n/* harmony import */ var ipaddr_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ipaddr.js */ \"./node_modules/ipaddr.js/lib/ipaddr.js\");\n\n\n\n\nconst { isValid: is_valid, parse } = ipaddr_js__WEBPACK_IMPORTED_MODULE_3__;\nconst PRIVATE_IP_RANGES = [\n '0.0.0.0/8',\n '10.0.0.0/8',\n '100.64.0.0/10',\n '127.0.0.0/8',\n '169.254.0.0/16',\n '172.16.0.0/12',\n '192.0.0.0/24',\n '192.0.0.0/29',\n '192.0.0.8/32',\n '192.0.0.9/32',\n '192.0.0.10/32',\n '192.0.0.170/32',\n '192.0.0.171/32',\n '192.0.2.0/24',\n '192.31.196.0/24',\n '192.52.193.0/24',\n '192.88.99.0/24',\n '192.168.0.0/16',\n '192.175.48.0/24',\n '198.18.0.0/15',\n '198.51.100.0/24',\n '203.0.113.0/24',\n '240.0.0.0/4',\n '255.255.255.255/32'\n];\nconst NETMASK_RANGES = PRIVATE_IP_RANGES.map(ip_range => new netmask__WEBPACK_IMPORTED_MODULE_0__.Netmask(ip_range));\nfunction ipv4_check(ip_addr) {\n for (let r of NETMASK_RANGES) {\n if (r.contains(ip_addr))\n return true;\n }\n return false;\n}\nfunction ipv6_check(ip_addr) {\n return /^::$/.test(ip_addr) ||\n /^::1$/.test(ip_addr) ||\n /^::f{4}:([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})$/.test(ip_addr) ||\n /^::f{4}:0.([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})$/.test(ip_addr) ||\n /^64:ff9b::([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})$/.test(ip_addr) ||\n /^100::([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4})$/.test(ip_addr) ||\n /^2001::([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4})$/.test(ip_addr) ||\n /^2001:2[0-9a-fA-F]:([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4})$/.test(ip_addr) ||\n /^2001:db8:([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4})$/.test(ip_addr) ||\n /^2002:([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4})$/.test(ip_addr) ||\n /^f[c-d]([0-9a-fA-F]{2,2}):/i.test(ip_addr) ||\n /^fe[8-9a-bA-B][0-9a-fA-F]:/i.test(ip_addr) ||\n /^ff([0-9a-fA-F]{2,2}):/i.test(ip_addr);\n}\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((ip) => {\n if (is_valid(ip)) {\n const parsed = parse(ip);\n if (parsed.kind() === 'ipv4')\n return ipv4_check(parsed.toNormalizedString());\n else if (parsed.kind() === 'ipv6')\n return ipv6_check(ip);\n }\n else if ((0,_chainsafe_is_ip__WEBPACK_IMPORTED_MODULE_2__.isIP)(ip) && ip_regex__WEBPACK_IMPORTED_MODULE_1__[\"default\"].v6().test(ip))\n return ipv6_check(ip);\n return undefined;\n});\n\n\n//# sourceURL=webpack://light/./node_modules/private-ip/lib/index.js?");
/***/ }),
/***/ "./node_modules/protons-runtime/dist/src/codec.js":
/*!********************************************************!*\
!*** ./node_modules/protons-runtime/dist/src/codec.js ***!
\********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ CODEC_TYPES: () => (/* binding */ CODEC_TYPES),\n/* harmony export */ createCodec: () => (/* binding */ createCodec)\n/* harmony export */ });\n// https://developers.google.com/protocol-buffers/docs/encoding#structure\nvar CODEC_TYPES;\n(function (CODEC_TYPES) {\n CODEC_TYPES[CODEC_TYPES[\"VARINT\"] = 0] = \"VARINT\";\n CODEC_TYPES[CODEC_TYPES[\"BIT64\"] = 1] = \"BIT64\";\n CODEC_TYPES[CODEC_TYPES[\"LENGTH_DELIMITED\"] = 2] = \"LENGTH_DELIMITED\";\n CODEC_TYPES[CODEC_TYPES[\"START_GROUP\"] = 3] = \"START_GROUP\";\n CODEC_TYPES[CODEC_TYPES[\"END_GROUP\"] = 4] = \"END_GROUP\";\n CODEC_TYPES[CODEC_TYPES[\"BIT32\"] = 5] = \"BIT32\";\n})(CODEC_TYPES || (CODEC_TYPES = {}));\nfunction createCodec(name, type, encode, decode) {\n return {\n name,\n type,\n encode,\n decode\n };\n}\n//# sourceMappingURL=codec.js.map\n\n//# sourceURL=webpack://light/./node_modules/protons-runtime/dist/src/codec.js?");
/***/ }),
/***/ "./node_modules/protons-runtime/dist/src/codecs/enum.js":
/*!**************************************************************!*\
!*** ./node_modules/protons-runtime/dist/src/codecs/enum.js ***!
\**************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ enumeration: () => (/* binding */ enumeration)\n/* harmony export */ });\n/* harmony import */ var _codec_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../codec.js */ \"./node_modules/protons-runtime/dist/src/codec.js\");\n\nfunction enumeration(v) {\n function findValue(val) {\n // Use the reverse mapping to look up the enum key for the stored value\n // https://www.typescriptlang.org/docs/handbook/enums.html#reverse-mappings\n if (v[val.toString()] == null) {\n throw new Error('Invalid enum value');\n }\n return v[val];\n }\n const encode = function enumEncode(val, writer) {\n const enumValue = findValue(val);\n writer.int32(enumValue);\n };\n const decode = function enumDecode(reader) {\n const val = reader.int32();\n return findValue(val);\n };\n // @ts-expect-error yeah yeah\n return (0,_codec_js__WEBPACK_IMPORTED_MODULE_0__.createCodec)('enum', _codec_js__WEBPACK_IMPORTED_MODULE_0__.CODEC_TYPES.VARINT, encode, decode);\n}\n//# sourceMappingURL=enum.js.map\n\n//# sourceURL=webpack://light/./node_modules/protons-runtime/dist/src/codecs/enum.js?");
/***/ }),
/***/ "./node_modules/protons-runtime/dist/src/codecs/message.js":
/*!*****************************************************************!*\
!*** ./node_modules/protons-runtime/dist/src/codecs/message.js ***!
\*****************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ message: () => (/* binding */ message)\n/* harmony export */ });\n/* harmony import */ var _codec_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../codec.js */ \"./node_modules/protons-runtime/dist/src/codec.js\");\n\nfunction message(encode, decode) {\n return (0,_codec_js__WEBPACK_IMPORTED_MODULE_0__.createCodec)('message', _codec_js__WEBPACK_IMPORTED_MODULE_0__.CODEC_TYPES.LENGTH_DELIMITED, encode, decode);\n}\n//# sourceMappingURL=message.js.map\n\n//# sourceURL=webpack://light/./node_modules/protons-runtime/dist/src/codecs/message.js?");
/***/ }),
/***/ "./node_modules/protons-runtime/dist/src/decode.js":
/*!*********************************************************!*\
!*** ./node_modules/protons-runtime/dist/src/decode.js ***!
\*********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ decodeMessage: () => (/* binding */ decodeMessage)\n/* harmony export */ });\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils.js */ \"./node_modules/protons-runtime/dist/src/utils.js\");\n\nfunction decodeMessage(buf, codec) {\n const r = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.reader)(buf instanceof Uint8Array ? buf : buf.subarray());\n return codec.decode(r);\n}\n//# sourceMappingURL=decode.js.map\n\n//# sourceURL=webpack://light/./node_modules/protons-runtime/dist/src/decode.js?");
/***/ }),
/***/ "./node_modules/protons-runtime/dist/src/encode.js":
/*!*********************************************************!*\
!*** ./node_modules/protons-runtime/dist/src/encode.js ***!
\*********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ encodeMessage: () => (/* binding */ encodeMessage)\n/* harmony export */ });\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils.js */ \"./node_modules/protons-runtime/dist/src/utils.js\");\n\nfunction encodeMessage(message, codec) {\n const w = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.writer)();\n codec.encode(message, w, {\n lengthDelimited: false\n });\n return w.finish();\n}\n//# sourceMappingURL=encode.js.map\n\n//# sourceURL=webpack://light/./node_modules/protons-runtime/dist/src/encode.js?");
/***/ }),
/***/ "./node_modules/protons-runtime/dist/src/index.js":
/*!********************************************************!*\
!*** ./node_modules/protons-runtime/dist/src/index.js ***!
\********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ decodeMessage: () => (/* reexport safe */ _decode_js__WEBPACK_IMPORTED_MODULE_0__.decodeMessage),\n/* harmony export */ encodeMessage: () => (/* reexport safe */ _encode_js__WEBPACK_IMPORTED_MODULE_1__.encodeMessage),\n/* harmony export */ enumeration: () => (/* reexport safe */ _codecs_enum_js__WEBPACK_IMPORTED_MODULE_2__.enumeration),\n/* harmony export */ message: () => (/* reexport safe */ _codecs_message_js__WEBPACK_IMPORTED_MODULE_3__.message),\n/* harmony export */ reader: () => (/* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_4__.reader),\n/* harmony export */ writer: () => (/* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_4__.writer)\n/* harmony export */ });\n/* harmony import */ var _decode_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./decode.js */ \"./node_modules/protons-runtime/dist/src/decode.js\");\n/* harmony import */ var _encode_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./encode.js */ \"./node_modules/protons-runtime/dist/src/encode.js\");\n/* harmony import */ var _codecs_enum_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./codecs/enum.js */ \"./node_modules/protons-runtime/dist/src/codecs/enum.js\");\n/* harmony import */ var _codecs_message_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./codecs/message.js */ \"./node_modules/protons-runtime/dist/src/codecs/message.js\");\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils.js */ \"./node_modules/protons-runtime/dist/src/utils.js\");\n\n\n\n\n\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/protons-runtime/dist/src/index.js?");
/***/ }),
/***/ "./node_modules/protons-runtime/dist/src/utils.js":
/*!********************************************************!*\
!*** ./node_modules/protons-runtime/dist/src/utils.js ***!
\********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ reader: () => (/* binding */ reader),\n/* harmony export */ writer: () => (/* binding */ writer)\n/* harmony export */ });\n/* harmony import */ var protobufjs_src_reader_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! protobufjs/src/reader.js */ \"./node_modules/protobufjs/src/reader.js\");\n/* harmony import */ var protobufjs_src_reader_buffer_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! protobufjs/src/reader_buffer.js */ \"./node_modules/protobufjs/src/reader_buffer.js\");\n/* harmony import */ var protobufjs_src_util_minimal_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! protobufjs/src/util/minimal.js */ \"./node_modules/protobufjs/src/util/minimal.js\");\n/* harmony import */ var protobufjs_src_writer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! protobufjs/src/writer.js */ \"./node_modules/protobufjs/src/writer.js\");\n/* harmony import */ var protobufjs_src_writer_buffer_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! protobufjs/src/writer_buffer.js */ \"./node_modules/protobufjs/src/writer_buffer.js\");\n// @ts-expect-error no types\n\n// @ts-expect-error no types\n\n// @ts-expect-error no types\n\n// @ts-expect-error no types\n\n// @ts-expect-error no types\n\nfunction configure() {\n protobufjs_src_util_minimal_js__WEBPACK_IMPORTED_MODULE_2__._configure();\n protobufjs_src_reader_js__WEBPACK_IMPORTED_MODULE_0__._configure(protobufjs_src_reader_buffer_js__WEBPACK_IMPORTED_MODULE_1__);\n protobufjs_src_writer_js__WEBPACK_IMPORTED_MODULE_3__._configure(protobufjs_src_writer_buffer_js__WEBPACK_IMPORTED_MODULE_4__);\n}\n// Set up buffer utility according to the environment\nconfigure();\n// monkey patch the reader to add native bigint support\nconst methods = [\n 'uint64', 'int64', 'sint64', 'fixed64', 'sfixed64'\n];\nfunction patchReader(obj) {\n for (const method of methods) {\n if (obj[method] == null) {\n continue;\n }\n const original = obj[method];\n obj[method] = function () {\n return BigInt(original.call(this).toString());\n };\n }\n return obj;\n}\nfunction reader(buf) {\n return patchReader(new protobufjs_src_reader_js__WEBPACK_IMPORTED_MODULE_0__(buf));\n}\nfunction patchWriter(obj) {\n for (const method of methods) {\n if (obj[method] == null) {\n continue;\n }\n const original = obj[method];\n obj[method] = function (val) {\n return original.call(this, val.toString());\n };\n }\n return obj;\n}\nfunction writer() {\n return patchWriter(protobufjs_src_writer_js__WEBPACK_IMPORTED_MODULE_3__.create());\n}\n//# sourceMappingURL=utils.js.map\n\n//# sourceURL=webpack://light/./node_modules/protons-runtime/dist/src/utils.js?");
/***/ }),
/***/ "./node_modules/uint8-varint/dist/src/index.js":
/*!*****************************************************!*\
!*** ./node_modules/uint8-varint/dist/src/index.js ***!
\*****************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ signed: () => (/* binding */ signed),\n/* harmony export */ unsigned: () => (/* binding */ unsigned),\n/* harmony export */ zigzag: () => (/* binding */ zigzag)\n/* harmony export */ });\n/* harmony import */ var longbits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! longbits */ \"./node_modules/longbits/dist/src/index.js\");\n/* harmony import */ var uint8arrays_alloc__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! uint8arrays/alloc */ \"./node_modules/uint8arrays/dist/src/alloc.js\");\n\n\nconst N1 = Math.pow(2, 7);\nconst N2 = Math.pow(2, 14);\nconst N3 = Math.pow(2, 21);\nconst N4 = Math.pow(2, 28);\nconst N5 = Math.pow(2, 35);\nconst N6 = Math.pow(2, 42);\nconst N7 = Math.pow(2, 49);\nconst N8 = Math.pow(2, 56);\nconst N9 = Math.pow(2, 63);\nconst unsigned = {\n encodingLength(value) {\n if (value < N1) {\n return 1;\n }\n if (value < N2) {\n return 2;\n }\n if (value < N3) {\n return 3;\n }\n if (value < N4) {\n return 4;\n }\n if (value < N5) {\n return 5;\n }\n if (value < N6) {\n return 6;\n }\n if (value < N7) {\n return 7;\n }\n if (value < N8) {\n return 8;\n }\n if (value < N9) {\n return 9;\n }\n return 10;\n },\n encode(value, buf, offset = 0) {\n if (Number.MAX_SAFE_INTEGER != null && value > Number.MAX_SAFE_INTEGER) {\n throw new RangeError('Could not encode varint');\n }\n if (buf == null) {\n buf = (0,uint8arrays_alloc__WEBPACK_IMPORTED_MODULE_1__.allocUnsafe)(unsigned.encodingLength(value));\n }\n longbits__WEBPACK_IMPORTED_MODULE_0__.LongBits.fromNumber(value).toBytes(buf, offset);\n return buf;\n },\n decode(buf, offset = 0) {\n return longbits__WEBPACK_IMPORTED_MODULE_0__.LongBits.fromBytes(buf, offset).toNumber(true);\n }\n};\nconst signed = {\n encodingLength(value) {\n if (value < 0) {\n return 10; // 10 bytes per spec - https://developers.google.com/protocol-buffers/docs/encoding#signed-ints\n }\n return unsigned.encodingLength(value);\n },\n encode(value, buf, offset) {\n if (buf == null) {\n buf = (0,uint8arrays_alloc__WEBPACK_IMPORTED_MODULE_1__.allocUnsafe)(signed.encodingLength(value));\n }\n if (value < 0) {\n longbits__WEBPACK_IMPORTED_MODULE_0__.LongBits.fromNumber(value).toBytes(buf, offset);\n return buf;\n }\n return unsigned.encode(value, buf, offset);\n },\n decode(buf, offset = 0) {\n return longbits__WEBPACK_IMPORTED_MODULE_0__.LongBits.fromBytes(buf, offset).toNumber(false);\n }\n};\nconst zigzag = {\n encodingLength(value) {\n return unsigned.encodingLength(value >= 0 ? value * 2 : value * -2 - 1);\n },\n // @ts-expect-error\n encode(value, buf, offset) {\n value = value >= 0 ? value * 2 : (value * -2) - 1;\n return unsigned.encode(value, buf, offset);\n },\n decode(buf, offset = 0) {\n const value = unsigned.decode(buf, offset);\n return (value & 1) !== 0 ? (value + 1) / -2 : value / 2;\n }\n};\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/uint8-varint/dist/src/index.js?");
/***/ }),
/***/ "./node_modules/uint8arraylist/dist/src/index.js":
/*!*******************************************************!*\
!*** ./node_modules/uint8arraylist/dist/src/index.js ***!
\*******************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Uint8ArrayList: () => (/* binding */ Uint8ArrayList),\n/* harmony export */ isUint8ArrayList: () => (/* binding */ isUint8ArrayList)\n/* harmony export */ });\n/* harmony import */ var uint8arrays_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! uint8arrays/concat */ \"./node_modules/uint8arrays/dist/src/concat.js\");\n/* harmony import */ var uint8arrays_equals__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! uint8arrays/equals */ \"./node_modules/uint8arrays/dist/src/equals.js\");\n/* harmony import */ var uint8arrays_alloc__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! uint8arrays/alloc */ \"./node_modules/uint8arrays/dist/src/alloc.js\");\n\n\n\nconst symbol = Symbol.for('@achingbrain/uint8arraylist');\nfunction findBufAndOffset(bufs, index) {\n if (index == null || index < 0) {\n throw new RangeError('index is out of bounds');\n }\n let offset = 0;\n for (const buf of bufs) {\n const bufEnd = offset + buf.byteLength;\n if (index < bufEnd) {\n return {\n buf,\n index: index - offset\n };\n }\n offset = bufEnd;\n }\n throw new RangeError('index is out of bounds');\n}\n/**\n * Check if object is a CID instance\n *\n * @example\n *\n * ```js\n * import { isUint8ArrayList, Uint8ArrayList } from 'uint8arraylist'\n *\n * isUint8ArrayList(true) // false\n * isUint8ArrayList([]) // false\n * isUint8ArrayList(new Uint8ArrayList()) // true\n * ```\n */\nfunction isUint8ArrayList(value) {\n return Boolean(value?.[symbol]);\n}\nclass Uint8ArrayList {\n constructor(...data) {\n // Define symbol\n Object.defineProperty(this, symbol, { value: true });\n this.bufs = [];\n this.length = 0;\n if (data.length > 0) {\n this.appendAll(data);\n }\n }\n *[Symbol.iterator]() {\n yield* this.bufs;\n }\n get byteLength() {\n return this.length;\n }\n /**\n * Add one or more `bufs` to the end of this Uint8ArrayList\n */\n append(...bufs) {\n this.appendAll(bufs);\n }\n /**\n * Add all `bufs` to the end of this Uint8ArrayList\n */\n appendAll(bufs) {\n let length = 0;\n for (const buf of bufs) {\n if (buf instanceof Uint8Array) {\n length += buf.byteLength;\n this.bufs.push(buf);\n }\n else if (isUint8ArrayList(buf)) {\n length += buf.byteLength;\n this.bufs.push(...buf.bufs);\n }\n else {\n throw new Error('Could not append value, must be an Uint8Array or a Uint8ArrayList');\n }\n }\n this.length += length;\n }\n /**\n * Add one or more `bufs` to the start of this Uint8ArrayList\n */\n prepend(...bufs) {\n this.prependAll(bufs);\n }\n /**\n * Add all `bufs` to the start of this Uint8ArrayList\n */\n prependAll(bufs) {\n let length = 0;\n for (const buf of bufs.reverse()) {\n if (buf instanceof Uint8Array) {\n length += buf.byteLength;\n this.bufs.unshift(buf);\n }\n else if (isUint8ArrayList(buf)) {\n length += buf.byteLength;\n this.bufs.unshift(...buf.bufs);\n }\n else {\n throw new Error('Could not prepend value, must be an Uint8Array or a Uint8ArrayList');\n }\n }\n this.length += length;\n }\n /**\n * Read the value at `index`\n */\n get(index) {\n const res = findBufAndOffset(this.bufs, index);\n return res.buf[res.index];\n }\n /**\n * Set the value at `index` to `value`\n */\n set(index, value) {\n const res = findBufAndOffset(this.bufs, index);\n res.buf[res.index] = value;\n }\n /**\n * Copy bytes
/***/ }),
/***/ "./node_modules/uint8arrays/dist/src/alloc.js":
/*!****************************************************!*\
!*** ./node_modules/uint8arrays/dist/src/alloc.js ***!
\****************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ alloc: () => (/* binding */ alloc),\n/* harmony export */ allocUnsafe: () => (/* binding */ allocUnsafe)\n/* harmony export */ });\n/* harmony import */ var _util_as_uint8array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util/as-uint8array.js */ \"./node_modules/uint8arrays/dist/src/util/as-uint8array.js\");\n\n/**\n * Returns a `Uint8Array` of the requested size. Referenced memory will\n * be initialized to 0.\n */\nfunction alloc(size = 0) {\n if (globalThis.Buffer?.alloc != null) {\n return (0,_util_as_uint8array_js__WEBPACK_IMPORTED_MODULE_0__.asUint8Array)(globalThis.Buffer.alloc(size));\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 */\nfunction allocUnsafe(size = 0) {\n if (globalThis.Buffer?.allocUnsafe != null) {\n return (0,_util_as_uint8array_js__WEBPACK_IMPORTED_MODULE_0__.asUint8Array)(globalThis.Buffer.allocUnsafe(size));\n }\n return new Uint8Array(size);\n}\n//# sourceMappingURL=alloc.js.map\n\n//# sourceURL=webpack://light/./node_modules/uint8arrays/dist/src/alloc.js?");
/***/ }),
/***/ "./node_modules/uint8arrays/dist/src/compare.js":
/*!******************************************************!*\
!*** ./node_modules/uint8arrays/dist/src/compare.js ***!
\******************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ compare: () => (/* binding */ compare)\n/* harmony export */ });\n/**\n * Can be used with Array.sort to sort and array with Uint8Array entries\n */\nfunction compare(a, b) {\n for (let i = 0; i < a.byteLength; i++) {\n if (a[i] < b[i]) {\n return -1;\n }\n if (a[i] > b[i]) {\n return 1;\n }\n }\n if (a.byteLength > b.byteLength) {\n return 1;\n }\n if (a.byteLength < b.byteLength) {\n return -1;\n }\n return 0;\n}\n//# sourceMappingURL=compare.js.map\n\n//# sourceURL=webpack://light/./node_modules/uint8arrays/dist/src/compare.js?");
/***/ }),
/***/ "./node_modules/uint8arrays/dist/src/concat.js":
/*!*****************************************************!*\
!*** ./node_modules/uint8arrays/dist/src/concat.js ***!
\*****************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ concat: () => (/* binding */ concat)\n/* harmony export */ });\n/* harmony import */ var _alloc_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./alloc.js */ \"./node_modules/uint8arrays/dist/src/alloc.js\");\n/* harmony import */ var _util_as_uint8array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util/as-uint8array.js */ \"./node_modules/uint8arrays/dist/src/util/as-uint8array.js\");\n\n\n/**\n * Returns a new Uint8Array created by concatenating the passed ArrayLikes\n */\nfunction concat(arrays, length) {\n if (length == null) {\n length = arrays.reduce((acc, curr) => acc + curr.length, 0);\n }\n const output = (0,_alloc_js__WEBPACK_IMPORTED_MODULE_0__.allocUnsafe)(length);\n let offset = 0;\n for (const arr of arrays) {\n output.set(arr, offset);\n offset += arr.length;\n }\n return (0,_util_as_uint8array_js__WEBPACK_IMPORTED_MODULE_1__.asUint8Array)(output);\n}\n//# sourceMappingURL=concat.js.map\n\n//# sourceURL=webpack://light/./node_modules/uint8arrays/dist/src/concat.js?");
/***/ }),
/***/ "./node_modules/uint8arrays/dist/src/equals.js":
/*!*****************************************************!*\
!*** ./node_modules/uint8arrays/dist/src/equals.js ***!
\*****************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ equals: () => (/* binding */ equals)\n/* harmony export */ });\n/**\n * Returns true if the two passed Uint8Arrays have the same content\n */\nfunction equals(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++) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n return true;\n}\n//# sourceMappingURL=equals.js.map\n\n//# sourceURL=webpack://light/./node_modules/uint8arrays/dist/src/equals.js?");
/***/ }),
/***/ "./node_modules/uint8arrays/dist/src/from-string.js":
/*!**********************************************************!*\
!*** ./node_modules/uint8arrays/dist/src/from-string.js ***!
\**********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ fromString: () => (/* binding */ fromString)\n/* harmony export */ });\n/* harmony import */ var _util_as_uint8array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util/as-uint8array.js */ \"./node_modules/uint8arrays/dist/src/util/as-uint8array.js\");\n/* harmony import */ var _util_bases_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util/bases.js */ \"./node_modules/uint8arrays/dist/src/util/bases.js\");\n\n\n/**\n * Create a `Uint8Array` from the passed string\n *\n * Supports `utf8`, `utf-8`, `hex`, and any encoding supported by the multiformats module.\n *\n * Also `ascii` which is similar to node's 'binary' encoding.\n */\nfunction fromString(string, encoding = 'utf8') {\n const base = _util_bases_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"][encoding];\n if (base == null) {\n throw new Error(`Unsupported encoding \"${encoding}\"`);\n }\n if ((encoding === 'utf8' || encoding === 'utf-8') && globalThis.Buffer != null && globalThis.Buffer.from != null) {\n return (0,_util_as_uint8array_js__WEBPACK_IMPORTED_MODULE_0__.asUint8Array)(globalThis.Buffer.from(string, 'utf-8'));\n }\n // add multibase prefix\n return base.decoder.decode(`${base.prefix}${string}`); // eslint-disable-line @typescript-eslint/restrict-template-expressions\n}\n//# sourceMappingURL=from-string.js.map\n\n//# sourceURL=webpack://light/./node_modules/uint8arrays/dist/src/from-string.js?");
/***/ }),
/***/ "./node_modules/uint8arrays/dist/src/index.js":
/*!****************************************************!*\
!*** ./node_modules/uint8arrays/dist/src/index.js ***!
\****************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ compare: () => (/* reexport safe */ _compare_js__WEBPACK_IMPORTED_MODULE_0__.compare),\n/* harmony export */ concat: () => (/* reexport safe */ _concat_js__WEBPACK_IMPORTED_MODULE_1__.concat),\n/* harmony export */ equals: () => (/* reexport safe */ _equals_js__WEBPACK_IMPORTED_MODULE_2__.equals),\n/* harmony export */ fromString: () => (/* reexport safe */ _from_string_js__WEBPACK_IMPORTED_MODULE_3__.fromString),\n/* harmony export */ toString: () => (/* reexport safe */ _to_string_js__WEBPACK_IMPORTED_MODULE_4__.toString),\n/* harmony export */ xor: () => (/* reexport safe */ _xor_js__WEBPACK_IMPORTED_MODULE_5__.xor)\n/* harmony export */ });\n/* harmony import */ var _compare_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./compare.js */ \"./node_modules/uint8arrays/dist/src/compare.js\");\n/* harmony import */ var _concat_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./concat.js */ \"./node_modules/uint8arrays/dist/src/concat.js\");\n/* harmony import */ var _equals_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./equals.js */ \"./node_modules/uint8arrays/dist/src/equals.js\");\n/* harmony import */ var _from_string_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./from-string.js */ \"./node_modules/uint8arrays/dist/src/from-string.js\");\n/* harmony import */ var _to_string_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./to-string.js */ \"./node_modules/uint8arrays/dist/src/to-string.js\");\n/* harmony import */ var _xor_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./xor.js */ \"./node_modules/uint8arrays/dist/src/xor.js\");\n\n\n\n\n\n\n\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://light/./node_modules/uint8arrays/dist/src/index.js?");
/***/ }),
/***/ "./node_modules/uint8arrays/dist/src/to-string.js":
/*!********************************************************!*\
!*** ./node_modules/uint8arrays/dist/src/to-string.js ***!
\********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ toString: () => (/* binding */ toString)\n/* harmony export */ });\n/* harmony import */ var _util_bases_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util/bases.js */ \"./node_modules/uint8arrays/dist/src/util/bases.js\");\n\n/**\n * Turns a `Uint8Array` into a string.\n *\n * Supports `utf8`, `utf-8` and any encoding supported by the multibase module.\n *\n * Also `ascii` which is similar to node's 'binary' encoding.\n */\nfunction toString(array, encoding = 'utf8') {\n const base = _util_bases_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"][encoding];\n if (base == null) {\n throw new Error(`Unsupported encoding \"${encoding}\"`);\n }\n if ((encoding === 'utf8' || encoding === 'utf-8') && globalThis.Buffer != null && globalThis.Buffer.from != null) {\n return globalThis.Buffer.from(array.buffer, array.byteOffset, array.byteLength).toString('utf8');\n }\n // strip multibase prefix\n return base.encoder.encode(array).substring(1);\n}\n//# sourceMappingURL=to-string.js.map\n\n//# sourceURL=webpack://light/./node_modules/uint8arrays/dist/src/to-string.js?");
/***/ }),
/***/ "./node_modules/uint8arrays/dist/src/util/as-uint8array.js":
/*!*****************************************************************!*\
!*** ./node_modules/uint8arrays/dist/src/util/as-uint8array.js ***!
\*****************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ asUint8Array: () => (/* binding */ asUint8Array)\n/* harmony export */ });\n/**\n * To guarantee Uint8Array semantics, convert nodejs Buffers\n * into vanilla Uint8Arrays\n */\nfunction asUint8Array(buf) {\n if (globalThis.Buffer != null) {\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);\n }\n return buf;\n}\n//# sourceMappingURL=as-uint8array.js.map\n\n//# sourceURL=webpack://light/./node_modules/uint8arrays/dist/src/util/as-uint8array.js?");
/***/ }),
/***/ "./node_modules/uint8arrays/dist/src/util/bases.js":
/*!*********************************************************!*\
!*** ./node_modules/uint8arrays/dist/src/util/bases.js ***!
\*********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var multiformats_basics__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! multiformats/basics */ \"./node_modules/multiformats/src/basics.js\");\n/* harmony import */ var _alloc_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../alloc.js */ \"./node_modules/uint8arrays/dist/src/alloc.js\");\n\n\nfunction createCodec(name, prefix, encode, decode) {\n return {\n name,\n prefix,\n encoder: {\n name,\n prefix,\n encode\n },\n decoder: {\n decode\n }\n };\n}\nconst string = createCodec('utf8', 'u', (buf) => {\n const decoder = new TextDecoder('utf8');\n return 'u' + decoder.decode(buf);\n}, (str) => {\n const encoder = new TextEncoder();\n return encoder.encode(str.substring(1));\n});\nconst ascii = createCodec('ascii', 'a', (buf) => {\n let string = 'a';\n for (let i = 0; i < buf.length; i++) {\n string += String.fromCharCode(buf[i]);\n }\n return string;\n}, (str) => {\n str = str.substring(1);\n const buf = (0,_alloc_js__WEBPACK_IMPORTED_MODULE_1__.allocUnsafe)(str.length);\n for (let i = 0; i < str.length; i++) {\n buf[i] = str.charCodeAt(i);\n }\n return buf;\n});\nconst BASES = {\n utf8: string,\n 'utf-8': string,\n hex: multiformats_basics__WEBPACK_IMPORTED_MODULE_0__.bases.base16,\n latin1: ascii,\n ascii,\n binary: ascii,\n ...multiformats_basics__WEBPACK_IMPORTED_MODULE_0__.bases\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (BASES);\n//# sourceMappingURL=bases.js.map\n\n//# sourceURL=webpack://light/./node_modules/uint8arrays/dist/src/util/bases.js?");
/***/ }),
/***/ "./node_modules/uint8arrays/dist/src/xor.js":
/*!**************************************************!*\
!*** ./node_modules/uint8arrays/dist/src/xor.js ***!
\**************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ xor: () => (/* binding */ xor)\n/* harmony export */ });\n/* harmony import */ var _alloc_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./alloc.js */ \"./node_modules/uint8arrays/dist/src/alloc.js\");\n/* harmony import */ var _util_as_uint8array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util/as-uint8array.js */ \"./node_modules/uint8arrays/dist/src/util/as-uint8array.js\");\n\n\n/**\n * Returns the xor distance between two arrays\n */\nfunction xor(a, b) {\n if (a.length !== b.length) {\n throw new Error('Inputs should have the same length');\n }\n const result = (0,_alloc_js__WEBPACK_IMPORTED_MODULE_0__.allocUnsafe)(a.length);\n for (let i = 0; i < a.length; i++) {\n result[i] = a[i] ^ b[i];\n }\n return (0,_util_as_uint8array_js__WEBPACK_IMPORTED_MODULE_1__.asUint8Array)(result);\n}\n//# sourceMappingURL=xor.js.map\n\n//# sourceURL=webpack://light/./node_modules/uint8arrays/dist/src/xor.js?");
/***/ }),
/***/ "./node_modules/utf8-codec/index.mjs":
/*!*******************************************!*\
!*** ./node_modules/utf8-codec/index.mjs ***!
\*******************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ decode: () => (/* binding */ decode),\n/* harmony export */ encode: () => (/* binding */ encode),\n/* harmony export */ encodingLength: () => (/* binding */ encodingLength),\n/* harmony export */ name: () => (/* binding */ name)\n/* harmony export */ });\nconst SURROGATE_A = 0b1101100000000000\nconst SURROGATE_B = 0b1101110000000000\n\nconst name = 'utf8'\n\nfunction encodingLength (str) {\n let len = 0\n const strLen = str.length\n for (let i = 0; i < strLen; i += 1) {\n const code = str.charCodeAt(i)\n if (code <= 0x7F) {\n len += 1\n } else if (code <= 0x07FF) {\n len += 2\n } else if ((code & 0xF800) !== SURROGATE_A) {\n len += 3\n } else {\n const next = i + 1\n if (next === strLen || code >= SURROGATE_B) {\n len += 3\n } else {\n const nextCode = str.charCodeAt(next)\n if ((nextCode & 0xFC00) !== SURROGATE_B) {\n len += 3\n } else {\n i = next\n len += 4\n }\n }\n }\n }\n return len\n}\n\nfunction encode (str, buf, offset) {\n const strLen = str.length\n if (offset === undefined || offset === null) {\n offset = 0\n }\n if (buf === undefined) {\n buf = new Uint8Array(encodingLength(str) + offset)\n }\n let off = offset\n for (let i = 0; i < strLen; i += 1) {\n let code = str.charCodeAt(i)\n if (code <= 0x7F) {\n buf[off++] = code\n } else if (code <= 0x07FF) {\n buf[off++] = 0b11000000 | ((code & 0b11111000000) >> 6)\n buf[off++] = 0b10000000 | (code & 0b00000111111)\n } else if ((code & 0xF800) !== SURROGATE_A) {\n buf[off++] = 0b11100000 | ((code & 0b1111000000000000) >> 12)\n buf[off++] = 0b10000000 | ((code & 0b0000111111000000) >> 6)\n buf[off++] = 0b10000000 | (code & 0b0000000000111111)\n } else {\n const next = i + 1\n if (next === strLen || code >= SURROGATE_B) {\n // Incorrectly started surrogate pair\n buf[off++] = 0xef\n buf[off++] = 0xbf\n buf[off++] = 0xbd\n } else {\n const nextCode = str.charCodeAt(next)\n if ((nextCode & 0xFC00) !== SURROGATE_B) {\n // Incorrect surrogate pair\n buf[off++] = 0xef\n buf[off++] = 0xbf\n buf[off++] = 0xbd\n } else {\n i = next\n code = 0b000010000000000000000 |\n ((code & 0b1111111111) << 10) |\n (nextCode & 0b1111111111)\n buf[off++] = 0b11110000 | ((code & 0b111000000000000000000) >> 18)\n buf[off++] = 0b10000000 | ((code & 0b000111111000000000000) >> 12)\n buf[off++] = 0b10000000 | ((code & 0b000000000111111000000) >> 6)\n buf[off++] = 0b10000000 | (code & 0b000000000000000111111)\n }\n }\n }\n }\n encode.bytes = off - offset\n return buf\n}\nencode.bytes = 0\n\nfunction decode (buf, start, end) {\n let result = ''\n if (start === undefined || start === null) {\n start = 0\n }\n if (end === undefined || end === null) {\n end = buf.length\n }\n for (let offset = start; offset < end;) {\n const code = buf[offset++]\n let num\n if (code <= 128) {\n num = code\n } else if (code > 191 && code < 224) {\n num = ((code & 0b11111) << 6) | (buf[offset++] & 0b111111)\n } else if (code > 239 && code < 365) {\n num = (\n ((code & 0b111) << 18) |\n ((buf[offset++] & 0b111111) << 12) |\n ((buf[offset++] & 0b111111) << 6) |\n (buf[offset++] & 0b111111)\n ) - 0x10000\n const numA = SURROGATE_A | ((num >> 10) & 0b1111111111)\n result += String.fromCharCode(numA)\n num = SURROGATE_B | (num & 0b1111111111)\n } else {\n num = ((code & 0b1111) << 12) |\n ((buf[offset++] & 0b111111) << 6) |\n (buf[offset++] & 0b111111)\n }\n result += String.fromCharCode(num)\n }\n decode.bytes = end - start\n return result\n}\ndecode.bytes = 0\n\n\n//# sourceURL=webpack://lig
/***/ }),
/***/ "./node_modules/wherearewe/src/index.js":
/*!**********************************************!*\
!*** ./node_modules/wherearewe/src/index.js ***!
\**********************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ isBrowser: () => (/* binding */ isBrowser),\n/* harmony export */ isElectron: () => (/* binding */ isElectron),\n/* harmony export */ isElectronMain: () => (/* binding */ isElectronMain),\n/* harmony export */ isElectronRenderer: () => (/* binding */ isElectronRenderer),\n/* harmony export */ isEnvWithDom: () => (/* binding */ isEnvWithDom),\n/* harmony export */ isNode: () => (/* binding */ isNode),\n/* harmony export */ isReactNative: () => (/* binding */ isReactNative),\n/* harmony export */ isTest: () => (/* binding */ isTest),\n/* harmony export */ isWebWorker: () => (/* binding */ isWebWorker)\n/* harmony export */ });\n/* harmony import */ var is_electron__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! is-electron */ \"./node_modules/is-electron/index.js\");\n\n\nconst isEnvWithDom = typeof window === 'object' && typeof document === 'object' && document.nodeType === 9\nconst isElectron = is_electron__WEBPACK_IMPORTED_MODULE_0__()\n\n/**\n * Detects browser main thread **NOT** web worker or service worker\n */\nconst isBrowser = isEnvWithDom && !isElectron\nconst isElectronMain = isElectron && !isEnvWithDom\nconst isElectronRenderer = isElectron && isEnvWithDom\nconst isNode = typeof globalThis.process !== 'undefined' && typeof globalThis.process.release !== 'undefined' && globalThis.process.release.name === 'node' && !isElectron\n// @ts-ignore\n// eslint-disable-next-line no-undef\nconst isWebWorker = typeof importScripts === 'function' && typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope\n\n// defeat bundlers replacing process.env.NODE_ENV with \"development\" or whatever\nconst isTest = typeof globalThis.process !== 'undefined' && typeof globalThis.process.env !== 'undefined' && globalThis.process.env['NODE' + (() => '_')() + 'ENV'] === 'test'\nconst isReactNative = typeof navigator !== 'undefined' && navigator.product === 'ReactNative'\n\n\n//# sourceURL=webpack://light/./node_modules/wherearewe/src/index.js?");
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/************************************************************************/
/******/ /* webpack/runtime/amd options */
/******/ (() => {
/******/ __webpack_require__.amdO = {};
/******/ })();
/******/
/******/ /* webpack/runtime/create fake namespace object */
/******/ (() => {
/******/ var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);
/******/ var leafPrototypes;
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 16: return value when it's Promise-like
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = this(value);
/******/ if(mode & 8) return value;
/******/ if(typeof value === 'object' && value) {
/******/ if((mode & 4) && value.__esModule) return value;
/******/ if((mode & 16) && typeof value.then === 'function') return value;
/******/ }
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ var def = {};
/******/ leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];
/******/ for(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {
/******/ Object.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));
/******/ }
/******/ def['default'] = () => (value);
/******/ __webpack_require__.d(ns, def);
/******/ return ns;
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/global */
/******/ (() => {
/******/ __webpack_require__.g = (function() {
/******/ if (typeof globalThis === 'object') return globalThis;
/******/ try {
/******/ return this || new Function('return this')();
/******/ } catch (e) {
/******/ if (typeof window === 'object') return window;
/******/ }
/******/ })();
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
/******/
/******/ // startup
/******/ // Load entry module and return exports
/******/ // This entry module can't be inlined because the eval devtool is used.
/******/ var __webpack_exports__ = __webpack_require__("./index.js");
/******/
/******/ })()
;