@leancodepl/rx-cqrs-client 9.7.4 → 10.0.0

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/index.js CHANGED
@@ -1,3 +1,24 @@
1
+ import { ReplaySubject as Pe, from as D, of as V, throwError as he, catchError as Ce, reduce as Se } from "rxjs";
2
+ import { handleResponse as Le } from "@leancodepl/validation";
3
+ function w(e) {
4
+ return typeof e == "function";
5
+ }
6
+ function Ue(e) {
7
+ return w(e?.lift);
8
+ }
9
+ function K(e) {
10
+ return function(t) {
11
+ if (Ue(t))
12
+ return t.lift(function(r) {
13
+ try {
14
+ return e(r, this);
15
+ } catch (n) {
16
+ this.error(n);
17
+ }
18
+ });
19
+ throw new TypeError("Unable to lift unknown Observable type");
20
+ };
21
+ }
1
22
  var Y = function(e, t) {
2
23
  return Y = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, n) {
3
24
  r.__proto__ = n;
@@ -5,7 +26,7 @@ var Y = function(e, t) {
5
26
  for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (r[i] = n[i]);
6
27
  }, Y(e, t);
7
28
  };
8
- function D(e, t) {
29
+ function F(e, t) {
9
30
  if (typeof t != "function" && t !== null)
10
31
  throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
11
32
  Y(e, t);
@@ -14,103 +35,103 @@ function D(e, t) {
14
35
  }
15
36
  e.prototype = t === null ? Object.create(t) : (r.prototype = t.prototype, new r());
16
37
  }
17
- var F = function() {
18
- return F = Object.assign || function(t) {
38
+ var L = function() {
39
+ return L = Object.assign || function(t) {
19
40
  for (var r, n = 1, i = arguments.length; n < i; n++) {
20
41
  r = arguments[n];
21
42
  for (var o in r) Object.prototype.hasOwnProperty.call(r, o) && (t[o] = r[o]);
22
43
  }
23
44
  return t;
24
- }, F.apply(this, arguments);
45
+ }, L.apply(this, arguments);
25
46
  };
26
- function $e(e, t, r, n) {
47
+ function ke(e, t, r, n) {
27
48
  function i(o) {
28
49
  return o instanceof r ? o : new r(function(u) {
29
50
  u(o);
30
51
  });
31
52
  }
32
53
  return new (r || (r = Promise))(function(o, u) {
33
- function a(f) {
54
+ function s(l) {
34
55
  try {
35
- s(n.next(f));
36
- } catch (d) {
37
- u(d);
56
+ a(n.next(l));
57
+ } catch (p) {
58
+ u(p);
38
59
  }
39
60
  }
40
- function c(f) {
61
+ function c(l) {
41
62
  try {
42
- s(n.throw(f));
43
- } catch (d) {
44
- u(d);
63
+ a(n.throw(l));
64
+ } catch (p) {
65
+ u(p);
45
66
  }
46
67
  }
47
- function s(f) {
48
- f.done ? o(f.value) : i(f.value).then(a, c);
68
+ function a(l) {
69
+ l.done ? o(l.value) : i(l.value).then(s, c);
49
70
  }
50
- s((n = n.apply(e, t || [])).next());
71
+ a((n = n.apply(e, t || [])).next());
51
72
  });
52
73
  }
53
- function Ee(e, t) {
74
+ function xe(e, t) {
54
75
  var r = { label: 0, sent: function() {
55
76
  if (o[0] & 1) throw o[1];
56
77
  return o[1];
57
78
  }, trys: [], ops: [] }, n, i, o, u = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
58
- return u.next = a(0), u.throw = a(1), u.return = a(2), typeof Symbol == "function" && (u[Symbol.iterator] = function() {
79
+ return u.next = s(0), u.throw = s(1), u.return = s(2), typeof Symbol == "function" && (u[Symbol.iterator] = function() {
59
80
  return this;
60
81
  }), u;
61
- function a(s) {
62
- return function(f) {
63
- return c([s, f]);
82
+ function s(a) {
83
+ return function(l) {
84
+ return c([a, l]);
64
85
  };
65
86
  }
66
- function c(s) {
87
+ function c(a) {
67
88
  if (n) throw new TypeError("Generator is already executing.");
68
- for (; u && (u = 0, s[0] && (r = 0)), r; ) try {
69
- if (n = 1, i && (o = s[0] & 2 ? i.return : s[0] ? i.throw || ((o = i.return) && o.call(i), 0) : i.next) && !(o = o.call(i, s[1])).done) return o;
70
- switch (i = 0, o && (s = [s[0] & 2, o.value]), s[0]) {
89
+ for (; u && (u = 0, a[0] && (r = 0)), r; ) try {
90
+ if (n = 1, i && (o = a[0] & 2 ? i.return : a[0] ? i.throw || ((o = i.return) && o.call(i), 0) : i.next) && !(o = o.call(i, a[1])).done) return o;
91
+ switch (i = 0, o && (a = [a[0] & 2, o.value]), a[0]) {
71
92
  case 0:
72
93
  case 1:
73
- o = s;
94
+ o = a;
74
95
  break;
75
96
  case 4:
76
- return r.label++, { value: s[1], done: !1 };
97
+ return r.label++, { value: a[1], done: !1 };
77
98
  case 5:
78
- r.label++, i = s[1], s = [0];
99
+ r.label++, i = a[1], a = [0];
79
100
  continue;
80
101
  case 7:
81
- s = r.ops.pop(), r.trys.pop();
102
+ a = r.ops.pop(), r.trys.pop();
82
103
  continue;
83
104
  default:
84
- if (o = r.trys, !(o = o.length > 0 && o[o.length - 1]) && (s[0] === 6 || s[0] === 2)) {
105
+ if (o = r.trys, !(o = o.length > 0 && o[o.length - 1]) && (a[0] === 6 || a[0] === 2)) {
85
106
  r = 0;
86
107
  continue;
87
108
  }
88
- if (s[0] === 3 && (!o || s[1] > o[0] && s[1] < o[3])) {
89
- r.label = s[1];
109
+ if (a[0] === 3 && (!o || a[1] > o[0] && a[1] < o[3])) {
110
+ r.label = a[1];
90
111
  break;
91
112
  }
92
- if (s[0] === 6 && r.label < o[1]) {
93
- r.label = o[1], o = s;
113
+ if (a[0] === 6 && r.label < o[1]) {
114
+ r.label = o[1], o = a;
94
115
  break;
95
116
  }
96
117
  if (o && r.label < o[2]) {
97
- r.label = o[2], r.ops.push(s);
118
+ r.label = o[2], r.ops.push(a);
98
119
  break;
99
120
  }
100
121
  o[2] && r.ops.pop(), r.trys.pop();
101
122
  continue;
102
123
  }
103
- s = t.call(e, r);
104
- } catch (f) {
105
- s = [6, f], i = 0;
124
+ a = t.call(e, r);
125
+ } catch (l) {
126
+ a = [6, l], i = 0;
106
127
  } finally {
107
128
  n = o = 0;
108
129
  }
109
- if (s[0] & 5) throw s[1];
110
- return { value: s[0] ? s[1] : void 0, done: !0 };
130
+ if (a[0] & 5) throw a[1];
131
+ return { value: a[0] ? a[1] : void 0, done: !0 };
111
132
  }
112
133
  }
113
- function B(e) {
134
+ function C(e) {
114
135
  var t = typeof Symbol == "function" && Symbol.iterator, r = t && e[t], n = 0;
115
136
  if (r) return r.call(e);
116
137
  if (e && typeof e.length == "number") return {
@@ -126,8 +147,8 @@ function J(e, t) {
126
147
  var n = r.call(e), i, o = [], u;
127
148
  try {
128
149
  for (; (t === void 0 || t-- > 0) && !(i = n.next()).done; ) o.push(i.value);
129
- } catch (a) {
130
- u = { error: a };
150
+ } catch (s) {
151
+ u = { error: s };
131
152
  } finally {
132
153
  try {
133
154
  i && !i.done && (r = n.return) && r.call(n);
@@ -137,81 +158,84 @@ function J(e, t) {
137
158
  }
138
159
  return o;
139
160
  }
140
- function Q(e, t, r) {
161
+ function N(e, t, r) {
141
162
  if (r || arguments.length === 2) for (var n = 0, i = t.length, o; n < i; n++)
142
163
  (o || !(n in t)) && (o || (o = Array.prototype.slice.call(t, 0, n)), o[n] = t[n]);
143
164
  return e.concat(o || Array.prototype.slice.call(t));
144
165
  }
145
- function k(e) {
146
- return this instanceof k ? (this.v = e, this) : new k(e);
166
+ function P(e) {
167
+ return this instanceof P ? (this.v = e, this) : new P(e);
147
168
  }
148
- function Xe(e, t, r) {
169
+ function Fe(e, t, r) {
149
170
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
150
171
  var n = r.apply(e, t || []), i, o = [];
151
- return i = Object.create((typeof AsyncIterator == "function" ? AsyncIterator : Object).prototype), a("next"), a("throw"), a("return", u), i[Symbol.asyncIterator] = function() {
172
+ return i = Object.create((typeof AsyncIterator == "function" ? AsyncIterator : Object).prototype), s("next"), s("throw"), s("return", u), i[Symbol.asyncIterator] = function() {
152
173
  return this;
153
174
  }, i;
154
- function u(l) {
175
+ function u(f) {
155
176
  return function(S) {
156
- return Promise.resolve(S).then(l, d);
177
+ return Promise.resolve(S).then(f, p);
157
178
  };
158
179
  }
159
- function a(l, S) {
160
- n[l] && (i[l] = function(h) {
161
- return new Promise(function(I, O) {
162
- o.push([l, h, I, O]) > 1 || c(l, h);
180
+ function s(f, S) {
181
+ n[f] && (i[f] = function(h) {
182
+ return new Promise(function(I, j) {
183
+ o.push([f, h, I, j]) > 1 || c(f, h);
163
184
  });
164
- }, S && (i[l] = S(i[l])));
185
+ }, S && (i[f] = S(i[f])));
165
186
  }
166
- function c(l, S) {
187
+ function c(f, S) {
167
188
  try {
168
- s(n[l](S));
189
+ a(n[f](S));
169
190
  } catch (h) {
170
191
  v(o[0][3], h);
171
192
  }
172
193
  }
173
- function s(l) {
174
- l.value instanceof k ? Promise.resolve(l.value.v).then(f, d) : v(o[0][2], l);
194
+ function a(f) {
195
+ f.value instanceof P ? Promise.resolve(f.value.v).then(l, p) : v(o[0][2], f);
175
196
  }
176
- function f(l) {
177
- c("next", l);
197
+ function l(f) {
198
+ c("next", f);
178
199
  }
179
- function d(l) {
180
- c("throw", l);
200
+ function p(f) {
201
+ c("throw", f);
181
202
  }
182
- function v(l, S) {
183
- l(S), o.shift(), o.length && c(o[0][0], o[0][1]);
203
+ function v(f, S) {
204
+ f(S), o.shift(), o.length && c(o[0][0], o[0][1]);
184
205
  }
185
206
  }
186
- function Ye(e) {
207
+ function He(e) {
187
208
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
188
209
  var t = e[Symbol.asyncIterator], r;
189
- return t ? t.call(e) : (e = typeof B == "function" ? B(e) : e[Symbol.iterator](), r = {}, n("next"), n("throw"), n("return"), r[Symbol.asyncIterator] = function() {
210
+ return t ? t.call(e) : (e = typeof C == "function" ? C(e) : e[Symbol.iterator](), r = {}, n("next"), n("throw"), n("return"), r[Symbol.asyncIterator] = function() {
190
211
  return this;
191
212
  }, r);
192
213
  function n(o) {
193
214
  r[o] = e[o] && function(u) {
194
- return new Promise(function(a, c) {
195
- u = e[o](u), i(a, c, u.done, u.value);
215
+ return new Promise(function(s, c) {
216
+ u = e[o](u), i(s, c, u.done, u.value);
196
217
  });
197
218
  };
198
219
  }
199
- function i(o, u, a, c) {
200
- Promise.resolve(c).then(function(s) {
201
- o({ value: s, done: a });
220
+ function i(o, u, s, c) {
221
+ Promise.resolve(c).then(function(a) {
222
+ o({ value: a, done: s });
202
223
  }, u);
203
224
  }
204
225
  }
205
- function b(e) {
206
- return typeof e == "function";
226
+ var De = (function(e) {
227
+ return e && typeof e.length == "number" && typeof e != "function";
228
+ });
229
+ function qe(e) {
230
+ return w(e?.then);
207
231
  }
208
- function te(e) {
232
+ function Z(e) {
209
233
  var t = function(n) {
210
234
  Error.call(n), n.stack = new Error().stack;
211
235
  }, r = e(t);
212
236
  return r.prototype = Object.create(Error.prototype), r.prototype.constructor = r, r;
213
237
  }
214
- var N = te(function(e) {
238
+ var M = Z(function(e) {
215
239
  return function(r) {
216
240
  e(this), this.message = r ? r.length + ` errors occurred during unsubscription:
217
241
  ` + r.map(function(n, i) {
@@ -220,13 +244,13 @@ var N = te(function(e) {
220
244
  `) : "", this.name = "UnsubscriptionError", this.errors = r;
221
245
  };
222
246
  });
223
- function K(e, t) {
247
+ function W(e, t) {
224
248
  if (e) {
225
249
  var r = e.indexOf(t);
226
250
  0 <= r && e.splice(r, 1);
227
251
  }
228
252
  }
229
- var G = (function() {
253
+ var B = (function() {
230
254
  function e(t) {
231
255
  this.initialTeardown = t, this.closed = !1, this._parentage = null, this._finalizers = null;
232
256
  }
@@ -238,58 +262,58 @@ var G = (function() {
238
262
  if (u)
239
263
  if (this._parentage = null, Array.isArray(u))
240
264
  try {
241
- for (var a = B(u), c = a.next(); !c.done; c = a.next()) {
242
- var s = c.value;
243
- s.remove(this);
265
+ for (var s = C(u), c = s.next(); !c.done; c = s.next()) {
266
+ var a = c.value;
267
+ a.remove(this);
244
268
  }
245
269
  } catch (h) {
246
270
  t = { error: h };
247
271
  } finally {
248
272
  try {
249
- c && !c.done && (r = a.return) && r.call(a);
273
+ c && !c.done && (r = s.return) && r.call(s);
250
274
  } finally {
251
275
  if (t) throw t.error;
252
276
  }
253
277
  }
254
278
  else
255
279
  u.remove(this);
256
- var f = this.initialTeardown;
257
- if (b(f))
280
+ var l = this.initialTeardown;
281
+ if (w(l))
258
282
  try {
259
- f();
283
+ l();
260
284
  } catch (h) {
261
- o = h instanceof N ? h.errors : [h];
285
+ o = h instanceof M ? h.errors : [h];
262
286
  }
263
- var d = this._finalizers;
264
- if (d) {
287
+ var p = this._finalizers;
288
+ if (p) {
265
289
  this._finalizers = null;
266
290
  try {
267
- for (var v = B(d), l = v.next(); !l.done; l = v.next()) {
268
- var S = l.value;
291
+ for (var v = C(p), f = v.next(); !f.done; f = v.next()) {
292
+ var S = f.value;
269
293
  try {
270
- ye(S);
294
+ de(S);
271
295
  } catch (h) {
272
- o = o ?? [], h instanceof N ? o = Q(Q([], J(o)), J(h.errors)) : o.push(h);
296
+ o = o ?? [], h instanceof M ? o = N(N([], J(o)), J(h.errors)) : o.push(h);
273
297
  }
274
298
  }
275
299
  } catch (h) {
276
300
  n = { error: h };
277
301
  } finally {
278
302
  try {
279
- l && !l.done && (i = v.return) && i.call(v);
303
+ f && !f.done && (i = v.return) && i.call(v);
280
304
  } finally {
281
305
  if (n) throw n.error;
282
306
  }
283
307
  }
284
308
  }
285
309
  if (o)
286
- throw new N(o);
310
+ throw new M(o);
287
311
  }
288
312
  }, e.prototype.add = function(t) {
289
313
  var r;
290
314
  if (t && t !== this)
291
315
  if (this.closed)
292
- ye(t);
316
+ de(t);
293
317
  else {
294
318
  if (t instanceof e) {
295
319
  if (t.closed || t._hasParent(this))
@@ -306,28 +330,28 @@ var G = (function() {
306
330
  this._parentage = Array.isArray(r) ? (r.push(t), r) : r ? [r, t] : t;
307
331
  }, e.prototype._removeParent = function(t) {
308
332
  var r = this._parentage;
309
- r === t ? this._parentage = null : Array.isArray(r) && K(r, t);
333
+ r === t ? this._parentage = null : Array.isArray(r) && W(r, t);
310
334
  }, e.prototype.remove = function(t) {
311
335
  var r = this._finalizers;
312
- r && K(r, t), t instanceof e && t._removeParent(this);
336
+ r && W(r, t), t instanceof e && t._removeParent(this);
313
337
  }, e.EMPTY = (function() {
314
338
  var t = new e();
315
339
  return t.closed = !0, t;
316
340
  })(), e;
317
- })(), ge = G.EMPTY;
318
- function _e(e) {
319
- return e instanceof G || e && "closed" in e && b(e.remove) && b(e.add) && b(e.unsubscribe);
341
+ })(), Te = B.EMPTY;
342
+ function Ee(e) {
343
+ return e instanceof B || e && "closed" in e && w(e.remove) && w(e.add) && w(e.unsubscribe);
320
344
  }
321
- function ye(e) {
322
- b(e) ? e() : e.unsubscribe();
345
+ function de(e) {
346
+ w(e) ? e() : e.unsubscribe();
323
347
  }
324
- var Je = {
348
+ var Be = {
325
349
  Promise: void 0
326
- }, Qe = {
350
+ }, Ge = {
327
351
  setTimeout: function(e, t) {
328
352
  for (var r = [], n = 2; n < arguments.length; n++)
329
353
  r[n - 2] = arguments[n];
330
- return setTimeout.apply(void 0, Q([e, t], J(r)));
354
+ return setTimeout.apply(void 0, N([e, t], J(r)));
331
355
  },
332
356
  clearTimeout: function(e) {
333
357
  return clearTimeout(e);
@@ -335,23 +359,23 @@ var Je = {
335
359
  delegate: void 0
336
360
  };
337
361
  function Oe(e) {
338
- Qe.setTimeout(function() {
362
+ Ge.setTimeout(function() {
339
363
  throw e;
340
364
  });
341
365
  }
342
- function me() {
366
+ function ve() {
343
367
  }
344
- function W(e) {
368
+ function q(e) {
345
369
  e();
346
370
  }
347
- var ne = (function(e) {
348
- D(t, e);
371
+ var ee = (function(e) {
372
+ F(t, e);
349
373
  function t(r) {
350
374
  var n = e.call(this) || this;
351
- return n.isStopped = !1, r ? (n.destination = r, _e(r) && r.add(n)) : n.destination = er, n;
375
+ return n.isStopped = !1, r ? (n.destination = r, Ee(r) && r.add(n)) : n.destination = $e, n;
352
376
  }
353
377
  return t.create = function(r, n, i) {
354
- return new Z(r, n, i);
378
+ return new Q(r, n, i);
355
379
  }, t.prototype.next = function(r) {
356
380
  this.isStopped || this._next(r);
357
381
  }, t.prototype.error = function(r) {
@@ -375,7 +399,7 @@ var ne = (function(e) {
375
399
  this.unsubscribe();
376
400
  }
377
401
  }, t;
378
- })(G), Ke = (function() {
402
+ })(B), Me = (function() {
379
403
  function e(t) {
380
404
  this.partialObserver = t;
381
405
  }
@@ -385,7 +409,7 @@ var ne = (function(e) {
385
409
  try {
386
410
  r.next(t);
387
411
  } catch (n) {
388
- q(n);
412
+ H(n);
389
413
  }
390
414
  }, e.prototype.error = function(t) {
391
415
  var r = this.partialObserver;
@@ -393,56 +417,56 @@ var ne = (function(e) {
393
417
  try {
394
418
  r.error(t);
395
419
  } catch (n) {
396
- q(n);
420
+ H(n);
397
421
  }
398
422
  else
399
- q(t);
423
+ H(t);
400
424
  }, e.prototype.complete = function() {
401
425
  var t = this.partialObserver;
402
426
  if (t.complete)
403
427
  try {
404
428
  t.complete();
405
429
  } catch (r) {
406
- q(r);
430
+ H(r);
407
431
  }
408
432
  }, e;
409
- })(), Z = (function(e) {
410
- D(t, e);
433
+ })(), Q = (function(e) {
434
+ F(t, e);
411
435
  function t(r, n, i) {
412
436
  var o = e.call(this) || this, u;
413
- return b(r) || !r ? u = {
437
+ return w(r) || !r ? u = {
414
438
  next: r ?? void 0,
415
439
  error: n ?? void 0,
416
440
  complete: i ?? void 0
417
- } : u = r, o.destination = new Ke(u), o;
441
+ } : u = r, o.destination = new Me(u), o;
418
442
  }
419
443
  return t;
420
- })(ne);
421
- function q(e) {
444
+ })(ee);
445
+ function H(e) {
422
446
  Oe(e);
423
447
  }
424
- function Ze(e) {
448
+ function Xe(e) {
425
449
  throw e;
426
450
  }
427
- var er = {
451
+ var $e = {
428
452
  closed: !0,
429
- next: me,
430
- error: Ze,
431
- complete: me
432
- }, oe = (function() {
453
+ next: ve,
454
+ error: Xe,
455
+ complete: ve
456
+ }, re = (function() {
433
457
  return typeof Symbol == "function" && Symbol.observable || "@@observable";
434
458
  })();
435
- function rr(e) {
459
+ function ze(e) {
436
460
  return e;
437
461
  }
438
- function tr(e) {
439
- return e.length === 0 ? rr : e.length === 1 ? e[0] : function(r) {
462
+ function Ve(e) {
463
+ return e.length === 0 ? ze : e.length === 1 ? e[0] : function(r) {
440
464
  return e.reduce(function(n, i) {
441
465
  return i(n);
442
466
  }, r);
443
467
  };
444
468
  }
445
- var T = (function() {
469
+ var g = (function() {
446
470
  function e(t) {
447
471
  t && (this._subscribe = t);
448
472
  }
@@ -450,10 +474,10 @@ var T = (function() {
450
474
  var r = new e();
451
475
  return r.source = this, r.operator = t, r;
452
476
  }, e.prototype.subscribe = function(t, r, n) {
453
- var i = this, o = or(t) ? t : new Z(t, r, n);
454
- return W(function() {
455
- var u = i, a = u.operator, c = u.source;
456
- o.add(a ? a.call(o, c) : c ? i._subscribe(o) : i._trySubscribe(o));
477
+ var i = this, o = Je(t) ? t : new Q(t, r, n);
478
+ return q(function() {
479
+ var u = i, s = u.operator, c = u.source;
480
+ o.add(s ? s.call(o, c) : c ? i._subscribe(o) : i._trySubscribe(o));
457
481
  }), o;
458
482
  }, e.prototype._trySubscribe = function(t) {
459
483
  try {
@@ -463,11 +487,11 @@ var T = (function() {
463
487
  }
464
488
  }, e.prototype.forEach = function(t, r) {
465
489
  var n = this;
466
- return r = be(r), new r(function(i, o) {
467
- var u = new Z({
468
- next: function(a) {
490
+ return r = ye(r), new r(function(i, o) {
491
+ var u = new Q({
492
+ next: function(s) {
469
493
  try {
470
- t(a);
494
+ t(s);
471
495
  } catch (c) {
472
496
  o(c), u.unsubscribe();
473
497
  }
@@ -480,15 +504,15 @@ var T = (function() {
480
504
  }, e.prototype._subscribe = function(t) {
481
505
  var r;
482
506
  return (r = this.source) === null || r === void 0 ? void 0 : r.subscribe(t);
483
- }, e.prototype[oe] = function() {
507
+ }, e.prototype[re] = function() {
484
508
  return this;
485
509
  }, e.prototype.pipe = function() {
486
510
  for (var t = [], r = 0; r < arguments.length; r++)
487
511
  t[r] = arguments[r];
488
- return tr(t)(this);
512
+ return Ve(t)(this);
489
513
  }, e.prototype.toPromise = function(t) {
490
514
  var r = this;
491
- return t = be(t), new t(function(n, i) {
515
+ return t = ye(t), new t(function(n, i) {
492
516
  var o;
493
517
  r.subscribe(function(u) {
494
518
  return o = u;
@@ -502,249 +526,49 @@ var T = (function() {
502
526
  return new e(t);
503
527
  }, e;
504
528
  })();
505
- function be(e) {
529
+ function ye(e) {
506
530
  var t;
507
- return (t = e ?? Je.Promise) !== null && t !== void 0 ? t : Promise;
508
- }
509
- function nr(e) {
510
- return e && b(e.next) && b(e.error) && b(e.complete);
511
- }
512
- function or(e) {
513
- return e && e instanceof ne || nr(e) && _e(e);
514
- }
515
- function ir(e) {
516
- return b(e?.lift);
517
- }
518
- function L(e) {
519
- return function(t) {
520
- if (ir(t))
521
- return t.lift(function(r) {
522
- try {
523
- return e(r, this);
524
- } catch (n) {
525
- this.error(n);
526
- }
527
- });
528
- throw new TypeError("Unable to lift unknown Observable type");
529
- };
530
- }
531
- function j(e, t, r, n, i) {
532
- return new ur(e, t, r, n, i);
533
- }
534
- var ur = (function(e) {
535
- D(t, e);
536
- function t(r, n, i, o, u, a) {
537
- var c = e.call(this, r) || this;
538
- return c.onFinalize = u, c.shouldUnsubscribe = a, c._next = n ? function(s) {
539
- try {
540
- n(s);
541
- } catch (f) {
542
- r.error(f);
543
- }
544
- } : e.prototype._next, c._error = o ? function(s) {
545
- try {
546
- o(s);
547
- } catch (f) {
548
- r.error(f);
549
- } finally {
550
- this.unsubscribe();
551
- }
552
- } : e.prototype._error, c._complete = i ? function() {
553
- try {
554
- i();
555
- } catch (s) {
556
- r.error(s);
557
- } finally {
558
- this.unsubscribe();
559
- }
560
- } : e.prototype._complete, c;
561
- }
562
- return t.prototype.unsubscribe = function() {
563
- var r;
564
- if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {
565
- var n = this.closed;
566
- e.prototype.unsubscribe.call(this), !n && ((r = this.onFinalize) === null || r === void 0 || r.call(this));
567
- }
568
- }, t;
569
- })(ne), ar = te(function(e) {
570
- return function() {
571
- e(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
572
- };
573
- }), ie = (function(e) {
574
- D(t, e);
575
- function t() {
576
- var r = e.call(this) || this;
577
- return r.closed = !1, r.currentObservers = null, r.observers = [], r.isStopped = !1, r.hasError = !1, r.thrownError = null, r;
578
- }
579
- return t.prototype.lift = function(r) {
580
- var n = new we(this, this);
581
- return n.operator = r, n;
582
- }, t.prototype._throwIfClosed = function() {
583
- if (this.closed)
584
- throw new ar();
585
- }, t.prototype.next = function(r) {
586
- var n = this;
587
- W(function() {
588
- var i, o;
589
- if (n._throwIfClosed(), !n.isStopped) {
590
- n.currentObservers || (n.currentObservers = Array.from(n.observers));
591
- try {
592
- for (var u = B(n.currentObservers), a = u.next(); !a.done; a = u.next()) {
593
- var c = a.value;
594
- c.next(r);
595
- }
596
- } catch (s) {
597
- i = { error: s };
598
- } finally {
599
- try {
600
- a && !a.done && (o = u.return) && o.call(u);
601
- } finally {
602
- if (i) throw i.error;
603
- }
604
- }
605
- }
606
- });
607
- }, t.prototype.error = function(r) {
608
- var n = this;
609
- W(function() {
610
- if (n._throwIfClosed(), !n.isStopped) {
611
- n.hasError = n.isStopped = !0, n.thrownError = r;
612
- for (var i = n.observers; i.length; )
613
- i.shift().error(r);
614
- }
615
- });
616
- }, t.prototype.complete = function() {
617
- var r = this;
618
- W(function() {
619
- if (r._throwIfClosed(), !r.isStopped) {
620
- r.isStopped = !0;
621
- for (var n = r.observers; n.length; )
622
- n.shift().complete();
623
- }
624
- });
625
- }, t.prototype.unsubscribe = function() {
626
- this.isStopped = this.closed = !0, this.observers = this.currentObservers = null;
627
- }, Object.defineProperty(t.prototype, "observed", {
628
- get: function() {
629
- var r;
630
- return ((r = this.observers) === null || r === void 0 ? void 0 : r.length) > 0;
631
- },
632
- enumerable: !1,
633
- configurable: !0
634
- }), t.prototype._trySubscribe = function(r) {
635
- return this._throwIfClosed(), e.prototype._trySubscribe.call(this, r);
636
- }, t.prototype._subscribe = function(r) {
637
- return this._throwIfClosed(), this._checkFinalizedStatuses(r), this._innerSubscribe(r);
638
- }, t.prototype._innerSubscribe = function(r) {
639
- var n = this, i = this, o = i.hasError, u = i.isStopped, a = i.observers;
640
- return o || u ? ge : (this.currentObservers = null, a.push(r), new G(function() {
641
- n.currentObservers = null, K(a, r);
642
- }));
643
- }, t.prototype._checkFinalizedStatuses = function(r) {
644
- var n = this, i = n.hasError, o = n.thrownError, u = n.isStopped;
645
- i ? r.error(o) : u && r.complete();
646
- }, t.prototype.asObservable = function() {
647
- var r = new T();
648
- return r.source = this, r;
649
- }, t.create = function(r, n) {
650
- return new we(r, n);
651
- }, t;
652
- })(T), we = (function(e) {
653
- D(t, e);
654
- function t(r, n) {
655
- var i = e.call(this) || this;
656
- return i.destination = r, i.source = n, i;
657
- }
658
- return t.prototype.next = function(r) {
659
- var n, i;
660
- (i = (n = this.destination) === null || n === void 0 ? void 0 : n.next) === null || i === void 0 || i.call(n, r);
661
- }, t.prototype.error = function(r) {
662
- var n, i;
663
- (i = (n = this.destination) === null || n === void 0 ? void 0 : n.error) === null || i === void 0 || i.call(n, r);
664
- }, t.prototype.complete = function() {
665
- var r, n;
666
- (n = (r = this.destination) === null || r === void 0 ? void 0 : r.complete) === null || n === void 0 || n.call(r);
667
- }, t.prototype._subscribe = function(r) {
668
- var n, i;
669
- return (i = (n = this.source) === null || n === void 0 ? void 0 : n.subscribe(r)) !== null && i !== void 0 ? i : ge;
670
- }, t;
671
- })(ie), Ae = {
672
- now: function() {
673
- return (Ae.delegate || Date).now();
674
- },
675
- delegate: void 0
676
- }, sr = (function(e) {
677
- D(t, e);
678
- function t(r, n, i) {
679
- r === void 0 && (r = 1 / 0), n === void 0 && (n = 1 / 0), i === void 0 && (i = Ae);
680
- var o = e.call(this) || this;
681
- return o._bufferSize = r, o._windowTime = n, o._timestampProvider = i, o._buffer = [], o._infiniteTimeWindow = !0, o._infiniteTimeWindow = n === 1 / 0, o._bufferSize = Math.max(1, r), o._windowTime = Math.max(1, n), o;
682
- }
683
- return t.prototype.next = function(r) {
684
- var n = this, i = n.isStopped, o = n._buffer, u = n._infiniteTimeWindow, a = n._timestampProvider, c = n._windowTime;
685
- i || (o.push(r), !u && o.push(a.now() + c)), this._trimBuffer(), e.prototype.next.call(this, r);
686
- }, t.prototype._subscribe = function(r) {
687
- this._throwIfClosed(), this._trimBuffer();
688
- for (var n = this._innerSubscribe(r), i = this, o = i._infiniteTimeWindow, u = i._buffer, a = u.slice(), c = 0; c < a.length && !r.closed; c += o ? 1 : 2)
689
- r.next(a[c]);
690
- return this._checkFinalizedStatuses(r), n;
691
- }, t.prototype._trimBuffer = function() {
692
- var r = this, n = r._bufferSize, i = r._timestampProvider, o = r._buffer, u = r._infiniteTimeWindow, a = (u ? 1 : 2) * n;
693
- if (n < 1 / 0 && a < o.length && o.splice(0, o.length - a), !u) {
694
- for (var c = i.now(), s = 0, f = 1; f < o.length && o[f] <= c; f += 2)
695
- s = f;
696
- s && o.splice(0, s + 1);
697
- }
698
- }, t;
699
- })(ie);
700
- function cr(e) {
701
- return e && b(e.schedule);
702
- }
703
- function fr(e) {
704
- return e[e.length - 1];
531
+ return (t = e ?? Be.Promise) !== null && t !== void 0 ? t : Promise;
705
532
  }
706
- function lr(e) {
707
- return cr(fr(e)) ? e.pop() : void 0;
533
+ function Ye(e) {
534
+ return e && w(e.next) && w(e.error) && w(e.complete);
708
535
  }
709
- var je = (function(e) {
710
- return e && typeof e.length == "number" && typeof e != "function";
711
- });
712
- function Ie(e) {
713
- return b(e?.then);
536
+ function Je(e) {
537
+ return e && e instanceof ee || Ye(e) && Ee(e);
714
538
  }
715
- function Pe(e) {
716
- return b(e[oe]);
539
+ function Ne(e) {
540
+ return w(e[re]);
717
541
  }
718
- function Re(e) {
719
- return Symbol.asyncIterator && b(e?.[Symbol.asyncIterator]);
542
+ function We(e) {
543
+ return Symbol.asyncIterator && w(e?.[Symbol.asyncIterator]);
720
544
  }
721
- function Ce(e) {
545
+ function Qe(e) {
722
546
  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.");
723
547
  }
724
- function dr() {
548
+ function Ke() {
725
549
  return typeof Symbol != "function" || !Symbol.iterator ? "@@iterator" : Symbol.iterator;
726
550
  }
727
- var Le = dr();
728
- function Ue(e) {
729
- return b(e?.[Le]);
551
+ var Ze = Ke();
552
+ function er(e) {
553
+ return w(e?.[Ze]);
730
554
  }
731
- function ke(e) {
732
- return Xe(this, arguments, function() {
555
+ function rr(e) {
556
+ return Fe(this, arguments, function() {
733
557
  var r, n, i, o;
734
- return Ee(this, function(u) {
558
+ return xe(this, function(u) {
735
559
  switch (u.label) {
736
560
  case 0:
737
561
  r = e.getReader(), u.label = 1;
738
562
  case 1:
739
563
  u.trys.push([1, , 9, 10]), u.label = 2;
740
564
  case 2:
741
- return [4, k(r.read())];
565
+ return [4, P(r.read())];
742
566
  case 3:
743
- return n = u.sent(), i = n.value, o = n.done, o ? [4, k(void 0)] : [3, 5];
567
+ return n = u.sent(), i = n.value, o = n.done, o ? [4, P(void 0)] : [3, 5];
744
568
  case 4:
745
569
  return [2, u.sent()];
746
570
  case 5:
747
- return [4, k(i)];
571
+ return [4, P(i)];
748
572
  case 6:
749
573
  return [4, u.sent()];
750
574
  case 7:
@@ -759,45 +583,45 @@ function ke(e) {
759
583
  });
760
584
  });
761
585
  }
762
- function Be(e) {
763
- return b(e?.getReader);
586
+ function tr(e) {
587
+ return w(e?.getReader);
764
588
  }
765
- function U(e) {
766
- if (e instanceof T)
589
+ function te(e) {
590
+ if (e instanceof g)
767
591
  return e;
768
592
  if (e != null) {
769
- if (Pe(e))
770
- return hr(e);
771
- if (je(e))
772
- return pr(e);
773
- if (Ie(e))
774
- return vr(e);
775
- if (Re(e))
776
- return De(e);
777
- if (Ue(e))
778
- return yr(e);
779
- if (Be(e))
780
- return mr(e);
593
+ if (Ne(e))
594
+ return nr(e);
595
+ if (De(e))
596
+ return or(e);
597
+ if (qe(e))
598
+ return ir(e);
599
+ if (We(e))
600
+ return ge(e);
601
+ if (er(e))
602
+ return ur(e);
603
+ if (tr(e))
604
+ return ar(e);
781
605
  }
782
- throw Ce(e);
606
+ throw Qe(e);
783
607
  }
784
- function hr(e) {
785
- return new T(function(t) {
786
- var r = e[oe]();
787
- if (b(r.subscribe))
608
+ function nr(e) {
609
+ return new g(function(t) {
610
+ var r = e[re]();
611
+ if (w(r.subscribe))
788
612
  return r.subscribe(t);
789
613
  throw new TypeError("Provided object does not correctly implement Symbol.observable");
790
614
  });
791
615
  }
792
- function pr(e) {
793
- return new T(function(t) {
616
+ function or(e) {
617
+ return new g(function(t) {
794
618
  for (var r = 0; r < e.length && !t.closed; r++)
795
619
  t.next(e[r]);
796
620
  t.complete();
797
621
  });
798
622
  }
799
- function vr(e) {
800
- return new T(function(t) {
623
+ function ir(e) {
624
+ return new g(function(t) {
801
625
  e.then(function(r) {
802
626
  t.closed || (t.next(r), t.complete());
803
627
  }, function(r) {
@@ -805,17 +629,17 @@ function vr(e) {
805
629
  }).then(null, Oe);
806
630
  });
807
631
  }
808
- function yr(e) {
809
- return new T(function(t) {
632
+ function ur(e) {
633
+ return new g(function(t) {
810
634
  var r, n;
811
635
  try {
812
- for (var i = B(e), o = i.next(); !o.done; o = i.next()) {
636
+ for (var i = C(e), o = i.next(); !o.done; o = i.next()) {
813
637
  var u = o.value;
814
638
  if (t.next(u), t.closed)
815
639
  return;
816
640
  }
817
- } catch (a) {
818
- r = { error: a };
641
+ } catch (s) {
642
+ r = { error: s };
819
643
  } finally {
820
644
  try {
821
645
  o && !o.done && (n = i.return) && n.call(i);
@@ -826,24 +650,24 @@ function yr(e) {
826
650
  t.complete();
827
651
  });
828
652
  }
829
- function De(e) {
830
- return new T(function(t) {
831
- br(e, t).catch(function(r) {
653
+ function ge(e) {
654
+ return new g(function(t) {
655
+ sr(e, t).catch(function(r) {
832
656
  return t.error(r);
833
657
  });
834
658
  });
835
659
  }
836
- function mr(e) {
837
- return De(ke(e));
660
+ function ar(e) {
661
+ return ge(rr(e));
838
662
  }
839
- function br(e, t) {
663
+ function sr(e, t) {
840
664
  var r, n, i, o;
841
- return $e(this, void 0, void 0, function() {
842
- var u, a;
843
- return Ee(this, function(c) {
665
+ return ke(this, void 0, void 0, function() {
666
+ var u, s;
667
+ return xe(this, function(c) {
844
668
  switch (c.label) {
845
669
  case 0:
846
- c.trys.push([0, 5, 6, 11]), r = Ye(e), c.label = 1;
670
+ c.trys.push([0, 5, 6, 11]), r = He(e), c.label = 1;
847
671
  case 1:
848
672
  return [4, r.next()];
849
673
  case 2:
@@ -856,7 +680,7 @@ function br(e, t) {
856
680
  case 4:
857
681
  return [3, 11];
858
682
  case 5:
859
- return a = c.sent(), i = { error: a }, [3, 11];
683
+ return s = c.sent(), i = { error: s }, [3, 11];
860
684
  case 6:
861
685
  return c.trys.push([6, , 9, 10]), n && !n.done && (o = r.return) ? [4, o.call(r)] : [3, 8];
862
686
  case 7:
@@ -874,212 +698,216 @@ function br(e, t) {
874
698
  });
875
699
  });
876
700
  }
877
- function C(e, t, r, n, i) {
878
- n === void 0 && (n = 0), i === void 0 && (i = !1);
879
- var o = t.schedule(function() {
880
- r(), i ? e.add(this.schedule(null, n)) : this.unsubscribe();
881
- }, n);
882
- if (e.add(o), !i)
883
- return o;
884
- }
885
- function Fe(e, t) {
886
- return t === void 0 && (t = 0), L(function(r, n) {
887
- r.subscribe(j(n, function(i) {
888
- return C(n, e, function() {
889
- return n.next(i);
890
- }, t);
891
- }, function() {
892
- return C(n, e, function() {
893
- return n.complete();
894
- }, t);
895
- }, function(i) {
896
- return C(n, e, function() {
897
- return n.error(i);
898
- }, t);
899
- }));
900
- });
901
- }
902
- function He(e, t) {
903
- return t === void 0 && (t = 0), L(function(r, n) {
904
- n.add(e.schedule(function() {
905
- return r.subscribe(n);
906
- }, t));
907
- });
908
- }
909
- function wr(e, t) {
910
- return U(e).pipe(He(t), Fe(t));
911
- }
912
- function Sr(e, t) {
913
- return U(e).pipe(He(t), Fe(t));
914
- }
915
- function xr(e, t) {
916
- return new T(function(r) {
917
- var n = 0;
918
- return t.schedule(function() {
919
- n === e.length ? r.complete() : (r.next(e[n++]), r.closed || this.schedule());
920
- });
921
- });
922
- }
923
- function Tr(e, t) {
924
- return new T(function(r) {
925
- var n;
926
- return C(r, t, function() {
927
- n = e[Le](), C(r, t, function() {
928
- var i, o, u;
929
- try {
930
- i = n.next(), o = i.value, u = i.done;
931
- } catch (a) {
932
- r.error(a);
933
- return;
934
- }
935
- u ? r.complete() : r.next(o);
936
- }, 0, !0);
937
- }), function() {
938
- return b(n?.return) && n.return();
939
- };
940
- });
941
- }
942
- function Me(e, t) {
943
- if (!e)
944
- throw new Error("Iterable cannot be null");
945
- return new T(function(r) {
946
- C(r, t, function() {
947
- var n = e[Symbol.asyncIterator]();
948
- C(r, t, function() {
949
- n.next().then(function(i) {
950
- i.done ? r.complete() : r.next(i.value);
951
- });
952
- }, 0, !0);
953
- });
954
- });
955
- }
956
- function Er(e, t) {
957
- return Me(ke(e), t);
701
+ function U(e, t, r, n, i) {
702
+ return new cr(e, t, r, n, i);
958
703
  }
959
- function gr(e, t) {
960
- if (e != null) {
961
- if (Pe(e))
962
- return wr(e, t);
963
- if (je(e))
964
- return xr(e, t);
965
- if (Ie(e))
966
- return Sr(e, t);
967
- if (Re(e))
968
- return Me(e, t);
969
- if (Ue(e))
970
- return Tr(e, t);
971
- if (Be(e))
972
- return Er(e, t);
704
+ var cr = (function(e) {
705
+ F(t, e);
706
+ function t(r, n, i, o, u, s) {
707
+ var c = e.call(this, r) || this;
708
+ return c.onFinalize = u, c.shouldUnsubscribe = s, c._next = n ? function(a) {
709
+ try {
710
+ n(a);
711
+ } catch (l) {
712
+ r.error(l);
713
+ }
714
+ } : e.prototype._next, c._error = o ? function(a) {
715
+ try {
716
+ o(a);
717
+ } catch (l) {
718
+ r.error(l);
719
+ } finally {
720
+ this.unsubscribe();
721
+ }
722
+ } : e.prototype._error, c._complete = i ? function() {
723
+ try {
724
+ i();
725
+ } catch (a) {
726
+ r.error(a);
727
+ } finally {
728
+ this.unsubscribe();
729
+ }
730
+ } : e.prototype._complete, c;
973
731
  }
974
- throw Ce(e);
975
- }
976
- function H(e, t) {
977
- return t ? gr(e, t) : U(e);
978
- }
979
- function ee() {
980
- for (var e = [], t = 0; t < arguments.length; t++)
981
- e[t] = arguments[t];
982
- var r = lr(e);
983
- return H(e, r);
984
- }
985
- function Se(e, t) {
986
- var r = b(e) ? e : function() {
987
- return e;
988
- }, n = function(i) {
989
- return i.error(r());
990
- };
991
- return new T(n);
992
- }
993
- function g(e, t) {
994
- return L(function(r, n) {
732
+ return t.prototype.unsubscribe = function() {
733
+ var r;
734
+ if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {
735
+ var n = this.closed;
736
+ e.prototype.unsubscribe.call(this), !n && ((r = this.onFinalize) === null || r === void 0 || r.call(this));
737
+ }
738
+ }, t;
739
+ })(ee);
740
+ function E(e, t) {
741
+ return K(function(r, n) {
995
742
  var i = 0;
996
- r.subscribe(j(n, function(o) {
743
+ r.subscribe(U(n, function(o) {
997
744
  n.next(e.call(t, o, i++));
998
745
  }));
999
746
  });
1000
747
  }
1001
- function _r(e, t, r, n, i, o, u, a) {
1002
- var c = [], s = 0, f = 0, d = !1, v = function() {
1003
- d && !c.length && !s && t.complete();
1004
- }, l = function(h) {
1005
- return s < n ? S(h) : c.push(h);
748
+ function fr(e, t, r, n, i, o, u, s) {
749
+ var c = [], a = 0, l = 0, p = !1, v = function() {
750
+ p && !c.length && !a && t.complete();
751
+ }, f = function(h) {
752
+ return a < n ? S(h) : c.push(h);
1006
753
  }, S = function(h) {
1007
- s++;
754
+ a++;
1008
755
  var I = !1;
1009
- U(r(h, f++)).subscribe(j(t, function(O) {
1010
- t.next(O);
756
+ te(r(h, l++)).subscribe(U(t, function(j) {
757
+ t.next(j);
1011
758
  }, function() {
1012
759
  I = !0;
1013
760
  }, void 0, function() {
1014
761
  if (I)
1015
762
  try {
1016
- s--;
1017
- for (var O = function() {
1018
- var P = c.shift();
1019
- u || S(P);
1020
- }; c.length && s < n; )
1021
- O();
763
+ a--;
764
+ for (var j = function() {
765
+ var R = c.shift();
766
+ u || S(R);
767
+ }; c.length && a < n; )
768
+ j();
1022
769
  v();
1023
- } catch (P) {
1024
- t.error(P);
770
+ } catch (R) {
771
+ t.error(R);
1025
772
  }
1026
773
  }));
1027
774
  };
1028
- return e.subscribe(j(t, l, function() {
1029
- d = !0, v();
775
+ return e.subscribe(U(t, f, function() {
776
+ p = !0, v();
1030
777
  })), function() {
1031
778
  };
1032
779
  }
1033
780
  function A(e, t, r) {
1034
- return r === void 0 && (r = 1 / 0), b(t) ? A(function(n, i) {
1035
- return g(function(o, u) {
781
+ return r === void 0 && (r = 1 / 0), w(t) ? A(function(n, i) {
782
+ return E(function(o, u) {
1036
783
  return t(n, o, i, u);
1037
- })(U(e(n, i)));
1038
- }, r) : (typeof t == "number" && (r = t), L(function(n, i) {
1039
- return _r(n, i, e, r);
784
+ })(te(e(n, i)));
785
+ }, r) : (typeof t == "number" && (r = t), K(function(n, i) {
786
+ return fr(n, i, e, r);
1040
787
  }));
1041
788
  }
1042
- function qe(e) {
1043
- return L(function(t, r) {
1044
- var n = null, i = !1, o;
1045
- n = t.subscribe(j(r, void 0, void 0, function(u) {
1046
- o = U(e(u, qe(e)(t))), n ? (n.unsubscribe(), n = null, o.subscribe(r)) : i = !0;
1047
- })), i && (n.unsubscribe(), n = null, o.subscribe(r));
1048
- });
789
+ function lr(e, t) {
790
+ return w(t) ? A(e, t, 1) : A(e, 1);
1049
791
  }
1050
- function Or(e, t, r, n, i) {
1051
- return function(o, u) {
1052
- var a = r, c = t, s = 0;
1053
- o.subscribe(j(u, function(f) {
1054
- var d = s++;
1055
- c = a ? e(c, f, d) : (a = !0, f);
1056
- }, (function() {
1057
- a && u.next(c), u.complete();
1058
- })));
792
+ var pr = Z(function(e) {
793
+ return function() {
794
+ e(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
1059
795
  };
1060
- }
1061
- function We(e, t) {
1062
- return L(Or(e, t, arguments.length >= 2, !1, !0));
1063
- }
1064
- function Ar(e, t) {
1065
- return b(t) ? A(e, t, 1) : A(e, 1);
1066
- }
1067
- function jr(e) {
1068
- return L(function(t, r) {
796
+ }), je = (function(e) {
797
+ F(t, e);
798
+ function t() {
799
+ var r = e.call(this) || this;
800
+ return r.closed = !1, r.currentObservers = null, r.observers = [], r.isStopped = !1, r.hasError = !1, r.thrownError = null, r;
801
+ }
802
+ return t.prototype.lift = function(r) {
803
+ var n = new me(this, this);
804
+ return n.operator = r, n;
805
+ }, t.prototype._throwIfClosed = function() {
806
+ if (this.closed)
807
+ throw new pr();
808
+ }, t.prototype.next = function(r) {
809
+ var n = this;
810
+ q(function() {
811
+ var i, o;
812
+ if (n._throwIfClosed(), !n.isStopped) {
813
+ n.currentObservers || (n.currentObservers = Array.from(n.observers));
814
+ try {
815
+ for (var u = C(n.currentObservers), s = u.next(); !s.done; s = u.next()) {
816
+ var c = s.value;
817
+ c.next(r);
818
+ }
819
+ } catch (a) {
820
+ i = { error: a };
821
+ } finally {
822
+ try {
823
+ s && !s.done && (o = u.return) && o.call(u);
824
+ } finally {
825
+ if (i) throw i.error;
826
+ }
827
+ }
828
+ }
829
+ });
830
+ }, t.prototype.error = function(r) {
831
+ var n = this;
832
+ q(function() {
833
+ if (n._throwIfClosed(), !n.isStopped) {
834
+ n.hasError = n.isStopped = !0, n.thrownError = r;
835
+ for (var i = n.observers; i.length; )
836
+ i.shift().error(r);
837
+ }
838
+ });
839
+ }, t.prototype.complete = function() {
840
+ var r = this;
841
+ q(function() {
842
+ if (r._throwIfClosed(), !r.isStopped) {
843
+ r.isStopped = !0;
844
+ for (var n = r.observers; n.length; )
845
+ n.shift().complete();
846
+ }
847
+ });
848
+ }, t.prototype.unsubscribe = function() {
849
+ this.isStopped = this.closed = !0, this.observers = this.currentObservers = null;
850
+ }, Object.defineProperty(t.prototype, "observed", {
851
+ get: function() {
852
+ var r;
853
+ return ((r = this.observers) === null || r === void 0 ? void 0 : r.length) > 0;
854
+ },
855
+ enumerable: !1,
856
+ configurable: !0
857
+ }), t.prototype._trySubscribe = function(r) {
858
+ return this._throwIfClosed(), e.prototype._trySubscribe.call(this, r);
859
+ }, t.prototype._subscribe = function(r) {
860
+ return this._throwIfClosed(), this._checkFinalizedStatuses(r), this._innerSubscribe(r);
861
+ }, t.prototype._innerSubscribe = function(r) {
862
+ var n = this, i = this, o = i.hasError, u = i.isStopped, s = i.observers;
863
+ return o || u ? Te : (this.currentObservers = null, s.push(r), new B(function() {
864
+ n.currentObservers = null, W(s, r);
865
+ }));
866
+ }, t.prototype._checkFinalizedStatuses = function(r) {
867
+ var n = this, i = n.hasError, o = n.thrownError, u = n.isStopped;
868
+ i ? r.error(o) : u && r.complete();
869
+ }, t.prototype.asObservable = function() {
870
+ var r = new g();
871
+ return r.source = this, r;
872
+ }, t.create = function(r, n) {
873
+ return new me(r, n);
874
+ }, t;
875
+ })(g), me = (function(e) {
876
+ F(t, e);
877
+ function t(r, n) {
878
+ var i = e.call(this) || this;
879
+ return i.destination = r, i.source = n, i;
880
+ }
881
+ return t.prototype.next = function(r) {
882
+ var n, i;
883
+ (i = (n = this.destination) === null || n === void 0 ? void 0 : n.next) === null || i === void 0 || i.call(n, r);
884
+ }, t.prototype.error = function(r) {
885
+ var n, i;
886
+ (i = (n = this.destination) === null || n === void 0 ? void 0 : n.error) === null || i === void 0 || i.call(n, r);
887
+ }, t.prototype.complete = function() {
888
+ var r, n;
889
+ (n = (r = this.destination) === null || r === void 0 ? void 0 : r.complete) === null || n === void 0 || n.call(r);
890
+ }, t.prototype._subscribe = function(r) {
891
+ var n, i;
892
+ return (i = (n = this.source) === null || n === void 0 ? void 0 : n.subscribe(r)) !== null && i !== void 0 ? i : Te;
893
+ }, t;
894
+ })(je);
895
+ function hr(e) {
896
+ return K(function(t, r) {
1069
897
  var n, i = !1, o, u = function() {
1070
- n = t.subscribe(j(r, void 0, void 0, function(a) {
1071
- o || (o = new ie(), U(e(o)).subscribe(j(r, function() {
898
+ n = t.subscribe(U(r, void 0, void 0, function(s) {
899
+ o || (o = new je(), te(e(o)).subscribe(U(r, function() {
1072
900
  return n ? u() : i = !0;
1073
- }))), o && o.next(a);
901
+ }))), o && o.next(s);
1074
902
  })), i && (n.unsubscribe(), n = null, i = !1, u());
1075
903
  };
1076
904
  u();
1077
905
  });
1078
906
  }
1079
- function Jr(e) {
907
+ function Fr(e) {
1080
908
  return (t) => t.pipe(
1081
- Ar((r) => {
1082
- const n = new sr();
909
+ lr((r) => {
910
+ const n = new Pe();
1083
911
  return e(r)({
1084
912
  reducer: (i, o) => n.next(o),
1085
913
  initialValue: null
@@ -1087,7 +915,7 @@ function Jr(e) {
1087
915
  })
1088
916
  );
1089
917
  }
1090
- function Ge(e) {
918
+ function Ae(e) {
1091
919
  switch (e.responseType) {
1092
920
  case "json": {
1093
921
  if ("response" in e)
@@ -1105,285 +933,214 @@ function Ge(e) {
1105
933
  }
1106
934
  }
1107
935
  }
1108
- var Ir = /* @__PURE__ */ (function() {
936
+ var dr = /* @__PURE__ */ (function() {
1109
937
  function e(t, r, n, i) {
1110
938
  i === void 0 && (i = "download_load"), this.originalEvent = t, this.xhr = r, this.request = n, this.type = i;
1111
939
  var o = r.status, u = r.responseType;
1112
940
  this.status = o ?? 0, this.responseType = u ?? "";
1113
- var a = r.getAllResponseHeaders();
1114
- this.responseHeaders = a ? a.split(`
1115
- `).reduce(function(f, d) {
1116
- var v = d.indexOf(": ");
1117
- return f[d.slice(0, v)] = d.slice(v + 2), f;
1118
- }, {}) : {}, this.response = Ge(r);
1119
- var c = t.loaded, s = t.total;
1120
- this.loaded = c, this.total = s;
941
+ var s = r.getAllResponseHeaders();
942
+ this.responseHeaders = s ? s.split(`
943
+ `).reduce(function(l, p) {
944
+ var v = p.indexOf(": ");
945
+ return l[p.slice(0, v)] = p.slice(v + 2), l;
946
+ }, {}) : {}, this.response = Ae(r);
947
+ var c = t.loaded, a = t.total;
948
+ this.loaded = c, this.total = a;
1121
949
  }
1122
950
  return e;
1123
- })(), M = te(function(e) {
951
+ })(), k = Z(function(e) {
1124
952
  return function(r, n, i) {
1125
953
  this.message = r, this.name = "AjaxError", this.xhr = n, this.request = i, this.status = n.status, this.responseType = n.responseType;
1126
954
  var o;
1127
955
  try {
1128
- o = Ge(n);
956
+ o = Ae(n);
1129
957
  } catch {
1130
958
  o = n.responseText;
1131
959
  }
1132
960
  this.response = o;
1133
961
  };
1134
- }), Pr = (function() {
962
+ }), vr = (function() {
1135
963
  function e(t, r) {
1136
- return M.call(this, "ajax timeout", t, r), this.name = "AjaxTimeoutError", this;
964
+ return k.call(this, "ajax timeout", t, r), this.name = "AjaxTimeoutError", this;
1137
965
  }
1138
- return e.prototype = Object.create(M.prototype), e;
966
+ return e.prototype = Object.create(k.prototype), e;
1139
967
  })();
1140
- function Rr(e, t) {
1141
- return _({ method: "GET", url: e, headers: t });
968
+ function yr(e, t) {
969
+ return O({ method: "GET", url: e, headers: t });
1142
970
  }
1143
- function Cr(e, t, r) {
1144
- return _({ method: "POST", url: e, body: t, headers: r });
971
+ function mr(e, t, r) {
972
+ return O({ method: "POST", url: e, body: t, headers: r });
1145
973
  }
1146
- function Lr(e, t) {
1147
- return _({ method: "DELETE", url: e, headers: t });
974
+ function br(e, t) {
975
+ return O({ method: "DELETE", url: e, headers: t });
1148
976
  }
1149
- function Ur(e, t, r) {
1150
- return _({ method: "PUT", url: e, body: t, headers: r });
977
+ function wr(e, t, r) {
978
+ return O({ method: "PUT", url: e, body: t, headers: r });
1151
979
  }
1152
- function kr(e, t, r) {
1153
- return _({ method: "PATCH", url: e, body: t, headers: r });
980
+ function Sr(e, t, r) {
981
+ return O({ method: "PATCH", url: e, body: t, headers: r });
1154
982
  }
1155
- var Br = g(function(e) {
983
+ var xr = E(function(e) {
1156
984
  return e.response;
1157
985
  });
1158
- function Dr(e, t) {
1159
- return Br(_({
986
+ function Tr(e, t) {
987
+ return xr(O({
1160
988
  method: "GET",
1161
989
  url: e,
1162
990
  headers: t
1163
991
  }));
1164
992
  }
1165
- var _ = (function() {
993
+ var O = (function() {
1166
994
  var e = function(t) {
1167
995
  var r = typeof t == "string" ? {
1168
996
  url: t
1169
997
  } : t;
1170
- return Hr(r);
998
+ return Or(r);
1171
999
  };
1172
- return e.get = Rr, e.post = Cr, e.delete = Lr, e.put = Ur, e.patch = kr, e.getJSON = Dr, e;
1173
- })(), Fr = "upload", xe = "download", V = "loadstart", $ = "progress", Te = "load";
1174
- function Hr(e) {
1175
- return new T(function(t) {
1176
- var r, n, i = F({ async: !0, crossDomain: !1, withCredentials: !1, method: "GET", timeout: 0, responseType: "json" }, e), o = i.queryParams, u = i.body, a = i.headers, c = i.url;
1000
+ return e.get = yr, e.post = mr, e.delete = br, e.put = wr, e.patch = Sr, e.getJSON = Tr, e;
1001
+ })(), Er = "upload", be = "download", X = "loadstart", $ = "progress", we = "load";
1002
+ function Or(e) {
1003
+ return new g(function(t) {
1004
+ var r, n, i = L({ async: !0, crossDomain: !1, withCredentials: !1, method: "GET", timeout: 0, responseType: "json" }, e), o = i.queryParams, u = i.body, s = i.headers, c = i.url;
1177
1005
  if (!c)
1178
1006
  throw new TypeError("url is required");
1179
1007
  if (o) {
1180
- var s;
1008
+ var a;
1181
1009
  if (c.includes("?")) {
1182
- var f = c.split("?");
1183
- if (2 < f.length)
1010
+ var l = c.split("?");
1011
+ if (2 < l.length)
1184
1012
  throw new TypeError("invalid url");
1185
- s = new URLSearchParams(f[1]), new URLSearchParams(o).forEach(function(m, w) {
1186
- return s.set(w, m);
1187
- }), c = f[0] + "?" + s;
1013
+ a = new URLSearchParams(l[1]), new URLSearchParams(o).forEach(function(m, b) {
1014
+ return a.set(b, m);
1015
+ }), c = l[0] + "?" + a;
1188
1016
  } else
1189
- s = new URLSearchParams(o), c = c + "?" + s;
1017
+ a = new URLSearchParams(o), c = c + "?" + a;
1190
1018
  }
1191
- var d = {};
1192
- if (a)
1193
- for (var v in a)
1194
- a.hasOwnProperty(v) && (d[v.toLowerCase()] = a[v]);
1195
- var l = i.crossDomain;
1196
- !l && !("x-requested-with" in d) && (d["x-requested-with"] = "XMLHttpRequest");
1019
+ var p = {};
1020
+ if (s)
1021
+ for (var v in s)
1022
+ s.hasOwnProperty(v) && (p[v.toLowerCase()] = s[v]);
1023
+ var f = i.crossDomain;
1024
+ !f && !("x-requested-with" in p) && (p["x-requested-with"] = "XMLHttpRequest");
1197
1025
  var S = i.withCredentials, h = i.xsrfCookieName, I = i.xsrfHeaderName;
1198
- if ((S || !l) && h && I) {
1199
- var O = (n = (r = document?.cookie.match(new RegExp("(^|;\\s*)(" + h + ")=([^;]*)"))) === null || r === void 0 ? void 0 : r.pop()) !== null && n !== void 0 ? n : "";
1200
- O && (d[I] = O);
1026
+ if ((S || !f) && h && I) {
1027
+ var j = (n = (r = document?.cookie.match(new RegExp("(^|;\\s*)(" + h + ")=([^;]*)"))) === null || r === void 0 ? void 0 : r.pop()) !== null && n !== void 0 ? n : "";
1028
+ j && (p[I] = j);
1201
1029
  }
1202
- var P = Mr(u, d), E = F(F({}, i), {
1030
+ var R = gr(u, p), T = L(L({}, i), {
1203
1031
  url: c,
1204
- headers: d,
1205
- body: P
1206
- }), p;
1207
- p = e.createXHR ? e.createXHR() : new XMLHttpRequest();
1032
+ headers: p,
1033
+ body: R
1034
+ }), d;
1035
+ d = e.createXHR ? e.createXHR() : new XMLHttpRequest();
1208
1036
  {
1209
- var y = e.progressSubscriber, ae = e.includeDownloadProgress, ze = ae === void 0 ? !1 : ae, se = e.includeUploadProgress, Ne = se === void 0 ? !1 : se, ce = function(m, w) {
1210
- p.addEventListener(m, function() {
1211
- var x, R = w();
1212
- (x = y?.error) === null || x === void 0 || x.call(y, R), t.error(R);
1037
+ var y = e.progressSubscriber, oe = e.includeDownloadProgress, Ie = oe === void 0 ? !1 : oe, ie = e.includeUploadProgress, Re = ie === void 0 ? !1 : ie, ue = function(m, b) {
1038
+ d.addEventListener(m, function() {
1039
+ var x, _ = b();
1040
+ (x = y?.error) === null || x === void 0 || x.call(y, _), t.error(_);
1213
1041
  });
1214
1042
  };
1215
- ce("timeout", function() {
1216
- return new Pr(p, E);
1217
- }), ce("abort", function() {
1218
- return new M("aborted", p, E);
1043
+ ue("timeout", function() {
1044
+ return new vr(d, T);
1045
+ }), ue("abort", function() {
1046
+ return new k("aborted", d, T);
1219
1047
  });
1220
- var fe = function(m, w) {
1221
- return new Ir(w, p, E, m + "_" + w.type);
1222
- }, le = function(m, w, x) {
1223
- m.addEventListener(w, function(R) {
1224
- t.next(fe(x, R));
1048
+ var ae = function(m, b) {
1049
+ return new dr(b, d, T, m + "_" + b.type);
1050
+ }, se = function(m, b, x) {
1051
+ m.addEventListener(b, function(_) {
1052
+ t.next(ae(x, _));
1225
1053
  });
1226
1054
  };
1227
- Ne && [V, $, Te].forEach(function(m) {
1228
- return le(p.upload, m, Fr);
1229
- }), y && [V, $].forEach(function(m) {
1230
- return p.upload.addEventListener(m, function(w) {
1055
+ Re && [X, $, we].forEach(function(m) {
1056
+ return se(d.upload, m, Er);
1057
+ }), y && [X, $].forEach(function(m) {
1058
+ return d.upload.addEventListener(m, function(b) {
1231
1059
  var x;
1232
- return (x = y?.next) === null || x === void 0 ? void 0 : x.call(y, w);
1060
+ return (x = y?.next) === null || x === void 0 ? void 0 : x.call(y, b);
1233
1061
  });
1234
- }), ze && [V, $].forEach(function(m) {
1235
- return le(p, m, xe);
1062
+ }), Ie && [X, $].forEach(function(m) {
1063
+ return se(d, m, be);
1236
1064
  });
1237
- var de = function(m) {
1238
- var w = "ajax error" + (m ? " " + m : "");
1239
- t.error(new M(w, p, E));
1065
+ var ce = function(m) {
1066
+ var b = "ajax error" + (m ? " " + m : "");
1067
+ t.error(new k(b, d, T));
1240
1068
  };
1241
- p.addEventListener("error", function(m) {
1242
- var w;
1243
- (w = y?.error) === null || w === void 0 || w.call(y, m), de();
1244
- }), p.addEventListener(Te, function(m) {
1245
- var w, x, R = p.status;
1246
- if (R < 400) {
1247
- (w = y?.complete) === null || w === void 0 || w.call(y);
1248
- var ve = void 0;
1069
+ d.addEventListener("error", function(m) {
1070
+ var b;
1071
+ (b = y?.error) === null || b === void 0 || b.call(y, m), ce();
1072
+ }), d.addEventListener(we, function(m) {
1073
+ var b, x, _ = d.status;
1074
+ if (_ < 400) {
1075
+ (b = y?.complete) === null || b === void 0 || b.call(y);
1076
+ var pe = void 0;
1249
1077
  try {
1250
- ve = fe(xe, m);
1251
- } catch (Ve) {
1252
- t.error(Ve);
1078
+ pe = ae(be, m);
1079
+ } catch (_e) {
1080
+ t.error(_e);
1253
1081
  return;
1254
1082
  }
1255
- t.next(ve), t.complete();
1083
+ t.next(pe), t.complete();
1256
1084
  } else
1257
- (x = y?.error) === null || x === void 0 || x.call(y, m), de(R);
1085
+ (x = y?.error) === null || x === void 0 || x.call(y, m), ce(_);
1258
1086
  });
1259
1087
  }
1260
- var he = E.user, pe = E.method, z = E.async;
1261
- he ? p.open(pe, c, z, he, E.password) : p.open(pe, c, z), z && (p.timeout = E.timeout, p.responseType = E.responseType), "withCredentials" in p && (p.withCredentials = E.withCredentials);
1262
- for (var v in d)
1263
- d.hasOwnProperty(v) && p.setRequestHeader(v, d[v]);
1264
- return P ? p.send(P) : p.send(), function() {
1265
- p && p.readyState !== 4 && p.abort();
1088
+ var fe = T.user, le = T.method, G = T.async;
1089
+ fe ? d.open(le, c, G, fe, T.password) : d.open(le, c, G), G && (d.timeout = T.timeout, d.responseType = T.responseType), "withCredentials" in d && (d.withCredentials = T.withCredentials);
1090
+ for (var v in p)
1091
+ p.hasOwnProperty(v) && d.setRequestHeader(v, p[v]);
1092
+ return R ? d.send(R) : d.send(), function() {
1093
+ d && d.readyState !== 4 && d.abort();
1266
1094
  };
1267
1095
  });
1268
1096
  }
1269
- function Mr(e, t) {
1097
+ function gr(e, t) {
1270
1098
  var r;
1271
- if (!e || typeof e == "string" || Vr(e) || $r(e) || Wr(e) || Gr(e) || zr(e) || Xr(e))
1099
+ if (!e || typeof e == "string" || Pr(e) || Cr(e) || Ar(e) || Ir(e) || Rr(e) || Lr(e))
1272
1100
  return e;
1273
- if (Nr(e))
1101
+ if (_r(e))
1274
1102
  return e.buffer;
1275
1103
  if (typeof e == "object")
1276
1104
  return t["content-type"] = (r = t["content-type"]) !== null && r !== void 0 ? r : "application/json;charset=utf-8", JSON.stringify(e);
1277
1105
  throw new TypeError("Unknown body type");
1278
1106
  }
1279
- var qr = Object.prototype.toString;
1280
- function ue(e, t) {
1281
- return qr.call(e) === "[object " + t + "]";
1107
+ var jr = Object.prototype.toString;
1108
+ function ne(e, t) {
1109
+ return jr.call(e) === "[object " + t + "]";
1282
1110
  }
1283
- function Wr(e) {
1284
- return ue(e, "ArrayBuffer");
1111
+ function Ar(e) {
1112
+ return ne(e, "ArrayBuffer");
1285
1113
  }
1286
- function Gr(e) {
1287
- return ue(e, "File");
1114
+ function Ir(e) {
1115
+ return ne(e, "File");
1288
1116
  }
1289
- function zr(e) {
1290
- return ue(e, "Blob");
1117
+ function Rr(e) {
1118
+ return ne(e, "Blob");
1291
1119
  }
1292
- function Nr(e) {
1120
+ function _r(e) {
1293
1121
  return typeof ArrayBuffer < "u" && ArrayBuffer.isView(e);
1294
1122
  }
1295
- function Vr(e) {
1123
+ function Pr(e) {
1296
1124
  return typeof FormData < "u" && e instanceof FormData;
1297
1125
  }
1298
- function $r(e) {
1126
+ function Cr(e) {
1299
1127
  return typeof URLSearchParams < "u" && e instanceof URLSearchParams;
1300
1128
  }
1301
- function Xr(e) {
1129
+ function Lr(e) {
1302
1130
  return typeof ReadableStream < "u" && e instanceof ReadableStream;
1303
1131
  }
1304
- function re(e, t, r = []) {
1305
- return {
1306
- handle: (n, i) => {
1307
- let o;
1308
- for (const a of Array.isArray(n) ? n : [n]) {
1309
- const c = e.find(
1310
- (s) => s.ErrorCode === t[a]
1311
- );
1312
- if (c) {
1313
- o = i(a, c);
1314
- break;
1315
- }
1316
- }
1317
- let u = r;
1318
- return o !== void 0 && (u = [...u, o]), re(
1319
- e,
1320
- t,
1321
- u
1322
- );
1323
- },
1324
- handleAll: (n, i) => {
1325
- let o;
1326
- const u = (Array.isArray(n) ? n : [n]).reduce(
1327
- (c, s) => {
1328
- const f = e.filter(
1329
- (d) => d.ErrorCode === t[s]
1330
- );
1331
- return f.length === 0 ? c : [
1332
- ...c,
1333
- {
1334
- errorName: s,
1335
- errors: f
1336
- }
1337
- ];
1338
- },
1339
- []
1340
- );
1341
- u.length > 0 && (o = i(u));
1342
- let a = r;
1343
- return o !== void 0 && (a = [...a, o]), re(
1344
- e,
1345
- t,
1346
- a
1347
- );
1348
- },
1349
- check: ((n) => {
1350
- if (n)
1351
- return r.reduce(n.reducer, n.initialValue);
1352
- })
1353
- };
1354
- }
1355
- function Yr(e, t) {
1356
- const r = {
1357
- ...t,
1358
- success: -1,
1359
- failure: -2
1360
- }, n = e.isSuccess ? e.result.WasSuccessful ? [
1361
- {
1362
- ErrorMessage: "",
1363
- PropertyName: "",
1364
- ErrorCode: -1
1365
- }
1366
- ] : e.result.ValidationErrors : [
1367
- {
1368
- ErrorMessage: "",
1369
- PropertyName: "",
1370
- ErrorCode: -2
1371
- }
1372
- ];
1373
- return re(n, r);
1374
- }
1375
- function X(e) {
1132
+ function z(e) {
1376
1133
  return (t) => t.pipe(
1377
- jr(
1134
+ hr(
1378
1135
  (r) => r.pipe(
1379
- A((n, i) => i === 0 && n.status === 401 ? H(e.invalidateToken()).pipe(
1380
- A((o) => o ? ee(o) : Se(() => n))
1381
- ) : Se(() => n))
1136
+ A((n, i) => i === 0 && n.status === 401 ? D(e.invalidateToken()).pipe(
1137
+ A((o) => o ? V(o) : he(() => n))
1138
+ ) : he(() => n))
1382
1139
  )
1383
1140
  )
1384
1141
  );
1385
1142
  }
1386
- function Qr({
1143
+ function Hr({
1387
1144
  cqrsEndpoint: e,
1388
1145
  tokenProvider: t,
1389
1146
  ajaxOptions: r,
@@ -1391,10 +1148,10 @@ function Qr({
1391
1148
  }) {
1392
1149
  return {
1393
1150
  createQuery(i) {
1394
- const o = (u, a) => _({
1151
+ const o = (u, s) => O({
1395
1152
  ...r,
1396
1153
  headers: {
1397
- [n]: a,
1154
+ [n]: s,
1398
1155
  "Content-Type": "application/json"
1399
1156
  },
1400
1157
  url: `${e}/query/${i}`,
@@ -1402,16 +1159,16 @@ function Qr({
1402
1159
  responseType: "json",
1403
1160
  body: u
1404
1161
  });
1405
- return t ? (u) => H(t.getToken()).pipe(
1406
- A((a) => o(u, a).pipe(X(t))),
1407
- g(({ response: a }) => a)
1408
- ) : (u) => o(u).pipe(g(({ response: a }) => a));
1162
+ return t ? (u) => D(t.getToken()).pipe(
1163
+ A((s) => o(u, s).pipe(z(t))),
1164
+ E(({ response: s }) => s)
1165
+ ) : (u) => o(u).pipe(E(({ response: s }) => s));
1409
1166
  },
1410
1167
  createOperation(i) {
1411
- const o = (u, a) => _({
1168
+ const o = (u, s) => O({
1412
1169
  ...r,
1413
1170
  headers: {
1414
- Authorization: a,
1171
+ Authorization: s,
1415
1172
  "Content-Type": "application/json"
1416
1173
  },
1417
1174
  url: `${e}/operation/${i}`,
@@ -1419,16 +1176,16 @@ function Qr({
1419
1176
  responseType: "json",
1420
1177
  body: u
1421
1178
  });
1422
- return t ? (u) => H(t.getToken()).pipe(
1423
- A((a) => o(u, a).pipe(X(t))),
1424
- g(({ response: a }) => a)
1425
- ) : (u) => o(u).pipe(g(({ response: a }) => a));
1179
+ return t ? (u) => D(t.getToken()).pipe(
1180
+ A((s) => o(u, s).pipe(z(t))),
1181
+ E(({ response: s }) => s)
1182
+ ) : (u) => o(u).pipe(E(({ response: s }) => s));
1426
1183
  },
1427
1184
  createCommand(i, o) {
1428
- const u = (c, s) => _({
1185
+ const u = (c, a) => O({
1429
1186
  ...r,
1430
1187
  headers: {
1431
- Authorization: s,
1188
+ Authorization: a,
1432
1189
  "Content-Type": "application/json"
1433
1190
  },
1434
1191
  url: `${e}/command/${i}`,
@@ -1436,40 +1193,40 @@ function Qr({
1436
1193
  responseType: "json",
1437
1194
  body: c
1438
1195
  });
1439
- function a(c) {
1440
- return t ? H(t.getToken()).pipe(
1441
- A((s) => u(c, s).pipe(X(t))),
1442
- g(({ response: s }) => s)
1443
- ) : u(c).pipe(g(({ response: s }) => s));
1196
+ function s(c) {
1197
+ return t ? D(t.getToken()).pipe(
1198
+ A((a) => u(c, a).pipe(z(t))),
1199
+ E(({ response: a }) => a)
1200
+ ) : u(c).pipe(E(({ response: a }) => a));
1444
1201
  }
1445
- return a.handle = (c) => a(c).pipe(
1446
- g(
1447
- (s) => ({
1202
+ return s.handle = (c) => s(c).pipe(
1203
+ E(
1204
+ (a) => ({
1448
1205
  isSuccess: !0,
1449
- result: s
1206
+ result: a
1450
1207
  })
1451
1208
  ),
1452
- qe((s) => s instanceof M && s.status === 422 ? ee({
1209
+ Ce((a) => a instanceof k && a.status === 422 ? V({
1453
1210
  isSuccess: !0,
1454
- result: s.response
1455
- }) : ee({
1211
+ result: a.response
1212
+ }) : V({
1456
1213
  isSuccess: !1,
1457
- error: s
1214
+ error: a
1458
1215
  })),
1459
- g((s) => Yr(s, o))
1460
- ), a;
1216
+ E((a) => Le(a, o))
1217
+ ), s;
1461
1218
  }
1462
1219
  };
1463
1220
  }
1464
- function Kr() {
1465
- return (e) => e.pipe(We((t, r) => t && r, !0));
1221
+ function Dr() {
1222
+ return (e) => e.pipe(Se((t, r) => t && r, !0));
1466
1223
  }
1467
- function Zr() {
1468
- return (e) => e.pipe(We((t, r) => ({ ...t, ...r }), {}));
1224
+ function qr() {
1225
+ return (e) => e.pipe(Se((t, r) => ({ ...t, ...r }), {}));
1469
1226
  }
1470
1227
  export {
1471
- Jr as handleCommandResponse,
1472
- Qr as mkCqrsClient,
1473
- Kr as reduceBoolean,
1474
- Zr as reduceObject
1228
+ Fr as handleCommandResponse,
1229
+ Hr as mkCqrsClient,
1230
+ Dr as reduceBoolean,
1231
+ qr as reduceObject
1475
1232
  };