marketplacepos 2.7.7 → 2.7.9

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 (45) hide show
  1. package/Marketplace/213.cb4351cfb44ca3bf.js +1 -0
  2. package/Marketplace/360.8279e3b4ceab63e1.js +1 -0
  3. package/Marketplace/{369.8e0f0cb3753df1cb.js → 369.0575419486a72276.js} +1 -1
  4. package/Marketplace/397.55fafd1d8945185c.js +1 -0
  5. package/Marketplace/3rdpartylicenses.txt +6 -0
  6. package/Marketplace/408.b53797a5bda9f7f8.js +1 -0
  7. package/Marketplace/46.67982fb195b43a4d.js +1 -0
  8. package/Marketplace/{512.29e1a80c0261c3fd.js → 512.6ddd3191d13695a8.js} +1 -1
  9. package/Marketplace/53.7e8bb7325980dfd5.js +1 -0
  10. package/Marketplace/655.09b1b17f23a59b7e.js +1 -0
  11. package/Marketplace/{717.26634e93ca9b60ed.js → 717.2e5a78cf17e9bed1.js} +1 -1
  12. package/Marketplace/718.78930b2d3e9fc2bd.js +1 -0
  13. package/Marketplace/{72.b0c5b137e38d6dbc.js → 72.a5fd86c341c782ab.js} +1 -1
  14. package/Marketplace/{739.a22c3c892afd39b9.js → 739.0de1f18deac0ed90.js} +1 -1
  15. package/Marketplace/82.fecf4fa3a3743326.js +1 -0
  16. package/Marketplace/87.0c53ec1547d4d5d5.js +1 -0
  17. package/Marketplace/{874.8531eff61a70fef4.js → 874.7662257927081a57.js} +1 -1
  18. package/Marketplace/877.7e5f8104980e0168.js +1 -0
  19. package/Marketplace/884.45404dc14d1585a7.js +1 -0
  20. package/Marketplace/913.6b5b3db030c3bc49.js +1 -0
  21. package/Marketplace/993.5c22ca4b00b8c459.js +1 -0
  22. package/Marketplace/997.08e3f8cf0bafff67.js +1 -0
  23. package/Marketplace/common.df21aa97084954ce.js +1 -0
  24. package/Marketplace/index.html +2 -2
  25. package/Marketplace/main.add73bc6e206d464.js +1 -0
  26. package/Marketplace/runtime.4aba70544574ad58.js +1 -0
  27. package/package.json +1 -1
  28. package/Marketplace/25.b70d86f301c02577.js +0 -1
  29. package/Marketplace/360.35d9782330672e00.js +0 -1
  30. package/Marketplace/397.5272744096b3c1f6.js +0 -1
  31. package/Marketplace/408.37b4fc08ff0dec9d.js +0 -1
  32. package/Marketplace/516.62e0aa94b5bf1d69.js +0 -1
  33. package/Marketplace/61.868e35095821a091.js +0 -1
  34. package/Marketplace/616.b7e1ec6933570169.js +0 -1
  35. package/Marketplace/643.cb4d6fbf012ab5e2.js +0 -1
  36. package/Marketplace/716.986295839ef23655.js +0 -1
  37. package/Marketplace/833.ac6eaa6a9d4889f8.js +0 -1
  38. package/Marketplace/863.8a1ee5ad77c709bd.js +0 -1
  39. package/Marketplace/877.162c86da2be22c5c.js +0 -1
  40. package/Marketplace/913.08c7bf72f6b8e4f8.js +0 -1
  41. package/Marketplace/993.2e09a35cae6cb725.js +0 -1
  42. package/Marketplace/997.6b3f954f35ff3ac0.js +0 -1
  43. package/Marketplace/common.964b6e7314a0ac53.js +0 -1
  44. package/Marketplace/main.4b854eb9a27f62ed.js +0 -1
  45. package/Marketplace/runtime.8464b07500ba30ae.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[213],{8231:(A,I,s)=>{s.d(I,{j:()=>m});var S=s(5412),g=s(1889),c=s(9694),D=s(6779),t=s(4650),f=s(284),P=s(6895),e=s(4006),n=s(1948),a=s(9549),l=s(4385),r=s(3238),d=s(266),_=s(6401);function E(h,i){if(1&h&&(t.TgZ(0,"mat-option",9)(1,"div",10),t._UZ(2,"img",11),t.TgZ(3,"span"),t._uU(4),t.qZA()()()),2&h){const o=i.$implicit;t.Q6J("value",o.ID)("disabled",o.disabled),t.xp6(1),t.Q6J("matTooltip",o.disabled?"Single Product Scan disabled for this type of Channel":null),t.xp6(1),t.Q6J("src",o.Img,t.LSH),t.xp6(2),t.Oqu(o.Name)}}function O(h,i){if(1&h){const o=t.EpF();t.TgZ(0,"div")(1,"h5",12),t._uU(2,"Scan Type"),t.qZA(),t.TgZ(3,"mat-radio-group",13),t.NdJ("ngModelChange",function(p){t.CHM(o);const C=t.oxw();return t.KtG(C.filter.ScanFull=p)}),t.TgZ(4,"mat-radio-button",14),t._uU(5," Full (Include Inactive Products) "),t.qZA(),t.TgZ(6,"mat-radio-button",15),t._uU(7," Active "),t.qZA()()()}if(2&h){const o=t.oxw();t.xp6(3),t.Q6J("ngModel",o.filter.ScanFull),t.xp6(1),t.Q6J("value",!0),t.xp6(2),t.Q6J("value",!1)}}function T(h,i){if(1&h){const o=t.EpF();t.TgZ(0,"div",16)(1,"h5",3),t._uU(2),t.ALo(3,"date"),t.qZA(),t.TgZ(4,"mat-radio-group",17),t.NdJ("ngModelChange",function(p){t.CHM(o);const C=t.oxw();return t.KtG(C.filter.UpdatedProduct=p)}),t.TgZ(5,"mat-radio-button",18),t._uU(6," Scan All Products "),t.qZA(),t.TgZ(7,"mat-radio-button",19),t._uU(8," Scan Updated Products "),t.qZA()()()}if(2&h){const o=t.oxw();t.xp6(2),t.hij(" Last Scan: ",t.xi3(3,4,o.selectedChannel.LastSync,"dd MMMM yyyy HH:mm")," "),t.xp6(2),t.Q6J("ngModel",o.filter.UpdatedProduct),t.xp6(1),t.Q6J("value",!1),t.xp6(2),t.Q6J("value",!0)}}function U(h,i){if(1&h){const o=t.EpF();t.TgZ(0,"div",16)(1,"h5",3),t._uU(2," Scan Option "),t.qZA(),t.TgZ(3,"mat-radio-group",20),t.NdJ("ngModelChange",function(p){t.CHM(o);const C=t.oxw();return t.KtG(C.filter.Async=p)}),t.TgZ(4,"mat-radio-button",21),t._uU(5," Asynchronous (Get Notified when Complete) "),t.qZA(),t.TgZ(6,"mat-radio-button",22),t._uU(7," Synchronous (Wait until Complete) "),t.qZA()()()}if(2&h){const o=t.oxw();t.xp6(3),t.Q6J("ngModel",o.filter.Async),t.xp6(1),t.Q6J("value",!0),t.xp6(2),t.Q6J("value",!1)}}class m{constructor(i,o,u){this.dialogRef=i,this.data=o,this.router=u,this.channelType=c.x,this.disabledChannelOption=!1,this.filter={ChannelID:g.g.GuidEMpty,ScanFull:!0,UpdatedProduct:!1,Async:!1},this.isSingleChannel=!!g.g.IsNotEmpty(o.isSingleChannel)&&this.data.isSingleChannel,this.disabledChannelOption=!g.g.IsEmpty(o.disabledChannelOption)&&this.data.disabledChannelOption}ngOnInit(){this.initChannelOptions(),this.initFilter(),this.onSelectChannel(this.data?.filter?.ChannelID),this.initModalConfig()}initModalConfig(){this.modalConfig=new D.O,this.modalConfig.title="Scan Marketplace",this.modalConfig.bodyScrollable=!0}initFilter(){this.filter.ChannelID=this.data?.filter?.ChannelID,this.filter.ScanFull=!1,1==this.channelOptions.length&&(this.filter.ChannelID=this.data.channelOptions[0].ID,this.selectedChannel=this.data.channelOptions[0])}initChannelOptions(){this.channelOptions=JSON.parse(JSON.stringify(this.data.channelOptions)),this.isSingleChannel&&(this.channelOptions=this.channelOptions.map(i=>(i.disabled=!0,(i.TypeID==c.x.Tiktok||i.TypeID==c.x.Tokopedia||i.TypeID==c.x.Lazada)&&(i.disabled=!1),i)).sort(i=>i.disabled?1:-1))}onSelectChannel(i){let o=this.filterChannelById(i);this.selectedChannel=1==this.channelOptions.length?this.channelOptions[0]:o,this.filter.Async=!0,o&&o.TypeID==c.x.Tokopedia?(this.filter.ScanFull=!0,this.isTokopedia=!0):(this.filter.ScanFull=!1,this.isTokopedia=!1),this.iniHasScanUpdate(),this.setDefaultConfigUpdate()}setDefaultConfigUpdate(){this.filter.UpdatedProduct=!1,this.selectedChannel&&g.g.IsNotEmpty(this.selectedChannel.LastSync)&&(this.selectedChannel.TypeID==c.x.ShopeeV2||this.selectedChannel.TypeID==c.x.Tiktok||this.selectedChannel.TypeID==c.x.Lazada)&&(this.filter.UpdatedProduct=!0)}iniHasScanUpdate(){this.hasScanUpdate=!(this.selectedChannel?.TypeID==c.x.WooCommerce||this.selectedChannel?.TypeID==c.x.KalCare||this.selectedChannel?.TypeID==c.x.None||!g.g.IsNotEmpty(this.selectedChannel?.LastSync)||this.isSingleChannel)}filterChannelById(i){let o;return this.channelOptions&&(o=this.channelOptions.find(u=>u.ID==i)),o}submit(){this.selectedChannel.TypeID==c.x.Tokopedia&&this.filter.UpdatedProduct?this.router.navigate(["/menu/products/download/by-url"]).then(()=>{this.dialogRef.close()}):(this.beforeSubmit(),this.dialogRef.close(this.filter))}beforeSubmit(){this.filter.UpdatedProduct&&(this.filter.Async=!1)}isNotEmpty(i){return g.g.IsNotEmpty(i)}onClose(){this.dialogRef.close()}}m.\u0275fac=function(i){return new(i||m)(t.Y36(S.so),t.Y36(S.WI),t.Y36(f.F0))},m.\u0275cmp=t.Xpm({type:m,selectors:[["app-scan-dialog"]],decls:11,vars:8,consts:[[3,"dynamicValidated","config","onOk","onClose","onCancel"],["content",""],[1,"mx-4"],[1,"mb-3","fw-normal"],["appearance","outline",1,"w-100"],["name","channelid","placeholder","Channel",1,"mat-select-channel",3,"disabled","ngModel","ngModelChange"],["class","channel-option",3,"value","disabled",4,"ngFor","ngForOf"],[4,"ngIf"],["class","mt-8",4,"ngIf"],[1,"channel-option",3,"value","disabled"],["matTooltipPosition","above","matTooltipClass","custom-width-tooltip",3,"matTooltip"],[2,"width","18px","margin-right","10px",3,"src"],[1,"mb-3","fw-normal","mt-3"],["name","scanType",1,"form-control","h-100","round",3,"ngModel","ngModelChange"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Full Scan Product",1,"me-5",3,"value"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Only Active Product",1,"me-5",3,"value"],[1,"mt-8"],["name","ScanFull",1,"form-control","h-100","round",2,"line-height","2",3,"ngModel","ngModelChange"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Scan product from beginning ( use this if you haven't scanned at all)",1,"me-5",3,"value"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Scan only products that have been updated since the last channel scan",1,"me-5",3,"value"],["name","Async",1,"form-control","h-100","round",2,"line-height","2",3,"ngModel","ngModelChange"],["matTooltipClass","custom-width-tooltip","matTooltip","Scan is running in the background, status will be visible in the notification menu","matTooltipPosition","above",1,"me-5",3,"value"],[1,"me-5",3,"value"]],template:function(i,o){1&i&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return o.submit()})("onClose",function(){return o.onClose()})("onCancel",function(){return o.onClose()}),t.TgZ(1,"div",1)(2,"div",2)(3,"h5",3),t._uU(4,"Select a Channel"),t.qZA(),t.TgZ(5,"mat-form-field",4)(6,"mat-select",5),t.NdJ("ngModelChange",function(p){return o.filter.ChannelID=p})("ngModelChange",function(p){return o.onSelectChannel(p)}),t.YNc(7,E,5,5,"mat-option",6),t.qZA()(),t.YNc(8,O,8,3,"div",7),t.YNc(9,T,9,7,"div",8),t.YNc(10,U,8,3,"div",8),t.qZA()()()),2&i&&(t.Q6J("dynamicValidated",o.isNotEmpty(o.filter.ChannelID))("config",o.modalConfig),t.xp6(6),t.Q6J("disabled",o.disabledChannelOption)("ngModel",o.filter.ChannelID),t.xp6(1),t.Q6J("ngForOf",o.channelOptions),t.xp6(1),t.Q6J("ngIf",!o.isSingleChannel&&!o.isTokopedia&&o.isNotEmpty(o.filter.ChannelID)),t.xp6(1),t.Q6J("ngIf",o.hasScanUpdate),t.xp6(1),t.Q6J("ngIf",!(null!=o.filter&&o.filter.UpdatedProduct)&&!o.isSingleChannel&&o.isNotEmpty(o.filter.ChannelID)))},dependencies:[P.sg,P.O5,e.JJ,e.On,n.VQ,n.U0,a.KE,l.gD,r.ey,d.gM,_.M,P.uU],encapsulation:2})},9425:(A,I,s)=>{s.d(I,{b:()=>m});var S=s(1135),g=s(7579),c=s(2722),D=s(9300),t=s(4351),f=s(4004),P=s(4482),e=s(5403),n=s(8421),a=s(4671),l=s(5032),r=s(3269),_=s(5026),E=s(8505),O=s(4782),T=s(4650),U=s(1318);class m{constructor(i){this.http=i,this.pagination$=new S.X(null),this.destroy$=new g.x,this.data$=this.paginationFunction()}onNextPage(i){i.PageNumber+=1,this.pagination$.next(i)}setPageNumberFooter(i){this.footerPageNumber=i.PageNumber}setPaginationButtonState(i,o){this.disableNextButton=0==o||!(o<i.RowCount*i.PageNumber)}resetToFirstPage(i){i.PageNumber=1,this.pagination$.next(i),this.hideCount=!0,this.goToLastPage=!1}getAllData(i,o){i.RowCount=o,this.pagination$.next(i),this.goToLastPage=!0}destroy(){this.destroy$.next(!0),this.destroy$.complete(),this.pagination$=null,this.pagination$=new S.X(null),this.data$=this.paginationFunction()}paginationFunction(){return this.pagination$.pipe((0,c.R)(this.destroy$),(0,D.h)(i=>null!=i),(0,t.b)(i=>this.http.post(`/API/${this.fetchDataEndpoint}`,JSON.stringify(i)).pipe((0,f.U)(o=>o.Data))),function d(...h){const i=(0,r.jO)(h);return(0,P.e)((o,u)=>{const p=h.length,C=new Array(p);let M=h.map(()=>!1),N=!1;for(let v=0;v<p;v++)(0,n.Xf)(h[v]).subscribe((0,e.x)(u,y=>{C[v]=y,!N&&!M[v]&&(M[v]=!0,(N=M.every(a.y))&&(M=null))},l.Z));o.subscribe((0,e.x)(u,v=>{if(N){const y=[v,...C];u.next(i?i(...y):y)}}))})}(this.pagination$),(0,_.R)((i,o)=>{const[u,p]=i,[C]=o;return 1==p.PageNumber?[C,p]:[u.concat(C),p]}),(0,E.b)(([i,o])=>{this.setPageNumberFooter(o),this.setPaginationButtonState(o,i.length)}),(0,f.U)(([i])=>i),(0,O.d)())}}m.\u0275fac=function(i){return new(i||m)(T.LFG(U.O))},m.\u0275prov=T.Yz7({token:m,factory:m.\u0275fac,providedIn:"root"})},6082:(A,I,s)=>{s.d(I,{M:()=>f});var S=s(8505),g=s(1889),c=s(4650),D=s(1318),t=s(7185);class f{constructor(e,n){this.httpService=e,this.toastrService=n}loader(e=g.g.GuidEMpty){return this.httpService.post("/api/product/Load",{ID:e})}LoadInPOS(e=g.g.GuidEMpty){return this.httpService.post("/api/product/LoadInPOS",{ID:e})}filterChannelByTypeId(e,n){return e.filter(a=>-1!==n.findIndex(l=>a.TypeID==l))}getProductStatistic(){return this.httpService.post("/api/product/ProductStatistic",{})}getTotalProductLive(e){return this.httpService.post("/api/product/TotalProductLive",{ID:e})}clearCacheChannel(e){return this.httpService.post("/api/Channel/ClearCacheChannel",{ID:e})}uploadSingleProduct(e,n){return this.httpService.post("api/product/UploadMultipleChannel",{Channel:n,Products:e})}uploadMultipleProduct(e,n){return this.httpService.post("api/product/UploadMultipleProductAndMultipleChannel",{Channel:n,Products:e})}scanSingle(e,n){return this.httpService.post("/api/product/ScanSingle",{ID:e,SKU:n})}scanNotInChannel(e){return this.httpService.post("/api/product/ScanNotinChannel",{ID:e})}findAllSoldInChannel(e){return this.httpService.post("/api/product/GetSoldInChannel",e)}scanAll(e,n,a,l=!1){return this.httpService.post("/api/product/ScanOptimized",{ID:e,ScanFull:n,UpdatedProduct:a,Async:l})}scanCompareToPos(e){return this.httpService.post("/api/product/CompareMarketplaceToPOS",e)}getVariantCodesProduct(e){return e.Variants.map(a=>a.Code)}downloadMultipleProduct(e){let n=e.map(a=>({ChannelItemID:a.ChannelItemID,ChannelID:a.ChannelID}));return this.httpService.post("/api/product/DownloadMultipleProductFromChannel",n).pipe((0,S.b)(a=>{this.toastrService.success(`${a.Count} products downloaded to POS`,"Download Complete")}))}downloadProduct(e){return this.httpService.post("/api/product/DownloadProductFromChannel",{ChannelItemID:e.ChannelItemID,ChannelID:e.ChannelID}).pipe((0,S.b)(()=>{this.toastrService.success("Product successfully downloaded to POS","Download Complete")}))}getVariantCodesProducts(e=[]){let n=[];return e.forEach(a=>{a.Variants.forEach(l=>{n=[...n,l.Code]})}),n}filterUnselectedChannel(e,n){let l,a=[];if(e.forEach(r=>{a=[...a,...r.Channel]}),a&&0!=a.length){let r=[];l=n.filter(d=>(r=a.filter(_=>_.ChannelID==d.ID),r.length!==e.length))}else l=n;return l}findChannelById(e,n){return n.find(a=>a.ID==e)}sortChannel(e=[]){return e.sort((n,a)=>n.TypeID<a.TypeID?1:n.TypeID===a.TypeID?0:-1)}hasSelection(e=[]){return this.selectedProduct(e).length>0}selectedProduct(e=[]){return e.filter(n=>n.selected)}hasSelectionVariant(e){return this.selectedVariantProduct(e).length>0}selectedVariantProduct(e){let n=[];return e.forEach(a=>{n=[...n,...null!=a.Variants?a.Variants.filter(l=>l.selected):""]}),n}getChannelProduct(e){const n=e.Variants;let a=[];for(let l of n)if(null!=l.Channel)for(let r of l.Channel)0==a.filter(d=>d.ChannelID==r.ChannelID).length&&a.push(r);return this.sortChannel(a)}successToastrScanAllProduct(e,n,a){if(a){const l=e?.NotInPOS?.Product?e?.NotInPOS?.Product:0,r=e?.InChannel?.Product?e?.InChannel?.Product:0;this.toastrService.success(`\n ${l+r} found in ${n.Name} </br>\n (${r} In POS + ${l} Not In Pos)\n `,"Scan Complete!",{enableHtml:!0})}else this.toastrService.success(`${e.InChannel?e.InChannel.Product:0} product updates in ${n.Name} </br> \n since ${e.LastUpdate}`,"Scan Complete!",{enableHtml:!0})}checkProductHasScanButton(e,n){let a;return e.map(l=>(l.Channel=this.getChannelProduct(l),a=this.filterUnselectedChannel([l],n),l.hasScan=a.length>0,l))}checkProductHasUploadBtn(e,n){let a;return e.map(l=>(l.Channel=this.getChannelProduct(l),a=this.filterUnselectedChannel([l],n),l.hasUpload=a.length>0,l))}showToastrUploadMultiple(e=[]){let n=[],a=[];if(e.forEach(l=>{"string"==typeof l?.Response?a=[...a,`<li>${l.Response}</li>`]:(l?.Response?.Success.forEach(r=>{n=[...n,`<li>Product ${r} was <b>successfully</b> uploaded to ${l.Name}</li>`]}),l?.Response.Fail.forEach(r=>{a=[...a,`<li>${r}</li>`]}))}),a.length>0&&n.length>0){const l=[...n,...a];this.toastrService.warning(this.concatMessage(l),"Warning!",{enableHtml:!0})}else n.length>0&&0==a.length?this.toastrService.success(this.concatMessage(n),"Success",{enableHtml:!0}):this.toastrService.error(this.concatMessage(a),"Error",{enableHtml:!0})}concatMessage(e=[]){let n="";return e.forEach(a=>{n+=a}),`<ol>${n}</ol>`}showToastrSuccessUploadSingle(e,n){let a=e.filter(d=>0==d.Status),l=e.filter(d=>1==d.Status),r=this.generateToastrMessage(a,l,n);this.toastrService.success(r.message,"Success",{enableHtml:!0})}showToastErrorUploadSingle(e,n){let a=e?.error?.Message.filter(d=>0==d.Status),l=e?.error?.Message.filter(d=>1==d.Status),r=this.generateToastrMessage(a,l,n);"WARNING"==r.status?this.toastrService.warning(r.message,"Warning!",{enableHtml:!0}):this.toastrService.error(r.message,`Error - ${e.status}`,{enableHtml:!0})}generateToastrMessage(e,n,a){let r,l="";return 0==e.length&&n.length>0?(r="SUCCESS",l=this.createSuccessResponse(n,a)):e.length>0&&0==n.length?(r="ERROR",l=this.createErrResponse(e,a)):(r="WARNING",l=`${this.createSuccessResponse(n,a)} ${this.createErrResponse(e,a)}`),l=`<ol>${l}</ol>`,{status:r,message:l}}createErrResponse(e,n){let a="";return e.forEach((l,r)=>{a+=`<li><b>${l.Response}</b> for ${n.Name} in ${l.Name}</li>`}),a}createSuccessResponse(e,n){let a="";return e.forEach((l,r)=>{a+=`<li>Product ${n.Name} was <b>successfully</b> uploaded to ${l.Name}</li>`}),a}getHostName(){if(g.g.IsEmpty(this.hostName)){const e=localStorage.getItem("Authorization");this.hostName=JSON.parse(e)?.Host}return this.hostName}}f.\u0275fac=function(e){return new(e||f)(c.LFG(D.O),c.LFG(t._W))},f.\u0275prov=c.Yz7({token:f,factory:f.\u0275fac,providedIn:"root"})}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[360],{4360:(M,C,e)=>{e.r(C),e.d(C,{ReportModule:()=>r});var g=e(6895),t=e(2937),p=e(4650),f=e(284);class d{constructor(){}}d.\u0275fac=function(n){return new(n||d)},d.\u0275cmp=p.Xpm({type:d,selectors:[["app-report"]],decls:1,vars:0,template:function(n,a){1&n&&p._UZ(0,"router-outlet")},dependencies:[f.lC],styles:["ul[_ngcontent-%COMP%] > li.dropdown-item[_ngcontent-%COMP%]{font-size:.6875rem!important}"]});var m=e(8063);const i=[{path:"",component:d,children:[{path:"",redirectTo:"order",pathMatch:"full"},{path:"order",loadChildren:()=>Promise.all([e.e(592),e.e(993)]).then(e.bind(e,7993)).then(o=>o.OrderModule),canActivate:[m.a]}]}];class l{}l.\u0275fac=function(n){return new(n||l)},l.\u0275mod=p.oAB({type:l}),l.\u0275inj=p.cJS({imports:[g.ez,f.Bz.forChild(i)]});var _=e(4006),h=e(7481),D=e(5171);class r{}r.\u0275fac=function(n){return new(n||r)},r.\u0275mod=p.oAB({type:r}),r.\u0275inj=p.cJS({imports:[g.ez,t.Z,l,_.u5,h.R,f.Bz,D.P]})},5171:(M,C,e)=>{e.d(C,{P:()=>r});var g=e(6895),t=e(4650),p=e(4006),f=e(8277),d=e(9101),m=e(3238),i=e(9602),l=e(9549),_=e(4144);function h(o,n){if(1&o){const a=t.EpF();t.ynx(0),t.TgZ(1,"mat-date-range-picker-actions")(2,"button",8),t._uU(3,"Cancel"),t.qZA(),t.TgZ(4,"button",9),t.NdJ("click",function(){t.CHM(a);const s=t.oxw();return t.KtG(s.onSelectDate())}),t._uU(5,"Search"),t.qZA()(),t.BQk()}}class r{constructor(){this.disabled=!1,this.widthClass="w-100",this.showButtonConfirm=!1,this.dateChange=new t.vpe}fromDateChange(n){let a=n?.toDate();this.from=a}toDateChange(n){if(n){let a=n.toDate();this.to=a,this.showButtonConfirm||this.emitDateChange()}}onOpenDatepicker(){console.log("open");const n=document.getElementById("dropdown-filter");if(n){var a=new bootstrap.Dropdown(n);a&&(a._config.autoClose="inside")}}onCloseDatepicker(){console.log("close");const n=document.getElementById("dropdown-filter");if(n){var a=new bootstrap.Dropdown(n);a&&(a._config.autoClose="outside")}}emitDateChange(){this.dateChange.emit({from:this.from,to:this.to})}onSelectDate(){this.emitDateChange()}}r.\u0275fac=function(n){return new(n||r)},r.\u0275cmp=t.Xpm({type:r,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"},standalone:!0,features:[t._Bn([{provide:m._A,useClass:f.t7,deps:[m.Ad]},{provide:m.sG,useValue:{parse:{dateInput:"DD MMM YYYY"},display:{dateInput:"DD MMM YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}}}]),t.jDz],decls:8,vars:8,consts:[["appearance","outline",1,"date-range"],["id","dates",3,"min","rangePicker"],["matStartDate","","placeholder","Start date",3,"value","dateChange","click"],["matEndDate","","placeholder","End date",3,"value","dateChange","click"],["matPrefix","",3,"for"],[3,"opened","closed"],["picker",""],[4,"ngIf"],["mat-button","","matDateRangePickerCancel",""],["mat-raised-button","","color","primary","matDateRangePickerApply","",3,"click"]],template:function(n,a){if(1&n){const u=t.EpF();t.TgZ(0,"mat-form-field",0)(1,"mat-date-range-input",1)(2,"input",2),t.NdJ("dateChange",function(c){return a.fromDateChange(c.value)})("click",function(){t.CHM(u);const c=t.MAs(6);return t.KtG(c.open())}),t.qZA(),t.TgZ(3,"input",3),t.NdJ("dateChange",function(c){return a.toDateChange(c.value)})("click",function(){t.CHM(u);const c=t.MAs(6);return t.KtG(c.open())}),t.qZA()(),t._UZ(4,"mat-datepicker-toggle",4),t.TgZ(5,"mat-date-range-picker",5,6),t.NdJ("opened",function(){return a.onOpenDatepicker()})("closed",function(){return a.onCloseDatepicker()}),t.YNc(7,h,6,0,"ng-container",7),t.qZA()()}if(2&n){const u=t.MAs(6);t.Tol(a.widthClass),t.xp6(1),t.Q6J("min",a.minDate)("rangePicker",u),t.xp6(1),t.Q6J("value",a.from),t.xp6(1),t.Q6J("value",a.to),t.xp6(1),t.Q6J("for",u),t.xp6(3),t.Q6J("ngIf",a.showButtonConfirm)}},dependencies:[g.ez,g.O5,m.XK,i.FA,i.nW,i.wx,i.zY,i.By,i._g,i.M5,i.dp,i.DK,l.lN,l.KE,l.qo,_.c,p.u5,d.ot,d.lW],styles:["mat-form-field.date-range.mat-mdc-form-field-type-mat-date-range-input .mat-mdc-form-field-infix{padding-top:12px!important;padding-bottom:12px!important;min-height:45px!important;font-size:14px!important}"]})}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[369],{9369:(k,O,s)=>{s.r(O),s.d(O,{LoginModule:()=>x});var f=s(6895),l=s(4006),t=s(4650),p=s(284),v=s(1318);class m{constructor(e,o,i){this.route=e,this.http=o,this.service=i}ngOnInit(){this.route.queryParams.subscribe(e=>{this.code=e.code})}addChannelLazada(){this.http.post("/api/ChannelAdd/AddLazada",{Code:this.code}).subscribe(o=>{this.service.navigate(["/menu/channel"])})}}m.\u0275fac=function(e){return new(e||m)(t.Y36(p.gz),t.Y36(v.O),t.Y36(p.F0))},m.\u0275cmp=t.Xpm({type:m,selectors:[["app-lazada"]],decls:20,vars:1,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[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","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-6",3,"click"],[1,"fas","fa-undo"]],template:function(e,o){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),t._UZ(5,"i",5),t.TgZ(6,"div",6),t._uU(7,"Success !"),t.qZA()(),t.TgZ(8,"div",7)(9,"div"),t._uU(10,"You have successfully authorized "),t.qZA(),t.TgZ(11,"div"),t._uU(12,"DEALPOS to manage your Lazada"),t.qZA(),t.TgZ(13,"div"),t._uU(14," Your Code is "),t.TgZ(15,"span",8),t._uU(16),t.qZA()(),t.TgZ(17,"button",9),t.NdJ("click",function(){return o.addChannelLazada()}),t._UZ(18,"i",10),t._uU(19," Add to my Channel"),t.qZA()()()()()()),2&e&&(t.xp6(16),t.Oqu(o.code))}});var y=s(3154),P=s(7185);class h{constructor(){}getBrowserName(){const e=window.navigator.userAgent.toLowerCase();switch(!0){case e.indexOf("edge")>-1||e.indexOf("edg")>-1:return"edge";case e.indexOf("opr")>-1:return"opera";case e.indexOf("chrome")>-1:return"chrome";case e.indexOf("trident")>-1:return"ie";case e.indexOf("firefox")>-1:return"firefox";case e.indexOf("safari")>-1:return"safari";default:return"other"}}}h.\u0275fac=function(e){return new(e||h)},h.\u0275prov=t.Yz7({token:h,factory:h.\u0275fac,providedIn:"root"});var T=s(501);const _=["subdomainEl"];function S(n,e){if(1&n){const o=t.EpF();t.ynx(0),t.TgZ(1,"div",18)(2,"div",19)(3,"form")(4,"div",20)(5,"h2",21),t._uU(6,"Sign in"),t.qZA(),t.TgZ(7,"div",22)(8,"div",23)(9,"div",24)(10,"span",25),t._UZ(11,"i",26),t.qZA(),t.TgZ(12,"input",27,28),t.NdJ("ngModelChange",function(a){t.CHM(o);const u=t.oxw();return t.KtG(u.subdomain=a)}),t.qZA()()(),t.TgZ(14,"select",29),t.NdJ("ngModelChange",function(a){t.CHM(o);const u=t.oxw();return t.KtG(u.domain=a)}),t.TgZ(15,"option",30),t._uU(16,".dealpos.co.id"),t.qZA(),t.TgZ(17,"option",31),t._uU(18,".dealpos.net"),t.qZA(),t.TgZ(19,"option",32),t._uU(20,".dealpos.com"),t.qZA()()()(),t.TgZ(21,"div",33)(22,"button",34),t.NdJ("click",function(){t.CHM(o);const a=t.oxw();return t.KtG(a.onNextState())}),t._uU(23," Next "),t.qZA()()()()(),t.BQk()}if(2&n){const o=t.oxw();t.xp6(12),t.Q6J("ngModel",o.subdomain),t.xp6(2),t.Q6J("ngModel",o.domain)}}function r(n,e){1&n&&(t.TgZ(0,"p"),t._uU(1," Username is required "),t.qZA())}function c(n,e){if(1&n&&(t.TgZ(0,"div",58),t.YNc(1,r,2,0,"p",59),t.qZA()),2&n){t.oxw();const o=t.MAs(13);t.xp6(1),t.Q6J("ngIf",o.errors.required)}}const g=function(n,e){return{"fa-eye":n,"fa-eye-slash":e}};function d(n,e){if(1&n){const o=t.EpF();t.TgZ(0,"i",60),t.NdJ("click",function(){t.CHM(o);const a=t.oxw(2);return t.KtG(a.hideShowPassword())}),t.qZA()}if(2&n){const o=t.oxw(2);t.Q6J("ngClass",t.WLB(1,g,"eye-off"==o.passwordIcon,"eye"==o.passwordIcon))}}function Z(n,e){1&n&&(t.TgZ(0,"p"),t._uU(1," Password is required "),t.qZA())}function A(n,e){if(1&n&&(t.TgZ(0,"div",58),t.YNc(1,Z,2,0,"p",59),t.qZA()),2&n){t.oxw();const o=t.MAs(19);t.xp6(1),t.Q6J("ngIf",o.errors.required)}}function U(n,e){if(1&n){const o=t.EpF();t.TgZ(0,"div",18)(1,"div",19)(2,"div",35)(3,"h2",21),t._uU(4,"Sign in"),t.qZA(),t.TgZ(5,"div",36),t._uU(6," to "),t.TgZ(7,"h6",37),t._uU(8),t.qZA(),t.TgZ(9,"i",38),t.NdJ("click",function(){t.CHM(o);const a=t.oxw();return t.KtG(a.onEditDomain())}),t.qZA()()(),t.TgZ(10,"form",39)(11,"div",40)(12,"input",41,42),t.NdJ("ngModelChange",function(a){t.CHM(o);const u=t.oxw();return t.KtG(u.username=a)}),t.qZA(),t.TgZ(14,"label",43),t._uU(15,"Username"),t.qZA(),t.YNc(16,c,2,1,"div",44),t.qZA(),t.TgZ(17,"div",45)(18,"input",46,47),t.NdJ("ngModelChange",function(a){t.CHM(o);const u=t.oxw();return t.KtG(u.password=a)}),t.qZA(),t.TgZ(20,"label",48),t._uU(21,"Password"),t.qZA(),t.YNc(22,d,1,4,"i",49),t.YNc(23,A,2,1,"div",44),t.qZA(),t.TgZ(24,"div",50)(25,"a",51),t._uU(26,"Forgot Password?"),t.qZA()(),t.TgZ(27,"div",52)(28,"button",53),t.NdJ("click",function(){t.CHM(o);const a=t.oxw();return t.KtG(a.onLogin())}),t._uU(29," Log in "),t.qZA()(),t.TgZ(30,"div",54),t._UZ(31,"hr"),t.TgZ(32,"span",55),t._uU(33,"or"),t.qZA(),t._UZ(34,"hr"),t.qZA(),t.TgZ(35,"div")(36,"button",56),t.NdJ("click",function(a){t.CHM(o);const u=t.oxw();return t.KtG(u.onLoginByGoogle(a))}),t._UZ(37,"i",57),t._uU(38," Sign In with Google "),t.qZA()()()()()}if(2&n){const o=t.MAs(13),i=t.MAs(19),a=t.oxw();t.xp6(8),t.AsE(" (",a.subdomain,"",a.domain,") "),t.xp6(4),t.Q6J("ngModel",a.username),t.xp6(4),t.Q6J("ngIf",o.invalid&&(o.dirty||o.touched)),t.xp6(2),t.Q6J("type",a.passwordType)("ngModel",a.password),t.xp6(4),t.Q6J("ngIf",""!=a.password&&"edge"!=a.browser),t.xp6(1),t.Q6J("ngIf",i.invalid&&(i.dirty||i.touched)),t.xp6(2),t.Q6J("href","https://"+a.subdomain+a.domain+"/ForgotPassword",t.LSH)}}class C{constructor(e,o,i,a,u){this._router=e,this.elementRef=o,this.toastr=i,this.checkBrowser=a,this.authService=u,this.domain=".dealpos.co.id",this.loginState="FORM_DOMAIN",this.passwordType="password",this.passwordIcon="eye-off"}ngOnInit(){this.initLogin(),this.elementRef.nativeElement.ownerDocument.body.style.backgroundColor="#dfeffc",this.browser=this.checkBrowser.getBrowserName()}ngAfterViewInit(){this.setAutoFocusDomain()}initLogin(){const e=JSON.parse(localStorage.getItem("Authorization"));console.log(e),this.username=e.username,this.subdomain=e.Host.split(".dealpos")[0];const o=e.Host.split(".dealpos")[1];this.domain=".co.id"==o?".dealpos.co.id":".net"==o?".dealpos.net":".dealpos.com",this.authService.isActiveToken()&&this._router.navigate(["menu"])}onNextState(){y.g.IsEmpty(this.subdomain)?this.toastr.warning("Account Domain is required","Warning"):(this.parseSubdomain(),this.loginState="FORM_AUTH")}parseSubdomain(){let e=this.subdomain.indexOf(".dealpos");-1!=e&&(this.subdomain=this.subdomain.substring(0,e))}onEditDomain(){this.loginState="FORM_DOMAIN"}onLogin(){this.authService.login({Host:`${this.subdomain}${this.domain}`,Username:this.username,Password:this.password}).subscribe(o=>{this.onSuccessLogin(o)})}onLoginByGoogle(e){this.authService.loginWithGoogle(e,`${this.subdomain}${this.domain}`).subscribe(i=>{this.onSuccessLogin(i)})}onSuccessLogin(e){this._router.navigate(e.Channel.length<1?["menu/channel"]:["menu"])}setAutoFocusDomain(){this.subdomainEl.nativeElement.focus()}hideShowPassword(){this.passwordType="text"===this.passwordType?"password":"text",this.passwordIcon="eye-off"===this.passwordIcon?"eye":"eye-off"}ngOnDestroy(){this.elementRef.nativeElement.ownerDocument.body.style.backgroundColor="white"}}C.\u0275fac=function(e){return new(e||C)(t.Y36(p.F0),t.Y36(t.SBq),t.Y36(P._W),t.Y36(h),t.Y36(T.e))},C.\u0275cmp=t.Xpm({type:C,selectors:[["app-login"]],viewQuery:function(e,o){if(1&e&&t.Gf(_,5),2&e){let i;t.iGM(i=t.CRH())&&(o.subdomainEl=i.first)}},decls:30,vars:8,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"],["ngSrc","https://res.cloudinary.com/pos/image/upload/v1657855612/Apps/Login/Omnichannel.png","alt","integration-image",1,"img-fluid",3,"width","height"],[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"],[4,"ngIf","ngIfElse"],["USR_PASS",""],[1,"col-12","d-block","d-md-none","text-center"],[1,"pt-8","me-3"],["target","_blank","href","https://www.dealpos.com"],["ngSrc","https://res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png","alt","dealpos-logo",1,"img-fluid",3,"width","height"],["target","_blank","href","https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete",1,"pt-8","font-italic"],[1,"mx-5","pb-5","mb-5","d-none","d-md-block"],[1,"row","justify-content-between","align-items-center"],[1,"col-auto","d-inline-flex"],[1,"col-auto"],[1,"card"],[1,"card-body","p-8"],[1,"card-title"],[1,"fw-normal","font-xl","robotoslab"],[1,"d-flex","align-items-center","mt-6"],[1,"mt-7","w-75","rounded-end-0"],[1,"input-group","mb-3"],["id","basic-addon1",1,"input-group-text","border-end-0","rounded-start"],[1,"fa-solid","fa-cloud"],["type","text","required","","name","subdomain","id","inputHost","placeholder","Store Address",1,"form-control","text-start","subdomain-input","border-start-0",2,"padding-left","0px",3,"ngModel","ngModelChange"],["subdomainEl",""],["name","domainOption",1,"form-select","form-control","border-start-0","mt-4","rounded-end","rounded-start-0","domain-option",3,"ngModel","ngModelChange"],["selected","","value",".dealpos.co.id"],["value",".dealpos.net"],["value",".dealpos.com"],[1,"w-100","mt-10"],["name","next","data-cy","next","type","submit",1,"btn","btn-lg","btn-primary","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"card-title","d-flex","align-items-center"],[1,"pt-2","ms-2"],[1,"fw-bold","me-2","robotoslab","d-inline-block","text-primary"],[1,"fa-solid","fa-edit","link-primary","fs-5","pointer",3,"click"],[1,"mt-10"],[1,"form-label-group"],["autofocus","","type","text","name","Username","id","inputUsername","placeholder","Username","required","",1,"form-control","text-start",3,"ngModel","ngModelChange"],["usernameCtrl","ngModel"],["for","inputUsername",1,"text-start"],["class","text-danger",4,"ngIf"],[1,"form-label-group","mb-5","mb-sm-1"],["name","Password","id","inputPassword","placeholder","Password","required","",1,"form-control","text-start",3,"type","ngModel","ngModelChange"],["passwordCtrl","ngModel"],["for","inputPassword",1,"text-start"],["class","passwordIcon fas fa-lg",3,"ngClass","click",4,"ngIf"],[1,"text-end","mt-3"],[3,"href"],[1,"w-100","mt-8"],["data-cy","login","type","submit",1,"btn","btn-lg","btn-primary","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"divider","d-flex","align-items-center","justify-content-center"],[1,"mx-4","text-muted"],[1,"btn","btn-social-login","text-primary","w-100","fw-bold",3,"click"],[1,"fa-brands","fa-google"],[1,"text-danger"],[4,"ngIf"],[1,"passwordIcon","fas","fa-lg",3,"ngClass","click"]],template:function(e,o){if(1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"h1",3),t._uU(4," DealPOS Omnichannel "),t.qZA(),t._UZ(5,"img",4),t.qZA(),t.TgZ(6,"div",5)(7,"h1",6),t._uU(8," DealPOS Omnichannel "),t.qZA(),t.YNc(9,S,24,2,"ng-container",7),t.YNc(10,U,39,9,"ng-template",null,8,t.W1O),t.qZA(),t.TgZ(12,"div",9)(13,"p",10),t._uU(14,"Powered by :"),t.qZA(),t.TgZ(15,"a",11),t._UZ(16,"img",12),t.qZA(),t._UZ(17,"br"),t.TgZ(18,"a",13),t._uU(19,"Version 2.7.7"),t.qZA()()()(),t.TgZ(20,"footer",14)(21,"div",15)(22,"div",16)(23,"p",10),t._uU(24,"Powered by :"),t.qZA(),t.TgZ(25,"a",11),t._UZ(26,"img",12),t.qZA()(),t.TgZ(27,"div",17)(28,"a",13),t._uU(29,"Version 2.7.7"),t.qZA()()()()),2&e){const i=t.MAs(11);t.xp6(5),t.Q6J("width",500)("height",273),t.xp6(4),t.Q6J("ngIf","FORM_DOMAIN"==o.loginState)("ngIfElse",i),t.xp6(7),t.Q6J("width",130)("height",73),t.xp6(10),t.Q6J("width",130)("height",73)}},dependencies:[f.mk,f.O5,l._Y,l.YN,l.Kr,l.Fj,l.EJ,l.JJ,l.JL,l.Q7,l.On,l.F,f.Zd],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}}footer[_ngcontent-%COMP%]{position:absolute;bottom:0;width:90%;left:3rem}.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}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%]{border:1px solid var(--bs-primary)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.domain-option[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df;width:10rem}.subdomain-input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df}.form-select[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important;box-shadow:none!important}"]});class M{constructor(e,o,i){this.route=e,this.http=o,this.service=i}ngOnInit(){this.route.queryParams.subscribe(e=>{this.shopID=e.shop_id,this.code=e.code})}addShopee(){let e={ShopID:Number(this.shopID),Code:this.code};this.http.post("/api/ChannelAdd/ShopeeV2",e).subscribe(i=>{this.service.navigate(["/menu/channel"])})}}M.\u0275fac=function(e){return new(e||M)(t.Y36(p.gz),t.Y36(v.O),t.Y36(p.F0))},M.\u0275cmp=t.Xpm({type:M,selectors:[["shopee-authorized"]],decls:20,vars:1,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[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","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-t",3,"click"],[1,"fas","fa-undo"]],template:function(e,o){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),t._UZ(5,"i",5),t.TgZ(6,"div",6),t._uU(7,"Success !"),t.qZA()(),t.TgZ(8,"div",7)(9,"div"),t._uU(10,"You have successfully authorized "),t.qZA(),t.TgZ(11,"div"),t._uU(12,"DEALPOS to manage your Shopee"),t.qZA(),t.TgZ(13,"div"),t._uU(14," Your shopID is "),t.TgZ(15,"span",8),t._uU(16),t.qZA()(),t.TgZ(17,"button",9),t.NdJ("click",function(){return o.addShopee()}),t._UZ(18,"i",10),t._uU(19," Add to my Channel"),t.qZA()()()()()()),2&e&&(t.xp6(16),t.Oqu(o.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}}footer[_ngcontent-%COMP%]{position:absolute;bottom:0;width:90%;left:3rem}.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}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%]{border:1px solid var(--bs-primary)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.domain-option[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df;width:10rem}.subdomain-input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df}.form-select[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important;box-shadow:none!important}.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}"]});class w{constructor(e,o,i){this.route=e,this.http=o,this.service=i}ngOnInit(){this.route.queryParams.subscribe(e=>{this.code=e.code,this.state=e.state})}addChannelTiktok(){this.http.post("/api/ChannelAdd/AddTiktok",{Code:this.code}).subscribe(o=>{this.service.navigate(["/menu/channel"])})}}w.\u0275fac=function(e){return new(e||w)(t.Y36(p.gz),t.Y36(v.O),t.Y36(p.F0))},w.\u0275cmp=t.Xpm({type:w,selectors:[["app-tiktok"]],decls:24,vars:2,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[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","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-6",3,"click"],[1,"fas","fa-undo"]],template:function(e,o){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),t._UZ(5,"i",5),t.TgZ(6,"div",6),t._uU(7,"Success !"),t.qZA()(),t.TgZ(8,"div",7)(9,"div"),t._uU(10,"You have successfully authorized "),t.qZA(),t.TgZ(11,"div"),t._uU(12,"DEALPOS to manage your Tiktok"),t.qZA(),t.TgZ(13,"div"),t._uU(14," Your Code is "),t.TgZ(15,"span",8),t._uU(16),t.qZA()(),t.TgZ(17,"div"),t._uU(18," Your State is "),t.TgZ(19,"span",8),t._uU(20),t.qZA()(),t.TgZ(21,"button",9),t.NdJ("click",function(){return o.addChannelTiktok()}),t._UZ(22,"i",10),t._uU(23," Add to my Channel"),t.qZA()()()()()()),2&e&&(t.xp6(16),t.Oqu(o.code),t.xp6(4),t.Oqu(o.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}}footer[_ngcontent-%COMP%]{position:absolute;bottom:0;width:90%;left:3rem}.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}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%]{border:1px solid var(--bs-primary)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.domain-option[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df;width:10rem}.subdomain-input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df}.form-select[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important;box-shadow:none!important}.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}"]});const L=[{path:"",component:C,data:{title:"Dealpos x Marketplace"}},{path:"shopee",component:M,data:{title:"Success"}},{path:"tiktok",component:w,data:{title:"Success"}},{path:"lazada",component:m,data:{title:"Success"}}];class b{}b.\u0275fac=function(e){return new(e||b)},b.\u0275mod=t.oAB({type:b}),b.\u0275inj=t.cJS({imports:[p.Bz.forChild(L),p.Bz]});var I=s(8796);class x{}x.\u0275fac=function(e){return new(e||x)},x.\u0275mod=t.oAB({type:x}),x.\u0275inj=t.cJS({imports:[f.ez,l.u5,b,I.A0]})},501:(k,O,s)=>{s.d(O,{e:()=>_});var f=s(8505),l=s(8996),t=s(4004),p=s(3900),v=s(3942),m=s(4650),y=s(1318),P=s(8002),h=s(7185),T=s(7899);class _{constructor(r,c,g,d){this.httpService=r,this.tokenDecodeService=c,this.toastrService=g,this.afAuth=d}login(r){return this.httpService.post("/api/token/Login",r).pipe((0,f.b)(c=>{this.setLocalStorage(c,r.Host,r.Username),this.validateRole()}))}loginWithGoogle(r,c){r.preventDefault();const g=new v.Z.auth.GoogleAuthProvider;return g.setCustomParameters({prompt:"select_account"}),(0,l.D)(this.afAuth.signInWithPopup(g)).pipe((0,t.U)(d=>d.credential),(0,t.U)(d=>d.idToken),(0,p.w)(d=>this.httpService.post("/api/token/LoginWithSocialProvider",JSON.stringify({IDToken:d,Host:c}))),(0,f.b)(d=>{this.setLocalStorage(d,c,null),this.validateRole()}))}setLocalStorage(r,c,g){localStorage.setItem("user",JSON.stringify(r)),localStorage.setItem("Authorization",JSON.stringify({Host:c,username:g})),localStorage.setItem("Intercom",JSON.stringify(r.IntercomWidget))}validateRole(){let r="This user is lack of these following roles :",c=this.tokenDecodeService.GetRoles(),g=c.includes("Sell"),d=c.includes("SellEditor"),Z=c.includes("DelC"),A=c.includes("PayC");g||(r=`${r} <br/> Sell Create`),d||(r=`${r} <br/> Sell Editor`),Z||(r=`${r} <br/> Delivery Create`),A||(r=`${r} <br/> Payment Create`),(!g||!d||!Z||!A)&&this.toastrService.warning(r,"Warning!",{enableHtml:!0})}logout(){this.clearLocalStorage()}isActiveToken(){let r=JSON.parse(window.localStorage.getItem("user")),c=new Date;return null!=r&&(c<new Date(r.Token.expiredAt)||(this.clearLocalStorage(),!1))}getDomain(){if(!this.domain){const r=localStorage.getItem("Authorization");this.domain="https://"+JSON.parse(r).Host}return this.domain}clearLocalStorage(){localStorage.removeItem("Intercom"),localStorage.removeItem("Authorization"),localStorage.removeItem("user")}}_.\u0275fac=function(r){return new(r||_)(m.LFG(y.O),m.LFG(P.e),m.LFG(h._W),m.LFG(T.zQ))},_.\u0275prov=m.Yz7({token:_,factory:_.\u0275fac,providedIn:"root"})}}]);
1
+ "use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[369],{9369:(k,O,s)=>{s.r(O),s.d(O,{LoginModule:()=>x});var f=s(6895),l=s(4006),t=s(4650),p=s(284),v=s(1318);class m{constructor(e,o,i){this.route=e,this.http=o,this.service=i}ngOnInit(){this.route.queryParams.subscribe(e=>{this.code=e.code})}addChannelLazada(){this.http.post("/api/ChannelAdd/AddLazada",{Code:this.code}).subscribe(o=>{this.service.navigate(["/menu/channel"])})}}m.\u0275fac=function(e){return new(e||m)(t.Y36(p.gz),t.Y36(v.O),t.Y36(p.F0))},m.\u0275cmp=t.Xpm({type:m,selectors:[["app-lazada"]],decls:20,vars:1,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[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","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-6",3,"click"],[1,"fas","fa-undo"]],template:function(e,o){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),t._UZ(5,"i",5),t.TgZ(6,"div",6),t._uU(7,"Success !"),t.qZA()(),t.TgZ(8,"div",7)(9,"div"),t._uU(10,"You have successfully authorized "),t.qZA(),t.TgZ(11,"div"),t._uU(12,"DEALPOS to manage your Lazada"),t.qZA(),t.TgZ(13,"div"),t._uU(14," Your Code is "),t.TgZ(15,"span",8),t._uU(16),t.qZA()(),t.TgZ(17,"button",9),t.NdJ("click",function(){return o.addChannelLazada()}),t._UZ(18,"i",10),t._uU(19," Add to my Channel"),t.qZA()()()()()()),2&e&&(t.xp6(16),t.Oqu(o.code))}});var y=s(1889),P=s(7185);class h{constructor(){}getBrowserName(){const e=window.navigator.userAgent.toLowerCase();switch(!0){case e.indexOf("edge")>-1||e.indexOf("edg")>-1:return"edge";case e.indexOf("opr")>-1:return"opera";case e.indexOf("chrome")>-1:return"chrome";case e.indexOf("trident")>-1:return"ie";case e.indexOf("firefox")>-1:return"firefox";case e.indexOf("safari")>-1:return"safari";default:return"other"}}}h.\u0275fac=function(e){return new(e||h)},h.\u0275prov=t.Yz7({token:h,factory:h.\u0275fac,providedIn:"root"});var T=s(501);const _=["subdomainEl"];function S(n,e){if(1&n){const o=t.EpF();t.ynx(0),t.TgZ(1,"div",18)(2,"div",19)(3,"form")(4,"div",20)(5,"h2",21),t._uU(6,"Sign in"),t.qZA(),t.TgZ(7,"div",22)(8,"div",23)(9,"div",24)(10,"span",25),t._UZ(11,"i",26),t.qZA(),t.TgZ(12,"input",27,28),t.NdJ("ngModelChange",function(a){t.CHM(o);const u=t.oxw();return t.KtG(u.subdomain=a)}),t.qZA()()(),t.TgZ(14,"select",29),t.NdJ("ngModelChange",function(a){t.CHM(o);const u=t.oxw();return t.KtG(u.domain=a)}),t.TgZ(15,"option",30),t._uU(16,".dealpos.co.id"),t.qZA(),t.TgZ(17,"option",31),t._uU(18,".dealpos.net"),t.qZA(),t.TgZ(19,"option",32),t._uU(20,".dealpos.com"),t.qZA()()()(),t.TgZ(21,"div",33)(22,"button",34),t.NdJ("click",function(){t.CHM(o);const a=t.oxw();return t.KtG(a.onNextState())}),t._uU(23," Next "),t.qZA()()()()(),t.BQk()}if(2&n){const o=t.oxw();t.xp6(12),t.Q6J("ngModel",o.subdomain),t.xp6(2),t.Q6J("ngModel",o.domain)}}function r(n,e){1&n&&(t.TgZ(0,"p"),t._uU(1," Username is required "),t.qZA())}function c(n,e){if(1&n&&(t.TgZ(0,"div",58),t.YNc(1,r,2,0,"p",59),t.qZA()),2&n){t.oxw();const o=t.MAs(13);t.xp6(1),t.Q6J("ngIf",o.errors.required)}}const g=function(n,e){return{"fa-eye":n,"fa-eye-slash":e}};function d(n,e){if(1&n){const o=t.EpF();t.TgZ(0,"i",60),t.NdJ("click",function(){t.CHM(o);const a=t.oxw(2);return t.KtG(a.hideShowPassword())}),t.qZA()}if(2&n){const o=t.oxw(2);t.Q6J("ngClass",t.WLB(1,g,"eye-off"==o.passwordIcon,"eye"==o.passwordIcon))}}function Z(n,e){1&n&&(t.TgZ(0,"p"),t._uU(1," Password is required "),t.qZA())}function A(n,e){if(1&n&&(t.TgZ(0,"div",58),t.YNc(1,Z,2,0,"p",59),t.qZA()),2&n){t.oxw();const o=t.MAs(19);t.xp6(1),t.Q6J("ngIf",o.errors.required)}}function U(n,e){if(1&n){const o=t.EpF();t.TgZ(0,"div",18)(1,"div",19)(2,"div",35)(3,"h2",21),t._uU(4,"Sign in"),t.qZA(),t.TgZ(5,"div",36),t._uU(6," to "),t.TgZ(7,"h6",37),t._uU(8),t.qZA(),t.TgZ(9,"i",38),t.NdJ("click",function(){t.CHM(o);const a=t.oxw();return t.KtG(a.onEditDomain())}),t.qZA()()(),t.TgZ(10,"form",39)(11,"div",40)(12,"input",41,42),t.NdJ("ngModelChange",function(a){t.CHM(o);const u=t.oxw();return t.KtG(u.username=a)}),t.qZA(),t.TgZ(14,"label",43),t._uU(15,"Username"),t.qZA(),t.YNc(16,c,2,1,"div",44),t.qZA(),t.TgZ(17,"div",45)(18,"input",46,47),t.NdJ("ngModelChange",function(a){t.CHM(o);const u=t.oxw();return t.KtG(u.password=a)}),t.qZA(),t.TgZ(20,"label",48),t._uU(21,"Password"),t.qZA(),t.YNc(22,d,1,4,"i",49),t.YNc(23,A,2,1,"div",44),t.qZA(),t.TgZ(24,"div",50)(25,"a",51),t._uU(26,"Forgot Password?"),t.qZA()(),t.TgZ(27,"div",52)(28,"button",53),t.NdJ("click",function(){t.CHM(o);const a=t.oxw();return t.KtG(a.onLogin())}),t._uU(29," Log in "),t.qZA()(),t.TgZ(30,"div",54),t._UZ(31,"hr"),t.TgZ(32,"span",55),t._uU(33,"or"),t.qZA(),t._UZ(34,"hr"),t.qZA(),t.TgZ(35,"div")(36,"button",56),t.NdJ("click",function(a){t.CHM(o);const u=t.oxw();return t.KtG(u.onLoginByGoogle(a))}),t._UZ(37,"i",57),t._uU(38," Sign In with Google "),t.qZA()()()()()}if(2&n){const o=t.MAs(13),i=t.MAs(19),a=t.oxw();t.xp6(8),t.AsE(" (",a.subdomain,"",a.domain,") "),t.xp6(4),t.Q6J("ngModel",a.username),t.xp6(4),t.Q6J("ngIf",o.invalid&&(o.dirty||o.touched)),t.xp6(2),t.Q6J("type",a.passwordType)("ngModel",a.password),t.xp6(4),t.Q6J("ngIf",""!=a.password&&"edge"!=a.browser),t.xp6(1),t.Q6J("ngIf",i.invalid&&(i.dirty||i.touched)),t.xp6(2),t.Q6J("href","https://"+a.subdomain+a.domain+"/ForgotPassword",t.LSH)}}class C{constructor(e,o,i,a,u){this._router=e,this.elementRef=o,this.toastr=i,this.checkBrowser=a,this.authService=u,this.domain=".dealpos.co.id",this.loginState="FORM_DOMAIN",this.passwordType="password",this.passwordIcon="eye-off"}ngOnInit(){this.initLogin(),this.elementRef.nativeElement.ownerDocument.body.style.backgroundColor="#dfeffc",this.browser=this.checkBrowser.getBrowserName()}ngAfterViewInit(){this.setAutoFocusDomain()}initLogin(){const e=JSON.parse(localStorage.getItem("Authorization"));console.log(e),this.username=e.username,this.subdomain=e.Host.split(".dealpos")[0];const o=e.Host.split(".dealpos")[1];this.domain=".co.id"==o?".dealpos.co.id":".net"==o?".dealpos.net":".dealpos.com",this.authService.isActiveToken()&&this._router.navigate(["menu"])}onNextState(){y.g.IsEmpty(this.subdomain)?this.toastr.warning("Account Domain is required","Warning"):(this.parseSubdomain(),this.loginState="FORM_AUTH")}parseSubdomain(){let e=this.subdomain.indexOf(".dealpos");-1!=e&&(this.subdomain=this.subdomain.substring(0,e))}onEditDomain(){this.loginState="FORM_DOMAIN"}onLogin(){this.authService.login({Host:`${this.subdomain}${this.domain}`,Username:this.username,Password:this.password}).subscribe(o=>{this.onSuccessLogin(o)})}onLoginByGoogle(e){this.authService.loginWithGoogle(e,`${this.subdomain}${this.domain}`).subscribe(i=>{this.onSuccessLogin(i)})}onSuccessLogin(e){this._router.navigate(e.Channel.length<1?["menu/channel"]:["menu"])}setAutoFocusDomain(){this.subdomainEl.nativeElement.focus()}hideShowPassword(){this.passwordType="text"===this.passwordType?"password":"text",this.passwordIcon="eye-off"===this.passwordIcon?"eye":"eye-off"}ngOnDestroy(){this.elementRef.nativeElement.ownerDocument.body.style.backgroundColor="white"}}C.\u0275fac=function(e){return new(e||C)(t.Y36(p.F0),t.Y36(t.SBq),t.Y36(P._W),t.Y36(h),t.Y36(T.e))},C.\u0275cmp=t.Xpm({type:C,selectors:[["app-login"]],viewQuery:function(e,o){if(1&e&&t.Gf(_,5),2&e){let i;t.iGM(i=t.CRH())&&(o.subdomainEl=i.first)}},decls:30,vars:8,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"],["ngSrc","https://res.cloudinary.com/pos/image/upload/v1657855612/Apps/Login/Omnichannel.png","alt","integration-image",1,"img-fluid",3,"width","height"],[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"],[4,"ngIf","ngIfElse"],["USR_PASS",""],[1,"col-12","d-block","d-md-none","text-center"],[1,"pt-8","me-3"],["target","_blank","href","https://www.dealpos.com"],["ngSrc","https://res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png","alt","dealpos-logo",1,"img-fluid",3,"width","height"],["target","_blank","href","https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete",1,"pt-8","font-italic"],[1,"mx-5","pb-5","mb-5","d-none","d-md-block"],[1,"row","justify-content-between","align-items-center"],[1,"col-auto","d-inline-flex"],[1,"col-auto"],[1,"card"],[1,"card-body","p-8"],[1,"card-title"],[1,"fw-normal","font-xl","robotoslab"],[1,"d-flex","align-items-center","mt-6"],[1,"mt-7","w-75","rounded-end-0"],[1,"input-group","mb-3"],["id","basic-addon1",1,"input-group-text","border-end-0","rounded-start"],[1,"fa-solid","fa-cloud"],["type","text","required","","name","subdomain","id","inputHost","placeholder","Store Address",1,"form-control","text-start","subdomain-input","border-start-0",2,"padding-left","0px",3,"ngModel","ngModelChange"],["subdomainEl",""],["name","domainOption",1,"form-select","form-control","border-start-0","mt-4","rounded-end","rounded-start-0","domain-option",3,"ngModel","ngModelChange"],["selected","","value",".dealpos.co.id"],["value",".dealpos.net"],["value",".dealpos.com"],[1,"w-100","mt-10"],["name","next","data-cy","next","type","submit",1,"btn","btn-lg","btn-primary","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"card-title","d-flex","align-items-center"],[1,"pt-2","ms-2"],[1,"fw-bold","me-2","robotoslab","d-inline-block","text-primary"],[1,"fa-solid","fa-edit","link-primary","fs-5","pointer",3,"click"],[1,"mt-10"],[1,"form-label-group"],["autofocus","","type","text","name","Username","id","inputUsername","placeholder","Username","required","",1,"form-control","text-start",3,"ngModel","ngModelChange"],["usernameCtrl","ngModel"],["for","inputUsername",1,"text-start"],["class","text-danger",4,"ngIf"],[1,"form-label-group","mb-5","mb-sm-1"],["name","Password","id","inputPassword","placeholder","Password","required","",1,"form-control","text-start",3,"type","ngModel","ngModelChange"],["passwordCtrl","ngModel"],["for","inputPassword",1,"text-start"],["class","passwordIcon fas fa-lg",3,"ngClass","click",4,"ngIf"],[1,"text-end","mt-3"],[3,"href"],[1,"w-100","mt-8"],["data-cy","login","type","submit",1,"btn","btn-lg","btn-primary","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"divider","d-flex","align-items-center","justify-content-center"],[1,"mx-4","text-muted"],[1,"btn","btn-social-login","text-primary","w-100","fw-bold",3,"click"],[1,"fa-brands","fa-google"],[1,"text-danger"],[4,"ngIf"],[1,"passwordIcon","fas","fa-lg",3,"ngClass","click"]],template:function(e,o){if(1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"h1",3),t._uU(4," DealPOS Omnichannel "),t.qZA(),t._UZ(5,"img",4),t.qZA(),t.TgZ(6,"div",5)(7,"h1",6),t._uU(8," DealPOS Omnichannel "),t.qZA(),t.YNc(9,S,24,2,"ng-container",7),t.YNc(10,U,39,9,"ng-template",null,8,t.W1O),t.qZA(),t.TgZ(12,"div",9)(13,"p",10),t._uU(14,"Powered by :"),t.qZA(),t.TgZ(15,"a",11),t._UZ(16,"img",12),t.qZA(),t._UZ(17,"br"),t.TgZ(18,"a",13),t._uU(19,"Version 2.7.9"),t.qZA()()()(),t.TgZ(20,"footer",14)(21,"div",15)(22,"div",16)(23,"p",10),t._uU(24,"Powered by :"),t.qZA(),t.TgZ(25,"a",11),t._UZ(26,"img",12),t.qZA()(),t.TgZ(27,"div",17)(28,"a",13),t._uU(29,"Version 2.7.9"),t.qZA()()()()),2&e){const i=t.MAs(11);t.xp6(5),t.Q6J("width",500)("height",273),t.xp6(4),t.Q6J("ngIf","FORM_DOMAIN"==o.loginState)("ngIfElse",i),t.xp6(7),t.Q6J("width",130)("height",73),t.xp6(10),t.Q6J("width",130)("height",73)}},dependencies:[f.mk,f.O5,l._Y,l.YN,l.Kr,l.Fj,l.EJ,l.JJ,l.JL,l.Q7,l.On,l.F,f.Zd],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}}footer[_ngcontent-%COMP%]{position:absolute;bottom:0;width:90%;left:3rem}.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}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%]{border:1px solid var(--bs-primary)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.domain-option[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df;width:10rem}.subdomain-input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df}.form-select[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important;box-shadow:none!important}"]});class M{constructor(e,o,i){this.route=e,this.http=o,this.service=i}ngOnInit(){this.route.queryParams.subscribe(e=>{this.shopID=e.shop_id,this.code=e.code})}addShopee(){let e={ShopID:Number(this.shopID),Code:this.code};this.http.post("/api/ChannelAdd/ShopeeV2",e).subscribe(i=>{this.service.navigate(["/menu/channel"])})}}M.\u0275fac=function(e){return new(e||M)(t.Y36(p.gz),t.Y36(v.O),t.Y36(p.F0))},M.\u0275cmp=t.Xpm({type:M,selectors:[["shopee-authorized"]],decls:20,vars:1,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[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","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-t",3,"click"],[1,"fas","fa-undo"]],template:function(e,o){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),t._UZ(5,"i",5),t.TgZ(6,"div",6),t._uU(7,"Success !"),t.qZA()(),t.TgZ(8,"div",7)(9,"div"),t._uU(10,"You have successfully authorized "),t.qZA(),t.TgZ(11,"div"),t._uU(12,"DEALPOS to manage your Shopee"),t.qZA(),t.TgZ(13,"div"),t._uU(14," Your shopID is "),t.TgZ(15,"span",8),t._uU(16),t.qZA()(),t.TgZ(17,"button",9),t.NdJ("click",function(){return o.addShopee()}),t._UZ(18,"i",10),t._uU(19," Add to my Channel"),t.qZA()()()()()()),2&e&&(t.xp6(16),t.Oqu(o.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}}footer[_ngcontent-%COMP%]{position:absolute;bottom:0;width:90%;left:3rem}.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}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%]{border:1px solid var(--bs-primary)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.domain-option[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df;width:10rem}.subdomain-input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df}.form-select[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important;box-shadow:none!important}.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}"]});class w{constructor(e,o,i){this.route=e,this.http=o,this.service=i}ngOnInit(){this.route.queryParams.subscribe(e=>{this.code=e.code,this.state=e.state})}addChannelTiktok(){this.http.post("/api/ChannelAdd/AddTiktok",{Code:this.code}).subscribe(o=>{this.service.navigate(["/menu/channel"])})}}w.\u0275fac=function(e){return new(e||w)(t.Y36(p.gz),t.Y36(v.O),t.Y36(p.F0))},w.\u0275cmp=t.Xpm({type:w,selectors:[["app-tiktok"]],decls:24,vars:2,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[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","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-6",3,"click"],[1,"fas","fa-undo"]],template:function(e,o){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),t._UZ(5,"i",5),t.TgZ(6,"div",6),t._uU(7,"Success !"),t.qZA()(),t.TgZ(8,"div",7)(9,"div"),t._uU(10,"You have successfully authorized "),t.qZA(),t.TgZ(11,"div"),t._uU(12,"DEALPOS to manage your Tiktok"),t.qZA(),t.TgZ(13,"div"),t._uU(14," Your Code is "),t.TgZ(15,"span",8),t._uU(16),t.qZA()(),t.TgZ(17,"div"),t._uU(18," Your State is "),t.TgZ(19,"span",8),t._uU(20),t.qZA()(),t.TgZ(21,"button",9),t.NdJ("click",function(){return o.addChannelTiktok()}),t._UZ(22,"i",10),t._uU(23," Add to my Channel"),t.qZA()()()()()()),2&e&&(t.xp6(16),t.Oqu(o.code),t.xp6(4),t.Oqu(o.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}}footer[_ngcontent-%COMP%]{position:absolute;bottom:0;width:90%;left:3rem}.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}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%]{border:1px solid var(--bs-primary)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.domain-option[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df;width:10rem}.subdomain-input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df}.form-select[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important;box-shadow:none!important}.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}"]});const L=[{path:"",component:C,data:{title:"Dealpos x Marketplace"}},{path:"shopee",component:M,data:{title:"Success"}},{path:"tiktok",component:w,data:{title:"Success"}},{path:"lazada",component:m,data:{title:"Success"}}];class b{}b.\u0275fac=function(e){return new(e||b)},b.\u0275mod=t.oAB({type:b}),b.\u0275inj=t.cJS({imports:[p.Bz.forChild(L),p.Bz]});var I=s(8796);class x{}x.\u0275fac=function(e){return new(e||x)},x.\u0275mod=t.oAB({type:x}),x.\u0275inj=t.cJS({imports:[f.ez,l.u5,b,I.A0]})},501:(k,O,s)=>{s.d(O,{e:()=>_});var f=s(8505),l=s(8996),t=s(4004),p=s(3900),v=s(3942),m=s(4650),y=s(1318),P=s(8002),h=s(7185),T=s(7899);class _{constructor(r,c,g,d){this.httpService=r,this.tokenDecodeService=c,this.toastrService=g,this.afAuth=d}login(r){return this.httpService.post("/api/token/Login",r).pipe((0,f.b)(c=>{this.setLocalStorage(c,r.Host,r.Username),this.validateRole()}))}loginWithGoogle(r,c){r.preventDefault();const g=new v.Z.auth.GoogleAuthProvider;return g.setCustomParameters({prompt:"select_account"}),(0,l.D)(this.afAuth.signInWithPopup(g)).pipe((0,t.U)(d=>d.credential),(0,t.U)(d=>d.idToken),(0,p.w)(d=>this.httpService.post("/api/token/LoginWithSocialProvider",JSON.stringify({IDToken:d,Host:c}))),(0,f.b)(d=>{this.setLocalStorage(d,c,null),this.validateRole()}))}setLocalStorage(r,c,g){localStorage.setItem("user",JSON.stringify(r)),localStorage.setItem("Authorization",JSON.stringify({Host:c,username:g})),localStorage.setItem("Intercom",JSON.stringify(r.IntercomWidget))}validateRole(){let r="This user is lack of these following roles :",c=this.tokenDecodeService.GetRoles(),g=c.includes("Sell"),d=c.includes("SellEditor"),Z=c.includes("DelC"),A=c.includes("PayC");g||(r=`${r} <br/> Sell Create`),d||(r=`${r} <br/> Sell Editor`),Z||(r=`${r} <br/> Delivery Create`),A||(r=`${r} <br/> Payment Create`),(!g||!d||!Z||!A)&&this.toastrService.warning(r,"Warning!",{enableHtml:!0})}logout(){this.clearLocalStorage()}isActiveToken(){let r=JSON.parse(window.localStorage.getItem("user")),c=new Date;return null!=r&&(c<new Date(r.Token.expiredAt)||(this.clearLocalStorage(),!1))}getDomain(){if(!this.domain){const r=localStorage.getItem("Authorization");this.domain="https://"+JSON.parse(r).Host}return this.domain}clearLocalStorage(){localStorage.removeItem("Intercom"),localStorage.removeItem("Authorization"),localStorage.removeItem("user")}}_.\u0275fac=function(r){return new(r||_)(m.LFG(y.O),m.LFG(P.e),m.LFG(h._W),m.LFG(T.zQ))},_.\u0275prov=m.Yz7({token:_,factory:_.\u0275fac,providedIn:"root"})}}]);