{"ast":null,"code":"import { Subscriber } from '../Subscriber';\nexport function defaultIfEmpty(defaultValue = null) {\n  return source => source.lift(new DefaultIfEmptyOperator(defaultValue));\n}\n\nclass DefaultIfEmptyOperator {\n  constructor(defaultValue) {\n    this.defaultValue = defaultValue;\n  }\n\n  call(subscriber, source) {\n    return source.subscribe(new DefaultIfEmptySubscriber(subscriber, this.defaultValue));\n  }\n\n}\n\nclass DefaultIfEmptySubscriber extends Subscriber {\n  constructor(destination, defaultValue) {\n    super(destination);\n    this.defaultValue = defaultValue;\n    this.isEmpty = true;\n  }\n\n  _next(value) {\n    this.isEmpty = false;\n    this.destination.next(value);\n  }\n\n  _complete() {\n    if (this.isEmpty) {\n      this.destination.next(this.defaultValue);\n    }\n\n    this.destination.complete();\n  }\n\n} //# sourceMappingURL=defaultIfEmpty.js.map","map":null,"metadata":{},"sourceType":"module"}