@acrobits/ipc-sdk 0.6.0 → 0.6.2
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/docs/interfaces/UriContactItem.html +3 -3
- package/docs/types/HostType.html +1 -1
- package/docs/types/IpcProtocolVersion.html +1 -1
- package/lib/ipc-sdk.js +178 -176
- 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/package.json +2 -2
package/lib/ipc-sdk.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var
|
|
2
|
-
var Ae = (n, t, e) => t in n ?
|
|
1
|
+
var Pe = Object.defineProperty;
|
|
2
|
+
var Ae = (n, t, e) => t in n ? Pe(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
|
|
3
3
|
var x = (n, t, e) => (Ae(n, typeof t != "symbol" ? t + "" : t, e), e);
|
|
4
4
|
var b = /* @__PURE__ */ ((n) => (n.BadgeQuery = "BADGE QUERY", n.Lifecycle = "LIFECYCLE", n.PushToken = "PUSH TOKEN", n))(b || {}), z = function(n, t) {
|
|
5
5
|
return z = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, r) {
|
|
@@ -30,7 +30,7 @@ function Q(n) {
|
|
|
30
30
|
};
|
|
31
31
|
throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function _(n, t) {
|
|
34
34
|
var e = typeof Symbol == "function" && n[Symbol.iterator];
|
|
35
35
|
if (!e)
|
|
36
36
|
return n;
|
|
@@ -38,8 +38,8 @@ function T(n, t) {
|
|
|
38
38
|
try {
|
|
39
39
|
for (; (t === void 0 || t-- > 0) && !(i = r.next()).done; )
|
|
40
40
|
s.push(i.value);
|
|
41
|
-
} catch (
|
|
42
|
-
o = { error:
|
|
41
|
+
} catch (c) {
|
|
42
|
+
o = { error: c };
|
|
43
43
|
} finally {
|
|
44
44
|
try {
|
|
45
45
|
i && !i.done && (e = r.return) && e.call(r);
|
|
@@ -80,7 +80,7 @@ function U(n, t) {
|
|
|
80
80
|
0 <= e && n.splice(e, 1);
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
-
var
|
|
83
|
+
var P = function() {
|
|
84
84
|
function n(t) {
|
|
85
85
|
this.initialTeardown = t, this.closed = !1, this._parentage = null, this._finalizers = null;
|
|
86
86
|
}
|
|
@@ -92,15 +92,15 @@ var R = function() {
|
|
|
92
92
|
if (o)
|
|
93
93
|
if (this._parentage = null, Array.isArray(o))
|
|
94
94
|
try {
|
|
95
|
-
for (var
|
|
96
|
-
var u =
|
|
95
|
+
for (var c = Q(o), a = c.next(); !a.done; a = c.next()) {
|
|
96
|
+
var u = a.value;
|
|
97
97
|
u.remove(this);
|
|
98
98
|
}
|
|
99
99
|
} catch (p) {
|
|
100
100
|
t = { error: p };
|
|
101
101
|
} finally {
|
|
102
102
|
try {
|
|
103
|
-
|
|
103
|
+
a && !a.done && (e = c.return) && e.call(c);
|
|
104
104
|
} finally {
|
|
105
105
|
if (t)
|
|
106
106
|
throw t.error;
|
|
@@ -124,7 +124,7 @@ var R = function() {
|
|
|
124
124
|
try {
|
|
125
125
|
se(j);
|
|
126
126
|
} catch (p) {
|
|
127
|
-
s = s ?? [], p instanceof D ? s = I(I([],
|
|
127
|
+
s = s ?? [], p instanceof D ? s = I(I([], _(s)), _(p.errors)) : s.push(p);
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
} catch (p) {
|
|
@@ -170,9 +170,9 @@ var R = function() {
|
|
|
170
170
|
var t = new n();
|
|
171
171
|
return t.closed = !0, t;
|
|
172
172
|
}(), n;
|
|
173
|
-
}(), me =
|
|
173
|
+
}(), me = P.EMPTY;
|
|
174
174
|
function we(n) {
|
|
175
|
-
return n instanceof
|
|
175
|
+
return n instanceof P || n && "closed" in n && m(n.remove) && m(n.add) && m(n.unsubscribe);
|
|
176
176
|
}
|
|
177
177
|
function se(n) {
|
|
178
178
|
m(n) ? n() : n.unsubscribe();
|
|
@@ -188,7 +188,7 @@ var Se = {
|
|
|
188
188
|
for (var e = [], r = 2; r < arguments.length; r++)
|
|
189
189
|
e[r - 2] = arguments[r];
|
|
190
190
|
var i = Y.delegate;
|
|
191
|
-
return i != null && i.setTimeout ? i.setTimeout.apply(i, I([n, t],
|
|
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
194
|
var t = Y.delegate;
|
|
@@ -210,10 +210,10 @@ var ee = function(n) {
|
|
|
210
210
|
M(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 = Fe, r;
|
|
214
214
|
}
|
|
215
215
|
return t.create = function(e, r, i) {
|
|
216
|
-
return new
|
|
216
|
+
return new F(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,7 +237,7 @@ var ee = function(n) {
|
|
|
237
237
|
this.unsubscribe();
|
|
238
238
|
}
|
|
239
239
|
}, t;
|
|
240
|
-
}(
|
|
240
|
+
}(P), Le = Function.prototype.bind;
|
|
241
241
|
function q(n, t) {
|
|
242
242
|
return Le.call(n, t);
|
|
243
243
|
}
|
|
@@ -272,7 +272,7 @@ var $e = function() {
|
|
|
272
272
|
A(e);
|
|
273
273
|
}
|
|
274
274
|
}, n;
|
|
275
|
-
}(),
|
|
275
|
+
}(), F = function(n) {
|
|
276
276
|
M(t, n);
|
|
277
277
|
function t(e, r, i) {
|
|
278
278
|
var s = n.call(this) || this, o;
|
|
@@ -283,13 +283,13 @@ var $e = function() {
|
|
|
283
283
|
complete: i ?? void 0
|
|
284
284
|
};
|
|
285
285
|
else {
|
|
286
|
-
var
|
|
287
|
-
s && Se.useDeprecatedNextContext ? (
|
|
286
|
+
var c;
|
|
287
|
+
s && Se.useDeprecatedNextContext ? (c = Object.create(e), c.unsubscribe = function() {
|
|
288
288
|
return s.unsubscribe();
|
|
289
289
|
}, o = {
|
|
290
|
-
next: e.next && q(e.next,
|
|
291
|
-
error: e.error && q(e.error,
|
|
292
|
-
complete: e.complete && q(e.complete,
|
|
290
|
+
next: e.next && q(e.next, c),
|
|
291
|
+
error: e.error && q(e.error, c),
|
|
292
|
+
complete: e.complete && q(e.complete, c)
|
|
293
293
|
}) : o = e;
|
|
294
294
|
}
|
|
295
295
|
return s.destination = new $e(o), s;
|
|
@@ -302,18 +302,18 @@ function A(n) {
|
|
|
302
302
|
function Ue(n) {
|
|
303
303
|
throw n;
|
|
304
304
|
}
|
|
305
|
-
var
|
|
305
|
+
var Fe = {
|
|
306
306
|
closed: !0,
|
|
307
307
|
next: oe,
|
|
308
308
|
error: Ue,
|
|
309
309
|
complete: oe
|
|
310
|
-
},
|
|
310
|
+
}, ke = 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 Ne(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);
|
|
@@ -328,10 +328,10 @@ var G = 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, s = je(t) ? t : new
|
|
331
|
+
var i = this, s = je(t) ? t : new F(t, e, r);
|
|
332
332
|
return $(function() {
|
|
333
|
-
var o = i,
|
|
334
|
-
s.add(
|
|
333
|
+
var o = i, c = o.operator, a = o.source;
|
|
334
|
+
s.add(c ? c.call(s, a) : a ? i._subscribe(s) : i._trySubscribe(s));
|
|
335
335
|
}), s;
|
|
336
336
|
}, n.prototype._trySubscribe = function(t) {
|
|
337
337
|
try {
|
|
@@ -341,13 +341,13 @@ var G = function() {
|
|
|
341
341
|
}
|
|
342
342
|
}, n.prototype.forEach = function(t, e) {
|
|
343
343
|
var r = this;
|
|
344
|
-
return e =
|
|
345
|
-
var o = new
|
|
346
|
-
next: function(
|
|
344
|
+
return e = ae(e), new e(function(i, s) {
|
|
345
|
+
var o = new F({
|
|
346
|
+
next: function(c) {
|
|
347
347
|
try {
|
|
348
|
-
t(
|
|
349
|
-
} catch (
|
|
350
|
-
s(
|
|
348
|
+
t(c);
|
|
349
|
+
} catch (a) {
|
|
350
|
+
s(a), o.unsubscribe();
|
|
351
351
|
}
|
|
352
352
|
},
|
|
353
353
|
error: s,
|
|
@@ -358,15 +358,15 @@ var G = 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[ke] = 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 Ne(t)(this);
|
|
367
367
|
}, n.prototype.toPromise = function(t) {
|
|
368
368
|
var e = this;
|
|
369
|
-
return t =
|
|
369
|
+
return t = ae(t), new t(function(r, i) {
|
|
370
370
|
var s;
|
|
371
371
|
e.subscribe(function(o) {
|
|
372
372
|
return s = o;
|
|
@@ -380,15 +380,15 @@ var G = function() {
|
|
|
380
380
|
return new n(t);
|
|
381
381
|
}, n;
|
|
382
382
|
}();
|
|
383
|
-
function
|
|
383
|
+
function ae(n) {
|
|
384
384
|
var t;
|
|
385
385
|
return (t = n ?? Se.Promise) !== null && t !== void 0 ? t : Promise;
|
|
386
386
|
}
|
|
387
|
-
function
|
|
387
|
+
function Ve(n) {
|
|
388
388
|
return n && m(n.next) && m(n.error) && m(n.complete);
|
|
389
389
|
}
|
|
390
390
|
function je(n) {
|
|
391
|
-
return n && n instanceof ee ||
|
|
391
|
+
return n && n instanceof ee || Ve(n) && we(n);
|
|
392
392
|
}
|
|
393
393
|
function De(n) {
|
|
394
394
|
return m(n == null ? void 0 : n.lift);
|
|
@@ -411,15 +411,15 @@ function Me(n, t, e, r, i) {
|
|
|
411
411
|
}
|
|
412
412
|
var qe = function(n) {
|
|
413
413
|
M(t, n);
|
|
414
|
-
function t(e, r, i, s, o,
|
|
415
|
-
var
|
|
416
|
-
return
|
|
414
|
+
function t(e, r, i, s, o, c) {
|
|
415
|
+
var a = n.call(this, e) || this;
|
|
416
|
+
return a.onFinalize = o, a.shouldUnsubscribe = c, a._next = r ? function(u) {
|
|
417
417
|
try {
|
|
418
418
|
r(u);
|
|
419
419
|
} catch (g) {
|
|
420
420
|
e.error(g);
|
|
421
421
|
}
|
|
422
|
-
} : n.prototype._next,
|
|
422
|
+
} : n.prototype._next, a._error = s ? function(u) {
|
|
423
423
|
try {
|
|
424
424
|
s(u);
|
|
425
425
|
} catch (g) {
|
|
@@ -427,7 +427,7 @@ var qe = function(n) {
|
|
|
427
427
|
} finally {
|
|
428
428
|
this.unsubscribe();
|
|
429
429
|
}
|
|
430
|
-
} : n.prototype._error,
|
|
430
|
+
} : n.prototype._error, a._complete = i ? function() {
|
|
431
431
|
try {
|
|
432
432
|
i();
|
|
433
433
|
} catch (u) {
|
|
@@ -435,7 +435,7 @@ var qe = function(n) {
|
|
|
435
435
|
} finally {
|
|
436
436
|
this.unsubscribe();
|
|
437
437
|
}
|
|
438
|
-
} : n.prototype._complete,
|
|
438
|
+
} : n.prototype._complete, a;
|
|
439
439
|
}
|
|
440
440
|
return t.prototype.unsubscribe = function() {
|
|
441
441
|
var e;
|
|
@@ -455,7 +455,7 @@ var qe = 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 ce(this, this);
|
|
459
459
|
return r.operator = e, r;
|
|
460
460
|
}, t.prototype._throwIfClosed = function() {
|
|
461
461
|
if (this.closed)
|
|
@@ -467,15 +467,15 @@ var qe = function(n) {
|
|
|
467
467
|
if (r._throwIfClosed(), !r.isStopped) {
|
|
468
468
|
r.currentObservers || (r.currentObservers = Array.from(r.observers));
|
|
469
469
|
try {
|
|
470
|
-
for (var o = Q(r.currentObservers),
|
|
471
|
-
var
|
|
472
|
-
|
|
470
|
+
for (var o = Q(r.currentObservers), c = o.next(); !c.done; c = o.next()) {
|
|
471
|
+
var a = c.value;
|
|
472
|
+
a.next(e);
|
|
473
473
|
}
|
|
474
474
|
} catch (u) {
|
|
475
475
|
i = { error: u };
|
|
476
476
|
} finally {
|
|
477
477
|
try {
|
|
478
|
-
|
|
478
|
+
c && !c.done && (s = o.return) && s.call(o);
|
|
479
479
|
} finally {
|
|
480
480
|
if (i)
|
|
481
481
|
throw i.error;
|
|
@@ -515,9 +515,9 @@ var qe = 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, s = i.hasError, o = i.isStopped,
|
|
519
|
-
return s || o ? me : (this.currentObservers = null,
|
|
520
|
-
r.currentObservers = null, U(
|
|
518
|
+
var r = this, i = this, s = i.hasError, o = i.isStopped, c = i.observers;
|
|
519
|
+
return s || o ? me : (this.currentObservers = null, c.push(e), new P(function() {
|
|
520
|
+
r.currentObservers = null, U(c, e);
|
|
521
521
|
}));
|
|
522
522
|
}, t.prototype._checkFinalizedStatuses = function(e) {
|
|
523
523
|
var r = this, i = r.hasError, s = r.thrownError, o = r.isStopped;
|
|
@@ -526,9 +526,9 @@ var qe = function(n) {
|
|
|
526
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 ce(e, r);
|
|
530
530
|
}, t;
|
|
531
|
-
}(G),
|
|
531
|
+
}(G), ce = function(n) {
|
|
532
532
|
M(t, n);
|
|
533
533
|
function t(e, r) {
|
|
534
534
|
var i = n.call(this) || this;
|
|
@@ -547,9 +547,9 @@ var qe = function(n) {
|
|
|
547
547
|
var r, i;
|
|
548
548
|
return (i = (r = this.source) === null || r === void 0 ? void 0 : r.subscribe(e)) !== null && i !== void 0 ? i : me;
|
|
549
549
|
}, t;
|
|
550
|
-
}(xe),
|
|
550
|
+
}(xe), Te = {
|
|
551
551
|
now: function() {
|
|
552
|
-
return (
|
|
552
|
+
return (Te.delegate || Date).now();
|
|
553
553
|
},
|
|
554
554
|
delegate: void 0
|
|
555
555
|
}, He = function(n) {
|
|
@@ -560,15 +560,15 @@ var qe = function(n) {
|
|
|
560
560
|
return t.prototype.schedule = function(e, r) {
|
|
561
561
|
return this;
|
|
562
562
|
}, t;
|
|
563
|
-
}(
|
|
563
|
+
}(P), k = {
|
|
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 =
|
|
568
|
-
return i != null && i.setInterval ? i.setInterval.apply(i, I([n, t],
|
|
567
|
+
var i = k.delegate;
|
|
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 = k.delegate;
|
|
572
572
|
return ((t == null ? void 0 : t.clearInterval) || clearInterval)(n);
|
|
573
573
|
},
|
|
574
574
|
delegate: void 0
|
|
@@ -586,11 +586,11 @@ var qe = function(n) {
|
|
|
586
586
|
var s = this.id, o = this.scheduler;
|
|
587
587
|
return s != null && (this.id = this.recycleAsyncId(o, s, r)), this.pending = !0, this.delay = r, this.id = (i = this.id) !== null && i !== void 0 ? i : this.requestAsyncId(o, 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), k.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 && k.clearInterval(r);
|
|
594
594
|
}, t.prototype.execute = function(e, r) {
|
|
595
595
|
if (this.closed)
|
|
596
596
|
return new Error("executing a cancelled action");
|
|
@@ -620,7 +620,7 @@ var qe = function(n) {
|
|
|
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
|
-
}, n.now =
|
|
623
|
+
}, n.now = Te.now, n;
|
|
624
624
|
}(), Qe = function(n) {
|
|
625
625
|
M(t, n);
|
|
626
626
|
function t(e, r) {
|
|
@@ -655,10 +655,10 @@ var Ke = Z(function(n) {
|
|
|
655
655
|
n(this), this.name = "EmptyError", this.message = "no elements in sequence";
|
|
656
656
|
};
|
|
657
657
|
});
|
|
658
|
-
function
|
|
658
|
+
function R(n, t) {
|
|
659
659
|
var e = typeof t == "object";
|
|
660
660
|
return new Promise(function(r, i) {
|
|
661
|
-
var s = new
|
|
661
|
+
var s = new F({
|
|
662
662
|
next: function(o) {
|
|
663
663
|
r(o), s.unsubscribe();
|
|
664
664
|
},
|
|
@@ -698,19 +698,19 @@ function Ze(n, t, e) {
|
|
|
698
698
|
return r ? Ce(function(i, s) {
|
|
699
699
|
var o;
|
|
700
700
|
(o = r.subscribe) === null || o === void 0 || o.call(r);
|
|
701
|
-
var
|
|
702
|
-
i.subscribe(Me(s, function(
|
|
701
|
+
var c = !0;
|
|
702
|
+
i.subscribe(Me(s, function(a) {
|
|
703
703
|
var u;
|
|
704
|
-
(u = r.next) === null || u === void 0 || u.call(r,
|
|
704
|
+
(u = r.next) === null || u === void 0 || u.call(r, a), s.next(a);
|
|
705
705
|
}, function() {
|
|
706
|
-
var
|
|
707
|
-
|
|
708
|
-
}, function(
|
|
706
|
+
var a;
|
|
707
|
+
c = !1, (a = r.complete) === null || a === void 0 || a.call(r), s.complete();
|
|
708
|
+
}, function(a) {
|
|
709
709
|
var u;
|
|
710
|
-
|
|
710
|
+
c = !1, (u = r.error) === null || u === void 0 || u.call(r, a), s.error(a);
|
|
711
711
|
}, function() {
|
|
712
|
-
var
|
|
713
|
-
|
|
712
|
+
var a, u;
|
|
713
|
+
c && ((a = r.unsubscribe) === null || a === void 0 || a.call(r)), (u = r.finalize) === null || u === void 0 || u.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 T 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 S(n) {
|
|
|
754
754
|
function it(n) {
|
|
755
755
|
return S(n == null ? void 0 : n.lift);
|
|
756
756
|
}
|
|
757
|
-
function
|
|
757
|
+
function N(n) {
|
|
758
758
|
return function(t) {
|
|
759
759
|
if (it(t))
|
|
760
760
|
return t.lift(function(e) {
|
|
@@ -804,8 +804,8 @@ function K(n, t) {
|
|
|
804
804
|
try {
|
|
805
805
|
for (; (t === void 0 || t-- > 0) && !(i = r.next()).done; )
|
|
806
806
|
s.push(i.value);
|
|
807
|
-
} catch (
|
|
808
|
-
o = { error:
|
|
807
|
+
} catch (c) {
|
|
808
|
+
o = { error: c };
|
|
809
809
|
} finally {
|
|
810
810
|
try {
|
|
811
811
|
i && !i.done && (e = r.return) && e.call(r);
|
|
@@ -855,15 +855,15 @@ var re = function() {
|
|
|
855
855
|
if (o)
|
|
856
856
|
if (this._parentage = null, Array.isArray(o))
|
|
857
857
|
try {
|
|
858
|
-
for (var
|
|
859
|
-
var u =
|
|
858
|
+
for (var c = de(o), a = c.next(); !a.done; a = c.next()) {
|
|
859
|
+
var u = a.value;
|
|
860
860
|
u.remove(this);
|
|
861
861
|
}
|
|
862
862
|
} catch (p) {
|
|
863
863
|
t = { error: p };
|
|
864
864
|
} finally {
|
|
865
865
|
try {
|
|
866
|
-
|
|
866
|
+
a && !a.done && (e = c.return) && e.call(c);
|
|
867
867
|
} finally {
|
|
868
868
|
if (t)
|
|
869
869
|
throw t.error;
|
|
@@ -935,7 +935,7 @@ var re = function() {
|
|
|
935
935
|
}(), n;
|
|
936
936
|
}();
|
|
937
937
|
re.EMPTY;
|
|
938
|
-
function
|
|
938
|
+
function _e(n) {
|
|
939
939
|
return n instanceof re || n && "closed" in n && S(n.remove) && S(n.add) && S(n.unsubscribe);
|
|
940
940
|
}
|
|
941
941
|
function fe(n) {
|
|
@@ -958,21 +958,21 @@ var Ie = {
|
|
|
958
958
|
},
|
|
959
959
|
delegate: void 0
|
|
960
960
|
};
|
|
961
|
-
function
|
|
961
|
+
function at(n) {
|
|
962
962
|
ot.setTimeout(function() {
|
|
963
963
|
throw n;
|
|
964
964
|
});
|
|
965
965
|
}
|
|
966
966
|
function ge() {
|
|
967
967
|
}
|
|
968
|
-
function
|
|
968
|
+
function ct(n) {
|
|
969
969
|
n();
|
|
970
970
|
}
|
|
971
971
|
var ne = function(n) {
|
|
972
972
|
te(t, n);
|
|
973
973
|
function t(e) {
|
|
974
974
|
var r = n.call(this) || this;
|
|
975
|
-
return r.isStopped = !1, e ? (r.destination = e,
|
|
975
|
+
return r.isStopped = !1, e ? (r.destination = e, _e(e) && e.add(r)) : r.destination = dt, r;
|
|
976
976
|
}
|
|
977
977
|
return t.create = function(e, r, i) {
|
|
978
978
|
return new X(e, r, i);
|
|
@@ -1045,13 +1045,13 @@ var lt = function() {
|
|
|
1045
1045
|
complete: i ?? void 0
|
|
1046
1046
|
};
|
|
1047
1047
|
else {
|
|
1048
|
-
var
|
|
1049
|
-
s && Ie.useDeprecatedNextContext ? (
|
|
1048
|
+
var c;
|
|
1049
|
+
s && Ie.useDeprecatedNextContext ? (c = Object.create(e), c.unsubscribe = function() {
|
|
1050
1050
|
return s.unsubscribe();
|
|
1051
1051
|
}, o = {
|
|
1052
|
-
next: e.next && H(e.next,
|
|
1053
|
-
error: e.error && H(e.error,
|
|
1054
|
-
complete: e.complete && H(e.complete,
|
|
1052
|
+
next: e.next && H(e.next, c),
|
|
1053
|
+
error: e.error && H(e.error, c),
|
|
1054
|
+
complete: e.complete && H(e.complete, c)
|
|
1055
1055
|
}) : o = e;
|
|
1056
1056
|
}
|
|
1057
1057
|
return s.destination = new lt(o), s;
|
|
@@ -1059,7 +1059,7 @@ var lt = function() {
|
|
|
1059
1059
|
return t;
|
|
1060
1060
|
}(ne);
|
|
1061
1061
|
function L(n) {
|
|
1062
|
-
|
|
1062
|
+
at(n);
|
|
1063
1063
|
}
|
|
1064
1064
|
function ht(n) {
|
|
1065
1065
|
throw n;
|
|
@@ -1072,11 +1072,11 @@ var dt = {
|
|
|
1072
1072
|
}, pt = function() {
|
|
1073
1073
|
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
|
1074
1074
|
}();
|
|
1075
|
-
function
|
|
1075
|
+
function Re(n) {
|
|
1076
1076
|
return n;
|
|
1077
1077
|
}
|
|
1078
1078
|
function ft(n) {
|
|
1079
|
-
return n.length === 0 ?
|
|
1079
|
+
return n.length === 0 ? Re : n.length === 1 ? n[0] : function(t) {
|
|
1080
1080
|
return n.reduce(function(e, r) {
|
|
1081
1081
|
return r(e);
|
|
1082
1082
|
}, t);
|
|
@@ -1091,9 +1091,9 @@ var gt = function() {
|
|
|
1091
1091
|
return e.source = this, e.operator = t, e;
|
|
1092
1092
|
}, n.prototype.subscribe = function(t, e, r) {
|
|
1093
1093
|
var i = this, s = yt(t) ? t : new X(t, e, r);
|
|
1094
|
-
return
|
|
1095
|
-
var o = i,
|
|
1096
|
-
s.add(
|
|
1094
|
+
return ct(function() {
|
|
1095
|
+
var o = i, c = o.operator, a = o.source;
|
|
1096
|
+
s.add(c ? c.call(s, a) : a ? i._subscribe(s) : i._trySubscribe(s));
|
|
1097
1097
|
}), s;
|
|
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, s) {
|
|
1107
1107
|
var o = new X({
|
|
1108
|
-
next: function(
|
|
1108
|
+
next: function(c) {
|
|
1109
1109
|
try {
|
|
1110
|
-
t(
|
|
1111
|
-
} catch (
|
|
1112
|
-
s(
|
|
1110
|
+
t(c);
|
|
1111
|
+
} catch (a) {
|
|
1112
|
+
s(a), o.unsubscribe();
|
|
1113
1113
|
}
|
|
1114
1114
|
},
|
|
1115
1115
|
error: s,
|
|
@@ -1150,22 +1150,22 @@ function vt(n) {
|
|
|
1150
1150
|
return n && S(n.next) && S(n.error) && S(n.complete);
|
|
1151
1151
|
}
|
|
1152
1152
|
function yt(n) {
|
|
1153
|
-
return n && n instanceof ne || vt(n) &&
|
|
1153
|
+
return n && n instanceof ne || vt(n) && _e(n);
|
|
1154
1154
|
}
|
|
1155
|
-
function
|
|
1155
|
+
function V(n, t, e, r, i) {
|
|
1156
1156
|
return new bt(n, t, e, r, i);
|
|
1157
1157
|
}
|
|
1158
1158
|
var bt = function(n) {
|
|
1159
1159
|
te(t, n);
|
|
1160
|
-
function t(e, r, i, s, o,
|
|
1161
|
-
var
|
|
1162
|
-
return
|
|
1160
|
+
function t(e, r, i, s, o, c) {
|
|
1161
|
+
var a = n.call(this, e) || this;
|
|
1162
|
+
return a.onFinalize = o, a.shouldUnsubscribe = c, a._next = r ? function(u) {
|
|
1163
1163
|
try {
|
|
1164
1164
|
r(u);
|
|
1165
1165
|
} catch (g) {
|
|
1166
1166
|
e.error(g);
|
|
1167
1167
|
}
|
|
1168
|
-
} : n.prototype._next,
|
|
1168
|
+
} : n.prototype._next, a._error = s ? function(u) {
|
|
1169
1169
|
try {
|
|
1170
1170
|
s(u);
|
|
1171
1171
|
} catch (g) {
|
|
@@ -1173,7 +1173,7 @@ var bt = function(n) {
|
|
|
1173
1173
|
} finally {
|
|
1174
1174
|
this.unsubscribe();
|
|
1175
1175
|
}
|
|
1176
|
-
} : n.prototype._error,
|
|
1176
|
+
} : n.prototype._error, a._complete = i ? function() {
|
|
1177
1177
|
try {
|
|
1178
1178
|
i();
|
|
1179
1179
|
} catch (u) {
|
|
@@ -1181,7 +1181,7 @@ var bt = function(n) {
|
|
|
1181
1181
|
} finally {
|
|
1182
1182
|
this.unsubscribe();
|
|
1183
1183
|
}
|
|
1184
|
-
} : n.prototype._complete,
|
|
1184
|
+
} : n.prototype._complete, a;
|
|
1185
1185
|
}
|
|
1186
1186
|
return t.prototype.unsubscribe = function() {
|
|
1187
1187
|
var e;
|
|
@@ -1192,9 +1192,9 @@ var bt = function(n) {
|
|
|
1192
1192
|
}, t;
|
|
1193
1193
|
}(ne);
|
|
1194
1194
|
function h(n, t) {
|
|
1195
|
-
return
|
|
1195
|
+
return N(function(e, r) {
|
|
1196
1196
|
var i = 0;
|
|
1197
|
-
e.subscribe(
|
|
1197
|
+
e.subscribe(V(r, function(s) {
|
|
1198
1198
|
r.next(n.call(t, s, i++));
|
|
1199
1199
|
}));
|
|
1200
1200
|
});
|
|
@@ -1205,41 +1205,41 @@ var mt = new gt(function(n) {
|
|
|
1205
1205
|
function y(n) {
|
|
1206
1206
|
return n <= 0 ? function() {
|
|
1207
1207
|
return mt;
|
|
1208
|
-
} :
|
|
1208
|
+
} : N(function(t, e) {
|
|
1209
1209
|
var r = 0;
|
|
1210
|
-
t.subscribe(
|
|
1210
|
+
t.subscribe(V(e, function(i) {
|
|
1211
1211
|
++r <= n && (e.next(i), n <= r && e.complete());
|
|
1212
1212
|
}));
|
|
1213
1213
|
});
|
|
1214
1214
|
}
|
|
1215
1215
|
function f(n, t) {
|
|
1216
|
-
return
|
|
1216
|
+
return N(function(e, r) {
|
|
1217
1217
|
var i = 0;
|
|
1218
|
-
e.subscribe(
|
|
1218
|
+
e.subscribe(V(r, function(s) {
|
|
1219
1219
|
return n.call(t, s, i++) && r.next(s);
|
|
1220
1220
|
}));
|
|
1221
1221
|
});
|
|
1222
1222
|
}
|
|
1223
1223
|
function d(n, t, e) {
|
|
1224
1224
|
var r = S(n) || t || e ? { next: n, error: t, complete: e } : n;
|
|
1225
|
-
return r ?
|
|
1225
|
+
return r ? N(function(i, s) {
|
|
1226
1226
|
var o;
|
|
1227
1227
|
(o = r.subscribe) === null || o === void 0 || o.call(r);
|
|
1228
|
-
var
|
|
1229
|
-
i.subscribe(
|
|
1228
|
+
var c = !0;
|
|
1229
|
+
i.subscribe(V(s, function(a) {
|
|
1230
1230
|
var u;
|
|
1231
|
-
(u = r.next) === null || u === void 0 || u.call(r,
|
|
1231
|
+
(u = r.next) === null || u === void 0 || u.call(r, a), s.next(a);
|
|
1232
1232
|
}, function() {
|
|
1233
|
-
var
|
|
1234
|
-
|
|
1235
|
-
}, function(
|
|
1233
|
+
var a;
|
|
1234
|
+
c = !1, (a = r.complete) === null || a === void 0 || a.call(r), s.complete();
|
|
1235
|
+
}, function(a) {
|
|
1236
1236
|
var u;
|
|
1237
|
-
|
|
1237
|
+
c = !1, (u = r.error) === null || u === void 0 || u.call(r, a), s.error(a);
|
|
1238
1238
|
}, function() {
|
|
1239
|
-
var
|
|
1240
|
-
|
|
1239
|
+
var a, u;
|
|
1240
|
+
c && ((a = r.unsubscribe) === null || a === void 0 || a.call(r)), (u = r.finalize) === null || u === void 0 || u.call(r);
|
|
1241
1241
|
}));
|
|
1242
|
-
}) :
|
|
1242
|
+
}) : Re;
|
|
1243
1243
|
}
|
|
1244
1244
|
const wt = /^(\d+)\.(\d+)$/;
|
|
1245
1245
|
function St(n) {
|
|
@@ -1389,11 +1389,11 @@ class Mt {
|
|
|
1389
1389
|
displayName: i,
|
|
1390
1390
|
jwtToken: s,
|
|
1391
1391
|
serverUrl: o,
|
|
1392
|
-
region:
|
|
1393
|
-
joinMicMuted:
|
|
1392
|
+
region: c,
|
|
1393
|
+
joinMicMuted: a,
|
|
1394
1394
|
joinWithoutCamera: u
|
|
1395
1395
|
} = t, g = "JOINING ROOM", v = this.createMessage(g, !1);
|
|
1396
|
-
v.roomName = e, v.jwtToken = s, v.serverUrl = o, v.region =
|
|
1396
|
+
v.roomName = e, v.jwtToken = s, v.serverUrl = o, v.region = c, v.roomInvite = r, v.joinMicMuted = a ?? !1, v.joinWithoutCamera = u ?? !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 Mt {
|
|
|
1553
1553
|
const i = "LAYOUT CHANGE";
|
|
1554
1554
|
let s, o;
|
|
1555
1555
|
if (e && r ? (s = this.createMessage(i, !1, r), s.result = e) : (s = this.createMessage(i), o = this.incomingMessages$.pipe(
|
|
1556
|
-
f((
|
|
1557
|
-
h((
|
|
1556
|
+
f((c) => c.type === i && c.replyTo === s.id),
|
|
1557
|
+
h((c) => c),
|
|
1558
1558
|
d(this.logReceived(i)),
|
|
1559
|
-
h((
|
|
1559
|
+
h((c) => c),
|
|
1560
1560
|
y(1)
|
|
1561
1561
|
), this.logService.debug(`Created ${i} Reply handler`)), s.layout = t, this.logCreated(i, s), this.port2.postMessage(s), this.logSent(i, s), o)
|
|
1562
1562
|
return o;
|
|
@@ -1627,32 +1627,32 @@ class Mt {
|
|
|
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 T(
|
|
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 T(
|
|
1637
1637
|
"currentContacts",
|
|
1638
1638
|
i,
|
|
1639
1639
|
"currentContacts should not be passed for direct streams"
|
|
1640
1640
|
);
|
|
1641
1641
|
const s = "SELECT CONTACTS", o = this.createMessage(s, !0);
|
|
1642
1642
|
o.streamType = e, o.streamId = t, o.contactType = r, o.currentContacts = i, this.logCreated(s, o);
|
|
1643
|
-
const
|
|
1644
|
-
f((
|
|
1643
|
+
const c = this.incomingMessages$.pipe(
|
|
1644
|
+
f((a) => a.type === s && a.replyTo === o.id),
|
|
1645
1645
|
d(this.logReceived(s)),
|
|
1646
1646
|
// validate if `streamId` is the same as we sent
|
|
1647
|
-
h((
|
|
1648
|
-
const u =
|
|
1647
|
+
h((a) => {
|
|
1648
|
+
const u = a;
|
|
1649
1649
|
if (u.streamId !== t)
|
|
1650
1650
|
throw new rt(u.streamId, t);
|
|
1651
1651
|
return e === "direct" && u.contacts.length > 1 && (u.contacts = [u.contacts[0]]), u;
|
|
1652
1652
|
}),
|
|
1653
1653
|
y(1)
|
|
1654
1654
|
);
|
|
1655
|
-
return this.logService.debug(`Created ${s} Reply handler`), this.port2.postMessage(o), this.logSent(s, o),
|
|
1655
|
+
return this.logService.debug(`Created ${s} Reply handler`), this.port2.postMessage(o), this.logSent(s, o), c;
|
|
1656
1656
|
}
|
|
1657
1657
|
/**
|
|
1658
1658
|
* Request detailed contact information for the given Cloud usernames.
|
|
@@ -1666,7 +1666,7 @@ class Mt {
|
|
|
1666
1666
|
if (!this.isEmbedded())
|
|
1667
1667
|
throw new l(this.currentContext);
|
|
1668
1668
|
if (!t.length)
|
|
1669
|
-
throw new
|
|
1669
|
+
throw new T("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(
|
|
@@ -1877,9 +1877,9 @@ class Mt {
|
|
|
1877
1877
|
* logs from the `Client` app.
|
|
1878
1878
|
*
|
|
1879
1879
|
* @remarks
|
|
1880
|
-
* The `Host` app can either request that logs be sent as a
|
|
1881
|
-
* trigger a file download by the `Client` by passing a
|
|
1882
|
-
* `responseType` property.
|
|
1880
|
+
* The `Host` app can either request that logs be sent as a {@link FileTransferMessage} via the
|
|
1881
|
+
* IPC Protocol or trigger a file download by the `Client` by passing a
|
|
1882
|
+
* {@link RequestLogsResponseType} in the `responseType` property.
|
|
1883
1883
|
*
|
|
1884
1884
|
* @returns An observable that emits whenever a {@link RequestLogsMessage} is received so it can
|
|
1885
1885
|
* be subscribed to indefinitely.
|
|
@@ -1936,7 +1936,7 @@ class Mt {
|
|
|
1936
1936
|
const s = "FILE TRANSFER", o = this.createMessage(s, !1);
|
|
1937
1937
|
if (o.mimeType = t.mimeType, o.fileName = t.fileName, o.fileSize = t.fileSize, o.fileHash = t.fileHash, o.dataType = t.dataType, o.data = t.data, o.intent = e, e === "attachment") {
|
|
1938
1938
|
if (!r)
|
|
1939
|
-
throw new
|
|
1939
|
+
throw new T(
|
|
1940
1940
|
"streamId",
|
|
1941
1941
|
r,
|
|
1942
1942
|
"streamId is required for attachment intent"
|
|
@@ -1944,13 +1944,13 @@ class Mt {
|
|
|
1944
1944
|
o.streamId = r;
|
|
1945
1945
|
}
|
|
1946
1946
|
i && (o.shouldOpen = i), this.logCreated(s, o);
|
|
1947
|
-
const
|
|
1948
|
-
f((
|
|
1947
|
+
const c = this.incomingMessages$.pipe(
|
|
1948
|
+
f((a) => a.type === s && a.replyTo === o.id),
|
|
1949
1949
|
d(this.logReceived(s)),
|
|
1950
|
-
h((
|
|
1950
|
+
h((a) => a),
|
|
1951
1951
|
y(1)
|
|
1952
1952
|
);
|
|
1953
|
-
return this.port2.postMessage(o), this.logSent(s, o),
|
|
1953
|
+
return this.port2.postMessage(o), this.logSent(s, o), c;
|
|
1954
1954
|
}
|
|
1955
1955
|
/**
|
|
1956
1956
|
* Send a {@link FileTransferMessageReply} to the `Host` app, to reply to a
|
|
@@ -2017,7 +2017,7 @@ class Mt {
|
|
|
2017
2017
|
const s = "FILE SELECTION", o = this.createMessage(s);
|
|
2018
2018
|
if (o.intent = t, o.maxCount = r, o.mimeTypes = i, t === "attachment") {
|
|
2019
2019
|
if (!e)
|
|
2020
|
-
throw new
|
|
2020
|
+
throw new T(
|
|
2021
2021
|
"streamId",
|
|
2022
2022
|
e,
|
|
2023
2023
|
"streamId is required for attachment intent"
|
|
@@ -2025,13 +2025,13 @@ class Mt {
|
|
|
2025
2025
|
o.streamId = e;
|
|
2026
2026
|
}
|
|
2027
2027
|
this.logCreated(s, o);
|
|
2028
|
-
const
|
|
2029
|
-
f((
|
|
2028
|
+
const c = this.incomingMessages$.pipe(
|
|
2029
|
+
f((a) => a.type === s && a.replyTo === o.id),
|
|
2030
2030
|
d(this.logReceived(s)),
|
|
2031
|
-
h((
|
|
2031
|
+
h((a) => a),
|
|
2032
2032
|
y(1)
|
|
2033
2033
|
);
|
|
2034
|
-
return this.port2.postMessage(o), this.logSent(s, o),
|
|
2034
|
+
return this.port2.postMessage(o), this.logSent(s, o), c;
|
|
2035
2035
|
}
|
|
2036
2036
|
/**
|
|
2037
2037
|
* Sends a {@link FileDownloadMessage} to the Host app, to request the download of a file.
|
|
@@ -2055,13 +2055,13 @@ class Mt {
|
|
|
2055
2055
|
throw new l(this.currentContext);
|
|
2056
2056
|
const s = "FILE DOWNLOAD", o = this.createMessage(s);
|
|
2057
2057
|
o.url = t, o.key = e, o.fileName = r, o.mimeType = i, this.logCreated(s, o);
|
|
2058
|
-
const
|
|
2059
|
-
f((
|
|
2058
|
+
const c = this.incomingMessages$.pipe(
|
|
2059
|
+
f((a) => a.type === s && a.replyTo === o.id),
|
|
2060
2060
|
d(this.logReceived(s)),
|
|
2061
|
-
h((
|
|
2061
|
+
h((a) => a),
|
|
2062
2062
|
y(1)
|
|
2063
2063
|
);
|
|
2064
|
-
return this.port2.postMessage(o), this.logSent(s, o),
|
|
2064
|
+
return this.port2.postMessage(o), this.logSent(s, o), c;
|
|
2065
2065
|
}
|
|
2066
2066
|
sendFileUploadMessage() {
|
|
2067
2067
|
throw new Error("Not implemented");
|
|
@@ -2075,19 +2075,20 @@ class Mt {
|
|
|
2075
2075
|
* for the target file in the `Host` app as well as to verify the integrity of the file.
|
|
2076
2076
|
*
|
|
2077
2077
|
* @param hash - The SHA256 hash of the file to open.
|
|
2078
|
+
* @param streamId - _Optional_. The ID of the message stream from which the file is opened from.
|
|
2078
2079
|
*/
|
|
2079
|
-
sendFileOpenMessage(t) {
|
|
2080
|
+
sendFileOpenMessage(t, e) {
|
|
2080
2081
|
if (!this.isEmbedded())
|
|
2081
2082
|
throw new l(this.currentContext);
|
|
2082
|
-
const
|
|
2083
|
-
|
|
2084
|
-
const
|
|
2085
|
-
f((
|
|
2086
|
-
d(this.logReceived(
|
|
2087
|
-
h((
|
|
2083
|
+
const r = "FILE OPEN", i = this.createMessage(r, !0);
|
|
2084
|
+
i.hash = t, i.streamId = e, this.logCreated(r, i);
|
|
2085
|
+
const s = this.incomingMessages$.pipe(
|
|
2086
|
+
f((o) => o.type === r && o.replyTo === i.id),
|
|
2087
|
+
d(this.logReceived(r)),
|
|
2088
|
+
h((o) => o),
|
|
2088
2089
|
y(1)
|
|
2089
2090
|
);
|
|
2090
|
-
return this.port2.postMessage(
|
|
2091
|
+
return this.port2.postMessage(i), this.logSent(r, i), s;
|
|
2091
2092
|
}
|
|
2092
2093
|
/**
|
|
2093
2094
|
* Sends a {@link FileRemoveMessage} to the Host app, to request removal of a file from the
|
|
@@ -2196,14 +2197,15 @@ class Mt {
|
|
|
2196
2197
|
return ie(this.negotiatedProtocolVersion, t);
|
|
2197
2198
|
}
|
|
2198
2199
|
logReceived(t, e) {
|
|
2200
|
+
t === "FILE TRANSFER" && e != null && e.data && (e = { ...e, data: "..." });
|
|
2199
2201
|
const r = (i) => this.logService.debug(`[IPC] Received ${t} message`, i);
|
|
2200
2202
|
return e && r(e), r;
|
|
2201
2203
|
}
|
|
2202
2204
|
logSent(t, e) {
|
|
2203
|
-
this.logService.debug(`[IPC] Sent ${t} message`, e);
|
|
2205
|
+
t === "FILE TRANSFER" && e != null && e.data && (e = { ...e, data: "..." }), this.logService.debug(`[IPC] Sent ${t} message`, e);
|
|
2204
2206
|
}
|
|
2205
2207
|
logCreated(t, e) {
|
|
2206
|
-
this.logService.debug(`[IPC] Created ${t} message`, e);
|
|
2208
|
+
t === "FILE TRANSFER" && e != null && e.data && (e = { ...e, data: "..." }), this.logService.debug(`[IPC] Created ${t} message`, e);
|
|
2207
2209
|
}
|
|
2208
2210
|
async createIframeChannel() {
|
|
2209
2211
|
return new Promise((t) => {
|
|
@@ -2239,7 +2241,7 @@ class Mt {
|
|
|
2239
2241
|
}
|
|
2240
2242
|
}
|
|
2241
2243
|
const xt = ["2.0"];
|
|
2242
|
-
class
|
|
2244
|
+
class _t {
|
|
2243
2245
|
/**
|
|
2244
2246
|
* A class that manages the IPC communication between the `Client` and the `Host`.
|
|
2245
2247
|
*
|
|
@@ -2289,7 +2291,7 @@ class Tt {
|
|
|
2289
2291
|
* @returns A promise with {@link IPCContext} the app is running under.
|
|
2290
2292
|
*/
|
|
2291
2293
|
async determineContext() {
|
|
2292
|
-
const t = await
|
|
2294
|
+
const t = await R(this.helper.determineContext(), {
|
|
2293
2295
|
defaultValue: "guest"
|
|
2294
2296
|
});
|
|
2295
2297
|
return this.evaluateContext(t);
|
|
@@ -2298,7 +2300,7 @@ class Tt {
|
|
|
2298
2300
|
* Initiates the IPC handshake with the `Host` app.
|
|
2299
2301
|
*/
|
|
2300
2302
|
initiateConnection() {
|
|
2301
|
-
return
|
|
2303
|
+
return R(
|
|
2302
2304
|
this.helper.openBridge().pipe(
|
|
2303
2305
|
Ze((t) => {
|
|
2304
2306
|
this.helper.onBadgeQueryMessage().subscribe((e) => {
|
|
@@ -2328,7 +2330,7 @@ class Tt {
|
|
|
2328
2330
|
let s;
|
|
2329
2331
|
if (e === "multi") {
|
|
2330
2332
|
if (!r || !Array.isArray(r))
|
|
2331
|
-
throw new
|
|
2333
|
+
throw new T(
|
|
2332
2334
|
"currentContacts",
|
|
2333
2335
|
r,
|
|
2334
2336
|
"currentContacts is required for group streams"
|
|
@@ -2341,7 +2343,7 @@ class Tt {
|
|
|
2341
2343
|
);
|
|
2342
2344
|
} else
|
|
2343
2345
|
r ? i = r : i = "cloudUsername", s = this.helper.selectContacts(t.toString(), "direct", i);
|
|
2344
|
-
return
|
|
2346
|
+
return R(s.pipe(O((o) => o.contacts)));
|
|
2345
2347
|
}
|
|
2346
2348
|
/**
|
|
2347
2349
|
* Matches batch of {@link ContactItem} objects against the Host's contact list to fetch detailed
|
|
@@ -2353,7 +2355,7 @@ class Tt {
|
|
|
2353
2355
|
* Host's contact list.
|
|
2354
2356
|
*/
|
|
2355
2357
|
matchContacts(t) {
|
|
2356
|
-
return this.logger.debug("Match Contacts: ", t),
|
|
2358
|
+
return this.logger.debug("Match Contacts: ", t), R(this.helper.matchContacts(t).pipe(O((e) => e.contacts)));
|
|
2357
2359
|
}
|
|
2358
2360
|
/**
|
|
2359
2361
|
* Requests the `Host` app to provide the Push Token for the current device.
|
|
@@ -2361,7 +2363,7 @@ class Tt {
|
|
|
2361
2363
|
* @returns A promise with the Push Token as `string`.
|
|
2362
2364
|
*/
|
|
2363
2365
|
requestPushToken() {
|
|
2364
|
-
return this.logger.debug("Requesting Push Token"),
|
|
2366
|
+
return this.logger.debug("Requesting Push Token"), R(this.helper.requestPushToken().pipe(O((t) => t.pushToken)));
|
|
2365
2367
|
}
|
|
2366
2368
|
/**
|
|
2367
2369
|
* Sends the current badge count to the `Host` app.
|
|
@@ -2442,5 +2444,5 @@ class Tt {
|
|
|
2442
2444
|
}
|
|
2443
2445
|
export {
|
|
2444
2446
|
b as IPCEvents,
|
|
2445
|
-
|
|
2447
|
+
_t as IPCManager
|
|
2446
2448
|
};
|