{"ast":null,"code":"import { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\nexport function debounce(durationSelector) {\n return source => source.lift(new DebounceOperator(durationSelector));\n}\nclass DebounceOperator {\n constructor(durationSelector) {\n this.durationSelector = durationSelector;\n }\n call(subscriber, source) {\n return source.subscribe(new DebounceSubscriber(subscriber, this.durationSelector));\n }\n}\nclass DebounceSubscriber extends SimpleOuterSubscriber {\n constructor(destination, durationSelector) {\n super(destination);\n this.durationSelector = durationSelector;\n this.hasValue = false;\n }\n _next(value) {\n try {\n const result = this.durationSelector.call(this, value);\n if (result) {\n this._tryNext(value, result);\n }\n } catch (err) {\n this.destination.error(err);\n }\n }\n _complete() {\n this.emitValue();\n this.destination.complete();\n }\n _tryNext(value, duration) {\n let subscription = this.durationSubscription;\n this.value = value;\n this.hasValue = true;\n if (subscription) {\n subscription.unsubscribe();\n this.remove(subscription);\n }\n subscription = innerSubscribe(duration, new SimpleInnerSubscriber(this));\n if (subscription && !subscription.closed) {\n this.add(this.durationSubscription = subscription);\n }\n }\n notifyNext() {\n this.emitValue();\n }\n notifyComplete() {\n this.emitValue();\n }\n emitValue() {\n if (this.hasValue) {\n const value = this.value;\n const subscription = this.durationSubscription;\n if (subscription) {\n this.durationSubscription = undefined;\n subscription.unsubscribe();\n this.remove(subscription);\n }\n this.value = undefined;\n this.hasValue = false;\n super._next(value);\n }\n }\n}","map":{"version":3,"names":["SimpleOuterSubscriber","innerSubscribe","SimpleInnerSubscriber","debounce","durationSelector","source","lift","DebounceOperator","constructor","call","subscriber","subscribe","DebounceSubscriber","destination","hasValue","_next","value","result","_tryNext","err","error","_complete","emitValue","complete","duration","subscription","durationSubscription","unsubscribe","remove","closed","add","notifyNext","notifyComplete","undefined"],"sources":["/home/arctichawk1/Desktop/Projects/Public/Kargi-Sitesi/node_modules/rxjs/_esm2015/internal/operators/debounce.js"],"sourcesContent":["import { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\nexport function debounce(durationSelector) {\n return (source) => source.lift(new DebounceOperator(durationSelector));\n}\nclass DebounceOperator {\n constructor(durationSelector) {\n this.durationSelector = durationSelector;\n }\n call(subscriber, source) {\n return source.subscribe(new DebounceSubscriber(subscriber, this.durationSelector));\n }\n}\nclass DebounceSubscriber extends SimpleOuterSubscriber {\n constructor(destination, durationSelector) {\n super(destination);\n this.durationSelector = durationSelector;\n this.hasValue = false;\n }\n _next(value) {\n try {\n const result = this.durationSelector.call(this, value);\n if (result) {\n this._tryNext(value, result);\n }\n }\n catch (err) {\n this.destination.error(err);\n }\n }\n _complete() {\n this.emitValue();\n this.destination.complete();\n }\n _tryNext(value, duration) {\n let subscription = this.durationSubscription;\n this.value = value;\n this.hasValue = true;\n if (subscription) {\n subscription.unsubscribe();\n this.remove(subscription);\n }\n subscription = innerSubscribe(duration, new SimpleInnerSubscriber(this));\n if (subscription && !subscription.closed) {\n this.add(this.durationSubscription = subscription);\n }\n }\n notifyNext() {\n this.emitValue();\n }\n notifyComplete() {\n this.emitValue();\n }\n emitValue() {\n if (this.hasValue) {\n const value = this.value;\n const subscription = this.durationSubscription;\n if (subscription) {\n this.durationSubscription = undefined;\n subscription.unsubscribe();\n this.remove(subscription);\n }\n this.value = undefined;\n this.hasValue = false;\n super._next(value);\n }\n }\n}\n"],"mappings":"AAAA,SAASA,qBAAqB,EAAEC,cAAc,EAAEC,qBAAqB,QAAQ,mBAAmB;AAChG,OAAO,SAASC,QAAQA,CAACC,gBAAgB,EAAE;EACvC,OAAQC,MAAM,IAAKA,MAAM,CAACC,IAAI,CAAC,IAAIC,gBAAgB,CAACH,gBAAgB,CAAC,CAAC;AAC1E;AACA,MAAMG,gBAAgB,CAAC;EACnBC,WAAWA,CAACJ,gBAAgB,EAAE;IAC1B,IAAI,CAACA,gBAAgB,GAAGA,gBAAgB;EAC5C;EACAK,IAAIA,CAACC,UAAU,EAAEL,MAAM,EAAE;IACrB,OAAOA,MAAM,CAACM,SAAS,CAAC,IA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