dealpos 25.46.0 → 25.47.0

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 (271) hide show
  1. package/browser/{chunk-ID2BNJTV.js → chunk-23PKMU5D.js} +1 -1
  2. package/browser/{chunk-5A3WAD32.js → chunk-27Y3MQJV.js} +1 -1
  3. package/browser/{chunk-6SLXFBWF.js → chunk-2HOSLZ77.js} +1 -1
  4. package/browser/{chunk-QVN7DETM.js → chunk-2JZS4BMV.js} +1 -1
  5. package/browser/{chunk-GB6NLAAI.js → chunk-2KPICU7I.js} +1 -1
  6. package/browser/{chunk-WMTI6O7I.js → chunk-2LOWEWI4.js} +1 -1
  7. package/browser/{chunk-UFZBFEHP.js → chunk-2LSFBE4Q.js} +1 -1
  8. package/browser/{chunk-3F4KI5PR.js → chunk-2MQDNPCG.js} +1 -1
  9. package/browser/{chunk-JBMBXZHF.js → chunk-2RERZJD4.js} +1 -1
  10. package/browser/chunk-3GPGJFQV.js +1 -0
  11. package/browser/{chunk-XFQZ7QQD.js → chunk-3HS4V7LK.js} +1 -1
  12. package/browser/chunk-3KSZCJ6T.js +1 -0
  13. package/browser/{chunk-GF6UUBXR.js → chunk-3PC6CTVP.js} +1 -1
  14. package/browser/{chunk-QIYEPDZF.js → chunk-3XKRDZSE.js} +1 -1
  15. package/browser/{chunk-52X5HGTB.js → chunk-3YKXHA6Q.js} +1 -1
  16. package/browser/{chunk-BQ7W6HVM.js → chunk-46GHEHUK.js} +1 -1
  17. package/browser/{chunk-LY6VOK2B.js → chunk-474F5EIO.js} +1 -1
  18. package/browser/{chunk-TKOHX2XL.js → chunk-4HCSE44G.js} +1 -1
  19. package/browser/{chunk-SNGOVACV.js → chunk-4HPBSK4V.js} +1 -1
  20. package/browser/chunk-4JAEMXSQ.js +1 -0
  21. package/browser/{chunk-ANWIC3AL.js → chunk-4QM23MMO.js} +1 -1
  22. package/browser/chunk-4ZXLS56M.js +4 -0
  23. package/browser/{chunk-TJXA75FB.js → chunk-534MIVWD.js} +1 -1
  24. package/browser/{chunk-I46YKGKC.js → chunk-5I5IONRY.js} +1 -1
  25. package/browser/{chunk-5SJZZU5V.js → chunk-5IAWFOXD.js} +1 -1
  26. package/browser/{chunk-GFBFG6KV.js → chunk-5L54U63F.js} +1 -1
  27. package/browser/{chunk-6KAJXZU4.js → chunk-5OKSTEWQ.js} +1 -1
  28. package/browser/{chunk-VIIDAPDU.js → chunk-5PUIMWNW.js} +1 -1
  29. package/browser/{chunk-E7CKHP2W.js → chunk-5SFUSWFY.js} +1 -1
  30. package/browser/chunk-5TKXFIDJ.js +1 -0
  31. package/browser/{chunk-MBWD4S2P.js → chunk-647PQZMJ.js} +1 -1
  32. package/browser/chunk-66MCBKC7.js +1 -0
  33. package/browser/{chunk-EPSJXHC6.js → chunk-6H5P35AP.js} +1 -1
  34. package/browser/chunk-6SC4T77S.js +1 -0
  35. package/browser/{chunk-P5NZWQQQ.js → chunk-6SGN7MNX.js} +1 -1
  36. package/browser/{chunk-PS6E5OMN.js → chunk-6TGKH2KC.js} +1 -1
  37. package/browser/{chunk-U2AHHKPZ.js → chunk-6WEGHV7F.js} +1 -1
  38. package/browser/{chunk-TFNPU76N.js → chunk-76RLGANX.js} +1 -1
  39. package/browser/{chunk-2RA23GAL.js → chunk-7EQG6N5Y.js} +1 -1
  40. package/browser/{chunk-RV3HEIY6.js → chunk-7NOKG3UC.js} +1 -1
  41. package/browser/{chunk-VNNCIA5L.js → chunk-7P3E5NJO.js} +1 -1
  42. package/browser/{chunk-ITL6HDN2.js → chunk-7PN2DG6D.js} +1 -1
  43. package/browser/{chunk-VSS454NR.js → chunk-7TBS7SPQ.js} +1 -1
  44. package/browser/{chunk-HS26VQGJ.js → chunk-A45GTZVV.js} +1 -1
  45. package/browser/{chunk-EHLQZKY6.js → chunk-AAXXZ3RZ.js} +1 -1
  46. package/browser/{chunk-U2WIPEWI.js → chunk-ABO3BJKM.js} +1 -1
  47. package/browser/{chunk-WXF6PTWZ.js → chunk-AFBBEIKR.js} +1 -1
  48. package/browser/chunk-AIM6VG2H.js +1 -0
  49. package/browser/{chunk-VNV7VWNA.js → chunk-APOV2ZYY.js} +1 -1
  50. package/browser/{chunk-LWTHIG4U.js → chunk-AQQHMGYE.js} +1 -1
  51. package/browser/{chunk-3G2IUR3X.js → chunk-BALKIB67.js} +1 -1
  52. package/browser/chunk-BATVMTNZ.js +1 -0
  53. package/browser/{chunk-2T52WAWX.js → chunk-BCD363QF.js} +2 -2
  54. package/browser/{chunk-CRXFERRX.js → chunk-BILYIP7J.js} +1 -1
  55. package/browser/{chunk-47TATTXM.js → chunk-BKBSPC2U.js} +1 -1
  56. package/browser/{chunk-42IETN73.js → chunk-BY57IAJ7.js} +1 -1
  57. package/browser/{chunk-WILA4FS3.js → chunk-BYO7FJ4O.js} +1 -1
  58. package/browser/{chunk-KRTNI2QB.js → chunk-C4WJKF7R.js} +1 -1
  59. package/browser/{chunk-EV4Q6ALX.js → chunk-C5AIOCPM.js} +1 -1
  60. package/browser/{chunk-QDM4BBTH.js → chunk-C5S5BG57.js} +1 -1
  61. package/browser/{chunk-KVJIA6ZU.js → chunk-CAGQRIPG.js} +1 -1
  62. package/browser/{chunk-T4EAHLQ4.js → chunk-CBSYYTXQ.js} +1 -1
  63. package/browser/{chunk-YJJAQOYJ.js → chunk-CS6HBROS.js} +1 -1
  64. package/browser/{chunk-GG2JYIHB.js → chunk-CX7CJIXK.js} +3 -3
  65. package/browser/chunk-D6Y2NJT7.js +1 -0
  66. package/browser/{chunk-O44PCSTB.js → chunk-DC426G2P.js} +1 -1
  67. package/browser/{chunk-FAUBVY2Z.js → chunk-DGF2U27C.js} +2 -2
  68. package/browser/{chunk-KOF4TIVO.js → chunk-DJTAYVZN.js} +1 -1
  69. package/browser/chunk-DLNZDHGS.js +1 -0
  70. package/browser/{chunk-FVSWTMXM.js → chunk-DM4PGQEH.js} +9 -9
  71. package/browser/{chunk-2P6YEJWK.js → chunk-DSQH2UQV.js} +2 -2
  72. package/browser/{chunk-XGM7LWRY.js → chunk-DWZLJMWC.js} +1 -1
  73. package/browser/{chunk-HENPJSI6.js → chunk-DXBQR3VL.js} +1 -1
  74. package/browser/{chunk-XVOXL7EV.js → chunk-E2DUJTA4.js} +1 -1
  75. package/browser/chunk-E3LGKC33.js +1 -0
  76. package/browser/{chunk-QJIVDQKL.js → chunk-EAFSL5ZF.js} +1 -1
  77. package/browser/{chunk-6PPAAIAS.js → chunk-EKORPCX3.js} +1 -1
  78. package/browser/{chunk-B2ZKTHHK.js → chunk-EX4TE4E5.js} +1 -1
  79. package/browser/{chunk-6KD2XLEU.js → chunk-EZ5EW4QK.js} +1 -1
  80. package/browser/{chunk-ZVQF3NH4.js → chunk-FIMFYHCK.js} +1 -1
  81. package/browser/{chunk-QNQXO4YS.js → chunk-FIUZN6JU.js} +1 -1
  82. package/browser/chunk-FQSAJFS6.js +1 -0
  83. package/browser/{chunk-5WD2XGU7.js → chunk-FR66DARJ.js} +1 -1
  84. package/browser/{chunk-LLD4JAZJ.js → chunk-FY2ZQK3Q.js} +1 -1
  85. package/browser/{chunk-FO57E5BU.js → chunk-G4IW5GPY.js} +1 -1
  86. package/browser/{chunk-FHVQSZV4.js → chunk-G5QWJMKY.js} +1 -1
  87. package/browser/{chunk-54PTN6TM.js → chunk-GDS3XQ5F.js} +1 -1
  88. package/browser/{chunk-MMT7GFHE.js → chunk-GI7KMXBX.js} +1 -1
  89. package/browser/{chunk-HPPVU3Z2.js → chunk-GK4I3EKQ.js} +1 -1
  90. package/browser/{chunk-YGOSFZQM.js → chunk-GNODCFOP.js} +1 -1
  91. package/browser/{chunk-7WAZVWJ7.js → chunk-GODXDKX5.js} +1 -1
  92. package/browser/{chunk-HG5EY2AA.js → chunk-H4DUHWPT.js} +1 -1
  93. package/browser/{chunk-D7PYJVQX.js → chunk-H7XFYY6V.js} +1 -1
  94. package/browser/chunk-HI65LAJQ.js +1 -0
  95. package/browser/{chunk-LHXDS2UV.js → chunk-HL3ONSX6.js} +1 -1
  96. package/browser/{chunk-5O5D7WMM.js → chunk-HLML4BKF.js} +1 -1
  97. package/browser/{chunk-X5OTMPQN.js → chunk-HQ4NLUV6.js} +1 -1
  98. package/browser/{chunk-TRI5DSKF.js → chunk-HTJJDQ3V.js} +1 -1
  99. package/browser/{chunk-XUEGGJ25.js → chunk-HU3YNBXW.js} +15 -15
  100. package/browser/{chunk-PNLYN7MQ.js → chunk-HV4KV3DJ.js} +1 -1
  101. package/browser/chunk-I2P6B3IK.js +1 -0
  102. package/browser/{chunk-WPPCNK6N.js → chunk-I3ABVEQL.js} +1 -1
  103. package/browser/{chunk-RWMRVY4Q.js → chunk-IDQUQBKL.js} +1 -1
  104. package/browser/{chunk-OQW54TBN.js → chunk-IGNVHAO2.js} +1 -1
  105. package/browser/{chunk-XABTH5K3.js → chunk-INHUUGSI.js} +1 -1
  106. package/browser/{chunk-6AY5BHS7.js → chunk-IQDT5K5I.js} +1 -1
  107. package/browser/{chunk-QLGCMRTS.js → chunk-IR2QPNXA.js} +2 -2
  108. package/browser/{chunk-JSKJOCYV.js → chunk-IT6GHGT4.js} +1 -1
  109. package/browser/chunk-IUDUQNN7.js +24 -0
  110. package/browser/{chunk-BOKRBOOE.js → chunk-IWUWV3MS.js} +1 -1
  111. package/browser/{chunk-REYWUYK5.js → chunk-J7YNB6YX.js} +1 -1
  112. package/browser/{chunk-6CM3LOP5.js → chunk-JCTDWAYQ.js} +1 -1
  113. package/browser/{chunk-VCSTNDEY.js → chunk-JEFUIFY4.js} +1 -1
  114. package/browser/{chunk-CDXAKDVU.js → chunk-JEL3OND6.js} +1 -1
  115. package/browser/chunk-JKMJAL6Y.js +3 -0
  116. package/browser/{chunk-NQ3TLVWW.js → chunk-JUS6LLVX.js} +1 -1
  117. package/browser/chunk-JVEVLEGH.js +2 -0
  118. package/browser/{chunk-DNBHVVDZ.js → chunk-JWH2AZ3Z.js} +1 -1
  119. package/browser/{chunk-D4VXNK25.js → chunk-JYZTRN6N.js} +3 -3
  120. package/browser/{chunk-NKSKEAZY.js → chunk-K4LLK7O5.js} +1 -1
  121. package/browser/{chunk-BWBWSNUR.js → chunk-KBISFX5T.js} +1 -1
  122. package/browser/{chunk-FE7XNXYT.js → chunk-KCOMWYKA.js} +1 -1
  123. package/browser/{chunk-RN6J3XFI.js → chunk-KD7WBOUR.js} +1 -1
  124. package/browser/{chunk-W4S7Q6CB.js → chunk-KEAT6AT3.js} +1 -1
  125. package/browser/{chunk-5X6HJLPO.js → chunk-KHR4NBM3.js} +1 -1
  126. package/browser/{chunk-TU6PG43Y.js → chunk-KI4BAWII.js} +1 -1
  127. package/browser/{chunk-PIZCEKMP.js → chunk-KKLNFVVN.js} +1 -1
  128. package/browser/{chunk-Z2VRH2HR.js → chunk-KTPMM54V.js} +1 -1
  129. package/browser/{chunk-BZ2MTKI3.js → chunk-KUYGPZRD.js} +1 -1
  130. package/browser/{chunk-KPNDJV2U.js → chunk-KYAKLZR7.js} +1 -1
  131. package/browser/{chunk-S5MGRIMQ.js → chunk-L32BGRA6.js} +1 -1
  132. package/browser/{chunk-XU5W6MOV.js → chunk-L76WVZW6.js} +1 -1
  133. package/browser/{chunk-2PFGIE43.js → chunk-LAZZHDUO.js} +1 -1
  134. package/browser/{chunk-CSSCB5H5.js → chunk-LBQRCFLJ.js} +1 -1
  135. package/browser/{chunk-GQGYP4YJ.js → chunk-LEGL2HWF.js} +1 -1
  136. package/browser/{chunk-JQFQEYSX.js → chunk-LLEPB2B6.js} +1 -1
  137. package/browser/chunk-LWA7CCEY.js +16 -0
  138. package/browser/{chunk-DBEYMOMT.js → chunk-M43HNBJQ.js} +1 -1
  139. package/browser/chunk-M5KE2CW7.js +1 -0
  140. package/browser/{chunk-XSPT7GLC.js → chunk-MA6NB2EZ.js} +1 -1
  141. package/browser/chunk-ME5KGPYC.js +1 -0
  142. package/browser/{chunk-SN3QC2AI.js → chunk-MEG3XVPI.js} +1 -1
  143. package/browser/chunk-MHVF2KXK.js +1 -0
  144. package/browser/{chunk-H6DX2XWJ.js → chunk-MJ2YN4R7.js} +1 -1
  145. package/browser/chunk-MMP7HKXF.js +1 -0
  146. package/browser/{chunk-GNTFQRQT.js → chunk-MPAFCKH7.js} +1 -1
  147. package/browser/{chunk-6JM2R43J.js → chunk-MPE7Q4VX.js} +1 -1
  148. package/browser/{chunk-LFJYPPPQ.js → chunk-MSW23AJV.js} +1 -1
  149. package/browser/{chunk-3ZFDZRWQ.js → chunk-NN2EFVJK.js} +1 -1
  150. package/browser/{chunk-CKUZYWD3.js → chunk-NRF37QSD.js} +1 -1
  151. package/browser/{chunk-OWKXU5ZC.js → chunk-NWSIPELM.js} +1 -1
  152. package/browser/{chunk-GFNPL4DE.js → chunk-NX6ACGTN.js} +1 -1
  153. package/browser/{chunk-CH2CJQUF.js → chunk-NZYZO47Z.js} +1 -1
  154. package/browser/chunk-O5IZN23R.js +14 -0
  155. package/browser/{chunk-7YBH2SXZ.js → chunk-O5SLP4JK.js} +1 -1
  156. package/browser/{chunk-LOHDNRJM.js → chunk-OFTORAX4.js} +1 -1
  157. package/browser/chunk-ON47ICI3.js +1 -0
  158. package/browser/{chunk-JCTDORER.js → chunk-ORQ3JDJE.js} +1 -1
  159. package/browser/{chunk-V2IOC2AJ.js → chunk-P53EATPC.js} +1 -1
  160. package/browser/{chunk-XEAD3GDE.js → chunk-P632SS2L.js} +1 -1
  161. package/browser/{chunk-5KVP2F7F.js → chunk-P6NP3EAO.js} +1 -1
  162. package/browser/{chunk-UV57OGWO.js → chunk-P7UMAIIW.js} +1 -1
  163. package/browser/{chunk-PMYMVWKR.js → chunk-PECGNYTX.js} +1 -1
  164. package/browser/{chunk-4BMVHD44.js → chunk-PLWCVGTF.js} +1 -1
  165. package/browser/{chunk-5V62CV7A.js → chunk-POJQGU7L.js} +1 -1
  166. package/browser/{chunk-XCII6WYI.js → chunk-Q2A4MYK3.js} +1 -1
  167. package/browser/{chunk-GA5UNKLN.js → chunk-Q473GHR5.js} +1 -1
  168. package/browser/{chunk-AM63STD6.js → chunk-QDE5Y76C.js} +1 -1
  169. package/browser/{chunk-YV457DYY.js → chunk-QEOGHVXA.js} +1 -1
  170. package/browser/{chunk-IYQKU2EL.js → chunk-QFON23YX.js} +1 -1
  171. package/browser/{chunk-DSGMEORC.js → chunk-QIFQFG3V.js} +1 -1
  172. package/browser/{chunk-TTUXWXNN.js → chunk-QIJEAKQK.js} +1 -1
  173. package/browser/{chunk-LKDUSJDE.js → chunk-QQ4DCXLE.js} +1 -1
  174. package/browser/{chunk-FV4VN5TM.js → chunk-QRTOTG7S.js} +1 -1
  175. package/browser/{chunk-ZJFXRNBM.js → chunk-QVJJGWXC.js} +16 -16
  176. package/browser/{chunk-TO24XJZI.js → chunk-QZMZBCE7.js} +1 -1
  177. package/browser/{chunk-4WDKKRLY.js → chunk-R4OHTTCT.js} +1 -1
  178. package/browser/{chunk-L245BNIA.js → chunk-RF5WGONA.js} +1 -1
  179. package/browser/{chunk-FJDNER3H.js → chunk-RLQLFW36.js} +1 -1
  180. package/browser/{chunk-EEJEVJEF.js → chunk-RNLSEEMX.js} +1 -1
  181. package/browser/{chunk-VPNGMBCE.js → chunk-RNXOIUIO.js} +1 -1
  182. package/browser/{chunk-5YVJIGMT.js → chunk-ROLAW5XO.js} +1 -1
  183. package/browser/chunk-RONQFUCZ.js +1 -0
  184. package/browser/{chunk-2T2LYQDD.js → chunk-RSN23KAR.js} +2 -2
  185. package/browser/{chunk-5JDNG4HM.js → chunk-RYTM3LHN.js} +1 -1
  186. package/browser/{chunk-XUAUPVAM.js → chunk-SANNYTK4.js} +1 -1
  187. package/browser/chunk-SARJJ3AZ.js +1 -0
  188. package/browser/chunk-SEOZWGYI.js +1 -0
  189. package/browser/chunk-SGSO4UVM.js +1 -0
  190. package/browser/{chunk-HKYIKSF6.js → chunk-SKE3MW2D.js} +1 -1
  191. package/browser/{chunk-BG4XRSKY.js → chunk-SO4GMA3Y.js} +1 -1
  192. package/browser/chunk-T5FBPKPS.js +1 -0
  193. package/browser/{chunk-D5IRUIA5.js → chunk-TGEQUV6Z.js} +1 -1
  194. package/browser/{chunk-4GH7NXPQ.js → chunk-TH7SO4LD.js} +1 -1
  195. package/browser/{chunk-WJL7IGC6.js → chunk-UBCB4G4S.js} +1 -1
  196. package/browser/{chunk-XZGY4EZF.js → chunk-UBXEYFKJ.js} +1 -1
  197. package/browser/{chunk-DFHK3QA3.js → chunk-UE2HBW5H.js} +1 -1
  198. package/browser/{chunk-ARGOJ7DE.js → chunk-UFBRV4CF.js} +1 -1
  199. package/browser/{chunk-4CLAEU7U.js → chunk-ULYBLEXA.js} +1 -1
  200. package/browser/{chunk-5ACAEXN7.js → chunk-USJ6ILEE.js} +1 -1
  201. package/browser/{chunk-VWL5FKU2.js → chunk-UTAQ3FRE.js} +1 -1
  202. package/browser/{chunk-B6RBXYBH.js → chunk-VP2ZEIJA.js} +1 -1
  203. package/browser/{chunk-B7BEECTQ.js → chunk-VYQEM4T2.js} +1 -1
  204. package/browser/{chunk-OFXB2JPC.js → chunk-W3EZ4JHD.js} +2 -2
  205. package/browser/{chunk-BCNA556P.js → chunk-WA4WWHYW.js} +1 -1
  206. package/browser/chunk-WBMSB25X.js +1 -0
  207. package/browser/{chunk-XMPP4Y4Z.js → chunk-WBO7PC7R.js} +1 -1
  208. package/browser/{chunk-N5J3AS3T.js → chunk-WDD7INF4.js} +1 -1
  209. package/browser/{chunk-BQZPNTN2.js → chunk-WH2BY5K4.js} +1 -1
  210. package/browser/{chunk-45LBXHFM.js → chunk-WMUZZ5XX.js} +1 -1
  211. package/browser/chunk-WY6RTBDA.js +3 -0
  212. package/browser/{chunk-VBBYHB7E.js → chunk-X57HWGVJ.js} +1 -1
  213. package/browser/{chunk-HTUZHZ2W.js → chunk-XA4TVPAS.js} +1 -1
  214. package/browser/{chunk-T6TESUGU.js → chunk-XACC6EMJ.js} +1 -1
  215. package/browser/{chunk-IXBA7EIJ.js → chunk-XE46ZDV6.js} +1 -1
  216. package/browser/{chunk-RA4OB2YA.js → chunk-XEATJM6B.js} +1 -1
  217. package/browser/{chunk-NFZ2TD3A.js → chunk-XIXDLSA2.js} +1 -1
  218. package/browser/{chunk-4BPD7IPB.js → chunk-YG6ODXQF.js} +1 -1
  219. package/browser/chunk-YMLCHH2G.js +1 -0
  220. package/browser/{chunk-MPPCTVQF.js → chunk-YRGHPSPV.js} +1 -1
  221. package/browser/chunk-YV6MAUKK.js +1 -0
  222. package/browser/chunk-Z6RY34PQ.js +1 -0
  223. package/browser/{chunk-QNPEMG6D.js → chunk-Z7IU5JLK.js} +1 -1
  224. package/browser/{chunk-YJJEYBW2.js → chunk-ZEKZLSGA.js} +1 -1
  225. package/browser/{chunk-QYQO4PJF.js → chunk-ZHPBIWMH.js} +1 -1
  226. package/browser/{chunk-7EN4VWQC.js → chunk-ZRYRGDGM.js} +1 -1
  227. package/browser/{chunk-2G2N3QIY.js → chunk-ZSW24KNO.js} +1 -1
  228. package/browser/{chunk-IKX6MZV7.js → chunk-ZW5E2GIN.js} +1 -1
  229. package/browser/{chunk-KCYEWNYP.js → chunk-ZXSVZL53.js} +1 -1
  230. package/browser/index.html +2 -2
  231. package/browser/main-VVZRGXWB.js +3 -0
  232. package/package.json +1 -1
  233. package/browser/chunk-2BGWWBHC.js +0 -3
  234. package/browser/chunk-2S4MUH4L.js +0 -14
  235. package/browser/chunk-2UJUXPQL.js +0 -1
  236. package/browser/chunk-44MS566M.js +0 -4
  237. package/browser/chunk-45DQRELI.js +0 -24
  238. package/browser/chunk-5A4BI6R4.js +0 -1
  239. package/browser/chunk-67JWJEWL.js +0 -1
  240. package/browser/chunk-6VWCIQNT.js +0 -1
  241. package/browser/chunk-AD5QTGBG.js +0 -1
  242. package/browser/chunk-ADRSDODY.js +0 -1
  243. package/browser/chunk-AL37NTTS.js +0 -1
  244. package/browser/chunk-BWL4WXAD.js +0 -1
  245. package/browser/chunk-DWWQ27MN.js +0 -16
  246. package/browser/chunk-DZSOQO6Z.js +0 -1
  247. package/browser/chunk-G36EBMA4.js +0 -1
  248. package/browser/chunk-HE2B5Q63.js +0 -1
  249. package/browser/chunk-II43RP2H.js +0 -1
  250. package/browser/chunk-JM73PAXO.js +0 -1
  251. package/browser/chunk-KY4GSSBW.js +0 -1
  252. package/browser/chunk-LFUE4ZL6.js +0 -2
  253. package/browser/chunk-LJ6YD225.js +0 -1
  254. package/browser/chunk-NJ67KPDC.js +0 -3
  255. package/browser/chunk-O2H3P76C.js +0 -1
  256. package/browser/chunk-OHYERAR6.js +0 -1
  257. package/browser/chunk-P4NX6EKZ.js +0 -1
  258. package/browser/chunk-PF2YFOXS.js +0 -1
  259. package/browser/chunk-QXANNR7D.js +0 -1
  260. package/browser/chunk-RLNFPJPE.js +0 -1
  261. package/browser/chunk-RRHPX65K.js +0 -1
  262. package/browser/chunk-SZHE2X7K.js +0 -1
  263. package/browser/chunk-TTR5FF2O.js +0 -1
  264. package/browser/chunk-UWBVPKV4.js +0 -1
  265. package/browser/chunk-Y2T5WNHG.js +0 -1
  266. package/browser/chunk-Y5JYDZ3E.js +0 -1
  267. package/browser/chunk-YGHK5XUL.js +0 -1
  268. package/browser/chunk-YZSVWK3T.js +0 -1
  269. package/browser/chunk-ZIWCCS4F.js +0 -1
  270. package/browser/chunk-ZJDFNACB.js +0 -1
  271. package/browser/main-K2ATSNT2.js +0 -3
@@ -1,2 +1,2 @@
1
- import{A as Nt,G as Y,I as Mt,K as At,L as Ft,a as K,b as D,c as Tt,i as N,k as I,l as kt,m as Ot,q as Lt}from"./chunk-OWKXU5ZC.js";import{$ as B,$a as St,C as ft,Ca as W,D as O,Ha as Pt,Ja as Z,N as mt,Vc as $,Xc as w,Ya as m,Yc as Ct,Za as L,a as P,aa as vt,ab as yt,ac as q,bb as j,c as V,d as _,da as y,e as pt,fa as Dt,fb as Rt,hb as Et,ib as It,j as gt,jb as R,la as G,ma as wt,na as b,pa as c,sc as E,t as ut,tb as xt,xa as bt,ya as U}from"./chunk-D4VXNK25.js";function Q(r){let e=r.cloneNode(!0),t=e.querySelectorAll("[id]"),i=r.nodeName.toLowerCase();e.removeAttribute("id");for(let s=0;s<t.length;s++)t[s].removeAttribute("id");return i==="canvas"?Vt(r,e):(i==="input"||i==="select"||i==="textarea")&&zt(r,e),Ht("canvas",r,e,Vt),Ht("input, textarea, select",r,e,zt),e}function Ht(r,e,t,i){let s=e.querySelectorAll(r);if(s.length){let n=t.querySelectorAll(r);for(let o=0;o<s.length;o++)i(s[o],n[o])}}var he=0;function zt(r,e){e.type!=="file"&&(e.value=r.value),e.type==="radio"&&e.name&&(e.name=`mat-clone-${e.name}-${he++}`)}function Vt(r,e){let t=e.getContext("2d");if(t)try{t.drawImage(r,0,0)}catch{}}function at(r){let e=r.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height,x:e.x,y:e.y}}function tt(r,e,t){let{top:i,bottom:s,left:n,right:o}=r;return t>=i&&t<=s&&e>=n&&e<=o}function ce(r,e){let t=e.left<r.left,i=e.left+e.width>r.right,s=e.top<r.top,n=e.top+e.height>r.bottom;return t||i||s||n}function T(r,e,t){r.top+=e,r.bottom=r.top+r.height,r.left+=t,r.right=r.left+r.width}function Bt(r,e,t,i){let{top:s,right:n,bottom:o,left:a,width:l,height:h}=r,d=l*e,g=h*e;return i>s-g&&i<o+g&&t>a-d&&t<n+d}var M=class{_document;positions=new Map;constructor(e){this._document=e}clear(){this.positions.clear()}cache(e){this.clear(),this.positions.set(this._document,{scrollPosition:this.getViewportScrollPosition()}),e.forEach(t=>{this.positions.set(t,{scrollPosition:{top:t.scrollTop,left:t.scrollLeft},clientRect:at(t)})})}handleScroll(e){let t=I(e),i=this.positions.get(t);if(!i)return null;let s=i.scrollPosition,n,o;if(t===this._document){let h=this.getViewportScrollPosition();n=h.top,o=h.left}else n=t.scrollTop,o=t.scrollLeft;let a=s.top-n,l=s.left-o;return this.positions.forEach((h,d)=>{h.clientRect&&t!==d&&t.contains(d)&&T(h.clientRect,a,l)}),s.top=n,s.left=o,{top:a,left:l}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function Jt(r,e){let t=r.rootNodes;if(t.length===1&&t[0].nodeType===e.ELEMENT_NODE)return t[0];let i=e.createElement("div");return t.forEach(s=>i.appendChild(s)),i}function lt(r,e,t){for(let i in e)if(e.hasOwnProperty(i)){let s=e[i];s?r.setProperty(i,s,t?.has(i)?"important":""):r.removeProperty(i)}return r}function S(r,e){let t=e?"":"none";lt(r.style,{"touch-action":e?"":"none","-webkit-user-drag":e?"":"none","-webkit-tap-highlight-color":e?"":"transparent","user-select":t,"-ms-user-select":t,"-webkit-user-select":t,"-moz-user-select":t})}function Gt(r,e,t){lt(r.style,{position:e?"":"fixed",top:e?"":"0",opacity:e?"":"0",left:e?"":"-999em"},t)}function A(r,e){return e&&e!="none"?r+" "+e:r}function Ut(r,e){r.style.width=`${e.width}px`,r.style.height=`${e.height}px`,r.style.transform=k(e.left,e.top)}function k(r,e){return`translate3d(${Math.round(r)}px, ${Math.round(e)}px, 0)`}function Wt(r){let e=r.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(r)*e}function de(r){let e=getComputedStyle(r),t=X(e,"transition-property"),i=t.find(a=>a==="transform"||a==="all");if(!i)return 0;let s=t.indexOf(i),n=X(e,"transition-duration"),o=X(e,"transition-delay");return Wt(n[s])+Wt(o[s])}function X(r,e){return r.getPropertyValue(e).split(",").map(i=>i.trim())}var _e=new Set(["position"]),et=class{_document;_rootElement;_direction;_initialDomRect;_previewTemplate;_previewClass;_pickupPositionOnPage;_initialTransform;_zIndex;_renderer;_previewEmbeddedView;_preview;get element(){return this._preview}constructor(e,t,i,s,n,o,a,l,h,d){this._document=e,this._rootElement=t,this._direction=i,this._initialDomRect=s,this._previewTemplate=n,this._previewClass=o,this._pickupPositionOnPage=a,this._initialTransform=l,this._zIndex=h,this._renderer=d}attach(e){this._preview=this._createPreview(),e.appendChild(this._preview),Zt(this._preview)&&this._preview.showPopover()}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null}setTransform(e){this._preview.style.transform=e}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(e){this._preview.classList.add(e)}getTransitionDuration(){return de(this._preview)}addEventListener(e,t){return this._renderer.listen(this._preview,e,t)}_createPreview(){let e=this._previewTemplate,t=this._previewClass,i=e?e.template:null,s;if(i&&e){let n=e.matchSize?this._initialDomRect:null,o=e.viewContainer.createEmbeddedView(i,e.context);o.detectChanges(),s=Jt(o,this._document),this._previewEmbeddedView=o,e.matchSize?Ut(s,n):s.style.transform=k(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else s=Q(this._rootElement),Ut(s,this._initialDomRect),this._initialTransform&&(s.style.transform=this._initialTransform);return lt(s.style,{"pointer-events":"none",margin:Zt(s)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},_e),S(s,!1),s.classList.add("cdk-drag-preview"),s.setAttribute("popover","manual"),s.setAttribute("dir",this._direction),t&&(Array.isArray(t)?t.forEach(n=>s.classList.add(n)):s.classList.add(t)),s}};function Zt(r){return"showPopover"in r}var pe={passive:!0},jt={passive:!1},ge={passive:!1,capture:!0},ue=800,qt="cdk-drag-placeholder",$t=new Set(["position"]),it=class{_config;_document;_ngZone;_viewportRuler;_dragDropRegistry;_renderer;_rootElementCleanups;_cleanupShadowRootSelectStart;_preview;_previewContainer;_placeholderRef;_placeholder;_pickupPositionInElement;_pickupPositionOnPage;_marker;_anchor=null;_passiveTransform={x:0,y:0};_activeTransform={x:0,y:0};_initialTransform;_hasStartedDragging=W(!1);_hasMoved;_initialContainer;_initialIndex;_parentPositions;_moveEvents=new _;_pointerDirectionDelta;_pointerPositionAtLastDirectionChange;_lastKnownPointerPosition;_rootElement;_ownerSVGElement;_rootElementTapHighlight;_pointerMoveSubscription=P.EMPTY;_pointerUpSubscription=P.EMPTY;_scrollSubscription=P.EMPTY;_resizeSubscription=P.EMPTY;_lastTouchEventTime;_dragStartTime;_boundaryElement=null;_nativeInteractionsEnabled=!0;_initialDomRect;_previewRect;_boundaryRect;_previewTemplate;_placeholderTemplate;_handles=[];_disabledHandles=new Set;_dropContainer;_direction="ltr";_parentDragRef;_cachedShadowRoot;lockAxis=null;dragStartDelay=0;previewClass;scale=1;get disabled(){return this._disabled||!!(this._dropContainer&&this._dropContainer.disabled)}set disabled(e){e!==this._disabled&&(this._disabled=e,this._toggleNativeDragInteractions(),this._handles.forEach(t=>S(t,e)))}_disabled=!1;beforeStarted=new _;started=new _;released=new _;ended=new _;entered=new _;exited=new _;dropped=new _;moved=this._moveEvents;data;constrainPosition;constructor(e,t,i,s,n,o,a){this._config=t,this._document=i,this._ngZone=s,this._viewportRuler=n,this._dragDropRegistry=o,this._renderer=a,this.withRootElement(e).withParent(t.parentDragRef||null),this._parentPositions=new M(i),o.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(e){this._handles=e.map(i=>D(i)),this._handles.forEach(i=>S(i,this.disabled)),this._toggleNativeDragInteractions();let t=new Set;return this._disabledHandles.forEach(i=>{this._handles.indexOf(i)>-1&&t.add(i)}),this._disabledHandles=t,this}withPreviewTemplate(e){return this._previewTemplate=e,this}withPlaceholderTemplate(e){return this._placeholderTemplate=e,this}withRootElement(e){let t=D(e);if(t!==this._rootElement){this._removeRootElementListeners();let i=this._renderer;this._rootElementCleanups=this._ngZone.runOutsideAngular(()=>[i.listen(t,"mousedown",this._pointerDown,jt),i.listen(t,"touchstart",this._pointerDown,pe),i.listen(t,"dragstart",this._nativeDragStart,jt)]),this._initialTransform=void 0,this._rootElement=t}return typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(e){return this._boundaryElement=e?D(e):null,this._resizeSubscription.unsubscribe(),e&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(e){return this._parentDragRef=e,this}dispose(){this._removeRootElementListeners(),this.isDragging()&&this._rootElement?.remove(),this._marker?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeListeners(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._marker=this._parentDragRef=null}isDragging(){return this._hasStartedDragging()&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}resetToBoundary(){if(this._boundaryElement&&this._rootElement&&ce(this._boundaryElement.getBoundingClientRect(),this._rootElement.getBoundingClientRect())){let e=this._boundaryElement.getBoundingClientRect(),t=this._rootElement.getBoundingClientRect(),i=0,s=0;t.left<e.left?i=e.left-t.left:t.right>e.right&&(i=e.right-t.right),t.top<e.top?s=e.top-t.top:t.bottom>e.bottom&&(s=e.bottom-t.bottom);let n=this._activeTransform.x,o=this._activeTransform.y,a=n+i,l=o+s;this._rootElement.style.transform=k(a,l),this._activeTransform={x:a,y:l},this._passiveTransform={x:a,y:l}}}disableHandle(e){!this._disabledHandles.has(e)&&this._handles.indexOf(e)>-1&&(this._disabledHandles.add(e),S(e,!0))}enableHandle(e){this._disabledHandles.has(e)&&(this._disabledHandles.delete(e),S(e,this.disabled))}withDirection(e){return this._direction=e,this}_withDropContainer(e){this._dropContainer=e}getFreeDragPosition(){let e=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:e.x,y:e.y}}setFreeDragPosition(e){return this._activeTransform={x:0,y:0},this._passiveTransform.x=e.x,this._passiveTransform.y=e.y,this._dropContainer||this._applyRootElementTransform(e.x,e.y),this}withPreviewContainer(e){return this._previewContainer=e,this}_sortFromLastPointerPosition(){let e=this._lastKnownPointerPosition;e&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(e),e)}_removeListeners(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe(),this._cleanupShadowRootSelectStart?.(),this._cleanupShadowRootSelectStart=void 0}_destroyPreview(){this._preview?.destroy(),this._preview=null}_destroyPlaceholder(){this._anchor?.remove(),this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._anchor=this._placeholderRef=null}_pointerDown=e=>{if(this.beforeStarted.next(),this._handles.length){let t=this._getTargetHandle(e);t&&!this._disabledHandles.has(t)&&!this.disabled&&this._initializeDragSequence(t,e)}else this.disabled||this._initializeDragSequence(this._rootElement,e)};_pointerMove=e=>{let t=this._getPointerPositionOnPage(e);if(!this._hasStartedDragging()){let s=Math.abs(t.x-this._pickupPositionOnPage.x),n=Math.abs(t.y-this._pickupPositionOnPage.y);if(s+n>=this._config.dragStartThreshold){let a=Date.now()>=this._dragStartTime+this._getDragStartDelay(e),l=this._dropContainer;if(!a){this._endDragSequence(e);return}(!l||!l.isDragging()&&!l.isReceiving())&&(e.cancelable&&e.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(e)))}return}e.cancelable&&e.preventDefault();let i=this._getConstrainedPointerPosition(t);if(this._hasMoved=!0,this._lastKnownPointerPosition=t,this._updatePointerDirectionDelta(i),this._dropContainer)this._updateActiveDropContainer(i,t);else{let s=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,n=this._activeTransform;n.x=i.x-s.x+this._passiveTransform.x,n.y=i.y-s.y+this._passiveTransform.y,this._applyRootElementTransform(n.x,n.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:i,event:e,distance:this._getDragDistance(i),delta:this._pointerDirectionDelta})})};_pointerUp=e=>{this._endDragSequence(e)};_endDragSequence(e){if(this._dragDropRegistry.isDragging(this)&&(this._removeListeners(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),!!this._hasStartedDragging()))if(this.released.next({source:this,event:e}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(e),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;let t=this._getPointerPositionOnPage(e);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(t),dropPoint:t,event:e})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(e){x(e)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let t=this._getShadowRoot(),i=this._dropContainer;if(t&&this._ngZone.runOutsideAngular(()=>{this._cleanupShadowRootSelectStart=this._renderer.listen(t,"selectstart",fe,ge)}),i){let s=this._rootElement,n=s.parentNode,o=this._placeholder=this._createPlaceholderElement(),a=this._marker=this._marker||this._document.createComment("");n.insertBefore(a,s),this._initialTransform=s.style.transform||"",this._preview=new et(this._document,this._rootElement,this._direction,this._initialDomRect,this._previewTemplate||null,this.previewClass||null,this._pickupPositionOnPage,this._initialTransform,this._config.zIndex||1e3,this._renderer),this._preview.attach(this._getPreviewInsertionPoint(n,t)),Gt(s,!1,$t),this._document.body.appendChild(n.replaceChild(o,s)),this.started.next({source:this,event:e}),i.start(),this._initialContainer=i,this._initialIndex=i.getItemIndex(this)}else this.started.next({source:this,event:e}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(i?i.getScrollableParents():[])}_initializeDragSequence(e,t){this._parentDragRef&&t.stopPropagation();let i=this.isDragging(),s=x(t),n=!s&&t.button!==0,o=this._rootElement,a=I(t),l=!s&&this._lastTouchEventTime&&this._lastTouchEventTime+ue>Date.now(),h=s?Ot(t):kt(t);if(a&&a.draggable&&t.type==="mousedown"&&t.preventDefault(),i||n||l||h)return;if(this._handles.length){let v=o.style;this._rootElementTapHighlight=v.webkitTapHighlightColor||"",v.webkitTapHighlightColor="transparent"}this._hasMoved=!1,this._hasStartedDragging.set(this._hasMoved),this._removeListeners(),this._initialDomRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(v=>this._updateOnScroll(v)),this._boundaryElement&&(this._boundaryRect=at(this._boundaryElement));let d=this._previewTemplate;this._pickupPositionInElement=d&&d.template&&!d.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,e,t);let g=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(t);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:g.x,y:g.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,t)}_cleanupDragArtifacts(e){Gt(this._rootElement,!0,$t),this._marker.parentNode.replaceChild(this._rootElement,this._marker),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{let t=this._dropContainer,i=t.getItemIndex(this),s=this._getPointerPositionOnPage(e),n=this._getDragDistance(s),o=t._isOverContainer(s.x,s.y);this.ended.next({source:this,distance:n,dropPoint:s,event:e}),this.dropped.next({item:this,currentIndex:i,previousIndex:this._initialIndex,container:t,previousContainer:this._initialContainer,isPointerOverContainer:o,distance:n,dropPoint:s,event:e}),t.drop(this,i,this._initialIndex,this._initialContainer,o,n,s,e),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:e,y:t},{x:i,y:s}){let n=this._initialContainer._getSiblingContainerFromPosition(this,e,t);!n&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(e,t)&&(n=this._initialContainer),n&&n!==this._dropContainer&&this._ngZone.run(()=>{let o=this._dropContainer.getItemIndex(this),a=this._dropContainer.getItemAtIndex(o+1)?.getVisibleElement()||null;this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._conditionallyInsertAnchor(n,this._dropContainer,a),this._dropContainer=n,this._dropContainer.enter(this,e,t,n===this._initialContainer&&n.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:n,currentIndex:n.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(i,s),this._dropContainer._sortItem(this,e,t,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(e,t):this._applyPreviewTransform(e-this._pickupPositionInElement.x,t-this._pickupPositionInElement.y))}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let e=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(e.left,e.top);let t=this._preview.getTransitionDuration();return t===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(i=>{let s=a=>{(!a||this._preview&&I(a)===this._preview.element&&a.propertyName==="transform")&&(o(),i(),clearTimeout(n))},n=setTimeout(s,t*1.5),o=this._preview.addEventListener("transitionend",s)}))}_createPlaceholderElement(){let e=this._placeholderTemplate,t=e?e.template:null,i;return t?(this._placeholderRef=e.viewContainer.createEmbeddedView(t,e.context),this._placeholderRef.detectChanges(),i=Jt(this._placeholderRef,this._document)):i=Q(this._rootElement),i.style.pointerEvents="none",i.classList.add(qt),i}_getPointerPositionInElement(e,t,i){let s=t===this._rootElement?null:t,n=s?s.getBoundingClientRect():e,o=x(i)?i.targetTouches[0]:i,a=this._getViewportScrollPosition(),l=o.pageX-n.left-a.left,h=o.pageY-n.top-a.top;return{x:n.left-e.left+l,y:n.top-e.top+h}}_getPointerPositionOnPage(e){let t=this._getViewportScrollPosition(),i=x(e)?e.touches[0]||e.changedTouches[0]||{pageX:0,pageY:0}:e,s=i.pageX-t.left,n=i.pageY-t.top;if(this._ownerSVGElement){let o=this._ownerSVGElement.getScreenCTM();if(o){let a=this._ownerSVGElement.createSVGPoint();return a.x=s,a.y=n,a.matrixTransform(o.inverse())}}return{x:s,y:n}}_getConstrainedPointerPosition(e){let t=this._dropContainer?this._dropContainer.lockAxis:null,{x:i,y:s}=this.constrainPosition?this.constrainPosition(e,this,this._initialDomRect,this._pickupPositionInElement):e;if(this.lockAxis==="x"||t==="x"?s=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):(this.lockAxis==="y"||t==="y")&&(i=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){let{x:n,y:o}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,a=this._boundaryRect,{width:l,height:h}=this._getPreviewRect(),d=a.top+o,g=a.bottom-(h-o),v=a.left+n,H=a.right-(l-n);i=Kt(i,v,H),s=Kt(s,d,g)}return{x:i,y:s}}_updatePointerDirectionDelta(e){let{x:t,y:i}=e,s=this._pointerDirectionDelta,n=this._pointerPositionAtLastDirectionChange,o=Math.abs(t-n.x),a=Math.abs(i-n.y);return o>this._config.pointerDirectionChangeThreshold&&(s.x=t>n.x?1:-1,n.x=t),a>this._config.pointerDirectionChangeThreshold&&(s.y=i>n.y?1:-1,n.y=i),s}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let e=this._handles.length>0||!this.isDragging();e!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=e,S(this._rootElement,e))}_removeRootElementListeners(){this._rootElementCleanups?.forEach(e=>e()),this._rootElementCleanups=void 0}_applyRootElementTransform(e,t){let i=1/this.scale,s=k(e*i,t*i),n=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=n.transform&&n.transform!="none"?n.transform:""),n.transform=A(s,this._initialTransform)}_applyPreviewTransform(e,t){let i=this._previewTemplate?.template?void 0:this._initialTransform,s=k(e,t);this._preview.setTransform(A(s,i))}_getDragDistance(e){let t=this._pickupPositionOnPage;return t?{x:e.x-t.x,y:e.y-t.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:e,y:t}=this._passiveTransform;if(e===0&&t===0||this.isDragging()||!this._boundaryElement)return;let i=this._rootElement.getBoundingClientRect(),s=this._boundaryElement.getBoundingClientRect();if(s.width===0&&s.height===0||i.width===0&&i.height===0)return;let n=s.left-i.left,o=i.right-s.right,a=s.top-i.top,l=i.bottom-s.bottom;s.width>i.width?(n>0&&(e+=n),o>0&&(e-=o)):e=0,s.height>i.height?(a>0&&(t+=a),l>0&&(t-=l)):t=0,(e!==this._passiveTransform.x||t!==this._passiveTransform.y)&&this.setFreeDragPosition({y:t,x:e})}_getDragStartDelay(e){let t=this.dragStartDelay;return typeof t=="number"?t:x(e)?t.touch:t?t.mouse:0}_updateOnScroll(e){let t=this._parentPositions.handleScroll(e);if(t){let i=I(e);this._boundaryRect&&i!==this._boundaryElement&&i.contains(this._boundaryElement)&&T(this._boundaryRect,t.top,t.left),this._pickupPositionOnPage.x+=t.left,this._pickupPositionOnPage.y+=t.top,this._dropContainer||(this._activeTransform.x-=t.left,this._activeTransform.y-=t.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return this._cachedShadowRoot===void 0&&(this._cachedShadowRoot=N(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(e,t){let i=this._previewContainer||"global";if(i==="parent")return e;if(i==="global"){let s=this._document;return t||s.fullscreenElement||s.webkitFullscreenElement||s.mozFullScreenElement||s.msFullscreenElement||s.body}return D(i)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_nativeDragStart=e=>{if(this._handles.length){let t=this._getTargetHandle(e);t&&!this._disabledHandles.has(t)&&!this.disabled&&e.preventDefault()}else this.disabled||e.preventDefault()};_getTargetHandle(e){return this._handles.find(t=>e.target&&(e.target===t||t.contains(e.target)))}_conditionallyInsertAnchor(e,t,i){if(e===this._initialContainer)this._anchor?.remove(),this._anchor=null;else if(t===this._initialContainer&&t.hasAnchor){let s=this._anchor??=Q(this._placeholder);s.classList.remove(qt),s.classList.add("cdk-drag-anchor"),s.style.transform="",i?i.before(s):D(t.element).appendChild(s)}}};function Kt(r,e,t){return Math.max(e,Math.min(t,r))}function x(r){return r.type[0]==="t"}function fe(r){r.preventDefault()}function Qt(r,e,t){let i=Yt(e,r.length-1),s=Yt(t,r.length-1);if(i===s)return;let n=r[i],o=s<i?-1:1;for(let a=i;a!==s;a+=o)r[a]=r[a+o];r[s]=n}function Yt(r,e){return Math.max(0,Math.min(e,r))}var F=class{_dragDropRegistry;_element;_sortPredicate;_itemPositions=[];_activeDraggables;orientation="vertical";direction;constructor(e){this._dragDropRegistry=e}_previousSwap={drag:null,delta:0,overlaps:!1};start(e){this.withItems(e)}sort(e,t,i,s){let n=this._itemPositions,o=this._getItemIndexFromPointerPosition(e,t,i,s);if(o===-1&&n.length>0)return null;let a=this.orientation==="horizontal",l=n.findIndex(u=>u.drag===e),h=n[o],d=n[l].clientRect,g=h.clientRect,v=l>o?1:-1,H=this._getItemOffsetPx(d,g,v),oe=this._getSiblingOffsetPx(l,n,v),ae=n.slice();return Qt(n,l,o),n.forEach((u,le)=>{if(ae[le]===u)return;let ct=u.drag===e,z=ct?H:oe,dt=ct?e.getPlaceholderElement():u.drag.getRootElement();u.offset+=z;let _t=Math.round(u.offset*(1/u.drag.scale));a?(dt.style.transform=A(`translate3d(${_t}px, 0, 0)`,u.initialTransform),T(u.clientRect,0,z)):(dt.style.transform=A(`translate3d(0, ${_t}px, 0)`,u.initialTransform),T(u.clientRect,z,0))}),this._previousSwap.overlaps=tt(g,t,i),this._previousSwap.drag=h.drag,this._previousSwap.delta=a?s.x:s.y,{previousIndex:l,currentIndex:o}}enter(e,t,i,s){let n=s==null||s<0?this._getItemIndexFromPointerPosition(e,t,i):s,o=this._activeDraggables,a=o.indexOf(e),l=e.getPlaceholderElement(),h=o[n];if(h===e&&(h=o[n+1]),!h&&(n==null||n===-1||n<o.length-1)&&this._shouldEnterAsFirstChild(t,i)&&(h=o[0]),a>-1&&o.splice(a,1),h&&!this._dragDropRegistry.isDragging(h)){let d=h.getRootElement();d.parentElement.insertBefore(l,d),o.splice(n,0,e)}else this._element.appendChild(l),o.push(e);l.style.transform="",this._cacheItemPositions()}withItems(e){this._activeDraggables=e.slice(),this._cacheItemPositions()}withSortPredicate(e){this._sortPredicate=e}reset(){this._activeDraggables?.forEach(e=>{let t=e.getRootElement();if(t){let i=this._itemPositions.find(s=>s.drag===e)?.initialTransform;t.style.transform=i||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(e){return this._getVisualItemPositions().findIndex(t=>t.drag===e)}getItemAtIndex(e){return this._getVisualItemPositions()[e]?.drag||null}updateOnScroll(e,t){this._itemPositions.forEach(({clientRect:i})=>{T(i,e,t)}),this._itemPositions.forEach(({drag:i})=>{this._dragDropRegistry.isDragging(i)&&i._sortFromLastPointerPosition()})}withElementContainer(e){this._element=e}_cacheItemPositions(){let e=this.orientation==="horizontal";this._itemPositions=this._activeDraggables.map(t=>{let i=t.getVisibleElement();return{drag:t,offset:0,initialTransform:i.style.transform||"",clientRect:at(i)}}).sort((t,i)=>e?t.clientRect.left-i.clientRect.left:t.clientRect.top-i.clientRect.top)}_getVisualItemPositions(){return this.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions}_getItemOffsetPx(e,t,i){let s=this.orientation==="horizontal",n=s?t.left-e.left:t.top-e.top;return i===-1&&(n+=s?t.width-e.width:t.height-e.height),n}_getSiblingOffsetPx(e,t,i){let s=this.orientation==="horizontal",n=t[e].clientRect,o=t[e+i*-1],a=n[s?"width":"height"]*i;if(o){let l=s?"left":"top",h=s?"right":"bottom";i===-1?a-=o.clientRect[l]-n[h]:a+=n[l]-o.clientRect[h]}return a}_shouldEnterAsFirstChild(e,t){if(!this._activeDraggables.length)return!1;let i=this._itemPositions,s=this.orientation==="horizontal";if(i[0].drag!==this._activeDraggables[0]){let o=i[i.length-1].clientRect;return s?e>=o.right:t>=o.bottom}else{let o=i[0].clientRect;return s?e<=o.left:t<=o.top}}_getItemIndexFromPointerPosition(e,t,i,s){let n=this.orientation==="horizontal",o=this._itemPositions.findIndex(({drag:a,clientRect:l})=>{if(a===e)return!1;if(s){let h=n?s.x:s.y;if(a===this._previousSwap.drag&&this._previousSwap.overlaps&&h===this._previousSwap.delta)return!1}return n?t>=Math.floor(l.left)&&t<Math.floor(l.right):i>=Math.floor(l.top)&&i<Math.floor(l.bottom)});return o===-1||!this._sortPredicate(o,e)?-1:o}},st=class{_document;_dragDropRegistry;_element;_sortPredicate;_rootNode;_activeItems;_previousSwap={drag:null,deltaX:0,deltaY:0,overlaps:!1};_relatedNodes=[];constructor(e,t){this._document=e,this._dragDropRegistry=t}start(e){let t=this._element.childNodes;this._relatedNodes=[];for(let i=0;i<t.length;i++){let s=t[i];this._relatedNodes.push([s,s.nextSibling])}this.withItems(e)}sort(e,t,i,s){let n=this._getItemIndexFromPointerPosition(e,t,i),o=this._previousSwap;if(n===-1||this._activeItems[n]===e)return null;let a=this._activeItems[n];if(o.drag===a&&o.overlaps&&o.deltaX===s.x&&o.deltaY===s.y)return null;let l=this.getItemIndex(e),h=e.getPlaceholderElement(),d=a.getRootElement();n>l?d.after(h):d.before(h),Qt(this._activeItems,l,n);let g=this._getRootNode().elementFromPoint(t,i);return o.deltaX=s.x,o.deltaY=s.y,o.drag=a,o.overlaps=d===g||d.contains(g),{previousIndex:l,currentIndex:n}}enter(e,t,i,s){let n=this._activeItems.indexOf(e);n>-1&&this._activeItems.splice(n,1);let o=s==null||s<0?this._getItemIndexFromPointerPosition(e,t,i):s;o===-1&&(o=this._getClosestItemIndexToPointer(e,t,i));let a=this._activeItems[o];a&&!this._dragDropRegistry.isDragging(a)?(this._activeItems.splice(o,0,e),a.getRootElement().before(e.getPlaceholderElement())):(this._activeItems.push(e),this._element.appendChild(e.getPlaceholderElement()))}withItems(e){this._activeItems=e.slice()}withSortPredicate(e){this._sortPredicate=e}reset(){let e=this._element,t=this._previousSwap;for(let i=this._relatedNodes.length-1;i>-1;i--){let[s,n]=this._relatedNodes[i];s.parentNode===e&&s.nextSibling!==n&&(n===null?e.appendChild(s):n.parentNode===e&&e.insertBefore(s,n))}this._relatedNodes=[],this._activeItems=[],t.drag=null,t.deltaX=t.deltaY=0,t.overlaps=!1}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(e){return this._activeItems.indexOf(e)}getItemAtIndex(e){return this._activeItems[e]||null}updateOnScroll(){this._activeItems.forEach(e=>{this._dragDropRegistry.isDragging(e)&&e._sortFromLastPointerPosition()})}withElementContainer(e){e!==this._element&&(this._element=e,this._rootNode=void 0)}_getItemIndexFromPointerPosition(e,t,i){let s=this._getRootNode().elementFromPoint(Math.floor(t),Math.floor(i)),n=s?this._activeItems.findIndex(o=>{let a=o.getRootElement();return s===a||a.contains(s)}):-1;return n===-1||!this._sortPredicate(n,e)?-1:n}_getRootNode(){return this._rootNode||(this._rootNode=N(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(e,t,i){if(this._activeItems.length===0)return-1;if(this._activeItems.length===1)return 0;let s=1/0,n=-1;for(let o=0;o<this._activeItems.length;o++){let a=this._activeItems[o];if(a!==e){let{x:l,y:h}=a.getRootElement().getBoundingClientRect(),d=Math.hypot(t-l,i-h);d<s&&(s=d,n=o)}}return n}},Xt=.05,te=.05,f=(function(r){return r[r.NONE=0]="NONE",r[r.UP=1]="UP",r[r.DOWN=2]="DOWN",r})(f||{}),p=(function(r){return r[r.NONE=0]="NONE",r[r.LEFT=1]="LEFT",r[r.RIGHT=2]="RIGHT",r})(p||{}),nt=class{_dragDropRegistry;_ngZone;_viewportRuler;element;disabled=!1;sortingDisabled=!1;lockAxis=null;autoScrollDisabled=!1;autoScrollStep=2;hasAnchor=!1;enterPredicate=()=>!0;sortPredicate=()=>!0;beforeStarted=new _;entered=new _;exited=new _;dropped=new _;sorted=new _;receivingStarted=new _;receivingStopped=new _;data;_container;_isDragging=!1;_parentPositions;_sortStrategy;_domRect;_draggables=[];_siblings=[];_activeSiblings=new Set;_viewportScrollSubscription=P.EMPTY;_verticalScrollDirection=f.NONE;_horizontalScrollDirection=p.NONE;_scrollNode;_stopScrollTimers=new _;_cachedShadowRoot=null;_document;_scrollableElements=[];_initialScrollSnap;_direction="ltr";constructor(e,t,i,s,n){this._dragDropRegistry=t,this._ngZone=s,this._viewportRuler=n;let o=this.element=D(e);this._document=i,this.withOrientation("vertical").withElementContainer(o),t.registerDropContainer(this),this._parentPositions=new M(i)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(e,t,i,s){this._draggingStarted(),s==null&&this.sortingDisabled&&(s=this._draggables.indexOf(e)),this._sortStrategy.enter(e,t,i,s),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:e,container:this,currentIndex:this.getItemIndex(e)})}exit(e){this._reset(),this.exited.next({item:e,container:this})}drop(e,t,i,s,n,o,a,l={}){this._reset(),this.dropped.next({item:e,currentIndex:t,previousIndex:i,container:this,previousContainer:s,isPointerOverContainer:n,distance:o,dropPoint:a,event:l})}withItems(e){let t=this._draggables;return this._draggables=e,e.forEach(i=>i._withDropContainer(this)),this.isDragging()&&(t.filter(s=>s.isDragging()).every(s=>e.indexOf(s)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(e){return this._direction=e,this._sortStrategy instanceof F&&(this._sortStrategy.direction=e),this}connectedTo(e){return this._siblings=e.slice(),this}withOrientation(e){if(e==="mixed")this._sortStrategy=new st(this._document,this._dragDropRegistry);else{let t=new F(this._dragDropRegistry);t.direction=this._direction,t.orientation=e,this._sortStrategy=t}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((t,i)=>this.sortPredicate(t,i,this)),this}withScrollableParents(e){let t=this._container;return this._scrollableElements=e.indexOf(t)===-1?[t,...e]:e.slice(),this}withElementContainer(e){if(e===this._container)return this;let t=D(this.element),i=this._scrollableElements.indexOf(this._container),s=this._scrollableElements.indexOf(e);return i>-1&&this._scrollableElements.splice(i,1),s>-1&&this._scrollableElements.splice(s,1),this._sortStrategy&&this._sortStrategy.withElementContainer(e),this._cachedShadowRoot=null,this._scrollableElements.unshift(e),this._container=e,this}getScrollableParents(){return this._scrollableElements}getItemIndex(e){return this._isDragging?this._sortStrategy.getItemIndex(e):this._draggables.indexOf(e)}getItemAtIndex(e){return this._isDragging?this._sortStrategy.getItemAtIndex(e):this._draggables[e]||null}isReceiving(){return this._activeSiblings.size>0}_sortItem(e,t,i,s){if(this.sortingDisabled||!this._domRect||!Bt(this._domRect,Xt,t,i))return;let n=this._sortStrategy.sort(e,t,i,s);n&&this.sorted.next({previousIndex:n.previousIndex,currentIndex:n.currentIndex,container:this,item:e})}_startScrollingIfNecessary(e,t){if(this.autoScrollDisabled)return;let i,s=f.NONE,n=p.NONE;if(this._parentPositions.positions.forEach((o,a)=>{a===this._document||!o.clientRect||i||Bt(o.clientRect,Xt,e,t)&&([s,n]=me(a,o.clientRect,this._direction,e,t),(s||n)&&(i=a))}),!s&&!n){let{width:o,height:a}=this._viewportRuler.getViewportSize(),l={width:o,height:a,top:0,right:o,bottom:a,left:0};s=ee(l,t),n=ie(l,e),i=window}i&&(s!==this._verticalScrollDirection||n!==this._horizontalScrollDirection||i!==this._scrollNode)&&(this._verticalScrollDirection=s,this._horizontalScrollDirection=n,this._scrollNode=i,(s||n)&&i?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){let e=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=e.msScrollSnapType||e.scrollSnapType||"",e.scrollSnapType=e.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(this._container).clientRect}_reset(){this._isDragging=!1;let e=this._container.style;e.scrollSnapType=e.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(t=>t._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_startScrollInterval=()=>{this._stopScrolling(),ft(0,gt).pipe(y(this._stopScrollTimers)).subscribe(()=>{let e=this._scrollNode,t=this.autoScrollStep;this._verticalScrollDirection===f.UP?e.scrollBy(0,-t):this._verticalScrollDirection===f.DOWN&&e.scrollBy(0,t),this._horizontalScrollDirection===p.LEFT?e.scrollBy(-t,0):this._horizontalScrollDirection===p.RIGHT&&e.scrollBy(t,0)})};_isOverContainer(e,t){return this._domRect!=null&&tt(this._domRect,e,t)}_getSiblingContainerFromPosition(e,t,i){return this._siblings.find(s=>s._canReceive(e,t,i))}_canReceive(e,t,i){if(!this._domRect||!tt(this._domRect,t,i)||!this.enterPredicate(e,this))return!1;let s=this._getShadowRoot().elementFromPoint(t,i);return s?s===this._container||this._container.contains(s):!1}_startReceiving(e,t){let i=this._activeSiblings;!i.has(e)&&t.every(s=>this.enterPredicate(s,this)||this._draggables.indexOf(s)>-1)&&(i.add(e),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:e,receiver:this,items:t}))}_stopReceiving(e){this._activeSiblings.delete(e),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:e,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(e=>{if(this.isDragging()){let t=this._parentPositions.handleScroll(e);t&&this._sortStrategy.updateOnScroll(t.top,t.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){let e=N(this._container);this._cachedShadowRoot=e||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){let e=this._sortStrategy.getActiveItemsSnapshot().filter(t=>t.isDragging());this._siblings.forEach(t=>t._startReceiving(this,e))}};function ee(r,e){let{top:t,bottom:i,height:s}=r,n=s*te;return e>=t-n&&e<=t+n?f.UP:e>=i-n&&e<=i+n?f.DOWN:f.NONE}function ie(r,e){let{left:t,right:i,width:s}=r,n=s*te;return e>=t-n&&e<=t+n?p.LEFT:e>=i-n&&e<=i+n?p.RIGHT:p.NONE}function me(r,e,t,i,s){let n=ee(e,s),o=ie(e,i),a=f.NONE,l=p.NONE;if(n){let h=r.scrollTop;n===f.UP?h>0&&(a=f.UP):r.scrollHeight-h>r.clientHeight&&(a=f.DOWN)}if(o){let h=r.scrollLeft;t==="rtl"?o===p.RIGHT?h<0&&(l=p.RIGHT):r.scrollWidth+h>r.clientWidth&&(l=p.LEFT):o===p.LEFT?h>0&&(l=p.LEFT):r.scrollWidth-h>r.clientWidth&&(l=p.RIGHT)}return[a,l]}var C={capture:!0},J={passive:!1,capture:!0},ve=(()=>{class r{static \u0275fac=function(i){return new(i||r)};static \u0275cmp=Et({type:r,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],decls:0,vars:0,template:function(i,s){},styles:[`@layer cdk-resets{.cdk-drag-preview{background:none;border:none;padding:0;color:inherit;inset:auto}}.cdk-drag-placeholder *,.cdk-drag-preview *{pointer-events:none !important}
1
+ import{A as Nt,G as Y,I as Mt,K as At,L as Ft,a as K,b as D,c as Tt,i as N,k as I,l as kt,m as Ot,q as Lt}from"./chunk-NWSIPELM.js";import{$ as B,$a as St,C as ft,Ca as W,D as O,Ha as Pt,Ja as Z,N as mt,Vc as $,Xc as w,Ya as m,Yc as Ct,Za as L,a as P,aa as vt,ab as yt,ac as q,bb as j,c as V,d as _,da as y,e as pt,fa as Dt,fb as Rt,hb as Et,ib as It,j as gt,jb as R,la as G,ma as wt,na as b,pa as c,sc as E,t as ut,tb as xt,xa as bt,ya as U}from"./chunk-JYZTRN6N.js";function Q(r){let e=r.cloneNode(!0),t=e.querySelectorAll("[id]"),i=r.nodeName.toLowerCase();e.removeAttribute("id");for(let s=0;s<t.length;s++)t[s].removeAttribute("id");return i==="canvas"?Vt(r,e):(i==="input"||i==="select"||i==="textarea")&&zt(r,e),Ht("canvas",r,e,Vt),Ht("input, textarea, select",r,e,zt),e}function Ht(r,e,t,i){let s=e.querySelectorAll(r);if(s.length){let n=t.querySelectorAll(r);for(let o=0;o<s.length;o++)i(s[o],n[o])}}var he=0;function zt(r,e){e.type!=="file"&&(e.value=r.value),e.type==="radio"&&e.name&&(e.name=`mat-clone-${e.name}-${he++}`)}function Vt(r,e){let t=e.getContext("2d");if(t)try{t.drawImage(r,0,0)}catch{}}function at(r){let e=r.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height,x:e.x,y:e.y}}function tt(r,e,t){let{top:i,bottom:s,left:n,right:o}=r;return t>=i&&t<=s&&e>=n&&e<=o}function ce(r,e){let t=e.left<r.left,i=e.left+e.width>r.right,s=e.top<r.top,n=e.top+e.height>r.bottom;return t||i||s||n}function T(r,e,t){r.top+=e,r.bottom=r.top+r.height,r.left+=t,r.right=r.left+r.width}function Bt(r,e,t,i){let{top:s,right:n,bottom:o,left:a,width:l,height:h}=r,d=l*e,g=h*e;return i>s-g&&i<o+g&&t>a-d&&t<n+d}var M=class{_document;positions=new Map;constructor(e){this._document=e}clear(){this.positions.clear()}cache(e){this.clear(),this.positions.set(this._document,{scrollPosition:this.getViewportScrollPosition()}),e.forEach(t=>{this.positions.set(t,{scrollPosition:{top:t.scrollTop,left:t.scrollLeft},clientRect:at(t)})})}handleScroll(e){let t=I(e),i=this.positions.get(t);if(!i)return null;let s=i.scrollPosition,n,o;if(t===this._document){let h=this.getViewportScrollPosition();n=h.top,o=h.left}else n=t.scrollTop,o=t.scrollLeft;let a=s.top-n,l=s.left-o;return this.positions.forEach((h,d)=>{h.clientRect&&t!==d&&t.contains(d)&&T(h.clientRect,a,l)}),s.top=n,s.left=o,{top:a,left:l}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function Jt(r,e){let t=r.rootNodes;if(t.length===1&&t[0].nodeType===e.ELEMENT_NODE)return t[0];let i=e.createElement("div");return t.forEach(s=>i.appendChild(s)),i}function lt(r,e,t){for(let i in e)if(e.hasOwnProperty(i)){let s=e[i];s?r.setProperty(i,s,t?.has(i)?"important":""):r.removeProperty(i)}return r}function S(r,e){let t=e?"":"none";lt(r.style,{"touch-action":e?"":"none","-webkit-user-drag":e?"":"none","-webkit-tap-highlight-color":e?"":"transparent","user-select":t,"-ms-user-select":t,"-webkit-user-select":t,"-moz-user-select":t})}function Gt(r,e,t){lt(r.style,{position:e?"":"fixed",top:e?"":"0",opacity:e?"":"0",left:e?"":"-999em"},t)}function A(r,e){return e&&e!="none"?r+" "+e:r}function Ut(r,e){r.style.width=`${e.width}px`,r.style.height=`${e.height}px`,r.style.transform=k(e.left,e.top)}function k(r,e){return`translate3d(${Math.round(r)}px, ${Math.round(e)}px, 0)`}function Wt(r){let e=r.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(r)*e}function de(r){let e=getComputedStyle(r),t=X(e,"transition-property"),i=t.find(a=>a==="transform"||a==="all");if(!i)return 0;let s=t.indexOf(i),n=X(e,"transition-duration"),o=X(e,"transition-delay");return Wt(n[s])+Wt(o[s])}function X(r,e){return r.getPropertyValue(e).split(",").map(i=>i.trim())}var _e=new Set(["position"]),et=class{_document;_rootElement;_direction;_initialDomRect;_previewTemplate;_previewClass;_pickupPositionOnPage;_initialTransform;_zIndex;_renderer;_previewEmbeddedView;_preview;get element(){return this._preview}constructor(e,t,i,s,n,o,a,l,h,d){this._document=e,this._rootElement=t,this._direction=i,this._initialDomRect=s,this._previewTemplate=n,this._previewClass=o,this._pickupPositionOnPage=a,this._initialTransform=l,this._zIndex=h,this._renderer=d}attach(e){this._preview=this._createPreview(),e.appendChild(this._preview),Zt(this._preview)&&this._preview.showPopover()}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null}setTransform(e){this._preview.style.transform=e}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(e){this._preview.classList.add(e)}getTransitionDuration(){return de(this._preview)}addEventListener(e,t){return this._renderer.listen(this._preview,e,t)}_createPreview(){let e=this._previewTemplate,t=this._previewClass,i=e?e.template:null,s;if(i&&e){let n=e.matchSize?this._initialDomRect:null,o=e.viewContainer.createEmbeddedView(i,e.context);o.detectChanges(),s=Jt(o,this._document),this._previewEmbeddedView=o,e.matchSize?Ut(s,n):s.style.transform=k(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else s=Q(this._rootElement),Ut(s,this._initialDomRect),this._initialTransform&&(s.style.transform=this._initialTransform);return lt(s.style,{"pointer-events":"none",margin:Zt(s)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},_e),S(s,!1),s.classList.add("cdk-drag-preview"),s.setAttribute("popover","manual"),s.setAttribute("dir",this._direction),t&&(Array.isArray(t)?t.forEach(n=>s.classList.add(n)):s.classList.add(t)),s}};function Zt(r){return"showPopover"in r}var pe={passive:!0},jt={passive:!1},ge={passive:!1,capture:!0},ue=800,qt="cdk-drag-placeholder",$t=new Set(["position"]),it=class{_config;_document;_ngZone;_viewportRuler;_dragDropRegistry;_renderer;_rootElementCleanups;_cleanupShadowRootSelectStart;_preview;_previewContainer;_placeholderRef;_placeholder;_pickupPositionInElement;_pickupPositionOnPage;_marker;_anchor=null;_passiveTransform={x:0,y:0};_activeTransform={x:0,y:0};_initialTransform;_hasStartedDragging=W(!1);_hasMoved;_initialContainer;_initialIndex;_parentPositions;_moveEvents=new _;_pointerDirectionDelta;_pointerPositionAtLastDirectionChange;_lastKnownPointerPosition;_rootElement;_ownerSVGElement;_rootElementTapHighlight;_pointerMoveSubscription=P.EMPTY;_pointerUpSubscription=P.EMPTY;_scrollSubscription=P.EMPTY;_resizeSubscription=P.EMPTY;_lastTouchEventTime;_dragStartTime;_boundaryElement=null;_nativeInteractionsEnabled=!0;_initialDomRect;_previewRect;_boundaryRect;_previewTemplate;_placeholderTemplate;_handles=[];_disabledHandles=new Set;_dropContainer;_direction="ltr";_parentDragRef;_cachedShadowRoot;lockAxis=null;dragStartDelay=0;previewClass;scale=1;get disabled(){return this._disabled||!!(this._dropContainer&&this._dropContainer.disabled)}set disabled(e){e!==this._disabled&&(this._disabled=e,this._toggleNativeDragInteractions(),this._handles.forEach(t=>S(t,e)))}_disabled=!1;beforeStarted=new _;started=new _;released=new _;ended=new _;entered=new _;exited=new _;dropped=new _;moved=this._moveEvents;data;constrainPosition;constructor(e,t,i,s,n,o,a){this._config=t,this._document=i,this._ngZone=s,this._viewportRuler=n,this._dragDropRegistry=o,this._renderer=a,this.withRootElement(e).withParent(t.parentDragRef||null),this._parentPositions=new M(i),o.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(e){this._handles=e.map(i=>D(i)),this._handles.forEach(i=>S(i,this.disabled)),this._toggleNativeDragInteractions();let t=new Set;return this._disabledHandles.forEach(i=>{this._handles.indexOf(i)>-1&&t.add(i)}),this._disabledHandles=t,this}withPreviewTemplate(e){return this._previewTemplate=e,this}withPlaceholderTemplate(e){return this._placeholderTemplate=e,this}withRootElement(e){let t=D(e);if(t!==this._rootElement){this._removeRootElementListeners();let i=this._renderer;this._rootElementCleanups=this._ngZone.runOutsideAngular(()=>[i.listen(t,"mousedown",this._pointerDown,jt),i.listen(t,"touchstart",this._pointerDown,pe),i.listen(t,"dragstart",this._nativeDragStart,jt)]),this._initialTransform=void 0,this._rootElement=t}return typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(e){return this._boundaryElement=e?D(e):null,this._resizeSubscription.unsubscribe(),e&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(e){return this._parentDragRef=e,this}dispose(){this._removeRootElementListeners(),this.isDragging()&&this._rootElement?.remove(),this._marker?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeListeners(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._marker=this._parentDragRef=null}isDragging(){return this._hasStartedDragging()&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}resetToBoundary(){if(this._boundaryElement&&this._rootElement&&ce(this._boundaryElement.getBoundingClientRect(),this._rootElement.getBoundingClientRect())){let e=this._boundaryElement.getBoundingClientRect(),t=this._rootElement.getBoundingClientRect(),i=0,s=0;t.left<e.left?i=e.left-t.left:t.right>e.right&&(i=e.right-t.right),t.top<e.top?s=e.top-t.top:t.bottom>e.bottom&&(s=e.bottom-t.bottom);let n=this._activeTransform.x,o=this._activeTransform.y,a=n+i,l=o+s;this._rootElement.style.transform=k(a,l),this._activeTransform={x:a,y:l},this._passiveTransform={x:a,y:l}}}disableHandle(e){!this._disabledHandles.has(e)&&this._handles.indexOf(e)>-1&&(this._disabledHandles.add(e),S(e,!0))}enableHandle(e){this._disabledHandles.has(e)&&(this._disabledHandles.delete(e),S(e,this.disabled))}withDirection(e){return this._direction=e,this}_withDropContainer(e){this._dropContainer=e}getFreeDragPosition(){let e=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:e.x,y:e.y}}setFreeDragPosition(e){return this._activeTransform={x:0,y:0},this._passiveTransform.x=e.x,this._passiveTransform.y=e.y,this._dropContainer||this._applyRootElementTransform(e.x,e.y),this}withPreviewContainer(e){return this._previewContainer=e,this}_sortFromLastPointerPosition(){let e=this._lastKnownPointerPosition;e&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(e),e)}_removeListeners(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe(),this._cleanupShadowRootSelectStart?.(),this._cleanupShadowRootSelectStart=void 0}_destroyPreview(){this._preview?.destroy(),this._preview=null}_destroyPlaceholder(){this._anchor?.remove(),this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._anchor=this._placeholderRef=null}_pointerDown=e=>{if(this.beforeStarted.next(),this._handles.length){let t=this._getTargetHandle(e);t&&!this._disabledHandles.has(t)&&!this.disabled&&this._initializeDragSequence(t,e)}else this.disabled||this._initializeDragSequence(this._rootElement,e)};_pointerMove=e=>{let t=this._getPointerPositionOnPage(e);if(!this._hasStartedDragging()){let s=Math.abs(t.x-this._pickupPositionOnPage.x),n=Math.abs(t.y-this._pickupPositionOnPage.y);if(s+n>=this._config.dragStartThreshold){let a=Date.now()>=this._dragStartTime+this._getDragStartDelay(e),l=this._dropContainer;if(!a){this._endDragSequence(e);return}(!l||!l.isDragging()&&!l.isReceiving())&&(e.cancelable&&e.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(e)))}return}e.cancelable&&e.preventDefault();let i=this._getConstrainedPointerPosition(t);if(this._hasMoved=!0,this._lastKnownPointerPosition=t,this._updatePointerDirectionDelta(i),this._dropContainer)this._updateActiveDropContainer(i,t);else{let s=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,n=this._activeTransform;n.x=i.x-s.x+this._passiveTransform.x,n.y=i.y-s.y+this._passiveTransform.y,this._applyRootElementTransform(n.x,n.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:i,event:e,distance:this._getDragDistance(i),delta:this._pointerDirectionDelta})})};_pointerUp=e=>{this._endDragSequence(e)};_endDragSequence(e){if(this._dragDropRegistry.isDragging(this)&&(this._removeListeners(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),!!this._hasStartedDragging()))if(this.released.next({source:this,event:e}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(e),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;let t=this._getPointerPositionOnPage(e);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(t),dropPoint:t,event:e})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(e){x(e)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let t=this._getShadowRoot(),i=this._dropContainer;if(t&&this._ngZone.runOutsideAngular(()=>{this._cleanupShadowRootSelectStart=this._renderer.listen(t,"selectstart",fe,ge)}),i){let s=this._rootElement,n=s.parentNode,o=this._placeholder=this._createPlaceholderElement(),a=this._marker=this._marker||this._document.createComment("");n.insertBefore(a,s),this._initialTransform=s.style.transform||"",this._preview=new et(this._document,this._rootElement,this._direction,this._initialDomRect,this._previewTemplate||null,this.previewClass||null,this._pickupPositionOnPage,this._initialTransform,this._config.zIndex||1e3,this._renderer),this._preview.attach(this._getPreviewInsertionPoint(n,t)),Gt(s,!1,$t),this._document.body.appendChild(n.replaceChild(o,s)),this.started.next({source:this,event:e}),i.start(),this._initialContainer=i,this._initialIndex=i.getItemIndex(this)}else this.started.next({source:this,event:e}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(i?i.getScrollableParents():[])}_initializeDragSequence(e,t){this._parentDragRef&&t.stopPropagation();let i=this.isDragging(),s=x(t),n=!s&&t.button!==0,o=this._rootElement,a=I(t),l=!s&&this._lastTouchEventTime&&this._lastTouchEventTime+ue>Date.now(),h=s?Ot(t):kt(t);if(a&&a.draggable&&t.type==="mousedown"&&t.preventDefault(),i||n||l||h)return;if(this._handles.length){let v=o.style;this._rootElementTapHighlight=v.webkitTapHighlightColor||"",v.webkitTapHighlightColor="transparent"}this._hasMoved=!1,this._hasStartedDragging.set(this._hasMoved),this._removeListeners(),this._initialDomRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(v=>this._updateOnScroll(v)),this._boundaryElement&&(this._boundaryRect=at(this._boundaryElement));let d=this._previewTemplate;this._pickupPositionInElement=d&&d.template&&!d.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,e,t);let g=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(t);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:g.x,y:g.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,t)}_cleanupDragArtifacts(e){Gt(this._rootElement,!0,$t),this._marker.parentNode.replaceChild(this._rootElement,this._marker),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{let t=this._dropContainer,i=t.getItemIndex(this),s=this._getPointerPositionOnPage(e),n=this._getDragDistance(s),o=t._isOverContainer(s.x,s.y);this.ended.next({source:this,distance:n,dropPoint:s,event:e}),this.dropped.next({item:this,currentIndex:i,previousIndex:this._initialIndex,container:t,previousContainer:this._initialContainer,isPointerOverContainer:o,distance:n,dropPoint:s,event:e}),t.drop(this,i,this._initialIndex,this._initialContainer,o,n,s,e),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:e,y:t},{x:i,y:s}){let n=this._initialContainer._getSiblingContainerFromPosition(this,e,t);!n&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(e,t)&&(n=this._initialContainer),n&&n!==this._dropContainer&&this._ngZone.run(()=>{let o=this._dropContainer.getItemIndex(this),a=this._dropContainer.getItemAtIndex(o+1)?.getVisibleElement()||null;this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._conditionallyInsertAnchor(n,this._dropContainer,a),this._dropContainer=n,this._dropContainer.enter(this,e,t,n===this._initialContainer&&n.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:n,currentIndex:n.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(i,s),this._dropContainer._sortItem(this,e,t,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(e,t):this._applyPreviewTransform(e-this._pickupPositionInElement.x,t-this._pickupPositionInElement.y))}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let e=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(e.left,e.top);let t=this._preview.getTransitionDuration();return t===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(i=>{let s=a=>{(!a||this._preview&&I(a)===this._preview.element&&a.propertyName==="transform")&&(o(),i(),clearTimeout(n))},n=setTimeout(s,t*1.5),o=this._preview.addEventListener("transitionend",s)}))}_createPlaceholderElement(){let e=this._placeholderTemplate,t=e?e.template:null,i;return t?(this._placeholderRef=e.viewContainer.createEmbeddedView(t,e.context),this._placeholderRef.detectChanges(),i=Jt(this._placeholderRef,this._document)):i=Q(this._rootElement),i.style.pointerEvents="none",i.classList.add(qt),i}_getPointerPositionInElement(e,t,i){let s=t===this._rootElement?null:t,n=s?s.getBoundingClientRect():e,o=x(i)?i.targetTouches[0]:i,a=this._getViewportScrollPosition(),l=o.pageX-n.left-a.left,h=o.pageY-n.top-a.top;return{x:n.left-e.left+l,y:n.top-e.top+h}}_getPointerPositionOnPage(e){let t=this._getViewportScrollPosition(),i=x(e)?e.touches[0]||e.changedTouches[0]||{pageX:0,pageY:0}:e,s=i.pageX-t.left,n=i.pageY-t.top;if(this._ownerSVGElement){let o=this._ownerSVGElement.getScreenCTM();if(o){let a=this._ownerSVGElement.createSVGPoint();return a.x=s,a.y=n,a.matrixTransform(o.inverse())}}return{x:s,y:n}}_getConstrainedPointerPosition(e){let t=this._dropContainer?this._dropContainer.lockAxis:null,{x:i,y:s}=this.constrainPosition?this.constrainPosition(e,this,this._initialDomRect,this._pickupPositionInElement):e;if(this.lockAxis==="x"||t==="x"?s=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):(this.lockAxis==="y"||t==="y")&&(i=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){let{x:n,y:o}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,a=this._boundaryRect,{width:l,height:h}=this._getPreviewRect(),d=a.top+o,g=a.bottom-(h-o),v=a.left+n,H=a.right-(l-n);i=Kt(i,v,H),s=Kt(s,d,g)}return{x:i,y:s}}_updatePointerDirectionDelta(e){let{x:t,y:i}=e,s=this._pointerDirectionDelta,n=this._pointerPositionAtLastDirectionChange,o=Math.abs(t-n.x),a=Math.abs(i-n.y);return o>this._config.pointerDirectionChangeThreshold&&(s.x=t>n.x?1:-1,n.x=t),a>this._config.pointerDirectionChangeThreshold&&(s.y=i>n.y?1:-1,n.y=i),s}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let e=this._handles.length>0||!this.isDragging();e!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=e,S(this._rootElement,e))}_removeRootElementListeners(){this._rootElementCleanups?.forEach(e=>e()),this._rootElementCleanups=void 0}_applyRootElementTransform(e,t){let i=1/this.scale,s=k(e*i,t*i),n=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=n.transform&&n.transform!="none"?n.transform:""),n.transform=A(s,this._initialTransform)}_applyPreviewTransform(e,t){let i=this._previewTemplate?.template?void 0:this._initialTransform,s=k(e,t);this._preview.setTransform(A(s,i))}_getDragDistance(e){let t=this._pickupPositionOnPage;return t?{x:e.x-t.x,y:e.y-t.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:e,y:t}=this._passiveTransform;if(e===0&&t===0||this.isDragging()||!this._boundaryElement)return;let i=this._rootElement.getBoundingClientRect(),s=this._boundaryElement.getBoundingClientRect();if(s.width===0&&s.height===0||i.width===0&&i.height===0)return;let n=s.left-i.left,o=i.right-s.right,a=s.top-i.top,l=i.bottom-s.bottom;s.width>i.width?(n>0&&(e+=n),o>0&&(e-=o)):e=0,s.height>i.height?(a>0&&(t+=a),l>0&&(t-=l)):t=0,(e!==this._passiveTransform.x||t!==this._passiveTransform.y)&&this.setFreeDragPosition({y:t,x:e})}_getDragStartDelay(e){let t=this.dragStartDelay;return typeof t=="number"?t:x(e)?t.touch:t?t.mouse:0}_updateOnScroll(e){let t=this._parentPositions.handleScroll(e);if(t){let i=I(e);this._boundaryRect&&i!==this._boundaryElement&&i.contains(this._boundaryElement)&&T(this._boundaryRect,t.top,t.left),this._pickupPositionOnPage.x+=t.left,this._pickupPositionOnPage.y+=t.top,this._dropContainer||(this._activeTransform.x-=t.left,this._activeTransform.y-=t.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return this._cachedShadowRoot===void 0&&(this._cachedShadowRoot=N(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(e,t){let i=this._previewContainer||"global";if(i==="parent")return e;if(i==="global"){let s=this._document;return t||s.fullscreenElement||s.webkitFullscreenElement||s.mozFullScreenElement||s.msFullscreenElement||s.body}return D(i)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_nativeDragStart=e=>{if(this._handles.length){let t=this._getTargetHandle(e);t&&!this._disabledHandles.has(t)&&!this.disabled&&e.preventDefault()}else this.disabled||e.preventDefault()};_getTargetHandle(e){return this._handles.find(t=>e.target&&(e.target===t||t.contains(e.target)))}_conditionallyInsertAnchor(e,t,i){if(e===this._initialContainer)this._anchor?.remove(),this._anchor=null;else if(t===this._initialContainer&&t.hasAnchor){let s=this._anchor??=Q(this._placeholder);s.classList.remove(qt),s.classList.add("cdk-drag-anchor"),s.style.transform="",i?i.before(s):D(t.element).appendChild(s)}}};function Kt(r,e,t){return Math.max(e,Math.min(t,r))}function x(r){return r.type[0]==="t"}function fe(r){r.preventDefault()}function Qt(r,e,t){let i=Yt(e,r.length-1),s=Yt(t,r.length-1);if(i===s)return;let n=r[i],o=s<i?-1:1;for(let a=i;a!==s;a+=o)r[a]=r[a+o];r[s]=n}function Yt(r,e){return Math.max(0,Math.min(e,r))}var F=class{_dragDropRegistry;_element;_sortPredicate;_itemPositions=[];_activeDraggables;orientation="vertical";direction;constructor(e){this._dragDropRegistry=e}_previousSwap={drag:null,delta:0,overlaps:!1};start(e){this.withItems(e)}sort(e,t,i,s){let n=this._itemPositions,o=this._getItemIndexFromPointerPosition(e,t,i,s);if(o===-1&&n.length>0)return null;let a=this.orientation==="horizontal",l=n.findIndex(u=>u.drag===e),h=n[o],d=n[l].clientRect,g=h.clientRect,v=l>o?1:-1,H=this._getItemOffsetPx(d,g,v),oe=this._getSiblingOffsetPx(l,n,v),ae=n.slice();return Qt(n,l,o),n.forEach((u,le)=>{if(ae[le]===u)return;let ct=u.drag===e,z=ct?H:oe,dt=ct?e.getPlaceholderElement():u.drag.getRootElement();u.offset+=z;let _t=Math.round(u.offset*(1/u.drag.scale));a?(dt.style.transform=A(`translate3d(${_t}px, 0, 0)`,u.initialTransform),T(u.clientRect,0,z)):(dt.style.transform=A(`translate3d(0, ${_t}px, 0)`,u.initialTransform),T(u.clientRect,z,0))}),this._previousSwap.overlaps=tt(g,t,i),this._previousSwap.drag=h.drag,this._previousSwap.delta=a?s.x:s.y,{previousIndex:l,currentIndex:o}}enter(e,t,i,s){let n=s==null||s<0?this._getItemIndexFromPointerPosition(e,t,i):s,o=this._activeDraggables,a=o.indexOf(e),l=e.getPlaceholderElement(),h=o[n];if(h===e&&(h=o[n+1]),!h&&(n==null||n===-1||n<o.length-1)&&this._shouldEnterAsFirstChild(t,i)&&(h=o[0]),a>-1&&o.splice(a,1),h&&!this._dragDropRegistry.isDragging(h)){let d=h.getRootElement();d.parentElement.insertBefore(l,d),o.splice(n,0,e)}else this._element.appendChild(l),o.push(e);l.style.transform="",this._cacheItemPositions()}withItems(e){this._activeDraggables=e.slice(),this._cacheItemPositions()}withSortPredicate(e){this._sortPredicate=e}reset(){this._activeDraggables?.forEach(e=>{let t=e.getRootElement();if(t){let i=this._itemPositions.find(s=>s.drag===e)?.initialTransform;t.style.transform=i||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(e){return this._getVisualItemPositions().findIndex(t=>t.drag===e)}getItemAtIndex(e){return this._getVisualItemPositions()[e]?.drag||null}updateOnScroll(e,t){this._itemPositions.forEach(({clientRect:i})=>{T(i,e,t)}),this._itemPositions.forEach(({drag:i})=>{this._dragDropRegistry.isDragging(i)&&i._sortFromLastPointerPosition()})}withElementContainer(e){this._element=e}_cacheItemPositions(){let e=this.orientation==="horizontal";this._itemPositions=this._activeDraggables.map(t=>{let i=t.getVisibleElement();return{drag:t,offset:0,initialTransform:i.style.transform||"",clientRect:at(i)}}).sort((t,i)=>e?t.clientRect.left-i.clientRect.left:t.clientRect.top-i.clientRect.top)}_getVisualItemPositions(){return this.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions}_getItemOffsetPx(e,t,i){let s=this.orientation==="horizontal",n=s?t.left-e.left:t.top-e.top;return i===-1&&(n+=s?t.width-e.width:t.height-e.height),n}_getSiblingOffsetPx(e,t,i){let s=this.orientation==="horizontal",n=t[e].clientRect,o=t[e+i*-1],a=n[s?"width":"height"]*i;if(o){let l=s?"left":"top",h=s?"right":"bottom";i===-1?a-=o.clientRect[l]-n[h]:a+=n[l]-o.clientRect[h]}return a}_shouldEnterAsFirstChild(e,t){if(!this._activeDraggables.length)return!1;let i=this._itemPositions,s=this.orientation==="horizontal";if(i[0].drag!==this._activeDraggables[0]){let o=i[i.length-1].clientRect;return s?e>=o.right:t>=o.bottom}else{let o=i[0].clientRect;return s?e<=o.left:t<=o.top}}_getItemIndexFromPointerPosition(e,t,i,s){let n=this.orientation==="horizontal",o=this._itemPositions.findIndex(({drag:a,clientRect:l})=>{if(a===e)return!1;if(s){let h=n?s.x:s.y;if(a===this._previousSwap.drag&&this._previousSwap.overlaps&&h===this._previousSwap.delta)return!1}return n?t>=Math.floor(l.left)&&t<Math.floor(l.right):i>=Math.floor(l.top)&&i<Math.floor(l.bottom)});return o===-1||!this._sortPredicate(o,e)?-1:o}},st=class{_document;_dragDropRegistry;_element;_sortPredicate;_rootNode;_activeItems;_previousSwap={drag:null,deltaX:0,deltaY:0,overlaps:!1};_relatedNodes=[];constructor(e,t){this._document=e,this._dragDropRegistry=t}start(e){let t=this._element.childNodes;this._relatedNodes=[];for(let i=0;i<t.length;i++){let s=t[i];this._relatedNodes.push([s,s.nextSibling])}this.withItems(e)}sort(e,t,i,s){let n=this._getItemIndexFromPointerPosition(e,t,i),o=this._previousSwap;if(n===-1||this._activeItems[n]===e)return null;let a=this._activeItems[n];if(o.drag===a&&o.overlaps&&o.deltaX===s.x&&o.deltaY===s.y)return null;let l=this.getItemIndex(e),h=e.getPlaceholderElement(),d=a.getRootElement();n>l?d.after(h):d.before(h),Qt(this._activeItems,l,n);let g=this._getRootNode().elementFromPoint(t,i);return o.deltaX=s.x,o.deltaY=s.y,o.drag=a,o.overlaps=d===g||d.contains(g),{previousIndex:l,currentIndex:n}}enter(e,t,i,s){let n=this._activeItems.indexOf(e);n>-1&&this._activeItems.splice(n,1);let o=s==null||s<0?this._getItemIndexFromPointerPosition(e,t,i):s;o===-1&&(o=this._getClosestItemIndexToPointer(e,t,i));let a=this._activeItems[o];a&&!this._dragDropRegistry.isDragging(a)?(this._activeItems.splice(o,0,e),a.getRootElement().before(e.getPlaceholderElement())):(this._activeItems.push(e),this._element.appendChild(e.getPlaceholderElement()))}withItems(e){this._activeItems=e.slice()}withSortPredicate(e){this._sortPredicate=e}reset(){let e=this._element,t=this._previousSwap;for(let i=this._relatedNodes.length-1;i>-1;i--){let[s,n]=this._relatedNodes[i];s.parentNode===e&&s.nextSibling!==n&&(n===null?e.appendChild(s):n.parentNode===e&&e.insertBefore(s,n))}this._relatedNodes=[],this._activeItems=[],t.drag=null,t.deltaX=t.deltaY=0,t.overlaps=!1}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(e){return this._activeItems.indexOf(e)}getItemAtIndex(e){return this._activeItems[e]||null}updateOnScroll(){this._activeItems.forEach(e=>{this._dragDropRegistry.isDragging(e)&&e._sortFromLastPointerPosition()})}withElementContainer(e){e!==this._element&&(this._element=e,this._rootNode=void 0)}_getItemIndexFromPointerPosition(e,t,i){let s=this._getRootNode().elementFromPoint(Math.floor(t),Math.floor(i)),n=s?this._activeItems.findIndex(o=>{let a=o.getRootElement();return s===a||a.contains(s)}):-1;return n===-1||!this._sortPredicate(n,e)?-1:n}_getRootNode(){return this._rootNode||(this._rootNode=N(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(e,t,i){if(this._activeItems.length===0)return-1;if(this._activeItems.length===1)return 0;let s=1/0,n=-1;for(let o=0;o<this._activeItems.length;o++){let a=this._activeItems[o];if(a!==e){let{x:l,y:h}=a.getRootElement().getBoundingClientRect(),d=Math.hypot(t-l,i-h);d<s&&(s=d,n=o)}}return n}},Xt=.05,te=.05,f=(function(r){return r[r.NONE=0]="NONE",r[r.UP=1]="UP",r[r.DOWN=2]="DOWN",r})(f||{}),p=(function(r){return r[r.NONE=0]="NONE",r[r.LEFT=1]="LEFT",r[r.RIGHT=2]="RIGHT",r})(p||{}),nt=class{_dragDropRegistry;_ngZone;_viewportRuler;element;disabled=!1;sortingDisabled=!1;lockAxis=null;autoScrollDisabled=!1;autoScrollStep=2;hasAnchor=!1;enterPredicate=()=>!0;sortPredicate=()=>!0;beforeStarted=new _;entered=new _;exited=new _;dropped=new _;sorted=new _;receivingStarted=new _;receivingStopped=new _;data;_container;_isDragging=!1;_parentPositions;_sortStrategy;_domRect;_draggables=[];_siblings=[];_activeSiblings=new Set;_viewportScrollSubscription=P.EMPTY;_verticalScrollDirection=f.NONE;_horizontalScrollDirection=p.NONE;_scrollNode;_stopScrollTimers=new _;_cachedShadowRoot=null;_document;_scrollableElements=[];_initialScrollSnap;_direction="ltr";constructor(e,t,i,s,n){this._dragDropRegistry=t,this._ngZone=s,this._viewportRuler=n;let o=this.element=D(e);this._document=i,this.withOrientation("vertical").withElementContainer(o),t.registerDropContainer(this),this._parentPositions=new M(i)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(e,t,i,s){this._draggingStarted(),s==null&&this.sortingDisabled&&(s=this._draggables.indexOf(e)),this._sortStrategy.enter(e,t,i,s),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:e,container:this,currentIndex:this.getItemIndex(e)})}exit(e){this._reset(),this.exited.next({item:e,container:this})}drop(e,t,i,s,n,o,a,l={}){this._reset(),this.dropped.next({item:e,currentIndex:t,previousIndex:i,container:this,previousContainer:s,isPointerOverContainer:n,distance:o,dropPoint:a,event:l})}withItems(e){let t=this._draggables;return this._draggables=e,e.forEach(i=>i._withDropContainer(this)),this.isDragging()&&(t.filter(s=>s.isDragging()).every(s=>e.indexOf(s)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(e){return this._direction=e,this._sortStrategy instanceof F&&(this._sortStrategy.direction=e),this}connectedTo(e){return this._siblings=e.slice(),this}withOrientation(e){if(e==="mixed")this._sortStrategy=new st(this._document,this._dragDropRegistry);else{let t=new F(this._dragDropRegistry);t.direction=this._direction,t.orientation=e,this._sortStrategy=t}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((t,i)=>this.sortPredicate(t,i,this)),this}withScrollableParents(e){let t=this._container;return this._scrollableElements=e.indexOf(t)===-1?[t,...e]:e.slice(),this}withElementContainer(e){if(e===this._container)return this;let t=D(this.element),i=this._scrollableElements.indexOf(this._container),s=this._scrollableElements.indexOf(e);return i>-1&&this._scrollableElements.splice(i,1),s>-1&&this._scrollableElements.splice(s,1),this._sortStrategy&&this._sortStrategy.withElementContainer(e),this._cachedShadowRoot=null,this._scrollableElements.unshift(e),this._container=e,this}getScrollableParents(){return this._scrollableElements}getItemIndex(e){return this._isDragging?this._sortStrategy.getItemIndex(e):this._draggables.indexOf(e)}getItemAtIndex(e){return this._isDragging?this._sortStrategy.getItemAtIndex(e):this._draggables[e]||null}isReceiving(){return this._activeSiblings.size>0}_sortItem(e,t,i,s){if(this.sortingDisabled||!this._domRect||!Bt(this._domRect,Xt,t,i))return;let n=this._sortStrategy.sort(e,t,i,s);n&&this.sorted.next({previousIndex:n.previousIndex,currentIndex:n.currentIndex,container:this,item:e})}_startScrollingIfNecessary(e,t){if(this.autoScrollDisabled)return;let i,s=f.NONE,n=p.NONE;if(this._parentPositions.positions.forEach((o,a)=>{a===this._document||!o.clientRect||i||Bt(o.clientRect,Xt,e,t)&&([s,n]=me(a,o.clientRect,this._direction,e,t),(s||n)&&(i=a))}),!s&&!n){let{width:o,height:a}=this._viewportRuler.getViewportSize(),l={width:o,height:a,top:0,right:o,bottom:a,left:0};s=ee(l,t),n=ie(l,e),i=window}i&&(s!==this._verticalScrollDirection||n!==this._horizontalScrollDirection||i!==this._scrollNode)&&(this._verticalScrollDirection=s,this._horizontalScrollDirection=n,this._scrollNode=i,(s||n)&&i?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){let e=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=e.msScrollSnapType||e.scrollSnapType||"",e.scrollSnapType=e.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(this._container).clientRect}_reset(){this._isDragging=!1;let e=this._container.style;e.scrollSnapType=e.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(t=>t._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_startScrollInterval=()=>{this._stopScrolling(),ft(0,gt).pipe(y(this._stopScrollTimers)).subscribe(()=>{let e=this._scrollNode,t=this.autoScrollStep;this._verticalScrollDirection===f.UP?e.scrollBy(0,-t):this._verticalScrollDirection===f.DOWN&&e.scrollBy(0,t),this._horizontalScrollDirection===p.LEFT?e.scrollBy(-t,0):this._horizontalScrollDirection===p.RIGHT&&e.scrollBy(t,0)})};_isOverContainer(e,t){return this._domRect!=null&&tt(this._domRect,e,t)}_getSiblingContainerFromPosition(e,t,i){return this._siblings.find(s=>s._canReceive(e,t,i))}_canReceive(e,t,i){if(!this._domRect||!tt(this._domRect,t,i)||!this.enterPredicate(e,this))return!1;let s=this._getShadowRoot().elementFromPoint(t,i);return s?s===this._container||this._container.contains(s):!1}_startReceiving(e,t){let i=this._activeSiblings;!i.has(e)&&t.every(s=>this.enterPredicate(s,this)||this._draggables.indexOf(s)>-1)&&(i.add(e),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:e,receiver:this,items:t}))}_stopReceiving(e){this._activeSiblings.delete(e),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:e,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(e=>{if(this.isDragging()){let t=this._parentPositions.handleScroll(e);t&&this._sortStrategy.updateOnScroll(t.top,t.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){let e=N(this._container);this._cachedShadowRoot=e||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){let e=this._sortStrategy.getActiveItemsSnapshot().filter(t=>t.isDragging());this._siblings.forEach(t=>t._startReceiving(this,e))}};function ee(r,e){let{top:t,bottom:i,height:s}=r,n=s*te;return e>=t-n&&e<=t+n?f.UP:e>=i-n&&e<=i+n?f.DOWN:f.NONE}function ie(r,e){let{left:t,right:i,width:s}=r,n=s*te;return e>=t-n&&e<=t+n?p.LEFT:e>=i-n&&e<=i+n?p.RIGHT:p.NONE}function me(r,e,t,i,s){let n=ee(e,s),o=ie(e,i),a=f.NONE,l=p.NONE;if(n){let h=r.scrollTop;n===f.UP?h>0&&(a=f.UP):r.scrollHeight-h>r.clientHeight&&(a=f.DOWN)}if(o){let h=r.scrollLeft;t==="rtl"?o===p.RIGHT?h<0&&(l=p.RIGHT):r.scrollWidth+h>r.clientWidth&&(l=p.LEFT):o===p.LEFT?h>0&&(l=p.LEFT):r.scrollWidth-h>r.clientWidth&&(l=p.RIGHT)}return[a,l]}var C={capture:!0},J={passive:!1,capture:!0},ve=(()=>{class r{static \u0275fac=function(i){return new(i||r)};static \u0275cmp=Et({type:r,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],decls:0,vars:0,template:function(i,s){},styles:[`@layer cdk-resets{.cdk-drag-preview{background:none;border:none;padding:0;color:inherit;inset:auto}}.cdk-drag-placeholder *,.cdk-drag-preview *{pointer-events:none !important}
2
2
  `],encapsulation:2,changeDetection:0})}return r})(),se=(()=>{class r{_ngZone=c(L);_document=c(U);_styleLoader=c(Lt);_renderer=c(j).createRenderer(null,null);_cleanupDocumentTouchmove;_scroll=new _;_dropInstances=new Set;_dragInstances=new Set;_activeDragInstances=W([]);_globalListeners;_draggingPredicate=t=>t.isDragging();_domNodesToDirectives=null;pointerMove=new _;pointerUp=new _;constructor(){}registerDropContainer(t){this._dropInstances.has(t)||this._dropInstances.add(t)}registerDragItem(t){this._dragInstances.add(t),this._dragInstances.size===1&&this._ngZone.runOutsideAngular(()=>{this._cleanupDocumentTouchmove?.(),this._cleanupDocumentTouchmove=this._renderer.listen(this._document,"touchmove",this._persistentTouchmoveListener,J)})}removeDropContainer(t){this._dropInstances.delete(t)}removeDragItem(t){this._dragInstances.delete(t),this.stopDragging(t),this._dragInstances.size===0&&this._cleanupDocumentTouchmove?.()}startDragging(t,i){if(!(this._activeDragInstances().indexOf(t)>-1)&&(this._styleLoader.load(ve),this._activeDragInstances.update(s=>[...s,t]),this._activeDragInstances().length===1)){let s=i.type.startsWith("touch"),n=a=>this.pointerUp.next(a),o=[["scroll",a=>this._scroll.next(a),C],["selectstart",this._preventDefaultWhileDragging,J]];s?o.push(["touchend",n,C],["touchcancel",n,C]):o.push(["mouseup",n,C]),s||o.push(["mousemove",a=>this.pointerMove.next(a),J]),this._ngZone.runOutsideAngular(()=>{this._globalListeners=o.map(([a,l,h])=>this._renderer.listen(this._document,a,l,h))})}}stopDragging(t){this._activeDragInstances.update(i=>{let s=i.indexOf(t);return s>-1?(i.splice(s,1),[...i]):i}),this._activeDragInstances().length===0&&this._clearGlobalListeners()}isDragging(t){return this._activeDragInstances().indexOf(t)>-1}scrolled(t){let i=[this._scroll];return t&&t!==this._document&&i.push(new V(s=>this._ngZone.runOutsideAngular(()=>{let n=this._renderer.listen(t,"scroll",o=>{this._activeDragInstances().length&&s.next(o)},C);return()=>{n()}}))),O(...i)}registerDirectiveNode(t,i){this._domNodesToDirectives??=new WeakMap,this._domNodesToDirectives.set(t,i)}removeDirectiveNode(t){this._domNodesToDirectives?.delete(t)}getDragDirectiveForNode(t){return this._domNodesToDirectives?.get(t)||null}ngOnDestroy(){this._dragInstances.forEach(t=>this.removeDragItem(t)),this._dropInstances.forEach(t=>this.removeDropContainer(t)),this._domNodesToDirectives=null,this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_preventDefaultWhileDragging=t=>{this._activeDragInstances().length>0&&t.preventDefault()};_persistentTouchmoveListener=t=>{this._activeDragInstances().length>0&&(this._activeDragInstances().some(this._draggingPredicate)&&t.preventDefault(),this.pointerMove.next(t))};_clearGlobalListeners(){this._globalListeners?.forEach(t=>t()),this._globalListeners=void 0}static \u0275fac=function(i){return new(i||r)};static \u0275prov=G({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})(),De={dragStartThreshold:5,pointerDirectionChangeThreshold:5},ht=(()=>{class r{_document=c(U);_ngZone=c(L);_viewportRuler=c(At);_dragDropRegistry=c(se);_renderer=c(j).createRenderer(null,null);constructor(){}createDrag(t,i=De){return new it(t,i,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry,this._renderer)}createDropList(t){return new nt(t,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}static \u0275fac=function(i){return new(i||r)};static \u0275prov=G({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})(),rt=new b("CDK_DRAG_PARENT");var we=new b("CdkDragHandle");var ne=new b("CDK_DRAG_CONFIG"),re=new b("CdkDropList"),Ge=(()=>{class r{element=c(Z);dropContainer=c(re,{optional:!0,skipSelf:!0});_ngZone=c(L);_viewContainerRef=c(Rt);_dir=c(Y,{optional:!0});_changeDetectorRef=c($);_selfHandle=c(we,{optional:!0,self:!0});_parentDrag=c(rt,{optional:!0,skipSelf:!0});_dragDropRegistry=c(se);_destroyed=new _;_handles=new pt([]);_previewTemplate;_placeholderTemplate;_dragRef;data;lockAxis=null;rootElementSelector;boundaryElement;dragStartDelay;freeDragPosition;get disabled(){return this._disabled||!!(this.dropContainer&&this.dropContainer.disabled)}set disabled(t){this._disabled=t,this._dragRef.disabled=this._disabled}_disabled;constrainPosition;previewClass;previewContainer;scale=1;started=new m;released=new m;ended=new m;entered=new m;exited=new m;dropped=new m;moved=new V(t=>{let i=this._dragRef.moved.pipe(ut(s=>({source:this,pointerPosition:s.pointerPosition,event:s.event,delta:s.delta,distance:s.distance}))).subscribe(t);return()=>{i.unsubscribe()}});_injector=c(bt);constructor(){let t=this.dropContainer,i=c(ne,{optional:!0}),s=c(ht);this._dragRef=s.createDrag(this.element,{dragStartThreshold:i&&i.dragStartThreshold!=null?i.dragStartThreshold:5,pointerDirectionChangeThreshold:i&&i.pointerDirectionChangeThreshold!=null?i.pointerDirectionChangeThreshold:5,zIndex:i?.zIndex}),this._dragRef.data=this,this._dragDropRegistry.registerDirectiveNode(this.element.nativeElement,this),i&&this._assignDefaults(i),t&&(t.addItem(this),t._dropListRef.beforeStarted.pipe(y(this._destroyed)).subscribe(()=>{this._dragRef.scale=this.scale})),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}resetToBoundary(){this._dragRef.resetToBoundary()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(t){this._dragRef.setFreeDragPosition(t)}ngAfterViewInit(){St(()=>{this._updateRootElement(),this._setupHandlesListener(),this._dragRef.scale=this.scale,this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)},{injector:this._injector})}ngOnChanges(t){let i=t.rootElementSelector,s=t.freeDragPosition;i&&!i.firstChange&&this._updateRootElement(),this._dragRef.scale=this.scale,s&&!s.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this),this._dragDropRegistry.removeDirectiveNode(this.element.nativeElement),this._ngZone.runOutsideAngular(()=>{this._handles.complete(),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_addHandle(t){let i=this._handles.getValue();i.push(t),this._handles.next(i)}_removeHandle(t){let i=this._handles.getValue(),s=i.indexOf(t);s>-1&&(i.splice(s,1),this._handles.next(i))}_setPreviewTemplate(t){this._previewTemplate=t}_resetPreviewTemplate(t){t===this._previewTemplate&&(this._previewTemplate=null)}_setPlaceholderTemplate(t){this._placeholderTemplate=t}_resetPlaceholderTemplate(t){t===this._placeholderTemplate&&(this._placeholderTemplate=null)}_updateRootElement(){let t=this.element.nativeElement,i=t;this.rootElementSelector&&(i=t.closest!==void 0?t.closest(this.rootElementSelector):t.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(i||t)}_getBoundaryElement(){let t=this.boundaryElement;return t?typeof t=="string"?this.element.nativeElement.closest(t):D(t):null}_syncInputs(t){t.beforeStarted.subscribe(()=>{if(!t.isDragging()){let i=this._dir,s=this.dragStartDelay,n=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,o=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;t.disabled=this.disabled,t.lockAxis=this.lockAxis,t.scale=this.scale,t.dragStartDelay=typeof s=="object"&&s?s:K(s),t.constrainPosition=this.constrainPosition,t.previewClass=this.previewClass,t.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(n).withPreviewTemplate(o).withPreviewContainer(this.previewContainer||"global"),i&&t.withDirection(i.value)}}),t.beforeStarted.pipe(mt(1)).subscribe(()=>{if(this._parentDrag){t.withParent(this._parentDrag._dragRef);return}let i=this.element.nativeElement.parentElement;for(;i;){let s=this._dragDropRegistry.getDragDirectiveForNode(i);if(s){t.withParent(s._dragRef);break}i=i.parentElement}})}_handleEvents(t){t.started.subscribe(i=>{this.started.emit({source:this,event:i.event}),this._changeDetectorRef.markForCheck()}),t.released.subscribe(i=>{this.released.emit({source:this,event:i.event})}),t.ended.subscribe(i=>{this.ended.emit({source:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event}),this._changeDetectorRef.markForCheck()}),t.entered.subscribe(i=>{this.entered.emit({container:i.container.data,item:this,currentIndex:i.currentIndex})}),t.exited.subscribe(i=>{this.exited.emit({container:i.container.data,item:this})}),t.dropped.subscribe(i=>{this.dropped.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,previousContainer:i.previousContainer.data,container:i.container.data,isPointerOverContainer:i.isPointerOverContainer,item:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event})})}_assignDefaults(t){let{lockAxis:i,dragStartDelay:s,constrainPosition:n,previewClass:o,boundaryElement:a,draggingDisabled:l,rootElementSelector:h,previewContainer:d}=t;this.disabled=l??!1,this.dragStartDelay=s||0,this.lockAxis=i||null,n&&(this.constrainPosition=n),o&&(this.previewClass=o),a&&(this.boundaryElement=a),h&&(this.rootElementSelector=h),d&&(this.previewContainer=d)}_setupHandlesListener(){this._handles.pipe(Dt(t=>{let i=t.map(s=>s.element);this._selfHandle&&this.rootElementSelector&&i.push(this.element),this._dragRef.withHandles(i)}),vt(t=>O(...t.map(i=>i._stateChanges.pipe(B(i))))),y(this._destroyed)).subscribe(t=>{let i=this._dragRef,s=t.element.nativeElement;t.disabled?i.disableHandle(s):i.enableHandle(s)})}static \u0275fac=function(i){return new(i||r)};static \u0275dir=R({type:r,selectors:[["","cdkDrag",""]],hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(i,s){i&2&&q("cdk-drag-disabled",s.disabled)("cdk-drag-dragging",s._dragRef.isDragging())},inputs:{data:[0,"cdkDragData","data"],lockAxis:[0,"cdkDragLockAxis","lockAxis"],rootElementSelector:[0,"cdkDragRootElement","rootElementSelector"],boundaryElement:[0,"cdkDragBoundary","boundaryElement"],dragStartDelay:[0,"cdkDragStartDelay","dragStartDelay"],freeDragPosition:[0,"cdkDragFreeDragPosition","freeDragPosition"],disabled:[2,"cdkDragDisabled","disabled",w],constrainPosition:[0,"cdkDragConstrainPosition","constrainPosition"],previewClass:[0,"cdkDragPreviewClass","previewClass"],previewContainer:[0,"cdkDragPreviewContainer","previewContainer"],scale:[2,"cdkDragScale","scale",Ct]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[E([{provide:rt,useExisting:r}]),Pt]})}return r})(),ot=new b("CdkDropListGroup"),Ue=(()=>{class r{_items=new Set;disabled=!1;ngOnDestroy(){this._items.clear()}static \u0275fac=function(i){return new(i||r)};static \u0275dir=R({type:r,selectors:[["","cdkDropListGroup",""]],inputs:{disabled:[2,"cdkDropListGroupDisabled","disabled",w]},exportAs:["cdkDropListGroup"],features:[E([{provide:ot,useExisting:r}])]})}return r})(),We=(()=>{class r{element=c(Z);_changeDetectorRef=c($);_scrollDispatcher=c(Mt);_dir=c(Y,{optional:!0});_group=c(ot,{optional:!0,skipSelf:!0});_latestSortedRefs;_destroyed=new _;_scrollableParentsResolved;static _dropLists=[];_dropListRef;connectedTo=[];data;orientation;id=c(Nt).getId("cdk-drop-list-");lockAxis=null;get disabled(){return this._disabled||!!this._group&&this._group.disabled}set disabled(t){this._dropListRef.disabled=this._disabled=t}_disabled;sortingDisabled;enterPredicate=()=>!0;sortPredicate=()=>!0;autoScrollDisabled;autoScrollStep;elementContainerSelector;hasAnchor;dropped=new m;entered=new m;exited=new m;sorted=new m;_unsortedItems=new Set;constructor(){let t=c(ht),i=c(ne,{optional:!0});this._dropListRef=t.createDropList(this.element),this._dropListRef.data=this,i&&this._assignDefaults(i),this._dropListRef.enterPredicate=(s,n)=>this.enterPredicate(s.data,n.data),this._dropListRef.sortPredicate=(s,n,o)=>this.sortPredicate(s,n.data,o.data),this._setupInputSyncSubscription(this._dropListRef),this._handleEvents(this._dropListRef),r._dropLists.push(this),this._group&&this._group._items.add(this)}addItem(t){this._unsortedItems.add(t),t._dragRef._withDropContainer(this._dropListRef),this._dropListRef.isDragging()&&this._syncItemsWithRef(this.getSortedItems().map(i=>i._dragRef))}removeItem(t){if(this._unsortedItems.delete(t),this._latestSortedRefs){let i=this._latestSortedRefs.indexOf(t._dragRef);i>-1&&(this._latestSortedRefs.splice(i,1),this._syncItemsWithRef(this._latestSortedRefs))}}getSortedItems(){return Array.from(this._unsortedItems).sort((t,i)=>t._dragRef.getVisibleElement().compareDocumentPosition(i._dragRef.getVisibleElement())&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)}ngOnDestroy(){let t=r._dropLists.indexOf(this);t>-1&&r._dropLists.splice(t,1),this._group&&this._group._items.delete(this),this._latestSortedRefs=void 0,this._unsortedItems.clear(),this._dropListRef.dispose(),this._destroyed.next(),this._destroyed.complete()}_setupInputSyncSubscription(t){this._dir&&this._dir.change.pipe(B(this._dir.value),y(this._destroyed)).subscribe(i=>t.withDirection(i)),t.beforeStarted.subscribe(()=>{let i=Tt(this.connectedTo).map(s=>{if(typeof s=="string"){let n=r._dropLists.find(o=>o.id===s);return n}return s});if(this._group&&this._group._items.forEach(s=>{i.indexOf(s)===-1&&i.push(s)}),!this._scrollableParentsResolved){let s=this._scrollDispatcher.getAncestorScrollContainers(this.element).map(n=>n.getElementRef().nativeElement);this._dropListRef.withScrollableParents(s),this._scrollableParentsResolved=!0}if(this.elementContainerSelector){let s=this.element.nativeElement.querySelector(this.elementContainerSelector);t.withElementContainer(s)}t.disabled=this.disabled,t.lockAxis=this.lockAxis,t.sortingDisabled=this.sortingDisabled,t.autoScrollDisabled=this.autoScrollDisabled,t.autoScrollStep=K(this.autoScrollStep,2),t.hasAnchor=this.hasAnchor,t.connectedTo(i.filter(s=>s&&s!==this).map(s=>s._dropListRef)).withOrientation(this.orientation)})}_handleEvents(t){t.beforeStarted.subscribe(()=>{this._syncItemsWithRef(this.getSortedItems().map(i=>i._dragRef)),this._changeDetectorRef.markForCheck()}),t.entered.subscribe(i=>{this.entered.emit({container:this,item:i.item.data,currentIndex:i.currentIndex})}),t.exited.subscribe(i=>{this.exited.emit({container:this,item:i.item.data}),this._changeDetectorRef.markForCheck()}),t.sorted.subscribe(i=>{this.sorted.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,container:this,item:i.item.data})}),t.dropped.subscribe(i=>{this.dropped.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,previousContainer:i.previousContainer.data,container:i.container.data,item:i.item.data,isPointerOverContainer:i.isPointerOverContainer,distance:i.distance,dropPoint:i.dropPoint,event:i.event}),this._changeDetectorRef.markForCheck()}),O(t.receivingStarted,t.receivingStopped).subscribe(()=>this._changeDetectorRef.markForCheck())}_assignDefaults(t){let{lockAxis:i,draggingDisabled:s,sortingDisabled:n,listAutoScrollDisabled:o,listOrientation:a}=t;this.disabled=s??!1,this.sortingDisabled=n??!1,this.autoScrollDisabled=o??!1,this.orientation=a||"vertical",this.lockAxis=i||null}_syncItemsWithRef(t){this._latestSortedRefs=t,this._dropListRef.withItems(t)}static \u0275fac=function(i){return new(i||r)};static \u0275dir=R({type:r,selectors:[["","cdkDropList",""],["cdk-drop-list"]],hostAttrs:[1,"cdk-drop-list"],hostVars:7,hostBindings:function(i,s){i&2&&(xt("id",s.id),q("cdk-drop-list-disabled",s.disabled)("cdk-drop-list-dragging",s._dropListRef.isDragging())("cdk-drop-list-receiving",s._dropListRef.isReceiving()))},inputs:{connectedTo:[0,"cdkDropListConnectedTo","connectedTo"],data:[0,"cdkDropListData","data"],orientation:[0,"cdkDropListOrientation","orientation"],id:"id",lockAxis:[0,"cdkDropListLockAxis","lockAxis"],disabled:[2,"cdkDropListDisabled","disabled",w],sortingDisabled:[2,"cdkDropListSortingDisabled","sortingDisabled",w],enterPredicate:[0,"cdkDropListEnterPredicate","enterPredicate"],sortPredicate:[0,"cdkDropListSortPredicate","sortPredicate"],autoScrollDisabled:[2,"cdkDropListAutoScrollDisabled","autoScrollDisabled",w],autoScrollStep:[0,"cdkDropListAutoScrollStep","autoScrollStep"],elementContainerSelector:[0,"cdkDropListElementContainer","elementContainerSelector"],hasAnchor:[2,"cdkDropListHasAnchor","hasAnchor",w]},outputs:{dropped:"cdkDropListDropped",entered:"cdkDropListEntered",exited:"cdkDropListExited",sorted:"cdkDropListSorted"},exportAs:["cdkDropList"],features:[E([{provide:ot,useValue:void 0},{provide:re,useExisting:r}])]})}return r})(),be=new b("CdkDragPreview"),Ze=(()=>{class r{templateRef=c(yt);_drag=c(rt,{optional:!0});data;matchSize=!1;constructor(){this._drag?._setPreviewTemplate(this)}ngOnDestroy(){this._drag?._resetPreviewTemplate(this)}static \u0275fac=function(i){return new(i||r)};static \u0275dir=R({type:r,selectors:[["ng-template","cdkDragPreview",""]],inputs:{data:"data",matchSize:[2,"matchSize","matchSize",w]},features:[E([{provide:be,useExisting:r}])]})}return r})();var je=(()=>{class r{static \u0275fac=function(i){return new(i||r)};static \u0275mod=It({type:r});static \u0275inj=wt({providers:[ht],imports:[Ft]})}return r})();export{Qt as a,ne as b,Ge as c,Ue as d,We as e,Ze as f,je as g};
@@ -0,0 +1 @@
1
+ import{a as ge}from"./chunk-EX4TE4E5.js";import{a as Ni,e as Ai,f as Vi}from"./chunk-ON47ICI3.js";import{a as Ri}from"./chunk-MPAFCKH7.js";import{a as Ti}from"./chunk-E2DUJTA4.js";import{a as Fi}from"./chunk-4HPBSK4V.js";import{a as ki}from"./chunk-ABO3BJKM.js";import"./chunk-5I5IONRY.js";import{a as gi}from"./chunk-DWZLJMWC.js";import"./chunk-5TKXFIDJ.js";import{a as Pi,b as Ei}from"./chunk-NRF37QSD.js";import{a as Mi}from"./chunk-C5AIOCPM.js";import"./chunk-NQX7EX5A.js";import{a as Oi}from"./chunk-WMUZZ5XX.js";import{a as wi}from"./chunk-HBAQBI6Z.js";import{a as _i}from"./chunk-YXCPHYC5.js";import{a as hi,b as yi,c as xi,d as se,e as Si}from"./chunk-LLEPB2B6.js";import{c as Di,d as me}from"./chunk-4JAEMXSQ.js";import"./chunk-2RERZJD4.js";import"./chunk-23PKMU5D.js";import{a as ae}from"./chunk-PF33HK6M.js";import"./chunk-LEGL2HWF.js";import{b as vi}from"./chunk-XIXDLSA2.js";import{a as pe,b as de,c as ue}from"./chunk-76RLGANX.js";import{a as le,b as ce}from"./chunk-J7YNB6YX.js";import{a as Ii}from"./chunk-VP2ZEIJA.js";import"./chunk-7PN2DG6D.js";import"./chunk-Z3E24JZW.js";import"./chunk-NQKVYQ6V.js";import{c as Ci}from"./chunk-NSNUUKNK.js";import{a as fi,b as bi}from"./chunk-6H5P35AP.js";import"./chunk-RF5WGONA.js";import"./chunk-INHUUGSI.js";import"./chunk-SO4GMA3Y.js";import"./chunk-PECGNYTX.js";import"./chunk-3RK6DDJD.js";import"./chunk-SARJJ3AZ.js";import"./chunk-DC426G2P.js";import"./chunk-3KSZCJ6T.js";import"./chunk-BYO7FJ4O.js";import"./chunk-CBSYYTXQ.js";import"./chunk-G4IW5GPY.js";import{f as ui}from"./chunk-BALKIB67.js";import"./chunk-UTAQ3FRE.js";import{a as oi,c as ri,e as ai,g as li}from"./chunk-M43HNBJQ.js";import{a as ut,c as gt}from"./chunk-KKLNFVVN.js";import"./chunk-5OKSTEWQ.js";import{a as ci,b as si}from"./chunk-QRTOTG7S.js";import"./chunk-CS6HBROS.js";import"./chunk-JUS6LLVX.js";import{A as di,q as ni,u as Ft,v as Rt,w as Bt,x as mi,z as pi}from"./chunk-QZMZBCE7.js";import{b as oe,c as re}from"./chunk-C4WJKF7R.js";import{O as L}from"./chunk-NZYZO47Z.js";import{d as Vt}from"./chunk-7TBS7SPQ.js";import{a as V,b as B,e as Nt,f as At,g as nt}from"./chunk-A45GTZVV.js";import"./chunk-NWSIPELM.js";import"./chunk-L76WVZW6.js";import{a as yt}from"./chunk-2FWFPV5I.js";import"./chunk-O5SLP4JK.js";import{F as it,G as kt,a as ne,c as tt,h as z,l as wt,o as et,r as ei,s as Tt}from"./chunk-RNLSEEMX.js";import"./chunk-H4DUHWPT.js";import{a as ii}from"./chunk-ROLAW5XO.js";import{a as g,d as dt}from"./chunk-USJ6ILEE.js";import"./chunk-4ZXLS56M.js";import{$b as Ye,$d as ee,Ab as It,Bb as Dt,Bc as v,Ca as k,Cb as u,Cc as h,D as Be,Db as r,Dc as Ne,E as P,Eb as a,Fb as D,Gb as Y,Hb as at,I as Ue,Ib as ze,Jb as mt,Kb as pt,Kc as q,M as je,Mb as A,Ob as d,Pb as Mt,Q as Qe,Qa as $e,Qb as m,S as Le,Sa as Jt,Ub as Ge,Va as Kt,Vb as Je,W as We,Wb as Ke,Wd as ti,Xa as c,Y as xt,Ya as N,Yd as Ot,Zd as te,_b as Xt,aa as J,be as ie,cd as X,d as Fe,db as K,dc as s,ec as F,ed as Ze,ee as G,fa as O,fb as qe,fc as x,gc as ht,hb as I,ic as U,jc as j,k as Re,kc as Q,kd as Et,la as w,lb as He,nb as Yt,o as Te,oc as ke,od as Z,pa as p,rd as R,sc as Pt,t as st,ta as C,tc as Zt,ua as f,uc as $,vb as b,vc as Xe,xb as _,zb as St}from"./chunk-JYZTRN6N.js";import"./chunk-WFMAM73Y.js";import{a as T,b as Lt}from"./chunk-SNAKHGZS.js";var Ce=class{AppConfigJSON;Currencies;SalesOrderTags;Entities;Payments;Taxes;SalesPOTypes;EstimateOptions;Data};var Ut=class{CurrencyID;CustomerID;Date;Discount;DiscountAmount;EntityID;ID;Note;Number;SalesID;TaxTypeID;TypeID;constructor(){this.CustomerID=g.GuidEmpty,this.EntityID=g.GuidEmpty,this.ID=g.GuidEmpty,this.TaxTypeID=g.GuidEmpty,this.Discount=0,this.DiscountAmount=0,this.Date=new Date().toDateString(),this.Note=""}};var ot=class{Email;Key;Mobile;Name;Phone;Value;PricebookID;StateID};var fe=class{ID;Index;Symbol;Name;ExchangeRate;ConversionSuggestion;ExchangeRateDate;ExchangeRateDateDisplay};var be=class{ID;Name;DueDays;BlockDays;Description;PrintTemplateID;AccountID};var _e=class{DeliveryID;InvoiceID;InvoiceNumber;Message;OrderID;PaymentStateID;PaymentStateLabel;PrintMode;Success};var S=class n{estimateState=Fi({loadForm:new Ce,outlet:{Name:"",ID:g.GuidEmpty},order:new Ut,cartItems:[],customer:new ot,tax:new _i,currency:new fe,tag:new be,discount:{discountAmount:0,discount:0},state:0,complete:new _e});loadForm=this.estimateState.select(t=>Object.freeze(t.loadForm()));order=this.estimateState.select(t=>Object.freeze(t.order()));outlet=this.estimateState.select(t=>Object.freeze(t.outlet()));cartItems=this.estimateState.select(t=>Object.freeze(t.cartItems()));customer=this.estimateState.select(t=>Object.freeze(t.customer()));tax=this.estimateState.select(t=>Object.freeze(t.tax()));currency=this.estimateState.select(t=>Object.freeze(t.currency()));tag=this.estimateState.select(t=>Object.freeze(t.tag()));discount=this.estimateState.select(t=>Object.freeze(t.discount()));state=this.estimateState.select(t=>Object.freeze(t.state()));complete=this.estimateState.select(t=>Object.freeze(t.complete()));updateLoadForm(t){this.estimateState.update("loadForm",t)}updateOutlet(t){this.estimateState.update("outlet",t)}updateOrder(t){this.estimateState.update("order",t)}updateCartItems(t){this.estimateState.update("cartItems",t)}updateCustomer(t){this.estimateState.update("customer",t)}updateTax(t){this.estimateState.update("tax",t)}updateCurrency(t){this.estimateState.update("currency",t)}updateTag(t){this.estimateState.update("tag",t)}updateDiscount(t){this.estimateState.update("discount",t)}updateState(t){this.estimateState.update("state",t)}updateComplete(t){this.estimateState.update("complete",t)}static \u0275fac=function(e){return new(e||n)};static \u0275prov=w({token:n,factory:n.\u0275fac})};var Ct=class{ID;Name;Code;Cost;ThumbnailUrl;CouponDiscount;Discount;DiscountAmount;EntityID;Expense;InventoryTypeID;LoyaltyPoint;Note;PromotionGift;Quantity;UnitQuantity;SalesID;VariantID;VariantUnitQuantity;isMaxInventory;UOM;UOMName;UnitCost;UnitPrice;TypeID;Storage;Taxable;Price;Serial;PriceBookID;Variant;PriceTypeID;PriceNote;get Total(){return this.Price*(this.Quantity*this.UnitQuantity)*((100-this.Discount)/100)}get getItemAfterDiscount(){let t=this.getDiscPercentagePerItem();return this.DiscountAmount<t?t-this.DiscountAmount:0}getDiscPercentagePerItem(){let t=this.UnitPrice;return this.Discount>0&&(t=(100-this.Discount)/100*this.UnitPrice),t}};var ft=class n{constructor(){}generateCartItem(t){let e=new Ct;return e.Name=t.Name,e.ThumbnailUrl=t.ThumbnailUrl,e.Price=t.UnitPrice,e.UnitPrice=t.UnitPrice,e.UnitCost=t.UnitCost,e.UnitQuantity=t.UnitQuantity,e.Quantity=1,e.Code=t.Code,e.TypeID=t.TypeID,e.Discount=t.PriceDiscount,e.VariantUnitQuantity=t.VariantUnitQuantity,e.Storage=t.Storage,e.UOM=t.UOM,e.UOMName=t.UOMName,e.VariantID=t.ID,e.Taxable=t.Taxable,e.InventoryTypeID=t.TypeID,e.PriceTypeID=t.PriceTypeID,e.PriceNote=t.PriceNote,e.Variant=t,e}generateCartItemOnEdit(t){let e=new Ct;return e.ID=t.ID,e.Name=t.Variant?.Name,e.ThumbnailUrl=t.Variant?.ThumbnailUrl,e.Price=t.Price,e.UnitPrice=t.Price,e.UnitCost=t.Cost,e.UnitQuantity=t.Variant?.UnitQuantity,e.Quantity=t.Quantity,e.Code=t.Variant?.Code,e.TypeID=t.Variant?.TypeID,e.Discount=t.Discount,e.VariantUnitQuantity=t.Variant?.VariantUnitQuantity,e.Storage=t.Variant?.Storage,e.UOM=t.Variant?.UOM,e.UOMName=t.Variant?.UOMName,e.VariantID=t.VariantID,e.Taxable=t.Taxable,e.Note=t.Note,e.Serial=t.Serial,e.InventoryTypeID=t.InventoryTypeID,e.PriceTypeID=t.PriceTypeID,e.Variant=t.Variant,e.PriceNote=t.PriceNote,e}static \u0275fac=function(e){return new(e||n)};static \u0275prov=w({token:n,factory:n.\u0275fac})};var Wt=class n{httpService=p(G);storeService=p(S);factoryService=p(ft);activatedRoute=p(ti);getLoadForm$=this.activatedRoute.queryParams.pipe(J(t=>this.httpService.post("/API/estimate/LoadForm",t)),O(t=>this.storeService.updateLoadForm(t)),O(t=>{g.IsNotEmpty(t.Data)?this.onEditOrder(t):(this.initDefaultCurrency(),this.initTag(),this.initTax())}),V());constructor(){this.getLoadForm$.subscribe()}onEditOrder(t){let e=t.Data,i=this.findTaxById(e.Order.TaxTypeID),o=this.findCurrencyById(e.Order.CurrencyID),l=this.findOutletById(e.Order.EntityID),y=this.findTagById(e.Order.TypeID),M=this.getCartItemsOnEdit(t);this.storeService.updateState(1),this.storeService.updateOrder(e.Order),this.storeService.updateCartItems(M),this.storeService.updateCustomer({Key:e.Order.CustomerID,Value:e.ContactName}),this.storeService.updateTax(i),this.storeService.updateCurrency(o),this.storeService.updateOutlet(l),this.storeService.updateDiscount({discount:e.Order.Discount,discountAmount:e.Order.DiscountAmount}),this.storeService.updateTag(y)}getCartItemsOnEdit(t){return t.Data.Items.map(o=>this.factoryService.generateCartItemOnEdit(o))}initDefaultCurrency(){let t=this.storeService.loadForm()?.AppConfigJSON?.CoreDefaults?.CurrencyID,e=this.storeService.loadForm()?.Currencies.find(i=>i.ID===t);this.storeService.updateCurrency(e)}initTag(){let t=this.storeService.loadForm()?.SalesOrderTags;this.storeService.updateTag(t[0])}initTax(){let t=this.storeService.loadForm()?.Taxes;this.storeService.updateTax(t[0])}findTaxById(t){return(this.storeService.loadForm()?.Taxes).find(o=>o.ID===t)}findCurrencyById(t){return(this.storeService.loadForm()?.Currencies).find(o=>o.ID===t)}findOutletById(t){return(this.storeService.loadForm()?.Entities).find(o=>o.ID===t)}findTagById(t){return(this.storeService.loadForm()?.SalesOrderTags).find(o=>o.ID===t)}static \u0275fac=function(e){return new(e||n)};static \u0275prov=w({token:n,factory:n.\u0275fac})};var $t=class n{storeService=p(S);isOpenDialog$=B(this.storeService.loadForm).pipe(P(t=>g.IsNotEmpty(t.Entities)),st(()=>{let t=!1,e=this.storeService.state(),i=this.storeService.outlet();return(e==0||e==1)&&(t=g.IsEmpty(i.ID)),t}));updateOutlet(t){this.storeService.updateOutlet(t)}static \u0275fac=function(e){return new(e||n)};static \u0275prov=w({token:n,factory:n.\u0275fac,providedIn:"root"})};var lt=class n{storeService=p(S);httpService=p(G);router=p(Ot);orderNumber$=B(this.storeService.outlet).pipe(P(t=>g.IsNotEmpty(t.ID)),J(t=>{if(this.storeService.state()==0)return this.httpService.post(L.EstimateGenerateNumber,{ID:t.ID}).pipe(st(e=>e.Number));{let e=this.storeService.order().Number;return Te(e)}}),O(t=>{this.storeService.state()==0&&this.updateOrderNumber(t)}),V());salesPersons$=B(this.storeService.outlet).pipe(J(t=>g.IsNotEmpty(t.ID)?this.httpService.get(L.GetSalesPersonByOutletId,[{key:"ID",value:t.ID}]):Te([])),xt(1));updateTagOrder$=B(this.storeService.tag).pipe(O(t=>{let e=T({},this.storeService.order());e.TypeID=t.ID,this.storeService.updateOrder(e)}),V());updateCurrencyOrder$=B(this.storeService.currency).pipe(O(t=>{let e=T({},this.storeService.order());e.CurrencyID=t.ID,this.storeService.updateOrder(e)}),V());updateTaxOrder$=B(this.storeService.tax).pipe(O(t=>{let e=T({},this.storeService.order());e.TaxTypeID=t.ID,this.storeService.updateOrder(e)}),V());updateDiscountOrder$=B(this.storeService.discount).pipe(O(t=>{let e=T({},this.storeService.order());e.Discount=t.discount,e.DiscountAmount=t.discountAmount,this.storeService.updateOrder(e)}),V());updateCustomerOrder$=B(this.storeService.customer).pipe(O(t=>{let e=T({},this.storeService.order());e.CustomerID=t.Key,this.storeService.updateOrder(e)}),V());updateEntityId$=B(this.storeService.outlet).pipe(P(t=>g.IsNotEmpty(t.ID)),O(t=>{let e=T({},this.storeService.order());e.EntityID=t.ID,this.storeService.updateOrder(e)}),V());constructor(){this.updateTagOrder$.subscribe(),this.updateCurrencyOrder$.subscribe(),this.updateTaxOrder$.subscribe(),this.updateDiscountOrder$.subscribe(),this.updateCustomerOrder$.subscribe(),this.updateEntityId$.subscribe()}newOrder(){let t=this.storeService.loadForm(),e=this.getDefaultCurrency(),i=this.storeService.outlet();this.storeService.updateOrder(new Ut),this.storeService.updateCartItems([]),this.storeService.updateCustomer(new ot),this.storeService.updateTax(T({},t.Taxes[0])),this.storeService.updateCurrency(T({},e)),this.storeService.updateTag(T({},t.SalesOrderTags[0])),this.storeService.updateDiscount({discountAmount:0,discount:0}),this.storeService.updateOutlet(T({},i)),this.router.navigate([],{queryParams:{}}),this.storeService.updateState(0)}getDefaultCurrency(){let t=this.storeService.loadForm()?.AppConfigJSON?.CoreDefaults?.CurrencyID;return this.storeService.loadForm()?.Currencies.find(i=>i.ID===t)}updateOrderNumber(t){g.IsNotEmpty(t)&&this.storeService.order().Number!==t&&this.storeService.updateOrder(Lt(T({},this.storeService.order()),{Number:t}))}updateOrderDate(t){g.IsNotEmpty(t)&&this.storeService.order().Date!==t&&this.storeService.updateOrder(Lt(T({},this.storeService.order()),{Date:t}))}updateSalesPersonId(t){let e=T({},this.storeService.order());e.SalesID=t,this.storeService.updateOrder(e)}static \u0275fac=function(e){return new(e||n)};static \u0275prov=w({token:n,factory:n.\u0275fac})};var qt=class n{storeService=p(S);httpService=p(G);quickkeys$=B(this.storeService.outlet).pipe(P(t=>g.IsNotEmpty(t.ID)),Qe((t,e)=>t.ID===e.ID),J(t=>this.httpService.get(L.GetQuickKeyByEntityID,[{key:"ID",value:t.ID}])),xt(1));static \u0275fac=function(e){return new(e||n)};static \u0275prov=w({token:n,factory:n.\u0275fac})};var Bi=n=>({"qtyBtn-disabled":n}),ve=class n{disabled=!1;decimalPlaces=4;max=1e15;min=-1e15;quantity;constructor(){}ngOnInit(){}incrementQty(){this.quantity<this.max&&(this.quantity++,this.onChange(this.quantity))}decrementQty(){this.quantity>this.min&&(this.quantity--,this.onChange(this.quantity))}quantityChange(){this.onChange(this.quantity)}onChange=t=>{};onTouched=()=>{};writeValue(t){g.IsEmpty(t)?this.quantity=0:this.quantity=t}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=I({type:n,selectors:[["POS-input-quantity"]],inputs:{disabled:"disabled",decimalPlaces:"decimalPlaces",max:"max",min:"min"},features:[Pt([{provide:ne,multi:!0,useExisting:n}])],decls:6,vars:11,consts:[[1,"input-group"],["type","button","id","button-addon1",1,"btn","btn-outline-secondary","fw-bold","rounded-0","fs-2","border-end-0","py-4","qty-input","d-flex","align-items-center","qty_btn","justify-content-center",3,"click","ngClass","disabled"],["id","txtCartQuantity","type","text","autoNum","",1,"form-control","input-numpad","qty-input","text-center",3,"ngModelChange","ngModel","disabled","decimalPlaces"],["type","button","id","button-addon2",1,"btn","btn-outline-secondary","fw-bold","rounded-0","fs-5","border-start-0","py-4","qty-input","d-flex","align-items-center","qty_btn","justify-content-center",3,"click","ngClass","disabled"]],template:function(e,i){e&1&&(r(0,"div",0)(1,"button",1),d("click",function(){return i.decrementQty()}),s(2,"-"),a(),r(3,"input",2),Q("ngModelChange",function(l){return j(i.quantity,l)||(i.quantity=l),l}),d("ngModelChange",function(){return i.quantityChange()}),a(),r(4,"button",3),d("click",function(){return i.incrementQty()}),s(5,"+"),a()()),e&2&&(c(),u("ngClass",$(7,Bi,i.disabled))("disabled",i.disabled),c(2),U("ngModel",i.quantity),u("disabled",i.disabled)("decimalPlaces",i.decimalPlaces),c(),u("ngClass",$(9,Bi,i.disabled))("disabled",i.disabled))},dependencies:[R,X,it,tt,z,et,ut,gt],styles:[".qtyBtn-disabled[_ngcontent-%COMP%]{background-color:#e9ecef;color:#000!important}button.qty_btn[_ngcontent-%COMP%]{background:#eee;border:1px solid #ddd;width:36px}.qty-input[_ngcontent-%COMP%]{height:36px!important}"]})};var _t=class n{storeService=p(S);autoApplyPricebook(t){let e=t?.Variant?.PriceBook?t?.Variant?.PriceBook:[],i=this.storeService.customer(),o=this.findCustomerPricebook(e,i),l=this.sortAppliedPricebooks(e,t.Quantity);return l.length>0||g.IsNotEmpty(o)?g.IsNotEmpty(o)?t=this.applyPricebook(t,o):t=this.applyPricebook(t,l[0]):t.PriceTypeID===2&&(t=this.removePricebook(t)),t}findCustomerPricebook(t=[],e){let i;return g.IsNotEmpty(e)&&g.IsNotEmpty(e?.Key)&&(i=t.find(o=>o.ID==e.PricebookID)),i}applyCustomerPricebook(){let t=[],e=this.storeService.customer(),i=this.storeService.cartItems();return g.IsNotEmpty(e.PricebookID)&&i.forEach(o=>{let l=this.findCustomerPricebook(o.Variant.PriceBook,e);l&&(o=this.applyPricebook(o,l),t.push(o))}),t}removeCustomerPricebook(t){let e=[];return this.storeService.cartItems().forEach(o=>{this.findCustomerPricebook(o.Variant.PriceBook,t)&&(o=this.removePricebook(o),e.push(o))}),e}sortAppliedPricebooks(t=[],e){return t.sort((i,o)=>o.MinimumQuantity-i.MinimumQuantity).filter(i=>e>=i.MinimumQuantity&&i.MinimumQuantity!=0)}applyPricebook(t,e){let i=this.storeService.loadForm()?.AppConfigJSON?.ModuleSell?.Pricebook?.PricebookVisible;return t.Discount=e.PriceDiscount,t.UnitPrice=e.UnitPrice,t.PriceBookID=e.ID,t.Price=e.UnitPrice,t.PriceTypeID=2,t.PriceNote=e.Name,i?t.Note=e.Name:t.Note="",t}removePricebook(t){return t.Discount=t.Variant.PriceDiscount,t.UnitPrice=t.Variant.UnitPrice,t.PriceBookID=null,t.Price=t.Variant.UnitPrice,t.PriceTypeID=0,t.Note="",t.PriceNote="",t}static \u0275fac=function(e){return new(e||n)};static \u0275prov=w({token:n,factory:n.\u0275fac})};var Ve=n=>({selected:n}),qi=()=>["/menu/Products/Catalog/Variants/Info"],Hi=n=>({ID:n});function zi(n,t){if(n&1){let e=A();r(0,"a",12),d("click",function(){C(e);let o=m();return f(o.tabState="PRODUCT")}),s(1," Product "),a()}if(n&2){let e=m();u("ngClass",$(1,Ve,e.tabState=="PRODUCT"))}}function Gi(n,t){if(n&1){let e=A();r(0,"a",13),d("click",function(){C(e);let o=m();return f(o.tabState="SERIAL")}),s(1," Serial "),a()}if(n&2){let e=m();u("ngClass",$(1,Ve,e.tabState=="SERIAL"))}}function Ji(n,t){if(n&1&&(r(0,"div",14)(1,"div",23),D(2,"POS-variant-autocomplete",24),a()()),n&2){let e=m(2);c(2),u("formControl",e.variantSearchCtrl)}}function Ki(n,t){if(n&1&&(r(0,"span"),s(1),a()),n&2){let e=m(2);c(),x("(",e.cartItem().UOMName,")")}}function Yi(n,t){if(n&1){let e=A();r(0,"div",17)(1,"h6"),s(2,"Pricebook"),a(),r(3,"ng-select",25),Q("ngModelChange",function(o){C(e);let l=m(2);return j(l.cartItem().PriceBookID,o)||(l.cartItem().PriceBookID=o),f(o)}),d("ngModelChange",function(o){C(e);let l=m(2);return f(l.onSelectPricebook(o))}),a()()}if(n&2){let e,i=m(2);c(3),u("items",(e=i.cartItem())==null||e.Variant==null?null:e.Variant.PriceBook),U("ngModel",i.cartItem().PriceBookID)}}function Xi(n,t){if(n&1){let e=A();b(0,Ji,3,1,"div",14),r(1,"div",14)(2,"div",15)(3,"h6"),s(4," Qty "),b(5,Ki,2,1,"span"),a(),r(6,"POS-input-quantity",16,0),Q("ngModelChange",function(o){C(e);let l=m();return j(l.cartItem().Quantity,o)||(l.cartItem().Quantity=o),f(o)}),d("ngModelChange",function(){C(e);let o=m();return f(o.onQtyChange())}),a()(),r(8,"div",17)(9,"h6"),s(10,"Discount (%)"),a(),r(11,"input",18),Q("ngModelChange",function(o){C(e);let l=m();return j(l.cartItem().Discount,o)||(l.cartItem().Discount=o),f(o)}),a()(),r(12,"div",17)(13,"h6"),s(14,"Price"),a(),r(15,"input",19,1),Q("ngModelChange",function(o){C(e);let l=m();return j(l.cartItem().Price,o)||(l.cartItem().Price=o),f(o)}),a()(),b(17,Yi,4,2,"div",17),a(),r(18,"div",20)(19,"div",21)(20,"POS-tinymce-editor",22),Q("ngModelChange",function(o){C(e);let l=m();return j(l.cartItem().Note,o)||(l.cartItem().Note=o),f(o)}),a()()()}if(n&2){let e,i=m();_(i.isEditState()==!1?0:-1),c(5),_(i.cartItem().UOMName?5:-1),c(),U("ngModel",i.cartItem().Quantity),u("decimalPlaces",i.isSerialItem()?0:4),c(5),U("ngModel",i.cartItem().Discount),c(4),U("ngModel",i.cartItem().Price),u("disabled",!(!(i.roleService==null||i.roleService.sell==null)&&i.roleService.sell.UnitPriceEditor)),c(2),_(((e=i.cartItem().Variant)==null||e.PriceBook==null?null:e.PriceBook.length)>0?17:-1),c(3),U("ngModel",i.cartItem().Note)}}function Zi(n,t){n&1&&(D(0,"i",42),r(1,"h6"),s(2,"No Image"),a())}function tn(n,t){if(n&1&&D(0,"img",28),n&2){let e=m(2);u("src",e.cartItem().ThumbnailUrl,Jt)}}function en(n,t){if(n&1&&(r(0,"tr")(1,"td",43),s(2),v(3,"number"),a(),r(4,"td",43),s(5),v(6,"number"),a(),r(7,"td",43),s(8),v(9,"number"),a()()),n&2){let e=t;c(2),x(" ",h(3,3,e==null?null:e.OnHand)," "),c(3),x(" ",h(6,5,e==null?null:e.Allocated)," "),c(3),x(" ",h(9,7,(e==null?null:e.OnHand)-(e==null?null:e.Allocated))," ")}}function nn(n,t){if(n&1){let e=A();r(0,"tr")(1,"th",40),s(2,"Cost"),a(),r(3,"td",44)(4,"input",45),Q("ngModelChange",function(o){C(e);let l=m(2);return j(l.cartItem().UnitCost,o)||(l.cartItem().UnitCost=o),f(o)}),a()()()}if(n&2){let e,i=m(2);c(4),U("ngModel",i.cartItem().UnitCost),u("readonly",!(!((e=i.appConfig())==null||e.ModuleSell==null)&&e.ModuleSell.Cost.Enabled))}}function on(n,t){if(n&1&&(r(0,"tr")(1,"th",40),s(2,"Content"),a(),r(3,"td",41)(4,"div",46),s(5),v(6,"number"),a()()()),n&2){let e,i=m(2);c(5),ht(" ",(e=i.cartItem())==null?null:e.VariantUnitQuantity," (@",h(6,2,i.cartItem().Price/((e=i.cartItem())==null?null:e.VariantUnitQuantity)),")")}}function rn(n,t){if(n&1&&(r(0,"div",38)(1,"table",47)(2,"thead")(3,"tr")(4,"th",48),s(5,"Storage Location"),a()()(),r(6,"tbody")(7,"tr")(8,"td"),s(9),a()()()()()),n&2){let e=m(2);c(9),x(" ",e.cartItem().Storage," ")}}function an(n,t){if(n&1&&(r(0,"div",10)(1,"div",26)(2,"a",27),b(3,Zi,3,0)(4,tn,1,1,"img",28),a()(),r(5,"div",29)(6,"div",30)(7,"div",21)(8,"div",31),D(9,"i",32),r(10,"div",33),s(11,"Inventory"),a()(),r(12,"table",34)(13,"thead")(14,"tr")(15,"th",35),s(16,"On Hand"),a(),r(17,"th",35),s(18,"Allocated"),a(),r(19,"th",36),s(20,"Available"),a()()(),r(21,"tbody"),b(22,en,10,9,"tr"),v(23,"async"),a()()()(),r(24,"div",37)(25,"div",38)(26,"table",39)(27,"thead"),b(28,nn,5,2,"tr"),r(29,"tr")(30,"th",40),s(31,"Price"),a(),r(32,"td",41),s(33),v(34,"number"),a()(),b(35,on,7,4,"tr"),a()()(),b(36,rn,10,1,"div",38),a()()()),n&2){let e,i,o,l,y,M,W,rt=m();c(2),u("routerLink",Zt(12,qi))("queryParams",$(13,Hi,(e=rt.cartItem())==null?null:e.ID)),c(),_(((i=rt.cartItem())==null?null:i.ThumbnailUrl)==null?3:4),c(19),_((o=h(23,8,rt.variantInventory$))?22:-1,o),c(6),_(!((l=rt.appConfig())==null||l.ModuleSell==null)&&l.ModuleSell.Cost.Visible&&rt.roleService.product.Cost?28:-1),c(5),x(" ",h(34,10,(y=rt.cartItem())==null?null:y.Price)," "),c(2),_(((M=rt.cartItem())==null?null:M.VariantUnitQuantity)>1?35:-1),c(),_(!((W=rt.appConfig())==null||W.ModuleSell==null||W.ModuleSell.Grid==null)&&W.ModuleSell.Grid.StorageVisible&&((W=rt.cartItem())!=null&&W.Storage)?36:-1)}}function ln(n,t){if(n&1){let e=A();r(0,"app-item-serial",49),d("cartItemChange",function(o){C(e);let l=m();return f(l.onSerialChanges(o))}),a()}if(n&2){let e=m();u("entityId",e.storeService.outlet().ID)("cartItem",e.cartItem())}}var zt=class n{constructor(t,e){this.data=t;this.dialogRef=e;this.cartItem=k(t),this.initVariantInventory(),this.initIsSerialItem(),this.initModalConfig(),this.initDialogState()}storeService=p(S);cartItemService=p(ct);roleService=p(dt);toastr=p(ie);pricebookService=p(_t);modalConfig=new Ft;tabState="CART";cartItem;appConfig=k(this.storeService.loadForm()?.AppConfigJSON);isSerialItem=k(!1);variantInventory$;isEditState=k(!1);showProductTab=k(!1);variantSearchCtrl=new wt;getItemFromSearch$=this.variantSearchCtrl.valueChanges.pipe(P(t=>g.IsNotEmpty(t)),J(t=>{if(t.type==="ID")return this.cartItemService.getItemByVariantId(t.str);if(t.type==="Code")return this.cartItemService.getItemByVariantByCode(t.str)}),O(t=>{this.cartItem.set(t),this.initModalTitle(),this.initProductTab(),this.initIsSerialItem(),this.initVariantInventory()}),V());ngOnInit(){this.isEditState()||this.getItemFromSearch$.subscribe()}initDialogState(){this.isEditState.set(g.IsNotEmpty(this.cartItem().VariantID)),this.initProductTab()}initVariantInventory(){this.variantInventory$=this.cartItemService.getVariantInventory(this.cartItem().VariantID).pipe(xt(1))}initProductTab(){this.showProductTab.set(g.IsNotEmpty(this.cartItem().VariantID))}initIsSerialItem(){this.isSerialItem.set(this.cartItem().TypeID==4)}initModalConfig(){this.initModalTitle(),this.modalConfig.customWidth="680px",this.modalConfig.noPadding=!0,this.modalConfig.bodyScrollable=!0}initModalTitle(){this.modalConfig.title=this.cartItem()?.Name??"Add Variant"}onSerialChanges(t){this.cartItem.set(t)}onQtyChange(){let t=this.pricebookService.autoApplyPricebook(this.cartItem());this.cartItem.set(t)}onSelectPricebook(t){let e;if(g.IsNotEmpty(t)){let o=this.cartItem().Variant.PriceBook.find(l=>l.ID===t);e=this.pricebookService.applyPricebook(this.cartItem(),o)}else e=this.pricebookService.removePricebook(this.cartItem());this.cartItem.set(e)}onCancel(){this.dialogRef.close()}onSave(){g.IsNotEmpty(this.cartItem().VariantID)&&g.IsNotEmpty(this.cartItem().Name)?this.dialogRef.close(this.cartItem()):this.toastr.warning("Please select a product","Warning")}static \u0275fac=function(e){return new(e||n)(K(At),K(Nt))};static \u0275cmp=I({type:n,selectors:[["app-dialog-item"]],decls:13,vars:9,consts:[["quantity",""],["price",""],[3,"onOk","onCancel","onClose","config"],[1,"mb-5"],[1,"container","w-100","h-100","mt-8"],[1,"row","border-bottom","mx-5"],["data-cy","input_sell",1,"btn","btn-link",3,"click","ngClass"],["data-cy","product",1,"btn","btn-link",3,"ngClass"],["data-cy","serial",1,"btn","btn-link",3,"ngClass"],[1,"mx-8"],[1,"row","my-8"],[3,"entityId","cartItem"],["data-cy","product",1,"btn","btn-link",3,"click","ngClass"],["data-cy","serial",1,"btn","btn-link",3,"click","ngClass"],[1,"row","mt-8"],[1,"col-auto","pe-0",2,"width","145px"],[3,"ngModelChange","ngModel","decimalPlaces"],[1,"col-auto","pe-0"],["type","text","percentage","","autoNum","",1,"form-control","input-cart",2,"width","100px",3,"ngModelChange","ngModel"],["id","inputPrice","type","text","autoNum","",1,"form-control","input-cart",2,"width","112px",3,"ngModelChange","ngModel","disabled"],[1,"row","my-6"],[1,"col-12"],["height","220px",3,"ngModelChange","ngModel"],[1,"col-12","px-0"],[3,"formControl"],["bindLabel","Name","bindValue","ID","placeholder","Pricebook","appendTo","body",2,"width","170px",3,"ngModelChange","items","ngModel"],[1,"col-sm-4","d-flex","justify-content-center","flex-column","align-items-center","text-body-secondary"],["target","_blank",2,"color","inherit",3,"routerLink","queryParams"],[1,"border","rounded",3,"src"],[1,"col-sm-8","inventory"],[1,"row","mb-8"],[1,"d-flex"],["aria-hidden","true",1,"fa-archive","fa-solid","fa-1x","pt-3","pe-2"],[2,"font-size","15px","font-family","'Roboto Slab'"],[1,"table","table-bordered","text-center","inventory-table"],[1,"table-light","py-6","border-end",2,"text-transform","none"],[1,"table-light","py-6",2,"text-transform","none"],[1,"row"],[1,"col-6"],[1,"table","table-bordered",2,"width","171px"],[1,"table-light",2,"text-transform","none"],[1,"pe-6","text-end"],["aria-hidden","true",1,"fa-solid","fa-image","fa-5x"],[1,"py-6"],[1,"p-0"],["type","text","autoNum","",1,"form-control","border-0","bg-white","text-end",3,"ngModelChange","ngModel","readonly"],["ngClass","ms-3"],[1,"table","table-bordered","text-center"],[1,"table-light"],[3,"cartItemChange","entityId","cartItem"]],template:function(e,i){e&1&&(r(0,"modal-material",2),d("onOk",function(){return i.onSave()})("onCancel",function(){return i.onCancel()})("onClose",function(){return i.onCancel()}),r(1,"content",3)(2,"div",4)(3,"div",5)(4,"div")(5,"a",6),d("click",function(){return i.tabState="CART"}),s(6," Cart "),a(),b(7,zi,2,3,"a",7),b(8,Gi,2,3,"a",8),a()(),r(9,"div",9),b(10,Xi,21,9),b(11,an,37,15,"div",10),b(12,ln,1,2,"app-item-serial",11),a()()()()),e&2&&(u("config",i.modalConfig),c(5),u("ngClass",$(7,Ve,i.tabState=="CART")),c(2),_(i.showProductTab()?7:-1),c(),_(i.isSerialItem()?8:-1),c(2),_(i.tabState=="CART"?10:-1),c(),_(i.tabState=="PRODUCT"?11:-1),c(),_(i.tabState=="SERIAL"?12:-1))},dependencies:[R,X,Bt,Rt,Mi,it,tt,z,et,ut,gt,ce,le,ee,te,ge,kt,Tt,Ei,Pi,ve,Vt,Et,Z],styles:[".text-warning[_ngcontent-%COMP%]{color:var(--bs-warning)!important}.bg-light-gray[_ngcontent-%COMP%]{background-color:var(--bs-light-gray);--bs-bg-opacity: .15 !important}.bg-gradient-danger[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#f8d7da,#f8d7da 15px,#f5c6cb 15px 30px)!important}.bg-gradient-success[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#beeebb,#beeebb 15px,#afeba8 15px 30px)!important}.bg-gradient-warning[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#fcf3cf,#fcf3cf 15px,#f9e79f 15px 30px)!important}.bg-light-orange[_ngcontent-%COMP%]{background-color:var(--bs-light-orange);--bs-bg-opacity: .15 !important}.text-danger[_ngcontent-%COMP%]{color:#fb404b!important}.text-dark[_ngcontent-%COMP%]{color:#5e5e5e!important}.text-success[_ngcontent-%COMP%]{color:#87cb16!important}.text-black[_ngcontent-%COMP%]{color:#000!important}.text-white[_ngcontent-%COMP%]{color:var(--bs-white)!important}.btn-light-blue[_ngcontent-%COMP%]{color:#212529;background-color:#dfeffc!important;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:hover{color:#212529;background-color:#bcdef9;border-color:#b0d8f8}.btn-light-blue[_ngcontent-%COMP%]:focus, .btn-light-blue.focus[_ngcontent-%COMP%]{color:#212529;background-color:#bcdef9;border-color:#b0d8f8;box-shadow:0 0 0 .2rem #c3d1dc80}.btn-light-blue.disabled[_ngcontent-%COMP%], .btn-light-blue[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#dfeffc;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#b0d8f8;border-color:#a5d2f7}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #c3d1dc80}.btn-light-danger[_ngcontent-%COMP%]{color:#212529;background-color:#f8d7da!important;border-color:#f8d7da}.btn-light-danger[_ngcontent-%COMP%]:hover{color:#212529;background-color:#f5c2c7;border-color:#f1aeb5}.btn-light-danger[_ngcontent-%COMP%]:focus, .btn-light-danger.focus[_ngcontent-%COMP%]{color:#212529;background-color:#f5c2c7;border-color:#f1aeb5;box-shadow:0 0 0 .2rem #dc354540}.btn-light-danger.disabled[_ngcontent-%COMP%], .btn-light-danger[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#f8d7da;border-color:#f8d7da}.btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-danger.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#f1aeb5;border-color:#ea868f}.btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-danger.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #dc354540}.inventory-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .inventory-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{line-height:6px!important}.btn-link[_ngcontent-%COMP%]{padding-top:0;color:#868686;padding-bottom:8px;border-radius:unset;font-family:Roboto Slab,serif}.btn-link.selected[_ngcontent-%COMP%]{color:#3b3b3b;border-bottom:4px solid #07a519}.input-cart[_ngcontent-%COMP%]{height:36px!important}"]})};var ct=class n{httpService=p(G);storeService=p(S);factoryService=p(ft);pricebookService=p(_t);dialog=p(nt);variantSearchCtrl=new wt;viewContainerRef=p(qe);selectedCustomer;cartItemEvent=new Fe;onEditCartItems$=B(this.storeService.cartItems).pipe(P(()=>this.storeService.state()==1),st(t=>({action:"INIT",items:t})),Le());applyCustomerPricebook$=B(this.storeService.customer).pipe(O(t=>{this.onApplyCustomerPricebook(t)}),V());cartItems$=Be(this.onEditCartItems$,this.cartItemEvent.asObservable()).pipe(We((t,e)=>{let i=[];switch(e.action){case"INIT":i=e.items;break;case"ADD":i=this.addNewItem(t,e);break;case"UPDATE":i=this.updateItems(t,e);break;case"REMOVE":i=t.filter((o,l)=>e.index!==l);break;case"CLEAR":i=[];break;case"PURCHASE":i=this.updateItems(t,e);break;case"RETURN":i=this.updateItems(t,e);break;case"DROP":i=e.items;break}return this.storeService.updateCartItems(i),i},this.storeService.cartItems()));addCartItemBySearch$=this.variantSearchCtrl.valueChanges.pipe(P(t=>g.IsNotEmpty(t)),O(t=>{t.type==="ID"?this.addItemByVariantId(t.str):t.type==="Code"&&this.addItemByVariantCode(t.str)}),V());constructor(){this.addCartItemBySearch$.subscribe(),this.applyCustomerPricebook$.subscribe()}onApplyCustomerPricebook(t){let e=[],i=this.storeService.cartItems();g.IsNotEmpty(t.PricebookID)?(this.selectedCustomer=t,e=this.pricebookService.applyCustomerPricebook()):g.IsNotEmpty(this.selectedCustomer)&&(e=this.pricebookService.removeCustomerPricebook(this.selectedCustomer),this.selectedCustomer=null),i.forEach((o,l)=>{let y=e.find(M=>M.VariantID===o.VariantID);y&&this.updateCartItem({cartItem:y,index:l})})}onApplyPricebook(t){return this.pricebookService.autoApplyPricebook(t)}onOpenAddDialog(){this.dialog.open(zt,{data:new Ct,viewContainerRef:this.viewContainerRef}).afterClosed().pipe(P(t=>g.IsNotEmpty(t))).subscribe(t=>{this.cartItemEvent.next({item:t,action:"ADD",newRow:!0})})}onOpenEditDialog(t){this.dialog.open(zt,{data:T({},t.cartItem),viewContainerRef:this.viewContainerRef}).afterClosed().pipe(P(e=>g.IsNotEmpty(e))).subscribe(e=>{this.cartItemEvent.next({item:e,action:"UPDATE",index:t.index})})}onSelectQuickkeyItem(t){this.addItemByVariantId(t)}addNewItem(t,e){let i=[],o=t.find(l=>l.VariantID===e.item?.VariantID);return o?e.newRow?(e.item=this.onApplyPricebook(e.item),i=[...t,e.item]):(o.Quantity+=1,o=this.onApplyPricebook(o),i=[...t]):(e.item=this.onApplyPricebook(e.item),i=[...t,e.item]),i}updateItems(t,e){return t.map((o,l)=>l===e.index?Ci(Ct,e.item):o)}onDropItems(t){this.cartItemEvent.next({action:"DROP",items:t})}addItemByVariantId(t){this.getItemByVariantId(t).pipe(O(e=>{this.cartItemEvent.next({item:e,action:"ADD",newRow:!1})})).subscribe()}addItemByVariantCode(t){this.getItemByVariantByCode(t).pipe(O(e=>{this.cartItemEvent.next({item:e,action:"ADD",newRow:!1})})).subscribe()}removeCartItem(t){this.cartItemEvent.next({action:"REMOVE",index:t.index})}updateCartItem(t){this.cartItemEvent.next({action:"UPDATE",item:t.cartItem,index:t.index})}clearCart(){this.dialog.open(Ri,{data:{title:"Clear Order Items",message:'<p class="h4">Are you sure you want to clear all order items?</p>',headerType:yt.Warning}}).afterClosed().pipe(P(t=>t)).subscribe(()=>{this.cartItemEvent.next({action:"CLEAR"})})}onPurchaseItem(t){this.cartItemEvent.next({action:"PURCHASE",item:t.cartItem,index:t.index})}onReturnItem(t){this.cartItemEvent.next({action:"RETURN",item:t.cartItem,index:t.index})}getItemByVariantId(t){return this.httpService.get(L.GetVariantByID,[{key:"ID",value:t},{key:"EntityID",value:this.storeService.outlet().ID}]).pipe(st(e=>this.factoryService.generateCartItem(e)))}getItemByVariantByCode(t){return this.httpService.get(L.GetVariantByCode,[{key:"Code",value:t},{key:"EntityID",value:this.storeService.outlet().ID},{key:"Promotion",value:!0}]).pipe(st(e=>this.factoryService.generateCartItem(e)))}getVariantInventory(t){return this.httpService.get(L.GetVariantStockByID,[{key:"EntityID",value:this.storeService.outlet().ID},{key:"ID",value:t}])}static \u0275fac=function(e){return new(e||n)};static \u0275prov=w({token:n,factory:n.\u0275fac})};function cn(n,t){if(n&1&&(r(0,"td",8),s(1),a()),n&2){let e=m().$index;c(),x(" ",e+1,". ")}}function sn(n,t){if(n&1&&(r(0,"div",11),D(1,"img",31),a()),n&2){let e=m().$implicit;c(),u("src",e.ThumbnailUrl,Jt)}}function mn(n,t){n&1&&(r(0,"div",12),D(1,"i",32),a())}function pn(n,t){if(n&1&&D(0,"small",16),n&2){let e=m().$implicit;u("innerHtml",e.Note,$e)}}function dn(n,t){if(n&1&&(r(0,"span",20),s(1),v(2,"number"),a()),n&2){let e=m().$implicit;c(),F(Ne(2,1,e.Quantity,"1.0-4"))}}function un(n,t){if(n&1&&(r(0,"span",33),s(1,"x"),a(),r(2,"div",34)(3,"span",35),s(4),v(5,"number"),a()()),n&2){let e=m().$implicit;c(4),F(h(5,1,e.UnitQuantity))}}function gn(n,t){if(n&1&&(r(0,"span",21),s(1),v(2,"number"),a()),n&2){let e=m().$implicit;c(),x("@",h(2,1,e.VariantUnitQuantity))}}function Cn(n,t){if(n&1&&(r(0,"small",22),s(1),a()),n&2){let e=m().$implicit;c(),F(e.UOM?e==null?null:e.UOMName:"")}}function fn(n,t){if(n&1&&(r(0,"div",24),s(1),v(2,"number"),a()),n&2){let e=m().$implicit;c(),x(" ",Ne(2,1,e.Price,"1.0-4")," ")}}function bn(n,t){if(n&1){let e=A();r(0,"tr",7),d("contextmenu",function(o){let l=C(e),y=l.$implicit,M=l.$index,W=m(2);return f(W.onContextMenu(o,y,M))}),b(1,cn,2,1,"td",8),r(2,"td",9),d("click",function(){let o=C(e),l=o.$implicit,y=o.$index,M=m(2);return f(M.onEdit(l,y))}),r(3,"div",10),b(4,sn,2,1,"div",11)(5,mn,2,0,"div",12),r(6,"div",13)(7,"div"),s(8),a(),r(9,"span",14),s(10),a(),r(11,"div"),D(12,"app-serial-note",15),a(),b(13,pn,1,1,"small",16),a()()(),r(14,"td",17),d("click",function(){let o=C(e),l=o.$implicit,y=o.$index,M=m(2);return f(M.onEdit(l,y))}),r(15,"div",18)(16,"div",19),b(17,dn,3,4,"span",20),b(18,un,6,3),b(19,gn,3,3,"span",21),b(20,Cn,2,1,"small",22),a()()(),r(21,"td",23),d("click",function(){let o=C(e),l=o.$implicit,y=o.$index,M=m(2);return f(M.onEdit(l,y))}),b(22,fn,3,4,"div",24),a(),r(23,"td",23),d("click",function(){let o=C(e),l=o.$implicit,y=o.$index,M=m(2);return f(M.onEdit(l,y))}),r(24,"div",25),s(25),v(26,"number"),a()(),r(27,"td",26),d("click",function(){let o=C(e),l=o.$implicit,y=o.$index,M=m(2);return f(M.onEdit(l,y))}),r(28,"div",18)(29,"div",20),s(30),v(31,"number"),a()()(),r(32,"td",27)(33,"div",28)(34,"span",29),d("click",function(){let o=C(e),l=o.$implicit,y=o.$index,M=m(2);return f(M.onRemove(l,y))}),D(35,"i",30),a()()()()}if(n&2){let e=t.$implicit,i=m(2);c(),_(i.appConfig!=null&&i.appConfig.ModuleSell.Grid.RowNumberVisible?1:-1),c(3),_(e.ThumbnailUrl?4:5),c(4),F(e.Name),c(2),F(e.Code),c(2),u("serials",e==null?null:e.Serial),c(),_(e.Note?13:-1),c(4),_(e.Quantity!==1&&e.Quantity!==0||e.UnitQuantity>1||e.VariantUnitQuantity>1?17:-1),c(),_(e.UnitQuantity>1?18:-1),c(),_(e.VariantUnitQuantity>1?19:-1),c(),_(e.UOM&&(!(i.appConfig==null||i.appConfig.ModuleSell==null)&&i.appConfig.ModuleSell.Grid.UOMVisible)?20:-1),c(2),_(e.Price!==e.Total?22:-1),c(3),x(" ",e.Discount?h(26,13,e.Discount*-1)+"%":""," "),c(5),x(" ",i.roleService.product!=null&&i.roleService.product.Price?h(31,15,e.Total):" - "," ")}}function _n(n,t){if(n&1){let e=A();r(0,"table",1)(1,"tbody",5),d("cdkDropListDropped",function(o){C(e);let l=m();return f(l.onDrop(o))}),It(2,bn,36,17,"tr",6,St),a()()}if(n&2){let e=m();c(2),Dt(e.cartItems)}}function vn(n,t){n&1&&(r(0,"div",2)(1,"div",36)(2,"div",37)(3,"div",38)(4,"div",39),D(5,"i",40),a(),r(6,"div",41)(7,"span"),s(8,"Empty Cart"),a(),D(9,"br"),r(10,"span"),s(11,"Add products to the cart"),a(),D(12,"br"),r(13,"span"),s(14,"or scan barcode"),a()()()()()())}function hn(n,t){if(n&1){let e=A();r(0,"button",42),d("click",function(){let o=C(e).item,l=m();return f(l.onReverse(o,!0))}),s(1,"Return"),a(),r(2,"button",42),d("click",function(){let o=C(e).item,l=m();return f(l.onReverse(o,!1))}),s(3,"Purchase"),a()}}var he=class n{roleService=p(dt);appConfig;cartItems=[];set _cartItems(t){t&&(this.cartItems=[...t])}onRemoveEvent=new N;onEditEvent=new N;onDropItems=new N;onReturnEvent=new N;onPurchaseEvent=new N;contextMenu;contextMenuPosition={x:"0px",y:"0px"};onContextMenu(t,e,i){t.preventDefault(),this.contextMenuPosition.x=t.clientX+"px",this.contextMenuPosition.y=t.clientY+"px",e.Index=i,this.contextMenu.menuData={item:e},this.contextMenu.openMenu()}onDrop(t){oi(this.cartItems,t.previousIndex,t.currentIndex),this.onDropItems.emit(this.cartItems)}onEdit(t,e){this.onEditEvent.emit({cartItem:t,index:e})}onRemove(t,e){this.onRemoveEvent.emit({cartItem:t,index:e})}onReverse(t,e){let i=t.Index;e?(t.Quantity>0&&(t.Quantity=t.Quantity*-1),this.onReturnEvent.emit({cartItem:t,index:i})):(t.Quantity<0&&(t.Quantity=t.Quantity*-1),this.onPurchaseEvent.emit({cartItem:t,index:i}))}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=I({type:n,selectors:[["POS-cart-display"]],viewQuery:function(e,i){if(e&1&&Ge(se,7),e&2){let o;Je(o=Ke())&&(i.contextMenu=o.first)}},inputs:{appConfig:"appConfig",_cartItems:[0,"cartItems","_cartItems"]},outputs:{onRemoveEvent:"onRemove",onEditEvent:"onEdit",onDropItems:"onDropItems",onReturnEvent:"onReturn",onPurchaseEvent:"onPurchase"},decls:6,vars:6,consts:[["contextMenu","matMenu"],[1,"table","table-borderless"],[1,"row","g-0","h-100"],[2,"visibility","hidden","position","fixed",3,"matMenuTriggerFor"],["matMenuContent",""],["cdkDropList","",3,"cdkDropListDropped"],["cdkDrag","",1,"border-bottom"],["cdkDrag","",1,"border-bottom",3,"contextmenu"],[2,"width","10px"],[1,"pe-0",2,"width","50%",3,"click"],[1,"d-flex","align-items-center"],[1,"ratio","ratio-1x1",2,"width","55px"],[1,"item-image","d-flex","justify-content-center","align-items-center","text-center","fs-1"],[1,"d-block","ms-4",2,"line-height","18px"],[1,"fw-normal","fs-6","text-muted"],[3,"serials"],["title","Note",1,"special-TinyMCE","m-0","fst-italic","d-block",3,"innerHtml"],[1,"px-0","text-end",2,"width","15%",3,"click"],[1,"d-flex","align-items-center","justify-content-end"],[1,"d-flex","text-end","fw-normal","align-items-center",2,"line-height","20px"],[1,"fs-5"],["title","Variant Unit Quantity",1,"fs-5"],["title","UOM",1,"ps-1","fs-5"],[3,"click"],[1,"fs-5","text-end"],[1,"fw-normal","fs-5","text-danger"],[1,"pe-0",3,"click"],[1,"mt-6","ps-0"],[1,"d-flex","justify-content-end","align-items-center"],["role","button","title","Delete Item",1,"fs-3","cursor-pointer",3,"click"],[1,"fa","fa-trash","text-danger","fs-4"],[1,"item-image",3,"src"],[1,"fa-solid","fa-image",2,"color","#b4b4b4c2"],[1,"fs-6","me-1","ms-1"],[1,"d-flex","algin-items-center"],["title","Unit Quantity",1,"fs-5","me-1"],[1,"col-12"],[1,"d-flex","justify-content-center","align-items-center","h-100"],[1,"row"],[1,"col-12","d-flex","justify-content-center"],[1,"fa-regular","fa-cart-arrow-up","text-secondary",2,"font-size","110px"],[1,"col-12","justify-content-center","text-center","mt-5","empty-cart-description","text-secondary","headings-font-family"],["mat-menu-item","",3,"click"]],template:function(e,i){if(e&1&&(b(0,_n,4,0,"table",1)(1,vn,15,0,"div",2),D(2,"div",3),r(3,"mat-menu",null,0),Yt(5,hn,4,0,"ng-template",4),a()),e&2){let o=Xt(4);_(i.cartItems.length>0?0:1),c(2),Ye("left",i.contextMenuPosition.x)("top",i.contextMenuPosition.y),u("matMenuTriggerFor",o)}},dependencies:[R,li,ai,ri,Ai,Ii,Si,xi,hi,yi,se,Z],styles:[".item-image[_ngcontent-%COMP%]{height:50px;width:56px;display:block;border:solid 1px #dddddd;border-radius:5px;object-fit:contain}.example-menu[_ngcontent-%COMP%]{display:inline-flex;flex-direction:column;min-width:180px;max-width:280px;background-color:#fff;padding:6px 0}.example-menu-item[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer;border:none;-webkit-user-select:none;user-select:none;min-width:64px;line-height:36px;padding:0 16px;display:flex;align-items:center;flex-direction:row;flex:1}.example-menu-item[_ngcontent-%COMP%]:hover{background-color:#f5f5f5}.example-menu-item[_ngcontent-%COMP%]:active{background-color:#dcdcdc}.table[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:not(caption) > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{padding:12px 10px} .cdk-menu.cdk-menu-group.example-menu{box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.empty-cart-description[_ngcontent-%COMP%]{font-size:14px;font-weight:500;color:#c7c7c7}"]})};var xn=(n,t)=>({"text-danger":n,"text-custom-warning":t});function Sn(n,t){if(n&1&&(r(0,"mat-option",7)(1,"div",8)(2,"div",9)(3,"div"),s(4),a()()()()),n&2){let e=t.$implicit,i=m();u("value",e),c(2),u("ngClass",Xe(4,xn,e.StateID==i.customerState.Suspended,e.StateID==i.customerState.WaitingForApproval))("title",e.StateID==i.customerState.Suspended?"Suspended":e.StateID==i.customerState.WaitingForApproval?"Waiting for Approval":""),c(2),F(e==null?null:e.Value)}}function In(n,t){if(n&1){let e=A();r(0,"i",10),d("click",function(){C(e);let o=m();return f(o.openCustomerDetail())}),a()}}var ye=class n{httpService=p(G);router=p(Ot);customerCtrl=new wt;customerFiltered$=this.customerCtrl.valueChanges.pipe(P(t=>typeof t=="string"&&t.length>=3),je(300),J(t=>this.getCustomerSuggestion(t)));customerSelected$=this.customerCtrl.valueChanges.pipe(P(t=>typeof t!="string"),O(t=>{this.onChange(t)}));createNewCustomer=new N;clickInput=new N;customerState=wi;constructor(){this.customerSelected$.pipe(V()).subscribe()}getCustomerSuggestion(t){return this.httpService.get(L.GetCustomerSuggestions,[{key:"count",value:100},{key:"prefix",value:t}])}displayFn(t){return t?.Value}onCreateCustomer(){this.createNewCustomer.emit()}onClickInputValue(){this.clickInput.emit()}onChange=t=>{};onTouched=()=>{};writeValue(t){this.customerCtrl.patchValue(t,{onlySelf:!0,emitEvent:!1})}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}openCustomerDetail(){let t=this.customerCtrl.value.Key;if(g.IsNotEmpty(t)){let e=this.router.serializeUrl(this.router.createUrlTree(["/menu/Contacts/Contact/Customers/Info"],{queryParams:{ID:t}}));window.open(e,"_blank")}}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=I({type:n,selectors:[["POS-customer-autocomplete"]],outputs:{createNewCustomer:"onCreateNewCustomer",clickInput:"onClickInput"},features:[Pt([{provide:ne,multi:!0,useExisting:n}])],decls:8,vars:7,consts:[["auto","matAutocomplete"],[1,"d-flex","align-items-center","position-relative"],["matTooltipPosition","above","matTooltip","New Customer","role","button",1,"fa-light","fa-user-plus","position-absolute","cursor-pointer",2,"font-size","12px",3,"click"],["type","text","placeholder","Assign Customer",3,"click","formControl","matAutocomplete"],[3,"displayWith"],[3,"value",4,"ngFor","ngForOf"],["matTooltipPosition","left","matTooltip","Open Customer Details",1,"fa-regular","fa-arrow-up-right-from-square","position-absolute"],[3,"value"],[1,"d-flex","align-items-center","justify-content-between","w-100"],[1,"ms-3","text-wrap","text-break",3,"ngClass","title"],["matTooltipPosition","left","matTooltip","Open Customer Details",1,"fa-regular","fa-arrow-up-right-from-square","position-absolute",3,"click"]],template:function(e,i){if(e&1){let o=A();r(0,"div",1)(1,"i",2),d("click",function(){return C(o),f(i.onCreateCustomer())}),a(),r(2,"input",3),d("click",function(){return C(o),f(i.onClickInputValue())}),a(),r(3,"mat-autocomplete",4,0),Yt(5,Sn,5,7,"mat-option",5),v(6,"async"),a(),b(7,In,1,0,"i",6),a()}if(e&2){let o=Xt(4);c(2),u("formControl",i.customerCtrl)("matAutocomplete",o),c(),u("displayWith",i.displayFn),c(2),u("ngForOf",h(6,5,i.customerFiltered$)),c(2),_(i.customerCtrl&&(i.customerCtrl!=null&&i.customerCtrl.value)&&(!(i.customerCtrl==null||i.customerCtrl.value==null)&&i.customerCtrl.value.Key)?7:-1)}},dependencies:[R,X,Ze,di,mi,ni,pi,kt,tt,z,Tt,re,oe,me,Et],styles:["input[_ngcontent-%COMP%]{width:100%;height:38px!important;border-radius:.375rem;border:1px solid #ced4da;padding-left:32px;padding-right:32px}input[_ngcontent-%COMP%]::placeholder{color:#ced4da}i.fa-user-plus[_ngcontent-%COMP%]{font-size:16px;top:12px;left:11px}.text-custom-warning[_ngcontent-%COMP%]{color:#ff7a00d6}i.fa-arrow-up-right-from-square[_ngcontent-%COMP%]{position:absolute;right:13px;top:50%;transform:translateY(-50%);font-size:12px;z-index:2;cursor:pointer}"]})};var Gt=class n{storeService=p(S);dialog=p(nt);httpService=p(G);createNewCustomer(){this.dialog.open(Di,{data:{options:this.storeService.loadForm()?.EstimateOptions,config:this.storeService.loadForm()?.AppConfigJSON?.ModuleContact,type:"customer",title:"New Customer Form"}}).afterClosed().pipe(P(t=>g.IsNotEmpty(t))).subscribe(t=>{let e=new ot;e.Key=t.CustomerID,e.Value=t.ContactName,this.storeService.updateCustomer(e)})}onSelectCustomer(t){let e=this.storeService.outlet();this.httpService.get(L.GetCustomerPrivilegeByID,[{key:"ID",value:t.Key},{key:"EntityID",value:e.ID}]).pipe(Ue(()=>{let i=new ot;return this.storeService.updateCustomer(i),Re})).subscribe(i=>{let o=JSON.parse(JSON.stringify(t));o.PricebookID=i.PricebookID,this.storeService.updateCustomer(o)})}onDeleteCustomer(){g.IsNotEmpty(this.storeService?.customer()?.Key)&&this.dialog.open(Oi,{data:{title:"Re-assign customer",message:"Are you sure to re-assign the customer?"}}).afterClosed().pipe(P(t=>t)).subscribe(()=>{let t=new ot;this.storeService.updateCustomer(t)})}static \u0275fac=function(e){return new(e||n)};static \u0275prov=w({token:n,factory:n.\u0275fac})};var xe=class n{clickEvent=new N;onClick(){this.clickEvent.emit()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=I({type:n,selectors:[["app-note-button"]],outputs:{clickEvent:"onClickEvent"},decls:2,vars:0,consts:[["type","button",1,"btn","btn-gray","w-100","fs-3","px-0","py-6","headings-font-family",3,"click"],[1,"fa-regular","fa-note-sticky","fa-xl"]],template:function(e,i){e&1&&(Y(0,"button",0),Mt("click",function(){return i.onClick()}),ze(1,"i",1),at())},styles:[".btn-gray[_ngcontent-%COMP%]{border:1px solid #d6d6d6;color:#545454!important;background:linear-gradient(to bottom,#fff,#eee)}"]})};function Dn(n,t){if(n&1&&(Y(0,"div"),s(1),v(2,"number"),at()),n&2){let e=m();c(),x(" ",h(2,1,e.totalAmount)," ")}}function Mn(n,t){n&1&&s(0," - ")}var Se=class n{payEvent=new N;totalItems=0;totalQuantity=0;totalAmount=0;rolePrice=!0;constructor(){}ngOnInit(){}onPay(){this.payEvent.emit()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=I({type:n,selectors:[["app-pay-button"]],inputs:{totalItems:"totalItems",totalQuantity:"totalQuantity",totalAmount:"totalAmount",rolePrice:"rolePrice"},outputs:{payEvent:"onPayEvent"},decls:10,vars:5,consts:[["type","button",1,"btn","btn-success","fs-1","py-4","w-100",3,"click"],[1,"d-flex","align-items-center","justify-content-between"],[1,"fs-6"]],template:function(e,i){e&1&&(Y(0,"button",0),Mt("click",function(){return i.onPay()}),Y(1,"div",1)(2,"div")(3,"span"),s(4,"Submit"),at(),Y(5,"small",2),s(6),v(7,"number"),at()(),b(8,Dn,3,3,"div")(9,Mn,1,0),at()()),e&2&&(c(6),ht(" (",h(7,3,i.totalItems)," Items & ",i.totalQuantity," Qty) "),c(2),_(i.rolePrice?8:9))},dependencies:[R,Z],styles:["button[_ngcontent-%COMP%]{border-right:.1px solid #fff;margin-left:-1px;border-top-left-radius:0;border-bottom-left-radius:0;position:relative;flex:1 1 auto;border-left:.1px solid #fff}"]})};var Ie=class n{clickEvent=new N;onClick(){this.clickEvent.emit()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=I({type:n,selectors:[["app-discount-button"]],outputs:{clickEvent:"onClickEvent"},decls:2,vars:0,consts:[["type","button","matTooltip","Discount / Tax","matTooltipPosition","above",1,"btn","btn-success","fs-5",3,"click"],[1,"fa-light","fa-percent"]],template:function(e,i){e&1&&(r(0,"button",0),d("click",function(){return i.onClick()}),D(1,"i",1),a())},dependencies:[re,oe],styles:["button[_ngcontent-%COMP%]{border-right:.1px solid #fff;border-top-right-radius:0;border-bottom-right-radius:0;position:relative;flex:1 1 auto}"]})};var Qt=class n{store=p(S);toastr=p(ie);dialog=p(nt);_backEndService=p(gi);updateState$=B(this.store.complete).pipe(P(t=>t.Success),O(()=>this.store.updateState(3)),V());constructor(){this.updateState$.subscribe()}onPay(){if(this.validatePayOrder()==!1)return;let e={Items:this.cartItemPreSubmission(),Order:T({},this.store.order())};this._backEndService.submitTransaction(e,L.SubmitEstimate).subscribe(i=>{this.store.updateComplete(i)})}cartItemPreSubmission(){let t=JSON.parse(JSON.stringify(this.store.cartItems()));return t=t.map(e=>(delete e.Variant,e)),t}validatePayOrder(){let t=!0;return g.IsEmpty(this.store.outlet().ID)&&(this.toastr.error("Please select outlet before proceeding..",yt.Error),t=!1),g.IsEmpty(this.store.customer().Key)&&(this.toastr.warning("Please select a customer!",yt.Warning),t=!1),this.store.cartItems().length==0&&(this.toastr.error("You must have at least one item.",yt.Error),t=!1),g.IsEmpty(this.store.order().Number)&&(this.toastr.error("Number cannot be empty.",yt.Error),t=!1),t}static \u0275fac=function(e){return new(e||n)};static \u0275prov=w({token:n,factory:n.\u0275fac})};var De=class n{constructor(t,e){this.dialogRef=e;this.discountAmount.set(t.discountAmount),this.discount.set(t.discount),this.tax=k(t.tax),this.currency=k(t.currency),this.taxes.set(t.taxes),this.initModalConfig()}modalConfig=new Ft;discountAmount=k(0);discount=k(0);tax;discounts=k([0,0,0]);currency;taxes=k([]);initModalConfig(){this.modalConfig.title="Discount and Tax",this.modalConfig.customWidth="400px"}onClose(){this.dialogRef.close()}onSave(){this.dialogRef.close({discountAmount:this.discountAmount(),discount:this.discount(),tax:this.tax()})}onSelectTax(t){this.tax.set(t)}onDiscountCalculatorChange(t,e){let i=this.discounts();i[e]=t,this.discounts.set(i),this.calculateDiscountCalculator()}calculateDiscountCalculator(){let t=this.discounts(),e=100;t.forEach(o=>{o&&o>0&&(e=e*(100-o)/100)});let i=100-e;this.discount.set(i)}static \u0275fac=function(e){return new(e||n)(K(At),K(Nt))};static \u0275cmp=I({type:n,selectors:[["app-dialog-discount"]],decls:48,vars:10,consts:[[3,"keydown.F2","onOk","onCancel","onClose","config"],[1,"container"],["matTooltipPosition","above","matTooltip","Discount","tabTitle","Discount"],[1,"row","d-flex","align-items-center","justify-content-start"],[1,"col-3"],[1,"fw-bold","d-block"],[1,"col-9"],["type","text","data-cy","discount1","autoNum","","percentage","","decimalPlaces","2",1,"form-control","d-inline-block",2,"width","100px",3,"ngModelChange","ngModel"],[1,"ms-1"],[1,"row","d-flex","align-items-center","justify-content-start","mt-6"],["type","text","data-cy","discountamount","autoNum","",1,"form-control","d-inline-block",2,"width","100px",3,"ngModelChange","ngModel"],["matTooltipPosition","above","matTooltip","Tax","tabTitle","Tax"],["bindLabel","Label","appendTo","body","bindValue","ID","placeholder","Tax","data-cy","Tax",2,"width","150px",3,"change","clearable","ngModel","items"],["matTooltipPosition","above","matTooltip","Calculation","tabTitle","Calculator"],[1,"row","mt-6","g-0","d-flex","align-items-center","justify-content-start"],[1,"col-4"],[1,"col-8","ps-4"],["type","text","data-cy","discountCal1","autoNum","","percentage","",1,"form-control","d-inline-block",2,"width","47px",3,"ngModelChange","ngModel"],[1,"mx-2"],["type","text","data-cy","discountCal2","autoNum","","percentage","",1,"form-control","d-inline-block",2,"width","47px",3,"ngModelChange","ngModel"],["type","text","data-cy","discountCal3","autoNum","","percentage","",1,"form-control","d-inline-block",2,"width","47px",3,"ngModelChange","ngModel"]],template:function(e,i){if(e&1&&(r(0,"modal-material",0),d("keydown.F2",function(){return i.onSave()})("onOk",function(){return i.onSave()})("onCancel",function(){return i.onClose()})("onClose",function(){return i.onClose()}),r(1,"content")(2,"div",1)(3,"custom-tabs"),mt(4),r(5,"tab",2)(6,"div",3)(7,"div",4)(8,"label",5),s(9,"Discount %"),a()(),r(10,"div",6)(11,"input",7),Q("ngModelChange",function(l){return j(i.discount,l)||(i.discount=l),l}),a(),r(12,"span",8),s(13,"%"),a()()(),r(14,"div",9)(15,"div",4)(16,"label",5),s(17),a()(),r(18,"div",6)(19,"input",10),Q("ngModelChange",function(l){return j(i.discountAmount,l)||(i.discountAmount=l),l}),a()()()(),pt(),mt(20),r(21,"tab",11)(22,"div",3)(23,"div",4)(24,"label",5),s(25,"Tax"),a()(),r(26,"div",6)(27,"ng-select",12),d("change",function(l){return i.onSelectTax(l)}),a()()()(),pt(),mt(28),r(29,"tab",13)(30,"div",14)(31,"div",15)(32,"label",5),s(33,"Discount Calculator"),a()(),r(34,"div",16)(35,"input",17),d("ngModelChange",function(l){return i.onDiscountCalculatorChange(l,0)}),a(),r(36,"span"),s(37," %"),a(),r(38,"span",18),s(39,"+"),a(),r(40,"input",19),d("ngModelChange",function(l){return i.onDiscountCalculatorChange(l,1)}),a(),r(41,"span"),s(42," %"),a(),r(43,"span",18),s(44,"+"),a(),r(45,"input",20),d("ngModelChange",function(l){return i.onDiscountCalculatorChange(l,2)}),a(),r(46,"span"),s(47," %"),a()()()(),pt(),a()()()()),e&2){let o;u("config",i.modalConfig),c(11),U("ngModel",i.discount),c(6),x("Discount ",(o=i.currency())==null?null:o.Symbol),c(2),U("ngModel",i.discountAmount),c(8),u("clearable",!1)("ngModel",i.tax().ID)("items",i.taxes()),c(8),u("ngModel",i.discounts[0]),c(5),u("ngModel",i.discounts[1]),c(5),u("ngModel",i.discounts[2])}},dependencies:[Bt,Rt,pe,ue,de,it,tt,z,et,Vt,ut,gt],encapsulation:2})};var vt=class n{storeService=p(S);totalItemsQty=q(()=>this.storeService.cartItems().reduce((i,o)=>i+o.Quantity,0));totalItemsAmount=q(()=>this.storeService.cartItems().reduce((i,o)=>i+o.Total,0));taxAmount=q(()=>{let t=this.storeService.tax(),e=0;return t.Rate>0&&(t.CalculationTypeID==1?e=this.calculateTaxInclude(t):e=this.calculateTaxAdd(t)),e});totalAmount=q(()=>{let t=this.storeService.tax(),e=this.storeService.order().DiscountAmount,i=this.storeService.order().Discount,o=this.totalItemsAmount(),l=this.calculatePercentagDisc(i,o),y=o-e-l;return t.CalculationTypeID==0&&(y=y+this.taxAmount()),y});discountPercentageAmount=q(()=>{let t=this.storeService.order().Discount,e=this.totalItemsAmount();return this.calculatePercentagDisc(t,e)});calculateTaxInclude(t){let e=this.grossTotalTaxable();return t.Rate/(100+t.Rate)*e}calculateTaxAdd(t){let e=this.grossTotalTaxable();return t.Rate/100*e}grossTotalTaxable(){let t=this.taxableItems(),e=this.calculateTaxableItemsPrice(),i=this.storeService.discount();if(t.length!==0){let o=this.calculateDiscountTaxableItem();e=e*(100-i.discount)/100,e=e-o}return e}calculateDiscountTaxableItem(){let t=this.taxableItems(),e=this.totalItemsAmount(),i=this.storeService.discount().discountAmount,o=0,l=0,y=0,M=0;for(let W of t)o=W.getItemAfterDiscount/e,l=o*i,M=l*W.Quantity,y+=M;return y}calculatePercentagDisc(t,e){return t/100*e}calculateTaxableItemsPrice(){return this.taxableItems().filter(i=>i.Taxable).reduce((i,o)=>i+o.Total,0)}taxableItems(){return this.storeService.cartItems().filter(e=>e.Taxable)}static \u0275fac=function(e){return new(e||n)};static \u0275prov=w({token:n,factory:n.\u0275fac})};var On=n=>({selected:n});function wn(n,t){if(n&1){let e=A();r(0,"div",9)(1,"span",14),s(2,"@"),a(),r(3,"input",15),Q("ngModelChange",function(o){C(e);let l=m();return j(l.currency().ExchangeRate,o)||(l.currency().ExchangeRate=o),f(o)}),a()()}if(n&2){let e=m();c(3),U("ngModel",e.currency().ExchangeRate)}}function Tn(n,t){if(n&1){let e=A();r(0,"div",13)(1,"label",16)(2,"input",17),d("ngModelChange",function(){let o=C(e).$implicit,l=m();return f(l.onChangeTag(o.ID))}),a(),s(3),a()()}if(n&2){let e,i=t.$implicit,o=t.$index,l=m();c(),u("for",ke("potype-"+o))("ngClass",$(7,On,((e=l.tag())==null?null:e.ID)==i.ID)),c(),u("id",ke("potype-"+o))("ngModel",l.tag().ID),c(),x(" ",i.Name," ")}}var Me=class n{constructor(t,e){this.dialogRef=e;this.initModalConfig(),this.currencies.set(t.currencies),this.note.set(t.note),this.tags.set(t.tags),this.tag=k(t.tag),this.currency=k(t.currency),this.defaultCurrencyId=k(t.defaultCurrencyId)}modalConfig=new Ft;currencies=k([]);tags=k([]);tag;currency;defaultCurrencyId;note=k("");initModalConfig(){this.modalConfig.title="Order Note",this.modalConfig.customWidth="700px"}onChangeCurrency(t){let e=this.currencies()?.find(i=>i.ID===t);this.currency.set(e)}onChangeTag(t){let e=this.tags()?.find(i=>i.ID===t);this.tag.set(e)}onClose(){this.dialogRef.close()}onSave(){this.dialogRef.close({currency:this.currency(),tag:this.tag(),note:this.note()})}static \u0275fac=function(e){return new(e||n)(K(At),K(Nt))};static \u0275cmp=I({type:n,selectors:[["app-dialog-note"]],decls:20,vars:6,consts:[[3,"keydown.F2","onOk","onCancel","onClose","config"],[1,"container"],["matTooltipPosition","above","matTooltip","Notes","tabTitle","Notes"],[3,"ngModelChange","ngModel"],["matTooltipPosition","above","matTooltip","Currency","tabTitle","Currency"],[1,"row","d-flex","align-items-center","justify-content-start","mt-6"],[1,"row","ms-4"],[1,"ps-0","col-sm-4"],["bindLabel","Name","bindValue","ID","placeholder","Currency","appendTo","body",3,"ngModelChange","items","clearable","ngModel"],[1,"col-sm-4","d-flex"],["matTooltipPosition","above","matTooltip","Tag","tabTitle","Tag"],[1,"row"],[1,"col-12"],[1,"rad-btn"],[1,"pt-4"],["type","text","autoNum","",1,"border","border-light",3,"ngModelChange","ngModel"],[3,"for","ngClass"],["type","radio",3,"ngModelChange","ngModel","id"]],template:function(e,i){if(e&1&&(r(0,"modal-material",0),d("keydown.F2",function(){return i.onSave()})("onOk",function(){return i.onSave()})("onCancel",function(){return i.onClose()})("onClose",function(){return i.onClose()}),r(1,"content")(2,"div",1)(3,"custom-tabs"),mt(4),r(5,"tab",2)(6,"POS-tinymce-editor",3),Q("ngModelChange",function(l){return j(i.note,l)||(i.note=l),l}),a()(),pt(),mt(7),r(8,"tab",4)(9,"div",5)(10,"div",6)(11,"div",7)(12,"ng-select",8),d("ngModelChange",function(l){return i.onChangeCurrency(l)}),a()(),b(13,wn,4,1,"div",9),a()()(),pt(),mt(14),r(15,"tab",10)(16,"div",11)(17,"div",12),It(18,Tn,4,9,"div",13,St),a()()(),pt(),a()()()()),e&2){let o;u("config",i.modalConfig),c(6),U("ngModel",i.note),c(6),u("items",i.currencies())("clearable",!1)("ngModel",i.currency().ID),c(),_(((o=i.currency())==null?null:o.ID)!=i.defaultCurrencyId()?13:-1),c(5),Dt(i.tags())}},dependencies:[R,X,Bt,Rt,pe,ue,de,it,tt,ei,z,et,Vt,ut,gt,ce,le],styles:[".text-warning[_ngcontent-%COMP%]{color:var(--bs-warning)!important}.bg-light-gray[_ngcontent-%COMP%]{background-color:var(--bs-light-gray);--bs-bg-opacity: .15 !important}.bg-gradient-danger[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#f8d7da,#f8d7da 15px,#f5c6cb 15px 30px)!important}.bg-gradient-success[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#beeebb,#beeebb 15px,#afeba8 15px 30px)!important}.bg-gradient-warning[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#fcf3cf,#fcf3cf 15px,#f9e79f 15px 30px)!important}.bg-light-orange[_ngcontent-%COMP%]{background-color:var(--bs-light-orange);--bs-bg-opacity: .15 !important}.text-danger[_ngcontent-%COMP%]{color:#fb404b!important}.text-dark[_ngcontent-%COMP%]{color:#5e5e5e!important}.text-success[_ngcontent-%COMP%]{color:#87cb16!important}.text-black[_ngcontent-%COMP%]{color:#000!important}.text-white[_ngcontent-%COMP%]{color:var(--bs-white)!important}.btn-light-blue[_ngcontent-%COMP%]{color:#212529;background-color:#dfeffc!important;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:hover{color:#212529;background-color:#bcdef9;border-color:#b0d8f8}.btn-light-blue[_ngcontent-%COMP%]:focus, .btn-light-blue.focus[_ngcontent-%COMP%]{color:#212529;background-color:#bcdef9;border-color:#b0d8f8;box-shadow:0 0 0 .2rem #c3d1dc80}.btn-light-blue.disabled[_ngcontent-%COMP%], .btn-light-blue[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#dfeffc;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#b0d8f8;border-color:#a5d2f7}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #c3d1dc80}.btn-light-danger[_ngcontent-%COMP%]{color:#212529;background-color:#f8d7da!important;border-color:#f8d7da}.btn-light-danger[_ngcontent-%COMP%]:hover{color:#212529;background-color:#f5c2c7;border-color:#f1aeb5}.btn-light-danger[_ngcontent-%COMP%]:focus, .btn-light-danger.focus[_ngcontent-%COMP%]{color:#212529;background-color:#f5c2c7;border-color:#f1aeb5;box-shadow:0 0 0 .2rem #dc354540}.btn-light-danger.disabled[_ngcontent-%COMP%], .btn-light-danger[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#f8d7da;border-color:#f8d7da}.btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-danger.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#f1aeb5;border-color:#ea868f}.btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-danger.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #dc354540}.rad-btn[_ngcontent-%COMP%]{position:relative;display:inline-block}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #dddddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label.selected[_ngcontent-%COMP%]{background:#dcdcdc;border:1px solid #dcdcdc}"]})};var Pe=class n{onClickEvent=new N;constructor(){}ngOnInit(){}onClick(){this.onClickEvent.emit()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=I({type:n,selectors:[["app-clear-button"]],outputs:{onClickEvent:"onClickEvent"},decls:3,vars:0,consts:[["type","button",1,"btn","btn-gray","w-100","fs-3","px-0","py-6","headings-font-family",3,"click"]],template:function(e,i){e&1&&(Y(0,"button",0),Mt("click",function(){return i.onClick()}),Y(1,"span"),s(2,"Clear"),at()())},styles:[".btn-gray[_ngcontent-%COMP%]{border:1px solid #d6d6d6;color:#545454!important;background:linear-gradient(to bottom,#fff,#eee)}"]})};function kn(n,t){if(n&1&&(r(0,"tr")(1,"th",11),s(2,"Amount"),a(),r(3,"td",12),s(4),v(5,"number"),a()()),n&2){let e=m();c(4),F(h(5,1,e.calculationService==null?null:e.calculationService.totalItemsAmount()))}}function Nn(n,t){if(n&1&&(r(0,"tr")(1,"th",11),s(2),a(),r(3,"td",13),s(4),v(5,"number"),a()()),n&2){let e=m(2);c(2),x("Discount ",e.storeService==null?null:e.storeService.discount().discount,"%"),c(2),x(" ",h(5,2,e.calculationService.discountPercentageAmount()*-1))}}function An(n,t){if(n&1&&(r(0,"tr")(1,"th",11),s(2),a(),r(3,"td",13),s(4),v(5,"number"),a()()),n&2){let e,i,o=m(2);c(2),x("Discount ",(e=o.storeService.currency())==null?null:e.Symbol),c(2),x(" ",h(5,2,((i=o.storeService.discount())==null?null:i.discountAmount)*-1))}}function Vn(n,t){if(n&1&&(r(0,"tr")(1,"th",11),s(2),a(),r(3,"td",12),s(4),v(5,"number"),a()()),n&2){let e,i=m(2);c(2),F((e=i.storeService.tax())==null?null:e.Label),c(2),F(h(5,2,i.calculationService.taxAmount()))}}function Fn(n,t){if(n&1&&(b(0,Nn,6,4,"tr"),b(1,An,6,4,"tr"),b(2,Vn,6,4,"tr")),n&2){let e,i,o=m();_(o.storeService.discount().discount!=0?0:-1),c(),_(((e=o.storeService.discount())==null?null:e.discountAmount)!=0?1:-1),c(),_(((i=o.storeService.tax())==null?null:i.Rate)!=0?2:-1)}}var Ee=class n{storeService=p(S);orderService=p(lt);roleService=p(dt);payService=p(Qt);calculationService=p(vt);cartService=p(ct);dialog=p(nt);taxCalculationType=ae;totalItemsQty=q(()=>this.storeService.cartItems()?.length);isShowAmount=q(()=>this.storeService?.tax()?.CalculationTypeID==0&&this.storeService?.tax()?.Rate||this.storeService.discount()?.discount!=0||this.storeService.discount()?.discountAmount!=0);onOpenDialogNote(){this.dialog.open(Me,{data:{tags:this.storeService.loadForm().SalesOrderTags,currencies:this.storeService.loadForm().Currencies,currency:this.storeService.currency(),tag:this.storeService.tag(),defaultCurrencyId:this.storeService.loadForm()?.AppConfigJSON?.CoreDefaults?.CurrencyID,note:this.storeService.order().Note}}).afterClosed().pipe(P(t=>g.IsNotEmpty(t))).subscribe(t=>{this.storeService.updateCurrency(t.currency),this.storeService.updateTag(t.tag),this.storeService.updateOrder(Lt(T({},this.storeService.order()),{Note:t.note}))})}onOpenDialogDiscount(){this.dialog.open(De,{data:{discountAmount:this.storeService.order().DiscountAmount,discount:this.storeService.order().Discount,tax:this.storeService.tax(),currency:this.storeService.currency(),taxes:this.storeService.loadForm().Taxes}}).afterClosed().pipe(P(t=>g.IsNotEmpty(t))).subscribe(t=>{this.storeService.updateDiscount({discountAmount:t.discountAmount,discount:t.discount}),this.storeService.updateTax(t.tax)})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=I({type:n,selectors:[["POS-cart-action"]],decls:13,vars:6,consts:[[1,"row","g-0","px-5","justify-content-end"],[1,"col-6",2,"padding-right","15px"],[1,"table","table-borderless"],[1,"row","g-0","pb-6","px-5"],[1,"col-5","d-flex","justify-content-between","pe-5",2,"column-gap","12px"],[2,"flex-grow","1",3,"onClickEvent"],[2,"flex-grow","3",3,"onClickEvent"],[1,"col-7"],[1,"btn-group","w-100"],[1,"d-inline-flex",3,"onClickEvent"],[1,"d-inline-flex","w-100",3,"onPayEvent","rolePrice","totalQuantity","totalItems","totalAmount"],[1,"text-start"],[1,"text-end","fs-5"],[1,"text-end","fs-5","text-danger"]],template:function(e,i){e&1&&(r(0,"div",0)(1,"div",1)(2,"table",2),b(3,kn,6,3,"tr"),b(4,Fn,3,3),a()()(),r(5,"div",3)(6,"div",4)(7,"app-note-button",5),d("onClickEvent",function(){return i.onOpenDialogNote()}),a(),r(8,"app-clear-button",6),d("onClickEvent",function(){return i.cartService.clearCart()}),a()(),r(9,"div",7)(10,"div",8)(11,"app-discount-button",9),d("onClickEvent",function(){return i.onOpenDialogDiscount()}),a(),r(12,"app-pay-button",10),d("onPayEvent",function(){return i.payService.onPay()}),a()()()()),e&2&&(c(3),_(i.isShowAmount()?3:-1),c(),_(i.calculationService.totalItemsQty()>0?4:-1),c(8),u("rolePrice",i.roleService.product.Price)("totalQuantity",i.calculationService.totalItemsQty())("totalItems",i.totalItemsQty())("totalAmount",i.calculationService.totalAmount()))},dependencies:[R,Ie,xe,Se,Pe,Z],encapsulation:2})};var Qi=n=>({ID:n}),Rn=()=>["/menu/Orders/Orders/Estimate/Info"],Bn=n=>({"border-top":n});function Un(n,t){if(n&1&&(r(0,"div",23)(1,"div",28),s(2),a(),r(3,"div",28),s(4),v(5,"number"),a()()),n&2){let e=t.$implicit;c(2),F(e.Name),c(2),x("",h(5,2,e.Total)," ")}}function jn(n,t){if(n&1&&(r(0,"div",24)(1,"div",29),s(2),a(),r(3,"div",29),s(4),v(5,"number"),a()()),n&2){let e,i=m();c(2),x("Amount: ",(e=i.storeService.currency())==null?null:e.Symbol),c(2),F(h(5,2,i.calculationService.totalItemsAmount()))}}function Qn(n,t){if(n&1&&(r(0,"div",25)(1,"div",29),s(2),v(3,"number"),a(),r(4,"div",30),s(5),v(6,"number"),a()()),n&2){let e,i=m();c(2),ht("","Discount "+h(3,3,(e=i.storeService.discount())==null?null:e.discount)+" %",": ",(e=i.storeService.currency())==null?null:e.Symbol),c(3),F(h(6,5,i.calculationService.discountPercentageAmount()*-1))}}function Ln(n,t){if(n&1&&(r(0,"div",25)(1,"div",29),s(2),a(),r(3,"div",30),s(4),v(5,"number"),a()()),n&2){let e,i,o=m();c(2),x("Discount: ",(e=o.storeService.currency())==null?null:e.Symbol),c(2),x("",h(5,2,((i=o.storeService.discount())==null?null:i.discountAmount)*-1)," ")}}function Wn(n,t){if(n&1&&(r(0,"div",25)(1,"div",29),s(2),a(),r(3,"div",29),s(4),v(5,"number"),a()()),n&2){let e,i=m();c(2),ht("",(e=i.storeService.tax())==null?null:e.Label,": ",(e=i.storeService.currency())==null?null:e.Symbol),c(2),F(h(5,3,i.calculationService.taxAmount()))}}var Oe=class n{orderService=p(lt);calculationService=p(vt);storeService=p(S);isShowAmount=q(()=>this.storeService?.tax()?.CalculationTypeID==0&&this.storeService?.tax()?.Rate||this.storeService.discount()?.discount!=0||this.storeService.discount()?.discountAmount!=0);handleF8(){this.orderService.newOrder()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=I({type:n,selectors:[["POS-complete"]],hostBindings:function(e,i){e&1&&d("keydown.F8",function(l){return i.handleF8(l)},Kt)},decls:41,vars:20,consts:[[1,"pt-7",2,"border-bottom","1px solid rgba(0, 0, 0, 0.1)"],[1,"ps-7","fw-normal","pb-9"],[1,"order-complete"],[1,"container-fluid","pt-8"],[1,"row"],[1,"col-8"],[1,"card"],[1,"card-header",2,"padding-bottom","15px"],[1,"fw-normal",2,"font-size","32px"],[1,"fa-solid","fa-check","me-3"],[1,"card-body"],[1,"row",2,"height","115px"],[1,"col","text-center","my-auto"],[1,"btn","btn-success","w-50",2,"font-size","20px",3,"click"],[1,"card-footer"],[1,"d-flex","justify-content-between","my-6"],["target","_blank","routerLink","/print/Estimate",1,"btn","bg-light-gray","btn-secondary",3,"queryParams"],[1,"fa-solid","fa-print","me-2"],[1,"col-4"],[1,"card-header","bg-light-gray",2,"padding-bottom","15px"],[1,"fst-italic"],["target","_blank",3,"routerLink","queryParams"],[1,"card-body","py-4"],[1,"row","justify-content-between","border-bottom","py-2"],[1,"row","justify-content-end","mt-2","pb-2"],[1,"row","justify-content-end","pb-2"],[1,"row","justify-content-end","pt-4",3,"ngClass"],[1,"col-4","text-end","h5"],[1,"col","text-end"],[1,"col-4","text-end"],[1,"col-4","text-end","text-danger"]],template:function(e,i){if(e&1&&(r(0,"div",0)(1,"h1",1),s(2,"Estimate"),a()(),r(3,"section",2)(4,"div",3)(5,"div",4)(6,"div",5)(7,"div",6)(8,"div",7)(9,"h1",8),D(10,"i",9),s(11,"Order Complete "),a()(),r(12,"div",10)(13,"div",11)(14,"div",12)(15,"a",13),d("click",function(){return i.orderService.newOrder()}),s(16,"New Order (F8)"),a()()()(),r(17,"div",14)(18,"div",15)(19,"a",16),D(20,"i",17),s(21,"Print Receipt"),a()()()()(),r(22,"div",18)(23,"div",6)(24,"div",19)(25,"h3",20)(26,"a",21),s(27),a()()(),r(28,"div",22),It(29,Un,6,4,"div",23,St),b(31,jn,6,4,"div",24),b(32,Qn,7,7,"div",25),b(33,Ln,6,4,"div",25),b(34,Wn,6,5,"div",25),r(35,"div",26)(36,"div",27),s(37),a(),r(38,"div",27),s(39),v(40,"number"),a()()()()()()()()),e&2){let o,l,y,M,W;c(19),u("queryParams",$(13,Qi,i.storeService.complete().OrderID)),c(7),u("routerLink",Zt(15,Rn))("queryParams",$(16,Qi,i.storeService.complete().OrderID)),c(),x("Estimate #",(o=i.storeService.complete())==null?null:o.InvoiceNumber),c(2),Dt(i.storeService.cartItems()),c(2),_(i.isShowAmount()?31:-1),c(),_(((l=i.storeService.discount())==null?null:l.discount)>0?32:-1),c(),_(((y=i.storeService.discount())==null?null:y.discountAmount)>0?33:-1),c(),_(((M=i.storeService.tax())==null?null:M.Rate)>0?34:-1),c(),u("ngClass",$(18,Bn,i.isShowAmount())),c(2),x("Total: ",(W=i.storeService.currency())==null?null:W.Symbol),c(2),F(h(40,11,i.calculationService.totalAmount()))}},dependencies:[R,X,ee,te,ui,Z],styles:[".order-complete[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] .card-header[_ngcontent-%COMP%]{border-bottom:1px solid rgba(0,0,0,.125);padding-bottom:.9375rem}.order-complete[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] .card-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:2rem}.order-complete[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] .card-body[_ngcontent-%COMP%] .container[_ngcontent-%COMP%]{max-width:500px;margin-top:30px;margin-bottom:30px}"]})};var we=class n{route=p(Ot);dialog=p(nt);addItem=new N;handleF8(){this.dialog.openDialogs&&this.dialog.openDialogs.length>0||this.onAddItem()}onAddItem(){this.addItem.emit()}redirectToPrevious(){this.route.navigate(["/menu/Estimate/V1"])}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=I({type:n,selectors:[["POS-more-action"]],hostBindings:function(e,i){e&1&&d("keydown.F4",function(l){return i.handleF8(l)},Kt)},outputs:{addItem:"onAddItem"},decls:14,vars:0,consts:[["id","moreMenu","data-bs-toggle","dropdown",1,"d-flex","align-items-center","cursor-pointer"],[1,"me-2"],[1,"fa-solid","fa-caret-down","fa-lg"],[1,"fs-6","headings-font-family","pb-1"],[1,"h-100","d-flex","align-items-center","justify-content-between"],["aria-labelledby","moreMenu",1,"dropdown-menu","more-actions"],[1,"d-flex"],[1,"dropdown-header","text-dark","col"],[1,"h5","mb-4"],[1,"dropdown-divider","m-0"],[1,"cursor-pointer",3,"click"],["icon","fa-circle-plus fa-solid","label","Add New"]],template:function(e,i){e&1&&(r(0,"span",0)(1,"span",1),D(2,"i",2),a(),r(3,"span",3),s(4,"More Actions"),a()(),r(5,"div",4)(6,"div",5)(7,"div",6)(8,"div",7)(9,"div",8),s(10,"Item"),a(),D(11,"div",9),r(12,"li",10),d("click",function(){return i.onAddItem()}),D(13,"POS-dropdown-item-more-action",11),a()()()()())},dependencies:[Vi],encapsulation:2})};function $n(n,t){n&1&&D(0,"POS-complete")}function qn(n,t){if(n&1){let e=A();r(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"POS-select-outlet-form",6),v(6,"async"),d("ngModelChange",function(o){C(e);let l=m();return f(l.outletService.updateOutlet(o))}),a()(),r(7,"POS-invoice-number-form",7),v(8,"async"),d("ngModelChange",function(o){C(e);let l=m();return f(l.orderService.updateOrderNumber(o))}),a(),r(9,"POS-invoice-date",8),d("ngModelChange",function(o){C(e);let l=m();return f(l.orderService.updateOrderDate(o))}),a()()(),r(10,"div",9)(11,"div",10)(12,"div",11)(13,"POS-more-action",12),d("onAddItem",function(){C(e);let o=m();return f(o.cartItemService.onOpenAddDialog())}),a()(),r(14,"div",13)(15,"ng-select-infinite",14,0),v(17,"async"),d("selectedChange",function(o){C(e);let l=m();return f(l.orderService.updateSalesPersonId(o))}),a()()()()(),r(18,"div",15)(19,"div",16)(20,"POS-quick-key",17),v(21,"async"),d("onSelectVariant",function(o){C(e);let l=m();return f(l.cartItemService.onSelectQuickkeyItem(o))}),a()(),r(22,"div",18)(23,"div",19)(24,"div",20),D(25,"POS-variant-autocomplete",21),a(),r(26,"div",13)(27,"POS-customer-autocomplete",22),d("onCreateNewCustomer",function(){C(e);let o=m();return f(o.customerService.createNewCustomer())})("ngModelChange",function(o){C(e);let l=m();return f(l.customerService.onSelectCustomer(o))})("onClickInput",function(){C(e);let o=m();return f(o.customerService.onDeleteCustomer())}),a()()(),r(28,"POS-cart-display",23),v(29,"async"),d("onRemove",function(o){C(e);let l=m();return f(l.cartItemService.removeCartItem(o))})("onEdit",function(o){C(e);let l=m();return f(l.cartItemService.onOpenEditDialog(o))})("onDropItems",function(o){C(e);let l=m();return f(l.cartItemService.onDropItems(o))})("onPurchase",function(o){C(e);let l=m();return f(l.cartItemService.onPurchaseItem(o))})("onReturn",function(o){C(e);let l=m();return f(l.cartItemService.onReturnItem(o))}),a(),D(30,"POS-cart-action"),a()()()}if(n&2){let e,i=m();c(5),u("ngModel",i.storeService.outlet())("outlets",i.storeService.loadForm().Entities)("isOpenAfterLoad",h(6,18,i.outletService.isOpenDialog$)),c(2),u("ngModel",h(8,20,i.orderService.orderNumber$))("isEdit",i.isEditOrder()),c(2),u("ngModel",i.storeService.order().Date)("disabled",!(!(i.role==null||i.role.global==null)&&i.role.global.Date))("tooltip",!(i.role==null||i.role.global==null)&&i.role.global.Date?"":"Date role is required"),c(6),u("clearable",!0)("optionTitle",!0)("items",h(17,22,i.orderService.salesPersons$))("selected",i.storeService.order().SalesID),c(5),u("quickKey",h(21,24,i.quickkeyService.quickkeys$))("outletID",i.storeService.outlet().ID),c(5),u("formControl",i.cartItemService.variantSearchCtrl),c(2),u("ngModel",i.storeService.customer()),c(),u("cartItems",h(29,26,i.cartItemService.cartItems$))("appConfig",(e=i.storeService.loadForm())==null?null:e.AppConfigJSON)}}var Li=class n extends ci{loadFormService=p(Wt);storeService=p(S);role=p(dt);outletService=p($t);orderService=p(lt);quickkeyService=p(qt);cartItemService=p(ct);customerService=p(Gt);intercomService=p(ii);isCompleteOrder=q(()=>this.storeService.state()==3);isEditOrder=q(()=>this.storeService.state()==1);constructor(t){super(t),this.menuData$.subscribe(),this.intercomService.hideLauncher()}ngOnDestroy(){this.intercomService.showLauncher()}static \u0275fac=function(e){return new(e||n)(K(si))};static \u0275cmp=I({type:n,selectors:[["POS-estimate-v2"]],features:[Pt([S,Wt,$t,lt,qt,ct,Gt,Qt,vt,ft,_t]),He],decls:2,vars:1,consts:[["ngSelectInfinite",""],[1,"container-fluid"],[1,"row","header","border-bottom"],[1,"col-5","border-end"],[1,"left-toolbar-container","h-100","d-flex","align-items-center","justify-content-between"],[1,"d-flex"],[3,"ngModelChange","ngModel","outlets","isOpenAfterLoad"],["transactionType","Estimate",3,"ngModelChange","ngModel","isEdit"],[3,"ngModelChange","ngModel","disabled","tooltip"],[1,"col-7","d-flex","align-items-center"],[1,"row","flex-grow-1"],[1,"col-lg-7","col-5","d-flex","align-items-center"],[3,"onAddItem"],[1,"col-5","ps-0"],["bindValue","ID","bindLabel","Name","placeholder","Assign Sales Person",1,"sales-person","select-max-width",3,"selectedChange","clearable","optionTitle","items","selected"],[1,"row","content"],[1,"col-5","border-end","pt-1"],[3,"onSelectVariant","quickKey","outletID"],[1,"col-7","pt-5","px-0","d-flex","flex-column"],[1,"row","w-100","ms-0"],[1,"col-7","px-0"],[3,"formControl"],[3,"onCreateNewCustomer","ngModelChange","onClickInput","ngModel"],[1,"cart-display",3,"onRemove","onEdit","onDropItems","onPurchase","onReturn","cartItems","appConfig"]],template:function(e,i){e&1&&b(0,$n,1,0,"POS-complete")(1,qn,31,28,"div",1),e&2&&_(i.isCompleteOrder()?0:1)},dependencies:[R,Ti,kt,z,Tt,ki,it,et,vi,bi,fi,Ni,he,ye,me,ge,Ee,Oe,we,Et],styles:["ng-select-infinite.sales-person.select-max-width>ng-select{padding-right:10px;height:38px} ng-select-infinite.sales-person.select-max-width>.ng-select.ng-select-single .ng-select-container{font-size:.75rem;border:.5px solid #d7d7d7;padding-right:6px} ng-select-infinite.sales-person.select-max-width>.ng-select.ng-select-single .ng-select-container>.ng-arrow-wrapper{width:12px;padding-bottom:2px} ng-select-infinite.sales-person.select-max-width>.ng-select.ng-select-single .ng-select-container>.ng-value-container{padding-left:6px} ng-select-infinite.sales-person.select-max-width>.ng-select.ng-select-single .ng-select-container{min-height:38px!important;height:38px!important;border:none} ng-select-infinite.sales-person.select-max-width.offline>.ng-select.ng-select-single .ng-select-container{background:repeating-linear-gradient(-60deg,#f8d7da,#f8d7da 15px,#f5c6cb 15px 30px)!important} ng-select-infinite.sales-person.select-max-width>.ng-select.ng-select-single .ng-select-container .ng-input{padding-left:5px!important} ng-select-infinite.sales-person.select-max-width>.ng-select.ng-select-single .ng-select-container .ng-input>input{padding-top:5px} ng-select-infinite.sales-person.select-max-width>.ng-select.ng-select-single>ng-dropdown-panel.ng-dropdown-panel{font-size:.75rem;width:95%!important} ng-select-infinite.sales-person.select-max-width>.ng-select.ng-select-focused .ng-select-container{box-shadow:none!important;border-color:transparent!important}.left-toolbar-container[_ngcontent-%COMP%]{position:relative}.left-toolbar-container[_ngcontent-%COMP%] POS-invoice-number-form[_ngcontent-%COMP%]{position:absolute;top:34px;left:32px}.header[_ngcontent-%COMP%]{min-height:60px}.content[_ngcontent-%COMP%]{min-height:calc(100vh - 60px)}.supplier-more-menu[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.cart-display[_ngcontent-%COMP%]{flex-grow:1;height:0px;overflow-y:auto}input[_ngcontent-%COMP%]{width:100%;height:38px!important;border:0;border-bottom:1px solid #ced4da;padding-left:32px}input[_ngcontent-%COMP%]::placeholder{color:#ced4da}i[_ngcontent-%COMP%]{font-size:16px;top:10.6px;left:13px}.change[_ngcontent-%COMP%] .burger-lines[_ngcontent-%COMP%]{transition:.4s}.change[_ngcontent-%COMP%] .burger-lines[_ngcontent-%COMP%]:nth-child(1){-webkit-transform:rotate(-45deg) translate(-8px,4px);transform:rotate(-45deg) translate(-8px,4px)}.change[_ngcontent-%COMP%] .burger-lines[_ngcontent-%COMP%]:nth-child(2){opacity:0}.change[_ngcontent-%COMP%] .burger-lines[_ngcontent-%COMP%]:nth-child(3){-webkit-transform:rotate(45deg) translate(-5px,0px);transform:rotate(45deg) translate(-5px)}.mobile-button[_ngcontent-%COMP%]{display:none}@media (max-width: 990px){.mobile-button[_ngcontent-%COMP%]{display:block}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.more-actions[_ngcontent-%COMP%] div.d-flex[_ngcontent-%COMP%]{width:30rem}"]})};export{Li as EstimateV2Component};
@@ -1 +1 @@
1
- import{a as ge}from"./chunk-EHLQZKY6.js";import{a as ve}from"./chunk-WJL7IGC6.js";import{a as Ce}from"./chunk-OHYERAR6.js";import"./chunk-BYXBJQAS.js";import{e as ce,f as fe}from"./chunk-3G2IUR3X.js";import"./chunk-6KAJXZU4.js";import{b as se}from"./chunk-FV4VN5TM.js";import"./chunk-YJJAQOYJ.js";import"./chunk-NQ3TLVWW.js";import{u as pe,v as me,w as ue}from"./chunk-TO24XJZI.js";import"./chunk-KRTNI2QB.js";import{O as k}from"./chunk-CH2CJQUF.js";import{e as ae,f as le,g as de}from"./chunk-HS26VQGJ.js";import"./chunk-OWKXU5ZC.js";import"./chunk-XU5W6MOV.js";import"./chunk-2FWFPV5I.js";import"./chunk-7YBH2SXZ.js";import{E as oe,F as te,G as ne,c as J,e as h,h as Y,i as X,p as Q,t as Z,w as ee}from"./chunk-EEJEVJEF.js";import"./chunk-HG5EY2AA.js";import"./chunk-5YVJIGMT.js";import{a as F,d as re}from"./chunk-5ACAEXN7.js";import"./chunk-44MS566M.js";import{Ab as U,Bb as H,Ca as V,Cb as p,Db as i,E as T,Eb as r,Fb as c,Hc as K,Kc as L,Lb as $,Mb as G,Ob as v,Qb as C,Wd as W,Xa as l,_b as j,be as z,cd as M,db as f,dc as a,ec as x,ee as ie,fc as w,hb as y,jd as B,lb as A,nb as I,pa as _,rd as R,t as D,ta as P,ua as E,uc as b,vb as m,vc as q,xb as u,yb as O}from"./chunk-D4VXNK25.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var N=n=>({"is-invalid":n});function Ee(n,d){n&1&&(i(0,"div",16),a(1," Provider Name is required "),r())}function ye(n,d){n&1&&(i(0,"div",20),a(1," Validate Coupon URL is required "),r())}function Ge(n,d){n&1&&(i(0,"div",20),a(1," Redeem Coupon URL is required "),r())}function xe(n,d){n&1&&(i(0,"div",20),a(1,"Key is required"),r())}var S=class n{constructor(d){this.data=d;this.config=new pe,this.config.title="Register Provider",this.config.customWidth="600px",this.initForm()}dialogRef=_(ae);config;fb=_(oe);formGroup;initForm(){this.formGroup=this.fb.group({name:[this.data?.name||"",[h.required]],validateCoupon:[this.data?.validateCoupon||"",[h.required]],redeemCoupon:[this.data?.redeemCoupon||"",[h.required]],enabled:[this.data?.enabled!==void 0?this.data.enabled:!0],header:[this.data?.header,[h.required]]})}onClose(){this.dialogRef.close()}onOk(){this.formGroup.markAllAsTouched(),!this.formGroup.invalid&&this.dialogRef.close(this.formGroup.value)}static \u0275fac=function(e){return new(e||n)(f(le))};static \u0275cmp=y({type:n,selectors:[["app-modal-register-provider"]],decls:35,vars:18,consts:[[3,"onOk","onCancel","onClose","config"],[1,"container-fluid","pt-4"],[1,"row"],[1,"col-12"],[3,"formGroup"],[1,"mb-8"],[1,"d-flex","align-items-center"],[1,"flex-grow-1","me-3"],[1,"form-floating-outline","mb-0"],["type","text","placeholder","Provider Name","id","name","name","name","formControlName","name",1,"form-control","bg-white",3,"ngClass"],["for","name"],[2,"width","75px"],[1,"form-check-floating"],[1,"d-flex","justify-content-center","pt-7","pb-4"],["formControlName","enabled"],[1,"labelFilledInput","text-center"],[1,"invalid-feedback","mt-2",2,"display","block"],[1,"form-floating-outline","mb-8"],["type","text","id","validateCoupon","name","validateCoupon","placeholder","Validate Coupon","formControlName","validateCoupon",1,"form-control","bg-white",3,"ngClass"],["for","validateCoupon"],[1,"invalid-feedback"],["type","text","id","redeemCoupon","placeholder","Redeem Coupon","name","redeemCoupon","formControlName","redeemCoupon",1,"form-control","bg-white",3,"ngClass"],["for","redeemCoupon"],[1,"form-floating-outline","mb-3"],["type","text","id","key","name","key","placeholder","Key: E.g. eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9","formControlName","header","rows","4",1,"form-control","bg-white",3,"ngClass"],["for","key"]],template:function(e,o){e&1&&(i(0,"modal-material",0),v("onOk",function(){return o.onOk()})("onCancel",function(){return o.onClose()})("onClose",function(){return o.onClose()}),i(1,"content")(2,"div",1)(3,"div",2)(4,"div",3)(5,"form",4)(6,"div",5)(7,"div",6)(8,"div",7)(9,"div",8),c(10,"input",9),i(11,"label",10),a(12,"Coupon Provider"),r()()(),i(13,"div",11)(14,"div",12)(15,"div",13),c(16,"app-customize-toggle",14),r(),i(17,"label",15),a(18,"Enabled"),r()()()(),m(19,Ee,2,0,"div",16),r(),i(20,"div",17),c(21,"input",18),i(22,"label",19),a(23,"Validate Coupon URL"),r(),m(24,ye,2,0,"div",20),r(),i(25,"div",17),c(26,"input",21),i(27,"label",22),a(28,"Redeem Coupon URL"),r(),m(29,Ge,2,0,"div",20),r(),i(30,"div",23),c(31,"textarea",24),i(32,"label",25),a(33,"Request Header (Key: value)"),r(),m(34,xe,2,0,"div",20),r()()()()()()()),e&2&&(p("config",o.config),l(5),p("formGroup",o.formGroup),l(5),p("ngClass",b(10,N,(o.formGroup.controls.name==null?null:o.formGroup.controls.name.invalid)&&((o.formGroup.controls.name==null?null:o.formGroup.controls.name.dirty)||(o.formGroup.controls.name==null?null:o.formGroup.controls.name.touched)))),l(9),u(o.formGroup.controls.name.invalid&&(o.formGroup.controls.name.dirty||o.formGroup.controls.name.touched)?19:-1),l(2),p("ngClass",b(12,N,(o.formGroup.controls.validateCoupon==null?null:o.formGroup.controls.validateCoupon.invalid)&&((o.formGroup.controls.validateCoupon==null?null:o.formGroup.controls.validateCoupon.dirty)||(o.formGroup.controls.validateCoupon==null?null:o.formGroup.controls.validateCoupon.touched)))),l(3),u(o.formGroup.controls.validateCoupon.invalid&&(o.formGroup.controls.validateCoupon.dirty||o.formGroup.controls.validateCoupon.touched)?24:-1),l(2),p("ngClass",b(14,N,(o.formGroup.controls.redeemCoupon==null?null:o.formGroup.controls.redeemCoupon.invalid)&&((o.formGroup.controls.redeemCoupon==null?null:o.formGroup.controls.redeemCoupon.dirty)||(o.formGroup.controls.redeemCoupon==null?null:o.formGroup.controls.redeemCoupon.touched)))),l(3),u(o.formGroup.controls.redeemCoupon.invalid&&(o.formGroup.controls.redeemCoupon.dirty||o.formGroup.controls.redeemCoupon.touched)?29:-1),l(2),p("ngClass",b(16,N,(o.formGroup.controls.header==null?null:o.formGroup.controls.header.invalid)&&((o.formGroup.controls.header==null?null:o.formGroup.controls.header.dirty)||(o.formGroup.controls.header==null?null:o.formGroup.controls.header.touched)))),l(3),u(o.formGroup.controls.header.invalid&&(o.formGroup.controls.header.dirty||o.formGroup.controls.header.touched)?34:-1))},dependencies:[R,M,ne,Q,J,Y,X,Z,ee,ue,me,ge],styles:["div.form-check-floating[_ngcontent-%COMP%]{border:1px solid #ced4da;position:relative;border-radius:.25rem!important}.labelFilledInput[_ngcontent-%COMP%]{position:absolute;top:-10px;left:10px;background:#fff;padding-left:4px;padding-right:4px;font-size:.75rem!important;color:#9da2a6}"]})};var Me=(n,d)=>({"bg-success-subtle text-success-emphasis":n,"bg-danger-subtle text-danger-emphasis":d});function Re(n,d){if(n&1){let e=G();i(0,"button",10),v("click",function(){P(e);let t=C();return E(t.addNewCouponProvider())}),a(1," Add "),r()}}function Ne(n,d){n&1&&c(0,"th",8)}function Te(n,d){if(n&1){let e=G();i(0,"td",11)(1,"i",14),v("click",function(){P(e);let t=C().$index,s=C(2);return E(s.onDeleteProvider(t))}),r()()}}function Ie(n,d){if(n&1){let e=G();i(0,"tr"),m(1,Te,2,0,"td",11),i(2,"td")(3,"a",12),v("click",function(){let t=P(e),s=t.$implicit,g=t.$index,be=C(2);return E(be.onUpdateProvider(s,g))}),a(4),r()(),i(5,"td"),a(6),r(),i(7,"td"),a(8),r(),i(9,"td"),a(10),r(),i(11,"td")(12,"span",13),a(13),r()()()}if(n&2){let e=d.$implicit,o=C(2);l(),u(o.role.developer.Edit?1:-1),l(3),w(" ",e.Name," "),l(2),x(e.ValidateCoupon),l(2),x(e.RedeemCoupon),l(2),x(e.KeyUI),l(2),p("ngClass",q(7,Me,e.Enabled,!e.Enabled)),l(),w(" ",e.Enabled?"Enabled":"Disabled"," ")}}function we(n,d){if(n&1&&U(0,Ie,14,10,"tr",null,O),n&2){let e=C();H(e.listProviders())}}function Fe(n,d){n&1&&$(0)}function ke(n,d){if(n&1&&I(0,Fe,1,0,"ng-container",15),n&2){C();let e=j(25);p("ngTemplateOutlet",e)}}function De(n,d){n&1&&(i(0,"tr",16)(1,"td",17),c(2,"empty-state-table"),r()())}var _e=class n extends ve{constructor(e,o,t,s,g){super(e,o,k.WebhookCouponProviderLoader,t);this.activatedRoute=t;this.role=s;this.dialog=g}toastr=_(z);couponProviders=V([]);listProviders=L(()=>this.couponProviders().map(e=>(e.KeyUI=this.generateKeyUI(e.Header),e)));generateKeyUI(e){if(!e||e.length<=25)return e||"";let o=e.substring(0,10),t=e.substring(e.length-10);return`${o}...${t}`}postBindForm(e){this.couponProviders.update(()=>e.Form.CouponProviders.map(t=>({FetchMemberPoint:t.FetchMemberPoint,Enabled:t.Enabled,Name:t.Name,RedeemCoupon:t.RedeemCoupon,ValidateCoupon:t.ValidateCoupon,Header:t.Header})))}addNewCouponProvider(){this.dialog.open(S).afterClosed().pipe(T(e=>F.IsNotEmpty(e)),D(e=>{let o={Name:e.name,ValidateCoupon:e.validateCoupon,RedeemCoupon:e.redeemCoupon,Enabled:e.enabled,Header:e.header};return[...this.couponProviders(),o]})).subscribe(e=>{this.couponProviders.update(()=>e),this.saveCouponProviders(`Coupon provider "${e[e.length-1].Name}" has been successfully added.`)})}onUpdateProvider(e,o){this.dialog.open(S,{data:{name:e.Name,validateCoupon:e.ValidateCoupon,redeemCoupon:e.RedeemCoupon,enabled:e.Enabled,header:e.Header}}).afterClosed().pipe(T(t=>F.IsNotEmpty(t))).subscribe(t=>{let s={Name:t.name,ValidateCoupon:t.validateCoupon,RedeemCoupon:t.redeemCoupon,Enabled:t.enabled,Header:t.header};this.couponProviders.update(g=>(g[o]=s,[...g])),this.saveCouponProviders(`Coupon provider "${t.name}" has been successfully updated.`)})}onDeleteProvider(e){if(confirm("Are you sure you want to delete this coupon provider?")){let o=this.couponProviders()[e]?.Name||"provider";this.couponProviders.update(t=>(t.splice(e,1),[...t])),this.saveCouponProviders(`Coupon provider "${o}" has been successfully deleted.`)}}saveCouponProviders(e){this.httpService.post(k.WebhookCouponProviderSave,this.couponProviders()).subscribe(()=>{this.toastr.success(e||"Coupon provider has been successfully updated.","Success")})}static \u0275fac=function(o){return new(o||n)(f(se),f(ie),f(W),f(re),f(de))};static \u0275cmp=y({type:n,selectors:[["app-coupon-configuration"]],features:[A],decls:26,vars:6,consts:[["EMPTY_STATE",""],[3,"pageData","hideSearchDropdown","hideSearchBox"],["type","button",1,"btn","btn-success"],[1,"container-fluid","mt-6"],[1,"row"],[1,"col-12"],[1,"table","table-stripped","custom-table"],[1,"thead-light","sticky-top-thead"],[1,"text-center",2,"width","10px"],[2,"width","220px"],["type","button",1,"btn","btn-success",3,"click"],[1,"text-center"],["role","button",1,"link-primary","cursor-pointer",3,"click"],[1,"p-3","rounded-2",3,"ngClass"],["title","Delete provider",1,"fa","fa-xmark","text-danger",2,"cursor","pointer",3,"click"],[4,"ngTemplateOutlet"],[1,"table-border-bottom-0"],["colspan","7"]],template:function(o,t){if(o&1&&(i(0,"mainpanel-cmp",1)(1,"actions"),m(2,Re,2,0,"button",2),r(),i(3,"content")(4,"div",3)(5,"div",4)(6,"div",5)(7,"table",6)(8,"thead",7)(9,"tr"),m(10,Ne,1,0,"th",8),i(11,"th",9),a(12,"Name"),r(),i(13,"th"),a(14,"Validate Coupon"),r(),i(15,"th"),a(16,"Redeem Coupon"),r(),i(17,"th"),a(18,"Value"),r(),i(19,"th"),a(20,"Status"),r()()(),i(21,"tbody"),m(22,we,2,0)(23,ke,1,1,"ng-container"),r()()()()(),I(24,De,3,0,"ng-template",null,0,K),r()()),o&2){let s;p("pageData",t.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),l(2),u(t.role.developer.Edit?2:-1),l(8),u(t.role.developer.Edit?10:-1),l(12),u(((s=t.listProviders())==null?null:s.length)>0?22:23)}},dependencies:[R,M,B,fe,ce,te,Ce],encapsulation:2})};export{_e as CouponConfigurationComponent};
1
+ import{a as ge}from"./chunk-AAXXZ3RZ.js";import{a as ve}from"./chunk-UBCB4G4S.js";import{a as Ce}from"./chunk-3GPGJFQV.js";import"./chunk-BYXBJQAS.js";import{e as ce,f as fe}from"./chunk-BALKIB67.js";import"./chunk-5OKSTEWQ.js";import{b as se}from"./chunk-QRTOTG7S.js";import"./chunk-CS6HBROS.js";import"./chunk-JUS6LLVX.js";import{u as pe,v as me,w as ue}from"./chunk-QZMZBCE7.js";import"./chunk-C4WJKF7R.js";import{O as k}from"./chunk-NZYZO47Z.js";import{e as ae,f as le,g as de}from"./chunk-A45GTZVV.js";import"./chunk-NWSIPELM.js";import"./chunk-L76WVZW6.js";import"./chunk-2FWFPV5I.js";import"./chunk-O5SLP4JK.js";import{E as oe,F as te,G as ne,c as J,e as h,h as Y,i as X,p as Q,t as Z,w as ee}from"./chunk-RNLSEEMX.js";import"./chunk-H4DUHWPT.js";import"./chunk-ROLAW5XO.js";import{a as F,d as re}from"./chunk-USJ6ILEE.js";import"./chunk-4ZXLS56M.js";import{Ab as U,Bb as H,Ca as V,Cb as p,Db as i,E as T,Eb as r,Fb as c,Hc as K,Kc as L,Lb as $,Mb as G,Ob as v,Qb as C,Wd as W,Xa as l,_b as j,be as z,cd as M,db as f,dc as a,ec as x,ee as ie,fc as w,hb as y,jd as B,lb as A,nb as I,pa as _,rd as R,t as D,ta as P,ua as E,uc as b,vb as m,vc as q,xb as u,yb as O}from"./chunk-JYZTRN6N.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var N=n=>({"is-invalid":n});function Ee(n,d){n&1&&(i(0,"div",16),a(1," Provider Name is required "),r())}function ye(n,d){n&1&&(i(0,"div",20),a(1," Validate Coupon URL is required "),r())}function Ge(n,d){n&1&&(i(0,"div",20),a(1," Redeem Coupon URL is required "),r())}function xe(n,d){n&1&&(i(0,"div",20),a(1,"Key is required"),r())}var S=class n{constructor(d){this.data=d;this.config=new pe,this.config.title="Register Provider",this.config.customWidth="600px",this.initForm()}dialogRef=_(ae);config;fb=_(oe);formGroup;initForm(){this.formGroup=this.fb.group({name:[this.data?.name||"",[h.required]],validateCoupon:[this.data?.validateCoupon||"",[h.required]],redeemCoupon:[this.data?.redeemCoupon||"",[h.required]],enabled:[this.data?.enabled!==void 0?this.data.enabled:!0],header:[this.data?.header,[h.required]]})}onClose(){this.dialogRef.close()}onOk(){this.formGroup.markAllAsTouched(),!this.formGroup.invalid&&this.dialogRef.close(this.formGroup.value)}static \u0275fac=function(e){return new(e||n)(f(le))};static \u0275cmp=y({type:n,selectors:[["app-modal-register-provider"]],decls:35,vars:18,consts:[[3,"onOk","onCancel","onClose","config"],[1,"container-fluid","pt-4"],[1,"row"],[1,"col-12"],[3,"formGroup"],[1,"mb-8"],[1,"d-flex","align-items-center"],[1,"flex-grow-1","me-3"],[1,"form-floating-outline","mb-0"],["type","text","placeholder","Provider Name","id","name","name","name","formControlName","name",1,"form-control","bg-white",3,"ngClass"],["for","name"],[2,"width","75px"],[1,"form-check-floating"],[1,"d-flex","justify-content-center","pt-7","pb-4"],["formControlName","enabled"],[1,"labelFilledInput","text-center"],[1,"invalid-feedback","mt-2",2,"display","block"],[1,"form-floating-outline","mb-8"],["type","text","id","validateCoupon","name","validateCoupon","placeholder","Validate Coupon","formControlName","validateCoupon",1,"form-control","bg-white",3,"ngClass"],["for","validateCoupon"],[1,"invalid-feedback"],["type","text","id","redeemCoupon","placeholder","Redeem Coupon","name","redeemCoupon","formControlName","redeemCoupon",1,"form-control","bg-white",3,"ngClass"],["for","redeemCoupon"],[1,"form-floating-outline","mb-3"],["type","text","id","key","name","key","placeholder","Key: E.g. eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9","formControlName","header","rows","4",1,"form-control","bg-white",3,"ngClass"],["for","key"]],template:function(e,o){e&1&&(i(0,"modal-material",0),v("onOk",function(){return o.onOk()})("onCancel",function(){return o.onClose()})("onClose",function(){return o.onClose()}),i(1,"content")(2,"div",1)(3,"div",2)(4,"div",3)(5,"form",4)(6,"div",5)(7,"div",6)(8,"div",7)(9,"div",8),c(10,"input",9),i(11,"label",10),a(12,"Coupon Provider"),r()()(),i(13,"div",11)(14,"div",12)(15,"div",13),c(16,"app-customize-toggle",14),r(),i(17,"label",15),a(18,"Enabled"),r()()()(),m(19,Ee,2,0,"div",16),r(),i(20,"div",17),c(21,"input",18),i(22,"label",19),a(23,"Validate Coupon URL"),r(),m(24,ye,2,0,"div",20),r(),i(25,"div",17),c(26,"input",21),i(27,"label",22),a(28,"Redeem Coupon URL"),r(),m(29,Ge,2,0,"div",20),r(),i(30,"div",23),c(31,"textarea",24),i(32,"label",25),a(33,"Request Header (Key: value)"),r(),m(34,xe,2,0,"div",20),r()()()()()()()),e&2&&(p("config",o.config),l(5),p("formGroup",o.formGroup),l(5),p("ngClass",b(10,N,(o.formGroup.controls.name==null?null:o.formGroup.controls.name.invalid)&&((o.formGroup.controls.name==null?null:o.formGroup.controls.name.dirty)||(o.formGroup.controls.name==null?null:o.formGroup.controls.name.touched)))),l(9),u(o.formGroup.controls.name.invalid&&(o.formGroup.controls.name.dirty||o.formGroup.controls.name.touched)?19:-1),l(2),p("ngClass",b(12,N,(o.formGroup.controls.validateCoupon==null?null:o.formGroup.controls.validateCoupon.invalid)&&((o.formGroup.controls.validateCoupon==null?null:o.formGroup.controls.validateCoupon.dirty)||(o.formGroup.controls.validateCoupon==null?null:o.formGroup.controls.validateCoupon.touched)))),l(3),u(o.formGroup.controls.validateCoupon.invalid&&(o.formGroup.controls.validateCoupon.dirty||o.formGroup.controls.validateCoupon.touched)?24:-1),l(2),p("ngClass",b(14,N,(o.formGroup.controls.redeemCoupon==null?null:o.formGroup.controls.redeemCoupon.invalid)&&((o.formGroup.controls.redeemCoupon==null?null:o.formGroup.controls.redeemCoupon.dirty)||(o.formGroup.controls.redeemCoupon==null?null:o.formGroup.controls.redeemCoupon.touched)))),l(3),u(o.formGroup.controls.redeemCoupon.invalid&&(o.formGroup.controls.redeemCoupon.dirty||o.formGroup.controls.redeemCoupon.touched)?29:-1),l(2),p("ngClass",b(16,N,(o.formGroup.controls.header==null?null:o.formGroup.controls.header.invalid)&&((o.formGroup.controls.header==null?null:o.formGroup.controls.header.dirty)||(o.formGroup.controls.header==null?null:o.formGroup.controls.header.touched)))),l(3),u(o.formGroup.controls.header.invalid&&(o.formGroup.controls.header.dirty||o.formGroup.controls.header.touched)?34:-1))},dependencies:[R,M,ne,Q,J,Y,X,Z,ee,ue,me,ge],styles:["div.form-check-floating[_ngcontent-%COMP%]{border:1px solid #ced4da;position:relative;border-radius:.25rem!important}.labelFilledInput[_ngcontent-%COMP%]{position:absolute;top:-10px;left:10px;background:#fff;padding-left:4px;padding-right:4px;font-size:.75rem!important;color:#9da2a6}"]})};var Me=(n,d)=>({"bg-success-subtle text-success-emphasis":n,"bg-danger-subtle text-danger-emphasis":d});function Re(n,d){if(n&1){let e=G();i(0,"button",10),v("click",function(){P(e);let t=C();return E(t.addNewCouponProvider())}),a(1," Add "),r()}}function Ne(n,d){n&1&&c(0,"th",8)}function Te(n,d){if(n&1){let e=G();i(0,"td",11)(1,"i",14),v("click",function(){P(e);let t=C().$index,s=C(2);return E(s.onDeleteProvider(t))}),r()()}}function Ie(n,d){if(n&1){let e=G();i(0,"tr"),m(1,Te,2,0,"td",11),i(2,"td")(3,"a",12),v("click",function(){let t=P(e),s=t.$implicit,g=t.$index,be=C(2);return E(be.onUpdateProvider(s,g))}),a(4),r()(),i(5,"td"),a(6),r(),i(7,"td"),a(8),r(),i(9,"td"),a(10),r(),i(11,"td")(12,"span",13),a(13),r()()()}if(n&2){let e=d.$implicit,o=C(2);l(),u(o.role.developer.Edit?1:-1),l(3),w(" ",e.Name," "),l(2),x(e.ValidateCoupon),l(2),x(e.RedeemCoupon),l(2),x(e.KeyUI),l(2),p("ngClass",q(7,Me,e.Enabled,!e.Enabled)),l(),w(" ",e.Enabled?"Enabled":"Disabled"," ")}}function we(n,d){if(n&1&&U(0,Ie,14,10,"tr",null,O),n&2){let e=C();H(e.listProviders())}}function Fe(n,d){n&1&&$(0)}function ke(n,d){if(n&1&&I(0,Fe,1,0,"ng-container",15),n&2){C();let e=j(25);p("ngTemplateOutlet",e)}}function De(n,d){n&1&&(i(0,"tr",16)(1,"td",17),c(2,"empty-state-table"),r()())}var _e=class n extends ve{constructor(e,o,t,s,g){super(e,o,k.WebhookCouponProviderLoader,t);this.activatedRoute=t;this.role=s;this.dialog=g}toastr=_(z);couponProviders=V([]);listProviders=L(()=>this.couponProviders().map(e=>(e.KeyUI=this.generateKeyUI(e.Header),e)));generateKeyUI(e){if(!e||e.length<=25)return e||"";let o=e.substring(0,10),t=e.substring(e.length-10);return`${o}...${t}`}postBindForm(e){this.couponProviders.update(()=>e.Form.CouponProviders.map(t=>({FetchMemberPoint:t.FetchMemberPoint,Enabled:t.Enabled,Name:t.Name,RedeemCoupon:t.RedeemCoupon,ValidateCoupon:t.ValidateCoupon,Header:t.Header})))}addNewCouponProvider(){this.dialog.open(S).afterClosed().pipe(T(e=>F.IsNotEmpty(e)),D(e=>{let o={Name:e.name,ValidateCoupon:e.validateCoupon,RedeemCoupon:e.redeemCoupon,Enabled:e.enabled,Header:e.header};return[...this.couponProviders(),o]})).subscribe(e=>{this.couponProviders.update(()=>e),this.saveCouponProviders(`Coupon provider "${e[e.length-1].Name}" has been successfully added.`)})}onUpdateProvider(e,o){this.dialog.open(S,{data:{name:e.Name,validateCoupon:e.ValidateCoupon,redeemCoupon:e.RedeemCoupon,enabled:e.Enabled,header:e.Header}}).afterClosed().pipe(T(t=>F.IsNotEmpty(t))).subscribe(t=>{let s={Name:t.name,ValidateCoupon:t.validateCoupon,RedeemCoupon:t.redeemCoupon,Enabled:t.enabled,Header:t.header};this.couponProviders.update(g=>(g[o]=s,[...g])),this.saveCouponProviders(`Coupon provider "${t.name}" has been successfully updated.`)})}onDeleteProvider(e){if(confirm("Are you sure you want to delete this coupon provider?")){let o=this.couponProviders()[e]?.Name||"provider";this.couponProviders.update(t=>(t.splice(e,1),[...t])),this.saveCouponProviders(`Coupon provider "${o}" has been successfully deleted.`)}}saveCouponProviders(e){this.httpService.post(k.WebhookCouponProviderSave,this.couponProviders()).subscribe(()=>{this.toastr.success(e||"Coupon provider has been successfully updated.","Success")})}static \u0275fac=function(o){return new(o||n)(f(se),f(ie),f(W),f(re),f(de))};static \u0275cmp=y({type:n,selectors:[["app-coupon-configuration"]],features:[A],decls:26,vars:6,consts:[["EMPTY_STATE",""],[3,"pageData","hideSearchDropdown","hideSearchBox"],["type","button",1,"btn","btn-success"],[1,"container-fluid","mt-6"],[1,"row"],[1,"col-12"],[1,"table","table-stripped","custom-table"],[1,"thead-light","sticky-top-thead"],[1,"text-center",2,"width","10px"],[2,"width","220px"],["type","button",1,"btn","btn-success",3,"click"],[1,"text-center"],["role","button",1,"link-primary","cursor-pointer",3,"click"],[1,"p-3","rounded-2",3,"ngClass"],["title","Delete provider",1,"fa","fa-xmark","text-danger",2,"cursor","pointer",3,"click"],[4,"ngTemplateOutlet"],[1,"table-border-bottom-0"],["colspan","7"]],template:function(o,t){if(o&1&&(i(0,"mainpanel-cmp",1)(1,"actions"),m(2,Re,2,0,"button",2),r(),i(3,"content")(4,"div",3)(5,"div",4)(6,"div",5)(7,"table",6)(8,"thead",7)(9,"tr"),m(10,Ne,1,0,"th",8),i(11,"th",9),a(12,"Name"),r(),i(13,"th"),a(14,"Validate Coupon"),r(),i(15,"th"),a(16,"Redeem Coupon"),r(),i(17,"th"),a(18,"Value"),r(),i(19,"th"),a(20,"Status"),r()()(),i(21,"tbody"),m(22,we,2,0)(23,ke,1,1,"ng-container"),r()()()()(),I(24,De,3,0,"ng-template",null,0,K),r()()),o&2){let s;p("pageData",t.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),l(2),u(t.role.developer.Edit?2:-1),l(8),u(t.role.developer.Edit?10:-1),l(12),u(((s=t.listProviders())==null?null:s.length)>0?22:23)}},dependencies:[R,M,B,fe,ce,te,Ce],encapsulation:2})};export{_e as CouponConfigurationComponent};
@@ -0,0 +1 @@
1
+ import{a as L}from"./chunk-CAGQRIPG.js";import{C as N,F as j,G as D,c as P,h as A,i as V,k as I,o as R,p as U}from"./chunk-RNLSEEMX.js";import{c as k}from"./chunk-H4DUHWPT.js";import"./chunk-ROLAW5XO.js";import{a as m}from"./chunk-USJ6ILEE.js";import"./chunk-4ZXLS56M.js";import{Db as i,Eb as n,Fb as u,Mb as y,Ob as h,Ub as _,Vb as S,Wb as x,Xa as b,Yd as M,be as E,d as f,da as v,db as d,dc as s,hb as C,ic as w,jc as O,kc as T,ta as l,ua as p}from"./chunk-JYZTRN6N.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var F=["totpCode"],z=class g{constructor(e,t,o,r){this.authenticatorService=e;this.router=t;this.authService=o;this.toastrService=r;this.redirectUrl=this.authService.returnUrl,this.destroy$=new f,this.checkOnRefreshPage()}validationCodeEl;validationCode;redirectUrl;destroy$;ngOnInit(){document.body.classList.add("login-body")}ngAfterViewInit(){this.validationCodeEl.nativeElement.focus()}ngOnDestroy(){document.body.classList.remove("login-body"),this.destroy$.next(!0),this.destroy$.complete()}checkOnRefreshPage(){m.IsEmpty(this.authService.loginResponse)&&this.router.navigate(["/"])}onSubmit(){this.validateOnVerfiyCode()&&this.authenticatorService.validateCode(this.validationCode,this.authService.loginResponse.UserID).pipe(v(this.destroy$)).subscribe({next:e=>{if(this.authService.saveLoginConfigToStorage(e),m.IsNotEmpty(this.redirectUrl))this.router.navigateByUrl(this.redirectUrl),this.authService.returnUrl=null;else{let t=this.authService.getRedirectUrl();this.router.navigate([t])}}})}validateOnVerfiyCode(){let e=!0;return m.IsEmpty(this.validationCode)?(e=!1,this.toastrService.warning("You must enter a authentication code.","Warning")):(this.validationCode.length<6||this.validationCode.length>6)&&(e=!1,this.toastrService.warning("The authentication code must be six digits long.","Warning")),e}numberOnly(e){return m.numberOnly(e)}submitOnFullOTP(e){e.length==6&&this.onSubmit()}static \u0275fac=function(t){return new(t||g)(d(L),d(M),d(k),d(E))};static \u0275cmp=C({type:g,selectors:[["POS-auth-totp"]],viewQuery:function(t,o){if(t&1&&_(F,5),t&2){let r;S(r=x())&&(o.validationCodeEl=r.first)}},decls:28,vars:1,consts:[["totpCode",""],[1,"container-fluid"],[1,"row","bg-white","mx-auto","totp-pane"],[1,"col-md-7","order-md-first","order-first","form-pane"],[1,"text-start"],[1,"mt-6","text-start"],[3,"submit"],[1,"row","mt-3"],[1,"col-12","text-start","otp-container","position-relative"],["for","totpCode",1,"form-label"],["type","text","maxlength","6","data-cy","totp-code","aria-label","Username","name","totp-code","id","totpCode",1,"border-0",3,"ngModelChange","keypress","ngModel"],[1,"stripe"],["type","submit",1,"btn","btn-lg","btn-primary","rounded-1","fw-normal","rounded-0"],[1,"col-md-5","order-md-last","order-last","border-start","border-secondary","d-flex","align-items-center","justify-content-center","img-pane"],[1,"d-flex","align-items-center","justify-content-center","mb-6"],["src","https://cdn.dealpos.xyz/web-image/TOTP.png",1,"border-0",2,"width","50%"],[1,"fixed-bottom"],[1,"d-flex","justify-content-start","mb-11","mx-11","footer-mobile"],["target","_blank","href","http://www.dealpos.com"],["src","https://cdn.dealpos.app/public/logo/dealpos_130.png",1,"ms-3","border-0"]],template:function(t,o){if(t&1){let r=y();i(0,"div",1)(1,"div",2)(2,"div",3)(3,"h3",4),s(4,"Enter time-based OTP"),n(),i(5,"p",5),s(6,"Enter the OTP generated on your authenticator app"),n(),i(7,"form",6),h("submit",function(){return l(r),p(o.onSubmit())}),i(8,"div",7)(9,"div",8)(10,"label",9),s(11,"AUTHENTICATION CODE"),n(),i(12,"input",10,0),T("ngModelChange",function(a){return l(r),O(o.validationCode,a)||(o.validationCode=a),p(a)}),h("keypress",function(a){return l(r),p(o.numberOnly(a))})("ngModelChange",function(a){return l(r),p(o.submitOnFullOTP(a))}),n(),i(14,"span",11),s(15,"______"),n(),i(16,"button",12),s(17," Verify "),n()()()()(),i(18,"div",13)(19,"div",14),u(20,"img",15),n()()(),i(21,"div",16)(22,"div",17)(23,"div")(24,"span"),s(25,"powered by :"),n(),u(26,"a",18)(27,"img",19),n()()()()}t&2&&(b(12),w("ngModel",o.validationCode))},dependencies:[D,U,P,A,V,N,j,R,I],styles:["input[type=submit][_ngcontent-%COMP%]{font-size:1.125rem;width:11.25rem;font-family:Roboto Slab,serif}.totp-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:140px}@media (max-width: 768px){.totp-pane[_ngcontent-%COMP%]{margin-top:0}}.form-pane[_ngcontent-%COMP%]{padding:3rem}@media (max-width: 768px){.form-pane[_ngcontent-%COMP%]{padding:50px 24px 30px}}@media (max-width: 768px){.img-pane[_ngcontent-%COMP%]{border:0px!important}}.otp-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-size:32px;letter-spacing:32px;width:325px;font-family:monospace;background:transparent;z-index:1;position:relative}.otp-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus{outline:none!important}.otp-container[_ngcontent-%COMP%] .stripe[_ngcontent-%COMP%]{font-size:32px;letter-spacing:32px;font-family:monospace;position:absolute;padding-top:6px;z-index:0;bottom:0;left:14px}"]})};export{z as AuthTotpComponent};