/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import { map, mergeMap } from 'rxjs/operators'; import { recognize as recognizeFn } from '../recognize'; export function recognize(injector, configLoader, rootComponentType, config, serializer, paramsInheritanceStrategy) { return mergeMap(t => recognizeFn(injector, configLoader, rootComponentType, config, t.extractedUrl, serializer, paramsInheritanceStrategy) .pipe(map(({ state: targetSnapshot, tree: urlAfterRedirects }) => { return { ...t, targetSnapshot, urlAfterRedirects }; }))); } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVjb2duaXplLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvcm91dGVyL3NyYy9vcGVyYXRvcnMvcmVjb2duaXplLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7R0FNRztBQUlILE9BQU8sRUFBQyxHQUFHLEVBQUUsUUFBUSxFQUFDLE1BQU0sZ0JBQWdCLENBQUM7QUFJN0MsT0FBTyxFQUFDLFNBQVMsSUFBSSxXQUFXLEVBQUMsTUFBTSxjQUFjLENBQUM7QUFJdEQsTUFBTSxVQUFVLFNBQVMsQ0FDckIsUUFBNkIsRUFBRSxZQUFnQyxFQUMvRCxpQkFBaUMsRUFBRSxNQUFlLEVBQUUsVUFBeUIsRUFDN0UseUJBQ1E7SUFDVixPQUFPLFFBQVEsQ0FDWCxDQUFDLENBQUMsRUFBRSxDQUFDLFdBQVcsQ0FDUCxRQUFRLEVBQUUsWUFBWSxFQUFFLGlCQUFpQixFQUFFLE1BQU0sRUFBRSxDQUFDLENBQUMsWUFBWSxFQUFFLFVBQVUsRUFDN0UseUJBQXlCLENBQUM7U0FDekIsSUFBSSxDQUFDLEdBQUcsQ0FBQyxDQUFDLEVBQUMsS0FBSyxFQUFFLGNBQWMsRUFBRSxJQUFJLEVBQUU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