text: ["^ ","~:resource-id",["~:shadow.build.npm/resource","node_modules/web3-providers-ws/lib/index.js"],"~:js","shadow$provide.module$node_modules$web3_providers_ws$lib$index=function(global,require,module,exports){var EventEmitter=require(\"module$node_modules$eventemitter3$index\"),helpers=require(\"module$node_modules$web3_providers_ws$lib$helpers\"),errors=require(\"module$node_modules$web3_core_helpers$lib$index\").errors,Ws=require(\"module$node_modules$websocket$lib$browser\").w3cwebsocket;global=function(url,options){EventEmitter.call(this);options=options||{};this.url=url;this._customTimeout=options.timeout||\n15E3;this.headers=options.headers||{};this.protocol=options.protocol||void 0;this.reconnectOptions=Object.assign({auto:!1,delay:5E3,maxAttempts:!1,onTimeout:!1},options.reconnect);this.clientConfig=options.clientConfig||void 0;this.requestOptions=options.requestOptions||void 0;this.DATA=\"data\";this.CLOSE=\"close\";this.ERROR=\"error\";this.CONNECT=\"connect\";this.RECONNECT=\"reconnect\";this.connection=null;this.requestQueue=new Map;this.responseQueue=new Map;this.reconnectAttempts=0;this.reconnecting=!1;\nurl=helpers.parseURL(url);url.username&&url.password&&(this.headers.authorization=\"Basic \"+helpers.btoa(url.username+\":\"+url.password));url.auth&&(this.headers.authorization=\"Basic \"+helpers.btoa(url.auth));Object.defineProperty(this,\"connected\",{get:function(){return this.connection&&this.connection.readyState===this.connection.OPEN},enumerable:!0});this.connect()};global.prototype=Object.create(EventEmitter.prototype);global.prototype.constructor=global;global.prototype.connect=function(){this.connection=\nnew Ws(this.url,this.protocol,void 0,this.headers,this.requestOptions,this.clientConfig);this._addSocketListeners()};global.prototype._onMessage=function(e){var _this=this;this._parseResponse(\"string\"===typeof e.data?e.data:\"\").forEach(function(result){if(result.method&&-1!==result.method.indexOf(\"_subscription\"))_this.emit(_this.DATA,result);else{var id=result.id;Array.isArray(result)&&(id=result[0].id);_this.responseQueue.has(id)&&(void 0!==_this.responseQueue.get(id).callback&&_this.responseQueue.get(id).callback(!1,\nresult),_this.responseQueue.delete(id))}})};global.prototype._onConnect=function(){this.emit(this.CONNECT);this.reconnectAttempts=0;this.reconnecting=!1;if(0<this.requestQueue.size){var _this=this;this.requestQueue.forEach(function(request,key){_this.send(request.payload,request.callback);_this.requestQueue.delete(key)})}};global.prototype._onClose=function(event){var _this=this;!this.reconnectOptions.auto||[1E3,1001].includes(event.code)&&!1!==event.wasClean?(this.emit(this.CLOSE,event),0<this.requestQueue.size&&\nthis.requestQueue.forEach(function(request,key){request.callback(errors.ConnectionNotOpenError(event));_this.requestQueue.delete(key)}),0<this.responseQueue.size&&this.responseQueue.forEach(function(request,key){request.callback(errors.InvalidConnection(\"on WS\",event));_this.responseQueue.delete(key)}),this._removeSocketListeners(),this.removeAllListeners()):this.reconnect()};global.prototype._addSocketListeners=function(){this.connection.addEventListener(\"message\",this._onMessage.bind(this));this.connection.addEventListener(\"open\",\nthis._onConnect.bind(this));this.connection.addEventListener(\"close\",this._onClose.bind(this))};global.prototype._removeSocketListeners=function(){this.connection.removeEventListener(\"message\",this._onMessage);this.connection.removeEventListener(\"open\",this._onConnect);this.connection.removeEventListener(\"close\",this._onClose)};global.prototype._parseResponse=function(data$jscomp$0){var _this=this,returnValues=[];data$jscomp$0.replace(/\\}[\\n\\r]?\\{/g,\"}|--|{\").replace(/\\}\\][\\n\\r]?\\[\\{/g,\"}]|--|[{\").replace(/\\}[\\n\\r]?\\[\\{/g,\n\"}|--|[{\").replace(/\\}\\][\\n\\r]?\\{/g,\"}]|--|{\").split(\"|--|\").forEach(function(data){_this.lastChunk&&(data=_this.lastChunk+data);var result=null;try{result=JSON.parse(data)}catch(e){_this.lastChunk=data;clearTimeout(_this.lastChunkTimeout);_this.lastChunkTimeout=setTimeout(function(){_this.reconnectOptions.auto&&_this.reconnectOptions.onTimeout?_this.reconnect():(_this.emit(_this.ERROR,errors.ConnectionTimeout(_this._customTimeout)),0<_this.requestQueue.size&&_this.requestQueue.forEach(function(request,\nkey){request.callback(errors.ConnectionTimeout(_this._customTimeout));_this.requestQueue.delete(key)}))},_this._customTimeout);return}clearTimeout(_this.lastChunkTimeout);_this.lastChunk=null;result&&returnValues.push(result)});return returnValues};global.prototype.send=function(payload,callback){var id=payload.id;callback={payload,callback};Array.isArray(payload)&&(id=payload[0].id);if(this.connection.readyState===this.connection.CONNECTING||this.reconnecting)this.requestQueue.set(id,callback);else if(this.connection.readyState!==\nthis.connection.OPEN)this.requestQueue.delete(id),this.emit(this.ERROR,errors.ConnectionNotOpenError()),callback.callback(errors.ConnectionNotOpenError());else{this.responseQueue.set(id,callback);this.requestQueue.delete(id);try{this.connection.send(JSON.stringify(callback.payload))}catch(error){callback.callback(error),this.responseQueue.delete(id)}}};global.prototype.reset=function(){this.responseQueue.clear();this.requestQueue.clear();this.removeAllListeners();this._removeSocketListeners();this._addSocketListeners()};\nglobal.prototype.disconnect=function(code,reason){this._removeSocketListeners();this.connection.close(code||1E3,reason)};global.prototype.supportsSubscriptions=function(){return!0};global.prototype.reconnect=function(){var _this=this;this.reconnecting=!0;0<this.responseQueue.size&&this.responseQueue.forEach(function(request,key){request.callback(errors.PendingRequestsOnReconnectingError());_this.responseQueue.delete(key)});!this.reconnectOptions.maxAttempts||this.reconnectAttempts<this.reconnectOptions.maxAttempts?\nsetTimeout(function(){_this.reconnectAttempts++;_this._removeSocketListeners();_this.emit(_this.RECONNECT,_this.reconnectAttempts);_this.connect()},this.reconnectOptions.delay):(this.emit(this.ERROR,errors.MaxAttemptsReachedOnReconnectingError()),this.reconnecting=!1,0<this.requestQueue.size&&this.requestQueue.forEach(function(request,key){request.callback(errors.MaxAttemptsReachedOnReconnectingError());_this.requestQueue.delete(key)}))};module.exports=global}","~:source","shadow$provide[\"module$node_modules$web3_providers_ws$lib$index\"] = function(global,require,module,exports) {\n/*\n This file is part of web3.js.\n\n web3.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n web3.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with web3.js.  If not, see <http://www.gnu.org/licenses/>.\n */\n/**\n * @file WebsocketProvider.js\n * @authors: Samuel Furter <samuel@ethereum.org>, Fabian Vogelsteller <fabian@ethereum.org>\n * @date 2019\n */\n'use strict';\nvar EventEmitter = require('eventemitter3');\nvar helpers = require('./helpers.js');\nvar errors = require('web3-core-helpers').errors;\nvar Ws = require('websocket').w3cwebsocket;\n/**\n * @param {string} url\n * @param {Object} options\n *\n * @constructor\n */\nvar WebsocketProvider = function WebsocketProvider(url, options) {\n    EventEmitter.call(this);\n    options = options || {};\n    this.url = url;\n    this._customTimeout = options.timeout || 1000 * 15;\n    this.headers = options.headers || {};\n    this.protocol = options.protocol || undefined;\n    this.reconnectOptions = Object.assign({\n        auto: false,\n        delay: 5000,\n        maxAttempts: false,\n        onTimeout: false\n    }, options.reconnect);\n    this.clientConfig = options.clientConfig || undefined; // Allow a custom client configuration\n    this.requestOptions = options.requestOptions || undefined; // Allow a custom request options (https://github.com/theturtle32/WebSocket-Node/blob/master/docs/WebSocketClient.md#connectrequesturl-requestedprotocols-origin-headers-requestoptions)\n    this.DATA = 'data';\n    this.CLOSE = 'close';\n    this.ERROR = 'error';\n    this.CONNECT = 'connect';\n    this.RECONNECT = 'reconnect';\n    this.connection = null;\n    this.requestQueue = new Map();\n    this.responseQueue = new Map();\n    this.reconnectAttempts = 0;\n    this.reconnecting = false;\n    // The w3cwebsocket implementation does not support Basic Auth\n    // username/password in the URL. So generate the basic auth header, and\n    // pass through with any additional headers supplied in constructor\n    var parsedURL = helpers.parseURL(url);\n    if (parsedURL.username && parsedURL.password) {\n        this.headers.authorization = 'Basic ' + helpers.btoa(parsedURL.username + ':' + parsedURL.password);\n    }\n    // When all node core implementations that do not have the\n    // WHATWG compatible URL parser go out of service this line can be removed.\n    if (parsedURL.auth) {\n        this.headers.authorization = 'Basic ' + helpers.btoa(parsedURL.auth);\n    }\n    // make property `connected` which will return the current connection status\n    Object.defineProperty(this, 'connected', {\n        get: function () {\n            return this.connection && this.connection.readyState === this.connection.OPEN;\n        },\n        enumerable: true\n    });\n    this.connect();\n};\n// Inherit from EventEmitter\nWebsocketProvider.prototype = Object.create(EventEmitter.prototype);\nWebsocketProvider.prototype.constructor = WebsocketProvider;\n/**\n * Connects to the configured node\n *\n * @method connect\n *\n * @returns {void}\n */\nWebsocketProvider.prototype.connect = function () {\n    this.connection = new Ws(this.url, this.protocol, undefined, this.headers, this.requestOptions, this.clientConfig);\n    this._addSocketListeners();\n};\n/**\n * Listener for the `data` event of the underlying WebSocket object\n *\n * @method _onMessage\n *\n * @returns {void}\n */\nWebsocketProvider.prototype._onMessage = function (e) {\n    var _this = this;\n    this._parseResponse((typeof e.data === 'string') ? e.data : '').forEach(function (result) {\n        if (result.method && result.method.indexOf('_subscription') !== -1) {\n            _this.emit(_this.DATA, result);\n            return;\n        }\n        var id = result.id;\n        // get the id which matches the returned id\n        if (Array.isArray(result)) {\n            id = result[0].id;\n        }\n        if (_this.responseQueue.has(id)) {\n            if (_this.responseQueue.get(id).callback !== undefined) {\n                _this.responseQueue.get(id).callback(false, result);\n            }\n            _this.responseQueue.delete(id);\n        }\n    });\n};\n/**\n * Listener for the `open` event of the underlying WebSocket object\n *\n * @method _onConnect\n *\n * @returns {void}\n */\nWebsocketProvider.prototype._onConnect = function () {\n    this.emit(this.CONNECT);\n    this.reconnectAttempts = 0;\n    this.reconnecting = false;\n    if (this.requestQueue.size > 0) {\n        var _this = this;\n        this.requestQueue.forEach(function (request, key) {\n            _this.send(request.payload, request.callback);\n            _this.requestQueue.delete(key);\n        });\n    }\n};\n/**\n * Listener for the `close` event of the underlying WebSocket object\n *\n * @method _onClose\n *\n * @returns {void}\n */\nWebsocketProvider.prototype._onClose = function (event) {\n    var _this = this;\n    if (this.reconnectOptions.auto && (![1000, 1001].includes(event.code) || event.wasClean === false)) {\n        this.reconnect();\n        return;\n    }\n    this.emit(this.CLOSE, event);\n    if (this.requestQueue.size > 0) {\n        this.requestQueue.forEach(function (request, key) {\n            request.callback(errors.ConnectionNotOpenError(event));\n            _this.requestQueue.delete(key);\n        });\n    }\n    if (this.responseQueue.size > 0) {\n        this.responseQueue.forEach(function (request, key) {\n            request.callback(errors.InvalidConnection('on WS', event));\n            _this.responseQueue.delete(key);\n        });\n    }\n    this._removeSocketListeners();\n    this.removeAllListeners();\n};\n/**\n * Will add the required socket listeners\n *\n * @method _addSocketListeners\n *\n * @returns {void}\n */\nWebsocketProvider.prototype._addSocketListeners = function () {\n    this.connection.addEventListener('message', this._onMessage.bind(this));\n    this.connection.addEventListener('open', this._onConnect.bind(this));\n    this.connection.addEventListener('close', this._onClose.bind(this));\n};\n/**\n * Will remove all socket listeners\n *\n * @method _removeSocketListeners\n *\n * @returns {void}\n */\nWebsocketProvider.prototype._removeSocketListeners = function () {\n    this.connection.removeEventListener('message', this._onMessage);\n    this.connection.removeEventListener('open', this._onConnect);\n    this.connection.removeEventListener('close', this._onClose);\n};\n/**\n * Will parse the response and make an array out of it.\n *\n * @method _parseResponse\n *\n * @param {String} data\n *\n * @returns {Array}\n */\nWebsocketProvider.prototype._parseResponse = function (data) {\n    var _this = this, returnValues = [];\n    // DE-CHUNKER\n    var dechunkedData = data\n        .replace(/\\}[\\n\\r]?\\{/g, '}|--|{') // }{\n        .replace(/\\}\\][\\n\\r]?\\[\\{/g, '}]|--|[{') // }][{\n        .replace(/\\}[\\n\\r]?\\[\\{/g, '}|--|[{') // }[{\n        .replace(/\\}\\][\\n\\r]?\\{/g, '}]|--|{') // }]{\n        .split('|--|');\n    dechunkedData.forEach(function (data) {\n        // prepend the last chunk\n        if (_this.lastChunk)\n            data = _this.lastChunk + data;\n        var result = null;\n        try {\n            result = JSON.parse(data);\n        }\n        catch (e) {\n            _this.lastChunk = data;\n            // start timeout to cancel all requests\n            clearTimeout(_this.lastChunkTimeout);\n            _this.lastChunkTimeout = setTimeout(function () {\n                if (_this.reconnectOptions.auto && _this.reconnectOptions.onTimeout) {\n                    _this.reconnect();\n                    return;\n                }\n                _this.emit(_this.ERROR, errors.ConnectionTimeout(_this._customTimeout));\n                if (_this.requestQueue.size > 0) {\n                    _this.requestQueue.forEach(function (request, key) {\n                        request.callback(errors.ConnectionTimeout(_this._customTimeout));\n                        _this.requestQueue.delete(key);\n                    });\n                }\n            }, _this._customTimeout);\n            return;\n        }\n        // cancel timeout and set chunk to null\n        clearTimeout(_this.lastChunkTimeout);\n        _this.lastChunk = null;\n        if (result)\n            returnValues.push(result);\n    });\n    return returnValues;\n};\n/**\n * Does check if the provider is connecting and will add it to the queue or will send it directly\n *\n * @method send\n *\n * @param {Object} payload\n * @param {Function} callback\n *\n * @returns {void}\n */\nWebsocketProvider.prototype.send = function (payload, callback) {\n    var _this = this;\n    var id = payload.id;\n    var request = { payload: payload, callback: callback };\n    if (Array.isArray(payload)) {\n        id = payload[0].id;\n    }\n    if (this.connection.readyState === this.connection.CONNECTING || this.reconnecting) {\n        this.requestQueue.set(id, request);\n        return;\n    }\n    if (this.connection.readyState !== this.connection.OPEN) {\n        this.requestQueue.delete(id);\n        this.emit(this.ERROR, errors.ConnectionNotOpenError());\n        request.callback(errors.ConnectionNotOpenError());\n        return;\n    }\n    this.responseQueue.set(id, request);\n    this.requestQueue.delete(id);\n    try {\n        this.connection.send(JSON.stringify(request.payload));\n    }\n    catch (error) {\n        request.callback(error);\n        _this.responseQueue.delete(id);\n    }\n};\n/**\n * Resets the providers, clears all callbacks\n *\n * @method reset\n *\n * @returns {void}\n */\nWebsocketProvider.prototype.reset = function () {\n    this.responseQueue.clear();\n    this.requestQueue.clear();\n    this.removeAllListeners();\n    this._removeSocketListeners();\n    this._addSocketListeners();\n};\n/**\n * Closes the current connection with the given code and reason arguments\n *\n * @method disconnect\n *\n * @param {number} code\n * @param {string} reason\n *\n * @returns {void}\n */\nWebsocketProvider.prototype.disconnect = function (code, reason) {\n    this._removeSocketListeners();\n    this.connection.close(code || 1000, reason);\n};\n/**\n * Returns the desired boolean.\n *\n * @method supportsSubscriptions\n *\n * @returns {boolean}\n */\nWebsocketProvider.prototype.supportsSubscriptions = function () {\n    return true;\n};\n/**\n * Removes the listeners and reconnects to the socket.\n *\n * @method reconnect\n *\n * @returns {void}\n */\nWebsocketProvider.prototype.reconnect = function () {\n    var _this = this;\n    this.reconnecting = true;\n    if (this.responseQueue.size > 0) {\n        this.responseQueue.forEach(function (request, key) {\n            request.callback(errors.PendingRequestsOnReconnectingError());\n            _this.responseQueue.delete(key);\n        });\n    }\n    if (!this.reconnectOptions.maxAttempts ||\n        this.reconnectAttempts < this.reconnectOptions.maxAttempts) {\n        setTimeout(function () {\n            _this.reconnectAttempts++;\n            _this._removeSocketListeners();\n            _this.emit(_this.RECONNECT, _this.reconnectAttempts);\n            _this.connect();\n        }, this.reconnectOptions.delay);\n        return;\n    }\n    this.emit(this.ERROR, errors.MaxAttemptsReachedOnReconnectingError());\n    this.reconnecting = false;\n    if (this.requestQueue.size > 0) {\n        this.requestQueue.forEach(function (request, key) {\n            request.callback(errors.MaxAttemptsReachedOnReconnectingError());\n            _this.requestQueue.delete(key);\n        });\n    }\n};\nmodule.exports = WebsocketProvider;\n\n};","~:removed-requires",["~#set",[]],"~:actual-requires",["^5",["~$module$node_modules$web3_core_helpers$lib$index","~$module$node_modules$eventemitter3$index","~$shadow.js","~$module$node_modules$websocket$lib$browser","~$module$node_modules$web3_providers_ws$lib$helpers"]],"~:properties",["^5",["callback","clientConfig","requestQueue","reconnect","protocol","url","_parseResponse","prototype","supportsSubscriptions","disconnect","lastChunk","CLOSE","send","reconnectOptions","_onMessage","requestOptions","_onClose","lastChunkTimeout","reset","maxAttempts","reconnecting","_addSocketListeners","ERROR","connection","auto","connect","enumerable","_removeSocketListeners","reconnectAttempts","connected","authorization","RECONNECT","delay","_customTimeout","onTimeout","_onConnect","CONNECT","responseQueue","payload","get","DATA","constructor","headers"]],"~:compiled-at",1644840880142,"~:source-map-json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lE,MAAOsH,CAAAA,kCAAP,EAAjB,CACAhE,MAAMxB,CAAAA,aAAcqC,CAAAA,MAApB,CAA2BK,GAA3B,CAF+C,CAAnD,CAKA,EAAC,IAAK5D,CAAAA,gBAAiBK,CAAAA,WAA3B,EACI,IAAKc,CAAAA,iBADT,CAC6B,IAAKnB,CAAAA,gBAAiBK,CAAAA,WADnD;AAEImF,UAAA,CAAW,QAAS,EAAG,CACnB9C,KAAMvB,CAAAA,iBAAN,EACAuB,MAAM6B,CAAAA,sBAAN,EACA7B,MAAMO,CAAAA,IAAN,CAAWP,KAAM5B,CAAAA,SAAjB,CAA4B4B,KAAMvB,CAAAA,iBAAlC,CACAuB,MAAMT,CAAAA,OAAN,EAJmB,CAAvB,CAKG,IAAKjC,CAAAA,gBAAiBI,CAAAA,KALzB,CAFJ,EAUA,IAAK6C,CAAAA,IAAL,CAAU,IAAKrC,CAAAA,KAAf,CAAsBxB,MAAOuH,CAAAA,qCAAP,EAAtB,CAEA,CADA,IAAKvF,CAAAA,YACL,CADoB,CAAA,CACpB,CAA6B,CAA7B,CAAI,IAAKJ,CAAAA,YAAa0C,CAAAA,IAAtB,EACI,IAAK1C,CAAAA,YAAa6B,CAAAA,OAAlB,CAA0B,QAAS,CAACc,OAAD,CAAUC,GAAV,CAAe,CAC9CD,OAAQL,CAAAA,QAAR,CAAiBlE,MAAOuH,CAAAA,qCAAP,EAAjB,CACAjE,MAAM1B,CAAAA,YAAauC,CAAAA,MAAnB,CAA0BK,GAA1B,CAF8C,CAAlD,CAbJ,CATgD,CA4BpD5E,OAAOC,CAAAA,OAAP,CAAiBM,MAnW2F;\",\n\"sources\":[\"node_modules/web3-providers-ws/lib/index.js\"],\n\"sourcesContent\":[\"shadow$provide[\\\"module$node_modules$web3_providers_ws$lib$index\\\"] = function(global,require,module,exports) {\\n/*\\n This file is part of web3.js.\\n\\n web3.js is free software: you can redistribute it and/or modify\\n it under the terms of the GNU Lesser General Public License as published by\\n the Free Software Foundation, either version 3 of the License, or\\n (at your option) any later version.\\n\\n web3.js is distributed in the hope that it will be useful,\\n but WITHOUT ANY WARRANTY; without even the implied warranty of\\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n GNU Lesser General Public License for more details.\\n\\n You should have received a copy of the GNU Lesser General Public License\\n along with web3.js.  If not, see <http://www.gnu.org/licenses/>.\\n */\\n/**\\n * @file WebsocketProvider.js\\n * @authors: Samuel Furter <samuel@ethereum.org>, Fabian Vogelsteller <fabian@ethereum.org>\\n * @date 2019\\n */\\n'use strict';\\nvar EventEmitter = require('eventemitter3');\\nvar helpers = require('./helpers.js');\\nvar errors = require('web3-core-helpers').errors;\\nvar Ws = require('websocket').w3cwebsocket;\\n/**\\n * @param {string} url\\n * @param {Object} options\\n *\\n * @constructor\\n */\\nvar WebsocketProvider = function WebsocketProvider(url, options) {\\n    EventEmitter.call(this);\\n    options = options || {};\\n    this.url = url;\\n    this._customTimeout = options.timeout || 1000 * 15;\\n    this.headers = options.headers || {};\\n    this.protocol = options.protocol || undefined;\\n    this.reconnectOptions = Object.assign({\\n        auto: false,\\n        delay: 5000,\\n        maxAttempts: false,\\n        onTimeout: false\\n    }, options.reconnect);\\n    this.clientConfig = options.clientConfig || undefined; // Allow a custom client configuration\\n    this.requestOptions = options.requestOptions || undefined; // Allow a custom request options (https://github.com/theturtle32/WebSocket-Node/blob/master/docs/WebSocketClient.md#connectrequesturl-requestedprotocols-origin-headers-requestoptions)\\n    this.DATA = 'data';\\n    this.CLOSE = 'close';\\n    this.ERROR = 'error';\\n    this.CONNECT = 'connect';\\n    this.RECONNECT = 'reconnect';\\n    this.connection = null;\\n    this.requestQueue = new Map();\\n    this.responseQueue = new Map();\\n    this.reconnectAttempts = 0;\\n    this.reconnecting = false;\\n    // The w3cwebsocket implementation does not support Basic Auth\\n    // username/password in the URL. So generate the basic auth header, and\\n    // pass through with any additional headers supplied in constructor\\n    var parsedURL = helpers.parseURL(url);\\n    if (parsedURL.username && parsedURL.password) {\\n        this.headers.authorization = 'Basic ' + helpers.btoa(parsedURL.username + ':' + parsedURL.password);\\n    }\\n    // When all node core implementations that do not have the\\n    // WHATWG compatible URL parser go out of service this line can be removed.\\n    if (parsedURL.auth) {\\n        this.headers.authorization = 'Basic ' + helpers.btoa(parsedURL.auth);\\n    }\\n    // make property `connected` which will return the current connection status\\n    Object.defineProperty(this, 'connected', {\\n        get: function () {\\n            return this.connection && this.connection.readyState === this.connection.OPEN;\\n        },\\n        enumerable: true\\n    });\\n    this.connect();\\n};\\n// Inherit from EventEmitter\\nWebsocketProvider.prototype = Object.create(EventEmitter.prototype);\\nWebsocketProvider.prototype.constructor = WebsocketProvider;\\n/**\\n * Connects to the configured node\\n *\\n * @method connect\\n *\\n * @returns {void}\\n */\\nWebsocketProvider.prototype.connect = function () {\\n    this.connection = new Ws(this.url, this.protocol, undefined, this.headers, this.requestOptions, this.clientConfig);\\n    this._addSocketListeners();\\n};\\n/**\\n * Listener for the `data` event of the underlying WebSocket object\\n *\\n * @method _onMessage\\n *\\n * @returns {void}\\n */\\nWebsocketProvider.prototype._onMessage = function (e) {\\n    var _this = this;\\n    this._parseResponse((typeof e.data === 'string') ? e.data : '').forEach(function (result) {\\n        if (result.method && result.method.indexOf('_subscription') !== -1) {\\n            _this.emit(_this.DATA, result);\\n            return;\\n        }\\n        var id = result.id;\\n        // get the id which matches the returned id\\n        if (Array.isArray(result)) {\\n            id = result[0].id;\\n        }\\n        if (_this.responseQueue.has(id)) {\\n            if (_this.responseQueue.get(id).callback !== undefined) {\\n                _this.responseQueue.get(id).callback(false, result);\\n            }\\n            _this.responseQueue.delete(id);\\n        }\\n    });\\n};\\n/**\\n * Listener for the `open` event of the underlying WebSocket object\\n *\\n * @method _onConnect\\n *\\n * @returns {void}\\n */\\nWebsocketProvider.prototype._onConnect = function () {\\n    this.emit(this.CONNECT);\\n    this.reconnectAttempts = 0;\\n    this.reconnecting = false;\\n    if (this.requestQueue.size > 0) {\\n        var _this = this;\\n        this.requestQueue.forEach(function (request, key) {\\n            _this.send(request.payload, request.callback);\\n            _this.requestQueue.delete(key);\\n        });\\n    }\\n};\\n/**\\n * Listener for the `close` event of the underlying WebSocket object\\n *\\n * @method _onClose\\n *\\n * @returns {void}\\n */\\nWebsocketProvider.prototype._onClose = function (event) {\\n    var _this = this;\\n    if (this.reconnectOptions.auto && (![1000, 1001].includes(event.code) || event.wasClean === false)) {\\n        this.reconnect();\\n        return;\\n    }\\n    this.emit(this.CLOSE, event);\\n    if (this.requestQueue.size > 0) {\\n        this.requestQueue.forEach(function (request, key) {\\n            request.callback(errors.ConnectionNotOpenError(event));\\n            _this.requestQueue.delete(key);\\n        });\\n    }\\n    if (this.responseQueue.size > 0) {\\n        this.responseQueue.forEach(function (request, key) {\\n            request.callback(errors.InvalidConnection('on WS', event));\\n            _this.responseQueue.delete(key);\\n        });\\n    }\\n    this._removeSocketListeners();\\n    this.removeAllListeners();\\n};\\n/**\\n * Will add the required socket listeners\\n *\\n * @method _addSocketListeners\\n *\\n * @returns {void}\\n */\\nWebsocketProvider.prototype._addSocketListeners = function () {\\n    this.connection.addEventListener('message', this._onMessage.bind(this));\\n    this.connection.addEventListener('open', this._onConnect.bind(this));\\n    this.connection.addEventListener('close', this._onClose.bind(this));\\n};\\n/**\\n * Will remove all socket listeners\\n *\\n * @method _removeSocketListeners\\n *\\n * @returns {void}\\n */\\nWebsocketProvider.prototype._removeSocketListeners = function () {\\n    this.connection.removeEventListener('message', this._onMessage);\\n    this.connection.removeEventListener('open', this._onConnect);\\n    this.connection.removeEventListener('close', this._onClose);\\n};\\n/**\\n * Will parse the response and make an array out of it.\\n *\\n * @method _parseResponse\\n *\\n * @param {String} data\\n *\\n * @returns {Array}\\n */\\nWebsocketProvider.prototype._parseResponse = function (data) {\\n    var _this = this, returnValues = [];\\n    // DE-CHUNKER\\n    var dechunkedData = data\\n        .replace(/\\\\}[\\\\n\\\\r]?\\\\{/g, '}|--|{') // }{\\n        .replace(/\\\\}\\\\][\\\\n\\\\r]?\\\\[\\\\{/g, '}]|--|[{') // }][{\\n        .replace(/\\\\}[\\\\n\\\\r]?\\\\[\\\\{/g, '}|--|[{') // }[{\\n        .replace(/\\\\}\\\\][\\\\n\\\\r]?\\\\{/g, '}]|--|{') // }]{\\n        .split('|--|');\\n    dechunkedData.forEach(function (data) {\\n        // prepend the last chunk\\n        if (_this.lastChunk)\\n            data = _this.lastChunk + data;\\n        var result = null;\\n        try {\\n            result = JSON.parse(data);\\n        }\\n        catch (e) {\\n            _this.lastChunk = data;\\n            // start timeout to cancel all requests\\n            clearTimeout(_this.lastChunkTimeout);\\n            _this.lastChunkTimeout = setTimeout(function () {\\n                if (_this.reconnectOptions.auto && _this.reconnectOptions.onTimeout) {\\n                    _this.reconnect();\\n                    return;\\n                }\\n                _this.emit(_this.ERROR, errors.ConnectionTimeout(_this._customTimeout));\\n                if (_this.requestQueue.size > 0) {\\n                    _this.requestQueue.forEach(function (request, key) {\\n                        request.callback(errors.ConnectionTimeout(_this._customTimeout));\\n                        _this.requestQueue.delete(key);\\n                    });\\n                }\\n            }, _this._customTimeout);\\n            return;\\n        }\\n        // cancel timeout and set chunk to null\\n        clearTimeout(_this.lastChunkTimeout);\\n        _this.lastChunk = null;\\n        if (result)\\n            returnValues.push(result);\\n    });\\n    return returnValues;\\n};\\n/**\\n * Does check if the provider is connecting and will add it to the queue or will send it directly\\n *\\n * @method send\\n *\\n * @param {Object} payload\\n * @param {Function} callback\\n *\\n * @returns {void}\\n */\\nWebsocketProvider.prototype.send = function (payload, callback) {\\n    var _this = this;\\n    var id = payload.id;\\n    var request = { payload: payload, callback: callback };\\n    if (Array.isArray(payload)) {\\n        id = payload[0].id;\\n    }\\n    if (this.connection.readyState === this.connection.CONNECTING || this.reconnecting) {\\n        this.requestQueue.set(id, request);\\n        return;\\n    }\\n    if (this.connection.readyState !== this.connection.OPEN) {\\n        this.requestQueue.delete(id);\\n        this.emit(this.ERROR, errors.ConnectionNotOpenError());\\n        request.callback(errors.ConnectionNotOpenError());\\n        return;\\n    }\\n    this.responseQueue.set(id, request);\\n    this.requestQueue.delete(id);\\n    try {\\n        this.connection.send(JSON.stringify(request.payload));\\n    }\\n    catch (error) {\\n        request.callback(error);\\n        _this.responseQueue.delete(id);\\n    }\\n};\\n/**\\n * Resets the providers, clears all callbacks\\n *\\n * @method reset\\n *\\n * @returns {void}\\n */\\nWebsocketProvider.prototype.reset = function () {\\n    this.responseQueue.clear();\\n    this.requestQueue.clear();\\n    this.removeAllListeners();\\n    this._removeSocketListeners();\\n    this._addSocketListeners();\\n};\\n/**\\n * Closes the current connection with the given code and reason arguments\\n *\\n * @method disconnect\\n *\\n * @param {number} code\\n * @param {string} reason\\n *\\n * @returns {void}\\n */\\nWebsocketProvider.prototype.disconnect = function (code, reason) {\\n    this._removeSocketListeners();\\n    this.connection.close(code || 1000, reason);\\n};\\n/**\\n * Returns the desired boolean.\\n *\\n * @method supportsSubscriptions\\n *\\n * @returns {boolean}\\n */\\nWebsocketProvider.prototype.supportsSubscriptions = function () {\\n    return true;\\n};\\n/**\\n * Removes the listeners and reconnects to the socket.\\n *\\n * @method reconnect\\n *\\n * @returns {void}\\n */\\nWebsocketProvider.prototype.reconnect = function () {\\n    var _this = this;\\n    this.reconnecting = true;\\n    if (this.responseQueue.size > 0) {\\n        this.responseQueue.forEach(function (request, key) {\\n            request.callback(errors.PendingRequestsOnReconnectingError());\\n            _this.responseQueue.delete(key);\\n        });\\n    }\\n    if (!this.reconnectOptions.maxAttempts ||\\n        this.reconnectAttempts < this.reconnectOptions.maxAttempts) {\\n        setTimeout(function () {\\n            _this.reconnectAttempts++;\\n            _this._removeSocketListeners();\\n            _this.emit(_this.RECONNECT, _this.reconnectAttempts);\\n            _this.connect();\\n        }, this.reconnectOptions.delay);\\n        return;\\n    }\\n    this.emit(this.ERROR, errors.MaxAttemptsReachedOnReconnectingError());\\n    this.reconnecting = false;\\n    if (this.requestQueue.size > 0) {\\n        this.requestQueue.forEach(function (request, key) {\\n            request.callback(errors.MaxAttemptsReachedOnReconnectingError());\\n            _this.requestQueue.delete(key);\\n        });\\n    }\\n};\\nmodule.exports = WebsocketProvider;\\n\\n};\"],\n\"names\":[\"shadow$provide\",\"global\",\"require\",\"module\",\"exports\",\"EventEmitter\",\"helpers\",\"errors\",\"Ws\",\"w3cwebsocket\",\"WebsocketProvider\",\"url\",\"options\",\"call\",\"_customTimeout\",\"timeout\",\"headers\",\"protocol\",\"undefined\",\"reconnectOptions\",\"Object\",\"assign\",\"auto\",\"delay\",\"maxAttempts\",\"onTimeout\",\"reconnect\",\"clientConfig\",\"requestOptions\",\"DATA\",\"CLOSE\",\"ERROR\",\"CONNECT\",\"RECONNECT\",\"connection\",\"requestQueue\",\"Map\",\"responseQueue\",\"reconnectAttempts\",\"reconnecting\",\"parsedURL\",\"parseURL\",\"username\",\"password\",\"authorization\",\"btoa\",\"auth\",\"defineProperty\",\"get\",\"readyState\",\"OPEN\",\"enumerable\",\"connect\",\"prototype\",\"create\",\"constructor\",\"WebsocketProvider.prototype.connect\",\"_addSocketListeners\",\"_onMessage\",\"WebsocketProvider.prototype._onMessage\",\"e\",\"_this\",\"_parseResponse\",\"data\",\"forEach\",\"result\",\"method\",\"indexOf\",\"emit\",\"id\",\"Array\",\"isArray\",\"has\",\"callback\",\"delete\",\"_onConnect\",\"WebsocketProvider.prototype._onConnect\",\"size\",\"request\",\"key\",\"send\",\"payload\",\"_onClose\",\"WebsocketProvider.prototype._onClose\",\"event\",\"includes\",\"code\",\"wasClean\",\"ConnectionNotOpenError\",\"InvalidConnection\",\"_removeSocketListeners\",\"removeAllListeners\",\"WebsocketProvider.prototype._addSocketListeners\",\"addEventListener\",\"bind\",\"WebsocketProvider.prototype._removeSocketListeners\",\"removeEventListener\",\"WebsocketProvider.prototype._parseResponse\",\"returnValues\",\"replace\",\"split\",\"dechunkedData\",\"lastChunk\",\"JSON\",\"parse\",\"clearTimeout\",\"lastChunkTimeout\",\"setTimeout\",\"ConnectionTimeout\",\"push\",\"WebsocketProvider.prototype.send\",\"CONNECTING\",\"set\",\"stringify\",\"error\",\"reset\",\"WebsocketProvider.prototype.reset\",\"clear\",\"disconnect\",\"WebsocketProvider.prototype.disconnect\",\"reason\",\"close\",\"supportsSubscriptions\",\"WebsocketProvider.prototype.supportsSubscriptions\",\"WebsocketProvider.prototype.reconnect\",\"PendingRequestsOnReconnectingError\",\"MaxAttemptsReachedOnReconnectingError\"]\n}\n"]