Files
WrenchBoardIonic2023/.angular/cache/14.2.0/babel-webpack/8cf0aaa4ef1c94ac8d3adb91fe112c15.json
T
CHIEFSOFT\ameye cea49e295a first commit
2023-05-12 22:30:08 -04:00

1 line
6.9 KiB
JSON

{"ast":null,"code":"import { map } from './map';\nimport { from } from '../observable/from';\nimport { SimpleOuterSubscriber, SimpleInnerSubscriber, innerSubscribe } from '../innerSubscribe';\nexport function switchMap(project, resultSelector) {\n if (typeof resultSelector === 'function') {\n return source => source.pipe(switchMap((a, i) => from(project(a, i)).pipe(map((b, ii) => resultSelector(a, b, i, ii)))));\n }\n\n return source => source.lift(new SwitchMapOperator(project));\n}\n\nclass SwitchMapOperator {\n constructor(project) {\n this.project = project;\n }\n\n call(subscriber, source) {\n return source.subscribe(new SwitchMapSubscriber(subscriber, this.project));\n }\n\n}\n\nclass SwitchMapSubscriber extends SimpleOuterSubscriber {\n constructor(destination, project) {\n super(destination);\n this.project = project;\n this.index = 0;\n }\n\n _next(value) {\n let result;\n const index = this.index++;\n\n try {\n result = this.project(value, index);\n } catch (error) {\n this.destination.error(error);\n return;\n }\n\n this._innerSub(result);\n }\n\n _innerSub(result) {\n const innerSubscription = this.innerSubscription;\n\n if (innerSubscription) {\n innerSubscription.unsubscribe();\n }\n\n const innerSubscriber = new SimpleInnerSubscriber(this);\n const destination = this.destination;\n destination.add(innerSubscriber);\n this.innerSubscription = innerSubscribe(result, innerSubscriber);\n\n if (this.innerSubscription !== innerSubscriber) {\n destination.add(this.innerSubscription);\n }\n }\n\n _complete() {\n const {\n innerSubscription\n } = this;\n\n if (!innerSubscription || innerSubscription.closed) {\n super._complete();\n }\n\n this.unsubscribe();\n }\n\n _unsubscribe() {\n this.innerSubscription = undefined;\n }\n\n notifyComplete() {\n this.innerSubscription = undefined;\n\n if (this.isStopped) {\n super._complete();\n }\n }\n\n notifyNext(innerValue) {\n this.destination.next(innerValue);\n }\n\n}","map":{"version":3,"names":["map","from","SimpleOuterSubscriber","SimpleInnerSubscriber","innerSubscribe","switchMap","project","resultSelector","source","pipe","a","i","b","ii","lift","SwitchMapOperator","constructor","call","subscriber","subscribe","SwitchMapSubscriber","destination","index","_next","value","result","error","_innerSub","innerSubscription","unsubscribe","innerSubscriber","add","_complete","closed","_unsubscribe","undefined","notifyComplete","isStopped","notifyNext","innerValue","next"],"sources":["D:/MobileDev/WRB/WrenchBoard2023a/node_modules/rxjs/_esm2015/internal/operators/switchMap.js"],"sourcesContent":["import { map } from './map';\nimport { from } from '../observable/from';\nimport { SimpleOuterSubscriber, SimpleInnerSubscriber, innerSubscribe } from '../innerSubscribe';\nexport function switchMap(project, resultSelector) {\n if (typeof resultSelector === 'function') {\n return (source) => source.pipe(switchMap((a, i) => from(project(a, i)).pipe(map((b, ii) => resultSelector(a, b, i, ii)))));\n }\n return (source) => source.lift(new SwitchMapOperator(project));\n}\nclass SwitchMapOperator {\n constructor(project) {\n this.project = project;\n }\n call(subscriber, source) {\n return source.subscribe(new SwitchMapSubscriber(subscriber, this.project));\n }\n}\nclass SwitchMapSubscriber extends SimpleOuterSubscriber {\n constructor(destination, project) {\n super(destination);\n this.project = project;\n this.index = 0;\n }\n _next(value) {\n let result;\n const index = this.index++;\n try {\n result = this.project(value, index);\n }\n catch (error) {\n this.destination.error(error);\n return;\n }\n this._innerSub(result);\n }\n _innerSub(result) {\n const innerSubscription = this.innerSubscription;\n if (innerSubscription) {\n innerSubscription.unsubscribe();\n }\n const innerSubscriber = new SimpleInnerSubscriber(this);\n const destination = this.destination;\n destination.add(innerSubscriber);\n this.innerSubscription = innerSubscribe(result, innerSubscriber);\n if (this.innerSubscription !== innerSubscriber) {\n destination.add(this.innerSubscription);\n }\n }\n _complete() {\n const { innerSubscription } = this;\n if (!innerSubscription || innerSubscription.closed) {\n super._complete();\n }\n this.unsubscribe();\n }\n _unsubscribe() {\n this.innerSubscription = undefined;\n }\n notifyComplete() {\n this.innerSubscription = undefined;\n if (this.isStopped) {\n super._complete();\n }\n }\n notifyNext(innerValue) {\n this.destination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