@acrobits/ipc-sdk 0.3.0 → 0.4.1
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 +3 -3
- package/docs/assets/highlight.css +9 -2
- package/docs/assets/main.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/IPCManager.html +53 -413
- package/docs/enums/IPCEvents.html +6 -93
- package/docs/index.html +3 -66
- package/docs/interfaces/BaseContactItem.html +6 -108
- package/docs/interfaces/CloudUsernameContactItem.html +7 -119
- package/docs/interfaces/DetailedContactItem.html +11 -150
- package/docs/interfaces/ILogger.html +3 -148
- package/docs/interfaces/UriContactItem.html +7 -119
- package/docs/modules.html +5 -69
- package/docs/types/ContactItem.html +2 -59
- package/docs/types/ContactLabel.html +2 -59
- package/docs/types/ContactType.html +2 -59
- package/docs/types/ContactURI.html +3 -61
- package/docs/types/HostType.html +2 -59
- package/docs/types/IPCContext.html +3 -61
- package/docs/types/IpcProtocolVersion.html +2 -59
- package/docs/types/UnsubscribeCallback.html +2 -67
- package/lib/index.d.ts +19 -6
- package/lib/ipc-sdk.js +257 -244
- package/lib/ipc-sdk.js.map +1 -1
- package/lib/ipc-sdk.umd.cjs +3 -3
- package/lib/ipc-sdk.umd.cjs.map +1 -1
- package/lib/tsdoc-metadata.json +1 -1
- package/package.json +9 -9
package/lib/ipc-sdk.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
var Re = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var M = (n, t, e) => (
|
|
4
|
-
var E = /* @__PURE__ */ ((n) => (n.BadgeQuery = "BADGE QUERY", n.
|
|
5
|
-
return
|
|
2
|
+
var Pe = (n, t, e) => t in n ? Re(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
|
|
3
|
+
var M = (n, t, e) => (Pe(n, typeof t != "symbol" ? t + "" : t, e), e);
|
|
4
|
+
var E = /* @__PURE__ */ ((n) => (n.BadgeQuery = "BADGE QUERY", n.Lifecycle = "LIFECYCLE", n))(E || {}), H = function(n, t) {
|
|
5
|
+
return H = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, r) {
|
|
6
6
|
e.__proto__ = r;
|
|
7
7
|
} || function(e, r) {
|
|
8
8
|
for (var i in r)
|
|
9
9
|
Object.prototype.hasOwnProperty.call(r, i) && (e[i] = r[i]);
|
|
10
|
-
},
|
|
10
|
+
}, H(n, t);
|
|
11
11
|
};
|
|
12
12
|
function x(n, t) {
|
|
13
13
|
if (typeof t != "function" && t !== null)
|
|
14
14
|
throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
|
|
15
|
-
|
|
15
|
+
H(n, t);
|
|
16
16
|
function e() {
|
|
17
17
|
this.constructor = n;
|
|
18
18
|
}
|
|
19
19
|
n.prototype = t === null ? Object.create(t) : (e.prototype = t.prototype, new e());
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function Q(n) {
|
|
22
22
|
var t = typeof Symbol == "function" && Symbol.iterator, e = t && n[t], r = 0;
|
|
23
23
|
if (e)
|
|
24
24
|
return e.call(n);
|
|
@@ -38,8 +38,8 @@ function _(n, t) {
|
|
|
38
38
|
try {
|
|
39
39
|
for (; (t === void 0 || t-- > 0) && !(i = r.next()).done; )
|
|
40
40
|
o.push(i.value);
|
|
41
|
-
} catch (
|
|
42
|
-
s = { error:
|
|
41
|
+
} catch (u) {
|
|
42
|
+
s = { error: u };
|
|
43
43
|
} finally {
|
|
44
44
|
try {
|
|
45
45
|
i && !i.done && (e = r.return) && e.call(r);
|
|
@@ -56,7 +56,7 @@ function I(n, t, e) {
|
|
|
56
56
|
(o || !(r in t)) && (o || (o = Array.prototype.slice.call(t, 0, r)), o[r] = t[r]);
|
|
57
57
|
return n.concat(o || Array.prototype.slice.call(t));
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function y(n) {
|
|
60
60
|
return typeof n == "function";
|
|
61
61
|
}
|
|
62
62
|
function Z(n) {
|
|
@@ -65,7 +65,7 @@ function Z(n) {
|
|
|
65
65
|
}, e = n(t);
|
|
66
66
|
return e.prototype = Object.create(Error.prototype), e.prototype.constructor = e, e;
|
|
67
67
|
}
|
|
68
|
-
var
|
|
68
|
+
var k = Z(function(n) {
|
|
69
69
|
return function(e) {
|
|
70
70
|
n(this), this.message = e ? e.length + ` errors occurred during unsubscription:
|
|
71
71
|
` + e.map(function(r, i) {
|
|
@@ -74,7 +74,7 @@ var H = Z(function(n) {
|
|
|
74
74
|
`) : "", this.name = "UnsubscriptionError", this.errors = e;
|
|
75
75
|
};
|
|
76
76
|
});
|
|
77
|
-
function
|
|
77
|
+
function U(n, t) {
|
|
78
78
|
if (n) {
|
|
79
79
|
var e = n.indexOf(t);
|
|
80
80
|
0 <= e && n.splice(e, 1);
|
|
@@ -92,15 +92,15 @@ var T = function() {
|
|
|
92
92
|
if (s)
|
|
93
93
|
if (this._parentage = null, Array.isArray(s))
|
|
94
94
|
try {
|
|
95
|
-
for (var
|
|
96
|
-
var a =
|
|
95
|
+
for (var u = Q(s), c = u.next(); !c.done; c = u.next()) {
|
|
96
|
+
var a = c.value;
|
|
97
97
|
a.remove(this);
|
|
98
98
|
}
|
|
99
99
|
} catch (d) {
|
|
100
100
|
t = { error: d };
|
|
101
101
|
} finally {
|
|
102
102
|
try {
|
|
103
|
-
|
|
103
|
+
c && !c.done && (e = u.return) && e.call(u);
|
|
104
104
|
} finally {
|
|
105
105
|
if (t)
|
|
106
106
|
throw t.error;
|
|
@@ -109,29 +109,29 @@ var T = function() {
|
|
|
109
109
|
else
|
|
110
110
|
s.remove(this);
|
|
111
111
|
var g = this.initialTeardown;
|
|
112
|
-
if (
|
|
112
|
+
if (y(g))
|
|
113
113
|
try {
|
|
114
114
|
g();
|
|
115
115
|
} catch (d) {
|
|
116
|
-
o = d instanceof
|
|
116
|
+
o = d instanceof k ? d.errors : [d];
|
|
117
117
|
}
|
|
118
118
|
var v = this._finalizers;
|
|
119
119
|
if (v) {
|
|
120
120
|
this._finalizers = null;
|
|
121
121
|
try {
|
|
122
|
-
for (var S =
|
|
123
|
-
var D =
|
|
122
|
+
for (var S = Q(v), b = S.next(); !b.done; b = S.next()) {
|
|
123
|
+
var D = b.value;
|
|
124
124
|
try {
|
|
125
125
|
oe(D);
|
|
126
126
|
} catch (d) {
|
|
127
|
-
o = o ?? [], d instanceof
|
|
127
|
+
o = o ?? [], d instanceof k ? o = I(I([], _(o)), _(d.errors)) : o.push(d);
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
} catch (d) {
|
|
131
131
|
r = { error: d };
|
|
132
132
|
} finally {
|
|
133
133
|
try {
|
|
134
|
-
|
|
134
|
+
b && !b.done && (i = S.return) && i.call(S);
|
|
135
135
|
} finally {
|
|
136
136
|
if (r)
|
|
137
137
|
throw r.error;
|
|
@@ -139,7 +139,7 @@ var T = function() {
|
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
if (o)
|
|
142
|
-
throw new
|
|
142
|
+
throw new k(o);
|
|
143
143
|
}
|
|
144
144
|
}, n.prototype.add = function(t) {
|
|
145
145
|
var e;
|
|
@@ -162,20 +162,20 @@ var T = function() {
|
|
|
162
162
|
this._parentage = Array.isArray(e) ? (e.push(t), e) : e ? [e, t] : t;
|
|
163
163
|
}, n.prototype._removeParent = function(t) {
|
|
164
164
|
var e = this._parentage;
|
|
165
|
-
e === t ? this._parentage = null : Array.isArray(e) &&
|
|
165
|
+
e === t ? this._parentage = null : Array.isArray(e) && U(e, t);
|
|
166
166
|
}, n.prototype.remove = function(t) {
|
|
167
167
|
var e = this._finalizers;
|
|
168
|
-
e &&
|
|
168
|
+
e && U(e, t), t instanceof n && t._removeParent(this);
|
|
169
169
|
}, n.EMPTY = function() {
|
|
170
170
|
var t = new n();
|
|
171
171
|
return t.closed = !0, t;
|
|
172
172
|
}(), n;
|
|
173
173
|
}(), me = T.EMPTY;
|
|
174
174
|
function we(n) {
|
|
175
|
-
return n instanceof T || n && "closed" in n &&
|
|
175
|
+
return n instanceof T || n && "closed" in n && y(n.remove) && y(n.add) && y(n.unsubscribe);
|
|
176
176
|
}
|
|
177
177
|
function oe(n) {
|
|
178
|
-
|
|
178
|
+
y(n) ? n() : n.unsubscribe();
|
|
179
179
|
}
|
|
180
180
|
var Se = {
|
|
181
181
|
onUnhandledError: null,
|
|
@@ -183,37 +183,37 @@ var Se = {
|
|
|
183
183
|
Promise: void 0,
|
|
184
184
|
useDeprecatedSynchronousErrorHandling: !1,
|
|
185
185
|
useDeprecatedNextContext: !1
|
|
186
|
-
},
|
|
186
|
+
}, Y = {
|
|
187
187
|
setTimeout: function(n, t) {
|
|
188
188
|
for (var e = [], r = 2; r < arguments.length; r++)
|
|
189
189
|
e[r - 2] = arguments[r];
|
|
190
|
-
var i =
|
|
190
|
+
var i = Y.delegate;
|
|
191
191
|
return i != null && i.setTimeout ? i.setTimeout.apply(i, I([n, t], _(e))) : setTimeout.apply(void 0, I([n, t], _(e)));
|
|
192
192
|
},
|
|
193
193
|
clearTimeout: function(n) {
|
|
194
|
-
var t =
|
|
194
|
+
var t = Y.delegate;
|
|
195
195
|
return ((t == null ? void 0 : t.clearTimeout) || clearTimeout)(n);
|
|
196
196
|
},
|
|
197
197
|
delegate: void 0
|
|
198
198
|
};
|
|
199
|
-
function
|
|
200
|
-
|
|
199
|
+
function Oe(n) {
|
|
200
|
+
Y.setTimeout(function() {
|
|
201
201
|
throw n;
|
|
202
202
|
});
|
|
203
203
|
}
|
|
204
204
|
function se() {
|
|
205
205
|
}
|
|
206
|
-
function
|
|
206
|
+
function L(n) {
|
|
207
207
|
n();
|
|
208
208
|
}
|
|
209
209
|
var ee = function(n) {
|
|
210
210
|
x(t, n);
|
|
211
211
|
function t(e) {
|
|
212
212
|
var r = n.call(this) || this;
|
|
213
|
-
return r.isStopped = !1, e ? (r.destination = e, we(e) && e.add(r)) : r.destination =
|
|
213
|
+
return r.isStopped = !1, e ? (r.destination = e, we(e) && e.add(r)) : r.destination = Ve, r;
|
|
214
214
|
}
|
|
215
215
|
return t.create = function(e, r, i) {
|
|
216
|
-
return new
|
|
216
|
+
return new V(e, r, i);
|
|
217
217
|
}, t.prototype.next = function(e) {
|
|
218
218
|
this.isStopped || this._next(e);
|
|
219
219
|
}, t.prototype.error = function(e) {
|
|
@@ -237,11 +237,11 @@ var ee = function(n) {
|
|
|
237
237
|
this.unsubscribe();
|
|
238
238
|
}
|
|
239
239
|
}, t;
|
|
240
|
-
}(T),
|
|
241
|
-
function
|
|
242
|
-
return
|
|
240
|
+
}(T), Le = Function.prototype.bind;
|
|
241
|
+
function B(n, t) {
|
|
242
|
+
return Le.call(n, t);
|
|
243
243
|
}
|
|
244
|
-
var
|
|
244
|
+
var $e = function() {
|
|
245
245
|
function n(t) {
|
|
246
246
|
this.partialObserver = t;
|
|
247
247
|
}
|
|
@@ -272,55 +272,55 @@ var Ue = function() {
|
|
|
272
272
|
R(e);
|
|
273
273
|
}
|
|
274
274
|
}, n;
|
|
275
|
-
}(),
|
|
275
|
+
}(), V = function(n) {
|
|
276
276
|
x(t, n);
|
|
277
277
|
function t(e, r, i) {
|
|
278
278
|
var o = n.call(this) || this, s;
|
|
279
|
-
if (
|
|
279
|
+
if (y(e) || !e)
|
|
280
280
|
s = {
|
|
281
281
|
next: e ?? void 0,
|
|
282
282
|
error: r ?? void 0,
|
|
283
283
|
complete: i ?? void 0
|
|
284
284
|
};
|
|
285
285
|
else {
|
|
286
|
-
var
|
|
287
|
-
o && Se.useDeprecatedNextContext ? (
|
|
286
|
+
var u;
|
|
287
|
+
o && Se.useDeprecatedNextContext ? (u = Object.create(e), u.unsubscribe = function() {
|
|
288
288
|
return o.unsubscribe();
|
|
289
289
|
}, s = {
|
|
290
|
-
next: e.next &&
|
|
291
|
-
error: e.error &&
|
|
292
|
-
complete: e.complete &&
|
|
290
|
+
next: e.next && B(e.next, u),
|
|
291
|
+
error: e.error && B(e.error, u),
|
|
292
|
+
complete: e.complete && B(e.complete, u)
|
|
293
293
|
}) : s = e;
|
|
294
294
|
}
|
|
295
|
-
return o.destination = new
|
|
295
|
+
return o.destination = new $e(s), o;
|
|
296
296
|
}
|
|
297
297
|
return t;
|
|
298
298
|
}(ee);
|
|
299
299
|
function R(n) {
|
|
300
|
-
|
|
300
|
+
Oe(n);
|
|
301
301
|
}
|
|
302
|
-
function
|
|
302
|
+
function Ue(n) {
|
|
303
303
|
throw n;
|
|
304
304
|
}
|
|
305
|
-
var
|
|
305
|
+
var Ve = {
|
|
306
306
|
closed: !0,
|
|
307
307
|
next: se,
|
|
308
|
-
error:
|
|
308
|
+
error: Ue,
|
|
309
309
|
complete: se
|
|
310
|
-
},
|
|
310
|
+
}, je = function() {
|
|
311
311
|
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
|
312
312
|
}();
|
|
313
313
|
function Ee(n) {
|
|
314
314
|
return n;
|
|
315
315
|
}
|
|
316
|
-
function
|
|
316
|
+
function Fe(n) {
|
|
317
317
|
return n.length === 0 ? Ee : n.length === 1 ? n[0] : function(e) {
|
|
318
318
|
return n.reduce(function(r, i) {
|
|
319
319
|
return i(r);
|
|
320
320
|
}, e);
|
|
321
321
|
};
|
|
322
322
|
}
|
|
323
|
-
var
|
|
323
|
+
var G = function() {
|
|
324
324
|
function n(t) {
|
|
325
325
|
t && (this._subscribe = t);
|
|
326
326
|
}
|
|
@@ -328,10 +328,10 @@ var Y = function() {
|
|
|
328
328
|
var e = new n();
|
|
329
329
|
return e.source = this, e.operator = t, e;
|
|
330
330
|
}, n.prototype.subscribe = function(t, e, r) {
|
|
331
|
-
var i = this, o = De(t) ? t : new
|
|
332
|
-
return
|
|
333
|
-
var s = i,
|
|
334
|
-
o.add(
|
|
331
|
+
var i = this, o = De(t) ? t : new V(t, e, r);
|
|
332
|
+
return L(function() {
|
|
333
|
+
var s = i, u = s.operator, c = s.source;
|
|
334
|
+
o.add(u ? u.call(o, c) : c ? i._subscribe(o) : i._trySubscribe(o));
|
|
335
335
|
}), o;
|
|
336
336
|
}, n.prototype._trySubscribe = function(t) {
|
|
337
337
|
try {
|
|
@@ -341,13 +341,13 @@ var Y = function() {
|
|
|
341
341
|
}
|
|
342
342
|
}, n.prototype.forEach = function(t, e) {
|
|
343
343
|
var r = this;
|
|
344
|
-
return e =
|
|
345
|
-
var s = new
|
|
346
|
-
next: function(
|
|
344
|
+
return e = ce(e), new e(function(i, o) {
|
|
345
|
+
var s = new V({
|
|
346
|
+
next: function(u) {
|
|
347
347
|
try {
|
|
348
|
-
t(
|
|
349
|
-
} catch (
|
|
350
|
-
o(
|
|
348
|
+
t(u);
|
|
349
|
+
} catch (c) {
|
|
350
|
+
o(c), s.unsubscribe();
|
|
351
351
|
}
|
|
352
352
|
},
|
|
353
353
|
error: o,
|
|
@@ -358,15 +358,15 @@ var Y = function() {
|
|
|
358
358
|
}, n.prototype._subscribe = function(t) {
|
|
359
359
|
var e;
|
|
360
360
|
return (e = this.source) === null || e === void 0 ? void 0 : e.subscribe(t);
|
|
361
|
-
}, n.prototype[
|
|
361
|
+
}, n.prototype[je] = function() {
|
|
362
362
|
return this;
|
|
363
363
|
}, n.prototype.pipe = function() {
|
|
364
364
|
for (var t = [], e = 0; e < arguments.length; e++)
|
|
365
365
|
t[e] = arguments[e];
|
|
366
|
-
return
|
|
366
|
+
return Fe(t)(this);
|
|
367
367
|
}, n.prototype.toPromise = function(t) {
|
|
368
368
|
var e = this;
|
|
369
|
-
return t =
|
|
369
|
+
return t = ce(t), new t(function(r, i) {
|
|
370
370
|
var o;
|
|
371
371
|
e.subscribe(function(s) {
|
|
372
372
|
return o = s;
|
|
@@ -380,22 +380,22 @@ var Y = function() {
|
|
|
380
380
|
return new n(t);
|
|
381
381
|
}, n;
|
|
382
382
|
}();
|
|
383
|
-
function
|
|
383
|
+
function ce(n) {
|
|
384
384
|
var t;
|
|
385
385
|
return (t = n ?? Se.Promise) !== null && t !== void 0 ? t : Promise;
|
|
386
386
|
}
|
|
387
387
|
function Ne(n) {
|
|
388
|
-
return n &&
|
|
388
|
+
return n && y(n.next) && y(n.error) && y(n.complete);
|
|
389
389
|
}
|
|
390
390
|
function De(n) {
|
|
391
391
|
return n && n instanceof ee || Ne(n) && we(n);
|
|
392
392
|
}
|
|
393
|
-
function
|
|
394
|
-
return
|
|
393
|
+
function ke(n) {
|
|
394
|
+
return y(n == null ? void 0 : n.lift);
|
|
395
395
|
}
|
|
396
396
|
function Ce(n) {
|
|
397
397
|
return function(t) {
|
|
398
|
-
if (
|
|
398
|
+
if (ke(t))
|
|
399
399
|
return t.lift(function(e) {
|
|
400
400
|
try {
|
|
401
401
|
return n(e, this);
|
|
@@ -407,19 +407,19 @@ function Ce(n) {
|
|
|
407
407
|
};
|
|
408
408
|
}
|
|
409
409
|
function xe(n, t, e, r, i) {
|
|
410
|
-
return new
|
|
410
|
+
return new Be(n, t, e, r, i);
|
|
411
411
|
}
|
|
412
|
-
var
|
|
412
|
+
var Be = function(n) {
|
|
413
413
|
x(t, n);
|
|
414
|
-
function t(e, r, i, o, s,
|
|
415
|
-
var
|
|
416
|
-
return
|
|
414
|
+
function t(e, r, i, o, s, u) {
|
|
415
|
+
var c = n.call(this, e) || this;
|
|
416
|
+
return c.onFinalize = s, c.shouldUnsubscribe = u, c._next = r ? function(a) {
|
|
417
417
|
try {
|
|
418
418
|
r(a);
|
|
419
419
|
} catch (g) {
|
|
420
420
|
e.error(g);
|
|
421
421
|
}
|
|
422
|
-
} : n.prototype._next,
|
|
422
|
+
} : n.prototype._next, c._error = o ? function(a) {
|
|
423
423
|
try {
|
|
424
424
|
o(a);
|
|
425
425
|
} catch (g) {
|
|
@@ -427,7 +427,7 @@ var ke = function(n) {
|
|
|
427
427
|
} finally {
|
|
428
428
|
this.unsubscribe();
|
|
429
429
|
}
|
|
430
|
-
} : n.prototype._error,
|
|
430
|
+
} : n.prototype._error, c._complete = i ? function() {
|
|
431
431
|
try {
|
|
432
432
|
i();
|
|
433
433
|
} catch (a) {
|
|
@@ -435,7 +435,7 @@ var ke = function(n) {
|
|
|
435
435
|
} finally {
|
|
436
436
|
this.unsubscribe();
|
|
437
437
|
}
|
|
438
|
-
} : n.prototype._complete,
|
|
438
|
+
} : n.prototype._complete, c;
|
|
439
439
|
}
|
|
440
440
|
return t.prototype.unsubscribe = function() {
|
|
441
441
|
var e;
|
|
@@ -444,7 +444,7 @@ var ke = function(n) {
|
|
|
444
444
|
n.prototype.unsubscribe.call(this), !r && ((e = this.onFinalize) === null || e === void 0 || e.call(this));
|
|
445
445
|
}
|
|
446
446
|
}, t;
|
|
447
|
-
}(ee),
|
|
447
|
+
}(ee), qe = Z(function(n) {
|
|
448
448
|
return function() {
|
|
449
449
|
n(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
|
|
450
450
|
};
|
|
@@ -455,27 +455,27 @@ var ke = function(n) {
|
|
|
455
455
|
return e.closed = !1, e.currentObservers = null, e.observers = [], e.isStopped = !1, e.hasError = !1, e.thrownError = null, e;
|
|
456
456
|
}
|
|
457
457
|
return t.prototype.lift = function(e) {
|
|
458
|
-
var r = new
|
|
458
|
+
var r = new ue(this, this);
|
|
459
459
|
return r.operator = e, r;
|
|
460
460
|
}, t.prototype._throwIfClosed = function() {
|
|
461
461
|
if (this.closed)
|
|
462
|
-
throw new
|
|
462
|
+
throw new qe();
|
|
463
463
|
}, t.prototype.next = function(e) {
|
|
464
464
|
var r = this;
|
|
465
|
-
|
|
465
|
+
L(function() {
|
|
466
466
|
var i, o;
|
|
467
467
|
if (r._throwIfClosed(), !r.isStopped) {
|
|
468
468
|
r.currentObservers || (r.currentObservers = Array.from(r.observers));
|
|
469
469
|
try {
|
|
470
|
-
for (var s =
|
|
471
|
-
var
|
|
472
|
-
|
|
470
|
+
for (var s = Q(r.currentObservers), u = s.next(); !u.done; u = s.next()) {
|
|
471
|
+
var c = u.value;
|
|
472
|
+
c.next(e);
|
|
473
473
|
}
|
|
474
474
|
} catch (a) {
|
|
475
475
|
i = { error: a };
|
|
476
476
|
} finally {
|
|
477
477
|
try {
|
|
478
|
-
|
|
478
|
+
u && !u.done && (o = s.return) && o.call(s);
|
|
479
479
|
} finally {
|
|
480
480
|
if (i)
|
|
481
481
|
throw i.error;
|
|
@@ -485,7 +485,7 @@ var ke = function(n) {
|
|
|
485
485
|
});
|
|
486
486
|
}, t.prototype.error = function(e) {
|
|
487
487
|
var r = this;
|
|
488
|
-
|
|
488
|
+
L(function() {
|
|
489
489
|
if (r._throwIfClosed(), !r.isStopped) {
|
|
490
490
|
r.hasError = r.isStopped = !0, r.thrownError = e;
|
|
491
491
|
for (var i = r.observers; i.length; )
|
|
@@ -494,7 +494,7 @@ var ke = function(n) {
|
|
|
494
494
|
});
|
|
495
495
|
}, t.prototype.complete = function() {
|
|
496
496
|
var e = this;
|
|
497
|
-
|
|
497
|
+
L(function() {
|
|
498
498
|
if (e._throwIfClosed(), !e.isStopped) {
|
|
499
499
|
e.isStopped = !0;
|
|
500
500
|
for (var r = e.observers; r.length; )
|
|
@@ -515,20 +515,20 @@ var ke = function(n) {
|
|
|
515
515
|
}, t.prototype._subscribe = function(e) {
|
|
516
516
|
return this._throwIfClosed(), this._checkFinalizedStatuses(e), this._innerSubscribe(e);
|
|
517
517
|
}, t.prototype._innerSubscribe = function(e) {
|
|
518
|
-
var r = this, i = this, o = i.hasError, s = i.isStopped,
|
|
519
|
-
return o || s ? me : (this.currentObservers = null,
|
|
520
|
-
r.currentObservers = null,
|
|
518
|
+
var r = this, i = this, o = i.hasError, s = i.isStopped, u = i.observers;
|
|
519
|
+
return o || s ? me : (this.currentObservers = null, u.push(e), new T(function() {
|
|
520
|
+
r.currentObservers = null, U(u, e);
|
|
521
521
|
}));
|
|
522
522
|
}, t.prototype._checkFinalizedStatuses = function(e) {
|
|
523
523
|
var r = this, i = r.hasError, o = r.thrownError, s = r.isStopped;
|
|
524
524
|
i ? e.error(o) : s && e.complete();
|
|
525
525
|
}, t.prototype.asObservable = function() {
|
|
526
|
-
var e = new
|
|
526
|
+
var e = new G();
|
|
527
527
|
return e.source = this, e;
|
|
528
528
|
}, t.create = function(e, r) {
|
|
529
|
-
return new
|
|
529
|
+
return new ue(e, r);
|
|
530
530
|
}, t;
|
|
531
|
-
}(
|
|
531
|
+
}(G), ue = function(n) {
|
|
532
532
|
x(t, n);
|
|
533
533
|
function t(e, r) {
|
|
534
534
|
var i = n.call(this) || this;
|
|
@@ -552,7 +552,7 @@ var ke = function(n) {
|
|
|
552
552
|
return (_e.delegate || Date).now();
|
|
553
553
|
},
|
|
554
554
|
delegate: void 0
|
|
555
|
-
},
|
|
555
|
+
}, ze = function(n) {
|
|
556
556
|
x(t, n);
|
|
557
557
|
function t(e, r) {
|
|
558
558
|
return n.call(this) || this;
|
|
@@ -560,19 +560,19 @@ var ke = function(n) {
|
|
|
560
560
|
return t.prototype.schedule = function(e, r) {
|
|
561
561
|
return this;
|
|
562
562
|
}, t;
|
|
563
|
-
}(T),
|
|
563
|
+
}(T), j = {
|
|
564
564
|
setInterval: function(n, t) {
|
|
565
565
|
for (var e = [], r = 2; r < arguments.length; r++)
|
|
566
566
|
e[r - 2] = arguments[r];
|
|
567
|
-
var i =
|
|
567
|
+
var i = j.delegate;
|
|
568
568
|
return i != null && i.setInterval ? i.setInterval.apply(i, I([n, t], _(e))) : setInterval.apply(void 0, I([n, t], _(e)));
|
|
569
569
|
},
|
|
570
570
|
clearInterval: function(n) {
|
|
571
|
-
var t =
|
|
571
|
+
var t = j.delegate;
|
|
572
572
|
return ((t == null ? void 0 : t.clearInterval) || clearInterval)(n);
|
|
573
573
|
},
|
|
574
574
|
delegate: void 0
|
|
575
|
-
},
|
|
575
|
+
}, He = function(n) {
|
|
576
576
|
x(t, n);
|
|
577
577
|
function t(e, r) {
|
|
578
578
|
var i = n.call(this, e, r) || this;
|
|
@@ -586,11 +586,11 @@ var ke = function(n) {
|
|
|
586
586
|
var o = this.id, s = this.scheduler;
|
|
587
587
|
return o != null && (this.id = this.recycleAsyncId(s, o, r)), this.pending = !0, this.delay = r, this.id = (i = this.id) !== null && i !== void 0 ? i : this.requestAsyncId(s, this.id, r), this;
|
|
588
588
|
}, t.prototype.requestAsyncId = function(e, r, i) {
|
|
589
|
-
return i === void 0 && (i = 0),
|
|
589
|
+
return i === void 0 && (i = 0), j.setInterval(e.flush.bind(e, this), i);
|
|
590
590
|
}, t.prototype.recycleAsyncId = function(e, r, i) {
|
|
591
591
|
if (i === void 0 && (i = 0), i != null && this.delay === i && this.pending === !1)
|
|
592
592
|
return r;
|
|
593
|
-
r != null &&
|
|
593
|
+
r != null && j.clearInterval(r);
|
|
594
594
|
}, t.prototype.execute = function(e, r) {
|
|
595
595
|
if (this.closed)
|
|
596
596
|
return new Error("executing a cancelled action");
|
|
@@ -611,17 +611,17 @@ var ke = function(n) {
|
|
|
611
611
|
}, t.prototype.unsubscribe = function() {
|
|
612
612
|
if (!this.closed) {
|
|
613
613
|
var e = this, r = e.id, i = e.scheduler, o = i.actions;
|
|
614
|
-
this.work = this.state = this.scheduler = null, this.pending = !1,
|
|
614
|
+
this.work = this.state = this.scheduler = null, this.pending = !1, U(o, this), r != null && (this.id = this.recycleAsyncId(i, r, null)), this.delay = null, n.prototype.unsubscribe.call(this);
|
|
615
615
|
}
|
|
616
616
|
}, t;
|
|
617
|
-
}(
|
|
617
|
+
}(ze), ae = function() {
|
|
618
618
|
function n(t, e) {
|
|
619
619
|
e === void 0 && (e = n.now), this.schedulerActionCtor = t, this.now = e;
|
|
620
620
|
}
|
|
621
621
|
return n.prototype.schedule = function(t, e, r) {
|
|
622
622
|
return e === void 0 && (e = 0), new this.schedulerActionCtor(this, t).schedule(r, e);
|
|
623
623
|
}, n.now = _e.now, n;
|
|
624
|
-
}(),
|
|
624
|
+
}(), Qe = function(n) {
|
|
625
625
|
x(t, n);
|
|
626
626
|
function t(e, r) {
|
|
627
627
|
r === void 0 && (r = ae.now);
|
|
@@ -646,19 +646,19 @@ var ke = function(n) {
|
|
|
646
646
|
throw i;
|
|
647
647
|
}
|
|
648
648
|
}, t;
|
|
649
|
-
}(ae),
|
|
649
|
+
}(ae), Ye = new Qe(He), Ge = Ye;
|
|
650
650
|
function Je(n) {
|
|
651
|
-
return n &&
|
|
651
|
+
return n && y(n.schedule);
|
|
652
652
|
}
|
|
653
653
|
var We = Z(function(n) {
|
|
654
654
|
return function() {
|
|
655
655
|
n(this), this.name = "EmptyError", this.message = "no elements in sequence";
|
|
656
656
|
};
|
|
657
657
|
});
|
|
658
|
-
function
|
|
658
|
+
function A(n, t) {
|
|
659
659
|
var e = typeof t == "object";
|
|
660
660
|
return new Promise(function(r, i) {
|
|
661
|
-
var o = new
|
|
661
|
+
var o = new V({
|
|
662
662
|
next: function(s) {
|
|
663
663
|
r(s), o.unsubscribe();
|
|
664
664
|
},
|
|
@@ -673,7 +673,7 @@ function O(n, t) {
|
|
|
673
673
|
function Ke(n) {
|
|
674
674
|
return n instanceof Date && !isNaN(n);
|
|
675
675
|
}
|
|
676
|
-
function
|
|
676
|
+
function P(n, t) {
|
|
677
677
|
return Ce(function(e, r) {
|
|
678
678
|
var i = 0;
|
|
679
679
|
e.subscribe(xe(r, function(o) {
|
|
@@ -682,9 +682,9 @@ function A(n, t) {
|
|
|
682
682
|
});
|
|
683
683
|
}
|
|
684
684
|
function Xe(n, t, e) {
|
|
685
|
-
n === void 0 && (n = 0), e === void 0 && (e =
|
|
685
|
+
n === void 0 && (n = 0), e === void 0 && (e = Ge);
|
|
686
686
|
var r = -1;
|
|
687
|
-
return t != null && (Je(t) ? e = t : r = t), new
|
|
687
|
+
return t != null && (Je(t) ? e = t : r = t), new G(function(i) {
|
|
688
688
|
var o = Ke(n) ? +n - e.now() : n;
|
|
689
689
|
o < 0 && (o = 0);
|
|
690
690
|
var s = 0;
|
|
@@ -694,23 +694,23 @@ function Xe(n, t, e) {
|
|
|
694
694
|
});
|
|
695
695
|
}
|
|
696
696
|
function Ze(n, t, e) {
|
|
697
|
-
var r =
|
|
697
|
+
var r = y(n) || t || e ? { next: n, error: t, complete: e } : n;
|
|
698
698
|
return r ? Ce(function(i, o) {
|
|
699
699
|
var s;
|
|
700
700
|
(s = r.subscribe) === null || s === void 0 || s.call(r);
|
|
701
|
-
var
|
|
702
|
-
i.subscribe(xe(o, function(
|
|
701
|
+
var u = !0;
|
|
702
|
+
i.subscribe(xe(o, function(c) {
|
|
703
703
|
var a;
|
|
704
|
-
(a = r.next) === null || a === void 0 || a.call(r,
|
|
704
|
+
(a = r.next) === null || a === void 0 || a.call(r, c), o.next(c);
|
|
705
705
|
}, function() {
|
|
706
|
-
var
|
|
707
|
-
|
|
708
|
-
}, function(
|
|
706
|
+
var c;
|
|
707
|
+
u = !1, (c = r.complete) === null || c === void 0 || c.call(r), o.complete();
|
|
708
|
+
}, function(c) {
|
|
709
709
|
var a;
|
|
710
|
-
|
|
710
|
+
u = !1, (a = r.error) === null || a === void 0 || a.call(r, c), o.error(c);
|
|
711
711
|
}, function() {
|
|
712
|
-
var
|
|
713
|
-
|
|
712
|
+
var c, a;
|
|
713
|
+
u && ((c = r.unsubscribe) === null || c === void 0 || c.call(r)), (a = r.finalize) === null || a === void 0 || a.call(r);
|
|
714
714
|
}));
|
|
715
715
|
}) : Ee;
|
|
716
716
|
}
|
|
@@ -720,7 +720,7 @@ class l extends Error {
|
|
|
720
720
|
super(`Incorrect context (${t}). Cannot perform the requested operation.`), C(this, "context"), this.context = t;
|
|
721
721
|
}
|
|
722
722
|
}
|
|
723
|
-
class
|
|
723
|
+
class $ extends Error {
|
|
724
724
|
constructor(t, e, r) {
|
|
725
725
|
super(`Invalid parameter (${t}). ${r}`), this.param = t, this.value = e, this.reason = r;
|
|
726
726
|
}
|
|
@@ -754,7 +754,7 @@ function w(n) {
|
|
|
754
754
|
function it(n) {
|
|
755
755
|
return w(n == null ? void 0 : n.lift);
|
|
756
756
|
}
|
|
757
|
-
function
|
|
757
|
+
function F(n) {
|
|
758
758
|
return function(t) {
|
|
759
759
|
if (it(t))
|
|
760
760
|
return t.lift(function(e) {
|
|
@@ -804,8 +804,8 @@ function W(n, t) {
|
|
|
804
804
|
try {
|
|
805
805
|
for (; (t === void 0 || t-- > 0) && !(i = r.next()).done; )
|
|
806
806
|
o.push(i.value);
|
|
807
|
-
} catch (
|
|
808
|
-
s = { error:
|
|
807
|
+
} catch (u) {
|
|
808
|
+
s = { error: u };
|
|
809
809
|
} finally {
|
|
810
810
|
try {
|
|
811
811
|
i && !i.done && (e = r.return) && e.call(r);
|
|
@@ -828,7 +828,7 @@ function ot(n) {
|
|
|
828
828
|
}, e = n(t);
|
|
829
829
|
return e.prototype = Object.create(Error.prototype), e.prototype.constructor = e, e;
|
|
830
830
|
}
|
|
831
|
-
var
|
|
831
|
+
var q = ot(function(n) {
|
|
832
832
|
return function(t) {
|
|
833
833
|
n(this), this.message = t ? t.length + ` errors occurred during unsubscription:
|
|
834
834
|
` + t.map(function(e, r) {
|
|
@@ -855,15 +855,15 @@ var re = function() {
|
|
|
855
855
|
if (s)
|
|
856
856
|
if (this._parentage = null, Array.isArray(s))
|
|
857
857
|
try {
|
|
858
|
-
for (var
|
|
859
|
-
var a =
|
|
858
|
+
for (var u = de(s), c = u.next(); !c.done; c = u.next()) {
|
|
859
|
+
var a = c.value;
|
|
860
860
|
a.remove(this);
|
|
861
861
|
}
|
|
862
862
|
} catch (d) {
|
|
863
863
|
t = { error: d };
|
|
864
864
|
} finally {
|
|
865
865
|
try {
|
|
866
|
-
|
|
866
|
+
c && !c.done && (e = u.return) && e.call(u);
|
|
867
867
|
} finally {
|
|
868
868
|
if (t)
|
|
869
869
|
throw t.error;
|
|
@@ -876,25 +876,25 @@ var re = function() {
|
|
|
876
876
|
try {
|
|
877
877
|
g();
|
|
878
878
|
} catch (d) {
|
|
879
|
-
o = d instanceof
|
|
879
|
+
o = d instanceof q ? d.errors : [d];
|
|
880
880
|
}
|
|
881
881
|
var v = this._finalizers;
|
|
882
882
|
if (v) {
|
|
883
883
|
this._finalizers = null;
|
|
884
884
|
try {
|
|
885
|
-
for (var S = de(v),
|
|
886
|
-
var D =
|
|
885
|
+
for (var S = de(v), b = S.next(); !b.done; b = S.next()) {
|
|
886
|
+
var D = b.value;
|
|
887
887
|
try {
|
|
888
888
|
fe(D);
|
|
889
889
|
} catch (d) {
|
|
890
|
-
o = o ?? [], d instanceof
|
|
890
|
+
o = o ?? [], d instanceof q ? o = K(K([], W(o)), W(d.errors)) : o.push(d);
|
|
891
891
|
}
|
|
892
892
|
}
|
|
893
893
|
} catch (d) {
|
|
894
894
|
r = { error: d };
|
|
895
895
|
} finally {
|
|
896
896
|
try {
|
|
897
|
-
|
|
897
|
+
b && !b.done && (i = S.return) && i.call(S);
|
|
898
898
|
} finally {
|
|
899
899
|
if (r)
|
|
900
900
|
throw r.error;
|
|
@@ -902,7 +902,7 @@ var re = function() {
|
|
|
902
902
|
}
|
|
903
903
|
}
|
|
904
904
|
if (o)
|
|
905
|
-
throw new
|
|
905
|
+
throw new q(o);
|
|
906
906
|
}
|
|
907
907
|
}, n.prototype.add = function(t) {
|
|
908
908
|
var e;
|
|
@@ -941,7 +941,7 @@ function Ie(n) {
|
|
|
941
941
|
function fe(n) {
|
|
942
942
|
w(n) ? n() : n.unsubscribe();
|
|
943
943
|
}
|
|
944
|
-
var
|
|
944
|
+
var Ae = {
|
|
945
945
|
onUnhandledError: null,
|
|
946
946
|
onStoppedNotification: null,
|
|
947
947
|
Promise: void 0,
|
|
@@ -958,14 +958,14 @@ var Oe = {
|
|
|
958
958
|
},
|
|
959
959
|
delegate: void 0
|
|
960
960
|
};
|
|
961
|
-
function
|
|
961
|
+
function ct(n) {
|
|
962
962
|
st.setTimeout(function() {
|
|
963
963
|
throw n;
|
|
964
964
|
});
|
|
965
965
|
}
|
|
966
966
|
function ge() {
|
|
967
967
|
}
|
|
968
|
-
function
|
|
968
|
+
function ut(n) {
|
|
969
969
|
n();
|
|
970
970
|
}
|
|
971
971
|
var ne = function(n) {
|
|
@@ -1000,7 +1000,7 @@ var ne = function(n) {
|
|
|
1000
1000
|
}
|
|
1001
1001
|
}, t;
|
|
1002
1002
|
}(re), at = Function.prototype.bind;
|
|
1003
|
-
function
|
|
1003
|
+
function z(n, t) {
|
|
1004
1004
|
return at.call(n, t);
|
|
1005
1005
|
}
|
|
1006
1006
|
var lt = function() {
|
|
@@ -1013,7 +1013,7 @@ var lt = function() {
|
|
|
1013
1013
|
try {
|
|
1014
1014
|
e.next(t);
|
|
1015
1015
|
} catch (r) {
|
|
1016
|
-
|
|
1016
|
+
O(r);
|
|
1017
1017
|
}
|
|
1018
1018
|
}, n.prototype.error = function(t) {
|
|
1019
1019
|
var e = this.partialObserver;
|
|
@@ -1021,17 +1021,17 @@ var lt = function() {
|
|
|
1021
1021
|
try {
|
|
1022
1022
|
e.error(t);
|
|
1023
1023
|
} catch (r) {
|
|
1024
|
-
|
|
1024
|
+
O(r);
|
|
1025
1025
|
}
|
|
1026
1026
|
else
|
|
1027
|
-
|
|
1027
|
+
O(t);
|
|
1028
1028
|
}, n.prototype.complete = function() {
|
|
1029
1029
|
var t = this.partialObserver;
|
|
1030
1030
|
if (t.complete)
|
|
1031
1031
|
try {
|
|
1032
1032
|
t.complete();
|
|
1033
1033
|
} catch (e) {
|
|
1034
|
-
|
|
1034
|
+
O(e);
|
|
1035
1035
|
}
|
|
1036
1036
|
}, n;
|
|
1037
1037
|
}(), X = function(n) {
|
|
@@ -1045,21 +1045,21 @@ var lt = function() {
|
|
|
1045
1045
|
complete: i ?? void 0
|
|
1046
1046
|
};
|
|
1047
1047
|
else {
|
|
1048
|
-
var
|
|
1049
|
-
o &&
|
|
1048
|
+
var u;
|
|
1049
|
+
o && Ae.useDeprecatedNextContext ? (u = Object.create(e), u.unsubscribe = function() {
|
|
1050
1050
|
return o.unsubscribe();
|
|
1051
1051
|
}, s = {
|
|
1052
|
-
next: e.next &&
|
|
1053
|
-
error: e.error &&
|
|
1054
|
-
complete: e.complete &&
|
|
1052
|
+
next: e.next && z(e.next, u),
|
|
1053
|
+
error: e.error && z(e.error, u),
|
|
1054
|
+
complete: e.complete && z(e.complete, u)
|
|
1055
1055
|
}) : s = e;
|
|
1056
1056
|
}
|
|
1057
1057
|
return o.destination = new lt(s), o;
|
|
1058
1058
|
}
|
|
1059
1059
|
return t;
|
|
1060
1060
|
}(ne);
|
|
1061
|
-
function
|
|
1062
|
-
|
|
1061
|
+
function O(n) {
|
|
1062
|
+
ct(n);
|
|
1063
1063
|
}
|
|
1064
1064
|
function ht(n) {
|
|
1065
1065
|
throw n;
|
|
@@ -1090,10 +1090,10 @@ var gt = function() {
|
|
|
1090
1090
|
var e = new n();
|
|
1091
1091
|
return e.source = this, e.operator = t, e;
|
|
1092
1092
|
}, n.prototype.subscribe = function(t, e, r) {
|
|
1093
|
-
var i = this, o =
|
|
1094
|
-
return
|
|
1095
|
-
var s = i,
|
|
1096
|
-
o.add(
|
|
1093
|
+
var i = this, o = yt(t) ? t : new X(t, e, r);
|
|
1094
|
+
return ut(function() {
|
|
1095
|
+
var s = i, u = s.operator, c = s.source;
|
|
1096
|
+
o.add(u ? u.call(o, c) : c ? i._subscribe(o) : i._trySubscribe(o));
|
|
1097
1097
|
}), o;
|
|
1098
1098
|
}, n.prototype._trySubscribe = function(t) {
|
|
1099
1099
|
try {
|
|
@@ -1105,11 +1105,11 @@ var gt = function() {
|
|
|
1105
1105
|
var r = this;
|
|
1106
1106
|
return e = ve(e), new e(function(i, o) {
|
|
1107
1107
|
var s = new X({
|
|
1108
|
-
next: function(
|
|
1108
|
+
next: function(u) {
|
|
1109
1109
|
try {
|
|
1110
|
-
t(
|
|
1111
|
-
} catch (
|
|
1112
|
-
o(
|
|
1110
|
+
t(u);
|
|
1111
|
+
} catch (c) {
|
|
1112
|
+
o(c), s.unsubscribe();
|
|
1113
1113
|
}
|
|
1114
1114
|
},
|
|
1115
1115
|
error: o,
|
|
@@ -1144,28 +1144,28 @@ var gt = function() {
|
|
|
1144
1144
|
}();
|
|
1145
1145
|
function ve(n) {
|
|
1146
1146
|
var t;
|
|
1147
|
-
return (t = n ??
|
|
1147
|
+
return (t = n ?? Ae.Promise) !== null && t !== void 0 ? t : Promise;
|
|
1148
1148
|
}
|
|
1149
1149
|
function vt(n) {
|
|
1150
1150
|
return n && w(n.next) && w(n.error) && w(n.complete);
|
|
1151
1151
|
}
|
|
1152
|
-
function
|
|
1152
|
+
function yt(n) {
|
|
1153
1153
|
return n && n instanceof ne || vt(n) && Ie(n);
|
|
1154
1154
|
}
|
|
1155
1155
|
function N(n, t, e, r, i) {
|
|
1156
|
-
return new
|
|
1156
|
+
return new bt(n, t, e, r, i);
|
|
1157
1157
|
}
|
|
1158
|
-
var
|
|
1158
|
+
var bt = function(n) {
|
|
1159
1159
|
te(t, n);
|
|
1160
|
-
function t(e, r, i, o, s,
|
|
1161
|
-
var
|
|
1162
|
-
return
|
|
1160
|
+
function t(e, r, i, o, s, u) {
|
|
1161
|
+
var c = n.call(this, e) || this;
|
|
1162
|
+
return c.onFinalize = s, c.shouldUnsubscribe = u, c._next = r ? function(a) {
|
|
1163
1163
|
try {
|
|
1164
1164
|
r(a);
|
|
1165
1165
|
} catch (g) {
|
|
1166
1166
|
e.error(g);
|
|
1167
1167
|
}
|
|
1168
|
-
} : n.prototype._next,
|
|
1168
|
+
} : n.prototype._next, c._error = o ? function(a) {
|
|
1169
1169
|
try {
|
|
1170
1170
|
o(a);
|
|
1171
1171
|
} catch (g) {
|
|
@@ -1173,7 +1173,7 @@ var yt = function(n) {
|
|
|
1173
1173
|
} finally {
|
|
1174
1174
|
this.unsubscribe();
|
|
1175
1175
|
}
|
|
1176
|
-
} : n.prototype._error,
|
|
1176
|
+
} : n.prototype._error, c._complete = i ? function() {
|
|
1177
1177
|
try {
|
|
1178
1178
|
i();
|
|
1179
1179
|
} catch (a) {
|
|
@@ -1181,7 +1181,7 @@ var yt = function(n) {
|
|
|
1181
1181
|
} finally {
|
|
1182
1182
|
this.unsubscribe();
|
|
1183
1183
|
}
|
|
1184
|
-
} : n.prototype._complete,
|
|
1184
|
+
} : n.prototype._complete, c;
|
|
1185
1185
|
}
|
|
1186
1186
|
return t.prototype.unsubscribe = function() {
|
|
1187
1187
|
var e;
|
|
@@ -1192,7 +1192,7 @@ var yt = function(n) {
|
|
|
1192
1192
|
}, t;
|
|
1193
1193
|
}(ne);
|
|
1194
1194
|
function h(n, t) {
|
|
1195
|
-
return
|
|
1195
|
+
return F(function(e, r) {
|
|
1196
1196
|
var i = 0;
|
|
1197
1197
|
e.subscribe(N(r, function(o) {
|
|
1198
1198
|
r.next(n.call(t, o, i++));
|
|
@@ -1205,7 +1205,7 @@ var mt = new gt(function(n) {
|
|
|
1205
1205
|
function m(n) {
|
|
1206
1206
|
return n <= 0 ? function() {
|
|
1207
1207
|
return mt;
|
|
1208
|
-
} :
|
|
1208
|
+
} : F(function(t, e) {
|
|
1209
1209
|
var r = 0;
|
|
1210
1210
|
t.subscribe(N(e, function(i) {
|
|
1211
1211
|
++r <= n && (e.next(i), n <= r && e.complete());
|
|
@@ -1213,7 +1213,7 @@ function m(n) {
|
|
|
1213
1213
|
});
|
|
1214
1214
|
}
|
|
1215
1215
|
function f(n, t) {
|
|
1216
|
-
return
|
|
1216
|
+
return F(function(e, r) {
|
|
1217
1217
|
var i = 0;
|
|
1218
1218
|
e.subscribe(N(r, function(o) {
|
|
1219
1219
|
return n.call(t, o, i++) && r.next(o);
|
|
@@ -1222,22 +1222,22 @@ function f(n, t) {
|
|
|
1222
1222
|
}
|
|
1223
1223
|
function p(n, t, e) {
|
|
1224
1224
|
var r = w(n) || t || e ? { next: n, error: t, complete: e } : n;
|
|
1225
|
-
return r ?
|
|
1225
|
+
return r ? F(function(i, o) {
|
|
1226
1226
|
var s;
|
|
1227
1227
|
(s = r.subscribe) === null || s === void 0 || s.call(r);
|
|
1228
|
-
var
|
|
1229
|
-
i.subscribe(N(o, function(
|
|
1228
|
+
var u = !0;
|
|
1229
|
+
i.subscribe(N(o, function(c) {
|
|
1230
1230
|
var a;
|
|
1231
|
-
(a = r.next) === null || a === void 0 || a.call(r,
|
|
1231
|
+
(a = r.next) === null || a === void 0 || a.call(r, c), o.next(c);
|
|
1232
1232
|
}, function() {
|
|
1233
|
-
var
|
|
1234
|
-
|
|
1235
|
-
}, function(
|
|
1233
|
+
var c;
|
|
1234
|
+
u = !1, (c = r.complete) === null || c === void 0 || c.call(r), o.complete();
|
|
1235
|
+
}, function(c) {
|
|
1236
1236
|
var a;
|
|
1237
|
-
|
|
1237
|
+
u = !1, (a = r.error) === null || a === void 0 || a.call(r, c), o.error(c);
|
|
1238
1238
|
}, function() {
|
|
1239
|
-
var
|
|
1240
|
-
|
|
1239
|
+
var c, a;
|
|
1240
|
+
u && ((c = r.unsubscribe) === null || c === void 0 || c.call(r)), (a = r.finalize) === null || a === void 0 || a.call(r);
|
|
1241
1241
|
}));
|
|
1242
1242
|
}) : Te;
|
|
1243
1243
|
}
|
|
@@ -1250,12 +1250,12 @@ function St(n) {
|
|
|
1250
1250
|
}
|
|
1251
1251
|
throw new nt(n);
|
|
1252
1252
|
}
|
|
1253
|
-
function
|
|
1253
|
+
function ye(n) {
|
|
1254
1254
|
const t = St(n), [e, r] = t.split("."), [i, o] = [parseInt(e), parseInt(r)];
|
|
1255
1255
|
return [i, o];
|
|
1256
1256
|
}
|
|
1257
1257
|
function ie(n, t) {
|
|
1258
|
-
const [e, r] =
|
|
1258
|
+
const [e, r] = ye(n), [i, o] = ye(t);
|
|
1259
1259
|
return e < i ? -1 : e > i ? 1 : r < o ? -1 : r > o ? 1 : 0;
|
|
1260
1260
|
}
|
|
1261
1261
|
function Et(n, t) {
|
|
@@ -1264,7 +1264,7 @@ function Et(n, t) {
|
|
|
1264
1264
|
function Ct(n, t) {
|
|
1265
1265
|
return ie(n, t) >= 0;
|
|
1266
1266
|
}
|
|
1267
|
-
const
|
|
1267
|
+
const be = "2.0";
|
|
1268
1268
|
class xt {
|
|
1269
1269
|
/**
|
|
1270
1270
|
* Create a new instance of the {@link IpcHelper | IPC Protocol Helper}.
|
|
@@ -1276,8 +1276,8 @@ class xt {
|
|
|
1276
1276
|
* @param logService - An instance of a logging service or utility
|
|
1277
1277
|
*/
|
|
1278
1278
|
constructor(t, e) {
|
|
1279
|
-
if (C(this, "negotiatedProtocolVersion"), C(this, "currentContext"), C(this, "incomingMessages$"), C(this, "inIframe", !1), C(this, "embeddedResult"), C(this, "iframePort1"), C(this, "iframePort2"), this.supportedVersions = t, this.logService = e, this.incomingMessages$ = new Me(), this.supportedVersions = t.filter((r) => Ct(r,
|
|
1280
|
-
throw new he(t,
|
|
1279
|
+
if (C(this, "negotiatedProtocolVersion"), C(this, "currentContext"), C(this, "incomingMessages$"), C(this, "inIframe", !1), C(this, "embeddedResult"), C(this, "iframePort1"), C(this, "iframePort2"), this.supportedVersions = t, this.logService = e, this.incomingMessages$ = new Me(), this.supportedVersions = t.filter((r) => Ct(r, be)), !this.supportedVersions.length)
|
|
1280
|
+
throw new he(t, be);
|
|
1281
1281
|
this.negotiatedProtocolVersion = this.supportedVersions[0], this.embeddedResult = null, this.iframePort2 = null;
|
|
1282
1282
|
}
|
|
1283
1283
|
get parent() {
|
|
@@ -1389,11 +1389,11 @@ class xt {
|
|
|
1389
1389
|
displayName: i,
|
|
1390
1390
|
jwtToken: o,
|
|
1391
1391
|
serverUrl: s,
|
|
1392
|
-
region:
|
|
1393
|
-
joinMicMuted:
|
|
1392
|
+
region: u,
|
|
1393
|
+
joinMicMuted: c,
|
|
1394
1394
|
joinWithoutCamera: a
|
|
1395
1395
|
} = t, g = "JOINING ROOM", v = this.createMessage(g, !1);
|
|
1396
|
-
v.roomName = e, v.jwtToken = o, v.serverUrl = s, v.region =
|
|
1396
|
+
v.roomName = e, v.jwtToken = o, v.serverUrl = s, v.region = u, v.roomInvite = r, v.joinMicMuted = c ?? !1, v.joinWithoutCamera = a ?? !1, v.displayName = i, this.logCreated(g, v), this.port2.postMessage(v), this.logSent(g, v);
|
|
1397
1397
|
}
|
|
1398
1398
|
/**
|
|
1399
1399
|
* Sends a {@link LeavingRoomMessage} lifecycle message to the Host app.
|
|
@@ -1553,10 +1553,10 @@ class xt {
|
|
|
1553
1553
|
const i = "LAYOUT CHANGE";
|
|
1554
1554
|
let o, s;
|
|
1555
1555
|
if (e && r ? (o = this.createMessage(i, !1, r), o.result = e) : (o = this.createMessage(i), s = this.incomingMessages$.pipe(
|
|
1556
|
-
f((
|
|
1557
|
-
h((
|
|
1556
|
+
f((u) => u.type === i && u.replyTo === o.id),
|
|
1557
|
+
h((u) => u),
|
|
1558
1558
|
p(this.logReceived(i)),
|
|
1559
|
-
h((
|
|
1559
|
+
h((u) => u),
|
|
1560
1560
|
m(1)
|
|
1561
1561
|
), this.logService.debug(`Created ${i} Reply handler`)), o.layout = t, this.logCreated(i, o), this.port2.postMessage(o), this.logSent(i, o), s)
|
|
1562
1562
|
return s;
|
|
@@ -1627,32 +1627,32 @@ class xt {
|
|
|
1627
1627
|
if (!this.isEmbedded())
|
|
1628
1628
|
throw new l(this.currentContext);
|
|
1629
1629
|
if (e === "group" && i === void 0)
|
|
1630
|
-
throw new
|
|
1630
|
+
throw new $(
|
|
1631
1631
|
"currentContacts",
|
|
1632
1632
|
i,
|
|
1633
1633
|
"currentContacts is required for group streams"
|
|
1634
1634
|
);
|
|
1635
1635
|
if (e === "direct" && i !== void 0)
|
|
1636
|
-
throw new
|
|
1636
|
+
throw new $(
|
|
1637
1637
|
"currentContacts",
|
|
1638
1638
|
i,
|
|
1639
1639
|
"currentContacts should not be passed for direct streams"
|
|
1640
1640
|
);
|
|
1641
1641
|
const o = "SELECT CONTACTS", s = this.createMessage(o, !0);
|
|
1642
1642
|
s.streamType = e, s.streamId = t, s.contactType = r, s.currentContacts = i, this.logCreated(o, s);
|
|
1643
|
-
const
|
|
1644
|
-
f((
|
|
1643
|
+
const u = this.incomingMessages$.pipe(
|
|
1644
|
+
f((c) => c.type === o && c.replyTo === s.id),
|
|
1645
1645
|
p(this.logReceived(o)),
|
|
1646
1646
|
// validate if `streamId` is the same as we sent
|
|
1647
|
-
h((
|
|
1648
|
-
const a =
|
|
1647
|
+
h((c) => {
|
|
1648
|
+
const a = c;
|
|
1649
1649
|
if (a.streamId !== t)
|
|
1650
1650
|
throw new rt(a.streamId, t);
|
|
1651
1651
|
return e === "direct" && a.contacts.length > 1 && (a.contacts = [a.contacts[0]]), a;
|
|
1652
1652
|
}),
|
|
1653
1653
|
m(1)
|
|
1654
1654
|
);
|
|
1655
|
-
return this.logService.debug(`Created ${o} Reply handler`), this.port2.postMessage(s), this.logSent(o, s),
|
|
1655
|
+
return this.logService.debug(`Created ${o} Reply handler`), this.port2.postMessage(s), this.logSent(o, s), u;
|
|
1656
1656
|
}
|
|
1657
1657
|
/**
|
|
1658
1658
|
* Request detailed contact information for the given Cloud usernames.
|
|
@@ -1666,7 +1666,7 @@ class xt {
|
|
|
1666
1666
|
if (!this.isEmbedded())
|
|
1667
1667
|
throw new l(this.currentContext);
|
|
1668
1668
|
if (!t.length)
|
|
1669
|
-
throw new
|
|
1669
|
+
throw new $("contacts", t, "At least one contact is required");
|
|
1670
1670
|
const e = "MATCH CONTACTS", r = this.createMessage(e);
|
|
1671
1671
|
r.contacts = [...t], this.logCreated(e, r);
|
|
1672
1672
|
const i = this.incomingMessages$.pipe(
|
|
@@ -1770,27 +1770,6 @@ class xt {
|
|
|
1770
1770
|
const i = "BADGE UPDATE", o = this.createMessage(i, !1, r);
|
|
1771
1771
|
o.count = t, o.activity = e ?? !1, this.logCreated(i, o), this.port2.postMessage(o), this.logSent(i, o);
|
|
1772
1772
|
}
|
|
1773
|
-
/**
|
|
1774
|
-
* Setup listener for {@link HostInForegroundMessage}, which can be sent by a `Host` app to
|
|
1775
|
-
* notify the `Client` app that it is now in the foreground.
|
|
1776
|
-
*
|
|
1777
|
-
* @remarks
|
|
1778
|
-
* This message has no data in it's payload apart from the basic message definition. It can be
|
|
1779
|
-
* used by client apps to refresh and sync their state.
|
|
1780
|
-
*
|
|
1781
|
-
* @returns An observable that emits whenever {@link HostInForegroundMessage} is received so it
|
|
1782
|
-
* can be subscribed to indefinitely.
|
|
1783
|
-
*/
|
|
1784
|
-
onHostInForegroundMessage() {
|
|
1785
|
-
if (!this.isEmbedded())
|
|
1786
|
-
throw new l(this.currentContext);
|
|
1787
|
-
const t = "HOST IN FOREGROUND";
|
|
1788
|
-
return this.incomingMessages$.pipe(
|
|
1789
|
-
f((e) => e.type === t && e.target === "client"),
|
|
1790
|
-
h((e) => e),
|
|
1791
|
-
p(this.logReceived(t))
|
|
1792
|
-
);
|
|
1793
|
-
}
|
|
1794
1773
|
/**
|
|
1795
1774
|
* Sends a {@link LifecycleMessage} to the Host app, to notify it of a lifecycle event.
|
|
1796
1775
|
*
|
|
@@ -1982,13 +1961,13 @@ class xt {
|
|
|
1982
1961
|
throw new l(this.currentContext);
|
|
1983
1962
|
const o = "FILE DOWNLOAD", s = this.createMessage(o);
|
|
1984
1963
|
s.url = t, s.key = e, s.fileName = r, s.mimeType = i, this.logCreated(o, s);
|
|
1985
|
-
const
|
|
1986
|
-
f((
|
|
1964
|
+
const u = this.incomingMessages$.pipe(
|
|
1965
|
+
f((c) => c.type === o && c.replyTo === s.id),
|
|
1987
1966
|
p(this.logReceived(o)),
|
|
1988
|
-
h((
|
|
1967
|
+
h((c) => c),
|
|
1989
1968
|
m(1)
|
|
1990
1969
|
);
|
|
1991
|
-
return this.port2.postMessage(s), this.logSent(o, s),
|
|
1970
|
+
return this.port2.postMessage(s), this.logSent(o, s), u;
|
|
1992
1971
|
}
|
|
1993
1972
|
sendFileUploadMessage() {
|
|
1994
1973
|
throw new Error("Not implemented");
|
|
@@ -2005,6 +1984,25 @@ class xt {
|
|
|
2005
1984
|
const e = "FILE OPEN", r = this.createMessage(e, !1);
|
|
2006
1985
|
r.fileId = t, this.logCreated(e, r), this.port2.postMessage(r), this.logSent(e, r);
|
|
2007
1986
|
}
|
|
1987
|
+
/**
|
|
1988
|
+
* Sends a {@link AppResetMessage} to the Host app, to request logging out the user and resetting
|
|
1989
|
+
* the app to it's initial state.
|
|
1990
|
+
*
|
|
1991
|
+
* @remarks
|
|
1992
|
+
* This message is used to request the Host app to log out the user and reset the app to it's
|
|
1993
|
+
* initial state. This is useful when the user wants to log out of the app and log in with a
|
|
1994
|
+
* different account.
|
|
1995
|
+
*
|
|
1996
|
+
* The Host can confirm the user's intention to reset the app by displaying a confirmation dialog.
|
|
1997
|
+
*
|
|
1998
|
+
* @returns This method returns void.
|
|
1999
|
+
*/
|
|
2000
|
+
sendAppResetMessage() {
|
|
2001
|
+
if (!this.isEmbedded())
|
|
2002
|
+
throw new l(this.currentContext);
|
|
2003
|
+
const t = "APP RESET", e = this.createMessage(t, !1);
|
|
2004
|
+
this.logCreated(t, e), this.port2.postMessage(e), this.logSent(t, e);
|
|
2005
|
+
}
|
|
2008
2006
|
/**
|
|
2009
2007
|
* Checks if the client app is either embedded in an iframe or in a native webview.
|
|
2010
2008
|
*
|
|
@@ -2111,7 +2109,7 @@ class It {
|
|
|
2111
2109
|
M(this, "logger");
|
|
2112
2110
|
M(this, "helper");
|
|
2113
2111
|
M(this, "listeners");
|
|
2114
|
-
this.logger = t ?? console, this.helper = new xt(Mt, this.logger), this.listeners = /* @__PURE__ */ new Map(), this.listeners.set(E.BadgeQuery, /* @__PURE__ */ new Set()), this.listeners.set(E.
|
|
2112
|
+
this.logger = t ?? console, this.helper = new xt(Mt, this.logger), this.listeners = /* @__PURE__ */ new Map(), this.listeners.set(E.BadgeQuery, /* @__PURE__ */ new Set()), this.listeners.set(E.Lifecycle, /* @__PURE__ */ new Set());
|
|
2115
2113
|
}
|
|
2116
2114
|
/**
|
|
2117
2115
|
* Returns whether the app is running inside a native WebView (`host` context) or as a
|
|
@@ -2138,7 +2136,7 @@ class It {
|
|
|
2138
2136
|
* @returns A promise with {@link IPCContext} the app is running under.
|
|
2139
2137
|
*/
|
|
2140
2138
|
async determineContext() {
|
|
2141
|
-
const t = await
|
|
2139
|
+
const t = await A(this.helper.determineContext(), {
|
|
2142
2140
|
defaultValue: "guest"
|
|
2143
2141
|
});
|
|
2144
2142
|
return this.evaluateContext(t);
|
|
@@ -2147,7 +2145,7 @@ class It {
|
|
|
2147
2145
|
* Initiates the IPC handshake with the `Host` app.
|
|
2148
2146
|
*/
|
|
2149
2147
|
initiateConnection() {
|
|
2150
|
-
return
|
|
2148
|
+
return A(
|
|
2151
2149
|
this.helper.openBridge().pipe(
|
|
2152
2150
|
Ze((t) => {
|
|
2153
2151
|
this.helper.onBadgeQueryMessage().subscribe((e) => {
|
|
@@ -2155,14 +2153,14 @@ class It {
|
|
|
2155
2153
|
this.logger.debug("Received Badge Query: ", e);
|
|
2156
2154
|
for (const i of ((r = this.listeners.get(E.BadgeQuery)) == null ? void 0 : r.values()) ?? [])
|
|
2157
2155
|
i();
|
|
2158
|
-
}), this.helper.
|
|
2156
|
+
}), this.helper.onLifecycleMessage().subscribe((e) => {
|
|
2159
2157
|
var r;
|
|
2160
|
-
this.logger.debug("Received
|
|
2161
|
-
for (const i of ((r = this.listeners.get(E.
|
|
2162
|
-
i();
|
|
2158
|
+
this.logger.debug("Received Lifecycle Event: ", e);
|
|
2159
|
+
for (const i of ((r = this.listeners.get(E.Lifecycle)) == null ? void 0 : r.values()) ?? [])
|
|
2160
|
+
i(e.eventName, e.payload);
|
|
2163
2161
|
}), this.cloudId = t.cloudId, this.host = t.host;
|
|
2164
2162
|
}),
|
|
2165
|
-
|
|
2163
|
+
P(() => {
|
|
2166
2164
|
})
|
|
2167
2165
|
)
|
|
2168
2166
|
);
|
|
@@ -2172,7 +2170,7 @@ class It {
|
|
|
2172
2170
|
let o;
|
|
2173
2171
|
if (e === "multi") {
|
|
2174
2172
|
if (!r || !Array.isArray(r))
|
|
2175
|
-
throw new
|
|
2173
|
+
throw new $(
|
|
2176
2174
|
"currentContacts",
|
|
2177
2175
|
r,
|
|
2178
2176
|
"currentContacts is required for group streams"
|
|
@@ -2185,7 +2183,7 @@ class It {
|
|
|
2185
2183
|
);
|
|
2186
2184
|
} else
|
|
2187
2185
|
r ? i = r : i = "cloudUsername", o = this.helper.selectContacts(t.toString(), "direct", i);
|
|
2188
|
-
return
|
|
2186
|
+
return A(o.pipe(P((s) => s.contacts)));
|
|
2189
2187
|
}
|
|
2190
2188
|
/**
|
|
2191
2189
|
* Matches batch of {@link ContactItem} objects against the Host's contact list to fetch detailed
|
|
@@ -2197,7 +2195,7 @@ class It {
|
|
|
2197
2195
|
* Host's contact list.
|
|
2198
2196
|
*/
|
|
2199
2197
|
matchContacts(t) {
|
|
2200
|
-
return this.logger.debug("Match Contacts: ", t),
|
|
2198
|
+
return this.logger.debug("Match Contacts: ", t), A(this.helper.matchContacts(t).pipe(P((e) => e.contacts)));
|
|
2201
2199
|
}
|
|
2202
2200
|
/**
|
|
2203
2201
|
* Requests the `Host` app to provide the Push Token for the current device.
|
|
@@ -2205,7 +2203,7 @@ class It {
|
|
|
2205
2203
|
* @returns A promise with the Push Token as `string`.
|
|
2206
2204
|
*/
|
|
2207
2205
|
requestPushToken() {
|
|
2208
|
-
return this.logger.debug("Requesting Push Token"),
|
|
2206
|
+
return this.logger.debug("Requesting Push Token"), A(this.helper.requestPushToken().pipe(P((t) => t.pushToken)));
|
|
2209
2207
|
}
|
|
2210
2208
|
/**
|
|
2211
2209
|
* Sends the current badge count to the `Host` app.
|
|
@@ -2216,6 +2214,16 @@ class It {
|
|
|
2216
2214
|
badgeUpdate(t, e = !1) {
|
|
2217
2215
|
this.logger.debug(`Sending Badge Update, count: ${t}, activity: ${e}`), this.helper.sendBadgeUpdateMessage(t, e);
|
|
2218
2216
|
}
|
|
2217
|
+
/**
|
|
2218
|
+
* Requests the `Host` app to reset the app and log out the user.
|
|
2219
|
+
*
|
|
2220
|
+
* @remarks
|
|
2221
|
+
* For added security, the Host can confirm the user's intention to reset the app by displaying
|
|
2222
|
+
* a confirmation dialog. The user can decide to cancel the reset operation.
|
|
2223
|
+
*/
|
|
2224
|
+
requestAppReset() {
|
|
2225
|
+
this.logger.debug("Requesting App Reset"), this.helper.sendAppResetMessage();
|
|
2226
|
+
}
|
|
2219
2227
|
/**
|
|
2220
2228
|
* Registers a callback to be invoked when a {@link IPCEvents.BadgeQuery} is received.
|
|
2221
2229
|
*
|
|
@@ -2231,17 +2239,22 @@ class It {
|
|
|
2231
2239
|
};
|
|
2232
2240
|
}
|
|
2233
2241
|
/**
|
|
2234
|
-
* Registers a callback to be invoked when a {@link IPCEvents.
|
|
2242
|
+
* Registers a callback to be invoked when a {@link IPCEvents.Lifecycle} event is received.
|
|
2243
|
+
*
|
|
2244
|
+
* @remarks
|
|
2245
|
+
* The `eventName` and `payload` are defined by the `Host` app and can vary for each LIFECYCLE
|
|
2246
|
+
* event. The payload can be an empty object for events without any additional data.
|
|
2247
|
+
*
|
|
2248
|
+
* @param callback - A callback function to be invoked when a {@link IPCEvents.Lifecycle} event
|
|
2249
|
+
* is received.
|
|
2235
2250
|
*
|
|
2236
|
-
* @param callback - A callback function to be invoked when a {@link IPCEvents.HostInForeground}
|
|
2237
|
-
* event is received.
|
|
2238
2251
|
* @returns An unsubscribe callback to remove the listener.
|
|
2239
2252
|
*/
|
|
2240
|
-
|
|
2253
|
+
onLifecycleEvent(t) {
|
|
2241
2254
|
var e;
|
|
2242
|
-
return this.logger.debug("Registering for
|
|
2255
|
+
return this.logger.debug("Registering for Lifecycle Event"), (e = this.listeners.get(E.Lifecycle)) == null || e.add(t), () => {
|
|
2243
2256
|
var r;
|
|
2244
|
-
return (r = this.listeners.get(E.
|
|
2257
|
+
return (r = this.listeners.get(E.Lifecycle)) == null ? void 0 : r.delete(t);
|
|
2245
2258
|
};
|
|
2246
2259
|
}
|
|
2247
2260
|
evaluateContext(t) {
|