marketplacepos 5.46.0 → 5.46.2

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 (185) hide show
  1. package/Marketplace/{chunk-FPYZBABH.js → chunk-2O4IEGGR.js} +1 -1
  2. package/Marketplace/{chunk-RDJPSZRF.js → chunk-3434HH7H.js} +1 -1
  3. package/Marketplace/{chunk-Z3ZYINRX.js → chunk-3BALA33G.js} +1 -1
  4. package/Marketplace/{chunk-6RLISMEX.js → chunk-3GDM5JNY.js} +1 -1
  5. package/Marketplace/chunk-3GRC47DP.js +1 -0
  6. package/Marketplace/chunk-45FZJ4W3.js +1 -0
  7. package/Marketplace/{chunk-ZWEHKGL5.js → chunk-4DMKVXM7.js} +1 -1
  8. package/Marketplace/{chunk-LBXSZJDS.js → chunk-4G7SG2H6.js} +1 -1
  9. package/Marketplace/chunk-4JQLXONG.js +1 -0
  10. package/Marketplace/chunk-4NEKWRL7.js +1 -0
  11. package/Marketplace/chunk-4YRBARG2.js +1 -0
  12. package/Marketplace/{chunk-LDD4NVMB.js → chunk-5CKVZBHM.js} +1 -1
  13. package/Marketplace/{chunk-PFXOFSJG.js → chunk-67HPC5Y3.js} +1 -1
  14. package/Marketplace/{chunk-FFCWYWBW.js → chunk-6H2KAYSB.js} +6 -99
  15. package/Marketplace/{chunk-WLRPCY65.js → chunk-6OMSPZZC.js} +1 -1
  16. package/Marketplace/chunk-6RMBCW2O.js +1 -0
  17. package/Marketplace/chunk-6VZVNRUE.js +257 -0
  18. package/Marketplace/{chunk-WCVSETLP.js → chunk-72OHPB5Q.js} +2 -2
  19. package/Marketplace/chunk-77MWKV5I.js +158 -0
  20. package/Marketplace/chunk-7AZDAPB7.js +1 -0
  21. package/Marketplace/chunk-7F74QXF6.js +1 -0
  22. package/Marketplace/{chunk-DFGZ4L65.js → chunk-7G6GQTSH.js} +1 -1
  23. package/Marketplace/chunk-7VLMA7MW.js +1 -0
  24. package/Marketplace/chunk-A57T33JT.js +1 -0
  25. package/Marketplace/{chunk-BBQGPXDH.js → chunk-A6PXM4YX.js} +1 -1
  26. package/Marketplace/{chunk-HFCAD7GH.js → chunk-ABYG6YZT.js} +1 -1
  27. package/Marketplace/{chunk-3TYYN7ZX.js → chunk-AGZCB65X.js} +1 -1
  28. package/Marketplace/chunk-AMYZMAYI.js +15 -0
  29. package/Marketplace/chunk-B2WOBUES.js +1 -0
  30. package/Marketplace/{chunk-QHE3PKRD.js → chunk-BAXQ2L7B.js} +1 -1
  31. package/Marketplace/chunk-BDKGOINV.js +1 -0
  32. package/Marketplace/{chunk-2HNZ6XV3.js → chunk-BKRCW7SH.js} +1 -1
  33. package/Marketplace/{chunk-IQ4AFE6X.js → chunk-BMYBLBSP.js} +3 -3
  34. package/Marketplace/chunk-CBAQUD22.js +1 -0
  35. package/Marketplace/{chunk-F6HNCBQX.js → chunk-CBJR2A72.js} +1 -1
  36. package/Marketplace/chunk-CGEIIRYF.js +1 -0
  37. package/Marketplace/{chunk-MW6Q6DZF.js → chunk-CGOB6Y3X.js} +1 -1
  38. package/Marketplace/{chunk-LSCMIKJ2.js → chunk-CIPLCKUF.js} +1 -1
  39. package/Marketplace/{chunk-5X2WQKXH.js → chunk-CJ4F7QUO.js} +1 -1
  40. package/Marketplace/{chunk-NERXQ5KH.js → chunk-CVM573KF.js} +1 -1
  41. package/Marketplace/{chunk-QNM4JQ46.js → chunk-CWXOXH6M.js} +1 -1
  42. package/Marketplace/{chunk-ZDXNJIJA.js → chunk-DAXM2MPK.js} +1 -1
  43. package/Marketplace/{chunk-WKSCLDT7.js → chunk-EHBCYQSG.js} +1 -1
  44. package/Marketplace/{chunk-QP4C4R4W.js → chunk-EHUVS2VB.js} +1 -1
  45. package/Marketplace/chunk-EPBVNII2.js +51 -0
  46. package/Marketplace/{chunk-G7T42LFR.js → chunk-EYONZQ2W.js} +1 -1
  47. package/Marketplace/{chunk-VVX6LRMW.js → chunk-FGFIV3VO.js} +1 -1
  48. package/Marketplace/chunk-FGRPTNDB.js +234 -0
  49. package/Marketplace/{chunk-EBCTTFHD.js → chunk-FNU2TKTQ.js} +2 -2
  50. package/Marketplace/chunk-FYRDNKYT.js +1 -0
  51. package/Marketplace/chunk-GHVAGYK3.js +2 -0
  52. package/Marketplace/chunk-GPX77ZSI.js +1 -0
  53. package/Marketplace/{chunk-N6HMVYWS.js → chunk-GQXYHXWJ.js} +1 -1
  54. package/Marketplace/chunk-GRQD4D2I.js +1 -0
  55. package/Marketplace/{chunk-YIXZLIPA.js → chunk-GRYGUILI.js} +2 -2
  56. package/Marketplace/{chunk-BJUPMCEP.js → chunk-GZKOMS4T.js} +1 -1
  57. package/Marketplace/{chunk-W3JKSCRF.js → chunk-HERZ7KEM.js} +1 -1
  58. package/Marketplace/{chunk-PONMPAT5.js → chunk-HGZ5B6WR.js} +1 -1
  59. package/Marketplace/{chunk-3UN6FPMN.js → chunk-HIC5QC3Y.js} +1 -1
  60. package/Marketplace/{chunk-4VITMSIA.js → chunk-HITTNWB6.js} +1 -1
  61. package/Marketplace/{chunk-FO7G4GMY.js → chunk-HJXYT6MI.js} +3 -3
  62. package/Marketplace/{chunk-5LQRO4AI.js → chunk-IHSGQFDX.js} +2 -2
  63. package/Marketplace/chunk-II5QZVLR.js +1 -0
  64. package/Marketplace/{chunk-XXWBR6S5.js → chunk-IITU3NV6.js} +1 -1
  65. package/Marketplace/{chunk-LDPDLCRL.js → chunk-JBT7GBCM.js} +1 -1
  66. package/Marketplace/{chunk-VKFFHT27.js → chunk-JGEU4EJT.js} +1 -1
  67. package/Marketplace/{chunk-B67DSLBY.js → chunk-KS7ACI26.js} +6 -6
  68. package/Marketplace/{chunk-OK3LLCAK.js → chunk-KSHWHTCH.js} +1 -1
  69. package/Marketplace/{chunk-RNTPX24O.js → chunk-LBMUKJV5.js} +1 -1
  70. package/Marketplace/chunk-LCZ6SUUA.js +1 -0
  71. package/Marketplace/{chunk-UXPULNCR.js → chunk-LDL3A7NM.js} +1 -1
  72. package/Marketplace/chunk-LFGPYQCI.js +1 -0
  73. package/Marketplace/{chunk-DZYBXWL2.js → chunk-LYPHZP72.js} +1 -1
  74. package/Marketplace/{chunk-NNRBGHXB.js → chunk-MFQQEEHJ.js} +3 -3
  75. package/Marketplace/chunk-MX5SR3SR.js +94 -0
  76. package/Marketplace/chunk-NDLOPOFD.js +1 -0
  77. package/Marketplace/{chunk-CHWXOJDB.js → chunk-NNOI3AG4.js} +1 -1
  78. package/Marketplace/{chunk-I2Y5WJEO.js → chunk-NWWYOZ4V.js} +1 -1
  79. package/Marketplace/{chunk-OIEZ4JUJ.js → chunk-OE7TF7SI.js} +1 -1
  80. package/Marketplace/chunk-OEAOBG75.js +1 -0
  81. package/Marketplace/{chunk-X5KQU53P.js → chunk-OHSVQSCM.js} +1 -1
  82. package/Marketplace/{chunk-QK4BGDSS.js → chunk-OHVOVAKD.js} +1 -1
  83. package/Marketplace/chunk-OVPVQS4J.js +33 -0
  84. package/Marketplace/{chunk-UIFPDTMW.js → chunk-OXWPLJEW.js} +1 -1
  85. package/Marketplace/chunk-P5YM6T6I.js +1 -0
  86. package/Marketplace/chunk-PE4SWUEZ.js +7 -0
  87. package/Marketplace/{chunk-BQIB3N6V.js → chunk-PFY5UG5D.js} +1 -1
  88. package/Marketplace/{chunk-74ELVGDK.js → chunk-PHUHUFYL.js} +1 -1
  89. package/Marketplace/{chunk-AHLYED4C.js → chunk-PIBVGTHJ.js} +1 -1
  90. package/Marketplace/{chunk-FHH5BTG7.js → chunk-PL3Q6PGC.js} +1 -1
  91. package/Marketplace/{chunk-A6G2H7IF.js → chunk-PLHWGG4D.js} +2 -2
  92. package/Marketplace/{chunk-OFZOAEW5.js → chunk-PQQSREEC.js} +1 -1
  93. package/Marketplace/chunk-Q2B5GUDO.js +1 -0
  94. package/Marketplace/{chunk-QBL6V7QF.js → chunk-Q4N2QUV6.js} +1 -1
  95. package/Marketplace/{chunk-OXOTD33C.js → chunk-QOP7KZK7.js} +1 -1
  96. package/Marketplace/chunk-QSHR75ZI.js +2 -0
  97. package/Marketplace/chunk-QVP2CM7Y.js +5 -0
  98. package/Marketplace/{chunk-M7V7A7Z6.js → chunk-QW4EOJRM.js} +1 -1
  99. package/Marketplace/{chunk-WPELZYFP.js → chunk-QWISVEBT.js} +1 -1
  100. package/Marketplace/{chunk-4KHHGHFJ.js → chunk-RAQRGWCZ.js} +2 -2
  101. package/Marketplace/chunk-RC5PUUVM.js +193 -0
  102. package/Marketplace/{chunk-WWISWZF5.js → chunk-RGAKHXPF.js} +1 -1
  103. package/Marketplace/{chunk-ZBKUZ4CN.js → chunk-RGAWEFPQ.js} +1 -1
  104. package/Marketplace/{chunk-V5KHEF77.js → chunk-RJ5D24ZW.js} +1 -1
  105. package/Marketplace/chunk-RM2OSYMV.js +1 -0
  106. package/Marketplace/{chunk-KXEADFBM.js → chunk-RNNH3EZC.js} +1 -1
  107. package/Marketplace/{chunk-753FTTID.js → chunk-S3FZRSRP.js} +1 -1
  108. package/Marketplace/{chunk-FXVFO74P.js → chunk-SLEJQAL7.js} +1 -1
  109. package/Marketplace/chunk-SZGOLKC6.js +1 -0
  110. package/Marketplace/{chunk-UYLSZYOD.js → chunk-T2OSIFLN.js} +1 -1
  111. package/Marketplace/chunk-TM6DZ3ZF.js +1 -0
  112. package/Marketplace/chunk-UX3OTI5X.js +1 -0
  113. package/Marketplace/{chunk-WFT47MCY.js → chunk-UZWED4UK.js} +1 -1
  114. package/Marketplace/chunk-V6GFM5AQ.js +1 -0
  115. package/Marketplace/{chunk-LRUVI2Z3.js → chunk-VFATXJRG.js} +1 -1
  116. package/Marketplace/{chunk-FVORY74O.js → chunk-W3DTXPRM.js} +1 -1
  117. package/Marketplace/{chunk-7WG7VRYR.js → chunk-WAKKUK6E.js} +1 -1
  118. package/Marketplace/{chunk-6KBMGQMI.js → chunk-WAZXTB4X.js} +1 -1
  119. package/Marketplace/chunk-WEYKQCVQ.js +1 -0
  120. package/Marketplace/{chunk-W5L6FMO3.js → chunk-WN5DZGA4.js} +1 -1
  121. package/Marketplace/{chunk-A64VIOKR.js → chunk-WRJFUNM3.js} +1 -1
  122. package/Marketplace/chunk-WWLC64XZ.js +3 -0
  123. package/Marketplace/chunk-XPBMYV5W.js +1 -0
  124. package/Marketplace/{chunk-TYG67JH3.js → chunk-XPCRS7AL.js} +1 -1
  125. package/Marketplace/chunk-XXAV6VNB.js +1 -0
  126. package/Marketplace/{chunk-TH6VZX34.js → chunk-XXT6F2ZS.js} +1 -1
  127. package/Marketplace/chunk-YA3VMYDA.js +1 -0
  128. package/Marketplace/chunk-YFDFIBAG.js +1 -0
  129. package/Marketplace/{chunk-N2SPK2VI.js → chunk-YQLOB7IQ.js} +1 -1
  130. package/Marketplace/{chunk-PPHTN2H6.js → chunk-YTCIQBSO.js} +1 -1
  131. package/Marketplace/{chunk-3NHZEKEI.js → chunk-YXBR6VYQ.js} +1 -1
  132. package/Marketplace/chunk-Z3J3CSGS.js +1 -0
  133. package/Marketplace/chunk-Z67623R4.js +1 -0
  134. package/Marketplace/chunk-ZLNAFA4X.js +1 -0
  135. package/Marketplace/index.html +2 -2
  136. package/Marketplace/main-FUX6VJVF.js +1 -0
  137. package/package.json +1 -1
  138. package/Marketplace/chunk-2KDM4NDG.js +0 -266
  139. package/Marketplace/chunk-3NFS6ZDY.js +0 -1
  140. package/Marketplace/chunk-43E7L4CY.js +0 -1
  141. package/Marketplace/chunk-4UWGWYKJ.js +0 -1
  142. package/Marketplace/chunk-5QLKBL54.js +0 -1
  143. package/Marketplace/chunk-76XHGJE7.js +0 -1
  144. package/Marketplace/chunk-7AE3725T.js +0 -193
  145. package/Marketplace/chunk-A6PK5NP6.js +0 -1
  146. package/Marketplace/chunk-AKVBFSUI.js +0 -1
  147. package/Marketplace/chunk-AP24AK5A.js +0 -1
  148. package/Marketplace/chunk-DFFRRMPT.js +0 -1
  149. package/Marketplace/chunk-DLURPTQ3.js +0 -1
  150. package/Marketplace/chunk-DQ3XZQ7W.js +0 -7
  151. package/Marketplace/chunk-DUF425GC.js +0 -1
  152. package/Marketplace/chunk-EOLVRL5H.js +0 -2
  153. package/Marketplace/chunk-EWTJL2KE.js +0 -1
  154. package/Marketplace/chunk-FHPIPQMB.js +0 -15
  155. package/Marketplace/chunk-GVLJDP5K.js +0 -1
  156. package/Marketplace/chunk-I4WCZRNL.js +0 -1
  157. package/Marketplace/chunk-ID2YZPRH.js +0 -1
  158. package/Marketplace/chunk-IL2CPGYS.js +0 -1
  159. package/Marketplace/chunk-J53BPEDH.js +0 -1
  160. package/Marketplace/chunk-JL5DYPDV.js +0 -1
  161. package/Marketplace/chunk-K5XRGNWG.js +0 -1
  162. package/Marketplace/chunk-KVZ7LQSK.js +0 -1
  163. package/Marketplace/chunk-LFMEBDL2.js +0 -1
  164. package/Marketplace/chunk-MVBY6S4R.js +0 -1
  165. package/Marketplace/chunk-NFN7BQB3.js +0 -3
  166. package/Marketplace/chunk-OPKLFRVD.js +0 -1
  167. package/Marketplace/chunk-ORDCBJ4G.js +0 -2
  168. package/Marketplace/chunk-PFZOP2J7.js +0 -1
  169. package/Marketplace/chunk-QGK4LEFP.js +0 -1
  170. package/Marketplace/chunk-RTT3JVJM.js +0 -1
  171. package/Marketplace/chunk-SMRDRDSH.js +0 -1
  172. package/Marketplace/chunk-UBAADH47.js +0 -1
  173. package/Marketplace/chunk-UHTMVOX6.js +0 -1
  174. package/Marketplace/chunk-UUJWRGO4.js +0 -1
  175. package/Marketplace/chunk-V3CLQBGH.js +0 -1
  176. package/Marketplace/chunk-V4UHOZJ4.js +0 -1
  177. package/Marketplace/chunk-VCTMSNVC.js +0 -1
  178. package/Marketplace/chunk-VPFSU3X4.js +0 -1
  179. package/Marketplace/chunk-WHNSPPOH.js +0 -1
  180. package/Marketplace/chunk-WJAE4LW2.js +0 -51
  181. package/Marketplace/chunk-WVHSR3DQ.js +0 -5
  182. package/Marketplace/chunk-XB3CW7KH.js +0 -1
  183. package/Marketplace/chunk-XEBKP2KL.js +0 -1
  184. package/Marketplace/chunk-ZHDGR4XE.js +0 -1
  185. package/Marketplace/main-3TBM4ISM.js +0 -1
@@ -0,0 +1,257 @@
1
+ import{a as ni}from"./chunk-FGFIV3VO.js";import{a as Vn,b as ve}from"./chunk-ZLNAFA4X.js";import{a as Hn}from"./chunk-A44LN77B.js";import{a as $n,b as Ln}from"./chunk-PQQSREEC.js";import{b as ei}from"./chunk-GRYGUILI.js";import{a as it}from"./chunk-OLANEXLB.js";import{a as Gn}from"./chunk-YERZ6W22.js";import{e as At}from"./chunk-4DMKVXM7.js";import"./chunk-WAZXTB4X.js";import{d as zn,k as Qn,l as Yn,m as qn,n as Xn,o as ti}from"./chunk-KS7ACI26.js";import{a as we}from"./chunk-CGEIIRYF.js";import{a as tt}from"./chunk-CIPLCKUF.js";import"./chunk-PE5AFID4.js";import{a as ye,b as be,c as Bn}from"./chunk-KSHWHTCH.js";import{b as ii}from"./chunk-ABYG6YZT.js";import{a as Kn,b as Zn}from"./chunk-RAQRGWCZ.js";import"./chunk-HVCIQI7B.js";import{a as X}from"./chunk-PL3Q6PGC.js";import{a as gt}from"./chunk-BAXQ2L7B.js";import{c as jn,f as Wn}from"./chunk-3GDM5JNY.js";import"./chunk-XXT6F2ZS.js";import"./chunk-QS22J2SC.js";import"./chunk-EHUVS2VB.js";import"./chunk-YTCIQBSO.js";import{a as Rn}from"./chunk-4YRBARG2.js";import"./chunk-5CKVZBHM.js";import"./chunk-BKRCW7SH.js";import{a as Nn}from"./chunk-RGAKHXPF.js";import"./chunk-T2OSIFLN.js";import{d as An}from"./chunk-QW4EOJRM.js";import"./chunk-RHHHL4OR.js";import{a as nt}from"./chunk-PE4SWUEZ.js";import"./chunk-Q4N2QUV6.js";import{a as Se}from"./chunk-7G6GQTSH.js";import"./chunk-IHSGQFDX.js";import"./chunk-MO53T3IK.js";import"./chunk-W3JTS22H.js";import"./chunk-SDUUFQUI.js";import"./chunk-6L7TD5DW.js";import"./chunk-6OMSPZZC.js";import"./chunk-3RK6DDJD.js";import{a as xe}from"./chunk-HIC5QC3Y.js";import{f as Un}from"./chunk-JBT7GBCM.js";import{a as B}from"./chunk-UMP6ZMEJ.js";import"./chunk-YQLOB7IQ.js";import{e as Ce}from"./chunk-OZ7LWNOK.js";import{a as ze}from"./chunk-YFDFIBAG.js";import{O as On,P as Dn,aa as Nt,fa as kn,ja as Ht,na as En,oa as We}from"./chunk-RC5PUUVM.js";import{a as Pn,b as Tn}from"./chunk-WRJFUNM3.js";import"./chunk-JVNHFIYT.js";import{a as Jn}from"./chunk-3YP6ORBR.js";import{a as Fn}from"./chunk-RM2OSYMV.js";import{a as _t}from"./chunk-7KG3DC5J.js";import{a as _e}from"./chunk-6RMBCW2O.js";import{a as lt}from"./chunk-LDL3A7NM.js";import{i as q}from"./chunk-WWLC64XZ.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import{a as xn}from"./chunk-CGOB6Y3X.js";import{b as Y,e as Z}from"./chunk-WN5DZGA4.js";import{c as Be,d as je,f as me,g as hn,i as ue,k as _n,m as gn}from"./chunk-4NEKWRL7.js";import{a as kt,b as he,d as mt,e as yn}from"./chunk-PYXL7UF7.js";import{b as T,c as C}from"./chunk-PW42BQIY.js";import{b as Et,c as Ft,d as rt,e as bn,f as vn,g as wn,h as In,i as ge,j as Vt,k as fe,m as et,n as Mn}from"./chunk-HJXYT6MI.js";import{A as Dt,b as un,c as Ot,h as G,m as K}from"./chunk-5PS6ZS3N.js";import{a as fn}from"./chunk-V3USB3ZU.js";import{a as Cn,b as at,c as Sn}from"./chunk-ERXVXBTU.js";import{r as ut,s as ht}from"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{E as pe,F as dn,G as ot,H as de,J as mn,d as yt,f as U,g as R,h as sn,i as cn,j as Tt,k as pn,m as Mt,n as J}from"./chunk-FXQKRJWU.js";import{$b as ae,$c as A,Aa as ie,Ac as Ue,Bc as It,Ca as St,Cc as Pt,Fc as Q,G as V,Gb as I,Gc as d,Hb as Ne,Hc as N,Ic as y,K as qe,Ka as pt,Kb as ct,Kc as k,La as nn,Lc as E,Mb as g,Mc as F,Qc as jt,Ra as z,Rc as xt,Sc as P,Tc as Wt,Vc as se,X as Xe,Xb as D,Yb as l,Z as te,Zb as on,aa as Ut,ac as dt,ad as $,bd as rn,ca as Bt,cd as H,dc as M,ea as ee,ec as Ae,f as Xt,fa as tn,g as Fe,gc as Re,hc as $e,ic as o,ja as ne,jc as r,ka as Ve,kc as _,lc as b,mc as v,nc as Le,oa as en,ob as oe,oc as S,od as ce,pa as L,pb as O,pd as zt,rb as a,rd as ln,tc as f,uc as p,v as Ct,vc as an,wc as re,xb as x,ya as m,za as u,zc as le}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var oi=(()=>{class e{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"},{Title:"Scan Job",Url:"/menu/products/status/notification",Description:"Scan results for each channel, including product counts and synchronization status"}]}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=I({type:e,selectors:[["app-status"]],standalone:!1,decls:5,vars:1,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"]],template:function(i,n){i&1&&(o(0,"nav",0)(1,"div",1)(2,"div"),_(3,"nav-tab",2),r()()(),_(4,"router-outlet")),i&2&&(a(3),l("Tabs",n.productTabs))},dependencies:[Pn,dn],encapsulation:2})}}return e})();var ai=(()=>{class e extends Se{pathId;ngOnInit(){this.pathId="url(#"+Nt()+")"}static \u0275fac=(()=>{let t;return function(n){return(t||(t=St(e)))(n||e)}})();static \u0275cmp=I({type:e,selectors:[["ExclamationTriangleIcon"]],features:[ct],decls:8,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M13.4018 13.1893H0.598161C0.49329 13.189 0.390283 13.1615 0.299143 13.1097C0.208003 13.0578 0.131826 12.9832 0.0780112 12.8932C0.0268539 12.8015 0 12.6982 0 12.5931C0 12.4881 0.0268539 12.3848 0.0780112 12.293L6.47985 1.08982C6.53679 1.00399 6.61408 0.933574 6.70484 0.884867C6.7956 0.836159 6.897 0.810669 7 0.810669C7.103 0.810669 7.2044 0.836159 7.29516 0.884867C7.38592 0.933574 7.46321 1.00399 7.52015 1.08982L13.922 12.293C13.9731 12.3848 14 12.4881 14 12.5931C14 12.6982 13.9731 12.8015 13.922 12.8932C13.8682 12.9832 13.792 13.0578 13.7009 13.1097C13.6097 13.1615 13.5067 13.189 13.4018 13.1893ZM1.63046 11.989H12.3695L7 2.59425L1.63046 11.989Z","fill","currentColor"],["d","M6.99996 8.78801C6.84143 8.78594 6.68997 8.72204 6.57787 8.60993C6.46576 8.49782 6.40186 8.34637 6.39979 8.18784V5.38703C6.39979 5.22786 6.46302 5.0752 6.57557 4.96265C6.68813 4.85009 6.84078 4.78686 6.99996 4.78686C7.15914 4.78686 7.31179 4.85009 7.42435 4.96265C7.5369 5.0752 7.60013 5.22786 7.60013 5.38703V8.18784C7.59806 8.34637 7.53416 8.49782 7.42205 8.60993C7.30995 8.72204 7.15849 8.78594 6.99996 8.78801Z","fill","currentColor"],["d","M6.99996 11.1887C6.84143 11.1866 6.68997 11.1227 6.57787 11.0106C6.46576 10.8985 6.40186 10.7471 6.39979 10.5885V10.1884C6.39979 10.0292 6.46302 9.87658 6.57557 9.76403C6.68813 9.65147 6.84078 9.58824 6.99996 9.58824C7.15914 9.58824 7.31179 9.65147 7.42435 9.76403C7.5369 9.87658 7.60013 10.0292 7.60013 10.1884V10.5885C7.59806 10.7471 7.53416 10.8985 7.42205 11.0106C7.30995 11.1227 7.15849 11.1866 6.99996 11.1887Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,n){i&1&&(ie(),o(0,"svg",0)(1,"g"),_(2,"path",1)(3,"path",2)(4,"path",3),r(),o(5,"defs")(6,"clipPath",4),_(7,"rect",5),r()()()),i&2&&(dt(n.getClassNames()),D("aria-label",n.ariaLabel)("aria-hidden",n.ariaHidden)("role",n.role),a(),D("clip-path",n.pathId),a(5),l("id",n.pathId))},encapsulation:2})}return e})();var ri=(()=>{class e extends Se{pathId;ngOnInit(){this.pathId="url(#"+Nt()+")"}static \u0275fac=(()=>{let t;return function(n){return(t||(t=St(e)))(n||e)}})();static \u0275cmp=I({type:e,selectors:[["InfoCircleIcon"]],features:[ct],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M3.11101 12.8203C4.26215 13.5895 5.61553 14 7 14C8.85652 14 10.637 13.2625 11.9497 11.9497C13.2625 10.637 14 8.85652 14 7C14 5.61553 13.5895 4.26215 12.8203 3.11101C12.0511 1.95987 10.9579 1.06266 9.67879 0.532846C8.3997 0.00303296 6.99224 -0.13559 5.63437 0.134506C4.2765 0.404603 3.02922 1.07129 2.05026 2.05026C1.07129 3.02922 0.404603 4.2765 0.134506 5.63437C-0.13559 6.99224 0.00303296 8.3997 0.532846 9.67879C1.06266 10.9579 1.95987 12.0511 3.11101 12.8203ZM3.75918 2.14976C4.71846 1.50879 5.84628 1.16667 7 1.16667C8.5471 1.16667 10.0308 1.78125 11.1248 2.87521C12.2188 3.96918 12.8333 5.45291 12.8333 7C12.8333 8.15373 12.4912 9.28154 11.8502 10.2408C11.2093 11.2001 10.2982 11.9478 9.23232 12.3893C8.16642 12.8308 6.99353 12.9463 5.86198 12.7212C4.73042 12.4962 3.69102 11.9406 2.87521 11.1248C2.05941 10.309 1.50384 9.26958 1.27876 8.13803C1.05367 7.00647 1.16919 5.83358 1.61071 4.76768C2.05222 3.70178 2.79989 2.79074 3.75918 2.14976ZM7.00002 4.8611C6.84594 4.85908 6.69873 4.79698 6.58977 4.68801C6.48081 4.57905 6.4187 4.43185 6.41669 4.27776V3.88888C6.41669 3.73417 6.47815 3.58579 6.58754 3.4764C6.69694 3.367 6.84531 3.30554 7.00002 3.30554C7.15473 3.30554 7.3031 3.367 7.4125 3.4764C7.52189 3.58579 7.58335 3.73417 7.58335 3.88888V4.27776C7.58134 4.43185 7.51923 4.57905 7.41027 4.68801C7.30131 4.79698 7.1541 4.85908 7.00002 4.8611ZM7.00002 10.6945C6.84594 10.6925 6.69873 10.6304 6.58977 10.5214C6.48081 10.4124 6.4187 10.2652 6.41669 10.1111V6.22225C6.41669 6.06754 6.47815 5.91917 6.58754 5.80977C6.69694 5.70037 6.84531 5.63892 7.00002 5.63892C7.15473 5.63892 7.3031 5.70037 7.4125 5.80977C7.52189 5.91917 7.58335 6.06754 7.58335 6.22225V10.1111C7.58134 10.2652 7.51923 10.4124 7.41027 10.5214C7.30131 10.6304 7.1541 10.6925 7.00002 10.6945Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,n){i&1&&(ie(),o(0,"svg",0)(1,"g"),_(2,"path",1),r(),o(3,"defs")(4,"clipPath",2),_(5,"rect",3),r()()()),i&2&&(dt(n.getClassNames()),D("aria-label",n.ariaLabel)("aria-hidden",n.ariaHidden)("role",n.role),a(),D("clip-path",n.pathId),a(3),l("id",n.pathId))},encapsulation:2})}return e})();function xi(e,c){if(e&1&&(o(0,"div",10),_(1,"img",11),o(2,"span"),d(3),r()()),e&2){let t=c.$implicit;l("matTooltip",t.disabled?"Single Product Scan disabled for this type of Channel":null),a(),l("src",t.Img,O),a(2),N(t.Name)}}function yi(e,c){if(e&1&&(o(0,"div",10),_(1,"img",11),o(2,"span"),d(3),r()()),e&2){let t=c.$implicit;l("matTooltip",t.disabled?"Single Product Scan disabled for this type of Channel":null),a(),l("src",t.Img,O),a(2),N(t.Name)}}function bi(e,c){if(e&1&&(o(0,"div",10),_(1,"img",11),o(2,"span"),d(3),r()()),e&2){let t=c.$implicit;l("matTooltip",t.disabled?"Single Product Scan disabled for this type of Channel":null),a(),l("src",t.Img,O),a(2),N(t.Name)}}function vi(e,c){if(e&1&&(o(0,"mat-radio-button",16),d(1," Sellable "),r()),e&2){let t=p(2);l("value",t.scanTypeEnum.Sellable)}}function wi(e,c){if(e&1){let t=S();o(0,"div",12)(1,"label",13),d(2,"Scan Type"),r(),o(3,"mat-radio-group",14),F("ngModelChange",function(n){m(t);let s=p();return E(s.filter.ScanFull,n)||(s.filter.ScanFull=n),u(n)}),o(4,"mat-radio-button",15),d(5," All "),r(),g(6,vi,2,1,"mat-radio-button",16),o(7,"mat-radio-button",17),d(8," Active "),r()()()}if(e&2){let t=p();a(3),k("ngModel",t.filter.ScanFull),a(),l("value",t.scanTypeEnum.All),a(2),M(t.selectedChannel.TypeID==t.channelType.Tiktok?6:-1),a(),l("value",t.scanTypeEnum.Active)}}function Ii(e,c){e&1&&(o(0,"span"),d(1,"Never"),r())}function Pi(e,c){if(e&1&&(o(0,"span"),d(1),A(2,"async"),r()),e&2){let t=p(2);a(),N($(2,1,t.lastSync$))}}function Ti(e,c){if(e&1){let t=S();o(0,"div",8)(1,"label",5)(2,"span",18),d(3,"Last Scan:"),r(),g(4,Ii,2,0,"span"),A(5,"async"),g(6,Pi,3,3,"span"),r(),o(7,"mat-radio-group",19),F("ngModelChange",function(n){m(t);let s=p();return E(s.filter.UpdatedProduct,n)||(s.filter.UpdatedProduct=n),u(n)}),o(8,"mat-radio-button",20),d(9," Scan All Products "),r(),o(10,"mat-radio-button",21),d(11),r()()()}if(e&2){let t=p();a(4),M($(5,6,t.lastSync$)==null?4:6),a(3),k("ngModel",t.filter.UpdatedProduct),a(),l("value",!1),a(2),l("value",!0)("matTooltip",t.selectedChannel.TypeID==t.channelType.Tokopedia?"Use Tokopedia URL for mapping SKU between POS and Tokopedia":"Scan only products that have been updated since the last channel scan"),a(),y(" ",t.selectedChannel.TypeID==t.channelType.Tokopedia?"Product Download By URL":"Scan Updated Products"," ")}}function Mi(e,c){if(e&1){let t=S();o(0,"div",8)(1,"label",5),d(2," Scan Option "),r(),o(3,"mat-radio-group",22),F("ngModelChange",function(n){m(t);let s=p();return E(s.filter.Async,n)||(s.filter.Async=n),u(n)}),o(4,"mat-radio-button",23),d(5," Asynchronous (Get Notified when Complete) "),r(),o(6,"mat-radio-button",24),d(7," Synchronous (Wait until Complete) "),r()()()}if(e&2){let t=p();a(3),k("ngModel",t.filter.Async),a(),l("value",!0),a(2),l("value",!1)}}var W=(()=>{class e extends Hn{constructor(t,i,n){super(),this.dialogRef=t,this.data=i,this.router=n,this.channelService=L(Vn),this.channelType=T,this.disabledChannelOption=!1,this.filter={ChannelID:C.GuidEMpty,ScanFull:0,UpdatedProduct:!1,Async:!1},this.scanTypeEnum=Gn,this.isSingleChannel=C.IsNotEmpty(i.isSingleChannel)?this.data.isSingleChannel:!1,this.disabledChannelOption=C.IsEmpty(i.disabledChannelOption)?!1:this.data.disabledChannelOption}ngOnInit(){this.initChannelOptions(),this.initFilter(),this.onSelectChannel(this.data?.filter?.ChannelID),this.initModalConfig()}ngAfterViewInit(){this.initTopPosition()}ngOnDestroy(){this.stopOverlayObserver()}initModalConfig(){this.modalConfig=new Vt,this.modalConfig.title=this.isSingleChannel?"Scan Single Product":"Scan Channel Marketplace",this.modalConfig.bodyScrollable=!0}initFilter(){this.filter.ChannelID=this.data?.filter?.ChannelID}initChannelOptions(){this.channelOptions=JSON.parse(JSON.stringify(this.data.channelOptions)),this.isSingleChannel&&(this.channelOptions=this.channelOptions.map(t=>(t.disabled=!0,(t.TypeID==T.Tiktok||t.TypeID==T.Tokopedia||t.TypeID==T.Lazada||t.TypeID==T.WooCommerce)&&(t.disabled=!1),t)).sort(t=>t.disabled?1:-1))}onSelectChannel(t){let i=this.filterChannelById(t);this.selectedChannel=i,this.filter.Async=!0,this.iniHasScanUpdate(),this.getLastSync(t)}onClickSelect(){setTimeout(()=>{this.adjustOverlayPosition()},0)}getLastSync(t){this.lastSync$=this.channelService.getLastSync(t).pipe(Ct(i=>(this.selectedChannel.LastSync=i.LastSync,this.setDefaultConfigUpdate(),C.IsNotEmpty(i.LastSync)?C.convertToReadableDate(i.LastSync):null)),te(1))}setDefaultConfigUpdate(){this.filter.UpdatedProduct=!1,this.selectedChannel&&C.IsNotEmpty(this.selectedChannel.LastSync)&&(this.selectedChannel.TypeID==T.Shopee||this.selectedChannel.TypeID==T.Tiktok||this.selectedChannel.TypeID==T.Lazada)&&(this.filter.UpdatedProduct=!0)}iniHasScanUpdate(){this.selectedChannel?.TypeID!=T.WooCommerce&&this.selectedChannel?.TypeID!=T.KalCare&&this.selectedChannel?.TypeID!=T.None&&!this.isSingleChannel?this.hasScanUpdate=!0:this.hasScanUpdate=!1}filterChannelById(t){let i;return this.channelOptions&&(i=this.channelOptions.find(n=>n.ID==t)),i}submit(){this.selectedChannel.TypeID==T.Tokopedia&&this.filter.UpdatedProduct?this.router.navigate(["/menu/products/download/by-url"]).then(()=>{this.dialogRef.close()}):this.dialogRef.close(this.filter)}isNotEmpty(t){return C.IsNotEmpty(t)}onClose(){this.dialogRef.close()}static{this.\u0275fac=function(i){return new(i||e)(x(Et),x(Ft),x(ot))}}static{this.\u0275cmp=I({type:e,selectors:[["app-scan-dialog"]],features:[ct],decls:15,vars:8,consts:[["selectedItem",""],["item",""],[3,"onOk","onClose","onCancel","dynamicValidated","config"],["content",""],[1,"mx-4"],[1,"mb-2","fw-bold"],["optionLabel","Name","optionValue","ID","placeholder","Select a Channel","appendTo","body","filterBy","Name",1,"w-100",2,"--p-select-padding-y","0.75rem",3,"click","ngModelChange","options","ngModel","filter"],["class","mt-4",4,"ngIf"],[1,"mt-8"],["class","mt-8",4,"ngIf"],["matTooltipPosition","above","matTooltipClass","custom-width-tooltip",3,"matTooltip"],[2,"width","18px","margin-right","10px",3,"src"],[1,"mt-4"],[1,"mb-2","fw-bold","mt-3"],["name","scanType",1,"form-control","h-100","rounded-1",3,"ngModelChange","ngModel"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Scans all products across every status in seller center",1,"me-5",3,"value"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Scans products available for sale, including Active, Pending, Seller Deactivated, and Unknown status in seller center",1,"me-5",3,"value"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Scan Product with Active status in seller center",1,"me-5",3,"value"],[1,"me-2"],["name","ScanFull",1,"form-control","h-100","rounded-1",2,"line-height","2",3,"ngModelChange","ngModel"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Scan product from beginning ( use this if you haven't scanned at all)",1,"me-5",3,"value"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above",1,"me-5",3,"value","matTooltip"],["name","Async",1,"form-control","h-100","rounded-1",2,"line-height","2",3,"ngModelChange","ngModel"],["matTooltipClass","custom-width-tooltip","matTooltip","Scan is running in the background, status will be visible in the notification menu","matTooltipPosition","above",1,"me-5",3,"value"],[1,"me-5",3,"value"]],template:function(i,n){if(i&1){let s=S();o(0,"modal-material",2),f("onOk",function(){return m(s),u(n.submit())})("onClose",function(){return m(s),u(n.onClose())})("onCancel",function(){return m(s),u(n.onClose())}),o(1,"div",3)(2,"div",4)(3,"label",5),d(4,"Select a Channel"),r(),o(5,"p-select",6),f("click",function(){return m(s),u(n.onClickSelect())}),F("ngModelChange",function(w){return m(s),E(n.filter.ChannelID,w)||(n.filter.ChannelID=w),u(w)}),f("ngModelChange",function(w){return m(s),u(n.onSelectChannel(w))}),g(6,xi,4,3,"ng-template",null,0,H)(8,yi,4,3,"ng-template",null,1,H)(10,bi,4,3,"ng-template",null,1,H),r(),g(12,wi,9,4,"div",7)(13,Ti,12,8,"div",8)(14,Mi,8,3,"div",9),r()()()}i&2&&(l("dynamicValidated",n.isNotEmpty(n.filter.ChannelID))("config",n.modalConfig),a(5),l("options",n.channelOptions),k("ngModel",n.filter.ChannelID),l("filter",!0),a(7),l("ngIf",!n.isSingleChannel&&n.isNotEmpty(n.filter.ChannelID)),a(),M(n.hasScanUpdate&&n.selectedChannel?13:-1),a(),l("ngIf",!n.isSingleChannel&&n.isNotEmpty(n.filter.ChannelID)))},dependencies:[J,R,Tt,Ln,$n,Dt,G,K,fe,xe,be,ht,ut,Wn,ye],encapsulation:2})}}return e})();var wt=function(e){return e.Tokopedia="https://seller.tokopedia.com",e.Shoope="https://seller.shopee.co.id",e.Tiktok="https://seller-id.tiktok.com",e.WooCommerce="https://woocommerce.dealpos.app",e.Lazada="https://sellercenter.lazada.co.id",e}(wt||{});var Ge={Success:"Success",Info:"Info",Warning:"Warning",Error:"Error"};var Oi=[[["header"]],[["content"]],[["footer"]]],Di=["header","content","footer"],ki=(e,c)=>({bodyScrollable:e,hideScrollbar:c}),Ei=(e,c,t,i)=>({"bg-success":e,"bg-warning":c,"bg-info":t,"bg-danger":i}),Fi=e=>({"mx-auto":e}),Vi=(e,c)=>({"show-footer":e,"p-0":c});function Ni(e,c){if(e&1){let t=S();o(0,"div",8),f("click",function(){m(t);let n=p();return u(n.onBack.emit())}),o(1,"a",9),_(2,"i",10),r()()}}function Ai(e,c){if(e&1){let t=S();o(0,"div")(1,"a",11),f("click",function(){m(t);let n=p();return u(n.onClose.emit())}),_(2,"i",12),r()()}}function Ri(e,c){if(e&1){let t=S();o(0,"a",16),f("click",function(){m(t);let n=p(2);return u(n.onCancel.emit())}),d(1),r()}if(e&2){let t=p(2);a(),y(" ",t.config!=null&&t.config.cancelText?t.config==null?null:t.config.cancelText:"Cancel","")}}function $i(e,c){if(e&1){let t=S();o(0,"button",17),f("click",function(){m(t);let n=p(2);return u(n.onOk.emit())})("keyup.F2",function(){m(t);let n=p(2);return u(n.onOk.emit())}),r()}if(e&2){let t=p(2);l("disabled",!(t.config!=null&&t.config.validated)||!t.dynamicValidated)("innerHTML",t.config!=null&&t.config.okText?t.config==null?null:t.config.okText:"Ok (F2)",oe)}}function Li(e,c){if(e&1&&(o(0,"mat-dialog-actions",13),re(1,2),g(2,Ri,2,1,"a",14)(3,$i,1,2,"button",15),r()),e&2){let t=p();a(2),l("ngIf",!(t.config!=null&&t.config.hideCancel)),a(),l("ngIf",!(t.config!=null&&t.config.hideOk))}}var Ke=class{constructor(){this.title="New Modal",this.okText="Ok (F2)",this.cancelText="Cancel",this.hideFooter=!1,this.hideCancel=!1,this.hideOk=!1,this.hideClose=!1,this.eMoney=!1,this.headerType=Ge.Success,this.validated=!0,this.customWidth="initial",this.bodyScrollable=!1,this.hideScrollbar=!1,this.disableKeyup=!1,this.noPadding=!1}},li=(()=>{class e{constructor(){this.dynamicValidated=!0,this.onOk=new pt,this.onCancel=new pt,this.onClose=new pt,this.onBack=new pt,this.headerType=Ge}ngOnInit(){this.config==null&&(this.config=new Ke)}onKeyup(t){this.config?.disableKeyup||(t.code=="F2"&&this.onOk.emit("F2"),(t.code=="Enter"||t.code=="NumpadEnter")&&this.onOk.emit("Enter"))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=I({type:e,selectors:[["modal-material"]],inputs:{config:"config",dynamicValidated:"dynamicValidated"},outputs:{onOk:"onOk",onCancel:"onCancel",onClose:"onClose",onBack:"onBack"},ngContentSelectors:Di,decls:11,vars:23,consts:[["id","modal_material",1,"modal-material","d-flex","align-items-start","flex-column","position-relative","maxHeight",3,"keyup","ngClass"],["mat-dialog-title","",1,"d-flex","w-100","justify-content-between","modal-header","position-relative",3,"ngClass"],["class","back-button position-absolute pointer d-print-none",3,"click",4,"ngIf"],[1,"d-flex","flex-row","d-print-none","align-items-center",3,"ngClass"],[1,"fw-normal"],[4,"ngIf"],[1,"modal-body","w-100",3,"ngClass"],["class","w-100 py-7 border-top d-flex justify-content-end d-print-none",4,"ngIf"],[1,"back-button","position-absolute","pointer","d-print-none",3,"click"],[1,"btn","back-button"],[1,"fa-solid","fa-arrow-left"],[1,"btn-light-blue","btn-sm","pointer","close",3,"click"],[1,"fa-solid","fa-xmark","fa-lg","text-primary"],[1,"w-100","py-7","border-top","d-flex","justify-content-end","d-print-none"],["class","btn btn-light-blue text-primary btn-lg fw-bold mx-3",3,"click",4,"ngIf"],["class","btn btn-light-blue me-6 text-primary btn-lg fw-bold mx-3","data-cy","btn-ok",3,"disabled","innerHTML","click","keyup.F2",4,"ngIf"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","mx-3",3,"click"],["data-cy","btn-ok",1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3",3,"click","keyup.F2","disabled","innerHTML"]],template:function(i,n){i&1&&(an(Oi),o(0,"div",0),f("keyup",function(h){return n.onKeyup(h)}),o(1,"div",1),g(2,Ni,3,0,"div",2),o(3,"div",3)(4,"h4",4),d(5),r(),re(6),r(),g(7,Ai,3,0,"div",5),r(),o(8,"mat-dialog-content",6),re(9,1),r(),g(10,Li,4,2,"mat-dialog-actions",7),r()),i&2&&(on("width",n.config==null?null:n.config.customWidth),l("ngClass",Wt(10,ki,n.config==null?null:n.config.bodyScrollable,n.config==null?null:n.config.hideScrollbar)),a(),l("ngClass",se(13,Ei,n.headerType.Success==(n.config==null?null:n.config.headerType),n.headerType.Warning==(n.config==null?null:n.config.headerType),n.headerType.Info==(n.config==null?null:n.config.headerType),n.headerType.Error==(n.config==null?null:n.config.headerType))),a(),l("ngIf",n.config==null?null:n.config.eMoney),a(),l("ngClass",P(18,Fi,n.config==null?null:n.config.eMoney)),a(2),N(n.config==null?null:n.config.title),a(2),l("ngIf",!(n.config!=null&&n.config.hideClose)),a(),l("ngClass",Wt(20,Vi,!(n.config!=null&&n.config.hideFooter),n.config==null?null:n.config.noPadding)),a(2),l("ngIf",!(n.config!=null&&n.config.hideFooter)))},dependencies:[J,yt,R,In,bn,wn,vn],styles:[".mat-mdc-dialog-container{padding:0!important;border-radius:4px!important;overflow:visible!important} .mat-mdc-dialog-container [mat-dialog-title]{color:#fff;padding:15px;border:none}@media print{ .mat-mdc-dialog-container{box-shadow:unset;width:100vw}}@media print{ .cdk-overlay-pane{position:absolute!important;top:-30px;max-width:100vw!important}.modal-body[_ngcontent-%COMP%]{width:100vw!important}}body.modal-body[_ngcontent-%COMP%]{height:100%;overflow-y:hidden}mat-dialog-actions[_ngcontent-%COMP%]{bottom:15px}mat-dialog-actions[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{padding:15px!important;margin-right:12px}mat-dialog-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:15px!important}mat-dialog-actions[_ngcontent-%COMP%] .more[_ngcontent-%COMP%]{margin-right:auto;margin-top:-1rem;padding-top:.4rem!important;margin-left:1rem}.back-button[_ngcontent-%COMP%]{top:5px;left:0}.close[_ngcontent-%COMP%]{padding:.4rem .5rem}.no-padding[_ngcontent-%COMP%]{padding:0}.modal-material[_ngcontent-%COMP%]{width:40vw}@media (max-width: 992px){.modal-material[_ngcontent-%COMP%]{width:50vw!important}}@media (max-width: 576px){ .dialog-filter .modal-material{width:100%!important} .dialog-filter mat-dialog-actions{position:sticky;bottom:0;background:#fff} .dialog-filter .modal-material.d-flex.align-items-start.flex-column.position-relative.maxHeight.bodyScrollable.maxHeight.bodyScrollable .modal-body{max-height:100%!important;overflow-y:auto}}.maxHeight.bodyScrollable[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%]{max-height:450px;overflow-y:auto}.modal-header[_ngcontent-%COMP%], .modal-footer[_ngcontent-%COMP%], .modal-footer[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{padding:15px}.modal-dialog[_ngcontent-%COMP%]{max-width:none}.modal-content[_ngcontent-%COMP%]{width:auto;margin:auto;max-width:850px}.maxHeight[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%]{max-height:450px;overflow:auto}.modal-body[_ngcontent-%COMP%]{padding:1rem}.modal-body[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{display:block}.modal-body[_ngcontent-%COMP%] .more[_ngcontent-%COMP%]{margin:0;position:absolute;bottom:-20px}.modal-body[_ngcontent-%COMP%] input[type=text][_ngcontent-%COMP%], .modal-body[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .modal-body[_ngcontent-%COMP%] input[type=password][_ngcontent-%COMP%]{border:1px solid #c8d3df;padding:5px 7px}.modal-body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:330px;height:90px}"]})}}return e})();var Ui=e=>({"is-disabled":e});function Bi(e,c){if(e&1&&(b(0),o(1,"tr")(2,"td",10),d(3),r(),o(4,"td",10),d(5),r(),o(6,"td",11)(7,"p",12),d(8,"Product Not in Channel!"),r()()(),v()),e&2){let t=p().$implicit;a(3),y(" ",t==null?null:t.Model," "),a(2),y(" ",t==null?null:t.Code," ")}}function ji(e,c){if(e&1&&(o(0,"td",10),d(1),r()),e&2){let t=p(3).$implicit;D("rowspan",t.Channel.length),a(),y(" ",t==null?null:t.Model," ")}}function Wi(e,c){if(e&1&&(o(0,"td",10),d(1),r()),e&2){let t=p(3).$implicit;D("rowspan",t.Channel.length),a(),y(" ",t==null?null:t.Code," ")}}function zi(e,c){if(e&1){let t=S();o(0,"tr"),g(1,ji,2,2,"td",13)(2,Wi,2,2,"td",13),o(3,"td",10)(4,"div",14)(5,"a",15),_(6,"img",16),r(),o(7,"div",17),d(8),r()()(),o(9,"td",10),d(10),A(11,"number"),r(),o(12,"td",18),d(13),A(14,"number"),r(),o(15,"td",19)(16,"div",20)(17,"button",21),f("click",function(){let n=m(t).$implicit,s=p(2).$implicit,h=p();return u(h.onDetach(n,s))}),_(18,"i",22),o(19,"span",23),d(20,"Detach"),r()(),o(21,"a",24),_(22,"i",25),o(23,"span",23),d(24,"Edit"),r()()()()()}if(e&2){let t=c.$implicit,i=c.$index,n=p(3);a(),l("ngIf",i==0),a(),l("ngIf",i==0),a(3),l("href",t.Url,O)("title",t.Title),a(),l("src",n.getChannelLogo(t.TypeID),O),a(),l("matTooltip",(t==null||t.Name==null?null:t.Name.length)>40?t==null?null:t.Name:""),a(),y(" ",t.Name," "),a(2),N($(11,12,t.Price)),a(3),N($(14,14,t.Inventory)),a(8),l("href",n.getHyperlinkSellerCenter(t),O)("ngClass",P(16,Ui,t.TypeID==n.channelType.KalCare))("matTooltip",t.TypeID!=n.channelType.KalCare?"Edit this product in Seller Center, inventory changes must be done via DEALPOS":"")}}function Hi(e,c){if(e&1&&Re(0,zi,25,18,"tr",null,Ae),e&2){let t=p().$implicit;$e(t==null?null:t.Channel)}}function Gi(e,c){if(e&1&&g(0,Bi,9,2,"ng-container",9)(1,Hi,2,0,"ng-template",null,0,H),e&2){let t=c.$implicit,i=Q(2);l("ngIf",!t.Channel||t.Channel.length<1)("ngIfElse",i)}}var Ie=(()=>{class e{constructor(t,i){this.data=t,this.dialogRef=i,this.httpService=L(Z),this.toastr=L(Y),this.variants=z([]),this.channelType=T,this.variants.set(this.data.variants),this.title=t.title}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new Vt,this.modalConfig.title=this.data.title,this.modalConfig.bodyScrollable=!0,this.modalConfig.hideFooter=!0,this.modalConfig.customWidth="850px"}onDetach(t,i){let n={ChannelID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariationID:t.ChannelVariationID};this.httpService.post(xn.DetachVariant,[n]).subscribe(s=>{this.toastr.success(s.Message,"Success"),this.updateVariantAfterDetach(i,t.ChannelVariationID)})}updateVariantAfterDetach(t,i){this.variants.update(n=>{let s=n.findIndex(h=>h.ID===t.ID);return s!==-1&&(n[s].Channel=n[s].Channel.filter(h=>h.ChannelVariationID!==i)),[...n]})}getChannelLogo(t){return C.getChannelLogoByTypeId(t)}getHyperlinkSellerCenter(t){let i="javascript:void(0)";switch(t.TypeID){case T.Shopee:i=`${wt.Shoope}/portal/product/${t.ChannelItemID}`;break;case T.Tiktok:i=`${wt.Tiktok}/product/edit/${t.ChannelItemID}`;break;case T.Tokopedia:i=`${wt.Tokopedia}/edit-product/${t.ChannelItemID}`;break;case T.WooCommerce:i=`${wt.WooCommerce}/wp-admin/post.php?post=${t.ChannelItemID}&action=edit`;break;case T.Lazada:i=`${wt.Lazada}/apps/product/publish?productId=${t.ChannelItemID}`;break}return i}static{this.\u0275fac=function(i){return new(i||e)(x(Ft),x(Et))}}static{this.\u0275cmp=I({type:e,selectors:[["app-modal-variant"]],decls:27,vars:1,consts:[["printChannelModal",""],[3,"onClose","onCancel","config"],[1,"table"],[1,"sticky-top-thead","variant-modal"],[1,"text-start","sticky-top"],[1,"d-flex","align-items-center"],["matTooltip","Variant from POS",1,"fas","fa-info-circle","ms-1"],["matTooltip","Product and Variant from each Channel",1,"fas","fa-info-circle","ms-1"],[1,"text-start","sticky-top",2,"width","0%"],[4,"ngIf","ngIfElse"],[1,"text-start"],["colspan","3",1,"text-center"],[1,"my-auto"],["class","text-start",4,"ngIf"],[1,"d-flex"],["target","_blank",1,"me-1",3,"href","title"],[2,"width","20px","height","20px",3,"src"],[1,"text-ellipsis","ps-2",2,"max-width","18vw",3,"matTooltip"],[1,"text-center"],[1,"text-end"],[1,"d-flex","align-items-center","justify-content-end"],[1,"btn","btn-small","btn-light","px-4","py-2","me-3",3,"click"],[1,"fa-sharp","fa-link-slash","me-2",2,"font-size","10px"],[1,"fs-6"],["target","_blank",1,"btn","btn-small","btn-light","px-4","py-2",3,"href","ngClass","matTooltip"],[1,"fa-solid","fa-edit","me-2",2,"font-size","10px"]],template:function(i,n){i&1&&(o(0,"modal-material",1),f("onClose",function(){return n.dialogRef.close()})("onCancel",function(){return n.dialogRef.close()}),o(1,"content")(2,"table",2)(3,"thead",3)(4,"tr")(5,"th",4)(6,"div",5)(7,"span"),d(8,"VARIANT"),r(),o(9,"sup"),_(10,"i",6),r()()(),o(11,"th",4),d(12,"SKU"),r(),o(13,"th",4)(14,"div",5)(15,"span"),d(16,"PRODUCT"),r(),o(17,"sup"),_(18,"i",7),r()()(),o(19,"th",4),d(20,"PRICE"),r(),o(21,"th",8),d(22,"INVENTORY"),r(),_(23,"th",4),r()(),o(24,"tbody"),Re(25,Gi,3,2,null,null,Ae),r()()()()),i&2&&(l("config",n.modalConfig),a(25),$e(n.variants()))},dependencies:[J,yt,R,Mt,ht,ut,li],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.sticky-top-thead[_ngcontent-%COMP%] th.sticky-top[_ngcontent-%COMP%]{top:0}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr.sticky-top[_ngcontent-%COMP%]{border:none!important;border-bottom:1px solid!important}table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]{border-top:none!important;border-left:none!important;border-right:none!important}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background-color:#fff!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child:after{border-right:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child:before{border-left:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:before{border-top:0px}a.is-disabled[_ngcontent-%COMP%]{color:gray;cursor:default}a.is-disabled[_ngcontent-%COMP%]:hover{text-decoration:none}"]})}}return e})();function Ki(e,c){if(e&1&&(o(0,"mat-option",6)(1,"div"),_(2,"img",7),o(3,"span"),d(4),r()()()),e&2){let t=c.$implicit;l("value",t.ChannelID),a(2),l("src",t.logo,O),a(2),N(t.Title)}}var $t=(()=>{class e{constructor(){this.dialogRef=L(Et),this.channels=L(Ft),this.channelIds=z([]),this.channelOptions=z([])}ngOnInit(){this.initModalConfig();let t=this.channels.filter((i,n,s)=>s.findIndex(h=>h.ChannelID===i.ChannelID)===n);this.channelOptions.set(t)}initModalConfig(){this.modalConfig=new Vt,this.modalConfig.title="Detach Product",this.modalConfig.okText="Save"}onClose(){this.dialogRef.close()}onSave(){let t=this.channels.filter(i=>this.channelIds().includes(i.ChannelID)).map(i=>({ChannelID:i.ChannelID,ChannelItemID:i.ChannelItemID}));this.dialogRef.close(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=I({type:e,selectors:[["app-modal-detach-product"]],decls:8,vars:5,consts:[[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[1,"mb-2","fw-bold"],["appearance","outline",1,"w-100"],["name","channelid","placeholder","Channel",1,"mat-select-channel",3,"ngModelChange","ngModel","multiple"],["class","channel-option",3,"value",4,"ngFor","ngForOf"],[1,"channel-option",3,"value"],[2,"width","18px","margin-right","10px",3,"src"]],template:function(i,n){i&1&&(o(0,"modal-material",0),f("onClose",function(){return n.onClose()})("onCancel",function(){return n.onClose()})("onOk",function(){return n.onSave()}),o(1,"div",1)(2,"div")(3,"label",2),d(4,"Select a Channel"),r(),o(5,"mat-form-field",3)(6,"mat-select",4),F("ngModelChange",function(h){return E(n.channelIds,h)||(n.channelIds=h),h}),g(7,Ki,5,3,"mat-option",5),r()()()()()),i&2&&(l("dynamicValidated",n.channelIds().length>0)("config",n.modalConfig),a(6),k("ngModel",n.channelIds),l("multiple",!0),a(),l("ngForOf",n.channelOptions()))},dependencies:[J,U,fe,xe,Un,Zn,Kn,jn,Dt,G,K,ht],encapsulation:2})}}return e})();var Pe=e=>[e];function Zi(e,c){if(e&1){let t=S();o(0,"button",14),f("click",function(){m(t);let n=p(2);return u(n.onDetachMultipleProduct())}),_(1,"i",15),d(2),r()}if(e&2){let t,i=p(2);a(2),y("Detach (",(t=i.productService.selectedProduct(i.products))==null?null:t.length,") ")}}function Ji(e,c){if(e&1&&(b(0),g(1,Zi,3,1,"button",13),v()),e&2){let t=p();a(),M(t.productService.hasSelection(t.products)?1:-1)}}function Qi(e,c){if(e&1){let t=S();o(0,"button",18),f("click",function(){m(t);let n=p(3);return u(n.onOpenScanDialog())}),_(1,"i",19),d(2," Scan Channel "),r()}}function Yi(e,c){if(e&1&&g(0,Qi,3,0,"button",17),e&2){let t=p(2);l("ngIf",!t.productService.hasSelection(t.products))}}function qi(e,c){if(e&1&&(b(0),g(1,Yi,1,1,"button",16),v()),e&2){let t=p();a(),M(t.productService.hasSelection(t.products)?-1:1)}}function Xi(e,c){if(e&1){let t=S();o(0,"button",21),f("click",function(){m(t);let n=p(2);return u(n.onScanMultipleProduct())}),_(1,"i",19),d(2),r()}if(e&2){let t,i=p(2);a(2),y(" Scan (",(t=i.productService.selectedProduct(i.products))==null?null:t.length,") ")}}function to(e,c){if(e&1&&(b(0),g(1,Xi,3,1,"button",20),v()),e&2){let t=p();a(),M(t.productService.hasSelection(t.products)&&t.multipeScanChannels.length>0?1:-1)}}function eo(e,c){if(e&1){let t=S();o(0,"button",23),f("click",function(){m(t);let n=p(2);return u(n.onUploadMultipleProduct())}),_(1,"i",24),d(2),r()}if(e&2){let t,i=p(2);a(2),y(" Upload (",(t=i.productService.selectedProduct(i.products))==null?null:t.length,") ")}}function no(e,c){if(e&1&&(b(0),g(1,eo,3,1,"button",22),v()),e&2){let t=p();a(),M(t.productService.hasSelection(t.products)?1:-1)}}function io(e,c){if(e&1){let t=S();o(0,"div",25)(1,"app-product-card",26),f("onUpload",function(){let n=m(t).$implicit,s=p();return u(s.onUploadToMultipleChannel(n))})("onScan",function(){let n=m(t).$implicit,s=p();return u(s.onScanSingleProduct(n))})("onDescEvent",function(){let n=m(t).index,s=p();return u(s.onOpenDialogVariant(n))})("onCheckBoxChange",function(n){let s=m(t).$implicit;return u(s.selected=n)})("onDetach",function(){let n=m(t).$implicit,s=p();return u(s.onDetachProduct([n]))}),r()()}if(e&2){let t=c.$implicit,i=p();a(),l("productId",t.ID)("title",t==null?null:t.Name)("image",t==null?null:t.ThumbnailUrl)("description",(t==null||t.Variants==null?null:t.Variants.length)>1?(t==null||t.Variants==null?null:t.Variants.length)+" Variants":null)("channels",i.productService.getChannelProduct(t))("code",i.getVariantCode(t==null?null:t.Variants))("showCheckBox",(t==null?null:t.Channel.length)<i.channelOptions.length)("scanButton",!0)("uploadButton",t==null?null:t.hasUpload)("imageForZoom",t==null?null:t.ImageUrl)("detachButton",(t==null||t.Channel==null?null:t.Channel.length)>0)}}function oo(e,c){e&1&&(b(0),o(1,"div",27),_(2,"app-empty-state"),r(),v())}function ao(e,c){if(e&1){let t=S();b(0),o(1,"div",28)(2,"div",29)(3,"app-custom-paginator",30),f("next",function(){m(t);let n=p();return u(n.getProducts())})("previous",function(){m(t);let n=p();return u(n.getProducts())}),r()()(),v()}if(e&2){let t=p();a(3),l("filter",t.searchFilter)("totaldata",t.products==null?null:t.products.length)("paginationTotal",t.rowCount)("hasClicked",!0)("nextButtonAlwaysVisible",!0)}}var pi=(()=>{class e{constructor(t,i,n,s,h,w,ft){this.http=t,this.toastr=i,this.dialog=n,this.productService=s,this.authService=h,this.uploadProductService=w,this.route=ft,this.searchFilter=new _t,this.products=[],this.rowCount=0,this.multipeScanChannels=[],this.scanProductRole=B.ProductScan,this.uploadProductRole=B.ProductUpload,this.detachProductRole=B.ProductDetach,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,[T.Tokopedia,T.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(i=>{this.products=i.Data,this.rowCount=i.Total==null?this.searchFilter.RowCount:i.Total.toString(),this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions)})}onOpenScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=C.GuidEMpty,this.dialog.open(W,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(V(n=>C.IsNotEmpty(n))).subscribe(n=>{this.searchFilter.ChannelID=n.ChannelID,this.searchFilter.ScanFull=n.ScanFull,this.searchFilter.UpdatedProduct=n.UpdatedProduct,this.searchFilter.Async=n.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 i=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.successToastrScanAllProduct(t,i,!this.searchFilter.UpdatedProduct)}})}onOpenDialogVariant(t){let i=this.products[t]?.Variants||[];this.dialog.open(Ie,{data:{title:this.products[t].Name,variants:i}})}onUploadMultipleProduct(){let t=this.productService.selectedProduct(this.products);this.uploadProductService.setSelectedProduct(t),this.route.navigate(["/menu/products/upload"])}onUploadToMultipleChannel(t){this.uploadProductService.setSelectedProduct([t]),this.route.navigate(["/menu/products/upload"])}searchProduct(t){this.searchFilter.text=t,this.getProducts()}onScanMultipleProduct(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=C.GuidEMpty;let i=this.productService.filterChannelByTypeId(this.channelOptions,[T.Tokopedia,T.Tiktok]);this.dialog.open(W,{data:{filter:t,channelOptions:i,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(V(s=>C.IsNotEmpty(s))).subscribe(s=>{this.searchFilter.ChannelID=s.ChannelID,this.searchFilter.ScanFull=s.ScanFull,this.searchFilter.UpdatedProduct=s.UpdatedProduct;let h=this.productService.selectedProduct(this.products),w=this.productService.getVariantCodesProducts(h);this.scanSingleProduct(w)})}onScanSingleProduct(t){let i=JSON.parse(JSON.stringify(this.searchFilter));i.ChannelID=C.GuidEMpty,this.dialog.open(W,{data:{filter:i,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(V(n=>C.IsNotEmpty(n))).subscribe(n=>{this.searchFilter.ChannelID=n.ChannelID;let s=this.productService.getVariantCodesProduct(t);this.scanSingleProduct(s)})}scanSingleProduct(t){this.productService.scanSingle(this.searchFilter.ChannelID,t).subscribe({next:i=>{if(i)this.toastr.success("Successfully Scan ","Success");else{let n=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.toastr.error(`This product is not existed in ${n?.Name} `,"Error")}this.searchFilter.ChannelID=C.GuidEMpty,i&&this.getProducts()},error:i=>{this.searchFilter.ChannelID=C.GuidEMpty}})}getVariantCode(t=[]){let i;return t?.length>1&&(i=(t[0].model?t[0].model:"")+t[0].Code),t?.length==1&&(i=t[0].Code),i}onDetachProduct(t){let i=[];t.forEach(n=>{n.Channel=C.assignChannelLogo(n.Channel),i.push(...n.Channel)}),this.dialog.open($t,{width:"600px",data:[...i]}).afterClosed().pipe(V(n=>C.IsNotEmpty(n)),Ut(n=>this.productService.detachProduct(n))).subscribe(n=>{this.toastr.success(n.Message,ge.Success),this.getProducts()})}onDetachMultipleProduct(){let t=this.productService.selectedProduct(this.products);this.onDetachProduct(t)}static{this.\u0275fac=function(i){return new(i||e)(x(Z),x(Y),x(rt),x(nt),x(q),x(At),x(ot))}}static{this.\u0275cmp=I({type:e,selectors:[["app-in-pos"]],standalone:!1,decls:23,vars:22,consts:[["picker",""],["description","All products which is already available in POS",3,"onSubmit","headerTitle"],[4,"ngxPermissionsOnly"],[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"],[4,"ngIf"],["type","button",1,"btn","btn-outline-secondary","shadow","rounded","me-2"],["type","button",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"fa-sharp","fa-link-slash","me-2"],["type","button","data-cy","scanSoldinChannel",1,"btn","btn-outline-secondary","shadow","rounded"],["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"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"btn","btn-light","shadow","rounded","ms-2"],[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","onDetach","productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","detachButton"],[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","nextButtonAlwaysVisible"]],template:function(i,n){if(i&1){let s=S();o(0,"mainpanel",1),f("onSubmit",function(w){return m(s),u(n.searchProduct(w))}),o(1,"actions"),g(2,Ji,2,1,"ng-container",2)(3,qi,2,1,"ng-container",2)(4,to,2,1,"ng-container",2)(5,no,2,1,"ng-container",2),r(),o(6,"filters")(7,"div")(8,"label",3),d(9,"Category"),r(),o(10,"ng-select",4),f("ngModelChange",function(w){return m(s),u(n.searchFilter.Category=w)}),r()(),o(11,"div",5)(12,"mat-date-range-input",6)(13,"input",7),F("ngModelChange",function(w){return m(s),E(n.startDate,w)||(n.startDate=w),u(w)}),f("click",function(){m(s);let w=Q(16);return u(w.open())}),r(),o(14,"input",8),F("ngModelChange",function(w){return m(s),E(n.endDate,w)||(n.endDate=w),u(w)}),f("click",function(){m(s);let w=Q(16);return u(w.open())}),r()(),_(15,"mat-date-range-picker",null,0),r()(),o(17,"content")(18,"div",9)(19,"div",10),g(20,io,2,11,"div",11)(21,oo,3,0,"ng-container",12),r(),g(22,ao,4,5,"ng-container",12),r()()()}if(i&2){let s=Q(16);l("headerTitle","In POS ("+n.rowCount+")"),a(2),l("ngxPermissionsOnly",P(14,Pe,n.detachProductRole)),a(),l("ngxPermissionsOnly",P(16,Pe,n.scanProductRole)),a(),l("ngxPermissionsOnly",P(18,Pe,n.scanProductRole)),a(),l("ngxPermissionsOnly",P(20,Pe,n.scanProductRole)),a(5),l("clearable",!0)("items",n.Categories)("ngModel",n.searchFilter.Category),a(2),l("rangePicker",s),a(),k("ngModel",n.startDate),a(),k("ngModel",n.endDate),a(6),l("ngForOf",n.products),a(),l("ngIf",n.products.length==0),a(),l("ngIf",n.products.length>0)}},dependencies:[U,R,Ot,G,K,et,mt,lt,gt,it,Qn,Yn,qn,Xn,at],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}"]})}}return e})();var Yt=function(e){return e[e.SkuAndName=0]="SkuAndName",e[e.SKUOnly=1]="SKUOnly",e[e.NameOnly=2]="NameOnly",e}(Yt||{});var Lt=function(e){return e[e.Is=0]="Is",e[e.StartsWith=1]="StartsWith",e[e.EndsWith=2]="EndsWith",e[e.Contains=3]="Contains",e}(Lt||{});var di=["container"],ro=(e,c,t,i)=>({showTransformParams:e,hideTransformParams:c,showTransitionParams:t,hideTransitionParams:i}),lo=e=>({value:"visible",params:e}),so=(e,c)=>({$implicit:e,closeFn:c}),co=e=>({$implicit:e});function po(e,c){e&1&&Le(0)}function mo(e,c){if(e&1&&g(0,po,1,0,"ng-container",3),e&2){let t=p();l("ngTemplateOutlet",t.headlessTemplate)("ngTemplateOutletContext",Wt(2,so,t.message,t.onCloseIconClick))}}function uo(e,c){if(e&1&&_(0,"span",4),e&2){let t=p(3);l("ngClass",t.cx("messageIcon"))}}function ho(e,c){e&1&&_(0,"CheckIcon"),e&2&&D("aria-hidden",!0)("data-pc-section","icon")}function _o(e,c){e&1&&_(0,"InfoCircleIcon"),e&2&&D("aria-hidden",!0)("data-pc-section","icon")}function go(e,c){e&1&&_(0,"TimesCircleIcon"),e&2&&D("aria-hidden",!0)("data-pc-section","icon")}function fo(e,c){e&1&&_(0,"ExclamationTriangleIcon"),e&2&&D("aria-hidden",!0)("data-pc-section","icon")}function Co(e,c){e&1&&_(0,"InfoCircleIcon"),e&2&&D("aria-hidden",!0)("data-pc-section","icon")}function So(e,c){if(e&1&&(o(0,"span",4),g(1,ho,1,2,"CheckIcon")(2,_o,1,2,"InfoCircleIcon")(3,go,1,2,"TimesCircleIcon")(4,fo,1,2,"ExclamationTriangleIcon")(5,Co,1,2,"InfoCircleIcon"),r()),e&2){let t,i=p(3);l("ngClass",i.cx("messageIcon")),D("aria-hidden",!0)("data-pc-section","icon"),a(),M((t=i.message.severity)==="success"?1:t==="info"?2:t==="error"?3:t==="warn"?4:5)}}function xo(e,c){if(e&1&&(b(0),g(1,uo,1,1,"span",6)(2,So,6,4,"span",6),o(3,"div",4)(4,"div",4),d(5),r(),o(6,"div",4),d(7),r()(),v()),e&2){let t=p(2);a(),l("ngIf",t.message.icon),a(),l("ngIf",!t.message.icon),a(),l("ngClass",t.cx("messageText")),D("data-pc-section","text"),a(),l("ngClass",t.cx("summary")),D("data-pc-section","summary"),a(),y(" ",t.message.summary," "),a(),l("ngClass",t.cx("detail")),D("data-pc-section","detail"),a(),N(t.message.detail)}}function yo(e,c){e&1&&Le(0)}function bo(e,c){if(e&1&&_(0,"span",4),e&2){let t=p(4);l("ngClass",t.cx("closeIcon"))}}function vo(e,c){if(e&1&&g(0,bo,1,1,"span",6),e&2){let t=p(3);l("ngIf",t.message.closeIcon)}}function wo(e,c){if(e&1&&_(0,"TimesIcon",4),e&2){let t=p(3);l("ngClass",t.cx("closeIcon")),D("aria-hidden",!0)("data-pc-section","closeicon")}}function Io(e,c){if(e&1){let t=S();o(0,"div")(1,"button",7),f("click",function(n){m(t);let s=p(2);return u(s.onCloseIconClick(n))})("keydown.enter",function(n){m(t);let s=p(2);return u(s.onCloseIconClick(n))}),g(2,vo,1,1,"span",4)(3,wo,1,3,"TimesIcon",4),r()()}if(e&2){let t=p(2);a(),l("ariaLabel",t.closeAriaLabel),D("class",t.cx("closeButton"))("data-pc-section","closebutton"),a(),M(t.message.closeIcon?2:3)}}function Po(e,c){if(e&1&&(o(0,"div",4),g(1,xo,8,10,"ng-container",5)(2,yo,1,0,"ng-container",3)(3,Io,4,4,"div"),r()),e&2){let t=p();dt(t.message==null?null:t.message.contentStyleClass),l("ngClass",t.cx("messageContent")),D("data-pc-section","content"),a(),l("ngIf",!t.template),a(),l("ngTemplateOutlet",t.template)("ngTemplateOutletContext",P(8,co,t.message)),a(),M((t.message==null?null:t.message.closable)!==!1?3:-1)}}var To=["message"],Mo=["headless"];function Oo(e,c){if(e&1){let t=S();o(0,"p-toastItem",3),f("onClose",function(n){m(t);let s=p();return u(s.onMessageClose(n))})("@toastAnimation.start",function(n){m(t);let s=p();return u(s.onAnimationStart(n))})("@toastAnimation.done",function(n){m(t);let s=p();return u(s.onAnimationEnd(n))}),r()}if(e&2){let t=c.$implicit,i=c.index,n=p();l("message",t)("index",i)("life",n.life)("template",n.template||n._template)("headlessTemplate",n.headlessTemplate||n._headlessTemplate)("@toastAnimation",void 0)("showTransformOptions",n.showTransformOptions)("hideTransformOptions",n.hideTransformOptions)("showTransitionOptions",n.showTransitionOptions)("hideTransitionOptions",n.hideTransitionOptions)}}var Do=({dt:e})=>`
2
+ .p-toast {
3
+ width: ${e("toast.width")};
4
+ white-space: pre-line;
5
+ word-break: break-word;
6
+ }
7
+
8
+ .p-toast-message {
9
+ margin: 0 0 1rem 0;
10
+ }
11
+
12
+ .p-toast-message-icon {
13
+ flex-shrink: 0;
14
+ font-size: ${e("toast.icon.size")};
15
+ width: ${e("toast.icon.size")};
16
+ height: ${e("toast.icon.size")};
17
+ }
18
+
19
+ .p-toast-message-content {
20
+ display: flex;
21
+ align-items: flex-start;
22
+ padding: ${e("toast.content.padding")};
23
+ gap: ${e("toast.content.gap")};
24
+ }
25
+
26
+ .p-toast-message-text {
27
+ flex: 1 1 auto;
28
+ display: flex;
29
+ flex-direction: column;
30
+ gap: ${e("toast.text.gap")};
31
+ }
32
+
33
+ .p-toast-summary {
34
+ font-weight: ${e("toast.summary.font.weight")};
35
+ font-size: ${e("toast.summary.font.size")};
36
+ }
37
+
38
+ .p-toast-detail {
39
+ font-weight: ${e("toast.detail.font.weight")};
40
+ font-size: ${e("toast.detail.font.size")};
41
+ }
42
+
43
+ .p-toast-close-button {
44
+ display: flex;
45
+ align-items: center;
46
+ justify-content: center;
47
+ overflow: hidden;
48
+ position: relative;
49
+ cursor: pointer;
50
+ background: transparent;
51
+ transition: background ${e("toast.transition.duration")}, color ${e("toast.transition.duration")}, outline-color ${e("toast.transition.duration")}, box-shadow ${e("toast.transition.duration")};
52
+ outline-color: transparent;
53
+ color: inherit;
54
+ width: ${e("toast.close.button.width")};
55
+ height: ${e("toast.close.button.height")};
56
+ border-radius: ${e("toast.close.button.border.radius")};
57
+ margin: -25% 0 0 0;
58
+ right: -25%;
59
+ padding: 0;
60
+ border: none;
61
+ user-select: none;
62
+ }
63
+
64
+ .p-toast-close-button:dir(rtl) {
65
+ margin: -25% 0 0 auto;
66
+ left: -25%;
67
+ right: auto;
68
+ }
69
+
70
+ .p-toast-message-info,
71
+ .p-toast-message-success,
72
+ .p-toast-message-warn,
73
+ .p-toast-message-error,
74
+ .p-toast-message-secondary,
75
+ .p-toast-message-contrast {
76
+ border-width: ${e("toast.border.width")};
77
+ border-style: solid;
78
+ backdrop-filter: blur(${e("toast.blur")});
79
+ border-radius: ${e("toast.border.radius")};
80
+ }
81
+
82
+ .p-toast-close-icon {
83
+ font-size: ${e("toast.close.icon.size")};
84
+ width: ${e("toast.close.icon.size")};
85
+ height: ${e("toast.close.icon.size")};
86
+ }
87
+
88
+ .p-toast-close-button:focus-visible {
89
+ outline-width: ${e("focus.ring.width")};
90
+ outline-style: ${e("focus.ring.style")};
91
+ outline-offset: ${e("focus.ring.offset")};
92
+ }
93
+
94
+ .p-toast-message-info {
95
+ background: ${e("toast.info.background")};
96
+ border-color: ${e("toast.info.border.color")};
97
+ color: ${e("toast.info.color")};
98
+ box-shadow: ${e("toast.info.shadow")};
99
+ }
100
+
101
+ .p-toast-message-info .p-toast-detail {
102
+ color: ${e("toast.info.detail.color")};
103
+ }
104
+
105
+ .p-toast-message-info .p-toast-close-button:focus-visible {
106
+ outline-color: ${e("toast.info.close.button.focus.ring.color")};
107
+ box-shadow: ${e("toast.info.close.button.focus.ring.shadow")};
108
+ }
109
+
110
+ .p-toast-message-info .p-toast-close-button:hover {
111
+ background: ${e("toast.info.close.button.hover.background")};
112
+ }
113
+
114
+ .p-toast-message-success {
115
+ background: ${e("toast.success.background")};
116
+ border-color: ${e("toast.success.border.color")};
117
+ color: ${e("toast.success.color")};
118
+ box-shadow: ${e("toast.success.shadow")};
119
+ }
120
+
121
+ .p-toast-message-success .p-toast-detail {
122
+ color: ${e("toast.success.detail.color")};
123
+ }
124
+
125
+ .p-toast-message-success .p-toast-close-button:focus-visible {
126
+ outline-color: ${e("toast.success.close.button.focus.ring.color")};
127
+ box-shadow: ${e("toast.success.close.button.focus.ring.shadow")};
128
+ }
129
+
130
+ .p-toast-message-success .p-toast-close-button:hover {
131
+ background: ${e("toast.success.close.button.hover.background")};
132
+ }
133
+
134
+ .p-toast-message-warn {
135
+ background: ${e("toast.warn.background")};
136
+ border-color: ${e("toast.warn.border.color")};
137
+ color: ${e("toast.warn.color")};
138
+ box-shadow: ${e("toast.warn.shadow")};
139
+ }
140
+
141
+ .p-toast-message-warn .p-toast-detail {
142
+ color: ${e("toast.warn.detail.color")};
143
+ }
144
+
145
+ .p-toast-message-warn .p-toast-close-button:focus-visible {
146
+ outline-color: ${e("toast.warn.close.button.focus.ring.color")};
147
+ box-shadow: ${e("toast.warn.close.button.focus.ring.shadow")};
148
+ }
149
+
150
+ .p-toast-message-warn .p-toast-close-button:hover {
151
+ background: ${e("toast.warn.close.button.hover.background")};
152
+ }
153
+
154
+ .p-toast-message-error {
155
+ background: ${e("toast.error.background")};
156
+ border-color: ${e("toast.error.border.color")};
157
+ color: ${e("toast.error.color")};
158
+ box-shadow: ${e("toast.error.shadow")};
159
+ }
160
+
161
+ .p-toast-message-error .p-toast-detail {
162
+ color: ${e("toast.error.detail.color")};
163
+ }
164
+
165
+ .p-toast-message-error .p-toast-close-button:focus-visible {
166
+ outline-color: ${e("toast.error.close.button.focus.ring.color")};
167
+ box-shadow: ${e("toast.error.close.button.focus.ring.shadow")};
168
+ }
169
+
170
+ .p-toast-message-error .p-toast-close-button:hover {
171
+ background: ${e("toast.error.close.button.hover.background")};
172
+ }
173
+
174
+ .p-toast-message-secondary {
175
+ background: ${e("toast.secondary.background")};
176
+ border-color: ${e("toast.secondary.border.color")};
177
+ color: ${e("toast.secondary.color")};
178
+ box-shadow: ${e("toast.secondary.shadow")};
179
+ }
180
+
181
+ .p-toast-message-secondary .p-toast-detail {
182
+ color: ${e("toast.secondary.detail.color")};
183
+ }
184
+
185
+ .p-toast-message-secondary .p-toast-close-button:focus-visible {
186
+ outline-color: ${e("toast.secondary.close.button.focus.ring.color")};
187
+ box-shadow: ${e("toast.secondary.close.button.focus.ring.shadow")};
188
+ }
189
+
190
+ .p-toast-message-secondary .p-toast-close-button:hover {
191
+ background: ${e("toast.secondary.close.button.hover.background")};
192
+ }
193
+
194
+ .p-toast-message-contrast {
195
+ background: ${e("toast.contrast.background")};
196
+ border-color: ${e("toast.contrast.border.color")};
197
+ color: ${e("toast.contrast.color")};
198
+ box-shadow: ${e("toast.contrast.shadow")};
199
+ }
200
+
201
+ .p-toast-message-contrast .p-toast-detail {
202
+ color: ${e("toast.contrast.detail.color")};
203
+ }
204
+
205
+ .p-toast-message-contrast .p-toast-close-button:focus-visible {
206
+ outline-color: ${e("toast.contrast.close.button.focus.ring.color")};
207
+ box-shadow: ${e("toast.contrast.close.button.focus.ring.shadow")};
208
+ }
209
+
210
+ .p-toast-message-contrast .p-toast-close-button:hover {
211
+ background: ${e("toast.contrast.close.button.hover.background")};
212
+ }
213
+
214
+ .p-toast-top-center {
215
+ transform: translateX(-50%);
216
+ }
217
+
218
+ .p-toast-bottom-center {
219
+ transform: translateX(-50%);
220
+ }
221
+
222
+ .p-toast-center {
223
+ min-width: 20vw;
224
+ transform: translate(-50%, -50%);
225
+ }
226
+
227
+ .p-toast-message-enter-from {
228
+ opacity: 0;
229
+ transform: translateY(50%);
230
+ }
231
+
232
+ .p-toast-message-leave-from {
233
+ max-height: 1000px;
234
+ }
235
+
236
+ .p-toast .p-toast-message.p-toast-message-leave-to {
237
+ max-height: 0;
238
+ opacity: 0;
239
+ margin-bottom: 0;
240
+ overflow: hidden;
241
+ }
242
+
243
+ .p-toast-message-enter-active {
244
+ transition: transform 0.3s, opacity 0.3s;
245
+ }
246
+
247
+ .p-toast-message-leave-active {
248
+ transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;
249
+ }
250
+ `,ko={root:({instance:e})=>{let{_position:c}=e;return{position:"fixed",top:c==="top-right"||c==="top-left"||c==="top-center"?"20px":c==="center"?"50%":null,right:(c==="top-right"||c==="bottom-right")&&"20px",bottom:(c==="bottom-left"||c==="bottom-right"||c==="bottom-center")&&"20px",left:c==="top-left"||c==="bottom-left"?"20px":c==="center"||c==="top-center"||c==="bottom-center"?"50%":null}}},Eo={root:({instance:e})=>({"p-toast p-component":!0,[`p-toast-${e._position}`]:!!e._position}),message:({instance:e})=>({"p-toast-message":!0,"p-toast-message-info":e.message.severity==="info"||e.message.severity===void 0,"p-toast-message-warn":e.message.severity==="warn","p-toast-message-error":e.message.severity==="error","p-toast-message-success":e.message.severity==="success","p-toast-message-secondary":e.message.severity==="secondary","p-toast-message-contrast":e.message.severity==="contrast"}),messageContent:"p-toast-message-content",messageIcon:({instance:e})=>({"p-toast-message-icon":!0,[`pi ${e.message.icon}`]:!!e.message.icon}),messageText:"p-toast-message-text",summary:"p-toast-summary",detail:"p-toast-detail",closeButton:"p-toast-close-button",closeIcon:({instance:e})=>({"p-toast-close-icon":!0,[`pi ${e.message.closeIcon}`]:!!e.message.closeIcon})},Oe=(()=>{class e extends kn{name="toast";theme=Do;classes=Eo;inlineStyles=ko;static \u0275fac=(()=>{let t;return function(n){return(t||(t=St(e)))(n||e)}})();static \u0275prov=ne({token:e,factory:e.\u0275fac})}return e})();var Fo=(()=>{class e extends ze{zone;message;index;life;template;headlessTemplate;showTransformOptions;hideTransformOptions;showTransitionOptions;hideTransitionOptions;onClose=new pt;containerViewChild;_componentStyle=L(Oe);timeout;constructor(t){super(),this.zone=t}ngAfterViewInit(){super.ngAfterViewInit(),this.initTimeout()}initTimeout(){this.message?.sticky||this.zone.runOutsideAngular(()=>{this.timeout=setTimeout(()=>{this.onClose.emit({index:this.index,message:this.message})},this.message?.life||this.life||3e3)})}clearTimeout(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)}onMouseEnter(){this.clearTimeout()}onMouseLeave(){this.initTimeout()}onCloseIconClick=t=>{this.clearTimeout(),this.onClose.emit({index:this.index,message:this.message}),t.preventDefault()};get closeAriaLabel(){return this.config.translation.aria?this.config.translation.aria.close:void 0}ngOnDestroy(){this.clearTimeout(),super.ngOnDestroy()}static \u0275fac=function(i){return new(i||e)(x(nn))};static \u0275cmp=I({type:e,selectors:[["p-toastItem"]],viewQuery:function(i,n){if(i&1&&Ue(di,5),i&2){let s;It(s=Pt())&&(n.containerViewChild=s.first)}},inputs:{message:"message",index:[2,"index","index",zt],life:[2,"life","life",zt],template:"template",headlessTemplate:"headlessTemplate",showTransformOptions:"showTransformOptions",hideTransformOptions:"hideTransformOptions",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions"},outputs:{onClose:"onClose"},features:[jt([Oe]),ct],decls:4,vars:15,consts:[["container",""],["role","alert","aria-live","assertive","aria-atomic","true",3,"mouseenter","mouseleave","ngClass"],[3,"ngClass","class"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngClass"],[4,"ngIf"],[3,"ngClass",4,"ngIf"],["type","button","autofocus","",3,"click","keydown.enter","ariaLabel"]],template:function(i,n){if(i&1){let s=S();o(0,"div",1,0),f("mouseenter",function(){return m(s),u(n.onMouseEnter())})("mouseleave",function(){return m(s),u(n.onMouseLeave())}),g(2,mo,1,5,"ng-container")(3,Po,4,10,"div",2),r()}i&2&&(dt(n.message==null?null:n.message.styleClass),l("ngClass",n.cx("message"))("@messageState",P(13,lo,se(8,ro,n.showTransformOptions,n.hideTransformOptions,n.showTransitionOptions,n.hideTransitionOptions))),D("id",n.message==null?null:n.message.id)("data-pc-name","toast")("data-pc-section","root"),a(2),M(n.headlessTemplate?2:3))},dependencies:[J,yt,R,cn,Nn,ai,ri,An,Rn,We],encapsulation:2,data:{animation:[Be("messageState",[hn("visible",me({transform:"translateY(0)",opacity:1})),ue("void => *",[me({transform:"{{showTransformParams}}",opacity:0}),je("{{showTransitionParams}}")]),ue("* => void",[je("{{hideTransitionParams}}",me({height:0,opacity:0,transform:"{{hideTransformParams}}"}))])])]},changeDetection:0})}return e})(),mi=(()=>{class e extends ze{key;autoZIndex=!0;baseZIndex=0;life=3e3;style;styleClass;get position(){return this._position}set position(t){this._position=t,this.cd.markForCheck()}preventOpenDuplicates=!1;preventDuplicates=!1;showTransformOptions="translateY(100%)";hideTransformOptions="translateY(-100%)";showTransitionOptions="300ms ease-out";hideTransitionOptions="250ms ease-in";breakpoints;onClose=new pt;template;headlessTemplate;containerViewChild;messageSubscription;clearSubscription;messages;messagesArchieve;_position="top-right";messageService=L(Ht);_componentStyle=L(Oe);styleElement;id=Nt("pn_id_");templates;ngOnInit(){super.ngOnInit(),this.messageSubscription=this.messageService.messageObserver.subscribe(t=>{if(t)if(Array.isArray(t)){let i=t.filter(n=>this.canAdd(n));this.add(i)}else this.canAdd(t)&&this.add([t])}),this.clearSubscription=this.messageService.clearObserver.subscribe(t=>{t?this.key===t&&(this.messages=null):this.messages=null,this.cd.markForCheck()})}_template;_headlessTemplate;ngAfterContentInit(){this.templates?.forEach(t=>{switch(t.getType()){case"message":this._template=t.template;break;case"headless":this._headlessTemplate=t.template;break;default:this._template=t.template;break}})}ngAfterViewInit(){super.ngAfterViewInit(),this.breakpoints&&this.createStyle()}add(t){this.messages=this.messages?[...this.messages,...t]:[...t],this.preventDuplicates&&(this.messagesArchieve=this.messagesArchieve?[...this.messagesArchieve,...t]:[...t]),this.cd.markForCheck()}canAdd(t){let i=this.key===t.key;return i&&this.preventOpenDuplicates&&(i=!this.containsMessage(this.messages,t)),i&&this.preventDuplicates&&(i=!this.containsMessage(this.messagesArchieve,t)),i}containsMessage(t,i){return t?t.find(n=>n.summary===i.summary&&n.detail==i.detail&&n.severity===i.severity)!=null:!1}onMessageClose(t){this.messages?.splice(t.index,1),this.onClose.emit({message:t.message}),this.cd.detectChanges()}onAnimationStart(t){t.fromState==="void"&&(this.renderer.setAttribute(this.containerViewChild?.nativeElement,this.id,""),this.autoZIndex&&this.containerViewChild?.nativeElement.style.zIndex===""&&Ce.set("modal",this.containerViewChild?.nativeElement,this.baseZIndex||this.config.zIndex.modal))}onAnimationEnd(t){t.toState==="void"&&this.autoZIndex&&Dn(this.messages)&&Ce.clear(this.containerViewChild?.nativeElement)}createStyle(){if(!this.styleElement){this.styleElement=this.renderer.createElement("style"),this.styleElement.type="text/css",this.renderer.appendChild(this.document.head,this.styleElement);let t="";for(let i in this.breakpoints){let n="";for(let s in this.breakpoints[i])n+=s+":"+this.breakpoints[i][s]+" !important;";t+=`
251
+ @media screen and (max-width: ${i}) {
252
+ .p-toast[${this.id}] {
253
+ ${n}
254
+ }
255
+ }
256
+ `}this.renderer.setProperty(this.styleElement,"innerHTML",t),On(this.styleElement,"nonce",this.config?.csp()?.nonce)}}destroyStyle(){this.styleElement&&(this.renderer.removeChild(this.document.head,this.styleElement),this.styleElement=null)}ngOnDestroy(){this.messageSubscription&&this.messageSubscription.unsubscribe(),this.containerViewChild&&this.autoZIndex&&Ce.clear(this.containerViewChild.nativeElement),this.clearSubscription&&this.clearSubscription.unsubscribe(),this.destroyStyle(),super.ngOnDestroy()}static \u0275fac=(()=>{let t;return function(n){return(t||(t=St(e)))(n||e)}})();static \u0275cmp=I({type:e,selectors:[["p-toast"]],contentQueries:function(i,n,s){if(i&1&&(le(s,To,5),le(s,Mo,5),le(s,En,4)),i&2){let h;It(h=Pt())&&(n.template=h.first),It(h=Pt())&&(n.headlessTemplate=h.first),It(h=Pt())&&(n.templates=h)}},viewQuery:function(i,n){if(i&1&&Ue(di,5),i&2){let s;It(s=Pt())&&(n.containerViewChild=s.first)}},inputs:{key:"key",autoZIndex:[2,"autoZIndex","autoZIndex",ce],baseZIndex:[2,"baseZIndex","baseZIndex",zt],life:[2,"life","life",zt],style:"style",styleClass:"styleClass",position:"position",preventOpenDuplicates:[2,"preventOpenDuplicates","preventOpenDuplicates",ce],preventDuplicates:[2,"preventDuplicates","preventDuplicates",ce],showTransformOptions:"showTransformOptions",hideTransformOptions:"hideTransformOptions",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",breakpoints:"breakpoints"},outputs:{onClose:"onClose"},features:[jt([Oe]),ct],decls:3,vars:7,consts:[["container",""],[3,"ngClass","ngStyle"],[3,"message","index","life","template","headlessTemplate","showTransformOptions","hideTransformOptions","showTransitionOptions","hideTransitionOptions","onClose",4,"ngFor","ngForOf"],[3,"onClose","message","index","life","template","headlessTemplate","showTransformOptions","hideTransformOptions","showTransitionOptions","hideTransitionOptions"]],template:function(i,n){i&1&&(o(0,"div",1,0),g(2,Oo,1,10,"p-toastItem",2),r()),i&2&&(ae(n.style),dt(n.styleClass),l("ngClass",n.cx("root"))("ngStyle",n.sx("root")),a(2),l("ngForOf",n.messages))},dependencies:[J,yt,U,sn,Fo,We],encapsulation:2,data:{animation:[Be("toastAnimation",[ue(":enter, :leave",[gn("@*",_n())])])]},changeDetection:0})}return e})();var Vo=()=>({"--p-toast-width":"375px !important"});function No(e,c){e&1&&_(0,"i",4)}function Ao(e,c){e&1&&_(0,"i",5)}function Ro(e,c){e&1&&_(0,"i",6)}function $o(e,c){if(e&1){let t=S();o(0,"button",16),f("click",function(){m(t);let n=p(2);return u(n.copyToClipboard())}),d(1),r()}if(e&2){let t=p(2);a(),y(" ",t.copyText()," ")}}function Lo(e,c){if(e&1){let t=S();o(0,"div",2)(1,"div",3),g(2,No,1,0,"i",4)(3,Ao,1,0,"i",5)(4,Ro,1,0,"i",6),r(),o(5,"div",7)(6,"div",8)(7,"span",9),d(8),r()(),o(9,"div",10),_(10,"app-channel-logo",11),o(11,"div",12),d(12),r()(),o(13,"div",12),_(14,"span",13),r(),o(15,"div",14),g(16,$o,2,1,"button",15),o(17,"button",16),f("click",function(){m(t);let n=p();return u(n.navigateToNotificationPage())}),d(18," Notification "),r()()()()}if(e&2){let t,i=c.$implicit;a(2),M((t=i.severity)==="info"?2:t==="success"?3:t==="error"?4:-1),a(6),N(i.text),a(2),l("showChannelName",!1)("width",14)("height",14)("typeId",i==null||i.data==null?null:i.data.channelTypeId),a(2),N(i==null||i.data==null?null:i.data.channelName),a(2),l("innerHTML",i.detail,oe),a(2),M(i.severity=="info"?16:-1)}}var De=(()=>{class e{constructor(){this.toastr=L(_e),this.messageService=L(Ht),this.router=L(ot),this.jobId=z(null),this.copyText=z("Copy"),this.key=z(0),this.stringKey=ln(()=>JSON.stringify(this.key())),this.listenOnShowToast()}listenOnShowToast(){this.toastr.onShowToast$.pipe(fn()).subscribe(t=>{this.copyText.set("Copy"),this.jobId.set(t?.data?.jobId),this.messageService.add(t)})}copyToClipboard(){navigator.clipboard.writeText(this.jobId()).then(()=>{this.copyText.set("Copied")})}navigateToNotificationPage(){this.router.navigate(["/menu/products/status/notificationV2"]),this.messageService.clear()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=I({type:e,selectors:[["scan-channel-toastr"]],features:[jt([Ht])],decls:3,vars:4,consts:[["message",""],["position","top-right",1,"p-toast-custom",3,"baseZIndex"],[1,"d-flex","align-items-start","gap-3","flex-fill"],[1,"pt-2"],[1,"fa-solid","fa-circle-info","info-icon-color","fs-4"],[1,"fa-solid","fa-circle-check","success-icon-color","fs-4"],[1,"fa-solid","fa-circle-xmark","error-icon-color","fs-4"],[1,"d-flex","flex-column","align-items-start","flex-fill","gap-1"],[1,"d-flex","align-items-center","gap-2","flex-fill"],[1,"fw-bold","fs-4"],[1,"fs-6","d-flex","align-items-center","mt-1"],[3,"showChannelName","width","height","typeId"],[1,"opacity-75"],[3,"innerHTML"],[1,"d-flex","align-items-center","gap-8","mt-2",2,"font-size","12px"],[1,"btn","btn-icon-only","fw-medium"],[1,"btn","btn-icon-only","fw-medium",3,"click"]],template:function(i,n){i&1&&(o(0,"p-toast",1),g(1,Lo,19,9,"ng-template",null,0,H),r()),i&2&&(ae(xt(3,Vo)),l("baseZIndex",5e3))},dependencies:[mi,Fn],styles:[`.p-toast-custom .p-toast-message.p-toast-message-info,.p-toast-custom .p-toast-message.p-toast-message-success,.p-toast-custom .p-toast-message.p-toast-message-error{background-color:#fff!important;color:#000}.p-toast-custom .p-toast-message.p-toast-message-info{border-left:8px solid #0078d4!important}.p-toast-custom .p-toast-message.p-toast-message-success{border-left:8px solid #28a745!important}.p-toast-custom .p-toast-message.p-toast-message-error{border-left:8px solid #dc3545!important}.info-icon-color{color:#0078d4!important}.success-icon-color{color:#28a745!important}.error-icon-color{color:#dc3545!important}
257
+ `],encapsulation:2})}}return e})();var Qe=e=>[e];function Bo(e,c){if(e&1){let t=S();o(0,"button",16),f("click",function(){m(t);let n=p(2);return u(n.onDetachMultipleProduct())}),_(1,"i",17),d(2),r()}if(e&2){let t,i=p(2);a(2),y("Detach (",(t=i.productService.selectedProduct(i.products))==null?null:t.length,") ")}}function jo(e,c){if(e&1&&(b(0),g(1,Bo,3,1,"button",15),v()),e&2){let t=p();a(),M(t.productService.hasSelection(t.products)?1:-1)}}function Wo(e,c){if(e&1){let t=S();o(0,"div",18)(1,"button",20),f("click",function(){m(t);let n=p(2);return u(n.onScanAllProducts())}),_(2,"i",21),d(3," Scan Channel "),r(),_(4,"button",22),o(5,"ul",23)(6,"li")(7,"a",24),f("click",function(){m(t);let n=p(2);return u(n.onScanAllV2Products())}),_(8,"i",21),d(9," Scan Channel V2 "),r()()()()}}function zo(e,c){if(e&1){let t=S();o(0,"button",25),f("click",function(){m(t);let n=p(2);return u(n.onScanMultipleProduct())}),_(1,"i",21),d(2),r()}if(e&2){let t=p(2);a(2),y(" Scan (",t.productService.selectedProduct(t.products).length,") ")}}function Ho(e,c){if(e&1&&(b(0),g(1,Wo,10,0,"div",18)(2,zo,3,1,"button",19),v()),e&2){let t=p();a(),M(t.productService.hasSelection(t.products)?t.multipeScanChannels.length>0&&t.productService.hasSelection(t.products)?2:-1:1)}}function Go(e,c){if(e&1){let t=S();o(0,"button",27),f("click",function(){m(t);let n=p(2);return u(n.onUploadMultipleProduct())}),_(1,"i",28),d(2),r()}if(e&2){let t=p(2);a(2),y(" Upload (",t.productService.selectedProduct(t.products).length,") ")}}function Ko(e,c){if(e&1&&(b(0),g(1,Go,3,1,"button",26),v()),e&2){let t=p();a(),M(t.productService.hasSelection(t.products)?1:-1)}}function Zo(e,c){if(e&1&&(o(0,"span",29),_(1,"img",30),r(),d(2)),e&2){let t=c.item;a(),l("src",t.Img,O)("alt",t.Name),a(),y(" ",t.Name," ")}}function Jo(e,c){if(e&1){let t=S();o(0,"div",5)(1,"label",2),d(2,"Item ID"),r(),o(3,"input",31),F("ngModelChange",function(n){m(t);let s=p();return E(s.searchFilter.Item_id,n)||(s.searchFilter.Item_id=n),u(n)}),r()()}if(e&2){let t=p();a(3),k("ngModel",t.searchFilter.Item_id)}}function Qo(e,c){if(e&1){let t=S();o(0,"div",32)(1,"app-product-card",33),f("onUpload",function(){let n=m(t).$implicit,s=p();return u(s.onUploadToMultipleChannel(n))})("onDescEvent",function(){let n=m(t).index,s=p();return u(s.onOpenVariantDetail(n))})("onScan",function(){let n=m(t).$implicit,s=p();return u(s.onScanSingleProduct(n))})("onCheckBoxChange",function(n){let s=m(t).$implicit;return u(s.selected=n)})("onDetach",function(){let n=m(t).$implicit,s=p();return u(s.onDetachProduct([n]))}),r()()}if(e&2){let t=c.$implicit,i=p();a(),l("productId",t==null?null:t.ID)("title",t==null?null:t.Name)("image",t==null?null:t.ThumbnailUrl)("description",(t==null||t.Variants==null?null:t.Variants.length)>1?(t==null||t.Variants==null?null:t.Variants.length)+" Variants":null)("channels",i.productService.getChannelProduct(t))("code",i.getVariantCode(t==null?null:t.Variants))("showCheckBox",t==null?null:t.hasScan)("scanButton",!0)("uploadButton",t==null?null:t.hasUpload)("imageForZoom",t==null?null:t.ImageUrl)("detachButton",(t==null||t.Channel==null?null:t.Channel.length)>0)}}function Yo(e,c){e&1&&(b(0),o(1,"div",34),_(2,"app-empty-state"),r(),v())}function qo(e,c){if(e&1){let t=S();o(0,"div",35)(1,"div",36)(2,"app-custom-paginator",37),f("total",function(){m(t);let n=p();return u(n.getRowCount())})("next",function(){m(t);let n=p();return u(n.getProducts())})("previous",function(){m(t);let n=p();return u(n.getProducts())}),r()()()}if(e&2){let t=p();a(2),l("filter",t.searchFilter)("totaldata",t.products==null?null:t.products.length)("paginationTotal",t.rowCount)("hasClicked",t.hasClickRowCount)}}var ui=(()=>{class e{constructor(t,i,n,s,h,w,ft,qt,Ee){this.http=t,this.dialog=i,this.toastr=n,this.productService=s,this.activateRouter=h,this.authService=w,this.route=ft,this.uploadProductService=qt,this.scanChannelToastr=Ee,this.searchFilter=new _t,this.products=[],this.rowCount=0,this.hasClickRowCount=!1,this.guidEmpty=C.GuidEMpty,this.multipeScanChannels=[],this.filterOptions=z({SearchComparatorTypeOptions:[],SearchSKUOnlyOrSKUNameOptions:[]}),this.searchPlaceholder=z("Search ..."),this.scanProductRole=B.ProductScan,this.uploadProductRole=B.ProductUpload,this.detachProductRole=B.ProductDetach,this.channelOptions=this.authService.getChannels(),this.initMultiScanChannels()}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(C.GuidEMpty)})}initPageLoader(t){this.productService.loader(t).subscribe(i=>{this.filterOptions.set(i.Options),this.searchFilter=i.Filter,i.Filter.ChannelID!=C.GuidEMpty&&(this.searchFilter.ListChannelID=[],this.searchFilter.ListChannelID.push(i.Filter.ChannelID)),this.searchFilter.PageSize=i.Filter?.RowCount,this.searchFilter.Item_id="",this.getProducts(),this.onChangeSearchType()})}onChangeSearchType(){let t=this.searchFilter.SearchType,i=this.searchFilter.NumberFilterComparator,n="Search ...";switch(t){case Yt.SkuAndName:n="SKU / Name";break;case Yt.SKUOnly:n="SKU";break;case Yt.NameOnly:n="Name";break}switch(i){case Lt.StartsWith:n=`${n} Starts With`;break;case Lt.EndsWith:n=`${n} Ends With`;break;case Lt.Contains:n=`${n} Contains`;break;case Lt.Is:n=`${n} Is`;break}this.searchPlaceholder.set(n)}initMultiScanChannels(){this.multipeScanChannels=this.productService.filterChannelByTypeId(this.channelOptions,[T.Tokopedia,T.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,NumberFilterComparator:this.searchFilter.NumberFilterComparator,SearchType:this.searchFilter.SearchType};this.productService.findAllSoldInChannel(t).subscribe(i=>{this.products=i.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(),this.onChangeSearchType()}onOpenVariantDetail(t){let i=this.products[t].Variants;this.dialog.open(Ie,{data:{variants:i,title:this.products[t].Name}})}onScanAllProducts(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=C.GuidEMpty,this.dialog.open(W,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(V(n=>C.IsNotEmpty(n))).subscribe(n=>{this.searchFilter.ChannelID=n.ChannelID,this.searchFilter.ScanFull=n.ScanFull,this.searchFilter.UpdatedProduct=n.UpdatedProduct,this.searchFilter.Async=n.Async,this.scanAllProduct()})}onScanAllV2Products(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=C.GuidEMpty,this.dialog.open(W,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(V(i=>C.IsNotEmpty(i)),Ut(i=>this.productService.scanProductV2(i.ChannelID,i.ScanFull,i.UpdatedProduct,i.Async))).subscribe(()=>{this.initPageLoader(C.GuidEMpty)})}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(V(i=>i)).subscribe(i=>{this.searchFilter.Async||(this.productService.successToastrScanAllProduct(i,t,!this.searchFilter.UpdatedProduct),this.initPageLoader(C.GuidEMpty))})}onScanSingleProduct(t){t.Channel=this.productService.getChannelProduct(t);let i=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(W,{data:{filter:i,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(V(n=>C.IsNotEmpty(n))).subscribe(n=>{this.searchFilter.ChannelID=n.ChannelID;let s=this.productService.getVariantCodesProduct(t);this.scanProducts(s)})}onUploadToMultipleChannel(t){this.uploadProductService.setSelectedProduct([t]),this.route.navigate(["/menu/products/upload"])}onScanMultipleProduct(){this.searchFilter.ChannelID=C.GuidEMpty;let t=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(W,{data:{filter:t,channelOptions:this.multipeScanChannels,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(V(n=>C.IsNotEmpty(n))).subscribe(n=>{this.searchFilter.ChannelID=n.ChannelID,this.searchFilter.ScanFull=n.ScanFull,this.searchFilter.UpdatedProduct=n.UpdatedProduct;let s=this.productService.selectedProduct(this.products),h=this.productService.getVariantCodesProducts(s);this.scanProducts(h)})}scanProducts(t){this.productService.scanSingle(this.searchFilter.ChannelID,t).subscribe({next:i=>{let n=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);i?this.toastr.success(`Product Successfully scan with ${n?.Name}`,"Success"):this.toastr.error(`This product is not existed in ${n?.Name} `,"Error"),this.searchFilter.ChannelID=C.GuidEMpty,i&&this.getProducts()},error:i=>{this.searchFilter.ChannelID=C.GuidEMpty}})}getVariantCode(t){let i;return t.length>1&&(i=(t[0].model?t[0].model:"")+t[0].Code),t.length==1&&(i=t[0].Code),i}onClearFilterChannel(){this.searchFilter.ChannelID=C.GuidEMpty,this.searchFilter.Item_id=""}onUploadMultipleProduct(){let t=this.productService.selectedProduct(this.products);this.uploadProductService.setSelectedProduct(t),this.route.navigate(["/menu/products/upload"])}getRowCount(){let t={ListChannelID:this.searchFilter.ListChannelID,text:this.searchFilter.text};this.http.post("/api/product/GetSoldInChannelRowCount",t).subscribe(i=>{this.hasClickRowCount=!0,this.rowCount=i.Total})}onDetachProduct(t){let i=[];t.forEach(n=>{n.Channel=C.assignChannelLogo(n.Channel),i.push(...n.Channel)}),this.dialog.open($t,{width:"600px",data:[...i]}).afterClosed().pipe(V(n=>C.IsNotEmpty(n)),Ut(n=>this.productService.detachProduct(n))).subscribe(n=>{this.toastr.success(n.Message,ge.Success),this.getProducts()})}onDetachMultipleProduct(){let t=this.productService.selectedProduct(this.products);this.onDetachProduct(t)}static{this.\u0275fac=function(i){return new(i||e)(x(Z),x(rt),x(Y),x(nt),x(pe),x(q),x(ot),x(At),x(_e))}}static{this.\u0275cmp=I({type:e,selectors:[["app-sold-in-channel"]],standalone:!1,decls:28,vars:23,consts:[["description","SKU has been mapped between dealpos and marketplace",3,"onSubmit","headerTitle","searchBoxPlaceHolder"],[4,"ngxPermissionsOnly"],[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",""],[1,"mt-5"],["bindLabel","Value","bindValue","Key","placeholder","Number Filter Comparator","name","numberFilterComparator","appendTo","body",3,"ngModelChange","items","ngModel"],[1,"mt-6"],[1,"border","border-1","rounded-1","p-4"],[3,"ngModelChange","options","ngModel"],[1,"container-fluid"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],[4,"ngIf"],["class","row",4,"ngIf"],["type","button",1,"btn","btn-outline-secondary","shadow","rounded","me-2"],["type","button",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"fa-sharp","fa-link-slash","me-2"],[1,"btn-group","me-3","shadow"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2"],[1,"btn","btn-outline-secondary","border-end-0",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["data-bs-toggle","dropdown","aria-expanded","false",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu",2,"cursor","pointer"],[1,"dropdown-item",3,"click"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"btn","btn-light","shadow","rounded","ms-2"],[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"],["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","onDetach","productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","detachButton"],[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(i,n){i&1&&(o(0,"mainpanel",0),f("onSubmit",function(h){return n.searchProduct(h)}),o(1,"actions"),g(2,jo,2,1,"ng-container",1)(3,Ho,3,1,"ng-container",1)(4,Ko,2,1,"ng-container",1),r(),o(5,"filters")(6,"div")(7,"label",2),d(8,"Channel"),r(),o(9,"ng-select",3),f("ngModelChange",function(h){return n.searchFilter.ListChannelID=h})("clear",function(){return n.onClearFilterChannel()}),g(10,Zo,3,3,"ng-template",4),r()(),g(11,Jo,4,1,"div",5),o(12,"div",5)(13,"label",2),d(14,"Number Filter Comparator"),r(),o(15,"ng-select",6),F("ngModelChange",function(h){return E(n.searchFilter.NumberFilterComparator,h)||(n.searchFilter.NumberFilterComparator=h),h}),r()(),o(16,"div",7)(17,"label",2),d(18,"Search Type"),r(),o(19,"div",8)(20,"lib-radio-options",9),F("ngModelChange",function(h){return E(n.searchFilter.SearchType,h)||(n.searchFilter.SearchType=h),h}),r()()()(),o(21,"content"),_(22,"scan-channel-toastr"),o(23,"div",10)(24,"div",11),g(25,Qo,2,11,"div",12)(26,Yo,3,0,"ng-container",13),r(),g(27,qo,3,4,"div",14),r()()()),i&2&&(l("headerTitle","Sold in Channel")("searchBoxPlaceHolder",n.searchPlaceholder()),a(2),l("ngxPermissionsOnly",P(17,Qe,n.detachProductRole)),a(),l("ngxPermissionsOnly",P(19,Qe,n.scanProductRole)),a(),l("ngxPermissionsOnly",P(21,Qe,n.uploadProductRole)),a(5),l("clearable",!0)("multiple",!0)("items",n.channelOptions)("ngModel",n.searchFilter.ListChannelID),a(2),M(n.searchFilter.ListChannelID!=null?11:-1),a(4),l("items",n.filterOptions().SearchComparatorTypeOptions),k("ngModel",n.searchFilter.NumberFilterComparator),a(5),l("options",n.filterOptions().SearchSKUOnlyOrSKUNameOptions),k("ngModel",n.searchFilter.SearchType),a(5),l("ngForOf",n.products),a(),l("ngIf",n.products.length==0),a(),l("ngIf",n.products==null?null:n.products.length))},dependencies:[U,R,Ot,G,K,et,mt,kt,he,lt,gt,it,at,ve,De],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}"]})}}return e})();var hi=(()=>{class e{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 Fe(null),this.destroy$=new Xt,this.data$=this.paginationFunction()}onNextPage(t){t.PageNumber+=1,this.pagination$.next(t)}setPageNumberFooter(t){this.footerPageNumber=t.PageNumber}setPaginationButtonState(t,i){i==0?this.disableNextButton=!0:this.disableNextButton=!(i<t.RowCount*t.PageNumber)}reloadPagination(t){C.IsEmpty(t.PageNumber)&&(t.PageNumber=1),this.pagination$.next(t),this.hideCount=!0,this.goToLastPage=!1}getAllData(t,i){t.RowCount=i,this.pagination$.next(t),this.goToLastPage=!0}destroy(){this.destroy$.next(!0),this.destroy$.complete(),this.pagination$=null,this.pagination$=new Fe(null),this.data$=this.paginationFunction()}paginationFunction(){return this.pagination$.pipe(Bt(this.destroy$),V(t=>t!=null),qe(t=>this.http.post(`/API/${this.fetchDataEndpoint}`,JSON.stringify(t)).pipe(Ct(i=>i.Data))),tn(this.pagination$),Xe((t,i)=>{let[n,s]=t,[h]=i;return s.PageNumber==1?[h,s]:[n.concat(h),s]}),ee(([t,i])=>{this.setPageNumberFooter(i),this.setPaginationButtonState(i,t.length)}),Ct(([t])=>t),te())}static{this.\u0275fac=function(i){return new(i||e)(en(Z))}}static{this.\u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var ke=e=>[e];function ta(e,c){if(e&1){let t=S();o(0,"button",12),f("click",function(){m(t);let n=p(3);return u(n.uploadMultipleProduct())}),_(1,"i",13),d(2),r()}if(e&2){let t=p(3);a(2),y(" upload (",t.selectedProducts==null?null:t.selectedProducts.length,") ")}}function ea(e,c){if(e&1&&(b(0),g(1,ta,3,1,"button",11),v()),e&2){let t=p(2);a(),l("ngIf",t.hasSelectionProduct)}}function na(e,c){if(e&1){let t=S();b(0),o(1,"button",14),f("click",function(){m(t);let n=p(2);return u(n.openScanDialog())}),_(2,"i",15),d(3," Scan Channel "),r(),v()}}function ia(e,c){e&1&&(b(0),_(1,"th",23),v())}function oa(e,c){if(e&1){let t=S();b(0),o(1,"td",30)(2,"input",31),F("ngModelChange",function(n){m(t);let s=p(3).$implicit;return E(s.selected,n)||(s.selected=n),u(n)}),f("ngModelChange",function(){m(t);let n=p(4).ngIf,s=p(3);return u(s.onSelectProduct(n))}),r()(),v()}if(e&2){let t=p(3).$implicit;a(),l("rowSpan",t==null?null:t.Variants.length),a(),k("ngModel",t.selected)}}function aa(e,c){if(e&1&&(b(0),g(1,oa,3,2,"ng-container",10),v()),e&2){let t=p().index;a(),l("ngIf",t==0)}}function ra(e,c){if(e&1){let t=S();b(0),o(1,"img",36),f("click",function(n){m(t);let s=p(3).$implicit,h=p(4);return u(h.onZoomImage(n,s==null?null:s.ImageUrl))}),r(),v()}if(e&2){let t=p(3).$implicit;a(),l("src",t==null?null:t.ImageUrl,O)}}function la(e,c){e&1&&_(0,"img",37)}function sa(e,c){if(e&1&&(b(0),o(1,"td",30)(2,"div",32),g(3,ra,2,1,"ng-container",9)(4,la,1,0,"ng-template",null,1,H),r()(),o(6,"td",33)(7,"h4",34)(8,"span",35),d(9),r()()(),v()),e&2){let t=Q(5),i=p(2).$implicit;a(),l("rowSpan",i==null?null:i.Variants.length),a(2),l("ngIf",i==null?null:i.ImageUrl)("ngIfElse",t),a(3),l("rowSpan",i==null?null:i.Variants.length),a(2),l("matTooltip",(i==null||i.Name==null?null:i.Name.length)>50?i==null?null:i.Name:""),a(),y(" ",i==null?null:i.Name," ")}}function ca(e,c){if(e&1&&(o(0,"div")(1,"a",26),_(2,"img",38),r()()),e&2){let t=c.$implicit;a(),l("href",t.URL,O),a(),l("src",t.Img,O)("matTooltip",t.Name)}}function pa(e,c){if(e&1&&(o(0,"div"),_(1,"img",38),r()),e&2){let t=c.$implicit;a(),l("src",t.Img,O)("matTooltip",t.Name)}}function da(e,c){if(e&1&&(o(0,"tr"),g(1,aa,2,1,"ng-container",4)(2,sa,10,6,"ng-container",10),o(3,"td"),d(4),r(),o(5,"td")(6,"span"),d(7),r(),o(8,"span",25)(9,"a",26),_(10,"i",27),r()()(),o(11,"td",28)(12,"div",29),g(13,ca,3,3,"div",24),r()(),o(14,"td",28)(15,"div",29),g(16,pa,2,2,"div",24),r()()()),e&2){let t=c.$implicit,i=c.index,n=p(5);a(),l("ngxPermissionsOnly",P(7,ke,n.uploadProductRole)),a(),l("ngIf",i==0),a(2),y(" ",t.Name," "),a(3),y(" ",t.Code," "),a(2),l("href",n.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(t==null?null:t.ID),O),a(4),l("ngForOf",t==null?null:t.Available),a(3),l("ngForOf",t==null?null:t.NotAvailable)}}function ma(e,c){if(e&1&&(b(0),g(1,da,17,9,"tr",24),v()),e&2){let t=c.$implicit;a(),l("ngForOf",t.Variants)}}function ua(e,c){if(e&1&&(o(0,"tbody"),g(1,ma,2,1,"ng-container",24),r()),e&2){let t=c.ngIf;a(),l("ngForOf",t)}}function ha(e,c){if(e&1&&(b(0),o(1,"div",16)(2,"table",17)(3,"thead",18)(4,"tr"),g(5,ia,2,0,"ng-container",4),o(6,"th",19),d(7," Product "),r(),o(8,"th",20),d(9,"Variant"),r(),o(10,"th",20),d(11,"SKU"),r(),o(12,"th",21),d(13,"Available In"),r(),o(14,"th",22),d(15,"Not Available In"),r()()(),g(16,ua,2,1,"tbody",10),A(17,"async"),r()(),v()),e&2){let t=p(2);a(5),l("ngxPermissionsOnly",P(4,ke,t.uploadProductRole)),a(11),l("ngIf",$(17,2,t.data$))}}function _a(e,c){e&1&&(o(0,"div",39),_(1,"app-empty-state"),r())}function ga(e,c){if(e&1){let t=S();o(0,"span",47),f("click",function(){m(t);let n=p(4);return u(n.getRowCount())}),o(1,"i",48),d(2,"?"),r()()}}function fa(e,c){if(e&1&&(o(0,"span"),d(1),A(2,"number"),r()),e&2){let t=c.ngIf;a(),N($(2,1,t==null?null:t.Count))}}function Ca(e,c){if(e&1){let t=S();o(0,"a",49),f("click",function(){m(t);let n=p(4);return u(n.onNextPage())}),_(1,"i",50),d(2," Next"),r()}}function Sa(e,c){if(e&1){let t=S();o(0,"a",51),f("click",function(){m(t);let n=p(4);return u(n.onLastPage())}),_(1,"i",52),d(2," Last"),r()}}function xa(e,c){if(e&1&&(b(0),o(1,"div",40)(2,"div",41)(3,"div",42),d(4),A(5,"number"),g(6,ga,3,0,"span",43)(7,fa,3,3,"span",10),A(8,"async"),d(9),r()(),o(10,"div",44),g(11,Ca,3,0,"a",45)(12,Sa,3,0,"a",46),r()(),v()),e&2){let t=p().ngIf,i=p(2);a(4),y(" Showing 1 - ",$(5,6,t==null?null:t.length)," of "),a(2),l("ngIf",i.paginationService.hideCount),a(),l("ngIf",!i.paginationService.hideCount&&$(8,8,i.rowCount$)),a(2),y(" records ~ ",i.paginationService.footerPageNumber," Page "),a(2),l("ngIf",i.paginationService.disableNextButton&&!i.paginationService.goToLastPage),a(),l("ngIf",i.paginationService.disableNextButton&&!i.paginationService.goToLastPage)}}function ya(e,c){if(e&1&&(b(0),g(1,xa,13,10,"ng-container",10),v()),e&2){let t=c.ngIf;a(),l("ngIf",(t==null?null:t.length)>0)}}function ba(e,c){if(e&1){let t=S();o(0,"mainpanel",3),f("onSubmit",function(n){m(t);let s=p();return u(s.searchProduct(n))}),o(1,"actions"),g(2,ea,2,1,"ng-container",4)(3,na,4,0,"ng-container",4),o(4,"button",5),f("click",function(){m(t);let n=p();return u(n.openExportDialog())}),_(5,"i",6),o(6,"span"),d(7,"Export"),r()()(),o(8,"content")(9,"div",7)(10,"div",8),g(11,ha,18,6,"ng-container",9),A(12,"async"),g(13,_a,2,0,"ng-template",null,0,H),r(),g(15,ya,2,1,"ng-container",10),A(16,"async"),r()()()}if(e&2){let t,i=Q(14),n=p();l("hideSearchDropdown",!0),a(2),l("ngxPermissionsOnly",P(10,ke,n.uploadProductRole)),a(),l("ngxPermissionsOnly",P(12,ke,n.scanProductRole)),a(8),l("ngIf",((t=$(12,6,n.data$))==null?null:t.length)>0)("ngIfElse",i),a(4),l("ngIf",$(16,8,n.data$))}}var _i=(()=>{class e{constructor(t,i,n,s,h,w,ft,qt,Ee){this.http=t,this.dialog=i,this.toastr=n,this.route=s,this.productService=h,this.paginationService=w,this.biggerPictureService=ft,this.authService=qt,this.uploadProductService=Ee,this.loaderAPI="product/Load",this.rowCountAPI="product/GetNotInChannelRowCount",this.notChannelAPI="product/GetNotInChannelV2",this.hasSelectionProduct=!1,this.selectedProducts=[],this.scanProductRole=B.ProductScan,this.uploadProductRole=B.ProductUpload,this.channelOptions=qt.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(ee(t=>{this.filterSearch=t.Filter,this.paginationService.reloadPagination(t.Filter)}))}iniData(){this.data$=this.paginationService.data$.pipe(Ct(t=>(t=t.map(i=>(i.Variants=i.Variants.map(n=>(n.Available=this.productService.sortChannel(n.Available),n.NotAvailable=this.productService.sortChannel(n.NotAvailable),n.Available=this.assignLogoChannel(n.Available),n.NotAvailable=this.assignLogoChannel(n.NotAvailable),n)),i.Channel=i?.Variants[0]?.Available,i)),t)))}assignLogoChannel(t){return t=t.map(i=>(i.Img=C.getChannelLogoByTypeId(i.TypeID),i)),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(i=>{this.filterSearch.Async?this.toastr.success("You will be notified when the scan is completed.","Scan Asynchronous"):(this.productService.successToastrScanAllProduct(i,t,!this.filterSearch.UpdatedProduct),this.initPageLoader())})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.filterSearch));t.ChannelID=C.GuidEMpty,this.dialog.open(W,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(V(n=>C.IsNotEmpty(n))).subscribe(n=>{this.filterSearch.ChannelID=n.ChannelID,this.filterSearch.ScanFull=n.ScanFull,this.filterSearch.UpdatedProduct=n.UpdatedProduct,this.filterSearch.Async=n.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,i){this.biggerPictureService.openBiggerPicture(t,i)}onSelectProduct(t){this.hasSelectionProduct=this.productService.hasSelection(t),this.selectedProducts=this.productService.selectedProduct(t)}uploadMultipleProduct(){this.uploadProductService.setSelectedProduct(this.selectedProducts),this.route.navigate(["/menu/products/upload"])}ngOnDestroy(){this.paginationService.destroy()}openExportDialog(){this.dialog.open(ei,{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()}static{this.\u0275fac=function(i){return new(i||e)(x(Z),x(rt),x(Y),x(ot),x(nt),x(hi),x(Jn),x(q),x(At))}}static{this.\u0275cmp=I({type:e,selectors:[["app-not-in-channel"]],standalone:!1,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"],[4,"ngxPermissionsOnly"],[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"],["class","btn btn-light shadow rounded ms-2",3,"click",4,"ngIf"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],["data-cy","scanNotinChannel","type","button",1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],[1,"col-md-12"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],["colspan","2",1,"ms-5","text-center",2,"width","450px"],[2,"width","150px"],[2,"width","20%"],[2,"width","16%"],[2,"width","10px"],[4,"ngFor","ngForOf"],[1,"ms-1"],["target","_blank",3,"href"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","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(i,n){i&1&&(g(0,ba,17,14,"mainpanel",2),A(1,"async")),i&2&&l("ngIf",$(1,1,n.loader$))},dependencies:[U,R,un,G,K,et,ut,it,at,Tt,Mt],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%}"]})}}return e})();var Ye=e=>[e],va=()=>[];function wa(e,c){if(e&1){let t=S();o(0,"button",16),f("click",function(){m(t);let n=p(2);return u(n.openScanDialog())}),_(1,"i",17),d(2," Scan Channel "),r()}}function Ia(e,c){if(e&1&&(b(0),g(1,wa,3,0,"button",15),v()),e&2){let t=p();a(),M(t.productService.hasSelection(t.products)?-1:1)}}function Pa(e,c){if(e&1){let t=S();o(0,"button",19),f("click",function(){m(t);let n=p(2);return u(n.onDownloadAllProduct("SELECTED"))}),_(1,"i",20),d(2),r()}if(e&2){let t,i=p(2);a(2),y(" Download (",(t=i.productService.selectedProduct(i.products))==null?null:t.length,") ")}}function Ta(e,c){if(e&1&&(b(0),g(1,Pa,3,1,"button",18),v()),e&2){let t=p();a(),M(t.productService.hasSelection(t.products)?1:-1)}}function Ma(e,c){if(e&1&&(o(0,"span",21),_(1,"img",22),r(),d(2)),e&2){let t=c.item;a(),l("src",t.Img,O)("alt",t.Name),a(),y(" ",t.Name," ")}}function Oa(e,c){if(e&1){let t=S();o(0,"div",23)(1,"app-product-card",24),f("onCheckBoxChange",function(n){let s=m(t).index,h=p();return u(h.onSelectProduct(n,s))})("onDescEvent",function(){let n=m(t).index,s=p();return u(s.onShowVariantDetail(n))})("onDownload",function(){let n=m(t).$implicit,s=p();return u(s.onDownloadProduct(n))})("onScan",function(){let n=m(t).$implicit,s=p();return u(s.onScanChannel(n))}),r()()}if(e&2){let t=c.$implicit,i=p();a(),l("showRedirectIcon",!1)("title",t==null?null:t.Name)("image",t==null?null:t.Image)("imageForZoom",t==null?null:t.Image)("code",t==null?null:t.SKU)("description",(t==null||t.Variant==null?null:t.Variant.length)>0?(t==null||t.Variant==null?null:t.Variant.length)+" Variants":null)("downloadButton",!0)("channels",t!=null&&t.Channel?P(10,Ye,t==null?null:t.Channel):xt(12,va))("showCheckBox",i.hasDownloadRole())("scanButton",!0)}}function Da(e,c){e&1&&(b(0),o(1,"div",25),_(2,"app-empty-state"),r(),v())}function ka(e,c){if(e&1){let t=S();o(0,"div",26)(1,"div",27)(2,"app-custom-paginator",28),f("total",function(){m(t);let n=p();return u(n.getRowCount())})("next",function(){m(t);let n=p();return u(n.getProducts())})("previous",function(){m(t);let n=p();return u(n.getProducts())}),r()()()}if(e&2){let t=p();a(2),l("filter",t.searchFilter)("totaldata",t.products==null?null:t.products.length)("paginationTotal",t.rowCount)("hasClicked",t.hasClickRowCount)}}var gi=(()=>{class e{constructor(t,i,n,s,h,w){this.http=t,this.dialog=i,this.productService=n,this.toastrService=s,this.activateRouter=h,this.authService=w,this.permissionService=L(Cn),this.searchFilter=new _t,this.products=[],this.hasClickRowCount=!1,this.scanProductRole=B.ProductScan,this.downloadProductRole=B.ProductDownload,this.hasDownloadRole=z(!0),this.channelOptions=this.authService.getChannels(),this.permissionService.hasPermission(this.downloadProductRole).then(ft=>{this.hasDownloadRole.set(ft)})}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(C.GuidEMpty)})}initPageLoader(t){this.productService.loader(t).subscribe(i=>{this.searchFilter=i.Filter,this.searchFilter.PageSize=i.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(i=>(t=this.channelOptions.find(n=>n.ID==i.ChannelID),t?i.Channel=JSON.parse(JSON.stringify(t)):i.Channel=null,i)).map(i=>(i.Channel&&(i.Channel.Url=i.Url),i))}setSkuProduct(){this.products=this.products.map(t=>(t?.Variant?.length==0?C.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=C.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(i=>{this.searchFilter.Async?this.toastrService.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.initPageLoader(C.GuidEMpty),this.productService.successToastrScanAllProduct(i,t,!this.searchFilter.UpdatedProduct)),this.searchFilter.ChannelID=C.GuidEMpty})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=C.GuidEMpty,this.dialog.open(W,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(V(n=>C.IsNotEmpty(n))).subscribe(n=>{this.searchFilter.ChannelID=n.ChannelID,this.searchFilter.UpdatedProduct=n.UpdatedProduct,this.searchFilter.ScanFull=n.ScanFull,this.searchFilter.Async=n.Async,this.onScanAll()})}onDownloadAllProduct(t){let i;t=="ALL"?i=this.products:i=this.productService.selectedProduct(this.products),i.length>0&&this.productService.downloadMultipleProduct(i).subscribe({next:()=>{this.getProducts()}})}onSelectProduct(t,i){this.products[i].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 i=JSON.parse(JSON.stringify(t));delete i.Channel,this.productService.scanCompareToPos([i]).subscribe(n=>{n.Status?(this.initPageLoader(C.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 i=this.products[t].Variant;i.length>0&&this.dialog.open(ni,{data:{title:this.products[t].Name,variants:i},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(i=>{this.hasClickRowCount=!0,this.rowCount=i.Count})}static{this.\u0275fac=function(i){return new(i||e)(x(Z),x(rt),x(nt),x(Y),x(pe),x(q))}}static{this.\u0275cmp=I({type:e,selectors:[["app-not-in-pos"]],standalone:!1,decls:30,vars:17,consts:[["headerTitle","Not in POS","textButton","Search","description","SKU sold in Marketplace but not exist in DEALPOS",3,"onSubmit"],[4,"ngxPermissionsOnly"],[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"],[4,"ngIf"],["class","row",4,"ngIf"],["type","button","data-cy","scanNotInPos",1,"btn","btn-outline-secondary","shadow","rounded"],["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"],["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(i,n){i&1&&(o(0,"mainpanel",0),f("onSubmit",function(h){return n.onSearch(h)}),o(1,"actions"),g(2,Ia,2,1,"ng-container",1)(3,Ta,2,1,"ng-container",1),r(),o(4,"filters")(5,"div")(6,"label",2),d(7,"Channel"),r(),o(8,"ng-select",3),F("ngModelChange",function(h){return E(n.searchFilter.ChannelID,h)||(n.searchFilter.ChannelID=h),h}),g(9,Ma,3,3,"ng-template",4),r()(),o(10,"div",5)(11,"label",6),d(12,"SKU Assigned"),r(),o(13,"mat-radio-group",7),F("ngModelChange",function(h){return E(n.searchFilter.HaveSku,h)||(n.searchFilter.HaveSku=h),h}),o(14,"mat-radio-button",8),d(15," All "),r(),o(16,"mat-radio-button",8),d(17," Yes "),r(),o(18,"mat-radio-button",8),d(19," No "),r()()(),o(20,"div",5)(21,"label",6),d(22,"Item ID"),r(),o(23,"input",9),F("ngModelChange",function(h){return E(n.searchFilter.Item_id,h)||(n.searchFilter.Item_id=h),h}),r()()(),o(24,"content")(25,"div",10)(26,"div",11),g(27,Oa,2,13,"div",12)(28,Da,3,0,"ng-container",13),r(),g(29,ka,3,4,"div",14),r()()()),i&2&&(a(2),l("ngxPermissionsOnly",P(13,Ye,n.scanProductRole)),a(),l("ngxPermissionsOnly",P(15,Ye,n.downloadProductRole)),a(5),l("clearable",!0)("items",n.channelOptions),k("ngModel",n.searchFilter.ChannelID),a(5),k("ngModel",n.searchFilter.HaveSku),a(),l("value",0),a(2),l("value",1),a(2),l("value",2),a(5),k("ngModel",n.searchFilter.Item_id),a(4),l("ngForOf",n.products),a(),l("ngIf",n.products.length==0),a(),l("ngIf",(n.products==null?null:n.products.length)>0))},dependencies:[U,R,Ot,G,K,et,mt,kt,ye,be,lt,gt,it,at],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}"]})}}return e})();function Ea(e,c){if(e&1&&(o(0,"span",11),_(1,"img",12),r(),d(2)),e&2){let t=c.item,i=p();a(),l("src",i.getChannelLogo(t.TypeID),O),a(),y(" ",t.Name," ")}}function Fa(e,c){if(e&1&&(o(0,"div",13),_(1,"app-duplicate-product-card",14),r()),e&2){let t=c.$implicit,i=c.index;a(),l("imageForZoom",t.ImageUrl)("title",t.Name)("code",t.Code)("id",i)("image",t.ThumbnailURL)("channels",t.Channels)("totalChannel",t.Total)}}function Va(e,c){e&1&&(b(0),o(1,"div",15),_(2,"app-empty-state"),r(),v())}function Na(e,c){if(e&1){let t=S();b(0),o(1,"div",16)(2,"div",17)(3,"app-custom-paginator",18),f("next",function(){m(t);let n=p();return u(n.getProducts())})("previous",function(){m(t);let n=p();return u(n.getProducts())})("total",function(){m(t);let n=p();return u(n.getRowCount())}),r()()(),v()}if(e&2){let t=p();a(3),l("filter",t.searchFilter)("totaldata",t.products==null?null:t.products.length)("paginationTotal",t.rowCount)("hasClicked",t.hasClickedRowCount)}}var fi=(()=>{class e{constructor(t,i,n){this.httpService=t,this.productService=i,this.authService=n,this.searchFilter=new _t,this.products=[],this.hasClickedRowCount=!1,this.getPageLoader(),this.channelOptions=n.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(i=>{this.products=i.Data})}onSearch(t){this.searchFilter.text=t,this.hasClickedRowCount=!1,this.getProducts()}onClearFilter(){this.searchFilter.ChannelID=C.GuidEMpty}getChannelLogo(t){return C.getChannelLogoByTypeId(t)}getRowCount(){let t={text:this.searchFilter.text,ChannelID:this.searchFilter.ChannelID};this.httpService.post("/api/product/GetDuplicateInChannelRowCount",t).subscribe(i=>{this.hasClickedRowCount=!0,this.rowCount=i.Total})}static{this.\u0275fac=function(i){return new(i||e)(x(Z),x(nt),x(q))}}static{this.\u0275cmp=I({type:e,selectors:[["app-duplicate-sku"]],standalone:!1,decls:19,vars:7,consts:[["headerTitle","Multiple Listing","textButton"," Search","description","SKU(s) which is listed more than one time (one to many)",3,"onSubmit"],["routerLink","/menu/products/status/duplicate-sku/table",1,"btn","btn-outline-secondary","btn-lg","d-flex","align-items-center","gap-2"],[1,"fa-solid","fa-table"],["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","totalChannel"],[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(i,n){i&1&&(o(0,"mainpanel",0),f("onSubmit",function(h){return n.onSearch(h)}),o(1,"actions")(2,"a",1),_(3,"i",2),o(4,"span"),d(5,"Table View"),r()()(),o(6,"filters")(7,"div",3)(8,"div")(9,"h6",4),d(10,"Channel"),r(),o(11,"ng-select",5),F("ngModelChange",function(h){return E(n.searchFilter.ListChannelID,h)||(n.searchFilter.ListChannelID=h),h}),f("clear",function(){return n.onClearFilter()}),g(12,Ea,3,2,"ng-template",6),r()()()(),o(13,"content")(14,"div",7)(15,"div",8),g(16,Fa,2,7,"div",9)(17,Va,3,0,"ng-container",10),r(),g(18,Na,4,4,"ng-container",10),r()()()),i&2&&(a(11),l("multiple",!0)("clearable",!0)("items",n.channelOptions),k("ngModel",n.searchFilter.ListChannelID),a(5),l("ngForOf",n.products),a(),l("ngIf",(n.products==null?null:n.products.length)==0),a(),l("ngIf",(n.products==null?null:n.products.length)>0))},dependencies:[U,R,G,K,et,mt,kt,he,we,lt,de,it],encapsulation:2})}}return e})();var Aa=()=>["/menu/products/status/sold-in-channel"],Ci=e=>({ID:e}),Ra=()=>["/menu/products/status/not-in-pos"],$a=e=>[e];function La(e,c){if(e&1&&(b(0),d(1),v()),e&2){let t=p().$implicit;a(),y(" ",t.Count," ")}}function Ua(e,c){if(e&1){let t=S();o(0,"span",25),f("click",function(){m(t);let n=p().$implicit,s=p(2);return u(s.getLiveProductCount(n.ID,n))}),_(1,"i",26),r()}}function Ba(e,c){if(e&1){let t=S();b(0),o(1,"button",27),f("click",function(){m(t);let n=p().$implicit,s=p(2);return u(s.onScanChannel(n))}),_(2,"i",28),d(3," Scan "),r(),v()}}function ja(e,c){if(e&1){let t=S();o(0,"tr")(1,"td"),_(2,"img",17),o(3,"span",18),d(4),r()(),o(5,"td",19),g(6,La,2,1,"ng-container",6)(7,Ua,2,0,"ng-template",null,1,H),r(),o(9,"td",19)(10,"a",20),d(11),A(12,"number"),r()(),o(13,"td",19)(14,"a",20),d(15),A(16,"number"),r()(),o(17,"td"),d(18),A(19,"date"),r(),o(20,"td")(21,"div",21),g(22,Ba,4,0,"ng-container",22),o(23,"button",23),f("click",function(){let n=m(t).$implicit,s=p(2);return u(s.onClearCache(n.ID))}),_(24,"i",24),d(25," Clear "),r()()()()}if(e&2){let t=c.$implicit,i=Q(8),n=p(2);a(2),l("src",n.getChannelLogo(t.TypeID),O),a(2),N(t.Name),a(2),l("ngIf",t.Count!==void 0)("ngIfElse",i),a(4),l("routerLink",xt(19,Aa))("queryParams",P(20,Ci,t.ID)),a(),y(" ",$(12,12,t.SoldInChannel)," "),a(3),l("routerLink",xt(22,Ra))("queryParams",P(23,Ci,t.ID)),a(),y(" ",$(16,14,t.NotInPOS)," "),a(3),y(" ",t.LastSync?rn(19,16,t.LastSync,"dd MMM yyyy HH:mm"):"Never"," "),a(4),l("ngxPermissionsOnly",P(25,$a,n.scanProductRole))}}function Wa(e,c){if(e&1&&(b(0),o(1,"div",7)(2,"table",8)(3,"thead",9)(4,"tr",10)(5,"th"),d(6,"Channel"),r(),o(7,"th",11),d(8," Live Product "),r(),o(9,"th",12),d(10," Sold In Channel "),r(),o(11,"th",13),d(12," Product Not in POS "),r(),o(13,"th",14),d(14,"Last Sync"),r(),_(15,"th",15),r()(),o(16,"tbody"),g(17,ja,26,27,"tr",16),A(18,"async"),r()()(),v()),e&2){let t,i=p();a(17),l("ngForOf",(t=$(18,1,i.channels$))==null?null:t.Data)}}function za(e,c){e&1&&(o(0,"div",29),_(1,"app-empty-state"),r())}var Si=(()=>{class e{constructor(t,i,n,s){this.productService=t,this.toastr=i,this.dialog=n,this.authService=s,this.scanProductRole=B.ProductScan,this.destroy$=new Xt,this.channelOptions=s.getChannels()}ngOnInit(){this.setObsProductStatistic()}setObsProductStatistic(){this.channels$=this.productService.getProductStatistic()}getLiveProductCount(t,i){this.productService.getTotalProductLive(t).pipe(Bt(this.destroy$)).subscribe(n=>{i.Count=n.Count})}onScanChannel(t){this.dialog.open(W,{width:"700px",data:{channelOptions:this.channelOptions,filter:{ChannelID:t.ID},disabledChannelOption:!0}}).afterClosed().pipe(V(i=>C.IsNotEmpty(i))).subscribe(i=>{this.scanAllProduct(t.ID,i)})}scanAllProduct(t,i){let n=this.productService.findChannelById(t,this.channelOptions);this.productService.scanAll(i.ChannelID,i.ScanFull,i.UpdatedProduct,i.Async).pipe(V(s=>s)).subscribe(s=>{i.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(s,n,!i.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(Bt(this.destroy$)).subscribe(n=>{this.toastr.success("Successfully cleared cache","Success"),this.setObsProductStatistic()})}getChannelLogo(t){return C.getChannelLogoByTypeId(t)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static{this.\u0275fac=function(i){return new(i||e)(x(nt),x(Y),x(rt),x(q))}}static{this.\u0275cmp=I({type:e,selectors:[["app-channel-statistic"]],standalone:!1,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"],[4,"ngxPermissionsOnly"],[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,"btn","btn-sm","btn-secondary","fs-6",3,"click"],[1,"fa","fa-spinner"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(i,n){if(i&1&&(o(0,"mainpanel",2)(1,"content")(2,"div",3)(3,"div",4)(4,"div",5),g(5,Wa,19,3,"ng-container",6),A(6,"async"),g(7,za,2,0,"ng-template",null,0,H),r()()()()()),i&2){let s,h=Q(8);l("hideSearchBox",!0)("hideSearchDropdown",!0),a(5),l("ngIf",((s=$(6,4,n.channels$))==null||s.Data==null?null:s.Data.length)>0)("ngIfElse",h)}},dependencies:[U,R,et,ut,de,it,at,Tt,Mt,pn],encapsulation:2})}}return e})();var Ha=[{component:oi,path:"",children:[{path:"",redirectTo:"sold-in-channel",pathMatch:"full"},{path:"in-pos",component:pi,canActivate:[X,tt],data:{title:"Products in POS"}},{path:"sold-in-channel",component:ui,canActivate:[X,tt],data:{title:"Products Sold in Channel"}},{path:"not-in-channel",component:_i,canActivate:[X,tt],data:{title:"Products not in Channel"}},{path:"not-in-pos",component:gi,canActivate:[X,tt],data:{title:"Products not in POS"}},{path:"duplicate-sku",component:fi,canActivate:[X,tt],data:{title:"Duplicate Sku in Channel"}},{path:"duplicate-sku/table",loadComponent(){return import("./chunk-GRQD4D2I.js").then(e=>e.DuplicateSkuV2Component)},canActivate:[X,tt],data:{title:"Duplicate Sku in Channel"}},{path:"channel-statistic",component:Si,canActivate:[X,tt],data:{title:"Channel Statistic"}},{path:"notification",loadComponent(){return import("./chunk-BDKGOINV.js").then(e=>e.NotificationComponent)},canActivate:[X,tt],data:{title:"Notification"}},{path:"notificationV2",loadComponent(){return import("./chunk-TM6DZ3ZF.js").then(e=>e.NotificationV2Component)},canActivate:[X,tt],data:{title:"Notification"}},{path:"notification/detailV2",loadComponent(){return import("./chunk-WEYKQCVQ.js").then(e=>e.DetailComponent)},canActivate:[X,tt],data:{title:"Notification Detail"}},{path:"notification/detail",loadComponent(){return import("./chunk-A57T33JT.js").then(e=>e.DetailComponent)},canActivate:[X,tt],data:{title:"Notification Detail"}}]}],hc=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=Ne({type:e})}static{this.\u0275inj=Ve({imports:[J,Dt,Mn,ht,yn,ii,Bn,Tn,we,lt,gt,mn.forChild(Ha),ti,zn,$t,Sn,ve,De]})}}return e})();export{hc as StatusModule};