@fncts/observable 0.0.2 → 0.0.5

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.
Files changed (92) hide show
  1. package/BehaviorSubject.d.ts +1 -1
  2. package/Notification.d.ts +1 -1
  3. package/Observable/api/connect.d.ts +1 -1
  4. package/Observable/api/connectable.d.ts +5 -5
  5. package/Observable/api/fromCallback.d.ts +2 -2
  6. package/Observable/api/fromEvent.d.ts +1 -1
  7. package/Observable/api/race.d.ts +2 -2
  8. package/Observable/api/raceWith.d.ts +1 -1
  9. package/Observable/api/repeatWhen.d.ts +2 -2
  10. package/Observable/api/retryWhen.d.ts +3 -3
  11. package/Observable/api/share.d.ts +5 -6
  12. package/Observable/api/window.d.ts +2 -2
  13. package/Observable/api/windowCount.d.ts +1 -1
  14. package/Observable/api/windowTime.d.ts +3 -3
  15. package/Observable/api/windowToggle.d.ts +2 -2
  16. package/Observable/api/windowWhen.d.ts +2 -2
  17. package/Observable/api.d.ts +204 -163
  18. package/Observable/definition.d.ts +24 -15
  19. package/Observable/dom/animationFrames.d.ts +1 -1
  20. package/Observer.d.ts +1 -1
  21. package/Operator.d.ts +4 -3
  22. package/Subject.d.ts +10 -9
  23. package/Subscriber.d.ts +1 -1
  24. package/_cjs/BehaviorSubject.cjs.map +1 -1
  25. package/_cjs/Observable/api/connect.cjs.map +1 -1
  26. package/_cjs/Observable/api/connectable.cjs.map +1 -1
  27. package/_cjs/Observable/api/fromCallback.cjs.map +1 -1
  28. package/_cjs/Observable/api/race.cjs.map +1 -1
  29. package/_cjs/Observable/api/raceWith.cjs.map +1 -1
  30. package/_cjs/Observable/api/repeatWhen.cjs.map +1 -1
  31. package/_cjs/Observable/api/retryWhen.cjs.map +1 -1
  32. package/_cjs/Observable/api/share.cjs +2 -11
  33. package/_cjs/Observable/api/share.cjs.map +1 -1
  34. package/_cjs/Observable/api/window.cjs.map +1 -1
  35. package/_cjs/Observable/api/windowTime.cjs.map +1 -1
  36. package/_cjs/Observable/api/windowToggle.cjs.map +1 -1
  37. package/_cjs/Observable/api/windowWhen.cjs.map +1 -1
  38. package/_cjs/Observable/api.cjs +325 -308
  39. package/_cjs/Observable/api.cjs.map +1 -1
  40. package/_cjs/Observable/definition.cjs +41 -15
  41. package/_cjs/Observable/definition.cjs.map +1 -1
  42. package/_cjs/Operator.cjs.map +1 -1
  43. package/_cjs/Subject.cjs +2 -2
  44. package/_cjs/Subject.cjs.map +1 -1
  45. package/_cjs/global.cjs +3 -1
  46. package/_cjs/global.cjs.map +1 -1
  47. package/_mjs/BehaviorSubject.mjs.map +1 -1
  48. package/_mjs/Observable/api/connect.mjs.map +1 -1
  49. package/_mjs/Observable/api/connectable.mjs.map +1 -1
  50. package/_mjs/Observable/api/fromCallback.mjs.map +1 -1
  51. package/_mjs/Observable/api/race.mjs.map +1 -1
  52. package/_mjs/Observable/api/raceWith.mjs.map +1 -1
  53. package/_mjs/Observable/api/repeatWhen.mjs.map +1 -1
  54. package/_mjs/Observable/api/retryWhen.mjs.map +1 -1
  55. package/_mjs/Observable/api/share.mjs +1 -6
  56. package/_mjs/Observable/api/share.mjs.map +1 -1
  57. package/_mjs/Observable/api/window.mjs.map +1 -1
  58. package/_mjs/Observable/api/windowTime.mjs.map +1 -1
  59. package/_mjs/Observable/api/windowToggle.mjs.map +1 -1
  60. package/_mjs/Observable/api/windowWhen.mjs.map +1 -1
  61. package/_mjs/Observable/api.mjs +301 -293
  62. package/_mjs/Observable/api.mjs.map +1 -1
  63. package/_mjs/Observable/definition.mjs +36 -14
  64. package/_mjs/Observable/definition.mjs.map +1 -1
  65. package/_mjs/Operator.mjs.map +1 -1
  66. package/_mjs/Subject.mjs +2 -2
  67. package/_mjs/Subject.mjs.map +1 -1
  68. package/_mjs/global.mjs +1 -1
  69. package/_mjs/global.mjs.map +1 -1
  70. package/_src/BehaviorSubject.ts +1 -1
  71. package/_src/Observable/api/connect.ts +5 -5
  72. package/_src/Observable/api/connectable.ts +7 -7
  73. package/_src/Observable/api/fromCallback.ts +8 -5
  74. package/_src/Observable/api/fromEvent.ts +1 -1
  75. package/_src/Observable/api/race.ts +2 -2
  76. package/_src/Observable/api/raceWith.ts +7 -3
  77. package/_src/Observable/api/repeatWhen.ts +8 -8
  78. package/_src/Observable/api/retryWhen.ts +8 -8
  79. package/_src/Observable/api/share.ts +10 -16
  80. package/_src/Observable/api/window.ts +5 -5
  81. package/_src/Observable/api/windowCount.ts +5 -5
  82. package/_src/Observable/api/windowTime.ts +18 -18
  83. package/_src/Observable/api/windowToggle.ts +8 -8
  84. package/_src/Observable/api/windowWhen.ts +6 -6
  85. package/_src/Observable/api.ts +524 -429
  86. package/_src/Observable/definition.ts +45 -21
  87. package/_src/Observable/dom/animationFrames.ts +2 -2
  88. package/_src/Operator.ts +6 -6
  89. package/_src/Subject.ts +9 -9
  90. package/_src/global.ts +5 -46
  91. package/global.d.ts +5 -45
  92. package/package.json +6 -2
@@ -12,15 +12,14 @@ exports.audit_ = void 0;
12
12
  exports.bufferCount_ = bufferCount_;
13
13
  exports.bufferTime_ = bufferTime_;
14
14
  exports.bufferToggle_ = bufferToggle_;
15
- exports.bufferWhen = bufferWhen;
16
- exports.bufferWhen_ = void 0;
15
+ exports.bufferWhen_ = bufferWhen_;
17
16
  exports.buffer_ = buffer_;
18
17
  exports.catchAllCause = void 0;
19
18
  exports.combineLatestAll = combineLatestAll;
20
19
  exports.concatAll = exports.combineLatest_ = void 0;
21
20
  exports.concatMapWithIndex = concatMapWithIndex;
22
21
  exports.concatMap_ = concatMap_;
23
- exports.concat_ = void 0;
22
+ exports.contramapEnvironment = exports.concat_ = void 0;
24
23
  exports.count = count;
25
24
  exports.countWithIndex = void 0;
26
25
  exports.countWith_ = countWith_;
@@ -32,6 +31,7 @@ exports.dematerialize = dematerialize;
32
31
  exports.either = either;
33
32
  exports.empty = void 0;
34
33
  exports.ensuring_ = ensuring_;
34
+ exports.environmentWithObservable = void 0;
35
35
  exports.exhaustAll = exhaustAll;
36
36
  exports.exhaustMapWithIndex = void 0;
37
37
  exports.exhaustMap_ = exhaustMap_;
@@ -73,13 +73,14 @@ exports.materialize = materialize;
73
73
  exports.merge = merge;
74
74
  exports.mergeScanWithIndex = exports.mergeMap_ = exports.mergeMapWithIndex = exports.mergeAll_ = void 0;
75
75
  exports.mergeScan_ = mergeScan_;
76
- exports.of = of;
77
- exports.onEmpty_ = void 0;
76
+ exports.onEmpty_ = exports.of = void 0;
78
77
  exports.onErrorResumeNext = onErrorResumeNext;
79
78
  exports.partitionMapWithIndex_ = void 0;
80
79
  exports.partitionMap_ = partitionMap_;
81
80
  exports.partitionWithIndex = void 0;
82
81
  exports.partition_ = partition_;
82
+ exports.provideEnvironment = provideEnvironment;
83
+ exports.provideService = provideService;
83
84
  exports.repeat_ = repeat_;
84
85
  exports.retry_ = retry_;
85
86
  exports.sampleTime_ = sampleTime_;
@@ -94,7 +95,9 @@ exports.scheduleObservable = scheduleObservable;
94
95
  exports.schedulePromise = schedulePromise;
95
96
  exports.scheduleReadableStreamLike = scheduleReadableStreamLike;
96
97
  exports.scheduled = void 0;
97
- exports.single = void 0;
98
+ exports.service = service;
99
+ exports.serviceWith = serviceWith;
100
+ exports.single = exports.serviceWithObservable = void 0;
98
101
  exports.skipLast_ = skipLast_;
99
102
  exports.skipUntil_ = skipUntil_;
100
103
  exports.skipWhile_ = skipWhile_;
@@ -121,23 +124,23 @@ exports.unit = void 0;
121
124
  exports.zip = zip;
122
125
  exports.zipWith = void 0;
123
126
 
124
- var tsplus_module_1 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/observable/Observable"));
127
+ var tsplus_module_1 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/data/Cause/api"));
125
128
 
126
- var tsplus_module_2 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/data/Cause/api"));
129
+ var tsplus_module_2 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/observable/internal/util"));
127
130
 
128
- var tsplus_module_3 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/observable/internal/util"));
131
+ var tsplus_module_3 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/util/predicates"));
129
132
 
130
- var tsplus_module_4 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/util/predicates"));
133
+ var tsplus_module_4 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/io/IO"));
131
134
 
132
- var tsplus_module_5 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/io/IO"));
135
+ var tsplus_module_5 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/observable/AsyncScheduler"));
133
136
 
134
- var tsplus_module_6 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/observable/AsyncScheduler"));
137
+ var tsplus_module_6 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/observable/Subscription"));
135
138
 
136
- var tsplus_module_7 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/observable/Subscription"));
139
+ var tsplus_module_7 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/observable/Scheduler"));
137
140
 
138
- var tsplus_module_8 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/observable/Scheduler"));
141
+ var tsplus_module_8 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/observable/Operator"));
139
142
 
140
- var tsplus_module_9 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/observable/Operator"));
143
+ var tsplus_module_9 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/io/IO/api/environment"));
141
144
 
142
145
  var tsplus_module_10 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/io/IO/runtime"));
143
146
 
@@ -151,15 +154,17 @@ var tsplus_module_14 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/requir
151
154
 
152
155
  var tsplus_module_15 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/data/Maybe/destructors"));
153
156
 
154
- var tsplus_module_16 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/data/Maybe/constructors"));
157
+ var tsplus_module_16 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/data/Environment/api"));
155
158
 
156
- var tsplus_module_17 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/data/Maybe/definition"));
159
+ var tsplus_module_17 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/data/Maybe/constructors"));
157
160
 
158
- var tsplus_module_18 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/data/Either/constructors"));
161
+ var tsplus_module_18 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/data/Maybe/definition"));
159
162
 
160
- var tsplus_module_19 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/observable/Notification"));
163
+ var tsplus_module_19 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/data/Either/constructors"));
161
164
 
162
- var tsplus_module_20 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/collection/immutable/HashSet/api"));
165
+ var tsplus_module_20 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/observable/Notification"));
166
+
167
+ var tsplus_module_21 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/collection/immutable/HashSet/api"));
163
168
 
164
169
  var _args = /*#__PURE__*/require("@fncts/observable/internal/args");
165
170
 
@@ -174,6 +179,8 @@ const defer = defer_1;
174
179
  exports.defer = defer;
175
180
  const empty = empty_1;
176
181
  exports.empty = empty;
182
+ const environmentWithObservable = environmentWithObservable_1;
183
+ exports.environmentWithObservable = environmentWithObservable;
177
184
  const fail = fail_1;
178
185
  exports.fail = fail;
179
186
  const from = from_1;
@@ -182,6 +189,8 @@ const fromSubscribable = fromSubscribable_1;
182
189
  exports.fromSubscribable = fromSubscribable;
183
190
  const interval = interval_1;
184
191
  exports.interval = interval;
192
+ const of = of_1;
193
+ exports.of = of;
185
194
  const single = single_1;
186
195
  exports.single = single;
187
196
  const scheduled = scheduled_1;
@@ -210,14 +219,14 @@ const mergeMapWithIndex = mergeMapWithIndex_1;
210
219
  exports.mergeMapWithIndex = mergeMapWithIndex;
211
220
  const mergeMap_ = mergeMap_1;
212
221
  exports.mergeMap_ = mergeMap_;
222
+ const contramapEnvironment = contramapEnvironment_1;
223
+ exports.contramapEnvironment = contramapEnvironment;
213
224
  const foldLeftWithIndex = foldLeftWithIndex_1;
214
225
  exports.foldLeftWithIndex = foldLeftWithIndex;
215
226
  const foldLeft = foldLeft_1;
216
227
  exports.foldLeft = foldLeft;
217
228
  const audit_ = audit_1;
218
229
  exports.audit_ = audit_;
219
- const bufferWhen_ = bufferWhen_1;
220
- exports.bufferWhen_ = bufferWhen_;
221
230
  const catchAllCause = catchAllCause_1;
222
231
  exports.catchAllCause = catchAllCause;
223
232
  const concatAll = concatAll_1;
@@ -250,6 +259,8 @@ const sample_ = sample_1;
250
259
  exports.sample_ = sample_;
251
260
  const scanLeftWithIndex = scanLeftWithIndex_1;
252
261
  exports.scanLeftWithIndex = scanLeftWithIndex;
262
+ const serviceWithObservable = serviceWithObservable_1;
263
+ exports.serviceWithObservable = serviceWithObservable;
253
264
  const switchMapWithIndex = switchMapWithIndex_1;
254
265
  exports.switchMapWithIndex = switchMapWithIndex;
255
266
  const switchMap_ = switchMap_1;
@@ -267,17 +278,11 @@ exports.toArray = toArray;
267
278
  const uniqueUntilChanged_ = uniqueUntilChanged_1;
268
279
  exports.uniqueUntilChanged_ = uniqueUntilChanged_;
269
280
 
270
- /*
271
- * -------------------------------------------------------------------------------------------------
272
- * constructors
273
- * -------------------------------------------------------------------------------------------------
274
- */
275
-
276
281
  /**
277
282
  * @tsplus static fncts.observable.ObservableOps halt
278
283
  */
279
284
  function halt(defect) {
280
- return new tsplus_module_1.Observable(s => s.error(tsplus_module_2.halt(defect)));
285
+ return new _definition2.Observable(s => s.error(tsplus_module_1.halt(defect)));
281
286
  }
282
287
  /**
283
288
  * @tsplus static fncts.observable.ObservableOps defer
@@ -285,7 +290,7 @@ function halt(defect) {
285
290
 
286
291
 
287
292
  function defer_1(observable) {
288
- return new tsplus_module_1.Observable(s => {
293
+ return new _definition2.Observable(s => {
289
294
  from_1(observable()).subscribe(s);
290
295
  });
291
296
  }
@@ -297,13 +302,21 @@ function defer_1(observable) {
297
302
  function empty_1() {
298
303
  return _definition2.EMPTY;
299
304
  }
305
+ /**
306
+ * @tsplus static fncts.observable.ObservableOps environmentWithObservable
307
+ */
308
+
309
+
310
+ function environmentWithObservable_1(f) {
311
+ return new _definition2.EnvironmentWith(f);
312
+ }
300
313
  /**
301
314
  * @tsplus static fncts.observable.ObservableOps failCause
302
315
  */
303
316
 
304
317
 
305
318
  function failCause(cause) {
306
- return new tsplus_module_1.Observable(s => s.error(cause));
319
+ return new _definition2.Observable(s => s.error(cause));
307
320
  }
308
321
  /**
309
322
  * @tsplus static fncts.observable.ObservableOps fail
@@ -311,7 +324,7 @@ function failCause(cause) {
311
324
 
312
325
 
313
326
  function fail_1(e) {
314
- return new tsplus_module_1.Observable(s => s.error(tsplus_module_2.fail(e)));
327
+ return new _definition2.Observable(s => s.error(tsplus_module_1.fail(e)));
315
328
  }
316
329
  /**
317
330
  * @tsplus static fncts.observable.ObservableOps from
@@ -319,31 +332,31 @@ function fail_1(e) {
319
332
 
320
333
 
321
334
  function from_1(input) {
322
- if (input instanceof tsplus_module_1.Observable) {
335
+ if (input instanceof _definition2.Observable) {
323
336
  return input;
324
337
  }
325
338
 
326
- if (tsplus_module_3.isArrayLike(input)) {
339
+ if (tsplus_module_2.isArrayLike(input)) {
327
340
  return fromArrayLike(input);
328
341
  }
329
342
 
330
- if (tsplus_module_3.isPromiseLike(input)) {
343
+ if (tsplus_module_2.isPromiseLike(input)) {
331
344
  return fromPromise(input);
332
345
  }
333
346
 
334
- if (tsplus_module_3.isAsyncIterable(input)) {
347
+ if (tsplus_module_2.isAsyncIterable(input)) {
335
348
  return fromAsyncIterable(input);
336
349
  }
337
350
 
338
- if (tsplus_module_4.isIterable(input)) {
351
+ if (tsplus_module_3.isIterable(input)) {
339
352
  return fromIterable(input);
340
353
  }
341
354
 
342
- if (tsplus_module_3.isReadableStream(input)) {
355
+ if (tsplus_module_2.isReadableStream(input)) {
343
356
  return fromReadableStreamLike(input);
344
357
  }
345
358
 
346
- if (tsplus_module_5.isIO(input)) {
359
+ if (tsplus_module_4.isIO(input)) {
347
360
  return fromIO_1(input);
348
361
  }
349
362
 
@@ -355,7 +368,7 @@ function from_1(input) {
355
368
  }
356
369
 
357
370
  function fromArrayLike(input) {
358
- return new tsplus_module_1.Observable(s => {
371
+ return new _definition2.Observable(s => {
359
372
  for (let i = 0; i < input.length && !s.closed; i++) {
360
373
  s.next(input[i]);
361
374
  }
@@ -365,13 +378,13 @@ function fromArrayLike(input) {
365
378
  }
366
379
 
367
380
  function fromAsyncIterable(asyncIterable) {
368
- return new tsplus_module_1.Observable(s => {
369
- process(asyncIterable, s).catch(err => s.error(tsplus_module_2.halt(err)));
381
+ return new _definition2.Observable(s => {
382
+ process(asyncIterable, s).catch(err => s.error(tsplus_module_1.halt(err)));
370
383
  });
371
384
  }
372
385
 
373
386
  function fromIterable(iterable) {
374
- return new tsplus_module_1.Observable(s => {
387
+ return new _definition2.Observable(s => {
375
388
  for (const value of iterable) {
376
389
  s.next(value);
377
390
 
@@ -385,18 +398,18 @@ function fromIterable(iterable) {
385
398
  }
386
399
 
387
400
  function fromPromise(promise) {
388
- return new tsplus_module_1.Observable(s => {
401
+ return new _definition2.Observable(s => {
389
402
  promise.then(value => {
390
403
  if (!s.closed) {
391
404
  s.next(value);
392
405
  s.complete();
393
406
  }
394
- }, err => s.error(tsplus_module_2.halt(err))).then(null, tsplus_module_3.reportUnhandledError);
407
+ }, err => s.error(tsplus_module_1.halt(err))).then(null, tsplus_module_2.reportUnhandledError);
395
408
  });
396
409
  }
397
410
 
398
411
  function fromReadableStreamLike(readableStream) {
399
- return fromAsyncIterable((0, tsplus_module_3.readableStreamToAsyncGenerator)(readableStream));
412
+ return fromAsyncIterable((0, tsplus_module_2.readableStreamToAsyncGenerator)(readableStream));
400
413
  }
401
414
  /**
402
415
  * @tsplus static fncts.observable.ObservableOps fromSubscribable
@@ -404,13 +417,13 @@ function fromReadableStreamLike(readableStream) {
404
417
 
405
418
 
406
419
  function fromSubscribable_1(subscribable) {
407
- return new tsplus_module_1.Observable(subscriber => subscribable.subscribe(subscriber));
420
+ return new _definition2.Observable(subscriber => subscribable.subscribe(subscriber));
408
421
  }
409
422
 
410
423
  function fromInterop(subscribable) {
411
- return new tsplus_module_1.Observable(subscriber => subscribable.subscribe({
424
+ return new _definition2.Observable(subscriber => subscribable.subscribe({
412
425
  next: value => subscriber.next(value),
413
- error: err => subscriber.error(tsplus_module_2.halt(err)),
426
+ error: err => subscriber.error(tsplus_module_1.halt(err)),
414
427
  complete: () => subscriber.complete()
415
428
  }));
416
429
  }
@@ -452,7 +465,7 @@ async function process(asyncIterable, subscriber) {
452
465
  */
453
466
 
454
467
 
455
- function interval_1(period = 0, scheduler = tsplus_module_6.asyncScheduler) {
468
+ function interval_1(period = 0, scheduler = tsplus_module_5.asyncScheduler) {
456
469
  if (period < 0) {
457
470
  // eslint-disable-next-line no-param-reassign
458
471
  period = 0;
@@ -470,7 +483,7 @@ function merge(...sources) {
470
483
  */
471
484
 
472
485
 
473
- function of(...items) {
486
+ function of_1(...items) {
474
487
  return fromArrayLike(items);
475
488
  }
476
489
  /**
@@ -479,7 +492,7 @@ function of(...items) {
479
492
 
480
493
 
481
494
  function single_1(a) {
482
- return new tsplus_module_1.Observable(s => {
495
+ return new _definition2.Observable(s => {
483
496
  s.next(a);
484
497
  s.complete();
485
498
  });
@@ -491,23 +504,23 @@ function single_1(a) {
491
504
 
492
505
 
493
506
  function scheduled_1(input, scheduler) {
494
- if (tsplus_module_3.isArrayLike(input)) {
507
+ if (tsplus_module_2.isArrayLike(input)) {
495
508
  return scheduleArray(input, scheduler);
496
509
  }
497
510
 
498
- if (tsplus_module_3.isPromiseLike(input)) {
511
+ if (tsplus_module_2.isPromiseLike(input)) {
499
512
  return schedulePromise(input, scheduler);
500
513
  }
501
514
 
502
- if (tsplus_module_4.isIterable(input)) {
515
+ if (tsplus_module_3.isIterable(input)) {
503
516
  return scheduleIterable(input, scheduler);
504
517
  }
505
518
 
506
- if (tsplus_module_3.isAsyncIterable(input)) {
519
+ if (tsplus_module_2.isAsyncIterable(input)) {
507
520
  return scheduleAsyncIterable(input, scheduler);
508
521
  }
509
522
 
510
- if (tsplus_module_3.isReadableStream(input)) {
523
+ if (tsplus_module_2.isReadableStream(input)) {
511
524
  return scheduleReadableStreamLike(input, scheduler);
512
525
  }
513
526
 
@@ -515,7 +528,7 @@ function scheduled_1(input, scheduler) {
515
528
  }
516
529
 
517
530
  function scheduleArray(input, scheduler) {
518
- return new tsplus_module_1.Observable(s => {
531
+ return new _definition2.Observable(s => {
519
532
  let i = 0;
520
533
  return scheduler.schedule(function () {
521
534
  if (i === input.length) {
@@ -532,8 +545,8 @@ function scheduleArray(input, scheduler) {
532
545
  }
533
546
 
534
547
  function scheduleAsyncIterable(input, scheduler) {
535
- return new tsplus_module_1.Observable(subscriber => {
536
- const sub = new tsplus_module_7.Subscription();
548
+ return new _definition2.Observable(subscriber => {
549
+ const sub = new tsplus_module_6.Subscription();
537
550
  sub.add(scheduler.schedule(() => {
538
551
  const iterator = input[Symbol.asyncIterator]();
539
552
  sub.add(scheduler.schedule(function () {
@@ -552,11 +565,11 @@ function scheduleAsyncIterable(input, scheduler) {
552
565
  }
553
566
 
554
567
  function scheduleIterable(input, scheduler) {
555
- return new tsplus_module_1.Observable(s => {
568
+ return new _definition2.Observable(s => {
556
569
  let iterator;
557
570
  s.add(scheduler.schedule(() => {
558
571
  iterator = input[Symbol.iterator]();
559
- (0, tsplus_module_8.caughtSchedule)(s, scheduler, function () {
572
+ (0, tsplus_module_7.caughtSchedule)(s, scheduler, function () {
560
573
  const {
561
574
  value,
562
575
  done
@@ -570,13 +583,13 @@ function scheduleIterable(input, scheduler) {
570
583
  }
571
584
  });
572
585
  }));
573
- return () => tsplus_module_4.isFunction(iterator?.return) && iterator.return();
586
+ return () => tsplus_module_3.isFunction(iterator?.return) && iterator.return();
574
587
  });
575
588
  }
576
589
 
577
590
  function scheduleObservable(input, scheduler) {
578
- return new tsplus_module_1.Observable(subscriber => {
579
- const sub = new tsplus_module_7.Subscription();
591
+ return new _definition2.Observable(subscriber => {
592
+ const sub = new tsplus_module_6.Subscription();
580
593
  sub.add(scheduler.schedule(() => {
581
594
  sub.add(input.subscribe({
582
595
  next: value => {
@@ -594,7 +607,7 @@ function scheduleObservable(input, scheduler) {
594
607
  }
595
608
 
596
609
  function schedulePromise(input, scheduler) {
597
- return new tsplus_module_1.Observable(subscriber => {
610
+ return new _definition2.Observable(subscriber => {
598
611
  return scheduler.schedule(() => {
599
612
  input.then(value => {
600
613
  subscriber.add(scheduler.schedule(() => {
@@ -602,21 +615,21 @@ function schedulePromise(input, scheduler) {
602
615
  subscriber.add(scheduler.schedule(() => subscriber.complete()));
603
616
  }));
604
617
  }, err => {
605
- subscriber.add(scheduler.schedule(() => subscriber.error(tsplus_module_2.halt(err))));
618
+ subscriber.add(scheduler.schedule(() => subscriber.error(tsplus_module_1.halt(err))));
606
619
  });
607
620
  });
608
621
  });
609
622
  }
610
623
 
611
624
  function scheduleReadableStreamLike(input, scheduler) {
612
- return scheduleAsyncIterable((0, tsplus_module_3.readableStreamToAsyncGenerator)(input), scheduler);
625
+ return scheduleAsyncIterable((0, tsplus_module_2.readableStreamToAsyncGenerator)(input), scheduler);
613
626
  }
614
627
 
615
- function timer_1(time = 0, intervalOrScheduler, scheduler = tsplus_module_6.asyncScheduler) {
628
+ function timer_1(time = 0, intervalOrScheduler, scheduler = tsplus_module_5.asyncScheduler) {
616
629
  let intervalDuration = -1;
617
630
 
618
631
  if (intervalOrScheduler != null) {
619
- if (tsplus_module_8.isScheduler(intervalOrScheduler)) {
632
+ if (tsplus_module_7.isScheduler(intervalOrScheduler)) {
620
633
  // eslint-disable-next-line no-param-reassign
621
634
  scheduler = intervalOrScheduler;
622
635
  } else {
@@ -624,8 +637,8 @@ function timer_1(time = 0, intervalOrScheduler, scheduler = tsplus_module_6.asyn
624
637
  }
625
638
  }
626
639
 
627
- return new tsplus_module_1.Observable(s => {
628
- let due = tsplus_module_3.isValidDate(time) ? +time - scheduler.now() : time;
640
+ return new _definition2.Observable(s => {
641
+ let due = tsplus_module_2.isValidDate(time) ? +time - scheduler.now() : time;
629
642
 
630
643
  if (due < 0) {
631
644
  due = 0;
@@ -651,7 +664,7 @@ function timer_1(time = 0, intervalOrScheduler, scheduler = tsplus_module_6.asyn
651
664
 
652
665
 
653
666
  function makeZip(...sources) {
654
- return sources.length ? new tsplus_module_1.Observable(subscriber => {
667
+ return sources.length ? new _definition2.Observable(subscriber => {
655
668
  let buffers = sources.map(() => []);
656
669
  let completed = sources.map(() => false);
657
670
  subscriber.add(() => {
@@ -659,7 +672,7 @@ function makeZip(...sources) {
659
672
  });
660
673
 
661
674
  for (let sourceIndex = 0; !subscriber.closed && sourceIndex < sources.length; sourceIndex++) {
662
- from_1(sources[sourceIndex]).subscribe(tsplus_module_9.operatorSubscriber(subscriber, {
675
+ from_1(sources[sourceIndex]).subscribe(tsplus_module_8.operatorSubscriber(subscriber, {
663
676
  next: value => {
664
677
  buffers[sourceIndex].push(value);
665
678
 
@@ -689,11 +702,11 @@ function makeZip(...sources) {
689
702
  */
690
703
 
691
704
 
692
- function fromIO_1(io, scheduler = tsplus_module_6.asyncScheduler) {
693
- return new tsplus_module_1.Observable(s => {
705
+ function fromIO_1(io, scheduler = tsplus_module_5.asyncScheduler) {
706
+ return new _definition2.Observable((s, env) => {
694
707
  let fiber;
695
708
  const scheduled = scheduler.schedule(() => {
696
- fiber = tsplus_module_10.unsafeRunFiber(io, fileName_1 + ":473:32");
709
+ fiber = tsplus_module_10.unsafeRunFiber(tsplus_module_9.provideEnvironment_(io, env, fileName_1 + ":487:36"), fileName_1 + ":487:56");
697
710
  fiber.unsafeOnDone(exit => {
698
711
  if (!s.closed) {
699
712
  tsplus_module_11.match_(tsplus_module_11.flatten(exit), cause => s.error(cause), a => s.next(a));
@@ -703,28 +716,16 @@ function fromIO_1(io, scheduler = tsplus_module_6.asyncScheduler) {
703
716
  });
704
717
  return () => {
705
718
  scheduled.unsubscribe();
706
- fiber && tsplus_module_10.unsafeRunAsync(tsplus_module_12.interrupt(fiber), fileName_1 + ":486:46");
719
+ fiber && tsplus_module_10.unsafeRunAsync(tsplus_module_12.interrupt(fiber, fileName_1 + ":500:21"), fileName_1 + ":500:46");
707
720
  };
708
721
  });
709
722
  }
710
- /*
711
- * -------------------------------------------------------------------------------------------------
712
- * Applicative
713
- * -------------------------------------------------------------------------------------------------
714
- */
715
-
716
723
  /**
717
724
  * @tsplus static fncts.observable.ObservableOps unit
718
725
  */
719
726
 
720
727
 
721
728
  const unit = /*#__PURE__*/single_1(undefined);
722
- /*
723
- * -------------------------------------------------------------------------------------------------
724
- * Apply
725
- * -------------------------------------------------------------------------------------------------
726
- */
727
-
728
729
  /**
729
730
  * @tsplus fluent fncts.observable.Observable zipWith
730
731
  */
@@ -750,21 +751,15 @@ function zip(fa, fb) {
750
751
  function ap(fab, fa) {
751
752
  return zipWith_1(fab, fa, (f, a) => f(a));
752
753
  }
753
- /*
754
- * -------------------------------------------------------------------------------------------------
755
- * Functor
756
- * -------------------------------------------------------------------------------------------------
757
- */
758
-
759
754
  /**
760
755
  * @tsplus fluent fncts.observable.Observable mapWithIndex
761
756
  */
762
757
 
763
758
 
764
759
  function mapWithIndex_1(fa, f) {
765
- return tsplus_module_9.operate_(fa, (source, subscriber) => {
760
+ return tsplus_module_8.operate_(fa, (source, subscriber) => {
766
761
  let i = 0;
767
- source.subscribe(new tsplus_module_9.OperatorSubscriber(subscriber, {
762
+ source.subscribe(new tsplus_module_8.OperatorSubscriber(subscriber, {
768
763
  next: value => {
769
764
  subscriber.next(f(i++, value));
770
765
  }
@@ -787,22 +782,16 @@ function map_1(fa, f) {
787
782
  function as_1(fa, b) {
788
783
  return map_1(fa, b);
789
784
  }
790
- /*
791
- * -------------------------------------------------------------------------------------------------
792
- * Bifunctor
793
- * -------------------------------------------------------------------------------------------------
794
- */
795
-
796
785
  /**
797
786
  * @tsplus fluent fncts.observable.Observable mapError
798
787
  */
799
788
 
800
789
 
801
790
  function mapError_(fa, f) {
802
- return tsplus_module_9.operate_(fa, (source, subscriber) => {
803
- source.subscribe(new tsplus_module_9.OperatorSubscriber(subscriber, {
791
+ return tsplus_module_8.operate_(fa, (source, subscriber) => {
792
+ source.subscribe(new tsplus_module_8.OperatorSubscriber(subscriber, {
804
793
  error: err => {
805
- subscriber.error(tsplus_module_2.map_(err, f));
794
+ subscriber.error(tsplus_module_1.map_(err, f));
806
795
  }
807
796
  }));
808
797
  });
@@ -813,13 +802,13 @@ function mapError_(fa, f) {
813
802
 
814
803
 
815
804
  function swap(fa) {
816
- return tsplus_module_9.operate_(fa, (source, subscriber) => {
817
- source.subscribe(new tsplus_module_9.OperatorSubscriber(subscriber, {
805
+ return tsplus_module_8.operate_(fa, (source, subscriber) => {
806
+ source.subscribe(new tsplus_module_8.OperatorSubscriber(subscriber, {
818
807
  next: value => {
819
- subscriber.error(tsplus_module_2.fail(value));
808
+ subscriber.error(tsplus_module_1.fail(value));
820
809
  },
821
810
  error: err => {
822
- tsplus_module_14.match_(tsplus_module_2.failureOrCause(err), e => {
811
+ tsplus_module_14.match_(tsplus_module_1.failureOrCause(err), e => {
823
812
  subscriber.next(e);
824
813
  }, cause => {
825
814
  subscriber.error(cause);
@@ -830,9 +819,9 @@ function swap(fa) {
830
819
  }
831
820
 
832
821
  function filterWithIndex_1(fa, predicate) {
833
- return tsplus_module_9.operate_(fa, (source, subscriber) => {
822
+ return tsplus_module_8.operate_(fa, (source, subscriber) => {
834
823
  let index = 0;
835
- source.subscribe(tsplus_module_9.operatorSubscriber(subscriber, {
824
+ source.subscribe(tsplus_module_8.operatorSubscriber(subscriber, {
836
825
  next: value => predicate(index++, value) && subscriber.next(value)
837
826
  }));
838
827
  });
@@ -847,10 +836,10 @@ function filter_(fa, predicate) {
847
836
 
848
837
 
849
838
  function filterMapWithIndex_1(fa, f) {
850
- return tsplus_module_9.operate_(fa, (source, subscriber) => {
839
+ return tsplus_module_8.operate_(fa, (source, subscriber) => {
851
840
  let index = 0;
852
- source.subscribe(tsplus_module_9.operatorSubscriber(subscriber, {
853
- next: value => tsplus_module_15.match_(f(index++, value), () => tsplus_module_3.noop, b => subscriber.next(b))
841
+ source.subscribe(tsplus_module_8.operatorSubscriber(subscriber, {
842
+ next: value => tsplus_module_15.match_(f(index++, value), () => tsplus_module_2.noop, b => subscriber.next(b))
854
843
  }));
855
844
  });
856
845
  }
@@ -876,18 +865,18 @@ function partition_(fa, predicate) {
876
865
 
877
866
 
878
867
  function partitionMapWithIndex_1(fa, f) {
879
- return [tsplus_module_9.operate_(fa, (source, subscriber) => {
868
+ return [tsplus_module_8.operate_(fa, (source, subscriber) => {
880
869
  let index = 0;
881
- source.subscribe(tsplus_module_9.operatorSubscriber(subscriber, {
870
+ source.subscribe(tsplus_module_8.operatorSubscriber(subscriber, {
882
871
  next: value => {
883
- tsplus_module_14.match_(f(index++, value), b => subscriber.next(b), tsplus_module_3.noop);
872
+ tsplus_module_14.match_(f(index++, value), b => subscriber.next(b), tsplus_module_2.noop);
884
873
  }
885
874
  }));
886
- }), tsplus_module_9.operate_(fa, (source, subscriber) => {
875
+ }), tsplus_module_8.operate_(fa, (source, subscriber) => {
887
876
  let index = 0;
888
- source.subscribe(tsplus_module_9.operatorSubscriber(subscriber, {
877
+ source.subscribe(tsplus_module_8.operatorSubscriber(subscriber, {
889
878
  next: value => {
890
- tsplus_module_14.match_(f(index++, value), tsplus_module_3.noop, c => subscriber.next(c));
879
+ tsplus_module_14.match_(f(index++, value), tsplus_module_2.noop, c => subscriber.next(c));
891
880
  }
892
881
  }));
893
882
  })];
@@ -900,19 +889,31 @@ function partitionMapWithIndex_1(fa, f) {
900
889
  function partitionMap_(fa, f) {
901
890
  return partitionMapWithIndex_1(fa, (_, a) => f(a));
902
891
  }
903
- /*
904
- * -------------------------------------------------------------------------------------------------
905
- * Monad
906
- * -------------------------------------------------------------------------------------------------
892
+ /**
893
+ * @tsplus fluent fncts.observable.Observable provideEnvironment
894
+ */
895
+
896
+
897
+ function provideEnvironment(self, environment) {
898
+ return self.provide(environment);
899
+ }
900
+ /**
901
+ * @tsplus fluent fncts.observable.Observable provideService
907
902
  */
908
903
 
904
+
905
+ function provideService(self, service,
906
+ /** @tsplus auto */
907
+ tag) {
908
+ return contramapEnvironment_1(self, environment => tsplus_module_16.add(environment, service, tag));
909
+ }
909
910
  /**
910
911
  * @tsplus fluent fncts.observable.Observable mergeMapWithIndex
911
912
  */
912
913
 
913
914
 
914
915
  function mergeMapWithIndex_1(ma, f, concurrent = Infinity) {
915
- return tsplus_module_9.operate_(ma, (source, sub) => mergeInternal(source, sub, f, concurrent));
916
+ return tsplus_module_8.operate_(ma, (source, sub) => mergeInternal(source, sub, f, concurrent));
916
917
  }
917
918
  /**
918
919
  * @tsplus fluent fncts.observable.Observable mergeMap
@@ -938,6 +939,14 @@ function concatMapWithIndex(ma, f) {
938
939
  function concatMap_(ma, f) {
939
940
  return mergeMapWithIndex_1(ma, (_, a) => f(a), 1);
940
941
  }
942
+ /**
943
+ * @tsplus fluent fncts.observable.Observable contramapEnvironment
944
+ */
945
+
946
+
947
+ function contramapEnvironment_1(self, f) {
948
+ return environmentWithObservable_1(environment => self.provide(f(environment)));
949
+ }
941
950
  /**
942
951
  * @tsplus getter fncts.observable.Observable flatten
943
952
  */
@@ -946,19 +955,13 @@ function concatMap_(ma, f) {
946
955
  function flatten(mma) {
947
956
  return concatAll_1(mma);
948
957
  }
949
- /*
950
- * -------------------------------------------------------------------------------------------------
951
- * Foldable
952
- * -------------------------------------------------------------------------------------------------
953
- */
954
-
955
958
  /**
956
959
  * @tsplus fluent fncts.observable.Observable foldLeftWithIndex
957
960
  */
958
961
 
959
962
 
960
963
  function foldLeftWithIndex_1(fa, initial, f) {
961
- return tsplus_module_9.operate_(fa, scanInternal(f, initial, true, false, true));
964
+ return tsplus_module_8.operate_(fa, scanInternal(f, initial, true, false, true));
962
965
  }
963
966
  /**
964
967
  * @tsplus fluent fncts.observable.Observable foldLeft
@@ -968,19 +971,13 @@ function foldLeftWithIndex_1(fa, initial, f) {
968
971
  function foldLeft_1(fa, initial, f) {
969
972
  return foldLeftWithIndex_1(fa, initial, (_, b, a) => f(b, a));
970
973
  }
971
- /*
972
- * -------------------------------------------------------------------------------------------------
973
- * combinators
974
- * -------------------------------------------------------------------------------------------------
975
- */
976
-
977
974
  /**
978
975
  * @tsplus fluent fncts.observable.Observable at
979
976
  */
980
977
 
981
978
 
982
979
  function at_(fa, index) {
983
- return onEmpty_1(map_1(take_1(filterWithIndex_1(fa, i => i === index), 1), tsplus_module_16.just), () => tsplus_module_16.nothing());
980
+ return onEmpty_1(map_1(take_1(filterWithIndex_1(fa, i => i === index), 1), tsplus_module_17.just), () => tsplus_module_17.nothing());
984
981
  }
985
982
  /**
986
983
  * @tsplus fluent fncts.observable.Observable audit
@@ -988,8 +985,8 @@ function at_(fa, index) {
988
985
 
989
986
 
990
987
  function audit_1(fa, durationSelector) {
991
- return tsplus_module_9.operate_(fa, (source, subscriber) => {
992
- let lastValue = tsplus_module_16.nothing();
988
+ return tsplus_module_8.operate_(fa, (source, subscriber) => {
989
+ let lastValue = tsplus_module_17.nothing();
993
990
  let durationSubscriber = null;
994
991
  let isComplete = false;
995
992
 
@@ -997,11 +994,11 @@ function audit_1(fa, durationSelector) {
997
994
  durationSubscriber?.unsubscribe();
998
995
  durationSubscriber = null;
999
996
 
1000
- if (tsplus_module_17.isJust(lastValue)) {
997
+ if (tsplus_module_18.isJust(lastValue)) {
1001
998
  const {
1002
999
  value
1003
1000
  } = lastValue;
1004
- lastValue = tsplus_module_16.nothing();
1001
+ lastValue = tsplus_module_17.nothing();
1005
1002
  subscriber.next(value);
1006
1003
  }
1007
1004
 
@@ -1013,12 +1010,12 @@ function audit_1(fa, durationSelector) {
1013
1010
  isComplete && subscriber.complete();
1014
1011
  };
1015
1012
 
1016
- source.subscribe(tsplus_module_9.operatorSubscriber(subscriber, {
1013
+ source.subscribe(tsplus_module_8.operatorSubscriber(subscriber, {
1017
1014
  next: value => {
1018
- lastValue = tsplus_module_16.just(value);
1015
+ lastValue = tsplus_module_17.just(value);
1019
1016
 
1020
1017
  if (!durationSubscriber) {
1021
- from_1(durationSelector(value)).subscribe(durationSubscriber = tsplus_module_9.operatorSubscriber(subscriber, {
1018
+ from_1(durationSelector(value)).subscribe(durationSubscriber = tsplus_module_8.operatorSubscriber(subscriber, {
1022
1019
  next: endDuration,
1023
1020
  complete: cleanupDuration
1024
1021
  }));
@@ -1026,7 +1023,7 @@ function audit_1(fa, durationSelector) {
1026
1023
  },
1027
1024
  complete: () => {
1028
1025
  isComplete = true;
1029
- (tsplus_module_17.isNothing(lastValue) || !durationSubscriber || durationSubscriber.closed) && subscriber.complete();
1026
+ (tsplus_module_18.isNothing(lastValue) || !durationSubscriber || durationSubscriber.closed) && subscriber.complete();
1030
1027
  }
1031
1028
  }));
1032
1029
  });
@@ -1036,7 +1033,7 @@ function audit_1(fa, durationSelector) {
1036
1033
  */
1037
1034
 
1038
1035
 
1039
- function auditTime_(fa, duration, scheduler = tsplus_module_6.asyncScheduler) {
1036
+ function auditTime_(fa, duration, scheduler = tsplus_module_5.asyncScheduler) {
1040
1037
  return audit_1(fa, () => timer_1(duration, scheduler));
1041
1038
  }
1042
1039
  /**
@@ -1045,22 +1042,22 @@ function auditTime_(fa, duration, scheduler = tsplus_module_6.asyncScheduler) {
1045
1042
 
1046
1043
 
1047
1044
  function buffer_(fa, closingNotifier) {
1048
- return tsplus_module_9.operate_(fa, (source, subscriber) => {
1045
+ return tsplus_module_8.operate_(fa, (source, subscriber) => {
1049
1046
  let buffer = [];
1050
- source.subscribe(tsplus_module_9.operatorSubscriber(subscriber, {
1047
+ source.subscribe(tsplus_module_8.operatorSubscriber(subscriber, {
1051
1048
  next: value => buffer.push(value),
1052
1049
  complete: () => {
1053
1050
  subscriber.next(buffer);
1054
1051
  subscriber.complete();
1055
1052
  }
1056
1053
  }));
1057
- closingNotifier.subscribe(tsplus_module_9.operatorSubscriber(subscriber, {
1054
+ closingNotifier.subscribe(tsplus_module_8.operatorSubscriber(subscriber, {
1058
1055
  next: () => {
1059
1056
  const b = buffer;
1060
1057
  buffer = [];
1061
1058
  subscriber.next(b);
1062
1059
  },
1063
- complete: tsplus_module_3.noop
1060
+ complete: tsplus_module_2.noop
1064
1061
  }));
1065
1062
  return () => {
1066
1063
  buffer = null;
@@ -1075,10 +1072,10 @@ function buffer_(fa, closingNotifier) {
1075
1072
  function bufferCount_(fa, bufferSize, startBufferEvery) {
1076
1073
  // eslint-disable-next-line no-param-reassign
1077
1074
  startBufferEvery = startBufferEvery ?? bufferSize;
1078
- return tsplus_module_9.operate_(fa, (source, subscriber) => {
1075
+ return tsplus_module_8.operate_(fa, (source, subscriber) => {
1079
1076
  let buffers = [];
1080
1077
  let count = 0;
1081
- source.subscribe(tsplus_module_9.operatorSubscriber(subscriber, {
1078
+ source.subscribe(tsplus_module_8.operatorSubscriber(subscriber, {
1082
1079
  next: value => {
1083
1080
  let toEmit = null;
1084
1081
 
@@ -1097,7 +1094,7 @@ function bufferCount_(fa, bufferSize, startBufferEvery) {
1097
1094
 
1098
1095
  if (toEmit) {
1099
1096
  for (const buffer of toEmit) {
1100
- (0, tsplus_module_3.arrayRemove)(buffers, buffer);
1097
+ (0, tsplus_module_2.arrayRemove)(buffers, buffer);
1101
1098
  subscriber.next(buffer);
1102
1099
  }
1103
1100
  }
@@ -1124,9 +1121,9 @@ function bufferTime_(fa, config) {
1124
1121
  bufferTimeSpan,
1125
1122
  bufferCreationInterval = null,
1126
1123
  maxBufferSize = Infinity,
1127
- scheduler = tsplus_module_6.asyncScheduler
1124
+ scheduler = tsplus_module_5.asyncScheduler
1128
1125
  } = config;
1129
- return tsplus_module_9.operate_(fa, (source, subscriber) => {
1126
+ return tsplus_module_8.operate_(fa, (source, subscriber) => {
1130
1127
  let bufferRecords = [];
1131
1128
  let restartOnEmit = true;
1132
1129
 
@@ -1136,14 +1133,14 @@ function bufferTime_(fa, config) {
1136
1133
  subs
1137
1134
  } = record;
1138
1135
  subs.unsubscribe();
1139
- (0, tsplus_module_3.arrayRemove)(bufferRecords, record);
1136
+ (0, tsplus_module_2.arrayRemove)(bufferRecords, record);
1140
1137
  subscriber.next(buffer);
1141
1138
  restartOnEmit && startBuffer();
1142
1139
  };
1143
1140
 
1144
1141
  const startBuffer = () => {
1145
1142
  if (bufferRecords) {
1146
- const subs = new tsplus_module_7.Subscription();
1143
+ const subs = new tsplus_module_6.Subscription();
1147
1144
  subscriber.add(subs);
1148
1145
  const buffer = [];
1149
1146
  const record = {
@@ -1160,7 +1157,7 @@ function bufferTime_(fa, config) {
1160
1157
  !this.closed && subscriber.add(this.schedule(null, bufferCreationInterval));
1161
1158
  }, bufferCreationInterval)) : restartOnEmit = true;
1162
1159
  startBuffer();
1163
- const bufferTimeSubscriber = tsplus_module_9.operatorSubscriber(subscriber, {
1160
+ const bufferTimeSubscriber = tsplus_module_8.operatorSubscriber(subscriber, {
1164
1161
  next: value => {
1165
1162
  const recordsCopy = bufferRecords.slice();
1166
1163
 
@@ -1191,28 +1188,28 @@ function bufferTime_(fa, config) {
1191
1188
 
1192
1189
 
1193
1190
  function bufferToggle_(fa, openings, closingSelector) {
1194
- return tsplus_module_9.operate_(fa, (source, subscriber) => {
1191
+ return tsplus_module_8.operate_(fa, (source, subscriber) => {
1195
1192
  const buffers = [];
1196
- from_1(openings).subscribe(tsplus_module_9.operatorSubscriber(subscriber, {
1193
+ from_1(openings).subscribe(tsplus_module_8.operatorSubscriber(subscriber, {
1197
1194
  next: openValue => {
1198
1195
  const buffer = [];
1199
1196
  buffers.push(buffer);
1200
- const closingSubscription = new tsplus_module_7.Subscription();
1197
+ const closingSubscription = new tsplus_module_6.Subscription();
1201
1198
 
1202
1199
  const emitBuffer = () => {
1203
- (0, tsplus_module_3.arrayRemove)(buffers, buffer);
1200
+ (0, tsplus_module_2.arrayRemove)(buffers, buffer);
1204
1201
  subscriber.next(buffer);
1205
1202
  closingSubscription.unsubscribe();
1206
1203
  };
1207
1204
 
1208
- closingSubscription.add(from_1(closingSelector(openValue)).subscribe(tsplus_module_9.operatorSubscriber(subscriber, {
1205
+ closingSubscription.add(from_1(closingSelector(openValue)).subscribe(tsplus_module_8.operatorSubscriber(subscriber, {
1209
1206
  next: emitBuffer,
1210
- complete: tsplus_module_3.noop
1207
+ complete: tsplus_module_2.noop
1211
1208
  })));
1212
1209
  },
1213
- complete: tsplus_module_3.noop
1210
+ complete: tsplus_module_2.noop
1214
1211
  }));
1215
- source.subscribe(tsplus_module_9.operatorSubscriber(subscriber, {
1212
+ source.subscribe(tsplus_module_8.operatorSubscriber(subscriber, {
1216
1213
  next: value => {
1217
1214
  for (const buffer of buffers) {
1218
1215
  buffer.push(value);
@@ -1233,8 +1230,8 @@ function bufferToggle_(fa, openings, closingSelector) {
1233
1230
  */
1234
1231
 
1235
1232
 
1236
- function bufferWhen_1(fa, closingSelector) {
1237
- return tsplus_module_9.operate_(fa, (source, subscriber) => {
1233
+ function bufferWhen_(fa, closingSelector) {
1234
+ return tsplus_module_8.operate_(fa, (source, subscriber) => {
1238
1235
  let buffer = null;
1239
1236
  let closingSubscriber = null;
1240
1237
 
@@ -1243,14 +1240,14 @@ function bufferWhen_1(fa, closingSelector) {
1243
1240
  const b = buffer;
1244
1241
  buffer = [];
1245
1242
  b && subscriber.next(b);
1246
- from_1(closingSelector()).subscribe(closingSubscriber = tsplus_module_9.operatorSubscriber(subscriber, {
1243
+ from_1(closingSelector()).subscribe(closingSubscriber = tsplus_module_8.operatorSubscriber(subscriber, {
1247
1244
  next: openBuffer,
1248
- complete: tsplus_module_3.noop
1245
+ complete: tsplus_module_2.noop
1249
1246
  }));
1250
1247
  };
1251
1248
 
1252
1249
  openBuffer();
1253
- source.subscribe(tsplus_module_9.operatorSubscriber(subscriber, {
1250
+ source.subscribe(tsplus_module_8.operatorSubscriber(subscriber, {
1254
1251
  next: value => buffer?.push(value),
1255
1252
  complete: () => {
1256
1253
  buffer && subscriber.next(buffer);
@@ -1259,21 +1256,17 @@ function bufferWhen_1(fa, closingSelector) {
1259
1256
  }, () => buffer = closingSubscriber = null));
1260
1257
  });
1261
1258
  }
1262
-
1263
- function bufferWhen(closingSelector) {
1264
- return fa => bufferWhen_1(fa, closingSelector);
1265
- }
1266
1259
  /**
1267
1260
  * @tsplus fluent fncts.observable.Observable catchAllCause
1268
1261
  */
1269
1262
 
1270
1263
 
1271
1264
  function catchAllCause_1(self, f) {
1272
- return tsplus_module_9.operate_(self, (source, subscriber) => {
1265
+ return tsplus_module_8.operate_(self, (source, subscriber) => {
1273
1266
  let innerSub = null;
1274
1267
  let syncUnsub = false;
1275
1268
  let handledResult;
1276
- innerSub = source.subscribe(tsplus_module_9.operatorSubscriber(subscriber, {
1269
+ innerSub = source.subscribe(tsplus_module_8.operatorSubscriber(subscriber, {
1277
1270
  error: cause => {
1278
1271
  handledResult = from_1(f(cause, catchAllCause_1(source, f)));
1279
1272
 
@@ -1308,7 +1301,7 @@ function concatAll_1(ffa) {
1308
1301
 
1309
1302
 
1310
1303
  function concat_1(fa, ...sources) {
1311
- return tsplus_module_9.operate_(fa, (source, subscriber) => {
1304
+ return tsplus_module_8.operate_(fa, (source, subscriber) => {
1312
1305
  concatAll_1(fromArrayLike([source, ...sources])).subscribe(subscriber);
1313
1306
  });
1314
1307
  }
@@ -1354,7 +1347,7 @@ function combineLatest_1(self, ...sources) {
1354
1347
  return from_1(self).unsafeCoerce();
1355
1348
  }
1356
1349
 
1357
- return tsplus_module_9.operate_(from_1(self), (source, subscriber) => {
1350
+ return tsplus_module_8.operate_(from_1(self), (source, subscriber) => {
1358
1351
  combineLatestInternal(subscriber, [source, ...sources]);
1359
1352
  });
1360
1353
  }
@@ -1364,30 +1357,30 @@ function combineLatest_1(self, ...sources) {
1364
1357
 
1365
1358
 
1366
1359
  function debounceWith_(fa, durationSelector) {
1367
- return tsplus_module_9.operate_(fa, (source, subscriber) => {
1368
- let lastValue = tsplus_module_16.nothing();
1360
+ return tsplus_module_8.operate_(fa, (source, subscriber) => {
1361
+ let lastValue = tsplus_module_17.nothing();
1369
1362
  let durationSubscriber = null;
1370
1363
 
1371
1364
  const emit = () => {
1372
1365
  durationSubscriber?.unsubscribe();
1373
1366
  durationSubscriber = null;
1374
1367
 
1375
- if (tsplus_module_17.isJust(lastValue)) {
1368
+ if (tsplus_module_18.isJust(lastValue)) {
1376
1369
  const {
1377
1370
  value
1378
1371
  } = lastValue;
1379
- lastValue = tsplus_module_16.nothing();
1372
+ lastValue = tsplus_module_17.nothing();
1380
1373
  subscriber.next(value);
1381
1374
  }
1382
1375
  };
1383
1376
 
1384
- source.subscribe(tsplus_module_9.operatorSubscriber(subscriber, {
1377
+ source.subscribe(tsplus_module_8.operatorSubscriber(subscriber, {
1385
1378
  next: value => {
1386
1379
  durationSubscriber?.unsubscribe();
1387
- lastValue = tsplus_module_16.just(value);
1388
- durationSubscriber = tsplus_module_9.operatorSubscriber(subscriber, {
1380
+ lastValue = tsplus_module_17.just(value);
1381
+ durationSubscriber = tsplus_module_8.operatorSubscriber(subscriber, {
1389
1382
  next: emit,
1390
- complete: tsplus_module_3.noop
1383
+ complete: tsplus_module_2.noop
1391
1384
  });
1392
1385
  from_1(durationSelector(value)).subscribe(durationSubscriber);
1393
1386
  },
@@ -1405,8 +1398,8 @@ function debounceWith_(fa, durationSelector) {
1405
1398
  */
1406
1399
 
1407
1400
 
1408
- function debounce_(fa, dueTime, scheduler = tsplus_module_6.asyncScheduler) {
1409
- return tsplus_module_9.operate_(fa, (source, subscriber) => {
1401
+ function debounce_(fa, dueTime, scheduler = tsplus_module_5.asyncScheduler) {
1402
+ return tsplus_module_8.operate_(fa, (source, subscriber) => {
1410
1403
  let activeTask = null;
1411
1404
  let lastValue = null;
1412
1405
  let lastTime = null;
@@ -1434,7 +1427,7 @@ function debounce_(fa, dueTime, scheduler = tsplus_module_6.asyncScheduler) {
1434
1427
  emit();
1435
1428
  }
1436
1429
 
1437
- source.subscribe(tsplus_module_9.operatorSubscriber(subscriber, {
1430
+ source.subscribe(tsplus_module_8.operatorSubscriber(subscriber, {
1438
1431
  next: value => {
1439
1432
  lastValue = value;
1440
1433
  lastTime = scheduler.now();
@@ -1459,13 +1452,13 @@ function debounce_(fa, dueTime, scheduler = tsplus_module_6.asyncScheduler) {
1459
1452
 
1460
1453
 
1461
1454
  function either(fa) {
1462
- return tsplus_module_9.operate_(fa, (source, subscriber) => {
1463
- source.subscribe(tsplus_module_9.operatorSubscriber(subscriber, {
1455
+ return tsplus_module_8.operate_(fa, (source, subscriber) => {
1456
+ source.subscribe(tsplus_module_8.operatorSubscriber(subscriber, {
1464
1457
  next: value => {
1465
- subscriber.next(tsplus_module_18.right(value));
1458
+ subscriber.next(tsplus_module_19.right(value));
1466
1459
  },
1467
1460
  error: error => {
1468
- tsplus_module_14.match_(tsplus_module_2.failureOrCause(error), e => subscriber.next(tsplus_module_18.left(e)), cause => subscriber.error(cause));
1461
+ tsplus_module_14.match_(tsplus_module_1.failureOrCause(error), e => subscriber.next(tsplus_module_19.left(e)), cause => subscriber.error(cause));
1469
1462
  }
1470
1463
  }));
1471
1464
  });
@@ -1491,7 +1484,7 @@ function delayWith_1(fa, f) {
1491
1484
  */
1492
1485
 
1493
1486
 
1494
- function delay_(fa, due, scheduler = tsplus_module_6.asyncScheduler) {
1487
+ function delay_(fa, due, scheduler = tsplus_module_5.asyncScheduler) {
1495
1488
  const duration = timer_1(due, scheduler);
1496
1489
  return delayWith_1(fa, () => duration);
1497
1490
  }
@@ -1501,9 +1494,9 @@ function delay_(fa, due, scheduler = tsplus_module_6.asyncScheduler) {
1501
1494
 
1502
1495
 
1503
1496
  function dematerialize(fa) {
1504
- return tsplus_module_9.operate_(fa, (source, subscriber) => {
1505
- source.subscribe(tsplus_module_9.operatorSubscriber(subscriber, {
1506
- next: notification => tsplus_module_19.observe_(notification, subscriber)
1497
+ return tsplus_module_8.operate_(fa, (source, subscriber) => {
1498
+ source.subscribe(tsplus_module_8.operatorSubscriber(subscriber, {
1499
+ next: notification => tsplus_module_20.observe_(notification, subscriber)
1507
1500
  }));
1508
1501
  });
1509
1502
  }
@@ -1513,7 +1506,7 @@ function dematerialize(fa) {
1513
1506
 
1514
1507
 
1515
1508
  function ensuring_(fa, finalizer) {
1516
- return tsplus_module_9.operate_(fa, (source, subscriber) => {
1509
+ return tsplus_module_8.operate_(fa, (source, subscriber) => {
1517
1510
  source.subscribe(subscriber);
1518
1511
  subscriber.add(finalizer);
1519
1512
  });
@@ -1524,13 +1517,13 @@ function ensuring_(fa, finalizer) {
1524
1517
 
1525
1518
 
1526
1519
  function exhaustAll(ffa) {
1527
- return tsplus_module_9.operate_(ffa, (source, subscriber) => {
1520
+ return tsplus_module_8.operate_(ffa, (source, subscriber) => {
1528
1521
  let isComplete = false;
1529
1522
  let innerSub = null;
1530
- source.subscribe(tsplus_module_9.operatorSubscriber(subscriber, {
1523
+ source.subscribe(tsplus_module_8.operatorSubscriber(subscriber, {
1531
1524
  next: inner => {
1532
1525
  if (!innerSub) {
1533
- innerSub = from_1(inner).subscribe(tsplus_module_9.operatorSubscriber(subscriber, {
1526
+ innerSub = from_1(inner).subscribe(tsplus_module_8.operatorSubscriber(subscriber, {
1534
1527
  complete: () => {
1535
1528
  innerSub = null;
1536
1529
  isComplete && subscriber.complete();
@@ -1551,14 +1544,14 @@ function exhaustAll(ffa) {
1551
1544
 
1552
1545
 
1553
1546
  function exhaustMapWithIndex_1(self, f) {
1554
- return tsplus_module_9.operate_(self, (source, subscriber) => {
1547
+ return tsplus_module_8.operate_(self, (source, subscriber) => {
1555
1548
  let index = 0;
1556
1549
  let innerSub = null;
1557
1550
  let isComplete = false;
1558
- source.subscribe(tsplus_module_9.operatorSubscriber(subscriber, {
1551
+ source.subscribe(tsplus_module_8.operatorSubscriber(subscriber, {
1559
1552
  next: outerValue => {
1560
1553
  if (!innerSub) {
1561
- innerSub = tsplus_module_9.operatorSubscriber(subscriber, {
1554
+ innerSub = tsplus_module_8.operatorSubscriber(subscriber, {
1562
1555
  complete: () => {
1563
1556
  innerSub = null;
1564
1557
  isComplete && subscriber.complete();
@@ -1590,7 +1583,7 @@ function exhaustMap_(self, f) {
1590
1583
  function expandWithIndex_1(fa, f, concurrent = Infinity) {
1591
1584
  // eslint-disable-next-line no-param-reassign
1592
1585
  concurrent = (concurrent || 0) < 1 ? Infinity : concurrent;
1593
- return tsplus_module_9.operate_(fa, (source, subscriber) => mergeInternal(source, subscriber, f, concurrent, undefined, true));
1586
+ return tsplus_module_8.operate_(fa, (source, subscriber) => mergeInternal(source, subscriber, f, concurrent, undefined, true));
1594
1587
  }
1595
1588
  /**
1596
1589
  * @tsplus fluent fncts.observable.Observable expand
@@ -1602,7 +1595,7 @@ function expand_(fa, f, concurrent = Infinity) {
1602
1595
  }
1603
1596
 
1604
1597
  function findWithIndex_1(fa, predicate) {
1605
- return tsplus_module_9.operate_(fa, findInternal(predicate, "value"));
1598
+ return tsplus_module_8.operate_(fa, findInternal(predicate, "value"));
1606
1599
  }
1607
1600
 
1608
1601
  function find_(fa, predicate) {
@@ -1610,7 +1603,7 @@ function find_(fa, predicate) {
1610
1603
  }
1611
1604
 
1612
1605
  function findIndexWithIndex_1(fa, predicate) {
1613
- return tsplus_module_9.operate_(fa, findInternal(predicate, "index"));
1606
+ return tsplus_module_8.operate_(fa, findInternal(predicate, "index"));
1614
1607
  }
1615
1608
 
1616
1609
  function findIndex_(fa, predicate) {
@@ -1621,8 +1614,8 @@ function forkJoin(...args) {
1621
1614
  const {
1622
1615
  args: sources,
1623
1616
  keys
1624
- } = (0, tsplus_module_3.arrayOrObject)(args);
1625
- return new tsplus_module_1.Observable(s => {
1617
+ } = (0, tsplus_module_2.arrayOrObject)(args);
1618
+ return new _definition2.Observable(s => {
1626
1619
  const length = sources.length;
1627
1620
 
1628
1621
  if (!length) {
@@ -1636,7 +1629,7 @@ function forkJoin(...args) {
1636
1629
 
1637
1630
  for (let sourceIndex = 0; sourceIndex < length; sourceIndex++) {
1638
1631
  let hasValue = false;
1639
- from_1(sources[sourceIndex]).subscribe(tsplus_module_9.operatorSubscriber(s, {
1632
+ from_1(sources[sourceIndex]).subscribe(tsplus_module_8.operatorSubscriber(s, {
1640
1633
  next: value => {
1641
1634
  if (!hasValue) {
1642
1635
  hasValue = true;
@@ -1667,9 +1660,9 @@ function forkJoin(...args) {
1667
1660
 
1668
1661
 
1669
1662
  function ignore(fa) {
1670
- return tsplus_module_9.operate_(fa, (source, subscriber) => {
1671
- source.subscribe(tsplus_module_9.operatorSubscriber(subscriber, {
1672
- next: tsplus_module_3.noop
1663
+ return tsplus_module_8.operate_(fa, (source, subscriber) => {
1664
+ source.subscribe(tsplus_module_8.operatorSubscriber(subscriber, {
1665
+ next: tsplus_module_2.noop
1673
1666
  }));
1674
1667
  });
1675
1668
  }
@@ -1679,8 +1672,8 @@ function ignore(fa) {
1679
1672
 
1680
1673
 
1681
1674
  function isEmpty(fa) {
1682
- return tsplus_module_9.operate_(fa, (source, subscriber) => {
1683
- source.subscribe(tsplus_module_9.operatorSubscriber(subscriber, {
1675
+ return tsplus_module_8.operate_(fa, (source, subscriber) => {
1676
+ source.subscribe(tsplus_module_8.operatorSubscriber(subscriber, {
1684
1677
  next: () => {
1685
1678
  subscriber.next(false);
1686
1679
  subscriber.complete();
@@ -1698,16 +1691,16 @@ function isEmpty(fa) {
1698
1691
 
1699
1692
 
1700
1693
  function materialize(fa) {
1701
- return tsplus_module_9.operate_(fa, (source, subscriber) => {
1702
- source.subscribe(tsplus_module_9.operatorSubscriber(subscriber, {
1694
+ return tsplus_module_8.operate_(fa, (source, subscriber) => {
1695
+ source.subscribe(tsplus_module_8.operatorSubscriber(subscriber, {
1703
1696
  next: value => {
1704
- subscriber.next(tsplus_module_19.next(value));
1697
+ subscriber.next(tsplus_module_20.next(value));
1705
1698
  },
1706
1699
  error: error => {
1707
- subscriber.next(tsplus_module_19.error(error));
1700
+ subscriber.next(tsplus_module_20.error(error));
1708
1701
  },
1709
1702
  complete: () => {
1710
- subscriber.next(tsplus_module_19.complete());
1703
+ subscriber.next(tsplus_module_20.complete());
1711
1704
  }
1712
1705
  }));
1713
1706
  });
@@ -1726,7 +1719,7 @@ function mergeAll_1(self, concurrent = Infinity) {
1726
1719
 
1727
1720
 
1728
1721
  function mergeScanWithIndex_1(fa, initial, f, concurrent = Infinity) {
1729
- return tsplus_module_9.operate_(fa, (source, subscriber) => {
1722
+ return tsplus_module_8.operate_(fa, (source, subscriber) => {
1730
1723
  let state = initial;
1731
1724
  return mergeInternal(source, subscriber, (index, value) => f(index, state, value), concurrent, value => {
1732
1725
  state = value;
@@ -1743,7 +1736,7 @@ function mergeScan_(fa, initial, f, concurrent = Infinity) {
1743
1736
  }
1744
1737
 
1745
1738
  function onErrorResumeNext(fa, ...sources) {
1746
- return tsplus_module_9.operate_(fa, (source, subscriber) => {
1739
+ return tsplus_module_8.operate_(fa, (source, subscriber) => {
1747
1740
  const remaining = [source, ...sources];
1748
1741
 
1749
1742
  const subscribeNext = () => {
@@ -1758,9 +1751,9 @@ function onErrorResumeNext(fa, ...sources) {
1758
1751
  return;
1759
1752
  }
1760
1753
 
1761
- const innerSub = tsplus_module_9.operatorSubscriber(subscriber, {
1762
- error: tsplus_module_3.noop,
1763
- complete: tsplus_module_3.noop
1754
+ const innerSub = tsplus_module_8.operatorSubscriber(subscriber, {
1755
+ error: tsplus_module_2.noop,
1756
+ complete: tsplus_module_2.noop
1764
1757
  });
1765
1758
  subscriber.add(nextSource.subscribe(innerSub));
1766
1759
  innerSub.add(subscribeNext);
@@ -1779,9 +1772,9 @@ function onErrorResumeNext(fa, ...sources) {
1779
1772
 
1780
1773
 
1781
1774
  function onEmpty_1(fa, f) {
1782
- return tsplus_module_9.operate_(fa, (source, subscriber) => {
1775
+ return tsplus_module_8.operate_(fa, (source, subscriber) => {
1783
1776
  let hasValue = false;
1784
- source.subscribe(tsplus_module_9.operatorSubscriber(subscriber, {
1777
+ source.subscribe(tsplus_module_8.operatorSubscriber(subscriber, {
1785
1778
  next: value => {
1786
1779
  hasValue = true;
1787
1780
  subscriber.next(value);
@@ -1802,13 +1795,13 @@ function onEmpty_1(fa, f) {
1802
1795
 
1803
1796
 
1804
1797
  function repeat_(fa, count = Infinity) {
1805
- return count <= 0 ? empty_1() : tsplus_module_9.operate_(fa, (source, subscriber) => {
1798
+ return count <= 0 ? empty_1() : tsplus_module_8.operate_(fa, (source, subscriber) => {
1806
1799
  let repeats = 0;
1807
1800
  let innerSub;
1808
1801
 
1809
1802
  const loop = () => {
1810
1803
  let syncUnsub = false;
1811
- innerSub = source.subscribe(tsplus_module_9.operatorSubscriber(subscriber, {
1804
+ innerSub = source.subscribe(tsplus_module_8.operatorSubscriber(subscriber, {
1812
1805
  complete: () => {
1813
1806
  if (++repeats < count) {
1814
1807
  if (innerSub) {
@@ -1850,13 +1843,13 @@ function retry_(fa, configOrCount = Infinity) {
1850
1843
  count,
1851
1844
  resetOnSuccess = false
1852
1845
  } = config;
1853
- return count <= 0 ? fa : tsplus_module_9.operate_(fa, (source, subscriber) => {
1846
+ return count <= 0 ? fa : tsplus_module_8.operate_(fa, (source, subscriber) => {
1854
1847
  let retries = 0;
1855
1848
  let innerSub;
1856
1849
 
1857
1850
  const loop = () => {
1858
1851
  let syncUnsub = false;
1859
- innerSub = source.subscribe(tsplus_module_9.operatorSubscriber(subscriber, {
1852
+ innerSub = source.subscribe(tsplus_module_8.operatorSubscriber(subscriber, {
1860
1853
  next: value => {
1861
1854
  if (resetOnSuccess) {
1862
1855
  retries = 0;
@@ -1895,10 +1888,10 @@ function retry_(fa, configOrCount = Infinity) {
1895
1888
 
1896
1889
 
1897
1890
  function sample_1(fa, notifier) {
1898
- return tsplus_module_9.operate_(fa, (source, subscriber) => {
1891
+ return tsplus_module_8.operate_(fa, (source, subscriber) => {
1899
1892
  let hasValue = false;
1900
1893
  let lastValue = null;
1901
- source.subscribe(tsplus_module_9.operatorSubscriber(subscriber, {
1894
+ source.subscribe(tsplus_module_8.operatorSubscriber(subscriber, {
1902
1895
  next: value => {
1903
1896
  hasValue = true;
1904
1897
  lastValue = value;
@@ -1914,9 +1907,9 @@ function sample_1(fa, notifier) {
1914
1907
  }
1915
1908
  };
1916
1909
 
1917
- notifier.subscribe(tsplus_module_9.operatorSubscriber(subscriber, {
1910
+ notifier.subscribe(tsplus_module_8.operatorSubscriber(subscriber, {
1918
1911
  next: emit,
1919
- complete: tsplus_module_3.noop
1912
+ complete: tsplus_module_2.noop
1920
1913
  }));
1921
1914
  });
1922
1915
  }
@@ -1925,7 +1918,7 @@ function sample_1(fa, notifier) {
1925
1918
  */
1926
1919
 
1927
1920
 
1928
- function sampleTime_(fa, period, scheduler = tsplus_module_6.asyncScheduler) {
1921
+ function sampleTime_(fa, period, scheduler = tsplus_module_5.asyncScheduler) {
1929
1922
  return sample_1(fa, interval_1(period, scheduler));
1930
1923
  }
1931
1924
  /**
@@ -1934,7 +1927,7 @@ function sampleTime_(fa, period, scheduler = tsplus_module_6.asyncScheduler) {
1934
1927
 
1935
1928
 
1936
1929
  function scanLeftWithIndex_1(fa, initial, f) {
1937
- return tsplus_module_9.operate_(fa, scanInternal(f, initial, true, true));
1930
+ return tsplus_module_8.operate_(fa, scanInternal(f, initial, true, true));
1938
1931
  }
1939
1932
  /**
1940
1933
  * @tsplus fluent fncts.observable.Observable scanLeft
@@ -1944,6 +1937,36 @@ function scanLeftWithIndex_1(fa, initial, f) {
1944
1937
  function scanLeft(fa, initial, f) {
1945
1938
  return scanLeftWithIndex_1(fa, initial, (_, b, a) => f(b, a));
1946
1939
  }
1940
+ /**
1941
+ * @tsplus static fncts.observable.ObservableOps service
1942
+ */
1943
+
1944
+
1945
+ function service(
1946
+ /** @tsplus auto */
1947
+ tag) {
1948
+ return serviceWithObservable_1(service => of_1(service), tag);
1949
+ }
1950
+ /**
1951
+ * @tsplus static fncts.observable.ObservableOps serviceWith
1952
+ */
1953
+
1954
+
1955
+ function serviceWith(f,
1956
+ /** @tsplus auto */
1957
+ tag) {
1958
+ return serviceWithObservable_1(service => of_1(f(service)), tag);
1959
+ }
1960
+ /**
1961
+ * @tsplus static fncts.observable.ObservableOps serviceWithObservable
1962
+ */
1963
+
1964
+
1965
+ function serviceWithObservable_1(f,
1966
+ /** @tsplus auto */
1967
+ tag) {
1968
+ return environmentWithObservable_1(environment => f(tsplus_module_16.unsafeGet(environment, tag)));
1969
+ }
1947
1970
  /**
1948
1971
  * @tsplus fluent fncts.observable.Observable skip
1949
1972
  */
@@ -1958,10 +1981,10 @@ function skip_(fa, count) {
1958
1981
 
1959
1982
 
1960
1983
  function skipLast_(fa, skipCount) {
1961
- return skipCount <= 0 ? fa : tsplus_module_9.operate_(fa, (source, subscriber) => {
1984
+ return skipCount <= 0 ? fa : tsplus_module_8.operate_(fa, (source, subscriber) => {
1962
1985
  let ring = new Array(skipCount);
1963
1986
  let seen = 0;
1964
- source.subscribe(tsplus_module_9.operatorSubscriber(subscriber, {
1987
+ source.subscribe(tsplus_module_8.operatorSubscriber(subscriber, {
1965
1988
  next: value => {
1966
1989
  const valueIndex = seen++;
1967
1990
 
@@ -1986,17 +2009,17 @@ function skipLast_(fa, skipCount) {
1986
2009
 
1987
2010
 
1988
2011
  function skipUntil_(fa, notifier) {
1989
- return tsplus_module_9.operate_(fa, (source, subscriber) => {
2012
+ return tsplus_module_8.operate_(fa, (source, subscriber) => {
1990
2013
  let taking = false;
1991
- const skipSubscriber = tsplus_module_9.operatorSubscriber(subscriber, {
2014
+ const skipSubscriber = tsplus_module_8.operatorSubscriber(subscriber, {
1992
2015
  next: () => {
1993
2016
  skipSubscriber?.unsubscribe();
1994
2017
  taking = true;
1995
2018
  },
1996
- complete: tsplus_module_3.noop
2019
+ complete: tsplus_module_2.noop
1997
2020
  });
1998
2021
  from_1(notifier).subscribe(skipSubscriber);
1999
- source.subscribe(tsplus_module_9.operatorSubscriber(subscriber, {
2022
+ source.subscribe(tsplus_module_8.operatorSubscriber(subscriber, {
2000
2023
  next: value => taking && subscriber.next(value)
2001
2024
  }));
2002
2025
  });
@@ -2007,10 +2030,10 @@ function skipUntil_(fa, notifier) {
2007
2030
 
2008
2031
 
2009
2032
  function skipWhile_(fa, predicate) {
2010
- return tsplus_module_9.operate_(fa, (source, subscriber) => {
2033
+ return tsplus_module_8.operate_(fa, (source, subscriber) => {
2011
2034
  let taking = false;
2012
2035
  let index = 0;
2013
- source.subscribe(tsplus_module_9.operatorSubscriber(subscriber, {
2036
+ source.subscribe(tsplus_module_8.operatorSubscriber(subscriber, {
2014
2037
  next: value => (taking || (taking = !predicate(index++, value))) && subscriber.next(value)
2015
2038
  }));
2016
2039
  });
@@ -2021,7 +2044,7 @@ function skipWhile_(fa, predicate) {
2021
2044
 
2022
2045
 
2023
2046
  function startWith_(fa, ...values) {
2024
- return tsplus_module_9.operate_(fa, (source, subscriber) => {
2047
+ return tsplus_module_8.operate_(fa, (source, subscriber) => {
2025
2048
  // @ts-expect-error
2026
2049
  concat_1(source, values).subscribe(subscriber);
2027
2050
  });
@@ -2032,7 +2055,7 @@ function startWith_(fa, ...values) {
2032
2055
 
2033
2056
 
2034
2057
  function subscribeOn_(fa, scheduler, delay = 0) {
2035
- return tsplus_module_9.operate_(fa, (source, subscriber) => {
2058
+ return tsplus_module_8.operate_(fa, (source, subscriber) => {
2036
2059
  subscriber.add(scheduler.schedule(() => source.subscribe(subscriber), delay));
2037
2060
  });
2038
2061
  }
@@ -2050,18 +2073,18 @@ function switchAll(ffa) {
2050
2073
 
2051
2074
 
2052
2075
  function switchMapWithIndex_1(fa, f) {
2053
- return tsplus_module_9.operate_(fa, (source, subscriber) => {
2076
+ return tsplus_module_8.operate_(fa, (source, subscriber) => {
2054
2077
  let innerSubscriber = null;
2055
2078
  let index = 0;
2056
2079
  let isComplete = false;
2057
2080
 
2058
2081
  const checkComplete = () => isComplete && !innerSubscriber && subscriber.complete();
2059
2082
 
2060
- source.subscribe(tsplus_module_9.operatorSubscriber(subscriber, {
2083
+ source.subscribe(tsplus_module_8.operatorSubscriber(subscriber, {
2061
2084
  next: value => {
2062
2085
  innerSubscriber?.unsubscribe();
2063
2086
  const outerIndex = index++;
2064
- from_1(f(outerIndex, value)).subscribe(innerSubscriber = tsplus_module_9.operatorSubscriber(subscriber, {
2087
+ from_1(f(outerIndex, value)).subscribe(innerSubscriber = tsplus_module_8.operatorSubscriber(subscriber, {
2065
2088
  next: innerValue => subscriber.next(innerValue),
2066
2089
  complete: () => {
2067
2090
  innerSubscriber = null;
@@ -2089,7 +2112,7 @@ function switchMap_1(fa, f) {
2089
2112
 
2090
2113
 
2091
2114
  function switchScanWithIndex_1(fa, initial, f) {
2092
- return tsplus_module_9.operate_(fa, (source, subscriber) => {
2115
+ return tsplus_module_8.operate_(fa, (source, subscriber) => {
2093
2116
  let state = initial;
2094
2117
  switchMapWithIndex_1(source, (index, value) => map_1(from_1(f(index, state, value)), b => (state = b, b))).subscribe(subscriber);
2095
2118
  return () => {
@@ -2111,9 +2134,9 @@ function switchScan_(fa, initial, f) {
2111
2134
 
2112
2135
 
2113
2136
  function take_1(fa, count) {
2114
- return count <= 0 ? empty_1() : tsplus_module_9.operate_(fa, (source, sub) => {
2137
+ return count <= 0 ? empty_1() : tsplus_module_8.operate_(fa, (source, sub) => {
2115
2138
  let seen = 0;
2116
- source.subscribe(new tsplus_module_9.OperatorSubscriber(sub, {
2139
+ source.subscribe(new tsplus_module_8.OperatorSubscriber(sub, {
2117
2140
  next: value => {
2118
2141
  if (++seen <= count) {
2119
2142
  sub.next(value);
@@ -2132,9 +2155,9 @@ function take_1(fa, count) {
2132
2155
 
2133
2156
 
2134
2157
  function takeLast_(fa, count) {
2135
- return count <= 0 ? empty_1() : tsplus_module_9.operate_(fa, (source, subscriber) => {
2158
+ return count <= 0 ? empty_1() : tsplus_module_8.operate_(fa, (source, subscriber) => {
2136
2159
  let buffer = [];
2137
- source.subscribe(tsplus_module_9.operatorSubscriber(subscriber, {
2160
+ source.subscribe(tsplus_module_8.operatorSubscriber(subscriber, {
2138
2161
  next: value => {
2139
2162
  buffer.push(value);
2140
2163
  count < buffer.length && buffer.shift();
@@ -2157,19 +2180,19 @@ function takeLast_(fa, count) {
2157
2180
 
2158
2181
 
2159
2182
  function takeUntil_(fa, notifier) {
2160
- return tsplus_module_9.operate_(fa, (source, subscriber) => {
2161
- from_1(notifier).subscribe(tsplus_module_9.operatorSubscriber(subscriber, {
2183
+ return tsplus_module_8.operate_(fa, (source, subscriber) => {
2184
+ from_1(notifier).subscribe(tsplus_module_8.operatorSubscriber(subscriber, {
2162
2185
  next: () => subscriber.complete(),
2163
- complete: tsplus_module_3.noop
2186
+ complete: tsplus_module_2.noop
2164
2187
  }));
2165
2188
  !subscriber.closed && source.subscribe(subscriber);
2166
2189
  });
2167
2190
  }
2168
2191
 
2169
2192
  function takeWhileWithIndex_1(fa, predicate, inclusive) {
2170
- return tsplus_module_9.operate_(fa, (source, subscriber) => {
2193
+ return tsplus_module_8.operate_(fa, (source, subscriber) => {
2171
2194
  let index = 0;
2172
- source.subscribe(tsplus_module_9.operatorSubscriber(subscriber, {
2195
+ source.subscribe(tsplus_module_8.operatorSubscriber(subscriber, {
2173
2196
  next: value => {
2174
2197
  const result = predicate(index++, value);
2175
2198
  (result || inclusive) && subscriber.next(value);
@@ -2188,8 +2211,8 @@ function takeWhile_(fa, predicate, inclusive) {
2188
2211
 
2189
2212
 
2190
2213
  function tap_(fa, observer) {
2191
- return tsplus_module_9.operate_(fa, (source, subscriber) => {
2192
- source.subscribe(tsplus_module_9.operatorSubscriber(subscriber, {
2214
+ return tsplus_module_8.operate_(fa, (source, subscriber) => {
2215
+ source.subscribe(tsplus_module_8.operatorSubscriber(subscriber, {
2193
2216
  next: value => {
2194
2217
  observer.next?.(value);
2195
2218
  subscriber.next(value);
@@ -2220,8 +2243,8 @@ function throttle_1(fa, durationSelector, {
2220
2243
  leading,
2221
2244
  trailing
2222
2245
  } = defaultThrottleConfig) {
2223
- return tsplus_module_9.operate_(fa, (source, subscriber) => {
2224
- let sendValue = tsplus_module_16.nothing();
2246
+ return tsplus_module_8.operate_(fa, (source, subscriber) => {
2247
+ let sendValue = tsplus_module_17.nothing();
2225
2248
  let throttled = null;
2226
2249
  let isComplete = false;
2227
2250
 
@@ -2240,30 +2263,30 @@ function throttle_1(fa, durationSelector, {
2240
2263
  isComplete && subscriber.complete();
2241
2264
  };
2242
2265
 
2243
- const startThrottling = value => throttled = from_1(durationSelector(value)).subscribe(tsplus_module_9.operatorSubscriber(subscriber, {
2266
+ const startThrottling = value => throttled = from_1(durationSelector(value)).subscribe(tsplus_module_8.operatorSubscriber(subscriber, {
2244
2267
  next: endThrottling,
2245
2268
  complete: cleanupThrottling
2246
2269
  }));
2247
2270
 
2248
2271
  const send = () => {
2249
- if (tsplus_module_17.isJust(sendValue)) {
2272
+ if (tsplus_module_18.isJust(sendValue)) {
2250
2273
  const {
2251
2274
  value
2252
2275
  } = sendValue;
2253
- sendValue = tsplus_module_16.nothing();
2276
+ sendValue = tsplus_module_17.nothing();
2254
2277
  subscriber.next(value);
2255
2278
  !isComplete && startThrottling(value);
2256
2279
  }
2257
2280
  };
2258
2281
 
2259
- source.subscribe(tsplus_module_9.operatorSubscriber(subscriber, {
2282
+ source.subscribe(tsplus_module_8.operatorSubscriber(subscriber, {
2260
2283
  next: value => {
2261
- sendValue = tsplus_module_16.just(value);
2284
+ sendValue = tsplus_module_17.just(value);
2262
2285
  !(throttled && !throttled.closed) && (leading ? send() : startThrottling(value));
2263
2286
  },
2264
2287
  complete: () => {
2265
2288
  isComplete = true;
2266
- !(trailing && tsplus_module_17.isJust(sendValue) && throttled && !throttled.closed) && subscriber.complete();
2289
+ !(trailing && tsplus_module_18.isJust(sendValue) && throttled && !throttled.closed) && subscriber.complete();
2267
2290
  }
2268
2291
  }));
2269
2292
  });
@@ -2273,7 +2296,7 @@ function throttle_1(fa, durationSelector, {
2273
2296
  */
2274
2297
 
2275
2298
 
2276
- function throttleTime_(fa, duration, scheduler = tsplus_module_6.asyncScheduler, config = defaultThrottleConfig) {
2299
+ function throttleTime_(fa, duration, scheduler = tsplus_module_5.asyncScheduler, config = defaultThrottleConfig) {
2277
2300
  const duration$ = timer_1(duration, scheduler);
2278
2301
  return throttle_1(fa, () => duration$, config);
2279
2302
  }
@@ -2294,18 +2317,18 @@ function timeout_(fa, config) {
2294
2317
  first,
2295
2318
  each,
2296
2319
  with: _with = timeoutError,
2297
- scheduler = tsplus_module_6.asyncScheduler,
2320
+ scheduler = tsplus_module_5.asyncScheduler,
2298
2321
  meta = null
2299
2322
  } = config;
2300
- return tsplus_module_9.operate_(fa, (source, subscriber) => {
2323
+ return tsplus_module_8.operate_(fa, (source, subscriber) => {
2301
2324
  // eslint-disable-next-line prefer-const
2302
2325
  let originalSourceSubscription;
2303
2326
  let timerSubscription;
2304
- let lastValue = tsplus_module_16.nothing();
2327
+ let lastValue = tsplus_module_17.nothing();
2305
2328
  let seen = 0;
2306
2329
 
2307
2330
  const startTimer = delay => {
2308
- timerSubscription = (0, tsplus_module_8.caughtSchedule)(subscriber, scheduler, () => {
2331
+ timerSubscription = (0, tsplus_module_7.caughtSchedule)(subscriber, scheduler, () => {
2309
2332
  originalSourceSubscription.unsubscribe();
2310
2333
  from_1(_with({
2311
2334
  meta,
@@ -2315,11 +2338,11 @@ function timeout_(fa, config) {
2315
2338
  }, delay);
2316
2339
  };
2317
2340
 
2318
- originalSourceSubscription = source.subscribe(tsplus_module_9.operatorSubscriber(subscriber, {
2341
+ originalSourceSubscription = source.subscribe(tsplus_module_8.operatorSubscriber(subscriber, {
2319
2342
  next: value => {
2320
2343
  timerSubscription?.unsubscribe();
2321
2344
  seen++;
2322
- lastValue = tsplus_module_16.just(value);
2345
+ lastValue = tsplus_module_17.just(value);
2323
2346
  subscriber.next(value);
2324
2347
  each > 0 && startTimer(each);
2325
2348
  }
@@ -2328,7 +2351,7 @@ function timeout_(fa, config) {
2328
2351
  timerSubscription?.unsubscribe();
2329
2352
  }
2330
2353
 
2331
- lastValue = tsplus_module_16.nothing();
2354
+ lastValue = tsplus_module_17.nothing();
2332
2355
  }));
2333
2356
  startTimer(first != null ? typeof first === "number" ? first : +first - scheduler.now() : each);
2334
2357
  });
@@ -2347,7 +2370,7 @@ function toArrayAccumulator(arr, value) {
2347
2370
 
2348
2371
 
2349
2372
  function toArray_1(fa) {
2350
- return tsplus_module_9.operate_(fa, (source, subscriber) => {
2373
+ return tsplus_module_8.operate_(fa, (source, subscriber) => {
2351
2374
  foldLeft_1(source, [], toArrayAccumulator).subscribe(subscriber);
2352
2375
  });
2353
2376
  }
@@ -2357,31 +2380,31 @@ function toArray_1(fa) {
2357
2380
 
2358
2381
 
2359
2382
  function unique_(fa, toKey, flushes) {
2360
- return tsplus_module_9.operate_(fa, (source, subscriber) => {
2361
- let distinctKeys = tsplus_module_20.makeDefault();
2362
- source.subscribe(tsplus_module_9.operatorSubscriber(subscriber, {
2383
+ return tsplus_module_8.operate_(fa, (source, subscriber) => {
2384
+ let distinctKeys = tsplus_module_21.makeDefault();
2385
+ source.subscribe(tsplus_module_8.operatorSubscriber(subscriber, {
2363
2386
  next: value => {
2364
2387
  const key = toKey ? toKey(value) : value;
2365
2388
 
2366
- if (!tsplus_module_20.has_(distinctKeys, key)) {
2367
- tsplus_module_20.add_(distinctKeys, key);
2389
+ if (!tsplus_module_21.has_(distinctKeys, key)) {
2390
+ tsplus_module_21.add_(distinctKeys, key);
2368
2391
  subscriber.next(value);
2369
2392
  }
2370
2393
  }
2371
2394
  }));
2372
- flushes?.subscribe(tsplus_module_9.operatorSubscriber(subscriber, {
2373
- next: () => distinctKeys = tsplus_module_20.makeDefault(),
2374
- complete: tsplus_module_3.noop
2395
+ flushes?.subscribe(tsplus_module_8.operatorSubscriber(subscriber, {
2396
+ next: () => distinctKeys = tsplus_module_21.makeDefault(),
2397
+ complete: tsplus_module_2.noop
2375
2398
  }));
2376
2399
  });
2377
2400
  }
2378
2401
 
2379
2402
  function uniqueUntilChanged_1(fa, E, keySelector = tsplus_module_13.identity) {
2380
2403
  const compare = "equals" in E ? E.equals : E;
2381
- return tsplus_module_9.operate_(fa, (source, subscriber) => {
2404
+ return tsplus_module_8.operate_(fa, (source, subscriber) => {
2382
2405
  let previousKey;
2383
2406
  let first = true;
2384
- source.subscribe(tsplus_module_9.operatorSubscriber(subscriber, {
2407
+ source.subscribe(tsplus_module_8.operatorSubscriber(subscriber, {
2385
2408
  next: value => {
2386
2409
  const currentKey = keySelector(value);
2387
2410
 
@@ -2399,12 +2422,6 @@ function uniqueUntilKeyChanged_(fa, key, equals) {
2399
2422
  const compare = "equals" in equals ? equals.equals : equals;
2400
2423
  return uniqueUntilChanged_1(fa, (x, y) => compare(x[key], y[key]));
2401
2424
  }
2402
- /*
2403
- * -------------------------------------------------------------------------------------------------
2404
- * internal
2405
- * -------------------------------------------------------------------------------------------------
2406
- */
2407
-
2408
2425
 
2409
2426
  function combineLatestInternal(subscriber, observables, scheduler, valueTransform = tsplus_module_13.identity) {
2410
2427
  return maybeSchedule(subscriber, scheduler, () => {
@@ -2419,7 +2436,7 @@ function combineLatestInternal(subscriber, observables, scheduler, valueTransfor
2419
2436
  maybeSchedule(subscriber, scheduler, () => {
2420
2437
  const source = scheduler ? scheduled_1(observables[i], scheduler) : from_1(observables[i]);
2421
2438
  let hasFirstValue = false;
2422
- source.subscribe(tsplus_module_9.operatorSubscriber(subscriber, {
2439
+ source.subscribe(tsplus_module_8.operatorSubscriber(subscriber, {
2423
2440
  next: value => {
2424
2441
  values[i] = value;
2425
2442
 
@@ -2447,17 +2464,17 @@ function findInternal(predicate, emit) {
2447
2464
  const findIndex = emit === "index";
2448
2465
  return (source, subscriber) => {
2449
2466
  let index = 0;
2450
- source.subscribe(tsplus_module_9.operatorSubscriber(subscriber, {
2467
+ source.subscribe(tsplus_module_8.operatorSubscriber(subscriber, {
2451
2468
  next: value => {
2452
2469
  const i = index++;
2453
2470
 
2454
2471
  if (predicate(index++, value)) {
2455
- subscriber.next(findIndex ? i : tsplus_module_16.just(value));
2472
+ subscriber.next(findIndex ? i : tsplus_module_17.just(value));
2456
2473
  subscriber.complete();
2457
2474
  }
2458
2475
  },
2459
2476
  complete: () => {
2460
- subscriber.next(findIndex ? -1 : tsplus_module_16.nothing());
2477
+ subscriber.next(findIndex ? -1 : tsplus_module_17.nothing());
2461
2478
  subscriber.complete();
2462
2479
  }
2463
2480
  }));
@@ -2494,7 +2511,7 @@ function mergeInternal(source, subscriber, f, concurrent, onBeforeNext, expand,
2494
2511
  expand && subscriber.next(a);
2495
2512
  active++;
2496
2513
  let innerComplete = false;
2497
- from_1(f(index++, a)).subscribe(new tsplus_module_9.OperatorSubscriber(subscriber, {
2514
+ from_1(f(index++, a)).subscribe(new tsplus_module_8.OperatorSubscriber(subscriber, {
2498
2515
  next: b => {
2499
2516
  onBeforeNext?.(b);
2500
2517
 
@@ -2519,13 +2536,13 @@ function mergeInternal(source, subscriber, f, concurrent, onBeforeNext, expand,
2519
2536
 
2520
2537
  checkComplete();
2521
2538
  } catch (err) {
2522
- subscriber.error(tsplus_module_2.halt(err));
2539
+ subscriber.error(tsplus_module_1.halt(err));
2523
2540
  }
2524
2541
  }
2525
2542
  }));
2526
2543
  };
2527
2544
 
2528
- source.subscribe(new tsplus_module_9.OperatorSubscriber(subscriber, {
2545
+ source.subscribe(new tsplus_module_8.OperatorSubscriber(subscriber, {
2529
2546
  next: outerNext,
2530
2547
  complete: () => {
2531
2548
  isComplete = true;
@@ -2542,7 +2559,7 @@ function scanInternal(f, initial, hasInitial, emitOnNext, emitBeforeComplete) {
2542
2559
  let hasState = hasInitial;
2543
2560
  let state = initial;
2544
2561
  let index = 0;
2545
- source.subscribe(tsplus_module_9.operatorSubscriber(subscriber, {
2562
+ source.subscribe(tsplus_module_8.operatorSubscriber(subscriber, {
2546
2563
  next: value => {
2547
2564
  const i = index++;
2548
2565
  state = hasState ? f(i, state, value) : (hasState = true, value);