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

1 line
5.2 KiB
JSON

{"ast":null,"code":"import { Subscriber } from '../Subscriber';\nimport { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError';\nimport { empty } from '../observable/empty';\nexport function takeLast(count) {\n return function takeLastOperatorFunction(source) {\n if (count === 0) {\n return empty();\n } else {\n return source.lift(new TakeLastOperator(count));\n }\n };\n}\n\nclass TakeLastOperator {\n constructor(total) {\n this.total = total;\n\n if (this.total < 0) {\n throw new ArgumentOutOfRangeError();\n }\n }\n\n call(subscriber, source) {\n return source.subscribe(new TakeLastSubscriber(subscriber, this.total));\n }\n\n}\n\nclass TakeLastSubscriber extends Subscriber {\n constructor(destination, total) {\n super(destination);\n this.total = total;\n this.ring = new Array();\n this.count = 0;\n }\n\n _next(value) {\n const ring = this.ring;\n const total = this.total;\n const count = this.count++;\n\n if (ring.length < total) {\n ring.push(value);\n } else {\n const index = count % total;\n ring[index] = value;\n }\n }\n\n _complete() {\n const destination = this.destination;\n let count = this.count;\n\n if (count > 0) {\n const total = this.count >= this.total ? this.total : this.count;\n const ring = this.ring;\n\n for (let i = 0; i < total; i++) {\n const idx = count++ % total;\n destination.next(ring[idx]);\n }\n }\n\n destination.complete();\n }\n\n}","map":{"version":3,"names":["Subscriber","ArgumentOutOfRangeError","empty","takeLast","count","takeLastOperatorFunction","source","lift","TakeLastOperator","constructor","total","call","subscriber","subscribe","TakeLastSubscriber","destination","ring","Array","_next","value","length","push","index","_complete","i","idx","next","complete"],"sources":["D:/MobileDev/WRB/WrenchBoard2023a/node_modules/rxjs/_esm2015/internal/operators/takeLast.js"],"sourcesContent":["import { Subscriber } from '../Subscriber';\nimport { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError';\nimport { empty } from '../observable/empty';\nexport function takeLast(count) {\n return function takeLastOperatorFunction(source) {\n if (count === 0) {\n return empty();\n }\n else {\n return source.lift(new TakeLastOperator(count));\n }\n };\n}\nclass TakeLastOperator {\n constructor(total) {\n this.total = total;\n if (this.total < 0) {\n throw new ArgumentOutOfRangeError;\n }\n }\n call(subscriber, source) {\n return source.subscribe(new TakeLastSubscriber(subscriber, this.total));\n }\n}\nclass TakeLastSubscriber extends Subscriber {\n constructor(destination, total) {\n super(destination);\n this.total = total;\n this.ring = new Array();\n this.count = 0;\n }\n _next(value) {\n const ring = this.ring;\n const total = this.total;\n const count = this.count++;\n if (ring.length < total) {\n ring.push(value);\n }\n else {\n const index = count % total;\n ring[index] = value;\n }\n }\n _complete() {\n const destination = this.destination;\n let count = this.count;\n if (count > 0) {\n const total = this.count >= this.total ? this.total : this.count;\n const ring = this.ring;\n for (let i = 0; i < total; i++) {\n const idx = (count++) % total;\n destination.next(ring[idx]);\n }\n }\n destination.complete();\n }\n}\n"],"mappings":"AAAA,SAASA,UAAT,QAA2B,eAA3B;AACA,SAASC,uBAAT,QAAwC,iCAAxC;AACA,SAASC,KAAT,QAAsB,qBAAtB;AACA,OAAO,SAASC,QAAT,CAAkBC,KAAlB,EAAyB;EAC5B,OAAO,SAASC,wBAAT,CAAkCC,MAAlC,EAA0C;IAC7C,IAAIF,KAAK,KAAK,CAAd,EAAiB;MACb,OAAOF,KAAK,EAAZ;IACH,CAFD,MAGK;MACD,OAAOI,MAAM,CAACC,IAAP,CAAY,IAAIC,gBAAJ,CAAqBJ,KAArB,CAAZ,CAAP;IACH;EACJ,CAPD;AAQH;;AACD,MAAMI,gBAAN,CAAuB;EACnBC,WAAW,CAACC,KAAD,EAAQ;IACf,KAAKA,KAAL,GAAaA,KAAb;;IACA,IAAI,KAAKA,KAAL,GAAa,CAAjB,EAAoB;MAChB,MAAM,IAAIT,uBAAJ,EAAN;IACH;EACJ;;EACDU,IAAI,CAACC,UAAD,EAAaN,MAAb,EAAqB;IACrB,OAAOA,MAAM,CAACO,SAAP,CAAiB,IAAIC,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