@telia-ace/widget-conversation-flamingo 1.1.37 → 1.1.38-rc.1
Sign up to get free protection for your applications and to get access to all the features.
- package/{conversation-2fb2cb03.mjs → conversation-29bea177.mjs} +276 -285
- package/{conversation-1aaef607.js → conversation-e8aa867e.js} +40 -40
- package/index.js +2 -2
- package/index.mjs +433 -433
- package/package.json +2 -2
- package/index-be7cbf2b.mjs +0 -337
- package/index-e34200b2.js +0 -1
package/index.mjs
CHANGED
@@ -6,45 +6,45 @@ function bt() {
|
|
6
6
|
return U(yt);
|
7
7
|
}
|
8
8
|
const p = [];
|
9
|
-
for (let
|
10
|
-
p.push((
|
11
|
-
function mt(
|
12
|
-
return p[r
|
9
|
+
for (let e = 0; e < 256; ++e)
|
10
|
+
p.push((e + 256).toString(16).slice(1));
|
11
|
+
function mt(e, r = 0) {
|
12
|
+
return p[e[r + 0]] + p[e[r + 1]] + p[e[r + 2]] + p[e[r + 3]] + "-" + p[e[r + 4]] + p[e[r + 5]] + "-" + p[e[r + 6]] + p[e[r + 7]] + "-" + p[e[r + 8]] + p[e[r + 9]] + "-" + p[e[r + 10]] + p[e[r + 11]] + p[e[r + 12]] + p[e[r + 13]] + p[e[r + 14]] + p[e[r + 15]];
|
13
13
|
}
|
14
14
|
const wt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), G = {
|
15
15
|
randomUUID: wt
|
16
16
|
};
|
17
|
-
function St(
|
18
|
-
if (G.randomUUID && !
|
17
|
+
function St(e, r, t) {
|
18
|
+
if (G.randomUUID && !r && !e)
|
19
19
|
return G.randomUUID();
|
20
|
-
|
21
|
-
const n =
|
22
|
-
if (n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128,
|
20
|
+
e = e || {};
|
21
|
+
const n = e.random || (e.rng || bt)();
|
22
|
+
if (n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, r) {
|
23
23
|
t = t || 0;
|
24
24
|
for (let i = 0; i < 16; ++i)
|
25
|
-
|
26
|
-
return
|
25
|
+
r[t + i] = n[i];
|
26
|
+
return r;
|
27
27
|
}
|
28
28
|
return mt(n);
|
29
29
|
}
|
30
|
-
var L = function(
|
30
|
+
var L = function(e, r) {
|
31
31
|
return L = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, n) {
|
32
32
|
t.__proto__ = n;
|
33
33
|
} || function(t, n) {
|
34
34
|
for (var i in n)
|
35
35
|
Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
|
36
|
-
}, L(
|
36
|
+
}, L(e, r);
|
37
37
|
};
|
38
|
-
function x(
|
39
|
-
if (typeof
|
40
|
-
throw new TypeError("Class extends value " + String(
|
41
|
-
L(
|
38
|
+
function x(e, r) {
|
39
|
+
if (typeof r != "function" && r !== null)
|
40
|
+
throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
|
41
|
+
L(e, r);
|
42
42
|
function t() {
|
43
|
-
this.constructor =
|
43
|
+
this.constructor = e;
|
44
44
|
}
|
45
|
-
|
45
|
+
e.prototype = r === null ? Object.create(r) : (t.prototype = r.prototype, new t());
|
46
46
|
}
|
47
|
-
function gt(
|
47
|
+
function gt(e, r, t, n) {
|
48
48
|
function i(o) {
|
49
49
|
return o instanceof t ? o : new t(function(s) {
|
50
50
|
s(o);
|
@@ -68,10 +68,10 @@ function gt(r, e, t, n) {
|
|
68
68
|
function c(l) {
|
69
69
|
l.done ? o(l.value) : i(l.value).then(u, a);
|
70
70
|
}
|
71
|
-
c((n = n.apply(
|
71
|
+
c((n = n.apply(e, r || [])).next());
|
72
72
|
});
|
73
73
|
}
|
74
|
-
function W(
|
74
|
+
function W(e, r) {
|
75
75
|
var t = { label: 0, sent: function() {
|
76
76
|
if (o[0] & 1)
|
77
77
|
throw o[1];
|
@@ -125,7 +125,7 @@ function W(r, e) {
|
|
125
125
|
o[2] && t.ops.pop(), t.trys.pop();
|
126
126
|
continue;
|
127
127
|
}
|
128
|
-
c =
|
128
|
+
c = r.call(e, t);
|
129
129
|
} catch (l) {
|
130
130
|
c = [6, l], i = 0;
|
131
131
|
} finally {
|
@@ -136,25 +136,25 @@ function W(r, e) {
|
|
136
136
|
return { value: c[0] ? c[1] : void 0, done: !0 };
|
137
137
|
}
|
138
138
|
}
|
139
|
-
function g(
|
140
|
-
var
|
139
|
+
function g(e) {
|
140
|
+
var r = typeof Symbol == "function" && Symbol.iterator, t = r && e[r], n = 0;
|
141
141
|
if (t)
|
142
|
-
return t.call(
|
143
|
-
if (
|
142
|
+
return t.call(e);
|
143
|
+
if (e && typeof e.length == "number")
|
144
144
|
return {
|
145
145
|
next: function() {
|
146
|
-
return
|
146
|
+
return e && n >= e.length && (e = void 0), { value: e && e[n++], done: !e };
|
147
147
|
}
|
148
148
|
};
|
149
|
-
throw new TypeError(
|
149
|
+
throw new TypeError(r ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
150
150
|
}
|
151
|
-
function $(
|
152
|
-
var t = typeof Symbol == "function" &&
|
151
|
+
function $(e, r) {
|
152
|
+
var t = typeof Symbol == "function" && e[Symbol.iterator];
|
153
153
|
if (!t)
|
154
|
-
return
|
155
|
-
var n = t.call(
|
154
|
+
return e;
|
155
|
+
var n = t.call(e), i, o = [], s;
|
156
156
|
try {
|
157
|
-
for (; (
|
157
|
+
for (; (r === void 0 || r-- > 0) && !(i = n.next()).done; )
|
158
158
|
o.push(i.value);
|
159
159
|
} catch (u) {
|
160
160
|
s = { error: u };
|
@@ -168,19 +168,19 @@ function $(r, e) {
|
|
168
168
|
}
|
169
169
|
return o;
|
170
170
|
}
|
171
|
-
function k(
|
171
|
+
function k(e, r, t) {
|
172
172
|
if (t || arguments.length === 2)
|
173
|
-
for (var n = 0, i =
|
174
|
-
(o || !(n in
|
175
|
-
return
|
173
|
+
for (var n = 0, i = r.length, o; n < i; n++)
|
174
|
+
(o || !(n in r)) && (o || (o = Array.prototype.slice.call(r, 0, n)), o[n] = r[n]);
|
175
|
+
return e.concat(o || Array.prototype.slice.call(r));
|
176
176
|
}
|
177
|
-
function S(
|
178
|
-
return this instanceof S ? (this.v =
|
177
|
+
function S(e) {
|
178
|
+
return this instanceof S ? (this.v = e, this) : new S(e);
|
179
179
|
}
|
180
|
-
function xt(
|
180
|
+
function xt(e, r, t) {
|
181
181
|
if (!Symbol.asyncIterator)
|
182
182
|
throw new TypeError("Symbol.asyncIterator is not defined.");
|
183
|
-
var n = t.apply(
|
183
|
+
var n = t.apply(e, r || []), i, o = [];
|
184
184
|
return i = {}, s("next"), s("throw"), s("return"), i[Symbol.asyncIterator] = function() {
|
185
185
|
return this;
|
186
186
|
}, i;
|
@@ -211,17 +211,17 @@ function xt(r, e, t) {
|
|
211
211
|
f(y), o.shift(), o.length && u(o[0][0], o[0][1]);
|
212
212
|
}
|
213
213
|
}
|
214
|
-
function Et(
|
214
|
+
function Et(e) {
|
215
215
|
if (!Symbol.asyncIterator)
|
216
216
|
throw new TypeError("Symbol.asyncIterator is not defined.");
|
217
|
-
var
|
218
|
-
return
|
217
|
+
var r = e[Symbol.asyncIterator], t;
|
218
|
+
return r ? r.call(e) : (e = typeof g == "function" ? g(e) : e[Symbol.iterator](), t = {}, n("next"), n("throw"), n("return"), t[Symbol.asyncIterator] = function() {
|
219
219
|
return this;
|
220
220
|
}, t);
|
221
221
|
function n(o) {
|
222
|
-
t[o] =
|
222
|
+
t[o] = e[o] && function(s) {
|
223
223
|
return new Promise(function(u, a) {
|
224
|
-
s =
|
224
|
+
s = e[o](s), i(u, a, s.done, s.value);
|
225
225
|
});
|
226
226
|
};
|
227
227
|
}
|
@@ -231,36 +231,36 @@ function Et(r) {
|
|
231
231
|
}, s);
|
232
232
|
}
|
233
233
|
}
|
234
|
-
function h(
|
235
|
-
return typeof
|
234
|
+
function h(e) {
|
235
|
+
return typeof e == "function";
|
236
236
|
}
|
237
|
-
function X(
|
238
|
-
var
|
237
|
+
function X(e) {
|
238
|
+
var r = function(n) {
|
239
239
|
Error.call(n), n.stack = new Error().stack;
|
240
|
-
}, t = r
|
240
|
+
}, t = e(r);
|
241
241
|
return t.prototype = Object.create(Error.prototype), t.prototype.constructor = t, t;
|
242
242
|
}
|
243
|
-
var R = X(function(
|
243
|
+
var R = X(function(e) {
|
244
244
|
return function(t) {
|
245
|
-
|
245
|
+
e(this), this.message = t ? t.length + ` errors occurred during unsubscription:
|
246
246
|
` + t.map(function(n, i) {
|
247
247
|
return i + 1 + ") " + n.toString();
|
248
248
|
}).join(`
|
249
249
|
`) : "", this.name = "UnsubscriptionError", this.errors = t;
|
250
250
|
};
|
251
251
|
});
|
252
|
-
function D(
|
253
|
-
if (
|
254
|
-
var t =
|
255
|
-
0 <= t &&
|
252
|
+
function D(e, r) {
|
253
|
+
if (e) {
|
254
|
+
var t = e.indexOf(r);
|
255
|
+
0 <= t && e.splice(t, 1);
|
256
256
|
}
|
257
257
|
}
|
258
258
|
var j = function() {
|
259
|
-
function r
|
260
|
-
this.initialTeardown =
|
259
|
+
function e(r) {
|
260
|
+
this.initialTeardown = r, this.closed = !1, this._parentage = null, this._finalizers = null;
|
261
261
|
}
|
262
|
-
return
|
263
|
-
var
|
262
|
+
return e.prototype.unsubscribe = function() {
|
263
|
+
var r, t, n, i, o;
|
264
264
|
if (!this.closed) {
|
265
265
|
this.closed = !0;
|
266
266
|
var s = this._parentage;
|
@@ -272,13 +272,13 @@ var j = function() {
|
|
272
272
|
c.remove(this);
|
273
273
|
}
|
274
274
|
} catch (d) {
|
275
|
-
|
275
|
+
r = { error: d };
|
276
276
|
} finally {
|
277
277
|
try {
|
278
278
|
a && !a.done && (t = u.return) && t.call(u);
|
279
279
|
} finally {
|
280
|
-
if (
|
281
|
-
throw
|
280
|
+
if (r)
|
281
|
+
throw r.error;
|
282
282
|
}
|
283
283
|
}
|
284
284
|
else
|
@@ -316,41 +316,41 @@ var j = function() {
|
|
316
316
|
if (o)
|
317
317
|
throw new R(o);
|
318
318
|
}
|
319
|
-
},
|
319
|
+
}, e.prototype.add = function(r) {
|
320
320
|
var t;
|
321
|
-
if (
|
321
|
+
if (r && r !== this)
|
322
322
|
if (this.closed)
|
323
|
-
z(
|
323
|
+
z(r);
|
324
324
|
else {
|
325
|
-
if (
|
326
|
-
if (
|
325
|
+
if (r instanceof e) {
|
326
|
+
if (r.closed || r._hasParent(this))
|
327
327
|
return;
|
328
|
-
|
328
|
+
r._addParent(this);
|
329
329
|
}
|
330
|
-
(this._finalizers = (t = this._finalizers) !== null && t !== void 0 ? t : []).push(
|
330
|
+
(this._finalizers = (t = this._finalizers) !== null && t !== void 0 ? t : []).push(r);
|
331
331
|
}
|
332
|
-
},
|
332
|
+
}, e.prototype._hasParent = function(r) {
|
333
333
|
var t = this._parentage;
|
334
|
-
return t ===
|
335
|
-
},
|
334
|
+
return t === r || Array.isArray(t) && t.includes(r);
|
335
|
+
}, e.prototype._addParent = function(r) {
|
336
336
|
var t = this._parentage;
|
337
|
-
this._parentage = Array.isArray(t) ? (t.push(
|
338
|
-
},
|
337
|
+
this._parentage = Array.isArray(t) ? (t.push(r), t) : t ? [t, r] : r;
|
338
|
+
}, e.prototype._removeParent = function(r) {
|
339
339
|
var t = this._parentage;
|
340
|
-
t ===
|
341
|
-
},
|
340
|
+
t === r ? this._parentage = null : Array.isArray(t) && D(t, r);
|
341
|
+
}, e.prototype.remove = function(r) {
|
342
342
|
var t = this._finalizers;
|
343
|
-
t && D(t,
|
344
|
-
},
|
345
|
-
var
|
346
|
-
return
|
347
|
-
}(),
|
343
|
+
t && D(t, r), r instanceof e && r._removeParent(this);
|
344
|
+
}, e.EMPTY = function() {
|
345
|
+
var r = new e();
|
346
|
+
return r.closed = !0, r;
|
347
|
+
}(), e;
|
348
348
|
}(), Z = j.EMPTY;
|
349
|
-
function N(
|
350
|
-
return
|
349
|
+
function N(e) {
|
350
|
+
return e instanceof j || e && "closed" in e && h(e.remove) && h(e.add) && h(e.unsubscribe);
|
351
351
|
}
|
352
|
-
function z(
|
353
|
-
h(
|
352
|
+
function z(e) {
|
353
|
+
h(e) ? e() : e.unsubscribe();
|
354
354
|
}
|
355
355
|
var tt = {
|
356
356
|
onUnhandledError: null,
|
@@ -359,98 +359,98 @@ var tt = {
|
|
359
359
|
useDeprecatedSynchronousErrorHandling: !1,
|
360
360
|
useDeprecatedNextContext: !1
|
361
361
|
}, M = {
|
362
|
-
setTimeout: function(
|
362
|
+
setTimeout: function(e, r) {
|
363
363
|
for (var t = [], n = 2; n < arguments.length; n++)
|
364
364
|
t[n - 2] = arguments[n];
|
365
365
|
var i = M.delegate;
|
366
|
-
return i != null && i.setTimeout ? i.setTimeout.apply(i, k([
|
366
|
+
return i != null && i.setTimeout ? i.setTimeout.apply(i, k([e, r], $(t))) : setTimeout.apply(void 0, k([e, r], $(t)));
|
367
367
|
},
|
368
|
-
clearTimeout: function(
|
369
|
-
var
|
370
|
-
return ((
|
368
|
+
clearTimeout: function(e) {
|
369
|
+
var r = M.delegate;
|
370
|
+
return ((r == null ? void 0 : r.clearTimeout) || clearTimeout)(e);
|
371
371
|
},
|
372
372
|
delegate: void 0
|
373
373
|
};
|
374
|
-
function et(
|
374
|
+
function et(e) {
|
375
375
|
M.setTimeout(function() {
|
376
|
-
throw
|
376
|
+
throw e;
|
377
377
|
});
|
378
378
|
}
|
379
379
|
function Y() {
|
380
380
|
}
|
381
|
-
function T(
|
382
|
-
|
381
|
+
function T(e) {
|
382
|
+
e();
|
383
383
|
}
|
384
|
-
var B = function(
|
385
|
-
x(
|
386
|
-
function
|
387
|
-
var n =
|
384
|
+
var B = function(e) {
|
385
|
+
x(r, e);
|
386
|
+
function r(t) {
|
387
|
+
var n = e.call(this) || this;
|
388
388
|
return n.isStopped = !1, t ? (n.destination = t, N(t) && t.add(n)) : n.destination = Ot, n;
|
389
389
|
}
|
390
|
-
return
|
390
|
+
return r.create = function(t, n, i) {
|
391
391
|
return new V(t, n, i);
|
392
|
-
},
|
392
|
+
}, r.prototype.next = function(t) {
|
393
393
|
this.isStopped || this._next(t);
|
394
|
-
},
|
394
|
+
}, r.prototype.error = function(t) {
|
395
395
|
this.isStopped || (this.isStopped = !0, this._error(t));
|
396
|
-
},
|
396
|
+
}, r.prototype.complete = function() {
|
397
397
|
this.isStopped || (this.isStopped = !0, this._complete());
|
398
|
-
},
|
399
|
-
this.closed || (this.isStopped = !0,
|
400
|
-
},
|
398
|
+
}, r.prototype.unsubscribe = function() {
|
399
|
+
this.closed || (this.isStopped = !0, e.prototype.unsubscribe.call(this), this.destination = null);
|
400
|
+
}, r.prototype._next = function(t) {
|
401
401
|
this.destination.next(t);
|
402
|
-
},
|
402
|
+
}, r.prototype._error = function(t) {
|
403
403
|
try {
|
404
404
|
this.destination.error(t);
|
405
405
|
} finally {
|
406
406
|
this.unsubscribe();
|
407
407
|
}
|
408
|
-
},
|
408
|
+
}, r.prototype._complete = function() {
|
409
409
|
try {
|
410
410
|
this.destination.complete();
|
411
411
|
} finally {
|
412
412
|
this.unsubscribe();
|
413
413
|
}
|
414
|
-
},
|
414
|
+
}, r;
|
415
415
|
}(j), _t = Function.prototype.bind;
|
416
|
-
function F(
|
417
|
-
return _t.call(
|
416
|
+
function F(e, r) {
|
417
|
+
return _t.call(e, r);
|
418
418
|
}
|
419
419
|
var It = function() {
|
420
|
-
function r
|
421
|
-
this.partialObserver =
|
420
|
+
function e(r) {
|
421
|
+
this.partialObserver = r;
|
422
422
|
}
|
423
|
-
return
|
423
|
+
return e.prototype.next = function(r) {
|
424
424
|
var t = this.partialObserver;
|
425
425
|
if (t.next)
|
426
426
|
try {
|
427
|
-
t.next(
|
427
|
+
t.next(r);
|
428
428
|
} catch (n) {
|
429
429
|
A(n);
|
430
430
|
}
|
431
|
-
},
|
431
|
+
}, e.prototype.error = function(r) {
|
432
432
|
var t = this.partialObserver;
|
433
433
|
if (t.error)
|
434
434
|
try {
|
435
|
-
t.error(
|
435
|
+
t.error(r);
|
436
436
|
} catch (n) {
|
437
437
|
A(n);
|
438
438
|
}
|
439
439
|
else
|
440
|
-
A(
|
441
|
-
},
|
442
|
-
var
|
443
|
-
if (
|
440
|
+
A(r);
|
441
|
+
}, e.prototype.complete = function() {
|
442
|
+
var r = this.partialObserver;
|
443
|
+
if (r.complete)
|
444
444
|
try {
|
445
|
-
|
445
|
+
r.complete();
|
446
446
|
} catch (t) {
|
447
447
|
A(t);
|
448
448
|
}
|
449
|
-
},
|
450
|
-
}(), V = function(
|
451
|
-
x(
|
452
|
-
function
|
453
|
-
var o =
|
449
|
+
}, e;
|
450
|
+
}(), V = function(e) {
|
451
|
+
x(r, e);
|
452
|
+
function r(t, n, i) {
|
453
|
+
var o = e.call(this) || this, s;
|
454
454
|
if (h(t) || !t)
|
455
455
|
s = {
|
456
456
|
next: t ?? void 0,
|
@@ -469,13 +469,13 @@ var It = function() {
|
|
469
469
|
}
|
470
470
|
return o.destination = new It(s), o;
|
471
471
|
}
|
472
|
-
return
|
472
|
+
return r;
|
473
473
|
}(B);
|
474
|
-
function A(
|
475
|
-
et(
|
474
|
+
function A(e) {
|
475
|
+
et(e);
|
476
476
|
}
|
477
|
-
function Pt(
|
478
|
-
throw
|
477
|
+
function Pt(e) {
|
478
|
+
throw e;
|
479
479
|
}
|
480
480
|
var Ot = {
|
481
481
|
closed: !0,
|
@@ -485,42 +485,42 @@ var Ot = {
|
|
485
485
|
}, q = function() {
|
486
486
|
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
487
487
|
}();
|
488
|
-
function Ut(
|
489
|
-
return
|
488
|
+
function Ut(e) {
|
489
|
+
return e;
|
490
490
|
}
|
491
|
-
function At(
|
492
|
-
return
|
493
|
-
return
|
491
|
+
function At(e) {
|
492
|
+
return e.length === 0 ? Ut : e.length === 1 ? e[0] : function(t) {
|
493
|
+
return e.reduce(function(n, i) {
|
494
494
|
return i(n);
|
495
495
|
}, t);
|
496
496
|
};
|
497
497
|
}
|
498
498
|
var b = function() {
|
499
|
-
function r
|
500
|
-
|
501
|
-
}
|
502
|
-
return
|
503
|
-
var t = new
|
504
|
-
return t.source = this, t.operator =
|
505
|
-
},
|
506
|
-
var i = this, o = $t(
|
499
|
+
function e(r) {
|
500
|
+
r && (this._subscribe = r);
|
501
|
+
}
|
502
|
+
return e.prototype.lift = function(r) {
|
503
|
+
var t = new e();
|
504
|
+
return t.source = this, t.operator = r, t;
|
505
|
+
}, e.prototype.subscribe = function(r, t, n) {
|
506
|
+
var i = this, o = $t(r) ? r : new V(r, t, n);
|
507
507
|
return T(function() {
|
508
508
|
var s = i, u = s.operator, a = s.source;
|
509
509
|
o.add(u ? u.call(o, a) : a ? i._subscribe(o) : i._trySubscribe(o));
|
510
510
|
}), o;
|
511
|
-
},
|
511
|
+
}, e.prototype._trySubscribe = function(r) {
|
512
512
|
try {
|
513
|
-
return this._subscribe(
|
513
|
+
return this._subscribe(r);
|
514
514
|
} catch (t) {
|
515
|
-
|
515
|
+
r.error(t);
|
516
516
|
}
|
517
|
-
},
|
517
|
+
}, e.prototype.forEach = function(r, t) {
|
518
518
|
var n = this;
|
519
519
|
return t = K(t), new t(function(i, o) {
|
520
520
|
var s = new V({
|
521
521
|
next: function(u) {
|
522
522
|
try {
|
523
|
-
|
523
|
+
r(u);
|
524
524
|
} catch (a) {
|
525
525
|
o(a), s.unsubscribe();
|
526
526
|
}
|
@@ -530,18 +530,18 @@ var b = function() {
|
|
530
530
|
});
|
531
531
|
n.subscribe(s);
|
532
532
|
});
|
533
|
-
},
|
533
|
+
}, e.prototype._subscribe = function(r) {
|
534
534
|
var t;
|
535
|
-
return (t = this.source) === null || t === void 0 ? void 0 : t.subscribe(
|
536
|
-
},
|
535
|
+
return (t = this.source) === null || t === void 0 ? void 0 : t.subscribe(r);
|
536
|
+
}, e.prototype[q] = function() {
|
537
537
|
return this;
|
538
|
-
},
|
539
|
-
for (var
|
540
|
-
|
541
|
-
return At(
|
542
|
-
},
|
538
|
+
}, e.prototype.pipe = function() {
|
539
|
+
for (var r = [], t = 0; t < arguments.length; t++)
|
540
|
+
r[t] = arguments[t];
|
541
|
+
return At(r)(this);
|
542
|
+
}, e.prototype.toPromise = function(r) {
|
543
543
|
var t = this;
|
544
|
-
return
|
544
|
+
return r = K(r), new r(function(n, i) {
|
545
545
|
var o;
|
546
546
|
t.subscribe(function(s) {
|
547
547
|
return o = s;
|
@@ -551,29 +551,29 @@ var b = function() {
|
|
551
551
|
return n(o);
|
552
552
|
});
|
553
553
|
});
|
554
|
-
},
|
555
|
-
return new r
|
556
|
-
},
|
554
|
+
}, e.create = function(r) {
|
555
|
+
return new e(r);
|
556
|
+
}, e;
|
557
557
|
}();
|
558
|
-
function K(
|
559
|
-
var
|
560
|
-
return (
|
558
|
+
function K(e) {
|
559
|
+
var r;
|
560
|
+
return (r = e ?? tt.Promise) !== null && r !== void 0 ? r : Promise;
|
561
561
|
}
|
562
|
-
function Tt(
|
563
|
-
return
|
562
|
+
function Tt(e) {
|
563
|
+
return e && h(e.next) && h(e.error) && h(e.complete);
|
564
564
|
}
|
565
|
-
function $t(
|
566
|
-
return
|
565
|
+
function $t(e) {
|
566
|
+
return e && e instanceof B || Tt(e) && N(e);
|
567
567
|
}
|
568
|
-
function kt(
|
569
|
-
return h(
|
568
|
+
function kt(e) {
|
569
|
+
return h(e == null ? void 0 : e.lift);
|
570
570
|
}
|
571
|
-
function I(
|
572
|
-
return function(
|
573
|
-
if (kt(
|
574
|
-
return
|
571
|
+
function I(e) {
|
572
|
+
return function(r) {
|
573
|
+
if (kt(r))
|
574
|
+
return r.lift(function(t) {
|
575
575
|
try {
|
576
|
-
return
|
576
|
+
return e(t, this);
|
577
577
|
} catch (n) {
|
578
578
|
this.error(n);
|
579
579
|
}
|
@@ -581,20 +581,20 @@ function I(r) {
|
|
581
581
|
throw new TypeError("Unable to lift unknown Observable type");
|
582
582
|
};
|
583
583
|
}
|
584
|
-
function _(
|
585
|
-
return new jt(
|
584
|
+
function _(e, r, t, n, i) {
|
585
|
+
return new jt(e, r, t, n, i);
|
586
586
|
}
|
587
|
-
var jt = function(
|
588
|
-
x(
|
589
|
-
function
|
590
|
-
var a =
|
587
|
+
var jt = function(e) {
|
588
|
+
x(r, e);
|
589
|
+
function r(t, n, i, o, s, u) {
|
590
|
+
var a = e.call(this, t) || this;
|
591
591
|
return a.onFinalize = s, a.shouldUnsubscribe = u, a._next = n ? function(c) {
|
592
592
|
try {
|
593
593
|
n(c);
|
594
594
|
} catch (l) {
|
595
595
|
t.error(l);
|
596
596
|
}
|
597
|
-
} :
|
597
|
+
} : e.prototype._next, a._error = o ? function(c) {
|
598
598
|
try {
|
599
599
|
o(c);
|
600
600
|
} catch (l) {
|
@@ -602,7 +602,7 @@ var jt = function(r) {
|
|
602
602
|
} finally {
|
603
603
|
this.unsubscribe();
|
604
604
|
}
|
605
|
-
} :
|
605
|
+
} : e.prototype._error, a._complete = i ? function() {
|
606
606
|
try {
|
607
607
|
i();
|
608
608
|
} catch (c) {
|
@@ -610,32 +610,32 @@ var jt = function(r) {
|
|
610
610
|
} finally {
|
611
611
|
this.unsubscribe();
|
612
612
|
}
|
613
|
-
} :
|
613
|
+
} : e.prototype._complete, a;
|
614
614
|
}
|
615
|
-
return
|
615
|
+
return r.prototype.unsubscribe = function() {
|
616
616
|
var t;
|
617
617
|
if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {
|
618
618
|
var n = this.closed;
|
619
|
-
|
619
|
+
e.prototype.unsubscribe.call(this), !n && ((t = this.onFinalize) === null || t === void 0 || t.call(this));
|
620
620
|
}
|
621
|
-
},
|
622
|
-
}(B), Ct = X(function(
|
621
|
+
}, r;
|
622
|
+
}(B), Ct = X(function(e) {
|
623
623
|
return function() {
|
624
|
-
|
624
|
+
e(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
|
625
625
|
};
|
626
|
-
}), m = function(
|
627
|
-
x(
|
628
|
-
function
|
629
|
-
var t =
|
626
|
+
}), m = function(e) {
|
627
|
+
x(r, e);
|
628
|
+
function r() {
|
629
|
+
var t = e.call(this) || this;
|
630
630
|
return t.closed = !1, t.currentObservers = null, t.observers = [], t.isStopped = !1, t.hasError = !1, t.thrownError = null, t;
|
631
631
|
}
|
632
|
-
return
|
632
|
+
return r.prototype.lift = function(t) {
|
633
633
|
var n = new J(this, this);
|
634
634
|
return n.operator = t, n;
|
635
|
-
},
|
635
|
+
}, r.prototype._throwIfClosed = function() {
|
636
636
|
if (this.closed)
|
637
637
|
throw new Ct();
|
638
|
-
},
|
638
|
+
}, r.prototype.next = function(t) {
|
639
639
|
var n = this;
|
640
640
|
T(function() {
|
641
641
|
var i, o;
|
@@ -658,7 +658,7 @@ var jt = function(r) {
|
|
658
658
|
}
|
659
659
|
}
|
660
660
|
});
|
661
|
-
},
|
661
|
+
}, r.prototype.error = function(t) {
|
662
662
|
var n = this;
|
663
663
|
T(function() {
|
664
664
|
if (n._throwIfClosed(), !n.isStopped) {
|
@@ -667,7 +667,7 @@ var jt = function(r) {
|
|
667
667
|
i.shift().error(t);
|
668
668
|
}
|
669
669
|
});
|
670
|
-
},
|
670
|
+
}, r.prototype.complete = function() {
|
671
671
|
var t = this;
|
672
672
|
T(function() {
|
673
673
|
if (t._throwIfClosed(), !t.isStopped) {
|
@@ -676,116 +676,116 @@ var jt = function(r) {
|
|
676
676
|
n.shift().complete();
|
677
677
|
}
|
678
678
|
});
|
679
|
-
},
|
679
|
+
}, r.prototype.unsubscribe = function() {
|
680
680
|
this.isStopped = this.closed = !0, this.observers = this.currentObservers = null;
|
681
|
-
}, Object.defineProperty(
|
681
|
+
}, Object.defineProperty(r.prototype, "observed", {
|
682
682
|
get: function() {
|
683
683
|
var t;
|
684
684
|
return ((t = this.observers) === null || t === void 0 ? void 0 : t.length) > 0;
|
685
685
|
},
|
686
686
|
enumerable: !1,
|
687
687
|
configurable: !0
|
688
|
-
}),
|
689
|
-
return this._throwIfClosed(),
|
690
|
-
},
|
688
|
+
}), r.prototype._trySubscribe = function(t) {
|
689
|
+
return this._throwIfClosed(), e.prototype._trySubscribe.call(this, t);
|
690
|
+
}, r.prototype._subscribe = function(t) {
|
691
691
|
return this._throwIfClosed(), this._checkFinalizedStatuses(t), this._innerSubscribe(t);
|
692
|
-
},
|
692
|
+
}, r.prototype._innerSubscribe = function(t) {
|
693
693
|
var n = this, i = this, o = i.hasError, s = i.isStopped, u = i.observers;
|
694
694
|
return o || s ? Z : (this.currentObservers = null, u.push(t), new j(function() {
|
695
695
|
n.currentObservers = null, D(u, t);
|
696
696
|
}));
|
697
|
-
},
|
697
|
+
}, r.prototype._checkFinalizedStatuses = function(t) {
|
698
698
|
var n = this, i = n.hasError, o = n.thrownError, s = n.isStopped;
|
699
699
|
i ? t.error(o) : s && t.complete();
|
700
|
-
},
|
700
|
+
}, r.prototype.asObservable = function() {
|
701
701
|
var t = new b();
|
702
702
|
return t.source = this, t;
|
703
|
-
},
|
703
|
+
}, r.create = function(t, n) {
|
704
704
|
return new J(t, n);
|
705
|
-
},
|
706
|
-
}(b), J = function(
|
707
|
-
x(
|
708
|
-
function
|
709
|
-
var i =
|
705
|
+
}, r;
|
706
|
+
}(b), J = function(e) {
|
707
|
+
x(r, e);
|
708
|
+
function r(t, n) {
|
709
|
+
var i = e.call(this) || this;
|
710
710
|
return i.destination = t, i.source = n, i;
|
711
711
|
}
|
712
|
-
return
|
712
|
+
return r.prototype.next = function(t) {
|
713
713
|
var n, i;
|
714
714
|
(i = (n = this.destination) === null || n === void 0 ? void 0 : n.next) === null || i === void 0 || i.call(n, t);
|
715
|
-
},
|
715
|
+
}, r.prototype.error = function(t) {
|
716
716
|
var n, i;
|
717
717
|
(i = (n = this.destination) === null || n === void 0 ? void 0 : n.error) === null || i === void 0 || i.call(n, t);
|
718
|
-
},
|
718
|
+
}, r.prototype.complete = function() {
|
719
719
|
var t, n;
|
720
720
|
(n = (t = this.destination) === null || t === void 0 ? void 0 : t.complete) === null || n === void 0 || n.call(t);
|
721
|
-
},
|
721
|
+
}, r.prototype._subscribe = function(t) {
|
722
722
|
var n, i;
|
723
723
|
return (i = (n = this.source) === null || n === void 0 ? void 0 : n.subscribe(t)) !== null && i !== void 0 ? i : Z;
|
724
|
-
},
|
725
|
-
}(m), rt = function(
|
726
|
-
x(
|
727
|
-
function
|
728
|
-
var n =
|
724
|
+
}, r;
|
725
|
+
}(m), rt = function(e) {
|
726
|
+
x(r, e);
|
727
|
+
function r(t) {
|
728
|
+
var n = e.call(this) || this;
|
729
729
|
return n._value = t, n;
|
730
730
|
}
|
731
|
-
return Object.defineProperty(
|
731
|
+
return Object.defineProperty(r.prototype, "value", {
|
732
732
|
get: function() {
|
733
733
|
return this.getValue();
|
734
734
|
},
|
735
735
|
enumerable: !1,
|
736
736
|
configurable: !0
|
737
|
-
}),
|
738
|
-
var n =
|
737
|
+
}), r.prototype._subscribe = function(t) {
|
738
|
+
var n = e.prototype._subscribe.call(this, t);
|
739
739
|
return !n.closed && t.next(this._value), n;
|
740
|
-
},
|
740
|
+
}, r.prototype.getValue = function() {
|
741
741
|
var t = this, n = t.hasError, i = t.thrownError, o = t._value;
|
742
742
|
if (n)
|
743
743
|
throw i;
|
744
744
|
return this._throwIfClosed(), o;
|
745
|
-
},
|
746
|
-
|
747
|
-
},
|
748
|
-
}(m), Rt = new b(function(
|
749
|
-
return
|
745
|
+
}, r.prototype.next = function(t) {
|
746
|
+
e.prototype.next.call(this, this._value = t);
|
747
|
+
}, r;
|
748
|
+
}(m), Rt = new b(function(e) {
|
749
|
+
return e.complete();
|
750
750
|
});
|
751
|
-
function Ft(
|
752
|
-
return
|
751
|
+
function Ft(e) {
|
752
|
+
return e && h(e.schedule);
|
753
753
|
}
|
754
|
-
function Lt(
|
755
|
-
return
|
754
|
+
function Lt(e) {
|
755
|
+
return e[e.length - 1];
|
756
756
|
}
|
757
|
-
function Dt(
|
758
|
-
return Ft(Lt(
|
757
|
+
function Dt(e) {
|
758
|
+
return Ft(Lt(e)) ? e.pop() : void 0;
|
759
759
|
}
|
760
|
-
var nt = function(
|
761
|
-
return
|
760
|
+
var nt = function(e) {
|
761
|
+
return e && typeof e.length == "number" && typeof e != "function";
|
762
762
|
};
|
763
|
-
function it(
|
764
|
-
return h(
|
763
|
+
function it(e) {
|
764
|
+
return h(e == null ? void 0 : e.then);
|
765
765
|
}
|
766
|
-
function ot(
|
767
|
-
return h(
|
766
|
+
function ot(e) {
|
767
|
+
return h(e[q]);
|
768
768
|
}
|
769
|
-
function st(
|
770
|
-
return Symbol.asyncIterator && h(
|
769
|
+
function st(e) {
|
770
|
+
return Symbol.asyncIterator && h(e == null ? void 0 : e[Symbol.asyncIterator]);
|
771
771
|
}
|
772
|
-
function ut(
|
773
|
-
return new TypeError("You provided " + (
|
772
|
+
function ut(e) {
|
773
|
+
return new TypeError("You provided " + (e !== null && typeof e == "object" ? "an invalid object" : "'" + e + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.");
|
774
774
|
}
|
775
775
|
function Mt() {
|
776
776
|
return typeof Symbol != "function" || !Symbol.iterator ? "@@iterator" : Symbol.iterator;
|
777
777
|
}
|
778
778
|
var ct = Mt();
|
779
|
-
function at(
|
780
|
-
return h(
|
779
|
+
function at(e) {
|
780
|
+
return h(e == null ? void 0 : e[ct]);
|
781
781
|
}
|
782
|
-
function lt(
|
782
|
+
function lt(e) {
|
783
783
|
return xt(this, arguments, function() {
|
784
784
|
var t, n, i, o;
|
785
785
|
return W(this, function(s) {
|
786
786
|
switch (s.label) {
|
787
787
|
case 0:
|
788
|
-
t =
|
788
|
+
t = e.getReader(), s.label = 1;
|
789
789
|
case 1:
|
790
790
|
s.trys.push([1, , 9, 10]), s.label = 2;
|
791
791
|
case 2:
|
@@ -810,59 +810,59 @@ function lt(r) {
|
|
810
810
|
});
|
811
811
|
});
|
812
812
|
}
|
813
|
-
function ft(
|
814
|
-
return h(
|
813
|
+
function ft(e) {
|
814
|
+
return h(e == null ? void 0 : e.getReader);
|
815
815
|
}
|
816
|
-
function P(
|
817
|
-
if (
|
818
|
-
return
|
819
|
-
if (
|
820
|
-
if (ot(
|
821
|
-
return Yt(
|
822
|
-
if (nt(
|
823
|
-
return Vt(
|
824
|
-
if (it(
|
825
|
-
return Bt(
|
826
|
-
if (st(
|
827
|
-
return ht(
|
828
|
-
if (at(
|
829
|
-
return qt(
|
830
|
-
if (ft(
|
831
|
-
return Ht(
|
832
|
-
}
|
833
|
-
throw ut(
|
834
|
-
}
|
835
|
-
function Yt(
|
836
|
-
return new b(function(
|
837
|
-
var t =
|
816
|
+
function P(e) {
|
817
|
+
if (e instanceof b)
|
818
|
+
return e;
|
819
|
+
if (e != null) {
|
820
|
+
if (ot(e))
|
821
|
+
return Yt(e);
|
822
|
+
if (nt(e))
|
823
|
+
return Vt(e);
|
824
|
+
if (it(e))
|
825
|
+
return Bt(e);
|
826
|
+
if (st(e))
|
827
|
+
return ht(e);
|
828
|
+
if (at(e))
|
829
|
+
return qt(e);
|
830
|
+
if (ft(e))
|
831
|
+
return Ht(e);
|
832
|
+
}
|
833
|
+
throw ut(e);
|
834
|
+
}
|
835
|
+
function Yt(e) {
|
836
|
+
return new b(function(r) {
|
837
|
+
var t = e[q]();
|
838
838
|
if (h(t.subscribe))
|
839
|
-
return t.subscribe(
|
839
|
+
return t.subscribe(r);
|
840
840
|
throw new TypeError("Provided object does not correctly implement Symbol.observable");
|
841
841
|
});
|
842
842
|
}
|
843
|
-
function Vt(
|
844
|
-
return new b(function(
|
845
|
-
for (var t = 0; t <
|
846
|
-
|
847
|
-
|
843
|
+
function Vt(e) {
|
844
|
+
return new b(function(r) {
|
845
|
+
for (var t = 0; t < e.length && !r.closed; t++)
|
846
|
+
r.next(e[t]);
|
847
|
+
r.complete();
|
848
848
|
});
|
849
849
|
}
|
850
|
-
function Bt(
|
851
|
-
return new b(function(
|
852
|
-
|
853
|
-
|
850
|
+
function Bt(e) {
|
851
|
+
return new b(function(r) {
|
852
|
+
e.then(function(t) {
|
853
|
+
r.closed || (r.next(t), r.complete());
|
854
854
|
}, function(t) {
|
855
|
-
return
|
855
|
+
return r.error(t);
|
856
856
|
}).then(null, et);
|
857
857
|
});
|
858
858
|
}
|
859
|
-
function qt(
|
860
|
-
return new b(function(
|
859
|
+
function qt(e) {
|
860
|
+
return new b(function(r) {
|
861
861
|
var t, n;
|
862
862
|
try {
|
863
|
-
for (var i = g(
|
863
|
+
for (var i = g(e), o = i.next(); !o.done; o = i.next()) {
|
864
864
|
var s = o.value;
|
865
|
-
if (
|
865
|
+
if (r.next(s), r.closed)
|
866
866
|
return;
|
867
867
|
}
|
868
868
|
} catch (u) {
|
@@ -875,33 +875,33 @@ function qt(r) {
|
|
875
875
|
throw t.error;
|
876
876
|
}
|
877
877
|
}
|
878
|
-
|
878
|
+
r.complete();
|
879
879
|
});
|
880
880
|
}
|
881
|
-
function ht(
|
882
|
-
return new b(function(
|
883
|
-
Gt(
|
884
|
-
return
|
881
|
+
function ht(e) {
|
882
|
+
return new b(function(r) {
|
883
|
+
Gt(e, r).catch(function(t) {
|
884
|
+
return r.error(t);
|
885
885
|
});
|
886
886
|
});
|
887
887
|
}
|
888
|
-
function Ht(
|
889
|
-
return ht(lt(
|
888
|
+
function Ht(e) {
|
889
|
+
return ht(lt(e));
|
890
890
|
}
|
891
|
-
function Gt(
|
891
|
+
function Gt(e, r) {
|
892
892
|
var t, n, i, o;
|
893
893
|
return gt(this, void 0, void 0, function() {
|
894
894
|
var s, u;
|
895
895
|
return W(this, function(a) {
|
896
896
|
switch (a.label) {
|
897
897
|
case 0:
|
898
|
-
a.trys.push([0, 5, 6, 11]), t = Et(
|
898
|
+
a.trys.push([0, 5, 6, 11]), t = Et(e), a.label = 1;
|
899
899
|
case 1:
|
900
900
|
return [4, t.next()];
|
901
901
|
case 2:
|
902
902
|
if (n = a.sent(), !!n.done)
|
903
903
|
return [3, 4];
|
904
|
-
if (s = n.value,
|
904
|
+
if (s = n.value, r.next(s), r.closed)
|
905
905
|
return [2];
|
906
906
|
a.label = 3;
|
907
907
|
case 3:
|
@@ -923,62 +923,62 @@ function Gt(r, e) {
|
|
923
923
|
case 10:
|
924
924
|
return [7];
|
925
925
|
case 11:
|
926
|
-
return
|
926
|
+
return r.complete(), [2];
|
927
927
|
}
|
928
928
|
});
|
929
929
|
});
|
930
930
|
}
|
931
|
-
function w(
|
931
|
+
function w(e, r, t, n, i) {
|
932
932
|
n === void 0 && (n = 0), i === void 0 && (i = !1);
|
933
|
-
var o =
|
934
|
-
t(), i ?
|
933
|
+
var o = r.schedule(function() {
|
934
|
+
t(), i ? e.add(this.schedule(null, n)) : this.unsubscribe();
|
935
935
|
}, n);
|
936
|
-
if (
|
936
|
+
if (e.add(o), !i)
|
937
937
|
return o;
|
938
938
|
}
|
939
|
-
function pt(
|
940
|
-
return
|
939
|
+
function pt(e, r) {
|
940
|
+
return r === void 0 && (r = 0), I(function(t, n) {
|
941
941
|
t.subscribe(_(n, function(i) {
|
942
|
-
return w(n,
|
942
|
+
return w(n, e, function() {
|
943
943
|
return n.next(i);
|
944
|
-
},
|
944
|
+
}, r);
|
945
945
|
}, function() {
|
946
|
-
return w(n,
|
946
|
+
return w(n, e, function() {
|
947
947
|
return n.complete();
|
948
|
-
},
|
948
|
+
}, r);
|
949
949
|
}, function(i) {
|
950
|
-
return w(n,
|
950
|
+
return w(n, e, function() {
|
951
951
|
return n.error(i);
|
952
|
-
},
|
952
|
+
}, r);
|
953
953
|
}));
|
954
954
|
});
|
955
955
|
}
|
956
|
-
function dt(
|
957
|
-
return
|
958
|
-
n.add(
|
956
|
+
function dt(e, r) {
|
957
|
+
return r === void 0 && (r = 0), I(function(t, n) {
|
958
|
+
n.add(e.schedule(function() {
|
959
959
|
return t.subscribe(n);
|
960
|
-
},
|
960
|
+
}, r));
|
961
961
|
});
|
962
962
|
}
|
963
|
-
function zt(
|
964
|
-
return P(
|
963
|
+
function zt(e, r) {
|
964
|
+
return P(e).pipe(dt(r), pt(r));
|
965
965
|
}
|
966
|
-
function Kt(
|
967
|
-
return P(
|
966
|
+
function Kt(e, r) {
|
967
|
+
return P(e).pipe(dt(r), pt(r));
|
968
968
|
}
|
969
|
-
function Jt(
|
969
|
+
function Jt(e, r) {
|
970
970
|
return new b(function(t) {
|
971
971
|
var n = 0;
|
972
|
-
return
|
973
|
-
n ===
|
972
|
+
return r.schedule(function() {
|
973
|
+
n === e.length ? t.complete() : (t.next(e[n++]), t.closed || this.schedule());
|
974
974
|
});
|
975
975
|
});
|
976
976
|
}
|
977
|
-
function Qt(
|
977
|
+
function Qt(e, r) {
|
978
978
|
return new b(function(t) {
|
979
979
|
var n;
|
980
|
-
return w(t,
|
981
|
-
n =
|
980
|
+
return w(t, r, function() {
|
981
|
+
n = e[ct](), w(t, r, function() {
|
982
982
|
var i, o, s;
|
983
983
|
try {
|
984
984
|
i = n.next(), o = i.value, s = i.done;
|
@@ -993,13 +993,13 @@ function Qt(r, e) {
|
|
993
993
|
};
|
994
994
|
});
|
995
995
|
}
|
996
|
-
function vt(
|
997
|
-
if (!
|
996
|
+
function vt(e, r) {
|
997
|
+
if (!e)
|
998
998
|
throw new Error("Iterable cannot be null");
|
999
999
|
return new b(function(t) {
|
1000
|
-
w(t,
|
1001
|
-
var n =
|
1002
|
-
w(t,
|
1000
|
+
w(t, r, function() {
|
1001
|
+
var n = e[Symbol.asyncIterator]();
|
1002
|
+
w(t, r, function() {
|
1003
1003
|
n.next().then(function(i) {
|
1004
1004
|
i.done ? t.complete() : t.next(i.value);
|
1005
1005
|
});
|
@@ -1007,46 +1007,46 @@ function vt(r, e) {
|
|
1007
1007
|
});
|
1008
1008
|
});
|
1009
1009
|
}
|
1010
|
-
function Wt(
|
1011
|
-
return vt(lt(
|
1012
|
-
}
|
1013
|
-
function Xt(
|
1014
|
-
if (
|
1015
|
-
if (ot(
|
1016
|
-
return zt(
|
1017
|
-
if (nt(
|
1018
|
-
return Jt(
|
1019
|
-
if (it(
|
1020
|
-
return Kt(
|
1021
|
-
if (st(
|
1022
|
-
return vt(
|
1023
|
-
if (at(
|
1024
|
-
return Qt(
|
1025
|
-
if (ft(
|
1026
|
-
return Wt(
|
1027
|
-
}
|
1028
|
-
throw ut(
|
1029
|
-
}
|
1030
|
-
function Zt(
|
1031
|
-
return
|
1010
|
+
function Wt(e, r) {
|
1011
|
+
return vt(lt(e), r);
|
1012
|
+
}
|
1013
|
+
function Xt(e, r) {
|
1014
|
+
if (e != null) {
|
1015
|
+
if (ot(e))
|
1016
|
+
return zt(e, r);
|
1017
|
+
if (nt(e))
|
1018
|
+
return Jt(e, r);
|
1019
|
+
if (it(e))
|
1020
|
+
return Kt(e, r);
|
1021
|
+
if (st(e))
|
1022
|
+
return vt(e, r);
|
1023
|
+
if (at(e))
|
1024
|
+
return Qt(e, r);
|
1025
|
+
if (ft(e))
|
1026
|
+
return Wt(e, r);
|
1027
|
+
}
|
1028
|
+
throw ut(e);
|
1029
|
+
}
|
1030
|
+
function Zt(e, r) {
|
1031
|
+
return r ? Xt(e, r) : P(e);
|
1032
1032
|
}
|
1033
1033
|
function Nt() {
|
1034
|
-
for (var
|
1035
|
-
r
|
1036
|
-
var t = Dt(
|
1037
|
-
return Zt(
|
1034
|
+
for (var e = [], r = 0; r < arguments.length; r++)
|
1035
|
+
e[r] = arguments[r];
|
1036
|
+
var t = Dt(e);
|
1037
|
+
return Zt(e, t);
|
1038
1038
|
}
|
1039
|
-
function Q(
|
1040
|
-
return
|
1039
|
+
function Q(e) {
|
1040
|
+
return e <= 0 ? function() {
|
1041
1041
|
return Rt;
|
1042
|
-
} : I(function(
|
1042
|
+
} : I(function(r, t) {
|
1043
1043
|
var n = 0;
|
1044
|
-
|
1045
|
-
++n <=
|
1044
|
+
r.subscribe(_(t, function(i) {
|
1045
|
+
++n <= e && (t.next(i), e <= n && t.complete());
|
1046
1046
|
}));
|
1047
1047
|
});
|
1048
1048
|
}
|
1049
|
-
function te(
|
1049
|
+
function te(e, r) {
|
1050
1050
|
return I(function(t, n) {
|
1051
1051
|
var i = null, o = 0, s = !1, u = function() {
|
1052
1052
|
return s && !i && n.complete();
|
@@ -1054,8 +1054,8 @@ function te(r, e) {
|
|
1054
1054
|
t.subscribe(_(n, function(a) {
|
1055
1055
|
i == null || i.unsubscribe();
|
1056
1056
|
var c = 0, l = o++;
|
1057
|
-
P(
|
1058
|
-
return n.next(
|
1057
|
+
P(e(a, l)).subscribe(i = _(n, function(v) {
|
1058
|
+
return n.next(r ? r(a, v, l, c++) : v);
|
1059
1059
|
}, function() {
|
1060
1060
|
i = null, u();
|
1061
1061
|
}));
|
@@ -1064,16 +1064,16 @@ function te(r, e) {
|
|
1064
1064
|
}));
|
1065
1065
|
});
|
1066
1066
|
}
|
1067
|
-
function ee(
|
1068
|
-
return I(function(
|
1069
|
-
P(
|
1067
|
+
function ee(e) {
|
1068
|
+
return I(function(r, t) {
|
1069
|
+
P(e).subscribe(_(t, function() {
|
1070
1070
|
return t.complete();
|
1071
|
-
}, Y)), !t.closed &&
|
1071
|
+
}, Y)), !t.closed && r.subscribe(t);
|
1072
1072
|
});
|
1073
1073
|
}
|
1074
1074
|
class re {
|
1075
|
-
constructor(
|
1076
|
-
this.id =
|
1075
|
+
constructor(r, t, n) {
|
1076
|
+
this.id = r, this.component = t, this.platform = n, this.entries$ = new rt([]), this.kill$ = new m(), this.queue = [], t.addEventListener("user-submit", (i) => {
|
1077
1077
|
if (!this.provider) {
|
1078
1078
|
console.warn(
|
1079
1079
|
"No provider activated, unable to print message to conversation."
|
@@ -1083,38 +1083,38 @@ class re {
|
|
1083
1083
|
this.provider.onUserSubmit(i.detail);
|
1084
1084
|
});
|
1085
1085
|
}
|
1086
|
-
write(
|
1087
|
-
this.addEntryRemoveHandler(
|
1088
|
-
this.entries$.next([...t,
|
1086
|
+
write(r) {
|
1087
|
+
this.addEntryRemoveHandler(r), this.entries$.pipe(Q(1)).subscribe((t) => {
|
1088
|
+
this.entries$.next([...t, r]);
|
1089
1089
|
});
|
1090
1090
|
}
|
1091
1091
|
entries() {
|
1092
1092
|
return this.entries$.asObservable();
|
1093
1093
|
}
|
1094
|
-
setProvider(
|
1095
|
-
this.provider =
|
1094
|
+
setProvider(r) {
|
1095
|
+
this.provider = r, this.provider.actions().pipe(ee(this.kill$)).subscribe((t) => {
|
1096
1096
|
this.write(t);
|
1097
1097
|
}), this.provider.connect();
|
1098
1098
|
}
|
1099
|
-
handover(
|
1100
|
-
const t = this.platform.registeredProviders.get(
|
1099
|
+
handover(r) {
|
1100
|
+
const t = this.platform.registeredProviders.get(r);
|
1101
1101
|
if (t) {
|
1102
1102
|
this.provider && this.queue.unshift(this.provider), this.kill$.next();
|
1103
1103
|
const n = t(this);
|
1104
1104
|
this.setProvider(n);
|
1105
1105
|
}
|
1106
1106
|
}
|
1107
|
-
addEntryRemoveHandler(
|
1108
|
-
|
1107
|
+
addEntryRemoveHandler(r) {
|
1108
|
+
r.remove$.pipe(
|
1109
1109
|
te(() => this.entries$),
|
1110
1110
|
Q(1)
|
1111
1111
|
).subscribe((t) => {
|
1112
|
-
this.entries$.next(t.filter((n) => n !==
|
1112
|
+
this.entries$.next(t.filter((n) => n !== r));
|
1113
1113
|
});
|
1114
1114
|
}
|
1115
1115
|
completeProvider() {
|
1116
|
-
const [
|
1117
|
-
|
1116
|
+
const [r] = this.queue;
|
1117
|
+
r && this.setProvider(r);
|
1118
1118
|
}
|
1119
1119
|
isTyping() {
|
1120
1120
|
return this.provider ? this.provider.isTyping() : Nt(!1);
|
@@ -1124,23 +1124,23 @@ class H {
|
|
1124
1124
|
constructor() {
|
1125
1125
|
this.sessions = /* @__PURE__ */ new Map(), this.registeredProviders = /* @__PURE__ */ new Map(), this.activeSessionId = null;
|
1126
1126
|
}
|
1127
|
-
static async getInstance(
|
1128
|
-
let t = await
|
1129
|
-
return t || (t = new H(), await
|
1127
|
+
static async getInstance(r) {
|
1128
|
+
let t = await r.get("conversation");
|
1129
|
+
return t || (t = new H(), await r.register("conversation", t), t);
|
1130
1130
|
}
|
1131
|
-
registerProvider(
|
1132
|
-
this.registeredProviders.set(
|
1131
|
+
registerProvider(r, t) {
|
1132
|
+
this.registeredProviders.set(r, t);
|
1133
1133
|
}
|
1134
|
-
createSession(
|
1135
|
-
const t = new re(St(),
|
1134
|
+
createSession(r) {
|
1135
|
+
const t = new re(St(), r, this), n = this.getProviderByConfiguration(r);
|
1136
1136
|
if (n) {
|
1137
1137
|
const i = n(t);
|
1138
1138
|
t.setProvider(i);
|
1139
1139
|
}
|
1140
1140
|
return this.sessions.set(t.id, t), this.activeSessionId = t.id, t;
|
1141
1141
|
}
|
1142
|
-
getProviderByConfiguration(
|
1143
|
-
const [t] =
|
1142
|
+
getProviderByConfiguration(r) {
|
1143
|
+
const [t] = r.properties.providers || [];
|
1144
1144
|
if (!t) {
|
1145
1145
|
console.warn(
|
1146
1146
|
"No providers registered. You most likely forgot to add a provider to the conversation component properties."
|
@@ -1150,18 +1150,18 @@ class H {
|
|
1150
1150
|
return this.registeredProviders.get(t);
|
1151
1151
|
}
|
1152
1152
|
}
|
1153
|
-
const se = async (
|
1154
|
-
|
1153
|
+
const se = async (e) => {
|
1154
|
+
e.registerComponent("conversation", import("./conversation-29bea177.mjs")), await H.getInstance(e.container);
|
1155
1155
|
};
|
1156
|
-
var O = /* @__PURE__ */ ((
|
1156
|
+
var O = /* @__PURE__ */ ((e) => (e.User = "user", e.Agent = "agent", e.System = "system", e))(O || {});
|
1157
1157
|
class C {
|
1158
|
-
constructor(
|
1159
|
-
this.type =
|
1158
|
+
constructor(r, t, n) {
|
1159
|
+
this.type = r, this.sender = t, this.messages = n, this.didUpdate = new m(), this.actions$ = new m(), this.remove$ = new m(), this.timestamp = Date.now();
|
1160
1160
|
}
|
1161
|
-
update(
|
1161
|
+
update(r) {
|
1162
1162
|
this.messages = [
|
1163
1163
|
{
|
1164
|
-
items:
|
1164
|
+
items: r
|
1165
1165
|
}
|
1166
1166
|
], this.didUpdate.next(this);
|
1167
1167
|
}
|
@@ -1170,16 +1170,16 @@ class C {
|
|
1170
1170
|
}
|
1171
1171
|
}
|
1172
1172
|
class ne {
|
1173
|
-
constructor(
|
1174
|
-
this.name =
|
1173
|
+
constructor(r) {
|
1174
|
+
this.name = r, this.print$ = new m();
|
1175
1175
|
}
|
1176
|
-
print(
|
1176
|
+
print(r) {
|
1177
1177
|
const t = new C(
|
1178
1178
|
O.Agent,
|
1179
1179
|
{ name: this.name },
|
1180
1180
|
[
|
1181
1181
|
{
|
1182
|
-
items: [["html", { content:
|
1182
|
+
items: [["html", { content: r }]]
|
1183
1183
|
}
|
1184
1184
|
]
|
1185
1185
|
);
|
@@ -1190,16 +1190,16 @@ class ne {
|
|
1190
1190
|
}
|
1191
1191
|
}
|
1192
1192
|
class ie {
|
1193
|
-
constructor(
|
1194
|
-
this.name =
|
1193
|
+
constructor(r) {
|
1194
|
+
this.name = r, this.print$ = new m();
|
1195
1195
|
}
|
1196
|
-
print(
|
1196
|
+
print(r) {
|
1197
1197
|
const t = new C(
|
1198
1198
|
O.User,
|
1199
1199
|
{ name: this.name },
|
1200
1200
|
[
|
1201
1201
|
{
|
1202
|
-
items: [["html", { content:
|
1202
|
+
items: [["html", { content: r }]]
|
1203
1203
|
}
|
1204
1204
|
]
|
1205
1205
|
);
|
@@ -1213,13 +1213,13 @@ class oe {
|
|
1213
1213
|
constructor() {
|
1214
1214
|
this.print$ = new m(), this.name = "system";
|
1215
1215
|
}
|
1216
|
-
print(
|
1216
|
+
print(r) {
|
1217
1217
|
const t = new C(
|
1218
1218
|
O.System,
|
1219
1219
|
{ name: this.name },
|
1220
1220
|
[
|
1221
1221
|
{
|
1222
|
-
items: [["html", { content:
|
1222
|
+
items: [["html", { content: r }]]
|
1223
1223
|
}
|
1224
1224
|
]
|
1225
1225
|
);
|
@@ -1230,17 +1230,17 @@ class oe {
|
|
1230
1230
|
}
|
1231
1231
|
}
|
1232
1232
|
class ue {
|
1233
|
-
constructor(
|
1234
|
-
this.name =
|
1233
|
+
constructor(r, t) {
|
1234
|
+
this.name = r, this.session = t, this.print$ = new m(), this.typingState$ = new rt(!1), this.system = this.createSystem();
|
1235
1235
|
}
|
1236
1236
|
connect() {
|
1237
1237
|
}
|
1238
|
-
onUserSubmit(
|
1239
|
-
this.print(O.User,
|
1238
|
+
onUserSubmit(r) {
|
1239
|
+
this.print(O.User, r.text);
|
1240
1240
|
}
|
1241
|
-
print(
|
1241
|
+
print(r, t) {
|
1242
1242
|
const n = new C(
|
1243
|
-
|
1243
|
+
r,
|
1244
1244
|
{
|
1245
1245
|
name: ""
|
1246
1246
|
},
|
@@ -1252,32 +1252,32 @@ class ue {
|
|
1252
1252
|
);
|
1253
1253
|
return this.printEntry(n);
|
1254
1254
|
}
|
1255
|
-
printEntry(
|
1256
|
-
return this.print$.next(
|
1255
|
+
printEntry(r) {
|
1256
|
+
return this.print$.next(r), r;
|
1257
1257
|
}
|
1258
|
-
createAgent(
|
1259
|
-
const t = new ne(
|
1258
|
+
createAgent(r) {
|
1259
|
+
const t = new ne(r);
|
1260
1260
|
return t.subscribe().subscribe((n) => {
|
1261
1261
|
this.playNotification(), this.printEntry(n);
|
1262
1262
|
}), t;
|
1263
1263
|
}
|
1264
|
-
createUser(
|
1265
|
-
const t = new ie(
|
1264
|
+
createUser(r) {
|
1265
|
+
const t = new ie(r);
|
1266
1266
|
return t.subscribe().subscribe((n) => {
|
1267
1267
|
this.printEntry(n);
|
1268
1268
|
}), t;
|
1269
1269
|
}
|
1270
1270
|
createSystem() {
|
1271
|
-
const
|
1272
|
-
return
|
1271
|
+
const r = new oe();
|
1272
|
+
return r.subscribe().subscribe((t) => {
|
1273
1273
|
this.printEntry(t);
|
1274
|
-
}),
|
1274
|
+
}), r;
|
1275
1275
|
}
|
1276
|
-
setTypingState(
|
1277
|
-
this.typingState$.next(
|
1276
|
+
setTypingState(r) {
|
1277
|
+
this.typingState$.next(r);
|
1278
1278
|
}
|
1279
|
-
setToastMessage(
|
1280
|
-
this.session.component.setToastMessage(
|
1279
|
+
setToastMessage(r) {
|
1280
|
+
this.session.component.setToastMessage(r);
|
1281
1281
|
}
|
1282
1282
|
isTyping() {
|
1283
1283
|
return this.typingState$.asObservable();
|
@@ -1289,8 +1289,8 @@ class ue {
|
|
1289
1289
|
this.session.completeProvider();
|
1290
1290
|
}
|
1291
1291
|
playNotification() {
|
1292
|
-
const
|
1293
|
-
this.session.component.application.branding().other.disableSound || new Audio(
|
1292
|
+
const r = "https://publicpoc.blob.core.windows.net/widget-assets/notification.mp3";
|
1293
|
+
this.session.component.application.branding().other.disableSound || new Audio(r).play();
|
1294
1294
|
}
|
1295
1295
|
}
|
1296
1296
|
export {
|