dealposbarcode 1.7.1 → 1.7.3
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-PQKI2EBV.js → chunk-2KC4V7NR.js} +1 -1
- package/{chunk-PLQP4Q76.js → chunk-CH3XL2PG.js} +4 -4
- package/{chunk-7MK4DBMI.js → chunk-GKLGI7UD.js} +1 -1
- package/chunk-L7JPRHQ2.js +110 -0
- package/{chunk-7IEKKSHA.js → chunk-MRHRP4QM.js} +4 -4
- package/{chunk-WS54GKT5.js → chunk-UM5KZG22.js} +1 -1
- package/{chunk-DJSDGSB3.js → chunk-YZTKVOKN.js} +1 -1
- package/chunk-Z7C56B2Y.js +1 -0
- package/index.html +11 -6
- package/{main-OMVI2VJT.js → main-J24BHW3N.js} +2 -2
- package/package.json +1 -1
- package/styles-E36EMQU4.css +1 -0
- package/chunk-IDSEZUZN.js +0 -1
- package/chunk-SZOOK4RX.js +0 -109
- package/styles-NMAYTWWJ.css +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{$ as Mt,$a as Di,$b as Fu,$c as Bn,A as Xe,Aa as O,Ab as Ho,Ad as td,B as kr,Ba as Lo,Bd as Qo,C as Oo,Ca as T,Cb as Pu,D as Ro,Da as p,Db as Mu,E as
|
|
2
|
-
`).forEach(i=>{let n=i.indexOf(":");if(n>0){let r=i.slice(0,n),s=r.toLowerCase(),o=i.slice(n+1).trim();this.maybeSetNormalizedName(r,s),this.headers.has(s)?this.headers.get(s).push(o):this.headers.set(s,[o])}})}:typeof Headers<"u"&&e instanceof Headers?(this.headers=new Map,e.forEach((i,n)=>{this.setHeaderEntries(n,i)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(e).forEach(([i,n])=>{this.setHeaderEntries(i,n)})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();let i=this.headers.get(e.toLowerCase());return i&&i.length>0?i[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,i){return this.clone({name:e,value:i,op:"a"})}set(e,i){return this.clone({name:e,value:i,op:"s"})}delete(e,i){return this.clone({name:e,value:i,op:"d"})}maybeSetNormalizedName(e,i){this.normalizedNames.has(i)||this.normalizedNames.set(i,e)}init(){this.lazyInit&&(this.lazyInit instanceof t?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(e=>this.applyUpdate(e)),this.lazyUpdate=null))}copyFrom(e){e.init(),Array.from(e.headers.keys()).forEach(i=>{this.headers.set(i,e.headers.get(i)),this.normalizedNames.set(i,e.normalizedNames.get(i))})}clone(e){let i=new t;return i.lazyInit=this.lazyInit&&this.lazyInit instanceof t?this.lazyInit:this,i.lazyUpdate=(this.lazyUpdate||[]).concat([e]),i}applyUpdate(e){let i=e.name.toLowerCase();switch(e.op){case"a":case"s":let n=e.value;if(typeof n=="string"&&(n=[n]),n.length===0)return;this.maybeSetNormalizedName(e.name,i);let r=(e.op==="a"?this.headers.get(i):void 0)||[];r.push(...n),this.headers.set(i,r);break;case"d":let s=e.value;if(!s)this.headers.delete(i),this.normalizedNames.delete(i);else{let o=this.headers.get(i);if(!o)return;o=o.filter(a=>s.indexOf(a)===-1),o.length===0?(this.headers.delete(i),this.normalizedNames.delete(i)):this.headers.set(i,o)}break}}setHeaderEntries(e,i){let n=(Array.isArray(i)?i:[i]).map(s=>s.toString()),r=e.toLowerCase();this.headers.set(r,n),this.maybeSetNormalizedName(e,r)}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(i=>e(this.normalizedNames.get(i),this.headers.get(i)))}};var ea=class{encodeKey(e){return nd(e)}encodeValue(e){return nd(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};function Zp(t,e){let i=new Map;return t.length>0&&t.replace(/^\?/,"").split("&").forEach(r=>{let s=r.indexOf("="),[o,a]=s==-1?[e.decodeKey(r),""]:[e.decodeKey(r.slice(0,s)),e.decodeValue(r.slice(s+1))],c=i.get(o)||[];c.push(a),i.set(o,c)}),i}var Xp=/%(\d[a-f0-9])/gi,eg={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function nd(t){return encodeURIComponent(t).replace(Xp,(e,i)=>eg[i]??e)}function Zr(t){return`${t}`}var jt=class t{constructor(e={}){if(this.updates=null,this.cloneFrom=null,this.encoder=e.encoder||new ea,e.fromString){if(e.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=Zp(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(i=>{let n=e.fromObject[i],r=Array.isArray(n)?n.map(Zr):[Zr(n)];this.map.set(i,r)})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();let i=this.map.get(e);return i?i[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,i){return this.clone({param:e,value:i,op:"a"})}appendAll(e){let i=[];return Object.keys(e).forEach(n=>{let r=e[n];Array.isArray(r)?r.forEach(s=>{i.push({param:n,value:s,op:"a"})}):i.push({param:n,value:r,op:"a"})}),this.clone(i)}set(e,i){return this.clone({param:e,value:i,op:"s"})}delete(e,i){return this.clone({param:e,value:i,op:"d"})}toString(){return this.init(),this.keys().map(e=>{let i=this.encoder.encodeKey(e);return this.map.get(e).map(n=>i+"="+this.encoder.encodeValue(n)).join("&")}).filter(e=>e!=="").join("&")}clone(e){let i=new t({encoder:this.encoder});return i.cloneFrom=this.cloneFrom||this,i.updates=(this.updates||[]).concat(e),i}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(e=>this.map.set(e,this.cloneFrom.map.get(e))),this.updates.forEach(e=>{switch(e.op){case"a":case"s":let i=(e.op==="a"?this.map.get(e.param):void 0)||[];i.push(Zr(e.value)),this.map.set(e.param,i);break;case"d":if(e.value!==void 0){let n=this.map.get(e.param)||[],r=n.indexOf(Zr(e.value));r!==-1&&n.splice(r,1),n.length>0?this.map.set(e.param,n):this.map.delete(e.param)}else{this.map.delete(e.param);break}}}),this.cloneFrom=this.updates=null)}};var ta=class{constructor(){this.map=new Map}set(e,i){return this.map.set(e,i),this}get(e){return this.map.has(e)||this.map.set(e,e.defaultValue()),this.map.get(e)}delete(e){return this.map.delete(e),this}has(e){return this.map.has(e)}keys(){return this.map.keys()}};function tg(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function id(t){return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer}function rd(t){return typeof Blob<"u"&&t instanceof Blob}function sd(t){return typeof FormData<"u"&&t instanceof FormData}function ng(t){return typeof URLSearchParams<"u"&&t instanceof URLSearchParams}var Ai=class t{constructor(e,i,n,r){this.url=i,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=e.toUpperCase();let s;if(tg(this.method)||r?(this.body=n!==void 0?n:null,s=r):s=n,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 yt,this.context??=new ta,!this.params)this.params=new jt,this.urlWithParams=i;else{let o=this.params.toString();if(o.length===0)this.urlWithParams=i;else{let a=i.indexOf("?"),c=a===-1?"?":a<i.length-1?"&":"";this.urlWithParams=i+c+o}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||id(this.body)||rd(this.body)||sd(this.body)||ng(this.body)?this.body:this.body instanceof jt?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||sd(this.body)?null:rd(this.body)?this.body.type||null:id(this.body)?null:typeof this.body=="string"?"text/plain":this.body instanceof jt?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?"application/json":null}clone(e={}){let i=e.method||this.method,n=e.url||this.url,r=e.responseType||this.responseType,s=e.transferCache??this.transferCache,o=e.body!==void 0?e.body:this.body,a=e.withCredentials??this.withCredentials,c=e.reportProgress??this.reportProgress,l=e.headers||this.headers,u=e.params||this.params,h=e.context??this.context;return e.setHeaders!==void 0&&(l=Object.keys(e.setHeaders).reduce((d,g)=>d.set(g,e.setHeaders[g]),l)),e.setParams&&(u=Object.keys(e.setParams).reduce((d,g)=>d.set(g,e.setParams[g]),u)),new t(i,n,o,{params:u,headers:l,context:h,reportProgress:c,responseType:r,withCredentials:a,transferCache:s})}},$t=function(t){return t[t.Sent=0]="Sent",t[t.UploadProgress=1]="UploadProgress",t[t.ResponseHeader=2]="ResponseHeader",t[t.DownloadProgress=3]="DownloadProgress",t[t.Response=4]="Response",t[t.User=5]="User",t}($t||{}),Ri=class{constructor(e,i=200,n="OK"){this.headers=e.headers||new yt,this.status=e.status!==void 0?e.status:i,this.statusText=e.statusText||n,this.url=e.url||null,this.ok=this.status>=200&&this.status<300}},es=class t extends Ri{constructor(e={}){super(e),this.type=$t.ResponseHeader}clone(e={}){return new t({headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}},Pi=class t extends Ri{constructor(e={}){super(e),this.type=$t.Response,this.body=e.body!==void 0?e.body:null}clone(e={}){return new t({body:e.body!==void 0?e.body:this.body,headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}},rt=class extends Ri{constructor(e){super(e,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${e.url||"(unknown url)"}`:this.message=`Http failure response for ${e.url||"(unknown url)"}: ${e.status} ${e.statusText}`,this.error=e.error||null}},ud=200,ig=204;function Xo(t,e){return{body:e,headers:t.headers,context:t.context,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials,transferCache:t.transferCache}}var ra=(()=>{let e=class e{constructor(n){this.handler=n}request(n,r,s={}){let o;if(n instanceof Ai)o=n;else{let l;s.headers instanceof yt?l=s.headers:l=new yt(s.headers);let u;s.params&&(s.params instanceof jt?u=s.params:u=new jt({fromObject:s.params})),o=new Ai(n,r,s.body!==void 0?s.body:null,{headers:l,context:s.context,params:u,reportProgress:s.reportProgress,responseType:s.responseType||"json",withCredentials:s.withCredentials,transferCache:s.transferCache})}let a=D(o).pipe(Mt(l=>this.handler.handle(l)));if(n instanceof Ai||s.observe==="events")return a;let c=a.pipe(fe(l=>l instanceof Pi));switch(s.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return c.pipe(I(l=>{if(l.body!==null&&!(l.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return l.body}));case"blob":return c.pipe(I(l=>{if(l.body!==null&&!(l.body instanceof Blob))throw new Error("Response is not a Blob.");return l.body}));case"text":return c.pipe(I(l=>{if(l.body!==null&&typeof l.body!="string")throw new Error("Response is not a string.");return l.body}));case"json":default:return c.pipe(I(l=>l.body))}case"response":return c;default:throw new Error(`Unreachable: unhandled observe type ${s.observe}}`)}}delete(n,r={}){return this.request("DELETE",n,r)}get(n,r={}){return this.request("GET",n,r)}head(n,r={}){return this.request("HEAD",n,r)}jsonp(n,r){return this.request("JSONP",n,{params:new jt().append(r,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(n,r={}){return this.request("OPTIONS",n,r)}patch(n,r,s={}){return this.request("PATCH",n,Xo(s,r))}post(n,r,s={}){return this.request("POST",n,Xo(s,r))}put(n,r,s={}){return this.request("PUT",n,Xo(s,r))}};e.\u0275fac=function(r){return new(r||e)(T(Oi))},e.\u0275prov=w({token:e,factory:e.\u0275fac});let t=e;return t})(),rg=/^\)\]\}',?\n/,sg="X-Request-URL";function od(t){if(t.url)return t.url;let e=sg.toLocaleLowerCase();return t.headers.get(e)}var og=(()=>{let e=class e{constructor(){this.fetchImpl=p(na,{optional:!0})?.fetch??fetch.bind(globalThis),this.ngZone=p(H)}handle(n){return new Pe(r=>{let s=new AbortController;return this.doRequest(n,s.signal,r).then(ia,o=>r.error(new rt({error:o}))),()=>s.abort()})}doRequest(n,r,s){return f(this,null,function*(){let o=this.createRequestInit(n),a;try{let v=this.ngZone.runOutsideAngular(()=>this.fetchImpl(n.urlWithParams,m({signal:r},o)));ag(v),s.next({type:$t.Sent}),a=yield v}catch(v){s.error(new rt({error:v,status:v.status??0,statusText:v.statusText,url:n.urlWithParams,headers:v.headers}));return}let c=new yt(a.headers),l=a.statusText,u=od(a)??n.urlWithParams,h=a.status,d=null;if(n.reportProgress&&s.next(new es({headers:c,status:h,statusText:l,url:u})),a.body){let v=a.headers.get("content-length"),E=[],_=a.body.getReader(),y=0,R,P,b=typeof Zone<"u"&&Zone.current;yield this.ngZone.runOutsideAngular(()=>f(this,null,function*(){for(;;){let{done:A,value:k}=yield _.read();if(A)break;if(E.push(k),y+=k.length,n.reportProgress){P=n.responseType==="text"?(P??"")+(R??=new TextDecoder).decode(k,{stream:!0}):void 0;let W=()=>s.next({type:$t.DownloadProgress,total:v?+v:void 0,loaded:y,partialText:P});b?b.run(W):W()}}}));let M=this.concatChunks(E,y);try{let A=a.headers.get("Content-Type")??"";d=this.parseBody(n,M,A)}catch(A){s.error(new rt({error:A,headers:new yt(a.headers),status:a.status,statusText:a.statusText,url:od(a)??n.urlWithParams}));return}}h===0&&(h=d?ud:0),h>=200&&h<300?(s.next(new Pi({body:d,headers:c,status:h,statusText:l,url:u})),s.complete()):s.error(new rt({error:d,headers:c,status:h,statusText:l,url:u}))})}parseBody(n,r,s){switch(n.responseType){case"json":let o=new TextDecoder().decode(r).replace(rg,"");return o===""?null:JSON.parse(o);case"text":return new TextDecoder().decode(r);case"blob":return new Blob([r],{type:s});case"arraybuffer":return r.buffer}}createRequestInit(n){let r={},s=n.withCredentials?"include":void 0;if(n.headers.forEach((o,a)=>r[o]=a.join(",")),n.headers.has("Accept")||(r.Accept="application/json, text/plain, */*"),!n.headers.has("Content-Type")){let o=n.detectContentTypeHeader();o!==null&&(r["Content-Type"]=o)}return{body:n.serializeBody(),method:n.method,headers:r,credentials:s}}concatChunks(n,r){let s=new Uint8Array(r),o=0;for(let a of n)s.set(a,o),o+=a.length;return s}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:e.\u0275fac});let t=e;return t})(),na=class{};function ia(){}function ag(t){t.then(ia,ia)}function dd(t,e){return e(t)}function cg(t,e){return(i,n)=>e.intercept(i,{handle:r=>t(r,n)})}function lg(t,e,i){return(n,r)=>ke(i,()=>e(n,s=>t(s,r)))}var ug=new O(""),ns=new O(""),dg=new O(""),hd=new O("",{providedIn:"root",factory:()=>!0});function hg(){let t=null;return(e,i)=>{t===null&&(t=(p(ug,{optional:!0})??[]).reduceRight(cg,dd));let n=p(Di);if(p(hd)){let s=n.add();return t(e,i).pipe(Nt(()=>n.remove(s)))}else return t(e,i)}}var ad=(()=>{let e=class e extends Oi{constructor(n,r){super(),this.backend=n,this.injector=r,this.chain=null,this.pendingTasks=p(Di),this.contributeToStability=p(hd)}handle(n){if(this.chain===null){let r=Array.from(new Set([...this.injector.get(ns),...this.injector.get(dg,[])]));this.chain=r.reduceRight((s,o)=>lg(s,o,this.injector),dd)}if(this.contributeToStability){let r=this.pendingTasks.add();return this.chain(n,s=>this.backend.handle(s)).pipe(Nt(()=>this.pendingTasks.remove(r)))}else return this.chain(n,r=>this.backend.handle(r))}};e.\u0275fac=function(r){return new(r||e)(T(Xr),T(tt))},e.\u0275prov=w({token:e,factory:e.\u0275fac});let t=e;return t})();var fg=/^\)\]\}',?\n/;function pg(t){return"responseURL"in t&&t.responseURL?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):null}var cd=(()=>{let e=class e{constructor(n){this.xhrFactory=n}handle(n){if(n.method==="JSONP")throw new U(-2800,!1);let r=this.xhrFactory;return(r.\u0275loadImpl?Q(r.\u0275loadImpl()):D(null)).pipe(ae(()=>new Pe(o=>{let a=r.build();if(a.open(n.method,n.urlWithParams),n.withCredentials&&(a.withCredentials=!0),n.headers.forEach((_,y)=>a.setRequestHeader(_,y.join(","))),n.headers.has("Accept")||a.setRequestHeader("Accept","application/json, text/plain, */*"),!n.headers.has("Content-Type")){let _=n.detectContentTypeHeader();_!==null&&a.setRequestHeader("Content-Type",_)}if(n.responseType){let _=n.responseType.toLowerCase();a.responseType=_!=="json"?_:"text"}let c=n.serializeBody(),l=null,u=()=>{if(l!==null)return l;let _=a.statusText||"OK",y=new yt(a.getAllResponseHeaders()),R=pg(a)||n.url;return l=new es({headers:y,status:a.status,statusText:_,url:R}),l},h=()=>{let{headers:_,status:y,statusText:R,url:P}=u(),b=null;y!==ig&&(b=typeof a.response>"u"?a.responseText:a.response),y===0&&(y=b?ud:0);let M=y>=200&&y<300;if(n.responseType==="json"&&typeof b=="string"){let A=b;b=b.replace(fg,"");try{b=b!==""?JSON.parse(b):null}catch(k){b=A,M&&(M=!1,b={error:k,text:b})}}M?(o.next(new Pi({body:b,headers:_,status:y,statusText:R,url:P||void 0})),o.complete()):o.error(new rt({error:b,headers:_,status:y,statusText:R,url:P||void 0}))},d=_=>{let{url:y}=u(),R=new rt({error:_,status:a.status||0,statusText:a.statusText||"Unknown Error",url:y||void 0});o.error(R)},g=!1,v=_=>{g||(o.next(u()),g=!0);let y={type:$t.DownloadProgress,loaded:_.loaded};_.lengthComputable&&(y.total=_.total),n.responseType==="text"&&a.responseText&&(y.partialText=a.responseText),o.next(y)},E=_=>{let y={type:$t.UploadProgress,loaded:_.loaded};_.lengthComputable&&(y.total=_.total),o.next(y)};return a.addEventListener("load",h),a.addEventListener("error",d),a.addEventListener("timeout",d),a.addEventListener("abort",d),n.reportProgress&&(a.addEventListener("progress",v),c!==null&&a.upload&&a.upload.addEventListener("progress",E)),a.send(c),o.next({type:$t.Sent}),()=>{a.removeEventListener("error",d),a.removeEventListener("abort",d),a.removeEventListener("load",h),a.removeEventListener("timeout",d),n.reportProgress&&(a.removeEventListener("progress",v),c!==null&&a.upload&&a.upload.removeEventListener("progress",E)),a.readyState!==a.DONE&&a.abort()}})))}};e.\u0275fac=function(r){return new(r||e)(T(Kr))},e.\u0275prov=w({token:e,factory:e.\u0275fac});let t=e;return t})(),fd=new O(""),gg="XSRF-TOKEN",mg=new O("",{providedIn:"root",factory:()=>gg}),_g="X-XSRF-TOKEN",vg=new O("",{providedIn:"root",factory:()=>_g}),ts=class{},yg=(()=>{let e=class e{constructor(n,r,s){this.doc=n,this.platform=r,this.cookieName=s,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if(this.platform==="server")return null;let n=this.doc.cookie||"";return n!==this.lastCookieString&&(this.parseCount++,this.lastToken=qr(n,this.cookieName),this.lastCookieString=n),this.lastToken}};e.\u0275fac=function(r){return new(r||e)(T(G),T(nt),T(mg))},e.\u0275prov=w({token:e,factory:e.\u0275fac});let t=e;return t})();function bg(t,e){let i=t.url.toLowerCase();if(!p(fd)||t.method==="GET"||t.method==="HEAD"||i.startsWith("http://")||i.startsWith("https://"))return e(t);let n=p(ts).getToken(),r=p(vg);return n!=null&&!t.headers.has(r)&&(t=t.clone({headers:t.headers.set(r,n)})),e(t)}var sa=function(t){return t[t.Interceptors=0]="Interceptors",t[t.LegacyInterceptors=1]="LegacyInterceptors",t[t.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",t[t.NoXsrfProtection=3]="NoXsrfProtection",t[t.JsonpSupport=4]="JsonpSupport",t[t.RequestsMadeViaParent=5]="RequestsMadeViaParent",t[t.Fetch=6]="Fetch",t}(sa||{});function pd(t,e){return{\u0275kind:t,\u0275providers:e}}function TD(...t){let e=[ra,cd,ad,{provide:Oi,useExisting:ad},{provide:Xr,useFactory:()=>p(og,{optional:!0})??p(cd)},{provide:ns,useValue:bg,multi:!0},{provide:fd,useValue:!0},{provide:ts,useClass:yg}];for(let i of t)e.push(...i.\u0275providers);return He(e)}function CD(t){return pd(sa.Interceptors,t.map(e=>({provide:ns,useValue:e,multi:!0})))}var ld=new O("");function ID(){return pd(sa.LegacyInterceptors,[{provide:ld,useFactory:hg},{provide:ns,useExisting:ld,multi:!0}])}var ca=class extends Ku{constructor(){super(...arguments),this.supportsDOMEvents=!0}},la=class t extends ca{static makeCurrent(){Ju(new t)}onAndCancel(e,i,n){return e.addEventListener(i,n),()=>{e.removeEventListener(i,n)}}dispatchEvent(e,i){e.dispatchEvent(i)}remove(e){e.parentNode&&e.parentNode.removeChild(e)}createElement(e,i){return i=i||this.getDefaultDocument(),i.createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,i){return i==="window"?window:i==="document"?e:i==="body"?e.body:null}getBaseHref(e){let i=Dg();return i==null?null:Eg(i)}resetBaseElement(){Mi=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return qr(document.cookie,e)}},Mi=null;function Dg(){return Mi=Mi||document.querySelector("base"),Mi?Mi.getAttribute("href"):null}function Eg(t){return new URL(t,document.baseURI).pathname}var Tg=(()=>{let e=class e{build(){return new XMLHttpRequest}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:e.\u0275fac});let t=e;return t})(),is=new O(""),vd=(()=>{let e=class e{constructor(n,r){this._zone=r,this._eventNameToPlugin=new Map,n.forEach(s=>{s.manager=this}),this._plugins=n.slice().reverse()}addEventListener(n,r,s){return this._findPluginFor(r).addEventListener(n,r,s)}getZone(){return this._zone}_findPluginFor(n){let r=this._eventNameToPlugin.get(n);if(r)return r;if(r=this._plugins.find(o=>o.supports(n)),!r)throw new U(5101,!1);return this._eventNameToPlugin.set(n,r),r}};e.\u0275fac=function(r){return new(r||e)(T(is),T(H))},e.\u0275prov=w({token:e,factory:e.\u0275fac});let t=e;return t})(),Ni=class{constructor(e){this._doc=e}},oa="ng-app-id",yd=(()=>{let e=class e{constructor(n,r,s,o={}){this.doc=n,this.appId=r,this.nonce=s,this.platformId=o,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=Jr(o),this.resetHostNodes()}addStyles(n){for(let r of n)this.changeUsageCount(r,1)===1&&this.onStyleAdded(r)}removeStyles(n){for(let r of n)this.changeUsageCount(r,-1)<=0&&this.onStyleRemoved(r)}ngOnDestroy(){let n=this.styleNodesInDOM;n&&(n.forEach(r=>r.remove()),n.clear());for(let r of this.getAllStyles())this.onStyleRemoved(r);this.resetHostNodes()}addHost(n){this.hostNodes.add(n);for(let r of this.getAllStyles())this.addStyleToHost(n,r)}removeHost(n){this.hostNodes.delete(n)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(n){for(let r of this.hostNodes)this.addStyleToHost(r,n)}onStyleRemoved(n){let r=this.styleRef;r.get(n)?.elements?.forEach(s=>s.remove()),r.delete(n)}collectServerRenderedStyles(){let n=this.doc.head?.querySelectorAll(`style[${oa}="${this.appId}"]`);if(n?.length){let r=new Map;return n.forEach(s=>{s.textContent!=null&&r.set(s.textContent,s)}),r}return null}changeUsageCount(n,r){let s=this.styleRef;if(s.has(n)){let o=s.get(n);return o.usage+=r,o.usage}return s.set(n,{usage:r,elements:[]}),r}getStyleElement(n,r){let s=this.styleNodesInDOM,o=s?.get(r);if(o?.parentNode===n)return s.delete(r),o.removeAttribute(oa),o;{let a=this.doc.createElement("style");return this.nonce&&a.setAttribute("nonce",this.nonce),a.textContent=r,this.platformIsServer&&a.setAttribute(oa,this.appId),n.appendChild(a),a}}addStyleToHost(n,r){let s=this.getStyleElement(n,r),o=this.styleRef,a=o.get(r)?.elements;a?a.push(s):o.set(r,{elements:[s],usage:1})}resetHostNodes(){let n=this.hostNodes;n.clear(),n.add(this.doc.head)}};e.\u0275fac=function(r){return new(r||e)(T(G),T(Uo),T(jo,8),T(nt))},e.\u0275prov=w({token:e,factory:e.\u0275fac});let t=e;return t})(),aa={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,bd="%COMP%",Cg=`_nghost-${bd}`,Ig=`_ngcontent-${bd}`,Sg=!0,Ag=new O("",{providedIn:"root",factory:()=>Sg});function Og(t){return Ig.replace(da,t)}function Rg(t){return Cg.replace(da,t)}function wd(t,e){return e.map(i=>i.replace(da,t))}var gd=(()=>{let e=class e{constructor(n,r,s,o,a,c,l,u=null){this.eventManager=n,this.sharedStylesHost=r,this.appId=s,this.removeStylesOnCompDestroy=o,this.doc=a,this.platformId=c,this.ngZone=l,this.nonce=u,this.rendererByCompId=new Map,this.platformIsServer=Jr(c),this.defaultRenderer=new ki(n,a,l,this.platformIsServer)}createRenderer(n,r){if(!n||!r)return this.defaultRenderer;this.platformIsServer&&r.encapsulation===bi.ShadowDom&&(r=N(m({},r),{encapsulation:bi.Emulated}));let s=this.getOrCreateRenderer(n,r);return s instanceof rs?s.applyToHost(n):s instanceof xi&&s.applyStyles(),s}getOrCreateRenderer(n,r){let s=this.rendererByCompId,o=s.get(r.id);if(!o){let a=this.doc,c=this.ngZone,l=this.eventManager,u=this.sharedStylesHost,h=this.removeStylesOnCompDestroy,d=this.platformIsServer;switch(r.encapsulation){case bi.Emulated:o=new rs(l,u,r,this.appId,h,a,c,d);break;case bi.ShadowDom:return new ua(l,u,n,r,a,c,this.nonce,d);default:o=new xi(l,u,r,h,a,c,d);break}s.set(r.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}};e.\u0275fac=function(r){return new(r||e)(T(vd),T(yd),T(Uo),T(Ag),T(G),T(nt),T(H),T(jo))},e.\u0275prov=w({token:e,factory:e.\u0275fac});let t=e;return t})(),ki=class{constructor(e,i,n,r){this.eventManager=e,this.doc=i,this.ngZone=n,this.platformIsServer=r,this.data=Object.create(null),this.throwOnSyntheticProps=!0,this.destroyNode=null}destroy(){}createElement(e,i){return i?this.doc.createElementNS(aa[i]||i,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,i){(md(e)?e.content:e).appendChild(i)}insertBefore(e,i,n){e&&(md(e)?e.content:e).insertBefore(i,n)}removeChild(e,i){e&&e.removeChild(i)}selectRootElement(e,i){let n=typeof e=="string"?this.doc.querySelector(e):e;if(!n)throw new U(-5104,!1);return i||(n.textContent=""),n}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,i,n,r){if(r){i=r+":"+i;let s=aa[r];s?e.setAttributeNS(s,i,n):e.setAttribute(i,n)}else e.setAttribute(i,n)}removeAttribute(e,i,n){if(n){let r=aa[n];r?e.removeAttributeNS(r,i):e.removeAttribute(`${n}:${i}`)}else e.removeAttribute(i)}addClass(e,i){e.classList.add(i)}removeClass(e,i){e.classList.remove(i)}setStyle(e,i,n,r){r&(Ei.DashCase|Ei.Important)?e.style.setProperty(i,n,r&Ei.Important?"important":""):e.style[i]=n}removeStyle(e,i,n){n&Ei.DashCase?e.style.removeProperty(i):e.style[i]=""}setProperty(e,i,n){e!=null&&(e[i]=n)}setValue(e,i){e.nodeValue=i}listen(e,i,n){if(typeof e=="string"&&(e=Bn().getGlobalEventTarget(this.doc,e),!e))throw new Error(`Unsupported event target ${e} for event ${i}`);return this.eventManager.addEventListener(e,i,this.decoratePreventDefault(n))}decoratePreventDefault(e){return i=>{if(i==="__ngUnwrap__")return e;(this.platformIsServer?this.ngZone.runGuarded(()=>e(i)):e(i))===!1&&i.preventDefault()}}};function md(t){return t.tagName==="TEMPLATE"&&t.content!==void 0}var ua=class extends ki{constructor(e,i,n,r,s,o,a,c){super(e,s,o,c),this.sharedStylesHost=i,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let l=wd(r.id,r.styles);for(let u of l){let h=document.createElement("style");a&&h.setAttribute("nonce",a),h.textContent=u,this.shadowRoot.appendChild(h)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,i){return super.appendChild(this.nodeOrShadowRoot(e),i)}insertBefore(e,i,n){return super.insertBefore(this.nodeOrShadowRoot(e),i,n)}removeChild(e,i){return super.removeChild(this.nodeOrShadowRoot(e),i)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},xi=class extends ki{constructor(e,i,n,r,s,o,a,c){super(e,s,o,a),this.sharedStylesHost=i,this.removeStylesOnCompDestroy=r,this.styles=c?wd(c,n.styles):n.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}},rs=class extends xi{constructor(e,i,n,r,s,o,a,c){let l=r+"-"+n.id;super(e,i,n,s,o,a,c,l),this.contentAttr=Og(l),this.hostAttr=Rg(l)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,"")}createElement(e,i){let n=super.createElement(e,i);return super.setAttribute(n,this.contentAttr,""),n}},Pg=(()=>{let e=class e extends Ni{constructor(n){super(n)}supports(n){return!0}addEventListener(n,r,s){return n.addEventListener(r,s,!1),()=>this.removeEventListener(n,r,s)}removeEventListener(n,r,s){return n.removeEventListener(r,s)}};e.\u0275fac=function(r){return new(r||e)(T(G))},e.\u0275prov=w({token:e,factory:e.\u0275fac});let t=e;return t})(),Mg=(()=>{let e=class e extends Ni{constructor(n){super(n),this.delegate=p(zu,{optional:!0})}supports(n){return this.delegate?this.delegate.supports(n):!1}addEventListener(n,r,s){return this.delegate.addEventListener(n,r,s)}removeEventListener(n,r,s){return this.delegate.removeEventListener(n,r,s)}};e.\u0275fac=function(r){return new(r||e)(T(G))},e.\u0275prov=w({token:e,factory:e.\u0275fac});let t=e;return t})(),_d=["alt","control","meta","shift"],Ng={"\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"},kg={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey},xg=(()=>{let e=class e extends Ni{constructor(n){super(n)}supports(n){return e.parseEventName(n)!=null}addEventListener(n,r,s){let o=e.parseEventName(r),a=e.eventCallback(o.fullKey,s,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Bn().onAndCancel(n,o.domEventName,a))}static parseEventName(n){let r=n.toLowerCase().split("."),s=r.shift();if(r.length===0||!(s==="keydown"||s==="keyup"))return null;let o=e._normalizeKey(r.pop()),a="",c=r.indexOf("code");if(c>-1&&(r.splice(c,1),a="code."),_d.forEach(u=>{let h=r.indexOf(u);h>-1&&(r.splice(h,1),a+=u+".")}),a+=o,r.length!=0||o.length===0)return null;let l={};return l.domEventName=s,l.fullKey=a,l}static matchEventFullKeyCode(n,r){let s=Ng[n.key]||n.key,o="";return r.indexOf("code.")>-1&&(s=n.code,o="code."),s==null||!s?!1:(s=s.toLowerCase(),s===" "?s="space":s==="."&&(s="dot"),_d.forEach(a=>{if(a!==s){let c=kg[a];c(n)&&(o+=a+".")}}),o+=s,o===r)}static eventCallback(n,r,s){return o=>{e.matchEventFullKeyCode(o,n)&&s.runGuarded(()=>r(o))}}static _normalizeKey(n){return n==="esc"?"escape":n}};e.\u0275fac=function(r){return new(r||e)(T(G))},e.\u0275prov=w({token:e,factory:e.\u0275fac});let t=e;return t})();function KD(t,e){return Gu(m({rootComponent:t},Fg(e)))}function Fg(t){return{appProviders:[...jg,...t?.providers??[]],platformProviders:Ug}}function Lg(){la.makeCurrent()}function Bg(){return new Vo}function Vg(){return wu(document),document}var Ug=[{provide:nt,useValue:Xu},{provide:Du,useValue:Lg,multi:!0},{provide:G,useFactory:Vg,deps:[]}];var jg=[{provide:bu,useValue:"root"},{provide:Vo,useFactory:Bg,deps:[]},{provide:is,useClass:Pg,multi:!0,deps:[G,H,nt]},{provide:is,useClass:xg,multi:!0,deps:[G]},{provide:is,useClass:Mg,multi:!0},gd,yd,vd,{provide:Mu,useExisting:gd},{provide:Kr,useClass:Tg,deps:[]},[]];var Dd=(()=>{let e=class e{constructor(n){this._doc=n}getTitle(){return this._doc.title}setTitle(n){this._doc.title=n||""}};e.\u0275fac=function(r){return new(r||e)(T(G))},e.\u0275prov=w({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var ha=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:function(r){let s=null;return r?s=new(r||e):s=T($g),s},providedIn:"root"});let t=e;return t})(),$g=(()=>{let e=class e extends ha{constructor(n){super(),this._doc=n}sanitize(n,r){if(r==null)return null;switch(n){case pt.NONE:return r;case pt.HTML:return xn(r,"HTML")?kn(r):Ou(this._doc,String(r)).toString();case pt.STYLE:return xn(r,"Style")?kn(r):r;case pt.SCRIPT:if(xn(r,"Script"))return kn(r);throw new U(5200,!1);case pt.URL:return xn(r,"URL")?kn(r):Au(String(r));case pt.RESOURCE_URL:if(xn(r,"ResourceURL"))return kn(r);throw new U(5201,!1);default:throw new U(5202,!1)}}bypassSecurityTrustHtml(n){return Eu(n)}bypassSecurityTrustStyle(n){return Tu(n)}bypassSecurityTrustScript(n){return Cu(n)}bypassSecurityTrustUrl(n){return Iu(n)}bypassSecurityTrustResourceUrl(n){return Su(n)}};e.\u0275fac=function(r){return new(r||e)(T(G))},e.\u0275prov=w({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var S="primary",Qi=Symbol("RouteTitle"),_a=class{constructor(e){this.params=e||{}}has(e){return Object.prototype.hasOwnProperty.call(this.params,e)}get(e){if(this.has(e)){let i=this.params[e];return Array.isArray(i)?i[0]:i}return null}getAll(e){if(this.has(e)){let i=this.params[e];return Array.isArray(i)?i:[i]}return[]}get keys(){return Object.keys(this.params)}};function Gn(t){return new _a(t)}function Gg(t,e,i){let n=i.path.split("/");if(n.length>t.length||i.pathMatch==="full"&&(e.hasChildren()||n.length<t.length))return null;let r={};for(let s=0;s<n.length;s++){let o=n[s],a=t[s];if(o[0]===":")r[o.substring(1)]=a;else if(o!==a.path)return null}return{consumed:t.slice(0,n.length),posParams:r}}function zg(t,e){if(t.length!==e.length)return!1;for(let i=0;i<t.length;++i)if(!st(t[i],e[i]))return!1;return!0}function st(t,e){let i=t?va(t):void 0,n=e?va(e):void 0;if(!i||!n||i.length!=n.length)return!1;let r;for(let s=0;s<i.length;s++)if(r=i[s],!kd(t[r],e[r]))return!1;return!0}function va(t){return[...Object.keys(t),...Object.getOwnPropertySymbols(t)]}function kd(t,e){if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;let i=[...t].sort(),n=[...e].sort();return i.every((r,s)=>n[s]===r)}else return t===e}function xd(t){return t.length>0?t[t.length-1]:null}function zt(t){return ou(t)?t:Hr(t)?Q(Promise.resolve(t)):D(t)}var Wg={exact:Ld,subset:Bd},Fd={exact:qg,subset:Jg,ignored:()=>!0};function Td(t,e,i){return Wg[i.paths](t.root,e.root,i.matrixParams)&&Fd[i.queryParams](t.queryParams,e.queryParams)&&!(i.fragment==="exact"&&t.fragment!==e.fragment)}function qg(t,e){return st(t,e)}function Ld(t,e,i){if(!dn(t.segments,e.segments)||!as(t.segments,e.segments,i)||t.numberOfChildren!==e.numberOfChildren)return!1;for(let n in e.children)if(!t.children[n]||!Ld(t.children[n],e.children[n],i))return!1;return!0}function Jg(t,e){return Object.keys(e).length<=Object.keys(t).length&&Object.keys(e).every(i=>kd(t[i],e[i]))}function Bd(t,e,i){return Vd(t,e,e.segments,i)}function Vd(t,e,i,n){if(t.segments.length>i.length){let r=t.segments.slice(0,i.length);return!(!dn(r,i)||e.hasChildren()||!as(r,i,n))}else if(t.segments.length===i.length){if(!dn(t.segments,i)||!as(t.segments,i,n))return!1;for(let r in e.children)if(!t.children[r]||!Bd(t.children[r],e.children[r],n))return!1;return!0}else{let r=i.slice(0,t.segments.length),s=i.slice(t.segments.length);return!dn(t.segments,r)||!as(t.segments,r,n)||!t.children[S]?!1:Vd(t.children[S],e,s,n)}}function as(t,e,i){return e.every((n,r)=>Fd[i](t[r].parameters,n.parameters))}var wt=class{constructor(e=new L([],{}),i={},n=null){this.root=e,this.queryParams=i,this.fragment=n}get queryParamMap(){return this._queryParamMap??=Gn(this.queryParams),this._queryParamMap}toString(){return Qg.serialize(this)}},L=class{constructor(e,i){this.segments=e,this.children=i,this.parent=null,Object.values(i).forEach(n=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return cs(this)}},un=class{constructor(e,i){this.path=e,this.parameters=i}get parameterMap(){return this._parameterMap??=Gn(this.parameters),this._parameterMap}toString(){return jd(this)}};function Kg(t,e){return dn(t,e)&&t.every((i,n)=>st(i.parameters,e[n].parameters))}function dn(t,e){return t.length!==e.length?!1:t.every((i,n)=>i.path===e[n].path)}function Yg(t,e){let i=[];return Object.entries(t.children).forEach(([n,r])=>{n===S&&(i=i.concat(e(r,n)))}),Object.entries(t.children).forEach(([n,r])=>{n!==S&&(i=i.concat(e(r,n)))}),i}var Zi=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:()=>new zn,providedIn:"root"});let t=e;return t})(),zn=class{parse(e){let i=new ba(e);return new wt(i.parseRootSegment(),i.parseQueryParams(),i.parseFragment())}serialize(e){let i=`/${Fi(e.root,!0)}`,n=em(e.queryParams),r=typeof e.fragment=="string"?`#${Zg(e.fragment)}`:"";return`${i}${n}${r}`}},Qg=new zn;function cs(t){return t.segments.map(e=>jd(e)).join("/")}function Fi(t,e){if(!t.hasChildren())return cs(t);if(e){let i=t.children[S]?Fi(t.children[S],!1):"",n=[];return Object.entries(t.children).forEach(([r,s])=>{r!==S&&n.push(`${r}:${Fi(s,!1)}`)}),n.length>0?`${i}(${n.join("//")})`:i}else{let i=Yg(t,(n,r)=>r===S?[Fi(t.children[S],!1)]:[`${r}:${Fi(n,!1)}`]);return Object.keys(t.children).length===1&&t.children[S]!=null?`${cs(t)}/${i[0]}`:`${cs(t)}/(${i.join("//")})`}}function Ud(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function ss(t){return Ud(t).replace(/%3B/gi,";")}function Zg(t){return encodeURI(t)}function ya(t){return Ud(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function ls(t){return decodeURIComponent(t)}function Cd(t){return ls(t.replace(/\+/g,"%20"))}function jd(t){return`${ya(t.path)}${Xg(t.parameters)}`}function Xg(t){return Object.entries(t).map(([e,i])=>`;${ya(e)}=${ya(i)}`).join("")}function em(t){let e=Object.entries(t).map(([i,n])=>Array.isArray(n)?n.map(r=>`${ss(i)}=${ss(r)}`).join("&"):`${ss(i)}=${ss(n)}`).filter(i=>i);return e.length?`?${e.join("&")}`:""}var tm=/^[^\/()?;#]+/;function fa(t){let e=t.match(tm);return e?e[0]:""}var nm=/^[^\/()?;=#]+/;function im(t){let e=t.match(nm);return e?e[0]:""}var rm=/^[^=?&#]+/;function sm(t){let e=t.match(rm);return e?e[0]:""}var om=/^[^&#]+/;function am(t){let e=t.match(om);return e?e[0]:""}var ba=class{constructor(e){this.url=e,this.remaining=e}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new L([],{}):new L([],this.parseChildren())}parseQueryParams(){let e={};if(this.consumeOptional("?"))do this.parseQueryParam(e);while(this.consumeOptional("&"));return e}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let e=[];for(this.peekStartsWith("(")||e.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),e.push(this.parseSegment());let i={};this.peekStartsWith("/(")&&(this.capture("/"),i=this.parseParens(!0));let n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(e.length>0||Object.keys(i).length>0)&&(n[S]=new L(e,i)),n}parseSegment(){let e=fa(this.remaining);if(e===""&&this.peekStartsWith(";"))throw new U(4009,!1);return this.capture(e),new un(ls(e),this.parseMatrixParams())}parseMatrixParams(){let e={};for(;this.consumeOptional(";");)this.parseParam(e);return e}parseParam(e){let i=im(this.remaining);if(!i)return;this.capture(i);let n="";if(this.consumeOptional("=")){let r=fa(this.remaining);r&&(n=r,this.capture(n))}e[ls(i)]=ls(n)}parseQueryParam(e){let i=sm(this.remaining);if(!i)return;this.capture(i);let n="";if(this.consumeOptional("=")){let o=am(this.remaining);o&&(n=o,this.capture(n))}let r=Cd(i),s=Cd(n);if(e.hasOwnProperty(r)){let o=e[r];Array.isArray(o)||(o=[o],e[r]=o),o.push(s)}else e[r]=s}parseParens(e){let i={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let n=fa(this.remaining),r=this.remaining[n.length];if(r!=="/"&&r!==")"&&r!==";")throw new U(4010,!1);let s;n.indexOf(":")>-1?(s=n.slice(0,n.indexOf(":")),this.capture(s),this.capture(":")):e&&(s=S);let o=this.parseChildren();i[s]=Object.keys(o).length===1?o[S]:new L([],o),this.consumeOptional("//")}return i}peekStartsWith(e){return this.remaining.startsWith(e)}consumeOptional(e){return this.peekStartsWith(e)?(this.remaining=this.remaining.substring(e.length),!0):!1}capture(e){if(!this.consumeOptional(e))throw new U(4011,!1)}};function $d(t){return t.segments.length>0?new L([],{[S]:t}):t}function Hd(t){let e={};for(let[n,r]of Object.entries(t.children)){let s=Hd(r);if(n===S&&s.segments.length===0&&s.hasChildren())for(let[o,a]of Object.entries(s.children))e[o]=a;else(s.segments.length>0||s.hasChildren())&&(e[n]=s)}let i=new L(t.segments,e);return cm(i)}function cm(t){if(t.numberOfChildren===1&&t.children[S]){let e=t.children[S];return new L(t.segments.concat(e.segments),e.children)}return t}function $i(t){return t instanceof wt}function lm(t,e,i=null,n=null){let r=Gd(t);return zd(r,e,i,n)}function Gd(t){let e;function i(s){let o={};for(let c of s.children){let l=i(c);o[c.outlet]=l}let a=new L(s.url,o);return s===t&&(e=a),a}let n=i(t.root),r=$d(n);return e??r}function zd(t,e,i,n){let r=t;for(;r.parent;)r=r.parent;if(e.length===0)return pa(r,r,r,i,n);let s=um(e);if(s.toRoot())return pa(r,r,new L([],{}),i,n);let o=dm(s,r,t),a=o.processChildren?Vi(o.segmentGroup,o.index,s.commands):qd(o.segmentGroup,o.index,s.commands);return pa(r,o.segmentGroup,a,i,n)}function us(t){return typeof t=="object"&&t!=null&&!t.outlets&&!t.segmentPath}function Hi(t){return typeof t=="object"&&t!=null&&t.outlets}function pa(t,e,i,n,r){let s={};n&&Object.entries(n).forEach(([c,l])=>{s[c]=Array.isArray(l)?l.map(u=>`${u}`):`${l}`});let o;t===e?o=i:o=Wd(t,e,i);let a=$d(Hd(o));return new wt(a,s,r)}function Wd(t,e,i){let n={};return Object.entries(t.children).forEach(([r,s])=>{s===e?n[r]=i:n[r]=Wd(s,e,i)}),new L(t.segments,n)}var ds=class{constructor(e,i,n){if(this.isAbsolute=e,this.numberOfDoubleDots=i,this.commands=n,e&&n.length>0&&us(n[0]))throw new U(4003,!1);let r=n.find(Hi);if(r&&r!==xd(n))throw new U(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function um(t){if(typeof t[0]=="string"&&t.length===1&&t[0]==="/")return new ds(!0,0,t);let e=0,i=!1,n=t.reduce((r,s,o)=>{if(typeof s=="object"&&s!=null){if(s.outlets){let a={};return Object.entries(s.outlets).forEach(([c,l])=>{a[c]=typeof l=="string"?l.split("/"):l}),[...r,{outlets:a}]}if(s.segmentPath)return[...r,s.segmentPath]}return typeof s!="string"?[...r,s]:o===0?(s.split("/").forEach((a,c)=>{c==0&&a==="."||(c==0&&a===""?i=!0:a===".."?e++:a!=""&&r.push(a))}),r):[...r,s]},[]);return new ds(i,e,n)}var jn=class{constructor(e,i,n){this.segmentGroup=e,this.processChildren=i,this.index=n}};function dm(t,e,i){if(t.isAbsolute)return new jn(e,!0,0);if(!i)return new jn(e,!1,NaN);if(i.parent===null)return new jn(i,!0,0);let n=us(t.commands[0])?0:1,r=i.segments.length-1+n;return hm(i,r,t.numberOfDoubleDots)}function hm(t,e,i){let n=t,r=e,s=i;for(;s>r;){if(s-=r,n=n.parent,!n)throw new U(4005,!1);r=n.segments.length}return new jn(n,!1,r-s)}function fm(t){return Hi(t[0])?t[0].outlets:{[S]:t}}function qd(t,e,i){if(t??=new L([],{}),t.segments.length===0&&t.hasChildren())return Vi(t,e,i);let n=pm(t,e,i),r=i.slice(n.commandIndex);if(n.match&&n.pathIndex<t.segments.length){let s=new L(t.segments.slice(0,n.pathIndex),{});return s.children[S]=new L(t.segments.slice(n.pathIndex),t.children),Vi(s,0,r)}else return n.match&&r.length===0?new L(t.segments,{}):n.match&&!t.hasChildren()?wa(t,e,i):n.match?Vi(t,0,r):wa(t,e,i)}function Vi(t,e,i){if(i.length===0)return new L(t.segments,{});{let n=fm(i),r={};if(Object.keys(n).some(s=>s!==S)&&t.children[S]&&t.numberOfChildren===1&&t.children[S].segments.length===0){let s=Vi(t.children[S],e,i);return new L(t.segments,s.children)}return Object.entries(n).forEach(([s,o])=>{typeof o=="string"&&(o=[o]),o!==null&&(r[s]=qd(t.children[s],e,o))}),Object.entries(t.children).forEach(([s,o])=>{n[s]===void 0&&(r[s]=o)}),new L(t.segments,r)}}function pm(t,e,i){let n=0,r=e,s={match:!1,pathIndex:0,commandIndex:0};for(;r<t.segments.length;){if(n>=i.length)return s;let o=t.segments[r],a=i[n];if(Hi(a))break;let c=`${a}`,l=n<i.length-1?i[n+1]:null;if(r>0&&c===void 0)break;if(c&&l&&typeof l=="object"&&l.outlets===void 0){if(!Sd(c,l,o))return s;n+=2}else{if(!Sd(c,{},o))return s;n++}r++}return{match:!0,pathIndex:r,commandIndex:n}}function wa(t,e,i){let n=t.segments.slice(0,e),r=0;for(;r<i.length;){let s=i[r];if(Hi(s)){let c=gm(s.outlets);return new L(n,c)}if(r===0&&us(i[0])){let c=t.segments[e];n.push(new un(c.path,Id(i[0]))),r++;continue}let o=Hi(s)?s.outlets[S]:`${s}`,a=r<i.length-1?i[r+1]:null;o&&a&&us(a)?(n.push(new un(o,Id(a))),r+=2):(n.push(new un(o,{})),r++)}return new L(n,{})}function gm(t){let e={};return Object.entries(t).forEach(([i,n])=>{typeof n=="string"&&(n=[n]),n!==null&&(e[i]=wa(new L([],{}),0,n))}),e}function Id(t){let e={};return Object.entries(t).forEach(([i,n])=>e[i]=`${n}`),e}function Sd(t,e,i){return t==i.path&&st(e,i.parameters)}var Ui="imperative",ie=function(t){return t[t.NavigationStart=0]="NavigationStart",t[t.NavigationEnd=1]="NavigationEnd",t[t.NavigationCancel=2]="NavigationCancel",t[t.NavigationError=3]="NavigationError",t[t.RoutesRecognized=4]="RoutesRecognized",t[t.ResolveStart=5]="ResolveStart",t[t.ResolveEnd=6]="ResolveEnd",t[t.GuardsCheckStart=7]="GuardsCheckStart",t[t.GuardsCheckEnd=8]="GuardsCheckEnd",t[t.RouteConfigLoadStart=9]="RouteConfigLoadStart",t[t.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",t[t.ChildActivationStart=11]="ChildActivationStart",t[t.ChildActivationEnd=12]="ChildActivationEnd",t[t.ActivationStart=13]="ActivationStart",t[t.ActivationEnd=14]="ActivationEnd",t[t.Scroll=15]="Scroll",t[t.NavigationSkipped=16]="NavigationSkipped",t}(ie||{}),Le=class{constructor(e,i){this.id=e,this.url=i}},Wn=class extends Le{constructor(e,i,n="imperative",r=null){super(e,i),this.type=ie.NavigationStart,this.navigationTrigger=n,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},Dt=class extends Le{constructor(e,i,n){super(e,i),this.urlAfterRedirects=n,this.type=ie.NavigationEnd}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},Re=function(t){return t[t.Redirect=0]="Redirect",t[t.SupersededByNewNavigation=1]="SupersededByNewNavigation",t[t.NoDataFromResolver=2]="NoDataFromResolver",t[t.GuardRejected=3]="GuardRejected",t}(Re||{}),hs=function(t){return t[t.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",t[t.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",t}(hs||{}),bt=class extends Le{constructor(e,i,n,r){super(e,i),this.reason=n,this.code=r,this.type=ie.NavigationCancel}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},Gt=class extends Le{constructor(e,i,n,r){super(e,i),this.reason=n,this.code=r,this.type=ie.NavigationSkipped}},Gi=class extends Le{constructor(e,i,n,r){super(e,i),this.error=n,this.target=r,this.type=ie.NavigationError}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},fs=class extends Le{constructor(e,i,n,r){super(e,i),this.urlAfterRedirects=n,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 Le{constructor(e,i,n,r){super(e,i),this.urlAfterRedirects=n,this.state=r,this.type=ie.GuardsCheckStart}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Ea=class extends Le{constructor(e,i,n,r,s){super(e,i),this.urlAfterRedirects=n,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})`}},Ta=class extends Le{constructor(e,i,n,r){super(e,i),this.urlAfterRedirects=n,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 Le{constructor(e,i,n,r){super(e,i),this.urlAfterRedirects=n,this.state=r,this.type=ie.ResolveEnd}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Ia=class{constructor(e){this.route=e,this.type=ie.RouteConfigLoadStart}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},Sa=class{constructor(e){this.route=e,this.type=ie.RouteConfigLoadEnd}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},Aa=class{constructor(e){this.snapshot=e,this.type=ie.ChildActivationStart}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Oa=class{constructor(e){this.snapshot=e,this.type=ie.ChildActivationEnd}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Ra=class{constructor(e){this.snapshot=e,this.type=ie.ActivationStart}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Pa=class{constructor(e){this.snapshot=e,this.type=ie.ActivationEnd}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},ps=class{constructor(e,i,n){this.routerEvent=e,this.position=i,this.anchor=n,this.type=ie.Scroll}toString(){let e=this.position?`${this.position[0]}, ${this.position[1]}`:null;return`Scroll(anchor: '${this.anchor}', position: '${e}')`}},zi=class{},qn=class{constructor(e,i){this.url=e,this.navigationBehaviorOptions=i}};function mm(t,e){return t.providers&&!t._injector&&(t._injector=zo(t.providers,e,`Route: ${t.path}`)),t._injector??e}function qe(t){return t.outlet||S}function _m(t,e){let i=t.filter(n=>qe(n)===e);return i.push(...t.filter(n=>qe(n)!==e)),i}function Xi(t){if(!t)return null;if(t.routeConfig?._injector)return t.routeConfig._injector;for(let e=t.parent;e;e=e.parent){let i=e.routeConfig;if(i?._loadedInjector)return i._loadedInjector;if(i?._injector)return i._injector}return null}var Ma=class{get injector(){return Xi(this.route?.snapshot)??this.rootInjector}set injector(e){}constructor(e){this.rootInjector=e,this.outlet=null,this.route=null,this.children=new er(this.rootInjector),this.attachRef=null}},er=(()=>{let e=class e{constructor(n){this.rootInjector=n,this.contexts=new Map}onChildOutletCreated(n,r){let s=this.getOrCreateContext(n);s.outlet=r,this.contexts.set(n,s)}onChildOutletDestroyed(n){let r=this.getContext(n);r&&(r.outlet=null,r.attachRef=null)}onOutletDeactivated(){let n=this.contexts;return this.contexts=new Map,n}onOutletReAttached(n){this.contexts=n}getOrCreateContext(n){let r=this.getContext(n);return r||(r=new Ma(this.rootInjector),this.contexts.set(n,r)),r}getContext(n){return this.contexts.get(n)||null}};e.\u0275fac=function(r){return new(r||e)(T(tt))},e.\u0275prov=w({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),gs=class{constructor(e){this._root=e}get root(){return this._root.value}parent(e){let i=this.pathFromRoot(e);return i.length>1?i[i.length-2]:null}children(e){let i=Na(e,this._root);return i?i.children.map(n=>n.value):[]}firstChild(e){let i=Na(e,this._root);return i&&i.children.length>0?i.children[0].value:null}siblings(e){let i=ka(e,this._root);return i.length<2?[]:i[i.length-2].children.map(r=>r.value).filter(r=>r!==e)}pathFromRoot(e){return ka(e,this._root).map(i=>i.value)}};function Na(t,e){if(t===e.value)return e;for(let i of e.children){let n=Na(t,i);if(n)return n}return null}function ka(t,e){if(t===e.value)return[e];for(let i of e.children){let n=ka(t,i);if(n.length)return n.unshift(e),n}return[]}var Oe=class{constructor(e,i){this.value=e,this.children=i}toString(){return`TreeNode(${this.value})`}};function Un(t){let e={};return t&&t.children.forEach(i=>e[i.value.outlet]=i),e}var ms=class extends gs{constructor(e,i){super(e),this.snapshot=i,Ha(this,e)}toString(){return this.snapshot.toString()}};function Jd(t){let e=vm(t),i=new me([new un("",{})]),n=new me({}),r=new me({}),s=new me({}),o=new me(""),a=new Et(i,n,s,o,r,S,t,e.root);return a.snapshot=e.root,new ms(new Oe(a,[]),e)}function vm(t){let e={},i={},n={},r="",s=new $n([],e,n,r,i,S,t,null,{});return new vs("",new Oe(s,[]))}var Et=class{constructor(e,i,n,r,s,o,a,c){this.urlSubject=e,this.paramsSubject=i,this.queryParamsSubject=n,this.fragmentSubject=r,this.dataSubject=s,this.outlet=o,this.component=a,this._futureSnapshot=c,this.title=this.dataSubject?.pipe(I(l=>l[Qi]))??D(void 0),this.url=e,this.params=i,this.queryParams=n,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(e=>Gn(e))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(I(e=>Gn(e))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function _s(t,e,i="emptyOnly"){let n,{routeConfig:r}=t;return e!==null&&(i==="always"||r?.path===""||!e.component&&!e.routeConfig?.loadComponent)?n={params:m(m({},e.params),t.params),data:m(m({},e.data),t.data),resolve:m(m(m(m({},t.data),e.data),r?.data),t._resolvedData)}:n={params:m({},t.params),data:m({},t.data),resolve:m(m({},t.data),t._resolvedData??{})},r&&Yd(r)&&(n.resolve[Qi]=r.title),n}var $n=class{get title(){return this.data?.[Qi]}constructor(e,i,n,r,s,o,a,c,l){this.url=e,this.params=i,this.queryParams=n,this.fragment=r,this.data=s,this.outlet=o,this.component=a,this.routeConfig=c,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??=Gn(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=Gn(this.queryParams),this._queryParamMap}toString(){let e=this.url.map(n=>n.toString()).join("/"),i=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${e}', path:'${i}')`}},vs=class extends gs{constructor(e,i){super(i),this.url=e,Ha(this,i)}toString(){return Kd(this._root)}};function Ha(t,e){e.value._routerState=t,e.children.forEach(i=>Ha(t,i))}function Kd(t){let e=t.children.length>0?` { ${t.children.map(Kd).join(", ")} } `:"";return`${t.value}${e}`}function ga(t){if(t.snapshot){let e=t.snapshot,i=t._futureSnapshot;t.snapshot=i,st(e.queryParams,i.queryParams)||t.queryParamsSubject.next(i.queryParams),e.fragment!==i.fragment&&t.fragmentSubject.next(i.fragment),st(e.params,i.params)||t.paramsSubject.next(i.params),zg(e.url,i.url)||t.urlSubject.next(i.url),st(e.data,i.data)||t.dataSubject.next(i.data)}else t.snapshot=t._futureSnapshot,t.dataSubject.next(t._futureSnapshot.data)}function xa(t,e){let i=st(t.params,e.params)&&Kg(t.url,e.url),n=!t.parent!=!e.parent;return i&&!n&&(!t.parent||xa(t.parent,e.parent))}function Yd(t){return typeof t.title=="string"||t.title===null}var ym=(()=>{let e=class e{constructor(){this.activated=null,this._activatedRoute=null,this.name=S,this.activateEvents=new $,this.deactivateEvents=new $,this.attachEvents=new $,this.detachEvents=new $,this.parentContexts=p(er),this.location=p(Ur),this.changeDetector=p(vt),this.inputBinder=p(Ds,{optional:!0}),this.supportsBindingToComponentInputs=!0}get activatedComponentRef(){return this.activated}ngOnChanges(n){if(n.name){let{firstChange:r,previousValue:s}=n.name;if(r)return;this.isTrackedInParentContexts(s)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(s)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(n){return this.parentContexts.getContext(n)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let n=this.parentContexts.getContext(this.name);n?.route&&(n.attachRef?this.attach(n.attachRef,n.route):this.activateWith(n.route,n.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 n=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(n.instance),n}attach(n,r){this.activated=n,this._activatedRoute=r,this.location.insert(n.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(n.instance)}deactivate(){if(this.activated){let n=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(n)}}activateWith(n,r){if(this.isActivated)throw new U(4013,!1);this._activatedRoute=n;let s=this.location,a=n.snapshot.component,c=this.parentContexts.getOrCreateContext(this.name).children,l=new Fa(n,c,s.injector);this.activated=s.createComponent(a,{index:s.length,injector:l,environmentInjector:r}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=V({type:e,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[ft]});let t=e;return t})(),Fa=class t{__ngOutletInjector(e){return new t(this.route,this.childContexts,e)}constructor(e,i,n){this.route=e,this.childContexts=i,this.parent=n}get(e,i){return e===Et?this.route:e===er?this.childContexts:this.parent.get(e,i)}},Ds=new O(""),Ad=(()=>{let e=class e{constructor(){this.outletDataSubscriptions=new Map}bindActivatedRouteToOutletComponent(n){this.unsubscribeFromRouteData(n),this.subscribeToRouteData(n)}unsubscribeFromRouteData(n){this.outletDataSubscriptions.get(n)?.unsubscribe(),this.outletDataSubscriptions.delete(n)}subscribeToRouteData(n){let{activatedRoute:r}=n,s=yi([r.queryParams,r.params,r.data]).pipe(ae(([o,a,c],l)=>(c=m(m(m({},o),a),c),l===0?D(c):Promise.resolve(c)))).subscribe(o=>{if(!n.isActivated||!n.activatedComponentRef||n.activatedRoute!==r||r.component===null){this.unsubscribeFromRouteData(n);return}let a=qu(r.component);if(!a){this.unsubscribeFromRouteData(n);return}for(let{templateName:c}of a.inputs)n.activatedComponentRef.setInput(c,o[c])});this.outletDataSubscriptions.set(n,s)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:e.\u0275fac});let t=e;return t})();function bm(t,e,i){let n=Wi(t,e._root,i?i._root:void 0);return new ms(n,e)}function Wi(t,e,i){if(i&&t.shouldReuseRoute(e.value,i.value.snapshot)){let n=i.value;n._futureSnapshot=e.value;let r=wm(t,e,i);return new Oe(n,r)}else{if(t.shouldAttach(e.value)){let s=t.retrieve(e.value);if(s!==null){let o=s.route;return o.value._futureSnapshot=e.value,o.children=e.children.map(a=>Wi(t,a)),o}}let n=Dm(e.value),r=e.children.map(s=>Wi(t,s));return new Oe(n,r)}}function wm(t,e,i){return e.children.map(n=>{for(let r of i.children)if(t.shouldReuseRoute(n.value,r.value.snapshot))return Wi(t,n,r);return Wi(t,n)})}function Dm(t){return new Et(new me(t.url),new me(t.params),new me(t.queryParams),new me(t.fragment),new me(t.data),t.outlet,t.component,t)}var qi=class{constructor(e,i){this.redirectTo=e,this.navigationBehaviorOptions=i}},Qd="ngNavigationCancelingError";function ys(t,e){let{redirectTo:i,navigationBehaviorOptions:n}=$i(e)?{redirectTo:e,navigationBehaviorOptions:void 0}:e,r=Zd(!1,Re.Redirect);return r.url=i,r.navigationBehaviorOptions=n,r}function Zd(t,e){let i=new Error(`NavigationCancelingError: ${t||""}`);return i[Qd]=!0,i.cancellationCode=e,i}function Em(t){return Xd(t)&&$i(t.url)}function Xd(t){return!!t&&t[Qd]}var Tm=(t,e,i,n)=>I(r=>(new La(e,r.targetRouterState,r.currentRouterState,i,n).activate(t),r)),La=class{constructor(e,i,n,r,s){this.routeReuseStrategy=e,this.futureState=i,this.currState=n,this.forwardEvent=r,this.inputBindingEnabled=s}activate(e){let i=this.futureState._root,n=this.currState?this.currState._root:null;this.deactivateChildRoutes(i,n,e),ga(this.futureState.root),this.activateChildRoutes(i,n,e)}deactivateChildRoutes(e,i,n){let r=Un(i);e.children.forEach(s=>{let o=s.value.outlet;this.deactivateRoutes(s,r[o],n),delete r[o]}),Object.values(r).forEach(s=>{this.deactivateRouteAndItsChildren(s,n)})}deactivateRoutes(e,i,n){let r=e.value,s=i?i.value:null;if(r===s)if(r.component){let o=n.getContext(r.outlet);o&&this.deactivateChildRoutes(e,i,o.children)}else this.deactivateChildRoutes(e,i,n);else s&&this.deactivateRouteAndItsChildren(i,n)}deactivateRouteAndItsChildren(e,i){e.value.component&&this.routeReuseStrategy.shouldDetach(e.value.snapshot)?this.detachAndStoreRouteSubtree(e,i):this.deactivateRouteAndOutlet(e,i)}detachAndStoreRouteSubtree(e,i){let n=i.getContext(e.value.outlet),r=n&&e.value.component?n.children:i,s=Un(e);for(let o of Object.values(s))this.deactivateRouteAndItsChildren(o,r);if(n&&n.outlet){let o=n.outlet.detach(),a=n.children.onOutletDeactivated();this.routeReuseStrategy.store(e.value.snapshot,{componentRef:o,route:e,contexts:a})}}deactivateRouteAndOutlet(e,i){let n=i.getContext(e.value.outlet),r=n&&e.value.component?n.children:i,s=Un(e);for(let o of Object.values(s))this.deactivateRouteAndItsChildren(o,r);n&&(n.outlet&&(n.outlet.deactivate(),n.children.onOutletDeactivated()),n.attachRef=null,n.route=null)}activateChildRoutes(e,i,n){let r=Un(i);e.children.forEach(s=>{this.activateRoutes(s,r[s.value.outlet],n),this.forwardEvent(new Pa(s.value.snapshot))}),e.children.length&&this.forwardEvent(new Oa(e.value.snapshot))}activateRoutes(e,i,n){let r=e.value,s=i?i.value:null;if(ga(r),r===s)if(r.component){let o=n.getOrCreateContext(r.outlet);this.activateChildRoutes(e,i,o.children)}else this.activateChildRoutes(e,i,n);else if(r.component){let o=n.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){let a=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),o.children.onOutletReAttached(a.contexts),o.attachRef=a.componentRef,o.route=a.route.value,o.outlet&&o.outlet.attach(a.componentRef,a.route.value),ga(a.route.value),this.activateChildRoutes(e,null,o.children)}else o.attachRef=null,o.route=r,o.outlet&&o.outlet.activateWith(r,o.injector),this.activateChildRoutes(e,null,o.children)}else this.activateChildRoutes(e,null,n)}},bs=class{constructor(e){this.path=e,this.route=this.path[this.path.length-1]}},Hn=class{constructor(e,i){this.component=e,this.route=i}};function Cm(t,e,i){let n=t._root,r=e?e._root:null;return Li(n,r,i,[n.value])}function Im(t){let e=t.routeConfig?t.routeConfig.canActivateChild:null;return!e||e.length===0?null:{node:t,guards:e}}function Kn(t,e){let i=Symbol(),n=e.get(t,i);return n===i?typeof t=="function"&&!vu(t)?t:e.get(t):n}function Li(t,e,i,n,r={canDeactivateChecks:[],canActivateChecks:[]}){let s=Un(e);return t.children.forEach(o=>{Sm(o,s[o.value.outlet],i,n.concat([o.value]),r),delete s[o.value.outlet]}),Object.entries(s).forEach(([o,a])=>ji(a,i.getContext(o),r)),r}function Sm(t,e,i,n,r={canDeactivateChecks:[],canActivateChecks:[]}){let s=t.value,o=e?e.value:null,a=i?i.getContext(t.value.outlet):null;if(o&&s.routeConfig===o.routeConfig){let c=Am(o,s,s.routeConfig.runGuardsAndResolvers);c?r.canActivateChecks.push(new bs(n)):(s.data=o.data,s._resolvedData=o._resolvedData),s.component?Li(t,e,a?a.children:null,n,r):Li(t,e,i,n,r),c&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new Hn(a.outlet.component,o))}else o&&ji(e,a,r),r.canActivateChecks.push(new bs(n)),s.component?Li(t,null,a?a.children:null,n,r):Li(t,null,i,n,r);return r}function Am(t,e,i){if(typeof i=="function")return i(t,e);switch(i){case"pathParamsChange":return!dn(t.url,e.url);case"pathParamsOrQueryParamsChange":return!dn(t.url,e.url)||!st(t.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!xa(t,e)||!st(t.queryParams,e.queryParams);case"paramsChange":default:return!xa(t,e)}}function ji(t,e,i){let n=Un(t),r=t.value;Object.entries(n).forEach(([s,o])=>{r.component?e?ji(o,e.children.getContext(s),i):ji(o,null,i):ji(o,e,i)}),r.component?e&&e.outlet&&e.outlet.isActivated?i.canDeactivateChecks.push(new Hn(e.outlet.component,r)):i.canDeactivateChecks.push(new Hn(null,r)):i.canDeactivateChecks.push(new Hn(null,r))}function tr(t){return typeof t=="function"}function Om(t){return typeof t=="boolean"}function Rm(t){return t&&tr(t.canLoad)}function Pm(t){return t&&tr(t.canActivate)}function Mm(t){return t&&tr(t.canActivateChild)}function Nm(t){return t&&tr(t.canDeactivate)}function km(t){return t&&tr(t.canMatch)}function eh(t){return t instanceof au||t?.name==="EmptyError"}var os=Symbol("INITIAL_VALUE");function Jn(){return ae(t=>yi(t.map(e=>e.pipe(we(1),Fo(os)))).pipe(I(e=>{for(let i of e)if(i!==!0){if(i===os)return os;if(i===!1||xm(i))return i}return!0}),fe(e=>e!==os),we(1)))}function xm(t){return $i(t)||t instanceof qi}function Fm(t,e){return ye(i=>{let{targetSnapshot:n,currentSnapshot:r,guards:{canActivateChecks:s,canDeactivateChecks:o}}=i;return o.length===0&&s.length===0?D(N(m({},i),{guardsResult:!0})):Lm(o,n,r,t).pipe(ye(a=>a&&Om(a)?Bm(n,s,t,e):D(a)),I(a=>N(m({},i),{guardsResult:a})))})}function Lm(t,e,i,n){return Q(t).pipe(ye(r=>Hm(r.component,r.route,i,e,n)),kt(r=>r!==!0,!0))}function Bm(t,e,i,n){return Q(e).pipe(Mt(r=>lu(Um(r.route.parent,n),Vm(r.route,n),$m(t,r.path,i),jm(t,r.route,i))),kt(r=>r!==!0,!0))}function Vm(t,e){return t!==null&&e&&e(new Ra(t)),D(!0)}function Um(t,e){return t!==null&&e&&e(new Aa(t)),D(!0)}function jm(t,e,i){let n=e.routeConfig?e.routeConfig.canActivate:null;if(!n||n.length===0)return D(!0);let r=n.map(s=>Mo(()=>{let o=Xi(e)??i,a=Kn(s,o),c=Pm(a)?a.canActivate(e,t):ke(o,()=>a(e,t));return zt(c).pipe(kt())}));return D(r).pipe(Jn())}function $m(t,e,i){let n=e[e.length-1],s=e.slice(0,e.length-1).reverse().map(o=>Im(o)).filter(o=>o!==null).map(o=>Mo(()=>{let a=o.guards.map(c=>{let l=Xi(o.node)??i,u=Kn(c,l),h=Mm(u)?u.canActivateChild(n,t):ke(l,()=>u(n,t));return zt(h).pipe(kt())});return D(a).pipe(Jn())}));return D(s).pipe(Jn())}function Hm(t,e,i,n,r){let s=e&&e.routeConfig?e.routeConfig.canDeactivate:null;if(!s||s.length===0)return D(!0);let o=s.map(a=>{let c=Xi(e)??r,l=Kn(a,c),u=Nm(l)?l.canDeactivate(t,e,i,n):ke(c,()=>l(t,e,i,n));return zt(u).pipe(kt())});return D(o).pipe(Jn())}function Gm(t,e,i,n){let r=e.canLoad;if(r===void 0||r.length===0)return D(!0);let s=r.map(o=>{let a=Kn(o,t),c=Rm(a)?a.canLoad(e,i):ke(t,()=>a(e,i));return zt(c)});return D(s).pipe(Jn(),th(n))}function th(t){return nu(B(e=>{if(typeof e!="boolean")throw ys(t,e)}),I(e=>e===!0))}function zm(t,e,i,n){let r=e.canMatch;if(!r||r.length===0)return D(!0);let s=r.map(o=>{let a=Kn(o,t),c=km(a)?a.canMatch(e,i):ke(t,()=>a(e,i));return zt(c)});return D(s).pipe(Jn(),th(n))}var Ji=class{constructor(e){this.segmentGroup=e||null}},Ki=class extends Error{constructor(e){super(),this.urlTree=e}};function Vn(t){return an(new Ji(t))}function Wm(t){return an(new U(4e3,!1))}function qm(t){return an(Zd(!1,Re.GuardRejected))}var Ba=class{constructor(e,i){this.urlSerializer=e,this.urlTree=i}lineralizeSegments(e,i){let n=[],r=i.root;for(;;){if(n=n.concat(r.segments),r.numberOfChildren===0)return D(n);if(r.numberOfChildren>1||!r.children[S])return Wm(`${e.redirectTo}`);r=r.children[S]}}applyRedirectCommands(e,i,n,r,s){if(typeof i!="string"){let a=i,{queryParams:c,fragment:l,routeConfig:u,url:h,outlet:d,params:g,data:v,title:E}=r,_=ke(s,()=>a({params:g,data:v,queryParams:c,fragment:l,routeConfig:u,url:h,outlet:d,title:E}));if(_ instanceof wt)throw new Ki(_);i=_}let o=this.applyRedirectCreateUrlTree(i,this.urlSerializer.parse(i),e,n);if(i[0]==="/")throw new Ki(o);return o}applyRedirectCreateUrlTree(e,i,n,r){let s=this.createSegmentGroup(e,i.root,n,r);return new wt(s,this.createQueryParams(i.queryParams,this.urlTree.queryParams),i.fragment)}createQueryParams(e,i){let n={};return Object.entries(e).forEach(([r,s])=>{if(typeof s=="string"&&s[0]===":"){let a=s.substring(1);n[r]=i[a]}else n[r]=s}),n}createSegmentGroup(e,i,n,r){let s=this.createSegments(e,i.segments,n,r),o={};return Object.entries(i.children).forEach(([a,c])=>{o[a]=this.createSegmentGroup(e,c,n,r)}),new L(s,o)}createSegments(e,i,n,r){return i.map(s=>s.path[0]===":"?this.findPosParam(e,s,r):this.findOrReturn(s,n))}findPosParam(e,i,n){let r=n[i.path.substring(1)];if(!r)throw new U(4001,!1);return r}findOrReturn(e,i){let n=0;for(let r of i){if(r.path===e.path)return i.splice(n),r;n++}return e}},Va={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function Jm(t,e,i,n,r){let s=Ga(t,e,i);return s.matched?(n=mm(e,n),zm(n,e,i,r).pipe(I(o=>o===!0?s:m({},Va)))):D(s)}function Ga(t,e,i){if(e.path==="**")return Km(i);if(e.path==="")return e.pathMatch==="full"&&(t.hasChildren()||i.length>0)?m({},Va):{matched:!0,consumedSegments:[],remainingSegments:i,parameters:{},positionalParamSegments:{}};let r=(e.matcher||Gg)(i,t,e);if(!r)return m({},Va);let s={};Object.entries(r.posParams??{}).forEach(([a,c])=>{s[a]=c.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:i.slice(r.consumed.length),parameters:o,positionalParamSegments:r.posParams??{}}}function Km(t){return{matched:!0,parameters:t.length>0?xd(t).parameters:{},consumedSegments:t,remainingSegments:[],positionalParamSegments:{}}}function Od(t,e,i,n){return i.length>0&&Zm(t,i,n)?{segmentGroup:new L(e,Qm(n,new L(i,t.children))),slicedSegments:[]}:i.length===0&&Xm(t,i,n)?{segmentGroup:new L(t.segments,Ym(t,i,n,t.children)),slicedSegments:i}:{segmentGroup:new L(t.segments,t.children),slicedSegments:i}}function Ym(t,e,i,n){let r={};for(let s of i)if(Es(t,e,s)&&!n[qe(s)]){let o=new L([],{});r[qe(s)]=o}return m(m({},n),r)}function Qm(t,e){let i={};i[S]=e;for(let n of t)if(n.path===""&&qe(n)!==S){let r=new L([],{});i[qe(n)]=r}return i}function Zm(t,e,i){return i.some(n=>Es(t,e,n)&&qe(n)!==S)}function Xm(t,e,i){return i.some(n=>Es(t,e,n))}function Es(t,e,i){return(t.hasChildren()||e.length>0)&&i.pathMatch==="full"?!1:i.path===""}function e_(t,e,i,n){return qe(t)!==n&&(n===S||!Es(e,i,t))?!1:Ga(e,t,i).matched}function t_(t,e,i){return e.length===0&&!t.children[i]}var Ua=class{};function n_(t,e,i,n,r,s,o="emptyOnly"){return new ja(t,e,i,n,r,o,s).recognize()}var i_=31,ja=class{constructor(e,i,n,r,s,o,a){this.injector=e,this.configLoader=i,this.rootComponentType=n,this.config=r,this.urlTree=s,this.paramsInheritanceStrategy=o,this.urlSerializer=a,this.applyRedirects=new Ba(this.urlSerializer,this.urlTree),this.absoluteRedirectCount=0,this.allowRedirects=!0}noMatchError(e){return new U(4002,`'${e.segmentGroup}'`)}recognize(){let e=Od(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(e).pipe(I(({children:i,rootSnapshot:n})=>{let r=new Oe(n,i),s=new vs("",r),o=lm(n,[],this.urlTree.queryParams,this.urlTree.fragment);return o.queryParams=this.urlTree.queryParams,s.url=this.urlSerializer.serialize(o),{state:s,tree:o}}))}match(e){let i=new $n([],Object.freeze({}),Object.freeze(m({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),S,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,e,S,i).pipe(I(n=>({children:n,rootSnapshot:i})),_e(n=>{if(n instanceof Ki)return this.urlTree=n.urlTree,this.match(n.urlTree.root);throw n instanceof Ji?this.noMatchError(n):n}))}processSegmentGroup(e,i,n,r,s){return n.segments.length===0&&n.hasChildren()?this.processChildren(e,i,n,s):this.processSegment(e,i,n,n.segments,r,!0,s).pipe(I(o=>o instanceof Oe?[o]:[]))}processChildren(e,i,n,r){let s=[];for(let o of Object.keys(n.children))o==="primary"?s.unshift(o):s.push(o);return Q(s).pipe(Mt(o=>{let a=n.children[o],c=_m(i,o);return this.processSegmentGroup(e,c,a,o,r)}),mu((o,a)=>(o.push(...a),o)),ko(null),gu(),ye(o=>{if(o===null)return Vn(n);let a=nh(o);return r_(a),D(a)}))}processSegment(e,i,n,r,s,o,a){return Q(i).pipe(Mt(c=>this.processSegmentAgainstRoute(c._injector??e,i,c,n,r,s,o,a).pipe(_e(l=>{if(l instanceof Ji)return D(null);throw l}))),kt(c=>!!c),_e(c=>{if(eh(c))return t_(n,r,s)?D(new Ua):Vn(n);throw c}))}processSegmentAgainstRoute(e,i,n,r,s,o,a,c){return e_(n,r,s,o)?n.redirectTo===void 0?this.matchSegmentAgainstRoute(e,r,n,s,o,c):this.allowRedirects&&a?this.expandSegmentAgainstRouteUsingRedirect(e,r,i,n,s,o,c):Vn(r):Vn(r)}expandSegmentAgainstRouteUsingRedirect(e,i,n,r,s,o,a){let{matched:c,parameters:l,consumedSegments:u,positionalParamSegments:h,remainingSegments:d}=Ga(i,r,s);if(!c)return Vn(i);typeof r.redirectTo=="string"&&r.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>i_&&(this.allowRedirects=!1));let g=new $n(s,l,Object.freeze(m({},this.urlTree.queryParams)),this.urlTree.fragment,Rd(r),qe(r),r.component??r._loadedComponent??null,r,Pd(r)),v=_s(g,a,this.paramsInheritanceStrategy);g.params=Object.freeze(v.params),g.data=Object.freeze(v.data);let E=this.applyRedirects.applyRedirectCommands(u,r.redirectTo,h,g,e);return this.applyRedirects.lineralizeSegments(r,E).pipe(ye(_=>this.processSegment(e,n,i,_.concat(d),o,!1,a)))}matchSegmentAgainstRoute(e,i,n,r,s,o){let a=Jm(i,n,r,e,this.urlSerializer);return n.path==="**"&&(i.children={}),a.pipe(ae(c=>c.matched?(e=n._injector??e,this.getChildConfig(e,n,r).pipe(ae(({routes:l})=>{let u=n._loadedInjector??e,{parameters:h,consumedSegments:d,remainingSegments:g}=c,v=new $n(d,h,Object.freeze(m({},this.urlTree.queryParams)),this.urlTree.fragment,Rd(n),qe(n),n.component??n._loadedComponent??null,n,Pd(n)),E=_s(v,o,this.paramsInheritanceStrategy);v.params=Object.freeze(E.params),v.data=Object.freeze(E.data);let{segmentGroup:_,slicedSegments:y}=Od(i,d,g,l);if(y.length===0&&_.hasChildren())return this.processChildren(u,l,_,v).pipe(I(P=>new Oe(v,P)));if(l.length===0&&y.length===0)return D(new Oe(v,[]));let R=qe(n)===s;return this.processSegment(u,l,_,y,R?S:s,!0,v).pipe(I(P=>new Oe(v,P instanceof Oe?[P]:[])))}))):Vn(i)))}getChildConfig(e,i,n){return i.children?D({routes:i.children,injector:e}):i.loadChildren?i._loadedRoutes!==void 0?D({routes:i._loadedRoutes,injector:i._loadedInjector}):Gm(e,i,n,this.urlSerializer).pipe(ye(r=>r?this.configLoader.loadChildren(e,i).pipe(B(s=>{i._loadedRoutes=s.routes,i._loadedInjector=s.injector})):qm(i))):D({routes:[],injector:e})}};function r_(t){t.sort((e,i)=>e.value.outlet===S?-1:i.value.outlet===S?1:e.value.outlet.localeCompare(i.value.outlet))}function s_(t){let e=t.value.routeConfig;return e&&e.path===""}function nh(t){let e=[],i=new Set;for(let n of t){if(!s_(n)){e.push(n);continue}let r=e.find(s=>n.value.routeConfig===s.value.routeConfig);r!==void 0?(r.children.push(...n.children),i.add(r)):e.push(n)}for(let n of i){let r=nh(n.children);e.push(new Oe(n.value,r))}return e.filter(n=>!i.has(n))}function Rd(t){return t.data||{}}function Pd(t){return t.resolve||{}}function o_(t,e,i,n,r,s){return ye(o=>n_(t,e,i,n,o.extractedUrl,r,s).pipe(I(({state:a,tree:c})=>N(m({},o),{targetSnapshot:a,urlAfterRedirects:c}))))}function a_(t,e){return ye(i=>{let{targetSnapshot:n,guards:{canActivateChecks:r}}=i;if(!r.length)return D(i);let s=new Set(r.map(c=>c.route)),o=new Set;for(let c of s)if(!o.has(c))for(let l of ih(c))o.add(l);let a=0;return Q(o).pipe(Mt(c=>s.has(c)?c_(c,n,t,e):(c.data=_s(c,c.parent,t).resolve,D(void 0))),B(()=>a++),xo(1),ye(c=>a===o.size?D(i):Xe))})}function ih(t){let e=t.children.map(i=>ih(i)).flat();return[t,...e]}function c_(t,e,i,n){let r=t.routeConfig,s=t._resolve;return r?.title!==void 0&&!Yd(r)&&(s[Qi]=r.title),l_(s,t,e,n).pipe(I(o=>(t._resolvedData=o,t.data=_s(t,t.parent,i).resolve,null)))}function l_(t,e,i,n){let r=va(t);if(r.length===0)return D({});let s={};return Q(r).pipe(ye(o=>u_(t[o],e,i,n).pipe(kt(),B(a=>{if(a instanceof qi)throw ys(new zn,a);s[o]=a}))),xo(1),hu(s),_e(o=>eh(o)?Xe:an(o)))}function u_(t,e,i,n){let r=Xi(e)??n,s=Kn(t,r),o=s.resolve?s.resolve(e,i):ke(r,()=>s(e,i));return zt(o)}function ma(t){return ae(e=>{let i=t(e);return i?Q(i).pipe(I(()=>e)):D(e)})}var rh=(()=>{let e=class e{buildTitle(n){let r,s=n.root;for(;s!==void 0;)r=this.getResolvedTitleForRoute(s)??r,s=s.children.find(o=>o.outlet===S);return r}getResolvedTitleForRoute(n){return n.data[Qi]}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:()=>p(d_),providedIn:"root"});let t=e;return t})(),d_=(()=>{let e=class e extends rh{constructor(n){super(),this.title=n}updateTitle(n){let r=this.buildTitle(n);r!==void 0&&this.title.setTitle(r)}};e.\u0275fac=function(r){return new(r||e)(T(Dd))},e.\u0275prov=w({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),nr=new O("",{providedIn:"root",factory:()=>({})}),h_=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=ht({type:e,selectors:[["ng-component"]],standalone:!0,features:[_t],decls:1,vars:0,template:function(r,s){r&1&&Lt(0,"router-outlet")},dependencies:[ym],encapsulation:2});let t=e;return t})();function za(t){let e=t.children&&t.children.map(za),i=e?N(m({},t),{children:e}):m({},t);return!i.component&&!i.loadComponent&&(e||i.loadChildren)&&i.outlet&&i.outlet!==S&&(i.component=h_),i}var Yi=new O(""),Wa=(()=>{let e=class e{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=p(zr)}loadComponent(n){if(this.componentLoaders.get(n))return this.componentLoaders.get(n);if(n._loadedComponent)return D(n._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(n);let r=zt(n.loadComponent()).pipe(I(sh),B(o=>{this.onLoadEndListener&&this.onLoadEndListener(n),n._loadedComponent=o}),Nt(()=>{this.componentLoaders.delete(n)})),s=new Ao(r,()=>new F).pipe(So());return this.componentLoaders.set(n,s),s}loadChildren(n,r){if(this.childrenLoaders.get(r))return this.childrenLoaders.get(r);if(r._loadedRoutes)return D({routes:r._loadedRoutes,injector:r._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(r);let o=f_(r,this.compiler,n,this.onLoadEndListener).pipe(Nt(()=>{this.childrenLoaders.delete(r)})),a=new Ao(o,()=>new F).pipe(So());return this.childrenLoaders.set(r,a),a}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function f_(t,e,i,n){return zt(t.loadChildren()).pipe(I(sh),ye(r=>r instanceof ku||Array.isArray(r)?D(r):Q(e.compileModuleAsync(r))),I(r=>{n&&n(t);let s,o,a=!1;return Array.isArray(r)?(o=r,a=!0):(s=r.create(i).injector,o=s.get(Yi,[],{optional:!0,self:!0}).flat()),{routes:o.map(za),injector:s}}))}function p_(t){return t&&typeof t=="object"&&"default"in t}function sh(t){return p_(t)?t.default:t}var qa=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:()=>p(g_),providedIn:"root"});let t=e;return t})(),g_=(()=>{let e=class e{shouldProcessUrl(n){return!0}extract(n){return n}merge(n,r){return n}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),oh=new O(""),ah=new O("");function m_(t,e,i){let n=t.get(ah),r=t.get(G);return t.get(H).runOutsideAngular(()=>{if(!r.startViewTransition||n.skipNextTransition)return n.skipNextTransition=!1,new Promise(l=>setTimeout(l));let s,o=new Promise(l=>{s=l}),a=r.startViewTransition(()=>(s(),__(t))),{onViewTransitionCreated:c}=n;return c&&ke(t,()=>c({transition:a,from:e,to:i})),o})}function __(t){return new Promise(e=>{Nu({read:()=>setTimeout(e)},{injector:t})})}var v_=new O(""),Ja=(()=>{let e=class e{get hasRequestedNavigation(){return this.navigationId!==0}constructor(){this.currentNavigation=null,this.currentTransition=null,this.lastSuccessfulNavigation=null,this.events=new F,this.transitionAbortSubject=new F,this.configLoader=p(Wa),this.environmentInjector=p(tt),this.urlSerializer=p(Zi),this.rootContexts=p(er),this.location=p(Si),this.inputBindingEnabled=p(Ds,{optional:!0})!==null,this.titleStrategy=p(rh),this.options=p(nr,{optional:!0})||{},this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlHandlingStrategy=p(qa),this.createViewTransition=p(oh,{optional:!0}),this.navigationErrorHandler=p(v_,{optional:!0}),this.navigationId=0,this.afterPreactivation=()=>D(void 0),this.rootComponentType=null;let n=s=>this.events.next(new Ia(s)),r=s=>this.events.next(new Sa(s));this.configLoader.onLoadEndListener=r,this.configLoader.onLoadStartListener=n}complete(){this.transitions?.complete()}handleNavigationRequest(n){let r=++this.navigationId;this.transitions?.next(N(m(m({},this.transitions.value),n),{id:r}))}setupNavigations(n,r,s){return this.transitions=new me({id:0,currentUrlTree:r,currentRawUrl:r,extractedUrl:this.urlHandlingStrategy.extract(r),urlAfterRedirects:this.urlHandlingStrategy.extract(r),rawUrl:r,extras:{},resolve:()=>{},reject:()=>{},promise:Promise.resolve(!0),source:Ui,restoredState:null,currentSnapshot:s.snapshot,targetSnapshot:null,currentRouterState:s,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(fe(o=>o.id!==0),I(o=>N(m({},o),{extractedUrl:this.urlHandlingStrategy.extract(o.rawUrl)})),ae(o=>{let a=!1,c=!1;return D(o).pipe(ae(l=>{if(this.navigationId>o.id)return this.cancelNavigationTransition(o,"",Re.SupersededByNewNavigation),Xe;this.currentTransition=o,this.currentNavigation={id:l.id,initialUrl:l.rawUrl,extractedUrl:l.extractedUrl,targetBrowserUrl:typeof l.extras.browserUrl=="string"?this.urlSerializer.parse(l.extras.browserUrl):l.extras.browserUrl,trigger:l.source,extras:l.extras,previousNavigation:this.lastSuccessfulNavigation?N(m({},this.lastSuccessfulNavigation),{previousNavigation:null}):null};let u=!n.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),h=l.extras.onSameUrlNavigation??n.onSameUrlNavigation;if(!u&&h!=="reload"){let d="";return this.events.next(new Gt(l.id,this.urlSerializer.serialize(l.rawUrl),d,hs.IgnoredSameUrlNavigation)),l.resolve(!1),Xe}if(this.urlHandlingStrategy.shouldProcessUrl(l.rawUrl))return D(l).pipe(ae(d=>{let g=this.transitions?.getValue();return this.events.next(new Wn(d.id,this.urlSerializer.serialize(d.extractedUrl),d.source,d.restoredState)),g!==this.transitions?.getValue()?Xe:Promise.resolve(d)}),o_(this.environmentInjector,this.configLoader,this.rootComponentType,n.config,this.urlSerializer,this.paramsInheritanceStrategy),B(d=>{o.targetSnapshot=d.targetSnapshot,o.urlAfterRedirects=d.urlAfterRedirects,this.currentNavigation=N(m({},this.currentNavigation),{finalUrl:d.urlAfterRedirects});let g=new fs(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(g)}));if(u&&this.urlHandlingStrategy.shouldProcessUrl(l.currentRawUrl)){let{id:d,extractedUrl:g,source:v,restoredState:E,extras:_}=l,y=new Wn(d,this.urlSerializer.serialize(g),v,E);this.events.next(y);let R=Jd(this.rootComponentType).snapshot;return this.currentTransition=o=N(m({},l),{targetSnapshot:R,urlAfterRedirects:g,extras:N(m({},_),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.finalUrl=g,D(o)}else{let d="";return this.events.next(new Gt(l.id,this.urlSerializer.serialize(l.extractedUrl),d,hs.IgnoredByUrlHandlingStrategy)),l.resolve(!1),Xe}}),B(l=>{let u=new Da(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot);this.events.next(u)}),I(l=>(this.currentTransition=o=N(m({},l),{guards:Cm(l.targetSnapshot,l.currentSnapshot,this.rootContexts)}),o)),Fm(this.environmentInjector,l=>this.events.next(l)),B(l=>{if(o.guardsResult=l.guardsResult,l.guardsResult&&typeof l.guardsResult!="boolean")throw ys(this.urlSerializer,l.guardsResult);let u=new Ea(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot,!!l.guardsResult);this.events.next(u)}),fe(l=>l.guardsResult?!0:(this.cancelNavigationTransition(l,"",Re.GuardRejected),!1)),ma(l=>{if(l.guards.canActivateChecks.length)return D(l).pipe(B(u=>{let h=new Ta(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(h)}),ae(u=>{let h=!1;return D(u).pipe(a_(this.paramsInheritanceStrategy,this.environmentInjector),B({next:()=>h=!0,complete:()=>{h||this.cancelNavigationTransition(u,"",Re.NoDataFromResolver)}}))}),B(u=>{let h=new Ca(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(h)}))}),ma(l=>{let u=h=>{let d=[];h.routeConfig?.loadComponent&&!h.routeConfig._loadedComponent&&d.push(this.configLoader.loadComponent(h.routeConfig).pipe(B(g=>{h.component=g}),I(()=>{})));for(let g of h.children)d.push(...u(g));return d};return yi(u(l.targetSnapshot.root)).pipe(ko(null),we(1))}),ma(()=>this.afterPreactivation()),ae(()=>{let{currentSnapshot:l,targetSnapshot:u}=o,h=this.createViewTransition?.(this.environmentInjector,l.root,u.root);return h?Q(h).pipe(I(()=>o)):D(o)}),I(l=>{let u=bm(n.routeReuseStrategy,l.targetSnapshot,l.currentRouterState);return this.currentTransition=o=N(m({},l),{targetRouterState:u}),this.currentNavigation.targetRouterState=u,o}),B(()=>{this.events.next(new zi)}),Tm(this.rootContexts,n.routeReuseStrategy,l=>this.events.next(l),this.inputBindingEnabled),we(1),B({next:l=>{a=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new Dt(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects))),this.titleStrategy?.updateTitle(l.targetRouterState.snapshot),l.resolve(!0)},complete:()=>{a=!0}}),J(this.transitionAbortSubject.pipe(B(l=>{throw l}))),Nt(()=>{!a&&!c&&this.cancelNavigationTransition(o,"",Re.SupersededByNewNavigation),this.currentTransition?.id===o.id&&(this.currentNavigation=null,this.currentTransition=null)}),_e(l=>{if(c=!0,Xd(l))this.events.next(new bt(o.id,this.urlSerializer.serialize(o.extractedUrl),l.message,l.cancellationCode)),Em(l)?this.events.next(new qn(l.url,l.navigationBehaviorOptions)):o.resolve(!1);else{let u=new Gi(o.id,this.urlSerializer.serialize(o.extractedUrl),l,o.targetSnapshot??void 0);try{let h=ke(this.environmentInjector,()=>this.navigationErrorHandler?.(u));if(h instanceof qi){let{message:d,cancellationCode:g}=ys(this.urlSerializer,h);this.events.next(new bt(o.id,this.urlSerializer.serialize(o.extractedUrl),d,g)),this.events.next(new qn(h.redirectTo,h.navigationBehaviorOptions))}else{this.events.next(u);let d=n.errorHandler(l);o.resolve(!!d)}}catch(h){this.options.resolveNavigationPromiseOnError?o.resolve(!1):o.reject(h)}}return Xe}))}))}cancelNavigationTransition(n,r,s){let o=new bt(n.id,this.urlSerializer.serialize(n.extractedUrl),r,s);this.events.next(o),n.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let n=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),r=this.currentNavigation?.targetBrowserUrl??this.currentNavigation?.extractedUrl;return n.toString()!==r?.toString()&&!this.currentNavigation?.extras.skipLocationChange}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function y_(t){return t!==Ui}var b_=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:()=>p(w_),providedIn:"root"});let t=e;return t})(),$a=class{shouldDetach(e){return!1}store(e,i){}shouldAttach(e){return!1}retrieve(e){return null}shouldReuseRoute(e,i){return e.routeConfig===i.routeConfig}},w_=(()=>{let e=class e extends $a{};e.\u0275fac=(()=>{let n;return function(s){return(n||(n=Ft(e)))(s||e)}})(),e.\u0275prov=w({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),ch=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:()=>p(D_),providedIn:"root"});let t=e;return t})(),D_=(()=>{let e=class e extends ch{constructor(){super(...arguments),this.location=p(Si),this.urlSerializer=p(Zi),this.options=p(nr,{optional:!0})||{},this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.urlHandlingStrategy=p(qa),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.currentUrlTree=new wt,this.rawUrlTree=this.currentUrlTree,this.currentPageId=0,this.lastSuccessfulId=-1,this.routerState=Jd(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(n){return this.location.subscribe(r=>{r.type==="popstate"&&n(r.url,r.state)})}handleRouterEvent(n,r){if(n instanceof Wn)this.stateMemento=this.createStateMemento();else if(n instanceof Gt)this.rawUrlTree=r.initialUrl;else if(n instanceof fs){if(this.urlUpdateStrategy==="eager"&&!r.extras.skipLocationChange){let s=this.urlHandlingStrategy.merge(r.finalUrl,r.initialUrl);this.setBrowserUrl(r.targetBrowserUrl??s,r)}}else n instanceof zi?(this.currentUrlTree=r.finalUrl,this.rawUrlTree=this.urlHandlingStrategy.merge(r.finalUrl,r.initialUrl),this.routerState=r.targetRouterState,this.urlUpdateStrategy==="deferred"&&!r.extras.skipLocationChange&&this.setBrowserUrl(r.targetBrowserUrl??this.rawUrlTree,r)):n instanceof bt&&(n.code===Re.GuardRejected||n.code===Re.NoDataFromResolver)?this.restoreHistory(r):n instanceof Gi?this.restoreHistory(r,!0):n instanceof Dt&&(this.lastSuccessfulId=n.id,this.currentPageId=this.browserPageId)}setBrowserUrl(n,r){let s=n instanceof wt?this.urlSerializer.serialize(n):n;if(this.location.isCurrentPathEqualTo(s)||r.extras.replaceUrl){let o=this.browserPageId,a=m(m({},r.extras.state),this.generateNgRouterState(r.id,o));this.location.replaceState(s,"",a)}else{let o=m(m({},r.extras.state),this.generateNgRouterState(r.id,this.browserPageId+1));this.location.go(s,"",o)}}restoreHistory(n,r=!1){if(this.canceledNavigationResolution==="computed"){let s=this.browserPageId,o=this.currentPageId-s;o!==0?this.location.historyGo(o):this.currentUrlTree===n.finalUrl&&o===0&&(this.resetState(n),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(r&&this.resetState(n),this.resetUrlToCurrentUrlTree())}resetState(n){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,n.finalUrl??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(n,r){return this.canceledNavigationResolution==="computed"?{navigationId:n,\u0275routerPageId:r}:{navigationId:n}}};e.\u0275fac=(()=>{let n;return function(s){return(n||(n=Ft(e)))(s||e)}})(),e.\u0275prov=w({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Bi=function(t){return t[t.COMPLETE=0]="COMPLETE",t[t.FAILED=1]="FAILED",t[t.REDIRECTING=2]="REDIRECTING",t}(Bi||{});function lh(t,e){t.events.pipe(fe(i=>i instanceof Dt||i instanceof bt||i instanceof Gi||i instanceof Gt),I(i=>i instanceof Dt||i instanceof Gt?Bi.COMPLETE:(i instanceof bt?i.code===Re.Redirect||i.code===Re.SupersededByNewNavigation:!1)?Bi.REDIRECTING:Bi.FAILED),fe(i=>i!==Bi.REDIRECTING),we(1)).subscribe(()=>{e()})}function E_(t){throw t}var T_={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},C_={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},ot=(()=>{let e=class e{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=p($r),this.stateManager=p(ch),this.options=p(nr,{optional:!0})||{},this.pendingTasks=p(Di),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.navigationTransitions=p(Ja),this.urlSerializer=p(Zi),this.location=p(Si),this.urlHandlingStrategy=p(qa),this._events=new F,this.errorHandler=this.options.errorHandler||E_,this.navigated=!1,this.routeReuseStrategy=p(b_),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.config=p(Yi,{optional:!0})?.flat()??[],this.componentInputBindingEnabled=!!p(Ds,{optional:!0}),this.eventsSubscription=new tu,this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe({error:n=>{this.console.warn(n)}}),this.subscribeToNavigationEvents()}subscribeToNavigationEvents(){let n=this.navigationTransitions.events.subscribe(r=>{try{let s=this.navigationTransitions.currentTransition,o=this.navigationTransitions.currentNavigation;if(s!==null&&o!==null){if(this.stateManager.handleRouterEvent(r,o),r instanceof bt&&r.code!==Re.Redirect&&r.code!==Re.SupersededByNewNavigation)this.navigated=!0;else if(r instanceof Dt)this.navigated=!0;else if(r instanceof qn){let a=r.navigationBehaviorOptions,c=this.urlHandlingStrategy.merge(r.url,s.currentRawUrl),l=m({browserUrl:s.extras.browserUrl,info:s.extras.info,skipLocationChange:s.extras.skipLocationChange,replaceUrl:s.extras.replaceUrl||this.urlUpdateStrategy==="eager"||y_(s.source)},a);this.scheduleNavigation(c,Ui,null,l,{resolve:s.resolve,reject:s.reject,promise:s.promise})}}S_(r)&&this._events.next(r)}catch(s){this.navigationTransitions.transitionAbortSubject.next(s)}});this.eventsSubscription.add(n)}resetRootComponentType(n){this.routerState.root.component=n,this.navigationTransitions.rootComponentType=n}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),Ui,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((n,r)=>{setTimeout(()=>{this.navigateToSyncWithBrowser(n,"popstate",r)},0)})}navigateToSyncWithBrowser(n,r,s){let o={replaceUrl:!0},a=s?.navigationId?s:null;if(s){let l=m({},s);delete l.navigationId,delete l.\u0275routerPageId,Object.keys(l).length!==0&&(o.state=l)}let c=this.parseUrl(n);this.scheduleNavigation(c,r,a,o)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(n){this.config=n.map(za),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(n,r={}){let{relativeTo:s,queryParams:o,fragment:a,queryParamsHandling:c,preserveFragment:l}=r,u=l?this.currentUrlTree.fragment:a,h=null;switch(c){case"merge":h=m(m({},this.currentUrlTree.queryParams),o);break;case"preserve":h=this.currentUrlTree.queryParams;break;default:h=o||null}h!==null&&(h=this.removeEmptyProps(h));let d;try{let g=s?s.snapshot:this.routerState.snapshot.root;d=Gd(g)}catch{(typeof n[0]!="string"||n[0][0]!=="/")&&(n=[]),d=this.currentUrlTree.root}return zd(d,n,h,u??null)}navigateByUrl(n,r={skipLocationChange:!1}){let s=$i(n)?n:this.parseUrl(n),o=this.urlHandlingStrategy.merge(s,this.rawUrlTree);return this.scheduleNavigation(o,Ui,null,r)}navigate(n,r={skipLocationChange:!1}){return I_(n),this.navigateByUrl(this.createUrlTree(n,r),r)}serializeUrl(n){return this.urlSerializer.serialize(n)}parseUrl(n){try{return this.urlSerializer.parse(n)}catch{return this.urlSerializer.parse("/")}}isActive(n,r){let s;if(r===!0?s=m({},T_):r===!1?s=m({},C_):s=r,$i(n))return Td(this.currentUrlTree,n,s);let o=this.parseUrl(n);return Td(this.currentUrlTree,o,s)}removeEmptyProps(n){return Object.entries(n).reduce((r,[s,o])=>(o!=null&&(r[s]=o),r),{})}scheduleNavigation(n,r,s,o,a){if(this.disposed)return Promise.resolve(!1);let c,l,u;a?(c=a.resolve,l=a.reject,u=a.promise):u=new Promise((d,g)=>{c=d,l=g});let h=this.pendingTasks.add();return lh(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(h))}),this.navigationTransitions.handleNavigationRequest({source:r,restoredState:s,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:n,extras:o,resolve:c,reject:l,promise:u,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),u.catch(d=>Promise.reject(d))}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function I_(t){for(let e=0;e<t.length;e++)if(t[e]==null)throw new U(4008,!1)}function S_(t){return!(t instanceof zi)&&!(t instanceof qn)}var ws=class{};var A_=(()=>{let e=class e{constructor(n,r,s,o,a){this.router=n,this.injector=s,this.preloadingStrategy=o,this.loader=a}setUpPreloading(){this.subscription=this.router.events.pipe(fe(n=>n instanceof Dt),Mt(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(n,r){let s=[];for(let o of r){o.providers&&!o._injector&&(o._injector=zo(o.providers,n,`Route: ${o.path}`));let a=o._injector??n,c=o._loadedInjector??a;(o.loadChildren&&!o._loadedRoutes&&o.canLoad===void 0||o.loadComponent&&!o._loadedComponent)&&s.push(this.preloadConfig(a,o)),(o.children||o._loadedRoutes)&&s.push(this.processRoutes(c,o.children??o._loadedRoutes))}return Q(s).pipe(Po())}preloadConfig(n,r){return this.preloadingStrategy.preload(r,()=>{let s;r.loadChildren&&r.canLoad===void 0?s=this.loader.loadChildren(n,r):s=D(null);let o=s.pipe(ye(a=>a===null?D(void 0):(r._loadedRoutes=a.routes,r._loadedInjector=a.injector,this.processRoutes(a.injector??n,a.routes))));if(r.loadComponent&&!r._loadedComponent){let a=this.loader.loadComponent(r);return Q([o,a]).pipe(Po())}else return o})}};e.\u0275fac=function(r){return new(r||e)(T(ot),T(zr),T(tt),T(ws),T(Wa))},e.\u0275prov=w({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),uh=new O(""),O_=(()=>{let e=class e{constructor(n,r,s,o,a={}){this.urlSerializer=n,this.transitions=r,this.viewportScroller=s,this.zone=o,this.options=a,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},a.scrollPositionRestoration||="disabled",a.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(n=>{n instanceof Wn?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=n.navigationTrigger,this.restoredId=n.restoredState?n.restoredState.navigationId:0):n instanceof Dt?(this.lastId=n.id,this.scheduleScrollEvent(n,this.urlSerializer.parse(n.urlAfterRedirects).fragment)):n instanceof Gt&&n.code===hs.IgnoredSameUrlNavigation&&(this.lastSource=void 0,this.restoredId=0,this.scheduleScrollEvent(n,this.urlSerializer.parse(n.url).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(n=>{n instanceof ps&&(n.position?this.options.scrollPositionRestoration==="top"?this.viewportScroller.scrollToPosition([0,0]):this.options.scrollPositionRestoration==="enabled"&&this.viewportScroller.scrollToPosition(n.position):n.anchor&&this.options.anchorScrolling==="enabled"?this.viewportScroller.scrollToAnchor(n.anchor):this.options.scrollPositionRestoration!=="disabled"&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(n,r){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new ps(n,this.lastSource==="popstate"?this.store[this.restoredId]:null,r))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}};e.\u0275fac=function(r){Ru()},e.\u0275prov=w({token:e,factory:e.\u0275fac});let t=e;return t})();function mE(t,...e){return He([{provide:Yi,multi:!0,useValue:t},[],{provide:Et,useFactory:dh,deps:[ot]},{provide:Gr,multi:!0,useFactory:hh},e.map(i=>i.\u0275providers)])}function dh(t){return t.routerState.root}function ir(t,e){return{\u0275kind:t,\u0275providers:e}}function hh(){let t=p(ne);return e=>{let i=t.get(it);if(e!==i.components[0])return;let n=t.get(ot),r=t.get(fh);t.get(Ka)===1&&n.initialNavigation(),t.get(ph,null,Lo.Optional)?.setUpPreloading(),t.get(uh,null,Lo.Optional)?.init(),n.resetRootComponentType(i.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}var fh=new O("",{factory:()=>new F}),Ka=new O("",{providedIn:"root",factory:()=>1});function R_(){return ir(2,[{provide:Ka,useValue:0},{provide:qo,multi:!0,deps:[ne],useFactory:e=>{let i=e.get(Yu,Promise.resolve());return()=>i.then(()=>new Promise(n=>{let r=e.get(ot),s=e.get(fh);lh(r,()=>{n(!0)}),e.get(Ja).afterPreactivation=()=>(n(!0),s.closed?D(void 0):s),r.initialNavigation()}))}}])}function P_(){return ir(3,[{provide:qo,multi:!0,useFactory:()=>{let e=p(ot);return()=>{e.setUpLocationChangeListener()}}},{provide:Ka,useValue:2}])}var ph=new O("");function M_(t){return ir(0,[{provide:ph,useExisting:A_},{provide:ws,useExisting:t}])}function N_(){return ir(8,[Ad,{provide:Ds,useExisting:Ad}])}function k_(t){let e=[{provide:oh,useValue:m_},{provide:ah,useValue:m({skipNextTransition:!!t?.skipInitialTransition},t)}];return ir(9,e)}var Md=new O("ROUTER_FORROOT_GUARD"),x_=[Si,{provide:Zi,useClass:zn},ot,er,{provide:Et,useFactory:dh,deps:[ot]},Wa,[]],_E=(()=>{let e=class e{constructor(n){}static forRoot(n,r){return{ngModule:e,providers:[x_,[],{provide:Yi,multi:!0,useValue:n},{provide:Md,useFactory:V_,deps:[[ot,new et,new yu]]},{provide:nr,useValue:r||{}},r?.useHash?L_():B_(),F_(),r?.preloadingStrategy?M_(r.preloadingStrategy).\u0275providers:[],r?.initialNavigation?U_(r):[],r?.bindToComponentInputs?N_().\u0275providers:[],r?.enableViewTransitions?k_().\u0275providers:[],j_()]}}static forChild(n){return{ngModule:e,providers:[{provide:Yi,multi:!0,useValue:n}]}}};e.\u0275fac=function(r){return new(r||e)(T(Md,8))},e.\u0275mod=Ne({type:e}),e.\u0275inj=Me({});let t=e;return t})();function F_(){return{provide:uh,useFactory:()=>{let t=p(ed),e=p(H),i=p(nr),n=p(Ja),r=p(Zi);return i.scrollOffset&&t.setOffset(i.scrollOffset),new O_(r,n,t,e,i)}}}function L_(){return{provide:Ko,useClass:Zu}}function B_(){return{provide:Ko,useClass:Qu}}function V_(t){return"guarded"}function U_(t){return[t.initialNavigation==="disabled"?P_().\u0275providers:[],t.initialNavigation==="enabledBlocking"?R_().\u0275providers:[]]}var Nd=new O("");function j_(){return[{provide:Nd,useFactory:hh},{provide:Gr,multi:!0,useExisting:Nd}]}var bE={production:!0,firebaseConfig:{apiKey:"AIzaSyDnnitFXpM8TglWKNpzu4ChgF98n25Rgvw",authDomain:"auth.dealpos.com",projectId:"devops-signin",storageBucket:"devops-signin.appspot.com",messagingSenderId:"412465165194",appId:"1:412465165194:web:03d806f6b6ab6f8b460e73",measurementId:"G-MNDBRJ5XZD"},version:"1.7.1"};var gh=["toast-component",""];function $_(t,e){if(t&1){let i=jr();Te(0,"button",5),Ce("click",function(){Lr(i);let r=ce();return Br(r.remove())}),Te(1,"span",6),Fe(2,"\xD7"),xe()()}}function H_(t,e){if(t&1&&(Ti(0),Fe(1),Ci()),t&2){let i=ce(2);K(),Vt("[",i.duplicatesCount+1,"]")}}function G_(t,e){if(t&1&&(Te(0,"div"),Fe(1),cn(2,H_,2,1,"ng-container",4),xe()),t&2){let i=ce();Ee(i.options.titleClass),Ae("aria-label",i.title),K(),Vt(" ",i.title," "),K(),pe("ngIf",i.duplicatesCount)}}function z_(t,e){if(t&1&&Lt(0,"div",7),t&2){let i=ce();Ee(i.options.messageClass),pe("innerHTML",i.message,$o)}}function W_(t,e){if(t&1&&(Te(0,"div",8),Fe(1),xe()),t&2){let i=ce();Ee(i.options.messageClass),Ae("aria-label",i.message),K(),Vt(" ",i.message," ")}}function q_(t,e){if(t&1&&(Te(0,"div"),Lt(1,"div",9),xe()),t&2){let i=ce();K(),Fn("width",i.width()+"%")}}function J_(t,e){if(t&1){let i=jr();Te(0,"button",5),Ce("click",function(){Lr(i);let r=ce();return Br(r.remove())}),Te(1,"span",6),Fe(2,"\xD7"),xe()()}}function K_(t,e){if(t&1&&(Ti(0),Fe(1),Ci()),t&2){let i=ce(2);K(),Vt("[",i.duplicatesCount+1,"]")}}function Y_(t,e){if(t&1&&(Te(0,"div"),Fe(1),cn(2,K_,2,1,"ng-container",4),xe()),t&2){let i=ce();Ee(i.options.titleClass),Ae("aria-label",i.title),K(),Vt(" ",i.title," "),K(),pe("ngIf",i.duplicatesCount)}}function Q_(t,e){if(t&1&&Lt(0,"div",7),t&2){let i=ce();Ee(i.options.messageClass),pe("innerHTML",i.message,$o)}}function Z_(t,e){if(t&1&&(Te(0,"div",8),Fe(1),xe()),t&2){let i=ce();Ee(i.options.messageClass),Ae("aria-label",i.message),K(),Vt(" ",i.message," ")}}function X_(t,e){if(t&1&&(Te(0,"div"),Lt(1,"div",9),xe()),t&2){let i=ce();K(),Fn("width",i.width()+"%")}}var Ya=class{_attachedHost;component;viewContainerRef;injector;constructor(e,i){this.component=e,this.injector=i}attach(e,i){return this._attachedHost=e,e.attach(this,i)}detach(){let e=this._attachedHost;if(e)return this._attachedHost=void 0,e.detach()}get isAttached(){return this._attachedHost!=null}setAttachedHost(e){this._attachedHost=e}},Qa=class{_attachedPortal;_disposeFn;attach(e,i){return this._attachedPortal=e,this.attachComponentPortal(e,i)}detach(){this._attachedPortal&&this._attachedPortal.setAttachedHost(),this._attachedPortal=void 0,this._disposeFn&&(this._disposeFn(),this._disposeFn=void 0)}setDisposeFn(e){this._disposeFn=e}},Za=class{_overlayRef;componentInstance;duplicatesCount=0;_afterClosed=new F;_activate=new F;_manualClose=new F;_resetTimeout=new F;_countDuplicate=new F;constructor(e){this._overlayRef=e}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(e,i){e&&this._resetTimeout.next(),i&&this._countDuplicate.next(++this.duplicatesCount)}},Yn=class{toastId;config;message;title;toastType;toastRef;_onTap=new F;_onAction=new F;constructor(e,i,n,r,s,o){this.toastId=e,this.config=i,this.message=n,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(e){this._onAction.next(e)}onAction(){return this._onAction.asObservable()}},mh={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"},_h=new O("ToastConfig"),Xa=class extends Qa{_hostDomElement;_componentFactoryResolver;_appRef;constructor(e,i,n){super(),this._hostDomElement=e,this._componentFactoryResolver=i,this._appRef=n}attachComponentPortal(e,i){let n=this._componentFactoryResolver.resolveComponentFactory(e.component),r;return r=n.create(e.injector),this._appRef.attachView(r.hostView),this.setDisposeFn(()=>{this._appRef.detachView(r.hostView),r.destroy()}),i?this._hostDomElement.insertBefore(this._getComponentRootNode(r),this._hostDomElement.firstChild):this._hostDomElement.appendChild(this._getComponentRootNode(r)),r}_getComponentRootNode(e){return e.hostView.rootNodes[0]}},e0=(()=>{class t{_document=p(G);_containerElement;ngOnDestroy(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let i=this._document.createElement("div");i.classList.add("overlay-container"),i.setAttribute("aria-live","polite"),this._document.body.appendChild(i),this._containerElement=i}static \u0275fac=function(n){return new(n||t)};static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),ec=class{_portalHost;constructor(e){this._portalHost=e}attach(e,i=!0){return this._portalHost.attach(e,i)}detach(){return this._portalHost.detach()}},t0=(()=>{class t{_overlayContainer=p(e0);_componentFactoryResolver=p(Pu);_appRef=p(it);_document=p(G);_paneElements=new Map;create(i,n){return this._createOverlayRef(this.getPaneElement(i,n))}getPaneElement(i="",n){return this._paneElements.get(n)||this._paneElements.set(n,{}),this._paneElements.get(n)[i]||(this._paneElements.get(n)[i]=this._createPaneElement(i,n)),this._paneElements.get(n)[i]}_createPaneElement(i,n){let r=this._document.createElement("div");return r.id="toast-container",r.classList.add(i),r.classList.add("toast-container"),n?n.getContainerElement().appendChild(r):this._overlayContainer.getContainerElement().appendChild(r),r}_createPortalHost(i){return new Xa(i,this._componentFactoryResolver,this._appRef)}_createOverlayRef(i){return new ec(this._createPortalHost(i))}static \u0275fac=function(n){return new(n||t)};static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Ts=(()=>{class t{overlay;_injector;sanitizer;ngZone;toastrConfig;currentlyActive=0;toasts=[];overlayContainer;previousToastMessage;index=0;constructor(i,n,r,s,o){this.overlay=n,this._injector=r,this.sanitizer=s,this.ngZone=o,this.toastrConfig=m(m({},i.default),i.config),i.config.iconClasses&&(this.toastrConfig.iconClasses=m(m({},i.default.iconClasses),i.config.iconClasses))}show(i,n,r={},s=""){return this._preBuildNotification(s,i,n,this.applyConfig(r))}success(i,n,r={}){let s=this.toastrConfig.iconClasses.success||"";return this._preBuildNotification(s,i,n,this.applyConfig(r))}error(i,n,r={}){let s=this.toastrConfig.iconClasses.error||"";return this._preBuildNotification(s,i,n,this.applyConfig(r))}info(i,n,r={}){let s=this.toastrConfig.iconClasses.info||"";return this._preBuildNotification(s,i,n,this.applyConfig(r))}warning(i,n,r={}){let s=this.toastrConfig.iconClasses.warning||"";return this._preBuildNotification(s,i,n,this.applyConfig(r))}clear(i){for(let n of this.toasts)if(i!==void 0){if(n.toastId===i){n.toastRef.manualClose();return}}else n.toastRef.manualClose()}remove(i){let n=this._findToast(i);if(!n||(n.activeToast.toastRef.close(),this.toasts.splice(n.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(i="",n="",r,s){let{includeTitleDuplicates:o}=this.toastrConfig;for(let a of this.toasts){let c=o&&a.title===i;if((!o||c)&&a.message===n)return a.toastRef.onDuplicate(r,s),a}return null}applyConfig(i={}){return m(m({},this.toastrConfig),i)}_findToast(i){for(let n=0;n<this.toasts.length;n++)if(this.toasts[n].toastId===i)return{index:n,activeToast:this.toasts[n]};return null}_preBuildNotification(i,n,r,s){return s.onActivateTick?this.ngZone.run(()=>this._buildNotification(i,n,r,s)):this._buildNotification(i,n,r,s)}_buildNotification(i,n,r,s){if(!s.toastComponent)throw new Error("toastComponent required");let o=this.findDuplicate(r,n,this.toastrConfig.resetTimeoutOnDuplicate&&s.timeOut>0,this.toastrConfig.countDuplicates);if((this.toastrConfig.includeTitleDuplicates&&r||n)&&this.toastrConfig.preventDuplicates&&o!==null)return o;this.previousToastMessage=n;let a=!1;this.toastrConfig.maxOpened&&this.currentlyActive>=this.toastrConfig.maxOpened&&(a=!0,this.toastrConfig.autoDismiss&&this.clear(this.toasts[0].toastId));let c=this.overlay.create(s.positionClass,this.overlayContainer);this.index=this.index+1;let l=n;n&&s.enableHtml&&(l=this.sanitizer.sanitize(pt.HTML,n));let u=new Za(c),h=new Yn(this.index,s,l,r,i,u),d=[{provide:Yn,useValue:h}],g=ne.create({providers:d,parent:this._injector}),v=new Ya(s.toastComponent,g),E=c.attach(v,s.newestOnTop);u.componentInstance=E.instance;let _={toastId:this.index,title:r||"",message:n||"",toastRef:u,onShown:u.afterActivate(),onHidden:u.afterClosed(),onTap:h.onTap(),onAction:h.onAction(),portal:E};return a||(this.currentlyActive=this.currentlyActive+1,setTimeout(()=>{_.toastRef.activate()})),this.toasts.push(_),_}static \u0275fac=function(n){return new(n||t)(T(_h),T(t0),T(ne),T(ha),T(H))};static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),n0=(()=>{class t{toastrService;toastPackage;ngZone;message;title;options;duplicatesCount;originalTimeout;width=Ge(-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(i,n,r){this.toastrService=i,this.toastPackage=n,this.ngZone=r,this.message=n.message,this.title=n.title,this.options=n.config,this.originalTimeout=n.config.timeOut,this.toastClasses=`${n.toastType} ${n.config.toastClass}`,this.sub=n.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=n.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=n.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=n.toastRef.countDuplicate().subscribe(s=>{this.duplicatesCount=s}),this.state=Ge({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(i=>N(m({},i),{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 i=new Date().getTime(),n=this.hideTime-i;this.width.set(n/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(i=>N(m({},i),{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(i=>N(m({},i),{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(i,n){this.ngZone?this.ngZone.runOutsideAngular(()=>this.timeout=setTimeout(()=>this.runInsideAngular(i),n)):this.timeout=setTimeout(()=>i(),n)}outsideInterval(i,n){this.ngZone?this.ngZone.runOutsideAngular(()=>this.intervalId=setInterval(()=>this.runInsideAngular(i),n)):this.intervalId=setInterval(()=>i(),n)}runInsideAngular(i){this.ngZone?this.ngZone.run(()=>i()):i()}static \u0275fac=function(n){return new(n||t)(x(Ts),x(Yn),x(H))};static \u0275cmp=ht({type:t,selectors:[["","toast-component",""]],hostVars:5,hostBindings:function(n,r){n&1&&Ce("click",function(){return r.tapToast()})("mouseenter",function(){return r.stickAround()})("mouseleave",function(){return r.delayedHideToast()}),n&2&&(Vu("@flyInOut",r._state),Ee(r.toastClasses),Fn("display",r.displayStyle))},standalone:!0,features:[_t],attrs:gh,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(n,r){n&1&&cn(0,$_,3,0,"button",0)(1,G_,3,5,"div",1)(2,z_,1,3,"div",2)(3,W_,2,4,"div",3)(4,q_,2,2,"div",4),n&2&&(pe("ngIf",r.options.closeButton),K(),pe("ngIf",r.title),K(),pe("ngIf",r.message&&r.options.enableHtml),K(),pe("ngIf",r.message&&!r.options.enableHtml),K(),pe("ngIf",r.options.progressBar))},dependencies:[Yo],encapsulation:2,data:{animation:[td("flyInOut",[Qr("inactive",Yr({opacity:0})),Qr("active",Yr({opacity:1})),Qr("removed",Yr({opacity:0})),Zo("inactive => active",Qo("{{ easeTime }}ms {{ easing }}")),Zo("active => removed",Qo("{{ easeTime }}ms {{ easing }}"))])]},changeDetection:0})}return t})(),i0=N(m({},mh),{toastComponent:n0}),kE=(t={})=>He([{provide:_h,useValue:{default:i0,config:t}}]);var r0=(()=>{class t{toastrService;toastPackage;appRef;message;title;options;duplicatesCount;originalTimeout;width=Ge(-1);toastClasses="";get displayStyle(){return this.state()==="inactive"?"none":null}state=Ge("inactive");timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(i,n,r){this.toastrService=i,this.toastPackage=n,this.appRef=r,this.message=n.message,this.title=n.title,this.options=n.config,this.originalTimeout=n.config.timeOut,this.toastClasses=`${n.toastType} ${n.config.toastClass}`,this.sub=n.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=n.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=n.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=n.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 i=new Date().getTime(),n=this.hideTime-i;this.width.set(n/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(n){return new(n||t)(x(Ts),x(Yn),x(it))};static \u0275cmp=ht({type:t,selectors:[["","toast-component",""]],hostVars:4,hostBindings:function(n,r){n&1&&Ce("click",function(){return r.tapToast()})("mouseenter",function(){return r.stickAround()})("mouseleave",function(){return r.delayedHideToast()}),n&2&&(Ee(r.toastClasses),Fn("display",r.displayStyle))},standalone:!0,features:[_t],attrs:gh,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(n,r){n&1&&cn(0,J_,3,0,"button",0)(1,Y_,3,5,"div",1)(2,Q_,1,3,"div",2)(3,Z_,2,4,"div",3)(4,X_,2,2,"div",4),n&2&&(pe("ngIf",r.options.closeButton),K(),pe("ngIf",r.title),K(),pe("ngIf",r.message&&r.options.enableHtml),K(),pe("ngIf",r.message&&!r.options.enableHtml),K(),pe("ngIf",r.options.progressBar))},dependencies:[Yo],encapsulation:2,changeDetection:0})}return t})(),xE=N(m({},mh),{toastComponent:r0});var Sh=(()=>{let e=class e{constructor(n,r){this._renderer=n,this._elementRef=r,this.onChange=s=>{},this.onTouched=()=>{}}setProperty(n,r){this._renderer.setProperty(this._elementRef.nativeElement,n,r)}registerOnTouched(n){this.onTouched=n}registerOnChange(n){this.onChange=n}setDisabledState(n){this.setProperty("disabled",n)}};e.\u0275fac=function(r){return new(r||e)(x(Vr),x(De))},e.\u0275dir=V({type:e});let t=e;return t})(),Ah=(()=>{let e=class e extends Sh{};e.\u0275fac=(()=>{let n;return function(s){return(n||(n=Ft(e)))(s||e)}})(),e.\u0275dir=V({type:e,features:[ze]});let t=e;return t})(),Ns=new O(""),s0={provide:Ns,useExisting:xt(()=>o0),multi:!0},o0=(()=>{let e=class e extends Ah{writeValue(n){this.setProperty("checked",n)}};e.\u0275fac=(()=>{let n;return function(s){return(n||(n=Ft(e)))(s||e)}})(),e.\u0275dir=V({type:e,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(r,s){r&1&&Ce("change",function(a){return s.onChange(a.target.checked)})("blur",function(){return s.onTouched()})},features:[Ut([s0]),ze]});let t=e;return t})(),a0={provide:Ns,useExisting:xt(()=>Oh),multi:!0};function c0(){let t=Bn()?Bn().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}var l0=new O(""),Oh=(()=>{let e=class e extends Sh{constructor(n,r,s){super(n,r),this._compositionMode=s,this._composing=!1,this._compositionMode==null&&(this._compositionMode=!c0())}writeValue(n){let r=n??"";this.setProperty("value",r)}_handleInput(n){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(n)}_compositionStart(){this._composing=!0}_compositionEnd(n){this._composing=!1,this._compositionMode&&this.onChange(n)}};e.\u0275fac=function(r){return new(r||e)(x(Vr),x(De),x(l0,8))},e.\u0275dir=V({type:e,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(r,s){r&1&&Ce("input",function(a){return s._handleInput(a.target.value)})("blur",function(){return s.onTouched()})("compositionstart",function(){return s._compositionStart()})("compositionend",function(a){return s._compositionEnd(a.target.value)})},features:[Ut([a0]),ze]});let t=e;return t})();function Wt(t){return t==null||(typeof t=="string"||Array.isArray(t))&&t.length===0}function Rh(t){return t!=null&&typeof t.length=="number"}var ac=new O(""),cc=new O(""),u0=/^(?=.{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])?)*$/,vh=class{static min(e){return d0(e)}static max(e){return h0(e)}static required(e){return f0(e)}static requiredTrue(e){return p0(e)}static email(e){return g0(e)}static minLength(e){return m0(e)}static maxLength(e){return _0(e)}static pattern(e){return v0(e)}static nullValidator(e){return Ph(e)}static compose(e){return Lh(e)}static composeAsync(e){return Vh(e)}};function d0(t){return e=>{if(Wt(e.value)||Wt(t))return null;let i=parseFloat(e.value);return!isNaN(i)&&i<t?{min:{min:t,actual:e.value}}:null}}function h0(t){return e=>{if(Wt(e.value)||Wt(t))return null;let i=parseFloat(e.value);return!isNaN(i)&&i>t?{max:{max:t,actual:e.value}}:null}}function f0(t){return Wt(t.value)?{required:!0}:null}function p0(t){return t.value===!0?null:{required:!0}}function g0(t){return Wt(t.value)||u0.test(t.value)?null:{email:!0}}function m0(t){return e=>Wt(e.value)||!Rh(e.value)?null:e.value.length<t?{minlength:{requiredLength:t,actualLength:e.value.length}}:null}function _0(t){return e=>Rh(e.value)&&e.value.length>t?{maxlength:{requiredLength:t,actualLength:e.value.length}}:null}function v0(t){if(!t)return Ph;let e,i;return typeof t=="string"?(i="",t.charAt(0)!=="^"&&(i+="^"),i+=t,t.charAt(t.length-1)!=="$"&&(i+="$"),e=new RegExp(i)):(i=t.toString(),e=t),n=>{if(Wt(n.value))return null;let r=n.value;return e.test(r)?null:{pattern:{requiredPattern:i,actualValue:r}}}}function Ph(t){return null}function Mh(t){return t!=null}function Nh(t){return Hr(t)?Q(t):t}function kh(t){let e={};return t.forEach(i=>{e=i!=null?m(m({},e),i):e}),Object.keys(e).length===0?null:e}function xh(t,e){return e.map(i=>i(t))}function y0(t){return!t.validate}function Fh(t){return t.map(e=>y0(e)?e:i=>e.validate(i))}function Lh(t){if(!t)return null;let e=t.filter(Mh);return e.length==0?null:function(i){return kh(xh(i,e))}}function Bh(t){return t!=null?Lh(Fh(t)):null}function Vh(t){if(!t)return null;let e=t.filter(Mh);return e.length==0?null:function(i){let n=xh(i,e).map(Nh);return uu(n).pipe(I(kh))}}function Uh(t){return t!=null?Vh(Fh(t)):null}function yh(t,e){return t===null?[e]:Array.isArray(t)?[...t,e]:[t,e]}function jh(t){return t._rawValidators}function $h(t){return t._rawAsyncValidators}function tc(t){return t?Array.isArray(t)?t:[t]:[]}function Is(t,e){return Array.isArray(t)?t.includes(e):t===e}function bh(t,e){let i=tc(e);return tc(t).forEach(r=>{Is(i,r)||i.push(r)}),i}function wh(t,e){return tc(e).filter(i=>!Is(t,i))}var Ss=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(e){this._rawValidators=e||[],this._composedValidatorFn=Bh(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=Uh(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e=void 0){this.control&&this.control.reset(e)}hasError(e,i){return this.control?this.control.hasError(e,i):!1}getError(e,i){return this.control?this.control.getError(e,i):null}},hn=class extends Ss{get formDirective(){return null}get path(){return null}},fn=class extends Ss{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}},As=class{constructor(e){this._cd=e}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}},b0={"[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"},XE=N(m({},b0),{"[class.ng-submitted]":"isSubmitted"}),eT=(()=>{let e=class e extends As{constructor(n){super(n)}};e.\u0275fac=function(r){return new(r||e)(x(fn,2))},e.\u0275dir=V({type:e,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(r,s){r&2&&X("ng-untouched",s.isUntouched)("ng-touched",s.isTouched)("ng-pristine",s.isPristine)("ng-dirty",s.isDirty)("ng-valid",s.isValid)("ng-invalid",s.isInvalid)("ng-pending",s.isPending)},features:[ze]});let t=e;return t})(),tT=(()=>{let e=class e extends As{constructor(n){super(n)}};e.\u0275fac=function(r){return new(r||e)(x(hn,10))},e.\u0275dir=V({type:e,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(r,s){r&2&&X("ng-untouched",s.isUntouched)("ng-touched",s.isTouched)("ng-pristine",s.isPristine)("ng-dirty",s.isDirty)("ng-valid",s.isValid)("ng-invalid",s.isInvalid)("ng-pending",s.isPending)("ng-submitted",s.isSubmitted)},features:[ze]});let t=e;return t})();var rr="VALID",Cs="INVALID",Qn="PENDING",sr="DISABLED",qt=class{},Os=class extends qt{constructor(e,i){super(),this.value=e,this.source=i}},or=class extends qt{constructor(e,i){super(),this.pristine=e,this.source=i}},ar=class extends qt{constructor(e,i){super(),this.touched=e,this.source=i}},Zn=class extends qt{constructor(e,i){super(),this.status=e,this.source=i}},nc=class extends qt{constructor(e){super(),this.source=e}},ic=class extends qt{constructor(e){super(),this.source=e}};function lc(t){return(ks(t)?t.validators:t)||null}function w0(t){return Array.isArray(t)?Bh(t):t||null}function uc(t,e){return(ks(e)?e.asyncValidators:t)||null}function D0(t){return Array.isArray(t)?Uh(t):t||null}function ks(t){return t!=null&&!Array.isArray(t)&&typeof t=="object"}function Hh(t,e,i){let n=t.controls;if(!(e?Object.keys(n):n).length)throw new U(1e3,"");if(!n[i])throw new U(1001,"")}function Gh(t,e,i){t._forEachChild((n,r)=>{if(i[r]===void 0)throw new U(1002,"")})}var Xn=class{constructor(e,i){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=null,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this._status=Ln(()=>this.statusReactive()),this.statusReactive=Ge(void 0),this._pristine=Ln(()=>this.pristineReactive()),this.pristineReactive=Ge(!0),this._touched=Ln(()=>this.touchedReactive()),this.touchedReactive=Ge(!1),this._events=new F,this.events=this._events.asObservable(),this._onDisabledChange=[],this._assignValidators(e),this._assignAsyncValidators(i)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get status(){return We(this.statusReactive)}set status(e){We(()=>this.statusReactive.set(e))}get valid(){return this.status===rr}get invalid(){return this.status===Cs}get pending(){return this.status==Qn}get disabled(){return this.status===sr}get enabled(){return this.status!==sr}get pristine(){return We(this.pristineReactive)}set pristine(e){We(()=>this.pristineReactive.set(e))}get dirty(){return!this.pristine}get touched(){return We(this.touchedReactive)}set touched(e){We(()=>this.touchedReactive.set(e))}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(bh(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(bh(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(wh(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(wh(e,this._rawAsyncValidators))}hasValidator(e){return Is(this._rawValidators,e)}hasAsyncValidator(e){return Is(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){let i=this.touched===!1;this.touched=!0;let n=e.sourceControl??this;this._parent&&!e.onlySelf&&this._parent.markAsTouched(N(m({},e),{sourceControl:n})),i&&e.emitEvent!==!1&&this._events.next(new ar(!0,n))}markAllAsTouched(e={}){this.markAsTouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(i=>i.markAllAsTouched(e))}markAsUntouched(e={}){let i=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let n=e.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:n})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e,n),i&&e.emitEvent!==!1&&this._events.next(new ar(!1,n))}markAsDirty(e={}){let i=this.pristine===!0;this.pristine=!1;let n=e.sourceControl??this;this._parent&&!e.onlySelf&&this._parent.markAsDirty(N(m({},e),{sourceControl:n})),i&&e.emitEvent!==!1&&this._events.next(new or(!1,n))}markAsPristine(e={}){let i=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let n=e.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:e.emitEvent})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e,n),i&&e.emitEvent!==!1&&this._events.next(new or(!0,n))}markAsPending(e={}){this.status=Qn;let i=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Zn(this.status,i)),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.markAsPending(N(m({},e),{sourceControl:i}))}disable(e={}){let i=this._parentMarkedDirty(e.onlySelf);this.status=sr,this.errors=null,this._forEachChild(r=>{r.disable(N(m({},e),{onlySelf:!0}))}),this._updateValue();let n=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Os(this.value,n)),this._events.next(new Zn(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(N(m({},e),{skipPristineCheck:i}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(e={}){let i=this._parentMarkedDirty(e.onlySelf);this.status=rr,this._forEachChild(n=>{n.enable(N(m({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(N(m({},e),{skipPristineCheck:i}),this),this._onDisabledChange.forEach(n=>n(!1))}_updateAncestors(e,i){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine({},i),this._parent._updateTouched({},i))}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let n=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===rr||this.status===Qn)&&this._runAsyncValidator(n,e.emitEvent)}let i=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Os(this.value,i)),this._events.next(new Zn(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(N(m({},e),{sourceControl:i}))}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(i=>i._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?sr:rr}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,i){if(this.asyncValidator){this.status=Qn,this._hasOwnPendingAsyncValidator={emitEvent:i!==!1};let n=Nh(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:i,shouldHaveEmitted:e})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let e=this._hasOwnPendingAsyncValidator?.emitEvent??!1;return this._hasOwnPendingAsyncValidator=null,e}return!1}setErrors(e,i={}){this.errors=e,this._updateControlsErrors(i.emitEvent!==!1,this,i.shouldHaveEmitted)}get(e){let i=e;return i==null||(Array.isArray(i)||(i=i.split(".")),i.length===0)?null:i.reduce((n,r)=>n&&n._find(r),this)}getError(e,i){let n=i?this.get(i):this;return n&&n.errors?n.errors[e]:null}hasError(e,i){return!!this.getError(e,i)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e,i,n){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),(e||n)&&this._events.next(new Zn(this.status,i)),this._parent&&this._parent._updateControlsErrors(e,i,n)}_initObservables(){this.valueChanges=new $,this.statusChanges=new $}_calculateStatus(){return this._allControlsDisabled()?sr:this.errors?Cs:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Qn)?Qn:this._anyControlsHaveStatus(Cs)?Cs:rr}_anyControlsHaveStatus(e){return this._anyControls(i=>i.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e,i){let n=!this._anyControlsDirty(),r=this.pristine!==n;this.pristine=n,this._parent&&!e.onlySelf&&this._parent._updatePristine(e,i),r&&this._events.next(new or(this.pristine,i))}_updateTouched(e={},i){this.touched=this._anyControlsTouched(),this._events.next(new ar(this.touched,i)),this._parent&&!e.onlySelf&&this._parent._updateTouched(e,i)}_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){ks(e)&&e.updateOn!=null&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){let i=this._parent&&this._parent.dirty;return!e&&!!i&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=w0(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=D0(this._rawAsyncValidators)}},Rs=class extends Xn{constructor(e,i,n){super(lc(i),uc(n,i)),this.controls=e,this._initObservables(),this._setUpdateStrategy(i),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(e,i){return this.controls[e]?this.controls[e]:(this.controls[e]=i,i.setParent(this),i._registerOnCollectionChange(this._onCollectionChange),i)}addControl(e,i,n={}){this.registerControl(e,i),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}removeControl(e,i={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}setControl(e,i,n={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],i&&this.registerControl(e,i),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}contains(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled}setValue(e,i={}){Gh(this,!0,e),Object.keys(e).forEach(n=>{Hh(this,!0,n),this.controls[n].setValue(e[n],{onlySelf:!0,emitEvent:i.emitEvent})}),this.updateValueAndValidity(i)}patchValue(e,i={}){e!=null&&(Object.keys(e).forEach(n=>{let r=this.controls[n];r&&r.patchValue(e[n],{onlySelf:!0,emitEvent:i.emitEvent})}),this.updateValueAndValidity(i))}reset(e={},i={}){this._forEachChild((n,r)=>{n.reset(e?e[r]:null,{onlySelf:!0,emitEvent:i.emitEvent})}),this._updatePristine(i,this),this._updateTouched(i,this),this.updateValueAndValidity(i)}getRawValue(){return this._reduceChildren({},(e,i,n)=>(e[n]=i.getRawValue(),e))}_syncPendingControls(){let e=this._reduceChildren(!1,(i,n)=>n._syncPendingControls()?!0:i);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){Object.keys(this.controls).forEach(i=>{let n=this.controls[i];n&&e(n,i)})}_setUpControls(){this._forEachChild(e=>{e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(e){for(let[i,n]of Object.entries(this.controls))if(this.contains(i)&&e(n))return!0;return!1}_reduceValue(){let e={};return this._reduceChildren(e,(i,n,r)=>((n.enabled||this.disabled)&&(i[r]=n.value),i))}_reduceChildren(e,i){let n=e;return this._forEachChild((r,s)=>{n=i(n,r,s)}),n}_allControlsDisabled(){for(let e of Object.keys(this.controls))if(this.controls[e].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(e){return this.controls.hasOwnProperty(e)?this.controls[e]:null}};var rc=class extends Rs{};var xs=new O("CallSetDisabledState",{providedIn:"root",factory:()=>Fs}),Fs="always";function zh(t,e){return[...e.path,t]}function sc(t,e,i=Fs){dc(t,e),e.valueAccessor.writeValue(t.value),(t.disabled||i==="always")&&e.valueAccessor.setDisabledState?.(t.disabled),T0(t,e),I0(t,e),C0(t,e),E0(t,e)}function Dh(t,e,i=!0){let n=()=>{};e.valueAccessor&&(e.valueAccessor.registerOnChange(n),e.valueAccessor.registerOnTouched(n)),Ms(t,e),t&&(e._invokeOnDestroyCallbacks(),t._registerOnCollectionChange(()=>{}))}function Ps(t,e){t.forEach(i=>{i.registerOnValidatorChange&&i.registerOnValidatorChange(e)})}function E0(t,e){if(e.valueAccessor.setDisabledState){let i=n=>{e.valueAccessor.setDisabledState(n)};t.registerOnDisabledChange(i),e._registerOnDestroy(()=>{t._unregisterOnDisabledChange(i)})}}function dc(t,e){let i=jh(t);e.validator!==null?t.setValidators(yh(i,e.validator)):typeof i=="function"&&t.setValidators([i]);let n=$h(t);e.asyncValidator!==null?t.setAsyncValidators(yh(n,e.asyncValidator)):typeof n=="function"&&t.setAsyncValidators([n]);let r=()=>t.updateValueAndValidity();Ps(e._rawValidators,r),Ps(e._rawAsyncValidators,r)}function Ms(t,e){let i=!1;if(t!==null){if(e.validator!==null){let r=jh(t);if(Array.isArray(r)&&r.length>0){let s=r.filter(o=>o!==e.validator);s.length!==r.length&&(i=!0,t.setValidators(s))}}if(e.asyncValidator!==null){let r=$h(t);if(Array.isArray(r)&&r.length>0){let s=r.filter(o=>o!==e.asyncValidator);s.length!==r.length&&(i=!0,t.setAsyncValidators(s))}}}let n=()=>{};return Ps(e._rawValidators,n),Ps(e._rawAsyncValidators,n),i}function T0(t,e){e.valueAccessor.registerOnChange(i=>{t._pendingValue=i,t._pendingChange=!0,t._pendingDirty=!0,t.updateOn==="change"&&Wh(t,e)})}function C0(t,e){e.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,t.updateOn==="blur"&&t._pendingChange&&Wh(t,e),t.updateOn!=="submit"&&t.markAsTouched()})}function Wh(t,e){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function I0(t,e){let i=(n,r)=>{e.valueAccessor.writeValue(n),r&&e.viewToModelUpdate(n)};t.registerOnChange(i),e._registerOnDestroy(()=>{t._unregisterOnChange(i)})}function S0(t,e){t==null,dc(t,e)}function A0(t,e){return Ms(t,e)}function qh(t,e){if(!t.hasOwnProperty("model"))return!1;let i=t.model;return i.isFirstChange()?!0:!Object.is(e,i.currentValue)}function O0(t){return Object.getPrototypeOf(t.constructor)===Ah}function R0(t,e){t._syncPendingControls(),e.forEach(i=>{let n=i.control;n.updateOn==="submit"&&n._pendingChange&&(i.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function Jh(t,e){if(!e)return null;Array.isArray(e);let i,n,r;return e.forEach(s=>{s.constructor===Oh?i=s:O0(s)?n=s:r=s}),r||n||i||null}function P0(t,e){let i=t.indexOf(e);i>-1&&t.splice(i,1)}function Eh(t,e){let i=t.indexOf(e);i>-1&&t.splice(i,1)}function Th(t){return typeof t=="object"&&t!==null&&Object.keys(t).length===2&&"value"in t&&"disabled"in t}var cr=class extends Xn{constructor(e=null,i,n){super(lc(i),uc(n,i)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(e),this._setUpdateStrategy(i),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),ks(i)&&(i.nonNullable||i.initialValueIsDefault)&&(Th(e)?this.defaultValue=e.value:this.defaultValue=e)}setValue(e,i={}){this.value=this._pendingValue=e,this._onChange.length&&i.emitModelToViewChange!==!1&&this._onChange.forEach(n=>n(this.value,i.emitViewToModelChange!==!1)),this.updateValueAndValidity(i)}patchValue(e,i={}){this.setValue(e,i)}reset(e=this.defaultValue,i={}){this._applyFormState(e),this.markAsPristine(i),this.markAsUntouched(i),this.setValue(this.value,i),this._pendingChange=!1}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){Eh(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){Eh(this._onDisabledChange,e)}_forEachChild(e){}_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(e){Th(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}};var M0=t=>t instanceof cr;var N0={provide:fn,useExisting:xt(()=>k0)},Ch=Promise.resolve(),k0=(()=>{let e=class e extends fn{constructor(n,r,s,o,a,c){super(),this._changeDetectorRef=a,this.callSetDisabledState=c,this.control=new cr,this._registered=!1,this.name="",this.update=new $,this._parent=n,this._setValidators(r),this._setAsyncValidators(s),this.valueAccessor=Jh(this,o)}ngOnChanges(n){if(this._checkForErrors(),!this._registered||"name"in n){if(this._registered&&(this._checkName(),this.formDirective)){let r=n.name.previousValue;this.formDirective.removeControl({name:r,path:this._getPath(r)})}this._setUpControl()}"isDisabled"in n&&this._updateDisabled(n),qh(n,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(n){this.viewModel=n,this.update.emit(n)}_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(){sc(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(n){Ch.then(()=>{this.control.setValue(n,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(n){let r=n.isDisabled.currentValue,s=r!==0&&Jo(r);Ch.then(()=>{s&&!this.control.disabled?this.control.disable():!s&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(n){return this._parent?zh(n,this._parent):[n]}};e.\u0275fac=function(r){return new(r||e)(x(hn,9),x(ac,10),x(cc,10),x(Ns,10),x(vt,8),x(xs,8))},e.\u0275dir=V({type:e,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:[Ut([N0]),ze,ft]});let t=e;return t})(),iT=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=V({type:e,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]});let t=e;return t})();var Kh=new O("");var x0={provide:hn,useExisting:xt(()=>F0)},F0=(()=>{let e=class e extends hn{get submitted(){return We(this._submittedReactive)}set submitted(n){this._submittedReactive.set(n)}constructor(n,r,s){super(),this.callSetDisabledState=s,this._submitted=Ln(()=>this._submittedReactive()),this._submittedReactive=Ge(!1),this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new $,this._setValidators(n),this._setAsyncValidators(r)}ngOnChanges(n){this._checkFormPresent(),n.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(Ms(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(n){let r=this.form.get(n.path);return sc(r,n,this.callSetDisabledState),r.updateValueAndValidity({emitEvent:!1}),this.directives.push(n),r}getControl(n){return this.form.get(n.path)}removeControl(n){Dh(n.control||null,n,!1),P0(this.directives,n)}addFormGroup(n){this._setUpFormContainer(n)}removeFormGroup(n){this._cleanUpFormContainer(n)}getFormGroup(n){return this.form.get(n.path)}addFormArray(n){this._setUpFormContainer(n)}removeFormArray(n){this._cleanUpFormContainer(n)}getFormArray(n){return this.form.get(n.path)}updateModel(n,r){this.form.get(n.path).setValue(r)}onSubmit(n){return this._submittedReactive.set(!0),R0(this.form,this.directives),this.ngSubmit.emit(n),this.form._events.next(new nc(this.control)),n?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(n=void 0){this.form.reset(n),this._submittedReactive.set(!1),this.form._events.next(new ic(this.form))}_updateDomValue(){this.directives.forEach(n=>{let r=n.control,s=this.form.get(n.path);r!==s&&(Dh(r||null,n),M0(s)&&(sc(s,n,this.callSetDisabledState),n.control=s))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(n){let r=this.form.get(n.path);S0(r,n),r.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(n){if(this.form){let r=this.form.get(n.path);r&&A0(r,n)&&r.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){dc(this.form,this),this._oldForm&&Ms(this._oldForm,this)}_checkFormPresent(){this.form}};e.\u0275fac=function(r){return new(r||e)(x(ac,10),x(cc,10),x(xs,8))},e.\u0275dir=V({type:e,selectors:[["","formGroup",""]],hostBindings:function(r,s){r&1&&Ce("submit",function(a){return s.onSubmit(a)})("reset",function(){return s.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Ut([x0]),ze,ft]});let t=e;return t})();var L0={provide:fn,useExisting:xt(()=>B0)},B0=(()=>{let e=class e extends fn{set isDisabled(n){}constructor(n,r,s,o,a){super(),this._ngModelWarningConfig=a,this._added=!1,this.name=null,this.update=new $,this._ngModelWarningSent=!1,this._parent=n,this._setValidators(r),this._setAsyncValidators(s),this.valueAccessor=Jh(this,o)}ngOnChanges(n){this._added||this._setUpControl(),qh(n,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(n){this.viewModel=n,this.update.emit(n)}get path(){return zh(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}};e._ngModelWarningSentOnce=!1,e.\u0275fac=function(r){return new(r||e)(x(hn,13),x(ac,10),x(cc,10),x(Ns,10),x(Kh,8))},e.\u0275dir=V({type:e,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},features:[Ut([L0]),ze,ft]});let t=e;return t})();var Yh=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=Ne({type:e}),e.\u0275inj=Me({});let t=e;return t})(),oc=class extends Xn{constructor(e,i,n){super(lc(i),uc(n,i)),this.controls=e,this._initObservables(),this._setUpdateStrategy(i),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(e){return this.controls[this._adjustIndex(e)]}push(e,i={}){this.controls.push(e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}insert(e,i,n={}){this.controls.splice(e,0,i),this._registerControl(i),this.updateValueAndValidity({emitEvent:n.emitEvent})}removeAt(e,i={}){let n=this._adjustIndex(e);n<0&&(n=0),this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),this.controls.splice(n,1),this.updateValueAndValidity({emitEvent:i.emitEvent})}setControl(e,i,n={}){let r=this._adjustIndex(e);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),i&&(this.controls.splice(r,0,i),this._registerControl(i)),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(e,i={}){Gh(this,!1,e),e.forEach((n,r)=>{Hh(this,!1,r),this.at(r).setValue(n,{onlySelf:!0,emitEvent:i.emitEvent})}),this.updateValueAndValidity(i)}patchValue(e,i={}){e!=null&&(e.forEach((n,r)=>{this.at(r)&&this.at(r).patchValue(n,{onlySelf:!0,emitEvent:i.emitEvent})}),this.updateValueAndValidity(i))}reset(e=[],i={}){this._forEachChild((n,r)=>{n.reset(e[r],{onlySelf:!0,emitEvent:i.emitEvent})}),this._updatePristine(i,this),this._updateTouched(i,this),this.updateValueAndValidity(i)}getRawValue(){return this.controls.map(e=>e.getRawValue())}clear(e={}){this.controls.length<1||(this._forEachChild(i=>i._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:e.emitEvent}))}_adjustIndex(e){return e<0?e+this.length:e}_syncPendingControls(){let e=this.controls.reduce((i,n)=>n._syncPendingControls()?!0:i,!1);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){this.controls.forEach((i,n)=>{e(i,n)})}_updateValue(){this.value=this.controls.filter(e=>e.enabled||this.disabled).map(e=>e.value)}_anyControls(e){return this.controls.some(i=>i.enabled&&e(i))}_setUpControls(){this._forEachChild(e=>this._registerControl(e))}_allControlsDisabled(){for(let e of this.controls)if(e.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(e){e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)}_find(e){return this.at(e)??null}};function Ih(t){return!!t&&(t.asyncValidators!==void 0||t.validators!==void 0||t.updateOn!==void 0)}var rT=(()=>{let e=class e{constructor(){this.useNonNullable=!1}get nonNullable(){let n=new e;return n.useNonNullable=!0,n}group(n,r=null){let s=this._reduceControls(n),o={};return Ih(r)?o=r:r!==null&&(o.validators=r.validator,o.asyncValidators=r.asyncValidator),new Rs(s,o)}record(n,r=null){let s=this._reduceControls(n);return new rc(s,r)}control(n,r,s){let o={};return this.useNonNullable?(Ih(r)?o=r:(o.validators=r,o.asyncValidators=s),new cr(n,N(m({},o),{nonNullable:!0}))):new cr(n,r,s)}array(n,r,s){let o=n.map(a=>this._createControl(a));return new oc(o,r,s)}_reduceControls(n){let r={};return Object.keys(n).forEach(s=>{r[s]=this._createControl(n[s])}),r}_createControl(n){if(n instanceof cr)return n;if(n instanceof Xn)return n;if(Array.isArray(n)){let r=n[0],s=n.length>1?n[1]:null,o=n.length>2?n[2]:null;return this.control(r,s,o)}else return this.control(n)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var sT=(()=>{let e=class e{static withConfig(n){return{ngModule:e,providers:[{provide:xs,useValue:n.callSetDisabledState??Fs}]}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=Ne({type:e}),e.\u0275inj=Me({imports:[Yh]});let t=e;return t})(),oT=(()=>{let e=class e{static withConfig(n){return{ngModule:e,providers:[{provide:Kh,useValue:n.warnOnNgModelWithFormControl??"always"},{provide:xs,useValue:n.callSetDisabledState??Fs}]}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=Ne({type:e}),e.\u0275inj=Me({imports:[Yh]});let t=e;return t})();function Ls(t){t||(Bo(Ls),t=p(wi));let e=new Pe(i=>t.onDestroy(i.next.bind(i)));return i=>i.pipe(J(e))}function V0(t,e){!e?.injector&&Bo(V0);let i=e?.injector??p(ne),n=new iu(1),r=Wu(()=>{let s;try{s=t()}catch(o){We(()=>n.error(o));return}We(()=>n.next(s))},{injector:i,manualCleanup:!0});return i.get(wi).onDestroy(()=>{r.destroy(),n.complete()}),n.asObservable()}var Z="top",le="bottom",re="right",ee="left",Bs="auto",Jt=[Z,le,re,ee],Tt="start",pn="end",Qh="clippingParents",Vs="viewport",ei="popper",Zh="reference",hc=Jt.reduce(function(t,e){return t.concat([e+"-"+Tt,e+"-"+pn])},[]),Us=[].concat(Jt,[Bs]).reduce(function(t,e){return t.concat([e,e+"-"+Tt,e+"-"+pn])},[]),U0="beforeRead",j0="read",$0="afterRead",H0="beforeMain",G0="main",z0="afterMain",W0="beforeWrite",q0="write",J0="afterWrite",Xh=[U0,j0,$0,H0,G0,z0,W0,q0,J0];function se(t){return t?(t.nodeName||"").toLowerCase():null}function z(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Be(t){var e=z(t).Element;return t instanceof e||t instanceof Element}function te(t){var e=z(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function ti(t){if(typeof ShadowRoot>"u")return!1;var e=z(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function K0(t){var e=t.state;Object.keys(e.elements).forEach(function(i){var n=e.styles[i]||{},r=e.attributes[i]||{},s=e.elements[i];!te(s)||!se(s)||(Object.assign(s.style,n),Object.keys(r).forEach(function(o){var a=r[o];a===!1?s.removeAttribute(o):s.setAttribute(o,a===!0?"":a)}))})}function Y0(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach(function(n){var r=e.elements[n],s=e.attributes[n]||{},o=Object.keys(e.styles.hasOwnProperty(n)?e.styles[n]:i[n]),a=o.reduce(function(c,l){return c[l]="",c},{});!te(r)||!se(r)||(Object.assign(r.style,a),Object.keys(s).forEach(function(c){r.removeAttribute(c)}))})}}var ef={name:"applyStyles",enabled:!0,phase:"write",fn:K0,effect:Y0,requires:["computeStyles"]};function oe(t){return t.split("-")[0]}var Je=Math.max,gn=Math.min,Ct=Math.round;function ni(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function lr(){return!/^((?!chrome|android).)*safari/i.test(ni())}function Ve(t,e,i){e===void 0&&(e=!1),i===void 0&&(i=!1);var n=t.getBoundingClientRect(),r=1,s=1;e&&te(t)&&(r=t.offsetWidth>0&&Ct(n.width)/t.offsetWidth||1,s=t.offsetHeight>0&&Ct(n.height)/t.offsetHeight||1);var o=Be(t)?z(t):window,a=o.visualViewport,c=!lr()&&i,l=(n.left+(c&&a?a.offsetLeft:0))/r,u=(n.top+(c&&a?a.offsetTop:0))/s,h=n.width/r,d=n.height/s;return{width:h,height:d,top:u,right:l+h,bottom:u+d,left:l,x:l,y:u}}function mn(t){var e=Ve(t),i=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:n}}function ur(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&ti(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function ve(t){return z(t).getComputedStyle(t)}function fc(t){return["table","td","th"].indexOf(se(t))>=0}function ue(t){return((Be(t)?t.ownerDocument:t.document)||window.document).documentElement}function It(t){return se(t)==="html"?t:t.assignedSlot||t.parentNode||(ti(t)?t.host:null)||ue(t)}function tf(t){return!te(t)||ve(t).position==="fixed"?null:t.offsetParent}function Q0(t){var e=/firefox/i.test(ni()),i=/Trident/i.test(ni());if(i&&te(t)){var n=ve(t);if(n.position==="fixed")return null}var r=It(t);for(ti(r)&&(r=r.host);te(r)&&["html","body"].indexOf(se(r))<0;){var s=ve(r);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||e&&s.willChange==="filter"||e&&s.filter&&s.filter!=="none")return r;r=r.parentNode}return null}function Ke(t){for(var e=z(t),i=tf(t);i&&fc(i)&&ve(i).position==="static";)i=tf(i);return i&&(se(i)==="html"||se(i)==="body"&&ve(i).position==="static")?e:i||Q0(t)||e}function _n(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function vn(t,e,i){return Je(t,gn(e,i))}function nf(t,e,i){var n=vn(t,e,i);return n>i?i:n}function dr(){return{top:0,right:0,bottom:0,left:0}}function hr(t){return Object.assign({},dr(),t)}function fr(t,e){return e.reduce(function(i,n){return i[n]=t,i},{})}var Z0=function(e,i){return e=typeof e=="function"?e(Object.assign({},i.rects,{placement:i.placement})):e,hr(typeof e!="number"?e:fr(e,Jt))};function X0(t){var e,i=t.state,n=t.name,r=t.options,s=i.elements.arrow,o=i.modifiersData.popperOffsets,a=oe(i.placement),c=_n(a),l=[ee,re].indexOf(a)>=0,u=l?"height":"width";if(!(!s||!o)){var h=Z0(r.padding,i),d=mn(s),g=c==="y"?Z:ee,v=c==="y"?le:re,E=i.rects.reference[u]+i.rects.reference[c]-o[c]-i.rects.popper[u],_=o[c]-i.rects.reference[c],y=Ke(s),R=y?c==="y"?y.clientHeight||0:y.clientWidth||0:0,P=E/2-_/2,b=h[g],M=R-d[u]-h[v],A=R/2-d[u]/2+P,k=vn(b,A,M),W=c;i.modifiersData[n]=(e={},e[W]=k,e.centerOffset=k-A,e)}}function ev(t){var e=t.state,i=t.options,n=i.element,r=n===void 0?"[data-popper-arrow]":n;r!=null&&(typeof r=="string"&&(r=e.elements.popper.querySelector(r),!r)||ur(e.elements.popper,r)&&(e.elements.arrow=r))}var pc={name:"arrow",enabled:!0,phase:"main",fn:X0,effect:ev,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ue(t){return t.split("-")[1]}var tv={top:"auto",right:"auto",bottom:"auto",left:"auto"};function nv(t,e){var i=t.x,n=t.y,r=e.devicePixelRatio||1;return{x:Ct(i*r)/r||0,y:Ct(n*r)/r||0}}function rf(t){var e,i=t.popper,n=t.popperRect,r=t.placement,s=t.variation,o=t.offsets,a=t.position,c=t.gpuAcceleration,l=t.adaptive,u=t.roundOffsets,h=t.isFixed,d=o.x,g=d===void 0?0:d,v=o.y,E=v===void 0?0:v,_=typeof u=="function"?u({x:g,y:E}):{x:g,y:E};g=_.x,E=_.y;var y=o.hasOwnProperty("x"),R=o.hasOwnProperty("y"),P=ee,b=Z,M=window;if(l){var A=Ke(i),k="clientHeight",W="clientWidth";if(A===z(i)&&(A=ue(i),ve(A).position!=="static"&&a==="absolute"&&(k="scrollHeight",W="scrollWidth")),A=A,r===Z||(r===ee||r===re)&&s===pn){b=le;var q=h&&A===M&&M.visualViewport?M.visualViewport.height:A[k];E-=q-n.height,E*=c?1:-1}if(r===ee||(r===Z||r===le)&&s===pn){P=re;var Y=h&&A===M&&M.visualViewport?M.visualViewport.width:A[W];g-=Y-n.width,g*=c?1:-1}}var he=Object.assign({position:a},l&&tv),je=u===!0?nv({x:g,y:E},z(i)):{x:g,y:E};if(g=je.x,E=je.y,c){var ge;return Object.assign({},he,(ge={},ge[b]=R?"0":"",ge[P]=y?"0":"",ge.transform=(M.devicePixelRatio||1)<=1?"translate("+g+"px, "+E+"px)":"translate3d("+g+"px, "+E+"px, 0)",ge))}return Object.assign({},he,(e={},e[b]=R?E+"px":"",e[P]=y?g+"px":"",e.transform="",e))}function iv(t){var e=t.state,i=t.options,n=i.gpuAcceleration,r=n===void 0?!0:n,s=i.adaptive,o=s===void 0?!0:s,a=i.roundOffsets,c=a===void 0?!0:a,l={placement:oe(e.placement),variation:Ue(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,rf(Object.assign({},l,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:c})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,rf(Object.assign({},l,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}var sf={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:iv,data:{}};var js={passive:!0};function rv(t){var e=t.state,i=t.instance,n=t.options,r=n.scroll,s=r===void 0?!0:r,o=n.resize,a=o===void 0?!0:o,c=z(e.elements.popper),l=[].concat(e.scrollParents.reference,e.scrollParents.popper);return s&&l.forEach(function(u){u.addEventListener("scroll",i.update,js)}),a&&c.addEventListener("resize",i.update,js),function(){s&&l.forEach(function(u){u.removeEventListener("scroll",i.update,js)}),a&&c.removeEventListener("resize",i.update,js)}}var of={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:rv,data:{}};var sv={left:"right",right:"left",bottom:"top",top:"bottom"};function ii(t){return t.replace(/left|right|bottom|top/g,function(e){return sv[e]})}var ov={start:"end",end:"start"};function $s(t){return t.replace(/start|end/g,function(e){return ov[e]})}function yn(t){var e=z(t),i=e.pageXOffset,n=e.pageYOffset;return{scrollLeft:i,scrollTop:n}}function bn(t){return Ve(ue(t)).left+yn(t).scrollLeft}function gc(t,e){var i=z(t),n=ue(t),r=i.visualViewport,s=n.clientWidth,o=n.clientHeight,a=0,c=0;if(r){s=r.width,o=r.height;var l=lr();(l||!l&&e==="fixed")&&(a=r.offsetLeft,c=r.offsetTop)}return{width:s,height:o,x:a+bn(t),y:c}}function mc(t){var e,i=ue(t),n=yn(t),r=(e=t.ownerDocument)==null?void 0:e.body,s=Je(i.scrollWidth,i.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),o=Je(i.scrollHeight,i.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-n.scrollLeft+bn(t),c=-n.scrollTop;return ve(r||i).direction==="rtl"&&(a+=Je(i.clientWidth,r?r.clientWidth:0)-s),{width:s,height:o,x:a,y:c}}function wn(t){var e=ve(t),i=e.overflow,n=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+r+n)}function Hs(t){return["html","body","#document"].indexOf(se(t))>=0?t.ownerDocument.body:te(t)&&wn(t)?t:Hs(It(t))}function Kt(t,e){var i;e===void 0&&(e=[]);var n=Hs(t),r=n===((i=t.ownerDocument)==null?void 0:i.body),s=z(n),o=r?[s].concat(s.visualViewport||[],wn(n)?n:[]):n,a=e.concat(o);return r?a:a.concat(Kt(It(o)))}function ri(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function av(t,e){var i=Ve(t,!1,e==="fixed");return i.top=i.top+t.clientTop,i.left=i.left+t.clientLeft,i.bottom=i.top+t.clientHeight,i.right=i.left+t.clientWidth,i.width=t.clientWidth,i.height=t.clientHeight,i.x=i.left,i.y=i.top,i}function af(t,e,i){return e===Vs?ri(gc(t,i)):Be(e)?av(e,i):ri(mc(ue(t)))}function cv(t){var e=Kt(It(t)),i=["absolute","fixed"].indexOf(ve(t).position)>=0,n=i&&te(t)?Ke(t):t;return Be(n)?e.filter(function(r){return Be(r)&&ur(r,n)&&se(r)!=="body"}):[]}function _c(t,e,i,n){var r=e==="clippingParents"?cv(t):[].concat(e),s=[].concat(r,[i]),o=s[0],a=s.reduce(function(c,l){var u=af(t,l,n);return c.top=Je(u.top,c.top),c.right=gn(u.right,c.right),c.bottom=gn(u.bottom,c.bottom),c.left=Je(u.left,c.left),c},af(t,o,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function pr(t){var e=t.reference,i=t.element,n=t.placement,r=n?oe(n):null,s=n?Ue(n):null,o=e.x+e.width/2-i.width/2,a=e.y+e.height/2-i.height/2,c;switch(r){case Z:c={x:o,y:e.y-i.height};break;case le:c={x:o,y:e.y+e.height};break;case re:c={x:e.x+e.width,y:a};break;case ee:c={x:e.x-i.width,y:a};break;default:c={x:e.x,y:e.y}}var l=r?_n(r):null;if(l!=null){var u=l==="y"?"height":"width";switch(s){case Tt:c[l]=c[l]-(e[u]/2-i[u]/2);break;case pn:c[l]=c[l]+(e[u]/2-i[u]/2);break;default:}}return c}function Yt(t,e){e===void 0&&(e={});var i=e,n=i.placement,r=n===void 0?t.placement:n,s=i.strategy,o=s===void 0?t.strategy:s,a=i.boundary,c=a===void 0?Qh:a,l=i.rootBoundary,u=l===void 0?Vs:l,h=i.elementContext,d=h===void 0?ei:h,g=i.altBoundary,v=g===void 0?!1:g,E=i.padding,_=E===void 0?0:E,y=hr(typeof _!="number"?_:fr(_,Jt)),R=d===ei?Zh:ei,P=t.rects.popper,b=t.elements[v?R:d],M=_c(Be(b)?b:b.contextElement||ue(t.elements.popper),c,u,o),A=Ve(t.elements.reference),k=pr({reference:A,element:P,strategy:"absolute",placement:r}),W=ri(Object.assign({},P,k)),q=d===ei?W:A,Y={top:M.top-q.top+y.top,bottom:q.bottom-M.bottom+y.bottom,left:M.left-q.left+y.left,right:q.right-M.right+y.right},he=t.modifiersData.offset;if(d===ei&&he){var je=he[r];Object.keys(Y).forEach(function(ge){var en=[re,le].indexOf(ge)>=0?1:-1,tn=[Z,le].indexOf(ge)>=0?"y":"x";Y[ge]+=je[tn]*en})}return Y}function vc(t,e){e===void 0&&(e={});var i=e,n=i.placement,r=i.boundary,s=i.rootBoundary,o=i.padding,a=i.flipVariations,c=i.allowedAutoPlacements,l=c===void 0?Us:c,u=Ue(n),h=u?a?hc:hc.filter(function(v){return Ue(v)===u}):Jt,d=h.filter(function(v){return l.indexOf(v)>=0});d.length===0&&(d=h);var g=d.reduce(function(v,E){return v[E]=Yt(t,{placement:E,boundary:r,rootBoundary:s,padding:o})[oe(E)],v},{});return Object.keys(g).sort(function(v,E){return g[v]-g[E]})}function lv(t){if(oe(t)===Bs)return[];var e=ii(t);return[$s(t),e,$s(e)]}function uv(t){var e=t.state,i=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var r=i.mainAxis,s=r===void 0?!0:r,o=i.altAxis,a=o===void 0?!0:o,c=i.fallbackPlacements,l=i.padding,u=i.boundary,h=i.rootBoundary,d=i.altBoundary,g=i.flipVariations,v=g===void 0?!0:g,E=i.allowedAutoPlacements,_=e.options.placement,y=oe(_),R=y===_,P=c||(R||!v?[ii(_)]:lv(_)),b=[_].concat(P).reduce(function(Mn,Pt){return Mn.concat(oe(Pt)===Bs?vc(e,{placement:Pt,boundary:u,rootBoundary:h,padding:l,flipVariations:v,allowedAutoPlacements:E}):Pt)},[]),M=e.rects.reference,A=e.rects.popper,k=new Map,W=!0,q=b[0],Y=0;Y<b.length;Y++){var he=b[Y],je=oe(he),ge=Ue(he)===Tt,en=[Z,le].indexOf(je)>=0,tn=en?"width":"height",Se=Yt(e,{placement:he,boundary:u,rootBoundary:h,altBoundary:d,padding:l}),$e=en?ge?re:ee:ge?le:Z;M[tn]>A[tn]&&($e=ii($e));var Or=ii($e),nn=[];if(s&&nn.push(Se[je]<=0),a&&nn.push(Se[$e]<=0,Se[Or]<=0),nn.every(function(Mn){return Mn})){q=he,W=!1;break}k.set(he,nn)}if(W)for(var Rr=v?3:1,Eo=function(Pt){var vi=b.find(function(Mr){var rn=k.get(Mr);if(rn)return rn.slice(0,Pt).every(function(To){return To})});if(vi)return q=vi,"break"},_i=Rr;_i>0;_i--){var Pr=Eo(_i);if(Pr==="break")break}e.placement!==q&&(e.modifiersData[n]._skip=!0,e.placement=q,e.reset=!0)}}var yc={name:"flip",enabled:!0,phase:"main",fn:uv,requiresIfExists:["offset"],data:{_skip:!1}};function dv(t,e,i){var n=oe(t),r=[ee,Z].indexOf(n)>=0?-1:1,s=typeof i=="function"?i(Object.assign({},e,{placement:t})):i,o=s[0],a=s[1];return o=o||0,a=(a||0)*r,[ee,re].indexOf(n)>=0?{x:a,y:o}:{x:o,y:a}}function hv(t){var e=t.state,i=t.options,n=t.name,r=i.offset,s=r===void 0?[0,0]:r,o=Us.reduce(function(u,h){return u[h]=dv(h,e.rects,s),u},{}),a=o[e.placement],c=a.x,l=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=c,e.modifiersData.popperOffsets.y+=l),e.modifiersData[n]=o}var bc={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:hv};function fv(t){var e=t.state,i=t.name;e.modifiersData[i]=pr({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}var cf={name:"popperOffsets",enabled:!0,phase:"read",fn:fv,data:{}};function wc(t){return t==="x"?"y":"x"}function pv(t){var e=t.state,i=t.options,n=t.name,r=i.mainAxis,s=r===void 0?!0:r,o=i.altAxis,a=o===void 0?!1:o,c=i.boundary,l=i.rootBoundary,u=i.altBoundary,h=i.padding,d=i.tether,g=d===void 0?!0:d,v=i.tetherOffset,E=v===void 0?0:v,_=Yt(e,{boundary:c,rootBoundary:l,padding:h,altBoundary:u}),y=oe(e.placement),R=Ue(e.placement),P=!R,b=_n(y),M=wc(b),A=e.modifiersData.popperOffsets,k=e.rects.reference,W=e.rects.popper,q=typeof E=="function"?E(Object.assign({},e.rects,{placement:e.placement})):E,Y=typeof q=="number"?{mainAxis:q,altAxis:q}:Object.assign({mainAxis:0,altAxis:0},q),he=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,je={x:0,y:0};if(A){if(s){var ge,en=b==="y"?Z:ee,tn=b==="y"?le:re,Se=b==="y"?"height":"width",$e=A[b],Or=$e+_[en],nn=$e-_[tn],Rr=g?-W[Se]/2:0,Eo=R===Tt?k[Se]:W[Se],_i=R===Tt?-W[Se]:-k[Se],Pr=e.elements.arrow,Mn=g&&Pr?mn(Pr):{width:0,height:0},Pt=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:dr(),vi=Pt[en],Mr=Pt[tn],rn=vn(0,k[Se],Mn[Se]),To=P?k[Se]/2-Rr-rn-vi-Y.mainAxis:Eo-rn-vi-Y.mainAxis,zp=P?-k[Se]/2+Rr+rn+Mr+Y.mainAxis:_i+rn+Mr+Y.mainAxis,Co=e.elements.arrow&&Ke(e.elements.arrow),Wp=Co?b==="y"?Co.clientTop||0:Co.clientLeft||0:0,Wl=(ge=he?.[b])!=null?ge:0,qp=$e+To-Wl-Wp,Jp=$e+zp-Wl,ql=vn(g?gn(Or,qp):Or,$e,g?Je(nn,Jp):nn);A[b]=ql,je[b]=ql-$e}if(a){var Jl,Kp=b==="x"?Z:ee,Yp=b==="x"?le:re,sn=A[M],Nr=M==="y"?"height":"width",Kl=sn+_[Kp],Yl=sn-_[Yp],Io=[Z,ee].indexOf(y)!==-1,Ql=(Jl=he?.[M])!=null?Jl:0,Zl=Io?Kl:sn-k[Nr]-W[Nr]-Ql+Y.altAxis,Xl=Io?sn+k[Nr]+W[Nr]-Ql-Y.altAxis:Yl,eu=g&&Io?nf(Zl,sn,Xl):vn(g?Zl:Kl,sn,g?Xl:Yl);A[M]=eu,je[M]=eu-sn}e.modifiersData[n]=je}}var Dc={name:"preventOverflow",enabled:!0,phase:"main",fn:pv,requiresIfExists:["offset"]};function Ec(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Tc(t){return t===z(t)||!te(t)?yn(t):Ec(t)}function gv(t){var e=t.getBoundingClientRect(),i=Ct(e.width)/t.offsetWidth||1,n=Ct(e.height)/t.offsetHeight||1;return i!==1||n!==1}function Cc(t,e,i){i===void 0&&(i=!1);var n=te(e),r=te(e)&&gv(e),s=ue(e),o=Ve(t,r,i),a={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(n||!n&&!i)&&((se(e)!=="body"||wn(s))&&(a=Tc(e)),te(e)?(c=Ve(e,!0),c.x+=e.clientLeft,c.y+=e.clientTop):s&&(c.x=bn(s))),{x:o.left+a.scrollLeft-c.x,y:o.top+a.scrollTop-c.y,width:o.width,height:o.height}}function mv(t){var e=new Map,i=new Set,n=[];t.forEach(function(s){e.set(s.name,s)});function r(s){i.add(s.name);var o=[].concat(s.requires||[],s.requiresIfExists||[]);o.forEach(function(a){if(!i.has(a)){var c=e.get(a);c&&r(c)}}),n.push(s)}return t.forEach(function(s){i.has(s.name)||r(s)}),n}function Ic(t){var e=mv(t);return Xh.reduce(function(i,n){return i.concat(e.filter(function(r){return r.phase===n}))},[])}function Sc(t){var e;return function(){return e||(e=new Promise(function(i){Promise.resolve().then(function(){e=void 0,i(t())})})),e}}function Ac(t){var e=t.reduce(function(i,n){var r=i[n.name];return i[n.name]=r?Object.assign({},r,n,{options:Object.assign({},r.options,n.options),data:Object.assign({},r.data,n.data)}):n,i},{});return Object.keys(e).map(function(i){return e[i]})}var lf={placement:"bottom",modifiers:[],strategy:"absolute"};function uf(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return!e.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function df(t){t===void 0&&(t={});var e=t,i=e.defaultModifiers,n=i===void 0?[]:i,r=e.defaultOptions,s=r===void 0?lf:r;return function(a,c,l){l===void 0&&(l=s);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},lf,s),modifiersData:{},elements:{reference:a,popper:c},attributes:{},styles:{}},h=[],d=!1,g={state:u,setOptions:function(y){var R=typeof y=="function"?y(u.options):y;E(),u.options=Object.assign({},s,u.options,R),u.scrollParents={reference:Be(a)?Kt(a):a.contextElement?Kt(a.contextElement):[],popper:Kt(c)};var P=Ic(Ac([].concat(n,u.options.modifiers)));return u.orderedModifiers=P.filter(function(b){return b.enabled}),v(),g.update()},forceUpdate:function(){if(!d){var y=u.elements,R=y.reference,P=y.popper;if(uf(R,P)){u.rects={reference:Cc(R,Ke(P),u.options.strategy==="fixed"),popper:mn(P)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(Y){return u.modifiersData[Y.name]=Object.assign({},Y.data)});for(var b=0;b<u.orderedModifiers.length;b++){if(u.reset===!0){u.reset=!1,b=-1;continue}var M=u.orderedModifiers[b],A=M.fn,k=M.options,W=k===void 0?{}:k,q=M.name;typeof A=="function"&&(u=A({state:u,options:W,name:q,instance:g})||u)}}}},update:Sc(function(){return new Promise(function(_){g.forceUpdate(),_(u)})}),destroy:function(){E(),d=!0}};if(!uf(a,c))return g;g.setOptions(l).then(function(_){!d&&l.onFirstUpdate&&l.onFirstUpdate(_)});function v(){u.orderedModifiers.forEach(function(_){var y=_.name,R=_.options,P=R===void 0?{}:R,b=_.effect;if(typeof b=="function"){var M=b({state:u,name:y,instance:g,options:P}),A=function(){};h.push(M||A)}})}function E(){h.forEach(function(_){return _()}),h=[]}return g}}var _v=[of,cf,sf,ef],Oc=df({defaultModifiers:_v});var vv=["*"];var yv=["dialog"];function bv(t,e){if(t&1&&(Te(0,"span"),Fe(1),xe()),t&2){let i=ce().$implicit,n=ce();Ee(n.highlightClass),K(),Wo(i)}}function wv(t,e){if(t&1&&(Ti(0),Fe(1),Ci()),t&2){let i=ce().$implicit;K(),Wo(i)}}function Dv(t,e){if(t&1&&cn(0,bv,2,4,"span",0)(1,wv,2,1,"ng-container"),t&2){let i=e.$index;xu(i%2!==0?0:1)}}var vf={animation:!0,transitionTimerDelayMs:5},kc=(()=>{let e=class e{constructor(){this.animation=vf.animation}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Ev=(()=>{let e=class e{constructor(){this._ngbConfig=p(kc),this.closeOthers=!1,this.destroyOnHide=!0}get animation(){return this._animation??this._ngbConfig.animation}set animation(n){this._animation=n}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function Tv(t){let{transitionDelay:e,transitionDuration:i}=window.getComputedStyle(t),n=parseFloat(e),r=parseFloat(i);return(n+r)*1e3}function hf(t){return t!=null?`${t}`:""}function xc(t){return typeof t=="string"}function Rc(t){return t!=null}function Cv(t){return t&&t.then}function Iv(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function Sv(t,e){return!e||typeof t.closest>"u"?null:t.closest(e)}function Fc(t){return(t||document.body).getBoundingClientRect()}function Av(t){return e=>new Pe(i=>{let n=o=>t.run(()=>i.next(o)),r=o=>t.run(()=>i.error(o)),s=()=>t.run(()=>i.complete());return e.subscribe({next:n,error:r,complete:s})})}function ff(t){return t.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function yf(t=document){let e=t?.activeElement;return e?e.shadowRoot?yf(e.shadowRoot):e:null}var Ov=()=>{},{transitionTimerDelayMs:Rv}=vf,Gs=new Map,Qt=(t,e,i,n)=>{let r=n.context||{},s=Gs.get(e);if(s)switch(n.runningTransition){case"continue":return Xe;case"stop":t.run(()=>s.transition$.complete()),r=Object.assign(s.context,r),Gs.delete(e)}let o=i(e,n.animation,r)||Ov;if(!n.animation||window.getComputedStyle(e).transitionProperty==="none")return t.run(()=>o()),D(void 0).pipe(Av(t));let a=new F,c=new F,l=a.pipe(pu(!0));Gs.set(e,{transition$:a,complete:()=>{c.next(),c.complete()},context:r});let u=Tv(e);return t.runOutsideAngular(()=>{let h=be(e,"transitionend").pipe(J(l),fe(({target:g})=>g===e)),d=du(u+Rv).pipe(J(l));No(d,h,c).pipe(J(l)).subscribe(()=>{Gs.delete(e),t.run(()=>{o(),a.next(),a.complete()})})}),a.asObservable()};function Pv(t,e){if(typeof navigator>"u")return"0px";let{classList:i}=t,n=i.contains("show");n||i.add("show"),t.style[e]="";let r=t.getBoundingClientRect()[e]+"px";return n||i.remove("show"),r}var Mv=(t,e,i)=>{let{direction:n,maxSize:r,dimension:s}=i,{classList:o}=t;function a(){o.add("collapse"),n==="show"?o.add("show"):o.remove("show")}if(!e){a();return}return r||(r=Pv(t,s),i.maxSize=r,t.style[s]=n!=="show"?r:"0px",o.remove("collapse"),o.remove("collapsing"),o.remove("show"),Fc(t),o.add("collapsing")),t.style[s]=n==="show"?r:"0px",()=>{a(),o.remove("collapsing"),t.style[s]=""}},Nv=(()=>{let e=class e{constructor(){this._ngbConfig=p(kc),this.horizontal=!1}get animation(){return this._animation??this._ngbConfig.animation}set animation(n){this._animation=n}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),pf=(()=>{let e=class e{constructor(){this._config=p(Nv),this._element=p(De),this._zone=p(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(n){this._isCollapsed!==n&&(this._isCollapsed=n,this._afterInit&&this._runTransitionWithEvents(n,this.animation))}ngOnInit(){this._runTransition(this._isCollapsed,!1),this._afterInit=!0}toggle(n=this._isCollapsed){this.collapsed=!n,this.ngbCollapseChange.next(this._isCollapsed)}_runTransition(n,r){return Qt(this._zone,this._element.nativeElement,Mv,{animation:r,runningTransition:"stop",context:{direction:n?"hide":"show",dimension:this.horizontal?"width":"height"}})}_runTransitionWithEvents(n,r){this._runTransition(n,r).subscribe(()=>{n?this.hidden.emit():this.shown.emit()})}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=V({type:e,selectors:[["","ngbCollapse",""]],hostVars:2,hostBindings:function(r,s){r&2&&X("collapse-horizontal",s.horizontal)},inputs:{animation:"animation",collapsed:[0,"ngbCollapse","collapsed"],horizontal:"horizontal"},outputs:{ngbCollapseChange:"ngbCollapseChange",shown:"shown",hidden:"hidden"},exportAs:["ngbCollapse"],standalone:!0});let t=e;return t})(),kv=0,KA=(()=>{let e=class e{constructor(){this._vcr=p(Ur),this._element=p(De).nativeElement,this._item=p(oi),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 n of this._viewRef.rootNodes)this._element.appendChild(n)}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=V({type:e,selectors:[["","ngbAccordionBody",""]],contentQueries:function(r,s,o){if(r&1&&Bt(o,Ho,7),r&2){let a;gt(a=mt())&&(s._bodyTpl=a.first)}},hostVars:2,hostBindings:function(r,s){r&2&&X("accordion-body",!0)},standalone:!0});let t=e;return t})(),xv=(()=>{let e=class e{constructor(){this.item=p(oi),this.ngbCollapse=p(pf)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=V({type:e,selectors:[["","ngbAccordionCollapse",""]],hostAttrs:["role","region"],hostVars:4,hostBindings:function(r,s){r&2&&(ln("id",s.item.collapseId),Ae("aria-labelledby",s.item.toggleId),X("accordion-collapse",!0))},exportAs:["ngbAccordionCollapse"],standalone:!0,features:[Go([pf])]});let t=e;return t})(),Fv=(()=>{let e=class e{constructor(){this.item=p(oi),this.accordion=p(bf)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=V({type:e,selectors:[["","ngbAccordionToggle",""]],hostVars:5,hostBindings:function(r,s){r&1&&Ce("click",function(){return!s.item.disabled&&s.accordion.toggle(s.item.id)}),r&2&&(ln("id",s.item.toggleId),Ae("aria-controls",s.item.collapseId)("aria-expanded",!s.item.collapsed),X("collapsed",s.item.collapsed))},standalone:!0});let t=e;return t})(),YA=(()=>{let e=class e{constructor(){this.item=p(oi)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=V({type:e,selectors:[["button","ngbAccordionButton",""]],hostAttrs:["type","button"],hostVars:3,hostBindings:function(r,s){r&2&&(ln("disabled",s.item.disabled),X("accordion-button",!0))},standalone:!0,features:[Go([Fv])]});let t=e;return t})(),QA=(()=>{let e=class e{constructor(){this.item=p(oi)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=V({type:e,selectors:[["","ngbAccordionHeader",""]],hostAttrs:["role","heading"],hostVars:4,hostBindings:function(r,s){r&2&&X("accordion-header",!0)("collapsed",s.item.collapsed)},standalone:!0});let t=e;return t})(),oi=(()=>{let e=class e{constructor(){this._accordion=p(bf),this._cd=p(vt),this._destroyRef=p(wi),this._collapsed=!0,this._id=`ngb-accordion-item-${kv++}`,this._collapseAnimationRunning=!1,this.disabled=!1,this.show=new $,this.shown=new $,this.hide=new $,this.hidden=new $}set id(n){xc(n)&&n!==""&&(this._id=n)}set destroyOnHide(n){this._destroyOnHide=n}get destroyOnHide(){return this._destroyOnHide===void 0?this._accordion.destroyOnHide:this._destroyOnHide}set collapsed(n){n?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:n}=this._collapse;n.animation=!1,n.collapsed=this.collapsed,n.animation=this._accordion.animation,n.hidden.pipe(Ls(this._destroyRef)).subscribe(()=>{this._collapseAnimationRunning=!1,this.hidden.emit(),this._accordion.hidden.emit(this.id)}),n.shown.pipe(Ls(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)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=V({type:e,selectors:[["","ngbAccordionItem",""]],contentQueries:function(r,s,o){if(r&1&&Bt(o,xv,7),r&2){let a;gt(a=mt())&&(s._collapse=a.first)}},hostVars:3,hostBindings:function(r,s){r&2&&(ln("id",s.id),X("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});let t=e;return t})(),bf=(()=>{let e=class e{constructor(){this._config=p(Ev),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(n){this._getItem(n)?.toggle()}expand(n){this._getItem(n)?.expand()}expandAll(){this._items&&(this.closeOthers?this._items.find(n=>!n.collapsed)||this._items.first.expand():this._items.forEach(n=>n.expand()))}collapse(n){this._getItem(n)?.collapse()}collapseAll(){this._items?.forEach(n=>n.collapse())}isExpanded(n){let r=this._getItem(n);return r?!r.collapsed:!1}_ensureCanExpand(n){return this.closeOthers?this._items?(this._items.find(r=>!r.collapsed&&n!==r)?.collapse(),!0):this._anItemWasAlreadyExpandedDuringInitialisation?!1:(this._anItemWasAlreadyExpandedDuringInitialisation=!0,!0):!0}_getItem(n){return this._items?.find(r=>r.id===n)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=V({type:e,selectors:[["","ngbAccordion",""]],contentQueries:function(r,s,o){if(r&1&&Bt(o,oi,4),r&2){let a;gt(a=mt())&&(s._items=a)}},hostVars:2,hostBindings:function(r,s){r&2&&X("accordion",!0)},inputs:{animation:"animation",closeOthers:"closeOthers",destroyOnHide:"destroyOnHide"},outputs:{show:"show",shown:"shown",hide:"hide",hidden:"hidden"},exportAs:["ngbAccordion"],standalone:!0});let t=e;return t})();var ZA=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=Ne({type:e}),e.\u0275inj=Me({});let t=e;return t})();var Ye=function(t){return t[t.Tab=9]="Tab",t[t.Enter=13]="Enter",t[t.Escape=27]="Escape",t[t.Space=32]="Space",t[t.PageUp=33]="PageUp",t[t.PageDown=34]="PageDown",t[t.End=35]="End",t[t.Home=36]="Home",t[t.ArrowLeft=37]="ArrowLeft",t[t.ArrowUp=38]="ArrowUp",t[t.ArrowRight=39]="ArrowRight",t[t.ArrowDown=40]="ArrowDown",t}(Ye||{});var zs=(t,e)=>e?e.some(i=>i.contains(t)):!1,gf=(t,e)=>!e||Sv(t,e)!=null,Lv=(()=>{let t=()=>/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2,e=()=>/Android/.test(navigator.userAgent);return typeof navigator<"u"?!!navigator.userAgent&&(t()||e()):!1})(),Bv=t=>Lv?()=>setTimeout(()=>t(),100):t;function Vv(t,e,i,n,r,s,o,a){i&&t.runOutsideAngular(Bv(()=>{let c=d=>{let g=d.target;return d.button===2||zs(g,o)?!1:i==="inside"?zs(g,s)&&gf(g,a):i==="outside"?!zs(g,s):gf(g,a)||!zs(g,s)},l=be(e,"keydown").pipe(J(r),fe(d=>d.which===Ye.Escape),B(d=>d.preventDefault())),u=be(e,"mousedown").pipe(I(c),J(r)),h=be(e,"mouseup").pipe(Fr(u),fe(([d,g])=>g),fu(0),J(r));No([l.pipe(I(d=>0)),h.pipe(I(d=>1))]).subscribe(d=>t.run(()=>n(d)))}))}var wf=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(", ");function Df(t){let e=Array.from(t.querySelectorAll(wf)).filter(i=>i.tabIndex!==-1);return[e[0],e[e.length-1]]}var Uv=(t,e,i,n=!1)=>{t.runOutsideAngular(()=>{let r=be(e,"focusin").pipe(J(i),I(s=>s.target));be(e,"keydown").pipe(J(i),fe(s=>s.which===Ye.Tab),Fr(r)).subscribe(([s,o])=>{let[a,c]=Df(e);(o===a||o===e)&&s.shiftKey&&(c.focus(),s.preventDefault()),o===c&&!s.shiftKey&&(a.focus(),s.preventDefault())}),n&&be(e,"click").pipe(J(i),Fr(r),I(s=>s[1])).subscribe(s=>s.focus())})},jv=(()=>{let e=class e{constructor(){this._element=p(G).documentElement}isRTL(){return(this._element.getAttribute("dir")||"").toLowerCase()==="rtl"}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),$v=/\s+/,Hv=/ +/gi,Gv={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 zv(t,e){let[i,n]=Gv[t];return e&&n||i}var Wv=/^left/,qv=/^right/,Jv=/^start/,Kv=/^end/;function Yv(t,e){let[i,n]=e.split("-"),r=i.replace(Wv,"start").replace(qv,"end"),s=[r];if(n){let o=n;(i==="left"||i==="right")&&(o=o.replace(Jv,"top").replace(Kv,"bottom")),s.push(`${r}-${o}`)}return t&&(s=s.map(o=>`${t}-${o}`)),s.join(" ")}function mf({placement:t,baseClass:e},i){let n=Array.isArray(t)?t:t.split($v),r=["top","bottom","start","end","top-start","top-end","bottom-start","bottom-end","start-top","start-bottom","end-top","end-bottom"],s=n.findIndex(l=>l==="auto");s>=0&&r.forEach(function(l){n.find(u=>u.search("^"+l)!==-1)==null&&n.splice(s++,1,l)});let o=n.map(l=>zv(l,i.isRTL()));return{placement:o.shift(),modifiers:[{name:"bootstrapClasses",enabled:!!e,phase:"write",fn({state:l}){let u=new RegExp(e+"(-[a-z]+)*","gi"),h=l.elements.popper,d=l.placement,g=h.className;g=g.replace(u,""),g+=` ${Yv(e,d)}`,g=g.trim().replace(Hv," "),h.className=g}},yc,Dc,pc,{enabled:!0,name:"flip",options:{fallbackPlacements:o}},{enabled:!0,name:"preventOverflow",phase:"main",fn:function(){}}]}}function _f(t){return t}function Qv(){let t=p(jv),e=null;return{createPopper(i){if(!e){let r=(i.updatePopperOptions||_f)(mf(i,t));e=Oc(i.hostElement,i.targetElement,r)}},update(){e&&e.update()},setOptions(i){if(e){let r=(i.updatePopperOptions||_f)(mf(i,t));e.setOptions(r)}},destroy(){e&&(e.destroy(),e=null)}}}function Zv(t){return e=>(e.modifiers.push(bc,{name:"offset",options:{offset:()=>t}}),e)}var XA=new Date(1882,10,12),eO=new Date(2174,10,25);var tO=1e3*60*60*24;var Lc=1080,Xv=24*Lc,ey=12*Lc+793,nO=29*Xv+ey,iO=11*Lc+204;var ty=(()=>{let e=class e{constructor(){this.autoClose=!0,this.placement=["bottom-start","bottom-end","top-start","top-end"],this.popperOptions=n=>n,this.container=null}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Ef=(()=>{let e=class e{constructor(){this._disabled=!1,this.nativeElement=p(De).nativeElement,this.tabindex=0}set disabled(n){this._disabled=n===""||n===!0}get disabled(){return this._disabled}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=V({type:e,selectors:[["","ngbDropdownItem",""]],hostAttrs:[1,"dropdown-item"],hostVars:3,hostBindings:function(r,s){r&2&&(ln("tabIndex",s.disabled?-1:s.tabindex),X("disabled",s.disabled))},inputs:{tabindex:"tabindex",disabled:"disabled"},standalone:!0});let t=e;return t})(),rO=(()=>{let e=class e{constructor(){this.item=p(Ef)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=V({type:e,selectors:[["button","ngbDropdownItem",""]],hostVars:1,hostBindings:function(r,s){r&2&&ln("disabled",s.item.disabled)},standalone:!0});let t=e;return t})(),ny=(()=>{let e=class e{constructor(){this.dropdown=p(Tf),this.nativeElement=p(De).nativeElement}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=V({type:e,selectors:[["","ngbDropdownMenu",""]],contentQueries:function(r,s,o){if(r&1&&Bt(o,Ef,4),r&2){let a;gt(a=mt())&&(s.menuItems=a)}},hostVars:4,hostBindings:function(r,s){r&1&&Ce("keydown.ArrowUp",function(a){return s.dropdown.onKeyDown(a)})("keydown.ArrowDown",function(a){return s.dropdown.onKeyDown(a)})("keydown.Home",function(a){return s.dropdown.onKeyDown(a)})("keydown.End",function(a){return s.dropdown.onKeyDown(a)})("keydown.Enter",function(a){return s.dropdown.onKeyDown(a)})("keydown.Space",function(a){return s.dropdown.onKeyDown(a)})("keydown.Tab",function(a){return s.dropdown.onKeyDown(a)})("keydown.Shift.Tab",function(a){return s.dropdown.onKeyDown(a)}),r&2&&X("dropdown-menu",!0)("show",s.dropdown.isOpen())},standalone:!0});let t=e;return t})(),Pc=(()=>{let e=class e{constructor(){this.dropdown=p(Tf),this.nativeElement=p(De).nativeElement}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=V({type:e,selectors:[["","ngbDropdownAnchor",""]],hostAttrs:[1,"dropdown-toggle"],hostVars:3,hostBindings:function(r,s){r&2&&(Ae("aria-expanded",s.dropdown.isOpen()),X("show",s.dropdown.isOpen()))},standalone:!0});let t=e;return t})(),sO=(()=>{let e=class e extends Pc{};e.\u0275fac=(()=>{let n;return function(s){return(n||(n=Ft(e)))(s||e)}})(),e.\u0275dir=V({type:e,selectors:[["","ngbDropdownToggle",""]],hostAttrs:[1,"dropdown-toggle"],hostVars:3,hostBindings:function(r,s){r&1&&Ce("click",function(){return s.dropdown.toggle()})("keydown.ArrowUp",function(a){return s.dropdown.onKeyDown(a)})("keydown.ArrowDown",function(a){return s.dropdown.onKeyDown(a)})("keydown.Home",function(a){return s.dropdown.onKeyDown(a)})("keydown.End",function(a){return s.dropdown.onKeyDown(a)})("keydown.Tab",function(a){return s.dropdown.onKeyDown(a)})("keydown.Shift.Tab",function(a){return s.dropdown.onKeyDown(a)}),r&2&&(Ae("aria-expanded",s.dropdown.isOpen()),X("show",s.dropdown.isOpen()))},standalone:!0,features:[Ut([{provide:Pc,useExisting:xt(()=>e)}]),ze]});let t=e;return t})(),Tf=(()=>{let e=class e{constructor(){this._changeDetector=p(vt),this._config=p(ty),this._document=p(G),this._ngZone=p(H),this._nativeElement=p(De).nativeElement,this._destroyCloseHandlers$=new F,this._bodyContainer=null,this._positioning=Qv(),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(we(1)).subscribe(()=>{this._applyPlacementClasses(),this._open&&this._setCloseHandlers()})}ngOnChanges(n){if(n.container&&this._open&&this._applyContainer(this.container),n.placement&&!n.placement.firstChange&&(this._positioning.setOptions({hostElement:this._anchor.nativeElement,targetElement:this._bodyContainer||this._menu.nativeElement,placement:this.placement,appendToBody:this.container==="body"}),this._applyPlacementClasses()),n.dropdownClass){let{currentValue:r,previousValue:s}=n.dropdownClass;this._applyCustomDropdownClass(r,s)}n.autoClose&&this._open&&(this.autoClose=n.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:n=>this.popperOptions(Zv([0,2])(n))}),this._applyPlacementClasses(),this._zoneSubscription=this._ngZone.onStable.subscribe(()=>this._positionMenu())})))}_setCloseHandlers(){this._destroyCloseHandlers$.next(),Vv(this._ngZone,this._document,this.autoClose,n=>{this.close(),n===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(n){let r=n.which,s=this._getMenuElements(),o=-1,a=null,c=this._isEventFromToggle(n);if(!c&&s.length&&s.forEach((l,u)=>{l.contains(n.target)&&(a=l),l===yf(this._document)&&(o=u)}),r===Ye.Space||r===Ye.Enter){a&&(this.autoClose===!0||this.autoClose==="inside")&&be(a,"click").pipe(we(1)).subscribe(()=>this.close());return}if(r===Ye.Tab){if(n.target&&this.isOpen()&&this.autoClose)if(this._anchor.nativeElement===n.target){this.container==="body"&&!n.shiftKey?(this._menu.nativeElement.setAttribute("tabindex","0"),this._menu.nativeElement.focus(),this._menu.nativeElement.removeAttribute("tabindex")):n.shiftKey&&this.close();return}else if(this.container==="body"){let l=this._menu.nativeElement.querySelectorAll(wf);n.shiftKey&&n.target===l[0]?(this._anchor.nativeElement.focus(),n.preventDefault()):!n.shiftKey&&n.target===l[l.length-1]&&(this._anchor.nativeElement.focus(),this.close())}else be(n.target,"focusout").pipe(we(1)).subscribe(({relatedTarget:l})=>{this._nativeElement.contains(l)||this.close()});return}if(c||a){if(this.open(),s.length){switch(r){case Ye.ArrowDown:o=Math.min(o+1,s.length-1);break;case Ye.ArrowUp:if(this._isDropup()&&o===-1){o=s.length-1;break}o=Math.max(o-1,0);break;case Ye.Home:o=0;break;case Ye.End:o=s.length-1;break}s[o].focus()}n.preventDefault()}}_isDropup(){return this._nativeElement.classList.contains("dropup")}_isEventFromToggle(n){return this._anchor.nativeElement.contains(n.target)}_getMenuElements(){return this._menu?this._menu.menuItems.filter(({disabled:n})=>!n).map(({nativeElement:n})=>n):[]}_positionMenu(){let n=this._menu;this.isOpen()&&n&&(this.display==="dynamic"?(this._positioning.update(),this._applyPlacementClasses()):this._applyPlacementClasses(this._getFirstPlacement(this.placement)))}_getFirstPlacement(n){return Array.isArray(n)?n[0]:n.split(" ")[0]}_resetContainer(){this._menu&&this._nativeElement.appendChild(this._menu.nativeElement),this._bodyContainer&&(this._document.body.removeChild(this._bodyContainer),this._bodyContainer=null)}_applyContainer(n=null){if(this._resetContainer(),n==="body"){let r=this._menu.nativeElement,s=this._bodyContainer=this._bodyContainer||this._document.createElement("div");s.style.position="absolute",r.style.position="static",s.style.zIndex="1055",s.appendChild(r),this._document.body.appendChild(s)}this._applyCustomDropdownClass(this.dropdownClass)}_applyCustomDropdownClass(n,r){let s=this.container==="body"?this._bodyContainer:this._nativeElement;s&&(r&&s.classList.remove(r),n&&s.classList.add(n))}_applyPlacementClasses(n){if(this._menu){n||(n=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 r=n.search("^top")!==-1?"dropup":"dropdown";this._nativeElement.classList.add(r),this._bodyContainer&&(this._bodyContainer.classList.remove("dropup","dropdown"),this._bodyContainer.classList.add(r))}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=V({type:e,selectors:[["","ngbDropdown",""]],contentQueries:function(r,s,o){if(r&1&&(Bt(o,ny,5),Bt(o,Pc,5)),r&2){let a;gt(a=mt())&&(s._menu=a.first),gt(a=mt())&&(s._anchor=a.first)}},hostVars:2,hostBindings:function(r,s){r&2&&X("show",s.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:[ft]});let t=e;return t})();var iy=(()=>{let e=class e{constructor(){this._ngbConfig=p(kc),this.backdrop=!0,this.fullscreen=!1,this.keyboard=!0}get animation(){return this._animation??this._ngbConfig.animation}set animation(n){this._animation=n}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),si=class{constructor(e,i,n){this.nodes=e,this.viewRef=i,this.componentRef=n}};var ry=(()=>{let e=class e{constructor(){this._document=p(G)}hide(){let n=Math.abs(window.innerWidth-this._document.documentElement.clientWidth),r=this._document.body,s=r.style,{overflow:o,paddingRight:a}=s;if(n>0){let c=parseFloat(window.getComputedStyle(r).paddingRight);s.paddingRight=`${c+n}px`}return s.overflow="hidden",()=>{n>0&&(s.paddingRight=a),s.overflow=o}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),sy=(()=>{let e=class e{constructor(){this._nativeElement=p(De).nativeElement,this._zone=p(H)}ngOnInit(){this._zone.onStable.asObservable().pipe(we(1)).subscribe(()=>{Qt(this._zone,this._nativeElement,(n,r)=>{r&&Fc(n),n.classList.add("show")},{animation:this.animation,runningTransition:"continue"})})}hide(){return Qt(this._zone,this._nativeElement,({classList:n})=>n.remove("show"),{animation:this.animation,runningTransition:"stop"})}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=ht({type:e,selectors:[["ngb-modal-backdrop"]],hostAttrs:[2,"z-index","1055"],hostVars:6,hostBindings:function(r,s){r&2&&(Ee("modal-backdrop"+(s.backdropClass?" "+s.backdropClass:"")),X("show",!s.animation)("fade",s.animation))},inputs:{animation:"animation",backdropClass:"backdropClass"},standalone:!0,features:[_t],decls:0,vars:0,template:function(r,s){},encapsulation:2});let t=e;return t})(),Ws=class{update(e){}close(e){}dismiss(e){}},oy=["animation","ariaLabelledBy","ariaDescribedBy","backdrop","centered","fullscreen","keyboard","scrollable","size","windowClass","modalDialogClass"],ay=["animation","backdropClass"],Mc=class{_applyWindowOptions(e,i){oy.forEach(n=>{Rc(i[n])&&(e[n]=i[n])})}_applyBackdropOptions(e,i){ay.forEach(n=>{Rc(i[n])&&(e[n]=i[n])})}update(e){this._applyWindowOptions(this._windowCmptRef.instance,e),this._backdropCmptRef&&this._backdropCmptRef.instance&&this._applyBackdropOptions(this._backdropCmptRef.instance,e)}get componentInstance(){if(this._contentRef&&this._contentRef.componentRef)return this._contentRef.componentRef.instance}get closed(){return this._closed.asObservable().pipe(J(this._hidden))}get dismissed(){return this._dismissed.asObservable().pipe(J(this._hidden))}get hidden(){return this._hidden.asObservable()}get shown(){return this._windowCmptRef.instance.shown.asObservable()}constructor(e,i,n,r){this._windowCmptRef=e,this._contentRef=i,this._backdropCmptRef=n,this._beforeDismiss=r,this._closed=new F,this._dismissed=new F,this._hidden=new F,e.instance.dismissEvent.subscribe(s=>{this.dismiss(s)}),this.result=new Promise((s,o)=>{this._resolve=s,this._reject=o}),this.result.then(null,()=>{})}close(e){this._windowCmptRef&&(this._closed.next(e),this._resolve(e),this._removeModalElements())}_dismiss(e){this._dismissed.next(e),this._reject(e),this._removeModalElements()}dismiss(e){if(this._windowCmptRef)if(!this._beforeDismiss)this._dismiss(e);else{let i=this._beforeDismiss();Cv(i)?i.then(n=>{n!==!1&&this._dismiss(e)},()=>{}):i!==!1&&this._dismiss(e)}}_removeModalElements(){let e=this._windowCmptRef.instance.hide(),i=this._backdropCmptRef?this._backdropCmptRef.instance.hide():D(void 0);e.subscribe(()=>{let{nativeElement:n}=this._windowCmptRef.location;n.parentNode.removeChild(n),this._windowCmptRef.destroy(),this._contentRef&&this._contentRef.viewRef&&this._contentRef.viewRef.destroy(),this._windowCmptRef=null,this._contentRef=null}),i.subscribe(()=>{if(this._backdropCmptRef){let{nativeElement:n}=this._backdropCmptRef.location;n.parentNode.removeChild(n),this._backdropCmptRef.destroy(),this._backdropCmptRef=null}}),xr(e,i).subscribe(()=>{this._hidden.next(),this._hidden.complete()})}},Nc=function(t){return t[t.BACKDROP_CLICK=0]="BACKDROP_CLICK",t[t.ESC=1]="ESC",t}(Nc||{}),cy=(()=>{let e=class e{constructor(){this._document=p(G),this._elRef=p(De),this._zone=p(H),this._closed$=new F,this._elWithFocus=null,this.backdrop=!0,this.keyboard=!0,this.dismissEvent=new $,this.shown=new F,this.hidden=new F}get fullscreenClass(){return this.fullscreen===!0?" modal-fullscreen":xc(this.fullscreen)?` modal-fullscreen-${this.fullscreen}-down`:""}dismiss(n){this.dismissEvent.emit(n)}ngOnInit(){this._elWithFocus=this._document.activeElement,this._zone.onStable.asObservable().pipe(we(1)).subscribe(()=>{this._show()})}ngOnDestroy(){this._disableEventHandling()}hide(){let{nativeElement:n}=this._elRef,r={animation:this.animation,runningTransition:"stop"},s=Qt(this._zone,n,()=>n.classList.remove("show"),r),o=Qt(this._zone,this._dialogEl.nativeElement,()=>{},r),a=xr(s,o);return a.subscribe(()=>{this.hidden.next(),this.hidden.complete()}),this._disableEventHandling(),this._restoreFocus(),a}_show(){let n={animation:this.animation,runningTransition:"continue"},r=Qt(this._zone,this._elRef.nativeElement,(o,a)=>{a&&Fc(o),o.classList.add("show")},n),s=Qt(this._zone,this._dialogEl.nativeElement,()=>{},n);xr(r,s).subscribe(()=>{this.shown.next(),this.shown.complete()}),this._enableEventHandling(),this._setFocus()}_enableEventHandling(){let{nativeElement:n}=this._elRef;this._zone.runOutsideAngular(()=>{be(n,"keydown").pipe(J(this._closed$),fe(s=>s.which===Ye.Escape)).subscribe(s=>{this.keyboard?requestAnimationFrame(()=>{s.defaultPrevented||this._zone.run(()=>this.dismiss(Nc.ESC))}):this.backdrop==="static"&&this._bumpBackdrop()});let r=!1;be(this._dialogEl.nativeElement,"mousedown").pipe(J(this._closed$),B(()=>r=!1),ae(()=>be(n,"mouseup").pipe(J(this._closed$),we(1))),fe(({target:s})=>n===s)).subscribe(()=>{r=!0}),be(n,"click").pipe(J(this._closed$)).subscribe(({target:s})=>{n===s&&(this.backdrop==="static"?this._bumpBackdrop():this.backdrop===!0&&!r&&this._zone.run(()=>this.dismiss(Nc.BACKDROP_CLICK))),r=!1})})}_disableEventHandling(){this._closed$.next()}_setFocus(){let{nativeElement:n}=this._elRef;if(!n.contains(document.activeElement)){let r=n.querySelector("[ngbAutofocus]"),s=Df(n)[0];(r||s||n).focus()}}_restoreFocus(){let n=this._document.body,r=this._elWithFocus,s;r&&r.focus&&n.contains(r)?s=r:s=n,this._zone.runOutsideAngular(()=>{setTimeout(()=>s.focus()),this._elWithFocus=null})}_bumpBackdrop(){this.backdrop==="static"&&Qt(this._zone,this._elRef.nativeElement,({classList:n})=>(n.add("modal-static"),()=>n.remove("modal-static")),{animation:this.animation,runningTransition:"continue"})}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=ht({type:e,selectors:[["ngb-modal-window"]],viewQuery:function(r,s){if(r&1&&$u(yv,7),r&2){let o;gt(o=mt())&&(s._dialogEl=o.first)}},hostAttrs:["role","dialog","tabindex","-1"],hostVars:7,hostBindings:function(r,s){r&2&&(Ae("aria-modal",!0)("aria-labelledby",s.ariaLabelledBy)("aria-describedby",s.ariaDescribedBy),Ee("modal d-block"+(s.windowClass?" "+s.windowClass:"")),X("fade",s.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:[_t],ngContentSelectors:vv,decls:4,vars:2,consts:[["dialog",""],["role","document"],[1,"modal-content"]],template:function(r,s){r&1&&(Uu(),Te(0,"div",1,0)(2,"div",2),ju(3),xe()()),r&2&&Ee("modal-dialog"+(s.size?" modal-"+s.size:"")+(s.centered?" modal-dialog-centered":"")+s.fullscreenClass+(s.scrollable?" modal-dialog-scrollable":"")+(s.modalDialogClass?" "+s.modalDialogClass:""))},styles:[`ngb-modal-window .component-host-scrollable{display:flex;flex-direction:column;overflow:hidden}
|
|
1
|
+
import{$ as Mt,$a as Di,$b as Fu,$c as Bn,A as Xe,Aa as O,Ab as Ho,Ad as td,B as kr,Ba as Lo,Bd as Qo,C as Oo,Ca as T,Cb as Pu,D as Ro,Da as p,Db as Mu,E as Y,Ea as et,Eb as Vr,Ed as Yr,F as D,Fa as yu,Fd as Qr,G as an,Ga as bi,Gb as H,H as ou,Ha as ht,Hd as Zo,I as au,Ia as Ne,Ib as Nu,J as cu,Ja as B,Jb as Ur,Jc as Ii,K as Nn,Kc as Hu,L as I,La as He,Lb as Ge,Lc as $r,M as yi,Mb as ze,Mc as Hr,N as ye,Na as bu,Nb as Go,Nc as qo,O as Po,Oa as tt,Oc as Gr,P as lu,Pa as ke,Pb as ku,Pc as it,Q as Mo,Qa as Bo,Qb as zo,Qc as zr,R as uu,Ra as ft,Rb as cn,Rc as vt,S as be,Sa as Lr,Sb as Ae,Sc as Gu,T as du,Ta as Br,Tb as pe,Tc as zu,Ua as Ft,Ub as Fn,Uc as Jo,V as fe,Vb as X,Wa as ne,Wb as Ee,Wc as Ln,X as No,Xa as Vo,Xc as We,Y as xr,Ya as wi,Yc as Wu,Zb as xu,Zc as Wr,_ as _e,_a as De,_c as qu,a as m,ab as $,ac as Lu,ad as Ju,b as N,bc as Bu,bd as Ku,ca as ko,cb as wu,cc as Te,cd as G,da as we,db as Uo,dc as xe,dd as Yu,ea as hu,eb as Du,ec as Lt,ed as Ko,fa as fu,fb as nt,fc as Ti,fd as Qu,gc as Ci,gd as Zu,ha as pu,hb as jo,hd as Si,i as on,ia as Nt,ib as kn,ic as jr,id as qr,j as f,ja as kt,jb as xn,jc as ln,ka as xo,kb as Eu,kc as Vu,la as gu,lb as Tu,lc as Ce,ld as Yo,ma as mu,mb as Cu,mc as ce,nb as Iu,nc as Uu,o as tu,oa as _u,ob as Su,oc as ju,p as nu,pb as Au,q as Pe,qa as Fo,qb as Ou,qc as Bt,r as So,ra as ae,rb as pt,rc as $u,s as Ao,sa as Q,sb as $o,sc as gt,t as F,ta as V,tc as mt,td as Xu,u as me,ua as Fr,v as iu,va as U,vc as Fe,vd as Jr,wa as xt,wb as Ei,wc as Wo,wd as ed,x as ru,xa as w,xb as J,xc as Vt,xd as Kr,y as su,ya as Me,yb as x,yc as Ut,za as vu,zb as Ru,zc as _t}from"./chunk-CH3XL2PG.js";var Oi=class{},Xr=class{},yt=class t{constructor(e){this.normalizedNames=new Map,this.lazyUpdate=null,e?typeof e=="string"?this.lazyInit=()=>{this.headers=new Map,e.split(`
|
|
2
|
+
`).forEach(i=>{let n=i.indexOf(":");if(n>0){let r=i.slice(0,n),s=r.toLowerCase(),o=i.slice(n+1).trim();this.maybeSetNormalizedName(r,s),this.headers.has(s)?this.headers.get(s).push(o):this.headers.set(s,[o])}})}:typeof Headers<"u"&&e instanceof Headers?(this.headers=new Map,e.forEach((i,n)=>{this.setHeaderEntries(n,i)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(e).forEach(([i,n])=>{this.setHeaderEntries(i,n)})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();let i=this.headers.get(e.toLowerCase());return i&&i.length>0?i[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,i){return this.clone({name:e,value:i,op:"a"})}set(e,i){return this.clone({name:e,value:i,op:"s"})}delete(e,i){return this.clone({name:e,value:i,op:"d"})}maybeSetNormalizedName(e,i){this.normalizedNames.has(i)||this.normalizedNames.set(i,e)}init(){this.lazyInit&&(this.lazyInit instanceof t?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(e=>this.applyUpdate(e)),this.lazyUpdate=null))}copyFrom(e){e.init(),Array.from(e.headers.keys()).forEach(i=>{this.headers.set(i,e.headers.get(i)),this.normalizedNames.set(i,e.normalizedNames.get(i))})}clone(e){let i=new t;return i.lazyInit=this.lazyInit&&this.lazyInit instanceof t?this.lazyInit:this,i.lazyUpdate=(this.lazyUpdate||[]).concat([e]),i}applyUpdate(e){let i=e.name.toLowerCase();switch(e.op){case"a":case"s":let n=e.value;if(typeof n=="string"&&(n=[n]),n.length===0)return;this.maybeSetNormalizedName(e.name,i);let r=(e.op==="a"?this.headers.get(i):void 0)||[];r.push(...n),this.headers.set(i,r);break;case"d":let s=e.value;if(!s)this.headers.delete(i),this.normalizedNames.delete(i);else{let o=this.headers.get(i);if(!o)return;o=o.filter(a=>s.indexOf(a)===-1),o.length===0?(this.headers.delete(i),this.normalizedNames.delete(i)):this.headers.set(i,o)}break}}setHeaderEntries(e,i){let n=(Array.isArray(i)?i:[i]).map(s=>s.toString()),r=e.toLowerCase();this.headers.set(r,n),this.maybeSetNormalizedName(e,r)}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(i=>e(this.normalizedNames.get(i),this.headers.get(i)))}};var ea=class{encodeKey(e){return nd(e)}encodeValue(e){return nd(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};function Zp(t,e){let i=new Map;return t.length>0&&t.replace(/^\?/,"").split("&").forEach(r=>{let s=r.indexOf("="),[o,a]=s==-1?[e.decodeKey(r),""]:[e.decodeKey(r.slice(0,s)),e.decodeValue(r.slice(s+1))],c=i.get(o)||[];c.push(a),i.set(o,c)}),i}var Xp=/%(\d[a-f0-9])/gi,eg={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function nd(t){return encodeURIComponent(t).replace(Xp,(e,i)=>eg[i]??e)}function Zr(t){return`${t}`}var jt=class t{constructor(e={}){if(this.updates=null,this.cloneFrom=null,this.encoder=e.encoder||new ea,e.fromString){if(e.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=Zp(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(i=>{let n=e.fromObject[i],r=Array.isArray(n)?n.map(Zr):[Zr(n)];this.map.set(i,r)})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();let i=this.map.get(e);return i?i[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,i){return this.clone({param:e,value:i,op:"a"})}appendAll(e){let i=[];return Object.keys(e).forEach(n=>{let r=e[n];Array.isArray(r)?r.forEach(s=>{i.push({param:n,value:s,op:"a"})}):i.push({param:n,value:r,op:"a"})}),this.clone(i)}set(e,i){return this.clone({param:e,value:i,op:"s"})}delete(e,i){return this.clone({param:e,value:i,op:"d"})}toString(){return this.init(),this.keys().map(e=>{let i=this.encoder.encodeKey(e);return this.map.get(e).map(n=>i+"="+this.encoder.encodeValue(n)).join("&")}).filter(e=>e!=="").join("&")}clone(e){let i=new t({encoder:this.encoder});return i.cloneFrom=this.cloneFrom||this,i.updates=(this.updates||[]).concat(e),i}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(e=>this.map.set(e,this.cloneFrom.map.get(e))),this.updates.forEach(e=>{switch(e.op){case"a":case"s":let i=(e.op==="a"?this.map.get(e.param):void 0)||[];i.push(Zr(e.value)),this.map.set(e.param,i);break;case"d":if(e.value!==void 0){let n=this.map.get(e.param)||[],r=n.indexOf(Zr(e.value));r!==-1&&n.splice(r,1),n.length>0?this.map.set(e.param,n):this.map.delete(e.param)}else{this.map.delete(e.param);break}}}),this.cloneFrom=this.updates=null)}};var ta=class{constructor(){this.map=new Map}set(e,i){return this.map.set(e,i),this}get(e){return this.map.has(e)||this.map.set(e,e.defaultValue()),this.map.get(e)}delete(e){return this.map.delete(e),this}has(e){return this.map.has(e)}keys(){return this.map.keys()}};function tg(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function id(t){return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer}function rd(t){return typeof Blob<"u"&&t instanceof Blob}function sd(t){return typeof FormData<"u"&&t instanceof FormData}function ng(t){return typeof URLSearchParams<"u"&&t instanceof URLSearchParams}var Ai=class t{constructor(e,i,n,r){this.url=i,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=e.toUpperCase();let s;if(tg(this.method)||r?(this.body=n!==void 0?n:null,s=r):s=n,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 yt,this.context??=new ta,!this.params)this.params=new jt,this.urlWithParams=i;else{let o=this.params.toString();if(o.length===0)this.urlWithParams=i;else{let a=i.indexOf("?"),c=a===-1?"?":a<i.length-1?"&":"";this.urlWithParams=i+c+o}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||id(this.body)||rd(this.body)||sd(this.body)||ng(this.body)?this.body:this.body instanceof jt?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||sd(this.body)?null:rd(this.body)?this.body.type||null:id(this.body)?null:typeof this.body=="string"?"text/plain":this.body instanceof jt?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?"application/json":null}clone(e={}){let i=e.method||this.method,n=e.url||this.url,r=e.responseType||this.responseType,s=e.transferCache??this.transferCache,o=e.body!==void 0?e.body:this.body,a=e.withCredentials??this.withCredentials,c=e.reportProgress??this.reportProgress,l=e.headers||this.headers,u=e.params||this.params,h=e.context??this.context;return e.setHeaders!==void 0&&(l=Object.keys(e.setHeaders).reduce((d,g)=>d.set(g,e.setHeaders[g]),l)),e.setParams&&(u=Object.keys(e.setParams).reduce((d,g)=>d.set(g,e.setParams[g]),u)),new t(i,n,o,{params:u,headers:l,context:h,reportProgress:c,responseType:r,withCredentials:a,transferCache:s})}},$t=function(t){return t[t.Sent=0]="Sent",t[t.UploadProgress=1]="UploadProgress",t[t.ResponseHeader=2]="ResponseHeader",t[t.DownloadProgress=3]="DownloadProgress",t[t.Response=4]="Response",t[t.User=5]="User",t}($t||{}),Ri=class{constructor(e,i=200,n="OK"){this.headers=e.headers||new yt,this.status=e.status!==void 0?e.status:i,this.statusText=e.statusText||n,this.url=e.url||null,this.ok=this.status>=200&&this.status<300}},es=class t extends Ri{constructor(e={}){super(e),this.type=$t.ResponseHeader}clone(e={}){return new t({headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}},Pi=class t extends Ri{constructor(e={}){super(e),this.type=$t.Response,this.body=e.body!==void 0?e.body:null}clone(e={}){return new t({body:e.body!==void 0?e.body:this.body,headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}},rt=class extends Ri{constructor(e){super(e,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${e.url||"(unknown url)"}`:this.message=`Http failure response for ${e.url||"(unknown url)"}: ${e.status} ${e.statusText}`,this.error=e.error||null}},ud=200,ig=204;function Xo(t,e){return{body:e,headers:t.headers,context:t.context,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials,transferCache:t.transferCache}}var ra=(()=>{let e=class e{constructor(n){this.handler=n}request(n,r,s={}){let o;if(n instanceof Ai)o=n;else{let l;s.headers instanceof yt?l=s.headers:l=new yt(s.headers);let u;s.params&&(s.params instanceof jt?u=s.params:u=new jt({fromObject:s.params})),o=new Ai(n,r,s.body!==void 0?s.body:null,{headers:l,context:s.context,params:u,reportProgress:s.reportProgress,responseType:s.responseType||"json",withCredentials:s.withCredentials,transferCache:s.transferCache})}let a=D(o).pipe(Mt(l=>this.handler.handle(l)));if(n instanceof Ai||s.observe==="events")return a;let c=a.pipe(fe(l=>l instanceof Pi));switch(s.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return c.pipe(I(l=>{if(l.body!==null&&!(l.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return l.body}));case"blob":return c.pipe(I(l=>{if(l.body!==null&&!(l.body instanceof Blob))throw new Error("Response is not a Blob.");return l.body}));case"text":return c.pipe(I(l=>{if(l.body!==null&&typeof l.body!="string")throw new Error("Response is not a string.");return l.body}));case"json":default:return c.pipe(I(l=>l.body))}case"response":return c;default:throw new Error(`Unreachable: unhandled observe type ${s.observe}}`)}}delete(n,r={}){return this.request("DELETE",n,r)}get(n,r={}){return this.request("GET",n,r)}head(n,r={}){return this.request("HEAD",n,r)}jsonp(n,r){return this.request("JSONP",n,{params:new jt().append(r,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(n,r={}){return this.request("OPTIONS",n,r)}patch(n,r,s={}){return this.request("PATCH",n,Xo(s,r))}post(n,r,s={}){return this.request("POST",n,Xo(s,r))}put(n,r,s={}){return this.request("PUT",n,Xo(s,r))}};e.\u0275fac=function(r){return new(r||e)(T(Oi))},e.\u0275prov=w({token:e,factory:e.\u0275fac});let t=e;return t})(),rg=/^\)\]\}',?\n/,sg="X-Request-URL";function od(t){if(t.url)return t.url;let e=sg.toLocaleLowerCase();return t.headers.get(e)}var og=(()=>{let e=class e{constructor(){this.fetchImpl=p(na,{optional:!0})?.fetch??fetch.bind(globalThis),this.ngZone=p(H)}handle(n){return new Pe(r=>{let s=new AbortController;return this.doRequest(n,s.signal,r).then(ia,o=>r.error(new rt({error:o}))),()=>s.abort()})}doRequest(n,r,s){return f(this,null,function*(){let o=this.createRequestInit(n),a;try{let v=this.ngZone.runOutsideAngular(()=>this.fetchImpl(n.urlWithParams,m({signal:r},o)));ag(v),s.next({type:$t.Sent}),a=yield v}catch(v){s.error(new rt({error:v,status:v.status??0,statusText:v.statusText,url:n.urlWithParams,headers:v.headers}));return}let c=new yt(a.headers),l=a.statusText,u=od(a)??n.urlWithParams,h=a.status,d=null;if(n.reportProgress&&s.next(new es({headers:c,status:h,statusText:l,url:u})),a.body){let v=a.headers.get("content-length"),E=[],_=a.body.getReader(),y=0,R,P,b=typeof Zone<"u"&&Zone.current;yield this.ngZone.runOutsideAngular(()=>f(this,null,function*(){for(;;){let{done:A,value:k}=yield _.read();if(A)break;if(E.push(k),y+=k.length,n.reportProgress){P=n.responseType==="text"?(P??"")+(R??=new TextDecoder).decode(k,{stream:!0}):void 0;let W=()=>s.next({type:$t.DownloadProgress,total:v?+v:void 0,loaded:y,partialText:P});b?b.run(W):W()}}}));let M=this.concatChunks(E,y);try{let A=a.headers.get("Content-Type")??"";d=this.parseBody(n,M,A)}catch(A){s.error(new rt({error:A,headers:new yt(a.headers),status:a.status,statusText:a.statusText,url:od(a)??n.urlWithParams}));return}}h===0&&(h=d?ud:0),h>=200&&h<300?(s.next(new Pi({body:d,headers:c,status:h,statusText:l,url:u})),s.complete()):s.error(new rt({error:d,headers:c,status:h,statusText:l,url:u}))})}parseBody(n,r,s){switch(n.responseType){case"json":let o=new TextDecoder().decode(r).replace(rg,"");return o===""?null:JSON.parse(o);case"text":return new TextDecoder().decode(r);case"blob":return new Blob([r],{type:s});case"arraybuffer":return r.buffer}}createRequestInit(n){let r={},s=n.withCredentials?"include":void 0;if(n.headers.forEach((o,a)=>r[o]=a.join(",")),n.headers.has("Accept")||(r.Accept="application/json, text/plain, */*"),!n.headers.has("Content-Type")){let o=n.detectContentTypeHeader();o!==null&&(r["Content-Type"]=o)}return{body:n.serializeBody(),method:n.method,headers:r,credentials:s}}concatChunks(n,r){let s=new Uint8Array(r),o=0;for(let a of n)s.set(a,o),o+=a.length;return s}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:e.\u0275fac});let t=e;return t})(),na=class{};function ia(){}function ag(t){t.then(ia,ia)}function dd(t,e){return e(t)}function cg(t,e){return(i,n)=>e.intercept(i,{handle:r=>t(r,n)})}function lg(t,e,i){return(n,r)=>ke(i,()=>e(n,s=>t(s,r)))}var ug=new O(""),ns=new O(""),dg=new O(""),hd=new O("",{providedIn:"root",factory:()=>!0});function hg(){let t=null;return(e,i)=>{t===null&&(t=(p(ug,{optional:!0})??[]).reduceRight(cg,dd));let n=p(Di);if(p(hd)){let s=n.add();return t(e,i).pipe(Nt(()=>n.remove(s)))}else return t(e,i)}}var ad=(()=>{let e=class e extends Oi{constructor(n,r){super(),this.backend=n,this.injector=r,this.chain=null,this.pendingTasks=p(Di),this.contributeToStability=p(hd)}handle(n){if(this.chain===null){let r=Array.from(new Set([...this.injector.get(ns),...this.injector.get(dg,[])]));this.chain=r.reduceRight((s,o)=>lg(s,o,this.injector),dd)}if(this.contributeToStability){let r=this.pendingTasks.add();return this.chain(n,s=>this.backend.handle(s)).pipe(Nt(()=>this.pendingTasks.remove(r)))}else return this.chain(n,r=>this.backend.handle(r))}};e.\u0275fac=function(r){return new(r||e)(T(Xr),T(tt))},e.\u0275prov=w({token:e,factory:e.\u0275fac});let t=e;return t})();var fg=/^\)\]\}',?\n/;function pg(t){return"responseURL"in t&&t.responseURL?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):null}var cd=(()=>{let e=class e{constructor(n){this.xhrFactory=n}handle(n){if(n.method==="JSONP")throw new U(-2800,!1);let r=this.xhrFactory;return(r.\u0275loadImpl?Y(r.\u0275loadImpl()):D(null)).pipe(ae(()=>new Pe(o=>{let a=r.build();if(a.open(n.method,n.urlWithParams),n.withCredentials&&(a.withCredentials=!0),n.headers.forEach((_,y)=>a.setRequestHeader(_,y.join(","))),n.headers.has("Accept")||a.setRequestHeader("Accept","application/json, text/plain, */*"),!n.headers.has("Content-Type")){let _=n.detectContentTypeHeader();_!==null&&a.setRequestHeader("Content-Type",_)}if(n.responseType){let _=n.responseType.toLowerCase();a.responseType=_!=="json"?_:"text"}let c=n.serializeBody(),l=null,u=()=>{if(l!==null)return l;let _=a.statusText||"OK",y=new yt(a.getAllResponseHeaders()),R=pg(a)||n.url;return l=new es({headers:y,status:a.status,statusText:_,url:R}),l},h=()=>{let{headers:_,status:y,statusText:R,url:P}=u(),b=null;y!==ig&&(b=typeof a.response>"u"?a.responseText:a.response),y===0&&(y=b?ud:0);let M=y>=200&&y<300;if(n.responseType==="json"&&typeof b=="string"){let A=b;b=b.replace(fg,"");try{b=b!==""?JSON.parse(b):null}catch(k){b=A,M&&(M=!1,b={error:k,text:b})}}M?(o.next(new Pi({body:b,headers:_,status:y,statusText:R,url:P||void 0})),o.complete()):o.error(new rt({error:b,headers:_,status:y,statusText:R,url:P||void 0}))},d=_=>{let{url:y}=u(),R=new rt({error:_,status:a.status||0,statusText:a.statusText||"Unknown Error",url:y||void 0});o.error(R)},g=!1,v=_=>{g||(o.next(u()),g=!0);let y={type:$t.DownloadProgress,loaded:_.loaded};_.lengthComputable&&(y.total=_.total),n.responseType==="text"&&a.responseText&&(y.partialText=a.responseText),o.next(y)},E=_=>{let y={type:$t.UploadProgress,loaded:_.loaded};_.lengthComputable&&(y.total=_.total),o.next(y)};return a.addEventListener("load",h),a.addEventListener("error",d),a.addEventListener("timeout",d),a.addEventListener("abort",d),n.reportProgress&&(a.addEventListener("progress",v),c!==null&&a.upload&&a.upload.addEventListener("progress",E)),a.send(c),o.next({type:$t.Sent}),()=>{a.removeEventListener("error",d),a.removeEventListener("abort",d),a.removeEventListener("load",h),a.removeEventListener("timeout",d),n.reportProgress&&(a.removeEventListener("progress",v),c!==null&&a.upload&&a.upload.removeEventListener("progress",E)),a.readyState!==a.DONE&&a.abort()}})))}};e.\u0275fac=function(r){return new(r||e)(T(Kr))},e.\u0275prov=w({token:e,factory:e.\u0275fac});let t=e;return t})(),fd=new O(""),gg="XSRF-TOKEN",mg=new O("",{providedIn:"root",factory:()=>gg}),_g="X-XSRF-TOKEN",vg=new O("",{providedIn:"root",factory:()=>_g}),ts=class{},yg=(()=>{let e=class e{constructor(n,r,s){this.doc=n,this.platform=r,this.cookieName=s,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if(this.platform==="server")return null;let n=this.doc.cookie||"";return n!==this.lastCookieString&&(this.parseCount++,this.lastToken=qr(n,this.cookieName),this.lastCookieString=n),this.lastToken}};e.\u0275fac=function(r){return new(r||e)(T(G),T(nt),T(mg))},e.\u0275prov=w({token:e,factory:e.\u0275fac});let t=e;return t})();function bg(t,e){let i=t.url.toLowerCase();if(!p(fd)||t.method==="GET"||t.method==="HEAD"||i.startsWith("http://")||i.startsWith("https://"))return e(t);let n=p(ts).getToken(),r=p(vg);return n!=null&&!t.headers.has(r)&&(t=t.clone({headers:t.headers.set(r,n)})),e(t)}var sa=function(t){return t[t.Interceptors=0]="Interceptors",t[t.LegacyInterceptors=1]="LegacyInterceptors",t[t.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",t[t.NoXsrfProtection=3]="NoXsrfProtection",t[t.JsonpSupport=4]="JsonpSupport",t[t.RequestsMadeViaParent=5]="RequestsMadeViaParent",t[t.Fetch=6]="Fetch",t}(sa||{});function pd(t,e){return{\u0275kind:t,\u0275providers:e}}function TD(...t){let e=[ra,cd,ad,{provide:Oi,useExisting:ad},{provide:Xr,useFactory:()=>p(og,{optional:!0})??p(cd)},{provide:ns,useValue:bg,multi:!0},{provide:fd,useValue:!0},{provide:ts,useClass:yg}];for(let i of t)e.push(...i.\u0275providers);return He(e)}function CD(t){return pd(sa.Interceptors,t.map(e=>({provide:ns,useValue:e,multi:!0})))}var ld=new O("");function ID(){return pd(sa.LegacyInterceptors,[{provide:ld,useFactory:hg},{provide:ns,useExisting:ld,multi:!0}])}var ca=class extends Ku{constructor(){super(...arguments),this.supportsDOMEvents=!0}},la=class t extends ca{static makeCurrent(){Ju(new t)}onAndCancel(e,i,n){return e.addEventListener(i,n),()=>{e.removeEventListener(i,n)}}dispatchEvent(e,i){e.dispatchEvent(i)}remove(e){e.parentNode&&e.parentNode.removeChild(e)}createElement(e,i){return i=i||this.getDefaultDocument(),i.createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,i){return i==="window"?window:i==="document"?e:i==="body"?e.body:null}getBaseHref(e){let i=Dg();return i==null?null:Eg(i)}resetBaseElement(){Mi=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return qr(document.cookie,e)}},Mi=null;function Dg(){return Mi=Mi||document.querySelector("base"),Mi?Mi.getAttribute("href"):null}function Eg(t){return new URL(t,document.baseURI).pathname}var Tg=(()=>{let e=class e{build(){return new XMLHttpRequest}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:e.\u0275fac});let t=e;return t})(),is=new O(""),vd=(()=>{let e=class e{constructor(n,r){this._zone=r,this._eventNameToPlugin=new Map,n.forEach(s=>{s.manager=this}),this._plugins=n.slice().reverse()}addEventListener(n,r,s){return this._findPluginFor(r).addEventListener(n,r,s)}getZone(){return this._zone}_findPluginFor(n){let r=this._eventNameToPlugin.get(n);if(r)return r;if(r=this._plugins.find(o=>o.supports(n)),!r)throw new U(5101,!1);return this._eventNameToPlugin.set(n,r),r}};e.\u0275fac=function(r){return new(r||e)(T(is),T(H))},e.\u0275prov=w({token:e,factory:e.\u0275fac});let t=e;return t})(),Ni=class{constructor(e){this._doc=e}},oa="ng-app-id",yd=(()=>{let e=class e{constructor(n,r,s,o={}){this.doc=n,this.appId=r,this.nonce=s,this.platformId=o,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=Jr(o),this.resetHostNodes()}addStyles(n){for(let r of n)this.changeUsageCount(r,1)===1&&this.onStyleAdded(r)}removeStyles(n){for(let r of n)this.changeUsageCount(r,-1)<=0&&this.onStyleRemoved(r)}ngOnDestroy(){let n=this.styleNodesInDOM;n&&(n.forEach(r=>r.remove()),n.clear());for(let r of this.getAllStyles())this.onStyleRemoved(r);this.resetHostNodes()}addHost(n){this.hostNodes.add(n);for(let r of this.getAllStyles())this.addStyleToHost(n,r)}removeHost(n){this.hostNodes.delete(n)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(n){for(let r of this.hostNodes)this.addStyleToHost(r,n)}onStyleRemoved(n){let r=this.styleRef;r.get(n)?.elements?.forEach(s=>s.remove()),r.delete(n)}collectServerRenderedStyles(){let n=this.doc.head?.querySelectorAll(`style[${oa}="${this.appId}"]`);if(n?.length){let r=new Map;return n.forEach(s=>{s.textContent!=null&&r.set(s.textContent,s)}),r}return null}changeUsageCount(n,r){let s=this.styleRef;if(s.has(n)){let o=s.get(n);return o.usage+=r,o.usage}return s.set(n,{usage:r,elements:[]}),r}getStyleElement(n,r){let s=this.styleNodesInDOM,o=s?.get(r);if(o?.parentNode===n)return s.delete(r),o.removeAttribute(oa),o;{let a=this.doc.createElement("style");return this.nonce&&a.setAttribute("nonce",this.nonce),a.textContent=r,this.platformIsServer&&a.setAttribute(oa,this.appId),n.appendChild(a),a}}addStyleToHost(n,r){let s=this.getStyleElement(n,r),o=this.styleRef,a=o.get(r)?.elements;a?a.push(s):o.set(r,{elements:[s],usage:1})}resetHostNodes(){let n=this.hostNodes;n.clear(),n.add(this.doc.head)}};e.\u0275fac=function(r){return new(r||e)(T(G),T(Uo),T(jo,8),T(nt))},e.\u0275prov=w({token:e,factory:e.\u0275fac});let t=e;return t})(),aa={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,bd="%COMP%",Cg=`_nghost-${bd}`,Ig=`_ngcontent-${bd}`,Sg=!0,Ag=new O("",{providedIn:"root",factory:()=>Sg});function Og(t){return Ig.replace(da,t)}function Rg(t){return Cg.replace(da,t)}function wd(t,e){return e.map(i=>i.replace(da,t))}var gd=(()=>{let e=class e{constructor(n,r,s,o,a,c,l,u=null){this.eventManager=n,this.sharedStylesHost=r,this.appId=s,this.removeStylesOnCompDestroy=o,this.doc=a,this.platformId=c,this.ngZone=l,this.nonce=u,this.rendererByCompId=new Map,this.platformIsServer=Jr(c),this.defaultRenderer=new ki(n,a,l,this.platformIsServer)}createRenderer(n,r){if(!n||!r)return this.defaultRenderer;this.platformIsServer&&r.encapsulation===bi.ShadowDom&&(r=N(m({},r),{encapsulation:bi.Emulated}));let s=this.getOrCreateRenderer(n,r);return s instanceof rs?s.applyToHost(n):s instanceof xi&&s.applyStyles(),s}getOrCreateRenderer(n,r){let s=this.rendererByCompId,o=s.get(r.id);if(!o){let a=this.doc,c=this.ngZone,l=this.eventManager,u=this.sharedStylesHost,h=this.removeStylesOnCompDestroy,d=this.platformIsServer;switch(r.encapsulation){case bi.Emulated:o=new rs(l,u,r,this.appId,h,a,c,d);break;case bi.ShadowDom:return new ua(l,u,n,r,a,c,this.nonce,d);default:o=new xi(l,u,r,h,a,c,d);break}s.set(r.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}};e.\u0275fac=function(r){return new(r||e)(T(vd),T(yd),T(Uo),T(Ag),T(G),T(nt),T(H),T(jo))},e.\u0275prov=w({token:e,factory:e.\u0275fac});let t=e;return t})(),ki=class{constructor(e,i,n,r){this.eventManager=e,this.doc=i,this.ngZone=n,this.platformIsServer=r,this.data=Object.create(null),this.throwOnSyntheticProps=!0,this.destroyNode=null}destroy(){}createElement(e,i){return i?this.doc.createElementNS(aa[i]||i,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,i){(md(e)?e.content:e).appendChild(i)}insertBefore(e,i,n){e&&(md(e)?e.content:e).insertBefore(i,n)}removeChild(e,i){e&&e.removeChild(i)}selectRootElement(e,i){let n=typeof e=="string"?this.doc.querySelector(e):e;if(!n)throw new U(-5104,!1);return i||(n.textContent=""),n}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,i,n,r){if(r){i=r+":"+i;let s=aa[r];s?e.setAttributeNS(s,i,n):e.setAttribute(i,n)}else e.setAttribute(i,n)}removeAttribute(e,i,n){if(n){let r=aa[n];r?e.removeAttributeNS(r,i):e.removeAttribute(`${n}:${i}`)}else e.removeAttribute(i)}addClass(e,i){e.classList.add(i)}removeClass(e,i){e.classList.remove(i)}setStyle(e,i,n,r){r&(Ei.DashCase|Ei.Important)?e.style.setProperty(i,n,r&Ei.Important?"important":""):e.style[i]=n}removeStyle(e,i,n){n&Ei.DashCase?e.style.removeProperty(i):e.style[i]=""}setProperty(e,i,n){e!=null&&(e[i]=n)}setValue(e,i){e.nodeValue=i}listen(e,i,n){if(typeof e=="string"&&(e=Bn().getGlobalEventTarget(this.doc,e),!e))throw new Error(`Unsupported event target ${e} for event ${i}`);return this.eventManager.addEventListener(e,i,this.decoratePreventDefault(n))}decoratePreventDefault(e){return i=>{if(i==="__ngUnwrap__")return e;(this.platformIsServer?this.ngZone.runGuarded(()=>e(i)):e(i))===!1&&i.preventDefault()}}};function md(t){return t.tagName==="TEMPLATE"&&t.content!==void 0}var ua=class extends ki{constructor(e,i,n,r,s,o,a,c){super(e,s,o,c),this.sharedStylesHost=i,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let l=wd(r.id,r.styles);for(let u of l){let h=document.createElement("style");a&&h.setAttribute("nonce",a),h.textContent=u,this.shadowRoot.appendChild(h)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,i){return super.appendChild(this.nodeOrShadowRoot(e),i)}insertBefore(e,i,n){return super.insertBefore(this.nodeOrShadowRoot(e),i,n)}removeChild(e,i){return super.removeChild(this.nodeOrShadowRoot(e),i)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},xi=class extends ki{constructor(e,i,n,r,s,o,a,c){super(e,s,o,a),this.sharedStylesHost=i,this.removeStylesOnCompDestroy=r,this.styles=c?wd(c,n.styles):n.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}},rs=class extends xi{constructor(e,i,n,r,s,o,a,c){let l=r+"-"+n.id;super(e,i,n,s,o,a,c,l),this.contentAttr=Og(l),this.hostAttr=Rg(l)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,"")}createElement(e,i){let n=super.createElement(e,i);return super.setAttribute(n,this.contentAttr,""),n}},Pg=(()=>{let e=class e extends Ni{constructor(n){super(n)}supports(n){return!0}addEventListener(n,r,s){return n.addEventListener(r,s,!1),()=>this.removeEventListener(n,r,s)}removeEventListener(n,r,s){return n.removeEventListener(r,s)}};e.\u0275fac=function(r){return new(r||e)(T(G))},e.\u0275prov=w({token:e,factory:e.\u0275fac});let t=e;return t})(),Mg=(()=>{let e=class e extends Ni{constructor(n){super(n),this.delegate=p(zu,{optional:!0})}supports(n){return this.delegate?this.delegate.supports(n):!1}addEventListener(n,r,s){return this.delegate.addEventListener(n,r,s)}removeEventListener(n,r,s){return this.delegate.removeEventListener(n,r,s)}};e.\u0275fac=function(r){return new(r||e)(T(G))},e.\u0275prov=w({token:e,factory:e.\u0275fac});let t=e;return t})(),_d=["alt","control","meta","shift"],Ng={"\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"},kg={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey},xg=(()=>{let e=class e extends Ni{constructor(n){super(n)}supports(n){return e.parseEventName(n)!=null}addEventListener(n,r,s){let o=e.parseEventName(r),a=e.eventCallback(o.fullKey,s,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Bn().onAndCancel(n,o.domEventName,a))}static parseEventName(n){let r=n.toLowerCase().split("."),s=r.shift();if(r.length===0||!(s==="keydown"||s==="keyup"))return null;let o=e._normalizeKey(r.pop()),a="",c=r.indexOf("code");if(c>-1&&(r.splice(c,1),a="code."),_d.forEach(u=>{let h=r.indexOf(u);h>-1&&(r.splice(h,1),a+=u+".")}),a+=o,r.length!=0||o.length===0)return null;let l={};return l.domEventName=s,l.fullKey=a,l}static matchEventFullKeyCode(n,r){let s=Ng[n.key]||n.key,o="";return r.indexOf("code.")>-1&&(s=n.code,o="code."),s==null||!s?!1:(s=s.toLowerCase(),s===" "?s="space":s==="."&&(s="dot"),_d.forEach(a=>{if(a!==s){let c=kg[a];c(n)&&(o+=a+".")}}),o+=s,o===r)}static eventCallback(n,r,s){return o=>{e.matchEventFullKeyCode(o,n)&&s.runGuarded(()=>r(o))}}static _normalizeKey(n){return n==="esc"?"escape":n}};e.\u0275fac=function(r){return new(r||e)(T(G))},e.\u0275prov=w({token:e,factory:e.\u0275fac});let t=e;return t})();function KD(t,e){return Gu(m({rootComponent:t},Fg(e)))}function Fg(t){return{appProviders:[...jg,...t?.providers??[]],platformProviders:Ug}}function Lg(){la.makeCurrent()}function Bg(){return new Vo}function Vg(){return wu(document),document}var Ug=[{provide:nt,useValue:Xu},{provide:Du,useValue:Lg,multi:!0},{provide:G,useFactory:Vg,deps:[]}];var jg=[{provide:bu,useValue:"root"},{provide:Vo,useFactory:Bg,deps:[]},{provide:is,useClass:Pg,multi:!0,deps:[G,H,nt]},{provide:is,useClass:xg,multi:!0,deps:[G]},{provide:is,useClass:Mg,multi:!0},gd,yd,vd,{provide:Mu,useExisting:gd},{provide:Kr,useClass:Tg,deps:[]},[]];var Dd=(()=>{let e=class e{constructor(n){this._doc=n}getTitle(){return this._doc.title}setTitle(n){this._doc.title=n||""}};e.\u0275fac=function(r){return new(r||e)(T(G))},e.\u0275prov=w({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var ha=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:function(r){let s=null;return r?s=new(r||e):s=T($g),s},providedIn:"root"});let t=e;return t})(),$g=(()=>{let e=class e extends ha{constructor(n){super(),this._doc=n}sanitize(n,r){if(r==null)return null;switch(n){case pt.NONE:return r;case pt.HTML:return xn(r,"HTML")?kn(r):Ou(this._doc,String(r)).toString();case pt.STYLE:return xn(r,"Style")?kn(r):r;case pt.SCRIPT:if(xn(r,"Script"))return kn(r);throw new U(5200,!1);case pt.URL:return xn(r,"URL")?kn(r):Au(String(r));case pt.RESOURCE_URL:if(xn(r,"ResourceURL"))return kn(r);throw new U(5201,!1);default:throw new U(5202,!1)}}bypassSecurityTrustHtml(n){return Eu(n)}bypassSecurityTrustStyle(n){return Tu(n)}bypassSecurityTrustScript(n){return Cu(n)}bypassSecurityTrustUrl(n){return Iu(n)}bypassSecurityTrustResourceUrl(n){return Su(n)}};e.\u0275fac=function(r){return new(r||e)(T(G))},e.\u0275prov=w({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var S="primary",Qi=Symbol("RouteTitle"),_a=class{constructor(e){this.params=e||{}}has(e){return Object.prototype.hasOwnProperty.call(this.params,e)}get(e){if(this.has(e)){let i=this.params[e];return Array.isArray(i)?i[0]:i}return null}getAll(e){if(this.has(e)){let i=this.params[e];return Array.isArray(i)?i:[i]}return[]}get keys(){return Object.keys(this.params)}};function Gn(t){return new _a(t)}function Gg(t,e,i){let n=i.path.split("/");if(n.length>t.length||i.pathMatch==="full"&&(e.hasChildren()||n.length<t.length))return null;let r={};for(let s=0;s<n.length;s++){let o=n[s],a=t[s];if(o[0]===":")r[o.substring(1)]=a;else if(o!==a.path)return null}return{consumed:t.slice(0,n.length),posParams:r}}function zg(t,e){if(t.length!==e.length)return!1;for(let i=0;i<t.length;++i)if(!st(t[i],e[i]))return!1;return!0}function st(t,e){let i=t?va(t):void 0,n=e?va(e):void 0;if(!i||!n||i.length!=n.length)return!1;let r;for(let s=0;s<i.length;s++)if(r=i[s],!kd(t[r],e[r]))return!1;return!0}function va(t){return[...Object.keys(t),...Object.getOwnPropertySymbols(t)]}function kd(t,e){if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;let i=[...t].sort(),n=[...e].sort();return i.every((r,s)=>n[s]===r)}else return t===e}function xd(t){return t.length>0?t[t.length-1]:null}function zt(t){return ou(t)?t:Hr(t)?Y(Promise.resolve(t)):D(t)}var Wg={exact:Ld,subset:Bd},Fd={exact:qg,subset:Jg,ignored:()=>!0};function Td(t,e,i){return Wg[i.paths](t.root,e.root,i.matrixParams)&&Fd[i.queryParams](t.queryParams,e.queryParams)&&!(i.fragment==="exact"&&t.fragment!==e.fragment)}function qg(t,e){return st(t,e)}function Ld(t,e,i){if(!dn(t.segments,e.segments)||!as(t.segments,e.segments,i)||t.numberOfChildren!==e.numberOfChildren)return!1;for(let n in e.children)if(!t.children[n]||!Ld(t.children[n],e.children[n],i))return!1;return!0}function Jg(t,e){return Object.keys(e).length<=Object.keys(t).length&&Object.keys(e).every(i=>kd(t[i],e[i]))}function Bd(t,e,i){return Vd(t,e,e.segments,i)}function Vd(t,e,i,n){if(t.segments.length>i.length){let r=t.segments.slice(0,i.length);return!(!dn(r,i)||e.hasChildren()||!as(r,i,n))}else if(t.segments.length===i.length){if(!dn(t.segments,i)||!as(t.segments,i,n))return!1;for(let r in e.children)if(!t.children[r]||!Bd(t.children[r],e.children[r],n))return!1;return!0}else{let r=i.slice(0,t.segments.length),s=i.slice(t.segments.length);return!dn(t.segments,r)||!as(t.segments,r,n)||!t.children[S]?!1:Vd(t.children[S],e,s,n)}}function as(t,e,i){return e.every((n,r)=>Fd[i](t[r].parameters,n.parameters))}var wt=class{constructor(e=new L([],{}),i={},n=null){this.root=e,this.queryParams=i,this.fragment=n}get queryParamMap(){return this._queryParamMap??=Gn(this.queryParams),this._queryParamMap}toString(){return Qg.serialize(this)}},L=class{constructor(e,i){this.segments=e,this.children=i,this.parent=null,Object.values(i).forEach(n=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return cs(this)}},un=class{constructor(e,i){this.path=e,this.parameters=i}get parameterMap(){return this._parameterMap??=Gn(this.parameters),this._parameterMap}toString(){return jd(this)}};function Kg(t,e){return dn(t,e)&&t.every((i,n)=>st(i.parameters,e[n].parameters))}function dn(t,e){return t.length!==e.length?!1:t.every((i,n)=>i.path===e[n].path)}function Yg(t,e){let i=[];return Object.entries(t.children).forEach(([n,r])=>{n===S&&(i=i.concat(e(r,n)))}),Object.entries(t.children).forEach(([n,r])=>{n!==S&&(i=i.concat(e(r,n)))}),i}var Zi=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:()=>new zn,providedIn:"root"});let t=e;return t})(),zn=class{parse(e){let i=new ba(e);return new wt(i.parseRootSegment(),i.parseQueryParams(),i.parseFragment())}serialize(e){let i=`/${Fi(e.root,!0)}`,n=em(e.queryParams),r=typeof e.fragment=="string"?`#${Zg(e.fragment)}`:"";return`${i}${n}${r}`}},Qg=new zn;function cs(t){return t.segments.map(e=>jd(e)).join("/")}function Fi(t,e){if(!t.hasChildren())return cs(t);if(e){let i=t.children[S]?Fi(t.children[S],!1):"",n=[];return Object.entries(t.children).forEach(([r,s])=>{r!==S&&n.push(`${r}:${Fi(s,!1)}`)}),n.length>0?`${i}(${n.join("//")})`:i}else{let i=Yg(t,(n,r)=>r===S?[Fi(t.children[S],!1)]:[`${r}:${Fi(n,!1)}`]);return Object.keys(t.children).length===1&&t.children[S]!=null?`${cs(t)}/${i[0]}`:`${cs(t)}/(${i.join("//")})`}}function Ud(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function ss(t){return Ud(t).replace(/%3B/gi,";")}function Zg(t){return encodeURI(t)}function ya(t){return Ud(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function ls(t){return decodeURIComponent(t)}function Cd(t){return ls(t.replace(/\+/g,"%20"))}function jd(t){return`${ya(t.path)}${Xg(t.parameters)}`}function Xg(t){return Object.entries(t).map(([e,i])=>`;${ya(e)}=${ya(i)}`).join("")}function em(t){let e=Object.entries(t).map(([i,n])=>Array.isArray(n)?n.map(r=>`${ss(i)}=${ss(r)}`).join("&"):`${ss(i)}=${ss(n)}`).filter(i=>i);return e.length?`?${e.join("&")}`:""}var tm=/^[^\/()?;#]+/;function fa(t){let e=t.match(tm);return e?e[0]:""}var nm=/^[^\/()?;=#]+/;function im(t){let e=t.match(nm);return e?e[0]:""}var rm=/^[^=?&#]+/;function sm(t){let e=t.match(rm);return e?e[0]:""}var om=/^[^&#]+/;function am(t){let e=t.match(om);return e?e[0]:""}var ba=class{constructor(e){this.url=e,this.remaining=e}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new L([],{}):new L([],this.parseChildren())}parseQueryParams(){let e={};if(this.consumeOptional("?"))do this.parseQueryParam(e);while(this.consumeOptional("&"));return e}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let e=[];for(this.peekStartsWith("(")||e.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),e.push(this.parseSegment());let i={};this.peekStartsWith("/(")&&(this.capture("/"),i=this.parseParens(!0));let n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(e.length>0||Object.keys(i).length>0)&&(n[S]=new L(e,i)),n}parseSegment(){let e=fa(this.remaining);if(e===""&&this.peekStartsWith(";"))throw new U(4009,!1);return this.capture(e),new un(ls(e),this.parseMatrixParams())}parseMatrixParams(){let e={};for(;this.consumeOptional(";");)this.parseParam(e);return e}parseParam(e){let i=im(this.remaining);if(!i)return;this.capture(i);let n="";if(this.consumeOptional("=")){let r=fa(this.remaining);r&&(n=r,this.capture(n))}e[ls(i)]=ls(n)}parseQueryParam(e){let i=sm(this.remaining);if(!i)return;this.capture(i);let n="";if(this.consumeOptional("=")){let o=am(this.remaining);o&&(n=o,this.capture(n))}let r=Cd(i),s=Cd(n);if(e.hasOwnProperty(r)){let o=e[r];Array.isArray(o)||(o=[o],e[r]=o),o.push(s)}else e[r]=s}parseParens(e){let i={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let n=fa(this.remaining),r=this.remaining[n.length];if(r!=="/"&&r!==")"&&r!==";")throw new U(4010,!1);let s;n.indexOf(":")>-1?(s=n.slice(0,n.indexOf(":")),this.capture(s),this.capture(":")):e&&(s=S);let o=this.parseChildren();i[s]=Object.keys(o).length===1?o[S]:new L([],o),this.consumeOptional("//")}return i}peekStartsWith(e){return this.remaining.startsWith(e)}consumeOptional(e){return this.peekStartsWith(e)?(this.remaining=this.remaining.substring(e.length),!0):!1}capture(e){if(!this.consumeOptional(e))throw new U(4011,!1)}};function $d(t){return t.segments.length>0?new L([],{[S]:t}):t}function Hd(t){let e={};for(let[n,r]of Object.entries(t.children)){let s=Hd(r);if(n===S&&s.segments.length===0&&s.hasChildren())for(let[o,a]of Object.entries(s.children))e[o]=a;else(s.segments.length>0||s.hasChildren())&&(e[n]=s)}let i=new L(t.segments,e);return cm(i)}function cm(t){if(t.numberOfChildren===1&&t.children[S]){let e=t.children[S];return new L(t.segments.concat(e.segments),e.children)}return t}function $i(t){return t instanceof wt}function lm(t,e,i=null,n=null){let r=Gd(t);return zd(r,e,i,n)}function Gd(t){let e;function i(s){let o={};for(let c of s.children){let l=i(c);o[c.outlet]=l}let a=new L(s.url,o);return s===t&&(e=a),a}let n=i(t.root),r=$d(n);return e??r}function zd(t,e,i,n){let r=t;for(;r.parent;)r=r.parent;if(e.length===0)return pa(r,r,r,i,n);let s=um(e);if(s.toRoot())return pa(r,r,new L([],{}),i,n);let o=dm(s,r,t),a=o.processChildren?Vi(o.segmentGroup,o.index,s.commands):qd(o.segmentGroup,o.index,s.commands);return pa(r,o.segmentGroup,a,i,n)}function us(t){return typeof t=="object"&&t!=null&&!t.outlets&&!t.segmentPath}function Hi(t){return typeof t=="object"&&t!=null&&t.outlets}function pa(t,e,i,n,r){let s={};n&&Object.entries(n).forEach(([c,l])=>{s[c]=Array.isArray(l)?l.map(u=>`${u}`):`${l}`});let o;t===e?o=i:o=Wd(t,e,i);let a=$d(Hd(o));return new wt(a,s,r)}function Wd(t,e,i){let n={};return Object.entries(t.children).forEach(([r,s])=>{s===e?n[r]=i:n[r]=Wd(s,e,i)}),new L(t.segments,n)}var ds=class{constructor(e,i,n){if(this.isAbsolute=e,this.numberOfDoubleDots=i,this.commands=n,e&&n.length>0&&us(n[0]))throw new U(4003,!1);let r=n.find(Hi);if(r&&r!==xd(n))throw new U(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function um(t){if(typeof t[0]=="string"&&t.length===1&&t[0]==="/")return new ds(!0,0,t);let e=0,i=!1,n=t.reduce((r,s,o)=>{if(typeof s=="object"&&s!=null){if(s.outlets){let a={};return Object.entries(s.outlets).forEach(([c,l])=>{a[c]=typeof l=="string"?l.split("/"):l}),[...r,{outlets:a}]}if(s.segmentPath)return[...r,s.segmentPath]}return typeof s!="string"?[...r,s]:o===0?(s.split("/").forEach((a,c)=>{c==0&&a==="."||(c==0&&a===""?i=!0:a===".."?e++:a!=""&&r.push(a))}),r):[...r,s]},[]);return new ds(i,e,n)}var jn=class{constructor(e,i,n){this.segmentGroup=e,this.processChildren=i,this.index=n}};function dm(t,e,i){if(t.isAbsolute)return new jn(e,!0,0);if(!i)return new jn(e,!1,NaN);if(i.parent===null)return new jn(i,!0,0);let n=us(t.commands[0])?0:1,r=i.segments.length-1+n;return hm(i,r,t.numberOfDoubleDots)}function hm(t,e,i){let n=t,r=e,s=i;for(;s>r;){if(s-=r,n=n.parent,!n)throw new U(4005,!1);r=n.segments.length}return new jn(n,!1,r-s)}function fm(t){return Hi(t[0])?t[0].outlets:{[S]:t}}function qd(t,e,i){if(t??=new L([],{}),t.segments.length===0&&t.hasChildren())return Vi(t,e,i);let n=pm(t,e,i),r=i.slice(n.commandIndex);if(n.match&&n.pathIndex<t.segments.length){let s=new L(t.segments.slice(0,n.pathIndex),{});return s.children[S]=new L(t.segments.slice(n.pathIndex),t.children),Vi(s,0,r)}else return n.match&&r.length===0?new L(t.segments,{}):n.match&&!t.hasChildren()?wa(t,e,i):n.match?Vi(t,0,r):wa(t,e,i)}function Vi(t,e,i){if(i.length===0)return new L(t.segments,{});{let n=fm(i),r={};if(Object.keys(n).some(s=>s!==S)&&t.children[S]&&t.numberOfChildren===1&&t.children[S].segments.length===0){let s=Vi(t.children[S],e,i);return new L(t.segments,s.children)}return Object.entries(n).forEach(([s,o])=>{typeof o=="string"&&(o=[o]),o!==null&&(r[s]=qd(t.children[s],e,o))}),Object.entries(t.children).forEach(([s,o])=>{n[s]===void 0&&(r[s]=o)}),new L(t.segments,r)}}function pm(t,e,i){let n=0,r=e,s={match:!1,pathIndex:0,commandIndex:0};for(;r<t.segments.length;){if(n>=i.length)return s;let o=t.segments[r],a=i[n];if(Hi(a))break;let c=`${a}`,l=n<i.length-1?i[n+1]:null;if(r>0&&c===void 0)break;if(c&&l&&typeof l=="object"&&l.outlets===void 0){if(!Sd(c,l,o))return s;n+=2}else{if(!Sd(c,{},o))return s;n++}r++}return{match:!0,pathIndex:r,commandIndex:n}}function wa(t,e,i){let n=t.segments.slice(0,e),r=0;for(;r<i.length;){let s=i[r];if(Hi(s)){let c=gm(s.outlets);return new L(n,c)}if(r===0&&us(i[0])){let c=t.segments[e];n.push(new un(c.path,Id(i[0]))),r++;continue}let o=Hi(s)?s.outlets[S]:`${s}`,a=r<i.length-1?i[r+1]:null;o&&a&&us(a)?(n.push(new un(o,Id(a))),r+=2):(n.push(new un(o,{})),r++)}return new L(n,{})}function gm(t){let e={};return Object.entries(t).forEach(([i,n])=>{typeof n=="string"&&(n=[n]),n!==null&&(e[i]=wa(new L([],{}),0,n))}),e}function Id(t){let e={};return Object.entries(t).forEach(([i,n])=>e[i]=`${n}`),e}function Sd(t,e,i){return t==i.path&&st(e,i.parameters)}var Ui="imperative",ie=function(t){return t[t.NavigationStart=0]="NavigationStart",t[t.NavigationEnd=1]="NavigationEnd",t[t.NavigationCancel=2]="NavigationCancel",t[t.NavigationError=3]="NavigationError",t[t.RoutesRecognized=4]="RoutesRecognized",t[t.ResolveStart=5]="ResolveStart",t[t.ResolveEnd=6]="ResolveEnd",t[t.GuardsCheckStart=7]="GuardsCheckStart",t[t.GuardsCheckEnd=8]="GuardsCheckEnd",t[t.RouteConfigLoadStart=9]="RouteConfigLoadStart",t[t.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",t[t.ChildActivationStart=11]="ChildActivationStart",t[t.ChildActivationEnd=12]="ChildActivationEnd",t[t.ActivationStart=13]="ActivationStart",t[t.ActivationEnd=14]="ActivationEnd",t[t.Scroll=15]="Scroll",t[t.NavigationSkipped=16]="NavigationSkipped",t}(ie||{}),Le=class{constructor(e,i){this.id=e,this.url=i}},Wn=class extends Le{constructor(e,i,n="imperative",r=null){super(e,i),this.type=ie.NavigationStart,this.navigationTrigger=n,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},Dt=class extends Le{constructor(e,i,n){super(e,i),this.urlAfterRedirects=n,this.type=ie.NavigationEnd}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},Re=function(t){return t[t.Redirect=0]="Redirect",t[t.SupersededByNewNavigation=1]="SupersededByNewNavigation",t[t.NoDataFromResolver=2]="NoDataFromResolver",t[t.GuardRejected=3]="GuardRejected",t}(Re||{}),hs=function(t){return t[t.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",t[t.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",t}(hs||{}),bt=class extends Le{constructor(e,i,n,r){super(e,i),this.reason=n,this.code=r,this.type=ie.NavigationCancel}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},Gt=class extends Le{constructor(e,i,n,r){super(e,i),this.reason=n,this.code=r,this.type=ie.NavigationSkipped}},Gi=class extends Le{constructor(e,i,n,r){super(e,i),this.error=n,this.target=r,this.type=ie.NavigationError}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},fs=class extends Le{constructor(e,i,n,r){super(e,i),this.urlAfterRedirects=n,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 Le{constructor(e,i,n,r){super(e,i),this.urlAfterRedirects=n,this.state=r,this.type=ie.GuardsCheckStart}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Ea=class extends Le{constructor(e,i,n,r,s){super(e,i),this.urlAfterRedirects=n,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})`}},Ta=class extends Le{constructor(e,i,n,r){super(e,i),this.urlAfterRedirects=n,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 Le{constructor(e,i,n,r){super(e,i),this.urlAfterRedirects=n,this.state=r,this.type=ie.ResolveEnd}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Ia=class{constructor(e){this.route=e,this.type=ie.RouteConfigLoadStart}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},Sa=class{constructor(e){this.route=e,this.type=ie.RouteConfigLoadEnd}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},Aa=class{constructor(e){this.snapshot=e,this.type=ie.ChildActivationStart}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Oa=class{constructor(e){this.snapshot=e,this.type=ie.ChildActivationEnd}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Ra=class{constructor(e){this.snapshot=e,this.type=ie.ActivationStart}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Pa=class{constructor(e){this.snapshot=e,this.type=ie.ActivationEnd}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},ps=class{constructor(e,i,n){this.routerEvent=e,this.position=i,this.anchor=n,this.type=ie.Scroll}toString(){let e=this.position?`${this.position[0]}, ${this.position[1]}`:null;return`Scroll(anchor: '${this.anchor}', position: '${e}')`}},zi=class{},qn=class{constructor(e,i){this.url=e,this.navigationBehaviorOptions=i}};function mm(t,e){return t.providers&&!t._injector&&(t._injector=zo(t.providers,e,`Route: ${t.path}`)),t._injector??e}function qe(t){return t.outlet||S}function _m(t,e){let i=t.filter(n=>qe(n)===e);return i.push(...t.filter(n=>qe(n)!==e)),i}function Xi(t){if(!t)return null;if(t.routeConfig?._injector)return t.routeConfig._injector;for(let e=t.parent;e;e=e.parent){let i=e.routeConfig;if(i?._loadedInjector)return i._loadedInjector;if(i?._injector)return i._injector}return null}var Ma=class{get injector(){return Xi(this.route?.snapshot)??this.rootInjector}set injector(e){}constructor(e){this.rootInjector=e,this.outlet=null,this.route=null,this.children=new er(this.rootInjector),this.attachRef=null}},er=(()=>{let e=class e{constructor(n){this.rootInjector=n,this.contexts=new Map}onChildOutletCreated(n,r){let s=this.getOrCreateContext(n);s.outlet=r,this.contexts.set(n,s)}onChildOutletDestroyed(n){let r=this.getContext(n);r&&(r.outlet=null,r.attachRef=null)}onOutletDeactivated(){let n=this.contexts;return this.contexts=new Map,n}onOutletReAttached(n){this.contexts=n}getOrCreateContext(n){let r=this.getContext(n);return r||(r=new Ma(this.rootInjector),this.contexts.set(n,r)),r}getContext(n){return this.contexts.get(n)||null}};e.\u0275fac=function(r){return new(r||e)(T(tt))},e.\u0275prov=w({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),gs=class{constructor(e){this._root=e}get root(){return this._root.value}parent(e){let i=this.pathFromRoot(e);return i.length>1?i[i.length-2]:null}children(e){let i=Na(e,this._root);return i?i.children.map(n=>n.value):[]}firstChild(e){let i=Na(e,this._root);return i&&i.children.length>0?i.children[0].value:null}siblings(e){let i=ka(e,this._root);return i.length<2?[]:i[i.length-2].children.map(r=>r.value).filter(r=>r!==e)}pathFromRoot(e){return ka(e,this._root).map(i=>i.value)}};function Na(t,e){if(t===e.value)return e;for(let i of e.children){let n=Na(t,i);if(n)return n}return null}function ka(t,e){if(t===e.value)return[e];for(let i of e.children){let n=ka(t,i);if(n.length)return n.unshift(e),n}return[]}var Oe=class{constructor(e,i){this.value=e,this.children=i}toString(){return`TreeNode(${this.value})`}};function Un(t){let e={};return t&&t.children.forEach(i=>e[i.value.outlet]=i),e}var ms=class extends gs{constructor(e,i){super(e),this.snapshot=i,Ha(this,e)}toString(){return this.snapshot.toString()}};function Jd(t){let e=vm(t),i=new me([new un("",{})]),n=new me({}),r=new me({}),s=new me({}),o=new me(""),a=new Et(i,n,s,o,r,S,t,e.root);return a.snapshot=e.root,new ms(new Oe(a,[]),e)}function vm(t){let e={},i={},n={},r="",s=new $n([],e,n,r,i,S,t,null,{});return new vs("",new Oe(s,[]))}var Et=class{constructor(e,i,n,r,s,o,a,c){this.urlSubject=e,this.paramsSubject=i,this.queryParamsSubject=n,this.fragmentSubject=r,this.dataSubject=s,this.outlet=o,this.component=a,this._futureSnapshot=c,this.title=this.dataSubject?.pipe(I(l=>l[Qi]))??D(void 0),this.url=e,this.params=i,this.queryParams=n,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(e=>Gn(e))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(I(e=>Gn(e))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function _s(t,e,i="emptyOnly"){let n,{routeConfig:r}=t;return e!==null&&(i==="always"||r?.path===""||!e.component&&!e.routeConfig?.loadComponent)?n={params:m(m({},e.params),t.params),data:m(m({},e.data),t.data),resolve:m(m(m(m({},t.data),e.data),r?.data),t._resolvedData)}:n={params:m({},t.params),data:m({},t.data),resolve:m(m({},t.data),t._resolvedData??{})},r&&Yd(r)&&(n.resolve[Qi]=r.title),n}var $n=class{get title(){return this.data?.[Qi]}constructor(e,i,n,r,s,o,a,c,l){this.url=e,this.params=i,this.queryParams=n,this.fragment=r,this.data=s,this.outlet=o,this.component=a,this.routeConfig=c,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??=Gn(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=Gn(this.queryParams),this._queryParamMap}toString(){let e=this.url.map(n=>n.toString()).join("/"),i=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${e}', path:'${i}')`}},vs=class extends gs{constructor(e,i){super(i),this.url=e,Ha(this,i)}toString(){return Kd(this._root)}};function Ha(t,e){e.value._routerState=t,e.children.forEach(i=>Ha(t,i))}function Kd(t){let e=t.children.length>0?` { ${t.children.map(Kd).join(", ")} } `:"";return`${t.value}${e}`}function ga(t){if(t.snapshot){let e=t.snapshot,i=t._futureSnapshot;t.snapshot=i,st(e.queryParams,i.queryParams)||t.queryParamsSubject.next(i.queryParams),e.fragment!==i.fragment&&t.fragmentSubject.next(i.fragment),st(e.params,i.params)||t.paramsSubject.next(i.params),zg(e.url,i.url)||t.urlSubject.next(i.url),st(e.data,i.data)||t.dataSubject.next(i.data)}else t.snapshot=t._futureSnapshot,t.dataSubject.next(t._futureSnapshot.data)}function xa(t,e){let i=st(t.params,e.params)&&Kg(t.url,e.url),n=!t.parent!=!e.parent;return i&&!n&&(!t.parent||xa(t.parent,e.parent))}function Yd(t){return typeof t.title=="string"||t.title===null}var ym=(()=>{let e=class e{constructor(){this.activated=null,this._activatedRoute=null,this.name=S,this.activateEvents=new $,this.deactivateEvents=new $,this.attachEvents=new $,this.detachEvents=new $,this.parentContexts=p(er),this.location=p(Ur),this.changeDetector=p(vt),this.inputBinder=p(Ds,{optional:!0}),this.supportsBindingToComponentInputs=!0}get activatedComponentRef(){return this.activated}ngOnChanges(n){if(n.name){let{firstChange:r,previousValue:s}=n.name;if(r)return;this.isTrackedInParentContexts(s)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(s)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(n){return this.parentContexts.getContext(n)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let n=this.parentContexts.getContext(this.name);n?.route&&(n.attachRef?this.attach(n.attachRef,n.route):this.activateWith(n.route,n.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 n=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(n.instance),n}attach(n,r){this.activated=n,this._activatedRoute=r,this.location.insert(n.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(n.instance)}deactivate(){if(this.activated){let n=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(n)}}activateWith(n,r){if(this.isActivated)throw new U(4013,!1);this._activatedRoute=n;let s=this.location,a=n.snapshot.component,c=this.parentContexts.getOrCreateContext(this.name).children,l=new Fa(n,c,s.injector);this.activated=s.createComponent(a,{index:s.length,injector:l,environmentInjector:r}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=B({type:e,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[ft]});let t=e;return t})(),Fa=class t{__ngOutletInjector(e){return new t(this.route,this.childContexts,e)}constructor(e,i,n){this.route=e,this.childContexts=i,this.parent=n}get(e,i){return e===Et?this.route:e===er?this.childContexts:this.parent.get(e,i)}},Ds=new O(""),Ad=(()=>{let e=class e{constructor(){this.outletDataSubscriptions=new Map}bindActivatedRouteToOutletComponent(n){this.unsubscribeFromRouteData(n),this.subscribeToRouteData(n)}unsubscribeFromRouteData(n){this.outletDataSubscriptions.get(n)?.unsubscribe(),this.outletDataSubscriptions.delete(n)}subscribeToRouteData(n){let{activatedRoute:r}=n,s=yi([r.queryParams,r.params,r.data]).pipe(ae(([o,a,c],l)=>(c=m(m(m({},o),a),c),l===0?D(c):Promise.resolve(c)))).subscribe(o=>{if(!n.isActivated||!n.activatedComponentRef||n.activatedRoute!==r||r.component===null){this.unsubscribeFromRouteData(n);return}let a=qu(r.component);if(!a){this.unsubscribeFromRouteData(n);return}for(let{templateName:c}of a.inputs)n.activatedComponentRef.setInput(c,o[c])});this.outletDataSubscriptions.set(n,s)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:e.\u0275fac});let t=e;return t})();function bm(t,e,i){let n=Wi(t,e._root,i?i._root:void 0);return new ms(n,e)}function Wi(t,e,i){if(i&&t.shouldReuseRoute(e.value,i.value.snapshot)){let n=i.value;n._futureSnapshot=e.value;let r=wm(t,e,i);return new Oe(n,r)}else{if(t.shouldAttach(e.value)){let s=t.retrieve(e.value);if(s!==null){let o=s.route;return o.value._futureSnapshot=e.value,o.children=e.children.map(a=>Wi(t,a)),o}}let n=Dm(e.value),r=e.children.map(s=>Wi(t,s));return new Oe(n,r)}}function wm(t,e,i){return e.children.map(n=>{for(let r of i.children)if(t.shouldReuseRoute(n.value,r.value.snapshot))return Wi(t,n,r);return Wi(t,n)})}function Dm(t){return new Et(new me(t.url),new me(t.params),new me(t.queryParams),new me(t.fragment),new me(t.data),t.outlet,t.component,t)}var qi=class{constructor(e,i){this.redirectTo=e,this.navigationBehaviorOptions=i}},Qd="ngNavigationCancelingError";function ys(t,e){let{redirectTo:i,navigationBehaviorOptions:n}=$i(e)?{redirectTo:e,navigationBehaviorOptions:void 0}:e,r=Zd(!1,Re.Redirect);return r.url=i,r.navigationBehaviorOptions=n,r}function Zd(t,e){let i=new Error(`NavigationCancelingError: ${t||""}`);return i[Qd]=!0,i.cancellationCode=e,i}function Em(t){return Xd(t)&&$i(t.url)}function Xd(t){return!!t&&t[Qd]}var Tm=(t,e,i,n)=>I(r=>(new La(e,r.targetRouterState,r.currentRouterState,i,n).activate(t),r)),La=class{constructor(e,i,n,r,s){this.routeReuseStrategy=e,this.futureState=i,this.currState=n,this.forwardEvent=r,this.inputBindingEnabled=s}activate(e){let i=this.futureState._root,n=this.currState?this.currState._root:null;this.deactivateChildRoutes(i,n,e),ga(this.futureState.root),this.activateChildRoutes(i,n,e)}deactivateChildRoutes(e,i,n){let r=Un(i);e.children.forEach(s=>{let o=s.value.outlet;this.deactivateRoutes(s,r[o],n),delete r[o]}),Object.values(r).forEach(s=>{this.deactivateRouteAndItsChildren(s,n)})}deactivateRoutes(e,i,n){let r=e.value,s=i?i.value:null;if(r===s)if(r.component){let o=n.getContext(r.outlet);o&&this.deactivateChildRoutes(e,i,o.children)}else this.deactivateChildRoutes(e,i,n);else s&&this.deactivateRouteAndItsChildren(i,n)}deactivateRouteAndItsChildren(e,i){e.value.component&&this.routeReuseStrategy.shouldDetach(e.value.snapshot)?this.detachAndStoreRouteSubtree(e,i):this.deactivateRouteAndOutlet(e,i)}detachAndStoreRouteSubtree(e,i){let n=i.getContext(e.value.outlet),r=n&&e.value.component?n.children:i,s=Un(e);for(let o of Object.values(s))this.deactivateRouteAndItsChildren(o,r);if(n&&n.outlet){let o=n.outlet.detach(),a=n.children.onOutletDeactivated();this.routeReuseStrategy.store(e.value.snapshot,{componentRef:o,route:e,contexts:a})}}deactivateRouteAndOutlet(e,i){let n=i.getContext(e.value.outlet),r=n&&e.value.component?n.children:i,s=Un(e);for(let o of Object.values(s))this.deactivateRouteAndItsChildren(o,r);n&&(n.outlet&&(n.outlet.deactivate(),n.children.onOutletDeactivated()),n.attachRef=null,n.route=null)}activateChildRoutes(e,i,n){let r=Un(i);e.children.forEach(s=>{this.activateRoutes(s,r[s.value.outlet],n),this.forwardEvent(new Pa(s.value.snapshot))}),e.children.length&&this.forwardEvent(new Oa(e.value.snapshot))}activateRoutes(e,i,n){let r=e.value,s=i?i.value:null;if(ga(r),r===s)if(r.component){let o=n.getOrCreateContext(r.outlet);this.activateChildRoutes(e,i,o.children)}else this.activateChildRoutes(e,i,n);else if(r.component){let o=n.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){let a=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),o.children.onOutletReAttached(a.contexts),o.attachRef=a.componentRef,o.route=a.route.value,o.outlet&&o.outlet.attach(a.componentRef,a.route.value),ga(a.route.value),this.activateChildRoutes(e,null,o.children)}else o.attachRef=null,o.route=r,o.outlet&&o.outlet.activateWith(r,o.injector),this.activateChildRoutes(e,null,o.children)}else this.activateChildRoutes(e,null,n)}},bs=class{constructor(e){this.path=e,this.route=this.path[this.path.length-1]}},Hn=class{constructor(e,i){this.component=e,this.route=i}};function Cm(t,e,i){let n=t._root,r=e?e._root:null;return Li(n,r,i,[n.value])}function Im(t){let e=t.routeConfig?t.routeConfig.canActivateChild:null;return!e||e.length===0?null:{node:t,guards:e}}function Kn(t,e){let i=Symbol(),n=e.get(t,i);return n===i?typeof t=="function"&&!vu(t)?t:e.get(t):n}function Li(t,e,i,n,r={canDeactivateChecks:[],canActivateChecks:[]}){let s=Un(e);return t.children.forEach(o=>{Sm(o,s[o.value.outlet],i,n.concat([o.value]),r),delete s[o.value.outlet]}),Object.entries(s).forEach(([o,a])=>ji(a,i.getContext(o),r)),r}function Sm(t,e,i,n,r={canDeactivateChecks:[],canActivateChecks:[]}){let s=t.value,o=e?e.value:null,a=i?i.getContext(t.value.outlet):null;if(o&&s.routeConfig===o.routeConfig){let c=Am(o,s,s.routeConfig.runGuardsAndResolvers);c?r.canActivateChecks.push(new bs(n)):(s.data=o.data,s._resolvedData=o._resolvedData),s.component?Li(t,e,a?a.children:null,n,r):Li(t,e,i,n,r),c&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new Hn(a.outlet.component,o))}else o&&ji(e,a,r),r.canActivateChecks.push(new bs(n)),s.component?Li(t,null,a?a.children:null,n,r):Li(t,null,i,n,r);return r}function Am(t,e,i){if(typeof i=="function")return i(t,e);switch(i){case"pathParamsChange":return!dn(t.url,e.url);case"pathParamsOrQueryParamsChange":return!dn(t.url,e.url)||!st(t.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!xa(t,e)||!st(t.queryParams,e.queryParams);case"paramsChange":default:return!xa(t,e)}}function ji(t,e,i){let n=Un(t),r=t.value;Object.entries(n).forEach(([s,o])=>{r.component?e?ji(o,e.children.getContext(s),i):ji(o,null,i):ji(o,e,i)}),r.component?e&&e.outlet&&e.outlet.isActivated?i.canDeactivateChecks.push(new Hn(e.outlet.component,r)):i.canDeactivateChecks.push(new Hn(null,r)):i.canDeactivateChecks.push(new Hn(null,r))}function tr(t){return typeof t=="function"}function Om(t){return typeof t=="boolean"}function Rm(t){return t&&tr(t.canLoad)}function Pm(t){return t&&tr(t.canActivate)}function Mm(t){return t&&tr(t.canActivateChild)}function Nm(t){return t&&tr(t.canDeactivate)}function km(t){return t&&tr(t.canMatch)}function eh(t){return t instanceof au||t?.name==="EmptyError"}var os=Symbol("INITIAL_VALUE");function Jn(){return ae(t=>yi(t.map(e=>e.pipe(we(1),Fo(os)))).pipe(I(e=>{for(let i of e)if(i!==!0){if(i===os)return os;if(i===!1||xm(i))return i}return!0}),fe(e=>e!==os),we(1)))}function xm(t){return $i(t)||t instanceof qi}function Fm(t,e){return ye(i=>{let{targetSnapshot:n,currentSnapshot:r,guards:{canActivateChecks:s,canDeactivateChecks:o}}=i;return o.length===0&&s.length===0?D(N(m({},i),{guardsResult:!0})):Lm(o,n,r,t).pipe(ye(a=>a&&Om(a)?Bm(n,s,t,e):D(a)),I(a=>N(m({},i),{guardsResult:a})))})}function Lm(t,e,i,n){return Y(t).pipe(ye(r=>Hm(r.component,r.route,i,e,n)),kt(r=>r!==!0,!0))}function Bm(t,e,i,n){return Y(e).pipe(Mt(r=>lu(Um(r.route.parent,n),Vm(r.route,n),$m(t,r.path,i),jm(t,r.route,i))),kt(r=>r!==!0,!0))}function Vm(t,e){return t!==null&&e&&e(new Ra(t)),D(!0)}function Um(t,e){return t!==null&&e&&e(new Aa(t)),D(!0)}function jm(t,e,i){let n=e.routeConfig?e.routeConfig.canActivate:null;if(!n||n.length===0)return D(!0);let r=n.map(s=>Mo(()=>{let o=Xi(e)??i,a=Kn(s,o),c=Pm(a)?a.canActivate(e,t):ke(o,()=>a(e,t));return zt(c).pipe(kt())}));return D(r).pipe(Jn())}function $m(t,e,i){let n=e[e.length-1],s=e.slice(0,e.length-1).reverse().map(o=>Im(o)).filter(o=>o!==null).map(o=>Mo(()=>{let a=o.guards.map(c=>{let l=Xi(o.node)??i,u=Kn(c,l),h=Mm(u)?u.canActivateChild(n,t):ke(l,()=>u(n,t));return zt(h).pipe(kt())});return D(a).pipe(Jn())}));return D(s).pipe(Jn())}function Hm(t,e,i,n,r){let s=e&&e.routeConfig?e.routeConfig.canDeactivate:null;if(!s||s.length===0)return D(!0);let o=s.map(a=>{let c=Xi(e)??r,l=Kn(a,c),u=Nm(l)?l.canDeactivate(t,e,i,n):ke(c,()=>l(t,e,i,n));return zt(u).pipe(kt())});return D(o).pipe(Jn())}function Gm(t,e,i,n){let r=e.canLoad;if(r===void 0||r.length===0)return D(!0);let s=r.map(o=>{let a=Kn(o,t),c=Rm(a)?a.canLoad(e,i):ke(t,()=>a(e,i));return zt(c)});return D(s).pipe(Jn(),th(n))}function th(t){return nu(V(e=>{if(typeof e!="boolean")throw ys(t,e)}),I(e=>e===!0))}function zm(t,e,i,n){let r=e.canMatch;if(!r||r.length===0)return D(!0);let s=r.map(o=>{let a=Kn(o,t),c=km(a)?a.canMatch(e,i):ke(t,()=>a(e,i));return zt(c)});return D(s).pipe(Jn(),th(n))}var Ji=class{constructor(e){this.segmentGroup=e||null}},Ki=class extends Error{constructor(e){super(),this.urlTree=e}};function Vn(t){return an(new Ji(t))}function Wm(t){return an(new U(4e3,!1))}function qm(t){return an(Zd(!1,Re.GuardRejected))}var Ba=class{constructor(e,i){this.urlSerializer=e,this.urlTree=i}lineralizeSegments(e,i){let n=[],r=i.root;for(;;){if(n=n.concat(r.segments),r.numberOfChildren===0)return D(n);if(r.numberOfChildren>1||!r.children[S])return Wm(`${e.redirectTo}`);r=r.children[S]}}applyRedirectCommands(e,i,n,r,s){if(typeof i!="string"){let a=i,{queryParams:c,fragment:l,routeConfig:u,url:h,outlet:d,params:g,data:v,title:E}=r,_=ke(s,()=>a({params:g,data:v,queryParams:c,fragment:l,routeConfig:u,url:h,outlet:d,title:E}));if(_ instanceof wt)throw new Ki(_);i=_}let o=this.applyRedirectCreateUrlTree(i,this.urlSerializer.parse(i),e,n);if(i[0]==="/")throw new Ki(o);return o}applyRedirectCreateUrlTree(e,i,n,r){let s=this.createSegmentGroup(e,i.root,n,r);return new wt(s,this.createQueryParams(i.queryParams,this.urlTree.queryParams),i.fragment)}createQueryParams(e,i){let n={};return Object.entries(e).forEach(([r,s])=>{if(typeof s=="string"&&s[0]===":"){let a=s.substring(1);n[r]=i[a]}else n[r]=s}),n}createSegmentGroup(e,i,n,r){let s=this.createSegments(e,i.segments,n,r),o={};return Object.entries(i.children).forEach(([a,c])=>{o[a]=this.createSegmentGroup(e,c,n,r)}),new L(s,o)}createSegments(e,i,n,r){return i.map(s=>s.path[0]===":"?this.findPosParam(e,s,r):this.findOrReturn(s,n))}findPosParam(e,i,n){let r=n[i.path.substring(1)];if(!r)throw new U(4001,!1);return r}findOrReturn(e,i){let n=0;for(let r of i){if(r.path===e.path)return i.splice(n),r;n++}return e}},Va={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function Jm(t,e,i,n,r){let s=Ga(t,e,i);return s.matched?(n=mm(e,n),zm(n,e,i,r).pipe(I(o=>o===!0?s:m({},Va)))):D(s)}function Ga(t,e,i){if(e.path==="**")return Km(i);if(e.path==="")return e.pathMatch==="full"&&(t.hasChildren()||i.length>0)?m({},Va):{matched:!0,consumedSegments:[],remainingSegments:i,parameters:{},positionalParamSegments:{}};let r=(e.matcher||Gg)(i,t,e);if(!r)return m({},Va);let s={};Object.entries(r.posParams??{}).forEach(([a,c])=>{s[a]=c.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:i.slice(r.consumed.length),parameters:o,positionalParamSegments:r.posParams??{}}}function Km(t){return{matched:!0,parameters:t.length>0?xd(t).parameters:{},consumedSegments:t,remainingSegments:[],positionalParamSegments:{}}}function Od(t,e,i,n){return i.length>0&&Zm(t,i,n)?{segmentGroup:new L(e,Qm(n,new L(i,t.children))),slicedSegments:[]}:i.length===0&&Xm(t,i,n)?{segmentGroup:new L(t.segments,Ym(t,i,n,t.children)),slicedSegments:i}:{segmentGroup:new L(t.segments,t.children),slicedSegments:i}}function Ym(t,e,i,n){let r={};for(let s of i)if(Es(t,e,s)&&!n[qe(s)]){let o=new L([],{});r[qe(s)]=o}return m(m({},n),r)}function Qm(t,e){let i={};i[S]=e;for(let n of t)if(n.path===""&&qe(n)!==S){let r=new L([],{});i[qe(n)]=r}return i}function Zm(t,e,i){return i.some(n=>Es(t,e,n)&&qe(n)!==S)}function Xm(t,e,i){return i.some(n=>Es(t,e,n))}function Es(t,e,i){return(t.hasChildren()||e.length>0)&&i.pathMatch==="full"?!1:i.path===""}function e_(t,e,i,n){return qe(t)!==n&&(n===S||!Es(e,i,t))?!1:Ga(e,t,i).matched}function t_(t,e,i){return e.length===0&&!t.children[i]}var Ua=class{};function n_(t,e,i,n,r,s,o="emptyOnly"){return new ja(t,e,i,n,r,o,s).recognize()}var i_=31,ja=class{constructor(e,i,n,r,s,o,a){this.injector=e,this.configLoader=i,this.rootComponentType=n,this.config=r,this.urlTree=s,this.paramsInheritanceStrategy=o,this.urlSerializer=a,this.applyRedirects=new Ba(this.urlSerializer,this.urlTree),this.absoluteRedirectCount=0,this.allowRedirects=!0}noMatchError(e){return new U(4002,`'${e.segmentGroup}'`)}recognize(){let e=Od(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(e).pipe(I(({children:i,rootSnapshot:n})=>{let r=new Oe(n,i),s=new vs("",r),o=lm(n,[],this.urlTree.queryParams,this.urlTree.fragment);return o.queryParams=this.urlTree.queryParams,s.url=this.urlSerializer.serialize(o),{state:s,tree:o}}))}match(e){let i=new $n([],Object.freeze({}),Object.freeze(m({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),S,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,e,S,i).pipe(I(n=>({children:n,rootSnapshot:i})),_e(n=>{if(n instanceof Ki)return this.urlTree=n.urlTree,this.match(n.urlTree.root);throw n instanceof Ji?this.noMatchError(n):n}))}processSegmentGroup(e,i,n,r,s){return n.segments.length===0&&n.hasChildren()?this.processChildren(e,i,n,s):this.processSegment(e,i,n,n.segments,r,!0,s).pipe(I(o=>o instanceof Oe?[o]:[]))}processChildren(e,i,n,r){let s=[];for(let o of Object.keys(n.children))o==="primary"?s.unshift(o):s.push(o);return Y(s).pipe(Mt(o=>{let a=n.children[o],c=_m(i,o);return this.processSegmentGroup(e,c,a,o,r)}),mu((o,a)=>(o.push(...a),o)),ko(null),gu(),ye(o=>{if(o===null)return Vn(n);let a=nh(o);return r_(a),D(a)}))}processSegment(e,i,n,r,s,o,a){return Y(i).pipe(Mt(c=>this.processSegmentAgainstRoute(c._injector??e,i,c,n,r,s,o,a).pipe(_e(l=>{if(l instanceof Ji)return D(null);throw l}))),kt(c=>!!c),_e(c=>{if(eh(c))return t_(n,r,s)?D(new Ua):Vn(n);throw c}))}processSegmentAgainstRoute(e,i,n,r,s,o,a,c){return e_(n,r,s,o)?n.redirectTo===void 0?this.matchSegmentAgainstRoute(e,r,n,s,o,c):this.allowRedirects&&a?this.expandSegmentAgainstRouteUsingRedirect(e,r,i,n,s,o,c):Vn(r):Vn(r)}expandSegmentAgainstRouteUsingRedirect(e,i,n,r,s,o,a){let{matched:c,parameters:l,consumedSegments:u,positionalParamSegments:h,remainingSegments:d}=Ga(i,r,s);if(!c)return Vn(i);typeof r.redirectTo=="string"&&r.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>i_&&(this.allowRedirects=!1));let g=new $n(s,l,Object.freeze(m({},this.urlTree.queryParams)),this.urlTree.fragment,Rd(r),qe(r),r.component??r._loadedComponent??null,r,Pd(r)),v=_s(g,a,this.paramsInheritanceStrategy);g.params=Object.freeze(v.params),g.data=Object.freeze(v.data);let E=this.applyRedirects.applyRedirectCommands(u,r.redirectTo,h,g,e);return this.applyRedirects.lineralizeSegments(r,E).pipe(ye(_=>this.processSegment(e,n,i,_.concat(d),o,!1,a)))}matchSegmentAgainstRoute(e,i,n,r,s,o){let a=Jm(i,n,r,e,this.urlSerializer);return n.path==="**"&&(i.children={}),a.pipe(ae(c=>c.matched?(e=n._injector??e,this.getChildConfig(e,n,r).pipe(ae(({routes:l})=>{let u=n._loadedInjector??e,{parameters:h,consumedSegments:d,remainingSegments:g}=c,v=new $n(d,h,Object.freeze(m({},this.urlTree.queryParams)),this.urlTree.fragment,Rd(n),qe(n),n.component??n._loadedComponent??null,n,Pd(n)),E=_s(v,o,this.paramsInheritanceStrategy);v.params=Object.freeze(E.params),v.data=Object.freeze(E.data);let{segmentGroup:_,slicedSegments:y}=Od(i,d,g,l);if(y.length===0&&_.hasChildren())return this.processChildren(u,l,_,v).pipe(I(P=>new Oe(v,P)));if(l.length===0&&y.length===0)return D(new Oe(v,[]));let R=qe(n)===s;return this.processSegment(u,l,_,y,R?S:s,!0,v).pipe(I(P=>new Oe(v,P instanceof Oe?[P]:[])))}))):Vn(i)))}getChildConfig(e,i,n){return i.children?D({routes:i.children,injector:e}):i.loadChildren?i._loadedRoutes!==void 0?D({routes:i._loadedRoutes,injector:i._loadedInjector}):Gm(e,i,n,this.urlSerializer).pipe(ye(r=>r?this.configLoader.loadChildren(e,i).pipe(V(s=>{i._loadedRoutes=s.routes,i._loadedInjector=s.injector})):qm(i))):D({routes:[],injector:e})}};function r_(t){t.sort((e,i)=>e.value.outlet===S?-1:i.value.outlet===S?1:e.value.outlet.localeCompare(i.value.outlet))}function s_(t){let e=t.value.routeConfig;return e&&e.path===""}function nh(t){let e=[],i=new Set;for(let n of t){if(!s_(n)){e.push(n);continue}let r=e.find(s=>n.value.routeConfig===s.value.routeConfig);r!==void 0?(r.children.push(...n.children),i.add(r)):e.push(n)}for(let n of i){let r=nh(n.children);e.push(new Oe(n.value,r))}return e.filter(n=>!i.has(n))}function Rd(t){return t.data||{}}function Pd(t){return t.resolve||{}}function o_(t,e,i,n,r,s){return ye(o=>n_(t,e,i,n,o.extractedUrl,r,s).pipe(I(({state:a,tree:c})=>N(m({},o),{targetSnapshot:a,urlAfterRedirects:c}))))}function a_(t,e){return ye(i=>{let{targetSnapshot:n,guards:{canActivateChecks:r}}=i;if(!r.length)return D(i);let s=new Set(r.map(c=>c.route)),o=new Set;for(let c of s)if(!o.has(c))for(let l of ih(c))o.add(l);let a=0;return Y(o).pipe(Mt(c=>s.has(c)?c_(c,n,t,e):(c.data=_s(c,c.parent,t).resolve,D(void 0))),V(()=>a++),xo(1),ye(c=>a===o.size?D(i):Xe))})}function ih(t){let e=t.children.map(i=>ih(i)).flat();return[t,...e]}function c_(t,e,i,n){let r=t.routeConfig,s=t._resolve;return r?.title!==void 0&&!Yd(r)&&(s[Qi]=r.title),l_(s,t,e,n).pipe(I(o=>(t._resolvedData=o,t.data=_s(t,t.parent,i).resolve,null)))}function l_(t,e,i,n){let r=va(t);if(r.length===0)return D({});let s={};return Y(r).pipe(ye(o=>u_(t[o],e,i,n).pipe(kt(),V(a=>{if(a instanceof qi)throw ys(new zn,a);s[o]=a}))),xo(1),hu(s),_e(o=>eh(o)?Xe:an(o)))}function u_(t,e,i,n){let r=Xi(e)??n,s=Kn(t,r),o=s.resolve?s.resolve(e,i):ke(r,()=>s(e,i));return zt(o)}function ma(t){return ae(e=>{let i=t(e);return i?Y(i).pipe(I(()=>e)):D(e)})}var rh=(()=>{let e=class e{buildTitle(n){let r,s=n.root;for(;s!==void 0;)r=this.getResolvedTitleForRoute(s)??r,s=s.children.find(o=>o.outlet===S);return r}getResolvedTitleForRoute(n){return n.data[Qi]}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:()=>p(d_),providedIn:"root"});let t=e;return t})(),d_=(()=>{let e=class e extends rh{constructor(n){super(),this.title=n}updateTitle(n){let r=this.buildTitle(n);r!==void 0&&this.title.setTitle(r)}};e.\u0275fac=function(r){return new(r||e)(T(Dd))},e.\u0275prov=w({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),nr=new O("",{providedIn:"root",factory:()=>({})}),h_=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=ht({type:e,selectors:[["ng-component"]],standalone:!0,features:[_t],decls:1,vars:0,template:function(r,s){r&1&&Lt(0,"router-outlet")},dependencies:[ym],encapsulation:2});let t=e;return t})();function za(t){let e=t.children&&t.children.map(za),i=e?N(m({},t),{children:e}):m({},t);return!i.component&&!i.loadComponent&&(e||i.loadChildren)&&i.outlet&&i.outlet!==S&&(i.component=h_),i}var Yi=new O(""),Wa=(()=>{let e=class e{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=p(zr)}loadComponent(n){if(this.componentLoaders.get(n))return this.componentLoaders.get(n);if(n._loadedComponent)return D(n._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(n);let r=zt(n.loadComponent()).pipe(I(sh),V(o=>{this.onLoadEndListener&&this.onLoadEndListener(n),n._loadedComponent=o}),Nt(()=>{this.componentLoaders.delete(n)})),s=new Ao(r,()=>new F).pipe(So());return this.componentLoaders.set(n,s),s}loadChildren(n,r){if(this.childrenLoaders.get(r))return this.childrenLoaders.get(r);if(r._loadedRoutes)return D({routes:r._loadedRoutes,injector:r._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(r);let o=f_(r,this.compiler,n,this.onLoadEndListener).pipe(Nt(()=>{this.childrenLoaders.delete(r)})),a=new Ao(o,()=>new F).pipe(So());return this.childrenLoaders.set(r,a),a}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function f_(t,e,i,n){return zt(t.loadChildren()).pipe(I(sh),ye(r=>r instanceof ku||Array.isArray(r)?D(r):Y(e.compileModuleAsync(r))),I(r=>{n&&n(t);let s,o,a=!1;return Array.isArray(r)?(o=r,a=!0):(s=r.create(i).injector,o=s.get(Yi,[],{optional:!0,self:!0}).flat()),{routes:o.map(za),injector:s}}))}function p_(t){return t&&typeof t=="object"&&"default"in t}function sh(t){return p_(t)?t.default:t}var qa=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:()=>p(g_),providedIn:"root"});let t=e;return t})(),g_=(()=>{let e=class e{shouldProcessUrl(n){return!0}extract(n){return n}merge(n,r){return n}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),oh=new O(""),ah=new O("");function m_(t,e,i){let n=t.get(ah),r=t.get(G);return t.get(H).runOutsideAngular(()=>{if(!r.startViewTransition||n.skipNextTransition)return n.skipNextTransition=!1,new Promise(l=>setTimeout(l));let s,o=new Promise(l=>{s=l}),a=r.startViewTransition(()=>(s(),__(t))),{onViewTransitionCreated:c}=n;return c&&ke(t,()=>c({transition:a,from:e,to:i})),o})}function __(t){return new Promise(e=>{Nu({read:()=>setTimeout(e)},{injector:t})})}var v_=new O(""),Ja=(()=>{let e=class e{get hasRequestedNavigation(){return this.navigationId!==0}constructor(){this.currentNavigation=null,this.currentTransition=null,this.lastSuccessfulNavigation=null,this.events=new F,this.transitionAbortSubject=new F,this.configLoader=p(Wa),this.environmentInjector=p(tt),this.urlSerializer=p(Zi),this.rootContexts=p(er),this.location=p(Si),this.inputBindingEnabled=p(Ds,{optional:!0})!==null,this.titleStrategy=p(rh),this.options=p(nr,{optional:!0})||{},this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlHandlingStrategy=p(qa),this.createViewTransition=p(oh,{optional:!0}),this.navigationErrorHandler=p(v_,{optional:!0}),this.navigationId=0,this.afterPreactivation=()=>D(void 0),this.rootComponentType=null;let n=s=>this.events.next(new Ia(s)),r=s=>this.events.next(new Sa(s));this.configLoader.onLoadEndListener=r,this.configLoader.onLoadStartListener=n}complete(){this.transitions?.complete()}handleNavigationRequest(n){let r=++this.navigationId;this.transitions?.next(N(m(m({},this.transitions.value),n),{id:r}))}setupNavigations(n,r,s){return this.transitions=new me({id:0,currentUrlTree:r,currentRawUrl:r,extractedUrl:this.urlHandlingStrategy.extract(r),urlAfterRedirects:this.urlHandlingStrategy.extract(r),rawUrl:r,extras:{},resolve:()=>{},reject:()=>{},promise:Promise.resolve(!0),source:Ui,restoredState:null,currentSnapshot:s.snapshot,targetSnapshot:null,currentRouterState:s,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(fe(o=>o.id!==0),I(o=>N(m({},o),{extractedUrl:this.urlHandlingStrategy.extract(o.rawUrl)})),ae(o=>{let a=!1,c=!1;return D(o).pipe(ae(l=>{if(this.navigationId>o.id)return this.cancelNavigationTransition(o,"",Re.SupersededByNewNavigation),Xe;this.currentTransition=o,this.currentNavigation={id:l.id,initialUrl:l.rawUrl,extractedUrl:l.extractedUrl,targetBrowserUrl:typeof l.extras.browserUrl=="string"?this.urlSerializer.parse(l.extras.browserUrl):l.extras.browserUrl,trigger:l.source,extras:l.extras,previousNavigation:this.lastSuccessfulNavigation?N(m({},this.lastSuccessfulNavigation),{previousNavigation:null}):null};let u=!n.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),h=l.extras.onSameUrlNavigation??n.onSameUrlNavigation;if(!u&&h!=="reload"){let d="";return this.events.next(new Gt(l.id,this.urlSerializer.serialize(l.rawUrl),d,hs.IgnoredSameUrlNavigation)),l.resolve(!1),Xe}if(this.urlHandlingStrategy.shouldProcessUrl(l.rawUrl))return D(l).pipe(ae(d=>{let g=this.transitions?.getValue();return this.events.next(new Wn(d.id,this.urlSerializer.serialize(d.extractedUrl),d.source,d.restoredState)),g!==this.transitions?.getValue()?Xe:Promise.resolve(d)}),o_(this.environmentInjector,this.configLoader,this.rootComponentType,n.config,this.urlSerializer,this.paramsInheritanceStrategy),V(d=>{o.targetSnapshot=d.targetSnapshot,o.urlAfterRedirects=d.urlAfterRedirects,this.currentNavigation=N(m({},this.currentNavigation),{finalUrl:d.urlAfterRedirects});let g=new fs(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(g)}));if(u&&this.urlHandlingStrategy.shouldProcessUrl(l.currentRawUrl)){let{id:d,extractedUrl:g,source:v,restoredState:E,extras:_}=l,y=new Wn(d,this.urlSerializer.serialize(g),v,E);this.events.next(y);let R=Jd(this.rootComponentType).snapshot;return this.currentTransition=o=N(m({},l),{targetSnapshot:R,urlAfterRedirects:g,extras:N(m({},_),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.finalUrl=g,D(o)}else{let d="";return this.events.next(new Gt(l.id,this.urlSerializer.serialize(l.extractedUrl),d,hs.IgnoredByUrlHandlingStrategy)),l.resolve(!1),Xe}}),V(l=>{let u=new Da(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot);this.events.next(u)}),I(l=>(this.currentTransition=o=N(m({},l),{guards:Cm(l.targetSnapshot,l.currentSnapshot,this.rootContexts)}),o)),Fm(this.environmentInjector,l=>this.events.next(l)),V(l=>{if(o.guardsResult=l.guardsResult,l.guardsResult&&typeof l.guardsResult!="boolean")throw ys(this.urlSerializer,l.guardsResult);let u=new Ea(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot,!!l.guardsResult);this.events.next(u)}),fe(l=>l.guardsResult?!0:(this.cancelNavigationTransition(l,"",Re.GuardRejected),!1)),ma(l=>{if(l.guards.canActivateChecks.length)return D(l).pipe(V(u=>{let h=new Ta(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(h)}),ae(u=>{let h=!1;return D(u).pipe(a_(this.paramsInheritanceStrategy,this.environmentInjector),V({next:()=>h=!0,complete:()=>{h||this.cancelNavigationTransition(u,"",Re.NoDataFromResolver)}}))}),V(u=>{let h=new Ca(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(h)}))}),ma(l=>{let u=h=>{let d=[];h.routeConfig?.loadComponent&&!h.routeConfig._loadedComponent&&d.push(this.configLoader.loadComponent(h.routeConfig).pipe(V(g=>{h.component=g}),I(()=>{})));for(let g of h.children)d.push(...u(g));return d};return yi(u(l.targetSnapshot.root)).pipe(ko(null),we(1))}),ma(()=>this.afterPreactivation()),ae(()=>{let{currentSnapshot:l,targetSnapshot:u}=o,h=this.createViewTransition?.(this.environmentInjector,l.root,u.root);return h?Y(h).pipe(I(()=>o)):D(o)}),I(l=>{let u=bm(n.routeReuseStrategy,l.targetSnapshot,l.currentRouterState);return this.currentTransition=o=N(m({},l),{targetRouterState:u}),this.currentNavigation.targetRouterState=u,o}),V(()=>{this.events.next(new zi)}),Tm(this.rootContexts,n.routeReuseStrategy,l=>this.events.next(l),this.inputBindingEnabled),we(1),V({next:l=>{a=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new Dt(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects))),this.titleStrategy?.updateTitle(l.targetRouterState.snapshot),l.resolve(!0)},complete:()=>{a=!0}}),Q(this.transitionAbortSubject.pipe(V(l=>{throw l}))),Nt(()=>{!a&&!c&&this.cancelNavigationTransition(o,"",Re.SupersededByNewNavigation),this.currentTransition?.id===o.id&&(this.currentNavigation=null,this.currentTransition=null)}),_e(l=>{if(c=!0,Xd(l))this.events.next(new bt(o.id,this.urlSerializer.serialize(o.extractedUrl),l.message,l.cancellationCode)),Em(l)?this.events.next(new qn(l.url,l.navigationBehaviorOptions)):o.resolve(!1);else{let u=new Gi(o.id,this.urlSerializer.serialize(o.extractedUrl),l,o.targetSnapshot??void 0);try{let h=ke(this.environmentInjector,()=>this.navigationErrorHandler?.(u));if(h instanceof qi){let{message:d,cancellationCode:g}=ys(this.urlSerializer,h);this.events.next(new bt(o.id,this.urlSerializer.serialize(o.extractedUrl),d,g)),this.events.next(new qn(h.redirectTo,h.navigationBehaviorOptions))}else{this.events.next(u);let d=n.errorHandler(l);o.resolve(!!d)}}catch(h){this.options.resolveNavigationPromiseOnError?o.resolve(!1):o.reject(h)}}return Xe}))}))}cancelNavigationTransition(n,r,s){let o=new bt(n.id,this.urlSerializer.serialize(n.extractedUrl),r,s);this.events.next(o),n.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let n=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),r=this.currentNavigation?.targetBrowserUrl??this.currentNavigation?.extractedUrl;return n.toString()!==r?.toString()&&!this.currentNavigation?.extras.skipLocationChange}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function y_(t){return t!==Ui}var b_=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:()=>p(w_),providedIn:"root"});let t=e;return t})(),$a=class{shouldDetach(e){return!1}store(e,i){}shouldAttach(e){return!1}retrieve(e){return null}shouldReuseRoute(e,i){return e.routeConfig===i.routeConfig}},w_=(()=>{let e=class e extends $a{};e.\u0275fac=(()=>{let n;return function(s){return(n||(n=Ft(e)))(s||e)}})(),e.\u0275prov=w({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),ch=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:()=>p(D_),providedIn:"root"});let t=e;return t})(),D_=(()=>{let e=class e extends ch{constructor(){super(...arguments),this.location=p(Si),this.urlSerializer=p(Zi),this.options=p(nr,{optional:!0})||{},this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.urlHandlingStrategy=p(qa),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.currentUrlTree=new wt,this.rawUrlTree=this.currentUrlTree,this.currentPageId=0,this.lastSuccessfulId=-1,this.routerState=Jd(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(n){return this.location.subscribe(r=>{r.type==="popstate"&&n(r.url,r.state)})}handleRouterEvent(n,r){if(n instanceof Wn)this.stateMemento=this.createStateMemento();else if(n instanceof Gt)this.rawUrlTree=r.initialUrl;else if(n instanceof fs){if(this.urlUpdateStrategy==="eager"&&!r.extras.skipLocationChange){let s=this.urlHandlingStrategy.merge(r.finalUrl,r.initialUrl);this.setBrowserUrl(r.targetBrowserUrl??s,r)}}else n instanceof zi?(this.currentUrlTree=r.finalUrl,this.rawUrlTree=this.urlHandlingStrategy.merge(r.finalUrl,r.initialUrl),this.routerState=r.targetRouterState,this.urlUpdateStrategy==="deferred"&&!r.extras.skipLocationChange&&this.setBrowserUrl(r.targetBrowserUrl??this.rawUrlTree,r)):n instanceof bt&&(n.code===Re.GuardRejected||n.code===Re.NoDataFromResolver)?this.restoreHistory(r):n instanceof Gi?this.restoreHistory(r,!0):n instanceof Dt&&(this.lastSuccessfulId=n.id,this.currentPageId=this.browserPageId)}setBrowserUrl(n,r){let s=n instanceof wt?this.urlSerializer.serialize(n):n;if(this.location.isCurrentPathEqualTo(s)||r.extras.replaceUrl){let o=this.browserPageId,a=m(m({},r.extras.state),this.generateNgRouterState(r.id,o));this.location.replaceState(s,"",a)}else{let o=m(m({},r.extras.state),this.generateNgRouterState(r.id,this.browserPageId+1));this.location.go(s,"",o)}}restoreHistory(n,r=!1){if(this.canceledNavigationResolution==="computed"){let s=this.browserPageId,o=this.currentPageId-s;o!==0?this.location.historyGo(o):this.currentUrlTree===n.finalUrl&&o===0&&(this.resetState(n),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(r&&this.resetState(n),this.resetUrlToCurrentUrlTree())}resetState(n){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,n.finalUrl??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(n,r){return this.canceledNavigationResolution==="computed"?{navigationId:n,\u0275routerPageId:r}:{navigationId:n}}};e.\u0275fac=(()=>{let n;return function(s){return(n||(n=Ft(e)))(s||e)}})(),e.\u0275prov=w({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Bi=function(t){return t[t.COMPLETE=0]="COMPLETE",t[t.FAILED=1]="FAILED",t[t.REDIRECTING=2]="REDIRECTING",t}(Bi||{});function lh(t,e){t.events.pipe(fe(i=>i instanceof Dt||i instanceof bt||i instanceof Gi||i instanceof Gt),I(i=>i instanceof Dt||i instanceof Gt?Bi.COMPLETE:(i instanceof bt?i.code===Re.Redirect||i.code===Re.SupersededByNewNavigation:!1)?Bi.REDIRECTING:Bi.FAILED),fe(i=>i!==Bi.REDIRECTING),we(1)).subscribe(()=>{e()})}function E_(t){throw t}var T_={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},C_={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},ot=(()=>{let e=class e{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=p($r),this.stateManager=p(ch),this.options=p(nr,{optional:!0})||{},this.pendingTasks=p(Di),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.navigationTransitions=p(Ja),this.urlSerializer=p(Zi),this.location=p(Si),this.urlHandlingStrategy=p(qa),this._events=new F,this.errorHandler=this.options.errorHandler||E_,this.navigated=!1,this.routeReuseStrategy=p(b_),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.config=p(Yi,{optional:!0})?.flat()??[],this.componentInputBindingEnabled=!!p(Ds,{optional:!0}),this.eventsSubscription=new tu,this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe({error:n=>{this.console.warn(n)}}),this.subscribeToNavigationEvents()}subscribeToNavigationEvents(){let n=this.navigationTransitions.events.subscribe(r=>{try{let s=this.navigationTransitions.currentTransition,o=this.navigationTransitions.currentNavigation;if(s!==null&&o!==null){if(this.stateManager.handleRouterEvent(r,o),r instanceof bt&&r.code!==Re.Redirect&&r.code!==Re.SupersededByNewNavigation)this.navigated=!0;else if(r instanceof Dt)this.navigated=!0;else if(r instanceof qn){let a=r.navigationBehaviorOptions,c=this.urlHandlingStrategy.merge(r.url,s.currentRawUrl),l=m({browserUrl:s.extras.browserUrl,info:s.extras.info,skipLocationChange:s.extras.skipLocationChange,replaceUrl:s.extras.replaceUrl||this.urlUpdateStrategy==="eager"||y_(s.source)},a);this.scheduleNavigation(c,Ui,null,l,{resolve:s.resolve,reject:s.reject,promise:s.promise})}}S_(r)&&this._events.next(r)}catch(s){this.navigationTransitions.transitionAbortSubject.next(s)}});this.eventsSubscription.add(n)}resetRootComponentType(n){this.routerState.root.component=n,this.navigationTransitions.rootComponentType=n}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),Ui,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((n,r)=>{setTimeout(()=>{this.navigateToSyncWithBrowser(n,"popstate",r)},0)})}navigateToSyncWithBrowser(n,r,s){let o={replaceUrl:!0},a=s?.navigationId?s:null;if(s){let l=m({},s);delete l.navigationId,delete l.\u0275routerPageId,Object.keys(l).length!==0&&(o.state=l)}let c=this.parseUrl(n);this.scheduleNavigation(c,r,a,o)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(n){this.config=n.map(za),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(n,r={}){let{relativeTo:s,queryParams:o,fragment:a,queryParamsHandling:c,preserveFragment:l}=r,u=l?this.currentUrlTree.fragment:a,h=null;switch(c){case"merge":h=m(m({},this.currentUrlTree.queryParams),o);break;case"preserve":h=this.currentUrlTree.queryParams;break;default:h=o||null}h!==null&&(h=this.removeEmptyProps(h));let d;try{let g=s?s.snapshot:this.routerState.snapshot.root;d=Gd(g)}catch{(typeof n[0]!="string"||n[0][0]!=="/")&&(n=[]),d=this.currentUrlTree.root}return zd(d,n,h,u??null)}navigateByUrl(n,r={skipLocationChange:!1}){let s=$i(n)?n:this.parseUrl(n),o=this.urlHandlingStrategy.merge(s,this.rawUrlTree);return this.scheduleNavigation(o,Ui,null,r)}navigate(n,r={skipLocationChange:!1}){return I_(n),this.navigateByUrl(this.createUrlTree(n,r),r)}serializeUrl(n){return this.urlSerializer.serialize(n)}parseUrl(n){try{return this.urlSerializer.parse(n)}catch{return this.urlSerializer.parse("/")}}isActive(n,r){let s;if(r===!0?s=m({},T_):r===!1?s=m({},C_):s=r,$i(n))return Td(this.currentUrlTree,n,s);let o=this.parseUrl(n);return Td(this.currentUrlTree,o,s)}removeEmptyProps(n){return Object.entries(n).reduce((r,[s,o])=>(o!=null&&(r[s]=o),r),{})}scheduleNavigation(n,r,s,o,a){if(this.disposed)return Promise.resolve(!1);let c,l,u;a?(c=a.resolve,l=a.reject,u=a.promise):u=new Promise((d,g)=>{c=d,l=g});let h=this.pendingTasks.add();return lh(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(h))}),this.navigationTransitions.handleNavigationRequest({source:r,restoredState:s,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:n,extras:o,resolve:c,reject:l,promise:u,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),u.catch(d=>Promise.reject(d))}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function I_(t){for(let e=0;e<t.length;e++)if(t[e]==null)throw new U(4008,!1)}function S_(t){return!(t instanceof zi)&&!(t instanceof qn)}var ws=class{};var A_=(()=>{let e=class e{constructor(n,r,s,o,a){this.router=n,this.injector=s,this.preloadingStrategy=o,this.loader=a}setUpPreloading(){this.subscription=this.router.events.pipe(fe(n=>n instanceof Dt),Mt(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(n,r){let s=[];for(let o of r){o.providers&&!o._injector&&(o._injector=zo(o.providers,n,`Route: ${o.path}`));let a=o._injector??n,c=o._loadedInjector??a;(o.loadChildren&&!o._loadedRoutes&&o.canLoad===void 0||o.loadComponent&&!o._loadedComponent)&&s.push(this.preloadConfig(a,o)),(o.children||o._loadedRoutes)&&s.push(this.processRoutes(c,o.children??o._loadedRoutes))}return Y(s).pipe(Po())}preloadConfig(n,r){return this.preloadingStrategy.preload(r,()=>{let s;r.loadChildren&&r.canLoad===void 0?s=this.loader.loadChildren(n,r):s=D(null);let o=s.pipe(ye(a=>a===null?D(void 0):(r._loadedRoutes=a.routes,r._loadedInjector=a.injector,this.processRoutes(a.injector??n,a.routes))));if(r.loadComponent&&!r._loadedComponent){let a=this.loader.loadComponent(r);return Y([o,a]).pipe(Po())}else return o})}};e.\u0275fac=function(r){return new(r||e)(T(ot),T(zr),T(tt),T(ws),T(Wa))},e.\u0275prov=w({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),uh=new O(""),O_=(()=>{let e=class e{constructor(n,r,s,o,a={}){this.urlSerializer=n,this.transitions=r,this.viewportScroller=s,this.zone=o,this.options=a,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},a.scrollPositionRestoration||="disabled",a.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(n=>{n instanceof Wn?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=n.navigationTrigger,this.restoredId=n.restoredState?n.restoredState.navigationId:0):n instanceof Dt?(this.lastId=n.id,this.scheduleScrollEvent(n,this.urlSerializer.parse(n.urlAfterRedirects).fragment)):n instanceof Gt&&n.code===hs.IgnoredSameUrlNavigation&&(this.lastSource=void 0,this.restoredId=0,this.scheduleScrollEvent(n,this.urlSerializer.parse(n.url).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(n=>{n instanceof ps&&(n.position?this.options.scrollPositionRestoration==="top"?this.viewportScroller.scrollToPosition([0,0]):this.options.scrollPositionRestoration==="enabled"&&this.viewportScroller.scrollToPosition(n.position):n.anchor&&this.options.anchorScrolling==="enabled"?this.viewportScroller.scrollToAnchor(n.anchor):this.options.scrollPositionRestoration!=="disabled"&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(n,r){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new ps(n,this.lastSource==="popstate"?this.store[this.restoredId]:null,r))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}};e.\u0275fac=function(r){Ru()},e.\u0275prov=w({token:e,factory:e.\u0275fac});let t=e;return t})();function mE(t,...e){return He([{provide:Yi,multi:!0,useValue:t},[],{provide:Et,useFactory:dh,deps:[ot]},{provide:Gr,multi:!0,useFactory:hh},e.map(i=>i.\u0275providers)])}function dh(t){return t.routerState.root}function ir(t,e){return{\u0275kind:t,\u0275providers:e}}function hh(){let t=p(ne);return e=>{let i=t.get(it);if(e!==i.components[0])return;let n=t.get(ot),r=t.get(fh);t.get(Ka)===1&&n.initialNavigation(),t.get(ph,null,Lo.Optional)?.setUpPreloading(),t.get(uh,null,Lo.Optional)?.init(),n.resetRootComponentType(i.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}var fh=new O("",{factory:()=>new F}),Ka=new O("",{providedIn:"root",factory:()=>1});function R_(){return ir(2,[{provide:Ka,useValue:0},{provide:qo,multi:!0,deps:[ne],useFactory:e=>{let i=e.get(Yu,Promise.resolve());return()=>i.then(()=>new Promise(n=>{let r=e.get(ot),s=e.get(fh);lh(r,()=>{n(!0)}),e.get(Ja).afterPreactivation=()=>(n(!0),s.closed?D(void 0):s),r.initialNavigation()}))}}])}function P_(){return ir(3,[{provide:qo,multi:!0,useFactory:()=>{let e=p(ot);return()=>{e.setUpLocationChangeListener()}}},{provide:Ka,useValue:2}])}var ph=new O("");function M_(t){return ir(0,[{provide:ph,useExisting:A_},{provide:ws,useExisting:t}])}function N_(){return ir(8,[Ad,{provide:Ds,useExisting:Ad}])}function k_(t){let e=[{provide:oh,useValue:m_},{provide:ah,useValue:m({skipNextTransition:!!t?.skipInitialTransition},t)}];return ir(9,e)}var Md=new O("ROUTER_FORROOT_GUARD"),x_=[Si,{provide:Zi,useClass:zn},ot,er,{provide:Et,useFactory:dh,deps:[ot]},Wa,[]],_E=(()=>{let e=class e{constructor(n){}static forRoot(n,r){return{ngModule:e,providers:[x_,[],{provide:Yi,multi:!0,useValue:n},{provide:Md,useFactory:V_,deps:[[ot,new et,new yu]]},{provide:nr,useValue:r||{}},r?.useHash?L_():B_(),F_(),r?.preloadingStrategy?M_(r.preloadingStrategy).\u0275providers:[],r?.initialNavigation?U_(r):[],r?.bindToComponentInputs?N_().\u0275providers:[],r?.enableViewTransitions?k_().\u0275providers:[],j_()]}}static forChild(n){return{ngModule:e,providers:[{provide:Yi,multi:!0,useValue:n}]}}};e.\u0275fac=function(r){return new(r||e)(T(Md,8))},e.\u0275mod=Ne({type:e}),e.\u0275inj=Me({});let t=e;return t})();function F_(){return{provide:uh,useFactory:()=>{let t=p(ed),e=p(H),i=p(nr),n=p(Ja),r=p(Zi);return i.scrollOffset&&t.setOffset(i.scrollOffset),new O_(r,n,t,e,i)}}}function L_(){return{provide:Ko,useClass:Zu}}function B_(){return{provide:Ko,useClass:Qu}}function V_(t){return"guarded"}function U_(t){return[t.initialNavigation==="disabled"?P_().\u0275providers:[],t.initialNavigation==="enabledBlocking"?R_().\u0275providers:[]]}var Nd=new O("");function j_(){return[{provide:Nd,useFactory:hh},{provide:Gr,multi:!0,useExisting:Nd}]}var bE={production:!0,firebaseConfig:{apiKey:"AIzaSyDnnitFXpM8TglWKNpzu4ChgF98n25Rgvw",authDomain:"auth.dealpos.com",projectId:"devops-signin",storageBucket:"devops-signin.appspot.com",messagingSenderId:"412465165194",appId:"1:412465165194:web:03d806f6b6ab6f8b460e73",measurementId:"G-MNDBRJ5XZD"},version:"1.7.3"};var gh=["toast-component",""];function $_(t,e){if(t&1){let i=jr();Te(0,"button",5),Ce("click",function(){Lr(i);let r=ce();return Br(r.remove())}),Te(1,"span",6),Fe(2,"\xD7"),xe()()}}function H_(t,e){if(t&1&&(Ti(0),Fe(1),Ci()),t&2){let i=ce(2);J(),Vt("[",i.duplicatesCount+1,"]")}}function G_(t,e){if(t&1&&(Te(0,"div"),Fe(1),cn(2,H_,2,1,"ng-container",4),xe()),t&2){let i=ce();Ee(i.options.titleClass),Ae("aria-label",i.title),J(),Vt(" ",i.title," "),J(),pe("ngIf",i.duplicatesCount)}}function z_(t,e){if(t&1&&Lt(0,"div",7),t&2){let i=ce();Ee(i.options.messageClass),pe("innerHTML",i.message,$o)}}function W_(t,e){if(t&1&&(Te(0,"div",8),Fe(1),xe()),t&2){let i=ce();Ee(i.options.messageClass),Ae("aria-label",i.message),J(),Vt(" ",i.message," ")}}function q_(t,e){if(t&1&&(Te(0,"div"),Lt(1,"div",9),xe()),t&2){let i=ce();J(),Fn("width",i.width()+"%")}}function J_(t,e){if(t&1){let i=jr();Te(0,"button",5),Ce("click",function(){Lr(i);let r=ce();return Br(r.remove())}),Te(1,"span",6),Fe(2,"\xD7"),xe()()}}function K_(t,e){if(t&1&&(Ti(0),Fe(1),Ci()),t&2){let i=ce(2);J(),Vt("[",i.duplicatesCount+1,"]")}}function Y_(t,e){if(t&1&&(Te(0,"div"),Fe(1),cn(2,K_,2,1,"ng-container",4),xe()),t&2){let i=ce();Ee(i.options.titleClass),Ae("aria-label",i.title),J(),Vt(" ",i.title," "),J(),pe("ngIf",i.duplicatesCount)}}function Q_(t,e){if(t&1&&Lt(0,"div",7),t&2){let i=ce();Ee(i.options.messageClass),pe("innerHTML",i.message,$o)}}function Z_(t,e){if(t&1&&(Te(0,"div",8),Fe(1),xe()),t&2){let i=ce();Ee(i.options.messageClass),Ae("aria-label",i.message),J(),Vt(" ",i.message," ")}}function X_(t,e){if(t&1&&(Te(0,"div"),Lt(1,"div",9),xe()),t&2){let i=ce();J(),Fn("width",i.width()+"%")}}var Ya=class{_attachedHost;component;viewContainerRef;injector;constructor(e,i){this.component=e,this.injector=i}attach(e,i){return this._attachedHost=e,e.attach(this,i)}detach(){let e=this._attachedHost;if(e)return this._attachedHost=void 0,e.detach()}get isAttached(){return this._attachedHost!=null}setAttachedHost(e){this._attachedHost=e}},Qa=class{_attachedPortal;_disposeFn;attach(e,i){return this._attachedPortal=e,this.attachComponentPortal(e,i)}detach(){this._attachedPortal&&this._attachedPortal.setAttachedHost(),this._attachedPortal=void 0,this._disposeFn&&(this._disposeFn(),this._disposeFn=void 0)}setDisposeFn(e){this._disposeFn=e}},Za=class{_overlayRef;componentInstance;duplicatesCount=0;_afterClosed=new F;_activate=new F;_manualClose=new F;_resetTimeout=new F;_countDuplicate=new F;constructor(e){this._overlayRef=e}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(e,i){e&&this._resetTimeout.next(),i&&this._countDuplicate.next(++this.duplicatesCount)}},Yn=class{toastId;config;message;title;toastType;toastRef;_onTap=new F;_onAction=new F;constructor(e,i,n,r,s,o){this.toastId=e,this.config=i,this.message=n,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(e){this._onAction.next(e)}onAction(){return this._onAction.asObservable()}},mh={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"},_h=new O("ToastConfig"),Xa=class extends Qa{_hostDomElement;_componentFactoryResolver;_appRef;constructor(e,i,n){super(),this._hostDomElement=e,this._componentFactoryResolver=i,this._appRef=n}attachComponentPortal(e,i){let n=this._componentFactoryResolver.resolveComponentFactory(e.component),r;return r=n.create(e.injector),this._appRef.attachView(r.hostView),this.setDisposeFn(()=>{this._appRef.detachView(r.hostView),r.destroy()}),i?this._hostDomElement.insertBefore(this._getComponentRootNode(r),this._hostDomElement.firstChild):this._hostDomElement.appendChild(this._getComponentRootNode(r)),r}_getComponentRootNode(e){return e.hostView.rootNodes[0]}},e0=(()=>{class t{_document=p(G);_containerElement;ngOnDestroy(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let i=this._document.createElement("div");i.classList.add("overlay-container"),i.setAttribute("aria-live","polite"),this._document.body.appendChild(i),this._containerElement=i}static \u0275fac=function(n){return new(n||t)};static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),ec=class{_portalHost;constructor(e){this._portalHost=e}attach(e,i=!0){return this._portalHost.attach(e,i)}detach(){return this._portalHost.detach()}},t0=(()=>{class t{_overlayContainer=p(e0);_componentFactoryResolver=p(Pu);_appRef=p(it);_document=p(G);_paneElements=new Map;create(i,n){return this._createOverlayRef(this.getPaneElement(i,n))}getPaneElement(i="",n){return this._paneElements.get(n)||this._paneElements.set(n,{}),this._paneElements.get(n)[i]||(this._paneElements.get(n)[i]=this._createPaneElement(i,n)),this._paneElements.get(n)[i]}_createPaneElement(i,n){let r=this._document.createElement("div");return r.id="toast-container",r.classList.add(i),r.classList.add("toast-container"),n?n.getContainerElement().appendChild(r):this._overlayContainer.getContainerElement().appendChild(r),r}_createPortalHost(i){return new Xa(i,this._componentFactoryResolver,this._appRef)}_createOverlayRef(i){return new ec(this._createPortalHost(i))}static \u0275fac=function(n){return new(n||t)};static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Ts=(()=>{class t{overlay;_injector;sanitizer;ngZone;toastrConfig;currentlyActive=0;toasts=[];overlayContainer;previousToastMessage;index=0;constructor(i,n,r,s,o){this.overlay=n,this._injector=r,this.sanitizer=s,this.ngZone=o,this.toastrConfig=m(m({},i.default),i.config),i.config.iconClasses&&(this.toastrConfig.iconClasses=m(m({},i.default.iconClasses),i.config.iconClasses))}show(i,n,r={},s=""){return this._preBuildNotification(s,i,n,this.applyConfig(r))}success(i,n,r={}){let s=this.toastrConfig.iconClasses.success||"";return this._preBuildNotification(s,i,n,this.applyConfig(r))}error(i,n,r={}){let s=this.toastrConfig.iconClasses.error||"";return this._preBuildNotification(s,i,n,this.applyConfig(r))}info(i,n,r={}){let s=this.toastrConfig.iconClasses.info||"";return this._preBuildNotification(s,i,n,this.applyConfig(r))}warning(i,n,r={}){let s=this.toastrConfig.iconClasses.warning||"";return this._preBuildNotification(s,i,n,this.applyConfig(r))}clear(i){for(let n of this.toasts)if(i!==void 0){if(n.toastId===i){n.toastRef.manualClose();return}}else n.toastRef.manualClose()}remove(i){let n=this._findToast(i);if(!n||(n.activeToast.toastRef.close(),this.toasts.splice(n.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(i="",n="",r,s){let{includeTitleDuplicates:o}=this.toastrConfig;for(let a of this.toasts){let c=o&&a.title===i;if((!o||c)&&a.message===n)return a.toastRef.onDuplicate(r,s),a}return null}applyConfig(i={}){return m(m({},this.toastrConfig),i)}_findToast(i){for(let n=0;n<this.toasts.length;n++)if(this.toasts[n].toastId===i)return{index:n,activeToast:this.toasts[n]};return null}_preBuildNotification(i,n,r,s){return s.onActivateTick?this.ngZone.run(()=>this._buildNotification(i,n,r,s)):this._buildNotification(i,n,r,s)}_buildNotification(i,n,r,s){if(!s.toastComponent)throw new Error("toastComponent required");let o=this.findDuplicate(r,n,this.toastrConfig.resetTimeoutOnDuplicate&&s.timeOut>0,this.toastrConfig.countDuplicates);if((this.toastrConfig.includeTitleDuplicates&&r||n)&&this.toastrConfig.preventDuplicates&&o!==null)return o;this.previousToastMessage=n;let a=!1;this.toastrConfig.maxOpened&&this.currentlyActive>=this.toastrConfig.maxOpened&&(a=!0,this.toastrConfig.autoDismiss&&this.clear(this.toasts[0].toastId));let c=this.overlay.create(s.positionClass,this.overlayContainer);this.index=this.index+1;let l=n;n&&s.enableHtml&&(l=this.sanitizer.sanitize(pt.HTML,n));let u=new Za(c),h=new Yn(this.index,s,l,r,i,u),d=[{provide:Yn,useValue:h}],g=ne.create({providers:d,parent:this._injector}),v=new Ya(s.toastComponent,g),E=c.attach(v,s.newestOnTop);u.componentInstance=E.instance;let _={toastId:this.index,title:r||"",message:n||"",toastRef:u,onShown:u.afterActivate(),onHidden:u.afterClosed(),onTap:h.onTap(),onAction:h.onAction(),portal:E};return a||(this.currentlyActive=this.currentlyActive+1,setTimeout(()=>{_.toastRef.activate()})),this.toasts.push(_),_}static \u0275fac=function(n){return new(n||t)(T(_h),T(t0),T(ne),T(ha),T(H))};static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),n0=(()=>{class t{toastrService;toastPackage;ngZone;message;title;options;duplicatesCount;originalTimeout;width=Ge(-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(i,n,r){this.toastrService=i,this.toastPackage=n,this.ngZone=r,this.message=n.message,this.title=n.title,this.options=n.config,this.originalTimeout=n.config.timeOut,this.toastClasses=`${n.toastType} ${n.config.toastClass}`,this.sub=n.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=n.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=n.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=n.toastRef.countDuplicate().subscribe(s=>{this.duplicatesCount=s}),this.state=Ge({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(i=>N(m({},i),{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 i=new Date().getTime(),n=this.hideTime-i;this.width.set(n/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(i=>N(m({},i),{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(i=>N(m({},i),{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(i,n){this.ngZone?this.ngZone.runOutsideAngular(()=>this.timeout=setTimeout(()=>this.runInsideAngular(i),n)):this.timeout=setTimeout(()=>i(),n)}outsideInterval(i,n){this.ngZone?this.ngZone.runOutsideAngular(()=>this.intervalId=setInterval(()=>this.runInsideAngular(i),n)):this.intervalId=setInterval(()=>i(),n)}runInsideAngular(i){this.ngZone?this.ngZone.run(()=>i()):i()}static \u0275fac=function(n){return new(n||t)(x(Ts),x(Yn),x(H))};static \u0275cmp=ht({type:t,selectors:[["","toast-component",""]],hostVars:5,hostBindings:function(n,r){n&1&&Ce("click",function(){return r.tapToast()})("mouseenter",function(){return r.stickAround()})("mouseleave",function(){return r.delayedHideToast()}),n&2&&(Vu("@flyInOut",r._state),Ee(r.toastClasses),Fn("display",r.displayStyle))},standalone:!0,features:[_t],attrs:gh,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(n,r){n&1&&cn(0,$_,3,0,"button",0)(1,G_,3,5,"div",1)(2,z_,1,3,"div",2)(3,W_,2,4,"div",3)(4,q_,2,2,"div",4),n&2&&(pe("ngIf",r.options.closeButton),J(),pe("ngIf",r.title),J(),pe("ngIf",r.message&&r.options.enableHtml),J(),pe("ngIf",r.message&&!r.options.enableHtml),J(),pe("ngIf",r.options.progressBar))},dependencies:[Yo],encapsulation:2,data:{animation:[td("flyInOut",[Qr("inactive",Yr({opacity:0})),Qr("active",Yr({opacity:1})),Qr("removed",Yr({opacity:0})),Zo("inactive => active",Qo("{{ easeTime }}ms {{ easing }}")),Zo("active => removed",Qo("{{ easeTime }}ms {{ easing }}"))])]},changeDetection:0})}return t})(),i0=N(m({},mh),{toastComponent:n0}),kE=(t={})=>He([{provide:_h,useValue:{default:i0,config:t}}]);var r0=(()=>{class t{toastrService;toastPackage;appRef;message;title;options;duplicatesCount;originalTimeout;width=Ge(-1);toastClasses="";get displayStyle(){return this.state()==="inactive"?"none":null}state=Ge("inactive");timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(i,n,r){this.toastrService=i,this.toastPackage=n,this.appRef=r,this.message=n.message,this.title=n.title,this.options=n.config,this.originalTimeout=n.config.timeOut,this.toastClasses=`${n.toastType} ${n.config.toastClass}`,this.sub=n.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=n.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=n.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=n.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 i=new Date().getTime(),n=this.hideTime-i;this.width.set(n/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(n){return new(n||t)(x(Ts),x(Yn),x(it))};static \u0275cmp=ht({type:t,selectors:[["","toast-component",""]],hostVars:4,hostBindings:function(n,r){n&1&&Ce("click",function(){return r.tapToast()})("mouseenter",function(){return r.stickAround()})("mouseleave",function(){return r.delayedHideToast()}),n&2&&(Ee(r.toastClasses),Fn("display",r.displayStyle))},standalone:!0,features:[_t],attrs:gh,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(n,r){n&1&&cn(0,J_,3,0,"button",0)(1,Y_,3,5,"div",1)(2,Q_,1,3,"div",2)(3,Z_,2,4,"div",3)(4,X_,2,2,"div",4),n&2&&(pe("ngIf",r.options.closeButton),J(),pe("ngIf",r.title),J(),pe("ngIf",r.message&&r.options.enableHtml),J(),pe("ngIf",r.message&&!r.options.enableHtml),J(),pe("ngIf",r.options.progressBar))},dependencies:[Yo],encapsulation:2,changeDetection:0})}return t})(),xE=N(m({},mh),{toastComponent:r0});var Sh=(()=>{let e=class e{constructor(n,r){this._renderer=n,this._elementRef=r,this.onChange=s=>{},this.onTouched=()=>{}}setProperty(n,r){this._renderer.setProperty(this._elementRef.nativeElement,n,r)}registerOnTouched(n){this.onTouched=n}registerOnChange(n){this.onChange=n}setDisabledState(n){this.setProperty("disabled",n)}};e.\u0275fac=function(r){return new(r||e)(x(Vr),x(De))},e.\u0275dir=B({type:e});let t=e;return t})(),Ah=(()=>{let e=class e extends Sh{};e.\u0275fac=(()=>{let n;return function(s){return(n||(n=Ft(e)))(s||e)}})(),e.\u0275dir=B({type:e,features:[ze]});let t=e;return t})(),Ns=new O(""),s0={provide:Ns,useExisting:xt(()=>o0),multi:!0},o0=(()=>{let e=class e extends Ah{writeValue(n){this.setProperty("checked",n)}};e.\u0275fac=(()=>{let n;return function(s){return(n||(n=Ft(e)))(s||e)}})(),e.\u0275dir=B({type:e,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(r,s){r&1&&Ce("change",function(a){return s.onChange(a.target.checked)})("blur",function(){return s.onTouched()})},features:[Ut([s0]),ze]});let t=e;return t})(),a0={provide:Ns,useExisting:xt(()=>Oh),multi:!0};function c0(){let t=Bn()?Bn().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}var l0=new O(""),Oh=(()=>{let e=class e extends Sh{constructor(n,r,s){super(n,r),this._compositionMode=s,this._composing=!1,this._compositionMode==null&&(this._compositionMode=!c0())}writeValue(n){let r=n??"";this.setProperty("value",r)}_handleInput(n){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(n)}_compositionStart(){this._composing=!0}_compositionEnd(n){this._composing=!1,this._compositionMode&&this.onChange(n)}};e.\u0275fac=function(r){return new(r||e)(x(Vr),x(De),x(l0,8))},e.\u0275dir=B({type:e,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(r,s){r&1&&Ce("input",function(a){return s._handleInput(a.target.value)})("blur",function(){return s.onTouched()})("compositionstart",function(){return s._compositionStart()})("compositionend",function(a){return s._compositionEnd(a.target.value)})},features:[Ut([a0]),ze]});let t=e;return t})();function Wt(t){return t==null||(typeof t=="string"||Array.isArray(t))&&t.length===0}function Rh(t){return t!=null&&typeof t.length=="number"}var ac=new O(""),cc=new O(""),u0=/^(?=.{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])?)*$/,vh=class{static min(e){return d0(e)}static max(e){return h0(e)}static required(e){return f0(e)}static requiredTrue(e){return p0(e)}static email(e){return g0(e)}static minLength(e){return m0(e)}static maxLength(e){return _0(e)}static pattern(e){return v0(e)}static nullValidator(e){return Ph(e)}static compose(e){return Lh(e)}static composeAsync(e){return Vh(e)}};function d0(t){return e=>{if(Wt(e.value)||Wt(t))return null;let i=parseFloat(e.value);return!isNaN(i)&&i<t?{min:{min:t,actual:e.value}}:null}}function h0(t){return e=>{if(Wt(e.value)||Wt(t))return null;let i=parseFloat(e.value);return!isNaN(i)&&i>t?{max:{max:t,actual:e.value}}:null}}function f0(t){return Wt(t.value)?{required:!0}:null}function p0(t){return t.value===!0?null:{required:!0}}function g0(t){return Wt(t.value)||u0.test(t.value)?null:{email:!0}}function m0(t){return e=>Wt(e.value)||!Rh(e.value)?null:e.value.length<t?{minlength:{requiredLength:t,actualLength:e.value.length}}:null}function _0(t){return e=>Rh(e.value)&&e.value.length>t?{maxlength:{requiredLength:t,actualLength:e.value.length}}:null}function v0(t){if(!t)return Ph;let e,i;return typeof t=="string"?(i="",t.charAt(0)!=="^"&&(i+="^"),i+=t,t.charAt(t.length-1)!=="$"&&(i+="$"),e=new RegExp(i)):(i=t.toString(),e=t),n=>{if(Wt(n.value))return null;let r=n.value;return e.test(r)?null:{pattern:{requiredPattern:i,actualValue:r}}}}function Ph(t){return null}function Mh(t){return t!=null}function Nh(t){return Hr(t)?Y(t):t}function kh(t){let e={};return t.forEach(i=>{e=i!=null?m(m({},e),i):e}),Object.keys(e).length===0?null:e}function xh(t,e){return e.map(i=>i(t))}function y0(t){return!t.validate}function Fh(t){return t.map(e=>y0(e)?e:i=>e.validate(i))}function Lh(t){if(!t)return null;let e=t.filter(Mh);return e.length==0?null:function(i){return kh(xh(i,e))}}function Bh(t){return t!=null?Lh(Fh(t)):null}function Vh(t){if(!t)return null;let e=t.filter(Mh);return e.length==0?null:function(i){let n=xh(i,e).map(Nh);return uu(n).pipe(I(kh))}}function Uh(t){return t!=null?Vh(Fh(t)):null}function yh(t,e){return t===null?[e]:Array.isArray(t)?[...t,e]:[t,e]}function jh(t){return t._rawValidators}function $h(t){return t._rawAsyncValidators}function tc(t){return t?Array.isArray(t)?t:[t]:[]}function Is(t,e){return Array.isArray(t)?t.includes(e):t===e}function bh(t,e){let i=tc(e);return tc(t).forEach(r=>{Is(i,r)||i.push(r)}),i}function wh(t,e){return tc(e).filter(i=>!Is(t,i))}var Ss=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(e){this._rawValidators=e||[],this._composedValidatorFn=Bh(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=Uh(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e=void 0){this.control&&this.control.reset(e)}hasError(e,i){return this.control?this.control.hasError(e,i):!1}getError(e,i){return this.control?this.control.getError(e,i):null}},hn=class extends Ss{get formDirective(){return null}get path(){return null}},fn=class extends Ss{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}},As=class{constructor(e){this._cd=e}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}},b0={"[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"},XE=N(m({},b0),{"[class.ng-submitted]":"isSubmitted"}),eT=(()=>{let e=class e extends As{constructor(n){super(n)}};e.\u0275fac=function(r){return new(r||e)(x(fn,2))},e.\u0275dir=B({type:e,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(r,s){r&2&&X("ng-untouched",s.isUntouched)("ng-touched",s.isTouched)("ng-pristine",s.isPristine)("ng-dirty",s.isDirty)("ng-valid",s.isValid)("ng-invalid",s.isInvalid)("ng-pending",s.isPending)},features:[ze]});let t=e;return t})(),tT=(()=>{let e=class e extends As{constructor(n){super(n)}};e.\u0275fac=function(r){return new(r||e)(x(hn,10))},e.\u0275dir=B({type:e,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(r,s){r&2&&X("ng-untouched",s.isUntouched)("ng-touched",s.isTouched)("ng-pristine",s.isPristine)("ng-dirty",s.isDirty)("ng-valid",s.isValid)("ng-invalid",s.isInvalid)("ng-pending",s.isPending)("ng-submitted",s.isSubmitted)},features:[ze]});let t=e;return t})();var rr="VALID",Cs="INVALID",Qn="PENDING",sr="DISABLED",qt=class{},Os=class extends qt{constructor(e,i){super(),this.value=e,this.source=i}},or=class extends qt{constructor(e,i){super(),this.pristine=e,this.source=i}},ar=class extends qt{constructor(e,i){super(),this.touched=e,this.source=i}},Zn=class extends qt{constructor(e,i){super(),this.status=e,this.source=i}},nc=class extends qt{constructor(e){super(),this.source=e}},ic=class extends qt{constructor(e){super(),this.source=e}};function lc(t){return(ks(t)?t.validators:t)||null}function w0(t){return Array.isArray(t)?Bh(t):t||null}function uc(t,e){return(ks(e)?e.asyncValidators:t)||null}function D0(t){return Array.isArray(t)?Uh(t):t||null}function ks(t){return t!=null&&!Array.isArray(t)&&typeof t=="object"}function Hh(t,e,i){let n=t.controls;if(!(e?Object.keys(n):n).length)throw new U(1e3,"");if(!n[i])throw new U(1001,"")}function Gh(t,e,i){t._forEachChild((n,r)=>{if(i[r]===void 0)throw new U(1002,"")})}var Xn=class{constructor(e,i){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=null,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this._status=Ln(()=>this.statusReactive()),this.statusReactive=Ge(void 0),this._pristine=Ln(()=>this.pristineReactive()),this.pristineReactive=Ge(!0),this._touched=Ln(()=>this.touchedReactive()),this.touchedReactive=Ge(!1),this._events=new F,this.events=this._events.asObservable(),this._onDisabledChange=[],this._assignValidators(e),this._assignAsyncValidators(i)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get status(){return We(this.statusReactive)}set status(e){We(()=>this.statusReactive.set(e))}get valid(){return this.status===rr}get invalid(){return this.status===Cs}get pending(){return this.status==Qn}get disabled(){return this.status===sr}get enabled(){return this.status!==sr}get pristine(){return We(this.pristineReactive)}set pristine(e){We(()=>this.pristineReactive.set(e))}get dirty(){return!this.pristine}get touched(){return We(this.touchedReactive)}set touched(e){We(()=>this.touchedReactive.set(e))}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(bh(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(bh(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(wh(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(wh(e,this._rawAsyncValidators))}hasValidator(e){return Is(this._rawValidators,e)}hasAsyncValidator(e){return Is(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){let i=this.touched===!1;this.touched=!0;let n=e.sourceControl??this;this._parent&&!e.onlySelf&&this._parent.markAsTouched(N(m({},e),{sourceControl:n})),i&&e.emitEvent!==!1&&this._events.next(new ar(!0,n))}markAllAsTouched(e={}){this.markAsTouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(i=>i.markAllAsTouched(e))}markAsUntouched(e={}){let i=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let n=e.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:n})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e,n),i&&e.emitEvent!==!1&&this._events.next(new ar(!1,n))}markAsDirty(e={}){let i=this.pristine===!0;this.pristine=!1;let n=e.sourceControl??this;this._parent&&!e.onlySelf&&this._parent.markAsDirty(N(m({},e),{sourceControl:n})),i&&e.emitEvent!==!1&&this._events.next(new or(!1,n))}markAsPristine(e={}){let i=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let n=e.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:e.emitEvent})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e,n),i&&e.emitEvent!==!1&&this._events.next(new or(!0,n))}markAsPending(e={}){this.status=Qn;let i=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Zn(this.status,i)),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.markAsPending(N(m({},e),{sourceControl:i}))}disable(e={}){let i=this._parentMarkedDirty(e.onlySelf);this.status=sr,this.errors=null,this._forEachChild(r=>{r.disable(N(m({},e),{onlySelf:!0}))}),this._updateValue();let n=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Os(this.value,n)),this._events.next(new Zn(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(N(m({},e),{skipPristineCheck:i}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(e={}){let i=this._parentMarkedDirty(e.onlySelf);this.status=rr,this._forEachChild(n=>{n.enable(N(m({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(N(m({},e),{skipPristineCheck:i}),this),this._onDisabledChange.forEach(n=>n(!1))}_updateAncestors(e,i){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine({},i),this._parent._updateTouched({},i))}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let n=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===rr||this.status===Qn)&&this._runAsyncValidator(n,e.emitEvent)}let i=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Os(this.value,i)),this._events.next(new Zn(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(N(m({},e),{sourceControl:i}))}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(i=>i._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?sr:rr}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,i){if(this.asyncValidator){this.status=Qn,this._hasOwnPendingAsyncValidator={emitEvent:i!==!1};let n=Nh(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:i,shouldHaveEmitted:e})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let e=this._hasOwnPendingAsyncValidator?.emitEvent??!1;return this._hasOwnPendingAsyncValidator=null,e}return!1}setErrors(e,i={}){this.errors=e,this._updateControlsErrors(i.emitEvent!==!1,this,i.shouldHaveEmitted)}get(e){let i=e;return i==null||(Array.isArray(i)||(i=i.split(".")),i.length===0)?null:i.reduce((n,r)=>n&&n._find(r),this)}getError(e,i){let n=i?this.get(i):this;return n&&n.errors?n.errors[e]:null}hasError(e,i){return!!this.getError(e,i)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e,i,n){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),(e||n)&&this._events.next(new Zn(this.status,i)),this._parent&&this._parent._updateControlsErrors(e,i,n)}_initObservables(){this.valueChanges=new $,this.statusChanges=new $}_calculateStatus(){return this._allControlsDisabled()?sr:this.errors?Cs:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Qn)?Qn:this._anyControlsHaveStatus(Cs)?Cs:rr}_anyControlsHaveStatus(e){return this._anyControls(i=>i.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e,i){let n=!this._anyControlsDirty(),r=this.pristine!==n;this.pristine=n,this._parent&&!e.onlySelf&&this._parent._updatePristine(e,i),r&&this._events.next(new or(this.pristine,i))}_updateTouched(e={},i){this.touched=this._anyControlsTouched(),this._events.next(new ar(this.touched,i)),this._parent&&!e.onlySelf&&this._parent._updateTouched(e,i)}_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){ks(e)&&e.updateOn!=null&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){let i=this._parent&&this._parent.dirty;return!e&&!!i&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=w0(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=D0(this._rawAsyncValidators)}},Rs=class extends Xn{constructor(e,i,n){super(lc(i),uc(n,i)),this.controls=e,this._initObservables(),this._setUpdateStrategy(i),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(e,i){return this.controls[e]?this.controls[e]:(this.controls[e]=i,i.setParent(this),i._registerOnCollectionChange(this._onCollectionChange),i)}addControl(e,i,n={}){this.registerControl(e,i),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}removeControl(e,i={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}setControl(e,i,n={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],i&&this.registerControl(e,i),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}contains(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled}setValue(e,i={}){Gh(this,!0,e),Object.keys(e).forEach(n=>{Hh(this,!0,n),this.controls[n].setValue(e[n],{onlySelf:!0,emitEvent:i.emitEvent})}),this.updateValueAndValidity(i)}patchValue(e,i={}){e!=null&&(Object.keys(e).forEach(n=>{let r=this.controls[n];r&&r.patchValue(e[n],{onlySelf:!0,emitEvent:i.emitEvent})}),this.updateValueAndValidity(i))}reset(e={},i={}){this._forEachChild((n,r)=>{n.reset(e?e[r]:null,{onlySelf:!0,emitEvent:i.emitEvent})}),this._updatePristine(i,this),this._updateTouched(i,this),this.updateValueAndValidity(i)}getRawValue(){return this._reduceChildren({},(e,i,n)=>(e[n]=i.getRawValue(),e))}_syncPendingControls(){let e=this._reduceChildren(!1,(i,n)=>n._syncPendingControls()?!0:i);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){Object.keys(this.controls).forEach(i=>{let n=this.controls[i];n&&e(n,i)})}_setUpControls(){this._forEachChild(e=>{e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(e){for(let[i,n]of Object.entries(this.controls))if(this.contains(i)&&e(n))return!0;return!1}_reduceValue(){let e={};return this._reduceChildren(e,(i,n,r)=>((n.enabled||this.disabled)&&(i[r]=n.value),i))}_reduceChildren(e,i){let n=e;return this._forEachChild((r,s)=>{n=i(n,r,s)}),n}_allControlsDisabled(){for(let e of Object.keys(this.controls))if(this.controls[e].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(e){return this.controls.hasOwnProperty(e)?this.controls[e]:null}};var rc=class extends Rs{};var xs=new O("CallSetDisabledState",{providedIn:"root",factory:()=>Fs}),Fs="always";function zh(t,e){return[...e.path,t]}function sc(t,e,i=Fs){dc(t,e),e.valueAccessor.writeValue(t.value),(t.disabled||i==="always")&&e.valueAccessor.setDisabledState?.(t.disabled),T0(t,e),I0(t,e),C0(t,e),E0(t,e)}function Dh(t,e,i=!0){let n=()=>{};e.valueAccessor&&(e.valueAccessor.registerOnChange(n),e.valueAccessor.registerOnTouched(n)),Ms(t,e),t&&(e._invokeOnDestroyCallbacks(),t._registerOnCollectionChange(()=>{}))}function Ps(t,e){t.forEach(i=>{i.registerOnValidatorChange&&i.registerOnValidatorChange(e)})}function E0(t,e){if(e.valueAccessor.setDisabledState){let i=n=>{e.valueAccessor.setDisabledState(n)};t.registerOnDisabledChange(i),e._registerOnDestroy(()=>{t._unregisterOnDisabledChange(i)})}}function dc(t,e){let i=jh(t);e.validator!==null?t.setValidators(yh(i,e.validator)):typeof i=="function"&&t.setValidators([i]);let n=$h(t);e.asyncValidator!==null?t.setAsyncValidators(yh(n,e.asyncValidator)):typeof n=="function"&&t.setAsyncValidators([n]);let r=()=>t.updateValueAndValidity();Ps(e._rawValidators,r),Ps(e._rawAsyncValidators,r)}function Ms(t,e){let i=!1;if(t!==null){if(e.validator!==null){let r=jh(t);if(Array.isArray(r)&&r.length>0){let s=r.filter(o=>o!==e.validator);s.length!==r.length&&(i=!0,t.setValidators(s))}}if(e.asyncValidator!==null){let r=$h(t);if(Array.isArray(r)&&r.length>0){let s=r.filter(o=>o!==e.asyncValidator);s.length!==r.length&&(i=!0,t.setAsyncValidators(s))}}}let n=()=>{};return Ps(e._rawValidators,n),Ps(e._rawAsyncValidators,n),i}function T0(t,e){e.valueAccessor.registerOnChange(i=>{t._pendingValue=i,t._pendingChange=!0,t._pendingDirty=!0,t.updateOn==="change"&&Wh(t,e)})}function C0(t,e){e.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,t.updateOn==="blur"&&t._pendingChange&&Wh(t,e),t.updateOn!=="submit"&&t.markAsTouched()})}function Wh(t,e){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function I0(t,e){let i=(n,r)=>{e.valueAccessor.writeValue(n),r&&e.viewToModelUpdate(n)};t.registerOnChange(i),e._registerOnDestroy(()=>{t._unregisterOnChange(i)})}function S0(t,e){t==null,dc(t,e)}function A0(t,e){return Ms(t,e)}function qh(t,e){if(!t.hasOwnProperty("model"))return!1;let i=t.model;return i.isFirstChange()?!0:!Object.is(e,i.currentValue)}function O0(t){return Object.getPrototypeOf(t.constructor)===Ah}function R0(t,e){t._syncPendingControls(),e.forEach(i=>{let n=i.control;n.updateOn==="submit"&&n._pendingChange&&(i.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function Jh(t,e){if(!e)return null;Array.isArray(e);let i,n,r;return e.forEach(s=>{s.constructor===Oh?i=s:O0(s)?n=s:r=s}),r||n||i||null}function P0(t,e){let i=t.indexOf(e);i>-1&&t.splice(i,1)}function Eh(t,e){let i=t.indexOf(e);i>-1&&t.splice(i,1)}function Th(t){return typeof t=="object"&&t!==null&&Object.keys(t).length===2&&"value"in t&&"disabled"in t}var cr=class extends Xn{constructor(e=null,i,n){super(lc(i),uc(n,i)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(e),this._setUpdateStrategy(i),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),ks(i)&&(i.nonNullable||i.initialValueIsDefault)&&(Th(e)?this.defaultValue=e.value:this.defaultValue=e)}setValue(e,i={}){this.value=this._pendingValue=e,this._onChange.length&&i.emitModelToViewChange!==!1&&this._onChange.forEach(n=>n(this.value,i.emitViewToModelChange!==!1)),this.updateValueAndValidity(i)}patchValue(e,i={}){this.setValue(e,i)}reset(e=this.defaultValue,i={}){this._applyFormState(e),this.markAsPristine(i),this.markAsUntouched(i),this.setValue(this.value,i),this._pendingChange=!1}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){Eh(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){Eh(this._onDisabledChange,e)}_forEachChild(e){}_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(e){Th(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}};var M0=t=>t instanceof cr;var N0={provide:fn,useExisting:xt(()=>k0)},Ch=Promise.resolve(),k0=(()=>{let e=class e extends fn{constructor(n,r,s,o,a,c){super(),this._changeDetectorRef=a,this.callSetDisabledState=c,this.control=new cr,this._registered=!1,this.name="",this.update=new $,this._parent=n,this._setValidators(r),this._setAsyncValidators(s),this.valueAccessor=Jh(this,o)}ngOnChanges(n){if(this._checkForErrors(),!this._registered||"name"in n){if(this._registered&&(this._checkName(),this.formDirective)){let r=n.name.previousValue;this.formDirective.removeControl({name:r,path:this._getPath(r)})}this._setUpControl()}"isDisabled"in n&&this._updateDisabled(n),qh(n,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(n){this.viewModel=n,this.update.emit(n)}_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(){sc(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(n){Ch.then(()=>{this.control.setValue(n,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(n){let r=n.isDisabled.currentValue,s=r!==0&&Jo(r);Ch.then(()=>{s&&!this.control.disabled?this.control.disable():!s&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(n){return this._parent?zh(n,this._parent):[n]}};e.\u0275fac=function(r){return new(r||e)(x(hn,9),x(ac,10),x(cc,10),x(Ns,10),x(vt,8),x(xs,8))},e.\u0275dir=B({type:e,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:[Ut([N0]),ze,ft]});let t=e;return t})(),iT=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=B({type:e,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]});let t=e;return t})();var Kh=new O("");var x0={provide:hn,useExisting:xt(()=>F0)},F0=(()=>{let e=class e extends hn{get submitted(){return We(this._submittedReactive)}set submitted(n){this._submittedReactive.set(n)}constructor(n,r,s){super(),this.callSetDisabledState=s,this._submitted=Ln(()=>this._submittedReactive()),this._submittedReactive=Ge(!1),this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new $,this._setValidators(n),this._setAsyncValidators(r)}ngOnChanges(n){this._checkFormPresent(),n.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(Ms(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(n){let r=this.form.get(n.path);return sc(r,n,this.callSetDisabledState),r.updateValueAndValidity({emitEvent:!1}),this.directives.push(n),r}getControl(n){return this.form.get(n.path)}removeControl(n){Dh(n.control||null,n,!1),P0(this.directives,n)}addFormGroup(n){this._setUpFormContainer(n)}removeFormGroup(n){this._cleanUpFormContainer(n)}getFormGroup(n){return this.form.get(n.path)}addFormArray(n){this._setUpFormContainer(n)}removeFormArray(n){this._cleanUpFormContainer(n)}getFormArray(n){return this.form.get(n.path)}updateModel(n,r){this.form.get(n.path).setValue(r)}onSubmit(n){return this._submittedReactive.set(!0),R0(this.form,this.directives),this.ngSubmit.emit(n),this.form._events.next(new nc(this.control)),n?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(n=void 0){this.form.reset(n),this._submittedReactive.set(!1),this.form._events.next(new ic(this.form))}_updateDomValue(){this.directives.forEach(n=>{let r=n.control,s=this.form.get(n.path);r!==s&&(Dh(r||null,n),M0(s)&&(sc(s,n,this.callSetDisabledState),n.control=s))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(n){let r=this.form.get(n.path);S0(r,n),r.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(n){if(this.form){let r=this.form.get(n.path);r&&A0(r,n)&&r.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){dc(this.form,this),this._oldForm&&Ms(this._oldForm,this)}_checkFormPresent(){this.form}};e.\u0275fac=function(r){return new(r||e)(x(ac,10),x(cc,10),x(xs,8))},e.\u0275dir=B({type:e,selectors:[["","formGroup",""]],hostBindings:function(r,s){r&1&&Ce("submit",function(a){return s.onSubmit(a)})("reset",function(){return s.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Ut([x0]),ze,ft]});let t=e;return t})();var L0={provide:fn,useExisting:xt(()=>B0)},B0=(()=>{let e=class e extends fn{set isDisabled(n){}constructor(n,r,s,o,a){super(),this._ngModelWarningConfig=a,this._added=!1,this.name=null,this.update=new $,this._ngModelWarningSent=!1,this._parent=n,this._setValidators(r),this._setAsyncValidators(s),this.valueAccessor=Jh(this,o)}ngOnChanges(n){this._added||this._setUpControl(),qh(n,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(n){this.viewModel=n,this.update.emit(n)}get path(){return zh(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}};e._ngModelWarningSentOnce=!1,e.\u0275fac=function(r){return new(r||e)(x(hn,13),x(ac,10),x(cc,10),x(Ns,10),x(Kh,8))},e.\u0275dir=B({type:e,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},features:[Ut([L0]),ze,ft]});let t=e;return t})();var Yh=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=Ne({type:e}),e.\u0275inj=Me({});let t=e;return t})(),oc=class extends Xn{constructor(e,i,n){super(lc(i),uc(n,i)),this.controls=e,this._initObservables(),this._setUpdateStrategy(i),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(e){return this.controls[this._adjustIndex(e)]}push(e,i={}){this.controls.push(e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}insert(e,i,n={}){this.controls.splice(e,0,i),this._registerControl(i),this.updateValueAndValidity({emitEvent:n.emitEvent})}removeAt(e,i={}){let n=this._adjustIndex(e);n<0&&(n=0),this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),this.controls.splice(n,1),this.updateValueAndValidity({emitEvent:i.emitEvent})}setControl(e,i,n={}){let r=this._adjustIndex(e);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),i&&(this.controls.splice(r,0,i),this._registerControl(i)),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(e,i={}){Gh(this,!1,e),e.forEach((n,r)=>{Hh(this,!1,r),this.at(r).setValue(n,{onlySelf:!0,emitEvent:i.emitEvent})}),this.updateValueAndValidity(i)}patchValue(e,i={}){e!=null&&(e.forEach((n,r)=>{this.at(r)&&this.at(r).patchValue(n,{onlySelf:!0,emitEvent:i.emitEvent})}),this.updateValueAndValidity(i))}reset(e=[],i={}){this._forEachChild((n,r)=>{n.reset(e[r],{onlySelf:!0,emitEvent:i.emitEvent})}),this._updatePristine(i,this),this._updateTouched(i,this),this.updateValueAndValidity(i)}getRawValue(){return this.controls.map(e=>e.getRawValue())}clear(e={}){this.controls.length<1||(this._forEachChild(i=>i._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:e.emitEvent}))}_adjustIndex(e){return e<0?e+this.length:e}_syncPendingControls(){let e=this.controls.reduce((i,n)=>n._syncPendingControls()?!0:i,!1);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){this.controls.forEach((i,n)=>{e(i,n)})}_updateValue(){this.value=this.controls.filter(e=>e.enabled||this.disabled).map(e=>e.value)}_anyControls(e){return this.controls.some(i=>i.enabled&&e(i))}_setUpControls(){this._forEachChild(e=>this._registerControl(e))}_allControlsDisabled(){for(let e of this.controls)if(e.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(e){e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)}_find(e){return this.at(e)??null}};function Ih(t){return!!t&&(t.asyncValidators!==void 0||t.validators!==void 0||t.updateOn!==void 0)}var rT=(()=>{let e=class e{constructor(){this.useNonNullable=!1}get nonNullable(){let n=new e;return n.useNonNullable=!0,n}group(n,r=null){let s=this._reduceControls(n),o={};return Ih(r)?o=r:r!==null&&(o.validators=r.validator,o.asyncValidators=r.asyncValidator),new Rs(s,o)}record(n,r=null){let s=this._reduceControls(n);return new rc(s,r)}control(n,r,s){let o={};return this.useNonNullable?(Ih(r)?o=r:(o.validators=r,o.asyncValidators=s),new cr(n,N(m({},o),{nonNullable:!0}))):new cr(n,r,s)}array(n,r,s){let o=n.map(a=>this._createControl(a));return new oc(o,r,s)}_reduceControls(n){let r={};return Object.keys(n).forEach(s=>{r[s]=this._createControl(n[s])}),r}_createControl(n){if(n instanceof cr)return n;if(n instanceof Xn)return n;if(Array.isArray(n)){let r=n[0],s=n.length>1?n[1]:null,o=n.length>2?n[2]:null;return this.control(r,s,o)}else return this.control(n)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var sT=(()=>{let e=class e{static withConfig(n){return{ngModule:e,providers:[{provide:xs,useValue:n.callSetDisabledState??Fs}]}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=Ne({type:e}),e.\u0275inj=Me({imports:[Yh]});let t=e;return t})(),oT=(()=>{let e=class e{static withConfig(n){return{ngModule:e,providers:[{provide:Kh,useValue:n.warnOnNgModelWithFormControl??"always"},{provide:xs,useValue:n.callSetDisabledState??Fs}]}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=Ne({type:e}),e.\u0275inj=Me({imports:[Yh]});let t=e;return t})();function Ls(t){t||(Bo(Ls),t=p(wi));let e=new Pe(i=>t.onDestroy(i.next.bind(i)));return i=>i.pipe(Q(e))}function V0(t,e){!e?.injector&&Bo(V0);let i=e?.injector??p(ne),n=new iu(1),r=Wu(()=>{let s;try{s=t()}catch(o){We(()=>n.error(o));return}We(()=>n.next(s))},{injector:i,manualCleanup:!0});return i.get(wi).onDestroy(()=>{r.destroy(),n.complete()}),n.asObservable()}var Z="top",le="bottom",re="right",ee="left",Bs="auto",Jt=[Z,le,re,ee],Tt="start",pn="end",Qh="clippingParents",Vs="viewport",ei="popper",Zh="reference",hc=Jt.reduce(function(t,e){return t.concat([e+"-"+Tt,e+"-"+pn])},[]),Us=[].concat(Jt,[Bs]).reduce(function(t,e){return t.concat([e,e+"-"+Tt,e+"-"+pn])},[]),U0="beforeRead",j0="read",$0="afterRead",H0="beforeMain",G0="main",z0="afterMain",W0="beforeWrite",q0="write",J0="afterWrite",Xh=[U0,j0,$0,H0,G0,z0,W0,q0,J0];function se(t){return t?(t.nodeName||"").toLowerCase():null}function z(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Be(t){var e=z(t).Element;return t instanceof e||t instanceof Element}function te(t){var e=z(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function ti(t){if(typeof ShadowRoot>"u")return!1;var e=z(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function K0(t){var e=t.state;Object.keys(e.elements).forEach(function(i){var n=e.styles[i]||{},r=e.attributes[i]||{},s=e.elements[i];!te(s)||!se(s)||(Object.assign(s.style,n),Object.keys(r).forEach(function(o){var a=r[o];a===!1?s.removeAttribute(o):s.setAttribute(o,a===!0?"":a)}))})}function Y0(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach(function(n){var r=e.elements[n],s=e.attributes[n]||{},o=Object.keys(e.styles.hasOwnProperty(n)?e.styles[n]:i[n]),a=o.reduce(function(c,l){return c[l]="",c},{});!te(r)||!se(r)||(Object.assign(r.style,a),Object.keys(s).forEach(function(c){r.removeAttribute(c)}))})}}var ef={name:"applyStyles",enabled:!0,phase:"write",fn:K0,effect:Y0,requires:["computeStyles"]};function oe(t){return t.split("-")[0]}var Je=Math.max,gn=Math.min,Ct=Math.round;function ni(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function lr(){return!/^((?!chrome|android).)*safari/i.test(ni())}function Ve(t,e,i){e===void 0&&(e=!1),i===void 0&&(i=!1);var n=t.getBoundingClientRect(),r=1,s=1;e&&te(t)&&(r=t.offsetWidth>0&&Ct(n.width)/t.offsetWidth||1,s=t.offsetHeight>0&&Ct(n.height)/t.offsetHeight||1);var o=Be(t)?z(t):window,a=o.visualViewport,c=!lr()&&i,l=(n.left+(c&&a?a.offsetLeft:0))/r,u=(n.top+(c&&a?a.offsetTop:0))/s,h=n.width/r,d=n.height/s;return{width:h,height:d,top:u,right:l+h,bottom:u+d,left:l,x:l,y:u}}function mn(t){var e=Ve(t),i=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:n}}function ur(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&ti(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function ve(t){return z(t).getComputedStyle(t)}function fc(t){return["table","td","th"].indexOf(se(t))>=0}function ue(t){return((Be(t)?t.ownerDocument:t.document)||window.document).documentElement}function It(t){return se(t)==="html"?t:t.assignedSlot||t.parentNode||(ti(t)?t.host:null)||ue(t)}function tf(t){return!te(t)||ve(t).position==="fixed"?null:t.offsetParent}function Q0(t){var e=/firefox/i.test(ni()),i=/Trident/i.test(ni());if(i&&te(t)){var n=ve(t);if(n.position==="fixed")return null}var r=It(t);for(ti(r)&&(r=r.host);te(r)&&["html","body"].indexOf(se(r))<0;){var s=ve(r);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||e&&s.willChange==="filter"||e&&s.filter&&s.filter!=="none")return r;r=r.parentNode}return null}function Ke(t){for(var e=z(t),i=tf(t);i&&fc(i)&&ve(i).position==="static";)i=tf(i);return i&&(se(i)==="html"||se(i)==="body"&&ve(i).position==="static")?e:i||Q0(t)||e}function _n(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function vn(t,e,i){return Je(t,gn(e,i))}function nf(t,e,i){var n=vn(t,e,i);return n>i?i:n}function dr(){return{top:0,right:0,bottom:0,left:0}}function hr(t){return Object.assign({},dr(),t)}function fr(t,e){return e.reduce(function(i,n){return i[n]=t,i},{})}var Z0=function(e,i){return e=typeof e=="function"?e(Object.assign({},i.rects,{placement:i.placement})):e,hr(typeof e!="number"?e:fr(e,Jt))};function X0(t){var e,i=t.state,n=t.name,r=t.options,s=i.elements.arrow,o=i.modifiersData.popperOffsets,a=oe(i.placement),c=_n(a),l=[ee,re].indexOf(a)>=0,u=l?"height":"width";if(!(!s||!o)){var h=Z0(r.padding,i),d=mn(s),g=c==="y"?Z:ee,v=c==="y"?le:re,E=i.rects.reference[u]+i.rects.reference[c]-o[c]-i.rects.popper[u],_=o[c]-i.rects.reference[c],y=Ke(s),R=y?c==="y"?y.clientHeight||0:y.clientWidth||0:0,P=E/2-_/2,b=h[g],M=R-d[u]-h[v],A=R/2-d[u]/2+P,k=vn(b,A,M),W=c;i.modifiersData[n]=(e={},e[W]=k,e.centerOffset=k-A,e)}}function ev(t){var e=t.state,i=t.options,n=i.element,r=n===void 0?"[data-popper-arrow]":n;r!=null&&(typeof r=="string"&&(r=e.elements.popper.querySelector(r),!r)||ur(e.elements.popper,r)&&(e.elements.arrow=r))}var pc={name:"arrow",enabled:!0,phase:"main",fn:X0,effect:ev,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ue(t){return t.split("-")[1]}var tv={top:"auto",right:"auto",bottom:"auto",left:"auto"};function nv(t,e){var i=t.x,n=t.y,r=e.devicePixelRatio||1;return{x:Ct(i*r)/r||0,y:Ct(n*r)/r||0}}function rf(t){var e,i=t.popper,n=t.popperRect,r=t.placement,s=t.variation,o=t.offsets,a=t.position,c=t.gpuAcceleration,l=t.adaptive,u=t.roundOffsets,h=t.isFixed,d=o.x,g=d===void 0?0:d,v=o.y,E=v===void 0?0:v,_=typeof u=="function"?u({x:g,y:E}):{x:g,y:E};g=_.x,E=_.y;var y=o.hasOwnProperty("x"),R=o.hasOwnProperty("y"),P=ee,b=Z,M=window;if(l){var A=Ke(i),k="clientHeight",W="clientWidth";if(A===z(i)&&(A=ue(i),ve(A).position!=="static"&&a==="absolute"&&(k="scrollHeight",W="scrollWidth")),A=A,r===Z||(r===ee||r===re)&&s===pn){b=le;var q=h&&A===M&&M.visualViewport?M.visualViewport.height:A[k];E-=q-n.height,E*=c?1:-1}if(r===ee||(r===Z||r===le)&&s===pn){P=re;var K=h&&A===M&&M.visualViewport?M.visualViewport.width:A[W];g-=K-n.width,g*=c?1:-1}}var he=Object.assign({position:a},l&&tv),je=u===!0?nv({x:g,y:E},z(i)):{x:g,y:E};if(g=je.x,E=je.y,c){var ge;return Object.assign({},he,(ge={},ge[b]=R?"0":"",ge[P]=y?"0":"",ge.transform=(M.devicePixelRatio||1)<=1?"translate("+g+"px, "+E+"px)":"translate3d("+g+"px, "+E+"px, 0)",ge))}return Object.assign({},he,(e={},e[b]=R?E+"px":"",e[P]=y?g+"px":"",e.transform="",e))}function iv(t){var e=t.state,i=t.options,n=i.gpuAcceleration,r=n===void 0?!0:n,s=i.adaptive,o=s===void 0?!0:s,a=i.roundOffsets,c=a===void 0?!0:a,l={placement:oe(e.placement),variation:Ue(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,rf(Object.assign({},l,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:c})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,rf(Object.assign({},l,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}var sf={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:iv,data:{}};var js={passive:!0};function rv(t){var e=t.state,i=t.instance,n=t.options,r=n.scroll,s=r===void 0?!0:r,o=n.resize,a=o===void 0?!0:o,c=z(e.elements.popper),l=[].concat(e.scrollParents.reference,e.scrollParents.popper);return s&&l.forEach(function(u){u.addEventListener("scroll",i.update,js)}),a&&c.addEventListener("resize",i.update,js),function(){s&&l.forEach(function(u){u.removeEventListener("scroll",i.update,js)}),a&&c.removeEventListener("resize",i.update,js)}}var of={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:rv,data:{}};var sv={left:"right",right:"left",bottom:"top",top:"bottom"};function ii(t){return t.replace(/left|right|bottom|top/g,function(e){return sv[e]})}var ov={start:"end",end:"start"};function $s(t){return t.replace(/start|end/g,function(e){return ov[e]})}function yn(t){var e=z(t),i=e.pageXOffset,n=e.pageYOffset;return{scrollLeft:i,scrollTop:n}}function bn(t){return Ve(ue(t)).left+yn(t).scrollLeft}function gc(t,e){var i=z(t),n=ue(t),r=i.visualViewport,s=n.clientWidth,o=n.clientHeight,a=0,c=0;if(r){s=r.width,o=r.height;var l=lr();(l||!l&&e==="fixed")&&(a=r.offsetLeft,c=r.offsetTop)}return{width:s,height:o,x:a+bn(t),y:c}}function mc(t){var e,i=ue(t),n=yn(t),r=(e=t.ownerDocument)==null?void 0:e.body,s=Je(i.scrollWidth,i.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),o=Je(i.scrollHeight,i.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-n.scrollLeft+bn(t),c=-n.scrollTop;return ve(r||i).direction==="rtl"&&(a+=Je(i.clientWidth,r?r.clientWidth:0)-s),{width:s,height:o,x:a,y:c}}function wn(t){var e=ve(t),i=e.overflow,n=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+r+n)}function Hs(t){return["html","body","#document"].indexOf(se(t))>=0?t.ownerDocument.body:te(t)&&wn(t)?t:Hs(It(t))}function Kt(t,e){var i;e===void 0&&(e=[]);var n=Hs(t),r=n===((i=t.ownerDocument)==null?void 0:i.body),s=z(n),o=r?[s].concat(s.visualViewport||[],wn(n)?n:[]):n,a=e.concat(o);return r?a:a.concat(Kt(It(o)))}function ri(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function av(t,e){var i=Ve(t,!1,e==="fixed");return i.top=i.top+t.clientTop,i.left=i.left+t.clientLeft,i.bottom=i.top+t.clientHeight,i.right=i.left+t.clientWidth,i.width=t.clientWidth,i.height=t.clientHeight,i.x=i.left,i.y=i.top,i}function af(t,e,i){return e===Vs?ri(gc(t,i)):Be(e)?av(e,i):ri(mc(ue(t)))}function cv(t){var e=Kt(It(t)),i=["absolute","fixed"].indexOf(ve(t).position)>=0,n=i&&te(t)?Ke(t):t;return Be(n)?e.filter(function(r){return Be(r)&&ur(r,n)&&se(r)!=="body"}):[]}function _c(t,e,i,n){var r=e==="clippingParents"?cv(t):[].concat(e),s=[].concat(r,[i]),o=s[0],a=s.reduce(function(c,l){var u=af(t,l,n);return c.top=Je(u.top,c.top),c.right=gn(u.right,c.right),c.bottom=gn(u.bottom,c.bottom),c.left=Je(u.left,c.left),c},af(t,o,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function pr(t){var e=t.reference,i=t.element,n=t.placement,r=n?oe(n):null,s=n?Ue(n):null,o=e.x+e.width/2-i.width/2,a=e.y+e.height/2-i.height/2,c;switch(r){case Z:c={x:o,y:e.y-i.height};break;case le:c={x:o,y:e.y+e.height};break;case re:c={x:e.x+e.width,y:a};break;case ee:c={x:e.x-i.width,y:a};break;default:c={x:e.x,y:e.y}}var l=r?_n(r):null;if(l!=null){var u=l==="y"?"height":"width";switch(s){case Tt:c[l]=c[l]-(e[u]/2-i[u]/2);break;case pn:c[l]=c[l]+(e[u]/2-i[u]/2);break;default:}}return c}function Yt(t,e){e===void 0&&(e={});var i=e,n=i.placement,r=n===void 0?t.placement:n,s=i.strategy,o=s===void 0?t.strategy:s,a=i.boundary,c=a===void 0?Qh:a,l=i.rootBoundary,u=l===void 0?Vs:l,h=i.elementContext,d=h===void 0?ei:h,g=i.altBoundary,v=g===void 0?!1:g,E=i.padding,_=E===void 0?0:E,y=hr(typeof _!="number"?_:fr(_,Jt)),R=d===ei?Zh:ei,P=t.rects.popper,b=t.elements[v?R:d],M=_c(Be(b)?b:b.contextElement||ue(t.elements.popper),c,u,o),A=Ve(t.elements.reference),k=pr({reference:A,element:P,strategy:"absolute",placement:r}),W=ri(Object.assign({},P,k)),q=d===ei?W:A,K={top:M.top-q.top+y.top,bottom:q.bottom-M.bottom+y.bottom,left:M.left-q.left+y.left,right:q.right-M.right+y.right},he=t.modifiersData.offset;if(d===ei&&he){var je=he[r];Object.keys(K).forEach(function(ge){var en=[re,le].indexOf(ge)>=0?1:-1,tn=[Z,le].indexOf(ge)>=0?"y":"x";K[ge]+=je[tn]*en})}return K}function vc(t,e){e===void 0&&(e={});var i=e,n=i.placement,r=i.boundary,s=i.rootBoundary,o=i.padding,a=i.flipVariations,c=i.allowedAutoPlacements,l=c===void 0?Us:c,u=Ue(n),h=u?a?hc:hc.filter(function(v){return Ue(v)===u}):Jt,d=h.filter(function(v){return l.indexOf(v)>=0});d.length===0&&(d=h);var g=d.reduce(function(v,E){return v[E]=Yt(t,{placement:E,boundary:r,rootBoundary:s,padding:o})[oe(E)],v},{});return Object.keys(g).sort(function(v,E){return g[v]-g[E]})}function lv(t){if(oe(t)===Bs)return[];var e=ii(t);return[$s(t),e,$s(e)]}function uv(t){var e=t.state,i=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var r=i.mainAxis,s=r===void 0?!0:r,o=i.altAxis,a=o===void 0?!0:o,c=i.fallbackPlacements,l=i.padding,u=i.boundary,h=i.rootBoundary,d=i.altBoundary,g=i.flipVariations,v=g===void 0?!0:g,E=i.allowedAutoPlacements,_=e.options.placement,y=oe(_),R=y===_,P=c||(R||!v?[ii(_)]:lv(_)),b=[_].concat(P).reduce(function(Mn,Pt){return Mn.concat(oe(Pt)===Bs?vc(e,{placement:Pt,boundary:u,rootBoundary:h,padding:l,flipVariations:v,allowedAutoPlacements:E}):Pt)},[]),M=e.rects.reference,A=e.rects.popper,k=new Map,W=!0,q=b[0],K=0;K<b.length;K++){var he=b[K],je=oe(he),ge=Ue(he)===Tt,en=[Z,le].indexOf(je)>=0,tn=en?"width":"height",Se=Yt(e,{placement:he,boundary:u,rootBoundary:h,altBoundary:d,padding:l}),$e=en?ge?re:ee:ge?le:Z;M[tn]>A[tn]&&($e=ii($e));var Or=ii($e),nn=[];if(s&&nn.push(Se[je]<=0),a&&nn.push(Se[$e]<=0,Se[Or]<=0),nn.every(function(Mn){return Mn})){q=he,W=!1;break}k.set(he,nn)}if(W)for(var Rr=v?3:1,Eo=function(Pt){var vi=b.find(function(Mr){var rn=k.get(Mr);if(rn)return rn.slice(0,Pt).every(function(To){return To})});if(vi)return q=vi,"break"},_i=Rr;_i>0;_i--){var Pr=Eo(_i);if(Pr==="break")break}e.placement!==q&&(e.modifiersData[n]._skip=!0,e.placement=q,e.reset=!0)}}var yc={name:"flip",enabled:!0,phase:"main",fn:uv,requiresIfExists:["offset"],data:{_skip:!1}};function dv(t,e,i){var n=oe(t),r=[ee,Z].indexOf(n)>=0?-1:1,s=typeof i=="function"?i(Object.assign({},e,{placement:t})):i,o=s[0],a=s[1];return o=o||0,a=(a||0)*r,[ee,re].indexOf(n)>=0?{x:a,y:o}:{x:o,y:a}}function hv(t){var e=t.state,i=t.options,n=t.name,r=i.offset,s=r===void 0?[0,0]:r,o=Us.reduce(function(u,h){return u[h]=dv(h,e.rects,s),u},{}),a=o[e.placement],c=a.x,l=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=c,e.modifiersData.popperOffsets.y+=l),e.modifiersData[n]=o}var bc={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:hv};function fv(t){var e=t.state,i=t.name;e.modifiersData[i]=pr({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}var cf={name:"popperOffsets",enabled:!0,phase:"read",fn:fv,data:{}};function wc(t){return t==="x"?"y":"x"}function pv(t){var e=t.state,i=t.options,n=t.name,r=i.mainAxis,s=r===void 0?!0:r,o=i.altAxis,a=o===void 0?!1:o,c=i.boundary,l=i.rootBoundary,u=i.altBoundary,h=i.padding,d=i.tether,g=d===void 0?!0:d,v=i.tetherOffset,E=v===void 0?0:v,_=Yt(e,{boundary:c,rootBoundary:l,padding:h,altBoundary:u}),y=oe(e.placement),R=Ue(e.placement),P=!R,b=_n(y),M=wc(b),A=e.modifiersData.popperOffsets,k=e.rects.reference,W=e.rects.popper,q=typeof E=="function"?E(Object.assign({},e.rects,{placement:e.placement})):E,K=typeof q=="number"?{mainAxis:q,altAxis:q}:Object.assign({mainAxis:0,altAxis:0},q),he=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,je={x:0,y:0};if(A){if(s){var ge,en=b==="y"?Z:ee,tn=b==="y"?le:re,Se=b==="y"?"height":"width",$e=A[b],Or=$e+_[en],nn=$e-_[tn],Rr=g?-W[Se]/2:0,Eo=R===Tt?k[Se]:W[Se],_i=R===Tt?-W[Se]:-k[Se],Pr=e.elements.arrow,Mn=g&&Pr?mn(Pr):{width:0,height:0},Pt=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:dr(),vi=Pt[en],Mr=Pt[tn],rn=vn(0,k[Se],Mn[Se]),To=P?k[Se]/2-Rr-rn-vi-K.mainAxis:Eo-rn-vi-K.mainAxis,zp=P?-k[Se]/2+Rr+rn+Mr+K.mainAxis:_i+rn+Mr+K.mainAxis,Co=e.elements.arrow&&Ke(e.elements.arrow),Wp=Co?b==="y"?Co.clientTop||0:Co.clientLeft||0:0,Wl=(ge=he?.[b])!=null?ge:0,qp=$e+To-Wl-Wp,Jp=$e+zp-Wl,ql=vn(g?gn(Or,qp):Or,$e,g?Je(nn,Jp):nn);A[b]=ql,je[b]=ql-$e}if(a){var Jl,Kp=b==="x"?Z:ee,Yp=b==="x"?le:re,sn=A[M],Nr=M==="y"?"height":"width",Kl=sn+_[Kp],Yl=sn-_[Yp],Io=[Z,ee].indexOf(y)!==-1,Ql=(Jl=he?.[M])!=null?Jl:0,Zl=Io?Kl:sn-k[Nr]-W[Nr]-Ql+K.altAxis,Xl=Io?sn+k[Nr]+W[Nr]-Ql-K.altAxis:Yl,eu=g&&Io?nf(Zl,sn,Xl):vn(g?Zl:Kl,sn,g?Xl:Yl);A[M]=eu,je[M]=eu-sn}e.modifiersData[n]=je}}var Dc={name:"preventOverflow",enabled:!0,phase:"main",fn:pv,requiresIfExists:["offset"]};function Ec(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Tc(t){return t===z(t)||!te(t)?yn(t):Ec(t)}function gv(t){var e=t.getBoundingClientRect(),i=Ct(e.width)/t.offsetWidth||1,n=Ct(e.height)/t.offsetHeight||1;return i!==1||n!==1}function Cc(t,e,i){i===void 0&&(i=!1);var n=te(e),r=te(e)&&gv(e),s=ue(e),o=Ve(t,r,i),a={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(n||!n&&!i)&&((se(e)!=="body"||wn(s))&&(a=Tc(e)),te(e)?(c=Ve(e,!0),c.x+=e.clientLeft,c.y+=e.clientTop):s&&(c.x=bn(s))),{x:o.left+a.scrollLeft-c.x,y:o.top+a.scrollTop-c.y,width:o.width,height:o.height}}function mv(t){var e=new Map,i=new Set,n=[];t.forEach(function(s){e.set(s.name,s)});function r(s){i.add(s.name);var o=[].concat(s.requires||[],s.requiresIfExists||[]);o.forEach(function(a){if(!i.has(a)){var c=e.get(a);c&&r(c)}}),n.push(s)}return t.forEach(function(s){i.has(s.name)||r(s)}),n}function Ic(t){var e=mv(t);return Xh.reduce(function(i,n){return i.concat(e.filter(function(r){return r.phase===n}))},[])}function Sc(t){var e;return function(){return e||(e=new Promise(function(i){Promise.resolve().then(function(){e=void 0,i(t())})})),e}}function Ac(t){var e=t.reduce(function(i,n){var r=i[n.name];return i[n.name]=r?Object.assign({},r,n,{options:Object.assign({},r.options,n.options),data:Object.assign({},r.data,n.data)}):n,i},{});return Object.keys(e).map(function(i){return e[i]})}var lf={placement:"bottom",modifiers:[],strategy:"absolute"};function uf(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return!e.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function df(t){t===void 0&&(t={});var e=t,i=e.defaultModifiers,n=i===void 0?[]:i,r=e.defaultOptions,s=r===void 0?lf:r;return function(a,c,l){l===void 0&&(l=s);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},lf,s),modifiersData:{},elements:{reference:a,popper:c},attributes:{},styles:{}},h=[],d=!1,g={state:u,setOptions:function(y){var R=typeof y=="function"?y(u.options):y;E(),u.options=Object.assign({},s,u.options,R),u.scrollParents={reference:Be(a)?Kt(a):a.contextElement?Kt(a.contextElement):[],popper:Kt(c)};var P=Ic(Ac([].concat(n,u.options.modifiers)));return u.orderedModifiers=P.filter(function(b){return b.enabled}),v(),g.update()},forceUpdate:function(){if(!d){var y=u.elements,R=y.reference,P=y.popper;if(uf(R,P)){u.rects={reference:Cc(R,Ke(P),u.options.strategy==="fixed"),popper:mn(P)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(K){return u.modifiersData[K.name]=Object.assign({},K.data)});for(var b=0;b<u.orderedModifiers.length;b++){if(u.reset===!0){u.reset=!1,b=-1;continue}var M=u.orderedModifiers[b],A=M.fn,k=M.options,W=k===void 0?{}:k,q=M.name;typeof A=="function"&&(u=A({state:u,options:W,name:q,instance:g})||u)}}}},update:Sc(function(){return new Promise(function(_){g.forceUpdate(),_(u)})}),destroy:function(){E(),d=!0}};if(!uf(a,c))return g;g.setOptions(l).then(function(_){!d&&l.onFirstUpdate&&l.onFirstUpdate(_)});function v(){u.orderedModifiers.forEach(function(_){var y=_.name,R=_.options,P=R===void 0?{}:R,b=_.effect;if(typeof b=="function"){var M=b({state:u,name:y,instance:g,options:P}),A=function(){};h.push(M||A)}})}function E(){h.forEach(function(_){return _()}),h=[]}return g}}var _v=[of,cf,sf,ef],Oc=df({defaultModifiers:_v});var vv=["*"];var yv=["dialog"];function bv(t,e){if(t&1&&(Te(0,"span"),Fe(1),xe()),t&2){let i=ce().$implicit,n=ce();Ee(n.highlightClass),J(),Wo(i)}}function wv(t,e){if(t&1&&(Ti(0),Fe(1),Ci()),t&2){let i=ce().$implicit;J(),Wo(i)}}function Dv(t,e){if(t&1&&cn(0,bv,2,4,"span",0)(1,wv,2,1,"ng-container"),t&2){let i=e.$index;xu(i%2!==0?0:1)}}var vf={animation:!0,transitionTimerDelayMs:5},kc=(()=>{let e=class e{constructor(){this.animation=vf.animation}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Ev=(()=>{let e=class e{constructor(){this._ngbConfig=p(kc),this.closeOthers=!1,this.destroyOnHide=!0}get animation(){return this._animation??this._ngbConfig.animation}set animation(n){this._animation=n}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function Tv(t){let{transitionDelay:e,transitionDuration:i}=window.getComputedStyle(t),n=parseFloat(e),r=parseFloat(i);return(n+r)*1e3}function hf(t){return t!=null?`${t}`:""}function xc(t){return typeof t=="string"}function Rc(t){return t!=null}function Cv(t){return t&&t.then}function Iv(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function Sv(t,e){return!e||typeof t.closest>"u"?null:t.closest(e)}function Fc(t){return(t||document.body).getBoundingClientRect()}function Av(t){return e=>new Pe(i=>{let n=o=>t.run(()=>i.next(o)),r=o=>t.run(()=>i.error(o)),s=()=>t.run(()=>i.complete());return e.subscribe({next:n,error:r,complete:s})})}function ff(t){return t.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function yf(t=document){let e=t?.activeElement;return e?e.shadowRoot?yf(e.shadowRoot):e:null}var Ov=()=>{},{transitionTimerDelayMs:Rv}=vf,Gs=new Map,Qt=(t,e,i,n)=>{let r=n.context||{},s=Gs.get(e);if(s)switch(n.runningTransition){case"continue":return Xe;case"stop":t.run(()=>s.transition$.complete()),r=Object.assign(s.context,r),Gs.delete(e)}let o=i(e,n.animation,r)||Ov;if(!n.animation||window.getComputedStyle(e).transitionProperty==="none")return t.run(()=>o()),D(void 0).pipe(Av(t));let a=new F,c=new F,l=a.pipe(pu(!0));Gs.set(e,{transition$:a,complete:()=>{c.next(),c.complete()},context:r});let u=Tv(e);return t.runOutsideAngular(()=>{let h=be(e,"transitionend").pipe(Q(l),fe(({target:g})=>g===e)),d=du(u+Rv).pipe(Q(l));No(d,h,c).pipe(Q(l)).subscribe(()=>{Gs.delete(e),t.run(()=>{o(),a.next(),a.complete()})})}),a.asObservable()};function Pv(t,e){if(typeof navigator>"u")return"0px";let{classList:i}=t,n=i.contains("show");n||i.add("show"),t.style[e]="";let r=t.getBoundingClientRect()[e]+"px";return n||i.remove("show"),r}var Mv=(t,e,i)=>{let{direction:n,maxSize:r,dimension:s}=i,{classList:o}=t;function a(){o.add("collapse"),n==="show"?o.add("show"):o.remove("show")}if(!e){a();return}return r||(r=Pv(t,s),i.maxSize=r,t.style[s]=n!=="show"?r:"0px",o.remove("collapse"),o.remove("collapsing"),o.remove("show"),Fc(t),o.add("collapsing")),t.style[s]=n==="show"?r:"0px",()=>{a(),o.remove("collapsing"),t.style[s]=""}},Nv=(()=>{let e=class e{constructor(){this._ngbConfig=p(kc),this.horizontal=!1}get animation(){return this._animation??this._ngbConfig.animation}set animation(n){this._animation=n}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),pf=(()=>{let e=class e{constructor(){this._config=p(Nv),this._element=p(De),this._zone=p(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(n){this._isCollapsed!==n&&(this._isCollapsed=n,this._afterInit&&this._runTransitionWithEvents(n,this.animation))}ngOnInit(){this._runTransition(this._isCollapsed,!1),this._afterInit=!0}toggle(n=this._isCollapsed){this.collapsed=!n,this.ngbCollapseChange.next(this._isCollapsed)}_runTransition(n,r){return Qt(this._zone,this._element.nativeElement,Mv,{animation:r,runningTransition:"stop",context:{direction:n?"hide":"show",dimension:this.horizontal?"width":"height"}})}_runTransitionWithEvents(n,r){this._runTransition(n,r).subscribe(()=>{n?this.hidden.emit():this.shown.emit()})}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=B({type:e,selectors:[["","ngbCollapse",""]],hostVars:2,hostBindings:function(r,s){r&2&&X("collapse-horizontal",s.horizontal)},inputs:{animation:"animation",collapsed:[0,"ngbCollapse","collapsed"],horizontal:"horizontal"},outputs:{ngbCollapseChange:"ngbCollapseChange",shown:"shown",hidden:"hidden"},exportAs:["ngbCollapse"],standalone:!0});let t=e;return t})(),kv=0,KA=(()=>{let e=class e{constructor(){this._vcr=p(Ur),this._element=p(De).nativeElement,this._item=p(oi),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 n of this._viewRef.rootNodes)this._element.appendChild(n)}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=B({type:e,selectors:[["","ngbAccordionBody",""]],contentQueries:function(r,s,o){if(r&1&&Bt(o,Ho,7),r&2){let a;gt(a=mt())&&(s._bodyTpl=a.first)}},hostVars:2,hostBindings:function(r,s){r&2&&X("accordion-body",!0)},standalone:!0});let t=e;return t})(),xv=(()=>{let e=class e{constructor(){this.item=p(oi),this.ngbCollapse=p(pf)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=B({type:e,selectors:[["","ngbAccordionCollapse",""]],hostAttrs:["role","region"],hostVars:4,hostBindings:function(r,s){r&2&&(ln("id",s.item.collapseId),Ae("aria-labelledby",s.item.toggleId),X("accordion-collapse",!0))},exportAs:["ngbAccordionCollapse"],standalone:!0,features:[Go([pf])]});let t=e;return t})(),Fv=(()=>{let e=class e{constructor(){this.item=p(oi),this.accordion=p(bf)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=B({type:e,selectors:[["","ngbAccordionToggle",""]],hostVars:5,hostBindings:function(r,s){r&1&&Ce("click",function(){return!s.item.disabled&&s.accordion.toggle(s.item.id)}),r&2&&(ln("id",s.item.toggleId),Ae("aria-controls",s.item.collapseId)("aria-expanded",!s.item.collapsed),X("collapsed",s.item.collapsed))},standalone:!0});let t=e;return t})(),YA=(()=>{let e=class e{constructor(){this.item=p(oi)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=B({type:e,selectors:[["button","ngbAccordionButton",""]],hostAttrs:["type","button"],hostVars:3,hostBindings:function(r,s){r&2&&(ln("disabled",s.item.disabled),X("accordion-button",!0))},standalone:!0,features:[Go([Fv])]});let t=e;return t})(),QA=(()=>{let e=class e{constructor(){this.item=p(oi)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=B({type:e,selectors:[["","ngbAccordionHeader",""]],hostAttrs:["role","heading"],hostVars:4,hostBindings:function(r,s){r&2&&X("accordion-header",!0)("collapsed",s.item.collapsed)},standalone:!0});let t=e;return t})(),oi=(()=>{let e=class e{constructor(){this._accordion=p(bf),this._cd=p(vt),this._destroyRef=p(wi),this._collapsed=!0,this._id=`ngb-accordion-item-${kv++}`,this._collapseAnimationRunning=!1,this.disabled=!1,this.show=new $,this.shown=new $,this.hide=new $,this.hidden=new $}set id(n){xc(n)&&n!==""&&(this._id=n)}set destroyOnHide(n){this._destroyOnHide=n}get destroyOnHide(){return this._destroyOnHide===void 0?this._accordion.destroyOnHide:this._destroyOnHide}set collapsed(n){n?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:n}=this._collapse;n.animation=!1,n.collapsed=this.collapsed,n.animation=this._accordion.animation,n.hidden.pipe(Ls(this._destroyRef)).subscribe(()=>{this._collapseAnimationRunning=!1,this.hidden.emit(),this._accordion.hidden.emit(this.id)}),n.shown.pipe(Ls(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)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=B({type:e,selectors:[["","ngbAccordionItem",""]],contentQueries:function(r,s,o){if(r&1&&Bt(o,xv,7),r&2){let a;gt(a=mt())&&(s._collapse=a.first)}},hostVars:3,hostBindings:function(r,s){r&2&&(ln("id",s.id),X("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});let t=e;return t})(),bf=(()=>{let e=class e{constructor(){this._config=p(Ev),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(n){this._getItem(n)?.toggle()}expand(n){this._getItem(n)?.expand()}expandAll(){this._items&&(this.closeOthers?this._items.find(n=>!n.collapsed)||this._items.first.expand():this._items.forEach(n=>n.expand()))}collapse(n){this._getItem(n)?.collapse()}collapseAll(){this._items?.forEach(n=>n.collapse())}isExpanded(n){let r=this._getItem(n);return r?!r.collapsed:!1}_ensureCanExpand(n){return this.closeOthers?this._items?(this._items.find(r=>!r.collapsed&&n!==r)?.collapse(),!0):this._anItemWasAlreadyExpandedDuringInitialisation?!1:(this._anItemWasAlreadyExpandedDuringInitialisation=!0,!0):!0}_getItem(n){return this._items?.find(r=>r.id===n)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=B({type:e,selectors:[["","ngbAccordion",""]],contentQueries:function(r,s,o){if(r&1&&Bt(o,oi,4),r&2){let a;gt(a=mt())&&(s._items=a)}},hostVars:2,hostBindings:function(r,s){r&2&&X("accordion",!0)},inputs:{animation:"animation",closeOthers:"closeOthers",destroyOnHide:"destroyOnHide"},outputs:{show:"show",shown:"shown",hide:"hide",hidden:"hidden"},exportAs:["ngbAccordion"],standalone:!0});let t=e;return t})();var ZA=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=Ne({type:e}),e.\u0275inj=Me({});let t=e;return t})();var Ye=function(t){return t[t.Tab=9]="Tab",t[t.Enter=13]="Enter",t[t.Escape=27]="Escape",t[t.Space=32]="Space",t[t.PageUp=33]="PageUp",t[t.PageDown=34]="PageDown",t[t.End=35]="End",t[t.Home=36]="Home",t[t.ArrowLeft=37]="ArrowLeft",t[t.ArrowUp=38]="ArrowUp",t[t.ArrowRight=39]="ArrowRight",t[t.ArrowDown=40]="ArrowDown",t}(Ye||{});var zs=(t,e)=>e?e.some(i=>i.contains(t)):!1,gf=(t,e)=>!e||Sv(t,e)!=null,Lv=(()=>{let t=()=>/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2,e=()=>/Android/.test(navigator.userAgent);return typeof navigator<"u"?!!navigator.userAgent&&(t()||e()):!1})(),Bv=t=>Lv?()=>setTimeout(()=>t(),100):t;function Vv(t,e,i,n,r,s,o,a){i&&t.runOutsideAngular(Bv(()=>{let c=d=>{let g=d.target;return d.button===2||zs(g,o)?!1:i==="inside"?zs(g,s)&&gf(g,a):i==="outside"?!zs(g,s):gf(g,a)||!zs(g,s)},l=be(e,"keydown").pipe(Q(r),fe(d=>d.which===Ye.Escape),V(d=>d.preventDefault())),u=be(e,"mousedown").pipe(I(c),Q(r)),h=be(e,"mouseup").pipe(Fr(u),fe(([d,g])=>g),fu(0),Q(r));No([l.pipe(I(d=>0)),h.pipe(I(d=>1))]).subscribe(d=>t.run(()=>n(d)))}))}var wf=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(", ");function Df(t){let e=Array.from(t.querySelectorAll(wf)).filter(i=>i.tabIndex!==-1);return[e[0],e[e.length-1]]}var Uv=(t,e,i,n=!1)=>{t.runOutsideAngular(()=>{let r=be(e,"focusin").pipe(Q(i),I(s=>s.target));be(e,"keydown").pipe(Q(i),fe(s=>s.which===Ye.Tab),Fr(r)).subscribe(([s,o])=>{let[a,c]=Df(e);(o===a||o===e)&&s.shiftKey&&(c.focus(),s.preventDefault()),o===c&&!s.shiftKey&&(a.focus(),s.preventDefault())}),n&&be(e,"click").pipe(Q(i),Fr(r),I(s=>s[1])).subscribe(s=>s.focus())})},jv=(()=>{let e=class e{constructor(){this._element=p(G).documentElement}isRTL(){return(this._element.getAttribute("dir")||"").toLowerCase()==="rtl"}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),$v=/\s+/,Hv=/ +/gi,Gv={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 zv(t,e){let[i,n]=Gv[t];return e&&n||i}var Wv=/^left/,qv=/^right/,Jv=/^start/,Kv=/^end/;function Yv(t,e){let[i,n]=e.split("-"),r=i.replace(Wv,"start").replace(qv,"end"),s=[r];if(n){let o=n;(i==="left"||i==="right")&&(o=o.replace(Jv,"top").replace(Kv,"bottom")),s.push(`${r}-${o}`)}return t&&(s=s.map(o=>`${t}-${o}`)),s.join(" ")}function mf({placement:t,baseClass:e},i){let n=Array.isArray(t)?t:t.split($v),r=["top","bottom","start","end","top-start","top-end","bottom-start","bottom-end","start-top","start-bottom","end-top","end-bottom"],s=n.findIndex(l=>l==="auto");s>=0&&r.forEach(function(l){n.find(u=>u.search("^"+l)!==-1)==null&&n.splice(s++,1,l)});let o=n.map(l=>zv(l,i.isRTL()));return{placement:o.shift(),modifiers:[{name:"bootstrapClasses",enabled:!!e,phase:"write",fn({state:l}){let u=new RegExp(e+"(-[a-z]+)*","gi"),h=l.elements.popper,d=l.placement,g=h.className;g=g.replace(u,""),g+=` ${Yv(e,d)}`,g=g.trim().replace(Hv," "),h.className=g}},yc,Dc,pc,{enabled:!0,name:"flip",options:{fallbackPlacements:o}},{enabled:!0,name:"preventOverflow",phase:"main",fn:function(){}}]}}function _f(t){return t}function Qv(){let t=p(jv),e=null;return{createPopper(i){if(!e){let r=(i.updatePopperOptions||_f)(mf(i,t));e=Oc(i.hostElement,i.targetElement,r)}},update(){e&&e.update()},setOptions(i){if(e){let r=(i.updatePopperOptions||_f)(mf(i,t));e.setOptions(r)}},destroy(){e&&(e.destroy(),e=null)}}}function Zv(t){return e=>(e.modifiers.push(bc,{name:"offset",options:{offset:()=>t}}),e)}var XA=new Date(1882,10,12),eO=new Date(2174,10,25);var tO=1e3*60*60*24;var Lc=1080,Xv=24*Lc,ey=12*Lc+793,nO=29*Xv+ey,iO=11*Lc+204;var ty=(()=>{let e=class e{constructor(){this.autoClose=!0,this.placement=["bottom-start","bottom-end","top-start","top-end"],this.popperOptions=n=>n,this.container=null}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Ef=(()=>{let e=class e{constructor(){this._disabled=!1,this.nativeElement=p(De).nativeElement,this.tabindex=0}set disabled(n){this._disabled=n===""||n===!0}get disabled(){return this._disabled}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=B({type:e,selectors:[["","ngbDropdownItem",""]],hostAttrs:[1,"dropdown-item"],hostVars:3,hostBindings:function(r,s){r&2&&(ln("tabIndex",s.disabled?-1:s.tabindex),X("disabled",s.disabled))},inputs:{tabindex:"tabindex",disabled:"disabled"},standalone:!0});let t=e;return t})(),rO=(()=>{let e=class e{constructor(){this.item=p(Ef)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=B({type:e,selectors:[["button","ngbDropdownItem",""]],hostVars:1,hostBindings:function(r,s){r&2&&ln("disabled",s.item.disabled)},standalone:!0});let t=e;return t})(),ny=(()=>{let e=class e{constructor(){this.dropdown=p(Tf),this.nativeElement=p(De).nativeElement}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=B({type:e,selectors:[["","ngbDropdownMenu",""]],contentQueries:function(r,s,o){if(r&1&&Bt(o,Ef,4),r&2){let a;gt(a=mt())&&(s.menuItems=a)}},hostVars:4,hostBindings:function(r,s){r&1&&Ce("keydown.ArrowUp",function(a){return s.dropdown.onKeyDown(a)})("keydown.ArrowDown",function(a){return s.dropdown.onKeyDown(a)})("keydown.Home",function(a){return s.dropdown.onKeyDown(a)})("keydown.End",function(a){return s.dropdown.onKeyDown(a)})("keydown.Enter",function(a){return s.dropdown.onKeyDown(a)})("keydown.Space",function(a){return s.dropdown.onKeyDown(a)})("keydown.Tab",function(a){return s.dropdown.onKeyDown(a)})("keydown.Shift.Tab",function(a){return s.dropdown.onKeyDown(a)}),r&2&&X("dropdown-menu",!0)("show",s.dropdown.isOpen())},standalone:!0});let t=e;return t})(),Pc=(()=>{let e=class e{constructor(){this.dropdown=p(Tf),this.nativeElement=p(De).nativeElement}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=B({type:e,selectors:[["","ngbDropdownAnchor",""]],hostAttrs:[1,"dropdown-toggle"],hostVars:3,hostBindings:function(r,s){r&2&&(Ae("aria-expanded",s.dropdown.isOpen()),X("show",s.dropdown.isOpen()))},standalone:!0});let t=e;return t})(),sO=(()=>{let e=class e extends Pc{};e.\u0275fac=(()=>{let n;return function(s){return(n||(n=Ft(e)))(s||e)}})(),e.\u0275dir=B({type:e,selectors:[["","ngbDropdownToggle",""]],hostAttrs:[1,"dropdown-toggle"],hostVars:3,hostBindings:function(r,s){r&1&&Ce("click",function(){return s.dropdown.toggle()})("keydown.ArrowUp",function(a){return s.dropdown.onKeyDown(a)})("keydown.ArrowDown",function(a){return s.dropdown.onKeyDown(a)})("keydown.Home",function(a){return s.dropdown.onKeyDown(a)})("keydown.End",function(a){return s.dropdown.onKeyDown(a)})("keydown.Tab",function(a){return s.dropdown.onKeyDown(a)})("keydown.Shift.Tab",function(a){return s.dropdown.onKeyDown(a)}),r&2&&(Ae("aria-expanded",s.dropdown.isOpen()),X("show",s.dropdown.isOpen()))},standalone:!0,features:[Ut([{provide:Pc,useExisting:xt(()=>e)}]),ze]});let t=e;return t})(),Tf=(()=>{let e=class e{constructor(){this._changeDetector=p(vt),this._config=p(ty),this._document=p(G),this._ngZone=p(H),this._nativeElement=p(De).nativeElement,this._destroyCloseHandlers$=new F,this._bodyContainer=null,this._positioning=Qv(),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(we(1)).subscribe(()=>{this._applyPlacementClasses(),this._open&&this._setCloseHandlers()})}ngOnChanges(n){if(n.container&&this._open&&this._applyContainer(this.container),n.placement&&!n.placement.firstChange&&(this._positioning.setOptions({hostElement:this._anchor.nativeElement,targetElement:this._bodyContainer||this._menu.nativeElement,placement:this.placement,appendToBody:this.container==="body"}),this._applyPlacementClasses()),n.dropdownClass){let{currentValue:r,previousValue:s}=n.dropdownClass;this._applyCustomDropdownClass(r,s)}n.autoClose&&this._open&&(this.autoClose=n.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:n=>this.popperOptions(Zv([0,2])(n))}),this._applyPlacementClasses(),this._zoneSubscription=this._ngZone.onStable.subscribe(()=>this._positionMenu())})))}_setCloseHandlers(){this._destroyCloseHandlers$.next(),Vv(this._ngZone,this._document,this.autoClose,n=>{this.close(),n===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(n){let r=n.which,s=this._getMenuElements(),o=-1,a=null,c=this._isEventFromToggle(n);if(!c&&s.length&&s.forEach((l,u)=>{l.contains(n.target)&&(a=l),l===yf(this._document)&&(o=u)}),r===Ye.Space||r===Ye.Enter){a&&(this.autoClose===!0||this.autoClose==="inside")&&be(a,"click").pipe(we(1)).subscribe(()=>this.close());return}if(r===Ye.Tab){if(n.target&&this.isOpen()&&this.autoClose)if(this._anchor.nativeElement===n.target){this.container==="body"&&!n.shiftKey?(this._menu.nativeElement.setAttribute("tabindex","0"),this._menu.nativeElement.focus(),this._menu.nativeElement.removeAttribute("tabindex")):n.shiftKey&&this.close();return}else if(this.container==="body"){let l=this._menu.nativeElement.querySelectorAll(wf);n.shiftKey&&n.target===l[0]?(this._anchor.nativeElement.focus(),n.preventDefault()):!n.shiftKey&&n.target===l[l.length-1]&&(this._anchor.nativeElement.focus(),this.close())}else be(n.target,"focusout").pipe(we(1)).subscribe(({relatedTarget:l})=>{this._nativeElement.contains(l)||this.close()});return}if(c||a){if(this.open(),s.length){switch(r){case Ye.ArrowDown:o=Math.min(o+1,s.length-1);break;case Ye.ArrowUp:if(this._isDropup()&&o===-1){o=s.length-1;break}o=Math.max(o-1,0);break;case Ye.Home:o=0;break;case Ye.End:o=s.length-1;break}s[o].focus()}n.preventDefault()}}_isDropup(){return this._nativeElement.classList.contains("dropup")}_isEventFromToggle(n){return this._anchor.nativeElement.contains(n.target)}_getMenuElements(){return this._menu?this._menu.menuItems.filter(({disabled:n})=>!n).map(({nativeElement:n})=>n):[]}_positionMenu(){let n=this._menu;this.isOpen()&&n&&(this.display==="dynamic"?(this._positioning.update(),this._applyPlacementClasses()):this._applyPlacementClasses(this._getFirstPlacement(this.placement)))}_getFirstPlacement(n){return Array.isArray(n)?n[0]:n.split(" ")[0]}_resetContainer(){this._menu&&this._nativeElement.appendChild(this._menu.nativeElement),this._bodyContainer&&(this._document.body.removeChild(this._bodyContainer),this._bodyContainer=null)}_applyContainer(n=null){if(this._resetContainer(),n==="body"){let r=this._menu.nativeElement,s=this._bodyContainer=this._bodyContainer||this._document.createElement("div");s.style.position="absolute",r.style.position="static",s.style.zIndex="1055",s.appendChild(r),this._document.body.appendChild(s)}this._applyCustomDropdownClass(this.dropdownClass)}_applyCustomDropdownClass(n,r){let s=this.container==="body"?this._bodyContainer:this._nativeElement;s&&(r&&s.classList.remove(r),n&&s.classList.add(n))}_applyPlacementClasses(n){if(this._menu){n||(n=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 r=n.search("^top")!==-1?"dropup":"dropdown";this._nativeElement.classList.add(r),this._bodyContainer&&(this._bodyContainer.classList.remove("dropup","dropdown"),this._bodyContainer.classList.add(r))}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=B({type:e,selectors:[["","ngbDropdown",""]],contentQueries:function(r,s,o){if(r&1&&(Bt(o,ny,5),Bt(o,Pc,5)),r&2){let a;gt(a=mt())&&(s._menu=a.first),gt(a=mt())&&(s._anchor=a.first)}},hostVars:2,hostBindings:function(r,s){r&2&&X("show",s.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:[ft]});let t=e;return t})();var iy=(()=>{let e=class e{constructor(){this._ngbConfig=p(kc),this.backdrop=!0,this.fullscreen=!1,this.keyboard=!0}get animation(){return this._animation??this._ngbConfig.animation}set animation(n){this._animation=n}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),si=class{constructor(e,i,n){this.nodes=e,this.viewRef=i,this.componentRef=n}};var ry=(()=>{let e=class e{constructor(){this._document=p(G)}hide(){let n=Math.abs(window.innerWidth-this._document.documentElement.clientWidth),r=this._document.body,s=r.style,{overflow:o,paddingRight:a}=s;if(n>0){let c=parseFloat(window.getComputedStyle(r).paddingRight);s.paddingRight=`${c+n}px`}return s.overflow="hidden",()=>{n>0&&(s.paddingRight=a),s.overflow=o}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),sy=(()=>{let e=class e{constructor(){this._nativeElement=p(De).nativeElement,this._zone=p(H)}ngOnInit(){this._zone.onStable.asObservable().pipe(we(1)).subscribe(()=>{Qt(this._zone,this._nativeElement,(n,r)=>{r&&Fc(n),n.classList.add("show")},{animation:this.animation,runningTransition:"continue"})})}hide(){return Qt(this._zone,this._nativeElement,({classList:n})=>n.remove("show"),{animation:this.animation,runningTransition:"stop"})}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=ht({type:e,selectors:[["ngb-modal-backdrop"]],hostAttrs:[2,"z-index","1055"],hostVars:6,hostBindings:function(r,s){r&2&&(Ee("modal-backdrop"+(s.backdropClass?" "+s.backdropClass:"")),X("show",!s.animation)("fade",s.animation))},inputs:{animation:"animation",backdropClass:"backdropClass"},standalone:!0,features:[_t],decls:0,vars:0,template:function(r,s){},encapsulation:2});let t=e;return t})(),Ws=class{update(e){}close(e){}dismiss(e){}},oy=["animation","ariaLabelledBy","ariaDescribedBy","backdrop","centered","fullscreen","keyboard","scrollable","size","windowClass","modalDialogClass"],ay=["animation","backdropClass"],Mc=class{_applyWindowOptions(e,i){oy.forEach(n=>{Rc(i[n])&&(e[n]=i[n])})}_applyBackdropOptions(e,i){ay.forEach(n=>{Rc(i[n])&&(e[n]=i[n])})}update(e){this._applyWindowOptions(this._windowCmptRef.instance,e),this._backdropCmptRef&&this._backdropCmptRef.instance&&this._applyBackdropOptions(this._backdropCmptRef.instance,e)}get componentInstance(){if(this._contentRef&&this._contentRef.componentRef)return this._contentRef.componentRef.instance}get closed(){return this._closed.asObservable().pipe(Q(this._hidden))}get dismissed(){return this._dismissed.asObservable().pipe(Q(this._hidden))}get hidden(){return this._hidden.asObservable()}get shown(){return this._windowCmptRef.instance.shown.asObservable()}constructor(e,i,n,r){this._windowCmptRef=e,this._contentRef=i,this._backdropCmptRef=n,this._beforeDismiss=r,this._closed=new F,this._dismissed=new F,this._hidden=new F,e.instance.dismissEvent.subscribe(s=>{this.dismiss(s)}),this.result=new Promise((s,o)=>{this._resolve=s,this._reject=o}),this.result.then(null,()=>{})}close(e){this._windowCmptRef&&(this._closed.next(e),this._resolve(e),this._removeModalElements())}_dismiss(e){this._dismissed.next(e),this._reject(e),this._removeModalElements()}dismiss(e){if(this._windowCmptRef)if(!this._beforeDismiss)this._dismiss(e);else{let i=this._beforeDismiss();Cv(i)?i.then(n=>{n!==!1&&this._dismiss(e)},()=>{}):i!==!1&&this._dismiss(e)}}_removeModalElements(){let e=this._windowCmptRef.instance.hide(),i=this._backdropCmptRef?this._backdropCmptRef.instance.hide():D(void 0);e.subscribe(()=>{let{nativeElement:n}=this._windowCmptRef.location;n.parentNode.removeChild(n),this._windowCmptRef.destroy(),this._contentRef&&this._contentRef.viewRef&&this._contentRef.viewRef.destroy(),this._windowCmptRef=null,this._contentRef=null}),i.subscribe(()=>{if(this._backdropCmptRef){let{nativeElement:n}=this._backdropCmptRef.location;n.parentNode.removeChild(n),this._backdropCmptRef.destroy(),this._backdropCmptRef=null}}),xr(e,i).subscribe(()=>{this._hidden.next(),this._hidden.complete()})}},Nc=function(t){return t[t.BACKDROP_CLICK=0]="BACKDROP_CLICK",t[t.ESC=1]="ESC",t}(Nc||{}),cy=(()=>{let e=class e{constructor(){this._document=p(G),this._elRef=p(De),this._zone=p(H),this._closed$=new F,this._elWithFocus=null,this.backdrop=!0,this.keyboard=!0,this.dismissEvent=new $,this.shown=new F,this.hidden=new F}get fullscreenClass(){return this.fullscreen===!0?" modal-fullscreen":xc(this.fullscreen)?` modal-fullscreen-${this.fullscreen}-down`:""}dismiss(n){this.dismissEvent.emit(n)}ngOnInit(){this._elWithFocus=this._document.activeElement,this._zone.onStable.asObservable().pipe(we(1)).subscribe(()=>{this._show()})}ngOnDestroy(){this._disableEventHandling()}hide(){let{nativeElement:n}=this._elRef,r={animation:this.animation,runningTransition:"stop"},s=Qt(this._zone,n,()=>n.classList.remove("show"),r),o=Qt(this._zone,this._dialogEl.nativeElement,()=>{},r),a=xr(s,o);return a.subscribe(()=>{this.hidden.next(),this.hidden.complete()}),this._disableEventHandling(),this._restoreFocus(),a}_show(){let n={animation:this.animation,runningTransition:"continue"},r=Qt(this._zone,this._elRef.nativeElement,(o,a)=>{a&&Fc(o),o.classList.add("show")},n),s=Qt(this._zone,this._dialogEl.nativeElement,()=>{},n);xr(r,s).subscribe(()=>{this.shown.next(),this.shown.complete()}),this._enableEventHandling(),this._setFocus()}_enableEventHandling(){let{nativeElement:n}=this._elRef;this._zone.runOutsideAngular(()=>{be(n,"keydown").pipe(Q(this._closed$),fe(s=>s.which===Ye.Escape)).subscribe(s=>{this.keyboard?requestAnimationFrame(()=>{s.defaultPrevented||this._zone.run(()=>this.dismiss(Nc.ESC))}):this.backdrop==="static"&&this._bumpBackdrop()});let r=!1;be(this._dialogEl.nativeElement,"mousedown").pipe(Q(this._closed$),V(()=>r=!1),ae(()=>be(n,"mouseup").pipe(Q(this._closed$),we(1))),fe(({target:s})=>n===s)).subscribe(()=>{r=!0}),be(n,"click").pipe(Q(this._closed$)).subscribe(({target:s})=>{n===s&&(this.backdrop==="static"?this._bumpBackdrop():this.backdrop===!0&&!r&&this._zone.run(()=>this.dismiss(Nc.BACKDROP_CLICK))),r=!1})})}_disableEventHandling(){this._closed$.next()}_setFocus(){let{nativeElement:n}=this._elRef;if(!n.contains(document.activeElement)){let r=n.querySelector("[ngbAutofocus]"),s=Df(n)[0];(r||s||n).focus()}}_restoreFocus(){let n=this._document.body,r=this._elWithFocus,s;r&&r.focus&&n.contains(r)?s=r:s=n,this._zone.runOutsideAngular(()=>{setTimeout(()=>s.focus()),this._elWithFocus=null})}_bumpBackdrop(){this.backdrop==="static"&&Qt(this._zone,this._elRef.nativeElement,({classList:n})=>(n.add("modal-static"),()=>n.remove("modal-static")),{animation:this.animation,runningTransition:"continue"})}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=ht({type:e,selectors:[["ngb-modal-window"]],viewQuery:function(r,s){if(r&1&&$u(yv,7),r&2){let o;gt(o=mt())&&(s._dialogEl=o.first)}},hostAttrs:["role","dialog","tabindex","-1"],hostVars:7,hostBindings:function(r,s){r&2&&(Ae("aria-modal",!0)("aria-labelledby",s.ariaLabelledBy)("aria-describedby",s.ariaDescribedBy),Ee("modal d-block"+(s.windowClass?" "+s.windowClass:"")),X("fade",s.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:[_t],ngContentSelectors:vv,decls:4,vars:2,consts:[["dialog",""],["role","document"],[1,"modal-content"]],template:function(r,s){r&1&&(Uu(),Te(0,"div",1,0)(2,"div",2),ju(3),xe()()),r&2&&Ee("modal-dialog"+(s.size?" modal-"+s.size:"")+(s.centered?" modal-dialog-centered":"")+s.fullscreenClass+(s.scrollable?" modal-dialog-scrollable":"")+(s.modalDialogClass?" "+s.modalDialogClass:""))},styles:[`ngb-modal-window .component-host-scrollable{display:flex;flex-direction:column;overflow:hidden}
|
|
3
3
|
`],encapsulation:2});let t=e;return t})(),ly=(()=>{let e=class e{constructor(){this._applicationRef=p(it),this._injector=p(ne),this._environmentInjector=p(tt),this._document=p(G),this._scrollBar=p(ry),this._activeWindowCmptHasChanged=new F,this._ariaHiddenValues=new Map,this._scrollBarRestoreFn=null,this._modalRefs=[],this._windowCmpts=[],this._activeInstances=new $;let n=p(H);this._activeWindowCmptHasChanged.subscribe(()=>{if(this._windowCmpts.length){let r=this._windowCmpts[this._windowCmpts.length-1];Uv(n,r.location.nativeElement,this._activeWindowCmptHasChanged),this._revertAriaHidden(),this._setAriaHidden(r.location.nativeElement)}})}_restoreScrollBar(){let n=this._scrollBarRestoreFn;n&&(this._scrollBarRestoreFn=null,n())}_hideScrollBar(){this._scrollBarRestoreFn||(this._scrollBarRestoreFn=this._scrollBar.hide())}open(n,r,s){let o=s.container instanceof HTMLElement?s.container:Rc(s.container)?this._document.querySelector(s.container):this._document.body;if(!o)throw new Error(`The specified modal container "${s.container||"body"}" was not found in the DOM.`);this._hideScrollBar();let a=new Ws;n=s.injector||n;let c=n.get(tt,null)||this._environmentInjector,l=this._getContentRef(n,c,r,a,s),u=s.backdrop!==!1?this._attachBackdrop(o):void 0,h=this._attachWindowComponent(o,l.nodes),d=new Mc(h,l,u,s.beforeDismiss);return this._registerModalRef(d),this._registerWindowCmpt(h),d.hidden.pipe(we(1)).subscribe(()=>Promise.resolve(!0).then(()=>{this._modalRefs.length||(this._document.body.classList.remove("modal-open"),this._restoreScrollBar(),this._revertAriaHidden())})),a.close=g=>{d.close(g)},a.dismiss=g=>{d.dismiss(g)},a.update=g=>{d.update(g)},d.update(s),this._modalRefs.length===1&&this._document.body.classList.add("modal-open"),u&&u.instance&&u.changeDetectorRef.detectChanges(),h.changeDetectorRef.detectChanges(),d}get activeInstances(){return this._activeInstances}dismissAll(n){this._modalRefs.forEach(r=>r.dismiss(n))}hasOpenModals(){return this._modalRefs.length>0}_attachBackdrop(n){let r=Wr(sy,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector});return this._applicationRef.attachView(r.hostView),n.appendChild(r.location.nativeElement),r}_attachWindowComponent(n,r){let s=Wr(cy,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector,projectableNodes:r});return this._applicationRef.attachView(s.hostView),n.appendChild(s.location.nativeElement),s}_getContentRef(n,r,s,o,a){return s?s instanceof Ho?this._createFromTemplateRef(s,o):xc(s)?this._createFromString(s):this._createFromComponent(n,r,s,o,a):new si([])}_createFromTemplateRef(n,r){let s={$implicit:r,close(a){r.close(a)},dismiss(a){r.dismiss(a)}},o=n.createEmbeddedView(s);return this._applicationRef.attachView(o),new si([o.rootNodes],o)}_createFromString(n){let r=this._document.createTextNode(`${n}`);return new si([[r]])}_createFromComponent(n,r,s,o,a){let c=ne.create({providers:[{provide:Ws,useValue:o}],parent:n}),l=Wr(s,{environmentInjector:r,elementInjector:c}),u=l.location.nativeElement;return a.scrollable&&u.classList.add("component-host-scrollable"),this._applicationRef.attachView(l.hostView),new si([[u]],l.hostView,l)}_setAriaHidden(n){let r=n.parentElement;r&&n!==this._document.body&&(Array.from(r.children).forEach(s=>{s!==n&&s.nodeName!=="SCRIPT"&&(this._ariaHiddenValues.set(s,s.getAttribute("aria-hidden")),s.setAttribute("aria-hidden","true"))}),this._setAriaHidden(r))}_revertAriaHidden(){this._ariaHiddenValues.forEach((n,r)=>{n?r.setAttribute("aria-hidden",n):r.removeAttribute("aria-hidden")}),this._ariaHiddenValues.clear()}_registerModalRef(n){let r=()=>{let s=this._modalRefs.indexOf(n);s>-1&&(this._modalRefs.splice(s,1),this._activeInstances.emit(this._modalRefs))};this._modalRefs.push(n),this._activeInstances.emit(this._modalRefs),n.result.then(r,r)}_registerWindowCmpt(n){this._windowCmpts.push(n),this._activeWindowCmptHasChanged.next(),n.onDestroy(()=>{let r=this._windowCmpts.indexOf(n);r>-1&&(this._windowCmpts.splice(r,1),this._activeWindowCmptHasChanged.next())})}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),oO=(()=>{let e=class e{constructor(){this._injector=p(ne),this._modalStack=p(ly),this._config=p(iy)}open(n,r={}){let s=m(N(m({},this._config),{animation:this._config.animation}),r);return this._modalStack.open(this._injector,n,s)}get activeInstances(){return this._modalStack.activeInstances}dismissAll(n){this._modalStack.dismissAll(n)}hasOpenModals(){return this._modalStack.hasOpenModals()}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var aO=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=Ne({type:e}),e.\u0275inj=Me({});let t=e;return t})();var cO=(()=>{let e=class e{constructor(){this.highlightClass="ngb-highlight",this.accentSensitive=!0}ngOnChanges(n){!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 r=hf(this.result),s=Array.isArray(this.term)?this.term:[this.term],o=u=>this.accentSensitive?u:ff(u),a=s.map(u=>Iv(o(hf(u)))).filter(u=>u),c=this.accentSensitive?r:ff(r),l=a.length?c.split(new RegExp(`(${a.join("|")})`,"gmi")):[r];if(this.accentSensitive)this.parts=l;else{let u=0;this.parts=l.map(h=>r.substring(u,u+=h.length))}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=ht({type:e,selectors:[["ngb-highlight"]],inputs:{highlightClass:"highlightClass",result:"result",term:"term",accentSensitive:"accentSensitive"},standalone:!0,features:[ft,_t],decls:2,vars:0,consts:[[3,"class"]],template:function(r,s){r&1&&Lu(0,Dv,2,1,null,null,Fu),r&2&&Bu(s.parts)},styles:[`.ngb-highlight{font-weight:700}
|
|
4
|
-
`],encapsulation:2,changeDetection:0});let t=e;return t})(),lO=new O("live announcer delay",{providedIn:"root",factory:()=>100});var Cf=(()=>{let e=class e{constructor(){this.http=p(ra),this.toastr=p(Ts),this.requestTimeout=1e4}get(n,r={},s="/"){return this.http.get(`${s}${n}`,m({},r)).pipe(Nn(this.requestTimeout),_e(this.handleError.bind(this)))}post(n,r,s={},o="/"){return this.http.post(`${o}${n}`,r,m({},s)).pipe(Nn(this.requestTimeout),_e(this.handleError.bind(this)))}postFormData(n,r,s={},o="/"){return this.http.post(`${o}/${n}`,r,m({},s)).pipe(Nn(this.requestTimeout),_e(this.handleError.bind(this)))}put(n,r,s={},o="/"){return this.http.put(`${o}/${n}`,r,m({},s)).pipe(Nn(this.requestTimeout),_e(this.handleError.bind(this)))}delete(n,r={},s="/"){return this.http.delete(`${s}/${n}`,m({},r)).pipe(Nn(this.requestTimeout),_e(this.handleError.bind(this)))}handleError(n){let r={header:"API Error ",message:"An unknown error occurred."};return n instanceof cu&&n.name=="TimeoutError"&&(r.header="Request Timeout",r.message="The request took too long to complete. Please try again later."),n instanceof rt&&(Object.keys(n.error).length?(r.header="API Error - "+n.status,r.message=n.error.Message||n.error.message):(n.status===401&&(r.header="Unauthorized",r.message="We can't log you in because of authentication error"),r.header="API Error - "+n.status,r.message=n.error.message)),this.toastr.error(r.message,r.header),an(()=>r)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var Sf=function(t){let e=[],i=0;for(let n=0;n<t.length;n++){let r=t.charCodeAt(n);r<128?e[i++]=r:r<2048?(e[i++]=r>>6|192,e[i++]=r&63|128):(r&64512)===55296&&n+1<t.length&&(t.charCodeAt(n+1)&64512)===56320?(r=65536+((r&1023)<<10)+(t.charCodeAt(++n)&1023),e[i++]=r>>18|240,e[i++]=r>>12&63|128,e[i++]=r>>6&63|128,e[i++]=r&63|128):(e[i++]=r>>12|224,e[i++]=r>>6&63|128,e[i++]=r&63|128)}return e},uy=function(t){let e=[],i=0,n=0;for(;i<t.length;){let r=t[i++];if(r<128)e[n++]=String.fromCharCode(r);else if(r>191&&r<224){let s=t[i++];e[n++]=String.fromCharCode((r&31)<<6|s&63)}else if(r>239&&r<365){let s=t[i++],o=t[i++],a=t[i++],c=((r&7)<<18|(s&63)<<12|(o&63)<<6|a&63)-65536;e[n++]=String.fromCharCode(55296+(c>>10)),e[n++]=String.fromCharCode(56320+(c&1023))}else{let s=t[i++],o=t[i++];e[n++]=String.fromCharCode((r&15)<<12|(s&63)<<6|o&63)}}return e.join("")},Af={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(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();let i=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,n=[];for(let r=0;r<t.length;r+=3){let s=t[r],o=r+1<t.length,a=o?t[r+1]:0,c=r+2<t.length,l=c?t[r+2]:0,u=s>>2,h=(s&3)<<4|a>>4,d=(a&15)<<2|l>>6,g=l&63;c||(g=64,o||(d=64)),n.push(i[u],i[h],i[d],i[g])}return n.join("")},encodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(Sf(t),e)},decodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):uy(this.decodeStringToByteArray(t,e))},decodeStringToByteArray(t,e){this.init_();let i=e?this.charToByteMapWebSafe_:this.charToByteMap_,n=[];for(let r=0;r<t.length;){let s=i[t.charAt(r++)],a=r<t.length?i[t.charAt(r)]:0;++r;let l=r<t.length?i[t.charAt(r)]:64;++r;let h=r<t.length?i[t.charAt(r)]:64;if(++r,s==null||a==null||l==null||h==null)throw new Vc;let d=s<<2|a>>4;if(n.push(d),l!==64){let g=a<<4&240|l>>2;if(n.push(g),h!==64){let v=l<<6&192|h;n.push(v)}}}return n},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let t=0;t<this.ENCODED_VALS.length;t++)this.byteToCharMap_[t]=this.ENCODED_VALS.charAt(t),this.charToByteMap_[this.byteToCharMap_[t]]=t,this.byteToCharMapWebSafe_[t]=this.ENCODED_VALS_WEBSAFE.charAt(t),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[t]]=t,t>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}},Vc=class extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}},dy=function(t){let e=Sf(t);return Af.encodeByteArray(e,!0)},jc=function(t){return dy(t).replace(/\./g,"")},$c=function(t){try{return Af.decodeString(t,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};function hy(){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 fy=()=>hy().__FIREBASE_DEFAULTS__,py=()=>{if(typeof process>"u"||typeof process.env>"u")return;let t=process.env.__FIREBASE_DEFAULTS__;if(t)return JSON.parse(t)},gy=()=>{if(typeof document>"u")return;let t;try{t=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}let e=t&&$c(t[1]);return e&&JSON.parse(e)},Hc=()=>{try{return fy()||py()||gy()}catch(t){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${t}`);return}},Of=t=>{var e,i;return(i=(e=Hc())===null||e===void 0?void 0:e.emulatorHosts)===null||i===void 0?void 0:i[t]};var Gc=()=>{var t;return(t=Hc())===null||t===void 0?void 0:t.config},zc=t=>{var e;return(e=Hc())===null||e===void 0?void 0:e[`_${t}`]};var qs=class{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,i)=>{this.resolve=e,this.reject=i})}wrapCallback(e){return(i,n)=>{i?this.reject(i):this.resolve(n),typeof e=="function"&&(this.promise.catch(()=>{}),e.length===1?e(i):e(i,n))}}};function de(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function Rf(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(de())}function Pf(){let t=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof t=="object"&&t.id!==void 0}function Mf(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function Nf(){let t=de();return t.indexOf("MSIE ")>=0||t.indexOf("Trident/")>=0}function kf(){try{return typeof indexedDB=="object"}catch{return!1}}function xf(){return new Promise((t,e)=>{try{let i=!0,n="validate-browser-context-for-indexeddb-analytics-module",r=self.indexedDB.open(n);r.onsuccess=()=>{r.result.close(),i||self.indexedDB.deleteDatabase(n),t(!0)},r.onupgradeneeded=()=>{i=!1},r.onerror=()=>{var s;e(((s=r.error)===null||s===void 0?void 0:s.message)||"")}}catch(i){e(i)}})}var my="FirebaseError",Qe=class t extends Error{constructor(e,i,n){super(i),this.code=e,this.customData=n,this.name=my,Object.setPrototypeOf(this,t.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,St.prototype.create)}},St=class{constructor(e,i,n){this.service=e,this.serviceName=i,this.errors=n}create(e,...i){let n=i[0]||{},r=`${this.service}/${e}`,s=this.errors[e],o=s?_y(s,n):"Error",a=`${this.serviceName}: ${o} (${r}).`;return new Qe(r,a,n)}};function _y(t,e){return t.replace(vy,(i,n)=>{let r=e[n];return r!=null?String(r):`<${n}?>`})}var vy=/\{\$([^}]+)}/g;function Ff(t){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}function ai(t,e){if(t===e)return!0;let i=Object.keys(t),n=Object.keys(e);for(let r of i){if(!n.includes(r))return!1;let s=t[r],o=e[r];if(If(s)&&If(o)){if(!ai(s,o))return!1}else if(s!==o)return!1}for(let r of n)if(!i.includes(r))return!1;return!0}function If(t){return t!==null&&typeof t=="object"}function ci(t){let e=[];for(let[i,n]of Object.entries(t))Array.isArray(n)?n.forEach(r=>{e.push(encodeURIComponent(i)+"="+encodeURIComponent(r))}):e.push(encodeURIComponent(i)+"="+encodeURIComponent(n));return e.length?"&"+e.join("&"):""}function Lf(t,e){let i=new Uc(t,e);return i.subscribe.bind(i)}var Uc=class{constructor(e,i){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=i,this.task.then(()=>{e(this)}).catch(n=>{this.error(n)})}next(e){this.forEachObserver(i=>{i.next(e)})}error(e){this.forEachObserver(i=>{i.error(e)}),this.close(e)}complete(){this.forEachObserver(e=>{e.complete()}),this.close()}subscribe(e,i,n){let r;if(e===void 0&&i===void 0&&n===void 0)throw new Error("Missing Observer.");yy(e,["next","error","complete"])?r=e:r={next:e,error:i,complete:n},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(e){this.observers===void 0||this.observers[e]===void 0||(delete this.observers[e],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let i=0;i<this.observers.length;i++)this.sendOne(i,e)}sendOne(e,i){this.task.then(()=>{if(this.observers!==void 0&&this.observers[e]!==void 0)try{i(this.observers[e])}catch(n){typeof console<"u"&&console.error&&console.error(n)}})}close(e){this.finalized||(this.finalized=!0,e!==void 0&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}};function yy(t,e){if(typeof t!="object"||t===null)return!1;for(let i of e)if(i in t&&typeof t[i]=="function")return!0;return!1}function Bc(){}var bO=4*60*60*1e3;function Dn(t){return t&&t._delegate?t._delegate:t}var at=class{constructor(e,i,n){this.name=e,this.instanceFactory=i,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}};var En="[DEFAULT]";var Wc=class{constructor(e,i){this.name=e,this.container=i,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){let i=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(i)){let n=new qs;if(this.instancesDeferred.set(i,n),this.isInitialized(i)||this.shouldAutoInitialize())try{let r=this.getOrInitializeService({instanceIdentifier:i});r&&n.resolve(r)}catch{}}return this.instancesDeferred.get(i).promise}getImmediate(e){var i;let n=this.normalizeInstanceIdentifier(e?.identifier),r=(i=e?.optional)!==null&&i!==void 0?i:!1;if(this.isInitialized(n)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:n})}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(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,!!this.shouldAutoInitialize()){if(wy(e))try{this.getOrInitializeService({instanceIdentifier:En})}catch{}for(let[i,n]of this.instancesDeferred.entries()){let r=this.normalizeInstanceIdentifier(i);try{let s=this.getOrInitializeService({instanceIdentifier:r});n.resolve(s)}catch{}}}}clearInstance(e=En){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}delete(){return f(this,null,function*(){let e=Array.from(this.instances.values());yield Promise.all([...e.filter(i=>"INTERNAL"in i).map(i=>i.INTERNAL.delete()),...e.filter(i=>"_delete"in i).map(i=>i._delete())])})}isComponentSet(){return this.component!=null}isInitialized(e=En){return this.instances.has(e)}getOptions(e=En){return this.instancesOptions.get(e)||{}}initialize(e={}){let{options:i={}}=e,n=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(n))throw Error(`${this.name}(${n}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);let r=this.getOrInitializeService({instanceIdentifier:n,options:i});for(let[s,o]of this.instancesDeferred.entries()){let a=this.normalizeInstanceIdentifier(s);n===a&&o.resolve(r)}return r}onInit(e,i){var n;let r=this.normalizeInstanceIdentifier(i),s=(n=this.onInitCallbacks.get(r))!==null&&n!==void 0?n:new Set;s.add(e),this.onInitCallbacks.set(r,s);let o=this.instances.get(r);return o&&e(o,r),()=>{s.delete(e)}}invokeOnInitCallbacks(e,i){let n=this.onInitCallbacks.get(i);if(n)for(let r of n)try{r(e,i)}catch{}}getOrInitializeService({instanceIdentifier:e,options:i={}}){let n=this.instances.get(e);if(!n&&this.component&&(n=this.component.instanceFactory(this.container,{instanceIdentifier:by(e),options:i}),this.instances.set(e,n),this.instancesOptions.set(e,i),this.invokeOnInitCallbacks(n,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,n)}catch{}return n||null}normalizeInstanceIdentifier(e=En){return this.component?this.component.multipleInstances?e:En:e}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}};function by(t){return t===En?void 0:t}function wy(t){return t.instantiationMode==="EAGER"}var Js=class{constructor(e){this.name=e,this.providers=new Map}addComponent(e){let i=this.getProvider(e.name);if(i.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);i.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);let i=new Wc(e,this);return this.providers.set(e,i),i}getProviders(){return Array.from(this.providers.values())}};var Dy=[],j=function(t){return t[t.DEBUG=0]="DEBUG",t[t.VERBOSE=1]="VERBOSE",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.SILENT=5]="SILENT",t}(j||{}),Ey={debug:j.DEBUG,verbose:j.VERBOSE,info:j.INFO,warn:j.WARN,error:j.ERROR,silent:j.SILENT},Ty=j.INFO,Cy={[j.DEBUG]:"log",[j.VERBOSE]:"log",[j.INFO]:"info",[j.WARN]:"warn",[j.ERROR]:"error"},Iy=(t,e,...i)=>{if(e<t.logLevel)return;let n=new Date().toISOString(),r=Cy[e];if(r)console[r](`[${n}] ${t.name}:`,...i);else throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`)},li=class{constructor(e){this.name=e,this._logLevel=Ty,this._logHandler=Iy,this._userLogHandler=null,Dy.push(this)}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in j))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel=typeof e=="string"?Ey[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if(typeof e!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,j.DEBUG,...e),this._logHandler(this,j.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,j.VERBOSE,...e),this._logHandler(this,j.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,j.INFO,...e),this._logHandler(this,j.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,j.WARN,...e),this._logHandler(this,j.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,j.ERROR,...e),this._logHandler(this,j.ERROR,...e)}};var Sy=(t,e)=>e.some(i=>t instanceof i),Bf,Vf;function Ay(){return Bf||(Bf=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Oy(){return Vf||(Vf=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}var Uf=new WeakMap,Jc=new WeakMap,jf=new WeakMap,qc=new WeakMap,Yc=new WeakMap;function Ry(t){let e=new Promise((i,n)=>{let r=()=>{t.removeEventListener("success",s),t.removeEventListener("error",o)},s=()=>{i(ct(t.result)),r()},o=()=>{n(t.error),r()};t.addEventListener("success",s),t.addEventListener("error",o)});return e.then(i=>{i instanceof IDBCursor&&Uf.set(i,t)}).catch(()=>{}),Yc.set(e,t),e}function Py(t){if(Jc.has(t))return;let e=new Promise((i,n)=>{let r=()=>{t.removeEventListener("complete",s),t.removeEventListener("error",o),t.removeEventListener("abort",o)},s=()=>{i(),r()},o=()=>{n(t.error||new DOMException("AbortError","AbortError")),r()};t.addEventListener("complete",s),t.addEventListener("error",o),t.addEventListener("abort",o)});Jc.set(t,e)}var Kc={get(t,e,i){if(t instanceof IDBTransaction){if(e==="done")return Jc.get(t);if(e==="objectStoreNames")return t.objectStoreNames||jf.get(t);if(e==="store")return i.objectStoreNames[1]?void 0:i.objectStore(i.objectStoreNames[0])}return ct(t[e])},set(t,e,i){return t[e]=i,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function $f(t){Kc=t(Kc)}function My(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...i){let n=t.call(Ks(this),e,...i);return jf.set(n,e.sort?e.sort():[e]),ct(n)}:Oy().includes(t)?function(...e){return t.apply(Ks(this),e),ct(Uf.get(this))}:function(...e){return ct(t.apply(Ks(this),e))}}function Ny(t){return typeof t=="function"?My(t):(t instanceof IDBTransaction&&Py(t),Sy(t,Ay())?new Proxy(t,Kc):t)}function ct(t){if(t instanceof IDBRequest)return Ry(t);if(qc.has(t))return qc.get(t);let e=Ny(t);return e!==t&&(qc.set(t,e),Yc.set(e,t)),e}var Ks=t=>Yc.get(t);function Gf(t,e,{blocked:i,upgrade:n,blocking:r,terminated:s}={}){let o=indexedDB.open(t,e),a=ct(o);return n&&o.addEventListener("upgradeneeded",c=>{n(ct(o.result),c.oldVersion,c.newVersion,ct(o.transaction),c)}),i&&o.addEventListener("blocked",c=>i(c.oldVersion,c.newVersion,c)),a.then(c=>{s&&c.addEventListener("close",()=>s()),r&&c.addEventListener("versionchange",l=>r(l.oldVersion,l.newVersion,l))}).catch(()=>{}),a}var ky=["get","getKey","getAll","getAllKeys","count"],xy=["put","add","delete","clear"],Qc=new Map;function Hf(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(Qc.get(e))return Qc.get(e);let i=e.replace(/FromIndex$/,""),n=e!==i,r=xy.includes(i);if(!(i in(n?IDBIndex:IDBObjectStore).prototype)||!(r||ky.includes(i)))return;let s=function(o,...a){return f(this,null,function*(){let c=this.transaction(o,r?"readwrite":"readonly"),l=c.store;return n&&(l=l.index(a.shift())),(yield Promise.all([l[i](...a),r&&c.done]))[0]})};return Qc.set(e,s),s}$f(t=>N(m({},t),{get:(e,i,n)=>Hf(e,i)||t.get(e,i,n),has:(e,i)=>!!Hf(e,i)||t.has(e,i)}));var Xc=class{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(i=>{if(Fy(i)){let n=i.getImmediate();return`${n.library}/${n.version}`}else return null}).filter(i=>i).join(" ")}};function Fy(t){let e=t.getComponent();return e?.type==="VERSION"}var el="@firebase/app",zf="0.10.7";var Tn=new li("@firebase/app"),Ly="@firebase/app-compat",By="@firebase/analytics-compat",Vy="@firebase/analytics",Uy="@firebase/app-check-compat",jy="@firebase/app-check",$y="@firebase/auth",Hy="@firebase/auth-compat",Gy="@firebase/database",zy="@firebase/database-compat",Wy="@firebase/functions",qy="@firebase/functions-compat",Jy="@firebase/installations",Ky="@firebase/installations-compat",Yy="@firebase/messaging",Qy="@firebase/messaging-compat",Zy="@firebase/performance",Xy="@firebase/performance-compat",eb="@firebase/remote-config",tb="@firebase/remote-config-compat",nb="@firebase/storage",ib="@firebase/storage-compat",rb="@firebase/firestore",sb="@firebase/vertexai-preview",ob="@firebase/firestore-compat",ab="firebase",cb="10.12.4";var tl="[DEFAULT]",lb={[el]:"fire-core",[Ly]:"fire-core-compat",[Vy]:"fire-analytics",[By]:"fire-analytics-compat",[jy]:"fire-app-check",[Uy]:"fire-app-check-compat",[$y]:"fire-auth",[Hy]:"fire-auth-compat",[Gy]:"fire-rtdb",[zy]:"fire-rtdb-compat",[Wy]:"fire-fn",[qy]:"fire-fn-compat",[Jy]:"fire-iid",[Ky]:"fire-iid-compat",[Yy]:"fire-fcm",[Qy]:"fire-fcm-compat",[Zy]:"fire-perf",[Xy]:"fire-perf-compat",[eb]:"fire-rc",[tb]:"fire-rc-compat",[nb]:"fire-gcs",[ib]:"fire-gcs-compat",[rb]:"fire-fst",[ob]:"fire-fst-compat",[sb]:"fire-vertex","fire-js":"fire-js",[ab]:"fire-js-all"};var gr=new Map,ub=new Map,nl=new Map;function Wf(t,e){try{t.container.addComponent(e)}catch(i){Tn.debug(`Component ${e.name} failed to register with FirebaseApp ${t.name}`,i)}}function ui(t){let e=t.name;if(nl.has(e))return Tn.debug(`There were multiple attempts to register component ${e}.`),!1;nl.set(e,t);for(let i of gr.values())Wf(i,t);for(let i of ub.values())Wf(i,t);return!0}function ol(t,e){let i=t.container.getProvider("heartbeat").getImmediate({optional:!0});return i&&i.triggerHeartbeat(),t.container.getProvider(e)}function lt(t){return t.settings!==void 0}var db={"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."},Zt=new St("app","Firebase",db);var il=class{constructor(e,i,n){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},i),this._name=i.name,this._automaticDataCollectionEnabled=i.automaticDataCollectionEnabled,this._container=n,this.container.addComponent(new at("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}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(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw Zt.create("app-deleted",{appName:this._name})}};var di=cb;function al(t,e={}){let i=t;typeof e!="object"&&(e={name:e});let n=Object.assign({name:tl,automaticDataCollectionEnabled:!1},e),r=n.name;if(typeof r!="string"||!r)throw Zt.create("bad-app-name",{appName:String(r)});if(i||(i=Gc()),!i)throw Zt.create("no-options");let s=gr.get(r);if(s){if(ai(i,s.options)&&ai(n,s.config))return s;throw Zt.create("duplicate-app",{appName:r})}let o=new Js(r);for(let c of nl.values())o.addComponent(c);let a=new il(i,n,o);return gr.set(r,a),a}function Ys(t=tl){let e=gr.get(t);if(!e&&t===tl&&Gc())return al();if(!e)throw Zt.create("no-app",{appName:t});return e}function Qs(){return Array.from(gr.values())}function Ie(t,e,i){var n;let r=(n=lb[t])!==null&&n!==void 0?n:t;i&&(r+=`-${i}`);let s=r.match(/\s|\//),o=e.match(/\s|\//);if(s||o){let a=[`Unable to register library "${r}" with version "${e}":`];s&&a.push(`library name "${r}" contains illegal characters (whitespace or "/")`),s&&o&&a.push("and"),o&&a.push(`version name "${e}" contains illegal characters (whitespace or "/")`),Tn.warn(a.join(" "));return}ui(new at(`${r}-version`,()=>({library:r,version:e}),"VERSION"))}var hb="firebase-heartbeat-database",fb=1,mr="firebase-heartbeat-store",Zc=null;function Yf(){return Zc||(Zc=Gf(hb,fb,{upgrade:(t,e)=>{switch(e){case 0:try{t.createObjectStore(mr)}catch(i){console.warn(i)}}}}).catch(t=>{throw Zt.create("idb-open",{originalErrorMessage:t.message})})),Zc}function pb(t){return f(this,null,function*(){try{let i=(yield Yf()).transaction(mr),n=yield i.objectStore(mr).get(Qf(t));return yield i.done,n}catch(e){if(e instanceof Qe)Tn.warn(e.message);else{let i=Zt.create("idb-get",{originalErrorMessage:e?.message});Tn.warn(i.message)}}})}function qf(t,e){return f(this,null,function*(){try{let n=(yield Yf()).transaction(mr,"readwrite");yield n.objectStore(mr).put(e,Qf(t)),yield n.done}catch(i){if(i instanceof Qe)Tn.warn(i.message);else{let n=Zt.create("idb-set",{originalErrorMessage:i?.message});Tn.warn(n.message)}}})}function Qf(t){return`${t.name}!${t.options.appId}`}var gb=1024,mb=30*24*60*60*1e3,rl=class{constructor(e){this.container=e,this._heartbeatsCache=null;let i=this.container.getProvider("app").getImmediate();this._storage=new sl(i),this._heartbeatsCachePromise=this._storage.read().then(n=>(this._heartbeatsCache=n,n))}triggerHeartbeat(){return f(this,null,function*(){var e,i;let r=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),s=Jf();if(!(((e=this._heartbeatsCache)===null||e===void 0?void 0:e.heartbeats)==null&&(this._heartbeatsCache=yield this._heartbeatsCachePromise,((i=this._heartbeatsCache)===null||i===void 0?void 0:i.heartbeats)==null))&&!(this._heartbeatsCache.lastSentHeartbeatDate===s||this._heartbeatsCache.heartbeats.some(o=>o.date===s)))return this._heartbeatsCache.heartbeats.push({date:s,agent:r}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(o=>{let a=new Date(o.date).valueOf();return Date.now()-a<=mb}),this._storage.overwrite(this._heartbeatsCache)})}getHeartbeatsHeader(){return f(this,null,function*(){var e;if(this._heartbeatsCache===null&&(yield this._heartbeatsCachePromise),((e=this._heartbeatsCache)===null||e===void 0?void 0:e.heartbeats)==null||this._heartbeatsCache.heartbeats.length===0)return"";let i=Jf(),{heartbeatsToSend:n,unsentEntries:r}=_b(this._heartbeatsCache.heartbeats),s=jc(JSON.stringify({version:2,heartbeats:n}));return this._heartbeatsCache.lastSentHeartbeatDate=i,r.length>0?(this._heartbeatsCache.heartbeats=r,yield this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),s})}};function Jf(){return new Date().toISOString().substring(0,10)}function _b(t,e=gb){let i=[],n=t.slice();for(let r of t){let s=i.find(o=>o.agent===r.agent);if(s){if(s.dates.push(r.date),Kf(i)>e){s.dates.pop();break}}else if(i.push({agent:r.agent,dates:[r.date]}),Kf(i)>e){i.pop();break}n=n.slice(1)}return{heartbeatsToSend:i,unsentEntries:n}}var sl=class{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}runIndexedDBEnvironmentCheck(){return f(this,null,function*(){return kf()?xf().then(()=>!0).catch(()=>!1):!1})}read(){return f(this,null,function*(){if(yield this._canUseIndexedDBPromise){let i=yield pb(this.app);return i?.heartbeats?i:{heartbeats:[]}}else return{heartbeats:[]}})}overwrite(e){return f(this,null,function*(){var i;if(yield this._canUseIndexedDBPromise){let r=yield this.read();return qf(this.app,{lastSentHeartbeatDate:(i=e.lastSentHeartbeatDate)!==null&&i!==void 0?i:r.lastSentHeartbeatDate,heartbeats:e.heartbeats})}else return})}add(e){return f(this,null,function*(){var i;if(yield this._canUseIndexedDBPromise){let r=yield this.read();return qf(this.app,{lastSentHeartbeatDate:(i=e.lastSentHeartbeatDate)!==null&&i!==void 0?i:r.lastSentHeartbeatDate,heartbeats:[...r.heartbeats,...e.heartbeats]})}else return})}};function Kf(t){return jc(JSON.stringify({version:2,heartbeats:t})).length}function vb(t){ui(new at("platform-logger",e=>new Xc(e),"PRIVATE")),ui(new at("heartbeat",e=>new rl(e),"PRIVATE")),Ie(el,zf,t),Ie(el,zf,"esm2017"),Ie("fire-js","")}vb("");var yb="firebase",bb="10.12.4";Ie(yb,bb,"app");var _r=new Ii("ANGULARFIRE2_VERSION");function Zf(t,e,i){if(e){if(e.length===1)return e[0];let s=e.filter(o=>o.app===i);if(s.length===1)return s[0]}return i.container.getProvider(t).getImmediate({optional:!0})}var ll=(t,e)=>{let i=e?[e]:Qs(),n=[];return i.forEach(r=>{r.container.getProvider(t).instances.forEach(o=>{n.includes(o)||n.push(o)})}),n},Zs=class{constructor(){return ll(wb)}},wb="app-check";function hi(){}var Xs=class{zone;delegate;constructor(e,i=su){this.zone=e,this.delegate=i}now(){return this.delegate.now()}schedule(e,i,n){let r=this.zone,s=function(o){r.runGuarded(()=>{e.apply(this,[o])})};return this.delegate.schedule(s,i,n)}},cl=class{zone;task=null;constructor(e){this.zone=e}call(e,i){let n=this.unscheduleTask.bind(this);return this.task=this.zone.run(()=>Zone.current.scheduleMacroTask("firebaseZoneBlock",hi,{},hi,hi)),i.pipe(B({next:n,complete:n,error:n})).subscribe(e).add(n)}unscheduleTask(){setTimeout(()=>{this.task!=null&&this.task.state==="scheduled"&&(this.task.invoke(),this.task=null)},10)}},eo=(()=>{class t{ngZone;outsideAngular;insideAngular;constructor(i){this.ngZone=i,this.outsideAngular=i.runOutsideAngular(()=>new Xs(Zone.current)),this.insideAngular=i.run(()=>new Xs(Zone.current,ru)),globalThis.\u0275AngularFireScheduler||=this}static \u0275fac=function(n){return new(n||t)(T(H))};static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function to(){let t=globalThis.\u0275AngularFireScheduler;if(!t)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 t}function Db(t){return to().ngZone.runOutsideAngular(()=>t())}function Cn(t){return to().ngZone.run(()=>t())}function Eb(t){return Tb(to())(t)}function Tb(t){return function(i){return i=i.lift(new cl(t.ngZone)),i.pipe(Ro(t.outsideAngular),Oo(t.insideAngular))}}var Cb=(t,e)=>function(){let n=arguments;return e&&setTimeout(()=>{e.state==="scheduled"&&e.invoke()},10),Cn(()=>t.apply(void 0,n))},fi=(t,e)=>function(){let i,n=arguments;for(let s=0;s<arguments.length;s++)typeof n[s]=="function"&&(e&&(i||=Cn(()=>Zone.current.scheduleMacroTask("firebaseZoneBlock",hi,{},hi,hi))),n[s]=Cb(n[s],i));let r=Db(()=>t.apply(this,n));if(!e)if(r instanceof Pe){let s=to();return r.pipe(Ro(s.outsideAngular),Oo(s.insideAngular))}else return Cn(()=>r);return r instanceof Pe?r.pipe(Eb):r instanceof Promise?Cn(()=>new Promise((s,o)=>r.then(a=>Cn(()=>s(a)),a=>Cn(()=>o(a))))):typeof r=="function"&&i?function(){return setTimeout(()=>{i&&i.state==="scheduled"&&i.invoke()},10),r.apply(this,arguments)}:Cn(()=>r)};var In=class{constructor(e){return e}},vr=class{constructor(){return Qs()}};function Ib(t){return t&&t.length===1?t[0]:new In(Ys())}var ul=new O("angularfire2._apps"),Sb={provide:In,useFactory:Ib,deps:[[new et,ul]]},Ab={provide:vr,deps:[[new et,ul]]};function Ob(t){return(e,i)=>{let n=i.get(nt);Ie("angularfire",_r.full,"core"),Ie("angularfire",_r.full,"app"),Ie("angular",Hu.full,n.toString());let r=e.runOutsideAngular(()=>t(i));return new In(r)}}function oR(t,...e){return He([Sb,Ab,{provide:ul,useFactory:Ob(t),multi:!0,deps:[H,ne,eo,...e]}])}var aR=fi(al,!0);function fp(){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 pp=fp,gp=new St("auth","Firebase",fp());var ao=new li("@firebase/auth");function Rb(t,...e){ao.logLevel<=j.WARN&&ao.warn(`Auth (${di}): ${t}`,...e)}function io(t,...e){ao.logLevel<=j.ERROR&&ao.error(`Auth (${di}): ${t}`,...e)}function dt(t,...e){throw Al(t,...e)}function Ze(t,...e){return Al(t,...e)}function Sl(t,e,i){let n=Object.assign(Object.assign({},pp()),{[e]:i});return new St("auth","Firebase",n).create(e,{appName:t.name})}function Sn(t){return Sl(t,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function Pb(t,e,i){let n=i;if(!(e instanceof n))throw n.name!==e.constructor.name&&dt(t,"argument-error"),Sl(t,"argument-error",`Type of ${e.constructor.name} does not match expected instance.Did you pass a reference from a different Auth SDK?`)}function Al(t,...e){if(typeof t!="string"){let i=e[0],n=[...e.slice(1)];return n[0]&&(n[0].appName=t.name),t._errorFactory.create(i,...n)}return gp.create(t,...e)}function C(t,e,...i){if(!t)throw Al(e,...i)}function At(t){let e="INTERNAL ASSERTION FAILED: "+t;throw io(e),new Error(e)}function Rt(t,e){t||At(e)}function fl(){var t;return typeof self<"u"&&((t=self.location)===null||t===void 0?void 0:t.href)||""}function Mb(){return Xf()==="http:"||Xf()==="https:"}function Xf(){var t;return typeof self<"u"&&((t=self.location)===null||t===void 0?void 0:t.protocol)||null}function Nb(){return typeof navigator<"u"&&navigator&&"onLine"in navigator&&typeof navigator.onLine=="boolean"&&(Mb()||Pf()||"connection"in navigator)?navigator.onLine:!0}function kb(){if(typeof navigator>"u")return null;let t=navigator;return t.languages&&t.languages[0]||t.language||null}var An=class{constructor(e,i){this.shortDelay=e,this.longDelay=i,Rt(i>e,"Short delay should be less than long delay!"),this.isMobile=Rf()||Mf()}get(){return Nb()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}};function Ol(t,e){Rt(t.emulator,"Emulator should always be set here");let{url:i}=t.emulator;return e?`${i}${e.startsWith("/")?e.slice(1):e}`:i}var co=class{static initialize(e,i,n){this.fetchImpl=e,i&&(this.headersImpl=i),n&&(this.responseImpl=n)}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;At("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;At("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;At("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}};var xb={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 Fb=new An(3e4,6e4);function Rl(t,e){return t.tenantId&&!e.tenantId?Object.assign(Object.assign({},e),{tenantId:t.tenantId}):e}function mi(s,o,a,c){return f(this,arguments,function*(t,e,i,n,r={}){return mp(t,r,()=>f(this,null,function*(){let l={},u={};n&&(e==="GET"?u=n:l={body:JSON.stringify(n)});let h=ci(Object.assign({key:t.config.apiKey},u)).slice(1),d=yield t._getAdditionalHeaders();return d["Content-Type"]="application/json",t.languageCode&&(d["X-Firebase-Locale"]=t.languageCode),co.fetch()(_p(t,t.config.apiHost,i,h),Object.assign({method:e,headers:d,referrerPolicy:"no-referrer"},l))}))})}function mp(t,e,i){return f(this,null,function*(){t._canInitEmulator=!1;let n=Object.assign(Object.assign({},xb),e);try{let r=new pl(t),s=yield Promise.race([i(),r.promise]);r.clearNetworkTimeout();let o=yield s.json();if("needConfirmation"in o)throw no(t,"account-exists-with-different-credential",o);if(s.ok&&!("errorMessage"in o))return o;{let a=s.ok?o.errorMessage:o.error.message,[c,l]=a.split(" : ");if(c==="FEDERATED_USER_ID_ALREADY_LINKED")throw no(t,"credential-already-in-use",o);if(c==="EMAIL_EXISTS")throw no(t,"email-already-in-use",o);if(c==="USER_DISABLED")throw no(t,"user-disabled",o);let u=n[c]||c.toLowerCase().replace(/[_\s]+/g,"-");if(l)throw Sl(t,u,l);dt(t,u)}}catch(r){if(r instanceof Qe)throw r;dt(t,"network-request-failed",{message:String(r)})}})}function Lb(s,o,a,c){return f(this,arguments,function*(t,e,i,n,r={}){let l=yield mi(t,e,i,n,r);return"mfaPendingCredential"in l&&dt(t,"multi-factor-auth-required",{_serverResponse:l}),l})}function _p(t,e,i,n){let r=`${e}${i}?${n}`;return t.config.emulator?Ol(t.config,r):`${t.config.apiScheme}://${r}`}var pl=class{constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((i,n)=>{this.timer=setTimeout(()=>n(Ze(this.auth,"network-request-failed")),Fb.get())})}clearNetworkTimeout(){clearTimeout(this.timer)}};function no(t,e,i){let n={appName:t.name};i.email&&(n.email=i.email),i.phoneNumber&&(n.phoneNumber=i.phoneNumber);let r=Ze(t,e,n);return r.customData._tokenResponse=i,r}function Bb(t,e){return f(this,null,function*(){return mi(t,"POST","/v1/accounts:delete",e)})}function vp(t,e){return f(this,null,function*(){return mi(t,"POST","/v1/accounts:lookup",e)})}function yr(t){if(t)try{let e=new Date(Number(t));if(!isNaN(e.getTime()))return e.toUTCString()}catch{}}function Pl(t,e=!1){return f(this,null,function*(){let i=Dn(t),n=yield i.getIdToken(e),r=Ml(n);C(r&&r.exp&&r.auth_time&&r.iat,i.auth,"internal-error");let s=typeof r.firebase=="object"?r.firebase:void 0,o=s?.sign_in_provider;return{claims:r,token:n,authTime:yr(dl(r.auth_time)),issuedAtTime:yr(dl(r.iat)),expirationTime:yr(dl(r.exp)),signInProvider:o||null,signInSecondFactor:s?.sign_in_second_factor||null}})}function dl(t){return Number(t)*1e3}function Ml(t){let[e,i,n]=t.split(".");if(e===void 0||i===void 0||n===void 0)return io("JWT malformed, contained fewer than 3 sections"),null;try{let r=$c(i);return r?JSON.parse(r):(io("Failed to decode base64 JWT payload"),null)}catch(r){return io("Caught error parsing JWT payload as JSON",r?.toString()),null}}function ep(t){let e=Ml(t);return C(e,"internal-error"),C(typeof e.exp<"u","internal-error"),C(typeof e.iat<"u","internal-error"),Number(e.exp)-Number(e.iat)}function wr(t,e,i=!1){return f(this,null,function*(){if(i)return e;try{return yield e}catch(n){throw n instanceof Qe&&Vb(n)&&t.auth.currentUser===t&&(yield t.auth.signOut()),n}})}function Vb({code:t}){return t==="auth/user-disabled"||t==="auth/user-token-expired"}var gl=class{constructor(e){this.user=e,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(e){var i;if(e){let n=this.errorBackoff;return this.errorBackoff=Math.min(this.errorBackoff*2,96e4),n}else{this.errorBackoff=3e4;let r=((i=this.user.stsTokenManager.expirationTime)!==null&&i!==void 0?i:0)-Date.now()-3e5;return Math.max(0,r)}}schedule(e=!1){if(!this.isRunning)return;let i=this.getInterval(e);this.timerId=setTimeout(()=>f(this,null,function*(){yield this.iteration()}),i)}iteration(){return f(this,null,function*(){try{yield this.user.getIdToken(!0)}catch(e){e?.code==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()})}};var Dr=class{constructor(e,i){this.createdAt=e,this.lastLoginAt=i,this._initializeTime()}_initializeTime(){this.lastSignInTime=yr(this.lastLoginAt),this.creationTime=yr(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}};function lo(t){return f(this,null,function*(){var e;let i=t.auth,n=yield t.getIdToken(),r=yield wr(t,vp(i,{idToken:n}));C(r?.users.length,i,"internal-error");let s=r.users[0];t._notifyReloadListener(s);let o=!((e=s.providerUserInfo)===null||e===void 0)&&e.length?yp(s.providerUserInfo):[],a=Ub(t.providerData,o),c=t.isAnonymous,l=!(t.email&&s.passwordHash)&&!a?.length,u=c?l:!1,h={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:a,metadata:new Dr(s.createdAt,s.lastLoginAt),isAnonymous:u};Object.assign(t,h)})}function Nl(t){return f(this,null,function*(){let e=Dn(t);yield lo(e),yield e.auth._persistUserIfCurrent(e),e.auth._notifyListenersIfCurrent(e)})}function Ub(t,e){return[...t.filter(n=>!e.some(r=>r.providerId===n.providerId)),...e]}function yp(t){return t.map(e=>{var{providerId:i}=e,n=kr(e,["providerId"]);return{providerId:i,uid:n.rawId||"",displayName:n.displayName||null,email:n.email||null,phoneNumber:n.phoneNumber||null,photoURL:n.photoUrl||null}})}function jb(t,e){return f(this,null,function*(){let i=yield mp(t,{},()=>f(this,null,function*(){let n=ci({grant_type:"refresh_token",refresh_token:e}).slice(1),{tokenApiHost:r,apiKey:s}=t.config,o=_p(t,r,"/v1/token",`key=${s}`),a=yield t._getAdditionalHeaders();return a["Content-Type"]="application/x-www-form-urlencoded",co.fetch()(o,{method:"POST",headers:a,body:n})}));return{accessToken:i.access_token,expiresIn:i.expires_in,refreshToken:i.refresh_token}})}function $b(t,e){return f(this,null,function*(){return mi(t,"POST","/v2/accounts:revokeToken",Rl(t,e))})}var br=class t{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){C(e.idToken,"internal-error"),C(typeof e.idToken<"u","internal-error"),C(typeof e.refreshToken<"u","internal-error");let i="expiresIn"in e&&typeof e.expiresIn<"u"?Number(e.expiresIn):ep(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,i)}updateFromIdToken(e){C(e.length!==0,"internal-error");let i=ep(e);this.updateTokensAndExpiration(e,null,i)}getToken(e,i=!1){return f(this,null,function*(){return!i&&this.accessToken&&!this.isExpired?this.accessToken:(C(this.refreshToken,e,"user-token-expired"),this.refreshToken?(yield this.refresh(e,this.refreshToken),this.accessToken):null)})}clearRefreshToken(){this.refreshToken=null}refresh(e,i){return f(this,null,function*(){let{accessToken:n,refreshToken:r,expiresIn:s}=yield jb(e,i);this.updateTokensAndExpiration(n,r,Number(s))})}updateTokensAndExpiration(e,i,n){this.refreshToken=i||null,this.accessToken=e||null,this.expirationTime=Date.now()+n*1e3}static fromJSON(e,i){let{refreshToken:n,accessToken:r,expirationTime:s}=i,o=new t;return n&&(C(typeof n=="string","internal-error",{appName:e}),o.refreshToken=n),r&&(C(typeof r=="string","internal-error",{appName:e}),o.accessToken=r),s&&(C(typeof s=="number","internal-error",{appName:e}),o.expirationTime=s),o}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}_clone(){return Object.assign(new t,this.toJSON())}_performRefresh(){return At("not implemented")}};function Xt(t,e){C(typeof t=="string"||typeof t>"u","internal-error",{appName:e})}var gi=class t{constructor(e){var{uid:i,auth:n,stsTokenManager:r}=e,s=kr(e,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new gl(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=i,this.auth=n,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 Dr(s.createdAt||void 0,s.lastLoginAt||void 0)}getIdToken(e){return f(this,null,function*(){let i=yield wr(this,this.stsTokenManager.getToken(this.auth,e));return C(i,this.auth,"internal-error"),this.accessToken!==i&&(this.accessToken=i,yield this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),i})}getIdTokenResult(e){return Pl(this,e)}reload(){return Nl(this)}_assign(e){this!==e&&(C(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.photoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map(i=>Object.assign({},i)),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){let i=new t(Object.assign(Object.assign({},this),{auth:e,stsTokenManager:this.stsTokenManager._clone()}));return i.metadata._copy(this.metadata),i}_onReload(e){C(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=e,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(e){this.reloadListener?this.reloadListener(e):this.reloadUserInfo=e}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}_updateTokensIfNecessary(e,i=!1){return f(this,null,function*(){let n=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),n=!0),i&&(yield lo(this)),yield this.auth._persistUserIfCurrent(this),n&&this.auth._notifyListenersIfCurrent(this)})}delete(){return f(this,null,function*(){if(lt(this.auth.app))return Promise.reject(Sn(this.auth));let e=yield this.getIdToken();return yield wr(this,Bb(this.auth,{idToken:e})),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(e=>Object.assign({},e)),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(e,i){var n,r,s,o,a,c,l,u;let h=(n=i.displayName)!==null&&n!==void 0?n:void 0,d=(r=i.email)!==null&&r!==void 0?r:void 0,g=(s=i.phoneNumber)!==null&&s!==void 0?s:void 0,v=(o=i.photoURL)!==null&&o!==void 0?o:void 0,E=(a=i.tenantId)!==null&&a!==void 0?a:void 0,_=(c=i._redirectEventId)!==null&&c!==void 0?c:void 0,y=(l=i.createdAt)!==null&&l!==void 0?l:void 0,R=(u=i.lastLoginAt)!==null&&u!==void 0?u:void 0,{uid:P,emailVerified:b,isAnonymous:M,providerData:A,stsTokenManager:k}=i;C(P&&k,e,"internal-error");let W=br.fromJSON(this.name,k);C(typeof P=="string",e,"internal-error"),Xt(h,e.name),Xt(d,e.name),C(typeof b=="boolean",e,"internal-error"),C(typeof M=="boolean",e,"internal-error"),Xt(g,e.name),Xt(v,e.name),Xt(E,e.name),Xt(_,e.name),Xt(y,e.name),Xt(R,e.name);let q=new t({uid:P,auth:e,email:d,emailVerified:b,displayName:h,isAnonymous:M,photoURL:v,phoneNumber:g,tenantId:E,stsTokenManager:W,createdAt:y,lastLoginAt:R});return A&&Array.isArray(A)&&(q.providerData=A.map(Y=>Object.assign({},Y))),_&&(q._redirectEventId=_),q}static _fromIdTokenResponse(e,i,n=!1){return f(this,null,function*(){let r=new br;r.updateFromServerResponse(i);let s=new t({uid:i.localId,auth:e,stsTokenManager:r,isAnonymous:n});return yield lo(s),s})}static _fromGetAccountInfoResponse(e,i,n){return f(this,null,function*(){let r=i.users[0];C(r.localId!==void 0,"internal-error");let s=r.providerUserInfo!==void 0?yp(r.providerUserInfo):[],o=!(r.email&&r.passwordHash)&&!s?.length,a=new br;a.updateFromIdToken(n);let c=new t({uid:r.localId,auth:e,stsTokenManager:a,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 Dr(r.createdAt,r.lastLoginAt),isAnonymous:!(r.email&&r.passwordHash)&&!s?.length};return Object.assign(c,l),c})}};var tp=new Map;function Ot(t){Rt(t instanceof Function,"Expected a class definition");let e=tp.get(t);return e?(Rt(e instanceof t,"Instance stored in cache mismatched with class"),e):(e=new t,tp.set(t,e),e)}var Hb=(()=>{class t{constructor(){this.type="NONE",this.storage={}}_isAvailable(){return f(this,null,function*(){return!0})}_set(i,n){return f(this,null,function*(){this.storage[i]=n})}_get(i){return f(this,null,function*(){let n=this.storage[i];return n===void 0?null:n})}_remove(i){return f(this,null,function*(){delete this.storage[i]})}_addListener(i,n){}_removeListener(i,n){}}return t.type="NONE",t})(),ml=Hb;function ro(t,e,i){return`firebase:${t}:${e}:${i}`}var uo=class t{constructor(e,i,n){this.persistence=e,this.auth=i,this.userKey=n;let{config:r,name:s}=this.auth;this.fullUserKey=ro(this.userKey,r.apiKey,s),this.fullPersistenceKey=ro("persistence",r.apiKey,s),this.boundEventHandler=i._onStorageEvent.bind(i),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}getCurrentUser(){return f(this,null,function*(){let e=yield this.persistence._get(this.fullUserKey);return e?gi._fromJSON(this.auth,e):null})}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}setPersistence(e){return f(this,null,function*(){if(this.persistence===e)return;let i=yield this.getCurrentUser();if(yield this.removeCurrentUser(),this.persistence=e,i)return this.setCurrentUser(i)})}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static create(e,i,n="authUser"){return f(this,null,function*(){if(!i.length)return new t(Ot(ml),e,n);let r=(yield Promise.all(i.map(l=>f(this,null,function*(){if(yield l._isAvailable())return l})))).filter(l=>l),s=r[0]||Ot(ml),o=ro(n,e.config.apiKey,e.name),a=null;for(let l of i)try{let u=yield l._get(o);if(u){let h=gi._fromJSON(e,u);l!==s&&(a=h),s=l;break}}catch{}let c=r.filter(l=>l._shouldAllowMigration);return!s._shouldAllowMigration||!c.length?new t(s,e,n):(s=c[0],a&&(yield s._set(o,a.toJSON())),yield Promise.all(i.map(l=>f(this,null,function*(){if(l!==s)try{yield l._remove(o)}catch{}}))),new t(s,e,n))})}};function np(t){let e=t.toLowerCase();if(e.includes("opera/")||e.includes("opr/")||e.includes("opios/"))return"Opera";if(Dp(e))return"IEMobile";if(e.includes("msie")||e.includes("trident/"))return"IE";if(e.includes("edge/"))return"Edge";if(bp(e))return"Firefox";if(e.includes("silk/"))return"Silk";if(Tp(e))return"Blackberry";if(Cp(e))return"Webos";if(kl(e))return"Safari";if((e.includes("chrome/")||wp(e))&&!e.includes("edge/"))return"Chrome";if(Ep(e))return"Android";{let i=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,n=t.match(i);if(n?.length===2)return n[1]}return"Other"}function bp(t=de()){return/firefox\//i.test(t)}function kl(t=de()){let e=t.toLowerCase();return e.includes("safari/")&&!e.includes("chrome/")&&!e.includes("crios/")&&!e.includes("android")}function wp(t=de()){return/crios\//i.test(t)}function Dp(t=de()){return/iemobile/i.test(t)}function Ep(t=de()){return/android/i.test(t)}function Tp(t=de()){return/blackberry/i.test(t)}function Cp(t=de()){return/webos/i.test(t)}function bo(t=de()){return/iphone|ipad|ipod/i.test(t)||/macintosh/i.test(t)&&/mobile/i.test(t)}function Gb(t=de()){var e;return bo(t)&&!!(!((e=window.navigator)===null||e===void 0)&&e.standalone)}function zb(){return Nf()&&document.documentMode===10}function Ip(t=de()){return bo(t)||Ep(t)||Cp(t)||Tp(t)||/windows phone/i.test(t)||Dp(t)}function Wb(){try{return!!(window&&window!==window.top)}catch{return!1}}function Sp(t,e=[]){let i;switch(t){case"Browser":i=np(de());break;case"Worker":i=`${np(de())}-${t}`;break;default:i=t}let n=e.length?e.join(","):"FirebaseCore-web";return`${i}/JsCore/${di}/${n}`}var _l=class{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,i){let n=s=>new Promise((o,a)=>{try{let c=e(s);o(c)}catch(c){a(c)}});n.onAbort=i,this.queue.push(n);let r=this.queue.length-1;return()=>{this.queue[r]=()=>Promise.resolve()}}runMiddleware(e){return f(this,null,function*(){if(this.auth.currentUser===e)return;let i=[];try{for(let n of this.queue)yield n(e),n.onAbort&&i.push(n.onAbort)}catch(n){i.reverse();for(let r of i)try{r()}catch{}throw this.auth._errorFactory.create("login-blocked",{originalMessage:n?.message})}})}};function qb(i){return f(this,arguments,function*(t,e={}){return mi(t,"GET","/v2/passwordPolicy",Rl(t,e))})}var Jb=6,vl=class{constructor(e){var i,n,r,s;let o=e.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=(i=o.minPasswordLength)!==null&&i!==void 0?i:Jb,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=e.enforcementState,this.enforcementState==="ENFORCEMENT_STATE_UNSPECIFIED"&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=(r=(n=e.allowedNonAlphanumericCharacters)===null||n===void 0?void 0:n.join(""))!==null&&r!==void 0?r:"",this.forceUpgradeOnSignin=(s=e.forceUpgradeOnSignin)!==null&&s!==void 0?s:!1,this.schemaVersion=e.schemaVersion}validatePassword(e){var i,n,r,s,o,a;let c={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(e,c),this.validatePasswordCharacterOptions(e,c),c.isValid&&(c.isValid=(i=c.meetsMinPasswordLength)!==null&&i!==void 0?i:!0),c.isValid&&(c.isValid=(n=c.meetsMaxPasswordLength)!==null&&n!==void 0?n:!0),c.isValid&&(c.isValid=(r=c.containsLowercaseLetter)!==null&&r!==void 0?r:!0),c.isValid&&(c.isValid=(s=c.containsUppercaseLetter)!==null&&s!==void 0?s:!0),c.isValid&&(c.isValid=(o=c.containsNumericCharacter)!==null&&o!==void 0?o:!0),c.isValid&&(c.isValid=(a=c.containsNonAlphanumericCharacter)!==null&&a!==void 0?a:!0),c}validatePasswordLengthOptions(e,i){let n=this.customStrengthOptions.minPasswordLength,r=this.customStrengthOptions.maxPasswordLength;n&&(i.meetsMinPasswordLength=e.length>=n),r&&(i.meetsMaxPasswordLength=e.length<=r)}validatePasswordCharacterOptions(e,i){this.updatePasswordCharacterOptionsStatuses(i,!1,!1,!1,!1);let n;for(let r=0;r<e.length;r++)n=e.charAt(r),this.updatePasswordCharacterOptionsStatuses(i,n>="a"&&n<="z",n>="A"&&n<="Z",n>="0"&&n<="9",this.allowedNonAlphanumericCharacters.includes(n))}updatePasswordCharacterOptionsStatuses(e,i,n,r,s){this.customStrengthOptions.containsLowercaseLetter&&(e.containsLowercaseLetter||(e.containsLowercaseLetter=i)),this.customStrengthOptions.containsUppercaseLetter&&(e.containsUppercaseLetter||(e.containsUppercaseLetter=n)),this.customStrengthOptions.containsNumericCharacter&&(e.containsNumericCharacter||(e.containsNumericCharacter=r)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(e.containsNonAlphanumericCharacter||(e.containsNonAlphanumericCharacter=s))}};var yl=class{constructor(e,i,n,r){this.app=e,this.heartbeatServiceProvider=i,this.appCheckServiceProvider=n,this.config=r,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new ho(this),this.idTokenSubscription=new ho(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=gp,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=e.name,this.clientVersion=r.sdkClientVersion}_initializeWithPersistence(e,i){return i&&(this._popupRedirectResolver=Ot(i)),this._initializationPromise=this.queue(()=>f(this,null,function*(){var n,r;if(!this._deleted&&(this.persistenceManager=yield uo.create(this,e),!this._deleted)){if(!((n=this._popupRedirectResolver)===null||n===void 0)&&n._shouldInitProactively)try{yield this._popupRedirectResolver._initialize(this)}catch{}yield this.initializeCurrentUser(i),this.lastNotifiedUid=((r=this.currentUser)===null||r===void 0?void 0:r.uid)||null,!this._deleted&&(this._isInitialized=!0)}})),this._initializationPromise}_onStorageEvent(){return f(this,null,function*(){if(this._deleted)return;let e=yield this.assertedPersistence.getCurrentUser();if(!(!this.currentUser&&!e)){if(this.currentUser&&e&&this.currentUser.uid===e.uid){this._currentUser._assign(e),yield this.currentUser.getIdToken();return}yield this._updateCurrentUser(e,!0)}})}initializeCurrentUserFromIdToken(e){return f(this,null,function*(){try{let i=yield vp(this,{idToken:e}),n=yield gi._fromGetAccountInfoResponse(this,i,e);yield this.directlySetCurrentUser(n)}catch(i){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",i),yield this.directlySetCurrentUser(null)}})}initializeCurrentUser(e){return f(this,null,function*(){var i;if(lt(this.app)){let o=this.app.settings.authIdToken;return o?new Promise(a=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(o).then(a,a))}):this.directlySetCurrentUser(null)}let n=yield this.assertedPersistence.getCurrentUser(),r=n,s=!1;if(e&&this.config.authDomain){yield this.getOrInitRedirectPersistenceManager();let o=(i=this.redirectUser)===null||i===void 0?void 0:i._redirectEventId,a=r?._redirectEventId,c=yield this.tryRedirectSignIn(e);(!o||o===a)&&c?.user&&(r=c.user,s=!0)}if(!r)return this.directlySetCurrentUser(null);if(!r._redirectEventId){if(s)try{yield this.beforeStateQueue.runMiddleware(r)}catch(o){r=n,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(o))}return r?this.reloadAndSetCurrentUserOrClear(r):this.directlySetCurrentUser(null)}return C(this._popupRedirectResolver,this,"argument-error"),yield this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===r._redirectEventId?this.directlySetCurrentUser(r):this.reloadAndSetCurrentUserOrClear(r)})}tryRedirectSignIn(e){return f(this,null,function*(){let i=null;try{i=yield this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch{yield this._setRedirectUser(null)}return i})}reloadAndSetCurrentUserOrClear(e){return f(this,null,function*(){try{yield lo(e)}catch(i){if(i?.code!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)})}useDeviceLanguage(){this.languageCode=kb()}_delete(){return f(this,null,function*(){this._deleted=!0})}updateCurrentUser(e){return f(this,null,function*(){if(lt(this.app))return Promise.reject(Sn(this));let i=e?Dn(e):null;return i&&C(i.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(i&&i._clone(this))})}_updateCurrentUser(e,i=!1){return f(this,null,function*(){if(!this._deleted)return e&&C(this.tenantId===e.tenantId,this,"tenant-id-mismatch"),i||(yield this.beforeStateQueue.runMiddleware(e)),this.queue(()=>f(this,null,function*(){yield this.directlySetCurrentUser(e),this.notifyAuthListeners()}))})}signOut(){return f(this,null,function*(){return lt(this.app)?Promise.reject(Sn(this)):(yield this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&(yield this._setRedirectUser(null)),this._updateCurrentUser(null,!0))})}setPersistence(e){return lt(this.app)?Promise.reject(Sn(this)):this.queue(()=>f(this,null,function*(){yield this.assertedPersistence.setPersistence(Ot(e))}))}_getRecaptchaConfig(){return this.tenantId==null?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}validatePassword(e){return f(this,null,function*(){this._getPasswordPolicyInternal()||(yield this._updatePasswordPolicy());let i=this._getPasswordPolicyInternal();return i.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):i.validatePassword(e)})}_getPasswordPolicyInternal(){return this.tenantId===null?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}_updatePasswordPolicy(){return f(this,null,function*(){let e=yield qb(this),i=new vl(e);this.tenantId===null?this._projectPasswordPolicy=i:this._tenantPasswordPolicies[this.tenantId]=i})}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(e){this._errorFactory=new St("auth","Firebase",e())}onAuthStateChanged(e,i,n){return this.registerStateListener(this.authStateSubscription,e,i,n)}beforeAuthStateChanged(e,i){return this.beforeStateQueue.pushCallback(e,i)}onIdTokenChanged(e,i,n){return this.registerStateListener(this.idTokenSubscription,e,i,n)}authStateReady(){return new Promise((e,i)=>{if(this.currentUser)e();else{let n=this.onAuthStateChanged(()=>{n(),e()},i)}})}revokeAccessToken(e){return f(this,null,function*(){if(this.currentUser){let i=yield this.currentUser.getIdToken(),n={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:e,idToken:i};this.tenantId!=null&&(n.tenantId=this.tenantId),yield $b(this,n)}})}toJSON(){var e;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:(e=this._currentUser)===null||e===void 0?void 0:e.toJSON()}}_setRedirectUser(e,i){return f(this,null,function*(){let n=yield this.getOrInitRedirectPersistenceManager(i);return e===null?n.removeCurrentUser():n.setCurrentUser(e)})}getOrInitRedirectPersistenceManager(e){return f(this,null,function*(){if(!this.redirectPersistenceManager){let i=e&&Ot(e)||this._popupRedirectResolver;C(i,this,"argument-error"),this.redirectPersistenceManager=yield uo.create(this,[Ot(i._redirectPersistence)],"redirectUser"),this.redirectUser=yield this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager})}_redirectUserForId(e){return f(this,null,function*(){var i,n;return this._isInitialized&&(yield this.queue(()=>f(this,null,function*(){}))),((i=this._currentUser)===null||i===void 0?void 0:i._redirectEventId)===e?this._currentUser:((n=this.redirectUser)===null||n===void 0?void 0:n._redirectEventId)===e?this.redirectUser:null})}_persistUserIfCurrent(e){return f(this,null,function*(){if(e===this.currentUser)return this.queue(()=>f(this,null,function*(){return this.directlySetCurrentUser(e)}))})}_notifyListenersIfCurrent(e){e===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 e,i;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);let n=(i=(e=this.currentUser)===null||e===void 0?void 0:e.uid)!==null&&i!==void 0?i:null;this.lastNotifiedUid!==n&&(this.lastNotifiedUid=n,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,i,n,r){if(this._deleted)return()=>{};let s=typeof i=="function"?i:i.next.bind(i),o=!1,a=this._isInitialized?Promise.resolve():this._initializationPromise;if(C(a,this,"internal-error"),a.then(()=>{o||s(this.currentUser)}),typeof i=="function"){let c=e.addObserver(i,n,r);return()=>{o=!0,c()}}else{let c=e.addObserver(i);return()=>{o=!0,c()}}}directlySetCurrentUser(e){return f(this,null,function*(){this.currentUser&&this.currentUser!==e&&this._currentUser._stopProactiveRefresh(),e&&this.isProactiveRefreshEnabled&&e._startProactiveRefresh(),this.currentUser=e,e?yield this.assertedPersistence.setCurrentUser(e):yield this.assertedPersistence.removeCurrentUser()})}queue(e){return this.operations=this.operations.then(e,e),this.operations}get assertedPersistence(){return C(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){!e||this.frameworks.includes(e)||(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=Sp(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}_getAdditionalHeaders(){return f(this,null,function*(){var e;let i={"X-Client-Version":this.clientVersion};this.app.options.appId&&(i["X-Firebase-gmpid"]=this.app.options.appId);let n=yield(e=this.heartbeatServiceProvider.getImmediate({optional:!0}))===null||e===void 0?void 0:e.getHeartbeatsHeader();n&&(i["X-Firebase-Client"]=n);let r=yield this._getAppCheckToken();return r&&(i["X-Firebase-AppCheck"]=r),i})}_getAppCheckToken(){return f(this,null,function*(){var e;let i=yield(e=this.appCheckServiceProvider.getImmediate({optional:!0}))===null||e===void 0?void 0:e.getToken();return i?.error&&Rb(`Error while retrieving App Check token: ${i.error}`),i?.token})}};function wo(t){return Dn(t)}var ho=class{constructor(e){this.auth=e,this.observer=null,this.addObserver=Lf(i=>this.observer=i)}get next(){return C(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}};var xl={loadJS(){return f(this,null,function*(){throw new Error("Unable to load external scripts")})},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function Kb(t){xl=t}function Yb(t){return xl.loadJS(t)}function Qb(){return xl.gapiScript}function Ap(t){return`__${t}${Math.floor(Math.random()*1e6)}`}function Fl(t,e){let i=ol(t,"auth");if(i.isInitialized()){let r=i.getImmediate(),s=i.getOptions();if(ai(s,e??{}))return r;dt(r,"already-initialized")}return i.initialize({options:e})}function Zb(t,e){let i=e?.persistence||[],n=(Array.isArray(i)?i:[i]).map(Ot);e?.errorMap&&t._updateErrorMap(e.errorMap),t._initializeWithPersistence(n,e?.popupRedirectResolver)}function Ll(t,e,i){let n=wo(t);C(n._canInitEmulator,n,"emulator-config-failed"),C(/^https?:\/\//.test(e),n,"invalid-emulator-scheme");let r=!!i?.disableWarnings,s=Op(e),{host:o,port:a}=Xb(e),c=a===null?"":`:${a}`;n.config.emulator={url:`${s}//${o}${c}/`},n.settings.appVerificationDisabledForTesting=!0,n.emulatorConfig=Object.freeze({host:o,port:a,protocol:s.replace(":",""),options:Object.freeze({disableWarnings:r})}),r||e1()}function Op(t){let e=t.indexOf(":");return e<0?"":t.substr(0,e+1)}function Xb(t){let e=Op(t),i=/(\/\/)?([^?#/]+)/.exec(t.substr(e.length));if(!i)return{host:"",port:null};let n=i[2].split("@").pop()||"",r=/^(\[[^\]]+\])(:|$)/.exec(n);if(r){let s=r[1];return{host:s,port:ip(n.substr(s.length+1))}}else{let[s,o]=n.split(":");return{host:s,port:ip(o)}}}function ip(t){if(!t)return null;let e=Number(t);return isNaN(e)?null:e}function e1(){function t(){let e=document.createElement("p"),i=e.style;e.innerText="Running in emulator mode. Do not use with production credentials.",i.position="fixed",i.width="100%",i.backgroundColor="#ffffff",i.border=".1em solid #000000",i.color="#b50000",i.bottom="0px",i.left="0px",i.margin="0px",i.zIndex="10000",i.textAlign="center",e.classList.add("firebase-emulator-warning"),document.body.appendChild(e)}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",t):t())}var Er=class{constructor(e,i){this.providerId=e,this.signInMethod=i}toJSON(){return At("not implemented")}_getIdTokenResponse(e){return At("not implemented")}_linkToIdToken(e,i){return At("not implemented")}_getReauthenticationResolver(e){return At("not implemented")}};function pi(t,e){return f(this,null,function*(){return Lb(t,"POST","/v1/accounts:signInWithIdp",Rl(t,e))})}var t1="http://localhost",fo=class t extends Er{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){let i=new t(e.providerId,e.signInMethod);return e.idToken||e.accessToken?(e.idToken&&(i.idToken=e.idToken),e.accessToken&&(i.accessToken=e.accessToken),e.nonce&&!e.pendingToken&&(i.nonce=e.nonce),e.pendingToken&&(i.pendingToken=e.pendingToken)):e.oauthToken&&e.oauthTokenSecret?(i.accessToken=e.oauthToken,i.secret=e.oauthTokenSecret):dt("argument-error"),i}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(e){let i=typeof e=="string"?JSON.parse(e):e,{providerId:n,signInMethod:r}=i,s=kr(i,["providerId","signInMethod"]);if(!n||!r)return null;let o=new t(n,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(e){let i=this.buildRequest();return pi(e,i)}_linkToIdToken(e,i){let n=this.buildRequest();return n.idToken=i,pi(e,n)}_getReauthenticationResolver(e){let i=this.buildRequest();return i.autoCreate=!1,pi(e,i)}buildRequest(){let e={requestUri:t1,returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{let i={};this.idToken&&(i.id_token=this.idToken),this.accessToken&&(i.access_token=this.accessToken),this.secret&&(i.oauth_token_secret=this.secret),i.providerId=this.providerId,this.nonce&&!this.pendingToken&&(i.nonce=this.nonce),e.postBody=ci(i)}return e}};var Tr=class{constructor(e){this.providerId=e,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(e){this.defaultLanguageCode=e}setCustomParameters(e){return this.customParameters=e,this}getCustomParameters(){return this.customParameters}};var po=class extends Tr{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}};var Sr=(()=>{class t extends po{constructor(){super("google.com"),this.addScope("profile")}static credential(i,n){return fo._fromParams({providerId:t.PROVIDER_ID,signInMethod:t.GOOGLE_SIGN_IN_METHOD,idToken:i,accessToken:n})}static credentialFromResult(i){return t.credentialFromTaggedObject(i)}static credentialFromError(i){return t.credentialFromTaggedObject(i.customData||{})}static credentialFromTaggedObject({_tokenResponse:i}){if(!i)return null;let{oauthIdToken:n,oauthAccessToken:r}=i;if(!n&&!r)return null;try{return t.credential(n,r)}catch{return null}}}t.GOOGLE_SIGN_IN_METHOD="google.com",t.PROVIDER_ID="google.com";return t})();var Cr=class t{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static _fromIdTokenResponse(e,i,n,r=!1){return f(this,null,function*(){let s=yield gi._fromIdTokenResponse(e,n,r),o=rp(n);return new t({user:s,providerId:o,_tokenResponse:n,operationType:i})})}static _forOperation(e,i,n){return f(this,null,function*(){yield e._updateTokensIfNecessary(n,!0);let r=rp(n);return new t({user:e,providerId:r,_tokenResponse:n,operationType:i})})}};function rp(t){return t.providerId?t.providerId:"phoneNumber"in t?"phone":null}var bl=class t extends Qe{constructor(e,i,n,r){var s;super(i.code,i.message),this.operationType=n,this.user=r,Object.setPrototypeOf(this,t.prototype),this.customData={appName:e.name,tenantId:(s=e.tenantId)!==null&&s!==void 0?s:void 0,_serverResponse:i.customData._serverResponse,operationType:n}}static _fromErrorAndOperation(e,i,n,r){return new t(e,i,n,r)}};function Rp(t,e,i,n){return(e==="reauthenticate"?i._getReauthenticationResolver(t):i._getIdTokenResponse(t)).catch(s=>{throw s.code==="auth/multi-factor-auth-required"?bl._fromErrorAndOperation(t,s,e,n):s})}function n1(t,e,i=!1){return f(this,null,function*(){let n=yield wr(t,e._linkToIdToken(t.auth,yield t.getIdToken()),i);return Cr._forOperation(t,"link",n)})}function i1(t,e,i=!1){return f(this,null,function*(){let{auth:n}=t;if(lt(n.app))return Promise.reject(Sn(n));let r="reauthenticate";try{let s=yield wr(t,Rp(n,r,e,t),i);C(s.idToken,n,"internal-error");let o=Ml(s.idToken);C(o,n,"internal-error");let{sub:a}=o;return C(t.uid===a,n,"user-mismatch"),Cr._forOperation(t,r,s)}catch(s){throw s?.code==="auth/user-not-found"&&dt(n,"user-mismatch"),s}})}function r1(t,e,i=!1){return f(this,null,function*(){if(lt(t.app))return Promise.reject(Sn(t));let n="signIn",r=yield Rp(t,n,e),s=yield Cr._fromIdTokenResponse(t,n,r);return i||(yield t._updateCurrentUser(s.user)),s})}function Ar(t,e,i,n){return Dn(t).onIdTokenChanged(e,i,n)}function Bl(t,e,i){return Dn(t).beforeAuthStateChanged(e,i)}var go="__sak";var mo=class{constructor(e,i){this.storageRetriever=e,this.type=i}_isAvailable(){try{return this.storage?(this.storage.setItem(go,"1"),this.storage.removeItem(go),Promise.resolve(!0)):Promise.resolve(!1)}catch{return Promise.resolve(!1)}}_set(e,i){return this.storage.setItem(e,JSON.stringify(i)),Promise.resolve()}_get(e){let i=this.storage.getItem(e);return Promise.resolve(i?JSON.parse(i):null)}_remove(e){return this.storage.removeItem(e),Promise.resolve()}get storage(){return this.storageRetriever()}};function s1(){let t=de();return kl(t)||bo(t)}var o1=1e3,a1=10,c1=(()=>{class t extends mo{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(i,n)=>this.onStorageEvent(i,n),this.listeners={},this.localCache={},this.pollTimer=null,this.safariLocalStorageNotSynced=s1()&&Wb(),this.fallbackToPolling=Ip(),this._shouldAllowMigration=!0}forAllChangedKeys(i){for(let n of Object.keys(this.listeners)){let r=this.storage.getItem(n),s=this.localCache[n];r!==s&&i(n,s,r)}}onStorageEvent(i,n=!1){if(!i.key){this.forAllChangedKeys((a,c,l)=>{this.notifyListeners(a,l)});return}let r=i.key;if(n?this.detachListener():this.stopPolling(),this.safariLocalStorageNotSynced){let a=this.storage.getItem(r);if(i.newValue!==a)i.newValue!==null?this.storage.setItem(r,i.newValue):this.storage.removeItem(r);else if(this.localCache[r]===i.newValue&&!n)return}let s=()=>{let a=this.storage.getItem(r);!n&&this.localCache[r]===a||this.notifyListeners(r,a)},o=this.storage.getItem(r);zb()&&o!==i.newValue&&i.newValue!==i.oldValue?setTimeout(s,a1):s()}notifyListeners(i,n){this.localCache[i]=n;let r=this.listeners[i];if(r)for(let s of Array.from(r))s(n&&JSON.parse(n))}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((i,n,r)=>{this.onStorageEvent(new StorageEvent("storage",{key:i,oldValue:n,newValue:r}),!0)})},o1)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(i,n){Object.keys(this.listeners).length===0&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[i]||(this.listeners[i]=new Set,this.localCache[i]=this.storage.getItem(i)),this.listeners[i].add(n)}_removeListener(i,n){this.listeners[i]&&(this.listeners[i].delete(n),this.listeners[i].size===0&&delete this.listeners[i]),Object.keys(this.listeners).length===0&&(this.detachListener(),this.stopPolling())}_set(i,n){return f(this,null,function*(){yield on(t.prototype,this,"_set").call(this,i,n),this.localCache[i]=JSON.stringify(n)})}_get(i){return f(this,null,function*(){let n=yield on(t.prototype,this,"_get").call(this,i);return this.localCache[i]=JSON.stringify(n),n})}_remove(i){return f(this,null,function*(){yield on(t.prototype,this,"_remove").call(this,i),delete this.localCache[i]})}}return t.type="LOCAL",t})(),Pp=c1;var l1=(()=>{class t extends mo{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(i,n){}_removeListener(i,n){}}return t.type="SESSION",t})(),Vl=l1;function u1(t){return Promise.all(t.map(e=>f(this,null,function*(){try{return{fulfilled:!0,value:yield e}}catch(i){return{fulfilled:!1,reason:i}}})))}var d1=(()=>{class t{constructor(i){this.eventTarget=i,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(i){let n=this.receivers.find(s=>s.isListeningto(i));if(n)return n;let r=new t(i);return this.receivers.push(r),r}isListeningto(i){return this.eventTarget===i}handleEvent(i){return f(this,null,function*(){let n=i,{eventId:r,eventType:s,data:o}=n.data,a=this.handlersMap[s];if(!a?.size)return;n.ports[0].postMessage({status:"ack",eventId:r,eventType:s});let c=Array.from(a).map(u=>f(this,null,function*(){return u(n.origin,o)})),l=yield u1(c);n.ports[0].postMessage({status:"done",eventId:r,eventType:s,response:l})})}_subscribe(i,n){Object.keys(this.handlersMap).length===0&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[i]||(this.handlersMap[i]=new Set),this.handlersMap[i].add(n)}_unsubscribe(i,n){this.handlersMap[i]&&n&&this.handlersMap[i].delete(n),(!n||this.handlersMap[i].size===0)&&delete this.handlersMap[i],Object.keys(this.handlersMap).length===0&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}t.receivers=[];return t})();function Ul(t="",e=10){let i="";for(let n=0;n<e;n++)i+=Math.floor(Math.random()*10);return t+i}var wl=class{constructor(e){this.target=e,this.handlers=new Set}removeMessageHandler(e){e.messageChannel&&(e.messageChannel.port1.removeEventListener("message",e.onMessage),e.messageChannel.port1.close()),this.handlers.delete(e)}_send(e,i,n=50){return f(this,null,function*(){let r=typeof MessageChannel<"u"?new MessageChannel:null;if(!r)throw new Error("connection_unavailable");let s,o;return new Promise((a,c)=>{let l=Ul("",20);r.port1.start();let u=setTimeout(()=>{c(new Error("unsupported_event"))},n);o={messageChannel:r,onMessage(h){let d=h;if(d.data.eventId===l)switch(d.data.status){case"ack":clearTimeout(u),s=setTimeout(()=>{c(new Error("timeout"))},3e3);break;case"done":clearTimeout(s),a(d.data.response);break;default:clearTimeout(u),clearTimeout(s),c(new Error("invalid_response"));break}}},this.handlers.add(o),r.port1.addEventListener("message",o.onMessage),this.target.postMessage({eventType:e,eventId:l,data:i},[r.port2])}).finally(()=>{o&&this.removeMessageHandler(o)})})}};function ut(){return window}function h1(t){ut().location.href=t}function Mp(){return typeof ut().WorkerGlobalScope<"u"&&typeof ut().importScripts=="function"}function f1(){return f(this,null,function*(){if(!navigator?.serviceWorker)return null;try{return(yield navigator.serviceWorker.ready).active}catch{return null}})}function p1(){var t;return((t=navigator?.serviceWorker)===null||t===void 0?void 0:t.controller)||null}function g1(){return Mp()?self:null}var Np="firebaseLocalStorageDb",m1=1,_o="firebaseLocalStorage",kp="fbase_key",On=class{constructor(e){this.request=e}toPromise(){return new Promise((e,i)=>{this.request.addEventListener("success",()=>{e(this.request.result)}),this.request.addEventListener("error",()=>{i(this.request.error)})})}};function Do(t,e){return t.transaction([_o],e?"readwrite":"readonly").objectStore(_o)}function _1(){let t=indexedDB.deleteDatabase(Np);return new On(t).toPromise()}function Dl(){let t=indexedDB.open(Np,m1);return new Promise((e,i)=>{t.addEventListener("error",()=>{i(t.error)}),t.addEventListener("upgradeneeded",()=>{let n=t.result;try{n.createObjectStore(_o,{keyPath:kp})}catch(r){i(r)}}),t.addEventListener("success",()=>f(this,null,function*(){let n=t.result;n.objectStoreNames.contains(_o)?e(n):(n.close(),yield _1(),e(yield Dl()))}))})}function sp(t,e,i){return f(this,null,function*(){let n=Do(t,!0).put({[kp]:e,value:i});return new On(n).toPromise()})}function v1(t,e){return f(this,null,function*(){let i=Do(t,!1).get(e),n=yield new On(i).toPromise();return n===void 0?null:n.value})}function op(t,e){let i=Do(t,!0).delete(e);return new On(i).toPromise()}var y1=800,b1=3,w1=(()=>{class t{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 f(this,null,function*(){return this.db?this.db:(this.db=yield Dl(),this.db)})}_withRetries(i){return f(this,null,function*(){let n=0;for(;;)try{let r=yield this._openDb();return yield i(r)}catch(r){if(n++>b1)throw r;this.db&&(this.db.close(),this.db=void 0)}})}initializeServiceWorkerMessaging(){return f(this,null,function*(){return Mp()?this.initializeReceiver():this.initializeSender()})}initializeReceiver(){return f(this,null,function*(){this.receiver=d1._getInstance(g1()),this.receiver._subscribe("keyChanged",(i,n)=>f(this,null,function*(){return{keyProcessed:(yield this._poll()).includes(n.key)}})),this.receiver._subscribe("ping",(i,n)=>f(this,null,function*(){return["keyChanged"]}))})}initializeSender(){return f(this,null,function*(){var i,n;if(this.activeServiceWorker=yield f1(),!this.activeServiceWorker)return;this.sender=new wl(this.activeServiceWorker);let r=yield this.sender._send("ping",{},800);r&&!((i=r[0])===null||i===void 0)&&i.fulfilled&&!((n=r[0])===null||n===void 0)&&n.value.includes("keyChanged")&&(this.serviceWorkerReceiverAvailable=!0)})}notifyServiceWorker(i){return f(this,null,function*(){if(!(!this.sender||!this.activeServiceWorker||p1()!==this.activeServiceWorker))try{yield this.sender._send("keyChanged",{key:i},this.serviceWorkerReceiverAvailable?800:50)}catch{}})}_isAvailable(){return f(this,null,function*(){try{if(!indexedDB)return!1;let i=yield Dl();return yield sp(i,go,"1"),yield op(i,go),!0}catch{}return!1})}_withPendingWrite(i){return f(this,null,function*(){this.pendingWrites++;try{yield i()}finally{this.pendingWrites--}})}_set(i,n){return f(this,null,function*(){return this._withPendingWrite(()=>f(this,null,function*(){return yield this._withRetries(r=>sp(r,i,n)),this.localCache[i]=n,this.notifyServiceWorker(i)}))})}_get(i){return f(this,null,function*(){let n=yield this._withRetries(r=>v1(r,i));return this.localCache[i]=n,n})}_remove(i){return f(this,null,function*(){return this._withPendingWrite(()=>f(this,null,function*(){return yield this._withRetries(n=>op(n,i)),delete this.localCache[i],this.notifyServiceWorker(i)}))})}_poll(){return f(this,null,function*(){let i=yield this._withRetries(s=>{let o=Do(s,!1).getAll();return new On(o).toPromise()});if(!i)return[];if(this.pendingWrites!==0)return[];let n=[],r=new Set;if(i.length!==0)for(let{fbase_key:s,value:o}of i)r.add(s),JSON.stringify(this.localCache[s])!==JSON.stringify(o)&&(this.notifyListeners(s,o),n.push(s));for(let s of Object.keys(this.localCache))this.localCache[s]&&!r.has(s)&&(this.notifyListeners(s,null),n.push(s));return n})}notifyListeners(i,n){this.localCache[i]=n;let r=this.listeners[i];if(r)for(let s of Array.from(r))s(n)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>f(this,null,function*(){return this._poll()}),y1)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(i,n){Object.keys(this.listeners).length===0&&this.startPolling(),this.listeners[i]||(this.listeners[i]=new Set,this._get(i)),this.listeners[i].add(n)}_removeListener(i,n){this.listeners[i]&&(this.listeners[i].delete(n),this.listeners[i].size===0&&delete this.listeners[i]),Object.keys(this.listeners).length===0&&this.stopPolling()}}return t.type="LOCAL",t})(),xp=w1;var _R=Ap("rcb"),vR=new An(3e4,6e4);function Fp(t,e){return e?Ot(e):(C(t._popupRedirectResolver,t,"argument-error"),t._popupRedirectResolver)}var Ir=class extends Er{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return pi(e,this._buildIdpRequest())}_linkToIdToken(e,i){return pi(e,this._buildIdpRequest(i))}_getReauthenticationResolver(e){return pi(e,this._buildIdpRequest())}_buildIdpRequest(e){let i={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 e&&(i.idToken=e),i}};function D1(t){return r1(t.auth,new Ir(t),t.bypassAuthState)}function E1(t){let{auth:e,user:i}=t;return C(i,e,"internal-error"),i1(i,new Ir(t),t.bypassAuthState)}function T1(t){return f(this,null,function*(){let{auth:e,user:i}=t;return C(i,e,"internal-error"),n1(i,new Ir(t),t.bypassAuthState)})}var vo=class{constructor(e,i,n,r,s=!1){this.auth=e,this.resolver=n,this.user=r,this.bypassAuthState=s,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(i)?i:[i]}execute(){return new Promise((e,i)=>f(this,null,function*(){this.pendingPromise={resolve:e,reject:i};try{this.eventManager=yield this.resolver._initialize(this.auth),yield this.onExecution(),this.eventManager.registerConsumer(this)}catch(n){this.reject(n)}}))}onAuthEvent(e){return f(this,null,function*(){let{urlResponse:i,sessionId:n,postBody:r,tenantId:s,error:o,type:a}=e;if(o){this.reject(o);return}let c={auth:this.auth,requestUri:i,sessionId:n,tenantId:s||void 0,postBody:r||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(yield this.getIdpTask(a)(c))}catch(l){this.reject(l)}})}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return D1;case"linkViaPopup":case"linkViaRedirect":return T1;case"reauthViaPopup":case"reauthViaRedirect":return E1;default:dt(this.auth,"internal-error")}}resolve(e){Rt(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){Rt(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}};var C1=new An(2e3,1e4);function jl(t,e,i){return f(this,null,function*(){if(lt(t.app))return Promise.reject(Ze(t,"operation-not-supported-in-this-environment"));let n=wo(t);Pb(t,e,Tr);let r=Fp(n,i);return new I1(n,"signInViaPopup",e,r).executeNotNull()})}var I1=(()=>{class t extends vo{constructor(i,n,r,s,o){super(i,n,s,o),this.provider=r,this.authWindow=null,this.pollId=null,t.currentPopupAction&&t.currentPopupAction.cancel(),t.currentPopupAction=this}executeNotNull(){return f(this,null,function*(){let i=yield this.execute();return C(i,this.auth,"internal-error"),i})}onExecution(){return f(this,null,function*(){Rt(this.filter.length===1,"Popup operations only handle one event");let i=Ul();this.authWindow=yield this.resolver._openPopup(this.auth,this.provider,this.filter[0],i),this.authWindow.associatedEvent=i,this.resolver._originValidation(this.auth).catch(n=>{this.reject(n)}),this.resolver._isIframeWebStorageSupported(this.auth,n=>{n||this.reject(Ze(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()})}get eventId(){var i;return((i=this.authWindow)===null||i===void 0?void 0:i.associatedEvent)||null}cancel(){this.reject(Ze(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,t.currentPopupAction=null}pollUserCancellation(){let i=()=>{var n,r;if(!((r=(n=this.authWindow)===null||n===void 0?void 0:n.window)===null||r===void 0)&&r.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(Ze(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(i,C1.get())};i()}}t.currentPopupAction=null;return t})(),S1="pendingRedirect",so=new Map,El=class t extends vo{constructor(e,i,n=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],i,void 0,n),this.eventId=null}execute(){return f(this,null,function*(){let e=so.get(this.auth._key());if(!e){try{let n=(yield A1(this.resolver,this.auth))?yield on(t.prototype,this,"execute").call(this):null;e=()=>Promise.resolve(n)}catch(i){e=()=>Promise.reject(i)}so.set(this.auth._key(),e)}return this.bypassAuthState||so.set(this.auth._key(),()=>Promise.resolve(null)),e()})}onAuthEvent(e){return f(this,null,function*(){if(e.type==="signInViaRedirect")return on(t.prototype,this,"onAuthEvent").call(this,e);if(e.type==="unknown"){this.resolve(null);return}if(e.eventId){let i=yield this.auth._redirectUserForId(e.eventId);if(i)return this.user=i,on(t.prototype,this,"onAuthEvent").call(this,e);this.resolve(null)}})}onExecution(){return f(this,null,function*(){})}cleanUp(){}};function A1(t,e){return f(this,null,function*(){let i=P1(e),n=R1(t);if(!(yield n._isAvailable()))return!1;let r=(yield n._get(i))==="true";return yield n._remove(i),r})}function O1(t,e){so.set(t._key(),e)}function R1(t){return Ot(t._redirectPersistence)}function P1(t){return ro(S1,t.config.apiKey,t.name)}function M1(t,e,i=!1){return f(this,null,function*(){if(lt(t.app))return Promise.reject(Sn(t));let n=wo(t),r=Fp(n,e),o=yield new El(n,r,i).execute();return o&&!i&&(delete o.user._redirectEventId,yield n._persistUserIfCurrent(o.user),yield n._setRedirectUser(null,e)),o})}var N1=10*60*1e3,Tl=class{constructor(e){this.auth=e,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(e){this.consumers.add(e),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,e)&&(this.sendToConsumer(this.queuedRedirectEvent,e),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(e){this.consumers.delete(e)}onEvent(e){if(this.hasEventBeenHandled(e))return!1;let i=!1;return this.consumers.forEach(n=>{this.isEventForConsumer(e,n)&&(i=!0,this.sendToConsumer(e,n),this.saveEventToCache(e))}),this.hasHandledPotentialRedirect||!k1(e)||(this.hasHandledPotentialRedirect=!0,i||(this.queuedRedirectEvent=e,i=!0)),i}sendToConsumer(e,i){var n;if(e.error&&!Lp(e)){let r=((n=e.error.code)===null||n===void 0?void 0:n.split("auth/")[1])||"internal-error";i.onError(Ze(this.auth,r))}else i.onAuthEvent(e)}isEventForConsumer(e,i){let n=i.eventId===null||!!e.eventId&&e.eventId===i.eventId;return i.filter.includes(e.type)&&n}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=N1&&this.cachedEventUids.clear(),this.cachedEventUids.has(ap(e))}saveEventToCache(e){this.cachedEventUids.add(ap(e)),this.lastProcessedEventTime=Date.now()}};function ap(t){return[t.type,t.eventId,t.sessionId,t.tenantId].filter(e=>e).join("-")}function Lp({type:t,error:e}){return t==="unknown"&&e?.code==="auth/no-auth-event"}function k1(t){switch(t.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return Lp(t);default:return!1}}function x1(i){return f(this,arguments,function*(t,e={}){return mi(t,"GET","/v1/projects",e)})}var F1=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,L1=/^https?/;function B1(t){return f(this,null,function*(){if(t.config.emulator)return;let{authorizedDomains:e}=yield x1(t);for(let i of e)try{if(V1(i))return}catch{}dt(t,"unauthorized-domain")})}function V1(t){let e=fl(),{protocol:i,hostname:n}=new URL(e);if(t.startsWith("chrome-extension://")){let o=new URL(t);return o.hostname===""&&n===""?i==="chrome-extension:"&&t.replace("chrome-extension://","")===e.replace("chrome-extension://",""):i==="chrome-extension:"&&o.hostname===n}if(!L1.test(i))return!1;if(F1.test(t))return n===t;let r=t.replace(/\./g,"\\.");return new RegExp("^(.+\\."+r+"|"+r+")$","i").test(n)}var U1=new An(3e4,6e4);function cp(){let t=ut().___jsl;if(t?.H){for(let e of Object.keys(t.H))if(t.H[e].r=t.H[e].r||[],t.H[e].L=t.H[e].L||[],t.H[e].r=[...t.H[e].L],t.CP)for(let i=0;i<t.CP.length;i++)t.CP[i]=null}}function j1(t){return new Promise((e,i)=>{var n,r,s;function o(){cp(),gapi.load("gapi.iframes",{callback:()=>{e(gapi.iframes.getContext())},ontimeout:()=>{cp(),i(Ze(t,"network-request-failed"))},timeout:U1.get()})}if(!((r=(n=ut().gapi)===null||n===void 0?void 0:n.iframes)===null||r===void 0)&&r.Iframe)e(gapi.iframes.getContext());else if(!((s=ut().gapi)===null||s===void 0)&&s.load)o();else{let a=Ap("iframefcb");return ut()[a]=()=>{gapi.load?o():i(Ze(t,"network-request-failed"))},Yb(`${Qb()}?onload=${a}`).catch(c=>i(c))}}).catch(e=>{throw oo=null,e})}var oo=null;function $1(t){return oo=oo||j1(t),oo}var H1=new An(5e3,15e3),G1="__/auth/iframe",z1="emulator/auth/iframe",W1={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},q1=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function J1(t){let e=t.config;C(e.authDomain,t,"auth-domain-config-required");let i=e.emulator?Ol(e,z1):`https://${t.config.authDomain}/${G1}`,n={apiKey:e.apiKey,appName:t.name,v:di},r=q1.get(t.config.apiHost);r&&(n.eid=r);let s=t._getFrameworks();return s.length&&(n.fw=s.join(",")),`${i}?${ci(n).slice(1)}`}function K1(t){return f(this,null,function*(){let e=yield $1(t),i=ut().gapi;return C(i,t,"internal-error"),e.open({where:document.body,url:J1(t),messageHandlersFilter:i.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:W1,dontclear:!0},n=>new Promise((r,s)=>f(this,null,function*(){yield n.restyle({setHideOnLeave:!1});let o=Ze(t,"network-request-failed"),a=ut().setTimeout(()=>{s(o)},H1.get());function c(){ut().clearTimeout(a),r(n)}n.ping(c).then(c,()=>{s(o)})})))})}var Y1={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},Q1=500,Z1=600,X1="_blank",ew="http://localhost",yo=class{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}};function tw(t,e,i,n=Q1,r=Z1){let s=Math.max((window.screen.availHeight-r)/2,0).toString(),o=Math.max((window.screen.availWidth-n)/2,0).toString(),a="",c=Object.assign(Object.assign({},Y1),{width:n.toString(),height:r.toString(),top:s,left:o}),l=de().toLowerCase();i&&(a=wp(l)?X1:i),bp(l)&&(e=e||ew,c.scrollbars="yes");let u=Object.entries(c).reduce((d,[g,v])=>`${d}${g}=${v},`,"");if(Gb(l)&&a!=="_self")return nw(e||"",a),new yo(null);let h=window.open(e||"",a,u);C(h,t,"popup-blocked");try{h.focus()}catch{}return new yo(h)}function nw(t,e){let i=document.createElement("a");i.href=t,i.target=e;let n=document.createEvent("MouseEvent");n.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),i.dispatchEvent(n)}var iw="__/auth/handler",rw="emulator/auth/handler",sw=encodeURIComponent("fac");function lp(t,e,i,n,r,s){return f(this,null,function*(){C(t.config.authDomain,t,"auth-domain-config-required"),C(t.config.apiKey,t,"invalid-api-key");let o={apiKey:t.config.apiKey,appName:t.name,authType:i,redirectUrl:n,v:di,eventId:r};if(e instanceof Tr){e.setDefaultLanguage(t.languageCode),o.providerId=e.providerId||"",Ff(e.getCustomParameters())||(o.customParameters=JSON.stringify(e.getCustomParameters()));for(let[u,h]of Object.entries(s||{}))o[u]=h}if(e instanceof po){let u=e.getScopes().filter(h=>h!=="");u.length>0&&(o.scopes=u.join(","))}t.tenantId&&(o.tid=t.tenantId);let a=o;for(let u of Object.keys(a))a[u]===void 0&&delete a[u];let c=yield t._getAppCheckToken(),l=c?`#${sw}=${encodeURIComponent(c)}`:"";return`${ow(t)}?${ci(a).slice(1)}${l}`})}function ow({config:t}){return t.emulator?Ol(t,rw):`https://${t.authDomain}/${iw}`}var hl="webStorageSupport",Cl=class{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=Vl,this._completeRedirectFn=M1,this._overrideRedirectResult=O1}_openPopup(e,i,n,r){return f(this,null,function*(){var s;Rt((s=this.eventManagers[e._key()])===null||s===void 0?void 0:s.manager,"_initialize() not called before _openPopup()");let o=yield lp(e,i,n,fl(),r);return tw(e,o,Ul())})}_openRedirect(e,i,n,r){return f(this,null,function*(){yield this._originValidation(e);let s=yield lp(e,i,n,fl(),r);return h1(s),new Promise(()=>{})})}_initialize(e){let i=e._key();if(this.eventManagers[i]){let{manager:r,promise:s}=this.eventManagers[i];return r?Promise.resolve(r):(Rt(s,"If manager is not set, promise should be"),s)}let n=this.initAndGetManager(e);return this.eventManagers[i]={promise:n},n.catch(()=>{delete this.eventManagers[i]}),n}initAndGetManager(e){return f(this,null,function*(){let i=yield K1(e),n=new Tl(e);return i.register("authEvent",r=>(C(r?.authEvent,e,"invalid-auth-event"),{status:n.onEvent(r.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:n},this.iframes[e._key()]=i,n})}_isIframeWebStorageSupported(e,i){this.iframes[e._key()].send(hl,{type:hl},r=>{var s;let o=(s=r?.[0])===null||s===void 0?void 0:s[hl];o!==void 0&&i(!!o),dt(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){let i=e._key();return this.originValidationPromises[i]||(this.originValidationPromises[i]=B1(e)),this.originValidationPromises[i]}get _shouldInitProactively(){return Ip()||kl()||bo()}},Bp=Cl;var up="@firebase/auth",dp="1.7.5";var Il=class{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var e;return this.assertAuthConfigured(),((e=this.auth.currentUser)===null||e===void 0?void 0:e.uid)||null}getToken(e){return f(this,null,function*(){return this.assertAuthConfigured(),yield this.auth._initializationPromise,this.auth.currentUser?{accessToken:yield this.auth.currentUser.getIdToken(e)}:null})}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;let i=this.auth.onIdTokenChanged(n=>{e(n?.stsTokenManager.accessToken||null)});this.internalListeners.set(e,i),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();let i=this.internalListeners.get(e);i&&(this.internalListeners.delete(e),i(),this.updateProactiveRefresh())}assertAuthConfigured(){C(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}};function aw(t){switch(t){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}function cw(t){ui(new at("auth",(e,{options:i})=>{let n=e.getProvider("app").getImmediate(),r=e.getProvider("heartbeat"),s=e.getProvider("app-check-internal"),{apiKey:o,authDomain:a}=n.options;C(o&&!o.includes(":"),"invalid-api-key",{appName:n.name});let c={apiKey:o,authDomain:a,clientPlatform:t,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:Sp(t)},l=new yl(n,r,s,c);return Zb(l,i),l},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,i,n)=>{e.getProvider("auth-internal").initialize()})),ui(new at("auth-internal",e=>{let i=wo(e.getProvider("auth").getImmediate());return(n=>new Il(n))(i)},"PRIVATE").setInstantiationMode("EXPLICIT")),Ie(up,dp,aw(t)),Ie(up,dp,"esm2017")}var lw=5*60,uw=zc("authIdTokenMaxAge")||lw,hp=null,dw=t=>e=>f(void 0,null,function*(){let i=e&&(yield e.getIdTokenResult()),n=i&&(new Date().getTime()-Date.parse(i.issuedAtTime))/1e3;if(n&&n>uw)return;let r=i?.token;hp!==r&&(hp=r,yield fetch(t,{method:r?"POST":"DELETE",headers:r?{Authorization:`Bearer ${r}`}:{}}))});function $l(t=Ys()){let e=ol(t,"auth");if(e.isInitialized())return e.getImmediate();let i=Fl(t,{popupRedirectResolver:Bp,persistence:[xp,Pp,Vl]}),n=zc("authTokenSyncURL");if(n&&typeof isSecureContext=="boolean"&&isSecureContext){let s=new URL(n,location.origin);if(location.origin===s.origin){let o=dw(s.toString());Bl(i,o,()=>o(i.currentUser)),Ar(i,a=>o(a))}}let r=Of("auth");return r&&Ll(i,`http://${r}`),i}function hw(){var t,e;return(e=(t=document.getElementsByTagName("head"))===null||t===void 0?void 0:t[0])!==null&&e!==void 0?e:document}Kb({loadJS(t){return new Promise((e,i)=>{let n=document.createElement("script");n.setAttribute("src",t),n.onload=e,n.onerror=r=>{let s=Ze("internal-error");s.customData=r,i(s)},n.type="text/javascript",n.charset="UTF-8",hw().appendChild(n)})},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="});cw("Browser");function jp(t){return new Pe(function(e){var i=Ar(t,e.next.bind(e),e.error.bind(e),e.complete.bind(e));return{unsubscribe:i}})}var $p="auth",Rn=class{constructor(e){return e}},Hl=class{constructor(){return ll($p)}};var Gl=new O("angularfire2.auth-instances");function iD(t,e){let i=Zf($p,t,e);return i&&new Rn(i)}function rD(t){return(e,i)=>{let n=e.runOutsideAngular(()=>t(i));return new Rn(n)}}var sD={provide:Hl,deps:[[new et,Gl]]},oD={provide:Rn,useFactory:iD,deps:[[new et,Gl],In]};function cP(t,...e){return Ie("angularfire",_r.full,"auth"),He([oD,sD,{provide:Gl,useFactory:rD(t),multi:!0,deps:[H,ne,eo,vr,[new et,Zs],...e]}])}var Hp=fi(jp,!0);var lP=fi($l,!0);var Gp=fi(jl,!0);var Pn=class extends Error{};Pn.prototype.name="InvalidTokenError";function aD(t){return decodeURIComponent(atob(t).replace(/(.)/g,(e,i)=>{let n=i.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}function cD(t){let e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return aD(e)}catch{return atob(e)}}function zl(t,e){if(typeof t!="string")throw new Pn("Invalid token specified: must be a string");e||(e={});let i=e.header===!0?0:1,n=t.split(".")[i];if(typeof n!="string")throw new Pn(`Invalid token specified: missing part #${i+1}`);let r;try{r=cD(n)}catch(s){throw new Pn(`Invalid token specified: invalid base64 for part #${i+1} (${s.message})`)}try{return JSON.parse(r)}catch(s){throw new Pn(`Invalid token specified: invalid json for part #${i+1} (${s.message})`)}}var wP=(()=>{let e=class e{constructor(){this.httpService=p(Cf),this._roles=new me([]),this.route=p(Et),this.router=p(ot),this.auth=p(Rn),this.provider=new Sr,this.user$=Hp(this.auth),this.destroy=new F,this.automateLogon()}login(n){return this.httpService.post("api/Token/Login",n).pipe(B(r=>this.storeLoginResponse(r)),B(r=>this.decodeRoles(r)),B(()=>this.storeFormLogin(n)),_u(1))}storeLoginResponse(n){localStorage.setItem("Token",n.access_token),localStorage.setItem("ExpireDate",n.expiredAt),localStorage.setItem("TokenType",n.token_type)}storeFormLogin(n){localStorage.setItem("Domain",n.Host),localStorage.setItem("Username",n.Username)}decodeRoles(n){let r=zl(n.access_token);localStorage.setItem("Brand",r.Brand);let s=r["http://schemas.microsoft.com/ws/2008/06/identity/claims/role"];return this._roles.next(s),this.storeRoles(),s}storeRoles(){localStorage.setItem("Roles",JSON.stringify(this._roles.value))}isTokenExpired(){let n=localStorage.getItem("Token");try{let r=zl(n),s=Math.floor(Date.now()/1e3);return r.exp?r.exp<s:!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.route.queryParamMap.pipe(J(this.destroy),B(n=>f(this,null,function*(){n.has("from")&&(yield this.router.navigate([n.get("from")])),yield this.router.navigate(["/pages"])})))}automateLogon(){return f(this,null,function*(){return this.isAuthenticated()?yield this.router.navigate(["/pages"]):yield this.router.navigate([""])})}getDomain(){return localStorage.getItem("Domain")!==null?localStorage.getItem("Domain"):""}logout(){return f(this,null,function*(){let n=["ExpireDate","Token","TokenType","Roles"];for(let r of n)localStorage.removeItem(r);yield this.router.navigate([""])})}signInWithPopup(n){return Q(Gp(this.auth,new Sr)).pipe(ae(r=>{let s=Sr.credentialFromResult(r),o={Host:n,IDToken:s?.idToken};return this.httpService.post("api/token/LoginWithSocialProvider",o).pipe(I(a=>a),B(a=>this.storeLoginResponse(a)),B(a=>this.decodeRoles(a)),_e(a=>D(null)))}),_e(r=>D(null)))}ngOnDestroy(){this.destroy.next(),this.destroy.complete()}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();export{yt as a,Pi as b,ra as c,ug as d,TD as e,CD as f,ID as g,gd as h,KD as i,Dd as j,ha as k,Et as l,ym as m,ot as n,mE as o,_E as p,bE as q,Ts as r,n0 as s,kE as t,Ns as u,o0 as v,Oh as w,vh as x,eT as y,tT as z,Rs as A,cr as B,k0 as C,iT as D,F0 as E,B0 as F,rT as G,sT as H,oT as I,Ls as J,V0 as K,pf as L,KA as M,xv as N,YA as O,QA as P,oi as Q,bf as R,ZA as S,Ef as T,rO as U,ny as V,sO as W,Tf as X,Ws as Y,oO as Z,aO as _,cO as $,Cf as aa,oR as ba,aR as ca,cP as da,lP as ea,wP as fa};
|
|
4
|
+
`],encapsulation:2,changeDetection:0});let t=e;return t})(),lO=new O("live announcer delay",{providedIn:"root",factory:()=>100});var Cf=(()=>{let e=class e{constructor(){this.http=p(ra),this.toastr=p(Ts),this.requestTimeout=1e4}get(n,r={},s="/"){return this.http.get(`${s}${n}`,m({},r)).pipe(Nn(this.requestTimeout),_e(this.handleError.bind(this)))}post(n,r,s={},o="/"){return this.http.post(`${o}${n}`,r,m({},s)).pipe(Nn(this.requestTimeout),_e(this.handleError.bind(this)))}postFormData(n,r,s={},o="/"){return this.http.post(`${o}/${n}`,r,m({},s)).pipe(Nn(this.requestTimeout),_e(this.handleError.bind(this)))}put(n,r,s={},o="/"){return this.http.put(`${o}/${n}`,r,m({},s)).pipe(Nn(this.requestTimeout),_e(this.handleError.bind(this)))}delete(n,r={},s="/"){return this.http.delete(`${s}/${n}`,m({},r)).pipe(Nn(this.requestTimeout),_e(this.handleError.bind(this)))}handleError(n){let r={header:"API Error ",message:"An unknown error occurred."};return n instanceof cu&&n.name=="TimeoutError"&&(r.header="Request Timeout",r.message="The request took too long to complete. Please try again later."),n instanceof rt&&(Object.keys(n.error).length?(r.header="API Error - "+n.status,r.message=n.error.Message||n.error.message):(n.status===401&&(r.header="Unauthorized",r.message="We can't log you in because of authentication error"),r.header="API Error - "+n.status,r.message=n.error.message)),this.toastr.error(r.message,r.header),an(()=>r)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var Sf=function(t){let e=[],i=0;for(let n=0;n<t.length;n++){let r=t.charCodeAt(n);r<128?e[i++]=r:r<2048?(e[i++]=r>>6|192,e[i++]=r&63|128):(r&64512)===55296&&n+1<t.length&&(t.charCodeAt(n+1)&64512)===56320?(r=65536+((r&1023)<<10)+(t.charCodeAt(++n)&1023),e[i++]=r>>18|240,e[i++]=r>>12&63|128,e[i++]=r>>6&63|128,e[i++]=r&63|128):(e[i++]=r>>12|224,e[i++]=r>>6&63|128,e[i++]=r&63|128)}return e},uy=function(t){let e=[],i=0,n=0;for(;i<t.length;){let r=t[i++];if(r<128)e[n++]=String.fromCharCode(r);else if(r>191&&r<224){let s=t[i++];e[n++]=String.fromCharCode((r&31)<<6|s&63)}else if(r>239&&r<365){let s=t[i++],o=t[i++],a=t[i++],c=((r&7)<<18|(s&63)<<12|(o&63)<<6|a&63)-65536;e[n++]=String.fromCharCode(55296+(c>>10)),e[n++]=String.fromCharCode(56320+(c&1023))}else{let s=t[i++],o=t[i++];e[n++]=String.fromCharCode((r&15)<<12|(s&63)<<6|o&63)}}return e.join("")},Af={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(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();let i=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,n=[];for(let r=0;r<t.length;r+=3){let s=t[r],o=r+1<t.length,a=o?t[r+1]:0,c=r+2<t.length,l=c?t[r+2]:0,u=s>>2,h=(s&3)<<4|a>>4,d=(a&15)<<2|l>>6,g=l&63;c||(g=64,o||(d=64)),n.push(i[u],i[h],i[d],i[g])}return n.join("")},encodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(Sf(t),e)},decodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):uy(this.decodeStringToByteArray(t,e))},decodeStringToByteArray(t,e){this.init_();let i=e?this.charToByteMapWebSafe_:this.charToByteMap_,n=[];for(let r=0;r<t.length;){let s=i[t.charAt(r++)],a=r<t.length?i[t.charAt(r)]:0;++r;let l=r<t.length?i[t.charAt(r)]:64;++r;let h=r<t.length?i[t.charAt(r)]:64;if(++r,s==null||a==null||l==null||h==null)throw new Vc;let d=s<<2|a>>4;if(n.push(d),l!==64){let g=a<<4&240|l>>2;if(n.push(g),h!==64){let v=l<<6&192|h;n.push(v)}}}return n},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let t=0;t<this.ENCODED_VALS.length;t++)this.byteToCharMap_[t]=this.ENCODED_VALS.charAt(t),this.charToByteMap_[this.byteToCharMap_[t]]=t,this.byteToCharMapWebSafe_[t]=this.ENCODED_VALS_WEBSAFE.charAt(t),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[t]]=t,t>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}},Vc=class extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}},dy=function(t){let e=Sf(t);return Af.encodeByteArray(e,!0)},jc=function(t){return dy(t).replace(/\./g,"")},$c=function(t){try{return Af.decodeString(t,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};function hy(){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 fy=()=>hy().__FIREBASE_DEFAULTS__,py=()=>{if(typeof process>"u"||typeof process.env>"u")return;let t=process.env.__FIREBASE_DEFAULTS__;if(t)return JSON.parse(t)},gy=()=>{if(typeof document>"u")return;let t;try{t=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}let e=t&&$c(t[1]);return e&&JSON.parse(e)},Hc=()=>{try{return fy()||py()||gy()}catch(t){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${t}`);return}},Of=t=>{var e,i;return(i=(e=Hc())===null||e===void 0?void 0:e.emulatorHosts)===null||i===void 0?void 0:i[t]};var Gc=()=>{var t;return(t=Hc())===null||t===void 0?void 0:t.config},zc=t=>{var e;return(e=Hc())===null||e===void 0?void 0:e[`_${t}`]};var qs=class{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,i)=>{this.resolve=e,this.reject=i})}wrapCallback(e){return(i,n)=>{i?this.reject(i):this.resolve(n),typeof e=="function"&&(this.promise.catch(()=>{}),e.length===1?e(i):e(i,n))}}};function de(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function Rf(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(de())}function Pf(){let t=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof t=="object"&&t.id!==void 0}function Mf(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function Nf(){let t=de();return t.indexOf("MSIE ")>=0||t.indexOf("Trident/")>=0}function kf(){try{return typeof indexedDB=="object"}catch{return!1}}function xf(){return new Promise((t,e)=>{try{let i=!0,n="validate-browser-context-for-indexeddb-analytics-module",r=self.indexedDB.open(n);r.onsuccess=()=>{r.result.close(),i||self.indexedDB.deleteDatabase(n),t(!0)},r.onupgradeneeded=()=>{i=!1},r.onerror=()=>{var s;e(((s=r.error)===null||s===void 0?void 0:s.message)||"")}}catch(i){e(i)}})}var my="FirebaseError",Qe=class t extends Error{constructor(e,i,n){super(i),this.code=e,this.customData=n,this.name=my,Object.setPrototypeOf(this,t.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,St.prototype.create)}},St=class{constructor(e,i,n){this.service=e,this.serviceName=i,this.errors=n}create(e,...i){let n=i[0]||{},r=`${this.service}/${e}`,s=this.errors[e],o=s?_y(s,n):"Error",a=`${this.serviceName}: ${o} (${r}).`;return new Qe(r,a,n)}};function _y(t,e){return t.replace(vy,(i,n)=>{let r=e[n];return r!=null?String(r):`<${n}?>`})}var vy=/\{\$([^}]+)}/g;function Ff(t){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}function ai(t,e){if(t===e)return!0;let i=Object.keys(t),n=Object.keys(e);for(let r of i){if(!n.includes(r))return!1;let s=t[r],o=e[r];if(If(s)&&If(o)){if(!ai(s,o))return!1}else if(s!==o)return!1}for(let r of n)if(!i.includes(r))return!1;return!0}function If(t){return t!==null&&typeof t=="object"}function ci(t){let e=[];for(let[i,n]of Object.entries(t))Array.isArray(n)?n.forEach(r=>{e.push(encodeURIComponent(i)+"="+encodeURIComponent(r))}):e.push(encodeURIComponent(i)+"="+encodeURIComponent(n));return e.length?"&"+e.join("&"):""}function Lf(t,e){let i=new Uc(t,e);return i.subscribe.bind(i)}var Uc=class{constructor(e,i){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=i,this.task.then(()=>{e(this)}).catch(n=>{this.error(n)})}next(e){this.forEachObserver(i=>{i.next(e)})}error(e){this.forEachObserver(i=>{i.error(e)}),this.close(e)}complete(){this.forEachObserver(e=>{e.complete()}),this.close()}subscribe(e,i,n){let r;if(e===void 0&&i===void 0&&n===void 0)throw new Error("Missing Observer.");yy(e,["next","error","complete"])?r=e:r={next:e,error:i,complete:n},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(e){this.observers===void 0||this.observers[e]===void 0||(delete this.observers[e],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let i=0;i<this.observers.length;i++)this.sendOne(i,e)}sendOne(e,i){this.task.then(()=>{if(this.observers!==void 0&&this.observers[e]!==void 0)try{i(this.observers[e])}catch(n){typeof console<"u"&&console.error&&console.error(n)}})}close(e){this.finalized||(this.finalized=!0,e!==void 0&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}};function yy(t,e){if(typeof t!="object"||t===null)return!1;for(let i of e)if(i in t&&typeof t[i]=="function")return!0;return!1}function Bc(){}var bO=4*60*60*1e3;function Dn(t){return t&&t._delegate?t._delegate:t}var at=class{constructor(e,i,n){this.name=e,this.instanceFactory=i,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}};var En="[DEFAULT]";var Wc=class{constructor(e,i){this.name=e,this.container=i,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){let i=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(i)){let n=new qs;if(this.instancesDeferred.set(i,n),this.isInitialized(i)||this.shouldAutoInitialize())try{let r=this.getOrInitializeService({instanceIdentifier:i});r&&n.resolve(r)}catch{}}return this.instancesDeferred.get(i).promise}getImmediate(e){var i;let n=this.normalizeInstanceIdentifier(e?.identifier),r=(i=e?.optional)!==null&&i!==void 0?i:!1;if(this.isInitialized(n)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:n})}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(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,!!this.shouldAutoInitialize()){if(wy(e))try{this.getOrInitializeService({instanceIdentifier:En})}catch{}for(let[i,n]of this.instancesDeferred.entries()){let r=this.normalizeInstanceIdentifier(i);try{let s=this.getOrInitializeService({instanceIdentifier:r});n.resolve(s)}catch{}}}}clearInstance(e=En){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}delete(){return f(this,null,function*(){let e=Array.from(this.instances.values());yield Promise.all([...e.filter(i=>"INTERNAL"in i).map(i=>i.INTERNAL.delete()),...e.filter(i=>"_delete"in i).map(i=>i._delete())])})}isComponentSet(){return this.component!=null}isInitialized(e=En){return this.instances.has(e)}getOptions(e=En){return this.instancesOptions.get(e)||{}}initialize(e={}){let{options:i={}}=e,n=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(n))throw Error(`${this.name}(${n}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);let r=this.getOrInitializeService({instanceIdentifier:n,options:i});for(let[s,o]of this.instancesDeferred.entries()){let a=this.normalizeInstanceIdentifier(s);n===a&&o.resolve(r)}return r}onInit(e,i){var n;let r=this.normalizeInstanceIdentifier(i),s=(n=this.onInitCallbacks.get(r))!==null&&n!==void 0?n:new Set;s.add(e),this.onInitCallbacks.set(r,s);let o=this.instances.get(r);return o&&e(o,r),()=>{s.delete(e)}}invokeOnInitCallbacks(e,i){let n=this.onInitCallbacks.get(i);if(n)for(let r of n)try{r(e,i)}catch{}}getOrInitializeService({instanceIdentifier:e,options:i={}}){let n=this.instances.get(e);if(!n&&this.component&&(n=this.component.instanceFactory(this.container,{instanceIdentifier:by(e),options:i}),this.instances.set(e,n),this.instancesOptions.set(e,i),this.invokeOnInitCallbacks(n,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,n)}catch{}return n||null}normalizeInstanceIdentifier(e=En){return this.component?this.component.multipleInstances?e:En:e}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}};function by(t){return t===En?void 0:t}function wy(t){return t.instantiationMode==="EAGER"}var Js=class{constructor(e){this.name=e,this.providers=new Map}addComponent(e){let i=this.getProvider(e.name);if(i.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);i.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);let i=new Wc(e,this);return this.providers.set(e,i),i}getProviders(){return Array.from(this.providers.values())}};var Dy=[],j=function(t){return t[t.DEBUG=0]="DEBUG",t[t.VERBOSE=1]="VERBOSE",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.SILENT=5]="SILENT",t}(j||{}),Ey={debug:j.DEBUG,verbose:j.VERBOSE,info:j.INFO,warn:j.WARN,error:j.ERROR,silent:j.SILENT},Ty=j.INFO,Cy={[j.DEBUG]:"log",[j.VERBOSE]:"log",[j.INFO]:"info",[j.WARN]:"warn",[j.ERROR]:"error"},Iy=(t,e,...i)=>{if(e<t.logLevel)return;let n=new Date().toISOString(),r=Cy[e];if(r)console[r](`[${n}] ${t.name}:`,...i);else throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`)},li=class{constructor(e){this.name=e,this._logLevel=Ty,this._logHandler=Iy,this._userLogHandler=null,Dy.push(this)}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in j))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel=typeof e=="string"?Ey[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if(typeof e!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,j.DEBUG,...e),this._logHandler(this,j.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,j.VERBOSE,...e),this._logHandler(this,j.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,j.INFO,...e),this._logHandler(this,j.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,j.WARN,...e),this._logHandler(this,j.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,j.ERROR,...e),this._logHandler(this,j.ERROR,...e)}};var Sy=(t,e)=>e.some(i=>t instanceof i),Bf,Vf;function Ay(){return Bf||(Bf=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Oy(){return Vf||(Vf=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}var Uf=new WeakMap,Jc=new WeakMap,jf=new WeakMap,qc=new WeakMap,Yc=new WeakMap;function Ry(t){let e=new Promise((i,n)=>{let r=()=>{t.removeEventListener("success",s),t.removeEventListener("error",o)},s=()=>{i(ct(t.result)),r()},o=()=>{n(t.error),r()};t.addEventListener("success",s),t.addEventListener("error",o)});return e.then(i=>{i instanceof IDBCursor&&Uf.set(i,t)}).catch(()=>{}),Yc.set(e,t),e}function Py(t){if(Jc.has(t))return;let e=new Promise((i,n)=>{let r=()=>{t.removeEventListener("complete",s),t.removeEventListener("error",o),t.removeEventListener("abort",o)},s=()=>{i(),r()},o=()=>{n(t.error||new DOMException("AbortError","AbortError")),r()};t.addEventListener("complete",s),t.addEventListener("error",o),t.addEventListener("abort",o)});Jc.set(t,e)}var Kc={get(t,e,i){if(t instanceof IDBTransaction){if(e==="done")return Jc.get(t);if(e==="objectStoreNames")return t.objectStoreNames||jf.get(t);if(e==="store")return i.objectStoreNames[1]?void 0:i.objectStore(i.objectStoreNames[0])}return ct(t[e])},set(t,e,i){return t[e]=i,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function $f(t){Kc=t(Kc)}function My(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...i){let n=t.call(Ks(this),e,...i);return jf.set(n,e.sort?e.sort():[e]),ct(n)}:Oy().includes(t)?function(...e){return t.apply(Ks(this),e),ct(Uf.get(this))}:function(...e){return ct(t.apply(Ks(this),e))}}function Ny(t){return typeof t=="function"?My(t):(t instanceof IDBTransaction&&Py(t),Sy(t,Ay())?new Proxy(t,Kc):t)}function ct(t){if(t instanceof IDBRequest)return Ry(t);if(qc.has(t))return qc.get(t);let e=Ny(t);return e!==t&&(qc.set(t,e),Yc.set(e,t)),e}var Ks=t=>Yc.get(t);function Gf(t,e,{blocked:i,upgrade:n,blocking:r,terminated:s}={}){let o=indexedDB.open(t,e),a=ct(o);return n&&o.addEventListener("upgradeneeded",c=>{n(ct(o.result),c.oldVersion,c.newVersion,ct(o.transaction),c)}),i&&o.addEventListener("blocked",c=>i(c.oldVersion,c.newVersion,c)),a.then(c=>{s&&c.addEventListener("close",()=>s()),r&&c.addEventListener("versionchange",l=>r(l.oldVersion,l.newVersion,l))}).catch(()=>{}),a}var ky=["get","getKey","getAll","getAllKeys","count"],xy=["put","add","delete","clear"],Qc=new Map;function Hf(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(Qc.get(e))return Qc.get(e);let i=e.replace(/FromIndex$/,""),n=e!==i,r=xy.includes(i);if(!(i in(n?IDBIndex:IDBObjectStore).prototype)||!(r||ky.includes(i)))return;let s=function(o,...a){return f(this,null,function*(){let c=this.transaction(o,r?"readwrite":"readonly"),l=c.store;return n&&(l=l.index(a.shift())),(yield Promise.all([l[i](...a),r&&c.done]))[0]})};return Qc.set(e,s),s}$f(t=>N(m({},t),{get:(e,i,n)=>Hf(e,i)||t.get(e,i,n),has:(e,i)=>!!Hf(e,i)||t.has(e,i)}));var Xc=class{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(i=>{if(Fy(i)){let n=i.getImmediate();return`${n.library}/${n.version}`}else return null}).filter(i=>i).join(" ")}};function Fy(t){let e=t.getComponent();return e?.type==="VERSION"}var el="@firebase/app",zf="0.10.7";var Tn=new li("@firebase/app"),Ly="@firebase/app-compat",By="@firebase/analytics-compat",Vy="@firebase/analytics",Uy="@firebase/app-check-compat",jy="@firebase/app-check",$y="@firebase/auth",Hy="@firebase/auth-compat",Gy="@firebase/database",zy="@firebase/database-compat",Wy="@firebase/functions",qy="@firebase/functions-compat",Jy="@firebase/installations",Ky="@firebase/installations-compat",Yy="@firebase/messaging",Qy="@firebase/messaging-compat",Zy="@firebase/performance",Xy="@firebase/performance-compat",eb="@firebase/remote-config",tb="@firebase/remote-config-compat",nb="@firebase/storage",ib="@firebase/storage-compat",rb="@firebase/firestore",sb="@firebase/vertexai-preview",ob="@firebase/firestore-compat",ab="firebase",cb="10.12.4";var tl="[DEFAULT]",lb={[el]:"fire-core",[Ly]:"fire-core-compat",[Vy]:"fire-analytics",[By]:"fire-analytics-compat",[jy]:"fire-app-check",[Uy]:"fire-app-check-compat",[$y]:"fire-auth",[Hy]:"fire-auth-compat",[Gy]:"fire-rtdb",[zy]:"fire-rtdb-compat",[Wy]:"fire-fn",[qy]:"fire-fn-compat",[Jy]:"fire-iid",[Ky]:"fire-iid-compat",[Yy]:"fire-fcm",[Qy]:"fire-fcm-compat",[Zy]:"fire-perf",[Xy]:"fire-perf-compat",[eb]:"fire-rc",[tb]:"fire-rc-compat",[nb]:"fire-gcs",[ib]:"fire-gcs-compat",[rb]:"fire-fst",[ob]:"fire-fst-compat",[sb]:"fire-vertex","fire-js":"fire-js",[ab]:"fire-js-all"};var gr=new Map,ub=new Map,nl=new Map;function Wf(t,e){try{t.container.addComponent(e)}catch(i){Tn.debug(`Component ${e.name} failed to register with FirebaseApp ${t.name}`,i)}}function ui(t){let e=t.name;if(nl.has(e))return Tn.debug(`There were multiple attempts to register component ${e}.`),!1;nl.set(e,t);for(let i of gr.values())Wf(i,t);for(let i of ub.values())Wf(i,t);return!0}function ol(t,e){let i=t.container.getProvider("heartbeat").getImmediate({optional:!0});return i&&i.triggerHeartbeat(),t.container.getProvider(e)}function lt(t){return t.settings!==void 0}var db={"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."},Zt=new St("app","Firebase",db);var il=class{constructor(e,i,n){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},i),this._name=i.name,this._automaticDataCollectionEnabled=i.automaticDataCollectionEnabled,this._container=n,this.container.addComponent(new at("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}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(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw Zt.create("app-deleted",{appName:this._name})}};var di=cb;function al(t,e={}){let i=t;typeof e!="object"&&(e={name:e});let n=Object.assign({name:tl,automaticDataCollectionEnabled:!1},e),r=n.name;if(typeof r!="string"||!r)throw Zt.create("bad-app-name",{appName:String(r)});if(i||(i=Gc()),!i)throw Zt.create("no-options");let s=gr.get(r);if(s){if(ai(i,s.options)&&ai(n,s.config))return s;throw Zt.create("duplicate-app",{appName:r})}let o=new Js(r);for(let c of nl.values())o.addComponent(c);let a=new il(i,n,o);return gr.set(r,a),a}function Ys(t=tl){let e=gr.get(t);if(!e&&t===tl&&Gc())return al();if(!e)throw Zt.create("no-app",{appName:t});return e}function Qs(){return Array.from(gr.values())}function Ie(t,e,i){var n;let r=(n=lb[t])!==null&&n!==void 0?n:t;i&&(r+=`-${i}`);let s=r.match(/\s|\//),o=e.match(/\s|\//);if(s||o){let a=[`Unable to register library "${r}" with version "${e}":`];s&&a.push(`library name "${r}" contains illegal characters (whitespace or "/")`),s&&o&&a.push("and"),o&&a.push(`version name "${e}" contains illegal characters (whitespace or "/")`),Tn.warn(a.join(" "));return}ui(new at(`${r}-version`,()=>({library:r,version:e}),"VERSION"))}var hb="firebase-heartbeat-database",fb=1,mr="firebase-heartbeat-store",Zc=null;function Yf(){return Zc||(Zc=Gf(hb,fb,{upgrade:(t,e)=>{switch(e){case 0:try{t.createObjectStore(mr)}catch(i){console.warn(i)}}}}).catch(t=>{throw Zt.create("idb-open",{originalErrorMessage:t.message})})),Zc}function pb(t){return f(this,null,function*(){try{let i=(yield Yf()).transaction(mr),n=yield i.objectStore(mr).get(Qf(t));return yield i.done,n}catch(e){if(e instanceof Qe)Tn.warn(e.message);else{let i=Zt.create("idb-get",{originalErrorMessage:e?.message});Tn.warn(i.message)}}})}function qf(t,e){return f(this,null,function*(){try{let n=(yield Yf()).transaction(mr,"readwrite");yield n.objectStore(mr).put(e,Qf(t)),yield n.done}catch(i){if(i instanceof Qe)Tn.warn(i.message);else{let n=Zt.create("idb-set",{originalErrorMessage:i?.message});Tn.warn(n.message)}}})}function Qf(t){return`${t.name}!${t.options.appId}`}var gb=1024,mb=30*24*60*60*1e3,rl=class{constructor(e){this.container=e,this._heartbeatsCache=null;let i=this.container.getProvider("app").getImmediate();this._storage=new sl(i),this._heartbeatsCachePromise=this._storage.read().then(n=>(this._heartbeatsCache=n,n))}triggerHeartbeat(){return f(this,null,function*(){var e,i;let r=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),s=Jf();if(!(((e=this._heartbeatsCache)===null||e===void 0?void 0:e.heartbeats)==null&&(this._heartbeatsCache=yield this._heartbeatsCachePromise,((i=this._heartbeatsCache)===null||i===void 0?void 0:i.heartbeats)==null))&&!(this._heartbeatsCache.lastSentHeartbeatDate===s||this._heartbeatsCache.heartbeats.some(o=>o.date===s)))return this._heartbeatsCache.heartbeats.push({date:s,agent:r}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(o=>{let a=new Date(o.date).valueOf();return Date.now()-a<=mb}),this._storage.overwrite(this._heartbeatsCache)})}getHeartbeatsHeader(){return f(this,null,function*(){var e;if(this._heartbeatsCache===null&&(yield this._heartbeatsCachePromise),((e=this._heartbeatsCache)===null||e===void 0?void 0:e.heartbeats)==null||this._heartbeatsCache.heartbeats.length===0)return"";let i=Jf(),{heartbeatsToSend:n,unsentEntries:r}=_b(this._heartbeatsCache.heartbeats),s=jc(JSON.stringify({version:2,heartbeats:n}));return this._heartbeatsCache.lastSentHeartbeatDate=i,r.length>0?(this._heartbeatsCache.heartbeats=r,yield this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),s})}};function Jf(){return new Date().toISOString().substring(0,10)}function _b(t,e=gb){let i=[],n=t.slice();for(let r of t){let s=i.find(o=>o.agent===r.agent);if(s){if(s.dates.push(r.date),Kf(i)>e){s.dates.pop();break}}else if(i.push({agent:r.agent,dates:[r.date]}),Kf(i)>e){i.pop();break}n=n.slice(1)}return{heartbeatsToSend:i,unsentEntries:n}}var sl=class{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}runIndexedDBEnvironmentCheck(){return f(this,null,function*(){return kf()?xf().then(()=>!0).catch(()=>!1):!1})}read(){return f(this,null,function*(){if(yield this._canUseIndexedDBPromise){let i=yield pb(this.app);return i?.heartbeats?i:{heartbeats:[]}}else return{heartbeats:[]}})}overwrite(e){return f(this,null,function*(){var i;if(yield this._canUseIndexedDBPromise){let r=yield this.read();return qf(this.app,{lastSentHeartbeatDate:(i=e.lastSentHeartbeatDate)!==null&&i!==void 0?i:r.lastSentHeartbeatDate,heartbeats:e.heartbeats})}else return})}add(e){return f(this,null,function*(){var i;if(yield this._canUseIndexedDBPromise){let r=yield this.read();return qf(this.app,{lastSentHeartbeatDate:(i=e.lastSentHeartbeatDate)!==null&&i!==void 0?i:r.lastSentHeartbeatDate,heartbeats:[...r.heartbeats,...e.heartbeats]})}else return})}};function Kf(t){return jc(JSON.stringify({version:2,heartbeats:t})).length}function vb(t){ui(new at("platform-logger",e=>new Xc(e),"PRIVATE")),ui(new at("heartbeat",e=>new rl(e),"PRIVATE")),Ie(el,zf,t),Ie(el,zf,"esm2017"),Ie("fire-js","")}vb("");var yb="firebase",bb="10.12.4";Ie(yb,bb,"app");var _r=new Ii("ANGULARFIRE2_VERSION");function Zf(t,e,i){if(e){if(e.length===1)return e[0];let s=e.filter(o=>o.app===i);if(s.length===1)return s[0]}return i.container.getProvider(t).getImmediate({optional:!0})}var ll=(t,e)=>{let i=e?[e]:Qs(),n=[];return i.forEach(r=>{r.container.getProvider(t).instances.forEach(o=>{n.includes(o)||n.push(o)})}),n},Zs=class{constructor(){return ll(wb)}},wb="app-check";function hi(){}var Xs=class{zone;delegate;constructor(e,i=su){this.zone=e,this.delegate=i}now(){return this.delegate.now()}schedule(e,i,n){let r=this.zone,s=function(o){r.runGuarded(()=>{e.apply(this,[o])})};return this.delegate.schedule(s,i,n)}},cl=class{zone;task=null;constructor(e){this.zone=e}call(e,i){let n=this.unscheduleTask.bind(this);return this.task=this.zone.run(()=>Zone.current.scheduleMacroTask("firebaseZoneBlock",hi,{},hi,hi)),i.pipe(V({next:n,complete:n,error:n})).subscribe(e).add(n)}unscheduleTask(){setTimeout(()=>{this.task!=null&&this.task.state==="scheduled"&&(this.task.invoke(),this.task=null)},10)}},eo=(()=>{class t{ngZone;outsideAngular;insideAngular;constructor(i){this.ngZone=i,this.outsideAngular=i.runOutsideAngular(()=>new Xs(Zone.current)),this.insideAngular=i.run(()=>new Xs(Zone.current,ru)),globalThis.\u0275AngularFireScheduler||=this}static \u0275fac=function(n){return new(n||t)(T(H))};static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function to(){let t=globalThis.\u0275AngularFireScheduler;if(!t)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 t}function Db(t){return to().ngZone.runOutsideAngular(()=>t())}function Cn(t){return to().ngZone.run(()=>t())}function Eb(t){return Tb(to())(t)}function Tb(t){return function(i){return i=i.lift(new cl(t.ngZone)),i.pipe(Ro(t.outsideAngular),Oo(t.insideAngular))}}var Cb=(t,e)=>function(){let n=arguments;return e&&setTimeout(()=>{e.state==="scheduled"&&e.invoke()},10),Cn(()=>t.apply(void 0,n))},fi=(t,e)=>function(){let i,n=arguments;for(let s=0;s<arguments.length;s++)typeof n[s]=="function"&&(e&&(i||=Cn(()=>Zone.current.scheduleMacroTask("firebaseZoneBlock",hi,{},hi,hi))),n[s]=Cb(n[s],i));let r=Db(()=>t.apply(this,n));if(!e)if(r instanceof Pe){let s=to();return r.pipe(Ro(s.outsideAngular),Oo(s.insideAngular))}else return Cn(()=>r);return r instanceof Pe?r.pipe(Eb):r instanceof Promise?Cn(()=>new Promise((s,o)=>r.then(a=>Cn(()=>s(a)),a=>Cn(()=>o(a))))):typeof r=="function"&&i?function(){return setTimeout(()=>{i&&i.state==="scheduled"&&i.invoke()},10),r.apply(this,arguments)}:Cn(()=>r)};var In=class{constructor(e){return e}},vr=class{constructor(){return Qs()}};function Ib(t){return t&&t.length===1?t[0]:new In(Ys())}var ul=new O("angularfire2._apps"),Sb={provide:In,useFactory:Ib,deps:[[new et,ul]]},Ab={provide:vr,deps:[[new et,ul]]};function Ob(t){return(e,i)=>{let n=i.get(nt);Ie("angularfire",_r.full,"core"),Ie("angularfire",_r.full,"app"),Ie("angular",Hu.full,n.toString());let r=e.runOutsideAngular(()=>t(i));return new In(r)}}function oR(t,...e){return He([Sb,Ab,{provide:ul,useFactory:Ob(t),multi:!0,deps:[H,ne,eo,...e]}])}var aR=fi(al,!0);function fp(){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 pp=fp,gp=new St("auth","Firebase",fp());var ao=new li("@firebase/auth");function Rb(t,...e){ao.logLevel<=j.WARN&&ao.warn(`Auth (${di}): ${t}`,...e)}function io(t,...e){ao.logLevel<=j.ERROR&&ao.error(`Auth (${di}): ${t}`,...e)}function dt(t,...e){throw Al(t,...e)}function Ze(t,...e){return Al(t,...e)}function Sl(t,e,i){let n=Object.assign(Object.assign({},pp()),{[e]:i});return new St("auth","Firebase",n).create(e,{appName:t.name})}function Sn(t){return Sl(t,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function Pb(t,e,i){let n=i;if(!(e instanceof n))throw n.name!==e.constructor.name&&dt(t,"argument-error"),Sl(t,"argument-error",`Type of ${e.constructor.name} does not match expected instance.Did you pass a reference from a different Auth SDK?`)}function Al(t,...e){if(typeof t!="string"){let i=e[0],n=[...e.slice(1)];return n[0]&&(n[0].appName=t.name),t._errorFactory.create(i,...n)}return gp.create(t,...e)}function C(t,e,...i){if(!t)throw Al(e,...i)}function At(t){let e="INTERNAL ASSERTION FAILED: "+t;throw io(e),new Error(e)}function Rt(t,e){t||At(e)}function fl(){var t;return typeof self<"u"&&((t=self.location)===null||t===void 0?void 0:t.href)||""}function Mb(){return Xf()==="http:"||Xf()==="https:"}function Xf(){var t;return typeof self<"u"&&((t=self.location)===null||t===void 0?void 0:t.protocol)||null}function Nb(){return typeof navigator<"u"&&navigator&&"onLine"in navigator&&typeof navigator.onLine=="boolean"&&(Mb()||Pf()||"connection"in navigator)?navigator.onLine:!0}function kb(){if(typeof navigator>"u")return null;let t=navigator;return t.languages&&t.languages[0]||t.language||null}var An=class{constructor(e,i){this.shortDelay=e,this.longDelay=i,Rt(i>e,"Short delay should be less than long delay!"),this.isMobile=Rf()||Mf()}get(){return Nb()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}};function Ol(t,e){Rt(t.emulator,"Emulator should always be set here");let{url:i}=t.emulator;return e?`${i}${e.startsWith("/")?e.slice(1):e}`:i}var co=class{static initialize(e,i,n){this.fetchImpl=e,i&&(this.headersImpl=i),n&&(this.responseImpl=n)}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;At("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;At("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;At("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}};var xb={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 Fb=new An(3e4,6e4);function Rl(t,e){return t.tenantId&&!e.tenantId?Object.assign(Object.assign({},e),{tenantId:t.tenantId}):e}function mi(s,o,a,c){return f(this,arguments,function*(t,e,i,n,r={}){return mp(t,r,()=>f(this,null,function*(){let l={},u={};n&&(e==="GET"?u=n:l={body:JSON.stringify(n)});let h=ci(Object.assign({key:t.config.apiKey},u)).slice(1),d=yield t._getAdditionalHeaders();return d["Content-Type"]="application/json",t.languageCode&&(d["X-Firebase-Locale"]=t.languageCode),co.fetch()(_p(t,t.config.apiHost,i,h),Object.assign({method:e,headers:d,referrerPolicy:"no-referrer"},l))}))})}function mp(t,e,i){return f(this,null,function*(){t._canInitEmulator=!1;let n=Object.assign(Object.assign({},xb),e);try{let r=new pl(t),s=yield Promise.race([i(),r.promise]);r.clearNetworkTimeout();let o=yield s.json();if("needConfirmation"in o)throw no(t,"account-exists-with-different-credential",o);if(s.ok&&!("errorMessage"in o))return o;{let a=s.ok?o.errorMessage:o.error.message,[c,l]=a.split(" : ");if(c==="FEDERATED_USER_ID_ALREADY_LINKED")throw no(t,"credential-already-in-use",o);if(c==="EMAIL_EXISTS")throw no(t,"email-already-in-use",o);if(c==="USER_DISABLED")throw no(t,"user-disabled",o);let u=n[c]||c.toLowerCase().replace(/[_\s]+/g,"-");if(l)throw Sl(t,u,l);dt(t,u)}}catch(r){if(r instanceof Qe)throw r;dt(t,"network-request-failed",{message:String(r)})}})}function Lb(s,o,a,c){return f(this,arguments,function*(t,e,i,n,r={}){let l=yield mi(t,e,i,n,r);return"mfaPendingCredential"in l&&dt(t,"multi-factor-auth-required",{_serverResponse:l}),l})}function _p(t,e,i,n){let r=`${e}${i}?${n}`;return t.config.emulator?Ol(t.config,r):`${t.config.apiScheme}://${r}`}var pl=class{constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((i,n)=>{this.timer=setTimeout(()=>n(Ze(this.auth,"network-request-failed")),Fb.get())})}clearNetworkTimeout(){clearTimeout(this.timer)}};function no(t,e,i){let n={appName:t.name};i.email&&(n.email=i.email),i.phoneNumber&&(n.phoneNumber=i.phoneNumber);let r=Ze(t,e,n);return r.customData._tokenResponse=i,r}function Bb(t,e){return f(this,null,function*(){return mi(t,"POST","/v1/accounts:delete",e)})}function vp(t,e){return f(this,null,function*(){return mi(t,"POST","/v1/accounts:lookup",e)})}function yr(t){if(t)try{let e=new Date(Number(t));if(!isNaN(e.getTime()))return e.toUTCString()}catch{}}function Pl(t,e=!1){return f(this,null,function*(){let i=Dn(t),n=yield i.getIdToken(e),r=Ml(n);C(r&&r.exp&&r.auth_time&&r.iat,i.auth,"internal-error");let s=typeof r.firebase=="object"?r.firebase:void 0,o=s?.sign_in_provider;return{claims:r,token:n,authTime:yr(dl(r.auth_time)),issuedAtTime:yr(dl(r.iat)),expirationTime:yr(dl(r.exp)),signInProvider:o||null,signInSecondFactor:s?.sign_in_second_factor||null}})}function dl(t){return Number(t)*1e3}function Ml(t){let[e,i,n]=t.split(".");if(e===void 0||i===void 0||n===void 0)return io("JWT malformed, contained fewer than 3 sections"),null;try{let r=$c(i);return r?JSON.parse(r):(io("Failed to decode base64 JWT payload"),null)}catch(r){return io("Caught error parsing JWT payload as JSON",r?.toString()),null}}function ep(t){let e=Ml(t);return C(e,"internal-error"),C(typeof e.exp<"u","internal-error"),C(typeof e.iat<"u","internal-error"),Number(e.exp)-Number(e.iat)}function wr(t,e,i=!1){return f(this,null,function*(){if(i)return e;try{return yield e}catch(n){throw n instanceof Qe&&Vb(n)&&t.auth.currentUser===t&&(yield t.auth.signOut()),n}})}function Vb({code:t}){return t==="auth/user-disabled"||t==="auth/user-token-expired"}var gl=class{constructor(e){this.user=e,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(e){var i;if(e){let n=this.errorBackoff;return this.errorBackoff=Math.min(this.errorBackoff*2,96e4),n}else{this.errorBackoff=3e4;let r=((i=this.user.stsTokenManager.expirationTime)!==null&&i!==void 0?i:0)-Date.now()-3e5;return Math.max(0,r)}}schedule(e=!1){if(!this.isRunning)return;let i=this.getInterval(e);this.timerId=setTimeout(()=>f(this,null,function*(){yield this.iteration()}),i)}iteration(){return f(this,null,function*(){try{yield this.user.getIdToken(!0)}catch(e){e?.code==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()})}};var Dr=class{constructor(e,i){this.createdAt=e,this.lastLoginAt=i,this._initializeTime()}_initializeTime(){this.lastSignInTime=yr(this.lastLoginAt),this.creationTime=yr(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}};function lo(t){return f(this,null,function*(){var e;let i=t.auth,n=yield t.getIdToken(),r=yield wr(t,vp(i,{idToken:n}));C(r?.users.length,i,"internal-error");let s=r.users[0];t._notifyReloadListener(s);let o=!((e=s.providerUserInfo)===null||e===void 0)&&e.length?yp(s.providerUserInfo):[],a=Ub(t.providerData,o),c=t.isAnonymous,l=!(t.email&&s.passwordHash)&&!a?.length,u=c?l:!1,h={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:a,metadata:new Dr(s.createdAt,s.lastLoginAt),isAnonymous:u};Object.assign(t,h)})}function Nl(t){return f(this,null,function*(){let e=Dn(t);yield lo(e),yield e.auth._persistUserIfCurrent(e),e.auth._notifyListenersIfCurrent(e)})}function Ub(t,e){return[...t.filter(n=>!e.some(r=>r.providerId===n.providerId)),...e]}function yp(t){return t.map(e=>{var{providerId:i}=e,n=kr(e,["providerId"]);return{providerId:i,uid:n.rawId||"",displayName:n.displayName||null,email:n.email||null,phoneNumber:n.phoneNumber||null,photoURL:n.photoUrl||null}})}function jb(t,e){return f(this,null,function*(){let i=yield mp(t,{},()=>f(this,null,function*(){let n=ci({grant_type:"refresh_token",refresh_token:e}).slice(1),{tokenApiHost:r,apiKey:s}=t.config,o=_p(t,r,"/v1/token",`key=${s}`),a=yield t._getAdditionalHeaders();return a["Content-Type"]="application/x-www-form-urlencoded",co.fetch()(o,{method:"POST",headers:a,body:n})}));return{accessToken:i.access_token,expiresIn:i.expires_in,refreshToken:i.refresh_token}})}function $b(t,e){return f(this,null,function*(){return mi(t,"POST","/v2/accounts:revokeToken",Rl(t,e))})}var br=class t{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){C(e.idToken,"internal-error"),C(typeof e.idToken<"u","internal-error"),C(typeof e.refreshToken<"u","internal-error");let i="expiresIn"in e&&typeof e.expiresIn<"u"?Number(e.expiresIn):ep(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,i)}updateFromIdToken(e){C(e.length!==0,"internal-error");let i=ep(e);this.updateTokensAndExpiration(e,null,i)}getToken(e,i=!1){return f(this,null,function*(){return!i&&this.accessToken&&!this.isExpired?this.accessToken:(C(this.refreshToken,e,"user-token-expired"),this.refreshToken?(yield this.refresh(e,this.refreshToken),this.accessToken):null)})}clearRefreshToken(){this.refreshToken=null}refresh(e,i){return f(this,null,function*(){let{accessToken:n,refreshToken:r,expiresIn:s}=yield jb(e,i);this.updateTokensAndExpiration(n,r,Number(s))})}updateTokensAndExpiration(e,i,n){this.refreshToken=i||null,this.accessToken=e||null,this.expirationTime=Date.now()+n*1e3}static fromJSON(e,i){let{refreshToken:n,accessToken:r,expirationTime:s}=i,o=new t;return n&&(C(typeof n=="string","internal-error",{appName:e}),o.refreshToken=n),r&&(C(typeof r=="string","internal-error",{appName:e}),o.accessToken=r),s&&(C(typeof s=="number","internal-error",{appName:e}),o.expirationTime=s),o}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}_clone(){return Object.assign(new t,this.toJSON())}_performRefresh(){return At("not implemented")}};function Xt(t,e){C(typeof t=="string"||typeof t>"u","internal-error",{appName:e})}var gi=class t{constructor(e){var{uid:i,auth:n,stsTokenManager:r}=e,s=kr(e,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new gl(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=i,this.auth=n,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 Dr(s.createdAt||void 0,s.lastLoginAt||void 0)}getIdToken(e){return f(this,null,function*(){let i=yield wr(this,this.stsTokenManager.getToken(this.auth,e));return C(i,this.auth,"internal-error"),this.accessToken!==i&&(this.accessToken=i,yield this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),i})}getIdTokenResult(e){return Pl(this,e)}reload(){return Nl(this)}_assign(e){this!==e&&(C(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.photoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map(i=>Object.assign({},i)),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){let i=new t(Object.assign(Object.assign({},this),{auth:e,stsTokenManager:this.stsTokenManager._clone()}));return i.metadata._copy(this.metadata),i}_onReload(e){C(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=e,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(e){this.reloadListener?this.reloadListener(e):this.reloadUserInfo=e}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}_updateTokensIfNecessary(e,i=!1){return f(this,null,function*(){let n=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),n=!0),i&&(yield lo(this)),yield this.auth._persistUserIfCurrent(this),n&&this.auth._notifyListenersIfCurrent(this)})}delete(){return f(this,null,function*(){if(lt(this.auth.app))return Promise.reject(Sn(this.auth));let e=yield this.getIdToken();return yield wr(this,Bb(this.auth,{idToken:e})),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(e=>Object.assign({},e)),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(e,i){var n,r,s,o,a,c,l,u;let h=(n=i.displayName)!==null&&n!==void 0?n:void 0,d=(r=i.email)!==null&&r!==void 0?r:void 0,g=(s=i.phoneNumber)!==null&&s!==void 0?s:void 0,v=(o=i.photoURL)!==null&&o!==void 0?o:void 0,E=(a=i.tenantId)!==null&&a!==void 0?a:void 0,_=(c=i._redirectEventId)!==null&&c!==void 0?c:void 0,y=(l=i.createdAt)!==null&&l!==void 0?l:void 0,R=(u=i.lastLoginAt)!==null&&u!==void 0?u:void 0,{uid:P,emailVerified:b,isAnonymous:M,providerData:A,stsTokenManager:k}=i;C(P&&k,e,"internal-error");let W=br.fromJSON(this.name,k);C(typeof P=="string",e,"internal-error"),Xt(h,e.name),Xt(d,e.name),C(typeof b=="boolean",e,"internal-error"),C(typeof M=="boolean",e,"internal-error"),Xt(g,e.name),Xt(v,e.name),Xt(E,e.name),Xt(_,e.name),Xt(y,e.name),Xt(R,e.name);let q=new t({uid:P,auth:e,email:d,emailVerified:b,displayName:h,isAnonymous:M,photoURL:v,phoneNumber:g,tenantId:E,stsTokenManager:W,createdAt:y,lastLoginAt:R});return A&&Array.isArray(A)&&(q.providerData=A.map(K=>Object.assign({},K))),_&&(q._redirectEventId=_),q}static _fromIdTokenResponse(e,i,n=!1){return f(this,null,function*(){let r=new br;r.updateFromServerResponse(i);let s=new t({uid:i.localId,auth:e,stsTokenManager:r,isAnonymous:n});return yield lo(s),s})}static _fromGetAccountInfoResponse(e,i,n){return f(this,null,function*(){let r=i.users[0];C(r.localId!==void 0,"internal-error");let s=r.providerUserInfo!==void 0?yp(r.providerUserInfo):[],o=!(r.email&&r.passwordHash)&&!s?.length,a=new br;a.updateFromIdToken(n);let c=new t({uid:r.localId,auth:e,stsTokenManager:a,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 Dr(r.createdAt,r.lastLoginAt),isAnonymous:!(r.email&&r.passwordHash)&&!s?.length};return Object.assign(c,l),c})}};var tp=new Map;function Ot(t){Rt(t instanceof Function,"Expected a class definition");let e=tp.get(t);return e?(Rt(e instanceof t,"Instance stored in cache mismatched with class"),e):(e=new t,tp.set(t,e),e)}var Hb=(()=>{class t{constructor(){this.type="NONE",this.storage={}}_isAvailable(){return f(this,null,function*(){return!0})}_set(i,n){return f(this,null,function*(){this.storage[i]=n})}_get(i){return f(this,null,function*(){let n=this.storage[i];return n===void 0?null:n})}_remove(i){return f(this,null,function*(){delete this.storage[i]})}_addListener(i,n){}_removeListener(i,n){}}return t.type="NONE",t})(),ml=Hb;function ro(t,e,i){return`firebase:${t}:${e}:${i}`}var uo=class t{constructor(e,i,n){this.persistence=e,this.auth=i,this.userKey=n;let{config:r,name:s}=this.auth;this.fullUserKey=ro(this.userKey,r.apiKey,s),this.fullPersistenceKey=ro("persistence",r.apiKey,s),this.boundEventHandler=i._onStorageEvent.bind(i),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}getCurrentUser(){return f(this,null,function*(){let e=yield this.persistence._get(this.fullUserKey);return e?gi._fromJSON(this.auth,e):null})}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}setPersistence(e){return f(this,null,function*(){if(this.persistence===e)return;let i=yield this.getCurrentUser();if(yield this.removeCurrentUser(),this.persistence=e,i)return this.setCurrentUser(i)})}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static create(e,i,n="authUser"){return f(this,null,function*(){if(!i.length)return new t(Ot(ml),e,n);let r=(yield Promise.all(i.map(l=>f(this,null,function*(){if(yield l._isAvailable())return l})))).filter(l=>l),s=r[0]||Ot(ml),o=ro(n,e.config.apiKey,e.name),a=null;for(let l of i)try{let u=yield l._get(o);if(u){let h=gi._fromJSON(e,u);l!==s&&(a=h),s=l;break}}catch{}let c=r.filter(l=>l._shouldAllowMigration);return!s._shouldAllowMigration||!c.length?new t(s,e,n):(s=c[0],a&&(yield s._set(o,a.toJSON())),yield Promise.all(i.map(l=>f(this,null,function*(){if(l!==s)try{yield l._remove(o)}catch{}}))),new t(s,e,n))})}};function np(t){let e=t.toLowerCase();if(e.includes("opera/")||e.includes("opr/")||e.includes("opios/"))return"Opera";if(Dp(e))return"IEMobile";if(e.includes("msie")||e.includes("trident/"))return"IE";if(e.includes("edge/"))return"Edge";if(bp(e))return"Firefox";if(e.includes("silk/"))return"Silk";if(Tp(e))return"Blackberry";if(Cp(e))return"Webos";if(kl(e))return"Safari";if((e.includes("chrome/")||wp(e))&&!e.includes("edge/"))return"Chrome";if(Ep(e))return"Android";{let i=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,n=t.match(i);if(n?.length===2)return n[1]}return"Other"}function bp(t=de()){return/firefox\//i.test(t)}function kl(t=de()){let e=t.toLowerCase();return e.includes("safari/")&&!e.includes("chrome/")&&!e.includes("crios/")&&!e.includes("android")}function wp(t=de()){return/crios\//i.test(t)}function Dp(t=de()){return/iemobile/i.test(t)}function Ep(t=de()){return/android/i.test(t)}function Tp(t=de()){return/blackberry/i.test(t)}function Cp(t=de()){return/webos/i.test(t)}function bo(t=de()){return/iphone|ipad|ipod/i.test(t)||/macintosh/i.test(t)&&/mobile/i.test(t)}function Gb(t=de()){var e;return bo(t)&&!!(!((e=window.navigator)===null||e===void 0)&&e.standalone)}function zb(){return Nf()&&document.documentMode===10}function Ip(t=de()){return bo(t)||Ep(t)||Cp(t)||Tp(t)||/windows phone/i.test(t)||Dp(t)}function Wb(){try{return!!(window&&window!==window.top)}catch{return!1}}function Sp(t,e=[]){let i;switch(t){case"Browser":i=np(de());break;case"Worker":i=`${np(de())}-${t}`;break;default:i=t}let n=e.length?e.join(","):"FirebaseCore-web";return`${i}/JsCore/${di}/${n}`}var _l=class{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,i){let n=s=>new Promise((o,a)=>{try{let c=e(s);o(c)}catch(c){a(c)}});n.onAbort=i,this.queue.push(n);let r=this.queue.length-1;return()=>{this.queue[r]=()=>Promise.resolve()}}runMiddleware(e){return f(this,null,function*(){if(this.auth.currentUser===e)return;let i=[];try{for(let n of this.queue)yield n(e),n.onAbort&&i.push(n.onAbort)}catch(n){i.reverse();for(let r of i)try{r()}catch{}throw this.auth._errorFactory.create("login-blocked",{originalMessage:n?.message})}})}};function qb(i){return f(this,arguments,function*(t,e={}){return mi(t,"GET","/v2/passwordPolicy",Rl(t,e))})}var Jb=6,vl=class{constructor(e){var i,n,r,s;let o=e.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=(i=o.minPasswordLength)!==null&&i!==void 0?i:Jb,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=e.enforcementState,this.enforcementState==="ENFORCEMENT_STATE_UNSPECIFIED"&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=(r=(n=e.allowedNonAlphanumericCharacters)===null||n===void 0?void 0:n.join(""))!==null&&r!==void 0?r:"",this.forceUpgradeOnSignin=(s=e.forceUpgradeOnSignin)!==null&&s!==void 0?s:!1,this.schemaVersion=e.schemaVersion}validatePassword(e){var i,n,r,s,o,a;let c={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(e,c),this.validatePasswordCharacterOptions(e,c),c.isValid&&(c.isValid=(i=c.meetsMinPasswordLength)!==null&&i!==void 0?i:!0),c.isValid&&(c.isValid=(n=c.meetsMaxPasswordLength)!==null&&n!==void 0?n:!0),c.isValid&&(c.isValid=(r=c.containsLowercaseLetter)!==null&&r!==void 0?r:!0),c.isValid&&(c.isValid=(s=c.containsUppercaseLetter)!==null&&s!==void 0?s:!0),c.isValid&&(c.isValid=(o=c.containsNumericCharacter)!==null&&o!==void 0?o:!0),c.isValid&&(c.isValid=(a=c.containsNonAlphanumericCharacter)!==null&&a!==void 0?a:!0),c}validatePasswordLengthOptions(e,i){let n=this.customStrengthOptions.minPasswordLength,r=this.customStrengthOptions.maxPasswordLength;n&&(i.meetsMinPasswordLength=e.length>=n),r&&(i.meetsMaxPasswordLength=e.length<=r)}validatePasswordCharacterOptions(e,i){this.updatePasswordCharacterOptionsStatuses(i,!1,!1,!1,!1);let n;for(let r=0;r<e.length;r++)n=e.charAt(r),this.updatePasswordCharacterOptionsStatuses(i,n>="a"&&n<="z",n>="A"&&n<="Z",n>="0"&&n<="9",this.allowedNonAlphanumericCharacters.includes(n))}updatePasswordCharacterOptionsStatuses(e,i,n,r,s){this.customStrengthOptions.containsLowercaseLetter&&(e.containsLowercaseLetter||(e.containsLowercaseLetter=i)),this.customStrengthOptions.containsUppercaseLetter&&(e.containsUppercaseLetter||(e.containsUppercaseLetter=n)),this.customStrengthOptions.containsNumericCharacter&&(e.containsNumericCharacter||(e.containsNumericCharacter=r)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(e.containsNonAlphanumericCharacter||(e.containsNonAlphanumericCharacter=s))}};var yl=class{constructor(e,i,n,r){this.app=e,this.heartbeatServiceProvider=i,this.appCheckServiceProvider=n,this.config=r,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new ho(this),this.idTokenSubscription=new ho(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=gp,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=e.name,this.clientVersion=r.sdkClientVersion}_initializeWithPersistence(e,i){return i&&(this._popupRedirectResolver=Ot(i)),this._initializationPromise=this.queue(()=>f(this,null,function*(){var n,r;if(!this._deleted&&(this.persistenceManager=yield uo.create(this,e),!this._deleted)){if(!((n=this._popupRedirectResolver)===null||n===void 0)&&n._shouldInitProactively)try{yield this._popupRedirectResolver._initialize(this)}catch{}yield this.initializeCurrentUser(i),this.lastNotifiedUid=((r=this.currentUser)===null||r===void 0?void 0:r.uid)||null,!this._deleted&&(this._isInitialized=!0)}})),this._initializationPromise}_onStorageEvent(){return f(this,null,function*(){if(this._deleted)return;let e=yield this.assertedPersistence.getCurrentUser();if(!(!this.currentUser&&!e)){if(this.currentUser&&e&&this.currentUser.uid===e.uid){this._currentUser._assign(e),yield this.currentUser.getIdToken();return}yield this._updateCurrentUser(e,!0)}})}initializeCurrentUserFromIdToken(e){return f(this,null,function*(){try{let i=yield vp(this,{idToken:e}),n=yield gi._fromGetAccountInfoResponse(this,i,e);yield this.directlySetCurrentUser(n)}catch(i){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",i),yield this.directlySetCurrentUser(null)}})}initializeCurrentUser(e){return f(this,null,function*(){var i;if(lt(this.app)){let o=this.app.settings.authIdToken;return o?new Promise(a=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(o).then(a,a))}):this.directlySetCurrentUser(null)}let n=yield this.assertedPersistence.getCurrentUser(),r=n,s=!1;if(e&&this.config.authDomain){yield this.getOrInitRedirectPersistenceManager();let o=(i=this.redirectUser)===null||i===void 0?void 0:i._redirectEventId,a=r?._redirectEventId,c=yield this.tryRedirectSignIn(e);(!o||o===a)&&c?.user&&(r=c.user,s=!0)}if(!r)return this.directlySetCurrentUser(null);if(!r._redirectEventId){if(s)try{yield this.beforeStateQueue.runMiddleware(r)}catch(o){r=n,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(o))}return r?this.reloadAndSetCurrentUserOrClear(r):this.directlySetCurrentUser(null)}return C(this._popupRedirectResolver,this,"argument-error"),yield this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===r._redirectEventId?this.directlySetCurrentUser(r):this.reloadAndSetCurrentUserOrClear(r)})}tryRedirectSignIn(e){return f(this,null,function*(){let i=null;try{i=yield this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch{yield this._setRedirectUser(null)}return i})}reloadAndSetCurrentUserOrClear(e){return f(this,null,function*(){try{yield lo(e)}catch(i){if(i?.code!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)})}useDeviceLanguage(){this.languageCode=kb()}_delete(){return f(this,null,function*(){this._deleted=!0})}updateCurrentUser(e){return f(this,null,function*(){if(lt(this.app))return Promise.reject(Sn(this));let i=e?Dn(e):null;return i&&C(i.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(i&&i._clone(this))})}_updateCurrentUser(e,i=!1){return f(this,null,function*(){if(!this._deleted)return e&&C(this.tenantId===e.tenantId,this,"tenant-id-mismatch"),i||(yield this.beforeStateQueue.runMiddleware(e)),this.queue(()=>f(this,null,function*(){yield this.directlySetCurrentUser(e),this.notifyAuthListeners()}))})}signOut(){return f(this,null,function*(){return lt(this.app)?Promise.reject(Sn(this)):(yield this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&(yield this._setRedirectUser(null)),this._updateCurrentUser(null,!0))})}setPersistence(e){return lt(this.app)?Promise.reject(Sn(this)):this.queue(()=>f(this,null,function*(){yield this.assertedPersistence.setPersistence(Ot(e))}))}_getRecaptchaConfig(){return this.tenantId==null?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}validatePassword(e){return f(this,null,function*(){this._getPasswordPolicyInternal()||(yield this._updatePasswordPolicy());let i=this._getPasswordPolicyInternal();return i.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):i.validatePassword(e)})}_getPasswordPolicyInternal(){return this.tenantId===null?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}_updatePasswordPolicy(){return f(this,null,function*(){let e=yield qb(this),i=new vl(e);this.tenantId===null?this._projectPasswordPolicy=i:this._tenantPasswordPolicies[this.tenantId]=i})}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(e){this._errorFactory=new St("auth","Firebase",e())}onAuthStateChanged(e,i,n){return this.registerStateListener(this.authStateSubscription,e,i,n)}beforeAuthStateChanged(e,i){return this.beforeStateQueue.pushCallback(e,i)}onIdTokenChanged(e,i,n){return this.registerStateListener(this.idTokenSubscription,e,i,n)}authStateReady(){return new Promise((e,i)=>{if(this.currentUser)e();else{let n=this.onAuthStateChanged(()=>{n(),e()},i)}})}revokeAccessToken(e){return f(this,null,function*(){if(this.currentUser){let i=yield this.currentUser.getIdToken(),n={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:e,idToken:i};this.tenantId!=null&&(n.tenantId=this.tenantId),yield $b(this,n)}})}toJSON(){var e;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:(e=this._currentUser)===null||e===void 0?void 0:e.toJSON()}}_setRedirectUser(e,i){return f(this,null,function*(){let n=yield this.getOrInitRedirectPersistenceManager(i);return e===null?n.removeCurrentUser():n.setCurrentUser(e)})}getOrInitRedirectPersistenceManager(e){return f(this,null,function*(){if(!this.redirectPersistenceManager){let i=e&&Ot(e)||this._popupRedirectResolver;C(i,this,"argument-error"),this.redirectPersistenceManager=yield uo.create(this,[Ot(i._redirectPersistence)],"redirectUser"),this.redirectUser=yield this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager})}_redirectUserForId(e){return f(this,null,function*(){var i,n;return this._isInitialized&&(yield this.queue(()=>f(this,null,function*(){}))),((i=this._currentUser)===null||i===void 0?void 0:i._redirectEventId)===e?this._currentUser:((n=this.redirectUser)===null||n===void 0?void 0:n._redirectEventId)===e?this.redirectUser:null})}_persistUserIfCurrent(e){return f(this,null,function*(){if(e===this.currentUser)return this.queue(()=>f(this,null,function*(){return this.directlySetCurrentUser(e)}))})}_notifyListenersIfCurrent(e){e===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 e,i;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);let n=(i=(e=this.currentUser)===null||e===void 0?void 0:e.uid)!==null&&i!==void 0?i:null;this.lastNotifiedUid!==n&&(this.lastNotifiedUid=n,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,i,n,r){if(this._deleted)return()=>{};let s=typeof i=="function"?i:i.next.bind(i),o=!1,a=this._isInitialized?Promise.resolve():this._initializationPromise;if(C(a,this,"internal-error"),a.then(()=>{o||s(this.currentUser)}),typeof i=="function"){let c=e.addObserver(i,n,r);return()=>{o=!0,c()}}else{let c=e.addObserver(i);return()=>{o=!0,c()}}}directlySetCurrentUser(e){return f(this,null,function*(){this.currentUser&&this.currentUser!==e&&this._currentUser._stopProactiveRefresh(),e&&this.isProactiveRefreshEnabled&&e._startProactiveRefresh(),this.currentUser=e,e?yield this.assertedPersistence.setCurrentUser(e):yield this.assertedPersistence.removeCurrentUser()})}queue(e){return this.operations=this.operations.then(e,e),this.operations}get assertedPersistence(){return C(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){!e||this.frameworks.includes(e)||(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=Sp(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}_getAdditionalHeaders(){return f(this,null,function*(){var e;let i={"X-Client-Version":this.clientVersion};this.app.options.appId&&(i["X-Firebase-gmpid"]=this.app.options.appId);let n=yield(e=this.heartbeatServiceProvider.getImmediate({optional:!0}))===null||e===void 0?void 0:e.getHeartbeatsHeader();n&&(i["X-Firebase-Client"]=n);let r=yield this._getAppCheckToken();return r&&(i["X-Firebase-AppCheck"]=r),i})}_getAppCheckToken(){return f(this,null,function*(){var e;let i=yield(e=this.appCheckServiceProvider.getImmediate({optional:!0}))===null||e===void 0?void 0:e.getToken();return i?.error&&Rb(`Error while retrieving App Check token: ${i.error}`),i?.token})}};function wo(t){return Dn(t)}var ho=class{constructor(e){this.auth=e,this.observer=null,this.addObserver=Lf(i=>this.observer=i)}get next(){return C(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}};var xl={loadJS(){return f(this,null,function*(){throw new Error("Unable to load external scripts")})},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function Kb(t){xl=t}function Yb(t){return xl.loadJS(t)}function Qb(){return xl.gapiScript}function Ap(t){return`__${t}${Math.floor(Math.random()*1e6)}`}function Fl(t,e){let i=ol(t,"auth");if(i.isInitialized()){let r=i.getImmediate(),s=i.getOptions();if(ai(s,e??{}))return r;dt(r,"already-initialized")}return i.initialize({options:e})}function Zb(t,e){let i=e?.persistence||[],n=(Array.isArray(i)?i:[i]).map(Ot);e?.errorMap&&t._updateErrorMap(e.errorMap),t._initializeWithPersistence(n,e?.popupRedirectResolver)}function Ll(t,e,i){let n=wo(t);C(n._canInitEmulator,n,"emulator-config-failed"),C(/^https?:\/\//.test(e),n,"invalid-emulator-scheme");let r=!!i?.disableWarnings,s=Op(e),{host:o,port:a}=Xb(e),c=a===null?"":`:${a}`;n.config.emulator={url:`${s}//${o}${c}/`},n.settings.appVerificationDisabledForTesting=!0,n.emulatorConfig=Object.freeze({host:o,port:a,protocol:s.replace(":",""),options:Object.freeze({disableWarnings:r})}),r||e1()}function Op(t){let e=t.indexOf(":");return e<0?"":t.substr(0,e+1)}function Xb(t){let e=Op(t),i=/(\/\/)?([^?#/]+)/.exec(t.substr(e.length));if(!i)return{host:"",port:null};let n=i[2].split("@").pop()||"",r=/^(\[[^\]]+\])(:|$)/.exec(n);if(r){let s=r[1];return{host:s,port:ip(n.substr(s.length+1))}}else{let[s,o]=n.split(":");return{host:s,port:ip(o)}}}function ip(t){if(!t)return null;let e=Number(t);return isNaN(e)?null:e}function e1(){function t(){let e=document.createElement("p"),i=e.style;e.innerText="Running in emulator mode. Do not use with production credentials.",i.position="fixed",i.width="100%",i.backgroundColor="#ffffff",i.border=".1em solid #000000",i.color="#b50000",i.bottom="0px",i.left="0px",i.margin="0px",i.zIndex="10000",i.textAlign="center",e.classList.add("firebase-emulator-warning"),document.body.appendChild(e)}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",t):t())}var Er=class{constructor(e,i){this.providerId=e,this.signInMethod=i}toJSON(){return At("not implemented")}_getIdTokenResponse(e){return At("not implemented")}_linkToIdToken(e,i){return At("not implemented")}_getReauthenticationResolver(e){return At("not implemented")}};function pi(t,e){return f(this,null,function*(){return Lb(t,"POST","/v1/accounts:signInWithIdp",Rl(t,e))})}var t1="http://localhost",fo=class t extends Er{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){let i=new t(e.providerId,e.signInMethod);return e.idToken||e.accessToken?(e.idToken&&(i.idToken=e.idToken),e.accessToken&&(i.accessToken=e.accessToken),e.nonce&&!e.pendingToken&&(i.nonce=e.nonce),e.pendingToken&&(i.pendingToken=e.pendingToken)):e.oauthToken&&e.oauthTokenSecret?(i.accessToken=e.oauthToken,i.secret=e.oauthTokenSecret):dt("argument-error"),i}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(e){let i=typeof e=="string"?JSON.parse(e):e,{providerId:n,signInMethod:r}=i,s=kr(i,["providerId","signInMethod"]);if(!n||!r)return null;let o=new t(n,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(e){let i=this.buildRequest();return pi(e,i)}_linkToIdToken(e,i){let n=this.buildRequest();return n.idToken=i,pi(e,n)}_getReauthenticationResolver(e){let i=this.buildRequest();return i.autoCreate=!1,pi(e,i)}buildRequest(){let e={requestUri:t1,returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{let i={};this.idToken&&(i.id_token=this.idToken),this.accessToken&&(i.access_token=this.accessToken),this.secret&&(i.oauth_token_secret=this.secret),i.providerId=this.providerId,this.nonce&&!this.pendingToken&&(i.nonce=this.nonce),e.postBody=ci(i)}return e}};var Tr=class{constructor(e){this.providerId=e,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(e){this.defaultLanguageCode=e}setCustomParameters(e){return this.customParameters=e,this}getCustomParameters(){return this.customParameters}};var po=class extends Tr{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}};var Sr=(()=>{class t extends po{constructor(){super("google.com"),this.addScope("profile")}static credential(i,n){return fo._fromParams({providerId:t.PROVIDER_ID,signInMethod:t.GOOGLE_SIGN_IN_METHOD,idToken:i,accessToken:n})}static credentialFromResult(i){return t.credentialFromTaggedObject(i)}static credentialFromError(i){return t.credentialFromTaggedObject(i.customData||{})}static credentialFromTaggedObject({_tokenResponse:i}){if(!i)return null;let{oauthIdToken:n,oauthAccessToken:r}=i;if(!n&&!r)return null;try{return t.credential(n,r)}catch{return null}}}t.GOOGLE_SIGN_IN_METHOD="google.com",t.PROVIDER_ID="google.com";return t})();var Cr=class t{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static _fromIdTokenResponse(e,i,n,r=!1){return f(this,null,function*(){let s=yield gi._fromIdTokenResponse(e,n,r),o=rp(n);return new t({user:s,providerId:o,_tokenResponse:n,operationType:i})})}static _forOperation(e,i,n){return f(this,null,function*(){yield e._updateTokensIfNecessary(n,!0);let r=rp(n);return new t({user:e,providerId:r,_tokenResponse:n,operationType:i})})}};function rp(t){return t.providerId?t.providerId:"phoneNumber"in t?"phone":null}var bl=class t extends Qe{constructor(e,i,n,r){var s;super(i.code,i.message),this.operationType=n,this.user=r,Object.setPrototypeOf(this,t.prototype),this.customData={appName:e.name,tenantId:(s=e.tenantId)!==null&&s!==void 0?s:void 0,_serverResponse:i.customData._serverResponse,operationType:n}}static _fromErrorAndOperation(e,i,n,r){return new t(e,i,n,r)}};function Rp(t,e,i,n){return(e==="reauthenticate"?i._getReauthenticationResolver(t):i._getIdTokenResponse(t)).catch(s=>{throw s.code==="auth/multi-factor-auth-required"?bl._fromErrorAndOperation(t,s,e,n):s})}function n1(t,e,i=!1){return f(this,null,function*(){let n=yield wr(t,e._linkToIdToken(t.auth,yield t.getIdToken()),i);return Cr._forOperation(t,"link",n)})}function i1(t,e,i=!1){return f(this,null,function*(){let{auth:n}=t;if(lt(n.app))return Promise.reject(Sn(n));let r="reauthenticate";try{let s=yield wr(t,Rp(n,r,e,t),i);C(s.idToken,n,"internal-error");let o=Ml(s.idToken);C(o,n,"internal-error");let{sub:a}=o;return C(t.uid===a,n,"user-mismatch"),Cr._forOperation(t,r,s)}catch(s){throw s?.code==="auth/user-not-found"&&dt(n,"user-mismatch"),s}})}function r1(t,e,i=!1){return f(this,null,function*(){if(lt(t.app))return Promise.reject(Sn(t));let n="signIn",r=yield Rp(t,n,e),s=yield Cr._fromIdTokenResponse(t,n,r);return i||(yield t._updateCurrentUser(s.user)),s})}function Ar(t,e,i,n){return Dn(t).onIdTokenChanged(e,i,n)}function Bl(t,e,i){return Dn(t).beforeAuthStateChanged(e,i)}var go="__sak";var mo=class{constructor(e,i){this.storageRetriever=e,this.type=i}_isAvailable(){try{return this.storage?(this.storage.setItem(go,"1"),this.storage.removeItem(go),Promise.resolve(!0)):Promise.resolve(!1)}catch{return Promise.resolve(!1)}}_set(e,i){return this.storage.setItem(e,JSON.stringify(i)),Promise.resolve()}_get(e){let i=this.storage.getItem(e);return Promise.resolve(i?JSON.parse(i):null)}_remove(e){return this.storage.removeItem(e),Promise.resolve()}get storage(){return this.storageRetriever()}};function s1(){let t=de();return kl(t)||bo(t)}var o1=1e3,a1=10,c1=(()=>{class t extends mo{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(i,n)=>this.onStorageEvent(i,n),this.listeners={},this.localCache={},this.pollTimer=null,this.safariLocalStorageNotSynced=s1()&&Wb(),this.fallbackToPolling=Ip(),this._shouldAllowMigration=!0}forAllChangedKeys(i){for(let n of Object.keys(this.listeners)){let r=this.storage.getItem(n),s=this.localCache[n];r!==s&&i(n,s,r)}}onStorageEvent(i,n=!1){if(!i.key){this.forAllChangedKeys((a,c,l)=>{this.notifyListeners(a,l)});return}let r=i.key;if(n?this.detachListener():this.stopPolling(),this.safariLocalStorageNotSynced){let a=this.storage.getItem(r);if(i.newValue!==a)i.newValue!==null?this.storage.setItem(r,i.newValue):this.storage.removeItem(r);else if(this.localCache[r]===i.newValue&&!n)return}let s=()=>{let a=this.storage.getItem(r);!n&&this.localCache[r]===a||this.notifyListeners(r,a)},o=this.storage.getItem(r);zb()&&o!==i.newValue&&i.newValue!==i.oldValue?setTimeout(s,a1):s()}notifyListeners(i,n){this.localCache[i]=n;let r=this.listeners[i];if(r)for(let s of Array.from(r))s(n&&JSON.parse(n))}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((i,n,r)=>{this.onStorageEvent(new StorageEvent("storage",{key:i,oldValue:n,newValue:r}),!0)})},o1)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(i,n){Object.keys(this.listeners).length===0&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[i]||(this.listeners[i]=new Set,this.localCache[i]=this.storage.getItem(i)),this.listeners[i].add(n)}_removeListener(i,n){this.listeners[i]&&(this.listeners[i].delete(n),this.listeners[i].size===0&&delete this.listeners[i]),Object.keys(this.listeners).length===0&&(this.detachListener(),this.stopPolling())}_set(i,n){return f(this,null,function*(){yield on(t.prototype,this,"_set").call(this,i,n),this.localCache[i]=JSON.stringify(n)})}_get(i){return f(this,null,function*(){let n=yield on(t.prototype,this,"_get").call(this,i);return this.localCache[i]=JSON.stringify(n),n})}_remove(i){return f(this,null,function*(){yield on(t.prototype,this,"_remove").call(this,i),delete this.localCache[i]})}}return t.type="LOCAL",t})(),Pp=c1;var l1=(()=>{class t extends mo{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(i,n){}_removeListener(i,n){}}return t.type="SESSION",t})(),Vl=l1;function u1(t){return Promise.all(t.map(e=>f(this,null,function*(){try{return{fulfilled:!0,value:yield e}}catch(i){return{fulfilled:!1,reason:i}}})))}var d1=(()=>{class t{constructor(i){this.eventTarget=i,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(i){let n=this.receivers.find(s=>s.isListeningto(i));if(n)return n;let r=new t(i);return this.receivers.push(r),r}isListeningto(i){return this.eventTarget===i}handleEvent(i){return f(this,null,function*(){let n=i,{eventId:r,eventType:s,data:o}=n.data,a=this.handlersMap[s];if(!a?.size)return;n.ports[0].postMessage({status:"ack",eventId:r,eventType:s});let c=Array.from(a).map(u=>f(this,null,function*(){return u(n.origin,o)})),l=yield u1(c);n.ports[0].postMessage({status:"done",eventId:r,eventType:s,response:l})})}_subscribe(i,n){Object.keys(this.handlersMap).length===0&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[i]||(this.handlersMap[i]=new Set),this.handlersMap[i].add(n)}_unsubscribe(i,n){this.handlersMap[i]&&n&&this.handlersMap[i].delete(n),(!n||this.handlersMap[i].size===0)&&delete this.handlersMap[i],Object.keys(this.handlersMap).length===0&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}t.receivers=[];return t})();function Ul(t="",e=10){let i="";for(let n=0;n<e;n++)i+=Math.floor(Math.random()*10);return t+i}var wl=class{constructor(e){this.target=e,this.handlers=new Set}removeMessageHandler(e){e.messageChannel&&(e.messageChannel.port1.removeEventListener("message",e.onMessage),e.messageChannel.port1.close()),this.handlers.delete(e)}_send(e,i,n=50){return f(this,null,function*(){let r=typeof MessageChannel<"u"?new MessageChannel:null;if(!r)throw new Error("connection_unavailable");let s,o;return new Promise((a,c)=>{let l=Ul("",20);r.port1.start();let u=setTimeout(()=>{c(new Error("unsupported_event"))},n);o={messageChannel:r,onMessage(h){let d=h;if(d.data.eventId===l)switch(d.data.status){case"ack":clearTimeout(u),s=setTimeout(()=>{c(new Error("timeout"))},3e3);break;case"done":clearTimeout(s),a(d.data.response);break;default:clearTimeout(u),clearTimeout(s),c(new Error("invalid_response"));break}}},this.handlers.add(o),r.port1.addEventListener("message",o.onMessage),this.target.postMessage({eventType:e,eventId:l,data:i},[r.port2])}).finally(()=>{o&&this.removeMessageHandler(o)})})}};function ut(){return window}function h1(t){ut().location.href=t}function Mp(){return typeof ut().WorkerGlobalScope<"u"&&typeof ut().importScripts=="function"}function f1(){return f(this,null,function*(){if(!navigator?.serviceWorker)return null;try{return(yield navigator.serviceWorker.ready).active}catch{return null}})}function p1(){var t;return((t=navigator?.serviceWorker)===null||t===void 0?void 0:t.controller)||null}function g1(){return Mp()?self:null}var Np="firebaseLocalStorageDb",m1=1,_o="firebaseLocalStorage",kp="fbase_key",On=class{constructor(e){this.request=e}toPromise(){return new Promise((e,i)=>{this.request.addEventListener("success",()=>{e(this.request.result)}),this.request.addEventListener("error",()=>{i(this.request.error)})})}};function Do(t,e){return t.transaction([_o],e?"readwrite":"readonly").objectStore(_o)}function _1(){let t=indexedDB.deleteDatabase(Np);return new On(t).toPromise()}function Dl(){let t=indexedDB.open(Np,m1);return new Promise((e,i)=>{t.addEventListener("error",()=>{i(t.error)}),t.addEventListener("upgradeneeded",()=>{let n=t.result;try{n.createObjectStore(_o,{keyPath:kp})}catch(r){i(r)}}),t.addEventListener("success",()=>f(this,null,function*(){let n=t.result;n.objectStoreNames.contains(_o)?e(n):(n.close(),yield _1(),e(yield Dl()))}))})}function sp(t,e,i){return f(this,null,function*(){let n=Do(t,!0).put({[kp]:e,value:i});return new On(n).toPromise()})}function v1(t,e){return f(this,null,function*(){let i=Do(t,!1).get(e),n=yield new On(i).toPromise();return n===void 0?null:n.value})}function op(t,e){let i=Do(t,!0).delete(e);return new On(i).toPromise()}var y1=800,b1=3,w1=(()=>{class t{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 f(this,null,function*(){return this.db?this.db:(this.db=yield Dl(),this.db)})}_withRetries(i){return f(this,null,function*(){let n=0;for(;;)try{let r=yield this._openDb();return yield i(r)}catch(r){if(n++>b1)throw r;this.db&&(this.db.close(),this.db=void 0)}})}initializeServiceWorkerMessaging(){return f(this,null,function*(){return Mp()?this.initializeReceiver():this.initializeSender()})}initializeReceiver(){return f(this,null,function*(){this.receiver=d1._getInstance(g1()),this.receiver._subscribe("keyChanged",(i,n)=>f(this,null,function*(){return{keyProcessed:(yield this._poll()).includes(n.key)}})),this.receiver._subscribe("ping",(i,n)=>f(this,null,function*(){return["keyChanged"]}))})}initializeSender(){return f(this,null,function*(){var i,n;if(this.activeServiceWorker=yield f1(),!this.activeServiceWorker)return;this.sender=new wl(this.activeServiceWorker);let r=yield this.sender._send("ping",{},800);r&&!((i=r[0])===null||i===void 0)&&i.fulfilled&&!((n=r[0])===null||n===void 0)&&n.value.includes("keyChanged")&&(this.serviceWorkerReceiverAvailable=!0)})}notifyServiceWorker(i){return f(this,null,function*(){if(!(!this.sender||!this.activeServiceWorker||p1()!==this.activeServiceWorker))try{yield this.sender._send("keyChanged",{key:i},this.serviceWorkerReceiverAvailable?800:50)}catch{}})}_isAvailable(){return f(this,null,function*(){try{if(!indexedDB)return!1;let i=yield Dl();return yield sp(i,go,"1"),yield op(i,go),!0}catch{}return!1})}_withPendingWrite(i){return f(this,null,function*(){this.pendingWrites++;try{yield i()}finally{this.pendingWrites--}})}_set(i,n){return f(this,null,function*(){return this._withPendingWrite(()=>f(this,null,function*(){return yield this._withRetries(r=>sp(r,i,n)),this.localCache[i]=n,this.notifyServiceWorker(i)}))})}_get(i){return f(this,null,function*(){let n=yield this._withRetries(r=>v1(r,i));return this.localCache[i]=n,n})}_remove(i){return f(this,null,function*(){return this._withPendingWrite(()=>f(this,null,function*(){return yield this._withRetries(n=>op(n,i)),delete this.localCache[i],this.notifyServiceWorker(i)}))})}_poll(){return f(this,null,function*(){let i=yield this._withRetries(s=>{let o=Do(s,!1).getAll();return new On(o).toPromise()});if(!i)return[];if(this.pendingWrites!==0)return[];let n=[],r=new Set;if(i.length!==0)for(let{fbase_key:s,value:o}of i)r.add(s),JSON.stringify(this.localCache[s])!==JSON.stringify(o)&&(this.notifyListeners(s,o),n.push(s));for(let s of Object.keys(this.localCache))this.localCache[s]&&!r.has(s)&&(this.notifyListeners(s,null),n.push(s));return n})}notifyListeners(i,n){this.localCache[i]=n;let r=this.listeners[i];if(r)for(let s of Array.from(r))s(n)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>f(this,null,function*(){return this._poll()}),y1)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(i,n){Object.keys(this.listeners).length===0&&this.startPolling(),this.listeners[i]||(this.listeners[i]=new Set,this._get(i)),this.listeners[i].add(n)}_removeListener(i,n){this.listeners[i]&&(this.listeners[i].delete(n),this.listeners[i].size===0&&delete this.listeners[i]),Object.keys(this.listeners).length===0&&this.stopPolling()}}return t.type="LOCAL",t})(),xp=w1;var _R=Ap("rcb"),vR=new An(3e4,6e4);function Fp(t,e){return e?Ot(e):(C(t._popupRedirectResolver,t,"argument-error"),t._popupRedirectResolver)}var Ir=class extends Er{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return pi(e,this._buildIdpRequest())}_linkToIdToken(e,i){return pi(e,this._buildIdpRequest(i))}_getReauthenticationResolver(e){return pi(e,this._buildIdpRequest())}_buildIdpRequest(e){let i={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 e&&(i.idToken=e),i}};function D1(t){return r1(t.auth,new Ir(t),t.bypassAuthState)}function E1(t){let{auth:e,user:i}=t;return C(i,e,"internal-error"),i1(i,new Ir(t),t.bypassAuthState)}function T1(t){return f(this,null,function*(){let{auth:e,user:i}=t;return C(i,e,"internal-error"),n1(i,new Ir(t),t.bypassAuthState)})}var vo=class{constructor(e,i,n,r,s=!1){this.auth=e,this.resolver=n,this.user=r,this.bypassAuthState=s,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(i)?i:[i]}execute(){return new Promise((e,i)=>f(this,null,function*(){this.pendingPromise={resolve:e,reject:i};try{this.eventManager=yield this.resolver._initialize(this.auth),yield this.onExecution(),this.eventManager.registerConsumer(this)}catch(n){this.reject(n)}}))}onAuthEvent(e){return f(this,null,function*(){let{urlResponse:i,sessionId:n,postBody:r,tenantId:s,error:o,type:a}=e;if(o){this.reject(o);return}let c={auth:this.auth,requestUri:i,sessionId:n,tenantId:s||void 0,postBody:r||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(yield this.getIdpTask(a)(c))}catch(l){this.reject(l)}})}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return D1;case"linkViaPopup":case"linkViaRedirect":return T1;case"reauthViaPopup":case"reauthViaRedirect":return E1;default:dt(this.auth,"internal-error")}}resolve(e){Rt(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){Rt(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}};var C1=new An(2e3,1e4);function jl(t,e,i){return f(this,null,function*(){if(lt(t.app))return Promise.reject(Ze(t,"operation-not-supported-in-this-environment"));let n=wo(t);Pb(t,e,Tr);let r=Fp(n,i);return new I1(n,"signInViaPopup",e,r).executeNotNull()})}var I1=(()=>{class t extends vo{constructor(i,n,r,s,o){super(i,n,s,o),this.provider=r,this.authWindow=null,this.pollId=null,t.currentPopupAction&&t.currentPopupAction.cancel(),t.currentPopupAction=this}executeNotNull(){return f(this,null,function*(){let i=yield this.execute();return C(i,this.auth,"internal-error"),i})}onExecution(){return f(this,null,function*(){Rt(this.filter.length===1,"Popup operations only handle one event");let i=Ul();this.authWindow=yield this.resolver._openPopup(this.auth,this.provider,this.filter[0],i),this.authWindow.associatedEvent=i,this.resolver._originValidation(this.auth).catch(n=>{this.reject(n)}),this.resolver._isIframeWebStorageSupported(this.auth,n=>{n||this.reject(Ze(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()})}get eventId(){var i;return((i=this.authWindow)===null||i===void 0?void 0:i.associatedEvent)||null}cancel(){this.reject(Ze(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,t.currentPopupAction=null}pollUserCancellation(){let i=()=>{var n,r;if(!((r=(n=this.authWindow)===null||n===void 0?void 0:n.window)===null||r===void 0)&&r.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(Ze(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(i,C1.get())};i()}}t.currentPopupAction=null;return t})(),S1="pendingRedirect",so=new Map,El=class t extends vo{constructor(e,i,n=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],i,void 0,n),this.eventId=null}execute(){return f(this,null,function*(){let e=so.get(this.auth._key());if(!e){try{let n=(yield A1(this.resolver,this.auth))?yield on(t.prototype,this,"execute").call(this):null;e=()=>Promise.resolve(n)}catch(i){e=()=>Promise.reject(i)}so.set(this.auth._key(),e)}return this.bypassAuthState||so.set(this.auth._key(),()=>Promise.resolve(null)),e()})}onAuthEvent(e){return f(this,null,function*(){if(e.type==="signInViaRedirect")return on(t.prototype,this,"onAuthEvent").call(this,e);if(e.type==="unknown"){this.resolve(null);return}if(e.eventId){let i=yield this.auth._redirectUserForId(e.eventId);if(i)return this.user=i,on(t.prototype,this,"onAuthEvent").call(this,e);this.resolve(null)}})}onExecution(){return f(this,null,function*(){})}cleanUp(){}};function A1(t,e){return f(this,null,function*(){let i=P1(e),n=R1(t);if(!(yield n._isAvailable()))return!1;let r=(yield n._get(i))==="true";return yield n._remove(i),r})}function O1(t,e){so.set(t._key(),e)}function R1(t){return Ot(t._redirectPersistence)}function P1(t){return ro(S1,t.config.apiKey,t.name)}function M1(t,e,i=!1){return f(this,null,function*(){if(lt(t.app))return Promise.reject(Sn(t));let n=wo(t),r=Fp(n,e),o=yield new El(n,r,i).execute();return o&&!i&&(delete o.user._redirectEventId,yield n._persistUserIfCurrent(o.user),yield n._setRedirectUser(null,e)),o})}var N1=10*60*1e3,Tl=class{constructor(e){this.auth=e,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(e){this.consumers.add(e),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,e)&&(this.sendToConsumer(this.queuedRedirectEvent,e),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(e){this.consumers.delete(e)}onEvent(e){if(this.hasEventBeenHandled(e))return!1;let i=!1;return this.consumers.forEach(n=>{this.isEventForConsumer(e,n)&&(i=!0,this.sendToConsumer(e,n),this.saveEventToCache(e))}),this.hasHandledPotentialRedirect||!k1(e)||(this.hasHandledPotentialRedirect=!0,i||(this.queuedRedirectEvent=e,i=!0)),i}sendToConsumer(e,i){var n;if(e.error&&!Lp(e)){let r=((n=e.error.code)===null||n===void 0?void 0:n.split("auth/")[1])||"internal-error";i.onError(Ze(this.auth,r))}else i.onAuthEvent(e)}isEventForConsumer(e,i){let n=i.eventId===null||!!e.eventId&&e.eventId===i.eventId;return i.filter.includes(e.type)&&n}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=N1&&this.cachedEventUids.clear(),this.cachedEventUids.has(ap(e))}saveEventToCache(e){this.cachedEventUids.add(ap(e)),this.lastProcessedEventTime=Date.now()}};function ap(t){return[t.type,t.eventId,t.sessionId,t.tenantId].filter(e=>e).join("-")}function Lp({type:t,error:e}){return t==="unknown"&&e?.code==="auth/no-auth-event"}function k1(t){switch(t.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return Lp(t);default:return!1}}function x1(i){return f(this,arguments,function*(t,e={}){return mi(t,"GET","/v1/projects",e)})}var F1=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,L1=/^https?/;function B1(t){return f(this,null,function*(){if(t.config.emulator)return;let{authorizedDomains:e}=yield x1(t);for(let i of e)try{if(V1(i))return}catch{}dt(t,"unauthorized-domain")})}function V1(t){let e=fl(),{protocol:i,hostname:n}=new URL(e);if(t.startsWith("chrome-extension://")){let o=new URL(t);return o.hostname===""&&n===""?i==="chrome-extension:"&&t.replace("chrome-extension://","")===e.replace("chrome-extension://",""):i==="chrome-extension:"&&o.hostname===n}if(!L1.test(i))return!1;if(F1.test(t))return n===t;let r=t.replace(/\./g,"\\.");return new RegExp("^(.+\\."+r+"|"+r+")$","i").test(n)}var U1=new An(3e4,6e4);function cp(){let t=ut().___jsl;if(t?.H){for(let e of Object.keys(t.H))if(t.H[e].r=t.H[e].r||[],t.H[e].L=t.H[e].L||[],t.H[e].r=[...t.H[e].L],t.CP)for(let i=0;i<t.CP.length;i++)t.CP[i]=null}}function j1(t){return new Promise((e,i)=>{var n,r,s;function o(){cp(),gapi.load("gapi.iframes",{callback:()=>{e(gapi.iframes.getContext())},ontimeout:()=>{cp(),i(Ze(t,"network-request-failed"))},timeout:U1.get()})}if(!((r=(n=ut().gapi)===null||n===void 0?void 0:n.iframes)===null||r===void 0)&&r.Iframe)e(gapi.iframes.getContext());else if(!((s=ut().gapi)===null||s===void 0)&&s.load)o();else{let a=Ap("iframefcb");return ut()[a]=()=>{gapi.load?o():i(Ze(t,"network-request-failed"))},Yb(`${Qb()}?onload=${a}`).catch(c=>i(c))}}).catch(e=>{throw oo=null,e})}var oo=null;function $1(t){return oo=oo||j1(t),oo}var H1=new An(5e3,15e3),G1="__/auth/iframe",z1="emulator/auth/iframe",W1={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},q1=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function J1(t){let e=t.config;C(e.authDomain,t,"auth-domain-config-required");let i=e.emulator?Ol(e,z1):`https://${t.config.authDomain}/${G1}`,n={apiKey:e.apiKey,appName:t.name,v:di},r=q1.get(t.config.apiHost);r&&(n.eid=r);let s=t._getFrameworks();return s.length&&(n.fw=s.join(",")),`${i}?${ci(n).slice(1)}`}function K1(t){return f(this,null,function*(){let e=yield $1(t),i=ut().gapi;return C(i,t,"internal-error"),e.open({where:document.body,url:J1(t),messageHandlersFilter:i.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:W1,dontclear:!0},n=>new Promise((r,s)=>f(this,null,function*(){yield n.restyle({setHideOnLeave:!1});let o=Ze(t,"network-request-failed"),a=ut().setTimeout(()=>{s(o)},H1.get());function c(){ut().clearTimeout(a),r(n)}n.ping(c).then(c,()=>{s(o)})})))})}var Y1={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},Q1=500,Z1=600,X1="_blank",ew="http://localhost",yo=class{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}};function tw(t,e,i,n=Q1,r=Z1){let s=Math.max((window.screen.availHeight-r)/2,0).toString(),o=Math.max((window.screen.availWidth-n)/2,0).toString(),a="",c=Object.assign(Object.assign({},Y1),{width:n.toString(),height:r.toString(),top:s,left:o}),l=de().toLowerCase();i&&(a=wp(l)?X1:i),bp(l)&&(e=e||ew,c.scrollbars="yes");let u=Object.entries(c).reduce((d,[g,v])=>`${d}${g}=${v},`,"");if(Gb(l)&&a!=="_self")return nw(e||"",a),new yo(null);let h=window.open(e||"",a,u);C(h,t,"popup-blocked");try{h.focus()}catch{}return new yo(h)}function nw(t,e){let i=document.createElement("a");i.href=t,i.target=e;let n=document.createEvent("MouseEvent");n.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),i.dispatchEvent(n)}var iw="__/auth/handler",rw="emulator/auth/handler",sw=encodeURIComponent("fac");function lp(t,e,i,n,r,s){return f(this,null,function*(){C(t.config.authDomain,t,"auth-domain-config-required"),C(t.config.apiKey,t,"invalid-api-key");let o={apiKey:t.config.apiKey,appName:t.name,authType:i,redirectUrl:n,v:di,eventId:r};if(e instanceof Tr){e.setDefaultLanguage(t.languageCode),o.providerId=e.providerId||"",Ff(e.getCustomParameters())||(o.customParameters=JSON.stringify(e.getCustomParameters()));for(let[u,h]of Object.entries(s||{}))o[u]=h}if(e instanceof po){let u=e.getScopes().filter(h=>h!=="");u.length>0&&(o.scopes=u.join(","))}t.tenantId&&(o.tid=t.tenantId);let a=o;for(let u of Object.keys(a))a[u]===void 0&&delete a[u];let c=yield t._getAppCheckToken(),l=c?`#${sw}=${encodeURIComponent(c)}`:"";return`${ow(t)}?${ci(a).slice(1)}${l}`})}function ow({config:t}){return t.emulator?Ol(t,rw):`https://${t.authDomain}/${iw}`}var hl="webStorageSupport",Cl=class{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=Vl,this._completeRedirectFn=M1,this._overrideRedirectResult=O1}_openPopup(e,i,n,r){return f(this,null,function*(){var s;Rt((s=this.eventManagers[e._key()])===null||s===void 0?void 0:s.manager,"_initialize() not called before _openPopup()");let o=yield lp(e,i,n,fl(),r);return tw(e,o,Ul())})}_openRedirect(e,i,n,r){return f(this,null,function*(){yield this._originValidation(e);let s=yield lp(e,i,n,fl(),r);return h1(s),new Promise(()=>{})})}_initialize(e){let i=e._key();if(this.eventManagers[i]){let{manager:r,promise:s}=this.eventManagers[i];return r?Promise.resolve(r):(Rt(s,"If manager is not set, promise should be"),s)}let n=this.initAndGetManager(e);return this.eventManagers[i]={promise:n},n.catch(()=>{delete this.eventManagers[i]}),n}initAndGetManager(e){return f(this,null,function*(){let i=yield K1(e),n=new Tl(e);return i.register("authEvent",r=>(C(r?.authEvent,e,"invalid-auth-event"),{status:n.onEvent(r.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:n},this.iframes[e._key()]=i,n})}_isIframeWebStorageSupported(e,i){this.iframes[e._key()].send(hl,{type:hl},r=>{var s;let o=(s=r?.[0])===null||s===void 0?void 0:s[hl];o!==void 0&&i(!!o),dt(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){let i=e._key();return this.originValidationPromises[i]||(this.originValidationPromises[i]=B1(e)),this.originValidationPromises[i]}get _shouldInitProactively(){return Ip()||kl()||bo()}},Bp=Cl;var up="@firebase/auth",dp="1.7.5";var Il=class{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var e;return this.assertAuthConfigured(),((e=this.auth.currentUser)===null||e===void 0?void 0:e.uid)||null}getToken(e){return f(this,null,function*(){return this.assertAuthConfigured(),yield this.auth._initializationPromise,this.auth.currentUser?{accessToken:yield this.auth.currentUser.getIdToken(e)}:null})}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;let i=this.auth.onIdTokenChanged(n=>{e(n?.stsTokenManager.accessToken||null)});this.internalListeners.set(e,i),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();let i=this.internalListeners.get(e);i&&(this.internalListeners.delete(e),i(),this.updateProactiveRefresh())}assertAuthConfigured(){C(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}};function aw(t){switch(t){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}function cw(t){ui(new at("auth",(e,{options:i})=>{let n=e.getProvider("app").getImmediate(),r=e.getProvider("heartbeat"),s=e.getProvider("app-check-internal"),{apiKey:o,authDomain:a}=n.options;C(o&&!o.includes(":"),"invalid-api-key",{appName:n.name});let c={apiKey:o,authDomain:a,clientPlatform:t,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:Sp(t)},l=new yl(n,r,s,c);return Zb(l,i),l},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,i,n)=>{e.getProvider("auth-internal").initialize()})),ui(new at("auth-internal",e=>{let i=wo(e.getProvider("auth").getImmediate());return(n=>new Il(n))(i)},"PRIVATE").setInstantiationMode("EXPLICIT")),Ie(up,dp,aw(t)),Ie(up,dp,"esm2017")}var lw=5*60,uw=zc("authIdTokenMaxAge")||lw,hp=null,dw=t=>e=>f(void 0,null,function*(){let i=e&&(yield e.getIdTokenResult()),n=i&&(new Date().getTime()-Date.parse(i.issuedAtTime))/1e3;if(n&&n>uw)return;let r=i?.token;hp!==r&&(hp=r,yield fetch(t,{method:r?"POST":"DELETE",headers:r?{Authorization:`Bearer ${r}`}:{}}))});function $l(t=Ys()){let e=ol(t,"auth");if(e.isInitialized())return e.getImmediate();let i=Fl(t,{popupRedirectResolver:Bp,persistence:[xp,Pp,Vl]}),n=zc("authTokenSyncURL");if(n&&typeof isSecureContext=="boolean"&&isSecureContext){let s=new URL(n,location.origin);if(location.origin===s.origin){let o=dw(s.toString());Bl(i,o,()=>o(i.currentUser)),Ar(i,a=>o(a))}}let r=Of("auth");return r&&Ll(i,`http://${r}`),i}function hw(){var t,e;return(e=(t=document.getElementsByTagName("head"))===null||t===void 0?void 0:t[0])!==null&&e!==void 0?e:document}Kb({loadJS(t){return new Promise((e,i)=>{let n=document.createElement("script");n.setAttribute("src",t),n.onload=e,n.onerror=r=>{let s=Ze("internal-error");s.customData=r,i(s)},n.type="text/javascript",n.charset="UTF-8",hw().appendChild(n)})},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="});cw("Browser");function jp(t){return new Pe(function(e){var i=Ar(t,e.next.bind(e),e.error.bind(e),e.complete.bind(e));return{unsubscribe:i}})}var $p="auth",Rn=class{constructor(e){return e}},Hl=class{constructor(){return ll($p)}};var Gl=new O("angularfire2.auth-instances");function iD(t,e){let i=Zf($p,t,e);return i&&new Rn(i)}function rD(t){return(e,i)=>{let n=e.runOutsideAngular(()=>t(i));return new Rn(n)}}var sD={provide:Hl,deps:[[new et,Gl]]},oD={provide:Rn,useFactory:iD,deps:[[new et,Gl],In]};function cP(t,...e){return Ie("angularfire",_r.full,"auth"),He([oD,sD,{provide:Gl,useFactory:rD(t),multi:!0,deps:[H,ne,eo,vr,[new et,Zs],...e]}])}var Hp=fi(jp,!0);var lP=fi($l,!0);var Gp=fi(jl,!0);var Pn=class extends Error{};Pn.prototype.name="InvalidTokenError";function aD(t){return decodeURIComponent(atob(t).replace(/(.)/g,(e,i)=>{let n=i.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}function cD(t){let e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return aD(e)}catch{return atob(e)}}function zl(t,e){if(typeof t!="string")throw new Pn("Invalid token specified: must be a string");e||(e={});let i=e.header===!0?0:1,n=t.split(".")[i];if(typeof n!="string")throw new Pn(`Invalid token specified: missing part #${i+1}`);let r;try{r=cD(n)}catch(s){throw new Pn(`Invalid token specified: invalid base64 for part #${i+1} (${s.message})`)}try{return JSON.parse(r)}catch(s){throw new Pn(`Invalid token specified: invalid json for part #${i+1} (${s.message})`)}}var wP=(()=>{let e=class e{constructor(){this.httpService=p(Cf),this._roles=new me([]),this.route=p(Et),this.router=p(ot),this.auth=p(Rn),this.provider=new Sr,this.user$=Hp(this.auth),this.destroy=new F,this.automateLogon()}login(n){return this.httpService.post("api/Token/Login",n).pipe(V(r=>this.storeLoginResponse(r)),V(r=>this.decodeRoles(r)),V(()=>this.storeFormLogin(n)),_u(1))}storeLoginResponse(n){localStorage.setItem("Token",n.access_token),localStorage.setItem("ExpireDate",n.expiredAt),localStorage.setItem("TokenType",n.token_type)}storeFormLogin(n){localStorage.setItem("Domain",n.Host),localStorage.setItem("Username",n.Username)}decodeRoles(n){let r=zl(n.access_token);localStorage.setItem("Brand",r.Brand);let s=r["http://schemas.microsoft.com/ws/2008/06/identity/claims/role"];return this._roles.next(s),this.storeRoles(),s}storeRoles(){localStorage.setItem("Roles",JSON.stringify(this._roles.value))}isTokenExpired(){let n=localStorage.getItem("Token");try{let r=zl(n),s=Math.floor(Date.now()/1e3);return r.exp?r.exp<s:!1}catch{return!0}}isAuthenticated(){return localStorage.getItem("Token")!==null&&!this.isTokenExpired()}getAuthToken(){return localStorage.getItem("Token")??""}getAuthTokenType(){return localStorage.getItem("TokenType")??""}redirectUrl(){return Y(this.router.navigate(["/pages"]))}automateLogon(){return f(this,null,function*(){return this.isAuthenticated()?yield this.router.navigate(["/pages"]):yield this.router.navigate([""])})}getDomain(){return localStorage.getItem("Domain")!==null?localStorage.getItem("Domain"):""}logout(){return f(this,null,function*(){let n=["ExpireDate","Token","TokenType","Roles"];for(let r of n)localStorage.removeItem(r);yield this.router.navigate([""])})}signInWithPopup(n){return Y(Gp(this.auth,new Sr)).pipe(ae(r=>{let s=Sr.credentialFromResult(r),o={Host:n,IDToken:s?.idToken};return this.httpService.post("api/token/LoginWithSocialProvider",o).pipe(I(a=>a),V(a=>this.storeLoginResponse(a)),V(a=>this.decodeRoles(a)),_e(a=>D(null)))}),_e(r=>D(null)))}ngOnDestroy(){this.destroy.next(),this.destroy.complete()}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=w({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();export{yt as a,Pi as b,ra as c,ug as d,TD as e,CD as f,ID as g,gd as h,KD as i,Dd as j,ha as k,Et as l,ym as m,ot as n,mE as o,_E as p,bE as q,Ts as r,n0 as s,kE as t,Ns as u,o0 as v,Oh as w,vh as x,eT as y,tT as z,Rs as A,cr as B,k0 as C,iT as D,F0 as E,B0 as F,rT as G,sT as H,oT as I,Ls as J,V0 as K,pf as L,KA as M,xv as N,YA as O,QA as P,oi as Q,bf as R,ZA as S,Ef as T,rO as U,ny as V,sO as W,Tf as X,Ws as Y,oO as Z,aO as _,cO as $,Cf as aa,oR as ba,aR as ca,cP as da,lP as ea,zl as fa,wP as ga};
|