dealposbooks 1.9.3 → 1.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/3rdpartylicenses.txt +29 -29
- package/assets/scss/components/_navbar.scss +2 -2
- package/assets/scss/layouts/_sidebar.scss +1 -2
- package/assets/scss/style.scss +6 -0
- package/{chunk-4CUA33JH.js → chunk-25XKSUYX.js} +1 -1
- package/chunk-2TUOAI22.js +1 -0
- package/chunk-3IHOEH5O.js +1 -0
- package/chunk-3VC2KAML.js +1 -0
- package/{chunk-5QVQY32E.js → chunk-4FK4QI2U.js} +1 -1
- package/{chunk-A47VRZZB.js → chunk-4J3EFT67.js} +1 -1
- package/{chunk-ZPTNYW2S.js → chunk-56MVOUHH.js} +1 -1
- package/{chunk-LFDCJISD.js → chunk-5OU7ECCN.js} +1 -1
- package/{chunk-7KQDKLO4.js → chunk-5OXHRN43.js} +2 -2
- package/{chunk-3XLREP6U.js → chunk-5QMHSLSU.js} +1 -1
- package/{chunk-FUCSF42O.js → chunk-6J5S4UPN.js} +1 -1
- package/chunk-7GT5MR57.js +1 -0
- package/{chunk-J6H3BBKP.js → chunk-7LCGNNCW.js} +1 -1
- package/chunk-7NXTCJMX.js +1 -0
- package/{chunk-OCIKQOWD.js → chunk-7PDAUPWN.js} +2 -2
- package/{chunk-5AITWOQZ.js → chunk-7TKATLB4.js} +1 -1
- package/{chunk-3ENMEUVK.js → chunk-7XAJOA36.js} +1 -1
- package/chunk-A3NY5EYN.js +1 -0
- package/chunk-AH5PA2TO.js +1 -0
- package/{chunk-H4V6YZX2.js → chunk-AM66YD6C.js} +1 -1
- package/{chunk-DNSQSWOS.js → chunk-B4COOFJS.js} +1 -1
- package/{chunk-OAD4GTH6.js → chunk-BGDKOH3U.js} +1 -1
- package/chunk-BJGK47CG.js +1 -0
- package/chunk-BWS6U7BM.js +193 -0
- package/chunk-D5AXB5DE.js +7 -0
- package/chunk-D5RQBZNF.js +1 -0
- package/{chunk-CSQ4MHL2.js → chunk-DELPZQZH.js} +3 -3
- package/{chunk-PRRU3DEZ.js → chunk-DJUGUNXR.js} +1 -1
- package/chunk-DSFIM36S.js +1 -0
- package/chunk-EHCALTHK.js +1 -0
- package/{chunk-7U2I35GP.js → chunk-F7TF7ASR.js} +1 -1
- package/{chunk-X4EHZEMZ.js → chunk-FCGAJLPQ.js} +1 -1
- package/{chunk-WAJWW3TC.js → chunk-FUGCJNGU.js} +11 -11
- package/{chunk-QIXIZZPY.js → chunk-GMLRRSMP.js} +1 -1
- package/chunk-HDO45X7Q.js +1 -0
- package/{chunk-RANHETC3.js → chunk-HPKZYS2A.js} +1 -1
- package/chunk-IACJNRVA.js +25 -0
- package/chunk-IQZ2MKLS.js +1 -0
- package/{chunk-Q5BXN24W.js → chunk-ITIRJVUS.js} +1 -1
- package/chunk-IXPPR5MV.js +1 -0
- package/chunk-J3B5HVW4.js +1 -0
- package/chunk-JQ4DHNFQ.js +67 -0
- package/{chunk-PJKHUCJX.js → chunk-JRYP3YPK.js} +1 -1
- package/chunk-KQAMA66M.js +2 -0
- package/{chunk-ZB6TB7JI.js → chunk-L6VKOTIV.js} +2 -2
- package/chunk-LATJGOV3.js +185 -0
- package/chunk-LLV6TGMT.js +1 -0
- package/chunk-MNCUT4L4.js +1 -0
- package/chunk-NBRL2K4H.js +1 -0
- package/chunk-NDOZ5YES.js +1 -0
- package/{chunk-WM3NKRKN.js → chunk-NL5IYBHF.js} +1 -1
- package/{chunk-ZUALJ33O.js → chunk-R6HGHSPM.js} +1 -1
- package/chunk-SCEMI63T.js +1 -0
- package/chunk-SDTMCYSJ.js +1 -0
- package/{chunk-SGXU6X3O.js → chunk-T2A6NORZ.js} +1 -1
- package/chunk-TDX2HSWE.js +1 -0
- package/chunk-UHVZAFKN.js +1 -0
- package/{chunk-GY53MWXH.js → chunk-UMYCPFK5.js} +19 -19
- package/{chunk-YWYF6P7O.js → chunk-UOAJWMSO.js} +1 -1
- package/{chunk-TNWHAKS6.js → chunk-UZCNPNT7.js} +1 -1
- package/{chunk-JG5HGOEX.js → chunk-VF7TG32T.js} +1 -1
- package/chunk-VI3AV775.js +1 -0
- package/chunk-VK5TK23W.js +7 -0
- package/{chunk-O2GA6PH7.js → chunk-VKO43FOT.js} +1 -1
- package/chunk-VNHXLUHA.js +1 -0
- package/{chunk-DIX7J6JH.js → chunk-W6UD5NO5.js} +1 -1
- package/chunk-WUGCCSIP.js +1 -0
- package/chunk-X234EQET.js +129 -0
- package/{chunk-6NCHCAKY.js → chunk-X3FQFXUZ.js} +1 -1
- package/{chunk-33XUIS57.js → chunk-XEATX3IC.js} +1 -1
- package/chunk-XJ5BSLZV.js +1 -0
- package/{chunk-V3B32QFK.js → chunk-XMZ7ADZB.js} +1 -1
- package/chunk-YAKYBQQ6.js +1 -0
- package/{chunk-TDDTBHQE.js → chunk-YQRWSN5V.js} +1 -1
- package/{chunk-ACQX2T2H.js → chunk-ZKXT6RSI.js} +1 -1
- package/index.html +2 -2
- package/main-VQYYYR67.js +1 -0
- package/package.json +1 -1
- package/{styles-7FHABE27.css → styles-IDKYTRGA.css} +1 -1
- package/chunk-2US5D2LY.js +0 -1
- package/chunk-353U23ZQ.js +0 -1
- package/chunk-3B65XZ6E.js +0 -1
- package/chunk-3CEJ67I5.js +0 -1
- package/chunk-3E2EKFPH.js +0 -1
- package/chunk-3H5KBX4R.js +0 -1
- package/chunk-4NSHHAXV.js +0 -1
- package/chunk-6DPW74DP.js +0 -1
- package/chunk-7G6KXHQB.js +0 -1
- package/chunk-7U2775BI.js +0 -1
- package/chunk-AG7353CN.js +0 -1
- package/chunk-AI6YS6T2.js +0 -1
- package/chunk-ANMXAMBL.js +0 -1
- package/chunk-ARSLNNKY.js +0 -7
- package/chunk-AT7II4DO.js +0 -7
- package/chunk-BCXNVGDH.js +0 -193
- package/chunk-BJNN42CI.js +0 -1
- package/chunk-DG6ETDOW.js +0 -1
- package/chunk-DMVAXVYQ.js +0 -1
- package/chunk-F3PEWQT7.js +0 -1
- package/chunk-FTVGAWDW.js +0 -1
- package/chunk-FXUC6M2U.js +0 -1
- package/chunk-GCGWIESO.js +0 -1
- package/chunk-IHJLTHHQ.js +0 -1
- package/chunk-LNRTAR2V.js +0 -1
- package/chunk-LWKS2JEV.js +0 -1
- package/chunk-N2XLL6HJ.js +0 -33
- package/chunk-NM37SDQJ.js +0 -1
- package/chunk-NN6GSTBJ.js +0 -1
- package/chunk-PZBZVQUY.js +0 -67
- package/chunk-Q2IWISMY.js +0 -1
- package/chunk-RQEEJGOE.js +0 -1
- package/chunk-TPGKCMVN.js +0 -1
- package/chunk-TYETQJ2X.js +0 -2
- package/chunk-U5LD55IP.js +0 -1
- package/chunk-U6SRN7P3.js +0 -1
- package/chunk-VBCJCAMN.js +0 -1
- package/chunk-W76GKZZU.js +0 -1
- package/chunk-X5SV4H5B.js +0 -1
- package/chunk-YYUWLV5N.js +0 -1
- package/main-L6WVDQUB.js +0 -1
package/chunk-U6SRN7P3.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as ge}from"./chunk-353U23ZQ.js";import{$ as k,Db as Re,Ea as P,Ga as b,Kb as ce,Nb as he,Qc as je,Vc as fe,Xc as p,Yc as M,Zc as Te,aa as h,ba as ue,ca as W,ea as V,ec as E,g as Se,ha as q,i as Ie,l as Oe,lb as R,mb as s,na as ke,oa as w,s as Ne,ta as D,va as de,wa as Pe,wb as z,xb as l,y as xe,yc as f,za as y,zb as u}from"./chunk-ARSLNNKY.js";import{a as c,b as g}from"./chunk-YQFG5XE2.js";var Ze=(()=>{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)(s(R),s(P))};static \u0275dir=l({type:n})}return n})(),ve=(()=>{class n extends Ze{static \u0275fac=(()=>{let e;return function(r){return(e||(e=D(n)))(r||n)}})();static \u0275dir=l({type:n,features:[u]})}return n})(),N=new V("");var Vt={provide:N,useExisting:h(()=>Xe),multi:!0};function Dt(){let n=ge()?ge().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}var bt=new V(""),Xe=(()=>{class n extends Ze{_compositionMode;_composing=!1;constructor(e,i,r){super(e,i),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!Dt())}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)(s(R),s(P),s(bt,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&&E("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:[f([Vt]),u]})}return n})();function ye(n){return n==null||Ce(n)===0}function Ce(n){return n==null?null:Array.isArray(n)||typeof n=="string"?n.length:n instanceof Set?n.size:null}var v=new V(""),A=new V(""),Mt=/^(?=.{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])?)*$/,Ge=class{static min(t){return At(t)}static max(t){return wt(t)}static required(t){return Ye(t)}static requiredTrue(t){return Et(t)}static email(t){return Ft(t)}static minLength(t){return St(t)}static maxLength(t){return Ke(t)}static pattern(t){return It(t)}static nullValidator(t){return X()}static compose(t){return it(t)}static composeAsync(t){return rt(t)}};function At(n){return t=>{if(t.value==null||n==null)return null;let e=parseFloat(t.value);return!isNaN(e)&&e<n?{min:{min:n,actual:t.value}}:null}}function wt(n){return t=>{if(t.value==null||n==null)return null;let e=parseFloat(t.value);return!isNaN(e)&&e>n?{max:{max:n,actual:t.value}}:null}}function Ye(n){return ye(n.value)?{required:!0}:null}function Et(n){return n.value===!0?null:{required:!0}}function Ft(n){return ye(n.value)||Mt.test(n.value)?null:{email:!0}}function St(n){return t=>{let e=t.value?.length??Ce(t.value);return e===null||e===0?null:e<n?{minlength:{requiredLength:n,actualLength:e}}:null}}function Ke(n){return t=>{let e=t.value?.length??Ce(t.value);return e!==null&&e>n?{maxlength:{requiredLength:n,actualLength:e}}:null}}function It(n){if(!n)return X;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(ye(i.value))return null;let r=i.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}function X(n){return null}function Je(n){return n!=null}function Qe(n){return Re(n)?Oe(n):n}function et(n){let t={};return n.forEach(e=>{t=e!=null?c(c({},t),e):t}),Object.keys(t).length===0?null:t}function tt(n,t){return t.map(e=>e(n))}function Ot(n){return!n.validate}function nt(n){return n.map(t=>Ot(t)?t:e=>t.validate(e))}function it(n){if(!n)return null;let t=n.filter(Je);return t.length==0?null:function(e){return et(tt(e,t))}}function Ve(n){return n!=null?it(nt(n)):null}function rt(n){if(!n)return null;let t=n.filter(Je);return t.length==0?null:function(e){let i=tt(e,t).map(Qe);return xe(i).pipe(Ne(et))}}function De(n){return n!=null?rt(nt(n)):null}function Ue(n,t){return n===null?[t]:Array.isArray(n)?[...n,t]:[n,t]}function ot(n){return n._rawValidators}function st(n){return n._rawAsyncValidators}function pe(n){return n?Array.isArray(n)?n:[n]:[]}function Y(n,t){return Array.isArray(n)?n.includes(t):n===t}function Be(n,t){let e=pe(t);return pe(n).forEach(r=>{Y(e,r)||e.push(r)}),e}function He(n,t){return pe(t).filter(e=>!Y(n,e))}var K=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=Ve(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=De(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}},d=class extends K{name;get formDirective(){return null}get path(){return null}},_=class extends K{_parent=null;name=null;valueAccessor=null},J=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}},Nt={"[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"},In=g(c({},Nt),{"[class.ng-submitted]":"isSubmitted"}),On=(()=>{class n extends J{constructor(e){super(e)}static \u0275fac=function(i){return new(i||n)(s(_,2))};static \u0275dir=l({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,r){i&2&&he("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})(),Nn=(()=>{class n extends J{constructor(e){super(e)}static \u0275fac=function(i){return new(i||n)(s(d,10))};static \u0275dir=l({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(i,r){i&2&&he("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 j="VALID",Z="INVALID",F="PENDING",T="DISABLED",C=class{},Q=class extends C{value;source;constructor(t,e){super(),this.value=t,this.source=e}},U=class extends C{pristine;source;constructor(t,e){super(),this.pristine=t,this.source=e}},B=class extends C{touched;source;constructor(t,e){super(),this.touched=t,this.source=e}},S=class extends C{status;source;constructor(t,e){super(),this.status=t,this.source=e}},ee=class extends C{source;constructor(t){super(),this.source=t}},te=class extends C{source;constructor(t){super(),this.source=t}};function be(n){return(oe(n)?n.validators:n)||null}function xt(n){return Array.isArray(n)?Ve(n):n||null}function Me(n,t){return(oe(t)?t.asyncValidators:n)||null}function kt(n){return Array.isArray(n)?De(n):n||null}function oe(n){return n!=null&&!Array.isArray(n)&&typeof n=="object"}function at(n,t,e){let i=n.controls;if(!(t?Object.keys(i):i).length)throw new k(1e3,"");if(!i[e])throw new k(1001,"")}function lt(n,t,e){n._forEachChild((i,r)=>{if(e[r]===void 0)throw new k(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 p(this.statusReactive)}set status(t){p(()=>this.statusReactive.set(t))}_status=M(()=>this.statusReactive());statusReactive=b(void 0);get valid(){return this.status===j}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 p(this.pristineReactive)}set pristine(t){p(()=>this.pristineReactive.set(t))}_pristine=M(()=>this.pristineReactive());pristineReactive=b(!0);get dirty(){return!this.pristine}get touched(){return p(this.touchedReactive)}set touched(t){p(()=>this.touchedReactive.set(t))}_touched=M(()=>this.touchedReactive());touchedReactive=b(!1);get untouched(){return!this.touched}_events=new Se;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(Be(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(Be(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(He(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(He(t,this._rawAsyncValidators))}hasValidator(t){return Y(this._rawValidators,t)}hasAsyncValidator(t){return Y(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(g(c({},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(g(c({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new U(!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 U(!0,i))}markAsPending(t={}){this.status=F;let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new S(this.status,e)),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.markAsPending(g(c({},t),{sourceControl:e}))}disable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=T,this.errors=null,this._forEachChild(r=>{r.disable(g(c({},t),{onlySelf:!0}))}),this._updateValue();let i=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new Q(this.value,i)),this._events.next(new S(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(g(c({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=j,this._forEachChild(i=>{i.enable(g(c({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(g(c({},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===j||this.status===F)&&this._runAsyncValidator(i,t.emitEvent)}let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new Q(this.value,e)),this._events.next(new S(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(g(c({},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:j}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t,e){if(this.asyncValidator){this.status=F,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1};let i=Qe(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 S(this.status,e)),this._parent&&this._parent._updateControlsErrors(t,e,i)}_initObservables(){this.valueChanges=new y,this.statusChanges=new y}_calculateStatus(){return this._allControlsDisabled()?T:this.errors?Z:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(F)?F:this._anyControlsHaveStatus(Z)?Z:j}_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 U(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){oe(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=xt(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=kt(this._rawAsyncValidators)}},O=class extends I{constructor(t,e,i){super(be(e),Me(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={}){lt(this,!0,t),Object.keys(t).forEach(i=>{at(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,o)=>{i=e(i,r,o)}),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 me=class extends O{};var x=new V("",{providedIn:"root",factory:()=>se}),se="always";function ae(n,t){return[...t.path,n]}function L(n,t,e=se){Ae(n,t),t.valueAccessor.writeValue(n.value),(n.disabled||e==="always")&&t.valueAccessor.setDisabledState?.(n.disabled),Rt(n,t),Tt(n,t),jt(n,t),Pt(n,t)}function ne(n,t,e=!0){let i=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(i),t.valueAccessor.registerOnTouched(i)),re(n,t),n&&(t._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}))}function ie(n,t){n.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function Pt(n,t){if(t.valueAccessor.setDisabledState){let e=i=>{t.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(e),t._registerOnDestroy(()=>{n._unregisterOnDisabledChange(e)})}}function Ae(n,t){let e=ot(n);t.validator!==null?n.setValidators(Ue(e,t.validator)):typeof e=="function"&&n.setValidators([e]);let i=st(n);t.asyncValidator!==null?n.setAsyncValidators(Ue(i,t.asyncValidator)):typeof i=="function"&&n.setAsyncValidators([i]);let r=()=>n.updateValueAndValidity();ie(t._rawValidators,r),ie(t._rawAsyncValidators,r)}function re(n,t){let e=!1;if(n!==null){if(t.validator!==null){let r=ot(n);if(Array.isArray(r)&&r.length>0){let o=r.filter(a=>a!==t.validator);o.length!==r.length&&(e=!0,n.setValidators(o))}}if(t.asyncValidator!==null){let r=st(n);if(Array.isArray(r)&&r.length>0){let o=r.filter(a=>a!==t.asyncValidator);o.length!==r.length&&(e=!0,n.setAsyncValidators(o))}}}let i=()=>{};return ie(t._rawValidators,i),ie(t._rawAsyncValidators,i),e}function Rt(n,t){t.valueAccessor.registerOnChange(e=>{n._pendingValue=e,n._pendingChange=!0,n._pendingDirty=!0,n.updateOn==="change"&&ut(n,t)})}function jt(n,t){t.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,n.updateOn==="blur"&&n._pendingChange&&ut(n,t),n.updateOn!=="submit"&&n.markAsTouched()})}function ut(n,t){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function Tt(n,t){let e=(i,r)=>{t.valueAccessor.writeValue(i),r&&t.viewToModelUpdate(i)};n.registerOnChange(e),t._registerOnDestroy(()=>{n._unregisterOnChange(e)})}function dt(n,t){n==null,Ae(n,t)}function Gt(n,t){return re(n,t)}function we(n,t){if(!n.hasOwnProperty("model"))return!1;let e=n.model;return e.isFirstChange()?!0:!Object.is(t,e.currentValue)}function Ut(n){return Object.getPrototypeOf(n.constructor)===ve}function ct(n,t){n._syncPendingControls(),t.forEach(e=>{let i=e.control;i.updateOn==="submit"&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}function Ee(n,t){if(!t)return null;Array.isArray(t);let e,i,r;return t.forEach(o=>{o.constructor===Xe?e=o:Ut(o)?i=o:r=o}),r||i||e||null}function Bt(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}var Ht={provide:d,useExisting:h(()=>Lt)},G=Promise.resolve(),Lt=(()=>{class n extends d{callSetDisabledState;get submitted(){return p(this.submittedReactive)}_submitted=M(()=>this.submittedReactive());submittedReactive=b(!1);_directives=new Set;form;ngSubmit=new y;options;constructor(e,i,r){super(),this.callSetDisabledState=r,this.form=new O({},Ve(e),De(i))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){G.then(()=>{let i=this._findContainer(e.path);e.control=i.registerControl(e.name,e.control),L(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){G.then(()=>{let i=this._findContainer(e.path);i&&i.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){G.then(()=>{let i=this._findContainer(e.path),r=new O({});dt(r,e),i.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){G.then(()=>{let i=this._findContainer(e.path);i&&i.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,i){G.then(()=>{this.form.get(e.path).setValue(i)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submittedReactive.set(!0),ct(this.form,this._directives),this.ngSubmit.emit(e),this.form._events.next(new ee(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 te(this.form))}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}static \u0275fac=function(i){return new(i||n)(s(v,10),s(A,10),s(x,8))};static \u0275dir=l({type:n,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(i,r){i&1&&E("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[f([Ht]),u]})}return n})();function Le(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}function $e(n){return typeof n=="object"&&n!==null&&Object.keys(n).length===2&&"value"in n&&"disabled"in n}var H=class extends I{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(t=null,e,i){super(be(e),Me(i,e)),this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),oe(e)&&(e.nonNullable||e.initialValueIsDefault)&&($e(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){Le(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){Le(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){$e(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 $t=n=>n instanceof H,Wt=(()=>{class n extends d{_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 ae(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=D(n)))(r||n)}})();static \u0275dir=l({type:n,standalone:!1,features:[u]})}return n})();var qt={provide:_,useExisting:h(()=>zt)},We=Promise.resolve(),zt=(()=>{class n extends _{_changeDetectorRef;callSetDisabledState;control=new H;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new y;constructor(e,i,r,o,a,m){super(),this._changeDetectorRef=a,this.callSetDisabledState=m,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=Ee(this,o)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),we(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&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(){L(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(e){We.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let i=e.isDisabled.currentValue,r=i!==0&&fe(i);We.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?ae(e,this._parent):[e]}static \u0275fac=function(i){return new(i||n)(s(d,9),s(v,10),s(A,10),s(N,10),s(je,8),s(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:[f([qt]),u,w]})}return n})();var kn=(()=>{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})();var Fe=new V(""),Zt={provide:_,useExisting:h(()=>Xt)},Xt=(()=>{class n extends _{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(e){}model;update=new y;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,i,r,o,a){super(),this._ngModelWarningConfig=o,this.callSetDisabledState=a,this._setValidators(e),this._setAsyncValidators(i),this.valueAccessor=Ee(this,r)}ngOnChanges(e){if(this._isControlChanged(e)){let i=e.form.previousValue;i&&ne(i,this,!1),L(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}we(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&ne(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)(s(v,10),s(A,10),s(N,10),s(Fe,8),s(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:[f([Zt]),u,w]})}return n})(),Yt={provide:d,useExisting:h(()=>ht)},ht=(()=>{class n extends d{callSetDisabledState;get submitted(){return p(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}_submitted=M(()=>this._submittedReactive());_submittedReactive=b(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];form=null;ngSubmit=new y;constructor(e,i,r){super(),this.callSetDisabledState=r,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(re(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 L(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){ne(e.control||null,e,!1),Bt(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),ct(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new ee(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 te(this.form))}_updateDomValue(){this.directives.forEach(e=>{let i=e.control,r=this.form.get(e.path);i!==r&&(ne(i||null,e),$t(r)&&(L(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let i=this.form.get(e.path);dt(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){let i=this.form.get(e.path);i&&Gt(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){Ae(this.form,this),this._oldForm&&re(this._oldForm,this)}static \u0275fac=function(i){return new(i||n)(s(v,10),s(A,10),s(x,8))};static \u0275dir=l({type:n,selectors:[["","formGroup",""]],hostBindings:function(i,r){i&1&&E("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:[f([Yt]),u,w]})}return n})(),Kt={provide:d,useExisting:h(()=>ft)},ft=(()=>{class n extends Wt{name=null;constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r)}_checkParentType(){pt(this._parent)}static \u0275fac=function(i){return new(i||n)(s(d,13),s(v,10),s(A,10))};static \u0275dir=l({type:n,selectors:[["","formGroupName",""]],inputs:{name:[0,"formGroupName","name"]},standalone:!1,features:[f([Kt]),u]})}return n})(),Jt={provide:d,useExisting:h(()=>gt)},gt=(()=>{class n extends d{_parent;name=null;constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r)}ngOnInit(){pt(this._parent),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective?.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return ae(this.name==null?this.name:this.name.toString(),this._parent)}static \u0275fac=function(i){return new(i||n)(s(d,13),s(v,10),s(A,10))};static \u0275dir=l({type:n,selectors:[["","formArrayName",""]],inputs:{name:[0,"formArrayName","name"]},standalone:!1,features:[f([Jt]),u]})}return n})();function pt(n){return!(n instanceof ft)&&!(n instanceof ht)&&!(n instanceof gt)}var Qt={provide:_,useExisting:h(()=>en)},en=(()=>{class n extends _{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(e){}model;update=new y;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,i,r,o,a){super(),this._ngModelWarningConfig=a,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=Ee(this,o)}ngOnChanges(e){this._added||this._setUpControl(),we(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 ae(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_setUpControl(){this.control=this.formDirective.addControl(this),this._added=!0}static \u0275fac=function(i){return new(i||n)(s(d,13),s(v,10),s(A,10),s(N,10),s(Fe,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:[f([Qt]),u,w]})}return n})();var tn={provide:N,useExisting:h(()=>_t),multi:!0};function mt(n,t){return n==null?`${t}`:(t&&typeof t=="object"&&(t="Object"),`${n}: ${t}`.slice(0,50))}function nn(n){return n.split(":")[0]}var _t=(()=>{class n extends ve{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=mt(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=nn(e);return this._optionMap.has(i)?this._optionMap.get(i):e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=D(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&&E("change",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[f([tn]),u]})}return n})(),Pn=(()=>{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(mt(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)(s(P),s(R),s(_t,9))};static \u0275dir=l({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})(),rn={provide:N,useExisting:h(()=>vt),multi:!0};function qe(n,t){return n==null?`${t}`:(typeof t=="string"&&(t=`'${t}'`),t&&typeof t=="object"&&(t="Object"),`${n}: ${t}`.slice(0,50))}function on(n){return n.split(":")[0]}var vt=(()=>{class n extends ve{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(o=>this._getOptionId(o));i=(o,a)=>{o._setSelected(r.indexOf(a.toString())>-1)}}else i=(r,o)=>{r._setSelected(!1)};this._optionMap.forEach(i)}registerOnChange(e){this.onChange=i=>{let r=[],o=i.selectedOptions;if(o!==void 0){let a=o;for(let m=0;m<a.length;m++){let $=a[m],le=this._getOptionValue($.value);r.push(le)}}else{let a=i.options;for(let m=0;m<a.length;m++){let $=a[m];if($.selected){let le=this._getOptionValue($.value);r.push(le)}}}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=on(e);return this._optionMap.has(i)?this._optionMap.get(i)._value:e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=D(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(i,r){i&1&&E("change",function(a){return r.onChange(a.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[f([rn]),u]})}return n})(),Rn=(()=>{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(qe(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._select?(this._value=e,this._setElementValue(qe(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)(s(P),s(R),s(vt,9))};static \u0275dir=l({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})();function sn(n){return typeof n=="number"?n:parseInt(n,10)}var yt=(()=>{class n{_validator=X;_onChange;_enabled;ngOnChanges(e){if(this.inputName in e){let i=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):X,this._onChange&&this._onChange()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return e!=null}static \u0275fac=function(i){return new(i||n)};static \u0275dir=l({type:n,features:[w]})}return n})();var an={provide:v,useExisting:h(()=>ln),multi:!0};var ln=(()=>{class n extends yt{required;inputName="required";normalizeInput=fe;createValidator=e=>Ye;enabled(e){return e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=D(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(i,r){i&2&&ce("required",r._enabled?"":null)},inputs:{required:"required"},standalone:!1,features:[f([an]),u]})}return n})();var un={provide:v,useExisting:h(()=>dn),multi:!0},dn=(()=>{class n extends yt{maxlength;inputName="maxlength";normalizeInput=e=>sn(e);createValidator=e=>Ke(e);static \u0275fac=(()=>{let e;return function(r){return(e||(e=D(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&ce("maxlength",r._enabled?r.maxlength:null)},inputs:{maxlength:"maxlength"},standalone:!1,features:[f([un]),u]})}return n})();var Ct=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=z({type:n});static \u0275inj=W({})}return n})(),_e=class extends I{constructor(t,e,i){super(be(e),Me(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={}){lt(this,!1,t),t.forEach((i,r)=>{at(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 ze(n){return!!n&&(n.asyncValidators!==void 0||n.validators!==void 0||n.updateOn!==void 0)}var cn=(()=>{class n{useNonNullable=!1;get nonNullable(){let e=new n;return e.useNonNullable=!0,e}group(e,i=null){let r=this._reduceControls(e),o={};return ze(i)?o=i:i!==null&&(o.validators=i.validator,o.asyncValidators=i.asyncValidator),new O(r,o)}record(e,i=null){let r=this._reduceControls(e);return new me(r,i)}control(e,i,r){let o={};return this.useNonNullable?(ze(i)?o=i:(o.validators=i,o.asyncValidators=r),new H(e,g(c({},o),{nonNullable:!0}))):new H(e,i,r)}array(e,i,r){let o=e.map(a=>this._createControl(a));return new _e(o,i,r)}_reduceControls(e){let i={};return Object.keys(e).forEach(r=>{i[r]=this._createControl(e[r])}),i}_createControl(e){if(e instanceof H)return e;if(e instanceof I)return e;if(Array.isArray(e)){let i=e[0],r=e.length>1?e[1]:null,o=e.length>2?e[2]:null;return this.control(i,r,o)}else return this.control(e)}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),jn=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275prov=ue({token:n,factory:()=>q(cn).nonNullable,providedIn:"root"})}return n})();var Tn=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:x,useValue:e.callSetDisabledState??se}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=z({type:n});static \u0275inj=W({imports:[Ct]})}return n})(),Gn=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:Fe,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:x,useValue:e.callSetDisabledState??se}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=z({type:n});static \u0275inj=W({imports:[Ct]})}return n})();function hn(n,t){!t?.injector&&ke(hn);let e=t?.injector??q(de),i=new Ie(1),r=Te(()=>{let o;try{o=n()}catch(a){p(()=>i.error(a));return}p(()=>i.next(o))},{injector:e,manualCleanup:!0});return e.get(Pe).onDestroy(()=>{r.destroy(),i.complete()}),i.asObservable()}export{N as a,Xe as b,Ge as c,_ as d,On as e,Nn as f,O as g,Lt as h,H as i,zt as j,kn as k,Xt as l,ht as m,ft as n,gt as o,en as p,_t as q,Pn as r,Rn as s,ln as t,dn as u,_e as v,cn as w,jn as x,Tn as y,Gn as z,hn as A};
|
package/chunk-VBCJCAMN.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as k}from"./chunk-ANMXAMBL.js";import{a as q}from"./chunk-QIXIZZPY.js";import{a as ae,b as oe}from"./chunk-ZPTNYW2S.js";import{h as ie,j as re,k as le,l as me}from"./chunk-GY53MWXH.js";import"./chunk-6NCHCAKY.js";import"./chunk-5AITWOQZ.js";import"./chunk-ACQX2T2H.js";import{c as $,d as W}from"./chunk-JG5HGOEX.js";import{g as ne}from"./chunk-ZB6TB7JI.js";import"./chunk-7KQDKLO4.js";import{a as b,b as X,c as Y,d as Z,e as ee,f as te}from"./chunk-H4V6YZX2.js";import{C as K,D as Q}from"./chunk-WAJWW3TC.js";import"./chunk-U6SRN7P3.js";import"./chunk-TPGKCMVN.js";import"./chunk-BCXNVGDH.js";import"./chunk-U5LD55IP.js";import"./chunk-F2X3VGZZ.js";import"./chunk-TYETQJ2X.js";import{m as F,r as G,s as L,t as O}from"./chunk-353U23ZQ.js";import{$b as v,Bb as j,Jc as A,Kc as D,Lb as _,Lc as B,Mc as g,Ob as I,Vb as i,Wb as o,X as R,Xb as C,Yc as w,bb as P,c as y,cb as M,ec as E,fc as s,gb as p,ha as f,pa as x,qa as h,qc as c,rc as S,s as J,sc as V,uc as U,vb as H,yc as N,zc as z}from"./chunk-ARSLNNKY.js";import{a as r,b as m}from"./chunk-YQFG5XE2.js";var ce={data:{data:[],totalCount:0},filter:{PageNumber:1,PageSize:20,Number:""}},T=X(te(ce),Y(t=>({first:w(()=>(t.filter().PageNumber-1)*t.filter().PageSize+1),end:w(()=>Math.min(t.filter().PageNumber*t.filter().PageSize,t.data().totalCount)),hasCheckedRows:w(()=>t.data().data.some(d=>d.checked)),checkedAdjustment:w(()=>t.data().data.filter(d=>d.checked).map(d=>d.id))})),ee(t=>{let d=f(k);return{updateFilter(a){b(t,n=>m(r({},n),{filter:r(r({},n.filter),a)}))},onRowSelect(a){b(t,n=>{let l=n.data.data.map(u=>u.id===a.id?m(r({},u),{checked:!0}):u);return m(r({},n),{data:m(r({},n.data),{data:l})})})},onRowUnselect(a){b(t,n=>{let l=n.data.data.map(u=>u.id===a.id?m(r({},u),{checked:!1}):u);return m(r({},n),{data:m(r({},n.data),{data:l})})})},onHeaderCheckboxToggle(a){b(t,n=>{let l=n.data.data.map(u=>m(r({},u),{checked:a}));return m(r({},n),{data:m(r({},n.data),{data:l})})})},getAdjustmentJournal:ae(y(R(a=>d.getAdjustmentJournal(a).pipe(J(n=>m(r({},n),{data:n.data.map(l=>m(r({},l),{checked:!1}))})),oe({next:n=>{b(t,l=>m(r({},l),{data:n}))},error:n=>{console.error("Error fetching customer invoice:",n)}})))))}}),Z(t=>({onInit:()=>{t.getAdjustmentJournal(t.filter)}})));var de=()=>({height:"calc(100vh - 70px)"});function pe(t,d){if(t&1){let e=v();i(0,"p-button",8),E("onClick",function(){x(e);let n=s(2);return h(n.generateAdjusmentJournal())}),o()}}function se(t,d){if(t&1&&j(0,pe,1,0,"p-button",7),t&2){let e=s();_("ngIf",e.store.hasCheckedRows())}}function ue(t,d){t&1&&(i(0,"tr")(1,"th",10),C(2,"p-tableHeaderCheckbox"),o(),i(3,"th"),c(4,"Outlet"),o(),i(5,"th"),c(6,"Number"),o(),i(7,"th"),c(8,"Date"),o(),i(9,"th"),c(10,"Adjustment Qty"),o(),i(11,"th"),c(12,"Type"),o(),i(13,"th"),c(14,"State"),o(),i(15,"th"),c(16,"Note"),o(),C(17,"th"),o())}function _e(t,d){if(t&1&&(i(0,"tr")(1,"td"),C(2,"p-tableCheckbox",11),o(),i(3,"td"),c(4),o(),i(5,"td")(6,"a",12),c(7),o()(),i(8,"td"),c(9),A(10,"date"),o(),i(11,"td"),c(12),A(13,"number"),o(),i(14,"td"),c(15),o(),i(16,"td"),c(17),o(),i(18,"td"),C(19,"div",13),o(),i(20,"td"),C(21,"p-button",14),o()()),t&2){let e=d.$implicit,a=s(2);p(2),_("value",e),p(2),S(e.outlet),p(2),_("href",a.authService.getTenantExternalURL()+"/menu/Adjustment/Adjustment/Archive/Info?ID="+e.id,M),p(),V(" ",e.number," "),p(2),S(B(10,12,e.date,"d MMM y")),p(3),S(D(13,15,e.quantitySUM)),p(3),S(e.type),p(2),S(e.state),p(2),_("innerHTML",e.note,P),p(2),_("icon",e.integrated?"fa-solid fa-circle-check":"fa-solid fa-circle-xmark")("severity",e.integrated?"success":"danger")("text",!0)}}function ge(t,d){if(t&1&&c(0),t&2){let e=s(2);U(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function fe(t,d){t&1&&(i(0,"tr")(1,"td",15)(2,"span"),c(3,"No records found."),o()()())}function xe(t,d){if(t&1){let e=v();i(0,"p-panel")(1,"p-table",9),E("onRowSelect",function(n){x(e);let l=s();return h(l.onRowSelect(n))})("onRowUnselect",function(n){x(e);let l=s();return h(l.onRowUnselect(n))})("onHeaderCheckboxToggle",function(n){x(e);let l=s();return h(l.onHeaderCheckboxToggle(n))})("onPage",function(n){x(e);let l=s();return h(l.onPageChange(n))}),j(2,ue,18,0,"ng-template",null,2,g)(4,_e,22,17,"ng-template",null,3,g)(6,ge,1,3,"ng-template",null,4,g)(8,fe,4,0,"ng-template",null,5,g),o()()}if(t&2){let e=s();I(z(9,de)),p(),_("value",e.store.data().data)("scrollable",!0)("scrollHeight","calc(100vh - 142px)")("paginator",!0)("rows",e.store.filter().PageSize)("totalRecords",e.store.data().totalCount)("lazy",!0)}}var Fe=(()=>{class t{constructor(){this.store=f(T),this.generateJournalService=f(k),this.authService=f(q)}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(a=>{this.store.onRowUnselect(a)});return}else this.store.onRowUnselect(e.data)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onPageChange(e){let a=e.first/e.rows;this.store.updateFilter(m(r({},this.store.filter()),{PageNumber:a+1}))}generateAdjusmentJournal(){this.generateJournalService.createAdjustmentJournal(this.store.checkedAdjustment()).subscribe()}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275cmp=H({type:t,selectors:[["app-adjustment-journal"]],features:[N([T])],decls:5,vars:0,consts:[["actionButton",""],["content",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["pageTitle","Adjustment"],["label","Generate Journal",3,"onClick",4,"ngIf"],["label","Generate Journal",3,"onClick"],["dataKey","id",3,"onRowSelect","onRowUnselect","onHeaderCheckboxToggle","onPage","value","scrollable","scrollHeight","paginator","rows","totalRecords","lazy"],[2,"width","4rem"],[3,"value"],["target","_blank",1,"link","link-primary",3,"href"],[3,"innerHTML"],[3,"icon","severity","text"],["colspan","8"]],template:function(a,n){a&1&&(i(0,"app-main-panel",6),j(1,se,1,1,"ng-template",null,0,g)(3,xe,10,10,"ng-template",null,1,g),o())},dependencies:[ne,me,ie,re,le,O,F,L,G,W,$,Q,K],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();export{Fe as AdjustmentJournalComponent};
|
package/chunk-W76GKZZU.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Z as o}from"./chunk-ARSLNNKY.js";function i(e="emit"){return r=>r.pipe(o(t=>console.log(`${e}`,t)))}export{i as a};
|
package/chunk-X5SV4H5B.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as E}from"./chunk-ANMXAMBL.js";import{b as pe}from"./chunk-TDDTBHQE.js";import{a as O}from"./chunk-QIXIZZPY.js";import{a as ne,b as oe}from"./chunk-ZPTNYW2S.js";import{h as ae,j as ie,k as re,l as le}from"./chunk-GY53MWXH.js";import"./chunk-6NCHCAKY.js";import"./chunk-5AITWOQZ.js";import"./chunk-ACQX2T2H.js";import{c as q,d as Q}from"./chunk-JG5HGOEX.js";import{g as te}from"./chunk-ZB6TB7JI.js";import"./chunk-7KQDKLO4.js";import{a as w,b as W,c as X,d as Y,e as Z,f as ee}from"./chunk-H4V6YZX2.js";import{C as K,D as $}from"./chunk-WAJWW3TC.js";import"./chunk-U6SRN7P3.js";import"./chunk-TPGKCMVN.js";import"./chunk-BCXNVGDH.js";import"./chunk-U5LD55IP.js";import"./chunk-F2X3VGZZ.js";import"./chunk-TYETQJ2X.js";import{m as F,r as G,t as L}from"./chunk-353U23ZQ.js";import{$b as y,Bb as k,Jc as J,Lb as g,Lc as T,Mc as x,Ob as N,Vb as a,Wb as o,X as H,Xb as S,Yc as v,bb as I,c as A,cb as V,ec as R,fc as u,gb as d,ha as f,pa as h,qa as C,qc as p,rc as b,s as M,sc as U,uc as z,vb as D,yc as B,zc as j}from"./chunk-ARSLNNKY.js";import{a as r,b as l}from"./chunk-YQFG5XE2.js";var ce={data:{data:[],totalCount:0},filter:{PageNumber:1,PageSize:20,Number:""}},P=W(ee(ce),X(t=>({first:v(()=>(t.filter().PageNumber-1)*t.filter().PageSize+1),end:v(()=>Math.min(t.filter().PageNumber*t.filter().PageSize,t.data().totalCount)),hasCheckedRows:v(()=>t.data().data.some(c=>c.checked)),checkedAPCollection:v(()=>t.data().data.filter(c=>c.checked).map(c=>c.id))})),Z(t=>{let c=f(E),e=f(pe);return{updateFilter(i){w(t,n=>l(r({},n),{filter:r(r({},n.filter),i)}))},onRowSelect(i){w(t,n=>{let s=n.data.data.map(_=>_.id===i.id?l(r({},_),{checked:!0}):_);return l(r({},n),{data:l(r({},n.data),{data:s})})})},onRowUnselect(i){w(t,n=>{let s=n.data.data.map(_=>_.id===i.id?l(r({},_),{checked:!1}):_);return l(r({},n),{data:l(r({},n.data),{data:s})})})},onHeaderCheckboxToggle(i){w(t,n=>{let s=n.data.data.map(_=>l(r({},_),{checked:i}));return l(r({},n),{data:l(r({},n.data),{data:s})})})},getARCollection:ne(A(H(i=>c.getAPJournal(i).pipe(M(n=>l(r({},n),{data:n.data.map(s=>l(r({},s),{due:e.from(s.due)?e.from(s.due).format():null,checked:!1}))})),oe({next:n=>{w(t,s=>l(r({},s),{data:n}))},error:n=>{console.error("Error fetching customer invoice:",n)}})))))}}),Y(t=>({onInit:()=>{t.getARCollection(t.filter)}})));var me=()=>({height:"calc(100vh - 70px)"});function de(t,c){if(t&1){let e=y();a(0,"p-button",8),R("onClick",function(){h(e);let i=u(2);return C(i.onCreateJournal())}),o()}}function se(t,c){if(t&1&&k(0,de,1,0,"p-button",7),t&2){let e=u();g("ngIf",e.store.hasCheckedRows())}}function ue(t,c){t&1&&(a(0,"tr")(1,"th",10),S(2,"p-tableHeaderCheckbox"),o(),a(3,"th"),p(4,"Outlet"),o(),a(5,"th"),p(6,"Number"),o(),a(7,"th"),p(8,"Supplier"),o(),a(9,"th"),p(10,"Date"),o(),a(11,"th"),p(12,"Due"),o(),a(13,"th"),p(14,"Note"),o(),a(15,"th"),p(16,"Payment"),o(),S(17,"th"),o())}function _e(t,c){if(t&1&&(a(0,"tr")(1,"td"),S(2,"p-tableCheckbox",11),o(),a(3,"td"),p(4),o(),a(5,"td")(6,"a",12),p(7),o()(),a(8,"td"),p(9),o(),a(10,"td"),p(11),J(12,"date"),o(),a(13,"td"),p(14),J(15,"date"),o(),a(16,"td"),S(17,"div",13),o(),a(18,"td"),p(19),o(),a(20,"td"),S(21,"p-button",14),o()()),t&2){let e=c.$implicit,m=u(2);d(2),g("value",e),d(2),b(e.outlet),d(2),g("href",m.authService.getTenantExternalURL()+"/menu/Debt/Debt/Join_Bill/New_Join_Bill/Info?ID="+e.id,V),d(),U(" ",e.number," "),d(2),b(e.customer),d(2),b(T(12,12,e.date,"d MMM y")),d(3),b(e.due?T(15,15,e.due,"d MMM y hh:mm"):"-"),d(3),g("innerHTML",e.note,I),d(2),b(e.payment),d(2),g("icon",e.integrated?"fa-solid fa-circle-check":"fa-solid fa-circle-xmark")("severity",e.integrated?"success":"danger")("text",!0)}}function fe(t,c){if(t&1&&p(0),t&2){let e=u(2);z(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function ge(t,c){t&1&&(a(0,"tr")(1,"td",15)(2,"span"),p(3,"No records found."),o()()())}function xe(t,c){if(t&1){let e=y();a(0,"p-panel")(1,"p-table",9),R("onPage",function(i){h(e);let n=u();return C(n.onPageChange(i))})("onHeaderCheckboxToggle",function(i){h(e);let n=u();return C(n.onHeaderCheckboxToggle(i))})("onRowSelect",function(i){h(e);let n=u();return C(n.onRowSelect(i))})("onRowUnselect",function(i){h(e);let n=u();return C(n.onRowUnselect(i))}),k(2,ue,18,0,"ng-template",null,2,x)(4,_e,22,18,"ng-template",null,3,x)(6,fe,1,3,"ng-template",null,4,x)(8,ge,4,0,"ng-template",null,5,x),o()()}if(t&2){let e=u();N(j(9,me)),d(),g("value",e.store.data().data)("scrollable",!0)("scrollHeight","calc(100vh - 142px)")("paginator",!0)("rows",e.store.filter().PageSize)("totalRecords",e.store.data().totalCount)("lazy",!0)}}var Ge=(()=>{class t{constructor(){this.store=f(P),this.generateJournalService=f(E),this.authService=f(O)}onPageChange(e){let m=e.first/e.rows;this.store.updateFilter(l(r({},this.store.filter()),{PageNumber:m+1}))}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(m=>{this.store.onRowUnselect(m)});return}else this.store.onRowUnselect(e.data)}onCreateJournal(){this.generateJournalService.createAPJournal(this.store.checkedAPCollection()).subscribe()}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275cmp=D({type:t,selectors:[["app-ap-journal"]],features:[B([P])],decls:5,vars:0,consts:[["actionButton",""],["content",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["pageTitle","AP Collection"],["label","Generate Journal",3,"onClick",4,"ngIf"],["label","Generate Journal",3,"onClick"],["dataKey","id",3,"onPage","onHeaderCheckboxToggle","onRowSelect","onRowUnselect","value","scrollable","scrollHeight","paginator","rows","totalRecords","lazy"],[2,"width","4rem"],[3,"value"],["target","_blank",1,"link","link-primary",3,"href"],[3,"innerHTML"],[3,"icon","severity","text"],["colspan","8"]],template:function(m,i){m&1&&(a(0,"app-main-panel",6),k(1,se,1,1,"ng-template",null,0,x)(3,xe,10,10,"ng-template",null,1,x),o())},dependencies:[te,le,ae,ie,re,L,F,G,$,K,Q,q],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();export{Ge as ApJournalComponent};
|
package/chunk-YYUWLV5N.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as Je,b as qe,c as Qe,d as Xe,e as Ze,f as et}from"./chunk-O2GA6PH7.js";import{c as Z,d as re}from"./chunk-PZBZVQUY.js";import{a as ze,b as Ye}from"./chunk-ZPTNYW2S.js";import{h as ee,i as Ke,j as ye,k as be,l as te}from"./chunk-GY53MWXH.js";import{f as Y,g as K}from"./chunk-6NCHCAKY.js";import"./chunk-5AITWOQZ.js";import"./chunk-ACQX2T2H.js";import{a as Ee}from"./chunk-W76GKZZU.js";import{c as H,d as V}from"./chunk-JG5HGOEX.js";import{a as ve,b as z}from"./chunk-7U2I35GP.js";import{g as R}from"./chunk-ZB6TB7JI.js";import"./chunk-7KQDKLO4.js";import{a as se,b as $e,c as Ve,d as We,e as Ue,f as je,g as He}from"./chunk-H4V6YZX2.js";import{C as B,D as $,u as Be}from"./chunk-WAJWW3TC.js";import{e as j,f as _e,j as ae,k as fe,m as ge,n as xe,o as Ne,p as he,w as Ce,y as X,z as Se}from"./chunk-U6SRN7P3.js";import"./chunk-TPGKCMVN.js";import"./chunk-BCXNVGDH.js";import{d as de}from"./chunk-U5LD55IP.js";import"./chunk-F2X3VGZZ.js";import{n as ie,p as Ge,q as N,x as A}from"./chunk-TYETQJ2X.js";import{m as k,q as Le,t as D}from"./chunk-353U23ZQ.js";import{$b as w,Ac as oe,Bb as d,Ga as O,Jc as ke,Kc as Ae,Lb as s,Mc as u,Ob as T,Qb as me,Rb as v,Tb as y,Ub as b,Vb as a,Wb as o,X as Q,Xb as W,Yc as ce,Z as E,ba as ue,bb as De,c as Me,ec as M,fc as c,gb as p,ha as x,pa as C,qa as S,qc as m,rc as _,s as q,sc as P,vb as F,yc as Re,zc as I}from"./chunk-ARSLNNKY.js";import{a as f,b as g}from"./chunk-YQFG5XE2.js";var L=(()=>{class t{constructor(){this.httpService=x(de)}getGlobalConfiguration(){return this.httpService.get(void 0,"/api/setup/GlobalConfiguration")}saveGlobalConfiguration(e){return this.httpService.post(void 0,"/api/setup/SubmitGlobalConfiguration",e)}fetchPOSOutletConfiguration(){return this.httpService.get(void 0,"/api/Setup/OutletConfiguration")}fetchPOSOutletFormConfiguration(e){let n={params:e};return this.httpService.get(void 0,"/api/Setup/OutletConfigurationForm",n)}updatePOSOutletConfiguration(e){return this.httpService.post(void 0,"/api/Setup/SubmitOutletConfiguration",e)}fetchPOSPaymentConfiguration(){return this.httpService.get(void 0,"/api/Setup/PaymentConfiguration")}fetchPOSPaymentFormConfiguration(e){let n={params:e};return this.httpService.get(void 0,"api/Setup/PaymentConfigurationForm",n)}updatePOSPaymentConfiguration(e){return this.httpService.post(void 0,"/api/Setup/SubmitPaymentConfiguration",e)}fetchPOSTaxConfiguration(){return this.httpService.get(void 0,"/api/setup/TaxConfigurationForm")}updatePOSTaxConfiguration(e){return this.httpService.post(void 0,"/api/setup/SubmitTaxConfiguration",e)}fetchPOSWriteOffConfiguration(){return this.httpService.get(void 0,"/api/setup/WriteOffConfigurationList")}fetchPOSWriteOffFormConfiguration(e){let n={params:e};return this.httpService.get(void 0,"/api/setup/WriteOffConfigurationForm",n)}updatePOSWriteOffConfiguration(e){return this.httpService.post(void 0,"/api/setup/SubmitWriteOffConfiguration",e)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=ue({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var G=function(t){return t.POSGLOBAL_SELL="Sell",t.POSGLOBAL_BUY="Buy",t.POSGLOBAL_ADJUSTMENT="Adjustment",t.POSGLOBAL_PREPAID="Prepaid",t.POSGLOBAL_RETURN="Return",t.POSGLOBAL_DEBT="Debt",t.POSGLOBAL_PAYMENTFEE="Payment Fee",t.POSGLOBAL_MANUFACTURING="Manufacturing",t.POSGLOBAL_ADVANCE="Advance",t}(G||{});var tt={[G.POSGLOBAL_SELL]:[{typeID:2,side:"debit",label:"Account Receivable"},{typeID:1,side:"credit",label:"Sales"},{typeID:4,side:"debit",label:"COGS"},{typeID:3,side:"credit",label:"Sold Inventory"},{typeID:10,side:"debit",label:"Sales Discount"}],[G.POSGLOBAL_BUY]:[{typeID:27,side:"debit",label:"Pending Paid Inventory"},{typeID:5,side:"credit",label:"Account Payable"},{typeID:28,side:"debit",label:"Inventory Bought"},{typeID:27,side:"credit",label:"Pending Paid Inventory"},{typeID:11,side:"credit",label:"Purchase Discount"}],[G.POSGLOBAL_ADJUSTMENT]:[{typeID:26,side:"debit",label:"Adjustment Asset"},{typeID:21,side:"credit",label:"Adjustment Expense"}],[G.POSGLOBAL_PREPAID]:[{typeID:29,side:"debit",label:"Accounting for Prepaid"},{typeID:29,side:"credit",label:"Accounting for Prepaid"},{typeID:30,side:"debit",label:"Sales For Prepaid"}],[G.POSGLOBAL_RETURN]:[{typeID:8,side:"debit",label:"Sales Return"},{typeID:3,side:"debit",label:"Inventory"},{typeID:4,side:"credit",label:"COGS"},{typeID:9,side:"credit",label:"Purchase Return"}],[G.POSGLOBAL_DEBT]:[{typeID:17,side:"debit",label:"Consignment Payable"}],[G.POSGLOBAL_PAYMENTFEE]:[{typeID:19,side:"debit",label:"Payment Fee"},{typeID:20,side:"credit",label:"Surcharge"}],[G.POSGLOBAL_MANUFACTURING]:[{typeID:24,side:"debit",label:"Finished Goods"},{typeID:23,side:"credit",label:"Raw Material"},{typeID:25,side:"credit",label:"Production Expenses"}],[G.POSGLOBAL_ADVANCE]:[{typeID:15,side:"debit",label:"Crossing Account"},{typeID:16,side:"debit",label:"Retained Earnings"},{typeID:18,side:"debit",label:"Current Earnings"}]};function dt(t,r){if(t&1){let e=w();a(0,"div",5)(1,"p-button",6),M("onClick",function(){C(e);let i=c();return S(i.onSubmit())}),o()()}}function _t(t,r){if(t&1&&(a(0,"p-tab",10),m(1),o()),t&2){let e=r.$implicit;s("value",e.value),p(),_(e.label)}}function ft(t,r){if(t&1&&(a(0,"div",19)(1,"div")(2,"span"),m(3),o()(),a(4,"div")(5,"span"),m(6),o()()()),t&2){let e=r.$implicit;p(3),P("(",e.code,")"),p(3),_(e.name)}}function gt(t,r){if(t&1&&(a(0,"div",19)(1,"div")(2,"span"),m(3),o()(),a(4,"div")(5,"span"),m(6),o()()()),t&2){let e=r.$implicit;p(3),P("(",e.code,")"),p(3),_(e.name)}}function xt(t,r){if(t&1&&(a(0,"div",14)(1,"div",15)(2,"div",5)(3,"label",16),m(4),o(),a(5,"span",17),m(6),o()(),a(7,"p-select",18),d(8,ft,7,2,"ng-template",null,2,u)(10,gt,7,2,"ng-template",null,3,u),o()()()),t&2){let e=c(),n=e.$implicit,i=e.$index,l=c(4);s("formGroupName",i),p(4),_(n.entry.value.label),p(2),_(n.entry.value.side),p(),s("options",l.posIntegration().options.accounts)}}function ht(t,r){if(t&1&&d(0,xt,12,4,"div",14),t&2){let e=r.$implicit;me(e.entry.value.side==="debit"?0:-1)}}function Ct(t,r){if(t&1&&(a(0,"div",19)(1,"div")(2,"span"),m(3),o()(),a(4,"div")(5,"span"),m(6),o()()()),t&2){let e=r.$implicit;p(3),P("(",e.code,")"),p(3),_(e.name)}}function St(t,r){if(t&1&&(a(0,"div",19)(1,"div")(2,"span"),m(3),o()(),a(4,"div")(5,"span"),m(6),o()()()),t&2){let e=r.$implicit;p(3),P("(",e.code,")"),p(3),_(e.name)}}function vt(t,r){if(t&1&&(a(0,"div",14)(1,"div",15)(2,"div",5)(3,"label",16),m(4),o(),a(5,"span",20),m(6),o()(),a(7,"p-select",18),d(8,Ct,7,2,"ng-template",null,2,u)(10,St,7,2,"ng-template",null,3,u),o()()()),t&2){let e=c(),n=e.$implicit,i=e.$index,l=c(4);s("formGroupName",i),p(4),_(n.entry.value.label),p(2),_(n.entry.value.side),p(),s("options",l.posIntegration().options.accounts)}}function yt(t,r){if(t&1&&d(0,vt,12,4,"div",14),t&2){let e=r.$implicit;me(e.entry.value.side==="credit"?0:-1)}}function bt(t,r){if(t&1&&(a(0,"p-tabpanel",10)(1,"div",11)(2,"div",12)(3,"div",13),y(4,ht,1,1,null,null,v),o()(),a(6,"div",12)(7,"div",13),y(8,yt,1,1,null,null,v),o()()()()),t&2){let e=r.$implicit,n=c(3);s("value",e.value),p(),s("formGroupName",e.value),p(3),b(n.getDebitEntries(e.value)),p(4),b(n.getCreditEntries(e.value))}}function Pt(t,r){if(t&1){let e=w();a(0,"form",8),M("ngSubmit",function(){C(e);let i=c(2);return S(i.onSubmit())}),a(1,"p-tabs",9)(2,"p-tablist"),y(3,_t,2,2,"p-tab",10,v),o(),a(5,"p-tabpanels"),y(6,bt,10,2,"p-tabpanel",10,v),o()()()}if(t&2){let e=c(2);s("formGroup",e.accountForm),p(),s("value",e.tab())("lazy",!0),p(2),b(e.tabs()),p(3),b(e.tabs())}}function Ot(t,r){if(t&1&&d(0,Pt,8,3,"form",7),t&2){let e=c();s("ngIf",e.posIntegration())}}var nt=(()=>{class t{constructor(){this.posConfigService=x(L),this.fb=x(Ce),this.tab=O(G.POSGLOBAL_SELL),this.tabs=O(Object.values(G).map(e=>({label:e,value:e}))),this.posIntegration=O(null),this.form=O([]),this.descriptionsMap=new Map,this.objectKeys=Object.keys,this.posGlobalTabEnum=G}ngOnInit(){this.posConfigService.getGlobalConfiguration().pipe(E(e=>{this.posIntegration.set(e),this.form.set(e.form),this.descriptionsMap=new Map(e.descriptions.map(n=>[+n.id,n.name])),this.initializeForm()})).subscribe()}initializeForm(){let e={};this.tabs().forEach(n=>{let i=this.getEntriesForTab(n.value);console.log(`Entries for ${n.value}:`,i),e[n.value]=this.fb.array(i.map(l=>this.createEntryFormGroup(l)))}),this.accountForm=this.fb.group(e)}createEntryFormGroup(e){return this.fb.group({typeID:[e.typeID],label:[e.label],side:[e.side],accountID:[this.getAccountIDByTypeID(e.typeID)]})}getAccountIDByTypeID(e){return this.form().find(i=>i.typeID===e)?.accountID||""}getEntriesForTab(e){return tt[e]||[]}getTabEntries(e){return this.accountForm.get(e)}updateAccountID(e,n){let i=this.form().map(l=>l.typeID===n?g(f({},l),{accountID:e}):l);this.form.set(i)}onSubmit(){let e=this.accountForm.getRawValue(),n=[],i=new Set;for(let l of Object.values(e))for(let{typeID:h,accountID:U}of l){let we=`${h}_${U}`;i.has(we)||(i.add(we),n.push({typeID:h,accountID:U}))}console.log("Form submitted with value:",n),this.posConfigService.saveGlobalConfiguration({form:n}).subscribe({next:()=>console.log("Save successful"),error:l=>console.error("Save failed",l)})}getDebitEntries(e){return this.getTabEntries(e).controls.map((n,i)=>({entry:n,index:i})).filter(n=>n.entry.value.side==="debit")}getCreditEntries(e){return this.getTabEntries(e).controls.map((n,i)=>({entry:n,index:i})).filter(n=>n.entry.value.side==="credit")}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-pos-global"]],decls:5,vars:0,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],["pageTitle","POS Integration"],[1,"d-flex","gap-2"],["label","Submit",3,"onClick"],[3,"formGroup","ngSubmit",4,"ngIf"],[3,"ngSubmit","formGroup"],[1,"border-top",3,"value","lazy"],[3,"value"],[1,"row",3,"formGroupName"],[1,"col"],[1,"row","gap-3"],[1,"col-12",3,"formGroupName"],[1,"form-group","d-flex","flex-column"],["for","",1,"fs-3"],[1,"text-success","fs-3"],["filter","","filterBy","code,name","formControlName","accountID","optionLabel","name","optionValue","id",3,"options"],[1,"d-flex","align-items-center","gap-2"],[1,"text-danger","fs-3"]],template:function(n,i){n&1&&(a(0,"app-main-panel",4),d(1,dt,2,0,"ng-template",null,0,u)(3,Ot,1,1,"ng-template",null,1,u),o())},dependencies:[R,et,Ze,Xe,Qe,Je,qe,Be,K,Y,X,fe,j,_e,D,k,A,$,B,Se,ge,he,xe],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var It=t=>[t];function Et(t,r){if(t&1&&(a(0,"th",8),m(1),o()),t&2){let e=r.$implicit;p(),_(e.name.slice(0,10))}}function Ft(t,r){if(t&1&&(a(0,"tr")(1,"th",6),m(2,"Method"),o(),a(3,"th",7),m(4,"Outlet"),o()(),a(5,"tr"),y(6,Et,2,1,"th",8,v),o()),t&2){let e=c(3);p(3),s("colSpan",e.paymentConfiguration().outlets.length),p(3),b(e.paymentConfiguration().outlets)}}function Tt(t,r){if(t&1&&(a(0,"td"),m(1),o()),t&2){let e=r.$implicit;p(),_(e.accountName)}}function wt(t,r){if(t&1&&(a(0,"tr")(1,"td",9)(2,"a",10),m(3),o()(),y(4,Tt,2,1,"td",null,v),o()),t&2){let e=r.$implicit;p(2),s("routerLink",oe(2,It,e.id)),p(),_(e.name),p(),b(e.accounts)}}function Mt(t,r){if(t&1&&(a(0,"p-table",5),d(1,Ft,8,1,"ng-template",null,1,u)(3,wt,6,4,"ng-template",null,2,u),o()),t&2){let e=c(2);s("scrollable",!0)("scrollHeight","calc(100vh - 70px)")("value",e.paymentConfiguration().payment)}}function Dt(t,r){t&1&&(a(0,"app-main-panel",4),d(1,Mt,5,3,"ng-template",null,0,u),o())}var ot=(()=>{class t{constructor(){this.POSSetupService=x(L),this.paymentConfiguration=O(null)}ngOnInit(){this.POSSetupService.fetchPOSPaymentConfiguration().pipe(E(e=>{this.paymentConfiguration.set(e)})).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-pos-payment"]],decls:1,vars:1,consts:[["content",""],["header",""],["body",""],["pageTitle","Payment Method Accounting",4,"ngIf"],["pageTitle","Payment Method Accounting"],[3,"scrollable","scrollHeight","value"],["rowspan","3",2,"min-width","300px"],[3,"colSpan"],[2,"min-width","200px"],["pFrozenColumn",""],[1,"link-primary",3,"routerLink"]],template:function(n,i){n&1&&d(0,Dt,3,0,"app-main-panel",3),n&2&&s("ngIf",i.paymentConfiguration())},dependencies:[R,te,ee,Ke,D,k,A,N],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Rt=()=>({height:"calc(100vh - 70px)"}),kt=t=>[t];function At(t,r){if(t&1&&(a(0,"th"),m(1),o()),t&2){let e=r.$implicit;p(),_(e.value)}}function Lt(t,r){if(t&1&&(a(0,"tr")(1,"th"),m(2,"Name"),o(),y(3,At,2,1,"th",null,v),o()),t&2){let e=c(3);p(3),b(e.outletList().listCOAType)}}function Gt(t,r){if(t&1&&(a(0,"td"),m(1),o()),t&2){let e=r.$implicit;p(),_(e)}}function Nt(t,r){if(t&1&&(a(0,"tr")(1,"td")(2,"a",6),m(3),o()(),y(4,Gt,2,1,"td",null,v),o()),t&2){let e=r.$implicit;p(2),s("routerLink",oe(2,kt,e.OutletID)),p(),P(" ",e.OutletName,""),p(),b(e.Accounts)}}function Bt(t,r){if(t&1&&(a(0,"p-panel")(1,"p-table",5),d(2,Lt,5,0,"ng-template",null,1,u)(4,Nt,6,4,"ng-template",null,2,u),o()()),t&2){let e=c(2);T(I(5,Rt)),p(),s("scrollable",!0)("scrollHeight","calc(100vh - 100px)")("value",e.outletList().listOutletAccount)}}function $t(t,r){if(t&1&&d(0,Bt,6,6,"p-panel",4),t&2){let e=c();s("ngIf",e.outletList())}}var it=(()=>{class t{constructor(){this.POSSetupService=x(L),this.outletList=O(null)}ngOnInit(){this.POSSetupService.fetchPOSOutletConfiguration().pipe(E(e=>{this.outletList.set(e)})).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-pos-outlet"]],decls:3,vars:0,consts:[["content",""],["header",""],["body",""],["pageTitle","Outlet Account"],[3,"style",4,"ngIf"],[3,"scrollable","scrollHeight","value"],[1,"link","link-primary",3,"routerLink"]],template:function(n,i){n&1&&(a(0,"app-main-panel",3),d(1,$t,1,1,"ng-template",null,0,u),o())},dependencies:[R,D,k,z,te,ee,A,N,V,H],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Vt=()=>({height:"calc(100vh - 100px)"}),Wt=()=>({height:"calc(100vh - 150px)"});function Ut(t,r){if(t&1){let e=w();a(0,"a",5),m(1,"Cancel"),o(),a(2,"p-button",6),M("onClick",function(){C(e);let i=c();return S(i.updatePOsOutletConfiguration())}),o()}}function jt(t,r){if(t&1&&(a(0,"div",16)(1,"div",17)(2,"span"),m(3),o()(),a(4,"div",17)(5,"span",17),m(6),o()()()),t&2){let e=r.$implicit;p(3),P("(",e.code,")"),p(3),_(e.name)}}function Ht(t,r){if(t&1&&(a(0,"div",16)(1,"div",17)(2,"span"),m(3),o()(),a(4,"div",18)(5,"span",17),m(6),o()()()),t&2){let e=r.$implicit;p(3),P("(",e.code,")"),p(3),_(e.name)}}function zt(t,r){if(t&1&&(a(0,"div",12)(1,"span",14),m(2),o(),a(3,"p-select",15),d(4,jt,7,2,"ng-template",null,2,u)(6,Ht,7,2,"ng-template",null,3,u),o()()),t&2){let e,n=r.$implicit,i=r.$index,l=c(3);s("formGroupName",i),p(2),_((e=n.get("TypeName"))==null?null:e.value),p(),s("options",l.options.accounts)}}function Yt(t,r){t&1&&W(0,"hr")}function Kt(t,r){if(t&1&&(a(0,"div",9)(1,"h3",10),m(2),ke(3,"titlecase"),o(),a(4,"div",11),y(5,zt,8,3,"div",12,v),o()(),d(7,Yt,1,0,"hr",13)),t&2){let e,n=r.$implicit,i=r.$index,l=r.$index,h=r.$count,U=c(2);s("formGroupName",i),p(2),P(" ",Ae(3,3,(e=n.get("groupName"))==null?null:e.value)," "),p(3),b(U.getAccountsFormArray(l).controls),p(2),s("ngIf",l!==h-1)}}function Jt(t,r){if(t&1&&(a(0,"p-panel")(1,"p-scroll-panel")(2,"form",7)(3,"div",8),y(4,Kt,8,5,null,null,v),o()()()()),t&2){let e=c();T(I(5,Vt)),p(),T(I(6,Wt)),p(),s("formGroup",e.accountsForm),p(2),b(e.accountGroupsArray.controls)}}var at=(()=>{class t{constructor(){this.route=x(ie),this.POSSetupService=x(L),this.outletForm=O(null),this.allAccounts=[],this.options=null,this.outletName="",this.accountGroups=[{name:"sell",typeIds:[1,2],accounts:[]},{name:"delivery",typeIds:[3,4],accounts:[]},{name:"buy",typeIds:[27,11,28],accounts:[]},{name:"purchase return",typeIds:[9],accounts:[]},{name:"sales return",typeIds:[8],accounts:[]},{name:"adjustment",typeIds:[21,26],accounts:[]}],this.fb=x(Ce)}ngOnInit(){this.accountsForm=this.fb.group({accountGroups:this.fb.array([])}),this.route.paramMap.pipe(q(e=>e.get("id")),Q(e=>this.POSSetupService.fetchPOSOutletFormConfiguration({outletID:e})),E(e=>{this.allAccounts=e.form,this.options=e.options,this.outletName=e.form[0].OutletName,this.accountGroups.forEach(i=>{i.accounts=this.allAccounts.filter(l=>i.typeIds.includes(l.TypeID))});let n=this.accountsForm.get("accountGroups");this.accountGroups.forEach(i=>{n.push(this.createAccountGroupControl(i))})})).subscribe()}get accountGroupsArray(){return this.accountsForm.get("accountGroups")}getAccountsFormArray(e){return this.accountGroupsArray.at(e).get("accounts")}createAccountGroupControl(e){return this.fb.group({groupName:[e.name],accounts:this.fb.array(e.accounts.map(n=>this.createAccountControl(n)))})}createAccountControl(e){return this.fb.group({AccountID:[e.AccountID],TypeID:[e.TypeID],TypeName:[e.TypeName],OutletID:[e.OutletID],OutletName:[e.OutletName]})}updatePOsOutletConfiguration(){let{accountGroups:e}=this.accountsForm.value,n={form:e.flatMap(i=>i.accounts.map(l=>({AccountID:l.AccountID,TypeID:l.TypeID,TypeName:l.TypeName,OutletID:l.OutletID,OutletName:l.OutletName})))};this.POSSetupService.updatePOSOutletConfiguration(n).pipe().subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-pos-outlet-form"]],decls:5,vars:2,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],[3,"pageTitle","hasMainWrapperPadding"],["routerLink","/pos-setup/outlets",1,"p-button","p-button-secondary","p-button-outlined"],["label","Submit",3,"onClick"],[1,"",3,"formGroup"],["formArrayName","accountGroups",1,"d-flex","flex-column","gap-2"],[1,"row",3,"formGroupName"],[1,"fs-4","fw-semibold"],["formArrayName","accounts",1,"row","row-gap-3"],[1,"col-6",3,"formGroupName"],[4,"ngIf"],[1,"fs-3"],["formControlName","AccountID","filter","","filterBy","code,name","optionLabel","name","optionValue","id","placeholder","Select an account",1,"w-100",3,"options"],[1,"d-flex","gap-2"],[1,""],[1,"d-inline-block","text-truncate",2,"max-width","250px"]],template:function(n,i){n&1&&(a(0,"app-main-panel",4),d(1,Ut,3,0,"ng-template",null,0,u)(3,Jt,6,7,"ng-template",null,1,u),o()),n&2&&s("pageTitle","Edit "+i.outletName)("hasMainWrapperPadding",!0)},dependencies:[R,D,k,Le,z,Se,fe,j,_e,ge,he,xe,Ne,K,Y,V,H,Z,$,B,A,N],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Qt=()=>({height:"calc(100vh - 100px)"}),Xt=()=>({width:"100%",height:"calc(100vh - 150px)"}),Zt=()=>({width:"100%"});function en(t,r){if(t&1){let e=w();a(0,"a",6),m(1,"Cancel"),o(),a(2,"p-button",7),M("onClick",function(){C(e);let i=c(3);return S(i.updatePOSOutletConfiguration())}),o()}}function tn(t,r){if(t&1&&(a(0,"div",15)(1,"div",16)(2,"span"),m(3),o()(),a(4,"div",16)(5,"span",16),m(6),o()()()),t&2){let e=r.$implicit;p(3),P("(",e.code,")"),p(3),_(e.name)}}function nn(t,r){if(t&1&&(a(0,"div",15)(1,"div",16)(2,"span"),m(3),o()(),a(4,"div",17)(5,"span",16),m(6),o()()()),t&2){let e=r.$implicit;p(3),P("(",e.code,")"),p(3),_(e.name)}}function on(t,r){if(t&1){let e=w();a(0,"div",9)(1,"div",10)(2,"div",11)(3,"label",12),m(4),o()(),a(5,"div",13)(6,"p-select",14),M("ngModelChange",function(i){let l=C(e).$index,h=c(4);return S(h.updateAccountById(i,l))}),d(7,tn,7,2,"ng-template",null,2,u)(9,nn,7,2,"ng-template",null,3,u),o()()()()}if(t&2){let e=r.$implicit,n=r.$index,i=c(4);p(4),_(e.outletName.slice(0,15)),p(2),T(I(7,Zt)),s("ngModel",i.paymentForm().form.accounts[n].accountID)("virtualScroll",!0)("virtualScrollItemSize",50)("options",i.paymentForm().options.chartOfAccount)}}function an(t,r){if(t&1&&(a(0,"p-card")(1,"p-scrollpanel")(2,"div",8),y(3,on,11,8,"div",9,v),o()()()),t&2){let e=c(3);T(I(4,Qt)),p(),T(I(5,Xt)),p(2),b(e.paymentForm().form.accounts)}}function rn(t,r){if(t&1&&(a(0,"app-main-panel",4),d(1,en,3,0,"ng-template",null,0,u)(3,an,5,6,"ng-template",null,1,u),o()),t&2){let e=c(2);s("pageTitle",e.paymentForm().form.paymentMethod.name+" Form Accounting")("hasMainWrapperPadding",!0)}}function pn(t,r){if(t&1&&d(0,rn,5,2,"app-main-panel",5),t&2){let e=c();s("ngIf",e.paymentForm())}}var pt=(()=>{class t{constructor(){this.route=x(ie),this.POSSetupService=x(L),this.paymentForm=O(null),this.router=x(Ge)}ngOnInit(){this.route.paramMap.pipe(q(e=>+e.get("id")),Q(e=>this.POSSetupService.fetchPOSPaymentFormConfiguration({ID:e})),E(e=>{this.paymentForm.set(e)}),Ee("response")).subscribe()}updateAccountById(e,n){let i=this.paymentForm().form.accounts,l=g(f({},this.paymentForm()),{form:g(f({},this.paymentForm().form),{accounts:i.map((h,U)=>U===n?g(f({},h),{accountID:e}):h)})});this.paymentForm.set(l)}updatePOSOutletConfiguration(){let e={form:[...this.paymentForm().form.accounts]};this.POSSetupService.updatePOSPaymentConfiguration(e).pipe(Ee("response"),E(()=>{this.router.navigate(["/pos-setup/payments"])})).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-pos-payment-form"]],decls:1,vars:1,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],[3,"pageTitle","hasMainWrapperPadding"],[3,"pageTitle","hasMainWrapperPadding",4,"ngIf"],["routerLink","/pos-setup/payments",1,"p-button","p-button-outlined","p-button-secondary"],["label","Submit",3,"onClick"],[1,"row","row-gap-3"],[1,"col-6","d-flex","flex-column","gap-2"],[1,"row","row-gap-4"],[1,"col-2"],["for",""],[1,"col-6"],["filter","","filterBy","name,code","optionLabel","name","optionValue","id","placeholder","Select an account",1,"w-full",3,"ngModelChange","ngModel","virtualScroll","virtualScrollItemSize","options"],[1,"d-flex","gap-2"],[1,""],[1,"d-inline-block","text-truncate",2,"max-width","250px"]],template:function(n,i){n&1&&d(0,pn,1,1,"app-main-panel",4),n&2&&me(i.paymentForm()?0:-1)},dependencies:[z,ve,R,D,k,re,Z,K,Y,X,j,ae,A,N,$,B,V],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var ln=()=>({height:"calc(100vh - 70px)"}),mn=()=>({width:"100%",height:"calc(100vh - 100px)"});function cn(t,r){if(t&1){let e=w();a(0,"div",5)(1,"a",6),m(2,"Cancel"),o(),a(3,"p-button",7),M("onClick",function(){C(e);let i=c();return S(i.updatePOSTaxConfiguration())}),o()()}}function sn(t,r){if(t&1&&(a(0,"div",5)(1,"div",15)(2,"span"),m(3),o()(),a(4,"div",15)(5,"span",15),m(6),o()()()),t&2){let e=r.$implicit;p(3),P("(",e.code,")"),p(3),_(e.name)}}function un(t,r){if(t&1&&(a(0,"div",5)(1,"div",15)(2,"span"),m(3),o()(),a(4,"div",16)(5,"span",15),m(6),o()()()),t&2){let e=r.$implicit;p(3),P("(",e.code,")"),p(3),_(e.name)}}function dn(t,r){if(t&1){let e=w();a(0,"div",11)(1,"div",12)(2,"label",13),m(3),o(),a(4,"p-select",14),M("ngModelChange",function(i){let l=C(e).$index,h=c(2);return S(h.updateAccountID(i,l))}),d(5,sn,7,2,"ng-template",null,2,u)(7,un,7,2,"ng-template",null,3,u),o()()()}if(t&2){let e=r.$implicit,n=r.$index,i=c(2);p(3),_(e.name),p(),s("options",i.taxForm().options.chartOfAccount)("ngModel",i.taxForm().form[n].accountID)}}function _n(t,r){if(t&1&&(a(0,"p-panel")(1,"p-scroll-panel")(2,"div",8)(3,"div",9)(4,"div",10),y(5,dn,9,3,"div",11,v),o()()()()()),t&2){let e=c();T(I(4,ln)),p(),T(I(5,mn)),p(4),b(e.taxForm().form)}}var lt=(()=>{class t{constructor(){this.POSSetupService=x(L),this.taxForm=O(null)}ngOnInit(){this.POSSetupService.fetchPOSTaxConfiguration().pipe(E(e=>{this.taxForm.set(e)})).subscribe()}updateAccountID(e,n){let i=this.taxForm().form,l=g(f({},this.taxForm()),{form:i.map((h,U)=>U===n?g(f({},h),{accountID:e}):h)});this.taxForm.set(l)}updatePOSTaxConfiguration(){let e={form:[...this.taxForm().form]};this.POSSetupService.updatePOSTaxConfiguration(e).pipe(E(n=>console.log(n))).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-pos-tax"]],decls:5,vars:0,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],["pageTitle","Tax Setup"],[1,"d-flex","gap-2"],["routerLink","..",1,"p-button","p-button-secondary","p-button-outlined"],["label","Submit",3,"onClick"],[1,"row"],[1,"col-4"],[1,"row","row-gap-3"],[1,"col-12"],[1,"d-flex","flex-column"],["for",""],["filter","","filterBy","name,code","optionLabel","name","optionValue","id","placeholder","Select a account",3,"ngModelChange","options","ngModel"],[1,""],[1,"d-inline-block","text-truncate",2,"max-width","250px"]],template:function(n,i){n&1&&(a(0,"app-main-panel",4),d(1,cn,4,0,"ng-template",null,0,u)(3,_n,7,6,"ng-template",null,1,u),o())},dependencies:[R,z,D,K,Y,re,Z,X,j,ae,A,N,$,B,V,H],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var fn=()=>({height:"calc(100vh - 70px)"}),gn=()=>({"min-width":"50rem"}),xn=t=>[t];function hn(t,r){t&1&&W(0,"p-button",6)}function Cn(t,r){if(t&1&&d(0,hn,1,0,"p-button",5),t&2){let e=c();s("ngIf",e.hasCheckedItems())}}function Sn(t,r){t&1&&(a(0,"tr")(1,"th",8),W(2,"p-tableHeaderCheckbox"),o(),a(3,"th"),m(4,"Name"),o(),a(5,"th"),m(6,"Description"),o()())}function vn(t,r){if(t&1&&(a(0,"tr")(1,"td"),W(2,"p-tableCheckbox",9),o(),a(3,"td")(4,"a",10),m(5),o()(),a(6,"td"),m(7),o()()),t&2){let e,n=r.$implicit;p(2),s("value",n),p(2),s("routerLink",oe(4,xn,n.id)),p(),_(n.name),p(2),_((e=n.description)!==null&&e!==void 0?e:"N/A")}}function yn(t,r){if(t&1){let e=w();a(0,"p-panel")(1,"p-table",7),M("onRowSelect",function(i){C(e);let l=c();return S(l.onRowSelect(i))})("onRowUnselect",function(i){C(e);let l=c();return S(l.onRowSelect(i))})("onHeaderCheckboxToggle",function(i){C(e);let l=c();return S(l.onSelectAll(i))}),d(2,Sn,7,0,"ng-template",null,2,u)(4,vn,8,6,"ng-template",null,3,u),o()()}if(t&2){let e=c();T(I(4,fn)),p(),s("value",e.writeoffList().data)("tableStyle",I(5,gn))}}var mt=(()=>{class t{constructor(){this.POSSetupService=x(L),this.writeoffList=O(null),this.hasCheckedItems=ce(()=>{let e=this.writeoffList();return!e||!e.data||!Array.isArray(e.data)?!1:e.data.some(n=>n&&n.checked===!0)})}ngOnInit(){this.POSSetupService.fetchPOSWriteOffConfiguration().pipe(q(e=>g(f({},e),{data:e.data.map(n=>g(f({},n),{checked:!1}))})),E(e=>{this.writeoffList.set(e)})).subscribe()}onRowSelect(e){console.log("Selected Row:",e.data);let n=this.writeoffList();if(!n||!n.data)return;let i=n.data.findIndex(l=>l.id===e.data.id);if(i!==-1){let l=[...n.data];l[i]=g(f({},l[i]),{checked:!l[i].checked}),this.writeoffList.set(g(f({},n),{data:l}))}}onSelectAll(e){let n=this.writeoffList();if(!n?.data)return;let i=n.data.map(l=>g(f({},l),{checked:e.checked}));this.writeoffList.set(g(f({},n),{data:i}))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-pos-writeoff"]],decls:5,vars:0,consts:[["actionButton",""],["content",""],["header",""],["body",""],["pageTitle","Write Off"],["severity","danger","label","Delete","icon","fa-solid fa-trash",4,"ngIf"],["severity","danger","label","Delete","icon","fa-solid fa-trash"],["dataKey","id",3,"onRowSelect","onRowUnselect","onHeaderCheckboxToggle","value","tableStyle"],[2,"width","4rem"],[3,"value"],[1,"link-primary",3,"routerLink"]],template:function(n,i){n&1&&(a(0,"app-main-panel",4),d(1,Cn,1,1,"ng-template",null,0,u)(3,yn,6,6,"ng-template",null,1,u),o())},dependencies:[R,D,k,te,ee,ye,be,A,N,$,B,V,H],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var bn=()=>({witdh:"100%",height:"calc(100vh - 150px)"});function Pn(t,r){if(t&1){let e=w();a(0,"div",6)(1,"a",7),m(2,"Cancel"),o(),a(3,"p-button",8),M("onClick",function(){C(e);let i=c(2);return S(i.updateWriteOffConfiguration())}),o()()}}function On(t,r){if(t&1&&(a(0,"div",6)(1,"span",16),m(2),o(),a(3,"span",16),m(4),o()()),t&2){let e=r.$implicit;p(2),P("(",e.code,")"),p(2),_(e.name)}}function In(t,r){if(t&1&&(a(0,"div",6)(1,"span",16),m(2),o(),a(3,"span",16),m(4),o()()),t&2){let e=r.$implicit;p(2),P("(",e.code,")"),p(2),_(e.name)}}function En(t,r){if(t&1){let e=w();a(0,"div",12)(1,"div",13)(2,"label",14),m(3),o(),a(4,"p-select",15),M("ngModelChange",function(i){let l=C(e).$index,h=c(3);return S(h.updateAccountById(i,l))}),d(5,On,5,2,"ng-template",null,2,u)(7,In,5,2,"ng-template",null,3,u),o()()()}if(t&2){let e=r.$implicit,n=c(3);p(3),_(e.name),p(),s("ngModel",e.accountID)("options",n.writeOffForm().options.account)("virtualScroll",!0)("virtualScrollItemSize",50)}}function Fn(t,r){if(t&1&&(a(0,"p-card")(1,"p-scroll-panel")(2,"div",9)(3,"div",10)(4,"div",11),y(5,En,9,5,"div",12,v),o()()()()()),t&2){let e=c(2);p(),T(I(2,bn)),p(4),b(e.writeOffForm().form)}}function Tn(t,r){if(t&1&&(a(0,"app-main-panel",5),d(1,Pn,4,0,"ng-template",null,0,u)(3,Fn,7,3,"ng-template",null,1,u),o()),t&2){let e=c();s("pageTitle","Write Off Form "+e.writeOffForm().info.name)("hasMainWrapperPadding",!0)}}var ct=(()=>{class t{constructor(){this.POSSetupService=x(L),this.route=x(ie),this.writeOffForm=O(null)}ngOnInit(){this.route.paramMap.pipe(q(e=>e.get("id")),Q(e=>this.POSSetupService.fetchPOSWriteOffFormConfiguration({ID:e})),E(e=>this.writeOffForm.set(e))).subscribe()}updateAccountById(e,n){let i=this.writeOffForm().form,l=g(f({},this.writeOffForm()),{form:i.map((h,U)=>U===n?g(f({},h),{accountID:e}):h)});this.writeOffForm.set(l)}updateWriteOffConfiguration(){let e={form:this.writeOffForm().form};this.POSSetupService.updatePOSWriteOffConfiguration(e).pipe().subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-pos-writeoff-form"]],decls:1,vars:1,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],[3,"pageTitle","hasMainWrapperPadding",4,"ngIf"],[3,"pageTitle","hasMainWrapperPadding"],[1,"d-flex","gap-2"],["routerLink","/pos-setup/writeoff",1,"p-button","p-button-secondary","p-button-outlined"],["label","Submit",3,"onClick"],[1,"row"],[1,"col"],[1,"row","row-gap-3"],[1,"col-3"],[1,"d-flex","flex-column"],["for","",1,"d-inline-block","text-truncate",2,"max-width","300px"],["filter","","filterBy","name,code","optionLabel","name","filter","","filterBy","name,code","optionValue","id","placeholder","Select an account",3,"ngModelChange","ngModel","options","virtualScroll","virtualScrollItemSize"],[1,""]],template:function(n,i){n&1&&d(0,Tn,5,2,"app-main-panel",4),n&2&&s("ngIf",i.writeOffForm())},dependencies:[R,D,k,z,ve,re,Z,K,Y,X,j,ae,A,N,$,B],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var st=(()=>{class t{constructor(){this.httpService=x(de)}getExpenseOptions(){return this.httpService.get(void 0,"/api/SetupExpenseOption/GetExpenseOptions")}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=ue({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var wn={data:{expenseOptions:[]}},Te=$e(je(wn),He("POSExpenseOptionStore"),Ve(t=>({hasCheckedRows:ce(()=>t.data().expenseOptions.some(r=>r.checked)),checkedInvoice:ce(()=>t.data().expenseOptions.filter(r=>r.checked).map(r=>r.id))})),Ue(t=>{let r=x(st);return{onRowSelect(n){se(t,i=>{let l=i.data.expenseOptions.map(h=>h.id===n.id?g(f({},h),{checked:!0}):h);return g(f({},i),{data:g(f({},i.data),{expenseOptions:l})})})},onRowUnselect(n){se(t,i=>{let l=i.data.expenseOptions.map(h=>h.id===n.id?g(f({},h),{checked:!1}):h);return g(f({},i),{data:g(f({},i.data),{expenseOptions:l})})})},onHeaderCheckboxToggle(n){se(t,i=>{let l=i.data.expenseOptions.map(h=>g(f({},h),{checked:n}));return g(f({},i),{data:g(f({},i.data),{expenseOptions:l})})})},getExpenseOptions:ze(Me(Q(()=>r.getExpenseOptions().pipe(Ye({next:n=>{se(t,i=>g(f({},i),{data:g(f({},i.data),{expenseOptions:n.expenseOptions.map(l=>g(f({},l),{checked:!1}))})}))},error:n=>{console.error("Error fetching expense options:",n)}})))))}}),We({onInit:t=>{t.getExpenseOptions()}}));var Mn=()=>({height:"calc(100vh - 70px)"});function Dn(t,r){t&1&&W(0,"p-button",6)}function Rn(t,r){if(t&1&&d(0,Dn,1,0,"p-button",5),t&2){let e=c();s("ngIf",e.store.hasCheckedRows())}}function kn(t,r){t&1&&(a(0,"tr")(1,"th",8),W(2,"p-tableHeaderCheckbox"),o(),a(3,"th"),m(4,"Name"),o(),a(5,"th"),m(6,"Account"),o(),a(7,"th"),m(8,"Description"),o()())}function An(t,r){if(t&1&&(a(0,"tr")(1,"td"),W(2,"p-tableCheckbox",9),o(),a(3,"td"),m(4),o(),a(5,"td"),m(6),o(),a(7,"td"),W(8,"p",10),o()()),t&2){let e=r.$implicit;p(2),s("value",e),p(2),_(e.name),p(2),_(e.accountName),p(2),s("innerHTML",e.description,De)}}function Ln(t,r){if(t&1){let e=w();a(0,"p-panel")(1,"p-table",7),M("onRowSelect",function(i){C(e);let l=c();return S(l.onRowSelect(i))})("onRowUnselect",function(i){C(e);let l=c();return S(l.onRowUnselect(i))})("onHeaderCheckboxToggle",function(i){C(e);let l=c();return S(l.onHeaderCheckboxToggle(i))}),d(2,kn,9,0,"ng-template",null,2,u)(4,An,9,4,"ng-template",null,3,u),o()()}if(t&2){let e=c();T(I(3,Mn)),p(),s("value",e.store.data().expenseOptions)}}var ut=(()=>{class t{constructor(){this.store=x(Te)}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){Array.isArray(e.data)?e.data.forEach(n=>{this.store.onRowUnselect(n)}):this.store.onRowUnselect(e.data)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-pos-expense-option"]],features:[Re([Te])],decls:5,vars:0,consts:[["actionButton",""],["content",""],["header",""],["body",""],["pageTitle","Contact Form"],["label","Delete","severity","danger","icon","fa-solid fa-trash",4,"ngIf"],["label","Delete","severity","danger","icon","fa-solid fa-trash"],["dataKey","id",3,"onRowSelect","onRowUnselect","onHeaderCheckboxToggle","value"],[2,"width","4rem"],[3,"value"],[3,"innerHTML"]],template:function(n,i){n&1&&(a(0,"app-main-panel",4),d(1,Rn,1,1,"ng-template",null,0,u)(3,Ln,6,4,"ng-template",null,1,u),o())},dependencies:[R,te,ee,ye,be,V,H,$,B,D,k],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Ma=[{path:"",redirectTo:"global",pathMatch:"full"},{path:"",children:[{path:"global",component:nt},{path:"outlets",component:it},{path:"outlets/:id",component:at},{path:"payments",component:ot},{path:"payments/:id",component:pt},{path:"taxs",component:lt},{path:"writeoff",component:mt},{path:"writeoff/:id",component:ct},{path:"expense-option",component:ut}]}];export{Ma as POS_SETUP_ROUTES};
|