@acrobits/ipc-sdk 0.8.1-alpha.0 → 0.8.1-alpha.10
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/assets/search.js +1 -1
- package/docs/classes/IPCManager.html +21 -19
- package/docs/interfaces/CloudUsernameContactItem.html +3 -3
- package/docs/interfaces/DetailedContactItem.html +8 -8
- package/docs/interfaces/DetailedContactURI.html +3 -3
- package/docs/interfaces/UriContactItem.html +3 -3
- package/docs/types/ContactItem.html +1 -1
- package/docs/types/ContactLabel.html +1 -1
- package/docs/types/ContactType.html +1 -1
- package/docs/types/ContactURI.html +1 -1
- package/docs/types/HostType.html +1 -1
- package/docs/types/IpcProtocolVersion.html +1 -1
- package/lib/index.d.ts +4 -0
- package/lib/ipc-sdk.js +705 -506
- package/lib/ipc-sdk.js.map +1 -1
- package/lib/ipc-sdk.umd.cjs +4 -4
- package/lib/ipc-sdk.umd.cjs.map +1 -1
- package/package.json +2 -2
package/lib/ipc-sdk.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
return
|
|
1
|
+
var Pe = Object.defineProperty;
|
|
2
|
+
var _e = (n, t, e) => t in n ? Pe(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
|
|
3
|
+
var x = (n, t, e) => (_e(n, typeof t != "symbol" ? t + "" : t, e), e);
|
|
4
|
+
var w = /* @__PURE__ */ ((n) => (n.BadgeQuery = "BADGE QUERY", n.Lifecycle = "LIFECYCLE", n.PushToken = "PUSH TOKEN", n))(w || {}), q = function(n, t) {
|
|
5
|
+
return q = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, r) {
|
|
6
6
|
e.__proto__ = r;
|
|
7
7
|
} || function(e, r) {
|
|
8
|
-
for (var
|
|
9
|
-
Object.prototype.hasOwnProperty.call(r,
|
|
10
|
-
},
|
|
8
|
+
for (var s in r)
|
|
9
|
+
Object.prototype.hasOwnProperty.call(r, s) && (e[s] = r[s]);
|
|
10
|
+
}, q(n, t);
|
|
11
11
|
};
|
|
12
12
|
function M(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
|
+
q(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 G(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);
|
|
@@ -34,29 +34,29 @@ function $(n, t) {
|
|
|
34
34
|
var e = typeof Symbol == "function" && n[Symbol.iterator];
|
|
35
35
|
if (!e)
|
|
36
36
|
return n;
|
|
37
|
-
var r = e.call(n),
|
|
37
|
+
var r = e.call(n), s, i = [], o;
|
|
38
38
|
try {
|
|
39
|
-
for (; (t === void 0 || t-- > 0) && !(
|
|
40
|
-
|
|
41
|
-
} catch (
|
|
42
|
-
o = { error:
|
|
39
|
+
for (; (t === void 0 || t-- > 0) && !(s = r.next()).done; )
|
|
40
|
+
i.push(s.value);
|
|
41
|
+
} catch (a) {
|
|
42
|
+
o = { error: a };
|
|
43
43
|
} finally {
|
|
44
44
|
try {
|
|
45
|
-
|
|
45
|
+
s && !s.done && (e = r.return) && e.call(r);
|
|
46
46
|
} finally {
|
|
47
47
|
if (o)
|
|
48
48
|
throw o.error;
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
return
|
|
51
|
+
return i;
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function D(n, t, e) {
|
|
54
54
|
if (e || arguments.length === 2)
|
|
55
|
-
for (var r = 0,
|
|
56
|
-
(
|
|
57
|
-
return n.concat(
|
|
55
|
+
for (var r = 0, s = t.length, i; r < s; r++)
|
|
56
|
+
(i || !(r in t)) && (i || (i = Array.prototype.slice.call(t, 0, r)), i[r] = t[r]);
|
|
57
|
+
return n.concat(i || Array.prototype.slice.call(t));
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function E(n) {
|
|
60
60
|
return typeof n == "function";
|
|
61
61
|
}
|
|
62
62
|
function X(n) {
|
|
@@ -68,8 +68,8 @@ function X(n) {
|
|
|
68
68
|
var N = X(function(n) {
|
|
69
69
|
return function(e) {
|
|
70
70
|
n(this), this.message = e ? e.length + ` errors occurred during unsubscription:
|
|
71
|
-
` + e.map(function(r,
|
|
72
|
-
return
|
|
71
|
+
` + e.map(function(r, s) {
|
|
72
|
+
return s + 1 + ") " + r.toString();
|
|
73
73
|
}).join(`
|
|
74
74
|
`) : "", this.name = "UnsubscriptionError", this.errors = e;
|
|
75
75
|
};
|
|
@@ -80,27 +80,27 @@ function F(n, t) {
|
|
|
80
80
|
0 <= e && n.splice(e, 1);
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
-
var
|
|
83
|
+
var R = function() {
|
|
84
84
|
function n(t) {
|
|
85
85
|
this.initialTeardown = t, this.closed = !1, this._parentage = null, this._finalizers = null;
|
|
86
86
|
}
|
|
87
87
|
return n.prototype.unsubscribe = function() {
|
|
88
|
-
var t, e, r,
|
|
88
|
+
var t, e, r, s, i;
|
|
89
89
|
if (!this.closed) {
|
|
90
90
|
this.closed = !0;
|
|
91
91
|
var o = this._parentage;
|
|
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 a = G(o), c = a.next(); !c.done; c = a.next()) {
|
|
96
|
+
var u = c.value;
|
|
97
97
|
u.remove(this);
|
|
98
98
|
}
|
|
99
|
-
} catch (
|
|
100
|
-
t = { error:
|
|
99
|
+
} catch (v) {
|
|
100
|
+
t = { error: v };
|
|
101
101
|
} finally {
|
|
102
102
|
try {
|
|
103
|
-
|
|
103
|
+
c && !c.done && (e = a.return) && e.call(a);
|
|
104
104
|
} finally {
|
|
105
105
|
if (t)
|
|
106
106
|
throw t.error;
|
|
@@ -109,43 +109,43 @@ var T = function() {
|
|
|
109
109
|
else
|
|
110
110
|
o.remove(this);
|
|
111
111
|
var l = this.initialTeardown;
|
|
112
|
-
if (
|
|
112
|
+
if (E(l))
|
|
113
113
|
try {
|
|
114
114
|
l();
|
|
115
|
-
} catch (
|
|
116
|
-
|
|
115
|
+
} catch (v) {
|
|
116
|
+
i = v instanceof N ? v.errors : [v];
|
|
117
117
|
}
|
|
118
118
|
var d = this._finalizers;
|
|
119
119
|
if (d) {
|
|
120
120
|
this._finalizers = null;
|
|
121
121
|
try {
|
|
122
|
-
for (var y =
|
|
123
|
-
var
|
|
122
|
+
for (var y = G(d), b = y.next(); !b.done; b = y.next()) {
|
|
123
|
+
var k = b.value;
|
|
124
124
|
try {
|
|
125
|
-
|
|
126
|
-
} catch (
|
|
127
|
-
|
|
125
|
+
se(k);
|
|
126
|
+
} catch (v) {
|
|
127
|
+
i = i ?? [], v instanceof N ? i = D(D([], $(i)), $(v.errors)) : i.push(v);
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
|
-
} catch (
|
|
131
|
-
r = { error:
|
|
130
|
+
} catch (v) {
|
|
131
|
+
r = { error: v };
|
|
132
132
|
} finally {
|
|
133
133
|
try {
|
|
134
|
-
|
|
134
|
+
b && !b.done && (s = y.return) && s.call(y);
|
|
135
135
|
} finally {
|
|
136
136
|
if (r)
|
|
137
137
|
throw r.error;
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
|
-
if (
|
|
142
|
-
throw new N(
|
|
141
|
+
if (i)
|
|
142
|
+
throw new N(i);
|
|
143
143
|
}
|
|
144
144
|
}, n.prototype.add = function(t) {
|
|
145
145
|
var e;
|
|
146
146
|
if (t && t !== this)
|
|
147
147
|
if (this.closed)
|
|
148
|
-
|
|
148
|
+
se(t);
|
|
149
149
|
else {
|
|
150
150
|
if (t instanceof n) {
|
|
151
151
|
if (t.closed || t._hasParent(this))
|
|
@@ -170,12 +170,12 @@ var T = function() {
|
|
|
170
170
|
var t = new n();
|
|
171
171
|
return t.closed = !0, t;
|
|
172
172
|
}(), n;
|
|
173
|
-
}(), be =
|
|
173
|
+
}(), be = R.EMPTY;
|
|
174
174
|
function me(n) {
|
|
175
|
-
return n instanceof
|
|
175
|
+
return n instanceof R || n && "closed" in n && E(n.remove) && E(n.add) && E(n.unsubscribe);
|
|
176
176
|
}
|
|
177
|
-
function
|
|
178
|
-
|
|
177
|
+
function se(n) {
|
|
178
|
+
E(n) ? n() : n.unsubscribe();
|
|
179
179
|
}
|
|
180
180
|
var we = {
|
|
181
181
|
onUnhandledError: null,
|
|
@@ -183,24 +183,24 @@ var we = {
|
|
|
183
183
|
Promise: void 0,
|
|
184
184
|
useDeprecatedSynchronousErrorHandling: !1,
|
|
185
185
|
useDeprecatedNextContext: !1
|
|
186
|
-
},
|
|
186
|
+
}, Ee = {
|
|
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
|
-
return setTimeout.apply(void 0,
|
|
190
|
+
return setTimeout.apply(void 0, D([n, t], $(e)));
|
|
191
191
|
},
|
|
192
192
|
clearTimeout: function(n) {
|
|
193
|
-
var t =
|
|
193
|
+
var t = Ee.delegate;
|
|
194
194
|
return ((t == null ? void 0 : t.clearTimeout) || clearTimeout)(n);
|
|
195
195
|
},
|
|
196
196
|
delegate: void 0
|
|
197
197
|
};
|
|
198
198
|
function Ae(n) {
|
|
199
|
-
|
|
199
|
+
Ee.setTimeout(function() {
|
|
200
200
|
throw n;
|
|
201
201
|
});
|
|
202
202
|
}
|
|
203
|
-
function
|
|
203
|
+
function ie() {
|
|
204
204
|
}
|
|
205
205
|
function U(n) {
|
|
206
206
|
n();
|
|
@@ -211,8 +211,8 @@ var Z = function(n) {
|
|
|
211
211
|
var r = n.call(this) || this;
|
|
212
212
|
return r.isStopped = !1, e ? (r.destination = e, me(e) && e.add(r)) : r.destination = $e, r;
|
|
213
213
|
}
|
|
214
|
-
return t.create = function(e, r,
|
|
215
|
-
return new
|
|
214
|
+
return t.create = function(e, r, s) {
|
|
215
|
+
return new H(e, r, s);
|
|
216
216
|
}, t.prototype.next = function(e) {
|
|
217
217
|
this.isStopped || this._next(e);
|
|
218
218
|
}, t.prototype.error = function(e) {
|
|
@@ -236,8 +236,8 @@ var Z = function(n) {
|
|
|
236
236
|
this.unsubscribe();
|
|
237
237
|
}
|
|
238
238
|
}, t;
|
|
239
|
-
}(
|
|
240
|
-
function
|
|
239
|
+
}(R), Oe = Function.prototype.bind;
|
|
240
|
+
function V(n, t) {
|
|
241
241
|
return Oe.call(n, t);
|
|
242
242
|
}
|
|
243
243
|
var Le = function() {
|
|
@@ -271,27 +271,27 @@ var Le = function() {
|
|
|
271
271
|
A(e);
|
|
272
272
|
}
|
|
273
273
|
}, n;
|
|
274
|
-
}(),
|
|
274
|
+
}(), H = function(n) {
|
|
275
275
|
M(t, n);
|
|
276
|
-
function t(e, r,
|
|
277
|
-
var
|
|
278
|
-
if (
|
|
276
|
+
function t(e, r, s) {
|
|
277
|
+
var i = n.call(this) || this, o;
|
|
278
|
+
if (E(e) || !e)
|
|
279
279
|
o = {
|
|
280
280
|
next: e ?? void 0,
|
|
281
281
|
error: r ?? void 0,
|
|
282
|
-
complete:
|
|
282
|
+
complete: s ?? void 0
|
|
283
283
|
};
|
|
284
284
|
else {
|
|
285
|
-
var
|
|
286
|
-
|
|
287
|
-
return
|
|
285
|
+
var a;
|
|
286
|
+
i && we.useDeprecatedNextContext ? (a = Object.create(e), a.unsubscribe = function() {
|
|
287
|
+
return i.unsubscribe();
|
|
288
288
|
}, o = {
|
|
289
|
-
next: e.next &&
|
|
290
|
-
error: e.error &&
|
|
291
|
-
complete: e.complete &&
|
|
289
|
+
next: e.next && V(e.next, a),
|
|
290
|
+
error: e.error && V(e.error, a),
|
|
291
|
+
complete: e.complete && V(e.complete, a)
|
|
292
292
|
}) : o = e;
|
|
293
293
|
}
|
|
294
|
-
return
|
|
294
|
+
return i.destination = new Le(o), i;
|
|
295
295
|
}
|
|
296
296
|
return t;
|
|
297
297
|
}(Z);
|
|
@@ -303,23 +303,23 @@ function Ue(n) {
|
|
|
303
303
|
}
|
|
304
304
|
var $e = {
|
|
305
305
|
closed: !0,
|
|
306
|
-
next:
|
|
306
|
+
next: ie,
|
|
307
307
|
error: Ue,
|
|
308
|
-
complete:
|
|
309
|
-
},
|
|
308
|
+
complete: ie
|
|
309
|
+
}, De = function() {
|
|
310
310
|
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
|
311
311
|
}();
|
|
312
|
-
function
|
|
312
|
+
function Se(n) {
|
|
313
313
|
return n;
|
|
314
314
|
}
|
|
315
315
|
function Fe(n) {
|
|
316
|
-
return n.length === 0 ?
|
|
317
|
-
return n.reduce(function(r,
|
|
318
|
-
return
|
|
316
|
+
return n.length === 0 ? Se : n.length === 1 ? n[0] : function(e) {
|
|
317
|
+
return n.reduce(function(r, s) {
|
|
318
|
+
return s(r);
|
|
319
319
|
}, e);
|
|
320
320
|
};
|
|
321
321
|
}
|
|
322
|
-
var
|
|
322
|
+
var B = function() {
|
|
323
323
|
function n(t) {
|
|
324
324
|
t && (this._subscribe = t);
|
|
325
325
|
}
|
|
@@ -327,11 +327,11 @@ var G = function() {
|
|
|
327
327
|
var e = new n();
|
|
328
328
|
return e.source = this, e.operator = t, e;
|
|
329
329
|
}, n.prototype.subscribe = function(t, e, r) {
|
|
330
|
-
var
|
|
330
|
+
var s = this, i = ke(t) ? t : new H(t, e, r);
|
|
331
331
|
return U(function() {
|
|
332
|
-
var o =
|
|
333
|
-
|
|
334
|
-
}),
|
|
332
|
+
var o = s, a = o.operator, c = o.source;
|
|
333
|
+
i.add(a ? a.call(i, c) : c ? s._subscribe(i) : s._trySubscribe(i));
|
|
334
|
+
}), i;
|
|
335
335
|
}, n.prototype._trySubscribe = function(t) {
|
|
336
336
|
try {
|
|
337
337
|
return this._subscribe(t);
|
|
@@ -340,24 +340,24 @@ var G = function() {
|
|
|
340
340
|
}
|
|
341
341
|
}, n.prototype.forEach = function(t, e) {
|
|
342
342
|
var r = this;
|
|
343
|
-
return e = oe(e), new e(function(
|
|
344
|
-
var o = new
|
|
345
|
-
next: function(
|
|
343
|
+
return e = oe(e), new e(function(s, i) {
|
|
344
|
+
var o = new H({
|
|
345
|
+
next: function(a) {
|
|
346
346
|
try {
|
|
347
|
-
t(
|
|
348
|
-
} catch (
|
|
349
|
-
|
|
347
|
+
t(a);
|
|
348
|
+
} catch (c) {
|
|
349
|
+
i(c), o.unsubscribe();
|
|
350
350
|
}
|
|
351
351
|
},
|
|
352
|
-
error:
|
|
353
|
-
complete:
|
|
352
|
+
error: i,
|
|
353
|
+
complete: s
|
|
354
354
|
});
|
|
355
355
|
r.subscribe(o);
|
|
356
356
|
});
|
|
357
357
|
}, n.prototype._subscribe = function(t) {
|
|
358
358
|
var e;
|
|
359
359
|
return (e = this.source) === null || e === void 0 ? void 0 : e.subscribe(t);
|
|
360
|
-
}, n.prototype[
|
|
360
|
+
}, n.prototype[De] = function() {
|
|
361
361
|
return this;
|
|
362
362
|
}, n.prototype.pipe = function() {
|
|
363
363
|
for (var t = [], e = 0; e < arguments.length; e++)
|
|
@@ -365,14 +365,14 @@ var G = function() {
|
|
|
365
365
|
return Fe(t)(this);
|
|
366
366
|
}, n.prototype.toPromise = function(t) {
|
|
367
367
|
var e = this;
|
|
368
|
-
return t = oe(t), new t(function(r,
|
|
369
|
-
var
|
|
368
|
+
return t = oe(t), new t(function(r, s) {
|
|
369
|
+
var i;
|
|
370
370
|
e.subscribe(function(o) {
|
|
371
|
-
return
|
|
371
|
+
return i = o;
|
|
372
372
|
}, function(o) {
|
|
373
|
-
return
|
|
373
|
+
return s(o);
|
|
374
374
|
}, function() {
|
|
375
|
-
return r(
|
|
375
|
+
return r(i);
|
|
376
376
|
});
|
|
377
377
|
});
|
|
378
378
|
}, n.create = function(t) {
|
|
@@ -383,14 +383,14 @@ function oe(n) {
|
|
|
383
383
|
var t;
|
|
384
384
|
return (t = n ?? we.Promise) !== null && t !== void 0 ? t : Promise;
|
|
385
385
|
}
|
|
386
|
-
function
|
|
387
|
-
return n &&
|
|
386
|
+
function He(n) {
|
|
387
|
+
return n && E(n.next) && E(n.error) && E(n.complete);
|
|
388
388
|
}
|
|
389
|
-
function
|
|
390
|
-
return n && n instanceof Z ||
|
|
389
|
+
function ke(n) {
|
|
390
|
+
return n && n instanceof Z || He(n) && me(n);
|
|
391
391
|
}
|
|
392
392
|
function Ne(n) {
|
|
393
|
-
return
|
|
393
|
+
return E(n == null ? void 0 : n.lift);
|
|
394
394
|
}
|
|
395
395
|
function Ce(n) {
|
|
396
396
|
return function(t) {
|
|
@@ -405,36 +405,36 @@ function Ce(n) {
|
|
|
405
405
|
throw new TypeError("Unable to lift unknown Observable type");
|
|
406
406
|
};
|
|
407
407
|
}
|
|
408
|
-
function Me(n, t, e, r,
|
|
409
|
-
return new
|
|
408
|
+
function Me(n, t, e, r, s) {
|
|
409
|
+
return new Ve(n, t, e, r, s);
|
|
410
410
|
}
|
|
411
|
-
var
|
|
411
|
+
var Ve = function(n) {
|
|
412
412
|
M(t, n);
|
|
413
|
-
function t(e, r,
|
|
414
|
-
var
|
|
415
|
-
return
|
|
413
|
+
function t(e, r, s, i, o, a) {
|
|
414
|
+
var c = n.call(this, e) || this;
|
|
415
|
+
return c.onFinalize = o, c.shouldUnsubscribe = a, c._next = r ? function(u) {
|
|
416
416
|
try {
|
|
417
417
|
r(u);
|
|
418
418
|
} catch (l) {
|
|
419
419
|
e.error(l);
|
|
420
420
|
}
|
|
421
|
-
} : n.prototype._next,
|
|
421
|
+
} : n.prototype._next, c._error = i ? function(u) {
|
|
422
422
|
try {
|
|
423
|
-
|
|
423
|
+
i(u);
|
|
424
424
|
} catch (l) {
|
|
425
425
|
e.error(l);
|
|
426
426
|
} finally {
|
|
427
427
|
this.unsubscribe();
|
|
428
428
|
}
|
|
429
|
-
} : n.prototype._error,
|
|
429
|
+
} : n.prototype._error, c._complete = s ? function() {
|
|
430
430
|
try {
|
|
431
|
-
|
|
431
|
+
s();
|
|
432
432
|
} catch (u) {
|
|
433
433
|
e.error(u);
|
|
434
434
|
} finally {
|
|
435
435
|
this.unsubscribe();
|
|
436
436
|
}
|
|
437
|
-
} : n.prototype._complete,
|
|
437
|
+
} : n.prototype._complete, c;
|
|
438
438
|
}
|
|
439
439
|
return t.prototype.unsubscribe = function() {
|
|
440
440
|
var e;
|
|
@@ -443,7 +443,7 @@ var De = function(n) {
|
|
|
443
443
|
n.prototype.unsubscribe.call(this), !r && ((e = this.onFinalize) === null || e === void 0 || e.call(this));
|
|
444
444
|
}
|
|
445
445
|
}, t;
|
|
446
|
-
}(Z),
|
|
446
|
+
}(Z), je = X(function(n) {
|
|
447
447
|
return function() {
|
|
448
448
|
n(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
|
|
449
449
|
};
|
|
@@ -458,26 +458,26 @@ var De = function(n) {
|
|
|
458
458
|
return r.operator = e, r;
|
|
459
459
|
}, t.prototype._throwIfClosed = function() {
|
|
460
460
|
if (this.closed)
|
|
461
|
-
throw new
|
|
461
|
+
throw new je();
|
|
462
462
|
}, t.prototype.next = function(e) {
|
|
463
463
|
var r = this;
|
|
464
464
|
U(function() {
|
|
465
|
-
var
|
|
465
|
+
var s, i;
|
|
466
466
|
if (r._throwIfClosed(), !r.isStopped) {
|
|
467
467
|
r.currentObservers || (r.currentObservers = Array.from(r.observers));
|
|
468
468
|
try {
|
|
469
|
-
for (var o =
|
|
470
|
-
var
|
|
471
|
-
|
|
469
|
+
for (var o = G(r.currentObservers), a = o.next(); !a.done; a = o.next()) {
|
|
470
|
+
var c = a.value;
|
|
471
|
+
c.next(e);
|
|
472
472
|
}
|
|
473
473
|
} catch (u) {
|
|
474
|
-
|
|
474
|
+
s = { error: u };
|
|
475
475
|
} finally {
|
|
476
476
|
try {
|
|
477
|
-
|
|
477
|
+
a && !a.done && (i = o.return) && i.call(o);
|
|
478
478
|
} finally {
|
|
479
|
-
if (
|
|
480
|
-
throw
|
|
479
|
+
if (s)
|
|
480
|
+
throw s.error;
|
|
481
481
|
}
|
|
482
482
|
}
|
|
483
483
|
}
|
|
@@ -487,8 +487,8 @@ var De = function(n) {
|
|
|
487
487
|
U(function() {
|
|
488
488
|
if (r._throwIfClosed(), !r.isStopped) {
|
|
489
489
|
r.hasError = r.isStopped = !0, r.thrownError = e;
|
|
490
|
-
for (var
|
|
491
|
-
|
|
490
|
+
for (var s = r.observers; s.length; )
|
|
491
|
+
s.shift().error(e);
|
|
492
492
|
}
|
|
493
493
|
});
|
|
494
494
|
}, t.prototype.complete = function() {
|
|
@@ -514,44 +514,44 @@ var De = function(n) {
|
|
|
514
514
|
}, t.prototype._subscribe = function(e) {
|
|
515
515
|
return this._throwIfClosed(), this._checkFinalizedStatuses(e), this._innerSubscribe(e);
|
|
516
516
|
}, t.prototype._innerSubscribe = function(e) {
|
|
517
|
-
var r = this,
|
|
518
|
-
return
|
|
519
|
-
r.currentObservers = null, F(
|
|
517
|
+
var r = this, s = this, i = s.hasError, o = s.isStopped, a = s.observers;
|
|
518
|
+
return i || o ? be : (this.currentObservers = null, a.push(e), new R(function() {
|
|
519
|
+
r.currentObservers = null, F(a, e);
|
|
520
520
|
}));
|
|
521
521
|
}, t.prototype._checkFinalizedStatuses = function(e) {
|
|
522
|
-
var r = this,
|
|
523
|
-
|
|
522
|
+
var r = this, s = r.hasError, i = r.thrownError, o = r.isStopped;
|
|
523
|
+
s ? e.error(i) : o && e.complete();
|
|
524
524
|
}, t.prototype.asObservable = function() {
|
|
525
|
-
var e = new
|
|
525
|
+
var e = new B();
|
|
526
526
|
return e.source = this, e;
|
|
527
527
|
}, t.create = function(e, r) {
|
|
528
528
|
return new ae(e, r);
|
|
529
529
|
}, t;
|
|
530
|
-
}(
|
|
530
|
+
}(B), ae = function(n) {
|
|
531
531
|
M(t, n);
|
|
532
532
|
function t(e, r) {
|
|
533
|
-
var
|
|
534
|
-
return
|
|
533
|
+
var s = n.call(this) || this;
|
|
534
|
+
return s.destination = e, s.source = r, s;
|
|
535
535
|
}
|
|
536
536
|
return t.prototype.next = function(e) {
|
|
537
|
-
var r,
|
|
538
|
-
(
|
|
537
|
+
var r, s;
|
|
538
|
+
(s = (r = this.destination) === null || r === void 0 ? void 0 : r.next) === null || s === void 0 || s.call(r, e);
|
|
539
539
|
}, t.prototype.error = function(e) {
|
|
540
|
-
var r,
|
|
541
|
-
(
|
|
540
|
+
var r, s;
|
|
541
|
+
(s = (r = this.destination) === null || r === void 0 ? void 0 : r.error) === null || s === void 0 || s.call(r, e);
|
|
542
542
|
}, t.prototype.complete = function() {
|
|
543
543
|
var e, r;
|
|
544
544
|
(r = (e = this.destination) === null || e === void 0 ? void 0 : e.complete) === null || r === void 0 || r.call(e);
|
|
545
545
|
}, t.prototype._subscribe = function(e) {
|
|
546
|
-
var r,
|
|
547
|
-
return (
|
|
546
|
+
var r, s;
|
|
547
|
+
return (s = (r = this.source) === null || r === void 0 ? void 0 : r.subscribe(e)) !== null && s !== void 0 ? s : be;
|
|
548
548
|
}, t;
|
|
549
|
-
}(xe),
|
|
549
|
+
}(xe), Qe = {
|
|
550
550
|
now: function() {
|
|
551
551
|
return Date.now();
|
|
552
552
|
},
|
|
553
553
|
delegate: void 0
|
|
554
|
-
},
|
|
554
|
+
}, qe = function(n) {
|
|
555
555
|
M(t, n);
|
|
556
556
|
function t(e, r) {
|
|
557
557
|
return n.call(this) || this;
|
|
@@ -559,72 +559,72 @@ var De = function(n) {
|
|
|
559
559
|
return t.prototype.schedule = function(e, r) {
|
|
560
560
|
return this;
|
|
561
561
|
}, t;
|
|
562
|
-
}(
|
|
562
|
+
}(R), Y = {
|
|
563
563
|
setInterval: function(n, t) {
|
|
564
564
|
for (var e = [], r = 2; r < arguments.length; r++)
|
|
565
565
|
e[r - 2] = arguments[r];
|
|
566
|
-
return setInterval.apply(void 0,
|
|
566
|
+
return setInterval.apply(void 0, D([n, t], $(e)));
|
|
567
567
|
},
|
|
568
568
|
clearInterval: function(n) {
|
|
569
|
-
var t =
|
|
569
|
+
var t = Y.delegate;
|
|
570
570
|
return ((t == null ? void 0 : t.clearInterval) || clearInterval)(n);
|
|
571
571
|
},
|
|
572
572
|
delegate: void 0
|
|
573
|
-
},
|
|
573
|
+
}, Ge = function(n) {
|
|
574
574
|
M(t, n);
|
|
575
575
|
function t(e, r) {
|
|
576
|
-
var
|
|
577
|
-
return
|
|
576
|
+
var s = n.call(this, e, r) || this;
|
|
577
|
+
return s.scheduler = e, s.work = r, s.pending = !1, s;
|
|
578
578
|
}
|
|
579
579
|
return t.prototype.schedule = function(e, r) {
|
|
580
|
-
var
|
|
580
|
+
var s;
|
|
581
581
|
if (r === void 0 && (r = 0), this.closed)
|
|
582
582
|
return this;
|
|
583
583
|
this.state = e;
|
|
584
|
-
var
|
|
585
|
-
return
|
|
586
|
-
}, t.prototype.requestAsyncId = function(e, r,
|
|
587
|
-
return
|
|
588
|
-
}, t.prototype.recycleAsyncId = function(e, r,
|
|
589
|
-
if (
|
|
584
|
+
var i = this.id, o = this.scheduler;
|
|
585
|
+
return i != null && (this.id = this.recycleAsyncId(o, i, r)), this.pending = !0, this.delay = r, this.id = (s = this.id) !== null && s !== void 0 ? s : this.requestAsyncId(o, this.id, r), this;
|
|
586
|
+
}, t.prototype.requestAsyncId = function(e, r, s) {
|
|
587
|
+
return s === void 0 && (s = 0), Y.setInterval(e.flush.bind(e, this), s);
|
|
588
|
+
}, t.prototype.recycleAsyncId = function(e, r, s) {
|
|
589
|
+
if (s === void 0 && (s = 0), s != null && this.delay === s && this.pending === !1)
|
|
590
590
|
return r;
|
|
591
|
-
r != null &&
|
|
591
|
+
r != null && Y.clearInterval(r);
|
|
592
592
|
}, t.prototype.execute = function(e, r) {
|
|
593
593
|
if (this.closed)
|
|
594
594
|
return new Error("executing a cancelled action");
|
|
595
595
|
this.pending = !1;
|
|
596
|
-
var
|
|
597
|
-
if (
|
|
598
|
-
return
|
|
596
|
+
var s = this._execute(e, r);
|
|
597
|
+
if (s)
|
|
598
|
+
return s;
|
|
599
599
|
this.pending === !1 && this.id != null && (this.id = this.recycleAsyncId(this.scheduler, this.id, null));
|
|
600
600
|
}, t.prototype._execute = function(e, r) {
|
|
601
|
-
var
|
|
601
|
+
var s = !1, i;
|
|
602
602
|
try {
|
|
603
603
|
this.work(e);
|
|
604
604
|
} catch (o) {
|
|
605
|
-
|
|
605
|
+
s = !0, i = o || new Error("Scheduled action threw falsy error");
|
|
606
606
|
}
|
|
607
|
-
if (
|
|
608
|
-
return this.unsubscribe(),
|
|
607
|
+
if (s)
|
|
608
|
+
return this.unsubscribe(), i;
|
|
609
609
|
}, t.prototype.unsubscribe = function() {
|
|
610
610
|
if (!this.closed) {
|
|
611
|
-
var e = this, r = e.id,
|
|
612
|
-
this.work = this.state = this.scheduler = null, this.pending = !1, F(
|
|
611
|
+
var e = this, r = e.id, s = e.scheduler, i = s.actions;
|
|
612
|
+
this.work = this.state = this.scheduler = null, this.pending = !1, F(i, this), r != null && (this.id = this.recycleAsyncId(s, r, null)), this.delay = null, n.prototype.unsubscribe.call(this);
|
|
613
613
|
}
|
|
614
614
|
}, t;
|
|
615
|
-
}(
|
|
615
|
+
}(qe), ce = function() {
|
|
616
616
|
function n(t, e) {
|
|
617
617
|
e === void 0 && (e = n.now), this.schedulerActionCtor = t, this.now = e;
|
|
618
618
|
}
|
|
619
619
|
return n.prototype.schedule = function(t, e, r) {
|
|
620
620
|
return e === void 0 && (e = 0), new this.schedulerActionCtor(this, t).schedule(r, e);
|
|
621
|
-
}, n.now =
|
|
622
|
-
}(),
|
|
621
|
+
}, n.now = Qe.now, n;
|
|
622
|
+
}(), Be = function(n) {
|
|
623
623
|
M(t, n);
|
|
624
624
|
function t(e, r) {
|
|
625
625
|
r === void 0 && (r = ce.now);
|
|
626
|
-
var
|
|
627
|
-
return
|
|
626
|
+
var s = n.call(this, e, r) || this;
|
|
627
|
+
return s.actions = [], s._active = !1, s;
|
|
628
628
|
}
|
|
629
629
|
return t.prototype.flush = function(e) {
|
|
630
630
|
var r = this.actions;
|
|
@@ -632,85 +632,85 @@ var De = function(n) {
|
|
|
632
632
|
r.push(e);
|
|
633
633
|
return;
|
|
634
634
|
}
|
|
635
|
-
var
|
|
635
|
+
var s;
|
|
636
636
|
this._active = !0;
|
|
637
637
|
do
|
|
638
|
-
if (
|
|
638
|
+
if (s = e.execute(e.state, e.delay))
|
|
639
639
|
break;
|
|
640
640
|
while (e = r.shift());
|
|
641
|
-
if (this._active = !1,
|
|
641
|
+
if (this._active = !1, s) {
|
|
642
642
|
for (; e = r.shift(); )
|
|
643
643
|
e.unsubscribe();
|
|
644
|
-
throw
|
|
644
|
+
throw s;
|
|
645
645
|
}
|
|
646
646
|
}, t;
|
|
647
|
-
}(ce),
|
|
648
|
-
function
|
|
649
|
-
return n &&
|
|
647
|
+
}(ce), Ye = new Be(Ge), ze = Ye;
|
|
648
|
+
function We(n) {
|
|
649
|
+
return n && E(n.schedule);
|
|
650
650
|
}
|
|
651
|
-
var
|
|
651
|
+
var Ke = X(function(n) {
|
|
652
652
|
return function() {
|
|
653
653
|
n(this), this.name = "EmptyError", this.message = "no elements in sequence";
|
|
654
654
|
};
|
|
655
655
|
});
|
|
656
|
-
function
|
|
656
|
+
function T(n, t) {
|
|
657
657
|
var e = typeof t == "object";
|
|
658
|
-
return new Promise(function(r,
|
|
659
|
-
var
|
|
658
|
+
return new Promise(function(r, s) {
|
|
659
|
+
var i = new H({
|
|
660
660
|
next: function(o) {
|
|
661
|
-
r(o),
|
|
661
|
+
r(o), i.unsubscribe();
|
|
662
662
|
},
|
|
663
|
-
error:
|
|
663
|
+
error: s,
|
|
664
664
|
complete: function() {
|
|
665
|
-
e ? r(t.defaultValue) :
|
|
665
|
+
e ? r(t.defaultValue) : s(new Ke());
|
|
666
666
|
}
|
|
667
667
|
});
|
|
668
|
-
n.subscribe(
|
|
668
|
+
n.subscribe(i);
|
|
669
669
|
});
|
|
670
670
|
}
|
|
671
|
-
function
|
|
671
|
+
function Je(n) {
|
|
672
672
|
return n instanceof Date && !isNaN(n);
|
|
673
673
|
}
|
|
674
674
|
function O(n, t) {
|
|
675
675
|
return Ce(function(e, r) {
|
|
676
|
-
var
|
|
677
|
-
e.subscribe(Me(r, function(
|
|
678
|
-
r.next(n.call(t,
|
|
676
|
+
var s = 0;
|
|
677
|
+
e.subscribe(Me(r, function(i) {
|
|
678
|
+
r.next(n.call(t, i, s++));
|
|
679
679
|
}));
|
|
680
680
|
});
|
|
681
681
|
}
|
|
682
682
|
function Xe(n, t, e) {
|
|
683
|
-
n === void 0 && (n = 0), e === void 0 && (e =
|
|
683
|
+
n === void 0 && (n = 0), e === void 0 && (e = ze);
|
|
684
684
|
var r = -1;
|
|
685
|
-
return t != null && (
|
|
686
|
-
var
|
|
687
|
-
|
|
685
|
+
return t != null && (We(t) ? e = t : r = t), new B(function(s) {
|
|
686
|
+
var i = Je(n) ? +n - e.now() : n;
|
|
687
|
+
i < 0 && (i = 0);
|
|
688
688
|
var o = 0;
|
|
689
689
|
return e.schedule(function() {
|
|
690
|
-
|
|
691
|
-
},
|
|
690
|
+
s.closed || (s.next(o++), 0 <= r ? this.schedule(void 0, r) : s.complete());
|
|
691
|
+
}, i);
|
|
692
692
|
});
|
|
693
693
|
}
|
|
694
694
|
function Ze(n, t, e) {
|
|
695
|
-
var r =
|
|
696
|
-
return r ? Ce(function(
|
|
695
|
+
var r = E(n) || t || e ? { next: n, error: t, complete: e } : n;
|
|
696
|
+
return r ? Ce(function(s, i) {
|
|
697
697
|
var o;
|
|
698
698
|
(o = r.subscribe) === null || o === void 0 || o.call(r);
|
|
699
|
-
var
|
|
700
|
-
|
|
699
|
+
var a = !0;
|
|
700
|
+
s.subscribe(Me(i, function(c) {
|
|
701
701
|
var u;
|
|
702
|
-
(u = r.next) === null || u === void 0 || u.call(r,
|
|
702
|
+
(u = r.next) === null || u === void 0 || u.call(r, c), i.next(c);
|
|
703
703
|
}, function() {
|
|
704
|
-
var
|
|
705
|
-
|
|
706
|
-
}, function(
|
|
704
|
+
var c;
|
|
705
|
+
a = !1, (c = r.complete) === null || c === void 0 || c.call(r), i.complete();
|
|
706
|
+
}, function(c) {
|
|
707
707
|
var u;
|
|
708
|
-
|
|
708
|
+
a = !1, (u = r.error) === null || u === void 0 || u.call(r, c), i.error(c);
|
|
709
709
|
}, function() {
|
|
710
|
-
var
|
|
711
|
-
|
|
710
|
+
var c, u;
|
|
711
|
+
a && ((c = r.unsubscribe) === null || c === void 0 || c.call(r)), (u = r.finalize) === null || u === void 0 || u.call(r);
|
|
712
712
|
}));
|
|
713
|
-
}) :
|
|
713
|
+
}) : Se;
|
|
714
714
|
}
|
|
715
715
|
var et = Object.defineProperty, tt = (n, t, e) => t in n ? et(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, C = (n, t, e) => (tt(n, typeof t != "symbol" ? t + "" : t, e), e);
|
|
716
716
|
class h extends Error {
|
|
@@ -718,7 +718,7 @@ class h extends Error {
|
|
|
718
718
|
super(`Incorrect context (${t}). Cannot perform the requested operation.`), C(this, "context"), this.context = t;
|
|
719
719
|
}
|
|
720
720
|
}
|
|
721
|
-
class
|
|
721
|
+
class I extends Error {
|
|
722
722
|
constructor(t, e, r) {
|
|
723
723
|
super(`Invalid parameter (${t}). ${r}`), this.param = t, this.value = e, this.reason = r;
|
|
724
724
|
}
|
|
@@ -746,15 +746,15 @@ class le extends Error {
|
|
|
746
746
|
e && (r += ` Minimum version supported is ${e}.`), super(r), this.version = t;
|
|
747
747
|
}
|
|
748
748
|
}
|
|
749
|
-
function
|
|
749
|
+
function S(n) {
|
|
750
750
|
return typeof n == "function";
|
|
751
751
|
}
|
|
752
|
-
function
|
|
753
|
-
return
|
|
752
|
+
function st(n) {
|
|
753
|
+
return S(n == null ? void 0 : n.lift);
|
|
754
754
|
}
|
|
755
|
-
function
|
|
755
|
+
function P(n) {
|
|
756
756
|
return function(t) {
|
|
757
|
-
if (
|
|
757
|
+
if (st(t))
|
|
758
758
|
return t.lift(function(e) {
|
|
759
759
|
try {
|
|
760
760
|
return n(e, this);
|
|
@@ -765,18 +765,18 @@ function R(n) {
|
|
|
765
765
|
throw new TypeError("Unable to lift unknown Observable type");
|
|
766
766
|
};
|
|
767
767
|
}
|
|
768
|
-
var
|
|
769
|
-
return
|
|
768
|
+
var z = function(n, t) {
|
|
769
|
+
return z = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, r) {
|
|
770
770
|
e.__proto__ = r;
|
|
771
771
|
} || function(e, r) {
|
|
772
|
-
for (var
|
|
773
|
-
Object.prototype.hasOwnProperty.call(r,
|
|
774
|
-
},
|
|
772
|
+
for (var s in r)
|
|
773
|
+
Object.prototype.hasOwnProperty.call(r, s) && (e[s] = r[s]);
|
|
774
|
+
}, z(n, t);
|
|
775
775
|
};
|
|
776
776
|
function ee(n, t) {
|
|
777
777
|
if (typeof t != "function" && t !== null)
|
|
778
778
|
throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
|
|
779
|
-
|
|
779
|
+
z(n, t);
|
|
780
780
|
function e() {
|
|
781
781
|
this.constructor = n;
|
|
782
782
|
}
|
|
@@ -794,39 +794,39 @@ function he(n) {
|
|
|
794
794
|
};
|
|
795
795
|
throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
796
796
|
}
|
|
797
|
-
function
|
|
797
|
+
function W(n, t) {
|
|
798
798
|
var e = typeof Symbol == "function" && n[Symbol.iterator];
|
|
799
799
|
if (!e)
|
|
800
800
|
return n;
|
|
801
|
-
var r = e.call(n),
|
|
801
|
+
var r = e.call(n), s, i = [], o;
|
|
802
802
|
try {
|
|
803
|
-
for (; (t === void 0 || t-- > 0) && !(
|
|
804
|
-
|
|
805
|
-
} catch (
|
|
806
|
-
o = { error:
|
|
803
|
+
for (; (t === void 0 || t-- > 0) && !(s = r.next()).done; )
|
|
804
|
+
i.push(s.value);
|
|
805
|
+
} catch (a) {
|
|
806
|
+
o = { error: a };
|
|
807
807
|
} finally {
|
|
808
808
|
try {
|
|
809
|
-
|
|
809
|
+
s && !s.done && (e = r.return) && e.call(r);
|
|
810
810
|
} finally {
|
|
811
811
|
if (o)
|
|
812
812
|
throw o.error;
|
|
813
813
|
}
|
|
814
814
|
}
|
|
815
|
-
return
|
|
815
|
+
return i;
|
|
816
816
|
}
|
|
817
|
-
function
|
|
817
|
+
function K(n, t, e) {
|
|
818
818
|
if (e || arguments.length === 2)
|
|
819
|
-
for (var r = 0,
|
|
820
|
-
(
|
|
821
|
-
return n.concat(
|
|
819
|
+
for (var r = 0, s = t.length, i; r < s; r++)
|
|
820
|
+
(i || !(r in t)) && (i || (i = Array.prototype.slice.call(t, 0, r)), i[r] = t[r]);
|
|
821
|
+
return n.concat(i || Array.prototype.slice.call(t));
|
|
822
822
|
}
|
|
823
|
-
function
|
|
823
|
+
function it(n) {
|
|
824
824
|
var t = function(r) {
|
|
825
825
|
Error.call(r), r.stack = new Error().stack;
|
|
826
826
|
}, e = n(t);
|
|
827
827
|
return e.prototype = Object.create(Error.prototype), e.prototype.constructor = e, e;
|
|
828
828
|
}
|
|
829
|
-
var
|
|
829
|
+
var j = it(function(n) {
|
|
830
830
|
return function(t) {
|
|
831
831
|
n(this), this.message = t ? t.length + ` errors occurred during unsubscription:
|
|
832
832
|
` + t.map(function(e, r) {
|
|
@@ -846,22 +846,22 @@ var te = function() {
|
|
|
846
846
|
this.initialTeardown = t, this.closed = !1, this._parentage = null, this._finalizers = null;
|
|
847
847
|
}
|
|
848
848
|
return n.prototype.unsubscribe = function() {
|
|
849
|
-
var t, e, r,
|
|
849
|
+
var t, e, r, s, i;
|
|
850
850
|
if (!this.closed) {
|
|
851
851
|
this.closed = !0;
|
|
852
852
|
var o = this._parentage;
|
|
853
853
|
if (o)
|
|
854
854
|
if (this._parentage = null, Array.isArray(o))
|
|
855
855
|
try {
|
|
856
|
-
for (var
|
|
857
|
-
var u =
|
|
856
|
+
for (var a = he(o), c = a.next(); !c.done; c = a.next()) {
|
|
857
|
+
var u = c.value;
|
|
858
858
|
u.remove(this);
|
|
859
859
|
}
|
|
860
|
-
} catch (
|
|
861
|
-
t = { error:
|
|
860
|
+
} catch (v) {
|
|
861
|
+
t = { error: v };
|
|
862
862
|
} finally {
|
|
863
863
|
try {
|
|
864
|
-
|
|
864
|
+
c && !c.done && (e = a.return) && e.call(a);
|
|
865
865
|
} finally {
|
|
866
866
|
if (t)
|
|
867
867
|
throw t.error;
|
|
@@ -870,37 +870,37 @@ var te = function() {
|
|
|
870
870
|
else
|
|
871
871
|
o.remove(this);
|
|
872
872
|
var l = this.initialTeardown;
|
|
873
|
-
if (
|
|
873
|
+
if (S(l))
|
|
874
874
|
try {
|
|
875
875
|
l();
|
|
876
|
-
} catch (
|
|
877
|
-
|
|
876
|
+
} catch (v) {
|
|
877
|
+
i = v instanceof j ? v.errors : [v];
|
|
878
878
|
}
|
|
879
879
|
var d = this._finalizers;
|
|
880
880
|
if (d) {
|
|
881
881
|
this._finalizers = null;
|
|
882
882
|
try {
|
|
883
|
-
for (var y = he(d),
|
|
884
|
-
var
|
|
883
|
+
for (var y = he(d), b = y.next(); !b.done; b = y.next()) {
|
|
884
|
+
var k = b.value;
|
|
885
885
|
try {
|
|
886
|
-
pe(
|
|
887
|
-
} catch (
|
|
888
|
-
|
|
886
|
+
pe(k);
|
|
887
|
+
} catch (v) {
|
|
888
|
+
i = i ?? [], v instanceof j ? i = K(K([], W(i)), W(v.errors)) : i.push(v);
|
|
889
889
|
}
|
|
890
890
|
}
|
|
891
|
-
} catch (
|
|
892
|
-
r = { error:
|
|
891
|
+
} catch (v) {
|
|
892
|
+
r = { error: v };
|
|
893
893
|
} finally {
|
|
894
894
|
try {
|
|
895
|
-
|
|
895
|
+
b && !b.done && (s = y.return) && s.call(y);
|
|
896
896
|
} finally {
|
|
897
897
|
if (r)
|
|
898
898
|
throw r.error;
|
|
899
899
|
}
|
|
900
900
|
}
|
|
901
901
|
}
|
|
902
|
-
if (
|
|
903
|
-
throw new
|
|
902
|
+
if (i)
|
|
903
|
+
throw new j(i);
|
|
904
904
|
}
|
|
905
905
|
}, n.prototype.add = function(t) {
|
|
906
906
|
var e;
|
|
@@ -934,12 +934,12 @@ var te = function() {
|
|
|
934
934
|
}();
|
|
935
935
|
te.EMPTY;
|
|
936
936
|
function Ie(n) {
|
|
937
|
-
return n instanceof te || n && "closed" in n &&
|
|
937
|
+
return n instanceof te || n && "closed" in n && S(n.remove) && S(n.add) && S(n.unsubscribe);
|
|
938
938
|
}
|
|
939
939
|
function pe(n) {
|
|
940
|
-
|
|
940
|
+
S(n) ? n() : n.unsubscribe();
|
|
941
941
|
}
|
|
942
|
-
var
|
|
942
|
+
var Te = {
|
|
943
943
|
onUnhandledError: null,
|
|
944
944
|
onStoppedNotification: null,
|
|
945
945
|
Promise: void 0,
|
|
@@ -949,7 +949,7 @@ var _e = {
|
|
|
949
949
|
setTimeout: function(n, t) {
|
|
950
950
|
for (var e = [], r = 2; r < arguments.length; r++)
|
|
951
951
|
e[r - 2] = arguments[r];
|
|
952
|
-
return setTimeout.apply(void 0,
|
|
952
|
+
return setTimeout.apply(void 0, K([n, t], W(e)));
|
|
953
953
|
},
|
|
954
954
|
clearTimeout: function(n) {
|
|
955
955
|
return clearTimeout(n);
|
|
@@ -972,8 +972,8 @@ var re = function(n) {
|
|
|
972
972
|
var r = n.call(this) || this;
|
|
973
973
|
return r.isStopped = !1, e ? (r.destination = e, Ie(e) && e.add(r)) : r.destination = dt, r;
|
|
974
974
|
}
|
|
975
|
-
return t.create = function(e, r,
|
|
976
|
-
return new
|
|
975
|
+
return t.create = function(e, r, s) {
|
|
976
|
+
return new J(e, r, s);
|
|
977
977
|
}, t.prototype.next = function(e) {
|
|
978
978
|
this.isStopped || this._next(e);
|
|
979
979
|
}, t.prototype.error = function(e) {
|
|
@@ -998,7 +998,7 @@ var re = function(n) {
|
|
|
998
998
|
}
|
|
999
999
|
}, t;
|
|
1000
1000
|
}(te), ut = Function.prototype.bind;
|
|
1001
|
-
function
|
|
1001
|
+
function Q(n, t) {
|
|
1002
1002
|
return ut.call(n, t);
|
|
1003
1003
|
}
|
|
1004
1004
|
var lt = function() {
|
|
@@ -1032,27 +1032,27 @@ var lt = function() {
|
|
|
1032
1032
|
L(e);
|
|
1033
1033
|
}
|
|
1034
1034
|
}, n;
|
|
1035
|
-
}(),
|
|
1035
|
+
}(), J = function(n) {
|
|
1036
1036
|
ee(t, n);
|
|
1037
|
-
function t(e, r,
|
|
1038
|
-
var
|
|
1039
|
-
if (
|
|
1037
|
+
function t(e, r, s) {
|
|
1038
|
+
var i = n.call(this) || this, o;
|
|
1039
|
+
if (S(e) || !e)
|
|
1040
1040
|
o = {
|
|
1041
1041
|
next: e ?? void 0,
|
|
1042
1042
|
error: r ?? void 0,
|
|
1043
|
-
complete:
|
|
1043
|
+
complete: s ?? void 0
|
|
1044
1044
|
};
|
|
1045
1045
|
else {
|
|
1046
|
-
var
|
|
1047
|
-
|
|
1048
|
-
return
|
|
1046
|
+
var a;
|
|
1047
|
+
i && Te.useDeprecatedNextContext ? (a = Object.create(e), a.unsubscribe = function() {
|
|
1048
|
+
return i.unsubscribe();
|
|
1049
1049
|
}, o = {
|
|
1050
|
-
next: e.next &&
|
|
1051
|
-
error: e.error &&
|
|
1052
|
-
complete: e.complete &&
|
|
1050
|
+
next: e.next && Q(e.next, a),
|
|
1051
|
+
error: e.error && Q(e.error, a),
|
|
1052
|
+
complete: e.complete && Q(e.complete, a)
|
|
1053
1053
|
}) : o = e;
|
|
1054
1054
|
}
|
|
1055
|
-
return
|
|
1055
|
+
return i.destination = new lt(o), i;
|
|
1056
1056
|
}
|
|
1057
1057
|
return t;
|
|
1058
1058
|
}(re);
|
|
@@ -1070,11 +1070,11 @@ var dt = {
|
|
|
1070
1070
|
}, pt = function() {
|
|
1071
1071
|
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
|
1072
1072
|
}();
|
|
1073
|
-
function
|
|
1073
|
+
function Re(n) {
|
|
1074
1074
|
return n;
|
|
1075
1075
|
}
|
|
1076
1076
|
function ft(n) {
|
|
1077
|
-
return n.length === 0 ?
|
|
1077
|
+
return n.length === 0 ? Re : n.length === 1 ? n[0] : function(t) {
|
|
1078
1078
|
return n.reduce(function(e, r) {
|
|
1079
1079
|
return r(e);
|
|
1080
1080
|
}, t);
|
|
@@ -1088,11 +1088,11 @@ var gt = function() {
|
|
|
1088
1088
|
var e = new n();
|
|
1089
1089
|
return e.source = this, e.operator = t, e;
|
|
1090
1090
|
}, n.prototype.subscribe = function(t, e, r) {
|
|
1091
|
-
var
|
|
1091
|
+
var s = this, i = yt(t) ? t : new J(t, e, r);
|
|
1092
1092
|
return ct(function() {
|
|
1093
|
-
var o =
|
|
1094
|
-
|
|
1095
|
-
}),
|
|
1093
|
+
var o = s, a = o.operator, c = o.source;
|
|
1094
|
+
i.add(a ? a.call(i, c) : c ? s._subscribe(i) : s._trySubscribe(i));
|
|
1095
|
+
}), i;
|
|
1096
1096
|
}, n.prototype._trySubscribe = function(t) {
|
|
1097
1097
|
try {
|
|
1098
1098
|
return this._subscribe(t);
|
|
@@ -1101,17 +1101,17 @@ var gt = function() {
|
|
|
1101
1101
|
}
|
|
1102
1102
|
}, n.prototype.forEach = function(t, e) {
|
|
1103
1103
|
var r = this;
|
|
1104
|
-
return e = ge(e), new e(function(
|
|
1105
|
-
var o = new
|
|
1106
|
-
next: function(
|
|
1104
|
+
return e = ge(e), new e(function(s, i) {
|
|
1105
|
+
var o = new J({
|
|
1106
|
+
next: function(a) {
|
|
1107
1107
|
try {
|
|
1108
|
-
t(
|
|
1109
|
-
} catch (
|
|
1110
|
-
|
|
1108
|
+
t(a);
|
|
1109
|
+
} catch (c) {
|
|
1110
|
+
i(c), o.unsubscribe();
|
|
1111
1111
|
}
|
|
1112
1112
|
},
|
|
1113
|
-
error:
|
|
1114
|
-
complete:
|
|
1113
|
+
error: i,
|
|
1114
|
+
complete: s
|
|
1115
1115
|
});
|
|
1116
1116
|
r.subscribe(o);
|
|
1117
1117
|
});
|
|
@@ -1126,14 +1126,14 @@ var gt = function() {
|
|
|
1126
1126
|
return ft(t)(this);
|
|
1127
1127
|
}, n.prototype.toPromise = function(t) {
|
|
1128
1128
|
var e = this;
|
|
1129
|
-
return t = ge(t), new t(function(r,
|
|
1130
|
-
var
|
|
1129
|
+
return t = ge(t), new t(function(r, s) {
|
|
1130
|
+
var i;
|
|
1131
1131
|
e.subscribe(function(o) {
|
|
1132
|
-
return
|
|
1132
|
+
return i = o;
|
|
1133
1133
|
}, function(o) {
|
|
1134
|
-
return
|
|
1134
|
+
return s(o);
|
|
1135
1135
|
}, function() {
|
|
1136
|
-
return r(
|
|
1136
|
+
return r(i);
|
|
1137
1137
|
});
|
|
1138
1138
|
});
|
|
1139
1139
|
}, n.create = function(t) {
|
|
@@ -1142,44 +1142,44 @@ var gt = function() {
|
|
|
1142
1142
|
}();
|
|
1143
1143
|
function ge(n) {
|
|
1144
1144
|
var t;
|
|
1145
|
-
return (t = n ??
|
|
1145
|
+
return (t = n ?? Te.Promise) !== null && t !== void 0 ? t : Promise;
|
|
1146
1146
|
}
|
|
1147
1147
|
function vt(n) {
|
|
1148
|
-
return n &&
|
|
1148
|
+
return n && S(n.next) && S(n.error) && S(n.complete);
|
|
1149
1149
|
}
|
|
1150
1150
|
function yt(n) {
|
|
1151
1151
|
return n && n instanceof re || vt(n) && Ie(n);
|
|
1152
1152
|
}
|
|
1153
|
-
function
|
|
1154
|
-
return new bt(n, t, e, r,
|
|
1153
|
+
function _(n, t, e, r, s) {
|
|
1154
|
+
return new bt(n, t, e, r, s);
|
|
1155
1155
|
}
|
|
1156
1156
|
var bt = function(n) {
|
|
1157
1157
|
ee(t, n);
|
|
1158
|
-
function t(e, r,
|
|
1159
|
-
var
|
|
1160
|
-
return
|
|
1158
|
+
function t(e, r, s, i, o, a) {
|
|
1159
|
+
var c = n.call(this, e) || this;
|
|
1160
|
+
return c.onFinalize = o, c.shouldUnsubscribe = a, c._next = r ? function(u) {
|
|
1161
1161
|
try {
|
|
1162
1162
|
r(u);
|
|
1163
1163
|
} catch (l) {
|
|
1164
1164
|
e.error(l);
|
|
1165
1165
|
}
|
|
1166
|
-
} : n.prototype._next,
|
|
1166
|
+
} : n.prototype._next, c._error = i ? function(u) {
|
|
1167
1167
|
try {
|
|
1168
|
-
|
|
1168
|
+
i(u);
|
|
1169
1169
|
} catch (l) {
|
|
1170
1170
|
e.error(l);
|
|
1171
1171
|
} finally {
|
|
1172
1172
|
this.unsubscribe();
|
|
1173
1173
|
}
|
|
1174
|
-
} : n.prototype._error,
|
|
1174
|
+
} : n.prototype._error, c._complete = s ? function() {
|
|
1175
1175
|
try {
|
|
1176
|
-
|
|
1176
|
+
s();
|
|
1177
1177
|
} catch (u) {
|
|
1178
1178
|
e.error(u);
|
|
1179
1179
|
} finally {
|
|
1180
1180
|
this.unsubscribe();
|
|
1181
1181
|
}
|
|
1182
|
-
} : n.prototype._complete,
|
|
1182
|
+
} : n.prototype._complete, c;
|
|
1183
1183
|
}
|
|
1184
1184
|
return t.prototype.unsubscribe = function() {
|
|
1185
1185
|
var e;
|
|
@@ -1190,10 +1190,10 @@ var bt = function(n) {
|
|
|
1190
1190
|
}, t;
|
|
1191
1191
|
}(re);
|
|
1192
1192
|
function p(n, t) {
|
|
1193
|
-
return
|
|
1194
|
-
var
|
|
1195
|
-
e.subscribe(
|
|
1196
|
-
r.next(n.call(t,
|
|
1193
|
+
return P(function(e, r) {
|
|
1194
|
+
var s = 0;
|
|
1195
|
+
e.subscribe(_(r, function(i) {
|
|
1196
|
+
r.next(n.call(t, i, s++));
|
|
1197
1197
|
}));
|
|
1198
1198
|
});
|
|
1199
1199
|
}
|
|
@@ -1203,67 +1203,67 @@ var mt = new gt(function(n) {
|
|
|
1203
1203
|
function m(n) {
|
|
1204
1204
|
return n <= 0 ? function() {
|
|
1205
1205
|
return mt;
|
|
1206
|
-
} :
|
|
1206
|
+
} : P(function(t, e) {
|
|
1207
1207
|
var r = 0;
|
|
1208
|
-
t.subscribe(
|
|
1209
|
-
++r <= n && (e.next(
|
|
1208
|
+
t.subscribe(_(e, function(s) {
|
|
1209
|
+
++r <= n && (e.next(s), n <= r && e.complete());
|
|
1210
1210
|
}));
|
|
1211
1211
|
});
|
|
1212
1212
|
}
|
|
1213
|
-
function
|
|
1214
|
-
return
|
|
1215
|
-
var
|
|
1216
|
-
e.subscribe(
|
|
1217
|
-
return n.call(t,
|
|
1213
|
+
function g(n, t) {
|
|
1214
|
+
return P(function(e, r) {
|
|
1215
|
+
var s = 0;
|
|
1216
|
+
e.subscribe(_(r, function(i) {
|
|
1217
|
+
return n.call(t, i, s++) && r.next(i);
|
|
1218
1218
|
}));
|
|
1219
1219
|
});
|
|
1220
1220
|
}
|
|
1221
1221
|
function wt(n, t) {
|
|
1222
|
-
return t === void 0 && (t = !1),
|
|
1223
|
-
var
|
|
1224
|
-
e.subscribe(
|
|
1225
|
-
var o = n(
|
|
1226
|
-
(o || t) && r.next(
|
|
1222
|
+
return t === void 0 && (t = !1), P(function(e, r) {
|
|
1223
|
+
var s = 0;
|
|
1224
|
+
e.subscribe(_(r, function(i) {
|
|
1225
|
+
var o = n(i, s++);
|
|
1226
|
+
(o || t) && r.next(i), !o && r.complete();
|
|
1227
1227
|
}));
|
|
1228
1228
|
});
|
|
1229
1229
|
}
|
|
1230
1230
|
function f(n, t, e) {
|
|
1231
|
-
var r =
|
|
1232
|
-
return r ?
|
|
1231
|
+
var r = S(n) || t || e ? { next: n, error: t, complete: e } : n;
|
|
1232
|
+
return r ? P(function(s, i) {
|
|
1233
1233
|
var o;
|
|
1234
1234
|
(o = r.subscribe) === null || o === void 0 || o.call(r);
|
|
1235
|
-
var
|
|
1236
|
-
|
|
1235
|
+
var a = !0;
|
|
1236
|
+
s.subscribe(_(i, function(c) {
|
|
1237
1237
|
var u;
|
|
1238
|
-
(u = r.next) === null || u === void 0 || u.call(r,
|
|
1238
|
+
(u = r.next) === null || u === void 0 || u.call(r, c), i.next(c);
|
|
1239
1239
|
}, function() {
|
|
1240
|
-
var
|
|
1241
|
-
|
|
1242
|
-
}, function(
|
|
1240
|
+
var c;
|
|
1241
|
+
a = !1, (c = r.complete) === null || c === void 0 || c.call(r), i.complete();
|
|
1242
|
+
}, function(c) {
|
|
1243
1243
|
var u;
|
|
1244
|
-
|
|
1244
|
+
a = !1, (u = r.error) === null || u === void 0 || u.call(r, c), i.error(c);
|
|
1245
1245
|
}, function() {
|
|
1246
|
-
var
|
|
1247
|
-
|
|
1246
|
+
var c, u;
|
|
1247
|
+
a && ((c = r.unsubscribe) === null || c === void 0 || c.call(r)), (u = r.finalize) === null || u === void 0 || u.call(r);
|
|
1248
1248
|
}));
|
|
1249
|
-
}) :
|
|
1249
|
+
}) : Re;
|
|
1250
1250
|
}
|
|
1251
|
-
const
|
|
1252
|
-
function
|
|
1251
|
+
const Et = /^(\d+)\.(\d+)$/;
|
|
1252
|
+
function St(n) {
|
|
1253
1253
|
if (typeof n == "string") {
|
|
1254
|
-
const t = n.match(
|
|
1254
|
+
const t = n.match(Et);
|
|
1255
1255
|
if (t)
|
|
1256
1256
|
return `${t[1]}.${t[2]}`;
|
|
1257
1257
|
}
|
|
1258
1258
|
throw new nt(n);
|
|
1259
1259
|
}
|
|
1260
1260
|
function ve(n) {
|
|
1261
|
-
const t =
|
|
1262
|
-
return [
|
|
1261
|
+
const t = St(n), [e, r] = t.split("."), [s, i] = [parseInt(e), parseInt(r)];
|
|
1262
|
+
return [s, i];
|
|
1263
1263
|
}
|
|
1264
1264
|
function ne(n, t) {
|
|
1265
|
-
const [e, r] = ve(n), [
|
|
1266
|
-
return e <
|
|
1265
|
+
const [e, r] = ve(n), [s, i] = ve(t);
|
|
1266
|
+
return e < s ? -1 : e > s ? 1 : r < i ? -1 : r > i ? 1 : 0;
|
|
1267
1267
|
}
|
|
1268
1268
|
function Ct(n, t) {
|
|
1269
1269
|
return ne(n, t) === 1;
|
|
@@ -1303,7 +1303,7 @@ class xt {
|
|
|
1303
1303
|
return this.inIframe ? this.iframePort1 : (e = (t = window.Acrobits) == null ? void 0 : t.messageChannel) == null ? void 0 : e.port1;
|
|
1304
1304
|
}
|
|
1305
1305
|
get port2() {
|
|
1306
|
-
var t, e, r,
|
|
1306
|
+
var t, e, r, s;
|
|
1307
1307
|
if (this.inIframe) {
|
|
1308
1308
|
if (!this.iframePort2)
|
|
1309
1309
|
throw new ue("port2");
|
|
@@ -1311,7 +1311,7 @@ class xt {
|
|
|
1311
1311
|
} else {
|
|
1312
1312
|
if (!((e = (t = window.Acrobits) == null ? void 0 : t.messageChannel) != null && e.port2))
|
|
1313
1313
|
throw new ue("port2");
|
|
1314
|
-
return (
|
|
1314
|
+
return (s = (r = window.Acrobits) == null ? void 0 : r.messageChannel) == null ? void 0 : s.port2;
|
|
1315
1315
|
}
|
|
1316
1316
|
}
|
|
1317
1317
|
/**
|
|
@@ -1337,16 +1337,16 @@ class xt {
|
|
|
1337
1337
|
const t = "HELLO", e = this.createMessage(t);
|
|
1338
1338
|
e.protocolVersions = this.supportedVersions, this.logCreated(t, e);
|
|
1339
1339
|
const r = this.incomingMessages$.pipe(
|
|
1340
|
-
|
|
1341
|
-
p((
|
|
1340
|
+
g((s) => s.type === t && s.replyTo === e.id),
|
|
1341
|
+
p((s) => s),
|
|
1342
1342
|
f(this.logReceived(t)),
|
|
1343
|
-
p((
|
|
1344
|
-
if (this.supportedVersions.some((
|
|
1345
|
-
throw new le(
|
|
1346
|
-
return
|
|
1343
|
+
p((s) => {
|
|
1344
|
+
if (this.supportedVersions.some((i) => Ct(i, s.protocolVersion)))
|
|
1345
|
+
throw new le(s.protocolVersion, this.supportedVersions[0]);
|
|
1346
|
+
return s;
|
|
1347
1347
|
}),
|
|
1348
|
-
f((
|
|
1349
|
-
this.negotiatedProtocolVersion =
|
|
1348
|
+
f((s) => {
|
|
1349
|
+
this.negotiatedProtocolVersion = s.protocolVersion, this.logService.info(
|
|
1350
1350
|
`[IPC] Negotiated IPC Protocol Version: ${this.negotiatedProtocolVersion}`
|
|
1351
1351
|
);
|
|
1352
1352
|
}),
|
|
@@ -1367,8 +1367,8 @@ class xt {
|
|
|
1367
1367
|
const t = "TOKEN", e = this.createMessage(t);
|
|
1368
1368
|
this.logCreated(t, e);
|
|
1369
1369
|
const r = this.incomingMessages$.pipe(
|
|
1370
|
-
|
|
1371
|
-
p((
|
|
1370
|
+
g((s) => s.type === t && s.replyTo === e.id),
|
|
1371
|
+
p((s) => s),
|
|
1372
1372
|
f(this.logReceived(t)),
|
|
1373
1373
|
m(1)
|
|
1374
1374
|
);
|
|
@@ -1393,14 +1393,14 @@ class xt {
|
|
|
1393
1393
|
const {
|
|
1394
1394
|
roomName: e,
|
|
1395
1395
|
roomInvite: r,
|
|
1396
|
-
displayName:
|
|
1397
|
-
jwtToken:
|
|
1396
|
+
displayName: s,
|
|
1397
|
+
jwtToken: i,
|
|
1398
1398
|
serverUrl: o,
|
|
1399
|
-
region:
|
|
1400
|
-
joinMicMuted:
|
|
1399
|
+
region: a,
|
|
1400
|
+
joinMicMuted: c,
|
|
1401
1401
|
joinWithoutCamera: u
|
|
1402
1402
|
} = t, l = "JOINING ROOM", d = this.createMessage(l, !1);
|
|
1403
|
-
d.roomName = e, d.jwtToken =
|
|
1403
|
+
d.roomName = e, d.jwtToken = i, d.serverUrl = o, d.region = a, d.roomInvite = r, d.joinMicMuted = c ?? !1, d.joinWithoutCamera = u ?? !1, d.displayName = s, this.logCreated(l, d), this.port2.postMessage(d), this.logSent(l, d);
|
|
1404
1404
|
}
|
|
1405
1405
|
/**
|
|
1406
1406
|
* Sends a {@link LeavingRoomMessage} lifecycle message to the Host app.
|
|
@@ -1450,7 +1450,7 @@ class xt {
|
|
|
1450
1450
|
throw new h(this.currentContext);
|
|
1451
1451
|
const t = "JOIN ROOM";
|
|
1452
1452
|
return this.incomingMessages$.pipe(
|
|
1453
|
-
|
|
1453
|
+
g((e) => e.type === t && e.target === "client"),
|
|
1454
1454
|
p((e) => e),
|
|
1455
1455
|
f(this.logReceived(t)),
|
|
1456
1456
|
p((e) => e)
|
|
@@ -1486,7 +1486,7 @@ class xt {
|
|
|
1486
1486
|
throw new h(this.currentContext);
|
|
1487
1487
|
const t = "LEAVE ROOM";
|
|
1488
1488
|
return this.incomingMessages$.pipe(
|
|
1489
|
-
|
|
1489
|
+
g((e) => e.type === t && e.target === "client"),
|
|
1490
1490
|
p((e) => e),
|
|
1491
1491
|
f(this.logReceived(t)),
|
|
1492
1492
|
p((e) => e)
|
|
@@ -1523,7 +1523,7 @@ class xt {
|
|
|
1523
1523
|
throw new h(this.currentContext);
|
|
1524
1524
|
const t = "CONFIG";
|
|
1525
1525
|
return this.incomingMessages$.pipe(
|
|
1526
|
-
|
|
1526
|
+
g((e) => e.type === t && e.target === "client"),
|
|
1527
1527
|
p((e) => e),
|
|
1528
1528
|
f(this.logReceived(t)),
|
|
1529
1529
|
p((e) => ({
|
|
@@ -1545,27 +1545,27 @@ class xt {
|
|
|
1545
1545
|
throw new h(this.currentContext);
|
|
1546
1546
|
const e = "SCREENSHARE SOURCE", r = this.createMessage(e);
|
|
1547
1547
|
r.sourceTypes = t, this.logCreated(e, r);
|
|
1548
|
-
const
|
|
1549
|
-
|
|
1550
|
-
p((
|
|
1548
|
+
const s = this.incomingMessages$.pipe(
|
|
1549
|
+
g((i) => i.type === e && i.replyTo === r.id),
|
|
1550
|
+
p((i) => i),
|
|
1551
1551
|
f(this.logReceived(e)),
|
|
1552
|
-
p((
|
|
1552
|
+
p((i) => i),
|
|
1553
1553
|
m(1)
|
|
1554
1554
|
);
|
|
1555
|
-
return this.logService.debug(`Created ${e} Reply handler`), this.port2.postMessage(r), this.logSent(e, r),
|
|
1555
|
+
return this.logService.debug(`Created ${e} Reply handler`), this.port2.postMessage(r), this.logSent(e, r), s;
|
|
1556
1556
|
}
|
|
1557
1557
|
layoutChange(t, e, r) {
|
|
1558
1558
|
if (!this.isEmbedded())
|
|
1559
1559
|
throw new h(this.currentContext);
|
|
1560
|
-
const
|
|
1561
|
-
let
|
|
1562
|
-
if (e && r ? (
|
|
1563
|
-
|
|
1564
|
-
p((
|
|
1565
|
-
f(this.logReceived(
|
|
1566
|
-
p((
|
|
1560
|
+
const s = "LAYOUT CHANGE";
|
|
1561
|
+
let i, o;
|
|
1562
|
+
if (e && r ? (i = this.createMessage(s, !1, r), i.result = e) : (i = this.createMessage(s), o = this.incomingMessages$.pipe(
|
|
1563
|
+
g((a) => a.type === s && a.replyTo === i.id),
|
|
1564
|
+
p((a) => a),
|
|
1565
|
+
f(this.logReceived(s)),
|
|
1566
|
+
p((a) => a),
|
|
1567
1567
|
m(1)
|
|
1568
|
-
), this.logService.debug(`Created ${
|
|
1568
|
+
), this.logService.debug(`Created ${s} Reply handler`)), i.layout = t, this.logCreated(s, i), this.port2.postMessage(i), this.logSent(s, i), o)
|
|
1569
1569
|
return o;
|
|
1570
1570
|
}
|
|
1571
1571
|
/**
|
|
@@ -1604,7 +1604,7 @@ class xt {
|
|
|
1604
1604
|
throw new h(this.currentContext);
|
|
1605
1605
|
const t = "LAYOUT CHANGE";
|
|
1606
1606
|
return this.incomingMessages$.pipe(
|
|
1607
|
-
|
|
1607
|
+
g((e) => e.type === t && e.target === "client" && e.replyTo === null),
|
|
1608
1608
|
p((e) => e),
|
|
1609
1609
|
f(this.logReceived(t)),
|
|
1610
1610
|
p((e) => e)
|
|
@@ -1616,50 +1616,50 @@ class xt {
|
|
|
1616
1616
|
Array.isArray(t) || (t = [t]);
|
|
1617
1617
|
const e = "OAUTH TOKEN", r = this.createMessage(e);
|
|
1618
1618
|
r.providerTypes = t, this.logCreated(e, r);
|
|
1619
|
-
const
|
|
1620
|
-
|
|
1621
|
-
p((
|
|
1619
|
+
const s = this.incomingMessages$.pipe(
|
|
1620
|
+
g((i) => i.type === e && i.replyTo === r.id),
|
|
1621
|
+
p((i) => i),
|
|
1622
1622
|
f(this.logReceived(e)),
|
|
1623
1623
|
m(1)
|
|
1624
1624
|
);
|
|
1625
|
-
return this.logService.debug(`Created ${e} Reply handler`), this.port2.postMessage(r), this.logSent(e, r),
|
|
1625
|
+
return this.logService.debug(`Created ${e} Reply handler`), this.port2.postMessage(r), this.logSent(e, r), s;
|
|
1626
1626
|
}
|
|
1627
1627
|
openUrl(t, e) {
|
|
1628
1628
|
if (!this.isEmbedded())
|
|
1629
1629
|
throw new h(this.currentContext);
|
|
1630
|
-
const r = "OPEN URL",
|
|
1631
|
-
|
|
1630
|
+
const r = "OPEN URL", s = this.createMessage(r, !1);
|
|
1631
|
+
s.url = t, s.data = e, this.logCreated(r, s), this.port2.postMessage(s), this.logSent(r, s);
|
|
1632
1632
|
}
|
|
1633
|
-
selectContacts(t, e, r,
|
|
1633
|
+
selectContacts(t, e, r, s) {
|
|
1634
1634
|
if (!this.isEmbedded())
|
|
1635
1635
|
throw new h(this.currentContext);
|
|
1636
|
-
if (e === "group" &&
|
|
1637
|
-
throw new
|
|
1636
|
+
if (e === "group" && s === void 0)
|
|
1637
|
+
throw new I(
|
|
1638
1638
|
"currentContacts",
|
|
1639
|
-
|
|
1639
|
+
s,
|
|
1640
1640
|
"currentContacts is required for group streams"
|
|
1641
1641
|
);
|
|
1642
|
-
if (e === "direct" &&
|
|
1643
|
-
throw new
|
|
1642
|
+
if (e === "direct" && s !== void 0)
|
|
1643
|
+
throw new I(
|
|
1644
1644
|
"currentContacts",
|
|
1645
|
-
|
|
1645
|
+
s,
|
|
1646
1646
|
"currentContacts should not be passed for direct streams"
|
|
1647
1647
|
);
|
|
1648
|
-
const
|
|
1649
|
-
o.streamType = e, o.streamId = t, o.contactType = r, o.currentContacts =
|
|
1650
|
-
const
|
|
1651
|
-
|
|
1652
|
-
f(this.logReceived(
|
|
1648
|
+
const i = "SELECT CONTACTS", o = this.createMessage(i, !0);
|
|
1649
|
+
o.streamType = e, o.streamId = t, o.contactType = r, o.currentContacts = s, this.logCreated(i, o);
|
|
1650
|
+
const a = this.incomingMessages$.pipe(
|
|
1651
|
+
g((c) => c.type === i && c.replyTo === o.id),
|
|
1652
|
+
f(this.logReceived(i)),
|
|
1653
1653
|
// validate if `streamId` is the same as we sent
|
|
1654
|
-
p((
|
|
1655
|
-
const u =
|
|
1654
|
+
p((c) => {
|
|
1655
|
+
const u = c;
|
|
1656
1656
|
if (u.streamId !== t)
|
|
1657
1657
|
throw new rt(u.streamId, t);
|
|
1658
1658
|
return e === "direct" && u.contacts.length > 1 && (u.contacts = [u.contacts[0]]), u;
|
|
1659
1659
|
}),
|
|
1660
1660
|
m(1)
|
|
1661
1661
|
);
|
|
1662
|
-
return this.logService.debug(`Created ${
|
|
1662
|
+
return this.logService.debug(`Created ${i} Reply handler`), this.port2.postMessage(o), this.logSent(i, o), a;
|
|
1663
1663
|
}
|
|
1664
1664
|
/**
|
|
1665
1665
|
* Request detailed contact information for the given Cloud usernames.
|
|
@@ -1673,16 +1673,16 @@ class xt {
|
|
|
1673
1673
|
if (!this.isEmbedded())
|
|
1674
1674
|
throw new h(this.currentContext);
|
|
1675
1675
|
if (!t.length)
|
|
1676
|
-
throw new
|
|
1676
|
+
throw new I("contacts", t, "At least one contact is required");
|
|
1677
1677
|
const e = "MATCH CONTACTS", r = this.createMessage(e);
|
|
1678
1678
|
r.contacts = [...t], this.logCreated(e, r);
|
|
1679
|
-
const
|
|
1680
|
-
|
|
1679
|
+
const s = this.incomingMessages$.pipe(
|
|
1680
|
+
g((i) => i.type === e && i.replyTo === r.id),
|
|
1681
1681
|
f(this.logReceived(e)),
|
|
1682
|
-
p((
|
|
1682
|
+
p((i) => i),
|
|
1683
1683
|
m(1)
|
|
1684
1684
|
);
|
|
1685
|
-
return this.logService.debug(`Created ${e} Reply handler`), this.port2.postMessage(r), this.logSent(e, r),
|
|
1685
|
+
return this.logService.debug(`Created ${e} Reply handler`), this.port2.postMessage(r), this.logSent(e, r), s;
|
|
1686
1686
|
}
|
|
1687
1687
|
/**
|
|
1688
1688
|
* Setup listener for {@link PushMessageMessage}, which can be sent by a Host app to forward an
|
|
@@ -1715,7 +1715,7 @@ class xt {
|
|
|
1715
1715
|
throw new h(this.currentContext);
|
|
1716
1716
|
const t = "PUSH MESSAGE";
|
|
1717
1717
|
return this.incomingMessages$.pipe(
|
|
1718
|
-
|
|
1718
|
+
g((e) => e.type === t && e.target === "client"),
|
|
1719
1719
|
p((e) => e),
|
|
1720
1720
|
f(this.logReceived(t))
|
|
1721
1721
|
);
|
|
@@ -1735,9 +1735,9 @@ class xt {
|
|
|
1735
1735
|
const t = "PUSH TOKEN", e = this.createMessage(t);
|
|
1736
1736
|
this.logCreated(t, e);
|
|
1737
1737
|
const r = this.incomingMessages$.pipe(
|
|
1738
|
-
|
|
1738
|
+
g((s) => s.type === t && s.replyTo === e.id),
|
|
1739
1739
|
f(this.logReceived(t)),
|
|
1740
|
-
p((
|
|
1740
|
+
p((s) => s),
|
|
1741
1741
|
m(1)
|
|
1742
1742
|
);
|
|
1743
1743
|
return this.logService.debug(`Created ${t} Reply handler`), this.port2.postMessage(e), this.logSent(t, e), r;
|
|
@@ -1774,7 +1774,7 @@ class xt {
|
|
|
1774
1774
|
throw new h(this.currentContext);
|
|
1775
1775
|
const t = "PUSH TOKEN";
|
|
1776
1776
|
return this.incomingMessages$.pipe(
|
|
1777
|
-
|
|
1777
|
+
g(
|
|
1778
1778
|
(e) => e.type === t && e.target === "client" && e.replyTo === null && e.expectReply === !1
|
|
1779
1779
|
),
|
|
1780
1780
|
p((e) => {
|
|
@@ -1798,7 +1798,7 @@ class xt {
|
|
|
1798
1798
|
throw new h(this.currentContext);
|
|
1799
1799
|
const t = "BADGE QUERY";
|
|
1800
1800
|
return this.incomingMessages$.pipe(
|
|
1801
|
-
|
|
1801
|
+
g((e) => e.type === t && e.target === "client"),
|
|
1802
1802
|
p((e) => e),
|
|
1803
1803
|
f(this.logReceived(t))
|
|
1804
1804
|
);
|
|
@@ -1818,8 +1818,8 @@ class xt {
|
|
|
1818
1818
|
sendBadgeUpdateMessage(t, e, r) {
|
|
1819
1819
|
if (!this.isEmbedded())
|
|
1820
1820
|
throw new h(this.currentContext);
|
|
1821
|
-
const
|
|
1822
|
-
|
|
1821
|
+
const s = "BADGE UPDATE", i = this.createMessage(s, !1, r);
|
|
1822
|
+
i.count = t, i.activity = e ?? !1, this.logCreated(s, i), this.port2.postMessage(i), this.logSent(s, i);
|
|
1823
1823
|
}
|
|
1824
1824
|
/**
|
|
1825
1825
|
* Sends a {@link LifecycleMessage} to the Host app, to notify it of a lifecycle event.
|
|
@@ -1837,8 +1837,8 @@ class xt {
|
|
|
1837
1837
|
sendLifecycleMessage(t, e) {
|
|
1838
1838
|
if (!this.isEmbedded())
|
|
1839
1839
|
throw new h(this.currentContext);
|
|
1840
|
-
const r = "LIFECYCLE",
|
|
1841
|
-
|
|
1840
|
+
const r = "LIFECYCLE", s = this.createMessage(r, !1);
|
|
1841
|
+
s.eventName = t, s.payload = e, this.logCreated(r, s), this.port2.postMessage(s), this.logSent(r, s);
|
|
1842
1842
|
}
|
|
1843
1843
|
/**
|
|
1844
1844
|
* Setup listener for {@link LifecycleMessage}, which can be sent by a `Host` app to notify the
|
|
@@ -1856,7 +1856,7 @@ class xt {
|
|
|
1856
1856
|
throw new h(this.currentContext);
|
|
1857
1857
|
const t = "LIFECYCLE";
|
|
1858
1858
|
return this.incomingMessages$.pipe(
|
|
1859
|
-
|
|
1859
|
+
g((e) => e.type === t && e.target === "client"),
|
|
1860
1860
|
p((e) => e),
|
|
1861
1861
|
f(this.logReceived(t))
|
|
1862
1862
|
);
|
|
@@ -1876,8 +1876,8 @@ class xt {
|
|
|
1876
1876
|
sendLogMessage(t, e) {
|
|
1877
1877
|
if (!this.isEmbedded())
|
|
1878
1878
|
throw new h(this.currentContext);
|
|
1879
|
-
const r = "LOG",
|
|
1880
|
-
|
|
1879
|
+
const r = "LOG", s = this.createMessage(r, !1);
|
|
1880
|
+
s.level = t, s.message = e, this.logCreated(r, s), this.port2.postMessage(s), this.logSent(r, s);
|
|
1881
1881
|
}
|
|
1882
1882
|
/**
|
|
1883
1883
|
* Setup listener for {@link RequestLogsMessage}, which can be sent by a `Host` app to request
|
|
@@ -1896,7 +1896,7 @@ class xt {
|
|
|
1896
1896
|
throw new h(this.currentContext);
|
|
1897
1897
|
const t = "REQUEST LOGS";
|
|
1898
1898
|
return this.incomingMessages$.pipe(
|
|
1899
|
-
|
|
1899
|
+
g((e) => e.type === t && e.target === "client"),
|
|
1900
1900
|
p((e) => e),
|
|
1901
1901
|
f(this.logReceived(t))
|
|
1902
1902
|
);
|
|
@@ -1917,8 +1917,8 @@ class xt {
|
|
|
1917
1917
|
sendViewTransitionMessage(t, e) {
|
|
1918
1918
|
if (!this.isEmbedded())
|
|
1919
1919
|
throw new h(this.currentContext);
|
|
1920
|
-
const r = "VIEW TRANSITION",
|
|
1921
|
-
|
|
1920
|
+
const r = "VIEW TRANSITION", s = this.createMessage(r, !1);
|
|
1921
|
+
s.transitionType = t, s.targetView = e, this.logCreated(r, s), this.port2.postMessage(s), this.logSent(r, s);
|
|
1922
1922
|
}
|
|
1923
1923
|
/**
|
|
1924
1924
|
* Sends a {@link FileRequestMessage} to the Host app, to request a file by it's SHA256 hash.
|
|
@@ -1961,31 +1961,31 @@ class xt {
|
|
|
1961
1961
|
* @returns An observable that either emits once if the result is `error` or `not found` or
|
|
1962
1962
|
* emits as many times as the number of chunks in the file if the result is `success`.
|
|
1963
1963
|
*/
|
|
1964
|
-
sendFileRequestMessage(t, e, r,
|
|
1964
|
+
sendFileRequestMessage(t, e, r, s, i) {
|
|
1965
1965
|
if (!this.isEmbedded())
|
|
1966
1966
|
throw new h(this.currentContext);
|
|
1967
|
-
const o = "FILE REQUEST",
|
|
1968
|
-
if (
|
|
1969
|
-
if (!
|
|
1970
|
-
throw new
|
|
1967
|
+
const o = "FILE REQUEST", a = this.createMessage(o);
|
|
1968
|
+
if (a.fileId = t, a.fileHash = e.toLowerCase(), a.intent = r, a.maxChunkSizeInBytes = i, r === "attachment") {
|
|
1969
|
+
if (!s)
|
|
1970
|
+
throw new I(
|
|
1971
1971
|
"streamId",
|
|
1972
|
-
|
|
1972
|
+
s,
|
|
1973
1973
|
"streamId is required for attachment intent"
|
|
1974
1974
|
);
|
|
1975
|
-
|
|
1975
|
+
a.streamId = s;
|
|
1976
1976
|
}
|
|
1977
|
-
this.logCreated(o,
|
|
1978
|
-
let
|
|
1977
|
+
this.logCreated(o, a);
|
|
1978
|
+
let c = 0;
|
|
1979
1979
|
const u = this.incomingMessages$.pipe(
|
|
1980
|
-
|
|
1981
|
-
(l) => l.type === o && l.replyTo ===
|
|
1980
|
+
g(
|
|
1981
|
+
(l) => l.type === o && l.replyTo === a.id
|
|
1982
1982
|
),
|
|
1983
1983
|
f(this.logReceived(o)),
|
|
1984
|
-
f(() =>
|
|
1984
|
+
f(() => c++),
|
|
1985
1985
|
p((l) => (l.result === "success" && (l.chunkHash = l.chunkHash.toLowerCase(), l.fileHash = l.fileHash.toLowerCase()), l)),
|
|
1986
|
-
wt((l) => l.result === "success" &&
|
|
1986
|
+
wt((l) => l.result === "success" && c < l.totalChunks, !0)
|
|
1987
1987
|
);
|
|
1988
|
-
return this.port2.postMessage(
|
|
1988
|
+
return this.port2.postMessage(a), this.logSent(o, a), u;
|
|
1989
1989
|
}
|
|
1990
1990
|
/**
|
|
1991
1991
|
* Sends a {@link FileRequestMessageReply} to the Host app, to reply to a
|
|
@@ -2009,11 +2009,11 @@ class xt {
|
|
|
2009
2009
|
sendFileRequestMessageReply(t, e) {
|
|
2010
2010
|
if (!this.isEmbedded())
|
|
2011
2011
|
throw new h(this.currentContext);
|
|
2012
|
-
const r = "FILE REQUEST",
|
|
2012
|
+
const r = "FILE REQUEST", s = Object.assign(
|
|
2013
2013
|
e,
|
|
2014
2014
|
this.createMessage(r, !1, t.id)
|
|
2015
2015
|
);
|
|
2016
|
-
this.logCreated(r,
|
|
2016
|
+
this.logCreated(r, s), this.port2.postMessage(s), this.logSent(r, s);
|
|
2017
2017
|
}
|
|
2018
2018
|
/**
|
|
2019
2019
|
* Setup a listener for {@link FileRequestMessage}, which can be sent by a Host app to request a
|
|
@@ -2032,7 +2032,7 @@ class xt {
|
|
|
2032
2032
|
throw new h(this.currentContext);
|
|
2033
2033
|
const t = "FILE REQUEST";
|
|
2034
2034
|
return this.incomingMessages$.pipe(
|
|
2035
|
-
|
|
2035
|
+
g(
|
|
2036
2036
|
(e) => e.type === t && e.target === "client" && e.replyTo === null
|
|
2037
2037
|
),
|
|
2038
2038
|
p((e) => (e.fileHash = e.fileHash.toLowerCase(), e)),
|
|
@@ -2061,38 +2061,38 @@ class xt {
|
|
|
2061
2061
|
*
|
|
2062
2062
|
* @returns This method returns void.
|
|
2063
2063
|
*/
|
|
2064
|
-
sendFileSelectionMessage(t = "attachment", e, r,
|
|
2064
|
+
sendFileSelectionMessage(t = "attachment", e, r, s, i, o) {
|
|
2065
2065
|
if (!this.isEmbedded())
|
|
2066
2066
|
throw new h(this.currentContext);
|
|
2067
|
-
const
|
|
2068
|
-
if (
|
|
2067
|
+
const a = "FILE SELECTION", c = this.createMessage(a);
|
|
2068
|
+
if (c.intent = t, c.maxCount = s, c.maxFileSizeInBytes = i, c.mimeTypes = o, t === "attachment") {
|
|
2069
2069
|
if (!e)
|
|
2070
|
-
throw new
|
|
2070
|
+
throw new I(
|
|
2071
2071
|
"streamId",
|
|
2072
2072
|
e,
|
|
2073
2073
|
"streamId is required for attachment intent"
|
|
2074
2074
|
);
|
|
2075
2075
|
if (!r)
|
|
2076
|
-
throw new
|
|
2076
|
+
throw new I(
|
|
2077
2077
|
"correlationId",
|
|
2078
2078
|
r,
|
|
2079
2079
|
"correlationId is required for attachment intent"
|
|
2080
2080
|
);
|
|
2081
|
-
|
|
2081
|
+
c.streamId = e, c.correlationId = r;
|
|
2082
2082
|
}
|
|
2083
|
-
this.logCreated(
|
|
2083
|
+
this.logCreated(a, c);
|
|
2084
2084
|
const u = this.incomingMessages$.pipe(
|
|
2085
|
-
|
|
2086
|
-
(l) => l.type ===
|
|
2085
|
+
g(
|
|
2086
|
+
(l) => l.type === a && l.replyTo === c.id
|
|
2087
2087
|
),
|
|
2088
2088
|
p((l) => {
|
|
2089
2089
|
var d;
|
|
2090
|
-
return l.files = (d = l.files) == null ? void 0 : d.map((y) => (y.fileHash = y.fileHash.toLowerCase(), y)), l;
|
|
2090
|
+
return l.files = (d = l.files) == null ? void 0 : d.map((y) => (y.original.fileHash = y.original.fileHash.toLowerCase(), y.preview && (y.preview.fileHash = y.preview.fileHash.toLowerCase()), y)), l;
|
|
2091
2091
|
}),
|
|
2092
|
-
f(this.logReceived(
|
|
2092
|
+
f(this.logReceived(a)),
|
|
2093
2093
|
m(1)
|
|
2094
2094
|
);
|
|
2095
|
-
return this.port2.postMessage(
|
|
2095
|
+
return this.port2.postMessage(c), this.logSent(a, c), u;
|
|
2096
2096
|
}
|
|
2097
2097
|
/**
|
|
2098
2098
|
* Sends a {@link FileDownloadMessage} to the Host app, to request the download of a file.
|
|
@@ -2108,21 +2108,128 @@ class xt {
|
|
|
2108
2108
|
* @returns An observable which emits a {@link FileDownloadMessageReply} instance containing the
|
|
2109
2109
|
* file ID and the file size in bytes. Emits once.
|
|
2110
2110
|
*/
|
|
2111
|
-
sendFileDownloadMessage(t, e, r,
|
|
2111
|
+
sendFileDownloadMessage(t, e, r, s) {
|
|
2112
2112
|
if (!this.isEmbedded())
|
|
2113
2113
|
throw new h(this.currentContext);
|
|
2114
|
-
const
|
|
2115
|
-
o.url = t, o.key = e, o.fileName = r, o.mimeType =
|
|
2116
|
-
const
|
|
2117
|
-
|
|
2114
|
+
const i = "FILE DOWNLOAD", o = this.createMessage(i);
|
|
2115
|
+
o.url = t, o.key = e, o.fileName = r, o.mimeType = s, this.logCreated(i, o);
|
|
2116
|
+
const a = this.incomingMessages$.pipe(
|
|
2117
|
+
g((c) => c.type === i && c.replyTo === o.id),
|
|
2118
|
+
f(this.logReceived(i)),
|
|
2119
|
+
p((c) => c),
|
|
2120
|
+
m(1)
|
|
2121
|
+
);
|
|
2122
|
+
return this.port2.postMessage(o), this.logSent(i, o), a;
|
|
2123
|
+
}
|
|
2124
|
+
/**
|
|
2125
|
+
* Sends a {@link FileDownloadProgressQueryMessage} to the Host app, to query the progress of a
|
|
2126
|
+
* file download that was initiated by a {@link FileDownloadMessage}.
|
|
2127
|
+
*
|
|
2128
|
+
* @remarks
|
|
2129
|
+
* The `fileHash` parameter is the SHA256 hash of the decrypted file, which is used as an
|
|
2130
|
+
* identifier for the target file in the `Host` app. The `url` parameter is the URL of the file
|
|
2131
|
+
* being downloaded.
|
|
2132
|
+
*
|
|
2133
|
+
* The `Host` app should reply with a {@link FileDownloadProgressUpdateMessage} containing the
|
|
2134
|
+
* progress of the file download.
|
|
2135
|
+
*
|
|
2136
|
+
* @param correlationId - A UUIDv4 string to identify the message this file was attached to.
|
|
2137
|
+
* @param fileHash - SHA256 hash of the decrypted file.
|
|
2138
|
+
* @param url - URL of the file being downloaded.
|
|
2139
|
+
* @returns An observable which emits a {@link FileDownloadProgressUpdateMessage} instance
|
|
2140
|
+
* containing the progress of the file download. Emits once.
|
|
2141
|
+
*/
|
|
2142
|
+
sendFileDownloadProgressQueryMessage(t, e, r) {
|
|
2143
|
+
if (!this.isEmbedded())
|
|
2144
|
+
throw new h(this.currentContext);
|
|
2145
|
+
const s = "FILE DOWNLOAD PROGRESS QUERY", i = this.createMessage(
|
|
2146
|
+
s,
|
|
2147
|
+
!0
|
|
2148
|
+
);
|
|
2149
|
+
i.correlationId = t, i.fileHash = e.toLowerCase(), i.url = r, this.logCreated(s, i);
|
|
2150
|
+
const o = this.incomingMessages$.pipe(
|
|
2151
|
+
g(
|
|
2152
|
+
(a) => a.type === "FILE DOWNLOAD PROGRESS UPDATE" && a.replyTo === i.id
|
|
2153
|
+
),
|
|
2118
2154
|
f(this.logReceived(s)),
|
|
2119
|
-
p((a) => a),
|
|
2155
|
+
p((a) => (a.fileHash && (a.fileHash = a.fileHash.toLowerCase()), a)),
|
|
2156
|
+
m(1)
|
|
2157
|
+
);
|
|
2158
|
+
return this.port2.postMessage(i), this.logSent(s, i), o;
|
|
2159
|
+
}
|
|
2160
|
+
/**
|
|
2161
|
+
* Setup listener for {@link FileDownloadProgressQueryMessage}, which can be sent by a `Host` app
|
|
2162
|
+
* to update the progress of a file download which was initiated by a {@link FileOpenMessage}.
|
|
2163
|
+
*
|
|
2164
|
+
* @returns An observable which emits a {@link FileDownloadProgressUpdateMessage} instance
|
|
2165
|
+
* containing the progress of the file download. Emits once.
|
|
2166
|
+
*/
|
|
2167
|
+
onFileDownloadProgressUpdateMessage() {
|
|
2168
|
+
if (!this.isEmbedded())
|
|
2169
|
+
throw new h(this.currentContext);
|
|
2170
|
+
const t = "FILE DOWNLOAD PROGRESS UPDATE";
|
|
2171
|
+
return this.incomingMessages$.pipe(
|
|
2172
|
+
g(
|
|
2173
|
+
(e) => e.type === t && e.target === "client" && e.replyTo === null
|
|
2174
|
+
),
|
|
2175
|
+
p((e) => (e.fileHash && (e.fileHash = e.fileHash.toLowerCase()), e)),
|
|
2176
|
+
f(this.logReceived(t))
|
|
2177
|
+
);
|
|
2178
|
+
}
|
|
2179
|
+
/**
|
|
2180
|
+
* Sends a {@link FileUploadProgressQueryMessage} to the Host app, to query the progress of a file
|
|
2181
|
+
* upload.
|
|
2182
|
+
*
|
|
2183
|
+
* @remarks
|
|
2184
|
+
* The `host` app should reply with a {@link FileUploadProgressUpdateMessage} containing the
|
|
2185
|
+
* progress of the file upload.
|
|
2186
|
+
*
|
|
2187
|
+
* @param correlationId - A UUIDv4 string to identify the message this file was attached to.
|
|
2188
|
+
* @param fileHash - SHA256 hash of the decrypted file.
|
|
2189
|
+
* @param fileId - ID of the original file being uploaded.
|
|
2190
|
+
* @returns An observable which emits a {@link FileUploadProgressUpdateMessage} instance
|
|
2191
|
+
* containing the progress of the file upload. Emits once.
|
|
2192
|
+
*/
|
|
2193
|
+
sendFileUploadProgressQueryMessage(t, e, r) {
|
|
2194
|
+
if (!this.isEmbedded())
|
|
2195
|
+
throw new h(this.currentContext);
|
|
2196
|
+
const s = "FILE UPLOAD PROGRESS QUERY", i = this.createMessage(
|
|
2197
|
+
s,
|
|
2198
|
+
!0
|
|
2199
|
+
);
|
|
2200
|
+
i.correlationId = t, i.fileHash = e.toLowerCase(), i.fileId = r, this.logCreated(s, i);
|
|
2201
|
+
const o = this.incomingMessages$.pipe(
|
|
2202
|
+
g(
|
|
2203
|
+
(a) => a.type === "FILE DOWNLOAD PROGRESS UPDATE" && a.replyTo === i.id
|
|
2204
|
+
),
|
|
2205
|
+
f(this.logReceived(s)),
|
|
2206
|
+
p((a) => (a.fileHash && (a.fileHash = a.fileHash.toLowerCase()), a)),
|
|
2120
2207
|
m(1)
|
|
2121
2208
|
);
|
|
2122
|
-
return this.port2.postMessage(
|
|
2209
|
+
return this.port2.postMessage(i), this.logSent(s, i), o;
|
|
2123
2210
|
}
|
|
2124
|
-
|
|
2125
|
-
|
|
2211
|
+
/**
|
|
2212
|
+
* Setup listener for {@link FileUploadProgressQueryMessage}, which can be sent by a `Host` app to
|
|
2213
|
+
* update the progress of a file upload.
|
|
2214
|
+
*
|
|
2215
|
+
* @remarks
|
|
2216
|
+
* The `progressInBytesSent` and `fileSize` fields contain the combined size of the original file
|
|
2217
|
+
* and any preview that was generated.
|
|
2218
|
+
*
|
|
2219
|
+
* @returns An observable which emits a {@link FileUploadProgressUpdateMessage} instance
|
|
2220
|
+
* containing the progress of the file upload. Emits once.
|
|
2221
|
+
*/
|
|
2222
|
+
onFileUploadProgressUpdateMessage() {
|
|
2223
|
+
if (!this.isEmbedded())
|
|
2224
|
+
throw new h(this.currentContext);
|
|
2225
|
+
const t = "FILE UPLOAD PROGRESS UPDATE";
|
|
2226
|
+
return this.incomingMessages$.pipe(
|
|
2227
|
+
g(
|
|
2228
|
+
(e) => e.type === t && e.target === "client" && e.replyTo === null
|
|
2229
|
+
),
|
|
2230
|
+
p((e) => (e.fileHash && (e.fileHash = e.fileHash.toLowerCase()), e)),
|
|
2231
|
+
f(this.logReceived(t))
|
|
2232
|
+
);
|
|
2126
2233
|
}
|
|
2127
2234
|
/**
|
|
2128
2235
|
* Sends a {@link FileOpenMessage} to the Host app, to try and open a file the device may already
|
|
@@ -2141,13 +2248,35 @@ class xt {
|
|
|
2141
2248
|
* @param key - _Optional_. Key used to encrypt the original attachment.
|
|
2142
2249
|
* @param sender - _Optional_. The {@link ContactItem} of the sender of the file.
|
|
2143
2250
|
*
|
|
2144
|
-
* @returns
|
|
2251
|
+
* @returns An observable which emits a {@link FileOpenMessageReply} instance containing the
|
|
2252
|
+
* result of the request. Emits once.
|
|
2253
|
+
*/
|
|
2254
|
+
sendFileOpenMessage(t, e, r, s, i, o, a) {
|
|
2255
|
+
if (!this.isEmbedded())
|
|
2256
|
+
throw new h(this.currentContext);
|
|
2257
|
+
const c = "FILE OPEN", u = this.createMessage(c, !0);
|
|
2258
|
+
u.fileHash = t.toLowerCase(), u.fileName = e, u.streamId = r, u.url = s, u.correlationId = i, u.key = o, u.sender = a, this.logCreated(c, u);
|
|
2259
|
+
const l = this.incomingMessages$.pipe(
|
|
2260
|
+
g((d) => d.type === c && d.replyTo === u.id),
|
|
2261
|
+
f(this.logReceived(c)),
|
|
2262
|
+
p((d) => d),
|
|
2263
|
+
m(1)
|
|
2264
|
+
);
|
|
2265
|
+
return this.port2.postMessage(u), this.logSent(c, u), l;
|
|
2266
|
+
}
|
|
2267
|
+
/**
|
|
2268
|
+
* Sends a {@link CancelFileOpenMessage} to the Host app, to cancel opening or download of a file
|
|
2269
|
+
* that was initiated by a {@link FileOpenMessage} previously.
|
|
2270
|
+
*
|
|
2271
|
+
* @param correlationId - UUIDv4 string to identify the message this file was attached to.
|
|
2272
|
+
* @param fileHash - SHA256 hash of the file to cancel opening.
|
|
2273
|
+
* @param url - URL of the file to cancel download.
|
|
2145
2274
|
*/
|
|
2146
|
-
|
|
2275
|
+
sendCancelFileOpenMessage(t, e, r) {
|
|
2147
2276
|
if (!this.isEmbedded())
|
|
2148
2277
|
throw new h(this.currentContext);
|
|
2149
|
-
const
|
|
2150
|
-
|
|
2278
|
+
const s = "CANCEL FILE OPEN", i = this.createMessage(s, !1);
|
|
2279
|
+
i.correlationId = t, i.fileHash = e.toLowerCase(), i.url = r, this.logCreated(s, i), this.port2.postMessage(i), this.logSent(s, i);
|
|
2151
2280
|
}
|
|
2152
2281
|
/**
|
|
2153
2282
|
* Sends a {@link FileRemoveMessage} to the Host app, to request removal of a file from the
|
|
@@ -2167,15 +2296,15 @@ class xt {
|
|
|
2167
2296
|
sendFileRemoveMessage(t, e) {
|
|
2168
2297
|
if (!this.isEmbedded())
|
|
2169
2298
|
throw new h(this.currentContext);
|
|
2170
|
-
const r = "FILE REMOVE",
|
|
2171
|
-
|
|
2172
|
-
const
|
|
2173
|
-
|
|
2299
|
+
const r = "FILE REMOVE", s = this.createMessage(r, !0);
|
|
2300
|
+
s.hash = t.toLowerCase(), s.streamId = e, this.logCreated(r, s);
|
|
2301
|
+
const i = this.incomingMessages$.pipe(
|
|
2302
|
+
g((o) => o.type === r && o.replyTo === s.id),
|
|
2174
2303
|
f(this.logReceived(r)),
|
|
2175
2304
|
p((o) => o),
|
|
2176
2305
|
m(1)
|
|
2177
2306
|
);
|
|
2178
|
-
return this.port2.postMessage(
|
|
2307
|
+
return this.port2.postMessage(s), this.logSent(r, s), i;
|
|
2179
2308
|
}
|
|
2180
2309
|
/**
|
|
2181
2310
|
* Sends a {@link AppResetMessage} to the Host app, to request logging out the user and resetting
|
|
@@ -2217,8 +2346,8 @@ class xt {
|
|
|
2217
2346
|
sendMessageSentMessage(t, e) {
|
|
2218
2347
|
if (!this.isEmbedded())
|
|
2219
2348
|
throw new h(this.currentContext);
|
|
2220
|
-
const r = "MESSAGE SENT",
|
|
2221
|
-
|
|
2349
|
+
const r = "MESSAGE SENT", s = this.createMessage(r, !1);
|
|
2350
|
+
s.streamId = t, s.correlationId = e, this.logCreated(r, s), this.port2.postMessage(s), this.logSent(r, s);
|
|
2222
2351
|
}
|
|
2223
2352
|
/**
|
|
2224
2353
|
* Sends a {@link SendMessageMessage} to the Host app, to send a message to the specified stream.
|
|
@@ -2235,13 +2364,21 @@ class xt {
|
|
|
2235
2364
|
* @param setCursors - _Optional_. Whether to set the cursors for the message. Defaults to `true`.
|
|
2236
2365
|
* @param threadId - _Optional_. The ID of the thread the message is being sent to.
|
|
2237
2366
|
*
|
|
2238
|
-
* @returns
|
|
2367
|
+
* @returns An observable which emits a {@link SendMessageMessageReply} instance containing the
|
|
2368
|
+
* result of the request. Emits once.
|
|
2239
2369
|
*/
|
|
2240
|
-
sendSendMessageMessage(t, e, r,
|
|
2370
|
+
sendSendMessageMessage(t, e, r, s = "TEXT", i, o, a, c = !0, u) {
|
|
2241
2371
|
if (!this.isEmbedded())
|
|
2242
2372
|
throw new h(this.currentContext);
|
|
2243
|
-
const l = "SEND MESSAGE", d = this.createMessage(l, !
|
|
2244
|
-
d.streamId = t, d.correlationId = e, d.body = r, d.messageType =
|
|
2373
|
+
const l = "SEND MESSAGE", d = this.createMessage(l, !0);
|
|
2374
|
+
d.streamId = t, d.correlationId = e, d.body = r, d.messageType = s, d.mentions = i ?? [], d.attachments = (o == null ? void 0 : o.map((b) => b.toLowerCase())) ?? [], d.relatedMessageId = a, d.setCursors = c, d.threadId = u, this.logCreated(l, d);
|
|
2375
|
+
const y = this.incomingMessages$.pipe(
|
|
2376
|
+
g((b) => b.type === l && b.replyTo === d.id),
|
|
2377
|
+
f(this.logReceived(l)),
|
|
2378
|
+
p((b) => b),
|
|
2379
|
+
m(1)
|
|
2380
|
+
);
|
|
2381
|
+
return this.port2.postMessage(d), this.logSent(l, d), y;
|
|
2245
2382
|
}
|
|
2246
2383
|
/**
|
|
2247
2384
|
* Sends a {@link CancelSendMessageMessage} to the Host app, to cancel a message that was being
|
|
@@ -2255,8 +2392,66 @@ class xt {
|
|
|
2255
2392
|
sendCancelSendMessageMessage(t, e) {
|
|
2256
2393
|
if (!this.isEmbedded())
|
|
2257
2394
|
throw new h(this.currentContext);
|
|
2258
|
-
const r = "CANCEL SEND MESSAGE",
|
|
2259
|
-
|
|
2395
|
+
const r = "CANCEL SEND MESSAGE", s = this.createMessage(r, !1);
|
|
2396
|
+
s.streamId = t, s.correlationId = e, this.logCreated(r, s), this.port2.postMessage(s), this.logSent(r, s);
|
|
2397
|
+
}
|
|
2398
|
+
/**
|
|
2399
|
+
* Sends a {@link MessageDeletedMessage} to the Host app, to notify deletion of a message from the
|
|
2400
|
+
* specified stream.
|
|
2401
|
+
*
|
|
2402
|
+
* @param correlationId - UUIDv4 string of the message to be deleted.
|
|
2403
|
+
* @param streamId - ID of the stream the message was sent to.
|
|
2404
|
+
*/
|
|
2405
|
+
sendMessageDeletedMessage(t, e) {
|
|
2406
|
+
if (!this.isEmbedded())
|
|
2407
|
+
throw new h(this.currentContext);
|
|
2408
|
+
const r = "MESSAGE DELETED", s = this.createMessage(r, !1);
|
|
2409
|
+
s.correlationId = t, s.streamId = e, this.logCreated(r, s), this.port2.postMessage(s), this.logSent(r, s);
|
|
2410
|
+
}
|
|
2411
|
+
/**
|
|
2412
|
+
* Sends a {@link SendMessageStatusQueryMessage} to the Host app, to query the status of a message
|
|
2413
|
+
* that was sent via a {@link SendMessageMessage}.
|
|
2414
|
+
*
|
|
2415
|
+
* @remarks
|
|
2416
|
+
* This message expects a {@link SendMessageStatusUpdateMessage} in response.
|
|
2417
|
+
*
|
|
2418
|
+
* @param correlationId - A UUIDv4 string to identify the message that was sent.
|
|
2419
|
+
* @param streamId - The ID of the message stream the message was sent to.
|
|
2420
|
+
*
|
|
2421
|
+
* @returns An observable which emits a {@link SendMessageStatusUpdateMessage} instance containing
|
|
2422
|
+
* the status of the message. Emits once.
|
|
2423
|
+
*/
|
|
2424
|
+
sendSendMessageStatusQueryMessage(t, e) {
|
|
2425
|
+
if (!this.isEmbedded())
|
|
2426
|
+
throw new h(this.currentContext);
|
|
2427
|
+
const r = "SEND MESSAGE STATUS QUERY", s = this.createMessage(r, !0);
|
|
2428
|
+
s.correlationId = t, s.streamId = e, this.logCreated(r, s);
|
|
2429
|
+
const i = this.incomingMessages$.pipe(
|
|
2430
|
+
g(
|
|
2431
|
+
(o) => o.type === "SEND MESSAGE STATUS UPDATE" && o.replyTo === s.id
|
|
2432
|
+
),
|
|
2433
|
+
f(this.logReceived(r)),
|
|
2434
|
+
p((o) => o),
|
|
2435
|
+
m(1)
|
|
2436
|
+
);
|
|
2437
|
+
return this.port2.postMessage(s), this.logSent(r, s), i;
|
|
2438
|
+
}
|
|
2439
|
+
/**
|
|
2440
|
+
* Setup a listener for {@link SendMessageStatusUpdateMessage}, which can be sent by a Host app to
|
|
2441
|
+
* notify the `Client` app of the status of a message that was sent via a
|
|
2442
|
+
* {@link SendMessageMessage}.
|
|
2443
|
+
*
|
|
2444
|
+
* @returns An observable that emits whenever a {@link SendMessageStatusUpdateMessage} is received
|
|
2445
|
+
*/
|
|
2446
|
+
onSendMessageStatusUpdateMessage() {
|
|
2447
|
+
if (!this.isEmbedded())
|
|
2448
|
+
throw new h(this.currentContext);
|
|
2449
|
+
const t = "SEND MESSAGE STATUS UPDATE";
|
|
2450
|
+
return this.incomingMessages$.pipe(
|
|
2451
|
+
g((e) => e.type === t && e.target === "client" && e.replyTo === null),
|
|
2452
|
+
p((e) => e),
|
|
2453
|
+
f(this.logReceived(t))
|
|
2454
|
+
);
|
|
2260
2455
|
}
|
|
2261
2456
|
/**
|
|
2262
2457
|
* Sends a {@link SipCallMessage} to the Host app to initiate a SIP call between the current user
|
|
@@ -2311,7 +2506,7 @@ class xt {
|
|
|
2311
2506
|
}
|
|
2312
2507
|
logReceived(t, e) {
|
|
2313
2508
|
e && It(e) && (e = { ...e, data: "..." });
|
|
2314
|
-
const r = (
|
|
2509
|
+
const r = (s) => this.logService.debug(`[IPC] Received ${t} message`, s);
|
|
2315
2510
|
return e && r(e), r;
|
|
2316
2511
|
}
|
|
2317
2512
|
logSent(t, e) {
|
|
@@ -2346,18 +2541,18 @@ class xt {
|
|
|
2346
2541
|
}
|
|
2347
2542
|
generateId(t = 8, e = !1) {
|
|
2348
2543
|
let r = "1234567890qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM";
|
|
2349
|
-
const
|
|
2544
|
+
const s = [];
|
|
2350
2545
|
e && (r = r.substr(0, r.indexOf("Q")));
|
|
2351
|
-
for (let
|
|
2352
|
-
|
|
2353
|
-
return
|
|
2546
|
+
for (let i = 0; i < t; i++)
|
|
2547
|
+
s.push(r[Math.floor(Math.random() * r.length)]);
|
|
2548
|
+
return s.join("");
|
|
2354
2549
|
}
|
|
2355
2550
|
}
|
|
2356
2551
|
function It(n) {
|
|
2357
2552
|
return n.type === "FILE REQUEST" && n.replyTo !== null;
|
|
2358
2553
|
}
|
|
2359
|
-
const
|
|
2360
|
-
class
|
|
2554
|
+
const Tt = ["2.0"];
|
|
2555
|
+
class Pt {
|
|
2361
2556
|
/**
|
|
2362
2557
|
* A class that manages the IPC communication between the `Client` and the `Host`.
|
|
2363
2558
|
*
|
|
@@ -2372,15 +2567,19 @@ class Rt {
|
|
|
2372
2567
|
/**
|
|
2373
2568
|
* The type of the `Host` app the `Client` is embedded in.
|
|
2374
2569
|
*/
|
|
2375
|
-
|
|
2570
|
+
x(this, "host");
|
|
2376
2571
|
/**
|
|
2377
2572
|
* The cloud ID of the `Host` app the `Client` is embedded in.
|
|
2378
2573
|
*/
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2574
|
+
x(this, "cloudId");
|
|
2575
|
+
/**
|
|
2576
|
+
* The cloud username of the logged in user.
|
|
2577
|
+
*/
|
|
2578
|
+
x(this, "cloudUsername");
|
|
2579
|
+
x(this, "logger");
|
|
2580
|
+
x(this, "helper");
|
|
2581
|
+
x(this, "listeners");
|
|
2582
|
+
this.logger = t ?? console, this.helper = new xt(Tt, this.logger), this.listeners = /* @__PURE__ */ new Map(), this.listeners.set(w.BadgeQuery, /* @__PURE__ */ new Set()), this.listeners.set(w.Lifecycle, /* @__PURE__ */ new Set()), this.listeners.set(w.PushToken, /* @__PURE__ */ new Set());
|
|
2384
2583
|
}
|
|
2385
2584
|
/**
|
|
2386
2585
|
* Returns whether the app is running inside a native WebView (`host` context) or as a
|
|
@@ -2407,7 +2606,7 @@ class Rt {
|
|
|
2407
2606
|
* @returns A promise with {@link IPCContext} the app is running under.
|
|
2408
2607
|
*/
|
|
2409
2608
|
async determineContext() {
|
|
2410
|
-
const t = await
|
|
2609
|
+
const t = await T(this.helper.determineContext(), {
|
|
2411
2610
|
defaultValue: "guest"
|
|
2412
2611
|
});
|
|
2413
2612
|
return this.evaluateContext(t);
|
|
@@ -2416,50 +2615,50 @@ class Rt {
|
|
|
2416
2615
|
* Initiates the IPC handshake with the `Host` app.
|
|
2417
2616
|
*/
|
|
2418
2617
|
initiateConnection() {
|
|
2419
|
-
return
|
|
2618
|
+
return T(
|
|
2420
2619
|
this.helper.openBridge().pipe(
|
|
2421
2620
|
Ze((t) => {
|
|
2422
2621
|
this.helper.onBadgeQueryMessage().subscribe((e) => {
|
|
2423
2622
|
var r;
|
|
2424
2623
|
this.logger.debug("Received Badge Query: ", e);
|
|
2425
|
-
for (const
|
|
2426
|
-
|
|
2624
|
+
for (const s of ((r = this.listeners.get(w.BadgeQuery)) == null ? void 0 : r.values()) ?? [])
|
|
2625
|
+
s();
|
|
2427
2626
|
}), this.helper.onLifecycleMessage().subscribe((e) => {
|
|
2428
2627
|
var r;
|
|
2429
2628
|
this.logger.debug("Received Lifecycle Event: ", e);
|
|
2430
|
-
for (const
|
|
2431
|
-
|
|
2629
|
+
for (const s of ((r = this.listeners.get(w.Lifecycle)) == null ? void 0 : r.values()) ?? [])
|
|
2630
|
+
s(e.eventName, e.payload);
|
|
2432
2631
|
}), this.helper.onPushTokenMessage().subscribe((e) => {
|
|
2433
2632
|
var r;
|
|
2434
2633
|
this.logger.debug("Received Push Token: ", e);
|
|
2435
|
-
for (const
|
|
2436
|
-
|
|
2437
|
-
}), this.cloudId = t.cloudId, this.host = t.host;
|
|
2634
|
+
for (const s of ((r = this.listeners.get(w.PushToken)) == null ? void 0 : r.values()) ?? [])
|
|
2635
|
+
s(e.pushToken, e.appId, e.selector);
|
|
2636
|
+
}), this.cloudId = t.cloudId, this.cloudUsername = t.cloudUsername, this.host = t.host;
|
|
2438
2637
|
}),
|
|
2439
2638
|
O(() => {
|
|
2440
2639
|
})
|
|
2441
2640
|
)
|
|
2442
2641
|
);
|
|
2443
2642
|
}
|
|
2444
|
-
selectContacts(t, e, r,
|
|
2643
|
+
selectContacts(t, e, r, s) {
|
|
2445
2644
|
this.logger.debug("Selecting Contacts: ", ...arguments);
|
|
2446
|
-
let
|
|
2645
|
+
let i;
|
|
2447
2646
|
if (e === "multi") {
|
|
2448
2647
|
if (!r || !Array.isArray(r))
|
|
2449
|
-
throw new
|
|
2648
|
+
throw new I(
|
|
2450
2649
|
"currentContacts",
|
|
2451
2650
|
r,
|
|
2452
2651
|
"currentContacts is required for group streams"
|
|
2453
2652
|
);
|
|
2454
|
-
|
|
2653
|
+
s || (s = "cloudUsername"), i = this.helper.selectContacts(
|
|
2455
2654
|
t.toString(),
|
|
2456
2655
|
"group",
|
|
2457
|
-
|
|
2656
|
+
s,
|
|
2458
2657
|
r
|
|
2459
2658
|
);
|
|
2460
2659
|
} else
|
|
2461
|
-
r ?
|
|
2462
|
-
return
|
|
2660
|
+
r ? s = r : s = "cloudUsername", i = this.helper.selectContacts(t.toString(), "direct", s);
|
|
2661
|
+
return T(i.pipe(O((o) => o.contacts)));
|
|
2463
2662
|
}
|
|
2464
2663
|
/**
|
|
2465
2664
|
* Matches batch of {@link ContactItem} objects against the Host's contact list to fetch detailed
|
|
@@ -2471,7 +2670,7 @@ class Rt {
|
|
|
2471
2670
|
* Host's contact list.
|
|
2472
2671
|
*/
|
|
2473
2672
|
matchContacts(t) {
|
|
2474
|
-
return this.logger.debug("Match Contacts: ", t),
|
|
2673
|
+
return this.logger.debug("Match Contacts: ", t), T(this.helper.matchContacts(t).pipe(O((e) => e.contacts)));
|
|
2475
2674
|
}
|
|
2476
2675
|
/**
|
|
2477
2676
|
* Requests the `Host` app to provide the Push Token for the current device.
|
|
@@ -2479,7 +2678,7 @@ class Rt {
|
|
|
2479
2678
|
* @returns A promise with the Push Token as `string`.
|
|
2480
2679
|
*/
|
|
2481
2680
|
requestPushToken() {
|
|
2482
|
-
return this.logger.debug("Requesting Push Token"),
|
|
2681
|
+
return this.logger.debug("Requesting Push Token"), T(this.helper.requestPushToken().pipe(O((t) => t.pushToken)));
|
|
2483
2682
|
}
|
|
2484
2683
|
/**
|
|
2485
2684
|
* Sends the current badge count to the `Host` app.
|
|
@@ -2529,9 +2728,9 @@ class Rt {
|
|
|
2529
2728
|
*/
|
|
2530
2729
|
onBadgeQueryRequest(t) {
|
|
2531
2730
|
var e;
|
|
2532
|
-
return this.logger.debug("Registering for Badge Query"), (e = this.listeners.get(
|
|
2731
|
+
return this.logger.debug("Registering for Badge Query"), (e = this.listeners.get(w.BadgeQuery)) == null || e.add(t), () => {
|
|
2533
2732
|
var r;
|
|
2534
|
-
return (r = this.listeners.get(
|
|
2733
|
+
return (r = this.listeners.get(w.BadgeQuery)) == null ? void 0 : r.delete(t);
|
|
2535
2734
|
};
|
|
2536
2735
|
}
|
|
2537
2736
|
/**
|
|
@@ -2548,9 +2747,9 @@ class Rt {
|
|
|
2548
2747
|
*/
|
|
2549
2748
|
onLifecycleEvent(t) {
|
|
2550
2749
|
var e;
|
|
2551
|
-
return this.logger.debug("Registering for Lifecycle Event"), (e = this.listeners.get(
|
|
2750
|
+
return this.logger.debug("Registering for Lifecycle Event"), (e = this.listeners.get(w.Lifecycle)) == null || e.add(t), () => {
|
|
2552
2751
|
var r;
|
|
2553
|
-
return (r = this.listeners.get(
|
|
2752
|
+
return (r = this.listeners.get(w.Lifecycle)) == null ? void 0 : r.delete(t);
|
|
2554
2753
|
};
|
|
2555
2754
|
}
|
|
2556
2755
|
/**
|
|
@@ -2566,9 +2765,9 @@ class Rt {
|
|
|
2566
2765
|
*/
|
|
2567
2766
|
onPushToken(t) {
|
|
2568
2767
|
var e;
|
|
2569
|
-
return this.logger.debug("Registering for Push Token"), (e = this.listeners.get(
|
|
2768
|
+
return this.logger.debug("Registering for Push Token"), (e = this.listeners.get(w.PushToken)) == null || e.add(t), () => {
|
|
2570
2769
|
var r;
|
|
2571
|
-
return (r = this.listeners.get(
|
|
2770
|
+
return (r = this.listeners.get(w.PushToken)) == null ? void 0 : r.delete(t);
|
|
2572
2771
|
};
|
|
2573
2772
|
}
|
|
2574
2773
|
evaluateContext(t) {
|
|
@@ -2579,6 +2778,6 @@ class Rt {
|
|
|
2579
2778
|
}
|
|
2580
2779
|
}
|
|
2581
2780
|
export {
|
|
2582
|
-
|
|
2583
|
-
|
|
2781
|
+
w as IPCEvents,
|
|
2782
|
+
Pt as IPCManager
|
|
2584
2783
|
};
|