@angular/router 7.2.0-rc.0 → 7.2.3
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 +4 -4
- package/bundles/router-testing.umd.js.map +1 -1
- package/bundles/router-testing.umd.min.js +2 -2
- package/bundles/router-testing.umd.min.js.map +1 -1
- package/bundles/router-upgrade.umd.js +4 -4
- package/bundles/router-upgrade.umd.js.map +1 -1
- package/bundles/router-upgrade.umd.min.js +2 -2
- package/bundles/router-upgrade.umd.min.js.map +1 -1
- package/bundles/router.umd.js +23 -13
- package/bundles/router.umd.js.map +1 -1
- package/bundles/router.umd.min.js +20 -20
- package/bundles/router.umd.min.js.map +1 -1
- package/esm2015/index.js +1 -1
- package/esm2015/public_api.js +1 -1
- package/esm2015/router.js +1 -1
- package/esm2015/src/apply_redirects.js +1 -1
- package/esm2015/src/components/empty_outlet.js +1 -1
- package/esm2015/src/config.js +1 -1
- package/esm2015/src/create_router_state.js +1 -1
- package/esm2015/src/create_url_tree.js +1 -1
- package/esm2015/src/directives/router_link.js +2 -2
- package/esm2015/src/directives/router_link_active.js +1 -1
- package/esm2015/src/directives/router_outlet.js +1 -1
- package/esm2015/src/events.js +1 -1
- package/esm2015/src/index.js +1 -1
- package/esm2015/src/interfaces.js +2 -2
- package/esm2015/src/operators/activate_routes.js +1 -1
- package/esm2015/src/operators/apply_redirects.js +1 -1
- package/esm2015/src/operators/check_guards.js +1 -1
- package/esm2015/src/operators/prioritized_guard_value.js +1 -1
- package/esm2015/src/operators/recognize.js +1 -1
- package/esm2015/src/operators/resolve_data.js +1 -1
- package/esm2015/src/operators/switch_tap.js +1 -1
- package/esm2015/src/private_export.js +1 -1
- package/esm2015/src/recognize.js +1 -1
- package/esm2015/src/route_reuse_strategy.js +1 -1
- package/esm2015/src/router.js +21 -6
- package/esm2015/src/router_config_loader.js +1 -1
- package/esm2015/src/router_module.js +1 -1
- package/esm2015/src/router_outlet_context.js +1 -1
- package/esm2015/src/router_preloader.js +1 -1
- package/esm2015/src/router_scroller.js +1 -1
- package/esm2015/src/router_state.js +1 -1
- package/esm2015/src/shared.js +1 -1
- package/esm2015/src/url_handling_strategy.js +1 -1
- package/esm2015/src/url_tree.js +1 -1
- package/esm2015/src/utils/collection.js +1 -1
- package/esm2015/src/utils/preactivation.js +1 -1
- package/esm2015/src/utils/tree.js +1 -1
- package/esm2015/src/utils/type_guards.js +1 -1
- package/esm2015/src/version.js +2 -2
- package/esm2015/testing/index.js +1 -1
- package/esm2015/testing/public_api.js +1 -1
- package/esm2015/testing/src/router_testing_module.js +1 -1
- package/esm2015/testing/src/testing.js +1 -1
- package/esm2015/testing/testing.js +1 -1
- package/esm2015/upgrade/index.js +1 -1
- package/esm2015/upgrade/public_api.js +1 -1
- package/esm2015/upgrade/src/upgrade.js +1 -1
- package/esm2015/upgrade/upgrade.js +1 -1
- package/esm5/index.js +1 -1
- package/esm5/public_api.js +1 -1
- package/esm5/router.js +1 -1
- package/esm5/src/apply_redirects.js +1 -1
- package/esm5/src/components/empty_outlet.js +1 -1
- package/esm5/src/config.js +1 -1
- package/esm5/src/create_router_state.js +1 -1
- package/esm5/src/create_url_tree.js +1 -1
- package/esm5/src/directives/router_link.js +2 -2
- package/esm5/src/directives/router_link_active.js +1 -1
- package/esm5/src/directives/router_outlet.js +1 -1
- package/esm5/src/events.js +1 -1
- package/esm5/src/index.js +1 -1
- package/esm5/src/interfaces.js +1 -1
- package/esm5/src/operators/activate_routes.js +1 -1
- package/esm5/src/operators/apply_redirects.js +1 -1
- package/esm5/src/operators/check_guards.js +1 -1
- package/esm5/src/operators/prioritized_guard_value.js +1 -1
- package/esm5/src/operators/recognize.js +1 -1
- package/esm5/src/operators/resolve_data.js +1 -1
- package/esm5/src/operators/switch_tap.js +1 -1
- package/esm5/src/private_export.js +1 -1
- package/esm5/src/recognize.js +1 -1
- package/esm5/src/route_reuse_strategy.js +1 -1
- package/esm5/src/router.js +16 -6
- package/esm5/src/router_config_loader.js +1 -1
- package/esm5/src/router_module.js +1 -1
- package/esm5/src/router_outlet_context.js +1 -1
- package/esm5/src/router_preloader.js +1 -1
- package/esm5/src/router_scroller.js +1 -1
- package/esm5/src/router_state.js +1 -1
- package/esm5/src/shared.js +1 -1
- package/esm5/src/url_handling_strategy.js +1 -1
- package/esm5/src/url_tree.js +1 -1
- package/esm5/src/utils/collection.js +1 -1
- package/esm5/src/utils/preactivation.js +1 -1
- package/esm5/src/utils/tree.js +1 -1
- package/esm5/src/utils/type_guards.js +1 -1
- package/esm5/src/version.js +2 -2
- package/esm5/testing/index.js +1 -1
- package/esm5/testing/public_api.js +1 -1
- package/esm5/testing/src/router_testing_module.js +1 -1
- package/esm5/testing/src/testing.js +1 -1
- package/esm5/testing/testing.js +1 -1
- package/esm5/upgrade/index.js +1 -1
- package/esm5/upgrade/public_api.js +1 -1
- package/esm5/upgrade/src/upgrade.js +1 -1
- package/esm5/upgrade/upgrade.js +1 -1
- package/fesm2015/router.js +22 -12
- package/fesm2015/router.js.map +1 -1
- package/fesm2015/testing.js +4 -4
- package/fesm2015/testing.js.map +1 -1
- package/fesm2015/upgrade.js +1 -1
- package/fesm2015/upgrade.js.map +1 -1
- package/fesm5/router.js +22 -12
- package/fesm5/router.js.map +1 -1
- package/fesm5/testing.js +4 -4
- package/fesm5/testing.js.map +1 -1
- package/fesm5/upgrade.js +1 -1
- package/fesm5/upgrade.js.map +1 -1
- package/package.json +4 -4
- package/router.metadata.json +1 -1
- package/src/config.d.ts +2 -1
- package/src/directives/router_link.d.ts +1 -1
- package/src/interfaces.d.ts +1 -1
- package/src/router.d.ts +1 -0
- package/testing.d.ts +2 -3
- package/upgrade.d.ts +2 -3
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v7.2.
|
|
2
|
+
* @license Angular v7.2.3
|
|
3
3
|
* (c) 2010-2018 Google, Inc. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/
|
|
6
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/common"),require("@angular/core"),require("rxjs"),require("rxjs/operators"),require("@angular/platform-browser")):"function"==typeof define&&define.amd?define("@angular/router",["exports","@angular/common","@angular/core","rxjs","rxjs/operators","@angular/platform-browser"],e):e(((t=t||self).ng=t.ng||{},t.ng.router={}),t.ng.common,t.ng.core,t.rxjs,t.rxjs.operators,t.ng.platformBrowser)}(this,function(t,e,r,n,o,i){"use strict";var a=function(t,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};function u(t,e){function r(){this.constructor=t}a(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var s=function(){return(s=Object.assign||function t(e){for(var r,n=1,o=arguments.length;n<o;n++)for(var i in r=arguments[n])Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i]);return e}).apply(this,arguments)};function c(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a}function l(t,e){return function(r,n){e(r,n,t)}}function p(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function h(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}}function f(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function d(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(f(arguments[e]));return t}
|
|
7
7
|
/**
|
|
8
8
|
* @license
|
|
9
9
|
* Copyright Google Inc. All Rights Reserved.
|
|
10
10
|
*
|
|
11
11
|
* Use of this source code is governed by an MIT-style license that can be
|
|
12
12
|
* found in the LICENSE file at https://angular.io/license
|
|
13
|
-
*/var g,v=function(t){function e(e,r,n,o){void 0===n&&(n="imperative"),void 0===o&&(o=null);var i=t.call(this,e,r)||this;return i.navigationTrigger=n,i.restoredState=o,i}return u(e,t),e.prototype.toString=function(){return"NavigationStart(id: "+this.id+", url: '"+this.url+"')"},e}(g=function g(t,e){this.id=t,this.url=e}),m=function(t){function e(e,r,n){var o=t.call(this,e,r)||this;return o.urlAfterRedirects=n,o}return u(e,t),e.prototype.toString=function(){return"NavigationEnd(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"')"},e}(g),y=function(t){function e(e,r,n){var o=t.call(this,e,r)||this;return o.reason=n,o}return u(e,t),e.prototype.toString=function(){return"NavigationCancel(id: "+this.id+", url: '"+this.url+"')"},e}(g),S=function(t){function e(e,r,n){var o=t.call(this,e,r)||this;return o.error=n,o}return u(e,t),e.prototype.toString=function(){return"NavigationError(id: "+this.id+", url: '"+this.url+"', error: "+this.error+")"},e}(g),w=function(t){function e(e,r,n,o){var i=t.call(this,e,r)||this;return i.urlAfterRedirects=n,i.state=o,i}return u(e,t),e.prototype.toString=function(){return"RoutesRecognized(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+")"},e}(g),b=function(t){function e(e,r,n,o){var i=t.call(this,e,r)||this;return i.urlAfterRedirects=n,i.state=o,i}return u(e,t),e.prototype.toString=function(){return"GuardsCheckStart(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+")"},e}(g),C=function(t){function e(e,r,n,o,i){var a=t.call(this,e,r)||this;return a.urlAfterRedirects=n,a.state=o,a.shouldActivate=i,a}return u(e,t),e.prototype.toString=function(){return"GuardsCheckEnd(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+", shouldActivate: "+this.shouldActivate+")"},e}(g),R=function(t){function e(e,r,n,o){var i=t.call(this,e,r)||this;return i.urlAfterRedirects=n,i.state=o,i}return u(e,t),e.prototype.toString=function(){return"ResolveStart(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+")"},e}(g),U=function(t){function e(e,r,n,o){var i=t.call(this,e,r)||this;return i.urlAfterRedirects=n,i.state=o,i}return u(e,t),e.prototype.toString=function(){return"ResolveEnd(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+")"},e}(g),P=function(){function t(t){this.route=t}return t.prototype.toString=function(){return"RouteConfigLoadStart(path: "+this.route.path+")"},t}(),O=function(){function t(t){this.route=t}return t.prototype.toString=function(){return"RouteConfigLoadEnd(path: "+this.route.path+")"},t}(),_=function(){function t(t){this.snapshot=t}return t.prototype.toString=function(){return"ChildActivationStart(path: '"+(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"")+"')"},t}(),x=function(){function t(t){this.snapshot=t}return t.prototype.toString=function(){return"ChildActivationEnd(path: '"+(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"")+"')"},t}(),A=function(){function t(t){this.snapshot=t}return t.prototype.toString=function(){return"ActivationStart(path: '"+(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"")+"')"},t}(),
|
|
13
|
+
*/var g,v=function(t){function e(e,r,n,o){void 0===n&&(n="imperative"),void 0===o&&(o=null);var i=t.call(this,e,r)||this;return i.navigationTrigger=n,i.restoredState=o,i}return u(e,t),e.prototype.toString=function(){return"NavigationStart(id: "+this.id+", url: '"+this.url+"')"},e}(g=function g(t,e){this.id=t,this.url=e}),m=function(t){function e(e,r,n){var o=t.call(this,e,r)||this;return o.urlAfterRedirects=n,o}return u(e,t),e.prototype.toString=function(){return"NavigationEnd(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"')"},e}(g),y=function(t){function e(e,r,n){var o=t.call(this,e,r)||this;return o.reason=n,o}return u(e,t),e.prototype.toString=function(){return"NavigationCancel(id: "+this.id+", url: '"+this.url+"')"},e}(g),S=function(t){function e(e,r,n){var o=t.call(this,e,r)||this;return o.error=n,o}return u(e,t),e.prototype.toString=function(){return"NavigationError(id: "+this.id+", url: '"+this.url+"', error: "+this.error+")"},e}(g),w=function(t){function e(e,r,n,o){var i=t.call(this,e,r)||this;return i.urlAfterRedirects=n,i.state=o,i}return u(e,t),e.prototype.toString=function(){return"RoutesRecognized(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+")"},e}(g),b=function(t){function e(e,r,n,o){var i=t.call(this,e,r)||this;return i.urlAfterRedirects=n,i.state=o,i}return u(e,t),e.prototype.toString=function(){return"GuardsCheckStart(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+")"},e}(g),C=function(t){function e(e,r,n,o,i){var a=t.call(this,e,r)||this;return a.urlAfterRedirects=n,a.state=o,a.shouldActivate=i,a}return u(e,t),e.prototype.toString=function(){return"GuardsCheckEnd(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+", shouldActivate: "+this.shouldActivate+")"},e}(g),R=function(t){function e(e,r,n,o){var i=t.call(this,e,r)||this;return i.urlAfterRedirects=n,i.state=o,i}return u(e,t),e.prototype.toString=function(){return"ResolveStart(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+")"},e}(g),U=function(t){function e(e,r,n,o){var i=t.call(this,e,r)||this;return i.urlAfterRedirects=n,i.state=o,i}return u(e,t),e.prototype.toString=function(){return"ResolveEnd(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+")"},e}(g),P=function(){function t(t){this.route=t}return t.prototype.toString=function(){return"RouteConfigLoadStart(path: "+this.route.path+")"},t}(),O=function(){function t(t){this.route=t}return t.prototype.toString=function(){return"RouteConfigLoadEnd(path: "+this.route.path+")"},t}(),_=function(){function t(t){this.snapshot=t}return t.prototype.toString=function(){return"ChildActivationStart(path: '"+(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"")+"')"},t}(),x=function(){function t(t){this.snapshot=t}return t.prototype.toString=function(){return"ChildActivationEnd(path: '"+(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"")+"')"},t}(),A=function(){function t(t){this.snapshot=t}return t.prototype.toString=function(){return"ActivationStart(path: '"+(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"")+"')"},t}(),T=function(){function t(t){this.snapshot=t}return t.prototype.toString=function(){return"ActivationEnd(path: '"+(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"")+"')"},t}(),E=function(){function t(t,e,r){this.routerEvent=t,this.position=e,this.anchor=r}return t.prototype.toString=function(){return"Scroll(anchor: '"+this.anchor+"', position: '"+(this.position?this.position[0]+", "+this.position[1]:null)+"')"},t}(),j=function(){return c([r.Component({template:"<router-outlet></router-outlet>"})],function t(){})}(),I="primary",k=function(){function t(t){this.params=t||{}}return t.prototype.has=function(t){return this.params.hasOwnProperty(t)},t.prototype.get=function(t){if(this.has(t)){var e=this.params[t];return Array.isArray(e)?e[0]:e}return null},t.prototype.getAll=function(t){if(this.has(t)){var e=this.params[t];return Array.isArray(e)?e:[e]}return[]},Object.defineProperty(t.prototype,"keys",{get:function(){return Object.keys(this.params)},enumerable:!0,configurable:!0}),t}();function L(t){return new k(t)}var M="ngNavigationCancelingError";function N(t){var e=Error("NavigationCancelingError: "+t);return e[M]=!0,e}function q(t,e,r){var n=r.path.split("/");if(n.length>t.length)return null;if("full"===r.pathMatch&&(e.hasChildren()||n.length<t.length))return null;for(var o={},i=0;i<n.length;i++){var a=n[i],u=t[i];if(a.startsWith(":"))o[a.substring(1)]=u;else if(a!==u.path)return null}return{consumed:t.slice(0,n.length),posParams:o}}
|
|
14
14
|
/**
|
|
15
15
|
* @license
|
|
16
16
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
*
|
|
25
25
|
* Use of this source code is governed by an MIT-style license that can be
|
|
26
26
|
* found in the LICENSE file at https://angular.io/license
|
|
27
|
-
*/function G(t,e){var r,n=Object.keys(t),o=Object.keys(e);if(n.length!=o.length)return!1;for(var i=0;i<n.length;i++)if(t[r=n[i]]!==e[r])return!1;return!0}function W(t){return Array.prototype.concat.apply([],t)}function Q(t){return t.length>0?t[t.length-1]:null}function V(t,e){for(var r in t)t.hasOwnProperty(r)&&e(t[r],r)}function Z(t){return
|
|
27
|
+
*/function G(t,e){var r,n=Object.keys(t),o=Object.keys(e);if(n.length!=o.length)return!1;for(var i=0;i<n.length;i++)if(t[r=n[i]]!==e[r])return!1;return!0}function W(t){return Array.prototype.concat.apply([],t)}function Q(t){return t.length>0?t[t.length-1]:null}function V(t,e){for(var r in t)t.hasOwnProperty(r)&&e(t[r],r)}function Z(t){return r.ɵisObservable(t)?t:r.ɵisPromise(t)?n.from(Promise.resolve(t)):n.of(t)}
|
|
28
28
|
/**
|
|
29
29
|
* @license
|
|
30
30
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -38,21 +38,21 @@
|
|
|
38
38
|
*
|
|
39
39
|
* Use of this source code is governed by an MIT-style license that can be
|
|
40
40
|
* found in the LICENSE file at https://angular.io/license
|
|
41
|
-
*/var bt=function(t){function e(e,r){var n=t.call(this,e)||this;return n.snapshot=r,_t(n,e),n}return u(e,t),e.prototype.toString=function(){return this.snapshot.toString()},e}(vt);function Ct(t,e){var
|
|
41
|
+
*/var bt=function(t){function e(e,r){var n=t.call(this,e)||this;return n.snapshot=r,_t(n,e),n}return u(e,t),e.prototype.toString=function(){return this.snapshot.toString()},e}(vt);function Ct(t,e){var r=function o(t,e){var r=new Pt([],{},{},"",{},I,e,null,t.root,-1,{});return new Ot("",new St(r,[]))}(t,e),i=new n.BehaviorSubject([new J("",{})]),a=new n.BehaviorSubject({}),u=new n.BehaviorSubject({}),s=new n.BehaviorSubject({}),c=new n.BehaviorSubject(""),l=new Rt(i,a,s,c,u,I,e,r.root);return l.snapshot=r.root,new bt(new St(l,[]),r)}var Rt=function(){function t(t,e,r,n,o,i,a,u){this.url=t,this.params=e,this.queryParams=r,this.fragment=n,this.data=o,this.outlet=i,this.component=a,this._futureSnapshot=u}return Object.defineProperty(t.prototype,"routeConfig",{get:function(){return this._futureSnapshot.routeConfig},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){return this._routerState.root},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return this._routerState.parent(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"firstChild",{get:function(){return this._routerState.firstChild(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"children",{get:function(){return this._routerState.children(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pathFromRoot",{get:function(){return this._routerState.pathFromRoot(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"paramMap",{get:function(){return this._paramMap||(this._paramMap=this.params.pipe(o.map(function(t){return L(t)}))),this._paramMap},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"queryParamMap",{get:function(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(o.map(function(t){return L(t)}))),this._queryParamMap},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return this.snapshot?this.snapshot.toString():"Future("+this._futureSnapshot+")"},t}();function Ut(t,e){void 0===e&&(e="emptyOnly");var r=t.pathFromRoot,n=0;if("always"!==e)for(n=r.length-1;n>=1;){var o=r[n],i=r[n-1];if(o.routeConfig&&""===o.routeConfig.path)n--;else{if(i.component)break;n--}}return function a(t){return t.reduce(function(t,e){return{params:s({},t.params,e.params),data:s({},t.data,e.data),resolve:s({},t.resolve,e._resolvedData)}},{params:{},data:{},resolve:{}})}(r.slice(n))}var Pt=function(){function t(t,e,r,n,o,i,a,u,s,c,l){this.url=t,this.params=e,this.queryParams=r,this.fragment=n,this.data=o,this.outlet=i,this.component=a,this.routeConfig=u,this._urlSegment=s,this._lastPathIndex=c,this._resolve=l}return Object.defineProperty(t.prototype,"root",{get:function(){return this._routerState.root},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return this._routerState.parent(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"firstChild",{get:function(){return this._routerState.firstChild(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"children",{get:function(){return this._routerState.children(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pathFromRoot",{get:function(){return this._routerState.pathFromRoot(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"paramMap",{get:function(){return this._paramMap||(this._paramMap=L(this.params)),this._paramMap},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"queryParamMap",{get:function(){return this._queryParamMap||(this._queryParamMap=L(this.queryParams)),this._queryParamMap},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return"Route(url:'"+this.url.map(function(t){return t.toString()}).join("/")+"', path:'"+(this.routeConfig?this.routeConfig.path:"")+"')"},t}(),Ot=function(t){function e(e,r){var n=t.call(this,r)||this;return n.url=e,_t(n,r),n}return u(e,t),e.prototype.toString=function(){return xt(this._root)},e}(vt);function _t(t,e){e.value._routerState=t,e.children.forEach(function(e){return _t(t,e)})}function xt(t){var e=t.children.length>0?" { "+t.children.map(xt).join(", ")+" } ":"";return""+t.value+e}function At(t){if(t.snapshot){var e=t.snapshot,r=t._futureSnapshot;t.snapshot=r,G(e.queryParams,r.queryParams)||t.queryParams.next(r.queryParams),e.fragment!==r.fragment&&t.fragment.next(r.fragment),G(e.params,r.params)||t.params.next(r.params),function n(t,e){if(t.length!==e.length)return!1;for(var r=0;r<t.length;++r)if(!G(t[r],e[r]))return!1;return!0}(e.url,r.url)||t.url.next(r.url),G(e.data,r.data)||t.data.next(r.data)}else t.snapshot=t._futureSnapshot,t.data.next(t._futureSnapshot.data)}function Tt(t,e){return G(t.params,e.params)&&function r(t,e){return X(t,e)&&t.every(function(t,r){return G(t.parameters,e[r].parameters)})}(t.url,e.url)&&!(!t.parent!=!e.parent)&&(!t.parent||Tt(t.parent,e.parent))}
|
|
42
42
|
/**
|
|
43
43
|
* @license
|
|
44
44
|
* Copyright Google Inc. All Rights Reserved.
|
|
45
45
|
*
|
|
46
46
|
* Use of this source code is governed by an MIT-style license that can be
|
|
47
47
|
* found in the LICENSE file at https://angular.io/license
|
|
48
|
-
*/function
|
|
48
|
+
*/function Et(t){return"object"==typeof t&&null!=t&&!t.outlets&&!t.segmentPath}function jt(t,e,r,n,o){var i={};return n&&V(n,function(t,e){i[e]=Array.isArray(t)?t.map(function(t){return""+t}):""+t}),new $(r.root===t?e:function t(e,r,n){var o={};return V(e.children,function(e,i){o[i]=e===r?n:t(e,r,n)}),new K(e.segments,o)}(r.root,t,e),i,o)}var It=function(){function t(t,e,r){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=r,t&&r.length>0&&Et(r[0]))throw new Error("Root segment cannot have matrix parameters");var n=r.find(function(t){return"object"==typeof t&&null!=t&&t.outlets});if(n&&n!==Q(r))throw new Error("{outlets:{}} has to be the last command")}return t.prototype.toRoot=function(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]},t}(),kt=function kt(t,e,r){this.segmentGroup=t,this.processChildren=e,this.index=r};function Lt(t){return"object"==typeof t&&null!=t&&t.outlets?t.outlets[I]:""+t}function Mt(t,e,r){if(t||(t=new K([],{})),0===t.segments.length&&t.hasChildren())return Nt(t,e,r);var n=function o(t,e,r){for(var n=0,o=e,i={match:!1,pathIndex:0,commandIndex:0};o<t.segments.length;){if(n>=r.length)return i;var a=t.segments[o],u=Lt(r[n]),s=n<r.length-1?r[n+1]:null;if(o>0&&void 0===u)break;if(u&&s&&"object"==typeof s&&void 0===s.outlets){if(!Ht(u,s,a))return i;n+=2}else{if(!Ht(u,{},a))return i;n++}o++}return{match:!0,pathIndex:o,commandIndex:n}}(t,e,r),i=r.slice(n.commandIndex);if(n.match&&n.pathIndex<t.segments.length){var a=new K(t.segments.slice(0,n.pathIndex),{});return a.children[I]=new K(t.segments.slice(n.pathIndex),t.children),Nt(a,0,i)}return n.match&&0===i.length?new K(t.segments,{}):n.match&&!t.hasChildren()?qt(t,e,r):n.match?Nt(t,0,i):qt(t,e,r)}function Nt(t,e,r){if(0===r.length)return new K(t.segments,{});var n=function o(t){var e,r;return"object"!=typeof t[0]?((e={})[I]=t,e):void 0===t[0].outlets?((r={})[I]=t,r):t[0].outlets}(r),i={};return V(n,function(r,n){null!==r&&(i[n]=Mt(t.children[n],e,r))}),V(t.children,function(t,e){void 0===n[e]&&(i[e]=t)}),new K(t.segments,i)}function qt(t,e,r){for(var n=t.segments.slice(0,e),o=0;o<r.length;){if("object"==typeof r[o]&&void 0!==r[o].outlets){var i=Dt(r[o].outlets);return new K(n,i)}if(0===o&&Et(r[0]))n.push(new J(t.segments[e].path,r[0])),o++;else{var a=Lt(r[o]),u=o<r.length-1?r[o+1]:null;a&&u&&Et(u)?(n.push(new J(a,zt(u))),o+=2):(n.push(new J(a,{})),o++)}}return new K(n,{})}function Dt(t){var e={};return V(t,function(t,r){null!==t&&(e[r]=qt(new K([],{}),0,t))}),e}function zt(t){var e={};return V(t,function(t,r){return e[r]=""+t}),e}function Ht(t,e,r){return t==r.path&&G(e,r.parameters)}
|
|
49
49
|
/**
|
|
50
50
|
* @license
|
|
51
51
|
* Copyright Google Inc. All Rights Reserved.
|
|
52
52
|
*
|
|
53
53
|
* Use of this source code is governed by an MIT-style license that can be
|
|
54
54
|
* found in the LICENSE file at https://angular.io/license
|
|
55
|
-
*/var Ft=function(){function t(t,e,r,n){this.routeReuseStrategy=t,this.futureState=e,this.currState=r,this.forwardEvent=n}return t.prototype.activate=function(t){var e=this.futureState._root,r=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,r,t),At(this.futureState.root),this.activateChildRoutes(e,r,t)},t.prototype.deactivateChildRoutes=function(t,e,r){var n=this,o=wt(e);t.children.forEach(function(t){var e=t.value.outlet;n.deactivateRoutes(t,o[e],r),delete o[e]}),V(o,function(t,e){n.deactivateRouteAndItsChildren(t,r)})},t.prototype.deactivateRoutes=function(t,e,r){var n=t.value,o=e?e.value:null;if(n===o)if(n.component){var i=r.getContext(n.outlet);i&&this.deactivateChildRoutes(t,e,i.children)}else this.deactivateChildRoutes(t,e,r);else o&&this.deactivateRouteAndItsChildren(e,r)},t.prototype.deactivateRouteAndItsChildren=function(t,e){this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,e):this.deactivateRouteAndOutlet(t,e)},t.prototype.detachAndStoreRouteSubtree=function(t,e){var r=e.getContext(t.value.outlet);if(r&&r.outlet){var n=r.outlet.detach(),o=r.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:n,route:t,contexts:o})}},t.prototype.deactivateRouteAndOutlet=function(t,e){var r=this,n=e.getContext(t.value.outlet);if(n){var o=wt(t),i=t.value.component?n.children:e;V(o,function(t,e){return r.deactivateRouteAndItsChildren(t,i)}),n.outlet&&(n.outlet.deactivate(),n.children.onOutletDeactivated())}},t.prototype.activateChildRoutes=function(t,e,r){var n=this,o=wt(e);t.children.forEach(function(t){n.activateRoutes(t,o[t.value.outlet],r),n.forwardEvent(new
|
|
55
|
+
*/var Ft=function(){function t(t,e,r,n){this.routeReuseStrategy=t,this.futureState=e,this.currState=r,this.forwardEvent=n}return t.prototype.activate=function(t){var e=this.futureState._root,r=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,r,t),At(this.futureState.root),this.activateChildRoutes(e,r,t)},t.prototype.deactivateChildRoutes=function(t,e,r){var n=this,o=wt(e);t.children.forEach(function(t){var e=t.value.outlet;n.deactivateRoutes(t,o[e],r),delete o[e]}),V(o,function(t,e){n.deactivateRouteAndItsChildren(t,r)})},t.prototype.deactivateRoutes=function(t,e,r){var n=t.value,o=e?e.value:null;if(n===o)if(n.component){var i=r.getContext(n.outlet);i&&this.deactivateChildRoutes(t,e,i.children)}else this.deactivateChildRoutes(t,e,r);else o&&this.deactivateRouteAndItsChildren(e,r)},t.prototype.deactivateRouteAndItsChildren=function(t,e){this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,e):this.deactivateRouteAndOutlet(t,e)},t.prototype.detachAndStoreRouteSubtree=function(t,e){var r=e.getContext(t.value.outlet);if(r&&r.outlet){var n=r.outlet.detach(),o=r.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:n,route:t,contexts:o})}},t.prototype.deactivateRouteAndOutlet=function(t,e){var r=this,n=e.getContext(t.value.outlet);if(n){var o=wt(t),i=t.value.component?n.children:e;V(o,function(t,e){return r.deactivateRouteAndItsChildren(t,i)}),n.outlet&&(n.outlet.deactivate(),n.children.onOutletDeactivated())}},t.prototype.activateChildRoutes=function(t,e,r){var n=this,o=wt(e);t.children.forEach(function(t){n.activateRoutes(t,o[t.value.outlet],r),n.forwardEvent(new T(t.value.snapshot))}),t.children.length&&this.forwardEvent(new x(t.value.snapshot))},t.prototype.activateRoutes=function(t,e,r){var n=t.value,o=e?e.value:null;if(At(n),n===o)if(n.component){var i=r.getOrCreateContext(n.outlet);this.activateChildRoutes(t,e,i.children)}else this.activateChildRoutes(t,e,r);else if(n.component)if(i=r.getOrCreateContext(n.outlet),this.routeReuseStrategy.shouldAttach(n.snapshot)){var a=this.routeReuseStrategy.retrieve(n.snapshot);this.routeReuseStrategy.store(n.snapshot,null),i.children.onOutletReAttached(a.contexts),i.attachRef=a.componentRef,i.route=a.route.value,i.outlet&&i.outlet.attach(a.componentRef,a.route.value),Bt(a.route)}else{var u=function s(t){for(var e=t.parent;e;e=e.parent){var r=e.routeConfig;if(r&&r._loadedConfig)return r._loadedConfig;if(r&&r.component)return null}return null}
|
|
56
56
|
/**
|
|
57
57
|
* @license
|
|
58
58
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
* Use of this source code is governed by an MIT-style license that can be
|
|
68
68
|
* found in the LICENSE file at https://angular.io/license
|
|
69
69
|
*/
|
|
70
|
-
var Qt=function Qt(t){this.segmentGroup=t||null},Vt=function Vt(t){this.urlTree=t};function Zt(t){return new
|
|
70
|
+
var Qt=function Qt(t){this.segmentGroup=t||null},Vt=function Vt(t){this.urlTree=t};function Zt(t){return new n.Observable(function(e){return e.error(new Qt(t))})}function Yt(t){return new n.Observable(function(e){return e.error(new Vt(t))})}function $t(t){return new n.Observable(function(e){return e.error(new Error("Only absolute redirects can have named outlets. redirectTo: '"+t+"'"))})}var Kt=function(){function t(t,e,n,o,i){this.configLoader=e,this.urlSerializer=n,this.urlTree=o,this.config=i,this.allowRedirects=!0,this.ngModule=t.get(r.NgModuleRef)}return t.prototype.apply=function(){var t=this;return this.expandSegmentGroup(this.ngModule,this.config,this.urlTree.root,I).pipe(o.map(function(e){return t.createUrlTree(e,t.urlTree.queryParams,t.urlTree.fragment)})).pipe(o.catchError(function(e){if(e instanceof Vt)return t.allowRedirects=!1,t.match(e.urlTree);if(e instanceof Qt)throw t.noMatchError(e);throw e}))},t.prototype.match=function(t){var e=this;return this.expandSegmentGroup(this.ngModule,this.config,t.root,I).pipe(o.map(function(r){return e.createUrlTree(r,t.queryParams,t.fragment)})).pipe(o.catchError(function(t){if(t instanceof Qt)throw e.noMatchError(t);throw t}))},t.prototype.noMatchError=function(t){return new Error("Cannot match any routes. URL Segment: '"+t.segmentGroup+"'")},t.prototype.createUrlTree=function(t,e,r){var n,o=t.segments.length>0?new K([],((n={})[I]=t,n)):t;return new $(o,e,r)},t.prototype.expandSegmentGroup=function(t,e,r,n){return 0===r.segments.length&&r.hasChildren()?this.expandChildren(t,e,r).pipe(o.map(function(t){return new K([],t)})):this.expandSegment(t,r,e,r.segments,n,!0)},t.prototype.expandChildren=function(t,e,r){var i=this;return function a(t,e){if(0===Object.keys(t).length)return n.of({});var r=[],i=[],a={};return V(t,function(t,n){var u=e(n,t).pipe(o.map(function(t){return a[n]=t}));n===I?r.push(u):i.push(u)}),n.of.apply(null,r.concat(i)).pipe(o.concatAll(),o.last(),o.map(function(){return a}))}(r.children,function(r,n){return i.expandSegmentGroup(t,e,n,r)})},t.prototype.expandSegment=function(t,e,r,i,a,u){var s=this;return n.of.apply(void 0,d(r)).pipe(o.map(function(c){return s.expandSegmentAgainstRoute(t,e,r,c,i,a,u).pipe(o.catchError(function(t){if(t instanceof Qt)return n.of(null);throw t}))}),o.concatAll(),o.first(function(t){return!!t}),o.catchError(function(t,r){if(t instanceof n.EmptyError||"EmptyError"===t.name){if(s.noLeftoversInUrl(e,i,a))return n.of(new K([],{}));throw new Qt(e)}throw t}))},t.prototype.noLeftoversInUrl=function(t,e,r){return 0===e.length&&!t.children[r]},t.prototype.expandSegmentAgainstRoute=function(t,e,r,n,o,i,a){return ee(n)!==i?Zt(e):void 0===n.redirectTo?this.matchSegmentAgainstRoute(t,e,n,o):a&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(t,e,r,n,o,i):Zt(e)},t.prototype.expandSegmentAgainstRouteUsingRedirect=function(t,e,r,n,o,i){return"**"===n.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(t,r,n,i):this.expandRegularSegmentAgainstRouteUsingRedirect(t,e,r,n,o,i)},t.prototype.expandWildCardWithParamsAgainstRouteUsingRedirect=function(t,e,r,n){var i=this,a=this.applyRedirectCommands([],r.redirectTo,{});return r.redirectTo.startsWith("/")?Yt(a):this.lineralizeSegments(r,a).pipe(o.mergeMap(function(r){var o=new K(r,{});return i.expandSegment(t,o,e,r,n,!1)}))},t.prototype.expandRegularSegmentAgainstRouteUsingRedirect=function(t,e,r,n,i,a){var u=this,s=Jt(e,n,i),c=s.consumedSegments,l=s.lastChild,p=s.positionalParamSegments;if(!s.matched)return Zt(e);var h=this.applyRedirectCommands(c,n.redirectTo,p);return n.redirectTo.startsWith("/")?Yt(h):this.lineralizeSegments(n,h).pipe(o.mergeMap(function(n){return u.expandSegment(t,e,r,n.concat(i.slice(l)),a,!1)}))},t.prototype.matchSegmentAgainstRoute=function(t,e,r,i){var a=this;if("**"===r.path)return r.loadChildren?this.configLoader.load(t.injector,r).pipe(o.map(function(t){return r._loadedConfig=t,new K(i,{})})):n.of(new K(i,{}));var u=Jt(e,r,i),c=u.consumedSegments,l=u.lastChild;if(!u.matched)return Zt(e);var p=i.slice(l);return this.getChildConfig(t,r,i).pipe(o.mergeMap(function(t){var r=t.module,i=t.routes,u=function l(t,e,r,n){return r.length>0&&function o(t,e,r){return r.some(function(r){return te(t,e,r)&&ee(r)!==I})}(t,r,n)?{segmentGroup:Xt(new K(e,function i(t,e){var r,n,o={};o[I]=e;try{for(var i=h(t),a=i.next();!a.done;a=i.next()){var u=a.value;""===u.path&&ee(u)!==I&&(o[ee(u)]=new K([],{}))}}catch(t){r={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return o}(n,new K(r,t.children)))),slicedSegments:[]}:0===r.length&&function a(t,e,r){return r.some(function(r){return te(t,e,r)})}(t,r,n)?{segmentGroup:Xt(new K(t.segments,function u(t,e,r,n){var o,i,a={};try{for(var u=h(r),c=u.next();!c.done;c=u.next()){var l=c.value;te(t,e,l)&&!n[ee(l)]&&(a[ee(l)]=new K([],{}))}}catch(t){o={error:t}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(o)throw o.error}}return s({},n,a)}(t,r,n,t.children))),slicedSegments:r}:{segmentGroup:t,slicedSegments:r}}(e,c,p,i),f=u.segmentGroup,d=u.slicedSegments;return 0===d.length&&f.hasChildren()?a.expandChildren(r,i,f).pipe(o.map(function(t){return new K(c,t)})):0===i.length&&0===d.length?n.of(new K(c,{})):a.expandSegment(r,f,i,d,I,!0).pipe(o.map(function(t){return new K(c.concat(t.segments),t.children)}))}))},t.prototype.getChildConfig=function(t,e,r){var i=this;return e.children?n.of(new D(e.children,t)):e.loadChildren?void 0!==e._loadedConfig?n.of(e._loadedConfig):function a(t,e,r){var i=e.canLoad;return i&&0!==i.length?n.from(i).pipe(o.map(function(n){var o,i=t.get(n);if(function a(t){return t&&Gt(t.canLoad)}(i))o=i.canLoad(e,r);else{if(!Gt(i))throw new Error("Invalid CanLoad guard");o=i(e,r)}return Z(o)})).pipe(o.concatAll(),o.every(function(t){return!0===t})):n.of(!0)}(t.injector,e,r).pipe(o.mergeMap(function(r){return r?i.configLoader.load(t.injector,e).pipe(o.map(function(t){return e._loadedConfig=t,t})):function a(t){return new n.Observable(function(e){return e.error(N("Cannot load children because the guard of the route \"path: '"+t.path+"'\" returned false"))})}(e)})):n.of(new D([],t))},t.prototype.lineralizeSegments=function(t,e){for(var r=[],o=e.root;;){if(r=r.concat(o.segments),0===o.numberOfChildren)return n.of(r);if(o.numberOfChildren>1||!o.children[I])return $t(t.redirectTo);o=o.children[I]}},t.prototype.applyRedirectCommands=function(t,e,r){return this.applyRedirectCreatreUrlTree(e,this.urlSerializer.parse(e),t,r)},t.prototype.applyRedirectCreatreUrlTree=function(t,e,r,n){var o=this.createSegmentGroup(t,e.root,r,n);return new $(o,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)},t.prototype.createQueryParams=function(t,e){var r={};return V(t,function(t,n){if("string"==typeof t&&t.startsWith(":")){var o=t.substring(1);r[n]=e[o]}else r[n]=t}),r},t.prototype.createSegmentGroup=function(t,e,r,n){var o=this,i=this.createSegments(t,e.segments,r,n),a={};return V(e.children,function(e,i){a[i]=o.createSegmentGroup(t,e,r,n)}),new K(i,a)},t.prototype.createSegments=function(t,e,r,n){var o=this;return e.map(function(e){return e.path.startsWith(":")?o.findPosParam(t,e,n):o.findOrReturn(e,r)})},t.prototype.findPosParam=function(t,e,r){var n=r[e.path.substring(1)];if(!n)throw new Error("Cannot redirect to '"+t+"'. Cannot find '"+e.path+"'.");return n},t.prototype.findOrReturn=function(t,e){var r,n,o=0;try{for(var i=h(e),a=i.next();!a.done;a=i.next()){var u=a.value;if(u.path===t.path)return e.splice(o),u;o++}}catch(t){r={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return t},t}();function Jt(t,e,r){if(""===e.path)return"full"===e.pathMatch&&(t.hasChildren()||r.length>0)?{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}:{matched:!0,consumedSegments:[],lastChild:0,positionalParamSegments:{}};var n=(e.matcher||q)(r,t,e);return n?{matched:!0,consumedSegments:n.consumed,lastChild:n.consumed.length,positionalParamSegments:n.posParams}:{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}}function Xt(t){if(1===t.numberOfChildren&&t.children[I]){var e=t.children[I];return new K(t.segments.concat(e.segments),e.children)}return t}function te(t,e,r){return(!(t.hasChildren()||e.length>0)||"full"!==r.pathMatch)&&""===r.path&&void 0!==r.redirectTo}function ee(t){return t.outlet||I}
|
|
71
71
|
/**
|
|
72
72
|
* @license
|
|
73
73
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -89,7 +89,7 @@ var re=function re(t){this.path=t,this.route=this.path[this.path.length-1]},ne=f
|
|
|
89
89
|
*
|
|
90
90
|
* Use of this source code is governed by an MIT-style license that can be
|
|
91
91
|
* found in the LICENSE file at https://angular.io/license
|
|
92
|
-
*/var ae=Symbol("INITIAL_VALUE");function ue(){return
|
|
92
|
+
*/var ae=Symbol("INITIAL_VALUE");function ue(){return o.switchMap(function(t){return n.combineLatest.apply(void 0,d(t.map(function(t){return t.pipe(o.take(1),o.startWith(ae))}))).pipe(o.scan(function(t,e){var r=!1;return e.reduce(function(t,n,o){if(t!==ae)return t;if(n===ae&&(r=!0),!r){if(!1===n)return n;if(o===e.length-1||Wt(n))return n}return t},t)},ae),o.filter(function(t){return t!==ae}),o.map(function(t){return Wt(t)?t:!0===t}),o.take(1))})}
|
|
93
93
|
/**
|
|
94
94
|
* @license
|
|
95
95
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -104,7 +104,7 @@ var re=function re(t){this.path=t,this.route=this.path[this.path.length-1]},ne=f
|
|
|
104
104
|
* Use of this source code is governed by an MIT-style license that can be
|
|
105
105
|
* found in the LICENSE file at https://angular.io/license
|
|
106
106
|
*/
|
|
107
|
-
var se=function Qt(){},ce=function(){function t(t,e,r,n,o,i){this.rootComponentType=t,this.config=e,this.urlTree=r,this.url=n,this.paramsInheritanceStrategy=o,this.relativeLinkResolution=i}return t.prototype.recognize=function(){try{var t=he(this.urlTree.root,[],[],this.config,this.relativeLinkResolution).segmentGroup,e=this.processSegmentGroup(this.config,t,I),
|
|
107
|
+
var se=function Qt(){},ce=function(){function t(t,e,r,n,o,i){this.rootComponentType=t,this.config=e,this.urlTree=r,this.url=n,this.paramsInheritanceStrategy=o,this.relativeLinkResolution=i}return t.prototype.recognize=function(){try{var t=he(this.urlTree.root,[],[],this.config,this.relativeLinkResolution).segmentGroup,e=this.processSegmentGroup(this.config,t,I),r=new Pt([],Object.freeze({}),Object.freeze(s({},this.urlTree.queryParams)),this.urlTree.fragment,{},I,this.rootComponentType,null,this.urlTree.root,-1,{}),o=new St(r,e),i=new Ot(this.url,o);return this.inheritParamsAndData(i._root),n.of(i)}catch(t){return new n.Observable(function(e){return e.error(t)})}},t.prototype.inheritParamsAndData=function(t){var e=this,r=t.value,n=Ut(r,this.paramsInheritanceStrategy);r.params=Object.freeze(n.params),r.data=Object.freeze(n.data),t.children.forEach(function(t){return e.inheritParamsAndData(t)})},t.prototype.processSegmentGroup=function(t,e,r){return 0===e.segments.length&&e.hasChildren()?this.processChildren(t,e):this.processSegment(t,e,e.segments,r)},t.prototype.processChildren=function(t,e){var r=this,n=tt(e,function(e,n){return r.processSegmentGroup(t,e,n)});return function o(t){var e={};t.forEach(function(t){var r=e[t.value.outlet];if(r){var n=r.url.map(function(t){return t.toString()}).join("/"),o=t.value.url.map(function(t){return t.toString()}).join("/");throw new Error("Two segments cannot have the same outlet name: '"+n+"' and '"+o+"'.")}e[t.value.outlet]=t.value})}(n),function i(t){t.sort(function(t,e){return t.value.outlet===I?-1:e.value.outlet===I?1:t.value.outlet.localeCompare(e.value.outlet)})}(n),n},t.prototype.processSegment=function(t,e,r,n){var o,i;try{for(var a=h(t),u=a.next();!u.done;u=a.next()){var s=u.value;try{return this.processSegmentAgainstRoute(s,e,r,n)}catch(t){if(!(t instanceof se))throw t}}}catch(t){o={error:t}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(o)throw o.error}}if(this.noLeftoversInUrl(e,r,n))return[];throw new se},t.prototype.noLeftoversInUrl=function(t,e,r){return 0===e.length&&!t.children[r]},t.prototype.processSegmentAgainstRoute=function(t,e,r,n){if(t.redirectTo)throw new se;if((t.outlet||I)!==n)throw new se;var o,i=[],a=[];if("**"===t.path){var u=r.length>0?Q(r).parameters:{};o=new Pt(r,u,Object.freeze(s({},this.urlTree.queryParams)),this.urlTree.fragment,ge(t),n,t.component,t,le(e),pe(e)+r.length,ve(t))}else{var c=function l(t,e,r){if(""===e.path){if("full"===e.pathMatch&&(t.hasChildren()||r.length>0))throw new se;return{consumedSegments:[],lastChild:0,parameters:{}}}var n=(e.matcher||q)(r,t,e);if(!n)throw new se;var o={};V(n.posParams,function(t,e){o[e]=t.path});var i=n.consumed.length>0?s({},o,n.consumed[n.consumed.length-1].parameters):o;return{consumedSegments:n.consumed,lastChild:n.consumed.length,parameters:i}}(e,t,r);i=c.consumedSegments,a=r.slice(c.lastChild),o=new Pt(i,c.parameters,Object.freeze(s({},this.urlTree.queryParams)),this.urlTree.fragment,ge(t),n,t.component,t,le(e),pe(e)+i.length,ve(t))}var p=function h(t){return t.children?t.children:t.loadChildren?t._loadedConfig.routes:[]}(t),f=he(e,i,a,p,this.relativeLinkResolution),d=f.segmentGroup,g=f.slicedSegments;if(0===g.length&&d.hasChildren()){var v=this.processChildren(p,d);return[new St(o,v)]}if(0===p.length&&0===g.length)return[new St(o,[])];var m=this.processSegment(p,d,g,I);return[new St(o,m)]},t}();function le(t){for(var e=t;e._sourceSegment;)e=e._sourceSegment;return e}function pe(t){for(var e=t,r=e._segmentIndexShift?e._segmentIndexShift:0;e._sourceSegment;)r+=(e=e._sourceSegment)._segmentIndexShift?e._segmentIndexShift:0;return r-1}function he(t,e,r,n,o){if(r.length>0&&function i(t,e,r){return r.some(function(r){return fe(t,e,r)&&de(r)!==I})}(t,r,n)){var a=new K(e,function u(t,e,r,n){var o,i,a={};a[I]=n,n._sourceSegment=t,n._segmentIndexShift=e.length;try{for(var u=h(r),s=u.next();!s.done;s=u.next()){var c=s.value;if(""===c.path&&de(c)!==I){var l=new K([],{});l._sourceSegment=t,l._segmentIndexShift=e.length,a[de(c)]=l}}}catch(t){o={error:t}}finally{try{s&&!s.done&&(i=u.return)&&i.call(u)}finally{if(o)throw o.error}}return a}(t,e,n,new K(r,t.children)));return a._sourceSegment=t,a._segmentIndexShift=e.length,{segmentGroup:a,slicedSegments:[]}}if(0===r.length&&function c(t,e,r){return r.some(function(r){return fe(t,e,r)})}(t,r,n)){var l=new K(t.segments,function p(t,e,r,n,o,i){var a,u,c={};try{for(var l=h(n),p=l.next();!p.done;p=l.next()){var f=p.value;if(fe(t,r,f)&&!o[de(f)]){var d=new K([],{});d._sourceSegment=t,d._segmentIndexShift="legacy"===i?t.segments.length:e.length,c[de(f)]=d}}}catch(t){a={error:t}}finally{try{p&&!p.done&&(u=l.return)&&u.call(l)}finally{if(a)throw a.error}}return s({},o,c)}(t,e,r,n,t.children,o));return l._sourceSegment=t,l._segmentIndexShift=e.length,{segmentGroup:l,slicedSegments:r}}var f=new K(t.segments,t.children);return f._sourceSegment=t,f._segmentIndexShift=e.length,{segmentGroup:f,slicedSegments:r}}function fe(t,e,r){return(!(t.hasChildren()||e.length>0)||"full"!==r.pathMatch)&&""===r.path&&void 0===r.redirectTo}function de(t){return t.outlet||I}function ge(t){return t.data||{}}function ve(t){return t.resolve||{}}
|
|
108
108
|
/**
|
|
109
109
|
* @license
|
|
110
110
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -118,14 +118,14 @@ var se=function Qt(){},ce=function(){function t(t,e,r,n,o,i){this.rootComponentT
|
|
|
118
118
|
*
|
|
119
119
|
* Use of this source code is governed by an MIT-style license that can be
|
|
120
120
|
* found in the LICENSE file at https://angular.io/license
|
|
121
|
-
*/function ye(t){return function(e){return e.pipe(
|
|
121
|
+
*/function ye(t){return function(e){return e.pipe(o.switchMap(function(e){var r=t(e);return r?n.from(r).pipe(o.map(function(){return e})):n.from([e])}))}}
|
|
122
122
|
/**
|
|
123
123
|
* @license
|
|
124
124
|
* Copyright Google Inc. All Rights Reserved.
|
|
125
125
|
*
|
|
126
126
|
* Use of this source code is governed by an MIT-style license that can be
|
|
127
127
|
* found in the LICENSE file at https://angular.io/license
|
|
128
|
-
*/var Se=function Se(){},we=function(){function t(){}return t.prototype.shouldDetach=function(t){return!1},t.prototype.store=function(t,e){},t.prototype.shouldAttach=function(t){return!1},t.prototype.retrieve=function(t){return null},t.prototype.shouldReuseRoute=function(t,e){return t.routeConfig===e.routeConfig},t}(),be=new
|
|
128
|
+
*/var Se=function Se(){},we=function(){function t(){}return t.prototype.shouldDetach=function(t){return!1},t.prototype.store=function(t,e){},t.prototype.shouldAttach=function(t){return!1},t.prototype.retrieve=function(t){return null},t.prototype.shouldReuseRoute=function(t,e){return t.routeConfig===e.routeConfig},t}(),be=new r.InjectionToken("ROUTES"),Ce=function(){function t(t,e,r,n){this.loader=t,this.compiler=e,this.onLoadStartListener=r,this.onLoadEndListener=n}return t.prototype.load=function(t,e){var r=this;return this.onLoadStartListener&&this.onLoadStartListener(e),this.loadModuleFactory(e.loadChildren).pipe(o.map(function(n){r.onLoadEndListener&&r.onLoadEndListener(e);var o=n.create(t);return new D(W(o.injector.get(be)).map(B),o)}))},t.prototype.loadModuleFactory=function(t){var e=this;return"string"==typeof t?n.from(this.loader.load(t)):Z(t()).pipe(o.mergeMap(function(t){return t instanceof r.NgModuleFactory?n.of(t):n.from(e.compiler.compileModuleAsync(t))}))},t}(),Re=function Re(){},Ue=function(){function t(){}return t.prototype.shouldProcessUrl=function(t){return!0},t.prototype.extract=function(t){return t},t.prototype.merge=function(t,e){return t},t}();
|
|
129
129
|
/**
|
|
130
130
|
* @license
|
|
131
131
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -133,49 +133,49 @@ var se=function Qt(){},ce=function(){function t(t,e,r,n,o,i){this.rootComponentT
|
|
|
133
133
|
* Use of this source code is governed by an MIT-style license that can be
|
|
134
134
|
* found in the LICENSE file at https://angular.io/license
|
|
135
135
|
*/
|
|
136
|
-
function Pe(t){throw t}function Oe(t,e,r){return e.parse("/")}function _e(t,e){return
|
|
136
|
+
function Pe(t){throw t}function Oe(t,e,r){return e.parse("/")}function _e(t,e){return n.of(null)}var xe=function(){function t(t,e,o,i,a,u,s,c){var l=this;this.rootComponentType=t,this.urlSerializer=e,this.rootContexts=o,this.location=i,this.config=c,this.lastSuccessfulNavigation=null,this.currentNavigation=null,this.navigationId=0,this.isNgZoneEnabled=!1,this.events=new n.Subject,this.errorHandler=Pe,this.malformedUriErrorHandler=Oe,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:_e,afterPreactivation:_e},this.urlHandlingStrategy=new Ue,this.routeReuseStrategy=new we,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="legacy",this.ngModule=a.get(r.NgModuleRef),this.console=a.get(r.ɵConsole);var p=a.get(r.NgZone);this.isNgZoneEnabled=p instanceof r.NgZone,this.resetConfig(c),this.currentUrlTree=function h(){return new $(new K([],{}),{},null)}(),this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.configLoader=new Ce(u,s,function(t){return l.triggerEvent(new P(t))},function(t){return l.triggerEvent(new O(t))}),this.routerState=Ct(this.currentUrlTree,this.rootComponentType),this.transitions=new n.BehaviorSubject({id:0,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,extractedUrl:this.urlHandlingStrategy.extract(this.currentUrlTree),urlAfterRedirects:this.urlHandlingStrategy.extract(this.currentUrlTree),rawUrl:this.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:"imperative",restoredState:null,currentSnapshot:this.routerState.snapshot,targetSnapshot:null,currentRouterState:this.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.navigations=this.setupNavigations(this.transitions),this.processNavigations()}return t.prototype.setupNavigations=function(t){var e=this,r=this.events;return t.pipe(o.filter(function(t){return 0!==t.id}),o.map(function(t){return s({},t,{extractedUrl:e.urlHandlingStrategy.extract(t.rawUrl)})}),o.tap(function(t){e.currentNavigation={id:t.id,initialUrl:t.currentRawUrl,extractedUrl:t.extractedUrl,trigger:t.source,extras:t.extras,previousNavigation:e.lastSuccessfulNavigation?s({},e.lastSuccessfulNavigation,{previousNavigation:null}):null}}),o.switchMap(function(t){var i,a,u,c=!1,l=!1;return n.of(t).pipe(o.switchMap(function(t){var i=!e.navigated||t.extractedUrl.toString()!==e.browserUrlTree.toString();if(("reload"===e.onSameUrlNavigation||i)&&e.urlHandlingStrategy.shouldProcessUrl(t.rawUrl))return n.of(t).pipe(o.switchMap(function(t){var o=e.transitions.getValue();return r.next(new v(t.id,e.serializeUrl(t.extractedUrl),t.source,t.restoredState)),o!==e.transitions.getValue()?n.EMPTY:[t]}),o.switchMap(function(t){return Promise.resolve(t)}),function a(t,e,r,n){return function(i){return i.pipe(o.switchMap(function(i){return function a(t,e,r,n,o){return new Kt(t,e,r,n,o).apply()}(t,e,r,i.extractedUrl,n).pipe(o.map(function(t){return s({},i,{urlAfterRedirects:t})}))}))}}(e.ngModule.injector,e.configLoader,e.urlSerializer,e.config),o.tap(function(t){e.currentNavigation=s({},e.currentNavigation,{finalUrl:t.urlAfterRedirects})}),function u(t,e,r,n,i){return function(a){return a.pipe(o.mergeMap(function(a){return function u(t,e,r,n,o,i){return void 0===o&&(o="emptyOnly"),void 0===i&&(i="legacy"),new ce(t,e,r,n,o,i).recognize()}(t,e,a.urlAfterRedirects,r(a.urlAfterRedirects),n,i).pipe(o.map(function(t){return s({},a,{targetSnapshot:t})}))}))}}
|
|
137
137
|
/**
|
|
138
138
|
* @license
|
|
139
139
|
* Copyright Google Inc. All Rights Reserved.
|
|
140
140
|
*
|
|
141
141
|
* Use of this source code is governed by an MIT-style license that can be
|
|
142
142
|
* found in the LICENSE file at https://angular.io/license
|
|
143
|
-
*/(e.rootComponentType,e.config,function(t){return e.serializeUrl(t)},e.paramsInheritanceStrategy,e.relativeLinkResolution),
|
|
143
|
+
*/(e.rootComponentType,e.config,function(t){return e.serializeUrl(t)},e.paramsInheritanceStrategy,e.relativeLinkResolution),o.tap(function(t){"eager"===e.urlUpdateStrategy&&(t.extras.skipLocationChange||e.setBrowserUrl(t.urlAfterRedirects,!!t.extras.replaceUrl,t.id),e.browserUrlTree=t.urlAfterRedirects)}),o.tap(function(t){var n=new w(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);r.next(n)}));if(i&&e.rawUrlTree&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){var c=t.extractedUrl,l=t.source,p=t.restoredState,h=t.extras,f=new v(t.id,e.serializeUrl(c),l,p);r.next(f);var d=Ct(c,e.rootComponentType).snapshot;return n.of(s({},t,{targetSnapshot:d,urlAfterRedirects:c,extras:s({},h,{skipLocationChange:!1,replaceUrl:!1})}))}return e.rawUrlTree=t.rawUrl,t.resolve(null),n.EMPTY}),ye(function(t){var r=t.extras;return e.hooks.beforePreactivation(t.targetSnapshot,{navigationId:t.id,appliedUrlTree:t.extractedUrl,rawUrlTree:t.rawUrl,skipLocationChange:!!r.skipLocationChange,replaceUrl:!!r.replaceUrl})}),o.tap(function(t){var r=new b(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.triggerEvent(r)}),o.map(function(t){return s({},t,{guards:function r(t,e,n){var o=t._root;return function t(e,r,n,o,i){void 0===i&&(i={canDeactivateChecks:[],canActivateChecks:[]});var a=wt(r);return e.children.forEach(function(e){!function r(e,n,o,i,a){void 0===a&&(a={canDeactivateChecks:[],canActivateChecks:[]});var u=e.value,s=n?n.value:null,c=o?o.getContext(e.value.outlet):null;if(s&&u.routeConfig===s.routeConfig){var l=function p(t,e,r){if("function"==typeof r)return r(t,e);switch(r){case"pathParamsChange":return!X(t.url,e.url);case"pathParamsOrQueryParamsChange":return!X(t.url,e.url)||!G(t.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Tt(t,e)||!G(t.queryParams,e.queryParams);case"paramsChange":default:return!Tt(t,e)}}(s,u,u.routeConfig.runGuardsAndResolvers);l?a.canActivateChecks.push(new re(i)):(u.data=s.data,u._resolvedData=s._resolvedData),t(e,n,u.component?c?c.children:null:o,i,a),l&&a.canDeactivateChecks.push(new ne(c&&c.outlet&&c.outlet.component||null,s))}else s&&ie(n,c,a),a.canActivateChecks.push(new re(i)),t(e,null,u.component?c?c.children:null:o,i,a)}(e,a[e.value.outlet],n,o.concat([e.value]),i),delete a[e.value.outlet]}),V(a,function(t,e){return ie(t,n.getContext(e),i)}),i}(o,e?e._root:null,n,[o.value])}(t.targetSnapshot,t.currentSnapshot,e.rootContexts)})}),function p(t,e){return function(r){return r.pipe(o.mergeMap(function(r){var i=r.targetSnapshot,a=r.currentSnapshot,u=r.guards,c=u.canActivateChecks,l=u.canDeactivateChecks;return 0===l.length&&0===c.length?n.of(s({},r,{guardsResult:!0})):function p(t,e,r,i){return n.from(t).pipe(o.mergeMap(function(t){return function a(t,e,r,i,u){var s=e&&e.routeConfig?e.routeConfig.canDeactivate:null;if(!s||0===s.length)return n.of(!0);var c=s.map(function(n){var a,s=oe(n,e,u);if(function c(t){return t&&Gt(t.canDeactivate)}(s))a=Z(s.canDeactivate(t,e,r,i));else{if(!Gt(s))throw new Error("Invalid CanDeactivate guard");a=Z(s(t,e,r,i))}return a.pipe(o.first())});return n.of(c).pipe(ue())}(t.component,t.route,r,e,i)}),o.first(function(t){return!0!==t},!0))}(l,i,a,t).pipe(o.mergeMap(function(r){return r&&function a(t){return"boolean"==typeof t}(r)?function u(t,e,r,i){return n.from(e).pipe(o.concatMap(function(e){return n.from([function a(t,e){return null!==t&&e&&e(new _(t)),n.of(!0)}(e.route.parent,i),function u(t,e){return null!==t&&e&&e(new A(t)),n.of(!0)}(e.route,i),function s(t,e,r){var i=e[e.length-1],a=e.slice(0,e.length-1).reverse().map(function(t){return function e(t){var e=t.routeConfig?t.routeConfig.canActivateChild:null;return e&&0!==e.length?{node:t,guards:e}:null}(t)}).filter(function(t){return null!==t}).map(function(e){return n.defer(function(){var a=e.guards.map(function(n){var a,u=oe(n,e.node,r);if(function s(t){return t&&Gt(t.canActivateChild)}(u))a=Z(u.canActivateChild(i,t));else{if(!Gt(u))throw new Error("Invalid CanActivateChild guard");a=Z(u(i,t))}return a.pipe(o.first())});return n.of(a).pipe(ue())})});return n.of(a).pipe(ue())}(t,e.path,r),function c(t,e,r){var i=e.routeConfig?e.routeConfig.canActivate:null;if(!i||0===i.length)return n.of(!0);var a=i.map(function(i){return n.defer(function(){var n,a=oe(i,e,r);if(function u(t){return t&&Gt(t.canActivate)}(a))n=Z(a.canActivate(e,t));else{if(!Gt(a))throw new Error("Invalid CanActivate guard");n=Z(a(e,t))}return n.pipe(o.first())})});return n.of(a).pipe(ue())}(t,e.route,r)]).pipe(o.concatAll(),o.first(function(t){return!0!==t},!0))}),o.first(function(t){return!0!==t},!0))}(i,c,t,e):n.of(r)}),o.map(function(t){return s({},r,{guardsResult:t})}))}))}}(e.ngModule.injector,function(t){return e.triggerEvent(t)}),o.tap(function(t){if(Wt(t.guardsResult)){var r=N('Redirecting to "'+e.serializeUrl(t.guardsResult)+'"');throw r.url=t.guardsResult,r}}),o.tap(function(t){var r=new C(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot,!!t.guardsResult);e.triggerEvent(r)}),o.filter(function(t){if(!t.guardsResult){e.resetUrlToCurrentUrlTree();var n=new y(t.id,e.serializeUrl(t.extractedUrl),"");return r.next(n),t.resolve(!1),!1}return!0}),ye(function(t){if(t.guards.canActivateChecks.length)return n.of(t).pipe(o.tap(function(t){var r=new R(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.triggerEvent(r)}),function r(t,e){return function(r){return r.pipe(o.mergeMap(function(r){var i=r.targetSnapshot,a=r.guards.canActivateChecks;return a.length?n.from(a).pipe(o.concatMap(function(r){return function a(t,e,r,i){return function a(t,e,r,i){var a=Object.keys(t);if(0===a.length)return n.of({});if(1===a.length){var u=a[0];return me(t[u],e,r,i).pipe(o.map(function(t){var e;return(e={})[u]=t,e}))}var s={};return n.from(a).pipe(o.mergeMap(function(n){return me(t[n],e,r,i).pipe(o.map(function(t){return s[n]=t,t}))})).pipe(o.last(),o.map(function(){return s}))}(t._resolve,t,e,i).pipe(o.map(function(e){return t._resolvedData=e,t.data=s({},t.data,Ut(t,r).resolve),null}))}(r.route,i,t,e)}),o.reduce(function(t,e){return t}),o.map(function(t){return r})):n.of(r)}))}}(e.paramsInheritanceStrategy,e.ngModule.injector),o.tap(function(t){var r=new U(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.triggerEvent(r)}))}),ye(function(t){var r=t.extras;return e.hooks.afterPreactivation(t.targetSnapshot,{navigationId:t.id,appliedUrlTree:t.extractedUrl,rawUrlTree:t.rawUrl,skipLocationChange:!!r.skipLocationChange,replaceUrl:!!r.replaceUrl})}),o.map(function(t){var r=function o(t,e,r){var o=function t(e,r,o){if(o&&e.shouldReuseRoute(r.value,o.value.snapshot)){(c=o.value)._futureSnapshot=r.value;var i=function a(e,r,n){return r.children.map(function(r){var o,i;try{for(var a=h(n.children),u=a.next();!u.done;u=a.next()){var s=u.value;if(e.shouldReuseRoute(s.value.snapshot,r.value))return t(e,r,s)}}catch(t){o={error:t}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(o)throw o.error}}return t(e,r)})}(e,r,o);return new St(c,i)}var u=e.retrieve(r.value);if(u){var s=u.route;return function t(e,r){if(e.value.routeConfig!==r.value.routeConfig)throw new Error("Cannot reattach ActivatedRouteSnapshot created from a different route");if(e.children.length!==r.children.length)throw new Error("Cannot reattach ActivatedRouteSnapshot with a different number of children");r.value._futureSnapshot=e.value;for(var n=0;n<e.children.length;++n)t(e.children[n],r.children[n])}(r,s),s}var c=function l(t){return new Rt(new n.BehaviorSubject(t.url),new n.BehaviorSubject(t.params),new n.BehaviorSubject(t.queryParams),new n.BehaviorSubject(t.fragment),new n.BehaviorSubject(t.data),t.outlet,t.component,t)}
|
|
144
144
|
/**
|
|
145
145
|
* @license
|
|
146
146
|
* Copyright Google Inc. All Rights Reserved.
|
|
147
147
|
*
|
|
148
148
|
* Use of this source code is governed by an MIT-style license that can be
|
|
149
149
|
* found in the LICENSE file at https://angular.io/license
|
|
150
|
-
*/(
|
|
150
|
+
*/(r.value);return i=r.children.map(function(r){return t(e,r)}),new St(c,i)}(t,e._root,r?r._root:void 0);return new bt(o,e)}(e.routeReuseStrategy,t.targetSnapshot,t.currentRouterState);return s({},t,{targetRouterState:r})}),o.tap(function(t){e.currentUrlTree=t.urlAfterRedirects,e.rawUrlTree=e.urlHandlingStrategy.merge(e.currentUrlTree,t.rawUrl),e.routerState=t.targetRouterState,"deferred"===e.urlUpdateStrategy&&(t.extras.skipLocationChange||e.setBrowserUrl(e.rawUrlTree,!!t.extras.replaceUrl,t.id,t.extras.state),e.browserUrlTree=t.urlAfterRedirects)}),(i=e.rootContexts,a=e.routeReuseStrategy,u=function(t){return e.triggerEvent(t)},o.map(function(t){return new Ft(a,t.targetRouterState,t.currentRouterState,u).activate(i),t})),o.tap({next:function(){c=!0},complete:function(){c=!0}}),o.finalize(function(){if(!c&&!l){e.resetUrlToCurrentUrlTree();var n=new y(t.id,e.serializeUrl(t.extractedUrl),"Navigation ID "+t.id+" is not equal to the current navigation id "+e.navigationId);r.next(n),t.resolve(!1)}e.currentNavigation=null}),o.catchError(function(o){if(l=!0,function i(t){return t&&t[M]}(o)){e.navigated=!0;var a=Wt(o.url);a||e.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl);var u=new y(t.id,e.serializeUrl(t.extractedUrl),o.message);r.next(u),t.resolve(!1),a&&e.navigateByUrl(o.url)}else{e.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl);var s=new S(t.id,e.serializeUrl(t.extractedUrl),o);r.next(s);try{t.resolve(e.errorHandler(o))}catch(e){t.reject(e)}}return n.EMPTY}))}))},t.prototype.resetRootComponentType=function(t){this.rootComponentType=t,this.routerState.root.component=this.rootComponentType},t.prototype.getTransition=function(){return this.transitions.value},t.prototype.setTransition=function(t){this.transitions.next(s({},this.getTransition(),t))},t.prototype.initialNavigation=function(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})},t.prototype.setUpLocationChangeListener=function(){var t=this;this.locationSubscription||(this.locationSubscription=this.location.subscribe(function(e){var r=t.parseUrl(e.url),n="popstate"===e.type?"popstate":"hashchange",o=e.state&&e.state.navigationId?e.state:null;setTimeout(function(){t.scheduleNavigation(r,n,o,{replaceUrl:!0})},0)}))},Object.defineProperty(t.prototype,"url",{get:function(){return this.serializeUrl(this.currentUrlTree)},enumerable:!0,configurable:!0}),t.prototype.getCurrentNavigation=function(){return this.currentNavigation},t.prototype.triggerEvent=function(t){this.events.next(t)},t.prototype.resetConfig=function(t){z(t),this.config=t.map(B),this.navigated=!1,this.lastSuccessfulId=-1},t.prototype.ngOnDestroy=function(){this.dispose()},t.prototype.dispose=function(){this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=null)},t.prototype.createUrlTree=function(t,e){void 0===e&&(e={});var n=e.relativeTo,o=e.queryParams,i=e.fragment,a=e.preserveQueryParams,u=e.queryParamsHandling,c=e.preserveFragment;r.isDevMode()&&a&&console&&console.warn&&console.warn("preserveQueryParams is deprecated, use queryParamsHandling instead.");var l=n||this.routerState.root,p=c?this.currentUrlTree.fragment:i,h=null;if(u)switch(u){case"merge":h=s({},this.currentUrlTree.queryParams,o);break;case"preserve":h=this.currentUrlTree.queryParams;break;default:h=o||null}else h=a?this.currentUrlTree.queryParams:o||null;return null!==h&&(h=this.removeEmptyProps(h)),function f(t,e,r,n,o){if(0===r.length)return jt(e.root,e.root,e,n,o);var i=function a(t){if("string"==typeof t[0]&&1===t.length&&"/"===t[0])return new It(!0,0,t);var e=0,r=!1,n=t.reduce(function(t,n,o){if("object"==typeof n&&null!=n){if(n.outlets){var i={};return V(n.outlets,function(t,e){i[e]="string"==typeof t?t.split("/"):t}),d(t,[{outlets:i}])}if(n.segmentPath)return d(t,[n.segmentPath])}return"string"!=typeof n?d(t,[n]):0===o?(n.split("/").forEach(function(n,o){0==o&&"."===n||(0==o&&""===n?r=!0:".."===n?e++:""!=n&&t.push(n))}),t):d(t,[n])},[]);return new It(r,e,n)}(r);if(i.toRoot())return jt(e.root,new K([],{}),e,n,o);var u=function s(t,e,r){if(t.isAbsolute)return new kt(e.root,!0,0);if(-1===r.snapshot._lastPathIndex)return new kt(r.snapshot._urlSegment,!0,0);var n=Et(t.commands[0])?0:1;return function o(t,e,r){for(var n=t,o=e,i=r;i>o;){if(i-=o,!(n=n.parent))throw new Error("Invalid number of '../'");o=n.segments.length}return new kt(n,!1,o-i)}(r.snapshot._urlSegment,r.snapshot._lastPathIndex+n,t.numberOfDoubleDots)}(i,e,t),c=u.processChildren?Nt(u.segmentGroup,u.index,i.commands):Mt(u.segmentGroup,u.index,i.commands);return jt(u.segmentGroup,c,e,n,o)}(l,this.currentUrlTree,t,h,p)},t.prototype.navigateByUrl=function(t,e){void 0===e&&(e={skipLocationChange:!1}),r.isDevMode()&&this.isNgZoneEnabled&&!r.NgZone.isInAngularZone()&&this.console.warn("Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?");var n=Wt(t)?t:this.parseUrl(t),o=this.urlHandlingStrategy.merge(n,this.rawUrlTree);return this.scheduleNavigation(o,"imperative",null,e)},t.prototype.navigate=function(t,e){return void 0===e&&(e={skipLocationChange:!1}),function r(t){for(var e=0;e<t.length;e++){var r=t[e];if(null==r)throw new Error("The requested path contains "+r+" segment at index "+e)}}
|
|
151
151
|
/**
|
|
152
152
|
* @license
|
|
153
153
|
* Copyright Google Inc. All Rights Reserved.
|
|
154
154
|
*
|
|
155
155
|
* Use of this source code is governed by an MIT-style license that can be
|
|
156
156
|
* found in the LICENSE file at https://angular.io/license
|
|
157
|
-
*/(t),this.navigateByUrl(this.createUrlTree(t,e),e)},t.prototype.serializeUrl=function(t){return this.urlSerializer.serialize(t)},t.prototype.parseUrl=function(t){var e;try{e=this.urlSerializer.parse(t)}catch(r){e=this.malformedUriErrorHandler(r,this.urlSerializer,t)}return e},t.prototype.isActive=function(t,e){if(Wt(t))return Y(this.currentUrlTree,t,e);var r=this.parseUrl(t);return Y(this.currentUrlTree,r,e)},t.prototype.removeEmptyProps=function(t){return Object.keys(t).reduce(function(e,r){var n=t[r];return null!==n&&void 0!==n&&(e[r]=n),e},{})},t.prototype.processNavigations=function(){var t=this;this.navigations.subscribe(function(e){t.navigated=!0,t.lastSuccessfulId=e.id,t.events.next(new m(e.id,t.serializeUrl(e.extractedUrl),t.serializeUrl(t.currentUrlTree))),t.lastSuccessfulNavigation=t.currentNavigation,t.currentNavigation=null,e.resolve(!0)},function(e){t.console.warn("Unhandled Navigation Error: ")})},t.prototype.scheduleNavigation=function(t,e,r,n){var o=this.getTransition();if(o&&"imperative"!==e&&"imperative"===o.source&&o.rawUrl.toString()===t.toString())return Promise.resolve(!0);if(o&&"hashchange"==e&&"popstate"===o.source&&o.rawUrl.toString()===t.toString())return Promise.resolve(!0);if(o&&"popstate"==e&&"hashchange"===o.source&&o.rawUrl.toString()===t.toString())return Promise.resolve(!0);var i=null,a=null,u=new Promise(function(t,e){i=t,a=e}),s=++this.navigationId;return this.setTransition({id:s,source:e,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:t,extras:n,resolve:i,reject:a,promise:u,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),u.catch(function(t){return Promise.reject(t)})},t.prototype.setBrowserUrl=function(t,e,r,n){var o=this.urlSerializer.serialize(t);n=n||{},this.location.isCurrentPathEqualTo(o)||e?this.location.replaceState(o,"",s({},n,{navigationId:r})):this.location.go(o,"",s({},n,{navigationId:r}))},t.prototype.resetStateAndUrl=function(t,e,r){this.routerState=t,this.currentUrlTree=e,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,r),this.resetUrlToCurrentUrlTree()},t.prototype.resetUrlToCurrentUrlTree=function(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",{navigationId:this.lastSuccessfulId})},t}(),Ae=function(){function t(t,e,r,n,o){this.router=t,this.route=e,this.commands=[],null==r&&n.setAttribute(o.nativeElement,"tabindex","0")}return Object.defineProperty(t.prototype,"routerLink",{set:function(t){this.commands=null!=t?Array.isArray(t)?t:[t]:[]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"preserveQueryParams",{set:function(t){
|
|
157
|
+
*/(t),this.navigateByUrl(this.createUrlTree(t,e),e)},t.prototype.serializeUrl=function(t){return this.urlSerializer.serialize(t)},t.prototype.parseUrl=function(t){var e;try{e=this.urlSerializer.parse(t)}catch(r){e=this.malformedUriErrorHandler(r,this.urlSerializer,t)}return e},t.prototype.isActive=function(t,e){if(Wt(t))return Y(this.currentUrlTree,t,e);var r=this.parseUrl(t);return Y(this.currentUrlTree,r,e)},t.prototype.removeEmptyProps=function(t){return Object.keys(t).reduce(function(e,r){var n=t[r];return null!==n&&void 0!==n&&(e[r]=n),e},{})},t.prototype.processNavigations=function(){var t=this;this.navigations.subscribe(function(e){t.navigated=!0,t.lastSuccessfulId=e.id,t.events.next(new m(e.id,t.serializeUrl(e.extractedUrl),t.serializeUrl(t.currentUrlTree))),t.lastSuccessfulNavigation=t.currentNavigation,t.currentNavigation=null,e.resolve(!0)},function(e){t.console.warn("Unhandled Navigation Error: ")})},t.prototype.scheduleNavigation=function(t,e,r,n){var o=this.getTransition();if(o&&"imperative"!==e&&"imperative"===o.source&&o.rawUrl.toString()===t.toString())return Promise.resolve(!0);if(o&&"hashchange"==e&&"popstate"===o.source&&o.rawUrl.toString()===t.toString())return Promise.resolve(!0);if(o&&"popstate"==e&&"hashchange"===o.source&&o.rawUrl.toString()===t.toString())return Promise.resolve(!0);var i=null,a=null,u=new Promise(function(t,e){i=t,a=e}),s=++this.navigationId;return this.setTransition({id:s,source:e,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:t,extras:n,resolve:i,reject:a,promise:u,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),u.catch(function(t){return Promise.reject(t)})},t.prototype.setBrowserUrl=function(t,e,r,n){var o=this.urlSerializer.serialize(t);n=n||{},this.location.isCurrentPathEqualTo(o)||e?this.location.replaceState(o,"",s({},n,{navigationId:r})):this.location.go(o,"",s({},n,{navigationId:r}))},t.prototype.resetStateAndUrl=function(t,e,r){this.routerState=t,this.currentUrlTree=e,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,r),this.resetUrlToCurrentUrlTree()},t.prototype.resetUrlToCurrentUrlTree=function(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",{navigationId:this.lastSuccessfulId})},t}(),Ae=function(){function t(t,e,r,n,o){this.router=t,this.route=e,this.commands=[],null==r&&n.setAttribute(o.nativeElement,"tabindex","0")}return Object.defineProperty(t.prototype,"routerLink",{set:function(t){this.commands=null!=t?Array.isArray(t)?t:[t]:[]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"preserveQueryParams",{set:function(t){r.isDevMode()&&console&&console.warn&&console.warn("preserveQueryParams is deprecated!, use queryParamsHandling instead."),this.preserve=t},enumerable:!0,configurable:!0}),t.prototype.onClick=function(){var t={skipLocationChange:Ee(this.skipLocationChange),replaceUrl:Ee(this.replaceUrl)};return this.router.navigateByUrl(this.urlTree,t),!0},Object.defineProperty(t.prototype,"urlTree",{get:function(){return this.router.createUrlTree(this.commands,{relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,preserveQueryParams:Ee(this.preserve),queryParamsHandling:this.queryParamsHandling,preserveFragment:Ee(this.preserveFragment)})},enumerable:!0,configurable:!0}),c([r.Input(),p("design:type",Object)],t.prototype,"queryParams",void 0),c([r.Input(),p("design:type",String)],t.prototype,"fragment",void 0),c([r.Input(),p("design:type",String)],t.prototype,"queryParamsHandling",void 0),c([r.Input(),p("design:type",Boolean)],t.prototype,"preserveFragment",void 0),c([r.Input(),p("design:type",Boolean)],t.prototype,"skipLocationChange",void 0),c([r.Input(),p("design:type",Boolean)],t.prototype,"replaceUrl",void 0),c([r.Input(),p("design:type",Object)],t.prototype,"state",void 0),c([r.Input(),p("design:type",Object),p("design:paramtypes",[Object])],t.prototype,"routerLink",null),c([r.Input(),p("design:type",Boolean),p("design:paramtypes",[Boolean])],t.prototype,"preserveQueryParams",null),c([r.HostListener("click"),p("design:type",Function),p("design:paramtypes",[]),p("design:returntype",Boolean)],t.prototype,"onClick",null),c([r.Directive({selector:":not(a)[routerLink]"}),l(2,r.Attribute("tabindex")),p("design:paramtypes",[xe,Rt,String,r.Renderer2,r.ElementRef])],t)}(),Te=function(){function t(t,e,r){var n=this;this.router=t,this.route=e,this.locationStrategy=r,this.commands=[],this.subscription=t.events.subscribe(function(t){t instanceof m&&n.updateTargetUrlAndHref()})}return Object.defineProperty(t.prototype,"routerLink",{set:function(t){this.commands=null!=t?Array.isArray(t)?t:[t]:[]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"preserveQueryParams",{set:function(t){r.isDevMode()&&console&&console.warn&&console.warn("preserveQueryParams is deprecated, use queryParamsHandling instead."),this.preserve=t},enumerable:!0,configurable:!0}),t.prototype.ngOnChanges=function(t){this.updateTargetUrlAndHref()},t.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},t.prototype.onClick=function(t,e,r,n){if(0!==t||e||r||n)return!0;if("string"==typeof this.target&&"_self"!=this.target)return!0;var o={skipLocationChange:Ee(this.skipLocationChange),replaceUrl:Ee(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,o),!1},t.prototype.updateTargetUrlAndHref=function(){this.href=this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree))},Object.defineProperty(t.prototype,"urlTree",{get:function(){return this.router.createUrlTree(this.commands,{relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,preserveQueryParams:Ee(this.preserve),queryParamsHandling:this.queryParamsHandling,preserveFragment:Ee(this.preserveFragment)})},enumerable:!0,configurable:!0}),c([r.HostBinding("attr.target"),r.Input(),p("design:type",String)],t.prototype,"target",void 0),c([r.Input(),p("design:type",Object)],t.prototype,"queryParams",void 0),c([r.Input(),p("design:type",String)],t.prototype,"fragment",void 0),c([r.Input(),p("design:type",String)],t.prototype,"queryParamsHandling",void 0),c([r.Input(),p("design:type",Boolean)],t.prototype,"preserveFragment",void 0),c([r.Input(),p("design:type",Boolean)],t.prototype,"skipLocationChange",void 0),c([r.Input(),p("design:type",Boolean)],t.prototype,"replaceUrl",void 0),c([r.Input(),p("design:type",Object)],t.prototype,"state",void 0),c([r.HostBinding(),p("design:type",String)],t.prototype,"href",void 0),c([r.Input(),p("design:type",Object),p("design:paramtypes",[Object])],t.prototype,"routerLink",null),c([r.Input(),p("design:type",Boolean),p("design:paramtypes",[Boolean])],t.prototype,"preserveQueryParams",null),c([r.HostListener("click",["$event.button","$event.ctrlKey","$event.metaKey","$event.shiftKey"]),p("design:type",Function),p("design:paramtypes",[Number,Boolean,Boolean,Boolean]),p("design:returntype",Boolean)],t.prototype,"onClick",null),c([r.Directive({selector:"a[routerLink]"}),p("design:paramtypes",[xe,Rt,e.LocationStrategy])],t)}();function Ee(t){return""===t||!!t}
|
|
158
158
|
/**
|
|
159
159
|
* @license
|
|
160
160
|
* Copyright Google Inc. All Rights Reserved.
|
|
161
161
|
*
|
|
162
162
|
* Use of this source code is governed by an MIT-style license that can be
|
|
163
163
|
* found in the LICENSE file at https://angular.io/license
|
|
164
|
-
*/var je=function(){function t(t,e,r,n){var o=this;this.router=t,this.element=e,this.renderer=r,this.cdr=n,this.classes=[],this.isActive=!1,this.routerLinkActiveOptions={exact:!1},this.subscription=t.events.subscribe(function(t){t instanceof m&&o.update()})}return t.prototype.ngAfterContentInit=function(){var t=this;this.links.changes.subscribe(function(e){return t.update()}),this.linksWithHrefs.changes.subscribe(function(e){return t.update()}),this.update()},Object.defineProperty(t.prototype,"routerLinkActive",{set:function(t){var e=Array.isArray(t)?t:t.split(" ");this.classes=e.filter(function(t){return!!t})},enumerable:!0,configurable:!0}),t.prototype.ngOnChanges=function(t){this.update()},t.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},t.prototype.update=function(){var t=this;this.links&&this.linksWithHrefs&&this.router.navigated&&Promise.resolve().then(function(){var e=t.hasActiveLinks();t.isActive!==e&&(t.isActive=e,t.classes.forEach(function(r){e?t.renderer.addClass(t.element.nativeElement,r):t.renderer.removeClass(t.element.nativeElement,r)}))})},t.prototype.isLinkActive=function(t){var e=this;return function(r){return t.isActive(r.urlTree,e.routerLinkActiveOptions.exact)}},t.prototype.hasActiveLinks=function(){return this.links.some(this.isLinkActive(this.router))||this.linksWithHrefs.some(this.isLinkActive(this.router))},c([
|
|
164
|
+
*/var je=function(){function t(t,e,r,n){var o=this;this.router=t,this.element=e,this.renderer=r,this.cdr=n,this.classes=[],this.isActive=!1,this.routerLinkActiveOptions={exact:!1},this.subscription=t.events.subscribe(function(t){t instanceof m&&o.update()})}return t.prototype.ngAfterContentInit=function(){var t=this;this.links.changes.subscribe(function(e){return t.update()}),this.linksWithHrefs.changes.subscribe(function(e){return t.update()}),this.update()},Object.defineProperty(t.prototype,"routerLinkActive",{set:function(t){var e=Array.isArray(t)?t:t.split(" ");this.classes=e.filter(function(t){return!!t})},enumerable:!0,configurable:!0}),t.prototype.ngOnChanges=function(t){this.update()},t.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},t.prototype.update=function(){var t=this;this.links&&this.linksWithHrefs&&this.router.navigated&&Promise.resolve().then(function(){var e=t.hasActiveLinks();t.isActive!==e&&(t.isActive=e,t.classes.forEach(function(r){e?t.renderer.addClass(t.element.nativeElement,r):t.renderer.removeClass(t.element.nativeElement,r)}))})},t.prototype.isLinkActive=function(t){var e=this;return function(r){return t.isActive(r.urlTree,e.routerLinkActiveOptions.exact)}},t.prototype.hasActiveLinks=function(){return this.links.some(this.isLinkActive(this.router))||this.linksWithHrefs.some(this.isLinkActive(this.router))},c([r.ContentChildren(Ae,{descendants:!0}),p("design:type",r.QueryList)],t.prototype,"links",void 0),c([r.ContentChildren(Te,{descendants:!0}),p("design:type",r.QueryList)],t.prototype,"linksWithHrefs",void 0),c([r.Input(),p("design:type",Object)],t.prototype,"routerLinkActiveOptions",void 0),c([r.Input(),p("design:type",Object),p("design:paramtypes",[Object])],t.prototype,"routerLinkActive",null),c([r.Directive({selector:"[routerLinkActive]",exportAs:"routerLinkActive"}),p("design:paramtypes",[xe,r.ElementRef,r.Renderer2,r.ChangeDetectorRef])],t)}(),Ie=function Ie(){this.outlet=null,this.route=null,this.resolver=null,this.children=new ke,this.attachRef=null},ke=function(){function t(){this.contexts=new Map}return t.prototype.onChildOutletCreated=function(t,e){var r=this.getOrCreateContext(t);r.outlet=e,this.contexts.set(t,r)},t.prototype.onChildOutletDestroyed=function(t){var e=this.getContext(t);e&&(e.outlet=null)},t.prototype.onOutletDeactivated=function(){var t=this.contexts;return this.contexts=new Map,t},t.prototype.onOutletReAttached=function(t){this.contexts=t},t.prototype.getOrCreateContext=function(t){var e=this.getContext(t);return e||(e=new Ie,this.contexts.set(t,e)),e},t.prototype.getContext=function(t){return this.contexts.get(t)||null},t}(),Le=function(){function t(t,e,n,o,i){this.parentContexts=t,this.location=e,this.resolver=n,this.changeDetector=i,this.activated=null,this._activatedRoute=null,this.activateEvents=new r.EventEmitter,this.deactivateEvents=new r.EventEmitter,this.name=o||I,t.onChildOutletCreated(this.name,this)}return t.prototype.ngOnDestroy=function(){this.parentContexts.onChildOutletDestroyed(this.name)},t.prototype.ngOnInit=function(){if(!this.activated){var t=this.parentContexts.getContext(this.name);t&&t.route&&(t.attachRef?this.attach(t.attachRef,t.route):this.activateWith(t.route,t.resolver||null))}},Object.defineProperty(t.prototype,"isActivated",{get:function(){return!!this.activated},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"component",{get:function(){if(!this.activated)throw new Error("Outlet is not activated");return this.activated.instance},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"activatedRoute",{get:function(){if(!this.activated)throw new Error("Outlet is not activated");return this._activatedRoute},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"activatedRouteData",{get:function(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}},enumerable:!0,configurable:!0}),t.prototype.detach=function(){if(!this.activated)throw new Error("Outlet is not activated");this.location.detach();var t=this.activated;return this.activated=null,this._activatedRoute=null,t},t.prototype.attach=function(t,e){this.activated=t,this._activatedRoute=e,this.location.insert(t.hostView)},t.prototype.deactivate=function(){if(this.activated){var t=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(t)}},t.prototype.activateWith=function(t,e){if(this.isActivated)throw new Error("Cannot activate an already activated outlet");this._activatedRoute=t;var r=(e=e||this.resolver).resolveComponentFactory(t._futureSnapshot.routeConfig.component),n=this.parentContexts.getOrCreateContext(this.name).children,o=new Me(t,n,this.location.injector);this.activated=this.location.createComponent(r,this.location.length,o),this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)},c([r.Output("activate"),p("design:type",Object)],t.prototype,"activateEvents",void 0),c([r.Output("deactivate"),p("design:type",Object)],t.prototype,"deactivateEvents",void 0),c([r.Directive({selector:"router-outlet",exportAs:"outlet"}),l(3,r.Attribute("name")),p("design:paramtypes",[ke,r.ViewContainerRef,r.ComponentFactoryResolver,String,r.ChangeDetectorRef])],t)}(),Me=function(){function t(t,e,r){this.route=t,this.childContexts=e,this.parent=r}return t.prototype.get=function(t,e){return t===Rt?this.route:t===ke?this.childContexts:this.parent.get(t,e)},t}(),Ne=function Ne(){},qe=function(){function t(){}return t.prototype.preload=function(t,e){return e().pipe(o.catchError(function(){return n.of(null)}))},t}(),De=function(){function t(){}return t.prototype.preload=function(t,e){return n.of(null)},t}(),ze=function(){function t(t,e,r,n,o){this.router=t,this.injector=n,this.preloadingStrategy=o,this.loader=new Ce(e,r,function(e){return t.triggerEvent(new P(e))},function(e){return t.triggerEvent(new O(e))})}return t.prototype.setUpPreloading=function(){var t=this;this.subscription=this.router.events.pipe(o.filter(function(t){return t instanceof m}),o.concatMap(function(){return t.preload()})).subscribe(function(){})},t.prototype.preload=function(){var t=this.injector.get(r.NgModuleRef);return this.processRoutes(t,this.router.config)},t.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},t.prototype.processRoutes=function(t,e){var r,i,a=[];try{for(var u=h(e),s=u.next();!s.done;s=u.next()){var c=s.value;if(c.loadChildren&&!c.canLoad&&c._loadedConfig){var l=c._loadedConfig;a.push(this.processRoutes(l.module,l.routes))}else c.loadChildren&&!c.canLoad?a.push(this.preloadConfig(t,c)):c.children&&a.push(this.processRoutes(t,c.children))}}catch(t){r={error:t}}finally{try{s&&!s.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}return n.from(a).pipe(o.mergeAll(),o.map(function(t){}))},t.prototype.preloadConfig=function(t,e){var r=this;return this.preloadingStrategy.preload(e,function(){return r.loader.load(t.injector,e).pipe(o.mergeMap(function(t){return e._loadedConfig=t,r.processRoutes(t.module,t.routes)}))})},c([r.Injectable(),p("design:paramtypes",[xe,r.NgModuleFactoryLoader,r.Compiler,r.Injector,Ne])],t)}(),He=function(){function t(t,e,r){void 0===r&&(r={}),this.router=t,this.viewportScroller=e,this.options=r,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},r.scrollPositionRestoration=r.scrollPositionRestoration||"disabled",r.anchorScrolling=r.anchorScrolling||"disabled"}return t.prototype.init=function(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()},t.prototype.createScrollEvents=function(){var t=this;return this.router.events.subscribe(function(e){e instanceof v?(t.store[t.lastId]=t.viewportScroller.getScrollPosition(),t.lastSource=e.navigationTrigger,t.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof m&&(t.lastId=e.id,t.scheduleScrollEvent(e,t.router.parseUrl(e.urlAfterRedirects).fragment))})},t.prototype.consumeScrollEvents=function(){var t=this;return this.router.events.subscribe(function(e){e instanceof E&&(e.position?"top"===t.options.scrollPositionRestoration?t.viewportScroller.scrollToPosition([0,0]):"enabled"===t.options.scrollPositionRestoration&&t.viewportScroller.scrollToPosition(e.position):e.anchor&&"enabled"===t.options.anchorScrolling?t.viewportScroller.scrollToAnchor(e.anchor):"disabled"!==t.options.scrollPositionRestoration&&t.viewportScroller.scrollToPosition([0,0]))})},t.prototype.scheduleScrollEvent=function(t,e){this.router.triggerEvent(new E(t,"popstate"===this.lastSource?this.store[this.restoredId]:null,e))},t.prototype.ngOnDestroy=function(){this.routerEventsSubscription&&this.routerEventsSubscription.unsubscribe(),this.scrollEventsSubscription&&this.scrollEventsSubscription.unsubscribe()},t}(),Fe=[Le,Ae,Te,je,j],Be=new r.InjectionToken("ROUTER_CONFIGURATION"),Ge=new r.InjectionToken("ROUTER_FORROOT_GUARD"),We=[e.Location,{provide:et,useClass:rt},{provide:xe,useFactory:Je,deps:[r.ApplicationRef,et,ke,e.Location,r.Injector,r.NgModuleFactoryLoader,r.Compiler,be,Be,[Re,new r.Optional],[Se,new r.Optional]]},ke,{provide:Rt,useFactory:Xe,deps:[xe]},{provide:r.NgModuleFactoryLoader,useClass:r.SystemJsNgModuleLoader},ze,De,qe,{provide:Be,useValue:{enableTracing:!1}}];
|
|
165
165
|
/**
|
|
166
166
|
* @license
|
|
167
167
|
* Copyright Google Inc. All Rights Reserved.
|
|
168
168
|
*
|
|
169
169
|
* Use of this source code is governed by an MIT-style license that can be
|
|
170
170
|
* found in the LICENSE file at https://angular.io/license
|
|
171
|
-
*/function Qe(){return new
|
|
171
|
+
*/function Qe(){return new r.NgProbeToken("Router",xe)}var Ve=function(){function t(t,e){}var n;return n=t,t.forRoot=function(t,o){return{ngModule:n,providers:[We,Ke(t),{provide:Ge,useFactory:$e,deps:[[xe,new r.Optional,new r.SkipSelf]]},{provide:Be,useValue:o||{}},{provide:e.LocationStrategy,useFactory:Ye,deps:[e.PlatformLocation,[new r.Inject(e.APP_BASE_HREF),new r.Optional],Be]},{provide:He,useFactory:Ze,deps:[xe,e.ViewportScroller,Be]},{provide:Ne,useExisting:o&&o.preloadingStrategy?o.preloadingStrategy:De},{provide:r.NgProbeToken,multi:!0,useFactory:Qe},or()]}},t.forChild=function(t){return{ngModule:n,providers:[Ke(t)]}},n=c([r.NgModule({declarations:Fe,exports:Fe,entryComponents:[j]}),l(0,r.Optional()),l(0,r.Inject(Ge)),l(1,r.Optional()),p("design:paramtypes",[Object,xe])],t)}();function Ze(t,e,r){return r.scrollOffset&&e.setOffset(r.scrollOffset),new He(t,e,r)}function Ye(t,r,n){return void 0===n&&(n={}),n.useHash?new e.HashLocationStrategy(t,r):new e.PathLocationStrategy(t,r)}function $e(t){if(t)throw new Error("RouterModule.forRoot() called twice. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function Ke(t){return[{provide:r.ANALYZE_FOR_ENTRY_COMPONENTS,multi:!0,useValue:t},{provide:be,multi:!0,useValue:t}]}function Je(t,e,r,n,o,a,u,s,c,l,p){void 0===c&&(c={});var h=new xe(null,e,r,n,o,a,u,W(s));if(l&&(h.urlHandlingStrategy=l),p&&(h.routeReuseStrategy=p),c.errorHandler&&(h.errorHandler=c.errorHandler),c.malformedUriErrorHandler&&(h.malformedUriErrorHandler=c.malformedUriErrorHandler),c.enableTracing){var f=i.ɵgetDOM();h.events.subscribe(function(t){f.logGroup("Router Event: "+t.constructor.name),f.log(t.toString()),f.log(t),f.logGroupEnd()})}return c.onSameUrlNavigation&&(h.onSameUrlNavigation=c.onSameUrlNavigation),c.paramsInheritanceStrategy&&(h.paramsInheritanceStrategy=c.paramsInheritanceStrategy),c.urlUpdateStrategy&&(h.urlUpdateStrategy=c.urlUpdateStrategy),c.relativeLinkResolution&&(h.relativeLinkResolution=c.relativeLinkResolution),h}function Xe(t){return t.routerState.root}var tr=function(){function t(t){this.injector=t,this.initNavigation=!1,this.resultOfPreactivationDone=new n.Subject}return t.prototype.appInitializer=function(){var t=this;return this.injector.get(e.LOCATION_INITIALIZED,Promise.resolve(null)).then(function(){var e=null,r=new Promise(function(t){return e=t}),o=t.injector.get(xe),i=t.injector.get(Be);if(t.isLegacyDisabled(i)||t.isLegacyEnabled(i))e(!0);else if("disabled"===i.initialNavigation)o.setUpLocationChangeListener(),e(!0);else{if("enabled"!==i.initialNavigation)throw new Error("Invalid initialNavigation options: '"+i.initialNavigation+"'");o.hooks.afterPreactivation=function(){return t.initNavigation?n.of(null):(t.initNavigation=!0,e(!0),t.resultOfPreactivationDone)},o.initialNavigation()}return r})},t.prototype.bootstrapListener=function(t){var e=this.injector.get(Be),n=this.injector.get(ze),o=this.injector.get(He),i=this.injector.get(xe),a=this.injector.get(r.ApplicationRef);t===a.components[0]&&(this.isLegacyEnabled(e)?i.initialNavigation():this.isLegacyDisabled(e)&&i.setUpLocationChangeListener(),n.setUpPreloading(),o.init(),i.resetRootComponentType(a.componentTypes[0]),this.resultOfPreactivationDone.next(null),this.resultOfPreactivationDone.complete())},t.prototype.isLegacyEnabled=function(t){return"legacy_enabled"===t.initialNavigation||!0===t.initialNavigation||void 0===t.initialNavigation},t.prototype.isLegacyDisabled=function(t){return"legacy_disabled"===t.initialNavigation||!1===t.initialNavigation},c([r.Injectable(),p("design:paramtypes",[r.Injector])],t)}();function er(t){return t.appInitializer.bind(t)}function rr(t){return t.bootstrapListener.bind(t)}var nr=new r.InjectionToken("Router Initializer");function or(){return[tr,{provide:r.APP_INITIALIZER,multi:!0,useFactory:er,deps:[tr]},{provide:nr,useFactory:rr,deps:[tr]},{provide:r.APP_BOOTSTRAP_LISTENER,multi:!0,useExisting:nr}]}
|
|
172
172
|
/**
|
|
173
173
|
* @license
|
|
174
174
|
* Copyright Google Inc. All Rights Reserved.
|
|
175
175
|
*
|
|
176
176
|
* Use of this source code is governed by an MIT-style license that can be
|
|
177
177
|
* found in the LICENSE file at https://angular.io/license
|
|
178
|
-
*/var ir=new
|
|
178
|
+
*/var ir=new r.Version("7.2.3");
|
|
179
179
|
/**
|
|
180
180
|
* @license
|
|
181
181
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -203,4 +203,4 @@ function Pe(t){throw t}function Oe(t,e,r){return e.parse("/")}function _e(t,e){r
|
|
|
203
203
|
*
|
|
204
204
|
* Use of this source code is governed by an MIT-style license that can be
|
|
205
205
|
* found in the LICENSE file at https://angular.io/license
|
|
206
|
-
*/t.ɵangular_packages_router_router_a=Ge,t.ɵangular_packages_router_router_h=tr,t.ɵangular_packages_router_router_c=Ze,t.ɵangular_packages_router_router_i=er,t.ɵangular_packages_router_router_j=rr,t.ɵangular_packages_router_router_e=$e,t.ɵangular_packages_router_router_d=Ye,t.ɵangular_packages_router_router_k=or,t.ɵangular_packages_router_router_g=Xe,t.ɵangular_packages_router_router_b=Qe,t.ɵangular_packages_router_router_f=Je,t.ɵangular_packages_router_router_n=He,t.ɵangular_packages_router_router_l=vt,t.ɵangular_packages_router_router_m=St,t.RouterLink=Ae,t.RouterLinkWithHref=
|
|
206
|
+
*/t.ɵangular_packages_router_router_a=Ge,t.ɵangular_packages_router_router_h=tr,t.ɵangular_packages_router_router_c=Ze,t.ɵangular_packages_router_router_i=er,t.ɵangular_packages_router_router_j=rr,t.ɵangular_packages_router_router_e=$e,t.ɵangular_packages_router_router_d=Ye,t.ɵangular_packages_router_router_k=or,t.ɵangular_packages_router_router_g=Xe,t.ɵangular_packages_router_router_b=Qe,t.ɵangular_packages_router_router_f=Je,t.ɵangular_packages_router_router_n=He,t.ɵangular_packages_router_router_l=vt,t.ɵangular_packages_router_router_m=St,t.RouterLink=Ae,t.RouterLinkWithHref=Te,t.RouterLinkActive=je,t.RouterOutlet=Le,t.ActivationEnd=T,t.ActivationStart=A,t.ChildActivationEnd=x,t.ChildActivationStart=_,t.GuardsCheckEnd=C,t.GuardsCheckStart=b,t.NavigationCancel=y,t.NavigationEnd=m,t.NavigationError=S,t.NavigationStart=v,t.ResolveEnd=U,t.ResolveStart=R,t.RouteConfigLoadEnd=O,t.RouteConfigLoadStart=P,t.RouterEvent=g,t.RoutesRecognized=w,t.Scroll=E,t.RouteReuseStrategy=Se,t.Router=xe,t.ROUTES=be,t.ROUTER_CONFIGURATION=Be,t.ROUTER_INITIALIZER=nr,t.RouterModule=Ve,t.provideRoutes=Ke,t.ChildrenOutletContexts=ke,t.OutletContext=Ie,t.NoPreloading=De,t.PreloadAllModules=qe,t.PreloadingStrategy=Ne,t.RouterPreloader=ze,t.ActivatedRoute=Rt,t.ActivatedRouteSnapshot=Pt,t.RouterState=bt,t.RouterStateSnapshot=Ot,t.PRIMARY_OUTLET=I,t.convertToParamMap=L,t.UrlHandlingStrategy=Re,t.DefaultUrlSerializer=rt,t.UrlSegment=J,t.UrlSegmentGroup=K,t.UrlSerializer=et,t.UrlTree=$,t.VERSION=ir,t.ɵEmptyOutletComponent=j,t.ɵROUTER_PROVIDERS=We,t.ɵflatten=W,Object.defineProperty(t,"__esModule",{value:!0})});
|