homebridge-config-ui-x
Version:
A web based management, configuration and control platform for Homebridge.
1 lines • 80.9 kB
JavaScript
import{a as E$1,o as w,s as x$1}from"./chunk-D39XL-zh.js";import{$r as wr,A as Ev,An as bt$1,B as Ht,Bn as en,Bt as Tt$1,Cr as pm,Dr as r$,E as Dy,En as at$1,F as GD,Fn as cy,Gn as gc,Gr as uy,Gt as Ue$1,H as I,Hr as ue$1,Ht as UI,Jt as VT,K as J$1,L as Gt$1,Lr as tc,Nn as cp,O as Ei$1,Ot as S$1,P as G$1,Pn as ct$1,Pt as So$1,Qn as i$,Qr as wn$1,Qt as Vt$1,Rt as Te,S as Cs,T as Db,Tn as ac,Un as g,Ur as ur$1,Vn as eu,Wr as ut$1,Xt as Vn$1,Yn as hc,_r as oc,ar as jt,at as Mn$1,ct as NE,dn as Yr,er as ie,et as Li$1,fn as Z$1,ft as O_,h as Br,hr as nc,ii as xe$1,in as X8,jn as bw,jr as rv,kr as rd,l as Ae$1,li as yr$1,lr as m$1,m as Bn$1,mr as my,mt as P,ni as x$2,on as Xe,ot as Mo$1,pi as ze$1,rt as MU,s as AD,si as yE,ur as mE,v as C,vn as _o$1,vr as oe$1,wr as q$1,wt as Qt$1,x as Cr,xn as _y,xr as pe$1,xt as Qe,yn as _s,yt as Q,z as HT,zn as eE,zt as Ts}from"./chunk-D96TCRAL.js";var f=`primary`;var qe=Symbol(`RouteTitle`);var Qt=class{params;constructor(n){this.params=n||{}}has(n){return Object.prototype.hasOwnProperty.call(this.params,n)}get(n){if(this.has(n)){let e=this.params[n];return Array.isArray(e)?e[0]:e}return null}getAll(n){if(this.has(n)){let e=this.params[n];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}};function ae(t){return new Qt(t)}function Bt(t,n,e){for(let r=0;r<t.length;r++){let i=t[r],o=n[r];if(i[0]===`:`)e[i.substring(1)]=o;else if(i!==o.path)return!1}return!0}function dn(t,n,e){let r=e.path.split(`/`),i=r.indexOf(`**`);if(i===-1){if(r.length>t.length||e.pathMatch===`full`&&(n.hasChildren()||r.length<t.length))return null;let s={},u=t.slice(0,r.length);return Bt(r,u,s)?{consumed:u,posParams:s}:null}if(i!==r.lastIndexOf(`**`))return null;let o=r.slice(0,i),a=r.slice(i+1);if(o.length+a.length>t.length||e.pathMatch===`full`&&n.hasChildren()&&e.path!==`**`)return null;let c={};return!Bt(o,t.slice(0,o.length),c)||!Bt(a,t.slice(t.length-a.length),c)?null:{consumed:t,posParams:c}}function ct(t){return new Promise((n,e)=>{t.pipe(mE()).subscribe({next:r=>n(r),error:r=>e(r)})})}function ri(t,n){if(t.length!==n.length)return!1;for(let e=0;e<t.length;++e)if(!q(t[e],n[e]))return!1;return!0}function q(t,n){let e=t?Kt(t):void 0,r=n?Kt(n):void 0;if(!e||!r||e.length!=r.length)return!1;let i;for(let o=0;o<e.length;o++)if(i=e[o],!fn(t[i],n[i]))return!1;return!0}function Kt(t){return[...Object.keys(t),...Object.getOwnPropertySymbols(t)]}function fn(t,n){if(Array.isArray(t)&&Array.isArray(n)){if(t.length!==n.length)return!1;let e=[...t].sort(),r=[...n].sort();return e.every((i,o)=>r[o]===i)}else return t===n}function ni(t){return t.length>0?t[t.length-1]:null}function ce(t){return Bn$1(t)?t:tc(t)?bt$1(Promise.resolve(t)):ze$1(t)}function pn(t){return Bn$1(t)?ct(t):Promise.resolve(t)}var ii={exact:vn,subset:mn};var gn={exact:oi,subset:ai,ignored:()=>!0};var ur={paths:`exact`,fragment:`ignored`,matrixParams:`ignored`,queryParams:`exact`};var ve={paths:`subset`,fragment:`ignored`,matrixParams:`ignored`,queryParams:`subset`};function lr(t,n,e){let r=t instanceof E?t:n.parseUrl(t);return J$1(()=>Yt(n.lastSuccessfulNavigation()?.finalUrl??new E,r,w(w({},ve),e)))}function Yt(t,n,e){return ii[e.paths](t.root,n.root,e.matrixParams)&&gn[e.queryParams](t.queryParams,n.queryParams)&&!(e.fragment===`exact`&&t.fragment!==n.fragment)}function oi(t,n){return q(t,n)}function vn(t,n,e){if(!oe(t.segments,n.segments)||!ot(t.segments,n.segments,e)||t.numberOfChildren!==n.numberOfChildren)return!1;for(let r in n.children)if(!t.children[r]||!vn(t.children[r],n.children[r],e))return!1;return!0}function ai(t,n){return Object.keys(n).length<=Object.keys(t).length&&Object.keys(n).every(e=>fn(t[e],n[e]))}function mn(t,n,e){return yn(t,n,n.segments,e)}function yn(t,n,e,r){if(t.segments.length>e.length){let i=t.segments.slice(0,e.length);return!(!oe(i,e)||n.hasChildren()||!ot(i,e,r))}else if(t.segments.length===e.length){if(!oe(t.segments,e)||!ot(t.segments,e,r))return!1;for(let i in n.children)if(!t.children[i]||!mn(t.children[i],n.children[i],r))return!1;return!0}else{let i=e.slice(0,t.segments.length),o=e.slice(t.segments.length);return!oe(t.segments,i)||!ot(t.segments,i,r)||!t.children[f]?!1:yn(t.children[f],n,o,r)}}function ot(t,n,e){return n.every((r,i)=>gn[e](t[i].parameters,r.parameters))}var E=class{root;queryParams;fragment;_queryParamMap;constructor(n=new m([],{}),e={},r=null){this.root=n,this.queryParams=e,this.fragment=r}get queryParamMap(){return this._queryParamMap??=ae(this.queryParams),this._queryParamMap}toString(){return ui.serialize(this)}};var m=class{segments;children;parent=null;constructor(n,e){this.segments=n,this.children=e,Object.values(e).forEach(r=>r.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return at(this)}};var Y=class{path;parameters;_parameterMap;constructor(n,e){this.path=n,this.parameters=e}get parameterMap(){return this._parameterMap??=ae(this.parameters),this._parameterMap}toString(){return Sn(this)}};function si(t,n){return oe(t,n)&&t.every((e,r)=>q(e.parameters,n[r].parameters))}function oe(t,n){return t.length!==n.length?!1:t.every((e,r)=>e.path===n[r].path)}function ci(t,n){let e=[];return Object.entries(t.children).forEach(([r,i])=>{r===f&&(e=e.concat(n(i,r)))}),Object.entries(t.children).forEach(([r,i])=>{r!==f&&(e=e.concat(n(i,r)))}),e}var ue=(()=>{class t{static ɵfac=function(r){return new(r||t)};static ɵprov=Qe({token:t,factory:()=>new Z})}return t})();var Z=class{parse(n){let e=new Jt(n);return new E(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(n){let e=`/${Ue(n.root,!0)}`;if(e.startsWith(`//`))throw new m$1(4019,!1);return`${e}${di(n.queryParams)}${typeof n.fragment==`string`?`#${li(n.fragment)}`:``}`}};var ui=new Z;function at(t){return t.segments.map(n=>Sn(n)).join(`/`)}function Ue(t,n){if(!t.hasChildren())return at(t);if(n){let e=t.children[f]?Ue(t.children[f],!1):``,r=[];return Object.entries(t.children).forEach(([i,o])=>{i!==f&&r.push(`${i}:${Ue(o,!1)}`)}),r.length>0?`${e}(${r.join(`//`)})`:e}else{let e=ci(t,(r,i)=>i===f?[Ue(t.children[f],!1)]:[`${i}:${Ue(r,!1)}`]);return Object.keys(t.children).length===1&&t.children[f]!=null?`${at(t)}/${e[0]}`:`${at(t)}/(${e.join(`//`)})`}}function Rn(t){return encodeURIComponent(t).replace(/%40/g,`@`).replace(/%3A/gi,`:`).replace(/%24/g,`$`).replace(/%2C/gi,`,`)}function nt(t){return Rn(t).replace(/%3B/gi,`;`)}function li(t){return encodeURI(t)}function Zt(t){return Rn(t).replace(/\(/g,`%28`).replace(/\)/g,`%29`).replace(/%26/gi,`&`)}function st(t){return decodeURIComponent(t)}function on(t){return st(t.replace(/\+/g,`%20`))}function Sn(t){return`${Zt(t.path)}${hi(t.parameters)}`}function hi(t){return Object.entries(t).map(([n,e])=>`;${Zt(n)}=${Zt(e)}`).join(``)}function di(t){let n=Object.entries(t).map(([e,r])=>Array.isArray(r)?r.map(i=>`${nt(e)}=${nt(i)}`).join(`&`):`${nt(e)}=${nt(r)}`).filter(e=>e);return n.length?`?${n.join(`&`)}`:``}var fi=/^[^\/()?;#]+/;function Vt(t){let n=t.match(fi);return n?n[0]:``}var pi=/^[^\/()?;=#]+/;function gi(t){let n=t.match(pi);return n?n[0]:``}var vi=/^[^=?&#]+/;function mi(t){let n=t.match(vi);return n?n[0]:``}var yi=/^[^&#]+/;function Ri(t){let n=t.match(yi);return n?n[0]:``}var Jt=class{url;remaining;constructor(n){this.url=n,this.remaining=n}parseRootSegment(){for(;this.consumeOptional(`/`););return this.remaining===``||this.peekStartsWith(`?`)||this.peekStartsWith(`#`)?new m([],{}):new m([],this.parseChildren())}parseQueryParams(){let n={};if(this.consumeOptional(`?`))do this.parseQueryParam(n);while(this.consumeOptional(`&`));return n}parseFragment(){return this.consumeOptional(`#`)?decodeURIComponent(this.remaining):null}parseChildren(n=0){if(n>50)throw new m$1(4010,!1);if(this.remaining===``)return{};this.consumeOptional(`/`);let e=[];for(this.peekStartsWith(`(`)||e.push(this.parseSegment());this.peekStartsWith(`/`)&&!this.peekStartsWith(`//`)&&!this.peekStartsWith(`/(`);)this.capture(`/`),e.push(this.parseSegment());let r={};this.peekStartsWith(`/(`)&&(this.capture(`/`),r=this.parseParens(!0,n));let i={};return this.peekStartsWith(`(`)&&(i=this.parseParens(!1,n)),(e.length>0||Object.keys(r).length>0)&&(i[f]=new m(e,r)),i}parseSegment(){let n=Vt(this.remaining);if(n===``&&this.peekStartsWith(`;`))throw new m$1(4009,!1);return this.capture(n),new Y(st(n),this.parseMatrixParams())}parseMatrixParams(){let n={};for(;this.consumeOptional(`;`);)this.parseParam(n);return n}parseParam(n){let e=gi(this.remaining);if(!e)return;this.capture(e);let r=``;if(this.consumeOptional(`=`)){let i=Vt(this.remaining);i&&(r=i,this.capture(r))}n[st(e)]=st(r)}parseQueryParam(n){let e=mi(this.remaining);if(!e)return;this.capture(e);let r=``;if(this.consumeOptional(`=`)){let a=Ri(this.remaining);a&&(r=a,this.capture(r))}let i=on(e),o=on(r);if(Object.hasOwn(n,i)){let a=n[i];Array.isArray(a)||(a=[a],n[i]=a),a.push(o)}else n[i]=o}parseParens(n,e){let r=Object.create(null);for(this.capture(`(`);!this.consumeOptional(`)`)&&this.remaining.length>0;){let i=Vt(this.remaining),o=this.remaining[i.length];if(o!==`/`&&o!==`)`&&o!==`;`)throw new m$1(4010,!1);let a;i.indexOf(`:`)>-1?(a=i.slice(0,i.indexOf(`:`)),this.capture(a),this.capture(`:`)):n&&(a=f);let c=this.parseChildren(e+1);r[a??f]=Object.keys(c).length===1&&c[f]?c[f]:new m([],c),this.consumeOptional(`//`)}return r}peekStartsWith(n){return this.remaining.startsWith(n)}consumeOptional(n){return this.peekStartsWith(n)?(this.remaining=this.remaining.substring(n.length),!0):!1}capture(n){if(!this.consumeOptional(n))throw new m$1(4011,!1)}};function Cn(t){return t.segments.length>0?new m([],{[f]:t}):t}function wn(t){let n=Object.create(null);for(let[r,i]of Object.entries(t.children)){let o=wn(i);if(r===f&&o.segments.length===0&&o.hasChildren())for(let[a,c]of Object.entries(o.children))n[a]=c;else(o.segments.length>0||o.hasChildren())&&(n[r]=o)}return Si(new m(t.segments,n))}function Si(t){if(t.numberOfChildren===1&&t.children[f]){let n=t.children[f];return new m(t.segments.concat(n.segments),n.children)}return t}function J(t){return t instanceof E}function bn(t,n,e=null,r=null,i=new Z){return An(In(t),n,e,r,i)}function In(t){let n;function e(o){let a={};for(let s of o.children){let u=e(s);a[s.outlet]=u}let c=new m(o.url,a);return o===t&&(n=c),c}let i=Cn(e(t.root));return n??i}function An(t,n,e,r,i){let o=t;for(;o.parent;)o=o.parent;if(n.length===0)return Gt(o,o,o,e,r,i);let a=Ci(n);if(a.toRoot())return Gt(o,o,new m([],{}),e,r,i);let c=wi(a,o,t),s=c.processChildren?Pe(c.segmentGroup,c.index,a.commands):Tn(c.segmentGroup,c.index,a.commands);return Gt(o,c.segmentGroup,s,e,r,i)}function ut(t){return typeof t==`object`&&t!=null&&!t.outlets&&!t.segmentPath}function je(t){return typeof t==`object`&&t!=null&&t.outlets}function an(t,n,e){t||=`ɵ`;let r=new E;return r.queryParams={[t]:n},e.parse(e.serialize(r)).queryParams[t]}function Gt(t,n,e,r,i,o){let a={};for(let[u,d]of Object.entries(r??{}))a[u]=Array.isArray(d)?d.map(v=>an(u,v,o)):an(u,d,o);let c;t===n?c=e:c=En(t,n,e);return new E(Cn(wn(c)),a,i)}function En(t,n,e){let r=Object.create(null);return Object.entries(t.children).forEach(([i,o])=>{o===n?r[i]=e:r[i]=En(o,n,e)}),new m(t.segments,r)}var lt=class{isAbsolute;numberOfDoubleDots;commands;constructor(n,e,r){if(this.isAbsolute=n,this.numberOfDoubleDots=e,this.commands=r,n&&r.length>0&&ut(r[0]))throw new m$1(4003,!1);let i=r.find(je);if(i&&i!==ni(r))throw new m$1(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]==`/`}};function Ci(t){if(typeof t[0]==`string`&&t.length===1&&t[0]===`/`)return new lt(!0,0,t);let n=0,e=!1,r=t.reduce((i,o,a)=>{if(typeof o==`object`&&o!=null){if(o.outlets){let c={};return Object.entries(o.outlets).forEach(([s,u])=>{c[s]=typeof u==`string`?u.split(`/`):u}),[...i,{outlets:c}]}if(o.segmentPath)return[...i,o.segmentPath]}return typeof o!=`string`?[...i,o]:a===0?(o.split(`/`).forEach((c,s)=>{s==0&&c===`.`||(s==0&&c===``?e=!0:c===`..`?n++:c!=``&&i.push(c))}),i):[...i,o]},[]);return new lt(e,n,r)}var fe=class{segmentGroup;processChildren;index;constructor(n,e,r){this.segmentGroup=n,this.processChildren=e,this.index=r}};function wi(t,n,e){if(t.isAbsolute)return new fe(n,!0,0);if(!e)return new fe(n,!1,NaN);if(e.parent===null)return new fe(e,!0,0);let r=ut(t.commands[0])?0:1;return bi(e,e.segments.length-1+r,t.numberOfDoubleDots)}function bi(t,n,e){let r=t,i=n,o=e;for(;o>i;){if(o-=i,r=r.parent,!r)throw new m$1(4005,!1);i=r.segments.length}return new fe(r,!1,i-o)}function Ii(t){return je(t[0])?t[0].outlets:{[f]:t}}function Tn(t,n,e){if(t??=new m([],{}),t.segments.length===0&&t.hasChildren())return Pe(t,n,e);let r=Ai(t,n,e),i=e.slice(r.commandIndex);if(r.match&&r.pathIndex<t.segments.length){let o=new m(t.segments.slice(0,r.pathIndex),{});return o.children[f]=new m(t.segments.slice(r.pathIndex),t.children),Pe(o,0,i)}else return r.match&&i.length===0?new m(t.segments,{}):r.match&&!t.hasChildren()?Xt(t,n,e):r.match?Pe(t,0,i):Xt(t,n,e)}function Pe(t,n,e){if(e.length===0)return new m(t.segments,{});{let r=Ii(e),i=Object.create(null);if(Object.keys(r).some(o=>o!==f)&&t.children[f]&&t.numberOfChildren===1&&t.children[f].segments.length===0){let o=Pe(t.children[f],n,e);return new m(t.segments,o.children)}return Object.entries(r).forEach(([o,a])=>{typeof a==`string`&&(a=[a]),a!==null&&(i[o]=Tn(t.children[o],n,a))}),Object.entries(t.children).forEach(([o,a])=>{r[o]===void 0&&(i[o]=a)}),new m(t.segments,i)}}function Ai(t,n,e){let r=0,i=n,o={match:!1,pathIndex:0,commandIndex:0};for(;i<t.segments.length;){if(r>=e.length)return o;let a=t.segments[i],c=e[r];if(je(c))break;let s=`${c}`,u=r<e.length-1?e[r+1]:null;if(i>0&&s===void 0)break;if(s&&u&&typeof u==`object`&&u.outlets===void 0){if(!cn(s,u,a))return o;r+=2}else{if(!cn(s,{},a))return o;r++}i++}return{match:!0,pathIndex:i,commandIndex:r}}function Xt(t,n,e){let r=t.segments.slice(0,n),i=0;for(;i<e.length;){let o=e[i];if(je(o))return new m(r,Ei(o.outlets));if(i===0&&ut(e[0])){let s=t.segments[n];r.push(new Y(s.path,sn(e[0]))),i++;continue}let a=je(o)?o.outlets[f]:`${o}`,c=i<e.length-1?e[i+1]:null;a&&c&&ut(c)?(r.push(new Y(a,sn(c))),i+=2):(r.push(new Y(a,{})),i++)}return new m(r,{})}function Ei(t){let n={};return Object.entries(t).forEach(([e,r])=>{typeof r==`string`&&(r=[r]),r!==null&&(n[e]=Xt(new m([],{}),0,r))}),n}function sn(t){let n={};return Object.entries(t).forEach(([e,r])=>n[e]=`${r}`),n}function cn(t,n,e){return t==e.path&&q(n,e.parameters)}var pe=`imperative`;var S=(function(t){return t[t.NavigationStart=0]=`NavigationStart`,t[t.NavigationEnd=1]=`NavigationEnd`,t[t.NavigationCancel=2]=`NavigationCancel`,t[t.NavigationError=3]=`NavigationError`,t[t.RoutesRecognized=4]=`RoutesRecognized`,t[t.ResolveStart=5]=`ResolveStart`,t[t.ResolveEnd=6]=`ResolveEnd`,t[t.GuardsCheckStart=7]=`GuardsCheckStart`,t[t.GuardsCheckEnd=8]=`GuardsCheckEnd`,t[t.RouteConfigLoadStart=9]=`RouteConfigLoadStart`,t[t.RouteConfigLoadEnd=10]=`RouteConfigLoadEnd`,t[t.ChildActivationStart=11]=`ChildActivationStart`,t[t.ChildActivationEnd=12]=`ChildActivationEnd`,t[t.ActivationStart=13]=`ActivationStart`,t[t.ActivationEnd=14]=`ActivationEnd`,t[t.Scroll=15]=`Scroll`,t[t.NavigationSkipped=16]=`NavigationSkipped`,t})(S||{});var O=class{id;url;constructor(n,e){this.id=n,this.url=e}};var X=class extends O{type=S.NavigationStart;navigationTrigger;restoredState;constructor(n,e,r=`imperative`,i=null){super(n,e),this.navigationTrigger=r,this.restoredState=i}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}};var k=class extends O{urlAfterRedirects;type=S.NavigationEnd;constructor(n,e,r){super(n,e),this.urlAfterRedirects=r}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}};var b=(function(t){return t[t.Redirect=0]=`Redirect`,t[t.SupersededByNewNavigation=1]=`SupersededByNewNavigation`,t[t.NoDataFromResolver=2]=`NoDataFromResolver`,t[t.GuardRejected=3]=`GuardRejected`,t[t.Aborted=4]=`Aborted`,t})(b||{});var me=(function(t){return t[t.IgnoredSameUrlNavigation=0]=`IgnoredSameUrlNavigation`,t[t.IgnoredByUrlHandlingStrategy=1]=`IgnoredByUrlHandlingStrategy`,t})(me||{});var x=class extends O{reason;code;type=S.NavigationCancel;constructor(n,e,r,i){super(n,e),this.reason=r,this.code=i}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}};function Mn(t){return t instanceof x&&(t.code===b.Redirect||t.code===b.SupersededByNewNavigation)}var B=class extends O{reason;code;type=S.NavigationSkipped;constructor(n,e,r,i){super(n,e),this.reason=r,this.code=i}};var se=class extends O{error;target;type=S.NavigationError;constructor(n,e,r,i){super(n,e),this.error=r,this.target=i}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}};var xe=class extends O{urlAfterRedirects;state;type=S.RoutesRecognized;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}};var ht=class extends O{urlAfterRedirects;state;type=S.GuardsCheckStart;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}};var dt=class extends O{urlAfterRedirects;state;shouldActivate;type=S.GuardsCheckEnd;constructor(n,e,r,i,o){super(n,e),this.urlAfterRedirects=r,this.state=i,this.shouldActivate=o}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}};var ft=class extends O{urlAfterRedirects;state;type=S.ResolveStart;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}};var pt=class extends O{urlAfterRedirects;state;type=S.ResolveEnd;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}};var gt=class{route;type=S.RouteConfigLoadStart;constructor(n){this.route=n}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}};var vt=class{route;type=S.RouteConfigLoadEnd;constructor(n){this.route=n}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}};var mt=class{snapshot;type=S.ChildActivationStart;constructor(n){this.snapshot=n}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||``}')`}};var yt=class{snapshot;type=S.ChildActivationEnd;constructor(n){this.snapshot=n}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||``}')`}};var Rt=class{snapshot;type=S.ActivationStart;constructor(n){this.snapshot=n}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||``}')`}};var St=class{snapshot;type=S.ActivationEnd;constructor(n){this.snapshot=n}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||``}')`}};var ye=class{routerEvent;position;anchor;scrollBehavior;type=S.Scroll;constructor(n,e,r,i){this.routerEvent=n,this.position=e,this.anchor=r,this.scrollBehavior=i}toString(){let n=this.position?`${this.position[0]}, ${this.position[1]}`:null;return`Scroll(anchor: '${this.anchor}', position: '${n}')`}};var Re=class{};var ke=class{};var Se=class{url;navigationBehaviorOptions;constructor(n,e){this.url=n,this.navigationBehaviorOptions=e}};function Ti(t){return!(t instanceof Re)&&!(t instanceof Se)&&!(t instanceof ke)}var Ct=class{rootInjector;outlet=null;route=null;children;attachRef=null;get injector(){return this.route?.snapshot._environmentInjector??this.rootInjector}constructor(n){this.rootInjector=n,this.children=new Ie(this.rootInjector)}};var Ie=(()=>{class t{rootInjector;contexts=new Map;constructor(e){this.rootInjector=e}onChildOutletCreated(e,r){let i=this.getOrCreateContext(e);i.outlet=r,this.contexts.set(e,i)}onChildOutletDestroyed(e){let r=this.getContext(e);r&&(r.outlet=null,r.attachRef=null)}onOutletDeactivated(){let e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let r=this.getContext(e);return r||(r=new Ct(this.rootInjector),this.contexts.set(e,r)),r}getContext(e){return this.contexts.get(e)||null}static ɵfac=function(r){return new(r||t)(x$2(Te))};static ɵprov=C({token:t,factory:t.ɵfac,providedIn:`root`})}return t})();var wt=class{_root;constructor(n){this._root=n}get root(){return this._root.value}parent(n){let e=this.pathFromRoot(n);return e.length>1?e[e.length-2]:null}children(n){let e=er(n,this._root);return e?e.children.map(r=>r.value):[]}firstChild(n){let e=er(n,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(n){let e=tr(n,this._root);return e.length<2?[]:e[e.length-2].children.map(i=>i.value).filter(i=>i!==n)}pathFromRoot(n){return tr(n,this._root).map(e=>e.value)}};function er(t,n){if(t===n.value)return n;for(let e of n.children){let r=er(t,e);if(r)return r}return null}function tr(t,n){if(t===n.value)return[n];for(let e of n.children){let r=tr(t,e);if(r.length)return r.unshift(n),r}return[]}var U=class{value;children;constructor(n,e){this.value=n,this.children=e}toString(){return`TreeNode(${this.value})`}};function de(t){let n={};return t&&t.children.forEach(e=>n[e.value.outlet]=e),n}var $e=class extends wt{snapshot;constructor(n,e){super(n),this.snapshot=e,dr(this,n)}toString(){return this.snapshot.toString()}};function Nn(t,n){let e=Mi(t,n),r=new So$1([new Y(``,{})]),i=new So$1({}),o=new So$1({}),s=new W(r,i,new So$1({}),new So$1(``),o,f,t,e.root);return s.snapshot=e.root,new $e(new U(s,[]),e)}function Mi(t,n){return new ze(``,new U(new Ce([],{},{},``,{},f,t,null,{},n),[]))}var W=class{urlSubject;paramsSubject;queryParamsSubject;fragmentSubject;dataSubject;outlet;component;snapshot;_futureSnapshot;_routerState;_paramMap;_queryParamMap;title;url;params;queryParams;fragment;data;_localInjector;constructor(n,e,r,i,o,a,c,s){this.urlSubject=n,this.paramsSubject=e,this.queryParamsSubject=r,this.fragmentSubject=i,this.dataSubject=o,this.outlet=a,this.component=c,this._futureSnapshot=s,this.title=this.dataSubject?.pipe(pe$1(u=>u[qe]))??ze$1(void 0),this.url=n,this.params=e,this.queryParams=r,this.fragment=i,this.data=o}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(pe$1(n=>ae(n))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(pe$1(n=>ae(n))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};var Ni=`always`;function hr(t,n,e){let r,{routeConfig:i}=t;return n!==null&&(e===`always`||i?.path===``||!n.component&&!n.routeConfig?.loadComponent)?r={params:w(w({},n.params),t.params),data:w(w({},n.data),t.data),resolve:w(w(w(w({},t.data),n.data),i?.data),t._resolvedData)}:r={params:w({},t.params),data:w({},t.data),resolve:w(w({},t.data),t._resolvedData??{})},i&&_n(i)&&(r.resolve[qe]=i.title),r}var Ce=class{url;params;queryParams;fragment;data;outlet;component;routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;_environmentInjector;get title(){return this.data?.[qe]}constructor(n,e,r,i,o,a,c,s,u,d){this.url=n,this.params=e,this.queryParams=r,this.fragment=i,this.data=o,this.outlet=a,this.component=c,this.routeConfig=s,this._resolve=u,this._environmentInjector=d}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=ae(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=ae(this.queryParams),this._queryParamMap}toString(){return`Route(url:'${this.url.map(r=>r.toString()).join(`/`)}', path:'${this.routeConfig?this.routeConfig.path:``}')`}};var ze=class extends wt{url;constructor(n,e){super(e),this.url=n,dr(this,e)}toString(){return Dn(this._root)}};function dr(t,n){n.value._routerState=t,n.children.forEach(e=>dr(t,e))}function Dn(t){let n=t.children.length>0?` { ${t.children.map(Dn).join(`, `)} } `:``;return`${t.value}${n}`}function Wt(t){if(t.snapshot){let n=t.snapshot,e=t._futureSnapshot;t.snapshot=e,q(n.queryParams,e.queryParams)||t.queryParamsSubject.next(e.queryParams),n.fragment!==e.fragment&&t.fragmentSubject.next(e.fragment),q(n.params,e.params)||t.paramsSubject.next(e.params),ri(n.url,e.url)||t.urlSubject.next(e.url),q(n.data,e.data)||t.dataSubject.next(e.data)}else t.snapshot=t._futureSnapshot,t.dataSubject.next(t._futureSnapshot.data)}function rr(t,n){let e=q(t.params,n.params)&&si(t.url,n.url),r=!t.parent!=!n.parent;return e&&!r&&(!t.parent||rr(t.parent,n.parent))}function _n(t){return typeof t.title==`string`||t.title===null}var Un=new I(``);var fr=(()=>{class t{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=f;activateEvents=new Ht;deactivateEvents=new Ht;attachEvents=new Ht;detachEvents=new Ht;routerOutletData=i$();parentContexts=g(Ie);location=g(wr);changeDetector=g(hc);inputBinder=g(Et,{optional:!0});supportsBindingToComponentInputs=!0;ngOnChanges(e){if(e.name){let{firstChange:r,previousValue:i}=e.name;if(r)return;this.isTrackedInParentContexts(i)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(i)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(e){return this.parentContexts.getContext(e)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let e=this.parentContexts.getContext(this.name);e?.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new m$1(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new m$1(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new m$1(4012,!1);this.location.detach();let e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,r){this.activated=e,this._activatedRoute=r,this.location.insert(e.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){let e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,r){if(this.isActivated)throw new m$1(4013,!1);this._activatedRoute=e;let i=this.location,a=e.snapshot.component,c=this.parentContexts.getOrCreateContext(this.name).children,s=new nr(e,c,i.injector,this.routerOutletData);this.activated=i.createComponent(a,{index:i.length,injector:s,environmentInjector:r}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static ɵfac=function(r){return new(r||t)};static ɵdir=Mn$1({type:t,selectors:[[`router-outlet`]],inputs:{name:`name`,routerOutletData:[1,`routerOutletData`]},outputs:{activateEvents:`activate`,deactivateEvents:`deactivate`,attachEvents:`attach`,detachEvents:`detach`},exportAs:[`outlet`],features:[Ei$1]})}return t})();var nr=class{route;childContexts;parent;outletData;constructor(n,e,r,i){this.route=n,this.childContexts=e,this.parent=r,this.outletData=i}get(n,e){return n===W?this.route:n===Ie?this.childContexts:n===Un?this.outletData:this.parent.get(n,e)}};var Et=new I(``);var pr=(()=>{class t{static ɵfac=function(r){return new(r||t)};static ɵcmp=nc({type:t,selectors:[[`ng-component`]],exportAs:[`emptyRouterOutlet`],decls:1,vars:0,template:function(r,i){r&1&&Dy(0,`router-outlet`)},dependencies:[fr],encapsulation:2,changeDetection:1})}return t})();function gr(t){let n=t.children&&t.children.map(gr),e=n?x$1(w({},t),{children:n}):w({},t);return!e.component&&!e.loadComponent&&(n||e.loadChildren)&&e.outlet&&e.outlet!==f&&(e.component=pr),e}function Di(t,n,e){let r=new Set;return{newlyCreatedRoutes:r,state:new $e(He(t,n._root,e?e._root:void 0,r),n)}}function He(t,n,e,r){if(e&&t.shouldReuseRoute(n.value,e.value.snapshot)){let i=e.value;i._futureSnapshot=n.value;return new U(i,_i(t,n,e,r))}else{if(t.shouldAttach(n.value)){let a=t.retrieve(n.value);if(a!==null){let c=a.route;return c.value._futureSnapshot=n.value,c.children=n.children.map(s=>He(t,s,void 0,r)),c}}let i=Ui(n.value);r.add(i);return new U(i,n.children.map(a=>He(t,a,void 0,r)))}}function _i(t,n,e,r){return n.children.map(i=>{for(let o of e.children)if(t.shouldReuseRoute(i.value,o.value.snapshot))return He(t,i,o,r);return He(t,i,void 0,r)})}function Ui(t){return new W(new So$1(t.url),new So$1(t.params),new So$1(t.queryParams),new So$1(t.fragment),new So$1(t.data),t.outlet,t.component,t)}var we=class{redirectTo;navigationBehaviorOptions;constructor(n,e){this.redirectTo=n,this.navigationBehaviorOptions=e}};var On=`ngNavigationCancelingError`;function bt(t,n){let{redirectTo:e,navigationBehaviorOptions:r}=J(n)?{redirectTo:n,navigationBehaviorOptions:void 0}:n,i=Pn(!1,b.Redirect);return i.url=e,i.navigationBehaviorOptions=r,i}function Pn(t,n){let e=new Error(`NavigationCancelingError: ${t||``}`);return e[On]=!0,e.cancellationCode=n,e}function Oi(t){return Ln(t)&&J(t.url)}function Ln(t){return!!t&&t[On]}var ir=class{routeReuseStrategy;futureState;currState;forwardEvent;inputBindingEnabled;constructor(n,e,r,i,o){this.routeReuseStrategy=n,this.futureState=e,this.currState=r,this.forwardEvent=i,this.inputBindingEnabled=o}activate(n){let e=this.futureState._root,r=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,r,n),Wt(this.futureState.root),this.activateChildRoutes(e,r,n)}deactivateChildRoutes(n,e,r){let i=de(e);n.children.forEach(o=>{let a=o.value.outlet;this.deactivateRoutes(o,i[a],r),delete i[a]}),Object.values(i).forEach(o=>{this.deactivateRouteAndItsChildren(o,r)})}deactivateRoutes(n,e,r){let i=n.value,o=e?e.value:null;if(i===o)if(i.component){let a=r.getContext(i.outlet);a&&this.deactivateChildRoutes(n,e,a.children)}else this.deactivateChildRoutes(n,e,r);else o&&this.deactivateRouteAndItsChildren(e,r)}deactivateRouteAndItsChildren(n,e){n.value.component&&this.routeReuseStrategy.shouldDetach(n.value.snapshot)?this.detachAndStoreRouteSubtree(n,e):this.deactivateRouteAndOutlet(n,e)}detachAndStoreRouteSubtree(n,e){let r=e.getContext(n.value.outlet),i=r&&n.value.component?r.children:e,o=de(n);for(let a of Object.values(o))this.deactivateRouteAndItsChildren(a,i);if(r&&r.outlet){let a=r.outlet.detach(),c=r.children.onOutletDeactivated();this.routeReuseStrategy.store(n.value.snapshot,{componentRef:a,route:n,contexts:c})}}deactivateRouteAndOutlet(n,e){let r=e.getContext(n.value.outlet),i=r&&n.value.component?r.children:e,o=de(n);for(let a of Object.values(o))this.deactivateRouteAndItsChildren(a,i);r&&(r.outlet&&(r.outlet.deactivate(),r.children.onOutletDeactivated()),r.attachRef=null,r.route=null),n.value._localInjector?.destroy()}activateChildRoutes(n,e,r){let i=de(e);n.children.forEach(o=>{this.activateRoutes(o,i[o.value.outlet],r),this.forwardEvent(new St(o.value.snapshot))}),n.children.length&&this.forwardEvent(new yt(n.value.snapshot))}activateRoutes(n,e,r){let i=n.value,o=e?e.value:null;if(Wt(i),i===o)if(i.component){let a=r.getOrCreateContext(i.outlet);this.activateChildRoutes(n,e,a.children)}else this.activateChildRoutes(n,e,r);else if(i.component){let a=r.getOrCreateContext(i.outlet);if(this.routeReuseStrategy.shouldAttach(i.snapshot)){let c=this.routeReuseStrategy.retrieve(i.snapshot);this.routeReuseStrategy.store(i.snapshot,null),a.children.onOutletReAttached(c.contexts),a.attachRef=c.componentRef,a.route=c.route.value,a.outlet&&a.outlet.attach(c.componentRef,c.route.value),Wt(c.route.value),this.activateChildRoutes(n,null,a.children)}else a.attachRef=null,a.route=i,a.outlet&&a.outlet.activateWith(i,a.injector),this.activateChildRoutes(n,null,a.children)}else this.activateChildRoutes(n,null,r)}};var It=class{path;route;constructor(n){this.path=n,this.route=this.path[this.path.length-1]}};var ge=class{component;route;constructor(n,e){this.component=n,this.route=e}};function Pi(t,n,e){let r=t._root;return Oe(r,n?n._root:null,e,[r.value])}function Li(t){let n=t.routeConfig?t.routeConfig.canActivateChild:null;return!n||n.length===0?null:{node:t,guards:n}}function Ae(t,n){let e=Symbol(),r=n.get(t,e);return r===e?typeof t==`function`&&!NE(t)?t:n.get(t):r}function Oe(t,n,e,r,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=de(n);return t.children.forEach(a=>{ji(a,o[a.value.outlet],e,r.concat([a.value]),i),delete o[a.value.outlet]}),Object.entries(o).forEach(([a,c])=>Le(c,e.getContext(a),i)),i}function ji(t,n,e,r,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=t.value,a=n?n.value:null,c=e?e.getContext(t.value.outlet):null;if(a&&o.routeConfig===a.routeConfig){let s=xi(a,o,o.routeConfig.runGuardsAndResolvers);s?i.canActivateChecks.push(new It(r)):(o.data=a.data,o._resolvedData=a._resolvedData),o.component?Oe(t,n,c?c.children:null,r,i):Oe(t,n,e,r,i),s&&c&&c.outlet&&c.outlet.isActivated&&i.canDeactivateChecks.push(new ge(c.outlet.component,a))}else a&&Le(n,c,i),i.canActivateChecks.push(new It(r)),o.component?Oe(t,null,c?c.children:null,r,i):Oe(t,null,e,r,i);return i}function xi(t,n,e){if(typeof e==`function`)return Yr(n._environmentInjector,()=>e(t,n));switch(e){case`pathParamsChange`:return!oe(t.url,n.url);case`pathParamsOrQueryParamsChange`:return!oe(t.url,n.url)||!q(t.queryParams,n.queryParams);case`always`:return!0;case`paramsOrQueryParamsChange`:return!rr(t,n)||!q(t.queryParams,n.queryParams);default:return!rr(t,n)}}function Le(t,n,e){let r=de(t),i=t.value;Object.entries(r).forEach(([o,a])=>{i.component?n?Le(a,n.children.getContext(o),e):Le(a,null,e):Le(a,n,e)}),i.component?n&&n.outlet&&n.outlet.isActivated?e.canDeactivateChecks.push(new ge(n.outlet.component,i)):e.canDeactivateChecks.push(new ge(null,i)):e.canDeactivateChecks.push(new ge(null,i))}function Be(t){return typeof t==`function`}function ki(t){return typeof t==`boolean`}function $i(t){return t&&Be(t.canLoad)}function zi(t){return t&&Be(t.canActivate)}function Hi(t){return t&&Be(t.canActivateChild)}function Fi(t){return t&&Be(t.canDeactivate)}function qi(t){return t&&Be(t.canMatch)}function jn(t){return t instanceof jt||t?.name===`EmptyError`}var it=Symbol(`INITIAL_VALUE`);function be(){return Br(t=>eE(t.map(n=>n.pipe(Vt$1(1),cp(it)))).pipe(pe$1(n=>{for(let e of n)if(e!==!0){if(e===it)return it;if(e===!1||Bi(e))return e}return!0}),Tt$1(n=>n!==it),Vt$1(1)))}function Bi(t){return J(t)||t instanceof we}function xn(t){return t.aborted?ze$1(void 0).pipe(Vt$1(1)):new S$1(n=>{let e=()=>{n.next(),n.complete()};return t.addEventListener(`abort`,e),()=>t.removeEventListener(`abort`,e)})}function kn(t){return Ts(xn(t))}function Vi(t){return at$1(n=>{let{targetSnapshot:e,currentSnapshot:r,guards:{canActivateChecks:i,canDeactivateChecks:o}}=n;return o.length===0&&i.length===0?ze$1(x$1(w({},n),{guardsResult:!0})):Gi(o,e,r).pipe(at$1(a=>a&&ki(a)?Wi(e,i,t):ze$1(a)),pe$1(a=>x$1(w({},n),{guardsResult:a})))})}function Gi(t,n,e){return bt$1(t).pipe(at$1(r=>Ji(r.component,r.route,e,n)),mE(r=>r!==!0,!0))}function Wi(t,n,e){return bt$1(n).pipe(Mo$1(r=>ct$1(Ki(r.route.parent,e),Qi(r.route,e),Zi(t,r.path),Yi(t,r.route))),mE(r=>r!==!0,!0))}function Qi(t,n){return t!==null&&n&&n(new Rt(t)),ze$1(!0)}function Ki(t,n){return t!==null&&n&&n(new mt(t)),ze$1(!0)}function Yi(t,n){let e=n.routeConfig?n.routeConfig.canActivate:null;if(!e||e.length===0)return ze$1(!0);return ze$1(e.map(i=>Cs(()=>{let o=n._environmentInjector,a=Ae(i,o);return ce(zi(a)?a.canActivate(n,t):Yr(o,()=>a(n,t))).pipe(mE())}))).pipe(be())}function Zi(t,n){let e=n[n.length-1];return ze$1(n.slice(0,n.length-1).reverse().map(o=>Li(o)).filter(o=>o!==null).map(o=>Cs(()=>{return ze$1(o.guards.map(c=>{let s=o.node._environmentInjector,u=Ae(c,s);return ce(Hi(u)?u.canActivateChild(e,t):Yr(s,()=>u(e,t))).pipe(mE())})).pipe(be())}))).pipe(be())}function Ji(t,n,e,r){let i=n&&n.routeConfig?n.routeConfig.canDeactivate:null;if(!i||i.length===0)return ze$1(!0);return ze$1(i.map(a=>{let c=n._environmentInjector,s=Ae(a,c);return ce(Fi(s)?s.canDeactivate(t,n,e,r):Yr(c,()=>s(t,n,e,r))).pipe(mE())})).pipe(be())}function Xi(t,n,e,r,i){let o=n.canLoad;if(o===void 0||o.length===0)return ze$1(!0);return ze$1(o.map(c=>{let s=Ae(c,t),d=ce($i(s)?s.canLoad(n,e):Yr(t,()=>s(n,e)));return i?d.pipe(kn(i)):d})).pipe(be(),$n(r))}function $n(t){return AD(_s(n=>{if(typeof n!=`boolean`)throw bt(t,n)}),pe$1(n=>n===!0))}function eo(t,n,e,r,i,o){let a=n.canMatch;if(!a||a.length===0)return ze$1(!0);return ze$1(a.map(s=>{let u=Ae(s,t);return ce(qi(u)?u.canMatch(n,e,i):Yr(t,()=>u(n,e,i))).pipe(kn(o))})).pipe(be(),$n(r))}var G=class t extends Error{segmentGroup;constructor(n){super(),this.segmentGroup=n||null,Object.setPrototypeOf(this,t.prototype)}};var Fe=class t extends Error{urlTree;constructor(n){super(),this.urlTree=n,Object.setPrototypeOf(this,t.prototype)}};function to(t){throw new m$1(4e3,!1)}function ro(t){throw Pn(!1,b.GuardRejected)}var or=class{urlSerializer;urlTree;constructor(n,e){this.urlSerializer=n,this.urlTree=e}lineralizeSegments(n,e){return E$1(this,null,function*(){let r=[],i=e.root;for(;;){if(r=r.concat(i.segments),i.numberOfChildren===0)return r;if(i.numberOfChildren>1||!i.children[f])throw to(`${n.redirectTo}`);i=i.children[f]}})}applyRedirectCommands(n,e,r,i,o){return E$1(this,null,function*(){let a=yield no(e,i,o);if(a instanceof E)throw new Fe(a);let c=this.applyRedirectCreateUrlTree(a,this.urlSerializer.parse(a),n,r);if(a[0]===`/`)throw new Fe(c);return c})}applyRedirectCreateUrlTree(n,e,r,i){return new E(this.createSegmentGroup(n,e.root,r,i),this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(n,e){let r={};return Object.entries(n).forEach(([i,o])=>{if(typeof o==`string`&&o[0]===`:`){let c=o.substring(1);r[i]=e[c]}else r[i]=o}),r}createSegmentGroup(n,e,r,i){let o=this.createSegments(n,e.segments,r,i),a=Object.create(null);return Object.entries(e.children).forEach(([c,s])=>{a[c]=this.createSegmentGroup(n,s,r,i)}),new m(o,a)}createSegments(n,e,r,i){return e.map(o=>o.path[0]===`:`?this.findPosParam(n,o,i):this.findOrReturn(o,r))}findPosParam(n,e,r){let i=r[e.path.substring(1)];if(!i)throw new m$1(4001,!1);return i}findOrReturn(n,e){let r=0;for(let i of e){if(i.path===n.path)return e.splice(r),i;r++}return n}};function no(t,n,e){if(typeof t==`string`)return Promise.resolve(t);let r=t;return ct(ce(Yr(e,()=>r(n))))}function io(t,n){return t.providers&&!t._injector&&(t._injector=uy(t.providers,n,`Route: ${t.path}`)),t._injector??n}function H(t){return t.outlet||f}function oo(t,n){let e=t.filter(r=>H(r)===n);return e.push(...t.filter(r=>H(r)!==n)),e}var ar={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function zn(t){return{routeConfig:t.routeConfig,url:t.url,params:t.params,queryParams:t.queryParams,fragment:t.fragment,data:t.data,outlet:t.outlet,title:t.title,paramMap:t.paramMap,queryParamMap:t.queryParamMap}}function ao(t,n,e,r,i,o,a){let c=Hn(t,n,e);if(!c.matched)return ze$1(c);let s=zn(o(c));return r=io(n,r),eo(r,n,e,i,s,a).pipe(pe$1(u=>u===!0?c:w({},ar)))}function Hn(t,n,e){if(n.path===``)return n.pathMatch===`full`&&(t.hasChildren()||e.length>0)?w({},ar):{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};let i=(n.matcher||dn)(e,t,n);if(!i)return w({},ar);let o={};Object.entries(i.posParams??{}).forEach(([c,s])=>{o[c]=s.path});let a=i.consumed.length>0?w(w({},o),i.consumed[i.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:i.consumed,remainingSegments:e.slice(i.consumed.length),parameters:a,positionalParamSegments:i.posParams??{}}}function un(t,n,e,r,i){return e.length>0&&uo(t,e,r,i)?{segmentGroup:new m(n,co(r,new m(e,t.children))),slicedSegments:[]}:e.length===0&&lo(t,e,r)?{segmentGroup:new m(t.segments,so(t,e,r,t.children)),slicedSegments:e}:{segmentGroup:new m(t.segments,t.children),slicedSegments:e}}function so(t,n,e,r){let i={};for(let o of e)if(Tt(t,n,o)&&!r[H(o)]){let a=new m([],{});i[H(o)]=a}return w(w({},r),i)}function co(t,n){let e={};e[f]=n;for(let r of t)if(r.path===``&&H(r)!==f){let i=new m([],{});e[H(r)]=i}return e}function uo(t,n,e,r){return e.some(i=>!Tt(t,n,i)||!(H(i)!==f)?!1:!(r!==void 0&&H(i)===r))}function lo(t,n,e){return e.some(r=>Tt(t,n,r))}function Tt(t,n,e){return(t.hasChildren()||n.length>0)&&e.pathMatch===`full`?!1:e.path===``}function ho(t,n,e){return n.length===0&&!t.children[e]}var sr=class{};function fo(t,n,e,r,i,o,a,c){return E$1(this,null,function*(){return new cr(t,n,e,r,i,a,o,c).recognize()})}var po=31;var cr=class{injector;configLoader;rootComponentType;config;urlTree;paramsInheritanceStrategy;urlSerializer;abortSignal;applyRedirects;absoluteRedirectCount=0;allowRedirects=!0;constructor(n,e,r,i,o,a,c,s){this.injector=n,this.configLoader=e,this.rootComponentType=r,this.config=i,this.urlTree=o,this.paramsInheritanceStrategy=a,this.urlSerializer=c,this.abortSignal=s,this.applyRedirects=new or(this.urlSerializer,this.urlTree)}noMatchError(n){return new m$1(4002,`'${n.segmentGroup}'`)}recognize(){return E$1(this,null,function*(){let n=un(this.urlTree.root,[],[],this.config).segmentGroup,{children:e,rootSnapshot:r}=yield this.match(n),o=new ze(``,new U(r,e)),a=bn(r,[],this.urlTree.queryParams,this.urlTree.fragment);return a.queryParams=this.urlTree.queryParams,o.url=this.urlSerializer.serialize(a),{state:o,tree:a}})}match(n){return E$1(this,null,function*(){let e=new Ce([],Object.freeze({}),Object.freeze(w({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),f,this.rootComponentType,null,{},this.injector);try{return{children:yield this.processSegmentGroup(this.injector,this.config,n,f,e),rootSnapshot:e}}catch(r){if(r instanceof Fe)return this.urlTree=r.urlTree,this.match(r.urlTree.root);throw r instanceof G?this.noMatchError(r):r}})}processSegmentGroup(n,e,r,i,o){return E$1(this,null,function*(){if(r.segments.length===0&&r.hasChildren())return this.processChildren(n,e,r,o);let a=yield this.processSegment(n,e,r,r.segments,i,!0,o);return a instanceof U?[a]:[]})}processChildren(n,e,r,i){return E$1(this,null,function*(){let o=[];for(let s of Object.keys(r.children))s===`primary`?o.unshift(s):o.push(s);let a=[];for(let s of o){let u=r.children[s],d=oo(e,s),v=yield this.processSegmentGroup(n,d,u,s,i);a.push(...v)}let c=Fn(a);return go(c),c})}processSegment(n,e,r,i,o,a,c){return E$1(this,null,function*(){for(let s of e)try{return yield this.processSegmentAgainstRoute(s._injector??n,e,s,r,i,o,a,c)}catch(u){if(u instanceof G||jn(u))continue;throw u}if(ho(r,i,o))return new sr;throw new G(r)})}processSegmentAgainstRoute(n,e,r,i,o,a,c,s){return E$1(this,null,function*(){if(H(r)!==a&&(a===f||!Tt(i,o,r)))throw new G(i);if(r.redirectTo===void 0)return this.matchSegmentAgainstRoute(n,i,r,o,a,s);if(this.allowRedirects&&c)return this.expandSegmentAgainstRouteUsingRedirect(n,i,e,r,o,a,s);throw new G(i)})}expandSegmentAgainstRouteUsingRedirect(n,e,r,i,o,a,c){return E$1(this,null,function*(){let{matched:s,parameters:u,consumedSegments:d,positionalParamSegments:v,remainingSegments:g}=Hn(e,i,o);if(!s)throw new G(e);typeof i.redirectTo==`string`&&i.redirectTo[0]===`/`&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>po&&(this.allowRedirects=!1));let T=this.createSnapshot(n,i,o,u,c);if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);let $=yield this.applyRedirects.applyRedirectCommands(d,i.redirectTo,v,zn(T),n),ee=yield this.applyRedirects.lineralizeSegments(i,$);return this.processSegment(n,r,e,ee.concat(g),a,!1,c)})}createSnapshot(n,e,r,i,o){let a=new Ce(r,i,Object.freeze(w({},this.urlTree.queryParams)),this.urlTree.fragment,mo(e),H(e),e.component??e._loadedComponent??null,e,yo(e),n),c=hr(a,o,this.paramsInheritanceStrategy);return a.params=Object.freeze(c.params),a.data=Object.freeze(c.data),a}matchSegmentAgainstRoute(n,e,r,i,o,a){return E$1(this,null,function*(){if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);let c=te=>this.createSnapshot(n,r,te.consumedSegments,te.parameters,a),s=yield ct(ao(e,r,i,n,this.urlSerializer,c,this.abortSignal));if(r.path===`**`&&(e.children={}),!s?.matched)throw new G(e);n=r._injector??n;let{routes:u}=yield this.getChildConfig(n,r,i),d=r._loadedInjector??n,{parameters:v,consumedSegments:g,remainingSegments:T}=s,$=this.createSnapshot(n,r,g,v,a),{segmentGroup:ee,slicedSegments:Te}=un(e,g,T,u,o);if(Te.length===0&&ee.hasChildren())return new U($,yield this.processChildren(d,u,ee,$));if(u.length===0&&Te.length===0)return new U($,[]);let _t=H(r)===o,Ge=yield this.processSegment(d,u,ee,Te,_t?f:o,!0,$);return new U($,Ge instanceof U?[Ge]:[])})}getChildConfig(n,e,r){return E$1(this,null,function*(){if(e.children)return{routes:e.children,injector:n};if(e.loadChildren){if(e._loadedRoutes!==void 0){let o=e._loadedNgModuleFactory;return o&&!e._loadedInjector&&(e._loadedInjector=o.create(n).injector),{routes:e._loadedRoutes,injector:e._loadedInjector}}if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);if(yield ct(Xi(n,e,r,this.urlSerializer,this.abortSignal))){let o=yield this.configLoader.loadChildren(n,e);return e._loadedRoutes=o.routes,e._loadedInjector=o.injector,e._loadedNgModuleFactory=o.factory,o}throw ro(e)}return{routes:[],injector:n}})}};function go(t){t.sort((n,e)=>n.value.outlet===f?-1:e.value.outlet===f?1:n.value.outlet.localeCompare(e.value.outlet))}function vo(t){let n=t.value.routeConfig;return n&&n.path===``}function Fn(t){let n=[],e=new Set;for(let r of t){if(!vo(r)){n.push(r);continue}let i=n.find(o=>r.value.routeConfig===o.value.routeConfig);i!==void 0?(i.children.push(...r.children),e.add(i)):n.push(r)}for(let r of e){let i=Fn(r.children);n.push(new U(r.value,i))}return n.filter(r=>!e.has(r))}function mo(t){return t.data||{}}function yo(t){return t.resolve||{}}function Ro(t,n,e,r,i,o,a){return at$1(c=>E$1(null,null,function*(){let{state:s,tree:u}=yield fo(t,n,e,r,c.extractedUrl,i,o,a);return x$1(w({},c),{targetSnapshot:s,urlAfterRedirects:u})}))}function So(t){return at$1(n=>{let{targetSnapshot:e,guards:{canActivateChecks:r}}=n;if(!r.length)return ze$1(n);let i=new Set(r.map(c=>c.route)),o=new Set;for(let c of i)if(!o.has(c))for(let s of qn(c))o.add(s);let a=0;return bt$1(o).pipe(Mo$1(c=>i.has(c)?Co(c,e,t):(c.data=hr(c,c.parent,t).resolve,ze$1(void 0))),_s(()=>a++),yE(1),at$1(c=>a===o.size?ze$1(n):Ue$1))})}function qn(t){return[t,...t.children.map(e=>qn(e)).flat()]}function Co(t,n,e){let r=t.routeConfig,i=t._resolve;return r?.title!==void 0&&!_n(r)&&(i[qe]=r.title),Cs(()=>(t.data=hr(t,t.parent,e).resolve,wo(i,t,n).pipe(pe$1(o=>(t._resolvedData=o,t.data=w(w({},t.data),o),null)))))}function wo(t,n,e){let r=Kt(t);if(r.length===0)return ze$1({});let i={};return bt$1(r).pipe(at$1(o=>bo(t[o],n,e).pipe(mE(),_s(a=>{if(a instanceof we)throw bt(new Z,a);i[o]=a}))),yE(1),pe$1(()=>i),eu(o=>jn(o)?Ue$1:GD(o)))}function bo(t,n,e){let r=n._environmentInjector,i=Ae(t,r);return ce(i.resolve?i.resolve(n,e):Yr(r,()=>i(n,e)))}function ln(t){return Br(n=>{let e=t(n);return e?bt$1(e).pipe(pe$1(()=>n)):ze$1(n)})}var vr=(()=>{class t{buildTitle(e){let r,i=e.root;for(;i!==void 0;)r=this.getResolvedTitleForRoute(i)??r,i=i.children.find(o=>o.outlet===f);return r}getResolvedTitleForRoute(e){return e.data[qe]}static ɵfac=function(r){return new(r||t)};static ɵprov=Qe({token:t,factory:()=>g(Bn)})}return t})();var Bn=(()=>{class t extends vr{title;constructor(e){super(),this.title=e}updateTitle(e){let r=this.buildTitle(e);r!==void 0&&this.title.setTitle(r)}static ɵfac=function(r){return new(r||t)(x$2(X8))};static ɵprov=C({token:t,factory:t.ɵfac,providedIn:`root`})}return t})();var Ee=new I(``,{factory:()=>({})});var Ve=new I(``);var Vn=(()=>{class t{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=g(O_);loadComponent(e,r){return E$1(this,null,function*(){if(this.componentLoaders.get(r))return this.componentLoaders.get(r);if(r._loadedComponent)return Promise.resolve(r._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(r);let i=E$1(this,null,function*(){try{let a=yield Wn(r$(yield pn(Yr(e,()=>r.loadComponent()))));return this.onLoadEndListener&&this.onLoadEndListener(r),r._loadedComponent=a,a}finally{this.componentLoaders.delete(r)}});return this.componentLoaders.set(r,i),i})}loadChildren(e,r){if(this.childrenLoaders.get(r))return this.childrenLoaders.get(r);if(r._loadedRoutes)return Promise.resolve({routes:r._loadedRoutes,injector:r._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(r);let i=E$1(this,null,function*(){try{let o=yield Gn(r,this.compiler,e,this.onLoadEndListener);return r._loadedRoutes=o.routes,r._loadedInjector=o.injector,r._loadedNgModuleFactory=o.factory,o}finally{this.childrenLoaders.delete(r)}});return this.childrenLoaders.set(r,i),i}static ɵfac=function(r){return new(r||t)};static ɵprov=Qe({token:t,factory:t.ɵfac})}return t})();function Gn(t,n,e,r){return E$1(this,null,function*(){let o=yield Wn(r$(yield pn(Yr(e,()=>t.loadChildren())))),a;o instanceof cy||Array.isArray(o)?a=o:a=yield n.compileModuleAsync(o),r&&r(t);let c,s,d;return Array.isArray(a)?s=a:(c=a.create(e).injector,d=a,s=c.get(Ve,[],{optional:!0,self:!0}).flat()),{routes:s.map(gr),injector:c,factory:d}})}function Wn(t){return E$1(this,null,function*(){return t})}var Mt=(()=>{class t{static ɵfac=function(r){return new(r||t)};static ɵprov=Qe({token:t,factory:()=>g(Io)})}return t})();var Io=(()=>{class t{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,r){return e}static ɵfac=function(r){return new(r||t)};static ɵprov=Qe({token:t,factory:t.ɵfac})}return t})();var mr=new I(``);var yr=new I(``);function Qn(t,n,e){let r=t.get(yr),i=t.get(G$1);if(!i.startViewTransition||r.skipNextTransition)return r.skipNextTransition=!1,new Promise(u=>setTimeout(u));let o,a=new Promise(u=>{o=u}),c=i.startViewTransition(()=>(o(),Ao(t)));c.updateCallbackDone.catch(u=>{}),c.ready.catch(u=>{}),c.finished.catch(u=>{});let{onViewTransitionCreated:s}=r;return s&&Yr(t,()=>s({transition:c,from:n,to:e})),a}function Ao(t){return new Promise(n=>{pm({read:()=>setTimeout(n)},{injector:t})})}var Kn=new I(``);var Eo=()=>{};var Yn=new I(``);var Rr=(()=>{class t{currentNavigation=q$1(null,{equal:()=>!1});currentTransition=null;lastSuccessfulNavigation=q$1(null);events=new P;transitionAbortWithErrorSubject=new P;configLoader=g(Vn);environmentInjector=g(Te);destroyRef=g(Z$1);urlSerializer=g(ue);rootContexts=g(Ie);location=g(Ev);inputBindingEnabled=g(Et,{optional:!0})!==null;titleStrategy=g(vr);options=g(Ee,{optional:!0})||{};paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||Ni;urlHandlingStrategy=g(Mt);createViewTransition=g(mr,{optional:!0});navigationErrorHandler=g(Yn,{optional:!0});activatedRouteInjectorFeature=g(Kn,{optional:!0});navigationId=0;get hasRequestedNavigation(){return this.navigationId!==0}transitions;afterPreactivation=()=>ze$1(void 0);rootComponentType=null;destroyed=!1;constructor(){let e=i=>this.events.next(new gt(i)),r=i=>this.events.next(new vt(i));this.configLoader.onLoadEndListener=r,this.configLoader.onLoadStartListener=e,this.destroyRef.onDestroy(()=>{this.destroyed=!0})}complete(){this.transitions?.complete()}handleNavigationRequest(e){let r=++this.navigationId;oe$1(()=>{this.transitions?.next(x$1(w({},e),{extractedUrl:this.urlHandlingStrategy.extract(e.rawUrl),targetSnapshot:null,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null,id:r,routesRecognizeHandler:{},beforeActivateHandler:{}}))})}setupNavigations(e){return this.transitions=new So$1(null),this.transitions.pipe(Tt$1(r=>r!==null),Br(r=>{let i=!0,o=!1,a=new AbortController,c=()=>!o&&this.currentTransition?.id===r.id;return ze$1(r).pipe(Br(s=>{if(this.navigationId>r.id)return this.cancelNavigationTransition(r,``,b.SupersededByNewNavigation),Ue$1;this.currentTransition=r;let u=this.lastSuccessfulNavigation();this.currentNavigation.set({id:s.id,initialUrl:s.rawUrl,extractedUrl:s.extractedUrl,targetBrowserUrl:typeof s.extras.browserUrl==`string`?this.urlSerializer.parse(s.extras.browserUrl):s.extras.browserUrl,trigger:s.source,extras:s.extras,previousNavigation:u?x$1(w({},u),{previousNavigation:null}):null,abort:()=>a.abort(),routesRecognizeHandler:s.routesRecognizeHandler,beforeActivateHandler:s.beforeActivateHandler});let d=!e.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),v=s.extras.onSameUrlNavigation??e.onSameUrlNavigation;if(!d&&v!==`reload`)return this.events.next(new B(s.id,this.urlSerializer.serialize(s.rawUrl),``,me.IgnoredSameUrlNavigation)),s.resolve(!1),Ue$1;if(this.urlHandlingStrategy.shouldProcessUrl(s.rawUrl))return ze$1(s).pipe(Br(g=>(this.events.next(new X(g.id,this.urlSerializer.serialize(g.extractedUrl),g.source,g.restoredState)),g.id!==this.navigationId?Ue$1:Promise.resolve(g))),Ro(this.environmentInjector,this.configLoader,this.rootComponentType,e.config,this.urlSerializer,this.paramsInheritanceStrategy,a.signal),_s(g=>{r.targetSnapshot=g.targetSnapshot,r.urlAfterRedirects=g.urlAfterRedirects,this.currentNavigation.update(T=>(T.finalUrl=g.urlAfterRedirects,T)),this.events.next(new ke)}),Br(g=>bt$1(r.routesRecognizeHandler.deferredHandle??ze$1(void 0)).pipe(pe$1(()=>g))),_s(()=>{let g=new xe(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(g)}));if(d&&this.urlHandlingStrategy.shouldProcessUrl(s.currentRawUrl)){let{id:g,extractedUrl:T,source:$,restoredState:ee,extras:Te}=s,_t=new X(g,this.urlSerializer.serialize(T),$,ee);this.events.next(_t);let Ge=Nn(this.rootComponentType,this.environmentInjector).snapshot;return this.currentTransition=r=x$1(w({},s),{targetSnapshot:Ge,urlAfterRedirects:T,extras:x$1(w({},Te),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.update(te=>(te.finalUrl=T,te)),ze$1(r)}else return this.events.next(new B(s.id,this.urlSerializer.serialize(s.extractedUrl),``,me.IgnoredByUrlHandlingStrategy)),s.resolve(!1),Ue$1}),pe$1(s=>{let u=new ht(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);return this.events.next(u),this.currentTransition=r=x$1(w({},s),{guards:Pi(s.targetSnapshot,s.currentSnapshot,this.rootContexts)}),r}),Vi(s=>this.events.next(s)),Br(s=>{if(r.guardsResult=s.guardsResult,s.guardsResult&&typeof s.guardsResult!=`boolean`)throw bt(this.urlSerializer,s.guardsResult);let u=new dt(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot,!!s.guardsResult);if(this.events.next(u),!c())return Ue$1;if(!s.guardsResult)return this.cancelNavigationTransition(s,``,b.GuardRejected),Ue$1;if(s.guards.canActivateChecks.length===0)return ze$1(s);let d=new ft(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);if(this.events.next(d),!c())return Ue$1;let v=!1;return ze$1(s).pipe(So(this.paramsInheritanceStrategy),_s({next:()=>{v=!0;let g=new pt(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(g)},complete:()=>{v||this.cancelNavigationTransition(s,``,b.NoDataFromResolver)}}))}),ln(s=>{let u=v=>{let g=[];if(v.routeConfig?._loadedComponent)v.component=v.routeConfig?._loadedComponent;else if(v.routeConfig?.loadComponent){let T=v._environmentInjector;g.push(this.configLoader.loadComponent(T,v.routeConfig).then($=>{v.component=$}))}for(let T of v.children)g.push(...u(T));return g},d=u(s.targetSnapshot.root);return d.length===0?ze$1(s):bt$1(Promise.all(d).then(()=>s))}),Br(s=>{let{newlyCreatedRoutes:u,state:d}=Di(e.routeReuseStrategy,s.targetSnapshot,s.currentRouterState);return this.currentTransition=r=s=x$1(w({},s),{targetRouterState:d,newlyCreatedRoutes:u}),this.currentNavigation.update(v=>(v.targetRouterState=d,v)),ze$1(s)}),this.activatedRouteInjectorFeature?.operator()??(s=>s),ln(()=>this.afterPreactivation()),Br(()=>{let{currentSnapshot:s,targetSnapshot:u}=r,d=this.createViewTransition?.(this.environmentInjector,s.root,u.root);return d?bt$1(d).pipe(pe$1(()=>r)):ze$1(r)}),Vt$1(1),Br(s=>{i=!1,this.events.next(new Re);let u=r.beforeActivateHandler.deferredHandle;return u?bt$1(u.then(()=>s)):ze$1(s)}),_s(s=>{new ir(e.routeReuseStrategy,r.targetRouterState,r.currentRouterState,u=>this.events.next(u),this.inputBindingEnabled).activate(this.rootContexts),s.newlyCreatedRoutes?.clear(),c()&&(o=!0,this.currentNavigation.update(u=>(u.abort=Eo,u)),this.lastSuccessfulNavigation.set(oe$1(this.currentNavigation)),this.events.next(new k(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects))),this.titleStrategy?.updateTitle(s.targetRouterState.snapshot),s.resolve(!0))}),Ts(xn(a.signal).pipe(Tt$1(()=>!o&&i),_s(()=>{this.cancelNavigationTransition(r,a.signal.reason+``,b.Aborted)}))),_s({complete:()=>{o=!0}}),Ts(this.transitionAbortWithErrorSubject.pipe(_s(s=>{throw s}))),Vn$1(()=>{a.abort(),o||this.cancelNavigationTransition(r,``,b.SupersededByNewNavigation),this.currentTransition?.id===r.id&&(this.currentNavigation.set(null),this.currentTransition=null)}),eu(s=>{if(o=!0,hn(r),this.destroyed)return r.resolve(!1),Ue$1;if(Ln(s))this.events.next(new x(r.id,this.urlSerializer.serialize(r.extractedUrl),s.message,s.cancellationCode)),Oi(s)?this.events.next(new Se(s.url,s.navigationBehaviorOptions)):r.resolve(!1);else{let u=new se(r.id,this.urlSerializer.serialize(r.extractedUrl),s,r.targetSnapshot??void 0);try{let d=Yr(this.environmentInjector,()=>this.navigationErrorHandler?.(u));if(d instanceof we){let{message:v,cancellationCode:g}=bt(this.urlSerializer,d);this.events.next(new x(r.id,this.urlSerializer.serialize(r.extractedUrl),v,g)),this.events.next(new Se(d.redirectTo,d.navigationBehaviorOptions))}else throw this.events.next(u),s}catch(d){this.options.resolveNavigationPromiseOnError?r.resolve(!1):r.reject(d)}}return Ue$1}))}))}cancelNavigationTransition(e,r,i){hn(e);let o=new x(e.id,this.urlSerializer.serialize(e.extractedUrl),r,i);this.events.next(o),e.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let e=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),r=oe$1(this.currentNavigation),i=r?.targetBrowserUrl??r?.extractedUrl;return e.toString()!==i?.toString()&&!r?.extras.skipLocationChange}static ɵfac=function(r){return new(r||t)};static ɵprov=Qe({token:t,factory:t.ɵfac})}return t})();function To(t){return t!==pe}function hn(t){if(t.newlyCreatedRoutes)for(let n of t.newlyCreatedRoutes)n._localInjector?.destroy()}var Zn=new I(``);var Jn=(()=>{class t{static ɵfac=function(r){return new(r||t)};static ɵprov=Qe({token:t,factory:()=>g(Mo)})}return t})();var At=class{shouldDetach(n){return!1}store(n,e){}shouldAttach(n){return!1}retrieve(n){return null}shouldReuseRoute(n,e){return n.routeConfig===e.routeConfig}shouldDestroyInjector(n){return!0}};var Mo=(()=>{class t extends At{static ɵfac=function(r){return new(r||t)};static ɵprov=Qe({token:t,factory:t.ɵfac})}return t})();var Nt=(()=>{class t{urlSerializer=g(ue);options=g(Ee,{optional:!0})||{};canceledNavigationResolution=this.options.canceledNavigationResolution||`replace`;location=g(Ev);urlHandlingStrategy=g(Mt);urlUpdateStrategy=this.options.urlUpdateStrategy||`deferred`;currentUrlTree=new E;getCurrentUrlTree(){return this.currentUrlTree}rawUrlTree=this.currentUrlTree;getRawUrlTree(){return this.rawUrlTree}createBrowserPath({finalUrl:e,initialUrl:r,targetBrowserUrl:i}){let o=e!==void 0?this.urlHandlingStrategy.merge(e,r):r,a=i??o;return a instanceof E?this.urlSerializer.serialize(a):a}routerUrlState(e){return e?.targetBrowserUrl===void 0||e?.finalUrl===void 0?{}:{ɵrouterUrl:this.urlSerializer.serialize(e.finalUrl)}}commitTransition({targetRouterState:e,finalUrl:r,initialUrl:i}){r&&e?(this.currentUrlTree=r,this.rawUrlTree=this.urlHandlingStrategy.merge(r,i),this.routerState=e):this.rawUrlTree=i}routerState=Nn(null,g(Te));getRouterState(){return this.routerState}_stateMemento=this.createStateMemento();get stateMemento(){return this._stateMemento}updateStateMemento(){this._stateMemento=this.createStateMemento()}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}restoredState(){return this.location.getState()}static ɵfac=function(r){return new(r||t)};static ɵprov=Qe({token:t,factory:()=>g(No)})}return t})();var No=(()=>{class t extends Nt{currentPageId=0;lastSuccessfulId=-1;get browserPageId(){return this.canceledNavigationResolution!==`computed`?this.currentPageId:this.restoredState()?.ɵrouterPageId??this.currentPageId}registerNonRouterCurrentEntryChangeListener(e){return this.location.subscribe(r=>{r.type===`popstate`&&setTimeout(()=>{e(r.url,r.state,`popstate`,{replaceUrl:!0})})})}handleRouterEvent(e,r){e instanceof X?this.updateStateMemento():e instanceof B?this.commitTransition(r):e instanceof xe?this.urlUpdateStrategy===`eager`&&(r.extras.skipLocationChange||this.setBrowserUrl(this.createBrowserPath(r),r)):e instanceof Re?(this.commitTransition(r),this.urlUpdateStrategy===`deferred`&&!r.extras.skipLocationChange&&this.setBrowserUrl(this.createBrowserPath(r),r)):e instanceof x&&!Mn(e)?this.restoreHistory(r):e instanceof se?this.restoreHistory(r,!0):e instanceof k&&(this.lastSuccessfulId=e.id,this.currentPageId=this.browserPageId)}setBrowserUrl(e,r){let{extras:i,id:o}=r,{replaceUrl:a,state:c}=i;if(this.location.isCurrentPathEqualTo(e)||a){let s=this.browserPageId,u=w(w({},c),this.generateNgRouterState(o,s,r));this.location.replaceState(e,``,u)}else{let s=w(w({},c),this.generateNgRouterState(o,this.browserPageId+1,r));this.location.go(e,``,s)}}restoreHistory(e,r=!1){if(this.canceledNavigationResolution===`computed`){let i=this.browserPageId,o=this.currentPageId-i;o!==0?this.location.historyGo(o):this.getCurrentUrlTree()===e.finalUrl&&o===0&&(this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution===`replace`&&(r&&this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}resetInternalState({finalUrl:e}){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.getRawUrlTree()),``,this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,r,i){return this.canceledNavigationResolution===`computed`?w({navigationId:e,ɵrouterPageId:r},this.routerUrlState(i)):w({navigationId:e},this.routerUrlState(i))}static ɵfac=function(r){return new(r||t)};static ɵprov=Qe({token:t,factory:t.ɵfac})}return t})();function Sr(t,n){t.events.pipe(Tt$1(e=>e instanceof k||e instanceof x||e instanceof se||e instanceof B),pe$1(e=>e instanceof k||e instanceof B?0:(e instanceof x?e.code===b.Redirect||e.code===b.SupersededByNewNavigation:!1)?2:1),Tt$1(e=>e!==2),Vt$1(1)).subscribe(()=>{n()})}var le=(()=>{class t{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}disposed=!1;nonRouterCurrentEntryChangeSubscription;console=g(my);stateManager=g(Nt);options=g(Ee,{optional:!0})||{};pendingTasks=g(ur$1);urlUpdateStrategy=this.options.urlUpdateStrategy||`deferred`;navigationTransitions=g(Rr);urlSerializer=g(ue);location=g(Ev);urlHandlingStrategy=g(Mt);injector=g(Te);_events=new P;get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}navigated=!1;routeReuseStrategy=g(Jn);injectorCleanup=g(Zn,{optional:!0});onSameUrlNavigation=this.options.onSameUrlNavigation||`ignore`;config=g(Ve,{optional:!0})?.flat()??[];componentInputBindingEnabled=!!g(Et,{optional:!0});currentNavigation=this.navigationTransitions.currentNavigation.asReadonly();constructor(){this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this).subscribe({error:e=>{}}),this.subscribeToNavigationEvents()}eventsSubscription=new ue$1;subscribeToNavigationEvents(){let e=this.navigationTransitions.events.subscribe(r=>{try{let i=this.navigationTransitions.currentTransition,o=oe$1(this.navigationTransitions.currentNavigation);if(i!==null&&o!==null){if(this.stateManager.handleRouterEvent(r,o),r instanceof x&&r.code!==b.Redirect&&r.code!==b.SupersededByNewNavigation)this.navigated=!0;else if(r instanceof k)this.navigated=!0,this.injectorCleanup?.(this.routeReuseStrategy,this.routerState,this.config);else if(r instanceof Se){let a=r.navigationBehaviorOptions,c=this.urlHandlingStrategy.merge(r.url,i.currentRawUrl),s=w({scroll:i.extras.scroll,browserUrl:i.extras.browserUrl,info:i.extras.info,skipLocationChange:i.extras.skipLocationChange,replaceUrl:i.extras.replaceUrl||this.urlUpdateStrategy===`eager`||To(i.source)},a);this.scheduleNavigation(c,pe,null,s,{resolve:i.resolve,reject:i.reject,promise:i.promise})}}Ti(r)&&this._events.next(r)}catch(i){this.navigationTransitions.transitionAbortWithErrorSubject.next(i)}});this.eventsSubscription.add(e)}resetRootComponentType(e){this.routerState.root.component=e,this.navigationTransitions.rootComponentType=e}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),pe,this.stateManager.restoredState(),{replaceUrl:!0})}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((e,r,i,o)=>{this.navigateToSyncWithBrowser(e,i,r,o)})}navigateToSyncWithBrowser(e,r,i,o){let a=i?.navigationId?i:null,c=i?.ɵrouterUrl??e;if(i?.ɵrouterUrl&&(o=x$1(w({},o),{browserUrl:e})),i){let u=w({},i);delete u.navigationId,delete u.ɵrouterPageId,delete u.ɵrouterUrl,Object.keys(u).length!==0&&(o.state=u)}let s=this.parseUrl(c);this.scheduleNavigation(s,r,a,o).catch(u=>{this.disposed||this.injector.get(wn$1)(u)})}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return oe$1(this.navigationTransitions.currentNavigation)}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(e){this.config=e.map(gr),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this._events.unsubscribe(),this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription?.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0,this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(e,r={}){let{relativeTo:i,queryParams:o,fragment:a,queryParamsHandling:c,preserveFragment:s}=r,u=s?this.currentUrlTree.fragment:a,d=null;switch(c??this.options.defaultQueryParamsHandling){case`merge`:d=w(w({},this.currentUrlTree.queryParams),o);break;case`preserve`:d=this.currentUrlTree.queryParams;break;default:d=o||null}d!==null&&(d=this.removeEmptyProps(d));let v;try{v=In(i?i.snapshot:this.routerState.snapshot.root)}catch(g){(typeof e[0]!=`string`||e[0][0]!==`/`)&&(e=[]),v=this.currentUrlTree.root}return An(v,e,d,u??null,this.urlSerializer)}navigateByUrl(e,r={skipLocationChange:!1}){let i=J(e)?e:this.parseUrl(e),o=this.urlHandlingStrategy.merge(i,this.rawUrlTree);return this.scheduleNavigation(o,pe,null,r)}navigate(e,r={skipLocationChange:!1}){return Do(e),this.navigateByUrl(this.createUrlTree(e,r),r)}serializeUrl(e){return this.urlSerializer.serialize(e)}parseUrl(e){try{return this.urlSerializer.parse(e)}catch(r){return this.console.warn(ut$1(4018,!1)),this.urlSerializer.parse(`/`)}}isActive(e,r){let i;if(r===!0?i=w({},ur):r===!1?i=w({},ve):i=w(w({},ve),r),J(e))return Yt(this.currentUrlTree,e,i);let o=this.parseUrl(e);return Yt(this.currentUrlTree,o,i)}removeEmptyProps(e){return Object.entries(e).reduce((r,[i,o])=>(o!=null&&(r[i]=o),r),{})}scheduleNavigation(e,r,i,o,a){if(this.disposed)return Promise.resolve(!1);let c,s,u;a?(c=a.resolve,s=a.reject,u=a.promise):u=new Promise((v,g)=>{c=v,s=g});let d=this.pendingTasks.add();return Sr(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(d))}),this.navigationTransitions.handleNavigationRequest({source:r,restoredState:i,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:o,resolve:c,reject:s,promise:u,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),u.catch(Promise.reject.bind(Promise))}static ɵfac=function(r){return new(r||t)};static ɵprov=Qe({token:t,factory:t.ɵfac})}return t})();function Do(t){for(let n=0;n<t.length;n++)if(t[n]==null)throw new m$1(4008,!1)}var _o=(()=>{class t{router=g(le);stateManager=g(Nt);fragment=q$1(``);queryParams=q$1({});path=q$1(``);serializer=g(ue);constructor(){this.updateState(),this.router.events?.subscribe(e=>{e instanceof k&&this.updateState()})}updateState(){let{fragment:e,root:r,queryParams:i}=this.stateManager.getCurrentUrlTree();this.fragment.set(e),this.queryParams.set(i),this.path.set(this.serializer.serialize(new E(r)))}static ɵfac=function(r){return new(r||t)};static ɵprov=Qe({token:t,factory:t.ɵfac})}return t})();var Dt=(()=>{class t{router;route;tabIndexAttribute;renderer;el;locationStrategy;hrefAttributeValue=g(new rv(`href`),{optional:!0});reactiveHref=en(()=>this.isAnchorElement?this.computeHref(this._urlTree()):this.hrefAttributeValue);get href(){return oe$1(this.reactiveHref)}set href(e){this.reactiveHref.set(e)}set target(e){this._target.set(e)}get target(){return oe$1(this._target)}_target=q$1(void 0);set queryParams(e){this._queryParams.set(e)}get queryParams(){return oe$1(this._queryParams)}_queryParams=q$1(void 0,{equal:()=>!1});set fragment(e){this._fragment.set(e)}get fragment(){return oe$1(this._fragment)}_fragment=q$1(void 0);set queryParamsHandling(e){this._queryParamsHandling.set(e)}get queryParamsHandling(){return oe$1(this._queryParamsHandling)}_queryParamsHandling=q$1(void 0);set state(e){this._state.set(e)}get state(){return oe$1(this._state)}_state=q$1(void 0,{equal:()=>!1});set info(e){this._info.set(e)}get info(){return oe$1(this._info)}_info=q$1(void 0,{equal:()=>!1});set relativeTo(e){this._relativeTo.set(e)}get relativeTo(){return oe$1(this._relativeTo)}_relativeTo=q$1(void 0);set preserveFragment(e){this._preserveFragment.set(e)}get preserveFragment(){return oe$1(this._preserveFragment)}_preserveFragment=q$1(!1);set skipLocationChange(e){this._skipLocationChange.set(e)}get skipLocationChange(){return oe$1(this._skipLocationChange)}_skipLocationChange=q$1(!1);set replaceUrl(e){this._replaceUrl.set(e)}get replaceUrl(){return oe$1(this._replaceUrl)}_replaceUrl=q$1(!1);browserUrl=i$(void 0);isAnchorElement;onChanges=new P;applicationErrorHandler=g(wn$1);options=g(Ee,{optional:!0});reactiveRouterState=g(_o);constructor(e,r,i,o,a,c){this.router=e,this.route=r,this.tabIndexAttribute=i,this.renderer=o,this.el=a,this.locationStrategy=c;let s=a.nativeElement.tagName?.toLowerCase();this.isAnchorElement=s===`a`||s===`area`||!!(typeof customElements==`object`&&customElements.get(s)?.observedAttributes?.includes?.(`href`))}setTabIndexIfNotOnNativeEl(e){this.tabIndexAttribute!=null||this.isAnchorElement||this.applyAttributeValue(`tabindex`,e)}ngOnChanges(e){this.onChanges.next(this)}routerLinkInput=q$1(null);set routerLink(e){e==null?(this.routerLinkInput.set(null),this.setTabIndexIfNotOnNativeEl(null)):(J(e)?this.routerLinkInput.set(e):this.routerLinkInput.set(Array.isArray(e)?e:[e]),this.setTabIndexIfNotOnNativeEl(`0`))}onClick(e,r,i,o,a){let c=this._urlTree();if(c===null||this.isAnchorElement&&(e!==0||r||i||o||a||typeof this.target==`string`&&this.target!=`_self`))return!0;let s=this.browserUrl(),u=w({skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info},s!==void 0&&{browserUrl:s});return this.router.navigateByUrl(c,u)?.catch(d=>{this.applicationErrorHandler(d)}),!this.isAnchorElement}ngOnDestroy(){}applyAttributeValue(e,r){let i=this.renderer,o=this.el.nativeElement;r!==null?i.setAttribute(o,e,r):i.removeAttribute(o,e)}_urlTree=J$1(()=>{this.reactiveRouterState.path(),this._preserveFragment()&&this.reactiveRouterState.fragment();let e=i=>i===`preserve`||i===`merge`;(e(this._queryParamsHandling())||e(this.options?.defaultQueryParamsHandling))&&this.reactiveRouterState.queryParams();let r=this.routerLinkInput();return r===null||!this.router.createUrlTree?null:J(r)?r:this.router.createUrlTree(r,{relativeTo:this._relativeTo()!==void 0?this._relativeTo():this.route,queryParams:this._queryParams(),fragment:this._fragment(),queryParamsHandling:this._queryParamsHandling(),preserveFragment:this._preserveFragment()})},{equal:(e,r)=>this.computeHref(e)===this.computeHref(r)});get urlTree(){return oe$1(this._urlTree)}computeHref(e){return e!==null&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(e))??``:null}static ɵfac=function(r){return new(r||t)(Ae$1(le),Ae$1(W),rd(`tabindex`),Ae$1(yr$1),Ae$1(Xe),Ae$1(gc))};static ɵdir=Mn$1({type:t,selectors:[[``,`routerLink`,``]],hostVars:2,hostBindings:function(r,i){r&1&&ac(`click`,function(a){return i.onClick(a.button,a.ctrlKey,a.shiftKey,a.altKey,a.metaKey)}),r&2&&Cr(`href`,i.reactiveHref(),bw)(`target`,i._target())},inputs:{target:`target`,queryParams:`queryParams`,fragment:`fragment`,queryParamsHandling:`queryParamsHandling`,state:`state`,info:`info`,relativeTo:`relativeTo`,preserveFragment:[2,`preserveFragment`,`preserveFragment`,Li$1],skipLocationChange:[2,`skipLocationChange`,`skipLocationChange`,Li$1],replaceUrl:[2,`replaceUrl`,`replaceUrl`,Li$1],browserUrl:[1,`browserUrl`],routerLink:`routerLink`},features:[Ei$1]})}return t})();var Uo=(()=>{class t{router;element;renderer;cdr;links;classes=[];routerEventsSubscription;linkInputChangesSubscription;_isActive=!1;get isActive(){return this._isActive}routerLinkActiveOptions={exact:!1};ariaCurrentWhenActive;isActiveChange=new Ht;link=g(Dt,{optional:!0});constructor(e,r,i,o){this.router=e,this.element=r,this.renderer=i,this.cdr=o,this.routerEventsSubscription=e.events.subscribe(a=>{a instanceof k&&this.update()})}ngAfterContentInit(){ze$1(this.links.changes,ze$1(null)).pipe(_o$1()).subscribe(e=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();let e=[...this.links.toArray(),this.link].filter(r=>!!r).map(r=>r.onChanges);this.linkInputChangesSubscription=bt$1(e).pipe(_o$1()).subscribe(r=>{this._isActive!==this.isLinkActive(this.router)(r)&&this.update()})}set routerLinkActive(e){if(e==null){this.classes=[];return}let r=Array.isArray(e)?e:e.split(` `);this.classes=r.filter(i=>!!i)}ngOnChanges(e){this.update()}ngOnDestroy(){this.routerEventsSubscription.unsubscribe(),this.linkInputChangesSubscription?.unsubscribe()}update(){!this.links||!this.router.navigated||this.routerLinkActiveOptions===null&&!this._isActive||queueMicrotask(()=>{let e=this.hasActiveLinks();this.classes.forEach(r=>{e?this.renderer.addClass(this.element.nativeElement,r):this.renderer.removeClass(this.element.nativeElement,r)}),e&&this.ariaCurrentWhenActive!==void 0?this.renderer.setAttribute(this.element.nativeElement,`aria-current`,this.ariaCurrentWhenActive.toString()):this.renderer.removeAttribute(this.element.nativeElement,`aria-current`),this._isActive!==e&&(this._isActive=e,this.cdr.markForCheck(),this.isActiveChange.emit(e))})}isLinkActive(e){let r=this.routerLinkActiveOptions;if(r===null)return()=>!1;let i;return r===void 0?i=w({},ve):Oo(r)?i=r:r.exact??!1?i=w({},ur):i=w({},ve),o=>{let a=o.urlTree;return a?oe$1(lr(a,e,i)):!1}}hasActiveLinks(){let e=this.isLinkActive(this.router);return this.link&&e(this.link)||this.links.some(e)}static ɵfac=function(r){return new(r||t)(Ae$1(le),Ae$1(Xe),Ae$1(yr$1),Ae$1(hc))};static ɵdir=Mn$1({type:t,selectors:[[``,`routerLinkActive`,``]],contentQueries:function(r,i,o){if(r&1&&_y(o,Dt,5),r&2){let a;VT(a=HT())&&(i.links=a)}},inputs:{routerLinkActiveOptions:`routerLinkActiveOptions`,ariaCurrentWhenActive:`ariaCurrentWhenActive`,routerLinkActive:`routerLinkActive`},outputs:{isActiveChange:`isActiveChange`},exportAs:[`routerLinkActive`],features:[Ei$1]})}return t})();function Oo(t){let n=t;return!!(n.paths||n.matrixParams||n.queryParams||n.fragment)}var Xn=new I(``);var Po=(()=>{class t{options;routerEventsSubscription;scrollEventsSubscription;lastId=0;lastSource=pe;restoredId=0;store={};isHydrating=g(UI,{optional:!0})??!1;urlSerializer=g(ue);zone=g(ie);viewportScroller=g(MU);transitions=g(Rr);constructor(e){this.options=e,this.options.scrollPositionRestoration||=`disabled`,this.options.anchorScrolling||=`disabled`,this.isHydrating&&g(Qt$1).whenStable().then(()=>{this.isHydrating=!1})}init(){this.options.scrollPositionRestoration!==`disabled`&&this.viewportScroller.setHistoryScrollRestoration(`manual`),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof X?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof k?(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment)):e instanceof B&&e.code===me.IgnoredSameUrlNavigation&&(this.lastSource=void 0,this.restoredId=0,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.url).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{if(!(e instanceof ye)||e.scrollBehavior===`manual`)return;let r={behavior:`instant`};e.position?this.options.scrollPositionRestoration===`top`?this.viewportScroller.scrollToPosition([0,0],r):this.options.scrollPositionRestoration===`enabled`&&this.viewportScroller.scrollToPosition(e.position,r):e.anchor&&this.options.anchorScrolling===`enabled`?this.viewportScroller.scrollToAnchor(e.anchor):this.options.scrollPositionRestoration!==`disabled`&&this.viewportScroller.scrollToPosition([0,0])})}scheduleScrollEvent(e,r){if(this.isHydrating)return;let i=oe$1(this.transitions.currentNavigation)?.extras.scroll;this.zone.runOutsideAngular(()=>E$1(this,null,function*(){yield new Promise(o=>{setTimeout(o),typeof requestAnimationFrame<`u`&&requestAnimationFrame(o)}),this.zone.run(()=>{this.transitions.events.next(new ye(e,this.lastSource===`popstate`?this.store[this.restoredId]:null,r,i))})}))}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}static ɵfac=function(r){Db()};static ɵprov=C({token:t,factory:t.ɵfac})}return t})();function Lo(t,...n){return Gt$1([{provide:Ve,multi:!0,useValue:t},{provide:W,useFactory:jo},{provide:oc,multi:!0,useFactory:ko},n.map(e=>e.ɵproviders)])}function jo(){return g(le).routerState.root}function ei(t,n){return{ɵkind:t,ɵproviders:n}}function xo(t={}){return ei(4,[{provide:Xn,useFactory:()=>new Po(t)}])}function ko(){let t=g(Q);return n=>{let e=t.get(Qt$1);if(n!==e.components[0])return;let r=t.get(le),i=t.get($o);t.get(zo)===1&&r.initialNavigation(),t.get(Ho,null,{optional:!0})?.setUpPreloading(),t.get(Xn,null,{optional:!0})?.init(),r.resetRootComponentType(e.componentTypes[0]),i.closed||(i.next(),i.complete(),i.unsubscribe())}}var $o=new I(``,{factory:()=>new P});var zo=new I(``,{factory:()=>1});var Ho=new I(``);function Fo(t){xe$1(`NgRouterViewTransitions`);return ei(9,[{provide:mr,useValue:Qn},{provide:yr,useValue:w({skipNextTransition:!!t?.skipInitialTransition},t)}])}export{W as a,k as c,xo as d,Uo as i,le as l,Fo as n,X as o,Lo as r,fr as s,Dt as t,se as u};