marketplacepos 2.7.3 → 2.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Marketplace/174.df8669b6311f928d.js +1 -0
- package/Marketplace/25.b70d86f301c02577.js +1 -0
- package/Marketplace/360.d6aa15ddc2dfdd69.js +1 -0
- package/Marketplace/369.ca96e7763e20bf72.js +1 -0
- package/Marketplace/392.f4537160149f627a.js +1 -0
- package/Marketplace/397.defbf293e15c7185.js +1 -0
- package/Marketplace/3rdpartylicenses.txt +0 -50
- package/Marketplace/512.2796526d3f4c83f5.js +1 -0
- package/Marketplace/516.23780ce40d15b408.js +1 -0
- package/Marketplace/587.2e5583c1fa20a173.js +1 -0
- package/Marketplace/61.868e35095821a091.js +1 -0
- package/Marketplace/616.b7e1ec6933570169.js +1 -0
- package/Marketplace/628.145c54d491d3a429.js +1 -0
- package/Marketplace/643.3295801f0b4936a8.js +1 -0
- package/Marketplace/717.26634e93ca9b60ed.js +1 -0
- package/Marketplace/72.b0c5b137e38d6dbc.js +1 -0
- package/Marketplace/833.b0b60f1bcc7f56c1.js +1 -0
- package/Marketplace/859.b43bda3adda95fa3.js +1 -0
- package/Marketplace/863.490933ee2cce9279.js +1 -0
- package/Marketplace/874.8531eff61a70fef4.js +1 -0
- package/Marketplace/913.08c7bf72f6b8e4f8.js +1 -0
- package/Marketplace/997.6b3f954f35ff3ac0.js +1 -0
- package/Marketplace/index.html +2 -2
- package/Marketplace/main.26e031734fa543d6.js +1 -0
- package/Marketplace/runtime.1fd3a054bc12a0de.js +1 -0
- package/Marketplace/{styles.ca007450064f7ae0.css → styles.bd36b2077413d718.css} +1 -1
- package/package.json +1 -1
- package/Marketplace/174.ef0e2b8b4c9d2b0b.js +0 -1
- package/Marketplace/25.43ab1ee524b9049a.js +0 -1
- package/Marketplace/291.779ede87479fb9b2.js +0 -1
- package/Marketplace/360.45dba871a275bde4.js +0 -1
- package/Marketplace/369.fe9dd78b5ae1f834.js +0 -1
- package/Marketplace/397.5668d07ae2910130.js +0 -1
- package/Marketplace/512.8bb0df7db698606b.js +0 -1
- package/Marketplace/516.6cbc60a45960d8fd.js +0 -1
- package/Marketplace/587.b913510ac1ecfe12.js +0 -1
- package/Marketplace/61.b5326b8a8507ca2b.js +0 -1
- package/Marketplace/616.ce2eff13bf85dd2a.js +0 -1
- package/Marketplace/628.161d18d5f92f87c9.js +0 -1
- package/Marketplace/643.cee753340fd82dfa.js +0 -1
- package/Marketplace/717.b70435564cbfa38c.js +0 -1
- package/Marketplace/72.23a9b1a59cf7bfca.js +0 -1
- package/Marketplace/796.f712080a257b33c0.js +0 -1
- package/Marketplace/863.73daa64a1cf098b8.js +0 -1
- package/Marketplace/874.23cc68e9ff331b03.js +0 -1
- package/Marketplace/913.c2ffbc12dd99b85d.js +0 -1
- package/Marketplace/997.c2b107d851cf971c.js +0 -1
- package/Marketplace/main.f4b54c0122a625bf.js +0 -1
- package/Marketplace/runtime.aa1e68d995bcf102.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[174],{6174:(Q,O,a)=>{a.r(O),a.d(O,{OrderModule:()=>c});var s=a(6895),t=a(4650),D=a(7398),v=a(284);const P=function(){return["/menu/report/product-statistic/channel"]};class m{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"}]}}m.\u0275fac=function(r){return new(r||m)},m.\u0275cmp=t.Xpm({type:m,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(r,e){1&r&&(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&r&&(t.xp6(3),t.Q6J("Tabs",e.reportTabs),t.xp6(11),t.Q6J("routerLink",t.DdM(2,P)))},dependencies:[D.e,v.lC,v.rH],styles:[".dropdown[_ngcontent-%COMP%] .dropdown-menu.report.show[_ngcontent-%COMP%]{top:100%!important;transform:none!important;z-index:10000;cursor:pointer;right:-50%}"]});var p=a(3154);class S{}var Z=a(1318);class d{constructor(r){this.http=r}GetLoader(){return new Promise((r,e)=>{this.http.post("/api/Report/GetLoader",{}).subscribe(i=>{r(i)})})}GetSyncOrder(r){return new Promise((e,i)=>{this.http.post("/api/Report/Salesorder",JSON.stringify(r)).subscribe(n=>{e(n)})})}GetSyncInvoice(r){return new Promise((e,i)=>{this.http.post("/api/Report/Invoice",JSON.stringify(r)).subscribe(n=>{e(n)})})}GetSyncDelivery(r){return new Promise((e,i)=>{this.http.post("/api/Report/Delivery",JSON.stringify(r)).subscribe(n=>{e(n)})})}GetSyncPayment(r){return new Promise((e,i)=>{this.http.post("/api/Report/Payment",JSON.stringify(r)).subscribe(n=>{e(n)})})}}d.\u0275fac=function(r){return new(r||d)(t.LFG(Z.O))},d.\u0275prov=t.Yz7({token:d,factory:d.\u0275fac,providedIn:"root"});var f=a(7481),u=a(5171),l=(()=>{return(o=l||(l={}))[o.OK=200]="OK",o[o.BAD_REQUEST=400]="BAD_REQUEST",o[o.CONFLICT=409]="CONFLICT",o[o.NOT_FOUND=404]="NOT_FOUND",o[o.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",l;var o})();function F(o,r){if(1&o&&(t.TgZ(0,"th",9)(1,"div",10)(2,"h4"),t._uU(3),t.qZA(),t.TgZ(4,"small",11),t._uU(5),t.qZA()()()),2&o){const e=r.$implicit,i=t.oxw();t.xp6(3),t.Oqu(e),t.xp6(1),t.Tol(i.getTextBgColor(e)),t.xp6(1),t.Oqu(i.getHeaderStatusDesc(e))}}const x=function(){return["/menu/log/order"]},w=function(o,r,e,i,n){return{responseCode:o,From:r,to:e,actionType:i,ChannelID:n}};function b(o,r){if(1&o&&(t.TgZ(0,"td",14)(1,"a",15),t._uU(2),t.qZA()()),2&o){const e=r.$implicit,i=t.oxw().$implicit,n=t.oxw();t.xp6(1),t.Q6J("routerLink",t.DdM(3,x))("queryParams",t.qbA(4,w,e.Key,n.from,n.to,n.type,i.ChannelID)),t.xp6(1),t.hij(" ",e.Value," ")}}function R(o,r){if(1&o&&(t.TgZ(0,"tr")(1,"td")(2,"a",12),t._UZ(3,"img",13),t.qZA()(),t.TgZ(4,"td")(5,"div")(6,"a",12),t._uU(7),t.qZA()(),t.TgZ(8,"div"),t._uU(9),t.qZA()(),t.YNc(10,b,3,10,"td",8),t.qZA()),2&o){const e=r.$implicit,i=t.oxw();t.xp6(2),t.s9C("href",e.Url,t.LSH),t.xp6(1),t.Q6J("src",i.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)}}function N(o,r){if(1&o&&(t.TgZ(0,"td",14)(1,"div",16),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&o){const e=r.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,1,e.total))}}class h{constructor(){this.headerStatus=l,this.listCalculationStatusCode=[]}ngOnChanges(r){r.result&&this.calculateStatusCode()}getHeaderStatusDesc(r){let e=null;switch(r){case l.BAD_REQUEST:e="BAD REQUEST";break;case l.CONFLICT:e="CONFLICT";break;case l.INTERNAL_SERVER_ERROR:e="INTERNAL SERVER ERROR";break;case l.NOT_FOUND:e="NOT FOUND";break;default:e="OK"}return e}getTextBgColor(r){let e=null;switch(r){case l.OK:e="bg-success";break;case l.INTERNAL_SERVER_ERROR:e="bg-danger";break;default:e="bg-warning"}return e}getChannelLogo(r){return p.g.getChannelLogoByTypeId(r)}calculateStatusCode(){if(this.listCalculationStatusCode=[],this.result){let r,e;this.concatStatusCode().forEach(i=>{r=this.listCalculationStatusCode.findIndex(n=>n.status==i.Key),e=-1!==r,e?this.listCalculationStatusCode[r].total+=i.Value:this.listCalculationStatusCode=[...this.listCalculationStatusCode,{status:i.Key,total:i.Value}]})}}concatStatusCode(){return this.result.map(r=>r.list).reduce((r,e)=>[...r,...e])}}function A(o,r){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)}}h.\u0275fac=function(r){return new(r||h)},h.\u0275cmp=t.Xpm({type:h,selectors:[["app-table-report"]],inputs:{header:"header",result:"result",from:"from",to:"to",type:"type"},features:[t.TTD],decls:15,vars:3,consts:[[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","0%"],[2,"width","5%"],["class","text-start","style","width: 10%;",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],["colspan","2"],[1,"text-center","h3","fw-bold"],["class","text-start",4,"ngFor","ngForOf"],[1,"text-start",2,"width","10%"],[1,"d-block"],[1,"text-white","p-1","rounded","response-desc"],["target","_blank",3,"href"],[2,"width","24px","height","24px",3,"src"],[1,"text-start"],[1,"h3","text-primary","fw-bold","ms-1",3,"routerLink","queryParams"],[1,"d-inline-block","h3","text-primary","fw-bold","ms-1"]],template:function(r,e){1&r&&(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,F,6,4,"th",4),t.qZA()(),t.TgZ(7,"tbody"),t.YNc(8,R,11,6,"tr",5),t.qZA(),t.TgZ(9,"tfoot")(10,"tr")(11,"td",6)(12,"div",7),t._uU(13,"Total"),t.qZA()(),t.YNc(14,N,4,3,"td",8),t.qZA()()()),2&r&&(t.xp6(6),t.Q6J("ngForOf",e.header),t.xp6(2),t.Q6J("ngForOf",e.result),t.xp6(6),t.Q6J("ngForOf",e.listCalculationStatusCode))},dependencies:[s.sg,v.rH,s.JJ],styles:[".response-desc[_ngcontent-%COMP%]{font-size:12px}"]});class g{constructor(r,e){this.http=r,this.datePipe=e,this.filter=new S,this.pageTitle="New Order";let i=new Date;this.maxDate=i,this.minDate=p.g.addDays(i,6),this.filter.From=i,this.filter.To=i,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){const r=p.g.formatTitleForFromDate(this.filter.From,this.filter.To),e=this.datePipe.transform(this.filter.From,r),i=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.pageTitle=`New Order (${e} - ${i})`}initPageLoader(){this.http.GetLoader().then(r=>{this.filter=r,this.from=this.filter.From.toString(),this.to=this.filter.To.toString(),this.http.GetSyncOrder(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})})}getChannelLogs(r){this.filter.From=r.from,this.filter.To=r.to,this.updatePageTitle(),this.http.GetSyncOrder(this.filter).then(e=>{this.header=e.Header,this.result=e.Body,this.from=this.filter.From.toJSON(),this.to=this.filter.To.toJSON()})}}g.\u0275fac=function(r){return new(r||g)(t.Y36(d),t.Y36(s.uU))},g.\u0275cmp=t.Xpm({type:g,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(r,e){1&r&&(t.TgZ(0,"mainpanel",0)(1,"actions")(2,"div",1)(3,"app-datepicker-range",2),t.NdJ("dateChange",function(n){return e.getChannelLogs(n)}),t.qZA()()(),t.TgZ(4,"content")(5,"div",3),t.YNc(6,A,3,5,"div",4),t.qZA()()()),2&r&&(t.Q6J("headerTitle",e.pageTitle)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(3),t.Q6J("minDate",e.minDate)("from",e.filter.From)("to",e.filter.To),t.xp6(3),t.Q6J("ngIf",e.result))},dependencies:[s.O5,f.p,u.P,h],styles:[".filterDate[_ngcontent-%COMP%]{position:absolute;right:10px;top:6px}"]});var _=a(8063);function J(o,r){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)}}class T{constructor(r,e){this.http=r,this.datePipe=e,this.filter=new S,this.PageTitle="Ready to Ship";let i=new Date;this.maxDate=i,this.minDate=p.g.addDays(i,6),this.filter.From=i,this.filter.To=i,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){const r=p.g.formatTitleForFromDate(this.filter.From,this.filter.To),e=this.datePipe.transform(this.filter.From,r),i=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Ready to Ship (${e} - ${i})`}initPageLoader(){this.http.GetLoader().then(r=>{this.filter=r,this.from=this.filter.From.toString(),this.to=this.filter.To.toString(),this.http.GetSyncInvoice(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})})}getChannelLogs(r){this.filter.From=r.from,this.filter.To=r.to,this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(e=>{this.header=e.Header,this.result=e.Body,this.from=this.filter.From.toJSON(),this.to=this.filter.To.toJSON()})}}function L(o,r){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)}}T.\u0275fac=function(r){return new(r||T)(t.Y36(d),t.Y36(s.uU))},T.\u0275cmp=t.Xpm({type:T,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(r,e){1&r&&(t.TgZ(0,"mainpanel",0)(1,"actions")(2,"div",1)(3,"app-datepicker-range",2),t.NdJ("dateChange",function(n){return e.getChannelLogs(n)}),t.qZA()()(),t.TgZ(4,"content")(5,"div",3),t.YNc(6,J,3,5,"div",4),t.qZA()()()),2&r&&(t.Q6J("headerTitle",e.PageTitle)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(3),t.Q6J("minDate",e.minDate)("from",e.filter.From)("to",e.filter.To),t.xp6(3),t.Q6J("ngIf",e.result))},dependencies:[s.O5,f.p,u.P,h],styles:[".filterDate[_ngcontent-%COMP%]{position:absolute;right:10px;top:6px}"]});class y{constructor(r,e){this.http=r,this.datePipe=e,this.filter=new S;let i=new Date;this.maxDate=i,this.minDate=p.g.addDays(i,6),this.filter.From=i,this.filter.To=i,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){const r=p.g.formatTitleForFromDate(this.filter.From,this.filter.To),e=this.datePipe.transform(this.filter.From,r),i=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Shipped (${e} - ${i})`}initPageLoader(){this.http.GetLoader().then(r=>{this.filter=r,this.from=this.filter.From.toString(),this.to=this.filter.To.toString(),this.http.GetSyncDelivery(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})})}getChannelLogs(r){this.filter.From=r.from,this.filter.To=r.to,this.updatePageTitle(),this.http.GetSyncDelivery(this.filter).then(e=>{this.header=e.Header,this.result=e.Body,this.from=this.filter.From.toJSON(),this.to=this.filter.To.toJSON()})}}function U(o,r){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)}}y.\u0275fac=function(r){return new(r||y)(t.Y36(d),t.Y36(s.uU))},y.\u0275cmp=t.Xpm({type:y,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(r,e){1&r&&(t.TgZ(0,"mainpanel",0)(1,"actions")(2,"div",1)(3,"app-datepicker-range",2),t.NdJ("dateChange",function(n){return e.getChannelLogs(n)}),t.qZA()()(),t.TgZ(4,"content")(5,"div",3),t.YNc(6,L,3,5,"div",4),t.qZA()()()),2&r&&(t.Q6J("headerTitle",e.PageTitle)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(3),t.Q6J("minDate",e.minDate)("from",e.filter.From)("to",e.filter.To),t.xp6(3),t.Q6J("ngIf",e.result))},dependencies:[s.O5,f.p,u.P,h],styles:[".filterDate[_ngcontent-%COMP%]{position:absolute;right:10px;top:6px}"]});class C{constructor(r,e){this.http=r,this.datePipe=e,this.filter=new S,this.PageTitle="Completed";let i=new Date;this.minDate=p.g.addDays(i,6),this.filter.From=i,this.filter.To=i,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){const r=p.g.formatTitleForFromDate(this.filter.From,this.filter.To),e=this.datePipe.transform(this.filter.From,r),i=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Completed (${e} - ${i})`}initPageLoader(){this.http.GetLoader().then(r=>{this.filter=r,this.from=this.filter.From.toString(),this.to=this.filter.To.toString(),this.http.GetSyncPayment(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})})}getChannelLogs(r){this.filter.From=r.from,this.filter.To=r.to,this.updatePageTitle(),this.http.GetSyncPayment(this.filter).then(e=>{this.header=e.Header,this.result=e.Body,this.from=this.filter.From.toJSON(),this.to=this.filter.To.toJSON()})}}C.\u0275fac=function(r){return new(r||C)(t.Y36(d),t.Y36(s.uU))},C.\u0275cmp=t.Xpm({type:C,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(r,e){1&r&&(t.TgZ(0,"mainpanel",0)(1,"actions")(2,"div",1)(3,"app-datepicker-range",2),t.NdJ("dateChange",function(n){return e.getChannelLogs(n)}),t.qZA()()(),t.TgZ(4,"content")(5,"div",3),t.YNc(6,U,3,5,"div",4),t.qZA()()()),2&r&&(t.Q6J("headerTitle",e.PageTitle)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(3),t.Q6J("minDate",e.minDate)("from",e.filter.From)("to",e.filter.To),t.xp6(3),t.Q6J("ngIf",e.result))},dependencies:[s.O5,f.p,u.P,h],styles:[".filterDate[_ngcontent-%COMP%]{position:absolute;right:10px;top:6px}"]});var I=a(4006);const E=[{path:"",component:m,children:[{path:"",redirectTo:"sync-order",pathMatch:"full"},{path:"sync-order",component:g,canActivate:[_.a],data:{title:"Sync Order"}},{path:"invoice",component:T,canActivate:[_.a],data:{title:"Sync Invoice"}},{path:"delivery",component:y,canActivate:[_.a],data:{title:"Sync Delivery"}},{path:"payment",component:C,canActivate:[_.a],data:{title:"Sync Payment"}}]}];class c{}c.\u0275fac=function(r){return new(r||c)},c.\u0275mod=t.oAB({type:c}),c.\u0275inj=t.cJS({imports:[s.ez,D.Z,I.u5,f.R,u.P,v.Bz.forChild(E)]})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[25],{6025:(k,g,r)=>{r.r(g),r.d(g,{ProductStatisticModule:()=>s});var a=r(6895),t=r(4650),p=r(284),f=r(7398);const y=function(){return["/menu/report/order/sync-order"]},T=function(){return["/menu/report/order/invoice"]},_=function(){return["/menu/report/order/delivery"]},P=function(){return["/menu/report/order/payment"]};class l{constructor(){this.tabsMenu=[{Title:"Products",Url:"/menu/report/product-statistic/channel"}]}}l.\u0275fac=function(e){return new(e||l)},l.\u0275cmp=t.Xpm({type:l,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(e,n){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,"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&e&&(t.xp6(3),t.Q6J("Tabs",n.tabsMenu),t.xp6(11),t.Q6J("routerLink",t.DdM(5,y)),t.xp6(4),t.Q6J("routerLink",t.DdM(6,T)),t.xp6(4),t.Q6J("routerLink",t.DdM(7,_)),t.xp6(4),t.Q6J("routerLink",t.DdM(8,P)))},dependencies:[p.lC,p.rH,f.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%}"]});var A=r(7579),h=r(2722),C=r(9300),b=r(8231),Z=r(3154),U=r(6082),w=r(7185),O=r(5412),S=r(7481),v=r(266);function L(o,e){if(1&o&&(t.ynx(0),t._uU(1),t.BQk()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.hij(" ",n.Count," ")}}function M(o,e){if(1&o){const n=t.EpF();t.TgZ(0,"span",25),t.NdJ("click",function(){t.CHM(n);const c=t.oxw().$implicit,u=t.oxw();return t.KtG(u.getLiveProductCount(c.ID,c))}),t._UZ(1,"i",26),t.qZA()}}const I=function(){return["/menu/products/status/sold-in-channel"]},x=function(o){return{ID:o}},D=function(){return["/menu/products/status/not-in-pos"]};function J(o,e){if(1&o){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,L,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 u=t.CHM(n).$implicit,m=t.oxw();return t.KtG(m.onScanChannel(u))}),t._UZ(23,"i",22),t._uU(24," Scan "),t.qZA(),t.TgZ(25,"button",23),t.NdJ("click",function(){const u=t.CHM(n).$implicit,m=t.oxw();return t.KtG(m.onClearCache(u.ID))}),t._UZ(26,"i",24),t._uU(27," Clear "),t.qZA()()()()}if(2&o){const n=e.$implicit,i=t.MAs(8),c=t.oxw();t.xp6(2),t.Q6J("src",c.getChannelLogo(n.TypeID),t.LSH),t.xp6(2),t.Oqu(n.Name),t.xp6(2),t.Q6J("ngIf",void 0!==n.Count)("ngIfElse",i),t.xp6(4),t.Q6J("routerLink",t.DdM(18,I))("queryParams",t.VKq(19,x,n.ID)),t.xp6(1),t.hij(" ",t.lcZ(12,11,n.SoldInChannel)," "),t.xp6(3),t.Q6J("routerLink",t.DdM(21,D))("queryParams",t.VKq(22,x,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"):"-")}}class d{constructor(e,n,i){this.productService=e,this.toastr=n,this.dialog=i,this.destroy$=new A.x}ngOnInit(){this.setObsProductStatistic(),this.initPageLoader()}initPageLoader(){this.productService.loader().pipe((0,h.R)(this.destroy$)).subscribe(e=>{this.channelOptions=e?.Options?.Channel})}setObsProductStatistic(){this.channels$=this.productService.getProductStatistic()}getLiveProductCount(e,n){this.productService.getTotalProductLive(e).pipe((0,h.R)(this.destroy$)).subscribe(i=>{n.Count=i.Count})}onScanChannel(e){this.dialog.open(b.j,{width:"700px",data:{channelOptions:this.channelOptions,filter:{ChannelID:e.ID},disabledChannelOption:!0}}).afterClosed().pipe((0,C.h)(n=>Z.g.IsNotEmpty(n))).subscribe(n=>{this.scanAllProduct(e.ID,n)})}scanAllProduct(e,n){let i=this.productService.findChannelById(e,this.channelOptions);this.productService.scanAll(n.ChannelID,n.ScanFull,n.UpdatedProduct,n.Async).pipe((0,C.h)(c=>c)).subscribe(c=>{n.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(c,i,!n.UpdatedProduct),this.initPageLoader(),this.setObsProductStatistic())})}onClearCache(e){confirm("Are you sure you want to Clear Cache? This Process will remove your product integration to marketplace")&&this.productService.clearCacheChannel(e).pipe((0,h.R)(this.destroy$)).subscribe(i=>{this.toastr.success("Successfully cleared cache","Success"),this.initPageLoader(),this.setObsProductStatistic()})}getChannelLogo(e){return Z.g.getChannelLogoByTypeId(e)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}}d.\u0275fac=function(e){return new(e||d)(t.Y36(U.M),t.Y36(w._W),t.Y36(O.uw))},d.\u0275cmp=t.Xpm({type:d,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(e,n){if(1&e&&(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,J,28,24,"tr",13),t.ALo(22,"async"),t.qZA()()()()()()()()),2&e){let i;t.Q6J("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(21),t.Q6J("ngForOf",null==(i=t.lcZ(22,3,n.channels$))?null:i.Data)}},dependencies:[a.sg,a.O5,p.rH,S.p,v.gM,a.Ov,a.JJ,a.uU]});const q=[{path:"",component:l,children:[{component:d,path:"channel",pathMatch:"full",data:{title:"Products Statistic"}}]}];class s{}s.\u0275fac=function(e){return new(e||s)},s.\u0275mod=t.oAB({type:s}),s.\u0275inj=t.cJS({imports:[a.ez,p.Bz.forChild(q),f.Z,S.R,v.AV]})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[360],{4360:(E,f,e)=>{e.r(f),e.d(f,{ReportModule:()=>r});var u=e(6895),t=e(7398),d=e(4650),g=e(284);class p{constructor(){}}p.\u0275fac=function(a){return new(a||p)},p.\u0275cmp=d.Xpm({type:p,selectors:[["app-report"]],decls:1,vars:0,template:function(a,o){1&a&&d._UZ(0,"router-outlet")},dependencies:[g.lC],styles:["ul[_ngcontent-%COMP%] > li.dropdown-item[_ngcontent-%COMP%]{font-size:.6875rem!important}"]});var m=e(8063);const i=[{path:"",component:p,children:[{path:"",redirectTo:"order",pathMatch:"full"},{path:"order",loadChildren:()=>e.e(174).then(e.bind(e,6174)).then(n=>n.OrderModule),canActivate:[m.a]},{path:"product-statistic",loadChildren:()=>Promise.all([e.e(516),e.e(25)]).then(e.bind(e,6025)).then(n=>n.ProductStatisticModule),canActivate:[m.a]}]}];class l{}l.\u0275fac=function(a){return new(a||l)},l.\u0275mod=d.oAB({type:l}),l.\u0275inj=d.cJS({imports:[u.ez,g.Bz.forChild(i)]});var C=e(4006),D=e(7481),M=e(5171);class r{}r.\u0275fac=function(a){return new(a||r)},r.\u0275mod=d.oAB({type:r}),r.\u0275inj=d.cJS({imports:[u.ez,t.Z,l,C.u5,D.R,g.Bz,M.P]})},5171:(E,f,e)=>{e.d(f,{P:()=>r});var u=e(6895),t=e(4650),d=e(4006),g=e(8277),p=e(9101),m=e(3238),i=e(9602),l=e(9549),C=e(4144);function D(n,a){if(1&n){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 h=t.oxw();return t.KtG(h.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(a){let o=a?.toDate();this.from=o}toDateChange(a){if(a){let o=a.toDate();this.to=o,this.showButtonConfirm||this.emitDateChange()}}emitDateChange(){this.dateChange.emit({from:this.from,to:this.to})}onSelectDate(){this.emitDateChange()}}r.\u0275fac=function(a){return new(a||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:g.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"],["picker",""],[4,"ngIf"],["mat-button","","matDateRangePickerCancel",""],["mat-raised-button","","color","primary","matDateRangePickerApply","",3,"click"]],template:function(a,o){if(1&a){const c=t.EpF();t.TgZ(0,"mat-form-field",0)(1,"mat-date-range-input",1)(2,"input",2),t.NdJ("dateChange",function(s){return o.fromDateChange(s.value)})("click",function(){t.CHM(c);const s=t.MAs(6);return t.KtG(s.open())}),t.qZA(),t.TgZ(3,"input",3),t.NdJ("dateChange",function(s){return o.toDateChange(s.value)})("click",function(){t.CHM(c);const s=t.MAs(6);return t.KtG(s.open())}),t.qZA()(),t._UZ(4,"mat-datepicker-toggle",4),t.TgZ(5,"mat-date-range-picker",null,5),t.YNc(7,D,6,0,"ng-container",6),t.qZA()()}if(2&a){const c=t.MAs(6);t.Tol(o.widthClass),t.xp6(1),t.Q6J("min",o.minDate)("rangePicker",c),t.xp6(1),t.Q6J("value",o.from),t.xp6(1),t.Q6J("value",o.to),t.xp6(1),t.Q6J("for",c),t.xp6(3),t.Q6J("ngIf",o.showButtonConfirm)}},dependencies:[u.ez,u.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.c,d.u5,p.ot,p.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}"]})}}]);
|
|
@@ -0,0 +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(){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.4"),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.4"),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"})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[392],{7392:(q,y,l)=>{l.d(y,{Hw:()=>J,Ps:()=>X});var i=l(4650),E=l(3238),P=l(1281),S=l(6895),u=l(9646),w=l(2843),D=l(4128),N=l(727),C=l(8505),g=l(4004),U=l(262),x=l(8746),B=l(3099),W=l(5698),F=l(529),M=l(1481);const b=["*"];let m;function d(s){return function K(){if(void 0===m&&(m=null,typeof window<"u")){const s=window;void 0!==s.trustedTypes&&(m=s.trustedTypes.createPolicy("angular#components",{createHTML:c=>c}))}return m}()?.createHTML(s)||s}function R(s){return Error(`Unable to find icon with the name "${s}"`)}function A(s){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${s}".`)}function L(s){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${s}".`)}class h{constructor(c,t,e){this.url=c,this.svgText=t,this.options=e}}let I=(()=>{class s{constructor(t,e,n,o){this._httpClient=t,this._sanitizer=e,this._errorHandler=o,this._svgIconConfigs=new Map,this._iconSetConfigs=new Map,this._cachedIconsByUrl=new Map,this._inProgressUrlFetches=new Map,this._fontCssClassesByAlias=new Map,this._resolvers=[],this._defaultFontSetClass=["material-icons","mat-ligature-font"],this._document=n}addSvgIcon(t,e,n){return this.addSvgIconInNamespace("",t,e,n)}addSvgIconLiteral(t,e,n){return this.addSvgIconLiteralInNamespace("",t,e,n)}addSvgIconInNamespace(t,e,n,o){return this._addSvgIconConfig(t,e,new h(n,null,o))}addSvgIconResolver(t){return this._resolvers.push(t),this}addSvgIconLiteralInNamespace(t,e,n,o){const r=this._sanitizer.sanitize(i.q3G.HTML,n);if(!r)throw L(n);const a=d(r);return this._addSvgIconConfig(t,e,new h("",a,o))}addSvgIconSet(t,e){return this.addSvgIconSetInNamespace("",t,e)}addSvgIconSetLiteral(t,e){return this.addSvgIconSetLiteralInNamespace("",t,e)}addSvgIconSetInNamespace(t,e,n){return this._addSvgIconSetConfig(t,new h(e,null,n))}addSvgIconSetLiteralInNamespace(t,e,n){const o=this._sanitizer.sanitize(i.q3G.HTML,e);if(!o)throw L(e);const r=d(o);return this._addSvgIconSetConfig(t,new h("",r,n))}registerFontClassAlias(t,e=t){return this._fontCssClassesByAlias.set(t,e),this}classNameForFontAlias(t){return this._fontCssClassesByAlias.get(t)||t}setDefaultFontSetClass(...t){return this._defaultFontSetClass=t,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(t){const e=this._sanitizer.sanitize(i.q3G.RESOURCE_URL,t);if(!e)throw A(t);const n=this._cachedIconsByUrl.get(e);return n?(0,u.of)(v(n)):this._loadSvgIconFromConfig(new h(t,null)).pipe((0,C.b)(o=>this._cachedIconsByUrl.set(e,o)),(0,g.U)(o=>v(o)))}getNamedSvgIcon(t,e=""){const n=O(e,t);let o=this._svgIconConfigs.get(n);if(o)return this._getSvgFromConfig(o);if(o=this._getIconConfigFromResolvers(e,t),o)return this._svgIconConfigs.set(n,o),this._getSvgFromConfig(o);const r=this._iconSetConfigs.get(e);return r?this._getSvgFromIconSetConfigs(t,r):(0,w._)(R(n))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(t){return t.svgText?(0,u.of)(v(this._svgElementFromConfig(t))):this._loadSvgIconFromConfig(t).pipe((0,g.U)(e=>v(e)))}_getSvgFromIconSetConfigs(t,e){const n=this._extractIconWithNameFromAnySet(t,e);if(n)return(0,u.of)(n);const o=e.filter(r=>!r.svgText).map(r=>this._loadSvgIconSetFromConfig(r).pipe((0,U.K)(a=>{const _=`Loading icon set URL: ${this._sanitizer.sanitize(i.q3G.RESOURCE_URL,r.url)} failed: ${a.message}`;return this._errorHandler.handleError(new Error(_)),(0,u.of)(null)})));return(0,D.D)(o).pipe((0,g.U)(()=>{const r=this._extractIconWithNameFromAnySet(t,e);if(!r)throw R(t);return r}))}_extractIconWithNameFromAnySet(t,e){for(let n=e.length-1;n>=0;n--){const o=e[n];if(o.svgText&&o.svgText.toString().indexOf(t)>-1){const r=this._svgElementFromConfig(o),a=this._extractSvgIconFromSet(r,t,o.options);if(a)return a}}return null}_loadSvgIconFromConfig(t){return this._fetchIcon(t).pipe((0,C.b)(e=>t.svgText=e),(0,g.U)(()=>this._svgElementFromConfig(t)))}_loadSvgIconSetFromConfig(t){return t.svgText?(0,u.of)(null):this._fetchIcon(t).pipe((0,C.b)(e=>t.svgText=e))}_extractSvgIconFromSet(t,e,n){const o=t.querySelector(`[id="${e}"]`);if(!o)return null;const r=o.cloneNode(!0);if(r.removeAttribute("id"),"svg"===r.nodeName.toLowerCase())return this._setSvgAttributes(r,n);if("symbol"===r.nodeName.toLowerCase())return this._setSvgAttributes(this._toSvgElement(r),n);const a=this._svgElementFromString(d("<svg></svg>"));return a.appendChild(r),this._setSvgAttributes(a,n)}_svgElementFromString(t){const e=this._document.createElement("DIV");e.innerHTML=t;const n=e.querySelector("svg");if(!n)throw Error("<svg> tag not found");return n}_toSvgElement(t){const e=this._svgElementFromString(d("<svg></svg>")),n=t.attributes;for(let o=0;o<n.length;o++){const{name:r,value:a}=n[o];"id"!==r&&e.setAttribute(r,a)}for(let o=0;o<t.childNodes.length;o++)t.childNodes[o].nodeType===this._document.ELEMENT_NODE&&e.appendChild(t.childNodes[o].cloneNode(!0));return e}_setSvgAttributes(t,e){return t.setAttribute("fit",""),t.setAttribute("height","100%"),t.setAttribute("width","100%"),t.setAttribute("preserveAspectRatio","xMidYMid meet"),t.setAttribute("focusable","false"),e&&e.viewBox&&t.setAttribute("viewBox",e.viewBox),t}_fetchIcon(t){const{url:e,options:n}=t,o=n?.withCredentials??!1;if(!this._httpClient)throw function H(){return Error("Could not find HttpClient provider for use with Angular Material icons. Please include the HttpClientModule from @angular/common/http in your app imports.")}();if(null==e)throw Error(`Cannot fetch icon from URL "${e}".`);const r=this._sanitizer.sanitize(i.q3G.RESOURCE_URL,e);if(!r)throw A(e);const a=this._inProgressUrlFetches.get(r);if(a)return a;const f=this._httpClient.get(r,{responseType:"text",withCredentials:o}).pipe((0,g.U)(_=>d(_)),(0,x.x)(()=>this._inProgressUrlFetches.delete(r)),(0,B.B)());return this._inProgressUrlFetches.set(r,f),f}_addSvgIconConfig(t,e,n){return this._svgIconConfigs.set(O(t,e),n),this}_addSvgIconSetConfig(t,e){const n=this._iconSetConfigs.get(t);return n?n.push(e):this._iconSetConfigs.set(t,[e]),this}_svgElementFromConfig(t){if(!t.svgElement){const e=this._svgElementFromString(t.svgText);this._setSvgAttributes(e,t.options),t.svgElement=e}return t.svgElement}_getIconConfigFromResolvers(t,e){for(let n=0;n<this._resolvers.length;n++){const o=this._resolvers[n](e,t);if(o)return $(o)?new h(o.url,null,o.options):new h(o,null)}}}return s.\u0275fac=function(t){return new(t||s)(i.LFG(F.eN,8),i.LFG(M.H7),i.LFG(S.K0,8),i.LFG(i.qLn))},s.\u0275prov=i.Yz7({token:s,factory:s.\u0275fac,providedIn:"root"}),s})();function v(s){return s.cloneNode(!0)}function O(s,c){return s+":"+c}function $(s){return!(!s.url||!s.options)}const j=(0,E.pj)(class{constructor(s){this._elementRef=s}}),Y=new i.OlP("MAT_ICON_DEFAULT_OPTIONS"),G=new i.OlP("mat-icon-location",{providedIn:"root",factory:function V(){const s=(0,i.f3M)(S.K0),c=s?s.location:null;return{getPathname:()=>c?c.pathname+c.search:""}}}),T=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],k=T.map(s=>`[${s}]`).join(", "),Q=/^url\(['"]?#(.*?)['"]?\)$/;let J=(()=>{class s extends j{get inline(){return this._inline}set inline(t){this._inline=(0,P.Ig)(t)}get svgIcon(){return this._svgIcon}set svgIcon(t){t!==this._svgIcon&&(t?this._updateSvgIcon(t):this._svgIcon&&this._clearSvgElement(),this._svgIcon=t)}get fontSet(){return this._fontSet}set fontSet(t){const e=this._cleanupFontValue(t);e!==this._fontSet&&(this._fontSet=e,this._updateFontIconClasses())}get fontIcon(){return this._fontIcon}set fontIcon(t){const e=this._cleanupFontValue(t);e!==this._fontIcon&&(this._fontIcon=e,this._updateFontIconClasses())}constructor(t,e,n,o,r,a){super(t),this._iconRegistry=e,this._location=o,this._errorHandler=r,this._inline=!1,this._previousFontSetClass=[],this._currentIconFetch=N.w0.EMPTY,a&&(a.color&&(this.color=this.defaultColor=a.color),a.fontSet&&(this.fontSet=a.fontSet)),n||t.nativeElement.setAttribute("aria-hidden","true")}_splitIconName(t){if(!t)return["",""];const e=t.split(":");switch(e.length){case 1:return["",e[0]];case 2:return e;default:throw Error(`Invalid icon name: "${t}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){const t=this._elementsWithExternalReferences;if(t&&t.size){const e=this._location.getPathname();e!==this._previousPath&&(this._previousPath=e,this._prependPathToReferences(e))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(t){this._clearSvgElement();const e=this._location.getPathname();this._previousPath=e,this._cacheChildrenWithExternalReferences(t),this._prependPathToReferences(e),this._elementRef.nativeElement.appendChild(t)}_clearSvgElement(){const t=this._elementRef.nativeElement;let e=t.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();e--;){const n=t.childNodes[e];(1!==n.nodeType||"svg"===n.nodeName.toLowerCase())&&n.remove()}}_updateFontIconClasses(){if(!this._usingFontIcon())return;const t=this._elementRef.nativeElement,e=(this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/):this._iconRegistry.getDefaultFontSetClass()).filter(n=>n.length>0);this._previousFontSetClass.forEach(n=>t.classList.remove(n)),e.forEach(n=>t.classList.add(n)),this._previousFontSetClass=e,this.fontIcon!==this._previousFontIconClass&&!e.includes("mat-ligature-font")&&(this._previousFontIconClass&&t.classList.remove(this._previousFontIconClass),this.fontIcon&&t.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(t){return"string"==typeof t?t.trim().split(" ")[0]:t}_prependPathToReferences(t){const e=this._elementsWithExternalReferences;e&&e.forEach((n,o)=>{n.forEach(r=>{o.setAttribute(r.name,`url('${t}#${r.value}')`)})})}_cacheChildrenWithExternalReferences(t){const e=t.querySelectorAll(k),n=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let o=0;o<e.length;o++)T.forEach(r=>{const a=e[o],f=a.getAttribute(r),_=f?f.match(Q):null;if(_){let p=n.get(a);p||(p=[],n.set(a,p)),p.push({name:r,value:_[1]})}})}_updateSvgIcon(t){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),t){const[e,n]=this._splitIconName(t);e&&(this._svgNamespace=e),n&&(this._svgName=n),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(n,e).pipe((0,W.q)(1)).subscribe(o=>this._setSvgElement(o),o=>{this._errorHandler.handleError(new Error(`Error retrieving icon ${e}:${n}! ${o.message}`))})}}}return s.\u0275fac=function(t){return new(t||s)(i.Y36(i.SBq),i.Y36(I),i.$8M("aria-hidden"),i.Y36(G),i.Y36(i.qLn),i.Y36(Y,8))},s.\u0275cmp=i.Xpm({type:s,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:8,hostBindings:function(t,e){2&t&&(i.uIk("data-mat-icon-type",e._usingFontIcon()?"font":"svg")("data-mat-icon-name",e._svgName||e.fontIcon)("data-mat-icon-namespace",e._svgNamespace||e.fontSet)("fontIcon",e._usingFontIcon()?e.fontIcon:null),i.ekj("mat-icon-inline",e.inline)("mat-icon-no-color","primary"!==e.color&&"accent"!==e.color&&"warn"!==e.color))},inputs:{color:"color",inline:"inline",svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],features:[i.qOj],ngContentSelectors:b,decls:1,vars:0,template:function(t,e){1&t&&(i.F$t(),i.Hsn(0))},styles:[".mat-icon{-webkit-user-select:none;user-select:none;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px;overflow:hidden}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}.mat-icon.mat-ligature-font[fontIcon]::before{content:attr(fontIcon)}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}"],encapsulation:2,changeDetection:0}),s})(),X=(()=>{class s{}return s.\u0275fac=function(t){return new(t||s)},s.\u0275mod=i.oAB({type:s}),s.\u0275inj=i.cJS({imports:[E.BQ,E.BQ]}),s})()}}]);
|