@duplicati/ngclient 0.0.32 → 0.0.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/{chunk-AXWWWNYP.js → chunk-2X2NVYPD.js} +1 -1
  2. package/{chunk-2J2FXCU7.js → chunk-443IB2NN.js} +1 -1
  3. package/chunk-47RGUJEZ.js +1 -0
  4. package/{chunk-ATKSFHUF.js → chunk-4TN5W4QO.js} +1 -1
  5. package/chunk-4ZWP3UTS.js +1 -0
  6. package/{chunk-CH4OZJBV.js → chunk-5XX7BU4I.js} +1 -1
  7. package/{chunk-R5JN4Q6V.js → chunk-5ZK3D2RS.js} +1 -1
  8. package/{chunk-HSUOVCAK.js → chunk-6M3MNJ52.js} +1 -1
  9. package/chunk-7EL3LGYB.js +1 -0
  10. package/chunk-7IRGYYAU.js +1 -0
  11. package/{chunk-CL3S2VV2.js → chunk-7SJHYZC5.js} +1 -1
  12. package/{chunk-LMBPK5DA.js → chunk-B3MIBKC5.js} +1 -1
  13. package/chunk-BEZGDXHL.js +1 -0
  14. package/chunk-BT2JRS3A.js +1 -0
  15. package/{chunk-CXRDIX6X.js → chunk-DE2AAZUP.js} +1 -1
  16. package/{chunk-VTXQPBKS.js → chunk-DGBBEZNN.js} +1 -1
  17. package/{chunk-XVGRR5A7.js → chunk-EHV3OZDB.js} +1 -1
  18. package/{chunk-FHAZ4KGN.js → chunk-EWJCAT5A.js} +1 -1
  19. package/chunk-F722MM2N.js +1 -0
  20. package/chunk-GTXQM7B6.js +1 -0
  21. package/{chunk-T2VQYIXT.js → chunk-HEBDWN5N.js} +1 -1
  22. package/chunk-IOH6RL5H.js +1 -0
  23. package/{chunk-YI6L4R7Z.js → chunk-J3H4BCHI.js} +1 -1
  24. package/{chunk-FGOEPQE2.js → chunk-K7H3KYW7.js} +1 -1
  25. package/{chunk-2ORXOP6M.js → chunk-KFGIVU27.js} +1 -1
  26. package/{chunk-LXIJTRVM.js → chunk-L6DT3BQG.js} +1 -1
  27. package/{chunk-FFVSEGEV.js → chunk-LQUKRKUH.js} +1 -1
  28. package/{chunk-A6SZHWMW.js → chunk-LVYTERRJ.js} +1 -1
  29. package/chunk-MR4RE3IB.js +7 -0
  30. package/{chunk-SJEKIUA5.js → chunk-N35HGIXN.js} +1 -1
  31. package/chunk-NKPGP6QP.js +1 -0
  32. package/{chunk-DZ4NY6DH.js → chunk-NWRHNRPB.js} +1 -1
  33. package/{chunk-YR7K7QME.js → chunk-OVIL3KMN.js} +1 -1
  34. package/{chunk-P7G2XT2C.js → chunk-P6LV5I2K.js} +1 -1
  35. package/{chunk-GTFXUW4R.js → chunk-PIDBEXSZ.js} +1 -1
  36. package/{chunk-5S4GAK6A.js → chunk-QGSX2XOM.js} +1 -1
  37. package/chunk-QLPXITCK.js +1 -0
  38. package/{chunk-TXYVWITT.js → chunk-QZCTOSPE.js} +1 -1
  39. package/chunk-RU7EY7FN.js +1 -0
  40. package/{chunk-RCJYQZCN.js → chunk-SSYD4I7W.js} +1 -1
  41. package/chunk-UOCBGYU5.js +1 -0
  42. package/{chunk-VKBAFWXR.js → chunk-UPHEPMGX.js} +1 -1
  43. package/chunk-V7APGUBT.js +1 -0
  44. package/{chunk-OO5FPIA3.js → chunk-VOINBIWD.js} +1 -1
  45. package/{chunk-XYW3WI3F.js → chunk-W76PK3CU.js} +1 -1
  46. package/{chunk-SNVCSRVH.js → chunk-X25RPH22.js} +1 -1
  47. package/chunk-YCOOYSZG.js +1 -0
  48. package/{chunk-IPFOWVKQ.js → chunk-ZI3FISVO.js} +1 -1
  49. package/chunk-ZRCOVLAQ.js +1 -0
  50. package/index.html +1 -1
  51. package/main-D7ITIFJT.js +1 -0
  52. package/package.json +1 -1
  53. package/chunk-3KFDFKWE.js +0 -1
  54. package/chunk-5Y3QZ4EI.js +0 -1
  55. package/chunk-7AEXF3KX.js +0 -8
  56. package/chunk-ADFXT75O.js +0 -1
  57. package/chunk-B7ZQVD4U.js +0 -1
  58. package/chunk-EJYG5RAF.js +0 -1
  59. package/chunk-JDQIBNR4.js +0 -7
  60. package/chunk-LCQKPZDB.js +0 -1
  61. package/chunk-MTBPGXQX.js +0 -1
  62. package/chunk-PMUAVKEX.js +0 -1
  63. package/chunk-QSEDH5YS.js +0 -1
  64. package/chunk-R2O4OGXE.js +0 -1
  65. package/chunk-T7U2URJ4.js +0 -1
  66. package/chunk-TSRJXJX3.js +0 -1
  67. package/chunk-XA4PLKUY.js +0 -1
  68. package/chunk-YBT47FIB.js +0 -1
  69. package/chunk-YVWTNA2V.js +0 -1
  70. package/chunk-ZTDQQPKO.js +0 -1
  71. package/main-4BEVKJSI.js +0 -1
@@ -1 +1 @@
1
- import{a as le}from"./chunk-R5JN4Q6V.js";import{Fc as Fe,Jc as we,Lc as G,Mc as y,O as $,Q as c,R as oe,S as W,Sa as o,U as D,Wa as E,Wb as v,X as Ae,Za as k,da as P,g as Ce,gb as q,ha as b,hb as l,ja as Me,jb as u,k as Ve,ma as A,nb as Ee,p as De,rc as h,sa as M,v as be,xb as ae}from"./chunk-JDQIBNR4.js";import{a as d,b as p}from"./chunk-C6Q5SG76.js";var Te=(()=>{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)(o(E),o(M))};static \u0275dir=l({type:n})}return n})(),S=(()=>{class n extends Te{static \u0275fac=(()=>{let e;return function(r){return(e||(e=b(n)))(r||n)}})();static \u0275dir=l({type:n,features:[u]})}return n})(),_=new D(""),dt={provide:_,useExisting:c(()=>ct),multi:!0},ct=(()=>{class n extends S{writeValue(e){this.setProperty("checked",e)}static \u0275fac=(()=>{let e;return function(r){return(e||(e=b(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(i,r){i&1&&v("change",function(a){return r.onChange(a.target.checked)})("blur",function(){return r.onTouched()})},standalone:!1,features:[h([dt]),u]})}return n})(),ht={provide:_,useExisting:c(()=>je),multi:!0};function ft(){let n=le()?le().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}var pt=new D(""),je=(()=>{class n extends Te{_compositionMode;_composing=!1;constructor(e,i,r){super(e,i),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!ft())}writeValue(e){let i=e??"";this.setProperty("value",i)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static \u0275fac=function(i){return new(i||n)(o(E),o(M),o(pt,8))};static \u0275dir=l({type:n,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(i,r){i&1&&v("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:!1,features:[h([ht]),u]})}return n})();function C(n){return n==null||(typeof n=="string"||Array.isArray(n))&&n.length===0}function Be(n){return n!=null&&typeof n.length=="number"}var N=new D(""),O=new D(""),gt=/^(?=.{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])?)*$/,Ie=class{static min(t){return mt(t)}static max(t){return _t(t)}static required(t){return vt(t)}static requiredTrue(t){return yt(t)}static email(t){return Ct(t)}static minLength(t){return Vt(t)}static maxLength(t){return Dt(t)}static pattern(t){return bt(t)}static nullValidator(t){return Ue(t)}static compose(t){return ze(t)}static composeAsync(t){return Xe(t)}};function mt(n){return t=>{if(C(t.value)||C(n))return null;let e=parseFloat(t.value);return!isNaN(e)&&e<n?{min:{min:n,actual:t.value}}:null}}function _t(n){return t=>{if(C(t.value)||C(n))return null;let e=parseFloat(t.value);return!isNaN(e)&&e>n?{max:{max:n,actual:t.value}}:null}}function vt(n){return C(n.value)?{required:!0}:null}function yt(n){return n.value===!0?null:{required:!0}}function Ct(n){return C(n.value)||gt.test(n.value)?null:{email:!0}}function Vt(n){return t=>C(t.value)||!Be(t.value)?null:t.value.length<n?{minlength:{requiredLength:n,actualLength:t.value.length}}:null}function Dt(n){return t=>Be(t.value)&&t.value.length>n?{maxlength:{requiredLength:n,actualLength:t.value.length}}:null}function bt(n){if(!n)return Ue;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(C(i.value))return null;let r=i.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}function Ue(n){return null}function He(n){return n!=null}function Le(n){return Ee(n)?Ve(n):n}function $e(n){let t={};return n.forEach(e=>{t=e!=null?d(d({},t),e):t}),Object.keys(t).length===0?null:t}function We(n,t){return t.map(e=>e(n))}function At(n){return!n.validate}function qe(n){return n.map(t=>At(t)?t:e=>t.validate(e))}function ze(n){if(!n)return null;let t=n.filter(He);return t.length==0?null:function(e){return $e(We(e,t))}}function Ze(n){return n!=null?ze(qe(n)):null}function Xe(n){if(!n)return null;let t=n.filter(He);return t.length==0?null:function(e){let i=We(e,t).map(Le);return be(i).pipe(De($e))}}function Ye(n){return n!=null?Xe(qe(n)):null}function Se(n,t){return n===null?[t]:Array.isArray(n)?[...n,t]:[n,t]}function Ke(n){return n._rawValidators}function Je(n){return n._rawAsyncValidators}function ue(n){return n?Array.isArray(n)?n:[n]:[]}function Z(n,t){return Array.isArray(n)?n.includes(t):n===t}function Ne(n,t){let e=ue(t);return ue(n).forEach(r=>{Z(e,r)||e.push(r)}),e}function Oe(n,t){return ue(t).filter(e=>!Z(n,e))}var X=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=Ze(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=Ye(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&&this.control.reset(t)}hasError(t,e){return this.control?this.control.hasError(t,e):!1}getError(t,e){return this.control?this.control.getError(t,e):null}},f=class extends X{name;get formDirective(){return null}get path(){return null}},g=class extends X{_parent=null;name=null;valueAccessor=null},Y=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}},Mt={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},Dn=p(d({},Mt),{"[class.ng-submitted]":"isSubmitted"}),bn=(()=>{class n extends Y{constructor(e){super(e)}static \u0275fac=function(i){return new(i||n)(o(g,2))};static \u0275dir=l({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,r){i&2&&ae("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:!1,features:[u]})}return n})(),An=(()=>{class n extends Y{constructor(e){super(e)}static \u0275fac=function(i){return new(i||n)(o(f,10))};static \u0275dir=l({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(i,r){i&2&&ae("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:!1,features:[u]})}return n})();var R="VALID",z="INVALID",F="PENDING",T="DISABLED",V=class{},K=class extends V{value;source;constructor(t,e){super(),this.value=t,this.source=e}},j=class extends V{pristine;source;constructor(t,e){super(),this.pristine=t,this.source=e}},B=class extends V{touched;source;constructor(t,e){super(),this.touched=t,this.source=e}},w=class extends V{status;source;constructor(t,e){super(),this.status=t,this.source=e}},de=class extends V{source;constructor(t){super(),this.source=t}},ce=class extends V{source;constructor(t){super(),this.source=t}};function pe(n){return(ie(n)?n.validators:n)||null}function Et(n){return Array.isArray(n)?Ze(n):n||null}function ge(n,t){return(ie(t)?t.asyncValidators:n)||null}function Ft(n){return Array.isArray(n)?Ye(n):n||null}function ie(n){return n!=null&&!Array.isArray(n)&&typeof n=="object"}function Qe(n,t,e){let i=n.controls;if(!(t?Object.keys(i):i).length)throw new $(1e3,"");if(!i[e])throw new $(1001,"")}function et(n,t,e){n._forEachChild((i,r)=>{if(e[r]===void 0)throw new $(1002,"")})}var I=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_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}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get status(){return y(this.statusReactive)}set status(t){y(()=>this.statusReactive.set(t))}_status=G(()=>this.statusReactive());statusReactive=k(void 0);get valid(){return this.status===R}get invalid(){return this.status===z}get pending(){return this.status==F}get disabled(){return this.status===T}get enabled(){return this.status!==T}errors;get pristine(){return y(this.pristineReactive)}set pristine(t){y(()=>this.pristineReactive.set(t))}_pristine=G(()=>this.pristineReactive());pristineReactive=k(!0);get dirty(){return!this.pristine}get touched(){return y(this.touchedReactive)}set touched(t){y(()=>this.touchedReactive.set(t))}_touched=G(()=>this.touchedReactive());touchedReactive=k(!1);get untouched(){return!this.touched}_events=new Ce;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(Ne(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(Ne(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(Oe(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(Oe(t,this._rawAsyncValidators))}hasValidator(t){return Z(this._rawValidators,t)}hasAsyncValidator(t){return Z(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){let e=this.touched===!1;this.touched=!0;let i=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsTouched(p(d({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new B(!0,i))}markAllAsTouched(t={}){this.markAsTouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(t))}markAsUntouched(t={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:i})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,i),e&&t.emitEvent!==!1&&this._events.next(new B(!1,i))}markAsDirty(t={}){let e=this.pristine===!0;this.pristine=!1;let i=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsDirty(p(d({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new j(!1,i))}markAsPristine(t={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:t.emitEvent})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t,i),e&&t.emitEvent!==!1&&this._events.next(new j(!0,i))}markAsPending(t={}){this.status=F;let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new w(this.status,e)),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.markAsPending(p(d({},t),{sourceControl:e}))}disable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=T,this.errors=null,this._forEachChild(r=>{r.disable(p(d({},t),{onlySelf:!0}))}),this._updateValue();let i=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new K(this.value,i)),this._events.next(new w(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(p(d({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=R,this._forEachChild(i=>{i.enable(p(d({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(p(d({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(t,e){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine({},e),this._parent._updateTouched({},e))}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let i=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===R||this.status===F)&&this._runAsyncValidator(i,t.emitEvent)}let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new K(this.value,e)),this._events.next(new w(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(p(d({},t),{sourceControl:e}))}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?T:R}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t,e){if(this.asyncValidator){this.status=F,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1};let i=Le(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:e,shouldHaveEmitted:t})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let t=this._hasOwnPendingAsyncValidator?.emitEvent??!1;return this._hasOwnPendingAsyncValidator=null,t}return!1}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(t){let e=t;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((i,r)=>i&&i._find(r),this)}getError(t,e){let i=e?this.get(e):this;return i&&i.errors?i.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t,e,i){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),(t||i)&&this._events.next(new w(this.status,e)),this._parent&&this._parent._updateControlsErrors(t,e,i)}_initObservables(){this.valueChanges=new A,this.statusChanges=new A}_calculateStatus(){return this._allControlsDisabled()?T:this.errors?z:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(F)?F:this._anyControlsHaveStatus(z)?z:R}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t,e){let i=!this._anyControlsDirty(),r=this.pristine!==i;this.pristine=i,this._parent&&!t.onlySelf&&this._parent._updatePristine(t,e),r&&this._events.next(new j(this.pristine,e))}_updateTouched(t={},e){this.touched=this._anyControlsTouched(),this._events.next(new B(this.touched,e)),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,e)}_onDisabledChange=[];_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){ie(t)&&t.updateOn!=null&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){let e=this._parent&&this._parent.dirty;return!t&&!!e&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=Et(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=Ft(this._rawAsyncValidators)}},J=class extends I{constructor(t,e,i){super(pe(e),ge(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;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={}){et(this,!0,t),Object.keys(t).forEach(i=>{Qe(this,!0,i),this.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(Object.keys(t).forEach(i=>{let r=this.controls[i];r&&r.patchValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((i,r)=>{i.reset(t?t[r]:null,{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,i)=>(t[i]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(e,i)=>i._syncPendingControls()?!0:e);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{let i=this.controls[e];i&&t(i,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(let[e,i]of Object.entries(this.controls))if(this.contains(e)&&t(i))return!0;return!1}_reduceValue(){let t={};return this._reduceChildren(t,(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(t,e){let i=t;return this._forEachChild((r,s)=>{i=e(i,r,s)}),i}_allControlsDisabled(){for(let t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(t){return this.controls.hasOwnProperty(t)?this.controls[t]:null}};var he=class extends J{};var x=new D("CallSetDisabledState",{providedIn:"root",factory:()=>H}),H="always";function re(n,t){return[...t.path,n]}function Q(n,t,e=H){me(n,t),t.valueAccessor.writeValue(n.value),(n.disabled||e==="always")&&t.valueAccessor.setDisabledState?.(n.disabled),It(n,t),Nt(n,t),St(n,t),wt(n,t)}function ee(n,t,e=!0){let i=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(i),t.valueAccessor.registerOnTouched(i)),ne(n,t),n&&(t._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}))}function te(n,t){n.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function wt(n,t){if(t.valueAccessor.setDisabledState){let e=i=>{t.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(e),t._registerOnDestroy(()=>{n._unregisterOnDisabledChange(e)})}}function me(n,t){let e=Ke(n);t.validator!==null?n.setValidators(Se(e,t.validator)):typeof e=="function"&&n.setValidators([e]);let i=Je(n);t.asyncValidator!==null?n.setAsyncValidators(Se(i,t.asyncValidator)):typeof i=="function"&&n.setAsyncValidators([i]);let r=()=>n.updateValueAndValidity();te(t._rawValidators,r),te(t._rawAsyncValidators,r)}function ne(n,t){let e=!1;if(n!==null){if(t.validator!==null){let r=Ke(n);if(Array.isArray(r)&&r.length>0){let s=r.filter(a=>a!==t.validator);s.length!==r.length&&(e=!0,n.setValidators(s))}}if(t.asyncValidator!==null){let r=Je(n);if(Array.isArray(r)&&r.length>0){let s=r.filter(a=>a!==t.asyncValidator);s.length!==r.length&&(e=!0,n.setAsyncValidators(s))}}}let i=()=>{};return te(t._rawValidators,i),te(t._rawAsyncValidators,i),e}function It(n,t){t.valueAccessor.registerOnChange(e=>{n._pendingValue=e,n._pendingChange=!0,n._pendingDirty=!0,n.updateOn==="change"&&tt(n,t)})}function St(n,t){t.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,n.updateOn==="blur"&&n._pendingChange&&tt(n,t),n.updateOn!=="submit"&&n.markAsTouched()})}function tt(n,t){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function Nt(n,t){let e=(i,r)=>{t.valueAccessor.writeValue(i),r&&t.viewToModelUpdate(i)};n.registerOnChange(e),t._registerOnDestroy(()=>{n._unregisterOnChange(e)})}function Ot(n,t){n==null,me(n,t)}function xt(n,t){return ne(n,t)}function _e(n,t){if(!n.hasOwnProperty("model"))return!1;let e=n.model;return e.isFirstChange()?!0:!Object.is(t,e.currentValue)}function Pt(n){return Object.getPrototypeOf(n.constructor)===S}function kt(n,t){n._syncPendingControls(),t.forEach(e=>{let i=e.control;i.updateOn==="submit"&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}function ve(n,t){if(!t)return null;Array.isArray(t);let e,i,r;return t.forEach(s=>{s.constructor===je?e=s:Pt(s)?i=s:r=s}),r||i||e||null}function Gt(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}function xe(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}function Pe(n){return typeof n=="object"&&n!==null&&Object.keys(n).length===2&&"value"in n&&"disabled"in n}var U=class extends I{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(t=null,e,i){super(pe(e),ge(i,e)),this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),ie(e)&&(e.nonNullable||e.initialValueIsDefault)&&(Pe(t)?this.defaultValue=t.value:this.defaultValue=t)}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(i=>i(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=this.defaultValue,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){xe(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){xe(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(t){Pe(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}};var Rt=n=>n instanceof U,Tt=(()=>{class n extends f{_parent;ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return re(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=b(n)))(r||n)}})();static \u0275dir=l({type:n,standalone:!1,features:[u]})}return n})();var jt={provide:g,useExisting:c(()=>Bt)},ke=Promise.resolve(),Bt=(()=>{class n extends g{_changeDetectorRef;callSetDisabledState;control=new U;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new A;constructor(e,i,r,s,a,m){super(),this._changeDetectorRef=a,this.callSetDisabledState=m,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=ve(this,s)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),_e(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){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()&&this.name}_updateValue(e){ke.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let i=e.isDisabled.currentValue,r=i!==0&&we(i);ke.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?re(e,this._parent):[e]}static \u0275fac=function(i){return new(i||n)(o(f,9),o(N,10),o(O,10),o(_,10),o(Fe,8),o(x,8))};static \u0275dir=l({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:!1,features:[h([jt]),u,P]})}return n})(),En=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275dir=l({type:n,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return n})(),Ut={provide:_,useExisting:c(()=>Ht),multi:!0},Ht=(()=>{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=b(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(i,r){i&1&&v("input",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[h([Ut]),u]})}return n})(),Lt={provide:_,useExisting:c(()=>Wt),multi:!0};var $t=(()=>{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:!1}static \u0275fac=function(i){return new(i||n)};static \u0275prov=oe({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Wt=(()=>{class n extends S{_registry;_injector;_state;_control;_fn;setDisabledStateFired=!1;onChange=()=>{};name;formControlName;value;callSetDisabledState=Ae(x,{optional:!0})??H;constructor(e,i,r,s){super(e,i),this._registry=r,this._injector=s}ngOnInit(){this._control=this._injector.get(g),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(e){this._state=e===this.value,this.setProperty("checked",this._state)}registerOnChange(e){this._fn=e,this.onChange=()=>{e(this.value),this._registry.select(this)}}setDisabledState(e){(this.setDisabledStateFired||e||this.callSetDisabledState==="whenDisabledForLegacyCode")&&this.setProperty("disabled",e),this.setDisabledStateFired=!0}fireUncheck(e){this.writeValue(e)}_checkName(){this.name&&this.formControlName&&(this.name,this.formControlName),!this.name&&this.formControlName&&(this.name=this.formControlName)}static \u0275fac=function(i){return new(i||n)(o(E),o(M),o($t),o(Me))};static \u0275dir=l({type:n,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(i,r){i&1&&v("change",function(){return r.onChange()})("blur",function(){return r.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},standalone:!1,features:[h([Lt]),u]})}return n})();var ye=new D(""),qt={provide:g,useExisting:c(()=>zt)},zt=(()=>{class n extends g{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(e){}model;update=new A;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,i,r,s,a){super(),this._ngModelWarningConfig=s,this.callSetDisabledState=a,this._setValidators(e),this._setAsyncValidators(i),this.valueAccessor=ve(this,r)}ngOnChanges(e){if(this._isControlChanged(e)){let i=e.form.previousValue;i&&ee(i,this,!1),Q(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}_e(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&ee(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")}static \u0275fac=function(i){return new(i||n)(o(N,10),o(O,10),o(_,10),o(ye,8),o(x,8))};static \u0275dir=l({type:n,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],standalone:!1,features:[h([qt]),u,P]})}return n})(),Zt={provide:f,useExisting:c(()=>nt)},nt=(()=>{class n extends f{callSetDisabledState;get submitted(){return y(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}_submitted=G(()=>this._submittedReactive());_submittedReactive=k(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];form=null;ngSubmit=new A;constructor(e,i,r){super(),this.callSetDisabledState=r,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&&(ne(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){let i=this.form.get(e.path);return Q(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){ee(e.control||null,e,!1),Gt(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,i){this.form.get(e.path).setValue(i)}onSubmit(e){return this._submittedReactive.set(!0),kt(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new de(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this._submittedReactive.set(!1),this.form._events.next(new ce(this.form))}_updateDomValue(){this.directives.forEach(e=>{let i=e.control,r=this.form.get(e.path);i!==r&&(ee(i||null,e),Rt(r)&&(Q(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let i=this.form.get(e.path);Ot(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){let i=this.form.get(e.path);i&&xt(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){me(this.form,this),this._oldForm&&ne(this._oldForm,this)}_checkFormPresent(){this.form}static \u0275fac=function(i){return new(i||n)(o(N,10),o(O,10),o(x,8))};static \u0275dir=l({type:n,selectors:[["","formGroup",""]],hostBindings:function(i,r){i&1&&v("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[h([Zt]),u,P]})}return n})(),Xt={provide:f,useExisting:c(()=>it)},it=(()=>{class n extends Tt{name=null;constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r)}_checkParentType(){st(this._parent)}static \u0275fac=function(i){return new(i||n)(o(f,13),o(N,10),o(O,10))};static \u0275dir=l({type:n,selectors:[["","formGroupName",""]],inputs:{name:[0,"formGroupName","name"]},standalone:!1,features:[h([Xt]),u]})}return n})(),Yt={provide:f,useExisting:c(()=>rt)},rt=(()=>{class n extends f{_parent;name=null;constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r)}ngOnInit(){this._checkParentType(),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return re(this.name==null?this.name:this.name.toString(),this._parent)}_checkParentType(){st(this._parent)}static \u0275fac=function(i){return new(i||n)(o(f,13),o(N,10),o(O,10))};static \u0275dir=l({type:n,selectors:[["","formArrayName",""]],inputs:{name:[0,"formArrayName","name"]},standalone:!1,features:[h([Yt]),u]})}return n})();function st(n){return!(n instanceof it)&&!(n instanceof nt)&&!(n instanceof rt)}var Kt={provide:g,useExisting:c(()=>Jt)},Jt=(()=>{class n extends g{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(e){}model;update=new A;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,i,r,s,a){super(),this._ngModelWarningConfig=a,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=ve(this,s)}ngOnChanges(e){this._added||this._setUpControl(),_e(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 re(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}static \u0275fac=function(i){return new(i||n)(o(f,13),o(N,10),o(O,10),o(_,10),o(ye,8))};static \u0275dir=l({type:n,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[h([Kt]),u,P]})}return n})(),Qt={provide:_,useExisting:c(()=>at),multi:!0};function ot(n,t){return n==null?`${t}`:(t&&typeof t=="object"&&(t="Object"),`${n}: ${t}`.slice(0,50))}function en(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;writeValue(e){this.value=e;let i=this._getOptionId(e),r=ot(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=en(e);return this._optionMap.has(i)?this._optionMap.get(i):e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=b(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(i,r){i&1&&v("change",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[h([Qt]),u]})}return n})(),Fn=(()=>{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(ot(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))}static \u0275fac=function(i){return new(i||n)(o(M),o(E),o(at,9))};static \u0275dir=l({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})(),tn={provide:_,useExisting:c(()=>lt),multi:!0};function Ge(n,t){return n==null?`${t}`:(typeof t=="string"&&(t=`'${t}'`),t&&typeof t=="object"&&(t="Object"),`${n}: ${t}`.slice(0,50))}function nn(n){return n.split(":")[0]}var lt=(()=>{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.toString())>-1)}}else i=(r,s)=>{r._setSelected(!1)};this._optionMap.forEach(i)}registerOnChange(e){this.onChange=i=>{let r=[],s=i.selectedOptions;if(s!==void 0){let a=s;for(let m=0;m<a.length;m++){let L=a[m],se=this._getOptionValue(L.value);r.push(se)}}else{let a=i.options;for(let m=0;m<a.length;m++){let L=a[m];if(L.selected){let se=this._getOptionValue(L.value);r.push(se)}}}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=nn(e);return this._optionMap.has(i)?this._optionMap.get(i)._value:e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=b(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(i,r){i&1&&v("change",function(a){return r.onChange(a.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[h([tn]),u]})}return n})(),wn=(()=>{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(Ge(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._select?(this._value=e,this._setElementValue(Ge(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)(o(M),o(E),o(lt,9))};static \u0275dir=l({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})();var ut=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=q({type:n});static \u0275inj=W({})}return n})(),fe=class extends I{constructor(t,e,i){super(pe(e),ge(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;at(t){return this.controls[this._adjustIndex(t)]}push(t,e={}){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(t,e,i={}){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(t,e={}){let i=this._adjustIndex(t);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(t,e,i={}){let r=this._adjustIndex(t);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){et(this,!1,t),t.forEach((i,r)=>{Qe(this,!1,r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(t.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t=[],e={}){this._forEachChild((i,r)=>{i.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(t=>t.getRawValue())}clear(t={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:t.emitEvent}))}_adjustIndex(t){return t<0?t+this.length:t}_syncPendingControls(){let t=this.controls.reduce((e,i)=>i._syncPendingControls()?!0:e,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){this.controls.forEach((e,i)=>{t(e,i)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_allControlsDisabled(){for(let t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}_find(t){return this.at(t)??null}};function Re(n){return!!n&&(n.asyncValidators!==void 0||n.validators!==void 0||n.updateOn!==void 0)}var In=(()=>{class n{useNonNullable=!1;get nonNullable(){let e=new n;return e.useNonNullable=!0,e}group(e,i=null){let r=this._reduceControls(e),s={};return Re(i)?s=i:i!==null&&(s.validators=i.validator,s.asyncValidators=i.asyncValidator),new J(r,s)}record(e,i=null){let r=this._reduceControls(e);return new he(r,i)}control(e,i,r){let s={};return this.useNonNullable?(Re(i)?s=i:(s.validators=i,s.asyncValidators=r),new U(e,p(d({},s),{nonNullable:!0}))):new U(e,i,r)}array(e,i,r){let s=e.map(a=>this._createControl(a));return new fe(s,i,r)}_reduceControls(e){let i={};return Object.keys(e).forEach(r=>{i[r]=this._createControl(e[r])}),i}_createControl(e){if(e instanceof U)return e;if(e instanceof I)return e;if(Array.isArray(e)){let i=e[0],r=e.length>1?e[1]:null,s=e.length>2?e[2]:null;return this.control(i,r,s)}else return this.control(e)}static \u0275fac=function(i){return new(i||n)};static \u0275prov=oe({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var Sn=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:x,useValue:e.callSetDisabledState??H}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=q({type:n});static \u0275inj=W({imports:[ut]})}return n})(),Nn=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:ye,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:x,useValue:e.callSetDisabledState??H}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=q({type:n});static \u0275inj=W({imports:[ut]})}return n})();export{ct as a,je as b,Ie as c,bn as d,An as e,U as f,Bt as g,En as h,Ht as i,Wt as j,zt as k,nt as l,it as m,rt as n,Jt as o,Fn as p,wn as q,In as r,Sn as s,Nn as t};
1
+ import{a as le}from"./chunk-5ZK3D2RS.js";import{Ec as Fe,Ic as we,Kc as G,Lc as y,O as $,Q as c,R as oe,S as W,Sa as o,U as D,Wa as E,Wb as v,X as Ae,Za as k,da as P,g as Ce,gb as q,ha as b,hb as l,ja as Me,jb as u,k as Ve,ma as A,nb as Ee,p as De,qc as h,sa as M,v as be,xb as ae}from"./chunk-MR4RE3IB.js";import{a as d,b as p}from"./chunk-C6Q5SG76.js";var Te=(()=>{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)(o(E),o(M))};static \u0275dir=l({type:n})}return n})(),S=(()=>{class n extends Te{static \u0275fac=(()=>{let e;return function(r){return(e||(e=b(n)))(r||n)}})();static \u0275dir=l({type:n,features:[u]})}return n})(),_=new D(""),dt={provide:_,useExisting:c(()=>ct),multi:!0},ct=(()=>{class n extends S{writeValue(e){this.setProperty("checked",e)}static \u0275fac=(()=>{let e;return function(r){return(e||(e=b(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(i,r){i&1&&v("change",function(a){return r.onChange(a.target.checked)})("blur",function(){return r.onTouched()})},standalone:!1,features:[h([dt]),u]})}return n})(),ht={provide:_,useExisting:c(()=>je),multi:!0};function ft(){let n=le()?le().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}var pt=new D(""),je=(()=>{class n extends Te{_compositionMode;_composing=!1;constructor(e,i,r){super(e,i),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!ft())}writeValue(e){let i=e??"";this.setProperty("value",i)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static \u0275fac=function(i){return new(i||n)(o(E),o(M),o(pt,8))};static \u0275dir=l({type:n,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(i,r){i&1&&v("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:!1,features:[h([ht]),u]})}return n})();function C(n){return n==null||(typeof n=="string"||Array.isArray(n))&&n.length===0}function Be(n){return n!=null&&typeof n.length=="number"}var N=new D(""),O=new D(""),gt=/^(?=.{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])?)*$/,Ie=class{static min(t){return mt(t)}static max(t){return _t(t)}static required(t){return vt(t)}static requiredTrue(t){return yt(t)}static email(t){return Ct(t)}static minLength(t){return Vt(t)}static maxLength(t){return Dt(t)}static pattern(t){return bt(t)}static nullValidator(t){return Ue(t)}static compose(t){return ze(t)}static composeAsync(t){return Xe(t)}};function mt(n){return t=>{if(C(t.value)||C(n))return null;let e=parseFloat(t.value);return!isNaN(e)&&e<n?{min:{min:n,actual:t.value}}:null}}function _t(n){return t=>{if(C(t.value)||C(n))return null;let e=parseFloat(t.value);return!isNaN(e)&&e>n?{max:{max:n,actual:t.value}}:null}}function vt(n){return C(n.value)?{required:!0}:null}function yt(n){return n.value===!0?null:{required:!0}}function Ct(n){return C(n.value)||gt.test(n.value)?null:{email:!0}}function Vt(n){return t=>C(t.value)||!Be(t.value)?null:t.value.length<n?{minlength:{requiredLength:n,actualLength:t.value.length}}:null}function Dt(n){return t=>Be(t.value)&&t.value.length>n?{maxlength:{requiredLength:n,actualLength:t.value.length}}:null}function bt(n){if(!n)return Ue;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(C(i.value))return null;let r=i.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}function Ue(n){return null}function He(n){return n!=null}function Le(n){return Ee(n)?Ve(n):n}function $e(n){let t={};return n.forEach(e=>{t=e!=null?d(d({},t),e):t}),Object.keys(t).length===0?null:t}function We(n,t){return t.map(e=>e(n))}function At(n){return!n.validate}function qe(n){return n.map(t=>At(t)?t:e=>t.validate(e))}function ze(n){if(!n)return null;let t=n.filter(He);return t.length==0?null:function(e){return $e(We(e,t))}}function Ze(n){return n!=null?ze(qe(n)):null}function Xe(n){if(!n)return null;let t=n.filter(He);return t.length==0?null:function(e){let i=We(e,t).map(Le);return be(i).pipe(De($e))}}function Ye(n){return n!=null?Xe(qe(n)):null}function Se(n,t){return n===null?[t]:Array.isArray(n)?[...n,t]:[n,t]}function Ke(n){return n._rawValidators}function Je(n){return n._rawAsyncValidators}function ue(n){return n?Array.isArray(n)?n:[n]:[]}function Z(n,t){return Array.isArray(n)?n.includes(t):n===t}function Ne(n,t){let e=ue(t);return ue(n).forEach(r=>{Z(e,r)||e.push(r)}),e}function Oe(n,t){return ue(t).filter(e=>!Z(n,e))}var X=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=Ze(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=Ye(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&&this.control.reset(t)}hasError(t,e){return this.control?this.control.hasError(t,e):!1}getError(t,e){return this.control?this.control.getError(t,e):null}},f=class extends X{name;get formDirective(){return null}get path(){return null}},g=class extends X{_parent=null;name=null;valueAccessor=null},Y=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}},Mt={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},Dn=p(d({},Mt),{"[class.ng-submitted]":"isSubmitted"}),bn=(()=>{class n extends Y{constructor(e){super(e)}static \u0275fac=function(i){return new(i||n)(o(g,2))};static \u0275dir=l({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,r){i&2&&ae("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:!1,features:[u]})}return n})(),An=(()=>{class n extends Y{constructor(e){super(e)}static \u0275fac=function(i){return new(i||n)(o(f,10))};static \u0275dir=l({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(i,r){i&2&&ae("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:!1,features:[u]})}return n})();var R="VALID",z="INVALID",F="PENDING",T="DISABLED",V=class{},K=class extends V{value;source;constructor(t,e){super(),this.value=t,this.source=e}},j=class extends V{pristine;source;constructor(t,e){super(),this.pristine=t,this.source=e}},B=class extends V{touched;source;constructor(t,e){super(),this.touched=t,this.source=e}},w=class extends V{status;source;constructor(t,e){super(),this.status=t,this.source=e}},de=class extends V{source;constructor(t){super(),this.source=t}},ce=class extends V{source;constructor(t){super(),this.source=t}};function pe(n){return(ie(n)?n.validators:n)||null}function Et(n){return Array.isArray(n)?Ze(n):n||null}function ge(n,t){return(ie(t)?t.asyncValidators:n)||null}function Ft(n){return Array.isArray(n)?Ye(n):n||null}function ie(n){return n!=null&&!Array.isArray(n)&&typeof n=="object"}function Qe(n,t,e){let i=n.controls;if(!(t?Object.keys(i):i).length)throw new $(1e3,"");if(!i[e])throw new $(1001,"")}function et(n,t,e){n._forEachChild((i,r)=>{if(e[r]===void 0)throw new $(1002,"")})}var I=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_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}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get status(){return y(this.statusReactive)}set status(t){y(()=>this.statusReactive.set(t))}_status=G(()=>this.statusReactive());statusReactive=k(void 0);get valid(){return this.status===R}get invalid(){return this.status===z}get pending(){return this.status==F}get disabled(){return this.status===T}get enabled(){return this.status!==T}errors;get pristine(){return y(this.pristineReactive)}set pristine(t){y(()=>this.pristineReactive.set(t))}_pristine=G(()=>this.pristineReactive());pristineReactive=k(!0);get dirty(){return!this.pristine}get touched(){return y(this.touchedReactive)}set touched(t){y(()=>this.touchedReactive.set(t))}_touched=G(()=>this.touchedReactive());touchedReactive=k(!1);get untouched(){return!this.touched}_events=new Ce;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(Ne(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(Ne(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(Oe(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(Oe(t,this._rawAsyncValidators))}hasValidator(t){return Z(this._rawValidators,t)}hasAsyncValidator(t){return Z(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){let e=this.touched===!1;this.touched=!0;let i=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsTouched(p(d({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new B(!0,i))}markAllAsTouched(t={}){this.markAsTouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(t))}markAsUntouched(t={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:i})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,i),e&&t.emitEvent!==!1&&this._events.next(new B(!1,i))}markAsDirty(t={}){let e=this.pristine===!0;this.pristine=!1;let i=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsDirty(p(d({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new j(!1,i))}markAsPristine(t={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:t.emitEvent})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t,i),e&&t.emitEvent!==!1&&this._events.next(new j(!0,i))}markAsPending(t={}){this.status=F;let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new w(this.status,e)),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.markAsPending(p(d({},t),{sourceControl:e}))}disable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=T,this.errors=null,this._forEachChild(r=>{r.disable(p(d({},t),{onlySelf:!0}))}),this._updateValue();let i=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new K(this.value,i)),this._events.next(new w(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(p(d({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=R,this._forEachChild(i=>{i.enable(p(d({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(p(d({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(t,e){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine({},e),this._parent._updateTouched({},e))}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let i=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===R||this.status===F)&&this._runAsyncValidator(i,t.emitEvent)}let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new K(this.value,e)),this._events.next(new w(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(p(d({},t),{sourceControl:e}))}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?T:R}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t,e){if(this.asyncValidator){this.status=F,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1};let i=Le(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:e,shouldHaveEmitted:t})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let t=this._hasOwnPendingAsyncValidator?.emitEvent??!1;return this._hasOwnPendingAsyncValidator=null,t}return!1}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(t){let e=t;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((i,r)=>i&&i._find(r),this)}getError(t,e){let i=e?this.get(e):this;return i&&i.errors?i.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t,e,i){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),(t||i)&&this._events.next(new w(this.status,e)),this._parent&&this._parent._updateControlsErrors(t,e,i)}_initObservables(){this.valueChanges=new A,this.statusChanges=new A}_calculateStatus(){return this._allControlsDisabled()?T:this.errors?z:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(F)?F:this._anyControlsHaveStatus(z)?z:R}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t,e){let i=!this._anyControlsDirty(),r=this.pristine!==i;this.pristine=i,this._parent&&!t.onlySelf&&this._parent._updatePristine(t,e),r&&this._events.next(new j(this.pristine,e))}_updateTouched(t={},e){this.touched=this._anyControlsTouched(),this._events.next(new B(this.touched,e)),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,e)}_onDisabledChange=[];_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){ie(t)&&t.updateOn!=null&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){let e=this._parent&&this._parent.dirty;return!t&&!!e&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=Et(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=Ft(this._rawAsyncValidators)}},J=class extends I{constructor(t,e,i){super(pe(e),ge(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;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={}){et(this,!0,t),Object.keys(t).forEach(i=>{Qe(this,!0,i),this.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(Object.keys(t).forEach(i=>{let r=this.controls[i];r&&r.patchValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((i,r)=>{i.reset(t?t[r]:null,{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,i)=>(t[i]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(e,i)=>i._syncPendingControls()?!0:e);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{let i=this.controls[e];i&&t(i,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(let[e,i]of Object.entries(this.controls))if(this.contains(e)&&t(i))return!0;return!1}_reduceValue(){let t={};return this._reduceChildren(t,(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(t,e){let i=t;return this._forEachChild((r,s)=>{i=e(i,r,s)}),i}_allControlsDisabled(){for(let t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(t){return this.controls.hasOwnProperty(t)?this.controls[t]:null}};var he=class extends J{};var x=new D("CallSetDisabledState",{providedIn:"root",factory:()=>H}),H="always";function re(n,t){return[...t.path,n]}function Q(n,t,e=H){me(n,t),t.valueAccessor.writeValue(n.value),(n.disabled||e==="always")&&t.valueAccessor.setDisabledState?.(n.disabled),It(n,t),Nt(n,t),St(n,t),wt(n,t)}function ee(n,t,e=!0){let i=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(i),t.valueAccessor.registerOnTouched(i)),ne(n,t),n&&(t._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}))}function te(n,t){n.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function wt(n,t){if(t.valueAccessor.setDisabledState){let e=i=>{t.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(e),t._registerOnDestroy(()=>{n._unregisterOnDisabledChange(e)})}}function me(n,t){let e=Ke(n);t.validator!==null?n.setValidators(Se(e,t.validator)):typeof e=="function"&&n.setValidators([e]);let i=Je(n);t.asyncValidator!==null?n.setAsyncValidators(Se(i,t.asyncValidator)):typeof i=="function"&&n.setAsyncValidators([i]);let r=()=>n.updateValueAndValidity();te(t._rawValidators,r),te(t._rawAsyncValidators,r)}function ne(n,t){let e=!1;if(n!==null){if(t.validator!==null){let r=Ke(n);if(Array.isArray(r)&&r.length>0){let s=r.filter(a=>a!==t.validator);s.length!==r.length&&(e=!0,n.setValidators(s))}}if(t.asyncValidator!==null){let r=Je(n);if(Array.isArray(r)&&r.length>0){let s=r.filter(a=>a!==t.asyncValidator);s.length!==r.length&&(e=!0,n.setAsyncValidators(s))}}}let i=()=>{};return te(t._rawValidators,i),te(t._rawAsyncValidators,i),e}function It(n,t){t.valueAccessor.registerOnChange(e=>{n._pendingValue=e,n._pendingChange=!0,n._pendingDirty=!0,n.updateOn==="change"&&tt(n,t)})}function St(n,t){t.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,n.updateOn==="blur"&&n._pendingChange&&tt(n,t),n.updateOn!=="submit"&&n.markAsTouched()})}function tt(n,t){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function Nt(n,t){let e=(i,r)=>{t.valueAccessor.writeValue(i),r&&t.viewToModelUpdate(i)};n.registerOnChange(e),t._registerOnDestroy(()=>{n._unregisterOnChange(e)})}function Ot(n,t){n==null,me(n,t)}function xt(n,t){return ne(n,t)}function _e(n,t){if(!n.hasOwnProperty("model"))return!1;let e=n.model;return e.isFirstChange()?!0:!Object.is(t,e.currentValue)}function Pt(n){return Object.getPrototypeOf(n.constructor)===S}function kt(n,t){n._syncPendingControls(),t.forEach(e=>{let i=e.control;i.updateOn==="submit"&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}function ve(n,t){if(!t)return null;Array.isArray(t);let e,i,r;return t.forEach(s=>{s.constructor===je?e=s:Pt(s)?i=s:r=s}),r||i||e||null}function Gt(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}function xe(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}function Pe(n){return typeof n=="object"&&n!==null&&Object.keys(n).length===2&&"value"in n&&"disabled"in n}var U=class extends I{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(t=null,e,i){super(pe(e),ge(i,e)),this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),ie(e)&&(e.nonNullable||e.initialValueIsDefault)&&(Pe(t)?this.defaultValue=t.value:this.defaultValue=t)}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(i=>i(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=this.defaultValue,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){xe(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){xe(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(t){Pe(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}};var Rt=n=>n instanceof U,Tt=(()=>{class n extends f{_parent;ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return re(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=b(n)))(r||n)}})();static \u0275dir=l({type:n,standalone:!1,features:[u]})}return n})();var jt={provide:g,useExisting:c(()=>Bt)},ke=Promise.resolve(),Bt=(()=>{class n extends g{_changeDetectorRef;callSetDisabledState;control=new U;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new A;constructor(e,i,r,s,a,m){super(),this._changeDetectorRef=a,this.callSetDisabledState=m,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=ve(this,s)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),_e(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){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()&&this.name}_updateValue(e){ke.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let i=e.isDisabled.currentValue,r=i!==0&&we(i);ke.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?re(e,this._parent):[e]}static \u0275fac=function(i){return new(i||n)(o(f,9),o(N,10),o(O,10),o(_,10),o(Fe,8),o(x,8))};static \u0275dir=l({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:!1,features:[h([jt]),u,P]})}return n})(),En=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275dir=l({type:n,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return n})(),Ut={provide:_,useExisting:c(()=>Ht),multi:!0},Ht=(()=>{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=b(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(i,r){i&1&&v("input",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[h([Ut]),u]})}return n})(),Lt={provide:_,useExisting:c(()=>Wt),multi:!0};var $t=(()=>{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:!1}static \u0275fac=function(i){return new(i||n)};static \u0275prov=oe({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Wt=(()=>{class n extends S{_registry;_injector;_state;_control;_fn;setDisabledStateFired=!1;onChange=()=>{};name;formControlName;value;callSetDisabledState=Ae(x,{optional:!0})??H;constructor(e,i,r,s){super(e,i),this._registry=r,this._injector=s}ngOnInit(){this._control=this._injector.get(g),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(e){this._state=e===this.value,this.setProperty("checked",this._state)}registerOnChange(e){this._fn=e,this.onChange=()=>{e(this.value),this._registry.select(this)}}setDisabledState(e){(this.setDisabledStateFired||e||this.callSetDisabledState==="whenDisabledForLegacyCode")&&this.setProperty("disabled",e),this.setDisabledStateFired=!0}fireUncheck(e){this.writeValue(e)}_checkName(){this.name&&this.formControlName&&(this.name,this.formControlName),!this.name&&this.formControlName&&(this.name=this.formControlName)}static \u0275fac=function(i){return new(i||n)(o(E),o(M),o($t),o(Me))};static \u0275dir=l({type:n,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(i,r){i&1&&v("change",function(){return r.onChange()})("blur",function(){return r.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},standalone:!1,features:[h([Lt]),u]})}return n})();var ye=new D(""),qt={provide:g,useExisting:c(()=>zt)},zt=(()=>{class n extends g{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(e){}model;update=new A;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,i,r,s,a){super(),this._ngModelWarningConfig=s,this.callSetDisabledState=a,this._setValidators(e),this._setAsyncValidators(i),this.valueAccessor=ve(this,r)}ngOnChanges(e){if(this._isControlChanged(e)){let i=e.form.previousValue;i&&ee(i,this,!1),Q(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}_e(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&ee(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")}static \u0275fac=function(i){return new(i||n)(o(N,10),o(O,10),o(_,10),o(ye,8),o(x,8))};static \u0275dir=l({type:n,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],standalone:!1,features:[h([qt]),u,P]})}return n})(),Zt={provide:f,useExisting:c(()=>nt)},nt=(()=>{class n extends f{callSetDisabledState;get submitted(){return y(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}_submitted=G(()=>this._submittedReactive());_submittedReactive=k(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];form=null;ngSubmit=new A;constructor(e,i,r){super(),this.callSetDisabledState=r,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&&(ne(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){let i=this.form.get(e.path);return Q(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){ee(e.control||null,e,!1),Gt(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,i){this.form.get(e.path).setValue(i)}onSubmit(e){return this._submittedReactive.set(!0),kt(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new de(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this._submittedReactive.set(!1),this.form._events.next(new ce(this.form))}_updateDomValue(){this.directives.forEach(e=>{let i=e.control,r=this.form.get(e.path);i!==r&&(ee(i||null,e),Rt(r)&&(Q(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let i=this.form.get(e.path);Ot(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){let i=this.form.get(e.path);i&&xt(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){me(this.form,this),this._oldForm&&ne(this._oldForm,this)}_checkFormPresent(){this.form}static \u0275fac=function(i){return new(i||n)(o(N,10),o(O,10),o(x,8))};static \u0275dir=l({type:n,selectors:[["","formGroup",""]],hostBindings:function(i,r){i&1&&v("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[h([Zt]),u,P]})}return n})(),Xt={provide:f,useExisting:c(()=>it)},it=(()=>{class n extends Tt{name=null;constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r)}_checkParentType(){st(this._parent)}static \u0275fac=function(i){return new(i||n)(o(f,13),o(N,10),o(O,10))};static \u0275dir=l({type:n,selectors:[["","formGroupName",""]],inputs:{name:[0,"formGroupName","name"]},standalone:!1,features:[h([Xt]),u]})}return n})(),Yt={provide:f,useExisting:c(()=>rt)},rt=(()=>{class n extends f{_parent;name=null;constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r)}ngOnInit(){this._checkParentType(),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return re(this.name==null?this.name:this.name.toString(),this._parent)}_checkParentType(){st(this._parent)}static \u0275fac=function(i){return new(i||n)(o(f,13),o(N,10),o(O,10))};static \u0275dir=l({type:n,selectors:[["","formArrayName",""]],inputs:{name:[0,"formArrayName","name"]},standalone:!1,features:[h([Yt]),u]})}return n})();function st(n){return!(n instanceof it)&&!(n instanceof nt)&&!(n instanceof rt)}var Kt={provide:g,useExisting:c(()=>Jt)},Jt=(()=>{class n extends g{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(e){}model;update=new A;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,i,r,s,a){super(),this._ngModelWarningConfig=a,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=ve(this,s)}ngOnChanges(e){this._added||this._setUpControl(),_e(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 re(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}static \u0275fac=function(i){return new(i||n)(o(f,13),o(N,10),o(O,10),o(_,10),o(ye,8))};static \u0275dir=l({type:n,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[h([Kt]),u,P]})}return n})(),Qt={provide:_,useExisting:c(()=>at),multi:!0};function ot(n,t){return n==null?`${t}`:(t&&typeof t=="object"&&(t="Object"),`${n}: ${t}`.slice(0,50))}function en(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;writeValue(e){this.value=e;let i=this._getOptionId(e),r=ot(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=en(e);return this._optionMap.has(i)?this._optionMap.get(i):e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=b(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(i,r){i&1&&v("change",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[h([Qt]),u]})}return n})(),Fn=(()=>{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(ot(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))}static \u0275fac=function(i){return new(i||n)(o(M),o(E),o(at,9))};static \u0275dir=l({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})(),tn={provide:_,useExisting:c(()=>lt),multi:!0};function Ge(n,t){return n==null?`${t}`:(typeof t=="string"&&(t=`'${t}'`),t&&typeof t=="object"&&(t="Object"),`${n}: ${t}`.slice(0,50))}function nn(n){return n.split(":")[0]}var lt=(()=>{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.toString())>-1)}}else i=(r,s)=>{r._setSelected(!1)};this._optionMap.forEach(i)}registerOnChange(e){this.onChange=i=>{let r=[],s=i.selectedOptions;if(s!==void 0){let a=s;for(let m=0;m<a.length;m++){let L=a[m],se=this._getOptionValue(L.value);r.push(se)}}else{let a=i.options;for(let m=0;m<a.length;m++){let L=a[m];if(L.selected){let se=this._getOptionValue(L.value);r.push(se)}}}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=nn(e);return this._optionMap.has(i)?this._optionMap.get(i)._value:e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=b(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(i,r){i&1&&v("change",function(a){return r.onChange(a.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[h([tn]),u]})}return n})(),wn=(()=>{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(Ge(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._select?(this._value=e,this._setElementValue(Ge(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)(o(M),o(E),o(lt,9))};static \u0275dir=l({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})();var ut=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=q({type:n});static \u0275inj=W({})}return n})(),fe=class extends I{constructor(t,e,i){super(pe(e),ge(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;at(t){return this.controls[this._adjustIndex(t)]}push(t,e={}){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(t,e,i={}){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(t,e={}){let i=this._adjustIndex(t);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(t,e,i={}){let r=this._adjustIndex(t);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){et(this,!1,t),t.forEach((i,r)=>{Qe(this,!1,r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(t.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t=[],e={}){this._forEachChild((i,r)=>{i.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(t=>t.getRawValue())}clear(t={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:t.emitEvent}))}_adjustIndex(t){return t<0?t+this.length:t}_syncPendingControls(){let t=this.controls.reduce((e,i)=>i._syncPendingControls()?!0:e,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){this.controls.forEach((e,i)=>{t(e,i)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_allControlsDisabled(){for(let t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}_find(t){return this.at(t)??null}};function Re(n){return!!n&&(n.asyncValidators!==void 0||n.validators!==void 0||n.updateOn!==void 0)}var In=(()=>{class n{useNonNullable=!1;get nonNullable(){let e=new n;return e.useNonNullable=!0,e}group(e,i=null){let r=this._reduceControls(e),s={};return Re(i)?s=i:i!==null&&(s.validators=i.validator,s.asyncValidators=i.asyncValidator),new J(r,s)}record(e,i=null){let r=this._reduceControls(e);return new he(r,i)}control(e,i,r){let s={};return this.useNonNullable?(Re(i)?s=i:(s.validators=i,s.asyncValidators=r),new U(e,p(d({},s),{nonNullable:!0}))):new U(e,i,r)}array(e,i,r){let s=e.map(a=>this._createControl(a));return new fe(s,i,r)}_reduceControls(e){let i={};return Object.keys(e).forEach(r=>{i[r]=this._createControl(e[r])}),i}_createControl(e){if(e instanceof U)return e;if(e instanceof I)return e;if(Array.isArray(e)){let i=e[0],r=e.length>1?e[1]:null,s=e.length>2?e[2]:null;return this.control(i,r,s)}else return this.control(e)}static \u0275fac=function(i){return new(i||n)};static \u0275prov=oe({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var Sn=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:x,useValue:e.callSetDisabledState??H}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=q({type:n});static \u0275inj=W({imports:[ut]})}return n})(),Nn=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:ye,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:x,useValue:e.callSetDisabledState??H}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=q({type:n});static \u0275inj=W({imports:[ut]})}return n})();export{ct as a,je as b,Ie as c,bn as d,An as e,U as f,Bt as g,En as h,Ht as i,Wt as j,zt as k,nt as l,it as m,rt as n,Jt as o,Fn as p,wn as q,In as r,Sn as s,Nn as t};
@@ -1 +1 @@
1
- import{a as R,b as te}from"./chunk-DNHLTHLR.js";import{b as G}from"./chunk-2ORXOP6M.js";import{a as L,b as K,c as S,d as U,e as z,h as j,l as V,o as q,r as H,t as Q}from"./chunk-CL3S2VV2.js";import{a as oe}from"./chunk-TXYVWITT.js";import{a as v}from"./chunk-GTFXUW4R.js";import{a as W,f as J,g as Y,k as Z,v as ee}from"./chunk-XVGRR5A7.js";import{H as b,X as w,Y as B}from"./chunk-YI6L4R7Z.js";import"./chunk-P7G2XT2C.js";import{c as h}from"./chunk-CH4OZJBV.js";import"./chunk-R5JN4Q6V.js";import{Ab as D,E,Eb as r,Fb as n,Gb as a,L as M,Lc as O,Qb as l,Ra as s,Rb as c,Sb as f,Wb as P,X as _,Za as g,fb as I,ic as k,lb as x,lc as y,sc as X,vb as C,xb as T}from"./chunk-JDQIBNR4.js";import"./chunk-C6Q5SG76.js";var ne=()=>["/"];function ie(d,e){d&1&&(r(0,"spk-form-field")(1,"label",17),f(2,6),n(),a(3,"input",18),n(),r(4,"spk-form-field")(5,"label",19),f(6,7),n(),a(7,"input",20),n())}var u=new H,N=class d{#o=_(v);#e=_(b);#t=_(w);#n=_(h);#i=_(oe);isExporting=g(!1);exportType=g("file");exportedCmd=g(null);exportForm=u.group({exportPasswords:u.control(!0),encryption:u.control(!1,[S.required,te()]),password:u.control("",[R(e=>e?.value.encryption,[S.required])]),repeatPassword:u.control("",[R(e=>e?.value.encryption,[S.required])])});exportFormSignal=G(this.exportForm.valueChanges);encryptionFieldSignal=O(()=>this.exportFormSignal()?.encryption??!1);activeBackup=O(()=>this.#i.backups().find(e=>e.Backup?.ID===this.#e.snapshot.params.id));submit(){this.isExporting.set(!0),this.exportType()==="file"?this.#o.postApiV1AuthIssuetokenByOperation({operation:"export"}).pipe(M(e=>{let i=t=>{let o=Object.entries(t);return o?"?"+o.map(([F,m])=>`${F}=${m}`).join("&"):""};return this.#n.get(`/api/v1/backup/${this.#e.snapshot.params.id}/export${i({exportPasswords:this.exportFormSignal()?.exportPasswords??void 0,passphrase:this.exportFormSignal()?.password??void 0,token:e.Token})}`,{responseType:"blob"})}),E(()=>this.isExporting.set(!1))).subscribe({next:e=>{let t=this.activeBackup()?.Backup?.Name??"Backup",o=this.exportFormSignal()?.encryption?"aes":"json";this.downloadFile(e,`${t}.${o}`),this.#t.navigate(["/"])},error:e=>{console.log("err",e)}}):this.#o.getApiV1BackupByIdExportCmdline({id:this.#e.snapshot.params.id,exportPasswords:this.exportFormSignal()?.exportPasswords??void 0,passphrase:this.exportFormSignal()?.password??void 0}).pipe(E(()=>this.isExporting.set(!1))).subscribe({next:e=>{console.log("res",e),this.exportedCmd.set(e.Command??null)},error:e=>{console.log("err",e)}})}downloadFile(e,i){let t=window.URL.createObjectURL(e),o=document.createElement("a");o.href=t,o.download=i,o.click(),window.URL.revokeObjectURL(t)}static \u0275fac=function(i){return new(i||d)};static \u0275cmp=I({type:d,selectors:[["app-export"]],decls:27,vars:12,consts:()=>{let e;e=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let i;i=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:export${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON: Export `;let t;t=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SPK_ICON:terminal-window${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SPK_ICON: As command line `;let o;o=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:file${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: To file `;let F;F=$localize` Export passwords ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let m;m=$localize` Encrypt file ${"\uFFFD#25\uFFFD\uFFFD/#25\uFFFD"}:TAG_INPUT:`;let A;A=$localize`Password`;let $;return $=$localize`Repeat password`,[e,i,t,o,F,m,A,$,[1,"actions"],["spk-button","",1,"outlined",3,"routerLink"],["spk-button","",1,"raised","primary",3,"click"],["autocomplete","off",3,"formGroup"],["type","button",3,"click"],[1,"raised","primary"],["type","checkbox","formControlName","exportPasswords"],[1,"primary","raised"],["type","checkbox","formControlName","encryption"],["for","password"],["type","password","id","password","formControlName","password"],["for","repeatPassword"],["type","password","id","repeatPassword","formControlName","repeatPassword"]]},template:function(i,t){if(i&1&&(r(0,"header")(1,"h3"),k(2," Export backup configuration "),r(3,"div",8)(4,"button",9),l(5,0),a(6,"spk-icon"),c(),n(),r(7,"button",10),P("click",function(){return t.submit()}),l(8,1),a(9,"spk-icon"),c(),n()()(),r(10,"p"),k(11),n()(),r(12,"form",11)(13,"spk-button-group")(14,"button",12),P("click",function(){return t.exportType.set("cmd")}),l(15,2),a(16,"spk-icon"),c(),n(),r(17,"button",12),P("click",function(){return t.exportType.set("file")}),l(18,3),a(19,"spk-icon"),c(),n()(),r(20,"spk-toggle",13),l(21,4),a(22,"input",14),c(),n(),r(23,"spk-toggle",15),l(24,5),a(25,"input",16),c(),n(),x(26,ie,8,0),n()),i&2){let o;s(4),C("routerLink",X(11,ne)),s(3),T("loading",t.isExporting()),s(4),y("#",(o=t.activeBackup())==null||o.Backup==null?null:o.Backup.ID,": ",(o=t.activeBackup())==null||o.Backup==null?null:o.Backup.Name,""),s(),C("formGroup",t.exportForm),s(2),T("active",t.exportType()==="cmd"),s(3),T("active",t.exportType()==="file"),s(9),D(t.encryptionFieldSignal()?26:-1)}},dependencies:[Q,j,K,L,U,z,V,q,B,J,ee,W,Z,Y],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}"],changeDetection:0})};export{N as default};
1
+ import{a as R,b as te}from"./chunk-DNHLTHLR.js";import{b as G}from"./chunk-KFGIVU27.js";import{a as L,b as K,c as S,d as U,e as z,h as j,l as V,o as q,r as H,t as Q}from"./chunk-7SJHYZC5.js";import{a as oe}from"./chunk-QZCTOSPE.js";import{a as v}from"./chunk-PIDBEXSZ.js";import{a as W,f as J,g as Y,k as Z,v as ee}from"./chunk-EHV3OZDB.js";import{H as b,X as w,Y as B}from"./chunk-J3H4BCHI.js";import"./chunk-P6LV5I2K.js";import{c as h}from"./chunk-5XX7BU4I.js";import"./chunk-5ZK3D2RS.js";import{Ab as D,E,Eb as r,Fb as n,Gb as a,Kc as O,L as M,Qb as l,Ra as s,Rb as c,Sb as f,Wb as P,X as _,Za as g,fb as I,ic as k,lb as x,lc as y,rc as X,vb as C,xb as T}from"./chunk-MR4RE3IB.js";import"./chunk-C6Q5SG76.js";var ne=()=>["/"];function ie(d,e){d&1&&(r(0,"spk-form-field")(1,"label",17),f(2,6),n(),a(3,"input",18),n(),r(4,"spk-form-field")(5,"label",19),f(6,7),n(),a(7,"input",20),n())}var u=new H,N=class d{#o=_(v);#e=_(b);#t=_(w);#n=_(h);#i=_(oe);isExporting=g(!1);exportType=g("file");exportedCmd=g(null);exportForm=u.group({exportPasswords:u.control(!0),encryption:u.control(!1,[S.required,te()]),password:u.control("",[R(e=>e?.value.encryption,[S.required])]),repeatPassword:u.control("",[R(e=>e?.value.encryption,[S.required])])});exportFormSignal=G(this.exportForm.valueChanges);encryptionFieldSignal=O(()=>this.exportFormSignal()?.encryption??!1);activeBackup=O(()=>this.#i.backups().find(e=>e.Backup?.ID===this.#e.snapshot.params.id));submit(){this.isExporting.set(!0),this.exportType()==="file"?this.#o.postApiV1AuthIssuetokenByOperation({operation:"export"}).pipe(M(e=>{let i=t=>{let o=Object.entries(t);return o?"?"+o.map(([F,m])=>`${F}=${m}`).join("&"):""};return this.#n.get(`/api/v1/backup/${this.#e.snapshot.params.id}/export${i({exportPasswords:this.exportFormSignal()?.exportPasswords??void 0,passphrase:this.exportFormSignal()?.password??void 0,token:e.Token})}`,{responseType:"blob"})}),E(()=>this.isExporting.set(!1))).subscribe({next:e=>{let t=this.activeBackup()?.Backup?.Name??"Backup",o=this.exportFormSignal()?.encryption?"aes":"json";this.downloadFile(e,`${t}.${o}`),this.#t.navigate(["/"])},error:e=>{console.log("err",e)}}):this.#o.getApiV1BackupByIdExportCmdline({id:this.#e.snapshot.params.id,exportPasswords:this.exportFormSignal()?.exportPasswords??void 0,passphrase:this.exportFormSignal()?.password??void 0}).pipe(E(()=>this.isExporting.set(!1))).subscribe({next:e=>{console.log("res",e),this.exportedCmd.set(e.Command??null)},error:e=>{console.log("err",e)}})}downloadFile(e,i){let t=window.URL.createObjectURL(e),o=document.createElement("a");o.href=t,o.download=i,o.click(),window.URL.revokeObjectURL(t)}static \u0275fac=function(i){return new(i||d)};static \u0275cmp=I({type:d,selectors:[["app-export"]],decls:27,vars:12,consts:()=>{let e;e=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let i;i=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:export${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON: Export `;let t;t=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SPK_ICON:terminal-window${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SPK_ICON: As command line `;let o;o=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:file${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: To file `;let F;F=$localize` Export passwords ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let m;m=$localize` Encrypt file ${"\uFFFD#25\uFFFD\uFFFD/#25\uFFFD"}:TAG_INPUT:`;let A;A=$localize`Password`;let $;return $=$localize`Repeat password`,[e,i,t,o,F,m,A,$,[1,"actions"],["spk-button","",1,"outlined",3,"routerLink"],["spk-button","",1,"raised","primary",3,"click"],["autocomplete","off",3,"formGroup"],["type","button",3,"click"],[1,"raised","primary"],["type","checkbox","formControlName","exportPasswords"],[1,"primary","raised"],["type","checkbox","formControlName","encryption"],["for","password"],["type","password","id","password","formControlName","password"],["for","repeatPassword"],["type","password","id","repeatPassword","formControlName","repeatPassword"]]},template:function(i,t){if(i&1&&(r(0,"header")(1,"h3"),k(2," Export backup configuration "),r(3,"div",8)(4,"button",9),l(5,0),a(6,"spk-icon"),c(),n(),r(7,"button",10),P("click",function(){return t.submit()}),l(8,1),a(9,"spk-icon"),c(),n()()(),r(10,"p"),k(11),n()(),r(12,"form",11)(13,"spk-button-group")(14,"button",12),P("click",function(){return t.exportType.set("cmd")}),l(15,2),a(16,"spk-icon"),c(),n(),r(17,"button",12),P("click",function(){return t.exportType.set("file")}),l(18,3),a(19,"spk-icon"),c(),n()(),r(20,"spk-toggle",13),l(21,4),a(22,"input",14),c(),n(),r(23,"spk-toggle",15),l(24,5),a(25,"input",16),c(),n(),x(26,ie,8,0),n()),i&2){let o;s(4),C("routerLink",X(11,ne)),s(3),T("loading",t.isExporting()),s(4),y("#",(o=t.activeBackup())==null||o.Backup==null?null:o.Backup.ID,": ",(o=t.activeBackup())==null||o.Backup==null?null:o.Backup.Name,""),s(),C("formGroup",t.exportForm),s(2),T("active",t.exportType()==="cmd"),s(3),T("active",t.exportType()==="file"),s(9),D(t.encryptionFieldSignal()?26:-1)}},dependencies:[Q,j,K,L,U,z,V,q,B,J,ee,W,Z,Y],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}"],changeDetection:0})};export{N as default};
@@ -0,0 +1 @@
1
+ import{a as o}from"./chunk-OVIL3KMN.js";import{X as i,ib as s}from"./chunk-MR4RE3IB.js";import"./chunk-C6Q5SG76.js";var p=class r{#t=i(o);transform(t,...e){if(!t)return"";let n=t.split(".")[0],a=parseInt(n.split(":")[0])??0,m=parseInt(n.split(":")[1])??0,u=parseInt(n.split(":")[2])??0;return this.#t.duration({hours:a,minutes:m,seconds:u}).humanize()}static \u0275fac=function(e){return new(e||r)};static \u0275pipe=s({name:"durationFormat",type:r,pure:!0})};export{p as DurationFormatPipe};
@@ -0,0 +1 @@
1
+ import{j as a,k as b}from"./chunk-L6DT3BQG.js";import"./chunk-DE2AAZUP.js";import"./chunk-DNHLTHLR.js";import"./chunk-V7APGUBT.js";import"./chunk-KFGIVU27.js";import"./chunk-7SJHYZC5.js";import"./chunk-PIDBEXSZ.js";import"./chunk-EHV3OZDB.js";import"./chunk-J3H4BCHI.js";import"./chunk-P6LV5I2K.js";import"./chunk-5XX7BU4I.js";import"./chunk-5ZK3D2RS.js";import"./chunk-MR4RE3IB.js";import"./chunk-C6Q5SG76.js";export{a as createScheduleForm,b as default};
@@ -1 +1 @@
1
- import{a as ue}from"./chunk-ZTDQQPKO.js";import{s as ge}from"./chunk-CL3S2VV2.js";import{a as pe}from"./chunk-GTFXUW4R.js";import{a as D,f as he,k as _e,l as fe,n as me,v as Ce}from"./chunk-XVGRR5A7.js";import{ia as de}from"./chunk-R5JN4Q6V.js";import{Ab as P,Cb as te,Db as ne,E as V,Eb as p,Fb as u,Gb as ie,Jb as X,Kb as I,Lc as B,Nc as k,Ra as h,Sb as A,Tb as oe,Ub as re,Wb as O,X as H,Xb as g,Yb as L,Za as y,Zb as x,_a as q,ab as Z,ea as w,fa as N,fb as R,fc as Q,gc as se,hc as z,ic as b,kc as le,lb as v,qa as G,ra as m,tc as W,uc as ae,v as Y,vb as K,wb as ee,xb as E,zc as ce}from"./chunk-JDQIBNR4.js";import{a as $,b as j}from"./chunk-C6Q5SG76.js";var Me=["treeContainer"],ye=["formRef"],Oe=[[["label"]],[["label"]],[["input"]]],Se=["label","label","input"],Fe=(i,t)=>t.id,we=i=>({children:i,level:0}),ve=i=>({$implicit:i}),Ne=(i,t)=>({children:i,level:t});function ke(i,t){if(i&1){let e=I();p(0,"spk-button-group")(1,"button",13),O("click",function(){w(e);let s=g();return N(s.pathDiscoveryMethod.set("browse"))}),A(2,4),u(),p(3,"button",13),O("click",function(){w(e);let s=g();return N(s.pathDiscoveryMethod.set("path"))}),A(4,5),u()()}if(i&2){let e=g();h(),E("active",e.pathDiscoveryMethod()==="browse"),h(2),E("active",e.pathDiscoveryMethod()==="path")}}function Re(i,t){i&1&&ie(0,"spk-progress-bar",9)}function Ie(i,t){i&1&&(p(0,"spk-icon",16),b(1,"folder-open"),u())}function Ae(i,t){i&1&&(p(0,"spk-icon"),b(1,"file"),u())}function Le(i,t){i&1&&(p(0,"spk-icon",16),b(1,"folder"),u())}function We(i,t){if(i&1&&v(0,Ie,2,0,"spk-icon",16)(1,Ae,2,0,"spk-icon")(2,Le,2,0,"spk-icon",16),i&2){let e=g(2).$implicit;P(e.children.length?0:e.cls==="file"?1:2)}}function Be(i,t){i&1&&(p(0,"spk-icon",16),b(1,"desktop-tower"),u())}function De(i,t){i&1&&X(0)}function $e(i,t){if(i&1&&v(0,De,1,0,"ng-container",10),i&2){let e=g(2).$implicit,n=g().$implicit;g();let s=z(7);K("ngTemplateOutlet",s)("ngTemplateOutletContext",W(5,ve,ae(2,Ne,e.children,n.level+1)))}}function je(i,t){if(i&1){let e=I();p(0,"div",14,3),O("click",function(){w(e);let s=g().$implicit,o=g(2);return N(o.toggleNode(s.id,s))}),p(2,"div",15),v(3,We,3,1)(4,Be,2,0,"spk-icon",16),u(),p(5,"div",17),O("click",function(s){w(e);let o=g().$implicit,r=g(2);return N(r.toggleSelectedNode(s,o))}),b(6),u()(),v(7,$e,1,7,"ng-container")}if(i&2){let e=g().$implicit,n=g(2);E("accepted",e.accepted===!0)("active",e.evalState===n.TreeEvalEnum.Included)("indeterminate",e.isIndeterminate)("open",e.children.length)("usually-hidden",e.hidden),h(3),P(e.id!=="/"?3:4),h(3),le(" ",e.text," "),h(),P(e.children.length>0?7:-1)}}function Ve(i,t){if(i&1&&v(0,je,8,13),i&2){let e=t.$implicit,n=g(2);P(e.hidden&&n._showHiddenNodes()||!e.hidden?0:-1)}}function He(i,t){if(i&1&&(p(0,"spk-list"),te(1,Ve,1,1,null,null,Fe),u()),i&2){let e=t.$implicit;ee("padding-left",e.level*.5,"rem"),h(),ne(e.children)}}function Ge(i,t){i&1&&X(0)}function qe(i,t){if(i&1){let e=I();p(0,"spk-toggle",18),O("click",function(){w(e);let s=g();return N(s._showHiddenNodes.set(!s._showHiddenNodes()))}),A(1,6),u()}if(i&2){let e=g();E("active",e._showHiddenNodes()),h(),oe(e.showFiles()?"files":"folders"),re(1)}}var Ee=(o=>(o[o.ExcludedByParent=-2]="ExcludedByParent",o[o.Excluded=-1]="Excluded",o[o.None=0]="None",o[o.Included=1]="Included",o[o.IncludedByParent=2]="IncludedByParent",o))(Ee||{}),U=class i{#t=H(pe);#r=H(ue);multiSelect=m(!1);disabled=m(!1);showFiles=m(!1);selectFiles=m(!1);accepts=m(null);startingPath=m(null);rootPath=m(void 0);backupSettings=m(null);showHiddenNodes=m(!1);includes=G();excludes=G();_showHiddenNodes=y(!1);treeContainerRef=q("treeContainer");formRef=q("formRef");pathDiscoveryMethod=y("browse");isLoading=y(!1);currentPath=y("/");#e=y(null);treeSearchQuery=y("");treeNodes=y([]);filterGroups=this.#r.filterGroups();isByBackupSettings=B(()=>this.rootPath()&&this.backupSettings()?.id&&this.backupSettings()?.time);searchableTreeNodes=B(()=>{let t=this.treeSearchQuery();return t?this.treeNodes().filter(e=>e.text?.toLowerCase().includes(t.toLowerCase())):this.treeNodes()});TreeEvalEnum=Ee;treeStructure=B(()=>{let t=this.showHiddenNodes(),e=this.currentPath().split("\0").filter(a=>a!==""&&a!=="/"),n=structuredClone(e);for(let a=0;a<n.length;a++){let _=n[a].slice(1);if(_.startsWith("{")&&_.endsWith("}")){let f=_.slice(1,-1),d=this.filterGroups?.FilterGroups[f];if(d&&d.length){let M=d.map(T=>`-${T}`);n.splice(a,1,...M)}}}let s=this.searchableTreeNodes(),o=new Map,r=this.rootPath(),C=this.accepts(),l=r?{id:r,resolvedpath:r,text:r?.replaceAll("/",""),parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"}:{id:"/",resolvedpath:"/",text:"Computer",parentPath:"",children:[],evalState:0,isIndeterminate:!1};C&&(l.accepted=!0),o.set("/",l);for(let a of s){let _=a.id.replace(r??"","").split("/").filter(Boolean),f="",d=l;for(let M of _){if(f+="/"+M,!o.has(f)){let T=a.hidden===!0&&t?0:this.#s(n,a.id,a.cls,d),S={id:a.id,isIndeterminate:this.isIndeterminate(n,a.id),evalState:T,parentPath:f,resolvedpath:a.id?.startsWith("%")?a.resolvedpath+"/":f,hidden:a.hidden,text:a.text,cls:a.cls,children:[]};C&&(S.accepted=this.matchAccepts(C,S)),o.set(f,S),d.children.push(S)}d=o.get(f)}}return[l]});#s(t,e,n,s){if(s.evalState===-1)return-2;let o=0,r=t.filter(l=>!l.startsWith("-")&&!l.startsWith("+")),C=t.filter(l=>l.startsWith("-")||l.startsWith("+"));if(r.length===0)return o;for(let l=0;l<r.length;l++){let a=r[l];if(e?.startsWith(a)){o=1;break}}if(C.length===0)return o;for(let l=0;l<C.length;l++){let a=C[l],c=a.slice(1),_=a.startsWith("-")?"exclude":"include";if(c.startsWith("/")&&c.endsWith("/")){if(n!=="folder")continue;if(e===c){o=_==="include"?1:-1;break}}if(c.startsWith("*")&&c.endsWith("*/")){if(n!=="folder")continue;let d=c.slice(1,-2);if(d==="")break;if(e?.includes(d+"/")){o=_==="include"?1:-1;break}}if(c.startsWith("[.*")&&c.endsWith("[^\\/]*]")){if(n!=="file")continue;let d=c.slice(3,-7);if(new RegExp(d).test(e)){o=_==="include"?1:-1;break}}if(c.startsWith("[")&&c.endsWith("]")){let d=c.slice(1,-1),M=this.translateCSharpRegex(d);if(new RegExp(`${M}`).test(e)){o=_==="include"?1:-1;break}}if(c.startsWith("*.")){if(n!=="file"||c.replace("*.","").length===0)continue;if(this.#n(e,c,!0)){o=_==="include"?1:-1;break}}if(c==="")continue;if(this.#n(e,c,!0)){o=_==="include"?1:-1;break}}return o}translateCSharpRegex(t){let e=t;e=e.replace(/^@/,"");let n=/\(\?<(?<name>\w+)>(?<pattern>[^)]+)\)/g;return e=e.replace(n,(s,o,r)=>`(${r})`),e=e.replace(/\\/g,"\\\\"),e}isIndeterminate(t,e){return t.some(n=>n.startsWith(e))}#n(t,e,n=!1){let s=e.replace(/\*/g,".*").replace(/\?/g,".").replace(/\[!([^\]]+)\]/g,"[^$1]");return new RegExp(`${s}${n?"$":""}`).test(t)}showHiddenNodesEffect=k(()=>this._showHiddenNodes.set(this.showHiddenNodes()));pathDiscoveryMethodEffect=k(()=>{let t=this.pathDiscoveryMethod(),e=this.#e();t==="browse"&&e&&this.currentPath.set(e.value)});matchAccepts(t,e){if(!t||e.cls==="folder"||e.id==="/")return!0;let n=t.split(",");if(n.length===0)return!0;let s="."+e.id.slice(e.id.indexOf("."));return s?n.some(o=>s.endsWith(o)):!1}currentPathEffect=k(()=>{let t=this.#e();t&&(t.value=this.currentPath(),t.dispatchEvent(new Event("input")))});inputValueChangeAbortController=null;inputRefEffect=k(()=>{let t=this.formRef()?.nativeElement?.querySelector("input");t&&(this.#l(t),this.inputValueChangeAbortController&&this.inputValueChangeAbortController.abort(),this.inputValueChangeAbortController=new AbortController,t.addEventListener("inputValueChanged",e=>{this.currentPath.set(e.detail.value)},{signal:this.inputValueChangeAbortController.signal}),this.#e.set(t),t.autocomplete="off")});ngOnInit(){let t=this.startingPath();t?(this.currentPath.set(t),this.#d(t)):this.#o(null,this.rootPath())}toggleSelectedNode(t,e){if(e.id==="/"||(t.stopPropagation(),e.evalState===-2))return;if(this.selectFiles()&&e.cls==="folder"){this.toggleNode(e.id,e);return}if(this.accepts()&&!e.accepted)return;let s=this.currentPath().split("\0").filter(r=>r!==""&&r!=="/"),o=this.isChildOfSelected(e)?`-${e.id}`:e.id;this.multiSelect()?s.includes(e.id)?this.currentPath.set(s.filter(r=>r!==e.id).join("\0")):s.some(r=>r.startsWith(o))?this.currentPath.set(s.filter(r=>r!==o).join("\0")):this.currentPath.set([...s,o].join("\0")):s.includes(e.id)?this.currentPath.set(s.filter(r=>r!==e.id).join("\0")):this.currentPath.set(e.id)}isChildOfSelected(t){return this.currentPath().split("\0").filter(n=>n!==""&&n!=="/").some(n=>t.id?.startsWith(n)||`-${t.id}`.startsWith(n))}toggleNode(t,e=null){e?.cls==="folder"&&(e?.children.length?this.treeNodes.update(n=>n.filter(s=>!s.id?.startsWith(e.id)||s.id===e.id)):this.#o(e,t))}#l(t){return Object.defineProperty(t,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").get.call(this)},set(e){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").set.call(this,e),this.dispatchEvent(new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:e}})),e}}),t}#a(t){return this.#t.postApiV1Filesystem({showHidden:!0,requestBody:{path:t},onlyFolders:!this.showFiles()})}#c(t){let e=this.backupSettings(),n={id:e.id,time:e.time,prefixOnly:!1,folderContents:!0};return t&&(n.filter="@"+t),this.#t.getApiV1BackupByIdFiles(n)}#i(t){return this.isByBackupSettings()?this.#c(t):this.#a(t)}#d(t){let e=t.split("\0").filter(r=>r.startsWith("-")).map(r=>r.slice(1,-1)),n=t.split("\0").filter(r=>!r.startsWith("-")).filter(Boolean),s=n.map(r=>r.split("/").filter(Boolean)),o=[this.rootPath()??"/"];s.forEach(r=>{r.forEach((C,l)=>{let a=r.slice(0,l+1).join("/"),c=a.startsWith("%")?a:"/"+a;o.includes(c)||o.push(c)})}),this.isLoading.set(!0),Y([...o.map(r=>this.#i(r))]).pipe(V(()=>this.isLoading.set(!1))).subscribe({next:r=>{this.treeNodes.update(C=>{let l=r.flatMap(c=>c.map(_=>{let f=_.id,d=f&&f.split("/").filter(Boolean).slice(0,-1).join("/"),T="/"+(f&&f.split("/").filter(Boolean).join("/")),S=n.findIndex(F=>this.multiSelect()?T.startsWith(F):T===F)>-1,Pe=n.findIndex(F=>F===f)>-1,Te=e.findIndex(F=>F===T)>-1;return j($({},_),{parentPath:d.startsWith("%")?d:"/"+d,isSelected:S&&!Te||Pe})}));return[...new Map([...C,...l].map(c=>[c.resolvedpath??c.id,c])).values()]})}})}#o(t=null,e="/"){this.isLoading.set(!0),this.#i(e).pipe(V(()=>this.isLoading.set(!1))).subscribe({next:n=>{let s=this.isByBackupSettings()?n.Files.map(o=>({text:o.Path.split("/").filter(r=>r!=="").pop(),id:o.Path,cls:o.Path.endsWith("/")?"folder":"file",leaf:t!==null,resolvedpath:o.Path,hidden:!1})):n;this.treeNodes.update(o=>{let r=s.map(l=>{let a=l.id.startsWith("%")&&l.id.endsWith("%")||l.id.endsWith("/")?"folder":"file";return j($({},l),{cls:a,parentPath:e})});return[...new Map([...o,...r].map(l=>[l.resolvedpath??l.id,l])).values()]})}})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=R({type:i,selectors:[["app-file-tree"]],viewQuery:function(e,n){e&1&&(Q(n.treeContainerRef,Me,5),Q(n.formRef,ye,5)),e&2&&se(2)},hostVars:2,hostBindings:function(e,n){e&2&&E("disabled",n.disabled())},inputs:{multiSelect:[1,"multiSelect"],disabled:[1,"disabled"],showFiles:[1,"showFiles"],selectFiles:[1,"selectFiles"],accepts:[1,"accepts"],startingPath:[1,"startingPath"],rootPath:[1,"rootPath"],backupSettings:[1,"backupSettings"],showHiddenNodes:[1,"showHiddenNodes"]},outputs:{includes:"includes",excludes:"excludes"},ngContentSelectors:Se,decls:15,vars:15,consts:()=>{let t;t=$localize` Browser path `;let e;e=$localize` Manually type path `;let n;return n=$localize` Show hidden ${"\uFFFD0\uFFFD"}:INTERPOLATION: `,[["treeContainer",""],["recursiveTree",""],["formRef",""],["treeNode",""],t,e,n,[1,"section"],[1,"browse-files"],[1,"indeterminate","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"primary","raised","browse-files-toggle",3,"active"],[1,"form-field"],["type","button",3,"click"],["action","",3,"click"],[1,"icon"],[1,"spk-primary"],[1,"text",3,"click"],[1,"primary","raised","browse-files-toggle",3,"click"]]},template:function(e,n){if(e&1&&(L(Oe),v(0,ke,5,4,"spk-button-group"),p(1,"div",7),x(2,0,["ngProjectAs","label",5,["label"]]),p(3,"div",8,0),v(5,Re,1,0,"spk-progress-bar",9)(6,He,3,2,"ng-template",null,1,ce)(8,Ge,1,0,"ng-container",10),u(),v(9,qe,2,3,"spk-toggle",11),u(),p(10,"div",12,2)(12,"spk-form-field"),x(13,1,["ngProjectAs","label",5,["label"]]),x(14,2,["ngProjectAs","input",5,["input"]]),u()()),e&2){let s=z(7);P(n.multiSelect()?-1:0),h(),E("hidden",n.pathDiscoveryMethod()!=="browse"),h(2),E("visualize-accepted",n.accepts()),h(2),P(n.isLoading()?5:-1),h(3),K("ngTemplateOutlet",s)("ngTemplateOutletContext",W(13,ve,W(11,we,n.treeStructure()))),h(),P(n.accepts()?-1:9),h(),E("hidden",n.pathDiscoveryMethod()!=="path")}},dependencies:[he,Ce,D,_e,fe,me,de,ge],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1rem}.disabled[_nghost-%COMP%]{opacity:.5;-webkit-user-select:none;user-select:none;pointer-events:none;position:relative}.disabled[_nghost-%COMP%]:before{content:"";position:absolute;inset:0;background:transparent}.fill[_nghost-%COMP%]{height:auto;overflow:hidden;flex:1 0}.fill[_nghost-%COMP%] .section[_ngcontent-%COMP%]{height:auto;overflow:hidden;flex:1 0;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto 1fr;grid-template-areas:"label toggle" "tree tree"}.fill[_nghost-%COMP%] .browse-files[_ngcontent-%COMP%]{resize:none;height:initial;grid-area:tree}.fill[_nghost-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.fill[_nghost-%COMP%] spk-toggle[_ngcontent-%COMP%]{grid-area:toggle;flex-direction:row-reverse}.section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.form-field.hidden[_ngcontent-%COMP%]{display:none}.browse-files[_ngcontent-%COMP%]{display:flex;gap:.5rem;padding:.5rem 1rem;height:12.5rem;border:1px solid var(--base-level-40);border-radius:var(--shape-3);overflow:auto;resize:vertical;background:var(--base-level-10);position:relative}.browse-files[_ngcontent-%COMP%] spk-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]:not(.accepted){opacity:.5}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action].accepted[_ngcontent-%COMP%]{opacity:1}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%]{--list-active-bg: var(--base-level-30);gap:.125rem;padding:0;height:min-content;min-width:min-content}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0;gap:.25rem;border:1px solid transparent}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].active[_ngcontent-%COMP%]{border-color:var(--base-level-40)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].indeterminate[_ngcontent-%COMP%]{border-color:var(--primary-level-40)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].usually-hidden[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;height:100%;width:max-content;display:flex;align-items:center}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:1.5rem;height:1.5rem;display:flex;align-items:center;justify-content:center;cursor:pointer}.browse-files-toggle[_ngcontent-%COMP%]{color:var(--base-level-60R)}.hidden[_ngcontent-%COMP%]{display:none}'],changeDetection:0})};var Ke=[[["","title",""]],[["","description",""]],[["","action",""]],"*"],Xe=["[title]","[description]","[action]","*"];function Qe(i,t){i&1&&b(0,"Title")}function ze(i,t){i&1&&(p(0,"spk-icon"),b(1,"caret-down"),u())}var J=class i{isActive=Z(!1);disallowToggle=m(!1);ngOnInit(){this.disallowToggle()&&this.isActive.set(!0)}toggle(){this.isActive.set(!this.isActive())}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=R({type:i,selectors:[["app-toggle-card"]],hostVars:2,hostBindings:function(e,n){e&2&&E("active",n.isActive())},inputs:{isActive:[1,"isActive"],disallowToggle:[1,"disallowToggle"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:Xe,decls:11,vars:1,consts:[[1,"title"],[3,"click"],[1,"actions"],[1,"content"]],template:function(e,n){e&1&&(L(Ke),p(0,"header")(1,"div",0)(2,"h3",1),O("click",function(){return n.disallowToggle()||n.toggle()}),x(3,0,null,Qe,1,0),v(5,ze,2,0,"spk-icon"),u(),x(6,1),u(),p(7,"div",2),x(8,2),u()(),p(9,"div",3),x(10,3),u()),e&2&&(h(5),P(n.disallowToggle()?-1:5))},dependencies:[D],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;border-radius:var(--shape-3);background-color:var(--base-level-20)}.active[_nghost-%COMP%] .content[_ngcontent-%COMP%]{max-height:1000px;transition:max-height 1s linear;padding:0 1rem 1rem}.active[_nghost-%COMP%] spk-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}[_nghost-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;font:var(--paragraph-10);cursor:pointer;-webkit-user-select:none;user-select:none}[_nghost-%COMP%] spk-icon[_ngcontent-%COMP%]{transform:rotate(0);transform-origin:center;transition:transform .2s ease}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem}header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:0 1rem;overflow:hidden;max-height:0;transition:max-height .25s linear,padding .25s linear}.content[_ngcontent-%COMP%]:empty{display:none}"],changeDetection:0})};export{U as a,J as b};
1
+ import{a as ue}from"./chunk-V7APGUBT.js";import{s as ge}from"./chunk-7SJHYZC5.js";import{a as pe}from"./chunk-PIDBEXSZ.js";import{a as D,f as he,k as _e,l as fe,n as me,v as Ce}from"./chunk-EHV3OZDB.js";import{ia as de}from"./chunk-5ZK3D2RS.js";import{Ab as P,Cb as te,Db as ne,E as V,Eb as p,Fb as u,Gb as ie,Jb as X,Kb as I,Kc as B,Mc as k,Ra as h,Sb as A,Tb as oe,Ub as re,Wb as O,X as H,Xb as g,Yb as L,Za as y,Zb as x,_a as q,ab as Z,ea as w,fa as N,fb as R,fc as Q,gc as se,hc as z,ic as b,kc as le,lb as v,qa as G,ra as m,sc as W,tc as ae,v as Y,vb as K,wb as ee,xb as E,yc as ce}from"./chunk-MR4RE3IB.js";import{a as $,b as j}from"./chunk-C6Q5SG76.js";var Me=["treeContainer"],ye=["formRef"],Oe=[[["label"]],[["label"]],[["input"]]],Se=["label","label","input"],Fe=(i,t)=>t.id,we=i=>({children:i,level:0}),ve=i=>({$implicit:i}),Ne=(i,t)=>({children:i,level:t});function ke(i,t){if(i&1){let e=I();p(0,"spk-button-group")(1,"button",13),O("click",function(){w(e);let s=g();return N(s.pathDiscoveryMethod.set("browse"))}),A(2,4),u(),p(3,"button",13),O("click",function(){w(e);let s=g();return N(s.pathDiscoveryMethod.set("path"))}),A(4,5),u()()}if(i&2){let e=g();h(),E("active",e.pathDiscoveryMethod()==="browse"),h(2),E("active",e.pathDiscoveryMethod()==="path")}}function Re(i,t){i&1&&ie(0,"spk-progress-bar",9)}function Ie(i,t){i&1&&(p(0,"spk-icon",16),b(1,"folder-open"),u())}function Ae(i,t){i&1&&(p(0,"spk-icon"),b(1,"file"),u())}function Le(i,t){i&1&&(p(0,"spk-icon",16),b(1,"folder"),u())}function We(i,t){if(i&1&&v(0,Ie,2,0,"spk-icon",16)(1,Ae,2,0,"spk-icon")(2,Le,2,0,"spk-icon",16),i&2){let e=g(2).$implicit;P(e.children.length?0:e.cls==="file"?1:2)}}function Be(i,t){i&1&&(p(0,"spk-icon",16),b(1,"desktop-tower"),u())}function De(i,t){i&1&&X(0)}function $e(i,t){if(i&1&&v(0,De,1,0,"ng-container",10),i&2){let e=g(2).$implicit,n=g().$implicit;g();let s=z(7);K("ngTemplateOutlet",s)("ngTemplateOutletContext",W(5,ve,ae(2,Ne,e.children,n.level+1)))}}function je(i,t){if(i&1){let e=I();p(0,"div",14,3),O("click",function(){w(e);let s=g().$implicit,o=g(2);return N(o.toggleNode(s.id,s))}),p(2,"div",15),v(3,We,3,1)(4,Be,2,0,"spk-icon",16),u(),p(5,"div",17),O("click",function(s){w(e);let o=g().$implicit,r=g(2);return N(r.toggleSelectedNode(s,o))}),b(6),u()(),v(7,$e,1,7,"ng-container")}if(i&2){let e=g().$implicit,n=g(2);E("accepted",e.accepted===!0)("active",e.evalState===n.TreeEvalEnum.Included)("indeterminate",e.isIndeterminate)("open",e.children.length)("usually-hidden",e.hidden),h(3),P(e.id!=="/"?3:4),h(3),le(" ",e.text," "),h(),P(e.children.length>0?7:-1)}}function Ve(i,t){if(i&1&&v(0,je,8,13),i&2){let e=t.$implicit,n=g(2);P(e.hidden&&n._showHiddenNodes()||!e.hidden?0:-1)}}function He(i,t){if(i&1&&(p(0,"spk-list"),te(1,Ve,1,1,null,null,Fe),u()),i&2){let e=t.$implicit;ee("padding-left",e.level*.5,"rem"),h(),ne(e.children)}}function Ge(i,t){i&1&&X(0)}function qe(i,t){if(i&1){let e=I();p(0,"spk-toggle",18),O("click",function(){w(e);let s=g();return N(s._showHiddenNodes.set(!s._showHiddenNodes()))}),A(1,6),u()}if(i&2){let e=g();E("active",e._showHiddenNodes()),h(),oe(e.showFiles()?"files":"folders"),re(1)}}var Ee=(o=>(o[o.ExcludedByParent=-2]="ExcludedByParent",o[o.Excluded=-1]="Excluded",o[o.None=0]="None",o[o.Included=1]="Included",o[o.IncludedByParent=2]="IncludedByParent",o))(Ee||{}),U=class i{#t=H(pe);#r=H(ue);multiSelect=m(!1);disabled=m(!1);showFiles=m(!1);selectFiles=m(!1);accepts=m(null);startingPath=m(null);rootPath=m(void 0);backupSettings=m(null);showHiddenNodes=m(!1);includes=G();excludes=G();_showHiddenNodes=y(!1);treeContainerRef=q("treeContainer");formRef=q("formRef");pathDiscoveryMethod=y("browse");isLoading=y(!1);currentPath=y("/");#e=y(null);treeSearchQuery=y("");treeNodes=y([]);filterGroups=this.#r.filterGroups();isByBackupSettings=B(()=>this.rootPath()&&this.backupSettings()?.id&&this.backupSettings()?.time);searchableTreeNodes=B(()=>{let t=this.treeSearchQuery();return t?this.treeNodes().filter(e=>e.text?.toLowerCase().includes(t.toLowerCase())):this.treeNodes()});TreeEvalEnum=Ee;treeStructure=B(()=>{let t=this.showHiddenNodes(),e=this.currentPath().split("\0").filter(a=>a!==""&&a!=="/"),n=structuredClone(e);for(let a=0;a<n.length;a++){let _=n[a].slice(1);if(_.startsWith("{")&&_.endsWith("}")){let f=_.slice(1,-1),d=this.filterGroups?.FilterGroups[f];if(d&&d.length){let M=d.map(T=>`-${T}`);n.splice(a,1,...M)}}}let s=this.searchableTreeNodes(),o=new Map,r=this.rootPath(),C=this.accepts(),l=r?{id:r,resolvedpath:r,text:r?.replaceAll("/",""),parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"}:{id:"/",resolvedpath:"/",text:"Computer",parentPath:"",children:[],evalState:0,isIndeterminate:!1};C&&(l.accepted=!0),o.set("/",l);for(let a of s){let _=a.id.replace(r??"","").split("/").filter(Boolean),f="",d=l;for(let M of _){if(f+="/"+M,!o.has(f)){let T=a.hidden===!0&&t?0:this.#s(n,a.id,a.cls,d),S={id:a.id,isIndeterminate:this.isIndeterminate(n,a.id),evalState:T,parentPath:f,resolvedpath:a.id?.startsWith("%")?a.resolvedpath+"/":f,hidden:a.hidden,text:a.text,cls:a.cls,children:[]};C&&(S.accepted=this.matchAccepts(C,S)),o.set(f,S),d.children.push(S)}d=o.get(f)}}return[l]});#s(t,e,n,s){if(s.evalState===-1)return-2;let o=0,r=t.filter(l=>!l.startsWith("-")&&!l.startsWith("+")),C=t.filter(l=>l.startsWith("-")||l.startsWith("+"));if(r.length===0)return o;for(let l=0;l<r.length;l++){let a=r[l];if(e?.startsWith(a)){o=1;break}}if(C.length===0)return o;for(let l=0;l<C.length;l++){let a=C[l],c=a.slice(1),_=a.startsWith("-")?"exclude":"include";if(c.startsWith("/")&&c.endsWith("/")){if(n!=="folder")continue;if(e===c){o=_==="include"?1:-1;break}}if(c.startsWith("*")&&c.endsWith("*/")){if(n!=="folder")continue;let d=c.slice(1,-2);if(d==="")break;if(e?.includes(d+"/")){o=_==="include"?1:-1;break}}if(c.startsWith("[.*")&&c.endsWith("[^\\/]*]")){if(n!=="file")continue;let d=c.slice(3,-7);if(new RegExp(d).test(e)){o=_==="include"?1:-1;break}}if(c.startsWith("[")&&c.endsWith("]")){let d=c.slice(1,-1),M=this.translateCSharpRegex(d);if(new RegExp(`${M}`).test(e)){o=_==="include"?1:-1;break}}if(c.startsWith("*.")){if(n!=="file"||c.replace("*.","").length===0)continue;if(this.#n(e,c,!0)){o=_==="include"?1:-1;break}}if(c==="")continue;if(this.#n(e,c,!0)){o=_==="include"?1:-1;break}}return o}translateCSharpRegex(t){let e=t;e=e.replace(/^@/,"");let n=/\(\?<(?<name>\w+)>(?<pattern>[^)]+)\)/g;return e=e.replace(n,(s,o,r)=>`(${r})`),e=e.replace(/\\/g,"\\\\"),e}isIndeterminate(t,e){return t.some(n=>n.startsWith(e))}#n(t,e,n=!1){let s=e.replace(/\*/g,".*").replace(/\?/g,".").replace(/\[!([^\]]+)\]/g,"[^$1]");return new RegExp(`${s}${n?"$":""}`).test(t)}showHiddenNodesEffect=k(()=>this._showHiddenNodes.set(this.showHiddenNodes()));pathDiscoveryMethodEffect=k(()=>{let t=this.pathDiscoveryMethod(),e=this.#e();t==="browse"&&e&&this.currentPath.set(e.value)});matchAccepts(t,e){if(!t||e.cls==="folder"||e.id==="/")return!0;let n=t.split(",");if(n.length===0)return!0;let s="."+e.id.slice(e.id.indexOf("."));return s?n.some(o=>s.endsWith(o)):!1}currentPathEffect=k(()=>{let t=this.#e();t&&(t.value=this.currentPath(),t.dispatchEvent(new Event("input")))});inputValueChangeAbortController=null;inputRefEffect=k(()=>{let t=this.formRef()?.nativeElement?.querySelector("input");t&&(this.#l(t),this.inputValueChangeAbortController&&this.inputValueChangeAbortController.abort(),this.inputValueChangeAbortController=new AbortController,t.addEventListener("inputValueChanged",e=>{this.currentPath.set(e.detail.value)},{signal:this.inputValueChangeAbortController.signal}),this.#e.set(t),t.autocomplete="off")});ngOnInit(){let t=this.startingPath();t?(this.currentPath.set(t),this.#d(t)):this.#o(null,this.rootPath())}toggleSelectedNode(t,e){if(e.id==="/"||(t.stopPropagation(),e.evalState===-2))return;if(this.selectFiles()&&e.cls==="folder"){this.toggleNode(e.id,e);return}if(this.accepts()&&!e.accepted)return;let s=this.currentPath().split("\0").filter(r=>r!==""&&r!=="/"),o=this.isChildOfSelected(e)?`-${e.id}`:e.id;this.multiSelect()?s.includes(e.id)?this.currentPath.set(s.filter(r=>r!==e.id).join("\0")):s.some(r=>r.startsWith(o))?this.currentPath.set(s.filter(r=>r!==o).join("\0")):this.currentPath.set([...s,o].join("\0")):s.includes(e.id)?this.currentPath.set(s.filter(r=>r!==e.id).join("\0")):this.currentPath.set(e.id)}isChildOfSelected(t){return this.currentPath().split("\0").filter(n=>n!==""&&n!=="/").some(n=>t.id?.startsWith(n)||`-${t.id}`.startsWith(n))}toggleNode(t,e=null){e?.cls==="folder"&&(e?.children.length?this.treeNodes.update(n=>n.filter(s=>!s.id?.startsWith(e.id)||s.id===e.id)):this.#o(e,t))}#l(t){return Object.defineProperty(t,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").get.call(this)},set(e){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").set.call(this,e),this.dispatchEvent(new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:e}})),e}}),t}#a(t){return this.#t.postApiV1Filesystem({showHidden:!0,requestBody:{path:t},onlyFolders:!this.showFiles()})}#c(t){let e=this.backupSettings(),n={id:e.id,time:e.time,prefixOnly:!1,folderContents:!0};return t&&(n.filter="@"+t),this.#t.getApiV1BackupByIdFiles(n)}#i(t){return this.isByBackupSettings()?this.#c(t):this.#a(t)}#d(t){let e=t.split("\0").filter(r=>r.startsWith("-")).map(r=>r.slice(1,-1)),n=t.split("\0").filter(r=>!r.startsWith("-")).filter(Boolean),s=n.map(r=>r.split("/").filter(Boolean)),o=[this.rootPath()??"/"];s.forEach(r=>{r.forEach((C,l)=>{let a=r.slice(0,l+1).join("/"),c=a.startsWith("%")?a:"/"+a;o.includes(c)||o.push(c)})}),this.isLoading.set(!0),Y([...o.map(r=>this.#i(r))]).pipe(V(()=>this.isLoading.set(!1))).subscribe({next:r=>{this.treeNodes.update(C=>{let l=r.flatMap(c=>c.map(_=>{let f=_.id,d=f&&f.split("/").filter(Boolean).slice(0,-1).join("/"),T="/"+(f&&f.split("/").filter(Boolean).join("/")),S=n.findIndex(F=>this.multiSelect()?T.startsWith(F):T===F)>-1,Pe=n.findIndex(F=>F===f)>-1,Te=e.findIndex(F=>F===T)>-1;return j($({},_),{parentPath:d.startsWith("%")?d:"/"+d,isSelected:S&&!Te||Pe})}));return[...new Map([...C,...l].map(c=>[c.resolvedpath??c.id,c])).values()]})}})}#o(t=null,e="/"){this.isLoading.set(!0),this.#i(e).pipe(V(()=>this.isLoading.set(!1))).subscribe({next:n=>{let s=this.isByBackupSettings()?n.Files.map(o=>({text:o.Path.split("/").filter(r=>r!=="").pop(),id:o.Path,cls:o.Path.endsWith("/")?"folder":"file",leaf:t!==null,resolvedpath:o.Path,hidden:!1})):n;this.treeNodes.update(o=>{let r=s.map(l=>{let a=l.id.startsWith("%")&&l.id.endsWith("%")||l.id.endsWith("/")?"folder":"file";return j($({},l),{cls:a,parentPath:e})});return[...new Map([...o,...r].map(l=>[l.resolvedpath??l.id,l])).values()]})}})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=R({type:i,selectors:[["app-file-tree"]],viewQuery:function(e,n){e&1&&(Q(n.treeContainerRef,Me,5),Q(n.formRef,ye,5)),e&2&&se(2)},hostVars:2,hostBindings:function(e,n){e&2&&E("disabled",n.disabled())},inputs:{multiSelect:[1,"multiSelect"],disabled:[1,"disabled"],showFiles:[1,"showFiles"],selectFiles:[1,"selectFiles"],accepts:[1,"accepts"],startingPath:[1,"startingPath"],rootPath:[1,"rootPath"],backupSettings:[1,"backupSettings"],showHiddenNodes:[1,"showHiddenNodes"]},outputs:{includes:"includes",excludes:"excludes"},ngContentSelectors:Se,decls:15,vars:15,consts:()=>{let t;t=$localize` Browser path `;let e;e=$localize` Manually type path `;let n;return n=$localize` Show hidden ${"\uFFFD0\uFFFD"}:INTERPOLATION: `,[["treeContainer",""],["recursiveTree",""],["formRef",""],["treeNode",""],t,e,n,[1,"section"],[1,"browse-files"],[1,"indeterminate","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"primary","raised","browse-files-toggle",3,"active"],[1,"form-field"],["type","button",3,"click"],["action","",3,"click"],[1,"icon"],[1,"spk-primary"],[1,"text",3,"click"],[1,"primary","raised","browse-files-toggle",3,"click"]]},template:function(e,n){if(e&1&&(L(Oe),v(0,ke,5,4,"spk-button-group"),p(1,"div",7),x(2,0,["ngProjectAs","label",5,["label"]]),p(3,"div",8,0),v(5,Re,1,0,"spk-progress-bar",9)(6,He,3,2,"ng-template",null,1,ce)(8,Ge,1,0,"ng-container",10),u(),v(9,qe,2,3,"spk-toggle",11),u(),p(10,"div",12,2)(12,"spk-form-field"),x(13,1,["ngProjectAs","label",5,["label"]]),x(14,2,["ngProjectAs","input",5,["input"]]),u()()),e&2){let s=z(7);P(n.multiSelect()?-1:0),h(),E("hidden",n.pathDiscoveryMethod()!=="browse"),h(2),E("visualize-accepted",n.accepts()),h(2),P(n.isLoading()?5:-1),h(3),K("ngTemplateOutlet",s)("ngTemplateOutletContext",W(13,ve,W(11,we,n.treeStructure()))),h(),P(n.accepts()?-1:9),h(),E("hidden",n.pathDiscoveryMethod()!=="path")}},dependencies:[he,Ce,D,_e,fe,me,de,ge],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1rem}.disabled[_nghost-%COMP%]{opacity:.5;-webkit-user-select:none;user-select:none;pointer-events:none;position:relative}.disabled[_nghost-%COMP%]:before{content:"";position:absolute;inset:0;background:transparent}.fill[_nghost-%COMP%]{height:auto;overflow:hidden;flex:1 0}.fill[_nghost-%COMP%] .section[_ngcontent-%COMP%]{height:auto;overflow:hidden;flex:1 0;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto 1fr;grid-template-areas:"label toggle" "tree tree"}.fill[_nghost-%COMP%] .browse-files[_ngcontent-%COMP%]{resize:none;height:initial;grid-area:tree}.fill[_nghost-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.fill[_nghost-%COMP%] spk-toggle[_ngcontent-%COMP%]{grid-area:toggle;flex-direction:row-reverse}.section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.form-field.hidden[_ngcontent-%COMP%]{display:none}.browse-files[_ngcontent-%COMP%]{display:flex;gap:.5rem;padding:.5rem 1rem;height:12.5rem;border:1px solid var(--base-level-40);border-radius:var(--shape-3);overflow:auto;resize:vertical;background:var(--base-level-10);position:relative}.browse-files[_ngcontent-%COMP%] spk-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]:not(.accepted){opacity:.5}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action].accepted[_ngcontent-%COMP%]{opacity:1}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%]{--list-active-bg: var(--base-level-30);gap:.125rem;padding:0;height:min-content;min-width:min-content}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0;gap:.25rem;border:1px solid transparent}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].active[_ngcontent-%COMP%]{border-color:var(--base-level-40)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].indeterminate[_ngcontent-%COMP%]{border-color:var(--primary-level-40)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].usually-hidden[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;height:100%;width:max-content;display:flex;align-items:center}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:1.5rem;height:1.5rem;display:flex;align-items:center;justify-content:center;cursor:pointer}.browse-files-toggle[_ngcontent-%COMP%]{color:var(--base-level-60R)}.hidden[_ngcontent-%COMP%]{display:none}'],changeDetection:0})};var Ke=[[["","title",""]],[["","description",""]],[["","action",""]],"*"],Xe=["[title]","[description]","[action]","*"];function Qe(i,t){i&1&&b(0,"Title")}function ze(i,t){i&1&&(p(0,"spk-icon"),b(1,"caret-down"),u())}var J=class i{isActive=Z(!1);disallowToggle=m(!1);ngOnInit(){this.disallowToggle()&&this.isActive.set(!0)}toggle(){this.isActive.set(!this.isActive())}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=R({type:i,selectors:[["app-toggle-card"]],hostVars:2,hostBindings:function(e,n){e&2&&E("active",n.isActive())},inputs:{isActive:[1,"isActive"],disallowToggle:[1,"disallowToggle"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:Xe,decls:11,vars:1,consts:[[1,"title"],[3,"click"],[1,"actions"],[1,"content"]],template:function(e,n){e&1&&(L(Ke),p(0,"header")(1,"div",0)(2,"h3",1),O("click",function(){return n.disallowToggle()||n.toggle()}),x(3,0,null,Qe,1,0),v(5,ze,2,0,"spk-icon"),u(),x(6,1),u(),p(7,"div",2),x(8,2),u()(),p(9,"div",3),x(10,3),u()),e&2&&(h(5),P(n.disallowToggle()?-1:5))},dependencies:[D],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;border-radius:var(--shape-3);background-color:var(--base-level-20)}.active[_nghost-%COMP%] .content[_ngcontent-%COMP%]{max-height:1000px;transition:max-height 1s linear;padding:0 1rem 1rem}.active[_nghost-%COMP%] spk-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}[_nghost-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;font:var(--paragraph-10);cursor:pointer;-webkit-user-select:none;user-select:none}[_nghost-%COMP%] spk-icon[_ngcontent-%COMP%]{transform:rotate(0);transform-origin:center;transition:transform .2s ease}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem}header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:0 1rem;overflow:hidden;max-height:0;transition:max-height .25s linear,padding .25s linear}.content[_ngcontent-%COMP%]:empty{display:none}"],changeDetection:0})};export{U as a,J as b};
@@ -1 +1 @@
1
- import{a}from"./chunk-HSUOVCAK.js";import{Nc as r,R as s,X as i,Za as e}from"./chunk-JDQIBNR4.js";var o=class t{#t=i(a);#a=this.#t.getItemParsed("darkTheme",!0);#e=e(!1);#s=e(window?.innerWidth<=768);#i=e(!1);isDarkMode=this.#e.asReadonly();isMobile=this.#s.asReadonly();isNavOpen=this.#i.asReadonly();constructor(){window.matchMedia("(prefers-color-scheme:dark)").matches&&this.#a&&this.setDarkMode(),r(()=>{this.#e()?document.body.classList.add("dark"):document.body.classList.remove("dark")})}ngOnInit(){window.addEventListener("resize",this.#r)}toggleNav(){this.#i.set(!this.isNavOpen())}toggleBodyClass(){this.#t.setItemParsed("darkTheme",!this.isDarkMode(),!0),this.#e.set(!this.isDarkMode())}setDarkMode(){this.#t.setItemParsed("darkTheme",!0,!0),this.#e.set(!0)}setLightMode(){this.#t.setItemParsed("darkTheme",!1,!0),this.#e.set(!1)}#r(){this.#s.set(window.innerWidth<=768)}ngOnDestroy(){window.removeEventListener("resize",this.#r)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=s({token:t,factory:t.\u0275fac,providedIn:"root"})};export{o as a};
1
+ import{a}from"./chunk-6M3MNJ52.js";import{Mc as r,R as s,X as i,Za as e}from"./chunk-MR4RE3IB.js";var o=class t{#t=i(a);#a=this.#t.getItemParsed("darkTheme",!0);#e=e(!1);#s=e(window?.innerWidth<=768);#i=e(!1);isDarkMode=this.#e.asReadonly();isMobile=this.#s.asReadonly();isNavOpen=this.#i.asReadonly();constructor(){window.matchMedia("(prefers-color-scheme:dark)").matches&&this.#a&&this.setDarkMode(),r(()=>{this.#e()?document.body.classList.add("dark"):document.body.classList.remove("dark")})}ngOnInit(){window.addEventListener("resize",this.#r)}toggleNav(){this.#i.set(!this.isNavOpen())}toggleBodyClass(){this.#t.setItemParsed("darkTheme",!this.isDarkMode(),!0),this.#e.set(!this.isDarkMode())}setDarkMode(){this.#t.setItemParsed("darkTheme",!0,!0),this.#e.set(!0)}setLightMode(){this.#t.setItemParsed("darkTheme",!1,!0),this.#e.set(!1)}#r(){this.#s.set(window.innerWidth<=768)}ngOnDestroy(){window.removeEventListener("resize",this.#r)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=s({token:t,factory:t.\u0275fac,providedIn:"root"})};export{o as a};