@angular/router
Version:
Angular - the routing library
115 lines (113 loc) • 91.2 kB
JavaScript
/**
* @license Angular v10.0.4
* (c) 2010-2020 Google LLC. https://angular.io/
* License: MIT
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/common"),require("@angular/core"),require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("@angular/router",["exports","@angular/common","@angular/core","rxjs","rxjs/operators"],e):e(((t=t||self).ng=t.ng||{},t.ng.router={}),t.ng.common,t.ng.core,t.rxjs,t.rxjs.operators)}(this,(function(t,e,r,n,i){"use strict";
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var o=function(t,e){return(o=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 a(t,e){function r(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function u(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function s(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function c(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(s(arguments[e]));return t}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
var l,p,h=function(t){function e(e,r,n,i){void 0===n&&(n="imperative"),void 0===i&&(i=null);var o=t.call(this,e,r)||this;return o.navigationTrigger=n,o.restoredState=i,o}return a(e,t),e.prototype.toString=function(){return"NavigationStart(id: "+this.id+", url: '"+this.url+"')"},e}(l=function l(t,e){this.id=t,this.url=e}),f=function(t){function e(e,r,n){var i=t.call(this,e,r)||this;return i.urlAfterRedirects=n,i}return a(e,t),e.prototype.toString=function(){return"NavigationEnd(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"')"},e}(l),d=function(t){function e(e,r,n){var i=t.call(this,e,r)||this;return i.reason=n,i}return a(e,t),e.prototype.toString=function(){return"NavigationCancel(id: "+this.id+", url: '"+this.url+"')"},e}(l),g=function(t){function e(e,r,n){var i=t.call(this,e,r)||this;return i.error=n,i}return a(e,t),e.prototype.toString=function(){return"NavigationError(id: "+this.id+", url: '"+this.url+"', error: "+this.error+")"},e}(l),v=function(t){function e(e,r,n,i){var o=t.call(this,e,r)||this;return o.urlAfterRedirects=n,o.state=i,o}return a(e,t),e.prototype.toString=function(){return"RoutesRecognized(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+")"},e}(l),m=function(t){function e(e,r,n,i){var o=t.call(this,e,r)||this;return o.urlAfterRedirects=n,o.state=i,o}return a(e,t),e.prototype.toString=function(){return"GuardsCheckStart(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+")"},e}(l),y=function(t){function e(e,r,n,i,o){var a=t.call(this,e,r)||this;return a.urlAfterRedirects=n,a.state=i,a.shouldActivate=o,a}return a(e,t),e.prototype.toString=function(){return"GuardsCheckEnd(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+", shouldActivate: "+this.shouldActivate+")"},e}(l),S=function(t){function e(e,r,n,i){var o=t.call(this,e,r)||this;return o.urlAfterRedirects=n,o.state=i,o}return a(e,t),e.prototype.toString=function(){return"ResolveStart(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+")"},e}(l),b=function(t){function e(e,r,n,i){var o=t.call(this,e,r)||this;return o.urlAfterRedirects=n,o.state=i,o}return a(e,t),e.prototype.toString=function(){return"ResolveEnd(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+")"},e}(l),w=function(){function t(t){this.route=t}return t.prototype.toString=function(){return"RouteConfigLoadStart(path: "+this.route.path+")"},t}(),C=function(){function t(t){this.route=t}return t.prototype.toString=function(){return"RouteConfigLoadEnd(path: "+this.route.path+")"},t}(),R=function(){function t(t){this.snapshot=t}return t.prototype.toString=function(){return"ChildActivationStart(path: '"+(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"")+"')"},t}(),O=function(){function t(t){this.snapshot=t}return t.prototype.toString=function(){return"ChildActivationEnd(path: '"+(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"")+"')"},t}(),U=function(){function t(t){this.snapshot=t}return t.prototype.toString=function(){return"ActivationStart(path: '"+(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"")+"')"},t}(),P=function(){function t(t){this.snapshot=t}return t.prototype.toString=function(){return"ActivationEnd(path: '"+(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"")+"')"},t}(),_=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}();(p=function p(){}).decorators=[{type:r.Component,args:[{template:"<router-outlet></router-outlet>"}]}];
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
var x=function(){function t(t){this.params=t||{}}return t.prototype.has=function(t){return Object.prototype.hasOwnProperty.call(this.params,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:!1,configurable:!0}),t}();function j(t){return new x(t)}function A(t){var e=Error("NavigationCancelingError: "+t);return e.ngNavigationCancelingError=!0,e}function T(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 i={},o=0;o<n.length;o++){var a=n[o],u=t[o];if(a.startsWith(":"))i[a.substring(1)]=u;else if(a!==u.path)return null}return{consumed:t.slice(0,n.length),posParams:i}}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/var E=function E(t,e){this.routes=t,this.module=e};function k(t,e){void 0===e&&(e="");for(var r=0;r<t.length;r++){var n=t[r];I(n,L(e,n))}}function I(t,e){if(!t)throw new Error("\n Invalid configuration of route '"+e+"': Encountered undefined route.\n The reason might be an extra comma.\n\n Example:\n const routes: Routes = [\n { path: '', redirectTo: '/dashboard', pathMatch: 'full' },\n { path: 'dashboard', component: DashboardComponent },, << two commas\n { path: 'detail/:id', component: HeroDetailComponent }\n ];\n ");if(Array.isArray(t))throw new Error("Invalid configuration of route '"+e+"': Array cannot be specified");if(!t.component&&!t.children&&!t.loadChildren&&t.outlet&&"primary"!==t.outlet)throw new Error("Invalid configuration of route '"+e+"': a componentless route without children or loadChildren cannot have a named outlet set");if(t.redirectTo&&t.children)throw new Error("Invalid configuration of route '"+e+"': redirectTo and children cannot be used together");if(t.redirectTo&&t.loadChildren)throw new Error("Invalid configuration of route '"+e+"': redirectTo and loadChildren cannot be used together");if(t.children&&t.loadChildren)throw new Error("Invalid configuration of route '"+e+"': children and loadChildren cannot be used together");if(t.redirectTo&&t.component)throw new Error("Invalid configuration of route '"+e+"': redirectTo and component cannot be used together");if(t.path&&t.matcher)throw new Error("Invalid configuration of route '"+e+"': path and matcher cannot be used together");if(void 0===t.redirectTo&&!t.component&&!t.children&&!t.loadChildren)throw new Error("Invalid configuration of route '"+e+"'. One of the following must be provided: component, redirectTo, children or loadChildren");if(void 0===t.path&&void 0===t.matcher)throw new Error("Invalid configuration of route '"+e+"': routes must have either a path or a matcher specified");if("string"==typeof t.path&&"/"===t.path.charAt(0))throw new Error("Invalid configuration of route '"+e+"': path cannot start with a slash");if(""===t.path&&void 0!==t.redirectTo&&void 0===t.pathMatch)throw new Error("Invalid configuration of route '{path: \""+e+'", redirectTo: "'+t.redirectTo+"\"}': please provide 'pathMatch'. The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'.");if(void 0!==t.pathMatch&&"full"!==t.pathMatch&&"prefix"!==t.pathMatch)throw new Error("Invalid configuration of route '"+e+"': pathMatch can only be set to 'prefix' or 'full'");t.children&&k(t.children,e)}function L(t,e){return e?t||e.path?t&&!e.path?t+"/":!t&&e.path?e.path:t+"/"+e.path:"":t}function M(t){var e=t.children&&t.children.map(M),r=e?Object.assign(Object.assign({},t),{children:e}):Object.assign({},t);return!r.component&&(e||r.loadChildren)&&r.outlet&&"primary"!==r.outlet&&(r.component=p),r}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/function N(t,e){var r,n=Object.keys(t),i=Object.keys(e);if(!n||!i||n.length!=i.length)return!1;for(var o=0;o<n.length;o++)if(!D(t[r=n[o]],e[r]))return!1;return!0}function D(t,e){return Array.isArray(t)&&Array.isArray(e)?t.length==e.length&&t.every((function(t){return e.indexOf(t)>-1})):t===e}function q(t){return Array.prototype.concat.apply([],t)}function z(t){return t.length>0?t[t.length-1]:null}function H(t,e){for(var r in t)t.hasOwnProperty(r)&&e(t[r],r)}function F(t){return r.ɵisObservable(t)?t:r.ɵisPromise(t)?n.from(Promise.resolve(t)):n.of(t)}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/function G(t,e,r){return r?function n(t,e){return N(t,e)}(t.queryParams,e.queryParams)&&function t(e,r){if(!V(e.segments,r.segments))return!1;if(e.numberOfChildren!==r.numberOfChildren)return!1;for(var n in r.children){if(!e.children[n])return!1;if(!t(e.children[n],r.children[n]))return!1}return!0}(t.root,e.root):function i(t,e){return Object.keys(e).length<=Object.keys(t).length&&Object.keys(e).every((function(r){return D(t[r],e[r])}))}(t.queryParams,e.queryParams)&&function t(e,r){return function e(r,n,i){if(r.segments.length>i.length)return!!V(a=r.segments.slice(0,i.length),i)&&!n.hasChildren();if(r.segments.length===i.length){if(!V(r.segments,i))return!1;for(var o in n.children){if(!r.children[o])return!1;if(!t(r.children[o],n.children[o]))return!1}return!0}var a=i.slice(0,r.segments.length),u=i.slice(r.segments.length);return!!V(r.segments,a)&&!!r.children.primary&&e(r.children.primary,n,u)}(e,r,r.segments)}(t.root,e.root)}var W=function(){function t(t,e,r){this.root=t,this.queryParams=e,this.fragment=r}return Object.defineProperty(t.prototype,"queryParamMap",{get:function(){return this._queryParamMap||(this._queryParamMap=j(this.queryParams)),this._queryParamMap},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return K.serialize(this)},t}(),B=function(){function t(t,e){var r=this;this.segments=t,this.children=e,this.parent=null,H(e,(function(t,e){return t.parent=r}))}return t.prototype.hasChildren=function(){return this.numberOfChildren>0},Object.defineProperty(t.prototype,"numberOfChildren",{get:function(){return Object.keys(this.children).length},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return J(this)},t}(),Q=function(){function t(t,e){this.path=t,this.parameters=e}return Object.defineProperty(t.prototype,"parameterMap",{get:function(){return this._parameterMap||(this._parameterMap=j(this.parameters)),this._parameterMap},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return it(this)},t}();function V(t,e){return t.length===e.length&&t.every((function(t,r){return t.path===e[r].path}))}function Z(t,e){var r=[];return H(t.children,(function(t,n){"primary"===n&&(r=r.concat(e(t,n)))})),H(t.children,(function(t,n){"primary"!==n&&(r=r.concat(e(t,n)))})),r}var Y=function Y(){},$=function(){function t(){}return t.prototype.parse=function(t){var e=new ct(t);return new W(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())},t.prototype.serialize=function(t){return"/"+function t(e,r){if(!e.hasChildren())return J(e);if(r){var n=e.children.primary?t(e.children.primary,!1):"",i=[];return H(e.children,(function(e,r){"primary"!==r&&i.push(r+":"+t(e,!1))})),i.length>0?n+"("+i.join("//")+")":n}var o=Z(e,(function(r,n){return"primary"===n?[t(e.children.primary,!1)]:[n+":"+t(r,!1)]}));return J(e)+"/("+o.join("//")+")"}(t.root,!0)+function e(t){var e=Object.keys(t).map((function(e){var r=t[e];return Array.isArray(r)?r.map((function(t){return tt(e)+"="+tt(t)})).join("&"):tt(e)+"="+tt(r)}));return e.length?"?"+e.join("&"):""}(t.queryParams)+("string"==typeof t.fragment?"#"+function r(t){return encodeURI(t)}(t.fragment):"")},t}(),K=new $;function J(t){return t.segments.map((function(t){return it(t)})).join("/")}function X(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function tt(t){return X(t).replace(/%3B/gi,";")}function et(t){return X(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function rt(t){return decodeURIComponent(t)}function nt(t){return rt(t.replace(/\+/g,"%20"))}function it(t){return""+et(t.path)+function e(t){return Object.keys(t).map((function(e){return";"+et(e)+"="+et(t[e])})).join("")}(t.parameters)}var ot=/^[^\/()?;=#]+/;function at(t){var e=t.match(ot);return e?e[0]:""}var ut=/^[^=?&#]+/,st=/^[^?&#]+/,ct=function(){function t(t){this.url=t,this.remaining=t}return t.prototype.parseRootSegment=function(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new B([],{}):new B([],this.parseChildren())},t.prototype.parseQueryParams=function(){var t={};if(this.consumeOptional("?"))do{this.parseQueryParam(t)}while(this.consumeOptional("&"));return t},t.prototype.parseFragment=function(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null},t.prototype.parseChildren=function(){if(""===this.remaining)return{};this.consumeOptional("/");var t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());var e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));var r={};return this.peekStartsWith("(")&&(r=this.parseParens(!1)),(t.length>0||Object.keys(e).length>0)&&(r.primary=new B(t,e)),r},t.prototype.parseSegment=function(){var t=at(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new Error("Empty path url segment cannot have parameters: '"+this.remaining+"'.");return this.capture(t),new Q(rt(t),this.parseMatrixParams())},t.prototype.parseMatrixParams=function(){for(var t={};this.consumeOptional(";");)this.parseParam(t);return t},t.prototype.parseParam=function(t){var e=at(this.remaining);if(e){this.capture(e);var r="";if(this.consumeOptional("=")){var n=at(this.remaining);n&&this.capture(r=n)}t[rt(e)]=rt(r)}},t.prototype.parseQueryParam=function(t){var e=function r(t){var e=t.match(ut);return e?e[0]:""}(this.remaining);if(e){this.capture(e);var n="";if(this.consumeOptional("=")){var i=function o(t){var e=t.match(st);return e?e[0]:""}(this.remaining);i&&this.capture(n=i)}var a=nt(e),u=nt(n);if(t.hasOwnProperty(a)){var s=t[a];Array.isArray(s)||(t[a]=s=[s]),s.push(u)}else t[a]=u}},t.prototype.parseParens=function(t){var e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){var r=at(this.remaining),n=this.remaining[r.length];if("/"!==n&&")"!==n&&";"!==n)throw new Error("Cannot parse url '"+this.url+"'");var i=void 0;r.indexOf(":")>-1?(i=r.substr(0,r.indexOf(":")),this.capture(i),this.capture(":")):t&&(i="primary");var o=this.parseChildren();e[i]=1===Object.keys(o).length?o.primary:new B([],o),this.consumeOptional("//")}return e},t.prototype.peekStartsWith=function(t){return this.remaining.startsWith(t)},t.prototype.consumeOptional=function(t){return!!this.peekStartsWith(t)&&(this.remaining=this.remaining.substring(t.length),!0)},t.prototype.capture=function(t){if(!this.consumeOptional(t))throw new Error('Expected "'+t+'".')},t}(),lt=function(){function t(t){this._root=t}return Object.defineProperty(t.prototype,"root",{get:function(){return this._root.value},enumerable:!1,configurable:!0}),t.prototype.parent=function(t){var e=this.pathFromRoot(t);return e.length>1?e[e.length-2]:null},t.prototype.children=function(t){var e=pt(t,this._root);return e?e.children.map((function(t){return t.value})):[]},t.prototype.firstChild=function(t){var e=pt(t,this._root);return e&&e.children.length>0?e.children[0].value:null},t.prototype.siblings=function(t){var e=ht(t,this._root);return e.length<2?[]:e[e.length-2].children.map((function(t){return t.value})).filter((function(e){return e!==t}))},t.prototype.pathFromRoot=function(t){return ht(t,this._root).map((function(t){return t.value}))},t}();function pt(t,e){var r,n;if(t===e.value)return e;try{for(var i=u(e.children),o=i.next();!o.done;o=i.next()){var a=pt(t,o.value);if(a)return a}}catch(t){r={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return null}function ht(t,e){var r,n;if(t===e.value)return[e];try{for(var i=u(e.children),o=i.next();!o.done;o=i.next()){var a=ht(t,o.value);if(a.length)return a.unshift(e),a}}catch(t){r={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return[]}var ft=function(){function t(t,e){this.value=t,this.children=e}return t.prototype.toString=function(){return"TreeNode("+this.value+")"},t}();function dt(t){var e={};return t&&t.children.forEach((function(t){return e[t.value.outlet]=t})),e}var gt=function(t){function e(e,r){var n=t.call(this,e)||this;return n.snapshot=r,wt(n,e),n}return a(e,t),e.prototype.toString=function(){return this.snapshot.toString()},e}(lt);function vt(t,e){var r=function i(t,e){var r=new St([],{},{},"",{},"primary",e,null,t.root,-1,{});return new bt("",new ft(r,[]))}(t,e),o=new n.BehaviorSubject([new Q("",{})]),a=new n.BehaviorSubject({}),u=new n.BehaviorSubject({}),s=new n.BehaviorSubject({}),c=new n.BehaviorSubject(""),l=new mt(o,a,s,c,u,"primary",e,r.root);return l.snapshot=r.root,new gt(new ft(l,[]),r)}var mt=function(){function t(t,e,r,n,i,o,a,u){this.url=t,this.params=e,this.queryParams=r,this.fragment=n,this.data=i,this.outlet=o,this.component=a,this._futureSnapshot=u}return Object.defineProperty(t.prototype,"routeConfig",{get:function(){return this._futureSnapshot.routeConfig},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){return this._routerState.root},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return this._routerState.parent(this)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"firstChild",{get:function(){return this._routerState.firstChild(this)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"children",{get:function(){return this._routerState.children(this)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pathFromRoot",{get:function(){return this._routerState.pathFromRoot(this)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"paramMap",{get:function(){return this._paramMap||(this._paramMap=this.params.pipe(i.map((function(t){return j(t)})))),this._paramMap},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"queryParamMap",{get:function(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(i.map((function(t){return j(t)})))),this._queryParamMap},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return this.snapshot?this.snapshot.toString():"Future("+this._futureSnapshot+")"},t}();function yt(t,e){void 0===e&&(e="emptyOnly");var r=t.pathFromRoot,n=0;if("always"!==e)for(n=r.length-1;n>=1;){var i=r[n],o=r[n-1];if(i.routeConfig&&""===i.routeConfig.path)n--;else{if(o.component)break;n--}}return function a(t){return t.reduce((function(t,e){return{params:Object.assign(Object.assign({},t.params),e.params),data:Object.assign(Object.assign({},t.data),e.data),resolve:Object.assign(Object.assign({},t.resolve),e._resolvedData)}}),{params:{},data:{},resolve:{}})}(r.slice(n))}var St=function(){function t(t,e,r,n,i,o,a,u,s,c,l){this.url=t,this.params=e,this.queryParams=r,this.fragment=n,this.data=i,this.outlet=o,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:!1,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return this._routerState.parent(this)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"firstChild",{get:function(){return this._routerState.firstChild(this)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"children",{get:function(){return this._routerState.children(this)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pathFromRoot",{get:function(){return this._routerState.pathFromRoot(this)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"paramMap",{get:function(){return this._paramMap||(this._paramMap=j(this.params)),this._paramMap},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"queryParamMap",{get:function(){return this._queryParamMap||(this._queryParamMap=j(this.queryParams)),this._queryParamMap},enumerable:!1,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}(),bt=function(t){function e(e,r){var n=t.call(this,r)||this;return n.url=e,wt(n,r),n}return a(e,t),e.prototype.toString=function(){return Ct(this._root)},e}(lt);function wt(t,e){e.value._routerState=t,e.children.forEach((function(e){return wt(t,e)}))}function Ct(t){var e=t.children.length>0?" { "+t.children.map(Ct).join(", ")+" } ":"";return""+t.value+e}function Rt(t){if(t.snapshot){var e=t.snapshot,r=t._futureSnapshot;t.snapshot=r,N(e.queryParams,r.queryParams)||t.queryParams.next(r.queryParams),e.fragment!==r.fragment&&t.fragment.next(r.fragment),N(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(!N(t[r],e[r]))return!1;return!0}(e.url,r.url)||t.url.next(r.url),N(e.data,r.data)||t.data.next(r.data)}else t.snapshot=t._futureSnapshot,t.data.next(t._futureSnapshot.data)}function Ot(t,e){return N(t.params,e.params)&&function r(t,e){return V(t,e)&&t.every((function(t,r){return N(t.parameters,e[r].parameters)}))}(t.url,e.url)&&!(!t.parent!=!e.parent)&&(!t.parent||Ot(t.parent,e.parent))}function Ut(t){return"object"==typeof t&&null!=t&&!t.outlets&&!t.segmentPath}function Pt(t,e,r,n,i){var o={};return n&&H(n,(function(t,e){o[e]=Array.isArray(t)?t.map((function(t){return""+t})):""+t})),new W(r.root===t?e:function t(e,r,n){var i={};return H(e.children,(function(e,o){i[o]=e===r?n:t(e,r,n)})),new B(e.segments,i)}(r.root,t,e),o,i)}var _t=function(){function t(t,e,r){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=r,t&&r.length>0&&Ut(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!==z(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}(),xt=function xt(t,e,r){this.segmentGroup=t,this.processChildren=e,this.index=r};function jt(t){return"object"==typeof t&&null!=t&&t.outlets?t.outlets.primary:""+t}function At(t,e,r){if(t||(t=new B([],{})),0===t.segments.length&&t.hasChildren())return Tt(t,e,r);var n=function i(t,e,r){for(var n=0,i=e,o={match:!1,pathIndex:0,commandIndex:0};i<t.segments.length;){if(n>=r.length)return o;var a=t.segments[i],u=jt(r[n]),s=n<r.length-1?r[n+1]:null;if(i>0&&void 0===u)break;if(u&&s&&"object"==typeof s&&void 0===s.outlets){if(!Lt(u,s,a))return o;n+=2}else{if(!Lt(u,{},a))return o;n++}i++}return{match:!0,pathIndex:i,commandIndex:n}}(t,e,r),o=r.slice(n.commandIndex);if(n.match&&n.pathIndex<t.segments.length){var a=new B(t.segments.slice(0,n.pathIndex),{});return a.children.primary=new B(t.segments.slice(n.pathIndex),t.children),Tt(a,0,o)}return n.match&&0===o.length?new B(t.segments,{}):n.match&&!t.hasChildren()?Et(t,e,r):n.match?Tt(t,0,o):Et(t,e,r)}function Tt(t,e,r){if(0===r.length)return new B(t.segments,{});var n=function i(t){var e;return"object"==typeof t[0]&&null!==t[0]&&t[0].outlets?t[0].outlets:((e={}).primary=t,e)}(r),o={};return H(n,(function(r,n){null!==r&&(o[n]=At(t.children[n],e,r))})),H(t.children,(function(t,e){void 0===n[e]&&(o[e]=t)})),new B(t.segments,o)}function Et(t,e,r){for(var n=t.segments.slice(0,e),i=0;i<r.length;){if("object"==typeof r[i]&&null!==r[i]&&void 0!==r[i].outlets){var o=kt(r[i].outlets);return new B(n,o)}if(0===i&&Ut(r[0]))n.push(new Q(t.segments[e].path,r[0])),i++;else{var a=jt(r[i]),u=i<r.length-1?r[i+1]:null;a&&u&&Ut(u)?(n.push(new Q(a,It(u))),i+=2):(n.push(new Q(a,{})),i++)}}return new B(n,{})}function kt(t){var e={};return H(t,(function(t,r){null!==t&&(e[r]=Et(new B([],{}),0,t))})),e}function It(t){var e={};return H(t,(function(t,r){return e[r]=""+t})),e}function Lt(t,e,r){return t==r.path&&N(e,r.parameters)}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/var Mt=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),Rt(this.futureState.root),this.activateChildRoutes(e,r,t)},t.prototype.deactivateChildRoutes=function(t,e,r){var n=this,i=dt(e);t.children.forEach((function(t){var e=t.value.outlet;n.deactivateRoutes(t,i[e],r),delete i[e]})),H(i,(function(t,e){n.deactivateRouteAndItsChildren(t,r)}))},t.prototype.deactivateRoutes=function(t,e,r){var n=t.value,i=e?e.value:null;if(n===i)if(n.component){var o=r.getContext(n.outlet);o&&this.deactivateChildRoutes(t,e,o.children)}else this.deactivateChildRoutes(t,e,r);else i&&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(),i=r.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:n,route:t,contexts:i})}},t.prototype.deactivateRouteAndOutlet=function(t,e){var r=this,n=e.getContext(t.value.outlet);if(n){var i=dt(t),o=t.value.component?n.children:e;H(i,(function(t,e){return r.deactivateRouteAndItsChildren(t,o)})),n.outlet&&(n.outlet.deactivate(),n.children.onOutletDeactivated())}},t.prototype.activateChildRoutes=function(t,e,r){var n=this,i=dt(e);t.children.forEach((function(t){n.activateRoutes(t,i[t.value.outlet],r),n.forwardEvent(new P(t.value.snapshot))})),t.children.length&&this.forwardEvent(new O(t.value.snapshot))},t.prototype.activateRoutes=function(t,e,r){var n=t.value,i=e?e.value:null;if(Rt(n),n===i)if(n.component){var o=r.getOrCreateContext(n.outlet);this.activateChildRoutes(t,e,o.children)}else this.activateChildRoutes(t,e,r);else if(n.component)if(o=r.getOrCreateContext(n.outlet),this.routeReuseStrategy.shouldAttach(n.snapshot)){var a=this.routeReuseStrategy.retrieve(n.snapshot);this.routeReuseStrategy.store(n.snapshot,null),o.children.onOutletReAttached(a.contexts),o.attachRef=a.componentRef,o.route=a.route.value,o.outlet&&o.outlet.attach(a.componentRef,a.route.value),Nt(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}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/(n.snapshot),c=u?u.module.componentFactoryResolver:null;o.attachRef=null,o.route=n,o.resolver=c,o.outlet&&o.outlet.activateWith(n,c),this.activateChildRoutes(t,null,o.children)}else this.activateChildRoutes(t,null,r)},t}();function Nt(t){Rt(t.value),t.children.forEach(Nt)}function Dt(t){return"function"==typeof t}function qt(t){return t instanceof W}var zt=function zt(t){this.segmentGroup=t||null},Ht=function Ht(t){this.urlTree=t};function Ft(t){return new n.Observable((function(e){return e.error(new zt(t))}))}function Gt(t){return new n.Observable((function(e){return e.error(new Ht(t))}))}function Wt(t){return new n.Observable((function(e){return e.error(new Error("Only absolute redirects can have named outlets. redirectTo: '"+t+"'"))}))}var Bt=function(){function t(t,e,n,i,o){this.configLoader=e,this.urlSerializer=n,this.urlTree=i,this.config=o,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,"primary").pipe(i.map((function(e){return t.createUrlTree(e,t.urlTree.queryParams,t.urlTree.fragment)}))).pipe(i.catchError((function(e){if(e instanceof Ht)return t.allowRedirects=!1,t.match(e.urlTree);if(e instanceof zt)throw t.noMatchError(e);throw e})))},t.prototype.match=function(t){var e=this;return this.expandSegmentGroup(this.ngModule,this.config,t.root,"primary").pipe(i.map((function(r){return e.createUrlTree(r,t.queryParams,t.fragment)}))).pipe(i.catchError((function(t){if(t instanceof zt)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,i=t.segments.length>0?new B([],((n={}).primary=t,n)):t;return new W(i,e,r)},t.prototype.expandSegmentGroup=function(t,e,r,n){return 0===r.segments.length&&r.hasChildren()?this.expandChildren(t,e,r).pipe(i.map((function(t){return new B([],t)}))):this.expandSegment(t,r,e,r.segments,n,!0)},t.prototype.expandChildren=function(t,e,r){var o=this;return function a(t,e){if(0===Object.keys(t).length)return n.of({});var r=[],o=[],a={};return H(t,(function(t,n){var u=e(n,t).pipe(i.map((function(t){return a[n]=t})));"primary"===n?r.push(u):o.push(u)})),n.of.apply(null,r.concat(o)).pipe(i.concatAll(),i.last(),i.map((function(){return a})))}(r.children,(function(r,n){return o.expandSegmentGroup(t,e,n,r)}))},t.prototype.expandSegment=function(t,e,r,o,a,u){var s=this;return n.of.apply(void 0,c(r)).pipe(i.map((function(c){return s.expandSegmentAgainstRoute(t,e,r,c,o,a,u).pipe(i.catchError((function(t){if(t instanceof zt)return n.of(null);throw t})))})),i.concatAll(),i.first((function(t){return!!t})),i.catchError((function(t,r){if(t instanceof n.EmptyError||"EmptyError"===t.name){if(s.noLeftoversInUrl(e,o,a))return n.of(new B([],{}));throw new zt(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,i,o,a){return Yt(n)!==o?Ft(e):void 0===n.redirectTo?this.matchSegmentAgainstRoute(t,e,n,i):a&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(t,e,r,n,i,o):Ft(e)},t.prototype.expandSegmentAgainstRouteUsingRedirect=function(t,e,r,n,i,o){return"**"===n.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(t,r,n,o):this.expandRegularSegmentAgainstRouteUsingRedirect(t,e,r,n,i,o)},t.prototype.expandWildCardWithParamsAgainstRouteUsingRedirect=function(t,e,r,n){var o=this,a=this.applyRedirectCommands([],r.redirectTo,{});return r.redirectTo.startsWith("/")?Gt(a):this.lineralizeSegments(r,a).pipe(i.mergeMap((function(r){var i=new B(r,{});return o.expandSegment(t,i,e,r,n,!1)})))},t.prototype.expandRegularSegmentAgainstRouteUsingRedirect=function(t,e,r,n,o,a){var u=this,s=Qt(e,n,o),c=s.consumedSegments,l=s.lastChild,p=s.positionalParamSegments;if(!s.matched)return Ft(e);var h=this.applyRedirectCommands(c,n.redirectTo,p);return n.redirectTo.startsWith("/")?Gt(h):this.lineralizeSegments(n,h).pipe(i.mergeMap((function(n){return u.expandSegment(t,e,r,n.concat(o.slice(l)),a,!1)})))},t.prototype.matchSegmentAgainstRoute=function(t,e,r,o){var a=this;if("**"===r.path)return r.loadChildren?this.configLoader.load(t.injector,r).pipe(i.map((function(t){return r._loadedConfig=t,new B(o,{})}))):n.of(new B(o,{}));var s=Qt(e,r,o),c=s.consumedSegments,l=s.lastChild;if(!s.matched)return Ft(e);var p=o.slice(l);return this.getChildConfig(t,r,o).pipe(i.mergeMap((function(t){var r=t.module,o=t.routes,s=function l(t,e,r,n){return r.length>0&&function i(t,e,r){return r.some((function(r){return Zt(t,e,r)&&"primary"!==Yt(r)}))}(t,r,n)?{segmentGroup:Vt(new B(e,function o(t,e){var r,n,i={};i.primary=e;try{for(var o=u(t),a=o.next();!a.done;a=o.next()){var s=a.value;""===s.path&&"primary"!==Yt(s)&&(i[Yt(s)]=new B([],{}))}}catch(t){r={error:t}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return i}(n,new B(r,t.children)))),slicedSegments:[]}:0===r.length&&function a(t,e,r){return r.some((function(r){return Zt(t,e,r)}))}(t,r,n)?{segmentGroup:Vt(new B(t.segments,function s(t,e,r,n){var i,o,a={};try{for(var s=u(r),c=s.next();!c.done;c=s.next()){var l=c.value;Zt(t,e,l)&&!n[Yt(l)]&&(a[Yt(l)]=new B([],{}))}}catch(t){i={error:t}}finally{try{c&&!c.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}return Object.assign(Object.assign({},n),a)}(t,r,n,t.children))),slicedSegments:r}:{segmentGroup:t,slicedSegments:r}}(e,c,p,o),h=s.segmentGroup,f=s.slicedSegments;return 0===f.length&&h.hasChildren()?a.expandChildren(r,o,h).pipe(i.map((function(t){return new B(c,t)}))):0===o.length&&0===f.length?n.of(new B(c,{})):a.expandSegment(r,h,o,f,"primary",!0).pipe(i.map((function(t){return new B(c.concat(t.segments),t.children)})))})))},t.prototype.getChildConfig=function(t,e,r){var o=this;return e.children?n.of(new E(e.children,t)):e.loadChildren?void 0!==e._loadedConfig?n.of(e._loadedConfig):this.runCanLoadGuards(t.injector,e,r).pipe(i.mergeMap((function(r){return r?o.configLoader.load(t.injector,e).pipe(i.map((function(t){return e._loadedConfig=t,t}))):function a(t){return new n.Observable((function(e){return e.error(A("Cannot load children because the guard of the route \"path: '"+t.path+"'\" returned false"))}))}(e)}))):n.of(new E([],t))},t.prototype.runCanLoadGuards=function(t,e,r){var o=this,a=e.canLoad;return a&&0!==a.length?n.from(a).pipe(i.map((function(n){var i,o=t.get(n);if(function a(t){return t&&Dt(t.canLoad)}(o))i=o.canLoad(e,r);else{if(!Dt(o))throw new Error("Invalid CanLoad guard");i=o(e,r)}return F(i)}))).pipe(i.concatAll(),i.tap((function(t){if(qt(t)){var e=A('Redirecting to "'+o.urlSerializer.serialize(t)+'"');throw e.url=t,e}})),i.every((function(t){return!0===t}))):n.of(!0)},t.prototype.lineralizeSegments=function(t,e){for(var r=[],i=e.root;;){if(r=r.concat(i.segments),0===i.numberOfChildren)return n.of(r);if(i.numberOfChildren>1||!i.children.primary)return Wt(t.redirectTo);i=i.children.primary}},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 i=this.createSegmentGroup(t,e.root,r,n);return new W(i,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)},t.prototype.createQueryParams=function(t,e){var r={};return H(t,(function(t,n){if("string"==typeof t&&t.startsWith(":")){var i=t.substring(1);r[n]=e[i]}else r[n]=t})),r},t.prototype.createSegmentGroup=function(t,e,r,n){var i=this,o=this.createSegments(t,e.segments,r,n),a={};return H(e.children,(function(e,o){a[o]=i.createSegmentGroup(t,e,r,n)})),new B(o,a)},t.prototype.createSegments=function(t,e,r,n){var i=this;return e.map((function(e){return e.path.startsWith(":")?i.findPosParam(t,e,n):i.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,i=0;try{for(var o=u(e),a=o.next();!a.done;a=o.next()){var s=a.value;if(s.path===t.path)return e.splice(i),s;i++}}catch(t){r={error:t}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return t},t}();function Qt(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||T)(r,t,e);return n?{matched:!0,consumedSegments:n.consumed,lastChild:n.consumed.length,positionalParamSegments:n.posParams}:{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}}function Vt(t){if(1===t.numberOfChildren&&t.children.primary){var e=t.children.primary;return new B(t.segments.concat(e.segments),e.children)}return t}function Zt(t,e,r){return(!(t.hasChildren()||e.length>0)||"full"!==r.pathMatch)&&""===r.path&&void 0!==r.redirectTo}function Yt(t){return t.outlet||"primary"}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
var $t=function $t(t){this.path=t,this.route=this.path[this.path.length-1]},Kt=function Kt(t,e){this.component=t,this.route=e};function Jt(t,e,r){var n=function i(t){if(!t)return null;for(var e=t.parent;e;e=e.parent){var r=e.routeConfig;if(r&&r._loadedConfig)return r._loadedConfig}return null}(e);return(n?n.module.injector:r).get(t)}function Xt(t,e,r,n,i){void 0===i&&(i={canDeactivateChecks:[],canActivateChecks:[]});var o=dt(e);return t.children.forEach((function(t){!function e(t,r,n,i,o){void 0===o&&(o={canDeactivateChecks:[],canActivateChecks:[]});var a=t.value,u=r?r.value:null,s=n?n.getContext(t.value.outlet):null;if(u&&a.routeConfig===u.routeConfig){var c=function l(t,e,r){if("function"==typeof r)return r(t,e);switch(r){case"pathParamsChange":return!V(t.url,e.url);case"pathParamsOrQueryParamsChange":return!V(t.url,e.url)||!N(t.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Ot(t,e)||!N(t.queryParams,e.queryParams);case"paramsChange":default:return!Ot(t,e)}}(u,a,a.routeConfig.runGuardsAndResolvers);c?o.canActivateChecks.push(new $t(i)):(a.data=u.data,a._resolvedData=u._resolvedData),Xt(t,r,a.component?s?s.children:null:n,i,o),c&&o.canDeactivateChecks.push(new Kt(s&&s.outlet&&s.outlet.component||null,u))}else u&&te(r,s,o),o.canActivateChecks.push(new $t(i)),Xt(t,null,a.component?s?s.children:null:n,i,o)}(t,o[t.value.outlet],r,n.concat([t.value]),i),delete o[t.value.outlet]})),H(o,(function(t,e){return te(t,r.getContext(e),i)})),i}function te(t,e,r){var n=dt(t),i=t.value;H(n,(function(t,n){te(t,i.component?e?e.children.getContext(n):null:e,r)})),r.canDeactivateChecks.push(new Kt(i.component&&e&&e.outlet&&e.outlet.isActivated?e.outlet.component:null,i))}var ee=Symbol("INITIAL_VALUE");function re(){return i.switchMap((function(t){return n.combineLatest.apply(void 0,c(t.map((function(t){return t.pipe(i.take(1),i.startWith(ee))})))).pipe(i.scan((function(t,e){var r=!1;return e.reduce((function(t,n,i){if(t!==ee)return t;if(n===ee&&(r=!0),!r){if(!1===n)return n;if(i===e.length-1||qt(n))return n}return t}),t)}),ee),i.filter((function(t){return t!==ee})),i.map((function(t){return qt(t)?t:!0===t})),i.take(1))}))}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/function ne(t,e){return null!==t&&e&&e(new U(t)),n.of(!0)}function ie(t,e){return null!==t&&e&&e(new R(t)),n.of(!0)}function oe(t,e,r){var o=e.routeConfig?e.routeConfig.canActivate:null;if(!o||0===o.length)return n.of(!0);var a=o.map((function(o){return n.defer((function(){var n,a=Jt(o,e,r);if(function u(t){return t&&Dt(t.canActivate)}(a))n=F(a.canActivate(e,t));else{if(!Dt(a))throw new Error("Invalid CanActivate guard");n=F(a(e,t))}return n.pipe(i.first())}))}));return n.of(a).pipe(re())}function ae(t,e,r){var o=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=Jt(n,e.node,r);if(function s(t){return t&&Dt(t.canActivateChild)}(u))a=F(u.canActivateChild(o,t));else{if(!Dt(u))throw new Error("Invalid CanActivateChild guard");a=F(u(o,t))}return a.pipe(i.first())}));return n.of(a).pipe(re())}))}));return n.of(a).pipe(re())}var ue=function zt(){},se=function(){function t(t,e,r,n,i,o){this.rootComponentType=t,this.config=e,this.urlTree=r,this.url=n,this.paramsInheritanceStrategy=i,this.relativeLinkResolution=o}return t.prototype.recognize=function(){try{var t=pe(this.urlTree.root,[],[],this.config,this.relativeLinkResolution).segmentGroup,e=this.processSegmentGroup(this.config,t,"primary"),r=new St([],Object.freeze({}),Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,{},"primary",this.rootComponentType,null,this.urlTree.root,-1,{}),i=new ft(r,e),o=new bt(this.url,i);return this.inheritParamsAndData(o._root),n.of(o)}catch(t){return new n.Observable((function(e){return e.error(t)}))}},t.prototype.inheritParamsAndData=function(t){var e=this,r=t.value,n=yt(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=Z(e,(function(e,n){return r.processSegmentGroup(t,e,n)}));return function i(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("/"),i=t.value.url.map((function(t){return t.toString()})).join("/");throw new Error("Two segments cannot have the same outlet name: '"+n+"' and '"+i+"'.")}e[t.value.outlet]=t.value}))}(n),function o(t){t.sort((function(t,e){return"primary"===t.value.outlet?-1:"primary"===e.value.outlet?1:t.value.outlet.localeCompare(e.value.outlet)}))}(n),n},t.prototype.processSegment=function(t,e,r,n){var i,o;try{for(var a=u(t),s=a.next();!s.done;s=a.next()){var c=s.value;try{return this.processSegmentAgainstRoute(c,e,r,n)}catch(t){if(!(t instanceof ue))throw t}}}catch(t){i={error:t}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}if(this.noLeftoversInUrl(e,r,n))return[];throw new ue},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 ue;if((t.outlet||"primary")!==n)throw new ue;var i,o=[],a=[];if("**"===t.path){var u=r.length>0?z(r).parameters:{};i=new St(r,u,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,de(t),n,t.component,t,ce(e),le(e)+r.length,ge(t))}else{var s=function c(t,e,r){if(""===e.path){if("full"===e.pathMatch&&(t.hasChildren()||r.length>0))throw new ue;return{consumedSegments:[],lastChild:0,parameters:{}}}var n=(e.matcher||T)(r,t,e);if(!n)throw new ue;var i={};H(n.posParams,(function(t,e){i[e]=t.path}));var o=n.consumed.length>0?Object.assign(Object.assign({},i),n.consumed[n.consumed.length-1].parameters):i;return{consumedSegments:n.consumed,lastChild:n.consumed.length,parameters:o}}(e,t,r);o=s.consumedSegments,a=r.slice(s.lastChild),i=new St(o,s.parameters,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,de(t),n,t.component,t,ce(e),le(e)+o.length,ge(t))}var l=function p(t){return t.children?t.children:t.loadChildren?t._loadedConfig.routes:[]}(t),h=pe(e,o,a,l,this.relativeLinkResolution),f=h.segmentGroup,d=h.slicedSegments;if(0===d.length&&f.hasChildren()){var g=this.processChildren(l,f);return[new ft(i,g)]}if(0===l.length&&0===d.length)return[new ft(i,[])];var v=this.processSegment(l,f,d,"primary");return[new ft(i,v)]},t}();function ce(t){for(var e=t;e._sourceSegment;)e=e._sourceSegment;return e}function le(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 pe(t,e,r,n,i){if(r.length>0&&function o(t,e,r){return r.some((function(r){return he(t,e,r)&&"primary"!==fe(r)}))}(t,r,n)){var a=new B(e,function s(t,e,r,n){var i,o,a={};a.primary=n,n._sourceSegment=t,n._segmentIndexShift=e.length;try{for(var s=u(r),c=s.next();!c.done;c=s.next()){var l=c.value;if(""===l.path&&"primary"!==fe(l)){var p=new B([],{});p._sourceSegment=t,p._segmentIndexShift=e.length,a[fe(l)]=p}}}catch(t){i={error:t}}finally{try{c&&!c.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}return a}(t,e,n,new B(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 he(t,e,r)}))}(t,r,n)){var l=new B(t.segments,function p(t,e,r,n,i,o){var a,s,c={};try{for(var l=u(n),p=l.next();!p.done;p=l.next()){var h=p.value;if(he(t,r,h)&&!i[fe(h)]){var f=new B([],{});f._sourceSegment=t,f._segmentIndexShift="legacy"===o?t.segments.length:e.length,c[fe(h)]=f}}}catch(t){a={error:t}}finally{try{p&&!p.done&&(s=l.return)&&s.call(l)}finally{if(a)throw a.error}}return Object.assign(Object.assign({},i),c)}(t,e,r,n,t.children,i));return l._sourceSegment=t,l._segmentIndexShift=e.length,{segmentGroup:l,slicedSegments:r}}var h=new B(t.segments,t.children);return h._sourceSegment=t,h._segmentIndexShift=e.length,{segmentGroup:h,slicedSegments:r}}function he(t,e,r){return(!(t.hasChildren()||e.length>0)||"full"!==r.pathMatch)&&""===r.path&&void 0===r.redirectTo}function fe(t){return t.outlet||"primary"}function de(t){return t.data||{}}function ge(t){return t.resolve||{}}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
function ve(t){return function(e){return e.pipe(i.switchMap((function(e){var r=t(e);return r?n.from(r).pipe(i.map((function(){return e}))):n.from([e])})))}}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/var me=function me(){},ye=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