dealposbarcode 1.8.2 → 1.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{chunk-FQA7HR37.js → chunk-57NGCRYH.js} +1 -1
- package/{chunk-SHRZRQ6C.js → chunk-5FTW3GU5.js} +1 -1
- package/chunk-AJDEWWQT.js +5 -0
- package/{chunk-GIIIUOWP.js → chunk-BVFPFG2Y.js} +1 -1
- package/{chunk-67YH224X.js → chunk-EY3YSL4X.js} +1 -1
- package/{chunk-VQWWLWCV.js → chunk-FVVYQAMA.js} +1 -1
- package/chunk-MPZRXVDV.js +1 -0
- package/chunk-PNNBJ4WR.js +7 -0
- package/chunk-QCOAAL7X.js +1 -0
- package/{chunk-IFSVDZCL.js → chunk-WV652PSI.js} +1 -1
- package/{chunk-BPVCVDML.js → chunk-Y7ZU5TZX.js} +1 -1
- package/{chunk-7L7CP4EC.js → chunk-Z2YETF5A.js} +1 -1
- package/chunk-ZQG3LLIR.js +368 -0
- package/index.html +2 -2
- package/{main-O6O6527Z.js → main-IQHQKUAL.js} +2 -2
- package/ngsw.json +30 -30
- package/package.json +1 -1
- package/chunk-4JSMR3XG.js +0 -7
- package/chunk-5AKGF4ZO.js +0 -1
- package/chunk-7LFOYBB6.js +0 -1
- package/chunk-KECVEJRK.js +0 -363
- package/chunk-PQYPFF6U.js +0 -5
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{$a as Uo,$b as Lu,$c as Un,A as Ro,Aa as O,Ab as R,B as K,Ba as Lo,Bb as Mu,Bd as ed,C as w,Ca as C,Cb as Go,D as ln,Da as f,Dc as bt,Dd as Zr,E as ou,Ea as tt,Eb as Pu,Ec as wt,Ed as td,F as au,Fa as yu,Fb as Nu,Fd as Xr,G as cu,Ga as Ti,Gb as Ln,H as kn,Ha as mt,Hb as Gr,I,Ia as Re,Id as nd,J as Di,Ja as F,Jd as Yo,K as we,Kb as ze,L as Mo,La as Ge,M as lu,Mb as xe,Md as es,N as Po,Na as bu,Nb as zo,Nd as ts,O as uu,Oa as nt,Ob as ku,Oc as Oi,P as De,Pa as ke,Pb as xu,Pc as zu,Pd as Qo,Q as du,Qa as Bo,Qb as Wo,Qc as Wr,Ra as it,Rb as un,Rc as qr,Sa as $r,Sc as Jo,Ta as Hr,Tb as Fu,Tc as Jr,U as he,Ua as Bt,Ub as Ee,Uc as st,Va as Vo,Vb as pe,Vc as Kr,W as No,Wa as X,Wb as Bn,X as Ur,Xa as Ei,Xb as ee,Xc as Dt,Ya as Ci,Yb as Ce,Yc as Wu,Z as ye,Za as $,Zc as Vn,_ as xt,_a as H,a as m,ad as We,b as N,ba as ko,bb as fe,bc as Bu,bd as qu,ca as Te,cc as Vu,cd as Yr,da as hu,db as wu,dc as Uu,dd as Ju,ea as fu,eb as jo,ec as Se,ed as jn,f as cn,fb as Du,fc as Fe,fd as Ku,g as h,ga as pu,gb as rt,gc as Vt,gd as Yu,ha as Ft,hc as Ii,hd as z,ia as Lt,ib as $o,ic as Ai,id as Qu,ja as xo,jb as xn,jd as Ri,ka as gu,kb as Fn,kc as zr,kd as Zu,l as tu,lb as Tu,lc as dn,ld as Xu,m as nu,ma as mu,mb as Eu,mc as ju,md as Mi,n as Ne,nb as Cu,nc as ge,nd as Qr,o as Io,oa as _u,ob as Su,oc as ce,p as Ao,pb as Iu,pc as $u,q as x,qa as Fo,qb as Au,qc as Hu,qd as Ko,r as ve,ra as ae,rb as Ou,s as iu,sa as Y,sb as _t,sc as Ut,ta as V,tb as Ho,tc as Gu,u as ru,ua as jr,uc as vt,v as su,va as U,vb as Ru,vc as yt,wa as gt,x as et,xa as y,xc as Le,y as Vr,ya as Oe,yb as Si,yc as qo,z as Oo,za as vu,zb as q,zc as jt}from"./chunk-PNNBJ4WR.js";var Ni=class{},is=class{},Tt=class n{constructor(t){this.normalizedNames=new Map,this.lazyUpdate=null,t?typeof t=="string"?this.lazyInit=()=>{this.headers=new Map,t.split(`
|
|
2
|
+
`).forEach(e=>{let i=e.indexOf(":");if(i>0){let r=e.slice(0,i),s=r.toLowerCase(),o=e.slice(i+1).trim();this.maybeSetNormalizedName(r,s),this.headers.has(s)?this.headers.get(s).push(o):this.headers.set(s,[o])}})}:typeof Headers<"u"&&t instanceof Headers?(this.headers=new Map,t.forEach((e,i)=>{this.setHeaderEntries(i,e)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(t).forEach(([e,i])=>{this.setHeaderEntries(e,i)})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();let e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,e){return this.clone({name:t,value:e,op:"a"})}set(t,e){return this.clone({name:t,value:e,op:"s"})}delete(t,e){return this.clone({name:t,value:e,op:"d"})}maybeSetNormalizedName(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}init(){this.lazyInit&&(this.lazyInit instanceof n?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(e=>{this.headers.set(e,t.headers.get(e)),this.normalizedNames.set(e,t.normalizedNames.get(e))})}clone(t){let e=new n;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof n?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([t]),e}applyUpdate(t){let e=t.name.toLowerCase();switch(t.op){case"a":case"s":let i=t.value;if(typeof i=="string"&&(i=[i]),i.length===0)return;this.maybeSetNormalizedName(t.name,e);let r=(t.op==="a"?this.headers.get(e):void 0)||[];r.push(...i),this.headers.set(e,r);break;case"d":let s=t.value;if(!s)this.headers.delete(e),this.normalizedNames.delete(e);else{let o=this.headers.get(e);if(!o)return;o=o.filter(c=>s.indexOf(c)===-1),o.length===0?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,o)}break}}setHeaderEntries(t,e){let i=(Array.isArray(e)?e:[e]).map(s=>s.toString()),r=t.toLowerCase();this.headers.set(r,i),this.maybeSetNormalizedName(t,r)}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}};var Xo=class{encodeKey(t){return id(t)}encodeValue(t){return id(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}};function ng(n,t){let e=new Map;return n.length>0&&n.replace(/^\?/,"").split("&").forEach(r=>{let s=r.indexOf("="),[o,c]=s==-1?[t.decodeKey(r),""]:[t.decodeKey(r.slice(0,s)),t.decodeValue(r.slice(s+1))],a=e.get(o)||[];a.push(c),e.set(o,a)}),e}var ig=/%(\d[a-f0-9])/gi,rg={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function id(n){return encodeURIComponent(n).replace(ig,(t,e)=>rg[e]??t)}function ns(n){return`${n}`}var $t=class n{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new Xo,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=ng(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{let i=t.fromObject[e],r=Array.isArray(i)?i.map(ns):[ns(i)];this.map.set(e,r)})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();let e=this.map.get(t);return e?e[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,e){return this.clone({param:t,value:e,op:"a"})}appendAll(t){let e=[];return Object.keys(t).forEach(i=>{let r=t[i];Array.isArray(r)?r.forEach(s=>{e.push({param:i,value:s,op:"a"})}):e.push({param:i,value:r,op:"a"})}),this.clone(e)}set(t,e){return this.clone({param:t,value:e,op:"s"})}delete(t,e){return this.clone({param:t,value:e,op:"d"})}toString(){return this.init(),this.keys().map(t=>{let e=this.encoder.encodeKey(t);return this.map.get(t).map(i=>e+"="+this.encoder.encodeValue(i)).join("&")}).filter(t=>t!=="").join("&")}clone(t){let e=new n({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(t),e}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":let e=(t.op==="a"?this.map.get(t.param):void 0)||[];e.push(ns(t.value)),this.map.set(t.param,e);break;case"d":if(t.value!==void 0){let i=this.map.get(t.param)||[],r=i.indexOf(ns(t.value));r!==-1&&i.splice(r,1),i.length>0?this.map.set(t.param,i):this.map.delete(t.param)}else{this.map.delete(t.param);break}}}),this.cloneFrom=this.updates=null)}};var ea=class{constructor(){this.map=new Map}set(t,e){return this.map.set(t,e),this}get(t){return this.map.has(t)||this.map.set(t,t.defaultValue()),this.map.get(t)}delete(t){return this.map.delete(t),this}has(t){return this.map.has(t)}keys(){return this.map.keys()}};function sg(n){switch(n){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function rd(n){return typeof ArrayBuffer<"u"&&n instanceof ArrayBuffer}function sd(n){return typeof Blob<"u"&&n instanceof Blob}function od(n){return typeof FormData<"u"&&n instanceof FormData}function og(n){return typeof URLSearchParams<"u"&&n instanceof URLSearchParams}var Pi=class n{constructor(t,e,i,r){this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=t.toUpperCase();let s;if(sg(this.method)||r?(this.body=i!==void 0?i:null,s=r):s=i,s&&(this.reportProgress=!!s.reportProgress,this.withCredentials=!!s.withCredentials,s.responseType&&(this.responseType=s.responseType),s.headers&&(this.headers=s.headers),s.context&&(this.context=s.context),s.params&&(this.params=s.params),this.transferCache=s.transferCache),this.headers??=new Tt,this.context??=new ea,!this.params)this.params=new $t,this.urlWithParams=e;else{let o=this.params.toString();if(o.length===0)this.urlWithParams=e;else{let c=e.indexOf("?"),a=c===-1?"?":c<e.length-1?"&":"";this.urlWithParams=e+a+o}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||rd(this.body)||sd(this.body)||od(this.body)||og(this.body)?this.body:this.body instanceof $t?this.body.toString():typeof this.body=="object"||typeof this.body=="boolean"||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return this.body===null||od(this.body)?null:sd(this.body)?this.body.type||null:rd(this.body)?null:typeof this.body=="string"?"text/plain":this.body instanceof $t?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?"application/json":null}clone(t={}){let e=t.method||this.method,i=t.url||this.url,r=t.responseType||this.responseType,s=t.transferCache??this.transferCache,o=t.body!==void 0?t.body:this.body,c=t.withCredentials??this.withCredentials,a=t.reportProgress??this.reportProgress,l=t.headers||this.headers,u=t.params||this.params,d=t.context??this.context;return t.setHeaders!==void 0&&(l=Object.keys(t.setHeaders).reduce((p,g)=>p.set(g,t.setHeaders[g]),l)),t.setParams&&(u=Object.keys(t.setParams).reduce((p,g)=>p.set(g,t.setParams[g]),u)),new n(e,i,o,{params:u,headers:l,context:d,reportProgress:a,responseType:r,withCredentials:c,transferCache:s})}},Ht=function(n){return n[n.Sent=0]="Sent",n[n.UploadProgress=1]="UploadProgress",n[n.ResponseHeader=2]="ResponseHeader",n[n.DownloadProgress=3]="DownloadProgress",n[n.Response=4]="Response",n[n.User=5]="User",n}(Ht||{}),ki=class{constructor(t,e=200,i="OK"){this.headers=t.headers||new Tt,this.status=t.status!==void 0?t.status:e,this.statusText=t.statusText||i,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}},rs=class n extends ki{constructor(t={}){super(t),this.type=Ht.ResponseHeader}clone(t={}){return new n({headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}},xi=class n extends ki{constructor(t={}){super(t),this.type=Ht.Response,this.body=t.body!==void 0?t.body:null}clone(t={}){return new n({body:t.body!==void 0?t.body:this.body,headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}},ot=class extends ki{constructor(t){super(t,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${t.url||"(unknown url)"}`:this.message=`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}},dd=200,ag=204;function Zo(n,t){return{body:t,headers:n.headers,context:n.context,observe:n.observe,params:n.params,reportProgress:n.reportProgress,responseType:n.responseType,withCredentials:n.withCredentials,transferCache:n.transferCache}}var ia=(()=>{class n{constructor(e){this.handler=e}request(e,i,r={}){let s;if(e instanceof Pi)s=e;else{let a;r.headers instanceof Tt?a=r.headers:a=new Tt(r.headers);let l;r.params&&(r.params instanceof $t?l=r.params:l=new $t({fromObject:r.params})),s=new Pi(e,i,r.body!==void 0?r.body:null,{headers:a,context:r.context,params:l,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials,transferCache:r.transferCache})}let o=w(s).pipe(xt(a=>this.handler.handle(a)));if(e instanceof Pi||r.observe==="events")return o;let c=o.pipe(he(a=>a instanceof xi));switch(r.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return c.pipe(I(a=>{if(a.body!==null&&!(a.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return a.body}));case"blob":return c.pipe(I(a=>{if(a.body!==null&&!(a.body instanceof Blob))throw new Error("Response is not a Blob.");return a.body}));case"text":return c.pipe(I(a=>{if(a.body!==null&&typeof a.body!="string")throw new Error("Response is not a string.");return a.body}));case"json":default:return c.pipe(I(a=>a.body))}case"response":return c;default:throw new Error(`Unreachable: unhandled observe type ${r.observe}}`)}}delete(e,i={}){return this.request("DELETE",e,i)}get(e,i={}){return this.request("GET",e,i)}head(e,i={}){return this.request("HEAD",e,i)}jsonp(e,i){return this.request("JSONP",e,{params:new $t().append(i,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,i={}){return this.request("OPTIONS",e,i)}patch(e,i,r={}){return this.request("PATCH",e,Zo(r,i))}post(e,i,r={}){return this.request("POST",e,Zo(r,i))}put(e,i,r={}){return this.request("PUT",e,Zo(r,i))}static{this.\u0275fac=function(i){return new(i||n)(C(Ni))}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac})}}return n})(),cg=/^\)\]\}',?\n/,lg="X-Request-URL";function ad(n){if(n.url)return n.url;let t=lg.toLocaleLowerCase();return n.headers.get(t)}var ug=(()=>{class n{constructor(){this.fetchImpl=f(ta,{optional:!0})?.fetch??((...e)=>globalThis.fetch(...e)),this.ngZone=f(H)}handle(e){return new Ne(i=>{let r=new AbortController;return this.doRequest(e,r.signal,i).then(na,s=>i.error(new ot({error:s}))),()=>r.abort()})}doRequest(e,i,r){return h(this,null,function*(){let s=this.createRequestInit(e),o;try{let g=this.ngZone.runOutsideAngular(()=>this.fetchImpl(e.urlWithParams,m({signal:i},s)));dg(g),r.next({type:Ht.Sent}),o=yield g}catch(g){r.error(new ot({error:g,status:g.status??0,statusText:g.statusText,url:e.urlWithParams,headers:g.headers}));return}let c=new Tt(o.headers),a=o.statusText,l=ad(o)??e.urlWithParams,u=o.status,d=null;if(e.reportProgress&&r.next(new rs({headers:c,status:u,statusText:a,url:l})),o.body){let g=o.headers.get("content-length"),b=[],v=o.body.getReader(),_=0,S,k,D=typeof Zone<"u"&&Zone.current;yield this.ngZone.runOutsideAngular(()=>h(this,null,function*(){for(;;){let{done:M,value:P}=yield v.read();if(M)break;if(b.push(P),_+=P.length,e.reportProgress){k=e.responseType==="text"?(k??"")+(S??=new TextDecoder).decode(P,{stream:!0}):void 0;let B=()=>r.next({type:Ht.DownloadProgress,total:g?+g:void 0,loaded:_,partialText:k});D?D.run(B):B()}}}));let E=this.concatChunks(b,_);try{let M=o.headers.get("Content-Type")??"";d=this.parseBody(e,E,M)}catch(M){r.error(new ot({error:M,headers:new Tt(o.headers),status:o.status,statusText:o.statusText,url:ad(o)??e.urlWithParams}));return}}u===0&&(u=d?dd:0),u>=200&&u<300?(r.next(new xi({body:d,headers:c,status:u,statusText:a,url:l})),r.complete()):r.error(new ot({error:d,headers:c,status:u,statusText:a,url:l}))})}parseBody(e,i,r){switch(e.responseType){case"json":let s=new TextDecoder().decode(i).replace(cg,"");return s===""?null:JSON.parse(s);case"text":return new TextDecoder().decode(i);case"blob":return new Blob([i],{type:r});case"arraybuffer":return i.buffer}}createRequestInit(e){let i={},r=e.withCredentials?"include":void 0;if(e.headers.forEach((s,o)=>i[s]=o.join(",")),e.headers.has("Accept")||(i.Accept="application/json, text/plain, */*"),!e.headers.has("Content-Type")){let s=e.detectContentTypeHeader();s!==null&&(i["Content-Type"]=s)}return{body:e.serializeBody(),method:e.method,headers:i,credentials:r}}concatChunks(e,i){let r=new Uint8Array(i),s=0;for(let o of e)r.set(o,s),s+=o.length;return r}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac})}}return n})(),ta=class{};function na(){}function dg(n){n.then(na,na)}function hd(n,t){return t(n)}function hg(n,t){return(e,i)=>t.intercept(e,{handle:r=>n(r,i)})}function fg(n,t,e){return(i,r)=>ke(e,()=>t(i,s=>n(s,r)))}var pg=new O(""),os=new O(""),gg=new O(""),fd=new O("",{providedIn:"root",factory:()=>!0});function mg(){let n=null;return(t,e)=>{n===null&&(n=(f(pg,{optional:!0})??[]).reduceRight(hg,hd));let i=f(Ci);if(f(fd)){let s=i.add();return n(t,e).pipe(Ft(()=>i.remove(s)))}else return n(t,e)}}var cd=(()=>{class n extends Ni{constructor(e,i){super(),this.backend=e,this.injector=i,this.chain=null,this.pendingTasks=f(Ci),this.contributeToStability=f(fd)}handle(e){if(this.chain===null){let i=Array.from(new Set([...this.injector.get(os),...this.injector.get(gg,[])]));this.chain=i.reduceRight((r,s)=>fg(r,s,this.injector),hd)}if(this.contributeToStability){let i=this.pendingTasks.add();return this.chain(e,r=>this.backend.handle(r)).pipe(Ft(()=>this.pendingTasks.remove(i)))}else return this.chain(e,i=>this.backend.handle(i))}static{this.\u0275fac=function(i){return new(i||n)(C(is),C(nt))}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac})}}return n})();var _g=/^\)\]\}',?\n/;function vg(n){return"responseURL"in n&&n.responseURL?n.responseURL:/^X-Request-URL:/m.test(n.getAllResponseHeaders())?n.getResponseHeader("X-Request-URL"):null}var ld=(()=>{class n{constructor(e){this.xhrFactory=e}handle(e){if(e.method==="JSONP")throw new U(-2800,!1);let i=this.xhrFactory;return(i.\u0275loadImpl?K(i.\u0275loadImpl()):w(null)).pipe(ae(()=>new Ne(s=>{let o=i.build();if(o.open(e.method,e.urlWithParams),e.withCredentials&&(o.withCredentials=!0),e.headers.forEach((v,_)=>o.setRequestHeader(v,_.join(","))),e.headers.has("Accept")||o.setRequestHeader("Accept","application/json, text/plain, */*"),!e.headers.has("Content-Type")){let v=e.detectContentTypeHeader();v!==null&&o.setRequestHeader("Content-Type",v)}if(e.responseType){let v=e.responseType.toLowerCase();o.responseType=v!=="json"?v:"text"}let c=e.serializeBody(),a=null,l=()=>{if(a!==null)return a;let v=o.statusText||"OK",_=new Tt(o.getAllResponseHeaders()),S=vg(o)||e.url;return a=new rs({headers:_,status:o.status,statusText:v,url:S}),a},u=()=>{let{headers:v,status:_,statusText:S,url:k}=l(),D=null;_!==ag&&(D=typeof o.response>"u"?o.responseText:o.response),_===0&&(_=D?dd:0);let E=_>=200&&_<300;if(e.responseType==="json"&&typeof D=="string"){let M=D;D=D.replace(_g,"");try{D=D!==""?JSON.parse(D):null}catch(P){D=M,E&&(E=!1,D={error:P,text:D})}}E?(s.next(new xi({body:D,headers:v,status:_,statusText:S,url:k||void 0})),s.complete()):s.error(new ot({error:D,headers:v,status:_,statusText:S,url:k||void 0}))},d=v=>{let{url:_}=l(),S=new ot({error:v,status:o.status||0,statusText:o.statusText||"Unknown Error",url:_||void 0});s.error(S)},p=!1,g=v=>{p||(s.next(l()),p=!0);let _={type:Ht.DownloadProgress,loaded:v.loaded};v.lengthComputable&&(_.total=v.total),e.responseType==="text"&&o.responseText&&(_.partialText=o.responseText),s.next(_)},b=v=>{let _={type:Ht.UploadProgress,loaded:v.loaded};v.lengthComputable&&(_.total=v.total),s.next(_)};return o.addEventListener("load",u),o.addEventListener("error",d),o.addEventListener("timeout",d),o.addEventListener("abort",d),e.reportProgress&&(o.addEventListener("progress",g),c!==null&&o.upload&&o.upload.addEventListener("progress",b)),o.send(c),s.next({type:Ht.Sent}),()=>{o.removeEventListener("error",d),o.removeEventListener("abort",d),o.removeEventListener("load",u),o.removeEventListener("timeout",d),e.reportProgress&&(o.removeEventListener("progress",g),c!==null&&o.upload&&o.upload.removeEventListener("progress",b)),o.readyState!==o.DONE&&o.abort()}})))}static{this.\u0275fac=function(i){return new(i||n)(C(Xr))}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac})}}return n})(),pd=new O(""),yg="XSRF-TOKEN",bg=new O("",{providedIn:"root",factory:()=>yg}),wg="X-XSRF-TOKEN",Dg=new O("",{providedIn:"root",factory:()=>wg}),ss=class{},Tg=(()=>{class n{constructor(e,i,r){this.doc=e,this.platform=i,this.cookieName=r,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if(this.platform==="server")return null;let e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=Qr(e,this.cookieName),this.lastCookieString=e),this.lastToken}static{this.\u0275fac=function(i){return new(i||n)(C(z),C(rt),C(bg))}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac})}}return n})();function Eg(n,t){let e=n.url.toLowerCase();if(!f(pd)||n.method==="GET"||n.method==="HEAD"||e.startsWith("http://")||e.startsWith("https://"))return t(n);let i=f(ss).getToken(),r=f(Dg);return i!=null&&!n.headers.has(r)&&(n=n.clone({headers:n.headers.set(r,i)})),t(n)}var ra=function(n){return n[n.Interceptors=0]="Interceptors",n[n.LegacyInterceptors=1]="LegacyInterceptors",n[n.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",n[n.NoXsrfProtection=3]="NoXsrfProtection",n[n.JsonpSupport=4]="JsonpSupport",n[n.RequestsMadeViaParent=5]="RequestsMadeViaParent",n[n.Fetch=6]="Fetch",n}(ra||{});function gd(n,t){return{\u0275kind:n,\u0275providers:t}}function SD(...n){let t=[ia,ld,cd,{provide:Ni,useExisting:cd},{provide:is,useFactory:()=>f(ug,{optional:!0})??f(ld)},{provide:os,useValue:Eg,multi:!0},{provide:pd,useValue:!0},{provide:ss,useClass:Tg}];for(let e of n)t.push(...e.\u0275providers);return Ge(t)}function ID(n){return gd(ra.Interceptors,n.map(t=>({provide:os,useValue:t,multi:!0})))}var ud=new O("");function AD(){return gd(ra.LegacyInterceptors,[{provide:ud,useFactory:mg},{provide:os,useExisting:ud,multi:!0}])}var aa=class extends Yu{constructor(){super(...arguments),this.supportsDOMEvents=!0}},ca=class n extends aa{static makeCurrent(){Ku(new n)}onAndCancel(t,e,i){return t.addEventListener(e,i),()=>{t.removeEventListener(e,i)}}dispatchEvent(t,e){t.dispatchEvent(e)}remove(t){t.remove()}createElement(t,e){return e=e||this.getDefaultDocument(),e.createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,e){return e==="window"?window:e==="document"?t:e==="body"?t.body:null}getBaseHref(t){let e=Sg();return e==null?null:Ig(e)}resetBaseElement(){Fi=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return Qr(document.cookie,t)}},Fi=null;function Sg(){return Fi=Fi||document.querySelector("base"),Fi?Fi.getAttribute("href"):null}function Ig(n){return new URL(n,document.baseURI).pathname}var Ag=(()=>{class n{build(){return new XMLHttpRequest}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac})}}return n})(),la=new O(""),yd=(()=>{class n{constructor(e,i){this._zone=i,this._eventNameToPlugin=new Map,e.forEach(r=>{r.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,i,r){return this._findPluginFor(i).addEventListener(e,i,r)}getZone(){return this._zone}_findPluginFor(e){let i=this._eventNameToPlugin.get(e);if(i)return i;if(i=this._plugins.find(s=>s.supports(e)),!i)throw new U(5101,!1);return this._eventNameToPlugin.set(e,i),i}static{this.\u0275fac=function(i){return new(i||n)(C(la),C(H))}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac})}}return n})(),as=class{constructor(t){this._doc=t}},sa="ng-app-id",bd=(()=>{class n{constructor(e,i,r,s={}){this.doc=e,this.appId=i,this.nonce=r,this.platformId=s,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=Zr(s),this.resetHostNodes()}addStyles(e){for(let i of e)this.changeUsageCount(i,1)===1&&this.onStyleAdded(i)}removeStyles(e){for(let i of e)this.changeUsageCount(i,-1)<=0&&this.onStyleRemoved(i)}ngOnDestroy(){let e=this.styleNodesInDOM;e&&(e.forEach(i=>i.remove()),e.clear());for(let i of this.getAllStyles())this.onStyleRemoved(i);this.resetHostNodes()}addHost(e){this.hostNodes.add(e);for(let i of this.getAllStyles())this.addStyleToHost(e,i)}removeHost(e){this.hostNodes.delete(e)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(e){for(let i of this.hostNodes)this.addStyleToHost(i,e)}onStyleRemoved(e){let i=this.styleRef;i.get(e)?.elements?.forEach(r=>r.remove()),i.delete(e)}collectServerRenderedStyles(){let e=this.doc.head?.querySelectorAll(`style[${sa}="${this.appId}"]`);if(e?.length){let i=new Map;return e.forEach(r=>{r.textContent!=null&&i.set(r.textContent,r)}),i}return null}changeUsageCount(e,i){let r=this.styleRef;if(r.has(e)){let s=r.get(e);return s.usage+=i,s.usage}return r.set(e,{usage:i,elements:[]}),i}getStyleElement(e,i){let r=this.styleNodesInDOM,s=r?.get(i);if(s?.parentNode===e)return r.delete(i),s.removeAttribute(sa),s;{let o=this.doc.createElement("style");return this.nonce&&o.setAttribute("nonce",this.nonce),o.textContent=i,this.platformIsServer&&o.setAttribute(sa,this.appId),e.appendChild(o),o}}addStyleToHost(e,i){let r=this.getStyleElement(e,i),s=this.styleRef,o=s.get(i)?.elements;o?o.push(r):s.set(i,{elements:[r],usage:1})}resetHostNodes(){let e=this.hostNodes;e.clear(),e.add(this.doc.head)}static{this.\u0275fac=function(i){return new(i||n)(C(z),C(jo),C($o,8),C(rt))}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac})}}return n})(),oa={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},da=/%COMP%/g,wd="%COMP%",Og=`_nghost-${wd}`,Rg=`_ngcontent-${wd}`,Mg=!0,Pg=new O("",{providedIn:"root",factory:()=>Mg});function Ng(n){return Rg.replace(da,n)}function kg(n){return Og.replace(da,n)}function Dd(n,t){return t.map(e=>e.replace(da,n))}var md=(()=>{class n{constructor(e,i,r,s,o,c,a,l=null){this.eventManager=e,this.sharedStylesHost=i,this.appId=r,this.removeStylesOnCompDestroy=s,this.doc=o,this.platformId=c,this.ngZone=a,this.nonce=l,this.rendererByCompId=new Map,this.platformIsServer=Zr(c),this.defaultRenderer=new Li(e,o,a,this.platformIsServer)}createRenderer(e,i){if(!e||!i)return this.defaultRenderer;this.platformIsServer&&i.encapsulation===Ti.ShadowDom&&(i=N(m({},i),{encapsulation:Ti.Emulated}));let r=this.getOrCreateRenderer(e,i);return r instanceof cs?r.applyToHost(e):r instanceof Bi&&r.applyStyles(),r}getOrCreateRenderer(e,i){let r=this.rendererByCompId,s=r.get(i.id);if(!s){let o=this.doc,c=this.ngZone,a=this.eventManager,l=this.sharedStylesHost,u=this.removeStylesOnCompDestroy,d=this.platformIsServer;switch(i.encapsulation){case Ti.Emulated:s=new cs(a,l,i,this.appId,u,o,c,d);break;case Ti.ShadowDom:return new ua(a,l,e,i,o,c,this.nonce,d);default:s=new Bi(a,l,i,u,o,c,d);break}r.set(i.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}static{this.\u0275fac=function(i){return new(i||n)(C(yd),C(bd),C(jo),C(Pg),C(z),C(rt),C(H),C($o))}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac})}}return n})(),Li=class{constructor(t,e,i,r){this.eventManager=t,this.doc=e,this.ngZone=i,this.platformIsServer=r,this.data=Object.create(null),this.throwOnSyntheticProps=!0,this.destroyNode=null}destroy(){}createElement(t,e){return e?this.doc.createElementNS(oa[e]||e,t):this.doc.createElement(t)}createComment(t){return this.doc.createComment(t)}createText(t){return this.doc.createTextNode(t)}appendChild(t,e){(_d(t)?t.content:t).appendChild(e)}insertBefore(t,e,i){t&&(_d(t)?t.content:t).insertBefore(e,i)}removeChild(t,e){e.remove()}selectRootElement(t,e){let i=typeof t=="string"?this.doc.querySelector(t):t;if(!i)throw new U(-5104,!1);return e||(i.textContent=""),i}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,i,r){if(r){e=r+":"+e;let s=oa[r];s?t.setAttributeNS(s,e,i):t.setAttribute(e,i)}else t.setAttribute(e,i)}removeAttribute(t,e,i){if(i){let r=oa[i];r?t.removeAttributeNS(r,e):t.removeAttribute(`${i}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,i,r){r&(Si.DashCase|Si.Important)?t.style.setProperty(e,i,r&Si.Important?"important":""):t.style[e]=i}removeStyle(t,e,i){i&Si.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,i){t!=null&&(t[e]=i)}setValue(t,e){t.nodeValue=e}listen(t,e,i){if(typeof t=="string"&&(t=jn().getGlobalEventTarget(this.doc,t),!t))throw new Error(`Unsupported event target ${t} for event ${e}`);return this.eventManager.addEventListener(t,e,this.decoratePreventDefault(i))}decoratePreventDefault(t){return e=>{if(e==="__ngUnwrap__")return t;(this.platformIsServer?this.ngZone.runGuarded(()=>t(e)):t(e))===!1&&e.preventDefault()}}};function _d(n){return n.tagName==="TEMPLATE"&&n.content!==void 0}var ua=class extends Li{constructor(t,e,i,r,s,o,c,a){super(t,s,o,a),this.sharedStylesHost=e,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let l=Dd(r.id,r.styles);for(let u of l){let d=document.createElement("style");c&&d.setAttribute("nonce",c),d.textContent=u,this.shadowRoot.appendChild(d)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}appendChild(t,e){return super.appendChild(this.nodeOrShadowRoot(t),e)}insertBefore(t,e,i){return super.insertBefore(this.nodeOrShadowRoot(t),e,i)}removeChild(t,e){return super.removeChild(null,e)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},Bi=class extends Li{constructor(t,e,i,r,s,o,c,a){super(t,s,o,c),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=r,this.styles=a?Dd(a,i.styles):i.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}},cs=class extends Bi{constructor(t,e,i,r,s,o,c,a){let l=r+"-"+i.id;super(t,e,i,s,o,c,a,l),this.contentAttr=Ng(l),this.hostAttr=kg(l)}applyToHost(t){this.applyStyles(),this.setAttribute(t,this.hostAttr,"")}createElement(t,e){let i=super.createElement(t,e);return super.setAttribute(i,this.contentAttr,""),i}},xg=(()=>{class n extends as{constructor(e){super(e)}supports(e){return!0}addEventListener(e,i,r){return e.addEventListener(i,r,!1),()=>this.removeEventListener(e,i,r)}removeEventListener(e,i,r){return e.removeEventListener(i,r)}static{this.\u0275fac=function(i){return new(i||n)(C(z))}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac})}}return n})(),vd=["alt","control","meta","shift"],Fg={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Lg={alt:n=>n.altKey,control:n=>n.ctrlKey,meta:n=>n.metaKey,shift:n=>n.shiftKey},Bg=(()=>{class n extends as{constructor(e){super(e)}supports(e){return n.parseEventName(e)!=null}addEventListener(e,i,r){let s=n.parseEventName(i),o=n.eventCallback(s.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>jn().onAndCancel(e,s.domEventName,o))}static parseEventName(e){let i=e.toLowerCase().split("."),r=i.shift();if(i.length===0||!(r==="keydown"||r==="keyup"))return null;let s=n._normalizeKey(i.pop()),o="",c=i.indexOf("code");if(c>-1&&(i.splice(c,1),o="code."),vd.forEach(l=>{let u=i.indexOf(l);u>-1&&(i.splice(u,1),o+=l+".")}),o+=s,i.length!=0||s.length===0)return null;let a={};return a.domEventName=r,a.fullKey=o,a}static matchEventFullKeyCode(e,i){let r=Fg[e.key]||e.key,s="";return i.indexOf("code.")>-1&&(r=e.code,s="code."),r==null||!r?!1:(r=r.toLowerCase(),r===" "?r="space":r==="."&&(r="dot"),vd.forEach(o=>{if(o!==r){let c=Lg[o];c(e)&&(s+=o+".")}}),s+=r,s===i)}static eventCallback(e,i,r){return s=>{n.matchEventFullKeyCode(s,e)&&r.runGuarded(()=>i(s))}}static _normalizeKey(e){return e==="esc"?"escape":e}static{this.\u0275fac=function(i){return new(i||n)(C(z))}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac})}}return n})();function ZD(n,t){return Wu(m({rootComponent:n},Vg(t)))}function Vg(n){return{appProviders:[...Gg,...n?.providers??[]],platformProviders:Hg}}function Ug(){ca.makeCurrent()}function jg(){return new Uo}function $g(){return wu(document),document}var Hg=[{provide:rt,useValue:ed},{provide:Du,useValue:Ug,multi:!0},{provide:z,useFactory:$g,deps:[]}];var Gg=[{provide:bu,useValue:"root"},{provide:Uo,useFactory:jg,deps:[]},{provide:la,useClass:xg,multi:!0,deps:[z,H,rt]},{provide:la,useClass:Bg,multi:!0,deps:[z]},md,bd,yd,{provide:Nu,useExisting:md},{provide:Xr,useClass:Ag,deps:[]},[]];var Td=(()=>{class n{constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static{this.\u0275fac=function(i){return new(i||n)(C(z))}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var ha=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:function(i){let r=null;return i?r=new(i||n):r=C(zg),r},providedIn:"root"})}}return n})(),zg=(()=>{class n extends ha{constructor(e){super(),this._doc=e}sanitize(e,i){if(i==null)return null;switch(e){case _t.NONE:return i;case _t.HTML:return Fn(i,"HTML")?xn(i):Ou(this._doc,String(i)).toString();case _t.STYLE:return Fn(i,"Style")?xn(i):i;case _t.SCRIPT:if(Fn(i,"Script"))return xn(i);throw new U(5200,!1);case _t.URL:return Fn(i,"URL")?xn(i):Au(String(i));case _t.RESOURCE_URL:if(Fn(i,"ResourceURL"))return xn(i);throw new U(5201,!1);default:throw new U(5202,!1)}}bypassSecurityTrustHtml(e){return Tu(e)}bypassSecurityTrustStyle(e){return Eu(e)}bypassSecurityTrustScript(e){return Cu(e)}bypassSecurityTrustUrl(e){return Su(e)}bypassSecurityTrustResourceUrl(e){return Iu(e)}static{this.\u0275fac=function(i){return new(i||n)(C(z))}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var A="primary",Xi=Symbol("RouteTitle"),_a=class{constructor(t){this.params=t||{}}has(t){return Object.prototype.hasOwnProperty.call(this.params,t)}get(t){if(this.has(t)){let e=this.params[t];return Array.isArray(e)?e[0]:e}return null}getAll(t){if(this.has(t)){let e=this.params[t];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}};function qn(n){return new _a(n)}function Wg(n,t,e){let i=e.path.split("/");if(i.length>n.length||e.pathMatch==="full"&&(t.hasChildren()||i.length<n.length))return null;let r={};for(let s=0;s<i.length;s++){let o=i[s],c=n[s];if(o[0]===":")r[o.substring(1)]=c;else if(o!==c.path)return null}return{consumed:n.slice(0,i.length),posParams:r}}function qg(n,t){if(n.length!==t.length)return!1;for(let e=0;e<n.length;++e)if(!at(n[e],t[e]))return!1;return!0}function at(n,t){let e=n?va(n):void 0,i=t?va(t):void 0;if(!e||!i||e.length!=i.length)return!1;let r;for(let s=0;s<e.length;s++)if(r=e[s],!xd(n[r],t[r]))return!1;return!0}function va(n){return[...Object.keys(n),...Object.getOwnPropertySymbols(n)]}function xd(n,t){if(Array.isArray(n)&&Array.isArray(t)){if(n.length!==t.length)return!1;let e=[...n].sort(),i=[...t].sort();return e.every((r,s)=>i[s]===r)}else return n===t}function Fd(n){return n.length>0?n[n.length-1]:null}function Wt(n){return ou(n)?n:qr(n)?K(Promise.resolve(n)):w(n)}var Jg={exact:Bd,subset:Vd},Ld={exact:Kg,subset:Yg,ignored:()=>!0};function Cd(n,t,e){return Jg[e.paths](n.root,t.root,e.matrixParams)&&Ld[e.queryParams](n.queryParams,t.queryParams)&&!(e.fragment==="exact"&&n.fragment!==t.fragment)}function Kg(n,t){return at(n,t)}function Bd(n,t,e){if(!fn(n.segments,t.segments)||!ds(n.segments,t.segments,e)||n.numberOfChildren!==t.numberOfChildren)return!1;for(let i in t.children)if(!n.children[i]||!Bd(n.children[i],t.children[i],e))return!1;return!0}function Yg(n,t){return Object.keys(t).length<=Object.keys(n).length&&Object.keys(t).every(e=>xd(n[e],t[e]))}function Vd(n,t,e){return Ud(n,t,t.segments,e)}function Ud(n,t,e,i){if(n.segments.length>e.length){let r=n.segments.slice(0,e.length);return!(!fn(r,e)||t.hasChildren()||!ds(r,e,i))}else if(n.segments.length===e.length){if(!fn(n.segments,e)||!ds(n.segments,e,i))return!1;for(let r in t.children)if(!n.children[r]||!Vd(n.children[r],t.children[r],i))return!1;return!0}else{let r=e.slice(0,n.segments.length),s=e.slice(n.segments.length);return!fn(n.segments,r)||!ds(n.segments,r,i)||!n.children[A]?!1:Ud(n.children[A],t,s,i)}}function ds(n,t,e){return t.every((i,r)=>Ld[e](n[r].parameters,i.parameters))}var Ct=class{constructor(t=new L([],{}),e={},i=null){this.root=t,this.queryParams=e,this.fragment=i}get queryParamMap(){return this._queryParamMap??=qn(this.queryParams),this._queryParamMap}toString(){return Xg.serialize(this)}},L=class{constructor(t,e){this.segments=t,this.children=e,this.parent=null,Object.values(e).forEach(i=>i.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return hs(this)}},hn=class{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap??=qn(this.parameters),this._parameterMap}toString(){return $d(this)}};function Qg(n,t){return fn(n,t)&&n.every((e,i)=>at(e.parameters,t[i].parameters))}function fn(n,t){return n.length!==t.length?!1:n.every((e,i)=>e.path===t[i].path)}function Zg(n,t){let e=[];return Object.entries(n.children).forEach(([i,r])=>{i===A&&(e=e.concat(t(r,i)))}),Object.entries(n.children).forEach(([i,r])=>{i!==A&&(e=e.concat(t(r,i)))}),e}var er=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:()=>new Jn,providedIn:"root"})}}return n})(),Jn=class{parse(t){let e=new ba(t);return new Ct(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){let e=`/${Vi(t.root,!0)}`,i=nm(t.queryParams),r=typeof t.fragment=="string"?`#${em(t.fragment)}`:"";return`${e}${i}${r}`}},Xg=new Jn;function hs(n){return n.segments.map(t=>$d(t)).join("/")}function Vi(n,t){if(!n.hasChildren())return hs(n);if(t){let e=n.children[A]?Vi(n.children[A],!1):"",i=[];return Object.entries(n.children).forEach(([r,s])=>{r!==A&&i.push(`${r}:${Vi(s,!1)}`)}),i.length>0?`${e}(${i.join("//")})`:e}else{let e=Zg(n,(i,r)=>r===A?[Vi(n.children[A],!1)]:[`${r}:${Vi(i,!1)}`]);return Object.keys(n.children).length===1&&n.children[A]!=null?`${hs(n)}/${e[0]}`:`${hs(n)}/(${e.join("//")})`}}function jd(n){return encodeURIComponent(n).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function ls(n){return jd(n).replace(/%3B/gi,";")}function em(n){return encodeURI(n)}function ya(n){return jd(n).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function fs(n){return decodeURIComponent(n)}function Sd(n){return fs(n.replace(/\+/g,"%20"))}function $d(n){return`${ya(n.path)}${tm(n.parameters)}`}function tm(n){return Object.entries(n).map(([t,e])=>`;${ya(t)}=${ya(e)}`).join("")}function nm(n){let t=Object.entries(n).map(([e,i])=>Array.isArray(i)?i.map(r=>`${ls(e)}=${ls(r)}`).join("&"):`${ls(e)}=${ls(i)}`).filter(e=>e);return t.length?`?${t.join("&")}`:""}var im=/^[^\/()?;#]+/;function fa(n){let t=n.match(im);return t?t[0]:""}var rm=/^[^\/()?;=#]+/;function sm(n){let t=n.match(rm);return t?t[0]:""}var om=/^[^=?&#]+/;function am(n){let t=n.match(om);return t?t[0]:""}var cm=/^[^&#]+/;function lm(n){let t=n.match(cm);return t?t[0]:""}var ba=class{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new L([],{}):new L([],this.parseChildren())}parseQueryParams(){let t={};if(this.consumeOptional("?"))do this.parseQueryParam(t);while(this.consumeOptional("&"));return t}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1)),(t.length>0||Object.keys(e).length>0)&&(i[A]=new L(t,e)),i}parseSegment(){let t=fa(this.remaining);if(t===""&&this.peekStartsWith(";"))throw new U(4009,!1);return this.capture(t),new hn(fs(t),this.parseMatrixParams())}parseMatrixParams(){let t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){let e=sm(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){let r=fa(this.remaining);r&&(i=r,this.capture(i))}t[fs(e)]=fs(i)}parseQueryParam(t){let e=am(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){let o=lm(this.remaining);o&&(i=o,this.capture(i))}let r=Sd(e),s=Sd(i);if(t.hasOwnProperty(r)){let o=t[r];Array.isArray(o)||(o=[o],t[r]=o),o.push(s)}else t[r]=s}parseParens(t){let e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let i=fa(this.remaining),r=this.remaining[i.length];if(r!=="/"&&r!==")"&&r!==";")throw new U(4010,!1);let s;i.indexOf(":")>-1?(s=i.slice(0,i.indexOf(":")),this.capture(s),this.capture(":")):t&&(s=A);let o=this.parseChildren();e[s]=Object.keys(o).length===1?o[A]:new L([],o),this.consumeOptional("//")}return e}peekStartsWith(t){return this.remaining.startsWith(t)}consumeOptional(t){return this.peekStartsWith(t)?(this.remaining=this.remaining.substring(t.length),!0):!1}capture(t){if(!this.consumeOptional(t))throw new U(4011,!1)}};function Hd(n){return n.segments.length>0?new L([],{[A]:n}):n}function Gd(n){let t={};for(let[i,r]of Object.entries(n.children)){let s=Gd(r);if(i===A&&s.segments.length===0&&s.hasChildren())for(let[o,c]of Object.entries(s.children))t[o]=c;else(s.segments.length>0||s.hasChildren())&&(t[i]=s)}let e=new L(n.segments,t);return um(e)}function um(n){if(n.numberOfChildren===1&&n.children[A]){let t=n.children[A];return new L(n.segments.concat(t.segments),t.children)}return n}function pn(n){return n instanceof Ct}function dm(n,t,e=null,i=null){let r=zd(n);return Wd(r,t,e,i)}function zd(n){let t;function e(s){let o={};for(let a of s.children){let l=e(a);o[a.outlet]=l}let c=new L(s.url,o);return s===n&&(t=c),c}let i=e(n.root),r=Hd(i);return t??r}function Wd(n,t,e,i){let r=n;for(;r.parent;)r=r.parent;if(t.length===0)return pa(r,r,r,e,i);let s=hm(t);if(s.toRoot())return pa(r,r,new L([],{}),e,i);let o=fm(s,r,n),c=o.processChildren?$i(o.segmentGroup,o.index,s.commands):Jd(o.segmentGroup,o.index,s.commands);return pa(r,o.segmentGroup,c,e,i)}function ps(n){return typeof n=="object"&&n!=null&&!n.outlets&&!n.segmentPath}function zi(n){return typeof n=="object"&&n!=null&&n.outlets}function pa(n,t,e,i,r){let s={};i&&Object.entries(i).forEach(([a,l])=>{s[a]=Array.isArray(l)?l.map(u=>`${u}`):`${l}`});let o;n===t?o=e:o=qd(n,t,e);let c=Hd(Gd(o));return new Ct(c,s,r)}function qd(n,t,e){let i={};return Object.entries(n.children).forEach(([r,s])=>{s===t?i[r]=e:i[r]=qd(s,t,e)}),new L(n.segments,i)}var gs=class{constructor(t,e,i){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=i,t&&i.length>0&&ps(i[0]))throw new U(4003,!1);let r=i.find(zi);if(r&&r!==Fd(i))throw new U(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function hm(n){if(typeof n[0]=="string"&&n.length===1&&n[0]==="/")return new gs(!0,0,n);let t=0,e=!1,i=n.reduce((r,s,o)=>{if(typeof s=="object"&&s!=null){if(s.outlets){let c={};return Object.entries(s.outlets).forEach(([a,l])=>{c[a]=typeof l=="string"?l.split("/"):l}),[...r,{outlets:c}]}if(s.segmentPath)return[...r,s.segmentPath]}return typeof s!="string"?[...r,s]:o===0?(s.split("/").forEach((c,a)=>{a==0&&c==="."||(a==0&&c===""?e=!0:c===".."?t++:c!=""&&r.push(c))}),r):[...r,s]},[]);return new gs(e,t,i)}var Gn=class{constructor(t,e,i){this.segmentGroup=t,this.processChildren=e,this.index=i}};function fm(n,t,e){if(n.isAbsolute)return new Gn(t,!0,0);if(!e)return new Gn(t,!1,NaN);if(e.parent===null)return new Gn(e,!0,0);let i=ps(n.commands[0])?0:1,r=e.segments.length-1+i;return pm(e,r,n.numberOfDoubleDots)}function pm(n,t,e){let i=n,r=t,s=e;for(;s>r;){if(s-=r,i=i.parent,!i)throw new U(4005,!1);r=i.segments.length}return new Gn(i,!1,r-s)}function gm(n){return zi(n[0])?n[0].outlets:{[A]:n}}function Jd(n,t,e){if(n??=new L([],{}),n.segments.length===0&&n.hasChildren())return $i(n,t,e);let i=mm(n,t,e),r=e.slice(i.commandIndex);if(i.match&&i.pathIndex<n.segments.length){let s=new L(n.segments.slice(0,i.pathIndex),{});return s.children[A]=new L(n.segments.slice(i.pathIndex),n.children),$i(s,0,r)}else return i.match&&r.length===0?new L(n.segments,{}):i.match&&!n.hasChildren()?wa(n,t,e):i.match?$i(n,0,r):wa(n,t,e)}function $i(n,t,e){if(e.length===0)return new L(n.segments,{});{let i=gm(e),r={};if(Object.keys(i).some(s=>s!==A)&&n.children[A]&&n.numberOfChildren===1&&n.children[A].segments.length===0){let s=$i(n.children[A],t,e);return new L(n.segments,s.children)}return Object.entries(i).forEach(([s,o])=>{typeof o=="string"&&(o=[o]),o!==null&&(r[s]=Jd(n.children[s],t,o))}),Object.entries(n.children).forEach(([s,o])=>{i[s]===void 0&&(r[s]=o)}),new L(n.segments,r)}}function mm(n,t,e){let i=0,r=t,s={match:!1,pathIndex:0,commandIndex:0};for(;r<n.segments.length;){if(i>=e.length)return s;let o=n.segments[r],c=e[i];if(zi(c))break;let a=`${c}`,l=i<e.length-1?e[i+1]:null;if(r>0&&a===void 0)break;if(a&&l&&typeof l=="object"&&l.outlets===void 0){if(!Ad(a,l,o))return s;i+=2}else{if(!Ad(a,{},o))return s;i++}r++}return{match:!0,pathIndex:r,commandIndex:i}}function wa(n,t,e){let i=n.segments.slice(0,t),r=0;for(;r<e.length;){let s=e[r];if(zi(s)){let a=_m(s.outlets);return new L(i,a)}if(r===0&&ps(e[0])){let a=n.segments[t];i.push(new hn(a.path,Id(e[0]))),r++;continue}let o=zi(s)?s.outlets[A]:`${s}`,c=r<e.length-1?e[r+1]:null;o&&c&&ps(c)?(i.push(new hn(o,Id(c))),r+=2):(i.push(new hn(o,{})),r++)}return new L(i,{})}function _m(n){let t={};return Object.entries(n).forEach(([e,i])=>{typeof i=="string"&&(i=[i]),i!==null&&(t[e]=wa(new L([],{}),0,i))}),t}function Id(n){let t={};return Object.entries(n).forEach(([e,i])=>t[e]=`${i}`),t}function Ad(n,t,e){return n==e.path&&at(t,e.parameters)}var Hi="imperative",ie=function(n){return n[n.NavigationStart=0]="NavigationStart",n[n.NavigationEnd=1]="NavigationEnd",n[n.NavigationCancel=2]="NavigationCancel",n[n.NavigationError=3]="NavigationError",n[n.RoutesRecognized=4]="RoutesRecognized",n[n.ResolveStart=5]="ResolveStart",n[n.ResolveEnd=6]="ResolveEnd",n[n.GuardsCheckStart=7]="GuardsCheckStart",n[n.GuardsCheckEnd=8]="GuardsCheckEnd",n[n.RouteConfigLoadStart=9]="RouteConfigLoadStart",n[n.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",n[n.ChildActivationStart=11]="ChildActivationStart",n[n.ChildActivationEnd=12]="ChildActivationEnd",n[n.ActivationStart=13]="ActivationStart",n[n.ActivationEnd=14]="ActivationEnd",n[n.Scroll=15]="Scroll",n[n.NavigationSkipped=16]="NavigationSkipped",n}(ie||{}),Be=class{constructor(t,e){this.id=t,this.url=e}},Kn=class extends Be{constructor(t,e,i="imperative",r=null){super(t,e),this.type=ie.NavigationStart,this.navigationTrigger=i,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},ct=class extends Be{constructor(t,e,i){super(t,e),this.urlAfterRedirects=i,this.type=ie.NavigationEnd}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},Pe=function(n){return n[n.Redirect=0]="Redirect",n[n.SupersededByNewNavigation=1]="SupersededByNewNavigation",n[n.NoDataFromResolver=2]="NoDataFromResolver",n[n.GuardRejected=3]="GuardRejected",n}(Pe||{}),ms=function(n){return n[n.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",n[n.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",n}(ms||{}),Et=class extends Be{constructor(t,e,i,r){super(t,e),this.reason=i,this.code=r,this.type=ie.NavigationCancel}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},zt=class extends Be{constructor(t,e,i,r){super(t,e),this.reason=i,this.code=r,this.type=ie.NavigationSkipped}},Wi=class extends Be{constructor(t,e,i,r){super(t,e),this.error=i,this.target=r,this.type=ie.NavigationError}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},_s=class extends Be{constructor(t,e,i,r){super(t,e),this.urlAfterRedirects=i,this.state=r,this.type=ie.RoutesRecognized}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Da=class extends Be{constructor(t,e,i,r){super(t,e),this.urlAfterRedirects=i,this.state=r,this.type=ie.GuardsCheckStart}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Ta=class extends Be{constructor(t,e,i,r,s){super(t,e),this.urlAfterRedirects=i,this.state=r,this.shouldActivate=s,this.type=ie.GuardsCheckEnd}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},Ea=class extends Be{constructor(t,e,i,r){super(t,e),this.urlAfterRedirects=i,this.state=r,this.type=ie.ResolveStart}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Ca=class extends Be{constructor(t,e,i,r){super(t,e),this.urlAfterRedirects=i,this.state=r,this.type=ie.ResolveEnd}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Sa=class{constructor(t){this.route=t,this.type=ie.RouteConfigLoadStart}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},Ia=class{constructor(t){this.route=t,this.type=ie.RouteConfigLoadEnd}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},Aa=class{constructor(t){this.snapshot=t,this.type=ie.ChildActivationStart}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Oa=class{constructor(t){this.snapshot=t,this.type=ie.ChildActivationEnd}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Ra=class{constructor(t){this.snapshot=t,this.type=ie.ActivationStart}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Ma=class{constructor(t){this.snapshot=t,this.type=ie.ActivationEnd}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},vs=class{constructor(t,e,i){this.routerEvent=t,this.position=e,this.anchor=i,this.type=ie.Scroll}toString(){let t=this.position?`${this.position[0]}, ${this.position[1]}`:null;return`Scroll(anchor: '${this.anchor}', position: '${t}')`}},qi=class{},Yn=class{constructor(t,e){this.url=t,this.navigationBehaviorOptions=e}};function vm(n,t){return n.providers&&!n._injector&&(n._injector=Wo(n.providers,t,`Route: ${n.path}`)),n._injector??t}function qe(n){return n.outlet||A}function ym(n,t){let e=n.filter(i=>qe(i)===t);return e.push(...n.filter(i=>qe(i)!==t)),e}function tr(n){if(!n)return null;if(n.routeConfig?._injector)return n.routeConfig._injector;for(let t=n.parent;t;t=t.parent){let e=t.routeConfig;if(e?._loadedInjector)return e._loadedInjector;if(e?._injector)return e._injector}return null}var Pa=class{get injector(){return tr(this.route?.snapshot)??this.rootInjector}set injector(t){}constructor(t){this.rootInjector=t,this.outlet=null,this.route=null,this.children=new nr(this.rootInjector),this.attachRef=null}},nr=(()=>{class n{constructor(e){this.rootInjector=e,this.contexts=new Map}onChildOutletCreated(e,i){let r=this.getOrCreateContext(e);r.outlet=i,this.contexts.set(e,r)}onChildOutletDestroyed(e){let i=this.getContext(e);i&&(i.outlet=null,i.attachRef=null)}onOutletDeactivated(){let e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let i=this.getContext(e);return i||(i=new Pa(this.rootInjector),this.contexts.set(e,i)),i}getContext(e){return this.contexts.get(e)||null}static{this.\u0275fac=function(i){return new(i||n)(C(nt))}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),ys=class{constructor(t){this._root=t}get root(){return this._root.value}parent(t){let e=this.pathFromRoot(t);return e.length>1?e[e.length-2]:null}children(t){let e=Na(t,this._root);return e?e.children.map(i=>i.value):[]}firstChild(t){let e=Na(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){let e=ka(t,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==t)}pathFromRoot(t){return ka(t,this._root).map(e=>e.value)}};function Na(n,t){if(n===t.value)return t;for(let e of t.children){let i=Na(n,e);if(i)return i}return null}function ka(n,t){if(n===t.value)return[t];for(let e of t.children){let i=ka(n,e);if(i.length)return i.unshift(t),i}return[]}var Me=class{constructor(t,e){this.value=t,this.children=e}toString(){return`TreeNode(${this.value})`}};function Hn(n){let t={};return n&&n.children.forEach(e=>t[e.value.outlet]=e),t}var bs=class extends ys{constructor(t,e){super(t),this.snapshot=e,Ha(this,t)}toString(){return this.snapshot.toString()}};function Kd(n){let t=bm(n),e=new ve([new hn("",{})]),i=new ve({}),r=new ve({}),s=new ve({}),o=new ve(""),c=new lt(e,i,s,o,r,A,n,t.root);return c.snapshot=t.root,new bs(new Me(c,[]),t)}function bm(n){let t={},e={},i={},r="",s=new zn([],t,i,r,e,A,n,null,{});return new Ds("",new Me(s,[]))}var lt=class{constructor(t,e,i,r,s,o,c,a){this.urlSubject=t,this.paramsSubject=e,this.queryParamsSubject=i,this.fragmentSubject=r,this.dataSubject=s,this.outlet=o,this.component=c,this._futureSnapshot=a,this.title=this.dataSubject?.pipe(I(l=>l[Xi]))??w(void 0),this.url=t,this.params=e,this.queryParams=i,this.fragment=r,this.data=s}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(I(t=>qn(t))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(I(t=>qn(t))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function ws(n,t,e="emptyOnly"){let i,{routeConfig:r}=n;return t!==null&&(e==="always"||r?.path===""||!t.component&&!t.routeConfig?.loadComponent)?i={params:m(m({},t.params),n.params),data:m(m({},t.data),n.data),resolve:m(m(m(m({},n.data),t.data),r?.data),n._resolvedData)}:i={params:m({},n.params),data:m({},n.data),resolve:m(m({},n.data),n._resolvedData??{})},r&&Qd(r)&&(i.resolve[Xi]=r.title),i}var zn=class{get title(){return this.data?.[Xi]}constructor(t,e,i,r,s,o,c,a,l){this.url=t,this.params=e,this.queryParams=i,this.fragment=r,this.data=s,this.outlet=o,this.component=c,this.routeConfig=a,this._resolve=l}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??=qn(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=qn(this.queryParams),this._queryParamMap}toString(){let t=this.url.map(i=>i.toString()).join("/"),e=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${t}', path:'${e}')`}},Ds=class extends ys{constructor(t,e){super(e),this.url=t,Ha(this,e)}toString(){return Yd(this._root)}};function Ha(n,t){t.value._routerState=n,t.children.forEach(e=>Ha(n,e))}function Yd(n){let t=n.children.length>0?` { ${n.children.map(Yd).join(", ")} } `:"";return`${n.value}${t}`}function ga(n){if(n.snapshot){let t=n.snapshot,e=n._futureSnapshot;n.snapshot=e,at(t.queryParams,e.queryParams)||n.queryParamsSubject.next(e.queryParams),t.fragment!==e.fragment&&n.fragmentSubject.next(e.fragment),at(t.params,e.params)||n.paramsSubject.next(e.params),qg(t.url,e.url)||n.urlSubject.next(e.url),at(t.data,e.data)||n.dataSubject.next(e.data)}else n.snapshot=n._futureSnapshot,n.dataSubject.next(n._futureSnapshot.data)}function xa(n,t){let e=at(n.params,t.params)&&Qg(n.url,t.url),i=!n.parent!=!t.parent;return e&&!i&&(!n.parent||xa(n.parent,t.parent))}function Qd(n){return typeof n.title=="string"||n.title===null}var wm=(()=>{class n{constructor(){this.activated=null,this._activatedRoute=null,this.name=A,this.activateEvents=new $,this.deactivateEvents=new $,this.attachEvents=new $,this.detachEvents=new $,this.parentContexts=f(nr),this.location=f(Gr),this.changeDetector=f(Dt),this.inputBinder=f(Ss,{optional:!0}),this.supportsBindingToComponentInputs=!0}get activatedComponentRef(){return this.activated}ngOnChanges(e){if(e.name){let{firstChange:i,previousValue:r}=e.name;if(i)return;this.isTrackedInParentContexts(r)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(r)),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 U(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new U(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new U(4012,!1);this.location.detach();let e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,i){this.activated=e,this._activatedRoute=i,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,i){if(this.isActivated)throw new U(4013,!1);this._activatedRoute=e;let r=this.location,o=e.snapshot.component,c=this.parentContexts.getOrCreateContext(this.name).children,a=new Fa(e,c,r.injector);this.activated=r.createComponent(o,{index:r.length,injector:a,environmentInjector:i}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275dir=F({type:n,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[it]})}}return n})(),Fa=class n{__ngOutletInjector(t){return new n(this.route,this.childContexts,t)}constructor(t,e,i){this.route=t,this.childContexts=e,this.parent=i}get(t,e){return t===lt?this.route:t===nr?this.childContexts:this.parent.get(t,e)}},Ss=new O(""),Od=(()=>{class n{constructor(){this.outletDataSubscriptions=new Map}bindActivatedRouteToOutletComponent(e){this.unsubscribeFromRouteData(e),this.subscribeToRouteData(e)}unsubscribeFromRouteData(e){this.outletDataSubscriptions.get(e)?.unsubscribe(),this.outletDataSubscriptions.delete(e)}subscribeToRouteData(e){let{activatedRoute:i}=e,r=Di([i.queryParams,i.params,i.data]).pipe(ae(([s,o,c],a)=>(c=m(m(m({},s),o),c),a===0?w(c):Promise.resolve(c)))).subscribe(s=>{if(!e.isActivated||!e.activatedComponentRef||e.activatedRoute!==i||i.component===null){this.unsubscribeFromRouteData(e);return}let o=Ju(i.component);if(!o){this.unsubscribeFromRouteData(e);return}for(let{templateName:c}of o.inputs)e.activatedComponentRef.setInput(c,s[c])});this.outletDataSubscriptions.set(e,r)}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac})}}return n})();function Dm(n,t,e){let i=Ji(n,t._root,e?e._root:void 0);return new bs(i,t)}function Ji(n,t,e){if(e&&n.shouldReuseRoute(t.value,e.value.snapshot)){let i=e.value;i._futureSnapshot=t.value;let r=Tm(n,t,e);return new Me(i,r)}else{if(n.shouldAttach(t.value)){let s=n.retrieve(t.value);if(s!==null){let o=s.route;return o.value._futureSnapshot=t.value,o.children=t.children.map(c=>Ji(n,c)),o}}let i=Em(t.value),r=t.children.map(s=>Ji(n,s));return new Me(i,r)}}function Tm(n,t,e){return t.children.map(i=>{for(let r of e.children)if(n.shouldReuseRoute(i.value,r.value.snapshot))return Ji(n,i,r);return Ji(n,i)})}function Em(n){return new lt(new ve(n.url),new ve(n.params),new ve(n.queryParams),new ve(n.fragment),new ve(n.data),n.outlet,n.component,n)}var Ki=class{constructor(t,e){this.redirectTo=t,this.navigationBehaviorOptions=e}},Zd="ngNavigationCancelingError";function Ts(n,t){let{redirectTo:e,navigationBehaviorOptions:i}=pn(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,r=Xd(!1,Pe.Redirect);return r.url=e,r.navigationBehaviorOptions=i,r}function Xd(n,t){let e=new Error(`NavigationCancelingError: ${n||""}`);return e[Zd]=!0,e.cancellationCode=t,e}function Cm(n){return eh(n)&&pn(n.url)}function eh(n){return!!n&&n[Zd]}var Sm=(n,t,e,i)=>I(r=>(new La(t,r.targetRouterState,r.currentRouterState,e,i).activate(n),r)),La=class{constructor(t,e,i,r,s){this.routeReuseStrategy=t,this.futureState=e,this.currState=i,this.forwardEvent=r,this.inputBindingEnabled=s}activate(t){let e=this.futureState._root,i=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,i,t),ga(this.futureState.root),this.activateChildRoutes(e,i,t)}deactivateChildRoutes(t,e,i){let r=Hn(e);t.children.forEach(s=>{let o=s.value.outlet;this.deactivateRoutes(s,r[o],i),delete r[o]}),Object.values(r).forEach(s=>{this.deactivateRouteAndItsChildren(s,i)})}deactivateRoutes(t,e,i){let r=t.value,s=e?e.value:null;if(r===s)if(r.component){let o=i.getContext(r.outlet);o&&this.deactivateChildRoutes(t,e,o.children)}else this.deactivateChildRoutes(t,e,i);else s&&this.deactivateRouteAndItsChildren(e,i)}deactivateRouteAndItsChildren(t,e){t.value.component&&this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,e):this.deactivateRouteAndOutlet(t,e)}detachAndStoreRouteSubtree(t,e){let i=e.getContext(t.value.outlet),r=i&&t.value.component?i.children:e,s=Hn(t);for(let o of Object.values(s))this.deactivateRouteAndItsChildren(o,r);if(i&&i.outlet){let o=i.outlet.detach(),c=i.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:o,route:t,contexts:c})}}deactivateRouteAndOutlet(t,e){let i=e.getContext(t.value.outlet),r=i&&t.value.component?i.children:e,s=Hn(t);for(let o of Object.values(s))this.deactivateRouteAndItsChildren(o,r);i&&(i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated()),i.attachRef=null,i.route=null)}activateChildRoutes(t,e,i){let r=Hn(e);t.children.forEach(s=>{this.activateRoutes(s,r[s.value.outlet],i),this.forwardEvent(new Ma(s.value.snapshot))}),t.children.length&&this.forwardEvent(new Oa(t.value.snapshot))}activateRoutes(t,e,i){let r=t.value,s=e?e.value:null;if(ga(r),r===s)if(r.component){let o=i.getOrCreateContext(r.outlet);this.activateChildRoutes(t,e,o.children)}else this.activateChildRoutes(t,e,i);else if(r.component){let o=i.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){let c=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),o.children.onOutletReAttached(c.contexts),o.attachRef=c.componentRef,o.route=c.route.value,o.outlet&&o.outlet.attach(c.componentRef,c.route.value),ga(c.route.value),this.activateChildRoutes(t,null,o.children)}else o.attachRef=null,o.route=r,o.outlet&&o.outlet.activateWith(r,o.injector),this.activateChildRoutes(t,null,o.children)}else this.activateChildRoutes(t,null,i)}},Es=class{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}},Wn=class{constructor(t,e){this.component=t,this.route=e}};function Im(n,t,e){let i=n._root,r=t?t._root:null;return Ui(i,r,e,[i.value])}function Am(n){let t=n.routeConfig?n.routeConfig.canActivateChild:null;return!t||t.length===0?null:{node:n,guards:t}}function Zn(n,t){let e=Symbol(),i=t.get(n,e);return i===e?typeof n=="function"&&!vu(n)?n:t.get(n):i}function Ui(n,t,e,i,r={canDeactivateChecks:[],canActivateChecks:[]}){let s=Hn(t);return n.children.forEach(o=>{Om(o,s[o.value.outlet],e,i.concat([o.value]),r),delete s[o.value.outlet]}),Object.entries(s).forEach(([o,c])=>Gi(c,e.getContext(o),r)),r}function Om(n,t,e,i,r={canDeactivateChecks:[],canActivateChecks:[]}){let s=n.value,o=t?t.value:null,c=e?e.getContext(n.value.outlet):null;if(o&&s.routeConfig===o.routeConfig){let a=Rm(o,s,s.routeConfig.runGuardsAndResolvers);a?r.canActivateChecks.push(new Es(i)):(s.data=o.data,s._resolvedData=o._resolvedData),s.component?Ui(n,t,c?c.children:null,i,r):Ui(n,t,e,i,r),a&&c&&c.outlet&&c.outlet.isActivated&&r.canDeactivateChecks.push(new Wn(c.outlet.component,o))}else o&&Gi(t,c,r),r.canActivateChecks.push(new Es(i)),s.component?Ui(n,null,c?c.children:null,i,r):Ui(n,null,e,i,r);return r}function Rm(n,t,e){if(typeof e=="function")return e(n,t);switch(e){case"pathParamsChange":return!fn(n.url,t.url);case"pathParamsOrQueryParamsChange":return!fn(n.url,t.url)||!at(n.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!xa(n,t)||!at(n.queryParams,t.queryParams);case"paramsChange":default:return!xa(n,t)}}function Gi(n,t,e){let i=Hn(n),r=n.value;Object.entries(i).forEach(([s,o])=>{r.component?t?Gi(o,t.children.getContext(s),e):Gi(o,null,e):Gi(o,t,e)}),r.component?t&&t.outlet&&t.outlet.isActivated?e.canDeactivateChecks.push(new Wn(t.outlet.component,r)):e.canDeactivateChecks.push(new Wn(null,r)):e.canDeactivateChecks.push(new Wn(null,r))}function ir(n){return typeof n=="function"}function Mm(n){return typeof n=="boolean"}function Pm(n){return n&&ir(n.canLoad)}function Nm(n){return n&&ir(n.canActivate)}function km(n){return n&&ir(n.canActivateChild)}function xm(n){return n&&ir(n.canDeactivate)}function Fm(n){return n&&ir(n.canMatch)}function th(n){return n instanceof au||n?.name==="EmptyError"}var us=Symbol("INITIAL_VALUE");function Qn(){return ae(n=>Di(n.map(t=>t.pipe(Te(1),Fo(us)))).pipe(I(t=>{for(let e of t)if(e!==!0){if(e===us)return us;if(e===!1||Lm(e))return e}return!0}),he(t=>t!==us),Te(1)))}function Lm(n){return pn(n)||n instanceof Ki}function Bm(n,t){return we(e=>{let{targetSnapshot:i,currentSnapshot:r,guards:{canActivateChecks:s,canDeactivateChecks:o}}=e;return o.length===0&&s.length===0?w(N(m({},e),{guardsResult:!0})):Vm(o,i,r,n).pipe(we(c=>c&&Mm(c)?Um(i,s,n,t):w(c)),I(c=>N(m({},e),{guardsResult:c})))})}function Vm(n,t,e,i){return K(n).pipe(we(r=>zm(r.component,r.route,e,t,i)),Lt(r=>r!==!0,!0))}function Um(n,t,e,i){return K(t).pipe(xt(r=>lu($m(r.route.parent,i),jm(r.route,i),Gm(n,r.path,e),Hm(n,r.route,e))),Lt(r=>r!==!0,!0))}function jm(n,t){return n!==null&&t&&t(new Ra(n)),w(!0)}function $m(n,t){return n!==null&&t&&t(new Aa(n)),w(!0)}function Hm(n,t,e){let i=t.routeConfig?t.routeConfig.canActivate:null;if(!i||i.length===0)return w(!0);let r=i.map(s=>Po(()=>{let o=tr(t)??e,c=Zn(s,o),a=Nm(c)?c.canActivate(t,n):ke(o,()=>c(t,n));return Wt(a).pipe(Lt())}));return w(r).pipe(Qn())}function Gm(n,t,e){let i=t[t.length-1],s=t.slice(0,t.length-1).reverse().map(o=>Am(o)).filter(o=>o!==null).map(o=>Po(()=>{let c=o.guards.map(a=>{let l=tr(o.node)??e,u=Zn(a,l),d=km(u)?u.canActivateChild(i,n):ke(l,()=>u(i,n));return Wt(d).pipe(Lt())});return w(c).pipe(Qn())}));return w(s).pipe(Qn())}function zm(n,t,e,i,r){let s=t&&t.routeConfig?t.routeConfig.canDeactivate:null;if(!s||s.length===0)return w(!0);let o=s.map(c=>{let a=tr(t)??r,l=Zn(c,a),u=xm(l)?l.canDeactivate(n,t,e,i):ke(a,()=>l(n,t,e,i));return Wt(u).pipe(Lt())});return w(o).pipe(Qn())}function Wm(n,t,e,i){let r=t.canLoad;if(r===void 0||r.length===0)return w(!0);let s=r.map(o=>{let c=Zn(o,n),a=Pm(c)?c.canLoad(t,e):ke(n,()=>c(t,e));return Wt(a)});return w(s).pipe(Qn(),nh(i))}function nh(n){return nu(V(t=>{if(typeof t!="boolean")throw Ts(n,t)}),I(t=>t===!0))}function qm(n,t,e,i){let r=t.canMatch;if(!r||r.length===0)return w(!0);let s=r.map(o=>{let c=Zn(o,n),a=Fm(c)?c.canMatch(t,e):ke(n,()=>c(t,e));return Wt(a)});return w(s).pipe(Qn(),nh(i))}var Yi=class{constructor(t){this.segmentGroup=t||null}},Qi=class extends Error{constructor(t){super(),this.urlTree=t}};function $n(n){return ln(new Yi(n))}function Jm(n){return ln(new U(4e3,!1))}function Km(n){return ln(Xd(!1,Pe.GuardRejected))}var Ba=class{constructor(t,e){this.urlSerializer=t,this.urlTree=e}lineralizeSegments(t,e){let i=[],r=e.root;for(;;){if(i=i.concat(r.segments),r.numberOfChildren===0)return w(i);if(r.numberOfChildren>1||!r.children[A])return Jm(`${t.redirectTo}`);r=r.children[A]}}applyRedirectCommands(t,e,i,r,s){if(typeof e!="string"){let c=e,{queryParams:a,fragment:l,routeConfig:u,url:d,outlet:p,params:g,data:b,title:v}=r,_=ke(s,()=>c({params:g,data:b,queryParams:a,fragment:l,routeConfig:u,url:d,outlet:p,title:v}));if(_ instanceof Ct)throw new Qi(_);e=_}let o=this.applyRedirectCreateUrlTree(e,this.urlSerializer.parse(e),t,i);if(e[0]==="/")throw new Qi(o);return o}applyRedirectCreateUrlTree(t,e,i,r){let s=this.createSegmentGroup(t,e.root,i,r);return new Ct(s,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){let i={};return Object.entries(t).forEach(([r,s])=>{if(typeof s=="string"&&s[0]===":"){let c=s.substring(1);i[r]=e[c]}else i[r]=s}),i}createSegmentGroup(t,e,i,r){let s=this.createSegments(t,e.segments,i,r),o={};return Object.entries(e.children).forEach(([c,a])=>{o[c]=this.createSegmentGroup(t,a,i,r)}),new L(s,o)}createSegments(t,e,i,r){return e.map(s=>s.path[0]===":"?this.findPosParam(t,s,r):this.findOrReturn(s,i))}findPosParam(t,e,i){let r=i[e.path.substring(1)];if(!r)throw new U(4001,!1);return r}findOrReturn(t,e){let i=0;for(let r of e){if(r.path===t.path)return e.splice(i),r;i++}return t}},Va={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function Ym(n,t,e,i,r){let s=ih(n,t,e);return s.matched?(i=vm(t,i),qm(i,t,e,r).pipe(I(o=>o===!0?s:m({},Va)))):w(s)}function ih(n,t,e){if(t.path==="**")return Qm(e);if(t.path==="")return t.pathMatch==="full"&&(n.hasChildren()||e.length>0)?m({},Va):{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};let r=(t.matcher||Wg)(e,n,t);if(!r)return m({},Va);let s={};Object.entries(r.posParams??{}).forEach(([c,a])=>{s[c]=a.path});let o=r.consumed.length>0?m(m({},s),r.consumed[r.consumed.length-1].parameters):s;return{matched:!0,consumedSegments:r.consumed,remainingSegments:e.slice(r.consumed.length),parameters:o,positionalParamSegments:r.posParams??{}}}function Qm(n){return{matched:!0,parameters:n.length>0?Fd(n).parameters:{},consumedSegments:n,remainingSegments:[],positionalParamSegments:{}}}function Rd(n,t,e,i){return e.length>0&&e_(n,e,i)?{segmentGroup:new L(t,Xm(i,new L(e,n.children))),slicedSegments:[]}:e.length===0&&t_(n,e,i)?{segmentGroup:new L(n.segments,Zm(n,e,i,n.children)),slicedSegments:e}:{segmentGroup:new L(n.segments,n.children),slicedSegments:e}}function Zm(n,t,e,i){let r={};for(let s of e)if(Is(n,t,s)&&!i[qe(s)]){let o=new L([],{});r[qe(s)]=o}return m(m({},i),r)}function Xm(n,t){let e={};e[A]=t;for(let i of n)if(i.path===""&&qe(i)!==A){let r=new L([],{});e[qe(i)]=r}return e}function e_(n,t,e){return e.some(i=>Is(n,t,i)&&qe(i)!==A)}function t_(n,t,e){return e.some(i=>Is(n,t,i))}function Is(n,t,e){return(n.hasChildren()||t.length>0)&&e.pathMatch==="full"?!1:e.path===""}function n_(n,t,e){return t.length===0&&!n.children[e]}var Ua=class{};function i_(n,t,e,i,r,s,o="emptyOnly"){return new ja(n,t,e,i,r,o,s).recognize()}var r_=31,ja=class{constructor(t,e,i,r,s,o,c){this.injector=t,this.configLoader=e,this.rootComponentType=i,this.config=r,this.urlTree=s,this.paramsInheritanceStrategy=o,this.urlSerializer=c,this.applyRedirects=new Ba(this.urlSerializer,this.urlTree),this.absoluteRedirectCount=0,this.allowRedirects=!0}noMatchError(t){return new U(4002,`'${t.segmentGroup}'`)}recognize(){let t=Rd(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(t).pipe(I(({children:e,rootSnapshot:i})=>{let r=new Me(i,e),s=new Ds("",r),o=dm(i,[],this.urlTree.queryParams,this.urlTree.fragment);return o.queryParams=this.urlTree.queryParams,s.url=this.urlSerializer.serialize(o),{state:s,tree:o}}))}match(t){let e=new zn([],Object.freeze({}),Object.freeze(m({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),A,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,t,A,e).pipe(I(i=>({children:i,rootSnapshot:e})),ye(i=>{if(i instanceof Qi)return this.urlTree=i.urlTree,this.match(i.urlTree.root);throw i instanceof Yi?this.noMatchError(i):i}))}processSegmentGroup(t,e,i,r,s){return i.segments.length===0&&i.hasChildren()?this.processChildren(t,e,i,s):this.processSegment(t,e,i,i.segments,r,!0,s).pipe(I(o=>o instanceof Me?[o]:[]))}processChildren(t,e,i,r){let s=[];for(let o of Object.keys(i.children))o==="primary"?s.unshift(o):s.push(o);return K(s).pipe(xt(o=>{let c=i.children[o],a=ym(e,o);return this.processSegmentGroup(t,a,c,o,r)}),mu((o,c)=>(o.push(...c),o)),ko(null),gu(),we(o=>{if(o===null)return $n(i);let c=rh(o);return s_(c),w(c)}))}processSegment(t,e,i,r,s,o,c){return K(e).pipe(xt(a=>this.processSegmentAgainstRoute(a._injector??t,e,a,i,r,s,o,c).pipe(ye(l=>{if(l instanceof Yi)return w(null);throw l}))),Lt(a=>!!a),ye(a=>{if(th(a))return n_(i,r,s)?w(new Ua):$n(i);throw a}))}processSegmentAgainstRoute(t,e,i,r,s,o,c,a){return qe(i)!==o&&(o===A||!Is(r,s,i))?$n(r):i.redirectTo===void 0?this.matchSegmentAgainstRoute(t,r,i,s,o,a):this.allowRedirects&&c?this.expandSegmentAgainstRouteUsingRedirect(t,r,e,i,s,o,a):$n(r)}expandSegmentAgainstRouteUsingRedirect(t,e,i,r,s,o,c){let{matched:a,parameters:l,consumedSegments:u,positionalParamSegments:d,remainingSegments:p}=ih(e,r,s);if(!a)return $n(e);typeof r.redirectTo=="string"&&r.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>r_&&(this.allowRedirects=!1));let g=new zn(s,l,Object.freeze(m({},this.urlTree.queryParams)),this.urlTree.fragment,Md(r),qe(r),r.component??r._loadedComponent??null,r,Pd(r)),b=ws(g,c,this.paramsInheritanceStrategy);g.params=Object.freeze(b.params),g.data=Object.freeze(b.data);let v=this.applyRedirects.applyRedirectCommands(u,r.redirectTo,d,g,t);return this.applyRedirects.lineralizeSegments(r,v).pipe(we(_=>this.processSegment(t,i,e,_.concat(p),o,!1,c)))}matchSegmentAgainstRoute(t,e,i,r,s,o){let c=Ym(e,i,r,t,this.urlSerializer);return i.path==="**"&&(e.children={}),c.pipe(ae(a=>a.matched?(t=i._injector??t,this.getChildConfig(t,i,r).pipe(ae(({routes:l})=>{let u=i._loadedInjector??t,{parameters:d,consumedSegments:p,remainingSegments:g}=a,b=new zn(p,d,Object.freeze(m({},this.urlTree.queryParams)),this.urlTree.fragment,Md(i),qe(i),i.component??i._loadedComponent??null,i,Pd(i)),v=ws(b,o,this.paramsInheritanceStrategy);b.params=Object.freeze(v.params),b.data=Object.freeze(v.data);let{segmentGroup:_,slicedSegments:S}=Rd(e,p,g,l);if(S.length===0&&_.hasChildren())return this.processChildren(u,l,_,b).pipe(I(D=>new Me(b,D)));if(l.length===0&&S.length===0)return w(new Me(b,[]));let k=qe(i)===s;return this.processSegment(u,l,_,S,k?A:s,!0,b).pipe(I(D=>new Me(b,D instanceof Me?[D]:[])))}))):$n(e)))}getChildConfig(t,e,i){return e.children?w({routes:e.children,injector:t}):e.loadChildren?e._loadedRoutes!==void 0?w({routes:e._loadedRoutes,injector:e._loadedInjector}):Wm(t,e,i,this.urlSerializer).pipe(we(r=>r?this.configLoader.loadChildren(t,e).pipe(V(s=>{e._loadedRoutes=s.routes,e._loadedInjector=s.injector})):Km(e))):w({routes:[],injector:t})}};function s_(n){n.sort((t,e)=>t.value.outlet===A?-1:e.value.outlet===A?1:t.value.outlet.localeCompare(e.value.outlet))}function o_(n){let t=n.value.routeConfig;return t&&t.path===""}function rh(n){let t=[],e=new Set;for(let i of n){if(!o_(i)){t.push(i);continue}let r=t.find(s=>i.value.routeConfig===s.value.routeConfig);r!==void 0?(r.children.push(...i.children),e.add(r)):t.push(i)}for(let i of e){let r=rh(i.children);t.push(new Me(i.value,r))}return t.filter(i=>!e.has(i))}function Md(n){return n.data||{}}function Pd(n){return n.resolve||{}}function a_(n,t,e,i,r,s){return we(o=>i_(n,t,e,i,o.extractedUrl,r,s).pipe(I(({state:c,tree:a})=>N(m({},o),{targetSnapshot:c,urlAfterRedirects:a}))))}function c_(n,t){return we(e=>{let{targetSnapshot:i,guards:{canActivateChecks:r}}=e;if(!r.length)return w(e);let s=new Set(r.map(a=>a.route)),o=new Set;for(let a of s)if(!o.has(a))for(let l of sh(a))o.add(l);let c=0;return K(o).pipe(xt(a=>s.has(a)?l_(a,i,n,t):(a.data=ws(a,a.parent,n).resolve,w(void 0))),V(()=>c++),xo(1),we(a=>c===o.size?w(e):et))})}function sh(n){let t=n.children.map(e=>sh(e)).flat();return[n,...t]}function l_(n,t,e,i){let r=n.routeConfig,s=n._resolve;return r?.title!==void 0&&!Qd(r)&&(s[Xi]=r.title),u_(s,n,t,i).pipe(I(o=>(n._resolvedData=o,n.data=ws(n,n.parent,e).resolve,null)))}function u_(n,t,e,i){let r=va(n);if(r.length===0)return w({});let s={};return K(r).pipe(we(o=>d_(n[o],t,e,i).pipe(Lt(),V(c=>{if(c instanceof Ki)throw Ts(new Jn,c);s[o]=c}))),xo(1),hu(s),ye(o=>th(o)?et:ln(o)))}function d_(n,t,e,i){let r=tr(t)??i,s=Zn(n,r),o=s.resolve?s.resolve(t,e):ke(r,()=>s(t,e));return Wt(o)}function ma(n){return ae(t=>{let e=n(t);return e?K(e).pipe(I(()=>t)):w(t)})}var oh=(()=>{class n{buildTitle(e){let i,r=e.root;for(;r!==void 0;)i=this.getResolvedTitleForRoute(r)??i,r=r.children.find(s=>s.outlet===A);return i}getResolvedTitleForRoute(e){return e.data[Xi]}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:()=>f(h_),providedIn:"root"})}}return n})(),h_=(()=>{class n extends oh{constructor(e){super(),this.title=e}updateTitle(e){let i=this.buildTitle(e);i!==void 0&&this.title.setTitle(i)}static{this.\u0275fac=function(i){return new(i||n)(C(Td))}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),rr=new O("",{providedIn:"root",factory:()=>({})}),f_=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=mt({type:n,selectors:[["ng-component"]],standalone:!0,features:[wt],decls:1,vars:0,template:function(i,r){i&1&&Vt(0,"router-outlet")},dependencies:[wm],encapsulation:2})}}return n})();function Ga(n){let t=n.children&&n.children.map(Ga),e=t?N(m({},n),{children:t}):m({},n);return!e.component&&!e.loadComponent&&(t||e.loadChildren)&&e.outlet&&e.outlet!==A&&(e.component=f_),e}var Zi=new O(""),za=(()=>{class n{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=f(Kr)}loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return w(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);let i=Wt(e.loadComponent()).pipe(I(ah),V(s=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=s}),Ft(()=>{this.componentLoaders.delete(e)})),r=new Ao(i,()=>new x).pipe(Io());return this.componentLoaders.set(e,r),r}loadChildren(e,i){if(this.childrenLoaders.get(i))return this.childrenLoaders.get(i);if(i._loadedRoutes)return w({routes:i._loadedRoutes,injector:i._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(i);let s=p_(i,this.compiler,e,this.onLoadEndListener).pipe(Ft(()=>{this.childrenLoaders.delete(i)})),o=new Ao(s,()=>new x).pipe(Io());return this.childrenLoaders.set(i,o),o}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();function p_(n,t,e,i){return Wt(n.loadChildren()).pipe(I(ah),we(r=>r instanceof xu||Array.isArray(r)?w(r):K(t.compileModuleAsync(r))),I(r=>{i&&i(n);let s,o,c=!1;return Array.isArray(r)?(o=r,c=!0):(s=r.create(e).injector,o=s.get(Zi,[],{optional:!0,self:!0}).flat()),{routes:o.map(Ga),injector:s}}))}function g_(n){return n&&typeof n=="object"&&"default"in n}function ah(n){return g_(n)?n.default:n}var Wa=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:()=>f(m_),providedIn:"root"})}}return n})(),m_=(()=>{class n{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,i){return e}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),ch=new O(""),lh=new O("");function __(n,t,e){let i=n.get(lh),r=n.get(z);return n.get(H).runOutsideAngular(()=>{if(!r.startViewTransition||i.skipNextTransition)return i.skipNextTransition=!1,new Promise(l=>setTimeout(l));let s,o=new Promise(l=>{s=l}),c=r.startViewTransition(()=>(s(),v_(n))),{onViewTransitionCreated:a}=i;return a&&ke(n,()=>a({transition:c,from:t,to:e})),o})}function v_(n){return new Promise(t=>{Fu({read:()=>setTimeout(t)},{injector:n})})}var y_=new O(""),qa=(()=>{class n{get hasRequestedNavigation(){return this.navigationId!==0}constructor(){this.currentNavigation=null,this.currentTransition=null,this.lastSuccessfulNavigation=null,this.events=new x,this.transitionAbortSubject=new x,this.configLoader=f(za),this.environmentInjector=f(nt),this.urlSerializer=f(er),this.rootContexts=f(nr),this.location=f(Mi),this.inputBindingEnabled=f(Ss,{optional:!0})!==null,this.titleStrategy=f(oh),this.options=f(rr,{optional:!0})||{},this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlHandlingStrategy=f(Wa),this.createViewTransition=f(ch,{optional:!0}),this.navigationErrorHandler=f(y_,{optional:!0}),this.navigationId=0,this.afterPreactivation=()=>w(void 0),this.rootComponentType=null;let e=r=>this.events.next(new Sa(r)),i=r=>this.events.next(new Ia(r));this.configLoader.onLoadEndListener=i,this.configLoader.onLoadStartListener=e}complete(){this.transitions?.complete()}handleNavigationRequest(e){let i=++this.navigationId;this.transitions?.next(N(m(m({},this.transitions.value),e),{id:i}))}setupNavigations(e,i,r){return this.transitions=new ve({id:0,currentUrlTree:i,currentRawUrl:i,extractedUrl:this.urlHandlingStrategy.extract(i),urlAfterRedirects:this.urlHandlingStrategy.extract(i),rawUrl:i,extras:{},resolve:()=>{},reject:()=>{},promise:Promise.resolve(!0),source:Hi,restoredState:null,currentSnapshot:r.snapshot,targetSnapshot:null,currentRouterState:r,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(he(s=>s.id!==0),I(s=>N(m({},s),{extractedUrl:this.urlHandlingStrategy.extract(s.rawUrl)})),ae(s=>{let o=!1,c=!1;return w(s).pipe(ae(a=>{if(this.navigationId>s.id)return this.cancelNavigationTransition(s,"",Pe.SupersededByNewNavigation),et;this.currentTransition=s,this.currentNavigation={id:a.id,initialUrl:a.rawUrl,extractedUrl:a.extractedUrl,targetBrowserUrl:typeof a.extras.browserUrl=="string"?this.urlSerializer.parse(a.extras.browserUrl):a.extras.browserUrl,trigger:a.source,extras:a.extras,previousNavigation:this.lastSuccessfulNavigation?N(m({},this.lastSuccessfulNavigation),{previousNavigation:null}):null};let l=!e.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),u=a.extras.onSameUrlNavigation??e.onSameUrlNavigation;if(!l&&u!=="reload"){let d="";return this.events.next(new zt(a.id,this.urlSerializer.serialize(a.rawUrl),d,ms.IgnoredSameUrlNavigation)),a.resolve(!1),et}if(this.urlHandlingStrategy.shouldProcessUrl(a.rawUrl))return w(a).pipe(ae(d=>{let p=this.transitions?.getValue();return this.events.next(new Kn(d.id,this.urlSerializer.serialize(d.extractedUrl),d.source,d.restoredState)),p!==this.transitions?.getValue()?et:Promise.resolve(d)}),a_(this.environmentInjector,this.configLoader,this.rootComponentType,e.config,this.urlSerializer,this.paramsInheritanceStrategy),V(d=>{s.targetSnapshot=d.targetSnapshot,s.urlAfterRedirects=d.urlAfterRedirects,this.currentNavigation=N(m({},this.currentNavigation),{finalUrl:d.urlAfterRedirects});let p=new _s(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(p)}));if(l&&this.urlHandlingStrategy.shouldProcessUrl(a.currentRawUrl)){let{id:d,extractedUrl:p,source:g,restoredState:b,extras:v}=a,_=new Kn(d,this.urlSerializer.serialize(p),g,b);this.events.next(_);let S=Kd(this.rootComponentType).snapshot;return this.currentTransition=s=N(m({},a),{targetSnapshot:S,urlAfterRedirects:p,extras:N(m({},v),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.finalUrl=p,w(s)}else{let d="";return this.events.next(new zt(a.id,this.urlSerializer.serialize(a.extractedUrl),d,ms.IgnoredByUrlHandlingStrategy)),a.resolve(!1),et}}),V(a=>{let l=new Da(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}),I(a=>(this.currentTransition=s=N(m({},a),{guards:Im(a.targetSnapshot,a.currentSnapshot,this.rootContexts)}),s)),Bm(this.environmentInjector,a=>this.events.next(a)),V(a=>{if(s.guardsResult=a.guardsResult,a.guardsResult&&typeof a.guardsResult!="boolean")throw Ts(this.urlSerializer,a.guardsResult);let l=new Ta(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot,!!a.guardsResult);this.events.next(l)}),he(a=>a.guardsResult?!0:(this.cancelNavigationTransition(a,"",Pe.GuardRejected),!1)),ma(a=>{if(a.guards.canActivateChecks.length)return w(a).pipe(V(l=>{let u=new Ea(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot);this.events.next(u)}),ae(l=>{let u=!1;return w(l).pipe(c_(this.paramsInheritanceStrategy,this.environmentInjector),V({next:()=>u=!0,complete:()=>{u||this.cancelNavigationTransition(l,"",Pe.NoDataFromResolver)}}))}),V(l=>{let u=new Ca(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot);this.events.next(u)}))}),ma(a=>{let l=u=>{let d=[];u.routeConfig?.loadComponent&&!u.routeConfig._loadedComponent&&d.push(this.configLoader.loadComponent(u.routeConfig).pipe(V(p=>{u.component=p}),I(()=>{})));for(let p of u.children)d.push(...l(p));return d};return Di(l(a.targetSnapshot.root)).pipe(ko(null),Te(1))}),ma(()=>this.afterPreactivation()),ae(()=>{let{currentSnapshot:a,targetSnapshot:l}=s,u=this.createViewTransition?.(this.environmentInjector,a.root,l.root);return u?K(u).pipe(I(()=>s)):w(s)}),I(a=>{let l=Dm(e.routeReuseStrategy,a.targetSnapshot,a.currentRouterState);return this.currentTransition=s=N(m({},a),{targetRouterState:l}),this.currentNavigation.targetRouterState=l,s}),V(()=>{this.events.next(new qi)}),Sm(this.rootContexts,e.routeReuseStrategy,a=>this.events.next(a),this.inputBindingEnabled),Te(1),V({next:a=>{o=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new ct(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects))),this.titleStrategy?.updateTitle(a.targetRouterState.snapshot),a.resolve(!0)},complete:()=>{o=!0}}),Y(this.transitionAbortSubject.pipe(V(a=>{throw a}))),Ft(()=>{!o&&!c&&this.cancelNavigationTransition(s,"",Pe.SupersededByNewNavigation),this.currentTransition?.id===s.id&&(this.currentNavigation=null,this.currentTransition=null)}),ye(a=>{if(c=!0,eh(a))this.events.next(new Et(s.id,this.urlSerializer.serialize(s.extractedUrl),a.message,a.cancellationCode)),Cm(a)?this.events.next(new Yn(a.url,a.navigationBehaviorOptions)):s.resolve(!1);else{let l=new Wi(s.id,this.urlSerializer.serialize(s.extractedUrl),a,s.targetSnapshot??void 0);try{let u=ke(this.environmentInjector,()=>this.navigationErrorHandler?.(l));if(u instanceof Ki){let{message:d,cancellationCode:p}=Ts(this.urlSerializer,u);this.events.next(new Et(s.id,this.urlSerializer.serialize(s.extractedUrl),d,p)),this.events.next(new Yn(u.redirectTo,u.navigationBehaviorOptions))}else{this.events.next(l);let d=e.errorHandler(a);s.resolve(!!d)}}catch(u){this.options.resolveNavigationPromiseOnError?s.resolve(!1):s.reject(u)}}return et}))}))}cancelNavigationTransition(e,i,r){let s=new Et(e.id,this.urlSerializer.serialize(e.extractedUrl),i,r);this.events.next(s),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))),i=this.currentNavigation?.targetBrowserUrl??this.currentNavigation?.extractedUrl;return e.toString()!==i?.toString()&&!this.currentNavigation?.extras.skipLocationChange}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();function b_(n){return n!==Hi}var w_=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:()=>f(D_),providedIn:"root"})}}return n})(),$a=class{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}},D_=(()=>{class n extends $a{static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=Bt(n)))(r||n)}})()}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),uh=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:()=>f(T_),providedIn:"root"})}}return n})(),T_=(()=>{class n extends uh{constructor(){super(...arguments),this.location=f(Mi),this.urlSerializer=f(er),this.options=f(rr,{optional:!0})||{},this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.urlHandlingStrategy=f(Wa),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.currentUrlTree=new Ct,this.rawUrlTree=this.currentUrlTree,this.currentPageId=0,this.lastSuccessfulId=-1,this.routerState=Kd(null),this.stateMemento=this.createStateMemento()}getCurrentUrlTree(){return this.currentUrlTree}getRawUrlTree(){return this.rawUrlTree}restoredState(){return this.location.getState()}get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}getRouterState(){return this.routerState}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}registerNonRouterCurrentEntryChangeListener(e){return this.location.subscribe(i=>{i.type==="popstate"&&e(i.url,i.state)})}handleRouterEvent(e,i){if(e instanceof Kn)this.stateMemento=this.createStateMemento();else if(e instanceof zt)this.rawUrlTree=i.initialUrl;else if(e instanceof _s){if(this.urlUpdateStrategy==="eager"&&!i.extras.skipLocationChange){let r=this.urlHandlingStrategy.merge(i.finalUrl,i.initialUrl);this.setBrowserUrl(i.targetBrowserUrl??r,i)}}else e instanceof qi?(this.currentUrlTree=i.finalUrl,this.rawUrlTree=this.urlHandlingStrategy.merge(i.finalUrl,i.initialUrl),this.routerState=i.targetRouterState,this.urlUpdateStrategy==="deferred"&&!i.extras.skipLocationChange&&this.setBrowserUrl(i.targetBrowserUrl??this.rawUrlTree,i)):e instanceof Et&&(e.code===Pe.GuardRejected||e.code===Pe.NoDataFromResolver)?this.restoreHistory(i):e instanceof Wi?this.restoreHistory(i,!0):e instanceof ct&&(this.lastSuccessfulId=e.id,this.currentPageId=this.browserPageId)}setBrowserUrl(e,i){let r=e instanceof Ct?this.urlSerializer.serialize(e):e;if(this.location.isCurrentPathEqualTo(r)||i.extras.replaceUrl){let s=this.browserPageId,o=m(m({},i.extras.state),this.generateNgRouterState(i.id,s));this.location.replaceState(r,"",o)}else{let s=m(m({},i.extras.state),this.generateNgRouterState(i.id,this.browserPageId+1));this.location.go(r,"",s)}}restoreHistory(e,i=!1){if(this.canceledNavigationResolution==="computed"){let r=this.browserPageId,s=this.currentPageId-r;s!==0?this.location.historyGo(s):this.currentUrlTree===e.finalUrl&&s===0&&(this.resetState(e),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(i&&this.resetState(e),this.resetUrlToCurrentUrlTree())}resetState(e){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e.finalUrl??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,i){return this.canceledNavigationResolution==="computed"?{navigationId:e,\u0275routerPageId:i}:{navigationId:e}}static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=Bt(n)))(r||n)}})()}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),ji=function(n){return n[n.COMPLETE=0]="COMPLETE",n[n.FAILED=1]="FAILED",n[n.REDIRECTING=2]="REDIRECTING",n}(ji||{});function dh(n,t){n.events.pipe(he(e=>e instanceof ct||e instanceof Et||e instanceof Wi||e instanceof zt),I(e=>e instanceof ct||e instanceof zt?ji.COMPLETE:(e instanceof Et?e.code===Pe.Redirect||e.code===Pe.SupersededByNewNavigation:!1)?ji.REDIRECTING:ji.FAILED),he(e=>e!==ji.REDIRECTING),Te(1)).subscribe(()=>{t()})}function E_(n){throw n}var C_={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},S_={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},Je=(()=>{class n{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}constructor(){this.disposed=!1,this.console=f(Wr),this.stateManager=f(uh),this.options=f(rr,{optional:!0})||{},this.pendingTasks=f(Ci),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.navigationTransitions=f(qa),this.urlSerializer=f(er),this.location=f(Mi),this.urlHandlingStrategy=f(Wa),this._events=new x,this.errorHandler=this.options.errorHandler||E_,this.navigated=!1,this.routeReuseStrategy=f(w_),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.config=f(Zi,{optional:!0})?.flat()??[],this.componentInputBindingEnabled=!!f(Ss,{optional:!0}),this.eventsSubscription=new tu,this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe({error:e=>{this.console.warn(e)}}),this.subscribeToNavigationEvents()}subscribeToNavigationEvents(){let e=this.navigationTransitions.events.subscribe(i=>{try{let r=this.navigationTransitions.currentTransition,s=this.navigationTransitions.currentNavigation;if(r!==null&&s!==null){if(this.stateManager.handleRouterEvent(i,s),i instanceof Et&&i.code!==Pe.Redirect&&i.code!==Pe.SupersededByNewNavigation)this.navigated=!0;else if(i instanceof ct)this.navigated=!0;else if(i instanceof Yn){let o=i.navigationBehaviorOptions,c=this.urlHandlingStrategy.merge(i.url,r.currentRawUrl),a=m({browserUrl:r.extras.browserUrl,info:r.extras.info,skipLocationChange:r.extras.skipLocationChange,replaceUrl:r.extras.replaceUrl||this.urlUpdateStrategy==="eager"||b_(r.source)},o);this.scheduleNavigation(c,Hi,null,a,{resolve:r.resolve,reject:r.reject,promise:r.promise})}}A_(i)&&this._events.next(i)}catch(r){this.navigationTransitions.transitionAbortSubject.next(r)}});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),Hi,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((e,i)=>{setTimeout(()=>{this.navigateToSyncWithBrowser(e,"popstate",i)},0)})}navigateToSyncWithBrowser(e,i,r){let s={replaceUrl:!0},o=r?.navigationId?r:null;if(r){let a=m({},r);delete a.navigationId,delete a.\u0275routerPageId,Object.keys(a).length!==0&&(s.state=a)}let c=this.parseUrl(e);this.scheduleNavigation(c,i,o,s)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(e){this.config=e.map(Ga),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(e,i={}){let{relativeTo:r,queryParams:s,fragment:o,queryParamsHandling:c,preserveFragment:a}=i,l=a?this.currentUrlTree.fragment:o,u=null;switch(c??this.options.defaultQueryParamsHandling){case"merge":u=m(m({},this.currentUrlTree.queryParams),s);break;case"preserve":u=this.currentUrlTree.queryParams;break;default:u=s||null}u!==null&&(u=this.removeEmptyProps(u));let d;try{let p=r?r.snapshot:this.routerState.snapshot.root;d=zd(p)}catch{(typeof e[0]!="string"||e[0][0]!=="/")&&(e=[]),d=this.currentUrlTree.root}return Wd(d,e,u,l??null)}navigateByUrl(e,i={skipLocationChange:!1}){let r=pn(e)?e:this.parseUrl(e),s=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(s,Hi,null,i)}navigate(e,i={skipLocationChange:!1}){return I_(e),this.navigateByUrl(this.createUrlTree(e,i),i)}serializeUrl(e){return this.urlSerializer.serialize(e)}parseUrl(e){try{return this.urlSerializer.parse(e)}catch{return this.urlSerializer.parse("/")}}isActive(e,i){let r;if(i===!0?r=m({},C_):i===!1?r=m({},S_):r=i,pn(e))return Cd(this.currentUrlTree,e,r);let s=this.parseUrl(e);return Cd(this.currentUrlTree,s,r)}removeEmptyProps(e){return Object.entries(e).reduce((i,[r,s])=>(s!=null&&(i[r]=s),i),{})}scheduleNavigation(e,i,r,s,o){if(this.disposed)return Promise.resolve(!1);let c,a,l;o?(c=o.resolve,a=o.reject,l=o.promise):l=new Promise((d,p)=>{c=d,a=p});let u=this.pendingTasks.add();return dh(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(u))}),this.navigationTransitions.handleNavigationRequest({source:i,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:s,resolve:c,reject:a,promise:l,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),l.catch(d=>Promise.reject(d))}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();function I_(n){for(let t=0;t<n.length;t++)if(n[t]==null)throw new U(4008,!1)}function A_(n){return!(n instanceof qi)&&!(n instanceof Yn)}var _T=(()=>{class n{constructor(e,i,r,s,o,c){this.router=e,this.route=i,this.tabIndexAttribute=r,this.renderer=s,this.el=o,this.locationStrategy=c,this.href=null,this.onChanges=new x,this.preserveFragment=!1,this.skipLocationChange=!1,this.replaceUrl=!1,this.routerLinkInput=null;let a=o.nativeElement.tagName?.toLowerCase();this.isAnchorElement=a==="a"||a==="area",this.isAnchorElement?this.subscription=e.events.subscribe(l=>{l instanceof ct&&this.updateHref()}):this.setTabIndexIfNotOnNativeEl("0")}setTabIndexIfNotOnNativeEl(e){this.tabIndexAttribute!=null||this.isAnchorElement||this.applyAttributeValue("tabindex",e)}ngOnChanges(e){this.isAnchorElement&&this.updateHref(),this.onChanges.next(this)}set routerLink(e){e==null?(this.routerLinkInput=null,this.setTabIndexIfNotOnNativeEl(null)):(pn(e)?this.routerLinkInput=e:this.routerLinkInput=Array.isArray(e)?e:[e],this.setTabIndexIfNotOnNativeEl("0"))}onClick(e,i,r,s,o){let c=this.urlTree;if(c===null||this.isAnchorElement&&(e!==0||i||r||s||o||typeof this.target=="string"&&this.target!="_self"))return!0;let a={skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info};return this.router.navigateByUrl(c,a),!this.isAnchorElement}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){let e=this.urlTree;this.href=e!==null&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(e)):null;let i=this.href===null?null:Ru(this.href,this.el.nativeElement.tagName.toLowerCase(),"href");this.applyAttributeValue("href",i)}applyAttributeValue(e,i){let r=this.renderer,s=this.el.nativeElement;i!==null?r.setAttribute(s,e,i):r.removeAttribute(s,e)}get urlTree(){return this.routerLinkInput===null?null:pn(this.routerLinkInput)?this.routerLinkInput:this.router.createUrlTree(this.routerLinkInput,{relativeTo:this.relativeTo!==void 0?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}static{this.\u0275fac=function(i){return new(i||n)(R(Je),R(lt),Vo("tabindex"),R(Ln),R(fe),R(Ri))}}static{this.\u0275dir=F({type:n,selectors:[["","routerLink",""]],hostVars:1,hostBindings:function(i,r){i&1&&ge("click",function(o){return r.onClick(o.button,o.ctrlKey,o.shiftKey,o.altKey,o.metaKey)}),i&2&&Ee("target",r.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[2,"preserveFragment","preserveFragment",Vn],skipLocationChange:[2,"skipLocationChange","skipLocationChange",Vn],replaceUrl:[2,"replaceUrl","replaceUrl",Vn],routerLink:"routerLink"},standalone:!0,features:[ku,it]})}}return n})();var Cs=class{};var O_=(()=>{class n{constructor(e,i,r,s,o){this.router=e,this.injector=r,this.preloadingStrategy=s,this.loader=o}setUpPreloading(){this.subscription=this.router.events.pipe(he(e=>e instanceof ct),xt(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(e,i){let r=[];for(let s of i){s.providers&&!s._injector&&(s._injector=Wo(s.providers,e,`Route: ${s.path}`));let o=s._injector??e,c=s._loadedInjector??o;(s.loadChildren&&!s._loadedRoutes&&s.canLoad===void 0||s.loadComponent&&!s._loadedComponent)&&r.push(this.preloadConfig(o,s)),(s.children||s._loadedRoutes)&&r.push(this.processRoutes(c,s.children??s._loadedRoutes))}return K(r).pipe(Mo())}preloadConfig(e,i){return this.preloadingStrategy.preload(i,()=>{let r;i.loadChildren&&i.canLoad===void 0?r=this.loader.loadChildren(e,i):r=w(null);let s=r.pipe(we(o=>o===null?w(void 0):(i._loadedRoutes=o.routes,i._loadedInjector=o.injector,this.processRoutes(o.injector??e,o.routes))));if(i.loadComponent&&!i._loadedComponent){let o=this.loader.loadComponent(i);return K([s,o]).pipe(Mo())}else return s})}static{this.\u0275fac=function(i){return new(i||n)(C(Je),C(Kr),C(nt),C(Cs),C(za))}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),hh=new O(""),R_=(()=>{class n{constructor(e,i,r,s,o={}){this.urlSerializer=e,this.transitions=i,this.viewportScroller=r,this.zone=s,this.options=o,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},o.scrollPositionRestoration||="disabled",o.anchorScrolling||="disabled"}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 Kn?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof ct?(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment)):e instanceof zt&&e.code===ms.IgnoredSameUrlNavigation&&(this.lastSource=void 0,this.restoredId=0,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.url).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof vs&&(e.position?this.options.scrollPositionRestoration==="top"?this.viewportScroller.scrollToPosition([0,0]):this.options.scrollPositionRestoration==="enabled"&&this.viewportScroller.scrollToPosition(e.position):e.anchor&&this.options.anchorScrolling==="enabled"?this.viewportScroller.scrollToAnchor(e.anchor):this.options.scrollPositionRestoration!=="disabled"&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(e,i){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new vs(e,this.lastSource==="popstate"?this.store[this.restoredId]:null,i))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}static{this.\u0275fac=function(i){Mu()}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac})}}return n})();function vT(n,...t){return Ge([{provide:Zi,multi:!0,useValue:n},[],{provide:lt,useFactory:fh,deps:[Je]},{provide:Jr,multi:!0,useFactory:ph},t.map(e=>e.\u0275providers)])}function fh(n){return n.routerState.root}function sr(n,t){return{\u0275kind:n,\u0275providers:t}}function ph(){let n=f(X);return t=>{let e=n.get(st);if(t!==e.components[0])return;let i=n.get(Je),r=n.get(gh);n.get(Ja)===1&&i.initialNavigation(),n.get(mh,null,Lo.Optional)?.setUpPreloading(),n.get(hh,null,Lo.Optional)?.init(),i.resetRootComponentType(e.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}var gh=new O("",{factory:()=>new x}),Ja=new O("",{providedIn:"root",factory:()=>1});function M_(){return sr(2,[{provide:Ja,useValue:0},{provide:Jo,multi:!0,deps:[X],useFactory:t=>{let e=t.get(Qu,Promise.resolve());return()=>e.then(()=>new Promise(i=>{let r=t.get(Je),s=t.get(gh);dh(r,()=>{i(!0)}),t.get(qa).afterPreactivation=()=>(i(!0),s.closed?w(void 0):s),r.initialNavigation()}))}}])}function P_(){return sr(3,[{provide:Jo,multi:!0,useFactory:()=>{let t=f(Je);return()=>{t.setUpLocationChangeListener()}}},{provide:Ja,useValue:2}])}var mh=new O("");function N_(n){return sr(0,[{provide:mh,useExisting:O_},{provide:Cs,useExisting:n}])}function k_(){return sr(8,[Od,{provide:Ss,useExisting:Od}])}function x_(n){let t=[{provide:ch,useValue:__},{provide:lh,useValue:m({skipNextTransition:!!n?.skipInitialTransition},n)}];return sr(9,t)}var Nd=new O("ROUTER_FORROOT_GUARD"),F_=[Mi,{provide:er,useClass:Jn},Je,nr,{provide:lt,useFactory:fh,deps:[Je]},za,[]],yT=(()=>{class n{constructor(e){}static forRoot(e,i){return{ngModule:n,providers:[F_,[],{provide:Zi,multi:!0,useValue:e},{provide:Nd,useFactory:U_,deps:[[Je,new tt,new yu]]},{provide:rr,useValue:i||{}},i?.useHash?B_():V_(),L_(),i?.preloadingStrategy?N_(i.preloadingStrategy).\u0275providers:[],i?.initialNavigation?j_(i):[],i?.bindToComponentInputs?k_().\u0275providers:[],i?.enableViewTransitions?x_().\u0275providers:[],$_()]}}static forChild(e){return{ngModule:n,providers:[{provide:Zi,multi:!0,useValue:e}]}}static{this.\u0275fac=function(i){return new(i||n)(C(Nd,8))}}static{this.\u0275mod=Re({type:n})}static{this.\u0275inj=Oe({})}}return n})();function L_(){return{provide:hh,useFactory:()=>{let n=f(td),t=f(H),e=f(rr),i=f(qa),r=f(er);return e.scrollOffset&&n.setOffset(e.scrollOffset),new R_(r,i,n,t,e)}}}function B_(){return{provide:Ri,useClass:Xu}}function V_(){return{provide:Ri,useClass:Zu}}function U_(n){return"guarded"}function j_(n){return[n.initialNavigation==="disabled"?P_().\u0275providers:[],n.initialNavigation==="enabledBlocking"?M_().\u0275providers:[]]}var kd=new O("");function $_(){return[{provide:kd,useFactory:ph},{provide:Jr,multi:!0,useExisting:kd}]}function As(n){n||(Bo(As),n=f(Ei));let t=new Ne(e=>n.onDestroy(e.next.bind(e)));return e=>e.pipe(Y(t))}function H_(n,t){!t?.injector&&Bo(H_);let e=t?.injector??f(X),i=new iu(1),r=qu(()=>{let s;try{s=n()}catch(o){We(()=>i.error(o));return}We(()=>i.next(s))},{injector:e,manualCleanup:!0});return e.get(Ei).onDestroy(()=>{r.destroy(),i.complete()}),i.asObservable()}var Sh=(()=>{class n{constructor(e,i){this._renderer=e,this._elementRef=i,this.onChange=r=>{},this.onTouched=()=>{}}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static{this.\u0275fac=function(i){return new(i||n)(R(Ln),R(fe))}}static{this.\u0275dir=F({type:n})}}return n})(),tc=(()=>{class n extends Sh{static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=Bt(n)))(r||n)}})()}static{this.\u0275dir=F({type:n,features:[xe]})}}return n})(),dr=new O(""),G_={provide:dr,useExisting:gt(()=>z_),multi:!0},z_=(()=>{class n extends tc{writeValue(e){this.setProperty("checked",e)}static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=Bt(n)))(r||n)}})()}static{this.\u0275dir=F({type:n,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(i,r){i&1&&ge("change",function(o){return r.onChange(o.target.checked)})("blur",function(){return r.onTouched()})},features:[bt([G_]),xe]})}}return n})(),W_={provide:dr,useExisting:gt(()=>Ih),multi:!0};function q_(){let n=jn()?jn().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}var J_=new O(""),Ih=(()=>{class n extends Sh{constructor(e,i,r){super(e,i),this._compositionMode=r,this._composing=!1,this._compositionMode==null&&(this._compositionMode=!q_())}writeValue(e){let i=e??"";this.setProperty("value",i)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static{this.\u0275fac=function(i){return new(i||n)(R(Ln),R(fe),R(J_,8))}}static{this.\u0275dir=F({type:n,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(i,r){i&1&&ge("input",function(o){return r._handleInput(o.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(o){return r._compositionEnd(o.target.value)})},features:[bt([W_]),xe]})}}return n})();function qt(n){return n==null||(typeof n=="string"||Array.isArray(n))&&n.length===0}function Ah(n){return n!=null&&typeof n.length=="number"}var nc=new O(""),ic=new O(""),K_=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,_h=class{static min(t){return Y_(t)}static max(t){return Q_(t)}static required(t){return Z_(t)}static requiredTrue(t){return X_(t)}static email(t){return ev(t)}static minLength(t){return tv(t)}static maxLength(t){return nv(t)}static pattern(t){return iv(t)}static nullValidator(t){return Oh(t)}static compose(t){return xh(t)}static composeAsync(t){return Lh(t)}};function Y_(n){return t=>{if(qt(t.value)||qt(n))return null;let e=parseFloat(t.value);return!isNaN(e)&&e<n?{min:{min:n,actual:t.value}}:null}}function Q_(n){return t=>{if(qt(t.value)||qt(n))return null;let e=parseFloat(t.value);return!isNaN(e)&&e>n?{max:{max:n,actual:t.value}}:null}}function Z_(n){return qt(n.value)?{required:!0}:null}function X_(n){return n.value===!0?null:{required:!0}}function ev(n){return qt(n.value)||K_.test(n.value)?null:{email:!0}}function tv(n){return t=>qt(t.value)||!Ah(t.value)?null:t.value.length<n?{minlength:{requiredLength:n,actualLength:t.value.length}}:null}function nv(n){return t=>Ah(t.value)&&t.value.length>n?{maxlength:{requiredLength:n,actualLength:t.value.length}}:null}function iv(n){if(!n)return Oh;let t,e;return typeof n=="string"?(e="",n.charAt(0)!=="^"&&(e+="^"),e+=n,n.charAt(n.length-1)!=="$"&&(e+="$"),t=new RegExp(e)):(e=n.toString(),t=n),i=>{if(qt(i.value))return null;let r=i.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}function Oh(n){return null}function Rh(n){return n!=null}function Mh(n){return qr(n)?K(n):n}function Ph(n){let t={};return n.forEach(e=>{t=e!=null?m(m({},t),e):t}),Object.keys(t).length===0?null:t}function Nh(n,t){return t.map(e=>e(n))}function rv(n){return!n.validate}function kh(n){return n.map(t=>rv(t)?t:e=>t.validate(e))}function xh(n){if(!n)return null;let t=n.filter(Rh);return t.length==0?null:function(e){return Ph(Nh(e,t))}}function Fh(n){return n!=null?xh(kh(n)):null}function Lh(n){if(!n)return null;let t=n.filter(Rh);return t.length==0?null:function(e){let i=Nh(e,t).map(Mh);return uu(i).pipe(I(Ph))}}function Bh(n){return n!=null?Lh(kh(n)):null}function vh(n,t){return n===null?[t]:Array.isArray(n)?[...n,t]:[n,t]}function Vh(n){return n._rawValidators}function Uh(n){return n._rawAsyncValidators}function Ka(n){return n?Array.isArray(n)?n:[n]:[]}function Rs(n,t){return Array.isArray(n)?n.includes(t):n===t}function yh(n,t){let e=Ka(t);return Ka(n).forEach(r=>{Rs(e,r)||e.push(r)}),e}function bh(n,t){return Ka(t).filter(e=>!Rs(n,e))}var Ms=class{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=Fh(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=Bh(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t=void 0){this.control&&this.control.reset(t)}hasError(t,e){return this.control?this.control.hasError(t,e):!1}getError(t,e){return this.control?this.control.getError(t,e):null}},gn=class extends Ms{get formDirective(){return null}get path(){return null}},Jt=class extends Ms{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}},Ps=class{constructor(t){this._cd=t}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},sv={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},HT=N(m({},sv),{"[class.ng-submitted]":"isSubmitted"}),GT=(()=>{class n extends Ps{constructor(e){super(e)}static{this.\u0275fac=function(i){return new(i||n)(R(Jt,2))}}static{this.\u0275dir=F({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,r){i&2&&ee("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},features:[xe]})}}return n})(),zT=(()=>{class n extends Ps{constructor(e){super(e)}static{this.\u0275fac=function(i){return new(i||n)(R(gn,10))}}static{this.\u0275dir=F({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(i,r){i&2&&ee("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)("ng-submitted",r.isSubmitted)},features:[xe]})}}return n})();var or="VALID",Os="INVALID",Xn="PENDING",ar="DISABLED",Kt=class{},Ns=class extends Kt{constructor(t,e){super(),this.value=t,this.source=e}},cr=class extends Kt{constructor(t,e){super(),this.pristine=t,this.source=e}},lr=class extends Kt{constructor(t,e){super(),this.touched=t,this.source=e}},ei=class extends Kt{constructor(t,e){super(),this.status=t,this.source=e}},Ya=class extends Kt{constructor(t){super(),this.source=t}},Qa=class extends Kt{constructor(t){super(),this.source=t}};function rc(n){return(Ls(n)?n.validators:n)||null}function ov(n){return Array.isArray(n)?Fh(n):n||null}function sc(n,t){return(Ls(t)?t.asyncValidators:n)||null}function av(n){return Array.isArray(n)?Bh(n):n||null}function Ls(n){return n!=null&&!Array.isArray(n)&&typeof n=="object"}function jh(n,t,e){let i=n.controls;if(!(t?Object.keys(i):i).length)throw new U(1e3,"");if(!i[e])throw new U(1001,"")}function $h(n,t,e){n._forEachChild((i,r)=>{if(e[r]===void 0)throw new U(1002,"")})}var ti=class{constructor(t,e){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=null,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this._status=Un(()=>this.statusReactive()),this.statusReactive=ze(void 0),this._pristine=Un(()=>this.pristineReactive()),this.pristineReactive=ze(!0),this._touched=Un(()=>this.touchedReactive()),this.touchedReactive=ze(!1),this._events=new x,this.events=this._events.asObservable(),this._onDisabledChange=[],this._assignValidators(t),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get status(){return We(this.statusReactive)}set status(t){We(()=>this.statusReactive.set(t))}get valid(){return this.status===or}get invalid(){return this.status===Os}get pending(){return this.status==Xn}get disabled(){return this.status===ar}get enabled(){return this.status!==ar}get pristine(){return We(this.pristineReactive)}set pristine(t){We(()=>this.pristineReactive.set(t))}get dirty(){return!this.pristine}get touched(){return We(this.touchedReactive)}set touched(t){We(()=>this.touchedReactive.set(t))}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t)}setAsyncValidators(t){this._assignAsyncValidators(t)}addValidators(t){this.setValidators(yh(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(yh(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(bh(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(bh(t,this._rawAsyncValidators))}hasValidator(t){return Rs(this._rawValidators,t)}hasAsyncValidator(t){return Rs(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){let e=this.touched===!1;this.touched=!0;let i=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsTouched(N(m({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new lr(!0,i))}markAllAsTouched(t={}){this.markAsTouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(t))}markAsUntouched(t={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:i})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,i),e&&t.emitEvent!==!1&&this._events.next(new lr(!1,i))}markAsDirty(t={}){let e=this.pristine===!0;this.pristine=!1;let i=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsDirty(N(m({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new cr(!1,i))}markAsPristine(t={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:t.emitEvent})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t,i),e&&t.emitEvent!==!1&&this._events.next(new cr(!0,i))}markAsPending(t={}){this.status=Xn;let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new ei(this.status,e)),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.markAsPending(N(m({},t),{sourceControl:e}))}disable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=ar,this.errors=null,this._forEachChild(r=>{r.disable(N(m({},t),{onlySelf:!0}))}),this._updateValue();let i=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new Ns(this.value,i)),this._events.next(new ei(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(N(m({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=or,this._forEachChild(i=>{i.enable(N(m({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(N(m({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(t,e){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine({},e),this._parent._updateTouched({},e))}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let i=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===or||this.status===Xn)&&this._runAsyncValidator(i,t.emitEvent)}let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new Ns(this.value,e)),this._events.next(new ei(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(N(m({},t),{sourceControl:e}))}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?ar:or}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t,e){if(this.asyncValidator){this.status=Xn,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1};let i=Mh(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:e,shouldHaveEmitted:t})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let t=this._hasOwnPendingAsyncValidator?.emitEvent??!1;return this._hasOwnPendingAsyncValidator=null,t}return!1}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(t){let e=t;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((i,r)=>i&&i._find(r),this)}getError(t,e){let i=e?this.get(e):this;return i&&i.errors?i.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t,e,i){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),(t||i)&&this._events.next(new ei(this.status,e)),this._parent&&this._parent._updateControlsErrors(t,e,i)}_initObservables(){this.valueChanges=new $,this.statusChanges=new $}_calculateStatus(){return this._allControlsDisabled()?ar:this.errors?Os:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Xn)?Xn:this._anyControlsHaveStatus(Os)?Os:or}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t,e){let i=!this._anyControlsDirty(),r=this.pristine!==i;this.pristine=i,this._parent&&!t.onlySelf&&this._parent._updatePristine(t,e),r&&this._events.next(new cr(this.pristine,e))}_updateTouched(t={},e){this.touched=this._anyControlsTouched(),this._events.next(new lr(this.touched,e)),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,e)}_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){Ls(t)&&t.updateOn!=null&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){let e=this._parent&&this._parent.dirty;return!t&&!!e&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=ov(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=av(this._rawAsyncValidators)}},ks=class extends ti{constructor(t,e,i){super(rc(e),sc(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,i={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(t,e={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(t,e,i={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){$h(this,!0,t),Object.keys(t).forEach(i=>{jh(this,!0,i),this.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(Object.keys(t).forEach(i=>{let r=this.controls[i];r&&r.patchValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((i,r)=>{i.reset(t?t[r]:null,{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,i)=>(t[i]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(e,i)=>i._syncPendingControls()?!0:e);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{let i=this.controls[e];i&&t(i,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(let[e,i]of Object.entries(this.controls))if(this.contains(e)&&t(i))return!0;return!1}_reduceValue(){let t={};return this._reduceChildren(t,(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(t,e){let i=t;return this._forEachChild((r,s)=>{i=e(i,r,s)}),i}_allControlsDisabled(){for(let t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(t){return this.controls.hasOwnProperty(t)?this.controls[t]:null}};var Za=class extends ks{};var hr=new O("CallSetDisabledState",{providedIn:"root",factory:()=>fr}),fr="always";function Hh(n,t){return[...t.path,n]}function Xa(n,t,e=fr){oc(n,t),t.valueAccessor.writeValue(n.value),(n.disabled||e==="always")&&t.valueAccessor.setDisabledState?.(n.disabled),lv(n,t),dv(n,t),uv(n,t),cv(n,t)}function wh(n,t,e=!0){let i=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(i),t.valueAccessor.registerOnTouched(i)),Fs(n,t),n&&(t._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}))}function xs(n,t){n.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function cv(n,t){if(t.valueAccessor.setDisabledState){let e=i=>{t.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(e),t._registerOnDestroy(()=>{n._unregisterOnDisabledChange(e)})}}function oc(n,t){let e=Vh(n);t.validator!==null?n.setValidators(vh(e,t.validator)):typeof e=="function"&&n.setValidators([e]);let i=Uh(n);t.asyncValidator!==null?n.setAsyncValidators(vh(i,t.asyncValidator)):typeof i=="function"&&n.setAsyncValidators([i]);let r=()=>n.updateValueAndValidity();xs(t._rawValidators,r),xs(t._rawAsyncValidators,r)}function Fs(n,t){let e=!1;if(n!==null){if(t.validator!==null){let r=Vh(n);if(Array.isArray(r)&&r.length>0){let s=r.filter(o=>o!==t.validator);s.length!==r.length&&(e=!0,n.setValidators(s))}}if(t.asyncValidator!==null){let r=Uh(n);if(Array.isArray(r)&&r.length>0){let s=r.filter(o=>o!==t.asyncValidator);s.length!==r.length&&(e=!0,n.setAsyncValidators(s))}}}let i=()=>{};return xs(t._rawValidators,i),xs(t._rawAsyncValidators,i),e}function lv(n,t){t.valueAccessor.registerOnChange(e=>{n._pendingValue=e,n._pendingChange=!0,n._pendingDirty=!0,n.updateOn==="change"&&Gh(n,t)})}function uv(n,t){t.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,n.updateOn==="blur"&&n._pendingChange&&Gh(n,t),n.updateOn!=="submit"&&n.markAsTouched()})}function Gh(n,t){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function dv(n,t){let e=(i,r)=>{t.valueAccessor.writeValue(i),r&&t.viewToModelUpdate(i)};n.registerOnChange(e),t._registerOnDestroy(()=>{n._unregisterOnChange(e)})}function hv(n,t){n==null,oc(n,t)}function fv(n,t){return Fs(n,t)}function zh(n,t){if(!n.hasOwnProperty("model"))return!1;let e=n.model;return e.isFirstChange()?!0:!Object.is(t,e.currentValue)}function pv(n){return Object.getPrototypeOf(n.constructor)===tc}function gv(n,t){n._syncPendingControls(),t.forEach(e=>{let i=e.control;i.updateOn==="submit"&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}function Wh(n,t){if(!t)return null;Array.isArray(t);let e,i,r;return t.forEach(s=>{s.constructor===Ih?e=s:pv(s)?i=s:r=s}),r||i||e||null}function mv(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}function Dh(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}function Th(n){return typeof n=="object"&&n!==null&&Object.keys(n).length===2&&"value"in n&&"disabled"in n}var ur=class extends ti{constructor(t=null,e,i){super(rc(e),sc(i,e)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Ls(e)&&(e.nonNullable||e.initialValueIsDefault)&&(Th(t)?this.defaultValue=t.value:this.defaultValue=t)}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(i=>i(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=this.defaultValue,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){Dh(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){Dh(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(t){Th(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}};var _v=n=>n instanceof ur;var vv={provide:Jt,useExisting:gt(()=>yv)},Eh=Promise.resolve(),yv=(()=>{class n extends Jt{constructor(e,i,r,s,o,c){super(),this._changeDetectorRef=o,this.callSetDisabledState=c,this.control=new ur,this._registered=!1,this.name="",this.update=new $,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=Wh(this,s)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),zh(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){Xa(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(e){Eh.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let i=e.isDisabled.currentValue,r=i!==0&&Vn(i);Eh.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?Hh(e,this._parent):[e]}static{this.\u0275fac=function(i){return new(i||n)(R(gn,9),R(nc,10),R(ic,10),R(dr,10),R(Dt,8),R(hr,8))}}static{this.\u0275dir=F({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[bt([vv]),xe,it]})}}return n})(),qT=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275dir=F({type:n,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]})}}return n})();var bv={provide:dr,useExisting:gt(()=>Dv),multi:!0};var wv=(()=>{class n{constructor(){this._accessors=[]}add(e,i){this._accessors.push([e,i])}remove(e){for(let i=this._accessors.length-1;i>=0;--i)if(this._accessors[i][1]===e){this._accessors.splice(i,1);return}}select(e){this._accessors.forEach(i=>{this._isSameGroup(i,e)&&i[1]!==e&&i[1].fireUncheck(e.value)})}_isSameGroup(e,i){return e[0].control?e[0]._parent===i._control._parent&&e[1].name===i.name:!1}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),Dv=(()=>{class n extends tc{constructor(e,i,r,s){super(e,i),this._registry=r,this._injector=s,this.setDisabledStateFired=!1,this.onChange=()=>{},this.callSetDisabledState=f(hr,{optional:!0})??fr}ngOnInit(){this._control=this._injector.get(Jt),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(e){this._state=e===this.value,this.setProperty("checked",this._state)}registerOnChange(e){this._fn=e,this.onChange=()=>{e(this.value),this._registry.select(this)}}setDisabledState(e){(this.setDisabledStateFired||e||this.callSetDisabledState==="whenDisabledForLegacyCode")&&this.setProperty("disabled",e),this.setDisabledStateFired=!0}fireUncheck(e){this.writeValue(e)}_checkName(){this.name&&this.formControlName&&(this.name,this.formControlName),!this.name&&this.formControlName&&(this.name=this.formControlName)}static{this.\u0275fac=function(i){return new(i||n)(R(Ln),R(fe),R(wv),R(X))}}static{this.\u0275dir=F({type:n,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(i,r){i&1&&ge("change",function(){return r.onChange()})("blur",function(){return r.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[bt([bv]),xe]})}}return n})();var qh=new O("");var Tv={provide:gn,useExisting:gt(()=>Ev)},Ev=(()=>{class n extends gn{get submitted(){return We(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}constructor(e,i,r){super(),this.callSetDisabledState=r,this._submitted=Un(()=>this._submittedReactive()),this._submittedReactive=ze(!1),this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new $,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(Fs(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){let i=this.form.get(e.path);return Xa(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){wh(e.control||null,e,!1),mv(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,i){this.form.get(e.path).setValue(i)}onSubmit(e){return this._submittedReactive.set(!0),gv(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new Ya(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this._submittedReactive.set(!1),this.form._events.next(new Qa(this.form))}_updateDomValue(){this.directives.forEach(e=>{let i=e.control,r=this.form.get(e.path);i!==r&&(wh(i||null,e),_v(r)&&(Xa(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let i=this.form.get(e.path);hv(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){let i=this.form.get(e.path);i&&fv(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){oc(this.form,this),this._oldForm&&Fs(this._oldForm,this)}_checkFormPresent(){this.form}static{this.\u0275fac=function(i){return new(i||n)(R(nc,10),R(ic,10),R(hr,8))}}static{this.\u0275dir=F({type:n,selectors:[["","formGroup",""]],hostBindings:function(i,r){i&1&&ge("submit",function(o){return r.onSubmit(o)})("reset",function(){return r.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[bt([Tv]),xe,it]})}}return n})();var Cv={provide:Jt,useExisting:gt(()=>Sv)},Sv=(()=>{class n extends Jt{set isDisabled(e){}static{this._ngModelWarningSentOnce=!1}constructor(e,i,r,s,o){super(),this._ngModelWarningConfig=o,this._added=!1,this.name=null,this.update=new $,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=Wh(this,s)}ngOnChanges(e){this._added||this._setUpControl(),zh(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return Hh(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}static{this.\u0275fac=function(i){return new(i||n)(R(gn,13),R(nc,10),R(ic,10),R(dr,10),R(qh,8))}}static{this.\u0275dir=F({type:n,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},features:[bt([Cv]),xe,it]})}}return n})();var Jh=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=Re({type:n})}static{this.\u0275inj=Oe({})}}return n})(),ec=class extends ti{constructor(t,e,i){super(rc(e),sc(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(t){return this.controls[this._adjustIndex(t)]}push(t,e={}){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(t,e,i={}){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(t,e={}){let i=this._adjustIndex(t);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(t,e,i={}){let r=this._adjustIndex(t);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){$h(this,!1,t),t.forEach((i,r)=>{jh(this,!1,r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(t.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t=[],e={}){this._forEachChild((i,r)=>{i.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(t=>t.getRawValue())}clear(t={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:t.emitEvent}))}_adjustIndex(t){return t<0?t+this.length:t}_syncPendingControls(){let t=this.controls.reduce((e,i)=>i._syncPendingControls()?!0:e,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){this.controls.forEach((e,i)=>{t(e,i)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_allControlsDisabled(){for(let t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}_find(t){return this.at(t)??null}};function Ch(n){return!!n&&(n.asyncValidators!==void 0||n.validators!==void 0||n.updateOn!==void 0)}var JT=(()=>{class n{constructor(){this.useNonNullable=!1}get nonNullable(){let e=new n;return e.useNonNullable=!0,e}group(e,i=null){let r=this._reduceControls(e),s={};return Ch(i)?s=i:i!==null&&(s.validators=i.validator,s.asyncValidators=i.asyncValidator),new ks(r,s)}record(e,i=null){let r=this._reduceControls(e);return new Za(r,i)}control(e,i,r){let s={};return this.useNonNullable?(Ch(i)?s=i:(s.validators=i,s.asyncValidators=r),new ur(e,N(m({},s),{nonNullable:!0}))):new ur(e,i,r)}array(e,i,r){let s=e.map(o=>this._createControl(o));return new ec(s,i,r)}_reduceControls(e){let i={};return Object.keys(e).forEach(r=>{i[r]=this._createControl(e[r])}),i}_createControl(e){if(e instanceof ur)return e;if(e instanceof ti)return e;if(Array.isArray(e)){let i=e[0],r=e.length>1?e[1]:null,s=e.length>2?e[2]:null;return this.control(i,r,s)}else return this.control(e)}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var KT=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:hr,useValue:e.callSetDisabledState??fr}]}}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=Re({type:n})}static{this.\u0275inj=Oe({imports:[Jh]})}}return n})(),YT=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:qh,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:hr,useValue:e.callSetDisabledState??fr}]}}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=Re({type:n})}static{this.\u0275inj=Oe({imports:[Jh]})}}return n})();var Q="top",le="bottom",re="right",te="left",Bs="auto",Yt=[Q,le,re,te],St="start",mn="end",Kh="clippingParents",Vs="viewport",ni="popper",Yh="reference",ac=Yt.reduce(function(n,t){return n.concat([t+"-"+St,t+"-"+mn])},[]),Us=[].concat(Yt,[Bs]).reduce(function(n,t){return n.concat([t,t+"-"+St,t+"-"+mn])},[]),Iv="beforeRead",Av="read",Ov="afterRead",Rv="beforeMain",Mv="main",Pv="afterMain",Nv="beforeWrite",kv="write",xv="afterWrite",Qh=[Iv,Av,Ov,Rv,Mv,Pv,Nv,kv,xv];function se(n){return n?(n.nodeName||"").toLowerCase():null}function G(n){if(n==null)return window;if(n.toString()!=="[object Window]"){var t=n.ownerDocument;return t&&t.defaultView||window}return n}function Ve(n){var t=G(n).Element;return n instanceof t||n instanceof Element}function ne(n){var t=G(n).HTMLElement;return n instanceof t||n instanceof HTMLElement}function ii(n){if(typeof ShadowRoot>"u")return!1;var t=G(n).ShadowRoot;return n instanceof t||n instanceof ShadowRoot}function Fv(n){var t=n.state;Object.keys(t.elements).forEach(function(e){var i=t.styles[e]||{},r=t.attributes[e]||{},s=t.elements[e];!ne(s)||!se(s)||(Object.assign(s.style,i),Object.keys(r).forEach(function(o){var c=r[o];c===!1?s.removeAttribute(o):s.setAttribute(o,c===!0?"":c)}))})}function Lv(n){var t=n.state,e={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,e.popper),t.styles=e,t.elements.arrow&&Object.assign(t.elements.arrow.style,e.arrow),function(){Object.keys(t.elements).forEach(function(i){var r=t.elements[i],s=t.attributes[i]||{},o=Object.keys(t.styles.hasOwnProperty(i)?t.styles[i]:e[i]),c=o.reduce(function(a,l){return a[l]="",a},{});!ne(r)||!se(r)||(Object.assign(r.style,c),Object.keys(s).forEach(function(a){r.removeAttribute(a)}))})}}var Zh={name:"applyStyles",enabled:!0,phase:"write",fn:Fv,effect:Lv,requires:["computeStyles"]};function oe(n){return n.split("-")[0]}var Ke=Math.max,_n=Math.min,It=Math.round;function ri(){var n=navigator.userAgentData;return n!=null&&n.brands&&Array.isArray(n.brands)?n.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function pr(){return!/^((?!chrome|android).)*safari/i.test(ri())}function Ue(n,t,e){t===void 0&&(t=!1),e===void 0&&(e=!1);var i=n.getBoundingClientRect(),r=1,s=1;t&&ne(n)&&(r=n.offsetWidth>0&&It(i.width)/n.offsetWidth||1,s=n.offsetHeight>0&&It(i.height)/n.offsetHeight||1);var o=Ve(n)?G(n):window,c=o.visualViewport,a=!pr()&&e,l=(i.left+(a&&c?c.offsetLeft:0))/r,u=(i.top+(a&&c?c.offsetTop:0))/s,d=i.width/r,p=i.height/s;return{width:d,height:p,top:u,right:l+d,bottom:u+p,left:l,x:l,y:u}}function vn(n){var t=Ue(n),e=n.offsetWidth,i=n.offsetHeight;return Math.abs(t.width-e)<=1&&(e=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:n.offsetLeft,y:n.offsetTop,width:e,height:i}}function gr(n,t){var e=t.getRootNode&&t.getRootNode();if(n.contains(t))return!0;if(e&&ii(e)){var i=t;do{if(i&&n.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function be(n){return G(n).getComputedStyle(n)}function cc(n){return["table","td","th"].indexOf(se(n))>=0}function ue(n){return((Ve(n)?n.ownerDocument:n.document)||window.document).documentElement}function At(n){return se(n)==="html"?n:n.assignedSlot||n.parentNode||(ii(n)?n.host:null)||ue(n)}function Xh(n){return!ne(n)||be(n).position==="fixed"?null:n.offsetParent}function Bv(n){var t=/firefox/i.test(ri()),e=/Trident/i.test(ri());if(e&&ne(n)){var i=be(n);if(i.position==="fixed")return null}var r=At(n);for(ii(r)&&(r=r.host);ne(r)&&["html","body"].indexOf(se(r))<0;){var s=be(r);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||t&&s.willChange==="filter"||t&&s.filter&&s.filter!=="none")return r;r=r.parentNode}return null}function Ye(n){for(var t=G(n),e=Xh(n);e&&cc(e)&&be(e).position==="static";)e=Xh(e);return e&&(se(e)==="html"||se(e)==="body"&&be(e).position==="static")?t:e||Bv(n)||t}function yn(n){return["top","bottom"].indexOf(n)>=0?"x":"y"}function bn(n,t,e){return Ke(n,_n(t,e))}function ef(n,t,e){var i=bn(n,t,e);return i>e?e:i}function mr(){return{top:0,right:0,bottom:0,left:0}}function _r(n){return Object.assign({},mr(),n)}function vr(n,t){return t.reduce(function(e,i){return e[i]=n,e},{})}var Vv=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,_r(typeof t!="number"?t:vr(t,Yt))};function Uv(n){var t,e=n.state,i=n.name,r=n.options,s=e.elements.arrow,o=e.modifiersData.popperOffsets,c=oe(e.placement),a=yn(c),l=[te,re].indexOf(c)>=0,u=l?"height":"width";if(!(!s||!o)){var d=Vv(r.padding,e),p=vn(s),g=a==="y"?Q:te,b=a==="y"?le:re,v=e.rects.reference[u]+e.rects.reference[a]-o[a]-e.rects.popper[u],_=o[a]-e.rects.reference[a],S=Ye(s),k=S?a==="y"?S.clientHeight||0:S.clientWidth||0:0,D=v/2-_/2,E=d[g],M=k-p[u]-d[b],P=k/2-p[u]/2+D,B=bn(E,P,M),Z=a;e.modifiersData[i]=(t={},t[Z]=B,t.centerOffset=B-P,t)}}function jv(n){var t=n.state,e=n.options,i=e.element,r=i===void 0?"[data-popper-arrow]":i;r!=null&&(typeof r=="string"&&(r=t.elements.popper.querySelector(r),!r)||gr(t.elements.popper,r)&&(t.elements.arrow=r))}var lc={name:"arrow",enabled:!0,phase:"main",fn:Uv,effect:jv,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function je(n){return n.split("-")[1]}var $v={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Hv(n,t){var e=n.x,i=n.y,r=t.devicePixelRatio||1;return{x:It(e*r)/r||0,y:It(i*r)/r||0}}function tf(n){var t,e=n.popper,i=n.popperRect,r=n.placement,s=n.variation,o=n.offsets,c=n.position,a=n.gpuAcceleration,l=n.adaptive,u=n.roundOffsets,d=n.isFixed,p=o.x,g=p===void 0?0:p,b=o.y,v=b===void 0?0:b,_=typeof u=="function"?u({x:g,y:v}):{x:g,y:v};g=_.x,v=_.y;var S=o.hasOwnProperty("x"),k=o.hasOwnProperty("y"),D=te,E=Q,M=window;if(l){var P=Ye(e),B="clientHeight",Z="clientWidth";if(P===G(e)&&(P=ue(e),be(P).position!=="static"&&c==="absolute"&&(B="scrollHeight",Z="scrollWidth")),P=P,r===Q||(r===te||r===re)&&s===mn){E=le;var W=d&&P===M&&M.visualViewport?M.visualViewport.height:P[B];v-=W-i.height,v*=a?1:-1}if(r===te||(r===Q||r===le)&&s===mn){D=re;var J=d&&P===M&&M.visualViewport?M.visualViewport.width:P[Z];g-=J-i.width,g*=a?1:-1}}var de=Object.assign({position:c},l&&$v),$e=u===!0?Hv({x:g,y:v},G(e)):{x:g,y:v};if(g=$e.x,v=$e.y,a){var _e;return Object.assign({},de,(_e={},_e[E]=k?"0":"",_e[D]=S?"0":"",_e.transform=(M.devicePixelRatio||1)<=1?"translate("+g+"px, "+v+"px)":"translate3d("+g+"px, "+v+"px, 0)",_e))}return Object.assign({},de,(t={},t[E]=k?v+"px":"",t[D]=S?g+"px":"",t.transform="",t))}function Gv(n){var t=n.state,e=n.options,i=e.gpuAcceleration,r=i===void 0?!0:i,s=e.adaptive,o=s===void 0?!0:s,c=e.roundOffsets,a=c===void 0?!0:c,l={placement:oe(t.placement),variation:je(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,tf(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:a})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,tf(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var nf={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Gv,data:{}};var js={passive:!0};function zv(n){var t=n.state,e=n.instance,i=n.options,r=i.scroll,s=r===void 0?!0:r,o=i.resize,c=o===void 0?!0:o,a=G(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&l.forEach(function(u){u.addEventListener("scroll",e.update,js)}),c&&a.addEventListener("resize",e.update,js),function(){s&&l.forEach(function(u){u.removeEventListener("scroll",e.update,js)}),c&&a.removeEventListener("resize",e.update,js)}}var rf={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:zv,data:{}};var Wv={left:"right",right:"left",bottom:"top",top:"bottom"};function si(n){return n.replace(/left|right|bottom|top/g,function(t){return Wv[t]})}var qv={start:"end",end:"start"};function $s(n){return n.replace(/start|end/g,function(t){return qv[t]})}function wn(n){var t=G(n),e=t.pageXOffset,i=t.pageYOffset;return{scrollLeft:e,scrollTop:i}}function Dn(n){return Ue(ue(n)).left+wn(n).scrollLeft}function uc(n,t){var e=G(n),i=ue(n),r=e.visualViewport,s=i.clientWidth,o=i.clientHeight,c=0,a=0;if(r){s=r.width,o=r.height;var l=pr();(l||!l&&t==="fixed")&&(c=r.offsetLeft,a=r.offsetTop)}return{width:s,height:o,x:c+Dn(n),y:a}}function dc(n){var t,e=ue(n),i=wn(n),r=(t=n.ownerDocument)==null?void 0:t.body,s=Ke(e.scrollWidth,e.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),o=Ke(e.scrollHeight,e.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),c=-i.scrollLeft+Dn(n),a=-i.scrollTop;return be(r||e).direction==="rtl"&&(c+=Ke(e.clientWidth,r?r.clientWidth:0)-s),{width:s,height:o,x:c,y:a}}function Tn(n){var t=be(n),e=t.overflow,i=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(e+r+i)}function Hs(n){return["html","body","#document"].indexOf(se(n))>=0?n.ownerDocument.body:ne(n)&&Tn(n)?n:Hs(At(n))}function Qt(n,t){var e;t===void 0&&(t=[]);var i=Hs(n),r=i===((e=n.ownerDocument)==null?void 0:e.body),s=G(i),o=r?[s].concat(s.visualViewport||[],Tn(i)?i:[]):i,c=t.concat(o);return r?c:c.concat(Qt(At(o)))}function oi(n){return Object.assign({},n,{left:n.x,top:n.y,right:n.x+n.width,bottom:n.y+n.height})}function Jv(n,t){var e=Ue(n,!1,t==="fixed");return e.top=e.top+n.clientTop,e.left=e.left+n.clientLeft,e.bottom=e.top+n.clientHeight,e.right=e.left+n.clientWidth,e.width=n.clientWidth,e.height=n.clientHeight,e.x=e.left,e.y=e.top,e}function sf(n,t,e){return t===Vs?oi(uc(n,e)):Ve(t)?Jv(t,e):oi(dc(ue(n)))}function Kv(n){var t=Qt(At(n)),e=["absolute","fixed"].indexOf(be(n).position)>=0,i=e&&ne(n)?Ye(n):n;return Ve(i)?t.filter(function(r){return Ve(r)&&gr(r,i)&&se(r)!=="body"}):[]}function hc(n,t,e,i){var r=t==="clippingParents"?Kv(n):[].concat(t),s=[].concat(r,[e]),o=s[0],c=s.reduce(function(a,l){var u=sf(n,l,i);return a.top=Ke(u.top,a.top),a.right=_n(u.right,a.right),a.bottom=_n(u.bottom,a.bottom),a.left=Ke(u.left,a.left),a},sf(n,o,i));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c}function yr(n){var t=n.reference,e=n.element,i=n.placement,r=i?oe(i):null,s=i?je(i):null,o=t.x+t.width/2-e.width/2,c=t.y+t.height/2-e.height/2,a;switch(r){case Q:a={x:o,y:t.y-e.height};break;case le:a={x:o,y:t.y+t.height};break;case re:a={x:t.x+t.width,y:c};break;case te:a={x:t.x-e.width,y:c};break;default:a={x:t.x,y:t.y}}var l=r?yn(r):null;if(l!=null){var u=l==="y"?"height":"width";switch(s){case St:a[l]=a[l]-(t[u]/2-e[u]/2);break;case mn:a[l]=a[l]+(t[u]/2-e[u]/2);break;default:}}return a}function Zt(n,t){t===void 0&&(t={});var e=t,i=e.placement,r=i===void 0?n.placement:i,s=e.strategy,o=s===void 0?n.strategy:s,c=e.boundary,a=c===void 0?Kh:c,l=e.rootBoundary,u=l===void 0?Vs:l,d=e.elementContext,p=d===void 0?ni:d,g=e.altBoundary,b=g===void 0?!1:g,v=e.padding,_=v===void 0?0:v,S=_r(typeof _!="number"?_:vr(_,Yt)),k=p===ni?Yh:ni,D=n.rects.popper,E=n.elements[b?k:p],M=hc(Ve(E)?E:E.contextElement||ue(n.elements.popper),a,u,o),P=Ue(n.elements.reference),B=yr({reference:P,element:D,strategy:"absolute",placement:r}),Z=oi(Object.assign({},D,B)),W=p===ni?Z:P,J={top:M.top-W.top+S.top,bottom:W.bottom-M.bottom+S.bottom,left:M.left-W.left+S.left,right:W.right-M.right+S.right},de=n.modifiersData.offset;if(p===ni&&de){var $e=de[r];Object.keys(J).forEach(function(_e){var nn=[re,le].indexOf(_e)>=0?1:-1,rn=[Q,le].indexOf(_e)>=0?"y":"x";J[_e]+=$e[rn]*nn})}return J}function fc(n,t){t===void 0&&(t={});var e=t,i=e.placement,r=e.boundary,s=e.rootBoundary,o=e.padding,c=e.flipVariations,a=e.allowedAutoPlacements,l=a===void 0?Us:a,u=je(i),d=u?c?ac:ac.filter(function(b){return je(b)===u}):Yt,p=d.filter(function(b){return l.indexOf(b)>=0});p.length===0&&(p=d);var g=p.reduce(function(b,v){return b[v]=Zt(n,{placement:v,boundary:r,rootBoundary:s,padding:o})[oe(v)],b},{});return Object.keys(g).sort(function(b,v){return g[b]-g[v]})}function Yv(n){if(oe(n)===Bs)return[];var t=si(n);return[$s(n),t,$s(t)]}function Qv(n){var t=n.state,e=n.options,i=n.name;if(!t.modifiersData[i]._skip){for(var r=e.mainAxis,s=r===void 0?!0:r,o=e.altAxis,c=o===void 0?!0:o,a=e.fallbackPlacements,l=e.padding,u=e.boundary,d=e.rootBoundary,p=e.altBoundary,g=e.flipVariations,b=g===void 0?!0:g,v=e.allowedAutoPlacements,_=t.options.placement,S=oe(_),k=S===_,D=a||(k||!b?[si(_)]:Yv(_)),E=[_].concat(D).reduce(function(Nn,kt){return Nn.concat(oe(kt)===Bs?fc(t,{placement:kt,boundary:u,rootBoundary:d,padding:l,flipVariations:b,allowedAutoPlacements:v}):kt)},[]),M=t.rects.reference,P=t.rects.popper,B=new Map,Z=!0,W=E[0],J=0;J<E.length;J++){var de=E[J],$e=oe(de),_e=je(de)===St,nn=[Q,le].indexOf($e)>=0,rn=nn?"width":"height",Ae=Zt(t,{placement:de,boundary:u,rootBoundary:d,altBoundary:p,padding:l}),He=nn?_e?re:te:_e?le:Q;M[rn]>P[rn]&&(He=si(He));var kr=si(He),sn=[];if(s&&sn.push(Ae[$e]<=0),c&&sn.push(Ae[He]<=0,Ae[kr]<=0),sn.every(function(Nn){return Nn})){W=de,Z=!1;break}B.set(de,sn)}if(Z)for(var xr=b?3:1,To=function(kt){var wi=E.find(function(Lr){var on=B.get(Lr);if(on)return on.slice(0,kt).every(function(Eo){return Eo})});if(wi)return W=wi,"break"},bi=xr;bi>0;bi--){var Fr=To(bi);if(Fr==="break")break}t.placement!==W&&(t.modifiersData[i]._skip=!0,t.placement=W,t.reset=!0)}}var pc={name:"flip",enabled:!0,phase:"main",fn:Qv,requiresIfExists:["offset"],data:{_skip:!1}};function Zv(n,t,e){var i=oe(n),r=[te,Q].indexOf(i)>=0?-1:1,s=typeof e=="function"?e(Object.assign({},t,{placement:n})):e,o=s[0],c=s[1];return o=o||0,c=(c||0)*r,[te,re].indexOf(i)>=0?{x:c,y:o}:{x:o,y:c}}function Xv(n){var t=n.state,e=n.options,i=n.name,r=e.offset,s=r===void 0?[0,0]:r,o=Us.reduce(function(u,d){return u[d]=Zv(d,t.rects,s),u},{}),c=o[t.placement],a=c.x,l=c.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=a,t.modifiersData.popperOffsets.y+=l),t.modifiersData[i]=o}var gc={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Xv};function e0(n){var t=n.state,e=n.name;t.modifiersData[e]=yr({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var of={name:"popperOffsets",enabled:!0,phase:"read",fn:e0,data:{}};function mc(n){return n==="x"?"y":"x"}function t0(n){var t=n.state,e=n.options,i=n.name,r=e.mainAxis,s=r===void 0?!0:r,o=e.altAxis,c=o===void 0?!1:o,a=e.boundary,l=e.rootBoundary,u=e.altBoundary,d=e.padding,p=e.tether,g=p===void 0?!0:p,b=e.tetherOffset,v=b===void 0?0:b,_=Zt(t,{boundary:a,rootBoundary:l,padding:d,altBoundary:u}),S=oe(t.placement),k=je(t.placement),D=!k,E=yn(S),M=mc(E),P=t.modifiersData.popperOffsets,B=t.rects.reference,Z=t.rects.popper,W=typeof v=="function"?v(Object.assign({},t.rects,{placement:t.placement})):v,J=typeof W=="number"?{mainAxis:W,altAxis:W}:Object.assign({mainAxis:0,altAxis:0},W),de=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,$e={x:0,y:0};if(P){if(s){var _e,nn=E==="y"?Q:te,rn=E==="y"?le:re,Ae=E==="y"?"height":"width",He=P[E],kr=He+_[nn],sn=He-_[rn],xr=g?-Z[Ae]/2:0,To=k===St?B[Ae]:Z[Ae],bi=k===St?-Z[Ae]:-B[Ae],Fr=t.elements.arrow,Nn=g&&Fr?vn(Fr):{width:0,height:0},kt=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:mr(),wi=kt[nn],Lr=kt[rn],on=bn(0,B[Ae],Nn[Ae]),Eo=D?B[Ae]/2-xr-on-wi-J.mainAxis:To-on-wi-J.mainAxis,Jp=D?-B[Ae]/2+xr+on+Lr+J.mainAxis:bi+on+Lr+J.mainAxis,Co=t.elements.arrow&&Ye(t.elements.arrow),Kp=Co?E==="y"?Co.clientTop||0:Co.clientLeft||0:0,Wl=(_e=de?.[E])!=null?_e:0,Yp=He+Eo-Wl-Kp,Qp=He+Jp-Wl,ql=bn(g?_n(kr,Yp):kr,He,g?Ke(sn,Qp):sn);P[E]=ql,$e[E]=ql-He}if(c){var Jl,Zp=E==="x"?Q:te,Xp=E==="x"?le:re,an=P[M],Br=M==="y"?"height":"width",Kl=an+_[Zp],Yl=an-_[Xp],So=[Q,te].indexOf(S)!==-1,Ql=(Jl=de?.[M])!=null?Jl:0,Zl=So?Kl:an-B[Br]-Z[Br]-Ql+J.altAxis,Xl=So?an+B[Br]+Z[Br]-Ql-J.altAxis:Yl,eu=g&&So?ef(Zl,an,Xl):bn(g?Zl:Kl,an,g?Xl:Yl);P[M]=eu,$e[M]=eu-an}t.modifiersData[i]=$e}}var _c={name:"preventOverflow",enabled:!0,phase:"main",fn:t0,requiresIfExists:["offset"]};function vc(n){return{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}}function yc(n){return n===G(n)||!ne(n)?wn(n):vc(n)}function n0(n){var t=n.getBoundingClientRect(),e=It(t.width)/n.offsetWidth||1,i=It(t.height)/n.offsetHeight||1;return e!==1||i!==1}function bc(n,t,e){e===void 0&&(e=!1);var i=ne(t),r=ne(t)&&n0(t),s=ue(t),o=Ue(n,r,e),c={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(i||!i&&!e)&&((se(t)!=="body"||Tn(s))&&(c=yc(t)),ne(t)?(a=Ue(t,!0),a.x+=t.clientLeft,a.y+=t.clientTop):s&&(a.x=Dn(s))),{x:o.left+c.scrollLeft-a.x,y:o.top+c.scrollTop-a.y,width:o.width,height:o.height}}function i0(n){var t=new Map,e=new Set,i=[];n.forEach(function(s){t.set(s.name,s)});function r(s){e.add(s.name);var o=[].concat(s.requires||[],s.requiresIfExists||[]);o.forEach(function(c){if(!e.has(c)){var a=t.get(c);a&&r(a)}}),i.push(s)}return n.forEach(function(s){e.has(s.name)||r(s)}),i}function wc(n){var t=i0(n);return Qh.reduce(function(e,i){return e.concat(t.filter(function(r){return r.phase===i}))},[])}function Dc(n){var t;return function(){return t||(t=new Promise(function(e){Promise.resolve().then(function(){t=void 0,e(n())})})),t}}function Tc(n){var t=n.reduce(function(e,i){var r=e[i.name];return e[i.name]=r?Object.assign({},r,i,{options:Object.assign({},r.options,i.options),data:Object.assign({},r.data,i.data)}):i,e},{});return Object.keys(t).map(function(e){return t[e]})}var af={placement:"bottom",modifiers:[],strategy:"absolute"};function cf(){for(var n=arguments.length,t=new Array(n),e=0;e<n;e++)t[e]=arguments[e];return!t.some(function(i){return!(i&&typeof i.getBoundingClientRect=="function")})}function lf(n){n===void 0&&(n={});var t=n,e=t.defaultModifiers,i=e===void 0?[]:e,r=t.defaultOptions,s=r===void 0?af:r;return function(c,a,l){l===void 0&&(l=s);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},af,s),modifiersData:{},elements:{reference:c,popper:a},attributes:{},styles:{}},d=[],p=!1,g={state:u,setOptions:function(S){var k=typeof S=="function"?S(u.options):S;v(),u.options=Object.assign({},s,u.options,k),u.scrollParents={reference:Ve(c)?Qt(c):c.contextElement?Qt(c.contextElement):[],popper:Qt(a)};var D=wc(Tc([].concat(i,u.options.modifiers)));return u.orderedModifiers=D.filter(function(E){return E.enabled}),b(),g.update()},forceUpdate:function(){if(!p){var S=u.elements,k=S.reference,D=S.popper;if(cf(k,D)){u.rects={reference:bc(k,Ye(D),u.options.strategy==="fixed"),popper:vn(D)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(J){return u.modifiersData[J.name]=Object.assign({},J.data)});for(var E=0;E<u.orderedModifiers.length;E++){if(u.reset===!0){u.reset=!1,E=-1;continue}var M=u.orderedModifiers[E],P=M.fn,B=M.options,Z=B===void 0?{}:B,W=M.name;typeof P=="function"&&(u=P({state:u,options:Z,name:W,instance:g})||u)}}}},update:Dc(function(){return new Promise(function(_){g.forceUpdate(),_(u)})}),destroy:function(){v(),p=!0}};if(!cf(c,a))return g;g.setOptions(l).then(function(_){!p&&l.onFirstUpdate&&l.onFirstUpdate(_)});function b(){u.orderedModifiers.forEach(function(_){var S=_.name,k=_.options,D=k===void 0?{}:k,E=_.effect;if(typeof E=="function"){var M=E({state:u,name:S,instance:g,options:D}),P=function(){};d.push(M||P)}})}function v(){d.forEach(function(_){return _()}),d=[]}return g}}var r0=[rf,of,nf,Zh],Ec=lf({defaultModifiers:r0});var s0=["*"];var o0=["dialog"];function a0(n,t){if(n&1&&(Se(0,"span"),Le(1),Fe()),n&2){let e=ce().$implicit,i=ce();Ce(i.highlightClass),q(),qo(e)}}function c0(n,t){if(n&1&&(Ii(0),Le(1),Ai()),n&2){let e=ce().$implicit;q(),qo(e)}}function l0(n,t){if(n&1&&un(0,a0,2,4,"span",0)(1,c0,2,1,"ng-container"),n&2){let e=t.$index;Lu(e%2!==0?0:1)}}var mf={animation:!0,transitionTimerDelayMs:5},Oc=(()=>{class n{constructor(){this.animation=mf.animation}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),u0=(()=>{class n{constructor(){this._ngbConfig=f(Oc),this.closeOthers=!1,this.destroyOnHide=!0}get animation(){return this._animation??this._ngbConfig.animation}set animation(e){this._animation=e}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();function d0(n){let{transitionDelay:t,transitionDuration:e}=window.getComputedStyle(n),i=parseFloat(t),r=parseFloat(e);return(i+r)*1e3}function uf(n){return n!=null?`${n}`:""}function Rc(n){return typeof n=="string"}function Cc(n){return n!=null}function h0(n){return n&&n.then}function f0(n){return n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function p0(n,t){return!t||typeof n.closest>"u"?null:n.closest(t)}function Mc(n){return(n||document.body).getBoundingClientRect()}function g0(n){return t=>new Ne(e=>{let i=o=>n.run(()=>e.next(o)),r=o=>n.run(()=>e.error(o)),s=()=>n.run(()=>e.complete());return t.subscribe({next:i,error:r,complete:s})})}function df(n){return n.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function _f(n=document){let t=n?.activeElement;return t?t.shadowRoot?_f(t.shadowRoot):t:null}var m0=()=>{},{transitionTimerDelayMs:_0}=mf,Gs=new Map,Xt=(n,t,e,i)=>{let r=i.context||{},s=Gs.get(t);if(s)switch(i.runningTransition){case"continue":return et;case"stop":n.run(()=>s.transition$.complete()),r=Object.assign(s.context,r),Gs.delete(t)}let o=e(t,i.animation,r)||m0;if(!i.animation||window.getComputedStyle(t).transitionProperty==="none")return n.run(()=>o()),w(void 0).pipe(g0(n));let c=new x,a=new x,l=c.pipe(pu(!0));Gs.set(t,{transition$:c,complete:()=>{a.next(),a.complete()},context:r});let u=d0(t);return n.runOutsideAngular(()=>{let d=De(t,"transitionend").pipe(Y(l),he(({target:g})=>g===t)),p=du(u+_0).pipe(Y(l));No(p,d,a).pipe(Y(l)).subscribe(()=>{Gs.delete(t),n.run(()=>{o(),c.next(),c.complete()})})}),c.asObservable()};function v0(n,t){if(typeof navigator>"u")return"0px";let{classList:e}=n,i=e.contains("show");i||e.add("show"),n.style[t]="";let r=n.getBoundingClientRect()[t]+"px";return i||e.remove("show"),r}var y0=(n,t,e)=>{let{direction:i,maxSize:r,dimension:s}=e,{classList:o}=n;function c(){o.add("collapse"),i==="show"?o.add("show"):o.remove("show")}if(!t){c();return}return r||(r=v0(n,s),e.maxSize=r,n.style[s]=i!=="show"?r:"0px",o.remove("collapse"),o.remove("collapsing"),o.remove("show"),Mc(n),o.add("collapsing")),n.style[s]=i==="show"?r:"0px",()=>{c(),o.remove("collapsing"),n.style[s]=""}},b0=(()=>{class n{constructor(){this._ngbConfig=f(Oc),this.horizontal=!1}get animation(){return this._animation??this._ngbConfig.animation}set animation(e){this._animation=e}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),hf=(()=>{class n{constructor(){this._config=f(b0),this._element=f(fe),this._zone=f(H),this.animation=this._config.animation,this._afterInit=!1,this._isCollapsed=!1,this.ngbCollapseChange=new $,this.horizontal=this._config.horizontal,this.shown=new $,this.hidden=new $}set collapsed(e){this._isCollapsed!==e&&(this._isCollapsed=e,this._afterInit&&this._runTransitionWithEvents(e,this.animation))}ngOnInit(){this._runTransition(this._isCollapsed,!1),this._afterInit=!0}toggle(e=this._isCollapsed){this.collapsed=!e,this.ngbCollapseChange.next(this._isCollapsed)}_runTransition(e,i){return Xt(this._zone,this._element.nativeElement,y0,{animation:i,runningTransition:"stop",context:{direction:e?"hide":"show",dimension:this.horizontal?"width":"height"}})}_runTransitionWithEvents(e,i){this._runTransition(e,i).subscribe(()=>{e?this.hidden.emit():this.shown.emit()})}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275dir=F({type:n,selectors:[["","ngbCollapse",""]],hostVars:2,hostBindings:function(i,r){i&2&&ee("collapse-horizontal",r.horizontal)},inputs:{animation:"animation",collapsed:[0,"ngbCollapse","collapsed"],horizontal:"horizontal"},outputs:{ngbCollapseChange:"ngbCollapseChange",shown:"shown",hidden:"hidden"},exportAs:["ngbCollapse"],standalone:!0})}}return n})(),w0=0,NA=(()=>{class n{constructor(){this._vcr=f(Gr),this._element=f(fe).nativeElement,this._item=f(ci),this._viewRef=null}ngAfterContentChecked(){this._bodyTpl&&(this._item._shouldBeInDOM?this._createViewIfNotExists():this._destroyViewIfExists())}ngOnDestroy(){this._destroyViewIfExists()}_destroyViewIfExists(){this._viewRef&&(this._viewRef.destroy(),this._viewRef=null)}_createViewIfNotExists(){if(!this._viewRef){this._viewRef=this._vcr.createEmbeddedView(this._bodyTpl),this._viewRef.detectChanges();for(let e of this._viewRef.rootNodes)this._element.appendChild(e)}}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275dir=F({type:n,selectors:[["","ngbAccordionBody",""]],contentQueries:function(i,r,s){if(i&1&&Ut(s,Go,7),i&2){let o;vt(o=yt())&&(r._bodyTpl=o.first)}},hostVars:2,hostBindings:function(i,r){i&2&&ee("accordion-body",!0)},standalone:!0})}}return n})(),D0=(()=>{class n{constructor(){this.item=f(ci),this.ngbCollapse=f(hf)}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275dir=F({type:n,selectors:[["","ngbAccordionCollapse",""]],hostAttrs:["role","region"],hostVars:4,hostBindings:function(i,r){i&2&&(dn("id",r.item.collapseId),Ee("aria-labelledby",r.item.toggleId),ee("accordion-collapse",!0))},exportAs:["ngbAccordionCollapse"],standalone:!0,features:[zo([hf])]})}}return n})(),T0=(()=>{class n{constructor(){this.item=f(ci),this.accordion=f(vf)}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275dir=F({type:n,selectors:[["","ngbAccordionToggle",""]],hostVars:5,hostBindings:function(i,r){i&1&&ge("click",function(){return!r.item.disabled&&r.accordion.toggle(r.item.id)}),i&2&&(dn("id",r.item.toggleId),Ee("aria-controls",r.item.collapseId)("aria-expanded",!r.item.collapsed),ee("collapsed",r.item.collapsed))},standalone:!0})}}return n})(),kA=(()=>{class n{constructor(){this.item=f(ci)}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275dir=F({type:n,selectors:[["button","ngbAccordionButton",""]],hostAttrs:["type","button"],hostVars:3,hostBindings:function(i,r){i&2&&(dn("disabled",r.item.disabled),ee("accordion-button",!0))},standalone:!0,features:[zo([T0])]})}}return n})(),xA=(()=>{class n{constructor(){this.item=f(ci)}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275dir=F({type:n,selectors:[["","ngbAccordionHeader",""]],hostAttrs:["role","heading"],hostVars:4,hostBindings:function(i,r){i&2&&ee("accordion-header",!0)("collapsed",r.item.collapsed)},standalone:!0})}}return n})(),ci=(()=>{class n{constructor(){this._accordion=f(vf),this._cd=f(Dt),this._destroyRef=f(Ei),this._collapsed=!0,this._id=`ngb-accordion-item-${w0++}`,this._collapseAnimationRunning=!1,this.disabled=!1,this.show=new $,this.shown=new $,this.hide=new $,this.hidden=new $}set id(e){Rc(e)&&e!==""&&(this._id=e)}set destroyOnHide(e){this._destroyOnHide=e}get destroyOnHide(){return this._destroyOnHide===void 0?this._accordion.destroyOnHide:this._destroyOnHide}set collapsed(e){e?this.collapse():this.expand()}get collapsed(){return this._collapsed}get id(){return`${this._id}`}get toggleId(){return`${this.id}-toggle`}get collapseId(){return`${this.id}-collapse`}get _shouldBeInDOM(){return!this.collapsed||this._collapseAnimationRunning||!this.destroyOnHide}ngAfterContentInit(){let{ngbCollapse:e}=this._collapse;e.animation=!1,e.collapsed=this.collapsed,e.animation=this._accordion.animation,e.hidden.pipe(As(this._destroyRef)).subscribe(()=>{this._collapseAnimationRunning=!1,this.hidden.emit(),this._accordion.hidden.emit(this.id)}),e.shown.pipe(As(this._destroyRef)).subscribe(()=>{this.shown.emit(),this._accordion.shown.emit(this.id)})}toggle(){this.collapsed=!this.collapsed}expand(){if(this.collapsed){if(!this._accordion._ensureCanExpand(this))return;this._collapsed=!1,this._cd.markForCheck(),this._cd.detectChanges(),this.show.emit(),this._accordion.show.emit(this.id),this._collapse.ngbCollapse.animation=this._accordion.animation,this._collapse.ngbCollapse.collapsed=!1}}collapse(){this.collapsed||(this._collapsed=!0,this._collapseAnimationRunning=!0,this._cd.markForCheck(),this.hide.emit(),this._accordion.hide.emit(this.id),this._collapse.ngbCollapse.animation=this._accordion.animation,this._collapse.ngbCollapse.collapsed=!0)}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275dir=F({type:n,selectors:[["","ngbAccordionItem",""]],contentQueries:function(i,r,s){if(i&1&&Ut(s,D0,7),i&2){let o;vt(o=yt())&&(r._collapse=o.first)}},hostVars:3,hostBindings:function(i,r){i&2&&(dn("id",r.id),ee("accordion-item",!0))},inputs:{id:[0,"ngbAccordionItem","id"],destroyOnHide:"destroyOnHide",disabled:"disabled",collapsed:"collapsed"},outputs:{show:"show",shown:"shown",hide:"hide",hidden:"hidden"},exportAs:["ngbAccordionItem"],standalone:!0})}}return n})(),vf=(()=>{class n{constructor(){this._config=f(u0),this._anItemWasAlreadyExpandedDuringInitialisation=!1,this.animation=this._config.animation,this.closeOthers=this._config.closeOthers,this.destroyOnHide=this._config.destroyOnHide,this.show=new $,this.shown=new $,this.hide=new $,this.hidden=new $}toggle(e){this._getItem(e)?.toggle()}expand(e){this._getItem(e)?.expand()}expandAll(){this._items&&(this.closeOthers?this._items.find(e=>!e.collapsed)||this._items.first.expand():this._items.forEach(e=>e.expand()))}collapse(e){this._getItem(e)?.collapse()}collapseAll(){this._items?.forEach(e=>e.collapse())}isExpanded(e){let i=this._getItem(e);return i?!i.collapsed:!1}_ensureCanExpand(e){return this.closeOthers?this._items?(this._items.find(i=>!i.collapsed&&e!==i)?.collapse(),!0):this._anItemWasAlreadyExpandedDuringInitialisation?!1:(this._anItemWasAlreadyExpandedDuringInitialisation=!0,!0):!0}_getItem(e){return this._items?.find(i=>i.id===e)}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275dir=F({type:n,selectors:[["","ngbAccordion",""]],contentQueries:function(i,r,s){if(i&1&&Ut(s,ci,4),i&2){let o;vt(o=yt())&&(r._items=o)}},hostVars:2,hostBindings:function(i,r){i&2&&ee("accordion",!0)},inputs:{animation:"animation",closeOthers:"closeOthers",destroyOnHide:"destroyOnHide"},outputs:{show:"show",shown:"shown",hide:"hide",hidden:"hidden"},exportAs:["ngbAccordion"],standalone:!0})}}return n})();var FA=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=Re({type:n})}static{this.\u0275inj=Oe({})}}return n})();var Qe=function(n){return n[n.Tab=9]="Tab",n[n.Enter=13]="Enter",n[n.Escape=27]="Escape",n[n.Space=32]="Space",n[n.PageUp=33]="PageUp",n[n.PageDown=34]="PageDown",n[n.End=35]="End",n[n.Home=36]="Home",n[n.ArrowLeft=37]="ArrowLeft",n[n.ArrowUp=38]="ArrowUp",n[n.ArrowRight=39]="ArrowRight",n[n.ArrowDown=40]="ArrowDown",n}(Qe||{});var zs=(n,t)=>t?t.some(e=>e.contains(n)):!1,ff=(n,t)=>!t||p0(n,t)!=null,E0=(()=>{let n=()=>/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2,t=()=>/Android/.test(navigator.userAgent);return typeof navigator<"u"?!!navigator.userAgent&&(n()||t()):!1})(),C0=n=>E0?()=>setTimeout(()=>n(),100):n;function S0(n,t,e,i,r,s,o,c){e&&n.runOutsideAngular(C0(()=>{let a=p=>{let g=p.target;return p.button===2||zs(g,o)?!1:e==="inside"?zs(g,s)&&ff(g,c):e==="outside"?!zs(g,s):ff(g,c)||!zs(g,s)},l=De(t,"keydown").pipe(Y(r),he(p=>p.which===Qe.Escape),V(p=>p.preventDefault())),u=De(t,"mousedown").pipe(I(a),Y(r)),d=De(t,"mouseup").pipe(jr(u),he(([p,g])=>g),fu(0),Y(r));No([l.pipe(I(p=>0)),d.pipe(I(p=>1))]).subscribe(p=>n.run(()=>i(p)))}))}var yf=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(", ");function bf(n){let t=Array.from(n.querySelectorAll(yf)).filter(e=>e.tabIndex!==-1);return[t[0],t[t.length-1]]}var I0=(n,t,e,i=!1)=>{n.runOutsideAngular(()=>{let r=De(t,"focusin").pipe(Y(e),I(s=>s.target));De(t,"keydown").pipe(Y(e),he(s=>s.which===Qe.Tab),jr(r)).subscribe(([s,o])=>{let[c,a]=bf(t);(o===c||o===t)&&s.shiftKey&&(a.focus(),s.preventDefault()),o===a&&!s.shiftKey&&(c.focus(),s.preventDefault())}),i&&De(t,"click").pipe(Y(e),jr(r),I(s=>s[1])).subscribe(s=>s.focus())})},A0=(()=>{class n{constructor(){this._element=f(z).documentElement}isRTL(){return(this._element.getAttribute("dir")||"").toLowerCase()==="rtl"}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),O0=/\s+/,R0=/ +/gi,M0={top:["top"],bottom:["bottom"],start:["left","right"],left:["left"],end:["right","left"],right:["right"],"top-start":["top-start","top-end"],"top-left":["top-start"],"top-end":["top-end","top-start"],"top-right":["top-end"],"bottom-start":["bottom-start","bottom-end"],"bottom-left":["bottom-start"],"bottom-end":["bottom-end","bottom-start"],"bottom-right":["bottom-end"],"start-top":["left-start","right-start"],"left-top":["left-start"],"start-bottom":["left-end","right-end"],"left-bottom":["left-end"],"end-top":["right-start","left-start"],"right-top":["right-start"],"end-bottom":["right-end","left-end"],"right-bottom":["right-end"]};function P0(n,t){let[e,i]=M0[n];return t&&i||e}var N0=/^left/,k0=/^right/,x0=/^start/,F0=/^end/;function L0(n,t){let[e,i]=t.split("-"),r=e.replace(N0,"start").replace(k0,"end"),s=[r];if(i){let o=i;(e==="left"||e==="right")&&(o=o.replace(x0,"top").replace(F0,"bottom")),s.push(`${r}-${o}`)}return n&&(s=s.map(o=>`${n}-${o}`)),s.join(" ")}function pf({placement:n,baseClass:t},e){let i=Array.isArray(n)?n:n.split(O0),r=["top","bottom","start","end","top-start","top-end","bottom-start","bottom-end","start-top","start-bottom","end-top","end-bottom"],s=i.findIndex(l=>l==="auto");s>=0&&r.forEach(function(l){i.find(u=>u.search("^"+l)!==-1)==null&&i.splice(s++,1,l)});let o=i.map(l=>P0(l,e.isRTL()));return{placement:o.shift(),modifiers:[{name:"bootstrapClasses",enabled:!!t,phase:"write",fn({state:l}){let u=new RegExp(t+"(-[a-z]+)*","gi"),d=l.elements.popper,p=l.placement,g=d.className;g=g.replace(u,""),g+=` ${L0(t,p)}`,g=g.trim().replace(R0," "),d.className=g}},pc,_c,lc,{enabled:!0,name:"flip",options:{fallbackPlacements:o}},{enabled:!0,name:"preventOverflow",phase:"main",fn:function(){}}]}}function gf(n){return n}function B0(){let n=f(A0),t=null;return{createPopper(e){if(!t){let r=(e.updatePopperOptions||gf)(pf(e,n));t=Ec(e.hostElement,e.targetElement,r)}},update(){t&&t.update()},setOptions(e){if(t){let r=(e.updatePopperOptions||gf)(pf(e,n));t.setOptions(r)}},destroy(){t&&(t.destroy(),t=null)}}}function V0(n){return t=>(t.modifiers.push(gc,{name:"offset",options:{offset:()=>n}}),t)}var LA=new Date(1882,10,12),BA=new Date(2174,10,25);var VA=1e3*60*60*24;var Pc=1080,U0=24*Pc,j0=12*Pc+793,UA=29*U0+j0,jA=11*Pc+204;var $0=(()=>{class n{constructor(){this.autoClose=!0,this.placement=["bottom-start","bottom-end","top-start","top-end"],this.popperOptions=e=>e,this.container=null}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),wf=(()=>{class n{constructor(){this._disabled=!1,this.nativeElement=f(fe).nativeElement,this.tabindex=0}set disabled(e){this._disabled=e===""||e===!0}get disabled(){return this._disabled}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275dir=F({type:n,selectors:[["","ngbDropdownItem",""]],hostAttrs:[1,"dropdown-item"],hostVars:3,hostBindings:function(i,r){i&2&&(dn("tabIndex",r.disabled?-1:r.tabindex),ee("disabled",r.disabled))},inputs:{tabindex:"tabindex",disabled:"disabled"},standalone:!0})}}return n})(),$A=(()=>{class n{constructor(){this.item=f(wf)}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275dir=F({type:n,selectors:[["button","ngbDropdownItem",""]],hostVars:1,hostBindings:function(i,r){i&2&&dn("disabled",r.item.disabled)},standalone:!0})}}return n})(),H0=(()=>{class n{constructor(){this.dropdown=f(Df),this.nativeElement=f(fe).nativeElement}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275dir=F({type:n,selectors:[["","ngbDropdownMenu",""]],contentQueries:function(i,r,s){if(i&1&&Ut(s,wf,4),i&2){let o;vt(o=yt())&&(r.menuItems=o)}},hostVars:4,hostBindings:function(i,r){i&1&&ge("keydown.ArrowUp",function(o){return r.dropdown.onKeyDown(o)})("keydown.ArrowDown",function(o){return r.dropdown.onKeyDown(o)})("keydown.Home",function(o){return r.dropdown.onKeyDown(o)})("keydown.End",function(o){return r.dropdown.onKeyDown(o)})("keydown.Enter",function(o){return r.dropdown.onKeyDown(o)})("keydown.Space",function(o){return r.dropdown.onKeyDown(o)})("keydown.Tab",function(o){return r.dropdown.onKeyDown(o)})("keydown.Shift.Tab",function(o){return r.dropdown.onKeyDown(o)}),i&2&&ee("dropdown-menu",!0)("show",r.dropdown.isOpen())},standalone:!0})}}return n})(),Sc=(()=>{class n{constructor(){this.dropdown=f(Df),this.nativeElement=f(fe).nativeElement}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275dir=F({type:n,selectors:[["","ngbDropdownAnchor",""]],hostAttrs:[1,"dropdown-toggle"],hostVars:3,hostBindings:function(i,r){i&2&&(Ee("aria-expanded",r.dropdown.isOpen()),ee("show",r.dropdown.isOpen()))},standalone:!0})}}return n})(),HA=(()=>{class n extends Sc{static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=Bt(n)))(r||n)}})()}static{this.\u0275dir=F({type:n,selectors:[["","ngbDropdownToggle",""]],hostAttrs:[1,"dropdown-toggle"],hostVars:3,hostBindings:function(i,r){i&1&&ge("click",function(){return r.dropdown.toggle()})("keydown.ArrowUp",function(o){return r.dropdown.onKeyDown(o)})("keydown.ArrowDown",function(o){return r.dropdown.onKeyDown(o)})("keydown.Home",function(o){return r.dropdown.onKeyDown(o)})("keydown.End",function(o){return r.dropdown.onKeyDown(o)})("keydown.Tab",function(o){return r.dropdown.onKeyDown(o)})("keydown.Shift.Tab",function(o){return r.dropdown.onKeyDown(o)}),i&2&&(Ee("aria-expanded",r.dropdown.isOpen()),ee("show",r.dropdown.isOpen()))},standalone:!0,features:[bt([{provide:Sc,useExisting:gt(()=>n)}]),xe]})}}return n})(),Df=(()=>{class n{constructor(){this._changeDetector=f(Dt),this._config=f($0),this._document=f(z),this._ngZone=f(H),this._nativeElement=f(fe).nativeElement,this._destroyCloseHandlers$=new x,this._bodyContainer=null,this._positioning=B0(),this.autoClose=this._config.autoClose,this._open=!1,this.placement=this._config.placement,this.popperOptions=this._config.popperOptions,this.container=this._config.container,this.openChange=new $}ngOnInit(){this.display||(this.display=this._nativeElement.closest(".navbar")?"static":"dynamic")}ngAfterContentInit(){this._ngZone.onStable.pipe(Te(1)).subscribe(()=>{this._applyPlacementClasses(),this._open&&this._setCloseHandlers()})}ngOnChanges(e){if(e.container&&this._open&&this._applyContainer(this.container),e.placement&&!e.placement.firstChange&&(this._positioning.setOptions({hostElement:this._anchor.nativeElement,targetElement:this._bodyContainer||this._menu.nativeElement,placement:this.placement,appendToBody:this.container==="body"}),this._applyPlacementClasses()),e.dropdownClass){let{currentValue:i,previousValue:r}=e.dropdownClass;this._applyCustomDropdownClass(i,r)}e.autoClose&&this._open&&(this.autoClose=e.autoClose.currentValue,this._setCloseHandlers())}isOpen(){return this._open}open(){this._open||(this._open=!0,this._applyContainer(this.container),this.openChange.emit(!0),this._setCloseHandlers(),this._anchor&&(this._anchor.nativeElement.focus(),this.display==="dynamic"&&this._ngZone.runOutsideAngular(()=>{this._positioning.createPopper({hostElement:this._anchor.nativeElement,targetElement:this._bodyContainer||this._menu.nativeElement,placement:this.placement,appendToBody:this.container==="body",updatePopperOptions:e=>this.popperOptions(V0([0,2])(e))}),this._applyPlacementClasses(),this._zoneSubscription=this._ngZone.onStable.subscribe(()=>this._positionMenu())})))}_setCloseHandlers(){this._destroyCloseHandlers$.next(),S0(this._ngZone,this._document,this.autoClose,e=>{this.close(),e===0&&this._anchor.nativeElement.focus()},this._destroyCloseHandlers$,this._menu?[this._menu.nativeElement]:[],this._anchor?[this._anchor.nativeElement]:[],".dropdown-item,.dropdown-divider")}close(){this._open&&(this._open=!1,this._resetContainer(),this._positioning.destroy(),this._zoneSubscription?.unsubscribe(),this._destroyCloseHandlers$.next(),this.openChange.emit(!1),this._changeDetector.markForCheck())}toggle(){this.isOpen()?this.close():this.open()}ngOnDestroy(){this.close()}onKeyDown(e){let i=e.which,r=this._getMenuElements(),s=-1,o=null,c=this._isEventFromToggle(e);if(!c&&r.length&&r.forEach((a,l)=>{a.contains(e.target)&&(o=a),a===_f(this._document)&&(s=l)}),i===Qe.Space||i===Qe.Enter){o&&(this.autoClose===!0||this.autoClose==="inside")&&De(o,"click").pipe(Te(1)).subscribe(()=>this.close());return}if(i===Qe.Tab){if(e.target&&this.isOpen()&&this.autoClose)if(this._anchor.nativeElement===e.target){this.container==="body"&&!e.shiftKey?(this._menu.nativeElement.setAttribute("tabindex","0"),this._menu.nativeElement.focus(),this._menu.nativeElement.removeAttribute("tabindex")):e.shiftKey&&this.close();return}else if(this.container==="body"){let a=this._menu.nativeElement.querySelectorAll(yf);e.shiftKey&&e.target===a[0]?(this._anchor.nativeElement.focus(),e.preventDefault()):!e.shiftKey&&e.target===a[a.length-1]&&(this._anchor.nativeElement.focus(),this.close())}else De(e.target,"focusout").pipe(Te(1)).subscribe(({relatedTarget:a})=>{this._nativeElement.contains(a)||this.close()});return}if(c||o){if(this.open(),r.length){switch(i){case Qe.ArrowDown:s=Math.min(s+1,r.length-1);break;case Qe.ArrowUp:if(this._isDropup()&&s===-1){s=r.length-1;break}s=Math.max(s-1,0);break;case Qe.Home:s=0;break;case Qe.End:s=r.length-1;break}r[s].focus()}e.preventDefault()}}_isDropup(){return this._nativeElement.classList.contains("dropup")}_isEventFromToggle(e){return this._anchor.nativeElement.contains(e.target)}_getMenuElements(){return this._menu?this._menu.menuItems.filter(({disabled:e})=>!e).map(({nativeElement:e})=>e):[]}_positionMenu(){let e=this._menu;this.isOpen()&&e&&(this.display==="dynamic"?(this._positioning.update(),this._applyPlacementClasses()):this._applyPlacementClasses(this._getFirstPlacement(this.placement)))}_getFirstPlacement(e){return Array.isArray(e)?e[0]:e.split(" ")[0]}_resetContainer(){this._menu&&this._nativeElement.appendChild(this._menu.nativeElement),this._bodyContainer&&(this._document.body.removeChild(this._bodyContainer),this._bodyContainer=null)}_applyContainer(e=null){if(this._resetContainer(),e==="body"){let i=this._menu.nativeElement,r=this._bodyContainer=this._bodyContainer||this._document.createElement("div");r.style.position="absolute",i.style.position="static",r.style.zIndex="1055",r.appendChild(i),this._document.body.appendChild(r)}this._applyCustomDropdownClass(this.dropdownClass)}_applyCustomDropdownClass(e,i){let r=this.container==="body"?this._bodyContainer:this._nativeElement;r&&(i&&r.classList.remove(i),e&&r.classList.add(e))}_applyPlacementClasses(e){if(this._menu){e||(e=this._getFirstPlacement(this.placement)),this._nativeElement.classList.remove("dropup","dropdown"),this.display==="static"?this._menu.nativeElement.setAttribute("data-bs-popper","static"):this._menu.nativeElement.removeAttribute("data-bs-popper");let i=e.search("^top")!==-1?"dropup":"dropdown";this._nativeElement.classList.add(i),this._bodyContainer&&(this._bodyContainer.classList.remove("dropup","dropdown"),this._bodyContainer.classList.add(i))}}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275dir=F({type:n,selectors:[["","ngbDropdown",""]],contentQueries:function(i,r,s){if(i&1&&(Ut(s,H0,5),Ut(s,Sc,5)),i&2){let o;vt(o=yt())&&(r._menu=o.first),vt(o=yt())&&(r._anchor=o.first)}},hostVars:2,hostBindings:function(i,r){i&2&&ee("show",r.isOpen())},inputs:{autoClose:"autoClose",dropdownClass:"dropdownClass",_open:[0,"open","_open"],placement:"placement",popperOptions:"popperOptions",container:"container",display:"display"},outputs:{openChange:"openChange"},exportAs:["ngbDropdown"],standalone:!0,features:[it]})}}return n})();var GA=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=Re({type:n})}static{this.\u0275inj=Oe({})}}return n})(),G0=(()=>{class n{constructor(){this._ngbConfig=f(Oc),this.backdrop=!0,this.fullscreen=!1,this.keyboard=!0}get animation(){return this._animation??this._ngbConfig.animation}set animation(e){this._animation=e}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),ai=class{constructor(t,e,i){this.nodes=t,this.viewRef=e,this.componentRef=i}};var z0=(()=>{class n{constructor(){this._document=f(z)}hide(){let e=Math.abs(window.innerWidth-this._document.documentElement.clientWidth),i=this._document.body,r=i.style,{overflow:s,paddingRight:o}=r;if(e>0){let c=parseFloat(window.getComputedStyle(i).paddingRight);r.paddingRight=`${c+e}px`}return r.overflow="hidden",()=>{e>0&&(r.paddingRight=o),r.overflow=s}}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),W0=(()=>{class n{constructor(){this._nativeElement=f(fe).nativeElement,this._zone=f(H)}ngOnInit(){this._zone.onStable.asObservable().pipe(Te(1)).subscribe(()=>{Xt(this._zone,this._nativeElement,(e,i)=>{i&&Mc(e),e.classList.add("show")},{animation:this.animation,runningTransition:"continue"})})}hide(){return Xt(this._zone,this._nativeElement,({classList:e})=>e.remove("show"),{animation:this.animation,runningTransition:"stop"})}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=mt({type:n,selectors:[["ngb-modal-backdrop"]],hostAttrs:[2,"z-index","1055"],hostVars:6,hostBindings:function(i,r){i&2&&(Ce("modal-backdrop"+(r.backdropClass?" "+r.backdropClass:"")),ee("show",!r.animation)("fade",r.animation))},inputs:{animation:"animation",backdropClass:"backdropClass"},standalone:!0,features:[wt],decls:0,vars:0,template:function(i,r){},encapsulation:2})}}return n})(),Ws=class{update(t){}close(t){}dismiss(t){}},q0=["animation","ariaLabelledBy","ariaDescribedBy","backdrop","centered","fullscreen","keyboard","scrollable","size","windowClass","modalDialogClass"],J0=["animation","backdropClass"],Ic=class{_applyWindowOptions(t,e){q0.forEach(i=>{Cc(e[i])&&(t[i]=e[i])})}_applyBackdropOptions(t,e){J0.forEach(i=>{Cc(e[i])&&(t[i]=e[i])})}update(t){this._applyWindowOptions(this._windowCmptRef.instance,t),this._backdropCmptRef&&this._backdropCmptRef.instance&&this._applyBackdropOptions(this._backdropCmptRef.instance,t)}get componentInstance(){if(this._contentRef&&this._contentRef.componentRef)return this._contentRef.componentRef.instance}get closed(){return this._closed.asObservable().pipe(Y(this._hidden))}get dismissed(){return this._dismissed.asObservable().pipe(Y(this._hidden))}get hidden(){return this._hidden.asObservable()}get shown(){return this._windowCmptRef.instance.shown.asObservable()}constructor(t,e,i,r){this._windowCmptRef=t,this._contentRef=e,this._backdropCmptRef=i,this._beforeDismiss=r,this._closed=new x,this._dismissed=new x,this._hidden=new x,t.instance.dismissEvent.subscribe(s=>{this.dismiss(s)}),this.result=new Promise((s,o)=>{this._resolve=s,this._reject=o}),this.result.then(null,()=>{})}close(t){this._windowCmptRef&&(this._closed.next(t),this._resolve(t),this._removeModalElements())}_dismiss(t){this._dismissed.next(t),this._reject(t),this._removeModalElements()}dismiss(t){if(this._windowCmptRef)if(!this._beforeDismiss)this._dismiss(t);else{let e=this._beforeDismiss();h0(e)?e.then(i=>{i!==!1&&this._dismiss(t)},()=>{}):e!==!1&&this._dismiss(t)}}_removeModalElements(){let t=this._windowCmptRef.instance.hide(),e=this._backdropCmptRef?this._backdropCmptRef.instance.hide():w(void 0);t.subscribe(()=>{let{nativeElement:i}=this._windowCmptRef.location;i.parentNode.removeChild(i),this._windowCmptRef.destroy(),this._contentRef&&this._contentRef.viewRef&&this._contentRef.viewRef.destroy(),this._windowCmptRef=null,this._contentRef=null}),e.subscribe(()=>{if(this._backdropCmptRef){let{nativeElement:i}=this._backdropCmptRef.location;i.parentNode.removeChild(i),this._backdropCmptRef.destroy(),this._backdropCmptRef=null}}),Ur(t,e).subscribe(()=>{this._hidden.next(),this._hidden.complete()})}},Ac=function(n){return n[n.BACKDROP_CLICK=0]="BACKDROP_CLICK",n[n.ESC=1]="ESC",n}(Ac||{}),K0=(()=>{class n{constructor(){this._document=f(z),this._elRef=f(fe),this._zone=f(H),this._closed$=new x,this._elWithFocus=null,this.backdrop=!0,this.keyboard=!0,this.dismissEvent=new $,this.shown=new x,this.hidden=new x}get fullscreenClass(){return this.fullscreen===!0?" modal-fullscreen":Rc(this.fullscreen)?` modal-fullscreen-${this.fullscreen}-down`:""}dismiss(e){this.dismissEvent.emit(e)}ngOnInit(){this._elWithFocus=this._document.activeElement,this._zone.onStable.asObservable().pipe(Te(1)).subscribe(()=>{this._show()})}ngOnDestroy(){this._disableEventHandling()}hide(){let{nativeElement:e}=this._elRef,i={animation:this.animation,runningTransition:"stop"},r=Xt(this._zone,e,()=>e.classList.remove("show"),i),s=Xt(this._zone,this._dialogEl.nativeElement,()=>{},i),o=Ur(r,s);return o.subscribe(()=>{this.hidden.next(),this.hidden.complete()}),this._disableEventHandling(),this._restoreFocus(),o}_show(){let e={animation:this.animation,runningTransition:"continue"},i=Xt(this._zone,this._elRef.nativeElement,(s,o)=>{o&&Mc(s),s.classList.add("show")},e),r=Xt(this._zone,this._dialogEl.nativeElement,()=>{},e);Ur(i,r).subscribe(()=>{this.shown.next(),this.shown.complete()}),this._enableEventHandling(),this._setFocus()}_enableEventHandling(){let{nativeElement:e}=this._elRef;this._zone.runOutsideAngular(()=>{De(e,"keydown").pipe(Y(this._closed$),he(r=>r.which===Qe.Escape)).subscribe(r=>{this.keyboard?requestAnimationFrame(()=>{r.defaultPrevented||this._zone.run(()=>this.dismiss(Ac.ESC))}):this.backdrop==="static"&&this._bumpBackdrop()});let i=!1;De(this._dialogEl.nativeElement,"mousedown").pipe(Y(this._closed$),V(()=>i=!1),ae(()=>De(e,"mouseup").pipe(Y(this._closed$),Te(1))),he(({target:r})=>e===r)).subscribe(()=>{i=!0}),De(e,"click").pipe(Y(this._closed$)).subscribe(({target:r})=>{e===r&&(this.backdrop==="static"?this._bumpBackdrop():this.backdrop===!0&&!i&&this._zone.run(()=>this.dismiss(Ac.BACKDROP_CLICK))),i=!1})})}_disableEventHandling(){this._closed$.next()}_setFocus(){let{nativeElement:e}=this._elRef;if(!e.contains(document.activeElement)){let i=e.querySelector("[ngbAutofocus]"),r=bf(e)[0];(i||r||e).focus()}}_restoreFocus(){let e=this._document.body,i=this._elWithFocus,r;i&&i.focus&&e.contains(i)?r=i:r=e,this._zone.runOutsideAngular(()=>{setTimeout(()=>r.focus()),this._elWithFocus=null})}_bumpBackdrop(){this.backdrop==="static"&&Xt(this._zone,this._elRef.nativeElement,({classList:e})=>(e.add("modal-static"),()=>e.remove("modal-static")),{animation:this.animation,runningTransition:"continue"})}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=mt({type:n,selectors:[["ngb-modal-window"]],viewQuery:function(i,r){if(i&1&&Gu(o0,7),i&2){let s;vt(s=yt())&&(r._dialogEl=s.first)}},hostAttrs:["role","dialog","tabindex","-1"],hostVars:7,hostBindings:function(i,r){i&2&&(Ee("aria-modal",!0)("aria-labelledby",r.ariaLabelledBy)("aria-describedby",r.ariaDescribedBy),Ce("modal d-block"+(r.windowClass?" "+r.windowClass:"")),ee("fade",r.animation))},inputs:{animation:"animation",ariaLabelledBy:"ariaLabelledBy",ariaDescribedBy:"ariaDescribedBy",backdrop:"backdrop",centered:"centered",fullscreen:"fullscreen",keyboard:"keyboard",scrollable:"scrollable",size:"size",windowClass:"windowClass",modalDialogClass:"modalDialogClass"},outputs:{dismissEvent:"dismiss"},standalone:!0,features:[wt],ngContentSelectors:s0,decls:4,vars:2,consts:[["dialog",""],["role","document"],[1,"modal-content"]],template:function(i,r){i&1&&($u(),Se(0,"div",1,0)(2,"div",2),Hu(3),Fe()()),i&2&&Ce("modal-dialog"+(r.size?" modal-"+r.size:"")+(r.centered?" modal-dialog-centered":"")+r.fullscreenClass+(r.scrollable?" modal-dialog-scrollable":"")+(r.modalDialogClass?" "+r.modalDialogClass:""))},styles:[`ngb-modal-window .component-host-scrollable{display:flex;flex-direction:column;overflow:hidden}
|
|
3
|
+
`],encapsulation:2})}}return n})(),Y0=(()=>{class n{constructor(){this._applicationRef=f(st),this._injector=f(X),this._environmentInjector=f(nt),this._document=f(z),this._scrollBar=f(z0),this._activeWindowCmptHasChanged=new x,this._ariaHiddenValues=new Map,this._scrollBarRestoreFn=null,this._modalRefs=[],this._windowCmpts=[],this._activeInstances=new $;let e=f(H);this._activeWindowCmptHasChanged.subscribe(()=>{if(this._windowCmpts.length){let i=this._windowCmpts[this._windowCmpts.length-1];I0(e,i.location.nativeElement,this._activeWindowCmptHasChanged),this._revertAriaHidden(),this._setAriaHidden(i.location.nativeElement)}})}_restoreScrollBar(){let e=this._scrollBarRestoreFn;e&&(this._scrollBarRestoreFn=null,e())}_hideScrollBar(){this._scrollBarRestoreFn||(this._scrollBarRestoreFn=this._scrollBar.hide())}open(e,i,r){let s=r.container instanceof HTMLElement?r.container:Cc(r.container)?this._document.querySelector(r.container):this._document.body;if(!s)throw new Error(`The specified modal container "${r.container||"body"}" was not found in the DOM.`);this._hideScrollBar();let o=new Ws;e=r.injector||e;let c=e.get(nt,null)||this._environmentInjector,a=this._getContentRef(e,c,i,o,r),l=r.backdrop!==!1?this._attachBackdrop(s):void 0,u=this._attachWindowComponent(s,a.nodes),d=new Ic(u,a,l,r.beforeDismiss);return this._registerModalRef(d),this._registerWindowCmpt(u),d.hidden.pipe(Te(1)).subscribe(()=>Promise.resolve(!0).then(()=>{this._modalRefs.length||(this._document.body.classList.remove("modal-open"),this._restoreScrollBar(),this._revertAriaHidden())})),o.close=p=>{d.close(p)},o.dismiss=p=>{d.dismiss(p)},o.update=p=>{d.update(p)},d.update(r),this._modalRefs.length===1&&this._document.body.classList.add("modal-open"),l&&l.instance&&l.changeDetectorRef.detectChanges(),u.changeDetectorRef.detectChanges(),d}get activeInstances(){return this._activeInstances}dismissAll(e){this._modalRefs.forEach(i=>i.dismiss(e))}hasOpenModals(){return this._modalRefs.length>0}_attachBackdrop(e){let i=Yr(W0,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector});return this._applicationRef.attachView(i.hostView),e.appendChild(i.location.nativeElement),i}_attachWindowComponent(e,i){let r=Yr(K0,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector,projectableNodes:i});return this._applicationRef.attachView(r.hostView),e.appendChild(r.location.nativeElement),r}_getContentRef(e,i,r,s,o){return r?r instanceof Go?this._createFromTemplateRef(r,s):Rc(r)?this._createFromString(r):this._createFromComponent(e,i,r,s,o):new ai([])}_createFromTemplateRef(e,i){let r={$implicit:i,close(o){i.close(o)},dismiss(o){i.dismiss(o)}},s=e.createEmbeddedView(r);return this._applicationRef.attachView(s),new ai([s.rootNodes],s)}_createFromString(e){let i=this._document.createTextNode(`${e}`);return new ai([[i]])}_createFromComponent(e,i,r,s,o){let c=X.create({providers:[{provide:Ws,useValue:s}],parent:e}),a=Yr(r,{environmentInjector:i,elementInjector:c}),l=a.location.nativeElement;return o.scrollable&&l.classList.add("component-host-scrollable"),this._applicationRef.attachView(a.hostView),new ai([[l]],a.hostView,a)}_setAriaHidden(e){let i=e.parentElement;i&&e!==this._document.body&&(Array.from(i.children).forEach(r=>{r!==e&&r.nodeName!=="SCRIPT"&&(this._ariaHiddenValues.set(r,r.getAttribute("aria-hidden")),r.setAttribute("aria-hidden","true"))}),this._setAriaHidden(i))}_revertAriaHidden(){this._ariaHiddenValues.forEach((e,i)=>{e?i.setAttribute("aria-hidden",e):i.removeAttribute("aria-hidden")}),this._ariaHiddenValues.clear()}_registerModalRef(e){let i=()=>{let r=this._modalRefs.indexOf(e);r>-1&&(this._modalRefs.splice(r,1),this._activeInstances.emit(this._modalRefs))};this._modalRefs.push(e),this._activeInstances.emit(this._modalRefs),e.result.then(i,i)}_registerWindowCmpt(e){this._windowCmpts.push(e),this._activeWindowCmptHasChanged.next(),e.onDestroy(()=>{let i=this._windowCmpts.indexOf(e);i>-1&&(this._windowCmpts.splice(i,1),this._activeWindowCmptHasChanged.next())})}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),zA=(()=>{class n{constructor(){this._injector=f(X),this._modalStack=f(Y0),this._config=f(G0)}open(e,i={}){let r=m(N(m({},this._config),{animation:this._config.animation}),i);return this._modalStack.open(this._injector,e,r)}get activeInstances(){return this._modalStack.activeInstances}dismissAll(e){this._modalStack.dismissAll(e)}hasOpenModals(){return this._modalStack.hasOpenModals()}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var WA=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=Re({type:n})}static{this.\u0275inj=Oe({})}}return n})();var qA=(()=>{class n{constructor(){this.highlightClass="ngb-highlight",this.accentSensitive=!0}ngOnChanges(e){!this.accentSensitive&&!String.prototype.normalize&&(console.warn("The `accentSensitive` input in `ngb-highlight` cannot be set to `false` in a browser that does not implement the `String.normalize` function. You will have to include a polyfill in your application to use this feature in the current browser."),this.accentSensitive=!0);let i=uf(this.result),r=Array.isArray(this.term)?this.term:[this.term],s=l=>this.accentSensitive?l:df(l),o=r.map(l=>f0(s(uf(l)))).filter(l=>l),c=this.accentSensitive?i:df(i),a=o.length?c.split(new RegExp(`(${o.join("|")})`,"gmi")):[i];if(this.accentSensitive)this.parts=a;else{let l=0;this.parts=a.map(u=>i.substring(l,l+=u.length))}}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=mt({type:n,selectors:[["ngb-highlight"]],inputs:{highlightClass:"highlightClass",result:"result",term:"term",accentSensitive:"accentSensitive"},standalone:!0,features:[it,wt],decls:2,vars:0,consts:[[3,"class"]],template:function(i,r){i&1&&Vu(0,l0,2,1,null,null,Bu),i&2&&Uu(r.parts)},styles:[`.ngb-highlight{font-weight:700}
|
|
4
|
+
`],encapsulation:2,changeDetection:0})}}return n})(),JA=new O("live announcer delay",{providedIn:"root",factory:()=>100});var Tf=["toast-component",""];function Q0(n,t){if(n&1){let e=zr();Se(0,"button",5),ge("click",function(){$r(e);let r=ce();return Hr(r.remove())}),Se(1,"span",6),Le(2,"\xD7"),Fe()()}}function Z0(n,t){if(n&1&&(Ii(0),Le(1),Ai()),n&2){let e=ce(2);q(),jt("[",e.duplicatesCount+1,"]")}}function X0(n,t){if(n&1&&(Se(0,"div"),Le(1),un(2,Z0,2,1,"ng-container",4),Fe()),n&2){let e=ce();Ce(e.options.titleClass),Ee("aria-label",e.title),q(),jt(" ",e.title," "),q(),pe("ngIf",e.duplicatesCount)}}function ey(n,t){if(n&1&&Vt(0,"div",7),n&2){let e=ce();Ce(e.options.messageClass),pe("innerHTML",e.message,Ho)}}function ty(n,t){if(n&1&&(Se(0,"div",8),Le(1),Fe()),n&2){let e=ce();Ce(e.options.messageClass),Ee("aria-label",e.message),q(),jt(" ",e.message," ")}}function ny(n,t){if(n&1&&(Se(0,"div"),Vt(1,"div",9),Fe()),n&2){let e=ce();q(),Bn("width",e.width()+"%")}}function iy(n,t){if(n&1){let e=zr();Se(0,"button",5),ge("click",function(){$r(e);let r=ce();return Hr(r.remove())}),Se(1,"span",6),Le(2,"\xD7"),Fe()()}}function ry(n,t){if(n&1&&(Ii(0),Le(1),Ai()),n&2){let e=ce(2);q(),jt("[",e.duplicatesCount+1,"]")}}function sy(n,t){if(n&1&&(Se(0,"div"),Le(1),un(2,ry,2,1,"ng-container",4),Fe()),n&2){let e=ce();Ce(e.options.titleClass),Ee("aria-label",e.title),q(),jt(" ",e.title," "),q(),pe("ngIf",e.duplicatesCount)}}function oy(n,t){if(n&1&&Vt(0,"div",7),n&2){let e=ce();Ce(e.options.messageClass),pe("innerHTML",e.message,Ho)}}function ay(n,t){if(n&1&&(Se(0,"div",8),Le(1),Fe()),n&2){let e=ce();Ce(e.options.messageClass),Ee("aria-label",e.message),q(),jt(" ",e.message," ")}}function cy(n,t){if(n&1&&(Se(0,"div"),Vt(1,"div",9),Fe()),n&2){let e=ce();q(),Bn("width",e.width()+"%")}}var Nc=class{_attachedHost;component;viewContainerRef;injector;constructor(t,e){this.component=t,this.injector=e}attach(t,e){return this._attachedHost=t,t.attach(this,e)}detach(){let t=this._attachedHost;if(t)return this._attachedHost=void 0,t.detach()}get isAttached(){return this._attachedHost!=null}setAttachedHost(t){this._attachedHost=t}},kc=class{_attachedPortal;_disposeFn;attach(t,e){return this._attachedPortal=t,this.attachComponentPortal(t,e)}detach(){this._attachedPortal&&this._attachedPortal.setAttachedHost(),this._attachedPortal=void 0,this._disposeFn&&(this._disposeFn(),this._disposeFn=void 0)}setDisposeFn(t){this._disposeFn=t}},xc=class{_overlayRef;componentInstance;duplicatesCount=0;_afterClosed=new x;_activate=new x;_manualClose=new x;_resetTimeout=new x;_countDuplicate=new x;constructor(t){this._overlayRef=t}manualClose(){this._manualClose.next(),this._manualClose.complete()}manualClosed(){return this._manualClose.asObservable()}timeoutReset(){return this._resetTimeout.asObservable()}countDuplicate(){return this._countDuplicate.asObservable()}close(){this._overlayRef.detach(),this._afterClosed.next(),this._manualClose.next(),this._afterClosed.complete(),this._manualClose.complete(),this._activate.complete(),this._resetTimeout.complete(),this._countDuplicate.complete()}afterClosed(){return this._afterClosed.asObservable()}isInactive(){return this._activate.isStopped}activate(){this._activate.next(),this._activate.complete()}afterActivate(){return this._activate.asObservable()}onDuplicate(t,e){t&&this._resetTimeout.next(),e&&this._countDuplicate.next(++this.duplicatesCount)}},li=class{toastId;config;message;title;toastType;toastRef;_onTap=new x;_onAction=new x;constructor(t,e,i,r,s,o){this.toastId=t,this.config=e,this.message=i,this.title=r,this.toastType=s,this.toastRef=o,this.toastRef.afterClosed().subscribe(()=>{this._onAction.complete(),this._onTap.complete()})}triggerTap(){this._onTap.next(),this.config.tapToDismiss&&this._onTap.complete()}onTap(){return this._onTap.asObservable()}triggerAction(t){this._onAction.next(t)}onAction(){return this._onAction.asObservable()}},Ef={maxOpened:0,autoDismiss:!1,newestOnTop:!0,preventDuplicates:!1,countDuplicates:!1,resetTimeoutOnDuplicate:!1,includeTitleDuplicates:!1,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},closeButton:!1,disableTimeOut:!1,timeOut:5e3,extendedTimeOut:1e3,enableHtml:!1,progressBar:!1,toastClass:"ngx-toastr",positionClass:"toast-top-right",titleClass:"toast-title",messageClass:"toast-message",easing:"ease-in",easeTime:300,tapToDismiss:!0,onActivateTick:!1,progressAnimation:"decreasing"},Cf=new O("ToastConfig"),Fc=class extends kc{_hostDomElement;_componentFactoryResolver;_appRef;constructor(t,e,i){super(),this._hostDomElement=t,this._componentFactoryResolver=e,this._appRef=i}attachComponentPortal(t,e){let i=this._componentFactoryResolver.resolveComponentFactory(t.component),r;return r=i.create(t.injector),this._appRef.attachView(r.hostView),this.setDisposeFn(()=>{this._appRef.detachView(r.hostView),r.destroy()}),e?this._hostDomElement.insertBefore(this._getComponentRootNode(r),this._hostDomElement.firstChild):this._hostDomElement.appendChild(this._getComponentRootNode(r)),r}_getComponentRootNode(t){return t.hostView.rootNodes[0]}},ly=(()=>{class n{_document=f(z);_containerElement;ngOnDestroy(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let e=this._document.createElement("div");e.classList.add("overlay-container"),e.setAttribute("aria-live","polite"),this._document.body.appendChild(e),this._containerElement=e}static \u0275fac=function(i){return new(i||n)};static \u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Lc=class{_portalHost;constructor(t){this._portalHost=t}attach(t,e=!0){return this._portalHost.attach(t,e)}detach(){return this._portalHost.detach()}},uy=(()=>{class n{_overlayContainer=f(ly);_componentFactoryResolver=f(Pu);_appRef=f(st);_document=f(z);_paneElements=new Map;create(e,i){return this._createOverlayRef(this.getPaneElement(e,i))}getPaneElement(e="",i){return this._paneElements.get(i)||this._paneElements.set(i,{}),this._paneElements.get(i)[e]||(this._paneElements.get(i)[e]=this._createPaneElement(e,i)),this._paneElements.get(i)[e]}_createPaneElement(e,i){let r=this._document.createElement("div");return r.id="toast-container",r.classList.add(e),r.classList.add("toast-container"),i?i.getContainerElement().appendChild(r):this._overlayContainer.getContainerElement().appendChild(r),r}_createPortalHost(e){return new Fc(e,this._componentFactoryResolver,this._appRef)}_createOverlayRef(e){return new Lc(this._createPortalHost(e))}static \u0275fac=function(i){return new(i||n)};static \u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),qs=(()=>{class n{overlay;_injector;sanitizer;ngZone;toastrConfig;currentlyActive=0;toasts=[];overlayContainer;previousToastMessage;index=0;constructor(e,i,r,s,o){this.overlay=i,this._injector=r,this.sanitizer=s,this.ngZone=o,this.toastrConfig=m(m({},e.default),e.config),e.config.iconClasses&&(this.toastrConfig.iconClasses=m(m({},e.default.iconClasses),e.config.iconClasses))}show(e,i,r={},s=""){return this._preBuildNotification(s,e,i,this.applyConfig(r))}success(e,i,r={}){let s=this.toastrConfig.iconClasses.success||"";return this._preBuildNotification(s,e,i,this.applyConfig(r))}error(e,i,r={}){let s=this.toastrConfig.iconClasses.error||"";return this._preBuildNotification(s,e,i,this.applyConfig(r))}info(e,i,r={}){let s=this.toastrConfig.iconClasses.info||"";return this._preBuildNotification(s,e,i,this.applyConfig(r))}warning(e,i,r={}){let s=this.toastrConfig.iconClasses.warning||"";return this._preBuildNotification(s,e,i,this.applyConfig(r))}clear(e){for(let i of this.toasts)if(e!==void 0){if(i.toastId===e){i.toastRef.manualClose();return}}else i.toastRef.manualClose()}remove(e){let i=this._findToast(e);if(!i||(i.activeToast.toastRef.close(),this.toasts.splice(i.index,1),this.currentlyActive=this.currentlyActive-1,!this.toastrConfig.maxOpened||!this.toasts.length))return!1;if(this.currentlyActive<this.toastrConfig.maxOpened&&this.toasts[this.currentlyActive]){let r=this.toasts[this.currentlyActive].toastRef;r.isInactive()||(this.currentlyActive=this.currentlyActive+1,r.activate())}return!0}findDuplicate(e="",i="",r,s){let{includeTitleDuplicates:o}=this.toastrConfig;for(let c of this.toasts){let a=o&&c.title===e;if((!o||a)&&c.message===i)return c.toastRef.onDuplicate(r,s),c}return null}applyConfig(e={}){return m(m({},this.toastrConfig),e)}_findToast(e){for(let i=0;i<this.toasts.length;i++)if(this.toasts[i].toastId===e)return{index:i,activeToast:this.toasts[i]};return null}_preBuildNotification(e,i,r,s){return s.onActivateTick?this.ngZone.run(()=>this._buildNotification(e,i,r,s)):this._buildNotification(e,i,r,s)}_buildNotification(e,i,r,s){if(!s.toastComponent)throw new Error("toastComponent required");let o=this.findDuplicate(r,i,this.toastrConfig.resetTimeoutOnDuplicate&&s.timeOut>0,this.toastrConfig.countDuplicates);if((this.toastrConfig.includeTitleDuplicates&&r||i)&&this.toastrConfig.preventDuplicates&&o!==null)return o;this.previousToastMessage=i;let c=!1;this.toastrConfig.maxOpened&&this.currentlyActive>=this.toastrConfig.maxOpened&&(c=!0,this.toastrConfig.autoDismiss&&this.clear(this.toasts[0].toastId));let a=this.overlay.create(s.positionClass,this.overlayContainer);this.index=this.index+1;let l=i;i&&s.enableHtml&&(l=this.sanitizer.sanitize(_t.HTML,i));let u=new xc(a),d=new li(this.index,s,l,r,e,u),p=[{provide:li,useValue:d}],g=X.create({providers:p,parent:this._injector}),b=new Nc(s.toastComponent,g),v=a.attach(b,s.newestOnTop);u.componentInstance=v.instance;let _={toastId:this.index,title:r||"",message:i||"",toastRef:u,onShown:u.afterActivate(),onHidden:u.afterClosed(),onTap:d.onTap(),onAction:d.onAction(),portal:v};return c||(this.currentlyActive=this.currentlyActive+1,setTimeout(()=>{_.toastRef.activate()})),this.toasts.push(_),_}static \u0275fac=function(i){return new(i||n)(C(Cf),C(uy),C(X),C(ha),C(H))};static \u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),dy=(()=>{class n{toastrService;toastPackage;ngZone;message;title;options;duplicatesCount;originalTimeout;width=ze(-1);toastClasses="";state;get _state(){return this.state()}get displayStyle(){if(this.state().value==="inactive")return"none"}timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(e,i,r){this.toastrService=e,this.toastPackage=i,this.ngZone=r,this.message=i.message,this.title=i.title,this.options=i.config,this.originalTimeout=i.config.timeOut,this.toastClasses=`${i.toastType} ${i.config.toastClass}`,this.sub=i.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=i.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=i.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=i.toastRef.countDuplicate().subscribe(s=>{this.duplicatesCount=s}),this.state=ze({value:"inactive",params:{easeTime:this.toastPackage.config.easeTime,easing:"ease-in"}})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.update(e=>N(m({},e),{value:"active"})),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.outsideTimeout(()=>this.remove(),this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}updateProgress(){if(this.width()===0||this.width()===100||!this.options.timeOut)return;let e=new Date().getTime(),i=this.hideTime-e;this.width.set(i/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(r=>100-r),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.update(e=>N(m({},e),{value:"active"})),this.outsideTimeout(()=>this.remove(),this.originalTimeout),this.options.timeOut=this.originalTimeout,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10)}remove(){this.state().value!=="removed"&&(clearTimeout(this.timeout),this.state.update(e=>N(m({},e),{value:"removed"})),this.outsideTimeout(()=>this.toastrService.remove(this.toastPackage.toastId),+this.toastPackage.config.easeTime))}tapToast(){this.state().value!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state().value!=="removed"&&this.options.disableTimeOut!=="extendedTimeOut"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width.set(0))}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state().value==="removed"||(this.outsideTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}outsideTimeout(e,i){this.ngZone?this.ngZone.runOutsideAngular(()=>this.timeout=setTimeout(()=>this.runInsideAngular(e),i)):this.timeout=setTimeout(()=>e(),i)}outsideInterval(e,i){this.ngZone?this.ngZone.runOutsideAngular(()=>this.intervalId=setInterval(()=>this.runInsideAngular(e),i)):this.intervalId=setInterval(()=>e(),i)}runInsideAngular(e){this.ngZone?this.ngZone.run(()=>e()):e()}static \u0275fac=function(i){return new(i||n)(R(qs),R(li),R(H))};static \u0275cmp=mt({type:n,selectors:[["","toast-component",""]],hostVars:5,hostBindings:function(i,r){i&1&&ge("click",function(){return r.tapToast()})("mouseenter",function(){return r.stickAround()})("mouseleave",function(){return r.delayedHideToast()}),i&2&&(ju("@flyInOut",r._state),Ce(r.toastClasses),Bn("display",r.displayStyle))},standalone:!0,features:[wt],attrs:Tf,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(i,r){i&1&&un(0,Q0,3,0,"button",0)(1,X0,3,5,"div",1)(2,ey,1,3,"div",2)(3,ty,2,4,"div",3)(4,ny,2,2,"div",4),i&2&&(pe("ngIf",r.options.closeButton),q(),pe("ngIf",r.title),q(),pe("ngIf",r.message&&r.options.enableHtml),q(),pe("ngIf",r.message&&!r.options.enableHtml),q(),pe("ngIf",r.options.progressBar))},dependencies:[Ko],encapsulation:2,data:{animation:[nd("flyInOut",[ts("inactive",es({opacity:0})),ts("active",es({opacity:1})),ts("removed",es({opacity:0})),Qo("inactive => active",Yo("{{ easeTime }}ms {{ easing }}")),Qo("active => removed",Yo("{{ easeTime }}ms {{ easing }}"))])]},changeDetection:0})}return n})(),hy=N(m({},Ef),{toastComponent:dy}),lO=(n={})=>Ge([{provide:Cf,useValue:{default:hy,config:n}}]);var fy=(()=>{class n{toastrService;toastPackage;appRef;message;title;options;duplicatesCount;originalTimeout;width=ze(-1);toastClasses="";get displayStyle(){return this.state()==="inactive"?"none":null}state=ze("inactive");timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(e,i,r){this.toastrService=e,this.toastPackage=i,this.appRef=r,this.message=i.message,this.title=i.title,this.options=i.config,this.originalTimeout=i.config.timeOut,this.toastClasses=`${i.toastType} ${i.config.toastClass}`,this.sub=i.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=i.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=i.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=i.toastRef.countDuplicate().subscribe(s=>{this.duplicatesCount=s})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.set("active"),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.timeout=setTimeout(()=>{this.remove()},this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))),this.options.onActivateTick&&this.appRef.tick()}updateProgress(){if(this.width()===0||this.width()===100||!this.options.timeOut)return;let e=new Date().getTime(),i=this.hideTime-e;this.width.set(i/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(r=>100-r),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.set("active"),this.options.timeOut=this.originalTimeout,this.timeout=setTimeout(()=>this.remove(),this.originalTimeout),this.hideTime=new Date().getTime()+(this.originalTimeout||0),this.width.set(-1),this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))}remove(){this.state()!=="removed"&&(clearTimeout(this.timeout),this.state.set("removed"),this.timeout=setTimeout(()=>this.toastrService.remove(this.toastPackage.toastId)))}tapToast(){this.state()!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state()!=="removed"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width.set(0))}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state()==="removed"||(this.timeout=setTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10)))}static \u0275fac=function(i){return new(i||n)(R(qs),R(li),R(st))};static \u0275cmp=mt({type:n,selectors:[["","toast-component",""]],hostVars:4,hostBindings:function(i,r){i&1&&ge("click",function(){return r.tapToast()})("mouseenter",function(){return r.stickAround()})("mouseleave",function(){return r.delayedHideToast()}),i&2&&(Ce(r.toastClasses),Bn("display",r.displayStyle))},standalone:!0,features:[wt],attrs:Tf,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(i,r){i&1&&un(0,iy,3,0,"button",0)(1,sy,3,5,"div",1)(2,oy,1,3,"div",2)(3,ay,2,4,"div",3)(4,cy,2,2,"div",4),i&2&&(pe("ngIf",r.options.closeButton),q(),pe("ngIf",r.title),q(),pe("ngIf",r.message&&r.options.enableHtml),q(),pe("ngIf",r.message&&!r.options.enableHtml),q(),pe("ngIf",r.options.progressBar))},dependencies:[Ko],encapsulation:2,changeDetection:0})}return n})(),uO=N(m({},Ef),{toastComponent:fy});var Sf=(()=>{class n{constructor(){this.http=f(ia),this.toastr=f(qs),this.requestTimeout=1e4}get(e,i={},r="/"){return this.http.get(`${r}${e}`,m({},i)).pipe(kn(this.requestTimeout),ye(this.handleError.bind(this)))}post(e,i,r={},s="/"){return this.http.post(`${s}${e}`,i,m({},r)).pipe(kn(this.requestTimeout),ye(this.handleError.bind(this)))}postFormData(e,i,r={},s="/"){return this.http.post(`${s}/${e}`,i,m({},r)).pipe(kn(this.requestTimeout),ye(this.handleError.bind(this)))}put(e,i,r={},s="/"){return this.http.put(`${s}/${e}`,i,m({},r)).pipe(kn(this.requestTimeout),ye(this.handleError.bind(this)))}delete(e,i={},r="/"){return this.http.delete(`${r}/${e}`,m({},i)).pipe(kn(this.requestTimeout),ye(this.handleError.bind(this)))}handleError(e){let i={header:"API Error ",message:"An unknown error occurred."};return e instanceof cu&&e.name=="TimeoutError"&&(i.header="Request Timeout",i.message="The request took too long to complete. Please try again later."),e instanceof ot&&(Object.keys(e.error).length?(i.header="API Error - "+e.status,i.message=e.error.Message||e.error.message):(e.status===401&&(i.header="Unauthorized",i.message="We can't log you in because of authentication error"),i.header="API Error - "+e.status,i.message=e.error.message)),this.toastr.error(i.message,i.header),ln(()=>i)}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Af=function(n){let t=[],e=0;for(let i=0;i<n.length;i++){let r=n.charCodeAt(i);r<128?t[e++]=r:r<2048?(t[e++]=r>>6|192,t[e++]=r&63|128):(r&64512)===55296&&i+1<n.length&&(n.charCodeAt(i+1)&64512)===56320?(r=65536+((r&1023)<<10)+(n.charCodeAt(++i)&1023),t[e++]=r>>18|240,t[e++]=r>>12&63|128,t[e++]=r>>6&63|128,t[e++]=r&63|128):(t[e++]=r>>12|224,t[e++]=r>>6&63|128,t[e++]=r&63|128)}return t},py=function(n){let t=[],e=0,i=0;for(;e<n.length;){let r=n[e++];if(r<128)t[i++]=String.fromCharCode(r);else if(r>191&&r<224){let s=n[e++];t[i++]=String.fromCharCode((r&31)<<6|s&63)}else if(r>239&&r<365){let s=n[e++],o=n[e++],c=n[e++],a=((r&7)<<18|(s&63)<<12|(o&63)<<6|c&63)-65536;t[i++]=String.fromCharCode(55296+(a>>10)),t[i++]=String.fromCharCode(56320+(a&1023))}else{let s=n[e++],o=n[e++];t[i++]=String.fromCharCode((r&15)<<12|(s&63)<<6|o&63)}}return t.join("")},Of={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(n,t){if(!Array.isArray(n))throw Error("encodeByteArray takes an array as a parameter");this.init_();let e=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,i=[];for(let r=0;r<n.length;r+=3){let s=n[r],o=r+1<n.length,c=o?n[r+1]:0,a=r+2<n.length,l=a?n[r+2]:0,u=s>>2,d=(s&3)<<4|c>>4,p=(c&15)<<2|l>>6,g=l&63;a||(g=64,o||(p=64)),i.push(e[u],e[d],e[p],e[g])}return i.join("")},encodeString(n,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(n):this.encodeByteArray(Af(n),t)},decodeString(n,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(n):py(this.decodeStringToByteArray(n,t))},decodeStringToByteArray(n,t){this.init_();let e=t?this.charToByteMapWebSafe_:this.charToByteMap_,i=[];for(let r=0;r<n.length;){let s=e[n.charAt(r++)],c=r<n.length?e[n.charAt(r)]:0;++r;let l=r<n.length?e[n.charAt(r)]:64;++r;let d=r<n.length?e[n.charAt(r)]:64;if(++r,s==null||c==null||l==null||d==null)throw new Vc;let p=s<<2|c>>4;if(i.push(p),l!==64){let g=c<<4&240|l>>2;if(i.push(g),d!==64){let b=l<<6&192|d;i.push(b)}}}return i},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let n=0;n<this.ENCODED_VALS.length;n++)this.byteToCharMap_[n]=this.ENCODED_VALS.charAt(n),this.charToByteMap_[this.byteToCharMap_[n]]=n,this.byteToCharMapWebSafe_[n]=this.ENCODED_VALS_WEBSAFE.charAt(n),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[n]]=n,n>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(n)]=n,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(n)]=n)}}},Vc=class extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}},gy=function(n){let t=Af(n);return Of.encodeByteArray(t,!0)},jc=function(n){return gy(n).replace(/\./g,"")},$c=function(n){try{return Of.decodeString(n,!0)}catch(t){console.error("base64Decode failed: ",t)}return null};function my(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}var _y=()=>my().__FIREBASE_DEFAULTS__,vy=()=>{if(typeof process>"u"||typeof process.env>"u")return;let n=process.env.__FIREBASE_DEFAULTS__;if(n)return JSON.parse(n)},yy=()=>{if(typeof document>"u")return;let n;try{n=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}let t=n&&$c(n[1]);return t&&JSON.parse(t)},Hc=()=>{try{return _y()||vy()||yy()}catch(n){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${n}`);return}},Rf=n=>{var t,e;return(e=(t=Hc())===null||t===void 0?void 0:t.emulatorHosts)===null||e===void 0?void 0:e[n]};var Gc=()=>{var n;return(n=Hc())===null||n===void 0?void 0:n.config},zc=n=>{var t;return(t=Hc())===null||t===void 0?void 0:t[`_${n}`]};var Js=class{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}wrapCallback(t){return(e,i)=>{e?this.reject(e):this.resolve(i),typeof t=="function"&&(this.promise.catch(()=>{}),t.length===1?t(e):t(e,i))}}};function me(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function Mf(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(me())}function Pf(){return typeof navigator<"u"&&navigator.userAgent==="Cloudflare-Workers"}function Nf(){let n=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof n=="object"&&n.id!==void 0}function kf(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function xf(){let n=me();return n.indexOf("MSIE ")>=0||n.indexOf("Trident/")>=0}function Ff(){try{return typeof indexedDB=="object"}catch{return!1}}function Lf(){return new Promise((n,t)=>{try{let e=!0,i="validate-browser-context-for-indexeddb-analytics-module",r=self.indexedDB.open(i);r.onsuccess=()=>{r.result.close(),e||self.indexedDB.deleteDatabase(i),n(!0)},r.onupgradeneeded=()=>{e=!1},r.onerror=()=>{var s;t(((s=r.error)===null||s===void 0?void 0:s.message)||"")}}catch(e){t(e)}})}var by="FirebaseError",Ze=class n extends Error{constructor(t,e,i){super(e),this.code=t,this.customData=i,this.name=by,Object.setPrototypeOf(this,n.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,Ot.prototype.create)}},Ot=class{constructor(t,e,i){this.service=t,this.serviceName=e,this.errors=i}create(t,...e){let i=e[0]||{},r=`${this.service}/${t}`,s=this.errors[t],o=s?wy(s,i):"Error",c=`${this.serviceName}: ${o} (${r}).`;return new Ze(r,c,i)}};function wy(n,t){return n.replace(Dy,(e,i)=>{let r=t[i];return r!=null?String(r):`<${i}?>`})}var Dy=/\{\$([^}]+)}/g;function Bf(n){for(let t in n)if(Object.prototype.hasOwnProperty.call(n,t))return!1;return!0}function ui(n,t){if(n===t)return!0;let e=Object.keys(n),i=Object.keys(t);for(let r of e){if(!i.includes(r))return!1;let s=n[r],o=t[r];if(If(s)&&If(o)){if(!ui(s,o))return!1}else if(s!==o)return!1}for(let r of i)if(!e.includes(r))return!1;return!0}function If(n){return n!==null&&typeof n=="object"}function di(n){let t=[];for(let[e,i]of Object.entries(n))Array.isArray(i)?i.forEach(r=>{t.push(encodeURIComponent(e)+"="+encodeURIComponent(r))}):t.push(encodeURIComponent(e)+"="+encodeURIComponent(i));return t.length?"&"+t.join("&"):""}function Vf(n,t){let e=new Uc(n,t);return e.subscribe.bind(e)}var Uc=class{constructor(t,e){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=e,this.task.then(()=>{t(this)}).catch(i=>{this.error(i)})}next(t){this.forEachObserver(e=>{e.next(t)})}error(t){this.forEachObserver(e=>{e.error(t)}),this.close(t)}complete(){this.forEachObserver(t=>{t.complete()}),this.close()}subscribe(t,e,i){let r;if(t===void 0&&e===void 0&&i===void 0)throw new Error("Missing Observer.");Ty(t,["next","error","complete"])?r=t:r={next:t,error:e,complete:i},r.next===void 0&&(r.next=Bc),r.error===void 0&&(r.error=Bc),r.complete===void 0&&(r.complete=Bc);let s=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?r.error(this.finalError):r.complete()}catch{}}),this.observers.push(r),s}unsubscribeOne(t){this.observers===void 0||this.observers[t]===void 0||(delete this.observers[t],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(t){if(!this.finalized)for(let e=0;e<this.observers.length;e++)this.sendOne(e,t)}sendOne(t,e){this.task.then(()=>{if(this.observers!==void 0&&this.observers[t]!==void 0)try{e(this.observers[t])}catch(i){typeof console<"u"&&console.error&&console.error(i)}})}close(t){this.finalized||(this.finalized=!0,t!==void 0&&(this.finalError=t),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}};function Ty(n,t){if(typeof n!="object"||n===null)return!1;for(let e of t)if(e in n&&typeof n[e]=="function")return!0;return!1}function Bc(){}var wO=4*60*60*1e3;function En(n){return n&&n._delegate?n._delegate:n}var ut=class{constructor(t,e,i){this.name=t,this.instanceFactory=e,this.type=i,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(t){return this.instantiationMode=t,this}setMultipleInstances(t){return this.multipleInstances=t,this}setServiceProps(t){return this.serviceProps=t,this}setInstanceCreatedCallback(t){return this.onInstanceCreated=t,this}};var Cn="[DEFAULT]";var Wc=class{constructor(t,e){this.name=t,this.container=e,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(t){let e=this.normalizeInstanceIdentifier(t);if(!this.instancesDeferred.has(e)){let i=new Js;if(this.instancesDeferred.set(e,i),this.isInitialized(e)||this.shouldAutoInitialize())try{let r=this.getOrInitializeService({instanceIdentifier:e});r&&i.resolve(r)}catch{}}return this.instancesDeferred.get(e).promise}getImmediate(t){var e;let i=this.normalizeInstanceIdentifier(t?.identifier),r=(e=t?.optional)!==null&&e!==void 0?e:!1;if(this.isInitialized(i)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:i})}catch(s){if(r)return null;throw s}else{if(r)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(t){if(t.name!==this.name)throw Error(`Mismatching Component ${t.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=t,!!this.shouldAutoInitialize()){if(Cy(t))try{this.getOrInitializeService({instanceIdentifier:Cn})}catch{}for(let[e,i]of this.instancesDeferred.entries()){let r=this.normalizeInstanceIdentifier(e);try{let s=this.getOrInitializeService({instanceIdentifier:r});i.resolve(s)}catch{}}}}clearInstance(t=Cn){this.instancesDeferred.delete(t),this.instancesOptions.delete(t),this.instances.delete(t)}delete(){return h(this,null,function*(){let t=Array.from(this.instances.values());yield Promise.all([...t.filter(e=>"INTERNAL"in e).map(e=>e.INTERNAL.delete()),...t.filter(e=>"_delete"in e).map(e=>e._delete())])})}isComponentSet(){return this.component!=null}isInitialized(t=Cn){return this.instances.has(t)}getOptions(t=Cn){return this.instancesOptions.get(t)||{}}initialize(t={}){let{options:e={}}=t,i=this.normalizeInstanceIdentifier(t.instanceIdentifier);if(this.isInitialized(i))throw Error(`${this.name}(${i}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);let r=this.getOrInitializeService({instanceIdentifier:i,options:e});for(let[s,o]of this.instancesDeferred.entries()){let c=this.normalizeInstanceIdentifier(s);i===c&&o.resolve(r)}return r}onInit(t,e){var i;let r=this.normalizeInstanceIdentifier(e),s=(i=this.onInitCallbacks.get(r))!==null&&i!==void 0?i:new Set;s.add(t),this.onInitCallbacks.set(r,s);let o=this.instances.get(r);return o&&t(o,r),()=>{s.delete(t)}}invokeOnInitCallbacks(t,e){let i=this.onInitCallbacks.get(e);if(i)for(let r of i)try{r(t,e)}catch{}}getOrInitializeService({instanceIdentifier:t,options:e={}}){let i=this.instances.get(t);if(!i&&this.component&&(i=this.component.instanceFactory(this.container,{instanceIdentifier:Ey(t),options:e}),this.instances.set(t,i),this.instancesOptions.set(t,e),this.invokeOnInitCallbacks(i,t),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,t,i)}catch{}return i||null}normalizeInstanceIdentifier(t=Cn){return this.component?this.component.multipleInstances?t:Cn:t}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}};function Ey(n){return n===Cn?void 0:n}function Cy(n){return n.instantiationMode==="EAGER"}var Ks=class{constructor(t){this.name=t,this.providers=new Map}addComponent(t){let e=this.getProvider(t.name);if(e.isComponentSet())throw new Error(`Component ${t.name} has already been registered with ${this.name}`);e.setComponent(t)}addOrOverwriteComponent(t){this.getProvider(t.name).isComponentSet()&&this.providers.delete(t.name),this.addComponent(t)}getProvider(t){if(this.providers.has(t))return this.providers.get(t);let e=new Wc(t,this);return this.providers.set(t,e),e}getProviders(){return Array.from(this.providers.values())}};var Sy=[],j=function(n){return n[n.DEBUG=0]="DEBUG",n[n.VERBOSE=1]="VERBOSE",n[n.INFO=2]="INFO",n[n.WARN=3]="WARN",n[n.ERROR=4]="ERROR",n[n.SILENT=5]="SILENT",n}(j||{}),Iy={debug:j.DEBUG,verbose:j.VERBOSE,info:j.INFO,warn:j.WARN,error:j.ERROR,silent:j.SILENT},Ay=j.INFO,Oy={[j.DEBUG]:"log",[j.VERBOSE]:"log",[j.INFO]:"info",[j.WARN]:"warn",[j.ERROR]:"error"},Ry=(n,t,...e)=>{if(t<n.logLevel)return;let i=new Date().toISOString(),r=Oy[t];if(r)console[r](`[${i}] ${n.name}:`,...e);else throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`)},hi=class{constructor(t){this.name=t,this._logLevel=Ay,this._logHandler=Ry,this._userLogHandler=null,Sy.push(this)}get logLevel(){return this._logLevel}set logLevel(t){if(!(t in j))throw new TypeError(`Invalid value "${t}" assigned to \`logLevel\``);this._logLevel=t}setLogLevel(t){this._logLevel=typeof t=="string"?Iy[t]:t}get logHandler(){return this._logHandler}set logHandler(t){if(typeof t!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=t}get userLogHandler(){return this._userLogHandler}set userLogHandler(t){this._userLogHandler=t}debug(...t){this._userLogHandler&&this._userLogHandler(this,j.DEBUG,...t),this._logHandler(this,j.DEBUG,...t)}log(...t){this._userLogHandler&&this._userLogHandler(this,j.VERBOSE,...t),this._logHandler(this,j.VERBOSE,...t)}info(...t){this._userLogHandler&&this._userLogHandler(this,j.INFO,...t),this._logHandler(this,j.INFO,...t)}warn(...t){this._userLogHandler&&this._userLogHandler(this,j.WARN,...t),this._logHandler(this,j.WARN,...t)}error(...t){this._userLogHandler&&this._userLogHandler(this,j.ERROR,...t),this._logHandler(this,j.ERROR,...t)}};var My=(n,t)=>t.some(e=>n instanceof e),Uf,jf;function Py(){return Uf||(Uf=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Ny(){return jf||(jf=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}var $f=new WeakMap,Jc=new WeakMap,Hf=new WeakMap,qc=new WeakMap,Yc=new WeakMap;function ky(n){let t=new Promise((e,i)=>{let r=()=>{n.removeEventListener("success",s),n.removeEventListener("error",o)},s=()=>{e(dt(n.result)),r()},o=()=>{i(n.error),r()};n.addEventListener("success",s),n.addEventListener("error",o)});return t.then(e=>{e instanceof IDBCursor&&$f.set(e,n)}).catch(()=>{}),Yc.set(t,n),t}function xy(n){if(Jc.has(n))return;let t=new Promise((e,i)=>{let r=()=>{n.removeEventListener("complete",s),n.removeEventListener("error",o),n.removeEventListener("abort",o)},s=()=>{e(),r()},o=()=>{i(n.error||new DOMException("AbortError","AbortError")),r()};n.addEventListener("complete",s),n.addEventListener("error",o),n.addEventListener("abort",o)});Jc.set(n,t)}var Kc={get(n,t,e){if(n instanceof IDBTransaction){if(t==="done")return Jc.get(n);if(t==="objectStoreNames")return n.objectStoreNames||Hf.get(n);if(t==="store")return e.objectStoreNames[1]?void 0:e.objectStore(e.objectStoreNames[0])}return dt(n[t])},set(n,t,e){return n[t]=e,!0},has(n,t){return n instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in n}};function Gf(n){Kc=n(Kc)}function Fy(n){return n===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(t,...e){let i=n.call(Ys(this),t,...e);return Hf.set(i,t.sort?t.sort():[t]),dt(i)}:Ny().includes(n)?function(...t){return n.apply(Ys(this),t),dt($f.get(this))}:function(...t){return dt(n.apply(Ys(this),t))}}function Ly(n){return typeof n=="function"?Fy(n):(n instanceof IDBTransaction&&xy(n),My(n,Py())?new Proxy(n,Kc):n)}function dt(n){if(n instanceof IDBRequest)return ky(n);if(qc.has(n))return qc.get(n);let t=Ly(n);return t!==n&&(qc.set(n,t),Yc.set(t,n)),t}var Ys=n=>Yc.get(n);function Wf(n,t,{blocked:e,upgrade:i,blocking:r,terminated:s}={}){let o=indexedDB.open(n,t),c=dt(o);return i&&o.addEventListener("upgradeneeded",a=>{i(dt(o.result),a.oldVersion,a.newVersion,dt(o.transaction),a)}),e&&o.addEventListener("blocked",a=>e(a.oldVersion,a.newVersion,a)),c.then(a=>{s&&a.addEventListener("close",()=>s()),r&&a.addEventListener("versionchange",l=>r(l.oldVersion,l.newVersion,l))}).catch(()=>{}),c}var By=["get","getKey","getAll","getAllKeys","count"],Vy=["put","add","delete","clear"],Qc=new Map;function zf(n,t){if(!(n instanceof IDBDatabase&&!(t in n)&&typeof t=="string"))return;if(Qc.get(t))return Qc.get(t);let e=t.replace(/FromIndex$/,""),i=t!==e,r=Vy.includes(e);if(!(e in(i?IDBIndex:IDBObjectStore).prototype)||!(r||By.includes(e)))return;let s=function(o,...c){return h(this,null,function*(){let a=this.transaction(o,r?"readwrite":"readonly"),l=a.store;return i&&(l=l.index(c.shift())),(yield Promise.all([l[e](...c),r&&a.done]))[0]})};return Qc.set(t,s),s}Gf(n=>N(m({},n),{get:(t,e,i)=>zf(t,e)||n.get(t,e,i),has:(t,e)=>!!zf(t,e)||n.has(t,e)}));var Xc=class{constructor(t){this.container=t}getPlatformInfoString(){return this.container.getProviders().map(e=>{if(Uy(e)){let i=e.getImmediate();return`${i.library}/${i.version}`}else return null}).filter(e=>e).join(" ")}};function Uy(n){let t=n.getComponent();return t?.type==="VERSION"}var el="@firebase/app",qf="0.10.13";var Rt=new hi("@firebase/app"),jy="@firebase/app-compat",$y="@firebase/analytics-compat",Hy="@firebase/analytics",Gy="@firebase/app-check-compat",zy="@firebase/app-check",Wy="@firebase/auth",qy="@firebase/auth-compat",Jy="@firebase/database",Ky="@firebase/data-connect",Yy="@firebase/database-compat",Qy="@firebase/functions",Zy="@firebase/functions-compat",Xy="@firebase/installations",eb="@firebase/installations-compat",tb="@firebase/messaging",nb="@firebase/messaging-compat",ib="@firebase/performance",rb="@firebase/performance-compat",sb="@firebase/remote-config",ob="@firebase/remote-config-compat",ab="@firebase/storage",cb="@firebase/storage-compat",lb="@firebase/firestore",ub="@firebase/vertexai-preview",db="@firebase/firestore-compat",hb="firebase",fb="10.14.1";var tl="[DEFAULT]",pb={[el]:"fire-core",[jy]:"fire-core-compat",[Hy]:"fire-analytics",[$y]:"fire-analytics-compat",[zy]:"fire-app-check",[Gy]:"fire-app-check-compat",[Wy]:"fire-auth",[qy]:"fire-auth-compat",[Jy]:"fire-rtdb",[Ky]:"fire-data-connect",[Yy]:"fire-rtdb-compat",[Qy]:"fire-fn",[Zy]:"fire-fn-compat",[Xy]:"fire-iid",[eb]:"fire-iid-compat",[tb]:"fire-fcm",[nb]:"fire-fcm-compat",[ib]:"fire-perf",[rb]:"fire-perf-compat",[sb]:"fire-rc",[ob]:"fire-rc-compat",[ab]:"fire-gcs",[cb]:"fire-gcs-compat",[lb]:"fire-fst",[db]:"fire-fst-compat",[ub]:"fire-vertex","fire-js":"fire-js",[hb]:"fire-js-all"};var br=new Map,gb=new Map,nl=new Map;function Jf(n,t){try{n.container.addComponent(t)}catch(e){Rt.debug(`Component ${t.name} failed to register with FirebaseApp ${n.name}`,e)}}function fi(n){let t=n.name;if(nl.has(t))return Rt.debug(`There were multiple attempts to register component ${t}.`),!1;nl.set(t,n);for(let e of br.values())Jf(e,n);for(let e of gb.values())Jf(e,n);return!0}function ol(n,t){let e=n.container.getProvider("heartbeat").getImmediate({optional:!0});return e&&e.triggerHeartbeat(),n.container.getProvider(t)}function ht(n){return n.settings!==void 0}var mb={"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}'","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","server-app-deleted":"Firebase Server App has been deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."},en=new Ot("app","Firebase",mb);var il=class{constructor(t,e,i){this._isDeleted=!1,this._options=Object.assign({},t),this._config=Object.assign({},e),this._name=e.name,this._automaticDataCollectionEnabled=e.automaticDataCollectionEnabled,this._container=i,this.container.addComponent(new ut("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(t){this.checkDestroyed(),this._automaticDataCollectionEnabled=t}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(t){this._isDeleted=t}checkDestroyed(){if(this.isDeleted)throw en.create("app-deleted",{appName:this._name})}};var pi=fb;function al(n,t={}){let e=n;typeof t!="object"&&(t={name:t});let i=Object.assign({name:tl,automaticDataCollectionEnabled:!1},t),r=i.name;if(typeof r!="string"||!r)throw en.create("bad-app-name",{appName:String(r)});if(e||(e=Gc()),!e)throw en.create("no-options");let s=br.get(r);if(s){if(ui(e,s.options)&&ui(i,s.config))return s;throw en.create("duplicate-app",{appName:r})}let o=new Ks(r);for(let a of nl.values())o.addComponent(a);let c=new il(e,i,o);return br.set(r,c),c}function Qs(n=tl){let t=br.get(n);if(!t&&n===tl&&Gc())return al();if(!t)throw en.create("no-app",{appName:n});return t}function Zs(){return Array.from(br.values())}function Ie(n,t,e){var i;let r=(i=pb[n])!==null&&i!==void 0?i:n;e&&(r+=`-${e}`);let s=r.match(/\s|\//),o=t.match(/\s|\//);if(s||o){let c=[`Unable to register library "${r}" with version "${t}":`];s&&c.push(`library name "${r}" contains illegal characters (whitespace or "/")`),s&&o&&c.push("and"),o&&c.push(`version name "${t}" contains illegal characters (whitespace or "/")`),Rt.warn(c.join(" "));return}fi(new ut(`${r}-version`,()=>({library:r,version:t}),"VERSION"))}var _b="firebase-heartbeat-database",vb=1,wr="firebase-heartbeat-store",Zc=null;function Zf(){return Zc||(Zc=Wf(_b,vb,{upgrade:(n,t)=>{switch(t){case 0:try{n.createObjectStore(wr)}catch(e){console.warn(e)}}}}).catch(n=>{throw en.create("idb-open",{originalErrorMessage:n.message})})),Zc}function yb(n){return h(this,null,function*(){try{let e=(yield Zf()).transaction(wr),i=yield e.objectStore(wr).get(Xf(n));return yield e.done,i}catch(t){if(t instanceof Ze)Rt.warn(t.message);else{let e=en.create("idb-get",{originalErrorMessage:t?.message});Rt.warn(e.message)}}})}function Kf(n,t){return h(this,null,function*(){try{let i=(yield Zf()).transaction(wr,"readwrite");yield i.objectStore(wr).put(t,Xf(n)),yield i.done}catch(e){if(e instanceof Ze)Rt.warn(e.message);else{let i=en.create("idb-set",{originalErrorMessage:e?.message});Rt.warn(i.message)}}})}function Xf(n){return`${n.name}!${n.options.appId}`}var bb=1024,wb=30*24*60*60*1e3,rl=class{constructor(t){this.container=t,this._heartbeatsCache=null;let e=this.container.getProvider("app").getImmediate();this._storage=new sl(e),this._heartbeatsCachePromise=this._storage.read().then(i=>(this._heartbeatsCache=i,i))}triggerHeartbeat(){return h(this,null,function*(){var t,e;try{let r=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),s=Yf();return((t=this._heartbeatsCache)===null||t===void 0?void 0:t.heartbeats)==null&&(this._heartbeatsCache=yield this._heartbeatsCachePromise,((e=this._heartbeatsCache)===null||e===void 0?void 0:e.heartbeats)==null)||this._heartbeatsCache.lastSentHeartbeatDate===s||this._heartbeatsCache.heartbeats.some(o=>o.date===s)?void 0:(this._heartbeatsCache.heartbeats.push({date:s,agent:r}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(o=>{let c=new Date(o.date).valueOf();return Date.now()-c<=wb}),this._storage.overwrite(this._heartbeatsCache))}catch(i){Rt.warn(i)}})}getHeartbeatsHeader(){return h(this,null,function*(){var t;try{if(this._heartbeatsCache===null&&(yield this._heartbeatsCachePromise),((t=this._heartbeatsCache)===null||t===void 0?void 0:t.heartbeats)==null||this._heartbeatsCache.heartbeats.length===0)return"";let e=Yf(),{heartbeatsToSend:i,unsentEntries:r}=Db(this._heartbeatsCache.heartbeats),s=jc(JSON.stringify({version:2,heartbeats:i}));return this._heartbeatsCache.lastSentHeartbeatDate=e,r.length>0?(this._heartbeatsCache.heartbeats=r,yield this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),s}catch(e){return Rt.warn(e),""}})}};function Yf(){return new Date().toISOString().substring(0,10)}function Db(n,t=bb){let e=[],i=n.slice();for(let r of n){let s=e.find(o=>o.agent===r.agent);if(s){if(s.dates.push(r.date),Qf(e)>t){s.dates.pop();break}}else if(e.push({agent:r.agent,dates:[r.date]}),Qf(e)>t){e.pop();break}i=i.slice(1)}return{heartbeatsToSend:e,unsentEntries:i}}var sl=class{constructor(t){this.app=t,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}runIndexedDBEnvironmentCheck(){return h(this,null,function*(){return Ff()?Lf().then(()=>!0).catch(()=>!1):!1})}read(){return h(this,null,function*(){if(yield this._canUseIndexedDBPromise){let e=yield yb(this.app);return e?.heartbeats?e:{heartbeats:[]}}else return{heartbeats:[]}})}overwrite(t){return h(this,null,function*(){var e;if(yield this._canUseIndexedDBPromise){let r=yield this.read();return Kf(this.app,{lastSentHeartbeatDate:(e=t.lastSentHeartbeatDate)!==null&&e!==void 0?e:r.lastSentHeartbeatDate,heartbeats:t.heartbeats})}else return})}add(t){return h(this,null,function*(){var e;if(yield this._canUseIndexedDBPromise){let r=yield this.read();return Kf(this.app,{lastSentHeartbeatDate:(e=t.lastSentHeartbeatDate)!==null&&e!==void 0?e:r.lastSentHeartbeatDate,heartbeats:[...r.heartbeats,...t.heartbeats]})}else return})}};function Qf(n){return jc(JSON.stringify({version:2,heartbeats:n})).length}function Tb(n){fi(new ut("platform-logger",t=>new Xc(t),"PRIVATE")),fi(new ut("heartbeat",t=>new rl(t),"PRIVATE")),Ie(el,qf,n),Ie(el,qf,"esm2017"),Ie("fire-js","")}Tb("");var Eb="firebase",Cb="10.14.1";Ie(Eb,Cb,"app");var Dr=new Oi("ANGULARFIRE2_VERSION");function ep(n,t,e){if(t){if(t.length===1)return t[0];let s=t.filter(o=>o.app===e);if(s.length===1)return s[0]}return e.container.getProvider(n).getImmediate({optional:!0})}var ll=(n,t)=>{let e=t?[t]:Zs(),i=[];return e.forEach(r=>{r.container.getProvider(n).instances.forEach(o=>{i.includes(o)||i.push(o)})}),i},Xs=class{constructor(){return ll(Sb)}},Sb="app-check";function gi(){}var eo=class{zone;delegate;constructor(t,e=su){this.zone=t,this.delegate=e}now(){return this.delegate.now()}schedule(t,e,i){let r=this.zone,s=function(o){r.runGuarded(()=>{t.apply(this,[o])})};return this.delegate.schedule(s,e,i)}},cl=class{zone;task=null;constructor(t){this.zone=t}call(t,e){let i=this.unscheduleTask.bind(this);return this.task=this.zone.run(()=>Zone.current.scheduleMacroTask("firebaseZoneBlock",gi,{},gi,gi)),e.pipe(V({next:i,complete:i,error:i})).subscribe(t).add(i)}unscheduleTask(){setTimeout(()=>{this.task!=null&&this.task.state==="scheduled"&&(this.task.invoke(),this.task=null)},10)}},to=(()=>{class n{ngZone;outsideAngular;insideAngular;constructor(e){this.ngZone=e,this.outsideAngular=e.runOutsideAngular(()=>new eo(Zone.current)),this.insideAngular=e.run(()=>new eo(Zone.current,ru)),globalThis.\u0275AngularFireScheduler||=this}static \u0275fac=function(i){return new(i||n)(C(H))};static \u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function no(){let n=globalThis.\u0275AngularFireScheduler;if(!n)throw new Error(`Either AngularFireModule has not been provided in your AppModule (this can be done manually or implictly using
|
|
5
|
+
provideFirebaseApp) or you're calling an AngularFire method outside of an NgModule (which is not supported).`);return n}function Ib(n){return no().ngZone.runOutsideAngular(()=>n())}function Sn(n){return no().ngZone.run(()=>n())}function Ab(n){return Ob(no())(n)}function Ob(n){return function(e){return e=e.lift(new cl(n.ngZone)),e.pipe(Ro(n.outsideAngular),Oo(n.insideAngular))}}var Rb=(n,t)=>function(){let i=arguments;return t&&setTimeout(()=>{t.state==="scheduled"&&t.invoke()},10),Sn(()=>n.apply(void 0,i))},mi=(n,t)=>function(){let e,i=arguments;for(let s=0;s<arguments.length;s++)typeof i[s]=="function"&&(t&&(e||=Sn(()=>Zone.current.scheduleMacroTask("firebaseZoneBlock",gi,{},gi,gi))),i[s]=Rb(i[s],e));let r=Ib(()=>n.apply(this,i));if(!t)if(r instanceof Ne){let s=no();return r.pipe(Ro(s.outsideAngular),Oo(s.insideAngular))}else return Sn(()=>r);return r instanceof Ne?r.pipe(Ab):r instanceof Promise?Sn(()=>new Promise((s,o)=>r.then(c=>Sn(()=>s(c)),c=>Sn(()=>o(c))))):typeof r=="function"&&e?function(){return setTimeout(()=>{e&&e.state==="scheduled"&&e.invoke()},10),r.apply(this,arguments)}:Sn(()=>r)};var In=class{constructor(t){return t}},Tr=class{constructor(){return Zs()}};function Mb(n){return n&&n.length===1?n[0]:new In(Qs())}var ul=new O("angularfire2._apps"),Pb={provide:In,useFactory:Mb,deps:[[new tt,ul]]},Nb={provide:Tr,deps:[[new tt,ul]]};function kb(n){return(t,e)=>{let i=e.get(rt);Ie("angularfire",Dr.full,"core"),Ie("angularfire",Dr.full,"app"),Ie("angular",zu.full,i.toString());let r=t.runOutsideAngular(()=>n(e));return new In(r)}}function aR(n,...t){return Ge([Pb,Nb,{provide:ul,useFactory:kb(n),multi:!0,deps:[H,X,to,...t]}])}var cR=mi(al,!0);function gp(){return{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}}var mp=gp,_p=new Ot("auth","Firebase",gp());var co=new hi("@firebase/auth");function xb(n,...t){co.logLevel<=j.WARN&&co.warn(`Auth (${pi}): ${n}`,...t)}function ro(n,...t){co.logLevel<=j.ERROR&&co.error(`Auth (${pi}): ${n}`,...t)}function pt(n,...t){throw Al(n,...t)}function Xe(n,...t){return Al(n,...t)}function Il(n,t,e){let i=Object.assign(Object.assign({},mp()),{[t]:e});return new Ot("auth","Firebase",i).create(t,{appName:n.name})}function An(n){return Il(n,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function Fb(n,t,e){let i=e;if(!(t instanceof i))throw i.name!==t.constructor.name&&pt(n,"argument-error"),Il(n,"argument-error",`Type of ${t.constructor.name} does not match expected instance.Did you pass a reference from a different Auth SDK?`)}function Al(n,...t){if(typeof n!="string"){let e=t[0],i=[...t.slice(1)];return i[0]&&(i[0].appName=n.name),n._errorFactory.create(e,...i)}return _p.create(n,...t)}function T(n,t,...e){if(!n)throw Al(t,...e)}function Mt(n){let t="INTERNAL ASSERTION FAILED: "+n;throw ro(t),new Error(t)}function Nt(n,t){n||Mt(t)}function fl(){var n;return typeof self<"u"&&((n=self.location)===null||n===void 0?void 0:n.href)||""}function Lb(){return tp()==="http:"||tp()==="https:"}function tp(){var n;return typeof self<"u"&&((n=self.location)===null||n===void 0?void 0:n.protocol)||null}function Bb(){return typeof navigator<"u"&&navigator&&"onLine"in navigator&&typeof navigator.onLine=="boolean"&&(Lb()||Nf()||"connection"in navigator)?navigator.onLine:!0}function Vb(){if(typeof navigator>"u")return null;let n=navigator;return n.languages&&n.languages[0]||n.language||null}var On=class{constructor(t,e){this.shortDelay=t,this.longDelay=e,Nt(e>t,"Short delay should be less than long delay!"),this.isMobile=Mf()||kf()}get(){return Bb()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}};function Ol(n,t){Nt(n.emulator,"Emulator should always be set here");let{url:e}=n.emulator;return t?`${e}${t.startsWith("/")?t.slice(1):t}`:e}var lo=class{static initialize(t,e,i){this.fetchImpl=t,e&&(this.headersImpl=e),i&&(this.responseImpl=i)}static fetch(){if(this.fetchImpl)return this.fetchImpl;if(typeof self<"u"&&"fetch"in self)return self.fetch;if(typeof globalThis<"u"&&globalThis.fetch)return globalThis.fetch;if(typeof fetch<"u")return fetch;Mt("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){if(this.headersImpl)return this.headersImpl;if(typeof self<"u"&&"Headers"in self)return self.Headers;if(typeof globalThis<"u"&&globalThis.Headers)return globalThis.Headers;if(typeof Headers<"u")return Headers;Mt("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){if(this.responseImpl)return this.responseImpl;if(typeof self<"u"&&"Response"in self)return self.Response;if(typeof globalThis<"u"&&globalThis.Response)return globalThis.Response;if(typeof Response<"u")return Response;Mt("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}};var Ub={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"missing-password",INVALID_LOGIN_CREDENTIALS:"invalid-credential",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",PASSWORD_DOES_NOT_MEET_REQUIREMENTS:"password-does-not-meet-requirements",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error",RECAPTCHA_NOT_ENABLED:"recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"missing-recaptcha-token",INVALID_RECAPTCHA_TOKEN:"invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"invalid-recaptcha-action",MISSING_CLIENT_TYPE:"missing-client-type",MISSING_RECAPTCHA_VERSION:"missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"invalid-recaptcha-version",INVALID_REQ_TYPE:"invalid-req-type"};var jb=new On(3e4,6e4);function Rl(n,t){return n.tenantId&&!t.tenantId?Object.assign(Object.assign({},t),{tenantId:n.tenantId}):t}function yi(s,o,c,a){return h(this,arguments,function*(n,t,e,i,r={}){return vp(n,r,()=>h(this,null,function*(){let l={},u={};i&&(t==="GET"?u=i:l={body:JSON.stringify(i)});let d=di(Object.assign({key:n.config.apiKey},u)).slice(1),p=yield n._getAdditionalHeaders();p["Content-Type"]="application/json",n.languageCode&&(p["X-Firebase-Locale"]=n.languageCode);let g=Object.assign({method:t,headers:p},l);return Pf()||(g.referrerPolicy="no-referrer"),lo.fetch()(yp(n,n.config.apiHost,e,d),g)}))})}function vp(n,t,e){return h(this,null,function*(){n._canInitEmulator=!1;let i=Object.assign(Object.assign({},Ub),t);try{let r=new pl(n),s=yield Promise.race([e(),r.promise]);r.clearNetworkTimeout();let o=yield s.json();if("needConfirmation"in o)throw io(n,"account-exists-with-different-credential",o);if(s.ok&&!("errorMessage"in o))return o;{let c=s.ok?o.errorMessage:o.error.message,[a,l]=c.split(" : ");if(a==="FEDERATED_USER_ID_ALREADY_LINKED")throw io(n,"credential-already-in-use",o);if(a==="EMAIL_EXISTS")throw io(n,"email-already-in-use",o);if(a==="USER_DISABLED")throw io(n,"user-disabled",o);let u=i[a]||a.toLowerCase().replace(/[_\s]+/g,"-");if(l)throw Il(n,u,l);pt(n,u)}}catch(r){if(r instanceof Ze)throw r;pt(n,"network-request-failed",{message:String(r)})}})}function $b(s,o,c,a){return h(this,arguments,function*(n,t,e,i,r={}){let l=yield yi(n,t,e,i,r);return"mfaPendingCredential"in l&&pt(n,"multi-factor-auth-required",{_serverResponse:l}),l})}function yp(n,t,e,i){let r=`${t}${e}?${i}`;return n.config.emulator?Ol(n.config,r):`${n.config.apiScheme}://${r}`}var pl=class{constructor(t){this.auth=t,this.timer=null,this.promise=new Promise((e,i)=>{this.timer=setTimeout(()=>i(Xe(this.auth,"network-request-failed")),jb.get())})}clearNetworkTimeout(){clearTimeout(this.timer)}};function io(n,t,e){let i={appName:n.name};e.email&&(i.email=e.email),e.phoneNumber&&(i.phoneNumber=e.phoneNumber);let r=Xe(n,t,i);return r.customData._tokenResponse=e,r}function Hb(n,t){return h(this,null,function*(){return yi(n,"POST","/v1/accounts:delete",t)})}function bp(n,t){return h(this,null,function*(){return yi(n,"POST","/v1/accounts:lookup",t)})}function Er(n){if(n)try{let t=new Date(Number(n));if(!isNaN(t.getTime()))return t.toUTCString()}catch{}}function Ml(n,t=!1){return h(this,null,function*(){let e=En(n),i=yield e.getIdToken(t),r=Pl(i);T(r&&r.exp&&r.auth_time&&r.iat,e.auth,"internal-error");let s=typeof r.firebase=="object"?r.firebase:void 0,o=s?.sign_in_provider;return{claims:r,token:i,authTime:Er(dl(r.auth_time)),issuedAtTime:Er(dl(r.iat)),expirationTime:Er(dl(r.exp)),signInProvider:o||null,signInSecondFactor:s?.sign_in_second_factor||null}})}function dl(n){return Number(n)*1e3}function Pl(n){let[t,e,i]=n.split(".");if(t===void 0||e===void 0||i===void 0)return ro("JWT malformed, contained fewer than 3 sections"),null;try{let r=$c(e);return r?JSON.parse(r):(ro("Failed to decode base64 JWT payload"),null)}catch(r){return ro("Caught error parsing JWT payload as JSON",r?.toString()),null}}function np(n){let t=Pl(n);return T(t,"internal-error"),T(typeof t.exp<"u","internal-error"),T(typeof t.iat<"u","internal-error"),Number(t.exp)-Number(t.iat)}function Sr(n,t,e=!1){return h(this,null,function*(){if(e)return t;try{return yield t}catch(i){throw i instanceof Ze&&Gb(i)&&n.auth.currentUser===n&&(yield n.auth.signOut()),i}})}function Gb({code:n}){return n==="auth/user-disabled"||n==="auth/user-token-expired"}var gl=class{constructor(t){this.user=t,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,this.timerId!==null&&clearTimeout(this.timerId))}getInterval(t){var e;if(t){let i=this.errorBackoff;return this.errorBackoff=Math.min(this.errorBackoff*2,96e4),i}else{this.errorBackoff=3e4;let r=((e=this.user.stsTokenManager.expirationTime)!==null&&e!==void 0?e:0)-Date.now()-3e5;return Math.max(0,r)}}schedule(t=!1){if(!this.isRunning)return;let e=this.getInterval(t);this.timerId=setTimeout(()=>h(this,null,function*(){yield this.iteration()}),e)}iteration(){return h(this,null,function*(){try{yield this.user.getIdToken(!0)}catch(t){t?.code==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()})}};var Ir=class{constructor(t,e){this.createdAt=t,this.lastLoginAt=e,this._initializeTime()}_initializeTime(){this.lastSignInTime=Er(this.lastLoginAt),this.creationTime=Er(this.createdAt)}_copy(t){this.createdAt=t.createdAt,this.lastLoginAt=t.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}};function uo(n){return h(this,null,function*(){var t;let e=n.auth,i=yield n.getIdToken(),r=yield Sr(n,bp(e,{idToken:i}));T(r?.users.length,e,"internal-error");let s=r.users[0];n._notifyReloadListener(s);let o=!((t=s.providerUserInfo)===null||t===void 0)&&t.length?wp(s.providerUserInfo):[],c=zb(n.providerData,o),a=n.isAnonymous,l=!(n.email&&s.passwordHash)&&!c?.length,u=a?l:!1,d={uid:s.localId,displayName:s.displayName||null,photoURL:s.photoUrl||null,email:s.email||null,emailVerified:s.emailVerified||!1,phoneNumber:s.phoneNumber||null,tenantId:s.tenantId||null,providerData:c,metadata:new Ir(s.createdAt,s.lastLoginAt),isAnonymous:u};Object.assign(n,d)})}function Nl(n){return h(this,null,function*(){let t=En(n);yield uo(t),yield t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)})}function zb(n,t){return[...n.filter(i=>!t.some(r=>r.providerId===i.providerId)),...t]}function wp(n){return n.map(t=>{var{providerId:e}=t,i=Vr(t,["providerId"]);return{providerId:e,uid:i.rawId||"",displayName:i.displayName||null,email:i.email||null,phoneNumber:i.phoneNumber||null,photoURL:i.photoUrl||null}})}function Wb(n,t){return h(this,null,function*(){let e=yield vp(n,{},()=>h(this,null,function*(){let i=di({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:r,apiKey:s}=n.config,o=yp(n,r,"/v1/token",`key=${s}`),c=yield n._getAdditionalHeaders();return c["Content-Type"]="application/x-www-form-urlencoded",lo.fetch()(o,{method:"POST",headers:c,body:i})}));return{accessToken:e.access_token,expiresIn:e.expires_in,refreshToken:e.refresh_token}})}function qb(n,t){return h(this,null,function*(){return yi(n,"POST","/v2/accounts:revokeToken",Rl(n,t))})}var Cr=class n{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(t){T(t.idToken,"internal-error"),T(typeof t.idToken<"u","internal-error"),T(typeof t.refreshToken<"u","internal-error");let e="expiresIn"in t&&typeof t.expiresIn<"u"?Number(t.expiresIn):np(t.idToken);this.updateTokensAndExpiration(t.idToken,t.refreshToken,e)}updateFromIdToken(t){T(t.length!==0,"internal-error");let e=np(t);this.updateTokensAndExpiration(t,null,e)}getToken(t,e=!1){return h(this,null,function*(){return!e&&this.accessToken&&!this.isExpired?this.accessToken:(T(this.refreshToken,t,"user-token-expired"),this.refreshToken?(yield this.refresh(t,this.refreshToken),this.accessToken):null)})}clearRefreshToken(){this.refreshToken=null}refresh(t,e){return h(this,null,function*(){let{accessToken:i,refreshToken:r,expiresIn:s}=yield Wb(t,e);this.updateTokensAndExpiration(i,r,Number(s))})}updateTokensAndExpiration(t,e,i){this.refreshToken=e||null,this.accessToken=t||null,this.expirationTime=Date.now()+i*1e3}static fromJSON(t,e){let{refreshToken:i,accessToken:r,expirationTime:s}=e,o=new n;return i&&(T(typeof i=="string","internal-error",{appName:t}),o.refreshToken=i),r&&(T(typeof r=="string","internal-error",{appName:t}),o.accessToken=r),s&&(T(typeof s=="number","internal-error",{appName:t}),o.expirationTime=s),o}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(t){this.accessToken=t.accessToken,this.refreshToken=t.refreshToken,this.expirationTime=t.expirationTime}_clone(){return Object.assign(new n,this.toJSON())}_performRefresh(){return Mt("not implemented")}};function tn(n,t){T(typeof n=="string"||typeof n>"u","internal-error",{appName:t})}var vi=class n{constructor(t){var{uid:e,auth:i,stsTokenManager:r}=t,s=Vr(t,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new gl(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=e,this.auth=i,this.stsTokenManager=r,this.accessToken=r.accessToken,this.displayName=s.displayName||null,this.email=s.email||null,this.emailVerified=s.emailVerified||!1,this.phoneNumber=s.phoneNumber||null,this.photoURL=s.photoURL||null,this.isAnonymous=s.isAnonymous||!1,this.tenantId=s.tenantId||null,this.providerData=s.providerData?[...s.providerData]:[],this.metadata=new Ir(s.createdAt||void 0,s.lastLoginAt||void 0)}getIdToken(t){return h(this,null,function*(){let e=yield Sr(this,this.stsTokenManager.getToken(this.auth,t));return T(e,this.auth,"internal-error"),this.accessToken!==e&&(this.accessToken=e,yield this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),e})}getIdTokenResult(t){return Ml(this,t)}reload(){return Nl(this)}_assign(t){this!==t&&(T(this.uid===t.uid,this.auth,"internal-error"),this.displayName=t.displayName,this.photoURL=t.photoURL,this.email=t.email,this.emailVerified=t.emailVerified,this.phoneNumber=t.phoneNumber,this.isAnonymous=t.isAnonymous,this.tenantId=t.tenantId,this.providerData=t.providerData.map(e=>Object.assign({},e)),this.metadata._copy(t.metadata),this.stsTokenManager._assign(t.stsTokenManager))}_clone(t){let e=new n(Object.assign(Object.assign({},this),{auth:t,stsTokenManager:this.stsTokenManager._clone()}));return e.metadata._copy(this.metadata),e}_onReload(t){T(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=t,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(t){this.reloadListener?this.reloadListener(t):this.reloadUserInfo=t}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}_updateTokensIfNecessary(t,e=!1){return h(this,null,function*(){let i=!1;t.idToken&&t.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(t),i=!0),e&&(yield uo(this)),yield this.auth._persistUserIfCurrent(this),i&&this.auth._notifyListenersIfCurrent(this)})}delete(){return h(this,null,function*(){if(ht(this.auth.app))return Promise.reject(An(this.auth));let t=yield this.getIdToken();return yield Sr(this,Hb(this.auth,{idToken:t})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()})}toJSON(){return Object.assign(Object.assign({uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(t=>Object.assign({},t)),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(t,e){var i,r,s,o,c,a,l,u;let d=(i=e.displayName)!==null&&i!==void 0?i:void 0,p=(r=e.email)!==null&&r!==void 0?r:void 0,g=(s=e.phoneNumber)!==null&&s!==void 0?s:void 0,b=(o=e.photoURL)!==null&&o!==void 0?o:void 0,v=(c=e.tenantId)!==null&&c!==void 0?c:void 0,_=(a=e._redirectEventId)!==null&&a!==void 0?a:void 0,S=(l=e.createdAt)!==null&&l!==void 0?l:void 0,k=(u=e.lastLoginAt)!==null&&u!==void 0?u:void 0,{uid:D,emailVerified:E,isAnonymous:M,providerData:P,stsTokenManager:B}=e;T(D&&B,t,"internal-error");let Z=Cr.fromJSON(this.name,B);T(typeof D=="string",t,"internal-error"),tn(d,t.name),tn(p,t.name),T(typeof E=="boolean",t,"internal-error"),T(typeof M=="boolean",t,"internal-error"),tn(g,t.name),tn(b,t.name),tn(v,t.name),tn(_,t.name),tn(S,t.name),tn(k,t.name);let W=new n({uid:D,auth:t,email:p,emailVerified:E,displayName:d,isAnonymous:M,photoURL:b,phoneNumber:g,tenantId:v,stsTokenManager:Z,createdAt:S,lastLoginAt:k});return P&&Array.isArray(P)&&(W.providerData=P.map(J=>Object.assign({},J))),_&&(W._redirectEventId=_),W}static _fromIdTokenResponse(t,e,i=!1){return h(this,null,function*(){let r=new Cr;r.updateFromServerResponse(e);let s=new n({uid:e.localId,auth:t,stsTokenManager:r,isAnonymous:i});return yield uo(s),s})}static _fromGetAccountInfoResponse(t,e,i){return h(this,null,function*(){let r=e.users[0];T(r.localId!==void 0,"internal-error");let s=r.providerUserInfo!==void 0?wp(r.providerUserInfo):[],o=!(r.email&&r.passwordHash)&&!s?.length,c=new Cr;c.updateFromIdToken(i);let a=new n({uid:r.localId,auth:t,stsTokenManager:c,isAnonymous:o}),l={uid:r.localId,displayName:r.displayName||null,photoURL:r.photoUrl||null,email:r.email||null,emailVerified:r.emailVerified||!1,phoneNumber:r.phoneNumber||null,tenantId:r.tenantId||null,providerData:s,metadata:new Ir(r.createdAt,r.lastLoginAt),isAnonymous:!(r.email&&r.passwordHash)&&!s?.length};return Object.assign(a,l),a})}};var ip=new Map;function Pt(n){Nt(n instanceof Function,"Expected a class definition");let t=ip.get(n);return t?(Nt(t instanceof n,"Instance stored in cache mismatched with class"),t):(t=new n,ip.set(n,t),t)}var Jb=(()=>{class n{constructor(){this.type="NONE",this.storage={}}_isAvailable(){return h(this,null,function*(){return!0})}_set(e,i){return h(this,null,function*(){this.storage[e]=i})}_get(e){return h(this,null,function*(){let i=this.storage[e];return i===void 0?null:i})}_remove(e){return h(this,null,function*(){delete this.storage[e]})}_addListener(e,i){}_removeListener(e,i){}}return n.type="NONE",n})(),ml=Jb;function so(n,t,e){return`firebase:${n}:${t}:${e}`}var ho=class n{constructor(t,e,i){this.persistence=t,this.auth=e,this.userKey=i;let{config:r,name:s}=this.auth;this.fullUserKey=so(this.userKey,r.apiKey,s),this.fullPersistenceKey=so("persistence",r.apiKey,s),this.boundEventHandler=e._onStorageEvent.bind(e),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(t){return this.persistence._set(this.fullUserKey,t.toJSON())}getCurrentUser(){return h(this,null,function*(){let t=yield this.persistence._get(this.fullUserKey);return t?vi._fromJSON(this.auth,t):null})}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}setPersistence(t){return h(this,null,function*(){if(this.persistence===t)return;let e=yield this.getCurrentUser();if(yield this.removeCurrentUser(),this.persistence=t,e)return this.setCurrentUser(e)})}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static create(t,e,i="authUser"){return h(this,null,function*(){if(!e.length)return new n(Pt(ml),t,i);let r=(yield Promise.all(e.map(l=>h(this,null,function*(){if(yield l._isAvailable())return l})))).filter(l=>l),s=r[0]||Pt(ml),o=so(i,t.config.apiKey,t.name),c=null;for(let l of e)try{let u=yield l._get(o);if(u){let d=vi._fromJSON(t,u);l!==s&&(c=d),s=l;break}}catch{}let a=r.filter(l=>l._shouldAllowMigration);return!s._shouldAllowMigration||!a.length?new n(s,t,i):(s=a[0],c&&(yield s._set(o,c.toJSON())),yield Promise.all(e.map(l=>h(this,null,function*(){if(l!==s)try{yield l._remove(o)}catch{}}))),new n(s,t,i))})}};function rp(n){let t=n.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(Cp(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";if(t.includes("edge/"))return"Edge";if(Dp(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(Ip(t))return"Blackberry";if(Ap(t))return"Webos";if(Tp(t))return"Safari";if((t.includes("chrome/")||Ep(t))&&!t.includes("edge/"))return"Chrome";if(Sp(t))return"Android";{let e=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,i=n.match(e);if(i?.length===2)return i[1]}return"Other"}function Dp(n=me()){return/firefox\//i.test(n)}function Tp(n=me()){let t=n.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function Ep(n=me()){return/crios\//i.test(n)}function Cp(n=me()){return/iemobile/i.test(n)}function Sp(n=me()){return/android/i.test(n)}function Ip(n=me()){return/blackberry/i.test(n)}function Ap(n=me()){return/webos/i.test(n)}function kl(n=me()){return/iphone|ipad|ipod/i.test(n)||/macintosh/i.test(n)&&/mobile/i.test(n)}function Kb(n=me()){var t;return kl(n)&&!!(!((t=window.navigator)===null||t===void 0)&&t.standalone)}function Yb(){return xf()&&document.documentMode===10}function Op(n=me()){return kl(n)||Sp(n)||Ap(n)||Ip(n)||/windows phone/i.test(n)||Cp(n)}function Rp(n,t=[]){let e;switch(n){case"Browser":e=rp(me());break;case"Worker":e=`${rp(me())}-${n}`;break;default:e=n}let i=t.length?t.join(","):"FirebaseCore-web";return`${e}/JsCore/${pi}/${i}`}var _l=class{constructor(t){this.auth=t,this.queue=[]}pushCallback(t,e){let i=s=>new Promise((o,c)=>{try{let a=t(s);o(a)}catch(a){c(a)}});i.onAbort=e,this.queue.push(i);let r=this.queue.length-1;return()=>{this.queue[r]=()=>Promise.resolve()}}runMiddleware(t){return h(this,null,function*(){if(this.auth.currentUser===t)return;let e=[];try{for(let i of this.queue)yield i(t),i.onAbort&&e.push(i.onAbort)}catch(i){e.reverse();for(let r of e)try{r()}catch{}throw this.auth._errorFactory.create("login-blocked",{originalMessage:i?.message})}})}};function Qb(e){return h(this,arguments,function*(n,t={}){return yi(n,"GET","/v2/passwordPolicy",Rl(n,t))})}var Zb=6,vl=class{constructor(t){var e,i,r,s;let o=t.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=(e=o.minPasswordLength)!==null&&e!==void 0?e:Zb,o.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=o.maxPasswordLength),o.containsLowercaseCharacter!==void 0&&(this.customStrengthOptions.containsLowercaseLetter=o.containsLowercaseCharacter),o.containsUppercaseCharacter!==void 0&&(this.customStrengthOptions.containsUppercaseLetter=o.containsUppercaseCharacter),o.containsNumericCharacter!==void 0&&(this.customStrengthOptions.containsNumericCharacter=o.containsNumericCharacter),o.containsNonAlphanumericCharacter!==void 0&&(this.customStrengthOptions.containsNonAlphanumericCharacter=o.containsNonAlphanumericCharacter),this.enforcementState=t.enforcementState,this.enforcementState==="ENFORCEMENT_STATE_UNSPECIFIED"&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=(r=(i=t.allowedNonAlphanumericCharacters)===null||i===void 0?void 0:i.join(""))!==null&&r!==void 0?r:"",this.forceUpgradeOnSignin=(s=t.forceUpgradeOnSignin)!==null&&s!==void 0?s:!1,this.schemaVersion=t.schemaVersion}validatePassword(t){var e,i,r,s,o,c;let a={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(t,a),this.validatePasswordCharacterOptions(t,a),a.isValid&&(a.isValid=(e=a.meetsMinPasswordLength)!==null&&e!==void 0?e:!0),a.isValid&&(a.isValid=(i=a.meetsMaxPasswordLength)!==null&&i!==void 0?i:!0),a.isValid&&(a.isValid=(r=a.containsLowercaseLetter)!==null&&r!==void 0?r:!0),a.isValid&&(a.isValid=(s=a.containsUppercaseLetter)!==null&&s!==void 0?s:!0),a.isValid&&(a.isValid=(o=a.containsNumericCharacter)!==null&&o!==void 0?o:!0),a.isValid&&(a.isValid=(c=a.containsNonAlphanumericCharacter)!==null&&c!==void 0?c:!0),a}validatePasswordLengthOptions(t,e){let i=this.customStrengthOptions.minPasswordLength,r=this.customStrengthOptions.maxPasswordLength;i&&(e.meetsMinPasswordLength=t.length>=i),r&&(e.meetsMaxPasswordLength=t.length<=r)}validatePasswordCharacterOptions(t,e){this.updatePasswordCharacterOptionsStatuses(e,!1,!1,!1,!1);let i;for(let r=0;r<t.length;r++)i=t.charAt(r),this.updatePasswordCharacterOptionsStatuses(e,i>="a"&&i<="z",i>="A"&&i<="Z",i>="0"&&i<="9",this.allowedNonAlphanumericCharacters.includes(i))}updatePasswordCharacterOptionsStatuses(t,e,i,r,s){this.customStrengthOptions.containsLowercaseLetter&&(t.containsLowercaseLetter||(t.containsLowercaseLetter=e)),this.customStrengthOptions.containsUppercaseLetter&&(t.containsUppercaseLetter||(t.containsUppercaseLetter=i)),this.customStrengthOptions.containsNumericCharacter&&(t.containsNumericCharacter||(t.containsNumericCharacter=r)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(t.containsNonAlphanumericCharacter||(t.containsNonAlphanumericCharacter=s))}};var yl=class{constructor(t,e,i,r){this.app=t,this.heartbeatServiceProvider=e,this.appCheckServiceProvider=i,this.config=r,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new fo(this),this.idTokenSubscription=new fo(this),this.beforeStateQueue=new _l(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION=1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=_p,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=t.name,this.clientVersion=r.sdkClientVersion}_initializeWithPersistence(t,e){return e&&(this._popupRedirectResolver=Pt(e)),this._initializationPromise=this.queue(()=>h(this,null,function*(){var i,r;if(!this._deleted&&(this.persistenceManager=yield ho.create(this,t),!this._deleted)){if(!((i=this._popupRedirectResolver)===null||i===void 0)&&i._shouldInitProactively)try{yield this._popupRedirectResolver._initialize(this)}catch{}yield this.initializeCurrentUser(e),this.lastNotifiedUid=((r=this.currentUser)===null||r===void 0?void 0:r.uid)||null,!this._deleted&&(this._isInitialized=!0)}})),this._initializationPromise}_onStorageEvent(){return h(this,null,function*(){if(this._deleted)return;let t=yield this.assertedPersistence.getCurrentUser();if(!(!this.currentUser&&!t)){if(this.currentUser&&t&&this.currentUser.uid===t.uid){this._currentUser._assign(t),yield this.currentUser.getIdToken();return}yield this._updateCurrentUser(t,!0)}})}initializeCurrentUserFromIdToken(t){return h(this,null,function*(){try{let e=yield bp(this,{idToken:t}),i=yield vi._fromGetAccountInfoResponse(this,e,t);yield this.directlySetCurrentUser(i)}catch(e){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",e),yield this.directlySetCurrentUser(null)}})}initializeCurrentUser(t){return h(this,null,function*(){var e;if(ht(this.app)){let o=this.app.settings.authIdToken;return o?new Promise(c=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(o).then(c,c))}):this.directlySetCurrentUser(null)}let i=yield this.assertedPersistence.getCurrentUser(),r=i,s=!1;if(t&&this.config.authDomain){yield this.getOrInitRedirectPersistenceManager();let o=(e=this.redirectUser)===null||e===void 0?void 0:e._redirectEventId,c=r?._redirectEventId,a=yield this.tryRedirectSignIn(t);(!o||o===c)&&a?.user&&(r=a.user,s=!0)}if(!r)return this.directlySetCurrentUser(null);if(!r._redirectEventId){if(s)try{yield this.beforeStateQueue.runMiddleware(r)}catch(o){r=i,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(o))}return r?this.reloadAndSetCurrentUserOrClear(r):this.directlySetCurrentUser(null)}return T(this._popupRedirectResolver,this,"argument-error"),yield this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===r._redirectEventId?this.directlySetCurrentUser(r):this.reloadAndSetCurrentUserOrClear(r)})}tryRedirectSignIn(t){return h(this,null,function*(){let e=null;try{e=yield this._popupRedirectResolver._completeRedirectFn(this,t,!0)}catch{yield this._setRedirectUser(null)}return e})}reloadAndSetCurrentUserOrClear(t){return h(this,null,function*(){try{yield uo(t)}catch(e){if(e?.code!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(t)})}useDeviceLanguage(){this.languageCode=Vb()}_delete(){return h(this,null,function*(){this._deleted=!0})}updateCurrentUser(t){return h(this,null,function*(){if(ht(this.app))return Promise.reject(An(this));let e=t?En(t):null;return e&&T(e.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(e&&e._clone(this))})}_updateCurrentUser(t,e=!1){return h(this,null,function*(){if(!this._deleted)return t&&T(this.tenantId===t.tenantId,this,"tenant-id-mismatch"),e||(yield this.beforeStateQueue.runMiddleware(t)),this.queue(()=>h(this,null,function*(){yield this.directlySetCurrentUser(t),this.notifyAuthListeners()}))})}signOut(){return h(this,null,function*(){return ht(this.app)?Promise.reject(An(this)):(yield this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&(yield this._setRedirectUser(null)),this._updateCurrentUser(null,!0))})}setPersistence(t){return ht(this.app)?Promise.reject(An(this)):this.queue(()=>h(this,null,function*(){yield this.assertedPersistence.setPersistence(Pt(t))}))}_getRecaptchaConfig(){return this.tenantId==null?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}validatePassword(t){return h(this,null,function*(){this._getPasswordPolicyInternal()||(yield this._updatePasswordPolicy());let e=this._getPasswordPolicyInternal();return e.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):e.validatePassword(t)})}_getPasswordPolicyInternal(){return this.tenantId===null?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}_updatePasswordPolicy(){return h(this,null,function*(){let t=yield Qb(this),e=new vl(t);this.tenantId===null?this._projectPasswordPolicy=e:this._tenantPasswordPolicies[this.tenantId]=e})}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(t){this._errorFactory=new Ot("auth","Firebase",t())}onAuthStateChanged(t,e,i){return this.registerStateListener(this.authStateSubscription,t,e,i)}beforeAuthStateChanged(t,e){return this.beforeStateQueue.pushCallback(t,e)}onIdTokenChanged(t,e,i){return this.registerStateListener(this.idTokenSubscription,t,e,i)}authStateReady(){return new Promise((t,e)=>{if(this.currentUser)t();else{let i=this.onAuthStateChanged(()=>{i(),t()},e)}})}revokeAccessToken(t){return h(this,null,function*(){if(this.currentUser){let e=yield this.currentUser.getIdToken(),i={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:t,idToken:e};this.tenantId!=null&&(i.tenantId=this.tenantId),yield qb(this,i)}})}toJSON(){var t;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:(t=this._currentUser)===null||t===void 0?void 0:t.toJSON()}}_setRedirectUser(t,e){return h(this,null,function*(){let i=yield this.getOrInitRedirectPersistenceManager(e);return t===null?i.removeCurrentUser():i.setCurrentUser(t)})}getOrInitRedirectPersistenceManager(t){return h(this,null,function*(){if(!this.redirectPersistenceManager){let e=t&&Pt(t)||this._popupRedirectResolver;T(e,this,"argument-error"),this.redirectPersistenceManager=yield ho.create(this,[Pt(e._redirectPersistence)],"redirectUser"),this.redirectUser=yield this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager})}_redirectUserForId(t){return h(this,null,function*(){var e,i;return this._isInitialized&&(yield this.queue(()=>h(this,null,function*(){}))),((e=this._currentUser)===null||e===void 0?void 0:e._redirectEventId)===t?this._currentUser:((i=this.redirectUser)===null||i===void 0?void 0:i._redirectEventId)===t?this.redirectUser:null})}_persistUserIfCurrent(t){return h(this,null,function*(){if(t===this.currentUser)return this.queue(()=>h(this,null,function*(){return this.directlySetCurrentUser(t)}))})}_notifyListenersIfCurrent(t){t===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var t,e;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);let i=(e=(t=this.currentUser)===null||t===void 0?void 0:t.uid)!==null&&e!==void 0?e:null;this.lastNotifiedUid!==i&&(this.lastNotifiedUid=i,this.authStateSubscription.next(this.currentUser))}registerStateListener(t,e,i,r){if(this._deleted)return()=>{};let s=typeof e=="function"?e:e.next.bind(e),o=!1,c=this._isInitialized?Promise.resolve():this._initializationPromise;if(T(c,this,"internal-error"),c.then(()=>{o||s(this.currentUser)}),typeof e=="function"){let a=t.addObserver(e,i,r);return()=>{o=!0,a()}}else{let a=t.addObserver(e);return()=>{o=!0,a()}}}directlySetCurrentUser(t){return h(this,null,function*(){this.currentUser&&this.currentUser!==t&&this._currentUser._stopProactiveRefresh(),t&&this.isProactiveRefreshEnabled&&t._startProactiveRefresh(),this.currentUser=t,t?yield this.assertedPersistence.setCurrentUser(t):yield this.assertedPersistence.removeCurrentUser()})}queue(t){return this.operations=this.operations.then(t,t),this.operations}get assertedPersistence(){return T(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(t){!t||this.frameworks.includes(t)||(this.frameworks.push(t),this.frameworks.sort(),this.clientVersion=Rp(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}_getAdditionalHeaders(){return h(this,null,function*(){var t;let e={"X-Client-Version":this.clientVersion};this.app.options.appId&&(e["X-Firebase-gmpid"]=this.app.options.appId);let i=yield(t=this.heartbeatServiceProvider.getImmediate({optional:!0}))===null||t===void 0?void 0:t.getHeartbeatsHeader();i&&(e["X-Firebase-Client"]=i);let r=yield this._getAppCheckToken();return r&&(e["X-Firebase-AppCheck"]=r),e})}_getAppCheckToken(){return h(this,null,function*(){var t;let e=yield(t=this.appCheckServiceProvider.getImmediate({optional:!0}))===null||t===void 0?void 0:t.getToken();return e?.error&&xb(`Error while retrieving App Check token: ${e.error}`),e?.token})}};function wo(n){return En(n)}var fo=class{constructor(t){this.auth=t,this.observer=null,this.addObserver=Vf(e=>this.observer=e)}get next(){return T(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}};var xl={loadJS(){return h(this,null,function*(){throw new Error("Unable to load external scripts")})},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function Xb(n){xl=n}function e1(n){return xl.loadJS(n)}function t1(){return xl.gapiScript}function Mp(n){return`__${n}${Math.floor(Math.random()*1e6)}`}function Fl(n,t){let e=ol(n,"auth");if(e.isInitialized()){let r=e.getImmediate(),s=e.getOptions();if(ui(s,t??{}))return r;pt(r,"already-initialized")}return e.initialize({options:t})}function n1(n,t){let e=t?.persistence||[],i=(Array.isArray(e)?e:[e]).map(Pt);t?.errorMap&&n._updateErrorMap(t.errorMap),n._initializeWithPersistence(i,t?.popupRedirectResolver)}function Ll(n,t,e){let i=wo(n);T(i._canInitEmulator,i,"emulator-config-failed"),T(/^https?:\/\//.test(t),i,"invalid-emulator-scheme");let r=!!e?.disableWarnings,s=Pp(t),{host:o,port:c}=i1(t),a=c===null?"":`:${c}`;i.config.emulator={url:`${s}//${o}${a}/`},i.settings.appVerificationDisabledForTesting=!0,i.emulatorConfig=Object.freeze({host:o,port:c,protocol:s.replace(":",""),options:Object.freeze({disableWarnings:r})}),r||r1()}function Pp(n){let t=n.indexOf(":");return t<0?"":n.substr(0,t+1)}function i1(n){let t=Pp(n),e=/(\/\/)?([^?#/]+)/.exec(n.substr(t.length));if(!e)return{host:"",port:null};let i=e[2].split("@").pop()||"",r=/^(\[[^\]]+\])(:|$)/.exec(i);if(r){let s=r[1];return{host:s,port:sp(i.substr(s.length+1))}}else{let[s,o]=i.split(":");return{host:s,port:sp(o)}}}function sp(n){if(!n)return null;let t=Number(n);return isNaN(t)?null:t}function r1(){function n(){let t=document.createElement("p"),e=t.style;t.innerText="Running in emulator mode. Do not use with production credentials.",e.position="fixed",e.width="100%",e.backgroundColor="#ffffff",e.border=".1em solid #000000",e.color="#b50000",e.bottom="0px",e.left="0px",e.margin="0px",e.zIndex="10000",e.textAlign="center",t.classList.add("firebase-emulator-warning"),document.body.appendChild(t)}typeof console<"u"&&typeof console.info=="function"&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials."),typeof window<"u"&&typeof document<"u"&&(document.readyState==="loading"?window.addEventListener("DOMContentLoaded",n):n())}var Ar=class{constructor(t,e){this.providerId=t,this.signInMethod=e}toJSON(){return Mt("not implemented")}_getIdTokenResponse(t){return Mt("not implemented")}_linkToIdToken(t,e){return Mt("not implemented")}_getReauthenticationResolver(t){return Mt("not implemented")}};function _i(n,t){return h(this,null,function*(){return $b(n,"POST","/v1/accounts:signInWithIdp",Rl(n,t))})}var s1="http://localhost",po=class n extends Ar{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(t){let e=new n(t.providerId,t.signInMethod);return t.idToken||t.accessToken?(t.idToken&&(e.idToken=t.idToken),t.accessToken&&(e.accessToken=t.accessToken),t.nonce&&!t.pendingToken&&(e.nonce=t.nonce),t.pendingToken&&(e.pendingToken=t.pendingToken)):t.oauthToken&&t.oauthTokenSecret?(e.accessToken=t.oauthToken,e.secret=t.oauthTokenSecret):pt("argument-error"),e}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,nonce:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(t){let e=typeof t=="string"?JSON.parse(t):t,{providerId:i,signInMethod:r}=e,s=Vr(e,["providerId","signInMethod"]);if(!i||!r)return null;let o=new n(i,r);return o.idToken=s.idToken||void 0,o.accessToken=s.accessToken||void 0,o.secret=s.secret,o.nonce=s.nonce,o.pendingToken=s.pendingToken||null,o}_getIdTokenResponse(t){let e=this.buildRequest();return _i(t,e)}_linkToIdToken(t,e){let i=this.buildRequest();return i.idToken=e,_i(t,i)}_getReauthenticationResolver(t){let e=this.buildRequest();return e.autoCreate=!1,_i(t,e)}buildRequest(){let t={requestUri:s1,returnSecureToken:!0};if(this.pendingToken)t.pendingToken=this.pendingToken;else{let e={};this.idToken&&(e.id_token=this.idToken),this.accessToken&&(e.access_token=this.accessToken),this.secret&&(e.oauth_token_secret=this.secret),e.providerId=this.providerId,this.nonce&&!this.pendingToken&&(e.nonce=this.nonce),t.postBody=di(e)}return t}};var Or=class{constructor(t){this.providerId=t,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(t){this.defaultLanguageCode=t}setCustomParameters(t){return this.customParameters=t,this}getCustomParameters(){return this.customParameters}};var go=class extends Or{constructor(){super(...arguments),this.scopes=[]}addScope(t){return this.scopes.includes(t)||this.scopes.push(t),this}getScopes(){return[...this.scopes]}};var Pr=(()=>{class n extends go{constructor(){super("google.com"),this.addScope("profile")}static credential(e,i){return po._fromParams({providerId:n.PROVIDER_ID,signInMethod:n.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:i})}static credentialFromResult(e){return n.credentialFromTaggedObject(e)}static credentialFromError(e){return n.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{oauthIdToken:i,oauthAccessToken:r}=e;if(!i&&!r)return null;try{return n.credential(i,r)}catch{return null}}}n.GOOGLE_SIGN_IN_METHOD="google.com",n.PROVIDER_ID="google.com";return n})();var Rr=class n{constructor(t){this.user=t.user,this.providerId=t.providerId,this._tokenResponse=t._tokenResponse,this.operationType=t.operationType}static _fromIdTokenResponse(t,e,i,r=!1){return h(this,null,function*(){let s=yield vi._fromIdTokenResponse(t,i,r),o=op(i);return new n({user:s,providerId:o,_tokenResponse:i,operationType:e})})}static _forOperation(t,e,i){return h(this,null,function*(){yield t._updateTokensIfNecessary(i,!0);let r=op(i);return new n({user:t,providerId:r,_tokenResponse:i,operationType:e})})}};function op(n){return n.providerId?n.providerId:"phoneNumber"in n?"phone":null}var bl=class n extends Ze{constructor(t,e,i,r){var s;super(e.code,e.message),this.operationType=i,this.user=r,Object.setPrototypeOf(this,n.prototype),this.customData={appName:t.name,tenantId:(s=t.tenantId)!==null&&s!==void 0?s:void 0,_serverResponse:e.customData._serverResponse,operationType:i}}static _fromErrorAndOperation(t,e,i,r){return new n(t,e,i,r)}};function Np(n,t,e,i){return(t==="reauthenticate"?e._getReauthenticationResolver(n):e._getIdTokenResponse(n)).catch(s=>{throw s.code==="auth/multi-factor-auth-required"?bl._fromErrorAndOperation(n,s,t,i):s})}function o1(n,t,e=!1){return h(this,null,function*(){let i=yield Sr(n,t._linkToIdToken(n.auth,yield n.getIdToken()),e);return Rr._forOperation(n,"link",i)})}function a1(n,t,e=!1){return h(this,null,function*(){let{auth:i}=n;if(ht(i.app))return Promise.reject(An(i));let r="reauthenticate";try{let s=yield Sr(n,Np(i,r,t,n),e);T(s.idToken,i,"internal-error");let o=Pl(s.idToken);T(o,i,"internal-error");let{sub:c}=o;return T(n.uid===c,i,"user-mismatch"),Rr._forOperation(n,r,s)}catch(s){throw s?.code==="auth/user-not-found"&&pt(i,"user-mismatch"),s}})}function c1(n,t,e=!1){return h(this,null,function*(){if(ht(n.app))return Promise.reject(An(n));let i="signIn",r=yield Np(n,i,t),s=yield Rr._fromIdTokenResponse(n,i,r);return e||(yield n._updateCurrentUser(s.user)),s})}function Nr(n,t,e,i){return En(n).onIdTokenChanged(t,e,i)}function Bl(n,t,e){return En(n).beforeAuthStateChanged(t,e)}var mo="__sak";var _o=class{constructor(t,e){this.storageRetriever=t,this.type=e}_isAvailable(){try{return this.storage?(this.storage.setItem(mo,"1"),this.storage.removeItem(mo),Promise.resolve(!0)):Promise.resolve(!1)}catch{return Promise.resolve(!1)}}_set(t,e){return this.storage.setItem(t,JSON.stringify(e)),Promise.resolve()}_get(t){let e=this.storage.getItem(t);return Promise.resolve(e?JSON.parse(e):null)}_remove(t){return this.storage.removeItem(t),Promise.resolve()}get storage(){return this.storageRetriever()}};var l1=1e3,u1=10,d1=(()=>{class n extends _o{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(e,i)=>this.onStorageEvent(e,i),this.listeners={},this.localCache={},this.pollTimer=null,this.fallbackToPolling=Op(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(let i of Object.keys(this.listeners)){let r=this.storage.getItem(i),s=this.localCache[i];r!==s&&e(i,s,r)}}onStorageEvent(e,i=!1){if(!e.key){this.forAllChangedKeys((c,a,l)=>{this.notifyListeners(c,l)});return}let r=e.key;i?this.detachListener():this.stopPolling();let s=()=>{let c=this.storage.getItem(r);!i&&this.localCache[r]===c||this.notifyListeners(r,c)},o=this.storage.getItem(r);Yb()&&o!==e.newValue&&e.newValue!==e.oldValue?setTimeout(s,u1):s()}notifyListeners(e,i){this.localCache[e]=i;let r=this.listeners[e];if(r)for(let s of Array.from(r))s(i&&JSON.parse(i))}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((e,i,r)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:i,newValue:r}),!0)})},l1)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(e,i){Object.keys(this.listeners).length===0&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[e]||(this.listeners[e]=new Set,this.localCache[e]=this.storage.getItem(e)),this.listeners[e].add(i)}_removeListener(e,i){this.listeners[e]&&(this.listeners[e].delete(i),this.listeners[e].size===0&&delete this.listeners[e]),Object.keys(this.listeners).length===0&&(this.detachListener(),this.stopPolling())}_set(e,i){return h(this,null,function*(){yield cn(n.prototype,this,"_set").call(this,e,i),this.localCache[e]=JSON.stringify(i)})}_get(e){return h(this,null,function*(){let i=yield cn(n.prototype,this,"_get").call(this,e);return this.localCache[e]=JSON.stringify(i),i})}_remove(e){return h(this,null,function*(){yield cn(n.prototype,this,"_remove").call(this,e),delete this.localCache[e]})}}return n.type="LOCAL",n})(),kp=d1;var h1=(()=>{class n extends _o{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(e,i){}_removeListener(e,i){}}return n.type="SESSION",n})(),Vl=h1;function f1(n){return Promise.all(n.map(t=>h(this,null,function*(){try{return{fulfilled:!0,value:yield t}}catch(e){return{fulfilled:!1,reason:e}}})))}var p1=(()=>{class n{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(e){let i=this.receivers.find(s=>s.isListeningto(e));if(i)return i;let r=new n(e);return this.receivers.push(r),r}isListeningto(e){return this.eventTarget===e}handleEvent(e){return h(this,null,function*(){let i=e,{eventId:r,eventType:s,data:o}=i.data,c=this.handlersMap[s];if(!c?.size)return;i.ports[0].postMessage({status:"ack",eventId:r,eventType:s});let a=Array.from(c).map(u=>h(this,null,function*(){return u(i.origin,o)})),l=yield f1(a);i.ports[0].postMessage({status:"done",eventId:r,eventType:s,response:l})})}_subscribe(e,i){Object.keys(this.handlersMap).length===0&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[e]||(this.handlersMap[e]=new Set),this.handlersMap[e].add(i)}_unsubscribe(e,i){this.handlersMap[e]&&i&&this.handlersMap[e].delete(i),(!i||this.handlersMap[e].size===0)&&delete this.handlersMap[e],Object.keys(this.handlersMap).length===0&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}n.receivers=[];return n})();function Ul(n="",t=10){let e="";for(let i=0;i<t;i++)e+=Math.floor(Math.random()*10);return n+e}var wl=class{constructor(t){this.target=t,this.handlers=new Set}removeMessageHandler(t){t.messageChannel&&(t.messageChannel.port1.removeEventListener("message",t.onMessage),t.messageChannel.port1.close()),this.handlers.delete(t)}_send(t,e,i=50){return h(this,null,function*(){let r=typeof MessageChannel<"u"?new MessageChannel:null;if(!r)throw new Error("connection_unavailable");let s,o;return new Promise((c,a)=>{let l=Ul("",20);r.port1.start();let u=setTimeout(()=>{a(new Error("unsupported_event"))},i);o={messageChannel:r,onMessage(d){let p=d;if(p.data.eventId===l)switch(p.data.status){case"ack":clearTimeout(u),s=setTimeout(()=>{a(new Error("timeout"))},3e3);break;case"done":clearTimeout(s),c(p.data.response);break;default:clearTimeout(u),clearTimeout(s),a(new Error("invalid_response"));break}}},this.handlers.add(o),r.port1.addEventListener("message",o.onMessage),this.target.postMessage({eventType:t,eventId:l,data:e},[r.port2])}).finally(()=>{o&&this.removeMessageHandler(o)})})}};function ft(){return window}function g1(n){ft().location.href=n}function xp(){return typeof ft().WorkerGlobalScope<"u"&&typeof ft().importScripts=="function"}function m1(){return h(this,null,function*(){if(!navigator?.serviceWorker)return null;try{return(yield navigator.serviceWorker.ready).active}catch{return null}})}function _1(){var n;return((n=navigator?.serviceWorker)===null||n===void 0?void 0:n.controller)||null}function v1(){return xp()?self:null}var Fp="firebaseLocalStorageDb",y1=1,vo="firebaseLocalStorage",Lp="fbase_key",Rn=class{constructor(t){this.request=t}toPromise(){return new Promise((t,e)=>{this.request.addEventListener("success",()=>{t(this.request.result)}),this.request.addEventListener("error",()=>{e(this.request.error)})})}};function Do(n,t){return n.transaction([vo],t?"readwrite":"readonly").objectStore(vo)}function b1(){let n=indexedDB.deleteDatabase(Fp);return new Rn(n).toPromise()}function Dl(){let n=indexedDB.open(Fp,y1);return new Promise((t,e)=>{n.addEventListener("error",()=>{e(n.error)}),n.addEventListener("upgradeneeded",()=>{let i=n.result;try{i.createObjectStore(vo,{keyPath:Lp})}catch(r){e(r)}}),n.addEventListener("success",()=>h(this,null,function*(){let i=n.result;i.objectStoreNames.contains(vo)?t(i):(i.close(),yield b1(),t(yield Dl()))}))})}function ap(n,t,e){return h(this,null,function*(){let i=Do(n,!0).put({[Lp]:t,value:e});return new Rn(i).toPromise()})}function w1(n,t){return h(this,null,function*(){let e=Do(n,!1).get(t),i=yield new Rn(e).toPromise();return i===void 0?null:i.value})}function cp(n,t){let e=Do(n,!0).delete(t);return new Rn(e).toPromise()}var D1=800,T1=3,E1=(()=>{class n{constructor(){this.type="LOCAL",this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then(()=>{},()=>{})}_openDb(){return h(this,null,function*(){return this.db?this.db:(this.db=yield Dl(),this.db)})}_withRetries(e){return h(this,null,function*(){let i=0;for(;;)try{let r=yield this._openDb();return yield e(r)}catch(r){if(i++>T1)throw r;this.db&&(this.db.close(),this.db=void 0)}})}initializeServiceWorkerMessaging(){return h(this,null,function*(){return xp()?this.initializeReceiver():this.initializeSender()})}initializeReceiver(){return h(this,null,function*(){this.receiver=p1._getInstance(v1()),this.receiver._subscribe("keyChanged",(e,i)=>h(this,null,function*(){return{keyProcessed:(yield this._poll()).includes(i.key)}})),this.receiver._subscribe("ping",(e,i)=>h(this,null,function*(){return["keyChanged"]}))})}initializeSender(){return h(this,null,function*(){var e,i;if(this.activeServiceWorker=yield m1(),!this.activeServiceWorker)return;this.sender=new wl(this.activeServiceWorker);let r=yield this.sender._send("ping",{},800);r&&!((e=r[0])===null||e===void 0)&&e.fulfilled&&!((i=r[0])===null||i===void 0)&&i.value.includes("keyChanged")&&(this.serviceWorkerReceiverAvailable=!0)})}notifyServiceWorker(e){return h(this,null,function*(){if(!(!this.sender||!this.activeServiceWorker||_1()!==this.activeServiceWorker))try{yield this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch{}})}_isAvailable(){return h(this,null,function*(){try{if(!indexedDB)return!1;let e=yield Dl();return yield ap(e,mo,"1"),yield cp(e,mo),!0}catch{}return!1})}_withPendingWrite(e){return h(this,null,function*(){this.pendingWrites++;try{yield e()}finally{this.pendingWrites--}})}_set(e,i){return h(this,null,function*(){return this._withPendingWrite(()=>h(this,null,function*(){return yield this._withRetries(r=>ap(r,e,i)),this.localCache[e]=i,this.notifyServiceWorker(e)}))})}_get(e){return h(this,null,function*(){let i=yield this._withRetries(r=>w1(r,e));return this.localCache[e]=i,i})}_remove(e){return h(this,null,function*(){return this._withPendingWrite(()=>h(this,null,function*(){return yield this._withRetries(i=>cp(i,e)),delete this.localCache[e],this.notifyServiceWorker(e)}))})}_poll(){return h(this,null,function*(){let e=yield this._withRetries(s=>{let o=Do(s,!1).getAll();return new Rn(o).toPromise()});if(!e)return[];if(this.pendingWrites!==0)return[];let i=[],r=new Set;if(e.length!==0)for(let{fbase_key:s,value:o}of e)r.add(s),JSON.stringify(this.localCache[s])!==JSON.stringify(o)&&(this.notifyListeners(s,o),i.push(s));for(let s of Object.keys(this.localCache))this.localCache[s]&&!r.has(s)&&(this.notifyListeners(s,null),i.push(s));return i})}notifyListeners(e,i){this.localCache[e]=i;let r=this.listeners[e];if(r)for(let s of Array.from(r))s(i)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>h(this,null,function*(){return this._poll()}),D1)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,i){Object.keys(this.listeners).length===0&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(i)}_removeListener(e,i){this.listeners[e]&&(this.listeners[e].delete(i),this.listeners[e].size===0&&delete this.listeners[e]),Object.keys(this.listeners).length===0&&this.stopPolling()}}return n.type="LOCAL",n})(),Bp=E1;var vR=Mp("rcb"),yR=new On(3e4,6e4);function Vp(n,t){return t?Pt(t):(T(n._popupRedirectResolver,n,"argument-error"),n._popupRedirectResolver)}var Mr=class extends Ar{constructor(t){super("custom","custom"),this.params=t}_getIdTokenResponse(t){return _i(t,this._buildIdpRequest())}_linkToIdToken(t,e){return _i(t,this._buildIdpRequest(e))}_getReauthenticationResolver(t){return _i(t,this._buildIdpRequest())}_buildIdpRequest(t){let e={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return t&&(e.idToken=t),e}};function C1(n){return c1(n.auth,new Mr(n),n.bypassAuthState)}function S1(n){let{auth:t,user:e}=n;return T(e,t,"internal-error"),a1(e,new Mr(n),n.bypassAuthState)}function I1(n){return h(this,null,function*(){let{auth:t,user:e}=n;return T(e,t,"internal-error"),o1(e,new Mr(n),n.bypassAuthState)})}var yo=class{constructor(t,e,i,r,s=!1){this.auth=t,this.resolver=i,this.user=r,this.bypassAuthState=s,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(e)?e:[e]}execute(){return new Promise((t,e)=>h(this,null,function*(){this.pendingPromise={resolve:t,reject:e};try{this.eventManager=yield this.resolver._initialize(this.auth),yield this.onExecution(),this.eventManager.registerConsumer(this)}catch(i){this.reject(i)}}))}onAuthEvent(t){return h(this,null,function*(){let{urlResponse:e,sessionId:i,postBody:r,tenantId:s,error:o,type:c}=t;if(o){this.reject(o);return}let a={auth:this.auth,requestUri:e,sessionId:i,tenantId:s||void 0,postBody:r||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(yield this.getIdpTask(c)(a))}catch(l){this.reject(l)}})}onError(t){this.reject(t)}getIdpTask(t){switch(t){case"signInViaPopup":case"signInViaRedirect":return C1;case"linkViaPopup":case"linkViaRedirect":return I1;case"reauthViaPopup":case"reauthViaRedirect":return S1;default:pt(this.auth,"internal-error")}}resolve(t){Nt(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(t),this.unregisterAndCleanUp()}reject(t){Nt(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(t),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}};var A1=new On(2e3,1e4);function jl(n,t,e){return h(this,null,function*(){if(ht(n.app))return Promise.reject(Xe(n,"operation-not-supported-in-this-environment"));let i=wo(n);Fb(n,t,Or);let r=Vp(i,e);return new O1(i,"signInViaPopup",t,r).executeNotNull()})}var O1=(()=>{class n extends yo{constructor(e,i,r,s,o){super(e,i,s,o),this.provider=r,this.authWindow=null,this.pollId=null,n.currentPopupAction&&n.currentPopupAction.cancel(),n.currentPopupAction=this}executeNotNull(){return h(this,null,function*(){let e=yield this.execute();return T(e,this.auth,"internal-error"),e})}onExecution(){return h(this,null,function*(){Nt(this.filter.length===1,"Popup operations only handle one event");let e=Ul();this.authWindow=yield this.resolver._openPopup(this.auth,this.provider,this.filter[0],e),this.authWindow.associatedEvent=e,this.resolver._originValidation(this.auth).catch(i=>{this.reject(i)}),this.resolver._isIframeWebStorageSupported(this.auth,i=>{i||this.reject(Xe(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()})}get eventId(){var e;return((e=this.authWindow)===null||e===void 0?void 0:e.associatedEvent)||null}cancel(){this.reject(Xe(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,n.currentPopupAction=null}pollUserCancellation(){let e=()=>{var i,r;if(!((r=(i=this.authWindow)===null||i===void 0?void 0:i.window)===null||r===void 0)&&r.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(Xe(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(e,A1.get())};e()}}n.currentPopupAction=null;return n})(),R1="pendingRedirect",oo=new Map,Tl=class n extends yo{constructor(t,e,i=!1){super(t,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],e,void 0,i),this.eventId=null}execute(){return h(this,null,function*(){let t=oo.get(this.auth._key());if(!t){try{let i=(yield M1(this.resolver,this.auth))?yield cn(n.prototype,this,"execute").call(this):null;t=()=>Promise.resolve(i)}catch(e){t=()=>Promise.reject(e)}oo.set(this.auth._key(),t)}return this.bypassAuthState||oo.set(this.auth._key(),()=>Promise.resolve(null)),t()})}onAuthEvent(t){return h(this,null,function*(){if(t.type==="signInViaRedirect")return cn(n.prototype,this,"onAuthEvent").call(this,t);if(t.type==="unknown"){this.resolve(null);return}if(t.eventId){let e=yield this.auth._redirectUserForId(t.eventId);if(e)return this.user=e,cn(n.prototype,this,"onAuthEvent").call(this,t);this.resolve(null)}})}onExecution(){return h(this,null,function*(){})}cleanUp(){}};function M1(n,t){return h(this,null,function*(){let e=k1(t),i=N1(n);if(!(yield i._isAvailable()))return!1;let r=(yield i._get(e))==="true";return yield i._remove(e),r})}function P1(n,t){oo.set(n._key(),t)}function N1(n){return Pt(n._redirectPersistence)}function k1(n){return so(R1,n.config.apiKey,n.name)}function x1(n,t,e=!1){return h(this,null,function*(){if(ht(n.app))return Promise.reject(An(n));let i=wo(n),r=Vp(i,t),o=yield new Tl(i,r,e).execute();return o&&!e&&(delete o.user._redirectEventId,yield i._persistUserIfCurrent(o.user),yield i._setRedirectUser(null,t)),o})}var F1=10*60*1e3,El=class{constructor(t){this.auth=t,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(t){this.consumers.add(t),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,t)&&(this.sendToConsumer(this.queuedRedirectEvent,t),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(t){this.consumers.delete(t)}onEvent(t){if(this.hasEventBeenHandled(t))return!1;let e=!1;return this.consumers.forEach(i=>{this.isEventForConsumer(t,i)&&(e=!0,this.sendToConsumer(t,i),this.saveEventToCache(t))}),this.hasHandledPotentialRedirect||!L1(t)||(this.hasHandledPotentialRedirect=!0,e||(this.queuedRedirectEvent=t,e=!0)),e}sendToConsumer(t,e){var i;if(t.error&&!Up(t)){let r=((i=t.error.code)===null||i===void 0?void 0:i.split("auth/")[1])||"internal-error";e.onError(Xe(this.auth,r))}else e.onAuthEvent(t)}isEventForConsumer(t,e){let i=e.eventId===null||!!t.eventId&&t.eventId===e.eventId;return e.filter.includes(t.type)&&i}hasEventBeenHandled(t){return Date.now()-this.lastProcessedEventTime>=F1&&this.cachedEventUids.clear(),this.cachedEventUids.has(lp(t))}saveEventToCache(t){this.cachedEventUids.add(lp(t)),this.lastProcessedEventTime=Date.now()}};function lp(n){return[n.type,n.eventId,n.sessionId,n.tenantId].filter(t=>t).join("-")}function Up({type:n,error:t}){return n==="unknown"&&t?.code==="auth/no-auth-event"}function L1(n){switch(n.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return Up(n);default:return!1}}function B1(e){return h(this,arguments,function*(n,t={}){return yi(n,"GET","/v1/projects",t)})}var V1=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,U1=/^https?/;function j1(n){return h(this,null,function*(){if(n.config.emulator)return;let{authorizedDomains:t}=yield B1(n);for(let e of t)try{if($1(e))return}catch{}pt(n,"unauthorized-domain")})}function $1(n){let t=fl(),{protocol:e,hostname:i}=new URL(t);if(n.startsWith("chrome-extension://")){let o=new URL(n);return o.hostname===""&&i===""?e==="chrome-extension:"&&n.replace("chrome-extension://","")===t.replace("chrome-extension://",""):e==="chrome-extension:"&&o.hostname===i}if(!U1.test(e))return!1;if(V1.test(n))return i===n;let r=n.replace(/\./g,"\\.");return new RegExp("^(.+\\."+r+"|"+r+")$","i").test(i)}var H1=new On(3e4,6e4);function up(){let n=ft().___jsl;if(n?.H){for(let t of Object.keys(n.H))if(n.H[t].r=n.H[t].r||[],n.H[t].L=n.H[t].L||[],n.H[t].r=[...n.H[t].L],n.CP)for(let e=0;e<n.CP.length;e++)n.CP[e]=null}}function G1(n){return new Promise((t,e)=>{var i,r,s;function o(){up(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{up(),e(Xe(n,"network-request-failed"))},timeout:H1.get()})}if(!((r=(i=ft().gapi)===null||i===void 0?void 0:i.iframes)===null||r===void 0)&&r.Iframe)t(gapi.iframes.getContext());else if(!((s=ft().gapi)===null||s===void 0)&&s.load)o();else{let c=Mp("iframefcb");return ft()[c]=()=>{gapi.load?o():e(Xe(n,"network-request-failed"))},e1(`${t1()}?onload=${c}`).catch(a=>e(a))}}).catch(t=>{throw ao=null,t})}var ao=null;function z1(n){return ao=ao||G1(n),ao}var W1=new On(5e3,15e3),q1="__/auth/iframe",J1="emulator/auth/iframe",K1={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},Y1=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function Q1(n){let t=n.config;T(t.authDomain,n,"auth-domain-config-required");let e=t.emulator?Ol(t,J1):`https://${n.config.authDomain}/${q1}`,i={apiKey:t.apiKey,appName:n.name,v:pi},r=Y1.get(n.config.apiHost);r&&(i.eid=r);let s=n._getFrameworks();return s.length&&(i.fw=s.join(",")),`${e}?${di(i).slice(1)}`}function Z1(n){return h(this,null,function*(){let t=yield z1(n),e=ft().gapi;return T(e,n,"internal-error"),t.open({where:document.body,url:Q1(n),messageHandlersFilter:e.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:K1,dontclear:!0},i=>new Promise((r,s)=>h(this,null,function*(){yield i.restyle({setHideOnLeave:!1});let o=Xe(n,"network-request-failed"),c=ft().setTimeout(()=>{s(o)},W1.get());function a(){ft().clearTimeout(c),r(i)}i.ping(a).then(a,()=>{s(o)})})))})}var X1={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},ew=500,tw=600,nw="_blank",iw="http://localhost",bo=class{constructor(t){this.window=t,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}};function rw(n,t,e,i=ew,r=tw){let s=Math.max((window.screen.availHeight-r)/2,0).toString(),o=Math.max((window.screen.availWidth-i)/2,0).toString(),c="",a=Object.assign(Object.assign({},X1),{width:i.toString(),height:r.toString(),top:s,left:o}),l=me().toLowerCase();e&&(c=Ep(l)?nw:e),Dp(l)&&(t=t||iw,a.scrollbars="yes");let u=Object.entries(a).reduce((p,[g,b])=>`${p}${g}=${b},`,"");if(Kb(l)&&c!=="_self")return sw(t||"",c),new bo(null);let d=window.open(t||"",c,u);T(d,n,"popup-blocked");try{d.focus()}catch{}return new bo(d)}function sw(n,t){let e=document.createElement("a");e.href=n,e.target=t;let i=document.createEvent("MouseEvent");i.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),e.dispatchEvent(i)}var ow="__/auth/handler",aw="emulator/auth/handler",cw=encodeURIComponent("fac");function dp(n,t,e,i,r,s){return h(this,null,function*(){T(n.config.authDomain,n,"auth-domain-config-required"),T(n.config.apiKey,n,"invalid-api-key");let o={apiKey:n.config.apiKey,appName:n.name,authType:e,redirectUrl:i,v:pi,eventId:r};if(t instanceof Or){t.setDefaultLanguage(n.languageCode),o.providerId=t.providerId||"",Bf(t.getCustomParameters())||(o.customParameters=JSON.stringify(t.getCustomParameters()));for(let[u,d]of Object.entries(s||{}))o[u]=d}if(t instanceof go){let u=t.getScopes().filter(d=>d!=="");u.length>0&&(o.scopes=u.join(","))}n.tenantId&&(o.tid=n.tenantId);let c=o;for(let u of Object.keys(c))c[u]===void 0&&delete c[u];let a=yield n._getAppCheckToken(),l=a?`#${cw}=${encodeURIComponent(a)}`:"";return`${lw(n)}?${di(c).slice(1)}${l}`})}function lw({config:n}){return n.emulator?Ol(n,aw):`https://${n.authDomain}/${ow}`}var hl="webStorageSupport",Cl=class{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=Vl,this._completeRedirectFn=x1,this._overrideRedirectResult=P1}_openPopup(t,e,i,r){return h(this,null,function*(){var s;Nt((s=this.eventManagers[t._key()])===null||s===void 0?void 0:s.manager,"_initialize() not called before _openPopup()");let o=yield dp(t,e,i,fl(),r);return rw(t,o,Ul())})}_openRedirect(t,e,i,r){return h(this,null,function*(){yield this._originValidation(t);let s=yield dp(t,e,i,fl(),r);return g1(s),new Promise(()=>{})})}_initialize(t){let e=t._key();if(this.eventManagers[e]){let{manager:r,promise:s}=this.eventManagers[e];return r?Promise.resolve(r):(Nt(s,"If manager is not set, promise should be"),s)}let i=this.initAndGetManager(t);return this.eventManagers[e]={promise:i},i.catch(()=>{delete this.eventManagers[e]}),i}initAndGetManager(t){return h(this,null,function*(){let e=yield Z1(t),i=new El(t);return e.register("authEvent",r=>(T(r?.authEvent,t,"invalid-auth-event"),{status:i.onEvent(r.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[t._key()]={manager:i},this.iframes[t._key()]=e,i})}_isIframeWebStorageSupported(t,e){this.iframes[t._key()].send(hl,{type:hl},r=>{var s;let o=(s=r?.[0])===null||s===void 0?void 0:s[hl];o!==void 0&&e(!!o),pt(t,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(t){let e=t._key();return this.originValidationPromises[e]||(this.originValidationPromises[e]=j1(t)),this.originValidationPromises[e]}get _shouldInitProactively(){return Op()||Tp()||kl()}},jp=Cl;var hp="@firebase/auth",fp="1.7.9";var Sl=class{constructor(t){this.auth=t,this.internalListeners=new Map}getUid(){var t;return this.assertAuthConfigured(),((t=this.auth.currentUser)===null||t===void 0?void 0:t.uid)||null}getToken(t){return h(this,null,function*(){return this.assertAuthConfigured(),yield this.auth._initializationPromise,this.auth.currentUser?{accessToken:yield this.auth.currentUser.getIdToken(t)}:null})}addAuthTokenListener(t){if(this.assertAuthConfigured(),this.internalListeners.has(t))return;let e=this.auth.onIdTokenChanged(i=>{t(i?.stsTokenManager.accessToken||null)});this.internalListeners.set(t,e),this.updateProactiveRefresh()}removeAuthTokenListener(t){this.assertAuthConfigured();let e=this.internalListeners.get(t);e&&(this.internalListeners.delete(t),e(),this.updateProactiveRefresh())}assertAuthConfigured(){T(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}};function uw(n){switch(n){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}function dw(n){fi(new ut("auth",(t,{options:e})=>{let i=t.getProvider("app").getImmediate(),r=t.getProvider("heartbeat"),s=t.getProvider("app-check-internal"),{apiKey:o,authDomain:c}=i.options;T(o&&!o.includes(":"),"invalid-api-key",{appName:i.name});let a={apiKey:o,authDomain:c,clientPlatform:n,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:Rp(n)},l=new yl(i,r,s,a);return n1(l,e),l},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((t,e,i)=>{t.getProvider("auth-internal").initialize()})),fi(new ut("auth-internal",t=>{let e=wo(t.getProvider("auth").getImmediate());return(i=>new Sl(i))(e)},"PRIVATE").setInstantiationMode("EXPLICIT")),Ie(hp,fp,uw(n)),Ie(hp,fp,"esm2017")}var hw=5*60,fw=zc("authIdTokenMaxAge")||hw,pp=null,pw=n=>t=>h(void 0,null,function*(){let e=t&&(yield t.getIdTokenResult()),i=e&&(new Date().getTime()-Date.parse(e.issuedAtTime))/1e3;if(i&&i>fw)return;let r=e?.token;pp!==r&&(pp=r,yield fetch(n,{method:r?"POST":"DELETE",headers:r?{Authorization:`Bearer ${r}`}:{}}))});function $l(n=Qs()){let t=ol(n,"auth");if(t.isInitialized())return t.getImmediate();let e=Fl(n,{popupRedirectResolver:jp,persistence:[Bp,kp,Vl]}),i=zc("authTokenSyncURL");if(i&&typeof isSecureContext=="boolean"&&isSecureContext){let s=new URL(i,location.origin);if(location.origin===s.origin){let o=pw(s.toString());Bl(e,o,()=>o(e.currentUser)),Nr(e,c=>o(c))}}let r=Rf("auth");return r&&Ll(e,`http://${r}`),e}function gw(){var n,t;return(t=(n=document.getElementsByTagName("head"))===null||n===void 0?void 0:n[0])!==null&&t!==void 0?t:document}Xb({loadJS(n){return new Promise((t,e)=>{let i=document.createElement("script");i.setAttribute("src",n),i.onload=t,i.onerror=r=>{let s=Xe("internal-error");s.customData=r,e(s)},i.type="text/javascript",i.charset="UTF-8",gw().appendChild(i)})},gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="});dw("Browser");function Gp(n){return new Ne(function(t){var e=Nr(n,t.next.bind(t),t.error.bind(t),t.complete.bind(t));return{unsubscribe:e}})}var zp="auth",Mn=class{constructor(t){return t}},Hl=class{constructor(){return ll(zp)}};var Gl=new O("angularfire2.auth-instances");function oD(n,t){let e=ep(zp,n,t);return e&&new Mn(e)}function aD(n){return(t,e)=>{let i=t.runOutsideAngular(()=>n(e));return new Mn(i)}}var cD={provide:Hl,deps:[[new tt,Gl]]},lD={provide:Mn,useFactory:oD,deps:[[new tt,Gl],In]};function lM(n,...t){return Ie("angularfire",Dr.full,"auth"),Ge([lD,cD,{provide:Gl,useFactory:aD(n),multi:!0,deps:[H,X,to,Tr,[new tt,Xs],...t]}])}var Wp=mi(Gp,!0);var uM=mi($l,!0);var qp=mi(jl,!0);var Pn=class extends Error{};Pn.prototype.name="InvalidTokenError";function uD(n){return decodeURIComponent(atob(n).replace(/(.)/g,(t,e)=>{let i=e.charCodeAt(0).toString(16).toUpperCase();return i.length<2&&(i="0"+i),"%"+i}))}function dD(n){let t=n.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return uD(t)}catch{return atob(t)}}function zl(n,t){if(typeof n!="string")throw new Pn("Invalid token specified: must be a string");t||(t={});let e=t.header===!0?0:1,i=n.split(".")[e];if(typeof i!="string")throw new Pn(`Invalid token specified: missing part #${e+1}`);let r;try{r=dD(i)}catch(s){throw new Pn(`Invalid token specified: invalid base64 for part #${e+1} (${s.message})`)}try{return JSON.parse(r)}catch(s){throw new Pn(`Invalid token specified: invalid json for part #${e+1} (${s.message})`)}}var DM=(()=>{class n{constructor(){this.httpService=f(Sf),this._roles=new ve([]),this.route=f(lt),this.router=f(Je),this.auth=f(Mn),this.provider=new Pr,this.user$=Wp(this.auth),this.destroy=new x,this.automateLogon()}login(e){return this.httpService.post("api/Token/Login",e).pipe(V(i=>this.storeLoginResponse(i)),V(i=>this.decodeRoles(i)),V(()=>this.storeFormLogin(e)),_u(1))}storeLoginResponse(e){localStorage.setItem("Token",e.access_token),localStorage.setItem("ExpireDate",e.expiredAt),localStorage.setItem("TokenType",e.token_type)}storeFormLogin(e){localStorage.setItem("Domain",e.Host),localStorage.setItem("Username",e.Username)}decodeRoles(e){let i=zl(e.access_token);localStorage.setItem("Brand",i.Brand);let r=i["http://schemas.microsoft.com/ws/2008/06/identity/claims/role"];return this._roles.next(r),this.storeRoles(),r}storeRoles(){localStorage.setItem("Roles",JSON.stringify(this._roles.value))}isTokenExpired(){let e=localStorage.getItem("Token");try{let i=zl(e),r=Math.floor(Date.now()/1e3);return i.exp?i.exp<r:!1}catch{return!0}}isAuthenticated(){return localStorage.getItem("Token")!==null&&!this.isTokenExpired()}getAuthToken(){return localStorage.getItem("Token")??""}getAuthTokenType(){return localStorage.getItem("TokenType")??""}redirectUrl(){return this.router.navigate(["/pages/shelf/barcode"])}automateLogon(){return h(this,null,function*(){return this.isAuthenticated()?yield this.router.navigate([""]):yield this.router.navigate([""])})}getDomain(){return localStorage.getItem("Domain")!==null?localStorage.getItem("Domain"):""}logout(){return h(this,null,function*(){let e=["ExpireDate","Token","TokenType","Roles","PrintMode"];for(let i of e)localStorage.removeItem(i);yield this.router.navigate([""])})}signInWithPopup(e){return K(qp(this.auth,new Pr)).pipe(ae(i=>{let r=Pr.credentialFromResult(i),s={Host:e,IDToken:r?.idToken};return this.httpService.post("api/token/LoginWithSocialProvider",s).pipe(I(o=>o),V(o=>this.storeLoginResponse(o)),V(o=>this.decodeRoles(o)),ye(o=>w(null)))}),ye(i=>w(null)))}ngOnDestroy(){this.destroy.next(),this.destroy.complete()}checkAuthKeysExists(){return["ExpireDate","Token","TokenType","Roles","Brand","Domain","Username","PrintMode"].every(i=>!!localStorage.getItem(i))}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();export{Tt as a,xi as b,ot as c,ia as d,SD as e,ID as f,AD as g,md as h,ZD as i,Td as j,ha as k,lt as l,wm as m,Je as n,_T as o,vT as p,yT as q,As as r,H_ as s,dr as t,z_ as u,Ih as v,_h as w,gn as x,GT as y,zT as z,ks as A,ur as B,yv as C,qT as D,Dv as E,Ev as F,Sv as G,JT as H,KT as I,YT as J,hf as K,NA as L,D0 as M,kA as N,xA as O,ci as P,vf as Q,FA as R,wf as S,$A as T,H0 as U,HA as V,Df as W,GA as X,Ws as Y,zA as Z,WA as _,qA as $,qs as aa,dy as ba,lO as ca,Sf as da,aR as ea,cR as fa,lM as ga,uM as ha,zl as ia,DM as ja};
|