@angular/router 11.0.7 → 11.0.8

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v11.0.7
2
+ * @license Angular v11.0.8
3
3
  * (c) 2010-2020 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -32,7 +32,7 @@ var l,p=function(t){function e(e,r,n,i){void 0===n&&(n="imperative"),void 0===i&
32
32
  *
33
33
  * Use of this source code is governed by an MIT-style license that can be
34
34
  * found in the LICENSE file at https://angular.io/license
35
- */function N(t,e,r){return r?function n(t,e){return T(t,e)}(t.queryParams,e.queryParams)&&function t(e,r){if(!H(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 k(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!!H(a=r.segments.slice(0,i.length),i)&&!n.hasChildren();if(r.segments.length===i.length){if(!H(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!!H(r.segments,a)&&!!r.children.primary&&e(r.children.primary,n,u)}(e,r,r.segments)}(t.root,e.root)}var q=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=_(this.queryParams)),this._queryParamMap},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return W.serialize(this)},t}(),z=function(){function t(t,e){var r=this;this.segments=t,this.children=e,this.parent=null,L(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 B(this)},t}(),D=function(){function t(t,e){this.path=t,this.parameters=e}return Object.defineProperty(t.prototype,"parameterMap",{get:function(){return this._parameterMap||(this._parameterMap=_(this.parameters)),this._parameterMap},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return K(this)},t}();function H(t,e){return t.length===e.length&&t.every((function(t,r){return t.path===e[r].path}))}var F=function F(){},G=function(){function t(){}return t.prototype.parse=function(t){var e=new rt(t);return new q(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())},t.prototype.serialize=function(t){return"/"+function t(e,r){if(!e.hasChildren())return B(e);if(r){var n=e.children.primary?t(e.children.primary,!1):"",i=[];return L(e.children,(function(e,r){"primary"!==r&&i.push(r+":"+t(e,!1))})),i.length>0?n+"("+i.join("//")+")":n}var o=function a(t,e){var r=[];return L(t.children,(function(t,n){"primary"===n&&(r=r.concat(e(t,n)))})),L(t.children,(function(t,n){"primary"!==n&&(r=r.concat(e(t,n)))})),r}(e,(function(r,n){return"primary"===n?[t(e.children.primary,!1)]:[n+":"+t(r,!1)]}));return 1===Object.keys(e.children).length&&null!=e.children.primary?B(e)+"/"+o[0]:B(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 Q(e)+"="+Q(t)})).join("&"):Q(e)+"="+Q(r)}));return e.length?"?"+e.join("&"):""}(t.queryParams)+("string"==typeof t.fragment?"#"+function r(t){return encodeURI(t)}(t.fragment):"")},t}(),W=new G;function B(t){return t.segments.map((function(t){return K(t)})).join("/")}function V(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Q(t){return V(t).replace(/%3B/gi,";")}function Y(t){return V(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Z(t){return decodeURIComponent(t)}function $(t){return Z(t.replace(/\+/g,"%20"))}function K(t){return""+Y(t.path)+function e(t){return Object.keys(t).map((function(e){return";"+Y(e)+"="+Y(t[e])})).join("")}(t.parameters)}var J=/^[^\/()?;=#]+/;function X(t){var e=t.match(J);return e?e[0]:""}var tt=/^[^=?&#]+/,et=/^[^?&#]+/,rt=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 z([],{}):new z([],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 z(t,e)),r},t.prototype.parseSegment=function(){var t=X(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new Error("Empty path url segment cannot have parameters: '"+this.remaining+"'.");return this.capture(t),new D(Z(t),this.parseMatrixParams())},t.prototype.parseMatrixParams=function(){for(var t={};this.consumeOptional(";");)this.parseParam(t);return t},t.prototype.parseParam=function(t){var e=X(this.remaining);if(e){this.capture(e);var r="";if(this.consumeOptional("=")){var n=X(this.remaining);n&&this.capture(r=n)}t[Z(e)]=Z(r)}},t.prototype.parseQueryParam=function(t){var e=function r(t){var e=t.match(tt);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(et);return e?e[0]:""}(this.remaining);i&&this.capture(n=i)}var a=$(e),u=$(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=X(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 z([],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}(),nt=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=it(t,this._root);return e?e.children.map((function(t){return t.value})):[]},t.prototype.firstChild=function(t){var e=it(t,this._root);return e&&e.children.length>0?e.children[0].value:null},t.prototype.siblings=function(t){var e=ot(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 ot(t,this._root).map((function(t){return t.value}))},t}();function it(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=it(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 ot(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=ot(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 at=function(){function t(t,e){this.value=t,this.children=e}return t.prototype.toString=function(){return"TreeNode("+this.value+")"},t}();function ut(t){var e={};return t&&t.children.forEach((function(t){return e[t.value.outlet]=t})),e}var st=function(t){function e(e,r){var n=t.call(this,e)||this;return n.snapshot=r,dt(n,e),n}return a(e,t),e.prototype.toString=function(){return this.snapshot.toString()},e}(nt);function ct(t,e){var r=function i(t,e){var r=new ht([],{},{},"",{},"primary",e,null,t.root,-1,{});return new ft("",new at(r,[]))}(t,e),o=new n.BehaviorSubject([new D("",{})]),a=new n.BehaviorSubject({}),u=new n.BehaviorSubject({}),s=new n.BehaviorSubject({}),c=new n.BehaviorSubject(""),l=new lt(o,a,s,c,u,"primary",e,r.root);return l.snapshot=r.root,new st(new at(l,[]),r)}var lt=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 _(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 _(t)})))),this._queryParamMap},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return this.snapshot?this.snapshot.toString():"Future("+this._futureSnapshot+")"},t}();function pt(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 ht=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=_(this.params)),this._paramMap},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"queryParamMap",{get:function(){return this._queryParamMap||(this._queryParamMap=_(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}(),ft=function(t){function e(e,r){var n=t.call(this,r)||this;return n.url=e,dt(n,r),n}return a(e,t),e.prototype.toString=function(){return gt(this._root)},e}(nt);function dt(t,e){e.value._routerState=t,e.children.forEach((function(e){return dt(t,e)}))}function gt(t){var e=t.children.length>0?" { "+t.children.map(gt).join(", ")+" } ":"";return""+t.value+e}function vt(t){if(t.snapshot){var e=t.snapshot,r=t._futureSnapshot;t.snapshot=r,T(e.queryParams,r.queryParams)||t.queryParams.next(r.queryParams),e.fragment!==r.fragment&&t.fragment.next(r.fragment),T(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(!T(t[r],e[r]))return!1;return!0}(e.url,r.url)||t.url.next(r.url),T(e.data,r.data)||t.data.next(r.data)}else t.snapshot=t._futureSnapshot,t.data.next(t._futureSnapshot.data)}function mt(t,e){return T(t.params,e.params)&&function r(t,e){return H(t,e)&&t.every((function(t,r){return T(t.parameters,e[r].parameters)}))}(t.url,e.url)&&!(!t.parent!=!e.parent)&&(!t.parent||mt(t.parent,e.parent))}function yt(t){return"object"==typeof t&&null!=t&&!t.outlets&&!t.segmentPath}function St(t){return"object"==typeof t&&null!=t&&t.outlets}function bt(t,e,r,n,i){var o={};return n&&L(n,(function(t,e){o[e]=Array.isArray(t)?t.map((function(t){return""+t})):""+t})),new q(r.root===t?e:function t(e,r,n){var i={};return L(e.children,(function(e,o){i[o]=e===r?n:t(e,r,n)})),new z(e.segments,i)}(r.root,t,e),o,i)}var Ct=function(){function t(t,e,r){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=r,t&&r.length>0&&yt(r[0]))throw new Error("Root segment cannot have matrix parameters");var n=r.find(St);if(n&&n!==I(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}(),wt=function wt(t,e,r){this.segmentGroup=t,this.processChildren=e,this.index=r};function Rt(t,e,r){if(t||(t=new z([],{})),0===t.segments.length&&t.hasChildren())return Ot(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=r[n];if(St(u))break;var s=""+u,c=n<r.length-1?r[n+1]:null;if(i>0&&void 0===s)break;if(s&&c&&"object"==typeof c&&void 0===c.outlets){if(!_t(s,c,a))return o;n+=2}else{if(!_t(s,{},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 z(t.segments.slice(0,n.pathIndex),{});return a.children.primary=new z(t.segments.slice(n.pathIndex),t.children),Ot(a,0,o)}return n.match&&0===o.length?new z(t.segments,{}):n.match&&!t.hasChildren()?Ut(t,e,r):n.match?Ot(t,0,o):Ut(t,e,r)}function Ot(t,e,r){if(0===r.length)return new z(t.segments,{});var n=function i(t){var e;return St(t[0])?t[0].outlets:((e={}).primary=t,e)}(r),o={};return L(n,(function(r,n){"string"==typeof r&&(r=[r]),null!==r&&(o[n]=Rt(t.children[n],e,r))})),L(t.children,(function(t,e){void 0===n[e]&&(o[e]=t)})),new z(t.segments,o)}function Ut(t,e,r){for(var n=t.segments.slice(0,e),i=0;i<r.length;){var o=r[i];if(St(o)){var a=Pt(o.outlets);return new z(n,a)}if(0===i&&yt(r[0]))n.push(new D(t.segments[e].path,r[0])),i++;else{var u=St(o)?o.outlets.primary:""+o,s=i<r.length-1?r[i+1]:null;u&&s&&yt(s)?(n.push(new D(u,xt(s))),i+=2):(n.push(new D(u,{})),i++)}}return new z(n,{})}function Pt(t){var e={};return L(t,(function(t,r){"string"==typeof t&&(t=[t]),null!==t&&(e[r]=Ut(new z([],{}),0,t))})),e}function xt(t){var e={};return L(t,(function(t,r){return e[r]=""+t})),e}function _t(t,e,r){return t==r.path&&T(e,r.parameters)}var jt=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),vt(this.futureState.root),this.activateChildRoutes(e,r,t)},t.prototype.deactivateChildRoutes=function(t,e,r){var n=this,i=ut(e);t.children.forEach((function(t){var e=t.value.outlet;n.deactivateRoutes(t,i[e],r),delete i[e]})),L(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,n,i=e.getContext(t.value.outlet),o=i&&t.value.component?i.children:e,a=ut(t);try{for(var s=u(Object.values(a)),c=s.next();!c.done;c=s.next())this.deactivateRouteAndItsChildren(c.value,o)}catch(t){r={error:t}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}i&&i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated())},t.prototype.activateChildRoutes=function(t,e,r){var n=this,i=ut(e);t.children.forEach((function(t){n.activateRoutes(t,i[t.value.outlet],r),n.forwardEvent(new U(t.value.snapshot))})),t.children.length&&this.forwardEvent(new R(t.value.snapshot))},t.prototype.activateRoutes=function(t,e,r){var n=t.value,i=e?e.value:null;if(vt(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),At(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}
35
+ */function N(t,e,r){return r?function n(t,e){return T(t,e)}(t.queryParams,e.queryParams)&&function t(e,r){if(!H(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 k(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!!H(a=r.segments.slice(0,i.length),i)&&!n.hasChildren();if(r.segments.length===i.length){if(!H(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!!H(r.segments,a)&&!!r.children.primary&&e(r.children.primary,n,u)}(e,r,r.segments)}(t.root,e.root)}var q=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=_(this.queryParams)),this._queryParamMap},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return W.serialize(this)},t}(),z=function(){function t(t,e){var r=this;this.segments=t,this.children=e,this.parent=null,L(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 B(this)},t}(),D=function(){function t(t,e){this.path=t,this.parameters=e}return Object.defineProperty(t.prototype,"parameterMap",{get:function(){return this._parameterMap||(this._parameterMap=_(this.parameters)),this._parameterMap},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return K(this)},t}();function H(t,e){return t.length===e.length&&t.every((function(t,r){return t.path===e[r].path}))}var F=function F(){},G=function(){function t(){}return t.prototype.parse=function(t){var e=new rt(t);return new q(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())},t.prototype.serialize=function(t){return"/"+function t(e,r){if(!e.hasChildren())return B(e);if(r){var n=e.children.primary?t(e.children.primary,!1):"",i=[];return L(e.children,(function(e,r){"primary"!==r&&i.push(r+":"+t(e,!1))})),i.length>0?n+"("+i.join("//")+")":n}var o=function a(t,e){var r=[];return L(t.children,(function(t,n){"primary"===n&&(r=r.concat(e(t,n)))})),L(t.children,(function(t,n){"primary"!==n&&(r=r.concat(e(t,n)))})),r}(e,(function(r,n){return"primary"===n?[t(e.children.primary,!1)]:[n+":"+t(r,!1)]}));return 1===Object.keys(e.children).length&&null!=e.children.primary?B(e)+"/"+o[0]:B(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 Q(e)+"="+Q(t)})).join("&"):Q(e)+"="+Q(r)}));return e.length?"?"+e.join("&"):""}(t.queryParams)+("string"==typeof t.fragment?"#"+function r(t){return encodeURI(t)}(t.fragment):"")},t}(),W=new G;function B(t){return t.segments.map((function(t){return K(t)})).join("/")}function V(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Q(t){return V(t).replace(/%3B/gi,";")}function Y(t){return V(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Z(t){return decodeURIComponent(t)}function $(t){return Z(t.replace(/\+/g,"%20"))}function K(t){return""+Y(t.path)+function e(t){return Object.keys(t).map((function(e){return";"+Y(e)+"="+Y(t[e])})).join("")}(t.parameters)}var J=/^[^\/()?;=#]+/;function X(t){var e=t.match(J);return e?e[0]:""}var tt=/^[^=?&#]+/,et=/^[^?&#]+/,rt=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 z([],{}):new z([],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 z(t,e)),r},t.prototype.parseSegment=function(){var t=X(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new Error("Empty path url segment cannot have parameters: '"+this.remaining+"'.");return this.capture(t),new D(Z(t),this.parseMatrixParams())},t.prototype.parseMatrixParams=function(){for(var t={};this.consumeOptional(";");)this.parseParam(t);return t},t.prototype.parseParam=function(t){var e=X(this.remaining);if(e){this.capture(e);var r="";if(this.consumeOptional("=")){var n=X(this.remaining);n&&this.capture(r=n)}t[Z(e)]=Z(r)}},t.prototype.parseQueryParam=function(t){var e=function r(t){var e=t.match(tt);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(et);return e?e[0]:""}(this.remaining);i&&this.capture(n=i)}var a=$(e),u=$(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=X(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 z([],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}(),nt=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=it(t,this._root);return e?e.children.map((function(t){return t.value})):[]},t.prototype.firstChild=function(t){var e=it(t,this._root);return e&&e.children.length>0?e.children[0].value:null},t.prototype.siblings=function(t){var e=ot(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 ot(t,this._root).map((function(t){return t.value}))},t}();function it(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=it(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 ot(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=ot(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 at=function(){function t(t,e){this.value=t,this.children=e}return t.prototype.toString=function(){return"TreeNode("+this.value+")"},t}();function ut(t){var e={};return t&&t.children.forEach((function(t){return e[t.value.outlet]=t})),e}var st=function(t){function e(e,r){var n=t.call(this,e)||this;return n.snapshot=r,dt(n,e),n}return a(e,t),e.prototype.toString=function(){return this.snapshot.toString()},e}(nt);function ct(t,e){var r=function i(t,e){var r=new ht([],{},{},"",{},"primary",e,null,t.root,-1,{});return new ft("",new at(r,[]))}(t,e),o=new n.BehaviorSubject([new D("",{})]),a=new n.BehaviorSubject({}),u=new n.BehaviorSubject({}),s=new n.BehaviorSubject({}),c=new n.BehaviorSubject(""),l=new lt(o,a,s,c,u,"primary",e,r.root);return l.snapshot=r.root,new st(new at(l,[]),r)}var lt=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 _(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 _(t)})))),this._queryParamMap},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return this.snapshot?this.snapshot.toString():"Future("+this._futureSnapshot+")"},t}();function pt(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 ht=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=_(this.params)),this._paramMap},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"queryParamMap",{get:function(){return this._queryParamMap||(this._queryParamMap=_(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}(),ft=function(t){function e(e,r){var n=t.call(this,r)||this;return n.url=e,dt(n,r),n}return a(e,t),e.prototype.toString=function(){return gt(this._root)},e}(nt);function dt(t,e){e.value._routerState=t,e.children.forEach((function(e){return dt(t,e)}))}function gt(t){var e=t.children.length>0?" { "+t.children.map(gt).join(", ")+" } ":"";return""+t.value+e}function vt(t){if(t.snapshot){var e=t.snapshot,r=t._futureSnapshot;t.snapshot=r,T(e.queryParams,r.queryParams)||t.queryParams.next(r.queryParams),e.fragment!==r.fragment&&t.fragment.next(r.fragment),T(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(!T(t[r],e[r]))return!1;return!0}(e.url,r.url)||t.url.next(r.url),T(e.data,r.data)||t.data.next(r.data)}else t.snapshot=t._futureSnapshot,t.data.next(t._futureSnapshot.data)}function mt(t,e){return T(t.params,e.params)&&function r(t,e){return H(t,e)&&t.every((function(t,r){return T(t.parameters,e[r].parameters)}))}(t.url,e.url)&&!(!t.parent!=!e.parent)&&(!t.parent||mt(t.parent,e.parent))}function yt(t){return"object"==typeof t&&null!=t&&!t.outlets&&!t.segmentPath}function St(t){return"object"==typeof t&&null!=t&&t.outlets}function bt(t,e,r,n,i){var o={};return n&&L(n,(function(t,e){o[e]=Array.isArray(t)?t.map((function(t){return""+t})):""+t})),new q(r.root===t?e:function t(e,r,n){var i={};return L(e.children,(function(e,o){i[o]=e===r?n:t(e,r,n)})),new z(e.segments,i)}(r.root,t,e),o,i)}var Ct=function(){function t(t,e,r){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=r,t&&r.length>0&&yt(r[0]))throw new Error("Root segment cannot have matrix parameters");var n=r.find(St);if(n&&n!==I(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}(),wt=function wt(t,e,r){this.segmentGroup=t,this.processChildren=e,this.index=r};function Rt(t,e,r){if(t||(t=new z([],{})),0===t.segments.length&&t.hasChildren())return Ot(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=r[n];if(St(u))break;var s=""+u,c=n<r.length-1?r[n+1]:null;if(i>0&&void 0===s)break;if(s&&c&&"object"==typeof c&&void 0===c.outlets){if(!_t(s,c,a))return o;n+=2}else{if(!_t(s,{},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 z(t.segments.slice(0,n.pathIndex),{});return a.children.primary=new z(t.segments.slice(n.pathIndex),t.children),Ot(a,0,o)}return n.match&&0===o.length?new z(t.segments,{}):n.match&&!t.hasChildren()?Ut(t,e,r):n.match?Ot(t,0,o):Ut(t,e,r)}function Ot(t,e,r){if(0===r.length)return new z(t.segments,{});var n=function i(t){var e;return St(t[0])?t[0].outlets:((e={}).primary=t,e)}(r),o={};return L(n,(function(r,n){"string"==typeof r&&(r=[r]),null!==r&&(o[n]=Rt(t.children[n],e,r))})),L(t.children,(function(t,e){void 0===n[e]&&(o[e]=t)})),new z(t.segments,o)}function Ut(t,e,r){for(var n=t.segments.slice(0,e),i=0;i<r.length;){var o=r[i];if(St(o)){var a=Pt(o.outlets);return new z(n,a)}if(0===i&&yt(r[0]))n.push(new D(t.segments[e].path,r[0])),i++;else{var u=St(o)?o.outlets.primary:""+o,s=i<r.length-1?r[i+1]:null;u&&s&&yt(s)?(n.push(new D(u,xt(s))),i+=2):(n.push(new D(u,{})),i++)}}return new z(n,{})}function Pt(t){var e={};return L(t,(function(t,r){"string"==typeof t&&(t=[t]),null!==t&&(e[r]=Ut(new z([],{}),0,t))})),e}function xt(t){var e={};return L(t,(function(t,r){return e[r]=""+t})),e}function _t(t,e,r){return t==r.path&&T(e,r.parameters)}var jt=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),vt(this.futureState.root),this.activateChildRoutes(e,r,t)},t.prototype.deactivateChildRoutes=function(t,e,r){var n=this,i=ut(e);t.children.forEach((function(t){var e=t.value.outlet;n.deactivateRoutes(t,i[e],r),delete i[e]})),L(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,n,i=e.getContext(t.value.outlet),o=i&&t.value.component?i.children:e,a=ut(t);try{for(var s=u(Object.keys(a)),c=s.next();!c.done;c=s.next())this.deactivateRouteAndItsChildren(a[c.value],o)}catch(t){r={error:t}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}i&&i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated())},t.prototype.activateChildRoutes=function(t,e,r){var n=this,i=ut(e);t.children.forEach((function(t){n.activateRoutes(t,i[t.value.outlet],r),n.forwardEvent(new U(t.value.snapshot))})),t.children.length&&this.forwardEvent(new R(t.value.snapshot))},t.prototype.activateRoutes=function(t,e,r){var n=t.value,i=e?e.value:null;if(vt(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),At(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}
36
36
  /**
37
37
  * @license
38
38
  * Copyright Google LLC All Rights Reserved.
@@ -150,7 +150,7 @@ var Ge=[Me,ke,Ee,Le,It],We=new r.InjectionToken("ROUTER_CONFIGURATION"),Be=new r
150
150
  *
151
151
  * Use of this source code is governed by an MIT-style license that can be
152
152
  * found in the LICENSE file at https://angular.io/license
153
- */var ur=new r.Version("11.0.7");
153
+ */var ur=new r.Version("11.0.8");
154
154
  /**
155
155
  * @license
156
156
  * Copyright Google LLC All Rights Reserved.