1 | {"version":3,"file":"angular-fire-compat-remote-config.js","sources":["../../../src/compat/remote-config/base.ts","../../../src/compat/remote-config/remote-config.ts","../../../src/compat/remote-config/remote-config.module.ts","../../../src/compat/remote-config/angular-fire-compat-remote-config.ts"],"sourcesContent":["// DO NOT MODIFY, this file is autogenerated by tools/build.ts\n// Export a null object with the same keys as firebase/compat/remote-config, so Proxy can work with proxy-polyfill in Internet Explorer\nexport const proxyPolyfillCompat = {\n app: null,\n settings: null,\n defaultConfig: null,\n fetchTimeMillis: null,\n lastFetchStatus: null,\n activate: null,\n ensureInitialized: null,\n fetch: null,\n fetchAndActivate: null,\n getAll: null,\n getBoolean: null,\n getNumber: null,\n getString: null,\n getValue: null,\n setLogLevel: null,\n};\n","import { Inject, Injectable, InjectionToken, NgZone, Optional, PLATFORM_ID } from '@angular/core';\nimport { concat, EMPTY, MonoTypeOperatorFunction, Observable, of, OperatorFunction, pipe } from 'rxjs';\nimport {\n debounceTime,\n distinctUntilChanged,\n filter,\n groupBy,\n map,\n mergeMap,\n observeOn,\n scan,\n shareReplay,\n startWith,\n switchMap,\n withLatestFrom\n} from 'rxjs/operators';\nimport { ɵAngularFireSchedulers, keepUnstableUntilFirst } from '@angular/fire';\nimport { ɵlazySDKProxy, ɵPromiseProxy, ɵapplyMixins } from '@angular/fire/compat';\nimport { FirebaseOptions } from 'firebase/app';\nimport { ɵfirebaseAppFactory, FIREBASE_APP_NAME, FIREBASE_OPTIONS, ɵcacheInstance } from '@angular/fire/compat';\nimport firebase from 'firebase/compat/app';\nimport { Settings } from './interfaces';\nimport { proxyPolyfillCompat } from './base';\nimport { isSupported } from 'firebase/remote-config';\n\nexport interface ConfigTemplate {\n [key: string]: string | number | boolean;\n}\n\nexport const SETTINGS = new InjectionToken<Settings>('angularfire2.remoteConfig.settings');\nexport const DEFAULTS = new InjectionToken<ConfigTemplate>('angularfire2.remoteConfig.defaultConfig');\n\nexport interface AngularFireRemoteConfig extends ɵPromiseProxy<firebase.remoteConfig.RemoteConfig> {\n}\n\nconst AS_TO_FN = { strings: 'asString', numbers: 'asNumber', booleans: 'asBoolean' };\nconst STATIC_VALUES = { numbers: 0, booleans: false, strings: undefined };\n\n// TODO look into the types here, I don't like the anys\nconst proxyAll = (observable: Observable<Parameter[]>, as: 'numbers' | 'booleans' | 'strings') => new Proxy(\n observable.pipe(mapToObject(as as any)), {\n get: (self, name: string) => self[name] || observable.pipe(\n map(all => all.find(p => p.key === name)),\n map(param => param ? param[AS_TO_FN[as]]() : STATIC_VALUES[as]),\n distinctUntilChanged()\n )\n }\n) as any;\n\n// TODO export as implements Partial<...> so minor doesn't break us\nexport class Value implements firebase.remoteConfig.Value {\n asBoolean() {\n return ['1', 'true', 't', 'y', 'yes', 'on'].indexOf(this._value.toLowerCase()) > -1;\n }\n\n asString() {\n return this._value;\n }\n\n asNumber() {\n return Number(this._value) || 0;\n }\n\n getSource() {\n return this._source;\n }\n\n // tslint:disable-next-line:variable-name\n constructor(public _source: firebase.remoteConfig.ValueSource, public _value: string) {\n }\n}\n\n// SEMVER use ConstructorParameters when we can support Typescript 3.6\nexport class Parameter extends Value {\n constructor(public key: string, public fetchTimeMillis: number, source: firebase.remoteConfig.ValueSource, value: string) {\n super(source, value);\n }\n}\n\n// If it's a Parameter array, test any, else test the individual Parameter\nconst filterTest = (fn: (param: Parameter) => boolean) => filter<Parameter | Parameter[]>(it => Array.isArray(it) ? it.some(fn) : fn(it));\n\n// Allow the user to bypass the default values and wait till they get something from the server, even if it's a cached copy;\n// if used in conjuntion with first() it will only fetch RC values from the server if they aren't cached locally\nexport const filterRemote = () => filterTest(p => p.getSource() === 'remote');\n\n// filterFresh allows the developer to effectively set up a maximum cache time\nexport const filterFresh = (howRecentInMillis: number) => filterTest(p => p.fetchTimeMillis + howRecentInMillis >= new Date().getTime());\n\n\n// I ditched loading the defaults into RC and a simple map for scan since we already have our own defaults implementation.\n// The idea here being that if they have a default that never loads from the server, they will be able to tell via fetchTimeMillis\n// on the Parameter. Also if it doesn't come from the server it won't emit again in .changes, due to the distinctUntilChanged,\n// which we can simplify to === rather than deep comparison\nconst scanToParametersArray = (\n remoteConfig: Observable<firebase.remoteConfig.RemoteConfig | undefined>\n): OperatorFunction<{ [key: string]: firebase.remoteConfig.Value }, Parameter[]> => pipe(\n withLatestFrom(remoteConfig),\n scan((existing, [all, rc]) => {\n // SEMVER use \"new Set\" to unique once we're only targeting es6\n // at the scale we expect remote config to be at, we probably won't see a performance hit from this unoptimized uniqueness\n // implementation.\n // const allKeys = [...new Set([...existing.map(p => p.key), ...Object.keys(all)])];\n const allKeys = [...existing.map(p => p.key), ...Object.keys(all)].filter((v, i, a) => a.indexOf(v) === i);\n return allKeys.map(key => {\n const updatedValue = all[key];\n return updatedValue ? new Parameter(key, rc ? rc.fetchTimeMillis : -1, updatedValue.getSource(), updatedValue.asString())\n : existing.find(p => p.key === key);\n });\n }, [] as Array<Parameter>)\n);\n\n\n@Injectable({\n providedIn: 'any'\n})\nexport class AngularFireRemoteConfig {\n\n readonly changes: Observable<Parameter>;\n readonly parameters: Observable<Parameter[]>;\n readonly numbers: Observable<{ [key: string]: number | undefined }> & { [key: string]: Observable<number> };\n readonly booleans: Observable<{ [key: string]: boolean | undefined }> & { [key: string]: Observable<boolean> };\n readonly strings: Observable<{ [key: string]: string | undefined }> & { [key: string]: Observable<string | undefined> };\n\n constructor(\n @Inject(FIREBASE_OPTIONS) options: FirebaseOptions,\n @Optional() @Inject(FIREBASE_APP_NAME) name: string | null | undefined,\n @Optional() @Inject(SETTINGS) settings: Settings | null,\n @Optional() @Inject(DEFAULTS) defaultConfig: ConfigTemplate | null,\n private zone: NgZone,\n schedulers: ɵAngularFireSchedulers,\n // tslint:disable-next-line:ban-types\n @Inject(PLATFORM_ID) platformId: Object\n ) {\n const remoteConfig$ = of(undefined).pipe(\n observeOn(schedulers.outsideAngular),\n switchMap(() => isSupported()),\n switchMap(isSupported => isSupported ? import('firebase/compat/remote-config') : EMPTY),\n map(() => ɵfirebaseAppFactory(options, zone, name)),\n map(app => ɵcacheInstance(`${app.name}.remote-config`, 'AngularFireRemoteConfig', app.name, () => {\n const rc = app.remoteConfig();\n if (settings) {\n rc.settings = settings;\n }\n if (defaultConfig) {\n rc.defaultConfig = defaultConfig;\n }\n return rc;\n }, [settings, defaultConfig])),\n startWith<firebase.remoteConfig.RemoteConfig, undefined>(undefined),\n shareReplay({ bufferSize: 1, refCount: false })\n );\n\n const loadedRemoteConfig$ = remoteConfig$.pipe(\n filter<firebase.remoteConfig.RemoteConfig>(rc => !!rc)\n );\n\n const default$: Observable<{ [key: string]: firebase.remoteConfig.Value }> = of(Object.keys(defaultConfig || {}).reduce(\n (c, k) => ({ ...c, [k]: new Value('default', defaultConfig[k].toString()) }), {}\n ));\n\n // we should filter out the defaults we provided to RC, since we have our own implementation\n // that gives us a -1 for fetchTimeMillis (so filterFresh can filter them out)\n const filterOutDefaults = map<{ [key: string]: firebase.remoteConfig.Value }, { [key: string]: firebase.remoteConfig.Value }>(all =>\n Object.keys(all)\n .filter(key => all[key].getSource() !== 'default')\n .reduce((acc, key) => ({ ...acc, [key]: all[key] }), {})\n );\n\n const existing$ = loadedRemoteConfig$.pipe(\n switchMap(rc =>\n rc.activate()\n .then(() => rc.ensureInitialized())\n .then(() => rc.getAll())\n ),\n filterOutDefaults\n );\n\n const fresh$ = loadedRemoteConfig$.pipe(\n switchMap(rc => zone.runOutsideAngular(() =>\n rc.fetchAndActivate()\n .then(() => rc.ensureInitialized())\n .then(() => rc.getAll())\n )),\n filterOutDefaults\n );\n\n this.parameters = concat(default$, existing$, fresh$).pipe(\n scanToParametersArray(remoteConfig$),\n keepUnstableUntilFirst,\n shareReplay({ bufferSize: 1, refCount: true })\n );\n\n this.changes = this.parameters.pipe(\n switchMap(params => of(...params)),\n groupBy(param => param.key),\n mergeMap(group => group.pipe(\n distinctUntilChanged()\n ))\n );\n\n this.strings = proxyAll(this.parameters, 'strings');\n this.booleans = proxyAll(this.parameters, 'booleans');\n this.numbers = proxyAll(this.parameters, 'numbers');\n\n return ɵlazySDKProxy(this, loadedRemoteConfig$, zone);\n }\n\n}\n\n\nexport const budget = <T>(interval: number): MonoTypeOperatorFunction<T> => (source: Observable<T>) => new Observable<T>(observer => {\n let timedOut = false;\n // TODO use scheduler task rather than settimeout\n const timeout = setTimeout(() => {\n observer.complete();\n timedOut = true;\n }, interval);\n return source.subscribe({\n next(val) {\n if (!timedOut) {\n observer.next(val);\n }\n },\n error(err) {\n if (!timedOut) {\n clearTimeout(timeout);\n observer.error(err);\n }\n },\n complete() {\n if (!timedOut) {\n clearTimeout(timeout);\n observer.complete();\n }\n }\n });\n});\n\nconst typedMethod = (it: any) => {\n switch (typeof it) {\n case 'string':\n return 'asString';\n case 'boolean':\n return 'asBoolean';\n case 'number':\n return 'asNumber';\n default:\n return 'asString';\n }\n};\n\n\nexport function scanToObject(): OperatorFunction<Parameter, { [key: string]: string | undefined }>;\nexport function scanToObject(to: 'numbers'): OperatorFunction<Parameter, { [key: string]: number | undefined }>;\nexport function scanToObject(to: 'booleans'): OperatorFunction<Parameter, { [key: string]: boolean | undefined }>;\n// tslint:disable-next-line:unified-signatures\nexport function scanToObject(to: 'strings'): OperatorFunction<Parameter, { [key: string]: string | undefined }>;\nexport function scanToObject<T extends ConfigTemplate>(template: T): OperatorFunction<Parameter, T & { [key: string]: string | undefined }>;\nexport function scanToObject<T extends ConfigTemplate>(to: 'numbers' | 'booleans' | 'strings' | T = 'strings') {\n return pipe(\n // TODO cleanup\n scan(\n (c, p: Parameter) => ({\n ...c, [p.key]: typeof to === 'object' ?\n p[typedMethod(to[p.key])]() :\n p[AS_TO_FN[to]]()\n }),\n typeof to === 'object' ?\n to as T & { [key: string]: string | undefined } :\n {} as { [key: string]: number | boolean | string }\n ),\n debounceTime(1),\n budget(10),\n distinctUntilChanged((a, b) => JSON.stringify(a) === JSON.stringify(b))\n );\n}\n\nexport function mapToObject(): OperatorFunction<Parameter[], { [key: string]: string | undefined }>;\nexport function mapToObject(to: 'numbers'): OperatorFunction<Parameter[], { [key: string]: number | undefined }>;\nexport function mapToObject(to: 'booleans'): OperatorFunction<Parameter[], { [key: string]: boolean | undefined }>;\n// tslint:disable-next-line:unified-signatures\nexport function mapToObject(to: 'strings'): OperatorFunction<Parameter[], { [key: string]: string | undefined }>;\nexport function mapToObject<T extends ConfigTemplate>(template: T):\n OperatorFunction<Parameter[], T & { [key: string]: string | undefined }>;\nexport function mapToObject<T extends ConfigTemplate>(to: 'numbers' | 'booleans' | 'strings' | T = 'strings') {\n return pipe(\n // TODO this is getting a little long, cleanup\n map((params: Parameter[]) => params.reduce(\n (c, p) => ({\n ...c, [p.key]: typeof to === 'object' ?\n p[typedMethod(to[p.key])]() :\n p[AS_TO_FN[to]]()\n }),\n typeof to === 'object' ?\n to as T & { [key: string]: string | undefined } :\n {} as { [key: string]: number | boolean | string }\n )),\n distinctUntilChanged((a, b) => JSON.stringify(a) === JSON.stringify(b))\n );\n}\n\nɵapplyMixins(AngularFireRemoteConfig, [proxyPolyfillCompat]);\n","import { NgModule } from '@angular/core';\nimport { AngularFireRemoteConfig } from './remote-config';\nimport firebase from 'firebase/compat/app';\nimport { VERSION } from '@angular/fire';\n\n@NgModule({\n providers: [ AngularFireRemoteConfig ]\n})\nexport class AngularFireRemoteConfigModule {\n constructor() {\n firebase.registerVersion('angularfire', VERSION.full, 'rc-compat');\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;AAAA;AACA;AACO,MAAM,mBAAmB,GAAG;IACjC,GAAG,EAAE,IAAI;IACT,QAAQ,EAAE,IAAI;IACd,aAAa,EAAE,IAAI;IACnB,eAAe,EAAE,IAAI;IACrB,eAAe,EAAE,IAAI;IACrB,QAAQ,EAAE,IAAI;IACd,iBAAiB,EAAE,IAAI;IACvB,KAAK,EAAE,IAAI;IACX,gBAAgB,EAAE,IAAI;IACtB,MAAM,EAAE,IAAI;IACZ,UAAU,EAAE,IAAI;IAChB,SAAS,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