@angular/router 11.1.0-next.4 → 11.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/bundles/router-testing.umd.js +1 -1
  2. package/bundles/router-testing.umd.min.js +1 -1
  3. package/bundles/router-testing.umd.min.js.map +1 -1
  4. package/bundles/router-upgrade.umd.js +1 -1
  5. package/bundles/router-upgrade.umd.min.js +1 -1
  6. package/bundles/router-upgrade.umd.min.js.map +1 -1
  7. package/bundles/router.umd.js +108 -98
  8. package/bundles/router.umd.js.map +1 -1
  9. package/bundles/router.umd.min.js +19 -18
  10. package/bundles/router.umd.min.js.map +1 -1
  11. package/esm2015/src/apply_redirects.js +4 -3
  12. package/esm2015/src/create_url_tree.js +2 -2
  13. package/esm2015/src/directives/router_link_active.js +3 -5
  14. package/esm2015/src/events.js +2 -2
  15. package/esm2015/src/operators/activate_routes.js +13 -11
  16. package/esm2015/src/operators/apply_redirects.js +3 -5
  17. package/esm2015/src/operators/check_guards.js +16 -26
  18. package/esm2015/src/operators/prioritized_guard_value.js +2 -2
  19. package/esm2015/src/operators/recognize.js +3 -5
  20. package/esm2015/src/operators/resolve_data.js +10 -12
  21. package/esm2015/src/operators/switch_tap.js +9 -11
  22. package/esm2015/src/router.js +7 -11
  23. package/esm2015/src/router_config_loader.js +7 -3
  24. package/esm2015/src/router_module.js +1 -1
  25. package/esm2015/src/router_state.js +20 -2
  26. package/esm2015/src/url_tree.js +1 -1
  27. package/esm2015/src/utils/collection.js +5 -7
  28. package/esm2015/src/version.js +1 -1
  29. package/fesm2015/router.js +92 -93
  30. package/fesm2015/router.js.map +1 -1
  31. package/fesm2015/testing.js +1 -1
  32. package/fesm2015/upgrade.js +1 -1
  33. package/package.json +4 -4
  34. package/router.d.ts +27 -6
  35. package/router.metadata.json +1 -1
  36. package/testing/testing.d.ts +1 -1
  37. package/testing.d.ts +1 -1
  38. package/upgrade/upgrade.d.ts +1 -1
  39. package/upgrade.d.ts +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v11.1.0-next.4
2
+ * @license Angular v11.1.1
3
3
  * (c) 2010-2020 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v11.1.0-next.4
2
+ * @license Angular v11.1.1
3
3
  * (c) 2010-2020 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/router/router-testing.umd.js"],"names":["global","factory","exports","module","require","define","amd","self","ng","router","testing","common","core","this","SpyNgModuleFactoryLoader","compiler","_stubbedModules","Object","defineProperty","prototype","get","set","modules","e_1","_a","res","_b","__values","o","s","Symbol","iterator","m","i","call","length","next","value","done","TypeError","keys","_c","t","compileModuleAsync","e_1_1","error","return","enumerable","configurable","load","path","Promise","reject","Error","setupTestingRouter","urlSerializer","contexts","location","loader","injector","routes","opts","urlHandlingStrategy","router$1","Router","ɵflatten","isUrlHandlingStrategy","ɵassignExtraOptionsToRouter","decorators","type","Injectable","ctorParameters","Compiler","RouterTestingModule","withRoutes","config","ngModule","providers","provideRoutes","provide","ROUTER_CONFIGURATION","useValue","NgModule","args","RouterModule","ɵROUTER_PROVIDERS","Location","useClass","SpyLocation","LocationStrategy","MockLocationStrategy","NgModuleFactoryLoader","useFactory","deps","UrlSerializer","ChildrenOutletContexts","Injector","ROUTES","UrlHandlingStrategy","Optional","PreloadingStrategy","useExisting","NoPreloading"],"mappings":";;;;;CAMC,SAAUA,EAAQC,GACI,iBAAZC,SAA0C,oBAAXC,OAAyBF,EAAQC,QAASE,QAAQ,mBAAoBA,QAAQ,2BAA4BA,QAAQ,iBAAkBA,QAAQ,oBAChK,mBAAXC,QAAyBA,OAAOC,IAAMD,OAAO,0BAA2B,CAAC,UAAW,kBAAmB,0BAA2B,gBAAiB,mBAAoBJ,GACpJA,IAAzBD,EAASA,GAAUO,MAAsBC,GAAKR,EAAOQ,IAA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CACFpF,EAAOqF,cAAerF,EAAOsF,uBAAwBpF,EAAO2E,SAAU1E,EAAK+E,sBAAuB/E,EAAK4D,SAAU5D,EAAKoF,SACtHvF,EAAOwF,OAAQxF,EAAOuE,qBAAsB,CAACvE,EAAOyF,oBAAqB,IAAItF,EAAKuF,YAG1F,CAAEpB,QAAStE,EAAO2F,mBAAoBC,YAAa5F,EAAO6F,cAAgB7F,EAAOqE,cAAc;;;;;;;;;;;;;;;;;;;;;;AAkCnH5E,EAAQuE,oBAAsBA,EAC9BvE,EAAQY,yBAA2BA,EACnCZ,EAAQoD,mBAAqBA,EAE7BrC,OAAOC,eAAehB,EAAS,aAAc,CAAEmC,OAAO","sourcesContent":["/**\n * @license Angular v11.1.0-next.4\n * (c) 2010-2020 Google LLC. https://angular.io/\n * License: MIT\n */\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/common/testing'), require('@angular/core'), require('@angular/router')) :\n typeof define === 'function' && define.amd ? define('@angular/router/testing', ['exports', '@angular/common', '@angular/common/testing', '@angular/core', '@angular/router'], factory) :\n (global = global || self, factory((global.ng = global.ng || {}, global.ng.router = global.ng.router || {}, global.ng.router.testing = {}), global.ng.common, global.ng.common.testing, global.ng.core, global.ng.router));\n}(this, (function (exports, common, testing, core, router) { 'use strict';\n\n /*! *****************************************************************************\n Copyright (c) Microsoft Corporation.\n\n Permission to use, copy, modify, and/or distribute this software for any\n purpose with or without fee is hereby granted.\n\n THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\n REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\n AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\n INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\n LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\n OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\n PERFORMANCE OF THIS SOFTWARE.\n ***************************************************************************** */\n /* global Reflect, Promise */\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b)\n if (b.hasOwnProperty(p))\n d[p] = b[p]; };\n return extendStatics(d, b);\n };\n function __extends(d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n }\n var __assign = function () {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s)\n if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n };\n function __rest(s, e) {\n var t = {};\n for (var p in s)\n if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n }\n function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\")\n r = Reflect.decorate(decorators, target, key, desc);\n else\n for (var i = decorators.length - 1; i >= 0; i--)\n if (d = decorators[i])\n r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n }\n function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); };\n }\n function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\")\n return Reflect.metadata(metadataKey, metadataValue);\n }\n function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try {\n step(generator.next(value));\n }\n catch (e) {\n reject(e);\n } }\n function rejected(value) { try {\n step(generator[\"throw\"](value));\n }\n catch (e) {\n reject(e);\n } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n }\n function __generator(thisArg, body) {\n var _ = { label: 0, sent: function () { if (t[0] & 1)\n throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function () { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f)\n throw new TypeError(\"Generator is already executing.\");\n while (_)\n try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)\n return t;\n if (y = 0, t)\n op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0:\n case 1:\n t = op;\n break;\n case 4:\n _.label++;\n return { value: op[1], done: false };\n case 5:\n _.label++;\n y = op[1];\n op = [0];\n continue;\n case 7:\n op = _.ops.pop();\n _.trys.pop();\n continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _ = 0;\n continue;\n }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {\n _.label = op[1];\n break;\n }\n if (op[0] === 6 && _.label < t[1]) {\n _.label = t[1];\n t = op;\n break;\n }\n if (t && _.label < t[2]) {\n _.label = t[2];\n _.ops.push(op);\n break;\n }\n if (t[2])\n _.ops.pop();\n _.trys.pop();\n continue;\n }\n op = body.call(thisArg, _);\n }\n catch (e) {\n op = [6, e];\n y = 0;\n }\n finally {\n f = t = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n }\n var __createBinding = Object.create ? (function (o, m, k, k2) {\n if (k2 === undefined)\n k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });\n }) : (function (o, m, k, k2) {\n if (k2 === undefined)\n k2 = k;\n o[k2] = m[k];\n });\n function __exportStar(m, exports) {\n for (var p in m)\n if (p !== \"default\" && !exports.hasOwnProperty(p))\n __createBinding(exports, m, p);\n }\n function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m)\n return m.call(o);\n if (o && typeof o.length === \"number\")\n return {\n next: function () {\n if (o && i >= o.length)\n o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n }\n function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m)\n return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done)\n ar.push(r.value);\n }\n catch (error) {\n e = { error: error };\n }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"]))\n m.call(i);\n }\n finally {\n if (e)\n throw e.error;\n }\n }\n return ar;\n }\n function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n }\n function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++)\n s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n }\n ;\n function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n }\n function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator)\n throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\n function verb(n) { if (g[n])\n i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\n function resume(n, v) { try {\n step(g[n](v));\n }\n catch (e) {\n settle(q[0][3], e);\n } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length)\n resume(q[0][0], q[0][1]); }\n }\n function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\n }\n function __asyncValues(o) {\n if (!Symbol.asyncIterator)\n throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }\n }\n function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) {\n Object.defineProperty(cooked, \"raw\", { value: raw });\n }\n else {\n cooked.raw = raw;\n }\n return cooked;\n }\n ;\n var __setModuleDefault = Object.create ? (function (o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n }) : function (o, v) {\n o[\"default\"] = v;\n };\n function __importStar(mod) {\n if (mod && mod.__esModule)\n return mod;\n var result = {};\n if (mod != null)\n for (var k in mod)\n if (Object.hasOwnProperty.call(mod, k))\n __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n }\n function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n }\n function __classPrivateFieldGet(receiver, privateMap) {\n if (!privateMap.has(receiver)) {\n throw new TypeError(\"attempted to get private field on non-instance\");\n }\n return privateMap.get(receiver);\n }\n function __classPrivateFieldSet(receiver, privateMap, value) {\n if (!privateMap.has(receiver)) {\n throw new TypeError(\"attempted to set private field on non-instance\");\n }\n privateMap.set(receiver, value);\n return value;\n }\n\n /**\n * @description\n *\n * Allows to simulate the loading of ng modules in tests.\n *\n * ```\n * const loader = TestBed.inject(NgModuleFactoryLoader);\n *\n * @Component({template: 'lazy-loaded'})\n * class LazyLoadedComponent {}\n * @NgModule({\n * declarations: [LazyLoadedComponent],\n * imports: [RouterModule.forChild([{path: 'loaded', component: LazyLoadedComponent}])]\n * })\n *\n * class LoadedModule {}\n *\n * // sets up stubbedModules\n * loader.stubbedModules = {lazyModule: LoadedModule};\n *\n * router.resetConfig([\n * {path: 'lazy', loadChildren: 'lazyModule'},\n * ]);\n *\n * router.navigateByUrl('/lazy/loaded');\n * ```\n *\n * @publicApi\n */\n var SpyNgModuleFactoryLoader = /** @class */ (function () {\n function SpyNgModuleFactoryLoader(compiler) {\n this.compiler = compiler;\n /**\n * @docsNotRequired\n */\n this._stubbedModules = {};\n }\n Object.defineProperty(SpyNgModuleFactoryLoader.prototype, \"stubbedModules\", {\n /**\n * @docsNotRequired\n */\n get: function () {\n return this._stubbedModules;\n },\n /**\n * @docsNotRequired\n */\n set: function (modules) {\n var e_1, _a;\n var res = {};\n try {\n for (var _b = __values(Object.keys(modules)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var t = _c.value;\n res[t] = this.compiler.compileModuleAsync(modules[t]);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n this._stubbedModules = res;\n },\n enumerable: false,\n configurable: true\n });\n SpyNgModuleFactoryLoader.prototype.load = function (path) {\n if (this._stubbedModules[path]) {\n return this._stubbedModules[path];\n }\n else {\n return Promise.reject(new Error(\"Cannot find module \" + path));\n }\n };\n return SpyNgModuleFactoryLoader;\n }());\n SpyNgModuleFactoryLoader.decorators = [\n { type: core.Injectable }\n ];\n SpyNgModuleFactoryLoader.ctorParameters = function () { return [\n { type: core.Compiler }\n ]; };\n function isUrlHandlingStrategy(opts) {\n // This property check is needed because UrlHandlingStrategy is an interface and doesn't exist at\n // runtime.\n return 'shouldProcessUrl' in opts;\n }\n /**\n * Router setup factory function used for testing.\n *\n * @publicApi\n */\n function setupTestingRouter(urlSerializer, contexts, location, loader, compiler, injector, routes, opts, urlHandlingStrategy) {\n var router$1 = new router.Router(null, urlSerializer, contexts, location, injector, loader, compiler, router.ɵflatten(routes));\n if (opts) {\n // Handle deprecated argument ordering.\n if (isUrlHandlingStrategy(opts)) {\n router$1.urlHandlingStrategy = opts;\n }\n else {\n // Handle ExtraOptions\n router.ɵassignExtraOptionsToRouter(opts, router$1);\n }\n }\n if (urlHandlingStrategy) {\n router$1.urlHandlingStrategy = urlHandlingStrategy;\n }\n return router$1;\n }\n /**\n * @description\n *\n * Sets up the router to be used for testing.\n *\n * The modules sets up the router to be used for testing.\n * It provides spy implementations of `Location`, `LocationStrategy`, and {@link\n * NgModuleFactoryLoader}.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * beforeEach(() => {\n * TestBed.configureTestingModule({\n * imports: [\n * RouterTestingModule.withRoutes(\n * [{path: '', component: BlankCmp}, {path: 'simple', component: SimpleCmp}]\n * )\n * ]\n * });\n * });\n * ```\n *\n * @publicApi\n */\n var RouterTestingModule = /** @class */ (function () {\n function RouterTestingModule() {\n }\n RouterTestingModule.withRoutes = function (routes, config) {\n return {\n ngModule: RouterTestingModule,\n providers: [\n router.provideRoutes(routes),\n { provide: router.ROUTER_CONFIGURATION, useValue: config ? config : {} },\n ]\n };\n };\n return RouterTestingModule;\n }());\n RouterTestingModule.decorators = [\n { type: core.NgModule, args: [{\n exports: [router.RouterModule],\n providers: [\n router.ɵROUTER_PROVIDERS, { provide: common.Location, useClass: testing.SpyLocation },\n { provide: common.LocationStrategy, useClass: testing.MockLocationStrategy },\n { provide: core.NgModuleFactoryLoader, useClass: SpyNgModuleFactoryLoader }, {\n provide: router.Router,\n useFactory: setupTestingRouter,\n deps: [\n router.UrlSerializer, router.ChildrenOutletContexts, common.Location, core.NgModuleFactoryLoader, core.Compiler, core.Injector,\n router.ROUTES, router.ROUTER_CONFIGURATION, [router.UrlHandlingStrategy, new core.Optional()]\n ]\n },\n { provide: router.PreloadingStrategy, useExisting: router.NoPreloading }, router.provideRoutes([])\n ]\n },] }\n ];\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n // This file only reexports content of the `src` folder. Keep it that way.\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * Generated bundle index. Do not edit.\n */\n\n exports.RouterTestingModule = RouterTestingModule;\n exports.SpyNgModuleFactoryLoader = SpyNgModuleFactoryLoader;\n exports.setupTestingRouter = setupTestingRouter;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n//# sourceMappingURL=router-testing.umd.js.map\n"]}
1
+ {"version":3,"sources":["packages/router/router-testing.umd.js"],"names":["global","factory","exports","module","require","define","amd","self","ng","router","testing","common","core","this","SpyNgModuleFactoryLoader","compiler","_stubbedModules","Object","defineProperty","prototype","get","set","modules","e_1","_a","res","_b","__values","o","s","Symbol","iterator","m","i","call","length","next","value","done","TypeError","keys","_c","t","compileModuleAsync","e_1_1","error","return","enumerable","configurable","load","path","Promise","reject","Error","setupTestingRouter","urlSerializer","contexts","location","loader","injector","routes","opts","urlHandlingStrategy","router$1","Router","ɵflatten","isUrlHandlingStrategy","ɵassignExtraOptionsToRouter","decorators","type","Injectable","ctorParameters","Compiler","RouterTestingModule","withRoutes","config","ngModule","providers","provideRoutes","provide","ROUTER_CONFIGURATION","useValue","NgModule","args","RouterModule","ɵROUTER_PROVIDERS","Location","useClass","SpyLocation","LocationStrategy","MockLocationStrategy","NgModuleFactoryLoader","useFactory","deps","UrlSerializer","ChildrenOutletContexts","Injector","ROUTES","UrlHandlingStrategy","Optional","PreloadingStrategy","useExisting","NoPreloading"],"mappings":";;;;;CAMC,SAAUA,EAAQC,GACI,iBAAZC,SAA0C,oBAAXC,OAAyBF,EAAQC,QAASE,QAAQ,mBAAoBA,QAAQ,2BAA4BA,QAAQ,iBAAkBA,QAAQ,oBAChK,mBAAXC,QAAyBA,OAAOC,IAAMD,OAAO,0BAA2B,CAAC,UAAW,kBAAmB,0BAA2B,gBAAiB,mBAAoBJ,GACpJA,IAAzBD,EAASA,GAAUO,MAAsBC,GAAKR,EAAOQ,IAAM,GAAIR,EAAOQ,GAAGC,OAAST,EAAOQ,GAAGC,QAAU,GAAIT,EAAOQ,GAAGC,OAAOC,QAAU,IAAKV,EAAOQ,GAAGG,OAAQX,EAAOQ,GAAGG,OAAOD,QAASV,EAAOQ,GAAGI,KAAMZ,EAAOQ,GAAGC,QAHrN,CAIEI,MAAM,SAAWX,EAASS,EAAQD,EAASE,EAAMH,GAAU;;;;;;;;;;;;;;oFA4UzD,IAAIK,EAA0C,WAC1C,SAASA,EAAyBC,GAC9BF,KAAKE,SAAWA,EAIhBF,KAAKG,gBA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CZ,EAAQoD,mBAAqBA,EAE7BrC,OAAOC,eAAehB,EAAS,aAAc,CAAEmC,OAAO","sourcesContent":["/**\n * @license Angular v11.1.1\n * (c) 2010-2020 Google LLC. https://angular.io/\n * License: MIT\n */\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/common/testing'), require('@angular/core'), require('@angular/router')) :\n typeof define === 'function' && define.amd ? define('@angular/router/testing', ['exports', '@angular/common', '@angular/common/testing', '@angular/core', '@angular/router'], factory) :\n (global = global || self, factory((global.ng = global.ng || {}, global.ng.router = global.ng.router || {}, global.ng.router.testing = {}), global.ng.common, global.ng.common.testing, global.ng.core, global.ng.router));\n}(this, (function (exports, common, testing, core, router) { 'use strict';\n\n /*! *****************************************************************************\n Copyright (c) Microsoft Corporation.\n\n Permission to use, copy, modify, and/or distribute this software for any\n purpose with or without fee is hereby granted.\n\n THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\n REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\n AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\n INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\n LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\n OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\n PERFORMANCE OF THIS SOFTWARE.\n ***************************************************************************** */\n /* global Reflect, Promise */\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b)\n if (b.hasOwnProperty(p))\n d[p] = b[p]; };\n return extendStatics(d, b);\n };\n function __extends(d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n }\n var __assign = function () {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s)\n if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n };\n function __rest(s, e) {\n var t = {};\n for (var p in s)\n if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n }\n function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\")\n r = Reflect.decorate(decorators, target, key, desc);\n else\n for (var i = decorators.length - 1; i >= 0; i--)\n if (d = decorators[i])\n r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n }\n function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); };\n }\n function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\")\n return Reflect.metadata(metadataKey, metadataValue);\n }\n function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try {\n step(generator.next(value));\n }\n catch (e) {\n reject(e);\n } }\n function rejected(value) { try {\n step(generator[\"throw\"](value));\n }\n catch (e) {\n reject(e);\n } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n }\n function __generator(thisArg, body) {\n var _ = { label: 0, sent: function () { if (t[0] & 1)\n throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function () { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f)\n throw new TypeError(\"Generator is already executing.\");\n while (_)\n try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)\n return t;\n if (y = 0, t)\n op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0:\n case 1:\n t = op;\n break;\n case 4:\n _.label++;\n return { value: op[1], done: false };\n case 5:\n _.label++;\n y = op[1];\n op = [0];\n continue;\n case 7:\n op = _.ops.pop();\n _.trys.pop();\n continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _ = 0;\n continue;\n }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {\n _.label = op[1];\n break;\n }\n if (op[0] === 6 && _.label < t[1]) {\n _.label = t[1];\n t = op;\n break;\n }\n if (t && _.label < t[2]) {\n _.label = t[2];\n _.ops.push(op);\n break;\n }\n if (t[2])\n _.ops.pop();\n _.trys.pop();\n continue;\n }\n op = body.call(thisArg, _);\n }\n catch (e) {\n op = [6, e];\n y = 0;\n }\n finally {\n f = t = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n }\n var __createBinding = Object.create ? (function (o, m, k, k2) {\n if (k2 === undefined)\n k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });\n }) : (function (o, m, k, k2) {\n if (k2 === undefined)\n k2 = k;\n o[k2] = m[k];\n });\n function __exportStar(m, exports) {\n for (var p in m)\n if (p !== \"default\" && !exports.hasOwnProperty(p))\n __createBinding(exports, m, p);\n }\n function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m)\n return m.call(o);\n if (o && typeof o.length === \"number\")\n return {\n next: function () {\n if (o && i >= o.length)\n o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n }\n function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m)\n return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done)\n ar.push(r.value);\n }\n catch (error) {\n e = { error: error };\n }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"]))\n m.call(i);\n }\n finally {\n if (e)\n throw e.error;\n }\n }\n return ar;\n }\n function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n }\n function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++)\n s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n }\n ;\n function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n }\n function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator)\n throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\n function verb(n) { if (g[n])\n i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\n function resume(n, v) { try {\n step(g[n](v));\n }\n catch (e) {\n settle(q[0][3], e);\n } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length)\n resume(q[0][0], q[0][1]); }\n }\n function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\n }\n function __asyncValues(o) {\n if (!Symbol.asyncIterator)\n throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }\n }\n function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) {\n Object.defineProperty(cooked, \"raw\", { value: raw });\n }\n else {\n cooked.raw = raw;\n }\n return cooked;\n }\n ;\n var __setModuleDefault = Object.create ? (function (o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n }) : function (o, v) {\n o[\"default\"] = v;\n };\n function __importStar(mod) {\n if (mod && mod.__esModule)\n return mod;\n var result = {};\n if (mod != null)\n for (var k in mod)\n if (Object.hasOwnProperty.call(mod, k))\n __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n }\n function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n }\n function __classPrivateFieldGet(receiver, privateMap) {\n if (!privateMap.has(receiver)) {\n throw new TypeError(\"attempted to get private field on non-instance\");\n }\n return privateMap.get(receiver);\n }\n function __classPrivateFieldSet(receiver, privateMap, value) {\n if (!privateMap.has(receiver)) {\n throw new TypeError(\"attempted to set private field on non-instance\");\n }\n privateMap.set(receiver, value);\n return value;\n }\n\n /**\n * @description\n *\n * Allows to simulate the loading of ng modules in tests.\n *\n * ```\n * const loader = TestBed.inject(NgModuleFactoryLoader);\n *\n * @Component({template: 'lazy-loaded'})\n * class LazyLoadedComponent {}\n * @NgModule({\n * declarations: [LazyLoadedComponent],\n * imports: [RouterModule.forChild([{path: 'loaded', component: LazyLoadedComponent}])]\n * })\n *\n * class LoadedModule {}\n *\n * // sets up stubbedModules\n * loader.stubbedModules = {lazyModule: LoadedModule};\n *\n * router.resetConfig([\n * {path: 'lazy', loadChildren: 'lazyModule'},\n * ]);\n *\n * router.navigateByUrl('/lazy/loaded');\n * ```\n *\n * @publicApi\n */\n var SpyNgModuleFactoryLoader = /** @class */ (function () {\n function SpyNgModuleFactoryLoader(compiler) {\n this.compiler = compiler;\n /**\n * @docsNotRequired\n */\n this._stubbedModules = {};\n }\n Object.defineProperty(SpyNgModuleFactoryLoader.prototype, \"stubbedModules\", {\n /**\n * @docsNotRequired\n */\n get: function () {\n return this._stubbedModules;\n },\n /**\n * @docsNotRequired\n */\n set: function (modules) {\n var e_1, _a;\n var res = {};\n try {\n for (var _b = __values(Object.keys(modules)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var t = _c.value;\n res[t] = this.compiler.compileModuleAsync(modules[t]);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n this._stubbedModules = res;\n },\n enumerable: false,\n configurable: true\n });\n SpyNgModuleFactoryLoader.prototype.load = function (path) {\n if (this._stubbedModules[path]) {\n return this._stubbedModules[path];\n }\n else {\n return Promise.reject(new Error(\"Cannot find module \" + path));\n }\n };\n return SpyNgModuleFactoryLoader;\n }());\n SpyNgModuleFactoryLoader.decorators = [\n { type: core.Injectable }\n ];\n SpyNgModuleFactoryLoader.ctorParameters = function () { return [\n { type: core.Compiler }\n ]; };\n function isUrlHandlingStrategy(opts) {\n // This property check is needed because UrlHandlingStrategy is an interface and doesn't exist at\n // runtime.\n return 'shouldProcessUrl' in opts;\n }\n /**\n * Router setup factory function used for testing.\n *\n * @publicApi\n */\n function setupTestingRouter(urlSerializer, contexts, location, loader, compiler, injector, routes, opts, urlHandlingStrategy) {\n var router$1 = new router.Router(null, urlSerializer, contexts, location, injector, loader, compiler, router.ɵflatten(routes));\n if (opts) {\n // Handle deprecated argument ordering.\n if (isUrlHandlingStrategy(opts)) {\n router$1.urlHandlingStrategy = opts;\n }\n else {\n // Handle ExtraOptions\n router.ɵassignExtraOptionsToRouter(opts, router$1);\n }\n }\n if (urlHandlingStrategy) {\n router$1.urlHandlingStrategy = urlHandlingStrategy;\n }\n return router$1;\n }\n /**\n * @description\n *\n * Sets up the router to be used for testing.\n *\n * The modules sets up the router to be used for testing.\n * It provides spy implementations of `Location`, `LocationStrategy`, and {@link\n * NgModuleFactoryLoader}.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * beforeEach(() => {\n * TestBed.configureTestingModule({\n * imports: [\n * RouterTestingModule.withRoutes(\n * [{path: '', component: BlankCmp}, {path: 'simple', component: SimpleCmp}]\n * )\n * ]\n * });\n * });\n * ```\n *\n * @publicApi\n */\n var RouterTestingModule = /** @class */ (function () {\n function RouterTestingModule() {\n }\n RouterTestingModule.withRoutes = function (routes, config) {\n return {\n ngModule: RouterTestingModule,\n providers: [\n router.provideRoutes(routes),\n { provide: router.ROUTER_CONFIGURATION, useValue: config ? config : {} },\n ]\n };\n };\n return RouterTestingModule;\n }());\n RouterTestingModule.decorators = [\n { type: core.NgModule, args: [{\n exports: [router.RouterModule],\n providers: [\n router.ɵROUTER_PROVIDERS, { provide: common.Location, useClass: testing.SpyLocation },\n { provide: common.LocationStrategy, useClass: testing.MockLocationStrategy },\n { provide: core.NgModuleFactoryLoader, useClass: SpyNgModuleFactoryLoader }, {\n provide: router.Router,\n useFactory: setupTestingRouter,\n deps: [\n router.UrlSerializer, router.ChildrenOutletContexts, common.Location, core.NgModuleFactoryLoader, core.Compiler, core.Injector,\n router.ROUTES, router.ROUTER_CONFIGURATION, [router.UrlHandlingStrategy, new core.Optional()]\n ]\n },\n { provide: router.PreloadingStrategy, useExisting: router.NoPreloading }, router.provideRoutes([])\n ]\n },] }\n ];\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n // This file only reexports content of the `src` folder. Keep it that way.\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * Generated bundle index. Do not edit.\n */\n\n exports.RouterTestingModule = RouterTestingModule;\n exports.SpyNgModuleFactoryLoader = SpyNgModuleFactoryLoader;\n exports.setupTestingRouter = setupTestingRouter;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n//# sourceMappingURL=router-testing.umd.js.map\n"]}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v11.1.0-next.4
2
+ * @license Angular v11.1.1
3
3
  * (c) 2010-2020 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v11.1.0-next.4
2
+ * @license Angular v11.1.1
3
3
  * (c) 2010-2020 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/router/router-upgrade.umd.js"],"names":["global","factory","exports","module","require","define","amd","self","ng","router","upgrade","common","core","static","this","_static","anchor","ɵ0","locationSyncBootstrapListener","ngUpgrade","setUpLocationSync","urlType","$injector","Error","router$1","injector","get","Router","location","Location","$on","_","next","__","url","resolveUrl","hashIdx","indexOf","substring","path","normalize","pathname","navigateByUrl","search","hash","document","createElement","setAttribute","href","replace","RouterUpgradeInitializer","provide","APP_BOOTSTRAP_LISTENER","multi","useFactory","deps","UpgradeModule","Object","defineProperty","value"],"mappings":";;;;;CAMC,SAAUA,EAAQC,GACI,iBAAZC,SAA0C,oBAAXC,OAAyBF,EAAQC,QAASE,QAAQ,mBAAoBA,QAAQ,iBAAkBA,QAAQ,mBAAoBA,QAAQ,4BACxJ,mBAAXC,QAAyBA,OAAOC,IAAMD,OAAO,0BAA2B,CAAC,UAAW,kBAAmB,gBAAiB,kBAAmB,2BAA4BJ,GACpJA,IAAzBD,EAASA,GAAUO,MAAsBC,GAAKR,EAAOQ,IAAM,GAAIR,EAAOQ,GAAGC,OAAST,EAAOQ,GAAGC,QAAU,GAAIT,EAAOQ,GAAGC,OAAOC,QAAU,IAAKV,EAAOQ,GAAGG,OAAQX,EAAOQ,GAAGI,KAAMZ,EAAOQ,GAAGC,OAAQT,EAAOQ,GAAGE,QAAQG,QAHrN,CAIEC,MAAM,SAAWZ,EAASS,EAAQC,EAAMH,EAAQM,GAAW;;;;;;;OASzD,IA6FIC,EA7FAC,EAAKC,EAiCT,SAASA,EAA8BC,GACnC,OAAO,WACHC,EAAkBD,IAe1B,SAASC,EAAkBD,EAAWE,GAElC,QADgB,IAAZA,IAAsBA,EAAU,SAC/BF,EAAUG,UACX,MAAM,IAAIC,MAAM,iNAEpB,IAAIC,EAAWL,EAAUM,SAASC,IAAIjB,EAAOkB,QACzCC,EAAWT,EAAUM,SAASC,IAAIf,EAAOkB,UAC7CV,EAAUG,UAAUI,IAAI,cACnBI,IAAI,wBAAwB,SAAUC,EAAGC,EAAMC,GAChD,IAAIC,EACJ,GAAgB,SAAZb,EACAa,EAAMC,EAAWH,OAEhB,CAAA,GAAgB,SAAZX,EAML,KAAM,gDAAkDA,EAJxD,IAAIe,EAAUJ,EAAKK,QAAQ,KAC3BH,EAAMC,EAAWH,EAAKM,UAAU,EAAGF,GAAWJ,EAAKM,UAAUF,EAAU,IAK3E,IAAIG,EAAOX,EAASY,UAAUN,EAAIO,UAClCjB,EAASkB,cAAcH,EAAOL,EAAIS,OAAST,EAAIU,SAsBvD,SAAST,EAAWD,GAMhB,OALKlB,IACDA,EAAS6B,SAASC,cAAc,MAEpC9B,EAAO+B,aAAa,OAAQb,GAC5BlB,EAAO+B,aAAa,OAAQ/B,EAAOgC,MAC5B,CAEHP,SAAU,IAAMzB,EAAOyB,SAASQ,QAAQ,MAAO,IAC/CN,OAAQ3B,EAAO2B,OACfC,KAAM5B,EAAO4B;;;;;;;;;;;;;;OAyBrB1C,EAAQgD,yBAzGuB,CAC3BC,QAASvC,EAAKwC,uBACdC,OAAO,EACPC,WAAYrC,EACZsC,KAAM,CAACxC,EAAQyC,gBAsGnBtD,EAAQgB,8BAAgCA,EACxChB,EAAQkB,kBAAoBA,EAC5BlB,EAAQe,GAAKA,EAEbwC,OAAOC,eAAexD,EAAS,aAAc,CAAEyD,OAAO","sourcesContent":["/**\n * @license Angular v11.1.0-next.4\n * (c) 2010-2020 Google LLC. https://angular.io/\n * License: MIT\n */\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/router'), require('@angular/upgrade/static')) :\n typeof define === 'function' && define.amd ? define('@angular/router/upgrade', ['exports', '@angular/common', '@angular/core', '@angular/router', '@angular/upgrade/static'], factory) :\n (global = global || self, factory((global.ng = global.ng || {}, global.ng.router = global.ng.router || {}, global.ng.router.upgrade = {}), global.ng.common, global.ng.core, global.ng.router, global.ng.upgrade.static));\n}(this, (function (exports, common, core, router, _static) { 'use strict';\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var ɵ0 = locationSyncBootstrapListener;\n /**\n * Creates an initializer that sets up `ngRoute` integration\n * along with setting up the Angular router.\n *\n * @usageNotes\n *\n * <code-example language=\"typescript\">\n * @NgModule({\n * imports: [\n * RouterModule.forRoot(SOME_ROUTES),\n * UpgradeModule\n * ],\n * providers: [\n * RouterUpgradeInitializer\n * ]\n * })\n * export class AppModule {\n * ngDoBootstrap() {}\n * }\n * </code-example>\n *\n * @publicApi\n */\n var RouterUpgradeInitializer = {\n provide: core.APP_BOOTSTRAP_LISTENER,\n multi: true,\n useFactory: ɵ0,\n deps: [_static.UpgradeModule]\n };\n /**\n * @internal\n */\n function locationSyncBootstrapListener(ngUpgrade) {\n return function () {\n setUpLocationSync(ngUpgrade);\n };\n }\n /**\n * Sets up a location change listener to trigger `history.pushState`.\n * Works around the problem that `onPopState` does not trigger `history.pushState`.\n * Must be called *after* calling `UpgradeModule.bootstrap`.\n *\n * @param ngUpgrade The upgrade NgModule.\n * @param urlType The location strategy.\n * @see `HashLocationStrategy`\n * @see `PathLocationStrategy`\n *\n * @publicApi\n */\n function setUpLocationSync(ngUpgrade, urlType) {\n if (urlType === void 0) { urlType = 'path'; }\n if (!ngUpgrade.$injector) {\n throw new Error(\"\\n RouterUpgradeInitializer can be used only after UpgradeModule.bootstrap has been called.\\n Remove RouterUpgradeInitializer and call setUpLocationSync after UpgradeModule.bootstrap.\\n \");\n }\n var router$1 = ngUpgrade.injector.get(router.Router);\n var location = ngUpgrade.injector.get(common.Location);\n ngUpgrade.$injector.get('$rootScope')\n .$on('$locationChangeStart', function (_, next, __) {\n var url;\n if (urlType === 'path') {\n url = resolveUrl(next);\n }\n else if (urlType === 'hash') {\n // Remove the first hash from the URL\n var hashIdx = next.indexOf('#');\n url = resolveUrl(next.substring(0, hashIdx) + next.substring(hashIdx + 1));\n }\n else {\n throw 'Invalid URLType passed to setUpLocationSync: ' + urlType;\n }\n var path = location.normalize(url.pathname);\n router$1.navigateByUrl(path + url.search + url.hash);\n });\n }\n /**\n * Normalizes and parses a URL.\n *\n * - Normalizing means that a relative URL will be resolved into an absolute URL in the context of\n * the application document.\n * - Parsing means that the anchor's `protocol`, `hostname`, `port`, `pathname` and related\n * properties are all populated to reflect the normalized URL.\n *\n * While this approach has wide compatibility, it doesn't work as expected on IE. On IE, normalizing\n * happens similar to other browsers, but the parsed components will not be set. (E.g. if you assign\n * `a.href = 'foo'`, then `a.protocol`, `a.host`, etc. will not be correctly updated.)\n * We work around that by performing the parsing in a 2nd step by taking a previously normalized URL\n * and assigning it again. This correctly populates all properties.\n *\n * See\n * https://github.com/angular/angular.js/blob/2c7400e7d07b0f6cec1817dab40b9250ce8ebce6/src/ng/urlUtils.js#L26-L33\n * for more info.\n */\n var anchor;\n function resolveUrl(url) {\n if (!anchor) {\n anchor = document.createElement('a');\n }\n anchor.setAttribute('href', url);\n anchor.setAttribute('href', anchor.href);\n return {\n // IE does not start `pathname` with `/` like other browsers.\n pathname: \"/\" + anchor.pathname.replace(/^\\//, ''),\n search: anchor.search,\n hash: anchor.hash\n };\n }\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n // This file only reexports content of the `src` folder. Keep it that way.\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * Generated bundle index. Do not edit.\n */\n\n exports.RouterUpgradeInitializer = RouterUpgradeInitializer;\n exports.locationSyncBootstrapListener = locationSyncBootstrapListener;\n exports.setUpLocationSync = setUpLocationSync;\n exports.ɵ0 = ɵ0;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n//# sourceMappingURL=router-upgrade.umd.js.map\n"]}
1
+ {"version":3,"sources":["packages/router/router-upgrade.umd.js"],"names":["global","factory","exports","module","require","define","amd","self","ng","router","upgrade","common","core","static","this","_static","anchor","ɵ0","locationSyncBootstrapListener","ngUpgrade","setUpLocationSync","urlType","$injector","Error","router$1","injector","get","Router","location","Location","$on","_","next","__","url","resolveUrl","hashIdx","indexOf","substring","path","normalize","pathname","navigateByUrl","search","hash","document","createElement","setAttribute","href","replace","RouterUpgradeInitializer","provide","APP_BOOTSTRAP_LISTENER","multi","useFactory","deps","UpgradeModule","Object","defineProperty","value"],"mappings":";;;;;CAMC,SAAUA,EAAQC,GACI,iBAAZC,SAA0C,oBAAXC,OAAyBF,EAAQC,QAASE,QAAQ,mBAAoBA,QAAQ,iBAAkBA,QAAQ,mBAAoBA,QAAQ,4BACxJ,mBAAXC,QAAyBA,OAAOC,IAAMD,OAAO,0BAA2B,CAAC,UAAW,kBAAmB,gBAAiB,kBAAmB,2BAA4BJ,GACpJA,IAAzBD,EAASA,GAAUO,MAAsBC,GAAKR,EAAOQ,IAAM,GAAIR,EAAOQ,GAAGC,OAAST,EAAOQ,GAAGC,QAAU,GAAIT,EAAOQ,GAAGC,OAAOC,QAAU,IAAKV,EAAOQ,GAAGG,OAAQX,EAAOQ,GAAGI,KAAMZ,EAAOQ,GAAGC,OAAQT,EAAOQ,GAAGE,QAAQG,QAHrN,CAIEC,MAAM,SAAWZ,EAASS,EAAQC,EAAMH,EAAQM,GAAW;;;;;;;OASzD,IA6FIC,EA7FAC,EAAKC,EAiCT,SAASA,EAA8BC,GACnC,OAAO,WACHC,EAAkBD,IAe1B,SAASC,EAAkBD,EAAWE,GAElC,QADgB,IAAZA,IAAsBA,EAAU,SAC/BF,EAAUG,UACX,MAAM,IAAIC,MAAM,iNAEpB,IAAIC,EAAWL,EAAUM,SAASC,IAAIjB,EAAOkB,QACzCC,EAAWT,EAAUM,SAASC,IAAIf,EAAOkB,UAC7CV,EAAUG,UAAUI,IAAI,cACnBI,IAAI,wBAAwB,SAAUC,EAAGC,EAAMC,GAChD,IAAIC,EACJ,GAAgB,SAAZb,EACAa,EAAMC,EAAWH,OAEhB,CAAA,GAAgB,SAAZX,EAML,KAAM,gDAAkDA,EAJxD,IAAIe,EAAUJ,EAAKK,QAAQ,KAC3BH,EAAMC,EAAWH,EAAKM,UAAU,EAAGF,GAAWJ,EAAKM,UAAUF,EAAU,IAK3E,IAAIG,EAAOX,EAASY,UAAUN,EAAIO,UAClCjB,EAASkB,cAAcH,EAAOL,EAAIS,OAAST,EAAIU,SAsBvD,SAAST,EAAWD,GAMhB,OALKlB,IACDA,EAAS6B,SAASC,cAAc,MAEpC9B,EAAO+B,aAAa,OAAQb,GAC5BlB,EAAO+B,aAAa,OAAQ/B,EAAOgC,MAC5B,CAEHP,SAAU,IAAMzB,EAAOyB,SAASQ,QAAQ,MAAO,IAC/CN,OAAQ3B,EAAO2B,OACfC,KAAM5B,EAAO4B;;;;;;;;;;;;;;OAyBrB1C,EAAQgD,yBAzGuB,CAC3BC,QAASvC,EAAKwC,uBACdC,OAAO,EACPC,WAAYrC,EACZsC,KAAM,CAACxC,EAAQyC,gBAsGnBtD,EAAQgB,8BAAgCA,EACxChB,EAAQkB,kBAAoBA,EAC5BlB,EAAQe,GAAKA,EAEbwC,OAAOC,eAAexD,EAAS,aAAc,CAAEyD,OAAO","sourcesContent":["/**\n * @license Angular v11.1.1\n * (c) 2010-2020 Google LLC. https://angular.io/\n * License: MIT\n */\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/router'), require('@angular/upgrade/static')) :\n typeof define === 'function' && define.amd ? define('@angular/router/upgrade', ['exports', '@angular/common', '@angular/core', '@angular/router', '@angular/upgrade/static'], factory) :\n (global = global || self, factory((global.ng = global.ng || {}, global.ng.router = global.ng.router || {}, global.ng.router.upgrade = {}), global.ng.common, global.ng.core, global.ng.router, global.ng.upgrade.static));\n}(this, (function (exports, common, core, router, _static) { 'use strict';\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var ɵ0 = locationSyncBootstrapListener;\n /**\n * Creates an initializer that sets up `ngRoute` integration\n * along with setting up the Angular router.\n *\n * @usageNotes\n *\n * <code-example language=\"typescript\">\n * @NgModule({\n * imports: [\n * RouterModule.forRoot(SOME_ROUTES),\n * UpgradeModule\n * ],\n * providers: [\n * RouterUpgradeInitializer\n * ]\n * })\n * export class AppModule {\n * ngDoBootstrap() {}\n * }\n * </code-example>\n *\n * @publicApi\n */\n var RouterUpgradeInitializer = {\n provide: core.APP_BOOTSTRAP_LISTENER,\n multi: true,\n useFactory: ɵ0,\n deps: [_static.UpgradeModule]\n };\n /**\n * @internal\n */\n function locationSyncBootstrapListener(ngUpgrade) {\n return function () {\n setUpLocationSync(ngUpgrade);\n };\n }\n /**\n * Sets up a location change listener to trigger `history.pushState`.\n * Works around the problem that `onPopState` does not trigger `history.pushState`.\n * Must be called *after* calling `UpgradeModule.bootstrap`.\n *\n * @param ngUpgrade The upgrade NgModule.\n * @param urlType The location strategy.\n * @see `HashLocationStrategy`\n * @see `PathLocationStrategy`\n *\n * @publicApi\n */\n function setUpLocationSync(ngUpgrade, urlType) {\n if (urlType === void 0) { urlType = 'path'; }\n if (!ngUpgrade.$injector) {\n throw new Error(\"\\n RouterUpgradeInitializer can be used only after UpgradeModule.bootstrap has been called.\\n Remove RouterUpgradeInitializer and call setUpLocationSync after UpgradeModule.bootstrap.\\n \");\n }\n var router$1 = ngUpgrade.injector.get(router.Router);\n var location = ngUpgrade.injector.get(common.Location);\n ngUpgrade.$injector.get('$rootScope')\n .$on('$locationChangeStart', function (_, next, __) {\n var url;\n if (urlType === 'path') {\n url = resolveUrl(next);\n }\n else if (urlType === 'hash') {\n // Remove the first hash from the URL\n var hashIdx = next.indexOf('#');\n url = resolveUrl(next.substring(0, hashIdx) + next.substring(hashIdx + 1));\n }\n else {\n throw 'Invalid URLType passed to setUpLocationSync: ' + urlType;\n }\n var path = location.normalize(url.pathname);\n router$1.navigateByUrl(path + url.search + url.hash);\n });\n }\n /**\n * Normalizes and parses a URL.\n *\n * - Normalizing means that a relative URL will be resolved into an absolute URL in the context of\n * the application document.\n * - Parsing means that the anchor's `protocol`, `hostname`, `port`, `pathname` and related\n * properties are all populated to reflect the normalized URL.\n *\n * While this approach has wide compatibility, it doesn't work as expected on IE. On IE, normalizing\n * happens similar to other browsers, but the parsed components will not be set. (E.g. if you assign\n * `a.href = 'foo'`, then `a.protocol`, `a.host`, etc. will not be correctly updated.)\n * We work around that by performing the parsing in a 2nd step by taking a previously normalized URL\n * and assigning it again. This correctly populates all properties.\n *\n * See\n * https://github.com/angular/angular.js/blob/2c7400e7d07b0f6cec1817dab40b9250ce8ebce6/src/ng/urlUtils.js#L26-L33\n * for more info.\n */\n var anchor;\n function resolveUrl(url) {\n if (!anchor) {\n anchor = document.createElement('a');\n }\n anchor.setAttribute('href', url);\n anchor.setAttribute('href', anchor.href);\n return {\n // IE does not start `pathname` with `/` like other browsers.\n pathname: \"/\" + anchor.pathname.replace(/^\\//, ''),\n search: anchor.search,\n hash: anchor.hash\n };\n }\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n // This file only reexports content of the `src` folder. Keep it that way.\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * Generated bundle index. Do not edit.\n */\n\n exports.RouterUpgradeInitializer = RouterUpgradeInitializer;\n exports.locationSyncBootstrapListener = locationSyncBootstrapListener;\n exports.setUpLocationSync = setUpLocationSync;\n exports.ɵ0 = ɵ0;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n//# sourceMappingURL=router-upgrade.umd.js.map\n"]}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v11.1.0-next.4
2
+ * @license Angular v11.1.1
3
3
  * (c) 2010-2020 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -553,7 +553,7 @@
553
553
  return GuardsCheckEnd;
554
554
  }(RouterEvent));
555
555
  /**
556
- * An event triggered at the the start of the Resolve phase of routing.
556
+ * An event triggered at the start of the Resolve phase of routing.
557
557
  *
558
558
  * Runs in the "resolve" phase whether or not there is anything to resolve.
559
559
  * In future, may change to only run when there are things to be resolved.
@@ -850,12 +850,10 @@
850
850
  return true;
851
851
  }
852
852
  function shallowEqual(a, b) {
853
- // Casting Object.keys return values to include `undefined` as there are some cases
854
- // in IE 11 where this can happen. Cannot provide a test because the behavior only
855
- // exists in certain circumstances in IE 11, therefore doing this cast ensures the
856
- // logic is correct for when this edge case is hit.
857
- var k1 = Object.keys(a);
858
- var k2 = Object.keys(b);
853
+ // While `undefined` should never be possible, it would sometimes be the case in IE 11
854
+ // and pre-chromium Edge. The check below accounts for this edge case.
855
+ var k1 = a ? Object.keys(a) : undefined;
856
+ var k2 = b ? Object.keys(b) : undefined;
859
857
  if (!k1 || !k2 || k1.length != k2.length) {
860
858
  return false;
861
859
  }
@@ -1876,7 +1874,25 @@
1876
1874
  function ActivatedRouteSnapshot(
1877
1875
  /** The URL segments matched by this route */
1878
1876
  url,
1879
- /** The matrix parameters scoped to this route */
1877
+ /**
1878
+ * The matrix parameters scoped to this route.
1879
+ *
1880
+ * You can compute all params (or data) in the router state or to get params outside
1881
+ * of an activated component by traversing the `RouterState` tree as in the following
1882
+ * example:
1883
+ * ```
1884
+ * collectRouteParams(router: Router) {
1885
+ * let params = {};
1886
+ * let stack: ActivatedRouteSnapshot[] = [router.routerState.snapshot.root];
1887
+ * while (stack.length > 0) {
1888
+ * const route = stack.pop()!;
1889
+ * params = {...params, ...route.params};
1890
+ * stack.push(...route.children);
1891
+ * }
1892
+ * return params;
1893
+ * }
1894
+ * ```
1895
+ */
1880
1896
  params,
1881
1897
  /** The query parameters shared by all the routes */
1882
1898
  queryParams,
@@ -2372,7 +2388,7 @@
2372
2388
  // if we start with an object literal, we need to reuse the path part from the segment
2373
2389
  if (i === 0 && isMatrixParams(commands[0])) {
2374
2390
  var p = segmentGroup.segments[startIndex];
2375
- paths.push(new UrlSegment(p.path, commands[0]));
2391
+ paths.push(new UrlSegment(p.path, stringify(commands[0])));
2376
2392
  i++;
2377
2393
  continue;
2378
2394
  }
@@ -2410,13 +2426,6 @@
2410
2426
  return path == segment.path && shallowEqual(params, segment.parameters);
2411
2427
  }
2412
2428
 
2413
- /**
2414
- * @license
2415
- * Copyright Google LLC All Rights Reserved.
2416
- *
2417
- * Use of this source code is governed by an MIT-style license that can be
2418
- * found in the LICENSE file at https://angular.io/license
2419
- */
2420
2429
  var activateRoutes = function (rootContexts, routeReuseStrategy, forwardEvent) { return operators.map(function (t) {
2421
2430
  new ActivateRoutes(routeReuseStrategy, t.targetRouterState, t.currentRouterState, forwardEvent)
2422
2431
  .activate(rootContexts);
@@ -2492,18 +2501,30 @@
2492
2501
  }
2493
2502
  };
2494
2503
  ActivateRoutes.prototype.deactivateRouteAndOutlet = function (route, parentContexts) {
2495
- var _this = this;
2504
+ var e_1, _a;
2496
2505
  var context = parentContexts.getContext(route.value.outlet);
2497
- if (context) {
2498
- var children = nodeChildrenAsMap(route);
2499
- var contexts_1 = route.value.component ? context.children : parentContexts;
2500
- forEach(children, function (v, k) { return _this.deactivateRouteAndItsChildren(v, contexts_1); });
2501
- if (context.outlet) {
2502
- // Destroy the component
2503
- context.outlet.deactivate();
2504
- // Destroy the contexts for all the outlets that were in the component
2505
- context.children.onOutletDeactivated();
2506
+ // The context could be `null` if we are on a componentless route but there may still be
2507
+ // children that need deactivating.
2508
+ var contexts = context && route.value.component ? context.children : parentContexts;
2509
+ var children = nodeChildrenAsMap(route);
2510
+ try {
2511
+ for (var _b = __values(Object.keys(children)), _c = _b.next(); !_c.done; _c = _b.next()) {
2512
+ var childOutlet = _c.value;
2513
+ this.deactivateRouteAndItsChildren(children[childOutlet], contexts);
2514
+ }
2515
+ }
2516
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
2517
+ finally {
2518
+ try {
2519
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
2506
2520
  }
2521
+ finally { if (e_1) throw e_1.error; }
2522
+ }
2523
+ if (context && context.outlet) {
2524
+ // Destroy the component
2525
+ context.outlet.deactivate();
2526
+ // Destroy the contexts for all the outlets that were in the component
2527
+ context.children.onOutletDeactivated();
2507
2528
  }
2508
2529
  };
2509
2530
  ActivateRoutes.prototype.activateChildRoutes = function (futureNode, currNode, contexts) {
@@ -2644,10 +2665,18 @@
2644
2665
  return guard && isFunction(guard.canDeactivate);
2645
2666
  }
2646
2667
 
2668
+ /**
2669
+ * @license
2670
+ * Copyright Google LLC All Rights Reserved.
2671
+ *
2672
+ * Use of this source code is governed by an MIT-style license that can be
2673
+ * found in the LICENSE file at https://angular.io/license
2674
+ */
2647
2675
  var INITIAL_VALUE = Symbol('INITIAL_VALUE');
2648
2676
  function prioritizedGuardValue() {
2649
2677
  return operators.switchMap(function (obs) {
2650
- return rxjs.combineLatest.apply(void 0, __spread(obs.map(function (o) { return o.pipe(operators.take(1), operators.startWith(INITIAL_VALUE)); }))).pipe(operators.scan(function (acc, list) {
2678
+ return rxjs.combineLatest(obs.map(function (o) { return o.pipe(operators.take(1), operators.startWith(INITIAL_VALUE)); }))
2679
+ .pipe(operators.scan(function (acc, list) {
2651
2680
  var isPending = false;
2652
2681
  return list.reduce(function (innerAcc, val, i) {
2653
2682
  if (innerAcc !== INITIAL_VALUE)
@@ -3086,7 +3115,7 @@
3086
3115
  return rxjs.from(childOutlets)
3087
3116
  .pipe(operators.concatMap(function (childOutlet) {
3088
3117
  var child = segmentGroup.children[childOutlet];
3089
- // Sort the routes so routes with outlets that match the the segment appear
3118
+ // Sort the routes so routes with outlets that match the segment appear
3090
3119
  // first, followed by routes for other outlets, which might match if they have an
3091
3120
  // empty path.
3092
3121
  var sortedRoutes = sortByMatchingOutlets(routes, childOutlet);
@@ -3350,8 +3379,9 @@
3350
3379
  var e_3, _a;
3351
3380
  var newChildren = {};
3352
3381
  try {
3353
- for (var _b = __values(Object.entries(segmentGroup.children)), _c = _b.next(); !_c.done; _c = _b.next()) {
3354
- var _d = __read(_c.value, 2), childOutlet = _d[0], child = _d[1];
3382
+ for (var _b = __values(Object.keys(segmentGroup.children)), _c = _b.next(); !_c.done; _c = _b.next()) {
3383
+ var childOutlet = _c.value;
3384
+ var child = segmentGroup.children[childOutlet];
3355
3385
  var childCandidate = squashSegmentGroup(child);
3356
3386
  // don't add empty children
3357
3387
  if (childCandidate.segments.length > 0 || childCandidate.hasChildren()) {
@@ -3378,10 +3408,8 @@
3378
3408
  * found in the LICENSE file at https://angular.io/license
3379
3409
  */
3380
3410
  function applyRedirects$1(moduleInjector, configLoader, urlSerializer, config) {
3381
- return function (source) {
3382
- return source.pipe(operators.switchMap(function (t) { return applyRedirects(moduleInjector, configLoader, urlSerializer, t.extractedUrl, config)
3383
- .pipe(operators.map(function (urlAfterRedirects) { return (Object.assign(Object.assign({}, t), { urlAfterRedirects: urlAfterRedirects })); })); }));
3384
- };
3411
+ return operators.switchMap(function (t) { return applyRedirects(moduleInjector, configLoader, urlSerializer, t.extractedUrl, config)
3412
+ .pipe(operators.map(function (urlAfterRedirects) { return (Object.assign(Object.assign({}, t), { urlAfterRedirects: urlAfterRedirects })); })); });
3385
3413
  }
3386
3414
 
3387
3415
  /**
@@ -3546,20 +3574,18 @@
3546
3574
  * found in the LICENSE file at https://angular.io/license
3547
3575
  */
3548
3576
  function checkGuards(moduleInjector, forwardEvent) {
3549
- return function (source) {
3550
- return source.pipe(operators.mergeMap(function (t) {
3551
- var targetSnapshot = t.targetSnapshot, currentSnapshot = t.currentSnapshot, _a = t.guards, canActivateChecks = _a.canActivateChecks, canDeactivateChecks = _a.canDeactivateChecks;
3552
- if (canDeactivateChecks.length === 0 && canActivateChecks.length === 0) {
3553
- return rxjs.of(Object.assign(Object.assign({}, t), { guardsResult: true }));
3554
- }
3555
- return runCanDeactivateChecks(canDeactivateChecks, targetSnapshot, currentSnapshot, moduleInjector)
3556
- .pipe(operators.mergeMap(function (canDeactivate) {
3557
- return canDeactivate && isBoolean(canDeactivate) ?
3558
- runCanActivateChecks(targetSnapshot, canActivateChecks, moduleInjector, forwardEvent) :
3559
- rxjs.of(canDeactivate);
3560
- }), operators.map(function (guardsResult) { return (Object.assign(Object.assign({}, t), { guardsResult: guardsResult })); }));
3561
- }));
3562
- };
3577
+ return operators.mergeMap(function (t) {
3578
+ var targetSnapshot = t.targetSnapshot, currentSnapshot = t.currentSnapshot, _a = t.guards, canActivateChecks = _a.canActivateChecks, canDeactivateChecks = _a.canDeactivateChecks;
3579
+ if (canDeactivateChecks.length === 0 && canActivateChecks.length === 0) {
3580
+ return rxjs.of(Object.assign(Object.assign({}, t), { guardsResult: true }));
3581
+ }
3582
+ return runCanDeactivateChecks(canDeactivateChecks, targetSnapshot, currentSnapshot, moduleInjector)
3583
+ .pipe(operators.mergeMap(function (canDeactivate) {
3584
+ return canDeactivate && isBoolean(canDeactivate) ?
3585
+ runCanActivateChecks(targetSnapshot, canActivateChecks, moduleInjector, forwardEvent) :
3586
+ rxjs.of(canDeactivate);
3587
+ }), operators.map(function (guardsResult) { return (Object.assign(Object.assign({}, t), { guardsResult: guardsResult })); }));
3588
+ });
3563
3589
  }
3564
3590
  function runCanDeactivateChecks(checks, futureRSS, currRSS, moduleInjector) {
3565
3591
  return rxjs.from(checks).pipe(operators.mergeMap(function (check) { return runCanDeactivate(check.component, check.route, currRSS, futureRSS, moduleInjector); }), operators.first(function (result) {
@@ -3568,15 +3594,7 @@
3568
3594
  }
3569
3595
  function runCanActivateChecks(futureSnapshot, checks, moduleInjector, forwardEvent) {
3570
3596
  return rxjs.from(checks).pipe(operators.concatMap(function (check) {
3571
- return rxjs.from([
3572
- fireChildActivationStart(check.route.parent, forwardEvent),
3573
- fireActivationStart(check.route, forwardEvent),
3574
- runCanActivateChild(futureSnapshot, check.path, moduleInjector),
3575
- runCanActivate(futureSnapshot, check.route, moduleInjector)
3576
- ])
3577
- .pipe(operators.concatAll(), operators.first(function (result) {
3578
- return result !== true;
3579
- }, true));
3597
+ return rxjs.concat(fireChildActivationStart(check.route.parent, forwardEvent), fireActivationStart(check.route, forwardEvent), runCanActivateChild(futureSnapshot, check.path, moduleInjector), runCanActivate(futureSnapshot, check.route, moduleInjector));
3580
3598
  }), operators.first(function (result) {
3581
3599
  return result !== true;
3582
3600
  }, true));
@@ -3968,10 +3986,8 @@
3968
3986
  * found in the LICENSE file at https://angular.io/license
3969
3987
  */
3970
3988
  function recognize$1(rootComponentType, config, serializer, paramsInheritanceStrategy, relativeLinkResolution) {
3971
- return function (source) {
3972
- return source.pipe(operators.mergeMap(function (t) { return recognize(rootComponentType, config, t.urlAfterRedirects, serializer(t.urlAfterRedirects), paramsInheritanceStrategy, relativeLinkResolution)
3973
- .pipe(operators.map(function (targetSnapshot) { return (Object.assign(Object.assign({}, t), { targetSnapshot: targetSnapshot })); })); }));
3974
- };
3989
+ return operators.mergeMap(function (t) { return recognize(rootComponentType, config, t.urlAfterRedirects, serializer(t.urlAfterRedirects), paramsInheritanceStrategy, relativeLinkResolution)
3990
+ .pipe(operators.map(function (targetSnapshot) { return (Object.assign(Object.assign({}, t), { targetSnapshot: targetSnapshot })); })); });
3975
3991
  }
3976
3992
 
3977
3993
  /**
@@ -3982,17 +3998,15 @@
3982
3998
  * found in the LICENSE file at https://angular.io/license
3983
3999
  */
3984
4000
  function resolveData(paramsInheritanceStrategy, moduleInjector) {
3985
- return function (source) {
3986
- return source.pipe(operators.mergeMap(function (t) {
3987
- var targetSnapshot = t.targetSnapshot, canActivateChecks = t.guards.canActivateChecks;
3988
- if (!canActivateChecks.length) {
3989
- return rxjs.of(t);
3990
- }
3991
- var canActivateChecksResolved = 0;
3992
- return rxjs.from(canActivateChecks)
3993
- .pipe(operators.concatMap(function (check) { return runResolve(check.route, targetSnapshot, paramsInheritanceStrategy, moduleInjector); }), operators.tap(function () { return canActivateChecksResolved++; }), operators.takeLast(1), operators.mergeMap(function (_) { return canActivateChecksResolved === canActivateChecks.length ? rxjs.of(t) : rxjs.EMPTY; }));
3994
- }));
3995
- };
4001
+ return operators.mergeMap(function (t) {
4002
+ var targetSnapshot = t.targetSnapshot, canActivateChecks = t.guards.canActivateChecks;
4003
+ if (!canActivateChecks.length) {
4004
+ return rxjs.of(t);
4005
+ }
4006
+ var canActivateChecksResolved = 0;
4007
+ return rxjs.from(canActivateChecks)
4008
+ .pipe(operators.concatMap(function (check) { return runResolve(check.route, targetSnapshot, paramsInheritanceStrategy, moduleInjector); }), operators.tap(function () { return canActivateChecksResolved++; }), operators.takeLast(1), operators.mergeMap(function (_) { return canActivateChecksResolved === canActivateChecks.length ? rxjs.of(t) : rxjs.EMPTY; }));
4009
+ });
3996
4010
  }
3997
4011
  function runResolve(futureARS, futureRSS, paramsInheritanceStrategy, moduleInjector) {
3998
4012
  var resolve = futureARS._resolve;
@@ -4041,15 +4055,13 @@
4041
4055
  * it will wait before continuing with the original value.
4042
4056
  */
4043
4057
  function switchTap(next) {
4044
- return function (source) {
4045
- return source.pipe(operators.switchMap(function (v) {
4046
- var nextResult = next(v);
4047
- if (nextResult) {
4048
- return rxjs.from(nextResult).pipe(operators.map(function () { return v; }));
4049
- }
4050
- return rxjs.from([v]);
4051
- }));
4052
- };
4058
+ return operators.switchMap(function (v) {
4059
+ var nextResult = next(v);
4060
+ if (nextResult) {
4061
+ return rxjs.from(nextResult).pipe(operators.map(function () { return v; }));
4062
+ }
4063
+ return rxjs.of(v);
4064
+ });
4053
4065
  }
4054
4066
 
4055
4067
  /**
@@ -4159,7 +4171,11 @@
4159
4171
  _this.onLoadEndListener(route);
4160
4172
  }
4161
4173
  var module = factory.create(parentInjector);
4162
- return new LoadedRouterConfig(flatten(module.injector.get(ROUTES)).map(standardizeConfig), module);
4174
+ // When loading a module that doesn't provide `RouterModule.forChild()` preloader will get
4175
+ // stuck in an infinite loop. The child module's Injector will look to its parent `Injector`
4176
+ // when it doesn't find any ROUTES so it will return routes for it's parent module instead.
4177
+ return new LoadedRouterConfig(flatten(module.injector.get(ROUTES, undefined, core.InjectFlags.Self | core.InjectFlags.Optional))
4178
+ .map(standardizeConfig), module);
4163
4179
  }));
4164
4180
  };
4165
4181
  RouterConfigLoader.prototype.loadModuleFactory = function (loadChildren) {
@@ -4417,7 +4433,7 @@
4417
4433
  this.ngModule = injector.get(core.NgModuleRef);
4418
4434
  this.console = injector.get(core.ɵConsole);
4419
4435
  var ngZone = injector.get(core.NgZone);
4420
- this.isNgZoneEnabled = ngZone instanceof core.NgZone;
4436
+ this.isNgZoneEnabled = ngZone instanceof core.NgZone && core.NgZone.isInAngularZone();
4421
4437
  this.resetConfig(config);
4422
4438
  this.currentUrlTree = createEmptyUrlTree();
4423
4439
  this.rawUrlTree = this.currentUrlTree;
@@ -4483,11 +4499,10 @@
4483
4499
  if (transition !== _this.transitions.getValue()) {
4484
4500
  return rxjs.EMPTY;
4485
4501
  }
4486
- return [t];
4502
+ // This delay is required to match old behavior that forced
4503
+ // navigation to always be async
4504
+ return Promise.resolve(t);
4487
4505
  }),
4488
- // This delay is required to match old behavior that forced navigation
4489
- // to always be async
4490
- operators.switchMap(function (t) { return Promise.resolve(t); }),
4491
4506
  // ApplyRedirects
4492
4507
  applyRedirects$1(_this.ngModule.injector, _this.configLoader, _this.urlSerializer, _this.config),
4493
4508
  // Update the currentNavigation
@@ -4504,9 +4519,7 @@
4504
4519
  }
4505
4520
  _this.browserUrlTree = t.urlAfterRedirects;
4506
4521
  }
4507
- }),
4508
- // Fire RoutesRecognized
4509
- operators.tap(function (t) {
4522
+ // Fire RoutesRecognized
4510
4523
  var routesRecognized = new RoutesRecognized(t.id, _this.serializeUrl(t.extractedUrl), _this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot);
4511
4524
  eventsSubject.next(routesRecognized);
4512
4525
  }));
@@ -4558,7 +4571,6 @@
4558
4571
  error.url = t.guardsResult;
4559
4572
  throw error;
4560
4573
  }
4561
- }), operators.tap(function (t) {
4562
4574
  var guardsEnd = new GuardsCheckEnd(t.id, _this.serializeUrl(t.extractedUrl), _this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot, !!t.guardsResult);
4563
4575
  _this.triggerEvent(guardsEnd);
4564
4576
  }), operators.filter(function (t) {
@@ -4691,7 +4703,7 @@
4691
4703
  skipLocationChange: t.extras.skipLocationChange,
4692
4704
  replaceUrl: _this.urlUpdateStrategy === 'eager'
4693
4705
  };
4694
- return _this.scheduleNavigation(mergedTree, 'imperative', null, extras, { resolve: t.resolve, reject: t.reject, promise: t.promise });
4706
+ _this.scheduleNavigation(mergedTree, 'imperative', null, extras, { resolve: t.resolve, reject: t.reject, promise: t.promise });
4695
4707
  }, 0);
4696
4708
  }
4697
4709
  /* All other errors should reset to the router's internal URL reference to
@@ -5461,7 +5473,7 @@
5461
5473
  * is active.
5462
5474
  *
5463
5475
  * Use this directive to create a visual distinction for elements associated with an active route.
5464
- * For example, the following code highlights the word "Bob" when the the router
5476
+ * For example, the following code highlights the word "Bob" when the router
5465
5477
  * activates the associated route:
5466
5478
  *
5467
5479
  * ```
@@ -5533,9 +5545,7 @@
5533
5545
  RouterLinkActive.prototype.ngAfterContentInit = function () {
5534
5546
  var _this = this;
5535
5547
  // `of(null)` is used to force subscribe body to execute once immediately (like `startWith`).
5536
- rxjs.from([this.links.changes, this.linksWithHrefs.changes, rxjs.of(null)])
5537
- .pipe(operators.mergeAll())
5538
- .subscribe(function (_) {
5548
+ rxjs.of(this.links.changes, this.linksWithHrefs.changes, rxjs.of(null)).pipe(operators.mergeAll()).subscribe(function (_) {
5539
5549
  _this.update();
5540
5550
  _this.subscribeToEachLinkOnChanges();
5541
5551
  });
@@ -6411,7 +6421,7 @@
6411
6421
  /**
6412
6422
  * @publicApi
6413
6423
  */
6414
- var VERSION = new core.Version('11.1.0-next.4');
6424
+ var VERSION = new core.Version('11.1.1');
6415
6425
 
6416
6426
  /**
6417
6427
  * @license