{"version":3,"file":"withLoadingIndicator.mjs","sources":["../../../src/utils/withLoadingIndicator.ts"],"sourcesContent":["import { merge, Observable, timer } from 'rxjs';\nimport { mapTo, takeUntil } from 'rxjs/operators';\n\n/**\n * @internal\n */\nexport type WithLoadingIndicatorOptions<T> = {\n  whileLoading: T;\n  source: Observable<T>;\n};\n\n/**\n * @internal\n */\nexport function withLoadingIndicator<T>({ whileLoading, source }: WithLoadingIndicatorOptions<T>): Observable<T> {\n  return merge(timer(200).pipe(mapTo(whileLoading), takeUntil(source)), source);\n}\n"],"names":[],"mappings":";;;;AAcO,SAAS,oBAAA,CAAwB,EAAE,YAAA,EAAc,MAAA,EAAO,EAAkD;AAC/G,EAAA,OAAO,KAAA,CAAM,KAAA,CAAM,GAAG,CAAA,CAAE,IAAA,CAAK,KAAA,CAAM,YAAY,CAAA,EAAG,SAAA,CAAU,MAAM,CAAC,CAAA,EAAG,MAAM,CAAA;AAC9E;;;;"}