@angular/router 11.2.13 → 11.2.14
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.
- package/bundles/router-testing.umd.js +1 -1
- package/bundles/router-testing.umd.min.js +1 -1
- package/bundles/router-testing.umd.min.js.map +1 -1
- package/bundles/router-upgrade.umd.js +1 -1
- package/bundles/router-upgrade.umd.min.js +1 -1
- package/bundles/router-upgrade.umd.min.js.map +1 -1
- package/bundles/router.umd.js +2 -2
- package/bundles/router.umd.js.map +1 -1
- package/bundles/router.umd.min.js +2 -2
- package/bundles/router.umd.min.js.map +1 -1
- package/esm2015/src/version.js +3 -3
- package/fesm2015/router.js +2 -2
- package/fesm2015/router.js.map +1 -1
- package/fesm2015/testing.js +1 -1
- package/fesm2015/upgrade.js +1 -1
- package/package.json +4 -4
- package/router.d.ts +1 -1
- package/router.metadata.json +1 -1
- package/testing/testing.d.ts +1 -1
- package/testing.d.ts +1 -1
- package/upgrade/upgrade.d.ts +1 -1
- package/upgrade.d.ts +1 -1
|
@@ -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","Ur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N,GAAkB,OAIzEF,EAZ6B,GAcxCA,EAAoBL,WAAa,CAC7B,CAAEC,KAAMzD,EAAKsE,SAAUC,KAAM,CAAC,CAClBjF,QAAS,CAACO,EAAO2E,cACjBP,UAAW,CACPpE,EAAO4E,kBAAmB,CAAEN,QAASpE,EAAO2E,SAAUC,SAAU7E,EAAQ8E,aACxE,CAAET,QAASpE,EAAO8E,iBAAkBF,SAAU7E,EAAQgF,sBACtD,CAAEX,QAASnE,EAAK+E,sBAAuBJ,SAAUzE,GAA4B,CACzEiE,QAAStE,EAAOuD,OAChB4B,WAAYtC,EACZuC,KAAM,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.2.13\n * (c) 2010-2021 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,GAAU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OAChB4B,WAAYtC,EACZuC,KAAM,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.2.14\n * (c) 2010-2021 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 +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.2.
|
|
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,iB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c,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.2.14\n * (c) 2010-2021 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"]}
|
package/bundles/router.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v11.2.
|
|
2
|
+
* @license Angular v11.2.14
|
|
3
3
|
* (c) 2010-2021 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -6468,7 +6468,7 @@
|
|
|
6468
6468
|
/**
|
|
6469
6469
|
* @publicApi
|
|
6470
6470
|
*/
|
|
6471
|
-
var VERSION = new core.Version('11.2.
|
|
6471
|
+
var VERSION = new core.Version('11.2.14');
|
|
6472
6472
|
|
|
6473
6473
|
/**
|
|
6474
6474
|
* @license
|