@telegenta/webclient 2.0.11 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +102 -81
- package/demos/add_phone_number.html +8 -7
- package/demos/calldata_available.html +5 -5
- package/demos/embedded_config.html +95 -95
- package/demos/event_client.html +226 -226
- package/demos/phone_client.html +564 -558
- package/dist/telegenta.js +3627 -0
- package/dist/telegenta.min.js +1 -0
- package/docs/EventClient.html +3 -1093
- package/docs/InvalidMediaDevice.html +3 -0
- package/docs/InvalidOptions.html +3 -0
- package/docs/InvalidParameter.html +3 -0
- package/docs/LogHandler.html +7 -0
- package/docs/MediaNotPrepared.html +3 -0
- package/docs/NoActiveSession.html +3 -0
- package/docs/NotAllowed.html +3 -0
- package/docs/NotReady.html +3 -0
- package/docs/Phone.html +4 -2837
- package/docs/Request.html +3 -0
- package/docs/Requestor.html +3 -0
- package/docs/Session.html +3 -2599
- package/docs/UnableToConnect.html +3 -0
- package/docs/data/search.json +1 -0
- package/docs/event-client.js.html +346 -0
- package/docs/exceptions.js.html +94 -0
- package/docs/fonts/Inconsolata-Regular.ttf +0 -0
- package/docs/fonts/OpenSans-Regular.ttf +0 -0
- package/docs/fonts/WorkSans-Bold.ttf +0 -0
- package/docs/global.html +5 -4950
- package/docs/index.html +3 -66
- package/docs/logger.js.html +106 -0
- package/docs/phone-client.js.html +2155 -0
- package/docs/requestor.js.html +223 -0
- package/docs/scripts/core.js +726 -0
- package/docs/scripts/core.min.js +23 -0
- package/docs/scripts/resize.js +90 -0
- package/docs/scripts/search.js +265 -0
- package/docs/scripts/search.min.js +6 -0
- package/docs/scripts/{prettify → third-party}/Apache-License-2.0.txt +202 -202
- package/docs/scripts/third-party/fuse.js +9 -0
- package/docs/scripts/third-party/hljs-line-num-original.js +369 -0
- package/docs/scripts/third-party/hljs-line-num.js +1 -0
- package/docs/scripts/third-party/hljs-original.js +5171 -0
- package/docs/scripts/third-party/hljs.js +1 -0
- package/docs/scripts/third-party/popper.js +5 -0
- package/docs/scripts/third-party/tippy.js +1 -0
- package/docs/scripts/third-party/tocbot.js +672 -0
- package/docs/scripts/third-party/tocbot.min.js +1 -0
- package/docs/styles/clean-jsdoc-theme-base.css +1159 -0
- package/docs/styles/clean-jsdoc-theme-dark.css +412 -0
- package/docs/styles/clean-jsdoc-theme-light.css +482 -0
- package/docs/styles/clean-jsdoc-theme-scrollbar.css +30 -0
- package/docs/styles/clean-jsdoc-theme-without-scrollbar.min.css +1 -0
- package/docs/styles/clean-jsdoc-theme.min.css +1 -0
- package/package.json +46 -34
- package/babel.config.js +0 -16
- package/browser/telegenta.min.js +0 -1
- package/docs/fonts/OpenSans-Bold-webfont.eot +0 -0
- package/docs/fonts/OpenSans-Bold-webfont.svg +0 -1830
- package/docs/fonts/OpenSans-Bold-webfont.woff +0 -0
- package/docs/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
- package/docs/fonts/OpenSans-BoldItalic-webfont.svg +0 -1830
- package/docs/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
- package/docs/fonts/OpenSans-Italic-webfont.eot +0 -0
- package/docs/fonts/OpenSans-Italic-webfont.svg +0 -1830
- package/docs/fonts/OpenSans-Italic-webfont.woff +0 -0
- package/docs/fonts/OpenSans-Light-webfont.eot +0 -0
- package/docs/fonts/OpenSans-Light-webfont.svg +0 -1831
- package/docs/fonts/OpenSans-Light-webfont.woff +0 -0
- package/docs/fonts/OpenSans-LightItalic-webfont.eot +0 -0
- package/docs/fonts/OpenSans-LightItalic-webfont.svg +0 -1835
- package/docs/fonts/OpenSans-LightItalic-webfont.woff +0 -0
- package/docs/fonts/OpenSans-Regular-webfont.eot +0 -0
- package/docs/fonts/OpenSans-Regular-webfont.svg +0 -1831
- package/docs/fonts/OpenSans-Regular-webfont.woff +0 -0
- package/docs/fonts/OpenSans-Semibold-webfont.eot +0 -0
- package/docs/fonts/OpenSans-Semibold-webfont.svg +0 -1830
- package/docs/fonts/OpenSans-Semibold-webfont.ttf +0 -0
- package/docs/fonts/OpenSans-Semibold-webfont.woff +0 -0
- package/docs/fonts/OpenSans-SemiboldItalic-webfont.eot +0 -0
- package/docs/fonts/OpenSans-SemiboldItalic-webfont.svg +0 -1830
- package/docs/fonts/OpenSans-SemiboldItalic-webfont.ttf +0 -0
- package/docs/fonts/OpenSans-SemiboldItalic-webfont.woff +0 -0
- package/docs/scripts/linenumber.js +0 -25
- package/docs/scripts/prettify/lang-css.js +0 -2
- package/docs/scripts/prettify/prettify.js +0 -28
- package/docs/styles/jsdoc-default.css +0 -692
- package/docs/styles/prettify-jsdoc.css +0 -111
- package/docs/styles/prettify-tomorrow.css +0 -132
- package/embedded_client/embedded_phone.js +0 -325
- package/embedded_client/index.html +0 -201
- package/embedded_client/server.php +0 -28
- package/embedded_client/styles.css +0 -310
- package/embedded_client/tiny_rest_client.php +0 -73
- package/embedded_client/webphone_sprites.png +0 -0
- package/es5/event-client.js +0 -322
- package/es5/index.js +0 -44
- package/es5/phone-client.js +0 -1739
- package/src/event-client.js +0 -1
- package/src/index.js +0 -10
- package/src/phone-client.js +0 -1
- package/webpack.config.js +0 -39
package/es5/event-client.js
DELETED
|
@@ -1,322 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.EventClient = void 0;
|
|
7
|
-
|
|
8
|
-
var _common = require("@telegenta/common");
|
|
9
|
-
|
|
10
|
-
var _0x26cf = ['disconnect', '_socket', 'NoActiveSession', 'close', 'readyState', 'subscribe', 'InvalidParameter', 'You\x20must\x20specify\x20both\x20event\x20spec\x20and\x20callback\x20function', 'event_name', 'sendRequest', 'then', 'Subscription\x20to\x20\x27', '\x27\x20was\x20successful,\x20ID\x20=\x20', 'push', 'log', '\x27\x20failed:\x20', 'You\x20must\x20specify\x20subscription\x20id', 'isConnected', 'info', 'Unsubscribe\x20id:\x20', 'unsubscribe', 'Unsubscribe\x20to\x20\x27', '\x27\x20was\x20successful', 'warning', 'Remote\x20unsubscribe\x20to\x20\x27', 'fireEvent', 'Event\x20', '\x20was\x20successful', '\x20failed:\x20', '_removeSubscription', 'Removed\x20local\x20subscription:\x20', '_connectServer', 'Connecting\x20to\x20event\x20server:\x20', '_serverAddress', 'Unable\x20to\x20connect,\x20already\x20connecting', 'Unable\x20to\x20connect,\x20already\x20connected', 'Unable\x20to\x20connect,\x20socket\x20is\x20still\x20closing', 'open', '_reconnectRetrySeconds', 'addEventListener', 'message', 'receiveMessage', 'data', 'ping', '_reconnectServer', 'catch', 'Disconnected\x20from\x20event\x20service', 'error', 'floor', 'Reconnecting\x20in\x20', '\x20secs', 'Auto\x20reconnect\x20disabled\x20(disconnecting?)', '_handleIncomingEvent', 'Received\x20event\x20for\x20subcription\x20id\x20', '\x20payload:\x20', 'stringify', 'payload', 'Callback\x20had\x20unhandled\x20exception\x20', 'resolve', 'reject', 'Invalid\x20subscription\x20id\x20for\x20event:\x20', 'wss://api.telegenta.com/es/', 'specification', 'callback', 'doCallback', 'apply', '_previousSubscriptions', '_activeSubscriptions', '_pingTimerObj', '_autoReconnect', 'LogHandler', 'LOGLVL', 'ERROR', '_requestor', 'event', 'connect'];
|
|
11
|
-
|
|
12
|
-
(function (_0x58d96e, _0x4efa09) {
|
|
13
|
-
var _0x19dafb = function _0x19dafb(_0x5d72d9) {
|
|
14
|
-
while (--_0x5d72d9) {
|
|
15
|
-
_0x58d96e['push'](_0x58d96e['shift']());
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
_0x19dafb(++_0x4efa09);
|
|
20
|
-
})(_0x26cf, 0x16d);
|
|
21
|
-
|
|
22
|
-
var _0x5f41 = function _0x5f41(_0x4a7d5a, _0x5d39ed) {
|
|
23
|
-
_0x4a7d5a = _0x4a7d5a - 0x0;
|
|
24
|
-
var _0x35c1fd = _0x26cf[_0x4a7d5a];
|
|
25
|
-
return _0x35c1fd;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
'use strict';
|
|
29
|
-
|
|
30
|
-
const PING_INTERVAL = 0x32;
|
|
31
|
-
|
|
32
|
-
const ES_DEFAULT_SERVER_URL = _0x5f41('0x0');
|
|
33
|
-
|
|
34
|
-
const RETRY_INTERVAL_START = 0x1 + Math['random']();
|
|
35
|
-
const RETRY_MAX_BACKOFF = 0x12c;
|
|
36
|
-
|
|
37
|
-
class EventSubscription {
|
|
38
|
-
constructor(_0x39629b, _0x2ba0f1, _0xe05c14) {
|
|
39
|
-
this['id'] = _0x39629b;
|
|
40
|
-
this[_0x5f41('0x1')] = _0x2ba0f1;
|
|
41
|
-
this[_0x5f41('0x2')] = _0xe05c14;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
[_0x5f41('0x3')](_0x414fe3, _0x23f65a) {
|
|
45
|
-
return this[_0x5f41('0x2')][_0x5f41('0x4')](_0x414fe3, [_0x23f65a]);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
class EventClient {
|
|
51
|
-
constructor() {
|
|
52
|
-
let _0x198b97 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
53
|
-
|
|
54
|
-
this['_socket'] = null;
|
|
55
|
-
this[_0x5f41('0x5')] = [];
|
|
56
|
-
this[_0x5f41('0x6')] = [];
|
|
57
|
-
this[_0x5f41('0x7')] = null;
|
|
58
|
-
this[_0x5f41('0x8')] = ![];
|
|
59
|
-
this['_reconnectRetrySeconds'] = RETRY_INTERVAL_START;
|
|
60
|
-
this['log'] = _0x198b97 ? _0x198b97 : new _common.Logger[_0x5f41('0x9')](_common.Logger[_0x5f41('0xa')][_0x5f41('0xb')]);
|
|
61
|
-
this['_requestor'] = new _common.Requestor(this['log']);
|
|
62
|
-
|
|
63
|
-
this[_0x5f41('0xc')]['on'](_0x5f41('0xd'), _0x221354 => {
|
|
64
|
-
this['_handleIncomingEvent'](_0x221354);
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
[_0x5f41('0xe')]() {
|
|
69
|
-
let _0xc1772f = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
70
|
-
|
|
71
|
-
if (!_0xc1772f) {
|
|
72
|
-
_0xc1772f = ES_DEFAULT_SERVER_URL;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
this['_serverAddress'] = _0xc1772f;
|
|
76
|
-
this[_0x5f41('0x5')] = [];
|
|
77
|
-
this[_0x5f41('0x6')] = [];
|
|
78
|
-
return this['_connectServer']();
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
[_0x5f41('0xf')]() {
|
|
82
|
-
if (this[_0x5f41('0x10')]['readyState'] !== 0x1) {
|
|
83
|
-
throw new _common.Exceptions[_0x5f41('0x11')]();
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
this[_0x5f41('0x6')] = [];
|
|
87
|
-
this[_0x5f41('0x8')] = ![];
|
|
88
|
-
|
|
89
|
-
this[_0x5f41('0x10')][_0x5f41('0x12')]();
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
['isConnected']() {
|
|
93
|
-
if (this[_0x5f41('0x10')]) {
|
|
94
|
-
return this[_0x5f41('0x10')][_0x5f41('0x13')] === 0x1;
|
|
95
|
-
} else {
|
|
96
|
-
return ![];
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
[_0x5f41('0x14')](_0x1c9058, _0x2e5135) {
|
|
101
|
-
if (!_0x1c9058 || !_0x2e5135) {
|
|
102
|
-
throw new _common.Exceptions[_0x5f41('0x15')](_0x5f41('0x16'));
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
if (!_0x1c9058['hasOwnProperty'](_0x5f41('0x17'))) {
|
|
106
|
-
throw new _common.Exceptions[_0x5f41('0x15')]('Your\x20event\x20specification\x20must\x20contain\x20event\x20name');
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
if (!this['isConnected']()) {
|
|
110
|
-
throw new _common.Exceptions[_0x5f41('0x11')]();
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
const _0x46915b = this;
|
|
114
|
-
|
|
115
|
-
return new Promise(function (_0x3ac380, _0x4aab71) {
|
|
116
|
-
_0x46915b[_0x5f41('0xc')][_0x5f41('0x18')](_0x46915b[_0x5f41('0x10')], _0x5f41('0x14'), _0x1c9058)[_0x5f41('0x19')](function (_0x168a5c) {
|
|
117
|
-
_0x46915b['log']['debug'](_0x5f41('0x1a') + _0x1c9058['event_name'] + _0x5f41('0x1b') + _0x168a5c);
|
|
118
|
-
|
|
119
|
-
_0x46915b['_activeSubscriptions'][_0x5f41('0x1c')](new EventSubscription(_0x168a5c, _0x1c9058, _0x2e5135));
|
|
120
|
-
|
|
121
|
-
_0x3ac380(_0x168a5c);
|
|
122
|
-
}, function (_0x55cef6) {
|
|
123
|
-
_0x46915b[_0x5f41('0x1d')]['warning'](_0x5f41('0x1a') + _0x1c9058[_0x5f41('0x17')] + _0x5f41('0x1e') + _0x55cef6);
|
|
124
|
-
|
|
125
|
-
_0x4aab71(_0x55cef6);
|
|
126
|
-
});
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
['unsubscribe'](_0x4148dd) {
|
|
131
|
-
if (!_0x4148dd) {
|
|
132
|
-
throw new _common.Exceptions[_0x5f41('0x15')](_0x5f41('0x1f'));
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
if (!this[_0x5f41('0x20')]()) {
|
|
136
|
-
throw new _common.Exceptions[_0x5f41('0x11')]();
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
this[_0x5f41('0x1d')][_0x5f41('0x21')](_0x5f41('0x22') + _0x4148dd);
|
|
140
|
-
|
|
141
|
-
const _0x8135e = this;
|
|
142
|
-
|
|
143
|
-
return new Promise(function (_0x42bdcb, _0x159dbc) {
|
|
144
|
-
_0x8135e[_0x5f41('0xc')][_0x5f41('0x18')](_0x8135e[_0x5f41('0x10')], _0x5f41('0x23'), {
|
|
145
|
-
'id': _0x4148dd
|
|
146
|
-
})['then'](_0x2100fe => {
|
|
147
|
-
_0x8135e[_0x5f41('0x1d')][_0x5f41('0x21')](_0x5f41('0x24') + _0x4148dd + _0x5f41('0x25'));
|
|
148
|
-
|
|
149
|
-
_0x8135e['_removeSubscription'](_0x4148dd);
|
|
150
|
-
|
|
151
|
-
_0x42bdcb(_0x2100fe);
|
|
152
|
-
}, _0x3b5189 => {
|
|
153
|
-
_0x8135e[_0x5f41('0x1d')][_0x5f41('0x26')](_0x5f41('0x27') + _0x4148dd + _0x5f41('0x1e') + _0x3b5189);
|
|
154
|
-
|
|
155
|
-
_0x159dbc(_0x3b5189);
|
|
156
|
-
});
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
[_0x5f41('0x28')](_0x5e87c0, _0x322a2f) {
|
|
161
|
-
if (!this[_0x5f41('0x20')]()) {
|
|
162
|
-
throw new _common.Exceptions['NoActiveSession']();
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
return new Promise((_0x518d32, _0x3f07bb) => {
|
|
166
|
-
this['_requestor'][_0x5f41('0x18')](this[_0x5f41('0x10')], _0x5e87c0, _0x322a2f)[_0x5f41('0x19')](_0x3facb5 => {
|
|
167
|
-
this['log'][_0x5f41('0x21')](_0x5f41('0x29') + _0x5e87c0 + _0x5f41('0x2a'));
|
|
168
|
-
|
|
169
|
-
_0x518d32(_0x3facb5);
|
|
170
|
-
}, _0x5d633f => {
|
|
171
|
-
this[_0x5f41('0x1d')][_0x5f41('0x26')](_0x5f41('0x29') + _0x5e87c0 + _0x5f41('0x2b') + _0x5d633f);
|
|
172
|
-
|
|
173
|
-
_0x3f07bb(_0x5d633f);
|
|
174
|
-
});
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
[_0x5f41('0x2c')](_0x207ba2) {
|
|
179
|
-
for (let _0xf85798 in this[_0x5f41('0x6')]) {
|
|
180
|
-
if (this[_0x5f41('0x6')][_0xf85798]['id'] === _0x207ba2) {
|
|
181
|
-
this[_0x5f41('0x1d')]['debug'](_0x5f41('0x2d') + _0x207ba2);
|
|
182
|
-
|
|
183
|
-
this[_0x5f41('0x6')]['splice'](_0xf85798, 0x1);
|
|
184
|
-
|
|
185
|
-
return !![];
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
this[_0x5f41('0x1d')]['warning']('Unable\x20to\x20remove\x20subscription\x20' + _0x207ba2 + '\x20locally,\x20not\x20found?');
|
|
190
|
-
|
|
191
|
-
return ![];
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
[_0x5f41('0x2e')]() {
|
|
195
|
-
this[_0x5f41('0x1d')][_0x5f41('0x21')](_0x5f41('0x2f') + this[_0x5f41('0x30')]);
|
|
196
|
-
|
|
197
|
-
const _0x274a25 = this;
|
|
198
|
-
|
|
199
|
-
return new Promise(function (_0xe351c8, _0x4696ae) {
|
|
200
|
-
if (_0x274a25[_0x5f41('0x10')]) {
|
|
201
|
-
switch (_0x274a25[_0x5f41('0x10')][_0x5f41('0x13')]) {
|
|
202
|
-
case 0x0:
|
|
203
|
-
_0x4696ae(_0x5f41('0x31'));
|
|
204
|
-
|
|
205
|
-
return;
|
|
206
|
-
|
|
207
|
-
case 0x1:
|
|
208
|
-
_0x4696ae(_0x5f41('0x32'));
|
|
209
|
-
|
|
210
|
-
return;
|
|
211
|
-
|
|
212
|
-
case 0x2:
|
|
213
|
-
_0x4696ae(_0x5f41('0x33'));
|
|
214
|
-
|
|
215
|
-
return;
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
_0x274a25[_0x5f41('0x10')] = new WebSocket(_0x274a25['_serverAddress']);
|
|
220
|
-
|
|
221
|
-
let _0x34582e = ![];
|
|
222
|
-
|
|
223
|
-
_0x274a25[_0x5f41('0x10')]['addEventListener'](_0x5f41('0x34'), function () {
|
|
224
|
-
_0x274a25[_0x5f41('0x1d')][_0x5f41('0x21')]('Successfully\x20connected\x20to\x20event\x20service');
|
|
225
|
-
|
|
226
|
-
_0x34582e = !![];
|
|
227
|
-
_0x274a25['_autoReconnect'] = !![];
|
|
228
|
-
_0x274a25[_0x5f41('0x35')] = RETRY_INTERVAL_START;
|
|
229
|
-
|
|
230
|
-
_0x274a25[_0x5f41('0x10')][_0x5f41('0x36')](_0x5f41('0x37'), function (_0x3cc0ce) {
|
|
231
|
-
_0x274a25[_0x5f41('0xc')][_0x5f41('0x38')](_0x274a25[_0x5f41('0x10')], _0x3cc0ce[_0x5f41('0x39')]);
|
|
232
|
-
});
|
|
233
|
-
|
|
234
|
-
clearTimeout(_0x274a25[_0x5f41('0x7')]);
|
|
235
|
-
_0x274a25[_0x5f41('0x7')] = setInterval(function () {
|
|
236
|
-
_0x274a25[_0x5f41('0xc')][_0x5f41('0x3a')](_0x274a25[_0x5f41('0x10')])[_0x5f41('0x19')](function () {}, function (_0x4eeed4) {
|
|
237
|
-
_0x274a25[_0x5f41('0x1d')][_0x5f41('0x26')]('Ping\x20failed:\x20' + _0x4eeed4);
|
|
238
|
-
|
|
239
|
-
_0x274a25[_0x5f41('0x3b')]();
|
|
240
|
-
});
|
|
241
|
-
}, PING_INTERVAL * 0x3e8);
|
|
242
|
-
_0x274a25[_0x5f41('0x5')] = _0x274a25[_0x5f41('0x6')];
|
|
243
|
-
_0x274a25[_0x5f41('0x6')] = [];
|
|
244
|
-
|
|
245
|
-
for (let _0x4a07ca of _0x274a25[_0x5f41('0x5')]) {
|
|
246
|
-
_0x274a25[_0x5f41('0x14')](_0x4a07ca[_0x5f41('0x1')], _0x4a07ca[_0x5f41('0x2')])[_0x5f41('0x3c')](function (_0x2430a1) {
|
|
247
|
-
_0x274a25[_0x5f41('0x1d')]['error']('Resubscribing\x20to\x20' + _0x4a07ca['specification'][_0x5f41('0x17')] + '\x20failed:\x20' + _0x2430a1);
|
|
248
|
-
});
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
_0xe351c8();
|
|
252
|
-
});
|
|
253
|
-
|
|
254
|
-
_0x274a25[_0x5f41('0x10')]['addEventListener'](_0x5f41('0x12'), function () {
|
|
255
|
-
_0x274a25[_0x5f41('0x1d')][_0x5f41('0x21')](_0x5f41('0x3d'));
|
|
256
|
-
|
|
257
|
-
clearTimeout(_0x274a25['_pingTimerObj']);
|
|
258
|
-
|
|
259
|
-
_0x274a25[_0x5f41('0x3b')]();
|
|
260
|
-
});
|
|
261
|
-
|
|
262
|
-
_0x274a25['_socket'][_0x5f41('0x36')]('error', function (_0x5278a9) {
|
|
263
|
-
_0x274a25[_0x5f41('0x1d')][_0x5f41('0x3e')]('Websocket\x20connection\x20error');
|
|
264
|
-
|
|
265
|
-
if (!_0x34582e) {
|
|
266
|
-
_0x4696ae('Unable\x20to\x20connect:\x20' + _0x5278a9);
|
|
267
|
-
}
|
|
268
|
-
});
|
|
269
|
-
});
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
[_0x5f41('0x3b')]() {
|
|
273
|
-
if (this[_0x5f41('0x8')]) {
|
|
274
|
-
const _0x24937b = Math[_0x5f41('0x3f')](this[_0x5f41('0x35')]);
|
|
275
|
-
|
|
276
|
-
this['log'][_0x5f41('0x21')](_0x5f41('0x40') + _0x24937b + _0x5f41('0x41'));
|
|
277
|
-
|
|
278
|
-
const _0x4108e7 = this;
|
|
279
|
-
|
|
280
|
-
setTimeout(function () {
|
|
281
|
-
_0x4108e7[_0x5f41('0x2e')]()[_0x5f41('0x19')](function () {
|
|
282
|
-
_0x4108e7[_0x5f41('0x1d')]['info']('Reconnect\x20attempt\x20successful');
|
|
283
|
-
}, function () {
|
|
284
|
-
_0x4108e7[_0x5f41('0x1d')][_0x5f41('0x26')]('Reconnect\x20attempt\x20failed');
|
|
285
|
-
});
|
|
286
|
-
|
|
287
|
-
if (_0x4108e7[_0x5f41('0x35')] <= RETRY_MAX_BACKOFF) {
|
|
288
|
-
_0x4108e7[_0x5f41('0x35')] = _0x4108e7['_reconnectRetrySeconds'] * 0x2;
|
|
289
|
-
}
|
|
290
|
-
}, _0x4108e7['_reconnectRetrySeconds'] * 0x3e8);
|
|
291
|
-
} else {
|
|
292
|
-
this[_0x5f41('0x1d')][_0x5f41('0x21')](_0x5f41('0x42'));
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
[_0x5f41('0x43')](_0x9c1810) {
|
|
297
|
-
const _0x5b7540 = _0x9c1810['data']['subscription_id'];
|
|
298
|
-
|
|
299
|
-
for (let _0x4addd8 of this[_0x5f41('0x6')]) {
|
|
300
|
-
if (_0x4addd8['id'] === _0x5b7540) {
|
|
301
|
-
this[_0x5f41('0x1d')]['debug'](_0x5f41('0x44') + _0x4addd8['id'] + _0x5f41('0x45') + JSON[_0x5f41('0x46')](_0x9c1810['data'][_0x5f41('0x47')]));
|
|
302
|
-
|
|
303
|
-
try {
|
|
304
|
-
_0x4addd8[_0x5f41('0x2')](_0x9c1810[_0x5f41('0x39')][_0x5f41('0x47')]);
|
|
305
|
-
} catch (_0x1cc940) {
|
|
306
|
-
this[_0x5f41('0x1d')][_0x5f41('0x26')](_0x5f41('0x48') + _0x1cc940);
|
|
307
|
-
|
|
308
|
-
_0x9c1810[_0x5f41('0x49')]();
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
_0x9c1810[_0x5f41('0x49')]();
|
|
312
|
-
|
|
313
|
-
return;
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
_0x9c1810[_0x5f41('0x4a')](_0x5f41('0x4b') + _0x5b7540);
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
exports.EventClient = EventClient;
|
package/es5/index.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
var _common = require("@telegenta/common");
|
|
8
|
-
|
|
9
|
-
Object.keys(_common).forEach(function (key) {
|
|
10
|
-
if (key === "default" || key === "__esModule") return;
|
|
11
|
-
if (key in exports && exports[key] === _common[key]) return;
|
|
12
|
-
Object.defineProperty(exports, key, {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function get() {
|
|
15
|
-
return _common[key];
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
var _eventClient = require("./event-client");
|
|
21
|
-
|
|
22
|
-
Object.keys(_eventClient).forEach(function (key) {
|
|
23
|
-
if (key === "default" || key === "__esModule") return;
|
|
24
|
-
if (key in exports && exports[key] === _eventClient[key]) return;
|
|
25
|
-
Object.defineProperty(exports, key, {
|
|
26
|
-
enumerable: true,
|
|
27
|
-
get: function get() {
|
|
28
|
-
return _eventClient[key];
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
var _phoneClient = require("./phone-client");
|
|
34
|
-
|
|
35
|
-
Object.keys(_phoneClient).forEach(function (key) {
|
|
36
|
-
if (key === "default" || key === "__esModule") return;
|
|
37
|
-
if (key in exports && exports[key] === _phoneClient[key]) return;
|
|
38
|
-
Object.defineProperty(exports, key, {
|
|
39
|
-
enumerable: true,
|
|
40
|
-
get: function get() {
|
|
41
|
-
return _phoneClient[key];
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
});
|