marketplacepos 2.4.5 → 2.4.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/Marketplace/162.607e0d0557cd1e06.js +1 -0
  2. package/Marketplace/174.981a3e729681507b.js +1 -0
  3. package/Marketplace/180.bfed0f08b5cdbbde.js +1 -0
  4. package/Marketplace/25.5e00713dbd080b64.js +1 -0
  5. package/Marketplace/32.9c83cc1dfc19e37d.js +1 -0
  6. package/Marketplace/360.4fa1f449dc516500.js +1 -0
  7. package/Marketplace/369.22148155f90d64b2.js +1 -0
  8. package/Marketplace/397.727785281e7927cb.js +1 -0
  9. package/Marketplace/3rdpartylicenses.txt +28 -2
  10. package/Marketplace/455.fc7663306b753727.js +1 -0
  11. package/Marketplace/463.7140b32660c473a4.js +1 -0
  12. package/Marketplace/512.96a1a3c8c51a8727.js +1 -0
  13. package/Marketplace/516.f335756d88de781a.js +1 -0
  14. package/Marketplace/716.65e3e9a36c3e8be6.js +1 -0
  15. package/Marketplace/717.c3d108362a36e597.js +1 -0
  16. package/Marketplace/785.e0040d021febffb1.js +1 -0
  17. package/Marketplace/832.6082371d3ebb95a0.js +1 -0
  18. package/Marketplace/874.6ae77583afef7f90.js +1 -0
  19. package/Marketplace/assets/lbd/_sidebar-and-main-panel.scss +1 -1
  20. package/Marketplace/assets/stepper-custom.scss +33 -0
  21. package/Marketplace/assets/version-adjustment-v5.scss +10 -1
  22. package/Marketplace/common.3f5874655db24424.js +1 -0
  23. package/Marketplace/index.html +2 -2
  24. package/Marketplace/main.195197d9958646d1.js +1 -0
  25. package/Marketplace/runtime.d61181a09cffdcb7.js +1 -0
  26. package/Marketplace/{styles.ab4c60b3cc2298c3.css → styles.dff58ae3c0783953.css} +2 -2
  27. package/package.json +1 -1
  28. package/Marketplace/162.4ce4550bb805d5d4.js +0 -1
  29. package/Marketplace/171.9cd91ffa365b9491.js +0 -1
  30. package/Marketplace/174.e214431f31fd131d.js +0 -1
  31. package/Marketplace/25.ad4f583264f99556.js +0 -1
  32. package/Marketplace/334.fca544ca6d7e11d3.js +0 -1
  33. package/Marketplace/360.479b6dc19c3aedfd.js +0 -1
  34. package/Marketplace/387.ef404fc903278a1c.js +0 -1
  35. package/Marketplace/402.f385d64daee6049e.js +0 -1
  36. package/Marketplace/458.a9aae1853888dd58.js +0 -1
  37. package/Marketplace/466.2e9f76621dd59e88.js +0 -1
  38. package/Marketplace/512.84e77b4b4a7a1db7.js +0 -1
  39. package/Marketplace/516.71620076f01c2cd7.js +0 -1
  40. package/Marketplace/61.481724edf2d23475.js +0 -1
  41. package/Marketplace/717.5259a4803cce95ab.js +0 -1
  42. package/Marketplace/832.40bafce037098f88.js +0 -1
  43. package/Marketplace/874.d45d1026769d75d1.js +0 -1
  44. package/Marketplace/common.1acc3df88ef73d5d.js +0 -1
  45. package/Marketplace/main.2fa426747cc66a26.js +0 -1
  46. package/Marketplace/runtime.22e3909f138762cb.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[162],{9162:(vn,x,s)=>{s.r(x),s.d(x,{InventoryModule:()=>xn});var c=s(6895),n=s(4650),m=s(8252),v=s(7398);let D=(()=>{class e{constructor(){this.inventoryTabs=[{Title:"Single Channel Comparison",Url:"/menu/inventory/bychannel"},{Title:"Multi Channel Comparison",Url:"/menu/inventory/pos"}]}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=n.Xpm({type:e,selectors:[["app-inventory"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(t,i){1&t&&(n.TgZ(0,"nav",0)(1,"div",1)(2,"div"),n._UZ(3,"nav-tab",2),n.qZA()()(),n._UZ(4,"router-outlet")),2&t&&(n.xp6(3),n.Q6J("Tabs",i.inventoryTabs))},dependencies:[m.lC,v.e]}),e})();var I=s(8231),P=s(6304),b=s(8505),d=s(9300),u=s(3154),_=s(8705),S=s(1318),y=s(7185),T=s(5412),Z=s(7287),F=s(6082),C=s(7481),w=s(488);function J(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"button",17),n.NdJ("click",function(){n.CHM(t);const a=n.oxw(3);return n.KtG(a.openScanDialog())}),n._UZ(1,"i",18),n._uU(2," Scan Channel "),n.qZA()}}function U(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"button",19),n.NdJ("click",function(){n.CHM(t);const a=n.oxw().ngIf,o=n.oxw(2);return n.KtG(o.onUpdateItems(a))}),n._UZ(1,"i",20),n._uU(2," Update "),n.qZA()}}function k(e,l){if(1&e&&(n.TgZ(0,"actions")(1,"div",14)(2,"div"),n.YNc(3,J,3,0,"button",15),n.YNc(4,U,3,0,"button",16),n.qZA()()()),2&e){const t=l.ngIf,i=n.oxw(2);n.xp6(3),n.Q6J("ngIf",!i.productService.hasSelectionVariant(t)),n.xp6(1),n.Q6J("ngIf",i.productService.hasSelectionVariant(t))}}function L(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"app-table",21),n.NdJ("onToggle",function(a){n.CHM(t);const o=n.oxw(2);return n.KtG(o.onShowDifferenceStock(a))})("onSubmit",function(a){const r=n.CHM(t).ngIf,p=n.oxw(2);return n.KtG(p.updateStockByVariant(a,r))}),n.qZA()}if(2&e){const t=l.ngIf,i=n.oxw(2);n.Q6J("data",t)("channel",i.channelOptions)("showProductToggle",!0)("filter",i.searchFilter)}}function O(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"span",22),n.NdJ("click",function(){n.CHM(t);const a=n.oxw(2);return n.KtG(a.getRowCount())}),n.TgZ(1,"i",23),n._uU(2,"?"),n.qZA()()}}function Q(e,l){if(1&e&&(n.TgZ(0,"span"),n._uU(1),n.ALo(2,"number"),n.qZA()),2&e){const t=l.ngIf;n.xp6(1),n.Oqu(n.lcZ(2,1,t))}}function Y(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"a",24),n.NdJ("click",function(){n.CHM(t);const a=n.oxw(2);return n.KtG(a.nextPage())}),n._UZ(1,"i",25),n._uU(2," Next"),n.qZA()}}function E(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"a",26),n.NdJ("click",function(){n.CHM(t);const a=n.oxw(2);return n.KtG(a.getAllData())}),n._UZ(1,"i",27),n._uU(2," Last"),n.qZA()}}function V(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"mainpanel",1),n.NdJ("onSubmit",function(a){n.CHM(t);const o=n.oxw();return n.KtG(o.onSearch(a))}),n.YNc(1,k,5,2,"actions",2),n.ALo(2,"async"),n.TgZ(3,"content")(4,"div",3)(5,"div",4)(6,"div",5),n.YNc(7,L,1,4,"app-table",6),n.ALo(8,"async"),n.ynx(9),n.TgZ(10,"div",7)(11,"div",8)(12,"div",9),n._uU(13),n.ALo(14,"number"),n.ALo(15,"async"),n.YNc(16,O,3,0,"span",10),n.YNc(17,Q,3,3,"span",2),n.ALo(18,"async"),n._uU(19),n.qZA()(),n.TgZ(20,"div",11),n.YNc(21,Y,3,0,"a",12),n.YNc(22,E,3,0,"a",13),n.qZA()(),n.BQk(),n.qZA()()()()()}if(2&e){const t=n.oxw();let i;n.Q6J("pageData",t.pageData)("hideSearchBox",!1)("hideSearchDropdown",!0)("textButton","Search"),n.xp6(1),n.Q6J("ngIf",n.lcZ(2,12,t.paginationService.data$)),n.xp6(6),n.Q6J("ngIf",n.lcZ(8,14,t.paginationService.data$)),n.xp6(6),n.hij(" Showing 1 - ",n.lcZ(14,16,null==(i=n.lcZ(15,18,t.paginationService.data$))?null:i.length)," of "),n.xp6(3),n.Q6J("ngIf",t.paginationService.hideCount),n.xp6(1),n.Q6J("ngIf",n.lcZ(18,20,!t.paginationService.hideCount&&t.allDataCount$)),n.xp6(2),n.hij(" records ~ ",t.paginationService.footerPageNumber," Page "),n.xp6(2),n.Q6J("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage),n.xp6(1),n.Q6J("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage)}}let q=(()=>{class e{constructor(t,i,a,o,r){this.http=t,this.toastr=i,this.dialog=a,this.paginationService=o,this.productService=r,this.loaderEndpoint="InventoryLoader/GetMultipleInventoryComparison",this.dataEndpoint="Inventory/GetMultipleChannelComparison",this.allDataCountEndpoint="Inventory/GetMultipleChannelComparisonRowCount",this.filterTypeOptions=[{Key:1,Value:"All"},{Key:3,Value:"Difference"}],this.pageData={Title:"Inventory",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory/pos",Active:!0},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!1}]}}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.dataEndpoint,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`,{}).pipe((0,b.b)(t=>{this.channelOptions=t.Options.Channel,t.Filter={PageNumber:t.Filter.PageNumber,filterModel:_.v.ALL,RowCount:t.Filter.PageSize,HiddenIPOSInventory:t.Filter.HiddenIPOSInventory},this.searchFilter=t.Filter,this.paginationService.resetToFirstPage(this.searchFilter)}))}onSearch(t){this.searchFilter.text=t,this.paginationService.resetToFirstPage(this.searchFilter)}updateStock(t,i){let a=this.productService.selectedVariantProduct(t);if(a.length>0){let r=a.map(h=>({ID:h.ID,Code:h.Code,Inventory:h.Inventory})),p={ListChannelID:i.filter(h=>h.selected).map(h=>h.ID),List:r};this.http.post("/api/Inventory/UpdateChannel",p).subscribe(h=>{this.paginationService.resetToFirstPage(this.searchFilter),this.toastr.success("Successfully updated "+p.List.length+" variants in "+p.ListChannelID.length+" channels","Success")})}}openScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(I.j,{data:{filter:t,channelOptions:this.channelOptions},width:"40%"}).afterClosed().pipe((0,d.h)(a=>u.g.IsNotEmpty(a))).subscribe(a=>{this.searchFilter.ScanFull=a.ScanFull,this.searchFilter.ChannelID=a.ChannelID,this.searchFilter.UpdatedProduct=a.UpdatedProduct,this.searchFilter.Async=a.Async,this.scanAll()})}scanAll(){this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(t=>{if(this.searchFilter.Async)this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"});else{let i=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.successToastrScanAllProduct(t,i,!this.searchFilter.UpdatedProduct),this.initPageLoader()}this.searchFilter.ChannelID=u.g.GuidEMpty})}updateStockByVariant(t,i){let a={ID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariantID:t.ChannelVariationID,NewQuantity:parseFloat(t.Inventory),VariantID:t.ID,SKU:t.Sku};this.http.post("/api/Inventory/UpdateQuantityByItem",a).subscribe(o=>{let r=this.productService.findChannelById(a.ID,this.channelOptions);this.toastr.success("Successfully updated "+t.ItemName+"("+t.VarName+") inventory in "+r.Name+" to "+a.NewQuantity,"Success")})}onShowDifferenceStock(t){this.searchFilter.filterModel=t?_.v.DIFFERENCE:_.v.ALL,this.paginationService.resetToFirstPage(this.searchFilter)}onUpdateItems(t){const i=this.productService.selectedVariantProduct(t);this.dialog.open(P.j,{data:{selectedItems:i,channels:JSON.parse(JSON.stringify(this.channelOptions))},width:"40%"}).afterClosed().pipe((0,d.h)(a=>u.g.IsNotEmpty(a))).subscribe(a=>{this.updateStock(t,a)})}getRowCount(){this.paginationService.hideCount=!1,this.allDataCount$=this.http.post(`/API/${this.allDataCountEndpoint}`,{text:this.searchFilter.text})}nextPage(){this.paginationService.onNextPage(this.searchFilter)}getAllData(){this.http.post(`/API/${this.allDataCountEndpoint}`,{}).subscribe({next:t=>{this.searchFilter.PageNumber=1,this.paginationService.getAllData(this.searchFilter,t)}})}ngOnDestroy(){this.paginationService.destroy()}}return e.\u0275fac=function(t){return new(t||e)(n.Y36(S.O),n.Y36(y._W),n.Y36(T.uw),n.Y36(Z.b),n.Y36(F.M))},e.\u0275cmp=n.Xpm({type:e,selectors:[["app-multi-channel-comparison"]],decls:2,vars:3,consts:[["headerTitle","Inventory Comparison",3,"pageData","hideSearchBox","hideSearchDropdown","textButton","onSubmit",4,"ngIf"],["headerTitle","Inventory Comparison",3,"pageData","hideSearchBox","hideSearchDropdown","textButton","onSubmit"],[4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["table","inventory",3,"data","channel","showProductToggle","filter","onToggle","onSubmit",4,"ngIf"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load all products",3,"click",4,"ngIf"],[1,"d-flex"],["type","button","data-cy","scanInPos","class","btn btn-outline-secondary shadow rounded me-3",3,"click",4,"ngIf"],["type","button","class","btn btn-success shadow-sm rounded me-3",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3",3,"click"],[1,"fas","fa-chevron-circle-up"],["table","inventory",3,"data","channel","showProductToggle","filter","onToggle","onSubmit"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(t,i){1&t&&(n.YNc(0,V,23,22,"mainpanel",0),n.ALo(1,"async")),2&t&&n.Q6J("ngIf",n.lcZ(1,1,i.loader$))},dependencies:[c.O5,C.p,w.a,c.Ov,c.JJ],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]}),e})();var $=s(7945),K=s(1739),g=s(4006),f=s(8796),A=s(455),M=s(266);function G(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"button",32),n.NdJ("click",function(){n.CHM(t);const a=n.oxw(2).ngIf,o=n.oxw();return n.KtG(o.openScanDialog(a))}),n._UZ(1,"i",33),n._uU(2," Scan Channel "),n.qZA()}}function H(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"button",34),n.NdJ("click",function(){n.CHM(t);const a=n.oxw().ngIf,o=n.oxw(2);return n.KtG(o.updateStock(a))}),n._UZ(1,"i",35),n._uU(2," Update"),n.qZA()}}function R(e,l){if(1&e&&(n.TgZ(0,"div"),n.YNc(1,G,3,0,"button",30),n.YNc(2,H,3,0,"button",31),n.qZA()),2&e){const t=l.ngIf,i=n.oxw(2);n.xp6(1),n.Q6J("ngIf",!i.productService.hasSelectionVariant(t)),n.xp6(1),n.Q6J("ngIf",i.productService.hasSelectionVariant(t))}}function B(e,l){1&e&&(n.TgZ(0,"div",36)(1,"span"),n._uU(2," showing only different stock, please press next to populate more data "),n.qZA()())}function j(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"th")(1,"input",37),n.NdJ("ngModelChange",function(a){n.CHM(t);const o=n.oxw(2);return n.KtG(o.checkboxState=a)})("ngModelChange",function(){const o=n.CHM(t).ngIf,r=n.oxw(2);return n.KtG(r.onCheckboxStateChange(o))}),n.qZA()()}if(2&e){const t=n.oxw(2);n.xp6(1),n.Q6J("ngModel",t.checkboxState)}}function z(e,l){if(1&e&&(n.TgZ(0,"ng-option",38),n._UZ(1,"img",39),n._uU(2),n.qZA()),2&e){const t=l.$implicit;n.Q6J("value",t.ID),n.xp6(1),n.s9C("src",t.Img,n.LSH),n.xp6(1),n.hij("",t.Name," ")}}function W(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"input",58),n.NdJ("ngModelChange",function(a){n.CHM(t);const o=n.oxw(3).$implicit;return n.KtG(o.selected=a)})("ngModelChange",function(){n.CHM(t);const a=n.oxw(3).$implicit,o=n.oxw(2);return n.KtG(o.onCheckboxStateProduct(a))}),n.qZA()}if(2&e){const t=n.oxw(3).$implicit;n.Q6J("ngModel",t.selected)}}function X(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"img",59),n.NdJ("click",function(a){n.CHM(t);const o=n.oxw(3).$implicit,r=n.oxw(2);return n.KtG(r.onZoomImage(a,null==o?null:o.ImageUrl))}),n.qZA()}if(2&e){const t=n.oxw(3).$implicit;n.s9C("src",null==t?null:t.ThumbnailUrl,n.LSH)}}function nn(e,l){1&e&&n._UZ(0,"img",60)}function tn(e,l){if(1&e&&(n.ynx(0),n.TgZ(1,"td",51)(2,"div",52),n.YNc(3,W,1,1,"input",53),n.YNc(4,X,1,1,"img",54),n.YNc(5,nn,1,0,"ng-template",null,55,n.W1O),n.qZA()(),n.TgZ(7,"td",56)(8,"span",57),n._uU(9),n.qZA(),n._UZ(10,"br"),n.TgZ(11,"small"),n._uU(12),n.qZA()(),n.BQk()),2&e){const t=n.MAs(6),i=n.oxw().$implicit,a=n.oxw().$implicit;n.xp6(1),n.Q6J("rowSpan",null==a?null:a.Variants.length),n.xp6(2),n.Q6J("ngIf",(null==i?null:i.Inventory)>=0||a.Variants.length>1),n.xp6(1),n.Q6J("ngIf",null==a?null:a.ThumbnailUrl)("ngIfElse",t),n.xp6(3),n.Q6J("rowSpan",null==a?null:a.Variants.length),n.xp6(2),n.Oqu(null==a?null:a.Name),n.xp6(3),n.hij("(",null==a?null:a.Category,")")}}function en(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"input",37),n.NdJ("ngModelChange",function(a){n.CHM(t);const o=n.oxw().$implicit;return n.KtG(o.selected=a)}),n.qZA()}if(2&e){const t=n.oxw().$implicit;n.Q6J("ngModel",t.selected)}}function an(e,l){if(1&e&&(n.TgZ(0,"span")(1,"span",61),n._uU(2),n.ALo(3,"number"),n.qZA(),n._uU(4," => "),n.TgZ(5,"span",62),n._uU(6),n.ALo(7,"number"),n.qZA()()),2&e){const t=n.oxw().$implicit;n.xp6(2),n.hij(" ",n.lcZ(3,2,null==t||null==t.I?null:t.I.Available),""),n.xp6(4),n.Oqu(n.lcZ(7,4,null==t?null:t.Inventory))}}function on(e,l){if(1&e&&(n.TgZ(0,"span"),n._uU(1),n.ALo(2,"number"),n.qZA()),2&e){const t=n.oxw().$implicit;n.xp6(1),n.hij(" ",n.lcZ(2,1,null==t?null:t.Inventory)," ")}}const ln=function(e){return{"bg-gradient-warning":e}};function rn(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"td",63)(1,"div",64)(2,"div",65),n.NdJ("click",function(){n.CHM(t);const a=n.oxw().$implicit,o=n.oxw(),r=o.$implicit,p=o.ngForOf,h=n.oxw(2);return n.KtG(h.openTableDialog(r,a,p))}),n._uU(3),n.ALo(4,"number"),n.qZA()()()}if(2&e){const t=n.oxw().$implicit;n.Q6J("ngClass",n.VKq(4,ln,(null==t?null:t.Inventory)!=(null==t||null==t.Channel[0]?null:t.Channel[0].Inventory))),n.xp6(3),n.hij(" ",n.lcZ(4,2,null==t||null==t.Channel[0]?null:t.Channel[0].Inventory)," ")}}function sn(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"tr"),n.YNc(1,tn,13,7,"ng-container",3),n.TgZ(2,"td",40),n._uU(3),n.qZA(),n.TgZ(4,"td",41)(5,"span"),n._uU(6),n.qZA(),n.TgZ(7,"span",42)(8,"a",43),n._UZ(9,"i",44),n.qZA()()(),n.TgZ(10,"td",45),n.YNc(11,en,1,1,"input",46),n.qZA(),n.TgZ(12,"td",41),n.YNc(13,an,8,6,"span",3),n.YNc(14,on,3,3,"span",3),n.qZA(),n.YNc(15,rn,5,6,"td",47),n.TgZ(16,"td")(17,"div",10)(18,"div",48)(19,"a",43),n._UZ(20,"i",44),n.qZA(),n._uU(21," \xa0\xa0 "),n.TgZ(22,"span",49),n.NdJ("click",function(){const o=n.CHM(t).$implicit,r=n.oxw(3);return n.KtG(r.refreshInventory(null==o||null==o.Channel[0]?null:o.Channel[0].ChannelItemID,null==o||null==o.Channel[0]?null:o.Channel[0].ChannelVariationID,null==o||null==o.Channel[0]?null:o.Channel[0].ChannelID,null==o?null:o.ID))}),n._UZ(23,"i",50),n.qZA()()()()()}if(2&e){const t=l.$implicit,i=l.index,a=n.oxw(3);n.xp6(1),n.Q6J("ngIf",0==i),n.xp6(2),n.Oqu(null==t?null:t.Model),n.xp6(3),n.Oqu(null==t?null:t.Code),n.xp6(2),n.Q6J("href","https://"+a.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(null==t?null:t.ID),n.LSH),n.xp6(3),n.Q6J("ngIf",(null==t?null:t.Inventory)>=0),n.xp6(2),n.Q6J("ngIf",(null==t?null:t.Inventory)!=(null==t||null==t.I?null:t.I.Available)),n.xp6(1),n.Q6J("ngIf",(null==t?null:t.Inventory)==(null==t||null==t.I?null:t.I.Available)),n.xp6(1),n.Q6J("ngIf",null==t?null:t.Channel),n.xp6(4),n.Q6J("href",null==t||null==t.Channel[0]?null:t.Channel[0].Url,n.LSH)}}function cn(e,l){if(1&e&&(n.TgZ(0,"tbody"),n.YNc(1,sn,24,9,"tr",24),n.qZA()),2&e){const t=l.$implicit;n.xp6(1),n.Q6J("ngForOf",t.Variants)}}function pn(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"span",66),n.NdJ("click",function(){n.CHM(t);const a=n.oxw(2);return n.KtG(a.getRowCount())}),n.TgZ(1,"i",67),n._uU(2,"?"),n.qZA()()}}function hn(e,l){if(1&e&&(n.TgZ(0,"span"),n._uU(1),n.ALo(2,"number"),n.qZA()),2&e){const t=l.ngIf;n.xp6(1),n.Oqu(n.lcZ(2,1,null==t?null:t.Total))}}function un(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"a",71),n.NdJ("click",function(){n.CHM(t);const a=n.oxw(3);return n.KtG(a.onNextPage())}),n._UZ(1,"i",72),n._uU(2," Next"),n.qZA()}}function gn(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"a",73),n.NdJ("click",function(){n.CHM(t);const a=n.oxw(3);return n.KtG(a.onLastPage())}),n._UZ(1,"i",74),n._uU(2," Last"),n.qZA()}}function _n(e,l){if(1&e&&(n.TgZ(0,"div",68),n.YNc(1,un,3,0,"a",69),n.YNc(2,gn,3,0,"a",70),n.qZA()),2&e){const t=n.oxw(2);n.xp6(1),n.Q6J("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage),n.xp6(1),n.Q6J("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage)}}function dn(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"mainpanel",1),n.NdJ("onSubmit",function(a){n.CHM(t);const o=n.oxw();return n.KtG(o.onSearch(a))}),n.TgZ(1,"actions")(2,"div",2),n.YNc(3,R,3,2,"div",3),n.ALo(4,"async"),n.qZA()(),n.TgZ(5,"filters")(6,"div",2)(7,"div",4)(8,"div")(9,"label",5),n._uU(10,"PageNumber"),n.qZA(),n.TgZ(11,"input",6),n.NdJ("ngModelChange",function(a){n.CHM(t);const o=n.oxw();return n.KtG(o.searchFilter.PageNumber=a)}),n.qZA()(),n.TgZ(12,"div")(13,"label",7),n._uU(14,"Page Size"),n.qZA(),n.TgZ(15,"input",8),n.NdJ("ngModelChange",function(a){n.CHM(t);const o=n.oxw();return n.KtG(o.searchFilter.RowCount=a)}),n.qZA()()()()(),n.TgZ(16,"content")(17,"div",9)(18,"div",10)(19,"div",11),n.YNc(20,B,3,0,"div",12),n.TgZ(21,"table",13)(22,"thead",14)(23,"tr")(24,"th",15),n._uU(25,"Product "),n._UZ(26,"br"),n.TgZ(27,"mat-slide-toggle",16),n.NdJ("toggleChange",function(){n.CHM(t);const a=n.oxw();return a.showDifferenceStock=!a.showDifferenceStock,n.KtG(a.onShowDifferenceStock())}),n.TgZ(28,"small",17),n._uU(29,"Filter Different Inventory"),n.qZA()()(),n.TgZ(30,"th",18),n._uU(31,"Variant"),n.qZA(),n.TgZ(32,"th",19),n._uU(33,"SKU"),n.qZA(),n.YNc(34,j,2,1,"th",3),n.ALo(35,"async"),n.TgZ(36,"th",20),n._uU(37,"POS"),n.qZA(),n.TgZ(38,"th")(39,"ng-select",21),n.NdJ("change",function(a){n.CHM(t);const o=n.oxw();return n.KtG(o.onFilterChannel(a))})("ngModelChange",function(a){n.CHM(t);const o=n.oxw();return n.KtG(o.searchFilter.ChannelID=a)}),n.YNc(40,z,3,3,"ng-option",22),n.qZA()(),n._UZ(41,"th",23),n.qZA()(),n.YNc(42,cn,2,1,"tbody",24),n.ALo(43,"async"),n.qZA(),n.TgZ(44,"div",25)(45,"div",26)(46,"div",27),n._uU(47),n.ALo(48,"number"),n.ALo(49,"async"),n.YNc(50,pn,3,0,"span",28),n.YNc(51,hn,3,3,"span",3),n.ALo(52,"async"),n._uU(53),n.qZA()(),n.YNc(54,_n,3,2,"div",29),n.ALo(55,"async"),n.qZA()()()()()()}if(2&e){const t=l.ngIf,i=n.oxw();let a,o;n.Q6J("headerTitle","Inventory Comparison")("pageData",i.pageData)("hideSearchBox",!1),n.xp6(3),n.Q6J("ngIf",n.lcZ(4,17,i.paginationService.data$)),n.xp6(8),n.Q6J("ngModel",i.searchFilter.PageNumber),n.xp6(4),n.Q6J("ngModel",i.searchFilter.RowCount),n.xp6(5),n.Q6J("ngIf",3==(null==i.searchFilter?null:i.searchFilter.filterModel)),n.xp6(14),n.Q6J("ngIf",n.lcZ(35,19,i.paginationService.data$)),n.xp6(5),n.Q6J("clearable",!1)("ngModel",i.searchFilter.ChannelID),n.xp6(1),n.Q6J("ngForOf",t.Options.Channel),n.xp6(2),n.Q6J("ngForOf",n.lcZ(43,21,i.paginationService.data$)),n.xp6(5),n.hij(" Showing 1 - ",n.lcZ(48,23,null==(a=n.lcZ(49,25,i.paginationService.data$))?null:a.length)," of "),n.xp6(3),n.Q6J("ngIf",i.paginationService.hideCount),n.xp6(1),n.Q6J("ngIf",n.lcZ(52,27,!i.paginationService.hideCount&&i.rowCount$)),n.xp6(2),n.hij(" records ~ ",i.paginationService.footerPageNumber," Page "),n.xp6(1),n.Q6J("ngIf",(null==(o=n.lcZ(55,29,i.paginationService.data$))?null:o.length)>0)}}let mn=(()=>{class e{constructor(t,i,a,o,r,p){this.http=t,this.toastr=i,this.dialog=a,this.paginationService=o,this.productService=r,this.biggerPictureService=p,this.checkboxState=!1,this.showDifferenceStock=!1,this.loaderApi="/api/InventoryLoader/Load",this.rowCountApi="/api/Inventory/GetInventoryByChannelRowCount",this.Options=[{Key:1,Value:"All"},{Key:3,Value:"Difference"}],this.pageData={Title:"Inventory Realtime",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory",Active:!1},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!0}]},this.hostName=r.getHostName()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint="Inventory/GetSingleChannelComparison",this.loader$=this.http.post(this.loaderApi,{}).pipe((0,b.b)(t=>{this.channelOptions=t.Options.Channel,this.searchFilter={RowCount:t.Filter.PageSize,filterModel:1,PageNumber:1,ChannelID:t.Filter.ChannelID},this.paginationService.resetToFirstPage(this.searchFilter),t.Filter.IsMarketplaceAppActive||this.toastr.warning("Automatic inventory sync disabled.\n Please enable Dealpos X Marketplace Apps integration in POS Configuration","Warning")}))}onSearch(t){this.searchFilter.text=t,this.paginationService.resetToFirstPage(this.searchFilter)}onFilterChannel(t){this.searchFilter.ChannelID=t,this.searchFilter.PageNumber=1,this.paginationService.resetToFirstPage(this.searchFilter)}updateStock(t){const i=this.productService.selectedVariantProduct(t);if(i.length>0){let a=i.map(r=>({ID:r.ID,Code:r.Code,Inventory:r.Inventory})),o={ListChannelID:[this.searchFilter.ChannelID],List:a};this.http.post("/api/Inventory/UpdateChannel",o).subscribe(r=>{this.searchFilter.PageNumber=1,this.paginationService.resetToFirstPage(this.searchFilter),this.toastr.success("Successfully updated "+o.List.length+" variants in "+o.ListChannelID.length+" channels","Success"),this.checkboxState=!1})}}openScanDialog(t){const i=JSON.parse(JSON.stringify(this.searchFilter));i.ChannelID=u.g.GuidEMpty,this.dialog.open(I.j,{data:{filter:i,channelOptions:t.Options.Channel},width:"40%"}).afterClosed().pipe((0,d.h)(o=>u.g.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID,this.searchFilter.ScanFull=o.ScanFull,this.searchFilter.UpdatedProduct=o.UpdatedProduct,this.searchFilter.Async=o.Async,this.scannALl(t)})}scannALl(t){const i=this.productService.findChannelById(this.searchFilter.ChannelID,t.Options.Channel);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(a=>{this.searchFilter.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.searchFilter.ScanFull=!1,this.initPageLoader(),this.toastr.success("Successfully scanned from "+i?.Name,"Success"))})}refreshInventory(t,i,a,o){this.http.post("/api/Inventory/RefreshInventoryChannel",{ChannelItemID:t,ChannelVariationID:i,ChannelID:a,VariantID:o}).subscribe(p=>{this.toastr.success("Successfully updated","Success"),this.paginationService.resetToFirstPage(this.searchFilter)})}onCheckboxStateProduct(t){t.Variants=t.Variants.map(i=>(i.Inventory>=0&&(i.selected=t.selected),i))}onCheckboxStateChange(t){t=t.map(i=>(i.Variants=i.Variants.map(a=>(a.selected=this.checkboxState,a)),i))}openTableDialog(t,i,a){this.dialog.open($.k,{data:{Name:t.Name,Variant:i,ChannelID:i?.Channel[0].ChannelID,Table:"inventory",ChannelItemID:t.ChannelItemID}}).afterClosed().pipe((0,d.h)(r=>u.g.IsNotEmpty(r))).subscribe(r=>{this.updateItemAfterDialog(r,a)})}updateItemAfterDialog(t,i){let a={ID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariantID:t.ChannelVariationID,NewQuantity:parseFloat(t.Inventory),VariantID:t.ID,SKU:t.Sku};const o=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.http.post("/api/Inventory/UpdateQuantityByItem",a).subscribe(r=>{this.toastr.success("Successfully updated "+t.ItemName+"("+t.VarName+") inventory in "+o?.Name+" to "+a.NewQuantity,"Success")})}onShowDifferenceStock(){this.searchFilter.filterModel=this.showDifferenceStock?_.v.DIFFERENCE:_.v.ALL,this.paginationService.resetToFirstPage(this.searchFilter)}onNextPage(){this.paginationService.onNextPage(this.searchFilter)}getRowCount(){const t={ChannelID:this.searchFilter.ChannelID,PageNumber:1,text:this.searchFilter.text};this.paginationService.hideCount=!1,this.rowCount$=this.http.post(`${this.rowCountApi}`,t)}onLastPage(){this.http.post(`${this.rowCountApi}`,{ChannelID:this.searchFilter.ChannelID,PageNumber:1}).subscribe({next:i=>{this.searchFilter.PageNumber=1,this.paginationService.getAllData(this.searchFilter,i.Total)}})}onZoomImage(t,i){this.biggerPictureService.openBiggerPicture(t,i)}ngOnDestroy(){this.paginationService.destroy()}}return e.\u0275fac=function(t){return new(t||e)(n.Y36(S.O),n.Y36(y._W),n.Y36(T.uw),n.Y36(Z.b),n.Y36(F.M),n.Y36(K.k))},e.\u0275cmp=n.Xpm({type:e,selectors:[["app-single-channel-comparison"]],decls:2,vars:3,consts:[["textButton","Search",3,"headerTitle","pageData","hideSearchBox","onSubmit",4,"ngIf"],["textButton","Search",3,"headerTitle","pageData","hideSearchBox","onSubmit"],[1,"d-flex"],[4,"ngIf"],["container",""],["for","PageNumber"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"form-control",3,"ngModel","ngModelChange"],["for","RowCount"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"form-control",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["class","alert alert-warning d-flex justify-content-between text-dark","role","alert",4,"ngIf"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],["scope","col","colspan","2",1,"text-center","ps-12",2,"width","36%"],[3,"toggleChange"],[1,"fw-bold"],["scope","col",1,"text-start"],["scope","col",1,"text-end",2,"width","20%"],["scope","col",1,"text-end","w-10"],[3,"clearable","ngModel","change","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[2,"width","4%"],[4,"ngFor","ngForOf"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],["class","btn-group",4,"ngIf"],["type","button","data-cy","scanInPos","class","btn btn-outline-secondary shadow rounded me-3",3,"click",4,"ngIf"],["class","btn btn-success",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],["role","alert",1,"alert","alert-warning","d-flex","justify-content-between","text-dark"],["type","checkbox",3,"ngModel","ngModelChange"],[3,"value"],[2,"width","18px","margin-right","10px",3,"src"],[1,"text-start"],[1,"text-end"],[1,"ms-2"],["target","_blank",3,"href"],[1,"fas","fa-lg","fa-external-link-alt","external-link-custom"],[1,"align-middle"],["type","checkbox",3,"ngModel","ngModelChange",4,"ngIf"],["class","text-end",3,"ngClass",4,"ngIf"],[1,"col-12","ps-0","d-flex","justify-content-between"],["matTooltip","Refresh stock according to seller center",1,"pl-5","cursor-pointer",3,"click"],[1,"fas","fa-sync","fa-lg","external-link-custom"],[1,"text-start",2,"width","0%",3,"rowSpan"],[1,"d-flex","align-items-center","justify-content-start"],["type","checkbox","class","me-3",3,"ngModel","ngModelChange",4,"ngIf"],["class","border rounded w-img cursor-pointer","style","margin-left: 20px",3,"src","click",4,"ngIf","ngIfElse"],["elsePic",""],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],["type","checkbox",1,"me-3",3,"ngModel","ngModelChange"],[1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"src","click"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img",2,"margin-left","20px"],["title","Allocated"],["title","Inventory below minimum inventory"],[1,"text-end",3,"ngClass"],[1,"row","justify-content-end","me-0"],[1,"col-12","pe-12","text-end",3,"click"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load all products",3,"click",4,"ngIf"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(t,i){1&t&&(n.YNc(0,dn,56,31,"mainpanel",0),n.ALo(1,"async")),2&t&&n.Q6J("ngIf",n.lcZ(1,1,i.loader$))},dependencies:[c.mk,c.sg,c.O5,g.Fj,g.wV,g.Wl,g.JJ,g.On,f.w9,f.jq,A.Rr,C.p,M.gM,c.Ov,c.JJ],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{margin-bottom:-14px!important;font-size:larger}input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}"]}),e})();var N=s(8063);const Cn=[{path:"",component:D,children:[{path:"",redirectTo:"bychannel",pathMatch:"full"},{path:"pos",component:q,canActivate:[N.a],data:{title:"Inventory Comparison"}},{path:"bychannel",component:mn,canActivate:[N.a],data:{title:"Inventory Comparison"}}]}];let fn=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=n.oAB({type:e}),e.\u0275inj=n.cJS({imports:[c.ez,m.Bz.forChild(Cn)]}),e})(),xn=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=n.oAB({type:e}),e.\u0275inj=n.cJS({imports:[c.ez,fn,m.Bz,v.Z,g.u5,f.A0,A.rP,C.R,w.U,M.AV]}),e})()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[174],{6174:(M,y,s)=>{s.r(y),s.d(y,{OrderModule:()=>E});var p=s(6895),t=s(4650),v=s(7398),m=s(8252);const C=function(){return["/menu/report/product-statistic/channel"]};let S=(()=>{class o{constructor(){this.reportTabs=[{Title:"1 - New Order",Url:"/menu/report/order/sync-order"},{Title:"2 - Ready to Ship",Url:"/menu/report/order/invoice"},{Title:"3 - Shipped",Url:"/menu/report/order/delivery"},{Title:"4 - Completed",Url:"/menu/report/order/payment"}]}}return o.\u0275fac=function(e){return new(e||o)},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-order"]],decls:18,vars:3,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"],[1,"dropdown","dropstart","me-4"],["role","button","data-bs-toggle","dropdown","id","dropdownMenuButton1","aria-expanded","false",1,"text-dark"],[1,"fas","fa-bars","fa-lg"],["aria-labelledby","dropdownMenuButton1",1,"dropdown-menu","report"],[1,"dropdown-header","text-dark","fw-normal",2,"font-size",".875rem !important"],[1,"dropdown-divider"],[1,"dropdown-item",3,"routerLink"],[1,"fa-regular","fa-file","me-2"]],template:function(e,r){1&e&&(t.TgZ(0,"nav",0)(1,"div",1)(2,"div"),t._UZ(3,"nav-tab",2),t.qZA(),t.TgZ(4,"div",3)(5,"a",4),t._UZ(6,"i",5),t.qZA(),t.TgZ(7,"ul",6)(8,"li")(9,"h5",7),t._uU(10,"Product Report"),t.qZA()(),t.TgZ(11,"li"),t._UZ(12,"hr",8),t.qZA(),t.TgZ(13,"li")(14,"a",9),t._UZ(15,"i",10),t._uU(16,"Product Statistic"),t.qZA()()()()()(),t._UZ(17,"router-outlet")),2&e&&(t.xp6(3),t.Q6J("Tabs",r.reportTabs),t.xp6(11),t.Q6J("routerLink",t.DdM(2,C)))},dependencies:[v.e,m.lC,m.yS],styles:[".dropdown[_ngcontent-%COMP%] .dropdown-menu.report.show[_ngcontent-%COMP%]{top:100%!important;transform:none!important;z-index:10000;cursor:pointer;right:-50%}"]}),o})();var l=s(3154);class f{}var _=s(1318);let g=(()=>{class o{constructor(e){this.http=e}GetLoader(){return new Promise((e,r)=>{this.http.post("/api/Report/GetLoader",{}).subscribe(i=>{e(i)})})}GetSyncOrder(e){return new Promise((r,i)=>{this.http.post("/api/Report/Salesorder",JSON.stringify(e)).subscribe(a=>{r(a)})})}GetSyncInvoice(e){return new Promise((r,i)=>{this.http.post("/api/Report/Invoice",JSON.stringify(e)).subscribe(a=>{r(a)})})}GetSyncDelivery(e){return new Promise((r,i)=>{this.http.post("/api/Report/Delivery",JSON.stringify(e)).subscribe(a=>{r(a)})})}GetSyncPayment(e){return new Promise((r,i)=>{this.http.post("/api/Report/Payment",JSON.stringify(e)).subscribe(a=>{r(a)})})}}return o.\u0275fac=function(e){return new(e||o)(t.LFG(_.O))},o.\u0275prov=t.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();var d=s(7481),c=s(5171),h=(()=>{return(o=h||(h={}))[o.OK=200]="OK",o[o.BAD_REQUEST=400]="BAD_REQUEST",o[o.CONFLICT=409]="CONFLICT",o[o.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",h;var o})();function D(o,n){if(1&o&&(t.TgZ(0,"th",6)(1,"div",7)(2,"h4"),t._uU(3),t.qZA(),t.TgZ(4,"small",8),t._uU(5),t.qZA()()()),2&o){const e=n.$implicit,r=t.oxw();t.xp6(3),t.Oqu(e),t.xp6(1),t.Tol(r.getTextBgColor(e)),t.xp6(1),t.Oqu(r.getHeaderStatusDesc(e))}}const O=function(){return["/menu/log/order"]},P=function(o,n,e,r,i){return{responseCode:o,From:n,to:e,actionType:r,ChannelID:i}};function Z(o,n){if(1&o&&(t.TgZ(0,"td",12)(1,"a",13),t._uU(2),t.qZA()()),2&o){const e=n.$implicit,r=t.oxw().$implicit,i=t.oxw();t.xp6(1),t.Q6J("routerLink",t.DdM(3,O))("queryParams",t.qbA(4,P,e.Key,i.from,i.to,i.type,r.ChannelID)),t.xp6(1),t.hij(" ",e.Value," ")}}function F(o,n){if(1&o&&(t.TgZ(0,"tr")(1,"td")(2,"a",9),t._UZ(3,"img",10),t.qZA()(),t.TgZ(4,"td")(5,"div")(6,"a",9),t._uU(7),t.qZA()(),t.TgZ(8,"div"),t._uU(9),t.qZA()(),t.YNc(10,Z,3,10,"td",11),t.qZA()),2&o){const e=n.$implicit,r=t.oxw();t.xp6(2),t.s9C("href",e.Url,t.LSH),t.xp6(1),t.Q6J("src",r.getChannelLogo(e.Type),t.LSH),t.xp6(3),t.s9C("href",e.Url,t.LSH),t.xp6(1),t.Oqu(e.Name),t.xp6(2),t.Oqu(e.Url),t.xp6(1),t.Q6J("ngForOf",e.list)}}let u=(()=>{class o{constructor(){this.headerStatus=h}getHeaderStatusDesc(e){let r=null;switch(e){case h.BAD_REQUEST:r="BAD REQUEST";break;case h.CONFLICT:r="CONFLICT";break;case h.INTERNAL_SERVER_ERROR:r="INTERNAL SERVER ERROR";break;default:r="OK"}return r}getTextBgColor(e){let r=null;switch(e){case h.OK:r="bg-success";break;case h.INTERNAL_SERVER_ERROR:r="bg-danger";break;default:r="bg-warning"}return r}getChannelLogo(e){return l.g.getChannelLogoByTypeId(e)}}return o.\u0275fac=function(e){return new(e||o)},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-table-report"]],inputs:{header:"header",result:"result",from:"from",to:"to",type:"type"},decls:9,vars:2,consts:[[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","0%"],[2,"width","3%"],["class","text-start","style","width: 5%;",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[1,"text-start",2,"width","5%"],[1,"d-block"],[1,"text-white","p-1","rounded","response-desc"],["target","_blank",3,"href"],[2,"width","24px","height","24px",3,"src"],["class","text-start",4,"ngFor","ngForOf"],[1,"text-start"],[1,"h3","text-primary","fw-bold",3,"routerLink","queryParams"]],template:function(e,r){1&e&&(t.TgZ(0,"table",0)(1,"thead",1)(2,"tr"),t._UZ(3,"th",2),t.TgZ(4,"th",3),t._uU(5,"Channel"),t.qZA(),t.YNc(6,D,6,4,"th",4),t.qZA()(),t.TgZ(7,"tbody"),t.YNc(8,F,11,6,"tr",5),t.qZA()()),2&e&&(t.xp6(6),t.Q6J("ngForOf",r.header),t.xp6(2),t.Q6J("ngForOf",r.result))},dependencies:[p.sg,m.yS],styles:[".response-desc[_ngcontent-%COMP%]{font-size:12px}"]}),o})();function w(o,n){if(1&o&&(t.TgZ(0,"div",5)(1,"div",6),t._UZ(2,"app-table-report",7),t.qZA()()),2&o){const e=t.oxw();t.xp6(2),t.Q6J("result",e.result)("header",e.header)("from",e.from)("to",e.to)("type",0)}}let x=(()=>{class o{constructor(e,r){this.http=e,this.datePipe=r,this.filter=new f,this.pageTitle="New Order";let i=new Date;this.maxDate=i,this.minDate=l.g.addDays(i,6),this.filter.From=i,this.filter.To=i,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){const e=l.g.formatTitleForFromDate(this.filter.From,this.filter.To),r=this.datePipe.transform(this.filter.From,e),i=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.pageTitle=`New Order (${r} - ${i})`}initPageLoader(){this.http.GetLoader().then(e=>{this.filter=e,this.from=this.filter.From.toString(),this.to=this.filter.To.toString(),this.http.GetSyncOrder(this.filter).then(r=>{this.header=r.Header,this.result=r.Body})})}getChannelLogs(e){this.filter.From=e.from,this.filter.To=e.to,this.updatePageTitle(),this.http.GetSyncOrder(this.filter).then(r=>{this.header=r.Header,this.result=r.Body,this.from=this.filter.From.toJSON(),this.to=this.filter.To.toJSON()})}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(g),t.Y36(p.uU))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-sales-order"]],decls:7,vars:7,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],[1,"filterDate"],[3,"minDate","from","to","dateChange"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(e,r){1&e&&(t.TgZ(0,"mainpanel",0)(1,"actions")(2,"div",1)(3,"app-datepicker-range",2),t.NdJ("dateChange",function(a){return r.getChannelLogs(a)}),t.qZA()()(),t.TgZ(4,"content")(5,"div",3),t.YNc(6,w,3,5,"div",4),t.qZA()()()),2&e&&(t.Q6J("headerTitle",r.pageTitle)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(3),t.Q6J("minDate",r.minDate)("from",r.filter.From)("to",r.filter.To),t.xp6(3),t.Q6J("ngIf",r.result))},dependencies:[p.O5,d.p,c.Pg,u],styles:[".filterDate[_ngcontent-%COMP%]{position:absolute;right:10px;top:2px}"]}),o})();var T=s(8063);function R(o,n){if(1&o&&(t.TgZ(0,"div",5)(1,"div",6),t._UZ(2,"app-table-report",7),t.qZA()()),2&o){const e=t.oxw();t.xp6(2),t.Q6J("result",e.result)("header",e.header)("from",e.from)("to",e.to)("type",1)}}let b=(()=>{class o{constructor(e,r){this.http=e,this.datePipe=r,this.filter=new f,this.PageTitle="Ready to Ship";let i=new Date;this.maxDate=i,this.minDate=l.g.addDays(i,6),this.filter.From=i,this.filter.To=i,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){const e=l.g.formatTitleForFromDate(this.filter.From,this.filter.To),r=this.datePipe.transform(this.filter.From,e),i=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Ready to Ship (${r} - ${i})`}initPageLoader(){this.http.GetLoader().then(e=>{this.filter=e,this.from=this.filter.From.toString(),this.to=this.filter.To.toString(),this.http.GetSyncInvoice(this.filter).then(r=>{this.header=r.Header,this.result=r.Body})})}getChannelLogs(e){this.filter.From=e.from,this.filter.To=e.to,this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(r=>{this.header=r.Header,this.result=r.Body,this.from=this.filter.From.toJSON(),this.to=this.filter.To.toJSON()})}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(g),t.Y36(p.uU))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-invoice"]],decls:7,vars:7,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],[1,"filterDate"],[3,"minDate","from","to","dateChange"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(e,r){1&e&&(t.TgZ(0,"mainpanel",0)(1,"actions")(2,"div",1)(3,"app-datepicker-range",2),t.NdJ("dateChange",function(a){return r.getChannelLogs(a)}),t.qZA()()(),t.TgZ(4,"content")(5,"div",3),t.YNc(6,R,3,5,"div",4),t.qZA()()()),2&e&&(t.Q6J("headerTitle",r.PageTitle)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(3),t.Q6J("minDate",r.minDate)("from",r.filter.From)("to",r.filter.To),t.xp6(3),t.Q6J("ngIf",r.result))},dependencies:[p.O5,d.p,c.Pg,u],styles:[".filterDate[_ngcontent-%COMP%]{position:absolute;right:10px;top:2px}"]}),o})();function A(o,n){if(1&o&&(t.TgZ(0,"div",5)(1,"div",6),t._UZ(2,"app-table-report",7),t.qZA()()),2&o){const e=t.oxw();t.xp6(2),t.Q6J("result",e.result)("header",e.header)("from",e.from)("to",e.to)("type",3)}}let L=(()=>{class o{constructor(e,r){this.http=e,this.datePipe=r,this.filter=new f;let i=new Date;this.maxDate=i,this.minDate=l.g.addDays(i,6),this.filter.From=i,this.filter.To=i,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){const e=l.g.formatTitleForFromDate(this.filter.From,this.filter.To),r=this.datePipe.transform(this.filter.From,e),i=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Shipped (${r} - ${i})`}initPageLoader(){this.http.GetLoader().then(e=>{this.filter=e,this.from=this.filter.From.toString(),this.to=this.filter.To.toString(),this.http.GetSyncDelivery(this.filter).then(r=>{this.header=r.Header,this.result=r.Body})})}getChannelLogs(e){this.filter.From=e.from,this.filter.To=e.to,this.updatePageTitle(),this.http.GetSyncDelivery(this.filter).then(r=>{this.header=r.Header,this.result=r.Body,this.from=this.filter.From.toJSON(),this.to=this.filter.To.toJSON()})}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(g),t.Y36(p.uU))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-delivery"]],decls:7,vars:7,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],[1,"filterDate"],[3,"minDate","from","to","dateChange"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(e,r){1&e&&(t.TgZ(0,"mainpanel",0)(1,"actions")(2,"div",1)(3,"app-datepicker-range",2),t.NdJ("dateChange",function(a){return r.getChannelLogs(a)}),t.qZA()()(),t.TgZ(4,"content")(5,"div",3),t.YNc(6,A,3,5,"div",4),t.qZA()()()),2&e&&(t.Q6J("headerTitle",r.PageTitle)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(3),t.Q6J("minDate",r.minDate)("from",r.filter.From)("to",r.filter.To),t.xp6(3),t.Q6J("ngIf",r.result))},dependencies:[p.O5,d.p,c.Pg,u],styles:[".filterDate[_ngcontent-%COMP%]{position:absolute;right:10px;top:2px}"]}),o})();function N(o,n){if(1&o&&(t.TgZ(0,"div",5)(1,"div",6),t._UZ(2,"app-table-report",7),t.qZA()()),2&o){const e=t.oxw();t.xp6(2),t.Q6J("result",e.result)("header",e.header)("from",e.from)("to",e.to)("type",4)}}let J=(()=>{class o{constructor(e,r){this.http=e,this.datePipe=r,this.filter=new f,this.PageTitle="Completed";let i=new Date;this.minDate=l.g.addDays(i,6),this.filter.From=i,this.filter.To=i,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){const e=l.g.formatTitleForFromDate(this.filter.From,this.filter.To),r=this.datePipe.transform(this.filter.From,e),i=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Completed (${r} - ${i})`}initPageLoader(){this.http.GetLoader().then(e=>{this.filter=e,this.from=this.filter.From.toString(),this.to=this.filter.To.toString(),this.http.GetSyncPayment(this.filter).then(r=>{this.header=r.Header,this.result=r.Body})})}getChannelLogs(e){this.filter.From=e.from,this.filter.To=e.to,this.updatePageTitle(),this.http.GetSyncPayment(this.filter).then(r=>{this.header=r.Header,this.result=r.Body,this.from=this.filter.From.toJSON(),this.to=this.filter.To.toJSON()})}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(g),t.Y36(p.uU))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-payment"]],decls:7,vars:7,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],[1,"filterDate"],[3,"minDate","from","to","dateChange"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(e,r){1&e&&(t.TgZ(0,"mainpanel",0)(1,"actions")(2,"div",1)(3,"app-datepicker-range",2),t.NdJ("dateChange",function(a){return r.getChannelLogs(a)}),t.qZA()()(),t.TgZ(4,"content")(5,"div",3),t.YNc(6,N,3,5,"div",4),t.qZA()()()),2&e&&(t.Q6J("headerTitle",r.PageTitle)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(3),t.Q6J("minDate",r.minDate)("from",r.filter.From)("to",r.filter.To),t.xp6(3),t.Q6J("ngIf",r.result))},dependencies:[p.O5,d.p,c.Pg,u],styles:[".filterDate[_ngcontent-%COMP%]{position:absolute;right:10px;top:2px}"]}),o})();var I=s(4006);const U=[{path:"",component:S,children:[{path:"",redirectTo:"sync-order",pathMatch:"full"},{path:"sync-order",component:x,canActivate:[T.a],data:{title:"Sync Order"}},{path:"invoice",component:b,canActivate:[T.a],data:{title:"Sync Invoice"}},{path:"delivery",component:L,canActivate:[T.a],data:{title:"Sync Delivery"}},{path:"payment",component:J,canActivate:[T.a],data:{title:"Sync Payment"}}]}];let E=(()=>{class o{}return o.\u0275fac=function(e){return new(e||o)},o.\u0275mod=t.oAB({type:o}),o.\u0275inj=t.cJS({imports:[p.ez,v.Z,I.u5,d.R,c.v,m.Bz.forChild(U)]}),o})()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[180],{1180:(wn,k,s)=>{s.r(k),s.d(k,{ProductModule:()=>Mn});var d=s(6895),U=s(7398),u=s(4006),v=s(8252),t=s(4650);let q=(()=>{class o{constructor(){this.productTabs=[{Title:"Sold in Channel",Url:"/menu/products/sold-in-channel",Description:"SKU has been mapped between dealpos and marketplace"},{Title:"Not in POS",Url:"/menu/products/not-in-pos",Description:"SKU sold in Marketplace but not exist in DEALPOS"},{Title:"Not in Channel",Url:"/menu/products/not-in-channel",Description:"SKU has not been sold on one of channels"},{Title:"In POS",Url:"/menu/products/in-pos",Description:"All products which is already available in POS"},{Title:"Multiple Listed SKU",Url:"/menu/products/duplicate-sku",Description:"SKU(s) which is listed more than one time (one to many)"}]}}return o.\u0275fac=function(n){return new(n||o)},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-products"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(n,e){1&n&&(t.TgZ(0,"nav",0)(1,"div",1)(2,"div"),t._UZ(3,"nav-tab",2),t.qZA()()(),t._UZ(4,"router-outlet")),2&n&&(t.xp6(3),t.Q6J("Tabs",e.productTabs))},dependencies:[U.e,v.lC],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}"]}),o})();var y=s(1290),m=s(8231),h=s(5412),c=s(3154),M=s(6779),D=s(3900),B=s(9646),Y=s(9568),x=s(1318);let A=(()=>{class o{constructor(n,e){this.LocalData=n,this.httpService=e}getCategoriesByTypeId(n){return this.LocalData.getCategoriesByChannelType(n).pipe((0,D.w)(e=>null!=e?(0,B.of)(e):this._getCategoriesByTypeID(n)))}_getCategoriesByTypeID(n){return this.httpService.post("/api/Channel/getCategoriesByTypeID",{TypeID:n}).pipe((0,D.w)(i=>this.LocalData.saveCategoriesByChannelType(i,n)))}}return o.\u0275fac=function(n){return new(n||o)(t.LFG(Y.T),t.LFG(x.O))},o.\u0275prov=t.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();var J=s(5960),w=s(6401);function V(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"h5",5),t._uU(2,"Category"),t.qZA(),t.TgZ(3,"app-select-search",9),t.NdJ("onSelect",function(i){t.CHM(n);const l=t.oxw();return t.KtG(l.onSelectCategory(i))}),t.qZA(),t.BQk()}if(2&o){const n=t.oxw();t.xp6(3),t.Q6J("appearance","outline")("batchSize",30)("data",n.options)("bindLabel","Value")("bindValue","Key")("placeholder","Select Category")}}let Q=(()=>{class o{constructor(n,e,i,l){this.data=n,this.channelCategoriesService=e,this.http=i,this.dialogRef=l,this.item=n.item,this.selectItemMissingChannel=n.selectedItemMissingChannel,this.options=[],this.optionVisible=!1}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new M.O,this.modalConfig.title="Upload"}onSelectItem(n){this.selectedChannelID=n;let e=this.selectItemMissingChannel.find(i=>i.ID==n);!e||1!==e.TypeID&&7!==e.TypeID?this.optionVisible=!1:this.channelCategoriesService.getCategoriesByTypeId(e.TypeID).subscribe({next:i=>{this.options=i,this.optionVisible=!0},error:i=>{console.error(i)}})}isNotEmpty(n){return c.g.IsNotEmpty(n)}onSelectCategory(n){this.selectedCategoryID=n}onClose(){this.dialogRef.close()}onSave(){this.selectedChannelID&&(this.selectedCategoryID||!this.optionVisible)&&this.dialogRef.close({channelID:this.selectedChannelID,categoryID:this.selectedCategoryID})}}return o.\u0275fac=function(n){return new(n||o)(t.Y36(h.WI),t.Y36(A),t.Y36(x.O),t.Y36(h.so))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-uploadProductDialog"]],decls:11,vars:8,consts:[[3,"dynamicValidated","config","onOk","onClose","onCancel"],["content",""],[1,"mx-4"],[1,"row"],[1,"col-12"],[1,"mb-3","fw-normal"],[3,"appearance","data","bindLabel","bindValue","placeholder","onSelect"],[1,"row","mt-3"],[4,"ngIf"],[3,"appearance","batchSize","data","bindLabel","bindValue","placeholder","onSelect"]],template:function(n,e){1&n&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return e.onSave()})("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()}),t.TgZ(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"h5",5),t._uU(6,"Channel :"),t.qZA(),t.TgZ(7,"app-select-search",6),t.NdJ("onSelect",function(l){return e.onSelectItem(l)}),t.qZA()()(),t.TgZ(8,"div",7)(9,"div",4),t.YNc(10,V,4,6,"ng-container",8),t.qZA()()()()()),2&n&&(t.Q6J("dynamicValidated",e.isNotEmpty(e.selectedChannelID))("config",e.modalConfig),t.xp6(7),t.Q6J("appearance","outline")("data",e.selectItemMissingChannel)("bindLabel","Name")("bindValue","ID")("placeholder","Choose "),t.xp6(3),t.Q6J("ngIf",e.optionVisible))},dependencies:[d.O5,J.h,w.M],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}"]}),o})();var p=s(9694),_=(()=>{return(o=_||(_={})).Tokopedia="https://seller.tokopedia.com",o.Shoope="https://seller.shopee.co.id",o.Tiktok="https://seller-id.tiktok.com",o.WooCommerce="https://woocommerce.dealpos.app",o.Lazada="https://sellercenter.lazada.co.id",_;var o})(),C=s(266);function R(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"tr")(2,"td",11),t._uU(3),t.qZA(),t.TgZ(4,"td",11),t._uU(5),t.qZA(),t.TgZ(6,"td",12)(7,"p",13),t._uU(8,"Product Not in Channel!"),t.qZA()()(),t.BQk()),2&o){const n=t.oxw().$implicit;t.xp6(3),t.hij(" ",null==n?null:n.Model,""),t.xp6(2),t.hij(" ",null==n?null:n.Code,"")}}function H(o,a){if(1&o&&(t.TgZ(0,"td",11),t._uU(1),t.qZA()),2&o){const n=t.oxw(3).$implicit;t.uIk("rowspan",n.Channel.length),t.xp6(1),t.hij(" ",null==n?null:n.Model,"")}}function K(o,a){if(1&o&&(t.TgZ(0,"td",11),t._uU(1),t.qZA()),2&o){const n=t.oxw(3).$implicit;t.uIk("rowspan",n.Channel.length),t.xp6(1),t.hij(" ",null==n?null:n.Code,"")}}const G=function(o){return{"is-disabled":o}};function $(o,a){if(1&o&&(t.TgZ(0,"tr"),t.YNc(1,H,2,2,"td",14),t.YNc(2,K,2,2,"td",14),t.TgZ(3,"td",11)(4,"div",15)(5,"a",16),t._UZ(6,"img",17),t.qZA(),t.TgZ(7,"div",18),t._uU(8),t.qZA()()(),t.TgZ(9,"td",11),t._uU(10),t.ALo(11,"number"),t.qZA(),t.TgZ(12,"td",19),t._uU(13),t.ALo(14,"number"),t.qZA(),t.TgZ(15,"td",19)(16,"a",20),t._UZ(17,"i",21),t.TgZ(18,"span",22),t._uU(19,"Edit"),t.qZA()()()()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(3);t.xp6(1),t.Q6J("ngIf",0==e),t.xp6(1),t.Q6J("ngIf",0==e),t.xp6(3),t.Q6J("href",n.Url,t.LSH)("title",n.Title),t.xp6(1),t.Q6J("src",i.getChannelLogo(n.TypeID),t.LSH),t.xp6(1),t.Q6J("matTooltip",(null==n||null==n.Name?null:n.Name.length)>55?null==n?null:n.Name:""),t.xp6(1),t.hij(" ",n.Name," "),t.xp6(2),t.Oqu(t.lcZ(11,12,n.Price)),t.xp6(3),t.Oqu(t.lcZ(14,14,n.Inventory)),t.xp6(3),t.Q6J("href",i.getHyperlinkSellerCenter(n),t.LSH)("ngClass",t.VKq(16,G,n.TypeID==i.channelType.KalCare))("matTooltip",n.TypeID!=i.channelType.KalCare?"Edit this product in Seller Center, inventory changes must be done via DEALPOS":"")}}function j(o,a){if(1&o&&t.YNc(0,$,20,18,"tr",8),2&o){const n=t.oxw().$implicit;t.Q6J("ngForOf",null==n?null:n.Channel)}}function z(o,a){if(1&o&&(t.ynx(0),t.YNc(1,R,9,2,"ng-container",9),t.YNc(2,j,1,1,"ng-template",null,10,t.W1O),t.BQk()),2&o){const n=a.$implicit,e=t.MAs(3);t.xp6(1),t.Q6J("ngIf",!n.Channel||n.Channel.length<1)("ngIfElse",e)}}let E=(()=>{class o{constructor(n,e){this.data=n,this.dialogRef=e,this.channelType=p.x,this.variants=n.variants,this.title=n.title}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new M.O,this.modalConfig.title=this.data.title,this.modalConfig.bodyScrollable=!0,this.modalConfig.hideCancel=!0,this.modalConfig.hideOk=!0}getChannelLogo(n){return c.g.getChannelLogoByTypeId(n)}getHyperlinkSellerCenter(n){let e="javascript:void(0)";switch(n.TypeID){case p.x.ShopeeV2:e=`${_.Shoope}/portal/product/${n.ChannelItemID}`;break;case p.x.Tiktok:e=`${_.Tiktok}/product/edit/${n.ChannelItemID}`;break;case p.x.Tokopedia:e=`${_.Tokopedia}/edit-product/${n.ChannelItemID}`;break;case p.x.WooCommerce:e=`${_.WooCommerce}/wp-admin/post.php?post=${n.ChannelItemID}&action=edit`;break;case p.x.Lazada:e=`${_.Lazada}/apps/product/publish?productId=${n.ChannelItemID}`}return e}}return o.\u0275fac=function(n){return new(n||o)(t.Y36(h.WI),t.Y36(h.so))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-modal-variant"]],decls:22,vars:2,consts:[[3,"config","onCancel"],["content",""],[1,"table"],[1,"sticky-top-thead","variant-modal"],[1,"text-start","sticky-top"],["matTooltip","Variant from POS",1,"fas","fa-info-circle","ms-1"],["matTooltip","Product and Variant from each Channel",1,"fas","fa-info-circle","ms-1"],[1,"text-start","sticky-top",2,"width","0%"],[4,"ngFor","ngForOf"],[4,"ngIf","ngIfElse"],["printChannelModal",""],[1,"text-start"],["colspan","3",1,"text-center"],[1,"my-auto"],["class","text-start",4,"ngIf"],[1,"d-flex"],["target","_blank",1,"me-1",3,"href","title"],[2,"width","20px","height","20px",3,"src"],[1,"text-ellipsis","ps-2",2,"max-width","18vw",3,"matTooltip"],[1,"text-center"],["target","_blank",1,"btn","btn-small","btn-light","px-4","py-2",3,"href","ngClass","matTooltip"],[1,"fa-solid","fa-pencil","me-2",2,"font-size","10px"],[1,"fs-6"]],template:function(n,e){1&n&&(t.TgZ(0,"modal-material",0),t.NdJ("onCancel",function(){return e.dialogRef.close()}),t.TgZ(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th",4),t._uU(6," VARIANT "),t.TgZ(7,"sup"),t._UZ(8,"i",5),t.qZA()(),t.TgZ(9,"th",4),t._uU(10,"SKU"),t.qZA(),t.TgZ(11,"th",4),t._uU(12," PRODUCT "),t.TgZ(13,"sup"),t._UZ(14,"i",6),t.qZA()(),t.TgZ(15,"th",4),t._uU(16,"PRICE"),t.qZA(),t.TgZ(17,"th",7),t._uU(18,"INVENTORY"),t.qZA(),t._UZ(19,"th",4),t.qZA()(),t.TgZ(20,"tbody"),t.YNc(21,z,4,2,"ng-container",8),t.qZA()()()()),2&n&&(t.Q6J("config",e.modalConfig),t.xp6(21),t.Q6J("ngForOf",e.variants))},dependencies:[d.mk,d.sg,d.O5,C.gM,w.M,d.JJ],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.sticky-top-thead[_ngcontent-%COMP%] th.sticky-top[_ngcontent-%COMP%]{top:0px}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr.sticky-top[_ngcontent-%COMP%]{border:none!important;border-bottom:1px solid!important}table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]{border-top:none!important;border-left:none!important;border-right:none!important}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background-color:#fff!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child:after{border-right:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child:before{border-left:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:before{border-top:0px}a.is-disabled[_ngcontent-%COMP%]{color:gray;cursor:default}a.is-disabled[_ngcontent-%COMP%]:hover{text-decoration:none}"]}),o})();var g=s(9300),W=s(7579),X=s(2722),b=s(6082),I=s(7185);function tt(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"app-select-search",15),t.NdJ("onSelect",function(i){t.CHM(n);const l=t.oxw().index,r=t.oxw();return t.KtG(r.onSelectCategory(i,l))}),t.qZA(),t.BQk()}if(2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("data",n.Categories)("batchSize",30)}}function nt(o,a){if(1&o&&(t.TgZ(0,"div",16),t._UZ(1,"input",17),t.qZA()),2&o){const n=t.oxw().$implicit,e=t.oxw();t.xp6(1),t.Q6J("placeholder",e.getChannelCategory(n.TypeID))}}function et(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"tr")(2,"td",8)(3,"input",9),t.NdJ("ngModelChange",function(i){const r=t.CHM(n).$implicit;return t.KtG(r.Selected=i)})("ngModelChange",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onSelectChannel())}),t.qZA()(),t.TgZ(4,"td")(5,"div",10),t._UZ(6,"img",11),t.TgZ(7,"span",12),t._uU(8),t.qZA()()(),t.TgZ(9,"td"),t.YNc(10,tt,2,2,"ng-container",13),t.YNc(11,nt,2,1,"ng-template",null,14,t.W1O),t.qZA()(),t.BQk()}if(2&o){const n=a.$implicit,e=t.MAs(12);t.xp6(3),t.Q6J("ngModel",n.Selected),t.xp6(3),t.Q6J("src",n.Img,t.LSH),t.xp6(2),t.Oqu(n.Name),t.xp6(2),t.Q6J("ngIf",n.Categories.length>0)("ngIfElse",e)}}let L=(()=>{class o{constructor(n,e,i,l,r){this.data=n,this.channelService=e,this.productService=i,this.dialogRef=l,this.toastrService=r,this.channelOptions=[],this.uploadResponse=[],this.channelType=p.x,this.enableBtnOk=!1,this.destroy$=new W.x,this.uploadResponse=[],this.channels=this.data.channels,this.products=this.data.products}ngOnInit(){this.initModalConfig(),this.initChannelOptions(),this.initCategories()}initModalConfig(){this.modalConfig=new M.O,this.modalConfig.title=this.data.title,this.modalConfig.bodyScrollable=!0}initCategories(){this.filterChannelTypeId().forEach(e=>{this.channelService.getCategoriesByTypeId(e).pipe((0,X.R)(this.destroy$)).subscribe(i=>{this.setCategoriesChannelOption(e,i)})})}setCategoriesChannelOption(n,e){this.channelOptions=this.channelOptions.map(i=>(i.TypeID==n&&(i.Categories=e),i))}initChannelOptions(){this.channelOptions=this.channels.map(n=>({Name:n.Name,Img:n.Img,ID:n.ID,Selected:!1,CategoryID:0,TypeID:n.TypeID,Categories:[]}))}filterChannelTypeId(){return this.data.channels.map(e=>e.TypeID).filter((e,i,l)=>l.indexOf(e)==i).filter(e=>e==p.x.Lazada||e==p.x.Tokopedia)}onSelectCategory(n,e){this.channelOptions[e].CategoryID=n}onSelectAllChannel(n){this.channelOptions=this.channelOptions.map(e=>(e.Selected=n,e)),this.enableBtnOk=n}onSelectChannel(){this.enableBtnOk=this.hasSelectedChannel()}hasSelectedChannel(){return-1!==this.channelOptions.findIndex(n=>n.Selected)}onClose(){this.dialogRef.close("CANCEL")}onSave(){if(!this.validateSelectedCategory())return void this.toastrService.warning("Category is required","Warning!");const n=this.channelOptions.filter(e=>e.Selected).map(e=>({CategoryID:e.CategoryID,ChannelID:e.ID}));this.submitToServer(n)}validateSelectedCategory(){return-1==this.channelOptions.filter(e=>e.Selected).filter(e=>e.TypeID==p.x.Lazada||e.TypeID==p.x.Tokopedia).findIndex(e=>0==e.CategoryID)}submitToServer(n){this.productService.uploadToMultipleChannel(this.products,n).subscribe({next:e=>{this.dialogRef.close(e),this.productService.showToastrSuccessUploadMultiple(e,this.data.products[0])},error:e=>{this.dialogRef.close("ERROR"),this.productService.showToastErrorUploadMultiple(e,this.data.products[0])}})}getChannelCategory(n){let e;switch(n){case p.x.ShopeeV2:e="Perlengkapan Rumah Lainnya";break;case p.x.Tiktok:e="Perlengkapan Rumah - Dekorasi Rumah - Poster & Produck Cetak";break;case p.x.WooCommerce:e="New Product";break;default:e="Unavailable Category"}return e}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}}return o.\u0275fac=function(n){return new(n||o)(t.Y36(h.WI),t.Y36(A),t.Y36(b.M),t.Y36(h.so),t.Y36(I._W))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-modal-uploadMultiple-product"]],decls:13,vars:3,consts:[[3,"dynamicValidated","config","onOk","onClose","onCancel"],["content",""],[1,"table"],[1,"text-center",2,"width","6%"],["type","checkbox",3,"change"],[2,"width","30%"],[2,"width","60%"],[4,"ngFor","ngForOf"],[1,"text-center"],["type","checkbox",3,"ngModel","ngModelChange"],[1,"d-flex","align-items-center"],["alt","",1,"channel-logo",3,"src"],[1,"ms-3"],[4,"ngIf","ngIfElse"],["EMPTY",""],["appearance","outline","bindLabel","Value","bindValue","Key","placeholder","Select Category",3,"data","batchSize","onSelect"],["matTooltip","Product Category is Harcoded, Please Change Product Category in Seller Center","matTooltipPosition","above"],["type","text","disabled","",1,"form-control","rounded",2,"height","40px",3,"placeholder"]],template:function(n,e){1&n&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return e.onSave()})("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()}),t.TgZ(1,"div",1)(2,"table",2)(3,"thead")(4,"tr")(5,"th",3)(6,"input",4),t.NdJ("change",function(l){return e.onSelectAllChannel(l.target.checked)}),t.qZA()(),t.TgZ(7,"th",5),t._uU(8," CHANNEL "),t.qZA(),t.TgZ(9,"th",6),t._uU(10,"CATEGORY"),t.qZA()()(),t.TgZ(11,"tbody"),t.YNc(12,et,13,5,"ng-container",7),t.qZA()()()()),2&n&&(t.Q6J("dynamicValidated",e.enableBtnOk)("config",e.modalConfig),t.xp6(12),t.Q6J("ngForOf",e.channelOptions))},dependencies:[d.sg,d.O5,u.Wl,u.JJ,u.On,C.gM,J.h,w.M],styles:["input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}img.channel-logo[_ngcontent-%COMP%]{width:24px;height:24px}table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]{border-top:none!important;border-left:none!important;border-right:none!important}"]}),o})();var S=s(7481),Z=s(1739);function ot(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"img",19),t.NdJ("click",function(i){t.CHM(n);const l=t.oxw();return t.KtG(l.openBiggerPicture(i))}),t.qZA(),t.BQk()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("src",n.image,t.LSH)}}function it(o,a){1&o&&t._UZ(0,"img",20)}function at(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",24)(2,"a",25),t._UZ(3,"i",26),t.qZA()(),t.BQk()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("href",n.redirectUrl,t.LSH)}}function lt(o,a){if(1&o&&(t.TgZ(0,"div",21),t._UZ(1,"i",22),t.TgZ(2,"span"),t._uU(3),t.qZA(),t.YNc(4,at,4,1,"ng-container",23),t.qZA()),2&o){const n=t.oxw();t.xp6(3),t.Oqu(n.code),t.xp6(1),t.Q6J("ngIf","SKU not assigned"!==n.code&&n.showRedirectIcon)}}function rt(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",27),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onEventDesc())}),t._UZ(1,"i",28),t.TgZ(2,"span"),t._uU(3),t.qZA()()}if(2&o){const n=t.oxw();t.xp6(3),t.Oqu(n.description)}}function ct(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",29)(1,"input",30),t.NdJ("change",function(i){t.CHM(n);const l=t.oxw();return t.KtG(l.onCheck(i.target.checked))}),t.qZA()()}}function st(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"button",31),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onDownload())}),t._UZ(1,"i",32),t._uU(2," Download "),t.qZA()}}function dt(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"button",31),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onUpload())}),t._UZ(1,"i",33),t._uU(2," Upload "),t.qZA()}}function pt(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"button",34),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onScan())}),t._UZ(1,"i",35),t._uU(2," Scan "),t.qZA()}}const ut=function(o){return{"me-3":o}};function ht(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"a",37),t._UZ(2,"img",38),t.qZA(),t.BQk()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(2);t.xp6(1),t.s9C("href",n.Url,t.LSH),t.xp6(1),t.Q6J("ngClass",t.VKq(4,ut,e!=i.channels.length-1))("src",i.getChannelLogo(n),t.LSH)("matTooltip",n.Title?n.Title:n.Name)}}function gt(o,a){if(1&o&&(t.ynx(0),t.YNc(1,ht,3,6,"ng-container",36),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",n.channels)}}const mt=function(o){return{"border-bottom pb-2":o}};function _t(o,a){if(1&o&&(t.TgZ(0,"li")(1,"div",42)(2,"div",43)(3,"a",37),t._UZ(4,"img",44),t.TgZ(5,"span",45),t._uU(6),t.qZA()()()()()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(2);t.xp6(2),t.Q6J("ngClass",t.VKq(4,mt,e!=i.channels.length-1)),t.xp6(1),t.Q6J("href",n.Url,t.LSH),t.xp6(1),t.Q6J("src",i.getChannelLogo(n),t.LSH),t.xp6(2),t.Oqu(n.Title)}}function Ct(o,a){if(1&o&&(t.TgZ(0,"div",39)(1,"button",40),t._uU(2),t.qZA(),t.TgZ(3,"ul",41),t.YNc(4,_t,7,6,"li",36),t.qZA()()),2&o){const n=t.oxw();t.xp6(2),t.hij(" ",n.channels.length," CHANNELS "),t.xp6(2),t.Q6J("ngForOf",n.channels)}}let N=(()=>{class o{constructor(n){this.biggerPictureService=n,this.uploadButton=!1,this.scanButton=!1,this.showCheckBox=!1,this.downloadButton=!1,this.hasZoom=!0,this.showRedirectIcon=!0,this.onUploadEvent=new t.vpe,this.onScanEvent=new t.vpe,this.checkBoxChange=new t.vpe,this.onDescEvent=new t.vpe,this.onDownloadEvent=new t.vpe}ngAfterContentInit(){this.initRedirectUrl()}initRedirectUrl(){let n=localStorage.getItem("Authorization"),e=JSON.parse(n)?.Host;this.redirectUrl=`https://${e}/menu/Products/Catalog/Products/Info?ID=${this.productId}`}onUpload(){this.onUploadEvent.emit()}onScan(){this.onScanEvent.emit()}onCheck(n){this.checkBoxChange.emit(n)}onEventDesc(){this.onDescEvent.emit()}onDownload(){this.onDownloadEvent.emit()}getChannelLogo(n){return c.g.getChannelLogoByTypeId(n.TypeID)}openBiggerPicture(n){this.biggerPictureService.openBiggerPicture(n,this.imageForZoom)}}return o.\u0275fac=function(n){return new(n||o)(t.Y36(Z.k))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-product-card"]],inputs:{productId:"productId",uploadButton:"uploadButton",scanButton:"scanButton",showCheckBox:"showCheckBox",downloadButton:"downloadButton",image:"image",title:"title",code:"code",description:"description",channels:"channels",check:"check",imageForZoom:"imageForZoom",hasZoom:"hasZoom",showRedirectIcon:"showRedirectIcon"},outputs:{onUploadEvent:"onUpload",onScanEvent:"onScan",checkBoxChange:"onCheckBoxChange",onDescEvent:"onDescEvent",onDownloadEvent:"onDownload"},decls:26,vars:11,consts:[[1,"card",2,"margin-bottom","0px"],[1,"card-body","py-6"],[1,"row"],[1,"col-4"],[1,"productUpload_defaultSize","me-2","image-upload"],[1,"imgContainer"],[4,"ngIf","ngIfElse"],["elsePic",""],[1,"col-7","d-inline-block","justify-content-between","gx-0",2,"padding-left","0px"],[1,"itemTitle","cursor-pointer",3,"click"],["class","description cursor-pointer",4,"ngIf"],["class","description cursor-pointer",3,"click",4,"ngIf"],[1,"col-1","gx-0","d-flex","justify-content-center"],[1,"text-end"],["class","text-end gx-0",4,"ngIf"],[1,"card-footer","d-flex","justify-content-between","py-5","bg-footer","align-items-center",2,"border-top","0.1px solid rgb(220 220 220)"],["class","fs-6 btn btn-light btn-sm me-3",3,"click",4,"ngIf"],["class","fs-6 btn btn-light btn-sm",3,"click",4,"ngIf"],["DROPDOWN",""],["alt","",1,"rounded","imgUpload","float-left",3,"src","click"],["src","//res.cloudinary.com/pos/image/upload/w_110/POS/Images/Icon/products_thumb.png",1,"rounded","float-left","imgUpload"],[1,"description","cursor-pointer"],[1,"fa","fa-barcode","me-2"],[4,"ngIf"],[1,"ms-2"],["target","_blank",2,"color","#0976b4",3,"href"],[1,"fas","fa-external-link-alt"],[1,"description","cursor-pointer",3,"click"],[1,"fa","fa-tag","me-2"],[1,"text-end","gx-0"],["type","checkbox",3,"change"],[1,"fs-6","btn","btn-light","btn-sm","me-3",3,"click"],["aria-hidden","true",1,"fa","fa-download"],["aria-hidden","true",1,"fa","fa-upload"],[1,"fs-6","btn","btn-light","btn-sm",3,"click"],[1,"fa","fa-spinner"],[4,"ngFor","ngForOf"],["target","_blank",3,"href"],["alt","",1,"img-logo",3,"ngClass","src","matTooltip"],[1,"dropdown"],["type","button","id","dropdownMenuButton1","data-bs-toggle","dropdown","aria-expanded","false",1,"btn","fs-6","btn-sm","btn-light","dropdown-toggle"],[1,"dropdown-menu"],[1,"dropdown-item","py-2",2,"cursor","pointer"],[3,"ngClass"],[1,"img-logo",3,"src"],[1,"ms-4"]],template:function(n,e){if(1&n&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5),t.YNc(6,ot,2,1,"ng-container",6),t.YNc(7,it,1,0,"ng-template",null,7,t.W1O),t.qZA()()(),t.TgZ(9,"div",8)(10,"h4",9),t.NdJ("click",function(){return e.onEventDesc()}),t._uU(11),t.qZA(),t.YNc(12,lt,5,2,"div",10),t.YNc(13,rt,4,1,"div",11),t.qZA(),t.TgZ(14,"div",12)(15,"div",13),t.YNc(16,ct,2,0,"div",14),t.qZA()()()(),t.TgZ(17,"div",15)(18,"div"),t.YNc(19,st,3,0,"button",16),t.YNc(20,dt,3,0,"button",16),t.YNc(21,pt,3,0,"button",17),t.qZA(),t.TgZ(22,"div"),t.YNc(23,gt,2,1,"ng-container",6),t.YNc(24,Ct,5,2,"ng-template",null,18,t.W1O),t.qZA()()()),2&n){const i=t.MAs(8),l=t.MAs(25);t.xp6(6),t.Q6J("ngIf",e.image)("ngIfElse",i),t.xp6(5),t.hij(" ",e.title," "),t.xp6(1),t.Q6J("ngIf",e.code),t.xp6(1),t.Q6J("ngIf",e.description),t.xp6(3),t.Q6J("ngIf",e.showCheckBox),t.xp6(3),t.Q6J("ngIf",e.downloadButton),t.xp6(1),t.Q6J("ngIf",e.uploadButton),t.xp6(1),t.Q6J("ngIf",e.scanButton),t.xp6(2),t.Q6J("ngIf",e.channels.length<4)("ngIfElse",l)}},dependencies:[d.mk,d.sg,d.O5,C.gM],styles:[".img-logo[_ngcontent-%COMP%]{height:24px;width:24px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;max-width:100%}.bg-footer[_ngcontent-%COMP%]{background-color:#ededed69}.description[_ngcontent-%COMP%]{font-weight:300;margin-left:2px}.productUpload_defaultSize[_ngcontent-%COMP%]{max-width:100px!important;max-height:100px!important;width:auto!important;height:auto!important}.image-upload[_ngcontent-%COMP%]{position:relative}.imgContainer[_ngcontent-%COMP%]{width:100%;height:100px}.imgUpload[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:scale-down;cursor:pointer}.dropdown[_ngcontent-%COMP%] .dropdown-menu.show[_ngcontent-%COMP%]{top:unset!important}"]}),o})();var O=s(6732);function ft(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"button",10),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onOpenScanDialog())}),t._UZ(1,"i",11),t._uU(2," Scan Channel "),t.qZA()}}function xt(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"button",12),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onScanMultipleProduct())}),t._UZ(1,"i",11),t._uU(2),t.qZA()}if(2&o){const n=t.oxw();let e;t.xp6(2),t.hij(" Scan Selected Product (",null==(e=n.productService.selectedProduct(n.products))?null:e.length,") ")}}function Pt(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"button",13),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onUploadMultipleProductSingleChannel())}),t._UZ(1,"i",14),t._uU(2," Upload Bulk "),t.qZA()}}function bt(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",15)(1,"app-product-card",16),t.NdJ("onUpload",function(){const l=t.CHM(n).$implicit,r=t.oxw();return t.KtG(r.onUploadToMultipleChannel(l))})("onScan",function(){const l=t.CHM(n).$implicit,r=t.oxw();return t.KtG(r.onScanSingleProduct(l))})("onDescEvent",function(){const l=t.CHM(n).index,r=t.oxw();return t.KtG(r.onOpenDialogVariant(l))})("onCheckBoxChange",function(i){const r=t.CHM(n).$implicit;return t.KtG(r.selected=i)}),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("productId",n.ID)("title",null==n?null:n.Name)("image",null==n?null:n.ThumbnailUrl)("description",(null==n?null:n.Variants.length)>1?(null==n?null:n.Variants.length)+" Variants":null)("channels",e.productService.getChannelProduct(n))("code",e.getVariantCode(null==n?null:n.Variants))("showCheckBox",(null==n?null:n.Channel.length)<e.channelOptions.length)("scanButton",!0)("uploadButton",null==n?null:n.hasUpload)("imageForZoom",null==n?null:n.ImageUrl)}}let St=(()=>{class o{constructor(n,e,i,l){this.http=n,this.toastr=e,this.dialog=i,this.productService=l,this.searchFilter=new y.k,this.rowCount=0,this.getLoaderPage()}getLoaderPage(){this.productService.loader().subscribe(n=>{this.channelOptions=n.Options.Channel,this.searchFilter.PageNumber=n.Filter.PageNumber,this.searchFilter.RowCount=n.Filter.RowCount,this.searchFilter.ChannelID=null,this.searchFilter.PageSize=100,this.getProducts()})}getProducts(){this.http.post("/api/product/GetInPOS",{PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text}).subscribe(e=>{this.products=e.Data,this.rowCount=null==e.Total?this.searchFilter.RowCount:e.Total.toString(),this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions)})}onOpenScanDialog(){let n=JSON.parse(JSON.stringify(this.searchFilter));n.ChannelID=c.g.GuidEMpty,this.dialog.open(m.j,{data:{filter:n,channelOptions:this.channelOptions},width:"40%"}).afterClosed().pipe((0,g.h)(i=>c.g.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.Async=i.Async,this.scanAllProduct()})}scanAllProduct(){null!=this.searchFilter.ChannelID?this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(n=>{if(this.searchFilter.Async)this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"});else{this.getLoaderPage();let e=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.successToastrScanAllProduct(n,e,!this.searchFilter.UpdatedProduct)}}):this.toastr.error("Please Select Channel","Error")}onOpenDialogVariant(n){this.dialog.open(E,{data:{title:this.products[n].Name,variants:this.products[n].Variants},width:"50%"})}onUploadMultipleProductSingleChannel(){this.dialog.open(Q,{width:"350px",data:{item:null,selectedItemMissingChannel:this.channelOptions}}).afterClosed().subscribe(n=>{n&&this.uploadMultipleProduct(n.channelID,n.categoryID)})}uploadMultipleProduct(n,e){const i=this.productService.selectedProduct(this.products);this.productService.uploadMultipleProduct(i,n,e).subscribe(l=>{this.getProducts();const r=this.productService.findChannelById(n,this.channelOptions);this.toastr.success(i.length>1?"Successfully uploaded "+i.length+" Product to channel "+r?.Name:r?.Name+" Successfully Created","Success")})}onUploadToMultipleChannel(n){let e=this.productService.getChannelProduct(n);n.Channel=e;let i=this.productService.filterUnselectedChannel(n,this.channelOptions);this.dialog.open(L,{width:"700px",data:{title:`Upload - ${n.Name}`,channels:i,products:[n]}}).afterClosed().pipe((0,g.h)(l=>"CANCEL"!==l)).subscribe(l=>{this.getProducts()})}searchProduct(n){this.searchFilter.text=n,this.getProducts()}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPrevPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}onScanMultipleProduct(){let n=JSON.parse(JSON.stringify(this.searchFilter));n.ChannelID=c.g.GuidEMpty;let e=this.productService.filterChannelByTypeId(this.channelOptions,[p.x.Tokopedia,p.x.Tiktok]);this.dialog.open(m.j,{data:{filter:n,channelOptions:e,isSingleChannel:!0},width:"40%"}).afterClosed().pipe((0,g.h)(l=>c.g.IsNotEmpty(l))).subscribe(l=>{this.searchFilter.ChannelID=l.ChannelID,this.searchFilter.ScanFull=l.ScanFull,this.searchFilter.UpdatedProduct=l.UpdatedProduct;let r=this.productService.selectedProduct(this.products),f=this.productService.getVariantCodesProducts(r);this.scanSingleProduct(f)})}onScanSingleProduct(n){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=c.g.GuidEMpty,this.dialog.open(m.j,{data:{filter:e,channelOptions:this.channelOptions,isSingleChannel:!0},width:"40%"}).afterClosed().pipe((0,g.h)(i=>c.g.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID;const l=this.productService.getVariantCodesProduct(n);this.scanSingleProduct(l)})}scanSingleProduct(n){this.productService.scanSingle(this.searchFilter.ChannelID,n).subscribe({next:e=>{if(e)this.toastr.success("Successfully Scan ","Success");else{let i=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.toastr.error(`This product is not existed in ${i?.Name} `,"Error")}this.searchFilter.ChannelID=c.g.GuidEMpty,e&&this.getProducts()},error:e=>{this.searchFilter.ChannelID=c.g.GuidEMpty}})}getVariantCode(n){let e;return n.length>1&&(e=(n[0].model?n[0].model:"")+n[0].Code),1==n.length&&(e=n[0].Code),e}}return o.\u0275fac=function(n){return new(n||o)(t.Y36(x.O),t.Y36(I._W),t.Y36(h.uw),t.Y36(b.M))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-in-pos"]],decls:12,vars:9,consts:[["hideSearchDropdown","true","hideSearchDropdown","false","description","All products which is already available in POS",3,"headerTitle","onSubmit"],["type","button","data-cy","scanSoldinChannel","class","btn btn-outline-secondary shadow rounded",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos","class","btn btn-outline-secondary shadow rounded me-2",3,"click",4,"ngIf"],["class","btn btn-light shadow rounded ms-2",3,"click",4,"ngIf"],[1,"container-fluid"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"filter","totaldata","paginationTotal","hasClicked","next","previous"],["type","button","data-cy","scanSoldinChannel",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","onUpload","onScan","onDescEvent","onCheckBoxChange"]],template:function(n,e){1&n&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(l){return e.searchProduct(l)}),t.TgZ(1,"actions"),t.YNc(2,ft,3,0,"button",1),t.YNc(3,xt,3,1,"button",2),t.YNc(4,Pt,3,0,"button",3),t.qZA(),t.TgZ(5,"content")(6,"div",4)(7,"div",5),t.YNc(8,bt,2,10,"div",6),t.qZA(),t.TgZ(9,"div",7)(10,"div",8)(11,"app-custom-paginator",9),t.NdJ("next",function(){return e.onNextPage()})("previous",function(){return e.onPrevPage()}),t.qZA()()()()()()),2&n&&(t.Q6J("headerTitle","In POS ("+e.rowCount+")"),t.xp6(2),t.Q6J("ngIf",!e.productService.hasSelection(e.products)),t.xp6(1),t.Q6J("ngIf",e.productService.hasSelection(e.products)),t.xp6(1),t.Q6J("ngIf",e.productService.hasSelection(e.products)),t.xp6(4),t.Q6J("ngForOf",e.products),t.xp6(3),t.Q6J("filter",e.searchFilter)("totaldata",null==e.products?null:e.products.length)("paginationTotal",e.rowCount)("hasClicked",!0))},dependencies:[d.sg,d.O5,S.p,N,O.y],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.img-logo[_ngcontent-%COMP%]{height:24px;width:24px}"]}),o})();var P=s(8796);function vt(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"button",13),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onOpenScanDialog())}),t._UZ(1,"i",14),t._uU(2," Scan Channel "),t.qZA()}}function It(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"button",15),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onScanSelectedProduct())}),t._UZ(1,"i",14),t._uU(2),t.qZA()}if(2&o){const n=t.oxw();t.xp6(2),t.hij(" Scan Selected Product (",n.productService.selectedProduct(n.products).length,") ")}}function Tt(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"button",16),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onUploadMultipleProductSingleChannel())}),t._UZ(1,"i",17),t._uU(2," Upload Bulk "),t.qZA()}}function yt(o,a){if(1&o&&(t.TgZ(0,"span",18),t._UZ(1,"img",19),t.qZA(),t._uU(2)),2&o){const n=a.item,e=t.oxw();t.xp6(1),t.Q6J("src",e.getChannelLogo(n.TypeID),t.LSH),t.xp6(1),t.hij(" ",n.Name," ")}}function Mt(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div")(1,"h6"),t._uU(2,"Item ID"),t.qZA(),t.TgZ(3,"input",20),t.NdJ("ngModelChange",function(i){t.CHM(n);const l=t.oxw();return t.KtG(l.searchFilter.Item_id=i)}),t.qZA()()}if(2&o){const n=t.oxw();t.xp6(3),t.Q6J("ngModel",n.searchFilter.Item_id)}}function wt(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",21)(1,"app-product-card",22),t.NdJ("onUpload",function(){const l=t.CHM(n).$implicit,r=t.oxw();return t.KtG(r.onUploadToMultipleChannel(l))})("onDescEvent",function(){const l=t.CHM(n).index,r=t.oxw();return t.KtG(r.onOpenVariantDetail(l))})("onScan",function(){const l=t.CHM(n).$implicit,r=t.oxw();return t.KtG(r.onScanSingleProduct(l))})("onCheckBoxChange",function(i){const r=t.CHM(n).$implicit;return t.KtG(r.selected=i)}),t.qZA()()}if(2&o){const n=a.$implicit,e=t.oxw();t.xp6(1),t.Q6J("productId",null==n?null:n.ID)("title",null==n?null:n.Name)("image",null==n?null:n.ThumbnailUrl)("description",(null==n||null==n.Variants?null:n.Variants.length)>1?(null==n||null==n.Variants?null:n.Variants.length)+" Variants":null)("channels",e.productService.getChannelProduct(n))("code",e.getVariantCode(null==n?null:n.Variants))("showCheckBox",null==n?null:n.hasScan)("scanButton",!0)("uploadButton",null==n?null:n.hasUpload)("imageForZoom",null==n?null:n.ImageUrl)}}function Ot(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",23)(1,"div",24)(2,"app-custom-paginator",25),t.NdJ("total",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.getRowCount())})("next",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onNextPage())})("previous",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onPreviousPage())}),t.qZA()()()}if(2&o){const n=t.oxw();t.xp6(2),t.Q6J("filter",n.searchFilter)("totaldata",null==n.products?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}let Zt=(()=>{class o{constructor(n,e,i,l,r){this.http=n,this.dialog=e,this.toastr=i,this.productService=l,this.activateRouter=r,this.searchFilter=new y.k,this.rowCount=0,this.hasClickRowCount=!1,this.guidEmpty=c.g.GuidEMpty}ngOnInit(){this.activateRouter.queryParams.subscribe(n=>{this.initPageLoader(n.ID?n.ID:c.g.GuidEMpty)})}initPageLoader(n){this.productService.loader(n).subscribe(e=>{this.channelOptions=e.Options.Channel,this.searchFilter=e.Filter,e.Filter.ChannelID!=c.g.GuidEMpty&&(this.searchFilter.ListChannelID=[],this.searchFilter.ListChannelID.push(e.Filter.ChannelID)),this.searchFilter.PageSize=e.Filter.RowCount,this.searchFilter.Item_id="",this.getProducts()})}getProducts(){this.productService.findAllSoldInChannel({ListChannelID:this.searchFilter.ListChannelID,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Item_id:this.searchFilter.Item_id}).subscribe(e=>{this.products=e.Data,this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions),this.products=this.productService.checkProductHasScanButton(this.products,this.channelOptions)})}searchProduct(n){this.searchFilter.text=n,this.hasClickRowCount=!1,this.getProducts()}onOpenVariantDetail(n){this.dialog.open(E,{data:{variants:this.products[n].Variants,title:this.products[n].Name},width:"50%"})}onOpenScanDialog(){let n=JSON.parse(JSON.stringify(this.searchFilter));n.ChannelID=c.g.GuidEMpty,this.dialog.open(m.j,{data:{filter:n,channelOptions:this.channelOptions},width:"40%"}).afterClosed().pipe((0,g.h)(i=>c.g.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.Async=i.Async,this.scanAllProduct()})}scanAllProduct(){let n=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).pipe((0,g.h)(e=>e)).subscribe(e=>{this.searchFilter.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(e,n,!this.searchFilter.UpdatedProduct),this.initPageLoader(c.g.GuidEMpty))})}onScanSingleProduct(n){n.Channel=this.productService.getChannelProduct(n);let e=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(m.j,{data:{filter:e,channelOptions:this.channelOptions,isSingleChannel:!0},width:"40%"}).afterClosed().pipe((0,g.h)(i=>c.g.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID;const l=this.productService.getVariantCodesProduct(n);this.scanSingleProduct(l)})}onUploadToMultipleChannel(n){let e=this.productService.getChannelProduct(n);n.Channel=e;let i=this.productService.filterUnselectedChannel(n,this.channelOptions);this.dialog.open(L,{width:"700px",data:{title:`Upload - ${n.Name}`,channels:i,products:[n]}}).afterClosed().pipe((0,g.h)(l=>"CANCEL"!==l)).subscribe({next:l=>{this.getProducts()}})}onScanSelectedProduct(){let n=this.productService.filterChannelByTypeId(this.channelOptions,[p.x.Tokopedia,p.x.Tiktok]);this.searchFilter.ChannelID=c.g.GuidEMpty;let e=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(m.j,{data:{filter:e,channelOptions:n,isSingleChannel:!0},width:"40%"}).afterClosed().pipe((0,g.h)(l=>c.g.IsNotEmpty(l))).subscribe(l=>{this.searchFilter.ChannelID=l.ChannelID,this.searchFilter.ScanFull=l.ScanFull,this.searchFilter.UpdatedProduct=l.UpdatedProduct;let r=this.productService.selectedProduct(this.products),f=this.productService.getVariantCodesProducts(r);this.scanSingleProduct(f)})}scanSingleProduct(n){this.productService.scanSingle(this.searchFilter.ChannelID,n).subscribe({next:e=>{if(e)this.toastr.success("Successfully Scan ","Success");else{let i=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.toastr.error(`This product is not existed in ${i?.Name} `,"Error")}this.searchFilter.ChannelID=c.g.GuidEMpty,e&&this.getProducts()},error:e=>{this.searchFilter.ChannelID=c.g.GuidEMpty}})}getVariantCode(n){let e;return n.length>1&&(e=(n[0].model?n[0].model:"")+n[0].Code),1==n.length&&(e=n[0].Code),e}onClearFilterChannel(){this.searchFilter.ChannelID=c.g.GuidEMpty,this.searchFilter.Item_id=""}onUploadMultipleProductSingleChannel(){this.dialog.open(Q,{width:"40%",data:{item:null,selectedItemMissingChannel:this.channelOptions}}).afterClosed().subscribe(n=>{n&&this.uploadMultipleProduct(n.channelID,n.categoryID)})}uploadMultipleProduct(n,e){const i=this.productService.selectedProduct(this.products);this.productService.uploadMultipleProduct(i,n,e).subscribe(l=>{this.getProducts();const r=this.productService.findChannelById(n,this.channelOptions);this.toastr.success(i.length>1?"Successfully uploaded "+i.length+" Product to channel "+r?.Name:r?.Name+" Successfully Created","Success")})}getRowCount(){this.http.post("/api/product/GetSoldInChannelRowCount",{ListChannelID:this.searchFilter.ListChannelID,text:this.searchFilter.text}).subscribe(e=>{this.hasClickRowCount=!0,this.rowCount=e.Total})}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPreviousPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getChannelLogo(n){return c.g.getChannelLogoByTypeId(n)}}return o.\u0275fac=function(n){return new(n||o)(t.Y36(x.O),t.Y36(h.uw),t.Y36(I._W),t.Y36(b.M),t.Y36(v.gz))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-sold-in-channel"]],decls:19,vars:10,consts:[["headerTitle","Sold in Channel","description","SKU has been mapped between dealpos and marketplace",3,"onSubmit"],["type","button","data-cy","scanSoldinChannel","class","btn btn-outline-secondary shadow rounded",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos","class","btn btn-outline-secondary shadow rounded me-2",3,"click",4,"ngIf"],["class","btn btn-light shadow rounded ms-2",3,"click",4,"ngIf"],[1,"d-flex"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","multiple","items","ngModel","ngModelChange","clear"],["ng-option-tmp",""],[4,"ngIf"],[1,"container-fluid"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],["class","row",4,"ngIf"],["type","button","data-cy","scanSoldinChannel",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],["type","text","name","Item_id","id","Item_id",1,"form-control",3,"ngModel","ngModelChange"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","onUpload","onDescEvent","onScan","onCheckBoxChange"],[1,"row"],[1,"col-12"],[3,"filter","totaldata","paginationTotal","hasClicked","total","next","previous"]],template:function(n,e){1&n&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(l){return e.searchProduct(l)}),t.TgZ(1,"actions"),t.YNc(2,vt,3,0,"button",1),t.YNc(3,It,3,1,"button",2),t.YNc(4,Tt,3,0,"button",3),t.qZA(),t.TgZ(5,"filters")(6,"div",4)(7,"div",5)(8,"div")(9,"h6"),t._uU(10,"Channel"),t.qZA(),t.TgZ(11,"ng-select",6),t.NdJ("ngModelChange",function(l){return e.searchFilter.ListChannelID=l})("clear",function(){return e.onClearFilterChannel()}),t.YNc(12,yt,3,2,"ng-template",7),t.qZA()(),t.YNc(13,Mt,4,1,"div",8),t.qZA()()(),t.TgZ(14,"content")(15,"div",9)(16,"div",10),t.YNc(17,wt,2,10,"div",11),t.qZA(),t.YNc(18,Ot,3,4,"div",12),t.qZA()()()),2&n&&(t.xp6(2),t.Q6J("ngIf",!e.productService.hasSelection(e.products)),t.xp6(1),t.Q6J("ngIf",e.productService.hasSelection(e.products)),t.xp6(1),t.Q6J("ngIf",e.productService.hasSelection(e.products)),t.xp6(7),t.Q6J("clearable",!0)("multiple",!0)("items",e.channelOptions)("ngModel",e.searchFilter.ListChannelID),t.xp6(2),t.Q6J("ngIf",null!=e.searchFilter.ListChannelID),t.xp6(4),t.Q6J("ngForOf",e.products),t.xp6(1),t.Q6J("ngIf",null==e.products?null:e.products.length))},dependencies:[d.sg,d.O5,u.Fj,u.JJ,u.On,S.p,P.w9,P.ir,N,O.y],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}"]}),o})();var Nt=s(8505),Ft=s(4004),kt=s(7287);function Ut(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"img",28),t.NdJ("click",function(i){t.CHM(n);const l=t.oxw(3).$implicit,r=t.oxw(3);return t.KtG(r.onZoomImage(i,null==l?null:l.ImageUrl))}),t.qZA(),t.BQk()}if(2&o){const n=t.oxw(3).$implicit;t.xp6(1),t.Q6J("src",null==n?null:n.ImageUrl,t.LSH)}}function Dt(o,a){1&o&&t._UZ(0,"img",29)}function At(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"td",21)(2,"div",22),t.YNc(3,Ut,2,1,"ng-container",23),t.YNc(4,Dt,1,0,"ng-template",null,24,t.W1O),t.qZA()(),t.TgZ(6,"td",25)(7,"h4",26)(8,"span",27),t._uU(9),t.qZA()()(),t.BQk()),2&o){const n=t.MAs(5),e=t.oxw(2).$implicit;t.xp6(1),t.Q6J("rowSpan",null==e?null:e.Variants.length),t.xp6(2),t.Q6J("ngIf",null==e?null:e.ImageUrl)("ngIfElse",n),t.xp6(3),t.Q6J("rowSpan",null==e?null:e.Variants.length),t.xp6(2),t.Q6J("matTooltip",(null==e||null==e.Name?null:e.Name.length)>50?null==e?null:e.Name:""),t.xp6(1),t.hij(" ",null==e?null:e.Name," ")}}function Jt(o,a){if(1&o&&(t.TgZ(0,"div")(1,"a",17),t._UZ(2,"img",30),t.qZA()()),2&o){const n=a.$implicit;t.xp6(1),t.Q6J("href",n.URL,t.LSH),t.xp6(1),t.Q6J("src",n.Img,t.LSH)("matTooltip",n.Name)}}function Qt(o,a){if(1&o&&(t.TgZ(0,"div"),t._UZ(1,"img",30),t.qZA()),2&o){const n=a.$implicit;t.xp6(1),t.Q6J("src",n.Img,t.LSH)("matTooltip",n.Name)}}function Et(o,a){if(1&o&&(t.TgZ(0,"tr"),t.YNc(1,At,10,6,"ng-container",13),t.TgZ(2,"td"),t._uU(3),t.qZA(),t.TgZ(4,"td")(5,"span"),t._uU(6),t.qZA(),t.TgZ(7,"span",16)(8,"a",17),t._UZ(9,"i",18),t.qZA()()(),t.TgZ(10,"td",19)(11,"div",20),t.YNc(12,Jt,3,3,"div",15),t.qZA()(),t.TgZ(13,"td",19)(14,"div",20),t.YNc(15,Qt,2,2,"div",15),t.qZA()()()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(4);t.xp6(1),t.Q6J("ngIf",0==e),t.xp6(2),t.hij(" ",n.Name," "),t.xp6(3),t.hij(" ",n.Code," "),t.xp6(2),t.Q6J("href","https://"+i.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(null==n?null:n.ID),t.LSH),t.xp6(4),t.Q6J("ngForOf",null==n?null:n.Available),t.xp6(3),t.Q6J("ngForOf",null==n?null:n.NotAvailable)}}function Lt(o,a){if(1&o&&(t.ynx(0),t.YNc(1,Et,16,6,"tr",15),t.BQk()),2&o){const n=a.$implicit;t.xp6(1),t.Q6J("ngForOf",n.Variants)}}function qt(o,a){if(1&o&&(t.TgZ(0,"tbody"),t.YNc(1,Lt,2,1,"ng-container",15),t.qZA()),2&o){const n=a.ngIf;t.xp6(1),t.Q6J("ngForOf",n)}}function Bt(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",38),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.getRowCount())}),t.TgZ(1,"i",39),t._uU(2,"?"),t.qZA()()}}function Yt(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"number"),t.qZA()),2&o){const n=a.ngIf;t.xp6(1),t.Oqu(t.lcZ(2,1,null==n?null:n.Count))}}function Vt(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",40),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.onNextPage())}),t._UZ(1,"i",41),t._uU(2," Next"),t.qZA()}}function Rt(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",42),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.onLastPage())}),t._UZ(1,"i",43),t._uU(2," Last"),t.qZA()}}function Ht(o,a){if(1&o&&(t.TgZ(0,"div",31)(1,"div",32)(2,"div",33),t._uU(3),t.ALo(4,"number"),t.YNc(5,Bt,3,0,"span",34),t.YNc(6,Yt,3,3,"span",13),t.ALo(7,"async"),t._uU(8),t.qZA()(),t.TgZ(9,"div",35),t.YNc(10,Vt,3,0,"a",36),t.YNc(11,Rt,3,0,"a",37),t.qZA()()),2&o){const n=a.ngIf,e=t.oxw(2);t.xp6(3),t.hij(" Showing 1 - ",t.lcZ(4,6,null==n?null:n.length)," of "),t.xp6(2),t.Q6J("ngIf",e.paginationService.hideCount),t.xp6(1),t.Q6J("ngIf",!e.paginationService.hideCount&&t.lcZ(7,8,e.rowCount$)),t.xp6(2),t.hij(" records ~ ",e.paginationService.footerPageNumber," Page "),t.xp6(2),t.Q6J("ngIf",e.paginationService.disableNextButton&&!e.paginationService.goToLastPage),t.xp6(1),t.Q6J("ngIf",e.paginationService.disableNextButton&&!e.paginationService.goToLastPage)}}function Kt(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"mainpanel",1),t.NdJ("onSubmit",function(i){t.CHM(n);const l=t.oxw();return t.KtG(l.searchProduct(i))}),t.TgZ(1,"actions")(2,"button",2),t.NdJ("click",function(){const l=t.CHM(n).ngIf,r=t.oxw();return t.KtG(r.openScanDialog(l))}),t._UZ(3,"i",3),t._uU(4," Scan Channel "),t.qZA()(),t.TgZ(5,"content")(6,"div",4)(7,"div",5)(8,"div",6)(9,"table",7)(10,"thead",8)(11,"tr")(12,"th",9),t._uU(13,"Product"),t.qZA(),t.TgZ(14,"th",10),t._uU(15,"Variant"),t.qZA(),t.TgZ(16,"th",10),t._uU(17,"SKU"),t.qZA(),t.TgZ(18,"th",11),t._uU(19,"Available In"),t.qZA(),t.TgZ(20,"th",12),t._uU(21,"Not Available In"),t.qZA()()(),t.YNc(22,qt,2,1,"tbody",13),t.ALo(23,"async"),t.qZA()()(),t.YNc(24,Ht,12,10,"div",14),t.ALo(25,"async"),t.qZA()()()}if(2&o){const n=t.oxw();t.Q6J("hideSearchDropdown",!0),t.xp6(22),t.Q6J("ngIf",t.lcZ(23,3,n.data$)),t.xp6(2),t.Q6J("ngIf",t.lcZ(25,5,n.data$))}}let Gt=(()=>{class o{constructor(n,e,i,l,r,f){this.http=n,this.dialog=e,this.toastr=i,this.productService=l,this.paginationService=r,this.biggerPictureService=f,this.loaderAPI="product/Load",this.rowCountAPI="product/GetNotInChannelRowCount",this.notChannelAPI="product/GetNotInChannelV2"}ngOnInit(){this.initPageLoader(),this.iniData(),this.initHostName()}initHostName(){const n=localStorage.getItem("Authorization");this.hostName=JSON.parse(n)?.Host}initPageLoader(){this.paginationService.fetchDataEndpoint=this.notChannelAPI,this.loader$=this.http.post(`api/${this.loaderAPI}`,{}).pipe((0,Nt.b)(n=>{this.filterSearch=n.Filter,this.paginationService.resetToFirstPage(n.Filter)}))}iniData(){this.data$=this.paginationService.data$.pipe((0,Ft.U)(n=>n.map(e=>(e.Variants=e.Variants.map(i=>(i.Available=this.productService.sortChannel(i.Available),i.NotAvailable=this.productService.sortChannel(i.NotAvailable),i.Available=this.assignLogoChannel(i.Available),i.NotAvailable=this.assignLogoChannel(i.NotAvailable),i)),e))))}assignLogoChannel(n){return n.map(e=>(e.Img=c.g.getChannelLogoByTypeId(e.TypeID),e))}searchProduct(n){this.filterSearch.text=n,this.paginationService.resetToFirstPage(this.filterSearch)}scanAllProduct(n){let e=this.productService.findChannelById(this.filterSearch.ChannelID,n.Options.Channel);this.productService.scanAll(this.filterSearch.ChannelID,this.filterSearch.ScanFull,this.filterSearch.UpdatedProduct,this.filterSearch.Async).subscribe(i=>{this.filterSearch.Async?this.toastr.success("You will be notified when the scan is completed.","Scan Asynchronous"):(this.productService.successToastrScanAllProduct(i,e,!this.filterSearch.UpdatedProduct),this.initPageLoader())})}openScanDialog(n){let e=JSON.parse(JSON.stringify(this.filterSearch));e.ChannelID=c.g.GuidEMpty,this.dialog.open(m.j,{data:{filter:e,channelOptions:n.Options.Channel},width:"40%"}).afterClosed().pipe((0,g.h)(l=>c.g.IsNotEmpty(l))).subscribe(l=>{this.filterSearch.ChannelID=l.ChannelID,this.filterSearch.ScanFull=l.ScanFull,this.filterSearch.UpdatedProduct=l.UpdatedProduct,this.filterSearch.Async=l.Async,this.scanAllProduct(n)})}getChannelLogoById(n){return c.g.getChannelLogoByTypeId(n)}uploadProductToSingleChannel(n,e,i,l){let r=this.productService.findChannelById(e,l.Options.Channel);this.productService.uploadMultipleProduct([n],e,i).subscribe(f=>{this.paginationService.resetToFirstPage(l.Filter),this.toastr.success("Successfully uploaded "+n.Name+" to "+r.Name,"Success")})}getRowCount(){this.paginationService.hideCount=!1,this.rowCount$=this.http.post(`/api/${this.rowCountAPI}`,this.filterSearch)}onNextPage(){this.paginationService.onNextPage(this.filterSearch)}onLastPage(){this.http.post(`/api/${this.rowCountAPI}`,{}).subscribe({next:n=>{this.filterSearch.PageNumber=1,this.paginationService.getAllData(this.filterSearch,n.Count)}})}onZoomImage(n,e){this.biggerPictureService.openBiggerPicture(n,e)}ngOnDestroy(){this.paginationService.destroy()}}return o.\u0275fac=function(n){return new(n||o)(t.Y36(x.O),t.Y36(h.uw),t.Y36(I._W),t.Y36(b.M),t.Y36(kt.b),t.Y36(Z.k))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-not-in-channel"]],decls:2,vars:3,consts:[["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"hideSearchDropdown","onSubmit",4,"ngIf"],["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"hideSearchDropdown","onSubmit"],["data-cy","scanNotinChannel","type","button",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],["colspan","2",1,"ms-5","text-center",2,"width","450px"],[2,"width","150px"],[2,"width","20%"],[2,"width","16%"],[4,"ngIf"],["class","d-flex justify-content-between mt-5",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"ms-1"],["target","_blank",3,"href"],[1,"fas","fa-lg","fa-external-link-alt","external-link-custom"],[2,"padding-left","0px"],[1,"d-flex","flex-wrap","mb-1"],[1,"text-center",3,"rowSpan"],[2,"padding-right","0px"],[4,"ngIf","ngIfElse"],["elsePic",""],[1,"text-start",3,"rowSpan"],[1,"ms-5","fw-normal","text-ellipsis",2,"max-width","26vw !important"],[3,"matTooltip"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"src","click"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded",2,"max-width","40px"],["alt","",1,"channel-logo","cursor-pointer","ms-4","mt-3",3,"src","matTooltip"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load all products",3,"click",4,"ngIf"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(n,e){1&n&&(t.YNc(0,Kt,26,7,"mainpanel",0),t.ALo(1,"async")),2&n&&t.Q6J("ngIf",t.lcZ(1,1,e.loader$))},dependencies:[d.sg,d.O5,C.gM,S.p,d.Ov,d.JJ],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}thead[_ngcontent-%COMP%]{position:sticky;top:0}.channel-logo[_ngcontent-%COMP%]{width:20px}.w-img[_ngcontent-%COMP%]{width:100%}"]}),o})();function $t(o,a){if(1&o&&(t.TgZ(0,"tr")(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td"),t._uU(4),t.qZA()()),2&o){const n=a.$implicit;t.xp6(2),t.Oqu(null==n?null:n.Name),t.xp6(2),t.Oqu(null==n?null:n.ChannelVariationSKU)}}let jt=(()=>{class o{constructor(n,e){this.data=n,this.dialogRef=e}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new M.O,this.modalConfig.title=this.data?.title,this.modalConfig.hideOk=!0,this.modalConfig.hideCancel=!0}}return o.\u0275fac=function(n){return new(n||o)(t.Y36(h.WI),t.Y36(h.so))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-modal-variants"]],decls:11,vars:2,consts:[[3,"config","onCancel"],["content",""],[1,"table"],[1,"thead-light"],[4,"ngFor","ngForOf"]],template:function(n,e){1&n&&(t.TgZ(0,"modal-material",0),t.NdJ("onCancel",function(){return e.dialogRef.close()}),t.TgZ(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th"),t._uU(6,"Variant"),t.qZA(),t.TgZ(7,"th"),t._uU(8,"SKU"),t.qZA()()(),t.TgZ(9,"tbody"),t.YNc(10,$t,5,2,"tr",4),t.qZA()()()()),2&n&&(t.Q6J("config",e.modalConfig),t.xp6(10),t.Q6J("ngForOf",e.data.variants))},dependencies:[d.sg,w.M],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}"]}),o})();var F=s(1948);function zt(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"button",13),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.openScanDialog())}),t._UZ(1,"i",14),t._uU(2," Scan Channel "),t.qZA()}}function Wt(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"button",15),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onDownloadAllProduct("SELECTED"))}),t._UZ(2,"i",16),t._uU(3),t.qZA(),t.BQk()}if(2&o){const n=t.oxw();let e;t.xp6(3),t.hij(" Download Product (",null==(e=n.productService.selectedProduct(n.products))?null:e.length,") ")}}function Xt(o,a){if(1&o&&(t.TgZ(0,"span",17),t._UZ(1,"img",18),t.qZA(),t._uU(2)),2&o){const n=a.item,e=t.oxw();t.xp6(1),t.Q6J("src",e.getChannelLogo(n.TypeID),t.LSH),t.xp6(1),t.hij(" ",n.Name," ")}}const tn=function(o){return[o]},nn=function(){return[]};function en(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",19)(1,"app-product-card",20),t.NdJ("onCheckBoxChange",function(i){const r=t.CHM(n).index,f=t.oxw();return t.KtG(f.onSelectProduct(i,r))})("onDescEvent",function(){const l=t.CHM(n).index,r=t.oxw();return t.KtG(r.onShowVariantDetail(l))})("onDownload",function(){const l=t.CHM(n).$implicit,r=t.oxw();return t.KtG(r.onDownloadProduct(l))})("onScan",function(){const l=t.CHM(n).$implicit,r=t.oxw();return t.KtG(r.onScanChannel(l))}),t.qZA()()}if(2&o){const n=a.$implicit;t.xp6(1),t.Q6J("showRedirectIcon",!1)("title",null==n?null:n.Name)("image",null==n?null:n.Image)("imageForZoom",null==n?null:n.Image)("code",null==n?null:n.SKU)("description",(null==n||null==n.Variant?null:n.Variant.length)>0?(null==n||null==n.Variant?null:n.Variant.length)+" Variants":null)("downloadButton",!0)("channels",null!=n&&n.Channel?t.VKq(10,tn,null==n?null:n.Channel):t.DdM(12,nn))("showCheckBox",!0)("scanButton",!0)}}function on(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",21)(1,"div",22)(2,"app-custom-paginator",23),t.NdJ("total",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.getRowCount())})("next",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onNextPage())})("previous",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onPreviousPage())}),t.qZA()()()}if(2&o){const n=t.oxw();t.xp6(2),t.Q6J("filter",n.searchFilter)("totaldata",null==n.products?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}let an=(()=>{class o{constructor(n,e,i,l,r){this.http=n,this.dialog=e,this.productService=i,this.toastrService=l,this.activateRouter=r,this.searchFilter=new y.k,this.hasClickRowCount=!1}ngOnInit(){this.activateRouter.queryParams.subscribe(n=>{this.initPageLoader(n.ID?n.ID:c.g.GuidEMpty)})}initPageLoader(n){this.productService.loader(n).subscribe(e=>{this.channelOptions=e.Options.Channel,this.searchFilter=e.Filter,this.searchFilter.PageSize=e.Filter.RowCount,this.getProducts()})}getProducts(){this.http.post("/api/product/GetProductChannelNotPOS",{ChannelID:this.searchFilter.ChannelID,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,HaveSku:this.searchFilter.HaveSku}).subscribe(e=>{this.products=e.Data,this.mapChannelToProduct(),this.setSkuProduct()})}mapChannelToProduct(){this.products=this.products.map(n=>(n.Channel=JSON.parse(JSON.stringify(this.channelOptions.find(e=>e.ID==n.ChannelID))),n)).map(n=>(n.Channel.Url=n.Url,n))}setSkuProduct(){this.products=this.products.map(n=>(n.SKU=0==n?.Variant?.length?c.g.IsNotEmpty(n?.ChannelItemSKU)?n?.ChannelItemSKU:"SKU not assigned":n?.Variant[0]?.ChannelVariationSKU?n?.Variant[0]?.ChannelVariationSKU:"SKU not assigned",n))}onSearch(n){this.searchFilter.text=n,this.hasClickRowCount=!1,this.getProducts()}onClearChannelFilter(){this.searchFilter.ChannelID=c.g.GuidEMpty}onScanAll(){let n=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(e=>{this.searchFilter.Async?this.toastrService.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.initPageLoader(c.g.GuidEMpty),this.productService.successToastrScanAllProduct(e,n,!this.searchFilter.UpdatedProduct)),this.searchFilter.ChannelID=c.g.GuidEMpty})}openScanDialog(){let n=JSON.parse(JSON.stringify(this.searchFilter));n.ChannelID=c.g.GuidEMpty,this.dialog.open(m.j,{data:{filter:n,channelOptions:this.channelOptions},width:"40%"}).afterClosed().pipe((0,g.h)(i=>c.g.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.Async=i.Async,this.onScanAll()})}onDownloadAllProduct(n){let e;e="ALL"==n?this.products:this.productService.selectedProduct(this.products),e.length>0&&this.productService.downloadMultipleProduct(e).subscribe({next:()=>{this.getProducts()}})}onSelectProduct(n,e){this.products[e].selected=n}onDownloadProduct(n){!confirm(`Are you sure you want to Retrieve product ${n?.Name} from ${n?.Channel.Name} to POS?`)||this.productService.downloadProduct(n).subscribe({next:()=>{this.getProducts()}})}onScanChannel(n){let e=JSON.parse(JSON.stringify(n));delete e.Channel,this.productService.scanCompareToPos([e]).subscribe(i=>{i.Status?(this.initPageLoader(c.g.GuidEMpty),this.toastrService.success(`product ${n.Name} have been successfully scanned and synchronized with POS`,"Success")):this.toastrService.error(`Product ${n.Name} is not existed in POS`,"Error")})}onShowVariantDetail(n){let e=this.products[n].Variant;e.length>0&&this.dialog.open(jt,{data:{title:this.products[n].Name,variants:e},width:"30%"})}getRowCount(){let n={ChannelID:this.searchFilter.ChannelID,text:this.searchFilter.text,HaveSku:parseInt(this.searchFilter.HaveSku)};this.http.post("/api/product/GetProductChannelNotPOSRowCount",n).subscribe(e=>{this.hasClickRowCount=!0,this.rowCount=e.Count})}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPreviousPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getChannelLogo(n){return c.g.getChannelLogoByTypeId(n)}}return o.\u0275fac=function(n){return new(n||o)(t.Y36(x.O),t.Y36(h.uw),t.Y36(b.M),t.Y36(I._W),t.Y36(v.gz))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-not-in-pos"]],decls:27,vars:11,consts:[["headerTitle","Not in POS","textButton","Search","description","SKU sold in Marketplace but not exist in DEALPOS",3,"onSubmit"],["type","button","data-cy","scanNotInPos","class","btn btn-outline-secondary shadow rounded",3,"click",4,"ngIf"],[4,"ngIf"],[1,"d-flex"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","items","ngModel","ngModelChange","clear"],["ng-option-tmp",""],["name","haveSKU",1,"form-control","h-100","pt-3","rounded",3,"ngModel","ngModelChange"],[1,"me-5",3,"value"],[1,"container-fluid","mt-3"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],["class","row",4,"ngIf"],["type","button","data-cy","scanNotInPos",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button",1,"btn","btn-success","shadow-sm","rounded","ms-3",3,"click"],[1,"fa","fa-download"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"showRedirectIcon","title","image","imageForZoom","code","description","downloadButton","channels","showCheckBox","scanButton","onCheckBoxChange","onDescEvent","onDownload","onScan"],[1,"row"],[1,"col-12"],[3,"filter","totaldata","paginationTotal","hasClicked","total","next","previous"]],template:function(n,e){1&n&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(l){return e.onSearch(l)}),t.TgZ(1,"actions"),t.YNc(2,zt,3,0,"button",1),t.YNc(3,Wt,4,1,"ng-container",2),t.qZA(),t.TgZ(4,"filters")(5,"div",3)(6,"div",4)(7,"div")(8,"h6"),t._uU(9,"Channel"),t.qZA(),t.TgZ(10,"ng-select",5),t.NdJ("ngModelChange",function(l){return e.searchFilter.ChannelID=l})("clear",function(){return e.onClearChannelFilter()}),t.YNc(11,Xt,3,2,"ng-template",6),t.qZA()(),t.TgZ(12,"div")(13,"h6"),t._uU(14,"SKU Assigned"),t.qZA(),t.TgZ(15,"mat-radio-group",7),t.NdJ("ngModelChange",function(l){return e.searchFilter.HaveSku=l}),t.TgZ(16,"mat-radio-button",8),t._uU(17," All "),t.qZA(),t.TgZ(18,"mat-radio-button",8),t._uU(19," Yes "),t.qZA(),t.TgZ(20,"mat-radio-button",8),t._uU(21," No "),t.qZA()()()()()(),t.TgZ(22,"content")(23,"div",9)(24,"div",10),t.YNc(25,en,2,13,"div",11),t.qZA(),t.YNc(26,on,3,4,"div",12),t.qZA()()()),2&n&&(t.xp6(2),t.Q6J("ngIf",!e.productService.hasSelection(e.products)),t.xp6(1),t.Q6J("ngIf",e.productService.hasSelection(e.products)),t.xp6(7),t.Q6J("clearable",!0)("items",e.channelOptions)("ngModel",e.searchFilter.ChannelID),t.xp6(5),t.Q6J("ngModel",e.searchFilter.HaveSku),t.xp6(1),t.Q6J("value",0),t.xp6(2),t.Q6J("value",1),t.xp6(2),t.Q6J("value",2),t.xp6(5),t.Q6J("ngForOf",e.products),t.xp6(1),t.Q6J("ngIf",(null==e.products?null:e.products.length)>0))},dependencies:[d.sg,d.O5,u.JJ,u.On,S.p,P.w9,P.ir,N,O.y,F.VQ,F.U0],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.itemTitle[_ngcontent-%COMP%]{cursor:pointer}"]}),o})();function ln(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"img",14),t.NdJ("click",function(i){t.CHM(n);const l=t.oxw();return t.KtG(l.onZoomImage(i))}),t.qZA(),t.BQk()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("src",n.image,t.LSH)}}function rn(o,a){1&o&&t._UZ(0,"img",15)}function cn(o,a){if(1&o&&(t.TgZ(0,"div",16),t._UZ(1,"i",17),t.TgZ(2,"span"),t._uU(3),t.qZA()()),2&o){const n=t.oxw();t.xp6(3),t.Oqu(n.code)}}const sn=function(o){return{"border-bottom":o}};function dn(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"div",28)(2,"div",29),t._uU(3),t.qZA(),t.TgZ(4,"div")(5,"a",30),t._UZ(6,"i",31),t.qZA()()(),t.BQk()),2&o){const n=a.$implicit,e=a.index,i=t.oxw().$implicit;t.xp6(1),t.Q6J("ngClass",t.VKq(3,sn,e!==(null==i?null:i.Map.length)-1)),t.xp6(2),t.hij(" ",n.Name," "),t.xp6(2),t.Q6J("href",n.URL,t.LSH)}}const pn=function(o){return{"border-bottom-0":o}};function un(o,a){if(1&o&&(t.TgZ(0,"div",18)(1,"h2",19)(2,"button",20)(3,"div",21),t._UZ(4,"img",22),t.TgZ(5,"span",23),t._uU(6),t.qZA(),t.TgZ(7,"span",24)(8,"h4"),t._uU(9),t.qZA()()()()(),t.TgZ(10,"div",25)(11,"div",26),t.YNc(12,dn,7,5,"ng-container",27),t.qZA()()()),2&o){const n=a.$implicit,e=a.index,i=t.oxw();t.Q6J("ngClass",t.VKq(11,pn,i.channels.length-1==e)),t.xp6(1),t.Q6J("id","heading"+e+i.code),t.xp6(1),t.uIk("data-bs-target","#collapse"+e+i.code)("aria-controls","#collapse"+e+i.code),t.xp6(2),t.Q6J("src",i.getChannelLogo(n.TypeID),t.LSH),t.xp6(1),t.Q6J("matTooltip",(null==n||null==n.Name?null:n.Name.length)>30?n.Name:""),t.xp6(1),t.Oqu(n.Name),t.xp6(3),t.hij("- ",n.Map.length," Listing"),t.xp6(1),t.Q6J("id","collapse"+e+i.code),t.uIk("aria-labelledby","heading"+e+i.code),t.xp6(2),t.Q6J("ngForOf",n.Map)}}let hn=(()=>{class o{constructor(n){this.biggerPictureService=n}getChannelLogo(n){return c.g.getChannelLogoByTypeId(n)}onZoomImage(n){this.biggerPictureService.openBiggerPicture(n,this.imageForZoom)}}return o.\u0275fac=function(n){return new(n||o)(t.Y36(Z.k))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-duplicate-product-card"]],inputs:{image:"image",imageForZoom:"imageForZoom",title:"title",code:"code",channels:"channels"},decls:16,vars:5,consts:[[1,"card"],[1,"card-body","py-6"],[1,"row"],[1,"col-4"],[1,"productUpload_defaultSize","me-2","image-upload"],[1,"imgContainer"],[4,"ngIf","ngIfElse"],["elsePic",""],[1,"col-8","d-inline-block","justify-content-between","gx-0",2,"padding-left","0px"],[1,"itemTitle"],["class","description",4,"ngIf"],[1,"card-footer",2,"padding-left","0px","padding-right","0px"],["id","accordionParent",1,"accordion","accordion-flush"],["class","accordion-item border-start-0 border-end-0",3,"ngClass",4,"ngFor","ngForOf"],[1,"rounded","imgUpload","float-left","cursor-pointer",3,"src","click"],["src","//res.cloudinary.com/pos/image/upload/w_110/POS/Images/Icon/products_thumb.png",1,"rounded","float-left","imgUpload"],[1,"description"],[1,"fa","fa-barcode","me-2"],[1,"accordion-item","border-start-0","border-end-0",3,"ngClass"],[1,"accordion-header",3,"id"],["type","button","data-bs-toggle","collapse","aria-expanded","true",1,"accordion-button","collapsed",2,"height","40px"],[1,"d-flex","align-items-center","justify-content-start","w-100"],["alt","",1,"channel-logo",3,"src"],[1,"fs-4","ps-4","text-ellipsis",2,"max-width","13vw",3,"matTooltip"],[1,"ps-2"],["data-bs-parent","#accordionParent",1,"accordion-collapse","collapse",3,"id"],[1,"accordion-body",2,"padding-top","0px","padding-bottom","0px"],[4,"ngFor","ngForOf"],[1,"d-flex","justify-content-between","align-items-center","py-4",3,"ngClass"],[1,"text-ellipsis"],["target","_blank",1,"text-secondary",3,"href"],[1,"fa","fa-external-link-alt"]],template:function(n,e){if(1&n&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5),t.YNc(6,ln,2,1,"ng-container",6),t.YNc(7,rn,1,0,"ng-template",null,7,t.W1O),t.qZA()()(),t.TgZ(9,"div",8)(10,"h4",9),t._uU(11),t.qZA(),t.YNc(12,cn,4,1,"div",10),t.qZA()()(),t.TgZ(13,"div",11)(14,"div",12),t.YNc(15,un,13,13,"div",13),t.qZA()()()),2&n){const i=t.MAs(8);t.xp6(6),t.Q6J("ngIf",e.image)("ngIfElse",i),t.xp6(5),t.hij(" ",e.title," "),t.xp6(1),t.Q6J("ngIf",e.code),t.xp6(3),t.Q6J("ngForOf",e.channels)}},dependencies:[d.mk,d.sg,d.O5,C.gM],styles:[".productUpload_defaultSize[_ngcontent-%COMP%]{max-width:100px!important;max-height:100px!important;width:auto!important;height:auto!important}.image-upload[_ngcontent-%COMP%]{position:relative}.imgContainer[_ngcontent-%COMP%]{width:100%;height:100px}.imgUpload[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:scale-down}.channel-logo[_ngcontent-%COMP%]{width:18px;height:18px}.accordion-button[_ngcontent-%COMP%]{background-color:#ededed69!important}.accordion-button[_ngcontent-%COMP%]:not(.collapsed){background-color:#ededed69!important;color:#333}.accordion-button[_ngcontent-%COMP%]:after{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23333333'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e\")}.accordion-button[_ngcontent-%COMP%]:focus{box-shadow:none!important}.card[_ngcontent-%COMP%]{margin-bottom:0!important}"]}),o})();function gn(o,a){if(1&o&&(t.TgZ(0,"span",9),t._UZ(1,"img",10),t.qZA(),t._uU(2)),2&o){const n=a.item,e=t.oxw();t.xp6(1),t.Q6J("src",e.getChannelLogo(n.TypeID),t.LSH),t.xp6(1),t.hij(" ",n.Name," ")}}function mn(o,a){if(1&o&&(t.TgZ(0,"div",12),t._UZ(1,"app-duplicate-product-card",13),t.qZA()),2&o){const n=a.$implicit;t.xp6(1),t.Q6J("imageForZoom",n.ImageUrl)("title",n.Name)("code",n.Code)("image",n.ThumbnailURL)("channels",n.Channel)}}function _n(o,a){if(1&o&&(t.ynx(0),t.YNc(1,mn,2,5,"div",11),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",n.products)}}function Cn(o,a){1&o&&(t.TgZ(0,"div",14)(1,"div"),t._UZ(2,"i",15),t.qZA(),t.TgZ(3,"h4",16),t._uU(4,"No product found"),t.qZA(),t.TgZ(5,"h6",17),t._uU(6,"Once you have a duplicate product"),t.qZA(),t.TgZ(7,"h6",18),t._uU(8,"you`ll see them here"),t.qZA()())}function fn(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",19)(2,"div",20)(3,"app-custom-paginator",21),t.NdJ("next",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onNextPage())})("previous",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onPrevPage())})("total",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.getRowCount())}),t.qZA()()(),t.BQk()}if(2&o){const n=t.oxw();t.xp6(3),t.Q6J("filter",n.searchFilter)("totaldata",null==n.products?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickedRowCount)}}let xn=(()=>{class o{constructor(n,e){this.httpService=n,this.productService=e,this.searchFilter=new y.k,this.products=[],this.hasClickedRowCount=!1,this.getPageLoader()}getPageLoader(){this.productService.loader().subscribe(n=>{this.searchFilter=n.Filter,this.searchFilter.PageSize=n.Filter.RowCount,this.channelOptions=n.Options.Channel,this.getProducts()})}getProducts(){this.httpService.post("/api/product/GetDuplicateInChannel",{ChannelID:this.searchFilter.ChannelID,RowCount:this.searchFilter.RowCount,PageNumber:this.searchFilter.PageNumber,text:this.searchFilter.text}).subscribe(e=>{this.products=e.Data})}onSearch(n){this.searchFilter.text=n,this.hasClickedRowCount=!1,this.getProducts()}onClearFilter(){this.searchFilter.ChannelID=c.g.GuidEMpty}getChannelLogo(n){return c.g.getChannelLogoByTypeId(n)}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPrevPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getRowCount(){this.httpService.post("/api/product/GetDuplicateInChannelRowCount",{text:this.searchFilter.text,ChannelID:this.searchFilter.ChannelID}).subscribe(e=>{this.hasClickedRowCount=!0,this.rowCount=e.Total})}}return o.\u0275fac=function(n){return new(n||o)(t.Y36(x.O),t.Y36(b.M))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-duplicate-sku"]],decls:15,vars:6,consts:[["headerTitle","Multiple Listed SKU","textButton"," Search","description","SKU(s) which is listed more than one time (one to many)",3,"onSubmit"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","items","ngModel","ngModelChange","clear"],["ng-option-tmp",""],[1,"container-fluid"],[1,"row","mt-8","mx-1"],[4,"ngIf","ngIfElse"],["EMPTY",""],[4,"ngIf"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"imageForZoom","title","code","image","channels"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"],[1,"text-secondary","fw-normal","m-2"],[1,"text-secondary","fw-normal"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"filter","totaldata","paginationTotal","hasClicked","next","previous","total"]],template:function(n,e){if(1&n&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(l){return e.onSearch(l)}),t.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),t._uU(5,"Channel"),t.qZA(),t.TgZ(6,"ng-select",2),t.NdJ("ngModelChange",function(l){return e.searchFilter.ChannelID=l})("clear",function(){return e.onClearFilter()}),t.YNc(7,gn,3,2,"ng-template",3),t.qZA()()()(),t.TgZ(8,"content")(9,"div",4)(10,"div",5),t.YNc(11,_n,2,1,"ng-container",6),t.YNc(12,Cn,9,0,"ng-template",null,7,t.W1O),t.qZA(),t.YNc(14,fn,4,4,"ng-container",8),t.qZA()()()),2&n){const i=t.MAs(13);t.xp6(6),t.Q6J("clearable",!0)("items",e.channelOptions)("ngModel",e.searchFilter.ChannelID),t.xp6(5),t.Q6J("ngIf",(null==e.products?null:e.products.length)>0)("ngIfElse",i),t.xp6(3),t.Q6J("ngIf",(null==e.products?null:e.products.length)>0)}},dependencies:[d.sg,d.O5,u.JJ,u.On,S.p,P.w9,P.ir,O.y,hn]}),o})();var T=s(8063);const Pn=[{path:"",component:q,children:[{path:"",redirectTo:"sold-in-channel",pathMatch:"full"},{path:"in-pos",component:St,canActivate:[T.a],data:{title:"Products in POS"}},{path:"sold-in-channel",component:Zt,canActivate:[T.a],data:{title:"Products Sold in Channel"}},{path:"not-in-channel",component:Gt,canActivate:[T.a],data:{title:"Products not in Channel"}},{path:"not-in-pos",component:an,canActivate:[T.a],data:{title:"Products not in POS"}},{path:"duplicate-sku",component:xn,canActivate:[T.a],data:{title:"Duplicate Sku in Channel"}}]}];let bn=(()=>{class o{}return o.\u0275fac=function(n){return new(n||o)},o.\u0275mod=t.oAB({type:o}),o.\u0275inj=t.cJS({imports:[d.ez,v.Bz.forChild(Pn)]}),o})();var Sn=s(8739),vn=s(2594);let In=(()=>{class o{}return o.\u0275fac=function(n){return new(n||o)},o.\u0275mod=t.oAB({type:o}),o.\u0275inj=t.cJS({imports:[d.ez,u.u5,C.AV]}),o})();var Tn=s(7459);let yn=(()=>{class o{}return o.\u0275fac=function(n){return new(n||o)},o.\u0275mod=t.oAB({type:o}),o.\u0275inj=t.cJS({imports:[d.ez,u.u5,C.AV]}),o})(),Mn=(()=>{class o{}return o.\u0275fac=function(n){return new(n||o)},o.\u0275mod=t.oAB({type:o}),o.\u0275inj=t.cJS({imports:[d.ez,U.Z,u.u5,v.Bz,bn,C.AV,S.R,P.A0,Sn.TU,vn.K,In,Tn.W,yn,F.Fk]}),o})()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[25],{6025:(q,p,r)=>{r.r(p),r.d(p,{ProductStatisticModule:()=>J});var s=r(6895),t=r(4650),l=r(8252),h=r(7398);const S=function(){return["/menu/report/order/sync-order"]},v=function(){return["/menu/report/order/invoice"]},x=function(){return["/menu/report/order/delivery"]},y=function(){return["/menu/report/order/payment"]};let T=(()=>{class e{constructor(){this.tabsMenu=[{Title:"Products",Url:"/menu/report/product-statistic/channel"}]}}return e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-product-statistic"]],decls:30,vars:9,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"],[1,"dropdown","dropstart","me-4"],["role","button","data-bs-toggle","dropdown","id","dropdownMenuButton1","aria-expanded","false",1,"text-dark"],[1,"fas","fa-bars","fa-lg"],["aria-labelledby","dropdownMenuButton1",1,"dropdown-menu","report"],[1,"dropdown-header","text-dark","fw-normal",2,"font-size",".875rem !important"],[1,"dropdown-divider"],[1,"dropdown-item",3,"routerLink"],[1,"fa-regular","fa-file","me-2"]],template:function(n,o){1&n&&(t.TgZ(0,"nav",0)(1,"div",1)(2,"div"),t._UZ(3,"nav-tab",2),t.qZA(),t.TgZ(4,"div",3)(5,"a",4),t._UZ(6,"i",5),t.qZA(),t.TgZ(7,"ul",6)(8,"li")(9,"h5",7),t._uU(10,"Order Report"),t.qZA()(),t.TgZ(11,"li"),t._UZ(12,"hr",8),t.qZA(),t.TgZ(13,"li")(14,"a",9),t._UZ(15,"i",10),t._uU(16,"New Order"),t.qZA()(),t.TgZ(17,"li")(18,"a",9),t._UZ(19,"i",10),t._uU(20,"Ready To Ship"),t.qZA()(),t.TgZ(21,"li")(22,"a",9),t._UZ(23,"i",10),t._uU(24,"Shipped"),t.qZA()(),t.TgZ(25,"li")(26,"a",9),t._UZ(27,"i",10),t._uU(28,"Completed"),t.qZA()()()()()(),t._UZ(29,"router-outlet")),2&n&&(t.xp6(3),t.Q6J("Tabs",o.tabsMenu),t.xp6(11),t.Q6J("routerLink",t.DdM(5,S)),t.xp6(4),t.Q6J("routerLink",t.DdM(6,v)),t.xp6(4),t.Q6J("routerLink",t.DdM(7,x)),t.xp6(4),t.Q6J("routerLink",t.DdM(8,y)))},dependencies:[l.lC,l.yS,h.e],styles:["ul[_ngcontent-%COMP%] > li.dropdown-item[_ngcontent-%COMP%]{font-size:.6875rem!important}.dropdown[_ngcontent-%COMP%] .dropdown-menu.report.show[_ngcontent-%COMP%]{top:100%!important;transform:none!important;z-index:10000;cursor:pointer;right:-50%}"]}),e})();var P=r(7579),d=r(2722),m=r(9300),_=r(8231),g=r(3154),A=r(6082),b=r(7185),U=r(5412),C=r(7481),f=r(266);function w(e,c){if(1&e&&(t.ynx(0),t._uU(1),t.BQk()),2&e){const n=t.oxw().$implicit;t.xp6(1),t.hij(" ",n.Count," ")}}function M(e,c){if(1&e){const n=t.EpF();t.TgZ(0,"span",25),t.NdJ("click",function(){t.CHM(n);const i=t.oxw().$implicit,a=t.oxw();return t.KtG(a.getLiveProductCount(i.ID,i))}),t._UZ(1,"i",26),t.qZA()}}const O=function(){return["/menu/products/sold-in-channel"]},Z=function(e){return{ID:e}},L=function(){return["/menu/products/not-in-pos"]};function I(e,c){if(1&e){const n=t.EpF();t.TgZ(0,"tr")(1,"td"),t._UZ(2,"img",14),t.TgZ(3,"span",15),t._uU(4),t.qZA()(),t.TgZ(5,"td",16),t.YNc(6,w,2,1,"ng-container",17),t.YNc(7,M,2,0,"ng-template",null,18,t.W1O),t.qZA(),t.TgZ(9,"td",16)(10,"a",19),t._uU(11),t.ALo(12,"number"),t.qZA()(),t.TgZ(13,"td",16)(14,"a",19),t._uU(15),t.ALo(16,"number"),t.qZA()(),t.TgZ(17,"td"),t._uU(18),t.ALo(19,"date"),t.qZA(),t.TgZ(20,"td")(21,"div",20)(22,"button",21),t.NdJ("click",function(){const a=t.CHM(n).$implicit,u=t.oxw();return t.KtG(u.onScanChannel(a))}),t._UZ(23,"i",22),t._uU(24," Scan "),t.qZA(),t.TgZ(25,"button",23),t.NdJ("click",function(){const a=t.CHM(n).$implicit,u=t.oxw();return t.KtG(u.onClearCache(a.ID))}),t._UZ(26,"i",24),t._uU(27," Clear "),t.qZA()()()()}if(2&e){const n=c.$implicit,o=t.MAs(8),i=t.oxw();t.xp6(2),t.Q6J("src",i.getChannelLogo(n.TypeID),t.LSH),t.xp6(2),t.Oqu(n.Name),t.xp6(2),t.Q6J("ngIf",void 0!==n.Count)("ngIfElse",o),t.xp6(4),t.Q6J("routerLink",t.DdM(18,O))("queryParams",t.VKq(19,Z,n.ID)),t.xp6(1),t.hij(" ",t.lcZ(12,11,n.SoldInChannel)," "),t.xp6(3),t.Q6J("routerLink",t.DdM(21,L))("queryParams",t.VKq(22,Z,n.ID)),t.xp6(1),t.hij(" ",t.lcZ(16,13,n.NotInPOS)," "),t.xp6(3),t.Oqu(n.LastSync?t.xi3(19,15,n.LastSync,"dd MMM yyyy HH:mm"):"-")}}const D=[{path:"",component:T,children:[{component:(()=>{class e{constructor(n,o,i){this.productService=n,this.toastr=o,this.dialog=i,this.destroy$=new P.x}ngOnInit(){this.setObsProductStatistic(),this.initPageLoader()}initPageLoader(){this.productService.loader().pipe((0,d.R)(this.destroy$)).subscribe(n=>{this.channelOptions=n?.Options?.Channel})}setObsProductStatistic(){this.channels$=this.productService.getProductStatistic()}getLiveProductCount(n,o){this.productService.getTotalProductLive(n).pipe((0,d.R)(this.destroy$)).subscribe(i=>{o.Count=i.Count})}onScanChannel(n){this.dialog.open(_.j,{width:"700px",data:{channelOptions:this.channelOptions,filter:{ChannelID:n.ID},disabledChannelOption:!0}}).afterClosed().pipe((0,m.h)(o=>g.g.IsNotEmpty(o))).subscribe(o=>{this.scanAllProduct(n.ID,o)})}scanAllProduct(n,o){let i=this.productService.findChannelById(n,this.channelOptions);this.productService.scanAll(o.ChannelID,o.ScanFull,o.UpdatedProduct,o.Async).pipe((0,m.h)(a=>a)).subscribe(a=>{o.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(a,i,!o.UpdatedProduct),this.initPageLoader(),this.setObsProductStatistic())})}onClearCache(n){confirm("Are you sure you want to Clear Cache? This Process will remove your product integration to marketplace")&&this.productService.clearCacheChannel(n).pipe((0,d.R)(this.destroy$)).subscribe(i=>{this.toastr.success("Successfully cleared cache","Success"),this.initPageLoader(),this.setObsProductStatistic()})}getChannelLogo(n){return g.g.getChannelLogoByTypeId(n)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}}return e.\u0275fac=function(n){return new(n||e)(t.Y36(A.M),t.Y36(b._W),t.Y36(U.uw))},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-channel-statistic"]],decls:23,vars:5,consts:[["headerTitle","Products Statistic",3,"hideSearchBox","hideSearchDropdown"],[1,"container-fluid"],[1,"row","mt-4"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[1,"text-center",2,"width","13rem"],[1,"text-center",2,"width","9rem"],[1,"text-center",2,"width","14rem"],[2,"width","10rem"],[2,"width","12rem"],[4,"ngFor","ngForOf"],[2,"width","24px","height","24px",3,"src"],[1,"ms-3"],[1,"text-center"],[4,"ngIf","ngIfElse"],["QUESTION",""],[3,"routerLink","queryParams"],[1,"d-flex","align-items-center","justify-content-center"],[1,"btn","btn-sm","btn-secondary","fs-6",3,"click"],[1,"fa","fa-spinner"],[1,"btn","btn-sm","btn-secondary","fs-6","ms-3",3,"click"],[1,"fa","fa-trash"],["matTooltip","Click to see total live product",1,"cursor-pointer","fs-5","text-primary",3,"click"],[1,"fa-solid","fa-circle-question","cursor"]],template:function(n,o){if(1&n&&(t.TgZ(0,"mainpanel",0)(1,"content")(2,"div",1)(3,"div",2)(4,"div",3)(5,"div",4)(6,"table",5)(7,"thead",6)(8,"tr",7)(9,"th"),t._uU(10,"Channel"),t.qZA(),t.TgZ(11,"th",8),t._uU(12,"Live Product"),t.qZA(),t.TgZ(13,"th",9),t._uU(14,"Sold In Channel"),t.qZA(),t.TgZ(15,"th",10),t._uU(16,"Product Not in POS"),t.qZA(),t.TgZ(17,"th",11),t._uU(18,"Last Sync"),t.qZA(),t._UZ(19,"th",12),t.qZA()(),t.TgZ(20,"tbody"),t.YNc(21,I,28,24,"tr",13),t.ALo(22,"async"),t.qZA()()()()()()()()),2&n){let i;t.Q6J("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(21),t.Q6J("ngForOf",null==(i=t.lcZ(22,3,o.channels$))?null:i.Data)}},dependencies:[s.sg,s.O5,l.yS,C.p,f.gM,s.Ov,s.JJ,s.uU]}),e})(),path:"channel",pathMatch:"full",data:{title:"Products Statistic"}}]}];let J=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=t.oAB({type:e}),e.\u0275inj=t.cJS({imports:[s.ez,l.Bz.forChild(D),h.Z,C.R,f.AV]}),e})()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[32],{7398:(at,Ne,P)=>{P.d(Ne,{Z:()=>re,e:()=>B});var ye=P(6895),R=P(266),te=P(8252),E=P(4650);function ke(D,J){if(1&D&&(E.TgZ(0,"li",2)(1,"a",3),E._uU(2),E.qZA()()),2&D){const H=J.$implicit;E.xp6(1),E.s9C("routerLink",H.Url),E.Q6J("title",H.Description?H.Description:""),E.xp6(1),E.hij(" ",H.Title," ")}}let B=(()=>{class D{}return D.\u0275fac=function(H){return new(H||D)},D.\u0275cmp=E.Xpm({type:D,selectors:[["nav-tab"]],inputs:{Tabs:"Tabs"},decls:2,vars:1,consts:[[1,"nav","navbar-nav","navbar-left","nav-tab-arrow"],["routerLinkActive","active","class","nav-item me-6",4,"ngFor","ngForOf"],["routerLinkActive","active",1,"nav-item","me-6"],[1,"nav-link","nav-link-arrow","mb-0",3,"routerLink","title"]],template:function(H,K){1&H&&(E.TgZ(0,"ul",0),E.YNc(1,ke,3,3,"li",1),E.qZA()),2&H&&(E.xp6(1),E.Q6J("ngForOf",K.Tabs))},dependencies:[ye.sg,te.yS,te.Od]}),D})(),re=(()=>{class D{}return D.\u0275fac=function(H){return new(H||D)},D.\u0275mod=E.oAB({type:D}),D.\u0275inj=E.cJS({imports:[ye.ez,te.Bz,R.AV]}),D})()},1739:(at,Ne,P)=>{P.d(Ne,{k:()=>sn});var ye=P(5861);function R(){}const te=e=>e;function E(e,t){for(const n in t)e[n]=t[n];return e}function ke(e){return e()}function B(e){e.forEach(ke)}function re(e){return"function"==typeof e}function D(e,t){return e!=e?t==t:e!==t}function K(e,t,n){e.$$.on_destroy.push(function H(e,...t){if(null==e)return R;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}(t,n))}function Pe(e){return e&&re(e.destroy)?e.destroy:R}let Ee=()=>globalThis.performance.now(),Ae=e=>requestAnimationFrame(e);const se=new Set;function $e(e){se.forEach(t=>{t.c(e)||(se.delete(t),t.f())}),0!==se.size&&Ae($e)}function ze(e){let t;return 0===se.size&&Ae($e),{promise:new Promise(n=>{se.add(t={c:e,f:n})}),abort(){se.delete(t)}}}function G(e,t){e.appendChild(t)}function A(e,t,n){e.insertBefore(t,n||null)}function L(e){e.parentNode.removeChild(e)}function I(e){return document.createElement(e)}function Z(){return function $(e){return document.createTextNode(e)}("")}function b(e,t,n,o){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}function h(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function C(e,t,n,o){null===n?e.style.removeProperty(t):e.style.setProperty(t,n)}function F(e,t,n){e.classList[n?"add":"remove"](t)}let Q,qe,j=0,le={};function ct(e,t,n,o,i,s,l,r=0){const a=16.666/o;let c="{\n";for(let d=0;d<=1;d+=a){const u=t+(n-t)*s(d);c+=100*d+`%{${l(u,1-u)}}\n`}const p=c+`100% {${l(n,1-n)}}\n}`,m=`_bp_${Math.round(1e9*Math.random())}_${r}`;if(!le[m]){if(!Q){const d=I("style");document.head.appendChild(d),Q=d.sheet}le[m]=!0,Q.insertRule(`@keyframes ${m} ${p}`,Q.cssRules.length)}const _=e.style.animation||"";return e.style.animation=`${_?`${_}, `:""}${m} ${o}ms linear ${i}ms 1 both`,j+=1,m}function xe(e,t){e.style.animation=(e.style.animation||"").split(", ").filter(t?n=>n.indexOf(t)<0:n=>-1===n.indexOf("_bp")).join(", "),t&&!--j&&function Et(){Ae(()=>{if(j)return;let e=Q.cssRules.length;for(;e--;)Q.deleteRule(e);le={}})}()}function Oe(e){qe=e}const Re=[],ut=[],We=[],ft=[],At=Promise.resolve();let et=!1;function me(e){We.push(e)}const tt=new Set;let Le,Ze=0;function dt(){const e=qe;do{for(;Ze<Re.length;){const t=Re[Ze];Ze++,Oe(t),zt(t.$$)}for(Oe(null),Re.length=0,Ze=0;ut.length;)ut.pop()();for(let t=0;t<We.length;t+=1){const n=We[t];tt.has(n)||(tt.add(n),n())}We.length=0}while(Re.length);for(;ft.length;)ft.pop()();et=!1,tt.clear(),Oe(e)}function zt(e){if(null!==e.fragment){e.update(),B(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(me)}}function mt(){return Le||(Le=Promise.resolve(),Le.then(()=>{Le=null})),Le}function je(e,t,n){e.dispatchEvent(function ne(e,t,n=!1){const o=document.createEvent("CustomEvent");return o.initCustomEvent(e,n,!1,t),o}(`${t?"intro":"outro"}${n}`))}const Ue=new Set;let ae;function pe(){ae={r:0,c:[],p:ae}}function he(){ae.r||B(ae.c),ae=ae.p}function M(e,t){e&&e.i&&(Ue.delete(e),e.i(t))}function z(e,t,n,o){if(e&&e.o){if(Ue.has(e))return;Ue.add(e),ae.c.push(()=>{Ue.delete(e),o&&(n&&e.d(1),o())}),e.o(t)}}const pt={duration:0};function ht(e,t,n){let s,l,o=t(e,n),i=!1,r=0;function a(){s&&xe(e,s)}function c(){const{delay:m=0,duration:_=300,easing:d=te,tick:u=R,css:g}=o||pt;g&&(s=ct(e,0,1,_,m,d,g,r++)),u(0,1);const k=Ee()+m,V=k+_;l&&l.abort(),i=!0,me(()=>je(e,!0,"start")),l=ze(x=>{if(i){if(x>=V)return u(1,0),je(e,!0,"end"),a(),i=!1;if(x>=k){const T=d((x-k)/_);u(T,1-T)}}return i})}let p=!1;return{start(){p||(p=!0,xe(e),re(o)?(o=o(),mt().then(c)):c())},invalidate(){p=!1},end(){i&&(a(),i=!1)}}}function Te(e,t,n){let s,o=t(e,n),i=!0;const l=ae;function r(){const{delay:a=0,duration:c=300,easing:p=te,tick:m=R,css:_}=o||pt;_&&(s=ct(e,1,0,c,a,p,_));const d=Ee()+a,u=d+c;me(()=>je(e,!1,"start")),ze(g=>{if(i){if(g>=u)return m(0,1),je(e,!1,"end"),--l.r||B(l.c),!1;if(g>=d){const k=p((g-d)/c);m(1-k,k)}}return i})}return l.r+=1,re(o)?mt().then(()=>{o=o(),r()}):r(),{end(a){a&&o.tick&&o.tick(1,0),i&&(s&&xe(e,s),i=!1)}}}function we(e){e&&e.c()}function ge(e,t,n,o){const{fragment:i,on_mount:s,on_destroy:l,after_update:r}=e.$$;i&&i.m(t,n),o||me(()=>{const a=s.map(ke).filter(re);l?l.push(...a):B(a),e.$$.on_mount=[]}),r.forEach(me)}function be(e,t){const n=e.$$;null!==n.fragment&&(B(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Fe(e,t,n,o,i,s,l,r=[-1]){const a=qe;Oe(e);const c=e.$$={fragment:null,ctx:null,props:s,update:R,not_equal:i,bound:{},on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(a?a.$$.context:[])),callbacks:{},dirty:r,skip_bound:!1,root:t.target||a.$$.root};l&&l(c.root);let p=!1;c.ctx=n?n(e,t.props||{},(m,_,...d)=>{const u=d.length?d[0]:_;return c.ctx&&i(c.ctx[m],c.ctx[m]=u)&&(!c.skip_bound&&c.bound[m]&&c.bound[m](u),p&&function Ot(e,t){-1===e.$$.dirty[0]&&(Re.push(e),function $t(){et||(et=!0,At.then(dt))}(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}(e,m)),_}):[],c.update(),p=!0,B(c.before_update),c.fragment=!!o&&o(c.ctx),t.target&&(c.fragment&&c.fragment.c(),ge(e,t.target,t.anchor,t.customElement),dt()),Oe(a)}class Xe{$destroy(){be(this,1),this.$destroy=R}$on(t,n){const o=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return o.push(n),()=>{const i=o.indexOf(n);-1!==i&&o.splice(i,1)}}$set(t){this.$$set&&!function J(e){return 0===Object.keys(e).length}(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function nt(e){const t=e-1;return t*t*t+1}function ce(e,{delay:t=0,duration:n=400,easing:o=nt,x:i=0,y:s=0,opacity:l=0}={}){const r=getComputedStyle(e),a=+r.opacity,c="none"===r.transform?"":r.transform,p=a*(1-l);return{delay:t,duration:n,easing:o,css:(m,_)=>`\n\t\t\ttransform: ${c} translate(${(1-m)*i}px, ${(1-m)*s}px);\n\t\t\topacity: ${a-p*_}`}}const Ce=[];function ot(e,t=R){let n;const o=new Set;function i(r){if(D(e,r)&&(e=r,n)){const a=!Ce.length;for(const c of o)c[1](),Ce.push(c,e);if(a){for(let c=0;c<Ce.length;c+=2)Ce[c][0](Ce[c+1]);Ce.length=0}}}return{set:i,update:function s(r){i(r(e))},subscribe:function l(r,a=R){const c=[r,a];return o.add(c),1===o.size&&(n=t(i)||R),r(e),()=>{o.delete(c),0===o.size&&(n(),n=null)}}}}function gt(e,t){if(e===t||e!=e)return()=>e;const n=typeof e;if(Array.isArray(e)){const o=t.map((i,s)=>gt(e[s],i));return i=>o.map(s=>s(i))}if("number"===n){const o=t-e;return i=>e+i*o}}function bt(e,t={}){const n=ot(e);let o,i=e;function s(l,r){if(null==e)return n.set(e=l),Promise.resolve();i=l;let a=o,c=!1,{delay:p=0,duration:m=400,easing:_=te,interpolate:d=gt}=E(E({},t),r);if(0===m)return a&&(a.abort(),a=null),n.set(e=i),Promise.resolve();const u=Ee()+p;let g;return o=ze(k=>{if(k<u)return!0;c||(g=d(e,l),"function"==typeof m&&(m=m(e,l)),c=!0),a&&(a.abort(),a=null);const V=k-u;return V>m?(n.set(e=l),!1):(n.set(e=g(_(V/m))),!0)}),o.promise}return{set:s,update:(l,r)=>s(l(i,e),r),subscribe:n.subscribe}}const Ke=ot(0),Rt=globalThis.matchMedia?.("(prefers-reduced-motion: reduce)").matches,it=e=>({easing:nt,duration:Rt?0:e});function _t(e){let t,n,o,i,s=!e[2]&&vt();return{c(){t=I("div"),s&&s.c(),h(t,"class","bp-load"),C(t,"background-image","url("+e[0]+")")},m(l,r){A(l,t,r),s&&s.m(t,null),i=!0},p(l,r){(e=l)[2]?s&&(s.d(1),s=null):s||(s=vt(),s.c(),s.m(t,null)),(!i||1&r)&&C(t,"background-image","url("+e[0]+")")},i(l){i||(me(()=>{o&&o.end(1),n=ht(t,ce,{duration:e[1]?400:0}),n.start()}),i=!0)},o(l){n&&n.invalidate(),l&&(o=Te(t,ce,{duration:480})),i=!1},d(l){l&&L(t),s&&s.d(),l&&o&&o.end()}}}function vt(e){let t,n;return{c(){t=I("span"),n=I("span"),h(t,"class","bp-bar"),h(n,"class","bp-o")},m(o,i){A(o,t,i),A(o,n,i)},d(o){o&&L(t),o&&L(n)}}}function Lt(e){let t,n=(!e[1]||e[2])&&_t(e);return{c(){n&&n.c(),t=Z()},m(o,i){n&&n.m(o,i),A(o,t,i)},p(o,[i]){!o[1]||o[2]?n?(n.p(o,i),6&i&&M(n,1)):(n=_t(o),n.c(),M(n,1),n.m(t.parentNode,t)):n&&(pe(),z(n,1,1,()=>{n=null}),he())},i(o){M(n)},o(o){z(n)},d(o){n&&n.d(o),o&&L(t)}}}function Ft(e,t,n){let o;K(e,Ke,l=>n(2,o=l));let{thumb:i}=t,{loaded:s}=t;return e.$$set=l=>{"thumb"in l&&n(0,i=l.thumb),"loaded"in l&&n(1,s=l.loaded)},[i,s,o]}class rt extends Xe{constructor(t){super(),Fe(this,t,Ft,Lt,D,{thumb:0,loaded:1})}}function yt(e){let t,n,o,i,s,l;return{c(){t=I("img"),h(t,"srcset",n=e[7].img),h(t,"sizes",o=e[8].sizes||`${e[1]}px`),h(t,"alt",i=e[7].alt)},m(r,a){A(r,t,a),l=!0},p(r,a){(!l||2&a[0]&&o!==(o=r[8].sizes||`${r[1]}px`))&&h(t,"sizes",o)},i(r){l||(s&&s.end(1),l=!0)},o(r){s=Te(t,ce,{}),l=!1},d(r){r&&L(t),r&&s&&s.end()}}}function kt(e){let t,n;return t=new rt({props:{thumb:e[7].thumb,loaded:e[2]}}),{c(){we(t.$$.fragment)},m(o,i){ge(t,o,i),n=!0},p(o,i){const s={};4&i[0]&&(s.loaded=o[2]),t.$set(s)},i(o){n||(M(t.$$.fragment,o),n=!0)},o(o){z(t.$$.fragment,o),n=!1},d(o){be(t,o)}}}function Xt(e){let t,n,o,i,s,l,r=e[2]&&yt(e),a=e[3]&&kt(e);return{c(){t=I("div"),n=I("div"),r&&r.c(),o=Z(),a&&a.c(),h(n,"class","bp-img"),C(n,"background-image","url("+e[7].thumb+")"),C(n,"width",e[0][0]+"px"),C(n,"height",e[0][1]+"px"),C(n,"transform","translate3d("+(e[0][0]/-2+e[6][0])+"px, "+(e[0][1]/-2+e[6][1])+"px, 0)"),h(t,"class","bp-img-wrap"),F(t,"bp-drag",e[4]),F(t,"bp-close",e[5])},m(c,p){A(c,t,p),G(t,n),r&&r.m(n,null),G(n,o),a&&a.m(n,null),i=!0,s||(l=[Pe(e[17].call(null,n)),b(t,"wheel",e[12]),b(t,"pointerdown",e[13]),b(t,"pointermove",e[14]),b(t,"pointerup",e[16]),b(t,"pointercancel",e[15])],s=!0)},p(c,p){c[2]?r?(r.p(c,p),4&p[0]&&M(r,1)):(r=yt(c),r.c(),M(r,1),r.m(n,o)):r&&(pe(),z(r,1,1,()=>{r=null}),he()),c[3]?a?(a.p(c,p),8&p[0]&&M(a,1)):(a=kt(c),a.c(),M(a,1),a.m(n,null)):a&&(pe(),z(a,1,1,()=>{a=null}),he()),(!i||1&p[0])&&C(n,"width",c[0][0]+"px"),(!i||1&p[0])&&C(n,"height",c[0][1]+"px"),(!i||65&p[0])&&C(n,"transform","translate3d("+(c[0][0]/-2+c[6][0])+"px, "+(c[0][1]/-2+c[6][1])+"px, 0)"),16&p[0]&&F(t,"bp-drag",c[4]),32&p[0]&&F(t,"bp-close",c[5])},i(c){i||(M(r),M(a),i=!0)},o(c){z(r),z(a),i=!1},d(c){c&&L(t),r&&r.d(),a&&a.d(),s=!1,B(l)}}}function Yt(e,t,n){let o,i,s,l;K(e,Ke,f=>n(22,s=f));let{props:r}=t,{smallScreen:a}=t,{activeItem:c,opts:p,prev:m,next:_,zoomed:d,container:u}=r;K(e,d,f=>n(21,o=f));let x,T,q,Ve,X,fe,De,Ie,Je,Me,Ge,g=c.maxZoom||p.maxZoom||10,k=r.calculateDimensions(c),V=k[0],ue=0;const Se=+c.width,Ye=[],_e=new Map,de=bt(k,it(400));K(e,de,f=>n(0,l=f));const ee=bt([0,0],it(400));K(e,ee,f=>n(6,i=f));const Be=([f,w],O=l)=>{const N=(O[0]-u.w)/2,U=(O[1]-u.h)/2;return N<0?f=0:f>N?a?(f=X?N+(f-N)/10:N)>N+20&&n(4,X=m()):f=N:f<-N&&(a?(f=X?-N-(-N-f)/10:-N)<-N-20&&n(4,X=_()):f=-N),U<0?w=0:w>U?w=U:w<-U&&(w=-U),[f,w]},He=(f,w=g)=>{if(s)return;const O=k[0]*g,[N,U]=l;let W=N+N*w,Qe=U+U*w;if(w>0)W>O&&(W=O,Qe=k[1]*g),W>Se&&(W=Se,Qe=+c.height);else if(W<k[0])return de.set(k),ee.set([0,0]);let{x:st,y:lt,width:Dt,height:It}=Ve.getBoundingClientRect();const Mt=f.clientX-st-Dt/2,St=f.clientY-lt-It/2;st=W/Dt*-Mt+Mt,lt=Qe/It*-St+St;const Nt=[W,Qe];de.set(Nt).then(()=>{n(1,V=Math.round(Math.max(V,W)))}),ee.set(Be([i[0]+st,i[1]+lt],Nt))},oe=f=>_e.delete(f.pointerId);return e.$$set=f=>{"smallScreen"in f&&n(19,a=f.smallScreen)},e.$$.update=()=>{if(1048577&e.$$.dirty[0]&&d.set(l[0]-10>k[0]),7340032&e.$$.dirty[0]&&s&&o&&!p.intro){const f=it(480);ee.set([0,0],f),de.set(k,f),n(5,Ge=!0)}},[l,V,x,T,X,Ge,i,c,p,d,de,ee,f=>{p.inline&&!o||(f.preventDefault(),He(f,f.deltaY/-300))},f=>{2!==f.button&&(f.preventDefault(),n(4,X=!0),_e.set(f.pointerId,f),De=f.clientX,Ie=f.clientY,Je=i[0],Me=i[1])},f=>{if(_e.size>1)return n(4,X=!1),p.noPinch?.(u.el)||(f=>{const[w,O]=_e.set(f.pointerId,f).values(),W=Math.hypot(w.clientX-O.clientX,w.clientY-O.clientY);q=q||{clientX:(w.clientX+O.clientX)/2,clientY:(w.clientY+O.clientY)/2},He(q,((ue||W)-W)/-35),ue=W})(f);if(!X)return;let w=f.clientX,O=f.clientY;fe=Ye.push({x:w,y:O})>2,w-=De,O-=Ie,o||(O<-90&&n(4,X=!p.noClose&&r.close()),Math.abs(O)<30&&(w>40&&n(4,X=m()),w<-40&&n(4,X=_()))),o&&fe&&!s&&ee.set(Be([Je+w,Me+O]),{duration:0})},oe,function ie(f){if(oe(f),q&&(n(4,X=ue=0),q=_e.size?q:null),X){if(n(4,X=!1),f.target===this&&!p.noClose)return r.close();if(fe){const[w,O,N]=Ye.slice(-3);Math.hypot(O.x-N.x,O.y-N.y)>5&&ee.set(Be([i[0]-5*(w.x-N.x),i[1]-5*(w.y-N.y)]))}else p.onImageClick?.(u.el,c)||He(f,o?-g:g);fe=!1,Ye.length=0}},f=>{Ve=f,r.setResizeFunc(()=>{n(20,k=r.calculateDimensions(c)),(p.inline||!a)&&(de.set(k),ee.set([0,0]))}),r.loadImage(c).then(()=>{n(2,x=!0),r.preloadNext()}),setTimeout(()=>{n(3,T=!x)},250)},r,a,k,o,s]}class Bt extends Xe{constructor(t){super(),Fe(this,t,Yt,Xt,D,{props:18,smallScreen:19},null,[-1,-1])}}function Ht(e){let t,n,o,i,s,l;return o=new rt({props:{thumb:e[2].thumb,loaded:e[0]}}),{c(){t=I("div"),n=I("iframe"),we(o.$$.fragment),h(n,"allow","autoplay; fullscreen"),h(n,"title",e[2].title),h(t,"class","bp-if"),C(t,"width",e[1][0]+"px"),C(t,"height",e[1][1]+"px")},m(r,a){A(r,t,a),G(t,n),ge(o,t,null),i=!0,s||(l=[Pe(e[3].call(null,n)),b(n,"load",e[5])],s=!0)},p(r,[a]){const c={};1&a&&(c.loaded=r[0]),o.$set(c),(!i||2&a)&&C(t,"width",r[1][0]+"px"),(!i||2&a)&&C(t,"height",r[1][1]+"px")},i(r){i||(M(o.$$.fragment,r),i=!0)},o(r){z(o.$$.fragment,r),i=!1},d(r){r&&L(t),be(o),s=!1,B(l)}}}function Wt(e,t,n){let i,s,{props:o}=t;const{activeItem:l}=o,r=()=>n(1,s=o.calculateDimensions(l));return r(),o.setResizeFunc(r),[i,s,l,p=>p.src=l.iframe,o,()=>n(0,i=!0)]}class Zt extends Xe{constructor(t){super(),Fe(this,t,Wt,Ht,D,{props:4})}}function jt(e){let t,n,o,i,s;return n=new rt({props:{thumb:e[2].thumb,loaded:e[0]}}),{c(){t=I("div"),we(n.$$.fragment),h(t,"class","bp-vid"),C(t,"width",e[1][0]+"px"),C(t,"height",e[1][1]+"px"),C(t,"background-image","url("+e[2].thumb+")")},m(l,r){A(l,t,r),ge(n,t,null),o=!0,i||(s=Pe(e[3].call(null,t)),i=!0)},p(l,[r]){const a={};1&r&&(a.loaded=l[0]),n.$set(a),(!o||2&r)&&C(t,"width",l[1][0]+"px"),(!o||2&r)&&C(t,"height",l[1][1]+"px")},i(l){o||(M(n.$$.fragment,l),o=!0)},o(l){z(n.$$.fragment,l),o=!1},d(l){l&&L(t),be(n),i=!1,s()}}}function Ut(e,t,n){let i,s,{props:o}=t;const{activeItem:l}=o,r=()=>n(1,s=o.calculateDimensions(l));r(),o.setResizeFunc(r);const a=(p,m)=>{for(const _ in m)h(p,_,m[_])};return[i,s,l,p=>{let m;const _=(d,u)=>{Array.isArray(u)||(u=JSON.parse(u));for(const g of u){m||(m=I(g.type?.includes("audio")?"audio":"video"),a(m,{controls:!0,autoplay:!0,playsinline:!0,tabindex:"0"}));const k=I(d);a(k,g),G(m,k)}};_("source",l.sources),_("track",l.tracks||[]),b(m,"canplay",()=>n(0,i=!0)),G(p,m)},o]}class Kt extends Xe{constructor(t){super(),Fe(this,t,Ut,jt,D,{props:4})}}function Pt(e){let t,n,o,s,l,r,a,c,p,m,i=e[6].i,_=wt(e),d=e[0].length>1&&Ct(e);return{c(){t=I("div"),n=I("div"),_.c(),s=I("div"),l=I("button"),d&&d.c(),h(l,"class","bp-x"),h(l,"title","Close"),h(l,"aria-label","Close"),h(s,"class","bp-controls"),h(t,"class","bp-wrap"),F(t,"bp-zoomed",e[10]),F(t,"bp-inline",e[8]),F(t,"bp-small",e[7]),F(t,"bp-noclose",e[5].noClose)},m(u,g){A(u,t,g),G(t,n),_.m(t,null),G(t,s),G(s,l),d&&d.m(s,null),c=!0,p||(m=[b(l,"click",e[1]),Pe(a=e[14].call(null,t))],p=!0)},p(u,g){64&g[0]&&D(i,i=u[6].i)?(pe(),z(_,1,1,R),he(),_=wt(u),_.c(),M(_),_.m(t,s)):_.p(u,g),u[0].length>1?d?d.p(u,g):(d=Ct(u),d.c(),d.m(s,null)):d&&(d.d(1),d=null),1024&g[0]&&F(t,"bp-zoomed",u[10]),256&g[0]&&F(t,"bp-inline",u[8]),128&g[0]&&F(t,"bp-small",u[7]),32&g[0]&&F(t,"bp-noclose",u[5].noClose)},i(u){c||(o&&o.end(1),M(_),r&&r.end(1),c=!0)},o(u){o=Te(n,ce,{duration:480}),z(_),r=Te(s,ce,{}),c=!1},d(u){u&&L(t),u&&o&&o.end(),_.d(u),d&&d.d(),u&&r&&r.end(),p=!1,B(m)}}}function Vt(e){let t,n=e[6].html+"";return{c(){t=I("div"),h(t,"class","bp-html")},m(o,i){A(o,t,i),t.innerHTML=n},p(o,i){64&i[0]&&n!==(n=o[6].html+"")&&(t.innerHTML=n)},i:R,o:R,d(o){o&&L(t)}}}function Jt(e){let t,n;return t=new Zt({props:{props:e[13]()}}),{c(){we(t.$$.fragment)},m(o,i){ge(t,o,i),n=!0},p:R,i(o){n||(M(t.$$.fragment,o),n=!0)},o(o){z(t.$$.fragment,o),n=!1},d(o){be(t,o)}}}function Gt(e){let t,n;return t=new Kt({props:{props:e[13]()}}),{c(){we(t.$$.fragment)},m(o,i){ge(t,o,i),n=!0},p:R,i(o){n||(M(t.$$.fragment,o),n=!0)},o(o){z(t.$$.fragment,o),n=!1},d(o){be(t,o)}}}function Qt(e){let t,n;return t=new Bt({props:{props:e[13](),smallScreen:e[7]}}),{c(){we(t.$$.fragment)},m(o,i){ge(t,o,i),n=!0},p(o,i){const s={};128&i[0]&&(s.smallScreen=o[7]),t.$set(s)},i(o){n||(M(t.$$.fragment,o),n=!0)},o(o){z(t.$$.fragment,o),n=!1},d(o){be(t,o)}}}function Tt(e){let t,o,i,n=e[6].caption+"";return{c(){t=I("div"),h(t,"class","bp-cap"),h(t,"tabindex","0")},m(s,l){A(s,t,l),t.innerHTML=n,i=!0},p(s,l){(!i||64&l[0])&&n!==(n=s[6].caption+"")&&(t.innerHTML=n)},i(s){i||(o&&o.end(1),i=!0)},o(s){o=Te(t,ce,{duration:200}),i=!1},d(s){s&&L(t),s&&o&&o.end()}}}function wt(e){let t,n,o,i,s,l,r,a,c;const p=[Qt,Gt,Jt,Vt],m=[];function _(u,g){return u[6].img?0:u[6].sources?1:u[6].iframe?2:3}n=_(e),o=m[n]=p[n](e);let d=e[6].caption&&Tt(e);return{c(){t=I("div"),o.c(),d&&d.c(),l=Z(),h(t,"class","bp-inner")},m(u,g){A(u,t,g),m[n].m(t,null),d&&d.m(u,g),A(u,l,g),r=!0,a||(c=[b(t,"pointerdown",e[21]),b(t,"pointerup",e[22])],a=!0)},p(u,g){let k=n;n=_(u),n===k?m[n].p(u,g):(pe(),z(m[k],1,1,()=>{m[k]=null}),he(),o=m[n],o?o.p(u,g):(o=m[n]=p[n](u),o.c()),M(o,1),o.m(t,null)),u[6].caption?d?(d.p(u,g),64&g[0]&&M(d,1)):(d=Tt(u),d.c(),M(d,1),d.m(l.parentNode,l)):d&&(pe(),z(d,1,1,()=>{d=null}),he())},i(u){r||(M(o),me(()=>{s&&s.end(1),i=ht(t,e[12],!0),i.start()}),M(d),r=!0)},o(u){z(o),i&&i.invalidate(),s=Te(t,e[12],!1),z(d),r=!1},d(u){u&&L(t),m[n].d(),u&&s&&s.end(),d&&d.d(u),u&&L(l),a=!1,B(c)}}}function Ct(e){let t,o,i,s,l,n=`${e[4]+1} / ${e[0].length}`;return{c(){t=I("div"),o=I("button"),i=I("button"),h(t,"class","bp-count"),h(o,"class","bp-prev"),h(o,"title","Previous"),h(o,"aria-label","Previous"),h(i,"class","bp-next"),h(i,"title","Next"),h(i,"aria-label","Next")},m(r,a){A(r,t,a),t.innerHTML=n,A(r,o,a),A(r,i,a),s||(l=[b(o,"click",e[2]),b(i,"click",e[3])],s=!0)},p(r,a){17&a[0]&&n!==(n=`${r[4]+1} / ${r[0].length}`)&&(t.innerHTML=n)},d(r){r&&L(t),r&&L(o),r&&L(i),s=!1,B(l)}}}function xt(e){let t,n,o=e[0]&&Pt(e);return{c(){o&&o.c(),t=Z()},m(i,s){o&&o.m(i,s),A(i,t,s),n=!0},p(i,s){i[0]?o?(o.p(i,s),1&s[0]&&M(o,1)):(o=Pt(i),o.c(),M(o,1),o.m(t.parentNode,t)):o&&(pe(),z(o,1,1,()=>{o=null}),he())},i(i){n||(M(o),n=!0)},o(i){z(o),n=!1},d(i){o&&o.d(i),i&&L(t)}}}function qt(e,t,n){let o,{items:i}=t,{target:s}=t;const l=document.documentElement;let r,a,c,p,m,_,d,u,g,k,V;const x=v=>V=v,T={},q=ot(0);K(e,q,v=>n(10,o=v));const ue=()=>{a.onClose?.(T.el,g),Ke.set(!0),n(0,i=null),p?.focus({preventScroll:!0})},X=()=>De(r-1),fe=()=>De(r+1),De=v=>{d=v-r,n(4,r=Ie(v))},Ie=v=>(v+i.length)%i.length,Je=v=>{const{key:y,shiftKey:S}=v;if("Escape"===y)!a.noClose&&ue();else if("ArrowRight"===y)fe();else if("ArrowLeft"===y)X();else if("Tab"===y){const{activeElement:Y}=document;if(S||!Y.controls){v.preventDefault();const{focusWrap:oe=T.el}=a,ie=[...oe.querySelectorAll("*")].filter(f=>f.tabIndex>=0);let ve=ie.indexOf(Y);ve+=ie.length+(S?-1:1),ie[ve%ie.length].focus()}}},Me=({width:v=1920,height:y=1080})=>{const{scale:S=.99}=a,Y=Math.min(1,T.w/v*S,T.h/y*S);return[Math.round(v*Y),Math.round(y*Y)]},Ge=()=>{if(i){const v=i[Ie(r+1)],y=i[Ie(r-1)];!v.preload&&Se(v),!y.preload&&Se(y)}},Se=v=>{if(v.img){const y=I("img");return y.sizes=a.sizes||`${Me(v)[0]}px`,y.srcset=v.img,v.preload=!0,y.decode()}};return e.$$set=v=>{"items"in v&&n(0,i=v.items),"target"in v&&n(15,s=v.target)},e.$$.update=()=>{1835121&e.$$.dirty[0]&&i&&(n(6,g=i[r]),n(19,k=g.hasOwnProperty("html")),c&&(k&&x(null),a.onUpdate?.(T.el,g)))},[i,ue,X,fe,r,a,g,m,_,u,o,q,(v,y)=>c&&i?ce(v,{x:(d>0?20:-20)*(y?1:-1),duration:250}):(n(18,c=y),a.intro?ce(v,{y:y?10:-10}):(v=>{let y;if(k){const f=v.firstChild.firstChild;y=[f.clientWidth,f.clientHeight]}else y=Me(g);const S=(g.element||p).getBoundingClientRect(),Y=S.left-(T.w-S.width)/2,oe=S.top-(T.h-S.height)/2,ie=S.width/y[0],ve=S.height/y[1];return{duration:480,easing:nt,css:(f,w)=>`transform:translate3d(${Y*w}px, ${oe*w}px, 0) scale3d(${ie+f*(1-ie)}, ${ve+f*(1-ve)}, 1)`}})(v)),()=>({activeItem:g,calculateDimensions:Me,loadImage:Se,preloadNext:Ge,opts:a,prev:X,next:fe,close:ue,setResizeFunc:x,zoomed:q,container:T}),v=>{let y,S;n(20,T.el=v,T),a.onOpen?.(T.el,g),_||(y=b(globalThis,"keydown",Je));const Y=new ResizeObserver(oe=>{S&&(n(20,T.w=oe[0].contentRect.width,T),n(20,T.h=oe[0].contentRect.height,T),n(7,m=T.w<769),V?.(),a.onResize?.(T.el,g)),S=!0});return Y.observe(v),{destroy(){Y.disconnect(),y?.(),Ke.set(!1),l.classList.remove("bp-lock"),a.onClosed?.()}}},s,v=>{n(5,a=v),n(8,_=a.inline);const y=a.items;!_&&l.scrollHeight>l.clientHeight&&l.classList.add("bp-lock"),p=document.activeElement,n(20,T.w=s.offsetWidth,T),n(20,T.h=s===document.body?globalThis.innerHeight:s.clientHeight,T),n(7,m=T.w<769),n(4,r=a.position||0),Array.isArray(y)?n(0,i=y.map((S,Y)=>(a.el&&a.el===S.element&&n(4,r=Y),{i:Y,...S}))):n(0,i=(y.length?[...y]:[y]).map((S,Y)=>(a.el===S&&n(4,r=Y),{element:S,i:Y,...S.dataset})))},De,c,k,T,v=>n(9,u=v.target),function(v){2!==v.button&&v.target===this&&u===this&&!a.noClose&&ue()}]}class en extends Xe{constructor(t){super(),Fe(this,t,qt,xt,D,{items:0,target:15,open:16,close:1,prev:2,next:3,setPosition:17},null,[-1,-1])}get items(){return this.$$.ctx[0]}get target(){return this.$$.ctx[15]}get open(){return this.$$.ctx[16]}get close(){return this.$$.ctx[1]}get prev(){return this.$$.ctx[2]}get next(){return this.$$.ctx[3]}get setPosition(){return this.$$.ctx[17]}}var nn=P(3154),on=P(4650);const rn=function tn(e){return new en({...e,props:e})}({target:document.body});let sn=(()=>{class e{constructor(){}openBiggerPicture(n,o){return(0,ye.Z)(function*(){n.preventDefault();try{const i=yield nn.g.getImageInfo(o);rn.open({items:[i],intro:"fadeup"})}catch(i){alert(i)}})()}}return e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=on.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},7287:(at,Ne,P)=>{P.d(Ne,{b:()=>I});var ye=P(4482),R=P(5403),te=P(8421),E=P(4671),ke=P(5032),B=P(3269),D=P(4707),J=P(3099),K=P(1135),Pe=P(7579),Ee=P(2722),Ae=P(9300),se=P(4351),$e=P(4004),ze=P(5026),G=P(8505),A=P(4650),L=P(1318);let I=(()=>{class ${constructor(b){this.http=b,this.pagination$=new K.X(null),this.destroy$=new Pe.x,this.data$=this.paginationFunction()}onNextPage(b){b.PageNumber+=1,this.pagination$.next(b)}setPageNumberFooter(b){this.footerPageNumber=b.PageNumber}setPaginationButtonState(b,h){this.disableNextButton=0==h||!(h<b.RowCount*b.PageNumber)}resetToFirstPage(b){b.PageNumber=1,this.pagination$.next(b),this.hideCount=!0,this.goToLastPage=!1}getAllData(b,h){b.RowCount=h,this.pagination$.next(b),this.goToLastPage=!0}destroy(){this.destroy$.next(!0),this.destroy$.complete(),this.pagination$=null,this.pagination$=new K.X(null),this.data$=this.paginationFunction()}paginationFunction(){return this.pagination$.pipe((0,Ee.R)(this.destroy$),(0,Ae.h)(b=>null!=b),(0,se.b)(b=>this.http.post(`/API/${this.fetchDataEndpoint}`,JSON.stringify(b)).pipe((0,$e.U)(h=>h.Data))),function re(...$){const Z=(0,B.jO)($);return(0,ye.e)((b,h)=>{const C=$.length,F=new Array(C);let ne=$.map(()=>!1),Q=!1;for(let j=0;j<C;j++)(0,te.Xf)($[j]).subscribe((0,R.x)(h,le=>{F[j]=le,!Q&&!ne[j]&&(ne[j]=!0,(Q=ne.every(E.y))&&(ne=null))},ke.Z));b.subscribe((0,R.x)(h,j=>{if(Q){const le=[j,...F];h.next(Z?Z(...le):le)}}))})}(this.pagination$),(0,ze.R)((b,h)=>{const[C,F]=b,[ne]=h;return 1==F.PageNumber?[ne,F]:[C.concat(ne),F]}),(0,G.b)(([b,h])=>{this.setPageNumberFooter(h),this.setPaginationButtonState(h,b.length)}),(0,$e.U)(([b])=>b),function H($,Z,b){let h,C=!1;return $&&"object"==typeof $?({bufferSize:h=1/0,windowTime:Z=1/0,refCount:C=!1,scheduler:b}=$):h=$??1/0,(0,J.B)({connector:()=>new D.t(h,Z,b),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:C})}())}}return $.\u0275fac=function(b){return new(b||$)(A.LFG(L.O))},$.\u0275prov=A.Yz7({token:$,factory:$.\u0275fac,providedIn:"root"}),$})()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[360],{4360:(E,h,e)=>{e.r(h),e.d(h,{ReportModule:()=>_});var u=e(6895),t=e(7398),i=e(4650),g=e(8252);let M=(()=>{class n{constructor(){}}return n.\u0275fac=function(a){return new(a||n)},n.\u0275cmp=i.Xpm({type:n,selectors:[["app-report"]],decls:1,vars:0,template:function(a,m){1&a&&i._UZ(0,"router-outlet")},dependencies:[g.lC],styles:["ul[_ngcontent-%COMP%] > li.dropdown-item[_ngcontent-%COMP%]{font-size:.6875rem!important}"]}),n})();var p=e(8063);const r=[{path:"",component:M,children:[{path:"",redirectTo:"order",pathMatch:"full"},{path:"order",loadChildren:()=>e.e(174).then(e.bind(e,6174)).then(n=>n.OrderModule),canActivate:[p.a]},{path:"product-statistic",loadChildren:()=>Promise.all([e.e(516),e.e(25)]).then(e.bind(e,6025)).then(n=>n.ProductStatisticModule),canActivate:[p.a]}]}];let C=(()=>{class n{}return n.\u0275fac=function(a){return new(a||n)},n.\u0275mod=i.oAB({type:n}),n.\u0275inj=i.cJS({imports:[u.ez,g.Bz.forChild(r)]}),n})();var f=e(4006),D=e(7481),R=e(5171);let _=(()=>{class n{}return n.\u0275fac=function(a){return new(a||n)},n.\u0275mod=i.oAB({type:n}),n.\u0275inj=i.cJS({imports:[u.ez,t.Z,C,f.u5,D.R,R.v,g.Bz]}),n})()},5171:(E,h,e)=>{e.d(h,{Pg:()=>n,v:()=>c});var u=e(6895),t=e(4650),i=e(4006),g=e(8277),M=e(4859),p=e(3238),r=e(9602),C=e(9549),f=e(4144),D=e(5585);function R(a,m){if(1&a){const o=t.EpF();t.ynx(0),t.TgZ(1,"mat-date-range-picker-actions")(2,"button",7),t._uU(3,"Cancel"),t.qZA(),t.TgZ(4,"button",8),t.NdJ("click",function(){t.CHM(o);const s=t.oxw();return t.KtG(s.onSelectDate())}),t._uU(5,"Search"),t.qZA()(),t.BQk()}}const _={parse:{dateInput:"DD MMM YYYY"},display:{dateInput:"DD MMM YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}};let n=(()=>{class a{constructor(){this.disabled=!1,this.widthClass="w-100",this.showButtonConfirm=!1,this.dateChange=new t.vpe}fromDateChange(o){let l=o?.toDate();this.from=l}toDateChange(o){if(o){let l=o.toDate();this.to=l,this.showButtonConfirm||this.emitDateChange()}}emitDateChange(){this.dateChange.emit({from:this.from,to:this.to})}onSelectDate(){this.emitDateChange()}}return a.\u0275fac=function(o){return new(o||a)},a.\u0275cmp=t.Xpm({type:a,selectors:[["app-datepicker-range"]],inputs:{placeholder:"placeholder",displayToggle:"displayToggle",date:"date",disabled:"disabled",minDate:"minDate",widthClass:"widthClass",showButtonConfirm:"showButtonConfirm",from:"from",to:"to"},outputs:{dateChange:"dateChange"},features:[t._Bn([{provide:p._A,useClass:g.t7,deps:[p.Ad]},{provide:p.sG,useValue:_}])],decls:8,vars:8,consts:[["appearance","outline"],["id","dates",3,"min","rangePicker"],["matStartDate","","placeholder","Start date",3,"value","dateChange","click"],["matEndDate","","placeholder","End date",3,"value","dateChange","click"],["matPrefix","",3,"for"],["picker",""],[4,"ngIf"],["mat-button","","matDateRangePickerCancel",""],["mat-raised-button","","color","primary","matDateRangePickerApply","",3,"click"]],template:function(o,l){if(1&o){const s=t.EpF();t.TgZ(0,"mat-form-field",0)(1,"mat-date-range-input",1)(2,"input",2),t.NdJ("dateChange",function(d){return l.fromDateChange(d.value)})("click",function(){t.CHM(s);const d=t.MAs(6);return t.KtG(d.open())}),t.qZA(),t.TgZ(3,"input",3),t.NdJ("dateChange",function(d){return l.toDateChange(d.value)})("click",function(){t.CHM(s);const d=t.MAs(6);return t.KtG(d.open())}),t.qZA()(),t._UZ(4,"mat-datepicker-toggle",4),t.TgZ(5,"mat-date-range-picker",null,5),t.YNc(7,R,6,0,"ng-container",6),t.qZA()()}if(2&o){const s=t.MAs(6);t.Tol(l.widthClass),t.xp6(1),t.Q6J("min",l.minDate)("rangePicker",s),t.xp6(1),t.Q6J("value",l.from),t.xp6(1),t.Q6J("value",l.to),t.xp6(1),t.Q6J("for",s),t.xp6(3),t.Q6J("ngIf",l.showButtonConfirm)}},dependencies:[u.O5,r.nW,r.wx,r.zY,r.By,r._g,r.M5,r.dp,r.DK,C.KE,C.qo,M.lW],styles:["mat-date-range-input[_ngcontent-%COMP%]{font-size:.875rem}"]}),a})(),c=(()=>{class a{}return a.\u0275fac=function(o){return new(o||a)},a.\u0275mod=t.oAB({type:a}),a.\u0275inj=t.cJS({providers:[r.FA],imports:[u.ez,p.XK,r.FA,C.lN,D.ZU,f.c,i.u5,M.ot]}),a})()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[369],{9369:(Y,_,a)=>{a.r(_),a.d(_,{LoginModule:()=>I});var f=a(6895),c=a(4006),e=a(4650),d=a(8252),m=a(1318);let b=(()=>{class o{constructor(t,n,i){this.route=t,this.http=n,this.service=i}ngOnInit(){this.route.queryParams.subscribe(t=>{this.code=t.code})}addChannelLazada(){this.http.post("/api/ChannelAdd/AddLazada",{Code:this.code}).subscribe(n=>{this.service.navigate(["/menu/channel"])})}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(d.gz),e.Y36(m.O),e.Y36(d.F0))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-lazada"]],decls:20,vars:1,consts:[[1,"container"],[1,"row","d-flex","justify-content-center"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-5",3,"click"],[1,"fas","fa-undo"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),e._UZ(5,"i",5),e.TgZ(6,"div",6),e._uU(7,"Success !"),e.qZA()(),e.TgZ(8,"div",7)(9,"div"),e._uU(10,"You have successfully authorized "),e.qZA(),e.TgZ(11,"div"),e._uU(12,"DEALPOS to manage your Lazada"),e.qZA(),e.TgZ(13,"div"),e._uU(14," Your Code is "),e.TgZ(15,"span",8),e._uU(16),e.qZA()(),e.TgZ(17,"button",9),e.NdJ("click",function(){return n.addChannelLazada()}),e._UZ(18,"i",10),e._uU(19," Add to my Channel"),e.qZA()()()()()()),2&t&&(e.xp6(16),e.Oqu(n.code))}}),o})();var C=a(7185);let x=(()=>{class o{constructor(){}getBrowserName(){const t=window.navigator.userAgent.toLowerCase();switch(!0){case t.indexOf("edge")>-1||t.indexOf("edg")>-1:return"edge";case t.indexOf("opr")>-1:return"opera";case t.indexOf("chrome")>-1:return"chrome";case t.indexOf("trident")>-1:return"ie";case t.indexOf("firefox")>-1:return"firefox";case t.indexOf("safari")>-1:return"safari";default:return"other"}}}return o.\u0275fac=function(t){return new(t||o)},o.\u0275prov=e.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();var v=a(8002);const w=["domainAutoFocus"],y=["passAutoFocus"];function Z(o,r){1&o&&(e.TgZ(0,"p"),e._uU(1," Domain is required "),e.qZA())}function M(o,r){1&o&&(e.TgZ(0,"p"),e._uU(1," Please enter a valid dealpos domain "),e.qZA())}function O(o,r){if(1&o&&(e.TgZ(0,"div",38),e.YNc(1,Z,2,0,"p",39),e.YNc(2,M,2,0,"p",39),e.qZA()),2&o){e.oxw();const t=e.MAs(18);e.xp6(1),e.Q6J("ngIf",t.errors.required),e.xp6(1),e.Q6J("ngIf",t.errors.pattern)}}function P(o,r){1&o&&(e.TgZ(0,"p"),e._uU(1," Username is required "),e.qZA())}function T(o,r){if(1&o&&(e.TgZ(0,"div",38),e.YNc(1,P,2,0,"p",39),e.qZA()),2&o){e.oxw();const t=e.MAs(24);e.xp6(1),e.Q6J("ngIf",t.errors.required)}}const A=function(o,r){return{"fa-eye":o,"fa-eye-slash":r}};function k(o,r){if(1&o){const t=e.EpF();e.TgZ(0,"i",40),e.NdJ("click",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.hideShowPassword())}),e.qZA()}if(2&o){const t=e.oxw();e.Q6J("ngClass",e.WLB(1,A,"eye-off"==t.passwordIcon,"eye"==t.passwordIcon))}}function U(o,r){1&o&&(e.TgZ(0,"p"),e._uU(1," Password is required "),e.qZA())}function S(o,r){if(1&o&&(e.TgZ(0,"div",38),e.YNc(1,U,2,0,"p",39),e.qZA()),2&o){e.oxw();const t=e.MAs(31);e.xp6(1),e.Q6J("ngIf",t.errors.required)}}function q(o,r){if(1&o){const t=e.EpF();e.TgZ(0,"a",41),e.NdJ("click",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.redirectForgetPass())}),e._uU(1,"Forgot Password?"),e.qZA()}}const z=[{path:"",component:(()=>{class o{constructor(t,n,i,s,l,u){this.http=t,this._router=n,this.elementRef=i,this.toastr=s,this.checkBrowser=l,this.konversi=u,this.login={Host:"",Username:"",Password:""},this.passwordType="password",this.passwordIcon="eye-off",this.getCookies();var p=JSON.parse(window.localStorage.getItem("user"));let h=new Date;null!=p&&(null!=p.expiredAt?window.localStorage.removeItem("user"):new Date(p.Token.expiredAt)>h&&this._router.navigate(["menu"]))}ngOnInit(){this.elementRef.nativeElement.ownerDocument.body.style.backgroundColor="#dfeffc",this.browser=this.checkBrowser.getBrowserName()}ngOnDestroy(){this.elementRef.nativeElement.ownerDocument.body.style.backgroundColor="white"}getCookies(){let t=localStorage.getItem("Authorization");if(null!=t){let n=JSON.parse(t);this.login.Host=n.Host,this.login.Username=n.Username}}setAutoFocusDomain(){this.domainElementRef.nativeElement.focus()}setAutoFocusPass(){this.passElementRef.nativeElement.focus()}DoLogin(){this.http.post("/api/token/Login",this.login).subscribe(t=>{if(null!=t.Token.access_token){window.localStorage.removeItem("user"),window.localStorage.setItem("user",JSON.stringify(t));let n="This user is lack of these following roles :",i=!0,s=!0,l=!0,u=!0,p=this.konversi.GetRoles();null==p.find(g=>"Sell"==g)&&(i=!1,n=`${n} <br/> Sell Create`),null==p.find(g=>"SellEditor"==g)&&(s=!1,n=`${n} <br/> Sell Editor`),null==p.find(g=>"DelC"==g)&&(l=!1,n=`${n} <br/> Delivery Create`),null==p.find(g=>"PayC"==g)&&(u=!1,n=`${n} <br/> Payment Create`),(!i||!s||!l||!u)&&this.toastr.warning(n,"Warning!",{enableHtml:!0}),window.localStorage.removeItem("Intercom"),window.localStorage.setItem("Intercom",JSON.stringify(t.IntercomWidget)),window.localStorage.removeItem("Authorization"),window.localStorage.setItem("Authorization",JSON.stringify({Host:this.login.Host,Username:this.login.Username})),this._router.navigate(t.Channel.length<1?["menu/channel"]:["menu"])}})}redirectForgetPass(){window.location=this.makeForgotPassLink()}makeForgotPassLink(){var t=this.login.Host;return"/"==t[t.length-1]&&(t=t.slice(0,-1)),t.includes("https://")||(t="https://"+t),t+"/ForgotPassword"}hideShowPassword(){this.passwordType="text"===this.passwordType?"password":"text",this.passwordIcon="eye-off"===this.passwordIcon?"eye":"eye-off"}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(m.O),e.Y36(d.F0),e.Y36(e.SBq),e.Y36(C._W),e.Y36(x),e.Y36(v.e))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-login"]],viewQuery:function(t,n){if(1&t&&(e.Gf(w,5),e.Gf(y,5)),2&t){let i;e.iGM(i=e.CRH())&&(n.domainElementRef=i.first),e.iGM(i=e.CRH())&&(n.passElementRef=i.first)}},decls:60,vars:9,consts:[[1,"container"],[1,"row","mt-md-0","align-self-center"],[1,"col-12","col-md-7","text-center"],[1,"big-display","robotoslab","d-none","d-sm-block"],["src","https://res.cloudinary.com/pos/image/upload/v1657855612/Apps/Login/Omnichannel.png","alt","integration-image",1,"img-fluid"],[1,"col-12","col-md-5","order-first","order-md-last","mt-12"],[1,"big-display","text-center","my-5","py-5","robotoslab","d-block","d-sm-none"],[1,"card"],[1,"card-body"],[1,"card-title"],[1,"ms-2","fw-normal","font-xl","robotoslab"],[1,"mt-10"],[1,"form-label-group"],["type","text","required","","name","Host","id","inputHost","placeholder","POS Domain (xyz.dealpos.com)","pattern","(https:\\/\\/)?\\w+.dealpos(.com|.net|.co.id)(\\/)?",1,"form-control","text-start",3,"ngModel","ngModelChange"],["domainAutoFocus","","domain","ngModel"],["for","inputHost",1,"text-start"],["class","text-danger",4,"ngIf"],["type","text","name","Username","id","inputUsername","placeholder","Username","required","",1,"form-control","text-start",3,"ngModel","ngModelChange"],["username","ngModel"],["for","inputUsername",1,"text-start"],[1,"form-label-group","mb-5","mb-sm-2"],["name","Password","id","inputPassword","placeholder","Password","required","",1,"form-control","text-start",3,"type","ngModel","ngModelChange"],["passAutoFocus","","password","ngModel"],["for","inputPassword",1,"text-start"],["class","passwordIcon fas fa-lg",3,"ngClass","click",4,"ngIf"],[1,"row","justify-content-between","align-items-center"],[1,"col-12","col-lg-auto","order-first","order-lg-last"],["href","#",3,"click",4,"ngIf"],[1,"col-12","col-lg-5","order-last","order-lg-last","text-end"],["data-cy","login","type","submit",1,"btn","btn-lg","btn-primary","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"col-12","d-block","d-md-none","text-center"],[1,"pt-1rem","me-3"],["target","_blank","href","https://www.dealpos.com"],["src","https://res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png","alt","dealpos-logo",1,"img-fluid"],["target","_blank","href","https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete",1,"pt-1rem","font-italic"],[1,"mx-5","pb-5","mb-5","d-none","d-md-block"],[1,"col-auto","d-inline-flex"],[1,"col-auto"],[1,"text-danger"],[4,"ngIf"],[1,"passwordIcon","fas","fa-lg",3,"ngClass","click"],["href","#",3,"click"]],template:function(t,n){if(1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"h1",3),e._uU(4,"DealPOS Omnichannel"),e.qZA(),e._UZ(5,"img",4),e.qZA(),e.TgZ(6,"div",5)(7,"h1",6),e._uU(8,"DealPOS X Marketplace"),e.qZA(),e.TgZ(9,"div",7)(10,"div",8)(11,"div",9)(12,"h2",10),e._uU(13,"Sign in"),e.qZA()(),e.TgZ(14,"form",11)(15,"div",12)(16,"input",13,14),e.NdJ("ngModelChange",function(s){return n.login.Host=s}),e.qZA(),e.TgZ(19,"label",15),e._uU(20,"POS Domain (xyz.dealpos.com)"),e.qZA()(),e.YNc(21,O,3,2,"div",16),e.TgZ(22,"div",12)(23,"input",17,18),e.NdJ("ngModelChange",function(s){return n.login.Username=s}),e.qZA(),e.TgZ(25,"label",19),e._uU(26,"Username"),e.qZA()(),e.YNc(27,T,2,1,"div",16),e.TgZ(28,"div",20)(29,"input",21,22),e.NdJ("ngModelChange",function(s){return n.login.Password=s}),e.qZA(),e.TgZ(32,"label",23),e._uU(33,"Password"),e.qZA(),e.YNc(34,k,1,4,"i",24),e.qZA(),e.YNc(35,S,2,1,"div",16),e.TgZ(36,"div",25)(37,"div",26),e.YNc(38,q,2,0,"a",27),e.qZA(),e.TgZ(39,"div",28)(40,"button",29),e.NdJ("click",function(){return n.DoLogin()}),e._uU(41,"Log in"),e.qZA()()()()()()(),e.TgZ(42,"div",30)(43,"p",31),e._uU(44,"Powered by : "),e.qZA(),e.TgZ(45,"a",32),e._UZ(46,"img",33),e.qZA(),e._UZ(47,"br"),e.TgZ(48,"a",34),e._uU(49,"Version 2.4.7"),e.qZA()()()(),e.TgZ(50,"footer",35)(51,"div",25)(52,"div",36)(53,"p",31),e._uU(54,"Powered by : "),e.qZA(),e.TgZ(55,"a",32),e._UZ(56,"img",33),e.qZA()(),e.TgZ(57,"div",37)(58,"a",34),e._uU(59,"Version 2.4.7"),e.qZA()()()()),2&t){const i=e.MAs(18),s=e.MAs(24),l=e.MAs(31);e.xp6(16),e.Q6J("ngModel",n.login.Host),e.xp6(5),e.Q6J("ngIf",i.invalid&&(i.dirty||i.touched)),e.xp6(2),e.Q6J("ngModel",n.login.Username),e.xp6(4),e.Q6J("ngIf",s.invalid&&(s.dirty||s.touched)),e.xp6(2),e.Q6J("type",n.passwordType)("ngModel",n.login.Password),e.xp6(5),e.Q6J("ngIf",""!=n.login.Password&&"edge"!=n.browser),e.xp6(1),e.Q6J("ngIf",l.invalid&&(l.dirty||l.touched)),e.xp6(3),e.Q6J("ngIf",i.valid)}},dependencies:[f.mk,f.O5,c._Y,c.Fj,c.JJ,c.JL,c.Q7,c.c5,c.On,c.F],styles:[".container[_ngcontent-%COMP%]{position:absolute;max-width:100%}.card[_ngcontent-%COMP%]{margin-bottom:30px;padding-bottom:5px;padding-top:5px}.passwordIcon[_ngcontent-%COMP%]{top:1.8rem;right:.8rem;position:absolute;margin:0 auto!important;cursor:pointer}.big-display[_ngcontent-%COMP%]{font-size:2rem;font-weight:300;line-height:1.2}@media (min-width: 768px){.container[_ngcontent-%COMP%]{max-width:70%;top:50%;left:50%;transform:translate(-50%) translateY(-50%)}.big-display[_ngcontent-%COMP%]{font-size:3rem}}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{height:100%}body[_ngcontent-%COMP%]{display:flex;align-items:center;padding-top:40px;padding-bottom:40px}footer[_ngcontent-%COMP%]{position:absolute;bottom:0;width:90%;left:3rem}.pt-1rem[_ngcontent-%COMP%]{padding-top:1rem}.form-label-group[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{color:#666}.font-xl[_ngcontent-%COMP%]{font-size:x-large}.font125rem[_ngcontent-%COMP%]{font-size:1.25rem}.robotoslab[_ngcontent-%COMP%]{font-family:Roboto Slab}"]}),o})(),data:{title:"Dealpos x Marketplace"}},{path:"shopee",component:(()=>{class o{constructor(t,n,i){this.route=t,this.http=n,this.service=i}ngOnInit(){this.route.queryParams.subscribe(t=>{this.shopID=t.shop_id,this.code=t.code})}addShopee(){let t={ShopID:Number(this.shopID),Code:this.code};this.http.post("/api/ChannelAdd/ShopeeV2",t).subscribe(i=>{this.service.navigate(["/menu/channel"])})}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(d.gz),e.Y36(m.O),e.Y36(d.F0))},o.\u0275cmp=e.Xpm({type:o,selectors:[["shopee-authorized"]],decls:20,vars:1,consts:[[1,"container"],[1,"row","d-flex","justify-content-center"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-5",3,"click"],[1,"fas","fa-undo"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),e._UZ(5,"i",5),e.TgZ(6,"div",6),e._uU(7,"Success !"),e.qZA()(),e.TgZ(8,"div",7)(9,"div"),e._uU(10,"You have successfully authorized "),e.qZA(),e.TgZ(11,"div"),e._uU(12,"DEALPOS to manage your Shopee"),e.qZA(),e.TgZ(13,"div"),e._uU(14," Your shopID is "),e.TgZ(15,"span",8),e._uU(16),e.qZA()(),e.TgZ(17,"button",9),e.NdJ("click",function(){return n.addShopee()}),e._UZ(18,"i",10),e._uU(19," Add to my Channel"),e.qZA()()()()()()),2&t&&(e.xp6(16),e.Oqu(n.shopID))},styles:[".container[_ngcontent-%COMP%]{position:absolute;max-width:100%}.card[_ngcontent-%COMP%]{margin-bottom:30px;padding-bottom:5px;padding-top:5px}.passwordIcon[_ngcontent-%COMP%]{top:1.8rem;right:.8rem;position:absolute;margin:0 auto!important;cursor:pointer}.big-display[_ngcontent-%COMP%]{font-size:2rem;font-weight:300;line-height:1.2}@media (min-width: 768px){.container[_ngcontent-%COMP%]{max-width:70%;top:50%;left:50%;transform:translate(-50%) translateY(-50%)}.big-display[_ngcontent-%COMP%]{font-size:3rem}}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{height:100%}body[_ngcontent-%COMP%]{display:flex;align-items:center;padding-top:40px;padding-bottom:40px}footer[_ngcontent-%COMP%]{position:absolute;bottom:0;width:90%;left:3rem}.pt-1rem[_ngcontent-%COMP%]{padding-top:1rem}.form-label-group[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{color:#666}.font-xl[_ngcontent-%COMP%]{font-size:x-large}.font125rem[_ngcontent-%COMP%]{font-size:1.25rem}.robotoslab[_ngcontent-%COMP%]{font-family:Roboto Slab}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]}),o})(),data:{title:"Success"}},{path:"tiktok",component:(()=>{class o{constructor(t,n,i){this.route=t,this.http=n,this.service=i}ngOnInit(){this.route.queryParams.subscribe(t=>{this.code=t.code,this.state=t.state})}addChannelTiktok(){this.http.post("/api/ChannelAdd/AddTiktok",{Code:this.code}).subscribe(n=>{this.service.navigate(["/menu/channel"])})}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(d.gz),e.Y36(m.O),e.Y36(d.F0))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-tiktok"]],decls:24,vars:2,consts:[[1,"container"],[1,"row","d-flex","justify-content-center"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-5",3,"click"],[1,"fas","fa-undo"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),e._UZ(5,"i",5),e.TgZ(6,"div",6),e._uU(7,"Success !"),e.qZA()(),e.TgZ(8,"div",7)(9,"div"),e._uU(10,"You have successfully authorized "),e.qZA(),e.TgZ(11,"div"),e._uU(12,"DEALPOS to manage your Tiktok"),e.qZA(),e.TgZ(13,"div"),e._uU(14," Your Code is "),e.TgZ(15,"span",8),e._uU(16),e.qZA()(),e.TgZ(17,"div"),e._uU(18," Your State is "),e.TgZ(19,"span",8),e._uU(20),e.qZA()(),e.TgZ(21,"button",9),e.NdJ("click",function(){return n.addChannelTiktok()}),e._UZ(22,"i",10),e._uU(23," Add to my Channel"),e.qZA()()()()()()),2&t&&(e.xp6(16),e.Oqu(n.code),e.xp6(4),e.Oqu(n.state))},styles:[".container[_ngcontent-%COMP%]{position:absolute;max-width:100%}.card[_ngcontent-%COMP%]{margin-bottom:30px;padding-bottom:5px;padding-top:5px}.passwordIcon[_ngcontent-%COMP%]{top:1.8rem;right:.8rem;position:absolute;margin:0 auto!important;cursor:pointer}.big-display[_ngcontent-%COMP%]{font-size:2rem;font-weight:300;line-height:1.2}@media (min-width: 768px){.container[_ngcontent-%COMP%]{max-width:70%;top:50%;left:50%;transform:translate(-50%) translateY(-50%)}.big-display[_ngcontent-%COMP%]{font-size:3rem}}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{height:100%}body[_ngcontent-%COMP%]{display:flex;align-items:center;padding-top:40px;padding-bottom:40px}footer[_ngcontent-%COMP%]{position:absolute;bottom:0;width:90%;left:3rem}.pt-1rem[_ngcontent-%COMP%]{padding-top:1rem}.form-label-group[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{color:#666}.font-xl[_ngcontent-%COMP%]{font-size:x-large}.font125rem[_ngcontent-%COMP%]{font-size:1.25rem}.robotoslab[_ngcontent-%COMP%]{font-family:Roboto Slab}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]}),o})(),data:{title:"Success"}},{path:"lazada",component:b,data:{title:"Success"}}];let L=(()=>{class o{}return o.\u0275fac=function(t){return new(t||o)},o.\u0275mod=e.oAB({type:o}),o.\u0275inj=e.cJS({imports:[d.Bz.forChild(z),d.Bz]}),o})(),I=(()=>{class o{}return o.\u0275fac=function(t){return new(t||o)},o.\u0275mod=e.oAB({type:o}),o.\u0275inj=e.cJS({imports:[f.ez,c.u5,L]}),o})()}}]);