@whoz-oss/coday-client 0.249.2 → 0.249.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/{chunk-Tnt17Uum.js → chunk-2TapTaXG.js} +1 -1
- package/browser/{chunk-otU95DGd.js → chunk-6tHPoek7.js} +1 -1
- package/browser/{chunk-DF9JuMSS.js → chunk-B-LBXHg-.js} +1 -1
- package/browser/{chunk-DATqkmXk.js → chunk-B0kyFx_y.js} +1 -1
- package/browser/{chunk-CSWaefpi.js → chunk-B4aBp6WW.js} +1 -1
- package/browser/{chunk-DIeUX6U7.js → chunk-B6DehsQ-.js} +1 -1
- package/browser/{chunk-rdNDu_G5.js → chunk-B6HBR6l3.js} +1 -1
- package/browser/{chunk-B0QeL_YS.js → chunk-BC_2TEa6.js} +1 -1
- package/browser/{chunk-Dh70Sw4n.js → chunk-BLwyktBH.js} +1 -1
- package/browser/{chunk-ZgaZX2Mw.js → chunk-BPTzJwdV.js} +1 -1
- package/browser/{chunk-B4ZxVpmQ.js → chunk-BRKM9jBe.js} +1 -1
- package/browser/{chunk-Bb8FM5N7.js → chunk-BTNW2iz6.js} +1 -1
- package/browser/{chunk-BXRE8Jnn.js → chunk-BT_iRqki.js} +1 -1
- package/browser/{chunk-Dv3y4cq8.js → chunk-BUF2p97y.js} +1 -1
- package/browser/{chunk-6uQvW5vO.js → chunk-BWdSq8vF.js} +1 -1
- package/browser/chunk-BY3C8HLz.js +276 -0
- package/browser/{chunk-D36CcRIa.js → chunk-BYD-ZEqa.js} +1 -1
- package/browser/{chunk-hivMYdms.js → chunk-BZZR3aP2.js} +1 -1
- package/browser/{chunk-BYobt-yL.js → chunk-B_crlzIY.js} +1 -1
- package/browser/{chunk-CyUSpM0s.js → chunk-BaP2JhEB.js} +1 -1
- package/browser/{chunk-8QCOKWfy.js → chunk-Bggbx31H.js} +1 -1
- package/browser/{chunk-BXeg32ej.js → chunk-BhlAZzwj.js} +1 -1
- package/browser/{chunk-Bo7V2O_x.js → chunk-Bi0_x9sA.js} +1 -1
- package/browser/{chunk-CMgbU-FY.js → chunk-BkD_xP5e.js} +1 -1
- package/browser/{chunk-CtCrz21E.js → chunk-BlR-g_sS.js} +1 -1
- package/browser/{chunk-ChlM0KaI.js → chunk-BtVK9hVG.js} +1 -1
- package/browser/{chunk-R1YuCBfk.js → chunk-BzkpZO0i.js} +1 -1
- package/browser/{chunk-Dc58xQxP.js → chunk-C4iXIN7X.js} +1 -1
- package/browser/{chunk-BHrJwQJY.js → chunk-C7zuPRu9.js} +1 -1
- package/browser/{chunk-B1T1lhxO.js → chunk-CBe69s-2.js} +1 -1
- package/browser/{chunk-cxvtBPGk.js → chunk-CFLyg-oC.js} +1 -1
- package/browser/{chunk-DrzUXE6a.js → chunk-CSzw8H2F.js} +1 -1
- package/browser/{chunk-DWXHIgAs.js → chunk-CTYiqe0l.js} +1 -1
- package/browser/{chunk-CRujMca4.js → chunk-CWFDInt7.js} +1 -1
- package/browser/{chunk-CI20rCP1.js → chunk-CgrWMGhT.js} +1 -1
- package/browser/{chunk-CEFRpdhC.js → chunk-Cr2mSoCg.js} +1 -1
- package/browser/{chunk-BGG8qTjD.js → chunk-CsOfELwl.js} +1 -1
- package/browser/{chunk-CoVKXwLW.js → chunk-CtWA9Wcw.js} +2 -2
- package/browser/{chunk-Ims5pjdx.js → chunk-CvL11Svz.js} +1 -1
- package/browser/{chunk-CESBNo1v.js → chunk-CwUIxEoO.js} +1 -1
- package/browser/{chunk-Js79q0Hk.js → chunk-Cxcbg8Y2.js} +1 -1
- package/browser/{chunk-hpkckHAH.js → chunk-D2yqDA1u.js} +1 -1
- package/browser/{chunk-D4O2SdR-.js → chunk-DITp7n6E.js} +1 -1
- package/browser/{chunk-CujZ5wxO.js → chunk-DLXkxUg9.js} +1 -1
- package/browser/{chunk-DVw6VVSF.js → chunk-DLsoHfhP.js} +1 -1
- package/browser/chunk-DVJHLBDM.js +1 -0
- package/browser/{chunk-sQ2hJaJy.js → chunk-DVQQW6km.js} +1 -1
- package/browser/{chunk-CSLsbjtc.js → chunk-DcWLC4S7.js} +1 -1
- package/browser/{chunk-Cl7N3gK-.js → chunk-De9hRkSc.js} +1 -1
- package/browser/{chunk-DqOy3vx6.js → chunk-Dlm3_p0t.js} +1 -1
- package/browser/{chunk-tiXMntK-.js → chunk-Dlx5Rt5V.js} +1 -1
- package/browser/{chunk-Df2NmKyO.js → chunk-DoYeTXOn.js} +1 -1
- package/browser/{chunk-BngP4FHh.js → chunk-DrMoRmsm.js} +1 -1
- package/browser/{chunk-C_hps2N_.js → chunk-DvXx9y4n.js} +1 -1
- package/browser/{chunk-BbkTgcYb.js → chunk-DwJCq7KC.js} +1 -1
- package/browser/{chunk-Cvmc37VM.js → chunk-NOr0w_o_.js} +1 -1
- package/browser/{chunk-D615HDbJ.js → chunk-Pl7edkoq.js} +1 -1
- package/browser/{chunk-DxyVrxwh.js → chunk-Sc506DO8.js} +1 -1
- package/browser/{chunk-DuetvIR9.js → chunk-ZXaT_xHg.js} +1 -1
- package/browser/{chunk-DW95Jf_o.js → chunk-ZrkAX8bu.js} +1 -1
- package/browser/{chunk-CawleOYk.js → chunk-anmUJQp9.js} +1 -1
- package/browser/{chunk-B9VW5ZdD.js → chunk-cHZU18W6.js} +1 -1
- package/browser/{chunk-D8jkRlhn.js → chunk-gI_QNDKB.js} +1 -1
- package/browser/{chunk-TsE9fL5L.js → chunk-nHbbuVx2.js} +1 -1
- package/browser/{chunk-D3bTMcOe.js → chunk-p1EUiu98.js} +1 -1
- package/browser/{chunk-NZ2JSd9Y.js → chunk-spSRZfqJ.js} +1 -1
- package/browser/index.html +1 -1
- package/browser/{main-CERDHS7N.js → main-ZCJEGFW3.js} +1 -1
- package/package.json +1 -1
- package/browser/chunk-BWVGuXWV.js +0 -1
- package/browser/chunk-CeEsFGfn.js +0 -276
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {cM as An$1,z as z$1,a as P,aV as w,aK as Do,aL as Wn,aY as ks,dl as ge,aQ as As,az as Qt$1,cS as Gp,al as yt$2,bK as pe,g,cW as yr,w as we$1,br as wl,c1 as ME,H as Hi,m as mT,an as ce$1,Q as By,u as ue$1,dm as _t$1,bE as X$1,cc as Hf,cC as Ce$1,dn as vo,dp as Ke$1,aZ as YT,bB as Ii,cU as yg,b4 as nT,l as Ag,aC as wu,C as Cg,y as Hg,dq as Lw,dr as m,ds as Se$1,bx as am,aA as sn$1,A as Aw,bz as vC,bA as DC,b_ as FC,dt as ke,du as vn$1,S as pa,bT as Od,bg as Hy,a7 as ha,dv as Da,dw as Ia,dx as C$1,J as dy,aU as U$1,Y as x,aN as wt$2,aH as wS}from'./main-CERDHS7N.js';var Xe=(()=>{class n{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,i){this._renderer=e,this._elementRef=i;}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i);}registerOnTouched(e){this.onTouched=e;}registerOnChange(e){this.onChange=e;}setDisabledState(e){this.setProperty("disabled",e);}static \u0275fac=function(i){return new(i||n)(ge(As),ge(Qt$1))};static \u0275dir=ks({type:n})}return n})(),S=(()=>{class n extends Xe{static \u0275fac=(()=>{let e;return function(r){return (e||(e=Gp(n)))(r||n)}})();static \u0275dir=ks({type:n,features:[yg]})}return n})(),D=new w(""),Ft={provide:D,useExisting:Ii(()=>wt$1),multi:true},wt$1=(()=>{class n extends S{writeValue(e){this.setProperty("checked",e);}static \u0275fac=(()=>{let e;return function(r){return (e||(e=Gp(n)))(r||n)}})();static \u0275dir=ks({type:n,selectors:[["input","type","checkbox","formControlName","",3,"ngNoCva",""],["input","type","checkbox","formControl","",3,"ngNoCva",""],["input","type","checkbox","ngModel","",3,"ngNoCva",""]],hostBindings:function(i,r){i&1&&Ag("change",function(a){return r.onChange(a.target.checked)})("blur",function(){return r.onTouched()});},standalone:false,features:[nT([Ft]),yg]})}return n})(),Nt={provide:D,useExisting:Ii(()=>Ye),multi:true};function St(){let n=_t$1()?_t$1().getUserAgent():"";return /android (\d+)/.test(n.toLowerCase())}var It=new w(""),Ye=(()=>{class n extends Xe{_compositionMode;_composing=false;constructor(e,i,r){super(e,i),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!St());}writeValue(e){let i=e??"";this.setProperty("value",i);}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e);}_compositionStart(){this._composing=true;}_compositionEnd(e){this._composing=false,this._compositionMode&&this.onChange(e);}static \u0275fac=function(i){return new(i||n)(ge(As),ge(Qt$1),ge(It,8))};static \u0275dir=ks({type:n,selectors:[["input","formControlName","",3,"type","checkbox",3,"ngNoCva",""],["textarea","formControlName","",3,"ngNoCva",""],["input","formControl","",3,"type","checkbox",3,"ngNoCva",""],["textarea","formControl","",3,"ngNoCva",""],["input","ngModel","",3,"type","checkbox",3,"ngNoCva",""],["textarea","ngModel","",3,"ngNoCva",""],["","ngDefaultControl",""]],hostBindings:function(i,r){i&1&&Ag("input",function(a){return r._handleInput(a.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(a){return r._compositionEnd(a.target.value)});},standalone:false,features:[nT([Nt]),yg]})}return n})();function Ve(n){return n==null||De(n)===0}function De(n){return n==null?null:Array.isArray(n)||typeof n=="string"?n.length:n instanceof Set?n.size:null}var y=new w(""),I=new w(""),Ot=/^(?=.{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])?)*$/,_e=class{static min(t){return Ke(t)}static max(t){return Je(t)}static required(t){return Qe(t)}static requiredTrue(t){return xt(t)}static email(t){return Rt(t)}static minLength(t){return Pt(t)}static maxLength(t){return et$1(t)}static pattern(t){return kt(t)}static nullValidator(t){return te()}static compose(t){return ot$1(t)}static composeAsync(t){return at(t)}};function Ke(n){return t=>{if(t.value==null||n==null)return null;let e=parseFloat(t.value);return !isNaN(e)&&e<n?{min:{min:n,actual:t.value}}:null}}function Je(n){return t=>{if(t.value==null||n==null)return null;let e=parseFloat(t.value);return !isNaN(e)&&e>n?{max:{max:n,actual:t.value}}:null}}function Qe(n){return Ve(n.value)?{required:true}:null}function xt(n){return n.value===true?null:{required:true}}function Rt(n){return Ve(n.value)||Ot.test(n.value)?null:{email:true}}function Pt(n){return t=>{let e=t.value?.length??De(t.value);return e===null||e===0?null:e<n?{minlength:{requiredLength:n,actualLength:e}}:null}}function et$1(n){return t=>{let e=t.value?.length??De(t.value);return e!==null&&e>n?{maxlength:{requiredLength:n,actualLength:e}}:null}}function kt(n){if(!n)return te;let t,e;return typeof n=="string"?(e="",n.charAt(0)!=="^"&&(e+="^"),e+=n,n.charAt(n.length-1)!=="$"&&(e+="$"),t=new RegExp(e)):(e=n.toString(),t=n),i=>{if(Ve(i.value))return null;let r=i.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}function te(n){return null}function tt$1(n){return n!=null}function nt$1(n){return vo(n)?Ke$1(n):n}function it(n){let t={};return n.forEach(e=>{t=e!=null?P(P({},t),e):t;}),Object.keys(t).length===0?null:t}function rt$1(n,t){return t.map(e=>e(n))}function Tt(n){return !n.validate}function st(n){return n.map(t=>Tt(t)?t:e=>t.validate(e))}function ot$1(n){if(!n)return null;let t=n.filter(tt$1);return t.length==0?null:function(e){return it(rt$1(e,t))}}function be(n){return n!=null?ot$1(st(n)):null}function at(n){if(!n)return null;let t=n.filter(tt$1);return t.length==0?null:function(e){let i=rt$1(e,t).map(nt$1);return By(i).pipe(ue$1(it))}}function Ae(n){return n!=null?at(st(n)):null}function Ue(n,t){return n===null?[t]:Array.isArray(n)?[...n,t]:[n,t]}function lt(n){return n._rawValidators}function ut(n){return n._rawAsyncValidators}function ye(n){return n?Array.isArray(n)?n:[n]:[]}function ne(n,t){return Array.isArray(n)?n.includes(t):n===t}function He(n,t){let e=ye(t);return ye(n).forEach(r=>{ne(e,r)||e.push(r);}),e}function Le(n,t){return ye(t).filter(e=>!ne(n,e))}var ie=class{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}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=be(this._rawValidators);}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=Ae(this._rawAsyncValidators);}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(t){this._onDestroyCallbacks.push(t);}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[];}reset(t=void 0){this.control?.reset(t);}hasError(t,e){return this.control?this.control.hasError(t,e):false}getError(t,e){return this.control?this.control.getError(t,e):null}},h=class extends ie{name;get formDirective(){return null}get path(){return null}};var U="VALID",ee="INVALID",k="PENDING",H="DISABLED",E=class{},re=class extends E{value;source;constructor(t,e){super(),this.value=t,this.source=e;}},W=class extends E{pristine;source;constructor(t,e){super(),this.pristine=t,this.source=e;}},q$1=class q extends E{touched;source;constructor(t,e){super(),this.touched=t,this.source=e;}},T=class extends E{status;source;constructor(t,e){super(),this.status=t,this.source=e;}},se=class extends E{source;constructor(t){super(),this.source=t;}},N=class extends E{source;constructor(t){super(),this.source=t;}};function Me(n){return (ce(n)?n.validators:n)||null}function jt(n){return Array.isArray(n)?be(n):n||null}function Ee(n,t){return (ce(t)?t.asyncValidators:n)||null}function Bt(n){return Array.isArray(n)?Ae(n):n||null}function ce(n){return n!=null&&!Array.isArray(n)&&typeof n=="object"}function dt(n,t,e){let i=n.controls;if(!(t?Object.keys(i):i).length)throw new m(1e3,"");if(!ht(i,e))throw new m(1001,"")}function ct(n,t,e){n._forEachChild((i,r)=>{if(e[r]===void 0)throw new m(-1002,"")});}var $=class{_pendingDirty=false;_hasOwnPendingAsyncValidator=null;_pendingTouched=false;_onCollectionChange=()=>{};_updateOn;_hasRequired=Hi(false);_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(t,e){this._assignValidators(t),this._assignAsyncValidators(e);}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t,this._updateHasRequiredValidator();}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t;}get parent(){return this._parent}get status(){return An$1(this.statusReactive)}set status(t){An$1(()=>this.statusReactive.set(t));}_status=mT(()=>this.statusReactive());statusReactive=Hi(void 0);get valid(){return this.status===U}get invalid(){return this.status===ee}get pending(){return this.status===k}get disabled(){return this.status===H}get enabled(){return this.status!==H}errors;get pristine(){return An$1(this.pristineReactive)}set pristine(t){An$1(()=>this.pristineReactive.set(t));}_pristine=mT(()=>this.pristineReactive());pristineReactive=Hi(true);get dirty(){return !this.pristine}get touched(){return An$1(this.touchedReactive)}set touched(t){An$1(()=>this.touchedReactive.set(t));}_touched=mT(()=>this.touchedReactive());touchedReactive=Hi(false);get untouched(){return !this.touched}_events=new ce$1;events=this._events.asObservable();valueChanges;statusChanges;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(He(t,this._rawValidators));}addAsyncValidators(t){this.setAsyncValidators(He(t,this._rawAsyncValidators));}removeValidators(t){this.setValidators(Le(t,this._rawValidators));}removeAsyncValidators(t){this.setAsyncValidators(Le(t,this._rawAsyncValidators));}hasValidator(t){return ne(this._rawValidators,t)}hasAsyncValidator(t){return ne(this._rawAsyncValidators,t)}clearValidators(){this.validator=null;}clearAsyncValidators(){this.asyncValidator=null;}markAsTouched(t={}){let e=this.touched===false;this.touched=true;let i=t.sourceControl??this;t.onlySelf||this._parent?.markAsTouched(z$1(P({},t),{sourceControl:i})),e&&t.emitEvent!==false&&this._events.next(new q$1(true,i));}markAllAsDirty(t={}){this.markAsDirty({onlySelf:true,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsDirty(t));}markAllAsTouched(t={}){this.markAsTouched({onlySelf:true,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(t));}markAsUntouched(t={}){let e=this.touched===true;this.touched=false,this._pendingTouched=false;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:true,emitEvent:t.emitEvent,sourceControl:i});}),t.onlySelf||this._parent?._updateTouched(t,i),e&&t.emitEvent!==false&&this._events.next(new q$1(false,i));}markAsDirty(t={}){let e=this.pristine===true;this.pristine=false;let i=t.sourceControl??this;t.onlySelf||this._parent?.markAsDirty(z$1(P({},t),{sourceControl:i})),e&&t.emitEvent!==false&&this._events.next(new W(false,i));}markAsPristine(t={}){let e=this.pristine===false;this.pristine=true,this._pendingDirty=false;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:true,emitEvent:t.emitEvent});}),t.onlySelf||this._parent?._updatePristine(t,i),e&&t.emitEvent!==false&&this._events.next(new W(true,i));}markAsPending(t={}){this.status=k;let e=t.sourceControl??this;t.emitEvent!==false&&(this._events.next(new T(this.status,e)),this.statusChanges.emit(this.status)),t.onlySelf||this._parent?.markAsPending(z$1(P({},t),{sourceControl:e}));}disable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=H,this.errors=null,this._forEachChild(r=>{r.disable(z$1(P({},t),{onlySelf:true}));}),this._updateValue();let i=t.sourceControl??this;t.emitEvent!==false&&(this._events.next(new re(this.value,i)),this._events.next(new T(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(z$1(P({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(r=>r(true));}enable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=U,this._forEachChild(i=>{i.enable(z$1(P({},t),{onlySelf:true}));}),this.updateValueAndValidity({onlySelf:true,emitEvent:t.emitEvent}),this._updateAncestors(z$1(P({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(i=>i(false));}_updateAncestors(t,e){t.onlySelf||(this._parent?.updateValueAndValidity(t),t.skipPristineCheck||this._parent?._updatePristine({},e),this._parent?._updateTouched({},e));}setParent(t){this._parent=t;}getRawValue(){return this.value}updateValueAndValidity(t={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let i=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===U||this.status===k)&&this._runAsyncValidator(i,t.emitEvent);}let e=t.sourceControl??this;t.emitEvent!==false&&(this._events.next(new re(this.value,e)),this._events.next(new T(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),t.onlySelf||this._parent?.updateValueAndValidity(z$1(P({},t),{sourceControl:e}));}_updateTreeValidity(t={emitEvent:true}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:true,emitEvent:t.emitEvent});}_setInitialStatus(){this.status=this._allControlsDisabled()?H:U;}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t,e){if(this.asyncValidator){this.status=k,this._hasOwnPendingAsyncValidator={emitEvent:e!==false,shouldHaveEmitted:t!==false};let i=nt$1(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:e,shouldHaveEmitted:t});});}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let t=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??false;return this._hasOwnPendingAsyncValidator=null,t}return false}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(e.emitEvent!==false,this,e.shouldHaveEmitted);}get(t){let e=t;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((i,r)=>i&&i._find(r),this)}getError(t,e){let i=e?this.get(e):this;return i?.errors?i.errors[t]:null}hasError(t,e){return !!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t,e,i){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),(t||i)&&this._events.next(new T(this.status,e)),this._parent&&this._parent._updateControlsErrors(t,e,i);}_initObservables(){this.valueChanges=new yt$2,this.statusChanges=new yt$2;}_calculateStatus(){return this._allControlsDisabled()?H:this.errors?ee:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(k)?k:this._anyControlsHaveStatus(ee)?ee:U}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t,e){let i=!this._anyControlsDirty(),r=this.pristine!==i;this.pristine=i,t.onlySelf||this._parent?._updatePristine(t,e),r&&this._events.next(new W(this.pristine,e));}_updateTouched(t={},e){this.touched=this._anyControlsTouched(),this._events.next(new q$1(this.touched,e)),t.onlySelf||this._parent?._updateTouched(t,e);}_onDisabledChange=[];_registerOnCollectionChange(t){this._onCollectionChange=t;}_setUpdateStrategy(t){ce(t)&&t.updateOn!=null&&(this._updateOn=t.updateOn);}_parentMarkedDirty(t){return !t&&!!this._parent?.dirty&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=jt(this._rawValidators),this._updateHasRequiredValidator();}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=Bt(this._rawAsyncValidators);}_updateHasRequiredValidator(){An$1(()=>this._hasRequired.set(this.hasValidator(_e.required)));}};function ht(n,t){return Object.hasOwn(n,t)}function Gt(n){return n.tagName==="INPUT"||n.tagName==="SELECT"||n.tagName==="TEXTAREA"}function Ut(n,t,e,i){switch(e){case "name":n.setAttribute(t,e,i);break;case "disabled":case "readonly":case "required":i?n.setAttribute(t,e,""):n.removeAttribute(t,e);break;case "max":case "min":case "minLength":case "maxLength":i!==void 0?n.setAttribute(t,e,i.toString()):n.removeAttribute(t,e);break}}var Ce=class{kind;context;control;message;constructor({kind:t,context:e,control:i}){this.kind=t,this.context=e,this.control=i;}};function Ht(n){return typeof n=="number"?n:parseInt(n,10)}function ft(n){return typeof n=="number"?n:parseFloat(n)}var he=(()=>{class n{_validator=te;_onChange;_enabled;ngOnChanges(e){if(this.inputName in e){let i=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):te,this._onChange?.();}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e;}enabled(e){return e!=null}static \u0275fac=function(i){return new(i||n)};static \u0275dir=ks({type:n,features:[wu]})}return n})(),Lt={provide:y,useExisting:Ii(()=>Wt),multi:true},Wt=(()=>{class n extends he{max;inputName="max";normalizeInput=e=>ft(e);createValidator=e=>Je(e);static \u0275fac=(()=>{let e;return function(r){return (e||(e=Gp(n)))(r||n)}})();static \u0275dir=ks({type:n,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&Cg("max",r._enabled?r.max:null);},inputs:{max:"max"},standalone:false,features:[nT([Lt]),yg]})}return n})(),qt={provide:y,useExisting:Ii(()=>$t),multi:true},$t=(()=>{class n extends he{min;inputName="min";normalizeInput=e=>ft(e);createValidator=e=>Ke(e);static \u0275fac=(()=>{let e;return function(r){return (e||(e=Gp(n)))(r||n)}})();static \u0275dir=ks({type:n,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&Cg("min",r._enabled?r.min:null);},inputs:{min:"min"},standalone:false,features:[nT([qt]),yg]})}return n})(),zt={provide:y,useExisting:Ii(()=>gt),multi:true};var gt=(()=>{class n extends he{required;inputName="required";normalizeInput=YT;createValidator=e=>Qe;enabled(e){return e}static \u0275fac=(()=>{let e;return function(r){return (e||(e=Gp(n)))(r||n)}})();static \u0275dir=ks({type:n,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(i,r){i&2&&Cg("required",r._enabled?"":null);},inputs:{required:"required"},standalone:false,features:[nT([zt]),yg]})}return n})();var Zt={provide:y,useExisting:Ii(()=>Xt),multi:true},Xt=(()=>{class n extends he{maxlength;inputName="maxlength";normalizeInput=e=>Ht(e);createValidator=e=>et$1(e);static \u0275fac=(()=>{let e;return function(r){return (e||(e=Gp(n)))(r||n)}})();static \u0275dir=ks({type:n,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&Cg("maxlength",r._enabled?r.maxlength:null);},inputs:{maxlength:"maxlength"},standalone:false,features:[nT([Zt]),yg]})}return n})();var Yt=new w(""),O=new w("",{factory:()=>Z$1}),Z$1="always";function fe(n,t){return [...t.path,n]}function oe(n,t,e=Z$1){Fe(n,t),t.valueAccessor.writeValue(n.value),(n.disabled||e==="always")&&t.valueAccessor.setDisabledState?.(n.disabled),Jt(n,t),en(n,t),Qt(n,t),Kt(n,t);}function ae(n,t,e=true){let i=()=>{};t?.valueAccessor?.registerOnChange(i),t?.valueAccessor?.registerOnTouched(i),ue(n,t),n&&(t._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}));}function le(n,t){n.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t);});}function Kt(n,t){if(t.valueAccessor.setDisabledState){let e=i=>{t.valueAccessor.setDisabledState(i);};n.registerOnDisabledChange(e),t._registerOnDestroy(()=>{n._unregisterOnDisabledChange(e);});}}function Fe(n,t){let e=lt(n);t.validator!==null?n.setValidators(Ue(e,t.validator)):typeof e=="function"&&n.setValidators([e]);let i=ut(n);t.asyncValidator!==null?n.setAsyncValidators(Ue(i,t.asyncValidator)):typeof i=="function"&&n.setAsyncValidators([i]);let r=()=>n.updateValueAndValidity();le(t._rawValidators,r),le(t._rawAsyncValidators,r);}function ue(n,t){let e=false;if(n!==null){if(t.validator!==null){let r=lt(n);if(Array.isArray(r)&&r.length>0){let s=r.filter(a=>a!==t.validator);s.length!==r.length&&(e=true,n.setValidators(s));}}if(t.asyncValidator!==null){let r=ut(n);if(Array.isArray(r)&&r.length>0){let s=r.filter(a=>a!==t.asyncValidator);s.length!==r.length&&(e=true,n.setAsyncValidators(s));}}}let i=()=>{};return le(t._rawValidators,i),le(t._rawAsyncValidators,i),e}function Jt(n,t){t.valueAccessor.registerOnChange(e=>{n._pendingValue=e,n._pendingChange=true,n._pendingDirty=true,n.updateOn==="change"&&pt(n,t);});}function Qt(n,t){t.valueAccessor.registerOnTouched(()=>{n._pendingTouched=true,n.updateOn==="blur"&&n._pendingChange&&pt(n,t),n.updateOn!=="submit"&&n.markAsTouched();});}function pt(n,t){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:false}),t.viewToModelUpdate(n._pendingValue),n._pendingChange=false;}function en(n,t){let e=(i,r)=>{t.valueAccessor.writeValue(i),r&&t.viewToModelUpdate(i);};n.registerOnChange(e),t._registerOnDestroy(()=>{n._unregisterOnChange(e);});}function mt(n,t){Fe(n,t);}function tn(n,t){return ue(n,t)}function we(n,t){if(!n.hasOwnProperty("model"))return false;let e=n.model;return e.isFirstChange()?true:!Object.is(t,e.currentValue)}function nn(n){return Object.getPrototypeOf(n.constructor)===S}function vt(n,t){n._syncPendingControls(),t.forEach(e=>{let i=e.control;i.updateOn==="submit"&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=false);});}function rn(n,t){if(!t)return null;let e,i,r;return t.forEach(s=>{s.constructor===Ye?e=s:nn(s)?i=s:r=s;}),r||i||e||null}function sn(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1);}var Ne={provide:Yt,useFactory:()=>{let n=g(_,{self:true});return {setParseErrors:t=>{n.setParseErrorSource(t);},set onReset(t){n.onReset=t;}}}},_=class extends ie{_parent=null;name=null;valueAccessor=null;isCustomControlBased=false;userOnReset;resetSubscription;set onReset(t){this.userOnReset=t,this.resetSubscription?.unsubscribe(),this.resetSubscription=void 0,this.control&&(this.resetSubscription=this.control.events.subscribe(e=>{e instanceof N&&this.control&&this.userOnReset?.(this.control.value);}),this.subscription?.add(this.resetSubscription));}isNativeFormElement=false;rawValueAccessors;_selectedValueAccessor=null;get selectedValueAccessor(){return this._selectedValueAccessor??=rn(this,this.rawValueAccessors)}parseErrorsValidator=null;renderer;injector;requiredValidatorViaDi;subscription;customControlBindings=null;constructor(t,e,i){super(),this.injector=t,this.renderer=e,this.rawValueAccessors=i,this.injector?.get(we$1)?.onDestroy(()=>{this.removeParseErrorsValidator(this.control),this.subscription?.unsubscribe();});}setupCustomControl(){this.subscription?.unsubscribe();let t=this.injector?.get(wl);if(!this.control||!t)return;let e=t.markForCheck.bind(t);this.subscription=new X$1,this.subscription.add(this.control.valueChanges.subscribe(e)),this.subscription.add(this.control.statusChanges.subscribe(e)),this.resetSubscription?.unsubscribe(),this.resetSubscription=void 0,this.userOnReset&&(this.resetSubscription=this.control.events.subscribe(i=>{i instanceof N&&this.control&&this.userOnReset?.(this.control.value);}),this.subscription.add(this.resetSubscription)),this.parseErrorsValidator&&this.control.addValidators(this.parseErrorsValidator);}ngControlCreate(t){!t.nativeElement.hasAttribute?.("ngNoCva")&&(this.rawValueAccessors&&this.rawValueAccessors.length>0||this.valueAccessor!==null)||!t.customControl||(this.isCustomControlBased=true,t.listenToCustomControlModel(r=>{this.control?.setValue(r,{emitModelToViewChange:false}),this.control?.markAsDirty(),this.viewToModelUpdate(r);}),t.listenToCustomControlOutput("touch",()=>{this.control?.markAsTouched();}),this.customControlBindings={},this.isNativeFormElement=Gt(t.nativeElement),this.requiredValidatorViaDi=this._rawValidators.find(r=>r instanceof gt));}ngControlUpdate(t,e){if(!this.isCustomControlBased)return;let i=this.control,r=this.customControlBindings;Object.is(r.value,i.value)||(r.value=i.value,t.setCustomControlModelInput(i.value)),this.bindControlProperty(t,r,"touched",i.touched),this.bindControlProperty(t,r,"dirty",i.dirty),this.bindControlProperty(t,r,"valid",i.valid),this.bindControlProperty(t,r,"invalid",i.invalid),this.bindControlProperty(t,r,"pending",i.pending),this.bindControlProperty(t,r,"disabled",i.disabled),this.shouldBindRequired&&this.bindControlProperty(t,r,"required",this.isRequired);let s=i.errors;if(r.errors!==s){r.errors=s;let a=this._convertErrors(s);t.setInputOnDirectives("errors",a);}}get isRequired(){return (this.requiredValidatorViaDi?._enabled||this.control?._hasRequired())??false}get shouldBindRequired(){return true}bindControlProperty(t,e,i,r){if(e[i]===r)return;e[i]=r;let s=t.setInputOnDirectives(i,r);this.isNativeFormElement&&!s&&(i==="disabled"||i==="required")&&this.renderer&&Ut(this.renderer,t.nativeElement,i,r);}_convertErrors(t){if(t===null)return [];let e=this.control;return Object.entries(t).map(([i,r])=>new Ce({context:r,kind:i,control:e}))}setParseErrorSource(t){if(t===void 0)return;let e=null,i=mT(()=>{let r=t();return r.length===0?null:r.reduce((s,a)=>(s[a.kind]=a,s),{})});this.parseErrorsValidator=(()=>e).bind(this),Hf(()=>{e=i(),this.control?.updateValueAndValidity({emitEvent:false});},{injector:this.injector});}removeParseErrorsValidator(t){this.parseErrorsValidator&&(t?.removeValidators(this.parseErrorsValidator),t?.updateValueAndValidity({emitEvent:false}));}},de=class{_cd;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}};var Zn=(()=>{class n extends de{constructor(e){super(e);}static \u0275fac=function(i){return new(i||n)(ge(_,2))};static \u0275dir=ks({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,r){i&2&&Hg("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending);},standalone:false,features:[yg]})}return n})(),Xn=(()=>{class n extends de{constructor(e){super(e);}static \u0275fac=function(i){return new(i||n)(ge(h,10))};static \u0275dir=ks({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["","formArray",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(i,r){i&2&&Hg("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)("ng-submitted",r.isSubmitted);},standalone:false,features:[yg]})}return n})(),z=class extends ${constructor(t,e,i){super(Me(e),Ee(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:true,emitEvent:!!this.asyncValidator});}controls;registerControl(t,e){let i=this._find(t);return i||(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,i={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange();}removeControl(t,e={}){let i=this._find(t);i&&i._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange();}setControl(t,e,i={}){let r=this._find(t);r&&r._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange();}contains(t){return this._find(t)?.enabled===true}setValue(t,e={}){An$1(()=>{ct(this,true,t),Object.keys(t).forEach(i=>{dt(this,true,i),this.controls[i].setValue(t[i],{onlySelf:true,emitEvent:e.emitEvent});}),this.updateValueAndValidity(e);});}patchValue(t,e={}){t!=null&&(Object.keys(t).forEach(i=>{let r=this._find(i);r&&r.patchValue(t[i],{onlySelf:true,emitEvent:e.emitEvent});}),this.updateValueAndValidity(e));}reset(t={},e={}){this._forEachChild((i,r)=>{i.reset(t?t[r]:null,z$1(P({},e),{onlySelf:true}));}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==false&&this._events.next(new N(this));}getRawValue(){return this._reduceChildren({},(t,e,i)=>(t[i]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(false,(e,i)=>i._syncPendingControls()?true:e);return t&&this.updateValueAndValidity({onlySelf:true}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{let i=this.controls[e];i&&t(i,e);});}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange);});}_updateValue(){this.value=this._reduceValue();}_anyControls(t){for(let[e,i]of Object.entries(this.controls))if(this.contains(e)&&t(i))return true;return false}_reduceValue(){let t={};return this._reduceChildren(t,(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(t,e){let i=t;return this._forEachChild((r,s)=>{i=e(i,r,s);}),i}_allControlsDisabled(){for(let t of Object.keys(this.controls))if(this.controls[t].enabled)return false;return Object.keys(this.controls).length>0||this.disabled}_find(t){return ht(this.controls,t)?this.controls[t]:null}};var Yn=z;var on={provide:h,useExisting:Ii(()=>an)},L=Promise.resolve(),an=(()=>{class n extends h{callSetDisabledState;get submitted(){return An$1(this.submittedReactive)}_submitted=mT(()=>this.submittedReactive());submittedReactive=Hi(false);_directives=new Set;form;ngSubmit=new yt$2;options;constructor(e,i,r){super(),this.callSetDisabledState=r,this.form=new z({},be(e),Ae(i));}ngAfterViewInit(){this._setUpdateStrategy();}get formDirective(){return this}get control(){return this.form}get path(){return []}get controls(){return this.form.controls}addControl(e){L.then(()=>{let i=this._findContainer(e.path);e.control=i.registerControl(e.name,e.control),e._setupWithForm(this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:false}),this._directives.add(e);});}getControl(e){return this.form.get(e.path)}removeControl(e){L.then(()=>{this._findContainer(e.path)?.removeControl(e.name),this._directives.delete(e);});}addFormGroup(e){L.then(()=>{let i=this._findContainer(e.path),r=new z({});mt(r,e),i.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:false});});}removeFormGroup(e){L.then(()=>{this._findContainer(e.path)?.removeControl?.(e.name);});}getFormGroup(e){return this.form.get(e.path)}updateModel(e,i){L.then(()=>{this.form.get(e.path).setValue(i);});}setValue(e){this.control.setValue(e);}onSubmit(e){return this.submittedReactive.set(true),vt(this.form,this._directives),this.ngSubmit.emit(e),this.form._events.next(new se(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm();}resetForm(e=void 0){this.form.reset(e),this.submittedReactive.set(false);}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn);}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}static \u0275fac=function(i){return new(i||n)(ge(y,10),ge(I,10),ge(O,8))};static \u0275dir=ks({type:n,selectors:[["form",3,"ngNoForm","",3,"formGroup","",3,"formArray",""],["ng-form"],["","ngForm",""]],hostBindings:function(i,r){i&1&&Ag("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()});},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:false,features:[nT([on]),yg]})}return n})();function We(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1);}function qe(n){return typeof n=="object"&&n!==null&&Object.keys(n).length===2&&"value"in n&&"disabled"in n}var _t=class extends ${defaultValue=null;_onChange=[];_pendingValue;_pendingChange=false;constructor(t=null,e,i){super(Me(e),Ee(i,e)),this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:true,emitEvent:!!this.asyncValidator}),ce(e)&&(e.nonNullable||e.initialValueIsDefault)&&(qe(t)?this.defaultValue=t.value:this.defaultValue=t);}setValue(t,e={}){An$1(()=>{this.value=this._pendingValue=t,this._onChange.length&&e.emitModelToViewChange!==false&&this._onChange.forEach(i=>i(this.value,e.emitViewToModelChange!==false)),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),e.overwriteDefaultValue&&(this.defaultValue=this.value),this._pendingChange=false,e?.emitEvent!==false&&this._events.next(new N(this));}_updateValue(){}_anyControls(t){return false}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t);}_unregisterOnChange(t){We(this._onChange,t);}registerOnDisabledChange(t){this._onDisabledChange.push(t);}_unregisterOnDisabledChange(t){We(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:true,emitModelToViewChange:false}),true):false}_applyFormState(t){qe(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:true,emitEvent:false}):this.enable({onlySelf:true,emitEvent:false})):this.value=this._pendingValue=t;}};var ln=n=>n instanceof _t,un=(()=>{class n extends h{_parent;ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this);}ngOnDestroy(){this.formDirective?.removeFormGroup(this);}get control(){return this.formDirective.getFormGroup(this)}get path(){return fe(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}static \u0275fac=(()=>{let e;return function(r){return (e||(e=Gp(n)))(r||n)}})();static \u0275dir=ks({type:n,standalone:false,features:[yg]})}return n})();var dn={provide:_,useExisting:Ii(()=>cn)},$e=Promise.resolve(),cn=(()=>{class n extends _{_changeDetectorRef;callSetDisabledState;control=new _t;static ngAcceptInputType_isDisabled;_registered=false;viewModel;name="";isDisabled;model;options;update=new yt$2;constructor(e,i,r,s,a,f,C,j){super(C,j,s),this._changeDetectorRef=a,this.callSetDisabledState=f,this._parent=e,this._setValidators(i),this._setAsyncValidators(r);}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)});}this._setUpControl();}"isDisabled"in e&&this._updateDisabled(e),we(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model);}ngOnDestroy(){this.formDirective?.removeControl(this);}\u0275ngControlCreate(e){super.ngControlCreate(e);}\u0275ngControlUpdate(e){super.ngControlUpdate(e,false);}get shouldBindRequired(){return false}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=true;}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn);}_isStandalone(){return !this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){this.isCustomControlBased?this.setupCustomControl():(this.valueAccessor??=this.selectedValueAccessor,oe(this.control,this,this.callSetDisabledState)),this.control.updateValueAndValidity({emitEvent:false});}_setupWithForm(e){this.isCustomControlBased?this.setupCustomControl():(this.valueAccessor??=this.selectedValueAccessor,oe(this.control,this,e));}_checkForErrors(){this._checkName();}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name;}_updateValue(e){$e.then(()=>{this.control.setValue(e,{emitViewToModelChange:false}),this._changeDetectorRef?.markForCheck();});}_updateDisabled(e){let i=e.isDisabled.currentValue,r=i!==0&&YT(i);$e.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck();});}_getPath(e){return this._parent?fe(e,this._parent):[e]}static \u0275fac=function(i){return new(i||n)(ge(h,9),ge(y,10),ge(I,10),ge(D,10),ge(wl,8),ge(O,8),ge(pe,8),ge(As,8))};static \u0275dir=ks({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:false,features:[nT([dn,Ne]),yg,wu,Lw(null)]})}return n})();var Jn=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275dir=ks({type:n,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:false})}return n})(),hn={provide:D,useExisting:Ii(()=>fn),multi:true},fn=(()=>{class n extends S{writeValue(e){let i=e??"";this.setProperty("value",i);}registerOnChange(e){this.onChange=i=>{e(i==""?null:parseFloat(i));};}static \u0275fac=(()=>{let e;return function(r){return (e||(e=Gp(n)))(r||n)}})();static \u0275dir=ks({type:n,selectors:[["input","type","number","formControlName","",3,"ngNoCva",""],["input","type","number","formControl","",3,"ngNoCva",""],["input","type","number","ngModel","",3,"ngNoCva",""]],hostBindings:function(i,r){i&1&&Ag("input",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()});},standalone:false,features:[nT([hn]),yg]})}return n})(),gn={provide:D,useExisting:Ii(()=>mn),multi:true};var pn=(()=>{class n{_accessors=[];add(e,i){this._accessors.push([e,i]);}remove(e){for(let i=this._accessors.length-1;i>=0;--i)if(this._accessors[i][1]===e){this._accessors.splice(i,1);return}}select(e){this._accessors.forEach(i=>{this._isSameGroup(i,e)&&i[1]!==e&&i[1].fireUncheck(e.value);});}_isSameGroup(e,i){return e[0].control?e[0]._parent===i._control._parent&&e[1].name===i.name:false}static \u0275fac=function(i){return new(i||n)};static \u0275prov=Ce$1({token:n,factory:n.\u0275fac})}return n})(),mn=(()=>{class n extends S{_registry;_injector;_state;_control;_fn;setDisabledStateFired=false;onChange=()=>{};name;formControlName;value;callSetDisabledState=g(O,{optional:true})??Z$1;constructor(e,i,r,s){super(e,i),this._registry=r,this._injector=s;}ngOnInit(){this._control=this._injector.get(_),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=true;}fireUncheck(e){this.writeValue(e);}_checkName(){this.name&&this.formControlName&&(this.name,this.formControlName),!this.name&&this.formControlName&&(this.name=this.formControlName);}static \u0275fac=function(i){return new(i||n)(ge(As),ge(Qt$1),ge(pn),ge(pe))};static \u0275dir=ks({type:n,selectors:[["input","type","radio","formControlName","",3,"ngNoCva",""],["input","type","radio","formControl","",3,"ngNoCva",""],["input","type","radio","ngModel","",3,"ngNoCva",""]],hostBindings:function(i,r){i&1&&Ag("change",function(){return r.onChange()})("blur",function(){return r.onTouched()});},inputs:{name:"name",formControlName:"formControlName",value:"value"},standalone:false,features:[nT([gn]),yg]})}return n})(),vn={provide:D,useExisting:Ii(()=>_n),multi:true},_n=(()=>{class n extends S{writeValue(e){this.setProperty("value",parseFloat(e));}registerOnChange(e){this.onChange=i=>{e(i==""?null:parseFloat(i));};}static \u0275fac=(()=>{let e;return function(r){return (e||(e=Gp(n)))(r||n)}})();static \u0275dir=ks({type:n,selectors:[["input","type","range","formControlName","",3,"ngNoCva",""],["input","type","range","formControl","",3,"ngNoCva",""],["input","type","range","ngModel","",3,"ngNoCva",""]],hostBindings:function(i,r){i&1&&Ag("change",function(a){return r.onChange(a.target.value)})("input",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()});},standalone:false,features:[nT([vn]),yg]})}return n})(),ze=class extends ${constructor(t,e,i){super(Me(e),Ee(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:true,emitEvent:!!this.asyncValidator});}controls;at(t){return this.controls[this._adjustIndex(t)]}push(t,e={}){Array.isArray(t)?t.forEach(i=>{this.controls.push(i),this._registerControl(i);}):(this.controls.push(t),this._registerControl(t)),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange();}insert(t,e,i={}){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent});}removeAt(t,e={}){let i=this._adjustIndex(t);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent});}setControl(t,e,i={}){let r=this._adjustIndex(t);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange();}get length(){return this.controls.length}setValue(t,e={}){An$1(()=>{ct(this,false,t),t.forEach((i,r)=>{dt(this,false,r),this.at(r).setValue(i,{onlySelf:true,emitEvent:e.emitEvent});}),this.updateValueAndValidity(e);});}patchValue(t,e={}){t!=null&&(t.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:true,emitEvent:e.emitEvent});}),this.updateValueAndValidity(e));}reset(t=[],e={}){this._forEachChild((i,r)=>{i.reset(t[r],z$1(P({},e),{onlySelf:true}));}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==false&&this._events.next(new N(this));}getRawValue(){return this.controls.map(t=>t.getRawValue())}clear(t={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:t.emitEvent}));}_adjustIndex(t){return t<0?t+this.length:t}_syncPendingControls(){let t=this.controls.reduce((e,i)=>i._syncPendingControls()?true:e,false);return t&&this.updateValueAndValidity({onlySelf:true}),t}_forEachChild(t){this.controls.forEach((e,i)=>{t(e,i);});}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value);}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t));}_allControlsDisabled(){for(let t of this.controls)if(t.enabled)return false;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange);}_find(t){return this.at(t)??null}};var yt$1=(()=>{class n extends h{callSetDisabledState;get submitted(){return An$1(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e);}_submitted=mT(()=>this._submittedReactive());_submittedReactive=Hi(false);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];constructor(e,i,r){super(),this.callSetDisabledState=r,this._setValidators(e),this._setAsyncValidators(i);}ngOnChanges(e){this.onChanges(e);}ngOnDestroy(){this.onDestroy();}onChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form);}onDestroy(){this.form&&(ue(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}));}get formDirective(){return this}get path(){return []}addControl(e){let i=this.form.get(e.path);return e._setupWithForm(i,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:false}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){ae(e.control||null,e,false),sn(this.directives,e);}addFormGroup(e){this._setUpFormContainer(e);}removeFormGroup(e){this._cleanUpFormContainer(e);}getFormGroup(e){return this.form.get(e.path)}getFormArray(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e);}removeFormArray(e){this._cleanUpFormContainer(e);}updateModel(e,i){this.form.get(e.path).setValue(i);}onReset(){this.resetForm();}resetForm(e=void 0,i={}){this.form.reset(e,i),this._submittedReactive.set(false);}onSubmit(e){return this.submitted=true,vt(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new se(this.control)),e?.target?.method==="dialog"}_updateDomValue(){this.directives.forEach(e=>{let i=e.control,r=this.form.get(e.path);i!==r&&(ae(i||null,e),ln(r)&&e._setupWithForm(r,this.callSetDisabledState));}),this.form._updateTreeValidity({emitEvent:false});}_setUpFormContainer(e){let i=this.form.get(e.path);mt(i,e),i.updateValueAndValidity({emitEvent:false});}_cleanUpFormContainer(e){let i=this.form?.get(e.path);i&&tn(i,e)&&i.updateValueAndValidity({emitEvent:false});}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm?._registerOnCollectionChange(()=>{});}_updateValidators(){Fe(this.form,this),this._oldForm&&ue(this._oldForm,this);}_checkFormPresent(){this.form;}static \u0275fac=function(i){return new(i||n)(ge(y,10),ge(I,10),ge(O,8))};static \u0275dir=ks({type:n,features:[yg,wu]})}return n})();var Se=new w(""),yn={provide:_,useExisting:Ii(()=>Cn)},Cn=(()=>{class n extends _{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(e){}model;update=new yt$2;static _ngModelWarningSentOnce=false;_ngModelWarningSent=false;constructor(e,i,r,s,a,f,C){super(C,f,r),this._ngModelWarningConfig=s,this.callSetDisabledState=a,this._setValidators(e),this._setAsyncValidators(i);}ngOnChanges(e){if(this._isControlChanged(e)){let i=e.form.previousValue;i&&(ae(i,this,false),this.removeParseErrorsValidator(i)),this.isCustomControlBased?this.setupCustomControl():(this.valueAccessor??=this.selectedValueAccessor,oe(this.form,this,this.callSetDisabledState)),this.form.updateValueAndValidity({emitEvent:false});}we(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model);}ngOnDestroy(){this.form&&ae(this.form,this,false);}get path(){return []}get control(){return this.form}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e);}_isControlChanged(e){return e.hasOwnProperty("form")}\u0275ngControlCreate(e){super.ngControlCreate(e);}\u0275ngControlUpdate(e){super.ngControlUpdate(e,true);}static \u0275fac=function(i){return new(i||n)(ge(y,10),ge(I,10),ge(D,10),ge(Se,8),ge(O,8),ge(As,8),ge(pe,8))};static \u0275dir=ks({type:n,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],standalone:false,features:[nT([yn,Ne]),yg,wu,Lw(null)]})}return n})(),Vn={provide:h,useExisting:Ii(()=>Ct)},Ct=(()=>{class n extends un{name=null;constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r);}_checkParentType(){Dt(this._parent);}static \u0275fac=function(i){return new(i||n)(ge(h,13),ge(y,10),ge(I,10))};static \u0275dir=ks({type:n,selectors:[["","formGroupName",""]],inputs:{name:[0,"formGroupName","name"]},standalone:false,features:[nT([Vn]),yg]})}return n})(),Dn={provide:h,useExisting:Ii(()=>Vt)},Vt=(()=>{class n extends h{_parent;name=null;constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r);}ngOnInit(){Dt(this._parent),this.formDirective.addFormArray(this);}ngOnDestroy(){this.formDirective?.removeFormArray(this);}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return fe(this.name==null?this.name:this.name.toString(),this._parent)}static \u0275fac=function(i){return new(i||n)(ge(h,13),ge(y,10),ge(I,10))};static \u0275dir=ks({type:n,selectors:[["","formArrayName",""]],inputs:{name:[0,"formArrayName","name"]},standalone:false,features:[nT([Dn]),yg]})}return n})();function Dt(n){return !(n instanceof Ct)&&!(n instanceof yt$1)&&!(n instanceof Vt)}var bn={provide:_,useExisting:Ii(()=>An)},An=(()=>{class n extends _{_ngModelWarningConfig;_added=false;viewModel;control;name=null;set isDisabled(e){}model;update=new yt$2;static _ngModelWarningSentOnce=false;_ngModelWarningSent=false;constructor(e,i,r,s,a,f,C){super(C,f,s),this._ngModelWarningConfig=a,this._parent=e,this._setValidators(i),this._setAsyncValidators(r);}_setupWithForm(e,i){this.control=e,this.isCustomControlBased?this.setupCustomControl():(this.valueAccessor??=this.selectedValueAccessor,oe(e,this,i));}ngOnChanges(e){this._added||this._setUpControl(),we(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model));}ngOnDestroy(){this.formDirective?.removeControl(this);}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e);}get path(){return fe(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_setUpControl(){this.control=this.formDirective.addControl(this),this._added=true;}\u0275ngControlCreate(e){super.ngControlCreate(e);}\u0275ngControlUpdate(e){this.isCustomControlBased&&(this._added||this._setUpControl(),super.ngControlUpdate(e,true));}static \u0275fac=function(i){return new(i||n)(ge(h,13),ge(y,10),ge(I,10),ge(D,10),ge(Se,8),ge(As,8),ge(pe,8))};static \u0275dir=ks({type:n,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:false,features:[nT([bn,Ne]),yg,wu,Lw(null)]})}return n})();var Mn={provide:h,useExisting:Ii(()=>En)},En=(()=>{class n extends yt$1{form=null;ngSubmit=new yt$2;get control(){return this.form}static \u0275fac=(()=>{let e;return function(r){return (e||(e=Gp(n)))(r||n)}})();static \u0275dir=ks({type:n,selectors:[["","formGroup",""]],hostBindings:function(i,r){i&1&&Ag("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()});},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:false,features:[nT([Mn]),yg]})}return n})(),Fn={provide:D,useExisting:Ii(()=>At),multi:true};function bt(n,t){return n==null?`${t}`:(t&&typeof t=="object"&&(t="Object"),`${n}: ${t}`.slice(0,50))}function wn(n){return n.split(":")[0]}var At=(()=>{class n extends S{value;_optionMap=new Map;_idCounter=0;set compareWith(e){this._compareWith=e;}_compareWith=Object.is;appRefInjector=g(yr).injector;destroyRef=g(we$1);cdr=g(wl);_queuedWrite=false;_writeValueAfterRender(){this._queuedWrite||this.appRefInjector.destroyed||(this._queuedWrite=true,ME({write:()=>{this.destroyRef.destroyed||(this._queuedWrite=false,this.writeValue(this.value));}},{injector:this.appRefInjector}));}writeValue(e){this.cdr.markForCheck(),this.value=e;let i=this._getOptionId(e),r=bt(i,e);this.setProperty("value",r);}registerOnChange(e){this.onChange=i=>{this.value=this._getOptionValue(i),e(this.value);};}_registerOption(){return (this._idCounter++).toString()}_getOptionId(e){for(let i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i),e))return i;return null}_getOptionValue(e){let i=wn(e);return this._optionMap.has(i)?this._optionMap.get(i):e}static \u0275fac=(()=>{let e;return function(r){return (e||(e=Gp(n)))(r||n)}})();static \u0275dir=ks({type:n,selectors:[["select","formControlName","",3,"multiple","",3,"ngNoCva",""],["select","formControl","",3,"multiple","",3,"ngNoCva",""],["select","ngModel","",3,"multiple","",3,"ngNoCva",""]],hostBindings:function(i,r){i&1&&Ag("change",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()});},inputs:{compareWith:"compareWith"},standalone:false,features:[nT([Fn]),yg]})}return n})(),Qn=(()=>{class n{_element;_renderer;_select;id;constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption());}set ngValue(e){this._select!=null&&(this._select._optionMap.set(this.id,e),this._setElementValue(bt(this.id,e)),this._select._writeValueAfterRender());}set value(e){this._setElementValue(e),this._select?._writeValueAfterRender();}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e);}ngOnDestroy(){this._select?._optionMap.delete(this.id),this._select?._writeValueAfterRender();}static \u0275fac=function(i){return new(i||n)(ge(Qt$1),ge(As),ge(At,9))};static \u0275dir=ks({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:false})}return n})(),Nn={provide:D,useExisting:Ii(()=>Mt),multi:true};function Ze(n,t){return n==null?`${t}`:(typeof t=="string"&&(t=`'${t}'`),t&&typeof t=="object"&&(t="Object"),`${n}: ${t}`.slice(0,50))}function Sn(n){return n.split(":")[0]}var Mt=(()=>{class n extends S{value;_optionMap=new Map;_idCounter=0;set compareWith(e){this._compareWith=e;}_compareWith=Object.is;writeValue(e){this.value=e;let i;if(Array.isArray(e)){let r=e.map(s=>this._getOptionId(s));i=(s,a)=>{s._setSelected(r.indexOf(a)>-1);};}else i=r=>{r._setSelected(false);};this._optionMap.forEach(i);}registerOnChange(e){this.onChange=i=>{let r=[],s=i.selectedOptions;if(s!==void 0){let a=s;for(let f=0;f<a.length;f++){let C=a[f],j=this._getOptionValue(C.value);r.push(j);}}else {let a=i.options;for(let f=0;f<a.length;f++){let C=a[f];if(C.selected){let j=this._getOptionValue(C.value);r.push(j);}}}this.value=r,e(r);};}_registerOption(e){let i=(this._idCounter++).toString();return this._optionMap.set(i,e),i}_getOptionId(e){for(let i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i)._value,e))return i;return null}_getOptionValue(e){let i=Sn(e);return this._optionMap.has(i)?this._optionMap.get(i)._value:e}static \u0275fac=(()=>{let e;return function(r){return (e||(e=Gp(n)))(r||n)}})();static \u0275dir=ks({type:n,selectors:[["select","multiple","","formControlName","",3,"ngNoCva",""],["select","multiple","","formControl","",3,"ngNoCva",""],["select","multiple","","ngModel","",3,"ngNoCva",""]],hostBindings:function(i,r){i&1&&Ag("change",function(a){return r.onChange(a.target)})("blur",function(){return r.onTouched()});},inputs:{compareWith:"compareWith"},standalone:false,features:[nT([Nn]),yg]})}return n})(),ei=(()=>{class n{_element;_renderer;_select;id;_value;constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption(this));}set ngValue(e){this._select!=null&&(this._value=e,this._setElementValue(Ze(this.id,e)),this._select.writeValue(this._select.value));}set value(e){this._select?(this._value=e,this._setElementValue(Ze(this.id,e)),this._select.writeValue(this._select.value)):this._setElementValue(e);}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e);}_setSelected(e){this._renderer.setProperty(this._element.nativeElement,"selected",e);}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value));}static \u0275fac=function(i){return new(i||n)(ge(Qt$1),ge(As),ge(Mt,9))};static \u0275dir=ks({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:false})}return n})();var Et=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=Do({type:n});static \u0275inj=Wn({})}return n})();var ti=(()=>{class n{static withConfig(e){return {ngModule:n,providers:[{provide:O,useValue:e.callSetDisabledState??Z$1}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=Do({type:n});static \u0275inj=Wn({imports:[Et]})}return n})(),ni=(()=>{class n{static withConfig(e){return {ngModule:n,providers:[{provide:Se,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:O,useValue:e.callSetDisabledState??Z$1}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=Do({type:n});static \u0275inj=Wn({imports:[Et]})}return n})();function V(i){return Error(`Unable to find icon with the name "${i}"`)}function X(){return Error("Could not find HttpClient for use with Angular Material icons. Please add provideHttpClient() to your providers.")}function q(i){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${i}".`)}function Y(i){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${i}".`)}var a=class{url;svgText;options;svgElement=null;constructor(l,t,e){this.url=l,this.svgText=t,this.options=e;}},K=(()=>{class i{_httpClient;_sanitizer;_errorHandler;_document;_svgIconConfigs=new Map;_iconSetConfigs=new Map;_cachedIconsByUrl=new Map;_inProgressUrlFetches=new Map;_fontCssClassesByAlias=new Map;_resolvers=[];_defaultFontSetClass=["material-icons","mat-ligature-font"];constructor(t,e,n,o){this._httpClient=t,this._sanitizer=e,this._errorHandler=o,this._document=n;}addSvgIcon(t,e,n){return this.addSvgIconInNamespace("",t,e,n)}addSvgIconLiteral(t,e,n){return this.addSvgIconLiteralInNamespace("",t,e,n)}addSvgIconInNamespace(t,e,n,o){return this._addSvgIconConfig(t,e,new a(n,null,o))}addSvgIconResolver(t){return this._resolvers.push(t),this}addSvgIconLiteralInNamespace(t,e,n,o){let r=this._sanitizer.sanitize(ke.HTML,n);if(!r)throw Y(n);let s=vn$1(r);return this._addSvgIconConfig(t,e,new a("",s,o))}addSvgIconSet(t,e){return this.addSvgIconSetInNamespace("",t,e)}addSvgIconSetLiteral(t,e){return this.addSvgIconSetLiteralInNamespace("",t,e)}addSvgIconSetInNamespace(t,e,n){return this._addSvgIconSetConfig(t,new a(e,null,n))}addSvgIconSetLiteralInNamespace(t,e,n){let o=this._sanitizer.sanitize(ke.HTML,e);if(!o)throw Y(e);let r=vn$1(o);return this._addSvgIconSetConfig(t,new a("",r,n))}registerFontClassAlias(t,e=t){return this._fontCssClassesByAlias.set(t,e),this}classNameForFontAlias(t){return this._fontCssClassesByAlias.get(t)||t}setDefaultFontSetClass(...t){return this._defaultFontSetClass=t,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(t){let e=this._sanitizer.sanitize(ke.RESOURCE_URL,t);if(!e)throw q(t);let n=this._cachedIconsByUrl.get(e);return n?pa(C(n)):this._loadSvgIconFromConfig(new a(t,null)).pipe(Od(o=>this._cachedIconsByUrl.set(e,o)),ue$1(o=>C(o)))}getNamedSvgIcon(t,e=""){let n=J(e,t),o=this._svgIconConfigs.get(n);if(o)return this._getSvgFromConfig(o);if(o=this._getIconConfigFromResolvers(e,t),o)return this._svgIconConfigs.set(n,o),this._getSvgFromConfig(o);let r=this._iconSetConfigs.get(e);return r?this._getSvgFromIconSetConfigs(t,r):Hy(V(n))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear();}_getSvgFromConfig(t){return t.svgText?pa(C(this._svgElementFromConfig(t))):this._loadSvgIconFromConfig(t).pipe(ue$1(e=>C(e)))}_getSvgFromIconSetConfigs(t,e){let n=this._extractIconWithNameFromAnySet(t,e);if(n)return pa(n);let o=e.filter(r=>!r.svgText).map(r=>this._loadSvgIconSetFromConfig(r).pipe(ha(s=>{let f=`Loading icon set URL: ${this._sanitizer.sanitize(ke.RESOURCE_URL,r.url)} failed: ${s.message}`;return this._errorHandler.handleError(new Error(f)),pa(null)})));return By(o).pipe(ue$1(()=>{let r=this._extractIconWithNameFromAnySet(t,e);if(!r)throw V(t);return r}))}_extractIconWithNameFromAnySet(t,e){for(let n=e.length-1;n>=0;n--){let o=e[n];if(o.svgText&&o.svgText.toString().indexOf(t)>-1){let r=this._svgElementFromConfig(o),s=this._extractSvgIconFromSet(r,t,o.options);if(s)return s}}return null}_loadSvgIconFromConfig(t){return this._fetchIcon(t).pipe(Od(e=>t.svgText=e),ue$1(()=>this._svgElementFromConfig(t)))}_loadSvgIconSetFromConfig(t){return t.svgText?pa(null):this._fetchIcon(t).pipe(Od(e=>t.svgText=e))}_extractSvgIconFromSet(t,e,n){let o=t.querySelector(`[id="${e}"]`);if(!o)return null;let r=o.cloneNode(true);if(r.removeAttribute("id"),r.nodeName.toLowerCase()==="svg")return this._setSvgAttributes(r,n);if(r.nodeName.toLowerCase()==="symbol")return this._setSvgAttributes(this._toSvgElement(r),n);let s=this._svgElementFromString(vn$1("<svg></svg>"));return s.appendChild(r),this._setSvgAttributes(s,n)}_svgElementFromString(t){let e=this._document.createElement("DIV");e.innerHTML=t;let n=e.querySelector("svg");if(!n)throw Error("<svg> tag not found");return n}_toSvgElement(t){let e=this._svgElementFromString(vn$1("<svg></svg>")),n=t.attributes;for(let o=0;o<n.length;o++){let{name:r,value:s}=n[o];r!=="id"&&e.setAttribute(r,s);}for(let o=0;o<t.childNodes.length;o++)t.childNodes[o].nodeType===this._document.ELEMENT_NODE&&e.appendChild(t.childNodes[o].cloneNode(true));return e}_setSvgAttributes(t,e){return t.setAttribute("fit",""),t.setAttribute("height","100%"),t.setAttribute("width","100%"),t.setAttribute("preserveAspectRatio","xMidYMid meet"),t.setAttribute("focusable","false"),e&&e.viewBox&&t.setAttribute("viewBox",e.viewBox),t}_fetchIcon(t){let{url:e,options:n}=t,o=n?.withCredentials??false;if(!this._httpClient)throw X();if(e==null)throw Error(`Cannot fetch icon from URL "${e}".`);let r=this._sanitizer.sanitize(ke.RESOURCE_URL,e);if(!r)throw q(e);let s=this._inProgressUrlFetches.get(r);if(s)return s;let h=this._httpClient.get(r,{responseType:"text",withCredentials:o}).pipe(ue$1(f=>vn$1(f)),Da(()=>this._inProgressUrlFetches.delete(r)),Ia());return this._inProgressUrlFetches.set(r,h),h}_addSvgIconConfig(t,e,n){return this._svgIconConfigs.set(J(t,e),n),this}_addSvgIconSetConfig(t,e){let n=this._iconSetConfigs.get(t);return n?n.push(e):this._iconSetConfigs.set(t,[e]),this}_svgElementFromConfig(t){if(!t.svgElement){let e=this._svgElementFromString(t.svgText);this._setSvgAttributes(e,t.options),t.svgElement=e;}return t.svgElement}_getIconConfigFromResolvers(t,e){for(let n=0;n<this._resolvers.length;n++){let o=this._resolvers[n](e,t);if(o)return Z(o)?new a(o.url,null,o.options):new a(o,null)}}static \u0275fac=function(e){return new(e||i)(C$1(dy,8),C$1(wS),C$1(U$1,8),C$1(Se$1))};static \u0275prov=x({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function C(i){return i.cloneNode(true)}function J(i,l){return i+":"+l}function Z(i){return !!(i.url&&i.options)}var tt=["*"],et=new w("MAT_ICON_DEFAULT_OPTIONS"),nt=new w("mat-icon-location",{providedIn:"root",factory:()=>{let i=g(U$1),l=i?i.location:null;return {getPathname:()=>l?l.pathname+l.search:""}}}),G=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],ot=G.map(i=>`[${i}]`).join(", "),rt=/^url\(['"]?#(.*?)['"]?\)$/,wt=(()=>{class i{_elementRef=g(Qt$1);_iconRegistry=g(K);_location=g(nt);_errorHandler=g(Se$1);_defaultColor;get color(){return this._color||this._defaultColor}set color(t){this._color=t;}_color;inline=false;get svgIcon(){return this._svgIcon}set svgIcon(t){t!==this._svgIcon&&(t?this._updateSvgIcon(t):this._svgIcon&&this._clearSvgElement(),this._svgIcon=t);}_svgIcon;get fontSet(){return this._fontSet}set fontSet(t){let e=this._cleanupFontValue(t);e!==this._fontSet&&(this._fontSet=e,this._updateFontIconClasses());}_fontSet;get fontIcon(){return this._fontIcon}set fontIcon(t){let e=this._cleanupFontValue(t);e!==this._fontIcon&&(this._fontIcon=e,this._updateFontIconClasses());}_fontIcon;_previousFontSetClass=[];_previousFontIconClass;_svgName=null;_svgNamespace=null;_previousPath;_elementsWithExternalReferences;_currentIconFetch=X$1.EMPTY;constructor(){let t=g(new am("aria-hidden"),{optional:true}),e=g(et,{optional:true});e&&(e.color&&(this.color=this._defaultColor=e.color),e.fontSet&&(this.fontSet=e.fontSet)),t||this._elementRef.nativeElement.setAttribute("aria-hidden","true");}_splitIconName(t){if(!t)return ["",""];let e=t.split(":");switch(e.length){case 1:return ["",e[0]];case 2:return e;default:throw Error(`Invalid icon name: "${t}"`)}}ngOnInit(){this._updateFontIconClasses();}ngAfterViewChecked(){let t=this._elementsWithExternalReferences;if(t&&t.size){let e=this._location.getPathname();e!==this._previousPath&&(this._previousPath=e,this._prependPathToReferences(e));}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();}_usingFontIcon(){return !this.svgIcon}_setSvgElement(t){this._clearSvgElement();let e=this._location.getPathname();this._previousPath=e,this._cacheChildrenWithExternalReferences(t),this._prependPathToReferences(e),this._elementRef.nativeElement.appendChild(t);}_clearSvgElement(){let t=this._elementRef.nativeElement,e=t.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();e--;){let n=t.childNodes[e];(n.nodeType!==1||n.nodeName.toLowerCase()==="svg")&&n.remove();}}_updateFontIconClasses(){if(!this._usingFontIcon())return;let t=this._elementRef.nativeElement,e=(this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/):this._iconRegistry.getDefaultFontSetClass()).filter(n=>n.length>0);this._previousFontSetClass.forEach(n=>t.classList.remove(n)),e.forEach(n=>t.classList.add(n)),this._previousFontSetClass=e,this.fontIcon!==this._previousFontIconClass&&!e.includes("mat-ligature-font")&&(this._previousFontIconClass&&t.classList.remove(this._previousFontIconClass),this.fontIcon&&t.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon);}_cleanupFontValue(t){return typeof t=="string"?t.trim().split(" ")[0]:t}_prependPathToReferences(t){let e=this._elementsWithExternalReferences;e&&e.forEach((n,o)=>{n.forEach(r=>{o.setAttribute(r.name,`url('${t}#${r.value}')`);});});}_cacheChildrenWithExternalReferences(t){let e=t.querySelectorAll(ot),n=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let o=0;o<e.length;o++)G.forEach(r=>{let s=e[o],h=s.getAttribute(r),f=h?h.match(rt):null;if(f){let p=n.get(s);p||(p=[],n.set(s,p)),p.push({name:r,value:f[1]});}});}_updateSvgIcon(t){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),t){let[e,n]=this._splitIconName(t);e&&(this._svgNamespace=e),n&&(this._svgName=n),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(n,e).pipe(sn$1(1)).subscribe(o=>this._setSvgElement(o),o=>{let r=`Error retrieving icon ${e}:${n}! ${o.message}`;this._errorHandler.handleError(new Error(r));});}}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=Aw({type:i,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:10,hostBindings:function(e,n){e&2&&(Cg("data-mat-icon-type",n._usingFontIcon()?"font":"svg")("data-mat-icon-name",n._svgName||n.fontIcon)("data-mat-icon-namespace",n._svgNamespace||n.fontSet)("fontIcon",n._usingFontIcon()?n.fontIcon:null),FC(n.color?"mat-"+n.color:""),Hg("mat-icon-inline",n.inline)("mat-icon-no-color",n.color!=="primary"&&n.color!=="accent"&&n.color!=="warn"));},inputs:{color:"color",inline:[2,"inline","inline",YT],svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],ngContentSelectors:tt,decls:1,vars:0,template:function(e,n){e&1&&(vC(),DC(0));},styles:[`mat-icon, mat-icon.mat-primary, mat-icon.mat-accent, mat-icon.mat-warn {
|
|
1
|
+
import {cM as An$1,z as z$1,a as P,aV as w,aK as Do,aL as Wn,aY as ks,dl as ge,aQ as As,az as Qt$1,cS as Gp,al as yt$2,bK as pe,g,cW as yr,w as we$1,br as wl,c1 as ME,H as Hi,m as mT,an as ce$1,Q as By,u as ue$1,dm as _t$1,bE as X$1,cc as Hf,cC as Ce$1,dn as vo,dp as Ke$1,aZ as YT,bB as Ii,cU as yg,b4 as nT,l as Ag,aC as wu,C as Cg,y as Hg,dq as Lw,dr as m,ds as Se$1,bx as am,aA as sn$1,A as Aw,bz as vC,bA as DC,b_ as FC,dt as ke,du as vn$1,S as pa,bT as Od,bg as Hy,a7 as ha,dv as Da,dw as Ia,dx as C$1,J as dy,aU as U$1,Y as x,aN as wt$2,aH as wS}from'./main-ZCJEGFW3.js';var Xe=(()=>{class n{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,i){this._renderer=e,this._elementRef=i;}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i);}registerOnTouched(e){this.onTouched=e;}registerOnChange(e){this.onChange=e;}setDisabledState(e){this.setProperty("disabled",e);}static \u0275fac=function(i){return new(i||n)(ge(As),ge(Qt$1))};static \u0275dir=ks({type:n})}return n})(),S=(()=>{class n extends Xe{static \u0275fac=(()=>{let e;return function(r){return (e||(e=Gp(n)))(r||n)}})();static \u0275dir=ks({type:n,features:[yg]})}return n})(),D=new w(""),Ft={provide:D,useExisting:Ii(()=>wt$1),multi:true},wt$1=(()=>{class n extends S{writeValue(e){this.setProperty("checked",e);}static \u0275fac=(()=>{let e;return function(r){return (e||(e=Gp(n)))(r||n)}})();static \u0275dir=ks({type:n,selectors:[["input","type","checkbox","formControlName","",3,"ngNoCva",""],["input","type","checkbox","formControl","",3,"ngNoCva",""],["input","type","checkbox","ngModel","",3,"ngNoCva",""]],hostBindings:function(i,r){i&1&&Ag("change",function(a){return r.onChange(a.target.checked)})("blur",function(){return r.onTouched()});},standalone:false,features:[nT([Ft]),yg]})}return n})(),Nt={provide:D,useExisting:Ii(()=>Ye),multi:true};function St(){let n=_t$1()?_t$1().getUserAgent():"";return /android (\d+)/.test(n.toLowerCase())}var It=new w(""),Ye=(()=>{class n extends Xe{_compositionMode;_composing=false;constructor(e,i,r){super(e,i),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!St());}writeValue(e){let i=e??"";this.setProperty("value",i);}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e);}_compositionStart(){this._composing=true;}_compositionEnd(e){this._composing=false,this._compositionMode&&this.onChange(e);}static \u0275fac=function(i){return new(i||n)(ge(As),ge(Qt$1),ge(It,8))};static \u0275dir=ks({type:n,selectors:[["input","formControlName","",3,"type","checkbox",3,"ngNoCva",""],["textarea","formControlName","",3,"ngNoCva",""],["input","formControl","",3,"type","checkbox",3,"ngNoCva",""],["textarea","formControl","",3,"ngNoCva",""],["input","ngModel","",3,"type","checkbox",3,"ngNoCva",""],["textarea","ngModel","",3,"ngNoCva",""],["","ngDefaultControl",""]],hostBindings:function(i,r){i&1&&Ag("input",function(a){return r._handleInput(a.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(a){return r._compositionEnd(a.target.value)});},standalone:false,features:[nT([Nt]),yg]})}return n})();function Ve(n){return n==null||De(n)===0}function De(n){return n==null?null:Array.isArray(n)||typeof n=="string"?n.length:n instanceof Set?n.size:null}var y=new w(""),I=new w(""),Ot=/^(?=.{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])?)*$/,_e=class{static min(t){return Ke(t)}static max(t){return Je(t)}static required(t){return Qe(t)}static requiredTrue(t){return xt(t)}static email(t){return Rt(t)}static minLength(t){return Pt(t)}static maxLength(t){return et$1(t)}static pattern(t){return kt(t)}static nullValidator(t){return te()}static compose(t){return ot$1(t)}static composeAsync(t){return at(t)}};function Ke(n){return t=>{if(t.value==null||n==null)return null;let e=parseFloat(t.value);return !isNaN(e)&&e<n?{min:{min:n,actual:t.value}}:null}}function Je(n){return t=>{if(t.value==null||n==null)return null;let e=parseFloat(t.value);return !isNaN(e)&&e>n?{max:{max:n,actual:t.value}}:null}}function Qe(n){return Ve(n.value)?{required:true}:null}function xt(n){return n.value===true?null:{required:true}}function Rt(n){return Ve(n.value)||Ot.test(n.value)?null:{email:true}}function Pt(n){return t=>{let e=t.value?.length??De(t.value);return e===null||e===0?null:e<n?{minlength:{requiredLength:n,actualLength:e}}:null}}function et$1(n){return t=>{let e=t.value?.length??De(t.value);return e!==null&&e>n?{maxlength:{requiredLength:n,actualLength:e}}:null}}function kt(n){if(!n)return te;let t,e;return typeof n=="string"?(e="",n.charAt(0)!=="^"&&(e+="^"),e+=n,n.charAt(n.length-1)!=="$"&&(e+="$"),t=new RegExp(e)):(e=n.toString(),t=n),i=>{if(Ve(i.value))return null;let r=i.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}function te(n){return null}function tt$1(n){return n!=null}function nt$1(n){return vo(n)?Ke$1(n):n}function it(n){let t={};return n.forEach(e=>{t=e!=null?P(P({},t),e):t;}),Object.keys(t).length===0?null:t}function rt$1(n,t){return t.map(e=>e(n))}function Tt(n){return !n.validate}function st(n){return n.map(t=>Tt(t)?t:e=>t.validate(e))}function ot$1(n){if(!n)return null;let t=n.filter(tt$1);return t.length==0?null:function(e){return it(rt$1(e,t))}}function be(n){return n!=null?ot$1(st(n)):null}function at(n){if(!n)return null;let t=n.filter(tt$1);return t.length==0?null:function(e){let i=rt$1(e,t).map(nt$1);return By(i).pipe(ue$1(it))}}function Ae(n){return n!=null?at(st(n)):null}function Ue(n,t){return n===null?[t]:Array.isArray(n)?[...n,t]:[n,t]}function lt(n){return n._rawValidators}function ut(n){return n._rawAsyncValidators}function ye(n){return n?Array.isArray(n)?n:[n]:[]}function ne(n,t){return Array.isArray(n)?n.includes(t):n===t}function He(n,t){let e=ye(t);return ye(n).forEach(r=>{ne(e,r)||e.push(r);}),e}function Le(n,t){return ye(t).filter(e=>!ne(n,e))}var ie=class{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}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=be(this._rawValidators);}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=Ae(this._rawAsyncValidators);}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(t){this._onDestroyCallbacks.push(t);}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[];}reset(t=void 0){this.control?.reset(t);}hasError(t,e){return this.control?this.control.hasError(t,e):false}getError(t,e){return this.control?this.control.getError(t,e):null}},h=class extends ie{name;get formDirective(){return null}get path(){return null}};var U="VALID",ee="INVALID",k="PENDING",H="DISABLED",E=class{},re=class extends E{value;source;constructor(t,e){super(),this.value=t,this.source=e;}},W=class extends E{pristine;source;constructor(t,e){super(),this.pristine=t,this.source=e;}},q$1=class q extends E{touched;source;constructor(t,e){super(),this.touched=t,this.source=e;}},T=class extends E{status;source;constructor(t,e){super(),this.status=t,this.source=e;}},se=class extends E{source;constructor(t){super(),this.source=t;}},N=class extends E{source;constructor(t){super(),this.source=t;}};function Me(n){return (ce(n)?n.validators:n)||null}function jt(n){return Array.isArray(n)?be(n):n||null}function Ee(n,t){return (ce(t)?t.asyncValidators:n)||null}function Bt(n){return Array.isArray(n)?Ae(n):n||null}function ce(n){return n!=null&&!Array.isArray(n)&&typeof n=="object"}function dt(n,t,e){let i=n.controls;if(!(t?Object.keys(i):i).length)throw new m(1e3,"");if(!ht(i,e))throw new m(1001,"")}function ct(n,t,e){n._forEachChild((i,r)=>{if(e[r]===void 0)throw new m(-1002,"")});}var $=class{_pendingDirty=false;_hasOwnPendingAsyncValidator=null;_pendingTouched=false;_onCollectionChange=()=>{};_updateOn;_hasRequired=Hi(false);_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(t,e){this._assignValidators(t),this._assignAsyncValidators(e);}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t,this._updateHasRequiredValidator();}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t;}get parent(){return this._parent}get status(){return An$1(this.statusReactive)}set status(t){An$1(()=>this.statusReactive.set(t));}_status=mT(()=>this.statusReactive());statusReactive=Hi(void 0);get valid(){return this.status===U}get invalid(){return this.status===ee}get pending(){return this.status===k}get disabled(){return this.status===H}get enabled(){return this.status!==H}errors;get pristine(){return An$1(this.pristineReactive)}set pristine(t){An$1(()=>this.pristineReactive.set(t));}_pristine=mT(()=>this.pristineReactive());pristineReactive=Hi(true);get dirty(){return !this.pristine}get touched(){return An$1(this.touchedReactive)}set touched(t){An$1(()=>this.touchedReactive.set(t));}_touched=mT(()=>this.touchedReactive());touchedReactive=Hi(false);get untouched(){return !this.touched}_events=new ce$1;events=this._events.asObservable();valueChanges;statusChanges;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(He(t,this._rawValidators));}addAsyncValidators(t){this.setAsyncValidators(He(t,this._rawAsyncValidators));}removeValidators(t){this.setValidators(Le(t,this._rawValidators));}removeAsyncValidators(t){this.setAsyncValidators(Le(t,this._rawAsyncValidators));}hasValidator(t){return ne(this._rawValidators,t)}hasAsyncValidator(t){return ne(this._rawAsyncValidators,t)}clearValidators(){this.validator=null;}clearAsyncValidators(){this.asyncValidator=null;}markAsTouched(t={}){let e=this.touched===false;this.touched=true;let i=t.sourceControl??this;t.onlySelf||this._parent?.markAsTouched(z$1(P({},t),{sourceControl:i})),e&&t.emitEvent!==false&&this._events.next(new q$1(true,i));}markAllAsDirty(t={}){this.markAsDirty({onlySelf:true,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsDirty(t));}markAllAsTouched(t={}){this.markAsTouched({onlySelf:true,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(t));}markAsUntouched(t={}){let e=this.touched===true;this.touched=false,this._pendingTouched=false;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:true,emitEvent:t.emitEvent,sourceControl:i});}),t.onlySelf||this._parent?._updateTouched(t,i),e&&t.emitEvent!==false&&this._events.next(new q$1(false,i));}markAsDirty(t={}){let e=this.pristine===true;this.pristine=false;let i=t.sourceControl??this;t.onlySelf||this._parent?.markAsDirty(z$1(P({},t),{sourceControl:i})),e&&t.emitEvent!==false&&this._events.next(new W(false,i));}markAsPristine(t={}){let e=this.pristine===false;this.pristine=true,this._pendingDirty=false;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:true,emitEvent:t.emitEvent});}),t.onlySelf||this._parent?._updatePristine(t,i),e&&t.emitEvent!==false&&this._events.next(new W(true,i));}markAsPending(t={}){this.status=k;let e=t.sourceControl??this;t.emitEvent!==false&&(this._events.next(new T(this.status,e)),this.statusChanges.emit(this.status)),t.onlySelf||this._parent?.markAsPending(z$1(P({},t),{sourceControl:e}));}disable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=H,this.errors=null,this._forEachChild(r=>{r.disable(z$1(P({},t),{onlySelf:true}));}),this._updateValue();let i=t.sourceControl??this;t.emitEvent!==false&&(this._events.next(new re(this.value,i)),this._events.next(new T(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(z$1(P({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(r=>r(true));}enable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=U,this._forEachChild(i=>{i.enable(z$1(P({},t),{onlySelf:true}));}),this.updateValueAndValidity({onlySelf:true,emitEvent:t.emitEvent}),this._updateAncestors(z$1(P({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(i=>i(false));}_updateAncestors(t,e){t.onlySelf||(this._parent?.updateValueAndValidity(t),t.skipPristineCheck||this._parent?._updatePristine({},e),this._parent?._updateTouched({},e));}setParent(t){this._parent=t;}getRawValue(){return this.value}updateValueAndValidity(t={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let i=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===U||this.status===k)&&this._runAsyncValidator(i,t.emitEvent);}let e=t.sourceControl??this;t.emitEvent!==false&&(this._events.next(new re(this.value,e)),this._events.next(new T(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),t.onlySelf||this._parent?.updateValueAndValidity(z$1(P({},t),{sourceControl:e}));}_updateTreeValidity(t={emitEvent:true}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:true,emitEvent:t.emitEvent});}_setInitialStatus(){this.status=this._allControlsDisabled()?H:U;}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t,e){if(this.asyncValidator){this.status=k,this._hasOwnPendingAsyncValidator={emitEvent:e!==false,shouldHaveEmitted:t!==false};let i=nt$1(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:e,shouldHaveEmitted:t});});}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let t=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??false;return this._hasOwnPendingAsyncValidator=null,t}return false}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(e.emitEvent!==false,this,e.shouldHaveEmitted);}get(t){let e=t;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((i,r)=>i&&i._find(r),this)}getError(t,e){let i=e?this.get(e):this;return i?.errors?i.errors[t]:null}hasError(t,e){return !!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t,e,i){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),(t||i)&&this._events.next(new T(this.status,e)),this._parent&&this._parent._updateControlsErrors(t,e,i);}_initObservables(){this.valueChanges=new yt$2,this.statusChanges=new yt$2;}_calculateStatus(){return this._allControlsDisabled()?H:this.errors?ee:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(k)?k:this._anyControlsHaveStatus(ee)?ee:U}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t,e){let i=!this._anyControlsDirty(),r=this.pristine!==i;this.pristine=i,t.onlySelf||this._parent?._updatePristine(t,e),r&&this._events.next(new W(this.pristine,e));}_updateTouched(t={},e){this.touched=this._anyControlsTouched(),this._events.next(new q$1(this.touched,e)),t.onlySelf||this._parent?._updateTouched(t,e);}_onDisabledChange=[];_registerOnCollectionChange(t){this._onCollectionChange=t;}_setUpdateStrategy(t){ce(t)&&t.updateOn!=null&&(this._updateOn=t.updateOn);}_parentMarkedDirty(t){return !t&&!!this._parent?.dirty&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=jt(this._rawValidators),this._updateHasRequiredValidator();}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=Bt(this._rawAsyncValidators);}_updateHasRequiredValidator(){An$1(()=>this._hasRequired.set(this.hasValidator(_e.required)));}};function ht(n,t){return Object.hasOwn(n,t)}function Gt(n){return n.tagName==="INPUT"||n.tagName==="SELECT"||n.tagName==="TEXTAREA"}function Ut(n,t,e,i){switch(e){case "name":n.setAttribute(t,e,i);break;case "disabled":case "readonly":case "required":i?n.setAttribute(t,e,""):n.removeAttribute(t,e);break;case "max":case "min":case "minLength":case "maxLength":i!==void 0?n.setAttribute(t,e,i.toString()):n.removeAttribute(t,e);break}}var Ce=class{kind;context;control;message;constructor({kind:t,context:e,control:i}){this.kind=t,this.context=e,this.control=i;}};function Ht(n){return typeof n=="number"?n:parseInt(n,10)}function ft(n){return typeof n=="number"?n:parseFloat(n)}var he=(()=>{class n{_validator=te;_onChange;_enabled;ngOnChanges(e){if(this.inputName in e){let i=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):te,this._onChange?.();}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e;}enabled(e){return e!=null}static \u0275fac=function(i){return new(i||n)};static \u0275dir=ks({type:n,features:[wu]})}return n})(),Lt={provide:y,useExisting:Ii(()=>Wt),multi:true},Wt=(()=>{class n extends he{max;inputName="max";normalizeInput=e=>ft(e);createValidator=e=>Je(e);static \u0275fac=(()=>{let e;return function(r){return (e||(e=Gp(n)))(r||n)}})();static \u0275dir=ks({type:n,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&Cg("max",r._enabled?r.max:null);},inputs:{max:"max"},standalone:false,features:[nT([Lt]),yg]})}return n})(),qt={provide:y,useExisting:Ii(()=>$t),multi:true},$t=(()=>{class n extends he{min;inputName="min";normalizeInput=e=>ft(e);createValidator=e=>Ke(e);static \u0275fac=(()=>{let e;return function(r){return (e||(e=Gp(n)))(r||n)}})();static \u0275dir=ks({type:n,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&Cg("min",r._enabled?r.min:null);},inputs:{min:"min"},standalone:false,features:[nT([qt]),yg]})}return n})(),zt={provide:y,useExisting:Ii(()=>gt),multi:true};var gt=(()=>{class n extends he{required;inputName="required";normalizeInput=YT;createValidator=e=>Qe;enabled(e){return e}static \u0275fac=(()=>{let e;return function(r){return (e||(e=Gp(n)))(r||n)}})();static \u0275dir=ks({type:n,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(i,r){i&2&&Cg("required",r._enabled?"":null);},inputs:{required:"required"},standalone:false,features:[nT([zt]),yg]})}return n})();var Zt={provide:y,useExisting:Ii(()=>Xt),multi:true},Xt=(()=>{class n extends he{maxlength;inputName="maxlength";normalizeInput=e=>Ht(e);createValidator=e=>et$1(e);static \u0275fac=(()=>{let e;return function(r){return (e||(e=Gp(n)))(r||n)}})();static \u0275dir=ks({type:n,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&Cg("maxlength",r._enabled?r.maxlength:null);},inputs:{maxlength:"maxlength"},standalone:false,features:[nT([Zt]),yg]})}return n})();var Yt=new w(""),O=new w("",{factory:()=>Z$1}),Z$1="always";function fe(n,t){return [...t.path,n]}function oe(n,t,e=Z$1){Fe(n,t),t.valueAccessor.writeValue(n.value),(n.disabled||e==="always")&&t.valueAccessor.setDisabledState?.(n.disabled),Jt(n,t),en(n,t),Qt(n,t),Kt(n,t);}function ae(n,t,e=true){let i=()=>{};t?.valueAccessor?.registerOnChange(i),t?.valueAccessor?.registerOnTouched(i),ue(n,t),n&&(t._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}));}function le(n,t){n.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t);});}function Kt(n,t){if(t.valueAccessor.setDisabledState){let e=i=>{t.valueAccessor.setDisabledState(i);};n.registerOnDisabledChange(e),t._registerOnDestroy(()=>{n._unregisterOnDisabledChange(e);});}}function Fe(n,t){let e=lt(n);t.validator!==null?n.setValidators(Ue(e,t.validator)):typeof e=="function"&&n.setValidators([e]);let i=ut(n);t.asyncValidator!==null?n.setAsyncValidators(Ue(i,t.asyncValidator)):typeof i=="function"&&n.setAsyncValidators([i]);let r=()=>n.updateValueAndValidity();le(t._rawValidators,r),le(t._rawAsyncValidators,r);}function ue(n,t){let e=false;if(n!==null){if(t.validator!==null){let r=lt(n);if(Array.isArray(r)&&r.length>0){let s=r.filter(a=>a!==t.validator);s.length!==r.length&&(e=true,n.setValidators(s));}}if(t.asyncValidator!==null){let r=ut(n);if(Array.isArray(r)&&r.length>0){let s=r.filter(a=>a!==t.asyncValidator);s.length!==r.length&&(e=true,n.setAsyncValidators(s));}}}let i=()=>{};return le(t._rawValidators,i),le(t._rawAsyncValidators,i),e}function Jt(n,t){t.valueAccessor.registerOnChange(e=>{n._pendingValue=e,n._pendingChange=true,n._pendingDirty=true,n.updateOn==="change"&&pt(n,t);});}function Qt(n,t){t.valueAccessor.registerOnTouched(()=>{n._pendingTouched=true,n.updateOn==="blur"&&n._pendingChange&&pt(n,t),n.updateOn!=="submit"&&n.markAsTouched();});}function pt(n,t){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:false}),t.viewToModelUpdate(n._pendingValue),n._pendingChange=false;}function en(n,t){let e=(i,r)=>{t.valueAccessor.writeValue(i),r&&t.viewToModelUpdate(i);};n.registerOnChange(e),t._registerOnDestroy(()=>{n._unregisterOnChange(e);});}function mt(n,t){Fe(n,t);}function tn(n,t){return ue(n,t)}function we(n,t){if(!n.hasOwnProperty("model"))return false;let e=n.model;return e.isFirstChange()?true:!Object.is(t,e.currentValue)}function nn(n){return Object.getPrototypeOf(n.constructor)===S}function vt(n,t){n._syncPendingControls(),t.forEach(e=>{let i=e.control;i.updateOn==="submit"&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=false);});}function rn(n,t){if(!t)return null;let e,i,r;return t.forEach(s=>{s.constructor===Ye?e=s:nn(s)?i=s:r=s;}),r||i||e||null}function sn(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1);}var Ne={provide:Yt,useFactory:()=>{let n=g(_,{self:true});return {setParseErrors:t=>{n.setParseErrorSource(t);},set onReset(t){n.onReset=t;}}}},_=class extends ie{_parent=null;name=null;valueAccessor=null;isCustomControlBased=false;userOnReset;resetSubscription;set onReset(t){this.userOnReset=t,this.resetSubscription?.unsubscribe(),this.resetSubscription=void 0,this.control&&(this.resetSubscription=this.control.events.subscribe(e=>{e instanceof N&&this.control&&this.userOnReset?.(this.control.value);}),this.subscription?.add(this.resetSubscription));}isNativeFormElement=false;rawValueAccessors;_selectedValueAccessor=null;get selectedValueAccessor(){return this._selectedValueAccessor??=rn(this,this.rawValueAccessors)}parseErrorsValidator=null;renderer;injector;requiredValidatorViaDi;subscription;customControlBindings=null;constructor(t,e,i){super(),this.injector=t,this.renderer=e,this.rawValueAccessors=i,this.injector?.get(we$1)?.onDestroy(()=>{this.removeParseErrorsValidator(this.control),this.subscription?.unsubscribe();});}setupCustomControl(){this.subscription?.unsubscribe();let t=this.injector?.get(wl);if(!this.control||!t)return;let e=t.markForCheck.bind(t);this.subscription=new X$1,this.subscription.add(this.control.valueChanges.subscribe(e)),this.subscription.add(this.control.statusChanges.subscribe(e)),this.resetSubscription?.unsubscribe(),this.resetSubscription=void 0,this.userOnReset&&(this.resetSubscription=this.control.events.subscribe(i=>{i instanceof N&&this.control&&this.userOnReset?.(this.control.value);}),this.subscription.add(this.resetSubscription)),this.parseErrorsValidator&&this.control.addValidators(this.parseErrorsValidator);}ngControlCreate(t){!t.nativeElement.hasAttribute?.("ngNoCva")&&(this.rawValueAccessors&&this.rawValueAccessors.length>0||this.valueAccessor!==null)||!t.customControl||(this.isCustomControlBased=true,t.listenToCustomControlModel(r=>{this.control?.setValue(r,{emitModelToViewChange:false}),this.control?.markAsDirty(),this.viewToModelUpdate(r);}),t.listenToCustomControlOutput("touch",()=>{this.control?.markAsTouched();}),this.customControlBindings={},this.isNativeFormElement=Gt(t.nativeElement),this.requiredValidatorViaDi=this._rawValidators.find(r=>r instanceof gt));}ngControlUpdate(t,e){if(!this.isCustomControlBased)return;let i=this.control,r=this.customControlBindings;Object.is(r.value,i.value)||(r.value=i.value,t.setCustomControlModelInput(i.value)),this.bindControlProperty(t,r,"touched",i.touched),this.bindControlProperty(t,r,"dirty",i.dirty),this.bindControlProperty(t,r,"valid",i.valid),this.bindControlProperty(t,r,"invalid",i.invalid),this.bindControlProperty(t,r,"pending",i.pending),this.bindControlProperty(t,r,"disabled",i.disabled),this.shouldBindRequired&&this.bindControlProperty(t,r,"required",this.isRequired);let s=i.errors;if(r.errors!==s){r.errors=s;let a=this._convertErrors(s);t.setInputOnDirectives("errors",a);}}get isRequired(){return (this.requiredValidatorViaDi?._enabled||this.control?._hasRequired())??false}get shouldBindRequired(){return true}bindControlProperty(t,e,i,r){if(e[i]===r)return;e[i]=r;let s=t.setInputOnDirectives(i,r);this.isNativeFormElement&&!s&&(i==="disabled"||i==="required")&&this.renderer&&Ut(this.renderer,t.nativeElement,i,r);}_convertErrors(t){if(t===null)return [];let e=this.control;return Object.entries(t).map(([i,r])=>new Ce({context:r,kind:i,control:e}))}setParseErrorSource(t){if(t===void 0)return;let e=null,i=mT(()=>{let r=t();return r.length===0?null:r.reduce((s,a)=>(s[a.kind]=a,s),{})});this.parseErrorsValidator=(()=>e).bind(this),Hf(()=>{e=i(),this.control?.updateValueAndValidity({emitEvent:false});},{injector:this.injector});}removeParseErrorsValidator(t){this.parseErrorsValidator&&(t?.removeValidators(this.parseErrorsValidator),t?.updateValueAndValidity({emitEvent:false}));}},de=class{_cd;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}};var Zn=(()=>{class n extends de{constructor(e){super(e);}static \u0275fac=function(i){return new(i||n)(ge(_,2))};static \u0275dir=ks({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,r){i&2&&Hg("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending);},standalone:false,features:[yg]})}return n})(),Xn=(()=>{class n extends de{constructor(e){super(e);}static \u0275fac=function(i){return new(i||n)(ge(h,10))};static \u0275dir=ks({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["","formArray",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(i,r){i&2&&Hg("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)("ng-submitted",r.isSubmitted);},standalone:false,features:[yg]})}return n})(),z=class extends ${constructor(t,e,i){super(Me(e),Ee(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:true,emitEvent:!!this.asyncValidator});}controls;registerControl(t,e){let i=this._find(t);return i||(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,i={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange();}removeControl(t,e={}){let i=this._find(t);i&&i._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange();}setControl(t,e,i={}){let r=this._find(t);r&&r._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange();}contains(t){return this._find(t)?.enabled===true}setValue(t,e={}){An$1(()=>{ct(this,true,t),Object.keys(t).forEach(i=>{dt(this,true,i),this.controls[i].setValue(t[i],{onlySelf:true,emitEvent:e.emitEvent});}),this.updateValueAndValidity(e);});}patchValue(t,e={}){t!=null&&(Object.keys(t).forEach(i=>{let r=this._find(i);r&&r.patchValue(t[i],{onlySelf:true,emitEvent:e.emitEvent});}),this.updateValueAndValidity(e));}reset(t={},e={}){this._forEachChild((i,r)=>{i.reset(t?t[r]:null,z$1(P({},e),{onlySelf:true}));}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==false&&this._events.next(new N(this));}getRawValue(){return this._reduceChildren({},(t,e,i)=>(t[i]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(false,(e,i)=>i._syncPendingControls()?true:e);return t&&this.updateValueAndValidity({onlySelf:true}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{let i=this.controls[e];i&&t(i,e);});}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange);});}_updateValue(){this.value=this._reduceValue();}_anyControls(t){for(let[e,i]of Object.entries(this.controls))if(this.contains(e)&&t(i))return true;return false}_reduceValue(){let t={};return this._reduceChildren(t,(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(t,e){let i=t;return this._forEachChild((r,s)=>{i=e(i,r,s);}),i}_allControlsDisabled(){for(let t of Object.keys(this.controls))if(this.controls[t].enabled)return false;return Object.keys(this.controls).length>0||this.disabled}_find(t){return ht(this.controls,t)?this.controls[t]:null}};var Yn=z;var on={provide:h,useExisting:Ii(()=>an)},L=Promise.resolve(),an=(()=>{class n extends h{callSetDisabledState;get submitted(){return An$1(this.submittedReactive)}_submitted=mT(()=>this.submittedReactive());submittedReactive=Hi(false);_directives=new Set;form;ngSubmit=new yt$2;options;constructor(e,i,r){super(),this.callSetDisabledState=r,this.form=new z({},be(e),Ae(i));}ngAfterViewInit(){this._setUpdateStrategy();}get formDirective(){return this}get control(){return this.form}get path(){return []}get controls(){return this.form.controls}addControl(e){L.then(()=>{let i=this._findContainer(e.path);e.control=i.registerControl(e.name,e.control),e._setupWithForm(this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:false}),this._directives.add(e);});}getControl(e){return this.form.get(e.path)}removeControl(e){L.then(()=>{this._findContainer(e.path)?.removeControl(e.name),this._directives.delete(e);});}addFormGroup(e){L.then(()=>{let i=this._findContainer(e.path),r=new z({});mt(r,e),i.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:false});});}removeFormGroup(e){L.then(()=>{this._findContainer(e.path)?.removeControl?.(e.name);});}getFormGroup(e){return this.form.get(e.path)}updateModel(e,i){L.then(()=>{this.form.get(e.path).setValue(i);});}setValue(e){this.control.setValue(e);}onSubmit(e){return this.submittedReactive.set(true),vt(this.form,this._directives),this.ngSubmit.emit(e),this.form._events.next(new se(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm();}resetForm(e=void 0){this.form.reset(e),this.submittedReactive.set(false);}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn);}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}static \u0275fac=function(i){return new(i||n)(ge(y,10),ge(I,10),ge(O,8))};static \u0275dir=ks({type:n,selectors:[["form",3,"ngNoForm","",3,"formGroup","",3,"formArray",""],["ng-form"],["","ngForm",""]],hostBindings:function(i,r){i&1&&Ag("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()});},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:false,features:[nT([on]),yg]})}return n})();function We(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1);}function qe(n){return typeof n=="object"&&n!==null&&Object.keys(n).length===2&&"value"in n&&"disabled"in n}var _t=class extends ${defaultValue=null;_onChange=[];_pendingValue;_pendingChange=false;constructor(t=null,e,i){super(Me(e),Ee(i,e)),this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:true,emitEvent:!!this.asyncValidator}),ce(e)&&(e.nonNullable||e.initialValueIsDefault)&&(qe(t)?this.defaultValue=t.value:this.defaultValue=t);}setValue(t,e={}){An$1(()=>{this.value=this._pendingValue=t,this._onChange.length&&e.emitModelToViewChange!==false&&this._onChange.forEach(i=>i(this.value,e.emitViewToModelChange!==false)),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),e.overwriteDefaultValue&&(this.defaultValue=this.value),this._pendingChange=false,e?.emitEvent!==false&&this._events.next(new N(this));}_updateValue(){}_anyControls(t){return false}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t);}_unregisterOnChange(t){We(this._onChange,t);}registerOnDisabledChange(t){this._onDisabledChange.push(t);}_unregisterOnDisabledChange(t){We(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:true,emitModelToViewChange:false}),true):false}_applyFormState(t){qe(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:true,emitEvent:false}):this.enable({onlySelf:true,emitEvent:false})):this.value=this._pendingValue=t;}};var ln=n=>n instanceof _t,un=(()=>{class n extends h{_parent;ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this);}ngOnDestroy(){this.formDirective?.removeFormGroup(this);}get control(){return this.formDirective.getFormGroup(this)}get path(){return fe(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}static \u0275fac=(()=>{let e;return function(r){return (e||(e=Gp(n)))(r||n)}})();static \u0275dir=ks({type:n,standalone:false,features:[yg]})}return n})();var dn={provide:_,useExisting:Ii(()=>cn)},$e=Promise.resolve(),cn=(()=>{class n extends _{_changeDetectorRef;callSetDisabledState;control=new _t;static ngAcceptInputType_isDisabled;_registered=false;viewModel;name="";isDisabled;model;options;update=new yt$2;constructor(e,i,r,s,a,f,C,j){super(C,j,s),this._changeDetectorRef=a,this.callSetDisabledState=f,this._parent=e,this._setValidators(i),this._setAsyncValidators(r);}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)});}this._setUpControl();}"isDisabled"in e&&this._updateDisabled(e),we(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model);}ngOnDestroy(){this.formDirective?.removeControl(this);}\u0275ngControlCreate(e){super.ngControlCreate(e);}\u0275ngControlUpdate(e){super.ngControlUpdate(e,false);}get shouldBindRequired(){return false}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=true;}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn);}_isStandalone(){return !this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){this.isCustomControlBased?this.setupCustomControl():(this.valueAccessor??=this.selectedValueAccessor,oe(this.control,this,this.callSetDisabledState)),this.control.updateValueAndValidity({emitEvent:false});}_setupWithForm(e){this.isCustomControlBased?this.setupCustomControl():(this.valueAccessor??=this.selectedValueAccessor,oe(this.control,this,e));}_checkForErrors(){this._checkName();}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name;}_updateValue(e){$e.then(()=>{this.control.setValue(e,{emitViewToModelChange:false}),this._changeDetectorRef?.markForCheck();});}_updateDisabled(e){let i=e.isDisabled.currentValue,r=i!==0&&YT(i);$e.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck();});}_getPath(e){return this._parent?fe(e,this._parent):[e]}static \u0275fac=function(i){return new(i||n)(ge(h,9),ge(y,10),ge(I,10),ge(D,10),ge(wl,8),ge(O,8),ge(pe,8),ge(As,8))};static \u0275dir=ks({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:false,features:[nT([dn,Ne]),yg,wu,Lw(null)]})}return n})();var Jn=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275dir=ks({type:n,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:false})}return n})(),hn={provide:D,useExisting:Ii(()=>fn),multi:true},fn=(()=>{class n extends S{writeValue(e){let i=e??"";this.setProperty("value",i);}registerOnChange(e){this.onChange=i=>{e(i==""?null:parseFloat(i));};}static \u0275fac=(()=>{let e;return function(r){return (e||(e=Gp(n)))(r||n)}})();static \u0275dir=ks({type:n,selectors:[["input","type","number","formControlName","",3,"ngNoCva",""],["input","type","number","formControl","",3,"ngNoCva",""],["input","type","number","ngModel","",3,"ngNoCva",""]],hostBindings:function(i,r){i&1&&Ag("input",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()});},standalone:false,features:[nT([hn]),yg]})}return n})(),gn={provide:D,useExisting:Ii(()=>mn),multi:true};var pn=(()=>{class n{_accessors=[];add(e,i){this._accessors.push([e,i]);}remove(e){for(let i=this._accessors.length-1;i>=0;--i)if(this._accessors[i][1]===e){this._accessors.splice(i,1);return}}select(e){this._accessors.forEach(i=>{this._isSameGroup(i,e)&&i[1]!==e&&i[1].fireUncheck(e.value);});}_isSameGroup(e,i){return e[0].control?e[0]._parent===i._control._parent&&e[1].name===i.name:false}static \u0275fac=function(i){return new(i||n)};static \u0275prov=Ce$1({token:n,factory:n.\u0275fac})}return n})(),mn=(()=>{class n extends S{_registry;_injector;_state;_control;_fn;setDisabledStateFired=false;onChange=()=>{};name;formControlName;value;callSetDisabledState=g(O,{optional:true})??Z$1;constructor(e,i,r,s){super(e,i),this._registry=r,this._injector=s;}ngOnInit(){this._control=this._injector.get(_),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=true;}fireUncheck(e){this.writeValue(e);}_checkName(){this.name&&this.formControlName&&(this.name,this.formControlName),!this.name&&this.formControlName&&(this.name=this.formControlName);}static \u0275fac=function(i){return new(i||n)(ge(As),ge(Qt$1),ge(pn),ge(pe))};static \u0275dir=ks({type:n,selectors:[["input","type","radio","formControlName","",3,"ngNoCva",""],["input","type","radio","formControl","",3,"ngNoCva",""],["input","type","radio","ngModel","",3,"ngNoCva",""]],hostBindings:function(i,r){i&1&&Ag("change",function(){return r.onChange()})("blur",function(){return r.onTouched()});},inputs:{name:"name",formControlName:"formControlName",value:"value"},standalone:false,features:[nT([gn]),yg]})}return n})(),vn={provide:D,useExisting:Ii(()=>_n),multi:true},_n=(()=>{class n extends S{writeValue(e){this.setProperty("value",parseFloat(e));}registerOnChange(e){this.onChange=i=>{e(i==""?null:parseFloat(i));};}static \u0275fac=(()=>{let e;return function(r){return (e||(e=Gp(n)))(r||n)}})();static \u0275dir=ks({type:n,selectors:[["input","type","range","formControlName","",3,"ngNoCva",""],["input","type","range","formControl","",3,"ngNoCva",""],["input","type","range","ngModel","",3,"ngNoCva",""]],hostBindings:function(i,r){i&1&&Ag("change",function(a){return r.onChange(a.target.value)})("input",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()});},standalone:false,features:[nT([vn]),yg]})}return n})(),ze=class extends ${constructor(t,e,i){super(Me(e),Ee(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:true,emitEvent:!!this.asyncValidator});}controls;at(t){return this.controls[this._adjustIndex(t)]}push(t,e={}){Array.isArray(t)?t.forEach(i=>{this.controls.push(i),this._registerControl(i);}):(this.controls.push(t),this._registerControl(t)),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange();}insert(t,e,i={}){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent});}removeAt(t,e={}){let i=this._adjustIndex(t);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent});}setControl(t,e,i={}){let r=this._adjustIndex(t);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange();}get length(){return this.controls.length}setValue(t,e={}){An$1(()=>{ct(this,false,t),t.forEach((i,r)=>{dt(this,false,r),this.at(r).setValue(i,{onlySelf:true,emitEvent:e.emitEvent});}),this.updateValueAndValidity(e);});}patchValue(t,e={}){t!=null&&(t.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:true,emitEvent:e.emitEvent});}),this.updateValueAndValidity(e));}reset(t=[],e={}){this._forEachChild((i,r)=>{i.reset(t[r],z$1(P({},e),{onlySelf:true}));}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==false&&this._events.next(new N(this));}getRawValue(){return this.controls.map(t=>t.getRawValue())}clear(t={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:t.emitEvent}));}_adjustIndex(t){return t<0?t+this.length:t}_syncPendingControls(){let t=this.controls.reduce((e,i)=>i._syncPendingControls()?true:e,false);return t&&this.updateValueAndValidity({onlySelf:true}),t}_forEachChild(t){this.controls.forEach((e,i)=>{t(e,i);});}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value);}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t));}_allControlsDisabled(){for(let t of this.controls)if(t.enabled)return false;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange);}_find(t){return this.at(t)??null}};var yt$1=(()=>{class n extends h{callSetDisabledState;get submitted(){return An$1(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e);}_submitted=mT(()=>this._submittedReactive());_submittedReactive=Hi(false);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];constructor(e,i,r){super(),this.callSetDisabledState=r,this._setValidators(e),this._setAsyncValidators(i);}ngOnChanges(e){this.onChanges(e);}ngOnDestroy(){this.onDestroy();}onChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form);}onDestroy(){this.form&&(ue(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}));}get formDirective(){return this}get path(){return []}addControl(e){let i=this.form.get(e.path);return e._setupWithForm(i,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:false}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){ae(e.control||null,e,false),sn(this.directives,e);}addFormGroup(e){this._setUpFormContainer(e);}removeFormGroup(e){this._cleanUpFormContainer(e);}getFormGroup(e){return this.form.get(e.path)}getFormArray(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e);}removeFormArray(e){this._cleanUpFormContainer(e);}updateModel(e,i){this.form.get(e.path).setValue(i);}onReset(){this.resetForm();}resetForm(e=void 0,i={}){this.form.reset(e,i),this._submittedReactive.set(false);}onSubmit(e){return this.submitted=true,vt(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new se(this.control)),e?.target?.method==="dialog"}_updateDomValue(){this.directives.forEach(e=>{let i=e.control,r=this.form.get(e.path);i!==r&&(ae(i||null,e),ln(r)&&e._setupWithForm(r,this.callSetDisabledState));}),this.form._updateTreeValidity({emitEvent:false});}_setUpFormContainer(e){let i=this.form.get(e.path);mt(i,e),i.updateValueAndValidity({emitEvent:false});}_cleanUpFormContainer(e){let i=this.form?.get(e.path);i&&tn(i,e)&&i.updateValueAndValidity({emitEvent:false});}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm?._registerOnCollectionChange(()=>{});}_updateValidators(){Fe(this.form,this),this._oldForm&&ue(this._oldForm,this);}_checkFormPresent(){this.form;}static \u0275fac=function(i){return new(i||n)(ge(y,10),ge(I,10),ge(O,8))};static \u0275dir=ks({type:n,features:[yg,wu]})}return n})();var Se=new w(""),yn={provide:_,useExisting:Ii(()=>Cn)},Cn=(()=>{class n extends _{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(e){}model;update=new yt$2;static _ngModelWarningSentOnce=false;_ngModelWarningSent=false;constructor(e,i,r,s,a,f,C){super(C,f,r),this._ngModelWarningConfig=s,this.callSetDisabledState=a,this._setValidators(e),this._setAsyncValidators(i);}ngOnChanges(e){if(this._isControlChanged(e)){let i=e.form.previousValue;i&&(ae(i,this,false),this.removeParseErrorsValidator(i)),this.isCustomControlBased?this.setupCustomControl():(this.valueAccessor??=this.selectedValueAccessor,oe(this.form,this,this.callSetDisabledState)),this.form.updateValueAndValidity({emitEvent:false});}we(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model);}ngOnDestroy(){this.form&&ae(this.form,this,false);}get path(){return []}get control(){return this.form}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e);}_isControlChanged(e){return e.hasOwnProperty("form")}\u0275ngControlCreate(e){super.ngControlCreate(e);}\u0275ngControlUpdate(e){super.ngControlUpdate(e,true);}static \u0275fac=function(i){return new(i||n)(ge(y,10),ge(I,10),ge(D,10),ge(Se,8),ge(O,8),ge(As,8),ge(pe,8))};static \u0275dir=ks({type:n,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],standalone:false,features:[nT([yn,Ne]),yg,wu,Lw(null)]})}return n})(),Vn={provide:h,useExisting:Ii(()=>Ct)},Ct=(()=>{class n extends un{name=null;constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r);}_checkParentType(){Dt(this._parent);}static \u0275fac=function(i){return new(i||n)(ge(h,13),ge(y,10),ge(I,10))};static \u0275dir=ks({type:n,selectors:[["","formGroupName",""]],inputs:{name:[0,"formGroupName","name"]},standalone:false,features:[nT([Vn]),yg]})}return n})(),Dn={provide:h,useExisting:Ii(()=>Vt)},Vt=(()=>{class n extends h{_parent;name=null;constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r);}ngOnInit(){Dt(this._parent),this.formDirective.addFormArray(this);}ngOnDestroy(){this.formDirective?.removeFormArray(this);}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return fe(this.name==null?this.name:this.name.toString(),this._parent)}static \u0275fac=function(i){return new(i||n)(ge(h,13),ge(y,10),ge(I,10))};static \u0275dir=ks({type:n,selectors:[["","formArrayName",""]],inputs:{name:[0,"formArrayName","name"]},standalone:false,features:[nT([Dn]),yg]})}return n})();function Dt(n){return !(n instanceof Ct)&&!(n instanceof yt$1)&&!(n instanceof Vt)}var bn={provide:_,useExisting:Ii(()=>An)},An=(()=>{class n extends _{_ngModelWarningConfig;_added=false;viewModel;control;name=null;set isDisabled(e){}model;update=new yt$2;static _ngModelWarningSentOnce=false;_ngModelWarningSent=false;constructor(e,i,r,s,a,f,C){super(C,f,s),this._ngModelWarningConfig=a,this._parent=e,this._setValidators(i),this._setAsyncValidators(r);}_setupWithForm(e,i){this.control=e,this.isCustomControlBased?this.setupCustomControl():(this.valueAccessor??=this.selectedValueAccessor,oe(e,this,i));}ngOnChanges(e){this._added||this._setUpControl(),we(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model));}ngOnDestroy(){this.formDirective?.removeControl(this);}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e);}get path(){return fe(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_setUpControl(){this.control=this.formDirective.addControl(this),this._added=true;}\u0275ngControlCreate(e){super.ngControlCreate(e);}\u0275ngControlUpdate(e){this.isCustomControlBased&&(this._added||this._setUpControl(),super.ngControlUpdate(e,true));}static \u0275fac=function(i){return new(i||n)(ge(h,13),ge(y,10),ge(I,10),ge(D,10),ge(Se,8),ge(As,8),ge(pe,8))};static \u0275dir=ks({type:n,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:false,features:[nT([bn,Ne]),yg,wu,Lw(null)]})}return n})();var Mn={provide:h,useExisting:Ii(()=>En)},En=(()=>{class n extends yt$1{form=null;ngSubmit=new yt$2;get control(){return this.form}static \u0275fac=(()=>{let e;return function(r){return (e||(e=Gp(n)))(r||n)}})();static \u0275dir=ks({type:n,selectors:[["","formGroup",""]],hostBindings:function(i,r){i&1&&Ag("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()});},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:false,features:[nT([Mn]),yg]})}return n})(),Fn={provide:D,useExisting:Ii(()=>At),multi:true};function bt(n,t){return n==null?`${t}`:(t&&typeof t=="object"&&(t="Object"),`${n}: ${t}`.slice(0,50))}function wn(n){return n.split(":")[0]}var At=(()=>{class n extends S{value;_optionMap=new Map;_idCounter=0;set compareWith(e){this._compareWith=e;}_compareWith=Object.is;appRefInjector=g(yr).injector;destroyRef=g(we$1);cdr=g(wl);_queuedWrite=false;_writeValueAfterRender(){this._queuedWrite||this.appRefInjector.destroyed||(this._queuedWrite=true,ME({write:()=>{this.destroyRef.destroyed||(this._queuedWrite=false,this.writeValue(this.value));}},{injector:this.appRefInjector}));}writeValue(e){this.cdr.markForCheck(),this.value=e;let i=this._getOptionId(e),r=bt(i,e);this.setProperty("value",r);}registerOnChange(e){this.onChange=i=>{this.value=this._getOptionValue(i),e(this.value);};}_registerOption(){return (this._idCounter++).toString()}_getOptionId(e){for(let i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i),e))return i;return null}_getOptionValue(e){let i=wn(e);return this._optionMap.has(i)?this._optionMap.get(i):e}static \u0275fac=(()=>{let e;return function(r){return (e||(e=Gp(n)))(r||n)}})();static \u0275dir=ks({type:n,selectors:[["select","formControlName","",3,"multiple","",3,"ngNoCva",""],["select","formControl","",3,"multiple","",3,"ngNoCva",""],["select","ngModel","",3,"multiple","",3,"ngNoCva",""]],hostBindings:function(i,r){i&1&&Ag("change",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()});},inputs:{compareWith:"compareWith"},standalone:false,features:[nT([Fn]),yg]})}return n})(),Qn=(()=>{class n{_element;_renderer;_select;id;constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption());}set ngValue(e){this._select!=null&&(this._select._optionMap.set(this.id,e),this._setElementValue(bt(this.id,e)),this._select._writeValueAfterRender());}set value(e){this._setElementValue(e),this._select?._writeValueAfterRender();}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e);}ngOnDestroy(){this._select?._optionMap.delete(this.id),this._select?._writeValueAfterRender();}static \u0275fac=function(i){return new(i||n)(ge(Qt$1),ge(As),ge(At,9))};static \u0275dir=ks({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:false})}return n})(),Nn={provide:D,useExisting:Ii(()=>Mt),multi:true};function Ze(n,t){return n==null?`${t}`:(typeof t=="string"&&(t=`'${t}'`),t&&typeof t=="object"&&(t="Object"),`${n}: ${t}`.slice(0,50))}function Sn(n){return n.split(":")[0]}var Mt=(()=>{class n extends S{value;_optionMap=new Map;_idCounter=0;set compareWith(e){this._compareWith=e;}_compareWith=Object.is;writeValue(e){this.value=e;let i;if(Array.isArray(e)){let r=e.map(s=>this._getOptionId(s));i=(s,a)=>{s._setSelected(r.indexOf(a)>-1);};}else i=r=>{r._setSelected(false);};this._optionMap.forEach(i);}registerOnChange(e){this.onChange=i=>{let r=[],s=i.selectedOptions;if(s!==void 0){let a=s;for(let f=0;f<a.length;f++){let C=a[f],j=this._getOptionValue(C.value);r.push(j);}}else {let a=i.options;for(let f=0;f<a.length;f++){let C=a[f];if(C.selected){let j=this._getOptionValue(C.value);r.push(j);}}}this.value=r,e(r);};}_registerOption(e){let i=(this._idCounter++).toString();return this._optionMap.set(i,e),i}_getOptionId(e){for(let i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i)._value,e))return i;return null}_getOptionValue(e){let i=Sn(e);return this._optionMap.has(i)?this._optionMap.get(i)._value:e}static \u0275fac=(()=>{let e;return function(r){return (e||(e=Gp(n)))(r||n)}})();static \u0275dir=ks({type:n,selectors:[["select","multiple","","formControlName","",3,"ngNoCva",""],["select","multiple","","formControl","",3,"ngNoCva",""],["select","multiple","","ngModel","",3,"ngNoCva",""]],hostBindings:function(i,r){i&1&&Ag("change",function(a){return r.onChange(a.target)})("blur",function(){return r.onTouched()});},inputs:{compareWith:"compareWith"},standalone:false,features:[nT([Nn]),yg]})}return n})(),ei=(()=>{class n{_element;_renderer;_select;id;_value;constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption(this));}set ngValue(e){this._select!=null&&(this._value=e,this._setElementValue(Ze(this.id,e)),this._select.writeValue(this._select.value));}set value(e){this._select?(this._value=e,this._setElementValue(Ze(this.id,e)),this._select.writeValue(this._select.value)):this._setElementValue(e);}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e);}_setSelected(e){this._renderer.setProperty(this._element.nativeElement,"selected",e);}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value));}static \u0275fac=function(i){return new(i||n)(ge(Qt$1),ge(As),ge(Mt,9))};static \u0275dir=ks({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:false})}return n})();var Et=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=Do({type:n});static \u0275inj=Wn({})}return n})();var ti=(()=>{class n{static withConfig(e){return {ngModule:n,providers:[{provide:O,useValue:e.callSetDisabledState??Z$1}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=Do({type:n});static \u0275inj=Wn({imports:[Et]})}return n})(),ni=(()=>{class n{static withConfig(e){return {ngModule:n,providers:[{provide:Se,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:O,useValue:e.callSetDisabledState??Z$1}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=Do({type:n});static \u0275inj=Wn({imports:[Et]})}return n})();function V(i){return Error(`Unable to find icon with the name "${i}"`)}function X(){return Error("Could not find HttpClient for use with Angular Material icons. Please add provideHttpClient() to your providers.")}function q(i){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${i}".`)}function Y(i){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${i}".`)}var a=class{url;svgText;options;svgElement=null;constructor(l,t,e){this.url=l,this.svgText=t,this.options=e;}},K=(()=>{class i{_httpClient;_sanitizer;_errorHandler;_document;_svgIconConfigs=new Map;_iconSetConfigs=new Map;_cachedIconsByUrl=new Map;_inProgressUrlFetches=new Map;_fontCssClassesByAlias=new Map;_resolvers=[];_defaultFontSetClass=["material-icons","mat-ligature-font"];constructor(t,e,n,o){this._httpClient=t,this._sanitizer=e,this._errorHandler=o,this._document=n;}addSvgIcon(t,e,n){return this.addSvgIconInNamespace("",t,e,n)}addSvgIconLiteral(t,e,n){return this.addSvgIconLiteralInNamespace("",t,e,n)}addSvgIconInNamespace(t,e,n,o){return this._addSvgIconConfig(t,e,new a(n,null,o))}addSvgIconResolver(t){return this._resolvers.push(t),this}addSvgIconLiteralInNamespace(t,e,n,o){let r=this._sanitizer.sanitize(ke.HTML,n);if(!r)throw Y(n);let s=vn$1(r);return this._addSvgIconConfig(t,e,new a("",s,o))}addSvgIconSet(t,e){return this.addSvgIconSetInNamespace("",t,e)}addSvgIconSetLiteral(t,e){return this.addSvgIconSetLiteralInNamespace("",t,e)}addSvgIconSetInNamespace(t,e,n){return this._addSvgIconSetConfig(t,new a(e,null,n))}addSvgIconSetLiteralInNamespace(t,e,n){let o=this._sanitizer.sanitize(ke.HTML,e);if(!o)throw Y(e);let r=vn$1(o);return this._addSvgIconSetConfig(t,new a("",r,n))}registerFontClassAlias(t,e=t){return this._fontCssClassesByAlias.set(t,e),this}classNameForFontAlias(t){return this._fontCssClassesByAlias.get(t)||t}setDefaultFontSetClass(...t){return this._defaultFontSetClass=t,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(t){let e=this._sanitizer.sanitize(ke.RESOURCE_URL,t);if(!e)throw q(t);let n=this._cachedIconsByUrl.get(e);return n?pa(C(n)):this._loadSvgIconFromConfig(new a(t,null)).pipe(Od(o=>this._cachedIconsByUrl.set(e,o)),ue$1(o=>C(o)))}getNamedSvgIcon(t,e=""){let n=J(e,t),o=this._svgIconConfigs.get(n);if(o)return this._getSvgFromConfig(o);if(o=this._getIconConfigFromResolvers(e,t),o)return this._svgIconConfigs.set(n,o),this._getSvgFromConfig(o);let r=this._iconSetConfigs.get(e);return r?this._getSvgFromIconSetConfigs(t,r):Hy(V(n))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear();}_getSvgFromConfig(t){return t.svgText?pa(C(this._svgElementFromConfig(t))):this._loadSvgIconFromConfig(t).pipe(ue$1(e=>C(e)))}_getSvgFromIconSetConfigs(t,e){let n=this._extractIconWithNameFromAnySet(t,e);if(n)return pa(n);let o=e.filter(r=>!r.svgText).map(r=>this._loadSvgIconSetFromConfig(r).pipe(ha(s=>{let f=`Loading icon set URL: ${this._sanitizer.sanitize(ke.RESOURCE_URL,r.url)} failed: ${s.message}`;return this._errorHandler.handleError(new Error(f)),pa(null)})));return By(o).pipe(ue$1(()=>{let r=this._extractIconWithNameFromAnySet(t,e);if(!r)throw V(t);return r}))}_extractIconWithNameFromAnySet(t,e){for(let n=e.length-1;n>=0;n--){let o=e[n];if(o.svgText&&o.svgText.toString().indexOf(t)>-1){let r=this._svgElementFromConfig(o),s=this._extractSvgIconFromSet(r,t,o.options);if(s)return s}}return null}_loadSvgIconFromConfig(t){return this._fetchIcon(t).pipe(Od(e=>t.svgText=e),ue$1(()=>this._svgElementFromConfig(t)))}_loadSvgIconSetFromConfig(t){return t.svgText?pa(null):this._fetchIcon(t).pipe(Od(e=>t.svgText=e))}_extractSvgIconFromSet(t,e,n){let o=t.querySelector(`[id="${e}"]`);if(!o)return null;let r=o.cloneNode(true);if(r.removeAttribute("id"),r.nodeName.toLowerCase()==="svg")return this._setSvgAttributes(r,n);if(r.nodeName.toLowerCase()==="symbol")return this._setSvgAttributes(this._toSvgElement(r),n);let s=this._svgElementFromString(vn$1("<svg></svg>"));return s.appendChild(r),this._setSvgAttributes(s,n)}_svgElementFromString(t){let e=this._document.createElement("DIV");e.innerHTML=t;let n=e.querySelector("svg");if(!n)throw Error("<svg> tag not found");return n}_toSvgElement(t){let e=this._svgElementFromString(vn$1("<svg></svg>")),n=t.attributes;for(let o=0;o<n.length;o++){let{name:r,value:s}=n[o];r!=="id"&&e.setAttribute(r,s);}for(let o=0;o<t.childNodes.length;o++)t.childNodes[o].nodeType===this._document.ELEMENT_NODE&&e.appendChild(t.childNodes[o].cloneNode(true));return e}_setSvgAttributes(t,e){return t.setAttribute("fit",""),t.setAttribute("height","100%"),t.setAttribute("width","100%"),t.setAttribute("preserveAspectRatio","xMidYMid meet"),t.setAttribute("focusable","false"),e&&e.viewBox&&t.setAttribute("viewBox",e.viewBox),t}_fetchIcon(t){let{url:e,options:n}=t,o=n?.withCredentials??false;if(!this._httpClient)throw X();if(e==null)throw Error(`Cannot fetch icon from URL "${e}".`);let r=this._sanitizer.sanitize(ke.RESOURCE_URL,e);if(!r)throw q(e);let s=this._inProgressUrlFetches.get(r);if(s)return s;let h=this._httpClient.get(r,{responseType:"text",withCredentials:o}).pipe(ue$1(f=>vn$1(f)),Da(()=>this._inProgressUrlFetches.delete(r)),Ia());return this._inProgressUrlFetches.set(r,h),h}_addSvgIconConfig(t,e,n){return this._svgIconConfigs.set(J(t,e),n),this}_addSvgIconSetConfig(t,e){let n=this._iconSetConfigs.get(t);return n?n.push(e):this._iconSetConfigs.set(t,[e]),this}_svgElementFromConfig(t){if(!t.svgElement){let e=this._svgElementFromString(t.svgText);this._setSvgAttributes(e,t.options),t.svgElement=e;}return t.svgElement}_getIconConfigFromResolvers(t,e){for(let n=0;n<this._resolvers.length;n++){let o=this._resolvers[n](e,t);if(o)return Z(o)?new a(o.url,null,o.options):new a(o,null)}}static \u0275fac=function(e){return new(e||i)(C$1(dy,8),C$1(wS),C$1(U$1,8),C$1(Se$1))};static \u0275prov=x({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function C(i){return i.cloneNode(true)}function J(i,l){return i+":"+l}function Z(i){return !!(i.url&&i.options)}var tt=["*"],et=new w("MAT_ICON_DEFAULT_OPTIONS"),nt=new w("mat-icon-location",{providedIn:"root",factory:()=>{let i=g(U$1),l=i?i.location:null;return {getPathname:()=>l?l.pathname+l.search:""}}}),G=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],ot=G.map(i=>`[${i}]`).join(", "),rt=/^url\(['"]?#(.*?)['"]?\)$/,wt=(()=>{class i{_elementRef=g(Qt$1);_iconRegistry=g(K);_location=g(nt);_errorHandler=g(Se$1);_defaultColor;get color(){return this._color||this._defaultColor}set color(t){this._color=t;}_color;inline=false;get svgIcon(){return this._svgIcon}set svgIcon(t){t!==this._svgIcon&&(t?this._updateSvgIcon(t):this._svgIcon&&this._clearSvgElement(),this._svgIcon=t);}_svgIcon;get fontSet(){return this._fontSet}set fontSet(t){let e=this._cleanupFontValue(t);e!==this._fontSet&&(this._fontSet=e,this._updateFontIconClasses());}_fontSet;get fontIcon(){return this._fontIcon}set fontIcon(t){let e=this._cleanupFontValue(t);e!==this._fontIcon&&(this._fontIcon=e,this._updateFontIconClasses());}_fontIcon;_previousFontSetClass=[];_previousFontIconClass;_svgName=null;_svgNamespace=null;_previousPath;_elementsWithExternalReferences;_currentIconFetch=X$1.EMPTY;constructor(){let t=g(new am("aria-hidden"),{optional:true}),e=g(et,{optional:true});e&&(e.color&&(this.color=this._defaultColor=e.color),e.fontSet&&(this.fontSet=e.fontSet)),t||this._elementRef.nativeElement.setAttribute("aria-hidden","true");}_splitIconName(t){if(!t)return ["",""];let e=t.split(":");switch(e.length){case 1:return ["",e[0]];case 2:return e;default:throw Error(`Invalid icon name: "${t}"`)}}ngOnInit(){this._updateFontIconClasses();}ngAfterViewChecked(){let t=this._elementsWithExternalReferences;if(t&&t.size){let e=this._location.getPathname();e!==this._previousPath&&(this._previousPath=e,this._prependPathToReferences(e));}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();}_usingFontIcon(){return !this.svgIcon}_setSvgElement(t){this._clearSvgElement();let e=this._location.getPathname();this._previousPath=e,this._cacheChildrenWithExternalReferences(t),this._prependPathToReferences(e),this._elementRef.nativeElement.appendChild(t);}_clearSvgElement(){let t=this._elementRef.nativeElement,e=t.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();e--;){let n=t.childNodes[e];(n.nodeType!==1||n.nodeName.toLowerCase()==="svg")&&n.remove();}}_updateFontIconClasses(){if(!this._usingFontIcon())return;let t=this._elementRef.nativeElement,e=(this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/):this._iconRegistry.getDefaultFontSetClass()).filter(n=>n.length>0);this._previousFontSetClass.forEach(n=>t.classList.remove(n)),e.forEach(n=>t.classList.add(n)),this._previousFontSetClass=e,this.fontIcon!==this._previousFontIconClass&&!e.includes("mat-ligature-font")&&(this._previousFontIconClass&&t.classList.remove(this._previousFontIconClass),this.fontIcon&&t.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon);}_cleanupFontValue(t){return typeof t=="string"?t.trim().split(" ")[0]:t}_prependPathToReferences(t){let e=this._elementsWithExternalReferences;e&&e.forEach((n,o)=>{n.forEach(r=>{o.setAttribute(r.name,`url('${t}#${r.value}')`);});});}_cacheChildrenWithExternalReferences(t){let e=t.querySelectorAll(ot),n=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let o=0;o<e.length;o++)G.forEach(r=>{let s=e[o],h=s.getAttribute(r),f=h?h.match(rt):null;if(f){let p=n.get(s);p||(p=[],n.set(s,p)),p.push({name:r,value:f[1]});}});}_updateSvgIcon(t){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),t){let[e,n]=this._splitIconName(t);e&&(this._svgNamespace=e),n&&(this._svgName=n),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(n,e).pipe(sn$1(1)).subscribe(o=>this._setSvgElement(o),o=>{let r=`Error retrieving icon ${e}:${n}! ${o.message}`;this._errorHandler.handleError(new Error(r));});}}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=Aw({type:i,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:10,hostBindings:function(e,n){e&2&&(Cg("data-mat-icon-type",n._usingFontIcon()?"font":"svg")("data-mat-icon-name",n._svgName||n.fontIcon)("data-mat-icon-namespace",n._svgNamespace||n.fontSet)("fontIcon",n._usingFontIcon()?n.fontIcon:null),FC(n.color?"mat-"+n.color:""),Hg("mat-icon-inline",n.inline)("mat-icon-no-color",n.color!=="primary"&&n.color!=="accent"&&n.color!=="warn"));},inputs:{color:"color",inline:[2,"inline","inline",YT],svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],ngContentSelectors:tt,decls:1,vars:0,template:function(e,n){e&1&&(vC(),DC(0));},styles:[`mat-icon, mat-icon.mat-primary, mat-icon.mat-accent, mat-icon.mat-warn {
|
|
2
2
|
color: var(--mat-icon-color, inherit);
|
|
3
3
|
}
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {g,bk as Mt,Y as x}from'./main-
|
|
1
|
+
import {g,bk as Mt,Y as x}from'./main-ZCJEGFW3.js';var s=class n{snackBar=g(Mt);success(t,o=2e3){this.snackBar.open(t,"",{duration:o,horizontalPosition:"center",verticalPosition:"bottom",panelClass:["snackbar-success"]});}error(t,o=3e3){this.snackBar.open(t,"",{duration:o,horizontalPosition:"center",verticalPosition:"bottom",panelClass:["snackbar-error"]});}info(t,o=2e3){this.snackBar.open(t,"",{duration:o,horizontalPosition:"center",verticalPosition:"bottom",panelClass:["snackbar-info"]});}static \u0275fac=function(o){return new(o||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})};export{s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {S as S$1}from'./chunk-
|
|
1
|
+
import {S as S$1}from'./chunk-CWFDInt7.js';import {g,G,w as we,dd as $,aI as Tr,bR as ga,u as ue,b as U,A as Aw,aJ as Nb,v as vs,be as aT,l as Ag,k as dl,af as Dg,T as TC,r as Tg,bf as uT,ah as rT,n as eC,ac as mC,t as tC,a9 as dC,aa as If,ab as wf,ag as fT}from'./main-ZCJEGFW3.js';import {W as Wn,D as De}from'./chunk-BLwyktBH.js';import'./chunk-BUF2p97y.js';import'./chunk-Pl7edkoq.js';var S=()=>[];function V(r,e){if(r&1){let t=dC();vs(0,"agentos-ai-provider-item",4),Ag("editRequested",function(i){If(t);let p=mC(2);return wf(p.onEdit(i))})("deleteRequested",function(i){If(t);let p=mC(2);return wf(p.onDelete(i))}),dl();}r&2&&Tg("config",e)("showBadge",false);}function F(r,e){if(r&1&&eC(0,V,1,2,"agentos-ai-provider-item",3),r&2){let t,o=e.$implicit,i=mC();tC((t=i.resolveProvider(o.id))?0:-1,t);}}var E=class r{router=g(G);destroyRef=g(we);aiProviderController=g($);refresh$=new Tr(void 0);providers$=this.refresh$.pipe(ga(()=>this.aiProviderController.listAiProvider("none")));providerItems$=this.providers$.pipe(ue(e=>e.map(t=>({id:t.id??"",name:t.name,description:t.apiType}))));providersById=new Map;constructor(){this.providers$.pipe(U(this.destroyRef)).subscribe(e=>{this.providersById=new Map(e.map(t=>[t.id??"",t]));});}goBack(){this.router.navigate(["/agentos","admin"]);}openCreateForm(){this.router.navigate(["/agentos","admin","ai-providers","new"]);}onEdit(e){e.id&&this.router.navigate(["/agentos","admin","ai-providers",e.id,"edit"]);}onDelete(e){e.id&&this.aiProviderController.deleteAiProvider(e.id).pipe(U(this.destroyRef)).subscribe(()=>this.refresh$.next());}resolveProvider(e){return this.providersById.get(e)??null}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=Aw({type:r,selectors:[["agentos-platform-ai-providers"]],decls:5,vars:6,consts:[["aiProviderItemTpl",""],["title","Platform AI Providers","emptyMessage","No platform AI providers defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],["scope","namespace",3,"config","showBadge"],["scope","namespace",3,"editRequested","deleteRequested","config","showBadge"]],template:function(t,o){if(t&1&&(vs(0,"ds-entity-list",1),aT(1,"async"),Ag("createRequested",function(){return o.openCreateForm()}),vs(2,"ds-icon-button",2),Ag("action",function(){return o.goBack()}),dl()(),Dg(3,F,1,1,"ng-template",null,0,fT)),t&2){let i=TC(4);Tg("items",uT(1,3,o.providerItems$)??rT(5,S))("showCreate",true)("itemTemplate",i);}},dependencies:[Wn,S$1,De,Nb],styles:[".platform-ai-providers__back[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;font-family:inherit;font-size:.875rem;color:var(--color-text-secondary, #6e6e73);padding:.25rem .5rem;border-radius:4px;transition:color .15s ease}.platform-ai-providers__back[_ngcontent-%COMP%]:hover{color:var(--color-primary, #007aff)}"]})};export{E as PlatformAiProvidersComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {g,bl as Sm,R as Re,H as Hi,m as mT,A as Aw,i as hr,j as Gn,v as vs,l as Ag,W as WC,k as dl,a3 as HI,n as eC,af as Dg,ag as fT,T as TC,X as XE,r as Tg,a6 as $I,t as tC,Z as z,bk as Mt,_ as Ue$1,am as Gm,$ as zt,a0 as jt,a1 as Vt,a2 as Nt,p as pr,bm as Xt,ai as Jg,aj as KC,q as oC,bn as nC,a8 as Zg,ak as Xg,x as iC,a5 as ml,ac as mC,a9 as dC,aa as If,ab as wf,bo as hl,bp as gl,ah as rT,b3 as oT,y as Hg}from'./main-CERDHS7N.js';import {d}from'./chunk-TsE9fL5L.js';import {W,k as ke,s as se}from'./chunk-CSLsbjtc.js';import {T as Tn,S as Sn,n as nt$1,a as ae,l as le,c as ce}from'./chunk-NZ2JSd9Y.js';import {W as Wn,i as it,n as nt,I as In,k as ke$1,L as Le$1,g as ga,E as En}from'./chunk-Dh70Sw4n.js';import'./chunk-Dv3y4cq8.js';import {y as yt,w as wt,t as ti,Z as Zn,c as cn,Y as Ye$1,a as wt$1,m as mn,g as gt}from'./chunk-D615HDbJ.js';function Ue(s,i){if(s&1){let e=dC();vs(0,"div",9)(1,"mat-form-field",18)(2,"mat-label"),WC(3),dl(),vs(4,"textarea",19),Jg("ngModelChange",function(r){let m=If(e).$index,D=mC();return KC(D.commands[m],r)||(D.commands[m]=r),wf(r)}),dl(),HI(),vs(5,"mat-hint"),WC(6,"Use placeholder for dynamic values"),dl()(),vs(7,"button",20),Ag("click",function(){let r=If(e).$index,m=mC();return wf(m.removeCommand(r))}),vs(8,"mat-icon"),WC(9,"delete"),dl()()();}if(s&2){let e=i.$index,t=mC();XE(3),ml("Prompt ",e+1),XE(),Xg("ngModel",t.commands[e]),$I(),XE(3),Tg("disabled",t.commands.length===1);}}function Ne(s,i){if(s&1){let e=dC();vs(0,"div",10)(1,"h3"),WC(2,"Save to"),dl(),vs(3,"div",21)(4,"label",22)(5,"input",23),Jg("ngModelChange",function(r){If(e);let m=mC();return KC(m.source,r)||(m.source=r),wf(r)}),dl(),HI(),vs(6,"div",24)(7,"div",25)(8,"span",26),WC(9,"\u{1F464}"),dl(),vs(10,"span",27),WC(11,"Local"),dl()(),vs(12,"p",28),WC(13,"Personal prompt in ~/.coday/... (not committed)"),dl()()(),vs(14,"label",22)(15,"input",29),Jg("ngModelChange",function(r){If(e);let m=mC();return KC(m.source,r)||(m.source=r),wf(r)}),dl(),HI(),vs(16,"div",24)(17,"div",25)(18,"span",26),WC(19,"\u{1F4E6}"),dl(),vs(20,"span",27),WC(21,"Project"),dl()(),vs(22,"p",28),WC(23,"Shared prompt in ./prompts/ (committable)"),dl()()()(),vs(24,"p",30),WC(25,"Storage location is permanent and cannot be changed after creation"),dl()();}if(s&2){let e=mC();XE(4),Hg("selected",e.source==="local"),XE(),Xg("ngModel",e.source),$I(),XE(9),Hg("selected",e.source==="project"),XE(),Xg("ngModel",e.source),$I();}}function je(s,i){if(s&1&&(vs(0,"div",11)(1,"h3"),WC(2,"Storage Location"),dl(),vs(3,"div",31)(4,"span",26),WC(5),dl(),vs(6,"span",27),WC(7),dl()(),vs(8,"p",30),WC(9,"Cannot be changed after creation"),dl()()),s&2){let e=mC();XE(3),Hg("badge-local",e.source==="local")("badge-project",e.source==="project"),XE(2),Zg(e.source==="local"?"\u{1F464}":"\u{1F4E6}"),XE(2),Zg(e.source==="local"?"Local":"Project");}}function qe(s,i){if(s&1){let e=dC();vs(0,"div",12)(1,"label",32)(2,"input",33),Jg("ngModelChange",function(r){If(e);let m=mC();return KC(m.webhookEnabled,r)||(m.webhookEnabled=r),wf(r)}),dl(),HI(),vs(3,"span"),WC(4,"Enable webhook"),dl()(),vs(5,"p",30),WC(6,"Enable webhook to trigger this prompt via HTTP POST"),dl()();}if(s&2){let e=mC();XE(2),Xg("ngModel",e.webhookEnabled),$I();}}function He(s,i){if(s&1){let e=dC();vs(0,"div",13)(1,"div",34)(2,"mat-icon",35),WC(3,"link"),dl(),vs(4,"h4"),WC(5,"Webhook URL"),dl()(),vs(6,"div",36)(7,"p",37),WC(8),dl(),vs(9,"button",38),Ag("click",function(){If(e);let r=mC();return wf(r.copyWebhookUrl())}),vs(10,"mat-icon"),WC(11,"content_copy"),dl(),vs(12,"span"),WC(13,"Copy URL"),dl()()(),vs(14,"p",30),WC(15,"Use this URL to trigger the prompt via HTTP POST"),dl()();}if(s&2){let e=mC();XE(8),Zg(e.getWebhookUrl());}}function Ye(s,i){if(s&1&&(vs(0,"div",14)(1,"mat-icon"),WC(2,"error"),dl(),vs(3,"span"),WC(4),dl()()),s&2){let e=mC();XE(4),Zg(e.errorMessage);}}var S=class s{promptApi=g(d);dialogRef=g(z);configApi=g(W);snackBar=g(Mt);name="";description="";commands=[""];webhookEnabled=false;threadLifetime="";source="local";isSaving=false;errorMessage="";isAdmin=false;isEditMode=false;promptId="";data=g(Ue$1);constructor(){this.isEditMode=this.data.mode==="edit";}ngOnInit(){this.configApi.getUserConfig().subscribe({next:i=>{this.isAdmin=i.groups?.includes("CODAY_ADMIN")??false;},error:i=>{console.error("[PROMPT_FORM] Error loading user config:",i),this.isAdmin=false;}}),this.isEditMode&&this.data.prompt&&(this.promptId=this.data.prompt.id,this.name=this.data.prompt.name,this.description=this.data.prompt.description,this.commands=[...this.data.prompt.commands],this.webhookEnabled=this.data.prompt.webhookEnabled,this.source=this.data.prompt.source);}addCommand(){this.commands.push("");}removeCommand(i){this.commands.length>1&&this.commands.splice(i,1);}trackByIndex(i){return i}normalizeName(){this.name=this.name.replace(/[\s_.,;:!?()[\]{}]+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"").toLowerCase();}validateForm(){return this.name.trim()?this.description.trim()?this.commands.filter(e=>e.trim()).length===0?(this.errorMessage="At least one command is required",false):true:(this.errorMessage="Description is required",false):(this.errorMessage="Name is required",false)}save(){if(this.errorMessage="",!this.validateForm())return;let i=this.commands.filter(e=>e.trim());if(this.isSaving=true,this.isEditMode&&this.data.prompt){let e={name:this.name.trim(),description:this.description.trim(),commands:i,webhookEnabled:this.webhookEnabled};this.promptApi.updatePrompt(this.data.prompt.id,e).subscribe({next:()=>{this.isSaving=false,this.dialogRef.close(true);},error:t=>{console.error("Error updating prompt:",t),this.errorMessage=t?.error?.error||t?.message||"Failed to update prompt",this.isSaving=false;}});}else {let e={name:this.name.trim(),description:this.description.trim(),commands:i,webhookEnabled:this.webhookEnabled,source:this.source};this.promptApi.createPrompt(e).subscribe({next:()=>{this.isSaving=false,this.dialogRef.close(true);},error:t=>{console.error("Error creating prompt:",t),this.errorMessage=t?.error?.error||t?.message||"Failed to create prompt",this.isSaving=false;}});}}cancel(){this.dialogRef.close(false);}getWebhookUrl(){return `${window.location.origin}/api/webhooks/${this.promptId}/execute`}copyWebhookUrl(){if(!this.webhookEnabled){this.snackBar.open("Webhook is not enabled","Close",{duration:3e3});return}if(!this.promptId){this.snackBar.open("Prompt must be saved before getting webhook URL","Close",{duration:3e3});return}let i=this.getWebhookUrl();navigator.clipboard.writeText(i).then(()=>{this.snackBar.open("Webhook URL copied to clipboard!","Close",{duration:3e3});}).catch(e=>{console.error("Failed to copy webhook URL:",e),this.snackBar.open("Failed to copy URL","Close",{duration:3e3});});}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=Aw({type:s,selectors:[["app-prompt-form"]],decls:36,vars:11,consts:[["mat-dialog-title",""],[1,"form-container"],["appearance","outline",1,"full-width"],["matInput","","placeholder","my-prompt","required","",3,"ngModelChange","blur","ngModel"],["matInput","","placeholder","What does this prompt do?","rows","3","required","",3,"ngModelChange","ngModel"],[1,"commands-section"],[1,"section-header"],["mat-icon-button","","type","button","title","Add command",3,"click"],[1,"commands-list"],[1,"command-item"],[1,"source-section"],[1,"source-display"],[1,"webhook-section"],[1,"webhook-url-section"],[1,"error-message"],["align","end"],["mat-button","",3,"click","disabled"],["mat-raised-button","","color","primary",3,"click","disabled"],["appearance","outline",1,"command-field"],["matInput","","placeholder","Enter command with placeholders like \\{\\{key\\}\\}","rows","2",3,"ngModelChange","ngModel"],["mat-icon-button","","type","button","title","Remove command",1,"remove-btn",3,"click","disabled"],[1,"source-options"],[1,"source-option"],["type","radio","name","source","value","local",3,"ngModelChange","ngModel"],[1,"source-content"],[1,"source-header"],[1,"source-icon"],[1,"source-label"],[1,"source-description"],["type","radio","name","source","value","project",3,"ngModelChange","ngModel"],[1,"hint"],[1,"source-badge"],[1,"checkbox-label"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"webhook-url-header"],[1,"webhook-icon"],[1,"webhook-url-content"],[1,"url-text"],["mat-raised-button","","color","accent","type","button",3,"click"]],template:function(e,t){e&1&&(vs(0,"h2",0),WC(1),dl(),vs(2,"mat-dialog-content")(3,"div",1)(4,"mat-form-field",2)(5,"mat-label"),WC(6,"Name"),dl(),vs(7,"input",3),Jg("ngModelChange",function(m){return KC(t.name,m)||(t.name=m),m}),Ag("blur",function(){return t.normalizeName()}),dl(),HI(),vs(8,"mat-hint"),WC(9,"A descriptive name (spaces and punctuation will be replaced with hyphens), will be used as command name"),dl()(),vs(10,"mat-form-field",2)(11,"mat-label"),WC(12,"Description"),dl(),vs(13,"textarea",4),Jg("ngModelChange",function(m){return KC(t.description,m)||(t.description=m),m}),dl(),HI(),vs(14,"mat-hint"),WC(15,"Explain the purpose of this prompt, helps for searchability"),dl()(),vs(16,"div",5)(17,"div",6)(18,"h3"),WC(19,"Prompts"),dl(),vs(20,"button",7),Ag("click",function(){return t.addCommand()}),vs(21,"mat-icon"),WC(22,"add"),dl()()(),vs(23,"div",8),oC(24,Ue,10,3,"div",9,nC),dl()(),eC(26,Ne,26,6,"div",10),eC(27,je,10,6,"div",11),eC(28,qe,7,1,"div",12),eC(29,He,16,1,"div",13),eC(30,Ye,5,1,"div",14),dl()(),vs(31,"mat-dialog-actions",15)(32,"button",16),Ag("click",function(){return t.cancel()}),WC(33,"Cancel"),dl(),vs(34,"button",17),Ag("click",function(){return t.save()}),WC(35),dl()()),e&2&&(XE(),Zg(t.isEditMode?"Edit Prompt":"Create Prompt"),XE(6),Xg("ngModel",t.name),$I(),XE(6),Xg("ngModel",t.description),$I(),XE(11),iC(t.commands),XE(2),tC(t.isEditMode?-1:26),XE(),tC(t.isEditMode?27:-1),XE(),tC(t.isAdmin?28:-1),XE(),tC(t.isEditMode&&t.webhookEnabled&&t.isAdmin?29:-1),XE(),tC(t.errorMessage?30:-1),XE(2),Tg("disabled",t.isSaving),XE(2),Tg("disabled",t.isSaving),XE(),ml(" ",t.isSaving?"Saving...":"Save"," "));},dependencies:[Gm,ti,Ye$1,wt$1,mn,Zn,gt,cn,zt,jt,Vt,Nt,hr,pr,Gn,Tn,Sn,nt$1,ae,le,ce,yt,wt,Xt],styles:[".form-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:0;min-width:500px}@media(max-width:768px){.form-container[_ngcontent-%COMP%]{min-width:auto}}.full-width[_ngcontent-%COMP%]{width:100%}.commands-section[_ngcontent-%COMP%] .section-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:.5rem}.commands-section[_ngcontent-%COMP%] .section-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;font-size:1rem;font-weight:600}.commands-section[_ngcontent-%COMP%] .commands-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.commands-section[_ngcontent-%COMP%] .command-item[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.5rem}.commands-section[_ngcontent-%COMP%] .command-item[_ngcontent-%COMP%] .command-field[_ngcontent-%COMP%]{flex:1}.commands-section[_ngcontent-%COMP%] .command-item[_ngcontent-%COMP%] .remove-btn[_ngcontent-%COMP%]{margin-top:8px}.commands-section[_ngcontent-%COMP%] .command-item[_ngcontent-%COMP%] .remove-btn[_ngcontent-%COMP%]:disabled{opacity:.3;cursor:not-allowed}.webhook-section[_ngcontent-%COMP%]{padding:1rem;background:var(--color-surface);border-radius:8px;border:1px solid var(--color-border)}.webhook-section[_ngcontent-%COMP%] .checkbox-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer}.webhook-section[_ngcontent-%COMP%] .checkbox-label[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{width:18px;height:18px;cursor:pointer}.webhook-section[_ngcontent-%COMP%] .checkbox-label[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:.95rem}.webhook-section[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{margin:.5rem 0 0;font-size:.85rem;color:var(--color-text-secondary)}.webhook-url-section[_ngcontent-%COMP%]{padding:1rem;background:var(--color-surface);border-radius:8px;border:1px solid var(--color-border)}.webhook-url-section[_ngcontent-%COMP%] .webhook-url-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;margin-bottom:.75rem}.webhook-url-section[_ngcontent-%COMP%] .webhook-url-header[_ngcontent-%COMP%] .webhook-icon[_ngcontent-%COMP%]{color:var(--color-primary)}.webhook-url-section[_ngcontent-%COMP%] .webhook-url-header[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin:0;font-size:1rem;font-weight:600}.webhook-url-section[_ngcontent-%COMP%] .webhook-url-content[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;margin-bottom:.5rem}.webhook-url-section[_ngcontent-%COMP%] .webhook-url-content[_ngcontent-%COMP%] .url-text[_ngcontent-%COMP%]{flex:1;margin:0;padding:.75rem;background:var(--color-bg);border:1px solid var(--color-border);border-radius:4px;font-family:monospace;font-size:.85rem;word-break:break-all;color:var(--color-text)}.webhook-url-section[_ngcontent-%COMP%] .webhook-url-content[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{white-space:nowrap;display:flex;align-items:center;gap:.5rem}.webhook-url-section[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-text-secondary)}.error-message[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.75rem;background:#f443361a;border:1px solid var(--color-error);border-radius:4px;color:var(--color-error)}.error-message[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:1.25rem;width:1.25rem;height:1.25rem}.error-message[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{flex:1}.source-section[_ngcontent-%COMP%]{padding:1rem;background:var(--color-surface);border-radius:8px;border:1px solid var(--color-border)}.source-section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 1rem;font-size:1rem;font-weight:600}.source-section[_ngcontent-%COMP%] .source-options[_ngcontent-%COMP%]{display:flex;gap:1rem;margin-bottom:.75rem}@media(max-width:768px){.source-section[_ngcontent-%COMP%] .source-options[_ngcontent-%COMP%]{flex-direction:column}}.source-section[_ngcontent-%COMP%] .source-option[_ngcontent-%COMP%]{flex:1;display:flex;align-items:flex-start;gap:.75rem;padding:1rem;background:var(--color-bg);border:2px solid var(--color-border);border-radius:8px;cursor:pointer;transition:all .2s ease}.source-section[_ngcontent-%COMP%] .source-option[_ngcontent-%COMP%]:hover{border-color:var(--color-primary);background:var(--color-bg-hover)}.source-section[_ngcontent-%COMP%] .source-option.selected[_ngcontent-%COMP%]{border-color:var(--color-primary);background:var(--color-bg-hover);box-shadow:0 0 0 1px var(--color-primary)}.source-section[_ngcontent-%COMP%] .source-option[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{margin-top:2px;cursor:pointer}.source-section[_ngcontent-%COMP%] .source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%]{flex:1}.source-section[_ngcontent-%COMP%] .source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;margin-bottom:.5rem}.source-section[_ngcontent-%COMP%] .source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-header[_ngcontent-%COMP%] .source-icon[_ngcontent-%COMP%]{font-size:1.25rem}.source-section[_ngcontent-%COMP%] .source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-header[_ngcontent-%COMP%] .source-label[_ngcontent-%COMP%]{font-weight:600;font-size:.95rem}.source-section[_ngcontent-%COMP%] .source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-description[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-text-secondary);line-height:1.4}.source-section[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-text-secondary);font-style:italic}.thread-lifetime-disabled[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.75rem;padding:1rem;background:#2196f30d;border:1px solid rgba(33,150,243,.2);border-radius:8px;margin-bottom:1rem}.thread-lifetime-disabled[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#2196f3cc;font-size:1.25rem;width:1.25rem;height:1.25rem;margin-top:2px}.thread-lifetime-disabled[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;flex:1}.thread-lifetime-disabled[_ngcontent-%COMP%] p[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-size:.95rem;color:var(--color-text)}.thread-lifetime-disabled[_ngcontent-%COMP%] p[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{display:block;margin-top:.25rem;font-size:.85rem;color:var(--color-text-secondary);line-height:1.4}.source-display[_ngcontent-%COMP%]{padding:1rem;background:var(--color-surface);border-radius:8px;border:1px solid var(--color-border)}.source-display[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 .75rem;font-size:1rem;font-weight:600}.source-display[_ngcontent-%COMP%] .source-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.5rem;padding:.5rem 1rem;border-radius:6px;font-size:.9rem;font-weight:500;margin-bottom:.5rem}.source-display[_ngcontent-%COMP%] .source-badge[_ngcontent-%COMP%] .source-icon[_ngcontent-%COMP%]{font-size:1.1rem}.source-display[_ngcontent-%COMP%] .source-badge.badge-local[_ngcontent-%COMP%]{background:#2196f31a;color:#2196f3;border:1px solid rgba(33,150,243,.3)}.source-display[_ngcontent-%COMP%] .source-badge.badge-project[_ngcontent-%COMP%]{background:#4caf501a;color:#4caf50;border:1px solid rgba(76,175,80,.3)}.source-display[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-text-secondary);font-style:italic}"],changeDetection:1})};var Ge=()=>[],Ke=s=>({id:s});function Je(s,i){if(s&1&&(vs(0,"div",6),WC(1),dl()),s&2){let e=mC();XE(),Zg(e.errorMessage());}}function Qe(s,i){if(s&1){let e=dC();vs(0,"ds-entity-card",8),Ag("selected",function(r){If(e);let m=mC();return wf(m.onEdit(r))}),hl(1,9),vs(2,"button",10),Ag("click",function(r){return r.stopPropagation()}),vs(3,"mat-icon"),WC(4,"more_vert"),dl()(),gl(),dl();}if(s&2){let e=i.$implicit;mC();let t=TC(11);Tg("id",e.id)("name",e.name)("description",e.description)("badges",e.badges??rT(6,Ge)),XE(2),Tg("matMenuTriggerFor",t)("matMenuTriggerData",oT(7,Ke,e.id));}}function Xe(s,i){if(s&1){let e=dC();vs(0,"button",11),Ag("click",function(){If(e);let r=mC().id,m=mC();return wf(m.onToggleWebhook(r))}),vs(1,"mat-icon"),WC(2),dl(),WC(3),dl();}if(s&2){let e=mC().id,t=mC();XE(2),Zg(t.isWebhookEnabled(e)?"link_off":"link"),XE(),ml(" ",t.isWebhookEnabled(e)?"Disable webhook":"Enable webhook"," ");}}function Ze(s,i){if(s&1){let e=dC();vs(0,"button",11),Ag("click",function(){let r=If(e).id,m=mC();return wf(m.onEdit(r))}),vs(1,"mat-icon"),WC(2,"edit"),dl(),WC(3," Edit "),dl(),eC(4,Xe,4,2,"button",12),vs(5,"button",13),Ag("click",function(){let r=If(e).id,m=mC();return wf(m.onDelete(r))}),vs(6,"mat-icon"),WC(7,"delete"),dl(),WC(8," Delete "),dl();}if(s&2){let e=mC();XE(4),tC(e.isAdmin()?4:-1);}}var Ie="system",Le=class s{promptApi=g(d);configApi=g(W);location=g(Sm);dialog=g(Re);prompts=Hi([]);isLoading=Hi(false);errorMessage=Hi(null);showOnlyMine=Hi(true);isAdmin=Hi(false);currentUsername=Hi("");promptItems=mT(()=>{let i=this.prompts(),e=this.currentUsername(),r=this.showOnlyMine()&&e?i.filter(p=>this.isMyPrompt(p)):i,D=[...new Set(r.map(p=>p.createdBy))].sort((p,k)=>p===e&&k!==e?-1:k===e&&p!==e||p===Ie?1:k===Ie?-1:p.localeCompare(k)),H=[];for(let p of D){let k=p===e?`${p} (you)`:p;for(let F of r.filter(Ae=>Ae.createdBy===p))H.push({id:F.id,name:F.name,description:F.description,badges:this.buildBadges(F),groupKey:p,groupLabel:k});}return H});ngOnInit(){this.configApi.getUserConfig().subscribe({next:i=>{this.isAdmin.set(i.groups?.includes("CODAY_ADMIN")??false),this.currentUsername.set(i.username??"");},error:()=>this.isAdmin.set(false)}),this.loadPrompts();}loadPrompts(){this.isLoading.set(true),this.promptApi.listPrompts().subscribe({next:i=>{this.prompts.set(i.filter(e=>!e.id.startsWith("builtin"))),this.isLoading.set(false);},error:i=>{this.errorMessage.set(i?.error?.error??"Failed to load prompts"),this.isLoading.set(false);}});}onBack(){this.location.back();}onCreate(){this.dialog.open(S,{width:"700px",maxHeight:"90vh",data:{mode:"create"}}).afterClosed().subscribe(e=>{e&&this.loadPrompts();});}onEdit(i){this.promptApi.getPrompt(i).subscribe({next:e=>{this.dialog.open(S,{width:"700px",maxHeight:"90vh",data:{mode:"edit",prompt:e}}).afterClosed().subscribe(r=>{r&&this.loadPrompts();});},error:e=>this.errorMessage.set(e?.error?.error??"Failed to load prompt")});}onDelete(i){confirm("Are you sure you want to delete this prompt?")&&this.promptApi.deletePrompt(i).subscribe({next:()=>this.loadPrompts(),error:e=>this.errorMessage.set(e?.error?.error??"Failed to delete prompt")});}onToggleWebhook(i){let e=this.prompts().find(r=>r.id===i);if(!e)return;(e.webhookEnabled?this.promptApi.disableWebhook(i):this.promptApi.enableWebhook(i)).subscribe({next:()=>this.loadPrompts(),error:r=>this.errorMessage.set(r?.error?.error??"Failed to toggle webhook")});}isWebhookEnabled(i){return this.prompts().find(e=>e.id===i)?.webhookEnabled??false}isMyPrompt(i){let e=t=>t.replace(/[.\s]+/g,"_").toLowerCase();return e(i.createdBy)===e(this.currentUsername())}buildBadges(i){let e=[];return i.source==="local"?e.push({label:"local",variant:"info"}):e.push({label:"project",variant:"success"}),i.webhookEnabled&&e.push({label:"webhook",variant:"warning"}),e}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=Aw({type:s,selectors:[["app-prompt-list"]],decls:13,vars:5,consts:[["promptCard",""],["cardMenu","matMenu"],[1,"prompt-list-page"],["title","Prompts","cardMinWidth","320px","contentMaxWidth","1400px","searchPlaceholder","Filter prompts\u2026","emptyMessage","No prompts found.",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","mat-icon-button","","title","Back",3,"click"],["toolbar-extras","","color","primary",1,"prompt-list__mine-toggle",3,"ngModelChange","ngModel"],[1,"prompt-list__error"],["matMenuContent",""],[3,"selected","id","name","description","badges"],["dsCardActions",""],["mat-icon-button","",3,"click","matMenuTriggerFor","matMenuTriggerData"],["mat-menu-item","",3,"click"],["mat-menu-item",""],["mat-menu-item","",1,"prompt-list__delete-item",3,"click"]],template:function(e,t){if(e&1&&(vs(0,"div",2)(1,"ds-entity-list",3),Ag("createRequested",function(){return t.onCreate()}),vs(2,"button",4),Ag("click",function(){return t.onBack()}),vs(3,"mat-icon"),WC(4,"chevron_left"),dl()(),vs(5,"mat-slide-toggle",5),Ag("ngModelChange",function(m){return t.showOnlyMine.set(m)}),WC(6," Mine "),dl(),HI(),dl(),eC(7,Je,2,1,"div",6),dl(),Dg(8,Qe,5,9,"ng-template",null,0,fT),vs(10,"mat-menu",null,1),Dg(12,Ze,9,1,"ng-template",7),dl()),e&2){let r=TC(9);XE(),Tg("items",t.promptItems())("showCreate",true)("itemTemplate",r),XE(4),Tg("ngModel",t.showOnlyMine()),$I(),XE(2),tC(t.errorMessage()?7:-1);}},dependencies:[Wn,it,nt,hr,Gn,yt,wt,ke,se,In,ke$1,Le$1,ga,En,ti,Zn,cn],styles:["[_nghost-%COMP%]{display:block;width:100%;min-height:100vh;background:var(--color-bg);overflow-y:auto}.prompt-list__mine-toggle[_ngcontent-%COMP%]{flex-shrink:0;font-size:.875rem}.prompt-list__delete-item[_ngcontent-%COMP%]{color:var(--color-error, #ff3b30)}.prompt-list__delete-item[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:inherit}.prompt-list__error[_ngcontent-%COMP%]{margin:1rem auto;max-width:900px;padding:.75rem 1rem;background:#dc262614;border:1px solid rgba(220,38,38,.25);border-radius:8px;color:var(--color-error, #ff3b30);font-size:.875rem}"],changeDetection:1})};export{Le as PromptListComponent};
|
|
1
|
+
import {g,bl as Sm,R as Re,H as Hi,m as mT,A as Aw,i as hr,j as Gn,v as vs,l as Ag,W as WC,k as dl,a3 as HI,n as eC,af as Dg,ag as fT,T as TC,X as XE,r as Tg,a6 as $I,t as tC,Z as z,bk as Mt,_ as Ue$1,am as Gm,$ as zt,a0 as jt,a1 as Vt,a2 as Nt,p as pr,bm as Xt,ai as Jg,aj as KC,q as oC,bn as nC,a8 as Zg,ak as Xg,x as iC,a5 as ml,ac as mC,a9 as dC,aa as If,ab as wf,bo as hl,bp as gl,ah as rT,b3 as oT,y as Hg}from'./main-ZCJEGFW3.js';import {d}from'./chunk-nHbbuVx2.js';import {W,k as ke,s as se}from'./chunk-DcWLC4S7.js';import {T as Tn,S as Sn,n as nt$1,a as ae,l as le,c as ce}from'./chunk-spSRZfqJ.js';import {W as Wn,i as it,n as nt,I as In,k as ke$1,L as Le$1,g as ga,E as En}from'./chunk-BLwyktBH.js';import'./chunk-BUF2p97y.js';import {y as yt,w as wt,t as ti,Z as Zn,c as cn,Y as Ye$1,a as wt$1,m as mn,g as gt}from'./chunk-Pl7edkoq.js';function Ue(s,i){if(s&1){let e=dC();vs(0,"div",9)(1,"mat-form-field",18)(2,"mat-label"),WC(3),dl(),vs(4,"textarea",19),Jg("ngModelChange",function(r){let m=If(e).$index,D=mC();return KC(D.commands[m],r)||(D.commands[m]=r),wf(r)}),dl(),HI(),vs(5,"mat-hint"),WC(6,"Use placeholder for dynamic values"),dl()(),vs(7,"button",20),Ag("click",function(){let r=If(e).$index,m=mC();return wf(m.removeCommand(r))}),vs(8,"mat-icon"),WC(9,"delete"),dl()()();}if(s&2){let e=i.$index,t=mC();XE(3),ml("Prompt ",e+1),XE(),Xg("ngModel",t.commands[e]),$I(),XE(3),Tg("disabled",t.commands.length===1);}}function Ne(s,i){if(s&1){let e=dC();vs(0,"div",10)(1,"h3"),WC(2,"Save to"),dl(),vs(3,"div",21)(4,"label",22)(5,"input",23),Jg("ngModelChange",function(r){If(e);let m=mC();return KC(m.source,r)||(m.source=r),wf(r)}),dl(),HI(),vs(6,"div",24)(7,"div",25)(8,"span",26),WC(9,"\u{1F464}"),dl(),vs(10,"span",27),WC(11,"Local"),dl()(),vs(12,"p",28),WC(13,"Personal prompt in ~/.coday/... (not committed)"),dl()()(),vs(14,"label",22)(15,"input",29),Jg("ngModelChange",function(r){If(e);let m=mC();return KC(m.source,r)||(m.source=r),wf(r)}),dl(),HI(),vs(16,"div",24)(17,"div",25)(18,"span",26),WC(19,"\u{1F4E6}"),dl(),vs(20,"span",27),WC(21,"Project"),dl()(),vs(22,"p",28),WC(23,"Shared prompt in ./prompts/ (committable)"),dl()()()(),vs(24,"p",30),WC(25,"Storage location is permanent and cannot be changed after creation"),dl()();}if(s&2){let e=mC();XE(4),Hg("selected",e.source==="local"),XE(),Xg("ngModel",e.source),$I(),XE(9),Hg("selected",e.source==="project"),XE(),Xg("ngModel",e.source),$I();}}function je(s,i){if(s&1&&(vs(0,"div",11)(1,"h3"),WC(2,"Storage Location"),dl(),vs(3,"div",31)(4,"span",26),WC(5),dl(),vs(6,"span",27),WC(7),dl()(),vs(8,"p",30),WC(9,"Cannot be changed after creation"),dl()()),s&2){let e=mC();XE(3),Hg("badge-local",e.source==="local")("badge-project",e.source==="project"),XE(2),Zg(e.source==="local"?"\u{1F464}":"\u{1F4E6}"),XE(2),Zg(e.source==="local"?"Local":"Project");}}function qe(s,i){if(s&1){let e=dC();vs(0,"div",12)(1,"label",32)(2,"input",33),Jg("ngModelChange",function(r){If(e);let m=mC();return KC(m.webhookEnabled,r)||(m.webhookEnabled=r),wf(r)}),dl(),HI(),vs(3,"span"),WC(4,"Enable webhook"),dl()(),vs(5,"p",30),WC(6,"Enable webhook to trigger this prompt via HTTP POST"),dl()();}if(s&2){let e=mC();XE(2),Xg("ngModel",e.webhookEnabled),$I();}}function He(s,i){if(s&1){let e=dC();vs(0,"div",13)(1,"div",34)(2,"mat-icon",35),WC(3,"link"),dl(),vs(4,"h4"),WC(5,"Webhook URL"),dl()(),vs(6,"div",36)(7,"p",37),WC(8),dl(),vs(9,"button",38),Ag("click",function(){If(e);let r=mC();return wf(r.copyWebhookUrl())}),vs(10,"mat-icon"),WC(11,"content_copy"),dl(),vs(12,"span"),WC(13,"Copy URL"),dl()()(),vs(14,"p",30),WC(15,"Use this URL to trigger the prompt via HTTP POST"),dl()();}if(s&2){let e=mC();XE(8),Zg(e.getWebhookUrl());}}function Ye(s,i){if(s&1&&(vs(0,"div",14)(1,"mat-icon"),WC(2,"error"),dl(),vs(3,"span"),WC(4),dl()()),s&2){let e=mC();XE(4),Zg(e.errorMessage);}}var S=class s{promptApi=g(d);dialogRef=g(z);configApi=g(W);snackBar=g(Mt);name="";description="";commands=[""];webhookEnabled=false;threadLifetime="";source="local";isSaving=false;errorMessage="";isAdmin=false;isEditMode=false;promptId="";data=g(Ue$1);constructor(){this.isEditMode=this.data.mode==="edit";}ngOnInit(){this.configApi.getUserConfig().subscribe({next:i=>{this.isAdmin=i.groups?.includes("CODAY_ADMIN")??false;},error:i=>{console.error("[PROMPT_FORM] Error loading user config:",i),this.isAdmin=false;}}),this.isEditMode&&this.data.prompt&&(this.promptId=this.data.prompt.id,this.name=this.data.prompt.name,this.description=this.data.prompt.description,this.commands=[...this.data.prompt.commands],this.webhookEnabled=this.data.prompt.webhookEnabled,this.source=this.data.prompt.source);}addCommand(){this.commands.push("");}removeCommand(i){this.commands.length>1&&this.commands.splice(i,1);}trackByIndex(i){return i}normalizeName(){this.name=this.name.replace(/[\s_.,;:!?()[\]{}]+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"").toLowerCase();}validateForm(){return this.name.trim()?this.description.trim()?this.commands.filter(e=>e.trim()).length===0?(this.errorMessage="At least one command is required",false):true:(this.errorMessage="Description is required",false):(this.errorMessage="Name is required",false)}save(){if(this.errorMessage="",!this.validateForm())return;let i=this.commands.filter(e=>e.trim());if(this.isSaving=true,this.isEditMode&&this.data.prompt){let e={name:this.name.trim(),description:this.description.trim(),commands:i,webhookEnabled:this.webhookEnabled};this.promptApi.updatePrompt(this.data.prompt.id,e).subscribe({next:()=>{this.isSaving=false,this.dialogRef.close(true);},error:t=>{console.error("Error updating prompt:",t),this.errorMessage=t?.error?.error||t?.message||"Failed to update prompt",this.isSaving=false;}});}else {let e={name:this.name.trim(),description:this.description.trim(),commands:i,webhookEnabled:this.webhookEnabled,source:this.source};this.promptApi.createPrompt(e).subscribe({next:()=>{this.isSaving=false,this.dialogRef.close(true);},error:t=>{console.error("Error creating prompt:",t),this.errorMessage=t?.error?.error||t?.message||"Failed to create prompt",this.isSaving=false;}});}}cancel(){this.dialogRef.close(false);}getWebhookUrl(){return `${window.location.origin}/api/webhooks/${this.promptId}/execute`}copyWebhookUrl(){if(!this.webhookEnabled){this.snackBar.open("Webhook is not enabled","Close",{duration:3e3});return}if(!this.promptId){this.snackBar.open("Prompt must be saved before getting webhook URL","Close",{duration:3e3});return}let i=this.getWebhookUrl();navigator.clipboard.writeText(i).then(()=>{this.snackBar.open("Webhook URL copied to clipboard!","Close",{duration:3e3});}).catch(e=>{console.error("Failed to copy webhook URL:",e),this.snackBar.open("Failed to copy URL","Close",{duration:3e3});});}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=Aw({type:s,selectors:[["app-prompt-form"]],decls:36,vars:11,consts:[["mat-dialog-title",""],[1,"form-container"],["appearance","outline",1,"full-width"],["matInput","","placeholder","my-prompt","required","",3,"ngModelChange","blur","ngModel"],["matInput","","placeholder","What does this prompt do?","rows","3","required","",3,"ngModelChange","ngModel"],[1,"commands-section"],[1,"section-header"],["mat-icon-button","","type","button","title","Add command",3,"click"],[1,"commands-list"],[1,"command-item"],[1,"source-section"],[1,"source-display"],[1,"webhook-section"],[1,"webhook-url-section"],[1,"error-message"],["align","end"],["mat-button","",3,"click","disabled"],["mat-raised-button","","color","primary",3,"click","disabled"],["appearance","outline",1,"command-field"],["matInput","","placeholder","Enter command with placeholders like \\{\\{key\\}\\}","rows","2",3,"ngModelChange","ngModel"],["mat-icon-button","","type","button","title","Remove command",1,"remove-btn",3,"click","disabled"],[1,"source-options"],[1,"source-option"],["type","radio","name","source","value","local",3,"ngModelChange","ngModel"],[1,"source-content"],[1,"source-header"],[1,"source-icon"],[1,"source-label"],[1,"source-description"],["type","radio","name","source","value","project",3,"ngModelChange","ngModel"],[1,"hint"],[1,"source-badge"],[1,"checkbox-label"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"webhook-url-header"],[1,"webhook-icon"],[1,"webhook-url-content"],[1,"url-text"],["mat-raised-button","","color","accent","type","button",3,"click"]],template:function(e,t){e&1&&(vs(0,"h2",0),WC(1),dl(),vs(2,"mat-dialog-content")(3,"div",1)(4,"mat-form-field",2)(5,"mat-label"),WC(6,"Name"),dl(),vs(7,"input",3),Jg("ngModelChange",function(m){return KC(t.name,m)||(t.name=m),m}),Ag("blur",function(){return t.normalizeName()}),dl(),HI(),vs(8,"mat-hint"),WC(9,"A descriptive name (spaces and punctuation will be replaced with hyphens), will be used as command name"),dl()(),vs(10,"mat-form-field",2)(11,"mat-label"),WC(12,"Description"),dl(),vs(13,"textarea",4),Jg("ngModelChange",function(m){return KC(t.description,m)||(t.description=m),m}),dl(),HI(),vs(14,"mat-hint"),WC(15,"Explain the purpose of this prompt, helps for searchability"),dl()(),vs(16,"div",5)(17,"div",6)(18,"h3"),WC(19,"Prompts"),dl(),vs(20,"button",7),Ag("click",function(){return t.addCommand()}),vs(21,"mat-icon"),WC(22,"add"),dl()()(),vs(23,"div",8),oC(24,Ue,10,3,"div",9,nC),dl()(),eC(26,Ne,26,6,"div",10),eC(27,je,10,6,"div",11),eC(28,qe,7,1,"div",12),eC(29,He,16,1,"div",13),eC(30,Ye,5,1,"div",14),dl()(),vs(31,"mat-dialog-actions",15)(32,"button",16),Ag("click",function(){return t.cancel()}),WC(33,"Cancel"),dl(),vs(34,"button",17),Ag("click",function(){return t.save()}),WC(35),dl()()),e&2&&(XE(),Zg(t.isEditMode?"Edit Prompt":"Create Prompt"),XE(6),Xg("ngModel",t.name),$I(),XE(6),Xg("ngModel",t.description),$I(),XE(11),iC(t.commands),XE(2),tC(t.isEditMode?-1:26),XE(),tC(t.isEditMode?27:-1),XE(),tC(t.isAdmin?28:-1),XE(),tC(t.isEditMode&&t.webhookEnabled&&t.isAdmin?29:-1),XE(),tC(t.errorMessage?30:-1),XE(2),Tg("disabled",t.isSaving),XE(2),Tg("disabled",t.isSaving),XE(),ml(" ",t.isSaving?"Saving...":"Save"," "));},dependencies:[Gm,ti,Ye$1,wt$1,mn,Zn,gt,cn,zt,jt,Vt,Nt,hr,pr,Gn,Tn,Sn,nt$1,ae,le,ce,yt,wt,Xt],styles:[".form-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:0;min-width:500px}@media(max-width:768px){.form-container[_ngcontent-%COMP%]{min-width:auto}}.full-width[_ngcontent-%COMP%]{width:100%}.commands-section[_ngcontent-%COMP%] .section-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:.5rem}.commands-section[_ngcontent-%COMP%] .section-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;font-size:1rem;font-weight:600}.commands-section[_ngcontent-%COMP%] .commands-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.commands-section[_ngcontent-%COMP%] .command-item[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.5rem}.commands-section[_ngcontent-%COMP%] .command-item[_ngcontent-%COMP%] .command-field[_ngcontent-%COMP%]{flex:1}.commands-section[_ngcontent-%COMP%] .command-item[_ngcontent-%COMP%] .remove-btn[_ngcontent-%COMP%]{margin-top:8px}.commands-section[_ngcontent-%COMP%] .command-item[_ngcontent-%COMP%] .remove-btn[_ngcontent-%COMP%]:disabled{opacity:.3;cursor:not-allowed}.webhook-section[_ngcontent-%COMP%]{padding:1rem;background:var(--color-surface);border-radius:8px;border:1px solid var(--color-border)}.webhook-section[_ngcontent-%COMP%] .checkbox-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer}.webhook-section[_ngcontent-%COMP%] .checkbox-label[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{width:18px;height:18px;cursor:pointer}.webhook-section[_ngcontent-%COMP%] .checkbox-label[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:.95rem}.webhook-section[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{margin:.5rem 0 0;font-size:.85rem;color:var(--color-text-secondary)}.webhook-url-section[_ngcontent-%COMP%]{padding:1rem;background:var(--color-surface);border-radius:8px;border:1px solid var(--color-border)}.webhook-url-section[_ngcontent-%COMP%] .webhook-url-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;margin-bottom:.75rem}.webhook-url-section[_ngcontent-%COMP%] .webhook-url-header[_ngcontent-%COMP%] .webhook-icon[_ngcontent-%COMP%]{color:var(--color-primary)}.webhook-url-section[_ngcontent-%COMP%] .webhook-url-header[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin:0;font-size:1rem;font-weight:600}.webhook-url-section[_ngcontent-%COMP%] .webhook-url-content[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;margin-bottom:.5rem}.webhook-url-section[_ngcontent-%COMP%] .webhook-url-content[_ngcontent-%COMP%] .url-text[_ngcontent-%COMP%]{flex:1;margin:0;padding:.75rem;background:var(--color-bg);border:1px solid var(--color-border);border-radius:4px;font-family:monospace;font-size:.85rem;word-break:break-all;color:var(--color-text)}.webhook-url-section[_ngcontent-%COMP%] .webhook-url-content[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{white-space:nowrap;display:flex;align-items:center;gap:.5rem}.webhook-url-section[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-text-secondary)}.error-message[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.75rem;background:#f443361a;border:1px solid var(--color-error);border-radius:4px;color:var(--color-error)}.error-message[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:1.25rem;width:1.25rem;height:1.25rem}.error-message[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{flex:1}.source-section[_ngcontent-%COMP%]{padding:1rem;background:var(--color-surface);border-radius:8px;border:1px solid var(--color-border)}.source-section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 1rem;font-size:1rem;font-weight:600}.source-section[_ngcontent-%COMP%] .source-options[_ngcontent-%COMP%]{display:flex;gap:1rem;margin-bottom:.75rem}@media(max-width:768px){.source-section[_ngcontent-%COMP%] .source-options[_ngcontent-%COMP%]{flex-direction:column}}.source-section[_ngcontent-%COMP%] .source-option[_ngcontent-%COMP%]{flex:1;display:flex;align-items:flex-start;gap:.75rem;padding:1rem;background:var(--color-bg);border:2px solid var(--color-border);border-radius:8px;cursor:pointer;transition:all .2s ease}.source-section[_ngcontent-%COMP%] .source-option[_ngcontent-%COMP%]:hover{border-color:var(--color-primary);background:var(--color-bg-hover)}.source-section[_ngcontent-%COMP%] .source-option.selected[_ngcontent-%COMP%]{border-color:var(--color-primary);background:var(--color-bg-hover);box-shadow:0 0 0 1px var(--color-primary)}.source-section[_ngcontent-%COMP%] .source-option[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{margin-top:2px;cursor:pointer}.source-section[_ngcontent-%COMP%] .source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%]{flex:1}.source-section[_ngcontent-%COMP%] .source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;margin-bottom:.5rem}.source-section[_ngcontent-%COMP%] .source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-header[_ngcontent-%COMP%] .source-icon[_ngcontent-%COMP%]{font-size:1.25rem}.source-section[_ngcontent-%COMP%] .source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-header[_ngcontent-%COMP%] .source-label[_ngcontent-%COMP%]{font-weight:600;font-size:.95rem}.source-section[_ngcontent-%COMP%] .source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-description[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-text-secondary);line-height:1.4}.source-section[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-text-secondary);font-style:italic}.thread-lifetime-disabled[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.75rem;padding:1rem;background:#2196f30d;border:1px solid rgba(33,150,243,.2);border-radius:8px;margin-bottom:1rem}.thread-lifetime-disabled[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#2196f3cc;font-size:1.25rem;width:1.25rem;height:1.25rem;margin-top:2px}.thread-lifetime-disabled[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;flex:1}.thread-lifetime-disabled[_ngcontent-%COMP%] p[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-size:.95rem;color:var(--color-text)}.thread-lifetime-disabled[_ngcontent-%COMP%] p[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{display:block;margin-top:.25rem;font-size:.85rem;color:var(--color-text-secondary);line-height:1.4}.source-display[_ngcontent-%COMP%]{padding:1rem;background:var(--color-surface);border-radius:8px;border:1px solid var(--color-border)}.source-display[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 .75rem;font-size:1rem;font-weight:600}.source-display[_ngcontent-%COMP%] .source-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.5rem;padding:.5rem 1rem;border-radius:6px;font-size:.9rem;font-weight:500;margin-bottom:.5rem}.source-display[_ngcontent-%COMP%] .source-badge[_ngcontent-%COMP%] .source-icon[_ngcontent-%COMP%]{font-size:1.1rem}.source-display[_ngcontent-%COMP%] .source-badge.badge-local[_ngcontent-%COMP%]{background:#2196f31a;color:#2196f3;border:1px solid rgba(33,150,243,.3)}.source-display[_ngcontent-%COMP%] .source-badge.badge-project[_ngcontent-%COMP%]{background:#4caf501a;color:#4caf50;border:1px solid rgba(76,175,80,.3)}.source-display[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-text-secondary);font-style:italic}"],changeDetection:1})};var Ge=()=>[],Ke=s=>({id:s});function Je(s,i){if(s&1&&(vs(0,"div",6),WC(1),dl()),s&2){let e=mC();XE(),Zg(e.errorMessage());}}function Qe(s,i){if(s&1){let e=dC();vs(0,"ds-entity-card",8),Ag("selected",function(r){If(e);let m=mC();return wf(m.onEdit(r))}),hl(1,9),vs(2,"button",10),Ag("click",function(r){return r.stopPropagation()}),vs(3,"mat-icon"),WC(4,"more_vert"),dl()(),gl(),dl();}if(s&2){let e=i.$implicit;mC();let t=TC(11);Tg("id",e.id)("name",e.name)("description",e.description)("badges",e.badges??rT(6,Ge)),XE(2),Tg("matMenuTriggerFor",t)("matMenuTriggerData",oT(7,Ke,e.id));}}function Xe(s,i){if(s&1){let e=dC();vs(0,"button",11),Ag("click",function(){If(e);let r=mC().id,m=mC();return wf(m.onToggleWebhook(r))}),vs(1,"mat-icon"),WC(2),dl(),WC(3),dl();}if(s&2){let e=mC().id,t=mC();XE(2),Zg(t.isWebhookEnabled(e)?"link_off":"link"),XE(),ml(" ",t.isWebhookEnabled(e)?"Disable webhook":"Enable webhook"," ");}}function Ze(s,i){if(s&1){let e=dC();vs(0,"button",11),Ag("click",function(){let r=If(e).id,m=mC();return wf(m.onEdit(r))}),vs(1,"mat-icon"),WC(2,"edit"),dl(),WC(3," Edit "),dl(),eC(4,Xe,4,2,"button",12),vs(5,"button",13),Ag("click",function(){let r=If(e).id,m=mC();return wf(m.onDelete(r))}),vs(6,"mat-icon"),WC(7,"delete"),dl(),WC(8," Delete "),dl();}if(s&2){let e=mC();XE(4),tC(e.isAdmin()?4:-1);}}var Ie="system",Le=class s{promptApi=g(d);configApi=g(W);location=g(Sm);dialog=g(Re);prompts=Hi([]);isLoading=Hi(false);errorMessage=Hi(null);showOnlyMine=Hi(true);isAdmin=Hi(false);currentUsername=Hi("");promptItems=mT(()=>{let i=this.prompts(),e=this.currentUsername(),r=this.showOnlyMine()&&e?i.filter(p=>this.isMyPrompt(p)):i,D=[...new Set(r.map(p=>p.createdBy))].sort((p,k)=>p===e&&k!==e?-1:k===e&&p!==e||p===Ie?1:k===Ie?-1:p.localeCompare(k)),H=[];for(let p of D){let k=p===e?`${p} (you)`:p;for(let F of r.filter(Ae=>Ae.createdBy===p))H.push({id:F.id,name:F.name,description:F.description,badges:this.buildBadges(F),groupKey:p,groupLabel:k});}return H});ngOnInit(){this.configApi.getUserConfig().subscribe({next:i=>{this.isAdmin.set(i.groups?.includes("CODAY_ADMIN")??false),this.currentUsername.set(i.username??"");},error:()=>this.isAdmin.set(false)}),this.loadPrompts();}loadPrompts(){this.isLoading.set(true),this.promptApi.listPrompts().subscribe({next:i=>{this.prompts.set(i.filter(e=>!e.id.startsWith("builtin"))),this.isLoading.set(false);},error:i=>{this.errorMessage.set(i?.error?.error??"Failed to load prompts"),this.isLoading.set(false);}});}onBack(){this.location.back();}onCreate(){this.dialog.open(S,{width:"700px",maxHeight:"90vh",data:{mode:"create"}}).afterClosed().subscribe(e=>{e&&this.loadPrompts();});}onEdit(i){this.promptApi.getPrompt(i).subscribe({next:e=>{this.dialog.open(S,{width:"700px",maxHeight:"90vh",data:{mode:"edit",prompt:e}}).afterClosed().subscribe(r=>{r&&this.loadPrompts();});},error:e=>this.errorMessage.set(e?.error?.error??"Failed to load prompt")});}onDelete(i){confirm("Are you sure you want to delete this prompt?")&&this.promptApi.deletePrompt(i).subscribe({next:()=>this.loadPrompts(),error:e=>this.errorMessage.set(e?.error?.error??"Failed to delete prompt")});}onToggleWebhook(i){let e=this.prompts().find(r=>r.id===i);if(!e)return;(e.webhookEnabled?this.promptApi.disableWebhook(i):this.promptApi.enableWebhook(i)).subscribe({next:()=>this.loadPrompts(),error:r=>this.errorMessage.set(r?.error?.error??"Failed to toggle webhook")});}isWebhookEnabled(i){return this.prompts().find(e=>e.id===i)?.webhookEnabled??false}isMyPrompt(i){let e=t=>t.replace(/[.\s]+/g,"_").toLowerCase();return e(i.createdBy)===e(this.currentUsername())}buildBadges(i){let e=[];return i.source==="local"?e.push({label:"local",variant:"info"}):e.push({label:"project",variant:"success"}),i.webhookEnabled&&e.push({label:"webhook",variant:"warning"}),e}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=Aw({type:s,selectors:[["app-prompt-list"]],decls:13,vars:5,consts:[["promptCard",""],["cardMenu","matMenu"],[1,"prompt-list-page"],["title","Prompts","cardMinWidth","320px","contentMaxWidth","1400px","searchPlaceholder","Filter prompts\u2026","emptyMessage","No prompts found.",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","mat-icon-button","","title","Back",3,"click"],["toolbar-extras","","color","primary",1,"prompt-list__mine-toggle",3,"ngModelChange","ngModel"],[1,"prompt-list__error"],["matMenuContent",""],[3,"selected","id","name","description","badges"],["dsCardActions",""],["mat-icon-button","",3,"click","matMenuTriggerFor","matMenuTriggerData"],["mat-menu-item","",3,"click"],["mat-menu-item",""],["mat-menu-item","",1,"prompt-list__delete-item",3,"click"]],template:function(e,t){if(e&1&&(vs(0,"div",2)(1,"ds-entity-list",3),Ag("createRequested",function(){return t.onCreate()}),vs(2,"button",4),Ag("click",function(){return t.onBack()}),vs(3,"mat-icon"),WC(4,"chevron_left"),dl()(),vs(5,"mat-slide-toggle",5),Ag("ngModelChange",function(m){return t.showOnlyMine.set(m)}),WC(6," Mine "),dl(),HI(),dl(),eC(7,Je,2,1,"div",6),dl(),Dg(8,Qe,5,9,"ng-template",null,0,fT),vs(10,"mat-menu",null,1),Dg(12,Ze,9,1,"ng-template",7),dl()),e&2){let r=TC(9);XE(),Tg("items",t.promptItems())("showCreate",true)("itemTemplate",r),XE(4),Tg("ngModel",t.showOnlyMine()),$I(),XE(2),tC(t.errorMessage()?7:-1);}},dependencies:[Wn,it,nt,hr,Gn,yt,wt,ke,se,In,ke$1,Le$1,ga,En,ti,Zn,cn],styles:["[_nghost-%COMP%]{display:block;width:100%;min-height:100vh;background:var(--color-bg);overflow-y:auto}.prompt-list__mine-toggle[_ngcontent-%COMP%]{flex-shrink:0;font-size:.875rem}.prompt-list__delete-item[_ngcontent-%COMP%]{color:var(--color-error, #ff3b30)}.prompt-list__delete-item[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:inherit}.prompt-list__error[_ngcontent-%COMP%]{margin:1rem auto;max-width:900px;padding:.75rem 1rem;background:#dc262614;border:1px solid rgba(220,38,38,.25);border-radius:8px;color:var(--color-error, #ff3b30);font-size:.875rem}"],changeDetection:1})};export{Le as PromptListComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {B}from'./chunk-
|
|
1
|
+
import {B}from'./chunk-CtWA9Wcw.js';import {g,G,A as Aw,v as vs,W as WC,k as dl,q as oC,X as XE,x as iC,a9 as dC,l as Ag,r as Tg,aa as If,ac as mC,ab as wf}from'./main-ZCJEGFW3.js';import'./chunk-BLwyktBH.js';import'./chunk-BUF2p97y.js';import'./chunk-Pl7edkoq.js';import'./chunk-B6HBR6l3.js';var M=(a,n)=>n.key;function b(a,n){if(a&1){let e=dC();vs(0,"agentos-action-card",6),Ag("nameClicked",function(){let v=If(e).$implicit,x=mC();return wf(x.navigateTo(v.path))}),dl();}if(a&2){let e=n.$implicit;Tg("name",e.name)("mark",e.mark)("markIsEmoji",true)("description",e.description)("clickable",true);}}var C=class a{router=g(G);sections=[{key:"users",mark:"\u{1F464}",name:"Users & Groups",description:"Manage platform users, their admin rights, and namespace user groups.",path:"/agentos/admin/users"},{key:"agents",mark:"\u{1F916}",name:"Platform agents",description:"Manage agent configs shared across all namespaces.",path:"/agentos/admin/agent-configs"},{key:"integrations",mark:"\u{1F517}",name:"Platform integrations",description:"Manage integration configs shared across all namespaces.",path:"/agentos/admin/integration-configs"},{key:"authSetting",mark:"\u{1F512}",name:"Auth settings",description:"Manage auth settings shared across all namespaces.",path:"/agentos/admin/auth-settings"},{key:"ai-providers",mark:"\u{1F9E0}",name:"Platform AI providers",description:"Manage AI provider configs shared across all namespaces.",path:"/agentos/admin/ai-providers"},{key:"ai-models",mark:"\u2728",name:"Platform AI models",description:"Manage AI model configs shared across all namespaces.",path:"/agentos/admin/ai-models"},{key:"prompts",mark:"\u{1F4C4}",name:"Platform prompts",description:"Manage prompts shared across all namespaces.",path:"/agentos/admin/prompts"},{key:"case-definitions",mark:"\u23F0",name:"Platform case definitions",description:"Manage scheduled case definitions shared across all namespaces.",path:"/agentos/admin/case-definitions"}];navigateTo(n){this.router.navigate([n]);}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=Aw({type:a,selectors:[["agentos-admin-home"]],decls:9,vars:0,consts:[[1,"admin-home"],[1,"admin-home__header"],[1,"admin-home__title"],[1,"admin-home__subtitle"],[1,"admin-home__sections"],[3,"name","mark","markIsEmoji","description","clickable"],[3,"nameClicked","name","mark","markIsEmoji","description","clickable"]],template:function(e,s){e&1&&(vs(0,"div",0)(1,"header",1)(2,"h1",2),WC(3,"Administration"),dl(),vs(4,"p",3),WC(5,"Platform-level settings, visible to super-admins only."),dl()(),vs(6,"nav",4),oC(7,b,1,5,"agentos-action-card",5,M),dl()()),e&2&&(XE(7),iC(s.sections));},dependencies:[B],styles:[".admin-home[_ngcontent-%COMP%]{max-width:860px;margin:0 auto;padding:2rem 1rem;display:flex;flex-direction:column;gap:2rem}.admin-home__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.admin-home__title[_ngcontent-%COMP%]{margin:0;font-size:28px;font-weight:700;color:var(--color-text);font-family:var(--font-heading)}.admin-home__subtitle[_ngcontent-%COMP%]{margin:0;font-size:13px;color:var(--color-neutral-600)}.admin-home__sections[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}"]})};export{C as AdminHomeComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {p}from'./chunk-
|
|
1
|
+
import {p}from'./chunk-CtWA9Wcw.js';import {g,ao as V,J as dy,d3 as y,A as Aw,aw as fl,W as WC,ax as pl,X as XE,a8 as Zg}from'./main-ZCJEGFW3.js';import'./chunk-B6HBR6l3.js';import'./chunk-BLwyktBH.js';import'./chunk-BUF2p97y.js';import'./chunk-Pl7edkoq.js';var A=class r{route=g(V);http=g(dy);config=g(y);message="Authentication in progress\u2026";ngOnInit(){let e=this.route.snapshot.queryParamMap.get("code"),t=this.route.snapshot.queryParamMap.get("state"),o=this.route.snapshot.queryParamMap.get("error"),i=this.route.snapshot.queryParamMap.get("error_description");if(o){console.warn("[AgentOS OAuth Callback] OAuth error:",o,i),this.notifyParentAndClose({success:false,error:i||o});return}if(!e){console.error("[AgentOS OAuth Callback] Missing authorization code"),this.message="OAuth callback error: missing authorization code.",this.notifyParentAndClose({success:false,error:"Missing authorization code"});return}this.http.post(`${this.config.basePath}/api/oauth/callback`,{code:e,state:t}).subscribe({next:()=>{console.log("[AgentOS OAuth Callback] Backend callback resolved"),this.notifyParentAndClose({success:true});},error:a=>{console.error("[AgentOS OAuth Callback] Backend callback failed:",a),this.notifyParentAndClose({success:false,error:a?.error?.message||a?.message||"Token exchange failed"});}});}notifyParentAndClose(e){if(this.message=e.success?"Authentication complete. You can close this window.":`Authentication failed: ${e.error??"unknown error"}. You can close this window.`,window.opener)try{window.opener.postMessage(e,window.location.origin);}catch(t){console.error("[AgentOS OAuth Callback] postMessage failed:",t),localStorage.setItem(p,JSON.stringify(e));}else console.warn("[AgentOS OAuth Callback] No window.opener \u2014 localStorage fallback"),localStorage.setItem(p,JSON.stringify(e));setTimeout(()=>window.close(),1e3);}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=Aw({type:r,selectors:[["agentos-oauth-callback"]],decls:2,vars:1,consts:[[2,"font-family","sans-serif","padding","2rem","text-align","center"]],template:function(t,o){t&1&&(fl(0,"p",0),WC(1),pl()),t&2&&(XE(),Zg(o.message));},encapsulation:2,changeDetection:1})};export{A as OAuthCallbackComponent};
|