Kargi-Sitesi/.angular/cache/16.2.16/babel-webpack/e52a6582c82029cf4c4353beec19c8dfb69d60f87fee2ba84b0312e022aa1ff2.json

1 line
5.5 KiB
JSON
Raw Normal View History

2024-10-31 19:07:58 +00:00
{"ast":null,"code":"import { Subscriber } from '../Subscriber';\nimport { EmptyError } from '../util/EmptyError';\nexport function single(predicate) {\n return source => source.lift(new SingleOperator(predicate, source));\n}\nclass SingleOperator {\n constructor(predicate, source) {\n this.predicate = predicate;\n this.source = source;\n }\n call(subscriber, source) {\n return source.subscribe(new SingleSubscriber(subscriber, this.predicate, this.source));\n }\n}\nclass SingleSubscriber extends Subscriber {\n constructor(destination, predicate, source) {\n super(destination);\n this.predicate = predicate;\n this.source = source;\n this.seenValue = false;\n this.index = 0;\n }\n applySingleValue(value) {\n if (this.seenValue) {\n this.destination.error('Sequence contains more than one element');\n } else {\n this.seenValue = true;\n this.singleValue = value;\n }\n }\n _next(value) {\n const index = this.index++;\n if (this.predicate) {\n this.tryNext(value, index);\n } else {\n this.applySingleValue(value);\n }\n }\n tryNext(value, index) {\n try {\n if (this.predicate(value, index, this.source)) {\n this.applySingleValue(value);\n }\n } catch (err) {\n this.destination.error(err);\n }\n }\n _complete() {\n const destination = this.destination;\n if (this.index > 0) {\n destination.next(this.seenValue ? this.singleValue : undefined);\n destination.complete();\n } else {\n destination.error(new EmptyError());\n }\n }\n}","map":{"version":3,"names":["Subscriber","EmptyError","single","predicate","source","lift","SingleOperator","constructor","call","subscriber","subscribe","SingleSubscriber","destination","seenValue","index","applySingleValue","value","error","singleValue","_next","tryNext","err","_complete","next","undefined","complete"],"sources":["/home/arctichawk1/Desktop/Projects/Public/Kargi-Sitesi/node_modules/rxjs/_esm2015/internal/operators/single.js"],"sourcesContent":["import { Subscriber } from '../Subscriber';\nimport { EmptyError } from '../util/EmptyError';\nexport function single(predicate) {\n return (source) => source.lift(new SingleOperator(predicate, source));\n}\nclass SingleOperator {\n constructor(predicate, source) {\n this.predicate = predicate;\n this.source = source;\n }\n call(subscriber, source) {\n return source.subscribe(new SingleSubscriber(subscriber, this.predicate, this.source));\n }\n}\nclass SingleSubscriber extends Subscriber {\n constructor(destination, predicate, source) {\n super(destination);\n this.predicate = predicate;\n this.source = source;\n this.seenValue = false;\n this.index = 0;\n }\n applySingleValue(value) {\n if (this.seenValue) {\n this.destination.error('Sequence contains more than one element');\n }\n else {\n this.seenValue = true;\n this.singleValue = value;\n }\n }\n _next(value) {\n const index = this.index++;\n if (this.predicate) {\n this.tryNext(value, index);\n }\n else {\n this.applySingleValue(value);\n }\n }\n tryNext(value, index) {\n try {\n if (this.predicate(value, index, this.source)) {\n this.applySingleValue(value);\n }\n }\n catch (err) {\n this.destination.error(err);\n }\n }\n _complete() {\n const destination = this.destination;\n if (this.index > 0) {\n destination.next(this.seenValue ? this.singleValue : undefined);\n destination.complete();\n }\n else {\n destination.error(new EmptyError);\n }\n }\n}\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,eAAe;AAC1C,SAASC,UAAU,QAAQ,oBAAoB;AAC/C,OAAO,SAASC,MAAMA,CAACC,SAAS,EAAE;EAC9B,OAAQC,MAAM,IAAKA,MAAM,CAACC,IAAI,CAAC,IAAIC,cAAc,CAACH,SAAS,EAAEC,MAAM,CAAC,CAAC;AACzE;AACA,MAAME,cAAc,CAAC;EACjBC,WAAWA,CAACJ,SAAS,E