-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path4592.6e68aea9eb2df012.js
1 lines (1 loc) · 58.2 KB
/
4592.6e68aea9eb2df012.js
1
"use strict";(self.webpackChunkmaterial_angular_io=self.webpackChunkmaterial_angular_io||[]).push([[4592],{1657:(Ie,k,m)=>{m.d(k,{B8:()=>T,KL:()=>_,U5:()=>J,be:()=>$,gx:()=>b,po:()=>Z,st:()=>z,u6:()=>h});var r=m(4300),C=m(9388),E=m(2495),M=m(6028),u=m(5879),B=m(2831),S=m(2079),A=m(9193),w=m(3075),O=m(9352);function G(d,y){1&d&&u.Hsn(0)}const p=["*"];let _=(()=>{class d{constructor(s){this._elementRef=s}focus(){this._elementRef.nativeElement.focus()}}return d.\u0275fac=function(s){return new(s||d)(u.Y36(u.SBq))},d.\u0275dir=u.lG2({type:d,selectors:[["","cdkStepHeader",""]],hostAttrs:["role","tab"]}),d})(),h=(()=>{class d{constructor(s){this.template=s}}return d.\u0275fac=function(s){return new(s||d)(u.Y36(u.Rgc))},d.\u0275dir=u.lG2({type:d,selectors:[["","cdkStepLabel",""]]}),d})(),c=0;const b=new u.OlP("STEPPER_GLOBAL_OPTIONS");let $=(()=>{class d{get editable(){return this._editable}set editable(s){this._editable=(0,E.Ig)(s)}get optional(){return this._optional}set optional(s){this._optional=(0,E.Ig)(s)}get completed(){return null==this._completedOverride?this._getDefaultCompleted():this._completedOverride}set completed(s){this._completedOverride=(0,E.Ig)(s)}_getDefaultCompleted(){return this.stepControl?this.stepControl.valid&&this.interacted:this.interacted}get hasError(){return null==this._customError?this._getDefaultError():this._customError}set hasError(s){this._customError=(0,E.Ig)(s)}_getDefaultError(){return this.stepControl&&this.stepControl.invalid&&this.interacted}constructor(s,l){this._stepper=s,this.interacted=!1,this.interactedStream=new u.vpe,this._editable=!0,this._optional=!1,this._completedOverride=null,this._customError=null,this._stepperOptions=l||{},this._displayDefaultIndicatorType=!1!==this._stepperOptions.displayDefaultIndicatorType}select(){this._stepper.selected=this}reset(){this.interacted=!1,null!=this._completedOverride&&(this._completedOverride=!1),null!=this._customError&&(this._customError=!1),this.stepControl&&this.stepControl.reset()}ngOnChanges(){this._stepper._stateChanged()}_markAsInteracted(){this.interacted||(this.interacted=!0,this.interactedStream.emit(this))}_showError(){return this._stepperOptions.showError??null!=this._customError}}return d.\u0275fac=function(s){return new(s||d)(u.Y36((0,u.Gpc)(()=>T)),u.Y36(b,8))},d.\u0275cmp=u.Xpm({type:d,selectors:[["cdk-step"]],contentQueries:function(s,l,g){if(1&s&&u.Suo(g,h,5),2&s){let v;u.iGM(v=u.CRH())&&(l.stepLabel=v.first)}},viewQuery:function(s,l){if(1&s&&u.Gf(u.Rgc,7),2&s){let g;u.iGM(g=u.CRH())&&(l.content=g.first)}},inputs:{stepControl:"stepControl",label:"label",errorMessage:"errorMessage",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],state:"state",editable:"editable",optional:"optional",completed:"completed",hasError:"hasError"},outputs:{interactedStream:"interacted"},exportAs:["cdkStep"],features:[u.TTD],ngContentSelectors:p,decls:1,vars:0,template:function(s,l){1&s&&(u.F$t(),u.YNc(0,G,1,0,"ng-template"))},encapsulation:2,changeDetection:0}),d})(),T=(()=>{class d{get linear(){return this._linear}set linear(s){this._linear=(0,E.Ig)(s)}get selectedIndex(){return this._selectedIndex}set selectedIndex(s){const l=(0,E.su)(s);this.steps&&this._steps?(this._isValidIndex(l),this.selected?._markAsInteracted(),this._selectedIndex!==l&&!this._anyControlsInvalidOrPending(l)&&(l>=this._selectedIndex||this.steps.toArray()[l].editable)&&this._updateSelectedItemIndex(l)):this._selectedIndex=l}get selected(){return this.steps?this.steps.toArray()[this.selectedIndex]:void 0}set selected(s){this.selectedIndex=s&&this.steps?this.steps.toArray().indexOf(s):-1}get orientation(){return this._orientation}set orientation(s){this._orientation=s,this._keyManager&&this._keyManager.withVerticalOrientation("vertical"===s)}constructor(s,l,g){this._dir=s,this._changeDetectorRef=l,this._elementRef=g,this._destroyed=new S.xQ,this.steps=new u.n_E,this._sortedHeaders=new u.n_E,this._linear=!1,this._selectedIndex=0,this.selectionChange=new u.vpe,this.selectedIndexChange=new u.vpe,this._orientation="horizontal",this._groupId=c++}ngAfterContentInit(){this._steps.changes.pipe((0,w.O)(this._steps),(0,O.R)(this._destroyed)).subscribe(s=>{this.steps.reset(s.filter(l=>l._stepper===this)),this.steps.notifyOnChanges()})}ngAfterViewInit(){this._stepHeader.changes.pipe((0,w.O)(this._stepHeader),(0,O.R)(this._destroyed)).subscribe(s=>{this._sortedHeaders.reset(s.toArray().sort((l,g)=>l._elementRef.nativeElement.compareDocumentPosition(g._elementRef.nativeElement)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)),this._sortedHeaders.notifyOnChanges()}),this._keyManager=new r.Em(this._sortedHeaders).withWrap().withHomeAndEnd().withVerticalOrientation("vertical"===this._orientation),(this._dir?this._dir.change:(0,A.of)()).pipe((0,w.O)(this._layoutDirection()),(0,O.R)(this._destroyed)).subscribe(s=>this._keyManager.withHorizontalOrientation(s)),this._keyManager.updateActiveItem(this._selectedIndex),this.steps.changes.subscribe(()=>{this.selected||(this._selectedIndex=Math.max(this._selectedIndex-1,0))}),this._isValidIndex(this._selectedIndex)||(this._selectedIndex=0)}ngOnDestroy(){this._keyManager?.destroy(),this.steps.destroy(),this._sortedHeaders.destroy(),this._destroyed.next(),this._destroyed.complete()}next(){this.selectedIndex=Math.min(this._selectedIndex+1,this.steps.length-1)}previous(){this.selectedIndex=Math.max(this._selectedIndex-1,0)}reset(){this._updateSelectedItemIndex(0),this.steps.forEach(s=>s.reset()),this._stateChanged()}_getStepLabelId(s){return`cdk-step-label-${this._groupId}-${s}`}_getStepContentId(s){return`cdk-step-content-${this._groupId}-${s}`}_stateChanged(){this._changeDetectorRef.markForCheck()}_getAnimationDirection(s){const l=s-this._selectedIndex;return l<0?"rtl"===this._layoutDirection()?"next":"previous":l>0?"rtl"===this._layoutDirection()?"previous":"next":"current"}_getIndicatorType(s,l="number"){const g=this.steps.toArray()[s],v=this._isCurrentStep(s);return g._displayDefaultIndicatorType?this._getDefaultIndicatorLogic(g,v):this._getGuidelineLogic(g,v,l)}_getDefaultIndicatorLogic(s,l){return s._showError()&&s.hasError&&!l?"error":!s.completed||l?"number":s.editable?"edit":"done"}_getGuidelineLogic(s,l,g="number"){return s._showError()&&s.hasError&&!l?"error":s.completed&&!l?"done":s.completed&&l?g:s.editable&&l?"edit":g}_isCurrentStep(s){return this._selectedIndex===s}_getFocusIndex(){return this._keyManager?this._keyManager.activeItemIndex:this._selectedIndex}_updateSelectedItemIndex(s){const l=this.steps.toArray();this.selectionChange.emit({selectedIndex:s,previouslySelectedIndex:this._selectedIndex,selectedStep:l[s],previouslySelectedStep:l[this._selectedIndex]}),this._containsFocus()?this._keyManager.setActiveItem(s):this._keyManager.updateActiveItem(s),this._selectedIndex=s,this.selectedIndexChange.emit(this._selectedIndex),this._stateChanged()}_onKeydown(s){const l=(0,M.Vb)(s),g=s.keyCode,v=this._keyManager;null==v.activeItemIndex||l||g!==M.L_&&g!==M.K5?v.setFocusOrigin("keyboard").onKeydown(s):(this.selectedIndex=v.activeItemIndex,s.preventDefault())}_anyControlsInvalidOrPending(s){return!!(this._linear&&s>=0)&&this.steps.toArray().slice(0,s).some(l=>{const g=l.stepControl;return(g?g.invalid||g.pending||!l.interacted:!l.completed)&&!l.optional&&!l._completedOverride})}_layoutDirection(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}_containsFocus(){const s=this._elementRef.nativeElement,l=(0,B.ht)();return s===l||s.contains(l)}_isValidIndex(s){return s>-1&&(!this.steps||s<this.steps.length)}}return d.\u0275fac=function(s){return new(s||d)(u.Y36(C.Is,8),u.Y36(u.sBO),u.Y36(u.SBq))},d.\u0275dir=u.lG2({type:d,selectors:[["","cdkStepper",""]],contentQueries:function(s,l,g){if(1&s&&(u.Suo(g,$,5),u.Suo(g,_,5)),2&s){let v;u.iGM(v=u.CRH())&&(l._steps=v),u.iGM(v=u.CRH())&&(l._stepHeader=v)}},inputs:{linear:"linear",selectedIndex:"selectedIndex",selected:"selected",orientation:"orientation"},outputs:{selectionChange:"selectionChange",selectedIndexChange:"selectedIndexChange"},exportAs:["cdkStepper"]}),d})(),z=(()=>{class d{constructor(s){this._stepper=s,this.type="submit"}}return d.\u0275fac=function(s){return new(s||d)(u.Y36(T))},d.\u0275dir=u.lG2({type:d,selectors:[["button","cdkStepperNext",""]],hostVars:1,hostBindings:function(s,l){1&s&&u.NdJ("click",function(){return l._stepper.next()}),2&s&&u.Ikx("type",l.type)},inputs:{type:"type"}}),d})(),Z=(()=>{class d{constructor(s){this._stepper=s,this.type="button"}}return d.\u0275fac=function(s){return new(s||d)(u.Y36(T))},d.\u0275dir=u.lG2({type:d,selectors:[["button","cdkStepperPrevious",""]],hostVars:1,hostBindings:function(s,l){1&s&&u.NdJ("click",function(){return l._stepper.previous()}),2&s&&u.Ikx("type",l.type)},inputs:{type:"type"}}),d})(),J=(()=>{class d{}return d.\u0275fac=function(s){return new(s||d)},d.\u0275mod=u.oAB({type:d}),d.\u0275inj=u.cJS({imports:[C.vT]}),d})()},4592:(Ie,k,m)=>{m.r(k),m.d(k,{CdkCustomStepperWithoutFormExample:()=>A,CdkLinearStepperWithFormExample:()=>O,CustomLinearStepper:()=>G,CustomStepper:()=>w});var r=m(5879),C=m(1657),E=m(6814),M=m(6223);function u(p,_){if(1&p){const h=r.EpF();r.TgZ(0,"button",6),r.NdJ("click",function(){const f=r.CHM(h).index,b=r.oxw();return r.KtG(b.selectStepByIndex(f))}),r._uU(1),r.qZA()}if(2&p){const h=_.index,c=r.oxw();r.ekj("example-active",c.selectedIndex===h),r.xp6(1),r.hij(" Step ",h+1," ")}}function B(p,_){if(1&p){const h=r.EpF();r.TgZ(0,"button",6),r.NdJ("click",function(){const f=r.CHM(h).index,b=r.oxw();return r.KtG(b.selectStepByIndex(f))}),r._uU(1),r.qZA()}if(2&p){const h=_.index,c=r.oxw();r.ekj("example-active",c.selectedIndex===h),r.xp6(1),r.hij(" Step ",h+1," ")}}let A=(()=>{class p{}return p.\u0275fac=function(h){return new(h||p)},p.\u0275cmp=r.Xpm({type:p,selectors:[["cdk-custom-stepper-without-form-example"]],standalone:!0,features:[r.jDz],decls:7,vars:0,template:function(h,c){1&h&&(r.TgZ(0,"example-custom-stepper")(1,"cdk-step")(2,"p"),r._uU(3,'This is any content of "Step 1"'),r.qZA()(),r.TgZ(4,"cdk-step")(5,"p"),r._uU(6,'This is any content of "Step 2"'),r.qZA()()())},dependencies:function(){return[w,C.U5,C.be]}}),p})(),w=(()=>{class p extends C.B8{selectStepByIndex(h){this.selectedIndex=h}}return p.\u0275fac=function(){let _;return function(c){return(_||(_=r.n5z(p)))(c||p)}}(),p.\u0275cmp=r.Xpm({type:p,selectors:[["example-custom-stepper"]],standalone:!0,features:[r._Bn([{provide:C.B8,useExisting:p}]),r.qOj,r.jDz],decls:11,vars:4,consts:[[1,"example-container"],[3,"ngTemplateOutlet"],[1,"example-step-navigation-bar"],["cdkStepperPrevious","",1,"example-nav-button"],["class","example-step",3,"example-active","click",4,"ngFor","ngForOf"],["cdkStepperNext","",1,"example-nav-button"],[1,"example-step",3,"click"]],template:function(h,c){1&h&&(r.TgZ(0,"section",0)(1,"header")(2,"h2"),r._uU(3),r.qZA()(),r._UZ(4,"div",1),r.TgZ(5,"footer",2)(6,"button",3),r._uU(7,"\u2190"),r.qZA(),r.YNc(8,u,2,3,"button",4),r.TgZ(9,"button",5),r._uU(10,"\u2192"),r.qZA()()()),2&h&&(r.xp6(3),r.AsE("Step ",c.selectedIndex+1,"/",c.steps.length,""),r.xp6(1),r.Q6J("ngTemplateOutlet",c.selected?c.selected.content:null),r.xp6(4),r.Q6J("ngForOf",c.steps))},dependencies:[E.tP,C.U5,C.st,C.po,E.ax],styles:[".example-container[_ngcontent-%COMP%] {\n border: 1px solid;\n padding: 10px;\n margin: 10px;\n}\n\n.example-step-navigation-bar[_ngcontent-%COMP%] {\n display: flex;\n justify-content: flex-start;\n margin-top: 10px;\n}\n\n.example-step[_ngcontent-%COMP%] {\n background: transparent;\n border: 0;\n margin: 0 10px;\n padding: 10px;\n color: inherit;\n}\n\n.example-step.example-active[_ngcontent-%COMP%] {\n border-bottom: 1px solid;\n font-weight: 600;\n}\n\n.example-nav-button[_ngcontent-%COMP%] {\n background: transparent;\n border: 0;\n color: inherit;\n}"]}),p})(),O=(()=>{class p{constructor(h){this._formBuilder=h,this.isLinear=!0,this.firstFormGroup=this._formBuilder.group({firstControl:["",M.kI.required]}),this.secondFormGroup=this._formBuilder.group({secondControl:["",M.kI.required]})}toggleLinearity(){this.isLinear=!this.isLinear}}return p.\u0275fac=function(h){return new(h||p)(r.Y36(M.qu))},p.\u0275cmp=r.Xpm({type:p,selectors:[["cdk-linear-stepper-with-form-example"]],standalone:!0,features:[r.jDz],decls:13,vars:6,consts:[[3,"linear"],[3,"stepControl"],["for","stepOneInput"],[3,"formGroup"],["placeholder","Input","formControlName","firstControl","id","stepOneInput","required",""],["for","stepTwoInput"],["placeholder","Input","formControlName","secondControl","id","stepTwoInput","required",""],[1,"example-toggle-linear-button",3,"click"]],template:function(h,c){1&h&&(r.TgZ(0,"example-custom-linear-stepper",0)(1,"cdk-step",1)(2,"label",2),r._uU(3,"Step 1 input"),r.qZA(),r.TgZ(4,"form",3),r._UZ(5,"input",4),r.qZA()(),r.TgZ(6,"cdk-step",1)(7,"label",5),r._uU(8,"Step 2 input"),r.qZA(),r.TgZ(9,"form",3),r._UZ(10,"input",6),r.qZA()()(),r.TgZ(11,"button",7),r.NdJ("click",function(){return c.toggleLinearity()}),r._uU(12),r.qZA()),2&h&&(r.Q6J("linear",c.isLinear),r.xp6(1),r.Q6J("stepControl",c.firstFormGroup),r.xp6(3),r.Q6J("formGroup",c.firstFormGroup),r.xp6(2),r.Q6J("stepControl",c.secondFormGroup),r.xp6(3),r.Q6J("formGroup",c.secondFormGroup),r.xp6(3),r.hij(" ",c.isLinear?"Disable linear mode":"Enable linear mode","\n"))},dependencies:function(){return[G,C.U5,C.be,M.u5,M._Y,M.Fj,M.JJ,M.JL,M.Q7,M.UX,M.sg,M.u]},styles:[".example-toggle-linear-button[_ngcontent-%COMP%] {\n margin-left: 10px;\n}"]}),p})(),G=(()=>{class p extends C.B8{selectStepByIndex(h){this.selectedIndex=h}}return p.\u0275fac=function(){let _;return function(c){return(_||(_=r.n5z(p)))(c||p)}}(),p.\u0275cmp=r.Xpm({type:p,selectors:[["example-custom-linear-stepper"]],standalone:!0,features:[r._Bn([{provide:C.B8,useExisting:p}]),r.qOj,r.jDz],decls:11,vars:4,consts:[[1,"example-container"],[3,"ngTemplateOutlet"],[1,"example-step-navigation-bar"],["cdkStepperPrevious","",1,"example-nav-button"],["class","example-step",3,"example-active","click",4,"ngFor","ngForOf"],["cdkStepperNext","",1,"example-nav-button"],[1,"example-step",3,"click"]],template:function(h,c){1&h&&(r.TgZ(0,"section",0)(1,"header")(2,"h2"),r._uU(3),r.qZA()(),r._UZ(4,"div",1),r.TgZ(5,"footer",2)(6,"button",3),r._uU(7,"\u2190"),r.qZA(),r.YNc(8,B,2,3,"button",4),r.TgZ(9,"button",5),r._uU(10,"\u2192"),r.qZA()()()),2&h&&(r.xp6(3),r.AsE("Step ",c.selectedIndex+1,"/",c.steps.length,""),r.xp6(1),r.Q6J("ngTemplateOutlet",c.selected?c.selected.content:null),r.xp6(4),r.Q6J("ngForOf",c.steps))},dependencies:[E.tP,C.U5,C.st,C.po,E.ax],styles:[".example-container[_ngcontent-%COMP%] {\n border: 1px solid;\n padding: 10px;\n margin: 10px;\n}\n\n.example-step-navigation-bar[_ngcontent-%COMP%] {\n display: flex;\n justify-content: flex-start;\n margin-top: 10px;\n}\n\n.example-step[_ngcontent-%COMP%] {\n background: transparent;\n border: 0;\n margin: 0 10px;\n padding: 10px;\n color: inherit;\n}\n\n.example-step.example-active[_ngcontent-%COMP%] {\n border-bottom: 1px solid;\n font-weight: 600;\n}\n\n.example-nav-button[_ngcontent-%COMP%] {\n background: transparent;\n border: 0;\n color: inherit;\n}"]}),p})()},6223:(Ie,k,m)=>{m.d(k,{Cf:()=>f,EJ:()=>le,F:()=>se,Fj:()=>h,JJ:()=>ze,JL:()=>Ze,JU:()=>A,Kr:()=>gt,NI:()=>H,On:()=>Me,Q7:()=>ue,UX:()=>gn,Wl:()=>O,YN:()=>pt,Zs:()=>we,_Y:()=>lt,a5:()=>x,cw:()=>U,eT:()=>Ae,gN:()=>D,kI:()=>T,oH:()=>Ee,qu:()=>pn,sg:()=>ae,u:()=>xe,u5:()=>fn,wV:()=>De});var r=m(5879),C=m(6814),E=m(5253),M=m(7504),u=m(6124);let B=(()=>{class n{constructor(e,i){this._renderer=e,this._elementRef=i,this.onChange=o=>{},this.onTouched=()=>{}}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}}return n.\u0275fac=function(e){return new(e||n)(r.Y36(r.Qsj),r.Y36(r.SBq))},n.\u0275dir=r.lG2({type:n}),n})(),S=(()=>{class n extends B{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=r.n5z(n)))(i||n)}}(),n.\u0275dir=r.lG2({type:n,features:[r.qOj]}),n})();const A=new r.OlP("NgValueAccessor"),w={provide:A,useExisting:(0,r.Gpc)(()=>O),multi:!0};let O=(()=>{class n extends S{writeValue(e){this.setProperty("checked",e)}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=r.n5z(n)))(i||n)}}(),n.\u0275dir=r.lG2({type:n,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(e,i){1&e&&r.NdJ("change",function(a){return i.onChange(a.target.checked)})("blur",function(){return i.onTouched()})},features:[r._Bn([w]),r.qOj]}),n})();const G={provide:A,useExisting:(0,r.Gpc)(()=>h),multi:!0},_=new r.OlP("CompositionEventMode");let h=(()=>{class n extends B{constructor(e,i,o){super(e,i),this._compositionMode=o,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function p(){const n=(0,C.q)()?(0,C.q)().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}())}writeValue(e){this.setProperty("value",e??"")}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}}return n.\u0275fac=function(e){return new(e||n)(r.Y36(r.Qsj),r.Y36(r.SBq),r.Y36(_,8))},n.\u0275dir=r.lG2({type:n,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(e,i){1&e&&r.NdJ("input",function(a){return i._handleInput(a.target.value)})("blur",function(){return i.onTouched()})("compositionstart",function(){return i._compositionStart()})("compositionend",function(a){return i._compositionEnd(a.target.value)})},features:[r._Bn([G]),r.qOj]}),n})();function c(n){return null==n||("string"==typeof n||Array.isArray(n))&&0===n.length}function P(n){return null!=n&&"number"==typeof n.length}const f=new r.OlP("NgValidators"),b=new r.OlP("NgAsyncValidators"),$=/^(?=.{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])?)*$/;class T{static min(t){return function z(n){return t=>{if(c(t.value)||c(n))return null;const e=parseFloat(t.value);return!isNaN(e)&&e<n?{min:{min:n,actual:t.value}}:null}}(t)}static max(t){return function Z(n){return t=>{if(c(t.value)||c(n))return null;const e=parseFloat(t.value);return!isNaN(e)&&e>n?{max:{max:n,actual:t.value}}:null}}(t)}static required(t){return J(t)}static requiredTrue(t){return d(t)}static email(t){return function y(n){return c(n.value)||$.test(n.value)?null:{email:!0}}(t)}static minLength(t){return function s(n){return t=>c(t.value)||!P(t.value)?null:t.value.length<n?{minlength:{requiredLength:n,actualLength:t.value.length}}:null}(t)}static maxLength(t){return function l(n){return t=>P(t.value)&&t.value.length>n?{maxlength:{requiredLength:n,actualLength:t.value.length}}:null}(t)}static pattern(t){return function g(n){if(!n)return v;let t,e;return"string"==typeof n?(e="","^"!==n.charAt(0)&&(e+="^"),e+=n,"$"!==n.charAt(n.length-1)&&(e+="$"),t=new RegExp(e)):(e=n.toString(),t=n),i=>{if(c(i.value))return null;const o=i.value;return t.test(o)?null:{pattern:{requiredPattern:e,actualValue:o}}}}(t)}static nullValidator(t){return null}static compose(t){return Re(t)}static composeAsync(t){return Ue(t)}}function J(n){return c(n.value)?{required:!0}:null}function d(n){return!0===n.value?null:{required:!0}}function v(n){return null}function ke(n){return null!=n}function Be(n){return(0,r.QGY)(n)?(0,E.D)(n):n}function Ge(n){let t={};return n.forEach(e=>{t=null!=e?{...t,...e}:t}),0===Object.keys(t).length?null:t}function Pe(n,t){return t.map(e=>e(n))}function Te(n){return n.map(t=>function St(n){return!n.validate}(t)?t:e=>t.validate(e))}function Re(n){if(!n)return null;const t=n.filter(ke);return 0==t.length?null:function(e){return Ge(Pe(e,t))}}function ce(n){return null!=n?Re(Te(n)):null}function Ue(n){if(!n)return null;const t=n.filter(ke);return 0==t.length?null:function(e){const i=Pe(e,t).map(Be);return(0,M.D)(i).pipe((0,u.U)(Ge))}}function he(n){return null!=n?Ue(Te(n)):null}function He(n,t){return null===n?[t]:Array.isArray(n)?[...n,t]:[n,t]}function Le(n){return n._rawValidators}function je(n){return n._rawAsyncValidators}function pe(n){return n?Array.isArray(n)?n:[n]:[]}function K(n,t){return Array.isArray(n)?n.includes(t):n===t}function We(n,t){const e=pe(t);return pe(n).forEach(o=>{K(e,o)||e.push(o)}),e}function qe(n,t){return pe(t).filter(e=>!K(n,e))}class Ye{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=ce(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=he(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t=void 0){this.control&&this.control.reset(t)}hasError(t,e){return!!this.control&&this.control.hasError(t,e)}getError(t,e){return this.control?this.control.getError(t,e):null}}class D extends Ye{get formDirective(){return null}get path(){return null}}class x extends Ye{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class $e{constructor(t){this._cd=t}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}}let ze=(()=>{class n extends $e{constructor(e){super(e)}}return n.\u0275fac=function(e){return new(e||n)(r.Y36(x,2))},n.\u0275dir=r.lG2({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,i){2&e&&r.ekj("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)},features:[r.qOj]}),n})(),Ze=(()=>{class n extends $e{constructor(e){super(e)}}return n.\u0275fac=function(e){return new(e||n)(r.Y36(D,10))},n.\u0275dir=r.lG2({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,i){2&e&&r.ekj("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)("ng-submitted",i.isSubmitted)},features:[r.qOj]}),n})();const L="VALID",X="INVALID",R="PENDING",j="DISABLED";function me(n){return(ee(n)?n.validators:n)||null}function _e(n,t){return(ee(t)?t.asyncValidators:n)||null}function ee(n){return null!=n&&!Array.isArray(n)&&"object"==typeof n}function Ke(n,t,e){const i=n.controls;if(!(t?Object.keys(i):i).length)throw new r.vHH(1e3,"");if(!i[e])throw new r.vHH(1001,"")}function Qe(n,t,e){n._forEachChild((i,o)=>{if(void 0===e[o])throw new r.vHH(1002,"")})}class te{constructor(t,e){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(t),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get valid(){return this.status===L}get invalid(){return this.status===X}get pending(){return this.status==R}get disabled(){return this.status===j}get enabled(){return this.status!==j}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t)}setAsyncValidators(t){this._assignAsyncValidators(t)}addValidators(t){this.setValidators(We(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(We(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(qe(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(qe(t,this._rawAsyncValidators))}hasValidator(t){return K(this._rawValidators,t)}hasAsyncValidator(t){return K(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){this.touched=!0,this._parent&&!t.onlySelf&&this._parent.markAsTouched(t)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(t=>t.markAllAsTouched())}markAsUntouched(t={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(e=>{e.markAsUntouched({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}markAsDirty(t={}){this.pristine=!1,this._parent&&!t.onlySelf&&this._parent.markAsDirty(t)}markAsPristine(t={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(e=>{e.markAsPristine({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}markAsPending(t={}){this.status=R,!1!==t.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!t.onlySelf&&this._parent.markAsPending(t)}disable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status=j,this.errors=null,this._forEachChild(i=>{i.disable({...t,onlySelf:!0})}),this._updateValue(),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...t,skipPristineCheck:e}),this._onDisabledChange.forEach(i=>i(!0))}enable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status=L,this._forEachChild(i=>{i.enable({...t,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors({...t,skipPristineCheck:e}),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(t){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===L||this.status===R)&&this._runAsyncValidator(t.emitEvent)),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(t)}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?j:L}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=R,this._hasOwnPendingAsyncValidator=!0;const e=Be(this.asyncValidator(this));this._asyncValidationSubscription=e.subscribe(i=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(i,{emitEvent:t})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(!1!==e.emitEvent)}get(t){let e=t;return null==e||(Array.isArray(e)||(e=e.split(".")),0===e.length)?null:e.reduce((i,o)=>i&&i._find(o),this)}getError(t,e){const i=e?this.get(e):this;return i&&i.errors?i.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(t)}_initObservables(){this.valueChanges=new r.vpe,this.statusChanges=new r.vpe}_calculateStatus(){return this._allControlsDisabled()?j:this.errors?X:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(R)?R:this._anyControlsHaveStatus(X)?X:L}_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={}){this.pristine=!this._anyControlsDirty(),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}_updateTouched(t={}){this.touched=this._anyControlsTouched(),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){ee(t)&&null!=t.updateOn&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){return!t&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=function wt(n){return Array.isArray(n)?ce(n):n||null}(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=function Nt(n){return Array.isArray(n)?he(n):n||null}(this._rawAsyncValidators)}}class U extends te{constructor(t,e,i){super(me(e),_e(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,i={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(t,e={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(t,e,i={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){Qe(this,0,t),Object.keys(t).forEach(i=>{Ke(this,!0,i),this.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){null!=t&&(Object.keys(t).forEach(i=>{const o=this.controls[i];o&&o.patchValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((i,o)=>{i.reset(t[o],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,i)=>(t[i]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(e,i)=>!!i._syncPendingControls()||e);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{const 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(const[e,i]of Object.entries(this.controls))if(this.contains(e)&&t(i))return!0;return!1}_reduceValue(){return this._reduceChildren({},(e,i,o)=>((i.enabled||this.disabled)&&(e[o]=i.value),e))}_reduceChildren(t,e){let i=t;return this._forEachChild((o,a)=>{i=e(i,o,a)}),i}_allControlsDisabled(){for(const t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(t){return this.controls.hasOwnProperty(t)?this.controls[t]:null}}class Xe extends U{}const N=new r.OlP("CallSetDisabledState",{providedIn:"root",factory:()=>W}),W="always";function ne(n,t){return[...t.path,n]}function q(n,t,e=W){ye(n,t),t.valueAccessor.writeValue(n.value),(n.disabled||"always"===e)&&t.valueAccessor.setDisabledState?.(n.disabled),function kt(n,t){t.valueAccessor.registerOnChange(e=>{n._pendingValue=e,n._pendingChange=!0,n._pendingDirty=!0,"change"===n.updateOn&&et(n,t)})}(n,t),function Gt(n,t){const e=(i,o)=>{t.valueAccessor.writeValue(i),o&&t.viewToModelUpdate(i)};n.registerOnChange(e),t._registerOnDestroy(()=>{n._unregisterOnChange(e)})}(n,t),function Bt(n,t){t.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,"blur"===n.updateOn&&n._pendingChange&&et(n,t),"submit"!==n.updateOn&&n.markAsTouched()})}(n,t),function It(n,t){if(t.valueAccessor.setDisabledState){const e=i=>{t.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(e),t._registerOnDestroy(()=>{n._unregisterOnDisabledChange(e)})}}(n,t)}function re(n,t,e=!0){const i=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(i),t.valueAccessor.registerOnTouched(i)),oe(n,t),n&&(t._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}))}function ie(n,t){n.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function ye(n,t){const e=Le(n);null!==t.validator?n.setValidators(He(e,t.validator)):"function"==typeof e&&n.setValidators([e]);const i=je(n);null!==t.asyncValidator?n.setAsyncValidators(He(i,t.asyncValidator)):"function"==typeof i&&n.setAsyncValidators([i]);const o=()=>n.updateValueAndValidity();ie(t._rawValidators,o),ie(t._rawAsyncValidators,o)}function oe(n,t){let e=!1;if(null!==n){if(null!==t.validator){const o=Le(n);if(Array.isArray(o)&&o.length>0){const a=o.filter(V=>V!==t.validator);a.length!==o.length&&(e=!0,n.setValidators(a))}}if(null!==t.asyncValidator){const o=je(n);if(Array.isArray(o)&&o.length>0){const a=o.filter(V=>V!==t.asyncValidator);a.length!==o.length&&(e=!0,n.setAsyncValidators(a))}}}const i=()=>{};return ie(t._rawValidators,i),ie(t._rawAsyncValidators,i),e}function et(n,t){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function tt(n,t){ye(n,t)}function Ce(n,t){if(!n.hasOwnProperty("model"))return!1;const e=n.model;return!!e.isFirstChange()||!Object.is(t,e.currentValue)}function nt(n,t){n._syncPendingControls(),t.forEach(e=>{const i=e.control;"submit"===i.updateOn&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}function Ve(n,t){if(!t)return null;let e,i,o;return Array.isArray(t),t.forEach(a=>{a.constructor===h?e=a:function Rt(n){return Object.getPrototypeOf(n.constructor)===S}(a)?i=a:o=a}),o||i||e||null}const Ht={provide:D,useExisting:(0,r.Gpc)(()=>se)},Y=(()=>Promise.resolve())();let se=(()=>{class n extends D{constructor(e,i,o){super(),this.callSetDisabledState=o,this.submitted=!1,this._directives=new Set,this.ngSubmit=new r.vpe,this.form=new U({},ce(e),he(i))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){Y.then(()=>{const i=this._findContainer(e.path);e.control=i.registerControl(e.name,e.control),q(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){Y.then(()=>{const i=this._findContainer(e.path);i&&i.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){Y.then(()=>{const i=this._findContainer(e.path),o=new U({});tt(o,e),i.registerControl(e.name,o),o.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){Y.then(()=>{const i=this._findContainer(e.path);i&&i.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,i){Y.then(()=>{this.form.get(e.path).setValue(i)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submitted=!0,nt(this.form,this._directives),this.ngSubmit.emit(e),"dialog"===e?.target?.method}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}}return n.\u0275fac=function(e){return new(e||n)(r.Y36(f,10),r.Y36(b,10),r.Y36(N,8))},n.\u0275dir=r.lG2({type:n,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,i){1&e&&r.NdJ("submit",function(a){return i.onSubmit(a)})("reset",function(){return i.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[r._Bn([Ht]),r.qOj]}),n})();function rt(n,t){const e=n.indexOf(t);e>-1&&n.splice(e,1)}function it(n){return"object"==typeof n&&null!==n&&2===Object.keys(n).length&&"value"in n&&"disabled"in n}const H=class extends te{constructor(t=null,e,i){super(me(e),_e(i,e)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),ee(e)&&(e.nonNullable||e.initialValueIsDefault)&&(this.defaultValue=it(t)?t.value:t)}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&!1!==e.emitModelToViewChange&&this._onChange.forEach(i=>i(this.value,!1!==e.emitViewToModelChange)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=this.defaultValue,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){rt(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){rt(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(t){it(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}},Wt={provide:x,useExisting:(0,r.Gpc)(()=>Me)},at=(()=>Promise.resolve())();let Me=(()=>{class n extends x{constructor(e,i,o,a,V,F){super(),this._changeDetectorRef=V,this.callSetDisabledState=F,this.control=new H,this._registered=!1,this.name="",this.update=new r.vpe,this._parent=e,this._setValidators(i),this._setAsyncValidators(o),this.valueAccessor=Ve(0,a)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){const i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),Ce(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){q(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}_updateValue(e){at.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){const i=e.isDisabled.currentValue,o=0!==i&&(0,r.VuI)(i);at.then(()=>{o&&!this.control.disabled?this.control.disable():!o&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?ne(e,this._parent):[e]}}return n.\u0275fac=function(e){return new(e||n)(r.Y36(D,9),r.Y36(f,10),r.Y36(b,10),r.Y36(A,10),r.Y36(r.sBO,8),r.Y36(N,8))},n.\u0275dir=r.lG2({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[r._Bn([Wt]),r.qOj,r.TTD]}),n})(),lt=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=r.lG2({type:n,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),n})();const qt={provide:A,useExisting:(0,r.Gpc)(()=>De),multi:!0};let De=(()=>{class n extends S{writeValue(e){this.setProperty("value",e??"")}registerOnChange(e){this.onChange=i=>{e(""==i?null:parseFloat(i))}}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=r.n5z(n)))(i||n)}}(),n.\u0275dir=r.lG2({type:n,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,i){1&e&&r.NdJ("input",function(a){return i.onChange(a.target.value)})("blur",function(){return i.onTouched()})},features:[r._Bn([qt]),r.qOj]}),n})(),ut=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=r.oAB({type:n}),n.\u0275inj=r.cJS({}),n})();const zt={provide:A,useExisting:(0,r.Gpc)(()=>Ae),multi:!0};let Ae=(()=>{class n extends S{writeValue(e){this.setProperty("value",parseFloat(e))}registerOnChange(e){this.onChange=i=>{e(""==i?null:parseFloat(i))}}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=r.n5z(n)))(i||n)}}(),n.\u0275dir=r.lG2({type:n,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(e,i){1&e&&r.NdJ("change",function(a){return i.onChange(a.target.value)})("input",function(a){return i.onChange(a.target.value)})("blur",function(){return i.onTouched()})},features:[r._Bn([zt]),r.qOj]}),n})();const be=new r.OlP("NgModelWithFormControlWarning"),Zt={provide:x,useExisting:(0,r.Gpc)(()=>Ee)};let Ee=(()=>{class n extends x{set isDisabled(e){}constructor(e,i,o,a,V){super(),this._ngModelWarningConfig=a,this.callSetDisabledState=V,this.update=new r.vpe,this._ngModelWarningSent=!1,this._setValidators(e),this._setAsyncValidators(i),this.valueAccessor=Ve(0,o)}ngOnChanges(e){if(this._isControlChanged(e)){const i=e.form.previousValue;i&&re(i,this,!1),q(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}Ce(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&re(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_isControlChanged(e){return e.hasOwnProperty("form")}}return n._ngModelWarningSentOnce=!1,n.\u0275fac=function(e){return new(e||n)(r.Y36(f,10),r.Y36(b,10),r.Y36(A,10),r.Y36(be,8),r.Y36(N,8))},n.\u0275dir=r.lG2({type:n,selectors:[["","formControl",""]],inputs:{form:["formControl","form"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],features:[r._Bn([Zt]),r.qOj,r.TTD]}),n})();const Jt={provide:D,useExisting:(0,r.Gpc)(()=>ae)};let ae=(()=>{class n extends D{constructor(e,i,o){super(),this.callSetDisabledState=o,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new r.vpe,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(oe(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){const i=this.form.get(e.path);return q(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){re(e.control||null,e,!1),function Ut(n,t){const e=n.indexOf(t);e>-1&&n.splice(e,1)}(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,i){this.form.get(e.path).setValue(i)}onSubmit(e){return this.submitted=!0,nt(this.form,this.directives),this.ngSubmit.emit(e),"dialog"===e?.target?.method}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this.submitted=!1}_updateDomValue(){this.directives.forEach(e=>{const i=e.control,o=this.form.get(e.path);i!==o&&(re(i||null,e),(n=>n instanceof H)(o)&&(q(o,e,this.callSetDisabledState),e.control=o))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const i=this.form.get(e.path);tt(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const i=this.form.get(e.path);i&&function Pt(n,t){return oe(n,t)}(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){ye(this.form,this),this._oldForm&&oe(this._oldForm,this)}_checkFormPresent(){}}return n.\u0275fac=function(e){return new(e||n)(r.Y36(f,10),r.Y36(b,10),r.Y36(N,8))},n.\u0275dir=r.lG2({type:n,selectors:[["","formGroup",""]],hostBindings:function(e,i){1&e&&r.NdJ("submit",function(a){return i.onSubmit(a)})("reset",function(){return i.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[r._Bn([Jt]),r.qOj,r.TTD]}),n})();const Xt={provide:x,useExisting:(0,r.Gpc)(()=>xe)};let xe=(()=>{class n extends x{set isDisabled(e){}constructor(e,i,o,a,V){super(),this._ngModelWarningConfig=V,this._added=!1,this.name=null,this.update=new r.vpe,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(i),this._setAsyncValidators(o),this.valueAccessor=Ve(0,a)}ngOnChanges(e){this._added||this._setUpControl(),Ce(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return ne(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}}return n._ngModelWarningSentOnce=!1,n.\u0275fac=function(e){return new(e||n)(r.Y36(D,13),r.Y36(f,10),r.Y36(b,10),r.Y36(A,10),r.Y36(be,8))},n.\u0275dir=r.lG2({type:n,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[r._Bn([Xt]),r.qOj,r.TTD]}),n})();const en={provide:A,useExisting:(0,r.Gpc)(()=>le),multi:!0};function ht(n,t){return null==n?`${t}`:(t&&"object"==typeof t&&(t="Object"),`${n}: ${t}`.slice(0,50))}let le=(()=>{class n extends S{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){this.value=e;const o=ht(this._getOptionId(e),e);this.setProperty("value",o)}registerOnChange(e){this.onChange=i=>{this.value=this._getOptionValue(i),e(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(e){for(const i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i),e))return i;return null}_getOptionValue(e){const i=function tn(n){return n.split(":")[0]}(e);return this._optionMap.has(i)?this._optionMap.get(i):e}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=r.n5z(n)))(i||n)}}(),n.\u0275dir=r.lG2({type:n,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(e,i){1&e&&r.NdJ("change",function(a){return i.onChange(a.target.value)})("blur",function(){return i.onTouched()})},inputs:{compareWith:"compareWith"},features:[r._Bn([en]),r.qOj]}),n})(),pt=(()=>{class n{constructor(e,i,o){this._element=e,this._renderer=i,this._select=o,this._select&&(this.id=this._select._registerOption())}set ngValue(e){null!=this._select&&(this._select._optionMap.set(this.id,e),this._setElementValue(ht(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._setElementValue(e),this._select&&this._select.writeValue(this._select.value)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return n.\u0275fac=function(e){return new(e||n)(r.Y36(r.SBq),r.Y36(r.Qsj),r.Y36(le,9))},n.\u0275dir=r.lG2({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),n})();const nn={provide:A,useExisting:(0,r.Gpc)(()=>Fe),multi:!0};function ft(n,t){return null==n?`${t}`:("string"==typeof t&&(t=`'${t}'`),t&&"object"==typeof t&&(t="Object"),`${n}: ${t}`.slice(0,50))}let Fe=(()=>{class n extends S{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){let i;if(this.value=e,Array.isArray(e)){const o=e.map(a=>this._getOptionId(a));i=(a,V)=>{a._setSelected(o.indexOf(V.toString())>-1)}}else i=(o,a)=>{o._setSelected(!1)};this._optionMap.forEach(i)}registerOnChange(e){this.onChange=i=>{const o=[],a=i.selectedOptions;if(void 0!==a){const V=a;for(let F=0;F<V.length;F++){const Ne=this._getOptionValue(V[F].value);o.push(Ne)}}else{const V=i.options;for(let F=0;F<V.length;F++){const de=V[F];if(de.selected){const Ne=this._getOptionValue(de.value);o.push(Ne)}}}this.value=o,e(o)}}_registerOption(e){const i=(this._idCounter++).toString();return this._optionMap.set(i,e),i}_getOptionId(e){for(const i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i)._value,e))return i;return null}_getOptionValue(e){const i=function rn(n){return n.split(":")[0]}(e);return this._optionMap.has(i)?this._optionMap.get(i)._value:e}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=r.n5z(n)))(i||n)}}(),n.\u0275dir=r.lG2({type:n,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(e,i){1&e&&r.NdJ("change",function(a){return i.onChange(a.target)})("blur",function(){return i.onTouched()})},inputs:{compareWith:"compareWith"},features:[r._Bn([nn]),r.qOj]}),n})(),gt=(()=>{class n{constructor(e,i,o){this._element=e,this._renderer=i,this._select=o,this._select&&(this.id=this._select._registerOption(this))}set ngValue(e){null!=this._select&&(this._value=e,this._setElementValue(ft(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._select?(this._value=e,this._setElementValue(ft(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))}}return n.\u0275fac=function(e){return new(e||n)(r.Y36(r.SBq),r.Y36(r.Qsj),r.Y36(Fe,9))},n.\u0275dir=r.lG2({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),n})(),I=(()=>{class n{constructor(){this._validator=v}ngOnChanges(e){if(this.inputName in e){const i=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):v,this._onChange&&this._onChange()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return null!=e}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=r.lG2({type:n,features:[r.TTD]}),n})();const an={provide:f,useExisting:(0,r.Gpc)(()=>ue),multi:!0},ln={provide:f,useExisting:(0,r.Gpc)(()=>we),multi:!0};let ue=(()=>{class n extends I{constructor(){super(...arguments),this.inputName="required",this.normalizeInput=r.VuI,this.createValidator=e=>J}enabled(e){return e}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=r.n5z(n)))(i||n)}}(),n.\u0275dir=r.lG2({type:n,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(e,i){2&e&&r.uIk("required",i._enabled?"":null)},inputs:{required:"required"},features:[r._Bn([an]),r.qOj]}),n})(),we=(()=>{class n extends ue{constructor(){super(...arguments),this.createValidator=e=>d}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=r.n5z(n)))(i||n)}}(),n.\u0275dir=r.lG2({type:n,selectors:[["input","type","checkbox","required","","formControlName",""],["input","type","checkbox","required","","formControl",""],["input","type","checkbox","required","","ngModel",""]],hostVars:1,hostBindings:function(e,i){2&e&&r.uIk("required",i._enabled?"":null)},features:[r._Bn([ln]),r.qOj]}),n})(),At=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=r.oAB({type:n}),n.\u0275inj=r.cJS({imports:[ut]}),n})();class bt extends te{constructor(t,e,i){super(me(e),_e(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(t){return this.controls[this._adjustIndex(t)]}push(t,e={}){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(t,e,i={}){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(t,e={}){let i=this._adjustIndex(t);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(t,e,i={}){let o=this._adjustIndex(t);o<0&&(o=0),this.controls[o]&&this.controls[o]._registerOnCollectionChange(()=>{}),this.controls.splice(o,1),e&&(this.controls.splice(o,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){Qe(this,0,t),t.forEach((i,o)=>{Ke(this,!1,o),this.at(o).setValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){null!=t&&(t.forEach((i,o)=>{this.at(o)&&this.at(o).patchValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t=[],e={}){this._forEachChild((i,o)=>{i.reset(t[o],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(t=>t.getRawValue())}clear(t={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:t.emitEvent}))}_adjustIndex(t){return t<0?t+this.length:t}_syncPendingControls(){let t=this.controls.reduce((e,i)=>!!i._syncPendingControls()||e,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){this.controls.forEach((e,i)=>{t(e,i)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_allControlsDisabled(){for(const t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}_find(t){return this.at(t)??null}}function Et(n){return!!n&&(void 0!==n.asyncValidators||void 0!==n.validators||void 0!==n.updateOn)}let pn=(()=>{class n{constructor(){this.useNonNullable=!1}get nonNullable(){const e=new n;return e.useNonNullable=!0,e}group(e,i=null){const o=this._reduceControls(e);let a={};return Et(i)?a=i:null!==i&&(a.validators=i.validator,a.asyncValidators=i.asyncValidator),new U(o,a)}record(e,i=null){const o=this._reduceControls(e);return new Xe(o,i)}control(e,i,o){let a={};return this.useNonNullable?(Et(i)?a=i:(a.validators=i,a.asyncValidators=o),new H(e,{...a,nonNullable:!0})):new H(e,i,o)}array(e,i,o){const a=e.map(V=>this._createControl(V));return new bt(a,i,o)}_reduceControls(e){const i={};return Object.keys(e).forEach(o=>{i[o]=this._createControl(e[o])}),i}_createControl(e){return e instanceof H||e instanceof te?e:Array.isArray(e)?this.control(e[0],e.length>1?e[1]:null,e.length>2?e[2]:null):this.control(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=r.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),fn=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:N,useValue:e.callSetDisabledState??W}]}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=r.oAB({type:n}),n.\u0275inj=r.cJS({imports:[At]}),n})(),gn=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:be,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:N,useValue:e.callSetDisabledState??W}]}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=r.oAB({type:n}),n.\u0275inj=r.cJS({imports:[At]}),n})()}}]);