homebridge-config-ui-x
Version:
A web based management, configuration and control platform for Homebridge.
1 lines • 80 kB
JavaScript
import{$ as Ye,$a as $t,A as re,Ca as xr,Cb as Qr,E as We,Eb as Kr,F as Qe,Fa as jr,Fb as Yr,H as le,Ha as xt,Kc as tn,L as Er,La as jt,M as W,Ma as z,N as Ut,Na as kr,Oa as $r,P as Ar,Pa as zr,Q as $,Qa as kt,R as Ke,Ra as Hr,S as j,Ta as Te,U as w,V as Mr,X as b,Xc as rn,Ya as Fr,Z as Tr,Za as qr,_ as M,_a as Br,a as yr,aa as l,ab as Vr,b as Rr,ba as Dr,c as Sr,d as te,da as Q,e as O,ea as N,h as P,hc as Zr,i as D,j as g,ja as Nr,k as Cr,ka as _r,kc as y,l as Nt,la as Ot,lb as Gr,lc as Je,m as wr,ma as Ur,mc as Jr,na as ne,nc as Xr,oa as Or,p as E,pa as Ze,pc as en,q as br,qa as C,r as B,s as _t,sa as Me,sc as Xe,t as Ir,ta as Pt,tc as et,u as Ge,ua as Pr,va as Lt,xb as Wr,xc as zt,ya as Lr,yc as De}from"./chunk-LTGI3NYM.js";import{a as d,b as T,h as m}from"./chunk-B4AJQJMI.js";var f="primary",Fe=Symbol("RouteTitle"),Vt=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 oe(t){return new Vt(t)}function Ht(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 ln(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 c={},u=t.slice(0,r.length);return Ht(r,u,c)?{consumed:u,posParams:c}:null}if(i!==r.lastIndexOf("**"))return null;let o=r.slice(0,i),s=r.slice(i+1);if(o.length+s.length>t.length||e.pathMatch==="full"&&n.hasChildren()&&e.path!=="**")return null;let a={};return!Ht(o,t.slice(0,o.length),a)||!Ht(s,t.slice(t.length-s.length),a)?null:{consumed:t,posParams:a}}function at(t){return new Promise((n,e)=>{t.pipe(W()).subscribe({next:r=>n(r),error:r=>e(r)})})}function ei(t,n){if(t.length!==n.length)return!1;for(let e=0;e<t.length;++e)if(!H(t[e],n[e]))return!1;return!0}function H(t,n){let e=t?Gt(t):void 0,r=n?Gt(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],!dn(t[i],n[i]))return!1;return!0}function Gt(t){return[...Object.keys(t),...Object.getOwnPropertySymbols(t)]}function dn(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 ti(t){return t.length>0?t[t.length-1]:null}function se(t){return Nt(t)?t:qr(t)?D(Promise.resolve(t)):g(t)}function hn(t){return Nt(t)?at(t):Promise.resolve(t)}var ri={exact:pn,subset:gn},fn={exact:ni,subset:ii,ignored:()=>!0},ar={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},Pe={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};function sr(t,n,e){let r=t instanceof A?t:n.parseUrl(t);return Je(()=>Wt(n.lastSuccessfulNavigation()?.finalUrl??new A,r,d(d({},Pe),e)))}function Wt(t,n,e){return ri[e.paths](t.root,n.root,e.matrixParams)&&fn[e.queryParams](t.queryParams,n.queryParams)&&!(e.fragment==="exact"&&t.fragment!==n.fragment)}function ni(t,n){return H(t,n)}function pn(t,n,e){if(!ie(t.segments,n.segments)||!nt(t.segments,n.segments,e)||t.numberOfChildren!==n.numberOfChildren)return!1;for(let r in n.children)if(!t.children[r]||!pn(t.children[r],n.children[r],e))return!1;return!0}function ii(t,n){return Object.keys(n).length<=Object.keys(t).length&&Object.keys(n).every(e=>dn(t[e],n[e]))}function gn(t,n,e){return vn(t,n,n.segments,e)}function vn(t,n,e,r){if(t.segments.length>e.length){let i=t.segments.slice(0,e.length);return!(!ie(i,e)||n.hasChildren()||!nt(i,e,r))}else if(t.segments.length===e.length){if(!ie(t.segments,e)||!nt(t.segments,e,r))return!1;for(let i in n.children)if(!t.children[i]||!gn(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!ie(t.segments,i)||!nt(t.segments,i,r)||!t.children[f]?!1:vn(t.children[f],n,o,r)}}function nt(t,n,e){return n.every((r,i)=>fn[e](t[i].parameters,r.parameters))}var A=class{root;queryParams;fragment;_queryParamMap;constructor(n=new v([],{}),e={},r=null){this.root=n,this.queryParams=e,this.fragment=r}get queryParamMap(){return this._queryParamMap??=oe(this.queryParams),this._queryParamMap}toString(){return si.serialize(this)}},v=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 it(this)}},K=class{path;parameters;_parameterMap;constructor(n,e){this.path=n,this.parameters=e}get parameterMap(){return this._parameterMap??=oe(this.parameters),this._parameterMap}toString(){return yn(this)}};function oi(t,n){return ie(t,n)&&t.every((e,r)=>H(e.parameters,n[r].parameters))}function ie(t,n){return t.length!==n.length?!1:t.every((e,r)=>e.path===n[r].path)}function ai(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 ce=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=b({token:t,factory:()=>new Y,providedIn:"root"})}return t})(),Y=class{parse(n){let e=new Kt(n);return new A(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(n){let e=`/${Ne(n.root,!0)}`,r=li(n.queryParams),i=typeof n.fragment=="string"?`#${ci(n.fragment)}`:"";return`${e}${r}${i}`}},si=new Y;function it(t){return t.segments.map(n=>yn(n)).join("/")}function Ne(t,n){if(!t.hasChildren())return it(t);if(n){let e=t.children[f]?Ne(t.children[f],!1):"",r=[];return Object.entries(t.children).forEach(([i,o])=>{i!==f&&r.push(`${i}:${Ne(o,!1)}`)}),r.length>0?`${e}(${r.join("//")})`:e}else{let e=ai(t,(r,i)=>i===f?[Ne(t.children[f],!1)]:[`${i}:${Ne(r,!1)}`]);return Object.keys(t.children).length===1&&t.children[f]!=null?`${it(t)}/${e[0]}`:`${it(t)}/(${e.join("//")})`}}function mn(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function tt(t){return mn(t).replace(/%3B/gi,";")}function ci(t){return encodeURI(t)}function Qt(t){return mn(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function ot(t){return decodeURIComponent(t)}function nn(t){return ot(t.replace(/\+/g,"%20"))}function yn(t){return`${Qt(t.path)}${ui(t.parameters)}`}function ui(t){return Object.entries(t).map(([n,e])=>`;${Qt(n)}=${Qt(e)}`).join("")}function li(t){let n=Object.entries(t).map(([e,r])=>Array.isArray(r)?r.map(i=>`${tt(e)}=${tt(i)}`).join("&"):`${tt(e)}=${tt(r)}`).filter(e=>e);return n.length?`?${n.join("&")}`:""}var di=/^[^\/()?;#]+/;function Ft(t){let n=t.match(di);return n?n[0]:""}var hi=/^[^\/()?;=#]+/;function fi(t){let n=t.match(hi);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 Kt=class{url;remaining;constructor(n){this.url=n,this.remaining=n}parseRootSegment(){for(;this.consumeOptional("/"););return this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new v([],{}):new v([],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 w(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 v(e,r)),i}parseSegment(){let n=Ft(this.remaining);if(n===""&&this.peekStartsWith(";"))throw new w(4009,!1);return this.capture(n),new K(ot(n),this.parseMatrixParams())}parseMatrixParams(){let n={};for(;this.consumeOptional(";");)this.parseParam(n);return n}parseParam(n){let e=fi(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){let i=Ft(this.remaining);i&&(r=i,this.capture(r))}n[ot(e)]=ot(r)}parseQueryParam(n){let e=gi(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){let s=mi(this.remaining);s&&(r=s,this.capture(r))}let i=nn(e),o=nn(r);if(n.hasOwnProperty(i)){let s=n[i];Array.isArray(s)||(s=[s],n[i]=s),s.push(o)}else n[i]=o}parseParens(n,e){let r={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let i=Ft(this.remaining),o=this.remaining[i.length];if(o!=="/"&&o!==")"&&o!==";")throw new w(4010,!1);let s;i.indexOf(":")>-1?(s=i.slice(0,i.indexOf(":")),this.capture(s),this.capture(":")):n&&(s=f);let a=this.parseChildren(e+1);r[s??f]=Object.keys(a).length===1&&a[f]?a[f]:new v([],a),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 w(4011,!1)}};function Rn(t){return t.segments.length>0?new v([],{[f]:t}):t}function Sn(t){let n={};for(let[r,i]of Object.entries(t.children)){let o=Sn(i);if(r===f&&o.segments.length===0&&o.hasChildren())for(let[s,a]of Object.entries(o.children))n[s]=a;else(o.segments.length>0||o.hasChildren())&&(n[r]=o)}let e=new v(t.segments,n);return yi(e)}function yi(t){if(t.numberOfChildren===1&&t.children[f]){let n=t.children[f];return new v(t.segments.concat(n.segments),n.children)}return t}function Z(t){return t instanceof A}function Cn(t,n,e=null,r=null,i=new Y){let o=wn(t);return bn(o,n,e,r,i)}function wn(t){let n;function e(o){let s={};for(let c of o.children){let u=e(c);s[c.outlet]=u}let a=new v(o.url,s);return o===t&&(n=a),a}let r=e(t.root),i=Rn(r);return n??i}function bn(t,n,e,r,i){let o=t;for(;o.parent;)o=o.parent;if(n.length===0)return qt(o,o,o,e,r,i);let s=Ri(n);if(s.toRoot())return qt(o,o,new v([],{}),e,r,i);let a=Si(s,o,t),c=a.processChildren?Ue(a.segmentGroup,a.index,s.commands):En(a.segmentGroup,a.index,s.commands);return qt(o,a.segmentGroup,c,e,r,i)}function st(t){return typeof t=="object"&&t!=null&&!t.outlets&&!t.segmentPath}function Le(t){return typeof t=="object"&&t!=null&&t.outlets}function on(t,n,e){t||="\u0275";let r=new A;return r.queryParams={[t]:n},e.parse(e.serialize(r)).queryParams[t]}function qt(t,n,e,r,i,o){let s={};for(let[u,h]of Object.entries(r??{}))s[u]=Array.isArray(h)?h.map(p=>on(u,p,o)):on(u,h,o);let a;t===n?a=e:a=In(t,n,e);let c=Rn(Sn(a));return new A(c,s,i)}function In(t,n,e){let r={};return Object.entries(t.children).forEach(([i,o])=>{o===n?r[i]=e:r[i]=In(o,n,e)}),new v(t.segments,r)}var ct=class{isAbsolute;numberOfDoubleDots;commands;constructor(n,e,r){if(this.isAbsolute=n,this.numberOfDoubleDots=e,this.commands=r,n&&r.length>0&&st(r[0]))throw new w(4003,!1);let i=r.find(Le);if(i&&i!==ti(r))throw new w(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function Ri(t){if(typeof t[0]=="string"&&t.length===1&&t[0]==="/")return new ct(!0,0,t);let n=0,e=!1,r=t.reduce((i,o,s)=>{if(typeof o=="object"&&o!=null){if(o.outlets){let a={};return Object.entries(o.outlets).forEach(([c,u])=>{a[c]=typeof u=="string"?u.split("/"):u}),[...i,{outlets:a}]}if(o.segmentPath)return[...i,o.segmentPath]}return typeof o!="string"?[...i,o]:s===0?(o.split("/").forEach((a,c)=>{c==0&&a==="."||(c==0&&a===""?e=!0:a===".."?n++:a!=""&&i.push(a))}),i):[...i,o]},[]);return new ct(e,n,r)}var he=class{segmentGroup;processChildren;index;constructor(n,e,r){this.segmentGroup=n,this.processChildren=e,this.index=r}};function Si(t,n,e){if(t.isAbsolute)return new he(n,!0,0);if(!e)return new he(n,!1,NaN);if(e.parent===null)return new he(e,!0,0);let r=st(t.commands[0])?0:1,i=e.segments.length-1+r;return Ci(e,i,t.numberOfDoubleDots)}function Ci(t,n,e){let r=t,i=n,o=e;for(;o>i;){if(o-=i,r=r.parent,!r)throw new w(4005,!1);i=r.segments.length}return new he(r,!1,i-o)}function wi(t){return Le(t[0])?t[0].outlets:{[f]:t}}function En(t,n,e){if(t??=new v([],{}),t.segments.length===0&&t.hasChildren())return Ue(t,n,e);let r=bi(t,n,e),i=e.slice(r.commandIndex);if(r.match&&r.pathIndex<t.segments.length){let o=new v(t.segments.slice(0,r.pathIndex),{});return o.children[f]=new v(t.segments.slice(r.pathIndex),t.children),Ue(o,0,i)}else return r.match&&i.length===0?new v(t.segments,{}):r.match&&!t.hasChildren()?Yt(t,n,e):r.match?Ue(t,0,i):Yt(t,n,e)}function Ue(t,n,e){if(e.length===0)return new v(t.segments,{});{let r=wi(e),i={};if(Object.keys(r).some(o=>o!==f)&&t.children[f]&&t.numberOfChildren===1&&t.children[f].segments.length===0){let o=Ue(t.children[f],n,e);return new v(t.segments,o.children)}return Object.entries(r).forEach(([o,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(i[o]=En(t.children[o],n,s))}),Object.entries(t.children).forEach(([o,s])=>{r[o]===void 0&&(i[o]=s)}),new v(t.segments,i)}}function bi(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 s=t.segments[i],a=e[r];if(Le(a))break;let c=`${a}`,u=r<e.length-1?e[r+1]:null;if(i>0&&c===void 0)break;if(c&&u&&typeof u=="object"&&u.outlets===void 0){if(!sn(c,u,s))return o;r+=2}else{if(!sn(c,{},s))return o;r++}i++}return{match:!0,pathIndex:i,commandIndex:r}}function Yt(t,n,e){let r=t.segments.slice(0,n),i=0;for(;i<e.length;){let o=e[i];if(Le(o)){let c=Ii(o.outlets);return new v(r,c)}if(i===0&&st(e[0])){let c=t.segments[n];r.push(new K(c.path,an(e[0]))),i++;continue}let s=Le(o)?o.outlets[f]:`${o}`,a=i<e.length-1?e[i+1]:null;s&&a&&st(a)?(r.push(new K(s,an(a))),i+=2):(r.push(new K(s,{})),i++)}return new v(r,{})}function Ii(t){let n={};return Object.entries(t).forEach(([e,r])=>{typeof r=="string"&&(r=[r]),r!==null&&(n[e]=Yt(new v([],{}),0,r))}),n}function an(t){let n={};return Object.entries(t).forEach(([e,r])=>n[e]=`${r}`),n}function sn(t,n,e){return t==e.path&&H(n,e.parameters)}var fe="imperative",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||{}),U=class{id;url;constructor(n,e){this.id=n,this.url=e}},J=class extends U{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}')`}},x=class extends U{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}')`}},I=(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})(I||{}),ge=(function(t){return t[t.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",t[t.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",t})(ge||{}),L=class extends U{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 An(t){return t instanceof L&&(t.code===I.Redirect||t.code===I.SupersededByNewNavigation)}var F=class extends U{reason;code;type=S.NavigationSkipped;constructor(n,e,r,i){super(n,e),this.reason=r,this.code=i}},ae=class extends U{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})`}},xe=class extends U{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})`}},ut=class extends U{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})`}},lt=class extends U{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})`}},dt=class extends U{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})`}},ht=class extends U{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})`}},ft=class{route;type=S.RouteConfigLoadStart;constructor(n){this.route=n}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},pt=class{route;type=S.RouteConfigLoadEnd;constructor(n){this.route=n}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},gt=class{snapshot;type=S.ChildActivationStart;constructor(n){this.snapshot=n}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},vt=class{snapshot;type=S.ChildActivationEnd;constructor(n){this.snapshot=n}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},mt=class{snapshot;type=S.ActivationStart;constructor(n){this.snapshot=n}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},yt=class{snapshot;type=S.ActivationEnd;constructor(n){this.snapshot=n}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},ve=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}')`}},me=class{},je=class{},ye=class{url;navigationBehaviorOptions;constructor(n,e){this.url=n,this.navigationBehaviorOptions=e}};function Ei(t){return!(t instanceof me)&&!(t instanceof ye)&&!(t instanceof je)}var Rt=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 we(this.rootInjector)}},we=(()=>{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 Rt(this.rootInjector),this.contexts.set(e,r)),r}getContext(e){return this.contexts.get(e)||null}static \u0275fac=function(r){return new(r||t)(Ye(Q))};static \u0275prov=b({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),St=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=Zt(n,this._root);return e?e.children.map(r=>r.value):[]}firstChild(n){let e=Zt(n,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(n){let e=Jt(n,this._root);return e.length<2?[]:e[e.length-2].children.map(i=>i.value).filter(i=>i!==n)}pathFromRoot(n){return Jt(n,this._root).map(e=>e.value)}};function Zt(t,n){if(t===n.value)return n;for(let e of n.children){let r=Zt(t,e);if(r)return r}return null}function Jt(t,n){if(t===n.value)return[n];for(let e of n.children){let r=Jt(t,e);if(r.length)return r.unshift(n),r}return[]}var _=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 ke=class extends St{snapshot;constructor(n,e){super(n),this.snapshot=e,ur(this,n)}toString(){return this.snapshot.toString()}};function Mn(t,n){let e=Ai(t,n),r=new O([new K("",{})]),i=new O({}),o=new O({}),s=new O({}),a=new O(""),c=new G(r,i,s,a,o,f,t,e.root);return c.snapshot=e.root,new ke(new _(c,[]),e)}function Ai(t,n){let e={},r={},i={},s=new Re([],e,i,"",r,f,t,null,{},n);return new $e("",new _(s,[]))}var G=class{urlSubject;paramsSubject;queryParamsSubject;fragmentSubject;dataSubject;outlet;component;snapshot;_futureSnapshot;_routerState;_paramMap;_queryParamMap;title;url;params;queryParams;fragment;data;constructor(n,e,r,i,o,s,a,c){this.urlSubject=n,this.paramsSubject=e,this.queryParamsSubject=r,this.fragmentSubject=i,this.dataSubject=o,this.outlet=s,this.component=a,this._futureSnapshot=c,this.title=this.dataSubject?.pipe(E(u=>u[Fe]))??g(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(E(n=>oe(n))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(E(n=>oe(n))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function cr(t,n,e="emptyOnly"){let r,{routeConfig:i}=t;return n!==null&&(e==="always"||i?.path===""||!n.component&&!n.routeConfig?.loadComponent)?r={params:d(d({},n.params),t.params),data:d(d({},n.data),t.data),resolve:d(d(d(d({},t.data),n.data),i?.data),t._resolvedData)}:r={params:d({},t.params),data:d({},t.data),resolve:d(d({},t.data),t._resolvedData??{})},i&&Dn(i)&&(r.resolve[Fe]=i.title),r}var Re=class{url;params;queryParams;fragment;data;outlet;component;routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;_environmentInjector;get title(){return this.data?.[Fe]}constructor(n,e,r,i,o,s,a,c,u,h){this.url=n,this.params=e,this.queryParams=r,this.fragment=i,this.data=o,this.outlet=s,this.component=a,this.routeConfig=c,this._resolve=u,this._environmentInjector=h}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??=oe(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=oe(this.queryParams),this._queryParamMap}toString(){let n=this.url.map(r=>r.toString()).join("/"),e=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${n}', path:'${e}')`}},$e=class extends St{url;constructor(n,e){super(e),this.url=n,ur(this,e)}toString(){return Tn(this._root)}};function ur(t,n){n.value._routerState=t,n.children.forEach(e=>ur(t,e))}function Tn(t){let n=t.children.length>0?` { ${t.children.map(Tn).join(", ")} } `:"";return`${t.value}${n}`}function Bt(t){if(t.snapshot){let n=t.snapshot,e=t._futureSnapshot;t.snapshot=e,H(n.queryParams,e.queryParams)||t.queryParamsSubject.next(e.queryParams),n.fragment!==e.fragment&&t.fragmentSubject.next(e.fragment),H(n.params,e.params)||t.paramsSubject.next(e.params),ei(n.url,e.url)||t.urlSubject.next(e.url),H(n.data,e.data)||t.dataSubject.next(e.data)}else t.snapshot=t._futureSnapshot,t.dataSubject.next(t._futureSnapshot.data)}function Xt(t,n){let e=H(t.params,n.params)&&oi(t.url,n.url),r=!t.parent!=!n.parent;return e&&!r&&(!t.parent||Xt(t.parent,n.parent))}function Dn(t){return typeof t.title=="string"||t.title===null}var Nn=new M(""),lr=(()=>{class t{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=f;activateEvents=new ne;deactivateEvents=new ne;attachEvents=new ne;detachEvents=new ne;routerOutletData=en();parentContexts=l(we);location=l($r);changeDetector=l(Xe);inputBinder=l(It,{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 w(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new w(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new w(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 w(4013,!1);this._activatedRoute=e;let i=this.location,s=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,c=new er(e,a,i.injector,this.routerOutletData);this.activated=i.createComponent(s,{index:i.length,injector:c,environmentInjector:r}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Te({type:t,selectors:[["router-outlet"]],inputs:{name:"name",routerOutletData:[1,"routerOutletData"]},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],features:[Me]})}return t})(),er=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===G?this.route:n===we?this.childContexts:n===Nn?this.outletData:this.parent.get(n,e)}},It=new M("");var dr=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Hr({type:t,selectors:[["ng-component"]],exportAs:["emptyRouterOutlet"],decls:1,vars:0,template:function(r,i){r&1&&Gr(0,"router-outlet")},dependencies:[lr],encapsulation:2})}return t})();function hr(t){let n=t.children&&t.children.map(hr),e=n?T(d({},t),{children:n}):d({},t);return!e.component&&!e.loadComponent&&(n||e.loadChildren)&&e.outlet&&e.outlet!==f&&(e.component=dr),e}function Mi(t,n,e){let r=ze(t,n._root,e?e._root:void 0);return new ke(r,n)}function ze(t,n,e){if(e&&t.shouldReuseRoute(n.value,e.value.snapshot)){let r=e.value;r._futureSnapshot=n.value;let i=Ti(t,n,e);return new _(r,i)}else{if(t.shouldAttach(n.value)){let o=t.retrieve(n.value);if(o!==null){let s=o.route;return s.value._futureSnapshot=n.value,s.children=n.children.map(a=>ze(t,a)),s}}let r=Di(n.value),i=n.children.map(o=>ze(t,o));return new _(r,i)}}function Ti(t,n,e){return n.children.map(r=>{for(let i of e.children)if(t.shouldReuseRoute(r.value,i.value.snapshot))return ze(t,r,i);return ze(t,r)})}function Di(t){return new G(new O(t.url),new O(t.params),new O(t.queryParams),new O(t.fragment),new O(t.data),t.outlet,t.component,t)}var Se=class{redirectTo;navigationBehaviorOptions;constructor(n,e){this.redirectTo=n,this.navigationBehaviorOptions=e}},_n="ngNavigationCancelingError";function Ct(t,n){let{redirectTo:e,navigationBehaviorOptions:r}=Z(n)?{redirectTo:n,navigationBehaviorOptions:void 0}:n,i=Un(!1,I.Redirect);return i.url=e,i.navigationBehaviorOptions=r,i}function Un(t,n){let e=new Error(`NavigationCancelingError: ${t||""}`);return e[_n]=!0,e.cancellationCode=n,e}function Ni(t){return On(t)&&Z(t.url)}function On(t){return!!t&&t[_n]}var tr=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),Bt(this.futureState.root),this.activateChildRoutes(e,r,n)}deactivateChildRoutes(n,e,r){let i=de(e);n.children.forEach(o=>{let s=o.value.outlet;this.deactivateRoutes(o,i[s],r),delete i[s]}),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 s=r.getContext(i.outlet);s&&this.deactivateChildRoutes(n,e,s.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 s of Object.values(o))this.deactivateRouteAndItsChildren(s,i);if(r&&r.outlet){let s=r.outlet.detach(),a=r.children.onOutletDeactivated();this.routeReuseStrategy.store(n.value.snapshot,{componentRef:s,route:n,contexts:a})}}deactivateRouteAndOutlet(n,e){let r=e.getContext(n.value.outlet),i=r&&n.value.component?r.children:e,o=de(n);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,i);r&&(r.outlet&&(r.outlet.deactivate(),r.children.onOutletDeactivated()),r.attachRef=null,r.route=null)}activateChildRoutes(n,e,r){let i=de(e);n.children.forEach(o=>{this.activateRoutes(o,i[o.value.outlet],r),this.forwardEvent(new yt(o.value.snapshot))}),n.children.length&&this.forwardEvent(new vt(n.value.snapshot))}activateRoutes(n,e,r){let i=n.value,o=e?e.value:null;if(Bt(i),i===o)if(i.component){let s=r.getOrCreateContext(i.outlet);this.activateChildRoutes(n,e,s.children)}else this.activateChildRoutes(n,e,r);else if(i.component){let s=r.getOrCreateContext(i.outlet);if(this.routeReuseStrategy.shouldAttach(i.snapshot)){let a=this.routeReuseStrategy.retrieve(i.snapshot);this.routeReuseStrategy.store(i.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),Bt(a.route.value),this.activateChildRoutes(n,null,s.children)}else s.attachRef=null,s.route=i,s.outlet&&s.outlet.activateWith(i,s.injector),this.activateChildRoutes(n,null,s.children)}else this.activateChildRoutes(n,null,r)}},wt=class{path;route;constructor(n){this.path=n,this.route=this.path[this.path.length-1]}},pe=class{component;route;constructor(n,e){this.component=n,this.route=e}};function _i(t,n,e){let r=t._root,i=n?n._root:null;return _e(r,i,e,[r.value])}function Ui(t){let n=t.routeConfig?t.routeConfig.canActivateChild:null;return!n||n.length===0?null:{node:t,guards:n}}function be(t,n){let e=Symbol(),r=n.get(t,e);return r===e?typeof t=="function"&&!Tr(t)?t:n.get(t):r}function _e(t,n,e,r,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=de(n);return t.children.forEach(s=>{Oi(s,o[s.value.outlet],e,r.concat([s.value]),i),delete o[s.value.outlet]}),Object.entries(o).forEach(([s,a])=>Oe(a,e.getContext(s),i)),i}function Oi(t,n,e,r,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=t.value,s=n?n.value:null,a=e?e.getContext(t.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){let c=Pi(s,o,o.routeConfig.runGuardsAndResolvers);c?i.canActivateChecks.push(new wt(r)):(o.data=s.data,o._resolvedData=s._resolvedData),o.component?_e(t,n,a?a.children:null,r,i):_e(t,n,e,r,i),c&&a&&a.outlet&&a.outlet.isActivated&&i.canDeactivateChecks.push(new pe(a.outlet.component,s))}else s&&Oe(n,a,i),i.canActivateChecks.push(new wt(r)),o.component?_e(t,null,a?a.children:null,r,i):_e(t,null,e,r,i);return i}function Pi(t,n,e){if(typeof e=="function")return N(n._environmentInjector,()=>e(t,n));switch(e){case"pathParamsChange":return!ie(t.url,n.url);case"pathParamsOrQueryParamsChange":return!ie(t.url,n.url)||!H(t.queryParams,n.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Xt(t,n)||!H(t.queryParams,n.queryParams);default:return!Xt(t,n)}}function Oe(t,n,e){let r=de(t),i=t.value;Object.entries(r).forEach(([o,s])=>{i.component?n?Oe(s,n.children.getContext(o),e):Oe(s,null,e):Oe(s,n,e)}),i.component?n&&n.outlet&&n.outlet.isActivated?e.canDeactivateChecks.push(new pe(n.outlet.component,i)):e.canDeactivateChecks.push(new pe(null,i)):e.canDeactivateChecks.push(new pe(null,i))}function qe(t){return typeof t=="function"}function Li(t){return typeof t=="boolean"}function xi(t){return t&&qe(t.canLoad)}function ji(t){return t&&qe(t.canActivate)}function ki(t){return t&&qe(t.canActivateChild)}function $i(t){return t&&qe(t.canDeactivate)}function zi(t){return t&&qe(t.canMatch)}function Pn(t){return t instanceof wr||t?.name==="EmptyError"}var rt=Symbol("INITIAL_VALUE");function Ce(){return $(t=>br(t.map(n=>n.pipe(le(1),Ar(rt)))).pipe(E(n=>{for(let e of n)if(e!==!0){if(e===rt)return rt;if(e===!1||Hi(e))return e}return!0}),re(n=>n!==rt),le(1)))}function Hi(t){return Z(t)||t instanceof Se}function Ln(t){return t.aborted?g(void 0).pipe(le(1)):new Sr(n=>{let e=()=>{n.next(),n.complete()};return t.addEventListener("abort",e),()=>t.removeEventListener("abort",e)})}function xn(t){return Ke(Ln(t))}function Fi(t){return B(n=>{let{targetSnapshot:e,currentSnapshot:r,guards:{canActivateChecks:i,canDeactivateChecks:o}}=n;return o.length===0&&i.length===0?g(T(d({},n),{guardsResult:!0})):qi(o,e,r).pipe(B(s=>s&&Li(s)?Bi(e,i,t):g(s)),E(s=>T(d({},n),{guardsResult:s})))})}function qi(t,n,e){return D(t).pipe(B(r=>Ki(r.component,r.route,e,n)),W(r=>r!==!0,!0))}function Bi(t,n,e){return D(n).pipe(Qe(r=>Ir(Gi(r.route.parent,e),Vi(r.route,e),Qi(t,r.path),Wi(t,r.route))),W(r=>r!==!0,!0))}function Vi(t,n){return t!==null&&n&&n(new mt(t)),g(!0)}function Gi(t,n){return t!==null&&n&&n(new gt(t)),g(!0)}function Wi(t,n){let e=n.routeConfig?n.routeConfig.canActivate:null;if(!e||e.length===0)return g(!0);let r=e.map(i=>Ge(()=>{let o=n._environmentInjector,s=be(i,o),a=ji(s)?s.canActivate(n,t):N(o,()=>s(n,t));return se(a).pipe(W())}));return g(r).pipe(Ce())}function Qi(t,n){let e=n[n.length-1],i=n.slice(0,n.length-1).reverse().map(o=>Ui(o)).filter(o=>o!==null).map(o=>Ge(()=>{let s=o.guards.map(a=>{let c=o.node._environmentInjector,u=be(a,c),h=ki(u)?u.canActivateChild(e,t):N(c,()=>u(e,t));return se(h).pipe(W())});return g(s).pipe(Ce())}));return g(i).pipe(Ce())}function Ki(t,n,e,r){let i=n&&n.routeConfig?n.routeConfig.canDeactivate:null;if(!i||i.length===0)return g(!0);let o=i.map(s=>{let a=n._environmentInjector,c=be(s,a),u=$i(c)?c.canDeactivate(t,n,e,r):N(a,()=>c(t,n,e,r));return se(u).pipe(W())});return g(o).pipe(Ce())}function Yi(t,n,e,r,i){let o=n.canLoad;if(o===void 0||o.length===0)return g(!0);let s=o.map(a=>{let c=be(a,t),u=xi(c)?c.canLoad(n,e):N(t,()=>c(n,e)),h=se(u);return i?h.pipe(xn(i)):h});return g(s).pipe(Ce(),jn(r))}function jn(t){return Rr(j(n=>{if(typeof n!="boolean")throw Ct(t,n)}),E(n=>n===!0))}function Zi(t,n,e,r,i,o){let s=n.canMatch;if(!s||s.length===0)return g(!0);let a=s.map(c=>{let u=be(c,t),h=zi(u)?u.canMatch(n,e,i):N(t,()=>u(n,e,i));return se(h).pipe(xn(o))});return g(a).pipe(Ce(),jn(r))}var V=class t extends Error{segmentGroup;constructor(n){super(),this.segmentGroup=n||null,Object.setPrototypeOf(this,t.prototype)}},He=class t extends Error{urlTree;constructor(n){super(),this.urlTree=n,Object.setPrototypeOf(this,t.prototype)}};function Ji(t){throw new w(4e3,!1)}function Xi(t){throw Un(!1,I.GuardRejected)}var rr=class{urlSerializer;urlTree;constructor(n,e){this.urlSerializer=n,this.urlTree=e}lineralizeSegments(n,e){return m(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 Ji(`${n.redirectTo}`);i=i.children[f]}})}applyRedirectCommands(n,e,r,i,o){return m(this,null,function*(){let s=yield eo(e,i,o);if(s instanceof A)throw new He(s);let a=this.applyRedirectCreateUrlTree(s,this.urlSerializer.parse(s),n,r);if(s[0]==="/")throw new He(a);return a})}applyRedirectCreateUrlTree(n,e,r,i){let o=this.createSegmentGroup(n,e.root,r,i);return new A(o,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 a=o.substring(1);r[i]=e[a]}else r[i]=o}),r}createSegmentGroup(n,e,r,i){let o=this.createSegments(n,e.segments,r,i),s={};return Object.entries(e.children).forEach(([a,c])=>{s[a]=this.createSegmentGroup(n,c,r,i)}),new v(o,s)}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 w(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 eo(t,n,e){if(typeof t=="string")return Promise.resolve(t);let r=t;return at(se(N(e,()=>r(n))))}function to(t,n){return t.providers&&!t._injector&&(t._injector=kt(t.providers,n,`Route: ${t.path}`)),t._injector??n}function k(t){return t.outlet||f}function ro(t,n){let e=t.filter(r=>k(r)===n);return e.push(...t.filter(r=>k(r)!==n)),e}var nr={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function kn(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 no(t,n,e,r,i,o,s){let a=$n(t,n,e);if(!a.matched)return g(a);let c=kn(o(a));return r=to(n,r),Zi(r,n,e,i,c,s).pipe(E(u=>u===!0?a:d({},nr)))}function $n(t,n,e){if(n.path==="")return n.pathMatch==="full"&&(t.hasChildren()||e.length>0)?d({},nr):{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};let i=(n.matcher||ln)(e,t,n);if(!i)return d({},nr);let o={};Object.entries(i.posParams??{}).forEach(([a,c])=>{o[a]=c.path});let s=i.consumed.length>0?d(d({},o),i.consumed[i.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:i.consumed,remainingSegments:e.slice(i.consumed.length),parameters:s,positionalParamSegments:i.posParams??{}}}function cn(t,n,e,r,i){return e.length>0&&ao(t,e,r,i)?{segmentGroup:new v(n,oo(r,new v(e,t.children))),slicedSegments:[]}:e.length===0&&so(t,e,r)?{segmentGroup:new v(t.segments,io(t,e,r,t.children)),slicedSegments:e}:{segmentGroup:new v(t.segments,t.children),slicedSegments:e}}function io(t,n,e,r){let i={};for(let o of e)if(Et(t,n,o)&&!r[k(o)]){let s=new v([],{});i[k(o)]=s}return d(d({},r),i)}function oo(t,n){let e={};e[f]=n;for(let r of t)if(r.path===""&&k(r)!==f){let i=new v([],{});e[k(r)]=i}return e}function ao(t,n,e,r){return e.some(i=>!Et(t,n,i)||!(k(i)!==f)?!1:!(r!==void 0&&k(i)===r))}function so(t,n,e){return e.some(r=>Et(t,n,r))}function Et(t,n,e){return(t.hasChildren()||n.length>0)&&e.pathMatch==="full"?!1:e.path===""}function co(t,n,e){return n.length===0&&!t.children[e]}var ir=class{};function uo(t,n,e,r,i,o,s="emptyOnly",a){return m(this,null,function*(){return new or(t,n,e,r,i,s,o,a).recognize()})}var lo=31,or=class{injector;configLoader;rootComponentType;config;urlTree;paramsInheritanceStrategy;urlSerializer;abortSignal;applyRedirects;absoluteRedirectCount=0;allowRedirects=!0;constructor(n,e,r,i,o,s,a,c){this.injector=n,this.configLoader=e,this.rootComponentType=r,this.config=i,this.urlTree=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a,this.abortSignal=c,this.applyRedirects=new rr(this.urlSerializer,this.urlTree)}noMatchError(n){return new w(4002,`'${n.segmentGroup}'`)}recognize(){return m(this,null,function*(){let n=cn(this.urlTree.root,[],[],this.config).segmentGroup,{children:e,rootSnapshot:r}=yield this.match(n),i=new _(r,e),o=new $e("",i),s=Cn(r,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,o.url=this.urlSerializer.serialize(s),{state:o,tree:s}})}match(n){return m(this,null,function*(){let e=new Re([],Object.freeze({}),Object.freeze(d({},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 He)return this.urlTree=r.urlTree,this.match(r.urlTree.root);throw r instanceof V?this.noMatchError(r):r}})}processSegmentGroup(n,e,r,i,o){return m(this,null,function*(){if(r.segments.length===0&&r.hasChildren())return this.processChildren(n,e,r,o);let s=yield this.processSegment(n,e,r,r.segments,i,!0,o);return s instanceof _?[s]:[]})}processChildren(n,e,r,i){return m(this,null,function*(){let o=[];for(let c of Object.keys(r.children))c==="primary"?o.unshift(c):o.push(c);let s=[];for(let c of o){let u=r.children[c],h=ro(e,c),p=yield this.processSegmentGroup(n,h,u,c,i);s.push(...p)}let a=zn(s);return ho(a),a})}processSegment(n,e,r,i,o,s,a){return m(this,null,function*(){for(let c of e)try{return yield this.processSegmentAgainstRoute(c._injector??n,e,c,r,i,o,s,a)}catch(u){if(u instanceof V||Pn(u))continue;throw u}if(co(r,i,o))return new ir;throw new V(r)})}processSegmentAgainstRoute(n,e,r,i,o,s,a,c){return m(this,null,function*(){if(k(r)!==s&&(s===f||!Et(i,o,r)))throw new V(i);if(r.redirectTo===void 0)return this.matchSegmentAgainstRoute(n,i,r,o,s,c);if(this.allowRedirects&&a)return this.expandSegmentAgainstRouteUsingRedirect(n,i,e,r,o,s,c);throw new V(i)})}expandSegmentAgainstRouteUsingRedirect(n,e,r,i,o,s,a){return m(this,null,function*(){let{matched:c,parameters:u,consumedSegments:h,positionalParamSegments:p,remainingSegments:R}=$n(e,i,o);if(!c)throw new V(e);typeof i.redirectTo=="string"&&i.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>lo&&(this.allowRedirects=!1));let X=this.createSnapshot(n,i,o,u,a);if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);let q=yield this.applyRedirects.applyRedirectCommands(h,i.redirectTo,p,kn(X),n),ee=yield this.applyRedirects.lineralizeSegments(i,q);return this.processSegment(n,r,e,ee.concat(R),s,!1,a)})}createSnapshot(n,e,r,i,o){let s=new Re(r,i,Object.freeze(d({},this.urlTree.queryParams)),this.urlTree.fragment,po(e),k(e),e.component??e._loadedComponent??null,e,go(e),n),a=cr(s,o,this.paramsInheritanceStrategy);return s.params=Object.freeze(a.params),s.data=Object.freeze(a.data),s}matchSegmentAgainstRoute(n,e,r,i,o,s){return m(this,null,function*(){if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);let a=Ve=>this.createSnapshot(n,r,Ve.consumedSegments,Ve.parameters,s),c=yield at(no(e,r,i,n,this.urlSerializer,a,this.abortSignal));if(r.path==="**"&&(e.children={}),!c?.matched)throw new V(e);n=r._injector??n;let{routes:u}=yield this.getChildConfig(n,r,i),h=r._loadedInjector??n,{parameters:p,consumedSegments:R,remainingSegments:X}=c,q=this.createSnapshot(n,r,R,p,s),{segmentGroup:ee,slicedSegments:Ee}=cn(e,R,X,u,o);if(Ee.length===0&&ee.hasChildren()){let Ve=yield this.processChildren(h,u,ee,q);return new _(q,Ve)}if(u.length===0&&Ee.length===0)return new _(q,[]);let Dt=k(r)===o,Ae=yield this.processSegment(h,u,ee,Ee,Dt?f:o,!0,q);return new _(q,Ae instanceof _?[Ae]:[])})}getChildConfig(n,e,r){return m(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 at(Yi(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 Xi(e)}return{routes:[],injector:n}})}};function ho(t){t.sort((n,e)=>n.value.outlet===f?-1:e.value.outlet===f?1:n.value.outlet.localeCompare(e.value.outlet))}function fo(t){let n=t.value.routeConfig;return n&&n.path===""}function zn(t){let n=[],e=new Set;for(let r of t){if(!fo(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=zn(r.children);n.push(new _(r.value,i))}return n.filter(r=>!e.has(r))}function po(t){return t.data||{}}function go(t){return t.resolve||{}}function vo(t,n,e,r,i,o,s){return B(a=>m(null,null,function*(){let{state:c,tree:u}=yield uo(t,n,e,r,a.extractedUrl,i,o,s);return T(d({},a),{targetSnapshot:c,urlAfterRedirects:u})}))}function mo(t){return B(n=>{let{targetSnapshot:e,guards:{canActivateChecks:r}}=n;if(!r.length)return g(n);let i=new Set(r.map(a=>a.route)),o=new Set;for(let a of i)if(!o.has(a))for(let c of Hn(a))o.add(c);let s=0;return D(o).pipe(Qe(a=>i.has(a)?yo(a,e,t):(a.data=cr(a,a.parent,t).resolve,g(void 0))),j(()=>s++),Ut(1),B(a=>s===o.size?g(n):P))})}function Hn(t){let n=t.children.map(e=>Hn(e)).flat();return[t,...n]}function yo(t,n,e){let r=t.routeConfig,i=t._resolve;return r?.title!==void 0&&!Dn(r)&&(i[Fe]=r.title),Ge(()=>(t.data=cr(t,t.parent,e).resolve,Ro(i,t,n).pipe(E(o=>(t._resolvedData=o,t.data=d(d({},t.data),o),null)))))}function Ro(t,n,e){let r=Gt(t);if(r.length===0)return g({});let i={};return D(r).pipe(B(o=>So(t[o],n,e).pipe(W(),j(s=>{if(s instanceof Se)throw Ct(new Y,s);i[o]=s}))),Ut(1),E(()=>i),We(o=>Pn(o)?P:Cr(o)))}function So(t,n,e){let r=n._environmentInjector,i=be(t,r),o=i.resolve?i.resolve(n,e):N(r,()=>i(n,e));return se(o)}function un(t){return $(n=>{let e=t(n);return e?D(e).pipe(E(()=>n)):g(n)})}var fr=(()=>{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[Fe]}static \u0275fac=function(r){return new(r||t)};static \u0275prov=b({token:t,factory:()=>l(Fn),providedIn:"root"})}return t})(),Fn=(()=>{class t extends fr{title;constructor(e){super(),this.title=e}updateTitle(e){let r=this.buildTitle(e);r!==void 0&&this.title.setTitle(r)}static \u0275fac=function(r){return new(r||t)(Ye(rn))};static \u0275prov=b({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Ie=new M("",{factory:()=>({})}),Be=new M(""),qn=(()=>{class t{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=l(Zr);loadComponent(e,r){return m(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=m(this,null,function*(){try{let o=yield hn(N(e,()=>r.loadComponent())),s=yield Gn(Vn(o));return this.onLoadEndListener&&this.onLoadEndListener(r),r._loadedComponent=s,s}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=m(this,null,function*(){try{let o=yield Bn(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 \u0275fac=function(r){return new(r||t)};static \u0275prov=b({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Bn(t,n,e,r){return m(this,null,function*(){let i=yield hn(N(e,()=>t.loadChildren())),o=yield Gn(Vn(i)),s;o instanceof zr||Array.isArray(o)?s=o:s=yield n.compileModuleAsync(o),r&&r(t);let a,c,u=!1,h;return Array.isArray(s)?(c=s,u=!0):(a=s.create(e).injector,h=s,c=a.get(Be,[],{optional:!0,self:!0}).flat()),{routes:c.map(hr),injector:a,factory:h}})}function Co(t){return t&&typeof t=="object"&&"default"in t}function Vn(t){retu