@asgard-js/core 0.0.10 → 0.0.11
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/dist/constants/enum.d.ts +2 -1
- package/dist/constants/enum.d.ts.map +1 -1
- package/dist/index.cjs +4 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +722 -716
- package/dist/index.mjs.map +1 -1
- package/dist/types/sse-response.d.ts +18 -1
- package/dist/types/sse-response.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,351 +1,356 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var m = (
|
|
4
|
-
var K = /* @__PURE__ */ ((
|
|
5
|
-
return Y = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e,
|
|
6
|
-
e.__proto__ =
|
|
7
|
-
} || function(e,
|
|
8
|
-
for (var i in
|
|
9
|
-
}, Y(
|
|
1
|
+
var De = Object.defineProperty;
|
|
2
|
+
var Ue = (n, t, e) => t in n ? De(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
|
|
3
|
+
var m = (n, t, e) => Ue(n, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
var K = /* @__PURE__ */ ((n) => (n.RESET_CHANNEL = "RESET_CHANNEL", n.NONE = "NONE", n))(K || {}), v = /* @__PURE__ */ ((n) => (n.INIT = "asgard.run.init", n.PROCESS = "asgard.process", n.PROCESS_START = "asgard.process.start", n.PROCESS_COMPLETE = "asgard.process.complete", n.MESSAGE = "asgard.message", n.MESSAGE_START = "asgard.message.start", n.MESSAGE_DELTA = "asgard.message.delta", n.MESSAGE_COMPLETE = "asgard.message.complete", n.DONE = "asgard.run.done", n.ERROR = "asgard.run.error", n))(v || {}), Ne = /* @__PURE__ */ ((n) => (n.TEXT = "TEXT", n.HINT = "HINT", n.BUTTON = "BUTTON", n.IMAGE = "IMAGE", n.VIDEO = "VIDEO", n.AUDIO = "AUDIO", n.LOCATION = "LOCATION", n.CAROUSEL = "CAROUSEL", n.CHART = "CHART", n))(Ne || {}), Y = function(n, t) {
|
|
5
|
+
return Y = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, r) {
|
|
6
|
+
e.__proto__ = r;
|
|
7
|
+
} || function(e, r) {
|
|
8
|
+
for (var i in r) Object.prototype.hasOwnProperty.call(r, i) && (e[i] = r[i]);
|
|
9
|
+
}, Y(n, t);
|
|
10
10
|
};
|
|
11
|
-
function O(
|
|
11
|
+
function O(n, t) {
|
|
12
12
|
if (typeof t != "function" && t !== null)
|
|
13
13
|
throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
|
|
14
|
-
Y(
|
|
14
|
+
Y(n, t);
|
|
15
15
|
function e() {
|
|
16
|
-
this.constructor =
|
|
16
|
+
this.constructor = n;
|
|
17
17
|
}
|
|
18
|
-
|
|
18
|
+
n.prototype = t === null ? Object.create(t) : (e.prototype = t.prototype, new e());
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function $e(n, t, e, r) {
|
|
21
21
|
function i(o) {
|
|
22
22
|
return o instanceof e ? o : new e(function(s) {
|
|
23
23
|
s(o);
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
return new (e || (e = Promise))(function(o, s) {
|
|
27
|
-
function c(
|
|
27
|
+
function c(f) {
|
|
28
28
|
try {
|
|
29
|
-
|
|
30
|
-
} catch (
|
|
31
|
-
s(
|
|
29
|
+
u(r.next(f));
|
|
30
|
+
} catch (h) {
|
|
31
|
+
s(h);
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function a(f) {
|
|
35
35
|
try {
|
|
36
|
-
|
|
37
|
-
} catch (
|
|
38
|
-
s(
|
|
36
|
+
u(r.throw(f));
|
|
37
|
+
} catch (h) {
|
|
38
|
+
s(h);
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
|
|
41
|
+
function u(f) {
|
|
42
|
+
f.done ? o(f.value) : i(f.value).then(c, a);
|
|
43
43
|
}
|
|
44
|
-
|
|
44
|
+
u((r = r.apply(n, t || [])).next());
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
|
-
function ce(
|
|
47
|
+
function ce(n, t) {
|
|
48
48
|
var e = { label: 0, sent: function() {
|
|
49
49
|
if (o[0] & 1) throw o[1];
|
|
50
50
|
return o[1];
|
|
51
|
-
}, trys: [], ops: [] },
|
|
51
|
+
}, trys: [], ops: [] }, r, i, o, s = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
52
52
|
return s.next = c(0), s.throw = c(1), s.return = c(2), typeof Symbol == "function" && (s[Symbol.iterator] = function() {
|
|
53
53
|
return this;
|
|
54
54
|
}), s;
|
|
55
|
-
function c(
|
|
56
|
-
return function(
|
|
57
|
-
return
|
|
55
|
+
function c(u) {
|
|
56
|
+
return function(f) {
|
|
57
|
+
return a([u, f]);
|
|
58
58
|
};
|
|
59
59
|
}
|
|
60
|
-
function u
|
|
61
|
-
if (
|
|
62
|
-
for (; s && (s = 0,
|
|
63
|
-
if (
|
|
64
|
-
switch (i = 0, o && (
|
|
60
|
+
function a(u) {
|
|
61
|
+
if (r) throw new TypeError("Generator is already executing.");
|
|
62
|
+
for (; s && (s = 0, u[0] && (e = 0)), e; ) try {
|
|
63
|
+
if (r = 1, i && (o = u[0] & 2 ? i.return : u[0] ? i.throw || ((o = i.return) && o.call(i), 0) : i.next) && !(o = o.call(i, u[1])).done) return o;
|
|
64
|
+
switch (i = 0, o && (u = [u[0] & 2, o.value]), u[0]) {
|
|
65
65
|
case 0:
|
|
66
66
|
case 1:
|
|
67
|
-
o =
|
|
67
|
+
o = u;
|
|
68
68
|
break;
|
|
69
69
|
case 4:
|
|
70
|
-
return e.label++, { value:
|
|
70
|
+
return e.label++, { value: u[1], done: !1 };
|
|
71
71
|
case 5:
|
|
72
|
-
e.label++, i =
|
|
72
|
+
e.label++, i = u[1], u = [0];
|
|
73
73
|
continue;
|
|
74
74
|
case 7:
|
|
75
|
-
|
|
75
|
+
u = e.ops.pop(), e.trys.pop();
|
|
76
76
|
continue;
|
|
77
77
|
default:
|
|
78
|
-
if (o = e.trys, !(o = o.length > 0 && o[o.length - 1]) && (
|
|
78
|
+
if (o = e.trys, !(o = o.length > 0 && o[o.length - 1]) && (u[0] === 6 || u[0] === 2)) {
|
|
79
79
|
e = 0;
|
|
80
80
|
continue;
|
|
81
81
|
}
|
|
82
|
-
if (
|
|
83
|
-
e.label =
|
|
82
|
+
if (u[0] === 3 && (!o || u[1] > o[0] && u[1] < o[3])) {
|
|
83
|
+
e.label = u[1];
|
|
84
84
|
break;
|
|
85
85
|
}
|
|
86
|
-
if (
|
|
87
|
-
e.label = o[1], o =
|
|
86
|
+
if (u[0] === 6 && e.label < o[1]) {
|
|
87
|
+
e.label = o[1], o = u;
|
|
88
88
|
break;
|
|
89
89
|
}
|
|
90
90
|
if (o && e.label < o[2]) {
|
|
91
|
-
e.label = o[2], e.ops.push(
|
|
91
|
+
e.label = o[2], e.ops.push(u);
|
|
92
92
|
break;
|
|
93
93
|
}
|
|
94
94
|
o[2] && e.ops.pop(), e.trys.pop();
|
|
95
95
|
continue;
|
|
96
96
|
}
|
|
97
|
-
|
|
98
|
-
} catch (
|
|
99
|
-
|
|
97
|
+
u = t.call(n, e);
|
|
98
|
+
} catch (f) {
|
|
99
|
+
u = [6, f], i = 0;
|
|
100
100
|
} finally {
|
|
101
|
-
|
|
101
|
+
r = o = 0;
|
|
102
102
|
}
|
|
103
|
-
if (
|
|
104
|
-
return { value:
|
|
103
|
+
if (u[0] & 5) throw u[1];
|
|
104
|
+
return { value: u[0] ? u[1] : void 0, done: !0 };
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
function M(
|
|
108
|
-
var t = typeof Symbol == "function" && Symbol.iterator, e = t &&
|
|
109
|
-
if (e) return e.call(
|
|
110
|
-
if (
|
|
107
|
+
function M(n) {
|
|
108
|
+
var t = typeof Symbol == "function" && Symbol.iterator, e = t && n[t], r = 0;
|
|
109
|
+
if (e) return e.call(n);
|
|
110
|
+
if (n && typeof n.length == "number") return {
|
|
111
111
|
next: function() {
|
|
112
|
-
return
|
|
112
|
+
return n && r >= n.length && (n = void 0), { value: n && n[r++], done: !n };
|
|
113
113
|
}
|
|
114
114
|
};
|
|
115
115
|
throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
116
116
|
}
|
|
117
|
-
function R(
|
|
118
|
-
var e = typeof Symbol == "function" &&
|
|
119
|
-
if (!e) return
|
|
120
|
-
var
|
|
117
|
+
function R(n, t) {
|
|
118
|
+
var e = typeof Symbol == "function" && n[Symbol.iterator];
|
|
119
|
+
if (!e) return n;
|
|
120
|
+
var r = e.call(n), i, o = [], s;
|
|
121
121
|
try {
|
|
122
|
-
for (; (t === void 0 || t-- > 0) && !(i =
|
|
122
|
+
for (; (t === void 0 || t-- > 0) && !(i = r.next()).done; ) o.push(i.value);
|
|
123
123
|
} catch (c) {
|
|
124
124
|
s = { error: c };
|
|
125
125
|
} finally {
|
|
126
126
|
try {
|
|
127
|
-
i && !i.done && (e =
|
|
127
|
+
i && !i.done && (e = r.return) && e.call(r);
|
|
128
128
|
} finally {
|
|
129
129
|
if (s) throw s.error;
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
return o;
|
|
133
133
|
}
|
|
134
|
-
function k(
|
|
135
|
-
if (e || arguments.length === 2) for (var
|
|
136
|
-
(o || !(
|
|
137
|
-
return
|
|
134
|
+
function k(n, t, e) {
|
|
135
|
+
if (e || arguments.length === 2) for (var r = 0, i = t.length, o; r < i; r++)
|
|
136
|
+
(o || !(r in t)) && (o || (o = Array.prototype.slice.call(t, 0, r)), o[r] = t[r]);
|
|
137
|
+
return n.concat(o || Array.prototype.slice.call(t));
|
|
138
138
|
}
|
|
139
|
-
function
|
|
140
|
-
return this instanceof
|
|
139
|
+
function P(n) {
|
|
140
|
+
return this instanceof P ? (this.v = n, this) : new P(n);
|
|
141
141
|
}
|
|
142
|
-
function
|
|
142
|
+
function Ge(n, t, e) {
|
|
143
143
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
144
|
-
var
|
|
144
|
+
var r = e.apply(n, t || []), i, o = [];
|
|
145
145
|
return i = Object.create((typeof AsyncIterator == "function" ? AsyncIterator : Object).prototype), c("next"), c("throw"), c("return", s), i[Symbol.asyncIterator] = function() {
|
|
146
146
|
return this;
|
|
147
147
|
}, i;
|
|
148
|
-
function s(
|
|
149
|
-
return function(
|
|
150
|
-
return Promise.resolve(
|
|
148
|
+
function s(l) {
|
|
149
|
+
return function(y) {
|
|
150
|
+
return Promise.resolve(y).then(l, h);
|
|
151
151
|
};
|
|
152
152
|
}
|
|
153
|
-
function c(
|
|
154
|
-
|
|
153
|
+
function c(l, y) {
|
|
154
|
+
r[l] && (i[l] = function(d) {
|
|
155
155
|
return new Promise(function(S, w) {
|
|
156
|
-
o.push([
|
|
156
|
+
o.push([l, d, S, w]) > 1 || a(l, d);
|
|
157
157
|
});
|
|
158
|
-
},
|
|
158
|
+
}, y && (i[l] = y(i[l])));
|
|
159
159
|
}
|
|
160
|
-
function
|
|
160
|
+
function a(l, y) {
|
|
161
161
|
try {
|
|
162
|
-
|
|
163
|
-
} catch (
|
|
164
|
-
b(o[0][3],
|
|
162
|
+
u(r[l](y));
|
|
163
|
+
} catch (d) {
|
|
164
|
+
b(o[0][3], d);
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
|
-
function
|
|
168
|
-
|
|
167
|
+
function u(l) {
|
|
168
|
+
l.value instanceof P ? Promise.resolve(l.value.v).then(f, h) : b(o[0][2], l);
|
|
169
169
|
}
|
|
170
|
-
function l
|
|
171
|
-
|
|
170
|
+
function f(l) {
|
|
171
|
+
a("next", l);
|
|
172
172
|
}
|
|
173
|
-
function
|
|
174
|
-
|
|
173
|
+
function h(l) {
|
|
174
|
+
a("throw", l);
|
|
175
175
|
}
|
|
176
|
-
function b(
|
|
177
|
-
|
|
176
|
+
function b(l, y) {
|
|
177
|
+
l(y), o.shift(), o.length && a(o[0][0], o[0][1]);
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
|
-
function
|
|
180
|
+
function Fe(n) {
|
|
181
181
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
182
|
-
var t =
|
|
183
|
-
return t ? t.call(
|
|
182
|
+
var t = n[Symbol.asyncIterator], e;
|
|
183
|
+
return t ? t.call(n) : (n = typeof M == "function" ? M(n) : n[Symbol.iterator](), e = {}, r("next"), r("throw"), r("return"), e[Symbol.asyncIterator] = function() {
|
|
184
184
|
return this;
|
|
185
185
|
}, e);
|
|
186
|
-
function
|
|
187
|
-
e[o] =
|
|
188
|
-
return new Promise(function(c,
|
|
189
|
-
s =
|
|
186
|
+
function r(o) {
|
|
187
|
+
e[o] = n[o] && function(s) {
|
|
188
|
+
return new Promise(function(c, a) {
|
|
189
|
+
s = n[o](s), i(c, a, s.done, s.value);
|
|
190
190
|
});
|
|
191
191
|
};
|
|
192
192
|
}
|
|
193
|
-
function i(o, s, c,
|
|
194
|
-
Promise.resolve(
|
|
195
|
-
o({ value:
|
|
193
|
+
function i(o, s, c, a) {
|
|
194
|
+
Promise.resolve(a).then(function(u) {
|
|
195
|
+
o({ value: u, done: c });
|
|
196
196
|
}, s);
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
|
-
function p(
|
|
200
|
-
return typeof
|
|
199
|
+
function p(n) {
|
|
200
|
+
return typeof n == "function";
|
|
201
201
|
}
|
|
202
|
-
function
|
|
203
|
-
var t = function(
|
|
204
|
-
Error.call(
|
|
205
|
-
}, e =
|
|
202
|
+
function fe(n) {
|
|
203
|
+
var t = function(r) {
|
|
204
|
+
Error.call(r), r.stack = new Error().stack;
|
|
205
|
+
}, e = n(t);
|
|
206
206
|
return e.prototype = Object.create(Error.prototype), e.prototype.constructor = e, e;
|
|
207
207
|
}
|
|
208
|
-
var B =
|
|
208
|
+
var B = fe(function(n) {
|
|
209
209
|
return function(e) {
|
|
210
|
-
|
|
211
|
-
` + e.map(function(
|
|
212
|
-
return i + 1 + ") " +
|
|
210
|
+
n(this), this.message = e ? e.length + ` errors occurred during unsubscription:
|
|
211
|
+
` + e.map(function(r, i) {
|
|
212
|
+
return i + 1 + ") " + r.toString();
|
|
213
213
|
}).join(`
|
|
214
214
|
`) : "", this.name = "UnsubscriptionError", this.errors = e;
|
|
215
215
|
};
|
|
216
216
|
});
|
|
217
|
-
function N(
|
|
218
|
-
if (
|
|
219
|
-
var e =
|
|
220
|
-
0 <= e &&
|
|
217
|
+
function N(n, t) {
|
|
218
|
+
if (n) {
|
|
219
|
+
var e = n.indexOf(t);
|
|
220
|
+
0 <= e && n.splice(e, 1);
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
var j = function() {
|
|
224
|
-
function
|
|
224
|
+
function n(t) {
|
|
225
225
|
this.initialTeardown = t, this.closed = !1, this._parentage = null, this._finalizers = null;
|
|
226
226
|
}
|
|
227
|
-
return
|
|
228
|
-
var t, e,
|
|
227
|
+
return n.prototype.unsubscribe = function() {
|
|
228
|
+
var t, e, r, i, o;
|
|
229
229
|
if (!this.closed) {
|
|
230
230
|
this.closed = !0;
|
|
231
231
|
var s = this._parentage;
|
|
232
232
|
if (s)
|
|
233
233
|
if (this._parentage = null, Array.isArray(s))
|
|
234
234
|
try {
|
|
235
|
-
for (var c = M(s),
|
|
236
|
-
var
|
|
237
|
-
|
|
235
|
+
for (var c = M(s), a = c.next(); !a.done; a = c.next()) {
|
|
236
|
+
var u = a.value;
|
|
237
|
+
u.remove(this);
|
|
238
238
|
}
|
|
239
|
-
} catch (
|
|
240
|
-
t = { error:
|
|
239
|
+
} catch (d) {
|
|
240
|
+
t = { error: d };
|
|
241
241
|
} finally {
|
|
242
242
|
try {
|
|
243
|
-
|
|
243
|
+
a && !a.done && (e = c.return) && e.call(c);
|
|
244
244
|
} finally {
|
|
245
245
|
if (t) throw t.error;
|
|
246
246
|
}
|
|
247
247
|
}
|
|
248
248
|
else
|
|
249
249
|
s.remove(this);
|
|
250
|
-
var
|
|
251
|
-
if (p(
|
|
250
|
+
var f = this.initialTeardown;
|
|
251
|
+
if (p(f))
|
|
252
252
|
try {
|
|
253
|
-
|
|
254
|
-
} catch (
|
|
255
|
-
o =
|
|
253
|
+
f();
|
|
254
|
+
} catch (d) {
|
|
255
|
+
o = d instanceof B ? d.errors : [d];
|
|
256
256
|
}
|
|
257
|
-
var
|
|
258
|
-
if (
|
|
257
|
+
var h = this._finalizers;
|
|
258
|
+
if (h) {
|
|
259
259
|
this._finalizers = null;
|
|
260
260
|
try {
|
|
261
|
-
for (var b = M(
|
|
262
|
-
var
|
|
261
|
+
for (var b = M(h), l = b.next(); !l.done; l = b.next()) {
|
|
262
|
+
var y = l.value;
|
|
263
263
|
try {
|
|
264
|
-
ee(
|
|
265
|
-
} catch (
|
|
266
|
-
o = o ?? [],
|
|
264
|
+
ee(y);
|
|
265
|
+
} catch (d) {
|
|
266
|
+
o = o ?? [], d instanceof B ? o = k(k([], R(o)), R(d.errors)) : o.push(d);
|
|
267
267
|
}
|
|
268
268
|
}
|
|
269
|
-
} catch (
|
|
270
|
-
|
|
269
|
+
} catch (d) {
|
|
270
|
+
r = { error: d };
|
|
271
271
|
} finally {
|
|
272
272
|
try {
|
|
273
|
-
|
|
273
|
+
l && !l.done && (i = b.return) && i.call(b);
|
|
274
274
|
} finally {
|
|
275
|
-
if (
|
|
275
|
+
if (r) throw r.error;
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
}
|
|
279
279
|
if (o)
|
|
280
280
|
throw new B(o);
|
|
281
281
|
}
|
|
282
|
-
},
|
|
282
|
+
}, n.prototype.add = function(t) {
|
|
283
283
|
var e;
|
|
284
284
|
if (t && t !== this)
|
|
285
285
|
if (this.closed)
|
|
286
286
|
ee(t);
|
|
287
287
|
else {
|
|
288
|
-
if (t instanceof
|
|
288
|
+
if (t instanceof n) {
|
|
289
289
|
if (t.closed || t._hasParent(this))
|
|
290
290
|
return;
|
|
291
291
|
t._addParent(this);
|
|
292
292
|
}
|
|
293
293
|
(this._finalizers = (e = this._finalizers) !== null && e !== void 0 ? e : []).push(t);
|
|
294
294
|
}
|
|
295
|
-
},
|
|
295
|
+
}, n.prototype._hasParent = function(t) {
|
|
296
296
|
var e = this._parentage;
|
|
297
297
|
return e === t || Array.isArray(e) && e.includes(t);
|
|
298
|
-
},
|
|
298
|
+
}, n.prototype._addParent = function(t) {
|
|
299
299
|
var e = this._parentage;
|
|
300
300
|
this._parentage = Array.isArray(e) ? (e.push(t), e) : e ? [e, t] : t;
|
|
301
|
-
},
|
|
301
|
+
}, n.prototype._removeParent = function(t) {
|
|
302
302
|
var e = this._parentage;
|
|
303
303
|
e === t ? this._parentage = null : Array.isArray(e) && N(e, t);
|
|
304
|
-
},
|
|
304
|
+
}, n.prototype.remove = function(t) {
|
|
305
305
|
var e = this._finalizers;
|
|
306
|
-
e && N(e, t), t instanceof
|
|
307
|
-
},
|
|
308
|
-
var t = new
|
|
306
|
+
e && N(e, t), t instanceof n && t._removeParent(this);
|
|
307
|
+
}, n.EMPTY = function() {
|
|
308
|
+
var t = new n();
|
|
309
309
|
return t.closed = !0, t;
|
|
310
|
-
}(),
|
|
311
|
-
}(),
|
|
312
|
-
function
|
|
313
|
-
return
|
|
314
|
-
}
|
|
315
|
-
function ee(
|
|
316
|
-
p(
|
|
317
|
-
}
|
|
318
|
-
var
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
310
|
+
}(), n;
|
|
311
|
+
}(), le = j.EMPTY;
|
|
312
|
+
function de(n) {
|
|
313
|
+
return n instanceof j || n && "closed" in n && p(n.remove) && p(n.add) && p(n.unsubscribe);
|
|
314
|
+
}
|
|
315
|
+
function ee(n) {
|
|
316
|
+
p(n) ? n() : n.unsubscribe();
|
|
317
|
+
}
|
|
318
|
+
var He = {
|
|
319
|
+
onUnhandledError: null,
|
|
320
|
+
onStoppedNotification: null,
|
|
321
|
+
Promise: void 0,
|
|
322
|
+
useDeprecatedSynchronousErrorHandling: !1,
|
|
323
|
+
useDeprecatedNextContext: !1
|
|
324
|
+
}, he = {
|
|
325
|
+
setTimeout: function(n, t) {
|
|
326
|
+
for (var e = [], r = 2; r < arguments.length; r++)
|
|
327
|
+
e[r - 2] = arguments[r];
|
|
328
|
+
return setTimeout.apply(void 0, k([n, t], R(e)));
|
|
325
329
|
},
|
|
326
|
-
clearTimeout: function(
|
|
327
|
-
|
|
330
|
+
clearTimeout: function(n) {
|
|
331
|
+
var t = he.delegate;
|
|
332
|
+
return ((t == null ? void 0 : t.clearTimeout) || clearTimeout)(n);
|
|
328
333
|
},
|
|
329
334
|
delegate: void 0
|
|
330
335
|
};
|
|
331
|
-
function
|
|
332
|
-
|
|
333
|
-
throw
|
|
336
|
+
function ye(n) {
|
|
337
|
+
he.setTimeout(function() {
|
|
338
|
+
throw n;
|
|
334
339
|
});
|
|
335
340
|
}
|
|
336
341
|
function q() {
|
|
337
342
|
}
|
|
338
|
-
function U(
|
|
339
|
-
|
|
343
|
+
function U(n) {
|
|
344
|
+
n();
|
|
340
345
|
}
|
|
341
|
-
var X = function(
|
|
342
|
-
O(t,
|
|
346
|
+
var X = function(n) {
|
|
347
|
+
O(t, n);
|
|
343
348
|
function t(e) {
|
|
344
|
-
var
|
|
345
|
-
return
|
|
349
|
+
var r = n.call(this) || this;
|
|
350
|
+
return r.isStopped = !1, e ? (r.destination = e, de(e) && e.add(r)) : r.destination = Ke, r;
|
|
346
351
|
}
|
|
347
|
-
return t.create = function(e,
|
|
348
|
-
return new W(e,
|
|
352
|
+
return t.create = function(e, r, i) {
|
|
353
|
+
return new W(e, r, i);
|
|
349
354
|
}, t.prototype.next = function(e) {
|
|
350
355
|
this.isStopped || this._next(e);
|
|
351
356
|
}, t.prototype.error = function(e) {
|
|
@@ -353,7 +358,7 @@ var X = function(r) {
|
|
|
353
358
|
}, t.prototype.complete = function() {
|
|
354
359
|
this.isStopped || (this.isStopped = !0, this._complete());
|
|
355
360
|
}, t.prototype.unsubscribe = function() {
|
|
356
|
-
this.closed || (this.isStopped = !0,
|
|
361
|
+
this.closed || (this.isStopped = !0, n.prototype.unsubscribe.call(this), this.destination = null);
|
|
357
362
|
}, t.prototype._next = function(e) {
|
|
358
363
|
this.destination.next(e);
|
|
359
364
|
}, t.prototype._error = function(e) {
|
|
@@ -369,29 +374,29 @@ var X = function(r) {
|
|
|
369
374
|
this.unsubscribe();
|
|
370
375
|
}
|
|
371
376
|
}, t;
|
|
372
|
-
}(j),
|
|
373
|
-
function
|
|
377
|
+
}(j), Ve = function() {
|
|
378
|
+
function n(t) {
|
|
374
379
|
this.partialObserver = t;
|
|
375
380
|
}
|
|
376
|
-
return
|
|
381
|
+
return n.prototype.next = function(t) {
|
|
377
382
|
var e = this.partialObserver;
|
|
378
383
|
if (e.next)
|
|
379
384
|
try {
|
|
380
385
|
e.next(t);
|
|
381
|
-
} catch (
|
|
382
|
-
D(
|
|
386
|
+
} catch (r) {
|
|
387
|
+
D(r);
|
|
383
388
|
}
|
|
384
|
-
},
|
|
389
|
+
}, n.prototype.error = function(t) {
|
|
385
390
|
var e = this.partialObserver;
|
|
386
391
|
if (e.error)
|
|
387
392
|
try {
|
|
388
393
|
e.error(t);
|
|
389
|
-
} catch (
|
|
390
|
-
D(
|
|
394
|
+
} catch (r) {
|
|
395
|
+
D(r);
|
|
391
396
|
}
|
|
392
397
|
else
|
|
393
398
|
D(t);
|
|
394
|
-
},
|
|
399
|
+
}, n.prototype.complete = function() {
|
|
395
400
|
var t = this.partialObserver;
|
|
396
401
|
if (t.complete)
|
|
397
402
|
try {
|
|
@@ -399,24 +404,24 @@ var X = function(r) {
|
|
|
399
404
|
} catch (e) {
|
|
400
405
|
D(e);
|
|
401
406
|
}
|
|
402
|
-
},
|
|
403
|
-
}(), W = function(
|
|
404
|
-
O(t,
|
|
405
|
-
function t(e,
|
|
406
|
-
var o =
|
|
407
|
+
}, n;
|
|
408
|
+
}(), W = function(n) {
|
|
409
|
+
O(t, n);
|
|
410
|
+
function t(e, r, i) {
|
|
411
|
+
var o = n.call(this) || this, s;
|
|
407
412
|
return p(e) || !e ? s = {
|
|
408
413
|
next: e ?? void 0,
|
|
409
|
-
error:
|
|
414
|
+
error: r ?? void 0,
|
|
410
415
|
complete: i ?? void 0
|
|
411
|
-
} : s = e, o.destination = new
|
|
416
|
+
} : s = e, o.destination = new Ve(s), o;
|
|
412
417
|
}
|
|
413
418
|
return t;
|
|
414
419
|
}(X);
|
|
415
|
-
function D(
|
|
416
|
-
|
|
420
|
+
function D(n) {
|
|
421
|
+
ye(n);
|
|
417
422
|
}
|
|
418
|
-
function Be(
|
|
419
|
-
throw
|
|
423
|
+
function Be(n) {
|
|
424
|
+
throw n;
|
|
420
425
|
}
|
|
421
426
|
var Ke = {
|
|
422
427
|
closed: !0,
|
|
@@ -426,169 +431,169 @@ var Ke = {
|
|
|
426
431
|
}, z = function() {
|
|
427
432
|
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
|
428
433
|
}();
|
|
429
|
-
function G(
|
|
430
|
-
return
|
|
434
|
+
function G(n) {
|
|
435
|
+
return n;
|
|
431
436
|
}
|
|
432
|
-
function Ye(
|
|
433
|
-
return
|
|
434
|
-
return
|
|
435
|
-
return i(
|
|
437
|
+
function Ye(n) {
|
|
438
|
+
return n.length === 0 ? G : n.length === 1 ? n[0] : function(e) {
|
|
439
|
+
return n.reduce(function(r, i) {
|
|
440
|
+
return i(r);
|
|
436
441
|
}, e);
|
|
437
442
|
};
|
|
438
443
|
}
|
|
439
444
|
var g = function() {
|
|
440
|
-
function
|
|
445
|
+
function n(t) {
|
|
441
446
|
t && (this._subscribe = t);
|
|
442
447
|
}
|
|
443
|
-
return
|
|
444
|
-
var e = new
|
|
448
|
+
return n.prototype.lift = function(t) {
|
|
449
|
+
var e = new n();
|
|
445
450
|
return e.source = this, e.operator = t, e;
|
|
446
|
-
},
|
|
447
|
-
var i = this, o = We(t) ? t : new W(t, e,
|
|
451
|
+
}, n.prototype.subscribe = function(t, e, r) {
|
|
452
|
+
var i = this, o = We(t) ? t : new W(t, e, r);
|
|
448
453
|
return U(function() {
|
|
449
|
-
var s = i, c = s.operator,
|
|
450
|
-
o.add(c ? c.call(o,
|
|
454
|
+
var s = i, c = s.operator, a = s.source;
|
|
455
|
+
o.add(c ? c.call(o, a) : a ? i._subscribe(o) : i._trySubscribe(o));
|
|
451
456
|
}), o;
|
|
452
|
-
},
|
|
457
|
+
}, n.prototype._trySubscribe = function(t) {
|
|
453
458
|
try {
|
|
454
459
|
return this._subscribe(t);
|
|
455
460
|
} catch (e) {
|
|
456
461
|
t.error(e);
|
|
457
462
|
}
|
|
458
|
-
},
|
|
459
|
-
var
|
|
463
|
+
}, n.prototype.forEach = function(t, e) {
|
|
464
|
+
var r = this;
|
|
460
465
|
return e = te(e), new e(function(i, o) {
|
|
461
466
|
var s = new W({
|
|
462
467
|
next: function(c) {
|
|
463
468
|
try {
|
|
464
469
|
t(c);
|
|
465
|
-
} catch (
|
|
466
|
-
o(
|
|
470
|
+
} catch (a) {
|
|
471
|
+
o(a), s.unsubscribe();
|
|
467
472
|
}
|
|
468
473
|
},
|
|
469
474
|
error: o,
|
|
470
475
|
complete: i
|
|
471
476
|
});
|
|
472
|
-
|
|
477
|
+
r.subscribe(s);
|
|
473
478
|
});
|
|
474
|
-
},
|
|
479
|
+
}, n.prototype._subscribe = function(t) {
|
|
475
480
|
var e;
|
|
476
481
|
return (e = this.source) === null || e === void 0 ? void 0 : e.subscribe(t);
|
|
477
|
-
},
|
|
482
|
+
}, n.prototype[z] = function() {
|
|
478
483
|
return this;
|
|
479
|
-
},
|
|
484
|
+
}, n.prototype.pipe = function() {
|
|
480
485
|
for (var t = [], e = 0; e < arguments.length; e++)
|
|
481
486
|
t[e] = arguments[e];
|
|
482
487
|
return Ye(t)(this);
|
|
483
|
-
},
|
|
488
|
+
}, n.prototype.toPromise = function(t) {
|
|
484
489
|
var e = this;
|
|
485
|
-
return t = te(t), new t(function(
|
|
490
|
+
return t = te(t), new t(function(r, i) {
|
|
486
491
|
var o;
|
|
487
492
|
e.subscribe(function(s) {
|
|
488
493
|
return o = s;
|
|
489
494
|
}, function(s) {
|
|
490
495
|
return i(s);
|
|
491
496
|
}, function() {
|
|
492
|
-
return
|
|
497
|
+
return r(o);
|
|
493
498
|
});
|
|
494
499
|
});
|
|
495
|
-
},
|
|
496
|
-
return new
|
|
497
|
-
},
|
|
500
|
+
}, n.create = function(t) {
|
|
501
|
+
return new n(t);
|
|
502
|
+
}, n;
|
|
498
503
|
}();
|
|
499
|
-
function te(
|
|
504
|
+
function te(n) {
|
|
500
505
|
var t;
|
|
501
|
-
return (t =
|
|
506
|
+
return (t = n ?? He.Promise) !== null && t !== void 0 ? t : Promise;
|
|
502
507
|
}
|
|
503
|
-
function qe(
|
|
504
|
-
return
|
|
508
|
+
function qe(n) {
|
|
509
|
+
return n && p(n.next) && p(n.error) && p(n.complete);
|
|
505
510
|
}
|
|
506
|
-
function We(
|
|
507
|
-
return
|
|
511
|
+
function We(n) {
|
|
512
|
+
return n && n instanceof X || qe(n) && de(n);
|
|
508
513
|
}
|
|
509
|
-
function Je(
|
|
510
|
-
return p(
|
|
514
|
+
function Je(n) {
|
|
515
|
+
return p(n == null ? void 0 : n.lift);
|
|
511
516
|
}
|
|
512
|
-
function
|
|
517
|
+
function C(n) {
|
|
513
518
|
return function(t) {
|
|
514
519
|
if (Je(t))
|
|
515
520
|
return t.lift(function(e) {
|
|
516
521
|
try {
|
|
517
|
-
return
|
|
518
|
-
} catch (
|
|
519
|
-
this.error(
|
|
522
|
+
return n(e, this);
|
|
523
|
+
} catch (r) {
|
|
524
|
+
this.error(r);
|
|
520
525
|
}
|
|
521
526
|
});
|
|
522
527
|
throw new TypeError("Unable to lift unknown Observable type");
|
|
523
528
|
};
|
|
524
529
|
}
|
|
525
|
-
function E(
|
|
526
|
-
return new Xe(
|
|
530
|
+
function E(n, t, e, r, i) {
|
|
531
|
+
return new Xe(n, t, e, r, i);
|
|
527
532
|
}
|
|
528
|
-
var Xe = function(
|
|
529
|
-
O(t,
|
|
530
|
-
function t(e,
|
|
531
|
-
var
|
|
532
|
-
return
|
|
533
|
+
var Xe = function(n) {
|
|
534
|
+
O(t, n);
|
|
535
|
+
function t(e, r, i, o, s, c) {
|
|
536
|
+
var a = n.call(this, e) || this;
|
|
537
|
+
return a.onFinalize = s, a.shouldUnsubscribe = c, a._next = r ? function(u) {
|
|
533
538
|
try {
|
|
534
|
-
|
|
535
|
-
} catch (
|
|
536
|
-
e.error(
|
|
539
|
+
r(u);
|
|
540
|
+
} catch (f) {
|
|
541
|
+
e.error(f);
|
|
537
542
|
}
|
|
538
|
-
} :
|
|
543
|
+
} : n.prototype._next, a._error = o ? function(u) {
|
|
539
544
|
try {
|
|
540
|
-
o(
|
|
541
|
-
} catch (
|
|
542
|
-
e.error(
|
|
545
|
+
o(u);
|
|
546
|
+
} catch (f) {
|
|
547
|
+
e.error(f);
|
|
543
548
|
} finally {
|
|
544
549
|
this.unsubscribe();
|
|
545
550
|
}
|
|
546
|
-
} :
|
|
551
|
+
} : n.prototype._error, a._complete = i ? function() {
|
|
547
552
|
try {
|
|
548
553
|
i();
|
|
549
|
-
} catch (
|
|
550
|
-
e.error(
|
|
554
|
+
} catch (u) {
|
|
555
|
+
e.error(u);
|
|
551
556
|
} finally {
|
|
552
557
|
this.unsubscribe();
|
|
553
558
|
}
|
|
554
|
-
} :
|
|
559
|
+
} : n.prototype._complete, a;
|
|
555
560
|
}
|
|
556
561
|
return t.prototype.unsubscribe = function() {
|
|
557
562
|
var e;
|
|
558
563
|
if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {
|
|
559
|
-
var
|
|
560
|
-
|
|
564
|
+
var r = this.closed;
|
|
565
|
+
n.prototype.unsubscribe.call(this), !r && ((e = this.onFinalize) === null || e === void 0 || e.call(this));
|
|
561
566
|
}
|
|
562
567
|
}, t;
|
|
563
|
-
}(X), ze =
|
|
568
|
+
}(X), ze = fe(function(n) {
|
|
564
569
|
return function() {
|
|
565
|
-
|
|
570
|
+
n(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
|
|
566
571
|
};
|
|
567
|
-
}), Q = function(
|
|
568
|
-
O(t,
|
|
572
|
+
}), Q = function(n) {
|
|
573
|
+
O(t, n);
|
|
569
574
|
function t() {
|
|
570
|
-
var e =
|
|
575
|
+
var e = n.call(this) || this;
|
|
571
576
|
return e.closed = !1, e.currentObservers = null, e.observers = [], e.isStopped = !1, e.hasError = !1, e.thrownError = null, e;
|
|
572
577
|
}
|
|
573
578
|
return t.prototype.lift = function(e) {
|
|
574
|
-
var
|
|
575
|
-
return
|
|
579
|
+
var r = new ne(this, this);
|
|
580
|
+
return r.operator = e, r;
|
|
576
581
|
}, t.prototype._throwIfClosed = function() {
|
|
577
582
|
if (this.closed)
|
|
578
583
|
throw new ze();
|
|
579
584
|
}, t.prototype.next = function(e) {
|
|
580
|
-
var
|
|
585
|
+
var r = this;
|
|
581
586
|
U(function() {
|
|
582
587
|
var i, o;
|
|
583
|
-
if (
|
|
584
|
-
|
|
588
|
+
if (r._throwIfClosed(), !r.isStopped) {
|
|
589
|
+
r.currentObservers || (r.currentObservers = Array.from(r.observers));
|
|
585
590
|
try {
|
|
586
|
-
for (var s = M(
|
|
587
|
-
var
|
|
588
|
-
|
|
591
|
+
for (var s = M(r.currentObservers), c = s.next(); !c.done; c = s.next()) {
|
|
592
|
+
var a = c.value;
|
|
593
|
+
a.next(e);
|
|
589
594
|
}
|
|
590
|
-
} catch (
|
|
591
|
-
i = { error:
|
|
595
|
+
} catch (u) {
|
|
596
|
+
i = { error: u };
|
|
592
597
|
} finally {
|
|
593
598
|
try {
|
|
594
599
|
c && !c.done && (o = s.return) && o.call(s);
|
|
@@ -599,11 +604,11 @@ var Xe = function(r) {
|
|
|
599
604
|
}
|
|
600
605
|
});
|
|
601
606
|
}, t.prototype.error = function(e) {
|
|
602
|
-
var
|
|
607
|
+
var r = this;
|
|
603
608
|
U(function() {
|
|
604
|
-
if (
|
|
605
|
-
|
|
606
|
-
for (var i =
|
|
609
|
+
if (r._throwIfClosed(), !r.isStopped) {
|
|
610
|
+
r.hasError = r.isStopped = !0, r.thrownError = e;
|
|
611
|
+
for (var i = r.observers; i.length; )
|
|
607
612
|
i.shift().error(e);
|
|
608
613
|
}
|
|
609
614
|
});
|
|
@@ -612,8 +617,8 @@ var Xe = function(r) {
|
|
|
612
617
|
U(function() {
|
|
613
618
|
if (e._throwIfClosed(), !e.isStopped) {
|
|
614
619
|
e.isStopped = !0;
|
|
615
|
-
for (var
|
|
616
|
-
|
|
620
|
+
for (var r = e.observers; r.length; )
|
|
621
|
+
r.shift().complete();
|
|
617
622
|
}
|
|
618
623
|
});
|
|
619
624
|
}, t.prototype.unsubscribe = function() {
|
|
@@ -626,47 +631,47 @@ var Xe = function(r) {
|
|
|
626
631
|
enumerable: !1,
|
|
627
632
|
configurable: !0
|
|
628
633
|
}), t.prototype._trySubscribe = function(e) {
|
|
629
|
-
return this._throwIfClosed(),
|
|
634
|
+
return this._throwIfClosed(), n.prototype._trySubscribe.call(this, e);
|
|
630
635
|
}, t.prototype._subscribe = function(e) {
|
|
631
636
|
return this._throwIfClosed(), this._checkFinalizedStatuses(e), this._innerSubscribe(e);
|
|
632
637
|
}, t.prototype._innerSubscribe = function(e) {
|
|
633
|
-
var
|
|
634
|
-
return o || s ?
|
|
635
|
-
|
|
638
|
+
var r = this, i = this, o = i.hasError, s = i.isStopped, c = i.observers;
|
|
639
|
+
return o || s ? le : (this.currentObservers = null, c.push(e), new j(function() {
|
|
640
|
+
r.currentObservers = null, N(c, e);
|
|
636
641
|
}));
|
|
637
642
|
}, t.prototype._checkFinalizedStatuses = function(e) {
|
|
638
|
-
var
|
|
643
|
+
var r = this, i = r.hasError, o = r.thrownError, s = r.isStopped;
|
|
639
644
|
i ? e.error(o) : s && e.complete();
|
|
640
645
|
}, t.prototype.asObservable = function() {
|
|
641
646
|
var e = new g();
|
|
642
647
|
return e.source = this, e;
|
|
643
|
-
}, t.create = function(e,
|
|
644
|
-
return new
|
|
648
|
+
}, t.create = function(e, r) {
|
|
649
|
+
return new ne(e, r);
|
|
645
650
|
}, t;
|
|
646
|
-
}(g),
|
|
647
|
-
O(t,
|
|
648
|
-
function t(e,
|
|
649
|
-
var i =
|
|
650
|
-
return i.destination = e, i.source =
|
|
651
|
+
}(g), ne = function(n) {
|
|
652
|
+
O(t, n);
|
|
653
|
+
function t(e, r) {
|
|
654
|
+
var i = n.call(this) || this;
|
|
655
|
+
return i.destination = e, i.source = r, i;
|
|
651
656
|
}
|
|
652
657
|
return t.prototype.next = function(e) {
|
|
653
|
-
var
|
|
654
|
-
(i = (
|
|
658
|
+
var r, i;
|
|
659
|
+
(i = (r = this.destination) === null || r === void 0 ? void 0 : r.next) === null || i === void 0 || i.call(r, e);
|
|
655
660
|
}, t.prototype.error = function(e) {
|
|
656
|
-
var
|
|
657
|
-
(i = (
|
|
661
|
+
var r, i;
|
|
662
|
+
(i = (r = this.destination) === null || r === void 0 ? void 0 : r.error) === null || i === void 0 || i.call(r, e);
|
|
658
663
|
}, t.prototype.complete = function() {
|
|
659
|
-
var e,
|
|
660
|
-
(
|
|
664
|
+
var e, r;
|
|
665
|
+
(r = (e = this.destination) === null || e === void 0 ? void 0 : e.complete) === null || r === void 0 || r.call(e);
|
|
661
666
|
}, t.prototype._subscribe = function(e) {
|
|
662
|
-
var
|
|
663
|
-
return (i = (
|
|
667
|
+
var r, i;
|
|
668
|
+
return (i = (r = this.source) === null || r === void 0 ? void 0 : r.subscribe(e)) !== null && i !== void 0 ? i : le;
|
|
664
669
|
}, t;
|
|
665
|
-
}(Q),
|
|
666
|
-
O(t,
|
|
670
|
+
}(Q), re = function(n) {
|
|
671
|
+
O(t, n);
|
|
667
672
|
function t(e) {
|
|
668
|
-
var
|
|
669
|
-
return
|
|
673
|
+
var r = n.call(this) || this;
|
|
674
|
+
return r._value = e, r;
|
|
670
675
|
}
|
|
671
676
|
return Object.defineProperty(t.prototype, "value", {
|
|
672
677
|
get: function() {
|
|
@@ -675,66 +680,67 @@ var Xe = function(r) {
|
|
|
675
680
|
enumerable: !1,
|
|
676
681
|
configurable: !0
|
|
677
682
|
}), t.prototype._subscribe = function(e) {
|
|
678
|
-
var
|
|
679
|
-
return !
|
|
683
|
+
var r = n.prototype._subscribe.call(this, e);
|
|
684
|
+
return !r.closed && e.next(this._value), r;
|
|
680
685
|
}, t.prototype.getValue = function() {
|
|
681
|
-
var e = this,
|
|
682
|
-
if (
|
|
686
|
+
var e = this, r = e.hasError, i = e.thrownError, o = e._value;
|
|
687
|
+
if (r)
|
|
683
688
|
throw i;
|
|
684
689
|
return this._throwIfClosed(), o;
|
|
685
690
|
}, t.prototype.next = function(e) {
|
|
686
|
-
|
|
691
|
+
n.prototype.next.call(this, this._value = e);
|
|
687
692
|
}, t;
|
|
688
693
|
}(Q), Qe = {
|
|
689
694
|
now: function() {
|
|
690
695
|
return Date.now();
|
|
696
|
+
},
|
|
697
|
+
delegate: void 0
|
|
698
|
+
}, Ze = function(n) {
|
|
699
|
+
O(t, n);
|
|
700
|
+
function t(e, r) {
|
|
701
|
+
return n.call(this) || this;
|
|
691
702
|
}
|
|
692
|
-
|
|
693
|
-
O(t, r);
|
|
694
|
-
function t(e, n) {
|
|
695
|
-
return r.call(this) || this;
|
|
696
|
-
}
|
|
697
|
-
return t.prototype.schedule = function(e, n) {
|
|
703
|
+
return t.prototype.schedule = function(e, r) {
|
|
698
704
|
return this;
|
|
699
705
|
}, t;
|
|
700
706
|
}(j), ie = {
|
|
701
|
-
setInterval: function(
|
|
702
|
-
for (var e = [],
|
|
703
|
-
e[
|
|
704
|
-
return setInterval.apply(void 0, k([
|
|
707
|
+
setInterval: function(n, t) {
|
|
708
|
+
for (var e = [], r = 2; r < arguments.length; r++)
|
|
709
|
+
e[r - 2] = arguments[r];
|
|
710
|
+
return setInterval.apply(void 0, k([n, t], R(e)));
|
|
705
711
|
},
|
|
706
|
-
clearInterval: function(
|
|
707
|
-
return clearInterval(
|
|
712
|
+
clearInterval: function(n) {
|
|
713
|
+
return clearInterval(n);
|
|
708
714
|
},
|
|
709
715
|
delegate: void 0
|
|
710
|
-
}, et = function(
|
|
711
|
-
O(t,
|
|
712
|
-
function t(e,
|
|
713
|
-
var i =
|
|
714
|
-
return i.scheduler = e, i.work =
|
|
716
|
+
}, et = function(n) {
|
|
717
|
+
O(t, n);
|
|
718
|
+
function t(e, r) {
|
|
719
|
+
var i = n.call(this, e, r) || this;
|
|
720
|
+
return i.scheduler = e, i.work = r, i.pending = !1, i;
|
|
715
721
|
}
|
|
716
|
-
return t.prototype.schedule = function(e,
|
|
722
|
+
return t.prototype.schedule = function(e, r) {
|
|
717
723
|
var i;
|
|
718
|
-
if (
|
|
724
|
+
if (r === void 0 && (r = 0), this.closed)
|
|
719
725
|
return this;
|
|
720
726
|
this.state = e;
|
|
721
727
|
var o = this.id, s = this.scheduler;
|
|
722
|
-
return o != null && (this.id = this.recycleAsyncId(s, o,
|
|
723
|
-
}, t.prototype.requestAsyncId = function(e,
|
|
728
|
+
return o != null && (this.id = this.recycleAsyncId(s, o, r)), this.pending = !0, this.delay = r, this.id = (i = this.id) !== null && i !== void 0 ? i : this.requestAsyncId(s, this.id, r), this;
|
|
729
|
+
}, t.prototype.requestAsyncId = function(e, r, i) {
|
|
724
730
|
return i === void 0 && (i = 0), ie.setInterval(e.flush.bind(e, this), i);
|
|
725
|
-
}, t.prototype.recycleAsyncId = function(e,
|
|
731
|
+
}, t.prototype.recycleAsyncId = function(e, r, i) {
|
|
726
732
|
if (i === void 0 && (i = 0), i != null && this.delay === i && this.pending === !1)
|
|
727
|
-
return
|
|
728
|
-
|
|
729
|
-
}, t.prototype.execute = function(e,
|
|
733
|
+
return r;
|
|
734
|
+
r != null && ie.clearInterval(r);
|
|
735
|
+
}, t.prototype.execute = function(e, r) {
|
|
730
736
|
if (this.closed)
|
|
731
737
|
return new Error("executing a cancelled action");
|
|
732
738
|
this.pending = !1;
|
|
733
|
-
var i = this._execute(e,
|
|
739
|
+
var i = this._execute(e, r);
|
|
734
740
|
if (i)
|
|
735
741
|
return i;
|
|
736
742
|
this.pending === !1 && this.id != null && (this.id = this.recycleAsyncId(this.scheduler, this.id, null));
|
|
737
|
-
}, t.prototype._execute = function(e,
|
|
743
|
+
}, t.prototype._execute = function(e, r) {
|
|
738
744
|
var i = !1, o;
|
|
739
745
|
try {
|
|
740
746
|
this.work(e);
|
|
@@ -745,28 +751,28 @@ var Xe = function(r) {
|
|
|
745
751
|
return this.unsubscribe(), o;
|
|
746
752
|
}, t.prototype.unsubscribe = function() {
|
|
747
753
|
if (!this.closed) {
|
|
748
|
-
var e = this,
|
|
749
|
-
this.work = this.state = this.scheduler = null, this.pending = !1, N(o, this),
|
|
754
|
+
var e = this, r = e.id, i = e.scheduler, o = i.actions;
|
|
755
|
+
this.work = this.state = this.scheduler = null, this.pending = !1, N(o, this), r != null && (this.id = this.recycleAsyncId(i, r, null)), this.delay = null, n.prototype.unsubscribe.call(this);
|
|
750
756
|
}
|
|
751
757
|
}, t;
|
|
752
758
|
}(Ze), oe = function() {
|
|
753
|
-
function
|
|
754
|
-
e === void 0 && (e =
|
|
759
|
+
function n(t, e) {
|
|
760
|
+
e === void 0 && (e = n.now), this.schedulerActionCtor = t, this.now = e;
|
|
755
761
|
}
|
|
756
|
-
return
|
|
757
|
-
return e === void 0 && (e = 0), new this.schedulerActionCtor(this, t).schedule(
|
|
758
|
-
},
|
|
759
|
-
}(), tt = function(
|
|
760
|
-
O(t,
|
|
761
|
-
function t(e,
|
|
762
|
-
|
|
763
|
-
var i =
|
|
762
|
+
return n.prototype.schedule = function(t, e, r) {
|
|
763
|
+
return e === void 0 && (e = 0), new this.schedulerActionCtor(this, t).schedule(r, e);
|
|
764
|
+
}, n.now = Qe.now, n;
|
|
765
|
+
}(), tt = function(n) {
|
|
766
|
+
O(t, n);
|
|
767
|
+
function t(e, r) {
|
|
768
|
+
r === void 0 && (r = oe.now);
|
|
769
|
+
var i = n.call(this, e, r) || this;
|
|
764
770
|
return i.actions = [], i._active = !1, i;
|
|
765
771
|
}
|
|
766
772
|
return t.prototype.flush = function(e) {
|
|
767
|
-
var
|
|
773
|
+
var r = this.actions;
|
|
768
774
|
if (this._active) {
|
|
769
|
-
|
|
775
|
+
r.push(e);
|
|
770
776
|
return;
|
|
771
777
|
}
|
|
772
778
|
var i;
|
|
@@ -774,67 +780,67 @@ var Xe = function(r) {
|
|
|
774
780
|
do
|
|
775
781
|
if (i = e.execute(e.state, e.delay))
|
|
776
782
|
break;
|
|
777
|
-
while (e =
|
|
783
|
+
while (e = r.shift());
|
|
778
784
|
if (this._active = !1, i) {
|
|
779
|
-
for (; e =
|
|
785
|
+
for (; e = r.shift(); )
|
|
780
786
|
e.unsubscribe();
|
|
781
787
|
throw i;
|
|
782
788
|
}
|
|
783
789
|
}, t;
|
|
784
|
-
}(oe), ve = new tt(et),
|
|
785
|
-
return
|
|
790
|
+
}(oe), ve = new tt(et), nt = ve, rt = new g(function(n) {
|
|
791
|
+
return n.complete();
|
|
786
792
|
});
|
|
787
|
-
function
|
|
788
|
-
return
|
|
793
|
+
function pe(n) {
|
|
794
|
+
return n && p(n.schedule);
|
|
789
795
|
}
|
|
790
|
-
function
|
|
791
|
-
return
|
|
796
|
+
function be(n) {
|
|
797
|
+
return n[n.length - 1];
|
|
792
798
|
}
|
|
793
|
-
function it(
|
|
794
|
-
return p(
|
|
799
|
+
function it(n) {
|
|
800
|
+
return p(be(n)) ? n.pop() : void 0;
|
|
795
801
|
}
|
|
796
|
-
function
|
|
797
|
-
return
|
|
802
|
+
function me(n) {
|
|
803
|
+
return pe(be(n)) ? n.pop() : void 0;
|
|
798
804
|
}
|
|
799
|
-
var
|
|
800
|
-
return
|
|
805
|
+
var ge = function(n) {
|
|
806
|
+
return n && typeof n.length == "number" && typeof n != "function";
|
|
801
807
|
};
|
|
802
|
-
function
|
|
803
|
-
return p(
|
|
808
|
+
function Se(n) {
|
|
809
|
+
return p(n == null ? void 0 : n.then);
|
|
804
810
|
}
|
|
805
|
-
function
|
|
806
|
-
return p(
|
|
811
|
+
function we(n) {
|
|
812
|
+
return p(n[z]);
|
|
807
813
|
}
|
|
808
|
-
function
|
|
809
|
-
return Symbol.asyncIterator && p(
|
|
814
|
+
function Ee(n) {
|
|
815
|
+
return Symbol.asyncIterator && p(n == null ? void 0 : n[Symbol.asyncIterator]);
|
|
810
816
|
}
|
|
811
|
-
function
|
|
812
|
-
return new TypeError("You provided " + (
|
|
817
|
+
function Oe(n) {
|
|
818
|
+
return new TypeError("You provided " + (n !== null && typeof n == "object" ? "an invalid object" : "'" + n + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.");
|
|
813
819
|
}
|
|
814
820
|
function ot() {
|
|
815
821
|
return typeof Symbol != "function" || !Symbol.iterator ? "@@iterator" : Symbol.iterator;
|
|
816
822
|
}
|
|
817
|
-
var
|
|
818
|
-
function
|
|
819
|
-
return p(
|
|
823
|
+
var Ie = ot();
|
|
824
|
+
function Ae(n) {
|
|
825
|
+
return p(n == null ? void 0 : n[Ie]);
|
|
820
826
|
}
|
|
821
|
-
function
|
|
822
|
-
return
|
|
823
|
-
var e,
|
|
827
|
+
function xe(n) {
|
|
828
|
+
return Ge(this, arguments, function() {
|
|
829
|
+
var e, r, i, o;
|
|
824
830
|
return ce(this, function(s) {
|
|
825
831
|
switch (s.label) {
|
|
826
832
|
case 0:
|
|
827
|
-
e =
|
|
833
|
+
e = n.getReader(), s.label = 1;
|
|
828
834
|
case 1:
|
|
829
835
|
s.trys.push([1, , 9, 10]), s.label = 2;
|
|
830
836
|
case 2:
|
|
831
|
-
return [4,
|
|
837
|
+
return [4, P(e.read())];
|
|
832
838
|
case 3:
|
|
833
|
-
return
|
|
839
|
+
return r = s.sent(), i = r.value, o = r.done, o ? [4, P(void 0)] : [3, 5];
|
|
834
840
|
case 4:
|
|
835
841
|
return [2, s.sent()];
|
|
836
842
|
case 5:
|
|
837
|
-
return [4,
|
|
843
|
+
return [4, P(i)];
|
|
838
844
|
case 6:
|
|
839
845
|
return [4, s.sent()];
|
|
840
846
|
case 7:
|
|
@@ -849,57 +855,57 @@ function Ae(r) {
|
|
|
849
855
|
});
|
|
850
856
|
});
|
|
851
857
|
}
|
|
852
|
-
function
|
|
853
|
-
return p(
|
|
854
|
-
}
|
|
855
|
-
function x(
|
|
856
|
-
if (
|
|
857
|
-
return
|
|
858
|
-
if (
|
|
859
|
-
if (
|
|
860
|
-
return st(
|
|
861
|
-
if (
|
|
862
|
-
return
|
|
863
|
-
if (
|
|
864
|
-
return
|
|
865
|
-
if (
|
|
866
|
-
return
|
|
867
|
-
if (
|
|
868
|
-
return ct(
|
|
869
|
-
if (
|
|
870
|
-
return
|
|
858
|
+
function _e(n) {
|
|
859
|
+
return p(n == null ? void 0 : n.getReader);
|
|
860
|
+
}
|
|
861
|
+
function x(n) {
|
|
862
|
+
if (n instanceof g)
|
|
863
|
+
return n;
|
|
864
|
+
if (n != null) {
|
|
865
|
+
if (we(n))
|
|
866
|
+
return st(n);
|
|
867
|
+
if (ge(n))
|
|
868
|
+
return ut(n);
|
|
869
|
+
if (Se(n))
|
|
870
|
+
return at(n);
|
|
871
|
+
if (Ee(n))
|
|
872
|
+
return Ce(n);
|
|
873
|
+
if (Ae(n))
|
|
874
|
+
return ct(n);
|
|
875
|
+
if (_e(n))
|
|
876
|
+
return ft(n);
|
|
871
877
|
}
|
|
872
|
-
throw
|
|
878
|
+
throw Oe(n);
|
|
873
879
|
}
|
|
874
|
-
function st(
|
|
880
|
+
function st(n) {
|
|
875
881
|
return new g(function(t) {
|
|
876
|
-
var e =
|
|
882
|
+
var e = n[z]();
|
|
877
883
|
if (p(e.subscribe))
|
|
878
884
|
return e.subscribe(t);
|
|
879
885
|
throw new TypeError("Provided object does not correctly implement Symbol.observable");
|
|
880
886
|
});
|
|
881
887
|
}
|
|
882
|
-
function
|
|
888
|
+
function ut(n) {
|
|
883
889
|
return new g(function(t) {
|
|
884
|
-
for (var e = 0; e <
|
|
885
|
-
t.next(
|
|
890
|
+
for (var e = 0; e < n.length && !t.closed; e++)
|
|
891
|
+
t.next(n[e]);
|
|
886
892
|
t.complete();
|
|
887
893
|
});
|
|
888
894
|
}
|
|
889
|
-
function
|
|
895
|
+
function at(n) {
|
|
890
896
|
return new g(function(t) {
|
|
891
|
-
|
|
897
|
+
n.then(function(e) {
|
|
892
898
|
t.closed || (t.next(e), t.complete());
|
|
893
899
|
}, function(e) {
|
|
894
900
|
return t.error(e);
|
|
895
|
-
}).then(null,
|
|
901
|
+
}).then(null, ye);
|
|
896
902
|
});
|
|
897
903
|
}
|
|
898
|
-
function ct(
|
|
904
|
+
function ct(n) {
|
|
899
905
|
return new g(function(t) {
|
|
900
|
-
var e,
|
|
906
|
+
var e, r;
|
|
901
907
|
try {
|
|
902
|
-
for (var i = M(
|
|
908
|
+
for (var i = M(n), o = i.next(); !o.done; o = i.next()) {
|
|
903
909
|
var s = o.value;
|
|
904
910
|
if (t.next(s), t.closed)
|
|
905
911
|
return;
|
|
@@ -908,7 +914,7 @@ function ct(r) {
|
|
|
908
914
|
e = { error: c };
|
|
909
915
|
} finally {
|
|
910
916
|
try {
|
|
911
|
-
o && !o.done && (
|
|
917
|
+
o && !o.done && (r = i.return) && r.call(i);
|
|
912
918
|
} finally {
|
|
913
919
|
if (e) throw e.error;
|
|
914
920
|
}
|
|
@@ -916,41 +922,41 @@ function ct(r) {
|
|
|
916
922
|
t.complete();
|
|
917
923
|
});
|
|
918
924
|
}
|
|
919
|
-
function
|
|
925
|
+
function Ce(n) {
|
|
920
926
|
return new g(function(t) {
|
|
921
|
-
|
|
927
|
+
lt(n, t).catch(function(e) {
|
|
922
928
|
return t.error(e);
|
|
923
929
|
});
|
|
924
930
|
});
|
|
925
931
|
}
|
|
926
|
-
function
|
|
927
|
-
return
|
|
932
|
+
function ft(n) {
|
|
933
|
+
return Ce(xe(n));
|
|
928
934
|
}
|
|
929
|
-
function
|
|
930
|
-
var e,
|
|
931
|
-
return
|
|
935
|
+
function lt(n, t) {
|
|
936
|
+
var e, r, i, o;
|
|
937
|
+
return $e(this, void 0, void 0, function() {
|
|
932
938
|
var s, c;
|
|
933
|
-
return ce(this, function(
|
|
934
|
-
switch (
|
|
939
|
+
return ce(this, function(a) {
|
|
940
|
+
switch (a.label) {
|
|
935
941
|
case 0:
|
|
936
|
-
|
|
942
|
+
a.trys.push([0, 5, 6, 11]), e = Fe(n), a.label = 1;
|
|
937
943
|
case 1:
|
|
938
944
|
return [4, e.next()];
|
|
939
945
|
case 2:
|
|
940
|
-
if (
|
|
941
|
-
if (s =
|
|
946
|
+
if (r = a.sent(), !!r.done) return [3, 4];
|
|
947
|
+
if (s = r.value, t.next(s), t.closed)
|
|
942
948
|
return [2];
|
|
943
|
-
|
|
949
|
+
a.label = 3;
|
|
944
950
|
case 3:
|
|
945
951
|
return [3, 1];
|
|
946
952
|
case 4:
|
|
947
953
|
return [3, 11];
|
|
948
954
|
case 5:
|
|
949
|
-
return c =
|
|
955
|
+
return c = a.sent(), i = { error: c }, [3, 11];
|
|
950
956
|
case 6:
|
|
951
|
-
return
|
|
957
|
+
return a.trys.push([6, , 9, 10]), r && !r.done && (o = e.return) ? [4, o.call(e)] : [3, 8];
|
|
952
958
|
case 7:
|
|
953
|
-
|
|
959
|
+
a.sent(), a.label = 8;
|
|
954
960
|
case 8:
|
|
955
961
|
return [3, 10];
|
|
956
962
|
case 9:
|
|
@@ -964,60 +970,60 @@ function ft(r, t) {
|
|
|
964
970
|
});
|
|
965
971
|
});
|
|
966
972
|
}
|
|
967
|
-
function A(
|
|
968
|
-
|
|
973
|
+
function A(n, t, e, r, i) {
|
|
974
|
+
r === void 0 && (r = 0), i === void 0 && (i = !1);
|
|
969
975
|
var o = t.schedule(function() {
|
|
970
|
-
e(), i ?
|
|
971
|
-
},
|
|
972
|
-
if (
|
|
976
|
+
e(), i ? n.add(this.schedule(null, r)) : this.unsubscribe();
|
|
977
|
+
}, r);
|
|
978
|
+
if (n.add(o), !i)
|
|
973
979
|
return o;
|
|
974
980
|
}
|
|
975
|
-
function
|
|
976
|
-
return t === void 0 && (t = 0),
|
|
977
|
-
e.subscribe(E(
|
|
978
|
-
return A(
|
|
979
|
-
return
|
|
981
|
+
function Te(n, t) {
|
|
982
|
+
return t === void 0 && (t = 0), C(function(e, r) {
|
|
983
|
+
e.subscribe(E(r, function(i) {
|
|
984
|
+
return A(r, n, function() {
|
|
985
|
+
return r.next(i);
|
|
980
986
|
}, t);
|
|
981
987
|
}, function() {
|
|
982
|
-
return A(
|
|
983
|
-
return
|
|
988
|
+
return A(r, n, function() {
|
|
989
|
+
return r.complete();
|
|
984
990
|
}, t);
|
|
985
991
|
}, function(i) {
|
|
986
|
-
return A(
|
|
987
|
-
return
|
|
992
|
+
return A(r, n, function() {
|
|
993
|
+
return r.error(i);
|
|
988
994
|
}, t);
|
|
989
995
|
}));
|
|
990
996
|
});
|
|
991
997
|
}
|
|
992
|
-
function
|
|
993
|
-
return t === void 0 && (t = 0),
|
|
994
|
-
|
|
995
|
-
return e.subscribe(
|
|
998
|
+
function Pe(n, t) {
|
|
999
|
+
return t === void 0 && (t = 0), C(function(e, r) {
|
|
1000
|
+
r.add(n.schedule(function() {
|
|
1001
|
+
return e.subscribe(r);
|
|
996
1002
|
}, t));
|
|
997
1003
|
});
|
|
998
1004
|
}
|
|
999
|
-
function
|
|
1000
|
-
return x(
|
|
1005
|
+
function dt(n, t) {
|
|
1006
|
+
return x(n).pipe(Pe(t), Te(t));
|
|
1001
1007
|
}
|
|
1002
|
-
function
|
|
1003
|
-
return x(
|
|
1008
|
+
function ht(n, t) {
|
|
1009
|
+
return x(n).pipe(Pe(t), Te(t));
|
|
1004
1010
|
}
|
|
1005
|
-
function
|
|
1011
|
+
function yt(n, t) {
|
|
1006
1012
|
return new g(function(e) {
|
|
1007
|
-
var
|
|
1013
|
+
var r = 0;
|
|
1008
1014
|
return t.schedule(function() {
|
|
1009
|
-
|
|
1015
|
+
r === n.length ? e.complete() : (e.next(n[r++]), e.closed || this.schedule());
|
|
1010
1016
|
});
|
|
1011
1017
|
});
|
|
1012
1018
|
}
|
|
1013
|
-
function
|
|
1019
|
+
function vt(n, t) {
|
|
1014
1020
|
return new g(function(e) {
|
|
1015
|
-
var
|
|
1021
|
+
var r;
|
|
1016
1022
|
return A(e, t, function() {
|
|
1017
|
-
|
|
1023
|
+
r = n[Ie](), A(e, t, function() {
|
|
1018
1024
|
var i, o, s;
|
|
1019
1025
|
try {
|
|
1020
|
-
i =
|
|
1026
|
+
i = r.next(), o = i.value, s = i.done;
|
|
1021
1027
|
} catch (c) {
|
|
1022
1028
|
e.error(c);
|
|
1023
1029
|
return;
|
|
@@ -1025,150 +1031,150 @@ function yt(r, t) {
|
|
|
1025
1031
|
s ? e.complete() : e.next(o);
|
|
1026
1032
|
}, 0, !0);
|
|
1027
1033
|
}), function() {
|
|
1028
|
-
return p(
|
|
1034
|
+
return p(r == null ? void 0 : r.return) && r.return();
|
|
1029
1035
|
};
|
|
1030
1036
|
});
|
|
1031
1037
|
}
|
|
1032
|
-
function
|
|
1033
|
-
if (!
|
|
1038
|
+
function Me(n, t) {
|
|
1039
|
+
if (!n)
|
|
1034
1040
|
throw new Error("Iterable cannot be null");
|
|
1035
1041
|
return new g(function(e) {
|
|
1036
1042
|
A(e, t, function() {
|
|
1037
|
-
var
|
|
1043
|
+
var r = n[Symbol.asyncIterator]();
|
|
1038
1044
|
A(e, t, function() {
|
|
1039
|
-
|
|
1045
|
+
r.next().then(function(i) {
|
|
1040
1046
|
i.done ? e.complete() : e.next(i.value);
|
|
1041
1047
|
});
|
|
1042
1048
|
}, 0, !0);
|
|
1043
1049
|
});
|
|
1044
1050
|
});
|
|
1045
1051
|
}
|
|
1046
|
-
function pt(
|
|
1047
|
-
return
|
|
1048
|
-
}
|
|
1049
|
-
function bt(
|
|
1050
|
-
if (
|
|
1051
|
-
if (
|
|
1052
|
-
return
|
|
1053
|
-
if (
|
|
1054
|
-
return
|
|
1055
|
-
if (
|
|
1056
|
-
return
|
|
1057
|
-
if (
|
|
1058
|
-
return
|
|
1059
|
-
if (
|
|
1060
|
-
return
|
|
1061
|
-
if (
|
|
1062
|
-
return pt(
|
|
1052
|
+
function pt(n, t) {
|
|
1053
|
+
return Me(xe(n), t);
|
|
1054
|
+
}
|
|
1055
|
+
function bt(n, t) {
|
|
1056
|
+
if (n != null) {
|
|
1057
|
+
if (we(n))
|
|
1058
|
+
return dt(n, t);
|
|
1059
|
+
if (ge(n))
|
|
1060
|
+
return yt(n, t);
|
|
1061
|
+
if (Se(n))
|
|
1062
|
+
return ht(n, t);
|
|
1063
|
+
if (Ee(n))
|
|
1064
|
+
return Me(n, t);
|
|
1065
|
+
if (Ae(n))
|
|
1066
|
+
return vt(n, t);
|
|
1067
|
+
if (_e(n))
|
|
1068
|
+
return pt(n, t);
|
|
1063
1069
|
}
|
|
1064
|
-
throw
|
|
1070
|
+
throw Oe(n);
|
|
1065
1071
|
}
|
|
1066
|
-
function Z(
|
|
1067
|
-
return t ? bt(
|
|
1072
|
+
function Z(n, t) {
|
|
1073
|
+
return t ? bt(n, t) : x(n);
|
|
1068
1074
|
}
|
|
1069
1075
|
function mt() {
|
|
1070
|
-
for (var
|
|
1071
|
-
|
|
1072
|
-
var e =
|
|
1073
|
-
return Z(
|
|
1076
|
+
for (var n = [], t = 0; t < arguments.length; t++)
|
|
1077
|
+
n[t] = arguments[t];
|
|
1078
|
+
var e = me(n);
|
|
1079
|
+
return Z(n, e);
|
|
1074
1080
|
}
|
|
1075
|
-
function gt(
|
|
1076
|
-
return
|
|
1081
|
+
function gt(n) {
|
|
1082
|
+
return n instanceof Date && !isNaN(n);
|
|
1077
1083
|
}
|
|
1078
|
-
function F(
|
|
1079
|
-
return
|
|
1084
|
+
function F(n, t) {
|
|
1085
|
+
return C(function(e, r) {
|
|
1080
1086
|
var i = 0;
|
|
1081
|
-
e.subscribe(E(
|
|
1082
|
-
|
|
1087
|
+
e.subscribe(E(r, function(o) {
|
|
1088
|
+
r.next(n.call(t, o, i++));
|
|
1083
1089
|
}));
|
|
1084
1090
|
});
|
|
1085
1091
|
}
|
|
1086
1092
|
var St = Array.isArray;
|
|
1087
|
-
function wt(
|
|
1088
|
-
return St(t) ?
|
|
1093
|
+
function wt(n, t) {
|
|
1094
|
+
return St(t) ? n.apply(void 0, k([], R(t))) : n(t);
|
|
1089
1095
|
}
|
|
1090
|
-
function Et(
|
|
1096
|
+
function Et(n) {
|
|
1091
1097
|
return F(function(t) {
|
|
1092
|
-
return wt(
|
|
1098
|
+
return wt(n, t);
|
|
1093
1099
|
});
|
|
1094
1100
|
}
|
|
1095
1101
|
var Ot = Array.isArray, It = Object.getPrototypeOf, At = Object.prototype, xt = Object.keys;
|
|
1096
|
-
function _t(
|
|
1097
|
-
if (
|
|
1098
|
-
var t =
|
|
1102
|
+
function _t(n) {
|
|
1103
|
+
if (n.length === 1) {
|
|
1104
|
+
var t = n[0];
|
|
1099
1105
|
if (Ot(t))
|
|
1100
1106
|
return { args: t, keys: null };
|
|
1101
|
-
if (
|
|
1107
|
+
if (Ct(t)) {
|
|
1102
1108
|
var e = xt(t);
|
|
1103
1109
|
return {
|
|
1104
|
-
args: e.map(function(
|
|
1105
|
-
return t[
|
|
1110
|
+
args: e.map(function(r) {
|
|
1111
|
+
return t[r];
|
|
1106
1112
|
}),
|
|
1107
1113
|
keys: e
|
|
1108
1114
|
};
|
|
1109
1115
|
}
|
|
1110
1116
|
}
|
|
1111
|
-
return { args:
|
|
1117
|
+
return { args: n, keys: null };
|
|
1112
1118
|
}
|
|
1113
|
-
function
|
|
1114
|
-
return
|
|
1119
|
+
function Ct(n) {
|
|
1120
|
+
return n && typeof n == "object" && It(n) === At;
|
|
1115
1121
|
}
|
|
1116
|
-
function Tt(
|
|
1117
|
-
return
|
|
1118
|
-
return e[
|
|
1122
|
+
function Tt(n, t) {
|
|
1123
|
+
return n.reduce(function(e, r, i) {
|
|
1124
|
+
return e[r] = t[i], e;
|
|
1119
1125
|
}, {});
|
|
1120
1126
|
}
|
|
1121
|
-
function
|
|
1122
|
-
for (var
|
|
1123
|
-
|
|
1124
|
-
var e =
|
|
1127
|
+
function Pt() {
|
|
1128
|
+
for (var n = [], t = 0; t < arguments.length; t++)
|
|
1129
|
+
n[t] = arguments[t];
|
|
1130
|
+
var e = me(n), r = it(n), i = _t(n), o = i.args, s = i.keys;
|
|
1125
1131
|
if (o.length === 0)
|
|
1126
1132
|
return Z([], e);
|
|
1127
|
-
var c = new g(Mt(o, e, s ? function(
|
|
1128
|
-
return Tt(s,
|
|
1133
|
+
var c = new g(Mt(o, e, s ? function(a) {
|
|
1134
|
+
return Tt(s, a);
|
|
1129
1135
|
} : G));
|
|
1130
|
-
return
|
|
1136
|
+
return r ? c.pipe(Et(r)) : c;
|
|
1131
1137
|
}
|
|
1132
|
-
function Mt(
|
|
1133
|
-
return e === void 0 && (e = G), function(
|
|
1138
|
+
function Mt(n, t, e) {
|
|
1139
|
+
return e === void 0 && (e = G), function(r) {
|
|
1134
1140
|
se(t, function() {
|
|
1135
|
-
for (var i =
|
|
1141
|
+
for (var i = n.length, o = new Array(i), s = i, c = i, a = function(f) {
|
|
1136
1142
|
se(t, function() {
|
|
1137
|
-
var
|
|
1138
|
-
|
|
1139
|
-
o[
|
|
1143
|
+
var h = Z(n[f], t), b = !1;
|
|
1144
|
+
h.subscribe(E(r, function(l) {
|
|
1145
|
+
o[f] = l, b || (b = !0, c--), c || r.next(e(o.slice()));
|
|
1140
1146
|
}, function() {
|
|
1141
|
-
--s ||
|
|
1147
|
+
--s || r.complete();
|
|
1142
1148
|
}));
|
|
1143
|
-
},
|
|
1144
|
-
},
|
|
1145
|
-
u
|
|
1146
|
-
},
|
|
1149
|
+
}, r);
|
|
1150
|
+
}, u = 0; u < i; u++)
|
|
1151
|
+
a(u);
|
|
1152
|
+
}, r);
|
|
1147
1153
|
};
|
|
1148
1154
|
}
|
|
1149
|
-
function se(
|
|
1150
|
-
|
|
1155
|
+
function se(n, t, e) {
|
|
1156
|
+
n ? A(e, n, t) : t();
|
|
1151
1157
|
}
|
|
1152
|
-
function Rt(
|
|
1153
|
-
var
|
|
1154
|
-
|
|
1155
|
-
},
|
|
1156
|
-
return
|
|
1157
|
-
},
|
|
1158
|
-
|
|
1158
|
+
function Rt(n, t, e, r, i, o, s, c) {
|
|
1159
|
+
var a = [], u = 0, f = 0, h = !1, b = function() {
|
|
1160
|
+
h && !a.length && !u && t.complete();
|
|
1161
|
+
}, l = function(d) {
|
|
1162
|
+
return u < r ? y(d) : a.push(d);
|
|
1163
|
+
}, y = function(d) {
|
|
1164
|
+
u++;
|
|
1159
1165
|
var S = !1;
|
|
1160
|
-
x(e(
|
|
1166
|
+
x(e(d, f++)).subscribe(E(t, function(w) {
|
|
1161
1167
|
t.next(w);
|
|
1162
1168
|
}, function() {
|
|
1163
1169
|
S = !0;
|
|
1164
1170
|
}, void 0, function() {
|
|
1165
1171
|
if (S)
|
|
1166
1172
|
try {
|
|
1167
|
-
|
|
1173
|
+
u--;
|
|
1168
1174
|
for (var w = function() {
|
|
1169
|
-
var _ =
|
|
1170
|
-
s ||
|
|
1171
|
-
};
|
|
1175
|
+
var _ = a.shift();
|
|
1176
|
+
s || y(_);
|
|
1177
|
+
}; a.length && u < r; )
|
|
1172
1178
|
w();
|
|
1173
1179
|
b();
|
|
1174
1180
|
} catch (_) {
|
|
@@ -1176,166 +1182,166 @@ function Rt(r, t, e, n, i, o, s, c) {
|
|
|
1176
1182
|
}
|
|
1177
1183
|
}));
|
|
1178
1184
|
};
|
|
1179
|
-
return
|
|
1180
|
-
|
|
1185
|
+
return n.subscribe(E(t, l, function() {
|
|
1186
|
+
h = !0, b();
|
|
1181
1187
|
})), function() {
|
|
1182
1188
|
};
|
|
1183
1189
|
}
|
|
1184
|
-
function $(
|
|
1185
|
-
return e === void 0 && (e = 1 / 0), p(t) ? $(function(
|
|
1190
|
+
function $(n, t, e) {
|
|
1191
|
+
return e === void 0 && (e = 1 / 0), p(t) ? $(function(r, i) {
|
|
1186
1192
|
return F(function(o, s) {
|
|
1187
|
-
return t(
|
|
1188
|
-
})(x(r
|
|
1189
|
-
}, e) : (typeof t == "number" && (e = t),
|
|
1190
|
-
return Rt(
|
|
1193
|
+
return t(r, o, i, s);
|
|
1194
|
+
})(x(n(r, i)));
|
|
1195
|
+
}, e) : (typeof t == "number" && (e = t), C(function(r, i) {
|
|
1196
|
+
return Rt(r, i, n, e);
|
|
1191
1197
|
}));
|
|
1192
1198
|
}
|
|
1193
|
-
function
|
|
1194
|
-
|
|
1195
|
-
var
|
|
1196
|
-
return t != null && (
|
|
1197
|
-
var o = gt(
|
|
1199
|
+
function Re(n, t, e) {
|
|
1200
|
+
n === void 0 && (n = 0), e === void 0 && (e = nt);
|
|
1201
|
+
var r = -1;
|
|
1202
|
+
return t != null && (pe(t) ? e = t : r = t), new g(function(i) {
|
|
1203
|
+
var o = gt(n) ? +n - e.now() : n;
|
|
1198
1204
|
o < 0 && (o = 0);
|
|
1199
1205
|
var s = 0;
|
|
1200
1206
|
return e.schedule(function() {
|
|
1201
|
-
i.closed || (i.next(s++), 0 <=
|
|
1207
|
+
i.closed || (i.next(s++), 0 <= r ? this.schedule(void 0, r) : i.complete());
|
|
1202
1208
|
}, o);
|
|
1203
1209
|
});
|
|
1204
1210
|
}
|
|
1205
|
-
function kt(
|
|
1206
|
-
return p(t) ? $(
|
|
1211
|
+
function kt(n, t) {
|
|
1212
|
+
return p(t) ? $(n, t, 1) : $(n, 1);
|
|
1207
1213
|
}
|
|
1208
|
-
function jt(
|
|
1209
|
-
return
|
|
1210
|
-
return
|
|
1211
|
-
} :
|
|
1212
|
-
var
|
|
1214
|
+
function jt(n) {
|
|
1215
|
+
return n <= 0 ? function() {
|
|
1216
|
+
return rt;
|
|
1217
|
+
} : C(function(t, e) {
|
|
1218
|
+
var r = 0;
|
|
1213
1219
|
t.subscribe(E(e, function(i) {
|
|
1214
|
-
++
|
|
1220
|
+
++r <= n && (e.next(i), n <= r && e.complete());
|
|
1215
1221
|
}));
|
|
1216
1222
|
});
|
|
1217
1223
|
}
|
|
1218
|
-
function Lt(
|
|
1224
|
+
function Lt(n) {
|
|
1219
1225
|
return F(function() {
|
|
1220
|
-
return
|
|
1226
|
+
return n;
|
|
1221
1227
|
});
|
|
1222
1228
|
}
|
|
1223
|
-
function Dt(
|
|
1224
|
-
return $(function(e,
|
|
1225
|
-
return x(
|
|
1229
|
+
function Dt(n, t) {
|
|
1230
|
+
return $(function(e, r) {
|
|
1231
|
+
return x(n(e, r)).pipe(jt(1), Lt(e));
|
|
1226
1232
|
});
|
|
1227
1233
|
}
|
|
1228
|
-
function Ut(
|
|
1234
|
+
function Ut(n, t) {
|
|
1229
1235
|
t === void 0 && (t = ve);
|
|
1230
|
-
var e =
|
|
1236
|
+
var e = Re(n, t);
|
|
1231
1237
|
return Dt(function() {
|
|
1232
1238
|
return e;
|
|
1233
1239
|
});
|
|
1234
1240
|
}
|
|
1235
|
-
function Nt(
|
|
1241
|
+
function Nt(n) {
|
|
1236
1242
|
var t;
|
|
1237
1243
|
t = {
|
|
1238
|
-
count:
|
|
1244
|
+
count: n
|
|
1239
1245
|
};
|
|
1240
|
-
var e = t.count,
|
|
1241
|
-
return
|
|
1242
|
-
var
|
|
1246
|
+
var e = t.count, r = e === void 0 ? 1 / 0 : e, i = t.delay, o = t.resetOnSuccess, s = o === void 0 ? !1 : o;
|
|
1247
|
+
return r <= 0 ? G : C(function(c, a) {
|
|
1248
|
+
var u = 0, f, h = function() {
|
|
1243
1249
|
var b = !1;
|
|
1244
|
-
|
|
1245
|
-
s && (
|
|
1246
|
-
}, void 0, function(
|
|
1247
|
-
if (
|
|
1248
|
-
var
|
|
1249
|
-
|
|
1250
|
+
f = c.subscribe(E(a, function(l) {
|
|
1251
|
+
s && (u = 0), a.next(l);
|
|
1252
|
+
}, void 0, function(l) {
|
|
1253
|
+
if (u++ < r) {
|
|
1254
|
+
var y = function() {
|
|
1255
|
+
f ? (f.unsubscribe(), f = null, h()) : b = !0;
|
|
1250
1256
|
};
|
|
1251
1257
|
if (i != null) {
|
|
1252
|
-
var
|
|
1253
|
-
S.unsubscribe(),
|
|
1258
|
+
var d = typeof i == "number" ? Re(i) : x(i(l, u)), S = E(a, function() {
|
|
1259
|
+
S.unsubscribe(), y();
|
|
1254
1260
|
}, function() {
|
|
1255
|
-
|
|
1261
|
+
a.complete();
|
|
1256
1262
|
});
|
|
1257
|
-
|
|
1263
|
+
d.subscribe(S);
|
|
1258
1264
|
} else
|
|
1259
|
-
|
|
1265
|
+
y();
|
|
1260
1266
|
} else
|
|
1261
|
-
|
|
1262
|
-
})), b && (
|
|
1267
|
+
a.error(l);
|
|
1268
|
+
})), b && (f.unsubscribe(), f = null, h());
|
|
1263
1269
|
};
|
|
1264
|
-
|
|
1270
|
+
h();
|
|
1265
1271
|
});
|
|
1266
1272
|
}
|
|
1267
|
-
function $t(
|
|
1268
|
-
return
|
|
1269
|
-
x(
|
|
1273
|
+
function $t(n) {
|
|
1274
|
+
return C(function(t, e) {
|
|
1275
|
+
x(n).subscribe(E(e, function() {
|
|
1270
1276
|
return e.complete();
|
|
1271
1277
|
}, q)), !e.closed && t.subscribe(e);
|
|
1272
1278
|
});
|
|
1273
1279
|
}
|
|
1274
|
-
async function Gt(
|
|
1275
|
-
const e =
|
|
1276
|
-
let
|
|
1277
|
-
for (; !(
|
|
1278
|
-
t(
|
|
1280
|
+
async function Gt(n, t) {
|
|
1281
|
+
const e = n.getReader();
|
|
1282
|
+
let r;
|
|
1283
|
+
for (; !(r = await e.read()).done; )
|
|
1284
|
+
t(r.value);
|
|
1279
1285
|
}
|
|
1280
|
-
function Ft(
|
|
1281
|
-
let t, e,
|
|
1286
|
+
function Ft(n) {
|
|
1287
|
+
let t, e, r, i = !1;
|
|
1282
1288
|
return function(s) {
|
|
1283
|
-
t === void 0 ? (t = s, e = 0,
|
|
1289
|
+
t === void 0 ? (t = s, e = 0, r = -1) : t = Vt(t, s);
|
|
1284
1290
|
const c = t.length;
|
|
1285
|
-
let
|
|
1291
|
+
let a = 0;
|
|
1286
1292
|
for (; e < c; ) {
|
|
1287
|
-
i && (t[e] === 10 && (
|
|
1288
|
-
let
|
|
1289
|
-
for (; e < c &&
|
|
1293
|
+
i && (t[e] === 10 && (a = ++e), i = !1);
|
|
1294
|
+
let u = -1;
|
|
1295
|
+
for (; e < c && u === -1; ++e)
|
|
1290
1296
|
switch (t[e]) {
|
|
1291
1297
|
case 58:
|
|
1292
|
-
|
|
1298
|
+
r === -1 && (r = e - a);
|
|
1293
1299
|
break;
|
|
1294
1300
|
case 13:
|
|
1295
1301
|
i = !0;
|
|
1296
1302
|
case 10:
|
|
1297
|
-
|
|
1303
|
+
u = e;
|
|
1298
1304
|
break;
|
|
1299
1305
|
}
|
|
1300
|
-
if (
|
|
1306
|
+
if (u === -1)
|
|
1301
1307
|
break;
|
|
1302
|
-
|
|
1308
|
+
n(t.subarray(a, u), r), a = e, r = -1;
|
|
1303
1309
|
}
|
|
1304
|
-
|
|
1310
|
+
a === c ? t = void 0 : a !== 0 && (t = t.subarray(a), e -= a);
|
|
1305
1311
|
};
|
|
1306
1312
|
}
|
|
1307
|
-
function
|
|
1308
|
-
let
|
|
1313
|
+
function Ht(n, t, e) {
|
|
1314
|
+
let r = ue();
|
|
1309
1315
|
const i = new TextDecoder();
|
|
1310
1316
|
return function(s, c) {
|
|
1311
1317
|
if (s.length === 0)
|
|
1312
|
-
e == null || e(
|
|
1318
|
+
e == null || e(r), r = ue();
|
|
1313
1319
|
else if (c > 0) {
|
|
1314
|
-
const
|
|
1315
|
-
switch (
|
|
1320
|
+
const a = i.decode(s.subarray(0, c)), u = c + (s[c + 1] === 32 ? 2 : 1), f = i.decode(s.subarray(u));
|
|
1321
|
+
switch (a) {
|
|
1316
1322
|
case "data":
|
|
1317
|
-
|
|
1318
|
-
` +
|
|
1323
|
+
r.data = r.data ? r.data + `
|
|
1324
|
+
` + f : f;
|
|
1319
1325
|
break;
|
|
1320
1326
|
case "event":
|
|
1321
|
-
|
|
1327
|
+
r.event = f;
|
|
1322
1328
|
break;
|
|
1323
1329
|
case "id":
|
|
1324
|
-
r
|
|
1330
|
+
n(r.id = f);
|
|
1325
1331
|
break;
|
|
1326
1332
|
case "retry":
|
|
1327
|
-
const
|
|
1328
|
-
isNaN(
|
|
1333
|
+
const h = parseInt(f, 10);
|
|
1334
|
+
isNaN(h) || t(r.retry = h);
|
|
1329
1335
|
break;
|
|
1330
1336
|
}
|
|
1331
1337
|
}
|
|
1332
1338
|
};
|
|
1333
1339
|
}
|
|
1334
|
-
function
|
|
1335
|
-
const e = new Uint8Array(
|
|
1336
|
-
return e.set(
|
|
1340
|
+
function Vt(n, t) {
|
|
1341
|
+
const e = new Uint8Array(n.length + t.length);
|
|
1342
|
+
return e.set(n), e.set(t, n.length), e;
|
|
1337
1343
|
}
|
|
1338
|
-
function
|
|
1344
|
+
function ue() {
|
|
1339
1345
|
return {
|
|
1340
1346
|
data: "",
|
|
1341
1347
|
event: "",
|
|
@@ -1343,87 +1349,87 @@ function ae() {
|
|
|
1343
1349
|
retry: void 0
|
|
1344
1350
|
};
|
|
1345
1351
|
}
|
|
1346
|
-
var Bt = function(
|
|
1352
|
+
var Bt = function(n, t) {
|
|
1347
1353
|
var e = {};
|
|
1348
|
-
for (var
|
|
1349
|
-
if (
|
|
1350
|
-
for (var i = 0,
|
|
1351
|
-
t.indexOf(
|
|
1354
|
+
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && t.indexOf(r) < 0 && (e[r] = n[r]);
|
|
1355
|
+
if (n != null && typeof Object.getOwnPropertySymbols == "function")
|
|
1356
|
+
for (var i = 0, r = Object.getOwnPropertySymbols(n); i < r.length; i++)
|
|
1357
|
+
t.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(n, r[i]) && (e[r[i]] = n[r[i]]);
|
|
1352
1358
|
return e;
|
|
1353
1359
|
};
|
|
1354
|
-
const J = "text/event-stream", Kt = 1e3,
|
|
1355
|
-
function Yt(
|
|
1356
|
-
var { signal: e, headers:
|
|
1357
|
-
return new Promise((
|
|
1358
|
-
const
|
|
1359
|
-
|
|
1360
|
-
let
|
|
1361
|
-
function
|
|
1362
|
-
|
|
1360
|
+
const J = "text/event-stream", Kt = 1e3, ae = "last-event-id";
|
|
1361
|
+
function Yt(n, t) {
|
|
1362
|
+
var { signal: e, headers: r, onopen: i, onmessage: o, onclose: s, onerror: c, openWhenHidden: a, fetch: u } = t, f = Bt(t, ["signal", "headers", "onopen", "onmessage", "onclose", "onerror", "openWhenHidden", "fetch"]);
|
|
1363
|
+
return new Promise((h, b) => {
|
|
1364
|
+
const l = Object.assign({}, r);
|
|
1365
|
+
l.accept || (l.accept = J);
|
|
1366
|
+
let y;
|
|
1367
|
+
function d() {
|
|
1368
|
+
y.abort(), document.hidden || H();
|
|
1363
1369
|
}
|
|
1364
|
-
|
|
1370
|
+
a || document.addEventListener("visibilitychange", d);
|
|
1365
1371
|
let S = Kt, w = 0;
|
|
1366
1372
|
function _() {
|
|
1367
|
-
document.removeEventListener("visibilitychange",
|
|
1373
|
+
document.removeEventListener("visibilitychange", d), window.clearTimeout(w), y.abort();
|
|
1368
1374
|
}
|
|
1369
1375
|
e == null || e.addEventListener("abort", () => {
|
|
1370
|
-
_(),
|
|
1376
|
+
_(), h();
|
|
1371
1377
|
});
|
|
1372
|
-
const
|
|
1373
|
-
async function
|
|
1374
|
-
var
|
|
1375
|
-
|
|
1378
|
+
const je = u ?? window.fetch, Le = i ?? qt;
|
|
1379
|
+
async function H() {
|
|
1380
|
+
var V;
|
|
1381
|
+
y = new AbortController();
|
|
1376
1382
|
try {
|
|
1377
|
-
const L = await
|
|
1378
|
-
await
|
|
1379
|
-
I ?
|
|
1383
|
+
const L = await je(n, Object.assign(Object.assign({}, f), { headers: l, signal: y.signal }));
|
|
1384
|
+
await Le(L), await Gt(L.body, Ft(Ht((I) => {
|
|
1385
|
+
I ? l[ae] = I : delete l[ae];
|
|
1380
1386
|
}, (I) => {
|
|
1381
1387
|
S = I;
|
|
1382
|
-
}, o))), s == null || s(), _(),
|
|
1388
|
+
}, o))), s == null || s(), _(), h();
|
|
1383
1389
|
} catch (L) {
|
|
1384
|
-
if (!
|
|
1390
|
+
if (!y.signal.aborted)
|
|
1385
1391
|
try {
|
|
1386
|
-
const I = (
|
|
1387
|
-
window.clearTimeout(w), w = window.setTimeout(
|
|
1392
|
+
const I = (V = c == null ? void 0 : c(L)) !== null && V !== void 0 ? V : S;
|
|
1393
|
+
window.clearTimeout(w), w = window.setTimeout(H, I);
|
|
1388
1394
|
} catch (I) {
|
|
1389
1395
|
_(), b(I);
|
|
1390
1396
|
}
|
|
1391
1397
|
}
|
|
1392
1398
|
}
|
|
1393
|
-
|
|
1399
|
+
H();
|
|
1394
1400
|
});
|
|
1395
1401
|
}
|
|
1396
|
-
function qt(
|
|
1397
|
-
const t =
|
|
1402
|
+
function qt(n) {
|
|
1403
|
+
const t = n.headers.get("content-type");
|
|
1398
1404
|
if (!(t != null && t.startsWith(J)))
|
|
1399
1405
|
throw new Error(`Expected content-type to be ${J}, Actual: ${t}`);
|
|
1400
1406
|
}
|
|
1401
|
-
function Wt(
|
|
1402
|
-
const { endpoint: t, apiKey: e, payload:
|
|
1407
|
+
function Wt(n) {
|
|
1408
|
+
const { endpoint: t, apiKey: e, payload: r, debugMode: i } = n;
|
|
1403
1409
|
return new g((o) => {
|
|
1404
1410
|
const s = new AbortController(), c = {
|
|
1405
1411
|
"Content-Type": "application/json"
|
|
1406
1412
|
};
|
|
1407
1413
|
e && (c["X-API-KEY"] = e);
|
|
1408
|
-
const
|
|
1409
|
-
i &&
|
|
1410
|
-
const
|
|
1411
|
-
return
|
|
1414
|
+
const a = new URLSearchParams();
|
|
1415
|
+
i && a.set("is_debug", "true");
|
|
1416
|
+
const u = new URL(t);
|
|
1417
|
+
return a.toString() && (u.search = a.toString()), Yt(u.toString(), {
|
|
1412
1418
|
method: "POST",
|
|
1413
1419
|
headers: c,
|
|
1414
|
-
body:
|
|
1420
|
+
body: r ? JSON.stringify(r) : void 0,
|
|
1415
1421
|
signal: s.signal,
|
|
1416
|
-
onopen: async (
|
|
1417
|
-
|
|
1422
|
+
onopen: async (f) => {
|
|
1423
|
+
f.ok || (o.error(f), s.abort());
|
|
1418
1424
|
},
|
|
1419
|
-
onmessage: (
|
|
1420
|
-
o.next(JSON.parse(
|
|
1425
|
+
onmessage: (f) => {
|
|
1426
|
+
o.next(JSON.parse(f.data));
|
|
1421
1427
|
},
|
|
1422
1428
|
onclose: () => {
|
|
1423
1429
|
o.complete();
|
|
1424
1430
|
},
|
|
1425
|
-
onerror: (
|
|
1426
|
-
throw o.error(
|
|
1431
|
+
onerror: (f) => {
|
|
1432
|
+
throw o.error(f), s.abort(), f;
|
|
1427
1433
|
}
|
|
1428
1434
|
}), () => {
|
|
1429
1435
|
s.abort();
|
|
@@ -1441,14 +1447,14 @@ class Jt {
|
|
|
1441
1447
|
}
|
|
1442
1448
|
off(t, e) {
|
|
1443
1449
|
this.listeners[t] && (this.listeners = Object.assign({}, this.listeners, {
|
|
1444
|
-
[t]: (this.listeners[t] ?? []).filter((
|
|
1450
|
+
[t]: (this.listeners[t] ?? []).filter((r) => r !== e)
|
|
1445
1451
|
}));
|
|
1446
1452
|
}
|
|
1447
1453
|
remove(t) {
|
|
1448
1454
|
delete this.listeners[t];
|
|
1449
1455
|
}
|
|
1450
1456
|
emit(t, ...e) {
|
|
1451
|
-
this.listeners[t] && this.listeners[t].forEach((
|
|
1457
|
+
this.listeners[t] && this.listeners[t].forEach((r) => r(...e));
|
|
1452
1458
|
}
|
|
1453
1459
|
}
|
|
1454
1460
|
class zt {
|
|
@@ -1468,44 +1474,44 @@ class zt {
|
|
|
1468
1474
|
}
|
|
1469
1475
|
handleEvent(t) {
|
|
1470
1476
|
switch (t.eventType) {
|
|
1471
|
-
case
|
|
1477
|
+
case v.INIT:
|
|
1472
1478
|
this.sseEmitter.emit(
|
|
1473
|
-
|
|
1479
|
+
v.INIT,
|
|
1474
1480
|
t
|
|
1475
1481
|
);
|
|
1476
1482
|
break;
|
|
1477
|
-
case
|
|
1478
|
-
case
|
|
1483
|
+
case v.PROCESS_START:
|
|
1484
|
+
case v.PROCESS_COMPLETE:
|
|
1479
1485
|
this.sseEmitter.emit(
|
|
1480
|
-
|
|
1486
|
+
v.PROCESS,
|
|
1481
1487
|
t
|
|
1482
1488
|
);
|
|
1483
1489
|
break;
|
|
1484
|
-
case
|
|
1485
|
-
case
|
|
1486
|
-
case
|
|
1490
|
+
case v.MESSAGE_START:
|
|
1491
|
+
case v.MESSAGE_DELTA:
|
|
1492
|
+
case v.MESSAGE_COMPLETE:
|
|
1487
1493
|
this.sseEmitter.emit(
|
|
1488
|
-
|
|
1494
|
+
v.MESSAGE,
|
|
1489
1495
|
t
|
|
1490
1496
|
);
|
|
1491
1497
|
break;
|
|
1492
|
-
case
|
|
1498
|
+
case v.DONE:
|
|
1493
1499
|
this.sseEmitter.emit(
|
|
1494
|
-
|
|
1500
|
+
v.DONE,
|
|
1495
1501
|
t
|
|
1496
1502
|
);
|
|
1497
1503
|
break;
|
|
1498
|
-
case
|
|
1504
|
+
case v.ERROR:
|
|
1499
1505
|
this.sseEmitter.emit(
|
|
1500
|
-
|
|
1506
|
+
v.ERROR,
|
|
1501
1507
|
t
|
|
1502
1508
|
);
|
|
1503
1509
|
break;
|
|
1504
1510
|
}
|
|
1505
1511
|
}
|
|
1506
1512
|
fetchSse(t, e) {
|
|
1507
|
-
var
|
|
1508
|
-
(
|
|
1513
|
+
var r, i;
|
|
1514
|
+
(r = e == null ? void 0 : e.onSseStart) == null || r.call(e), Wt({
|
|
1509
1515
|
apiKey: this.apiKey,
|
|
1510
1516
|
endpoint: this.endpoint,
|
|
1511
1517
|
debugMode: this.debugMode,
|
|
@@ -1533,7 +1539,7 @@ class zt {
|
|
|
1533
1539
|
this.destroy$.next(), this.destroy$.complete();
|
|
1534
1540
|
}
|
|
1535
1541
|
}
|
|
1536
|
-
class
|
|
1542
|
+
class ke {
|
|
1537
1543
|
constructor(t) {
|
|
1538
1544
|
m(this, "client");
|
|
1539
1545
|
m(this, "customChannelId");
|
|
@@ -1546,18 +1552,18 @@ class Re {
|
|
|
1546
1552
|
throw new Error("client must be required");
|
|
1547
1553
|
if (!t.customChannelId)
|
|
1548
1554
|
throw new Error("customChannelId must be required");
|
|
1549
|
-
this.client = t.client, this.customChannelId = t.customChannelId, this.customMessageId = t.customMessageId, this.isConnecting$ = new
|
|
1555
|
+
this.client = t.client, this.customChannelId = t.customChannelId, this.customMessageId = t.customMessageId, this.isConnecting$ = new re(!1), this.conversation$ = new re(t.conversation), this.statesObserver = t.statesObserver;
|
|
1550
1556
|
}
|
|
1551
1557
|
static async reset(t, e) {
|
|
1552
|
-
const
|
|
1558
|
+
const r = new ke(t);
|
|
1553
1559
|
try {
|
|
1554
|
-
return
|
|
1560
|
+
return r.subscribe(), await r.resetChannel(e), r;
|
|
1555
1561
|
} catch (i) {
|
|
1556
|
-
throw
|
|
1562
|
+
throw r.close(), i;
|
|
1557
1563
|
}
|
|
1558
1564
|
}
|
|
1559
1565
|
subscribe() {
|
|
1560
|
-
this.statesSubscription =
|
|
1566
|
+
this.statesSubscription = Pt([
|
|
1561
1567
|
this.isConnecting$,
|
|
1562
1568
|
this.conversation$
|
|
1563
1569
|
]).pipe(
|
|
@@ -1568,7 +1574,7 @@ class Re {
|
|
|
1568
1574
|
).subscribe(this.statesObserver);
|
|
1569
1575
|
}
|
|
1570
1576
|
fetchSse(t, e) {
|
|
1571
|
-
return new Promise((
|
|
1577
|
+
return new Promise((r, i) => {
|
|
1572
1578
|
this.isConnecting$.next(!0), this.client.fetchSse(t, {
|
|
1573
1579
|
onSseStart: e == null ? void 0 : e.onSseStart,
|
|
1574
1580
|
onSseMessage: (o) => {
|
|
@@ -1581,7 +1587,7 @@ class Re {
|
|
|
1581
1587
|
},
|
|
1582
1588
|
onSseCompleted: () => {
|
|
1583
1589
|
var o;
|
|
1584
|
-
(o = e == null ? void 0 : e.onSseCompleted) == null || o.call(e), this.isConnecting$.next(!1),
|
|
1590
|
+
(o = e == null ? void 0 : e.onSseCompleted) == null || o.call(e), this.isConnecting$.next(!1), r();
|
|
1585
1591
|
}
|
|
1586
1592
|
});
|
|
1587
1593
|
});
|
|
@@ -1598,12 +1604,12 @@ class Re {
|
|
|
1598
1604
|
);
|
|
1599
1605
|
}
|
|
1600
1606
|
sendMessage(t, e) {
|
|
1601
|
-
const
|
|
1607
|
+
const r = t.text.trim(), i = t.customMessageId ?? crypto.randomUUID();
|
|
1602
1608
|
return this.conversation$.next(
|
|
1603
1609
|
this.conversation$.value.pushMessage({
|
|
1604
1610
|
type: "user",
|
|
1605
1611
|
messageId: i,
|
|
1606
|
-
text:
|
|
1612
|
+
text: r,
|
|
1607
1613
|
time: /* @__PURE__ */ new Date()
|
|
1608
1614
|
})
|
|
1609
1615
|
), this.fetchSse(
|
|
@@ -1612,7 +1618,7 @@ class Re {
|
|
|
1612
1618
|
customChannelId: this.customChannelId,
|
|
1613
1619
|
customMessageId: i,
|
|
1614
1620
|
payload: t == null ? void 0 : t.payload,
|
|
1615
|
-
text:
|
|
1621
|
+
text: r
|
|
1616
1622
|
},
|
|
1617
1623
|
e
|
|
1618
1624
|
);
|
|
@@ -1633,79 +1639,79 @@ class T {
|
|
|
1633
1639
|
}
|
|
1634
1640
|
onMessage(t) {
|
|
1635
1641
|
switch (t.eventType) {
|
|
1636
|
-
case
|
|
1642
|
+
case v.MESSAGE_START:
|
|
1637
1643
|
return this.onMessageStart(
|
|
1638
1644
|
t
|
|
1639
1645
|
);
|
|
1640
|
-
case
|
|
1646
|
+
case v.MESSAGE_DELTA:
|
|
1641
1647
|
return this.onMessageDelta(
|
|
1642
1648
|
t
|
|
1643
1649
|
);
|
|
1644
|
-
case
|
|
1650
|
+
case v.MESSAGE_COMPLETE:
|
|
1645
1651
|
return this.onMessageComplete(
|
|
1646
1652
|
t
|
|
1647
1653
|
);
|
|
1648
|
-
case
|
|
1654
|
+
case v.ERROR:
|
|
1649
1655
|
return this.onMessageError(t);
|
|
1650
1656
|
default:
|
|
1651
1657
|
return this;
|
|
1652
1658
|
}
|
|
1653
1659
|
}
|
|
1654
1660
|
onMessageStart(t) {
|
|
1655
|
-
const e = t.fact.messageStart.message,
|
|
1656
|
-
return
|
|
1661
|
+
const e = t.fact.messageStart.message, r = new Map(this.messages);
|
|
1662
|
+
return r.set(e.messageId, {
|
|
1657
1663
|
type: "bot",
|
|
1658
|
-
eventType:
|
|
1664
|
+
eventType: v.MESSAGE_START,
|
|
1659
1665
|
isTyping: !0,
|
|
1660
1666
|
typingText: "",
|
|
1661
1667
|
messageId: e.messageId,
|
|
1662
1668
|
message: e,
|
|
1663
1669
|
time: /* @__PURE__ */ new Date()
|
|
1664
|
-
}), new T({ messages:
|
|
1670
|
+
}), new T({ messages: r });
|
|
1665
1671
|
}
|
|
1666
1672
|
onMessageDelta(t) {
|
|
1667
|
-
const e = t.fact.messageDelta.message,
|
|
1673
|
+
const e = t.fact.messageDelta.message, r = new Map(this.messages), i = r.get(e.messageId);
|
|
1668
1674
|
if ((i == null ? void 0 : i.type) !== "bot") return this;
|
|
1669
1675
|
const o = `${(i == null ? void 0 : i.typingText) ?? ""}${e.text}`;
|
|
1670
|
-
return
|
|
1676
|
+
return r.set(e.messageId, {
|
|
1671
1677
|
type: "bot",
|
|
1672
|
-
eventType:
|
|
1678
|
+
eventType: v.MESSAGE_DELTA,
|
|
1673
1679
|
isTyping: !0,
|
|
1674
1680
|
typingText: o,
|
|
1675
1681
|
messageId: e.messageId,
|
|
1676
1682
|
message: e,
|
|
1677
1683
|
time: /* @__PURE__ */ new Date()
|
|
1678
|
-
}), new T({ messages:
|
|
1684
|
+
}), new T({ messages: r });
|
|
1679
1685
|
}
|
|
1680
1686
|
onMessageComplete(t) {
|
|
1681
|
-
const e = t.fact.messageComplete.message,
|
|
1682
|
-
return
|
|
1687
|
+
const e = t.fact.messageComplete.message, r = new Map(this.messages);
|
|
1688
|
+
return r.set(e.messageId, {
|
|
1683
1689
|
type: "bot",
|
|
1684
|
-
eventType:
|
|
1690
|
+
eventType: v.MESSAGE_COMPLETE,
|
|
1685
1691
|
isTyping: !1,
|
|
1686
1692
|
typingText: null,
|
|
1687
1693
|
messageId: e.messageId,
|
|
1688
1694
|
message: e,
|
|
1689
1695
|
time: /* @__PURE__ */ new Date()
|
|
1690
|
-
}), new T({ messages:
|
|
1696
|
+
}), new T({ messages: r });
|
|
1691
1697
|
}
|
|
1692
1698
|
onMessageError(t) {
|
|
1693
|
-
const e = crypto.randomUUID(),
|
|
1699
|
+
const e = crypto.randomUUID(), r = t.fact.runError.error, i = new Map(this.messages);
|
|
1694
1700
|
return i.set(e, {
|
|
1695
1701
|
type: "error",
|
|
1696
|
-
eventType:
|
|
1702
|
+
eventType: v.ERROR,
|
|
1697
1703
|
messageId: e,
|
|
1698
|
-
error:
|
|
1704
|
+
error: r,
|
|
1699
1705
|
time: /* @__PURE__ */ new Date()
|
|
1700
1706
|
}), new T({ messages: i });
|
|
1701
1707
|
}
|
|
1702
1708
|
}
|
|
1703
1709
|
export {
|
|
1704
1710
|
zt as AsgardServiceClient,
|
|
1705
|
-
|
|
1711
|
+
ke as Channel,
|
|
1706
1712
|
T as Conversation,
|
|
1707
|
-
|
|
1713
|
+
v as EventType,
|
|
1708
1714
|
K as FetchSseAction,
|
|
1709
|
-
|
|
1715
|
+
Ne as MessageTemplateType
|
|
1710
1716
|
};
|
|
1711
1717
|
//# sourceMappingURL=index.mjs.map
|