marketplacepos 3.13.3 → 3.13.5

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 (95) hide show
  1. package/Marketplace/chunk-2LGY3VGP.js +1 -0
  2. package/Marketplace/{chunk-FX43R2N5.js → chunk-2YXHLXID.js} +1 -1
  3. package/Marketplace/{chunk-6NUQBHVK.js → chunk-44JSD7TR.js} +1 -1
  4. package/Marketplace/{chunk-F3ASIPCS.js → chunk-4A2BQXM5.js} +1 -1
  5. package/Marketplace/chunk-4R22UO7N.js +2 -0
  6. package/Marketplace/{chunk-MQFYT7UC.js → chunk-4XJJVBCX.js} +1 -1
  7. package/Marketplace/{chunk-NNPT3RN6.js → chunk-5WXM6HSA.js} +1 -1
  8. package/Marketplace/{chunk-OFRBPREK.js → chunk-6U6JR5K6.js} +1 -1
  9. package/Marketplace/chunk-B3LBEB32.js +1 -0
  10. package/Marketplace/chunk-BGN73QQI.js +35 -0
  11. package/Marketplace/{chunk-ZHBHYT7I.js → chunk-BTKJJ5MP.js} +1 -1
  12. package/Marketplace/chunk-C3YE27TZ.js +8 -0
  13. package/Marketplace/{chunk-QPAHUI3H.js → chunk-D4HBNVTL.js} +1 -1
  14. package/Marketplace/{chunk-3LRKHZJF.js → chunk-D7X76LHU.js} +1 -1
  15. package/Marketplace/{chunk-IPX66YIX.js → chunk-DSF55IXM.js} +1 -1
  16. package/Marketplace/{chunk-6OWGDOJP.js → chunk-E3E6TUYP.js} +1 -1
  17. package/Marketplace/chunk-EKCNJX26.js +1 -0
  18. package/Marketplace/chunk-F4WIW6HA.js +1 -0
  19. package/Marketplace/{chunk-F2CKDRNC.js → chunk-F63GNFZE.js} +1 -1
  20. package/Marketplace/{chunk-FCVAME75.js → chunk-FZ7LVL4C.js} +1 -1
  21. package/Marketplace/{chunk-L536HOP7.js → chunk-G6HY2OKZ.js} +1 -1
  22. package/Marketplace/{chunk-WQ26K26X.js → chunk-GEQYSMX6.js} +1 -1
  23. package/Marketplace/chunk-GVS44OWQ.js +1 -0
  24. package/Marketplace/{chunk-QCFKCDKM.js → chunk-HFUGRK45.js} +1 -1
  25. package/Marketplace/{chunk-TX43EE6N.js → chunk-HXDXTE2F.js} +1 -1
  26. package/Marketplace/{chunk-M4VGME5L.js → chunk-IPYNDMGQ.js} +1 -1
  27. package/Marketplace/chunk-IYN33JGO.js +2 -0
  28. package/Marketplace/{chunk-VPYKYYBH.js → chunk-IYV3772A.js} +1 -1
  29. package/Marketplace/chunk-JTJLVSTV.js +1 -0
  30. package/Marketplace/{chunk-BMPACBBM.js → chunk-K7EHVRIN.js} +1 -1
  31. package/Marketplace/{chunk-HBHGO2RV.js → chunk-KCDL7SWP.js} +1 -1
  32. package/Marketplace/{chunk-GP3CFNYA.js → chunk-KCFS3M2K.js} +1 -1
  33. package/Marketplace/{chunk-O6SPNQMQ.js → chunk-KQ5DOU4A.js} +1 -1
  34. package/Marketplace/chunk-KWFES5F7.js +4 -0
  35. package/Marketplace/chunk-L34D7YAZ.js +1 -0
  36. package/Marketplace/{chunk-AHK65AO6.js → chunk-LJDPILCP.js} +1 -1
  37. package/Marketplace/{chunk-CP7VAKTQ.js → chunk-MLGEX4PW.js} +1 -1
  38. package/Marketplace/{chunk-IP2WADIR.js → chunk-MSVZKMTY.js} +1 -1
  39. package/Marketplace/chunk-MVPTQRFO.js +1 -0
  40. package/Marketplace/{chunk-E5ZXRZGR.js → chunk-N3VBGSQH.js} +1 -1
  41. package/Marketplace/chunk-O5GGWOBM.js +1 -0
  42. package/Marketplace/chunk-OAKENGDC.js +1 -0
  43. package/Marketplace/{chunk-7CEWM7GE.js → chunk-PIIJRFHM.js} +1 -1
  44. package/Marketplace/chunk-Q64RKYUS.js +1 -0
  45. package/Marketplace/{chunk-2UXFUEON.js → chunk-QPRFFPO5.js} +1 -1
  46. package/Marketplace/chunk-QZKWUCMY.js +1 -0
  47. package/Marketplace/chunk-R7MYFLXJ.js +3 -0
  48. package/Marketplace/{chunk-5WVUQE43.js → chunk-RMD2ZXUN.js} +1 -1
  49. package/Marketplace/{chunk-JBAG4TSB.js → chunk-RPO7IHUU.js} +1 -1
  50. package/Marketplace/{chunk-Y4SOX2BE.js → chunk-RXRML6X2.js} +1 -1
  51. package/Marketplace/chunk-RZ7FKABW.js +1 -0
  52. package/Marketplace/chunk-S5GA4AVB.js +2 -0
  53. package/Marketplace/chunk-T6XF6UXO.js +3 -0
  54. package/Marketplace/{chunk-2HWKPGG2.js → chunk-UYN5TJJ7.js} +1 -1
  55. package/Marketplace/{chunk-VD46BM3E.js → chunk-V2UYOAT2.js} +1 -1
  56. package/Marketplace/{chunk-CVLA5R75.js → chunk-V4UFHWKE.js} +1 -1
  57. package/Marketplace/chunk-V6L3NRY3.js +1 -0
  58. package/Marketplace/{chunk-WJI6JIBR.js → chunk-VOWLO2M7.js} +1 -1
  59. package/Marketplace/{chunk-DZHNXVSW.js → chunk-VQUUMT5F.js} +1 -1
  60. package/Marketplace/{chunk-7NHG2S26.js → chunk-WXUKZFAH.js} +1 -1
  61. package/Marketplace/{chunk-YERME2YY.js → chunk-XLSYUMRS.js} +2 -2
  62. package/Marketplace/{chunk-P7KW5VRW.js → chunk-YDGPF5OU.js} +1 -1
  63. package/Marketplace/{chunk-2GZOVNPU.js → chunk-YG3KQ63T.js} +1 -1
  64. package/Marketplace/{chunk-4QAG4XV5.js → chunk-YUYOQ6ZT.js} +1 -1
  65. package/Marketplace/{chunk-N23ZYP7G.js → chunk-YZ42FKNJ.js} +1 -1
  66. package/Marketplace/index.html +2 -2
  67. package/Marketplace/{main-PVT3FMFE.js → main-TYOAJ6YV.js} +1 -1
  68. package/Marketplace/polyfills-MH5IBZ74.js +2 -0
  69. package/Marketplace/styles-BHJH7JG5.css +1 -0
  70. package/package.json +1 -1
  71. package/Marketplace/chunk-2Y4N4NSS.js +0 -2
  72. package/Marketplace/chunk-43TMSPFC.js +0 -1
  73. package/Marketplace/chunk-4QGD62JF.js +0 -2
  74. package/Marketplace/chunk-4TYJR476.js +0 -1
  75. package/Marketplace/chunk-77JORVC2.js +0 -8
  76. package/Marketplace/chunk-7GNI4BOW.js +0 -3
  77. package/Marketplace/chunk-7NWB2VB2.js +0 -1
  78. package/Marketplace/chunk-AAIK6JQ3.js +0 -4
  79. package/Marketplace/chunk-DXJFMERC.js +0 -1
  80. package/Marketplace/chunk-EVSENZKK.js +0 -1
  81. package/Marketplace/chunk-F5YRASNU.js +0 -1
  82. package/Marketplace/chunk-G6CZHXQI.js +0 -1
  83. package/Marketplace/chunk-HYSXRUQ5.js +0 -1
  84. package/Marketplace/chunk-IIUTIA47.js +0 -1
  85. package/Marketplace/chunk-LIS3LB3F.js +0 -1
  86. package/Marketplace/chunk-MEGPKKGI.js +0 -1
  87. package/Marketplace/chunk-PIDUM6XT.js +0 -2
  88. package/Marketplace/chunk-RGIPA4RC.js +0 -3
  89. package/Marketplace/chunk-XKP2LBOB.js +0 -47
  90. package/Marketplace/chunk-Y2XXDDNX.js +0 -1
  91. package/Marketplace/chunk-YOU5DY2R.js +0 -1
  92. package/Marketplace/chunk-ZVNVZRA7.js +0 -1
  93. package/Marketplace/polyfills-KTKZVV2N.js +0 -2
  94. package/Marketplace/styles-4NMVKKKY.css +0 -1
  95. /package/Marketplace/{chunk-CRRJCY55.js → chunk-GNOSNGXM.js} +0 -0
@@ -1 +0,0 @@
1
- import{a as mt}from"./chunk-662E5VTA.js";import{b as Pt}from"./chunk-NNPT3RN6.js";import{c as bt}from"./chunk-M4VGME5L.js";import{g as xt}from"./chunk-AAIK6JQ3.js";import{e as it}from"./chunk-IPX66YIX.js";import{b as gt,c as ht,g as ft,i as _t,j as Ct}from"./chunk-PIDUM6XT.js";import{t as dt,u as ut}from"./chunk-43TMSPFC.js";import{c as nt,h as ot,k as at,u as rt}from"./chunk-F5YRASNU.js";import{b as lt,c as st,d as ct,f as pt}from"./chunk-2UXFUEON.js";import{$ as q,B as J,Eb as S,F as W,Fb as p,Gb as V,Hb as F,Ia as r,Ja as M,Jb as X,Kb as Z,Lb as tt,Nb as L,O as Y,Q as z,Ua as C,V as U,Wb as N,X as k,Xb as I,Y as H,Ya as g,Zb as j,_a as h,c as A,ca as K,d as G,fb as T,ga as D,ic as y,kb as l,lb as m,mb as $,nb as v,oa as d,ob as w,pa as u,pb as Q,q as P,qb as _,sc as R,tb as x,uc as et,vb as c,xa as f,yc as O,za as E,zc as B}from"./chunk-77JORVC2.js";function wt(i,n){i&1&&Q(0)}function Nt(i,n){if(i&1&&(v(0),g(1,wt,1,0,"ng-container",5),w()),i&2){c(2);let a=S(4);r(),h("ngTemplateOutlet",a)}}function It(i,n){if(i&1&&(l(0,"div",6)(1,"label"),p(2,"Editing Data"),m(),l(3,"div")(4,"span"),p(5),N(6,"number"),m()()()),i&2){let a=c(2);r(5),V(I(6,1,a.value))}}function yt(i,n){if(i&1&&(v(0),g(1,Nt,2,1,"ng-container",4)(2,It,7,3,"ng-template",null,1,j),w()),i&2){let a=S(3),t=c();r(),h("ngIf",t.hasPriceEdit)("ngIfElse",a)}}function Dt(i,n){if(i&1){let a=_();l(0,"div",7)(1,"input",8),tt("ngModelChange",function(e){d(a);let o=c();return Z(o.value,e)||(o.value=e),u(e)}),m(),l(2,"label",9),p(3,"Editing Data"),m()()}if(i&2){let a=c();r(),X("ngModel",a.value),h("max",a.maxEditInventory)}}var Kt=(()=>{let n=class n{constructor(t,e,o){this.dialogRef=t,this.item=e,this.permissionService=o,this.maxEditInventory=1e5,this.permissionService.hasPermission(mt.price).then(s=>this.hasPriceEdit=s)}ngOnInit(){this.selectedChannel=this.item.Variant.Channel.find(t=>t.ChannelID==this.item.ChannelID),this.selectedChannel.ID=this.item.Variant.ID,this.selectedChannel.Sku=this.item.Variant.Code,this.item.Table=="inventory"?(this.value=this.selectedChannel.Inventory,this.maxEditInventory=this.selectedChannel?.TypeID==lt.Tokopedia?1e5:null):this.item.Table=="price"&&(this.value=this.selectedChannel.Price,this.maxEditInventory=null),this.selectedChannel.ItemName=this.item.Name,this.selectedChannel.VarName=this.item.Variant.Model,this.initModalConfig()}initModalConfig(){this.modalConfig=new _t,this.modalConfig.title=`${this.item?.Name} ${this.item?.Variant?.Model} ${this.item?.Table} in ${this.selectedChannel?.Title}`}onSubmit(){this.item.Table=="inventory"?this.selectedChannel.Inventory=this.value:this.item.Table=="price"&&(this.selectedChannel.Price=this.value),this.dialogRef.close(this.selectedChannel)}onClose(){this.dialogRef.close()}};n.\u0275fac=function(e){return new(e||n)(M(gt),M(ht),M(ct))},n.\u0275cmp=D({type:n,selectors:[["app-table-dialog"]],standalone:!0,features:[L],decls:5,vars:4,consts:[["INVENTORY",""],["DISABLED",""],[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[4,"ngIf","ngIfElse"],[4,"ngTemplateOutlet"],["matTooltipPosition","above","matTooltip","Cannot edit Unit Price because you dont have access ProductEditor role",1,"info-label-group","mt-3",2,"background","#e9ecef","opacity","1"],[1,"form-label-group","mt-3"],["type","text","name","edit","placeholder","Editing Data","autoNum","",1,"form-control",3,"ngModelChange","ngModel","max"],["for","edit"]],template:function(e,o){if(e&1){let s=_();l(0,"modal-material",2),x("onClose",function(){return d(s),u(o.onClose())})("onCancel",function(){return d(s),u(o.onClose())})("onOk",function(){return d(s),u(o.onSubmit())}),l(1,"div",3),g(2,yt,4,2,"ng-container",4)(3,Dt,4,2,"ng-template",null,0,j),m()()}if(e&2){let s=S(4);h("dynamicValidated",o.value)("config",o.modalConfig),r(2),h("ngIf",o.item.Table=="price")("ngIfElse",s)}},dependencies:[B,R,et,O,ft,xt,bt,Pt,Ct,rt,nt,ot,at,pt,ut,dt],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-left:1rem;margin-right:1rem}.mat-dialog-content[_ngcontent-%COMP%]{padding-left:.5rem;padding-right:.5rem;margin-left:.5rem;margin-right:.5rem}.font-lg[_ngcontent-%COMP%]{font-size:large}.font-lgr[_ngcontent-%COMP%]{font-size:larger}"]});let i=n;return i})();var ne=(()=>{let n=class n{constructor(t){this.http=t,this.pagination$=new G(null),this._pageNumber=C(1),this.pageNumber=y(()=>this._pageNumber()),this._hideCount=C(!0),this.hideCount=y(()=>this._hideCount()),this._disableNextButton=C(!0),this.disableNextButton=y(()=>this._disableNextButton()),this._goToLastPage=C(!1),this.isLastPage=y(()=>this._goToLastPage()),this.totalData=C(0),this.destroy$=new A,this.data$=this.paginationFunction()}onNextPage(t){t.PageNumber+=1,this.pagination$.next(t)}setPageNumberFooter(t){this._pageNumber.set(t.PageNumber)}setPaginationButtonState(t,e){e==0?this._disableNextButton.set(!0):this._disableNextButton.set(!(e<t.RowCount*t.PageNumber))}reloadPagination(t){st.IsEmpty(t.PageNumber)&&(t.PageNumber=1),this.pagination$.next(t),this._hideCount.set(!0),this._goToLastPage.set(!1)}onLastPage(t={}){let e=JSON.parse(JSON.stringify(t));this.totalRowCount$=this.http.post(`/api/${this.fethRowCountEndpoint}`,e).pipe(P(o=>o.Total),k(o=>{this._hideCount.set(!1),e.RowCount=o,e.PageNumber=1,this.pagination$.next(e),this._goToLastPage.set(!0)}))}paginationFunction(){return this.pagination$.pipe(U(this.destroy$),J(t=>t!=null),W(t=>this.http.post(`/API/${this.fetchDataEndpoint}`,JSON.stringify(t)).pipe(P(e=>e.Data?e.Data:[]))),H(this.pagination$),Y((t,e)=>{let[o,s]=t,[b]=e;return s.PageNumber==1?[b,s]:[o.concat(b),s]}),k(([t,e])=>{this.setPageNumberFooter(e);let o=this.calculateProductLength(t);this.totalData.set(o),this.setPaginationButtonState(e,o)}),P(([t])=>t),z())}getRowCount(t){this._hideCount.set(!1),this.totalRowCount$=this.http.post(`/API/${this.fethRowCountEndpoint}`,t).pipe(P(e=>e.Total))}calculateProductLength(t=[]){return t.reduce((o,s)=>o+(s.Variants?.length?s.Variants?.length:0),0)}};n.\u0275fac=function(e){return new(e||n)(K(it))},n.\u0275prov=q({token:n,factory:n.\u0275fac});let i=n;return i})();function Et(i,n){if(i&1){let a=_();l(0,"span",6),x("click",function(){d(a);let e=c();return u(e.onGetRowCount())}),l(1,"i",7),p(2,"?"),m()()}}function Mt(i,n){if(i&1&&(v(0),l(1,"span"),p(2),N(3,"number"),m(),w()),i&2){let a=c();r(2),V(I(3,1,a.rowCount()))}}function St(i,n){if(i&1){let a=_();l(0,"a",10),x("click",function(){d(a);let e=c(2);return u(e.onNextPage())}),$(1,"i",11),p(2," Next"),m()}}function Vt(i,n){if(i&1){let a=_();l(0,"a",12),x("click",function(){d(a);let e=c(2);return u(e.onLastPage())}),$(1,"i",13),p(2," Last"),m()}}function Lt(i,n){if(i&1&&(l(0,"div",5),g(1,St,3,0,"a",8)(2,Vt,3,0,"a",9),m()),i&2){let a=c();r(),T(a.disableNextButton()&&!a.goToLastPage()?1:-1),r(),T(a.disableNextButton()&&!a.goToLastPage()?2:-1)}}var me=(()=>{let n=class n{constructor(){this.totalData=f(0),this.rowCount=f(),this.pageNumber=f(),this.disableNextButton=f(),this.goToLastPage=f(),this.hideCount=f(),this.nextPage=new E,this.lastPage=new E,this.getRowCount=new E}onNextPage(){this.nextPage.emit()}onLastPage(){this.lastPage.emit()}onGetRowCount(){this.getRowCount.emit()}};n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=D({type:n,selectors:[["infinite-paginator"]],inputs:{totalData:[1,"totalData"],rowCount:[1,"rowCount"],pageNumber:[1,"pageNumber"],disableNextButton:[1,"disableNextButton"],goToLastPage:[1,"goToLastPage"],hideCount:[1,"hideCount"]},outputs:{nextPage:"onNextPage",lastPage:"onLastPage",getRowCount:"onGetRowCount"},standalone:!0,features:[L],decls:9,vars:7,consts:[[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],[2,"cursor","pointer"],[4,"ngIf"],[1,"btn-group"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary","border-start-0"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary","border-start-0",3,"click"],[1,"fas","fa-share"]],template:function(e,o){e&1&&(l(0,"div",0)(1,"div",1)(2,"div",2),p(3),N(4,"number"),g(5,Et,3,0,"span",3)(6,Mt,4,3,"ng-container",4),p(7),m()(),g(8,Lt,3,2,"div",5),m()),e&2&&(r(3),F(" Showing 1 - ",I(4,5,o.totalData())," of "),r(2),T(o.hideCount()?5:-1),r(),h("ngIf",!o.hideCount()&&o.rowCount()),r(),F(" records ~ ",o.pageNumber()," Page "),r(),T(o.totalData()>0?8:-1))},dependencies:[B,R,O]});let i=n;return i})();export{Kt as a,ne as b,me as c};
@@ -1 +0,0 @@
1
- import{a as B}from"./chunk-IIUTIA47.js";import{a as vt}from"./chunk-IWVYX6KY.js";import{a as $}from"./chunk-N23ZYP7G.js";import{a as dt,b as ft,d as ut,e as gt}from"./chunk-2Y4N4NSS.js";import{g as st}from"./chunk-YERME2YY.js";import{e as at}from"./chunk-IPX66YIX.js";import"./chunk-HBHGO2RV.js";import{l as k,m as ht}from"./chunk-PIDUM6XT.js";import"./chunk-43TMSPFC.js";import"./chunk-4TYJR476.js";import{h as lt,k as mt,u as ct}from"./chunk-F5YRASNU.js";import{c as pt}from"./chunk-2UXFUEON.js";import{Eb as K,Fb as l,Ga as W,Gb as s,Ha as H,Hb as x,Ia as m,Ja as v,Jb as Q,Kb as X,Lb as Y,Ob as Z,Pb as tt,Q as j,Qb as et,T as q,V as U,Wb as d,Xb as _,Ya as u,Yb as S,Zb as it,_a as p,aa as I,bd as rt,c as z,ed as F,ga as y,gd as R,ha as N,kb as r,lb as o,mb as D,nb as g,oa as b,ob as h,pa as E,pc as nt,q as C,qb as G,rc as ot,sc as T,tb as V,vb as f,vc as w,wc as M,yb as J,yc as P,zc as L}from"./chunk-77JORVC2.js";import"./chunk-CRRJCY55.js";var Et=(t,e)=>({"bg-gradient-danger":t,"bg-gradient-warning":e}),Dt=()=>["/menu/notification/detail"],Tt=t=>({ID:t});function wt(t,e){if(t&1&&(r(0,"span",14),D(1,"img",15),o(),l(2)),t&2){let n=e.item;m(),p("src",n.Img,H)("alt",n.Name),m(),x(" ",n.Name," ")}}function Mt(t,e){if(t&1&&(g(0),l(1),d(2,"number"),r(3,"span"),l(4,"s"),o(),h()),t&2){let n=f().$implicit;m(),x(" ",S(2,1,n.DurationInSecond,"1.1-1")," ")}}function Pt(t,e){t&1&&l(0," - ")}function Lt(t,e){if(t&1&&(g(0),r(1,"tr",16)(2,"td")(3,"a",17),D(4,"img",18),r(5,"span"),l(6),o()()(),r(7,"td")(8,"b"),l(9),o(),D(10,"div",19),o(),r(11,"td"),u(12,Mt,5,4,"ng-container",20)(13,Pt,1,0,"ng-template",null,0,it),o(),r(15,"td"),l(16),o(),r(17,"td"),l(18),d(19,"date"),o()(),h()),t&2){let n=e.$implicit,a=K(14);m(),p("ngClass",et(14,Et,n.Status==1,n.Status==0)),m(2),p("routerLink",Z(17,Dt))("queryParams",tt(18,Tt,n.ID)),m(),J("src",n.Img,H),m(2),s(n.Name),m(3),s(n.Label),m(),p("innerHTML",n.Message,W),m(2),p("ngIf",n.DurationInSecond)("ngIfElse",a),m(4),s(n.StatusLabel),m(2),s(S(19,11,n.Created,"dd MMM yyyy HH:mm"))}}function Ft(t,e){if(t&1){let n=G();g(0),r(1,"div",6)(2,"div",21)(3,"app-custom-paginator",22),d(4,"async"),d(5,"async"),V("total",function(){b(n);let i=f(2);return E(i.getRowCount())})("next",function(){b(n);let i=f(2);return E(i.onNextPage())})("previous",function(){b(n);let i=f(2);return E(i.onPreviousPage())}),o()()(),h()}if(t&2){let n=f().ngIf,a=f();m(3),p("filter",a.filter)("totaldata",n==null?null:n.length)("paginationTotal",_(4,4,a.rowCount$))("hasClicked",_(5,6,a.rowCount$))}}function Rt(t,e){if(t&1&&(g(0),u(1,Ft,6,8,"ng-container",13),h()),t&2){let n=e.ngIf;m(),p("ngIf",n.length>0)}}var _t=(()=>{let e=class e{constructor(a,i,c){this.http=a,this.notificationService=i,this.authService=c,this.filter=new vt,this.destroy$=new z,this.channelOptions=c.getChannels()}ngOnInit(){this.notificationService.clearNotification(),this.initPageLoader(),this.subscribeNotification()}subscribeNotification(){this.notificationService.getNotification().pipe(U(this.destroy$)).subscribe(a=>{a.length>0&&(this.getNotifications(),this.notificationService.clearNotification())})}initPageLoader(){this.http.post("/api/notification/Load",{}).subscribe(a=>{this.filter=a.Filter,this.filter.PageSize=this.filter.RowCount,this.getNotifications()})}onFilter(){this.rowCount$=null,this.getNotifications()}getNotifications(){let a={ChannelID:this.filter.ChannelID,RowCount:this.filter.PageSize,PageNumber:this.filter.PageNumber};this.notifications$=this.http.post("/api/notification/Get",a).pipe(C(i=>i.Data),C(i=>(i=this.setChannelLogoToNotifications(i),i=this.setTimeToSecond(i),i)),j(1))}setTimeToSecond(a){return a=a.map(i=>(i.DurationInSecond=parseInt(i.Duration)/1e3,i)),a}setChannelLogoToNotifications(a){return a=a.map(i=>(i.Img=pt.getChannelLogoByTypeId(i.TypeID),i)),a}onNextPage(){this.filter.PageNumber+=1,this.getNotifications()}onPreviousPage(){this.filter.PageNumber-=1,this.getNotifications()}getRowCount(){let a={ChannelID:this.filter.ChannelID};this.rowCount$=this.http.post("/api/notification/RowCount",a).pipe(C(i=>i.Count),j(1))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};e.\u0275fac=function(i){return new(i||e)(v(at),v(B),v(st))},e.\u0275cmp=y({type:e,selectors:[["app-notification"]],decls:30,vars:9,consts:[["timeNotAvailable",""],["headerTitle","Notification","hideSearchBox","true",3,"onSubmit"],[1,"mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"],[4,"ngIf"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[3,"ngClass"],[3,"routerLink","queryParams"],["alt","",1,"channelLogo-md","me-4",3,"src"],[3,"innerHTML"],[4,"ngIf","ngIfElse"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(i,c){i&1&&(r(0,"mainpanel",1),V("onSubmit",function(){return c.onFilter()}),r(1,"filters")(2,"div")(3,"h6",2),l(4,"Channel"),o(),r(5,"ng-select",3),Y("ngModelChange",function(O){return X(c.filter.ChannelID,O)||(c.filter.ChannelID=O),O}),u(6,wt,3,3,"ng-template",4),o()()(),r(7,"content")(8,"div",5)(9,"div",6)(10,"div",7)(11,"div",8)(12,"table",9)(13,"thead",10)(14,"tr",11)(15,"th"),l(16,"Channel"),o(),r(17,"th"),l(18,"Process"),o(),r(19,"th"),l(20,"Duration"),o(),r(21,"th"),l(22,"Status"),o(),r(23,"th"),l(24,"Created"),o()()(),r(25,"tbody"),u(26,Lt,20,20,"ng-container",12),d(27,"async"),o()()()()(),u(28,Rt,2,1,"ng-container",13),d(29,"async"),o()()()),i&2&&(m(5),p("clearable",!0)("items",c.channelOptions),Q("ngModel",c.filter.ChannelID),m(21),p("ngForOf",_(27,5,c.notifications$)),m(2),p("ngIf",_(29,7,c.notifications$)))},dependencies:[nt,ot,T,ut,dt,ft,lt,mt,k,F,$,w,P,M]});let t=e;return t})();function Bt(t,e){if(t&1&&(r(0,"div",10)(1,"div",13)(2,"div",7)(3,"h5"),l(4,"Perflog"),o()(),r(5,"div",8)(6,"div",14)(7,"div",15)(8,"pre"),l(9),o()()()()()()),t&2){let n=f().ngIf;m(9),s(n.Perflog)}}function kt(t,e){if(t&1&&(g(0),r(1,"div",17)(2,"div",13)(3,"div",7)(4,"h5"),l(5,"StackTrace"),o()(),r(6,"div",8)(7,"div",14)(8,"div",15)(9,"pre"),l(10),o()()()()()(),h()),t&2){let n=f().ngIf;m(10),s(n==null?null:n.StackTrace)}}function $t(t,e){if(t&1&&(g(0),r(1,"mainpanel",1)(2,"actions")(3,"a",2),l(4,"Back"),o()(),r(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h5"),l(12,"General"),o()(),r(13,"div",8)(14,"div",9)(15,"div",10)(16,"div",11)(17,"label"),l(18,"Created Date"),o(),r(19,"div")(20,"span"),l(21),d(22,"date"),o()()()(),r(23,"div",10)(24,"div",11)(25,"label"),l(26,"Status"),o(),r(27,"div")(28,"span"),l(29),o()()()()(),r(30,"div",12)(31,"div",10)(32,"div",11)(33,"label"),l(34,"Duration"),o(),r(35,"div")(36,"span"),l(37),d(38,"number"),o()()()(),r(39,"div",10)(40,"div",11)(41,"label"),l(42,"Label"),o(),r(43,"div")(44,"span"),l(45),o()()()()()()()()(),r(46,"div",4)(47,"div",10)(48,"div",13)(49,"div",7)(50,"h5"),l(51,"Message"),o()(),r(52,"div",8)(53,"div",14)(54,"div",15)(55,"pre"),l(56),o()()()()()(),u(57,Bt,10,1,"div",16)(58,kt,11,1,"ng-container",0),o()()()(),h()),t&2){let n=e.ngIf;m(),p("headerTitle","Notification "+n.Name)("hideSearchBox",!0)("hideSearchDropdown",!0),m(20),s(S(22,10,n.Created,"dd MMM yyyy HH:mm:ss")),m(8),s(n.StatusLabel),m(8),x("",S(38,13,n.DurationInSecond,"1.1-1")," s"),m(8),s(n.Label),m(11),s(n.Message),m(),p("ngIf",n==null?null:n.Perflog),m(),p("ngIf",n==null?null:n.StackTrace)}}var Ct=(()=>{let e=class e{constructor(a,i){this.activatedRoute=a,this.notificationService=i}ngOnInit(){this.notification$=this.activatedRoute.queryParams.pipe(q(a=>{let i=a.ID;return this.notificationService.getNotificationDetail(i).pipe(C(c=>(c.DurationInSecond=parseInt(c.Duration)/1e3,c)))}))}};e.\u0275fac=function(i){return new(i||e)(v(rt),v(B))},e.\u0275cmp=y({type:e,selectors:[["app-detail"]],decls:2,vars:3,consts:[[4,"ngIf"],[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/notification",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-8"],[1,"row"],[1,"col-12"],[1,"card","mb-8"],[1,"card-header"],[1,"card-body"],[1,"row","mt-6"],[1,"col-sm-6"],[1,"info-label-group"],[1,"row","mt-4"],[1,"card"],[1,"col-sm-12","mt-2"],[1,"form-group"],["class","col-sm-6",4,"ngIf"],[1,"col-sm-12"]],template:function(i,c){i&1&&(u(0,$t,59,16,"ng-container",0),d(1,"async")),i&2&&p("ngIf",_(1,1,c.notification$))},dependencies:[T,k,F,w,P,M]});let t=e;return t})();var Ot=[{path:"",component:_t},{path:"detail",component:Ct}],St=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=N({type:e}),e.\u0275inj=I({imports:[L,R.forChild(Ot)]});let t=e;return t})();var de=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=N({type:e}),e.\u0275inj=I({imports:[L,St,gt,ct,ht,R,$]});let t=e;return t})();export{de as NotificationModule};
@@ -1 +0,0 @@
1
- import{a as O,b as It,d as Q,e as de}from"./chunk-4QGD62JF.js";import{a as q}from"./chunk-IWVYX6KY.js";import{a as $}from"./chunk-FCVAME75.js";import"./chunk-CP7VAKTQ.js";import{a as pe}from"./chunk-LIS3LB3F.js";import{f as re,g as ae,h as le,i as ce,j as se}from"./chunk-7GNI4BOW.js";import"./chunk-OFRBPREK.js";import{a as Xt,b as te}from"./chunk-7CEWM7GE.js";import{a as X,b as wt}from"./chunk-TX43EE6N.js";import{a as z}from"./chunk-N23ZYP7G.js";import{a as ee,b as ne,c as ie}from"./chunk-DXJFMERC.js";import{b as me}from"./chunk-7NWB2VB2.js";import"./chunk-IP2WADIR.js";import"./chunk-MEGPKKGI.js";import{a as rt,b as bt,d as Z,e as Yt}from"./chunk-2Y4N4NSS.js";import{a as nt}from"./chunk-QCFKCDKM.js";import{a as B}from"./chunk-NNPT3RN6.js";import"./chunk-G6CZHXQI.js";import"./chunk-M4VGME5L.js";import{a as oe}from"./chunk-5WVUQE43.js";import"./chunk-AAIK6JQ3.js";import{g as L}from"./chunk-YERME2YY.js";import{b as G,e as A}from"./chunk-IPX66YIX.js";import"./chunk-HBHGO2RV.js";import{d as J,l as R,m as Qt}from"./chunk-PIDUM6XT.js";import{t as vt,u as qt}from"./chunk-43TMSPFC.js";import{P as Zt}from"./chunk-4TYJR476.js";import{b as zt,c as ot,h as W,k as K,u as Ht}from"./chunk-F5YRASNU.js";import{b as Y,c as _}from"./chunk-2UXFUEON.js";import{$ as Lt,B as y,Eb as j,F as kt,Fb as m,Gb as Ct,Ha as N,Hb as I,Ia as c,Ja as x,Jb as D,Kb as T,Lb as E,O as Vt,Ob as et,Pb as ct,Q as Ut,T as H,V as lt,Wb as F,X as _t,Xb as k,Y as At,Ya as S,Yb as jt,Zb as it,_a as s,aa as Rt,bd as xt,c as gt,ca as Bt,cd as Kt,d as Ft,ed as Pt,ga as M,gd as Jt,ha as $t,kb as a,lb as l,mb as C,nb as b,oa as u,ob as v,pa as h,q as at,qb as P,rc as V,sc as U,tb as f,vb as p,vc as ft,wc as Gt,yc as St,zc as Wt}from"./chunk-77JORVC2.js";import"./chunk-CRRJCY55.js";var ve=()=>["/menu/products/download/by-url"],ue=(()=>{let r=class r{constructor(){this.productTabs=[{Title:"Sold in Channel",Url:"/menu/products/status/sold-in-channel",Description:"SKU has been mapped between dealpos and marketplace"},{Title:"Not in POS",Url:"/menu/products/status/not-in-pos",Description:"SKU sold in Marketplace but not exist in DEALPOS"},{Title:"Not in Channel",Url:"/menu/products/status/not-in-channel",Description:"SKU has not been sold on one of channels"},{Title:"In POS",Url:"/menu/products/status/in-pos",Description:"All products which is already available in POS"},{Title:"Multiple Listing",Url:"/menu/products/status/duplicate-sku",Description:"SKU(s) which is listed more than one time (one to many)"},{Title:"Channel Statistic",Url:"/menu/products/status/channel-statistic",Description:"Product statistic from each channel obtained from the last product scan"}]}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=M({type:r,selectors:[["app-status"]],decls:13,vars:3,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid","d-flex","align-items-center","justify-content-between"],[3,"Tabs"],[1,"dropdown","me-6"],["role","button","data-bs-toggle","dropdown","aria-expanded","false",1,"text-dark"],[1,"fa-solid","fa-bars","fa-lg"],[1,"dropdown-menu","dropdown-menu-end","row"],[1,"d-flex"],[1,"dropdown-item",3,"routerLink"]],template:function(e,i){e&1&&(a(0,"nav",0)(1,"div",1)(2,"div"),C(3,"nav-tab",2),l()(),a(4,"div")(5,"div",3)(6,"a",4),C(7,"i",5),l(),a(8,"div",6)(9,"div",7)(10,"a",8),m(11,"Download Product By Url"),l()()()()()(),C(12,"router-outlet")),e&2&&(c(3),s("Tabs",i.productTabs),c(7),s("routerLink",et(2,ve)))},dependencies:[Xt,Kt,Pt]});let o=r;return o})();function Ie(o,r){if(o&1){let n=P();a(0,"button",13),f("click",function(){u(n);let e=p(2);return h(e.onOpenScanDialog())}),C(1,"i",14),m(2," Scan Channel "),l()}}function we(o,r){if(o&1&&(b(0),S(1,Ie,3,0,"button",12),v()),o&2){let n=p();c(),s("ngIf",!n.productService.hasSelection(n.products))}}function ye(o,r){if(o&1){let n=P();b(0),a(1,"button",15),f("click",function(){u(n);let e=p();return h(e.onScanMultipleProduct())}),C(2,"i",14),m(3),l(),v()}if(o&2){let n,t=p();c(3),I(" Scan (",(n=t.productService.selectedProduct(t.products))==null?null:n.length,") ")}}function Me(o,r){if(o&1){let n=P();b(0),a(1,"button",16),f("click",function(){u(n);let e=p();return h(e.onUploadMultipleProduct())}),C(2,"i",17),m(3),l(),v()}if(o&2){let n,t=p();c(3),I(" Upload (",(n=t.productService.selectedProduct(t.products))==null?null:n.length,") ")}}function Ne(o,r){if(o&1){let n=P();a(0,"div",18)(1,"app-product-card",19),f("onUpload",function(){let e=u(n).$implicit,i=p();return h(i.onUploadToMultipleChannel(e))})("onScan",function(){let e=u(n).$implicit,i=p();return h(i.onScanSingleProduct(e))})("onDescEvent",function(){let e=u(n).index,i=p();return h(i.onOpenDialogVariant(e))})("onCheckBoxChange",function(e){let i=u(n).$implicit;return h(i.selected=e)}),l()()}if(o&2){let n=r.$implicit,t=p();c(),s("productId",n.ID)("title",n==null?null:n.Name)("image",n==null?null:n.ThumbnailUrl)("description",(n==null?null:n.Variants.length)>1?(n==null?null:n.Variants.length)+" Variants":null)("channels",t.productService.getChannelProduct(n))("code",t.getVariantCode(n==null?null:n.Variants))("showCheckBox",(n==null?null:n.Channel.length)<t.channelOptions.length)("scanButton",!0)("uploadButton",n==null?null:n.hasUpload)("imageForZoom",n==null?null:n.ImageUrl)}}function Fe(o,r){o&1&&(b(0),a(1,"div",20),C(2,"app-empty-state"),l(),v())}function Oe(o,r){if(o&1){let n=P();b(0),a(1,"div",21)(2,"div",22)(3,"app-custom-paginator",23),f("next",function(){u(n);let e=p();return h(e.onNextPage())})("previous",function(){u(n);let e=p();return h(e.onPrevPage())}),l()()(),v()}if(o&2){let n=p();c(3),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",!0)}}var ge=(()=>{let r=class r{constructor(t,e,i,d,g){this.http=t,this.toastr=e,this.dialog=i,this.productService=d,this.authService=g,this.searchFilter=new q,this.products=[],this.rowCount=0,this.multipeScanChannels=[],this.getLoaderPage(),this.channelOptions=this.authService.getChannels(),this.initMultiScanChannels()}getLoaderPage(){this.productService.LoadInPOS().subscribe(t=>{this.Categories=t.Options.Categories,this.searchFilter.PageNumber=t.Filter.PageNumber,this.searchFilter.RowCount=t.Filter.RowCount,this.searchFilter.ChannelID=null,this.searchFilter.Category=t.Filter.Category,this.searchFilter.PageSize=100,this.getProducts()})}initMultiScanChannels(){this.multipeScanChannels=this.productService.filterChannelByTypeId(this.channelOptions,[Y.Tokopedia,Y.Tiktok])}getProducts(){let t={PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Category:this.searchFilter.Category,From:this.startDate,To:this.endDate};this.http.post("/api/product/GetInPOS",t).subscribe(e=>{this.products=e.Data,this.rowCount=e.Total==null?this.searchFilter.RowCount:e.Total.toString(),this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions)})}onOpenScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=_.GuidEMpty,this.dialog.open(O,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>_.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.Async=i.Async,this.scanAllProduct()})}scanAllProduct(){if(this.searchFilter.ChannelID==null){this.toastr.error("Please Select Channel","Error");return}this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(t=>{if(this.searchFilter.Async)this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"});else{this.getLoaderPage();let e=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.successToastrScanAllProduct(t,e,!this.searchFilter.UpdatedProduct)}})}onOpenDialogVariant(t){this.dialog.open(It,{data:{title:this.products[t].Name,variants:this.products[t].Variants},width:"800px"})}onUploadMultipleProduct(){let t=this.productService.selectedProduct(this.products),e=this.productService.filterUnselectedChannel(t,this.channelOptions);this.dialog.open(Q,{width:"700px",data:{title:"Upload Multiple Product",channels:e}}).afterClosed().pipe(y(i=>_.IsNotEmpty(i)),H(i=>this.productService.uploadMultipleProduct(t,i))).subscribe({next:i=>{this.getProducts()}})}onUploadToMultipleChannel(t){let e=this.productService.getChannelProduct(t);t.Channel=e;let i=this.productService.filterUnselectedChannel([t],this.channelOptions);this.dialog.open(Q,{width:"700px",data:{title:`Upload - ${t.Name}`,channels:i,product:t}}).afterClosed().pipe(y(d=>_.IsNotEmpty(d)),H(d=>this.productService.uploadSingleProduct([t],d))).subscribe({next:d=>{this.getProducts()}})}searchProduct(t){this.searchFilter.text=t,this.getProducts()}onNextPage(){this.getProducts()}onPrevPage(){this.getProducts()}onScanMultipleProduct(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=_.GuidEMpty;let e=this.productService.filterChannelByTypeId(this.channelOptions,[Y.Tokopedia,Y.Tiktok]);this.dialog.open(O,{data:{filter:t,channelOptions:e,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(d=>_.IsNotEmpty(d))).subscribe(d=>{this.searchFilter.ChannelID=d.ChannelID,this.searchFilter.ScanFull=d.ScanFull,this.searchFilter.UpdatedProduct=d.UpdatedProduct;let g=this.productService.selectedProduct(this.products),w=this.productService.getVariantCodesProducts(g);this.scanSingleProduct(w)})}onScanSingleProduct(t){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=_.GuidEMpty,this.dialog.open(O,{data:{filter:e,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(i=>_.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID;let d=this.productService.getVariantCodesProduct(t);this.scanSingleProduct(d)})}scanSingleProduct(t){this.productService.scanSingle(this.searchFilter.ChannelID,t).subscribe({next:e=>{if(e)this.toastr.success("Successfully Scan ","Success");else{let i=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.toastr.error(`This product is not existed in ${i?.Name} `,"Error")}this.searchFilter.ChannelID=_.GuidEMpty,e&&this.getProducts()},error:e=>{this.searchFilter.ChannelID=_.GuidEMpty}})}getVariantCode(t){let e;return t.length>1&&(e=(t[0].model?t[0].model:"")+t[0].Code),t.length==1&&(e=t[0].Code),e}};r.\u0275fac=function(e){return new(e||r)(x(A),x(G),x(J),x(B),x(L))},r.\u0275cmp=M({type:r,selectors:[["app-in-pos"]],decls:22,vars:13,consts:[["picker",""],["description","All products which is already available in POS",3,"onSubmit","headerTitle"],[4,"ngIf"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","Name","bindValue","Name","placeholder","Select Category",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],[1,"mt-5"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker"],["matStartDate","","placeholder","Start date",3,"ngModelChange","click","ngModel"],["matEndDate","","placeholder","End date",3,"ngModelChange","click","ngModel"],[1,"container-fluid"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],["type","button","data-cy","scanSoldinChannel","class","btn btn-outline-secondary shadow rounded",3,"click",4,"ngIf"],["type","button","data-cy","scanSoldinChannel",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"onUpload","onScan","onDescEvent","onCheckBoxChange","productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(e,i){if(e&1){let d=P();a(0,"mainpanel",1),f("onSubmit",function(w){return u(d),h(i.searchProduct(w))}),a(1,"actions"),S(2,we,2,1,"ng-container",2)(3,ye,4,1,"ng-container",2)(4,Me,4,1,"ng-container",2),l(),a(5,"filters")(6,"div")(7,"label",3),m(8,"Category"),l(),a(9,"ng-select",4),f("ngModelChange",function(w){return u(d),h(i.searchFilter.Category=w)}),l()(),a(10,"div",5)(11,"mat-date-range-input",6)(12,"input",7),E("ngModelChange",function(w){return u(d),T(i.startDate,w)||(i.startDate=w),h(w)}),f("click",function(){u(d);let w=j(15);return h(w.open())}),l(),a(13,"input",8),E("ngModelChange",function(w){return u(d),T(i.endDate,w)||(i.endDate=w),h(w)}),f("click",function(){u(d);let w=j(15);return h(w.open())}),l()(),C(14,"mat-date-range-picker",null,0),l()(),a(16,"content")(17,"div",9)(18,"div",10),S(19,Ne,2,10,"div",11)(20,Fe,3,0,"ng-container",2),l(),S(21,Oe,4,4,"ng-container",2),l()()()}if(e&2){let d=j(15);s("headerTitle","In POS ("+i.rowCount+")"),c(2),s("ngIf",!i.productService.hasSelection(i.products)),c(),s("ngIf",i.productService.hasSelection(i.products)&&i.multipeScanChannels.length>0),c(),s("ngIf",i.productService.hasSelection(i.products)),c(5),s("clearable",!0)("items",i.Categories)("ngModel",i.searchFilter.Category),c(2),s("rangePicker",d),c(),D("ngModel",i.startDate),c(),D("ngModel",i.endDate),c(6),s("ngForOf",i.products),c(),s("ngIf",i.products.length==0),c(),s("ngIf",i.products.length>0)}},dependencies:[V,U,ot,W,K,R,Z,z,X,$,le,re,ae,ce],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.img-logo[_ngcontent-%COMP%]{height:24px;width:24px}.dateRange[_ngcontent-%COMP%]{padding-top:.8rem;padding-bottom:.8rem}"]});let o=r;return o})();function De(o,r){if(o&1){let n=P();b(0),a(1,"button",10),f("click",function(){u(n);let e=p();return h(e.onOpenScanDialog())}),C(2,"i",11),m(3," Scan Channel "),l(),v()}}function Te(o,r){if(o&1){let n=P();b(0),a(1,"button",12),f("click",function(){u(n);let e=p();return h(e.onScanMultipleProduct())}),C(2,"i",11),m(3),l(),v()}if(o&2){let n=p();c(3),I(" Scan (",n.productService.selectedProduct(n.products).length,") ")}}function Ee(o,r){if(o&1){let n=P();b(0),a(1,"button",13),f("click",function(){u(n);let e=p();return h(e.onUploadMultipleProduct())}),C(2,"i",14),m(3),l(),v()}if(o&2){let n=p();c(3),I(" Upload (",n.productService.selectedProduct(n.products).length,") ")}}function ke(o,r){if(o&1&&(a(0,"span",15),C(1,"img",16),l(),m(2)),o&2){let n=r.item;c(),s("src",n.Img,N)("alt",n.Name),c(),I(" ",n.Name," ")}}function Ve(o,r){if(o&1){let n=P();a(0,"div",17)(1,"label",18),m(2,"Item ID"),l(),a(3,"input",19),E("ngModelChange",function(e){u(n);let i=p();return T(i.searchFilter.Item_id,e)||(i.searchFilter.Item_id=e),h(e)}),l()()}if(o&2){let n=p();c(3),D("ngModel",n.searchFilter.Item_id)}}function Ue(o,r){if(o&1){let n=P();a(0,"div",20)(1,"app-product-card",21),f("onUpload",function(){let e=u(n).$implicit,i=p();return h(i.onUploadToMultipleChannel(e))})("onDescEvent",function(){let e=u(n).index,i=p();return h(i.onOpenVariantDetail(e))})("onScan",function(){let e=u(n).$implicit,i=p();return h(i.onScanSingleProduct(e))})("onCheckBoxChange",function(e){let i=u(n).$implicit;return h(i.selected=e)}),l()()}if(o&2){let n=r.$implicit,t=p();c(),s("productId",n==null?null:n.ID)("title",n==null?null:n.Name)("image",n==null?null:n.ThumbnailUrl)("description",(n==null||n.Variants==null?null:n.Variants.length)>1?(n==null||n.Variants==null?null:n.Variants.length)+" Variants":null)("channels",t.productService.getChannelProduct(n))("code",t.getVariantCode(n==null?null:n.Variants))("showCheckBox",n==null?null:n.hasScan)("scanButton",!0)("uploadButton",n==null?null:n.hasUpload)("imageForZoom",n==null?null:n.ImageUrl)}}function Ae(o,r){o&1&&(b(0),a(1,"div",22),C(2,"app-empty-state"),l(),v())}function Le(o,r){if(o&1){let n=P();a(0,"div",23)(1,"div",24)(2,"app-custom-paginator",25),f("total",function(){u(n);let e=p();return h(e.getRowCount())})("next",function(){u(n);let e=p();return h(e.onNextPage())})("previous",function(){u(n);let e=p();return h(e.onPreviousPage())}),l()()()}if(o&2){let n=p();c(2),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}var _e=(()=>{let r=class r{constructor(t,e,i,d,g,w){this.http=t,this.dialog=e,this.toastr=i,this.productService=d,this.activateRouter=g,this.authService=w,this.searchFilter=new q,this.products=[],this.rowCount=0,this.hasClickRowCount=!1,this.guidEmpty=_.GuidEMpty,this.multipeScanChannels=[],this.channelOptions=this.authService.getChannels(),this.initMultiScanChannels()}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(_.GuidEMpty)})}initPageLoader(t){this.productService.loader(t).subscribe(e=>{this.searchFilter=e.Filter,e.Filter.ChannelID!=_.GuidEMpty&&(this.searchFilter.ListChannelID=[],this.searchFilter.ListChannelID.push(e.Filter.ChannelID)),this.searchFilter.PageSize=e.Filter.RowCount,this.searchFilter.Item_id="",this.getProducts()})}initMultiScanChannels(){this.multipeScanChannels=this.productService.filterChannelByTypeId(this.channelOptions,[Y.Tokopedia,Y.Tiktok])}getProducts(){let t={ListChannelID:this.searchFilter.ListChannelID,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Item_id:this.searchFilter.Item_id};this.productService.findAllSoldInChannel(t).subscribe(e=>{this.products=e.Data,this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions),this.products=this.productService.checkProductHasScanButton(this.products,this.channelOptions)})}searchProduct(t){this.searchFilter.text=t,this.hasClickRowCount=!1,this.getProducts()}onOpenVariantDetail(t){let e=this.products[t].Variants;this.dialog.open(It,{data:{variants:e,title:this.products[t].Name},width:"800px"})}onOpenScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=_.GuidEMpty,this.dialog.open(O,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>_.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.Async=i.Async,this.scanAllProduct()})}scanAllProduct(){let t=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).pipe(y(e=>e)).subscribe(e=>{this.searchFilter.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(e,t,!this.searchFilter.UpdatedProduct),this.initPageLoader(_.GuidEMpty))})}onScanSingleProduct(t){t.Channel=this.productService.getChannelProduct(t);let e=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(O,{data:{filter:e,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(i=>_.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID;let d=this.productService.getVariantCodesProduct(t);this.scanProducts(d)})}onUploadToMultipleChannel(t){let e=this.productService.getChannelProduct(t);t.Channel=e;let i=this.productService.filterUnselectedChannel([t],this.channelOptions);this.dialog.open(Q,{width:"700px",data:{title:`Upload - ${t.Name}`,channels:i,product:t}}).afterClosed().pipe(y(d=>_.IsNotEmpty(d)),H(d=>this.productService.uploadSingleProduct([t],d))).subscribe({next:d=>{this.getProducts()}})}onScanMultipleProduct(){this.searchFilter.ChannelID=_.GuidEMpty;let t=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(O,{data:{filter:t,channelOptions:this.multipeScanChannels,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(i=>_.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.UpdatedProduct=i.UpdatedProduct;let d=this.productService.selectedProduct(this.products),g=this.productService.getVariantCodesProducts(d);this.scanProducts(g)})}scanProducts(t){this.productService.scanSingle(this.searchFilter.ChannelID,t).subscribe({next:e=>{let i=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);e?this.toastr.success(`Product Successfully scan with ${i?.Name}`,"Success"):this.toastr.error(`This product is not existed in ${i?.Name} `,"Error"),this.searchFilter.ChannelID=_.GuidEMpty,e&&this.getProducts()},error:e=>{this.searchFilter.ChannelID=_.GuidEMpty}})}getVariantCode(t){let e;return t.length>1&&(e=(t[0].model?t[0].model:"")+t[0].Code),t.length==1&&(e=t[0].Code),e}onClearFilterChannel(){this.searchFilter.ChannelID=_.GuidEMpty,this.searchFilter.Item_id=""}onUploadMultipleProduct(){let t=this.productService.selectedProduct(this.products),e=this.productService.filterUnselectedChannel(t,this.channelOptions);this.dialog.open(Q,{width:"700px",data:{title:"Upload Multiple Product",channels:e}}).afterClosed().pipe(y(i=>_.IsNotEmpty(i)),H(i=>this.productService.uploadMultipleProduct(t,i))).subscribe({next:i=>{this.getProducts()}})}getRowCount(){let t={ListChannelID:this.searchFilter.ListChannelID,text:this.searchFilter.text};this.http.post("/api/product/GetSoldInChannelRowCount",t).subscribe(e=>{this.hasClickRowCount=!0,this.rowCount=e.Total})}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPreviousPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}};r.\u0275fac=function(e){return new(e||r)(x(A),x(J),x(G),x(B),x(xt),x(L))},r.\u0275cmp=M({type:r,selectors:[["app-sold-in-channel"]],decls:18,vars:12,consts:[["description","SKU has been mapped between dealpos and marketplace",3,"onSubmit","headerTitle"],[4,"ngIf"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clear","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],["class","mt-5",4,"ngIf"],[1,"container-fluid"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],["class","row",4,"ngIf"],["type","button","data-cy","scanSoldinChannel",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"mt-5"],[1,"fw-bold"],["type","text","name","Item_id","id","Item_id",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"onUpload","onDescEvent","onScan","onCheckBoxChange","productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(e,i){e&1&&(a(0,"mainpanel",0),f("onSubmit",function(g){return i.searchProduct(g)}),a(1,"actions"),S(2,De,4,0,"ng-container",1)(3,Te,4,1,"ng-container",1)(4,Ee,4,1,"ng-container",1),l(),a(5,"filters")(6,"div")(7,"label",2),m(8,"Channel"),l(),a(9,"ng-select",3),f("ngModelChange",function(g){return i.searchFilter.ListChannelID=g})("clear",function(){return i.onClearFilterChannel()}),S(10,ke,3,3,"ng-template",4),l()(),S(11,Ve,4,1,"div",5),l(),a(12,"content")(13,"div",6)(14,"div",7),S(15,Ue,2,10,"div",8)(16,Ae,3,0,"ng-container",1),l(),S(17,Le,3,4,"div",9),l()()()),e&2&&(s("headerTitle","Sold in Channel"),c(2),s("ngIf",!i.productService.hasSelection(i.products)),c(),s("ngIf",i.multipeScanChannels.length>0&&i.productService.hasSelection(i.products)),c(),s("ngIf",i.productService.hasSelection(i.products)),c(5),s("clearable",!0)("multiple",!0)("items",i.channelOptions)("ngModel",i.searchFilter.ListChannelID),c(2),s("ngIf",i.searchFilter.ListChannelID!=null),c(4),s("ngForOf",i.products),c(),s("ngIf",i.products.length==0),c(),s("ngIf",i.products==null?null:i.products.length))},dependencies:[V,U,ot,W,K,R,Z,rt,bt,z,X,$],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}"]});let o=r;return o})();var Ce=(()=>{let r=class r{get footerPageNumber(){return this._footerPageNumber}set footerPageNumber(t){this._footerPageNumber=t}get hideCount(){return this._hideCount}set hideCount(t){this._hideCount=t}get disableNextButton(){return this._disableNextButton}set disableNextButton(t){this._disableNextButton=t}get goToLastPage(){return this._goToLastPage}set goToLastPage(t){this._goToLastPage=t}constructor(t){this.http=t,this.pagination$=new Ft(null),this.destroy$=new gt,this.data$=this.paginationFunction()}onNextPage(t){t.PageNumber+=1,this.pagination$.next(t)}setPageNumberFooter(t){this.footerPageNumber=t.PageNumber}setPaginationButtonState(t,e){e==0?this.disableNextButton=!0:this.disableNextButton=!(e<t.RowCount*t.PageNumber)}reloadPagination(t){_.IsEmpty(t.PageNumber)&&(t.PageNumber=1),this.pagination$.next(t),this.hideCount=!0,this.goToLastPage=!1}getAllData(t,e){t.RowCount=e,this.pagination$.next(t),this.goToLastPage=!0}destroy(){this.destroy$.next(!0),this.destroy$.complete(),this.pagination$=null,this.pagination$=new Ft(null),this.data$=this.paginationFunction()}paginationFunction(){return this.pagination$.pipe(lt(this.destroy$),y(t=>t!=null),kt(t=>this.http.post(`/API/${this.fetchDataEndpoint}`,JSON.stringify(t)).pipe(at(e=>e.Data))),At(this.pagination$),Vt((t,e)=>{let[i,d]=t,[g]=e;return d.PageNumber==1?[g,d]:[i.concat(g),d]}),_t(([t,e])=>{this.setPageNumberFooter(e),this.setPaginationButtonState(e,t.length)}),at(([t])=>t),Ut())}};r.\u0275fac=function(e){return new(e||r)(Bt(A))},r.\u0275prov=Lt({token:r,factory:r.\u0275fac,providedIn:"root"});let o=r;return o})();function $e(o,r){if(o&1){let n=P();a(0,"button",13),f("click",function(){u(n);let e=p(2);return h(e.uploadMultipleProduct())}),C(1,"i",14),m(2),l()}if(o&2){let n=p(2);c(2),I(" upload (",n.selectedProducts==null?null:n.selectedProducts.length,") ")}}function je(o,r){if(o&1){let n=P();b(0),a(1,"td",29)(2,"input",30),E("ngModelChange",function(e){u(n);let i=p(2).$implicit;return T(i.selected,e)||(i.selected=e),h(e)}),f("ngModelChange",function(){u(n);let e=p(3).ngIf,i=p(3);return h(i.onSelectProduct(e))}),l()(),v()}if(o&2){let n=p(2).$implicit;c(),s("rowSpan",n==null?null:n.Variants.length),c(),D("ngModel",n.selected)}}function Ge(o,r){if(o&1){let n=P();b(0),a(1,"img",35),f("click",function(e){u(n);let i=p(3).$implicit,d=p(4);return h(d.onZoomImage(e,i==null?null:i.ImageUrl))}),l(),v()}if(o&2){let n=p(3).$implicit;c(),s("src",n==null?null:n.ImageUrl,N)}}function We(o,r){o&1&&C(0,"img",36)}function Ke(o,r){if(o&1&&(b(0),a(1,"td",29)(2,"div",31),S(3,Ge,2,1,"ng-container",11)(4,We,1,0,"ng-template",null,1,it),l()(),a(6,"td",32)(7,"h4",33)(8,"span",34),m(9),l()()(),v()),o&2){let n=j(5),t=p(2).$implicit;c(),s("rowSpan",t==null?null:t.Variants.length),c(2),s("ngIf",t==null?null:t.ImageUrl)("ngIfElse",n),c(3),s("rowSpan",t==null?null:t.Variants.length),c(2),s("matTooltip",(t==null||t.Name==null?null:t.Name.length)>50?t==null?null:t.Name:""),c(),I(" ",t==null?null:t.Name," ")}}function Je(o,r){if(o&1&&(a(0,"div")(1,"a",25),C(2,"img",37),l()()),o&2){let n=r.$implicit;c(),s("href",n.URL,N),c(),s("src",n.Img,N)("matTooltip",n.Name)}}function ze(o,r){if(o&1&&(a(0,"div"),C(1,"img",37),l()),o&2){let n=r.$implicit;c(),s("src",n.Img,N)("matTooltip",n.Name)}}function He(o,r){if(o&1&&(a(0,"tr"),S(1,je,3,2,"ng-container",12)(2,Ke,10,6,"ng-container",12),a(3,"td"),m(4),l(),a(5,"td")(6,"span"),m(7),l(),a(8,"span",24)(9,"a",25),C(10,"i",26),l()()(),a(11,"td",27)(12,"div",28),S(13,Je,3,3,"div",23),l()(),a(14,"td",27)(15,"div",28),S(16,ze,2,2,"div",23),l()()()),o&2){let n=r.$implicit,t=r.index,e=p(5);c(),s("ngIf",t==0),c(),s("ngIf",t==0),c(2),I(" ",n.Name," "),c(3),I(" ",n.Code," "),c(2),s("href",e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(n==null?null:n.ID),N),c(4),s("ngForOf",n==null?null:n.Available),c(3),s("ngForOf",n==null?null:n.NotAvailable)}}function Ye(o,r){if(o&1&&(b(0),S(1,He,17,7,"tr",23),v()),o&2){let n=r.$implicit;c(),s("ngForOf",n.Variants)}}function Ze(o,r){if(o&1&&(a(0,"tbody"),S(1,Ye,2,1,"ng-container",23),l()),o&2){let n=r.ngIf;c(),s("ngForOf",n)}}function qe(o,r){if(o&1&&(b(0),a(1,"div",15)(2,"table",16)(3,"thead",17)(4,"tr"),C(5,"th",18),a(6,"th",19),m(7,"Product"),l(),a(8,"th",20),m(9,"Variant"),l(),a(10,"th",20),m(11,"SKU"),l(),a(12,"th",21),m(13,"Available In"),l(),a(14,"th",22),m(15,"Not Available In"),l()()(),S(16,Ze,2,1,"tbody",12),F(17,"async"),l()(),v()),o&2){let n=p(2);c(16),s("ngIf",k(17,1,n.data$))}}function Qe(o,r){o&1&&(a(0,"div",38),C(1,"app-empty-state"),l())}function Xe(o,r){if(o&1){let n=P();a(0,"span",46),f("click",function(){u(n);let e=p(4);return h(e.getRowCount())}),a(1,"i",47),m(2,"?"),l()()}}function tn(o,r){if(o&1&&(a(0,"span"),m(1),F(2,"number"),l()),o&2){let n=r.ngIf;c(),Ct(k(2,1,n==null?null:n.Count))}}function en(o,r){if(o&1){let n=P();a(0,"a",48),f("click",function(){u(n);let e=p(4);return h(e.onNextPage())}),C(1,"i",49),m(2," Next"),l()}}function nn(o,r){if(o&1){let n=P();a(0,"a",50),f("click",function(){u(n);let e=p(4);return h(e.onLastPage())}),C(1,"i",51),m(2," Last"),l()}}function on(o,r){if(o&1&&(b(0),a(1,"div",39)(2,"div",40)(3,"div",41),m(4),F(5,"number"),S(6,Xe,3,0,"span",42)(7,tn,3,3,"span",12),F(8,"async"),m(9),l()(),a(10,"div",43),S(11,en,3,0,"a",44)(12,nn,3,0,"a",45),l()(),v()),o&2){let n=p().ngIf,t=p(2);c(4),I(" Showing 1 - ",k(5,6,n==null?null:n.length)," of "),c(2),s("ngIf",t.paginationService.hideCount),c(),s("ngIf",!t.paginationService.hideCount&&k(8,8,t.rowCount$)),c(2),I(" records ~ ",t.paginationService.footerPageNumber," Page "),c(2),s("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage),c(),s("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage)}}function rn(o,r){if(o&1&&(b(0),S(1,on,13,10,"ng-container",12),v()),o&2){let n=r.ngIf;c(),s("ngIf",(n==null?null:n.length)>0)}}function an(o,r){if(o&1){let n=P();a(0,"mainpanel",3),f("onSubmit",function(e){u(n);let i=p();return h(i.searchProduct(e))}),a(1,"actions"),S(2,$e,3,1,"button",4),a(3,"button",5),f("click",function(){u(n);let e=p();return h(e.openScanDialog())}),C(4,"i",6),m(5," Scan Channel "),l(),a(6,"button",7),f("click",function(){u(n);let e=p();return h(e.openExportDialog())}),C(7,"i",8),a(8,"span"),m(9,"Export"),l()()(),a(10,"content")(11,"div",9)(12,"div",10),S(13,qe,18,3,"ng-container",11),F(14,"async"),S(15,Qe,2,0,"ng-template",null,0,it),l(),S(17,rn,2,1,"ng-container",12),F(18,"async"),l()()()}if(o&2){let n,t=j(16),e=p();s("hideSearchDropdown",!0),c(2),s("ngIf",e.hasSelectionProduct),c(11),s("ngIf",((n=k(14,5,e.data$))==null?null:n.length)>0)("ngIfElse",t),c(4),s("ngIf",k(18,7,e.data$))}}var fe=(()=>{let r=class r{constructor(t,e,i,d,g,w,Et){this.http=t,this.dialog=e,this.toastr=i,this.productService=d,this.paginationService=g,this.biggerPictureService=w,this.authService=Et,this.loaderAPI="product/Load",this.rowCountAPI="product/GetNotInChannelRowCount",this.notChannelAPI="product/GetNotInChannelV2",this.hasSelectionProduct=!1,this.selectedProducts=[],this.channelOptions=Et.getChannels(),this.hostName=this.authService.getDomain()}ngOnInit(){this.initPageLoader(),this.iniData()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.notChannelAPI,this.loader$=this.http.post(`api/${this.loaderAPI}`,{}).pipe(_t(t=>{this.filterSearch=t.Filter,this.paginationService.reloadPagination(t.Filter)}))}iniData(){this.data$=this.paginationService.data$.pipe(at(t=>(t=t.map(e=>(e.Variants=e.Variants.map(i=>(i.Available=this.productService.sortChannel(i.Available),i.NotAvailable=this.productService.sortChannel(i.NotAvailable),i.Available=this.assignLogoChannel(i.Available),i.NotAvailable=this.assignLogoChannel(i.NotAvailable),i)),e)),t)))}assignLogoChannel(t){return t=t.map(e=>(e.Img=_.getChannelLogoByTypeId(e.TypeID),e)),t}searchProduct(t){this.filterSearch.text=t,this.paginationService.reloadPagination(this.filterSearch)}scanAllProduct(){let t=this.productService.findChannelById(this.filterSearch.ChannelID,this.channelOptions);this.productService.scanAll(this.filterSearch.ChannelID,this.filterSearch.ScanFull,this.filterSearch.UpdatedProduct,this.filterSearch.Async).subscribe(e=>{this.filterSearch.Async?this.toastr.success("You will be notified when the scan is completed.","Scan Asynchronous"):(this.productService.successToastrScanAllProduct(e,t,!this.filterSearch.UpdatedProduct),this.initPageLoader())})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.filterSearch));t.ChannelID=_.GuidEMpty,this.dialog.open(O,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>_.IsNotEmpty(i))).subscribe(i=>{this.filterSearch.ChannelID=i.ChannelID,this.filterSearch.ScanFull=i.ScanFull,this.filterSearch.UpdatedProduct=i.UpdatedProduct,this.filterSearch.Async=i.Async,this.scanAllProduct()})}getRowCount(){this.paginationService.hideCount=!1,this.rowCount$=this.http.post(`/api/${this.rowCountAPI}`,this.filterSearch)}onNextPage(){this.paginationService.onNextPage(this.filterSearch)}onLastPage(){this.http.post(`/api/${this.rowCountAPI}`,{}).subscribe({next:t=>{this.filterSearch.PageNumber=1,this.paginationService.getAllData(this.filterSearch,t.Count)}})}onZoomImage(t,e){this.biggerPictureService.openBiggerPicture(t,e)}onSelectProduct(t){this.hasSelectionProduct=this.productService.hasSelection(t),this.selectedProducts=this.productService.selectedProduct(t)}uploadMultipleProduct(){let t=this.getUniqueChannels();t=t.map(e=>(e.ID=e.ChannelID,e)),this.dialog.open(Q,{width:"700px",data:{title:"Upload Multiple Product",channels:t}}).afterClosed().pipe(y(e=>_.IsNotEmpty(e)),H(e=>{let i=this.getSelectedProductIds();return this.productService.uploadNotInChannel(i,e)})).subscribe({next:()=>{this.paginationService.reloadPagination(this.filterSearch),this.selectedProducts=[],this.hasSelectionProduct=!1},error:e=>{this.selectedProducts=[],this.hasSelectionProduct=!1}})}getSelectedProductIds(){return this.selectedProducts.map(e=>({ID:e.ProductID}))}getUniqueChannels(){let t=[];return this.selectedProducts.forEach(e=>{t=[...t,...e.Variants[0].NotAvailable]}),t=t.filter((e,i,d)=>d.findIndex(g=>g.ChannelID==e.ChannelID)==i),t}ngOnDestroy(){this.paginationService.destroy()}openExportDialog(){this.dialog.open(pe,{data:{title:"Export Not In Channel",pageNumber:this.filterSearch.PageNumber,rowCount:this.filterSearch.RowCount,filterExport:this.filterSearch,getRowCountApi:"product/GetNotInChannelRowCount",exportApi:"product/GetNotInChannelExport"}}).afterClosed().subscribe()}};r.\u0275fac=function(e){return new(e||r)(x(A),x(J),x(G),x(B),x(Ce),x(oe),x(L))},r.\u0275cmp=M({type:r,selectors:[["app-not-in-channel"]],decls:2,vars:3,consts:[["EMPTY",""],["elsePic",""],["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"hideSearchDropdown","onSubmit",4,"ngIf"],["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"onSubmit","hideSearchDropdown"],["class","btn btn-light shadow rounded ms-2",3,"click",4,"ngIf"],["data-cy","scanNotinChannel","type","button",1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"container-fluid","mt-3"],[1,"row"],[4,"ngIf","ngIfElse"],[4,"ngIf"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"col-md-12"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[2,"width","10px"],["colspan","2",1,"ms-5","text-center",2,"width","450px"],[2,"width","150px"],[2,"width","20%"],[2,"width","16%"],[4,"ngFor","ngForOf"],[1,"ms-1"],["target","_blank",3,"href"],[1,"fas","fa-lg","fa-external-link-alt","external-link-custom"],[2,"padding-left","0px"],[1,"d-flex","flex-wrap","mb-1"],[1,"text-center",3,"rowSpan"],["type","checkbox",3,"ngModelChange","ngModel"],[2,"padding-right","0px"],[1,"text-start",3,"rowSpan"],[1,"ms-5","fw-normal","text-ellipsis",2,"max-width","26vw !important"],[3,"matTooltip"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded",2,"max-width","40px"],["alt","",1,"channel-logo","cursor-pointer","ms-4","mt-3",3,"src","matTooltip"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load all products",3,"click",4,"ngIf"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(e,i){e&1&&(S(0,an,19,9,"mainpanel",2),F(1,"async")),e&2&&s("ngIf",k(1,1,i.loader$))},dependencies:[V,U,zt,W,K,R,vt,$,ft,St],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}thead[_ngcontent-%COMP%]{position:sticky;top:0}.channel-logo[_ngcontent-%COMP%]{width:20px}.w-img[_ngcontent-%COMP%]{width:100%}"]});let o=r;return o})();var ln=o=>[o],cn=()=>[];function sn(o,r){if(o&1){let n=P();a(0,"button",15),f("click",function(){u(n);let e=p();return h(e.openScanDialog())}),C(1,"i",16),m(2," Scan Channel "),l()}}function pn(o,r){if(o&1){let n=P();b(0),a(1,"button",17),f("click",function(){u(n);let e=p();return h(e.onDownloadAllProduct("SELECTED"))}),C(2,"i",18),m(3),l(),v()}if(o&2){let n,t=p();c(3),I(" Download (",(n=t.productService.selectedProduct(t.products))==null?null:n.length,") ")}}function dn(o,r){if(o&1&&(a(0,"span",19),C(1,"img",20),l(),m(2)),o&2){let n=r.item;c(),s("src",n.Img,N)("alt",n.Name),c(),I(" ",n.Name," ")}}function mn(o,r){if(o&1){let n=P();a(0,"div",21)(1,"app-product-card",22),f("onCheckBoxChange",function(e){let i=u(n).index,d=p();return h(d.onSelectProduct(e,i))})("onDescEvent",function(){let e=u(n).index,i=p();return h(i.onShowVariantDetail(e))})("onDownload",function(){let e=u(n).$implicit,i=p();return h(i.onDownloadProduct(e))})("onScan",function(){let e=u(n).$implicit,i=p();return h(i.onScanChannel(e))}),l()()}if(o&2){let n=r.$implicit;c(),s("showRedirectIcon",!1)("title",n==null?null:n.Name)("image",n==null?null:n.Image)("imageForZoom",n==null?null:n.Image)("code",n==null?null:n.SKU)("description",(n==null||n.Variant==null?null:n.Variant.length)>0?(n==null||n.Variant==null?null:n.Variant.length)+" Variants":null)("downloadButton",!0)("channels",n!=null&&n.Channel?ct(10,ln,n==null?null:n.Channel):et(12,cn))("showCheckBox",!0)("scanButton",!0)}}function un(o,r){o&1&&(b(0),a(1,"div",23),C(2,"app-empty-state"),l(),v())}function hn(o,r){if(o&1){let n=P();a(0,"div",24)(1,"div",25)(2,"app-custom-paginator",26),f("total",function(){u(n);let e=p();return h(e.getRowCount())})("next",function(){u(n);let e=p();return h(e.onNextPage())})("previous",function(){u(n);let e=p();return h(e.onPreviousPage())}),l()()()}if(o&2){let n=p();c(2),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}var Se=(()=>{let r=class r{constructor(t,e,i,d,g,w){this.http=t,this.dialog=e,this.productService=i,this.toastrService=d,this.activateRouter=g,this.authService=w,this.searchFilter=new q,this.products=[],this.hasClickRowCount=!1,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(_.GuidEMpty)})}initPageLoader(t){this.productService.loader(t).subscribe(e=>{this.searchFilter=e.Filter,this.searchFilter.PageSize=e.Filter.RowCount,this.getProducts()})}getProducts(){this.http.post("/api/product/GetProductChannelNotPOS",this.searchFilter).subscribe(t=>{this.products=t.Data,this.mapChannelToProduct(),this.setSkuProduct()})}mapChannelToProduct(){let t;this.products=this.products.map(e=>(t=this.channelOptions.find(i=>i.ID==e.ChannelID),t?e.Channel=JSON.parse(JSON.stringify(t)):e.Channel=null,e)).map(e=>(e.Channel&&(e.Channel.Url=e.Url),e))}setSkuProduct(){this.products=this.products.map(t=>(t?.Variant?.length==0?_.IsNotEmpty(t?.ChannelItemSKU)?t.SKU=t?.ChannelItemSKU:t.SKU="SKU not assigned":t.SKU=t?.Variant[0]?.ChannelVariationSKU?t?.Variant[0]?.ChannelVariationSKU:"SKU not assigned",t))}onSearch(t){this.searchFilter.text=t,this.hasClickRowCount=!1,this.getProducts()}onClearChannelFilter(){this.searchFilter.ChannelID=_.GuidEMpty}onScanAll(){let t=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(e=>{this.searchFilter.Async?this.toastrService.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.initPageLoader(_.GuidEMpty),this.productService.successToastrScanAllProduct(e,t,!this.searchFilter.UpdatedProduct)),this.searchFilter.ChannelID=_.GuidEMpty})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=_.GuidEMpty,this.dialog.open(O,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>_.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.Async=i.Async,this.onScanAll()})}onDownloadAllProduct(t){let e;t=="ALL"?e=this.products:e=this.productService.selectedProduct(this.products),e.length>0&&this.productService.downloadMultipleProduct(e).subscribe({next:()=>{this.getProducts()}})}onSelectProduct(t,e){this.products[e].selected=t}onDownloadProduct(t){confirm(`Are you sure you want to Retrieve product ${t?.Name} from ${t?.Channel.Name} to POS?`)&&this.productService.downloadProduct(t).subscribe({next:()=>{this.getProducts()}})}onScanChannel(t){let e=JSON.parse(JSON.stringify(t));delete e.Channel,this.productService.scanCompareToPos([e]).subscribe(i=>{i.Status?(this.initPageLoader(_.GuidEMpty),this.toastrService.success(`product ${t.Name} have been successfully scanned and synchronized with POS`,"Success")):this.toastrService.error(`Product ${t.Name} is not existed in POS`,"Error")})}onShowVariantDetail(t){let e=this.products[t].Variant;e.length>0&&this.dialog.open(de,{data:{title:this.products[t].Name,variants:e},width:"30%"})}getRowCount(){let t={ChannelID:this.searchFilter.ChannelID,text:this.searchFilter.text,HaveSku:parseInt(this.searchFilter.HaveSku)};this.http.post("/api/product/GetProductChannelNotPOSRowCount",t).subscribe(e=>{this.hasClickRowCount=!0,this.rowCount=e.Count})}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPreviousPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}};r.\u0275fac=function(e){return new(e||r)(x(A),x(J),x(B),x(G),x(xt),x(L))},r.\u0275cmp=M({type:r,selectors:[["app-not-in-pos"]],decls:30,vars:13,consts:[["headerTitle","Not in POS","textButton","Search","description","SKU sold in Marketplace but not exist in DEALPOS",3,"onSubmit"],["type","button","data-cy","scanNotInPos","class","btn btn-outline-secondary shadow rounded",3,"click",4,"ngIf"],[4,"ngIf"],[1,"fw-bold","mb-2"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp",""],[1,"mt-5"],[1,"fw-bold"],["name","haveSKU",1,"form-control","h-100","pt-3","rounded","mt-2",3,"ngModelChange","ngModel"],[1,"me-5",3,"value"],["type","text","name","Item_id","id","Item_id","placeholder","item id",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],["class","row",4,"ngIf"],["type","button","data-cy","scanNotInPos",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button",1,"btn","btn-success","shadow-sm","rounded","ms-3",3,"click"],[1,"fa","fa-download"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"onCheckBoxChange","onDescEvent","onDownload","onScan","showRedirectIcon","title","image","imageForZoom","code","description","downloadButton","channels","showCheckBox","scanButton"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(e,i){e&1&&(a(0,"mainpanel",0),f("onSubmit",function(g){return i.onSearch(g)}),a(1,"actions"),S(2,sn,3,0,"button",1)(3,pn,4,1,"ng-container",2),l(),a(4,"filters")(5,"div")(6,"label",3),m(7,"Channel"),l(),a(8,"ng-select",4),E("ngModelChange",function(g){return T(i.searchFilter.ChannelID,g)||(i.searchFilter.ChannelID=g),g}),S(9,dn,3,3,"ng-template",5),l()(),a(10,"div",6)(11,"label",7),m(12,"SKU Assigned"),l(),a(13,"mat-radio-group",8),E("ngModelChange",function(g){return T(i.searchFilter.HaveSku,g)||(i.searchFilter.HaveSku=g),g}),a(14,"mat-radio-button",9),m(15," All "),l(),a(16,"mat-radio-button",9),m(17," Yes "),l(),a(18,"mat-radio-button",9),m(19," No "),l()()(),a(20,"div",6)(21,"label",7),m(22,"Item ID"),l(),a(23,"input",10),E("ngModelChange",function(g){return T(i.searchFilter.Item_id,g)||(i.searchFilter.Item_id=g),g}),l()()(),a(24,"content")(25,"div",11)(26,"div",12),S(27,mn,2,13,"div",13)(28,un,3,0,"ng-container",2),l(),S(29,hn,3,4,"div",14),l()()()),e&2&&(c(2),s("ngIf",!i.productService.hasSelection(i.products)),c(),s("ngIf",i.productService.hasSelection(i.products)),c(5),s("clearable",!0)("items",i.channelOptions),D("ngModel",i.searchFilter.ChannelID),c(5),D("ngModel",i.searchFilter.HaveSku),c(),s("value",0),c(2),s("value",1),c(2),s("value",2),c(5),D("ngModel",i.searchFilter.Item_id),c(4),s("ngForOf",i.products),c(),s("ngIf",i.products.length==0),c(),s("ngIf",(i.products==null?null:i.products.length)>0))},dependencies:[V,U,ot,W,K,R,Z,rt,ee,ne,z,X,$],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.itemTitle[_ngcontent-%COMP%]{cursor:pointer}"]});let o=r;return o})();function gn(o,r){if(o&1&&(a(0,"span",9),C(1,"img",10),l(),m(2)),o&2){let n=r.item,t=p();c(),s("src",t.getChannelLogo(n.TypeID),N),c(),I(" ",n.Name," ")}}function _n(o,r){if(o&1&&(a(0,"div",11),C(1,"app-duplicate-product-card",12),l()),o&2){let n=r.$implicit,t=r.index;c(),s("imageForZoom",n.ImageUrl)("title",n.Name)("code",n.Code)("id",t)("image",n.ThumbnailURL)("channels",n.Channels)}}function Cn(o,r){o&1&&(b(0),a(1,"div",13),C(2,"app-empty-state"),l(),v())}function fn(o,r){if(o&1){let n=P();b(0),a(1,"div",14)(2,"div",15)(3,"app-custom-paginator",16),f("next",function(){u(n);let e=p();return h(e.onNextPage())})("previous",function(){u(n);let e=p();return h(e.onPrevPage())})("total",function(){u(n);let e=p();return h(e.getRowCount())}),l()()(),v()}if(o&2){let n=p();c(3),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickedRowCount)}}var xe=(()=>{let r=class r{constructor(t,e,i){this.httpService=t,this.productService=e,this.authService=i,this.searchFilter=new q,this.products=[],this.hasClickedRowCount=!1,this.getPageLoader(),this.channelOptions=i.getChannels()}getPageLoader(){this.productService.loader().subscribe(t=>{this.searchFilter=t.Filter,this.searchFilter.PageSize=t.Filter.RowCount,this.getProducts()})}getProducts(){let t={ListChannelID:this.searchFilter.ListChannelID,RowCount:this.searchFilter.RowCount,PageNumber:this.searchFilter.PageNumber,text:this.searchFilter.text};this.httpService.post("/api/product/GetDuplicateInChannel",t).subscribe(e=>{this.products=e.Data})}onSearch(t){this.searchFilter.text=t,this.hasClickedRowCount=!1,this.getProducts()}onClearFilter(){this.searchFilter.ChannelID=_.GuidEMpty}getChannelLogo(t){return _.getChannelLogoByTypeId(t)}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPrevPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getRowCount(){let t={text:this.searchFilter.text,ChannelID:this.searchFilter.ChannelID};this.httpService.post("/api/product/GetDuplicateInChannelRowCount",t).subscribe(e=>{this.hasClickedRowCount=!0,this.rowCount=e.Total})}};r.\u0275fac=function(e){return new(e||r)(x(A),x(B),x(L))},r.\u0275cmp=M({type:r,selectors:[["app-duplicate-sku"]],decls:14,vars:7,consts:[["headerTitle","Multiple Listing","textButton"," Search","description","SKU(s) which is listed more than one time (one to many)",3,"onSubmit"],["container",""],[1,"mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clear","multiple","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"container-fluid"],[1,"row","mt-8","mx-1"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],[4,"ngIf"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"imageForZoom","title","code","id","image","channels"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"next","previous","total","filter","totaldata","paginationTotal","hasClicked"]],template:function(e,i){e&1&&(a(0,"mainpanel",0),f("onSubmit",function(g){return i.onSearch(g)}),a(1,"filters")(2,"div",1)(3,"div")(4,"h6",2),m(5,"Channel"),l(),a(6,"ng-select",3),E("ngModelChange",function(g){return T(i.searchFilter.ListChannelID,g)||(i.searchFilter.ListChannelID=g),g}),f("clear",function(){return i.onClearFilter()}),S(7,gn,3,2,"ng-template",4),l()()()(),a(8,"content")(9,"div",5)(10,"div",6),S(11,_n,2,6,"div",7)(12,Cn,3,0,"ng-container",8),l(),S(13,fn,4,4,"ng-container",8),l()()()),e&2&&(c(6),s("multiple",!0)("clearable",!0)("items",i.channelOptions),D("ngModel",i.searchFilter.ListChannelID),c(5),s("ngForOf",i.products),c(),s("ngIf",(i.products==null?null:i.products.length)==0),c(),s("ngIf",(i.products==null?null:i.products.length)>0))},dependencies:[V,U,W,K,R,Z,rt,bt,wt,z,$]});let o=r;return o})();var Sn=()=>["/menu/products/status/sold-in-channel"],Pe=o=>({ID:o}),xn=()=>["/menu/products/status/not-in-pos"];function Pn(o,r){if(o&1&&(b(0),m(1),v()),o&2){let n=p().$implicit;c(),I(" ",n.Count," ")}}function bn(o,r){if(o&1){let n=P();a(0,"span",26),f("click",function(){u(n);let e=p().$implicit,i=p(2);return h(i.getLiveProductCount(e.ID,e))}),C(1,"i",27),l()}}function vn(o,r){if(o&1){let n=P();a(0,"tr")(1,"td"),C(2,"img",17),a(3,"span",18),m(4),l()(),a(5,"td",19),S(6,Pn,2,1,"ng-container",6)(7,bn,2,0,"ng-template",null,1,it),l(),a(9,"td",19)(10,"a",20),m(11),F(12,"number"),l()(),a(13,"td",19)(14,"a",20),m(15),F(16,"number"),l()(),a(17,"td"),m(18),F(19,"date"),l(),a(20,"td")(21,"div",21)(22,"button",22),f("click",function(){let e=u(n).$implicit,i=p(2);return h(i.onScanChannel(e))}),C(23,"i",23),m(24," Scan "),l(),a(25,"button",24),f("click",function(){let e=u(n).$implicit,i=p(2);return h(i.onClearCache(e.ID))}),C(26,"i",25),m(27," Clear "),l()()()()}if(o&2){let n=r.$implicit,t=j(8),e=p(2);c(2),s("src",e.getChannelLogo(n.TypeID),N),c(2),Ct(n.Name),c(2),s("ngIf",n.Count!==void 0)("ngIfElse",t),c(4),s("routerLink",et(18,Sn))("queryParams",ct(19,Pe,n.ID)),c(),I(" ",k(12,11,n.SoldInChannel)," "),c(3),s("routerLink",et(21,xn))("queryParams",ct(22,Pe,n.ID)),c(),I(" ",k(16,13,n.NotInPOS)," "),c(3),I("",n.LastSync?jt(19,15,n.LastSync,"dd MMM yyyy HH:mm"):"Never"," ")}}function In(o,r){if(o&1&&(b(0),a(1,"div",7)(2,"table",8)(3,"thead",9)(4,"tr",10)(5,"th"),m(6,"Channel"),l(),a(7,"th",11),m(8,"Live Product"),l(),a(9,"th",12),m(10,"Sold In Channel"),l(),a(11,"th",13),m(12,"Product Not in POS"),l(),a(13,"th",14),m(14,"Last Sync"),l(),C(15,"th",15),l()(),a(16,"tbody"),S(17,vn,28,24,"tr",16),F(18,"async"),l()()(),v()),o&2){let n,t=p();c(17),s("ngForOf",(n=k(18,1,t.channels$))==null?null:n.Data)}}function wn(o,r){o&1&&(a(0,"div",28),C(1,"app-empty-state"),l())}var be=(()=>{let r=class r{constructor(t,e,i,d){this.productService=t,this.toastr=e,this.dialog=i,this.authService=d,this.destroy$=new gt,this.channelOptions=d.getChannels()}ngOnInit(){this.setObsProductStatistic()}setObsProductStatistic(){this.channels$=this.productService.getProductStatistic()}getLiveProductCount(t,e){this.productService.getTotalProductLive(t).pipe(lt(this.destroy$)).subscribe(i=>{e.Count=i.Count})}onScanChannel(t){this.dialog.open(O,{width:"700px",data:{channelOptions:this.channelOptions,filter:{ChannelID:t.ID},disabledChannelOption:!0}}).afterClosed().pipe(y(e=>_.IsNotEmpty(e))).subscribe(e=>{this.scanAllProduct(t.ID,e)})}scanAllProduct(t,e){let i=this.productService.findChannelById(t,this.channelOptions);this.productService.scanAll(e.ChannelID,e.ScanFull,e.UpdatedProduct,e.Async).pipe(y(d=>d)).subscribe(d=>{e.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(d,i,!e.UpdatedProduct),this.setObsProductStatistic())})}onClearCache(t){confirm("Are you sure you want to Clear Cache? This Process will remove your product integration to marketplace")&&this.productService.clearCacheChannel(t).pipe(lt(this.destroy$)).subscribe(i=>{this.toastr.success("Successfully cleared cache","Success"),this.setObsProductStatistic()})}getChannelLogo(t){return _.getChannelLogoByTypeId(t)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};r.\u0275fac=function(e){return new(e||r)(x(B),x(G),x(J),x(L))},r.\u0275cmp=M({type:r,selectors:[["app-channel-statistic"]],decls:9,vars:6,consts:[["EMPTY",""],["QUESTION",""],["headerTitle","Products Statistic",3,"hideSearchBox","hideSearchDropdown"],[1,"container-fluid"],[1,"row","mt-4"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[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"],[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"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(e,i){if(e&1&&(a(0,"mainpanel",2)(1,"content")(2,"div",3)(3,"div",4)(4,"div",5),S(5,In,19,3,"ng-container",6),F(6,"async"),S(7,wn,2,0,"ng-template",null,0,it),l()()()()()),e&2){let d,g=j(8);s("hideSearchBox",!0)("hideSearchDropdown",!0),c(5),s("ngIf",((d=k(6,4,i.channels$))==null||d.Data==null?null:d.Data.length)>0)("ngIfElse",g)}},dependencies:[V,U,R,vt,Pt,$,ft,St,Gt]});let o=r;return o})();var yn=[{component:ue,path:"",children:[{path:"",redirectTo:"sold-in-channel",pathMatch:"full"},{path:"in-pos",component:ge,canActivate:[nt],data:{title:"Products in POS"}},{path:"sold-in-channel",component:_e,canActivate:[nt],data:{title:"Products Sold in Channel"}},{path:"not-in-channel",component:fe,canActivate:[nt],data:{title:"Products not in Channel"}},{path:"not-in-pos",component:Se,canActivate:[nt],data:{title:"Products not in POS"}},{path:"duplicate-sku",component:xe,canActivate:[nt],data:{title:"Duplicate Sku in Channel"}},{path:"channel-statistic",component:be,canActivate:[nt],data:{title:"Channel Statistic"}}]}],Bi=(()=>{let r=class r{};r.\u0275fac=function(e){return new(e||r)},r.\u0275mod=$t({type:r}),r.\u0275inj=Rt({imports:[Wt,Ht,Qt,qt,Yt,me,ie,te,wt,z,X,Jt.forChild(yn),se,Zt]});let o=r;return o})();export{Bi as StatusModule};
@@ -1,2 +0,0 @@
1
- var ie=globalThis;function Q(t){return(ie.__Zone_symbol_prefix||"__zone_symbol__")+t}function ft(){let t=ie.performance;function r(L){t&&t.mark&&t.mark(L)}function i(L,_){t&&t.measure&&t.measure(L,_)}r("Zone");let n=(()=>{let _=class _{static assertZonePatched(){if(ie.Promise!==O.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let e=_.current;for(;e.parent;)e=e.parent;return e}static get current(){return v.zone}static get currentTask(){return S}static __load_patch(e,h,D=!1){if(O.hasOwnProperty(e)){let j=ie[Q("forceDuplicateZoneCheck")]===!0;if(!D&&j)throw Error("Already loaded patch: "+e)}else if(!ie["__Zone_disable_"+e]){let j="Zone:"+e;r(j),O[e]=h(ie,_,w),i(j,j)}}get parent(){return this._parent}get name(){return this._name}constructor(e,h){this._parent=e,this._name=h?h.name||"unnamed":"<root>",this._properties=h&&h.properties||{},this._zoneDelegate=new u(this,this._parent&&this._parent._zoneDelegate,h)}get(e){let h=this.getZoneWith(e);if(h)return h._properties[e]}getZoneWith(e){let h=this;for(;h;){if(h._properties.hasOwnProperty(e))return h;h=h._parent}return null}fork(e){if(!e)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,e)}wrap(e,h){if(typeof e!="function")throw new Error("Expecting function got: "+e);let D=this._zoneDelegate.intercept(this,e,h),j=this;return function(){return j.runGuarded(D,this,arguments,h)}}run(e,h,D,j){v={parent:v,zone:this};try{return this._zoneDelegate.invoke(this,e,h,D,j)}finally{v=v.parent}}runGuarded(e,h=null,D,j){v={parent:v,zone:this};try{try{return this._zoneDelegate.invoke(this,e,h,D,j)}catch(N){if(this._zoneDelegate.handleError(this,N))throw N}}finally{v=v.parent}}runTask(e,h,D){if(e.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(e.zone||te).name+"; Execution: "+this.name+")");if(e.state===Y&&(e.type===W||e.type===y))return;let j=e.state!=B;j&&e._transitionTo(B,d),e.runCount++;let N=S;S=e,v={parent:v,zone:this};try{e.type==y&&e.data&&!e.data.isPeriodic&&(e.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,e,h,D)}catch(he){if(this._zoneDelegate.handleError(this,he))throw he}}finally{e.state!==Y&&e.state!==$&&(e.type==W||e.data&&e.data.isPeriodic?j&&e._transitionTo(d,B):(e.runCount=0,this._updateTaskCount(e,-1),j&&e._transitionTo(Y,B,Y))),v=v.parent,S=N}}scheduleTask(e){if(e.zone&&e.zone!==this){let D=this;for(;D;){if(D===e.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${e.zone.name}`);D=D.parent}}e._transitionTo(b,Y);let h=[];e._zoneDelegates=h,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(D){throw e._transitionTo($,b,Y),this._zoneDelegate.handleError(this,D),D}return e._zoneDelegates===h&&this._updateTaskCount(e,1),e.state==b&&e._transitionTo(d,b),e}scheduleMicroTask(e,h,D,j){return this.scheduleTask(new E(U,e,h,D,j,void 0))}scheduleMacroTask(e,h,D,j,N){return this.scheduleTask(new E(y,e,h,D,j,N))}scheduleEventTask(e,h,D,j,N){return this.scheduleTask(new E(W,e,h,D,j,N))}cancelTask(e){if(e.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(e.zone||te).name+"; Execution: "+this.name+")");if(!(e.state!==d&&e.state!==B)){e._transitionTo(z,d,B);try{this._zoneDelegate.cancelTask(this,e)}catch(h){throw e._transitionTo($,z),this._zoneDelegate.handleError(this,h),h}return this._updateTaskCount(e,-1),e._transitionTo(Y,z),e.runCount=0,e}}_updateTaskCount(e,h){let D=e._zoneDelegates;h==-1&&(e._zoneDelegates=null);for(let j=0;j<D.length;j++)D[j]._updateTaskCount(e.type,h)}};_.__symbol__=Q;let L=_;return L})(),s={name:"",onHasTask:(L,_,c,e)=>L.hasTask(c,e),onScheduleTask:(L,_,c,e)=>L.scheduleTask(c,e),onInvokeTask:(L,_,c,e,h,D)=>L.invokeTask(c,e,h,D),onCancelTask:(L,_,c,e)=>L.cancelTask(c,e)};class u{get zone(){return this._zone}constructor(_,c,e){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this._zone=_,this._parentDelegate=c,this._forkZS=e&&(e&&e.onFork?e:c._forkZS),this._forkDlgt=e&&(e.onFork?c:c._forkDlgt),this._forkCurrZone=e&&(e.onFork?this._zone:c._forkCurrZone),this._interceptZS=e&&(e.onIntercept?e:c._interceptZS),this._interceptDlgt=e&&(e.onIntercept?c:c._interceptDlgt),this._interceptCurrZone=e&&(e.onIntercept?this._zone:c._interceptCurrZone),this._invokeZS=e&&(e.onInvoke?e:c._invokeZS),this._invokeDlgt=e&&(e.onInvoke?c:c._invokeDlgt),this._invokeCurrZone=e&&(e.onInvoke?this._zone:c._invokeCurrZone),this._handleErrorZS=e&&(e.onHandleError?e:c._handleErrorZS),this._handleErrorDlgt=e&&(e.onHandleError?c:c._handleErrorDlgt),this._handleErrorCurrZone=e&&(e.onHandleError?this._zone:c._handleErrorCurrZone),this._scheduleTaskZS=e&&(e.onScheduleTask?e:c._scheduleTaskZS),this._scheduleTaskDlgt=e&&(e.onScheduleTask?c:c._scheduleTaskDlgt),this._scheduleTaskCurrZone=e&&(e.onScheduleTask?this._zone:c._scheduleTaskCurrZone),this._invokeTaskZS=e&&(e.onInvokeTask?e:c._invokeTaskZS),this._invokeTaskDlgt=e&&(e.onInvokeTask?c:c._invokeTaskDlgt),this._invokeTaskCurrZone=e&&(e.onInvokeTask?this._zone:c._invokeTaskCurrZone),this._cancelTaskZS=e&&(e.onCancelTask?e:c._cancelTaskZS),this._cancelTaskDlgt=e&&(e.onCancelTask?c:c._cancelTaskDlgt),this._cancelTaskCurrZone=e&&(e.onCancelTask?this._zone:c._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;let h=e&&e.onHasTask,D=c&&c._hasTaskZS;(h||D)&&(this._hasTaskZS=h?e:s,this._hasTaskDlgt=c,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=this._zone,e.onScheduleTask||(this._scheduleTaskZS=s,this._scheduleTaskDlgt=c,this._scheduleTaskCurrZone=this._zone),e.onInvokeTask||(this._invokeTaskZS=s,this._invokeTaskDlgt=c,this._invokeTaskCurrZone=this._zone),e.onCancelTask||(this._cancelTaskZS=s,this._cancelTaskDlgt=c,this._cancelTaskCurrZone=this._zone))}fork(_,c){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,_,c):new n(_,c)}intercept(_,c,e){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,_,c,e):c}invoke(_,c,e,h,D){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,_,c,e,h,D):c.apply(e,h)}handleError(_,c){return this._handleErrorZS?this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,_,c):!0}scheduleTask(_,c){let e=c;if(this._scheduleTaskZS)this._hasTaskZS&&e._zoneDelegates.push(this._hasTaskDlgtOwner),e=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,_,c),e||(e=c);else if(c.scheduleFn)c.scheduleFn(c);else if(c.type==U)q(c);else throw new Error("Task is missing scheduleFn.");return e}invokeTask(_,c,e,h){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,_,c,e,h):c.callback.apply(e,h)}cancelTask(_,c){let e;if(this._cancelTaskZS)e=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,_,c);else{if(!c.cancelFn)throw Error("Task is not cancelable");e=c.cancelFn(c)}return e}hasTask(_,c){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,_,c)}catch(e){this.handleError(_,e)}}_updateTaskCount(_,c){let e=this._taskCounts,h=e[_],D=e[_]=h+c;if(D<0)throw new Error("More tasks executed then were scheduled.");if(h==0||D==0){let j={microTask:e.microTask>0,macroTask:e.macroTask>0,eventTask:e.eventTask>0,change:_};this.hasTask(this._zone,j)}}}class E{constructor(_,c,e,h,D,j){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=_,this.source=c,this.data=h,this.scheduleFn=D,this.cancelFn=j,!e)throw new Error("callback is not defined");this.callback=e;let N=this;_===W&&h&&h.useG?this.invoke=E.invokeTask:this.invoke=function(){return E.invokeTask.call(ie,N,this,arguments)}}static invokeTask(_,c,e){_||(_=this),K++;try{return _.runCount++,_.zone.runTask(_,c,e)}finally{K==1&&x(),K--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(Y,b)}_transitionTo(_,c,e){if(this._state===c||this._state===e)this._state=_,_==Y&&(this._zoneDelegates=null);else throw new Error(`${this.type} '${this.source}': can not transition to '${_}', expecting state '${c}'${e?" or '"+e+"'":""}, was '${this._state}'.`)}toString(){return this.data&&typeof this.data.handleId<"u"?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}let T=Q("setTimeout"),p=Q("Promise"),C=Q("then"),g=[],A=!1,P;function H(L){if(P||ie[p]&&(P=ie[p].resolve(0)),P){let _=P[C];_||(_=P.then),_.call(P,L)}else ie[T](L,0)}function q(L){K===0&&g.length===0&&H(x),L&&g.push(L)}function x(){if(!A){for(A=!0;g.length;){let L=g;g=[];for(let _=0;_<L.length;_++){let c=L[_];try{c.zone.runTask(c,null,null)}catch(e){w.onUnhandledError(e)}}}w.microtaskDrainDone(),A=!1}}let te={name:"NO ZONE"},Y="notScheduled",b="scheduling",d="scheduled",B="running",z="canceling",$="unknown",U="microTask",y="macroTask",W="eventTask",O={},w={symbol:Q,currentZoneFrame:()=>v,onUnhandledError:X,microtaskDrainDone:X,scheduleMicroTask:q,showUncaughtError:()=>!n[Q("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:X,patchMethod:()=>X,bindArguments:()=>[],patchThen:()=>X,patchMacroTask:()=>X,patchEventPrototype:()=>X,isIEOrEdge:()=>!1,getGlobalObjects:()=>{},ObjectDefineProperty:()=>X,ObjectGetOwnPropertyDescriptor:()=>{},ObjectCreate:()=>{},ArraySlice:()=>[],patchClass:()=>X,wrapWithCurrentZone:()=>X,filterProperties:()=>[],attachOriginToPatched:()=>X,_redefineProperty:()=>X,patchCallbacks:()=>X,nativeScheduleMicroTask:H},v={parent:null,zone:new n(null,null)},S=null,K=0;function X(){}return i("Zone","Zone"),n}function ht(){let t=globalThis,r=t[Q("forceDuplicateZoneCheck")]===!0;if(t.Zone&&(r||typeof t.Zone.__symbol__!="function"))throw new Error("Zone already loaded.");return t.Zone??=ft(),t.Zone}var ve=Object.getOwnPropertyDescriptor,Ae=Object.defineProperty,je=Object.getPrototypeOf,dt=Object.create,_t=Array.prototype.slice,He="addEventListener",xe="removeEventListener",Ie=Q(He),Le=Q(xe),ce="true",ae="false",be=Q("");function Ge(t,r){return Zone.current.wrap(t,r)}function Ve(t,r,i,n,s){return Zone.current.scheduleMacroTask(t,r,i,n,s)}var G=Q,Se=typeof window<"u",ye=Se?window:void 0,J=Se&&ye||globalThis,Et="removeAttribute";function Fe(t,r){for(let i=t.length-1;i>=0;i--)typeof t[i]=="function"&&(t[i]=Ge(t[i],r+"_"+i));return t}function Tt(t,r){let i=t.constructor.name;for(let n=0;n<r.length;n++){let s=r[n],u=t[s];if(u){let E=ve(t,s);if(!Qe(E))continue;t[s]=(T=>{let p=function(){return T.apply(this,Fe(arguments,i+"."+s))};return ue(p,T),p})(u)}}}function Qe(t){return t?t.writable===!1?!1:!(typeof t.get=="function"&&typeof t.set>"u"):!0}var et=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,De=!("nw"in J)&&typeof J.process<"u"&&J.process.toString()==="[object process]",Be=!De&&!et&&!!(Se&&ye.HTMLElement),tt=typeof J.process<"u"&&J.process.toString()==="[object process]"&&!et&&!!(Se&&ye.HTMLElement),Ce={},Ye=function(t){if(t=t||J.event,!t)return;let r=Ce[t.type];r||(r=Ce[t.type]=G("ON_PROPERTY"+t.type));let i=this||t.target||J,n=i[r],s;if(Be&&i===ye&&t.type==="error"){let u=t;s=n&&n.call(this,u.message,u.filename,u.lineno,u.colno,u.error),s===!0&&t.preventDefault()}else s=n&&n.apply(this,arguments),s!=null&&!s&&t.preventDefault();return s};function $e(t,r,i){let n=ve(t,r);if(!n&&i&&ve(i,r)&&(n={enumerable:!0,configurable:!0}),!n||!n.configurable)return;let s=G("on"+r+"patched");if(t.hasOwnProperty(s)&&t[s])return;delete n.writable,delete n.value;let u=n.get,E=n.set,T=r.slice(2),p=Ce[T];p||(p=Ce[T]=G("ON_PROPERTY"+T)),n.set=function(C){let g=this;if(!g&&t===J&&(g=J),!g)return;typeof g[p]=="function"&&g.removeEventListener(T,Ye),E&&E.call(g,null),g[p]=C,typeof C=="function"&&g.addEventListener(T,Ye,!1)},n.get=function(){let C=this;if(!C&&t===J&&(C=J),!C)return null;let g=C[p];if(g)return g;if(u){let A=u.call(this);if(A)return n.set.call(this,A),typeof C[Et]=="function"&&C.removeAttribute(r),A}return null},Ae(t,r,n),t[s]=!0}function nt(t,r,i){if(r)for(let n=0;n<r.length;n++)$e(t,"on"+r[n],i);else{let n=[];for(let s in t)s.slice(0,2)=="on"&&n.push(s);for(let s=0;s<n.length;s++)$e(t,n[s],i)}}var re=G("originalInstance");function ke(t){let r=J[t];if(!r)return;J[G(t)]=r,J[t]=function(){let s=Fe(arguments,t);switch(s.length){case 0:this[re]=new r;break;case 1:this[re]=new r(s[0]);break;case 2:this[re]=new r(s[0],s[1]);break;case 3:this[re]=new r(s[0],s[1],s[2]);break;case 4:this[re]=new r(s[0],s[1],s[2],s[3]);break;default:throw new Error("Arg list too long.")}},ue(J[t],r);let i=new r(function(){}),n;for(n in i)t==="XMLHttpRequest"&&n==="responseBlob"||function(s){typeof i[s]=="function"?J[t].prototype[s]=function(){return this[re][s].apply(this[re],arguments)}:Ae(J[t].prototype,s,{set:function(u){typeof u=="function"?(this[re][s]=Ge(u,t+"."+s),ue(this[re][s],u)):this[re][s]=u},get:function(){return this[re][s]}})}(n);for(n in r)n!=="prototype"&&r.hasOwnProperty(n)&&(J[t][n]=r[n])}function le(t,r,i){let n=t;for(;n&&!n.hasOwnProperty(r);)n=je(n);!n&&t[r]&&(n=t);let s=G(r),u=null;if(n&&(!(u=n[s])||!n.hasOwnProperty(s))){u=n[s]=n[r];let E=n&&ve(n,r);if(Qe(E)){let T=i(u,s,r);n[r]=function(){return T(this,arguments)},ue(n[r],u)}}return u}function gt(t,r,i){let n=null;function s(u){let E=u.data;return E.args[E.cbIdx]=function(){u.invoke.apply(this,arguments)},n.apply(E.target,E.args),u}n=le(t,r,u=>function(E,T){let p=i(E,T);return p.cbIdx>=0&&typeof T[p.cbIdx]=="function"?Ve(p.name,T[p.cbIdx],p,s):u.apply(E,T)})}function ue(t,r){t[G("OriginalDelegate")]=r}var Je=!1,Me=!1;function yt(){try{let t=ye.navigator.userAgent;if(t.indexOf("MSIE ")!==-1||t.indexOf("Trident/")!==-1)return!0}catch{}return!1}function mt(){if(Je)return Me;Je=!0;try{let t=ye.navigator.userAgent;(t.indexOf("MSIE ")!==-1||t.indexOf("Trident/")!==-1||t.indexOf("Edge/")!==-1)&&(Me=!0)}catch{}return Me}var ge=!1;if(typeof window<"u")try{let t=Object.defineProperty({},"passive",{get:function(){ge=!0}});window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch{ge=!1}var pt={useG:!0},ee={},rt={},ot=new RegExp("^"+be+"(\\w+)(true|false)$"),st=G("propagationStopped");function it(t,r){let i=(r?r(t):t)+ae,n=(r?r(t):t)+ce,s=be+i,u=be+n;ee[t]={},ee[t][ae]=s,ee[t][ce]=u}function kt(t,r,i,n){let s=n&&n.add||He,u=n&&n.rm||xe,E=n&&n.listeners||"eventListeners",T=n&&n.rmAll||"removeAllListeners",p=G(s),C="."+s+":",g="prependListener",A="."+g+":",P=function(b,d,B){if(b.isRemoved)return;let z=b.callback;typeof z=="object"&&z.handleEvent&&(b.callback=y=>z.handleEvent(y),b.originalDelegate=z);let $;try{b.invoke(b,d,[B])}catch(y){$=y}let U=b.options;if(U&&typeof U=="object"&&U.once){let y=b.originalDelegate?b.originalDelegate:b.callback;d[u].call(d,B.type,y,U)}return $};function H(b,d,B){if(d=d||t.event,!d)return;let z=b||d.target||t,$=z[ee[d.type][B?ce:ae]];if($){let U=[];if($.length===1){let y=P($[0],z,d);y&&U.push(y)}else{let y=$.slice();for(let W=0;W<y.length&&!(d&&d[st]===!0);W++){let O=P(y[W],z,d);O&&U.push(O)}}if(U.length===1)throw U[0];for(let y=0;y<U.length;y++){let W=U[y];r.nativeScheduleMicroTask(()=>{throw W})}}}let q=function(b){return H(this,b,!1)},x=function(b){return H(this,b,!0)};function te(b,d){if(!b)return!1;let B=!0;d&&d.useG!==void 0&&(B=d.useG);let z=d&&d.vh,$=!0;d&&d.chkDup!==void 0&&($=d.chkDup);let U=!1;d&&d.rt!==void 0&&(U=d.rt);let y=b;for(;y&&!y.hasOwnProperty(s);)y=je(y);if(!y&&b[s]&&(y=b),!y||y[p])return!1;let W=d&&d.eventNameToString,O={},w=y[p]=y[s],v=y[G(u)]=y[u],S=y[G(E)]=y[E],K=y[G(T)]=y[T],X;d&&d.prepend&&(X=y[G(d.prepend)]=y[d.prepend]);function L(o,l){return!ge&&typeof o=="object"&&o?!!o.capture:!ge||!l?o:typeof o=="boolean"?{capture:o,passive:!0}:o?typeof o=="object"&&o.passive!==!1?{...o,passive:!0}:o:{passive:!0}}let _=function(o){if(!O.isExisting)return w.call(O.target,O.eventName,O.capture?x:q,O.options)},c=function(o){if(!o.isRemoved){let l=ee[o.eventName],k;l&&(k=l[o.capture?ce:ae]);let R=k&&o.target[k];if(R){for(let m=0;m<R.length;m++)if(R[m]===o){R.splice(m,1),o.isRemoved=!0,o.removeAbortListener&&(o.removeAbortListener(),o.removeAbortListener=null),R.length===0&&(o.allRemoved=!0,o.target[k]=null);break}}}if(o.allRemoved)return v.call(o.target,o.eventName,o.capture?x:q,o.options)},e=function(o){return w.call(O.target,O.eventName,o.invoke,O.options)},h=function(o){return X.call(O.target,O.eventName,o.invoke,O.options)},D=function(o){return v.call(o.target,o.eventName,o.invoke,o.options)},j=B?_:e,N=B?c:D,he=function(o,l){let k=typeof l;return k==="function"&&o.callback===l||k==="object"&&o.originalDelegate===l},me=d&&d.diff?d.diff:he,de=Zone[G("UNPATCHED_EVENTS")],Pe=t[G("PASSIVE_EVENTS")];function f(o){if(typeof o=="object"&&o!==null){let l={...o};return o.signal&&(l.signal=o.signal),l}return o}let a=function(o,l,k,R,m=!1,I=!1){return function(){let M=this||t,Z=arguments[0];d&&d.transferEventName&&(Z=d.transferEventName(Z));let V=arguments[1];if(!V)return o.apply(this,arguments);if(De&&Z==="uncaughtException")return o.apply(this,arguments);let F=!1;if(typeof V!="function"){if(!V.handleEvent)return o.apply(this,arguments);F=!0}if(z&&!z(o,V,M,arguments))return;let fe=ge&&!!Pe&&Pe.indexOf(Z)!==-1,oe=f(L(arguments[2],fe)),_e=oe?.signal;if(_e?.aborted)return;if(de){for(let se=0;se<de.length;se++)if(Z===de[se])return fe?o.call(M,Z,V,oe):o.apply(this,arguments)}let Oe=oe?typeof oe=="boolean"?!0:oe.capture:!1,Ue=oe&&typeof oe=="object"?oe.once:!1,ut=Zone.current,Ne=ee[Z];Ne||(it(Z,W),Ne=ee[Z]);let We=Ne[Oe?ce:ae],Ee=M[We],qe=!1;if(Ee){if(qe=!0,$){for(let se=0;se<Ee.length;se++)if(me(Ee[se],V))return}}else Ee=M[We]=[];let we,ze=M.constructor.name,Xe=rt[ze];Xe&&(we=Xe[Z]),we||(we=ze+l+(W?W(Z):Z)),O.options=oe,Ue&&(O.options.once=!1),O.target=M,O.capture=Oe,O.eventName=Z,O.isExisting=qe;let pe=B?pt:void 0;pe&&(pe.taskData=O),_e&&(O.options.signal=void 0);let ne=ut.scheduleEventTask(we,V,pe,k,R);if(_e){O.options.signal=_e;let se=()=>ne.zone.cancelTask(ne);o.call(_e,"abort",se,{once:!0}),ne.removeAbortListener=()=>_e.removeEventListener("abort",se)}if(O.target=null,pe&&(pe.taskData=null),Ue&&(O.options.once=!0),!ge&&typeof ne.options=="boolean"||(ne.options=oe),ne.target=M,ne.capture=Oe,ne.eventName=Z,F&&(ne.originalDelegate=V),I?Ee.unshift(ne):Ee.push(ne),m)return M}};return y[s]=a(w,C,j,N,U),X&&(y[g]=a(X,A,h,N,U,!0)),y[u]=function(){let o=this||t,l=arguments[0];d&&d.transferEventName&&(l=d.transferEventName(l));let k=arguments[2],R=k?typeof k=="boolean"?!0:k.capture:!1,m=arguments[1];if(!m)return v.apply(this,arguments);if(z&&!z(v,m,o,arguments))return;let I=ee[l],M;I&&(M=I[R?ce:ae]);let Z=M&&o[M];if(Z)for(let V=0;V<Z.length;V++){let F=Z[V];if(me(F,m)){if(Z.splice(V,1),F.isRemoved=!0,Z.length===0&&(F.allRemoved=!0,o[M]=null,!R&&typeof l=="string")){let fe=be+"ON_PROPERTY"+l;o[fe]=null}return F.zone.cancelTask(F),U?o:void 0}}return v.apply(this,arguments)},y[E]=function(){let o=this||t,l=arguments[0];d&&d.transferEventName&&(l=d.transferEventName(l));let k=[],R=ct(o,W?W(l):l);for(let m=0;m<R.length;m++){let I=R[m],M=I.originalDelegate?I.originalDelegate:I.callback;k.push(M)}return k},y[T]=function(){let o=this||t,l=arguments[0];if(l){d&&d.transferEventName&&(l=d.transferEventName(l));let k=ee[l];if(k){let R=k[ae],m=k[ce],I=o[R],M=o[m];if(I){let Z=I.slice();for(let V=0;V<Z.length;V++){let F=Z[V],fe=F.originalDelegate?F.originalDelegate:F.callback;this[u].call(this,l,fe,F.options)}}if(M){let Z=M.slice();for(let V=0;V<Z.length;V++){let F=Z[V],fe=F.originalDelegate?F.originalDelegate:F.callback;this[u].call(this,l,fe,F.options)}}}}else{let k=Object.keys(o);for(let R=0;R<k.length;R++){let m=k[R],I=ot.exec(m),M=I&&I[1];M&&M!=="removeListener"&&this[T].call(this,M)}this[T].call(this,"removeListener")}if(U)return this},ue(y[s],w),ue(y[u],v),K&&ue(y[T],K),S&&ue(y[E],S),!0}let Y=[];for(let b=0;b<i.length;b++)Y[b]=te(i[b],n);return Y}function ct(t,r){if(!r){let u=[];for(let E in t){let T=ot.exec(E),p=T&&T[1];if(p&&(!r||p===r)){let C=t[E];if(C)for(let g=0;g<C.length;g++)u.push(C[g])}}return u}let i=ee[r];i||(it(r),i=ee[r]);let n=t[i[ae]],s=t[i[ce]];return n?s?n.concat(s):n.slice():s?s.slice():[]}function vt(t,r){let i=t.Event;i&&i.prototype&&r.patchMethod(i.prototype,"stopImmediatePropagation",n=>function(s,u){s[st]=!0,n&&n.apply(s,u)})}function bt(t,r){r.patchMethod(t,"queueMicrotask",i=>function(n,s){Zone.current.scheduleMicroTask("queueMicrotask",s[0])})}var Re=G("zoneTask");function Te(t,r,i,n){let s=null,u=null;r+=n,i+=n;let E={};function T(C){let g=C.data;return g.args[0]=function(){return C.invoke.apply(this,arguments)},g.handleId=s.apply(t,g.args),C}function p(C){return u.call(t,C.data.handleId)}s=le(t,r,C=>function(g,A){if(typeof A[0]=="function"){let P={isPeriodic:n==="Interval",delay:n==="Timeout"||n==="Interval"?A[1]||0:void 0,args:A},H=A[0];A[0]=function(){try{return H.apply(this,arguments)}finally{P.isPeriodic||(typeof P.handleId=="number"?delete E[P.handleId]:P.handleId&&(P.handleId[Re]=null))}};let q=Ve(r,A[0],P,T,p);if(!q)return q;let x=q.data.handleId;return typeof x=="number"?E[x]=q:x&&(x[Re]=q),x&&x.ref&&x.unref&&typeof x.ref=="function"&&typeof x.unref=="function"&&(q.ref=x.ref.bind(x),q.unref=x.unref.bind(x)),typeof x=="number"||x?x:q}else return C.apply(t,A)}),u=le(t,i,C=>function(g,A){let P=A[0],H;typeof P=="number"?H=E[P]:(H=P&&P[Re],H||(H=P)),H&&typeof H.type=="string"?H.state!=="notScheduled"&&(H.cancelFn&&H.data.isPeriodic||H.runCount===0)&&(typeof P=="number"?delete E[P]:P&&(P[Re]=null),H.zone.cancelTask(H)):C.apply(t,A)})}function Pt(t,r){let{isBrowser:i,isMix:n}=r.getGlobalObjects();if(!i&&!n||!t.customElements||!("customElements"in t))return;let s=["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback","formAssociatedCallback","formDisabledCallback","formResetCallback","formStateRestoreCallback"];r.patchCallbacks(r,t.customElements,"customElements","define",s)}function wt(t,r){if(Zone[r.symbol("patchEventTarget")])return;let{eventNames:i,zoneSymbolEventNames:n,TRUE_STR:s,FALSE_STR:u,ZONE_SYMBOL_PREFIX:E}=r.getGlobalObjects();for(let p=0;p<i.length;p++){let C=i[p],g=C+u,A=C+s,P=E+g,H=E+A;n[C]={},n[C][u]=P,n[C][s]=H}let T=t.EventTarget;if(!(!T||!T.prototype))return r.patchEventTarget(t,r,[T&&T.prototype]),!0}function Rt(t,r){r.patchEventPrototype(t,r)}function at(t,r,i){if(!i||i.length===0)return r;let n=i.filter(u=>u.target===t);if(!n||n.length===0)return r;let s=n[0].ignoreProperties;return r.filter(u=>s.indexOf(u)===-1)}function Ke(t,r,i,n){if(!t)return;let s=at(t,r,i);nt(t,s,n)}function Ze(t){return Object.getOwnPropertyNames(t).filter(r=>r.startsWith("on")&&r.length>2).map(r=>r.substring(2))}function Ct(t,r){if(De&&!tt||Zone[t.symbol("patchEvents")])return;let i=r.__Zone_ignore_on_properties,n=[];if(Be){let s=window;n=n.concat(["Document","SVGElement","Element","HTMLElement","HTMLBodyElement","HTMLMediaElement","HTMLFrameSetElement","HTMLFrameElement","HTMLIFrameElement","HTMLMarqueeElement","Worker"]);let u=yt()?[{target:s,ignoreProperties:["error"]}]:[];Ke(s,Ze(s),i&&i.concat(u),je(s))}n=n.concat(["XMLHttpRequest","XMLHttpRequestEventTarget","IDBIndex","IDBRequest","IDBOpenDBRequest","IDBDatabase","IDBTransaction","IDBCursor","WebSocket"]);for(let s=0;s<n.length;s++){let u=r[n[s]];u&&u.prototype&&Ke(u.prototype,Ze(u.prototype),i)}}function St(t){t.__load_patch("legacy",r=>{let i=r[t.__symbol__("legacyPatch")];i&&i()}),t.__load_patch("timers",r=>{let i="set",n="clear";Te(r,i,n,"Timeout"),Te(r,i,n,"Interval"),Te(r,i,n,"Immediate")}),t.__load_patch("requestAnimationFrame",r=>{Te(r,"request","cancel","AnimationFrame"),Te(r,"mozRequest","mozCancel","AnimationFrame"),Te(r,"webkitRequest","webkitCancel","AnimationFrame")}),t.__load_patch("blocking",(r,i)=>{let n=["alert","prompt","confirm"];for(let s=0;s<n.length;s++){let u=n[s];le(r,u,(E,T,p)=>function(C,g){return i.current.run(E,r,g,p)})}}),t.__load_patch("EventTarget",(r,i,n)=>{Rt(r,n),wt(r,n);let s=r.XMLHttpRequestEventTarget;s&&s.prototype&&n.patchEventTarget(r,n,[s.prototype])}),t.__load_patch("MutationObserver",(r,i,n)=>{ke("MutationObserver"),ke("WebKitMutationObserver")}),t.__load_patch("IntersectionObserver",(r,i,n)=>{ke("IntersectionObserver")}),t.__load_patch("FileReader",(r,i,n)=>{ke("FileReader")}),t.__load_patch("on_property",(r,i,n)=>{Ct(n,r)}),t.__load_patch("customElements",(r,i,n)=>{Pt(r,n)}),t.__load_patch("XHR",(r,i)=>{C(r);let n=G("xhrTask"),s=G("xhrSync"),u=G("xhrListener"),E=G("xhrScheduled"),T=G("xhrURL"),p=G("xhrErrorBeforeScheduled");function C(g){let A=g.XMLHttpRequest;if(!A)return;let P=A.prototype;function H(w){return w[n]}let q=P[Ie],x=P[Le];if(!q){let w=g.XMLHttpRequestEventTarget;if(w){let v=w.prototype;q=v[Ie],x=v[Le]}}let te="readystatechange",Y="scheduled";function b(w){let v=w.data,S=v.target;S[E]=!1,S[p]=!1;let K=S[u];q||(q=S[Ie],x=S[Le]),K&&x.call(S,te,K);let X=S[u]=()=>{if(S.readyState===S.DONE)if(!v.aborted&&S[E]&&w.state===Y){let _=S[i.__symbol__("loadfalse")];if(S.status!==0&&_&&_.length>0){let c=w.invoke;w.invoke=function(){let e=S[i.__symbol__("loadfalse")];for(let h=0;h<e.length;h++)e[h]===w&&e.splice(h,1);!v.aborted&&w.state===Y&&c.call(w)},_.push(w)}else w.invoke()}else!v.aborted&&S[E]===!1&&(S[p]=!0)};return q.call(S,te,X),S[n]||(S[n]=w),W.apply(S,v.args),S[E]=!0,w}function d(){}function B(w){let v=w.data;return v.aborted=!0,O.apply(v.target,v.args)}let z=le(P,"open",()=>function(w,v){return w[s]=v[2]==!1,w[T]=v[1],z.apply(w,v)}),$="XMLHttpRequest.send",U=G("fetchTaskAborting"),y=G("fetchTaskScheduling"),W=le(P,"send",()=>function(w,v){if(i.current[y]===!0||w[s])return W.apply(w,v);{let S={target:w,url:w[T],isPeriodic:!1,args:v,aborted:!1},K=Ve($,d,S,b,B);w&&w[p]===!0&&!S.aborted&&K.state===Y&&K.invoke()}}),O=le(P,"abort",()=>function(w,v){let S=H(w);if(S&&typeof S.type=="string"){if(S.cancelFn==null||S.data&&S.data.aborted)return;S.zone.cancelTask(S)}else if(i.current[U]===!0)return O.apply(w,v)})}}),t.__load_patch("geolocation",r=>{r.navigator&&r.navigator.geolocation&&Tt(r.navigator.geolocation,["getCurrentPosition","watchPosition"])}),t.__load_patch("PromiseRejectionEvent",(r,i)=>{function n(s){return function(u){ct(r,s).forEach(T=>{let p=r.PromiseRejectionEvent;if(p){let C=new p(s,{promise:u.promise,reason:u.rejection});T.invoke(C)}})}}r.PromiseRejectionEvent&&(i[G("unhandledPromiseRejectionHandler")]=n("unhandledrejection"),i[G("rejectionHandledHandler")]=n("rejectionhandled"))}),t.__load_patch("queueMicrotask",(r,i,n)=>{bt(r,n)})}function Dt(t){t.__load_patch("ZoneAwarePromise",(r,i,n)=>{let s=Object.getOwnPropertyDescriptor,u=Object.defineProperty;function E(f){if(f&&f.toString===Object.prototype.toString){let a=f.constructor&&f.constructor.name;return(a||"")+": "+JSON.stringify(f)}return f?f.toString():Object.prototype.toString.call(f)}let T=n.symbol,p=[],C=r[T("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")]!==!1,g=T("Promise"),A=T("then"),P="__creationTrace__";n.onUnhandledError=f=>{if(n.showUncaughtError()){let a=f&&f.rejection;a?console.error("Unhandled Promise rejection:",a instanceof Error?a.message:a,"; Zone:",f.zone.name,"; Task:",f.task&&f.task.source,"; Value:",a,a instanceof Error?a.stack:void 0):console.error(f)}},n.microtaskDrainDone=()=>{for(;p.length;){let f=p.shift();try{f.zone.runGuarded(()=>{throw f.throwOriginal?f.rejection:f})}catch(a){q(a)}}};let H=T("unhandledPromiseRejectionHandler");function q(f){n.onUnhandledError(f);try{let a=i[H];typeof a=="function"&&a.call(this,f)}catch{}}function x(f){return f&&f.then}function te(f){return f}function Y(f){return N.reject(f)}let b=T("state"),d=T("value"),B=T("finally"),z=T("parentPromiseValue"),$=T("parentPromiseState"),U="Promise.then",y=null,W=!0,O=!1,w=0;function v(f,a){return o=>{try{L(f,a,o)}catch(l){L(f,!1,l)}}}let S=function(){let f=!1;return function(o){return function(){f||(f=!0,o.apply(null,arguments))}}},K="Promise resolved with itself",X=T("currentTaskTrace");function L(f,a,o){let l=S();if(f===o)throw new TypeError(K);if(f[b]===y){let k=null;try{(typeof o=="object"||typeof o=="function")&&(k=o&&o.then)}catch(R){return l(()=>{L(f,!1,R)})(),f}if(a!==O&&o instanceof N&&o.hasOwnProperty(b)&&o.hasOwnProperty(d)&&o[b]!==y)c(o),L(f,o[b],o[d]);else if(a!==O&&typeof k=="function")try{k.call(o,l(v(f,a)),l(v(f,!1)))}catch(R){l(()=>{L(f,!1,R)})()}else{f[b]=a;let R=f[d];if(f[d]=o,f[B]===B&&a===W&&(f[b]=f[$],f[d]=f[z]),a===O&&o instanceof Error){let m=i.currentTask&&i.currentTask.data&&i.currentTask.data[P];m&&u(o,X,{configurable:!0,enumerable:!1,writable:!0,value:m})}for(let m=0;m<R.length;)e(f,R[m++],R[m++],R[m++],R[m++]);if(R.length==0&&a==O){f[b]=w;let m=o;try{throw new Error("Uncaught (in promise): "+E(o)+(o&&o.stack?`
2
- `+o.stack:""))}catch(I){m=I}C&&(m.throwOriginal=!0),m.rejection=o,m.promise=f,m.zone=i.current,m.task=i.currentTask,p.push(m),n.scheduleMicroTask()}}}return f}let _=T("rejectionHandledHandler");function c(f){if(f[b]===w){try{let a=i[_];a&&typeof a=="function"&&a.call(this,{rejection:f[d],promise:f})}catch{}f[b]=O;for(let a=0;a<p.length;a++)f===p[a].promise&&p.splice(a,1)}}function e(f,a,o,l,k){c(f);let R=f[b],m=R?typeof l=="function"?l:te:typeof k=="function"?k:Y;a.scheduleMicroTask(U,()=>{try{let I=f[d],M=!!o&&B===o[B];M&&(o[z]=I,o[$]=R);let Z=a.run(m,void 0,M&&m!==Y&&m!==te?[]:[I]);L(o,!0,Z)}catch(I){L(o,!1,I)}},o)}let h="function ZoneAwarePromise() { [native code] }",D=function(){},j=r.AggregateError;class N{static toString(){return h}static resolve(a){return a instanceof N?a:L(new this(null),W,a)}static reject(a){return L(new this(null),O,a)}static withResolvers(){let a={};return a.promise=new N((o,l)=>{a.resolve=o,a.reject=l}),a}static any(a){if(!a||typeof a[Symbol.iterator]!="function")return Promise.reject(new j([],"All promises were rejected"));let o=[],l=0;try{for(let m of a)l++,o.push(N.resolve(m))}catch{return Promise.reject(new j([],"All promises were rejected"))}if(l===0)return Promise.reject(new j([],"All promises were rejected"));let k=!1,R=[];return new N((m,I)=>{for(let M=0;M<o.length;M++)o[M].then(Z=>{k||(k=!0,m(Z))},Z=>{R.push(Z),l--,l===0&&(k=!0,I(new j(R,"All promises were rejected")))})})}static race(a){let o,l,k=new this((I,M)=>{o=I,l=M});function R(I){o(I)}function m(I){l(I)}for(let I of a)x(I)||(I=this.resolve(I)),I.then(R,m);return k}static all(a){return N.allWithCallback(a)}static allSettled(a){return(this&&this.prototype instanceof N?this:N).allWithCallback(a,{thenCallback:l=>({status:"fulfilled",value:l}),errorCallback:l=>({status:"rejected",reason:l})})}static allWithCallback(a,o){let l,k,R=new this((Z,V)=>{l=Z,k=V}),m=2,I=0,M=[];for(let Z of a){x(Z)||(Z=this.resolve(Z));let V=I;try{Z.then(F=>{M[V]=o?o.thenCallback(F):F,m--,m===0&&l(M)},F=>{o?(M[V]=o.errorCallback(F),m--,m===0&&l(M)):k(F)})}catch(F){k(F)}m++,I++}return m-=2,m===0&&l(M),R}constructor(a){let o=this;if(!(o instanceof N))throw new Error("Must be an instanceof Promise.");o[b]=y,o[d]=[];try{let l=S();a&&a(l(v(o,W)),l(v(o,O)))}catch(l){L(o,!1,l)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return N}then(a,o){let l=this.constructor?.[Symbol.species];(!l||typeof l!="function")&&(l=this.constructor||N);let k=new l(D),R=i.current;return this[b]==y?this[d].push(R,k,a,o):e(this,R,k,a,o),k}catch(a){return this.then(null,a)}finally(a){let o=this.constructor?.[Symbol.species];(!o||typeof o!="function")&&(o=N);let l=new o(D);l[B]=B;let k=i.current;return this[b]==y?this[d].push(k,l,a,a):e(this,k,l,a,a),l}}N.resolve=N.resolve,N.reject=N.reject,N.race=N.race,N.all=N.all;let he=r[g]=r.Promise;r.Promise=N;let me=T("thenPatched");function de(f){let a=f.prototype,o=s(a,"then");if(o&&(o.writable===!1||!o.configurable))return;let l=a.then;a[A]=l,f.prototype.then=function(k,R){return new N((I,M)=>{l.call(this,I,M)}).then(k,R)},f[me]=!0}n.patchThen=de;function Pe(f){return function(a,o){let l=f.apply(a,o);if(l instanceof N)return l;let k=l.constructor;return k[me]||de(k),l}}return he&&(de(he),le(r,"fetch",f=>Pe(f))),Promise[i.__symbol__("uncaughtPromiseErrors")]=p,N})}function Ot(t){t.__load_patch("toString",r=>{let i=Function.prototype.toString,n=G("OriginalDelegate"),s=G("Promise"),u=G("Error"),E=function(){if(typeof this=="function"){let g=this[n];if(g)return typeof g=="function"?i.call(g):Object.prototype.toString.call(g);if(this===Promise){let A=r[s];if(A)return i.call(A)}if(this===Error){let A=r[u];if(A)return i.call(A)}}return i.call(this)};E[n]=i,Function.prototype.toString=E;let T=Object.prototype.toString,p="[object Promise]";Object.prototype.toString=function(){return typeof Promise=="function"&&this instanceof Promise?p:T.call(this)}})}function Nt(t,r,i,n,s){let u=Zone.__symbol__(n);if(r[u])return;let E=r[u]=r[n];r[n]=function(T,p,C){return p&&p.prototype&&s.forEach(function(g){let A=`${i}.${n}::`+g,P=p.prototype;try{if(P.hasOwnProperty(g)){let H=t.ObjectGetOwnPropertyDescriptor(P,g);H&&H.value?(H.value=t.wrapWithCurrentZone(H.value,A),t._redefineProperty(p.prototype,g,H)):P[g]&&(P[g]=t.wrapWithCurrentZone(P[g],A))}else P[g]&&(P[g]=t.wrapWithCurrentZone(P[g],A))}catch{}}),E.call(r,T,p,C)},t.attachOriginToPatched(r[n],E)}function It(t){t.__load_patch("util",(r,i,n)=>{let s=Ze(r);n.patchOnProperties=nt,n.patchMethod=le,n.bindArguments=Fe,n.patchMacroTask=gt;let u=i.__symbol__("BLACK_LISTED_EVENTS"),E=i.__symbol__("UNPATCHED_EVENTS");r[E]&&(r[u]=r[E]),r[u]&&(i[u]=i[E]=r[u]),n.patchEventPrototype=vt,n.patchEventTarget=kt,n.isIEOrEdge=mt,n.ObjectDefineProperty=Ae,n.ObjectGetOwnPropertyDescriptor=ve,n.ObjectCreate=dt,n.ArraySlice=_t,n.patchClass=ke,n.wrapWithCurrentZone=Ge,n.filterProperties=at,n.attachOriginToPatched=ue,n._redefineProperty=Object.defineProperty,n.patchCallbacks=Nt,n.getGlobalObjects=()=>({globalSources:rt,zoneSymbolEventNames:ee,eventNames:s,isBrowser:Be,isMix:tt,isNode:De,TRUE_STR:ce,FALSE_STR:ae,ZONE_SYMBOL_PREFIX:be,ADD_EVENT_LISTENER_STR:He,REMOVE_EVENT_LISTENER_STR:xe})})}function Lt(t){Dt(t),Ot(t),It(t)}var lt=ht();Lt(lt);St(lt);