dealposbarcode 25.50.0 → 26.1.0

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.
Files changed (49) hide show
  1. package/assets/scss/style.scss +28 -3
  2. package/chunk-5BDSDZBJ.js +1 -0
  3. package/chunk-66XEEZ6W.js +194 -0
  4. package/chunk-6RPDTK47.js +1 -0
  5. package/chunk-7PT4SS5X.js +1127 -0
  6. package/chunk-7RSU6VFI.js +1 -0
  7. package/chunk-CQL43DMM.js +1 -0
  8. package/chunk-F55DH2GX.js +27 -0
  9. package/chunk-HRRVAKK6.js +2 -0
  10. package/chunk-IKSROKD5.css +1 -0
  11. package/chunk-JCQ56J6G.js +4 -0
  12. package/chunk-JMQFG4UA.js +1 -0
  13. package/chunk-Q4SH5RTJ.js +1848 -0
  14. package/chunk-SMR7YI5J.js +1 -0
  15. package/{chunk-UBR4JEV7.js → chunk-VMNBWQIP.js} +1 -1
  16. package/chunk-Z3B3WOTF.js +18 -0
  17. package/index.html +3 -3
  18. package/main-4BFS7RVV.css +1 -0
  19. package/main-5MCDZ3FK.js +248 -0
  20. package/ngsw-worker.js +469 -70
  21. package/ngsw.json +40 -52
  22. package/package.json +1 -1
  23. package/polyfills-DHHU6LMO.js +2 -0
  24. package/styles-XWKQSHJN.css +1 -0
  25. package/chunk-377TROCD.js +0 -1
  26. package/chunk-4CITKGGL.js +0 -1
  27. package/chunk-7V3KH6IR.js +0 -394
  28. package/chunk-CARY4E7O.js +0 -1
  29. package/chunk-D67JO2HG.css +0 -1
  30. package/chunk-G2JXUY7S.js +0 -2
  31. package/chunk-G4LJCV6B.js +0 -1
  32. package/chunk-HHB3BUIC.js +0 -1
  33. package/chunk-I535BP2A.js +0 -1
  34. package/chunk-JYD2NJXU.js +0 -1
  35. package/chunk-L2JD4R6O.js +0 -1
  36. package/chunk-LTVGOJEF.js +0 -2
  37. package/chunk-RH3ZV23S.js +0 -4
  38. package/chunk-SCXFN4EA.js +0 -1
  39. package/chunk-UE2JJIFL.js +0 -7
  40. package/chunk-WBD3XQRN.js +0 -1
  41. package/chunk-X4PZGB4F.js +0 -2
  42. package/main-J35CSAIS.css +0 -1
  43. package/main-SNJDWW52.js +0 -605
  44. package/media/data-table-2IZ2Q4SK.woff +0 -0
  45. package/media/data-table-AKMZFM4M.svg +0 -26
  46. package/media/data-table-DGQ4LQQR.eot +0 -0
  47. package/media/data-table-J6MZE774.ttf +0 -0
  48. package/polyfills-Q6W4YVDR.js +0 -2
  49. package/styles-7YJ7GGGE.css +0 -1
package/chunk-RH3ZV23S.js DELETED
@@ -1,4 +0,0 @@
1
- import{c as _a,d as Ms,g as _n,h as vn,j as Rs}from"./chunk-CARY4E7O.js";import{c as ha,d as pa,k as fa,l as ma,n as ga}from"./chunk-LTVGOJEF.js";import{$b as ea,$c as Qt,A as ys,Aa as ie,Ab as w,B as wi,C as _t,Ca as Ze,Cb as Cs,D as Go,Da as m,Dc as Ue,Ea as yt,Eb as Zo,Ec as Ct,G as Wo,Gb as fn,H as Wt,Ha as bt,Hb as Xo,I as Oe,Ia as Me,Ja as I,Kb as De,La as zt,Mb as he,Nb as Is,O as zo,Oa as ws,Oc as As,P as re,Pc as ca,Q as qo,Qa as Ds,Ra as wt,Rb as Dt,Rc as la,Sa as hn,Ta as pn,U as vt,Ua as Ei,Ub as pe,Uc as Kt,Vb as X,W as bs,Wa as Z,Wb as qt,X as ln,Xa as Ti,Xb as H,Xc as Yt,Yb as ae,Z as Le,Za as L,Zc as da,_a as ne,a as b,ad as Ee,b as B,bb as oe,bc as ta,bd as ua,ca as Qe,cc as ia,cd as gn,dc as na,ea as Jo,ec as ce,ed as Os,f as gt,fc as fe,g as d,ga as Ko,gb as Es,gc as Jt,hc as Ci,hd as He,ic as Ii,kc as mn,lc as Et,mc as sa,n as Be,nc as le,oa as Yo,oc as J,pc as ra,q as R,qc as oa,qd as Ps,r as _s,ra as dn,s as Uo,sa as G,sb as Qo,sc as Tt,ta as we,tb as Ts,tc as aa,u as Ho,ua as un,uc as Xe,v as $o,va as Di,vc as et,wa as Ve,x as jo,xa as N,xc as me,y as cn,ya as Pe,yc as Ss,z as vs,zb as x,zc as tt}from"./chunk-UE2JJIFL.js";function yn(i){i||(Ds(yn),i=m(Ti));let t=new Be(e=>i.onDestroy(e.next.bind(e)));return e=>e.pipe(G(t))}function ed(i,t){!t?.injector&&Ds(ed);let e=t?.injector??m(Z),n=new Uo(1),s=ua(()=>{let r;try{r=i()}catch(o){Ee(()=>n.error(o));return}Ee(()=>n.next(r))},{injector:e,manualCleanup:!0});return e.get(Ti).onDestroy(()=>{s.destroy(),n.complete()}),n.asObservable()}var Sa=(()=>{class i{constructor(e,n){this._renderer=e,this._elementRef=n,this.onChange=s=>{},this.onTouched=()=>{}}setProperty(e,n){this._renderer.setProperty(this._elementRef.nativeElement,e,n)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static{this.\u0275fac=function(n){return new(n||i)(w(fn),w(oe))}}static{this.\u0275dir=I({type:i})}}return i})(),Vs=(()=>{class i extends Sa{static{this.\u0275fac=(()=>{let e;return function(s){return(e||(e=Ei(i)))(s||i)}})()}static{this.\u0275dir=I({type:i,features:[he]})}}return i})(),Ni=new ie(""),td={provide:Ni,useExisting:Ve(()=>id),multi:!0},id=(()=>{class i extends Vs{writeValue(e){this.setProperty("checked",e)}static{this.\u0275fac=(()=>{let e;return function(s){return(e||(e=Ei(i)))(s||i)}})()}static{this.\u0275dir=I({type:i,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(n,s){n&1&&le("change",function(o){return s.onChange(o.target.checked)})("blur",function(){return s.onTouched()})},features:[Ue([td]),he]})}}return i})(),nd={provide:Ni,useExisting:Ve(()=>Aa),multi:!0};function sd(){let i=Os()?Os().getUserAgent():"";return/android (\d+)/.test(i.toLowerCase())}var rd=new ie(""),Aa=(()=>{class i extends Sa{constructor(e,n,s){super(e,n),this._compositionMode=s,this._composing=!1,this._compositionMode==null&&(this._compositionMode=!sd())}writeValue(e){let n=e??"";this.setProperty("value",n)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static{this.\u0275fac=function(n){return new(n||i)(w(fn),w(oe),w(rd,8))}}static{this.\u0275dir=I({type:i,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(n,s){n&1&&le("input",function(o){return s._handleInput(o.target.value)})("blur",function(){return s.onTouched()})("compositionstart",function(){return s._compositionStart()})("compositionend",function(o){return s._compositionEnd(o.target.value)})},features:[Ue([nd]),he]})}}return i})();function it(i){return i==null||(typeof i=="string"||Array.isArray(i))&&i.length===0}function Oa(i){return i!=null&&typeof i.length=="number"}var Us=new ie(""),Hs=new ie(""),od=/^(?=.{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])?)*$/,va=class{static min(t){return ad(t)}static max(t){return cd(t)}static required(t){return ld(t)}static requiredTrue(t){return dd(t)}static email(t){return ud(t)}static minLength(t){return hd(t)}static maxLength(t){return pd(t)}static pattern(t){return fd(t)}static nullValidator(t){return Pa(t)}static compose(t){return Fa(t)}static composeAsync(t){return La(t)}};function ad(i){return t=>{if(it(t.value)||it(i))return null;let e=parseFloat(t.value);return!isNaN(e)&&e<i?{min:{min:i,actual:t.value}}:null}}function cd(i){return t=>{if(it(t.value)||it(i))return null;let e=parseFloat(t.value);return!isNaN(e)&&e>i?{max:{max:i,actual:t.value}}:null}}function ld(i){return it(i.value)?{required:!0}:null}function dd(i){return i.value===!0?null:{required:!0}}function ud(i){return it(i.value)||od.test(i.value)?null:{email:!0}}function hd(i){return t=>it(t.value)||!Oa(t.value)?null:t.value.length<i?{minlength:{requiredLength:i,actualLength:t.value.length}}:null}function pd(i){return t=>Oa(t.value)&&t.value.length>i?{maxlength:{requiredLength:i,actualLength:t.value.length}}:null}function fd(i){if(!i)return Pa;let t,e;return typeof i=="string"?(e="",i.charAt(0)!=="^"&&(e+="^"),e+=i,i.charAt(i.length-1)!=="$"&&(e+="$"),t=new RegExp(e)):(e=i.toString(),t=i),n=>{if(it(n.value))return null;let s=n.value;return t.test(s)?null:{pattern:{requiredPattern:e,actualValue:s}}}}function Pa(i){return null}function Ma(i){return i!=null}function Ra(i){return la(i)?wi(i):i}function Na(i){let t={};return i.forEach(e=>{t=e!=null?b(b({},t),e):t}),Object.keys(t).length===0?null:t}function ka(i,t){return t.map(e=>e(i))}function md(i){return!i.validate}function xa(i){return i.map(t=>md(t)?t:e=>t.validate(e))}function Fa(i){if(!i)return null;let t=i.filter(Ma);return t.length==0?null:function(e){return Na(ka(e,t))}}function Ba(i){return i!=null?Fa(xa(i)):null}function La(i){if(!i)return null;let t=i.filter(Ma);return t.length==0?null:function(e){let n=ka(e,t).map(Ra);return zo(n).pipe(Oe(Na))}}function Va(i){return i!=null?La(xa(i)):null}function ya(i,t){return i===null?[t]:Array.isArray(i)?[...i,t]:[i,t]}function Ua(i){return i._rawValidators}function Ha(i){return i._rawAsyncValidators}function Ns(i){return i?Array.isArray(i)?i:[i]:[]}function wn(i,t){return Array.isArray(i)?i.includes(t):i===t}function ba(i,t){let e=Ns(t);return Ns(i).forEach(s=>{wn(e,s)||e.push(s)}),e}function wa(i,t){return Ns(t).filter(e=>!wn(i,e))}var Dn=class{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=Ba(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=Va(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t=void 0){this.control&&this.control.reset(t)}hasError(t,e){return this.control?this.control.hasError(t,e):!1}getError(t,e){return this.control?this.control.getError(t,e):null}},It=class extends Dn{get formDirective(){return null}get path(){return null}},nt=class extends Dn{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}},En=class{constructor(t){this._cd=t}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},gd={"[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"},Wg=B(b({},gd),{"[class.ng-submitted]":"isSubmitted"}),zg=(()=>{class i extends En{constructor(e){super(e)}static{this.\u0275fac=function(n){return new(n||i)(w(nt,2))}}static{this.\u0275dir=I({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(n,s){n&2&&H("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:[he]})}}return i})(),qg=(()=>{class i extends En{constructor(e){super(e)}static{this.\u0275fac=function(n){return new(n||i)(w(It,10))}}static{this.\u0275dir=I({type:i,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(n,s){n&2&&H("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:[he]})}}return i})();var Si="VALID",bn="INVALID",Zt="PENDING",Ai="DISABLED",st=class{},Tn=class extends st{constructor(t,e){super(),this.value=t,this.source=e}},Oi=class extends st{constructor(t,e){super(),this.pristine=t,this.source=e}},Pi=class extends st{constructor(t,e){super(),this.touched=t,this.source=e}},Xt=class extends st{constructor(t,e){super(),this.status=t,this.source=e}},ks=class extends st{constructor(t){super(),this.source=t}},xs=class extends st{constructor(t){super(),this.source=t}};function $s(i){return(An(i)?i.validators:i)||null}function _d(i){return Array.isArray(i)?Ba(i):i||null}function js(i,t){return(An(t)?t.asyncValidators:i)||null}function vd(i){return Array.isArray(i)?Va(i):i||null}function An(i){return i!=null&&!Array.isArray(i)&&typeof i=="object"}function $a(i,t,e){let n=i.controls;if(!(t?Object.keys(n):n).length)throw new Di(1e3,"");if(!n[e])throw new Di(1001,"")}function ja(i,t,e){i._forEachChild((n,s)=>{if(e[s]===void 0)throw new Di(1002,"")})}var ei=class{constructor(t,e){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=null,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this._status=Qt(()=>this.statusReactive()),this.statusReactive=De(void 0),this._pristine=Qt(()=>this.pristineReactive()),this.pristineReactive=De(!0),this._touched=Qt(()=>this.touchedReactive()),this.touchedReactive=De(!1),this._events=new R,this.events=this._events.asObservable(),this._onDisabledChange=[],this._assignValidators(t),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get status(){return Ee(this.statusReactive)}set status(t){Ee(()=>this.statusReactive.set(t))}get valid(){return this.status===Si}get invalid(){return this.status===bn}get pending(){return this.status==Zt}get disabled(){return this.status===Ai}get enabled(){return this.status!==Ai}get pristine(){return Ee(this.pristineReactive)}set pristine(t){Ee(()=>this.pristineReactive.set(t))}get dirty(){return!this.pristine}get touched(){return Ee(this.touchedReactive)}set touched(t){Ee(()=>this.touchedReactive.set(t))}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t)}setAsyncValidators(t){this._assignAsyncValidators(t)}addValidators(t){this.setValidators(ba(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(ba(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(wa(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(wa(t,this._rawAsyncValidators))}hasValidator(t){return wn(this._rawValidators,t)}hasAsyncValidator(t){return wn(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){let e=this.touched===!1;this.touched=!0;let n=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsTouched(B(b({},t),{sourceControl:n})),e&&t.emitEvent!==!1&&this._events.next(new Pi(!0,n))}markAllAsTouched(t={}){this.markAsTouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(t))}markAsUntouched(t={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let n=t.sourceControl??this;this._forEachChild(s=>{s.markAsUntouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:n})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,n),e&&t.emitEvent!==!1&&this._events.next(new Pi(!1,n))}markAsDirty(t={}){let e=this.pristine===!0;this.pristine=!1;let n=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsDirty(B(b({},t),{sourceControl:n})),e&&t.emitEvent!==!1&&this._events.next(new Oi(!1,n))}markAsPristine(t={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let n=t.sourceControl??this;this._forEachChild(s=>{s.markAsPristine({onlySelf:!0,emitEvent:t.emitEvent})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t,n),e&&t.emitEvent!==!1&&this._events.next(new Oi(!0,n))}markAsPending(t={}){this.status=Zt;let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new Xt(this.status,e)),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.markAsPending(B(b({},t),{sourceControl:e}))}disable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=Ai,this.errors=null,this._forEachChild(s=>{s.disable(B(b({},t),{onlySelf:!0}))}),this._updateValue();let n=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new Tn(this.value,n)),this._events.next(new Xt(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(B(b({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(s=>s(!0))}enable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=Si,this._forEachChild(n=>{n.enable(B(b({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(B(b({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(n=>n(!1))}_updateAncestors(t,e){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine({},e),this._parent._updateTouched({},e))}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let n=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Si||this.status===Zt)&&this._runAsyncValidator(n,t.emitEvent)}let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new Tn(this.value,e)),this._events.next(new Xt(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(B(b({},t),{sourceControl:e}))}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Ai:Si}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t,e){if(this.asyncValidator){this.status=Zt,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1};let n=Ra(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(s=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(s,{emitEvent:e,shouldHaveEmitted:t})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let t=this._hasOwnPendingAsyncValidator?.emitEvent??!1;return this._hasOwnPendingAsyncValidator=null,t}return!1}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(t){let e=t;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((n,s)=>n&&n._find(s),this)}getError(t,e){let n=e?this.get(e):this;return n&&n.errors?n.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t,e,n){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),(t||n)&&this._events.next(new Xt(this.status,e)),this._parent&&this._parent._updateControlsErrors(t,e,n)}_initObservables(){this.valueChanges=new L,this.statusChanges=new L}_calculateStatus(){return this._allControlsDisabled()?Ai:this.errors?bn:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Zt)?Zt:this._anyControlsHaveStatus(bn)?bn:Si}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t,e){let n=!this._anyControlsDirty(),s=this.pristine!==n;this.pristine=n,this._parent&&!t.onlySelf&&this._parent._updatePristine(t,e),s&&this._events.next(new Oi(this.pristine,e))}_updateTouched(t={},e){this.touched=this._anyControlsTouched(),this._events.next(new Pi(this.touched,e)),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,e)}_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){An(t)&&t.updateOn!=null&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){let e=this._parent&&this._parent.dirty;return!t&&!!e&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=_d(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=vd(this._rawAsyncValidators)}},Cn=class extends ei{constructor(t,e,n){super($s(e),js(n,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,n={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}removeControl(t,e={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(t,e,n={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){ja(this,!0,t),Object.keys(t).forEach(n=>{$a(this,!0,n),this.controls[n].setValue(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(Object.keys(t).forEach(n=>{let s=this.controls[n];s&&s.patchValue(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((n,s)=>{n.reset(t?t[s]:null,{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,n)=>(t[n]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(e,n)=>n._syncPendingControls()?!0:e);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{let n=this.controls[e];n&&t(n,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(let[e,n]of Object.entries(this.controls))if(this.contains(e)&&t(n))return!0;return!1}_reduceValue(){let t={};return this._reduceChildren(t,(e,n,s)=>((n.enabled||this.disabled)&&(e[s]=n.value),e))}_reduceChildren(t,e){let n=t;return this._forEachChild((s,r)=>{n=e(n,s,r)}),n}_allControlsDisabled(){for(let t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(t){return this.controls.hasOwnProperty(t)?this.controls[t]:null}};var Fs=class extends Cn{};var ki=new ie("CallSetDisabledState",{providedIn:"root",factory:()=>xi}),xi="always";function Ga(i,t){return[...t.path,i]}function Bs(i,t,e=xi){Gs(i,t),t.valueAccessor.writeValue(i.value),(i.disabled||e==="always")&&t.valueAccessor.setDisabledState?.(i.disabled),bd(i,t),Dd(i,t),wd(i,t),yd(i,t)}function Da(i,t,e=!0){let n=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(n),t.valueAccessor.registerOnTouched(n)),Sn(i,t),i&&(t._invokeOnDestroyCallbacks(),i._registerOnCollectionChange(()=>{}))}function In(i,t){i.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function yd(i,t){if(t.valueAccessor.setDisabledState){let e=n=>{t.valueAccessor.setDisabledState(n)};i.registerOnDisabledChange(e),t._registerOnDestroy(()=>{i._unregisterOnDisabledChange(e)})}}function Gs(i,t){let e=Ua(i);t.validator!==null?i.setValidators(ya(e,t.validator)):typeof e=="function"&&i.setValidators([e]);let n=Ha(i);t.asyncValidator!==null?i.setAsyncValidators(ya(n,t.asyncValidator)):typeof n=="function"&&i.setAsyncValidators([n]);let s=()=>i.updateValueAndValidity();In(t._rawValidators,s),In(t._rawAsyncValidators,s)}function Sn(i,t){let e=!1;if(i!==null){if(t.validator!==null){let s=Ua(i);if(Array.isArray(s)&&s.length>0){let r=s.filter(o=>o!==t.validator);r.length!==s.length&&(e=!0,i.setValidators(r))}}if(t.asyncValidator!==null){let s=Ha(i);if(Array.isArray(s)&&s.length>0){let r=s.filter(o=>o!==t.asyncValidator);r.length!==s.length&&(e=!0,i.setAsyncValidators(r))}}}let n=()=>{};return In(t._rawValidators,n),In(t._rawAsyncValidators,n),e}function bd(i,t){t.valueAccessor.registerOnChange(e=>{i._pendingValue=e,i._pendingChange=!0,i._pendingDirty=!0,i.updateOn==="change"&&Wa(i,t)})}function wd(i,t){t.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,i.updateOn==="blur"&&i._pendingChange&&Wa(i,t),i.updateOn!=="submit"&&i.markAsTouched()})}function Wa(i,t){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function Dd(i,t){let e=(n,s)=>{t.valueAccessor.writeValue(n),s&&t.viewToModelUpdate(n)};i.registerOnChange(e),t._registerOnDestroy(()=>{i._unregisterOnChange(e)})}function Ed(i,t){i==null,Gs(i,t)}function Td(i,t){return Sn(i,t)}function za(i,t){if(!i.hasOwnProperty("model"))return!1;let e=i.model;return e.isFirstChange()?!0:!Object.is(t,e.currentValue)}function Cd(i){return Object.getPrototypeOf(i.constructor)===Vs}function Id(i,t){i._syncPendingControls(),t.forEach(e=>{let n=e.control;n.updateOn==="submit"&&n._pendingChange&&(e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function qa(i,t){if(!t)return null;Array.isArray(t);let e,n,s;return t.forEach(r=>{r.constructor===Aa?e=r:Cd(r)?n=r:s=r}),s||n||e||null}function Sd(i,t){let e=i.indexOf(t);e>-1&&i.splice(e,1)}function Ea(i,t){let e=i.indexOf(t);e>-1&&i.splice(e,1)}function Ta(i){return typeof i=="object"&&i!==null&&Object.keys(i).length===2&&"value"in i&&"disabled"in i}var Mi=class extends ei{constructor(t=null,e,n){super($s(e),js(n,e)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),An(e)&&(e.nonNullable||e.initialValueIsDefault)&&(Ta(t)?this.defaultValue=t.value:this.defaultValue=t)}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(n=>n(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=this.defaultValue,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){Ea(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){Ea(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(t){Ta(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}};var Ad=i=>i instanceof Mi;var Od={provide:nt,useExisting:Ve(()=>Pd)},Ca=Promise.resolve(),Pd=(()=>{class i extends nt{constructor(e,n,s,r,o,a){super(),this._changeDetectorRef=o,this.callSetDisabledState=a,this.control=new Mi,this._registered=!1,this.name="",this.update=new L,this._parent=e,this._setValidators(n),this._setAsyncValidators(s),this.valueAccessor=qa(this,r)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let n=e.name.previousValue;this.formDirective.removeControl({name:n,path:this._getPath(n)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),za(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){Bs(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(e){Ca.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let n=e.isDisabled.currentValue,s=n!==0&&da(n);Ca.then(()=>{s&&!this.control.disabled?this.control.disable():!s&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?Ga(e,this._parent):[e]}static{this.\u0275fac=function(n){return new(n||i)(w(It,9),w(Us,10),w(Hs,10),w(Ni,10),w(Yt,8),w(ki,8))}}static{this.\u0275dir=I({type:i,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:[Ue([Od]),he,wt]})}}return i})(),Kg=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=I({type:i,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]})}}return i})();var Md={provide:Ni,useExisting:Ve(()=>Nd),multi:!0};var Rd=(()=>{class i{constructor(){this._accessors=[]}add(e,n){this._accessors.push([e,n])}remove(e){for(let n=this._accessors.length-1;n>=0;--n)if(this._accessors[n][1]===e){this._accessors.splice(n,1);return}}select(e){this._accessors.forEach(n=>{this._isSameGroup(n,e)&&n[1]!==e&&n[1].fireUncheck(e.value)})}_isSameGroup(e,n){return e[0].control?e[0]._parent===n._control._parent&&e[1].name===n.name:!1}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=N({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),Nd=(()=>{class i extends Vs{constructor(e,n,s,r){super(e,n),this._registry=s,this._injector=r,this.setDisabledStateFired=!1,this.onChange=()=>{},this.callSetDisabledState=m(ki,{optional:!0})??xi}ngOnInit(){this._control=this._injector.get(nt),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(e){this._state=e===this.value,this.setProperty("checked",this._state)}registerOnChange(e){this._fn=e,this.onChange=()=>{e(this.value),this._registry.select(this)}}setDisabledState(e){(this.setDisabledStateFired||e||this.callSetDisabledState==="whenDisabledForLegacyCode")&&this.setProperty("disabled",e),this.setDisabledStateFired=!0}fireUncheck(e){this.writeValue(e)}_checkName(){this.name&&this.formControlName&&(this.name,this.formControlName),!this.name&&this.formControlName&&(this.name=this.formControlName)}static{this.\u0275fac=function(n){return new(n||i)(w(fn),w(oe),w(Rd),w(Z))}}static{this.\u0275dir=I({type:i,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(n,s){n&1&&le("change",function(){return s.onChange()})("blur",function(){return s.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[Ue([Md]),he]})}}return i})();var Ja=new ie("");var kd={provide:It,useExisting:Ve(()=>xd)},xd=(()=>{class i extends It{get submitted(){return Ee(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}constructor(e,n,s){super(),this.callSetDisabledState=s,this._submitted=Qt(()=>this._submittedReactive()),this._submittedReactive=De(!1),this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new L,this._setValidators(e),this._setAsyncValidators(n)}ngOnChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(Sn(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){let n=this.form.get(e.path);return Bs(n,e,this.callSetDisabledState),n.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),n}getControl(e){return this.form.get(e.path)}removeControl(e){Da(e.control||null,e,!1),Sd(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,n){this.form.get(e.path).setValue(n)}onSubmit(e){return this._submittedReactive.set(!0),Id(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new ks(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this._submittedReactive.set(!1),this.form._events.next(new xs(this.form))}_updateDomValue(){this.directives.forEach(e=>{let n=e.control,s=this.form.get(e.path);n!==s&&(Da(n||null,e),Ad(s)&&(Bs(s,e,this.callSetDisabledState),e.control=s))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let n=this.form.get(e.path);Ed(n,e),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){let n=this.form.get(e.path);n&&Td(n,e)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){Gs(this.form,this),this._oldForm&&Sn(this._oldForm,this)}_checkFormPresent(){this.form}static{this.\u0275fac=function(n){return new(n||i)(w(Us,10),w(Hs,10),w(ki,8))}}static{this.\u0275dir=I({type:i,selectors:[["","formGroup",""]],hostBindings:function(n,s){n&1&&le("submit",function(o){return s.onSubmit(o)})("reset",function(){return s.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Ue([kd]),he,wt]})}}return i})();var Fd={provide:nt,useExisting:Ve(()=>Bd)},Bd=(()=>{class i extends nt{set isDisabled(e){}static{this._ngModelWarningSentOnce=!1}constructor(e,n,s,r,o){super(),this._ngModelWarningConfig=o,this._added=!1,this.name=null,this.update=new L,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(n),this._setAsyncValidators(s),this.valueAccessor=qa(this,r)}ngOnChanges(e){this._added||this._setUpControl(),za(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return Ga(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}static{this.\u0275fac=function(n){return new(n||i)(w(It,13),w(Us,10),w(Hs,10),w(Ni,10),w(Ja,8))}}static{this.\u0275dir=I({type:i,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},features:[Ue([Fd]),he,wt]})}}return i})();var Ka=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=Me({type:i})}static{this.\u0275inj=Pe({})}}return i})(),Ls=class extends ei{constructor(t,e,n){super($s(e),js(n,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(t){return this.controls[this._adjustIndex(t)]}push(t,e={}){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(t,e,n={}){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:n.emitEvent})}removeAt(t,e={}){let n=this._adjustIndex(t);n<0&&(n=0),this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),this.controls.splice(n,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(t,e,n={}){let s=this._adjustIndex(t);s<0&&(s=0),this.controls[s]&&this.controls[s]._registerOnCollectionChange(()=>{}),this.controls.splice(s,1),e&&(this.controls.splice(s,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){ja(this,!1,t),t.forEach((n,s)=>{$a(this,!1,s),this.at(s).setValue(n,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(t.forEach((n,s)=>{this.at(s)&&this.at(s).patchValue(n,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t=[],e={}){this._forEachChild((n,s)=>{n.reset(t[s],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(t=>t.getRawValue())}clear(t={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:t.emitEvent}))}_adjustIndex(t){return t<0?t+this.length:t}_syncPendingControls(){let t=this.controls.reduce((e,n)=>n._syncPendingControls()?!0:e,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){this.controls.forEach((e,n)=>{t(e,n)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_allControlsDisabled(){for(let t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}_find(t){return this.at(t)??null}};function Ia(i){return!!i&&(i.asyncValidators!==void 0||i.validators!==void 0||i.updateOn!==void 0)}var Yg=(()=>{class i{constructor(){this.useNonNullable=!1}get nonNullable(){let e=new i;return e.useNonNullable=!0,e}group(e,n=null){let s=this._reduceControls(e),r={};return Ia(n)?r=n:n!==null&&(r.validators=n.validator,r.asyncValidators=n.asyncValidator),new Cn(s,r)}record(e,n=null){let s=this._reduceControls(e);return new Fs(s,n)}control(e,n,s){let r={};return this.useNonNullable?(Ia(n)?r=n:(r.validators=n,r.asyncValidators=s),new Mi(e,B(b({},r),{nonNullable:!0}))):new Mi(e,n,s)}array(e,n,s){let r=e.map(o=>this._createControl(o));return new Ls(r,n,s)}_reduceControls(e){let n={};return Object.keys(e).forEach(s=>{n[s]=this._createControl(e[s])}),n}_createControl(e){if(e instanceof Mi)return e;if(e instanceof ei)return e;if(Array.isArray(e)){let n=e[0],s=e.length>1?e[1]:null,r=e.length>2?e[2]:null;return this.control(n,s,r)}else return this.control(e)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=N({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var Qg=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:ki,useValue:e.callSetDisabledState??xi}]}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=Me({type:i})}static{this.\u0275inj=Pe({imports:[Ka]})}}return i})(),Zg=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:Ja,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:ki,useValue:e.callSetDisabledState??xi}]}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=Me({type:i})}static{this.\u0275inj=Pe({imports:[Ka]})}}return i})();var V="top",K="bottom",W="right",$="left",On="auto",rt=[V,K,W,$],$e="start",St="end",Ya="clippingParents",Pn="viewport",ti="popper",Qa="reference",Ws=rt.reduce(function(i,t){return i.concat([t+"-"+$e,t+"-"+St])},[]),Mn=[].concat(rt,[On]).reduce(function(i,t){return i.concat([t,t+"-"+$e,t+"-"+St])},[]),Ld="beforeRead",Vd="read",Ud="afterRead",Hd="beforeMain",$d="main",jd="afterMain",Gd="beforeWrite",Wd="write",zd="afterWrite",Za=[Ld,Vd,Ud,Hd,$d,jd,Gd,Wd,zd];function z(i){return i?(i.nodeName||"").toLowerCase():null}function M(i){if(i==null)return window;if(i.toString()!=="[object Window]"){var t=i.ownerDocument;return t&&t.defaultView||window}return i}function ge(i){var t=M(i).Element;return i instanceof t||i instanceof Element}function j(i){var t=M(i).HTMLElement;return i instanceof t||i instanceof HTMLElement}function ii(i){if(typeof ShadowRoot>"u")return!1;var t=M(i).ShadowRoot;return i instanceof t||i instanceof ShadowRoot}function qd(i){var t=i.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},s=t.attributes[e]||{},r=t.elements[e];!j(r)||!z(r)||(Object.assign(r.style,n),Object.keys(s).forEach(function(o){var a=s[o];a===!1?r.removeAttribute(o):r.setAttribute(o,a===!0?"":a)}))})}function Jd(i){var t=i.state,e={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,e.popper),t.styles=e,t.elements.arrow&&Object.assign(t.elements.arrow.style,e.arrow),function(){Object.keys(t.elements).forEach(function(n){var s=t.elements[n],r=t.attributes[n]||{},o=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:e[n]),a=o.reduce(function(c,l){return c[l]="",c},{});!j(s)||!z(s)||(Object.assign(s.style,a),Object.keys(r).forEach(function(c){s.removeAttribute(c)}))})}}var Xa={name:"applyStyles",enabled:!0,phase:"write",fn:qd,effect:Jd,requires:["computeStyles"]};function q(i){return i.split("-")[0]}var Te=Math.max,At=Math.min,je=Math.round;function ni(){var i=navigator.userAgentData;return i!=null&&i.brands&&Array.isArray(i.brands)?i.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Fi(){return!/^((?!chrome|android).)*safari/i.test(ni())}function _e(i,t,e){t===void 0&&(t=!1),e===void 0&&(e=!1);var n=i.getBoundingClientRect(),s=1,r=1;t&&j(i)&&(s=i.offsetWidth>0&&je(n.width)/i.offsetWidth||1,r=i.offsetHeight>0&&je(n.height)/i.offsetHeight||1);var o=ge(i)?M(i):window,a=o.visualViewport,c=!Fi()&&e,l=(n.left+(c&&a?a.offsetLeft:0))/s,u=(n.top+(c&&a?a.offsetTop:0))/r,p=n.width/s,f=n.height/r;return{width:p,height:f,top:u,right:l+p,bottom:u+f,left:l,x:l,y:u}}function Ot(i){var t=_e(i),e=i.offsetWidth,n=i.offsetHeight;return Math.abs(t.width-e)<=1&&(e=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:i.offsetLeft,y:i.offsetTop,width:e,height:n}}function Bi(i,t){var e=t.getRootNode&&t.getRootNode();if(i.contains(t))return!0;if(e&&ii(e)){var n=t;do{if(n&&i.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function se(i){return M(i).getComputedStyle(i)}function zs(i){return["table","td","th"].indexOf(z(i))>=0}function Y(i){return((ge(i)?i.ownerDocument:i.document)||window.document).documentElement}function Ge(i){return z(i)==="html"?i:i.assignedSlot||i.parentNode||(ii(i)?i.host:null)||Y(i)}function ec(i){return!j(i)||se(i).position==="fixed"?null:i.offsetParent}function Kd(i){var t=/firefox/i.test(ni()),e=/Trident/i.test(ni());if(e&&j(i)){var n=se(i);if(n.position==="fixed")return null}var s=Ge(i);for(ii(s)&&(s=s.host);j(s)&&["html","body"].indexOf(z(s))<0;){var r=se(s);if(r.transform!=="none"||r.perspective!=="none"||r.contain==="paint"||["transform","perspective"].indexOf(r.willChange)!==-1||t&&r.willChange==="filter"||t&&r.filter&&r.filter!=="none")return s;s=s.parentNode}return null}function Ce(i){for(var t=M(i),e=ec(i);e&&zs(e)&&se(e).position==="static";)e=ec(e);return e&&(z(e)==="html"||z(e)==="body"&&se(e).position==="static")?t:e||Kd(i)||t}function Pt(i){return["top","bottom"].indexOf(i)>=0?"x":"y"}function Mt(i,t,e){return Te(i,At(t,e))}function tc(i,t,e){var n=Mt(i,t,e);return n>e?e:n}function Li(){return{top:0,right:0,bottom:0,left:0}}function Vi(i){return Object.assign({},Li(),i)}function Ui(i,t){return t.reduce(function(e,n){return e[n]=i,e},{})}var Yd=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,Vi(typeof t!="number"?t:Ui(t,rt))};function Qd(i){var t,e=i.state,n=i.name,s=i.options,r=e.elements.arrow,o=e.modifiersData.popperOffsets,a=q(e.placement),c=Pt(a),l=[$,W].indexOf(a)>=0,u=l?"height":"width";if(!(!r||!o)){var p=Yd(s.padding,e),f=Ot(r),h=c==="y"?V:$,D=c==="y"?K:W,y=e.rects.reference[u]+e.rects.reference[c]-o[c]-e.rects.popper[u],_=o[c]-e.rects.reference[c],C=Ce(r),P=C?c==="y"?C.clientHeight||0:C.clientWidth||0:0,A=y/2-_/2,v=p[h],T=P-f[u]-p[D],E=P/2-f[u]/2+A,O=Mt(v,E,T),U=c;e.modifiersData[n]=(t={},t[U]=O,t.centerOffset=O-E,t)}}function Zd(i){var t=i.state,e=i.options,n=e.element,s=n===void 0?"[data-popper-arrow]":n;s!=null&&(typeof s=="string"&&(s=t.elements.popper.querySelector(s),!s)||Bi(t.elements.popper,s)&&(t.elements.arrow=s))}var qs={name:"arrow",enabled:!0,phase:"main",fn:Qd,effect:Zd,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ve(i){return i.split("-")[1]}var Xd={top:"auto",right:"auto",bottom:"auto",left:"auto"};function eu(i,t){var e=i.x,n=i.y,s=t.devicePixelRatio||1;return{x:je(e*s)/s||0,y:je(n*s)/s||0}}function ic(i){var t,e=i.popper,n=i.popperRect,s=i.placement,r=i.variation,o=i.offsets,a=i.position,c=i.gpuAcceleration,l=i.adaptive,u=i.roundOffsets,p=i.isFixed,f=o.x,h=f===void 0?0:f,D=o.y,y=D===void 0?0:D,_=typeof u=="function"?u({x:h,y}):{x:h,y};h=_.x,y=_.y;var C=o.hasOwnProperty("x"),P=o.hasOwnProperty("y"),A=$,v=V,T=window;if(l){var E=Ce(e),O="clientHeight",U="clientWidth";if(E===M(e)&&(E=Y(e),se(E).position!=="static"&&a==="absolute"&&(O="scrollHeight",U="scrollWidth")),E=E,s===V||(s===$||s===W)&&r===St){v=K;var k=p&&E===T&&T.visualViewport?T.visualViewport.height:E[O];y-=k-n.height,y*=c?1:-1}if(s===$||(s===V||s===K)&&r===St){A=W;var F=p&&E===T&&T.visualViewport?T.visualViewport.width:E[U];h-=F-n.width,h*=c?1:-1}}var Q=Object.assign({position:a},l&&Xd),ye=u===!0?eu({x:h,y},M(e)):{x:h,y};if(h=ye.x,y=ye.y,c){var te;return Object.assign({},Q,(te={},te[v]=P?"0":"",te[A]=C?"0":"",te.transform=(T.devicePixelRatio||1)<=1?"translate("+h+"px, "+y+"px)":"translate3d("+h+"px, "+y+"px, 0)",te))}return Object.assign({},Q,(t={},t[v]=P?y+"px":"",t[A]=C?h+"px":"",t.transform="",t))}function tu(i){var t=i.state,e=i.options,n=e.gpuAcceleration,s=n===void 0?!0:n,r=e.adaptive,o=r===void 0?!0:r,a=e.roundOffsets,c=a===void 0?!0:a,l={placement:q(t.placement),variation:ve(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:s,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,ic(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,ic(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var nc={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:tu,data:{}};var Rn={passive:!0};function iu(i){var t=i.state,e=i.instance,n=i.options,s=n.scroll,r=s===void 0?!0:s,o=n.resize,a=o===void 0?!0:o,c=M(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return r&&l.forEach(function(u){u.addEventListener("scroll",e.update,Rn)}),a&&c.addEventListener("resize",e.update,Rn),function(){r&&l.forEach(function(u){u.removeEventListener("scroll",e.update,Rn)}),a&&c.removeEventListener("resize",e.update,Rn)}}var sc={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:iu,data:{}};var nu={left:"right",right:"left",bottom:"top",top:"bottom"};function si(i){return i.replace(/left|right|bottom|top/g,function(t){return nu[t]})}var su={start:"end",end:"start"};function Nn(i){return i.replace(/start|end/g,function(t){return su[t]})}function Rt(i){var t=M(i),e=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:e,scrollTop:n}}function Nt(i){return _e(Y(i)).left+Rt(i).scrollLeft}function Js(i,t){var e=M(i),n=Y(i),s=e.visualViewport,r=n.clientWidth,o=n.clientHeight,a=0,c=0;if(s){r=s.width,o=s.height;var l=Fi();(l||!l&&t==="fixed")&&(a=s.offsetLeft,c=s.offsetTop)}return{width:r,height:o,x:a+Nt(i),y:c}}function Ks(i){var t,e=Y(i),n=Rt(i),s=(t=i.ownerDocument)==null?void 0:t.body,r=Te(e.scrollWidth,e.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),o=Te(e.scrollHeight,e.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-n.scrollLeft+Nt(i),c=-n.scrollTop;return se(s||e).direction==="rtl"&&(a+=Te(e.clientWidth,s?s.clientWidth:0)-r),{width:r,height:o,x:a,y:c}}function kt(i){var t=se(i),e=t.overflow,n=t.overflowX,s=t.overflowY;return/auto|scroll|overlay|hidden/.test(e+s+n)}function kn(i){return["html","body","#document"].indexOf(z(i))>=0?i.ownerDocument.body:j(i)&&kt(i)?i:kn(Ge(i))}function ot(i,t){var e;t===void 0&&(t=[]);var n=kn(i),s=n===((e=i.ownerDocument)==null?void 0:e.body),r=M(n),o=s?[r].concat(r.visualViewport||[],kt(n)?n:[]):n,a=t.concat(o);return s?a:a.concat(ot(Ge(o)))}function ri(i){return Object.assign({},i,{left:i.x,top:i.y,right:i.x+i.width,bottom:i.y+i.height})}function ru(i,t){var e=_e(i,!1,t==="fixed");return e.top=e.top+i.clientTop,e.left=e.left+i.clientLeft,e.bottom=e.top+i.clientHeight,e.right=e.left+i.clientWidth,e.width=i.clientWidth,e.height=i.clientHeight,e.x=e.left,e.y=e.top,e}function rc(i,t,e){return t===Pn?ri(Js(i,e)):ge(t)?ru(t,e):ri(Ks(Y(i)))}function ou(i){var t=ot(Ge(i)),e=["absolute","fixed"].indexOf(se(i).position)>=0,n=e&&j(i)?Ce(i):i;return ge(n)?t.filter(function(s){return ge(s)&&Bi(s,n)&&z(s)!=="body"}):[]}function Ys(i,t,e,n){var s=t==="clippingParents"?ou(i):[].concat(t),r=[].concat(s,[e]),o=r[0],a=r.reduce(function(c,l){var u=rc(i,l,n);return c.top=Te(u.top,c.top),c.right=At(u.right,c.right),c.bottom=At(u.bottom,c.bottom),c.left=Te(u.left,c.left),c},rc(i,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 Hi(i){var t=i.reference,e=i.element,n=i.placement,s=n?q(n):null,r=n?ve(n):null,o=t.x+t.width/2-e.width/2,a=t.y+t.height/2-e.height/2,c;switch(s){case V:c={x:o,y:t.y-e.height};break;case K:c={x:o,y:t.y+t.height};break;case W:c={x:t.x+t.width,y:a};break;case $:c={x:t.x-e.width,y:a};break;default:c={x:t.x,y:t.y}}var l=s?Pt(s):null;if(l!=null){var u=l==="y"?"height":"width";switch(r){case $e:c[l]=c[l]-(t[u]/2-e[u]/2);break;case St:c[l]=c[l]+(t[u]/2-e[u]/2);break;default:}}return c}function at(i,t){t===void 0&&(t={});var e=t,n=e.placement,s=n===void 0?i.placement:n,r=e.strategy,o=r===void 0?i.strategy:r,a=e.boundary,c=a===void 0?Ya:a,l=e.rootBoundary,u=l===void 0?Pn:l,p=e.elementContext,f=p===void 0?ti:p,h=e.altBoundary,D=h===void 0?!1:h,y=e.padding,_=y===void 0?0:y,C=Vi(typeof _!="number"?_:Ui(_,rt)),P=f===ti?Qa:ti,A=i.rects.popper,v=i.elements[D?P:f],T=Ys(ge(v)?v:v.contextElement||Y(i.elements.popper),c,u,o),E=_e(i.elements.reference),O=Hi({reference:E,element:A,strategy:"absolute",placement:s}),U=ri(Object.assign({},A,O)),k=f===ti?U:E,F={top:T.top-k.top+C.top,bottom:k.bottom-T.bottom+C.bottom,left:T.left-k.left+C.left,right:k.right-T.right+C.right},Q=i.modifiersData.offset;if(f===ti&&Q){var ye=Q[s];Object.keys(F).forEach(function(te){var ut=[W,K].indexOf(te)>=0?1:-1,ht=[V,K].indexOf(te)>=0?"y":"x";F[te]+=ye[ht]*ut})}return F}function Qs(i,t){t===void 0&&(t={});var e=t,n=e.placement,s=e.boundary,r=e.rootBoundary,o=e.padding,a=e.flipVariations,c=e.allowedAutoPlacements,l=c===void 0?Mn:c,u=ve(n),p=u?a?Ws:Ws.filter(function(D){return ve(D)===u}):rt,f=p.filter(function(D){return l.indexOf(D)>=0});f.length===0&&(f=p);var h=f.reduce(function(D,y){return D[y]=at(i,{placement:y,boundary:s,rootBoundary:r,padding:o})[q(y)],D},{});return Object.keys(h).sort(function(D,y){return h[D]-h[y]})}function au(i){if(q(i)===On)return[];var t=si(i);return[Nn(i),t,Nn(t)]}function cu(i){var t=i.state,e=i.options,n=i.name;if(!t.modifiersData[n]._skip){for(var s=e.mainAxis,r=s===void 0?!0:s,o=e.altAxis,a=o===void 0?!0:o,c=e.fallbackPlacements,l=e.padding,u=e.boundary,p=e.rootBoundary,f=e.altBoundary,h=e.flipVariations,D=h===void 0?!0:h,y=e.allowedAutoPlacements,_=t.options.placement,C=q(_),P=C===_,A=c||(P||!D?[si(_)]:au(_)),v=[_].concat(A).reduce(function(Gt,Ye){return Gt.concat(q(Ye)===On?Qs(t,{placement:Ye,boundary:u,rootBoundary:p,padding:l,flipVariations:D,allowedAutoPlacements:y}):Ye)},[]),T=t.rects.reference,E=t.rects.popper,O=new Map,U=!0,k=v[0],F=0;F<v.length;F++){var Q=v[F],ye=q(Q),te=ve(Q)===$e,ut=[V,K].indexOf(ye)>=0,ht=ut?"width":"height",ue=at(t,{placement:Q,boundary:u,rootBoundary:p,altBoundary:f,padding:l}),be=ut?te?W:$:te?K:V;T[ht]>E[ht]&&(be=si(be));var nn=si(be),pt=[];if(r&&pt.push(ue[ye]<=0),a&&pt.push(ue[be]<=0,ue[nn]<=0),pt.every(function(Gt){return Gt})){k=Q,U=!1;break}O.set(Q,pt)}if(U)for(var sn=D?3:1,ps=function(Ye){var bi=v.find(function(on){var ft=O.get(on);if(ft)return ft.slice(0,Ye).every(function(fs){return fs})});if(bi)return k=bi,"break"},yi=sn;yi>0;yi--){var rn=ps(yi);if(rn==="break")break}t.placement!==k&&(t.modifiersData[n]._skip=!0,t.placement=k,t.reset=!0)}}var Zs={name:"flip",enabled:!0,phase:"main",fn:cu,requiresIfExists:["offset"],data:{_skip:!1}};function lu(i,t,e){var n=q(i),s=[$,V].indexOf(n)>=0?-1:1,r=typeof e=="function"?e(Object.assign({},t,{placement:i})):e,o=r[0],a=r[1];return o=o||0,a=(a||0)*s,[$,W].indexOf(n)>=0?{x:a,y:o}:{x:o,y:a}}function du(i){var t=i.state,e=i.options,n=i.name,s=e.offset,r=s===void 0?[0,0]:s,o=Mn.reduce(function(u,p){return u[p]=lu(p,t.rects,r),u},{}),a=o[t.placement],c=a.x,l=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=l),t.modifiersData[n]=o}var Xs={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:du};function uu(i){var t=i.state,e=i.name;t.modifiersData[e]=Hi({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var oc={name:"popperOffsets",enabled:!0,phase:"read",fn:uu,data:{}};function er(i){return i==="x"?"y":"x"}function hu(i){var t=i.state,e=i.options,n=i.name,s=e.mainAxis,r=s===void 0?!0:s,o=e.altAxis,a=o===void 0?!1:o,c=e.boundary,l=e.rootBoundary,u=e.altBoundary,p=e.padding,f=e.tether,h=f===void 0?!0:f,D=e.tetherOffset,y=D===void 0?0:D,_=at(t,{boundary:c,rootBoundary:l,padding:p,altBoundary:u}),C=q(t.placement),P=ve(t.placement),A=!P,v=Pt(C),T=er(v),E=t.modifiersData.popperOffsets,O=t.rects.reference,U=t.rects.popper,k=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,F=typeof k=="number"?{mainAxis:k,altAxis:k}:Object.assign({mainAxis:0,altAxis:0},k),Q=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,ye={x:0,y:0};if(E){if(r){var te,ut=v==="y"?V:$,ht=v==="y"?K:W,ue=v==="y"?"height":"width",be=E[v],nn=be+_[ut],pt=be-_[ht],sn=h?-U[ue]/2:0,ps=P===$e?O[ue]:U[ue],yi=P===$e?-U[ue]:-O[ue],rn=t.elements.arrow,Gt=h&&rn?Ot(rn):{width:0,height:0},Ye=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Li(),bi=Ye[ut],on=Ye[ht],ft=Mt(0,O[ue],Gt[ue]),fs=A?O[ue]/2-sn-ft-bi-F.mainAxis:ps-ft-bi-F.mainAxis,Jl=A?-O[ue]/2+sn+ft+on+F.mainAxis:yi+ft+on+F.mainAxis,ms=t.elements.arrow&&Ce(t.elements.arrow),Kl=ms?v==="y"?ms.clientTop||0:ms.clientLeft||0:0,Mo=(te=Q?.[v])!=null?te:0,Yl=be+fs-Mo-Kl,Ql=be+Jl-Mo,Ro=Mt(h?At(nn,Yl):nn,be,h?Te(pt,Ql):pt);E[v]=Ro,ye[v]=Ro-be}if(a){var No,Zl=v==="x"?V:$,Xl=v==="x"?K:W,mt=E[T],an=T==="y"?"height":"width",ko=mt+_[Zl],xo=mt-_[Xl],gs=[V,$].indexOf(C)!==-1,Fo=(No=Q?.[T])!=null?No:0,Bo=gs?ko:mt-O[an]-U[an]-Fo+F.altAxis,Lo=gs?mt+O[an]+U[an]-Fo-F.altAxis:xo,Vo=h&&gs?tc(Bo,mt,Lo):Mt(h?Bo:ko,mt,h?Lo:xo);E[T]=Vo,ye[T]=Vo-mt}t.modifiersData[n]=ye}}var tr={name:"preventOverflow",enabled:!0,phase:"main",fn:hu,requiresIfExists:["offset"]};function ir(i){return{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}}function nr(i){return i===M(i)||!j(i)?Rt(i):ir(i)}function pu(i){var t=i.getBoundingClientRect(),e=je(t.width)/i.offsetWidth||1,n=je(t.height)/i.offsetHeight||1;return e!==1||n!==1}function sr(i,t,e){e===void 0&&(e=!1);var n=j(t),s=j(t)&&pu(t),r=Y(t),o=_e(i,s,e),a={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(n||!n&&!e)&&((z(t)!=="body"||kt(r))&&(a=nr(t)),j(t)?(c=_e(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):r&&(c.x=Nt(r))),{x:o.left+a.scrollLeft-c.x,y:o.top+a.scrollTop-c.y,width:o.width,height:o.height}}function fu(i){var t=new Map,e=new Set,n=[];i.forEach(function(r){t.set(r.name,r)});function s(r){e.add(r.name);var o=[].concat(r.requires||[],r.requiresIfExists||[]);o.forEach(function(a){if(!e.has(a)){var c=t.get(a);c&&s(c)}}),n.push(r)}return i.forEach(function(r){e.has(r.name)||s(r)}),n}function rr(i){var t=fu(i);return Za.reduce(function(e,n){return e.concat(t.filter(function(s){return s.phase===n}))},[])}function or(i){var t;return function(){return t||(t=new Promise(function(e){Promise.resolve().then(function(){t=void 0,e(i())})})),t}}function ar(i){var t=i.reduce(function(e,n){var s=e[n.name];return e[n.name]=s?Object.assign({},s,n,{options:Object.assign({},s.options,n.options),data:Object.assign({},s.data,n.data)}):n,e},{});return Object.keys(t).map(function(e){return t[e]})}var ac={placement:"bottom",modifiers:[],strategy:"absolute"};function cc(){for(var i=arguments.length,t=new Array(i),e=0;e<i;e++)t[e]=arguments[e];return!t.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function lc(i){i===void 0&&(i={});var t=i,e=t.defaultModifiers,n=e===void 0?[]:e,s=t.defaultOptions,r=s===void 0?ac:s;return function(a,c,l){l===void 0&&(l=r);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},ac,r),modifiersData:{},elements:{reference:a,popper:c},attributes:{},styles:{}},p=[],f=!1,h={state:u,setOptions:function(C){var P=typeof C=="function"?C(u.options):C;y(),u.options=Object.assign({},r,u.options,P),u.scrollParents={reference:ge(a)?ot(a):a.contextElement?ot(a.contextElement):[],popper:ot(c)};var A=rr(ar([].concat(n,u.options.modifiers)));return u.orderedModifiers=A.filter(function(v){return v.enabled}),D(),h.update()},forceUpdate:function(){if(!f){var C=u.elements,P=C.reference,A=C.popper;if(cc(P,A)){u.rects={reference:sr(P,Ce(A),u.options.strategy==="fixed"),popper:Ot(A)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(F){return u.modifiersData[F.name]=Object.assign({},F.data)});for(var v=0;v<u.orderedModifiers.length;v++){if(u.reset===!0){u.reset=!1,v=-1;continue}var T=u.orderedModifiers[v],E=T.fn,O=T.options,U=O===void 0?{}:O,k=T.name;typeof E=="function"&&(u=E({state:u,options:U,name:k,instance:h})||u)}}}},update:or(function(){return new Promise(function(_){h.forceUpdate(),_(u)})}),destroy:function(){y(),f=!0}};if(!cc(a,c))return h;h.setOptions(l).then(function(_){!f&&l.onFirstUpdate&&l.onFirstUpdate(_)});function D(){u.orderedModifiers.forEach(function(_){var C=_.name,P=_.options,A=P===void 0?{}:P,v=_.effect;if(typeof v=="function"){var T=v({state:u,name:C,instance:h,options:A}),E=function(){};p.push(T||E)}})}function y(){p.forEach(function(_){return _()}),p=[]}return h}}var mu=[sc,oc,nc,Xa],cr=lc({defaultModifiers:mu});var gu=["*"];var _u=["dialog"];function vu(i,t){if(i&1&&(ce(0,"span"),me(1),fe()),i&2){let e=J().$implicit,n=J();ae(n.highlightClass),x(),Ss(e)}}function yu(i,t){if(i&1&&(Ci(0),me(1),Ii()),i&2){let e=J().$implicit;x(),Ss(e)}}function bu(i,t){if(i&1&&Dt(0,vu,2,4,"span",0)(1,yu,2,1,"ng-container"),i&2){let e=t.$index;ea(e%2!==0?0:1)}}var gc={animation:!0,transitionTimerDelayMs:5},pr=(()=>{class i{constructor(){this.animation=gc.animation}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=N({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),wu=(()=>{class i{constructor(){this._ngbConfig=m(pr),this.closeOthers=!1,this.destroyOnHide=!0}get animation(){return this._animation??this._ngbConfig.animation}set animation(e){this._animation=e}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=N({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();function Du(i){let{transitionDelay:t,transitionDuration:e}=window.getComputedStyle(i),n=parseFloat(t),s=parseFloat(e);return(n+s)*1e3}function dc(i){return i!=null?`${i}`:""}function fr(i){return typeof i=="string"}function lr(i){return i!=null}function Eu(i){return i&&i.then}function Tu(i){return i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function Cu(i,t){return!t||typeof i.closest>"u"?null:i.closest(t)}function mr(i){return(i||document.body).getBoundingClientRect()}function Iu(i){return t=>new Be(e=>{let n=o=>i.run(()=>e.next(o)),s=o=>i.run(()=>e.error(o)),r=()=>i.run(()=>e.complete());return t.subscribe({next:n,error:s,complete:r})})}function uc(i){return i.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function _c(i=document){let t=i?.activeElement;return t?t.shadowRoot?_c(t.shadowRoot):t:null}var Su=()=>{},{transitionTimerDelayMs:Au}=gc,xn=new Map,ct=(i,t,e,n)=>{let s=n.context||{},r=xn.get(t);if(r)switch(n.runningTransition){case"continue":return jo;case"stop":i.run(()=>r.transition$.complete()),s=Object.assign(r.context,s),xn.delete(t)}let o=e(t,n.animation,s)||Su;if(!n.animation||window.getComputedStyle(t).transitionProperty==="none")return i.run(()=>o()),_t(void 0).pipe(Iu(i));let a=new R,c=new R,l=a.pipe(Ko(!0));xn.set(t,{transition$:a,complete:()=>{c.next(),c.complete()},context:s});let u=Du(t);return i.runOutsideAngular(()=>{let p=re(t,"transitionend").pipe(G(l),vt(({target:h})=>h===t)),f=qo(u+Au).pipe(G(l));bs(f,p,c).pipe(G(l)).subscribe(()=>{xn.delete(t),i.run(()=>{o(),a.next(),a.complete()})})}),a.asObservable()};function Ou(i,t){if(typeof navigator>"u")return"0px";let{classList:e}=i,n=e.contains("show");n||e.add("show"),i.style[t]="";let s=i.getBoundingClientRect()[t]+"px";return n||e.remove("show"),s}var Pu=(i,t,e)=>{let{direction:n,maxSize:s,dimension:r}=e,{classList:o}=i;function a(){o.add("collapse"),n==="show"?o.add("show"):o.remove("show")}if(!t){a();return}return s||(s=Ou(i,r),e.maxSize=s,i.style[r]=n!=="show"?s:"0px",o.remove("collapse"),o.remove("collapsing"),o.remove("show"),mr(i),o.add("collapsing")),i.style[r]=n==="show"?s:"0px",()=>{a(),o.remove("collapsing"),i.style[r]=""}},Mu=(()=>{class i{constructor(){this._ngbConfig=m(pr),this.horizontal=!1}get animation(){return this._animation??this._ngbConfig.animation}set animation(e){this._animation=e}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=N({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),hc=(()=>{class i{constructor(){this._config=m(Mu),this._element=m(oe),this._zone=m(ne),this.animation=this._config.animation,this._afterInit=!1,this._isCollapsed=!1,this.ngbCollapseChange=new L,this.horizontal=this._config.horizontal,this.shown=new L,this.hidden=new L}set collapsed(e){this._isCollapsed!==e&&(this._isCollapsed=e,this._afterInit&&this._runTransitionWithEvents(e,this.animation))}ngOnInit(){this._runTransition(this._isCollapsed,!1),this._afterInit=!0}toggle(e=this._isCollapsed){this.collapsed=!e,this.ngbCollapseChange.next(this._isCollapsed)}_runTransition(e,n){return ct(this._zone,this._element.nativeElement,Pu,{animation:n,runningTransition:"stop",context:{direction:e?"hide":"show",dimension:this.horizontal?"width":"height"}})}_runTransitionWithEvents(e,n){this._runTransition(e,n).subscribe(()=>{e?this.hidden.emit():this.shown.emit()})}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=I({type:i,selectors:[["","ngbCollapse",""]],hostVars:2,hostBindings:function(n,s){n&2&&H("collapse-horizontal",s.horizontal)},inputs:{animation:"animation",collapsed:[0,"ngbCollapse","collapsed"],horizontal:"horizontal"},outputs:{ngbCollapseChange:"ngbCollapseChange",shown:"shown",hidden:"hidden"},exportAs:["ngbCollapse"],standalone:!0})}}return i})(),Ru=0,Uy=(()=>{class i{constructor(){this._vcr=m(Xo),this._element=m(oe).nativeElement,this._item=m(ai),this._viewRef=null}ngAfterContentChecked(){this._bodyTpl&&(this._item._shouldBeInDOM?this._createViewIfNotExists():this._destroyViewIfExists())}ngOnDestroy(){this._destroyViewIfExists()}_destroyViewIfExists(){this._viewRef&&(this._viewRef.destroy(),this._viewRef=null)}_createViewIfNotExists(){if(!this._viewRef){this._viewRef=this._vcr.createEmbeddedView(this._bodyTpl),this._viewRef.detectChanges();for(let e of this._viewRef.rootNodes)this._element.appendChild(e)}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=I({type:i,selectors:[["","ngbAccordionBody",""]],contentQueries:function(n,s,r){if(n&1&&Tt(r,Cs,7),n&2){let o;Xe(o=et())&&(s._bodyTpl=o.first)}},hostVars:2,hostBindings:function(n,s){n&2&&H("accordion-body",!0)},standalone:!0})}}return i})(),Nu=(()=>{class i{constructor(){this.item=m(ai),this.ngbCollapse=m(hc)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=I({type:i,selectors:[["","ngbAccordionCollapse",""]],hostAttrs:["role","region"],hostVars:4,hostBindings:function(n,s){n&2&&(Et("id",s.item.collapseId),pe("aria-labelledby",s.item.toggleId),H("accordion-collapse",!0))},exportAs:["ngbAccordionCollapse"],standalone:!0,features:[Is([hc])]})}}return i})(),ku=(()=>{class i{constructor(){this.item=m(ai),this.accordion=m(vc)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=I({type:i,selectors:[["","ngbAccordionToggle",""]],hostVars:5,hostBindings:function(n,s){n&1&&le("click",function(){return!s.item.disabled&&s.accordion.toggle(s.item.id)}),n&2&&(Et("id",s.item.toggleId),pe("aria-controls",s.item.collapseId)("aria-expanded",!s.item.collapsed),H("collapsed",s.item.collapsed))},standalone:!0})}}return i})(),Hy=(()=>{class i{constructor(){this.item=m(ai)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=I({type:i,selectors:[["button","ngbAccordionButton",""]],hostAttrs:["type","button"],hostVars:3,hostBindings:function(n,s){n&2&&(Et("disabled",s.item.disabled),H("accordion-button",!0))},standalone:!0,features:[Is([ku])]})}}return i})(),$y=(()=>{class i{constructor(){this.item=m(ai)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=I({type:i,selectors:[["","ngbAccordionHeader",""]],hostAttrs:["role","heading"],hostVars:4,hostBindings:function(n,s){n&2&&H("accordion-header",!0)("collapsed",s.item.collapsed)},standalone:!0})}}return i})(),ai=(()=>{class i{constructor(){this._accordion=m(vc),this._cd=m(Yt),this._destroyRef=m(Ti),this._collapsed=!0,this._id=`ngb-accordion-item-${Ru++}`,this._collapseAnimationRunning=!1,this.disabled=!1,this.show=new L,this.shown=new L,this.hide=new L,this.hidden=new L}set id(e){fr(e)&&e!==""&&(this._id=e)}set destroyOnHide(e){this._destroyOnHide=e}get destroyOnHide(){return this._destroyOnHide===void 0?this._accordion.destroyOnHide:this._destroyOnHide}set collapsed(e){e?this.collapse():this.expand()}get collapsed(){return this._collapsed}get id(){return`${this._id}`}get toggleId(){return`${this.id}-toggle`}get collapseId(){return`${this.id}-collapse`}get _shouldBeInDOM(){return!this.collapsed||this._collapseAnimationRunning||!this.destroyOnHide}ngAfterContentInit(){let{ngbCollapse:e}=this._collapse;e.animation=!1,e.collapsed=this.collapsed,e.animation=this._accordion.animation,e.hidden.pipe(yn(this._destroyRef)).subscribe(()=>{this._collapseAnimationRunning=!1,this.hidden.emit(),this._accordion.hidden.emit(this.id)}),e.shown.pipe(yn(this._destroyRef)).subscribe(()=>{this.shown.emit(),this._accordion.shown.emit(this.id)})}toggle(){this.collapsed=!this.collapsed}expand(){if(this.collapsed){if(!this._accordion._ensureCanExpand(this))return;this._collapsed=!1,this._cd.markForCheck(),this._cd.detectChanges(),this.show.emit(),this._accordion.show.emit(this.id),this._collapse.ngbCollapse.animation=this._accordion.animation,this._collapse.ngbCollapse.collapsed=!1}}collapse(){this.collapsed||(this._collapsed=!0,this._collapseAnimationRunning=!0,this._cd.markForCheck(),this.hide.emit(),this._accordion.hide.emit(this.id),this._collapse.ngbCollapse.animation=this._accordion.animation,this._collapse.ngbCollapse.collapsed=!0)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=I({type:i,selectors:[["","ngbAccordionItem",""]],contentQueries:function(n,s,r){if(n&1&&Tt(r,Nu,7),n&2){let o;Xe(o=et())&&(s._collapse=o.first)}},hostVars:3,hostBindings:function(n,s){n&2&&(Et("id",s.id),H("accordion-item",!0))},inputs:{id:[0,"ngbAccordionItem","id"],destroyOnHide:"destroyOnHide",disabled:"disabled",collapsed:"collapsed"},outputs:{show:"show",shown:"shown",hide:"hide",hidden:"hidden"},exportAs:["ngbAccordionItem"],standalone:!0})}}return i})(),vc=(()=>{class i{constructor(){this._config=m(wu),this._anItemWasAlreadyExpandedDuringInitialisation=!1,this.animation=this._config.animation,this.closeOthers=this._config.closeOthers,this.destroyOnHide=this._config.destroyOnHide,this.show=new L,this.shown=new L,this.hide=new L,this.hidden=new L}toggle(e){this._getItem(e)?.toggle()}expand(e){this._getItem(e)?.expand()}expandAll(){this._items&&(this.closeOthers?this._items.find(e=>!e.collapsed)||this._items.first.expand():this._items.forEach(e=>e.expand()))}collapse(e){this._getItem(e)?.collapse()}collapseAll(){this._items?.forEach(e=>e.collapse())}isExpanded(e){let n=this._getItem(e);return n?!n.collapsed:!1}_ensureCanExpand(e){return this.closeOthers?this._items?(this._items.find(n=>!n.collapsed&&e!==n)?.collapse(),!0):this._anItemWasAlreadyExpandedDuringInitialisation?!1:(this._anItemWasAlreadyExpandedDuringInitialisation=!0,!0):!0}_getItem(e){return this._items?.find(n=>n.id===e)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=I({type:i,selectors:[["","ngbAccordion",""]],contentQueries:function(n,s,r){if(n&1&&Tt(r,ai,4),n&2){let o;Xe(o=et())&&(s._items=o)}},hostVars:2,hostBindings:function(n,s){n&2&&H("accordion",!0)},inputs:{animation:"animation",closeOthers:"closeOthers",destroyOnHide:"destroyOnHide"},outputs:{show:"show",shown:"shown",hide:"hide",hidden:"hidden"},exportAs:["ngbAccordion"],standalone:!0})}}return i})();var jy=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=Me({type:i})}static{this.\u0275inj=Pe({})}}return i})();var Ie=function(i){return i[i.Tab=9]="Tab",i[i.Enter=13]="Enter",i[i.Escape=27]="Escape",i[i.Space=32]="Space",i[i.PageUp=33]="PageUp",i[i.PageDown=34]="PageDown",i[i.End=35]="End",i[i.Home=36]="Home",i[i.ArrowLeft=37]="ArrowLeft",i[i.ArrowUp=38]="ArrowUp",i[i.ArrowRight=39]="ArrowRight",i[i.ArrowDown=40]="ArrowDown",i}(Ie||{});var Fn=(i,t)=>t?t.some(e=>e.contains(i)):!1,pc=(i,t)=>!t||Cu(i,t)!=null,xu=(()=>{let i=()=>/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2,t=()=>/Android/.test(navigator.userAgent);return typeof navigator<"u"?!!navigator.userAgent&&(i()||t()):!1})(),Fu=i=>xu?()=>setTimeout(()=>i(),100):i;function Bu(i,t,e,n,s,r,o,a){e&&i.runOutsideAngular(Fu(()=>{let c=f=>{let h=f.target;return f.button===2||Fn(h,o)?!1:e==="inside"?Fn(h,r)&&pc(h,a):e==="outside"?!Fn(h,r):pc(h,a)||!Fn(h,r)},l=re(t,"keydown").pipe(G(s),vt(f=>f.which===Ie.Escape),we(f=>f.preventDefault())),u=re(t,"mousedown").pipe(Oe(c),G(s)),p=re(t,"mouseup").pipe(un(u),vt(([f,h])=>h),Jo(0),G(s));bs([l.pipe(Oe(f=>0)),p.pipe(Oe(f=>1))]).subscribe(f=>i.run(()=>n(f)))}))}var yc=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(", ");function bc(i){let t=Array.from(i.querySelectorAll(yc)).filter(e=>e.tabIndex!==-1);return[t[0],t[t.length-1]]}var Lu=(i,t,e,n=!1)=>{i.runOutsideAngular(()=>{let s=re(t,"focusin").pipe(G(e),Oe(r=>r.target));re(t,"keydown").pipe(G(e),vt(r=>r.which===Ie.Tab),un(s)).subscribe(([r,o])=>{let[a,c]=bc(t);(o===a||o===t)&&r.shiftKey&&(c.focus(),r.preventDefault()),o===c&&!r.shiftKey&&(a.focus(),r.preventDefault())}),n&&re(t,"click").pipe(G(e),un(s),Oe(r=>r[1])).subscribe(r=>r.focus())})},Vu=(()=>{class i{constructor(){this._element=m(He).documentElement}isRTL(){return(this._element.getAttribute("dir")||"").toLowerCase()==="rtl"}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=N({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),Uu=/\s+/,Hu=/ +/gi,$u={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 ju(i,t){let[e,n]=$u[i];return t&&n||e}var Gu=/^left/,Wu=/^right/,zu=/^start/,qu=/^end/;function Ju(i,t){let[e,n]=t.split("-"),s=e.replace(Gu,"start").replace(Wu,"end"),r=[s];if(n){let o=n;(e==="left"||e==="right")&&(o=o.replace(zu,"top").replace(qu,"bottom")),r.push(`${s}-${o}`)}return i&&(r=r.map(o=>`${i}-${o}`)),r.join(" ")}function fc({placement:i,baseClass:t},e){let n=Array.isArray(i)?i:i.split(Uu),s=["top","bottom","start","end","top-start","top-end","bottom-start","bottom-end","start-top","start-bottom","end-top","end-bottom"],r=n.findIndex(l=>l==="auto");r>=0&&s.forEach(function(l){n.find(u=>u.search("^"+l)!==-1)==null&&n.splice(r++,1,l)});let o=n.map(l=>ju(l,e.isRTL()));return{placement:o.shift(),modifiers:[{name:"bootstrapClasses",enabled:!!t,phase:"write",fn({state:l}){let u=new RegExp(t+"(-[a-z]+)*","gi"),p=l.elements.popper,f=l.placement,h=p.className;h=h.replace(u,""),h+=` ${Ju(t,f)}`,h=h.trim().replace(Hu," "),p.className=h}},Zs,tr,qs,{enabled:!0,name:"flip",options:{fallbackPlacements:o}},{enabled:!0,name:"preventOverflow",phase:"main",fn:function(){}}]}}function mc(i){return i}function Ku(){let i=m(Vu),t=null;return{createPopper(e){if(!t){let s=(e.updatePopperOptions||mc)(fc(e,i));t=cr(e.hostElement,e.targetElement,s)}},update(){t&&t.update()},setOptions(e){if(t){let s=(e.updatePopperOptions||mc)(fc(e,i));t.setOptions(s)}},destroy(){t&&(t.destroy(),t=null)}}}function Yu(i){return t=>(t.modifiers.push(Xs,{name:"offset",options:{offset:()=>i}}),t)}var Gy=new Date(1882,10,12),Wy=new Date(2174,10,25);var zy=1e3*60*60*24;var gr=1080,Qu=24*gr,Zu=12*gr+793,qy=29*Qu+Zu,Jy=11*gr+204;var Ky=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=Me({type:i})}static{this.\u0275inj=Pe({})}}return i})(),Xu=(()=>{class i{constructor(){this.autoClose=!0,this.placement=["bottom-start","bottom-end","top-start","top-end"],this.popperOptions=e=>e,this.container=null}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=N({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),wc=(()=>{class i{constructor(){this._disabled=!1,this.nativeElement=m(oe).nativeElement,this.tabindex=0}set disabled(e){this._disabled=e===""||e===!0}get disabled(){return this._disabled}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=I({type:i,selectors:[["","ngbDropdownItem",""]],hostAttrs:[1,"dropdown-item"],hostVars:3,hostBindings:function(n,s){n&2&&(Et("tabIndex",s.disabled?-1:s.tabindex),H("disabled",s.disabled))},inputs:{tabindex:"tabindex",disabled:"disabled"},standalone:!0})}}return i})(),Yy=(()=>{class i{constructor(){this.item=m(wc)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=I({type:i,selectors:[["button","ngbDropdownItem",""]],hostVars:1,hostBindings:function(n,s){n&2&&Et("disabled",s.item.disabled)},standalone:!0})}}return i})(),eh=(()=>{class i{constructor(){this.dropdown=m(Dc),this.nativeElement=m(oe).nativeElement}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=I({type:i,selectors:[["","ngbDropdownMenu",""]],contentQueries:function(n,s,r){if(n&1&&Tt(r,wc,4),n&2){let o;Xe(o=et())&&(s.menuItems=o)}},hostVars:4,hostBindings:function(n,s){n&1&&le("keydown.ArrowUp",function(o){return s.dropdown.onKeyDown(o)})("keydown.ArrowDown",function(o){return s.dropdown.onKeyDown(o)})("keydown.Home",function(o){return s.dropdown.onKeyDown(o)})("keydown.End",function(o){return s.dropdown.onKeyDown(o)})("keydown.Enter",function(o){return s.dropdown.onKeyDown(o)})("keydown.Space",function(o){return s.dropdown.onKeyDown(o)})("keydown.Tab",function(o){return s.dropdown.onKeyDown(o)})("keydown.Shift.Tab",function(o){return s.dropdown.onKeyDown(o)}),n&2&&H("dropdown-menu",!0)("show",s.dropdown.isOpen())},standalone:!0})}}return i})(),dr=(()=>{class i{constructor(){this.dropdown=m(Dc),this.nativeElement=m(oe).nativeElement}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=I({type:i,selectors:[["","ngbDropdownAnchor",""]],hostAttrs:[1,"dropdown-toggle"],hostVars:3,hostBindings:function(n,s){n&2&&(pe("aria-expanded",s.dropdown.isOpen()),H("show",s.dropdown.isOpen()))},standalone:!0})}}return i})(),Qy=(()=>{class i extends dr{static{this.\u0275fac=(()=>{let e;return function(s){return(e||(e=Ei(i)))(s||i)}})()}static{this.\u0275dir=I({type:i,selectors:[["","ngbDropdownToggle",""]],hostAttrs:[1,"dropdown-toggle"],hostVars:3,hostBindings:function(n,s){n&1&&le("click",function(){return s.dropdown.toggle()})("keydown.ArrowUp",function(o){return s.dropdown.onKeyDown(o)})("keydown.ArrowDown",function(o){return s.dropdown.onKeyDown(o)})("keydown.Home",function(o){return s.dropdown.onKeyDown(o)})("keydown.End",function(o){return s.dropdown.onKeyDown(o)})("keydown.Tab",function(o){return s.dropdown.onKeyDown(o)})("keydown.Shift.Tab",function(o){return s.dropdown.onKeyDown(o)}),n&2&&(pe("aria-expanded",s.dropdown.isOpen()),H("show",s.dropdown.isOpen()))},standalone:!0,features:[Ue([{provide:dr,useExisting:Ve(()=>i)}]),he]})}}return i})(),Dc=(()=>{class i{constructor(){this._changeDetector=m(Yt),this._config=m(Xu),this._document=m(He),this._ngZone=m(ne),this._nativeElement=m(oe).nativeElement,this._destroyCloseHandlers$=new R,this._bodyContainer=null,this._positioning=Ku(),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 L}ngOnInit(){this.display||(this.display=this._nativeElement.closest(".navbar")?"static":"dynamic")}ngAfterContentInit(){this._ngZone.onStable.pipe(Qe(1)).subscribe(()=>{this._applyPlacementClasses(),this._open&&this._setCloseHandlers()})}ngOnChanges(e){if(e.container&&this._open&&this._applyContainer(this.container),e.placement&&!e.placement.firstChange&&(this._positioning.setOptions({hostElement:this._anchor.nativeElement,targetElement:this._bodyContainer||this._menu.nativeElement,placement:this.placement,appendToBody:this.container==="body"}),this._applyPlacementClasses()),e.dropdownClass){let{currentValue:n,previousValue:s}=e.dropdownClass;this._applyCustomDropdownClass(n,s)}e.autoClose&&this._open&&(this.autoClose=e.autoClose.currentValue,this._setCloseHandlers())}isOpen(){return this._open}open(){this._open||(this._open=!0,this._applyContainer(this.container),this.openChange.emit(!0),this._setCloseHandlers(),this._anchor&&(this._anchor.nativeElement.focus(),this.display==="dynamic"&&this._ngZone.runOutsideAngular(()=>{this._positioning.createPopper({hostElement:this._anchor.nativeElement,targetElement:this._bodyContainer||this._menu.nativeElement,placement:this.placement,appendToBody:this.container==="body",updatePopperOptions:e=>this.popperOptions(Yu([0,2])(e))}),this._applyPlacementClasses(),this._zoneSubscription=this._ngZone.onStable.subscribe(()=>this._positionMenu())})))}_setCloseHandlers(){this._destroyCloseHandlers$.next(),Bu(this._ngZone,this._document,this.autoClose,e=>{this.close(),e===0&&this._anchor.nativeElement.focus()},this._destroyCloseHandlers$,this._menu?[this._menu.nativeElement]:[],this._anchor?[this._anchor.nativeElement]:[],".dropdown-item,.dropdown-divider")}close(){this._open&&(this._open=!1,this._resetContainer(),this._positioning.destroy(),this._zoneSubscription?.unsubscribe(),this._destroyCloseHandlers$.next(),this.openChange.emit(!1),this._changeDetector.markForCheck())}toggle(){this.isOpen()?this.close():this.open()}ngOnDestroy(){this.close()}onKeyDown(e){let n=e.which,s=this._getMenuElements(),r=-1,o=null,a=this._isEventFromToggle(e);if(!a&&s.length&&s.forEach((c,l)=>{c.contains(e.target)&&(o=c),c===_c(this._document)&&(r=l)}),n===Ie.Space||n===Ie.Enter){o&&(this.autoClose===!0||this.autoClose==="inside")&&re(o,"click").pipe(Qe(1)).subscribe(()=>this.close());return}if(n===Ie.Tab){if(e.target&&this.isOpen()&&this.autoClose)if(this._anchor.nativeElement===e.target){this.container==="body"&&!e.shiftKey?(this._menu.nativeElement.setAttribute("tabindex","0"),this._menu.nativeElement.focus(),this._menu.nativeElement.removeAttribute("tabindex")):e.shiftKey&&this.close();return}else if(this.container==="body"){let c=this._menu.nativeElement.querySelectorAll(yc);e.shiftKey&&e.target===c[0]?(this._anchor.nativeElement.focus(),e.preventDefault()):!e.shiftKey&&e.target===c[c.length-1]&&(this._anchor.nativeElement.focus(),this.close())}else re(e.target,"focusout").pipe(Qe(1)).subscribe(({relatedTarget:c})=>{this._nativeElement.contains(c)||this.close()});return}if(a||o){if(this.open(),s.length){switch(n){case Ie.ArrowDown:r=Math.min(r+1,s.length-1);break;case Ie.ArrowUp:if(this._isDropup()&&r===-1){r=s.length-1;break}r=Math.max(r-1,0);break;case Ie.Home:r=0;break;case Ie.End:r=s.length-1;break}s[r].focus()}e.preventDefault()}}_isDropup(){return this._nativeElement.classList.contains("dropup")}_isEventFromToggle(e){return this._anchor.nativeElement.contains(e.target)}_getMenuElements(){return this._menu?this._menu.menuItems.filter(({disabled:e})=>!e).map(({nativeElement:e})=>e):[]}_positionMenu(){let e=this._menu;this.isOpen()&&e&&(this.display==="dynamic"?(this._positioning.update(),this._applyPlacementClasses()):this._applyPlacementClasses(this._getFirstPlacement(this.placement)))}_getFirstPlacement(e){return Array.isArray(e)?e[0]:e.split(" ")[0]}_resetContainer(){this._menu&&this._nativeElement.appendChild(this._menu.nativeElement),this._bodyContainer&&(this._document.body.removeChild(this._bodyContainer),this._bodyContainer=null)}_applyContainer(e=null){if(this._resetContainer(),e==="body"){let n=this._menu.nativeElement,s=this._bodyContainer=this._bodyContainer||this._document.createElement("div");s.style.position="absolute",n.style.position="static",s.style.zIndex="1055",s.appendChild(n),this._document.body.appendChild(s)}this._applyCustomDropdownClass(this.dropdownClass)}_applyCustomDropdownClass(e,n){let s=this.container==="body"?this._bodyContainer:this._nativeElement;s&&(n&&s.classList.remove(n),e&&s.classList.add(e))}_applyPlacementClasses(e){if(this._menu){e||(e=this._getFirstPlacement(this.placement)),this._nativeElement.classList.remove("dropup","dropdown"),this.display==="static"?this._menu.nativeElement.setAttribute("data-bs-popper","static"):this._menu.nativeElement.removeAttribute("data-bs-popper");let n=e.search("^top")!==-1?"dropup":"dropdown";this._nativeElement.classList.add(n),this._bodyContainer&&(this._bodyContainer.classList.remove("dropup","dropdown"),this._bodyContainer.classList.add(n))}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=I({type:i,selectors:[["","ngbDropdown",""]],contentQueries:function(n,s,r){if(n&1&&(Tt(r,eh,5),Tt(r,dr,5)),n&2){let o;Xe(o=et())&&(s._menu=o.first),Xe(o=et())&&(s._anchor=o.first)}},hostVars:2,hostBindings:function(n,s){n&2&&H("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:[wt]})}}return i})();var Zy=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=Me({type:i})}static{this.\u0275inj=Pe({})}}return i})(),th=(()=>{class i{constructor(){this._ngbConfig=m(pr),this.backdrop=!0,this.fullscreen=!1,this.keyboard=!0}get animation(){return this._animation??this._ngbConfig.animation}set animation(e){this._animation=e}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=N({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),oi=class{constructor(t,e,n){this.nodes=t,this.viewRef=e,this.componentRef=n}};var ih=(()=>{class i{constructor(){this._document=m(He)}hide(){let e=Math.abs(window.innerWidth-this._document.documentElement.clientWidth),n=this._document.body,s=n.style,{overflow:r,paddingRight:o}=s;if(e>0){let a=parseFloat(window.getComputedStyle(n).paddingRight);s.paddingRight=`${a+e}px`}return s.overflow="hidden",()=>{e>0&&(s.paddingRight=o),s.overflow=r}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=N({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),nh=(()=>{class i{constructor(){this._nativeElement=m(oe).nativeElement,this._zone=m(ne)}ngOnInit(){this._zone.onStable.asObservable().pipe(Qe(1)).subscribe(()=>{ct(this._zone,this._nativeElement,(e,n)=>{n&&mr(e),e.classList.add("show")},{animation:this.animation,runningTransition:"continue"})})}hide(){return ct(this._zone,this._nativeElement,({classList:e})=>e.remove("show"),{animation:this.animation,runningTransition:"stop"})}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=bt({type:i,selectors:[["ngb-modal-backdrop"]],hostAttrs:[2,"z-index","1055"],hostVars:6,hostBindings:function(n,s){n&2&&(ae("modal-backdrop"+(s.backdropClass?" "+s.backdropClass:"")),H("show",!s.animation)("fade",s.animation))},inputs:{animation:"animation",backdropClass:"backdropClass"},standalone:!0,features:[Ct],decls:0,vars:0,template:function(n,s){},encapsulation:2})}}return i})(),Bn=class{update(t){}close(t){}dismiss(t){}},sh=["animation","ariaLabelledBy","ariaDescribedBy","backdrop","centered","fullscreen","keyboard","scrollable","size","windowClass","modalDialogClass"],rh=["animation","backdropClass"],ur=class{_applyWindowOptions(t,e){sh.forEach(n=>{lr(e[n])&&(t[n]=e[n])})}_applyBackdropOptions(t,e){rh.forEach(n=>{lr(e[n])&&(t[n]=e[n])})}update(t){this._applyWindowOptions(this._windowCmptRef.instance,t),this._backdropCmptRef&&this._backdropCmptRef.instance&&this._applyBackdropOptions(this._backdropCmptRef.instance,t)}get componentInstance(){if(this._contentRef&&this._contentRef.componentRef)return this._contentRef.componentRef.instance}get closed(){return this._closed.asObservable().pipe(G(this._hidden))}get dismissed(){return this._dismissed.asObservable().pipe(G(this._hidden))}get hidden(){return this._hidden.asObservable()}get shown(){return this._windowCmptRef.instance.shown.asObservable()}constructor(t,e,n,s){this._windowCmptRef=t,this._contentRef=e,this._backdropCmptRef=n,this._beforeDismiss=s,this._closed=new R,this._dismissed=new R,this._hidden=new R,t.instance.dismissEvent.subscribe(r=>{this.dismiss(r)}),this.result=new Promise((r,o)=>{this._resolve=r,this._reject=o}),this.result.then(null,()=>{})}close(t){this._windowCmptRef&&(this._closed.next(t),this._resolve(t),this._removeModalElements())}_dismiss(t){this._dismissed.next(t),this._reject(t),this._removeModalElements()}dismiss(t){if(this._windowCmptRef)if(!this._beforeDismiss)this._dismiss(t);else{let e=this._beforeDismiss();Eu(e)?e.then(n=>{n!==!1&&this._dismiss(t)},()=>{}):e!==!1&&this._dismiss(t)}}_removeModalElements(){let t=this._windowCmptRef.instance.hide(),e=this._backdropCmptRef?this._backdropCmptRef.instance.hide():_t(void 0);t.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}),e.subscribe(()=>{if(this._backdropCmptRef){let{nativeElement:n}=this._backdropCmptRef.location;n.parentNode.removeChild(n),this._backdropCmptRef.destroy(),this._backdropCmptRef=null}}),ln(t,e).subscribe(()=>{this._hidden.next(),this._hidden.complete()})}},hr=function(i){return i[i.BACKDROP_CLICK=0]="BACKDROP_CLICK",i[i.ESC=1]="ESC",i}(hr||{}),oh=(()=>{class i{constructor(){this._document=m(He),this._elRef=m(oe),this._zone=m(ne),this._closed$=new R,this._elWithFocus=null,this.backdrop=!0,this.keyboard=!0,this.dismissEvent=new L,this.shown=new R,this.hidden=new R}get fullscreenClass(){return this.fullscreen===!0?" modal-fullscreen":fr(this.fullscreen)?` modal-fullscreen-${this.fullscreen}-down`:""}dismiss(e){this.dismissEvent.emit(e)}ngOnInit(){this._elWithFocus=this._document.activeElement,this._zone.onStable.asObservable().pipe(Qe(1)).subscribe(()=>{this._show()})}ngOnDestroy(){this._disableEventHandling()}hide(){let{nativeElement:e}=this._elRef,n={animation:this.animation,runningTransition:"stop"},s=ct(this._zone,e,()=>e.classList.remove("show"),n),r=ct(this._zone,this._dialogEl.nativeElement,()=>{},n),o=ln(s,r);return o.subscribe(()=>{this.hidden.next(),this.hidden.complete()}),this._disableEventHandling(),this._restoreFocus(),o}_show(){let e={animation:this.animation,runningTransition:"continue"},n=ct(this._zone,this._elRef.nativeElement,(r,o)=>{o&&mr(r),r.classList.add("show")},e),s=ct(this._zone,this._dialogEl.nativeElement,()=>{},e);ln(n,s).subscribe(()=>{this.shown.next(),this.shown.complete()}),this._enableEventHandling(),this._setFocus()}_enableEventHandling(){let{nativeElement:e}=this._elRef;this._zone.runOutsideAngular(()=>{re(e,"keydown").pipe(G(this._closed$),vt(s=>s.which===Ie.Escape)).subscribe(s=>{this.keyboard?requestAnimationFrame(()=>{s.defaultPrevented||this._zone.run(()=>this.dismiss(hr.ESC))}):this.backdrop==="static"&&this._bumpBackdrop()});let n=!1;re(this._dialogEl.nativeElement,"mousedown").pipe(G(this._closed$),we(()=>n=!1),dn(()=>re(e,"mouseup").pipe(G(this._closed$),Qe(1))),vt(({target:s})=>e===s)).subscribe(()=>{n=!0}),re(e,"click").pipe(G(this._closed$)).subscribe(({target:s})=>{e===s&&(this.backdrop==="static"?this._bumpBackdrop():this.backdrop===!0&&!n&&this._zone.run(()=>this.dismiss(hr.BACKDROP_CLICK))),n=!1})})}_disableEventHandling(){this._closed$.next()}_setFocus(){let{nativeElement:e}=this._elRef;if(!e.contains(document.activeElement)){let n=e.querySelector("[ngbAutofocus]"),s=bc(e)[0];(n||s||e).focus()}}_restoreFocus(){let e=this._document.body,n=this._elWithFocus,s;n&&n.focus&&e.contains(n)?s=n:s=e,this._zone.runOutsideAngular(()=>{setTimeout(()=>s.focus()),this._elWithFocus=null})}_bumpBackdrop(){this.backdrop==="static"&&ct(this._zone,this._elRef.nativeElement,({classList:e})=>(e.add("modal-static"),()=>e.remove("modal-static")),{animation:this.animation,runningTransition:"continue"})}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=bt({type:i,selectors:[["ngb-modal-window"]],viewQuery:function(n,s){if(n&1&&aa(_u,7),n&2){let r;Xe(r=et())&&(s._dialogEl=r.first)}},hostAttrs:["role","dialog","tabindex","-1"],hostVars:7,hostBindings:function(n,s){n&2&&(pe("aria-modal",!0)("aria-labelledby",s.ariaLabelledBy)("aria-describedby",s.ariaDescribedBy),ae("modal d-block"+(s.windowClass?" "+s.windowClass:"")),H("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:[Ct],ngContentSelectors:gu,decls:4,vars:2,consts:[["dialog",""],["role","document"],[1,"modal-content"]],template:function(n,s){n&1&&(ra(),ce(0,"div",1,0)(2,"div",2),oa(3),fe()()),n&2&&ae("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}
2
- `],encapsulation:2})}}return i})(),ah=(()=>{class i{constructor(){this._applicationRef=m(Kt),this._injector=m(Z),this._environmentInjector=m(ws),this._document=m(He),this._scrollBar=m(ih),this._activeWindowCmptHasChanged=new R,this._ariaHiddenValues=new Map,this._scrollBarRestoreFn=null,this._modalRefs=[],this._windowCmpts=[],this._activeInstances=new L;let e=m(ne);this._activeWindowCmptHasChanged.subscribe(()=>{if(this._windowCmpts.length){let n=this._windowCmpts[this._windowCmpts.length-1];Lu(e,n.location.nativeElement,this._activeWindowCmptHasChanged),this._revertAriaHidden(),this._setAriaHidden(n.location.nativeElement)}})}_restoreScrollBar(){let e=this._scrollBarRestoreFn;e&&(this._scrollBarRestoreFn=null,e())}_hideScrollBar(){this._scrollBarRestoreFn||(this._scrollBarRestoreFn=this._scrollBar.hide())}open(e,n,s){let r=s.container instanceof HTMLElement?s.container:lr(s.container)?this._document.querySelector(s.container):this._document.body;if(!r)throw new Error(`The specified modal container "${s.container||"body"}" was not found in the DOM.`);this._hideScrollBar();let o=new Bn;e=s.injector||e;let a=e.get(ws,null)||this._environmentInjector,c=this._getContentRef(e,a,n,o,s),l=s.backdrop!==!1?this._attachBackdrop(r):void 0,u=this._attachWindowComponent(r,c.nodes),p=new ur(u,c,l,s.beforeDismiss);return this._registerModalRef(p),this._registerWindowCmpt(u),p.hidden.pipe(Qe(1)).subscribe(()=>Promise.resolve(!0).then(()=>{this._modalRefs.length||(this._document.body.classList.remove("modal-open"),this._restoreScrollBar(),this._revertAriaHidden())})),o.close=f=>{p.close(f)},o.dismiss=f=>{p.dismiss(f)},o.update=f=>{p.update(f)},p.update(s),this._modalRefs.length===1&&this._document.body.classList.add("modal-open"),l&&l.instance&&l.changeDetectorRef.detectChanges(),u.changeDetectorRef.detectChanges(),p}get activeInstances(){return this._activeInstances}dismissAll(e){this._modalRefs.forEach(n=>n.dismiss(e))}hasOpenModals(){return this._modalRefs.length>0}_attachBackdrop(e){let n=gn(nh,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector});return this._applicationRef.attachView(n.hostView),e.appendChild(n.location.nativeElement),n}_attachWindowComponent(e,n){let s=gn(oh,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector,projectableNodes:n});return this._applicationRef.attachView(s.hostView),e.appendChild(s.location.nativeElement),s}_getContentRef(e,n,s,r,o){return s?s instanceof Cs?this._createFromTemplateRef(s,r):fr(s)?this._createFromString(s):this._createFromComponent(e,n,s,r,o):new oi([])}_createFromTemplateRef(e,n){let s={$implicit:n,close(o){n.close(o)},dismiss(o){n.dismiss(o)}},r=e.createEmbeddedView(s);return this._applicationRef.attachView(r),new oi([r.rootNodes],r)}_createFromString(e){let n=this._document.createTextNode(`${e}`);return new oi([[n]])}_createFromComponent(e,n,s,r,o){let a=Z.create({providers:[{provide:Bn,useValue:r}],parent:e}),c=gn(s,{environmentInjector:n,elementInjector:a}),l=c.location.nativeElement;return o.scrollable&&l.classList.add("component-host-scrollable"),this._applicationRef.attachView(c.hostView),new oi([[l]],c.hostView,c)}_setAriaHidden(e){let n=e.parentElement;n&&e!==this._document.body&&(Array.from(n.children).forEach(s=>{s!==e&&s.nodeName!=="SCRIPT"&&(this._ariaHiddenValues.set(s,s.getAttribute("aria-hidden")),s.setAttribute("aria-hidden","true"))}),this._setAriaHidden(n))}_revertAriaHidden(){this._ariaHiddenValues.forEach((e,n)=>{e?n.setAttribute("aria-hidden",e):n.removeAttribute("aria-hidden")}),this._ariaHiddenValues.clear()}_registerModalRef(e){let n=()=>{let s=this._modalRefs.indexOf(e);s>-1&&(this._modalRefs.splice(s,1),this._activeInstances.emit(this._modalRefs))};this._modalRefs.push(e),this._activeInstances.emit(this._modalRefs),e.result.then(n,n)}_registerWindowCmpt(e){this._windowCmpts.push(e),this._activeWindowCmptHasChanged.next(),e.onDestroy(()=>{let n=this._windowCmpts.indexOf(e);n>-1&&(this._windowCmpts.splice(n,1),this._activeWindowCmptHasChanged.next())})}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=N({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),Xy=(()=>{class i{constructor(){this._injector=m(Z),this._modalStack=m(ah),this._config=m(th)}open(e,n={}){let s=b(B(b({},this._config),{animation:this._config.animation}),n);return this._modalStack.open(this._injector,e,s)}get activeInstances(){return this._modalStack.activeInstances}dismissAll(e){this._modalStack.dismissAll(e)}hasOpenModals(){return this._modalStack.hasOpenModals()}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=N({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var eb=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=Me({type:i})}static{this.\u0275inj=Pe({})}}return i})();var tb=(()=>{class i{constructor(){this.highlightClass="ngb-highlight",this.accentSensitive=!0}ngOnChanges(e){!this.accentSensitive&&!String.prototype.normalize&&(console.warn("The `accentSensitive` input in `ngb-highlight` cannot be set to `false` in a browser that does not implement the `String.normalize` function. You will have to include a polyfill in your application to use this feature in the current browser."),this.accentSensitive=!0);let n=dc(this.result),s=Array.isArray(this.term)?this.term:[this.term],r=l=>this.accentSensitive?l:uc(l),o=s.map(l=>Tu(r(dc(l)))).filter(l=>l),a=this.accentSensitive?n:uc(n),c=o.length?a.split(new RegExp(`(${o.join("|")})`,"gmi")):[n];if(this.accentSensitive)this.parts=c;else{let l=0;this.parts=c.map(u=>n.substring(l,l+=u.length))}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=bt({type:i,selectors:[["ngb-highlight"]],inputs:{highlightClass:"highlightClass",result:"result",term:"term",accentSensitive:"accentSensitive"},standalone:!0,features:[wt,Ct],decls:2,vars:0,consts:[[3,"class"]],template:function(n,s){n&1&&ia(0,bu,2,1,null,null,ta),n&2&&na(s.parts)},styles:[`.ngb-highlight{font-weight:700}
3
- `],encapsulation:2,changeDetection:0})}}return i})(),ib=new ie("live announcer delay",{providedIn:"root",factory:()=>100});var Ec=["toast-component",""];function ch(i,t){if(i&1){let e=mn();ce(0,"button",5),le("click",function(){hn(e);let s=J();return pn(s.remove())}),ce(1,"span",6),me(2,"\xD7"),fe()()}}function lh(i,t){if(i&1&&(Ci(0),me(1),Ii()),i&2){let e=J(2);x(),tt("[",e.duplicatesCount+1,"]")}}function dh(i,t){if(i&1&&(ce(0,"div"),me(1),Dt(2,lh,2,1,"ng-container",4),fe()),i&2){let e=J();ae(e.options.titleClass),pe("aria-label",e.title),x(),tt(" ",e.title," "),x(),X("ngIf",e.duplicatesCount)}}function uh(i,t){if(i&1&&Jt(0,"div",7),i&2){let e=J();ae(e.options.messageClass),X("innerHTML",e.message,Ts)}}function hh(i,t){if(i&1&&(ce(0,"div",8),me(1),fe()),i&2){let e=J();ae(e.options.messageClass),pe("aria-label",e.message),x(),tt(" ",e.message," ")}}function ph(i,t){if(i&1&&(ce(0,"div"),Jt(1,"div",9),fe()),i&2){let e=J();x(),qt("width",e.width()+"%")}}function fh(i,t){if(i&1){let e=mn();ce(0,"button",5),le("click",function(){hn(e);let s=J();return pn(s.remove())}),ce(1,"span",6),me(2,"\xD7"),fe()()}}function mh(i,t){if(i&1&&(Ci(0),me(1),Ii()),i&2){let e=J(2);x(),tt("[",e.duplicatesCount+1,"]")}}function gh(i,t){if(i&1&&(ce(0,"div"),me(1),Dt(2,mh,2,1,"ng-container",4),fe()),i&2){let e=J();ae(e.options.titleClass),pe("aria-label",e.title),x(),tt(" ",e.title," "),x(),X("ngIf",e.duplicatesCount)}}function _h(i,t){if(i&1&&Jt(0,"div",7),i&2){let e=J();ae(e.options.messageClass),X("innerHTML",e.message,Ts)}}function vh(i,t){if(i&1&&(ce(0,"div",8),me(1),fe()),i&2){let e=J();ae(e.options.messageClass),pe("aria-label",e.message),x(),tt(" ",e.message," ")}}function yh(i,t){if(i&1&&(ce(0,"div"),Jt(1,"div",9),fe()),i&2){let e=J();x(),qt("width",e.width()+"%")}}var _r=class{_attachedHost;component;viewContainerRef;injector;constructor(t,e){this.component=t,this.injector=e}attach(t,e){return this._attachedHost=t,t.attach(this,e)}detach(){let t=this._attachedHost;if(t)return this._attachedHost=void 0,t.detach()}get isAttached(){return this._attachedHost!=null}setAttachedHost(t){this._attachedHost=t}},vr=class{_attachedPortal;_disposeFn;attach(t,e){return this._attachedPortal=t,this.attachComponentPortal(t,e)}detach(){this._attachedPortal&&this._attachedPortal.setAttachedHost(),this._attachedPortal=void 0,this._disposeFn&&(this._disposeFn(),this._disposeFn=void 0)}setDisposeFn(t){this._disposeFn=t}},yr=class{_overlayRef;componentInstance;duplicatesCount=0;_afterClosed=new R;_activate=new R;_manualClose=new R;_resetTimeout=new R;_countDuplicate=new R;constructor(t){this._overlayRef=t}manualClose(){this._manualClose.next(),this._manualClose.complete()}manualClosed(){return this._manualClose.asObservable()}timeoutReset(){return this._resetTimeout.asObservable()}countDuplicate(){return this._countDuplicate.asObservable()}close(){this._overlayRef.detach(),this._afterClosed.next(),this._manualClose.next(),this._afterClosed.complete(),this._manualClose.complete(),this._activate.complete(),this._resetTimeout.complete(),this._countDuplicate.complete()}afterClosed(){return this._afterClosed.asObservable()}isInactive(){return this._activate.isStopped}activate(){this._activate.next(),this._activate.complete()}afterActivate(){return this._activate.asObservable()}onDuplicate(t,e){t&&this._resetTimeout.next(),e&&this._countDuplicate.next(++this.duplicatesCount)}},ci=class{toastId;config;message;title;toastType;toastRef;_onTap=new R;_onAction=new R;constructor(t,e,n,s,r,o){this.toastId=t,this.config=e,this.message=n,this.title=s,this.toastType=r,this.toastRef=o,this.toastRef.afterClosed().subscribe(()=>{this._onAction.complete(),this._onTap.complete()})}triggerTap(){this._onTap.next(),this.config.tapToDismiss&&this._onTap.complete()}onTap(){return this._onTap.asObservable()}triggerAction(t){this._onAction.next(t)}onAction(){return this._onAction.asObservable()}},Tc={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"},Cc=new ie("ToastConfig"),br=class extends vr{_hostDomElement;_componentFactoryResolver;_appRef;constructor(t,e,n){super(),this._hostDomElement=t,this._componentFactoryResolver=e,this._appRef=n}attachComponentPortal(t,e){let n=this._componentFactoryResolver.resolveComponentFactory(t.component),s;return s=n.create(t.injector),this._appRef.attachView(s.hostView),this.setDisposeFn(()=>{this._appRef.detachView(s.hostView),s.destroy()}),e?this._hostDomElement.insertBefore(this._getComponentRootNode(s),this._hostDomElement.firstChild):this._hostDomElement.appendChild(this._getComponentRootNode(s)),s}_getComponentRootNode(t){return t.hostView.rootNodes[0]}},bh=(()=>{class i{_document=m(He);_containerElement;ngOnDestroy(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let e=this._document.createElement("div");e.classList.add("overlay-container"),e.setAttribute("aria-live","polite"),this._document.body.appendChild(e),this._containerElement=e}static \u0275fac=function(n){return new(n||i)};static \u0275prov=N({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),wr=class{_portalHost;constructor(t){this._portalHost=t}attach(t,e=!0){return this._portalHost.attach(t,e)}detach(){return this._portalHost.detach()}},wh=(()=>{class i{_overlayContainer=m(bh);_componentFactoryResolver=m(Zo);_appRef=m(Kt);_document=m(He);_paneElements=new Map;create(e,n){return this._createOverlayRef(this.getPaneElement(e,n))}getPaneElement(e="",n){return this._paneElements.get(n)||this._paneElements.set(n,{}),this._paneElements.get(n)[e]||(this._paneElements.get(n)[e]=this._createPaneElement(e,n)),this._paneElements.get(n)[e]}_createPaneElement(e,n){let s=this._document.createElement("div");return s.id="toast-container",s.classList.add(e),s.classList.add("toast-container"),n?n.getContainerElement().appendChild(s):this._overlayContainer.getContainerElement().appendChild(s),s}_createPortalHost(e){return new br(e,this._componentFactoryResolver,this._appRef)}_createOverlayRef(e){return new wr(this._createPortalHost(e))}static \u0275fac=function(n){return new(n||i)};static \u0275prov=N({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Ln=(()=>{class i{overlay;_injector;sanitizer;ngZone;toastrConfig;currentlyActive=0;toasts=[];overlayContainer;previousToastMessage;index=0;constructor(e,n,s,r,o){this.overlay=n,this._injector=s,this.sanitizer=r,this.ngZone=o,this.toastrConfig=b(b({},e.default),e.config),e.config.iconClasses&&(this.toastrConfig.iconClasses=b(b({},e.default.iconClasses),e.config.iconClasses))}show(e,n,s={},r=""){return this._preBuildNotification(r,e,n,this.applyConfig(s))}success(e,n,s={}){let r=this.toastrConfig.iconClasses.success||"";return this._preBuildNotification(r,e,n,this.applyConfig(s))}error(e,n,s={}){let r=this.toastrConfig.iconClasses.error||"";return this._preBuildNotification(r,e,n,this.applyConfig(s))}info(e,n,s={}){let r=this.toastrConfig.iconClasses.info||"";return this._preBuildNotification(r,e,n,this.applyConfig(s))}warning(e,n,s={}){let r=this.toastrConfig.iconClasses.warning||"";return this._preBuildNotification(r,e,n,this.applyConfig(s))}clear(e){for(let n of this.toasts)if(e!==void 0){if(n.toastId===e){n.toastRef.manualClose();return}}else n.toastRef.manualClose()}remove(e){let n=this._findToast(e);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 s=this.toasts[this.currentlyActive].toastRef;s.isInactive()||(this.currentlyActive=this.currentlyActive+1,s.activate())}return!0}findDuplicate(e="",n="",s,r){let{includeTitleDuplicates:o}=this.toastrConfig;for(let a of this.toasts){let c=o&&a.title===e;if((!o||c)&&a.message===n)return a.toastRef.onDuplicate(s,r),a}return null}applyConfig(e={}){return b(b({},this.toastrConfig),e)}_findToast(e){for(let n=0;n<this.toasts.length;n++)if(this.toasts[n].toastId===e)return{index:n,activeToast:this.toasts[n]};return null}_preBuildNotification(e,n,s,r){return r.onActivateTick?this.ngZone.run(()=>this._buildNotification(e,n,s,r)):this._buildNotification(e,n,s,r)}_buildNotification(e,n,s,r){if(!r.toastComponent)throw new Error("toastComponent required");let o=this.findDuplicate(s,n,this.toastrConfig.resetTimeoutOnDuplicate&&r.timeOut>0,this.toastrConfig.countDuplicates);if((this.toastrConfig.includeTitleDuplicates&&s||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(r.positionClass,this.overlayContainer);this.index=this.index+1;let l=n;n&&r.enableHtml&&(l=this.sanitizer.sanitize(Qo.HTML,n));let u=new yr(c),p=new ci(this.index,r,l,s,e,u),f=[{provide:ci,useValue:p}],h=Z.create({providers:f,parent:this._injector}),D=new _r(r.toastComponent,h),y=c.attach(D,r.newestOnTop);u.componentInstance=y.instance;let _={toastId:this.index,title:s||"",message:n||"",toastRef:u,onShown:u.afterActivate(),onHidden:u.afterClosed(),onTap:p.onTap(),onAction:p.onAction(),portal:y};return a||(this.currentlyActive=this.currentlyActive+1,setTimeout(()=>{_.toastRef.activate()})),this.toasts.push(_),_}static \u0275fac=function(n){return new(n||i)(Ze(Cc),Ze(wh),Ze(Z),Ze(fa),Ze(ne))};static \u0275prov=N({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Dh=(()=>{class i{toastrService;toastPackage;ngZone;message;title;options;duplicatesCount;originalTimeout;width=De(-1);toastClasses="";state;get _state(){return this.state()}get displayStyle(){if(this.state().value==="inactive")return"none"}timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(e,n,s){this.toastrService=e,this.toastPackage=n,this.ngZone=s,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(r=>{this.duplicatesCount=r}),this.state=De({value:"inactive",params:{easeTime:this.toastPackage.config.easeTime,easing:"ease-in"}})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.update(e=>B(b({},e),{value:"active"})),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.outsideTimeout(()=>this.remove(),this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}updateProgress(){if(this.width()===0||this.width()===100||!this.options.timeOut)return;let e=new Date().getTime(),n=this.hideTime-e;this.width.set(n/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(s=>100-s),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.update(e=>B(b({},e),{value:"active"})),this.outsideTimeout(()=>this.remove(),this.originalTimeout),this.options.timeOut=this.originalTimeout,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10)}remove(){this.state().value!=="removed"&&(clearTimeout(this.timeout),this.state.update(e=>B(b({},e),{value:"removed"})),this.outsideTimeout(()=>this.toastrService.remove(this.toastPackage.toastId),+this.toastPackage.config.easeTime))}tapToast(){this.state().value!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state().value!=="removed"&&this.options.disableTimeOut!=="extendedTimeOut"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width.set(0))}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state().value==="removed"||(this.outsideTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}outsideTimeout(e,n){this.ngZone?this.ngZone.runOutsideAngular(()=>this.timeout=setTimeout(()=>this.runInsideAngular(e),n)):this.timeout=setTimeout(()=>e(),n)}outsideInterval(e,n){this.ngZone?this.ngZone.runOutsideAngular(()=>this.intervalId=setInterval(()=>this.runInsideAngular(e),n)):this.intervalId=setInterval(()=>e(),n)}runInsideAngular(e){this.ngZone?this.ngZone.run(()=>e()):e()}static \u0275fac=function(n){return new(n||i)(w(Ln),w(ci),w(ne))};static \u0275cmp=bt({type:i,selectors:[["","toast-component",""]],hostVars:5,hostBindings:function(n,s){n&1&&le("click",function(){return s.tapToast()})("mouseenter",function(){return s.stickAround()})("mouseleave",function(){return s.delayedHideToast()}),n&2&&(sa("@flyInOut",s._state),ae(s.toastClasses),qt("display",s.displayStyle))},standalone:!0,features:[Ct],attrs:Ec,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,s){n&1&&Dt(0,ch,3,0,"button",0)(1,dh,3,5,"div",1)(2,uh,1,3,"div",2)(3,hh,2,4,"div",3)(4,ph,2,2,"div",4),n&2&&(X("ngIf",s.options.closeButton),x(),X("ngIf",s.title),x(),X("ngIf",s.message&&s.options.enableHtml),x(),X("ngIf",s.message&&!s.options.enableHtml),x(),X("ngIf",s.options.progressBar))},dependencies:[Ps],encapsulation:2,data:{animation:[_a("flyInOut",[vn("inactive",_n({opacity:0})),vn("active",_n({opacity:1})),vn("removed",_n({opacity:0})),Rs("inactive => active",Ms("{{ easeTime }}ms {{ easing }}")),Rs("active => removed",Ms("{{ easeTime }}ms {{ easing }}"))])]},changeDetection:0})}return i})(),Eh=B(b({},Tc),{toastComponent:Dh}),vb=(i={})=>zt([{provide:Cc,useValue:{default:Eh,config:i}}]);var Th=(()=>{class i{toastrService;toastPackage;appRef;message;title;options;duplicatesCount;originalTimeout;width=De(-1);toastClasses="";get displayStyle(){return this.state()==="inactive"?"none":null}state=De("inactive");timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(e,n,s){this.toastrService=e,this.toastPackage=n,this.appRef=s,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(r=>{this.duplicatesCount=r})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.set("active"),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.timeout=setTimeout(()=>{this.remove()},this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))),this.options.onActivateTick&&this.appRef.tick()}updateProgress(){if(this.width()===0||this.width()===100||!this.options.timeOut)return;let e=new Date().getTime(),n=this.hideTime-e;this.width.set(n/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(s=>100-s),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||i)(w(Ln),w(ci),w(Kt))};static \u0275cmp=bt({type:i,selectors:[["","toast-component",""]],hostVars:4,hostBindings:function(n,s){n&1&&le("click",function(){return s.tapToast()})("mouseenter",function(){return s.stickAround()})("mouseleave",function(){return s.delayedHideToast()}),n&2&&(ae(s.toastClasses),qt("display",s.displayStyle))},standalone:!0,features:[Ct],attrs:Ec,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,s){n&1&&Dt(0,fh,3,0,"button",0)(1,gh,3,5,"div",1)(2,_h,1,3,"div",2)(3,vh,2,4,"div",3)(4,yh,2,2,"div",4),n&2&&(X("ngIf",s.options.closeButton),x(),X("ngIf",s.title),x(),X("ngIf",s.message&&s.options.enableHtml),x(),X("ngIf",s.message&&!s.options.enableHtml),x(),X("ngIf",s.options.progressBar))},dependencies:[Ps],encapsulation:2,changeDetection:0})}return i})(),yb=B(b({},Tc),{toastComponent:Th});var Ic=(()=>{class i{constructor(){this.http=m(pa),this.toastr=m(Ln),this.requestTimeout=1e4}get(e,n={},s="/"){return this.http.get(`${s}${e}`,b({},n)).pipe(Wt(this.requestTimeout),Le(this.handleError.bind(this)))}post(e,n,s={},r="/"){return this.http.post(`${r}${e}`,n,b({},s)).pipe(Wt(this.requestTimeout),Le(this.handleError.bind(this)))}postFormData(e,n,s={},r="/"){return this.http.post(`${r}/${e}`,n,b({},s)).pipe(Wt(this.requestTimeout),Le(this.handleError.bind(this)))}put(e,n,s={},r="/"){return this.http.put(`${r}/${e}`,n,b({},s)).pipe(Wt(this.requestTimeout),Le(this.handleError.bind(this)))}delete(e,n={},s="/"){return this.http.delete(`${s}/${e}`,b({},n)).pipe(Wt(this.requestTimeout),Le(this.handleError.bind(this)))}handleError(e){let n={header:"API Error ",message:"An unknown error occurred."};return e instanceof Wo&&e.name=="TimeoutError"&&(n.header="Request Timeout",n.message="The request took too long to complete. Please try again later."),e instanceof ha&&(Object.keys(e.error).length?(n.header="API Error - "+e.status,n.message=e.error.Message||e.error.message):(e.status===401&&(n.header="Unauthorized",n.message="We can't log you in because of authentication error"),n.header="API Error - "+e.status,n.message=e.error.message)),this.toastr.error(n.message,n.header),Go(()=>n)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=N({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var Ac=function(i){let t=[],e=0;for(let n=0;n<i.length;n++){let s=i.charCodeAt(n);s<128?t[e++]=s:s<2048?(t[e++]=s>>6|192,t[e++]=s&63|128):(s&64512)===55296&&n+1<i.length&&(i.charCodeAt(n+1)&64512)===56320?(s=65536+((s&1023)<<10)+(i.charCodeAt(++n)&1023),t[e++]=s>>18|240,t[e++]=s>>12&63|128,t[e++]=s>>6&63|128,t[e++]=s&63|128):(t[e++]=s>>12|224,t[e++]=s>>6&63|128,t[e++]=s&63|128)}return t},Ch=function(i){let t=[],e=0,n=0;for(;e<i.length;){let s=i[e++];if(s<128)t[n++]=String.fromCharCode(s);else if(s>191&&s<224){let r=i[e++];t[n++]=String.fromCharCode((s&31)<<6|r&63)}else if(s>239&&s<365){let r=i[e++],o=i[e++],a=i[e++],c=((s&7)<<18|(r&63)<<12|(o&63)<<6|a&63)-65536;t[n++]=String.fromCharCode(55296+(c>>10)),t[n++]=String.fromCharCode(56320+(c&1023))}else{let r=i[e++],o=i[e++];t[n++]=String.fromCharCode((s&15)<<12|(r&63)<<6|o&63)}}return t.join("")},Oc={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(i,t){if(!Array.isArray(i))throw Error("encodeByteArray takes an array as a parameter");this.init_();let e=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,n=[];for(let s=0;s<i.length;s+=3){let r=i[s],o=s+1<i.length,a=o?i[s+1]:0,c=s+2<i.length,l=c?i[s+2]:0,u=r>>2,p=(r&3)<<4|a>>4,f=(a&15)<<2|l>>6,h=l&63;c||(h=64,o||(f=64)),n.push(e[u],e[p],e[f],e[h])}return n.join("")},encodeString(i,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(i):this.encodeByteArray(Ac(i),t)},decodeString(i,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(i):Ch(this.decodeStringToByteArray(i,t))},decodeStringToByteArray(i,t){this.init_();let e=t?this.charToByteMapWebSafe_:this.charToByteMap_,n=[];for(let s=0;s<i.length;){let r=e[i.charAt(s++)],a=s<i.length?e[i.charAt(s)]:0;++s;let l=s<i.length?e[i.charAt(s)]:64;++s;let p=s<i.length?e[i.charAt(s)]:64;if(++s,r==null||a==null||l==null||p==null)throw new Er;let f=r<<2|a>>4;if(n.push(f),l!==64){let h=a<<4&240|l>>2;if(n.push(h),p!==64){let D=l<<6&192|p;n.push(D)}}}return n},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let i=0;i<this.ENCODED_VALS.length;i++)this.byteToCharMap_[i]=this.ENCODED_VALS.charAt(i),this.charToByteMap_[this.byteToCharMap_[i]]=i,this.byteToCharMapWebSafe_[i]=this.ENCODED_VALS_WEBSAFE.charAt(i),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[i]]=i,i>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(i)]=i,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(i)]=i)}}},Er=class extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}},Ih=function(i){let t=Ac(i);return Oc.encodeByteArray(t,!0)},Cr=function(i){return Ih(i).replace(/\./g,"")},Ir=function(i){try{return Oc.decodeString(i,!0)}catch(t){console.error("base64Decode failed: ",t)}return null};function Sh(){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 Ah=()=>Sh().__FIREBASE_DEFAULTS__,Oh=()=>{if(typeof process>"u"||typeof process.env>"u")return;let i=process.env.__FIREBASE_DEFAULTS__;if(i)return JSON.parse(i)},Ph=()=>{if(typeof document>"u")return;let i;try{i=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}let t=i&&Ir(i[1]);return t&&JSON.parse(t)},Sr=()=>{try{return Ah()||Oh()||Ph()}catch(i){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${i}`);return}},Pc=i=>{var t,e;return(e=(t=Sr())===null||t===void 0?void 0:t.emulatorHosts)===null||e===void 0?void 0:e[i]};var Ar=()=>{var i;return(i=Sr())===null||i===void 0?void 0:i.config},Or=i=>{var t;return(t=Sr())===null||t===void 0?void 0:t[`_${i}`]};var Vn=class{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}wrapCallback(t){return(e,n)=>{e?this.reject(e):this.resolve(n),typeof t=="function"&&(this.promise.catch(()=>{}),t.length===1?t(e):t(e,n))}}};function ee(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function Mc(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(ee())}function Rc(){return typeof navigator<"u"&&navigator.userAgent==="Cloudflare-Workers"}function Nc(){let i=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof i=="object"&&i.id!==void 0}function kc(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function xc(){let i=ee();return i.indexOf("MSIE ")>=0||i.indexOf("Trident/")>=0}function Fc(){try{return typeof indexedDB=="object"}catch{return!1}}function Bc(){return new Promise((i,t)=>{try{let e=!0,n="validate-browser-context-for-indexeddb-analytics-module",s=self.indexedDB.open(n);s.onsuccess=()=>{s.result.close(),e||self.indexedDB.deleteDatabase(n),i(!0)},s.onupgradeneeded=()=>{e=!1},s.onerror=()=>{var r;t(((r=s.error)===null||r===void 0?void 0:r.message)||"")}}catch(e){t(e)}})}var Mh="FirebaseError",Se=class i extends Error{constructor(t,e,n){super(e),this.code=t,this.customData=n,this.name=Mh,Object.setPrototypeOf(this,i.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,We.prototype.create)}},We=class{constructor(t,e,n){this.service=t,this.serviceName=e,this.errors=n}create(t,...e){let n=e[0]||{},s=`${this.service}/${t}`,r=this.errors[t],o=r?Rh(r,n):"Error",a=`${this.serviceName}: ${o} (${s}).`;return new Se(s,a,n)}};function Rh(i,t){return i.replace(Nh,(e,n)=>{let s=t[n];return s!=null?String(s):`<${n}?>`})}var Nh=/\{\$([^}]+)}/g;function Lc(i){for(let t in i)if(Object.prototype.hasOwnProperty.call(i,t))return!1;return!0}function li(i,t){if(i===t)return!0;let e=Object.keys(i),n=Object.keys(t);for(let s of e){if(!n.includes(s))return!1;let r=i[s],o=t[s];if(Sc(r)&&Sc(o)){if(!li(r,o))return!1}else if(r!==o)return!1}for(let s of n)if(!e.includes(s))return!1;return!0}function Sc(i){return i!==null&&typeof i=="object"}function di(i){let t=[];for(let[e,n]of Object.entries(i))Array.isArray(n)?n.forEach(s=>{t.push(encodeURIComponent(e)+"="+encodeURIComponent(s))}):t.push(encodeURIComponent(e)+"="+encodeURIComponent(n));return t.length?"&"+t.join("&"):""}function Vc(i,t){let e=new Tr(i,t);return e.subscribe.bind(e)}var Tr=class{constructor(t,e){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=e,this.task.then(()=>{t(this)}).catch(n=>{this.error(n)})}next(t){this.forEachObserver(e=>{e.next(t)})}error(t){this.forEachObserver(e=>{e.error(t)}),this.close(t)}complete(){this.forEachObserver(t=>{t.complete()}),this.close()}subscribe(t,e,n){let s;if(t===void 0&&e===void 0&&n===void 0)throw new Error("Missing Observer.");kh(t,["next","error","complete"])?s=t:s={next:t,error:e,complete:n},s.next===void 0&&(s.next=Dr),s.error===void 0&&(s.error=Dr),s.complete===void 0&&(s.complete=Dr);let r=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?s.error(this.finalError):s.complete()}catch{}}),this.observers.push(s),r}unsubscribeOne(t){this.observers===void 0||this.observers[t]===void 0||(delete this.observers[t],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(t){if(!this.finalized)for(let e=0;e<this.observers.length;e++)this.sendOne(e,t)}sendOne(t,e){this.task.then(()=>{if(this.observers!==void 0&&this.observers[t]!==void 0)try{e(this.observers[t])}catch(n){typeof console<"u"&&console.error&&console.error(n)}})}close(t){this.finalized||(this.finalized=!0,t!==void 0&&(this.finalError=t),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}};function kh(i,t){if(typeof i!="object"||i===null)return!1;for(let e of t)if(e in i&&typeof i[e]=="function")return!0;return!1}function Dr(){}var Pb=4*60*60*1e3;function xt(i){return i&&i._delegate?i._delegate:i}var Re=class{constructor(t,e,n){this.name=t,this.instanceFactory=e,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(t){return this.instantiationMode=t,this}setMultipleInstances(t){return this.multipleInstances=t,this}setServiceProps(t){return this.serviceProps=t,this}setInstanceCreatedCallback(t){return this.onInstanceCreated=t,this}};var Ft="[DEFAULT]";var Pr=class{constructor(t,e){this.name=t,this.container=e,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(t){let e=this.normalizeInstanceIdentifier(t);if(!this.instancesDeferred.has(e)){let n=new Vn;if(this.instancesDeferred.set(e,n),this.isInitialized(e)||this.shouldAutoInitialize())try{let s=this.getOrInitializeService({instanceIdentifier:e});s&&n.resolve(s)}catch{}}return this.instancesDeferred.get(e).promise}getImmediate(t){var e;let n=this.normalizeInstanceIdentifier(t?.identifier),s=(e=t?.optional)!==null&&e!==void 0?e:!1;if(this.isInitialized(n)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:n})}catch(r){if(s)return null;throw r}else{if(s)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(t){if(t.name!==this.name)throw Error(`Mismatching Component ${t.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=t,!!this.shouldAutoInitialize()){if(Fh(t))try{this.getOrInitializeService({instanceIdentifier:Ft})}catch{}for(let[e,n]of this.instancesDeferred.entries()){let s=this.normalizeInstanceIdentifier(e);try{let r=this.getOrInitializeService({instanceIdentifier:s});n.resolve(r)}catch{}}}}clearInstance(t=Ft){this.instancesDeferred.delete(t),this.instancesOptions.delete(t),this.instances.delete(t)}delete(){return d(this,null,function*(){let t=Array.from(this.instances.values());yield Promise.all([...t.filter(e=>"INTERNAL"in e).map(e=>e.INTERNAL.delete()),...t.filter(e=>"_delete"in e).map(e=>e._delete())])})}isComponentSet(){return this.component!=null}isInitialized(t=Ft){return this.instances.has(t)}getOptions(t=Ft){return this.instancesOptions.get(t)||{}}initialize(t={}){let{options:e={}}=t,n=this.normalizeInstanceIdentifier(t.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 s=this.getOrInitializeService({instanceIdentifier:n,options:e});for(let[r,o]of this.instancesDeferred.entries()){let a=this.normalizeInstanceIdentifier(r);n===a&&o.resolve(s)}return s}onInit(t,e){var n;let s=this.normalizeInstanceIdentifier(e),r=(n=this.onInitCallbacks.get(s))!==null&&n!==void 0?n:new Set;r.add(t),this.onInitCallbacks.set(s,r);let o=this.instances.get(s);return o&&t(o,s),()=>{r.delete(t)}}invokeOnInitCallbacks(t,e){let n=this.onInitCallbacks.get(e);if(n)for(let s of n)try{s(t,e)}catch{}}getOrInitializeService({instanceIdentifier:t,options:e={}}){let n=this.instances.get(t);if(!n&&this.component&&(n=this.component.instanceFactory(this.container,{instanceIdentifier:xh(t),options:e}),this.instances.set(t,n),this.instancesOptions.set(t,e),this.invokeOnInitCallbacks(n,t),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,t,n)}catch{}return n||null}normalizeInstanceIdentifier(t=Ft){return this.component?this.component.multipleInstances?t:Ft:t}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}};function xh(i){return i===Ft?void 0:i}function Fh(i){return i.instantiationMode==="EAGER"}var Un=class{constructor(t){this.name=t,this.providers=new Map}addComponent(t){let e=this.getProvider(t.name);if(e.isComponentSet())throw new Error(`Component ${t.name} has already been registered with ${this.name}`);e.setComponent(t)}addOrOverwriteComponent(t){this.getProvider(t.name).isComponentSet()&&this.providers.delete(t.name),this.addComponent(t)}getProvider(t){if(this.providers.has(t))return this.providers.get(t);let e=new Pr(t,this);return this.providers.set(t,e),e}getProviders(){return Array.from(this.providers.values())}};var Bh=[],S=function(i){return i[i.DEBUG=0]="DEBUG",i[i.VERBOSE=1]="VERBOSE",i[i.INFO=2]="INFO",i[i.WARN=3]="WARN",i[i.ERROR=4]="ERROR",i[i.SILENT=5]="SILENT",i}(S||{}),Lh={debug:S.DEBUG,verbose:S.VERBOSE,info:S.INFO,warn:S.WARN,error:S.ERROR,silent:S.SILENT},Vh=S.INFO,Uh={[S.DEBUG]:"log",[S.VERBOSE]:"log",[S.INFO]:"info",[S.WARN]:"warn",[S.ERROR]:"error"},Hh=(i,t,...e)=>{if(t<i.logLevel)return;let n=new Date().toISOString(),s=Uh[t];if(s)console[s](`[${n}] ${i.name}:`,...e);else throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`)},ui=class{constructor(t){this.name=t,this._logLevel=Vh,this._logHandler=Hh,this._userLogHandler=null,Bh.push(this)}get logLevel(){return this._logLevel}set logLevel(t){if(!(t in S))throw new TypeError(`Invalid value "${t}" assigned to \`logLevel\``);this._logLevel=t}setLogLevel(t){this._logLevel=typeof t=="string"?Lh[t]:t}get logHandler(){return this._logHandler}set logHandler(t){if(typeof t!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=t}get userLogHandler(){return this._userLogHandler}set userLogHandler(t){this._userLogHandler=t}debug(...t){this._userLogHandler&&this._userLogHandler(this,S.DEBUG,...t),this._logHandler(this,S.DEBUG,...t)}log(...t){this._userLogHandler&&this._userLogHandler(this,S.VERBOSE,...t),this._logHandler(this,S.VERBOSE,...t)}info(...t){this._userLogHandler&&this._userLogHandler(this,S.INFO,...t),this._logHandler(this,S.INFO,...t)}warn(...t){this._userLogHandler&&this._userLogHandler(this,S.WARN,...t),this._logHandler(this,S.WARN,...t)}error(...t){this._userLogHandler&&this._userLogHandler(this,S.ERROR,...t),this._logHandler(this,S.ERROR,...t)}};var $h=(i,t)=>t.some(e=>i instanceof e),Uc,Hc;function jh(){return Uc||(Uc=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Gh(){return Hc||(Hc=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}var $c=new WeakMap,Rr=new WeakMap,jc=new WeakMap,Mr=new WeakMap,kr=new WeakMap;function Wh(i){let t=new Promise((e,n)=>{let s=()=>{i.removeEventListener("success",r),i.removeEventListener("error",o)},r=()=>{e(Ne(i.result)),s()},o=()=>{n(i.error),s()};i.addEventListener("success",r),i.addEventListener("error",o)});return t.then(e=>{e instanceof IDBCursor&&$c.set(e,i)}).catch(()=>{}),kr.set(t,i),t}function zh(i){if(Rr.has(i))return;let t=new Promise((e,n)=>{let s=()=>{i.removeEventListener("complete",r),i.removeEventListener("error",o),i.removeEventListener("abort",o)},r=()=>{e(),s()},o=()=>{n(i.error||new DOMException("AbortError","AbortError")),s()};i.addEventListener("complete",r),i.addEventListener("error",o),i.addEventListener("abort",o)});Rr.set(i,t)}var Nr={get(i,t,e){if(i instanceof IDBTransaction){if(t==="done")return Rr.get(i);if(t==="objectStoreNames")return i.objectStoreNames||jc.get(i);if(t==="store")return e.objectStoreNames[1]?void 0:e.objectStore(e.objectStoreNames[0])}return Ne(i[t])},set(i,t,e){return i[t]=e,!0},has(i,t){return i instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in i}};function Gc(i){Nr=i(Nr)}function qh(i){return i===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(t,...e){let n=i.call(Hn(this),t,...e);return jc.set(n,t.sort?t.sort():[t]),Ne(n)}:Gh().includes(i)?function(...t){return i.apply(Hn(this),t),Ne($c.get(this))}:function(...t){return Ne(i.apply(Hn(this),t))}}function Jh(i){return typeof i=="function"?qh(i):(i instanceof IDBTransaction&&zh(i),$h(i,jh())?new Proxy(i,Nr):i)}function Ne(i){if(i instanceof IDBRequest)return Wh(i);if(Mr.has(i))return Mr.get(i);let t=Jh(i);return t!==i&&(Mr.set(i,t),kr.set(t,i)),t}var Hn=i=>kr.get(i);function zc(i,t,{blocked:e,upgrade:n,blocking:s,terminated:r}={}){let o=indexedDB.open(i,t),a=Ne(o);return n&&o.addEventListener("upgradeneeded",c=>{n(Ne(o.result),c.oldVersion,c.newVersion,Ne(o.transaction),c)}),e&&o.addEventListener("blocked",c=>e(c.oldVersion,c.newVersion,c)),a.then(c=>{r&&c.addEventListener("close",()=>r()),s&&c.addEventListener("versionchange",l=>s(l.oldVersion,l.newVersion,l))}).catch(()=>{}),a}var Kh=["get","getKey","getAll","getAllKeys","count"],Yh=["put","add","delete","clear"],xr=new Map;function Wc(i,t){if(!(i instanceof IDBDatabase&&!(t in i)&&typeof t=="string"))return;if(xr.get(t))return xr.get(t);let e=t.replace(/FromIndex$/,""),n=t!==e,s=Yh.includes(e);if(!(e in(n?IDBIndex:IDBObjectStore).prototype)||!(s||Kh.includes(e)))return;let r=function(o,...a){return d(this,null,function*(){let c=this.transaction(o,s?"readwrite":"readonly"),l=c.store;return n&&(l=l.index(a.shift())),(yield Promise.all([l[e](...a),s&&c.done]))[0]})};return xr.set(t,r),r}Gc(i=>B(b({},i),{get:(t,e,n)=>Wc(t,e)||i.get(t,e,n),has:(t,e)=>!!Wc(t,e)||i.has(t,e)}));var Br=class{constructor(t){this.container=t}getPlatformInfoString(){return this.container.getProviders().map(e=>{if(Qh(e)){let n=e.getImmediate();return`${n.library}/${n.version}`}else return null}).filter(e=>e).join(" ")}};function Qh(i){let t=i.getComponent();return t?.type==="VERSION"}var Lr="@firebase/app",qc="0.10.13";var ze=new ui("@firebase/app"),Zh="@firebase/app-compat",Xh="@firebase/analytics-compat",ep="@firebase/analytics",tp="@firebase/app-check-compat",ip="@firebase/app-check",np="@firebase/auth",sp="@firebase/auth-compat",rp="@firebase/database",op="@firebase/data-connect",ap="@firebase/database-compat",cp="@firebase/functions",lp="@firebase/functions-compat",dp="@firebase/installations",up="@firebase/installations-compat",hp="@firebase/messaging",pp="@firebase/messaging-compat",fp="@firebase/performance",mp="@firebase/performance-compat",gp="@firebase/remote-config",_p="@firebase/remote-config-compat",vp="@firebase/storage",yp="@firebase/storage-compat",bp="@firebase/firestore",wp="@firebase/vertexai-preview",Dp="@firebase/firestore-compat",Ep="firebase",Tp="10.14.1";var Vr="[DEFAULT]",Cp={[Lr]:"fire-core",[Zh]:"fire-core-compat",[ep]:"fire-analytics",[Xh]:"fire-analytics-compat",[ip]:"fire-app-check",[tp]:"fire-app-check-compat",[np]:"fire-auth",[sp]:"fire-auth-compat",[rp]:"fire-rtdb",[op]:"fire-data-connect",[ap]:"fire-rtdb-compat",[cp]:"fire-fn",[lp]:"fire-fn-compat",[dp]:"fire-iid",[up]:"fire-iid-compat",[hp]:"fire-fcm",[pp]:"fire-fcm-compat",[fp]:"fire-perf",[mp]:"fire-perf-compat",[gp]:"fire-rc",[_p]:"fire-rc-compat",[vp]:"fire-gcs",[yp]:"fire-gcs-compat",[bp]:"fire-fst",[Dp]:"fire-fst-compat",[wp]:"fire-vertex","fire-js":"fire-js",[Ep]:"fire-js-all"};var $i=new Map,Ip=new Map,Ur=new Map;function Jc(i,t){try{i.container.addComponent(t)}catch(e){ze.debug(`Component ${t.name} failed to register with FirebaseApp ${i.name}`,e)}}function hi(i){let t=i.name;if(Ur.has(t))return ze.debug(`There were multiple attempts to register component ${t}.`),!1;Ur.set(t,i);for(let e of $i.values())Jc(e,i);for(let e of Ip.values())Jc(e,i);return!0}function Gr(i,t){let e=i.container.getProvider("heartbeat").getImmediate({optional:!0});return e&&e.triggerHeartbeat(),i.container.getProvider(t)}function ke(i){return i.settings!==void 0}var Sp={"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."},lt=new We("app","Firebase",Sp);var Hr=class{constructor(t,e,n){this._isDeleted=!1,this._options=Object.assign({},t),this._config=Object.assign({},e),this._name=e.name,this._automaticDataCollectionEnabled=e.automaticDataCollectionEnabled,this._container=n,this.container.addComponent(new Re("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(t){this.checkDestroyed(),this._automaticDataCollectionEnabled=t}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(t){this._isDeleted=t}checkDestroyed(){if(this.isDeleted)throw lt.create("app-deleted",{appName:this._name})}};var pi=Tp;function Wr(i,t={}){let e=i;typeof t!="object"&&(t={name:t});let n=Object.assign({name:Vr,automaticDataCollectionEnabled:!1},t),s=n.name;if(typeof s!="string"||!s)throw lt.create("bad-app-name",{appName:String(s)});if(e||(e=Ar()),!e)throw lt.create("no-options");let r=$i.get(s);if(r){if(li(e,r.options)&&li(n,r.config))return r;throw lt.create("duplicate-app",{appName:s})}let o=new Un(s);for(let c of Ur.values())o.addComponent(c);let a=new Hr(e,n,o);return $i.set(s,a),a}function $n(i=Vr){let t=$i.get(i);if(!t&&i===Vr&&Ar())return Wr();if(!t)throw lt.create("no-app",{appName:i});return t}function jn(){return Array.from($i.values())}function de(i,t,e){var n;let s=(n=Cp[i])!==null&&n!==void 0?n:i;e&&(s+=`-${e}`);let r=s.match(/\s|\//),o=t.match(/\s|\//);if(r||o){let a=[`Unable to register library "${s}" with version "${t}":`];r&&a.push(`library name "${s}" contains illegal characters (whitespace or "/")`),r&&o&&a.push("and"),o&&a.push(`version name "${t}" contains illegal characters (whitespace or "/")`),ze.warn(a.join(" "));return}hi(new Re(`${s}-version`,()=>({library:s,version:t}),"VERSION"))}var Ap="firebase-heartbeat-database",Op=1,ji="firebase-heartbeat-store",Fr=null;function Zc(){return Fr||(Fr=zc(Ap,Op,{upgrade:(i,t)=>{switch(t){case 0:try{i.createObjectStore(ji)}catch(e){console.warn(e)}}}}).catch(i=>{throw lt.create("idb-open",{originalErrorMessage:i.message})})),Fr}function Pp(i){return d(this,null,function*(){try{let e=(yield Zc()).transaction(ji),n=yield e.objectStore(ji).get(Xc(i));return yield e.done,n}catch(t){if(t instanceof Se)ze.warn(t.message);else{let e=lt.create("idb-get",{originalErrorMessage:t?.message});ze.warn(e.message)}}})}function Kc(i,t){return d(this,null,function*(){try{let n=(yield Zc()).transaction(ji,"readwrite");yield n.objectStore(ji).put(t,Xc(i)),yield n.done}catch(e){if(e instanceof Se)ze.warn(e.message);else{let n=lt.create("idb-set",{originalErrorMessage:e?.message});ze.warn(n.message)}}})}function Xc(i){return`${i.name}!${i.options.appId}`}var Mp=1024,Rp=30*24*60*60*1e3,$r=class{constructor(t){this.container=t,this._heartbeatsCache=null;let e=this.container.getProvider("app").getImmediate();this._storage=new jr(e),this._heartbeatsCachePromise=this._storage.read().then(n=>(this._heartbeatsCache=n,n))}triggerHeartbeat(){return d(this,null,function*(){var t,e;try{let s=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),r=Yc();return((t=this._heartbeatsCache)===null||t===void 0?void 0:t.heartbeats)==null&&(this._heartbeatsCache=yield this._heartbeatsCachePromise,((e=this._heartbeatsCache)===null||e===void 0?void 0:e.heartbeats)==null)||this._heartbeatsCache.lastSentHeartbeatDate===r||this._heartbeatsCache.heartbeats.some(o=>o.date===r)?void 0:(this._heartbeatsCache.heartbeats.push({date:r,agent:s}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(o=>{let a=new Date(o.date).valueOf();return Date.now()-a<=Rp}),this._storage.overwrite(this._heartbeatsCache))}catch(n){ze.warn(n)}})}getHeartbeatsHeader(){return d(this,null,function*(){var t;try{if(this._heartbeatsCache===null&&(yield this._heartbeatsCachePromise),((t=this._heartbeatsCache)===null||t===void 0?void 0:t.heartbeats)==null||this._heartbeatsCache.heartbeats.length===0)return"";let e=Yc(),{heartbeatsToSend:n,unsentEntries:s}=Np(this._heartbeatsCache.heartbeats),r=Cr(JSON.stringify({version:2,heartbeats:n}));return this._heartbeatsCache.lastSentHeartbeatDate=e,s.length>0?(this._heartbeatsCache.heartbeats=s,yield this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),r}catch(e){return ze.warn(e),""}})}};function Yc(){return new Date().toISOString().substring(0,10)}function Np(i,t=Mp){let e=[],n=i.slice();for(let s of i){let r=e.find(o=>o.agent===s.agent);if(r){if(r.dates.push(s.date),Qc(e)>t){r.dates.pop();break}}else if(e.push({agent:s.agent,dates:[s.date]}),Qc(e)>t){e.pop();break}n=n.slice(1)}return{heartbeatsToSend:e,unsentEntries:n}}var jr=class{constructor(t){this.app=t,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}runIndexedDBEnvironmentCheck(){return d(this,null,function*(){return Fc()?Bc().then(()=>!0).catch(()=>!1):!1})}read(){return d(this,null,function*(){if(yield this._canUseIndexedDBPromise){let e=yield Pp(this.app);return e?.heartbeats?e:{heartbeats:[]}}else return{heartbeats:[]}})}overwrite(t){return d(this,null,function*(){var e;if(yield this._canUseIndexedDBPromise){let s=yield this.read();return Kc(this.app,{lastSentHeartbeatDate:(e=t.lastSentHeartbeatDate)!==null&&e!==void 0?e:s.lastSentHeartbeatDate,heartbeats:t.heartbeats})}else return})}add(t){return d(this,null,function*(){var e;if(yield this._canUseIndexedDBPromise){let s=yield this.read();return Kc(this.app,{lastSentHeartbeatDate:(e=t.lastSentHeartbeatDate)!==null&&e!==void 0?e:s.lastSentHeartbeatDate,heartbeats:[...s.heartbeats,...t.heartbeats]})}else return})}};function Qc(i){return Cr(JSON.stringify({version:2,heartbeats:i})).length}function kp(i){hi(new Re("platform-logger",t=>new Br(t),"PRIVATE")),hi(new Re("heartbeat",t=>new $r(t),"PRIVATE")),de(Lr,qc,i),de(Lr,qc,"esm2017"),de("fire-js","")}kp("");var xp="firebase",Fp="10.14.1";de(xp,Fp,"app");var Gi=new As("ANGULARFIRE2_VERSION");function el(i,t,e){if(t){if(t.length===1)return t[0];let r=t.filter(o=>o.app===e);if(r.length===1)return r[0]}return e.container.getProvider(i).getImmediate({optional:!0})}var qr=(i,t)=>{let e=t?[t]:jn(),n=[];return e.forEach(s=>{s.container.getProvider(i).instances.forEach(o=>{n.includes(o)||n.push(o)})}),n},Gn=class{constructor(){return qr(Bp)}},Bp="app-check";function fi(){}var Wn=class{zone;delegate;constructor(t,e=$o){this.zone=t,this.delegate=e}now(){return this.delegate.now()}schedule(t,e,n){let s=this.zone,r=function(o){s.runGuarded(()=>{t.apply(this,[o])})};return this.delegate.schedule(r,e,n)}},zr=class{zone;task=null;constructor(t){this.zone=t}call(t,e){let n=this.unscheduleTask.bind(this);return this.task=this.zone.run(()=>Zone.current.scheduleMacroTask("firebaseZoneBlock",fi,{},fi,fi)),e.pipe(we({next:n,complete:n,error:n})).subscribe(t).add(n)}unscheduleTask(){setTimeout(()=>{this.task!=null&&this.task.state==="scheduled"&&(this.task.invoke(),this.task=null)},10)}},zn=(()=>{class i{ngZone;outsideAngular;insideAngular;constructor(e){this.ngZone=e,this.outsideAngular=e.runOutsideAngular(()=>new Wn(Zone.current)),this.insideAngular=e.run(()=>new Wn(Zone.current,Ho)),globalThis.\u0275AngularFireScheduler||=this}static \u0275fac=function(n){return new(n||i)(Ze(ne))};static \u0275prov=N({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function qn(){let i=globalThis.\u0275AngularFireScheduler;if(!i)throw new Error(`Either AngularFireModule has not been provided in your AppModule (this can be done manually or implictly using
4
- provideFirebaseApp) or you're calling an AngularFire method outside of an NgModule (which is not supported).`);return i}function Lp(i){return qn().ngZone.runOutsideAngular(()=>i())}function Bt(i){return qn().ngZone.run(()=>i())}function Vp(i){return Up(qn())(i)}function Up(i){return function(e){return e=e.lift(new zr(i.ngZone)),e.pipe(ys(i.outsideAngular),vs(i.insideAngular))}}var Hp=(i,t)=>function(){let n=arguments;return t&&setTimeout(()=>{t.state==="scheduled"&&t.invoke()},10),Bt(()=>i.apply(void 0,n))},mi=(i,t)=>function(){let e,n=arguments;for(let r=0;r<arguments.length;r++)typeof n[r]=="function"&&(t&&(e||=Bt(()=>Zone.current.scheduleMacroTask("firebaseZoneBlock",fi,{},fi,fi))),n[r]=Hp(n[r],e));let s=Lp(()=>i.apply(this,n));if(!t)if(s instanceof Be){let r=qn();return s.pipe(ys(r.outsideAngular),vs(r.insideAngular))}else return Bt(()=>s);return s instanceof Be?s.pipe(Vp):s instanceof Promise?Bt(()=>new Promise((r,o)=>s.then(a=>Bt(()=>r(a)),a=>Bt(()=>o(a))))):typeof s=="function"&&e?function(){return setTimeout(()=>{e&&e.state==="scheduled"&&e.invoke()},10),s.apply(this,arguments)}:Bt(()=>s)};var Lt=class{constructor(t){return t}},Wi=class{constructor(){return jn()}};function $p(i){return i&&i.length===1?i[0]:new Lt($n())}var Jr=new ie("angularfire2._apps"),jp={provide:Lt,useFactory:$p,deps:[[new yt,Jr]]},Gp={provide:Wi,deps:[[new yt,Jr]]};function Wp(i){return(t,e)=>{let n=e.get(Es);de("angularfire",Gi.full,"core"),de("angularfire",Gi.full,"app"),de("angular",ca.full,n.toString());let s=t.runOutsideAngular(()=>i(e));return new Lt(s)}}function gw(i,...t){return zt([jp,Gp,{provide:Jr,useFactory:Wp(i),multi:!0,deps:[ne,Z,zn,...t]}])}var _w=mi(Wr,!0);function ml(){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 gl=ml,_l=new We("auth","Firebase",ml());var Xn=new ui("@firebase/auth");function zp(i,...t){Xn.logLevel<=S.WARN&&Xn.warn(`Auth (${pi}): ${i}`,...t)}function Kn(i,...t){Xn.logLevel<=S.ERROR&&Xn.error(`Auth (${pi}): ${i}`,...t)}function Fe(i,...t){throw po(i,...t)}function Ae(i,...t){return po(i,...t)}function ho(i,t,e){let n=Object.assign(Object.assign({},gl()),{[t]:e});return new We("auth","Firebase",n).create(t,{appName:i.name})}function Vt(i){return ho(i,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function qp(i,t,e){let n=e;if(!(t instanceof n))throw n.name!==t.constructor.name&&Fe(i,"argument-error"),ho(i,"argument-error",`Type of ${t.constructor.name} does not match expected instance.Did you pass a reference from a different Auth SDK?`)}function po(i,...t){if(typeof i!="string"){let e=t[0],n=[...t.slice(1)];return n[0]&&(n[0].appName=i.name),i._errorFactory.create(e,...n)}return _l.create(i,...t)}function g(i,t,...e){if(!i)throw po(t,...e)}function qe(i){let t="INTERNAL ASSERTION FAILED: "+i;throw Kn(t),new Error(t)}function Ke(i,t){i||qe(t)}function Qr(){var i;return typeof self<"u"&&((i=self.location)===null||i===void 0?void 0:i.href)||""}function Jp(){return tl()==="http:"||tl()==="https:"}function tl(){var i;return typeof self<"u"&&((i=self.location)===null||i===void 0?void 0:i.protocol)||null}function Kp(){return typeof navigator<"u"&&navigator&&"onLine"in navigator&&typeof navigator.onLine=="boolean"&&(Jp()||Nc()||"connection"in navigator)?navigator.onLine:!0}function Yp(){if(typeof navigator>"u")return null;let i=navigator;return i.languages&&i.languages[0]||i.language||null}var Ut=class{constructor(t,e){this.shortDelay=t,this.longDelay=e,Ke(e>t,"Short delay should be less than long delay!"),this.isMobile=Mc()||kc()}get(){return Kp()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}};function fo(i,t){Ke(i.emulator,"Emulator should always be set here");let{url:e}=i.emulator;return t?`${e}${t.startsWith("/")?t.slice(1):t}`:e}var es=class{static initialize(t,e,n){this.fetchImpl=t,e&&(this.headersImpl=e),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;qe("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;qe("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;qe("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}};var Qp={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 Zp=new Ut(3e4,6e4);function mo(i,t){return i.tenantId&&!t.tenantId?Object.assign(Object.assign({},t),{tenantId:i.tenantId}):t}function vi(r,o,a,c){return d(this,arguments,function*(i,t,e,n,s={}){return vl(i,s,()=>d(this,null,function*(){let l={},u={};n&&(t==="GET"?u=n:l={body:JSON.stringify(n)});let p=di(Object.assign({key:i.config.apiKey},u)).slice(1),f=yield i._getAdditionalHeaders();f["Content-Type"]="application/json",i.languageCode&&(f["X-Firebase-Locale"]=i.languageCode);let h=Object.assign({method:t,headers:f},l);return Rc()||(h.referrerPolicy="no-referrer"),es.fetch()(yl(i,i.config.apiHost,e,p),h)}))})}function vl(i,t,e){return d(this,null,function*(){i._canInitEmulator=!1;let n=Object.assign(Object.assign({},Qp),t);try{let s=new Zr(i),r=yield Promise.race([e(),s.promise]);s.clearNetworkTimeout();let o=yield r.json();if("needConfirmation"in o)throw Jn(i,"account-exists-with-different-credential",o);if(r.ok&&!("errorMessage"in o))return o;{let a=r.ok?o.errorMessage:o.error.message,[c,l]=a.split(" : ");if(c==="FEDERATED_USER_ID_ALREADY_LINKED")throw Jn(i,"credential-already-in-use",o);if(c==="EMAIL_EXISTS")throw Jn(i,"email-already-in-use",o);if(c==="USER_DISABLED")throw Jn(i,"user-disabled",o);let u=n[c]||c.toLowerCase().replace(/[_\s]+/g,"-");if(l)throw ho(i,u,l);Fe(i,u)}}catch(s){if(s instanceof Se)throw s;Fe(i,"network-request-failed",{message:String(s)})}})}function Xp(r,o,a,c){return d(this,arguments,function*(i,t,e,n,s={}){let l=yield vi(i,t,e,n,s);return"mfaPendingCredential"in l&&Fe(i,"multi-factor-auth-required",{_serverResponse:l}),l})}function yl(i,t,e,n){let s=`${t}${e}?${n}`;return i.config.emulator?fo(i.config,s):`${i.config.apiScheme}://${s}`}var Zr=class{constructor(t){this.auth=t,this.timer=null,this.promise=new Promise((e,n)=>{this.timer=setTimeout(()=>n(Ae(this.auth,"network-request-failed")),Zp.get())})}clearNetworkTimeout(){clearTimeout(this.timer)}};function Jn(i,t,e){let n={appName:i.name};e.email&&(n.email=e.email),e.phoneNumber&&(n.phoneNumber=e.phoneNumber);let s=Ae(i,t,n);return s.customData._tokenResponse=e,s}function ef(i,t){return d(this,null,function*(){return vi(i,"POST","/v1/accounts:delete",t)})}function bl(i,t){return d(this,null,function*(){return vi(i,"POST","/v1/accounts:lookup",t)})}function zi(i){if(i)try{let t=new Date(Number(i));if(!isNaN(t.getTime()))return t.toUTCString()}catch{}}function go(i,t=!1){return d(this,null,function*(){let e=xt(i),n=yield e.getIdToken(t),s=_o(n);g(s&&s.exp&&s.auth_time&&s.iat,e.auth,"internal-error");let r=typeof s.firebase=="object"?s.firebase:void 0,o=r?.sign_in_provider;return{claims:s,token:n,authTime:zi(Kr(s.auth_time)),issuedAtTime:zi(Kr(s.iat)),expirationTime:zi(Kr(s.exp)),signInProvider:o||null,signInSecondFactor:r?.sign_in_second_factor||null}})}function Kr(i){return Number(i)*1e3}function _o(i){let[t,e,n]=i.split(".");if(t===void 0||e===void 0||n===void 0)return Kn("JWT malformed, contained fewer than 3 sections"),null;try{let s=Ir(e);return s?JSON.parse(s):(Kn("Failed to decode base64 JWT payload"),null)}catch(s){return Kn("Caught error parsing JWT payload as JSON",s?.toString()),null}}function il(i){let t=_o(i);return g(t,"internal-error"),g(typeof t.exp<"u","internal-error"),g(typeof t.iat<"u","internal-error"),Number(t.exp)-Number(t.iat)}function Ji(i,t,e=!1){return d(this,null,function*(){if(e)return t;try{return yield t}catch(n){throw n instanceof Se&&tf(n)&&i.auth.currentUser===i&&(yield i.auth.signOut()),n}})}function tf({code:i}){return i==="auth/user-disabled"||i==="auth/user-token-expired"}var Xr=class{constructor(t){this.user=t,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,this.timerId!==null&&clearTimeout(this.timerId))}getInterval(t){var e;if(t){let n=this.errorBackoff;return this.errorBackoff=Math.min(this.errorBackoff*2,96e4),n}else{this.errorBackoff=3e4;let s=((e=this.user.stsTokenManager.expirationTime)!==null&&e!==void 0?e:0)-Date.now()-3e5;return Math.max(0,s)}}schedule(t=!1){if(!this.isRunning)return;let e=this.getInterval(t);this.timerId=setTimeout(()=>d(this,null,function*(){yield this.iteration()}),e)}iteration(){return d(this,null,function*(){try{yield this.user.getIdToken(!0)}catch(t){t?.code==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()})}};var Ki=class{constructor(t,e){this.createdAt=t,this.lastLoginAt=e,this._initializeTime()}_initializeTime(){this.lastSignInTime=zi(this.lastLoginAt),this.creationTime=zi(this.createdAt)}_copy(t){this.createdAt=t.createdAt,this.lastLoginAt=t.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}};function ts(i){return d(this,null,function*(){var t;let e=i.auth,n=yield i.getIdToken(),s=yield Ji(i,bl(e,{idToken:n}));g(s?.users.length,e,"internal-error");let r=s.users[0];i._notifyReloadListener(r);let o=!((t=r.providerUserInfo)===null||t===void 0)&&t.length?wl(r.providerUserInfo):[],a=nf(i.providerData,o),c=i.isAnonymous,l=!(i.email&&r.passwordHash)&&!a?.length,u=c?l:!1,p={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:a,metadata:new Ki(r.createdAt,r.lastLoginAt),isAnonymous:u};Object.assign(i,p)})}function vo(i){return d(this,null,function*(){let t=xt(i);yield ts(t),yield t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)})}function nf(i,t){return[...i.filter(n=>!t.some(s=>s.providerId===n.providerId)),...t]}function wl(i){return i.map(t=>{var{providerId:e}=t,n=cn(t,["providerId"]);return{providerId:e,uid:n.rawId||"",displayName:n.displayName||null,email:n.email||null,phoneNumber:n.phoneNumber||null,photoURL:n.photoUrl||null}})}function sf(i,t){return d(this,null,function*(){let e=yield vl(i,{},()=>d(this,null,function*(){let n=di({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:s,apiKey:r}=i.config,o=yl(i,s,"/v1/token",`key=${r}`),a=yield i._getAdditionalHeaders();return a["Content-Type"]="application/x-www-form-urlencoded",es.fetch()(o,{method:"POST",headers:a,body:n})}));return{accessToken:e.access_token,expiresIn:e.expires_in,refreshToken:e.refresh_token}})}function rf(i,t){return d(this,null,function*(){return vi(i,"POST","/v2/accounts:revokeToken",mo(i,t))})}var qi=class i{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(t){g(t.idToken,"internal-error"),g(typeof t.idToken<"u","internal-error"),g(typeof t.refreshToken<"u","internal-error");let e="expiresIn"in t&&typeof t.expiresIn<"u"?Number(t.expiresIn):il(t.idToken);this.updateTokensAndExpiration(t.idToken,t.refreshToken,e)}updateFromIdToken(t){g(t.length!==0,"internal-error");let e=il(t);this.updateTokensAndExpiration(t,null,e)}getToken(t,e=!1){return d(this,null,function*(){return!e&&this.accessToken&&!this.isExpired?this.accessToken:(g(this.refreshToken,t,"user-token-expired"),this.refreshToken?(yield this.refresh(t,this.refreshToken),this.accessToken):null)})}clearRefreshToken(){this.refreshToken=null}refresh(t,e){return d(this,null,function*(){let{accessToken:n,refreshToken:s,expiresIn:r}=yield sf(t,e);this.updateTokensAndExpiration(n,s,Number(r))})}updateTokensAndExpiration(t,e,n){this.refreshToken=e||null,this.accessToken=t||null,this.expirationTime=Date.now()+n*1e3}static fromJSON(t,e){let{refreshToken:n,accessToken:s,expirationTime:r}=e,o=new i;return n&&(g(typeof n=="string","internal-error",{appName:t}),o.refreshToken=n),s&&(g(typeof s=="string","internal-error",{appName:t}),o.accessToken=s),r&&(g(typeof r=="number","internal-error",{appName:t}),o.expirationTime=r),o}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(t){this.accessToken=t.accessToken,this.refreshToken=t.refreshToken,this.expirationTime=t.expirationTime}_clone(){return Object.assign(new i,this.toJSON())}_performRefresh(){return qe("not implemented")}};function dt(i,t){g(typeof i=="string"||typeof i>"u","internal-error",{appName:t})}var _i=class i{constructor(t){var{uid:e,auth:n,stsTokenManager:s}=t,r=cn(t,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new Xr(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=e,this.auth=n,this.stsTokenManager=s,this.accessToken=s.accessToken,this.displayName=r.displayName||null,this.email=r.email||null,this.emailVerified=r.emailVerified||!1,this.phoneNumber=r.phoneNumber||null,this.photoURL=r.photoURL||null,this.isAnonymous=r.isAnonymous||!1,this.tenantId=r.tenantId||null,this.providerData=r.providerData?[...r.providerData]:[],this.metadata=new Ki(r.createdAt||void 0,r.lastLoginAt||void 0)}getIdToken(t){return d(this,null,function*(){let e=yield Ji(this,this.stsTokenManager.getToken(this.auth,t));return g(e,this.auth,"internal-error"),this.accessToken!==e&&(this.accessToken=e,yield this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),e})}getIdTokenResult(t){return go(this,t)}reload(){return vo(this)}_assign(t){this!==t&&(g(this.uid===t.uid,this.auth,"internal-error"),this.displayName=t.displayName,this.photoURL=t.photoURL,this.email=t.email,this.emailVerified=t.emailVerified,this.phoneNumber=t.phoneNumber,this.isAnonymous=t.isAnonymous,this.tenantId=t.tenantId,this.providerData=t.providerData.map(e=>Object.assign({},e)),this.metadata._copy(t.metadata),this.stsTokenManager._assign(t.stsTokenManager))}_clone(t){let e=new i(Object.assign(Object.assign({},this),{auth:t,stsTokenManager:this.stsTokenManager._clone()}));return e.metadata._copy(this.metadata),e}_onReload(t){g(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=t,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(t){this.reloadListener?this.reloadListener(t):this.reloadUserInfo=t}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}_updateTokensIfNecessary(t,e=!1){return d(this,null,function*(){let n=!1;t.idToken&&t.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(t),n=!0),e&&(yield ts(this)),yield this.auth._persistUserIfCurrent(this),n&&this.auth._notifyListenersIfCurrent(this)})}delete(){return d(this,null,function*(){if(ke(this.auth.app))return Promise.reject(Vt(this.auth));let t=yield this.getIdToken();return yield Ji(this,ef(this.auth,{idToken:t})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()})}toJSON(){return Object.assign(Object.assign({uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(t=>Object.assign({},t)),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(t,e){var n,s,r,o,a,c,l,u;let p=(n=e.displayName)!==null&&n!==void 0?n:void 0,f=(s=e.email)!==null&&s!==void 0?s:void 0,h=(r=e.phoneNumber)!==null&&r!==void 0?r:void 0,D=(o=e.photoURL)!==null&&o!==void 0?o:void 0,y=(a=e.tenantId)!==null&&a!==void 0?a:void 0,_=(c=e._redirectEventId)!==null&&c!==void 0?c:void 0,C=(l=e.createdAt)!==null&&l!==void 0?l:void 0,P=(u=e.lastLoginAt)!==null&&u!==void 0?u:void 0,{uid:A,emailVerified:v,isAnonymous:T,providerData:E,stsTokenManager:O}=e;g(A&&O,t,"internal-error");let U=qi.fromJSON(this.name,O);g(typeof A=="string",t,"internal-error"),dt(p,t.name),dt(f,t.name),g(typeof v=="boolean",t,"internal-error"),g(typeof T=="boolean",t,"internal-error"),dt(h,t.name),dt(D,t.name),dt(y,t.name),dt(_,t.name),dt(C,t.name),dt(P,t.name);let k=new i({uid:A,auth:t,email:f,emailVerified:v,displayName:p,isAnonymous:T,photoURL:D,phoneNumber:h,tenantId:y,stsTokenManager:U,createdAt:C,lastLoginAt:P});return E&&Array.isArray(E)&&(k.providerData=E.map(F=>Object.assign({},F))),_&&(k._redirectEventId=_),k}static _fromIdTokenResponse(t,e,n=!1){return d(this,null,function*(){let s=new qi;s.updateFromServerResponse(e);let r=new i({uid:e.localId,auth:t,stsTokenManager:s,isAnonymous:n});return yield ts(r),r})}static _fromGetAccountInfoResponse(t,e,n){return d(this,null,function*(){let s=e.users[0];g(s.localId!==void 0,"internal-error");let r=s.providerUserInfo!==void 0?wl(s.providerUserInfo):[],o=!(s.email&&s.passwordHash)&&!r?.length,a=new qi;a.updateFromIdToken(n);let c=new i({uid:s.localId,auth:t,stsTokenManager:a,isAnonymous:o}),l={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:r,metadata:new Ki(s.createdAt,s.lastLoginAt),isAnonymous:!(s.email&&s.passwordHash)&&!r?.length};return Object.assign(c,l),c})}};var nl=new Map;function Je(i){Ke(i instanceof Function,"Expected a class definition");let t=nl.get(i);return t?(Ke(t instanceof i,"Instance stored in cache mismatched with class"),t):(t=new i,nl.set(i,t),t)}var of=(()=>{class i{constructor(){this.type="NONE",this.storage={}}_isAvailable(){return d(this,null,function*(){return!0})}_set(e,n){return d(this,null,function*(){this.storage[e]=n})}_get(e){return d(this,null,function*(){let n=this.storage[e];return n===void 0?null:n})}_remove(e){return d(this,null,function*(){delete this.storage[e]})}_addListener(e,n){}_removeListener(e,n){}}return i.type="NONE",i})(),eo=of;function Yn(i,t,e){return`firebase:${i}:${t}:${e}`}var is=class i{constructor(t,e,n){this.persistence=t,this.auth=e,this.userKey=n;let{config:s,name:r}=this.auth;this.fullUserKey=Yn(this.userKey,s.apiKey,r),this.fullPersistenceKey=Yn("persistence",s.apiKey,r),this.boundEventHandler=e._onStorageEvent.bind(e),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(t){return this.persistence._set(this.fullUserKey,t.toJSON())}getCurrentUser(){return d(this,null,function*(){let t=yield this.persistence._get(this.fullUserKey);return t?_i._fromJSON(this.auth,t):null})}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}setPersistence(t){return d(this,null,function*(){if(this.persistence===t)return;let e=yield this.getCurrentUser();if(yield this.removeCurrentUser(),this.persistence=t,e)return this.setCurrentUser(e)})}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static create(t,e,n="authUser"){return d(this,null,function*(){if(!e.length)return new i(Je(eo),t,n);let s=(yield Promise.all(e.map(l=>d(this,null,function*(){if(yield l._isAvailable())return l})))).filter(l=>l),r=s[0]||Je(eo),o=Yn(n,t.config.apiKey,t.name),a=null;for(let l of e)try{let u=yield l._get(o);if(u){let p=_i._fromJSON(t,u);l!==r&&(a=p),r=l;break}}catch{}let c=s.filter(l=>l._shouldAllowMigration);return!r._shouldAllowMigration||!c.length?new i(r,t,n):(r=c[0],a&&(yield r._set(o,a.toJSON())),yield Promise.all(e.map(l=>d(this,null,function*(){if(l!==r)try{yield l._remove(o)}catch{}}))),new i(r,t,n))})}};function sl(i){let t=i.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(Cl(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";if(t.includes("edge/"))return"Edge";if(Dl(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(Sl(t))return"Blackberry";if(Al(t))return"Webos";if(El(t))return"Safari";if((t.includes("chrome/")||Tl(t))&&!t.includes("edge/"))return"Chrome";if(Il(t))return"Android";{let e=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,n=i.match(e);if(n?.length===2)return n[1]}return"Other"}function Dl(i=ee()){return/firefox\//i.test(i)}function El(i=ee()){let t=i.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function Tl(i=ee()){return/crios\//i.test(i)}function Cl(i=ee()){return/iemobile/i.test(i)}function Il(i=ee()){return/android/i.test(i)}function Sl(i=ee()){return/blackberry/i.test(i)}function Al(i=ee()){return/webos/i.test(i)}function yo(i=ee()){return/iphone|ipad|ipod/i.test(i)||/macintosh/i.test(i)&&/mobile/i.test(i)}function af(i=ee()){var t;return yo(i)&&!!(!((t=window.navigator)===null||t===void 0)&&t.standalone)}function cf(){return xc()&&document.documentMode===10}function Ol(i=ee()){return yo(i)||Il(i)||Al(i)||Sl(i)||/windows phone/i.test(i)||Cl(i)}function Pl(i,t=[]){let e;switch(i){case"Browser":e=sl(ee());break;case"Worker":e=`${sl(ee())}-${i}`;break;default:e=i}let n=t.length?t.join(","):"FirebaseCore-web";return`${e}/JsCore/${pi}/${n}`}var to=class{constructor(t){this.auth=t,this.queue=[]}pushCallback(t,e){let n=r=>new Promise((o,a)=>{try{let c=t(r);o(c)}catch(c){a(c)}});n.onAbort=e,this.queue.push(n);let s=this.queue.length-1;return()=>{this.queue[s]=()=>Promise.resolve()}}runMiddleware(t){return d(this,null,function*(){if(this.auth.currentUser===t)return;let e=[];try{for(let n of this.queue)yield n(t),n.onAbort&&e.push(n.onAbort)}catch(n){e.reverse();for(let s of e)try{s()}catch{}throw this.auth._errorFactory.create("login-blocked",{originalMessage:n?.message})}})}};function lf(e){return d(this,arguments,function*(i,t={}){return vi(i,"GET","/v2/passwordPolicy",mo(i,t))})}var df=6,io=class{constructor(t){var e,n,s,r;let o=t.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=(e=o.minPasswordLength)!==null&&e!==void 0?e:df,o.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=o.maxPasswordLength),o.containsLowercaseCharacter!==void 0&&(this.customStrengthOptions.containsLowercaseLetter=o.containsLowercaseCharacter),o.containsUppercaseCharacter!==void 0&&(this.customStrengthOptions.containsUppercaseLetter=o.containsUppercaseCharacter),o.containsNumericCharacter!==void 0&&(this.customStrengthOptions.containsNumericCharacter=o.containsNumericCharacter),o.containsNonAlphanumericCharacter!==void 0&&(this.customStrengthOptions.containsNonAlphanumericCharacter=o.containsNonAlphanumericCharacter),this.enforcementState=t.enforcementState,this.enforcementState==="ENFORCEMENT_STATE_UNSPECIFIED"&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=(s=(n=t.allowedNonAlphanumericCharacters)===null||n===void 0?void 0:n.join(""))!==null&&s!==void 0?s:"",this.forceUpgradeOnSignin=(r=t.forceUpgradeOnSignin)!==null&&r!==void 0?r:!1,this.schemaVersion=t.schemaVersion}validatePassword(t){var e,n,s,r,o,a;let c={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(t,c),this.validatePasswordCharacterOptions(t,c),c.isValid&&(c.isValid=(e=c.meetsMinPasswordLength)!==null&&e!==void 0?e:!0),c.isValid&&(c.isValid=(n=c.meetsMaxPasswordLength)!==null&&n!==void 0?n:!0),c.isValid&&(c.isValid=(s=c.containsLowercaseLetter)!==null&&s!==void 0?s:!0),c.isValid&&(c.isValid=(r=c.containsUppercaseLetter)!==null&&r!==void 0?r:!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(t,e){let n=this.customStrengthOptions.minPasswordLength,s=this.customStrengthOptions.maxPasswordLength;n&&(e.meetsMinPasswordLength=t.length>=n),s&&(e.meetsMaxPasswordLength=t.length<=s)}validatePasswordCharacterOptions(t,e){this.updatePasswordCharacterOptionsStatuses(e,!1,!1,!1,!1);let n;for(let s=0;s<t.length;s++)n=t.charAt(s),this.updatePasswordCharacterOptionsStatuses(e,n>="a"&&n<="z",n>="A"&&n<="Z",n>="0"&&n<="9",this.allowedNonAlphanumericCharacters.includes(n))}updatePasswordCharacterOptionsStatuses(t,e,n,s,r){this.customStrengthOptions.containsLowercaseLetter&&(t.containsLowercaseLetter||(t.containsLowercaseLetter=e)),this.customStrengthOptions.containsUppercaseLetter&&(t.containsUppercaseLetter||(t.containsUppercaseLetter=n)),this.customStrengthOptions.containsNumericCharacter&&(t.containsNumericCharacter||(t.containsNumericCharacter=s)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(t.containsNonAlphanumericCharacter||(t.containsNonAlphanumericCharacter=r))}};var no=class{constructor(t,e,n,s){this.app=t,this.heartbeatServiceProvider=e,this.appCheckServiceProvider=n,this.config=s,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new ns(this),this.idTokenSubscription=new ns(this),this.beforeStateQueue=new to(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=_l,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=t.name,this.clientVersion=s.sdkClientVersion}_initializeWithPersistence(t,e){return e&&(this._popupRedirectResolver=Je(e)),this._initializationPromise=this.queue(()=>d(this,null,function*(){var n,s;if(!this._deleted&&(this.persistenceManager=yield is.create(this,t),!this._deleted)){if(!((n=this._popupRedirectResolver)===null||n===void 0)&&n._shouldInitProactively)try{yield this._popupRedirectResolver._initialize(this)}catch{}yield this.initializeCurrentUser(e),this.lastNotifiedUid=((s=this.currentUser)===null||s===void 0?void 0:s.uid)||null,!this._deleted&&(this._isInitialized=!0)}})),this._initializationPromise}_onStorageEvent(){return d(this,null,function*(){if(this._deleted)return;let t=yield this.assertedPersistence.getCurrentUser();if(!(!this.currentUser&&!t)){if(this.currentUser&&t&&this.currentUser.uid===t.uid){this._currentUser._assign(t),yield this.currentUser.getIdToken();return}yield this._updateCurrentUser(t,!0)}})}initializeCurrentUserFromIdToken(t){return d(this,null,function*(){try{let e=yield bl(this,{idToken:t}),n=yield _i._fromGetAccountInfoResponse(this,e,t);yield this.directlySetCurrentUser(n)}catch(e){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",e),yield this.directlySetCurrentUser(null)}})}initializeCurrentUser(t){return d(this,null,function*(){var e;if(ke(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(),s=n,r=!1;if(t&&this.config.authDomain){yield this.getOrInitRedirectPersistenceManager();let o=(e=this.redirectUser)===null||e===void 0?void 0:e._redirectEventId,a=s?._redirectEventId,c=yield this.tryRedirectSignIn(t);(!o||o===a)&&c?.user&&(s=c.user,r=!0)}if(!s)return this.directlySetCurrentUser(null);if(!s._redirectEventId){if(r)try{yield this.beforeStateQueue.runMiddleware(s)}catch(o){s=n,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(o))}return s?this.reloadAndSetCurrentUserOrClear(s):this.directlySetCurrentUser(null)}return g(this._popupRedirectResolver,this,"argument-error"),yield this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===s._redirectEventId?this.directlySetCurrentUser(s):this.reloadAndSetCurrentUserOrClear(s)})}tryRedirectSignIn(t){return d(this,null,function*(){let e=null;try{e=yield this._popupRedirectResolver._completeRedirectFn(this,t,!0)}catch{yield this._setRedirectUser(null)}return e})}reloadAndSetCurrentUserOrClear(t){return d(this,null,function*(){try{yield ts(t)}catch(e){if(e?.code!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(t)})}useDeviceLanguage(){this.languageCode=Yp()}_delete(){return d(this,null,function*(){this._deleted=!0})}updateCurrentUser(t){return d(this,null,function*(){if(ke(this.app))return Promise.reject(Vt(this));let e=t?xt(t):null;return e&&g(e.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(e&&e._clone(this))})}_updateCurrentUser(t,e=!1){return d(this,null,function*(){if(!this._deleted)return t&&g(this.tenantId===t.tenantId,this,"tenant-id-mismatch"),e||(yield this.beforeStateQueue.runMiddleware(t)),this.queue(()=>d(this,null,function*(){yield this.directlySetCurrentUser(t),this.notifyAuthListeners()}))})}signOut(){return d(this,null,function*(){return ke(this.app)?Promise.reject(Vt(this)):(yield this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&(yield this._setRedirectUser(null)),this._updateCurrentUser(null,!0))})}setPersistence(t){return ke(this.app)?Promise.reject(Vt(this)):this.queue(()=>d(this,null,function*(){yield this.assertedPersistence.setPersistence(Je(t))}))}_getRecaptchaConfig(){return this.tenantId==null?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}validatePassword(t){return d(this,null,function*(){this._getPasswordPolicyInternal()||(yield this._updatePasswordPolicy());let e=this._getPasswordPolicyInternal();return e.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):e.validatePassword(t)})}_getPasswordPolicyInternal(){return this.tenantId===null?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}_updatePasswordPolicy(){return d(this,null,function*(){let t=yield lf(this),e=new io(t);this.tenantId===null?this._projectPasswordPolicy=e:this._tenantPasswordPolicies[this.tenantId]=e})}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(t){this._errorFactory=new We("auth","Firebase",t())}onAuthStateChanged(t,e,n){return this.registerStateListener(this.authStateSubscription,t,e,n)}beforeAuthStateChanged(t,e){return this.beforeStateQueue.pushCallback(t,e)}onIdTokenChanged(t,e,n){return this.registerStateListener(this.idTokenSubscription,t,e,n)}authStateReady(){return new Promise((t,e)=>{if(this.currentUser)t();else{let n=this.onAuthStateChanged(()=>{n(),t()},e)}})}revokeAccessToken(t){return d(this,null,function*(){if(this.currentUser){let e=yield this.currentUser.getIdToken(),n={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:t,idToken:e};this.tenantId!=null&&(n.tenantId=this.tenantId),yield rf(this,n)}})}toJSON(){var t;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:(t=this._currentUser)===null||t===void 0?void 0:t.toJSON()}}_setRedirectUser(t,e){return d(this,null,function*(){let n=yield this.getOrInitRedirectPersistenceManager(e);return t===null?n.removeCurrentUser():n.setCurrentUser(t)})}getOrInitRedirectPersistenceManager(t){return d(this,null,function*(){if(!this.redirectPersistenceManager){let e=t&&Je(t)||this._popupRedirectResolver;g(e,this,"argument-error"),this.redirectPersistenceManager=yield is.create(this,[Je(e._redirectPersistence)],"redirectUser"),this.redirectUser=yield this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager})}_redirectUserForId(t){return d(this,null,function*(){var e,n;return this._isInitialized&&(yield this.queue(()=>d(this,null,function*(){}))),((e=this._currentUser)===null||e===void 0?void 0:e._redirectEventId)===t?this._currentUser:((n=this.redirectUser)===null||n===void 0?void 0:n._redirectEventId)===t?this.redirectUser:null})}_persistUserIfCurrent(t){return d(this,null,function*(){if(t===this.currentUser)return this.queue(()=>d(this,null,function*(){return this.directlySetCurrentUser(t)}))})}_notifyListenersIfCurrent(t){t===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var t,e;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);let n=(e=(t=this.currentUser)===null||t===void 0?void 0:t.uid)!==null&&e!==void 0?e:null;this.lastNotifiedUid!==n&&(this.lastNotifiedUid=n,this.authStateSubscription.next(this.currentUser))}registerStateListener(t,e,n,s){if(this._deleted)return()=>{};let r=typeof e=="function"?e:e.next.bind(e),o=!1,a=this._isInitialized?Promise.resolve():this._initializationPromise;if(g(a,this,"internal-error"),a.then(()=>{o||r(this.currentUser)}),typeof e=="function"){let c=t.addObserver(e,n,s);return()=>{o=!0,c()}}else{let c=t.addObserver(e);return()=>{o=!0,c()}}}directlySetCurrentUser(t){return d(this,null,function*(){this.currentUser&&this.currentUser!==t&&this._currentUser._stopProactiveRefresh(),t&&this.isProactiveRefreshEnabled&&t._startProactiveRefresh(),this.currentUser=t,t?yield this.assertedPersistence.setCurrentUser(t):yield this.assertedPersistence.removeCurrentUser()})}queue(t){return this.operations=this.operations.then(t,t),this.operations}get assertedPersistence(){return g(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(t){!t||this.frameworks.includes(t)||(this.frameworks.push(t),this.frameworks.sort(),this.clientVersion=Pl(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}_getAdditionalHeaders(){return d(this,null,function*(){var t;let e={"X-Client-Version":this.clientVersion};this.app.options.appId&&(e["X-Firebase-gmpid"]=this.app.options.appId);let n=yield(t=this.heartbeatServiceProvider.getImmediate({optional:!0}))===null||t===void 0?void 0:t.getHeartbeatsHeader();n&&(e["X-Firebase-Client"]=n);let s=yield this._getAppCheckToken();return s&&(e["X-Firebase-AppCheck"]=s),e})}_getAppCheckToken(){return d(this,null,function*(){var t;let e=yield(t=this.appCheckServiceProvider.getImmediate({optional:!0}))===null||t===void 0?void 0:t.getToken();return e?.error&&zp(`Error while retrieving App Check token: ${e.error}`),e?.token})}};function us(i){return xt(i)}var ns=class{constructor(t){this.auth=t,this.observer=null,this.addObserver=Vc(e=>this.observer=e)}get next(){return g(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}};var bo={loadJS(){return d(this,null,function*(){throw new Error("Unable to load external scripts")})},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function uf(i){bo=i}function hf(i){return bo.loadJS(i)}function pf(){return bo.gapiScript}function Ml(i){return`__${i}${Math.floor(Math.random()*1e6)}`}function wo(i,t){let e=Gr(i,"auth");if(e.isInitialized()){let s=e.getImmediate(),r=e.getOptions();if(li(r,t??{}))return s;Fe(s,"already-initialized")}return e.initialize({options:t})}function ff(i,t){let e=t?.persistence||[],n=(Array.isArray(e)?e:[e]).map(Je);t?.errorMap&&i._updateErrorMap(t.errorMap),i._initializeWithPersistence(n,t?.popupRedirectResolver)}function Do(i,t,e){let n=us(i);g(n._canInitEmulator,n,"emulator-config-failed"),g(/^https?:\/\//.test(t),n,"invalid-emulator-scheme");let s=!!e?.disableWarnings,r=Rl(t),{host:o,port:a}=mf(t),c=a===null?"":`:${a}`;n.config.emulator={url:`${r}//${o}${c}/`},n.settings.appVerificationDisabledForTesting=!0,n.emulatorConfig=Object.freeze({host:o,port:a,protocol:r.replace(":",""),options:Object.freeze({disableWarnings:s})}),s||gf()}function Rl(i){let t=i.indexOf(":");return t<0?"":i.substr(0,t+1)}function mf(i){let t=Rl(i),e=/(\/\/)?([^?#/]+)/.exec(i.substr(t.length));if(!e)return{host:"",port:null};let n=e[2].split("@").pop()||"",s=/^(\[[^\]]+\])(:|$)/.exec(n);if(s){let r=s[1];return{host:r,port:rl(n.substr(r.length+1))}}else{let[r,o]=n.split(":");return{host:r,port:rl(o)}}}function rl(i){if(!i)return null;let t=Number(i);return isNaN(t)?null:t}function gf(){function i(){let t=document.createElement("p"),e=t.style;t.innerText="Running in emulator mode. Do not use with production credentials.",e.position="fixed",e.width="100%",e.backgroundColor="#ffffff",e.border=".1em solid #000000",e.color="#b50000",e.bottom="0px",e.left="0px",e.margin="0px",e.zIndex="10000",e.textAlign="center",t.classList.add("firebase-emulator-warning"),document.body.appendChild(t)}typeof console<"u"&&typeof console.info=="function"&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials."),typeof window<"u"&&typeof document<"u"&&(document.readyState==="loading"?window.addEventListener("DOMContentLoaded",i):i())}var Yi=class{constructor(t,e){this.providerId=t,this.signInMethod=e}toJSON(){return qe("not implemented")}_getIdTokenResponse(t){return qe("not implemented")}_linkToIdToken(t,e){return qe("not implemented")}_getReauthenticationResolver(t){return qe("not implemented")}};function gi(i,t){return d(this,null,function*(){return Xp(i,"POST","/v1/accounts:signInWithIdp",mo(i,t))})}var _f="http://localhost",ss=class i extends Yi{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(t){let e=new i(t.providerId,t.signInMethod);return t.idToken||t.accessToken?(t.idToken&&(e.idToken=t.idToken),t.accessToken&&(e.accessToken=t.accessToken),t.nonce&&!t.pendingToken&&(e.nonce=t.nonce),t.pendingToken&&(e.pendingToken=t.pendingToken)):t.oauthToken&&t.oauthTokenSecret?(e.accessToken=t.oauthToken,e.secret=t.oauthTokenSecret):Fe("argument-error"),e}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,nonce:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(t){let e=typeof t=="string"?JSON.parse(t):t,{providerId:n,signInMethod:s}=e,r=cn(e,["providerId","signInMethod"]);if(!n||!s)return null;let o=new i(n,s);return o.idToken=r.idToken||void 0,o.accessToken=r.accessToken||void 0,o.secret=r.secret,o.nonce=r.nonce,o.pendingToken=r.pendingToken||null,o}_getIdTokenResponse(t){let e=this.buildRequest();return gi(t,e)}_linkToIdToken(t,e){let n=this.buildRequest();return n.idToken=e,gi(t,n)}_getReauthenticationResolver(t){let e=this.buildRequest();return e.autoCreate=!1,gi(t,e)}buildRequest(){let t={requestUri:_f,returnSecureToken:!0};if(this.pendingToken)t.pendingToken=this.pendingToken;else{let e={};this.idToken&&(e.id_token=this.idToken),this.accessToken&&(e.access_token=this.accessToken),this.secret&&(e.oauth_token_secret=this.secret),e.providerId=this.providerId,this.nonce&&!this.pendingToken&&(e.nonce=this.nonce),t.postBody=di(e)}return t}};var Qi=class{constructor(t){this.providerId=t,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(t){this.defaultLanguageCode=t}setCustomParameters(t){return this.customParameters=t,this}getCustomParameters(){return this.customParameters}};var rs=class extends Qi{constructor(){super(...arguments),this.scopes=[]}addScope(t){return this.scopes.includes(t)||this.scopes.push(t),this}getScopes(){return[...this.scopes]}};var en=(()=>{class i extends rs{constructor(){super("google.com"),this.addScope("profile")}static credential(e,n){return ss._fromParams({providerId:i.PROVIDER_ID,signInMethod:i.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:n})}static credentialFromResult(e){return i.credentialFromTaggedObject(e)}static credentialFromError(e){return i.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{oauthIdToken:n,oauthAccessToken:s}=e;if(!n&&!s)return null;try{return i.credential(n,s)}catch{return null}}}i.GOOGLE_SIGN_IN_METHOD="google.com",i.PROVIDER_ID="google.com";return i})();var Zi=class i{constructor(t){this.user=t.user,this.providerId=t.providerId,this._tokenResponse=t._tokenResponse,this.operationType=t.operationType}static _fromIdTokenResponse(t,e,n,s=!1){return d(this,null,function*(){let r=yield _i._fromIdTokenResponse(t,n,s),o=ol(n);return new i({user:r,providerId:o,_tokenResponse:n,operationType:e})})}static _forOperation(t,e,n){return d(this,null,function*(){yield t._updateTokensIfNecessary(n,!0);let s=ol(n);return new i({user:t,providerId:s,_tokenResponse:n,operationType:e})})}};function ol(i){return i.providerId?i.providerId:"phoneNumber"in i?"phone":null}var so=class i extends Se{constructor(t,e,n,s){var r;super(e.code,e.message),this.operationType=n,this.user=s,Object.setPrototypeOf(this,i.prototype),this.customData={appName:t.name,tenantId:(r=t.tenantId)!==null&&r!==void 0?r:void 0,_serverResponse:e.customData._serverResponse,operationType:n}}static _fromErrorAndOperation(t,e,n,s){return new i(t,e,n,s)}};function Nl(i,t,e,n){return(t==="reauthenticate"?e._getReauthenticationResolver(i):e._getIdTokenResponse(i)).catch(r=>{throw r.code==="auth/multi-factor-auth-required"?so._fromErrorAndOperation(i,r,t,n):r})}function vf(i,t,e=!1){return d(this,null,function*(){let n=yield Ji(i,t._linkToIdToken(i.auth,yield i.getIdToken()),e);return Zi._forOperation(i,"link",n)})}function yf(i,t,e=!1){return d(this,null,function*(){let{auth:n}=i;if(ke(n.app))return Promise.reject(Vt(n));let s="reauthenticate";try{let r=yield Ji(i,Nl(n,s,t,i),e);g(r.idToken,n,"internal-error");let o=_o(r.idToken);g(o,n,"internal-error");let{sub:a}=o;return g(i.uid===a,n,"user-mismatch"),Zi._forOperation(i,s,r)}catch(r){throw r?.code==="auth/user-not-found"&&Fe(n,"user-mismatch"),r}})}function bf(i,t,e=!1){return d(this,null,function*(){if(ke(i.app))return Promise.reject(Vt(i));let n="signIn",s=yield Nl(i,n,t),r=yield Zi._fromIdTokenResponse(i,n,s);return e||(yield i._updateCurrentUser(r.user)),r})}function tn(i,t,e,n){return xt(i).onIdTokenChanged(t,e,n)}function Eo(i,t,e){return xt(i).beforeAuthStateChanged(t,e)}var os="__sak";var as=class{constructor(t,e){this.storageRetriever=t,this.type=e}_isAvailable(){try{return this.storage?(this.storage.setItem(os,"1"),this.storage.removeItem(os),Promise.resolve(!0)):Promise.resolve(!1)}catch{return Promise.resolve(!1)}}_set(t,e){return this.storage.setItem(t,JSON.stringify(e)),Promise.resolve()}_get(t){let e=this.storage.getItem(t);return Promise.resolve(e?JSON.parse(e):null)}_remove(t){return this.storage.removeItem(t),Promise.resolve()}get storage(){return this.storageRetriever()}};var wf=1e3,Df=10,Ef=(()=>{class i extends as{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(e,n)=>this.onStorageEvent(e,n),this.listeners={},this.localCache={},this.pollTimer=null,this.fallbackToPolling=Ol(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(let n of Object.keys(this.listeners)){let s=this.storage.getItem(n),r=this.localCache[n];s!==r&&e(n,r,s)}}onStorageEvent(e,n=!1){if(!e.key){this.forAllChangedKeys((a,c,l)=>{this.notifyListeners(a,l)});return}let s=e.key;n?this.detachListener():this.stopPolling();let r=()=>{let a=this.storage.getItem(s);!n&&this.localCache[s]===a||this.notifyListeners(s,a)},o=this.storage.getItem(s);cf()&&o!==e.newValue&&e.newValue!==e.oldValue?setTimeout(r,Df):r()}notifyListeners(e,n){this.localCache[e]=n;let s=this.listeners[e];if(s)for(let r of Array.from(s))r(n&&JSON.parse(n))}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((e,n,s)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:n,newValue:s}),!0)})},wf)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(e,n){Object.keys(this.listeners).length===0&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[e]||(this.listeners[e]=new Set,this.localCache[e]=this.storage.getItem(e)),this.listeners[e].add(n)}_removeListener(e,n){this.listeners[e]&&(this.listeners[e].delete(n),this.listeners[e].size===0&&delete this.listeners[e]),Object.keys(this.listeners).length===0&&(this.detachListener(),this.stopPolling())}_set(e,n){return d(this,null,function*(){yield gt(i.prototype,this,"_set").call(this,e,n),this.localCache[e]=JSON.stringify(n)})}_get(e){return d(this,null,function*(){let n=yield gt(i.prototype,this,"_get").call(this,e);return this.localCache[e]=JSON.stringify(n),n})}_remove(e){return d(this,null,function*(){yield gt(i.prototype,this,"_remove").call(this,e),delete this.localCache[e]})}}return i.type="LOCAL",i})(),kl=Ef;var Tf=(()=>{class i extends as{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(e,n){}_removeListener(e,n){}}return i.type="SESSION",i})(),To=Tf;function Cf(i){return Promise.all(i.map(t=>d(this,null,function*(){try{return{fulfilled:!0,value:yield t}}catch(e){return{fulfilled:!1,reason:e}}})))}var If=(()=>{class i{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(e){let n=this.receivers.find(r=>r.isListeningto(e));if(n)return n;let s=new i(e);return this.receivers.push(s),s}isListeningto(e){return this.eventTarget===e}handleEvent(e){return d(this,null,function*(){let n=e,{eventId:s,eventType:r,data:o}=n.data,a=this.handlersMap[r];if(!a?.size)return;n.ports[0].postMessage({status:"ack",eventId:s,eventType:r});let c=Array.from(a).map(u=>d(this,null,function*(){return u(n.origin,o)})),l=yield Cf(c);n.ports[0].postMessage({status:"done",eventId:s,eventType:r,response:l})})}_subscribe(e,n){Object.keys(this.handlersMap).length===0&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[e]||(this.handlersMap[e]=new Set),this.handlersMap[e].add(n)}_unsubscribe(e,n){this.handlersMap[e]&&n&&this.handlersMap[e].delete(n),(!n||this.handlersMap[e].size===0)&&delete this.handlersMap[e],Object.keys(this.handlersMap).length===0&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}i.receivers=[];return i})();function Co(i="",t=10){let e="";for(let n=0;n<t;n++)e+=Math.floor(Math.random()*10);return i+e}var ro=class{constructor(t){this.target=t,this.handlers=new Set}removeMessageHandler(t){t.messageChannel&&(t.messageChannel.port1.removeEventListener("message",t.onMessage),t.messageChannel.port1.close()),this.handlers.delete(t)}_send(t,e,n=50){return d(this,null,function*(){let s=typeof MessageChannel<"u"?new MessageChannel:null;if(!s)throw new Error("connection_unavailable");let r,o;return new Promise((a,c)=>{let l=Co("",20);s.port1.start();let u=setTimeout(()=>{c(new Error("unsupported_event"))},n);o={messageChannel:s,onMessage(p){let f=p;if(f.data.eventId===l)switch(f.data.status){case"ack":clearTimeout(u),r=setTimeout(()=>{c(new Error("timeout"))},3e3);break;case"done":clearTimeout(r),a(f.data.response);break;default:clearTimeout(u),clearTimeout(r),c(new Error("invalid_response"));break}}},this.handlers.add(o),s.port1.addEventListener("message",o.onMessage),this.target.postMessage({eventType:t,eventId:l,data:e},[s.port2])}).finally(()=>{o&&this.removeMessageHandler(o)})})}};function xe(){return window}function Sf(i){xe().location.href=i}function xl(){return typeof xe().WorkerGlobalScope<"u"&&typeof xe().importScripts=="function"}function Af(){return d(this,null,function*(){if(!navigator?.serviceWorker)return null;try{return(yield navigator.serviceWorker.ready).active}catch{return null}})}function Of(){var i;return((i=navigator?.serviceWorker)===null||i===void 0?void 0:i.controller)||null}function Pf(){return xl()?self:null}var Fl="firebaseLocalStorageDb",Mf=1,cs="firebaseLocalStorage",Bl="fbase_key",Ht=class{constructor(t){this.request=t}toPromise(){return new Promise((t,e)=>{this.request.addEventListener("success",()=>{t(this.request.result)}),this.request.addEventListener("error",()=>{e(this.request.error)})})}};function hs(i,t){return i.transaction([cs],t?"readwrite":"readonly").objectStore(cs)}function Rf(){let i=indexedDB.deleteDatabase(Fl);return new Ht(i).toPromise()}function oo(){let i=indexedDB.open(Fl,Mf);return new Promise((t,e)=>{i.addEventListener("error",()=>{e(i.error)}),i.addEventListener("upgradeneeded",()=>{let n=i.result;try{n.createObjectStore(cs,{keyPath:Bl})}catch(s){e(s)}}),i.addEventListener("success",()=>d(this,null,function*(){let n=i.result;n.objectStoreNames.contains(cs)?t(n):(n.close(),yield Rf(),t(yield oo()))}))})}function al(i,t,e){return d(this,null,function*(){let n=hs(i,!0).put({[Bl]:t,value:e});return new Ht(n).toPromise()})}function Nf(i,t){return d(this,null,function*(){let e=hs(i,!1).get(t),n=yield new Ht(e).toPromise();return n===void 0?null:n.value})}function cl(i,t){let e=hs(i,!0).delete(t);return new Ht(e).toPromise()}var kf=800,xf=3,Ff=(()=>{class i{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 d(this,null,function*(){return this.db?this.db:(this.db=yield oo(),this.db)})}_withRetries(e){return d(this,null,function*(){let n=0;for(;;)try{let s=yield this._openDb();return yield e(s)}catch(s){if(n++>xf)throw s;this.db&&(this.db.close(),this.db=void 0)}})}initializeServiceWorkerMessaging(){return d(this,null,function*(){return xl()?this.initializeReceiver():this.initializeSender()})}initializeReceiver(){return d(this,null,function*(){this.receiver=If._getInstance(Pf()),this.receiver._subscribe("keyChanged",(e,n)=>d(this,null,function*(){return{keyProcessed:(yield this._poll()).includes(n.key)}})),this.receiver._subscribe("ping",(e,n)=>d(this,null,function*(){return["keyChanged"]}))})}initializeSender(){return d(this,null,function*(){var e,n;if(this.activeServiceWorker=yield Af(),!this.activeServiceWorker)return;this.sender=new ro(this.activeServiceWorker);let s=yield this.sender._send("ping",{},800);s&&!((e=s[0])===null||e===void 0)&&e.fulfilled&&!((n=s[0])===null||n===void 0)&&n.value.includes("keyChanged")&&(this.serviceWorkerReceiverAvailable=!0)})}notifyServiceWorker(e){return d(this,null,function*(){if(!(!this.sender||!this.activeServiceWorker||Of()!==this.activeServiceWorker))try{yield this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch{}})}_isAvailable(){return d(this,null,function*(){try{if(!indexedDB)return!1;let e=yield oo();return yield al(e,os,"1"),yield cl(e,os),!0}catch{}return!1})}_withPendingWrite(e){return d(this,null,function*(){this.pendingWrites++;try{yield e()}finally{this.pendingWrites--}})}_set(e,n){return d(this,null,function*(){return this._withPendingWrite(()=>d(this,null,function*(){return yield this._withRetries(s=>al(s,e,n)),this.localCache[e]=n,this.notifyServiceWorker(e)}))})}_get(e){return d(this,null,function*(){let n=yield this._withRetries(s=>Nf(s,e));return this.localCache[e]=n,n})}_remove(e){return d(this,null,function*(){return this._withPendingWrite(()=>d(this,null,function*(){return yield this._withRetries(n=>cl(n,e)),delete this.localCache[e],this.notifyServiceWorker(e)}))})}_poll(){return d(this,null,function*(){let e=yield this._withRetries(r=>{let o=hs(r,!1).getAll();return new Ht(o).toPromise()});if(!e)return[];if(this.pendingWrites!==0)return[];let n=[],s=new Set;if(e.length!==0)for(let{fbase_key:r,value:o}of e)s.add(r),JSON.stringify(this.localCache[r])!==JSON.stringify(o)&&(this.notifyListeners(r,o),n.push(r));for(let r of Object.keys(this.localCache))this.localCache[r]&&!s.has(r)&&(this.notifyListeners(r,null),n.push(r));return n})}notifyListeners(e,n){this.localCache[e]=n;let s=this.listeners[e];if(s)for(let r of Array.from(s))r(n)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>d(this,null,function*(){return this._poll()}),kf)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,n){Object.keys(this.listeners).length===0&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(n)}_removeListener(e,n){this.listeners[e]&&(this.listeners[e].delete(n),this.listeners[e].size===0&&delete this.listeners[e]),Object.keys(this.listeners).length===0&&this.stopPolling()}}return i.type="LOCAL",i})(),Ll=Ff;var Sw=Ml("rcb"),Aw=new Ut(3e4,6e4);function Vl(i,t){return t?Je(t):(g(i._popupRedirectResolver,i,"argument-error"),i._popupRedirectResolver)}var Xi=class extends Yi{constructor(t){super("custom","custom"),this.params=t}_getIdTokenResponse(t){return gi(t,this._buildIdpRequest())}_linkToIdToken(t,e){return gi(t,this._buildIdpRequest(e))}_getReauthenticationResolver(t){return gi(t,this._buildIdpRequest())}_buildIdpRequest(t){let e={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return t&&(e.idToken=t),e}};function Bf(i){return bf(i.auth,new Xi(i),i.bypassAuthState)}function Lf(i){let{auth:t,user:e}=i;return g(e,t,"internal-error"),yf(e,new Xi(i),i.bypassAuthState)}function Vf(i){return d(this,null,function*(){let{auth:t,user:e}=i;return g(e,t,"internal-error"),vf(e,new Xi(i),i.bypassAuthState)})}var ls=class{constructor(t,e,n,s,r=!1){this.auth=t,this.resolver=n,this.user=s,this.bypassAuthState=r,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(e)?e:[e]}execute(){return new Promise((t,e)=>d(this,null,function*(){this.pendingPromise={resolve:t,reject:e};try{this.eventManager=yield this.resolver._initialize(this.auth),yield this.onExecution(),this.eventManager.registerConsumer(this)}catch(n){this.reject(n)}}))}onAuthEvent(t){return d(this,null,function*(){let{urlResponse:e,sessionId:n,postBody:s,tenantId:r,error:o,type:a}=t;if(o){this.reject(o);return}let c={auth:this.auth,requestUri:e,sessionId:n,tenantId:r||void 0,postBody:s||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(yield this.getIdpTask(a)(c))}catch(l){this.reject(l)}})}onError(t){this.reject(t)}getIdpTask(t){switch(t){case"signInViaPopup":case"signInViaRedirect":return Bf;case"linkViaPopup":case"linkViaRedirect":return Vf;case"reauthViaPopup":case"reauthViaRedirect":return Lf;default:Fe(this.auth,"internal-error")}}resolve(t){Ke(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(t),this.unregisterAndCleanUp()}reject(t){Ke(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(t),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}};var Uf=new Ut(2e3,1e4);function Io(i,t,e){return d(this,null,function*(){if(ke(i.app))return Promise.reject(Ae(i,"operation-not-supported-in-this-environment"));let n=us(i);qp(i,t,Qi);let s=Vl(n,e);return new Hf(n,"signInViaPopup",t,s).executeNotNull()})}var Hf=(()=>{class i extends ls{constructor(e,n,s,r,o){super(e,n,r,o),this.provider=s,this.authWindow=null,this.pollId=null,i.currentPopupAction&&i.currentPopupAction.cancel(),i.currentPopupAction=this}executeNotNull(){return d(this,null,function*(){let e=yield this.execute();return g(e,this.auth,"internal-error"),e})}onExecution(){return d(this,null,function*(){Ke(this.filter.length===1,"Popup operations only handle one event");let e=Co();this.authWindow=yield this.resolver._openPopup(this.auth,this.provider,this.filter[0],e),this.authWindow.associatedEvent=e,this.resolver._originValidation(this.auth).catch(n=>{this.reject(n)}),this.resolver._isIframeWebStorageSupported(this.auth,n=>{n||this.reject(Ae(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()})}get eventId(){var e;return((e=this.authWindow)===null||e===void 0?void 0:e.associatedEvent)||null}cancel(){this.reject(Ae(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,i.currentPopupAction=null}pollUserCancellation(){let e=()=>{var n,s;if(!((s=(n=this.authWindow)===null||n===void 0?void 0:n.window)===null||s===void 0)&&s.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(Ae(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(e,Uf.get())};e()}}i.currentPopupAction=null;return i})(),$f="pendingRedirect",Qn=new Map,ao=class i extends ls{constructor(t,e,n=!1){super(t,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],e,void 0,n),this.eventId=null}execute(){return d(this,null,function*(){let t=Qn.get(this.auth._key());if(!t){try{let n=(yield jf(this.resolver,this.auth))?yield gt(i.prototype,this,"execute").call(this):null;t=()=>Promise.resolve(n)}catch(e){t=()=>Promise.reject(e)}Qn.set(this.auth._key(),t)}return this.bypassAuthState||Qn.set(this.auth._key(),()=>Promise.resolve(null)),t()})}onAuthEvent(t){return d(this,null,function*(){if(t.type==="signInViaRedirect")return gt(i.prototype,this,"onAuthEvent").call(this,t);if(t.type==="unknown"){this.resolve(null);return}if(t.eventId){let e=yield this.auth._redirectUserForId(t.eventId);if(e)return this.user=e,gt(i.prototype,this,"onAuthEvent").call(this,t);this.resolve(null)}})}onExecution(){return d(this,null,function*(){})}cleanUp(){}};function jf(i,t){return d(this,null,function*(){let e=zf(t),n=Wf(i);if(!(yield n._isAvailable()))return!1;let s=(yield n._get(e))==="true";return yield n._remove(e),s})}function Gf(i,t){Qn.set(i._key(),t)}function Wf(i){return Je(i._redirectPersistence)}function zf(i){return Yn($f,i.config.apiKey,i.name)}function qf(i,t,e=!1){return d(this,null,function*(){if(ke(i.app))return Promise.reject(Vt(i));let n=us(i),s=Vl(n,t),o=yield new ao(n,s,e).execute();return o&&!e&&(delete o.user._redirectEventId,yield n._persistUserIfCurrent(o.user),yield n._setRedirectUser(null,t)),o})}var Jf=10*60*1e3,co=class{constructor(t){this.auth=t,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(t){this.consumers.add(t),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,t)&&(this.sendToConsumer(this.queuedRedirectEvent,t),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(t){this.consumers.delete(t)}onEvent(t){if(this.hasEventBeenHandled(t))return!1;let e=!1;return this.consumers.forEach(n=>{this.isEventForConsumer(t,n)&&(e=!0,this.sendToConsumer(t,n),this.saveEventToCache(t))}),this.hasHandledPotentialRedirect||!Kf(t)||(this.hasHandledPotentialRedirect=!0,e||(this.queuedRedirectEvent=t,e=!0)),e}sendToConsumer(t,e){var n;if(t.error&&!Ul(t)){let s=((n=t.error.code)===null||n===void 0?void 0:n.split("auth/")[1])||"internal-error";e.onError(Ae(this.auth,s))}else e.onAuthEvent(t)}isEventForConsumer(t,e){let n=e.eventId===null||!!t.eventId&&t.eventId===e.eventId;return e.filter.includes(t.type)&&n}hasEventBeenHandled(t){return Date.now()-this.lastProcessedEventTime>=Jf&&this.cachedEventUids.clear(),this.cachedEventUids.has(ll(t))}saveEventToCache(t){this.cachedEventUids.add(ll(t)),this.lastProcessedEventTime=Date.now()}};function ll(i){return[i.type,i.eventId,i.sessionId,i.tenantId].filter(t=>t).join("-")}function Ul({type:i,error:t}){return i==="unknown"&&t?.code==="auth/no-auth-event"}function Kf(i){switch(i.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return Ul(i);default:return!1}}function Yf(e){return d(this,arguments,function*(i,t={}){return vi(i,"GET","/v1/projects",t)})}var Qf=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,Zf=/^https?/;function Xf(i){return d(this,null,function*(){if(i.config.emulator)return;let{authorizedDomains:t}=yield Yf(i);for(let e of t)try{if(em(e))return}catch{}Fe(i,"unauthorized-domain")})}function em(i){let t=Qr(),{protocol:e,hostname:n}=new URL(t);if(i.startsWith("chrome-extension://")){let o=new URL(i);return o.hostname===""&&n===""?e==="chrome-extension:"&&i.replace("chrome-extension://","")===t.replace("chrome-extension://",""):e==="chrome-extension:"&&o.hostname===n}if(!Zf.test(e))return!1;if(Qf.test(i))return n===i;let s=i.replace(/\./g,"\\.");return new RegExp("^(.+\\."+s+"|"+s+")$","i").test(n)}var tm=new Ut(3e4,6e4);function dl(){let i=xe().___jsl;if(i?.H){for(let t of Object.keys(i.H))if(i.H[t].r=i.H[t].r||[],i.H[t].L=i.H[t].L||[],i.H[t].r=[...i.H[t].L],i.CP)for(let e=0;e<i.CP.length;e++)i.CP[e]=null}}function im(i){return new Promise((t,e)=>{var n,s,r;function o(){dl(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{dl(),e(Ae(i,"network-request-failed"))},timeout:tm.get()})}if(!((s=(n=xe().gapi)===null||n===void 0?void 0:n.iframes)===null||s===void 0)&&s.Iframe)t(gapi.iframes.getContext());else if(!((r=xe().gapi)===null||r===void 0)&&r.load)o();else{let a=Ml("iframefcb");return xe()[a]=()=>{gapi.load?o():e(Ae(i,"network-request-failed"))},hf(`${pf()}?onload=${a}`).catch(c=>e(c))}}).catch(t=>{throw Zn=null,t})}var Zn=null;function nm(i){return Zn=Zn||im(i),Zn}var sm=new Ut(5e3,15e3),rm="__/auth/iframe",om="emulator/auth/iframe",am={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},cm=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function lm(i){let t=i.config;g(t.authDomain,i,"auth-domain-config-required");let e=t.emulator?fo(t,om):`https://${i.config.authDomain}/${rm}`,n={apiKey:t.apiKey,appName:i.name,v:pi},s=cm.get(i.config.apiHost);s&&(n.eid=s);let r=i._getFrameworks();return r.length&&(n.fw=r.join(",")),`${e}?${di(n).slice(1)}`}function dm(i){return d(this,null,function*(){let t=yield nm(i),e=xe().gapi;return g(e,i,"internal-error"),t.open({where:document.body,url:lm(i),messageHandlersFilter:e.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:am,dontclear:!0},n=>new Promise((s,r)=>d(this,null,function*(){yield n.restyle({setHideOnLeave:!1});let o=Ae(i,"network-request-failed"),a=xe().setTimeout(()=>{r(o)},sm.get());function c(){xe().clearTimeout(a),s(n)}n.ping(c).then(c,()=>{r(o)})})))})}var um={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},hm=500,pm=600,fm="_blank",mm="http://localhost",ds=class{constructor(t){this.window=t,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}};function gm(i,t,e,n=hm,s=pm){let r=Math.max((window.screen.availHeight-s)/2,0).toString(),o=Math.max((window.screen.availWidth-n)/2,0).toString(),a="",c=Object.assign(Object.assign({},um),{width:n.toString(),height:s.toString(),top:r,left:o}),l=ee().toLowerCase();e&&(a=Tl(l)?fm:e),Dl(l)&&(t=t||mm,c.scrollbars="yes");let u=Object.entries(c).reduce((f,[h,D])=>`${f}${h}=${D},`,"");if(af(l)&&a!=="_self")return _m(t||"",a),new ds(null);let p=window.open(t||"",a,u);g(p,i,"popup-blocked");try{p.focus()}catch{}return new ds(p)}function _m(i,t){let e=document.createElement("a");e.href=i,e.target=t;let n=document.createEvent("MouseEvent");n.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),e.dispatchEvent(n)}var vm="__/auth/handler",ym="emulator/auth/handler",bm=encodeURIComponent("fac");function ul(i,t,e,n,s,r){return d(this,null,function*(){g(i.config.authDomain,i,"auth-domain-config-required"),g(i.config.apiKey,i,"invalid-api-key");let o={apiKey:i.config.apiKey,appName:i.name,authType:e,redirectUrl:n,v:pi,eventId:s};if(t instanceof Qi){t.setDefaultLanguage(i.languageCode),o.providerId=t.providerId||"",Lc(t.getCustomParameters())||(o.customParameters=JSON.stringify(t.getCustomParameters()));for(let[u,p]of Object.entries(r||{}))o[u]=p}if(t instanceof rs){let u=t.getScopes().filter(p=>p!=="");u.length>0&&(o.scopes=u.join(","))}i.tenantId&&(o.tid=i.tenantId);let a=o;for(let u of Object.keys(a))a[u]===void 0&&delete a[u];let c=yield i._getAppCheckToken(),l=c?`#${bm}=${encodeURIComponent(c)}`:"";return`${wm(i)}?${di(a).slice(1)}${l}`})}function wm({config:i}){return i.emulator?fo(i,ym):`https://${i.authDomain}/${vm}`}var Yr="webStorageSupport",lo=class{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=To,this._completeRedirectFn=qf,this._overrideRedirectResult=Gf}_openPopup(t,e,n,s){return d(this,null,function*(){var r;Ke((r=this.eventManagers[t._key()])===null||r===void 0?void 0:r.manager,"_initialize() not called before _openPopup()");let o=yield ul(t,e,n,Qr(),s);return gm(t,o,Co())})}_openRedirect(t,e,n,s){return d(this,null,function*(){yield this._originValidation(t);let r=yield ul(t,e,n,Qr(),s);return Sf(r),new Promise(()=>{})})}_initialize(t){let e=t._key();if(this.eventManagers[e]){let{manager:s,promise:r}=this.eventManagers[e];return s?Promise.resolve(s):(Ke(r,"If manager is not set, promise should be"),r)}let n=this.initAndGetManager(t);return this.eventManagers[e]={promise:n},n.catch(()=>{delete this.eventManagers[e]}),n}initAndGetManager(t){return d(this,null,function*(){let e=yield dm(t),n=new co(t);return e.register("authEvent",s=>(g(s?.authEvent,t,"invalid-auth-event"),{status:n.onEvent(s.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[t._key()]={manager:n},this.iframes[t._key()]=e,n})}_isIframeWebStorageSupported(t,e){this.iframes[t._key()].send(Yr,{type:Yr},s=>{var r;let o=(r=s?.[0])===null||r===void 0?void 0:r[Yr];o!==void 0&&e(!!o),Fe(t,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(t){let e=t._key();return this.originValidationPromises[e]||(this.originValidationPromises[e]=Xf(t)),this.originValidationPromises[e]}get _shouldInitProactively(){return Ol()||El()||yo()}},Hl=lo;var hl="@firebase/auth",pl="1.7.9";var uo=class{constructor(t){this.auth=t,this.internalListeners=new Map}getUid(){var t;return this.assertAuthConfigured(),((t=this.auth.currentUser)===null||t===void 0?void 0:t.uid)||null}getToken(t){return d(this,null,function*(){return this.assertAuthConfigured(),yield this.auth._initializationPromise,this.auth.currentUser?{accessToken:yield this.auth.currentUser.getIdToken(t)}:null})}addAuthTokenListener(t){if(this.assertAuthConfigured(),this.internalListeners.has(t))return;let e=this.auth.onIdTokenChanged(n=>{t(n?.stsTokenManager.accessToken||null)});this.internalListeners.set(t,e),this.updateProactiveRefresh()}removeAuthTokenListener(t){this.assertAuthConfigured();let e=this.internalListeners.get(t);e&&(this.internalListeners.delete(t),e(),this.updateProactiveRefresh())}assertAuthConfigured(){g(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}};function Dm(i){switch(i){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}function Em(i){hi(new Re("auth",(t,{options:e})=>{let n=t.getProvider("app").getImmediate(),s=t.getProvider("heartbeat"),r=t.getProvider("app-check-internal"),{apiKey:o,authDomain:a}=n.options;g(o&&!o.includes(":"),"invalid-api-key",{appName:n.name});let c={apiKey:o,authDomain:a,clientPlatform:i,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:Pl(i)},l=new no(n,s,r,c);return ff(l,e),l},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((t,e,n)=>{t.getProvider("auth-internal").initialize()})),hi(new Re("auth-internal",t=>{let e=us(t.getProvider("auth").getImmediate());return(n=>new uo(n))(e)},"PRIVATE").setInstantiationMode("EXPLICIT")),de(hl,pl,Dm(i)),de(hl,pl,"esm2017")}var Tm=5*60,Cm=Or("authIdTokenMaxAge")||Tm,fl=null,Im=i=>t=>d(void 0,null,function*(){let e=t&&(yield t.getIdTokenResult()),n=e&&(new Date().getTime()-Date.parse(e.issuedAtTime))/1e3;if(n&&n>Cm)return;let s=e?.token;fl!==s&&(fl=s,yield fetch(i,{method:s?"POST":"DELETE",headers:s?{Authorization:`Bearer ${s}`}:{}}))});function So(i=$n()){let t=Gr(i,"auth");if(t.isInitialized())return t.getImmediate();let e=wo(i,{popupRedirectResolver:Hl,persistence:[Ll,kl,To]}),n=Or("authTokenSyncURL");if(n&&typeof isSecureContext=="boolean"&&isSecureContext){let r=new URL(n,location.origin);if(location.origin===r.origin){let o=Im(r.toString());Eo(e,o,()=>o(e.currentUser)),tn(e,a=>o(a))}}let s=Pc("auth");return s&&Do(e,`http://${s}`),e}function Sm(){var i,t;return(t=(i=document.getElementsByTagName("head"))===null||i===void 0?void 0:i[0])!==null&&t!==void 0?t:document}uf({loadJS(i){return new Promise((t,e)=>{let n=document.createElement("script");n.setAttribute("src",i),n.onload=t,n.onerror=s=>{let r=Ae("internal-error");r.customData=s,e(r)},n.type="text/javascript",n.charset="UTF-8",Sm().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="});Em("Browser");function Gl(i){return new Be(function(t){var e=tn(i,t.next.bind(t),t.error.bind(t),t.complete.bind(t));return{unsubscribe:e}})}var Wl="auth",$t=class{constructor(t){return t}},Ao=class{constructor(){return qr(Wl)}};var Oo=new ie("angularfire2.auth-instances");function vg(i,t){let e=el(Wl,i,t);return e&&new $t(e)}function yg(i){return(t,e)=>{let n=t.runOutsideAngular(()=>i(e));return new $t(n)}}var bg={provide:Ao,deps:[[new yt,Oo]]},wg={provide:$t,useFactory:vg,deps:[[new yt,Oo],Lt]};function vD(i,...t){return de("angularfire",Gi.full,"auth"),zt([wg,bg,{provide:Oo,useFactory:yg(i),multi:!0,deps:[ne,Z,zn,Wi,[new yt,Gn],...t]}])}var zl=mi(Gl,!0);var yD=mi(So,!0);var ql=mi(Io,!0);var jt=class extends Error{};jt.prototype.name="InvalidTokenError";function Dg(i){return decodeURIComponent(atob(i).replace(/(.)/g,(t,e)=>{let n=e.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}function Eg(i){let t=i.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return Dg(t)}catch{return atob(t)}}function Po(i,t){if(typeof i!="string")throw new jt("Invalid token specified: must be a string");t||(t={});let e=t.header===!0?0:1,n=i.split(".")[e];if(typeof n!="string")throw new jt(`Invalid token specified: missing part #${e+1}`);let s;try{s=Eg(n)}catch(r){throw new jt(`Invalid token specified: invalid base64 for part #${e+1} (${r.message})`)}try{return JSON.parse(s)}catch(r){throw new jt(`Invalid token specified: invalid json for part #${e+1} (${r.message})`)}}var MD=(()=>{class i{constructor(){this.httpService=m(Ic),this._roles=new _s([]),this.route=m(ma),this.router=m(ga),this.auth=m($t),this.provider=new en,this.user$=zl(this.auth),this.destroy=new R}login(e){return this.httpService.post("api/Token/Login",e).pipe(we(n=>this.storeLoginResponse(n)),we(n=>this.decodeRoles(n)),we(()=>this.storeFormLogin(e)),Yo(1))}storeLoginResponse(e){localStorage.setItem("Token",e.access_token),localStorage.setItem("ExpireDate",e.expiredAt),localStorage.setItem("TokenType",e.token_type)}storeFormLogin(e){localStorage.setItem("Domain",e.Host),localStorage.setItem("Username",e.Username)}decodeRoles(e){let n=Po(e.access_token);localStorage.setItem("Brand",n.Brand);let s=n["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 e=localStorage.getItem("Token");try{let n=Po(e),s=Math.floor(Date.now()/1e3);return n.exp?n.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.router.navigate(["/pages/shelf/barcode"])}automateLogon(){return d(this,null,function*(){return this.isAuthenticated()?yield this.router.navigate([""]):yield this.router.navigate([""])})}getDomain(){return localStorage.getItem("Domain")!==null?localStorage.getItem("Domain"):""}logout(){return d(this,null,function*(){let e=["ExpireDate","Token","TokenType","Roles","PrintMode"];for(let n of e)localStorage.removeItem(n);yield this.router.navigate([""])})}signInWithPopup(e){return wi(ql(this.auth,new en)).pipe(dn(n=>{let s=en.credentialFromResult(n),r={Host:e,IDToken:s?.idToken};return this.httpService.post("api/token/LoginWithSocialProvider",r).pipe(Oe(o=>o),we(o=>this.storeLoginResponse(o)),we(o=>this.decodeRoles(o)),Le(o=>_t(null)))}),Le(n=>_t(null)))}ngOnDestroy(){this.destroy.next(),this.destroy.complete()}checkAuthKeysExists(){return["ExpireDate","Token","TokenType","Roles","Brand","Domain","Username","PrintMode"].every(n=>!!localStorage.getItem(n))}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=N({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();export{yn as a,ed as b,Ni as c,id as d,Aa as e,va as f,It as g,zg as h,qg as i,Cn as j,Mi as k,Pd as l,Kg as m,Nd as n,xd as o,Bd as p,Ka as q,Yg as r,Qg as s,Zg as t,hc as u,Uy as v,Nu as w,Hy as x,$y as y,ai as z,vc as A,jy as B,Ky as C,wc as D,Yy as E,eh as F,Qy as G,Dc as H,Zy as I,Bn as J,Xy as K,eb as L,tb as M,Ln as N,Dh as O,vb as P,Ic as Q,gw as R,_w as S,vD as T,yD as U,Po as V,MD as W};
package/chunk-SCXFN4EA.js DELETED
@@ -1 +0,0 @@
1
- import{n as o}from"./chunk-LTVGOJEF.js";import{Da as t}from"./chunk-UE2JJIFL.js";var r=(e,p)=>{let a=localStorage.getItem("selectedPaperFormat"),n=t(o);return a?!0:(n.navigate(["/pages/profile-template"]),!1)};var i=[{path:"",children:[{path:"v2/print-mode",loadComponent:()=>import("./chunk-4CITKGGL.js").then(e=>e.PrintModeSelectorComponent)},{path:"barcode",loadComponent:()=>import("./chunk-G4LJCV6B.js").then(e=>e.BarcodeWrapperComponent)},{path:"",canActivateChild:[r],children:[{path:"barcode",loadComponent:()=>import("./chunk-L2JD4R6O.js").then(e=>e.ShelfBarcodeComponent)},{path:"price-label",loadComponent:()=>import("./chunk-377TROCD.js").then(e=>e.ShelfLabelComponent)}]}]}];export{i as dashboardRoutes};