dealpostools 25.48.0 → 25.53.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"dealpostools","version":"25.48.0"}
1
+ {"name":"dealpostools","version":"25.53.0"}
@@ -500,11 +500,6 @@ Package: @firebase/auth-compat
500
500
  License: "Apache-2.0"
501
501
 
502
502
 
503
- --------------------------------------------------------------------------------
504
- Package: @ng-select/ng-select
505
- License: "MIT"
506
-
507
-
508
503
  --------------------------------------------------------------------------------
509
504
  Package: moment
510
505
  License: "MIT"
@@ -558,6 +553,11 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
558
553
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
559
554
  THE SOFTWARE.
560
555
 
556
+ --------------------------------------------------------------------------------
557
+ Package: @ng-select/ng-select
558
+ License: "MIT"
559
+
560
+
561
561
  --------------------------------------------------------------------------------
562
562
  Package: ngx-toastr
563
563
  License: "MIT"
@@ -1 +1 @@
1
- import{a as I,b as L}from"./chunk-2C225VYE.js";import{a as b}from"./chunk-ZQZNA72T.js";import{a as g}from"./chunk-BBGB7I4B.js";import{a as R,b as D}from"./chunk-NR6MRK3T.js";import{A as O,F as B,Q as Y,p as w,s as v}from"./chunk-XVYRBDMB.js";import{Ac as E,Gb as a,Ha as m,Kb as d,Lb as p,M,Mb as c,Sa as f,Wb as S,Xb as _,_ as u,ab as l,lb as o,mb as r,ub as y,wc as C}from"./chunk-FBCQBCW3.js";import"./chunk-K2H6WANG.js";var Q=(()=>{class s{constructor(){this.httpService=u(v),this.toastr=u(w),this.domain=`https://${localStorage.getItem("Domain")}`,this.yearOptions=g.GenerateYears(new Date().getFullYear(),11,!0),this.monthOptions=g.Month,this.selectedYear=new Date().getFullYear(),this.selectedMonth=new Date().getMonth()+1,this.formLoader$=this.httpService.post(`${this.domain}${b.renumberInvoice}`).pipe(M(1))}onSave(){if(!this.selectedOutletId)return this.toastr.warning("Outlet must be selected","Outlet is Empty");if(!this.selectedMonth)return this.toastr.warning("Month must be selected","Month is Empty");if(!this.selectedYear)return this.toastr.warning("Year must be selected","Year is Empty");let h={EntityID:this.selectedOutletId,Month:this.selectedMonth,Year:this.selectedYear};this.httpService.post(`${this.domain}${b.saveBillRenumber}`,h).subscribe(n=>{if(n.Error.length>0){let e="";n.Error.length>1?(n.Error.forEach(i=>{e+=`<li>${i}</li>`}),e=`<ul>${e}</ul>`):e=n.Error[0],this.toastr.error(e,"Error",{enableHtml:!0})}else this.toastr.success(n.Message,"Success")})}static{this.\u0275fac=function(n){return new(n||s)}}static{this.\u0275cmp=f({type:s,selectors:[["app-renumber-bill"]],decls:23,vars:13,consts:[["Title","Renumber Bill",3,"hideSearchBox","hideSearchDropdown"],["type","button",1,"btn","btn-success","shadow","rounded",3,"click"],[1,"container-fluid"],[1,"row","border-bottom","mt-5","ms-2"],[1,"col-sm-2","mb-7"],[1,"form-group"],["bindLabel","Name","bindValue","ID","placeholder","Select an Outlet",3,"ngModelChange","clearable","items","ngModel"],[1,"col-sm-2"],["bindLabel","years","bindValue","years","placeholder","Select Year",3,"ngModelChange","clearable","items","ngModel"],["bindLabel","Label","bindValue","ID","placeholder","Select Month",3,"ngModelChange","clearable","items","ngModel"]],template:function(n,e){if(n&1&&(o(0,"mainpanel",0)(1,"actions")(2,"button",1),y("click",function(){return e.onSave()}),a(3," Save "),r()(),o(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"div",5)(9,"h6"),a(10,"Outlet"),r(),o(11,"ng-select",6),S(12,"async"),c("ngModelChange",function(t){return p(e.selectedOutletId,t)||(e.selectedOutletId=t),t}),r()()(),o(13,"div",7)(14,"div",5)(15,"h6"),a(16,"Year"),r(),o(17,"ng-select",8),c("ngModelChange",function(t){return p(e.selectedYear,t)||(e.selectedYear=t),t}),r()()(),o(18,"div",7)(19,"div",5)(20,"h6"),a(21,"Month"),r(),o(22,"ng-select",9),c("ngModelChange",function(t){return p(e.selectedMonth,t)||(e.selectedMonth=t),t}),r()()()()()()()),n&2){let i;l("hideSearchBox",!0)("hideSearchDropdown",!0),m(11),l("clearable",!0)("items",(i=_(12,11,e.formLoader$))==null||i.Options==null?null:i.Options.Entities),d("ngModel",e.selectedOutletId),m(6),l("clearable",!0)("items",e.yearOptions),d("ngModel",e.selectedYear),m(5),l("clearable",!0)("items",e.monthOptions),d("ngModel",e.selectedMonth)}},dependencies:[E,C,D,R,L,I,Y,O,B],encapsulation:2})}}return s})();export{Q as RenumberBillComponent};
1
+ import{a as b}from"./chunk-ZQZNA72T.js";import{a as g}from"./chunk-BBGB7I4B.js";import{a as I,b as L}from"./chunk-2C225VYE.js";import{a as R,b as D}from"./chunk-NR6MRK3T.js";import{A as O,F as B,Q as Y,p as w,s as v}from"./chunk-XVYRBDMB.js";import{Ac as E,Gb as a,Ha as m,Kb as d,Lb as p,M,Mb as c,Sa as f,Wb as S,Xb as _,_ as u,ab as l,lb as o,mb as r,ub as y,wc as C}from"./chunk-FBCQBCW3.js";import"./chunk-K2H6WANG.js";var Q=(()=>{class s{constructor(){this.httpService=u(v),this.toastr=u(w),this.domain=`https://${localStorage.getItem("Domain")}`,this.yearOptions=g.GenerateYears(new Date().getFullYear(),11,!0),this.monthOptions=g.Month,this.selectedYear=new Date().getFullYear(),this.selectedMonth=new Date().getMonth()+1,this.formLoader$=this.httpService.post(`${this.domain}${b.renumberInvoice}`).pipe(M(1))}onSave(){if(!this.selectedOutletId)return this.toastr.warning("Outlet must be selected","Outlet is Empty");if(!this.selectedMonth)return this.toastr.warning("Month must be selected","Month is Empty");if(!this.selectedYear)return this.toastr.warning("Year must be selected","Year is Empty");let h={EntityID:this.selectedOutletId,Month:this.selectedMonth,Year:this.selectedYear};this.httpService.post(`${this.domain}${b.saveBillRenumber}`,h).subscribe(n=>{if(n.Error.length>0){let e="";n.Error.length>1?(n.Error.forEach(i=>{e+=`<li>${i}</li>`}),e=`<ul>${e}</ul>`):e=n.Error[0],this.toastr.error(e,"Error",{enableHtml:!0})}else this.toastr.success(n.Message,"Success")})}static{this.\u0275fac=function(n){return new(n||s)}}static{this.\u0275cmp=f({type:s,selectors:[["app-renumber-bill"]],decls:23,vars:13,consts:[["Title","Renumber Bill",3,"hideSearchBox","hideSearchDropdown"],["type","button",1,"btn","btn-success","shadow","rounded",3,"click"],[1,"container-fluid"],[1,"row","border-bottom","mt-5","ms-2"],[1,"col-sm-2","mb-7"],[1,"form-group"],["bindLabel","Name","bindValue","ID","placeholder","Select an Outlet",3,"ngModelChange","clearable","items","ngModel"],[1,"col-sm-2"],["bindLabel","years","bindValue","years","placeholder","Select Year",3,"ngModelChange","clearable","items","ngModel"],["bindLabel","Label","bindValue","ID","placeholder","Select Month",3,"ngModelChange","clearable","items","ngModel"]],template:function(n,e){if(n&1&&(o(0,"mainpanel",0)(1,"actions")(2,"button",1),y("click",function(){return e.onSave()}),a(3," Save "),r()(),o(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"div",5)(9,"h6"),a(10,"Outlet"),r(),o(11,"ng-select",6),S(12,"async"),c("ngModelChange",function(t){return p(e.selectedOutletId,t)||(e.selectedOutletId=t),t}),r()()(),o(13,"div",7)(14,"div",5)(15,"h6"),a(16,"Year"),r(),o(17,"ng-select",8),c("ngModelChange",function(t){return p(e.selectedYear,t)||(e.selectedYear=t),t}),r()()(),o(18,"div",7)(19,"div",5)(20,"h6"),a(21,"Month"),r(),o(22,"ng-select",9),c("ngModelChange",function(t){return p(e.selectedMonth,t)||(e.selectedMonth=t),t}),r()()()()()()()),n&2){let i;l("hideSearchBox",!0)("hideSearchDropdown",!0),m(11),l("clearable",!0)("items",(i=_(12,11,e.formLoader$))==null||i.Options==null?null:i.Options.Entities),d("ngModel",e.selectedOutletId),m(6),l("clearable",!0)("items",e.yearOptions),d("ngModel",e.selectedYear),m(5),l("clearable",!0)("items",e.monthOptions),d("ngModel",e.selectedMonth)}},dependencies:[E,C,D,R,L,I,Y,O,B],encapsulation:2})}}return s})();export{Q as RenumberBillComponent};
@@ -0,0 +1,3 @@
1
+ import{a as F,b as I}from"./chunk-HKZ4CRQX.js";import{m as j,n as A}from"./chunk-KJXJE53Y.js";import"./chunk-FAJZECQR.js";import"./chunk-H6RLFBCZ.js";import"./chunk-SDDPQVXQ.js";import{a as T,b as L}from"./chunk-2C225VYE.js";import{a as k,b as N}from"./chunk-NR6MRK3T.js";import{A as E,F as P,Q as x,p as D,s as w}from"./chunk-XVYRBDMB.js";import{Ac as _,Gb as a,Ha as p,Kb as g,Lb as S,Mb as M,Ob as O,Sa as h,W as f,Wb as v,Xb as b,_ as u,ab as l,lb as o,mb as r,nb as C,ub as m,wc as y}from"./chunk-FBCQBCW3.js";import"./chunk-K2H6WANG.js";var d=(()=>{class e{constructor(){this.httpService=u(w),this.url=`https://${localStorage.getItem("Domain")}/API/`}recalculateManufactureOutputCost(t,n,i){let c={From:t,To:n,ListIDs:i};return this.httpService.post(`${this.url}tools/UnitCost/ManufactureCost`,c)}getOutletList(){return this.httpService.get(`${this.url}Outlet/SelectOptions/2`)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=f({token:e,factory:e.\u0275fac})}}return e})();var rt=(()=>{class e{constructor(){this.manufacturOutputCostService=u(d),this.toastr=u(D),this.costDesc=F.Manufacture,this.outletList$=this.manufacturOutputCostService.getOutletList()}onDateChange(t){this.from=t.from,this.to=t.to}onProcess(){if(!this.from||!this.to||!this.selectedOutlet){this.toastr.error("Please select a date range and an outlet.","Error");return}this.manufacturOutputCostService.recalculateManufactureOutputCost(this.from,this.to,this.selectedOutlet).subscribe({next:t=>{t.Affected>0?this.toastr.success(`<div class="text-nowrap"><span class="fw-bold">${t.Affected} job orders</span> successfully recalculated.</div>
2
+ <div><span class="fw-bold">${t.NotAffected} job orders</span> not affected.</div>
3
+ `,"Success",{timeOut:3e4,enableHtml:!0}):this.toastr.info("No items affected by the recalculation.","Info")}})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=h({type:e,selectors:[["app-manufacture-output-cost"]],features:[O([d])],decls:21,vars:8,consts:[["Title","Manufacture Output Cost",3,"hideSearchBox","hideSearchDropdown"],["type","button",1,"btn","btn-success","shadow","rounded",3,"click"],[1,"container-fluid"],[3,"unitCostDesc"],[1,"d-inline","ms-10"],["bindLabel","v","bindValue","k","placeholder","Select an Outlet",2,"width","250px",3,"ngModelChange","clearable","items","ngModel"],[1,"mb-0","mt-8","ms-1"],[2,"width","250px"],[1,"net-sales-filter",3,"dateChange"],[1,"d-inline","ms-10","text-danger"],[1,"mt-2"]],template:function(n,i){n&1&&(o(0,"mainpanel",0)(1,"actions")(2,"button",1),m("click",function(){return i.onProcess()}),a(3," Process "),r()(),o(4,"content")(5,"div",2),C(6,"unit-cost-description",3),o(7,"div",4)(8,"h6"),a(9,"Outlet"),r(),o(10,"ng-select",5),v(11,"async"),M("ngModelChange",function(s){return S(i.selectedOutlet,s)||(i.selectedOutlet=s),s}),r(),o(12,"h6",6),a(13,"From - To"),r(),o(14,"div",7)(15,"app-datepicker-range",8),m("dateChange",function(s){return i.onDateChange(s)}),r()()(),o(16,"div",9)(17,"h6"),a(18,"NOTES"),r(),o(19,"p",10),a(20," Recalculate will sum material and expense costs, and apply it to the output cost only if there's a single output item. No recalculation if multiple outputs exist. "),r()()()()()),n&2&&(l("hideSearchBox",!0)("hideSearchDropdown",!0),p(6),l("unitCostDesc",i.costDesc),p(4),l("clearable",!0)("items",b(11,6,i.outletList$)),g("ngModel",i.selectedOutlet))},dependencies:[_,y,N,k,L,T,A,j,x,E,P,I],encapsulation:2})}}return e})();export{rt as ManufactureOutputCostComponent};
@@ -1 +1 @@
1
- import{a as b,b as me,c as ce,d as se}from"./chunk-FG4S6NWY.js";import"./chunk-EC3GOKCC.js";import{b as oe,c as ae}from"./chunk-4F5TWOC5.js";import{c as Y}from"./chunk-54CMHXEM.js";import{m as pe,n as le}from"./chunk-KJXJE53Y.js";import"./chunk-FAJZECQR.js";import{a as P}from"./chunk-ZQZNA72T.js";import{a as K}from"./chunk-BBGB7I4B.js";import"./chunk-F5X5MWHG.js";import{b as re}from"./chunk-B3N76L3I.js";import"./chunk-H6RLFBCZ.js";import"./chunk-SDDPQVXQ.js";import{a as ie,b as ne}from"./chunk-NR6MRK3T.js";import{A as Z,F as ee,Q as te,p as Q,s as X}from"./chunk-XVYRBDMB.js";import{Ac as J,C as V,Fa as L,Gb as s,Ha as l,Ib as I,Kb as v,Lb as F,M as g,Mb as $,Ob as W,P as A,Sa as O,W as B,Wb as d,Xa as C,Xb as h,Yb as j,_ as m,ab as c,fa as f,ga as _,lb as o,mb as a,ob as M,pb as S,q as D,qc as H,rb as x,rc as z,ub as u,va as w,vb as y,wc as q,xc as G,y as U}from"./chunk-FBCQBCW3.js";import{a as R,b as T}from"./chunk-K2H6WANG.js";var k=(()=>{class r{constructor(){this.domain=`https://${localStorage.getItem("Domain")}`,this.http=m(X),this.migrateConfigService=m(b)}getImageUrls$(t={PageNumber:1,RowCount:100}){return this.migrateConfigService.getPageConfig$().pipe(A(i=>(t.RowCount=i.RowCount,this.http.post(`${this.domain}${P.getExtraProductMigrate}`,t))))}migrateSelectedImage(t){let i=`${localStorage.getItem("Domain")}`,e=t.map(n=>({URL:n.URL,Path:n.Path}));return this.http.post(P.migrateExtraProductImages,{Selected:e,Host:i})}migrateAsync(t){let i=`${localStorage.getItem("Domain")}`,e=T(R({},t),{Host:i});return this.http.post(P.migrateExtraProductImagePagination,e)}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275prov=B({token:r,factory:r.\u0275fac})}}return r})();function ge(r,E){if(r&1){let t=x();M(0),o(1,"button",15),u("click",function(){let e=f(t).ngIf,n=y();return _(n.onMigrateAsync(e))}),s(2," Migrate "),a(),S()}}function ue(r,E){if(r&1){let t=x();M(0),o(1,"mat-checkbox",16),u("change",function(e){let n=f(t).ngIf,p=y();return _(p.onSelectAll(e,n))}),a(),S()}}function he(r,E){if(r&1){let t=x();M(0),o(1,"tr")(2,"td")(3,"mat-checkbox",17),$("ngModelChange",function(e){let n=f(t).$implicit;return F(n.selected,e)||(n.selected=e),_(e)}),u("ngModelChange",function(){let e=f(t).ngForOf,n=y();return _(n.onSelect(e))}),a()(),o(4,"td")(5,"a",18),s(6),a()(),o(7,"td"),s(8),d(9,"date"),a()(),S()}if(r&2){let t=E.$implicit;l(3),v("ngModel",t.selected),l(2),c("href",t.URL,L),l(),I(" ",t.URL," "),l(2),I(" ",j(9,4,t.Date,"dd MMM yyyy")," ")}}var Ge=(()=>{class r{constructor(){this.productMigrate=m(k),this.productMigrate$=this.productMigrate.getImageUrls$().pipe(g(1)),this.migrateConfig=m(b),this.toastr=m(Q),this.dialog=m(Y),this.dateFilter={},this.totalSelected=w(0),this.rowCount$=this.migrateConfig.pageConfig$.pipe(D(t=>t.RowCount),g(1)),this.pageNumber=w(1)}onSelectAll(t,i){i=i.map(e=>(e.selected=t.checked,e)),this.totalSelected.set(i.filter(e=>e.selected)?.length)}onSelect(t){this.totalSelected.set(t.filter(i=>i.selected)?.length)}onMigrateAsync(t){let i=t.Data.filter(e=>e.selected);this.dialog.open(se,{data:{showDateFilter:!1,selectedImage:this.totalSelected()}}).afterClosed().pipe(U(e=>K.IsNotEmpty(e)),V(e=>{if(e.usePaginationFilter){let n={PageNumber:e.pageNumber,RowCount:e.rowCount};return this.productMigrate.migrateAsync(n)}else return this.productMigrate.migrateSelectedImage(i)})).subscribe(e=>{this.totalSelected.set(0),this.toastr.warning(e.message,"Migrate In Progress",{toastClass:"ngx-toastr toast-waiting"}),this.productMigrate$=this.productMigrate.getImageUrls$().pipe(g(1))})}onFilter(){let t={PageNumber:this.pageNumber(),From:this.dateFilter.from,To:this.dateFilter.to};this.productMigrate$=this.productMigrate.getImageUrls$(t).pipe(g(1))}onPagination(t){this.pageNumber.update(()=>t.pageIndex+1);let i={PageNumber:this.pageNumber()};this.productMigrate$=this.productMigrate.getImageUrls$(i).pipe(g(1))}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275cmp=O({type:r,selectors:[["app-extra-product-image"]],features:[W([k])],decls:30,vars:18,consts:[["Title","Migrate Extra Product Image",3,"onSubmit","hideSearchBox"],[1,"d-flex"],["container",""],[1,"mb-2"],[3,"dateChange","date"],[4,"ngIf"],[1,"container-fluid"],[1,"row"],[1,"col-12"],[1,"table","mt-8"],[1,"thead-light"],[2,"width","5px"],[2,"width","120px"],[4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],["type","button",1,"btn","btn-success","shadow","rounded","me-3",3,"click"],["color","primary",3,"change"],["color","primary",3,"ngModelChange","ngModel"],["target","_blank",1,"text-break",3,"href"]],template:function(i,e){if(i&1&&(o(0,"mainpanel",0),u("onSubmit",function(){return e.onFilter()}),o(1,"filters")(2,"div",1)(3,"div",2)(4,"h6",3),s(5,"From - To"),a(),o(6,"app-datepicker-range",4),$("dateChange",function(p){return F(e.dateFilter,p)||(e.dateFilter=p),p}),a()()()(),o(7,"actions"),C(8,ge,3,0,"ng-container",5),d(9,"async"),a(),o(10,"content")(11,"div",6)(12,"div",7)(13,"div",8)(14,"table",9)(15,"thead",10)(16,"tr")(17,"th",11),C(18,ue,2,0,"ng-container",5),d(19,"async"),a(),o(20,"th"),s(21,"Old URL"),a(),o(22,"th",12),s(23,"Created"),a()()(),o(24,"tbody"),C(25,he,10,7,"ng-container",13),d(26,"async"),a()(),o(27,"mat-paginator",14),d(28,"async"),d(29,"async"),u("page",function(p){return e.onPagination(p)}),a()()()()()()),i&2){let n,p,N;c("hideSearchBox",!0),l(6),v("date",e.dateFilter),l(2),c("ngIf",h(9,8,e.productMigrate$)),l(10),c("ngIf",(n=h(19,10,e.productMigrate$))==null?null:n.Data),l(7),c("ngForOf",(p=h(26,12,e.productMigrate$))==null?null:p.Data),l(2),c("length",(N=h(28,14,e.productMigrate$))==null?null:N.Count)("pageSize",h(29,16,e.rowCount$))("pageIndex",e.pageNumber()==0?0:e.pageNumber()-1)}},dependencies:[J,H,z,q,G,ne,ie,re,ae,oe,ce,me,te,Z,ee,le,pe],encapsulation:2})}}return r})();export{Ge as ExtraProductComponent};
1
+ import{a as b,b as me,c as ce,d as se}from"./chunk-OMYEJEEK.js";import"./chunk-Z3VQJYK6.js";import{b as oe,c as ae}from"./chunk-MREPLRUY.js";import"./chunk-F5X5MWHG.js";import{b as re}from"./chunk-B3N76L3I.js";import{c as Y}from"./chunk-54CMHXEM.js";import{m as pe,n as le}from"./chunk-KJXJE53Y.js";import"./chunk-FAJZECQR.js";import"./chunk-H6RLFBCZ.js";import"./chunk-SDDPQVXQ.js";import{a as P}from"./chunk-ZQZNA72T.js";import{a as K}from"./chunk-BBGB7I4B.js";import{a as ie,b as ne}from"./chunk-NR6MRK3T.js";import{A as Z,F as ee,Q as te,p as Q,s as X}from"./chunk-XVYRBDMB.js";import{Ac as J,C as V,Fa as L,Gb as s,Ha as l,Ib as I,Kb as v,Lb as F,M as g,Mb as $,Ob as W,P as A,Sa as O,W as B,Wb as d,Xa as C,Xb as h,Yb as j,_ as m,ab as c,fa as f,ga as _,lb as o,mb as a,ob as M,pb as S,q as D,qc as H,rb as x,rc as z,ub as u,va as w,vb as y,wc as q,xc as G,y as U}from"./chunk-FBCQBCW3.js";import{a as R,b as T}from"./chunk-K2H6WANG.js";var k=(()=>{class r{constructor(){this.domain=`https://${localStorage.getItem("Domain")}`,this.http=m(X),this.migrateConfigService=m(b)}getImageUrls$(t={PageNumber:1,RowCount:100}){return this.migrateConfigService.getPageConfig$().pipe(A(i=>(t.RowCount=i.RowCount,this.http.post(`${this.domain}${P.getExtraProductMigrate}`,t))))}migrateSelectedImage(t){let i=`${localStorage.getItem("Domain")}`,e=t.map(n=>({URL:n.URL,Path:n.Path}));return this.http.post(P.migrateExtraProductImages,{Selected:e,Host:i})}migrateAsync(t){let i=`${localStorage.getItem("Domain")}`,e=T(R({},t),{Host:i});return this.http.post(P.migrateExtraProductImagePagination,e)}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275prov=B({token:r,factory:r.\u0275fac})}}return r})();function ge(r,E){if(r&1){let t=x();M(0),o(1,"button",15),u("click",function(){let e=f(t).ngIf,n=y();return _(n.onMigrateAsync(e))}),s(2," Migrate "),a(),S()}}function ue(r,E){if(r&1){let t=x();M(0),o(1,"mat-checkbox",16),u("change",function(e){let n=f(t).ngIf,p=y();return _(p.onSelectAll(e,n))}),a(),S()}}function he(r,E){if(r&1){let t=x();M(0),o(1,"tr")(2,"td")(3,"mat-checkbox",17),$("ngModelChange",function(e){let n=f(t).$implicit;return F(n.selected,e)||(n.selected=e),_(e)}),u("ngModelChange",function(){let e=f(t).ngForOf,n=y();return _(n.onSelect(e))}),a()(),o(4,"td")(5,"a",18),s(6),a()(),o(7,"td"),s(8),d(9,"date"),a()(),S()}if(r&2){let t=E.$implicit;l(3),v("ngModel",t.selected),l(2),c("href",t.URL,L),l(),I(" ",t.URL," "),l(2),I(" ",j(9,4,t.Date,"dd MMM yyyy")," ")}}var Ge=(()=>{class r{constructor(){this.productMigrate=m(k),this.productMigrate$=this.productMigrate.getImageUrls$().pipe(g(1)),this.migrateConfig=m(b),this.toastr=m(Q),this.dialog=m(Y),this.dateFilter={},this.totalSelected=w(0),this.rowCount$=this.migrateConfig.pageConfig$.pipe(D(t=>t.RowCount),g(1)),this.pageNumber=w(1)}onSelectAll(t,i){i=i.map(e=>(e.selected=t.checked,e)),this.totalSelected.set(i.filter(e=>e.selected)?.length)}onSelect(t){this.totalSelected.set(t.filter(i=>i.selected)?.length)}onMigrateAsync(t){let i=t.Data.filter(e=>e.selected);this.dialog.open(se,{data:{showDateFilter:!1,selectedImage:this.totalSelected()}}).afterClosed().pipe(U(e=>K.IsNotEmpty(e)),V(e=>{if(e.usePaginationFilter){let n={PageNumber:e.pageNumber,RowCount:e.rowCount};return this.productMigrate.migrateAsync(n)}else return this.productMigrate.migrateSelectedImage(i)})).subscribe(e=>{this.totalSelected.set(0),this.toastr.warning(e.message,"Migrate In Progress",{toastClass:"ngx-toastr toast-waiting"}),this.productMigrate$=this.productMigrate.getImageUrls$().pipe(g(1))})}onFilter(){let t={PageNumber:this.pageNumber(),From:this.dateFilter.from,To:this.dateFilter.to};this.productMigrate$=this.productMigrate.getImageUrls$(t).pipe(g(1))}onPagination(t){this.pageNumber.update(()=>t.pageIndex+1);let i={PageNumber:this.pageNumber()};this.productMigrate$=this.productMigrate.getImageUrls$(i).pipe(g(1))}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275cmp=O({type:r,selectors:[["app-extra-product-image"]],features:[W([k])],decls:30,vars:18,consts:[["Title","Migrate Extra Product Image",3,"onSubmit","hideSearchBox"],[1,"d-flex"],["container",""],[1,"mb-2"],[3,"dateChange","date"],[4,"ngIf"],[1,"container-fluid"],[1,"row"],[1,"col-12"],[1,"table","mt-8"],[1,"thead-light"],[2,"width","5px"],[2,"width","120px"],[4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],["type","button",1,"btn","btn-success","shadow","rounded","me-3",3,"click"],["color","primary",3,"change"],["color","primary",3,"ngModelChange","ngModel"],["target","_blank",1,"text-break",3,"href"]],template:function(i,e){if(i&1&&(o(0,"mainpanel",0),u("onSubmit",function(){return e.onFilter()}),o(1,"filters")(2,"div",1)(3,"div",2)(4,"h6",3),s(5,"From - To"),a(),o(6,"app-datepicker-range",4),$("dateChange",function(p){return F(e.dateFilter,p)||(e.dateFilter=p),p}),a()()()(),o(7,"actions"),C(8,ge,3,0,"ng-container",5),d(9,"async"),a(),o(10,"content")(11,"div",6)(12,"div",7)(13,"div",8)(14,"table",9)(15,"thead",10)(16,"tr")(17,"th",11),C(18,ue,2,0,"ng-container",5),d(19,"async"),a(),o(20,"th"),s(21,"Old URL"),a(),o(22,"th",12),s(23,"Created"),a()()(),o(24,"tbody"),C(25,he,10,7,"ng-container",13),d(26,"async"),a()(),o(27,"mat-paginator",14),d(28,"async"),d(29,"async"),u("page",function(p){return e.onPagination(p)}),a()()()()()()),i&2){let n,p,N;c("hideSearchBox",!0),l(6),v("date",e.dateFilter),l(2),c("ngIf",h(9,8,e.productMigrate$)),l(10),c("ngIf",(n=h(19,10,e.productMigrate$))==null?null:n.Data),l(7),c("ngForOf",(p=h(26,12,e.productMigrate$))==null?null:p.Data),l(2),c("length",(N=h(28,14,e.productMigrate$))==null?null:N.Count)("pageSize",h(29,16,e.rowCount$))("pageIndex",e.pageNumber()==0?0:e.pageNumber()-1)}},dependencies:[J,H,z,q,G,ne,ie,re,ae,oe,ce,me,te,Z,ee,le,pe],encapsulation:2})}}return r})();export{Ge as ExtraProductComponent};
@@ -1 +1 @@
1
- import{a as w,b as pe,c as me,d as ce}from"./chunk-FG4S6NWY.js";import"./chunk-EC3GOKCC.js";import{b as ae,c as se}from"./chunk-4F5TWOC5.js";import{c as Z}from"./chunk-54CMHXEM.js";import{n as le}from"./chunk-KJXJE53Y.js";import"./chunk-FAJZECQR.js";import"./chunk-ZQZNA72T.js";import{a as K}from"./chunk-BBGB7I4B.js";import"./chunk-F5X5MWHG.js";import{b as oe}from"./chunk-B3N76L3I.js";import"./chunk-H6RLFBCZ.js";import"./chunk-SDDPQVXQ.js";import{a as ne,b as re}from"./chunk-NR6MRK3T.js";import{A as ee,F as te,Q as ie,p as Q,s as X}from"./chunk-XVYRBDMB.js";import{$b as T,Ac as J,C as V,Fa as E,Fb as $,Gb as f,Ha as s,Hb as O,Ib as R,Kb as j,Lb as H,M as y,Mb as W,Ob as z,P as A,Sa as L,W as B,Wb as C,Xa as u,Xb as h,_ as g,ab as p,d as F,fa as S,ga as x,lb as a,mb as o,ob as _,pb as d,q as I,qc as Y,rb as b,rc as q,ub as M,va as v,vb as m,wc as G,y as U}from"./chunk-FBCQBCW3.js";import{a as N,b as P}from"./chunk-K2H6WANG.js";var k=(()=>{class i{constructor(){this.domain=`https://${localStorage.getItem("Domain")}`,this.http=g(X),this.migrateConfigService=g(w)}getImageUrls$(e={PageNumber:1,RowCount:100}){return this.migrateConfigService.getPageConfig$().pipe(A(t=>(e.RowCount=t.RowCount,this.http.post(`${this.domain}/api/image/customerdisplay`,e))))}migrate(e){return this.http.post(`${this.domain}/api/cloudflare/migrate/customerdisplay`,{Images:e})}migrateAsync(e){let t=`${localStorage.getItem("Domain")}`,n=P(N({},e),{Host:t});return this.http.post("/api/MigrateImage/customerdisplay",n)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=B({token:i,factory:i.\u0275fac})}}return i})();function _e(i,c){if(i&1){let e=b();_(0),a(1,"button",13),M("click",function(){S(e);let n=m().ngIf,r=m();return x(r.onMigrate(n))}),f(2," Migrate "),o(),d()}}function de(i,c){if(i&1){let e=b();a(0,"button",14),M("click",function(){S(e);let n=m(2);return x(n.onMigrateAsync())}),f(1," Migrate Async "),o()}}function fe(i,c){if(i&1&&(_(0),u(1,_e,3,0,"ng-container",12)(2,de,2,0,"ng-template",null,0,T),d()),i&2){let e=$(3),t=m();s(),p("ngIf",t.totalSelected()>0)("ngIfElse",e)}}function Ce(i,c){if(i&1){let e=b();_(0),a(1,"mat-checkbox",15),M("change",function(n){let r=S(e).ngIf,l=m();return x(l.onSelectAll(n,r))}),o(),d()}}function he(i,c){i&1&&(_(0),a(1,"th"),f(2,"New URL"),o(),d())}function ye(i,c){if(i&1&&(_(0),a(1,"div",18)(2,"span",19),f(3),o()(),d()),i&2){let e=m(2).$implicit;s(3),O(e.Message)}}function Me(i,c){if(i&1&&(a(0,"a",17),f(1),o()),i&2){let e=m(2).$implicit;p("href",e.CloudflareURL,E),s(),R(" ",e.CloudflareURL," ")}}function Se(i,c){if(i&1&&(_(0),a(1,"td"),u(2,ye,4,1,"ng-container",12)(3,Me,2,2,"ng-template",null,1,T),o(),d()),i&2){let e=$(4),t=m().$implicit;s(2),p("ngIf",t.Message)("ngIfElse",e)}}function xe(i,c){if(i&1){let e=b();_(0),a(1,"tr")(2,"td")(3,"mat-checkbox",16),W("ngModelChange",function(n){let r=S(e).$implicit;return H(r.selected,n)||(r.selected=n),x(n)}),M("ngModelChange",function(){let n=S(e).ngForOf,r=m();return x(r.onSelect(n))}),o()(),a(4,"td")(5,"a",17),f(6),o()(),u(7,Se,5,2,"ng-container",3),C(8,"async"),o(),d()}if(i&2){let e=c.$implicit,t=m();s(3),j("ngModel",e.selected),s(2),p("href",e.URL,E),s(),R(" ",e.URL," "),s(),p("ngIf",h(8,4,t.onMigrate$)==!0)}}var Xe=(()=>{class i{constructor(){this.customerDisplayMigrate=g(k),this.migrateConfig=g(w),this.customerDisplayMigrate$=this.customerDisplayMigrate.getImageUrls$().pipe(y(1)),this._onMigrate=new F(!1),this.onMigrate$=this._onMigrate.asObservable(),this.toastr=g(Q),this.dialog=g(Z),this.dateFilter={},this.totalSelected=v(0),this.rowCount$=this.migrateConfig.pageConfig$.pipe(I(e=>e.RowCount),y(1)),this.pageNumber=v(1)}onMigrate(e){let t=e.Data.filter(r=>r.selected);if(t.length===0){this.toastr.error("Please select at least one image to migrate.","Error");return}let n=this.customerDisplayMigrate.migrate(t).pipe(I(r=>(this._onMigrate.next(!0),this.totalSelected.set(0),e.Data=e.Data.map(l=>{l.selected=!1;let D=r.find(ge=>ge.Path===l.Path);return l.CloudflareURL=D?.URL,l.Message=D?.Message,l}),e)));this.customerDisplayMigrate$=n.pipe(y(1))}onSelectAll(e,t){t=t.map(n=>(n.selected=e.checked,n)),this.totalSelected.set(t.filter(n=>n.selected)?.length)}onSelect(e){this.totalSelected.set(e.filter(t=>t.selected)?.length)}onMigrateAsync(){this.dialog.open(ce,{data:{showDateFilter:!1}}).afterClosed().pipe(U(e=>K.IsNotEmpty(e)),V(e=>{let t={PageNumber:e.pageNumber,RowCount:e.rowCount};return this.customerDisplayMigrate.migrateAsync(t)})).subscribe(e=>{this.toastr.warning(e.message,"Migrate In Progress",{toastClass:"ngx-toastr toast-waiting"}),this.customerDisplayMigrate$=this.customerDisplayMigrate.getImageUrls$().pipe(y(1))})}onFilter(){let e={PageNumber:this.pageNumber(),From:this.dateFilter.from,To:this.dateFilter.to};this.customerDisplayMigrate$=this.customerDisplayMigrate.getImageUrls$(e).pipe(y(1))}onPagination(e){this.pageNumber.update(()=>e.pageIndex+1);let t={PageNumber:this.pageNumber()};this.customerDisplayMigrate$=this.customerDisplayMigrate.getImageUrls$(t).pipe(y(1))}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=L({type:i,selectors:[["app-prepaid-package"]],features:[z([k])],decls:24,vars:21,consts:[["ASYNC",""],["SHOW_URL",""],["Title","Migrate Customer Display Image",3,"onSubmit","hideSearchBox","hideSearchDropdown"],[4,"ngIf"],[1,"container-fluid"],[1,"row"],[1,"col-12"],[1,"table","mt-8"],[1,"thead-light"],[2,"width","5px"],[4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],[4,"ngIf","ngIfElse"],["type","button",1,"btn","btn-success","shadow","rounded",3,"click"],["type","button",1,"btn","btn-success","shadow","rounded","me-3",3,"click"],["color","primary",3,"change"],["color","primary",3,"ngModelChange","ngModel"],["target","_blank",1,"text-break",3,"href"],[1,"text-break"],[1,"text-danger"]],template:function(t,n){if(t&1&&(a(0,"mainpanel",2),M("onSubmit",function(){return n.onFilter()}),a(1,"actions"),u(2,fe,4,2,"ng-container",3),C(3,"async"),o(),a(4,"content")(5,"div",4)(6,"div",5)(7,"div",6)(8,"table",7)(9,"thead",8)(10,"tr")(11,"th",9),u(12,Ce,2,0,"ng-container",3),C(13,"async"),o(),a(14,"th"),f(15,"Old URL"),o(),u(16,he,3,0,"ng-container",3),C(17,"async"),o()(),a(18,"tbody"),u(19,xe,9,6,"ng-container",10),C(20,"async"),o()(),a(21,"mat-paginator",11),C(22,"async"),C(23,"async"),M("page",function(l){return n.onPagination(l)}),o()()()()()()),t&2){let r,l,D;p("hideSearchBox",!0)("hideSearchDropdown",!0),s(2),p("ngIf",h(3,9,n.customerDisplayMigrate$)),s(10),p("ngIf",(r=h(13,11,n.customerDisplayMigrate$))==null?null:r.Data),s(4),p("ngIf",h(17,13,n.onMigrate$)==!0),s(3),p("ngForOf",(l=h(20,15,n.customerDisplayMigrate$))==null?null:l.Data),s(2),p("length",(D=h(22,17,n.customerDisplayMigrate$))==null?null:D.Count)("pageSize",h(23,19,n.rowCount$))("pageIndex",n.pageNumber()==0?0:n.pageNumber()-1)}},dependencies:[J,Y,q,G,re,ne,oe,se,ae,me,pe,ie,ee,te,le],encapsulation:2})}}return i})();export{Xe as CustomerDisplayComponent};
1
+ import{a as w,b as pe,c as me,d as ce}from"./chunk-OMYEJEEK.js";import"./chunk-Z3VQJYK6.js";import{b as ae,c as se}from"./chunk-MREPLRUY.js";import"./chunk-F5X5MWHG.js";import{b as oe}from"./chunk-B3N76L3I.js";import{c as Z}from"./chunk-54CMHXEM.js";import{n as le}from"./chunk-KJXJE53Y.js";import"./chunk-FAJZECQR.js";import"./chunk-H6RLFBCZ.js";import"./chunk-SDDPQVXQ.js";import"./chunk-ZQZNA72T.js";import{a as K}from"./chunk-BBGB7I4B.js";import{a as ne,b as re}from"./chunk-NR6MRK3T.js";import{A as ee,F as te,Q as ie,p as Q,s as X}from"./chunk-XVYRBDMB.js";import{$b as T,Ac as J,C as V,Fa as E,Fb as $,Gb as f,Ha as s,Hb as O,Ib as R,Kb as j,Lb as H,M as y,Mb as W,Ob as z,P as A,Sa as L,W as B,Wb as C,Xa as u,Xb as h,_ as g,ab as p,d as F,fa as S,ga as x,lb as a,mb as o,ob as _,pb as d,q as I,qc as Y,rb as b,rc as q,ub as M,va as v,vb as m,wc as G,y as U}from"./chunk-FBCQBCW3.js";import{a as N,b as P}from"./chunk-K2H6WANG.js";var k=(()=>{class i{constructor(){this.domain=`https://${localStorage.getItem("Domain")}`,this.http=g(X),this.migrateConfigService=g(w)}getImageUrls$(e={PageNumber:1,RowCount:100}){return this.migrateConfigService.getPageConfig$().pipe(A(t=>(e.RowCount=t.RowCount,this.http.post(`${this.domain}/api/image/customerdisplay`,e))))}migrate(e){return this.http.post(`${this.domain}/api/cloudflare/migrate/customerdisplay`,{Images:e})}migrateAsync(e){let t=`${localStorage.getItem("Domain")}`,n=P(N({},e),{Host:t});return this.http.post("/api/MigrateImage/customerdisplay",n)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=B({token:i,factory:i.\u0275fac})}}return i})();function _e(i,c){if(i&1){let e=b();_(0),a(1,"button",13),M("click",function(){S(e);let n=m().ngIf,r=m();return x(r.onMigrate(n))}),f(2," Migrate "),o(),d()}}function de(i,c){if(i&1){let e=b();a(0,"button",14),M("click",function(){S(e);let n=m(2);return x(n.onMigrateAsync())}),f(1," Migrate Async "),o()}}function fe(i,c){if(i&1&&(_(0),u(1,_e,3,0,"ng-container",12)(2,de,2,0,"ng-template",null,0,T),d()),i&2){let e=$(3),t=m();s(),p("ngIf",t.totalSelected()>0)("ngIfElse",e)}}function Ce(i,c){if(i&1){let e=b();_(0),a(1,"mat-checkbox",15),M("change",function(n){let r=S(e).ngIf,l=m();return x(l.onSelectAll(n,r))}),o(),d()}}function he(i,c){i&1&&(_(0),a(1,"th"),f(2,"New URL"),o(),d())}function ye(i,c){if(i&1&&(_(0),a(1,"div",18)(2,"span",19),f(3),o()(),d()),i&2){let e=m(2).$implicit;s(3),O(e.Message)}}function Me(i,c){if(i&1&&(a(0,"a",17),f(1),o()),i&2){let e=m(2).$implicit;p("href",e.CloudflareURL,E),s(),R(" ",e.CloudflareURL," ")}}function Se(i,c){if(i&1&&(_(0),a(1,"td"),u(2,ye,4,1,"ng-container",12)(3,Me,2,2,"ng-template",null,1,T),o(),d()),i&2){let e=$(4),t=m().$implicit;s(2),p("ngIf",t.Message)("ngIfElse",e)}}function xe(i,c){if(i&1){let e=b();_(0),a(1,"tr")(2,"td")(3,"mat-checkbox",16),W("ngModelChange",function(n){let r=S(e).$implicit;return H(r.selected,n)||(r.selected=n),x(n)}),M("ngModelChange",function(){let n=S(e).ngForOf,r=m();return x(r.onSelect(n))}),o()(),a(4,"td")(5,"a",17),f(6),o()(),u(7,Se,5,2,"ng-container",3),C(8,"async"),o(),d()}if(i&2){let e=c.$implicit,t=m();s(3),j("ngModel",e.selected),s(2),p("href",e.URL,E),s(),R(" ",e.URL," "),s(),p("ngIf",h(8,4,t.onMigrate$)==!0)}}var Xe=(()=>{class i{constructor(){this.customerDisplayMigrate=g(k),this.migrateConfig=g(w),this.customerDisplayMigrate$=this.customerDisplayMigrate.getImageUrls$().pipe(y(1)),this._onMigrate=new F(!1),this.onMigrate$=this._onMigrate.asObservable(),this.toastr=g(Q),this.dialog=g(Z),this.dateFilter={},this.totalSelected=v(0),this.rowCount$=this.migrateConfig.pageConfig$.pipe(I(e=>e.RowCount),y(1)),this.pageNumber=v(1)}onMigrate(e){let t=e.Data.filter(r=>r.selected);if(t.length===0){this.toastr.error("Please select at least one image to migrate.","Error");return}let n=this.customerDisplayMigrate.migrate(t).pipe(I(r=>(this._onMigrate.next(!0),this.totalSelected.set(0),e.Data=e.Data.map(l=>{l.selected=!1;let D=r.find(ge=>ge.Path===l.Path);return l.CloudflareURL=D?.URL,l.Message=D?.Message,l}),e)));this.customerDisplayMigrate$=n.pipe(y(1))}onSelectAll(e,t){t=t.map(n=>(n.selected=e.checked,n)),this.totalSelected.set(t.filter(n=>n.selected)?.length)}onSelect(e){this.totalSelected.set(e.filter(t=>t.selected)?.length)}onMigrateAsync(){this.dialog.open(ce,{data:{showDateFilter:!1}}).afterClosed().pipe(U(e=>K.IsNotEmpty(e)),V(e=>{let t={PageNumber:e.pageNumber,RowCount:e.rowCount};return this.customerDisplayMigrate.migrateAsync(t)})).subscribe(e=>{this.toastr.warning(e.message,"Migrate In Progress",{toastClass:"ngx-toastr toast-waiting"}),this.customerDisplayMigrate$=this.customerDisplayMigrate.getImageUrls$().pipe(y(1))})}onFilter(){let e={PageNumber:this.pageNumber(),From:this.dateFilter.from,To:this.dateFilter.to};this.customerDisplayMigrate$=this.customerDisplayMigrate.getImageUrls$(e).pipe(y(1))}onPagination(e){this.pageNumber.update(()=>e.pageIndex+1);let t={PageNumber:this.pageNumber()};this.customerDisplayMigrate$=this.customerDisplayMigrate.getImageUrls$(t).pipe(y(1))}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=L({type:i,selectors:[["app-prepaid-package"]],features:[z([k])],decls:24,vars:21,consts:[["ASYNC",""],["SHOW_URL",""],["Title","Migrate Customer Display Image",3,"onSubmit","hideSearchBox","hideSearchDropdown"],[4,"ngIf"],[1,"container-fluid"],[1,"row"],[1,"col-12"],[1,"table","mt-8"],[1,"thead-light"],[2,"width","5px"],[4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],[4,"ngIf","ngIfElse"],["type","button",1,"btn","btn-success","shadow","rounded",3,"click"],["type","button",1,"btn","btn-success","shadow","rounded","me-3",3,"click"],["color","primary",3,"change"],["color","primary",3,"ngModelChange","ngModel"],["target","_blank",1,"text-break",3,"href"],[1,"text-break"],[1,"text-danger"]],template:function(t,n){if(t&1&&(a(0,"mainpanel",2),M("onSubmit",function(){return n.onFilter()}),a(1,"actions"),u(2,fe,4,2,"ng-container",3),C(3,"async"),o(),a(4,"content")(5,"div",4)(6,"div",5)(7,"div",6)(8,"table",7)(9,"thead",8)(10,"tr")(11,"th",9),u(12,Ce,2,0,"ng-container",3),C(13,"async"),o(),a(14,"th"),f(15,"Old URL"),o(),u(16,he,3,0,"ng-container",3),C(17,"async"),o()(),a(18,"tbody"),u(19,xe,9,6,"ng-container",10),C(20,"async"),o()(),a(21,"mat-paginator",11),C(22,"async"),C(23,"async"),M("page",function(l){return n.onPagination(l)}),o()()()()()()),t&2){let r,l,D;p("hideSearchBox",!0)("hideSearchDropdown",!0),s(2),p("ngIf",h(3,9,n.customerDisplayMigrate$)),s(10),p("ngIf",(r=h(13,11,n.customerDisplayMigrate$))==null?null:r.Data),s(4),p("ngIf",h(17,13,n.onMigrate$)==!0),s(3),p("ngForOf",(l=h(20,15,n.customerDisplayMigrate$))==null?null:l.Data),s(2),p("length",(D=h(22,17,n.customerDisplayMigrate$))==null?null:D.Count)("pageSize",h(23,19,n.rowCount$))("pageIndex",n.pageNumber()==0?0:n.pageNumber()-1)}},dependencies:[J,Y,q,G,re,ne,oe,se,ae,me,pe,ie,ee,te,le],encapsulation:2})}}return i})();export{Xe as CustomerDisplayComponent};
@@ -1 +1 @@
1
- import{a as n,d as y}from"./chunk-FG4S6NWY.js";import{c as I}from"./chunk-54CMHXEM.js";import{a as C}from"./chunk-BBGB7I4B.js";import{p as v,s as b}from"./chunk-XVYRBDMB.js";import{C as u,M as r,Na as $,P as S,W as M,_ as a,d as f,q as m,va as h,y as d}from"./chunk-FBCQBCW3.js";import{a as c,b as l}from"./chunk-K2H6WANG.js";var w=class{constructor(e,t=!1){this.migrateService=e,this.showDateFilter=t,this.imageMigrate$=this.migrateService.getImageUrls$().pipe(r(1)),this._onMigrate=new f(!1),this.onMigrate$=this._onMigrate.asObservable(),this.migrateConfig=a(n),this.toastr=a(v),this.dialog=a(I),this.dateFilter={},this.totalSelected=h(0),this.rowCount$=this.migrateConfig.pageConfig$.pipe(m(i=>i.RowCount),r(1)),this.pageNumber=h(1)}onMigrate(e){let t=e.Data.filter(s=>s.selected);if(t.length===0){this.toastr.error("Please select at least one image to migrate.","Error");return}let i=this.migrateService.migrate(t).pipe(m(s=>(this._onMigrate.next(!0),e.Data=e.Data.map(g=>{g.selected=!1;let p=s.find(F=>F.Path===g.Path);return g.CloudflareURL=p?.URL,g.Message=p?.Message,g}),this.totalSelected.set(0),e)));this.imageMigrate$=i.pipe(r(1))}onSelectAll(e,t){t=t.map(i=>(i.selected=e.checked,i)),this.totalSelected.set(t.filter(i=>i.selected)?.length)}onSelect(e){this.totalSelected.set(e.filter(t=>t.selected)?.length)}onMigrateAsync(){this.dialog.open(y,{data:{showDateFilter:this.showDateFilter,date:this.dateFilter}}).afterClosed().pipe(d(e=>C.IsNotEmpty(e)),u(e=>{let t={PageNumber:e.pageNumber,RowCount:e.rowCount};return this.migrateService.migrateAsync(t)})).subscribe(e=>{this.toastr.warning(e.message,"Migrate In Progress",{toastClass:"ngx-toastr toast-waiting"}),this.imageMigrate$=this.migrateService.getImageUrls$().pipe(r(1))})}onFilter(){let e={PageNumber:this.pageNumber(),From:this.dateFilter.from,To:this.dateFilter.to};this.imageMigrate$=this.migrateService.getImageUrls$(e).pipe(r(1))}onPagination(e){this.pageNumber.update(()=>e.pageIndex+1);let t={PageNumber:this.pageNumber()};this.imageMigrate$=this.migrateService.getImageUrls$(t).pipe(r(1))}};var O=(()=>{class o{constructor(t){this.domain=`https://${localStorage.getItem("Domain")}`,this.http=a(b),this.migrateConfigService=a(n),this.migrateApi=t}getImageUrls$(t={PageNumber:1,RowCount:100}){return this.migrateConfigService.getPageConfig$().pipe(S(i=>(t.RowCount=i.RowCount,this.http.post(`${this.domain}/api/image/${this.migrateApi}`,t))))}migrate(t){return this.http.post(`${this.domain}/api/cloudflare/migrate/${this.migrateApi}`,{Images:t})}migrateAsync(t){let i=`${localStorage.getItem("Domain")}`,s=l(c({},t),{Host:i});return this.http.post(`/api/MigrateImage/${this.migrateApi}`,s)}static{this.\u0275fac=function(i){$()}}static{this.\u0275prov=M({token:o,factory:o.\u0275fac})}}return o})();export{O as a,w as b};
1
+ import{a as n,d as y}from"./chunk-OMYEJEEK.js";import{c as I}from"./chunk-54CMHXEM.js";import{a as C}from"./chunk-BBGB7I4B.js";import{p as v,s as b}from"./chunk-XVYRBDMB.js";import{C as u,M as r,Na as $,P as S,W as M,_ as a,d as f,q as m,va as h,y as d}from"./chunk-FBCQBCW3.js";import{a as c,b as l}from"./chunk-K2H6WANG.js";var w=class{constructor(e,t=!1){this.migrateService=e,this.showDateFilter=t,this.imageMigrate$=this.migrateService.getImageUrls$().pipe(r(1)),this._onMigrate=new f(!1),this.onMigrate$=this._onMigrate.asObservable(),this.migrateConfig=a(n),this.toastr=a(v),this.dialog=a(I),this.dateFilter={},this.totalSelected=h(0),this.rowCount$=this.migrateConfig.pageConfig$.pipe(m(i=>i.RowCount),r(1)),this.pageNumber=h(1)}onMigrate(e){let t=e.Data.filter(s=>s.selected);if(t.length===0){this.toastr.error("Please select at least one image to migrate.","Error");return}let i=this.migrateService.migrate(t).pipe(m(s=>(this._onMigrate.next(!0),e.Data=e.Data.map(g=>{g.selected=!1;let p=s.find(F=>F.Path===g.Path);return g.CloudflareURL=p?.URL,g.Message=p?.Message,g}),this.totalSelected.set(0),e)));this.imageMigrate$=i.pipe(r(1))}onSelectAll(e,t){t=t.map(i=>(i.selected=e.checked,i)),this.totalSelected.set(t.filter(i=>i.selected)?.length)}onSelect(e){this.totalSelected.set(e.filter(t=>t.selected)?.length)}onMigrateAsync(){this.dialog.open(y,{data:{showDateFilter:this.showDateFilter,date:this.dateFilter}}).afterClosed().pipe(d(e=>C.IsNotEmpty(e)),u(e=>{let t={PageNumber:e.pageNumber,RowCount:e.rowCount};return this.migrateService.migrateAsync(t)})).subscribe(e=>{this.toastr.warning(e.message,"Migrate In Progress",{toastClass:"ngx-toastr toast-waiting"}),this.imageMigrate$=this.migrateService.getImageUrls$().pipe(r(1))})}onFilter(){let e={PageNumber:this.pageNumber(),From:this.dateFilter.from,To:this.dateFilter.to};this.imageMigrate$=this.migrateService.getImageUrls$(e).pipe(r(1))}onPagination(e){this.pageNumber.update(()=>e.pageIndex+1);let t={PageNumber:this.pageNumber()};this.imageMigrate$=this.migrateService.getImageUrls$(t).pipe(r(1))}};var O=(()=>{class o{constructor(t){this.domain=`https://${localStorage.getItem("Domain")}`,this.http=a(b),this.migrateConfigService=a(n),this.migrateApi=t}getImageUrls$(t={PageNumber:1,RowCount:100}){return this.migrateConfigService.getPageConfig$().pipe(S(i=>(t.RowCount=i.RowCount,this.http.post(`${this.domain}/api/image/${this.migrateApi}`,t))))}migrate(t){return this.http.post(`${this.domain}/api/cloudflare/migrate/${this.migrateApi}`,{Images:t})}migrateAsync(t){let i=`${localStorage.getItem("Domain")}`,s=l(c({},t),{Host:i});return this.http.post(`/api/MigrateImage/${this.migrateApi}`,s)}static{this.\u0275fac=function(i){$()}}static{this.\u0275prov=M({token:o,factory:o.\u0275fac})}}return o})();export{O as a,w as b};
@@ -0,0 +1,8 @@
1
+ import{Gb as l,Ha as i,Ib as f,Sa as d,eb as p,lb as o,mb as r,nb as u,sa as a}from"./chunk-FBCQBCW3.js";var m=function(e){return e.PurchaseOrder="PURCHASE_ORDER",e.CostVariance="COST_VARIANCE",e.SingleInvoice="SINGLE_INVOICE",e.InvoiceRange="INVOICE_RANGE",e.Manufacture="MANUFACTURE",e.Adjustment="ADJUSTMENT",e.TransferOrder="TRANSFER_ORDER",e}(m||{}),R=(()=>{class e{constructor(){this.unitCostDesc=a(m.InvoiceRange),this.costDescription={PURCHASE_ORDER:{desc:`Replace supplier bill costs with current product costs across multiple purchase orders simultaneously.
2
+ Maintains cost consistency between procurement and inventory systems`,icon:"fas fa-file-invoice-dollar"},COST_VARIANCE:{desc:`Identify discrepancies between composite product costs and their component costs.
3
+ Automatically align costs to maintain accurate product costing.`,icon:"fas fa-balance-scale"},SINGLE_INVOICE:{desc:`Update invoice costs with current product costs for specific transactions.
4
+ Ideal for correcting individual cost discrepancies in billing records.`,icon:"fas fa-receipt"},INVOICE_RANGE:{desc:`Update costs across multiple invoices within a specified date range.
5
+ Efficient for periodic cost adjustments and historical data correction.`,icon:"fas fa-calendar-alt"},MANUFACTURE:{desc:` Update manufacturing output costs with current product costs across multiple production records.
6
+ Ensures accurate production costing and inventory valuation.`,icon:"fas fa-industry"},ADJUSTMENT:{desc:`Replace adjustment costs with current product costs for multiple inventory adjustments.
7
+ Maintains consistency in inventory valuation during stock corrections.`,icon:"fas fa-exchange-alt"},TRANSFER_ORDER:{desc:`Update transfer order costs with current product costs for multiple inter-warehouse transfers.
8
+ Ensures accurate cost tracking during inventory redistribution.`,icon:"fas fa-truck"}}}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=d({type:e,selectors:[["unit-cost-description"]],inputs:{unitCostDesc:[1,"unitCostDesc"]},decls:7,vars:3,consts:[[1,"feature-description"],[1,"feature-header"],[1,"feature-icon"],[1,"feature-desc"]],template:function(t,n){if(t&1&&(o(0,"div",0)(1,"div",1)(2,"div",2),u(3,"i"),r(),o(4,"div")(5,"p",3),l(6),r()()()()),t&2){let s,c;i(3),p((s=n.costDescription[n.unitCostDesc()])==null?null:s.icon),i(3),f(" ",(c=n.costDescription[n.unitCostDesc()])==null?null:c.desc," ")}},styles:[".feature-description[_ngcontent-%COMP%]{margin-top:18px;padding:12px 20px;background:linear-gradient(135deg,#f8fafc,#f1f5f9);border-radius:15px;border-left:4px solid #0976b4;border-top:1px solid #e2e8f0;border-bottom:1px solid #e2e8f0;border-right:1px solid #e2e8f0}.feature-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:15px}.feature-icon[_ngcontent-%COMP%]{width:50px;height:50px;background:linear-gradient(135deg,#0976b4 0% 100%);border-radius:12px;display:flex;align-items:center;justify-content:center;color:#fff;font-size:20px}.feature-desc[_ngcontent-%COMP%]{color:#475569;font-size:.875rem;line-height:1.6;margin-top:15px}.feature-benefits[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:15px;margin-top:20px}"]})}}return e})();export{m as a,R as b};
@@ -0,0 +1,193 @@
1
+ import{a as ve}from"./chunk-RFR3OPT5.js";import{a as ge,b as Se,c as ye,f as _e,g as Ee,h as be}from"./chunk-54CMHXEM.js";import{p as Lt}from"./chunk-XVYRBDMB.js";import{Ac as At,Fa as ne,Gb as b,Ha as E,Hb as Ut,Ia as re,Ib as Z,Ma as G,Nc as fe,Oc as Rt,Pc as me,Qb as ce,Qc as he,Sa as K,Ta as oe,Ua as ae,W as _,Wb as rt,X as Qt,Xa as z,Xb as ot,Y as Xt,Z as M,Za as se,_ as C,ab as x,ba as te,c as q,eb as le,hc as pe,ja as ee,jc as $t,lb as m,lc as Ct,mb as g,nb as W,ob as it,pb as nt,qc as Ot,rc as ue,ub as Tt,va as F,vb as Ft,wb as kt,xb as Ht,ya as ie,yc as de}from"./chunk-FBCQBCW3.js";import{a as D}from"./chunk-K2H6WANG.js";var wt=(()=>{class t{constructor(e,i){this._router=e,this.toaster=i}login(e){this._router.navigate([e])}logout(){localStorage.removeItem("Token"),localStorage.removeItem("Domain"),this._router.navigate([""])}isAuthentication(){return localStorage.getItem("Token")!=null&&!this.isTokenExpired()}isTokenExpired(){return!1}setLocalStorage(e,i){localStorage.setItem("posdomain",e),localStorage.setItem("username",i)}getUsernameLocalStorage(){return localStorage.getItem("username")}getDomainLocalStorage(){return localStorage.getItem("posdomain")}isLocalStorageExist(){let e=localStorage.getItem("posdomain"),i=localStorage.getItem("username"),r=!1;return e&&i&&(r=!0),r}static{this.\u0275fac=function(i){return new(i||t)(M(Rt),M(Lt))}}static{this.\u0275prov=_({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function pi(t,n){t&1&&(it(0),m(1,"th",8),b(2,"Page Number"),g(),m(3,"th",8),b(4,"Page Size"),g(),nt())}function ui(t,n){if(t&1&&(it(0),m(1,"td",11),b(2),rt(3,"number"),g(),m(4,"td",11),b(5),rt(6,"number"),g(),nt()),t&2){let e=Ft();E(2),Z(" ",ot(3,2,e.data==null||e.data.Content==null?null:e.data.Content.PageNumber)," "),E(3),Z(" ",ot(6,4,e.data==null||e.data.Content==null?null:e.data.Content.RowCount)," ")}}function di(t,n){if(t&1&&(it(0),m(1,"li")(2,"a",19),b(3),g()(),nt()),t&2){let e=n.$implicit;E(2),x("href",e.imageUrl,ne),E(),Z(" ",e.fileName," ")}}function fi(t,n){if(t&1&&(it(0),m(1,"div",12)(2,"div",3)(3,"div",13)(4,"div",14),W(5,"i",15),m(6,"div",16),b(7," Some images failed to migrate. Please check the file "),g()(),m(8,"ol",17),z(9,di,4,2,"ng-container",18),g()()()(),nt()),t&2){let e=Ft();E(9),x("ngForOf",e.failedMigrate())}}var Oe=(()=>{class t{constructor(e){this.data=e,this.dialogRef=C(ge),this.failedMigrate=F([]),this.initFailedMigrate()}initFailedMigrate(){this.failedMigrate.update(()=>this.data.Content?.Image_failed?.map(i=>{let r=i.split("/");return{fileName:r[r.length-1],imageUrl:i}}))}ngOnInit(){this.modalConfig=new _e,this.modalConfig.title="Migrate Complete",this.modalConfig.hideOk=!0,this.modalConfig.cancelText="Close",this.modalConfig.customWidth="600px"}onClose(){this.dialogRef.close()}static{this.\u0275fac=function(i){return new(i||t)(G(Se))}}static{this.\u0275cmp=K({type:t,selectors:[["app-modal-migrate-notification"]],decls:24,vars:10,consts:[[3,"onCancel","onClose","config"],[1,"container"],[1,"row"],[1,"col-12"],[1,"table-responsive"],[1,"table","table-bordered"],[1,"thead-light"],[4,"ngIf"],[1,"text-center"],[1,"text-center","fw-bold","text-success"],[1,"text-center","fw-bold","text-danger"],[1,"text-center","fw-bold"],[1,"row","mt-5"],[1,"text-break"],[1,"d-flex","justify-content-start","mt-5","align-items-center","bg-warning-subtle","ps-3","py-2","rounded-1"],[1,"fa-solid","fa-triangle-exclamation","text-warning","me-2","fs-5"],[1,"fs-5","fw-bold"],[1,"mt-3"],[4,"ngFor","ngForOf"],["target","_blank",3,"href"]],template:function(i,r){i&1&&(m(0,"modal-material",0),Tt("onCancel",function(){return r.onClose()})("onClose",function(){return r.onClose()}),m(1,"content")(2,"div",1)(3,"div",2)(4,"div",3)(5,"div",4)(6,"table",5)(7,"thead",6)(8,"tr"),z(9,pi,5,0,"ng-container",7),m(10,"th",8),b(11,"Success"),g(),m(12,"th",8),b(13,"Fail"),g()()(),m(14,"tbody")(15,"tr"),z(16,ui,7,6,"ng-container",7),m(17,"td",9),b(18),rt(19,"number"),g(),m(20,"td",10),b(21),rt(22,"number"),g()()()()()()(),z(23,fi,10,1,"ng-container",7),g()()()),i&2&&(x("config",r.modalConfig),E(9),x("ngIf",(r.data==null||r.data.Content==null?null:r.data.Content.PageNumber)&&(r.data==null||r.data.Content==null?null:r.data.Content.RowCount)),E(7),x("ngIf",(r.data==null||r.data.Content==null?null:r.data.Content.PageNumber)&&(r.data==null||r.data.Content==null?null:r.data.Content.RowCount)),E(2),Z(" ",ot(19,6,r.data==null||r.data.Content==null?null:r.data.Content.Success)," "),E(3),Z(" ",ot(22,8,r.data==null||r.data.Content==null?null:r.data.Content.Failed)," "),E(2),x("ngIf",r.failedMigrate().length>0))},dependencies:[At,Ot,ue,de,be,Ee],encapsulation:2})}}return t})();var Ae=(()=>{class t{get domain(){let e=`${localStorage.getItem("posdomain")}`;return e.includes("localhost")&&(e="localhost:5001"),e}constructor(e,i){this.signalrService=e,this.toastr=i,this.dialog=C(ye),this.subscribeMigrateNotification(),this.subscribeGroup()}subscribeGroup(){this.signalrService.subscribeGroup(this.domain)}subscribeMigrateNotification(){this.signalrService.migrateNotification$.subscribe(e=>{let i=e?JSON.parse(e):null;i&&this.dialog.open(Oe,{data:i})})}static{this.\u0275fac=function(i){return new(i||t)(M(ve),M(Lt))}}static{this.\u0275prov=_({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var hi=t=>[t];function gi(t,n){if(t&1&&(m(0,"ul",14)(1,"li",15)(2,"a",16),W(3,"i"),m(4,"p"),b(5),g()()()()),t&2){let e=n.$implicit;E(2),x("routerLink",ce(4,hi,e.Url)),E(),le(e.Icon),E(2),Ut(e.Title)}}var sn=(()=>{class t{constructor(e,i){this.auth=e,this.notificationSignalrService=i,this.Menu={},this.Menu=[{Title:"Product",Url:"product",Icon:"fas fa-tag"},{Title:"Migrate",Url:"migrate",Icon:"fas fa-paste"},{Title:"Inventory",Url:"inventory",Icon:"fas fa-archive"},{Title:"Merge",Url:"merge",Icon:"fas fa-compress"},{Title:"Unit Cost",Url:"unit-cost",Icon:"fas fa-tag"},{Title:"Outlet Price",Url:"outlet-price",Icon:"fas fa-dollar-sign"},{Title:"Logistics",Url:"delivery",Icon:"fas fa-truck"},{Title:"Transaction",Url:"transaction",Icon:"fas fa-edit"},{Title:"Treatment",Url:"treatment",Icon:"fas fa-ticket-alt"},{Title:"Advanced",Url:"advanced",Icon:"fas fa-sliders-h"},{Title:"Send Mail",Url:"send-mail",Icon:"fas fa-envelope"},{Title:"Recalculate",Url:"recalculate",Icon:"fas fa-calculator"},{Title:"Promotion",Url:"promotion",Icon:"fas fa-bullhorn"},{Title:"Loyalty Point",Url:"loyalty-point",Icon:"fas fa-credit-card"},{Title:"Notification",Url:"notification",Icon:"fas fa-bell"}]}ngOnInit(){this.Domain=localStorage.getItem("Domain")}logOut(){this.auth.logout()}static{this.\u0275fac=function(i){return new(i||t)(G(wt),G(Ae))}}static{this.\u0275cmp=K({type:t,selectors:[["app-menu"]],standalone:!1,decls:20,vars:2,consts:[[1,"wrapper"],["data-color","blue",1,"sidebar"],[1,"logo"],[1,"dropdown","top-initial"],["href","#","id","dropdownMenuButton1","data-bs-toggle","dropdown","title","store.dealpos.net",1,"simple-text","text-start"],[1,"fas","fa-caret-down","fa-xs","ms-2"],["aria-labelledby","dropdownMenuButton1",1,"dropdown-menu"],[1,"dropdown-header","text-dark","border-bottom"],[1,"divider","m-0"],[1,"dropdown-item","h5",2,"cursor","pointer",3,"click"],["aria-hidden","true",1,"fas","fa-sign-out-alt"],[1,"sidebar-wrapper"],["class","nav",4,"ngFor","ngForOf"],[1,"main-panel"],[1,"nav"],["routerLinkActive","active"],[1,"nav-link",3,"routerLink"]],template:function(i,r){i&1&&(m(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"a",4),b(5," DealPOS Tools"),W(6,"i",5),g(),m(7,"div",6)(8,"div",7),b(9),g(),W(10,"div",8),m(11,"a",9),Tt("click",function(){return r.logOut()}),W(12,"i",10),b(13,"\xA0 "),m(14,"span"),b(15," Log Out"),g()()()()(),m(16,"div",11),z(17,gi,6,6,"ul",12),g()(),m(18,"div",13),W(19,"router-outlet"),g()()),i&2&&(E(9),Ut(r.Domain),E(8),x("ngForOf",r.Menu))},dependencies:[Ot,fe,me,he],styles:[".top-initial[_ngcontent-%COMP%] .dropdown-menu.show[_ngcontent-%COMP%]{top:initial!important}"]})}}return t})();var cn=(()=>{class t{constructor(e,i){this._authService=e,this._router=i}canActivate(e,i){return this._authService.isAuthentication()?!0:(this._router.navigate([""]),!1)}static{this.\u0275fac=function(i){return new(i||t)(M(wt),M(Rt))}}static{this.\u0275prov=_({token:t,factory:t.\u0275fac})}}return t})();function Si(t,n){return t?t.classList?t.classList.contains(n):new RegExp("(^| )"+n+"( |$)","gi").test(t.className):!1}function un(t,n){if(t&&n){let e=i=>{Si(t,i)||(t.classList?t.classList.add(i):t.className+=" "+i)};[n].flat().filter(Boolean).forEach(i=>i.split(" ").forEach(e))}}function yi(t){for(let n of document?.styleSheets)try{for(let e of n?.cssRules)for(let i of e?.style)if(t.test(i))return{name:i,value:e.style.getPropertyValue(i).trim()}}catch{}return null}function _i(t,n){if(t&&n){let e=i=>{t.classList?t.classList.remove(i):t.className=t.className.replace(new RegExp("(^|\\b)"+i.split(" ").join("|")+"(\\b|$)","gi")," ")};[n].flat().filter(Boolean).forEach(i=>i.split(" ").forEach(e))}}function dn(t="p-overflow-hidden"){let n=yi(/-scrollbar-width$/);n?.name&&document.body.style.removeProperty(n.name),_i(document.body,t)}function fn(){let t=window,n=document,e=n.documentElement,i=n.getElementsByTagName("body")[0],r=t.innerWidth||e.clientWidth||i.clientWidth,o=t.innerHeight||e.clientHeight||i.clientHeight;return{width:r,height:o}}function mn(){let t=document.documentElement;return(window.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}function hn(){let t=document.documentElement;return(window.pageYOffset||t.scrollTop)-(t.clientTop||0)}function gn(t,n){if(t instanceof HTMLElement){let e=t.offsetWidth;if(n){let i=getComputedStyle(t);e+=parseFloat(i.marginLeft)+parseFloat(i.marginRight)}return e}return 0}function It(t){return typeof HTMLElement=="object"?t instanceof HTMLElement:t&&typeof t=="object"&&t!==null&&t.nodeType===1&&typeof t.nodeName=="string"}function Wt(t){let n=t;return t&&typeof t=="object"&&(t.hasOwnProperty("current")?n=t.current:t.hasOwnProperty("el")&&(t.el.hasOwnProperty("nativeElement")?n=t.el.nativeElement:n=t.el)),It(n)?n:void 0}function Sn(t,n){let e=Wt(t);if(e)e.appendChild(n);else throw new Error("Cannot append "+n+" to "+t)}function Bt(t,n={}){if(It(t)){let e=(i,r)=>{var o,a;let s=(o=t?.$attrs)!=null&&o[i]?[(a=t?.$attrs)==null?void 0:a[i]]:[];return[r].flat().reduce((c,l)=>{if(l!=null){let p=typeof l;if(p==="string"||p==="number")c.push(l);else if(p==="object"){let f=Array.isArray(l)?e(i,l):Object.entries(l).map(([u,d])=>i==="style"&&(d||d===0)?`${u.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}:${d}`:d?u:void 0);c=f.length?c.concat(f.filter(u=>!!u)):c}}return c},s)};Object.entries(n).forEach(([i,r])=>{if(r!=null){let o=i.match(/^on(.+)/);o?t.addEventListener(o[1].toLowerCase(),r):i==="p-bind"||i==="pBind"?Bt(t,r):(r=i==="class"?[...new Set(e("class",r))].join(" ").trim():i==="style"?e("style",r).join(";").trim():r,(t.$attrs=t.$attrs||{})&&(t.$attrs[i]=r),t.setAttribute(i,r))}})}}function yn(t,n){if(t){t.style.opacity="0";let e=+new Date,i="0",r=function(){i=`${+t.style.opacity+(new Date().getTime()-e)/n}`,t.style.opacity=i,e=+new Date,+i<1&&(window.requestAnimationFrame&&requestAnimationFrame(r)||setTimeout(r,16))};r()}}function Ei(t,n){return It(t)?Array.from(t.querySelectorAll(n)):[]}function _n(t,n){return It(t)?t.matches(n)?t:t.querySelector(n):null}function En(t,n){t&&document.activeElement!==t&&t.focus(n)}function Re(t,n=""){let e=Ei(t,`button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${n},
2
+ [href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${n},
3
+ input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${n},
4
+ select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${n},
5
+ textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${n},
6
+ [tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${n},
7
+ [contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${n}`),i=[];for(let r of e)getComputedStyle(r).display!="none"&&getComputedStyle(r).visibility!="hidden"&&i.push(r);return i}function bn(t,n){let e=Re(t,n);return e.length>0?e[0]:null}function vn(t){if(t){let n=t.offsetHeight,e=getComputedStyle(t);return n-=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)+parseFloat(e.borderTopWidth)+parseFloat(e.borderBottomWidth),n}return 0}function bi(t){if(t){let n=t.parentNode;return n&&n instanceof ShadowRoot&&n.host&&(n=n.host),n}return null}function Tn(t,n){let e=Re(t,n);return e.length>0?e[e.length-1]:null}function Cn(t){if(t){let n=t.getBoundingClientRect();return{top:n.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:n.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}return{top:"auto",left:"auto"}}function On(t,n){if(t){let e=t.offsetHeight;if(n){let i=getComputedStyle(t);e+=parseFloat(i.marginTop)+parseFloat(i.marginBottom)}return e}return 0}function vi(t){return!!(t!==null&&typeof t<"u"&&t.nodeName&&bi(t))}function An(t,n){var e;if(t)switch(t){case"document":return document;case"window":return window;case"body":return document.body;case"@next":return n?.nextElementSibling;case"@prev":return n?.previousElementSibling;case"@parent":return n?.parentElement;case"@grandparent":return(e=n?.parentElement)==null?void 0:e.parentElement;default:if(typeof t=="string")return document.querySelector(t);let r=Wt((o=>!!(o&&o.constructor&&o.call&&o.apply))(t)?t():t);return r?.nodeType===9||vi(r)?r:void 0}}function Rn(t){if(t){let n=t.offsetWidth,e=getComputedStyle(t);return n-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)+parseFloat(e.borderLeftWidth)+parseFloat(e.borderRightWidth),n}return 0}function Ti(t){return!!(t&&t.offsetParent!=null)}function Ln(t){return!Ti(t)}function wn(){return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}function In(t){var n;t&&("remove"in Element.prototype?t.remove():(n=t.parentNode)==null||n.removeChild(t))}function Nn(t,n){let e=Wt(t);if(e)e.removeChild(n);else throw new Error("Cannot remove "+n+" from "+t)}var Ci=Object.defineProperty,Le=Object.getOwnPropertySymbols,Oi=Object.prototype.hasOwnProperty,Ai=Object.prototype.propertyIsEnumerable,we=(t,n,e)=>n in t?Ci(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e,Ri=(t,n)=>{for(var e in n||(n={}))Oi.call(n,e)&&we(t,e,n[e]);if(Le)for(var e of Le(n))Ai.call(n,e)&&we(t,e,n[e]);return t};function at(t){return t==null||t===""||Array.isArray(t)&&t.length===0||!(t instanceof Date)&&typeof t=="object"&&Object.keys(t).length===0}function jt(t,n,e=new WeakSet){if(t===n)return!0;if(!t||!n||typeof t!="object"||typeof n!="object"||e.has(t)||e.has(n))return!1;e.add(t).add(n);let i=Array.isArray(t),r=Array.isArray(n),o,a,s;if(i&&r){if(a=t.length,a!=n.length)return!1;for(o=a;o--!==0;)if(!jt(t[o],n[o],e))return!1;return!0}if(i!=r)return!1;let c=t instanceof Date,l=n instanceof Date;if(c!=l)return!1;if(c&&l)return t.getTime()==n.getTime();let p=t instanceof RegExp,f=n instanceof RegExp;if(p!=f)return!1;if(p&&f)return t.toString()==n.toString();let u=Object.keys(t);if(a=u.length,a!==Object.keys(n).length)return!1;for(o=a;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,u[o]))return!1;for(o=a;o--!==0;)if(s=u[o],!jt(t[s],n[s],e))return!1;return!0}function Li(t,n){return jt(t,n)}function Ne(t){return!!(t&&t.constructor&&t.call&&t.apply)}function h(t){return!at(t)}function Nt(t,n){if(!t||!n)return null;try{let e=t[n];if(h(e))return e}catch{}if(Object.keys(t).length){if(Ne(n))return n(t);if(n.indexOf(".")===-1)return t[n];{let e=n.split("."),i=t;for(let r=0,o=e.length;r<o;++r){if(i==null)return null;i=i[e[r]]}return i}}return null}function Vt(t,n,e){return e?Nt(t,e)===Nt(n,e):Li(t,n)}function Pn(t,n){if(t!=null&&n&&n.length){for(let e of n)if(Vt(t,e))return!0}return!1}function Dn(t,n){let e=-1;if(h(t))try{e=t.findLastIndex(n)}catch{e=t.lastIndexOf([...t].reverse().find(n))}return e}function w(t,n=!0){return t instanceof Object&&t.constructor===Object&&(n||Object.keys(t).length!==0)}function R(t,...n){return Ne(t)?t(...n):t}function j(t,n=!0){return typeof t=="string"&&(n||t!=="")}function Ie(t){return j(t)?t.replace(/(-|_)/g,"").toLowerCase():t}function xe(t,n="",e={}){let i=Ie(n).split("."),r=i.shift();return r?w(t)?xe(R(t[Object.keys(t).find(o=>Ie(o)===r)||""],e),i.join("."),e):void 0:R(t,e)}function xt(t,n=!0){return Array.isArray(t)&&(n||t.length!==0)}function Pe(t){return h(t)&&!isNaN(t)}function Mn(t=""){return h(t)&&t.length===1&&!!t.match(/\S| /)}function O(t,n){if(n){let e=n.test(t);return n.lastIndex=0,e}return!1}function st(...t){let n=(e={},i={})=>{let r=Ri({},e);return Object.keys(i).forEach(o=>{w(i[o])&&o in e&&w(e[o])?r[o]=n(e[o],i[o]):r[o]=i[o]}),r};return t.reduce((e,i,r)=>r===0?i:n(e,i),{})}function Y(t){return t&&t.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g,"").replace(/ {2,}/g," ").replace(/ ([{:}]) /g,"$1").replace(/([;,]) /g,"$1").replace(/ !/g,"!").replace(/: /g,":")}function A(t){if(t&&/[\xC0-\xFF\u0100-\u017E]/.test(t)){let e={A:/[\xC0-\xC5\u0100\u0102\u0104]/g,AE:/[\xC6]/g,C:/[\xC7\u0106\u0108\u010A\u010C]/g,D:/[\xD0\u010E\u0110]/g,E:/[\xC8-\xCB\u0112\u0114\u0116\u0118\u011A]/g,G:/[\u011C\u011E\u0120\u0122]/g,H:/[\u0124\u0126]/g,I:/[\xCC-\xCF\u0128\u012A\u012C\u012E\u0130]/g,IJ:/[\u0132]/g,J:/[\u0134]/g,K:/[\u0136]/g,L:/[\u0139\u013B\u013D\u013F\u0141]/g,N:/[\xD1\u0143\u0145\u0147\u014A]/g,O:/[\xD2-\xD6\xD8\u014C\u014E\u0150]/g,OE:/[\u0152]/g,R:/[\u0154\u0156\u0158]/g,S:/[\u015A\u015C\u015E\u0160]/g,T:/[\u0162\u0164\u0166]/g,U:/[\xD9-\xDC\u0168\u016A\u016C\u016E\u0170\u0172]/g,W:/[\u0174]/g,Y:/[\xDD\u0176\u0178]/g,Z:/[\u0179\u017B\u017D]/g,a:/[\xE0-\xE5\u0101\u0103\u0105]/g,ae:/[\xE6]/g,c:/[\xE7\u0107\u0109\u010B\u010D]/g,d:/[\u010F\u0111]/g,e:/[\xE8-\xEB\u0113\u0115\u0117\u0119\u011B]/g,g:/[\u011D\u011F\u0121\u0123]/g,i:/[\xEC-\xEF\u0129\u012B\u012D\u012F\u0131]/g,ij:/[\u0133]/g,j:/[\u0135]/g,k:/[\u0137,\u0138]/g,l:/[\u013A\u013C\u013E\u0140\u0142]/g,n:/[\xF1\u0144\u0146\u0148\u014B]/g,p:/[\xFE]/g,o:/[\xF2-\xF6\xF8\u014D\u014F\u0151]/g,oe:/[\u0153]/g,r:/[\u0155\u0157\u0159]/g,s:/[\u015B\u015D\u015F\u0161]/g,t:/[\u0163\u0165\u0167]/g,u:/[\xF9-\xFC\u0169\u016B\u016D\u016F\u0171\u0173]/g,w:/[\u0175]/g,y:/[\xFD\xFF\u0177]/g,z:/[\u017A\u017C\u017E]/g};for(let i in e)t=t.replace(e[i],i)}return t}function Pt(t){return j(t)?t.replace(/(_)/g,"-").replace(/[A-Z]/g,(n,e)=>e===0?n:"-"+n.toLowerCase()).toLowerCase():t}function Gt(t){return j(t)?t.replace(/[A-Z]/g,(n,e)=>e===0?n:"."+n.toLowerCase()).toLowerCase():t}var Dt={};function kn(t="pui_id_"){return Dt.hasOwnProperty(t)||(Dt[t]=0),Dt[t]++,`${t}${Dt[t]}`}function De(){let t=new Map;return{on(n,e){let i=t.get(n);return i?i.push(e):i=[e],t.set(n,i),this},off(n,e){let i=t.get(n);return i&&i.splice(i.indexOf(e)>>>0,1),this},emit(n,e){let i=t.get(n);i&&i.slice().map(r=>{r(e)})},clear(){t.clear()}}}function wi(){let t=[],n=(a,s,c=999)=>{let l=r(a,s,c),p=l.value+(l.key===a?0:c)+1;return t.push({key:a,value:p}),p},e=a=>{t=t.filter(s=>s.value!==a)},i=(a,s)=>r(a,s).value,r=(a,s,c=0)=>[...t].reverse().find(l=>s?!0:l.key===a)||{key:a,value:c},o=a=>a&&parseInt(a.style.zIndex,10)||0;return{get:o,set:(a,s,c)=>{s&&(s.style.zIndex=String(n(a,!0,c)))},clear:a=>{a&&(e(o(a)),a.style.zIndex="")},getCurrent:a=>i(a,!0)}}var Bn=wi();var Me=["*"];var v=(()=>{class t{static STARTS_WITH="startsWith";static CONTAINS="contains";static NOT_CONTAINS="notContains";static ENDS_WITH="endsWith";static EQUALS="equals";static NOT_EQUALS="notEquals";static IN="in";static LESS_THAN="lt";static LESS_THAN_OR_EQUAL_TO="lte";static GREATER_THAN="gt";static GREATER_THAN_OR_EQUAL_TO="gte";static BETWEEN="between";static IS="is";static IS_NOT="isNot";static BEFORE="before";static AFTER="after";static DATE_IS="dateIs";static DATE_IS_NOT="dateIsNot";static DATE_BEFORE="dateBefore";static DATE_AFTER="dateAfter"}return t})();var er=(()=>{class t{filter(e,i,r,o,a){let s=[];if(e)for(let c of e)for(let l of i){let p=Nt(c,l);if(this.filters[o](p,r,a)){s.push(c);break}}return s}filters={startsWith:(e,i,r)=>{if(i==null||i.trim()==="")return!0;if(e==null)return!1;let o=A(i.toString()).toLocaleLowerCase(r);return A(e.toString()).toLocaleLowerCase(r).slice(0,o.length)===o},contains:(e,i,r)=>{if(i==null||typeof i=="string"&&i.trim()==="")return!0;if(e==null)return!1;let o=A(i.toString()).toLocaleLowerCase(r);return A(e.toString()).toLocaleLowerCase(r).indexOf(o)!==-1},notContains:(e,i,r)=>{if(i==null||typeof i=="string"&&i.trim()==="")return!0;if(e==null)return!1;let o=A(i.toString()).toLocaleLowerCase(r);return A(e.toString()).toLocaleLowerCase(r).indexOf(o)===-1},endsWith:(e,i,r)=>{if(i==null||i.trim()==="")return!0;if(e==null)return!1;let o=A(i.toString()).toLocaleLowerCase(r),a=A(e.toString()).toLocaleLowerCase(r);return a.indexOf(o,a.length-o.length)!==-1},equals:(e,i,r)=>i==null||typeof i=="string"&&i.trim()===""?!0:e==null?!1:e.getTime&&i.getTime?e.getTime()===i.getTime():e==i?!0:A(e.toString()).toLocaleLowerCase(r)==A(i.toString()).toLocaleLowerCase(r),notEquals:(e,i,r)=>i==null||typeof i=="string"&&i.trim()===""?!1:e==null?!0:e.getTime&&i.getTime?e.getTime()!==i.getTime():e==i?!1:A(e.toString()).toLocaleLowerCase(r)!=A(i.toString()).toLocaleLowerCase(r),in:(e,i)=>{if(i==null||i.length===0)return!0;for(let r=0;r<i.length;r++)if(Vt(e,i[r]))return!0;return!1},between:(e,i)=>i==null||i[0]==null||i[1]==null?!0:e==null?!1:e.getTime?i[0].getTime()<=e.getTime()&&e.getTime()<=i[1].getTime():i[0]<=e&&e<=i[1],lt:(e,i,r)=>i==null?!0:e==null?!1:e.getTime&&i.getTime?e.getTime()<i.getTime():e<i,lte:(e,i,r)=>i==null?!0:e==null?!1:e.getTime&&i.getTime?e.getTime()<=i.getTime():e<=i,gt:(e,i,r)=>i==null?!0:e==null?!1:e.getTime&&i.getTime?e.getTime()>i.getTime():e>i,gte:(e,i,r)=>i==null?!0:e==null?!1:e.getTime&&i.getTime?e.getTime()>=i.getTime():e>=i,is:(e,i,r)=>this.filters.equals(e,i,r),isNot:(e,i,r)=>this.filters.notEquals(e,i,r),before:(e,i,r)=>this.filters.lt(e,i,r),after:(e,i,r)=>this.filters.gt(e,i,r),dateIs:(e,i)=>i==null?!0:e==null?!1:e.toDateString()===i.toDateString(),dateIsNot:(e,i)=>i==null?!0:e==null?!1:e.toDateString()!==i.toDateString(),dateBefore:(e,i)=>i==null?!0:e==null?!1:e.getTime()<i.getTime(),dateAfter:(e,i)=>i==null?!0:e==null?!1:(e.setHours(0,0,0,0),e.getTime()>i.getTime())};register(e,i){this.filters[e]=i}static \u0275fac=function(i){return new(i||t)};static \u0275prov=_({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var ir=(()=>{class t{clickSource=new q;clickObservable=this.clickSource.asObservable();add(e){e&&this.clickSource.next(e)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=_({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var nr=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275cmp=K({type:t,selectors:[["p-header"]],standalone:!1,ngContentSelectors:Me,decls:1,vars:0,template:function(i,r){i&1&&(kt(),Ht(0))},encapsulation:2})}return t})(),rr=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275cmp=K({type:t,selectors:[["p-footer"]],standalone:!1,ngContentSelectors:Me,decls:1,vars:0,template:function(i,r){i&1&&(kt(),Ht(0))},encapsulation:2})}return t})(),or=(()=>{class t{template;type;name;constructor(e){this.template=e}getType(){return this.name}static \u0275fac=function(i){return new(i||t)(G(re))};static \u0275dir=ae({type:t,selectors:[["","pTemplate",""]],inputs:{type:"type",name:[0,"pTemplate","name"]}})}return t})(),ar=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=oe({type:t});static \u0275inj=Qt({imports:[At]})}return t})(),sr=(()=>{class t{static STARTS_WITH="startsWith";static CONTAINS="contains";static NOT_CONTAINS="notContains";static ENDS_WITH="endsWith";static EQUALS="equals";static NOT_EQUALS="notEquals";static NO_FILTER="noFilter";static LT="lt";static LTE="lte";static GT="gt";static GTE="gte";static IS="is";static IS_NOT="isNot";static BEFORE="before";static AFTER="after";static CLEAR="clear";static APPLY="apply";static MATCH_ALL="matchAll";static MATCH_ANY="matchAny";static ADD_RULE="addRule";static REMOVE_RULE="removeRule";static ACCEPT="accept";static REJECT="reject";static CHOOSE="choose";static UPLOAD="upload";static CANCEL="cancel";static PENDING="pending";static FILE_SIZE_TYPES="fileSizeTypes";static DAY_NAMES="dayNames";static DAY_NAMES_SHORT="dayNamesShort";static DAY_NAMES_MIN="dayNamesMin";static MONTH_NAMES="monthNames";static MONTH_NAMES_SHORT="monthNamesShort";static FIRST_DAY_OF_WEEK="firstDayOfWeek";static TODAY="today";static WEEK_HEADER="weekHeader";static WEAK="weak";static MEDIUM="medium";static STRONG="strong";static PASSWORD_PROMPT="passwordPrompt";static EMPTY_MESSAGE="emptyMessage";static EMPTY_FILTER_MESSAGE="emptyFilterMessage";static SHOW_FILTER_MENU="showFilterMenu";static HIDE_FILTER_MENU="hideFilterMenu";static SELECTION_MESSAGE="selectionMessage";static ARIA="aria";static SELECT_COLOR="selectColor";static BROWSE_FILES="browseFiles"}return t})(),lr=(()=>{class t{dragStartSource=new q;dragStopSource=new q;dragStart$=this.dragStartSource.asObservable();dragStop$=this.dragStopSource.asObservable();startDrag(e){this.dragStartSource.next(e)}stopDrag(e){this.dragStopSource.next(e)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=_({token:t,factory:t.\u0275fac})}return t})();var Ii=Object.defineProperty,Ni=Object.defineProperties,xi=Object.getOwnPropertyDescriptors,Mt=Object.getOwnPropertySymbols,He=Object.prototype.hasOwnProperty,Ue=Object.prototype.propertyIsEnumerable,Fe=(t,n,e)=>n in t?Ii(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e,N=(t,n)=>{for(var e in n||(n={}))He.call(n,e)&&Fe(t,e,n[e]);if(Mt)for(var e of Mt(n))Ue.call(n,e)&&Fe(t,e,n[e]);return t},Kt=(t,n)=>Ni(t,xi(n)),k=(t,n)=>{var e={};for(var i in t)He.call(t,i)&&n.indexOf(i)<0&&(e[i]=t[i]);if(t!=null&&Mt)for(var i of Mt(t))n.indexOf(i)<0&&Ue.call(t,i)&&(e[i]=t[i]);return e};function ur(...t){return st(...t)}var Pi=De(),P=Pi;function ke(t,n){xt(t)?t.push(...n||[]):w(t)&&Object.assign(t,n)}function Di(t){return w(t)&&t.hasOwnProperty("value")&&t.hasOwnProperty("type")?t.value:t}function Mi(t){return t.replaceAll(/ /g,"").replace(/[^\w]/g,"-")}function zt(t="",n=""){return Mi(`${j(t,!1)&&j(n,!1)?`${t}-`:t}${n}`)}function $e(t="",n=""){return`--${zt(t,n)}`}function Fi(t=""){let n=(t.match(/{/g)||[]).length,e=(t.match(/}/g)||[]).length;return(n+e)%2!==0}function We(t,n="",e="",i=[],r){if(j(t)){let o=/{([^}]*)}/g,a=t.trim();if(Fi(a))return;if(O(a,o)){let s=a.replaceAll(o,p=>{let u=p.replace(/{|}/g,"").split(".").filter(d=>!i.some(y=>O(d,y)));return`var(${$e(e,Pt(u.join("-")))}${h(r)?`, ${r}`:""})`}),c=/(\d+\s+[\+\-\*\/]\s+\d+)/g,l=/var\([^)]+\)/g;return O(s.replace(l,"0"),c)?`calc(${s})`:s}return a}else if(Pe(t))return t}function ki(t,n,e){j(n,!1)&&t.push(`${n}:${e};`)}function J(t,n){return t?`${t}{${n}}`:""}var Q=(...t)=>Hi(S.getTheme(),...t),Hi=(t={},n,e,i)=>{if(n){let{variable:r,options:o}=S.defaults||{},{prefix:a,transform:s}=t?.options||o||{},l=O(n,/{([^}]*)}/g)?n:`{${n}}`;return i==="value"||at(i)&&s==="strict"?S.getTokenValue(n):We(l,void 0,a,[r.excludedKeyRegex],e)}return""};function Ui(t,n={}){let e=S.defaults.variable,{prefix:i=e.prefix,selector:r=e.selector,excludedKeyRegex:o=e.excludedKeyRegex}=n,a=(l,p="")=>Object.entries(l).reduce((f,[u,d])=>{let y=O(u,o)?zt(p):zt(p,Pt(u)),T=Di(d);if(w(T)){let{variables:H,tokens:U}=a(T,y);ke(f.tokens,U),ke(f.variables,H)}else f.tokens.push((i?y.replace(`${i}-`,""):y).replaceAll("-",".")),ki(f.variables,$e(y),We(T,y,i,[o]));return f},{variables:[],tokens:[]}),{variables:s,tokens:c}=a(t,i);return{value:s,tokens:c,declarations:s.join(""),css:J(r,s.join(""))}}var I={regex:{rules:{class:{pattern:/^\.([a-zA-Z][\w-]*)$/,resolve(t){return{type:"class",selector:t,matched:this.pattern.test(t.trim())}}},attr:{pattern:/^\[(.*)\]$/,resolve(t){return{type:"attr",selector:`:root${t}`,matched:this.pattern.test(t.trim())}}},media:{pattern:/^@media (.*)$/,resolve(t){return{type:"media",selector:`${t}{:root{[CSS]}}`,matched:this.pattern.test(t.trim())}}},system:{pattern:/^system$/,resolve(t){return{type:"system",selector:"@media (prefers-color-scheme: dark){:root{[CSS]}}",matched:this.pattern.test(t.trim())}}},custom:{resolve(t){return{type:"custom",selector:t,matched:!0}}}},resolve(t){let n=Object.keys(this.rules).filter(e=>e!=="custom").map(e=>this.rules[e]);return[t].flat().map(e=>{var i;return(i=n.map(r=>r.resolve(e)).find(r=>r.matched))!=null?i:this.rules.custom.resolve(e)})}},_toVariables(t,n){return Ui(t,{prefix:n?.prefix})},getCommon({name:t="",theme:n={},params:e,set:i,defaults:r}){var o,a,s,c,l,p,f;let{preset:u,options:d}=n,y,T,H,U,$,V,L;if(h(u)&&d.transform!=="strict"){let{primitive:lt,semantic:ct,extend:pt}=u,X=ct||{},{colorScheme:ut}=X,dt=k(X,["colorScheme"]),ft=pt||{},{colorScheme:mt}=ft,tt=k(ft,["colorScheme"]),et=ut||{},{dark:ht}=et,gt=k(et,["dark"]),St=mt||{},{dark:yt}=St,_t=k(St,["dark"]),Et=h(lt)?this._toVariables({primitive:lt},d):{},bt=h(dt)?this._toVariables({semantic:dt},d):{},vt=h(gt)?this._toVariables({light:gt},d):{},Yt=h(ht)?this._toVariables({dark:ht},d):{},qt=h(tt)?this._toVariables({semantic:tt},d):{},Zt=h(_t)?this._toVariables({light:_t},d):{},Jt=h(yt)?this._toVariables({dark:yt},d):{},[Ve,Ge]=[(o=Et.declarations)!=null?o:"",Et.tokens],[Ke,ze]=[(a=bt.declarations)!=null?a:"",bt.tokens||[]],[Ye,qe]=[(s=vt.declarations)!=null?s:"",vt.tokens||[]],[Ze,Je]=[(c=Yt.declarations)!=null?c:"",Yt.tokens||[]],[Qe,Xe]=[(l=qt.declarations)!=null?l:"",qt.tokens||[]],[ti,ei]=[(p=Zt.declarations)!=null?p:"",Zt.tokens||[]],[ii,ni]=[(f=Jt.declarations)!=null?f:"",Jt.tokens||[]];y=this.transformCSS(t,Ve,"light","variable",d,i,r),T=Ge;let ri=this.transformCSS(t,`${Ke}${Ye}`,"light","variable",d,i,r),oi=this.transformCSS(t,`${Ze}`,"dark","variable",d,i,r);H=`${ri}${oi}`,U=[...new Set([...ze,...qe,...Je])];let ai=this.transformCSS(t,`${Qe}${ti}color-scheme:light`,"light","variable",d,i,r),si=this.transformCSS(t,`${ii}color-scheme:dark`,"dark","variable",d,i,r);$=`${ai}${si}`,V=[...new Set([...Xe,...ei,...ni])],L=R(u.css,{dt:Q})}return{primitive:{css:y,tokens:T},semantic:{css:H,tokens:U},global:{css:$,tokens:V},style:L}},getPreset({name:t="",preset:n={},options:e,params:i,set:r,defaults:o,selector:a}){var s,c,l;let p,f,u;if(h(n)&&e.transform!=="strict"){let d=t.replace("-directive",""),y=n,{colorScheme:T,extend:H,css:U}=y,$=k(y,["colorScheme","extend","css"]),V=H||{},{colorScheme:L}=V,lt=k(V,["colorScheme"]),ct=T||{},{dark:pt}=ct,X=k(ct,["dark"]),ut=L||{},{dark:dt}=ut,ft=k(ut,["dark"]),mt=h($)?this._toVariables({[d]:N(N({},$),lt)},e):{},tt=h(X)?this._toVariables({[d]:N(N({},X),ft)},e):{},et=h(pt)?this._toVariables({[d]:N(N({},pt),dt)},e):{},[ht,gt]=[(s=mt.declarations)!=null?s:"",mt.tokens||[]],[St,yt]=[(c=tt.declarations)!=null?c:"",tt.tokens||[]],[_t,Et]=[(l=et.declarations)!=null?l:"",et.tokens||[]],bt=this.transformCSS(d,`${ht}${St}`,"light","variable",e,r,o,a),vt=this.transformCSS(d,_t,"dark","variable",e,r,o,a);p=`${bt}${vt}`,f=[...new Set([...gt,...yt,...Et])],u=R(U,{dt:Q})}return{css:p,tokens:f,style:u}},getPresetC({name:t="",theme:n={},params:e,set:i,defaults:r}){var o;let{preset:a,options:s}=n,c=(o=a?.components)==null?void 0:o[t];return this.getPreset({name:t,preset:c,options:s,params:e,set:i,defaults:r})},getPresetD({name:t="",theme:n={},params:e,set:i,defaults:r}){var o;let a=t.replace("-directive",""),{preset:s,options:c}=n,l=(o=s?.directives)==null?void 0:o[a];return this.getPreset({name:a,preset:l,options:c,params:e,set:i,defaults:r})},applyDarkColorScheme(t){return!(t.darkModeSelector==="none"||t.darkModeSelector===!1)},getColorSchemeOption(t,n){var e;return this.applyDarkColorScheme(t)?this.regex.resolve(t.darkModeSelector===!0?n.options.darkModeSelector:(e=t.darkModeSelector)!=null?e:n.options.darkModeSelector):[]},getLayerOrder(t,n={},e,i){let{cssLayer:r}=n;return r?`@layer ${R(r.order||"primeui",e)}`:""},getCommonStyleSheet({name:t="",theme:n={},params:e,props:i={},set:r,defaults:o}){let a=this.getCommon({name:t,theme:n,params:e,set:r,defaults:o}),s=Object.entries(i).reduce((c,[l,p])=>c.push(`${l}="${p}"`)&&c,[]).join(" ");return Object.entries(a||{}).reduce((c,[l,p])=>{if(p?.css){let f=Y(p?.css),u=`${l}-variables`;c.push(`<style type="text/css" data-primevue-style-id="${u}" ${s}>${f}</style>`)}return c},[]).join("")},getStyleSheet({name:t="",theme:n={},params:e,props:i={},set:r,defaults:o}){var a;let s={name:t,theme:n,params:e,set:r,defaults:o},c=(a=t.includes("-directive")?this.getPresetD(s):this.getPresetC(s))==null?void 0:a.css,l=Object.entries(i).reduce((p,[f,u])=>p.push(`${f}="${u}"`)&&p,[]).join(" ");return c?`<style type="text/css" data-primevue-style-id="${t}-variables" ${l}>${Y(c)}</style>`:""},createTokens(t={},n,e="",i="",r={}){return Object.entries(t).forEach(([o,a])=>{let s=O(o,n.variable.excludedKeyRegex)?e:e?`${e}.${Gt(o)}`:Gt(o),c=i?`${i}.${o}`:o;w(a)?this.createTokens(a,n,s,c,r):(r[s]||(r[s]={paths:[],computed(l,p={}){var f,u;return this.paths.length===1?(f=this.paths[0])==null?void 0:f.computed(this.paths[0].scheme,p.binding):l&&l!=="none"?(u=this.paths.find(d=>d.scheme===l))==null?void 0:u.computed(l,p.binding):this.paths.map(d=>d.computed(d.scheme,p[d.scheme]))}}),r[s].paths.push({path:c,value:a,scheme:c.includes("colorScheme.light")?"light":c.includes("colorScheme.dark")?"dark":"none",computed(l,p={}){let f=/{([^}]*)}/g,u=a;if(p.name=this.path,p.binding||(p.binding={}),O(a,f)){let y=a.trim().replaceAll(f,U=>{var $;let V=U.replace(/{|}/g,""),L=($=r[V])==null?void 0:$.computed(l,p);return xt(L)&&L.length===2?`light-dark(${L[0].value},${L[1].value})`:L?.value}),T=/(\d+\w*\s+[\+\-\*\/]\s+\d+\w*)/g,H=/var\([^)]+\)/g;u=O(y.replace(H,"0"),T)?`calc(${y})`:y}return at(p.binding)&&delete p.binding,{colorScheme:l,path:this.path,paths:p,value:u.includes("undefined")?void 0:u}}}))}),r},getTokenValue(t,n,e){var i;let o=(c=>c.split(".").filter(p=>!O(p.toLowerCase(),e.variable.excludedKeyRegex)).join("."))(n),a=n.includes("colorScheme.light")?"light":n.includes("colorScheme.dark")?"dark":void 0,s=[(i=t[o])==null?void 0:i.computed(a)].flat().filter(c=>c);return s.length===1?s[0].value:s.reduce((c={},l)=>{let p=l,{colorScheme:f}=p,u=k(p,["colorScheme"]);return c[f]=u,c},void 0)},getSelectorRule(t,n,e,i){return e==="class"||e==="attr"?J(h(n)?`${t}${n},${t} ${n}`:t,i):J(t,h(n)?J(n,i):i)},transformCSS(t,n,e,i,r={},o,a,s){if(h(n)){let{cssLayer:c}=r;if(i!=="style"){let l=this.getColorSchemeOption(r,a);n=e==="dark"?l.reduce((p,{type:f,selector:u})=>(h(u)&&(p+=u.includes("[CSS]")?u.replace("[CSS]",n):this.getSelectorRule(u,s,f,n)),p),""):J(s??":root",n)}if(c){let l={name:"primeui",order:"primeui"};w(c)&&(l.name=R(c.name,{name:t,type:i})),h(l.name)&&(n=J(`@layer ${l.name}`,n),o?.layerNames(l.name))}return n}return""}},S={defaults:{variable:{prefix:"p",selector:":root",excludedKeyRegex:/^(primitive|semantic|components|directives|variables|colorscheme|light|dark|common|root|states|extend|css)$/gi},options:{prefix:"p",darkModeSelector:"system",cssLayer:!1}},_theme:void 0,_layerNames:new Set,_loadedStyleNames:new Set,_loadingStyles:new Set,_tokens:{},update(t={}){let{theme:n}=t;n&&(this._theme=Kt(N({},n),{options:N(N({},this.defaults.options),n.options)}),this._tokens=I.createTokens(this.preset,this.defaults),this.clearLoadedStyleNames())},get theme(){return this._theme},get preset(){var t;return((t=this.theme)==null?void 0:t.preset)||{}},get options(){var t;return((t=this.theme)==null?void 0:t.options)||{}},get tokens(){return this._tokens},getTheme(){return this.theme},setTheme(t){this.update({theme:t}),P.emit("theme:change",t)},getPreset(){return this.preset},setPreset(t){this._theme=Kt(N({},this.theme),{preset:t}),this._tokens=I.createTokens(t,this.defaults),this.clearLoadedStyleNames(),P.emit("preset:change",t),P.emit("theme:change",this.theme)},getOptions(){return this.options},setOptions(t){this._theme=Kt(N({},this.theme),{options:t}),this.clearLoadedStyleNames(),P.emit("options:change",t),P.emit("theme:change",this.theme)},getLayerNames(){return[...this._layerNames]},setLayerNames(t){this._layerNames.add(t)},getLoadedStyleNames(){return this._loadedStyleNames},isStyleNameLoaded(t){return this._loadedStyleNames.has(t)},setLoadedStyleName(t){this._loadedStyleNames.add(t)},deleteLoadedStyleName(t){this._loadedStyleNames.delete(t)},clearLoadedStyleNames(){this._loadedStyleNames.clear()},getTokenValue(t){return I.getTokenValue(this.tokens,t,this.defaults)},getCommon(t="",n){return I.getCommon({name:t,theme:this.theme,params:n,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},getComponent(t="",n){let e={name:t,theme:this.theme,params:n,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return I.getPresetC(e)},getDirective(t="",n){let e={name:t,theme:this.theme,params:n,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return I.getPresetD(e)},getCustomPreset(t="",n,e,i){let r={name:t,preset:n,options:this.options,selector:e,params:i,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return I.getPreset(r)},getLayerOrderCSS(t=""){return I.getLayerOrder(t,this.options,{names:this.getLayerNames()},this.defaults)},transformCSS(t="",n,e="style",i){return I.transformCSS(t,n,i,e,this.options,{layerNames:this.setLayerNames.bind(this)},this.defaults)},getCommonStyleSheet(t="",n,e={}){return I.getCommonStyleSheet({name:t,theme:this.theme,params:n,props:e,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},getStyleSheet(t,n,e={}){return I.getStyleSheet({name:t,theme:this.theme,params:n,props:e,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},onStyleMounted(t){this._loadingStyles.add(t)},onStyleUpdated(t){this._loadingStyles.add(t)},onStyleLoaded(t,{name:n}){this._loadingStyles.size&&(this._loadingStyles.delete(n),P.emit(`theme:${n}:load`,t),!this._loadingStyles.size&&P.emit("theme:load"))}};var $i=0,Be=(()=>{class t{document=C(Ct);use(e,i={}){let r=!1,o=e,a=null,{immediate:s=!0,manual:c=!1,name:l=`style_${++$i}`,id:p=void 0,media:f=void 0,nonce:u=void 0,first:d=!1,props:y={}}=i;if(this.document){if(a=this.document.querySelector(`style[data-primeng-style-id="${l}"]`)||p&&this.document.getElementById(p)||this.document.createElement("style"),!a.isConnected){o=e;let T=this.document.head;d&&T.firstChild?T.insertBefore(a,T.firstChild):T.appendChild(a),Bt(a,{type:"text/css",media:f,nonce:u,"data-primeng-style-id":l})}return a.textContent!==o&&(a.textContent=o),{id:p,name:l,el:a,css:o}}}static \u0275fac=function(i){return new(i||t)};static \u0275prov=_({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var xr={_loadedStyleNames:new Set,getLoadedStyleNames(){return this._loadedStyleNames},isStyleNameLoaded(t){return this._loadedStyleNames.has(t)},setLoadedStyleName(t){this._loadedStyleNames.add(t)},deleteLoadedStyleName(t){this._loadedStyleNames.delete(t)},clearLoadedStyleNames(){this._loadedStyleNames.clear()}},Wi=({dt:t})=>`
8
+ *,
9
+ ::before,
10
+ ::after {
11
+ box-sizing: border-box;
12
+ }
13
+
14
+ /* Non ng overlay animations */
15
+ .p-connected-overlay {
16
+ opacity: 0;
17
+ transform: scaleY(0.8);
18
+ transition: transform 0.12s cubic-bezier(0, 0, 0.2, 1),
19
+ opacity 0.12s cubic-bezier(0, 0, 0.2, 1);
20
+ }
21
+
22
+ .p-connected-overlay-visible {
23
+ opacity: 1;
24
+ transform: scaleY(1);
25
+ }
26
+
27
+ .p-connected-overlay-hidden {
28
+ opacity: 0;
29
+ transform: scaleY(1);
30
+ transition: opacity 0.1s linear;
31
+ }
32
+
33
+ /* NG based overlay animations */
34
+ .p-connected-overlay-enter-from {
35
+ opacity: 0;
36
+ transform: scaleY(0.8);
37
+ }
38
+
39
+ .p-connected-overlay-leave-to {
40
+ opacity: 0;
41
+ }
42
+
43
+ .p-connected-overlay-enter-active {
44
+ transition: transform 0.12s cubic-bezier(0, 0, 0.2, 1),
45
+ opacity 0.12s cubic-bezier(0, 0, 0.2, 1);
46
+ }
47
+
48
+ .p-connected-overlay-leave-active {
49
+ transition: opacity 0.1s linear;
50
+ }
51
+
52
+ /* Toggleable Content */
53
+ .p-toggleable-content-enter-from,
54
+ .p-toggleable-content-leave-to {
55
+ max-height: 0;
56
+ }
57
+
58
+ .p-toggleable-content-enter-to,
59
+ .p-toggleable-content-leave-from {
60
+ max-height: 1000px;
61
+ }
62
+
63
+ .p-toggleable-content-leave-active {
64
+ overflow: hidden;
65
+ transition: max-height 0.45s cubic-bezier(0, 1, 0, 1);
66
+ }
67
+
68
+ .p-toggleable-content-enter-active {
69
+ overflow: hidden;
70
+ transition: max-height 1s ease-in-out;
71
+ }
72
+
73
+ .p-disabled,
74
+ .p-disabled * {
75
+ cursor: default;
76
+ pointer-events: none;
77
+ user-select: none;
78
+ }
79
+
80
+ .p-disabled,
81
+ .p-component:disabled {
82
+ opacity: ${t("disabled.opacity")};
83
+ }
84
+
85
+ .pi {
86
+ font-size: ${t("icon.size")};
87
+ }
88
+
89
+ .p-icon {
90
+ width: ${t("icon.size")};
91
+ height: ${t("icon.size")};
92
+ }
93
+
94
+ .p-unselectable-text {
95
+ user-select: none;
96
+ }
97
+
98
+ .p-overlay-mask {
99
+ background: ${t("mask.background")};
100
+ color: ${t("mask.color")};
101
+ position: fixed;
102
+ top: 0;
103
+ left: 0;
104
+ width: 100%;
105
+ height: 100%;
106
+ }
107
+
108
+ .p-overlay-mask-enter {
109
+ animation: p-overlay-mask-enter-animation ${t("mask.transition.duration")} forwards;
110
+ }
111
+
112
+ .p-overlay-mask-leave {
113
+ animation: p-overlay-mask-leave-animation ${t("mask.transition.duration")} forwards;
114
+ }
115
+ /* Temporarily disabled, distrupts PrimeNG overlay animations */
116
+ /* @keyframes p-overlay-mask-enter-animation {
117
+ from {
118
+ background: transparent;
119
+ }
120
+ to {
121
+ background: ${t("mask.background")};
122
+ }
123
+ }
124
+ @keyframes p-overlay-mask-leave-animation {
125
+ from {
126
+ background: ${t("mask.background")};
127
+ }
128
+ to {
129
+ background: transparent;
130
+ }
131
+ }*/
132
+
133
+ .p-iconwrapper {
134
+ display: inline-flex;
135
+ justify-content: center;
136
+ align-items: center;
137
+ }
138
+ `,Bi=({dt:t})=>`
139
+ .p-hidden-accessible {
140
+ border: 0;
141
+ clip: rect(0 0 0 0);
142
+ height: 1px;
143
+ margin: -1px;
144
+ overflow: hidden;
145
+ padding: 0;
146
+ position: absolute;
147
+ width: 1px;
148
+ }
149
+
150
+ .p-hidden-accessible input,
151
+ .p-hidden-accessible select {
152
+ transform: scale(0);
153
+ }
154
+
155
+ .p-overflow-hidden {
156
+ overflow: hidden;
157
+ padding-right: ${t("scrollbar.width")};
158
+ }
159
+
160
+ /* @todo move to baseiconstyle.ts */
161
+
162
+ .p-icon {
163
+ display: inline-block;
164
+ vertical-align: baseline;
165
+ }
166
+
167
+ .p-icon-spin {
168
+ -webkit-animation: p-icon-spin 2s infinite linear;
169
+ animation: p-icon-spin 2s infinite linear;
170
+ }
171
+
172
+ @-webkit-keyframes p-icon-spin {
173
+ 0% {
174
+ -webkit-transform: rotate(0deg);
175
+ transform: rotate(0deg);
176
+ }
177
+ 100% {
178
+ -webkit-transform: rotate(359deg);
179
+ transform: rotate(359deg);
180
+ }
181
+ }
182
+
183
+ @keyframes p-icon-spin {
184
+ 0% {
185
+ -webkit-transform: rotate(0deg);
186
+ transform: rotate(0deg);
187
+ }
188
+ 100% {
189
+ -webkit-transform: rotate(359deg);
190
+ transform: rotate(359deg);
191
+ }
192
+ }
193
+ `,je=(()=>{class t{name="base";useStyle=C(Be);theme=void 0;css=void 0;classes={};inlineStyles={};load=(e,i={},r=o=>o)=>{let o=r(R(e,{dt:Q}));return o?this.useStyle.use(Y(o),D({name:this.name},i)):{}};loadCSS=(e={})=>this.load(this.css,e);loadTheme=(e={},i="")=>this.load(this.theme,e,(r="")=>S.transformCSS(e.name||this.name,`${r}${i}`));loadGlobalCSS=(e={})=>this.load(Bi,e);loadGlobalTheme=(e={},i="")=>this.load(Wi,e,(r="")=>S.transformCSS(e.name||this.name,`${r}${i}`));getCommonTheme=e=>S.getCommon(this.name,e);getComponentTheme=e=>S.getComponent(this.name,e);getDirectiveTheme=e=>S.getDirective(this.name,e);getPresetTheme=(e,i,r)=>S.getCustomPreset(this.name,e,i,r);getLayerOrderThemeCSS=()=>S.getLayerOrderCSS(this.name);getStyleSheet=(e="",i={})=>{if(this.css){let r=R(this.css,{dt:Q}),o=Y(`${r}${e}`),a=Object.entries(i).reduce((s,[c,l])=>s.push(`${c}="${l}"`)&&s,[]).join(" ");return`<style type="text/css" data-primeng-style-id="${this.name}" ${a}>${o}</style>`}return""};getCommonThemeStyleSheet=(e,i={})=>S.getCommonStyleSheet(this.name,e,i);getThemeStyleSheet=(e,i={})=>{let r=[S.getStyleSheet(this.name,e,i)];if(this.theme){let o=this.name==="base"?"global-style":`${this.name}-style`,a=R(this.theme,{dt:Q}),s=Y(S.transformCSS(o,a)),c=Object.entries(i).reduce((l,[p,f])=>l.push(`${p}="${f}"`)&&l,[]).join(" ");r.push(`<style type="text/css" data-primeng-style-id="${o}" ${c}>${s}</style>`)}return r.join("")};static \u0275fac=function(i){return new(i||t)};static \u0275prov=_({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var ji=(()=>{class t{theme=F(void 0);csp=F({nonce:void 0});isThemeChanged=!1;document=C(Ct);baseStyle=C(je);constructor(){$t(()=>{P.on("theme:change",e=>{pe(()=>{this.isThemeChanged=!0,this.theme.set(e)})})}),$t(()=>{let e=this.theme();this.document&&e&&(this.isThemeChanged||this.onThemeChange(e),this.isThemeChanged=!1)})}ngOnDestroy(){S.clearLoadedStyleNames(),P.clear()}onThemeChange(e){S.setTheme(e),this.document&&this.loadCommonTheme()}loadCommonTheme(){if(this.theme()!=="none"&&!S.isStyleNameLoaded("common")){let{primitive:e,semantic:i,global:r,style:o}=this.baseStyle.getCommonTheme?.()||{},a={nonce:this.csp?.()?.nonce};this.baseStyle.load(e?.css,D({name:"primitive-variables"},a)),this.baseStyle.load(i?.css,D({name:"semantic-variables"},a)),this.baseStyle.load(r?.css,D({name:"global-variables"},a)),this.baseStyle.loadGlobalTheme(D({name:"global-style"},a),o),S.setLoadedStyleName("common")}}setThemeConfig(e){let{theme:i,csp:r}=e||{};i&&this.theme.set(i),r&&this.csp.set(r)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=_({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Vi=(()=>{class t extends ji{ripple=F(!1);platformId=C(ie);inputStyle=F(null);inputVariant=F(null);overlayOptions={};csp=F({nonce:void 0});filterMatchModeOptions={text:[v.STARTS_WITH,v.CONTAINS,v.NOT_CONTAINS,v.ENDS_WITH,v.EQUALS,v.NOT_EQUALS],numeric:[v.EQUALS,v.NOT_EQUALS,v.LESS_THAN,v.LESS_THAN_OR_EQUAL_TO,v.GREATER_THAN,v.GREATER_THAN_OR_EQUAL_TO],date:[v.DATE_IS,v.DATE_IS_NOT,v.DATE_BEFORE,v.DATE_AFTER]};translation={startsWith:"Starts with",contains:"Contains",notContains:"Not contains",endsWith:"Ends with",equals:"Equals",notEquals:"Not equals",noFilter:"No Filter",lt:"Less than",lte:"Less than or equal to",gt:"Greater than",gte:"Greater than or equal to",is:"Is",isNot:"Is not",before:"Before",after:"After",dateIs:"Date is",dateIsNot:"Date is not",dateBefore:"Date is before",dateAfter:"Date is after",clear:"Clear",apply:"Apply",matchAll:"Match All",matchAny:"Match Any",addRule:"Add Rule",removeRule:"Remove Rule",accept:"Yes",reject:"No",choose:"Choose",upload:"Upload",cancel:"Cancel",pending:"Pending",fileSizeTypes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],chooseYear:"Choose Year",chooseMonth:"Choose Month",chooseDate:"Choose Date",prevDecade:"Previous Decade",nextDecade:"Next Decade",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",prevHour:"Previous Hour",nextHour:"Next Hour",prevMinute:"Previous Minute",nextMinute:"Next Minute",prevSecond:"Previous Second",nextSecond:"Next Second",am:"am",pm:"pm",dateFormat:"mm/dd/yy",firstDayOfWeek:0,today:"Today",weekHeader:"Wk",weak:"Weak",medium:"Medium",strong:"Strong",passwordPrompt:"Enter a password",emptyMessage:"No results found",searchMessage:"Search results are available",selectionMessage:"{0} items selected",emptySelectionMessage:"No selected item",emptySearchMessage:"No results found",emptyFilterMessage:"No results found",fileChosenMessage:"Files",noFileChosenMessage:"No file chosen",aria:{trueLabel:"True",falseLabel:"False",nullLabel:"Not Selected",star:"1 star",stars:"{star} stars",selectAll:"All items selected",unselectAll:"All items unselected",close:"Close",previous:"Previous",next:"Next",navigation:"Navigation",scrollTop:"Scroll Top",moveTop:"Move Top",moveUp:"Move Up",moveDown:"Move Down",moveBottom:"Move Bottom",moveToTarget:"Move to Target",moveToSource:"Move to Source",moveAllToTarget:"Move All to Target",moveAllToSource:"Move All to Source",pageLabel:"{page}",firstPageLabel:"First Page",lastPageLabel:"Last Page",nextPageLabel:"Next Page",prevPageLabel:"Previous Page",rowsPerPageLabel:"Rows per page",previousPageLabel:"Previous Page",jumpToPageDropdownLabel:"Jump to Page Dropdown",jumpToPageInputLabel:"Jump to Page Input",selectRow:"Row Selected",unselectRow:"Row Unselected",expandRow:"Row Expanded",collapseRow:"Row Collapsed",showFilterMenu:"Show Filter Menu",hideFilterMenu:"Hide Filter Menu",filterOperator:"Filter Operator",filterConstraint:"Filter Constraint",editRow:"Row Edit",saveEdit:"Save Edit",cancelEdit:"Cancel Edit",listView:"List View",gridView:"Grid View",slide:"Slide",slideNumber:"{slideNumber}",zoomImage:"Zoom Image",zoomIn:"Zoom In",zoomOut:"Zoom Out",rotateRight:"Rotate Right",rotateLeft:"Rotate Left",listLabel:"Option List",selectColor:"Select a color",removeLabel:"Remove",browseFiles:"Browse Files",maximizeLabel:"Maximize"}};zIndex={modal:1100,overlay:1e3,menu:1e3,tooltip:1100};translationSource=new q;translationObserver=this.translationSource.asObservable();getTranslation(e){return this.translation[e]}setTranslation(e){this.translation=D(D({},this.translation),e),this.translationSource.next(this.translation)}setConfig(e){let{csp:i,ripple:r,inputStyle:o,inputVariant:a,theme:s,overlayOptions:c,translation:l,filterMatchModeOptions:p}=e||{};i&&this.csp.set(i),r&&this.ripple.set(r),o&&this.inputStyle.set(o),a&&this.inputVariant.set(a),c&&(this.overlayOptions=c),l&&this.setTranslation(l),p&&(this.filterMatchModeOptions=p),s&&this.setThemeConfig({theme:s,csp:i})}static \u0275fac=(()=>{let e;return function(r){return(e||(e=ee(t)))(r||t)}})();static \u0275prov=_({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Gi=new Xt("PRIME_NG_CONFIG");function Br(...t){let n=t?.map(i=>({provide:Gi,useValue:i,multi:!1})),e=se(()=>{let i=C(Vi);t?.forEach(r=>i.setConfig(r))});return te([...n,e])}export{wt as a,Ae as b,cn as c,sn as d,Si as e,un as f,_i as g,dn as h,fn as i,mn as j,hn as k,gn as l,Sn as m,yn as n,Ei as o,_n as p,En as q,Re as r,bn as s,vn as t,Tn as u,Cn as v,On as w,An as x,Rn as y,Ti as z,Ln as A,wn as B,In as C,Nn as D,at as E,Li as F,h as G,Nt as H,Vt as I,Pn as J,Dn as K,xe as L,xt as M,Mn as N,A as O,kn as P,er as Q,ir as R,nr as S,rr as T,or as U,ar as V,sr as W,lr as X,ur as Y,P as Z,S as _,xr as $,je as aa,Vi as ba,Br as ca};
@@ -0,0 +1 @@
1
+ import{b as T}from"./chunk-FPASOMCI.js";import{a as R,b as $}from"./chunk-HKZ4CRQX.js";import{m as F,n as N}from"./chunk-KJXJE53Y.js";import"./chunk-FAJZECQR.js";import"./chunk-H6RLFBCZ.js";import"./chunk-SDDPQVXQ.js";import"./chunk-BBGB7I4B.js";import{a as L}from"./chunk-2C225VYE.js";import{a as E,b as I}from"./chunk-NR6MRK3T.js";import{A as w,F as P,Q as k,p as O,s as M}from"./chunk-XVYRBDMB.js";import{Gb as u,Ha as p,Kb as j,Lb as v,M as h,Mb as b,Ob as y,Sa as g,W as C,Wb as D,Xb as _,_ as a,ab as m,lb as n,mb as s,nb as S,ub as d,va as c,wc as A}from"./chunk-FBCQBCW3.js";import"./chunk-K2H6WANG.js";var f=(()=>{class e{constructor(){this.httpService=a(M),this.url=`https://${localStorage.getItem("Domain")}/API/`}recalculateAdjustmentOutputCost(t,i,o){let l={From:t,To:i,ListIDs:o};return this.httpService.post(`${this.url}tools/UnitCost/InventoryAdjustmentItemCost`,l)}getOutletList(){return this.httpService.get(`${this.url}Outlet/SelectOptions/2`).pipe(h(1))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=C({token:e,factory:e.\u0275fac})}}return e})();var rt=(()=>{class e{constructor(){this.adjustmentCostService=a(f),this.toastr=a(O),this.outletList$=this.adjustmentCostService.getOutletList(),this.from=c(null),this.to=c(null),this.selectedOutlets=c([]),this.costDesc=R.Adjustment}onDateChange(t){this.from.set(t.from),this.to.set(t.to)}onProcess(){if(!this.from()||!this.to()||this.selectedOutlets().length===0){this.toastr.error("Please select a date range and an outlet.","Error");return}this.adjustmentCostService.recalculateAdjustmentOutputCost(this.from(),this.to(),this.selectedOutlets()).subscribe({next:t=>{t.Affected>0?this.toastr.success(`${t.Affected} job orders successfully recalculated. ${t.NotAffected} job orders not affected.`,"Success"):this.toastr.info("No job orders were affected.","Information")}})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=g({type:e,selectors:[["app-adjustment-cost"]],features:[y([f])],decls:16,vars:9,consts:[["Title","Difference Variant Cost VS Composite Cost",3,"hideSearchBox","hideSearchDropdown"],["type","button",1,"btn","btn-success","shadow","rounded",3,"click"],[1,"container-fluid"],[3,"unitCostDesc"],[1,"d-inline","ms-10"],[1,"mb-2"],["bindLabel","v","bindValue","k","placeholder","Select an Outlet",2,"width","250px",3,"ngModelChange","clearable","items","multiple","ngModel"],[1,"mb-2","mt-8"],[2,"width","250px"],[1,"net-sales-filter",3,"dateChange"]],template:function(i,o){i&1&&(n(0,"mainpanel",0)(1,"actions")(2,"button",1),d("click",function(){return o.onProcess()}),u(3," Process "),s()(),n(4,"content")(5,"div",2),S(6,"unit-cost-description",3),n(7,"div",4)(8,"h6",5),u(9,"Outlet"),s(),n(10,"ng-select",6),D(11,"async"),b("ngModelChange",function(r){return v(o.selectedOutlets,r)||(o.selectedOutlets=r),r}),s(),n(12,"h6",7),u(13,"From - To"),s(),n(14,"div",8)(15,"app-datepicker-range",9),d("dateChange",function(r){return o.onDateChange(r)}),s()()()()()()),i&2&&(m("hideSearchBox",!0)("hideSearchDropdown",!0),p(6),m("unitCostDesc",o.costDesc),p(4),m("clearable",!0)("items",_(11,7,o.outletList$))("multiple",!0),j("ngModel",o.selectedOutlets))},dependencies:[I,E,T,k,w,P,A,L,N,F,$],encapsulation:2})}}return e})();export{rt as AdjustmentCostComponent};
@@ -1 +1 @@
1
- import{a as w,b as me,c as se,d as ge}from"./chunk-FG4S6NWY.js";import"./chunk-EC3GOKCC.js";import{b as oe,c as pe}from"./chunk-4F5TWOC5.js";import{c as Z}from"./chunk-54CMHXEM.js";import{n as le}from"./chunk-KJXJE53Y.js";import"./chunk-FAJZECQR.js";import"./chunk-ZQZNA72T.js";import{a as K}from"./chunk-BBGB7I4B.js";import"./chunk-F5X5MWHG.js";import{b as ae}from"./chunk-B3N76L3I.js";import"./chunk-H6RLFBCZ.js";import"./chunk-SDDPQVXQ.js";import{a as ne,b as re}from"./chunk-NR6MRK3T.js";import{A as ee,F as te,Q as ie,p as Q,s as X}from"./chunk-XVYRBDMB.js";import{$b as N,Ac as J,C as V,Fa as $,Fb as R,Gb as f,Ha as p,Hb as O,Ib as T,Kb as j,Lb as H,M,Mb as W,Ob as z,P as A,Sa as L,W as B,Wb as h,Xa as u,Xb as C,_ as c,ab as m,d as U,fa as x,ga as I,lb as o,mb as a,ob as _,pb as d,q as v,qc as Y,rb as b,rc as q,ub as S,va as E,vb as s,wc as G,y as D}from"./chunk-FBCQBCW3.js";import{a as P,b as F}from"./chunk-K2H6WANG.js";var k=(()=>{class i{constructor(){this.domain=`https://${localStorage.getItem("Domain")}`,this.http=c(X),this.migrateConfigService=c(w)}getImageUrls$(e={PageNumber:1,RowCount:100}){return this.migrateConfigService.getPageConfig$().pipe(A(t=>(e.RowCount=t.RowCount,this.http.post(`${this.domain}/api/image/SupplierImage`,e))))}migrate(e){return this.http.post(`${this.domain}/api/cloudflare/migrate/SupplierImage`,{Images:e})}migrateAsync(e){let t=`${localStorage.getItem("Domain")}`,n=F(P({},e),{Host:t});return this.http.post("/api/MigrateImage/SupplierImage",n)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=B({token:i,factory:i.\u0275fac})}}return i})();function _e(i,g){if(i&1){let e=b();_(0),o(1,"button",13),S("click",function(){x(e);let n=s().ngIf,r=s();return I(r.onMigrate(n))}),f(2," Migrate "),a(),d()}}function de(i,g){if(i&1){let e=b();o(0,"button",14),S("click",function(){x(e);let n=s(2);return I(n.onMigrateAsync())}),f(1," Migrate Async "),a()}}function fe(i,g){if(i&1&&(_(0),u(1,_e,3,0,"ng-container",12)(2,de,2,0,"ng-template",null,0,N),d()),i&2){let e=R(3),t=s();p(),m("ngIf",t.totalSelected()>0)("ngIfElse",e)}}function he(i,g){if(i&1){let e=b();_(0),o(1,"mat-checkbox",15),S("change",function(n){let r=x(e).ngIf,l=s();return I(l.onSelectAll(n,r))}),a(),d()}}function Ce(i,g){i&1&&(_(0),o(1,"th"),f(2,"New URL"),a(),d())}function Me(i,g){if(i&1&&(_(0),o(1,"div",18)(2,"span",19),f(3),a()(),d()),i&2){let e=s(2).$implicit;p(3),O(e.Message)}}function Se(i,g){if(i&1&&(o(0,"a",17),f(1),a()),i&2){let e=s(2).$implicit;m("href",e.CloudflareURL,$),p(),T(" ",e.CloudflareURL," ")}}function xe(i,g){if(i&1&&(_(0),o(1,"td"),u(2,Me,4,1,"ng-container",12)(3,Se,2,2,"ng-template",null,1,N),a(),d()),i&2){let e=R(4),t=s().$implicit;p(2),m("ngIf",t.Message)("ngIfElse",e)}}function Ie(i,g){if(i&1){let e=b();_(0),o(1,"tr")(2,"td")(3,"mat-checkbox",16),W("ngModelChange",function(n){let r=x(e).$implicit;return H(r.selected,n)||(r.selected=n),I(n)}),S("ngModelChange",function(){let n=x(e).ngForOf,r=s();return I(r.onSelect(n))}),a()(),o(4,"td")(5,"a",17),f(6),a()(),u(7,xe,5,2,"ng-container",3),h(8,"async"),a(),d()}if(i&2){let e=g.$implicit,t=s();p(3),j("ngModel",e.selected),p(2),m("href",e.URL,$),p(),T(" ",e.URL," "),p(),m("ngIf",C(8,4,t.onMigrate$)==!0)}}var Xe=(()=>{class i{constructor(){this.supplierImageMigrate=c(k),this.migrateConfig=c(w),this.supplierImageMigrate$=this.supplierImageMigrate.getImageUrls$().pipe(M(1)),this._onMigrate=new U(!1),this.onMigrate$=this._onMigrate.asObservable(),this.toastr=c(Q),this.dialog=c(Z),this.dateFilter={},this.totalSelected=E(0),this.rowCount$=this.migrateConfig.pageConfig$.pipe(v(e=>e.RowCount),M(1)),this.pageNumber=E(1)}onMigrate(e){let t=e.Data.filter(r=>r.selected);if(t.length===0){this.toastr.error("Please select at least one image to migrate.","Error");return}let n=this.supplierImageMigrate.migrate(t).pipe(v(r=>(this._onMigrate.next(!0),this.totalSelected.set(0),e.Data=e.Data.map(l=>{l.selected=!1;let y=r.find(ce=>ce.Path===l.Path);return l.CloudflareURL=y?.URL,l.Message=y?.Message,l}),e)));this.supplierImageMigrate$=n.pipe(M(1))}onSelectAll(e,t){t=t.map(n=>(n.selected=e.checked,n)),this.totalSelected.set(t.filter(n=>n.selected)?.length)}onSelect(e){this.totalSelected.set(e.filter(t=>t.selected)?.length)}onMigrateAsync(){this.dialog.open(ge,{data:{showDateFilter:!1}}).afterClosed().pipe(D(e=>K.IsNotEmpty(e)),V(e=>{let t={PageNumber:e.pageNumber,RowCount:e.rowCount};return this.supplierImageMigrate.migrateAsync(t)})).subscribe(e=>{this.toastr.warning(e.message,"Migrate In Progress",{toastClass:"ngx-toastr toast-waiting"}),this.supplierImageMigrate$=this.supplierImageMigrate.getImageUrls$().pipe(M(1))})}onFilter(){let e={PageNumber:this.pageNumber(),From:this.dateFilter.from,To:this.dateFilter.to};this.supplierImageMigrate$=this.supplierImageMigrate.getImageUrls$(e).pipe(M(1))}onPagination(e){this.pageNumber.update(()=>e.pageIndex+1);let t={PageNumber:this.pageNumber()};this.supplierImageMigrate$=this.supplierImageMigrate.getImageUrls$(t).pipe(M(1))}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=L({type:i,selectors:[["app-supplier-image"]],features:[z([k])],decls:24,vars:21,consts:[["ASYNC",""],["SHOW_URL",""],["Title","Migrate Supplier Image",3,"onSubmit","hideSearchBox","hideSearchDropdown"],[4,"ngIf"],[1,"container-fluid"],[1,"row"],[1,"col-12"],[1,"table","mt-8"],[1,"thead-light"],[2,"width","5px"],[4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],[4,"ngIf","ngIfElse"],["type","button",1,"btn","btn-success","shadow","rounded",3,"click"],["type","button",1,"btn","btn-success","shadow","rounded","me-3",3,"click"],["color","primary",3,"change"],["color","primary",3,"ngModelChange","ngModel"],["target","_blank",1,"text-break",3,"href"],[1,"text-break"],[1,"text-danger"]],template:function(t,n){if(t&1&&(o(0,"mainpanel",2),S("onSubmit",function(){return n.onFilter()}),o(1,"actions"),u(2,fe,4,2,"ng-container",3),h(3,"async"),a(),o(4,"content")(5,"div",4)(6,"div",5)(7,"div",6)(8,"table",7)(9,"thead",8)(10,"tr")(11,"th",9),u(12,he,2,0,"ng-container",3),h(13,"async"),a(),o(14,"th"),f(15,"Old URL"),a(),u(16,Ce,3,0,"ng-container",3),h(17,"async"),a()(),o(18,"tbody"),u(19,Ie,9,6,"ng-container",10),h(20,"async"),a()(),o(21,"mat-paginator",11),h(22,"async"),h(23,"async"),S("page",function(l){return n.onPagination(l)}),a()()()()()()),t&2){let r,l,y;m("hideSearchBox",!0)("hideSearchDropdown",!0),p(2),m("ngIf",C(3,9,n.supplierImageMigrate$)),p(10),m("ngIf",(r=C(13,11,n.supplierImageMigrate$))==null?null:r.Data),p(4),m("ngIf",C(17,13,n.onMigrate$)==!0),p(3),m("ngForOf",(l=C(20,15,n.supplierImageMigrate$))==null?null:l.Data),p(2),m("length",(y=C(22,17,n.supplierImageMigrate$))==null?null:y.Count)("pageSize",C(23,19,n.rowCount$))("pageIndex",n.pageNumber()==0?0:n.pageNumber()-1)}},dependencies:[J,Y,q,G,re,ne,ae,pe,oe,se,me,ie,ee,te,le],encapsulation:2})}}return i})();export{Xe as SupplierMigrateComponent};
1
+ import{a as w,b as me,c as se,d as ge}from"./chunk-OMYEJEEK.js";import"./chunk-Z3VQJYK6.js";import{b as oe,c as pe}from"./chunk-MREPLRUY.js";import"./chunk-F5X5MWHG.js";import{b as ae}from"./chunk-B3N76L3I.js";import{c as Z}from"./chunk-54CMHXEM.js";import{n as le}from"./chunk-KJXJE53Y.js";import"./chunk-FAJZECQR.js";import"./chunk-H6RLFBCZ.js";import"./chunk-SDDPQVXQ.js";import"./chunk-ZQZNA72T.js";import{a as K}from"./chunk-BBGB7I4B.js";import{a as ne,b as re}from"./chunk-NR6MRK3T.js";import{A as ee,F as te,Q as ie,p as Q,s as X}from"./chunk-XVYRBDMB.js";import{$b as N,Ac as J,C as V,Fa as $,Fb as R,Gb as f,Ha as p,Hb as O,Ib as T,Kb as j,Lb as H,M,Mb as W,Ob as z,P as A,Sa as L,W as B,Wb as h,Xa as u,Xb as C,_ as c,ab as m,d as U,fa as x,ga as I,lb as o,mb as a,ob as _,pb as d,q as v,qc as Y,rb as b,rc as q,ub as S,va as E,vb as s,wc as G,y as D}from"./chunk-FBCQBCW3.js";import{a as P,b as F}from"./chunk-K2H6WANG.js";var k=(()=>{class i{constructor(){this.domain=`https://${localStorage.getItem("Domain")}`,this.http=c(X),this.migrateConfigService=c(w)}getImageUrls$(e={PageNumber:1,RowCount:100}){return this.migrateConfigService.getPageConfig$().pipe(A(t=>(e.RowCount=t.RowCount,this.http.post(`${this.domain}/api/image/SupplierImage`,e))))}migrate(e){return this.http.post(`${this.domain}/api/cloudflare/migrate/SupplierImage`,{Images:e})}migrateAsync(e){let t=`${localStorage.getItem("Domain")}`,n=F(P({},e),{Host:t});return this.http.post("/api/MigrateImage/SupplierImage",n)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=B({token:i,factory:i.\u0275fac})}}return i})();function _e(i,g){if(i&1){let e=b();_(0),o(1,"button",13),S("click",function(){x(e);let n=s().ngIf,r=s();return I(r.onMigrate(n))}),f(2," Migrate "),a(),d()}}function de(i,g){if(i&1){let e=b();o(0,"button",14),S("click",function(){x(e);let n=s(2);return I(n.onMigrateAsync())}),f(1," Migrate Async "),a()}}function fe(i,g){if(i&1&&(_(0),u(1,_e,3,0,"ng-container",12)(2,de,2,0,"ng-template",null,0,N),d()),i&2){let e=R(3),t=s();p(),m("ngIf",t.totalSelected()>0)("ngIfElse",e)}}function he(i,g){if(i&1){let e=b();_(0),o(1,"mat-checkbox",15),S("change",function(n){let r=x(e).ngIf,l=s();return I(l.onSelectAll(n,r))}),a(),d()}}function Ce(i,g){i&1&&(_(0),o(1,"th"),f(2,"New URL"),a(),d())}function Me(i,g){if(i&1&&(_(0),o(1,"div",18)(2,"span",19),f(3),a()(),d()),i&2){let e=s(2).$implicit;p(3),O(e.Message)}}function Se(i,g){if(i&1&&(o(0,"a",17),f(1),a()),i&2){let e=s(2).$implicit;m("href",e.CloudflareURL,$),p(),T(" ",e.CloudflareURL," ")}}function xe(i,g){if(i&1&&(_(0),o(1,"td"),u(2,Me,4,1,"ng-container",12)(3,Se,2,2,"ng-template",null,1,N),a(),d()),i&2){let e=R(4),t=s().$implicit;p(2),m("ngIf",t.Message)("ngIfElse",e)}}function Ie(i,g){if(i&1){let e=b();_(0),o(1,"tr")(2,"td")(3,"mat-checkbox",16),W("ngModelChange",function(n){let r=x(e).$implicit;return H(r.selected,n)||(r.selected=n),I(n)}),S("ngModelChange",function(){let n=x(e).ngForOf,r=s();return I(r.onSelect(n))}),a()(),o(4,"td")(5,"a",17),f(6),a()(),u(7,xe,5,2,"ng-container",3),h(8,"async"),a(),d()}if(i&2){let e=g.$implicit,t=s();p(3),j("ngModel",e.selected),p(2),m("href",e.URL,$),p(),T(" ",e.URL," "),p(),m("ngIf",C(8,4,t.onMigrate$)==!0)}}var Xe=(()=>{class i{constructor(){this.supplierImageMigrate=c(k),this.migrateConfig=c(w),this.supplierImageMigrate$=this.supplierImageMigrate.getImageUrls$().pipe(M(1)),this._onMigrate=new U(!1),this.onMigrate$=this._onMigrate.asObservable(),this.toastr=c(Q),this.dialog=c(Z),this.dateFilter={},this.totalSelected=E(0),this.rowCount$=this.migrateConfig.pageConfig$.pipe(v(e=>e.RowCount),M(1)),this.pageNumber=E(1)}onMigrate(e){let t=e.Data.filter(r=>r.selected);if(t.length===0){this.toastr.error("Please select at least one image to migrate.","Error");return}let n=this.supplierImageMigrate.migrate(t).pipe(v(r=>(this._onMigrate.next(!0),this.totalSelected.set(0),e.Data=e.Data.map(l=>{l.selected=!1;let y=r.find(ce=>ce.Path===l.Path);return l.CloudflareURL=y?.URL,l.Message=y?.Message,l}),e)));this.supplierImageMigrate$=n.pipe(M(1))}onSelectAll(e,t){t=t.map(n=>(n.selected=e.checked,n)),this.totalSelected.set(t.filter(n=>n.selected)?.length)}onSelect(e){this.totalSelected.set(e.filter(t=>t.selected)?.length)}onMigrateAsync(){this.dialog.open(ge,{data:{showDateFilter:!1}}).afterClosed().pipe(D(e=>K.IsNotEmpty(e)),V(e=>{let t={PageNumber:e.pageNumber,RowCount:e.rowCount};return this.supplierImageMigrate.migrateAsync(t)})).subscribe(e=>{this.toastr.warning(e.message,"Migrate In Progress",{toastClass:"ngx-toastr toast-waiting"}),this.supplierImageMigrate$=this.supplierImageMigrate.getImageUrls$().pipe(M(1))})}onFilter(){let e={PageNumber:this.pageNumber(),From:this.dateFilter.from,To:this.dateFilter.to};this.supplierImageMigrate$=this.supplierImageMigrate.getImageUrls$(e).pipe(M(1))}onPagination(e){this.pageNumber.update(()=>e.pageIndex+1);let t={PageNumber:this.pageNumber()};this.supplierImageMigrate$=this.supplierImageMigrate.getImageUrls$(t).pipe(M(1))}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=L({type:i,selectors:[["app-supplier-image"]],features:[z([k])],decls:24,vars:21,consts:[["ASYNC",""],["SHOW_URL",""],["Title","Migrate Supplier Image",3,"onSubmit","hideSearchBox","hideSearchDropdown"],[4,"ngIf"],[1,"container-fluid"],[1,"row"],[1,"col-12"],[1,"table","mt-8"],[1,"thead-light"],[2,"width","5px"],[4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],[4,"ngIf","ngIfElse"],["type","button",1,"btn","btn-success","shadow","rounded",3,"click"],["type","button",1,"btn","btn-success","shadow","rounded","me-3",3,"click"],["color","primary",3,"change"],["color","primary",3,"ngModelChange","ngModel"],["target","_blank",1,"text-break",3,"href"],[1,"text-break"],[1,"text-danger"]],template:function(t,n){if(t&1&&(o(0,"mainpanel",2),S("onSubmit",function(){return n.onFilter()}),o(1,"actions"),u(2,fe,4,2,"ng-container",3),h(3,"async"),a(),o(4,"content")(5,"div",4)(6,"div",5)(7,"div",6)(8,"table",7)(9,"thead",8)(10,"tr")(11,"th",9),u(12,he,2,0,"ng-container",3),h(13,"async"),a(),o(14,"th"),f(15,"Old URL"),a(),u(16,Ce,3,0,"ng-container",3),h(17,"async"),a()(),o(18,"tbody"),u(19,Ie,9,6,"ng-container",10),h(20,"async"),a()(),o(21,"mat-paginator",11),h(22,"async"),h(23,"async"),S("page",function(l){return n.onPagination(l)}),a()()()()()()),t&2){let r,l,y;m("hideSearchBox",!0)("hideSearchDropdown",!0),p(2),m("ngIf",C(3,9,n.supplierImageMigrate$)),p(10),m("ngIf",(r=C(13,11,n.supplierImageMigrate$))==null?null:r.Data),p(4),m("ngIf",C(17,13,n.onMigrate$)==!0),p(3),m("ngForOf",(l=C(20,15,n.supplierImageMigrate$))==null?null:l.Data),p(2),m("length",(y=C(22,17,n.supplierImageMigrate$))==null?null:y.Count)("pageSize",C(23,19,n.rowCount$))("pageIndex",n.pageNumber()==0?0:n.pageNumber()-1)}},dependencies:[J,Y,q,G,re,ne,ae,pe,oe,se,me,ie,ee,te,le],encapsulation:2})}}return i})();export{Xe as SupplierMigrateComponent};
@@ -0,0 +1 @@
1
+ import{b as L}from"./chunk-FPASOMCI.js";import{a as R,b as $}from"./chunk-HKZ4CRQX.js";import{m as F,n as N}from"./chunk-KJXJE53Y.js";import"./chunk-FAJZECQR.js";import"./chunk-H6RLFBCZ.js";import"./chunk-SDDPQVXQ.js";import"./chunk-BBGB7I4B.js";import{a as A}from"./chunk-2C225VYE.js";import{a as j,b as I}from"./chunk-NR6MRK3T.js";import{A as P,F as k,Q as E,p as M,s as w}from"./chunk-XVYRBDMB.js";import{Gb as d,Ha as p,Kb as O,Lb as b,M as h,Mb as v,Ob as y,Sa as g,W as C,Wb as D,Xb as T,_ as a,ab as m,lb as i,mb as n,nb as S,ub as f,va as c,wc as _}from"./chunk-FBCQBCW3.js";import"./chunk-K2H6WANG.js";var u=(()=>{class t{constructor(){this.httpService=a(w),this.url=`https://${localStorage.getItem("Domain")}/API/`}recalculateTransferOrderCost(e,o,r){let l={From:e,To:o,ListIDs:r};return this.httpService.post(`${this.url}tools/UnitCost/TransferOrderItemCost`,l)}getOutletList(){return this.httpService.get(`${this.url}Outlet/SelectOptions/2`).pipe(h(1))}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275prov=C({token:t,factory:t.\u0275fac})}}return t})();var se=(()=>{class t{constructor(){this.transferOrderCostService=a(u),this.toastr=a(M),this.outletList$=this.transferOrderCostService.getOutletList(),this.from=c(null),this.to=c(null),this.selectedOutlets=c([]),this.costDesc=R.TransferOrder}onDateChange(e){this.from.set(e.from),this.to.set(e.to)}onProcess(){if(!this.from()||!this.to()||this.selectedOutlets().length===0){this.toastr.error("Please select a date range and an outlet.","Error");return}this.transferOrderCostService.recalculateTransferOrderCost(this.from(),this.to(),this.selectedOutlets()).subscribe({next:e=>{e.Affected>0?this.toastr.success(`${e.Affected} job orders successfully recalculated. ${e.NotAffected} job orders not affected.`,"Success"):this.toastr.info("No job orders were affected.","Information")}})}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=g({type:t,selectors:[["app-transfer-order-cost"]],features:[y([u])],decls:16,vars:9,consts:[["Title","Difference Variant Cost VS Composite Cost",3,"hideSearchBox","hideSearchDropdown"],["type","button",1,"btn","btn-success","shadow","rounded",3,"click"],[1,"container-fluid"],[3,"unitCostDesc"],[1,"d-inline","ms-10"],[1,"mb-2"],["bindLabel","v","bindValue","k","placeholder","Select an Outlet",2,"width","250px",3,"ngModelChange","clearable","items","multiple","ngModel"],[1,"mb-2","mt-8"],[2,"width","250px"],[1,"net-sales-filter",3,"dateChange"]],template:function(o,r){o&1&&(i(0,"mainpanel",0)(1,"actions")(2,"button",1),f("click",function(){return r.onProcess()}),d(3," Process "),n()(),i(4,"content")(5,"div",2),S(6,"unit-cost-description",3),i(7,"div",4)(8,"h6",5),d(9,"Outlet"),n(),i(10,"ng-select",6),D(11,"async"),v("ngModelChange",function(s){return b(r.selectedOutlets,s)||(r.selectedOutlets=s),s}),n(),i(12,"h6",7),d(13,"From - To"),n(),i(14,"div",8)(15,"app-datepicker-range",9),f("dateChange",function(s){return r.onDateChange(s)}),n()()()()()()),o&2&&(m("hideSearchBox",!0)("hideSearchDropdown",!0),p(6),m("unitCostDesc",r.costDesc),p(4),m("clearable",!0)("items",T(11,7,r.outletList$))("multiple",!0),O("ngModel",r.selectedOutlets))},dependencies:[I,j,L,E,P,k,_,A,N,F,$],encapsulation:2})}}return t})();export{se as TransferOrderCostComponent};