marketplacepos 26.44.0 → 26.44.1

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 (66) hide show
  1. package/Marketplace/{chunk-WHWTIACL.js → chunk-2CJYUXAM.js} +1 -1
  2. package/Marketplace/{chunk-RBEQRGC3.js → chunk-2DOM5CWZ.js} +1 -1
  3. package/Marketplace/{chunk-KFDGIETK.js → chunk-2IFT6WHQ.js} +1 -1
  4. package/Marketplace/{chunk-DPB6F5JO.js → chunk-2P5B4CJE.js} +1 -1
  5. package/Marketplace/{chunk-RDD27FVJ.js → chunk-2XI4N62F.js} +1 -1
  6. package/Marketplace/{chunk-N3X6LYCC.js → chunk-36OSQ4VK.js} +1 -1
  7. package/Marketplace/{chunk-IDHA5FQH.js → chunk-43RHFERL.js} +1 -1
  8. package/Marketplace/{chunk-GESFA2ZC.js → chunk-4AXSVAPT.js} +1 -1
  9. package/Marketplace/{chunk-AP4VVI4Q.js → chunk-4DWF57R7.js} +1 -1
  10. package/Marketplace/{chunk-FF26XLTH.js → chunk-4MM3SEKB.js} +1 -1
  11. package/Marketplace/{chunk-5R5VSKST.js → chunk-4TXYZL75.js} +1 -1
  12. package/Marketplace/{chunk-W27XJPMH.js → chunk-55ZMUV3A.js} +1 -1
  13. package/Marketplace/{chunk-W6MIFW5U.js → chunk-5P3COLSI.js} +1 -1
  14. package/Marketplace/{chunk-XKUGAXOU.js → chunk-5RC4HLBT.js} +1 -1
  15. package/Marketplace/{chunk-XBK4V6E5.js → chunk-6PPXJZD3.js} +1 -1
  16. package/Marketplace/{chunk-RH62JCAG.js → chunk-7L26QFNQ.js} +1 -1
  17. package/Marketplace/{chunk-GGXBO54D.js → chunk-7METZ65D.js} +1 -1
  18. package/Marketplace/chunk-7QIEAIFJ.js +3 -0
  19. package/Marketplace/{chunk-AJRIEXAZ.js → chunk-7URMKOMN.js} +1 -1
  20. package/Marketplace/{chunk-AUPM35MA.js → chunk-7YRNGS5Y.js} +1 -1
  21. package/Marketplace/{chunk-WRI2Y2AL.js → chunk-AS4XRZAN.js} +1 -1
  22. package/Marketplace/{chunk-SRN7IBV7.js → chunk-AUVV4M43.js} +1 -1
  23. package/Marketplace/{chunk-4DQDJDWR.js → chunk-B2R6CNO2.js} +1 -1
  24. package/Marketplace/{chunk-TNVMVUFJ.js → chunk-BGIMW6JC.js} +1 -1
  25. package/Marketplace/{chunk-ON6KM3OX.js → chunk-EKUFS5NF.js} +1 -1
  26. package/Marketplace/{chunk-MKVEYBIH.js → chunk-HKVEBEUU.js} +1 -1
  27. package/Marketplace/{chunk-ZZ7RVUST.js → chunk-IBTND5GC.js} +1 -1
  28. package/Marketplace/{chunk-573SRSN2.js → chunk-IOKGPTYN.js} +1 -1
  29. package/Marketplace/{chunk-JQGFFQTR.js → chunk-JTZZMQ3O.js} +1 -1
  30. package/Marketplace/{chunk-QZ4E2XRZ.js → chunk-K6RMUUPZ.js} +1 -1
  31. package/Marketplace/{chunk-LZUUCVEY.js → chunk-KD6EBXGO.js} +1 -1
  32. package/Marketplace/{chunk-62H5VEXV.js → chunk-KIRLZNFI.js} +1 -1
  33. package/Marketplace/{chunk-KS5RMDHP.js → chunk-LG6K7KGL.js} +1 -1
  34. package/Marketplace/{chunk-CJG5IRCS.js → chunk-LHVFHZJS.js} +1 -1
  35. package/Marketplace/{chunk-7IHWCG7V.js → chunk-LIZRBMVN.js} +1 -1
  36. package/Marketplace/{chunk-MY5XC6YO.js → chunk-LQAT4VKO.js} +1 -1
  37. package/Marketplace/{chunk-OHSE4HCU.js → chunk-MEGJOWGP.js} +1 -1
  38. package/Marketplace/{chunk-AJAAOUOP.js → chunk-N7UGEETM.js} +1 -1
  39. package/Marketplace/{chunk-JLWYF6CA.js → chunk-NS2LQNPH.js} +1 -1
  40. package/Marketplace/{chunk-X4NK3VLV.js → chunk-NUEVSM3Y.js} +1 -1
  41. package/Marketplace/{chunk-HO4HAIWH.js → chunk-PHYXUM7S.js} +1 -1
  42. package/Marketplace/{chunk-EAAWYMGM.js → chunk-Q7BUGO3N.js} +1 -1
  43. package/Marketplace/{chunk-3CACAFL7.js → chunk-QO3JQ74R.js} +1 -1
  44. package/Marketplace/{chunk-3EK2HGB5.js → chunk-QWB337JM.js} +1 -1
  45. package/Marketplace/{chunk-G5NSFJHJ.js → chunk-R64NVQOW.js} +1 -1
  46. package/Marketplace/chunk-RTDW6OMT.js +1 -0
  47. package/Marketplace/{chunk-YJG3OPMM.js → chunk-RVSHMJ2L.js} +1 -1
  48. package/Marketplace/{chunk-BJ4PF3IX.js → chunk-SCJXQMOP.js} +1 -1
  49. package/Marketplace/{chunk-ALAG4HXV.js → chunk-SZGAKYXG.js} +1 -1
  50. package/Marketplace/{chunk-SFFPXVOD.js → chunk-TV357KH7.js} +1 -1
  51. package/Marketplace/{chunk-XDMGP3CQ.js → chunk-U66BXHEQ.js} +1 -1
  52. package/Marketplace/{chunk-QT46BBIE.js → chunk-UC4GQODC.js} +2 -2
  53. package/Marketplace/{chunk-H6W5ETMM.js → chunk-USX5ZNMZ.js} +1 -1
  54. package/Marketplace/{chunk-TAVCB44W.js → chunk-VBZ6YZMT.js} +1 -1
  55. package/Marketplace/{chunk-7JXTAGFY.js → chunk-VSFC7Q65.js} +1 -1
  56. package/Marketplace/{chunk-U5IJUOZZ.js → chunk-WMZ4X6QY.js} +1 -1
  57. package/Marketplace/{chunk-TNOFQGQU.js → chunk-WVCSTOLM.js} +1 -1
  58. package/Marketplace/{chunk-7TZMLIVI.js → chunk-XBTAD7AT.js} +1 -1
  59. package/Marketplace/{chunk-Z2UK6C26.js → chunk-XSM7S7BE.js} +1 -1
  60. package/Marketplace/{chunk-YVCOOQHK.js → chunk-XSVI7UPG.js} +1 -1
  61. package/Marketplace/{chunk-4T46J7KF.js → chunk-Z5SRHA2C.js} +1 -1
  62. package/Marketplace/index.html +2 -2
  63. package/Marketplace/{main-VYIV4BMZ.js → main-UCJNP3PD.js} +2 -2
  64. package/package.json +1 -1
  65. package/Marketplace/chunk-AOVACJRS.js +0 -3
  66. package/Marketplace/chunk-DIITCV4M.js +0 -1
@@ -1,4 +1,4 @@
1
- import{b as nn}from"./chunk-G346YBOK.js";import{c as on,d as an}from"./chunk-DEBF436Y.js";import"./chunk-RZM45AEI.js";import"./chunk-H276HPOG.js";import"./chunk-SJBVLNCR.js";import{a as en}from"./chunk-A46ZW26C.js";import{a as B}from"./chunk-5CH6HZVM.js";import{a as Ze,b as qe}from"./chunk-WN24A4VJ.js";import"./chunk-WM7WOQJI.js";import{e as Ge}from"./chunk-ALAG4HXV.js";import{a as Je}from"./chunk-AF67O6OF.js";import{a as $e}from"./chunk-7KG3DC5J.js";import{a as Qe}from"./chunk-PGDBJOSL.js";import{c as Ye}from"./chunk-NH7UFKXO.js";import{a as tn}from"./chunk-6YRYXHZS.js";import{a as Xe}from"./chunk-RBEQRGC3.js";import"./chunk-P2ISUSTI.js";import"./chunk-W3ZGCYFJ.js";import"./chunk-IO5P3Z5D.js";import{a as Ne}from"./chunk-FBOJCUGO.js";import"./chunk-VYXSV6K4.js";import{a as yt}from"./chunk-HV46UVNS.js";import{a as Ve}from"./chunk-REDMZUTI.js";import{a as He,b as Ue}from"./chunk-F4NRX6ZE.js";import"./chunk-ON5KFKHE.js";import"./chunk-62QUGB6I.js";import{a as Ke}from"./chunk-EYHQ2ZKL.js";import{a as vt}from"./chunk-JQGFFQTR.js";import{a as We}from"./chunk-VGVK74K7.js";import{b as Le,c as Re}from"./chunk-EPY6UT4Z.js";import"./chunk-2KBEFXEF.js";import"./chunk-O476ULLD.js";import{e as Fe,g as Ae,h as Be}from"./chunk-HBAHB3P5.js";import{a as Ee}from"./chunk-5BO5IGZG.js";import"./chunk-CP5ER4QN.js";import{a as St}from"./chunk-TZFPNLRF.js";import{a as at}from"./chunk-BKR7YPEW.js";import{a as be}from"./chunk-AUPM35MA.js";import"./chunk-BGFEVOPZ.js";import"./chunk-HY5QRLIV.js";import{g as xt}from"./chunk-AWU3GJLO.js";import{b as Q,c as ke,d as At,e as ot}from"./chunk-KRIYDIQQ.js";import{d as Oe,e as De}from"./chunk-474G6BPL.js";import{b as Ie}from"./chunk-636FAHVP.js";import"./chunk-7BDGR7WQ.js";import{a as Se,b as ye,c as ve,h as Te,i as we,j as Me}from"./chunk-TFTF5VH3.js";import{a as xe}from"./chunk-CBPURQKN.js";import"./chunk-P6EVJYEB.js";import{f as ze}from"./chunk-DXXROE3I.js";import"./chunk-3X54ZT7P.js";import{b as je}from"./chunk-GDOAWQKS.js";import{a as le}from"./chunk-TIHANIPI.js";import"./chunk-PF3J5XPT.js";import"./chunk-IRNBEBQA.js";import"./chunk-P2HR36CY.js";import"./chunk-NCZ46DU6.js";import"./chunk-OUE6X2ER.js";import"./chunk-JYH45M2L.js";import"./chunk-SOTWA42R.js";import{Aa as fe,T as Ft,V as ge,na as it,ra as _e,sa as Nt}from"./chunk-7LEHDN2Q.js";import"./chunk-3OTK6GG2.js";import{a as Pe}from"./chunk-KFJBIBDQ.js";import{b as bt}from"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import{a as gt}from"./chunk-ZSUWHVKX.js";import{f as he}from"./chunk-OHSE4HCU.js";import"./chunk-XDMGP3CQ.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import{a as ue}from"./chunk-63X2BBS4.js";import{b as pe,c as me}from"./chunk-MDHMVGYC.js";import{b as P,c as S}from"./chunk-NNVT5X6O.js";import{c as Ce,h as _t,m as ft,z as Ct}from"./chunk-7HUEGPJN.js";import{b as se,e as ce}from"./chunk-ZE4OOGMT.js";import{b as de,d as ht}from"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import{B as ae,D as re,F as Et,r as te,t as ee,u as ne,y as ie,z as oe}from"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{Aa as y,C as L,Cb as $t,Da as jt,Db as F,Dd as ut,Eb as E,Ec as Dt,Ed as nt,Ga as U,Gc as pt,Hc as I,Ic as d,Jc as N,Kc as O,Mc as Y,Nc as X,Oc as tt,Pc as Kt,Qc as Qt,Rb as M,Rc as R,S as Rt,V as lt,Vc as H,Wc as Yt,Xb as f,Xc as q,Yb as qt,Yc as Xt,Zb as C,ac as It,bc as kt,ca as Ht,cb as Wt,cc as u,db as z,dc as o,ec as a,ed as J,fa as Ut,fb as Zt,fc as _,fd as K,gb as l,gc as j,ha as w,hc as W,ic as Z,id as et,jc as G,kc as $,lc as Ot,mc as x,md as A,nc as st,oa as p,pa as m,qa as V,r as Lt,rb as Gt,rc as g,rd as Vt,sd as mt,tc as c,wa as Pt,wc as Jt,xa as zt,yb as k,yc as ct,zc as dt}from"./chunk-5VYDZBNH.js";import{a as v,b as T}from"./chunk-QWWW7GFA.js";var un=["data-p-icon","exclamation-triangle"],rn=(()=>{class i extends St{pathId;onInit(){this.pathId="url(#"+Q()+")"}static \u0275fac=(()=>{let t;return function(e){return(t||(t=U(i)))(e||i)}})();static \u0275cmp=k({type:i,selectors:[["","data-p-icon","exclamation-triangle"]],features:[F],attrs:un,decls:7,vars:2,consts:[["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(n,e){n&1&&(V(),j(0,"g"),Z(1,"path",0)(2,"path",1)(3,"path",2),W(),j(4,"defs")(5,"clipPath",3),Z(6,"rect",4),W()()),n&2&&(M("clip-path",e.pathId),l(5),st("id",e.pathId))},encapsulation:2})}return i})();var hn=["data-p-icon","info-circle"],ln=(()=>{class i extends St{pathId;onInit(){this.pathId="url(#"+Q()+")"}static \u0275fac=(()=>{let t;return function(e){return(t||(t=U(i)))(e||i)}})();static \u0275cmp=k({type:i,selectors:[["","data-p-icon","info-circle"]],features:[F],attrs:hn,decls:5,vars:2,consts:[["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(n,e){n&1&&(V(),j(0,"g"),Z(1,"path",0),W(),j(2,"defs")(3,"clipPath",1),Z(4,"rect",2),W()()),n&2&&(M("clip-path",e.pathId),l(3),st("id",e.pathId))},encapsulation:2})}return i})();var sn=`
1
+ import{b as nn}from"./chunk-G346YBOK.js";import{c as on,d as an}from"./chunk-DEBF436Y.js";import"./chunk-RZM45AEI.js";import"./chunk-H276HPOG.js";import"./chunk-SJBVLNCR.js";import{a as en}from"./chunk-A46ZW26C.js";import{a as B}from"./chunk-5CH6HZVM.js";import{a as Ze,b as qe}from"./chunk-WN24A4VJ.js";import"./chunk-WM7WOQJI.js";import{e as Ge}from"./chunk-SZGAKYXG.js";import{a as Je}from"./chunk-AF67O6OF.js";import{a as $e}from"./chunk-7KG3DC5J.js";import{a as Qe}from"./chunk-PGDBJOSL.js";import{c as Ye}from"./chunk-NH7UFKXO.js";import{a as tn}from"./chunk-6YRYXHZS.js";import{a as Xe}from"./chunk-2DOM5CWZ.js";import"./chunk-P2ISUSTI.js";import"./chunk-W3ZGCYFJ.js";import"./chunk-IO5P3Z5D.js";import{a as Ne}from"./chunk-FBOJCUGO.js";import"./chunk-VYXSV6K4.js";import{a as yt}from"./chunk-HV46UVNS.js";import{a as Ve}from"./chunk-REDMZUTI.js";import{a as He,b as Ue}from"./chunk-F4NRX6ZE.js";import"./chunk-ON5KFKHE.js";import"./chunk-62QUGB6I.js";import{a as Ke}from"./chunk-EYHQ2ZKL.js";import{a as vt}from"./chunk-JTZZMQ3O.js";import{a as We}from"./chunk-VGVK74K7.js";import{b as Le,c as Re}from"./chunk-EPY6UT4Z.js";import"./chunk-2KBEFXEF.js";import"./chunk-O476ULLD.js";import{e as Fe,g as Ae,h as Be}from"./chunk-HBAHB3P5.js";import{a as Ee}from"./chunk-5BO5IGZG.js";import"./chunk-CP5ER4QN.js";import{a as St}from"./chunk-TZFPNLRF.js";import{a as at}from"./chunk-BKR7YPEW.js";import{a as be}from"./chunk-7YRNGS5Y.js";import"./chunk-BGFEVOPZ.js";import"./chunk-HY5QRLIV.js";import{g as xt}from"./chunk-AWU3GJLO.js";import{b as Q,c as ke,d as At,e as ot}from"./chunk-KRIYDIQQ.js";import{d as Oe,e as De}from"./chunk-474G6BPL.js";import{b as Ie}from"./chunk-636FAHVP.js";import"./chunk-7BDGR7WQ.js";import{a as Se,b as ye,c as ve,h as Te,i as we,j as Me}from"./chunk-TFTF5VH3.js";import{a as xe}from"./chunk-CBPURQKN.js";import"./chunk-P6EVJYEB.js";import{f as ze}from"./chunk-DXXROE3I.js";import"./chunk-3X54ZT7P.js";import{b as je}from"./chunk-GDOAWQKS.js";import{a as le}from"./chunk-TIHANIPI.js";import"./chunk-PF3J5XPT.js";import"./chunk-IRNBEBQA.js";import"./chunk-P2HR36CY.js";import"./chunk-NCZ46DU6.js";import"./chunk-OUE6X2ER.js";import"./chunk-JYH45M2L.js";import"./chunk-SOTWA42R.js";import{Aa as fe,T as Ft,V as ge,na as it,ra as _e,sa as Nt}from"./chunk-7LEHDN2Q.js";import"./chunk-3OTK6GG2.js";import{a as Pe}from"./chunk-KFJBIBDQ.js";import{b as bt}from"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import{a as gt}from"./chunk-ZSUWHVKX.js";import{f as he}from"./chunk-MEGJOWGP.js";import"./chunk-U66BXHEQ.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import{a as ue}from"./chunk-63X2BBS4.js";import{b as pe,c as me}from"./chunk-MDHMVGYC.js";import{b as P,c as S}from"./chunk-NNVT5X6O.js";import{c as Ce,h as _t,m as ft,z as Ct}from"./chunk-7HUEGPJN.js";import{b as se,e as ce}from"./chunk-ZE4OOGMT.js";import{b as de,d as ht}from"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import{B as ae,D as re,F as Et,r as te,t as ee,u as ne,y as ie,z as oe}from"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{Aa as y,C as L,Cb as $t,Da as jt,Db as F,Dd as ut,Eb as E,Ec as Dt,Ed as nt,Ga as U,Gc as pt,Hc as I,Ic as d,Jc as N,Kc as O,Mc as Y,Nc as X,Oc as tt,Pc as Kt,Qc as Qt,Rb as M,Rc as R,S as Rt,V as lt,Vc as H,Wc as Yt,Xb as f,Xc as q,Yb as qt,Yc as Xt,Zb as C,ac as It,bc as kt,ca as Ht,cb as Wt,cc as u,db as z,dc as o,ec as a,ed as J,fa as Ut,fb as Zt,fc as _,fd as K,gb as l,gc as j,ha as w,hc as W,ic as Z,id as et,jc as G,kc as $,lc as Ot,mc as x,md as A,nc as st,oa as p,pa as m,qa as V,r as Lt,rb as Gt,rc as g,rd as Vt,sd as mt,tc as c,wa as Pt,wc as Jt,xa as zt,yb as k,yc as ct,zc as dt}from"./chunk-5VYDZBNH.js";import{a as v,b as T}from"./chunk-QWWW7GFA.js";var un=["data-p-icon","exclamation-triangle"],rn=(()=>{class i extends St{pathId;onInit(){this.pathId="url(#"+Q()+")"}static \u0275fac=(()=>{let t;return function(e){return(t||(t=U(i)))(e||i)}})();static \u0275cmp=k({type:i,selectors:[["","data-p-icon","exclamation-triangle"]],features:[F],attrs:un,decls:7,vars:2,consts:[["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(n,e){n&1&&(V(),j(0,"g"),Z(1,"path",0)(2,"path",1)(3,"path",2),W(),j(4,"defs")(5,"clipPath",3),Z(6,"rect",4),W()()),n&2&&(M("clip-path",e.pathId),l(5),st("id",e.pathId))},encapsulation:2})}return i})();var hn=["data-p-icon","info-circle"],ln=(()=>{class i extends St{pathId;onInit(){this.pathId="url(#"+Q()+")"}static \u0275fac=(()=>{let t;return function(e){return(t||(t=U(i)))(e||i)}})();static \u0275cmp=k({type:i,selectors:[["","data-p-icon","info-circle"]],features:[F],attrs:hn,decls:5,vars:2,consts:[["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(n,e){n&1&&(V(),j(0,"g"),Z(1,"path",0),W(),j(2,"defs")(3,"clipPath",1),Z(4,"rect",2),W()()),n&2&&(M("clip-path",e.pathId),l(3),st("id",e.pathId))},encapsulation:2})}return i})();var sn=`
2
2
  .p-toast {
3
3
  width: dt('toast.width');
4
4
  white-space: pre-line;
@@ -1 +1 @@
1
- import{a as X,b as Y}from"./chunk-P2ISUSTI.js";import{b as J}from"./chunk-W3ZGCYFJ.js";import{a as K,b as Q}from"./chunk-IO5P3Z5D.js";import{a as H}from"./chunk-VGVK74K7.js";import{b as R,c as q}from"./chunk-EPY6UT4Z.js";import{a as z}from"./chunk-BGFEVOPZ.js";import{ra as G}from"./chunk-7LEHDN2Q.js";import{f as P}from"./chunk-OHSE4HCU.js";import{b as W}from"./chunk-NNVT5X6O.js";import{a as A,h as B,m as U,z as j}from"./chunk-7HUEGPJN.js";import{Aa as S,Db as N,Eb as V,Ic as f,Jc as x,Mc as w,Nc as y,Oc as b,Vc as E,Xb as L,Zb as k,cc as r,db as T,dc as p,ec as m,fc as v,gb as d,ha as D,id as F,mc as g,md as O,oa as s,pa as a,rc as h,sd as u,tc as o,yb as I}from"./chunk-5VYDZBNH.js";import{a as C,b as _}from"./chunk-QWWW7GFA.js";function Z(l,c){if(l&1){let e=g();p(0,"div",7)(1,"p-checkbox",8),b("ngModelChange",function(t){let i=s(e).$implicit;return y(i.selected,t)||(i.selected=t),a(t)}),h("ngModelChange",function(t){let i=s(e).$implicit,M=o(2);return a(M.onGroupSelect(t,i))}),m(),v(2,"img",9),p(3,"span"),f(4),m()()}if(l&2){let e=c.$implicit;d(),r("binary",!0),w("ngModel",e.selected),d(),r("src",e.img,T),d(2),x(e.label)}}function $(l,c){if(l&1&&(p(0,"div"),f(1),m()),l&2){let e=c.$implicit;d(),x(e.Name)}}function ee(l,c){if(l&1){let e=g();p(0,"p-multiselect",5,0),h("click",function(){s(e);let t=o();return a(t.onClickSelect())}),b("ngModelChange",function(t){s(e);let i=o();return y(i.selectedChannels,t)||(i.selectedChannels=t),a(t)}),h("ngModelChange",function(t){s(e);let i=o();return a(i.onChannelChange(t))})("onClear",function(){s(e);let t=o();return a(t.onClearSelectedChannel())}),V(2,Z,5,4,"ng-template",null,1,F)(4,$,2,1,"ng-template",6),m()}if(l&2){let e=o();r("options",e.effectiveMultiselectOptions())("placeholder",e.placeholder()),w("ngModel",e.selectedChannels),r("showClear",e.clearable())("autofocusFilter",!0)("maxSelectedLabels",e.maxSelectedLabels())("group",!0)}}function te(l,c){if(l&1&&(p(0,"div",11),v(1,"img",12),p(2,"div"),f(3),m()()),l&2){let e=c.$implicit;d(),r("src",e.logo,T),d(2),x(e.Name)}}function ie(l,c){if(l&1){let e=g();p(0,"p-select",10,2),h("click",function(){s(e);let t=o();return a(t.onClickSelect())}),b("ngModelChange",function(t){s(e);let i=o();return y(i.selectedChannels,t)||(i.selectedChannels=t),a(t)}),h("ngModelChange",function(t){s(e);let i=o();return a(i.onChannelChange(t))}),V(2,te,4,2,"ng-template",6),m()}if(l&2){let e=o();r("options",e.effectiveOptions())("placeholder",e.placeholder()),w("ngModel",e.selectedChannels),r("showClear",e.clearable())("autofocusFilter",!0)("filter",!0)}}var ye=(()=>{class l extends H{constructor(){super(),this.authService=D(P),this.multiple=u(!1),this.clearable=u(!0),this.placeholder=u("Select Channels"),this.options=S(this.authService.getChannels()),this.maxSelectedLabels=u(6),this.multiselectOptions=S([]),this.allowedTypes=u(null),this.allowedChannelTypes=u(null),this.effectiveOptions=O(()=>{let e=this.allowedTypes()??this.allowedChannelTypes(),n=this.options();return!e||e.length===0?n:n.map(t=>_(C({},t),{disabled:!e.includes(t.TypeID)}))}),this.effectiveMultiselectOptions=O(()=>{let e=this.allowedTypes()??this.allowedChannelTypes(),n=this.multiselectOptions();return!e||e.length===0?n:n.map(t=>_(C({},t),{disabled:!e.includes(t.value),items:t.items.map(i=>_(C({},i),{disabled:!e.includes(i.TypeID)}))}))}),this.onChange=e=>{},this.initMultiSelectOptions()}initMultiSelectOptions(){let e=this.authService.getChannels(),n=[];e.forEach(t=>{let i=n.find(M=>M.value===t.TypeID);i?i.items.push(t):(i={label:W[t.TypeID],selected:!1,img:t.Img,value:t.TypeID,items:[t]},n.push(i))}),this.multiselectOptions.set(n)}onGroupSelect(e,n){this.selectedChannels=this.selectedChannels?this.selectedChannels:[];let t=n.items.map(i=>i.ID);e?this.selectedChannels=[...this.selectedChannels,...t.filter(i=>!this.selectedChannels.includes(i))]:this.selectedChannels=this.selectedChannels.filter(i=>!t.includes(i)),this.onChange(this.selectedChannels)}onChannelChange(e){this.multiple()?e=e||[]:e=e||z.GuidEmpty,this.checkSelectedGroup(),this.onChange(e)}checkSelectedGroup(){this.multiselectOptions.update(e=>(e.forEach(n=>{let t=n.items.map(i=>i.ID);n.selected=t.every(i=>this.selectedChannels.includes(i))}),e))}onClearSelectedChannel(){this.multiselectOptions.update(e=>(e.forEach(n=>{n.selected=!1}),e)),this.onChange([])}onClickSelect(){this.initTopPosition(),setTimeout(()=>{this.adjustOverlayPosition()},0)}writeValue(e){this.selectedChannels=e}registerOnChange(e){this.onChange=e}registerOnTouched(e){}setDisabledState(e){}static{this.\u0275fac=function(n){return new(n||l)}}static{this.\u0275cmp=I({type:l,selectors:[["app-channel-options-v2"]],inputs:{multiple:[1,"multiple"],clearable:[1,"clearable"],placeholder:[1,"placeholder"],maxSelectedLabels:[1,"maxSelectedLabels"],allowedTypes:[1,"allowedTypes"],allowedChannelTypes:[1,"allowedChannelTypes"]},features:[E([{provide:A,multi:!0,useExisting:l}]),N],decls:2,vars:1,consts:[["multiSelect",""],["group",""],["select",""],["optionLabel","Name","optionValue","ID","optionDisabled","disabled","display","chip","id","multiSelect","appendTo","body",1,"w-100",2,"--p-multiselect-padding-y","12px",3,"options","placeholder","ngModel","showClear","autofocusFilter","maxSelectedLabels","group"],["optionLabel","Name","optionValue","ID","optionDisabled","disabled","appendTo","body",1,"w-100",2,"--p-select-padding-y","12px",3,"options","placeholder","ngModel","showClear","autofocusFilter","filter"],["optionLabel","Name","optionValue","ID","optionDisabled","disabled","display","chip","id","multiSelect","appendTo","body",1,"w-100",2,"--p-multiselect-padding-y","12px",3,"click","ngModelChange","onClear","options","placeholder","ngModel","showClear","autofocusFilter","maxSelectedLabels","group"],["pTemplate","item"],[1,"flex","items-center"],[1,"me-3",3,"ngModelChange","binary","ngModel"],[1,"me-2",2,"width","18px",3,"src"],["optionLabel","Name","optionValue","ID","optionDisabled","disabled","appendTo","body",1,"w-100",2,"--p-select-padding-y","12px",3,"click","ngModelChange","options","placeholder","ngModel","showClear","autofocusFilter","filter"],[1,"d-flex","align-items-center","gap-2"],[2,"width","18px",3,"src"]],template:function(n,t){n&1&&L(0,ee,5,7,"p-multiselect",3)(1,ie,3,6,"p-select",4),n&2&&k(t.multiple()?0:1)},dependencies:[Y,X,G,J,j,B,U,q,R,Q,K],styles:["li.p-multiselect-option{margin-left:30px}"],changeDetection:0})}}return l})();export{ye as a};
1
+ import{a as X,b as Y}from"./chunk-P2ISUSTI.js";import{b as J}from"./chunk-W3ZGCYFJ.js";import{a as K,b as Q}from"./chunk-IO5P3Z5D.js";import{a as H}from"./chunk-VGVK74K7.js";import{b as R,c as q}from"./chunk-EPY6UT4Z.js";import{a as z}from"./chunk-BGFEVOPZ.js";import{ra as G}from"./chunk-7LEHDN2Q.js";import{f as P}from"./chunk-MEGJOWGP.js";import{b as W}from"./chunk-NNVT5X6O.js";import{a as A,h as B,m as U,z as j}from"./chunk-7HUEGPJN.js";import{Aa as S,Db as N,Eb as V,Ic as f,Jc as x,Mc as w,Nc as y,Oc as b,Vc as E,Xb as L,Zb as k,cc as r,db as T,dc as p,ec as m,fc as v,gb as d,ha as D,id as F,mc as g,md as O,oa as s,pa as a,rc as h,sd as u,tc as o,yb as I}from"./chunk-5VYDZBNH.js";import{a as C,b as _}from"./chunk-QWWW7GFA.js";function Z(l,c){if(l&1){let e=g();p(0,"div",7)(1,"p-checkbox",8),b("ngModelChange",function(t){let i=s(e).$implicit;return y(i.selected,t)||(i.selected=t),a(t)}),h("ngModelChange",function(t){let i=s(e).$implicit,M=o(2);return a(M.onGroupSelect(t,i))}),m(),v(2,"img",9),p(3,"span"),f(4),m()()}if(l&2){let e=c.$implicit;d(),r("binary",!0),w("ngModel",e.selected),d(),r("src",e.img,T),d(2),x(e.label)}}function $(l,c){if(l&1&&(p(0,"div"),f(1),m()),l&2){let e=c.$implicit;d(),x(e.Name)}}function ee(l,c){if(l&1){let e=g();p(0,"p-multiselect",5,0),h("click",function(){s(e);let t=o();return a(t.onClickSelect())}),b("ngModelChange",function(t){s(e);let i=o();return y(i.selectedChannels,t)||(i.selectedChannels=t),a(t)}),h("ngModelChange",function(t){s(e);let i=o();return a(i.onChannelChange(t))})("onClear",function(){s(e);let t=o();return a(t.onClearSelectedChannel())}),V(2,Z,5,4,"ng-template",null,1,F)(4,$,2,1,"ng-template",6),m()}if(l&2){let e=o();r("options",e.effectiveMultiselectOptions())("placeholder",e.placeholder()),w("ngModel",e.selectedChannels),r("showClear",e.clearable())("autofocusFilter",!0)("maxSelectedLabels",e.maxSelectedLabels())("group",!0)}}function te(l,c){if(l&1&&(p(0,"div",11),v(1,"img",12),p(2,"div"),f(3),m()()),l&2){let e=c.$implicit;d(),r("src",e.logo,T),d(2),x(e.Name)}}function ie(l,c){if(l&1){let e=g();p(0,"p-select",10,2),h("click",function(){s(e);let t=o();return a(t.onClickSelect())}),b("ngModelChange",function(t){s(e);let i=o();return y(i.selectedChannels,t)||(i.selectedChannels=t),a(t)}),h("ngModelChange",function(t){s(e);let i=o();return a(i.onChannelChange(t))}),V(2,te,4,2,"ng-template",6),m()}if(l&2){let e=o();r("options",e.effectiveOptions())("placeholder",e.placeholder()),w("ngModel",e.selectedChannels),r("showClear",e.clearable())("autofocusFilter",!0)("filter",!0)}}var ye=(()=>{class l extends H{constructor(){super(),this.authService=D(P),this.multiple=u(!1),this.clearable=u(!0),this.placeholder=u("Select Channels"),this.options=S(this.authService.getChannels()),this.maxSelectedLabels=u(6),this.multiselectOptions=S([]),this.allowedTypes=u(null),this.allowedChannelTypes=u(null),this.effectiveOptions=O(()=>{let e=this.allowedTypes()??this.allowedChannelTypes(),n=this.options();return!e||e.length===0?n:n.map(t=>_(C({},t),{disabled:!e.includes(t.TypeID)}))}),this.effectiveMultiselectOptions=O(()=>{let e=this.allowedTypes()??this.allowedChannelTypes(),n=this.multiselectOptions();return!e||e.length===0?n:n.map(t=>_(C({},t),{disabled:!e.includes(t.value),items:t.items.map(i=>_(C({},i),{disabled:!e.includes(i.TypeID)}))}))}),this.onChange=e=>{},this.initMultiSelectOptions()}initMultiSelectOptions(){let e=this.authService.getChannels(),n=[];e.forEach(t=>{let i=n.find(M=>M.value===t.TypeID);i?i.items.push(t):(i={label:W[t.TypeID],selected:!1,img:t.Img,value:t.TypeID,items:[t]},n.push(i))}),this.multiselectOptions.set(n)}onGroupSelect(e,n){this.selectedChannels=this.selectedChannels?this.selectedChannels:[];let t=n.items.map(i=>i.ID);e?this.selectedChannels=[...this.selectedChannels,...t.filter(i=>!this.selectedChannels.includes(i))]:this.selectedChannels=this.selectedChannels.filter(i=>!t.includes(i)),this.onChange(this.selectedChannels)}onChannelChange(e){this.multiple()?e=e||[]:e=e||z.GuidEmpty,this.checkSelectedGroup(),this.onChange(e)}checkSelectedGroup(){this.multiselectOptions.update(e=>(e.forEach(n=>{let t=n.items.map(i=>i.ID);n.selected=t.every(i=>this.selectedChannels.includes(i))}),e))}onClearSelectedChannel(){this.multiselectOptions.update(e=>(e.forEach(n=>{n.selected=!1}),e)),this.onChange([])}onClickSelect(){this.initTopPosition(),setTimeout(()=>{this.adjustOverlayPosition()},0)}writeValue(e){this.selectedChannels=e}registerOnChange(e){this.onChange=e}registerOnTouched(e){}setDisabledState(e){}static{this.\u0275fac=function(n){return new(n||l)}}static{this.\u0275cmp=I({type:l,selectors:[["app-channel-options-v2"]],inputs:{multiple:[1,"multiple"],clearable:[1,"clearable"],placeholder:[1,"placeholder"],maxSelectedLabels:[1,"maxSelectedLabels"],allowedTypes:[1,"allowedTypes"],allowedChannelTypes:[1,"allowedChannelTypes"]},features:[E([{provide:A,multi:!0,useExisting:l}]),N],decls:2,vars:1,consts:[["multiSelect",""],["group",""],["select",""],["optionLabel","Name","optionValue","ID","optionDisabled","disabled","display","chip","id","multiSelect","appendTo","body",1,"w-100",2,"--p-multiselect-padding-y","12px",3,"options","placeholder","ngModel","showClear","autofocusFilter","maxSelectedLabels","group"],["optionLabel","Name","optionValue","ID","optionDisabled","disabled","appendTo","body",1,"w-100",2,"--p-select-padding-y","12px",3,"options","placeholder","ngModel","showClear","autofocusFilter","filter"],["optionLabel","Name","optionValue","ID","optionDisabled","disabled","display","chip","id","multiSelect","appendTo","body",1,"w-100",2,"--p-multiselect-padding-y","12px",3,"click","ngModelChange","onClear","options","placeholder","ngModel","showClear","autofocusFilter","maxSelectedLabels","group"],["pTemplate","item"],[1,"flex","items-center"],[1,"me-3",3,"ngModelChange","binary","ngModel"],[1,"me-2",2,"width","18px",3,"src"],["optionLabel","Name","optionValue","ID","optionDisabled","disabled","appendTo","body",1,"w-100",2,"--p-select-padding-y","12px",3,"click","ngModelChange","options","placeholder","ngModel","showClear","autofocusFilter","filter"],[1,"d-flex","align-items-center","gap-2"],[2,"width","18px",3,"src"]],template:function(n,t){n&1&&L(0,ee,5,7,"p-multiselect",3)(1,ie,3,6,"p-select",4),n&2&&k(t.multiple()?0:1)},dependencies:[Y,X,G,J,j,B,U,q,R,Q,K],styles:["li.p-multiselect-option{margin-left:30px}"],changeDetection:0})}}return l})();export{ye as a};
@@ -1 +1 @@
1
- import{a as H}from"./chunk-RBEQRGC3.js";import"./chunk-P2ISUSTI.js";import"./chunk-W3ZGCYFJ.js";import"./chunk-IO5P3Z5D.js";import"./chunk-FBOJCUGO.js";import"./chunk-VGVK74K7.js";import"./chunk-EPY6UT4Z.js";import"./chunk-2KBEFXEF.js";import"./chunk-O476ULLD.js";import"./chunk-HBAHB3P5.js";import"./chunk-5BO5IGZG.js";import"./chunk-CP5ER4QN.js";import"./chunk-TZFPNLRF.js";import"./chunk-BGFEVOPZ.js";import"./chunk-HY5QRLIV.js";import"./chunk-AWU3GJLO.js";import"./chunk-KRIYDIQQ.js";import{e as F}from"./chunk-474G6BPL.js";import{b as z}from"./chunk-636FAHVP.js";import"./chunk-7BDGR7WQ.js";import"./chunk-TFTF5VH3.js";import"./chunk-CBPURQKN.js";import"./chunk-7LEHDN2Q.js";import"./chunk-KFJBIBDQ.js";import"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import"./chunk-OHSE4HCU.js";import"./chunk-XDMGP3CQ.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import{a as D}from"./chunk-63X2BBS4.js";import"./chunk-MDHMVGYC.js";import{b as L}from"./chunk-NNVT5X6O.js";import{c as k,h as I,m as B,z as j}from"./chunk-7HUEGPJN.js";import{b as A,e as V}from"./chunk-ZE4OOGMT.js";import"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import{C as E,z as R}from"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{Aa as C,Ic as n,Jc as P,Pc as T,Qc as N,Rc as f,S as b,Xb as x,Zb as M,cc as s,dc as e,ec as t,ed as _,fc as y,fd as w,gb as l,ha as g,mc as S,oa as m,pa as c,rc as u,tc as O,yb as v}from"./chunk-5VYDZBNH.js";import"./chunk-QWWW7GFA.js";function $(i,J){if(i&1&&(e(0,"pre",21),n(1),_(2,"json"),t()),i&2){O();let r=f(25);l(),P(w(2,1,r))}}function G(i,J){i&1&&(e(0,"p",22),n(1," Your data will be shown here once it's available "),t())}var de=(()=>{class i{constructor(){this.httpService=g(V),this.toastr=g(A),this.selectedChannel=C(null),this.orderNumber=C(null),this.allowedChannelTypes=[L.Shopee]}fetchLog(){if(!this.selectedChannel()||!this.orderNumber()){this.toastr.warning("Please select a channel and enter an order number","Warning");return}this.returnLog$=this.httpService.post(D.GetReturnInfoByChannel,{ChannelID:this.selectedChannel(),OrderNumber:this.orderNumber()}).pipe(b(1))}copyToClipboard(r){if(!r)return;let d=typeof r=="string"?r:JSON.stringify(r,null,2);navigator.clipboard.writeText(d),this.toastr.success("Copied to clipboard!","Success")}static{this.\u0275fac=function(d){return new(d||i)}}static{this.\u0275cmp=v({type:i,selectors:[["app-return-api"]],decls:40,vars:10,consts:[["headerTitle","Return API",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-success","btn-fill","me-3",3,"click"],[1,"fa","fa-search"],[1,"container-fluid","mt-8","px-10"],[1,"row"],[1,"col-7"],[1,"d-flex","align-items-center"],[1,"w-75"],[1,"mb-0","text-muted","fst-italic"],[1,"w-100"],[3,"ngModelChange","ngModel","allowedChannelTypes"],[1,"d-flex","align-items-center","mt-3"],["type","text","placeholder","Order Number or Invoice Number",1,"form-control","rounded-1",2,"height","40px",3,"ngModelChange","ngModel"],[1,"row","mt-6"],[1,"col-12"],[1,"card"],[1,"card-header","d-flex","justify-content-between","align-items-center"],["type","button",1,"btn","btn-sm","btn-outline-primary",3,"click","disabled"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group","position-relative"],["id","returnLogText"],[1,"text-center","my-12","text-muted"]],template:function(d,o){if(d&1){let a=S();e(0,"mainpanel",0)(1,"actions")(2,"button",1),u("click",function(){return m(a),c(o.fetchLog())}),y(3,"i",2),n(4," Search "),t()(),e(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),n(12,"Channel"),t(),e(13,"p",8),n(14," View return details. Currently only Shopee is supported. "),t()(),e(15,"div",9)(16,"app-channel-options-v2",10),u("ngModelChange",function(p){return m(a),c(o.selectedChannel.set(p))}),t()()(),e(17,"div",11)(18,"div",7)(19,"h6"),n(20,"Order Number"),t(),e(21,"p",8),n(22," Order or Invoice number from Channel. "),t()(),e(23,"div",9)(24,"input",12),u("ngModelChange",function(p){return m(a),c(o.orderNumber.set(p))}),t()()()()(),T(25),_(26,"async"),e(27,"div",13)(28,"div",14)(29,"div",15)(30,"div",16)(31,"h5"),n(32,"Response"),t(),e(33,"button",17),u("click",function(){m(a);let p=f(25);return c(o.copyToClipboard(p))}),n(34," Copy "),t()(),e(35,"div",18)(36,"div",19)(37,"div",20),x(38,$,3,3,"pre",21)(39,G,2,0,"p",22),t()()()()()()()()()}if(d&2){s("hideSearchBox",!0)("hideSearchDropdown",!0),l(16),s("ngModel",o.selectedChannel())("allowedChannelTypes",o.allowedChannelTypes),l(8),s("ngModel",o.orderNumber()),l();let a=N(w(26,7,o.returnLog$));l(8),s("disabled",!a),l(5),M(a?38:39)}},dependencies:[z,F,j,k,I,B,H,R,E],styles:["@media(max-width:767.98px){.container-fluid[_ngcontent-%COMP%]{padding-left:1rem!important;padding-right:1rem!important}.row[_ngcontent-%COMP%]{flex-direction:column!important;margin-left:0!important;margin-right:0!important}.col-7[_ngcontent-%COMP%], .col-12[_ngcontent-%COMP%]{width:100%!important;max-width:100%!important;padding-left:0!important;padding-right:0!important}.d-flex[_ngcontent-%COMP%]{flex-direction:column!important;align-items:stretch!important;gap:1rem}.w-75[_ngcontent-%COMP%], .w-100[_ngcontent-%COMP%]{width:100%!important;max-width:100%!important}.card[_ngcontent-%COMP%]{margin-top:1rem!important}.card-header[_ngcontent-%COMP%]{flex-direction:column!important;align-items:flex-start!important;gap:.5rem}.btn[_ngcontent-%COMP%]{width:100%;margin-bottom:.5rem}input.form-control[_ngcontent-%COMP%]{width:100%;min-width:0}pre#returnLogText[_ngcontent-%COMP%]{font-size:.95rem;word-break:break-all;white-space:pre-wrap}}@media(max-width:400px){.card-header[_ngcontent-%COMP%] h5[_ngcontent-%COMP%]{font-size:1rem}pre#returnLogText[_ngcontent-%COMP%]{font-size:.85rem}}"],changeDetection:0})}}return i})();export{de as ReturnApiComponent};
1
+ import{a as H}from"./chunk-2DOM5CWZ.js";import"./chunk-P2ISUSTI.js";import"./chunk-W3ZGCYFJ.js";import"./chunk-IO5P3Z5D.js";import"./chunk-FBOJCUGO.js";import"./chunk-VGVK74K7.js";import"./chunk-EPY6UT4Z.js";import"./chunk-2KBEFXEF.js";import"./chunk-O476ULLD.js";import"./chunk-HBAHB3P5.js";import"./chunk-5BO5IGZG.js";import"./chunk-CP5ER4QN.js";import"./chunk-TZFPNLRF.js";import"./chunk-BGFEVOPZ.js";import"./chunk-HY5QRLIV.js";import"./chunk-AWU3GJLO.js";import"./chunk-KRIYDIQQ.js";import{e as F}from"./chunk-474G6BPL.js";import{b as z}from"./chunk-636FAHVP.js";import"./chunk-7BDGR7WQ.js";import"./chunk-TFTF5VH3.js";import"./chunk-CBPURQKN.js";import"./chunk-7LEHDN2Q.js";import"./chunk-KFJBIBDQ.js";import"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import"./chunk-MEGJOWGP.js";import"./chunk-U66BXHEQ.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import{a as D}from"./chunk-63X2BBS4.js";import"./chunk-MDHMVGYC.js";import{b as L}from"./chunk-NNVT5X6O.js";import{c as k,h as I,m as B,z as j}from"./chunk-7HUEGPJN.js";import{b as A,e as V}from"./chunk-ZE4OOGMT.js";import"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import{C as E,z as R}from"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{Aa as C,Ic as n,Jc as P,Pc as T,Qc as N,Rc as f,S as b,Xb as x,Zb as M,cc as s,dc as e,ec as t,ed as _,fc as y,fd as w,gb as l,ha as g,mc as S,oa as m,pa as c,rc as u,tc as O,yb as v}from"./chunk-5VYDZBNH.js";import"./chunk-QWWW7GFA.js";function $(i,J){if(i&1&&(e(0,"pre",21),n(1),_(2,"json"),t()),i&2){O();let r=f(25);l(),P(w(2,1,r))}}function G(i,J){i&1&&(e(0,"p",22),n(1," Your data will be shown here once it's available "),t())}var de=(()=>{class i{constructor(){this.httpService=g(V),this.toastr=g(A),this.selectedChannel=C(null),this.orderNumber=C(null),this.allowedChannelTypes=[L.Shopee]}fetchLog(){if(!this.selectedChannel()||!this.orderNumber()){this.toastr.warning("Please select a channel and enter an order number","Warning");return}this.returnLog$=this.httpService.post(D.GetReturnInfoByChannel,{ChannelID:this.selectedChannel(),OrderNumber:this.orderNumber()}).pipe(b(1))}copyToClipboard(r){if(!r)return;let d=typeof r=="string"?r:JSON.stringify(r,null,2);navigator.clipboard.writeText(d),this.toastr.success("Copied to clipboard!","Success")}static{this.\u0275fac=function(d){return new(d||i)}}static{this.\u0275cmp=v({type:i,selectors:[["app-return-api"]],decls:40,vars:10,consts:[["headerTitle","Return API",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-success","btn-fill","me-3",3,"click"],[1,"fa","fa-search"],[1,"container-fluid","mt-8","px-10"],[1,"row"],[1,"col-7"],[1,"d-flex","align-items-center"],[1,"w-75"],[1,"mb-0","text-muted","fst-italic"],[1,"w-100"],[3,"ngModelChange","ngModel","allowedChannelTypes"],[1,"d-flex","align-items-center","mt-3"],["type","text","placeholder","Order Number or Invoice Number",1,"form-control","rounded-1",2,"height","40px",3,"ngModelChange","ngModel"],[1,"row","mt-6"],[1,"col-12"],[1,"card"],[1,"card-header","d-flex","justify-content-between","align-items-center"],["type","button",1,"btn","btn-sm","btn-outline-primary",3,"click","disabled"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group","position-relative"],["id","returnLogText"],[1,"text-center","my-12","text-muted"]],template:function(d,o){if(d&1){let a=S();e(0,"mainpanel",0)(1,"actions")(2,"button",1),u("click",function(){return m(a),c(o.fetchLog())}),y(3,"i",2),n(4," Search "),t()(),e(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),n(12,"Channel"),t(),e(13,"p",8),n(14," View return details. Currently only Shopee is supported. "),t()(),e(15,"div",9)(16,"app-channel-options-v2",10),u("ngModelChange",function(p){return m(a),c(o.selectedChannel.set(p))}),t()()(),e(17,"div",11)(18,"div",7)(19,"h6"),n(20,"Order Number"),t(),e(21,"p",8),n(22," Order or Invoice number from Channel. "),t()(),e(23,"div",9)(24,"input",12),u("ngModelChange",function(p){return m(a),c(o.orderNumber.set(p))}),t()()()()(),T(25),_(26,"async"),e(27,"div",13)(28,"div",14)(29,"div",15)(30,"div",16)(31,"h5"),n(32,"Response"),t(),e(33,"button",17),u("click",function(){m(a);let p=f(25);return c(o.copyToClipboard(p))}),n(34," Copy "),t()(),e(35,"div",18)(36,"div",19)(37,"div",20),x(38,$,3,3,"pre",21)(39,G,2,0,"p",22),t()()()()()()()()()}if(d&2){s("hideSearchBox",!0)("hideSearchDropdown",!0),l(16),s("ngModel",o.selectedChannel())("allowedChannelTypes",o.allowedChannelTypes),l(8),s("ngModel",o.orderNumber()),l();let a=N(w(26,7,o.returnLog$));l(8),s("disabled",!a),l(5),M(a?38:39)}},dependencies:[z,F,j,k,I,B,H,R,E],styles:["@media(max-width:767.98px){.container-fluid[_ngcontent-%COMP%]{padding-left:1rem!important;padding-right:1rem!important}.row[_ngcontent-%COMP%]{flex-direction:column!important;margin-left:0!important;margin-right:0!important}.col-7[_ngcontent-%COMP%], .col-12[_ngcontent-%COMP%]{width:100%!important;max-width:100%!important;padding-left:0!important;padding-right:0!important}.d-flex[_ngcontent-%COMP%]{flex-direction:column!important;align-items:stretch!important;gap:1rem}.w-75[_ngcontent-%COMP%], .w-100[_ngcontent-%COMP%]{width:100%!important;max-width:100%!important}.card[_ngcontent-%COMP%]{margin-top:1rem!important}.card-header[_ngcontent-%COMP%]{flex-direction:column!important;align-items:flex-start!important;gap:.5rem}.btn[_ngcontent-%COMP%]{width:100%;margin-bottom:.5rem}input.form-control[_ngcontent-%COMP%]{width:100%;min-width:0}pre#returnLogText[_ngcontent-%COMP%]{font-size:.95rem;word-break:break-all;white-space:pre-wrap}}@media(max-width:400px){.card-header[_ngcontent-%COMP%] h5[_ngcontent-%COMP%]{font-size:1rem}pre#returnLogText[_ngcontent-%COMP%]{font-size:.85rem}}"],changeDetection:0})}}return i})();export{de as ReturnApiComponent};
@@ -1 +1 @@
1
- import{a as Jt}from"./chunk-PXK5S7ZN.js";import"./chunk-4P7DUX6B.js";import{b as Wt}from"./chunk-4O2VD4QF.js";import{a as jt,b as zt}from"./chunk-G346YBOK.js";import"./chunk-SJBVLNCR.js";import{a as Gt}from"./chunk-A46ZW26C.js";import{a as ct,b as Rt,c as st,d as mt,e as pt}from"./chunk-ALAG4HXV.js";import{a as Bt}from"./chunk-AF67O6OF.js";import"./chunk-W3ZGCYFJ.js";import"./chunk-IO5P3Z5D.js";import"./chunk-FBOJCUGO.js";import"./chunk-VYXSV6K4.js";import{a as $t}from"./chunk-62QUGB6I.js";import"./chunk-JQGFFQTR.js";import"./chunk-2KBEFXEF.js";import"./chunk-O476ULLD.js";import"./chunk-HBAHB3P5.js";import"./chunk-5BO5IGZG.js";import"./chunk-CP5ER4QN.js";import"./chunk-TZFPNLRF.js";import"./chunk-AUPM35MA.js";import"./chunk-BGFEVOPZ.js";import"./chunk-AWU3GJLO.js";import"./chunk-KRIYDIQQ.js";import{d as w,e as L}from"./chunk-474G6BPL.js";import{b as Lt}from"./chunk-636FAHVP.js";import"./chunk-7BDGR7WQ.js";import"./chunk-TFTF5VH3.js";import{a as wt}from"./chunk-CBPURQKN.js";import{b as Yt,c as Ht}from"./chunk-7DLOP2EE.js";import"./chunk-7RKWOSCN.js";import"./chunk-GAI4CMX3.js";import"./chunk-3RA4CRAW.js";import"./chunk-W55ZHKHY.js";import"./chunk-P6EVJYEB.js";import"./chunk-DXXROE3I.js";import"./chunk-3X54ZT7P.js";import"./chunk-GDOAWQKS.js";import"./chunk-TIHANIPI.js";import"./chunk-PF3J5XPT.js";import"./chunk-IRNBEBQA.js";import"./chunk-P2HR36CY.js";import"./chunk-NCZ46DU6.js";import"./chunk-OUE6X2ER.js";import"./chunk-JYH45M2L.js";import"./chunk-SOTWA42R.js";import"./chunk-7LEHDN2Q.js";import"./chunk-3OTK6GG2.js";import"./chunk-KFJBIBDQ.js";import{b as Ut}from"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import"./chunk-ZSUWHVKX.js";import"./chunk-OHSE4HCU.js";import"./chunk-XDMGP3CQ.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import"./chunk-63X2BBS4.js";import"./chunk-MDHMVGYC.js";import{b as ft,c as C}from"./chunk-NNVT5X6O.js";import{A as U,c as j,e as Q,h as V,i as z,l as lt,m as kt,n as W,q as Ot,r as Y,s as H,t as Dt,u as Mt,v as Vt,y as J,z as X}from"./chunk-7HUEGPJN.js";import{b as Et,e as rt}from"./chunk-ZE4OOGMT.js";import"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import{z as S}from"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{Fa as k,G as St,I as It,Ic as u,Jc as et,Kc as q,Mc as At,Nc as Pt,Oc as Nt,S as B,U as Ft,Vc as T,W as _t,Wc as at,Xb as f,Y as A,Zb as h,_b as O,ac as D,bc as M,ca as P,cc as p,d as Tt,dc as s,ec as l,ed as y,fc as _,fd as v,gb as m,ha as d,mc as G,oa as N,pa as E,r as R,rc as I,rd as F,sd as b,tc as a,yb as x}from"./chunk-5VYDZBNH.js";import"./chunk-QWWW7GFA.js";var K=(function(e){return e[e.SINGLE_DROP_DOWN=1]="SINGLE_DROP_DOWN",e[e.SINGLE_COMBO_BOX=2]="SINGLE_COMBO_BOX",e[e.FREE_TEXT_FILED=3]="FREE_TEXT_FILED",e[e.MULTI_DROP_DOWN=4]="MULTI_DROP_DOWN",e[e.MULTI_COMBO_BOX=5]="MULTI_COMBO_BOX",e})(K||{});var it=(function(e){return e[e.FORMAT_NORMAL=1]="FORMAT_NORMAL",e[e.FORMAT_QUANTITATIVE_WITH_UNIT=2]="FORMAT_QUANTITATIVE_WITH_UNIT",e})(it||{});var ot=(function(e){return e[e.VALIDATOR_NO_VALIDATE_TYPE=0]="VALIDATOR_NO_VALIDATE_TYPE",e[e.VALIDATOR_INT_TYPE=1]="VALIDATOR_INT_TYPE",e[e.VALIDATOR_STRING_TYPE=2]="VALIDATOR_STRING_TYPE",e[e.VALIDATOR_FLOAT_TYPE=3]="VALIDATOR_FLOAT_TYPE",e[e.VALIDATOR_DATE_TYPE=4]="VALIDATOR_DATE_TYPE",e})(ot||{});var ht=class extends lt{setValue(c,t){if(c instanceof Date){let i=Math.floor(c.getTime()/1e3);super.setValue(i,t)}else super.setValue(c,t)}},Ct=(()=>{class e{constructor(){this.shopeeUploadService=d(ct),this.formBuilder=d(J)}getAttributes(t){return this.shopeeUploadService.getAttributes(t.channelId,t.categoryId).pipe(R(i=>this.setLabelToIndonesian(i)))}setLabelToIndonesian(t=[]){let i,n;return t=t.map(o=>(i=o?.multi_lang?.find(r=>r.language=="id"),o.attribute_value_list=o?.attribute_value_list?.map(r=>(n=r?.multi_lang?.find(g=>g.language=="id"),r.name=n?.value,r)),o.name=i?.value?i?.value:o.name,o)),t}createFormGroup(t){let i=this.formBuilder.group({}),n=[];return t.forEach(o=>{if(n=[],o.mandatory&&n.push(Q.required),o?.attribute_info?.format_type==it.FORMAT_QUANTITATIVE_WITH_UNIT&&o?.attribute_info?.input_type==K.FREE_TEXT_FILED){let r=this.formBuilder.group({unit:new lt(null),value:new lt(null,n)});i.addControl(JSON.stringify(o.attribute_id),r)}else o?.attribute_info?.input_type==K.FREE_TEXT_FILED&&o?.attribute_info?.input_validation_type==ot.VALIDATOR_DATE_TYPE?i.addControl(JSON.stringify(o.attribute_id),new ht(null,n)):i.addControl(JSON.stringify(o.attribute_id),this.formBuilder.control(null,n))}),i}getFilteredAttributes(t,i){let n=JSON.parse(JSON.stringify(t)),o=Object.keys(i),r=n.filter(g=>o.findIndex(nt=>parseInt(nt)==g.attribute_id||g.mandatory)!=-1);return r=this.filterSelectedAttributes(r,i),r}filterSelectedAttributes(t,i){return t.map(o=>{switch(o.attribute_info.input_type){case K.MULTI_COMBO_BOX:C.IsNotEmpty(i[o.attribute_id])?o.attribute_value_list=o.attribute_value_list.filter(r=>i[o.attribute_id]?.findIndex(g=>g==r.value_id)!=-1):o.attribute_value_list=[];break;case K.FREE_TEXT_FILED:o.attribute_info.format_type==it.FORMAT_QUANTITATIVE_WITH_UNIT?o.attribute_value_list=this.setSelectedQuantitativeAttr(i[o.attribute_id]?.value,i[o.attribute_id]?.unit):o.attribute_info.input_validation_type==ot.VALIDATOR_DATE_TYPE?o.attribute_value_list=this.setSelectedDateAttr(i[o.attribute_id]):o.attribute_value_list=this.setSelectedQuantitativeAttr(i[o.attribute_id]);break;default:o.attribute_value_list=o.attribute_value_list.filter(r=>r.value_id==i[o.attribute_id])}return o}).filter(o=>o?.attribute_value_list?.length>0)}setSelectedQuantitativeAttr(t,i){let n=[];if(C.IsNotEmpty(t)){let o={value_id:0,original_value_name:JSON.stringify(t)};C.IsNotEmpty(i)&&(o.value_unit=i),n=[o]}return n}setSelectedDateAttr(t){let i=[];return C.IsNotEmpty(t)&&(i=[{value_id:0,original_value_name:JSON.stringify(t)}]),i}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var gt=()=>[];function te(e,c){e&1&&(s(0,"span",4),u(1,"*"),l())}function ee(e,c){if(e&1&&_(0,"ng-select",5),e&2){let t=a().$implicit;p("multiple",!0)("formControlName",t.attribute_id)("items",t.attribute_value_list?t.attribute_value_list:at(4,gt))("placeholder","Pilih "+(t==null?null:t.name))}}function ie(e,c){if(e&1&&_(0,"input",7),e&2){let t=a(2).$implicit;p("formControlName",t.attribute_id)("placeholder","Isi "+(t==null?null:t.name))}}function oe(e,c){if(e&1&&(s(0,"option",14),u(1),l()),e&2){let t=c.$implicit;p("value",t),m(),et(t)}}function ne(e,c){if(e&1&&(s(0,"div",9),_(1,"input",11),s(2,"select",12)(3,"option",13),u(4,"Unit"),l(),D(5,oe,2,2,"option",14,O),l()()),e&2){let t=a(3).$implicit;p("formGroupName",t.attribute_id),m(),p("placeholder","Isi "+(t==null?null:t.name)),m(2),p("value",null),m(2),M(t==null||t.attribute_info==null?null:t.attribute_info.attribute_unit_list)}}function re(e,c){if(e&1&&_(0,"input",10),e&2){let t=a(3).$implicit;p("formControlName",t.attribute_id)("placeholder","Isi "+(t==null?null:t.name))}}function ae(e,c){if(e&1&&f(0,ne,7,3,"div",9)(1,re,1,2,"input",10),e&2){let t=a(2).$implicit,i=a(2);h((t==null||t.attribute_info==null?null:t.attribute_info.format_type)==i.formatType.FORMAT_QUANTITATIVE_WITH_UNIT?0:1)}}function le(e,c){if(e&1&&_(0,"datepicker",8),e&2){let t=a(2).$implicit;p("formControlName",t.attribute_id)}}function ce(e,c){if(e&1&&f(0,ie,1,2,"input",7)(1,ae,2,1)(2,le,1,1,"datepicker",8),e&2){let t,i=a().$implicit,n=a(2);h((t=i==null||i.attribute_info==null?null:i.attribute_info.input_validation_type)===n.validationType.VALIDATOR_STRING_TYPE?0:t===n.validationType.VALIDATOR_FLOAT_TYPE?1:t===n.validationType.VALIDATOR_DATE_TYPE?2:-1)}}function se(e,c){if(e&1&&_(0,"ng-select",6),e&2){let t=a().$implicit;p("formControlName",t.attribute_id)("items",t.attribute_value_list?t.attribute_value_list:at(3,gt))("placeholder","Pilih "+(t==null?null:t.name))}}function me(e,c){if(e&1&&_(0,"ng-select",6),e&2){let t=a().$implicit;p("formControlName",t.attribute_id)("items",t.attribute_value_list?t.attribute_value_list:at(3,gt))("placeholder","Pilih "+(t==null?null:t.name))}}function pe(e,c){if(e&1&&(s(0,"div",2)(1,"div",3),f(2,te,2,0,"span",4),s(3,"span"),u(4),l()(),f(5,ee,1,5,"ng-select",5)(6,ce,3,1)(7,se,1,4,"ng-select",6)(8,me,1,4,"ng-select",6),l()),e&2){let t,i=c.$implicit,n=a(2);m(2),h(i.mandatory?2:-1),m(2),q(" ",i==null?null:i.name," "),m(),h((t=i==null||i.attribute_info==null?null:i.attribute_info.input_type)===n.inputType.MULTI_COMBO_BOX?5:t===n.inputType.FREE_TEXT_FILED?6:t===n.inputType.SINGLE_COMBO_BOX?7:8)}}function de(e,c){if(e&1&&(s(0,"form",0)(1,"div",1),D(2,pe,9,3,"div",2,O),l()()),e&2){let t=a();p("formGroup",t.form),m(2),M(c)}}var Xt=(()=>{class e{constructor(){this.formCategoryService=d(Ct),this.channelType=b(void 0),this.categoryId=b(void 0),this.channelId=b(void 0),this.channelProductUpload=b(void 0),this.attributesChanges=F(),this.inputType=K,this.formatType=it,this.validationType=ot}ngOnChanges(){let t=this.categoryId(),i=this.channelId();C.IsNotEmpty(t)&&C.IsNotEmpty(i)&&(this.attributes$=this.formCategoryService.getAttributes({categoryId:t,channelId:i,channelType:this.channelType()}).pipe(A(n=>{this.form=this.formCategoryService.createFormGroup(n),this.listenToFormChange(n)}),B(1)))}listenToFormChange(t){let i=[];this.formSubscription=this.form.valueChanges.subscribe(n=>{i=this.formCategoryService.getFilteredAttributes(t,n),this.attributesChanges.emit(i)})}ngOnDestroy(){this.formSubscription&&this.formSubscription.unsubscribe()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=x({type:e,selectors:[["shopee-attribute-form"]],inputs:{channelType:[1,"channelType"],categoryId:[1,"categoryId"],channelId:[1,"channelId"],channelProductUpload:[1,"channelProductUpload"]},outputs:{attributesChanges:"attributesChanges"},features:[T([Ct]),k],decls:2,vars:3,consts:[[3,"formGroup"],[1,"row"],[1,"col-6","mb-3"],[1,"mb-1"],[1,"text-danger"],["bindLabel","name","bindValue","value_id",3,"multiple","formControlName","items","placeholder"],["bindLabel","name","bindValue","value_id",3,"formControlName","items","placeholder"],["type","text",1,"form-control",3,"formControlName","placeholder"],[1,"attribute-datepicker",3,"formControlName"],[1,"d-flex","align-items-center",3,"formGroupName"],["type","text","autoNum","",1,"form-control",3,"formControlName","placeholder"],["formControlName","value","type","text","autoNum","",1,"form-control","me-1",2,"width","200px",3,"placeholder"],["name","unit","id","unit","formControlName","unit",1,"form-control"],["disabled","","selected","",3,"value"],[3,"value"]],template:function(i,n){if(i&1&&(f(0,de,4,1,"form",0),y(1,"async")),i&2){let o;h((o=v(1,1,n.attributes$))?0:-1,o)}},dependencies:[L,w,U,W,Mt,Vt,j,Dt,V,z,H,Y,Ot,$t,Ht,Yt,S],styles:["input[_ngcontent-%COMP%], select[_ngcontent-%COMP%]{height:36px;border-radius:4px} datepicker.attribute-datepicker>mat-form-field.mat-mdc-form-field>.mat-mdc-text-field-wrapper{height:36px} datepicker.attribute-datepicker .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{padding-top:11px!important;padding-bottom:11px!important;height:36px;min-height:36px!important} datepicker.attribute-datepicker mat-datepicker-toggle>button.mat-mdc-icon-button.mat-mdc-button-base{--mat-icon-button-state-layer-size: 36px}"],changeDetection:0})}}return e})();var Z=(function(e){return e.TIKTOK_SHOP="TIKTOK_SHOP",e.TOKOPEDIA="TOKOPEDIA",e})(Z||{});var bt=(()=>{class e{constructor(){this.httpService=d(rt),this.formBuilder=d(J),this.uploadProductService=d(pt)}getAttributes(t,i){return this.httpService.get("api/product/tiktok/GetAttributes",[{key:"ID",value:t},{key:"CategoryID",value:i}]).pipe(St(o=>this.uploadProductService.selectedProduct$.pipe(R(r=>(o=this.mappingAttributeSalesProperty(o,r),o)))))}mappingAttributeSalesProperty(t,i){let n=0;return t.filter(o=>(o.type=="SALES_PROPERTY"&&(n+=1),n>1?(n=0,!1):!0)).map(o=>(o.type=="SALES_PROPERTY"&&(o.name="Jenis Variant",o.is_multiple_selection=!1,o.is_required=this.isProductHasMoreVariant(i),o.values=[{id:"Warna",name:"Warna"},{id:"Ukuran",name:"Ukuran"}]),o))}isProductHasMoreVariant(t){let i=!1,n=[];return t.forEach(o=>{o.Variants&&n.push(o.Variants.length)}),i=n.some(o=>o>1),i}createFormGroup(t){let i=this.formBuilder.group({}),n=[];return t.forEach(o=>{n=[],o.is_required&&n.push(Q.required),i.addControl(o.id,this.formBuilder.control(null,n))}),i.addControl("listingPlatform",this.formBuilder.control([Z.TIKTOK_SHOP,Z.TOKOPEDIA],[Q.required])),i}getFilteredAttributes(t,i){let n=JSON.parse(JSON.stringify(t)),o=Object.keys(i),r=n.filter(g=>o.findIndex(nt=>parseInt(nt)==g.id)!=-1);return r=this.filterSelectedAttributes(r,i),r}filterSelectedAttributes(t,i){return t.map(o=>(C.IsNotEmpty(o.values)?o.is_multiple_selection?o.values=o.values.filter(r=>i[o.id]?.includes(r.id)):o.values=o.values.filter(r=>r.id==i[o.id]):i[o.id]&&(o.values=[{id:null,name:i[o.id]}]),o)).filter(o=>o?.values?.length>0)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();function ue(e,c){e&1&&(s(0,"small",5),u(1," Platform is required "),l())}function _e(e,c){e&1&&(s(0,"span",5),u(1,"*"),l())}function fe(e,c){if(e&1&&_(0,"ng-select",6),e&2){let t=a().$implicit;p("multiple",!0)("formControlName",t.id)("items",t.values)("placeholder","Pilih "+(t==null?null:t.name))}}function he(e,c){if(e&1&&_(0,"ng-select",7),e&2){let t=a().$implicit;p("formControlName",t.id)("items",t.values)("placeholder","Pilih "+(t==null?null:t.name))}}function Ce(e,c){if(e&1&&_(0,"input",8),e&2){let t=a().$implicit;p("formControlName",t.id)("placeholder",t==null?null:t.name)}}function ge(e,c){if(e&1&&(s(0,"small",5),u(1),l()),e&2){let t=a().$implicit;m(),q(" ",t==null?null:t.name," is mandatory ")}}function be(e,c){if(e&1&&(s(0,"div",2)(1,"div",3),f(2,_e,2,0,"span",5),s(3,"span"),u(4),l()(),f(5,fe,1,4,"ng-select",6)(6,he,1,3,"ng-select",7)(7,Ce,1,2,"input",8),f(8,ge,2,1,"small",5),l()),e&2){let t=c.$implicit,i=a(2);m(2),h(t.is_required?2:-1),m(2),q(" ",t==null?null:t.name," "),m(),h(t.is_multiple_selection?5:t.values!==null&&t.values.length>0?6:7),m(3),h(t.is_required&&i.form.controls[t.id].invalid?8:-1)}}function ye(e,c){if(e&1&&(s(0,"form",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"span"),u(5," Platform Options"),l()(),_(6,"ng-select",4),f(7,ue,2,0,"small",5),l(),D(8,be,9,4,"div",2,O),l()()),e&2){let t,i=a();p("formGroup",i.form),m(6),p("multiple",!0)("items",i.platformOptions)("clearable",!1),m(),h(!(i.form==null||(t=i.form.get("listingPlatform").errors)==null)&&t.required?7:-1),m(),M(c)}}var Kt=(()=>{class e{constructor(){this.tiktokAttributeFormService=d(bt),this.channelId=b(void 0),this.categoryId=b(void 0),this.platformChange=F({alias:"onPlatformChanges"}),this.formSubscription=new Tt,this.attributesChanges=F(),this.platformOptions=[{label:"TikTok Shop",value:Z.TIKTOK_SHOP},{label:"Tokopedia",value:Z.TOKOPEDIA}]}ngOnChanges(){let t=this.categoryId(),i=this.channelId();C.IsNotEmpty(t)&&C.IsNotEmpty(i)&&(this.attributes$=this.tiktokAttributeFormService.getAttributes(i,t).pipe(R(n=>n.filter(o=>!(o.type=="PRODUCT_PROPERTY"&&(C.IsEmpty(o.values)||o.values?.length==0)&&o.is_customizable==!1))),A(n=>{this.form=this.tiktokAttributeFormService.createFormGroup(n),this.listenToFormChange(n)}),B(1)))}listenToFormChange(t){let i=[];this.form.valueChanges.pipe(_t(this.formSubscription)).subscribe(n=>{delete n.listingPlatform,i=this.tiktokAttributeFormService.getFilteredAttributes(t,n),this.attributesChanges.emit(i)}),this.form.get("listingPlatform").valueChanges.pipe(Ft(this.form.get("listingPlatform").value),_t(this.formSubscription)).subscribe(n=>{this.platformChange.emit(n)})}ngOnDestroy(){this.formSubscription&&this.formSubscription.unsubscribe()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=x({type:e,selectors:[["tiktok-attribute-form"]],inputs:{channelId:[1,"channelId"],categoryId:[1,"categoryId"]},outputs:{platformChange:"onPlatformChanges",attributesChanges:"attributesChanges"},features:[T([bt]),k],decls:2,vars:3,consts:[[3,"formGroup"],[1,"row"],[1,"col-6","mb-3"],[1,"mb-1"],["formControlName","listingPlatform","bindLabel","label","bindValue","value","placeholder","Platform Options",3,"multiple","items","clearable"],[1,"text-danger"],["bindLabel","name","bindValue","id",3,"multiple","formControlName","items","placeholder"],["bindLabel","name","bindValue","id",3,"formControlName","items","placeholder"],["type","text",1,"form-control",3,"formControlName","placeholder"]],template:function(i,n){if(i&1&&(f(0,ye,10,5,"form",0),y(1,"async")),i&2){let o;h((o=v(1,1,n.attributes$))?0:-1,o)}},dependencies:[L,w,U,W,j,V,z,H,Y,X,S],encapsulation:2,changeDetection:0})}}return e})();var yt=(()=>{class e{constructor(){this.formBuilder=d(J),this.lazadaUploadProductService=d(st)}getAttributes(t,i){return this.lazadaUploadProductService.getAttributes(t,i)}createFormGroup(t){let i=this.formBuilder.group({}),n=[];return t.forEach(o=>{n=[],o.is_mandatory==1&&n.push(Q.required),i.addControl(String(o.id),this.formBuilder.control(null,n))}),i}getFilteredAttributes(t,i){let n=JSON.parse(JSON.stringify(t)),o=Object.keys(i),r=n.filter(g=>o.findIndex(nt=>Number(nt)==g.id)!=-1);return r=this.filterSelectedAttributes(r,i),r}filterSelectedAttributes(t,i){return t.map(o=>{if(o.options&&o.options.length>0){let r=o.options.filter(g=>Array.isArray(i[String(o.id)])?i[String(o.id)]?.includes(g.id):g.id==i[String(o.id)]);o.options=r}else i[String(o.id)]&&(o.options=[{id:null,name:i[String(o.id)]}]);return o}).filter(o=>o?.options?.length>0)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();function ve(e,c){e&1&&(s(0,"span",4),u(1,"*"),l())}function xe(e,c){if(e&1&&_(0,"ng-select",5),e&2){let t=a().$implicit;p("formControlName",t.id)("items",t.options)("placeholder","Pilih "+(t.label||t.name))}}function Te(e,c){if(e&1&&_(0,"input",6),e&2){let t=a().$implicit;p("formControlName",t.id)("placeholder",t.label||t.name)}}function Se(e,c){if(e&1&&(s(0,"small",4),u(1),l()),e&2){let t=a().$implicit;m(),q(" ",t.label||t.name," is mandatory ")}}function Ie(e,c){if(e&1&&(s(0,"div",2)(1,"div",3),f(2,ve,2,0,"span",4),s(3,"span"),u(4),l()(),f(5,xe,1,3,"ng-select",5)(6,Te,1,2,"input",6),f(7,Se,2,1,"small",4),l()),e&2){let t=c.$implicit,i=a(2);m(2),h(t.is_mandatory==1?2:-1),m(2),et(t.label||t.name),m(),h((t.options==null?null:t.options.length)>0?5:6),m(2),h(t.is_mandatory==1&&i.form.controls[t.id].invalid?7:-1)}}function Fe(e,c){if(e&1&&(s(0,"form",0)(1,"div",1),D(2,Ie,8,4,"div",2,O),l()()),e&2){let t=a();p("formGroup",t.form),m(2),M(c)}}var qt=(()=>{class e{constructor(){this.lazadaAttributeFormService=d(yt),this.channelId=b(void 0),this.categoryId=b(void 0),this.attributesChanges=F()}ngOnChanges(){let t=this.categoryId(),i=this.channelId();C.IsNotEmpty(t)&&C.IsNotEmpty(i)&&(this.attributes$=this.lazadaAttributeFormService.getAttributes(i,t).pipe(A(n=>{this.form=this.lazadaAttributeFormService.createFormGroup(n),this.listenToFormChange(n)}),B(1)))}listenToFormChange(t){this.form.valueChanges.subscribe(i=>{let n=this.lazadaAttributeFormService.getFilteredAttributes(t,i);this.attributesChanges.emit(n)})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=x({type:e,selectors:[["lazada-attribute-form"]],inputs:{channelId:[1,"channelId"],categoryId:[1,"categoryId"]},outputs:{attributesChanges:"attributesChanges"},features:[T([yt]),k],decls:2,vars:3,consts:[[3,"formGroup"],[1,"row"],[1,"col-6","mb-3"],[1,"mb-1"],[1,"text-danger"],["bindLabel","name","bindValue","id",3,"formControlName","items","placeholder"],["type","text",1,"form-control",3,"formControlName","placeholder"]],template:function(i,n){if(i&1&&(f(0,Fe,4,1,"form",0),y(1,"async")),i&2){let o;h((o=v(1,1,n.attributes$))?0:-1,o)}},dependencies:[L,w,U,W,j,V,z,H,Y,X,S],encapsulation:2,changeDetection:0})}}return e})();var vt=(()=>{class e{constructor(){this.woocommerceUploadService=d(mt)}getAttributes(t,i){return this.woocommerceUploadService.getAttributes(t,i).pipe(R(n=>n.map(o=>({key:o.name,label:o.name}))))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var Qt=(()=>{class e{constructor(){this.wooAttributeFormService=d(vt),this.channelId=b(),this.categoryId=b(),this.attributesChanges=F()}ngOnChanges(){C.IsNotEmpty(this.categoryId())&&C.IsNotEmpty(this.channelId())&&(this.attributes$=this.wooAttributeFormService.getAttributes(this.channelId(),this.categoryId()))}onSelectAttribute(t){this.attributesChanges.emit([t.key])}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=x({type:e,selectors:[["wooocommerce-attribute-form"]],inputs:{channelId:[1,"channelId"],categoryId:[1,"categoryId"]},outputs:{attributesChanges:"attributesChanges"},features:[T([vt]),k],decls:6,vars:3,consts:[[1,"row"],[1,"col-6"],[1,"mb-1"],["bindLabel","label","bindValue","id","placeholder","Pilih Atribut",3,"change","items"]],template:function(i,n){i&1&&(s(0,"div",0)(1,"div",1)(2,"div",2),u(3,"Atribut"),l(),s(4,"ng-select",3),y(5,"async"),I("change",function(r){return n.onSelectAttribute(r)}),l()()()),i&2&&(m(4),p("items",v(5,1,n.attributes$)))},dependencies:[X,L,w,U,S],encapsulation:2,changeDetection:0})}}return e})();var xt=(()=>{class e{constructor(){this.httpService=d(rt),this.formBuilder=d(J)}getAttributes(t){return this.httpService.get("api/product/ShopifyV2/GetAttributes",[{key:"ID",value:t}]).pipe(A(n=>(n.Options.StatusOptions=n.Options.Status.map(o=>({id:o,name:o})),n)))}createFormGroup(t){let i=this.formBuilder.group({});return Object.keys(t.Attribute).forEach(o=>{i.addControl(o,this.formBuilder.control(null))}),i}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();function Ae(e,c){if(e&1&&(s(0,"form",0)(1,"div",1)(2,"div",2)(3,"div",3),u(4," Brand "),l(),_(5,"input",4),l(),s(6,"div",5)(7,"div",3),u(8," Product Type "),l(),_(9,"input",6),l(),s(10,"div",5)(11,"div",3),u(12," Status "),l(),_(13,"ng-select",7),l()()()),e&2){let t=a();p("formGroup",t.form),m(13),p("items",c.Options.StatusOptions)}}var Zt=(()=>{class e{constructor(){this.channelId=b(void 0),this.attributesChanges=F(),this.shopifyFormService=d(xt)}ngOnChanges(t){t.channelId&&(this.attributes$=this.shopifyFormService.getAttributes(this.channelId()).pipe(A(i=>{this.form=this.shopifyFormService.createFormGroup(i),this.listenToFormChange()})))}listenToFormChange(){this.formSubscription=this.form.valueChanges.pipe(It(500)).subscribe(t=>{this.attributesChanges.emit([t])})}ngOnDestroy(){this.formSubscription.unsubscribe()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=x({type:e,selectors:[["shopify-attribute-form"]],inputs:{channelId:[1,"channelId"]},outputs:{attributesChanges:"attributesChanges"},features:[T([xt]),k],decls:2,vars:3,consts:[[3,"formGroup"],[1,"row"],[1,"col-6","mb-3"],[1,"mb-1"],["formControlName","Brand","type","text","placeholder","brand",1,"form-control"],[1,"col-6"],["formControlName","ProductType","type","text","placeholder","Product Type",1,"form-control"],["formControlName","Status","bindLabel","name","bindValue","id","placeholder","Status",3,"items"]],template:function(i,n){if(i&1&&(f(0,Ae,14,2,"form",0),y(1,"async")),i&2){let o;h((o=v(1,1,n.attributes$))?0:-1,o)}},dependencies:[U,W,j,V,z,H,Y,L,w,S],encapsulation:2,changeDetection:0})}}return e})();function Pe(e,c){if(e&1&&(s(0,"div",6),_(1,"app-product-card",9),l()),e&2){let t=c.$implicit;m(),p("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)("imageForZoom",t==null?null:t.ImageUrl)("code",t==null||t.Variants[0]==null?null:t.Variants[0].Code)("showFooter",!1)}}function Ne(e,c){if(e&1){let t=G();s(0,"mat-checkbox",21),Nt("ngModelChange",function(n){N(t);let o=a().$implicit;return Pt(o.selected,n)||(o.selected=n),E(n)}),I("ngModelChange",function(){let n=N(t),o=a(),r=o.$implicit,g=o.$index,tt=a();return E(tt.onSelectChannel(r,g,n))}),l()}if(e&2){let t=a().$implicit;At("ngModel",t.selected)}}function Ee(e,c){if(e&1&&(s(0,"div",18),_(1,"input",22),l()),e&2){let t=a().$implicit,i=a();p("matTooltip",t.type==i.channelType.Shopify||t.type==i.channelType.ShopifyV2?"Cannot change category, please change category in admin.shopify.com":t.type==i.channelType.Plugo?"You can change the category after the product has been uploaded to the Plugo Dashboard.":"")}}function ke(e,c){if(e&1){let t=G();s(0,"app-channel-category-select",23),I("selectedCategory",function(n){N(t);let o=a().$index,r=a();return E(r.onCategoryChange(o,n))}),l()}if(e&2){let t=a().$implicit;p("disabled",!t.selected)("channelId",t.id)("channelType",t.type)("categoryId",t.categoryId)}}function Oe(e,c){if(e&1){let t=G();s(0,"shopee-attribute-form",27),I("attributesChanges",function(n){N(t);let o=a(2).$index,r=a();return E(r.onAttributesChange(o,n))}),l()}if(e&2){let t=a(2).$implicit;p("categoryId",t.categoryId)("channelId",t.id)("channelType",t.type)}}function De(e,c){if(e&1){let t=G();s(0,"tiktok-attribute-form",28),I("attributesChanges",function(n){N(t);let o=a(2).$index,r=a();return E(r.onAttributesChange(o,n))})("onPlatformChanges",function(n){N(t);let o=a(2).$index,r=a();return E(r.onPlatformChange(o,n))}),l()}if(e&2){let t=a(2).$implicit;p("categoryId",t.categoryId)("channelId",t.id)}}function Me(e,c){if(e&1){let t=G();s(0,"wooocommerce-attribute-form",29),I("attributesChanges",function(n){N(t);let o=a(2).$index,r=a();return E(r.onAttributesChange(o,n))}),l()}if(e&2){let t=a(2).$implicit;p("categoryId",t.categoryId)("channelId",t.id)}}function Ve(e,c){if(e&1){let t=G();s(0,"lazada-attribute-form",29),I("attributesChanges",function(n){N(t);let o=a(2).$index,r=a();return E(r.onAttributesChange(o,n))}),l()}if(e&2){let t=a(2).$implicit;p("categoryId",t.categoryId)("channelId",t.id)}}function Ue(e,c){if(e&1&&(s(0,"div",20)(1,"div",24),f(2,Oe,1,3,"shopee-attribute-form",25)(3,De,1,2,"tiktok-attribute-form",26)(4,Me,1,2,"wooocommerce-attribute-form",26)(5,Ve,1,2,"lazada-attribute-form",26),l()()),e&2){let t,i=a().$implicit,n=a();m(2),h((t=i.type)===n.channelType.Shopee?2:t===n.channelType.Tiktok?3:t===n.channelType.WooCommerce?4:t===n.channelType.Lazada?5:-1)}}function we(e,c){if(e&1){let t=G();s(0,"div",20)(1,"div",24)(2,"shopify-attribute-form",30),I("attributesChanges",function(n){N(t);let o=a().$index,r=a();return E(r.onAttributesChange(o,n))}),l()()()}if(e&2){let t=a().$implicit;m(2),p("channelId",t.id)}}function Le(e,c){if(e&1&&(s(0,"div",8)(1,"div",10)(2,"div",11)(3,"div",12)(4,"div",13)(5,"div"),f(6,Ne,1,1,"mat-checkbox",14),y(7,"async"),l(),s(8,"div"),_(9,"app-channel-logo",15),l(),s(10,"div",16)(11,"span"),u(12),l()()()(),s(13,"div",12)(14,"div",17),f(15,Ee,2,1,"div",18)(16,ke,1,4,"app-channel-category-select",19),l()()(),f(17,Ue,6,1,"div",20)(18,we,3,1,"div",20),l()()),e&2){let t,i=c.$implicit,n=a();m(6),h((t=v(7,8,n.defaultCategories$))?6:-1,t),m(3),p("typeId",i.type)("showChannelName",!1),m(),p("matTooltip",i.name)("matTooltipShowDelay",2500),m(2),et(i.name),m(3),h(i.type==n.channelType.Shopify||i.type==n.channelType.Plugo||i.type==n.channelType.ShopifyV2?15:16),m(2),h(i.categoryId&&i.selected?17:(n.channelType.Shopify==i.type||i.type==n.channelType.ShopifyV2)&&i.selected?18:-1)}}var mn=(()=>{class e{constructor(){this.toastr=d(Et),this.uploadProductService=d(pt),this.selectedProducts$=this.uploadProductService.selectedProduct$,this.channelProductUploads=this.uploadProductService.channelProductUpload,this.channelType=ft,this.defaultCategories$=this.uploadProductService.getDefaultCategory().pipe(B(1))}onCategoryChange(t,i){this.channelProductUploads.update(n=>n.map((o,r)=>(r==t&&(o.categoryId=i,o.attributes=[]),o)))}onPlatformChange(t,i){this.channelProductUploads.update(n=>n.map((o,r)=>(r==t&&(o.listing_platforms=i),o)))}onAttributesChange(t,i){this.channelProductUploads.update(n=>n.map((o,r)=>(r==t&&(o.attributes=i),o)))}tiktokPlatformChanges(t,i){this.channelProductUploads.update(n=>n.map((o,r)=>(r==t&&(o.listing_platforms=i),o)))}onSelectChannel(t,i,n){this.channelProductUploads.update(o=>o.map((r,g)=>{if(g==i&&t.selected){let tt=this.findCategoryByChannelId(t.id,n);r.categoryId=tt?.DefaultCategoryID}return g==i&&!t.selected&&(r.categoryId=null),r}))}findCategoryByChannelId(t,i){return i.find(n=>n.ID===t)}onRemoveCategory(t){this.channelProductUploads.update(i=>i.map((n,o)=>(o==t&&(n.categoryId=null,n.attributes=[]),n)))}onUploadProduct(){if(this.checkTiktokPlatform()==!1){this.toastr.error("Please select at least one platform for TikTok channel","Platform is Required");return}this.uploadProductService.onUploadProduct(this.channelProductUploads())}checkTiktokPlatform(){return this.channelProductUploads().every(i=>i.type==ft.Tiktok&&C.IsNotEmpty(i?.categoryId)?i.listing_platforms.length>0:!0)}ngOnDestroy(){this.uploadProductService.clearSelectedProduct()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=x({type:e,selectors:[["app-product-upload"]],features:[T([ct,Rt,st,mt])],decls:17,vars:5,consts:[["headerTitle","Upload Product To Channel",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click","disabled"],["aria-hidden","true",1,"fa","fa-upload"],[1,"container-fluid","mt-6"],[1,"ps-3","mt-8","pb-5","fw-medium"],[1,"row","mb-10","ps-3"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[1,"ps-3","mb-8","border-bottom","pb-5","fw-medium"],[1,"row","mb-6"],[3,"productId","title","image","description","imageForZoom","code","showFooter"],[1,"col-12"],[1,"row"],[1,"col-3"],[1,"d-flex","align-items-center"],["color","primary",1,"example-margin",3,"ngModel"],[3,"typeId","showChannelName"],[2,"overflow","hidden","text-overflow","ellipsis","white-space","nowrap",3,"matTooltip","matTooltipShowDelay"],[1,"w-100"],["matTooltipPosition","above",3,"matTooltip"],[3,"disabled","channelId","channelType","categoryId"],[1,"row","my-3"],["color","primary",1,"example-margin",3,"ngModelChange","ngModel"],["disabled","","type","text","placeholder","Category Unavailable",1,"form-control","rounded-1",2,"height","35px"],[3,"selectedCategory","disabled","channelId","channelType","categoryId"],[1,"col-12","ps-11"],[3,"categoryId","channelId","channelType"],[3,"categoryId","channelId"],[3,"attributesChanges","categoryId","channelId","channelType"],[3,"attributesChanges","onPlatformChanges","categoryId","channelId"],[3,"attributesChanges","categoryId","channelId"],[3,"attributesChanges","channelId"]],template:function(i,n){if(i&1&&(s(0,"mainpanel",0)(1,"actions")(2,"button",1),I("click",function(){return n.onUploadProduct()}),_(3,"i",2),u(4," Upload "),l()(),s(5,"content")(6,"div",3)(7,"h3",4),u(8,"Product To Upload"),l(),s(9,"div",5),D(10,Pe,2,7,"div",6,O),y(12,"async"),l(),s(13,"h3",7),u(14,"Channel To Upload"),l(),D(15,Le,19,10,"div",8,O),l()()()),i&2){let o;p("hideSearchBox",!0)("hideSearchDropdown",!0),m(2),p("disabled",((o=n.channelProductUploads())==null?null:o.length)==0),m(8),M(v(12,3,n.selectedProducts$)),m(5),M(n.channelProductUploads())}},dependencies:[Wt,Lt,zt,jt,Gt,X,V,kt,wt,Ut,Kt,Qt,Zt,Bt,Jt,Xt,qt,S],encapsulation:2,changeDetection:0})}}return e})();export{mn as ProductUploadComponent};
1
+ import{a as Jt}from"./chunk-PXK5S7ZN.js";import"./chunk-4P7DUX6B.js";import{b as Wt}from"./chunk-4O2VD4QF.js";import{a as jt,b as zt}from"./chunk-G346YBOK.js";import"./chunk-SJBVLNCR.js";import{a as Gt}from"./chunk-A46ZW26C.js";import{a as ct,b as Rt,c as st,d as mt,e as pt}from"./chunk-SZGAKYXG.js";import{a as Bt}from"./chunk-AF67O6OF.js";import"./chunk-W3ZGCYFJ.js";import"./chunk-IO5P3Z5D.js";import"./chunk-FBOJCUGO.js";import"./chunk-VYXSV6K4.js";import{a as $t}from"./chunk-62QUGB6I.js";import"./chunk-JTZZMQ3O.js";import"./chunk-2KBEFXEF.js";import"./chunk-O476ULLD.js";import"./chunk-HBAHB3P5.js";import"./chunk-5BO5IGZG.js";import"./chunk-CP5ER4QN.js";import"./chunk-TZFPNLRF.js";import"./chunk-7YRNGS5Y.js";import"./chunk-BGFEVOPZ.js";import"./chunk-AWU3GJLO.js";import"./chunk-KRIYDIQQ.js";import{d as w,e as L}from"./chunk-474G6BPL.js";import{b as Lt}from"./chunk-636FAHVP.js";import"./chunk-7BDGR7WQ.js";import"./chunk-TFTF5VH3.js";import{a as wt}from"./chunk-CBPURQKN.js";import{b as Yt,c as Ht}from"./chunk-7DLOP2EE.js";import"./chunk-7RKWOSCN.js";import"./chunk-GAI4CMX3.js";import"./chunk-3RA4CRAW.js";import"./chunk-W55ZHKHY.js";import"./chunk-P6EVJYEB.js";import"./chunk-DXXROE3I.js";import"./chunk-3X54ZT7P.js";import"./chunk-GDOAWQKS.js";import"./chunk-TIHANIPI.js";import"./chunk-PF3J5XPT.js";import"./chunk-IRNBEBQA.js";import"./chunk-P2HR36CY.js";import"./chunk-NCZ46DU6.js";import"./chunk-OUE6X2ER.js";import"./chunk-JYH45M2L.js";import"./chunk-SOTWA42R.js";import"./chunk-7LEHDN2Q.js";import"./chunk-3OTK6GG2.js";import"./chunk-KFJBIBDQ.js";import{b as Ut}from"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import"./chunk-ZSUWHVKX.js";import"./chunk-MEGJOWGP.js";import"./chunk-U66BXHEQ.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import"./chunk-63X2BBS4.js";import"./chunk-MDHMVGYC.js";import{b as ft,c as C}from"./chunk-NNVT5X6O.js";import{A as U,c as j,e as Q,h as V,i as z,l as lt,m as kt,n as W,q as Ot,r as Y,s as H,t as Dt,u as Mt,v as Vt,y as J,z as X}from"./chunk-7HUEGPJN.js";import{b as Et,e as rt}from"./chunk-ZE4OOGMT.js";import"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import{z as S}from"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{Fa as k,G as St,I as It,Ic as u,Jc as et,Kc as q,Mc as At,Nc as Pt,Oc as Nt,S as B,U as Ft,Vc as T,W as _t,Wc as at,Xb as f,Y as A,Zb as h,_b as O,ac as D,bc as M,ca as P,cc as p,d as Tt,dc as s,ec as l,ed as y,fc as _,fd as v,gb as m,ha as d,mc as G,oa as N,pa as E,r as R,rc as I,rd as F,sd as b,tc as a,yb as x}from"./chunk-5VYDZBNH.js";import"./chunk-QWWW7GFA.js";var K=(function(e){return e[e.SINGLE_DROP_DOWN=1]="SINGLE_DROP_DOWN",e[e.SINGLE_COMBO_BOX=2]="SINGLE_COMBO_BOX",e[e.FREE_TEXT_FILED=3]="FREE_TEXT_FILED",e[e.MULTI_DROP_DOWN=4]="MULTI_DROP_DOWN",e[e.MULTI_COMBO_BOX=5]="MULTI_COMBO_BOX",e})(K||{});var it=(function(e){return e[e.FORMAT_NORMAL=1]="FORMAT_NORMAL",e[e.FORMAT_QUANTITATIVE_WITH_UNIT=2]="FORMAT_QUANTITATIVE_WITH_UNIT",e})(it||{});var ot=(function(e){return e[e.VALIDATOR_NO_VALIDATE_TYPE=0]="VALIDATOR_NO_VALIDATE_TYPE",e[e.VALIDATOR_INT_TYPE=1]="VALIDATOR_INT_TYPE",e[e.VALIDATOR_STRING_TYPE=2]="VALIDATOR_STRING_TYPE",e[e.VALIDATOR_FLOAT_TYPE=3]="VALIDATOR_FLOAT_TYPE",e[e.VALIDATOR_DATE_TYPE=4]="VALIDATOR_DATE_TYPE",e})(ot||{});var ht=class extends lt{setValue(c,t){if(c instanceof Date){let i=Math.floor(c.getTime()/1e3);super.setValue(i,t)}else super.setValue(c,t)}},Ct=(()=>{class e{constructor(){this.shopeeUploadService=d(ct),this.formBuilder=d(J)}getAttributes(t){return this.shopeeUploadService.getAttributes(t.channelId,t.categoryId).pipe(R(i=>this.setLabelToIndonesian(i)))}setLabelToIndonesian(t=[]){let i,n;return t=t.map(o=>(i=o?.multi_lang?.find(r=>r.language=="id"),o.attribute_value_list=o?.attribute_value_list?.map(r=>(n=r?.multi_lang?.find(g=>g.language=="id"),r.name=n?.value,r)),o.name=i?.value?i?.value:o.name,o)),t}createFormGroup(t){let i=this.formBuilder.group({}),n=[];return t.forEach(o=>{if(n=[],o.mandatory&&n.push(Q.required),o?.attribute_info?.format_type==it.FORMAT_QUANTITATIVE_WITH_UNIT&&o?.attribute_info?.input_type==K.FREE_TEXT_FILED){let r=this.formBuilder.group({unit:new lt(null),value:new lt(null,n)});i.addControl(JSON.stringify(o.attribute_id),r)}else o?.attribute_info?.input_type==K.FREE_TEXT_FILED&&o?.attribute_info?.input_validation_type==ot.VALIDATOR_DATE_TYPE?i.addControl(JSON.stringify(o.attribute_id),new ht(null,n)):i.addControl(JSON.stringify(o.attribute_id),this.formBuilder.control(null,n))}),i}getFilteredAttributes(t,i){let n=JSON.parse(JSON.stringify(t)),o=Object.keys(i),r=n.filter(g=>o.findIndex(nt=>parseInt(nt)==g.attribute_id||g.mandatory)!=-1);return r=this.filterSelectedAttributes(r,i),r}filterSelectedAttributes(t,i){return t.map(o=>{switch(o.attribute_info.input_type){case K.MULTI_COMBO_BOX:C.IsNotEmpty(i[o.attribute_id])?o.attribute_value_list=o.attribute_value_list.filter(r=>i[o.attribute_id]?.findIndex(g=>g==r.value_id)!=-1):o.attribute_value_list=[];break;case K.FREE_TEXT_FILED:o.attribute_info.format_type==it.FORMAT_QUANTITATIVE_WITH_UNIT?o.attribute_value_list=this.setSelectedQuantitativeAttr(i[o.attribute_id]?.value,i[o.attribute_id]?.unit):o.attribute_info.input_validation_type==ot.VALIDATOR_DATE_TYPE?o.attribute_value_list=this.setSelectedDateAttr(i[o.attribute_id]):o.attribute_value_list=this.setSelectedQuantitativeAttr(i[o.attribute_id]);break;default:o.attribute_value_list=o.attribute_value_list.filter(r=>r.value_id==i[o.attribute_id])}return o}).filter(o=>o?.attribute_value_list?.length>0)}setSelectedQuantitativeAttr(t,i){let n=[];if(C.IsNotEmpty(t)){let o={value_id:0,original_value_name:JSON.stringify(t)};C.IsNotEmpty(i)&&(o.value_unit=i),n=[o]}return n}setSelectedDateAttr(t){let i=[];return C.IsNotEmpty(t)&&(i=[{value_id:0,original_value_name:JSON.stringify(t)}]),i}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var gt=()=>[];function te(e,c){e&1&&(s(0,"span",4),u(1,"*"),l())}function ee(e,c){if(e&1&&_(0,"ng-select",5),e&2){let t=a().$implicit;p("multiple",!0)("formControlName",t.attribute_id)("items",t.attribute_value_list?t.attribute_value_list:at(4,gt))("placeholder","Pilih "+(t==null?null:t.name))}}function ie(e,c){if(e&1&&_(0,"input",7),e&2){let t=a(2).$implicit;p("formControlName",t.attribute_id)("placeholder","Isi "+(t==null?null:t.name))}}function oe(e,c){if(e&1&&(s(0,"option",14),u(1),l()),e&2){let t=c.$implicit;p("value",t),m(),et(t)}}function ne(e,c){if(e&1&&(s(0,"div",9),_(1,"input",11),s(2,"select",12)(3,"option",13),u(4,"Unit"),l(),D(5,oe,2,2,"option",14,O),l()()),e&2){let t=a(3).$implicit;p("formGroupName",t.attribute_id),m(),p("placeholder","Isi "+(t==null?null:t.name)),m(2),p("value",null),m(2),M(t==null||t.attribute_info==null?null:t.attribute_info.attribute_unit_list)}}function re(e,c){if(e&1&&_(0,"input",10),e&2){let t=a(3).$implicit;p("formControlName",t.attribute_id)("placeholder","Isi "+(t==null?null:t.name))}}function ae(e,c){if(e&1&&f(0,ne,7,3,"div",9)(1,re,1,2,"input",10),e&2){let t=a(2).$implicit,i=a(2);h((t==null||t.attribute_info==null?null:t.attribute_info.format_type)==i.formatType.FORMAT_QUANTITATIVE_WITH_UNIT?0:1)}}function le(e,c){if(e&1&&_(0,"datepicker",8),e&2){let t=a(2).$implicit;p("formControlName",t.attribute_id)}}function ce(e,c){if(e&1&&f(0,ie,1,2,"input",7)(1,ae,2,1)(2,le,1,1,"datepicker",8),e&2){let t,i=a().$implicit,n=a(2);h((t=i==null||i.attribute_info==null?null:i.attribute_info.input_validation_type)===n.validationType.VALIDATOR_STRING_TYPE?0:t===n.validationType.VALIDATOR_FLOAT_TYPE?1:t===n.validationType.VALIDATOR_DATE_TYPE?2:-1)}}function se(e,c){if(e&1&&_(0,"ng-select",6),e&2){let t=a().$implicit;p("formControlName",t.attribute_id)("items",t.attribute_value_list?t.attribute_value_list:at(3,gt))("placeholder","Pilih "+(t==null?null:t.name))}}function me(e,c){if(e&1&&_(0,"ng-select",6),e&2){let t=a().$implicit;p("formControlName",t.attribute_id)("items",t.attribute_value_list?t.attribute_value_list:at(3,gt))("placeholder","Pilih "+(t==null?null:t.name))}}function pe(e,c){if(e&1&&(s(0,"div",2)(1,"div",3),f(2,te,2,0,"span",4),s(3,"span"),u(4),l()(),f(5,ee,1,5,"ng-select",5)(6,ce,3,1)(7,se,1,4,"ng-select",6)(8,me,1,4,"ng-select",6),l()),e&2){let t,i=c.$implicit,n=a(2);m(2),h(i.mandatory?2:-1),m(2),q(" ",i==null?null:i.name," "),m(),h((t=i==null||i.attribute_info==null?null:i.attribute_info.input_type)===n.inputType.MULTI_COMBO_BOX?5:t===n.inputType.FREE_TEXT_FILED?6:t===n.inputType.SINGLE_COMBO_BOX?7:8)}}function de(e,c){if(e&1&&(s(0,"form",0)(1,"div",1),D(2,pe,9,3,"div",2,O),l()()),e&2){let t=a();p("formGroup",t.form),m(2),M(c)}}var Xt=(()=>{class e{constructor(){this.formCategoryService=d(Ct),this.channelType=b(void 0),this.categoryId=b(void 0),this.channelId=b(void 0),this.channelProductUpload=b(void 0),this.attributesChanges=F(),this.inputType=K,this.formatType=it,this.validationType=ot}ngOnChanges(){let t=this.categoryId(),i=this.channelId();C.IsNotEmpty(t)&&C.IsNotEmpty(i)&&(this.attributes$=this.formCategoryService.getAttributes({categoryId:t,channelId:i,channelType:this.channelType()}).pipe(A(n=>{this.form=this.formCategoryService.createFormGroup(n),this.listenToFormChange(n)}),B(1)))}listenToFormChange(t){let i=[];this.formSubscription=this.form.valueChanges.subscribe(n=>{i=this.formCategoryService.getFilteredAttributes(t,n),this.attributesChanges.emit(i)})}ngOnDestroy(){this.formSubscription&&this.formSubscription.unsubscribe()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=x({type:e,selectors:[["shopee-attribute-form"]],inputs:{channelType:[1,"channelType"],categoryId:[1,"categoryId"],channelId:[1,"channelId"],channelProductUpload:[1,"channelProductUpload"]},outputs:{attributesChanges:"attributesChanges"},features:[T([Ct]),k],decls:2,vars:3,consts:[[3,"formGroup"],[1,"row"],[1,"col-6","mb-3"],[1,"mb-1"],[1,"text-danger"],["bindLabel","name","bindValue","value_id",3,"multiple","formControlName","items","placeholder"],["bindLabel","name","bindValue","value_id",3,"formControlName","items","placeholder"],["type","text",1,"form-control",3,"formControlName","placeholder"],[1,"attribute-datepicker",3,"formControlName"],[1,"d-flex","align-items-center",3,"formGroupName"],["type","text","autoNum","",1,"form-control",3,"formControlName","placeholder"],["formControlName","value","type","text","autoNum","",1,"form-control","me-1",2,"width","200px",3,"placeholder"],["name","unit","id","unit","formControlName","unit",1,"form-control"],["disabled","","selected","",3,"value"],[3,"value"]],template:function(i,n){if(i&1&&(f(0,de,4,1,"form",0),y(1,"async")),i&2){let o;h((o=v(1,1,n.attributes$))?0:-1,o)}},dependencies:[L,w,U,W,Mt,Vt,j,Dt,V,z,H,Y,Ot,$t,Ht,Yt,S],styles:["input[_ngcontent-%COMP%], select[_ngcontent-%COMP%]{height:36px;border-radius:4px} datepicker.attribute-datepicker>mat-form-field.mat-mdc-form-field>.mat-mdc-text-field-wrapper{height:36px} datepicker.attribute-datepicker .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{padding-top:11px!important;padding-bottom:11px!important;height:36px;min-height:36px!important} datepicker.attribute-datepicker mat-datepicker-toggle>button.mat-mdc-icon-button.mat-mdc-button-base{--mat-icon-button-state-layer-size: 36px}"],changeDetection:0})}}return e})();var Z=(function(e){return e.TIKTOK_SHOP="TIKTOK_SHOP",e.TOKOPEDIA="TOKOPEDIA",e})(Z||{});var bt=(()=>{class e{constructor(){this.httpService=d(rt),this.formBuilder=d(J),this.uploadProductService=d(pt)}getAttributes(t,i){return this.httpService.get("api/product/tiktok/GetAttributes",[{key:"ID",value:t},{key:"CategoryID",value:i}]).pipe(St(o=>this.uploadProductService.selectedProduct$.pipe(R(r=>(o=this.mappingAttributeSalesProperty(o,r),o)))))}mappingAttributeSalesProperty(t,i){let n=0;return t.filter(o=>(o.type=="SALES_PROPERTY"&&(n+=1),n>1?(n=0,!1):!0)).map(o=>(o.type=="SALES_PROPERTY"&&(o.name="Jenis Variant",o.is_multiple_selection=!1,o.is_required=this.isProductHasMoreVariant(i),o.values=[{id:"Warna",name:"Warna"},{id:"Ukuran",name:"Ukuran"}]),o))}isProductHasMoreVariant(t){let i=!1,n=[];return t.forEach(o=>{o.Variants&&n.push(o.Variants.length)}),i=n.some(o=>o>1),i}createFormGroup(t){let i=this.formBuilder.group({}),n=[];return t.forEach(o=>{n=[],o.is_required&&n.push(Q.required),i.addControl(o.id,this.formBuilder.control(null,n))}),i.addControl("listingPlatform",this.formBuilder.control([Z.TIKTOK_SHOP,Z.TOKOPEDIA],[Q.required])),i}getFilteredAttributes(t,i){let n=JSON.parse(JSON.stringify(t)),o=Object.keys(i),r=n.filter(g=>o.findIndex(nt=>parseInt(nt)==g.id)!=-1);return r=this.filterSelectedAttributes(r,i),r}filterSelectedAttributes(t,i){return t.map(o=>(C.IsNotEmpty(o.values)?o.is_multiple_selection?o.values=o.values.filter(r=>i[o.id]?.includes(r.id)):o.values=o.values.filter(r=>r.id==i[o.id]):i[o.id]&&(o.values=[{id:null,name:i[o.id]}]),o)).filter(o=>o?.values?.length>0)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();function ue(e,c){e&1&&(s(0,"small",5),u(1," Platform is required "),l())}function _e(e,c){e&1&&(s(0,"span",5),u(1,"*"),l())}function fe(e,c){if(e&1&&_(0,"ng-select",6),e&2){let t=a().$implicit;p("multiple",!0)("formControlName",t.id)("items",t.values)("placeholder","Pilih "+(t==null?null:t.name))}}function he(e,c){if(e&1&&_(0,"ng-select",7),e&2){let t=a().$implicit;p("formControlName",t.id)("items",t.values)("placeholder","Pilih "+(t==null?null:t.name))}}function Ce(e,c){if(e&1&&_(0,"input",8),e&2){let t=a().$implicit;p("formControlName",t.id)("placeholder",t==null?null:t.name)}}function ge(e,c){if(e&1&&(s(0,"small",5),u(1),l()),e&2){let t=a().$implicit;m(),q(" ",t==null?null:t.name," is mandatory ")}}function be(e,c){if(e&1&&(s(0,"div",2)(1,"div",3),f(2,_e,2,0,"span",5),s(3,"span"),u(4),l()(),f(5,fe,1,4,"ng-select",6)(6,he,1,3,"ng-select",7)(7,Ce,1,2,"input",8),f(8,ge,2,1,"small",5),l()),e&2){let t=c.$implicit,i=a(2);m(2),h(t.is_required?2:-1),m(2),q(" ",t==null?null:t.name," "),m(),h(t.is_multiple_selection?5:t.values!==null&&t.values.length>0?6:7),m(3),h(t.is_required&&i.form.controls[t.id].invalid?8:-1)}}function ye(e,c){if(e&1&&(s(0,"form",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"span"),u(5," Platform Options"),l()(),_(6,"ng-select",4),f(7,ue,2,0,"small",5),l(),D(8,be,9,4,"div",2,O),l()()),e&2){let t,i=a();p("formGroup",i.form),m(6),p("multiple",!0)("items",i.platformOptions)("clearable",!1),m(),h(!(i.form==null||(t=i.form.get("listingPlatform").errors)==null)&&t.required?7:-1),m(),M(c)}}var Kt=(()=>{class e{constructor(){this.tiktokAttributeFormService=d(bt),this.channelId=b(void 0),this.categoryId=b(void 0),this.platformChange=F({alias:"onPlatformChanges"}),this.formSubscription=new Tt,this.attributesChanges=F(),this.platformOptions=[{label:"TikTok Shop",value:Z.TIKTOK_SHOP},{label:"Tokopedia",value:Z.TOKOPEDIA}]}ngOnChanges(){let t=this.categoryId(),i=this.channelId();C.IsNotEmpty(t)&&C.IsNotEmpty(i)&&(this.attributes$=this.tiktokAttributeFormService.getAttributes(i,t).pipe(R(n=>n.filter(o=>!(o.type=="PRODUCT_PROPERTY"&&(C.IsEmpty(o.values)||o.values?.length==0)&&o.is_customizable==!1))),A(n=>{this.form=this.tiktokAttributeFormService.createFormGroup(n),this.listenToFormChange(n)}),B(1)))}listenToFormChange(t){let i=[];this.form.valueChanges.pipe(_t(this.formSubscription)).subscribe(n=>{delete n.listingPlatform,i=this.tiktokAttributeFormService.getFilteredAttributes(t,n),this.attributesChanges.emit(i)}),this.form.get("listingPlatform").valueChanges.pipe(Ft(this.form.get("listingPlatform").value),_t(this.formSubscription)).subscribe(n=>{this.platformChange.emit(n)})}ngOnDestroy(){this.formSubscription&&this.formSubscription.unsubscribe()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=x({type:e,selectors:[["tiktok-attribute-form"]],inputs:{channelId:[1,"channelId"],categoryId:[1,"categoryId"]},outputs:{platformChange:"onPlatformChanges",attributesChanges:"attributesChanges"},features:[T([bt]),k],decls:2,vars:3,consts:[[3,"formGroup"],[1,"row"],[1,"col-6","mb-3"],[1,"mb-1"],["formControlName","listingPlatform","bindLabel","label","bindValue","value","placeholder","Platform Options",3,"multiple","items","clearable"],[1,"text-danger"],["bindLabel","name","bindValue","id",3,"multiple","formControlName","items","placeholder"],["bindLabel","name","bindValue","id",3,"formControlName","items","placeholder"],["type","text",1,"form-control",3,"formControlName","placeholder"]],template:function(i,n){if(i&1&&(f(0,ye,10,5,"form",0),y(1,"async")),i&2){let o;h((o=v(1,1,n.attributes$))?0:-1,o)}},dependencies:[L,w,U,W,j,V,z,H,Y,X,S],encapsulation:2,changeDetection:0})}}return e})();var yt=(()=>{class e{constructor(){this.formBuilder=d(J),this.lazadaUploadProductService=d(st)}getAttributes(t,i){return this.lazadaUploadProductService.getAttributes(t,i)}createFormGroup(t){let i=this.formBuilder.group({}),n=[];return t.forEach(o=>{n=[],o.is_mandatory==1&&n.push(Q.required),i.addControl(String(o.id),this.formBuilder.control(null,n))}),i}getFilteredAttributes(t,i){let n=JSON.parse(JSON.stringify(t)),o=Object.keys(i),r=n.filter(g=>o.findIndex(nt=>Number(nt)==g.id)!=-1);return r=this.filterSelectedAttributes(r,i),r}filterSelectedAttributes(t,i){return t.map(o=>{if(o.options&&o.options.length>0){let r=o.options.filter(g=>Array.isArray(i[String(o.id)])?i[String(o.id)]?.includes(g.id):g.id==i[String(o.id)]);o.options=r}else i[String(o.id)]&&(o.options=[{id:null,name:i[String(o.id)]}]);return o}).filter(o=>o?.options?.length>0)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();function ve(e,c){e&1&&(s(0,"span",4),u(1,"*"),l())}function xe(e,c){if(e&1&&_(0,"ng-select",5),e&2){let t=a().$implicit;p("formControlName",t.id)("items",t.options)("placeholder","Pilih "+(t.label||t.name))}}function Te(e,c){if(e&1&&_(0,"input",6),e&2){let t=a().$implicit;p("formControlName",t.id)("placeholder",t.label||t.name)}}function Se(e,c){if(e&1&&(s(0,"small",4),u(1),l()),e&2){let t=a().$implicit;m(),q(" ",t.label||t.name," is mandatory ")}}function Ie(e,c){if(e&1&&(s(0,"div",2)(1,"div",3),f(2,ve,2,0,"span",4),s(3,"span"),u(4),l()(),f(5,xe,1,3,"ng-select",5)(6,Te,1,2,"input",6),f(7,Se,2,1,"small",4),l()),e&2){let t=c.$implicit,i=a(2);m(2),h(t.is_mandatory==1?2:-1),m(2),et(t.label||t.name),m(),h((t.options==null?null:t.options.length)>0?5:6),m(2),h(t.is_mandatory==1&&i.form.controls[t.id].invalid?7:-1)}}function Fe(e,c){if(e&1&&(s(0,"form",0)(1,"div",1),D(2,Ie,8,4,"div",2,O),l()()),e&2){let t=a();p("formGroup",t.form),m(2),M(c)}}var qt=(()=>{class e{constructor(){this.lazadaAttributeFormService=d(yt),this.channelId=b(void 0),this.categoryId=b(void 0),this.attributesChanges=F()}ngOnChanges(){let t=this.categoryId(),i=this.channelId();C.IsNotEmpty(t)&&C.IsNotEmpty(i)&&(this.attributes$=this.lazadaAttributeFormService.getAttributes(i,t).pipe(A(n=>{this.form=this.lazadaAttributeFormService.createFormGroup(n),this.listenToFormChange(n)}),B(1)))}listenToFormChange(t){this.form.valueChanges.subscribe(i=>{let n=this.lazadaAttributeFormService.getFilteredAttributes(t,i);this.attributesChanges.emit(n)})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=x({type:e,selectors:[["lazada-attribute-form"]],inputs:{channelId:[1,"channelId"],categoryId:[1,"categoryId"]},outputs:{attributesChanges:"attributesChanges"},features:[T([yt]),k],decls:2,vars:3,consts:[[3,"formGroup"],[1,"row"],[1,"col-6","mb-3"],[1,"mb-1"],[1,"text-danger"],["bindLabel","name","bindValue","id",3,"formControlName","items","placeholder"],["type","text",1,"form-control",3,"formControlName","placeholder"]],template:function(i,n){if(i&1&&(f(0,Fe,4,1,"form",0),y(1,"async")),i&2){let o;h((o=v(1,1,n.attributes$))?0:-1,o)}},dependencies:[L,w,U,W,j,V,z,H,Y,X,S],encapsulation:2,changeDetection:0})}}return e})();var vt=(()=>{class e{constructor(){this.woocommerceUploadService=d(mt)}getAttributes(t,i){return this.woocommerceUploadService.getAttributes(t,i).pipe(R(n=>n.map(o=>({key:o.name,label:o.name}))))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var Qt=(()=>{class e{constructor(){this.wooAttributeFormService=d(vt),this.channelId=b(),this.categoryId=b(),this.attributesChanges=F()}ngOnChanges(){C.IsNotEmpty(this.categoryId())&&C.IsNotEmpty(this.channelId())&&(this.attributes$=this.wooAttributeFormService.getAttributes(this.channelId(),this.categoryId()))}onSelectAttribute(t){this.attributesChanges.emit([t.key])}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=x({type:e,selectors:[["wooocommerce-attribute-form"]],inputs:{channelId:[1,"channelId"],categoryId:[1,"categoryId"]},outputs:{attributesChanges:"attributesChanges"},features:[T([vt]),k],decls:6,vars:3,consts:[[1,"row"],[1,"col-6"],[1,"mb-1"],["bindLabel","label","bindValue","id","placeholder","Pilih Atribut",3,"change","items"]],template:function(i,n){i&1&&(s(0,"div",0)(1,"div",1)(2,"div",2),u(3,"Atribut"),l(),s(4,"ng-select",3),y(5,"async"),I("change",function(r){return n.onSelectAttribute(r)}),l()()()),i&2&&(m(4),p("items",v(5,1,n.attributes$)))},dependencies:[X,L,w,U,S],encapsulation:2,changeDetection:0})}}return e})();var xt=(()=>{class e{constructor(){this.httpService=d(rt),this.formBuilder=d(J)}getAttributes(t){return this.httpService.get("api/product/ShopifyV2/GetAttributes",[{key:"ID",value:t}]).pipe(A(n=>(n.Options.StatusOptions=n.Options.Status.map(o=>({id:o,name:o})),n)))}createFormGroup(t){let i=this.formBuilder.group({});return Object.keys(t.Attribute).forEach(o=>{i.addControl(o,this.formBuilder.control(null))}),i}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();function Ae(e,c){if(e&1&&(s(0,"form",0)(1,"div",1)(2,"div",2)(3,"div",3),u(4," Brand "),l(),_(5,"input",4),l(),s(6,"div",5)(7,"div",3),u(8," Product Type "),l(),_(9,"input",6),l(),s(10,"div",5)(11,"div",3),u(12," Status "),l(),_(13,"ng-select",7),l()()()),e&2){let t=a();p("formGroup",t.form),m(13),p("items",c.Options.StatusOptions)}}var Zt=(()=>{class e{constructor(){this.channelId=b(void 0),this.attributesChanges=F(),this.shopifyFormService=d(xt)}ngOnChanges(t){t.channelId&&(this.attributes$=this.shopifyFormService.getAttributes(this.channelId()).pipe(A(i=>{this.form=this.shopifyFormService.createFormGroup(i),this.listenToFormChange()})))}listenToFormChange(){this.formSubscription=this.form.valueChanges.pipe(It(500)).subscribe(t=>{this.attributesChanges.emit([t])})}ngOnDestroy(){this.formSubscription.unsubscribe()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=x({type:e,selectors:[["shopify-attribute-form"]],inputs:{channelId:[1,"channelId"]},outputs:{attributesChanges:"attributesChanges"},features:[T([xt]),k],decls:2,vars:3,consts:[[3,"formGroup"],[1,"row"],[1,"col-6","mb-3"],[1,"mb-1"],["formControlName","Brand","type","text","placeholder","brand",1,"form-control"],[1,"col-6"],["formControlName","ProductType","type","text","placeholder","Product Type",1,"form-control"],["formControlName","Status","bindLabel","name","bindValue","id","placeholder","Status",3,"items"]],template:function(i,n){if(i&1&&(f(0,Ae,14,2,"form",0),y(1,"async")),i&2){let o;h((o=v(1,1,n.attributes$))?0:-1,o)}},dependencies:[U,W,j,V,z,H,Y,L,w,S],encapsulation:2,changeDetection:0})}}return e})();function Pe(e,c){if(e&1&&(s(0,"div",6),_(1,"app-product-card",9),l()),e&2){let t=c.$implicit;m(),p("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)("imageForZoom",t==null?null:t.ImageUrl)("code",t==null||t.Variants[0]==null?null:t.Variants[0].Code)("showFooter",!1)}}function Ne(e,c){if(e&1){let t=G();s(0,"mat-checkbox",21),Nt("ngModelChange",function(n){N(t);let o=a().$implicit;return Pt(o.selected,n)||(o.selected=n),E(n)}),I("ngModelChange",function(){let n=N(t),o=a(),r=o.$implicit,g=o.$index,tt=a();return E(tt.onSelectChannel(r,g,n))}),l()}if(e&2){let t=a().$implicit;At("ngModel",t.selected)}}function Ee(e,c){if(e&1&&(s(0,"div",18),_(1,"input",22),l()),e&2){let t=a().$implicit,i=a();p("matTooltip",t.type==i.channelType.Shopify||t.type==i.channelType.ShopifyV2?"Cannot change category, please change category in admin.shopify.com":t.type==i.channelType.Plugo?"You can change the category after the product has been uploaded to the Plugo Dashboard.":"")}}function ke(e,c){if(e&1){let t=G();s(0,"app-channel-category-select",23),I("selectedCategory",function(n){N(t);let o=a().$index,r=a();return E(r.onCategoryChange(o,n))}),l()}if(e&2){let t=a().$implicit;p("disabled",!t.selected)("channelId",t.id)("channelType",t.type)("categoryId",t.categoryId)}}function Oe(e,c){if(e&1){let t=G();s(0,"shopee-attribute-form",27),I("attributesChanges",function(n){N(t);let o=a(2).$index,r=a();return E(r.onAttributesChange(o,n))}),l()}if(e&2){let t=a(2).$implicit;p("categoryId",t.categoryId)("channelId",t.id)("channelType",t.type)}}function De(e,c){if(e&1){let t=G();s(0,"tiktok-attribute-form",28),I("attributesChanges",function(n){N(t);let o=a(2).$index,r=a();return E(r.onAttributesChange(o,n))})("onPlatformChanges",function(n){N(t);let o=a(2).$index,r=a();return E(r.onPlatformChange(o,n))}),l()}if(e&2){let t=a(2).$implicit;p("categoryId",t.categoryId)("channelId",t.id)}}function Me(e,c){if(e&1){let t=G();s(0,"wooocommerce-attribute-form",29),I("attributesChanges",function(n){N(t);let o=a(2).$index,r=a();return E(r.onAttributesChange(o,n))}),l()}if(e&2){let t=a(2).$implicit;p("categoryId",t.categoryId)("channelId",t.id)}}function Ve(e,c){if(e&1){let t=G();s(0,"lazada-attribute-form",29),I("attributesChanges",function(n){N(t);let o=a(2).$index,r=a();return E(r.onAttributesChange(o,n))}),l()}if(e&2){let t=a(2).$implicit;p("categoryId",t.categoryId)("channelId",t.id)}}function Ue(e,c){if(e&1&&(s(0,"div",20)(1,"div",24),f(2,Oe,1,3,"shopee-attribute-form",25)(3,De,1,2,"tiktok-attribute-form",26)(4,Me,1,2,"wooocommerce-attribute-form",26)(5,Ve,1,2,"lazada-attribute-form",26),l()()),e&2){let t,i=a().$implicit,n=a();m(2),h((t=i.type)===n.channelType.Shopee?2:t===n.channelType.Tiktok?3:t===n.channelType.WooCommerce?4:t===n.channelType.Lazada?5:-1)}}function we(e,c){if(e&1){let t=G();s(0,"div",20)(1,"div",24)(2,"shopify-attribute-form",30),I("attributesChanges",function(n){N(t);let o=a().$index,r=a();return E(r.onAttributesChange(o,n))}),l()()()}if(e&2){let t=a().$implicit;m(2),p("channelId",t.id)}}function Le(e,c){if(e&1&&(s(0,"div",8)(1,"div",10)(2,"div",11)(3,"div",12)(4,"div",13)(5,"div"),f(6,Ne,1,1,"mat-checkbox",14),y(7,"async"),l(),s(8,"div"),_(9,"app-channel-logo",15),l(),s(10,"div",16)(11,"span"),u(12),l()()()(),s(13,"div",12)(14,"div",17),f(15,Ee,2,1,"div",18)(16,ke,1,4,"app-channel-category-select",19),l()()(),f(17,Ue,6,1,"div",20)(18,we,3,1,"div",20),l()()),e&2){let t,i=c.$implicit,n=a();m(6),h((t=v(7,8,n.defaultCategories$))?6:-1,t),m(3),p("typeId",i.type)("showChannelName",!1),m(),p("matTooltip",i.name)("matTooltipShowDelay",2500),m(2),et(i.name),m(3),h(i.type==n.channelType.Shopify||i.type==n.channelType.Plugo||i.type==n.channelType.ShopifyV2?15:16),m(2),h(i.categoryId&&i.selected?17:(n.channelType.Shopify==i.type||i.type==n.channelType.ShopifyV2)&&i.selected?18:-1)}}var mn=(()=>{class e{constructor(){this.toastr=d(Et),this.uploadProductService=d(pt),this.selectedProducts$=this.uploadProductService.selectedProduct$,this.channelProductUploads=this.uploadProductService.channelProductUpload,this.channelType=ft,this.defaultCategories$=this.uploadProductService.getDefaultCategory().pipe(B(1))}onCategoryChange(t,i){this.channelProductUploads.update(n=>n.map((o,r)=>(r==t&&(o.categoryId=i,o.attributes=[]),o)))}onPlatformChange(t,i){this.channelProductUploads.update(n=>n.map((o,r)=>(r==t&&(o.listing_platforms=i),o)))}onAttributesChange(t,i){this.channelProductUploads.update(n=>n.map((o,r)=>(r==t&&(o.attributes=i),o)))}tiktokPlatformChanges(t,i){this.channelProductUploads.update(n=>n.map((o,r)=>(r==t&&(o.listing_platforms=i),o)))}onSelectChannel(t,i,n){this.channelProductUploads.update(o=>o.map((r,g)=>{if(g==i&&t.selected){let tt=this.findCategoryByChannelId(t.id,n);r.categoryId=tt?.DefaultCategoryID}return g==i&&!t.selected&&(r.categoryId=null),r}))}findCategoryByChannelId(t,i){return i.find(n=>n.ID===t)}onRemoveCategory(t){this.channelProductUploads.update(i=>i.map((n,o)=>(o==t&&(n.categoryId=null,n.attributes=[]),n)))}onUploadProduct(){if(this.checkTiktokPlatform()==!1){this.toastr.error("Please select at least one platform for TikTok channel","Platform is Required");return}this.uploadProductService.onUploadProduct(this.channelProductUploads())}checkTiktokPlatform(){return this.channelProductUploads().every(i=>i.type==ft.Tiktok&&C.IsNotEmpty(i?.categoryId)?i.listing_platforms.length>0:!0)}ngOnDestroy(){this.uploadProductService.clearSelectedProduct()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=x({type:e,selectors:[["app-product-upload"]],features:[T([ct,Rt,st,mt])],decls:17,vars:5,consts:[["headerTitle","Upload Product To Channel",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click","disabled"],["aria-hidden","true",1,"fa","fa-upload"],[1,"container-fluid","mt-6"],[1,"ps-3","mt-8","pb-5","fw-medium"],[1,"row","mb-10","ps-3"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[1,"ps-3","mb-8","border-bottom","pb-5","fw-medium"],[1,"row","mb-6"],[3,"productId","title","image","description","imageForZoom","code","showFooter"],[1,"col-12"],[1,"row"],[1,"col-3"],[1,"d-flex","align-items-center"],["color","primary",1,"example-margin",3,"ngModel"],[3,"typeId","showChannelName"],[2,"overflow","hidden","text-overflow","ellipsis","white-space","nowrap",3,"matTooltip","matTooltipShowDelay"],[1,"w-100"],["matTooltipPosition","above",3,"matTooltip"],[3,"disabled","channelId","channelType","categoryId"],[1,"row","my-3"],["color","primary",1,"example-margin",3,"ngModelChange","ngModel"],["disabled","","type","text","placeholder","Category Unavailable",1,"form-control","rounded-1",2,"height","35px"],[3,"selectedCategory","disabled","channelId","channelType","categoryId"],[1,"col-12","ps-11"],[3,"categoryId","channelId","channelType"],[3,"categoryId","channelId"],[3,"attributesChanges","categoryId","channelId","channelType"],[3,"attributesChanges","onPlatformChanges","categoryId","channelId"],[3,"attributesChanges","categoryId","channelId"],[3,"attributesChanges","channelId"]],template:function(i,n){if(i&1&&(s(0,"mainpanel",0)(1,"actions")(2,"button",1),I("click",function(){return n.onUploadProduct()}),_(3,"i",2),u(4," Upload "),l()(),s(5,"content")(6,"div",3)(7,"h3",4),u(8,"Product To Upload"),l(),s(9,"div",5),D(10,Pe,2,7,"div",6,O),y(12,"async"),l(),s(13,"h3",7),u(14,"Channel To Upload"),l(),D(15,Le,19,10,"div",8,O),l()()()),i&2){let o;p("hideSearchBox",!0)("hideSearchDropdown",!0),m(2),p("disabled",((o=n.channelProductUploads())==null?null:o.length)==0),m(8),M(v(12,3,n.selectedProducts$)),m(5),M(n.channelProductUploads())}},dependencies:[Wt,Lt,zt,jt,Gt,X,V,kt,wt,Ut,Kt,Qt,Zt,Bt,Jt,Xt,qt,S],encapsulation:2,changeDetection:0})}}return e})();export{mn as ProductUploadComponent};
@@ -1 +1 @@
1
- import{b as w}from"./chunk-636FAHVP.js";import"./chunk-7BDGR7WQ.js";import"./chunk-TFTF5VH3.js";import"./chunk-CBPURQKN.js";import{b as N}from"./chunk-KFJBIBDQ.js";import"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import{f as M}from"./chunk-OHSE4HCU.js";import"./chunk-XDMGP3CQ.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import"./chunk-63X2BBS4.js";import"./chunk-MDHMVGYC.js";import"./chunk-NNVT5X6O.js";import"./chunk-7HUEGPJN.js";import{e as C}from"./chunk-ZE4OOGMT.js";import{b as T}from"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import{B as b,C as y}from"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{Aa as x,Ic as r,Jc as l,Xb as f,Zb as E,ca as h,cc as s,dc as i,ec as n,ed as c,fc as D,fd as u,gb as o,gd as g,ha as p,md as I,r as m,yb as S}from"./chunk-5VYDZBNH.js";import"./chunk-QWWW7GFA.js";var O=(()=>{class a{constructor(){this.httpService=p(C)}getExceptionDetail(e){return this.httpService.post("/api/Orders/GetDetailException",{ID:e}).pipe(m(d=>d?.hits[0]?._source))}static{this.\u0275fac=function(t){return new(t||a)}}static{this.\u0275prov=h({token:a,factory:a.\u0275fac,providedIn:"root"})}}return a})();function k(a,j){if(a&1&&(i(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"h5"),r(6,"General"),n()(),i(7,"div",6)(8,"div",7)(9,"div",8)(10,"div",9)(11,"label"),r(12,"Date"),n(),i(13,"div")(14,"span"),r(15),c(16,"date"),n()()()(),i(17,"div",8)(18,"div",9)(19,"label"),r(20,"Number"),n(),i(21,"div")(22,"span"),r(23),n()()()(),i(24,"div",8)(25,"div",9)(26,"label"),r(27,"Channel Name"),n(),i(28,"div")(29,"span"),r(30),n()()()(),i(31,"div",8)(32,"div",9)(33,"label"),r(34,"ShopID"),n(),i(35,"div")(36,"span"),r(37),n()()()(),i(38,"div",8)(39,"div",9)(40,"label"),r(41,"Channel ID"),n(),i(42,"div")(43,"span"),r(44),n()()()()()()()()(),i(45,"div",10)(46,"div",8)(47,"div",4)(48,"div",5)(49,"h5"),r(50,"Request"),n()(),i(51,"div",6)(52,"pre"),r(53),c(54,"json"),n()()()(),i(55,"div",8)(56,"div",11)(57,"div",5)(58,"h5"),r(59,"Stack Trace"),n()(),i(60,"div",6),D(61,"pre",12),n()(),i(62,"div",13)(63,"div",5)(64,"h5"),r(65,"Exception Message"),n()(),i(66,"div",6)(67,"pre"),r(68),c(69,"json"),n()()()()()()),a&2){let e=j;o(15),l(g(16,8,e["@timestamp"],"dd MMM yyyy HH:mm:ss")),o(8),l(e==null||e.error==null?null:e.error.number),o(7),l(e==null?null:e.channelName),o(7),l(e==null?null:e.shopId),o(7),l(e==null?null:e.message),o(9),l(u(54,11,e==null||e.error==null?null:e.error.request)),o(8),s("textContent",e==null||e.error==null?null:e.error.stackTrace),o(7),l(u(69,13,e==null||e.error==null?null:e.error.response))}}var W=(()=>{class a{constructor(){this.activatedRoute=p(T),this.exceptionService=p(O),this.authService=p(M),this.channelOptions=x(this.authService.getChannels()),this.exceptionDetail=N(this.exceptionService.getExceptionDetail(this.activatedRoute.snapshot.queryParams?.ID).pipe(m(e=>{let t=e;return{"@timestamp":t["@timestamp"]||t["@timestamp_received"],error:{number:t?.error?.number,stackTrace:t?.error?.stackTrace,request:this.parseJsonSafe(t?.error?.request),response:this.parseJsonSafe(t?.error?.response)},channelName:t?.channelId!=null?this.channelOptions().find(d=>d.ID===t?.channelId)?.Name:t?.shopId,shopId:t?.shopId,message:t?.message}})),{initialValue:null}),this.headerTitle=I(()=>{let e=this.exceptionDetail();return e?.error?.number?"Order #"+e.error.number:"Order"})}parseJsonSafe(e){if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e}static{this.\u0275fac=function(t){return new(t||a)}}static{this.\u0275cmp=S({type:a,selectors:[["app-exception-detail"]],decls:3,vars:4,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-7"],[1,"col-sm-6"],[1,"info-label-group"],[1,"row","mt-2"],[1,"card","mb-2"],[3,"textContent"],[1,"card","mt-7"]],template:function(t,d){if(t&1&&(i(0,"mainpanel",0)(1,"content"),f(2,k,70,15,"div",1),n()()),t&2){let v;s("headerTitle",d.headerTitle())("hideSearchBox",!0)("hideSearchDropdown",!0),o(2),E((v=d.exceptionDetail())?2:-1,v)}},dependencies:[w,y,b],encapsulation:2,changeDetection:0})}}return a})();export{W as ExceptionDetailComponent};
1
+ import{b as w}from"./chunk-636FAHVP.js";import"./chunk-7BDGR7WQ.js";import"./chunk-TFTF5VH3.js";import"./chunk-CBPURQKN.js";import{b as N}from"./chunk-KFJBIBDQ.js";import"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import{f as M}from"./chunk-MEGJOWGP.js";import"./chunk-U66BXHEQ.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import"./chunk-63X2BBS4.js";import"./chunk-MDHMVGYC.js";import"./chunk-NNVT5X6O.js";import"./chunk-7HUEGPJN.js";import{e as C}from"./chunk-ZE4OOGMT.js";import{b as T}from"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import{B as b,C as y}from"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{Aa as x,Ic as r,Jc as l,Xb as f,Zb as E,ca as h,cc as s,dc as i,ec as n,ed as c,fc as D,fd as u,gb as o,gd as g,ha as p,md as I,r as m,yb as S}from"./chunk-5VYDZBNH.js";import"./chunk-QWWW7GFA.js";var O=(()=>{class a{constructor(){this.httpService=p(C)}getExceptionDetail(e){return this.httpService.post("/api/Orders/GetDetailException",{ID:e}).pipe(m(d=>d?.hits[0]?._source))}static{this.\u0275fac=function(t){return new(t||a)}}static{this.\u0275prov=h({token:a,factory:a.\u0275fac,providedIn:"root"})}}return a})();function k(a,j){if(a&1&&(i(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"h5"),r(6,"General"),n()(),i(7,"div",6)(8,"div",7)(9,"div",8)(10,"div",9)(11,"label"),r(12,"Date"),n(),i(13,"div")(14,"span"),r(15),c(16,"date"),n()()()(),i(17,"div",8)(18,"div",9)(19,"label"),r(20,"Number"),n(),i(21,"div")(22,"span"),r(23),n()()()(),i(24,"div",8)(25,"div",9)(26,"label"),r(27,"Channel Name"),n(),i(28,"div")(29,"span"),r(30),n()()()(),i(31,"div",8)(32,"div",9)(33,"label"),r(34,"ShopID"),n(),i(35,"div")(36,"span"),r(37),n()()()(),i(38,"div",8)(39,"div",9)(40,"label"),r(41,"Channel ID"),n(),i(42,"div")(43,"span"),r(44),n()()()()()()()()(),i(45,"div",10)(46,"div",8)(47,"div",4)(48,"div",5)(49,"h5"),r(50,"Request"),n()(),i(51,"div",6)(52,"pre"),r(53),c(54,"json"),n()()()(),i(55,"div",8)(56,"div",11)(57,"div",5)(58,"h5"),r(59,"Stack Trace"),n()(),i(60,"div",6),D(61,"pre",12),n()(),i(62,"div",13)(63,"div",5)(64,"h5"),r(65,"Exception Message"),n()(),i(66,"div",6)(67,"pre"),r(68),c(69,"json"),n()()()()()()),a&2){let e=j;o(15),l(g(16,8,e["@timestamp"],"dd MMM yyyy HH:mm:ss")),o(8),l(e==null||e.error==null?null:e.error.number),o(7),l(e==null?null:e.channelName),o(7),l(e==null?null:e.shopId),o(7),l(e==null?null:e.message),o(9),l(u(54,11,e==null||e.error==null?null:e.error.request)),o(8),s("textContent",e==null||e.error==null?null:e.error.stackTrace),o(7),l(u(69,13,e==null||e.error==null?null:e.error.response))}}var W=(()=>{class a{constructor(){this.activatedRoute=p(T),this.exceptionService=p(O),this.authService=p(M),this.channelOptions=x(this.authService.getChannels()),this.exceptionDetail=N(this.exceptionService.getExceptionDetail(this.activatedRoute.snapshot.queryParams?.ID).pipe(m(e=>{let t=e;return{"@timestamp":t["@timestamp"]||t["@timestamp_received"],error:{number:t?.error?.number,stackTrace:t?.error?.stackTrace,request:this.parseJsonSafe(t?.error?.request),response:this.parseJsonSafe(t?.error?.response)},channelName:t?.channelId!=null?this.channelOptions().find(d=>d.ID===t?.channelId)?.Name:t?.shopId,shopId:t?.shopId,message:t?.message}})),{initialValue:null}),this.headerTitle=I(()=>{let e=this.exceptionDetail();return e?.error?.number?"Order #"+e.error.number:"Order"})}parseJsonSafe(e){if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e}static{this.\u0275fac=function(t){return new(t||a)}}static{this.\u0275cmp=S({type:a,selectors:[["app-exception-detail"]],decls:3,vars:4,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-7"],[1,"col-sm-6"],[1,"info-label-group"],[1,"row","mt-2"],[1,"card","mb-2"],[3,"textContent"],[1,"card","mt-7"]],template:function(t,d){if(t&1&&(i(0,"mainpanel",0)(1,"content"),f(2,k,70,15,"div",1),n()()),t&2){let v;s("headerTitle",d.headerTitle())("hideSearchBox",!0)("hideSearchDropdown",!0),o(2),E((v=d.exceptionDetail())?2:-1,v)}},dependencies:[w,y,b],encapsulation:2,changeDetection:0})}}return a})();export{W as ExceptionDetailComponent};
@@ -1 +1 @@
1
- import"./chunk-QWWW7GFA.js";var o=[{path:"",loadComponent(){return import("./chunk-5L5EFIUV.js").then(t=>t.OrdersV2Component)},children:[{path:"to-ship",loadComponent(){return import("./chunk-W27XJPMH.js").then(t=>t.ReadyToShipComponent)},title:"To Ship"},{path:"awaiting-collection",loadComponent(){return import("./chunk-TNOFQGQU.js").then(t=>t.AwaitingCollectionComponent)},title:"Awaiting Collection"},{path:"shipped",loadComponent(){return import("./chunk-3EK2HGB5.js").then(t=>t.ShippedComponent)},title:"Shipped"},{path:"completed",loadComponent(){return import("./chunk-GESFA2ZC.js").then(t=>t.CompletedComponent)},title:"Completed"},{path:"all",loadComponent(){return import("./chunk-5R5VSKST.js").then(t=>t.AllComponent)},title:"All Orders"},{path:"cancelled",loadComponent(){return import("./chunk-QZ4E2XRZ.js").then(t=>t.CancelledComponent)},title:"Cancelled"},{path:"download",loadComponent(){return import("./chunk-H6W5ETMM.js").then(t=>t.DownloadV2Component)},title:"Download"},{path:"log",loadComponent(){return import("./chunk-MKVEYBIH.js").then(t=>t.DownloadOrderLogComponent)},title:"Download Log"},{path:"log/detail",loadComponent(){return import("./chunk-XFTWDHBO.js").then(t=>t.DownloadOrderDetailComponent)},title:"Download Log Detail"},{path:"",pathMatch:"full",redirectTo:"to-ship"}]}];export{o as routes};
1
+ import"./chunk-QWWW7GFA.js";var o=[{path:"",loadComponent(){return import("./chunk-5L5EFIUV.js").then(t=>t.OrdersV2Component)},children:[{path:"to-ship",loadComponent(){return import("./chunk-55ZMUV3A.js").then(t=>t.ReadyToShipComponent)},title:"To Ship"},{path:"awaiting-collection",loadComponent(){return import("./chunk-WVCSTOLM.js").then(t=>t.AwaitingCollectionComponent)},title:"Awaiting Collection"},{path:"shipped",loadComponent(){return import("./chunk-QWB337JM.js").then(t=>t.ShippedComponent)},title:"Shipped"},{path:"completed",loadComponent(){return import("./chunk-4AXSVAPT.js").then(t=>t.CompletedComponent)},title:"Completed"},{path:"all",loadComponent(){return import("./chunk-4TXYZL75.js").then(t=>t.AllComponent)},title:"All Orders"},{path:"cancelled",loadComponent(){return import("./chunk-K6RMUUPZ.js").then(t=>t.CancelledComponent)},title:"Cancelled"},{path:"download",loadComponent(){return import("./chunk-USX5ZNMZ.js").then(t=>t.DownloadV2Component)},title:"Download"},{path:"log",loadComponent(){return import("./chunk-HKVEBEUU.js").then(t=>t.DownloadOrderLogComponent)},title:"Download Log"},{path:"log/detail",loadComponent(){return import("./chunk-XFTWDHBO.js").then(t=>t.DownloadOrderDetailComponent)},title:"Download Log Detail"},{path:"",pathMatch:"full",redirectTo:"to-ship"}]}];export{o as routes};
@@ -1 +1 @@
1
- import{a as e}from"./chunk-WU7F62BU.js";import"./chunk-4VNQYYVV.js";import{a as n}from"./chunk-RH62JCAG.js";import{a as u}from"./chunk-7KBF6RRT.js";import"./chunk-TFTF5VH3.js";import"./chunk-CBPURQKN.js";import"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import"./chunk-OHSE4HCU.js";import"./chunk-XDMGP3CQ.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import"./chunk-63X2BBS4.js";import"./chunk-MDHMVGYC.js";import"./chunk-NNVT5X6O.js";import"./chunk-ZE4OOGMT.js";import{c as s}from"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{cc as c,dc as l,ec as p,fc as a,gb as i,yb as r}from"./chunk-5VYDZBNH.js";import"./chunk-QWWW7GFA.js";var d=(()=>{class t{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 History",Url:"/menu/products/status/notificationV2",Description:"Scan results for each channel, including product counts and synchronization status"}]}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=r({type:t,selectors:[["app-status"]],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(o,h){o&1&&(l(0,"nav",0)(1,"div",1)(2,"div"),a(3,"nav-tab",2),p()()(),a(4,"router-outlet")),o&2&&(i(3),c("Tabs",h.productTabs))},dependencies:[u,s],encapsulation:2})}}return t})();var T=[{component:d,path:"",children:[{path:"",redirectTo:"sold-in-channel",pathMatch:"full"},{path:"in-pos",loadComponent(){return import("./chunk-GGXBO54D.js").then(t=>t.InPosComponent)},canActivate:[n,e],data:{title:"Products in POS"}},{path:"sold-in-channel",loadComponent(){return import("./chunk-WHWTIACL.js").then(t=>t.SoldInChannelComponent)},canActivate:[n,e],data:{title:"Products Sold in Channel"}},{path:"not-in-channel",loadComponent(){return import("./chunk-ON6KM3OX.js").then(t=>t.NotInChannelComponent)},canActivate:[n,e],data:{title:"Products not in Channel"}},{path:"not-in-pos",loadComponent(){return import("./chunk-AP4VVI4Q.js").then(t=>t.NotInPosComponent)},canActivate:[n,e],data:{title:"Products not in POS"}},{path:"duplicate-sku",loadComponent(){return import("./chunk-DIITCV4M.js").then(t=>t.DuplicateSkuComponent)},canActivate:[n,e],data:{title:"Duplicate Sku in Channel"}},{path:"duplicate-sku/table",loadComponent(){return import("./chunk-573SRSN2.js").then(t=>t.DuplicateSkuV2Component)},canActivate:[n,e],data:{title:"Duplicate Sku in Channel"}},{path:"channel-statistic",loadComponent(){return import("./chunk-3CACAFL7.js").then(t=>t.ChannelStatisticComponent)},canActivate:[n,e],data:{title:"Channel Statistic"}},{path:"notification",loadComponent(){return import("./chunk-SFFPXVOD.js").then(t=>t.NotificationComponent)},canActivate:[n,e],data:{title:"Notification"}},{path:"notificationV2",loadComponent(){return import("./chunk-KS5RMDHP.js").then(t=>t.NotificationV2Component)},canActivate:[n,e],data:{title:"Notification"}},{path:"notificationV2/detailV2",loadComponent(){return import("./chunk-OTMUN66U.js").then(t=>t.DetailComponent)},canActivate:[n,e],data:{title:"Notification Detail"}},{path:"notification/detail",loadComponent(){return import("./chunk-7IHWCG7V.js").then(t=>t.DetailComponent)},canActivate:[n,e],data:{title:"Notification Detail"}}]}];export{T as routes};
1
+ import{a as e}from"./chunk-WU7F62BU.js";import"./chunk-4VNQYYVV.js";import{a as n}from"./chunk-7L26QFNQ.js";import{a as u}from"./chunk-7KBF6RRT.js";import"./chunk-TFTF5VH3.js";import"./chunk-CBPURQKN.js";import"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import"./chunk-MEGJOWGP.js";import"./chunk-U66BXHEQ.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import"./chunk-63X2BBS4.js";import"./chunk-MDHMVGYC.js";import"./chunk-NNVT5X6O.js";import"./chunk-ZE4OOGMT.js";import{c as s}from"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{cc as c,dc as l,ec as p,fc as a,gb as i,yb as r}from"./chunk-5VYDZBNH.js";import"./chunk-QWWW7GFA.js";var d=(()=>{class t{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 History",Url:"/menu/products/status/notificationV2",Description:"Scan results for each channel, including product counts and synchronization status"}]}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=r({type:t,selectors:[["app-status"]],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(o,h){o&1&&(l(0,"nav",0)(1,"div",1)(2,"div"),a(3,"nav-tab",2),p()()(),a(4,"router-outlet")),o&2&&(i(3),c("Tabs",h.productTabs))},dependencies:[u,s],encapsulation:2})}}return t})();var T=[{component:d,path:"",children:[{path:"",redirectTo:"sold-in-channel",pathMatch:"full"},{path:"in-pos",loadComponent(){return import("./chunk-7METZ65D.js").then(t=>t.InPosComponent)},canActivate:[n,e],data:{title:"Products in POS"}},{path:"sold-in-channel",loadComponent(){return import("./chunk-2CJYUXAM.js").then(t=>t.SoldInChannelComponent)},canActivate:[n,e],data:{title:"Products Sold in Channel"}},{path:"not-in-channel",loadComponent(){return import("./chunk-EKUFS5NF.js").then(t=>t.NotInChannelComponent)},canActivate:[n,e],data:{title:"Products not in Channel"}},{path:"not-in-pos",loadComponent(){return import("./chunk-4DWF57R7.js").then(t=>t.NotInPosComponent)},canActivate:[n,e],data:{title:"Products not in POS"}},{path:"duplicate-sku",loadComponent(){return import("./chunk-RTDW6OMT.js").then(t=>t.DuplicateSkuComponent)},canActivate:[n,e],data:{title:"Duplicate Sku in Channel"}},{path:"duplicate-sku/table",loadComponent(){return import("./chunk-IOKGPTYN.js").then(t=>t.DuplicateSkuV2Component)},canActivate:[n,e],data:{title:"Duplicate Sku in Channel"}},{path:"channel-statistic",loadComponent(){return import("./chunk-QO3JQ74R.js").then(t=>t.ChannelStatisticComponent)},canActivate:[n,e],data:{title:"Channel Statistic"}},{path:"notification",loadComponent(){return import("./chunk-TV357KH7.js").then(t=>t.NotificationComponent)},canActivate:[n,e],data:{title:"Notification"}},{path:"notificationV2",loadComponent(){return import("./chunk-LG6K7KGL.js").then(t=>t.NotificationV2Component)},canActivate:[n,e],data:{title:"Notification"}},{path:"notificationV2/detailV2",loadComponent(){return import("./chunk-OTMUN66U.js").then(t=>t.DetailComponent)},canActivate:[n,e],data:{title:"Notification Detail"}},{path:"notification/detail",loadComponent(){return import("./chunk-LIZRBMVN.js").then(t=>t.DetailComponent)},canActivate:[n,e],data:{title:"Notification Detail"}}]}];export{T as routes};
@@ -1 +1 @@
1
- import{a as le,b as ae,c as me}from"./chunk-DSBGQ5B7.js";import{a as pe}from"./chunk-JLWYF6CA.js";import{a as T}from"./chunk-CLX6T6AB.js";import{a as de}from"./chunk-ZLMUYIKY.js";import{a as re}from"./chunk-PGDBJOSL.js";import{a as oe}from"./chunk-RBEQRGC3.js";import"./chunk-P2ISUSTI.js";import"./chunk-W3ZGCYFJ.js";import"./chunk-IO5P3Z5D.js";import"./chunk-FBOJCUGO.js";import"./chunk-VYXSV6K4.js";import{a as ne}from"./chunk-EYHQ2ZKL.js";import"./chunk-VGVK74K7.js";import"./chunk-EPY6UT4Z.js";import"./chunk-2KBEFXEF.js";import"./chunk-O476ULLD.js";import"./chunk-HBAHB3P5.js";import"./chunk-5BO5IGZG.js";import"./chunk-CP5ER4QN.js";import"./chunk-TZFPNLRF.js";import"./chunk-BGFEVOPZ.js";import"./chunk-HY5QRLIV.js";import"./chunk-AWU3GJLO.js";import"./chunk-KRIYDIQQ.js";import{b as ie}from"./chunk-636FAHVP.js";import"./chunk-7BDGR7WQ.js";import"./chunk-TFTF5VH3.js";import{a as te}from"./chunk-CBPURQKN.js";import"./chunk-7RKWOSCN.js";import"./chunk-3RA4CRAW.js";import"./chunk-W55ZHKHY.js";import"./chunk-P6EVJYEB.js";import"./chunk-DXXROE3I.js";import"./chunk-3X54ZT7P.js";import"./chunk-GDOAWQKS.js";import"./chunk-TIHANIPI.js";import"./chunk-PF3J5XPT.js";import"./chunk-IRNBEBQA.js";import"./chunk-P2HR36CY.js";import"./chunk-NCZ46DU6.js";import"./chunk-OUE6X2ER.js";import"./chunk-JYH45M2L.js";import"./chunk-SOTWA42R.js";import"./chunk-7LEHDN2Q.js";import"./chunk-3OTK6GG2.js";import"./chunk-KFJBIBDQ.js";import{b as ee}from"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import"./chunk-OHSE4HCU.js";import"./chunk-XDMGP3CQ.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import"./chunk-63X2BBS4.js";import"./chunk-MDHMVGYC.js";import"./chunk-NNVT5X6O.js";import{c as Q,h as X,m as Y,o as Z,z as $}from"./chunk-7HUEGPJN.js";import"./chunk-ZE4OOGMT.js";import"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import{B as J,D as K,z as G}from"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{Aa as D,Hc as z,Ic as a,Jc as S,Kc as w,Mc as g,Nc as _,Oc as f,Pc as A,Qc as R,Rc as H,S as N,Vc as j,Xb as y,Xc as U,Zb as b,_b as I,ac as B,bc as k,cc as u,db as F,dc as t,ec as i,ed as x,fc as c,fd as V,gb as l,gd as q,ha as O,mc as E,oa as p,pa as s,rc as M,tc as C,yb as W}from"./chunk-5VYDZBNH.js";import{a as P,b as L}from"./chunk-QWWW7GFA.js";var se=r=>({"td-cell-hover":r});function ce(r,h){if(r&1&&c(0,"variants-dropdown",31),r&2){let e=C().$implicit;u("variants",e==null?null:e.Variants)}}function ue(r,h){if(r&1&&c(0,"variant-with-image",32),r&2){let e=C().$implicit;u("variant",e==null?null:e.Variants[0])}}function Ce(r,h){if(r&1&&(t(0,"span"),a(1),i()),r&2){let e=C().$implicit;l(),w("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function ge(r,h){if(r&1&&(t(0,"tr")(1,"td")(2,"div",24),c(3,"img",25),x(4,"channelImage"),t(5,"div",26)(6,"div"),a(7),i(),t(8,"small",27)(9,"span"),a(10),i()()()()(),t(11,"td")(12,"div",28)(13,"div"),c(14,"order-link",29),i(),t(15,"small"),a(16),x(17,"date"),i(),c(18,"br"),t(19,"small"),c(20,"i",30),a(21),i()()(),t(22,"td"),y(23,ce,1,1,"variants-dropdown",31)(24,ue,1,1,"variant-with-image",32),i(),t(25,"td",33),a(26),x(27,"number"),i(),t(28,"td")(29,"div",28)(30,"div",34)(31,"span"),a(32),i(),y(33,Ce,2,1,"span"),i(),t(34,"small"),a(35),i()()()()),r&2){let e=h.$implicit;l(3),u("src",V(4,14,e==null?null:e.MarketType),F)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),l(4),S(e.Outlet),l(3),S(e.ChannelName),l(4),u("order",e),l(2),w(" ",q(17,16,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),l(5),w(" ",e.Customer," "),l(),z(U(21,se,(e.Variants==null?null:e.Variants.length)>1)),l(),b((e.Variants==null?null:e.Variants.length)>1?23:24),l(3),S(V(27,19,e.Amount)),l(6),S(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),l(),b(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?33:-1),l(2),w(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," ")}}function _e(r,h){if(r&1){let e=E();t(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),a(5,"Outlet"),i(),t(6,"th",20),a(7,"Number"),i(),t(8,"th"),a(9,"Items"),i(),t(10,"th",21),a(11,"Amount"),i(),t(12,"th",22),a(13,"Shipping"),i()()(),t(14,"tbody"),B(15,ge,36,23,"tr",null,I),i()(),t(17,"app-custom-paginator",23),M("next",function(){p(e);let n=C();return s(n.initCompletedOrders())})("previous",function(){p(e);let n=C();return s(n.initCompletedOrders())}),i()()}if(r&2){let e=C(),m=H(0);l(15),k(m),l(2),u("filter",e.filter())("totaldata",m==null?null:m.length)}}function fe(r,h){r&1&&(t(0,"div",16),c(1,"app-empty-state"),i())}var ze=(()=>{class r{constructor(){this.orderService=O(T),this.filter=D({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:e=>{this.initFromDate(e)},error:e=>{console.error("Error fetching default date:",e),this.initFromDate(null)}})}initFromDate(e){this.filter.update(m=>L(P({},m),{From:e})),this.initCompletedOrders()}initCompletedOrders(){this.completedOrders$=this.orderService.getCompletedOrders(this.filter()).pipe(N(1))}static{this.\u0275fac=function(m){return new(m||r)}}static{this.\u0275cmp=W({type:r,selectors:[["app-completed"]],features:[j([T])],decls:34,vars:11,consts:[["headerTitle","Completed","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","200px"],[1,"text-end",2,"width","100px"],[2,"width","80px"],["rowCountApi","/api/orders/completedcount",3,"next","previous","filter","totaldata"],[1,"d-flex","align-items-center","gap-3"],[2,"width","20px","height","20px",3,"src","alt"],[1,"lh-base"],[1,"d-flex","align-items-center","gap-2"],[1,"lh-sm"],[2,"font-size","14px",3,"order"],[1,"fa-solid","fa-user"],[3,"variants"],[3,"variant"],[1,"text-end"],[1,"d-flex","align-items-end","gap-2"]],template:function(m,n){if(m&1){let d=E();A(0),x(1,"async"),t(2,"mainpanel",0),M("onSubmit",function(){return p(d),s(n.initCompletedOrders())}),f("textChange",function(o){return p(d),_(n.filter().Number,o)||(n.filter().Number=o),s(o)}),t(3,"actions")(4,"a",1),c(5,"i",2),t(6,"span"),a(7,"Order Fulfillment Display"),i()()(),t(8,"filters")(9,"div")(10,"label",3),a(11,"Channel"),i(),t(12,"app-channel-options-v2",4),f("ngModelChange",function(o){return p(d),_(n.filter().ListChannelID,o)||(n.filter().ListChannelID=o),s(o)}),i()(),t(13,"div",5)(14,"label",3),a(15,"From/To"),i(),t(16,"div",6)(17,"datepicker",7),f("dateChange",function(o){return p(d),_(n.filter().From,o)||(n.filter().From=o),s(o)}),i()(),t(18,"div")(19,"datepicker",8),f("dateChange",function(o){return p(d),_(n.filter().To,o)||(n.filter().To=o),s(o)}),i()()(),t(20,"div",5)(21,"label",9),a(22,"Page Number"),i(),t(23,"input",10),f("ngModelChange",function(o){return p(d),_(n.filter().PageNumber,o)||(n.filter().PageNumber=o),s(o)}),i()(),t(24,"div",5)(25,"label",9),a(26,"Page Size"),i(),t(27,"input",11),f("ngModelChange",function(o){return p(d),_(n.filter().PageSize,o)||(n.filter().PageSize=o),s(o)}),i()()(),t(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),y(32,_e,18,2,"div",15)(33,fe,2,0,"div",16),i()()()()()}if(m&2){let d=R(V(1,8,n.completedOrders$));l(2),g("text",n.filter().Number),l(10),u("multiple",!0),g("ngModel",n.filter().ListChannelID),l(5),g("date",n.filter().From),l(2),g("date",n.filter().To),l(4),g("ngModel",n.filter().PageNumber),l(4),g("ngModel",n.filter().PageSize),l(5),b((d==null?null:d.length)>0?32:33)}},dependencies:[ie,ne,re,$,Q,Z,X,Y,ae,me,de,te,ee,pe,oe,le,G,J,K],encapsulation:2,changeDetection:0})}}return r})();export{ze as CompletedComponent};
1
+ import{a as le,b as ae,c as me}from"./chunk-DSBGQ5B7.js";import{a as pe}from"./chunk-NS2LQNPH.js";import{a as T}from"./chunk-CLX6T6AB.js";import{a as de}from"./chunk-ZLMUYIKY.js";import{a as re}from"./chunk-PGDBJOSL.js";import{a as oe}from"./chunk-2DOM5CWZ.js";import"./chunk-P2ISUSTI.js";import"./chunk-W3ZGCYFJ.js";import"./chunk-IO5P3Z5D.js";import"./chunk-FBOJCUGO.js";import"./chunk-VYXSV6K4.js";import{a as ne}from"./chunk-EYHQ2ZKL.js";import"./chunk-VGVK74K7.js";import"./chunk-EPY6UT4Z.js";import"./chunk-2KBEFXEF.js";import"./chunk-O476ULLD.js";import"./chunk-HBAHB3P5.js";import"./chunk-5BO5IGZG.js";import"./chunk-CP5ER4QN.js";import"./chunk-TZFPNLRF.js";import"./chunk-BGFEVOPZ.js";import"./chunk-HY5QRLIV.js";import"./chunk-AWU3GJLO.js";import"./chunk-KRIYDIQQ.js";import{b as ie}from"./chunk-636FAHVP.js";import"./chunk-7BDGR7WQ.js";import"./chunk-TFTF5VH3.js";import{a as te}from"./chunk-CBPURQKN.js";import"./chunk-7RKWOSCN.js";import"./chunk-3RA4CRAW.js";import"./chunk-W55ZHKHY.js";import"./chunk-P6EVJYEB.js";import"./chunk-DXXROE3I.js";import"./chunk-3X54ZT7P.js";import"./chunk-GDOAWQKS.js";import"./chunk-TIHANIPI.js";import"./chunk-PF3J5XPT.js";import"./chunk-IRNBEBQA.js";import"./chunk-P2HR36CY.js";import"./chunk-NCZ46DU6.js";import"./chunk-OUE6X2ER.js";import"./chunk-JYH45M2L.js";import"./chunk-SOTWA42R.js";import"./chunk-7LEHDN2Q.js";import"./chunk-3OTK6GG2.js";import"./chunk-KFJBIBDQ.js";import{b as ee}from"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import"./chunk-MEGJOWGP.js";import"./chunk-U66BXHEQ.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import"./chunk-63X2BBS4.js";import"./chunk-MDHMVGYC.js";import"./chunk-NNVT5X6O.js";import{c as Q,h as X,m as Y,o as Z,z as $}from"./chunk-7HUEGPJN.js";import"./chunk-ZE4OOGMT.js";import"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import{B as J,D as K,z as G}from"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{Aa as D,Hc as z,Ic as a,Jc as S,Kc as w,Mc as g,Nc as _,Oc as f,Pc as A,Qc as R,Rc as H,S as N,Vc as j,Xb as y,Xc as U,Zb as b,_b as I,ac as B,bc as k,cc as u,db as F,dc as t,ec as i,ed as x,fc as c,fd as V,gb as l,gd as q,ha as O,mc as E,oa as p,pa as s,rc as M,tc as C,yb as W}from"./chunk-5VYDZBNH.js";import{a as P,b as L}from"./chunk-QWWW7GFA.js";var se=r=>({"td-cell-hover":r});function ce(r,h){if(r&1&&c(0,"variants-dropdown",31),r&2){let e=C().$implicit;u("variants",e==null?null:e.Variants)}}function ue(r,h){if(r&1&&c(0,"variant-with-image",32),r&2){let e=C().$implicit;u("variant",e==null?null:e.Variants[0])}}function Ce(r,h){if(r&1&&(t(0,"span"),a(1),i()),r&2){let e=C().$implicit;l(),w("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function ge(r,h){if(r&1&&(t(0,"tr")(1,"td")(2,"div",24),c(3,"img",25),x(4,"channelImage"),t(5,"div",26)(6,"div"),a(7),i(),t(8,"small",27)(9,"span"),a(10),i()()()()(),t(11,"td")(12,"div",28)(13,"div"),c(14,"order-link",29),i(),t(15,"small"),a(16),x(17,"date"),i(),c(18,"br"),t(19,"small"),c(20,"i",30),a(21),i()()(),t(22,"td"),y(23,ce,1,1,"variants-dropdown",31)(24,ue,1,1,"variant-with-image",32),i(),t(25,"td",33),a(26),x(27,"number"),i(),t(28,"td")(29,"div",28)(30,"div",34)(31,"span"),a(32),i(),y(33,Ce,2,1,"span"),i(),t(34,"small"),a(35),i()()()()),r&2){let e=h.$implicit;l(3),u("src",V(4,14,e==null?null:e.MarketType),F)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),l(4),S(e.Outlet),l(3),S(e.ChannelName),l(4),u("order",e),l(2),w(" ",q(17,16,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),l(5),w(" ",e.Customer," "),l(),z(U(21,se,(e.Variants==null?null:e.Variants.length)>1)),l(),b((e.Variants==null?null:e.Variants.length)>1?23:24),l(3),S(V(27,19,e.Amount)),l(6),S(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),l(),b(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?33:-1),l(2),w(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," ")}}function _e(r,h){if(r&1){let e=E();t(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),a(5,"Outlet"),i(),t(6,"th",20),a(7,"Number"),i(),t(8,"th"),a(9,"Items"),i(),t(10,"th",21),a(11,"Amount"),i(),t(12,"th",22),a(13,"Shipping"),i()()(),t(14,"tbody"),B(15,ge,36,23,"tr",null,I),i()(),t(17,"app-custom-paginator",23),M("next",function(){p(e);let n=C();return s(n.initCompletedOrders())})("previous",function(){p(e);let n=C();return s(n.initCompletedOrders())}),i()()}if(r&2){let e=C(),m=H(0);l(15),k(m),l(2),u("filter",e.filter())("totaldata",m==null?null:m.length)}}function fe(r,h){r&1&&(t(0,"div",16),c(1,"app-empty-state"),i())}var ze=(()=>{class r{constructor(){this.orderService=O(T),this.filter=D({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:e=>{this.initFromDate(e)},error:e=>{console.error("Error fetching default date:",e),this.initFromDate(null)}})}initFromDate(e){this.filter.update(m=>L(P({},m),{From:e})),this.initCompletedOrders()}initCompletedOrders(){this.completedOrders$=this.orderService.getCompletedOrders(this.filter()).pipe(N(1))}static{this.\u0275fac=function(m){return new(m||r)}}static{this.\u0275cmp=W({type:r,selectors:[["app-completed"]],features:[j([T])],decls:34,vars:11,consts:[["headerTitle","Completed","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","200px"],[1,"text-end",2,"width","100px"],[2,"width","80px"],["rowCountApi","/api/orders/completedcount",3,"next","previous","filter","totaldata"],[1,"d-flex","align-items-center","gap-3"],[2,"width","20px","height","20px",3,"src","alt"],[1,"lh-base"],[1,"d-flex","align-items-center","gap-2"],[1,"lh-sm"],[2,"font-size","14px",3,"order"],[1,"fa-solid","fa-user"],[3,"variants"],[3,"variant"],[1,"text-end"],[1,"d-flex","align-items-end","gap-2"]],template:function(m,n){if(m&1){let d=E();A(0),x(1,"async"),t(2,"mainpanel",0),M("onSubmit",function(){return p(d),s(n.initCompletedOrders())}),f("textChange",function(o){return p(d),_(n.filter().Number,o)||(n.filter().Number=o),s(o)}),t(3,"actions")(4,"a",1),c(5,"i",2),t(6,"span"),a(7,"Order Fulfillment Display"),i()()(),t(8,"filters")(9,"div")(10,"label",3),a(11,"Channel"),i(),t(12,"app-channel-options-v2",4),f("ngModelChange",function(o){return p(d),_(n.filter().ListChannelID,o)||(n.filter().ListChannelID=o),s(o)}),i()(),t(13,"div",5)(14,"label",3),a(15,"From/To"),i(),t(16,"div",6)(17,"datepicker",7),f("dateChange",function(o){return p(d),_(n.filter().From,o)||(n.filter().From=o),s(o)}),i()(),t(18,"div")(19,"datepicker",8),f("dateChange",function(o){return p(d),_(n.filter().To,o)||(n.filter().To=o),s(o)}),i()()(),t(20,"div",5)(21,"label",9),a(22,"Page Number"),i(),t(23,"input",10),f("ngModelChange",function(o){return p(d),_(n.filter().PageNumber,o)||(n.filter().PageNumber=o),s(o)}),i()(),t(24,"div",5)(25,"label",9),a(26,"Page Size"),i(),t(27,"input",11),f("ngModelChange",function(o){return p(d),_(n.filter().PageSize,o)||(n.filter().PageSize=o),s(o)}),i()()(),t(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),y(32,_e,18,2,"div",15)(33,fe,2,0,"div",16),i()()()()()}if(m&2){let d=R(V(1,8,n.completedOrders$));l(2),g("text",n.filter().Number),l(10),u("multiple",!0),g("ngModel",n.filter().ListChannelID),l(5),g("date",n.filter().From),l(2),g("date",n.filter().To),l(4),g("ngModel",n.filter().PageNumber),l(4),g("ngModel",n.filter().PageSize),l(5),b((d==null?null:d.length)>0?32:33)}},dependencies:[ie,ne,re,$,Q,Z,X,Y,ae,me,de,te,ee,pe,oe,le,G,J,K],encapsulation:2,changeDetection:0})}}return r})();export{ze as CompletedComponent};