Kargi-Sitesi/.angular/cache/18.2.11/babel-webpack/7545f7d1465fee698d7e432e24d5f3820fdef2668b5480e9500d73c24edec067.json

1 line
8.8 KiB
JSON
Raw Normal View History

2024-11-04 02:30:09 +00:00
{"ast":null,"code":"import { SimpleOuterSubscriber, SimpleInnerSubscriber, innerSubscribe } from '../innerSubscribe';\nexport function mergeScan(accumulator, seed, concurrent = Number.POSITIVE_INFINITY) {\n return source => source.lift(new MergeScanOperator(accumulator, seed, concurrent));\n}\nexport class MergeScanOperator {\n constructor(accumulator, seed, concurrent) {\n this.accumulator = accumulator;\n this.seed = seed;\n this.concurrent = concurrent;\n }\n call(subscriber, source) {\n return source.subscribe(new MergeScanSubscriber(subscriber, this.accumulator, this.seed, this.concurrent));\n }\n}\nexport class MergeScanSubscriber extends SimpleOuterSubscriber {\n constructor(destination, accumulator, acc, concurrent) {\n super(destination);\n this.accumulator = accumulator;\n this.acc = acc;\n this.concurrent = concurrent;\n this.hasValue = false;\n this.hasCompleted = false;\n this.buffer = [];\n this.active = 0;\n this.index = 0;\n }\n _next(value) {\n if (this.active < this.concurrent) {\n const index = this.index++;\n const destination = this.destination;\n let ish;\n try {\n const {\n accumulator\n } = this;\n ish = accumulator(this.acc, value, index);\n } catch (e) {\n return destination.error(e);\n }\n this.active++;\n this._innerSub(ish);\n } else {\n this.buffer.push(value);\n }\n }\n _innerSub(ish) {\n const innerSubscriber = new SimpleInnerSubscriber(this);\n const destination = this.destination;\n destination.add(innerSubscriber);\n const innerSubscription = innerSubscribe(ish, innerSubscriber);\n if (innerSubscription !== innerSubscriber) {\n destination.add(innerSubscription);\n }\n }\n _complete() {\n this.hasCompleted = true;\n if (this.active === 0 && this.buffer.length === 0) {\n if (this.hasValue === false) {\n this.destination.next(this.acc);\n }\n this.destination.complete();\n }\n this.unsubscribe();\n }\n notifyNext(innerValue) {\n const {\n destination\n } = this;\n this.acc = innerValue;\n this.hasValue = true;\n destination.next(innerValue);\n }\n notifyComplete() {\n const buffer = this.buffer;\n this.active--;\n if (buffer.length > 0) {\n this._next(buffer.shift());\n } else if (this.active === 0 && this.hasCompleted) {\n if (this.hasValue === false) {\n this.destination.next(this.acc);\n }\n this.destination.complete();\n }\n }\n}","map":{"version":3,"names":["SimpleOuterSubscriber","SimpleInnerSubscriber","innerSubscribe","mergeScan","accumulator","seed","concurrent","Number","POSITIVE_INFINITY","source","lift","MergeScanOperator","constructor","call","subscriber","subscribe","MergeScanSubscriber","destination","acc","hasValue","hasCompleted","buffer","active","index","_next","value","ish","e","error","_innerSub","push","innerSubscriber","add","innerSubscription","_complete","length","next","complete","unsubscribe","notifyNext","innerValue","notifyComplete","shift"],"sources":["/home/arctichawk1/Desktop/Projects/Public/Kargi-Sitesi/node_modules/rxjs/_esm2015/internal/operators/mergeScan.js"],"sourcesContent":["import { SimpleOuterSubscriber, SimpleInnerSubscriber, innerSubscribe } from '../innerSubscribe';\nexport function mergeScan(accumulator, seed, concurrent = Number.POSITIVE_INFINITY) {\n return (source) => source.lift(new MergeScanOperator(accumulator, seed, concurrent));\n}\nexport class MergeScanOperator {\n constructor(accumulator, seed, concurrent) {\n this.accumulator = accumulator;\n this.seed = seed;\n this.concurrent = concurrent;\n }\n call(subscriber, source) {\n return source.subscribe(new MergeScanSubscriber(subscriber, this.accumulator, this.seed, this.concurrent));\n }\n}\nexport class MergeScanSubscriber extends SimpleOuterSubscriber {\n constructor(destination, accumulator, acc, concurrent) {\n super(destination);\n this.accumulator = accumul