@wavemaker-ai/app-runtime-wm-build 1.0.0-rc.309

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 (1378) hide show
  1. package/npm-shrinkwrap.json +17 -0
  2. package/package-lock.json +17 -0
  3. package/package.json +16 -0
  4. package/wmapp/locales/angular/af-na.js +17 -0
  5. package/wmapp/locales/angular/af.js +17 -0
  6. package/wmapp/locales/angular/agq.js +15 -0
  7. package/wmapp/locales/angular/ak.js +17 -0
  8. package/wmapp/locales/angular/am.js +17 -0
  9. package/wmapp/locales/angular/ar-ae.js +25 -0
  10. package/wmapp/locales/angular/ar-bh.js +25 -0
  11. package/wmapp/locales/angular/ar-dj.js +25 -0
  12. package/wmapp/locales/angular/ar-dz.js +25 -0
  13. package/wmapp/locales/angular/ar-eg.js +25 -0
  14. package/wmapp/locales/angular/ar-eh.js +25 -0
  15. package/wmapp/locales/angular/ar-er.js +25 -0
  16. package/wmapp/locales/angular/ar-il.js +25 -0
  17. package/wmapp/locales/angular/ar-iq.js +25 -0
  18. package/wmapp/locales/angular/ar-jo.js +25 -0
  19. package/wmapp/locales/angular/ar-km.js +25 -0
  20. package/wmapp/locales/angular/ar-kw.js +25 -0
  21. package/wmapp/locales/angular/ar-lb.js +25 -0
  22. package/wmapp/locales/angular/ar-ly.js +25 -0
  23. package/wmapp/locales/angular/ar-ma.js +25 -0
  24. package/wmapp/locales/angular/ar-mr.js +25 -0
  25. package/wmapp/locales/angular/ar-om.js +25 -0
  26. package/wmapp/locales/angular/ar-ps.js +25 -0
  27. package/wmapp/locales/angular/ar-qa.js +25 -0
  28. package/wmapp/locales/angular/ar-sa.js +25 -0
  29. package/wmapp/locales/angular/ar-sd.js +25 -0
  30. package/wmapp/locales/angular/ar-so.js +25 -0
  31. package/wmapp/locales/angular/ar-ss.js +25 -0
  32. package/wmapp/locales/angular/ar-sy.js +25 -0
  33. package/wmapp/locales/angular/ar-td.js +25 -0
  34. package/wmapp/locales/angular/ar-tn.js +25 -0
  35. package/wmapp/locales/angular/ar-ye.js +25 -0
  36. package/wmapp/locales/angular/ar.js +25 -0
  37. package/wmapp/locales/angular/as.js +17 -0
  38. package/wmapp/locales/angular/asa.js +17 -0
  39. package/wmapp/locales/angular/ast.js +17 -0
  40. package/wmapp/locales/angular/az-cyrl.js +15 -0
  41. package/wmapp/locales/angular/az-latn.js +17 -0
  42. package/wmapp/locales/angular/az.js +17 -0
  43. package/wmapp/locales/angular/bas.js +15 -0
  44. package/wmapp/locales/angular/be-tarask.js +21 -0
  45. package/wmapp/locales/angular/be.js +21 -0
  46. package/wmapp/locales/angular/bem.js +17 -0
  47. package/wmapp/locales/angular/bez.js +17 -0
  48. package/wmapp/locales/angular/bg.js +17 -0
  49. package/wmapp/locales/angular/bm.js +15 -0
  50. package/wmapp/locales/angular/bn-in.js +17 -0
  51. package/wmapp/locales/angular/bn.js +17 -0
  52. package/wmapp/locales/angular/bo-in.js +15 -0
  53. package/wmapp/locales/angular/bo.js +15 -0
  54. package/wmapp/locales/angular/br.js +23 -0
  55. package/wmapp/locales/angular/brx.js +17 -0
  56. package/wmapp/locales/angular/bs-cyrl.js +15 -0
  57. package/wmapp/locales/angular/bs-latn.js +19 -0
  58. package/wmapp/locales/angular/bs.js +19 -0
  59. package/wmapp/locales/angular/ca-ad.js +17 -0
  60. package/wmapp/locales/angular/ca-es-valencia.js +17 -0
  61. package/wmapp/locales/angular/ca-fr.js +17 -0
  62. package/wmapp/locales/angular/ca-it.js +17 -0
  63. package/wmapp/locales/angular/ca.js +17 -0
  64. package/wmapp/locales/angular/ccp-in.js +15 -0
  65. package/wmapp/locales/angular/ccp.js +15 -0
  66. package/wmapp/locales/angular/ce.js +17 -0
  67. package/wmapp/locales/angular/ceb.js +17 -0
  68. package/wmapp/locales/angular/cgg.js +17 -0
  69. package/wmapp/locales/angular/chr.js +17 -0
  70. package/wmapp/locales/angular/ckb-ir.js +17 -0
  71. package/wmapp/locales/angular/ckb.js +17 -0
  72. package/wmapp/locales/angular/cs.js +21 -0
  73. package/wmapp/locales/angular/cy.js +25 -0
  74. package/wmapp/locales/angular/da-gl.js +17 -0
  75. package/wmapp/locales/angular/da.js +17 -0
  76. package/wmapp/locales/angular/dav.js +15 -0
  77. package/wmapp/locales/angular/de-at.js +17 -0
  78. package/wmapp/locales/angular/de-be.js +17 -0
  79. package/wmapp/locales/angular/de-ch.js +17 -0
  80. package/wmapp/locales/angular/de-it.js +17 -0
  81. package/wmapp/locales/angular/de-li.js +17 -0
  82. package/wmapp/locales/angular/de-lu.js +17 -0
  83. package/wmapp/locales/angular/de.js +17 -0
  84. package/wmapp/locales/angular/dje.js +15 -0
  85. package/wmapp/locales/angular/doi.js +17 -0
  86. package/wmapp/locales/angular/dsb.js +21 -0
  87. package/wmapp/locales/angular/dua.js +15 -0
  88. package/wmapp/locales/angular/dyo.js +15 -0
  89. package/wmapp/locales/angular/dz.js +15 -0
  90. package/wmapp/locales/angular/ebu.js +15 -0
  91. package/wmapp/locales/angular/ee-tg.js +17 -0
  92. package/wmapp/locales/angular/ee.js +17 -0
  93. package/wmapp/locales/angular/el-cy.js +17 -0
  94. package/wmapp/locales/angular/el.js +17 -0
  95. package/wmapp/locales/angular/en-001.js +17 -0
  96. package/wmapp/locales/angular/en-150.js +17 -0
  97. package/wmapp/locales/angular/en-ae.js +17 -0
  98. package/wmapp/locales/angular/en-ag.js +17 -0
  99. package/wmapp/locales/angular/en-ai.js +17 -0
  100. package/wmapp/locales/angular/en-as.js +17 -0
  101. package/wmapp/locales/angular/en-at.js +17 -0
  102. package/wmapp/locales/angular/en-au.js +17 -0
  103. package/wmapp/locales/angular/en-bb.js +17 -0
  104. package/wmapp/locales/angular/en-be.js +17 -0
  105. package/wmapp/locales/angular/en-bi.js +17 -0
  106. package/wmapp/locales/angular/en-bm.js +17 -0
  107. package/wmapp/locales/angular/en-bs.js +17 -0
  108. package/wmapp/locales/angular/en-bw.js +17 -0
  109. package/wmapp/locales/angular/en-bz.js +17 -0
  110. package/wmapp/locales/angular/en-ca.js +17 -0
  111. package/wmapp/locales/angular/en-cc.js +17 -0
  112. package/wmapp/locales/angular/en-ch.js +17 -0
  113. package/wmapp/locales/angular/en-ck.js +17 -0
  114. package/wmapp/locales/angular/en-cm.js +17 -0
  115. package/wmapp/locales/angular/en-cx.js +17 -0
  116. package/wmapp/locales/angular/en-cy.js +17 -0
  117. package/wmapp/locales/angular/en-de.js +17 -0
  118. package/wmapp/locales/angular/en-dg.js +17 -0
  119. package/wmapp/locales/angular/en-dk.js +17 -0
  120. package/wmapp/locales/angular/en-dm.js +17 -0
  121. package/wmapp/locales/angular/en-er.js +17 -0
  122. package/wmapp/locales/angular/en-fi.js +17 -0
  123. package/wmapp/locales/angular/en-fj.js +17 -0
  124. package/wmapp/locales/angular/en-fk.js +17 -0
  125. package/wmapp/locales/angular/en-fm.js +17 -0
  126. package/wmapp/locales/angular/en-gb.js +17 -0
  127. package/wmapp/locales/angular/en-gd.js +17 -0
  128. package/wmapp/locales/angular/en-gg.js +17 -0
  129. package/wmapp/locales/angular/en-gh.js +17 -0
  130. package/wmapp/locales/angular/en-gi.js +17 -0
  131. package/wmapp/locales/angular/en-gm.js +17 -0
  132. package/wmapp/locales/angular/en-gu.js +17 -0
  133. package/wmapp/locales/angular/en-gy.js +17 -0
  134. package/wmapp/locales/angular/en-hk.js +17 -0
  135. package/wmapp/locales/angular/en-ie.js +17 -0
  136. package/wmapp/locales/angular/en-il.js +17 -0
  137. package/wmapp/locales/angular/en-im.js +17 -0
  138. package/wmapp/locales/angular/en-in.js +17 -0
  139. package/wmapp/locales/angular/en-io.js +17 -0
  140. package/wmapp/locales/angular/en-je.js +17 -0
  141. package/wmapp/locales/angular/en-jm.js +17 -0
  142. package/wmapp/locales/angular/en-ke.js +17 -0
  143. package/wmapp/locales/angular/en-ki.js +17 -0
  144. package/wmapp/locales/angular/en-kn.js +17 -0
  145. package/wmapp/locales/angular/en-ky.js +17 -0
  146. package/wmapp/locales/angular/en-lc.js +17 -0
  147. package/wmapp/locales/angular/en-lr.js +17 -0
  148. package/wmapp/locales/angular/en-ls.js +17 -0
  149. package/wmapp/locales/angular/en-mg.js +17 -0
  150. package/wmapp/locales/angular/en-mh.js +17 -0
  151. package/wmapp/locales/angular/en-mo.js +17 -0
  152. package/wmapp/locales/angular/en-mp.js +17 -0
  153. package/wmapp/locales/angular/en-ms.js +17 -0
  154. package/wmapp/locales/angular/en-mt.js +17 -0
  155. package/wmapp/locales/angular/en-mu.js +17 -0
  156. package/wmapp/locales/angular/en-mv.js +17 -0
  157. package/wmapp/locales/angular/en-mw.js +17 -0
  158. package/wmapp/locales/angular/en-my.js +17 -0
  159. package/wmapp/locales/angular/en-na.js +17 -0
  160. package/wmapp/locales/angular/en-nf.js +17 -0
  161. package/wmapp/locales/angular/en-ng.js +17 -0
  162. package/wmapp/locales/angular/en-nl.js +17 -0
  163. package/wmapp/locales/angular/en-nr.js +17 -0
  164. package/wmapp/locales/angular/en-nu.js +17 -0
  165. package/wmapp/locales/angular/en-nz.js +17 -0
  166. package/wmapp/locales/angular/en-pg.js +17 -0
  167. package/wmapp/locales/angular/en-ph.js +17 -0
  168. package/wmapp/locales/angular/en-pk.js +17 -0
  169. package/wmapp/locales/angular/en-pn.js +17 -0
  170. package/wmapp/locales/angular/en-pr.js +17 -0
  171. package/wmapp/locales/angular/en-pw.js +17 -0
  172. package/wmapp/locales/angular/en-rw.js +17 -0
  173. package/wmapp/locales/angular/en-sb.js +17 -0
  174. package/wmapp/locales/angular/en-sc.js +17 -0
  175. package/wmapp/locales/angular/en-sd.js +17 -0
  176. package/wmapp/locales/angular/en-se.js +17 -0
  177. package/wmapp/locales/angular/en-sg.js +17 -0
  178. package/wmapp/locales/angular/en-sh.js +17 -0
  179. package/wmapp/locales/angular/en-si.js +17 -0
  180. package/wmapp/locales/angular/en-sl.js +17 -0
  181. package/wmapp/locales/angular/en-ss.js +17 -0
  182. package/wmapp/locales/angular/en-sx.js +17 -0
  183. package/wmapp/locales/angular/en-sz.js +17 -0
  184. package/wmapp/locales/angular/en-tc.js +17 -0
  185. package/wmapp/locales/angular/en-tk.js +17 -0
  186. package/wmapp/locales/angular/en-to.js +17 -0
  187. package/wmapp/locales/angular/en-tt.js +17 -0
  188. package/wmapp/locales/angular/en-tv.js +17 -0
  189. package/wmapp/locales/angular/en-tz.js +17 -0
  190. package/wmapp/locales/angular/en-ug.js +17 -0
  191. package/wmapp/locales/angular/en-um.js +17 -0
  192. package/wmapp/locales/angular/en-vc.js +17 -0
  193. package/wmapp/locales/angular/en-vg.js +17 -0
  194. package/wmapp/locales/angular/en-vi.js +17 -0
  195. package/wmapp/locales/angular/en-vu.js +17 -0
  196. package/wmapp/locales/angular/en-ws.js +17 -0
  197. package/wmapp/locales/angular/en-za.js +17 -0
  198. package/wmapp/locales/angular/en-zm.js +17 -0
  199. package/wmapp/locales/angular/en-zw.js +17 -0
  200. package/wmapp/locales/angular/en.js +17 -0
  201. package/wmapp/locales/angular/eo.js +17 -0
  202. package/wmapp/locales/angular/es-419.js +19 -0
  203. package/wmapp/locales/angular/es-ar.js +19 -0
  204. package/wmapp/locales/angular/es-bo.js +19 -0
  205. package/wmapp/locales/angular/es-br.js +19 -0
  206. package/wmapp/locales/angular/es-bz.js +19 -0
  207. package/wmapp/locales/angular/es-cl.js +19 -0
  208. package/wmapp/locales/angular/es-co.js +19 -0
  209. package/wmapp/locales/angular/es-cr.js +19 -0
  210. package/wmapp/locales/angular/es-cu.js +19 -0
  211. package/wmapp/locales/angular/es-do.js +19 -0
  212. package/wmapp/locales/angular/es-ea.js +19 -0
  213. package/wmapp/locales/angular/es-ec.js +19 -0
  214. package/wmapp/locales/angular/es-gq.js +19 -0
  215. package/wmapp/locales/angular/es-gt.js +19 -0
  216. package/wmapp/locales/angular/es-hn.js +19 -0
  217. package/wmapp/locales/angular/es-ic.js +19 -0
  218. package/wmapp/locales/angular/es-mx.js +19 -0
  219. package/wmapp/locales/angular/es-ni.js +19 -0
  220. package/wmapp/locales/angular/es-pa.js +19 -0
  221. package/wmapp/locales/angular/es-pe.js +19 -0
  222. package/wmapp/locales/angular/es-ph.js +19 -0
  223. package/wmapp/locales/angular/es-pr.js +19 -0
  224. package/wmapp/locales/angular/es-py.js +19 -0
  225. package/wmapp/locales/angular/es-sv.js +19 -0
  226. package/wmapp/locales/angular/es-us.js +19 -0
  227. package/wmapp/locales/angular/es-uy.js +19 -0
  228. package/wmapp/locales/angular/es-ve.js +19 -0
  229. package/wmapp/locales/angular/es.js +19 -0
  230. package/wmapp/locales/angular/et.js +17 -0
  231. package/wmapp/locales/angular/eu.js +17 -0
  232. package/wmapp/locales/angular/ewo.js +15 -0
  233. package/wmapp/locales/angular/fa-af.js +17 -0
  234. package/wmapp/locales/angular/fa.js +17 -0
  235. package/wmapp/locales/angular/ff-adlm-bf.js +15 -0
  236. package/wmapp/locales/angular/ff-adlm-cm.js +15 -0
  237. package/wmapp/locales/angular/ff-adlm-gh.js +15 -0
  238. package/wmapp/locales/angular/ff-adlm-gm.js +15 -0
  239. package/wmapp/locales/angular/ff-adlm-gw.js +15 -0
  240. package/wmapp/locales/angular/ff-adlm-lr.js +15 -0
  241. package/wmapp/locales/angular/ff-adlm-mr.js +15 -0
  242. package/wmapp/locales/angular/ff-adlm-ne.js +15 -0
  243. package/wmapp/locales/angular/ff-adlm-ng.js +15 -0
  244. package/wmapp/locales/angular/ff-adlm-sl.js +15 -0
  245. package/wmapp/locales/angular/ff-adlm-sn.js +15 -0
  246. package/wmapp/locales/angular/ff-adlm.js +15 -0
  247. package/wmapp/locales/angular/ff-cm.js +64 -0
  248. package/wmapp/locales/angular/ff-gn.js +64 -0
  249. package/wmapp/locales/angular/ff-latn-bf.js +17 -0
  250. package/wmapp/locales/angular/ff-latn-cm.js +17 -0
  251. package/wmapp/locales/angular/ff-latn-gh.js +17 -0
  252. package/wmapp/locales/angular/ff-latn-gm.js +17 -0
  253. package/wmapp/locales/angular/ff-latn-gn.js +17 -0
  254. package/wmapp/locales/angular/ff-latn-gw.js +17 -0
  255. package/wmapp/locales/angular/ff-latn-lr.js +17 -0
  256. package/wmapp/locales/angular/ff-latn-mr.js +17 -0
  257. package/wmapp/locales/angular/ff-latn-ne.js +17 -0
  258. package/wmapp/locales/angular/ff-latn-ng.js +17 -0
  259. package/wmapp/locales/angular/ff-latn-sl.js +17 -0
  260. package/wmapp/locales/angular/ff-latn.js +17 -0
  261. package/wmapp/locales/angular/ff-mr.js +64 -0
  262. package/wmapp/locales/angular/ff.js +17 -0
  263. package/wmapp/locales/angular/fi.js +17 -0
  264. package/wmapp/locales/angular/fil.js +17 -0
  265. package/wmapp/locales/angular/fo-dk.js +17 -0
  266. package/wmapp/locales/angular/fo.js +17 -0
  267. package/wmapp/locales/angular/fr-be.js +19 -0
  268. package/wmapp/locales/angular/fr-bf.js +19 -0
  269. package/wmapp/locales/angular/fr-bi.js +19 -0
  270. package/wmapp/locales/angular/fr-bj.js +19 -0
  271. package/wmapp/locales/angular/fr-bl.js +19 -0
  272. package/wmapp/locales/angular/fr-ca.js +19 -0
  273. package/wmapp/locales/angular/fr-cd.js +19 -0
  274. package/wmapp/locales/angular/fr-cf.js +19 -0
  275. package/wmapp/locales/angular/fr-cg.js +19 -0
  276. package/wmapp/locales/angular/fr-ch.js +19 -0
  277. package/wmapp/locales/angular/fr-ci.js +19 -0
  278. package/wmapp/locales/angular/fr-cm.js +19 -0
  279. package/wmapp/locales/angular/fr-dj.js +19 -0
  280. package/wmapp/locales/angular/fr-dz.js +19 -0
  281. package/wmapp/locales/angular/fr-ga.js +19 -0
  282. package/wmapp/locales/angular/fr-gf.js +19 -0
  283. package/wmapp/locales/angular/fr-gn.js +19 -0
  284. package/wmapp/locales/angular/fr-gp.js +19 -0
  285. package/wmapp/locales/angular/fr-gq.js +19 -0
  286. package/wmapp/locales/angular/fr-ht.js +19 -0
  287. package/wmapp/locales/angular/fr-km.js +19 -0
  288. package/wmapp/locales/angular/fr-lu.js +19 -0
  289. package/wmapp/locales/angular/fr-ma.js +19 -0
  290. package/wmapp/locales/angular/fr-mc.js +19 -0
  291. package/wmapp/locales/angular/fr-mf.js +19 -0
  292. package/wmapp/locales/angular/fr-mg.js +19 -0
  293. package/wmapp/locales/angular/fr-ml.js +19 -0
  294. package/wmapp/locales/angular/fr-mq.js +19 -0
  295. package/wmapp/locales/angular/fr-mr.js +19 -0
  296. package/wmapp/locales/angular/fr-mu.js +19 -0
  297. package/wmapp/locales/angular/fr-nc.js +19 -0
  298. package/wmapp/locales/angular/fr-ne.js +19 -0
  299. package/wmapp/locales/angular/fr-pf.js +19 -0
  300. package/wmapp/locales/angular/fr-pm.js +19 -0
  301. package/wmapp/locales/angular/fr-re.js +19 -0
  302. package/wmapp/locales/angular/fr-rw.js +19 -0
  303. package/wmapp/locales/angular/fr-sc.js +19 -0
  304. package/wmapp/locales/angular/fr-sn.js +19 -0
  305. package/wmapp/locales/angular/fr-sy.js +19 -0
  306. package/wmapp/locales/angular/fr-td.js +19 -0
  307. package/wmapp/locales/angular/fr-tg.js +19 -0
  308. package/wmapp/locales/angular/fr-tn.js +19 -0
  309. package/wmapp/locales/angular/fr-vu.js +19 -0
  310. package/wmapp/locales/angular/fr-wf.js +19 -0
  311. package/wmapp/locales/angular/fr-yt.js +19 -0
  312. package/wmapp/locales/angular/fr.js +19 -0
  313. package/wmapp/locales/angular/fur.js +17 -0
  314. package/wmapp/locales/angular/fy.js +17 -0
  315. package/wmapp/locales/angular/ga-gb.js +23 -0
  316. package/wmapp/locales/angular/ga.js +23 -0
  317. package/wmapp/locales/angular/gd.js +21 -0
  318. package/wmapp/locales/angular/gl.js +17 -0
  319. package/wmapp/locales/angular/global/af-na.js +24 -0
  320. package/wmapp/locales/angular/global/af.js +24 -0
  321. package/wmapp/locales/angular/global/agq.js +22 -0
  322. package/wmapp/locales/angular/global/ak.js +24 -0
  323. package/wmapp/locales/angular/global/am.js +24 -0
  324. package/wmapp/locales/angular/global/ar-ae.js +32 -0
  325. package/wmapp/locales/angular/global/ar-bh.js +32 -0
  326. package/wmapp/locales/angular/global/ar-dj.js +32 -0
  327. package/wmapp/locales/angular/global/ar-dz.js +32 -0
  328. package/wmapp/locales/angular/global/ar-eg.js +32 -0
  329. package/wmapp/locales/angular/global/ar-eh.js +32 -0
  330. package/wmapp/locales/angular/global/ar-er.js +32 -0
  331. package/wmapp/locales/angular/global/ar-il.js +32 -0
  332. package/wmapp/locales/angular/global/ar-iq.js +32 -0
  333. package/wmapp/locales/angular/global/ar-jo.js +32 -0
  334. package/wmapp/locales/angular/global/ar-km.js +32 -0
  335. package/wmapp/locales/angular/global/ar-kw.js +32 -0
  336. package/wmapp/locales/angular/global/ar-lb.js +32 -0
  337. package/wmapp/locales/angular/global/ar-ly.js +32 -0
  338. package/wmapp/locales/angular/global/ar-ma.js +32 -0
  339. package/wmapp/locales/angular/global/ar-mr.js +32 -0
  340. package/wmapp/locales/angular/global/ar-om.js +32 -0
  341. package/wmapp/locales/angular/global/ar-ps.js +32 -0
  342. package/wmapp/locales/angular/global/ar-qa.js +32 -0
  343. package/wmapp/locales/angular/global/ar-sa.js +32 -0
  344. package/wmapp/locales/angular/global/ar-sd.js +32 -0
  345. package/wmapp/locales/angular/global/ar-so.js +32 -0
  346. package/wmapp/locales/angular/global/ar-ss.js +32 -0
  347. package/wmapp/locales/angular/global/ar-sy.js +32 -0
  348. package/wmapp/locales/angular/global/ar-td.js +32 -0
  349. package/wmapp/locales/angular/global/ar-tn.js +32 -0
  350. package/wmapp/locales/angular/global/ar-ye.js +32 -0
  351. package/wmapp/locales/angular/global/ar.js +32 -0
  352. package/wmapp/locales/angular/global/as.js +24 -0
  353. package/wmapp/locales/angular/global/asa.js +24 -0
  354. package/wmapp/locales/angular/global/ast.js +24 -0
  355. package/wmapp/locales/angular/global/az-cyrl.js +22 -0
  356. package/wmapp/locales/angular/global/az-latn.js +24 -0
  357. package/wmapp/locales/angular/global/az.js +24 -0
  358. package/wmapp/locales/angular/global/bas.js +22 -0
  359. package/wmapp/locales/angular/global/be-tarask.js +28 -0
  360. package/wmapp/locales/angular/global/be.js +28 -0
  361. package/wmapp/locales/angular/global/bem.js +24 -0
  362. package/wmapp/locales/angular/global/bez.js +24 -0
  363. package/wmapp/locales/angular/global/bg.js +24 -0
  364. package/wmapp/locales/angular/global/bm.js +22 -0
  365. package/wmapp/locales/angular/global/bn-in.js +24 -0
  366. package/wmapp/locales/angular/global/bn.js +24 -0
  367. package/wmapp/locales/angular/global/bo-in.js +22 -0
  368. package/wmapp/locales/angular/global/bo.js +22 -0
  369. package/wmapp/locales/angular/global/br.js +30 -0
  370. package/wmapp/locales/angular/global/brx.js +24 -0
  371. package/wmapp/locales/angular/global/bs-cyrl.js +22 -0
  372. package/wmapp/locales/angular/global/bs-latn.js +26 -0
  373. package/wmapp/locales/angular/global/bs.js +26 -0
  374. package/wmapp/locales/angular/global/ca-ad.js +24 -0
  375. package/wmapp/locales/angular/global/ca-es-valencia.js +24 -0
  376. package/wmapp/locales/angular/global/ca-fr.js +24 -0
  377. package/wmapp/locales/angular/global/ca-it.js +24 -0
  378. package/wmapp/locales/angular/global/ca.js +24 -0
  379. package/wmapp/locales/angular/global/ccp-in.js +22 -0
  380. package/wmapp/locales/angular/global/ccp.js +22 -0
  381. package/wmapp/locales/angular/global/ce.js +24 -0
  382. package/wmapp/locales/angular/global/ceb.js +24 -0
  383. package/wmapp/locales/angular/global/cgg.js +24 -0
  384. package/wmapp/locales/angular/global/chr.js +24 -0
  385. package/wmapp/locales/angular/global/ckb-ir.js +24 -0
  386. package/wmapp/locales/angular/global/ckb.js +24 -0
  387. package/wmapp/locales/angular/global/cs.js +28 -0
  388. package/wmapp/locales/angular/global/cy.js +32 -0
  389. package/wmapp/locales/angular/global/da-gl.js +24 -0
  390. package/wmapp/locales/angular/global/da.js +24 -0
  391. package/wmapp/locales/angular/global/dav.js +22 -0
  392. package/wmapp/locales/angular/global/de-at.js +24 -0
  393. package/wmapp/locales/angular/global/de-be.js +24 -0
  394. package/wmapp/locales/angular/global/de-ch.js +24 -0
  395. package/wmapp/locales/angular/global/de-it.js +24 -0
  396. package/wmapp/locales/angular/global/de-li.js +24 -0
  397. package/wmapp/locales/angular/global/de-lu.js +24 -0
  398. package/wmapp/locales/angular/global/de.js +24 -0
  399. package/wmapp/locales/angular/global/dje.js +22 -0
  400. package/wmapp/locales/angular/global/doi.js +24 -0
  401. package/wmapp/locales/angular/global/dsb.js +28 -0
  402. package/wmapp/locales/angular/global/dua.js +22 -0
  403. package/wmapp/locales/angular/global/dyo.js +22 -0
  404. package/wmapp/locales/angular/global/dz.js +22 -0
  405. package/wmapp/locales/angular/global/ebu.js +22 -0
  406. package/wmapp/locales/angular/global/ee-tg.js +24 -0
  407. package/wmapp/locales/angular/global/ee.js +24 -0
  408. package/wmapp/locales/angular/global/el-cy.js +24 -0
  409. package/wmapp/locales/angular/global/el.js +24 -0
  410. package/wmapp/locales/angular/global/en-001.js +24 -0
  411. package/wmapp/locales/angular/global/en-150.js +24 -0
  412. package/wmapp/locales/angular/global/en-ae.js +24 -0
  413. package/wmapp/locales/angular/global/en-ag.js +24 -0
  414. package/wmapp/locales/angular/global/en-ai.js +24 -0
  415. package/wmapp/locales/angular/global/en-as.js +24 -0
  416. package/wmapp/locales/angular/global/en-at.js +24 -0
  417. package/wmapp/locales/angular/global/en-au.js +24 -0
  418. package/wmapp/locales/angular/global/en-bb.js +24 -0
  419. package/wmapp/locales/angular/global/en-be.js +24 -0
  420. package/wmapp/locales/angular/global/en-bi.js +24 -0
  421. package/wmapp/locales/angular/global/en-bm.js +24 -0
  422. package/wmapp/locales/angular/global/en-bs.js +24 -0
  423. package/wmapp/locales/angular/global/en-bw.js +24 -0
  424. package/wmapp/locales/angular/global/en-bz.js +24 -0
  425. package/wmapp/locales/angular/global/en-ca.js +24 -0
  426. package/wmapp/locales/angular/global/en-cc.js +24 -0
  427. package/wmapp/locales/angular/global/en-ch.js +24 -0
  428. package/wmapp/locales/angular/global/en-ck.js +24 -0
  429. package/wmapp/locales/angular/global/en-cm.js +24 -0
  430. package/wmapp/locales/angular/global/en-cx.js +24 -0
  431. package/wmapp/locales/angular/global/en-cy.js +24 -0
  432. package/wmapp/locales/angular/global/en-de.js +24 -0
  433. package/wmapp/locales/angular/global/en-dg.js +24 -0
  434. package/wmapp/locales/angular/global/en-dk.js +24 -0
  435. package/wmapp/locales/angular/global/en-dm.js +24 -0
  436. package/wmapp/locales/angular/global/en-er.js +24 -0
  437. package/wmapp/locales/angular/global/en-fi.js +24 -0
  438. package/wmapp/locales/angular/global/en-fj.js +24 -0
  439. package/wmapp/locales/angular/global/en-fk.js +24 -0
  440. package/wmapp/locales/angular/global/en-fm.js +24 -0
  441. package/wmapp/locales/angular/global/en-gb.js +24 -0
  442. package/wmapp/locales/angular/global/en-gd.js +24 -0
  443. package/wmapp/locales/angular/global/en-gg.js +24 -0
  444. package/wmapp/locales/angular/global/en-gh.js +24 -0
  445. package/wmapp/locales/angular/global/en-gi.js +24 -0
  446. package/wmapp/locales/angular/global/en-gm.js +24 -0
  447. package/wmapp/locales/angular/global/en-gu.js +24 -0
  448. package/wmapp/locales/angular/global/en-gy.js +24 -0
  449. package/wmapp/locales/angular/global/en-hk.js +24 -0
  450. package/wmapp/locales/angular/global/en-ie.js +24 -0
  451. package/wmapp/locales/angular/global/en-il.js +24 -0
  452. package/wmapp/locales/angular/global/en-im.js +24 -0
  453. package/wmapp/locales/angular/global/en-in.js +24 -0
  454. package/wmapp/locales/angular/global/en-io.js +24 -0
  455. package/wmapp/locales/angular/global/en-je.js +24 -0
  456. package/wmapp/locales/angular/global/en-jm.js +24 -0
  457. package/wmapp/locales/angular/global/en-ke.js +24 -0
  458. package/wmapp/locales/angular/global/en-ki.js +24 -0
  459. package/wmapp/locales/angular/global/en-kn.js +24 -0
  460. package/wmapp/locales/angular/global/en-ky.js +24 -0
  461. package/wmapp/locales/angular/global/en-lc.js +24 -0
  462. package/wmapp/locales/angular/global/en-lr.js +24 -0
  463. package/wmapp/locales/angular/global/en-ls.js +24 -0
  464. package/wmapp/locales/angular/global/en-mg.js +24 -0
  465. package/wmapp/locales/angular/global/en-mh.js +24 -0
  466. package/wmapp/locales/angular/global/en-mo.js +24 -0
  467. package/wmapp/locales/angular/global/en-mp.js +24 -0
  468. package/wmapp/locales/angular/global/en-ms.js +24 -0
  469. package/wmapp/locales/angular/global/en-mt.js +24 -0
  470. package/wmapp/locales/angular/global/en-mu.js +24 -0
  471. package/wmapp/locales/angular/global/en-mv.js +24 -0
  472. package/wmapp/locales/angular/global/en-mw.js +24 -0
  473. package/wmapp/locales/angular/global/en-my.js +24 -0
  474. package/wmapp/locales/angular/global/en-na.js +24 -0
  475. package/wmapp/locales/angular/global/en-nf.js +24 -0
  476. package/wmapp/locales/angular/global/en-ng.js +24 -0
  477. package/wmapp/locales/angular/global/en-nl.js +24 -0
  478. package/wmapp/locales/angular/global/en-nr.js +24 -0
  479. package/wmapp/locales/angular/global/en-nu.js +24 -0
  480. package/wmapp/locales/angular/global/en-nz.js +24 -0
  481. package/wmapp/locales/angular/global/en-pg.js +24 -0
  482. package/wmapp/locales/angular/global/en-ph.js +24 -0
  483. package/wmapp/locales/angular/global/en-pk.js +24 -0
  484. package/wmapp/locales/angular/global/en-pn.js +24 -0
  485. package/wmapp/locales/angular/global/en-pr.js +24 -0
  486. package/wmapp/locales/angular/global/en-pw.js +24 -0
  487. package/wmapp/locales/angular/global/en-rw.js +24 -0
  488. package/wmapp/locales/angular/global/en-sb.js +24 -0
  489. package/wmapp/locales/angular/global/en-sc.js +24 -0
  490. package/wmapp/locales/angular/global/en-sd.js +24 -0
  491. package/wmapp/locales/angular/global/en-se.js +24 -0
  492. package/wmapp/locales/angular/global/en-sg.js +24 -0
  493. package/wmapp/locales/angular/global/en-sh.js +24 -0
  494. package/wmapp/locales/angular/global/en-si.js +24 -0
  495. package/wmapp/locales/angular/global/en-sl.js +24 -0
  496. package/wmapp/locales/angular/global/en-ss.js +24 -0
  497. package/wmapp/locales/angular/global/en-sx.js +24 -0
  498. package/wmapp/locales/angular/global/en-sz.js +24 -0
  499. package/wmapp/locales/angular/global/en-tc.js +24 -0
  500. package/wmapp/locales/angular/global/en-tk.js +24 -0
  501. package/wmapp/locales/angular/global/en-to.js +24 -0
  502. package/wmapp/locales/angular/global/en-tt.js +24 -0
  503. package/wmapp/locales/angular/global/en-tv.js +24 -0
  504. package/wmapp/locales/angular/global/en-tz.js +24 -0
  505. package/wmapp/locales/angular/global/en-ug.js +24 -0
  506. package/wmapp/locales/angular/global/en-um.js +24 -0
  507. package/wmapp/locales/angular/global/en-vc.js +24 -0
  508. package/wmapp/locales/angular/global/en-vg.js +24 -0
  509. package/wmapp/locales/angular/global/en-vi.js +24 -0
  510. package/wmapp/locales/angular/global/en-vu.js +24 -0
  511. package/wmapp/locales/angular/global/en-ws.js +24 -0
  512. package/wmapp/locales/angular/global/en-za.js +24 -0
  513. package/wmapp/locales/angular/global/en-zm.js +24 -0
  514. package/wmapp/locales/angular/global/en-zw.js +24 -0
  515. package/wmapp/locales/angular/global/en.js +24 -0
  516. package/wmapp/locales/angular/global/eo.js +24 -0
  517. package/wmapp/locales/angular/global/es-419.js +26 -0
  518. package/wmapp/locales/angular/global/es-ar.js +26 -0
  519. package/wmapp/locales/angular/global/es-bo.js +26 -0
  520. package/wmapp/locales/angular/global/es-br.js +26 -0
  521. package/wmapp/locales/angular/global/es-bz.js +26 -0
  522. package/wmapp/locales/angular/global/es-cl.js +26 -0
  523. package/wmapp/locales/angular/global/es-co.js +26 -0
  524. package/wmapp/locales/angular/global/es-cr.js +26 -0
  525. package/wmapp/locales/angular/global/es-cu.js +26 -0
  526. package/wmapp/locales/angular/global/es-do.js +26 -0
  527. package/wmapp/locales/angular/global/es-ea.js +26 -0
  528. package/wmapp/locales/angular/global/es-ec.js +26 -0
  529. package/wmapp/locales/angular/global/es-gq.js +26 -0
  530. package/wmapp/locales/angular/global/es-gt.js +26 -0
  531. package/wmapp/locales/angular/global/es-hn.js +26 -0
  532. package/wmapp/locales/angular/global/es-ic.js +26 -0
  533. package/wmapp/locales/angular/global/es-mx.js +26 -0
  534. package/wmapp/locales/angular/global/es-ni.js +26 -0
  535. package/wmapp/locales/angular/global/es-pa.js +26 -0
  536. package/wmapp/locales/angular/global/es-pe.js +26 -0
  537. package/wmapp/locales/angular/global/es-ph.js +26 -0
  538. package/wmapp/locales/angular/global/es-pr.js +26 -0
  539. package/wmapp/locales/angular/global/es-py.js +26 -0
  540. package/wmapp/locales/angular/global/es-sv.js +26 -0
  541. package/wmapp/locales/angular/global/es-us.js +26 -0
  542. package/wmapp/locales/angular/global/es-uy.js +26 -0
  543. package/wmapp/locales/angular/global/es-ve.js +26 -0
  544. package/wmapp/locales/angular/global/es.js +26 -0
  545. package/wmapp/locales/angular/global/et.js +24 -0
  546. package/wmapp/locales/angular/global/eu.js +24 -0
  547. package/wmapp/locales/angular/global/ewo.js +22 -0
  548. package/wmapp/locales/angular/global/fa-af.js +24 -0
  549. package/wmapp/locales/angular/global/fa.js +24 -0
  550. package/wmapp/locales/angular/global/ff-adlm-bf.js +22 -0
  551. package/wmapp/locales/angular/global/ff-adlm-cm.js +22 -0
  552. package/wmapp/locales/angular/global/ff-adlm-gh.js +22 -0
  553. package/wmapp/locales/angular/global/ff-adlm-gm.js +22 -0
  554. package/wmapp/locales/angular/global/ff-adlm-gw.js +22 -0
  555. package/wmapp/locales/angular/global/ff-adlm-lr.js +22 -0
  556. package/wmapp/locales/angular/global/ff-adlm-mr.js +22 -0
  557. package/wmapp/locales/angular/global/ff-adlm-ne.js +22 -0
  558. package/wmapp/locales/angular/global/ff-adlm-ng.js +22 -0
  559. package/wmapp/locales/angular/global/ff-adlm-sl.js +22 -0
  560. package/wmapp/locales/angular/global/ff-adlm-sn.js +22 -0
  561. package/wmapp/locales/angular/global/ff-adlm.js +22 -0
  562. package/wmapp/locales/angular/global/ff-cm.js +74 -0
  563. package/wmapp/locales/angular/global/ff-gn.js +74 -0
  564. package/wmapp/locales/angular/global/ff-latn-bf.js +24 -0
  565. package/wmapp/locales/angular/global/ff-latn-cm.js +24 -0
  566. package/wmapp/locales/angular/global/ff-latn-gh.js +24 -0
  567. package/wmapp/locales/angular/global/ff-latn-gm.js +24 -0
  568. package/wmapp/locales/angular/global/ff-latn-gn.js +24 -0
  569. package/wmapp/locales/angular/global/ff-latn-gw.js +24 -0
  570. package/wmapp/locales/angular/global/ff-latn-lr.js +24 -0
  571. package/wmapp/locales/angular/global/ff-latn-mr.js +24 -0
  572. package/wmapp/locales/angular/global/ff-latn-ne.js +24 -0
  573. package/wmapp/locales/angular/global/ff-latn-ng.js +24 -0
  574. package/wmapp/locales/angular/global/ff-latn-sl.js +24 -0
  575. package/wmapp/locales/angular/global/ff-latn.js +24 -0
  576. package/wmapp/locales/angular/global/ff-mr.js +74 -0
  577. package/wmapp/locales/angular/global/ff.js +24 -0
  578. package/wmapp/locales/angular/global/fi.js +24 -0
  579. package/wmapp/locales/angular/global/fil.js +24 -0
  580. package/wmapp/locales/angular/global/fo-dk.js +24 -0
  581. package/wmapp/locales/angular/global/fo.js +24 -0
  582. package/wmapp/locales/angular/global/fr-be.js +26 -0
  583. package/wmapp/locales/angular/global/fr-bf.js +26 -0
  584. package/wmapp/locales/angular/global/fr-bi.js +26 -0
  585. package/wmapp/locales/angular/global/fr-bj.js +26 -0
  586. package/wmapp/locales/angular/global/fr-bl.js +26 -0
  587. package/wmapp/locales/angular/global/fr-ca.js +26 -0
  588. package/wmapp/locales/angular/global/fr-cd.js +26 -0
  589. package/wmapp/locales/angular/global/fr-cf.js +26 -0
  590. package/wmapp/locales/angular/global/fr-cg.js +26 -0
  591. package/wmapp/locales/angular/global/fr-ch.js +26 -0
  592. package/wmapp/locales/angular/global/fr-ci.js +26 -0
  593. package/wmapp/locales/angular/global/fr-cm.js +26 -0
  594. package/wmapp/locales/angular/global/fr-dj.js +26 -0
  595. package/wmapp/locales/angular/global/fr-dz.js +26 -0
  596. package/wmapp/locales/angular/global/fr-ga.js +26 -0
  597. package/wmapp/locales/angular/global/fr-gf.js +26 -0
  598. package/wmapp/locales/angular/global/fr-gn.js +26 -0
  599. package/wmapp/locales/angular/global/fr-gp.js +26 -0
  600. package/wmapp/locales/angular/global/fr-gq.js +26 -0
  601. package/wmapp/locales/angular/global/fr-ht.js +26 -0
  602. package/wmapp/locales/angular/global/fr-km.js +26 -0
  603. package/wmapp/locales/angular/global/fr-lu.js +26 -0
  604. package/wmapp/locales/angular/global/fr-ma.js +26 -0
  605. package/wmapp/locales/angular/global/fr-mc.js +26 -0
  606. package/wmapp/locales/angular/global/fr-mf.js +26 -0
  607. package/wmapp/locales/angular/global/fr-mg.js +26 -0
  608. package/wmapp/locales/angular/global/fr-ml.js +26 -0
  609. package/wmapp/locales/angular/global/fr-mq.js +26 -0
  610. package/wmapp/locales/angular/global/fr-mr.js +26 -0
  611. package/wmapp/locales/angular/global/fr-mu.js +26 -0
  612. package/wmapp/locales/angular/global/fr-nc.js +26 -0
  613. package/wmapp/locales/angular/global/fr-ne.js +26 -0
  614. package/wmapp/locales/angular/global/fr-pf.js +26 -0
  615. package/wmapp/locales/angular/global/fr-pm.js +26 -0
  616. package/wmapp/locales/angular/global/fr-re.js +26 -0
  617. package/wmapp/locales/angular/global/fr-rw.js +26 -0
  618. package/wmapp/locales/angular/global/fr-sc.js +26 -0
  619. package/wmapp/locales/angular/global/fr-sn.js +26 -0
  620. package/wmapp/locales/angular/global/fr-sy.js +26 -0
  621. package/wmapp/locales/angular/global/fr-td.js +26 -0
  622. package/wmapp/locales/angular/global/fr-tg.js +26 -0
  623. package/wmapp/locales/angular/global/fr-tn.js +26 -0
  624. package/wmapp/locales/angular/global/fr-vu.js +26 -0
  625. package/wmapp/locales/angular/global/fr-wf.js +26 -0
  626. package/wmapp/locales/angular/global/fr-yt.js +26 -0
  627. package/wmapp/locales/angular/global/fr.js +26 -0
  628. package/wmapp/locales/angular/global/fur.js +24 -0
  629. package/wmapp/locales/angular/global/fy.js +24 -0
  630. package/wmapp/locales/angular/global/ga-gb.js +30 -0
  631. package/wmapp/locales/angular/global/ga.js +30 -0
  632. package/wmapp/locales/angular/global/gd.js +28 -0
  633. package/wmapp/locales/angular/global/gl.js +24 -0
  634. package/wmapp/locales/angular/global/gsw-fr.js +24 -0
  635. package/wmapp/locales/angular/global/gsw-li.js +24 -0
  636. package/wmapp/locales/angular/global/gsw.js +24 -0
  637. package/wmapp/locales/angular/global/gu.js +24 -0
  638. package/wmapp/locales/angular/global/guz.js +22 -0
  639. package/wmapp/locales/angular/global/gv.js +30 -0
  640. package/wmapp/locales/angular/global/ha-gh.js +24 -0
  641. package/wmapp/locales/angular/global/ha-ne.js +24 -0
  642. package/wmapp/locales/angular/global/ha.js +24 -0
  643. package/wmapp/locales/angular/global/haw.js +24 -0
  644. package/wmapp/locales/angular/global/he.js +28 -0
  645. package/wmapp/locales/angular/global/hi-latn.js +24 -0
  646. package/wmapp/locales/angular/global/hi.js +24 -0
  647. package/wmapp/locales/angular/global/hr-ba.js +26 -0
  648. package/wmapp/locales/angular/global/hr.js +26 -0
  649. package/wmapp/locales/angular/global/hsb.js +28 -0
  650. package/wmapp/locales/angular/global/hu.js +24 -0
  651. package/wmapp/locales/angular/global/hy.js +24 -0
  652. package/wmapp/locales/angular/global/ia.js +24 -0
  653. package/wmapp/locales/angular/global/id.js +22 -0
  654. package/wmapp/locales/angular/global/ig.js +22 -0
  655. package/wmapp/locales/angular/global/ii.js +22 -0
  656. package/wmapp/locales/angular/global/is.js +24 -0
  657. package/wmapp/locales/angular/global/it-ch.js +26 -0
  658. package/wmapp/locales/angular/global/it-sm.js +26 -0
  659. package/wmapp/locales/angular/global/it-va.js +26 -0
  660. package/wmapp/locales/angular/global/it.js +26 -0
  661. package/wmapp/locales/angular/global/ja.js +22 -0
  662. package/wmapp/locales/angular/global/jgo.js +24 -0
  663. package/wmapp/locales/angular/global/jmc.js +24 -0
  664. package/wmapp/locales/angular/global/jv.js +22 -0
  665. package/wmapp/locales/angular/global/ka.js +24 -0
  666. package/wmapp/locales/angular/global/kab.js +24 -0
  667. package/wmapp/locales/angular/global/kam.js +22 -0
  668. package/wmapp/locales/angular/global/kde.js +22 -0
  669. package/wmapp/locales/angular/global/kea.js +22 -0
  670. package/wmapp/locales/angular/global/kgp.js +22 -0
  671. package/wmapp/locales/angular/global/khq.js +22 -0
  672. package/wmapp/locales/angular/global/ki.js +22 -0
  673. package/wmapp/locales/angular/global/kk.js +24 -0
  674. package/wmapp/locales/angular/global/kkj.js +24 -0
  675. package/wmapp/locales/angular/global/kl.js +24 -0
  676. package/wmapp/locales/angular/global/kln.js +22 -0
  677. package/wmapp/locales/angular/global/km.js +22 -0
  678. package/wmapp/locales/angular/global/kn.js +24 -0
  679. package/wmapp/locales/angular/global/ko-kp.js +22 -0
  680. package/wmapp/locales/angular/global/ko.js +22 -0
  681. package/wmapp/locales/angular/global/kok.js +22 -0
  682. package/wmapp/locales/angular/global/ks-arab.js +24 -0
  683. package/wmapp/locales/angular/global/ks-deva.js +22 -0
  684. package/wmapp/locales/angular/global/ks.js +24 -0
  685. package/wmapp/locales/angular/global/ksb.js +24 -0
  686. package/wmapp/locales/angular/global/ksf.js +22 -0
  687. package/wmapp/locales/angular/global/ksh.js +26 -0
  688. package/wmapp/locales/angular/global/ku.js +24 -0
  689. package/wmapp/locales/angular/global/kw.js +32 -0
  690. package/wmapp/locales/angular/global/ky.js +24 -0
  691. package/wmapp/locales/angular/global/lag.js +26 -0
  692. package/wmapp/locales/angular/global/lb.js +24 -0
  693. package/wmapp/locales/angular/global/lg.js +24 -0
  694. package/wmapp/locales/angular/global/lkt.js +22 -0
  695. package/wmapp/locales/angular/global/ln-ao.js +24 -0
  696. package/wmapp/locales/angular/global/ln-cf.js +24 -0
  697. package/wmapp/locales/angular/global/ln-cg.js +24 -0
  698. package/wmapp/locales/angular/global/ln.js +24 -0
  699. package/wmapp/locales/angular/global/lo.js +22 -0
  700. package/wmapp/locales/angular/global/lrc-iq.js +22 -0
  701. package/wmapp/locales/angular/global/lrc.js +22 -0
  702. package/wmapp/locales/angular/global/lt.js +28 -0
  703. package/wmapp/locales/angular/global/lu.js +22 -0
  704. package/wmapp/locales/angular/global/luo.js +22 -0
  705. package/wmapp/locales/angular/global/luy.js +22 -0
  706. package/wmapp/locales/angular/global/lv.js +26 -0
  707. package/wmapp/locales/angular/global/mai.js +22 -0
  708. package/wmapp/locales/angular/global/mas-tz.js +24 -0
  709. package/wmapp/locales/angular/global/mas.js +24 -0
  710. package/wmapp/locales/angular/global/mer.js +22 -0
  711. package/wmapp/locales/angular/global/mfe.js +22 -0
  712. package/wmapp/locales/angular/global/mg.js +24 -0
  713. package/wmapp/locales/angular/global/mgh.js +22 -0
  714. package/wmapp/locales/angular/global/mgo.js +24 -0
  715. package/wmapp/locales/angular/global/mi.js +22 -0
  716. package/wmapp/locales/angular/global/mk.js +24 -0
  717. package/wmapp/locales/angular/global/ml.js +24 -0
  718. package/wmapp/locales/angular/global/mn.js +24 -0
  719. package/wmapp/locales/angular/global/mni-beng.js +22 -0
  720. package/wmapp/locales/angular/global/mni.js +22 -0
  721. package/wmapp/locales/angular/global/mr.js +24 -0
  722. package/wmapp/locales/angular/global/ms-bn.js +22 -0
  723. package/wmapp/locales/angular/global/ms-id.js +22 -0
  724. package/wmapp/locales/angular/global/ms-sg.js +22 -0
  725. package/wmapp/locales/angular/global/ms.js +22 -0
  726. package/wmapp/locales/angular/global/mt.js +28 -0
  727. package/wmapp/locales/angular/global/mua.js +22 -0
  728. package/wmapp/locales/angular/global/my.js +22 -0
  729. package/wmapp/locales/angular/global/mzn.js +22 -0
  730. package/wmapp/locales/angular/global/naq.js +26 -0
  731. package/wmapp/locales/angular/global/nb-sj.js +24 -0
  732. package/wmapp/locales/angular/global/nb.js +24 -0
  733. package/wmapp/locales/angular/global/nd.js +24 -0
  734. package/wmapp/locales/angular/global/nds-nl.js +22 -0
  735. package/wmapp/locales/angular/global/nds.js +22 -0
  736. package/wmapp/locales/angular/global/ne-in.js +24 -0
  737. package/wmapp/locales/angular/global/ne.js +24 -0
  738. package/wmapp/locales/angular/global/nl-aw.js +24 -0
  739. package/wmapp/locales/angular/global/nl-be.js +24 -0
  740. package/wmapp/locales/angular/global/nl-bq.js +24 -0
  741. package/wmapp/locales/angular/global/nl-cw.js +24 -0
  742. package/wmapp/locales/angular/global/nl-sr.js +24 -0
  743. package/wmapp/locales/angular/global/nl-sx.js +24 -0
  744. package/wmapp/locales/angular/global/nl.js +24 -0
  745. package/wmapp/locales/angular/global/nmg.js +22 -0
  746. package/wmapp/locales/angular/global/nn.js +24 -0
  747. package/wmapp/locales/angular/global/nnh.js +24 -0
  748. package/wmapp/locales/angular/global/no.js +24 -0
  749. package/wmapp/locales/angular/global/nus.js +22 -0
  750. package/wmapp/locales/angular/global/nyn.js +24 -0
  751. package/wmapp/locales/angular/global/om-ke.js +24 -0
  752. package/wmapp/locales/angular/global/om.js +24 -0
  753. package/wmapp/locales/angular/global/or.js +24 -0
  754. package/wmapp/locales/angular/global/os-ru.js +24 -0
  755. package/wmapp/locales/angular/global/os.js +24 -0
  756. package/wmapp/locales/angular/global/pa-arab.js +22 -0
  757. package/wmapp/locales/angular/global/pa-guru.js +24 -0
  758. package/wmapp/locales/angular/global/pa.js +24 -0
  759. package/wmapp/locales/angular/global/pcm.js +24 -0
  760. package/wmapp/locales/angular/global/pl.js +28 -0
  761. package/wmapp/locales/angular/global/ps-pk.js +24 -0
  762. package/wmapp/locales/angular/global/ps.js +24 -0
  763. package/wmapp/locales/angular/global/pt-ao.js +26 -0
  764. package/wmapp/locales/angular/global/pt-ch.js +26 -0
  765. package/wmapp/locales/angular/global/pt-cv.js +26 -0
  766. package/wmapp/locales/angular/global/pt-gq.js +26 -0
  767. package/wmapp/locales/angular/global/pt-gw.js +26 -0
  768. package/wmapp/locales/angular/global/pt-lu.js +26 -0
  769. package/wmapp/locales/angular/global/pt-mo.js +26 -0
  770. package/wmapp/locales/angular/global/pt-mz.js +26 -0
  771. package/wmapp/locales/angular/global/pt-pt.js +26 -0
  772. package/wmapp/locales/angular/global/pt-st.js +26 -0
  773. package/wmapp/locales/angular/global/pt-tl.js +26 -0
  774. package/wmapp/locales/angular/global/pt.js +26 -0
  775. package/wmapp/locales/angular/global/qu-bo.js +22 -0
  776. package/wmapp/locales/angular/global/qu-ec.js +22 -0
  777. package/wmapp/locales/angular/global/qu.js +22 -0
  778. package/wmapp/locales/angular/global/rm.js +24 -0
  779. package/wmapp/locales/angular/global/rn.js +22 -0
  780. package/wmapp/locales/angular/global/ro-md.js +26 -0
  781. package/wmapp/locales/angular/global/ro.js +26 -0
  782. package/wmapp/locales/angular/global/rof.js +24 -0
  783. package/wmapp/locales/angular/global/ru-by.js +28 -0
  784. package/wmapp/locales/angular/global/ru-kg.js +28 -0
  785. package/wmapp/locales/angular/global/ru-kz.js +28 -0
  786. package/wmapp/locales/angular/global/ru-md.js +28 -0
  787. package/wmapp/locales/angular/global/ru-ua.js +28 -0
  788. package/wmapp/locales/angular/global/ru.js +28 -0
  789. package/wmapp/locales/angular/global/rw.js +22 -0
  790. package/wmapp/locales/angular/global/rwk.js +24 -0
  791. package/wmapp/locales/angular/global/sa.js +22 -0
  792. package/wmapp/locales/angular/global/sah.js +22 -0
  793. package/wmapp/locales/angular/global/saq.js +24 -0
  794. package/wmapp/locales/angular/global/sat-olck.js +26 -0
  795. package/wmapp/locales/angular/global/sat.js +26 -0
  796. package/wmapp/locales/angular/global/sbp.js +22 -0
  797. package/wmapp/locales/angular/global/sc.js +24 -0
  798. package/wmapp/locales/angular/global/sd-arab.js +24 -0
  799. package/wmapp/locales/angular/global/sd-deva.js +22 -0
  800. package/wmapp/locales/angular/global/sd.js +24 -0
  801. package/wmapp/locales/angular/global/se-fi.js +26 -0
  802. package/wmapp/locales/angular/global/se-se.js +26 -0
  803. package/wmapp/locales/angular/global/se.js +26 -0
  804. package/wmapp/locales/angular/global/seh.js +24 -0
  805. package/wmapp/locales/angular/global/ses.js +22 -0
  806. package/wmapp/locales/angular/global/sg.js +22 -0
  807. package/wmapp/locales/angular/global/shi-latn.js +22 -0
  808. package/wmapp/locales/angular/global/shi-tfng.js +26 -0
  809. package/wmapp/locales/angular/global/shi.js +26 -0
  810. package/wmapp/locales/angular/global/si.js +24 -0
  811. package/wmapp/locales/angular/global/sk.js +28 -0
  812. package/wmapp/locales/angular/global/sl.js +28 -0
  813. package/wmapp/locales/angular/global/smn.js +26 -0
  814. package/wmapp/locales/angular/global/sn.js +24 -0
  815. package/wmapp/locales/angular/global/so-dj.js +24 -0
  816. package/wmapp/locales/angular/global/so-et.js +24 -0
  817. package/wmapp/locales/angular/global/so-ke.js +24 -0
  818. package/wmapp/locales/angular/global/so.js +24 -0
  819. package/wmapp/locales/angular/global/sq-mk.js +24 -0
  820. package/wmapp/locales/angular/global/sq-xk.js +24 -0
  821. package/wmapp/locales/angular/global/sq.js +24 -0
  822. package/wmapp/locales/angular/global/sr-cyrl-ba.js +26 -0
  823. package/wmapp/locales/angular/global/sr-cyrl-me.js +26 -0
  824. package/wmapp/locales/angular/global/sr-cyrl-xk.js +26 -0
  825. package/wmapp/locales/angular/global/sr-cyrl.js +26 -0
  826. package/wmapp/locales/angular/global/sr-latn-ba.js +22 -0
  827. package/wmapp/locales/angular/global/sr-latn-me.js +22 -0
  828. package/wmapp/locales/angular/global/sr-latn-xk.js +22 -0
  829. package/wmapp/locales/angular/global/sr-latn.js +22 -0
  830. package/wmapp/locales/angular/global/sr.js +26 -0
  831. package/wmapp/locales/angular/global/su-latn.js +22 -0
  832. package/wmapp/locales/angular/global/su.js +22 -0
  833. package/wmapp/locales/angular/global/sv-ax.js +24 -0
  834. package/wmapp/locales/angular/global/sv-fi.js +24 -0
  835. package/wmapp/locales/angular/global/sv.js +24 -0
  836. package/wmapp/locales/angular/global/sw-cd.js +24 -0
  837. package/wmapp/locales/angular/global/sw-ke.js +24 -0
  838. package/wmapp/locales/angular/global/sw-ug.js +24 -0
  839. package/wmapp/locales/angular/global/sw.js +24 -0
  840. package/wmapp/locales/angular/global/ta-lk.js +24 -0
  841. package/wmapp/locales/angular/global/ta-my.js +24 -0
  842. package/wmapp/locales/angular/global/ta-sg.js +24 -0
  843. package/wmapp/locales/angular/global/ta.js +24 -0
  844. package/wmapp/locales/angular/global/te.js +24 -0
  845. package/wmapp/locales/angular/global/teo-ke.js +24 -0
  846. package/wmapp/locales/angular/global/teo.js +24 -0
  847. package/wmapp/locales/angular/global/tg.js +22 -0
  848. package/wmapp/locales/angular/global/th.js +22 -0
  849. package/wmapp/locales/angular/global/ti-er.js +24 -0
  850. package/wmapp/locales/angular/global/ti.js +24 -0
  851. package/wmapp/locales/angular/global/tk.js +24 -0
  852. package/wmapp/locales/angular/global/to.js +22 -0
  853. package/wmapp/locales/angular/global/tr-cy.js +24 -0
  854. package/wmapp/locales/angular/global/tr.js +24 -0
  855. package/wmapp/locales/angular/global/tt.js +22 -0
  856. package/wmapp/locales/angular/global/twq.js +22 -0
  857. package/wmapp/locales/angular/global/tzm.js +24 -0
  858. package/wmapp/locales/angular/global/ug.js +24 -0
  859. package/wmapp/locales/angular/global/uk.js +28 -0
  860. package/wmapp/locales/angular/global/und.js +24 -0
  861. package/wmapp/locales/angular/global/ur-in.js +24 -0
  862. package/wmapp/locales/angular/global/ur.js +24 -0
  863. package/wmapp/locales/angular/global/uz-arab.js +22 -0
  864. package/wmapp/locales/angular/global/uz-cyrl.js +22 -0
  865. package/wmapp/locales/angular/global/uz-latn.js +24 -0
  866. package/wmapp/locales/angular/global/uz.js +24 -0
  867. package/wmapp/locales/angular/global/vai-latn.js +22 -0
  868. package/wmapp/locales/angular/global/vai-vaii.js +22 -0
  869. package/wmapp/locales/angular/global/vai.js +22 -0
  870. package/wmapp/locales/angular/global/vi.js +22 -0
  871. package/wmapp/locales/angular/global/vun.js +24 -0
  872. package/wmapp/locales/angular/global/wae.js +24 -0
  873. package/wmapp/locales/angular/global/wo.js +22 -0
  874. package/wmapp/locales/angular/global/xh.js +24 -0
  875. package/wmapp/locales/angular/global/xog.js +24 -0
  876. package/wmapp/locales/angular/global/yav.js +22 -0
  877. package/wmapp/locales/angular/global/yi.js +24 -0
  878. package/wmapp/locales/angular/global/yo-bj.js +22 -0
  879. package/wmapp/locales/angular/global/yo.js +22 -0
  880. package/wmapp/locales/angular/global/yrl-co.js +22 -0
  881. package/wmapp/locales/angular/global/yrl-ve.js +22 -0
  882. package/wmapp/locales/angular/global/yrl.js +22 -0
  883. package/wmapp/locales/angular/global/yue-hans.js +22 -0
  884. package/wmapp/locales/angular/global/yue-hant.js +22 -0
  885. package/wmapp/locales/angular/global/yue.js +22 -0
  886. package/wmapp/locales/angular/global/zgh.js +22 -0
  887. package/wmapp/locales/angular/global/zh-hans-hk.js +22 -0
  888. package/wmapp/locales/angular/global/zh-hans-mo.js +22 -0
  889. package/wmapp/locales/angular/global/zh-hans-sg.js +22 -0
  890. package/wmapp/locales/angular/global/zh-hans.js +22 -0
  891. package/wmapp/locales/angular/global/zh-hant-hk.js +22 -0
  892. package/wmapp/locales/angular/global/zh-hant-mo.js +22 -0
  893. package/wmapp/locales/angular/global/zh-hant.js +22 -0
  894. package/wmapp/locales/angular/global/zh.js +22 -0
  895. package/wmapp/locales/angular/global/zu.js +24 -0
  896. package/wmapp/locales/angular/gsw-fr.js +17 -0
  897. package/wmapp/locales/angular/gsw-li.js +17 -0
  898. package/wmapp/locales/angular/gsw.js +17 -0
  899. package/wmapp/locales/angular/gu.js +17 -0
  900. package/wmapp/locales/angular/guz.js +15 -0
  901. package/wmapp/locales/angular/gv.js +23 -0
  902. package/wmapp/locales/angular/ha-gh.js +17 -0
  903. package/wmapp/locales/angular/ha-ne.js +17 -0
  904. package/wmapp/locales/angular/ha.js +17 -0
  905. package/wmapp/locales/angular/haw.js +17 -0
  906. package/wmapp/locales/angular/he.js +21 -0
  907. package/wmapp/locales/angular/hi-latn.js +17 -0
  908. package/wmapp/locales/angular/hi.js +17 -0
  909. package/wmapp/locales/angular/hr-ba.js +19 -0
  910. package/wmapp/locales/angular/hr.js +19 -0
  911. package/wmapp/locales/angular/hsb.js +21 -0
  912. package/wmapp/locales/angular/hu.js +17 -0
  913. package/wmapp/locales/angular/hy.js +17 -0
  914. package/wmapp/locales/angular/ia.js +17 -0
  915. package/wmapp/locales/angular/id.js +15 -0
  916. package/wmapp/locales/angular/ig.js +15 -0
  917. package/wmapp/locales/angular/ii.js +15 -0
  918. package/wmapp/locales/angular/is.js +17 -0
  919. package/wmapp/locales/angular/it-ch.js +19 -0
  920. package/wmapp/locales/angular/it-sm.js +19 -0
  921. package/wmapp/locales/angular/it-va.js +19 -0
  922. package/wmapp/locales/angular/it.js +19 -0
  923. package/wmapp/locales/angular/ja.js +15 -0
  924. package/wmapp/locales/angular/jgo.js +17 -0
  925. package/wmapp/locales/angular/jmc.js +17 -0
  926. package/wmapp/locales/angular/jv.js +15 -0
  927. package/wmapp/locales/angular/ka.js +17 -0
  928. package/wmapp/locales/angular/kab.js +17 -0
  929. package/wmapp/locales/angular/kam.js +15 -0
  930. package/wmapp/locales/angular/kde.js +15 -0
  931. package/wmapp/locales/angular/kea.js +15 -0
  932. package/wmapp/locales/angular/kgp.js +15 -0
  933. package/wmapp/locales/angular/khq.js +15 -0
  934. package/wmapp/locales/angular/ki.js +15 -0
  935. package/wmapp/locales/angular/kk.js +17 -0
  936. package/wmapp/locales/angular/kkj.js +17 -0
  937. package/wmapp/locales/angular/kl.js +17 -0
  938. package/wmapp/locales/angular/kln.js +15 -0
  939. package/wmapp/locales/angular/km.js +15 -0
  940. package/wmapp/locales/angular/kn.js +17 -0
  941. package/wmapp/locales/angular/ko-kp.js +15 -0
  942. package/wmapp/locales/angular/ko.js +15 -0
  943. package/wmapp/locales/angular/kok.js +15 -0
  944. package/wmapp/locales/angular/ks-arab.js +17 -0
  945. package/wmapp/locales/angular/ks-deva.js +15 -0
  946. package/wmapp/locales/angular/ks.js +17 -0
  947. package/wmapp/locales/angular/ksb.js +17 -0
  948. package/wmapp/locales/angular/ksf.js +15 -0
  949. package/wmapp/locales/angular/ksh.js +19 -0
  950. package/wmapp/locales/angular/ku.js +17 -0
  951. package/wmapp/locales/angular/kw.js +25 -0
  952. package/wmapp/locales/angular/ky.js +17 -0
  953. package/wmapp/locales/angular/lag.js +19 -0
  954. package/wmapp/locales/angular/lb.js +17 -0
  955. package/wmapp/locales/angular/lg.js +17 -0
  956. package/wmapp/locales/angular/lkt.js +15 -0
  957. package/wmapp/locales/angular/ln-ao.js +17 -0
  958. package/wmapp/locales/angular/ln-cf.js +17 -0
  959. package/wmapp/locales/angular/ln-cg.js +17 -0
  960. package/wmapp/locales/angular/ln.js +17 -0
  961. package/wmapp/locales/angular/lo.js +15 -0
  962. package/wmapp/locales/angular/lrc-iq.js +15 -0
  963. package/wmapp/locales/angular/lrc.js +15 -0
  964. package/wmapp/locales/angular/lt.js +21 -0
  965. package/wmapp/locales/angular/lu.js +15 -0
  966. package/wmapp/locales/angular/luo.js +15 -0
  967. package/wmapp/locales/angular/luy.js +15 -0
  968. package/wmapp/locales/angular/lv.js +19 -0
  969. package/wmapp/locales/angular/mai.js +15 -0
  970. package/wmapp/locales/angular/mas-tz.js +17 -0
  971. package/wmapp/locales/angular/mas.js +17 -0
  972. package/wmapp/locales/angular/mer.js +15 -0
  973. package/wmapp/locales/angular/mfe.js +15 -0
  974. package/wmapp/locales/angular/mg.js +17 -0
  975. package/wmapp/locales/angular/mgh.js +15 -0
  976. package/wmapp/locales/angular/mgo.js +17 -0
  977. package/wmapp/locales/angular/mi.js +15 -0
  978. package/wmapp/locales/angular/mk.js +17 -0
  979. package/wmapp/locales/angular/ml.js +17 -0
  980. package/wmapp/locales/angular/mn.js +17 -0
  981. package/wmapp/locales/angular/mni-beng.js +15 -0
  982. package/wmapp/locales/angular/mni.js +15 -0
  983. package/wmapp/locales/angular/mr.js +17 -0
  984. package/wmapp/locales/angular/ms-bn.js +15 -0
  985. package/wmapp/locales/angular/ms-id.js +15 -0
  986. package/wmapp/locales/angular/ms-sg.js +15 -0
  987. package/wmapp/locales/angular/ms.js +15 -0
  988. package/wmapp/locales/angular/mt.js +21 -0
  989. package/wmapp/locales/angular/mua.js +15 -0
  990. package/wmapp/locales/angular/my.js +15 -0
  991. package/wmapp/locales/angular/mzn.js +15 -0
  992. package/wmapp/locales/angular/naq.js +19 -0
  993. package/wmapp/locales/angular/nb-sj.js +17 -0
  994. package/wmapp/locales/angular/nb.js +17 -0
  995. package/wmapp/locales/angular/nd.js +17 -0
  996. package/wmapp/locales/angular/nds-nl.js +15 -0
  997. package/wmapp/locales/angular/nds.js +15 -0
  998. package/wmapp/locales/angular/ne-in.js +17 -0
  999. package/wmapp/locales/angular/ne.js +17 -0
  1000. package/wmapp/locales/angular/nl-aw.js +17 -0
  1001. package/wmapp/locales/angular/nl-be.js +17 -0
  1002. package/wmapp/locales/angular/nl-bq.js +17 -0
  1003. package/wmapp/locales/angular/nl-cw.js +17 -0
  1004. package/wmapp/locales/angular/nl-sr.js +17 -0
  1005. package/wmapp/locales/angular/nl-sx.js +17 -0
  1006. package/wmapp/locales/angular/nl.js +17 -0
  1007. package/wmapp/locales/angular/nmg.js +15 -0
  1008. package/wmapp/locales/angular/nn.js +17 -0
  1009. package/wmapp/locales/angular/nnh.js +17 -0
  1010. package/wmapp/locales/angular/no.js +17 -0
  1011. package/wmapp/locales/angular/nus.js +15 -0
  1012. package/wmapp/locales/angular/nyn.js +17 -0
  1013. package/wmapp/locales/angular/om-ke.js +17 -0
  1014. package/wmapp/locales/angular/om.js +17 -0
  1015. package/wmapp/locales/angular/or.js +17 -0
  1016. package/wmapp/locales/angular/os-ru.js +17 -0
  1017. package/wmapp/locales/angular/os.js +17 -0
  1018. package/wmapp/locales/angular/pa-arab.js +15 -0
  1019. package/wmapp/locales/angular/pa-guru.js +17 -0
  1020. package/wmapp/locales/angular/pa.js +17 -0
  1021. package/wmapp/locales/angular/pcm.js +17 -0
  1022. package/wmapp/locales/angular/pl.js +21 -0
  1023. package/wmapp/locales/angular/ps-pk.js +17 -0
  1024. package/wmapp/locales/angular/ps.js +17 -0
  1025. package/wmapp/locales/angular/pt-ao.js +19 -0
  1026. package/wmapp/locales/angular/pt-ch.js +19 -0
  1027. package/wmapp/locales/angular/pt-cv.js +19 -0
  1028. package/wmapp/locales/angular/pt-gq.js +19 -0
  1029. package/wmapp/locales/angular/pt-gw.js +19 -0
  1030. package/wmapp/locales/angular/pt-lu.js +19 -0
  1031. package/wmapp/locales/angular/pt-mo.js +19 -0
  1032. package/wmapp/locales/angular/pt-mz.js +19 -0
  1033. package/wmapp/locales/angular/pt-pt.js +19 -0
  1034. package/wmapp/locales/angular/pt-st.js +19 -0
  1035. package/wmapp/locales/angular/pt-tl.js +19 -0
  1036. package/wmapp/locales/angular/pt.js +19 -0
  1037. package/wmapp/locales/angular/qu-bo.js +15 -0
  1038. package/wmapp/locales/angular/qu-ec.js +15 -0
  1039. package/wmapp/locales/angular/qu.js +15 -0
  1040. package/wmapp/locales/angular/rm.js +17 -0
  1041. package/wmapp/locales/angular/rn.js +15 -0
  1042. package/wmapp/locales/angular/ro-md.js +19 -0
  1043. package/wmapp/locales/angular/ro.js +19 -0
  1044. package/wmapp/locales/angular/rof.js +17 -0
  1045. package/wmapp/locales/angular/ru-by.js +21 -0
  1046. package/wmapp/locales/angular/ru-kg.js +21 -0
  1047. package/wmapp/locales/angular/ru-kz.js +21 -0
  1048. package/wmapp/locales/angular/ru-md.js +21 -0
  1049. package/wmapp/locales/angular/ru-ua.js +21 -0
  1050. package/wmapp/locales/angular/ru.js +21 -0
  1051. package/wmapp/locales/angular/rw.js +15 -0
  1052. package/wmapp/locales/angular/rwk.js +17 -0
  1053. package/wmapp/locales/angular/sa.js +15 -0
  1054. package/wmapp/locales/angular/sah.js +15 -0
  1055. package/wmapp/locales/angular/saq.js +17 -0
  1056. package/wmapp/locales/angular/sat-olck.js +19 -0
  1057. package/wmapp/locales/angular/sat.js +19 -0
  1058. package/wmapp/locales/angular/sbp.js +15 -0
  1059. package/wmapp/locales/angular/sc.js +17 -0
  1060. package/wmapp/locales/angular/sd-arab.js +17 -0
  1061. package/wmapp/locales/angular/sd-deva.js +15 -0
  1062. package/wmapp/locales/angular/sd.js +17 -0
  1063. package/wmapp/locales/angular/se-fi.js +19 -0
  1064. package/wmapp/locales/angular/se-se.js +19 -0
  1065. package/wmapp/locales/angular/se.js +19 -0
  1066. package/wmapp/locales/angular/seh.js +17 -0
  1067. package/wmapp/locales/angular/ses.js +15 -0
  1068. package/wmapp/locales/angular/sg.js +15 -0
  1069. package/wmapp/locales/angular/shi-latn.js +15 -0
  1070. package/wmapp/locales/angular/shi-tfng.js +19 -0
  1071. package/wmapp/locales/angular/shi.js +19 -0
  1072. package/wmapp/locales/angular/si.js +17 -0
  1073. package/wmapp/locales/angular/sk.js +21 -0
  1074. package/wmapp/locales/angular/sl.js +21 -0
  1075. package/wmapp/locales/angular/smn.js +19 -0
  1076. package/wmapp/locales/angular/sn.js +17 -0
  1077. package/wmapp/locales/angular/so-dj.js +17 -0
  1078. package/wmapp/locales/angular/so-et.js +17 -0
  1079. package/wmapp/locales/angular/so-ke.js +17 -0
  1080. package/wmapp/locales/angular/so.js +17 -0
  1081. package/wmapp/locales/angular/sq-mk.js +17 -0
  1082. package/wmapp/locales/angular/sq-xk.js +17 -0
  1083. package/wmapp/locales/angular/sq.js +17 -0
  1084. package/wmapp/locales/angular/sr-cyrl-ba.js +19 -0
  1085. package/wmapp/locales/angular/sr-cyrl-me.js +19 -0
  1086. package/wmapp/locales/angular/sr-cyrl-xk.js +19 -0
  1087. package/wmapp/locales/angular/sr-cyrl.js +19 -0
  1088. package/wmapp/locales/angular/sr-latn-ba.js +15 -0
  1089. package/wmapp/locales/angular/sr-latn-me.js +15 -0
  1090. package/wmapp/locales/angular/sr-latn-xk.js +15 -0
  1091. package/wmapp/locales/angular/sr-latn.js +15 -0
  1092. package/wmapp/locales/angular/sr.js +19 -0
  1093. package/wmapp/locales/angular/su-latn.js +15 -0
  1094. package/wmapp/locales/angular/su.js +15 -0
  1095. package/wmapp/locales/angular/sv-ax.js +17 -0
  1096. package/wmapp/locales/angular/sv-fi.js +17 -0
  1097. package/wmapp/locales/angular/sv.js +17 -0
  1098. package/wmapp/locales/angular/sw-cd.js +17 -0
  1099. package/wmapp/locales/angular/sw-ke.js +17 -0
  1100. package/wmapp/locales/angular/sw-ug.js +17 -0
  1101. package/wmapp/locales/angular/sw.js +17 -0
  1102. package/wmapp/locales/angular/ta-lk.js +17 -0
  1103. package/wmapp/locales/angular/ta-my.js +17 -0
  1104. package/wmapp/locales/angular/ta-sg.js +17 -0
  1105. package/wmapp/locales/angular/ta.js +17 -0
  1106. package/wmapp/locales/angular/te.js +17 -0
  1107. package/wmapp/locales/angular/teo-ke.js +17 -0
  1108. package/wmapp/locales/angular/teo.js +17 -0
  1109. package/wmapp/locales/angular/tg.js +15 -0
  1110. package/wmapp/locales/angular/th.js +15 -0
  1111. package/wmapp/locales/angular/ti-er.js +17 -0
  1112. package/wmapp/locales/angular/ti.js +17 -0
  1113. package/wmapp/locales/angular/tk.js +17 -0
  1114. package/wmapp/locales/angular/to.js +15 -0
  1115. package/wmapp/locales/angular/tr-cy.js +17 -0
  1116. package/wmapp/locales/angular/tr.js +17 -0
  1117. package/wmapp/locales/angular/tt.js +15 -0
  1118. package/wmapp/locales/angular/twq.js +15 -0
  1119. package/wmapp/locales/angular/tzm.js +17 -0
  1120. package/wmapp/locales/angular/ug.js +17 -0
  1121. package/wmapp/locales/angular/uk.js +21 -0
  1122. package/wmapp/locales/angular/und.js +17 -0
  1123. package/wmapp/locales/angular/ur-in.js +17 -0
  1124. package/wmapp/locales/angular/ur.js +17 -0
  1125. package/wmapp/locales/angular/uz-arab.js +15 -0
  1126. package/wmapp/locales/angular/uz-cyrl.js +15 -0
  1127. package/wmapp/locales/angular/uz-latn.js +17 -0
  1128. package/wmapp/locales/angular/uz.js +17 -0
  1129. package/wmapp/locales/angular/vai-latn.js +15 -0
  1130. package/wmapp/locales/angular/vai-vaii.js +15 -0
  1131. package/wmapp/locales/angular/vai.js +15 -0
  1132. package/wmapp/locales/angular/vi.js +15 -0
  1133. package/wmapp/locales/angular/vun.js +17 -0
  1134. package/wmapp/locales/angular/wae.js +17 -0
  1135. package/wmapp/locales/angular/wo.js +15 -0
  1136. package/wmapp/locales/angular/xh.js +17 -0
  1137. package/wmapp/locales/angular/xog.js +17 -0
  1138. package/wmapp/locales/angular/yav.js +15 -0
  1139. package/wmapp/locales/angular/yi.js +17 -0
  1140. package/wmapp/locales/angular/yo-bj.js +15 -0
  1141. package/wmapp/locales/angular/yo.js +15 -0
  1142. package/wmapp/locales/angular/yrl-co.js +15 -0
  1143. package/wmapp/locales/angular/yrl-ve.js +15 -0
  1144. package/wmapp/locales/angular/yrl.js +15 -0
  1145. package/wmapp/locales/angular/yue-hans.js +15 -0
  1146. package/wmapp/locales/angular/yue-hant.js +15 -0
  1147. package/wmapp/locales/angular/yue.js +15 -0
  1148. package/wmapp/locales/angular/zgh.js +15 -0
  1149. package/wmapp/locales/angular/zh-hans-hk.js +15 -0
  1150. package/wmapp/locales/angular/zh-hans-mo.js +15 -0
  1151. package/wmapp/locales/angular/zh-hans-sg.js +15 -0
  1152. package/wmapp/locales/angular/zh-hans.js +15 -0
  1153. package/wmapp/locales/angular/zh-hant-hk.js +15 -0
  1154. package/wmapp/locales/angular/zh-hant-mo.js +15 -0
  1155. package/wmapp/locales/angular/zh-hant.js +15 -0
  1156. package/wmapp/locales/angular/zh.js +15 -0
  1157. package/wmapp/locales/angular/zu.js +17 -0
  1158. package/wmapp/locales/moment/af.js +82 -0
  1159. package/wmapp/locales/moment/ar-dz.js +167 -0
  1160. package/wmapp/locales/moment/ar-kw.js +66 -0
  1161. package/wmapp/locales/moment/ar-ly.js +182 -0
  1162. package/wmapp/locales/moment/ar-ma.js +67 -0
  1163. package/wmapp/locales/moment/ar-ps.js +123 -0
  1164. package/wmapp/locales/moment/ar-sa.js +116 -0
  1165. package/wmapp/locales/moment/ar-tn.js +66 -0
  1166. package/wmapp/locales/moment/ar.js +200 -0
  1167. package/wmapp/locales/moment/az.js +113 -0
  1168. package/wmapp/locales/moment/be.js +153 -0
  1169. package/wmapp/locales/moment/bg.js +98 -0
  1170. package/wmapp/locales/moment/bm.js +62 -0
  1171. package/wmapp/locales/moment/bn-bd.js +140 -0
  1172. package/wmapp/locales/moment/bn.js +130 -0
  1173. package/wmapp/locales/moment/bo.js +135 -0
  1174. package/wmapp/locales/moment/br.js +179 -0
  1175. package/wmapp/locales/moment/bs.js +171 -0
  1176. package/wmapp/locales/moment/ca.js +111 -0
  1177. package/wmapp/locales/moment/cs.js +192 -0
  1178. package/wmapp/locales/moment/cv.js +74 -0
  1179. package/wmapp/locales/moment/cy.js +109 -0
  1180. package/wmapp/locales/moment/da.js +64 -0
  1181. package/wmapp/locales/moment/de-at.js +90 -0
  1182. package/wmapp/locales/moment/de-ch.js +87 -0
  1183. package/wmapp/locales/moment/de.js +89 -0
  1184. package/wmapp/locales/moment/dv.js +101 -0
  1185. package/wmapp/locales/moment/el.js +117 -0
  1186. package/wmapp/locales/moment/en-au.js +79 -0
  1187. package/wmapp/locales/moment/en-ca.js +75 -0
  1188. package/wmapp/locales/moment/en-gb.js +79 -0
  1189. package/wmapp/locales/moment/en-ie.js +79 -0
  1190. package/wmapp/locales/moment/en-il.js +75 -0
  1191. package/wmapp/locales/moment/en-in.js +79 -0
  1192. package/wmapp/locales/moment/en-nz.js +79 -0
  1193. package/wmapp/locales/moment/en-sg.js +79 -0
  1194. package/wmapp/locales/moment/eo.js +79 -0
  1195. package/wmapp/locales/moment/es-do.js +119 -0
  1196. package/wmapp/locales/moment/es-mx.js +121 -0
  1197. package/wmapp/locales/moment/es-us.js +121 -0
  1198. package/wmapp/locales/moment/es.js +121 -0
  1199. package/wmapp/locales/moment/et.js +89 -0
  1200. package/wmapp/locales/moment/eu.js +76 -0
  1201. package/wmapp/locales/moment/fa.js +124 -0
  1202. package/wmapp/locales/moment/fi.js +135 -0
  1203. package/wmapp/locales/moment/fil.js +69 -0
  1204. package/wmapp/locales/moment/fo.js +68 -0
  1205. package/wmapp/locales/moment/fr-ca.js +81 -0
  1206. package/wmapp/locales/moment/fr-ch.js +85 -0
  1207. package/wmapp/locales/moment/fr.js +119 -0
  1208. package/wmapp/locales/moment/fy.js +86 -0
  1209. package/wmapp/locales/moment/ga.js +106 -0
  1210. package/wmapp/locales/moment/gd.js +106 -0
  1211. package/wmapp/locales/moment/gl.js +86 -0
  1212. package/wmapp/locales/moment/gom-deva.js +137 -0
  1213. package/wmapp/locales/moment/gom-latn.js +135 -0
  1214. package/wmapp/locales/moment/gu.js +133 -0
  1215. package/wmapp/locales/moment/he.js +105 -0
  1216. package/wmapp/locales/moment/hi.js +179 -0
  1217. package/wmapp/locales/moment/hr.js +167 -0
  1218. package/wmapp/locales/moment/hu.js +129 -0
  1219. package/wmapp/locales/moment/hy-am.js +105 -0
  1220. package/wmapp/locales/moment/id.js +87 -0
  1221. package/wmapp/locales/moment/is.js +151 -0
  1222. package/wmapp/locales/moment/it-ch.js +75 -0
  1223. package/wmapp/locales/moment/it.js +117 -0
  1224. package/wmapp/locales/moment/ja.js +159 -0
  1225. package/wmapp/locales/moment/jv.js +87 -0
  1226. package/wmapp/locales/moment/ka.js +103 -0
  1227. package/wmapp/locales/moment/kk.js +93 -0
  1228. package/wmapp/locales/moment/km.js +114 -0
  1229. package/wmapp/locales/moment/kn.js +135 -0
  1230. package/wmapp/locales/moment/ko.js +86 -0
  1231. package/wmapp/locales/moment/ku-kmr.js +125 -0
  1232. package/wmapp/locales/moment/ku.js +129 -0
  1233. package/wmapp/locales/moment/ky.js +95 -0
  1234. package/wmapp/locales/moment/lb.js +148 -0
  1235. package/wmapp/locales/moment/lo.js +77 -0
  1236. package/wmapp/locales/moment/lt.js +136 -0
  1237. package/wmapp/locales/moment/lv.js +105 -0
  1238. package/wmapp/locales/moment/me.js +128 -0
  1239. package/wmapp/locales/moment/mi.js +71 -0
  1240. package/wmapp/locales/moment/mk.js +97 -0
  1241. package/wmapp/locales/moment/ml.js +93 -0
  1242. package/wmapp/locales/moment/mn.js +111 -0
  1243. package/wmapp/locales/moment/mr.js +214 -0
  1244. package/wmapp/locales/moment/ms-my.js +87 -0
  1245. package/wmapp/locales/moment/ms.js +86 -0
  1246. package/wmapp/locales/moment/mt.js +67 -0
  1247. package/wmapp/locales/moment/my.js +102 -0
  1248. package/wmapp/locales/moment/nb.js +71 -0
  1249. package/wmapp/locales/moment/ne.js +132 -0
  1250. package/wmapp/locales/moment/nl-be.js +113 -0
  1251. package/wmapp/locales/moment/nl.js +115 -0
  1252. package/wmapp/locales/moment/nn.js +70 -0
  1253. package/wmapp/locales/moment/oc-lnc.js +96 -0
  1254. package/wmapp/locales/moment/pa-in.js +133 -0
  1255. package/wmapp/locales/moment/pl.js +151 -0
  1256. package/wmapp/locales/moment/pt-br.js +69 -0
  1257. package/wmapp/locales/moment/pt.js +74 -0
  1258. package/wmapp/locales/moment/ro.js +87 -0
  1259. package/wmapp/locales/moment/ru.js +224 -0
  1260. package/wmapp/locales/moment/sd.js +92 -0
  1261. package/wmapp/locales/moment/se.js +68 -0
  1262. package/wmapp/locales/moment/si.js +80 -0
  1263. package/wmapp/locales/moment/sk.js +156 -0
  1264. package/wmapp/locales/moment/sl.js +182 -0
  1265. package/wmapp/locales/moment/sq.js +76 -0
  1266. package/wmapp/locales/moment/sr-cyrl.js +138 -0
  1267. package/wmapp/locales/moment/sr.js +140 -0
  1268. package/wmapp/locales/moment/ss.js +95 -0
  1269. package/wmapp/locales/moment/sv.js +79 -0
  1270. package/wmapp/locales/moment/sw.js +66 -0
  1271. package/wmapp/locales/moment/ta.js +142 -0
  1272. package/wmapp/locales/moment/te.js +99 -0
  1273. package/wmapp/locales/moment/tet.js +79 -0
  1274. package/wmapp/locales/moment/tg.js +128 -0
  1275. package/wmapp/locales/moment/th.js +76 -0
  1276. package/wmapp/locales/moment/tk.js +102 -0
  1277. package/wmapp/locales/moment/tl-ph.js +68 -0
  1278. package/wmapp/locales/moment/tlh.js +135 -0
  1279. package/wmapp/locales/moment/tr.js +117 -0
  1280. package/wmapp/locales/moment/tzl.js +100 -0
  1281. package/wmapp/locales/moment/tzm-latn.js +65 -0
  1282. package/wmapp/locales/moment/tzm.js +65 -0
  1283. package/wmapp/locales/moment/ug-cn.js +122 -0
  1284. package/wmapp/locales/moment/uk.js +178 -0
  1285. package/wmapp/locales/moment/ur.js +93 -0
  1286. package/wmapp/locales/moment/uz-latn.js +65 -0
  1287. package/wmapp/locales/moment/uz.js +62 -0
  1288. package/wmapp/locales/moment/vi.js +91 -0
  1289. package/wmapp/locales/moment/x-pseudo.js +84 -0
  1290. package/wmapp/locales/moment/yo.js +64 -0
  1291. package/wmapp/locales/moment/zh-cn.js +131 -0
  1292. package/wmapp/locales/moment/zh-hk.js +112 -0
  1293. package/wmapp/locales/moment/zh-mo.js +111 -0
  1294. package/wmapp/locales/moment/zh-tw.js +110 -0
  1295. package/wmapp/locales/moment-timezone/moment-timezone-with-data.js +1582 -0
  1296. package/wmapp/scripts/wm-libs.js +1499 -0
  1297. package/wmapp/scripts/wm-libs.min.js +1428 -0
  1298. package/wmapp/scripts/wm-loader.js +8 -0
  1299. package/wmapp/scripts/wm-loader.min.js +9 -0
  1300. package/wmapp/styles/css/bootstrap.css.map +1 -0
  1301. package/wmapp/styles/css/font/summernote.eot +0 -0
  1302. package/wmapp/styles/css/font/summernote.ttf +0 -0
  1303. package/wmapp/styles/css/font/summernote.woff +0 -0
  1304. package/wmapp/styles/css/font/summernote.woff2 +0 -0
  1305. package/wmapp/styles/css/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  1306. package/wmapp/styles/css/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  1307. package/wmapp/styles/css/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  1308. package/wmapp/styles/css/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  1309. package/wmapp/styles/css/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  1310. package/wmapp/styles/css/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  1311. package/wmapp/styles/css/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  1312. package/wmapp/styles/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  1313. package/wmapp/styles/css/images/ui-icons_222222_256x240.png +0 -0
  1314. package/wmapp/styles/css/images/ui-icons_2e83ff_256x240.png +0 -0
  1315. package/wmapp/styles/css/images/ui-icons_444444_256x240.png +0 -0
  1316. package/wmapp/styles/css/images/ui-icons_454545_256x240.png +0 -0
  1317. package/wmapp/styles/css/images/ui-icons_555555_256x240.png +0 -0
  1318. package/wmapp/styles/css/images/ui-icons_777620_256x240.png +0 -0
  1319. package/wmapp/styles/css/images/ui-icons_777777_256x240.png +0 -0
  1320. package/wmapp/styles/css/images/ui-icons_888888_256x240.png +0 -0
  1321. package/wmapp/styles/css/images/ui-icons_cc0000_256x240.png +0 -0
  1322. package/wmapp/styles/css/images/ui-icons_cd0a0a_256x240.png +0 -0
  1323. package/wmapp/styles/css/images/ui-icons_ffffff_256x240.png +0 -0
  1324. package/wmapp/styles/css/wm-responsive.css +1 -0
  1325. package/wmapp/styles/css/wm-style.css +1 -0
  1326. package/wmapp/styles/fonts/FontAwesome.otf +0 -0
  1327. package/wmapp/styles/fonts/fontawesome-webfont.eot +0 -0
  1328. package/wmapp/styles/fonts/fontawesome-webfont.svg +2671 -0
  1329. package/wmapp/styles/fonts/fontawesome-webfont.ttf +0 -0
  1330. package/wmapp/styles/fonts/fontawesome-webfont.woff +0 -0
  1331. package/wmapp/styles/fonts/fontawesome-webfont.woff2 +0 -0
  1332. package/wmapp/styles/fonts/glyphicons-halflings-regular.eot +0 -0
  1333. package/wmapp/styles/fonts/glyphicons-halflings-regular.svg +288 -0
  1334. package/wmapp/styles/fonts/glyphicons-halflings-regular.ttf +0 -0
  1335. package/wmapp/styles/fonts/glyphicons-halflings-regular.woff +0 -0
  1336. package/wmapp/styles/fonts/glyphicons-halflings-regular.woff2 +0 -0
  1337. package/wmapp/styles/fonts/wavicon.eot +0 -0
  1338. package/wmapp/styles/fonts/wavicon.ttf +0 -0
  1339. package/wmapp/styles/fonts/wavicon.woff +0 -0
  1340. package/wmapp/styles/fonts/wm-streamline-light-icon.eot +0 -0
  1341. package/wmapp/styles/fonts/wm-streamline-light-icon.ttf +0 -0
  1342. package/wmapp/styles/fonts/wm-streamline-light-icon.woff +0 -0
  1343. package/wmapp/styles/fonts/wm-streamline-regular-icon.eot +0 -0
  1344. package/wmapp/styles/fonts/wm-streamline-regular-icon.ttf +0 -0
  1345. package/wmapp/styles/fonts/wm-streamline-regular-icon.woff +0 -0
  1346. package/wmapp/styles/foundation/fonts/fonts/roboto.ttf +0 -0
  1347. package/wmapp/styles/foundation/fonts/icons/fontawesome/fontawesome-webfont.eot +0 -0
  1348. package/wmapp/styles/foundation/fonts/icons/fontawesome/fontawesome-webfont.svg +686 -0
  1349. package/wmapp/styles/foundation/fonts/icons/fontawesome/fontawesome-webfont.ttf +0 -0
  1350. package/wmapp/styles/foundation/fonts/icons/fontawesome/fontawesome-webfont.woff +0 -0
  1351. package/wmapp/styles/foundation/fonts/icons/material/materialicon.eot +0 -0
  1352. package/wmapp/styles/foundation/fonts/icons/material/materialicon.svg +97 -0
  1353. package/wmapp/styles/foundation/fonts/icons/material/materialicon.ttf +0 -0
  1354. package/wmapp/styles/foundation/fonts/icons/material/materialicon.woff +0 -0
  1355. package/wmapp/styles/foundation/fonts/icons/summernote/summernote.eot +0 -0
  1356. package/wmapp/styles/foundation/fonts/icons/summernote/summernote.svg +63 -0
  1357. package/wmapp/styles/foundation/fonts/icons/summernote/summernote.ttf +0 -0
  1358. package/wmapp/styles/foundation/fonts/icons/summernote/summernote.woff +0 -0
  1359. package/wmapp/styles/foundation/fonts/icons/wavicon/wavicon.eot +0 -0
  1360. package/wmapp/styles/foundation/fonts/icons/wavicon/wavicon.svg +1160 -0
  1361. package/wmapp/styles/foundation/fonts/icons/wavicon/wavicon.ttf +0 -0
  1362. package/wmapp/styles/foundation/fonts/icons/wavicon/wavicon.woff +0 -0
  1363. package/wmapp/styles/foundation/fonts/icons/wm-streamline-light/wm-streamline-light-icon.eot +0 -0
  1364. package/wmapp/styles/foundation/fonts/icons/wm-streamline-light/wm-streamline-light-icon.svg +244 -0
  1365. package/wmapp/styles/foundation/fonts/icons/wm-streamline-light/wm-streamline-light-icon.ttf +0 -0
  1366. package/wmapp/styles/foundation/fonts/icons/wm-streamline-light/wm-streamline-light-icon.woff +0 -0
  1367. package/wmapp/styles/foundation/fonts/icons/wm-streamline-regular/wm-streamline-regular-icon.eot +0 -0
  1368. package/wmapp/styles/foundation/fonts/icons/wm-streamline-regular/wm-streamline-regular-icon.svg +216 -0
  1369. package/wmapp/styles/foundation/fonts/icons/wm-streamline-regular/wm-streamline-regular-icon.ttf +0 -0
  1370. package/wmapp/styles/foundation/fonts/icons/wm-streamline-regular/wm-streamline-regular-icon.woff +0 -0
  1371. package/wmapp/styles/foundation/foundation.css +26891 -0
  1372. package/wmapp/styles/foundation/foundation.min.css +1 -0
  1373. package/wmapp/styles/foundation/icon-fonts.min.css +1 -0
  1374. package/wmapp/styles/images/live-sync-icon.png +0 -0
  1375. package/wmapp/styles/images/live-sync-touch-icon.png +0 -0
  1376. package/wmapp/styles/images/loader.gif +0 -0
  1377. package/wmapp/styles/images/spinner-small.gif +0 -0
  1378. package/wmapp/styles/images/ui-icons.png +0 -0
@@ -0,0 +1,9 @@
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/compiler"),require("lodash-es"),require("rxjs"),require("rxjs/operators"),require("x2js"),require("moment-timezone/moment-timezone"),require("@angular/core"),require("@angular/common/http")):"function"==typeof define&&define.amd?define(["exports","@angular/compiler","lodash-es","rxjs","rxjs/operators","x2js","moment-timezone/moment-timezone","@angular/core","@angular/common/http"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.core={}),e.ng.compiler,e._,e.rxjs,e.rxjs.operators,e.X2JS,e.momentLib,e.ng.core,e.ng.common.http)}(this,function(e,t,i,n,a,s,o,r,l){"use strict";function c(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var d,p,m,h,u=c(o),g=c(r),v=c(l);e.FormWidgetType=void 0,(d=e.FormWidgetType||(e.FormWidgetType={})).AUTOCOMPLETE="autocomplete",d.CHECKBOX="checkbox",d.CHECKBOXSET="checkboxset",d.CHIPS="chips",d.COLORPICKER="colorpicker",d.CURRENCY="currency",d.CUSTOMWIDGET="custom-widget",d.DATE="date",d.DATETIME="datetime",d.ICONBUTTONTOGGLE="iconbutton-toggle",d.NUMBER="number",d.PASSWORD="password",d.RADIOSET="radioset",d.RATING="rating",d.RICHTEXT="richtext",d.SELECT="select",d.TOGGLE="toggle",d.SLIDER="slider",d.SWITCH="switch",d.TEXT="text",d.TEXTAREA="textarea",d.TIME="time",d.TIMESTAMP="timestamp",d.TYPEAHEAD="typeahead",d.UPLOAD="upload",e.DataType=void 0,(p=e.DataType||(e.DataType={})).INTEGER="integer",p.BIG_INTEGER="big_integer",p.SHORT="short",p.FLOAT="float",p.BIG_DECIMAL="big_decimal",p.DOUBLE="double",p.LONG="long",p.BYTE="byte",p.STRING="string",p.CHARACTER="character",p.TEXT="text",p.DATE="date",p.TIME="time",p.TIMESTAMP="timestamp",p.DATETIME="datetime",p.LOCALDATETIME="localdatetime",p.BOOLEAN="boolean",p.LIST="list",p.CLOB="clob",p.BLOB="blob",e.MatchMode=void 0,(m=e.MatchMode||(e.MatchMode={})).BETWEEN="between",m.GREATER="greaterthanequal",m.LESSER="lessthanequal",m.NULL="null",m.EMPTY="empty",m.NULLOREMPTY="nullorempty",m.EQUALS="exact",e.DEFAULT_FORMATS=void 0,(h=e.DEFAULT_FORMATS||(e.DEFAULT_FORMATS={})).DATE="yyyy-MM-dd",h.TIME="HH:mm:ss",h.TIMESTAMP="timestamp",h.DATETIME="yyyy-MM-ddTHH:mm:ss",h.LOCALDATETIME="yyyy-MM-ddTHH:mm:ss",h.DATETIME_ORACLE="yyyy-MM-dd HH:mm:ss",h.DATE_TIME="yyyy-MM-dd HH:mm:ss";const f=(e,i,n)=>{n=n.replace("bind:","");const a=e.attrs.find(e=>"datasetboundexpr"===e.name);"dataset"!==i.name||a||e.attrs.push(new t.Attribute("datasetboundexpr",n,i.sourceSpan,i.keySpan,i.valueSpan,void 0,void 0))},b=function(e){let t=e.match(/(custom(\s*:))/g);return t&&t.length},y=(e,t,n,a="",s="item")=>{const o=t.replace(/([^a-zA-Z0-9.])/g,"\\$1"),r=new RegExp("("+o+")(\\[0\\])?(.data\\[\\$i\\])?(.content\\[\\$i\\])?(\\[\\$i\\])?","g");let l,c,d,p;const m={"wm-list":["itemclass","disableitem","dataset"]};n&&(l=new RegExp(`(Widgets.${n}.currentItem)\\b`,"g"),c=new RegExp(`(Widgets.${n}.currentItemWidgets)\\b`,"g"),d=new RegExp("(Widgets.(.*).(formWidgets|filterWidgets))\\b","g")),p=i.isArray(e)?e:m[e.name]?[e]:e.children||[],p.forEach(e=>{if(e.name){const o=e.name,p=new RegExp("bind:\\s*\\(*"+t+"\\)*\\.length\\)*");e.attrs.forEach(n=>{let h=n.value&&n.value.trim();i.startsWith(h,"bind:")&&((!m[o]||m[o]&&m[o].indexOf(n.name)>-1)&&i.includes(h,t)&&h!=="bind:"+t&&!p.test(h)&&(h=h.replace("bind:",""),f(e,n,h),h=h.replace(r,s),h="bind:"+h,b(h)&&l&&(h+=":"+l.exec(l.source)[0])),l&&l.test(h)&&((h.includes(".formWidgets")||h.includes(".filterWidgets"))&&(h=h.replace(d,"Widgets")),f(e,n,h),h=h.replace(l,s)),c&&c.test(h)&&(h=h.replace(c,`${a}currentItemWidgets`)),n.value=h)}),y(e.children,t,n,a,s)}})},w=new Map([["display-name","caption"],["display-name.bind","caption.bind"],["title","hint"],["title.bind","hint.bind"],["show","show"],["show.bind","show.bind"],["disabled","disabled"],["disabled.bind","disabled.bind"],["hyperlink","hyperlink"],["hyperlink.bind","hyperlink.bind"],["target","target"],["conditionalclass.bind","conditionalclass.bind"],["conditionalstyle.bind","conditionalstyle.bind"],["expandtitle.bind","expandtitle.bind"],["collapsetitle.bind","collapsetitle.bind"]]),P=window.requestAnimationFrame,C=[],T=e=>{C.length||P(()=>{C.forEach(e=>e()),C.length=0}),C.push(e)},O=(e,t,i)=>{const n=t=>e.classList.remove(t);(t=t||"").split(" ").forEach(e=>{e.length&&(i?n(e):T(()=>n(e)))})},I=(e,t,i)=>{const n=t=>e.classList.add(t);(t=t||"").split(" ").forEach(e=>{e.length&&(i?n(e):T(()=>n(e)))})},D=(e,t,i,n)=>{const a=()=>e.style[t]=i;n?a():T(a)},E=(e,t,i,n)=>{const a=()=>{e instanceof Element&&("tabindex"===t?null==i||"number"==typeof i&&isNaN(i)?e.removeAttribute(t):e.setAttribute(t,String(i)):e.setAttribute(t,i))};n?a():T(a)},R={},S={};function _(){const e=[...(S.fontConfig||"").matchAll(/"csspath":\s*"([^"]+)"/g)].map(e=>e[1]);return R.default={baseFont:"",fonts:e.map(e=>({csspath:e}))},R}class x{constructor(e){this.generator=function*(e){let t=1;for(;;)yield`${e}${t++}`}(e)}nextUid(){return this.generator.next().value}}const A=e=>void 0!==e,k=(e,t)=>void 0===e?t:e,N=(e,t)=>void 0===e?t:void 0===t?e:e+t,M=(e,t)=>k(e,0)-k(t,0),L=()=>{},F=e=>{const i=new t.ParseSourceFile(e,""),n=new t.ParseLocation(i,0,0,0),a=new t.ParseLocation(i,e.length,0,e.length);return new t.ParseSourceSpan(n,a)},j=new Map,V=new Map,B=new Map,G=(e,t)=>"object"!=typeof e&&"object"!=typeof t&&(e!=e&&t!=t||e===t),W=(e,t,i,...n)=>{let a,s=t.get(i);if(s){if(!((e,t)=>{const i=t.length;let n=i>10;switch(i){case 10:if(n=!G(e[9],t[9]),n)break;case 9:if(n=!G(e[8],t[8]),n)break;case 8:if(n=!G(e[7],t[7]),n)break;case 7:if(n=!G(e[6],t[6]),n)break;case 6:if(n=!G(e[5],t[5]),n)break;case 5:if(n=!G(e[4],t[4]),n)break;case 4:if(n=!G(e[3],t[3]),n)break;case 3:if(n=!G(e[2],t[2]),n)break;case 2:if(n=!G(e[1],t[1]),n)break;case 1:if(n=!G(e[0],t[0]),n)break}return n})(s.args,n))return s.result}return a=e.transform(...n),s={args:n,result:a},t.set(i,s),a},q=/[^ a-zA-Z0-9]/g,z=e=>"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4);class U{constructor(e,t,i){this.ast=e,this.declarations=[],this.stmts=[],this.pipes=[],this.vIdx=0,this.exprType=t,this.pipeNameVsIsPureMap=i}createVar(){const e="v"+this.vIdx++;return this.declarations.push(e),e}processImplicitReceiver(){return"ctx"}processLiteralPrimitive(){const e=this.cAst;return"string"==typeof e.value?`"${e.value.replace(/"/g,'"').replace(q,z)}"`:e.value}processLiteralArray(){const e=this.cAst,t=this.cStmts,i=this.createVar(),n=[];for(const i of e.expressions)n.push(this.build(i,t));return t.push(`${i}=[${n.join(",")}]`),i}processLiteralMap(){const e=this.cAst,t=this.cStmts,i=this.createVar(),n=[];for(const i of e.values)n.push(this.build(i,t));return t.push(`${i}={${e.keys.map((e,t)=>`'${e.key}':${n[t]}`)}}`),i}processPropertyRead(){const e=this.cAst,t=this.cStmts,i=this.build(e.receiver,t),n=this.createVar();return t.push(`${n}=${i}&&${i}.${e.name}`),n}processKeyedRead(){const e=this.cAst,t=this.cStmts,i=this.build(e.key,t),n=this.build(e.receiver,t),a=this.createVar();return t.push(`${a}=${n}&&${n}[${i}]`),a}processPrefixNot(){const e=this.cAst,t=this.cStmts,i=this.build(e.expression,t);return t.push(`${i}=!${i}`),i}handleBinaryPlus_Minus(){const e=this.cAst,t=this.cStmts,i=this.build(e.left,t),n=this.build(e.right,t),a=this.createVar(),s="+"===e.operation?"_plus":"_minus";return t.push(`${a}=${s}(${i},${n})`),a}handleBinaryAND_OR(){const e=this.cAst,t=this.cStmts,i=[],n=[],a=[],s=this.build(e.left,n),o=this.build(e.right,a),r=this.createVar();return"&&"===e.operation?i.push(n.join(";"),`;${r}=false`,`;if(${s}){`,a.join(";"),`;${r}=${o};`,"}"):i.push(n.join(";"),`;${r}=${s}`,`;if(!${s}){`,a.join(";"),`;${r}=${o};`,"}"),t.push(i.join("")),r}handleBinaryDefault(){const e=this.cAst,t=this.cStmts,i=this.build(e.left,t),n=this.build(e.right,t),a=this.createVar();return t.push(`${a}=${i}${e.operation}${n}`),a}processBinary(){const e=this.cAst.operation;return"+"===e||"-"===e?this.handleBinaryPlus_Minus():"&&"===e||"||"===e?this.handleBinaryAND_OR():this.handleBinaryDefault()}processUnary(){const e=this.cAst,t=this.cStmts,i=this.build(e.expr,t),n=this.createVar();return t.push(`${n}=${e.operator}${i}`),n}processParenthesizedExpression(){const e=this.cAst,t=this.cStmts;return this.build(e.expression,t)}processConditional(){const e=this.cAst,t=this.cStmts,i=this.build(e.condition,t),n=this.createVar(),a=[],s=[],o=[],r=this.build(e.trueExp,s),l=this.build(e.falseExp,o);return a.push(`if(${i}){`,s.join(";"),`;${n}=${r};`,"}else{",o.join(";"),`;${n}=${l};`,"}"),t.push(a.join(" ")),n}processMethodCall(){const e=this.cAst,i=this.cStmts,n=[];for(const t of e.args)n.push(this.build(t,i));const a=this.build(e.receiver,i),s=this.createVar(),o=e.receiver instanceof t.ImplicitReceiver||e.receiver instanceof t.PropertyRead&&e.receiver?.receiver instanceof t.ImplicitReceiver,r=i[i.length-1].split("&&")[0].split("=")[1];return i.push(`${s}= ${a}&&${a}${o?".bind(_ctx)":`.bind(${r})`}(${n.join(",")})`),s}processChain(){return this.cAst.expressions.map(e=>this.build(e)).join(";")}processPropertyWrite(){const e=this.cAst,i=this.cStmts;let n,a;e.receiver instanceof t.ImplicitReceiver?a=`_ctx.${e.name}`:(n=this.build(e.receiver,i),a=`${n}${n.length?".":""}${e.name}`);const s=this.build(e.value,i);i.push(`${a}=${s}`)}processPipe(){const e=this.cAst,t=this.cStmts,i=this.createVar(),n=[],a=[],s=[],o=this.build(e.exp,t);for(const t of e.args)n.push(this.build(t,s));const r=`_p${this.pipes.length}`;return this.pipes.push([e.name,r]),n.unshift(o),a.push(s.length?s.join(";")+";":"",this.pipeNameVsIsPureMap.get(e.name)?`${i}=getPPVal(${r},_ppc,"${r}",${n})`:`${i}=${r}.transform(${n})`),t.push(a.join("")),i}build(e,i){return this.cAst=e,this.cStmts=i||this.stmts,e instanceof t.ImplicitReceiver?this.processImplicitReceiver():e instanceof t.LiteralPrimitive?this.processLiteralPrimitive():e instanceof t.LiteralArray?this.processLiteralArray():e instanceof t.LiteralMap?this.processLiteralMap():e instanceof t.PropertyRead?this.processPropertyRead():e instanceof t.KeyedRead?this.processKeyedRead():e instanceof t.PrefixNot?this.processPrefixNot():e instanceof t.Unary?this.processUnary():e instanceof t.Binary?this.processBinary():e instanceof t.ParenthesizedExpression?this.processParenthesizedExpression():e instanceof t.Conditional?this.processConditional():e instanceof t.Call?this.processMethodCall():e instanceof t.Chain?this.processChain():e instanceof t.BindingPipe?this.processPipe():void 0}extendCtxWithLocals(){const e=this.createVar();this.stmts.push(`${e}=Object.assign({}, locals)`,`Object.setPrototypeOf(${e}, _ctx)`,`ctx=${e}`)}fnBody(){return this.declarations.push("ctx"),'"use strict";\nvar '+this.declarations.join(",")+";\n"+this.stmts.join(";")}fnArgs(){const e=["_plus","_minus","_isDef"];if(this.exprType===Q.Binding){e.push("getPPVal","_ppc");for(const[,t]of this.pipes)e.push(t)}return e.push("_ctx","locals"),e.join(",")}addReturnStmt(e){this.stmts.push(`return ${e};`)}cleanup(){this.ast=this.cAst=this.stmts=this.cStmts=this.declarations=this.pipes=this.pipeNameVsIsPureMap=void 0}compile(e){if(this.extendCtxWithLocals(),this.addReturnStmt(this.build(this.ast)),e)return{fnBody:this.fnBody(),fnArgs:this.fnArgs(),pipes:this.pipes};const t=new Function(this.fnArgs(),this.fnBody());let i;return this.exprType===Q.Binding?(i=t.bind(void 0,N,M,A,W),i.usedPipes=this.pipes.slice(0)):i=t.bind(void 0,N,M,A),this.cleanup(),i}}const H=()=>({transform:L});let Y;const X=()=>{if(void 0!==Y)return Y;try{new Function,Y=!1}catch(e){Y=!0}return Y};let K;var Q;function Z(e,n){if(!K)return L;if("string"!=typeof e)return L;if((e=e.trim()).endsWith(";")&&(e=e.slice(0,-1)),!e.length)return L;let a,s=j.get(e);if(s)return s;if(n||(a=ae(e)),!a)if(X())a=function(t,n){let a=Object.assign({},n);return Object.setPrototypeOf(a,t),i.get(a,e)};else{const i=new t.Parser(new t.Lexer).parseBinding(e,F(e),0);if(i.errors.length)s=L,a=s;else{const e=K.getPipeNameVsIsPureMap();if(s=new U(i.ast,Q.Binding,e).compile(n),n)return s;if(s.usedPipes.length){const e=[];let t=!1;for(const[i]of s.usedPipes){const n=K.meta(i);let a;n?(n.pure&&(t=!0,a=B.get(i)),a||(a=K.getInstance(i)),n.pure&&B.set(i,a)):a=H,e.push(a)}e.unshift(t?new Map:void 0),a=s.bind(void 0,...e)}else a=s.bind(void 0,void 0)}}return j.set(e,a),a}function J(e,t,n){let a=Object.assign({},n);Object.setPrototypeOf(a,t);let s=e.split("("),o=s[0],r=i.get(t,o);if(r){let e=s[1].replace(")","");e=e.split(",");let t=[];return e.forEach(e=>{e=e&&e.trim(),t.push(i.get(a,e))}),r.bind(a)(...t)}}function ee(e,i){if("string"!=typeof e)return L;if(!(e=e.trim()).length)return L;let n=V.get(e);if(n)return n;if(i||(n=se(e)),!n)if(X())n=J.bind(void 0,e);else{const a=new t.Parser(new t.Lexer).parseAction(e,F(e),0);if(a.errors.length)return L;n=new U(a.ast,Q.Action).compile(i)}return V.set(e,n),n}!function(e){e[e.Binding=0]="Binding",e[e.Action=1]="Action"}(Q||(Q={}));const te=new Map,ie=e=>te.get(e),ne=(e,t)=>{let i=ie(e);if(!i)return;const n=i.usedPipes||[];if(i=t===Q.Binding?i.bind(void 0,N,M,A,W):i.bind(void 0,N,M,A),n.length){const e=[];let t=!1;for(const[i]of n){const n=K.meta(i);let a;n?(n.pure&&(t=!0,a=B.get(i)),a||(a=K.getInstance(i)),n.pure&&B.set(i,a)):a=H,e.push(a)}e.unshift(t?new Map:void 0),i=i.bind(void 0,...e)}else t===Q.Binding&&(i=i.bind(void 0,void 0));return i},ae=e=>ne(e,Q.Binding),se=e=>ne(e,Q.Action),oe=new Map,re=new x("watch-id-"),le={};Object.freeze(le);let ce,de=!1;const pe=(e,t=50)=>{let i;return(...n)=>{window.__zone_symbol__clearTimeout(i),i=window.__zone_symbol__setTimeout(()=>e(...n),t)}},me=(e,t,n,a)=>{let s,o=n;i.isArray(o)&&(s=o.map(function(e){return xt(e,t)}),i.isArray(s[0])&&(s=i.flatten(s)),e(s,a))},he=(e,t,i)=>{let n=/\[\$i\]/g,a="[$i]";if(!t)return{expr:e.replace(n,"[0]"),listener:i};var s=e.lastIndexOf(a),o=e.substr(0,s).replace(a,"[0]"),r=e.substr(s+5),l=i;return r&&(l=me.bind(void 0,i,r)),{expr:o,listener:l}},ue=(e,t,i,n,a=re.nextUid(),s=!1,o={},r)=>{if(-1!==e.indexOf("[$i]")){let t=he(e,o&&(o.arrayType||o.isList),n);e=t.expr,n=t.listener}const l=Z(e);return oe.set(a,{fn:l.bind(e,t,i),listener:n,expr:e,last:le,doNotClone:s,isMuted:r}),()=>ge(a)},ge=e=>oe.delete(e);let ve=!1;const fe=window.requestAnimationFrame;let be;const ye=()=>ve=!1;window.watchRegistry=oe;let we=!1,Pe=!1,Ce=!1,Te=0;window.__WM_DEBUG_WATCHERS__=!1;const Oe=(e=!1,t=!1)=>{e?(e=>{if(de&&!e)return;Re(".......................triggerWatchers.................................");let t,n=1;do{t=!1,oe.forEach(e=>{if(e.isMuted&&e.isMuted())return;const n=e.fn,a=e.listener,s=e.last;let o;try{o=n()}catch(t){console.warn(`error in executing expression: '${e.expr}'`)}i.isEqual(o,s)||(t=!0,ve=!0,e.last=o,i.isObject(o)&&!e.doNotClone&&!1!==o.__cloneable__&&(e.last=i.clone(o)),a(o,s),ye())}),n++}while(t&&n<5);t&&5===n&&console.warn("Number of watch cycles gone above set limit of: 5 ")})(t):Ie(t)};function Ie(e){we?Pe=!0:(we=!0,Ce||(Te=0),De(e))}const De=pe(e=>{we=!1,function(e){if(Ce)return void(Pe=!0);Ce=!0;let t=!1;be.runOutsideAngular(()=>{let e,n=1;do{e=!1,Re(`-------executeWatchers (run #${Te+1})--------- `),oe.forEach(n=>{if(n.isMuted&&n.isMuted())return;const a=n.fn,s=n.listener,o=n.last;let r;try{r=a()}catch(e){console.warn(`error in executing expression: '${n.expr}'`)}i.isEqual(r,o)||(e=!0,t=!0,ve=!0,n.last=r,i.isObject(r)&&!n.doNotClone&&!1!==r.__cloneable__&&(n.last=i.clone(r)),s(r,o),ye())}),n++}while(e&&n<5)}),Ce=!1,t?be.run(()=>{Re("-------DONE (changes detected)--------- ")}):Re("-------DONE (no changes)--------- ");Pe?(Pe=!1,Te<3?(Te++,Re(`[Watcher] Scheduling rerun #${Te} (requested during execution)`),Ie(e)):(Te=0,Re("[Watcher] \u26a0\ufe0f Stopped infinite loop! Max consecutive reruns (3) reached. This usually means watcher listeners are triggering more change detection."))):Te=0}(e)},200);const Ee=(()=>{let e=!1;return t=>{if(ce)if(t)be.run(()=>ce.tick()),e=!1;else{if(e)return;e=!0,fe(()=>{be.run(()=>ce.tick()),e=!1})}}})();function Re(e){window.__WM_DEBUG_WATCHERS__&&console.log(e)}var Se,_e;e.ComponentType=void 0,(Se=e.ComponentType||(e.ComponentType={}))[Se.PAGE=0]="PAGE",Se[Se.PREFAB=1]="PREFAB",Se[Se.PARTIAL=2]="PARTIAL",Se[Se.WIDGET=3]="WIDGET";!function(e){e.LIST_RECORDS="listRecords",e.UPDATE_RECORD="updateRecord",e.INSERT_RECORD="insertRecord",e.DELETE_RECORD="deleteRecord",e.INVOKE="invoke",e.UPDATE="update",e.NOTIFY="notify",e.IS_API_AWARE="isApiAware",e.SUPPORTS_CRUD="supportsCRUD",e.SUPPORTS_DISTINCT_API="supportsDistinctAPI",e.IS_PAGEABLE="isPageable",e.IS_SORTABLE="isSortable",e.GET_OPERATION_TYPE="getOperationType",e.GET_RELATED_PRIMARY_KEYS="getRelatedTablePrimaryKeys",e.GET_ENTITY_NAME="getEntityName",e.SET_INPUT="setinput",e.GET_RELATED_TABLE_DATA="getRelatedTableData",e.GET_DISTINCT_DATA_BY_FIELDS="getDistinctDataByFields",e.GET_AGGREGATED_DATA="getAggregatedData",e.GET_MATCH_MODE="getMatchMode",e.DOWNLOAD="download",e.GET_NAME="getName",e.GET_PROPERTIES_MAP="getPropertiesMap",e.GET_PRIMARY_KEY="getPrimaryKey",e.GET_BLOB_URL="getBlobURL",e.SUPPORTS_SERVER_FILTER="supportsServerFilter",e.GET_OPTIONS="getOptions",e.SEARCH_RECORDS="searchRecords",e.GET_REQUEST_PARAMS="getRequestParams",e.GET_PAGING_OPTIONS="getPagingOptions",e.FETCH_DISTINCT_VALUES="fetchDistinctValues",e.GET_UNIQUE_IDENTIFIER="getUniqueIdentifier",e.GET_CONTEXT_IDENTIFIER="getContextIdentifier",e.IS_UPDATE_REQUIRED="isUpdateRequired",e.ADD_ITEM="addItem",e.SET_ITEM="setItem",e.REMOVE_ITEM="removeItem",e.IS_BOUND_TO_LOCALE="isBoundToLocale",e.GET_DEFAULT_LOCALE="getDefaultLocale",e.CANCEL="cancel",e.SET_PAGINATION="setPagination"}(_e||(_e={}));const xe={Operation:_e};const Ae=u.default||window.moment,ke=window.navigator.userAgent,Ne={SNAKE_CASE:/[A-Z]/g,ANDROID:/Android/i,IPHONE:/iPhone/i,IPOD:/iPod/i,IPAD:/iPad/i,MAC:/Mac/i,ANDROID_TABLET:/android|android 3.0|xoom|sch-i800|playbook|tablet|kindle/i,SUPPORTED_IMAGE_FORMAT:/\.(bmp|gif|jpe|jpg|jpeg|tif|tiff|pbm|png|ico)$/i,SUPPORTED_AUDIO_FORMAT:/\.(mp3|ogg|webm|wma|3gp|wav|m4a)$/i,SUPPORTED_VIDEO_FORMAT:/\.(mp4|ogg|webm|wmv|mpeg|mpg|avi|mov)$/i,VALID_WEB_URL:/^(http[s]?:\/\/)(www\.){0,1}[a-zA-Z0-9=:?\/\.\-]+(\.[a-zA-Z]{2,5}[\.]{0,1})?/,VALID_IMAGE_URL:/^(https?|blob|data|file|ftp):/i,REPLACE_PATTERN:/\$\{([^\}]+)\}/g,DATA_URL:/^\s*data:([a-z]+\/[a-z0-9-+.]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s]*)\s*$/i,ISO_DATE_FORMAT:/(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}:\d{2})(\.\d+)?([+-]\d{2}:?\d{2}|Z)$/},Me=["int",e.DataType.INTEGER,e.DataType.FLOAT,e.DataType.DOUBLE,e.DataType.LONG,e.DataType.SHORT,e.DataType.BYTE,e.DataType.BIG_INTEGER,e.DataType.BIG_DECIMAL],Le=new Date,Fe=e=>"app-nav-"+e,$e=e=>"sheet-position-"+e,je=e=>void 0!==e,Ve=e=>null!==e&&"object"==typeof e,Be=(e,t)=>!(!e||"false"===e)||!!t&&e===t;const Ge=()=>window.navigator.appVersion.indexOf("Trident/")>-1||window.navigator.userAgent.indexOf("MSIE")>-1,We=()=>Ne.ANDROID.test(ke),qe=()=>Ne.ANDROID_TABLET.test(ke)&&!/Tablet PC 2.0/i.test(ke),ze=()=>Ne.IPHONE.test(ke),Ue=()=>Ne.IPOD.test(ke),He=()=>Ne.IPAD.test(ke)||window.navigator.maxTouchPoints&&window.navigator.maxTouchPoints>2&&Ne.MAC.test(window.navigator.platform),Ye=()=>ze()||Ue()||He(),Xe=()=>-1!==navigator.userAgent.indexOf("Safari")&&-1===navigator.userAgent.indexOf("Chrome"),Ke=(e,t)=>{const i=e||"1366px",n=t||"1024px";return window.matchMedia("only screen and (min-device-width : "+i+") and (max-device-width : "+i+") and (min-device-height : "+n+") and (max-device-height : "+n+") and (min-width: "+i+") and (max-width: "+i+")").matches},Qe=(e,t)=>{const i=e||"1366px",n=t||"1024px";return window.matchMedia("only screen and (min-device-width : "+n+") and (max-device-width : "+n+") and (min-device-height : "+i+") and (max-device-height : "+i+") and (min-width: "+n+") and (max-width: "+n+")").matches},Ze=()=>We()||Ye()||qe()||$("#wm-mobile-display:visible").length>0,Je=()=>{const e=window.navigator.userAgent.toLowerCase().match(/android\s([0-9\.]*)/);return e?e[1]:""},et=()=>We()&&4===parseInt(Je(),10),tt=e=>{const t=e.indexOf("?");return t>-1?(e=encodeURI(e.substring(0,t))+e.substring(t),e=it(e)):e=encodeURI(e),e},it=e=>{let t,n,a,s="";return a=e.indexOf("?"),a>-1&&(a+=1,n=e.substring(a),n&&(t=n.split("&"),t.forEach(function(e){let t;const n=i.includes(e,"=")?e.indexOf("="):e&&e.length,a=e.substr(0,n),o=e.substr(n+1);if(o||i.includes(e,"=")){try{t=decodeURIComponent(o)}catch(e){t=o}s+=a+"="+encodeURIComponent(t)+"&"}else s+=a+"&"}),s=s.slice(0,-1),e=e.replace(n,s))),e},nt=e=>e?e.charAt(0).toUpperCase()+e.substring(1):"",at=e=>e===e.toUpperCase()?e:e.replace(Ne.SNAKE_CASE,function(e,t){return(t?" ":"")+e}),st=(e,t,i)=>e.substr(0,t)+i+e.substr(t+i.length),ot=e=>{let t;return t=e.indexOf("."),-1!==t&&(e=st(e,t+1,e.charAt(t+1).toUpperCase()),e=st(e,t," ")),e},rt=e=>(e=i.camelCase(e),e=nt(e),e=at(e),e=ot(e)),lt=e=>e.split("-").join(" "),ct=(e,t=",")=>{let n,a=[];return i.isArray(e)||(a=i.split(e,t)),n=i.map(a,rt),i.isArray(e)?n:n.join(t)},dt=e=>{const t=document.createElement("a");return t.href=e,""!==t.protocol&&(!Ne.DATA_URL.test(e)&&(!!pt(location.href,"https://")&&("https:"!==t.protocol&&"wss:"!==t.protocol)))},pt=(e,t,i)=>{if(!e)return!1;return new RegExp("^"+t,i?"i":"").test(e)},mt=(e,t)=>{let n;return n=i.attempt(function(){const i=Object.keys(e).map(e=>`var ${e} = data['${e}'];`).join(" ");return new Function("data",`${i} return ${t}`)(e)}),i.isError(n)&&(n=i.get(e,t)),n},ht=e=>Ne.SUPPORTED_IMAGE_FORMAT.test(e),ut=e=>Ne.SUPPORTED_AUDIO_FORMAT.test(e),gt=e=>Ne.SUPPORTED_VIDEO_FORMAT.test(e),vt=e=>Ne.VALID_WEB_URL.test(e),ft=e=>Ne.VALID_IMAGE_URL.test(e?.trim()),bt=e=>e;function yt(e,...t){let n=1;const a=arguments.length,s=new Array(a-n);for(;n<a;n++)s[n-1]=arguments[n];if(i.isFunction(e))return e.apply(null,s)}const wt=(e,t,i,n,a,s,o)=>{if(t){if("timestamp"===i)return Ae(t).valueOf();if("UTC"===i)return new Date(t).toISOString();if(n&&n!==Ae.defaultZone?.name){const e=i.replaceAll("y","Y").replaceAll("d","D").replace("a","A");if(s)return Ae(t).format(e);if("datetimestamp"===a)return t=Yt(n,t),Ae(t).format(e)}return e.transform(t,i,n,o)}},Pt=e=>{if("string"!=typeof e)return;const t=e.match(Ne.ISO_DATE_FORMAT);return!(!t||!t[4])||void 0},Ct=(e,t,n)=>{if(t&&t.pattern&&"timestamp"!==t.pattern){const n=(t&&t.hasOwnProperty("isNativePicker")?i.get(t,"isNativePicker"):Ze())?"YYYY/MM/DD HH:mm:ss":Vt(t.pattern);e=Ae(e,n).toDate()}if(i.isDate(e))return e;if(isNaN(e)||(e=parseInt(e,10)),!Ae(e).isValid()||""===e||null==e)return;let a=new Date(e);return i.isString(e)&&(a=n?Yt(n,e):new Date(Ae(Ae(e).format()).valueOf())),"CURRENT_DATE"===e||isNaN(a.getDay())?Le:a},Tt=(e,t,i,n,a,s,o,r=!1)=>{const l=e,c=e=>{if(!t||!t.contains(e.target)&&t!==e.target)if(i.contains(e.target)){if($(e.target).is("input")&&!a)return;l.removeEventListener(n,c,r)}else 0===o&&l.removeEventListener(n,c,r),s()};l.addEventListener(n,c,r);return()=>{l.removeEventListener(n,c,r)}},Ot=e=>i.cloneDeep(e),It=(e,t,n)=>{const a=i.get(document.forms,[e,t,"files"]);return n?i.map(a,i.identity):a&&a[0]};function Dt(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}const Et=()=>Dt()+"-"+Dt()+"-"+Dt(),Rt=(e,t)=>{let n;return!e||!t||(n=e&&e.split(",").map(Function.prototype.call,String.prototype.trim),i.intersection(n,t.userRoles).length)},St=e=>{if(e)try{const t=parseInt(e,10);return Ve(e)||!isNaN(t)?e:JSON.parse(e)}catch(e){return}},_t=e=>{let t=new s({emptyNodeForm:"object",attributePrefix:"",enableToStringFunc:!1}).xml2js(e);return t&&(t=i.get(t,Object.keys(t)[0])),t},xt=(e,t,n)=>{if(!e||!t)return;if(!n)return i.get(e,t);const a=t.split("."),s=[];let o;return a.forEach(e=>{if(!a.length)return o=!0,!1;const t=e.match(/\w+/g);let i;for(;t.length;)i=t.shift(),s.push({key:i,value:t.length?[]:{}})}),o?void 0:(s.forEach(t=>{let i=e[t.key];Ve(i)||(i=St(i),i||(i=t.value)),e[t.key]=i,e=i}),e)},At=t=>{let i;return t?(i=t&&t.substring(t.lastIndexOf(".")+1),i=i&&i.toLowerCase(),i=i===e.DataType.LOCALDATETIME?e.DataType.DATETIME:i,i):e.DataType.STRING},kt=e=>-1!==Me.indexOf(At(e).toLowerCase()),Nt=e=>!(!Ve(e)||i.isArray(e))&&0===Object.keys(e).length,Mt=e=>{const t=$(e).offset().top;window.scroll({top:t,left:0,behavior:"smooth"})},Lt=e=>{var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)},Ft=e=>{const t=i.omit(e,"empty");return i.isEqual(i.keys({content:[],first:!0,last:!0,number:0,numberOfElements:10,size:20,sort:null,totalElements:10,totalPages:1}),i.keys(t).sort())},$t=(e,t,n)=>{let a=Ne.REPLACE_PATTERN;if(e)return n&&(a=/\{([^\}]+)\}/g),e.replace(a,function(e,n){return i.get(t,n)})},jt=t=>(i.includes(t,".")&&(t=i.toLower(At(t))),i.includes([e.DataType.DATE,e.DataType.TIME,e.DataType.TIMESTAMP,e.DataType.DATETIME,e.DataType.LOCALDATETIME],t)),Vt=e=>(i.includes(e,"E")&&(e=i.replace(e,/E[,]?/g,"")),i.replace(e,/y*d*/g,e=>e.toUpperCase())),Bt=(e,t)=>{const n=["AM","PM"],a=Ae()._locale.meridiem();t&&t.meridians&&i.includes(n,a)&&i.forEach(t.meridians,(t,a)=>{i.includes(e,t)&&(e=e.replace(t,n[a]))});const s=(t&&t.hasOwnProperty("isNativePicker")?i.get(t,"isNativePicker"):Ze())?i.get(t,"pattern")||"YYYY/MM/DD HH:mm:ss":Vt(i.get(t,"pattern"))||"";return t&&t.pattern&&"timestamp"!==t.pattern&&(isNaN(Ae(e,s).valueOf())||Ye()&&(e=Ae(e).format("YYYY/MM/DD HH:mm:ss")),e=(e=Ae(e,s)).toDate()),Ae(e,s).isValid()?(Ye()&&(e=Ae(Ae(e).valueOf()).format("YYYY/MM/DD HH:mm:ss")),e):(isNaN(e)?new Date(e).getTime()||(e=Ae(Ae().format("YYYY-MM-DD")+" "+e,"YYYY-MM-DD HH:mm:ss A")):e=parseInt(e,10),new Date(Ae(e).valueOf()))},Gt=(e,t)=>(e=Bt(e,t),new Date(e)),Wt=(e,t)=>{if(e instanceof Blob)return e;const i=St(e);return e=i&&i instanceof Object?new Blob([JSON.stringify(i)],{type:t||"application/json"}):new Blob([e],{type:t||"text/plain"})},qt=(e,t,n)=>{let a=i.isArray(n)?n:i.split(n,",");return a=i.map(a,i.trim),i.isEqualWith(e,t,function(e,t){return i.every(a,function(n){let a,s,o;return-1===i.indexOf(n,":")?a=s=i.trim(n):(o=i.split(n,":"),a=i.trim(o[0]),s=i.trim(o[1])),i.get(e,a)===i.get(t,s)})})},zt=e=>document.querySelector(e),Ut=(e,t)=>{if(zt(`link[href="${e}"]`))return;const i=document.createElement("link");return i.href=e,t&&t.name&&i.setAttribute(t.name,t.value),i.setAttribute("rel","stylesheet"),i.setAttribute("type","text/css"),document.head.appendChild(i),i},Ht=(e=[])=>{Array.isArray(e)||(e=[e]),e.forEach(Ut)},Yt=(e,t)=>t?new Date(new Date(Ae(t).tz(e).format()).toLocaleString("en-US",{timeZone:e})):new Date(new Date(Ae().tz(e).format()).toLocaleString("en-US",{timeZone:e})),Xt=async(e,t,i=!1)=>{const n=e.trim();return!n.length||zt(`script[src="${a=n}"], script[data-src="${a}"]`)?Promise.resolve():t?new Promise((e,t)=>{let i=document.createElement("script");i.type="text/javascript",i.src=n,i.async=!1,i.readyState?i.onreadystatechange=()=>{"loaded"!==i.readyState&&"complete"!==i.readyState||(i.onreadystatechange=null,e(!0))}:i.onload=()=>{e(!0)},i.onerror=e=>t(e),document.getElementsByTagName("head")[0].appendChild(i)}):i?$.ajax({dataType:"script",cache:!0,url:e}).done(e=>e).fail(e=>e):$.getScript(e).done(e=>e).fail(e=>e);var a},Kt=async(e=[],t=!0)=>{for(const i of e)await Xt(i,t);return Promise.resolve()};let Qt={};const Zt=(e,t)=>{let i=window.sessionStorage.getItem(Qt.id);i=i?JSON.parse(i):{},i[e]=t,window.sessionStorage.setItem(Qt.id,JSON.stringify(i))},Jt=e=>{let t=window&&window.sessionStorage&&window.sessionStorage.getItem(Qt.id);if(t)return t=JSON.parse(t),t[e]},ei=(...e)=>{},ti=e=>new Promise((t,i)=>{resolveLocalFileSystemURL(e,function(n){n.file(function(n){const a=new FileReader;a.onloadend=()=>{const i=new Blob([a.result],{type:n.type});t({blob:i,filepath:e})},a.onerror=i,a.readAsArrayBuffer(n)})},i)}),ii={INT_MAX_VALUE:2147483647},ni=(e,t="_self")=>{window.open(e,t)},ai=(e,t,i=!1,n,a)=>$.ajax({type:"get",dataType:e,url:t,async:!i}).done(e=>n&&n(e)).fail(e=>a&&a(e)),si=e=>e instanceof Promise?e:Promise.resolve(e),oi=(e,t,n,a=()=>Promise.resolve(!1))=>{let s=0;const o=()=>{if(s++,i.isFunction(e))return e()};return n=i.isNumber(n)&&n>0?n:0,t=i.isNumber(t)&&t>0?t:0,new Promise((e,i)=>{const r=function(){const l=arguments;setTimeout(()=>{si(a()).then(function(t){!1!==t&&(!n||s<=n)?si(o()).then(e,r):i(l)},()=>i(l))},t)};si(o()).then(e,r)})},ri=()=>{const e={promise:null,reject:null,resolve:null,onAbort:()=>{},isAborted:!1};return e.promise=new Promise((t,i)=>{e.resolve=t,e.reject=i}),e.promise.abort=()=>{yt(e.onAbort),e.reject("aborted"),e.isAborted=!0},e},li=(e,t)=>{document.styleSheets[0].insertRule(`${e} { ${t} }`)},ci=e=>{const t={},n=e.indexOf("?");if(-1!==n){i.split(e.substring(n+1,e.length),"&").forEach(e=>{let n=i.split(e,"=");t[n[0]]=n[1]})}return t},di=e=>{const t=(e=e.replace("#/","/")).indexOf("?");return-1!==t&&(e=e.substring(0,t)),e},pi=/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),mi=()=>{const e={promise:null,resolve:ei,reject:ei};return e.promise=new Promise((t,i)=>{e.resolve=t,e.reject=i}),e},hi=(e,t,n,a)=>{if(n=n||mi(),0===(a=a||0)&&(e=i.filter(e,function(e){return!(i.isUndefined(e)||i.isNull(e))})),e&&a<e.length)try{si(e[a].apply(void 0,t)).then(()=>hi(e,t,n,a+1),n.reject)}catch(e){n.reject(e)}else n.resolve();return n.promise},ui=(e,t)=>e.execute(xe.Operation.GET_UNIQUE_IDENTIFIER)===t.execute(xe.Operation.GET_UNIQUE_IDENTIFIER)&&i.isEqual(e.execute(xe.Operation.GET_CONTEXT_IDENTIFIER),t.execute(xe.Operation.GET_CONTEXT_IDENTIFIER)),gi=(e,t)=>e.execute(xe.Operation.GET_CONTEXT_IDENTIFIER)===t,vi=(e,t,a)=>{const s=e.registerDestroyListener?e.registerDestroyListener.bind(e):i.noop,o=new n.Subject,r=(n,r)=>{const l=(e,a)=>{e===a&&i.isUndefined(e)||i.isUndefined(e)&&!i.isUndefined(a)||(i.includes(["blob","file"],n.type)||(e=Ot(e)),"dataBinding"===n.target?(t.rules=[],i.forEach(e,function(e,i){t.rules.push({target:i,value:e,matchMode:n.matchMode||"startignorecase",required:!1,type:""})})):n[r]=e,o.next({filterExpressions:t,newVal:e}))};pt(n[r],"bind:")&&s(ue(n[r].replace("bind:",""),e,{},a?a.invokeOnFiltertExpressionChange.bind(a,n,r):l,void 0,!1,{arrayType:i.includes(["in","notin"],n.matchMode)}))},l=e=>{e.rules&&i.forEach(e.rules,(e,t)=>{e.rules?l(e):("between"===e.matchMode&&r(e,"secondvalue"),r(e,"value"))})};return l(t),o},fi=(e,t)=>{let i=Object.getPrototypeOf(e);for(;Object.getPrototypeOf(i).constructor!==Object;)if(i=Object.getPrototypeOf(i),t===i)return;Object.setPrototypeOf(i,t)},bi=function(e){const t=/^data:image\/([a-z]{2,});base64,/;if(i.isString(e))return i.startsWith(e,"file:///")||t.test(e)?e:e.replace(new RegExp("([^:]/)(/)+","g"),"$1")};$.cachedScript=(()=>{const e=new Map,t=new Set;return function(i){if((e=>t.has(e))(i))return Promise.resolve();if((t=>e.has(t))(i))return e.get(i);(t=>{let i,n;const a=new Promise((e,t)=>{i=e,n=t});a.resolve=i,a.reject=n,e.set(t,a)})(i);const n={dataType:"script",cache:!0,url:i};return $.ajax(n).done(()=>(i=>{t.add(i),e.get(i).resolve(),e.delete(i)})(i)),e.get(i)}})();const yi={DATE:"yyyy-MM-dd",TIME:"hh:mm a",TIMESTAMP:"yyyy-MM-dd hh:mm:ss a",DATETIME:"yyyy-MM-dd hh:mm:ss a"},wi=e=>yi[i.toUpper(e)],Pi=e=>{const t=e.querySelectorAll("label.control-label");let i=e.querySelectorAll("[focus-target]");if(i.length||(i=e.querySelectorAll("input, select, textarea")),t.length&&i.length){const e=$(i[0]).closest("[widget-id]").attr("widget-id");e&&(E(i[0],"id",e),E(t[0],"for",e))}const n=e.querySelectorAll("ul");if(t.length&&n.length&&("radiogroup"===n[0].getAttribute("role")||"group"===n[0].getAttribute("role"))){const e="wm-group-label-"+Et();E(n[0],"aria-labelledby",e),E(t[0],"id",e)}},Ci=(e,t,i,n)=>{(i._ngZone||i.ngZone).onStable.pipe(a.take(1)).subscribe(()=>{const t=Ii(e);t&&t.m41<0&&(t.m41=0,Oi(e,t))})},Ti=(e,t,i,n)=>{const s=n?parseInt(n.css("width")):parseInt(e.css("width")),o=$(window).width()+window.scrollX,r=t.getBoundingClientRect(),l=r.right+window.scrollX;let c;(i._ngZone||i.ngZone).onStable.pipe(a.take(1)).subscribe(()=>{const t=Ii(e);t&&o-(l+r.width)<s&&(c=l-s,c<0&&(c=0),t.m41=c,Oi(e,t))})},Oi=(e,t)=>{const i="translate3d("+t.m41+"px, "+t.m42+"px, 0px)";e[0].style.webkitTransform=i,e[0].style.MozTransform=i,e[0].style.msTransform=i,e[0].style.OTransform=i,e[0].style.transform=i},Ii=e=>{if(!e||!e[0])return null;const t=window.getComputedStyle(e[0]),i=t.transform||t.webkitTransform,n=i&&"none"!==i?i:"matrix(1, 0, 0, 1, 0, 0)";return"undefined"==typeof WebKitCSSMatrix?new MSCSSMatrix(n):new WebKitCSSMatrix(n)},Di=e=>{if(!e.closest(".app-popover").length){const e=document.querySelectorAll(".app-popover-wrapper");i.forEach(e,e=>{e.widget.isOpen&&(e.widget.isOpen=!1)})}},Ei=Ee,Ri=(e,t)=>{let n=t.link;const a=t.action,s=t.target;if(a&&(e.itemActionFn||(e.itemActionFn=ee(a)),e.itemActionFn(e.userDefinedExecutionContext,Object.create(t))),n)if(!n.startsWith("#/")||s&&"_self"!==s)ni(n,s);else{const t=ci(n);n=di(n);(i.get(e,"route")||i.get(e,"menuRef.route")).navigate([n],{queryParams:t})}},Si=(e,t)=>{const n=i.startsWith(e,"Variables."),a=i.startsWith(e,"Widgets."),s=e.split(".");if(n)return i.get(t.viewParent.Variables,s[1]);if(a){const e=i.get(t.viewParent.Widgets,s[1]),n=e.$attrs.get("datasetboundexpr");let a;return a=!e.datasource&&n?n:e.binddataset,Si(a,e)}},_i=(e,t)=>{if(/^Widgets\..*\.currentItem/g.test(e)){const n=e.split("."),a=i.get(t.viewParent.Widgets,n[1]),s=a.$attrs.get("datasetboundexpr");if(!a.datasource&&s)return e=e.replace(/^Widgets\..*\.currentItem/g,`${s}[$i]`),_i(e,t);e=e.replace(/^Widgets\..*\.currentItem/g,`${a.binddataset}[$i]`)}return e},xi=e=>{let t=e.closest(".app-prefab");return t.length||(t=e.closest(".app-partial")),t.length||(t=e.closest(".app-spa-page")),t.length||(t=e.closest(".app-page")),t.length&&t.parent()[0].tagName},Ai={REQUIRED:"required",MAXCHARS:"maxchars",MINVALUE:"minvalue",MAXVALUE:"maxvalue",REGEXP:"regexp",MINDATE:"mindate",MAXDATE:"maxdate",MINTIME:"mintime",MAXTIME:"maxtime",EXCLUDEDATES:"excludedates",EXCLUDEDAYS:"excludedays"},ki=e=>e,Ni=e=>{const t=document.createElement("script");t.onload=()=>{e(WM_CUSTOM_FORMATTERS)},t.onerror=e=>{console.warn("Error while loading the file "+t.src+"\n"+e)},t.type="text/javascript",t.src="./extensions/formatters.js",document.head.appendChild(t)},Mi=(e,t)=>_WM_APP_PROPERTIES.extra_settings&&i.get(_WM_APP_PROPERTIES.extra_settings,e)||t,Li=e=>{let t="";e.itemsperrow?"auto"===e.itemsperrow?e.itemsPerRowClass="":isNaN(parseInt(e.itemsperrow,10))?(i.split(e.itemsperrow," ").forEach(e=>{const n=i.split(e,"-");e=`${n[0]}-${12/parseInt(n[1],10)}`,t+=` col-${e}`}),e.itemsPerRowClass=t.trim()):e.itemsPerRowClass="col-xs-"+12/parseInt(e.itemsperrow,10):e.itemsPerRowClass="col-xs-12"},Fi=(e,t)=>{let i=$i(e);return i||t},$i=e=>e[15]?e[15][8]:e[15],ji=()=>_WM_APP_PROPERTIES.fontConfig||_(),Vi=(e,t,i,n)=>{(i._ngZone||i.ngZone).onStable.subscribe(()=>{const i=n?parseInt(n.css("height"),10):parseInt(e.css("height"),10),a=t.getBoundingClientRect(),s=window.innerHeight-a.bottom,o=a.top;if(s<i&&o>=i){const t=Ii(e);t.m42=t.m42-i-a.height,t.m42<0&&(t.m42=0),Oi(e,t)}})};var Bi=Object.freeze({__proto__:null,AppConstants:ii,VALIDATOR:Ai,_WM_APP_PROJECT:Qt,addEventListenerOnElement:Tt,addForIdAttributes:Pi,adjustContainerPosition:Ci,adjustContainerRightEdges:Ti,adjustVerticalPosition:Vi,appendScriptToHead:Ni,closePopover:Di,convertToBlob:ti,createCSSRule:li,deHyphenate:lt,defer:mi,detectChanges:Ei,encodeUrl:tt,encodeUrlParams:it,executePromiseChain:hi,extendProto:fi,extractCurrentItemExpr:_i,extractType:At,fetchContent:ai,findParent:Fi,findRootContainer:xi,findValueOf:xt,findViewParent:$i,generateGUId:Et,getAbortableDefer:ri,getAndroidVersion:Je,getAppSetting:Mi,getBlob:Wt,getClonedObject:Ot,getDatasourceFromExpr:Si,getDateObj:Ct,getDisplayDateTimeFormat:wi,getEvaluatedExprValue:mt,getFiles:It,getFontConfig:ji,getFormattedDate:wt,getMomentLocaleObject:Yt,getNativeDateObject:Gt,getNavClass:Fe,getResourceURL:bt,getRouteNameFromLink:di,getSessionStorageItem:Jt,getSheetPositionClass:$e,getUrlParams:ci,getValidDateObject:Bt,getValidJSON:St,getWebkitTraslationMatrix:Ii,hasOffsetStr:Pt,initCaps:nt,isAndroid:We,isAndroidTablet:qe,isAppleProduct:pi,isAudioFile:ut,isDataSourceEqual:ui,isDateTimeType:jt,isDefined:je,isElementInViewport:Lt,isEmptyObject:Nt,isEqualWithFields:qt,isIE:Ge,isImageFile:ht,isInsecureContentRequest:dt,isIos:Ye,isIpad:He,isIphone:ze,isIpod:Ue,isKitkatDevice:et,isLargeTabletLandscape:Ke,isLargeTabletPortrait:Qe,isMobile:Ze,isNumberType:kt,isObject:Ve,isPageable:Ft,isSafari:Xe,isTablet:()=>{const e=document.querySelector(".app-page").widget;return e&&e.viewParent.Viewport.isTabletType},isValidImageUrl:ft,isValidWebURL:vt,isVideoFile:gt,loadScript:Xt,loadScripts:Kt,loadStyleSheet:Ut,loadStyleSheets:Ht,noop:ei,openLink:ni,periodSeparate:ot,prettifyLabel:rt,prettifyLabels:ct,processFilterExpBindNode:vi,removeExtraSlashes:bi,replace:$t,replaceAt:st,retryIfFails:oi,scrollToElement:Mt,setListClass:Li,setSessionStorageItem:Zt,setTranslation3dPosition:Oi,spaceSeparate:at,stringStartsWith:pt,toBoolean:Be,toPromise:si,transformFileURI:ki,triggerFn:yt,triggerItemAction:Ri,validateAccessRoles:Rt,validateDataSourceCtx:gi,xmlToJson:_t});class Gi{constructor(e=!0){this._subject=new n.Subject,this._isInitialized=!1,this._eventsBeforeInit=[],e&&this.start()}notify(e,...t){this._isInitialized?this._subject.next({name:e,data:t}):this._eventsBeforeInit.push({name:e,data:t})}start(){this._isInitialized||(this._isInitialized=!0,this._eventsBeforeInit.forEach(e=>this._subject.next(e)))}subscribe(e,t){let i;return e&&t?(i=this._subject.subscribe(i=>{i&&Ve(i)&&i.name===e&&t.apply(void 0,i.data)}),()=>{i.unsubscribe()}):ei}destroy(){this._subject.next(null),this._subject.complete(),this._isInitialized=!1,this._eventsBeforeInit=[]}}let Wi=768,qi=1200;class zi{constructor(){this.orientation={isPortrait:!1,isLandscape:!1},this.isMobileType=!1,this.isTabletType=!1,this._eventNotifier=new Gi(!0),this.setScreenType(),this.boundResizeFn=this.resizeFn.bind(this),window.addEventListener("resize",this.boundResizeFn),this.mediaQuery=window.matchMedia("(orientation: portrait)"),this.mediaQuery.matches?this.orientation.isPortrait=!0:this.orientation.isLandscape=!0,this.mediaQuery.addEventListener&&(this.boundOrientationChange=e=>this.orientationChange(e,!e.matches),this.mediaQuery.addEventListener("change",this.boundOrientationChange))}update(e){this.selectedViewPort=e,this.setScreenType()}orientationChange(e,t){t!==this.orientation.isLandscape&&(this.orientation.isPortrait=!t,this.orientation.isLandscape=t,this.notify("orientationchange",{$event:e,data:{isPortrait:!t,isLandscape:t}}))}resizeFn(e){document.querySelector(".wm-app")&&(this.setScreenType(),this.orientationChange(e,this.screenWidth>=this.screenHeight),this.notify("resize",{$event:e,data:{screenWidth:this.screenWidth,screenHeight:this.screenHeight}}))}subscribe(e,t){return this._eventNotifier.subscribe(e,t)}notify(e,...t){this._eventNotifier.notify(e,...t)}setScreenType(){const e=document.querySelector(".wm-app");if(this.screenWidth=e.clientWidth,this.screenHeight=e.clientHeight,this.isTabletType=!1,this.isMobileType=!1,i.get(this.selectedViewPort,"deviceCategory")){const e=this.selectedViewPort.deviceCategory;"Tab"===e?this.isTabletType=!0:"Smartphone"===e&&(this.isMobileType=!0)}else parseInt(getComputedStyle(document.documentElement).getPropertyValue("--screen-xs")),Wi=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--screen-sm"))||768,qi=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--screen-lg"))||1200,this.screenWidth>=qi?(this.isTabletType=We()||Ye()||qe(),this.isMobileType=!1):this.screenWidth>=Wi?(this.type=1,this.isTabletType=!0):(this.type=0,this.isMobileType=!0)}ngOnDestroy(){this._eventNotifier.destroy(),this.boundResizeFn&&(window.removeEventListener("resize",this.boundResizeFn),this.boundResizeFn=null),this.mediaQuery&&this.boundOrientationChange&&this.mediaQuery.removeEventListener&&(this.mediaQuery.removeEventListener("change",this.boundOrientationChange),this.boundOrientationChange=null),this.mediaQuery=null}static{this.\u0275fac=g.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:g,type:zi,deps:[],target:g.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=g.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:g,type:zi,providedIn:"root"})}}g.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:g,type:zi,decorators:[{type:r.Injectable,args:[{providedIn:"root"}]}],ctorParameters:()=>[]});class Ui{constructor(){this.MATCH_MODES={STARTS_WITH_IGNORE_CASE:"startignorecase",STARTS_WITH:"start",ENDS_WITH_IGNORE_CASE:"endignorecase",ENDS_WITH:"end",CONTAINS:"anywhere",CONTAINS_IGNORE_CASE:"anywhereignorecase",IS_EQUAL_WITH_IGNORE_CASE:"exactignorecase",IS_EQUAL:"exact"},this.VALIDATOR=Ai}static{this.\u0275fac=g.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:g,type:Ui,deps:[],target:g.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=g.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:g,type:Ui,providedIn:"root"})}}g.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:g,type:Ui,decorators:[{type:r.Injectable,args:[{providedIn:"root"}]}]});class Hi{constructor(){i.assign(this,Bi)}static{this.\u0275fac=g.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:g,type:Hi,deps:[],target:g.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=g.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:g,type:Hi,providedIn:"root"})}}g.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:g,type:Hi,decorators:[{type:r.Injectable,args:[{providedIn:"root"}]}],ctorParameters:()=>[]});class Yi{constructor(){i.assign(this,{INTEGER:"integer",BIG_INTEGER:"big_integer",SHORT:"short",FLOAT:"float",BIG_DECIMAL:"big_decimal",DOUBLE:"double",LONG:"long",BYTE:"byte",STRING:"string",CHARACTER:"character",TEXT:"text",DATE:"date",TIME:"time",TIMESTAMP:"timestamp",DATETIME:"datetime",BOOLEAN:"boolean",LIST:"list",CLOB:"clob",BLOB:"blob"})}static{this.\u0275fac=g.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:g,type:Yi,deps:[],target:g.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=g.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:g,type:Yi,providedIn:"root"})}}g.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:g,type:Yi,decorators:[{type:r.Injectable,args:[{providedIn:"root"}]}],ctorParameters:()=>[]});class Xi{constructor(){i.assign(this,{TEXT:"text",NUMBER:"number",TEXTAREA:"textarea",PASSWORD:"password",CHECKBOX:"checkbox",SLIDER:"slider",RICHTEXT:"richtext",CURRENCY:"currency",SWITCH:"switch",SELECT:"select",CHECKBOXSET:"checkboxset",RADIOSET:"radioset",DATE:"date",TIME:"time",TIMESTAMP:"timestamp",UPLOAD:"upload",RATING:"rating",DATETIME:"datetime",AUTOCOMPLETE:"autocomplete",CHIPS:"chips",COLORPICKER:"colorpicker"})}static{this.\u0275fac=g.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:g,type:Xi,deps:[],target:g.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=g.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:g,type:Xi,providedIn:"root"})}}g.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:g,type:Xi,decorators:[{type:r.Injectable,args:[{providedIn:"root"}]}],ctorParameters:()=>[]});const Ki=[];class Qi{constructor(e){this.http=e,this.scripts={},Ki.forEach(e=>{this.scripts[e.name]={loaded:!1,src:e.src}})}load(...e){return e&&e.length?Promise.all(e.map(e=>this.loadScript(e))):Promise.resolve()}loadScript(e){return new Promise((t,i)=>{if(this.scripts[e]&&this.scripts[e].loaded)return void t({script:e,loaded:!0});this.scripts[e]||(this.scripts[e]={loaded:!1,src:e});let n=document.createElement("script");n.type="text/javascript",n.async=!1;const a=this.scripts[e].src;a.startsWith("http")?n.src=a:n.src=(Qt.cdnUrl||Qt.ngDest)+a,n.readyState?n.onreadystatechange=()=>{"loaded"!==n.readyState&&"complete"!==n.readyState||(n.onreadystatechange=null,this.scripts[e].loaded=!0,t({script:e,loaded:!0}))}:n.onload=()=>{this.scripts[e].loaded=!0,t({script:e,loaded:!0})},n.onerror=i=>t({script:e,loaded:!1,status:"Loaded"}),document.getElementsByTagName("head")[0].appendChild(n)})}static{this.\u0275fac=g.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:g,type:Qi,deps:[{token:v.HttpClient}],target:g.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=g.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:g,type:Qi,providedIn:"root"})}}g.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:g,type:Qi,decorators:[{type:r.Injectable,args:[{providedIn:"root"}]}],ctorParameters:()=>[{type:v.HttpClient}]});class Zi{constructor(){this.customPipes=new Map}setCustomPipe(e,t){this.customPipes.set(e,t)}getCustomPipe(e){return this.customPipes.get(e)}hasCustomPipe(e){return this.customPipes.has(e)}static{this.\u0275fac=g.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:g,type:Zi,deps:[],target:g.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=g.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:g,type:Zi,providedIn:"root"})}}g.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:g,type:Zi,decorators:[{type:r.Injectable,args:[{providedIn:"root"}]}]});class Ji{load(){const{default:e}=ji(),t=(e?.fonts??[]).filter(e=>!!e.csspath).map(e=>e.csspath);Ht(t)}static{this.\u0275fac=g.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:g,type:Ji,deps:[],target:g.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=g.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:g,type:Ji,providedIn:"root"})}}g.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:g,type:Ji,decorators:[{type:r.Injectable,args:[{providedIn:"root"}]}]});class en{constructor(){this.HISTORY_HANDLER="replace",this.HISTORY_HANDLER_TYPES={push:"pushState",replace:"replaceState"},this.WIDGET_STATE_KEY="ws"}setHistoryHandler(e){Object.keys(this.HISTORY_HANDLER_TYPES).indexOf(e)>-1&&(this.HISTORY_HANDLER=e)}getNestedPath(e,t,i){let n=i||t;return e&&(e.prefabName||e.partialName)?(n=n.length>0?n+"."+(e.prefabName||e.partialName):e.prefabName||e.partialName,n=n+"."+e.containerWidget.name,this.getNestedPath(e.containerWidget.viewParent,t,n)):n.split(".").reverse().join(".")}getStateInformation(e){let t,i;if("url"===e.toLowerCase()){if(i=decodeURIComponent(window.location.href).match(/(wm_state=).*?(&|$)/),i)return i=i[0].replace("wm_state=",""),t=this.uriToJson(i),t}else"localstorage"===e.toLowerCase()?i=localStorage.getItem(window.location.pathname.replace(/\//g,"")+"_wm_state"):"sessionstorage"===e.toLowerCase()&&(i=sessionStorage.getItem(window.location.pathname.replace(/\//g,"")+"_wm_state"));if(i)return t=JSON.parse(i),t}getWidgetState(e,t){if(!(t=t||this.computeMode(e.statehandler)))return;let n=this.getStateInformation(t);if(n&&e&&e.getAppInstance().activePageName&&("localstorage"===t.toLowerCase()||"sessionstorage"===t.toLowerCase())&&(n=n[e.getAppInstance().activePageName]),i.get(n,this.WIDGET_STATE_KEY)){const t=this.getNestedPath(e.viewParent,e.getWidget().name);return n[this.WIDGET_STATE_KEY][t]}}computeMode(e){return e?e&&"none"===e.toLowerCase()?void 0:e.toLowerCase():"url"}setWidgetState(e,t,i){const n=this.getNestedPath(e.viewParent,e.getWidget().name);(i=i||this.computeMode(e.statehandler))&&this.setStateParams(this.WIDGET_STATE_KEY,n,t,i,e)}removeWidgetState(e,t,i){if(!(i=i||this.computeMode(e.statehandler)))return;const n=this.getNestedPath(e.viewParent,e.getWidget().name);this.removeStateParam(this.WIDGET_STATE_KEY,n,t,i,e)}setStateVariable(e,t,i){(i=i||this.computeMode(i))&&this.setStateParams("",e,t,i)}getStateVariable(e,t){if(!(t=t||this.computeMode(t)))return;const i=this.getStateInformation(t);return i?i[e]:void 0}removeStateVariable(e,t){(t=t||this.computeMode(t))&&this.removeStateParam("",e,null,t)}setStateParams(e,t,n,a,s){let o,r="";const l=this.getStateInformation(a);o=s&&l&&s.getAppInstance().activePageName&&("localstorage"===a.toLowerCase()||"sessionstorage"===a.toLowerCase())?l[s.getAppInstance().activePageName]:i.clone(l),e?(o&&!o[e]?o[e]={}:o||(o={[e]:{}}),i.isObject(n)&&!i.isArray(n)?(o[e][t]=o[e][t]||{},i.merge(o[e][t],n)):o[e][t]=n):(o&&!o[t]?o[t]={}:o||(o={[t]:{}}),i.isObject(n)&&!i.isArray(n)?(o[t]=o[t]||{},i.merge(o[t],n)):o[t]=n),s&&s.getAppInstance().activePageName&&("localstorage"===a.toLowerCase()||"sessionstorage"===a.toLowerCase())&&(l?(l[s.getAppInstance().activePageName]=o,o=l):o={[s.getAppInstance().activePageName]:o});let c=decodeURIComponent(window.location.href);c.indexOf("?")<0?c+="?wm_state=":c.indexOf("wm_state")<0&&(c+="&wm_state="),r=c.replace(/(wm_state=).*?(&|$)/,"$1"+this.jsonToUri(o)+"$2"),"localstorage"!==a.toLowerCase()?"sessionstorage"!==a.toLowerCase()?decodeURIComponent(window.location.href)!==decodeURIComponent(r)&&("push"===this.HISTORY_HANDLER?window.history.pushState({path:r},"",r):"replace"===this.HISTORY_HANDLER&&window.history.replaceState({path:r},"",r)):sessionStorage.setItem(window.location.pathname.replace(/\//g,"")+"_wm_state",JSON.stringify(o)):localStorage.setItem(window.location.pathname.replace(/\//g,"")+"_wm_state",JSON.stringify(o))}removeStateParam(e,t,n,a,s){let o,r="";const l=this.getStateInformation(a);if(o=s&&l&&s.getAppInstance().activePageName&&("localstorage"===a.toLowerCase()||"sessionstorage"===a.toLowerCase())?l[s.getAppInstance().activePageName]:i.clone(l),!i.get(o,[e])&&!i.get(o,t))return;if(i.get(o,e+"."+t)||o&&o[e]&&o[e][t]?(n?delete o[e][t][n]:delete o[e][t],i.isEmpty(o[e][t])&&delete o[e][t],i.isEmpty(o[e])&&delete o[e]):!e&&i.get(o,t)&&delete o[t],s&&s.getAppInstance().activePageName&&("localstorage"===a.toLowerCase()||"sessionstorage"===a.toLowerCase())&&(l?(l[s.getAppInstance().activePageName]=o,o=l):o={[s.getAppInstance().activePageName]:o}),"localstorage"===a.toLowerCase())return void localStorage.setItem(window.location.pathname.replace(/\//g,"")+"_wm_state",JSON.stringify(o));if("sessionstorage"===a.toLowerCase())return void sessionStorage.setItem(window.location.pathname.replace(/\//g,"")+"_wm_state",JSON.stringify(o));const c=decodeURIComponent(window.location.href);i.isEmpty(o)?(r=c.replace(/(wm_state=).*?(&|$)/,"$2"),i.includes(["&","?"],r.charAt(r.length-1))&&(r=r.replace(r.charAt(r.length-1),""))):r=c.replace(/(wm_state=).*?(&|$)/,"$1"+this.jsonToUri(o)+"$2"),window.history.replaceState({path:r},"",r)}jsonToUri(e){return encodeURIComponent(JSON.stringify(e).replace(/[()'~_!*]/g,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}).replace(/\{/g,"(").replace(/\}/g,")").replace(/"/g,"'").replace(/\:/g,"~").replace(/,/g,"_").replace(/\[/g,"!").replace(/\]/g,"*"))}uriToJson(e){let t;try{t=JSON.parse(decodeURIComponent(e).replace(/\(/g,"{").replace(/\)/g,"}").replace(/'/g,'"').replace(/~/g,":").replace(/_/g,",").replace(/\!/g,"[").replace(/\*/g,"]"))}catch(e){console.warn(e)}return t}static{this.\u0275fac=g.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:g,type:en,deps:[],target:g.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=g.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:g,type:en,providedIn:"root"})}}g.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:g,type:en,decorators:[{type:r.Injectable,args:[{providedIn:"root"}]}]});class tn{updateFieldsOnPagination(e,t){let i,n="wm-table"===e.widgetType?e.gridData:e.fieldDefs;"wm-table"===e.widgetType&&e.gridOptions.isNavTypeScrollOrOndemand()&&-1!==e.gridOptions.deletedRowIndex&&(n.splice(e.gridOptions.deletedRowIndex,1),e.gridOptions.setDeletedRowIndex(-1)),"wm-table"!==e.widgetType||!e.gridOptions.isNavTypeScrollOrOndemand()||e.gridOptions.lastActionPerformed!==e.gridOptions.ACTIONS.SEARCH_OR_SORT&&e.gridOptions.lastActionPerformed!==e.gridOptions.ACTIONS.FILTER_CRITERIA&&e.gridOptions.lastActionPerformed!==e.gridOptions.ACTIONS.DATASET_UPDATE||(n=[],e.gridOptions.setCurrentPage(1)),i="wm-table"===e.widgetType&&e.gridOptions.showviewlessbutton&&"viewless"===e.gridOptions.mode?e.gridOptions.getCurrentPage():e.currentPage;const a=e.dataNavigator,s=e.pagesize;if(!je(n)||a.isFirstPage())n=[],i=1;else if(n.length/s<=a.pageCount){let e,o=[];if(n.length===i*s&&i+1===a.dn.currentPage)o=t,i++;else if(n.length<i*s){n.length===(i-1)*s&&i-1===a.dn.currentPage?t=[]:a.dataSize<i*s?e=a.dataSize-n.length:(e=i*s-n.length,i++);const r=t.length-e;o=t.slice(r)}else n.length===i*s&&i===a.dn.currentPage&&(o=[]);t=o}return n="wm-table"!==e.widgetType||e.gridOptions.lastActionPerformed!==e.gridOptions.ACTIONS.DELETE&&e.gridOptions.lastActionPerformed!==e.gridOptions.ACTIONS.EDIT?[...n,...t]:this.getUniqueRecordsInFieldDef(n,t),[n,i]}getUniqueRecordsInFieldDef(e,t){let n=!1;return e.length?t.forEach(function(t){n=!1,e.forEach(function(e){i.isEqual(t,e)&&(n=!0)}),!1===n&&e.push(t)}):e=t,e}bindScrollEvt(e,t,i){const n=e.dataNavigator,a=e.$element.find(t),s=a.children().first(),o=this;let r,l;if(!s.length)return;r=s.scrollParent(!1),l=r[0]===document?document.body:r[0];"row"===e.direction?this.bindHorizontalScrollEvt(e,r,a,l,n,i,o):this.bindVerticalScrollEvt(e,r,a,l,n,i,o)}bindHorizontalScrollEvt(e,t,i,n,a,s,o){if(n.scrollWidth>n.clientWidth){let n=0;t.each((e,t)=>{n=t===document?$(window).scrollLeft():t.scrollLeft}).off("scroll.scroll_evt_horizontal").on("scroll.scroll_evt_horizontal",function(t){let i,r,l,c=t.target;c=c===document?c.scrollingElement||document.body:c,"wm-table"===e.widgetType&&e.gridOptions.isNavTypeScrollOrOndemand()&&t.stopPropagation(),i=c.clientWidth,r=c.scrollWidth,l=c===document.body?$(window).scrollLeft():c.scrollLeft,n<l&&.9*r<l+i&&($(this).off("scroll.scroll_evt_horizontal"),o.debouncedFetchNextDatasetOnScroll(a,s,e)()),n=l}),i.off("wheel.scroll_evt_horizontal")}else i.on("wheel.scroll_evt_horizontal",t=>{"wm-table"===e.widgetType&&e.gridOptions.isNavTypeScrollOrOndemand()&&t.stopPropagation(),t.originalEvent.deltaX>0&&(i.off("wheel.scroll_evt_horizontal"),this.debouncedFetchNextDatasetOnScroll(a,s,e)())})}bindVerticalScrollEvt(e,t,i,n,a,s,o){if(n.scrollHeight>n.clientHeight){let n=0;t.each((e,t)=>{n=t===document?t.body.scrollTop||$(window).scrollTop():t.scrollTop}).off("scroll.scroll_evt").on("scroll.scroll_evt",function(t){let i,r,l,c=t.target;c=c===document?c.scrollingElement||document.body:c,"wm-table"===e.widgetType&&e.gridOptions.isNavTypeScrollOrOndemand()&&t.stopPropagation(),i=c.clientHeight,r=c.scrollHeight,l=c===document.body?$(window).scrollTop():c.scrollTop,n<l&&.9*r<l+i&&($(this).off("scroll.scroll_evt"),o.debouncedFetchNextDatasetOnScroll(a,s,e)()),n=l}),i.off("wheel.scroll_evt")}else i.on("wheel.scroll_evt",t=>{"wm-table"===e.widgetType&&e.gridOptions.isNavTypeScrollOrOndemand()&&t.stopPropagation(),t.originalEvent.deltaY>0&&(i.off("wheel.scroll_evt"),this.debouncedFetchNextDatasetOnScroll(a,s,e)())})}debouncedFetchNextDatasetOnScroll(e,t,n){return i.debounce(()=>this.fetchNextDatasetOnScroll(e,n),t)}fetchNextDatasetOnScroll(e,t){t.variableInflight||("wm-table"===t.widgetType&&(t.gridOptions.setIsNextPageData(!0),t.gridOptions.setIsDataUpdatedByUser(!1)),e.navigatePage("next"))}bindIScrollEvt(e,t){const n=e.$element,a=e.dataNavigator,s=e.app,o=n.closest('[wmsmoothscroll="true"]');if(!i.get(o[0],"iscroll")){const e=s.subscribe("iscroll-update",n=>{!i.isEmpty(n)&&n.isSameNode(o[0])&&(this.setIscrollHandlers(o[0],a,t),e())});return void s.notify("no-iscroll",o[0])}this.setIscrollHandlers(o[0],a,t)}setIscrollHandlers(e,t,i){"row"===$(e).find("[wmList]").first().attr("direction")?this.setHorizontalIscrollHandlers(e,t,i,parent):this.setVerticalIscrollHandlers(e,t,i,parent)}setHorizontalIscrollHandlers(e,t,n,a){let s=0;const o=i.get(e.iscroll,"wrapper"),r=e.iscroll;e.iscroll.on("scrollEnd",()=>{const i=o.clientWidth,l=o.scrollWidth,c=Math.abs(e.iscroll.x);s<c&&.9*l<c+i&&(this.debouncedFetchNextDatasetOnScroll(t,n,a)(),r.indicatorRefresh&&r.indicatorRefresh()),s=c})}setVerticalIscrollHandlers(e,t,n,a){let s=0;const o=i.get(e.iscroll,"wrapper"),r=e.iscroll;e.iscroll.on("scrollEnd",()=>{const i=o.clientHeight,l=o.scrollHeight,c=Math.abs(e.iscroll.y);s<c&&.9*l<c+i&&(this.debouncedFetchNextDatasetOnScroll(t,n,a)(),r.indicatorRefresh&&r.indicatorRefresh()),s=c})}static{this.\u0275fac=g.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:g,type:tn,deps:[],target:g.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=g.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:g,type:tn,providedIn:"root"})}}g.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:g,type:tn,decorators:[{type:r.Injectable,args:[{providedIn:"root"}]}]});e.$appDigest=Ee,e.$invokeWatchers=Oe,e.$parseEvent=ee,e.$parseExpr=Z,e.$unwatch=ge,e.$watch=ue,e.AbstractDialogService=class{},e.AbstractHttpService=class{},e.AbstractI18nService=class{},e.AbstractNavigationService=class{},e.AbstractSpinnerService=class{},e.AbstractToasterService=class{},e.App=class{},e.AppConstants=ii,e.AppDefaults=class{},e.CURRENCY_INFO={USD:{symbol:"$",name:"US Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"USD",name_plural:"US dollars"},CAD:{symbol:"CA$",name:"Canadian Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"CAD",name_plural:"Canadian dollars"},EUR:{symbol:"\u20ac",name:"Euro",symbol_native:"\u20ac",decimal_digits:2,rounding:0,code:"EUR",name_plural:"euros"},AED:{symbol:"AED",name:"United Arab Emirates Dirham",symbol_native:"\u062f.\u0625.\u200f",decimal_digits:2,rounding:0,code:"AED",name_plural:"UAE dirhams"},AFN:{symbol:"Af",name:"Afghan Afghani",symbol_native:"\u060b",decimal_digits:0,rounding:0,code:"AFN",name_plural:"Afghan Afghanis"},ALL:{symbol:"ALL",name:"Albanian Lek",symbol_native:"Lek",decimal_digits:0,rounding:0,code:"ALL",name_plural:"Albanian lek\xeb"},AMD:{symbol:"AMD",name:"Armenian Dram",symbol_native:"\u0564\u0580.",decimal_digits:0,rounding:0,code:"AMD",name_plural:"Armenian drams"},ARS:{symbol:"AR$",name:"Argentine Peso",symbol_native:"$",decimal_digits:2,rounding:0,code:"ARS",name_plural:"Argentine pesos"},AUD:{symbol:"AU$",name:"Australian Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"AUD",name_plural:"Australian dollars"},AZN:{symbol:"man.",name:"Azerbaijani Manat",symbol_native:"\u043c\u0430\u043d.",decimal_digits:2,rounding:0,code:"AZN",name_plural:"Azerbaijani manats"},BAM:{symbol:"KM",name:"Bosnia-Herzegovina Convertible Mark",symbol_native:"KM",decimal_digits:2,rounding:0,code:"BAM",name_plural:"Bosnia-Herzegovina convertible marks"},BDT:{symbol:"Tk",name:"Bangladeshi Taka",symbol_native:"\u09f3",decimal_digits:2,rounding:0,code:"BDT",name_plural:"Bangladeshi takas"},BGN:{symbol:"BGN",name:"Bulgarian Lev",symbol_native:"\u043b\u0432.",decimal_digits:2,rounding:0,code:"BGN",name_plural:"Bulgarian leva"},BHD:{symbol:"BD",name:"Bahraini Dinar",symbol_native:"\u062f.\u0628.\u200f",decimal_digits:3,rounding:0,code:"BHD",name_plural:"Bahraini dinars"},BIF:{symbol:"FBu",name:"Burundian Franc",symbol_native:"FBu",decimal_digits:0,rounding:0,code:"BIF",name_plural:"Burundian francs"},BND:{symbol:"BN$",name:"Brunei Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"BND",name_plural:"Brunei dollars"},BOB:{symbol:"Bs",name:"Bolivian Boliviano",symbol_native:"Bs",decimal_digits:2,rounding:0,code:"BOB",name_plural:"Bolivian bolivianos"},BRL:{symbol:"R$",name:"Brazilian Real",symbol_native:"R$",decimal_digits:2,rounding:0,code:"BRL",name_plural:"Brazilian reals"},BWP:{symbol:"BWP",name:"Botswanan Pula",symbol_native:"P",decimal_digits:2,rounding:0,code:"BWP",name_plural:"Botswanan pulas"},BYR:{symbol:"BYR",name:"Belarusian Ruble",symbol_native:"BYR",decimal_digits:0,rounding:0,code:"BYR",name_plural:"Belarusian rubles"},BZD:{symbol:"BZ$",name:"Belize Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"BZD",name_plural:"Belize dollars"},CDF:{symbol:"CDF",name:"Congolese Franc",symbol_native:"FrCD",decimal_digits:2,rounding:0,code:"CDF",name_plural:"Congolese francs"},CHF:{symbol:"CHF",name:"Swiss Franc",symbol_native:"CHF",decimal_digits:2,rounding:.05,code:"CHF",name_plural:"Swiss francs"},CLP:{symbol:"CL$",name:"Chilean Peso",symbol_native:"$",decimal_digits:0,rounding:0,code:"CLP",name_plural:"Chilean pesos"},CNY:{symbol:"CN\xa5",name:"Chinese Yuan",symbol_native:"CN\xa5",decimal_digits:2,rounding:0,code:"CNY",name_plural:"Chinese yuan"},COP:{symbol:"CO$",name:"Colombian Peso",symbol_native:"$",decimal_digits:0,rounding:0,code:"COP",name_plural:"Colombian pesos"},CRC:{symbol:"\u20a1",name:"Costa Rican Col\xf3n",symbol_native:"\u20a1",decimal_digits:0,rounding:0,code:"CRC",name_plural:"Costa Rican col\xf3ns"},CVE:{symbol:"CV$",name:"Cape Verdean Escudo",symbol_native:"CV$",decimal_digits:2,rounding:0,code:"CVE",name_plural:"Cape Verdean escudos"},CZK:{symbol:"K\u010d",name:"Czech Republic Koruna",symbol_native:"K\u010d",decimal_digits:2,rounding:0,code:"CZK",name_plural:"Czech Republic korunas"},DJF:{symbol:"Fdj",name:"Djiboutian Franc",symbol_native:"Fdj",decimal_digits:0,rounding:0,code:"DJF",name_plural:"Djiboutian francs"},DKK:{symbol:"Dkr",name:"Danish Krone",symbol_native:"kr",decimal_digits:2,rounding:0,code:"DKK",name_plural:"Danish kroner"},DOP:{symbol:"RD$",name:"Dominican Peso",symbol_native:"RD$",decimal_digits:2,rounding:0,code:"DOP",name_plural:"Dominican pesos"},DZD:{symbol:"DA",name:"Algerian Dinar",symbol_native:"\u062f.\u062c.\u200f",decimal_digits:2,rounding:0,code:"DZD",name_plural:"Algerian dinars"},EEK:{symbol:"Ekr",name:"Estonian Kroon",symbol_native:"kr",decimal_digits:2,rounding:0,code:"EEK",name_plural:"Estonian kroons"},EGP:{symbol:"EGP",name:"Egyptian Pound",symbol_native:"\u062c.\u0645.\u200f",decimal_digits:2,rounding:0,code:"EGP",name_plural:"Egyptian pounds"},ERN:{symbol:"Nfk",name:"Eritrean Nakfa",symbol_native:"Nfk",decimal_digits:2,rounding:0,code:"ERN",name_plural:"Eritrean nakfas"},ETB:{symbol:"Br",name:"Ethiopian Birr",symbol_native:"Br",decimal_digits:2,rounding:0,code:"ETB",name_plural:"Ethiopian birrs"},GBP:{symbol:"\xa3",name:"British Pound Sterling",symbol_native:"\xa3",decimal_digits:2,rounding:0,code:"GBP",name_plural:"British pounds sterling"},GEL:{symbol:"GEL",name:"Georgian Lari",symbol_native:"GEL",decimal_digits:2,rounding:0,code:"GEL",name_plural:"Georgian laris"},GHS:{symbol:"GH\u20b5",name:"Ghanaian Cedi",symbol_native:"GH\u20b5",decimal_digits:2,rounding:0,code:"GHS",name_plural:"Ghanaian cedis"},GNF:{symbol:"FG",name:"Guinean Franc",symbol_native:"FG",decimal_digits:0,rounding:0,code:"GNF",name_plural:"Guinean francs"},GTQ:{symbol:"GTQ",name:"Guatemalan Quetzal",symbol_native:"Q",decimal_digits:2,rounding:0,code:"GTQ",name_plural:"Guatemalan quetzals"},HKD:{symbol:"HK$",name:"Hong Kong Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"HKD",name_plural:"Hong Kong dollars"},HNL:{symbol:"HNL",name:"Honduran Lempira",symbol_native:"L",decimal_digits:2,rounding:0,code:"HNL",name_plural:"Honduran lempiras"},HRK:{symbol:"kn",name:"Croatian Kuna",symbol_native:"kn",decimal_digits:2,rounding:0,code:"HRK",name_plural:"Croatian kunas"},HUF:{symbol:"Ft",name:"Hungarian Forint",symbol_native:"Ft",decimal_digits:0,rounding:0,code:"HUF",name_plural:"Hungarian forints"},IDR:{symbol:"Rp",name:"Indonesian Rupiah",symbol_native:"Rp",decimal_digits:0,rounding:0,code:"IDR",name_plural:"Indonesian rupiahs"},ILS:{symbol:"\u20aa",name:"Israeli New Sheqel",symbol_native:"\u20aa",decimal_digits:2,rounding:0,code:"ILS",name_plural:"Israeli new sheqels"},INR:{symbol:"\u20b9",name:"Indian Rupee",symbol_native:"\u099f\u0995\u09be",decimal_digits:2,rounding:0,code:"INR",name_plural:"Indian rupees"},IQD:{symbol:"IQD",name:"Iraqi Dinar",symbol_native:"\u062f.\u0639.\u200f",decimal_digits:0,rounding:0,code:"IQD",name_plural:"Iraqi dinars"},IRR:{symbol:"IRR",name:"Iranian Rial",symbol_native:"\ufdfc",decimal_digits:0,rounding:0,code:"IRR",name_plural:"Iranian rials"},ISK:{symbol:"Ikr",name:"Icelandic Kr\xf3na",symbol_native:"kr",decimal_digits:0,rounding:0,code:"ISK",name_plural:"Icelandic kr\xf3nur"},JMD:{symbol:"J$",name:"Jamaican Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"JMD",name_plural:"Jamaican dollars"},JOD:{symbol:"JD",name:"Jordanian Dinar",symbol_native:"\u062f.\u0623.\u200f",decimal_digits:3,rounding:0,code:"JOD",name_plural:"Jordanian dinars"},JPY:{symbol:"\xa5",name:"Japanese Yen",symbol_native:"\uffe5",decimal_digits:0,rounding:0,code:"JPY",name_plural:"Japanese yen"},KES:{symbol:"Ksh",name:"Kenyan Shilling",symbol_native:"Ksh",decimal_digits:2,rounding:0,code:"KES",name_plural:"Kenyan shillings"},KHR:{symbol:"KHR",name:"Cambodian Riel",symbol_native:"\u17db",decimal_digits:2,rounding:0,code:"KHR",name_plural:"Cambodian riels"},KMF:{symbol:"CF",name:"Comorian Franc",symbol_native:"FC",decimal_digits:0,rounding:0,code:"KMF",name_plural:"Comorian francs"},KRW:{symbol:"\u20a9",name:"South Korean Won",symbol_native:"\u20a9",decimal_digits:0,rounding:0,code:"KRW",name_plural:"South Korean won"},KWD:{symbol:"KD",name:"Kuwaiti Dinar",symbol_native:"\u062f.\u0643.\u200f",decimal_digits:3,rounding:0,code:"KWD",name_plural:"Kuwaiti dinars"},KZT:{symbol:"KZT",name:"Kazakhstani Tenge",symbol_native:"\u0442\u04a3\u0433.",decimal_digits:2,rounding:0,code:"KZT",name_plural:"Kazakhstani tenges"},LBP:{symbol:"LB\xa3",name:"Lebanese Pound",symbol_native:"\u0644.\u0644.\u200f",decimal_digits:0,rounding:0,code:"LBP",name_plural:"Lebanese pounds"},LKR:{symbol:"SLRs",name:"Sri Lankan Rupee",symbol_native:"SL Re",decimal_digits:2,rounding:0,code:"LKR",name_plural:"Sri Lankan rupees"},LTL:{symbol:"Lt",name:"Lithuanian Litas",symbol_native:"Lt",decimal_digits:2,rounding:0,code:"LTL",name_plural:"Lithuanian litai"},LVL:{symbol:"Ls",name:"Latvian Lats",symbol_native:"Ls",decimal_digits:2,rounding:0,code:"LVL",name_plural:"Latvian lati"},LYD:{symbol:"LD",name:"Libyan Dinar",symbol_native:"\u062f.\u0644.\u200f",decimal_digits:3,rounding:0,code:"LYD",name_plural:"Libyan dinars"},MAD:{symbol:"MAD",name:"Moroccan Dirham",symbol_native:"\u062f.\u0645.\u200f",decimal_digits:2,rounding:0,code:"MAD",name_plural:"Moroccan dirhams"},MDL:{symbol:"MDL",name:"Moldovan Leu",symbol_native:"MDL",decimal_digits:2,rounding:0,code:"MDL",name_plural:"Moldovan lei"},MGA:{symbol:"MGA",name:"Malagasy Ariary",symbol_native:"MGA",decimal_digits:0,rounding:0,code:"MGA",name_plural:"Malagasy Ariaries"},MKD:{symbol:"MKD",name:"Macedonian Denar",symbol_native:"MKD",decimal_digits:2,rounding:0,code:"MKD",name_plural:"Macedonian denari"},MMK:{symbol:"MMK",name:"Myanma Kyat",symbol_native:"K",decimal_digits:0,rounding:0,code:"MMK",name_plural:"Myanma kyats"},MOP:{symbol:"MOP$",name:"Macanese Pataca",symbol_native:"MOP$",decimal_digits:2,rounding:0,code:"MOP",name_plural:"Macanese patacas"},MUR:{symbol:"MURs",name:"Mauritian Rupee",symbol_native:"MURs",decimal_digits:0,rounding:0,code:"MUR",name_plural:"Mauritian rupees"},MXN:{symbol:"MX$",name:"Mexican Peso",symbol_native:"$",decimal_digits:2,rounding:0,code:"MXN",name_plural:"Mexican pesos"},MYR:{symbol:"RM",name:"Malaysian Ringgit",symbol_native:"RM",decimal_digits:2,rounding:0,code:"MYR",name_plural:"Malaysian ringgits"},MZN:{symbol:"MTn",name:"Mozambican Metical",symbol_native:"MTn",decimal_digits:2,rounding:0,code:"MZN",name_plural:"Mozambican meticals"},NAD:{symbol:"N$",name:"Namibian Dollar",symbol_native:"N$",decimal_digits:2,rounding:0,code:"NAD",name_plural:"Namibian dollars"},NGN:{symbol:"\u20a6",name:"Nigerian Naira",symbol_native:"\u20a6",decimal_digits:2,rounding:0,code:"NGN",name_plural:"Nigerian nairas"},NIO:{symbol:"C$",name:"Nicaraguan C\xf3rdoba",symbol_native:"C$",decimal_digits:2,rounding:0,code:"NIO",name_plural:"Nicaraguan c\xf3rdobas"},NOK:{symbol:"Nkr",name:"Norwegian Krone",symbol_native:"kr",decimal_digits:2,rounding:0,code:"NOK",name_plural:"Norwegian kroner"},NPR:{symbol:"NPRs",name:"Nepalese Rupee",symbol_native:"\u0928\u0947\u0930\u0942",decimal_digits:2,rounding:0,code:"NPR",name_plural:"Nepalese rupees"},NZD:{symbol:"NZ$",name:"New Zealand Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"NZD",name_plural:"New Zealand dollars"},OMR:{symbol:"OMR",name:"Omani Rial",symbol_native:"\u0631.\u0639.\u200f",decimal_digits:3,rounding:0,code:"OMR",name_plural:"Omani rials"},PAB:{symbol:"B/.",name:"Panamanian Balboa",symbol_native:"B/.",decimal_digits:2,rounding:0,code:"PAB",name_plural:"Panamanian balboas"},PEN:{symbol:"S/.",name:"Peruvian Nuevo Sol",symbol_native:"S/.",decimal_digits:2,rounding:0,code:"PEN",name_plural:"Peruvian nuevos soles"},PHP:{symbol:"\u20b1",name:"Philippine Peso",symbol_native:"\u20b1",decimal_digits:2,rounding:0,code:"PHP",name_plural:"Philippine pesos"},PKR:{symbol:"PKRs",name:"Pakistani Rupee",symbol_native:"\u20a8",decimal_digits:0,rounding:0,code:"PKR",name_plural:"Pakistani rupees"},PLN:{symbol:"z\u0142",name:"Polish Zloty",symbol_native:"z\u0142",decimal_digits:2,rounding:0,code:"PLN",name_plural:"Polish zlotys"},PYG:{symbol:"\u20b2",name:"Paraguayan Guarani",symbol_native:"\u20b2",decimal_digits:0,rounding:0,code:"PYG",name_plural:"Paraguayan guaranis"},QAR:{symbol:"QR",name:"Qatari Rial",symbol_native:"\u0631.\u0642.\u200f",decimal_digits:2,rounding:0,code:"QAR",name_plural:"Qatari rials"},RON:{symbol:"RON",name:"Romanian Leu",symbol_native:"RON",decimal_digits:2,rounding:0,code:"RON",name_plural:"Romanian lei"},RSD:{symbol:"din.",name:"Serbian Dinar",symbol_native:"\u0434\u0438\u043d.",decimal_digits:0,rounding:0,code:"RSD",name_plural:"Serbian dinars"},RUB:{symbol:"RUB",name:"Russian Ruble",symbol_native:"\u0440\u0443\u0431.",decimal_digits:2,rounding:0,code:"RUB",name_plural:"Russian rubles"},RWF:{symbol:"RWF",name:"Rwandan Franc",symbol_native:"FR",decimal_digits:0,rounding:0,code:"RWF",name_plural:"Rwandan francs"},SAR:{symbol:"SR",name:"Saudi Riyal",symbol_native:"\u0631.\u0633.\u200f",decimal_digits:2,rounding:0,code:"SAR",name_plural:"Saudi riyals"},SDG:{symbol:"SDG",name:"Sudanese Pound",symbol_native:"SDG",decimal_digits:2,rounding:0,code:"SDG",name_plural:"Sudanese pounds"},SEK:{symbol:"Skr",name:"Swedish Krona",symbol_native:"kr",decimal_digits:2,rounding:0,code:"SEK",name_plural:"Swedish kronor"},SGD:{symbol:"S$",name:"Singapore Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"SGD",name_plural:"Singapore dollars"},SOS:{symbol:"Ssh",name:"Somali Shilling",symbol_native:"Ssh",decimal_digits:0,rounding:0,code:"SOS",name_plural:"Somali shillings"},SYP:{symbol:"SY\xa3",name:"Syrian Pound",symbol_native:"\u0644.\u0633.\u200f",decimal_digits:0,rounding:0,code:"SYP",name_plural:"Syrian pounds"},THB:{symbol:"\u0e3f",name:"Thai Baht",symbol_native:"\u0e3f",decimal_digits:2,rounding:0,code:"THB",name_plural:"Thai baht"},TND:{symbol:"DT",name:"Tunisian Dinar",symbol_native:"\u062f.\u062a.\u200f",decimal_digits:3,rounding:0,code:"TND",name_plural:"Tunisian dinars"},TOP:{symbol:"T$",name:"Tongan Pa\u02bbanga",symbol_native:"T$",decimal_digits:2,rounding:0,code:"TOP",name_plural:"Tongan pa\u02bbanga"},TRY:{symbol:"TL",name:"Turkish Lira",symbol_native:"TL",decimal_digits:2,rounding:0,code:"TRY",name_plural:"Turkish Lira"},TTD:{symbol:"TT$",name:"Trinidad and Tobago Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"TTD",name_plural:"Trinidad and Tobago dollars"},TWD:{symbol:"NT$",name:"New Taiwan Dollar",symbol_native:"NT$",decimal_digits:2,rounding:0,code:"TWD",name_plural:"New Taiwan dollars"},TZS:{symbol:"TSh",name:"Tanzanian Shilling",symbol_native:"TSh",decimal_digits:0,rounding:0,code:"TZS",name_plural:"Tanzanian shillings"},UAH:{symbol:"\u20b4",name:"Ukrainian Hryvnia",symbol_native:"\u20b4",decimal_digits:2,rounding:0,code:"UAH",name_plural:"Ukrainian hryvnias"},UGX:{symbol:"USh",name:"Ugandan Shilling",symbol_native:"USh",decimal_digits:0,rounding:0,code:"UGX",name_plural:"Ugandan shillings"},UYU:{symbol:"$U",name:"Uruguayan Peso",symbol_native:"$",decimal_digits:2,rounding:0,code:"UYU",name_plural:"Uruguayan pesos"},UZS:{symbol:"UZS",name:"Uzbekistan Som",symbol_native:"UZS",decimal_digits:0,rounding:0,code:"UZS",name_plural:"Uzbekistan som"},VEF:{symbol:"Bs.F.",name:"Venezuelan Bol\xedvar",symbol_native:"Bs.F.",decimal_digits:2,rounding:0,code:"VEF",name_plural:"Venezuelan bol\xedvars"},VND:{symbol:"\u20ab",name:"Vietnamese Dong",symbol_native:"\u20ab",decimal_digits:0,rounding:0,code:"VND",name_plural:"Vietnamese dong"},XAF:{symbol:"FCFA",name:"CFA Franc BEAC",symbol_native:"FCFA",decimal_digits:0,rounding:0,code:"XAF",name_plural:"CFA francs BEAC"},XOF:{symbol:"CFA",name:"CFA Franc BCEAO",symbol_native:"CFA",decimal_digits:0,rounding:0,code:"XOF",name_plural:"CFA francs BCEAO"},YER:{symbol:"YR",name:"Yemeni Rial",symbol_native:"\u0631.\u064a.\u200f",decimal_digits:0,rounding:0,code:"YER",name_plural:"Yemeni rials"},ZAR:{symbol:"R",name:"South African Rand",symbol_native:"R",decimal_digits:2,rounding:0,code:"ZAR",name_plural:"South African rand"},ZMK:{symbol:"ZK",name:"Zambian Kwacha",symbol_native:"ZK",decimal_digits:0,rounding:0,code:"ZMK",name_plural:"Zambian kwachas"}},e.ConstantService=Ui,e.CustomIconsLoaderService=Ji,e.CustomPipeManager=Zi,e.CustomWidgetRefProvider=class{},e.DataSource=xe,e.DynamicComponentRefProvider=class{},e.EventNotifier=Gi,e.FIRST_TIME_WATCH=le,e.FieldTypeService=Yi,e.FieldWidgetService=Xi,e.IDGenerator=x,e.IDataSource=class{},e.LRUCache=class{constructor(e=100,t=60,i){this.maxSize=e,this.maxAge=t,this.onEvict=i,this.cache=new Map,this.evictQueue=[""],this.evictionIntervalId=null,this.evictQueue.shift(),this.maxAge>0&&(this.maxAge<=30&&console.warn(`Cache age ${this.maxAge}s is very less. Keep it atleast 30s.`),this.maxAge=1e3*this.maxAge,this.evictionIntervalId=window.setInterval(()=>{const e=Date.now()-this.maxAge,t=this.evictQueue.filter(t=>this.cache.get(t).lastAccessedTime<=e);this.evict(t.length)},this.maxAge))}addToEvictQueue(e){const t=this.evictQueue.findIndex(t=>t===e);t>=0&&this.evictQueue.splice(t,1),this.evictQueue.push(e)}evict(e=1){for(let t=0;t<e;t++)this.delete(this.evictQueue[0])}keys(){return this.cache.keys()}set(e,t){if(i.isNil(t))return;const n={instance:t,lastAccessedTime:Date.now()};this.cache.set(e,n),this.addToEvictQueue(e),this.evict(this.evictQueue.length-this.maxSize)}get(e){const t=this.cache.get(e);return t?(t.lastAccessedTime=Date.now(),this.addToEvictQueue(e),t.instance):null}delete(e){if(e&&this.cache.has(e)){const t=this.cache.get(e);this.cache.delete(e),this.onEvict&&this.onEvict(e,t.instance);const i=this.evictQueue.findIndex(t=>t===e);i>=0&&this.evictQueue.splice(i,1)}}has(e){return this.cache.has(e)}size(){return this.evictQueue.length}clear(){this.evict(this.evictQueue.length)}destroy(){null!==this.evictionIntervalId&&(clearInterval(this.evictionIntervalId),this.evictionIntervalId=null),this.clear()}},e.PaginationService=tn,e.PartialRefProvider=class{},e.ScriptLoaderService=Qi,e.ScriptStore=Ki,e.StatePersistence=en,e.UserDefinedExecutionContext=class{},e.UtilsService=Hi,e.VALIDATOR=Ai,e.Viewport=zi,e._WM_APP_PROJECT=Qt,e.addClass=I,e.addEventListenerOnElement=Tt,e.addForIdAttributes=Pi,e.adjustContainerPosition=Ci,e.adjustContainerRightEdges=Ti,e.adjustVerticalPosition=Vi,e.appendNode=(e,t,i)=>{const n=()=>t.appendChild(e);i?n():T(n)},e.appendScriptToHead=Ni,e.checkIsCustomPipeExpression=b,e.closePopover=Di,e.convertToBlob=ti,e.createCSSRule=li,e.createElement=(e,t,i)=>{const n=document.createElement(e);return t&&Object.keys(t).forEach(e=>{E(n,e,t[e],i)}),n},e.deHyphenate=lt,e.debounce=pe,e.defer=mi,e.detectChanges=Ei,e.encodeUrl=tt,e.encodeUrlParams=it,e.executePromiseChain=hi,e.extendProto=fi,e.extractCurrentItemExpr=_i,e.extractType=At,e.fetchContent=ai,e.findParent=Fi,e.findRootContainer=xi,e.findValueOf=xt,e.generateGUId=Et,e.getAbortableDefer=ri,e.getAndroidVersion=Je,e.getAppSetting=Mi,e.getBlob=Wt,e.getClonedObject=Ot,e.getDatasourceFromExpr=Si,e.getDateObj=Ct,e.getDisplayDateTimeFormat=wi,e.getEvaluatedExprValue=mt,e.getFiles=It,e.getFnByExpr=ie,e.getFnForBindExpr=ae,e.getFnForEventExpr=se,e.getFormWidgetTemplate=(t,i,n,a={})=>{let s;const o=n.get("updateon"),r=o?`updateon="${o}"`:"",l=n.get("showineditmode")||n.get("showineditmode.bind")||!0,c="false"==l?`show="${l}"`:`show.bind="${l}"`;switch(t){case e.FormWidgetType.AUTOCOMPLETE:case e.FormWidgetType.TYPEAHEAD:s=`<div wmSearch type="autocomplete" debouncetime="${n.get("debouncetime")}" ${i} ${c}></div>`;break;case e.FormWidgetType.CHECKBOX:s=`<div wmCheckbox ${i} ${"true"===n.get("required")?"required=true":""} ${c}></div>`;break;case e.FormWidgetType.CHECKBOXSET:s=`<ul role="group" wmCheckboxset ${i} ${"true"===n.get("required")?"required=true":""} ${c}></ul>`;break;case e.FormWidgetType.CHIPS:s=`<ul wmChips debouncetime="${n.get("debouncetime")}" ${i} ${c}></ul>`;break;case e.FormWidgetType.COLORPICKER:s=`<div wmColorPicker ${"true"===n.get("required")?"required=true":""} ${i} ${c}></div>`;break;case e.FormWidgetType.CURRENCY:s=`<div wmCurrency ${"true"===n.get("required")?"required=true":""} ${r} ${i} ${c}></div>`;break;case e.FormWidgetType.CUSTOMWIDGET:s=`<div wmWidgetContainer customWidgetContainer ${"true"===n.get("required")?"required=true":""} ${r} ${i} ${c}></div>`;break;case e.FormWidgetType.DATE:s=`<div wmDate ${"true"===n.get("required")?"required=true":""} dataentrymode="${n.get("dataentrymode")}" ${i} ${c}></div>`;break;case e.FormWidgetType.DATETIME:s=`<div wmDateTime ${"true"===n.get("required")?"required=true":""} dataentrymode="${n.get("dataentrymode")}" ${i} ${c}></div>`;break;case e.FormWidgetType.NUMBER:s=`<div wmNumber ${i} ${"true"===n.get("required")?"required=true":""} type="number" ${r} ${c}></div>`;break;case e.FormWidgetType.PASSWORD:s=`<wm-input ${i} ${"true"===n.get("required")?"required=true":""} type="password" ${r} ${c}></wm-input>`;break;case e.FormWidgetType.RADIOSET:s=`<ul role="radiogroup" wmRadioset ${i} ${c}></ul>`;break;case e.FormWidgetType.RATING:s=`<div wmRating ${i} ${c}></div>`;break;case e.FormWidgetType.RICHTEXT:s=`<div wmRichTextEditor role="textbox" ${i} ${c}></div>`;break;case e.FormWidgetType.SELECT:s=`<wm-select ${"true"===n.get("required")?"required=true":""} ${i} ${c}></wm-select>`;break;case e.FormWidgetType.TOGGLE:s=`<div wmCheckbox ${i} ${"true"===n.get("required")?"required=true":""} type="toggle" ${c}></div>`;break;case e.FormWidgetType.ICONBUTTONTOGGLE:s=`<div wmCheckbox ${i} ${"true"===n.get("required")?"required=true":""} type="button" ${c}></div>`;break;case e.FormWidgetType.SLIDER:s=`<div wmSlider ${i} ${c}></div>`;break;case e.FormWidgetType.SWITCH:s=`<div wmSwitch ${i} ${c}></div>`;break;case e.FormWidgetType.TEXT:const t=a.inputType||"inputtype";s=`<wm-input ${i} ${"true"===n.get("required")?"required=true":""} type="${n.get(t)||"text"}" ${r} ${c}></wm-input>`;break;case e.FormWidgetType.TEXTAREA:s=`<wm-textarea ${i} ${"true"===n.get("required")?"required=true":""} ${r} ${c}></wm-textarea>`;break;case e.FormWidgetType.TIME:s=`<div wmTime ${"true"===n.get("required")?"required=true":""} dataentrymode="${n.get("dataentrymode")}" ${i} ${c}></div>`;break;case e.FormWidgetType.TIMESTAMP:s=`<div wmDateTime ${"true"===n.get("required")?"required=true":""} dataentrymode="${n.get("dataentrymode")}" ${i} ${c}></div>`;break;case e.FormWidgetType.UPLOAD:const o=a.counter,l=a.pCounter,d=a.uploadProps,p=((e,t,i)=>{let n="";return e.forEach((e,a)=>{if(a&&a.endsWith(".event")){const e=a.split(".")[0];n=` ${n} (${e})="${t?`${t}.`:""}triggerUploadEvent($event, '${e}', '${i}', row)" `}}),n})(n,o,d&&d.name);s=d?`<form name="${d.formName}" ${i}>\n <input focus-target class="file-upload" type="file" name="${d.name}" ${p} ${c}/>\n </form>`:`@if (${o}.filetype === 'image' && ${o}.href) {\n <a class="form-control-static" href="{{${o}.href}}" target="_blank">\n <img style="height:2em" class="wi wi-file" [src]="${o}.href"/></a>\n }\n @if (${o}.filetype !== 'image' && ${o}.href) {\n <a class="form-control-static" target="_blank" href="{{${o}.href}}">\n <i class="wi wi-file"></i></a>\n }\n <input ${i} class="app-blob-upload" [ngClass]="{'file-readonly': ${o}.readonly}" ${p}\n [required]="${o}.required" type="file" name="${n.get("key")||n.get("name")}_formWidget" [readonly]="${o}.readonly"\n [class.hidden]="!${l}.isUpdateMode" [accept]="${o}.permitted" ${c}>`;break;default:s=`<wm-input ${i} ${"true"===n.get("required")?"required=true":""} type="text" ${r} ${c}></wm-input>`}return s},e.getFormattedDate=wt,e.getMomentLocaleObject=Yt,e.getNativeDateObject=Gt,e.getNavClass=Fe,e.getNgModelAttr=e=>e.has("formControlName")||e.has("formControlName.bind")?"":"ngModel",e.getPreviewProperties=_,e.getRequiredFormWidget=t=>{switch(t){case e.FormWidgetType.AUTOCOMPLETE:case e.FormWidgetType.TYPEAHEAD:return"wm-search";case e.FormWidgetType.CHIPS:return"wm-chips";case e.FormWidgetType.COLORPICKER:return"wm-colorpicker";case e.FormWidgetType.CURRENCY:return"wm-currency";case e.FormWidgetType.CUSTOMWIDGET:return"wm-custom-widget";case e.FormWidgetType.DATE:return"wm-date";case e.FormWidgetType.DATETIME:case e.FormWidgetType.TIMESTAMP:return"wm-datetime";case e.FormWidgetType.TIME:return"wm-time";case e.FormWidgetType.RATING:return"wm-rating";case e.FormWidgetType.RICHTEXT:return"wm-richtexteditor";case e.FormWidgetType.SLIDER:return"wm-slider";case e.FormWidgetType.CHECKBOXSET:return"wm-checkboxset";case e.FormWidgetType.NUMBER:return"wm-number";case e.FormWidgetType.PASSWORD:return"wm-text";case e.FormWidgetType.RADIOSET:return"wm-radioset";case e.FormWidgetType.SWITCH:return"wm-switch";case e.FormWidgetType.SELECT:return"wm-select";case e.FormWidgetType.TEXTAREA:return"wm-textarea";case e.FormWidgetType.CHECKBOX:case e.FormWidgetType.TOGGLE:case e.FormWidgetType.ICONBUTTONTOGGLE:return"wm-checkbox";case e.FormWidgetType.UPLOAD:return"wm-fileupload";default:return"wm-text"}},e.getResourceURL=bt,e.getRouteNameFromLink=di,e.getRowActionAttrs=e=>{let t="";return e.forEach((e,i)=>{const n=w.get(i);n&&(t+=`${n}="${e}" `)}),t},e.getSessionStorageItem=Jt,e.getSheetPositionClass=$e,e.getUrlParams=ci,e.getValidDateObject=Bt,e.getValidJSON=St,e.getWebkitTraslationMatrix=Ii,e.getWmProjectProperties=function(){return window._WM_APP_PROPERTIES?window._WM_APP_PROPERTIES:"undefined"!=typeof _WM_APP_PROPERTIES?_WM_APP_PROPERTIES:R},e.hasOffsetStr=Pt,e.initCaps=nt,e.insertAfter=(e,t,i)=>{const n=()=>t.parentNode.insertBefore(e,t.nextSibling);i?n():T(n)},e.insertBefore=(e,t,i)=>{const n=()=>t.parentNode.insertBefore(e,t);i?n():T(n)},e.isAndroid=We,e.isAndroidTablet=qe,e.isAppleProduct=pi,e.isAudioFile=ut,e.isChangeFromWatch=()=>ve,e.isDataSourceEqual=ui,e.isDateTimeType=jt,e.isDefined=je,e.isElementInViewport=Lt,e.isEmptyObject=Nt,e.isEqualWithFields=qt,e.isFirstTimeChange=e=>e===le,e.isIE=Ge,e.isImageFile=ht,e.isInsecureContentRequest=dt,e.isIos=Ye,e.isIpad=He,e.isIphone=ze,e.isIpod=Ue,e.isKitkatDevice=et,e.isLargeTabletLandscape=Ke,e.isLargeTabletPortrait=Qe,e.isMobile=Ze,e.isNumberType=kt,e.isObject=Ve,e.isPageable=Ft,e.isSafari=Xe,e.isValidImageUrl=ft,e.isValidWebURL=vt,e.isVideoFile=gt,e.loadScript=Xt,e.loadScripts=Kt,e.loadStyleSheet=Ut,e.loadStyleSheets=Ht,e.muteWatchers=()=>{de=!0},e.noop=ei,e.openLink=ni,e.periodSeparate=ot,e.prettifyLabel=rt,e.prettifyLabels=ct,e.processFilterExpBindNode=vi,e.registerFnByExpr=(e,t,i)=>{t.usedPipes=i||[],te.set(e,t)},e.removeAttr=(e,t,i)=>{const n=()=>e.removeAttribute(t);i?n():T(n)},e.removeClass=O,e.removeExtraSlashes=bi,e.removeNode=(e,t)=>{const i=()=>e.remove();t?i():T(i)},e.replace=$t,e.replaceAt=st,e.resetChangeFromWatch=ye,e.retryIfFails=oi,e.scrollToElement=Mt,e.setAppRef=e=>{ce=e},e.setAttr=E,e.setCSS=D,e.setCSSFromObj=(e,t,i)=>{Object.keys(t||{}).forEach(n=>D(e,n,t[n],i))},e.setHtml=(e,t,i)=>{const n=()=>e.innerHTML=t;i?n():T(n)},e.setListClass=Li,e.setNgZone=e=>be=e,e.setPipeProvider=function(e){K=e},e.setPreviewProperties=function(e){Object.assign(S,e)},e.setProperty=(e,t,i,n)=>{const a=()=>e[t]=i;n?a():T(a)},e.setSessionStorageItem=Zt,e.setTranslation3dPosition=Oi,e.setWmProjectProperties=function(e){Object.setPrototypeOf(R,e)},e.spaceSeparate=at,e.stringStartsWith=pt,e.switchClass=(e,t="",i="",n)=>{const a=e.classList.contains("ng-untouched")&&e.classList.contains("ng-valid"),s=t.includes("ng-untouched")&&t.includes("ng-pristine")&&t.includes("ng-invalid");(a&&t.includes("ng-untouched")&&t.includes("ng-invalid")||s)&&(t=t.replace("ng-invalid","")),O(e,i,n),I(e,t,n)},e.toBoolean=Be,e.toDimension=e=>e==+e?`${e}px`:e,e.toPromise=si,e.toggleClass=(e,t,i,n)=>{i?I(e,t,n):O(e,t,n)},e.transformFileURI=ki,e.triggerFn=yt,e.triggerItemAction=Ri,e.unMuteWatchers=()=>{de=!1,Oe(!0)},e.updateTemplateAttrs=y,e.validateAccessRoles=Rt,e.validateDataSourceCtx=gi,e.xmlToJson=_t}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).swipey={})}(this,function(e){"use strict";e.SwipeAnimation=class{bindEvents(){return window.PointerEvent?["pointer"]:["touch"]}bounds(e,t){return{}}context(){return{}}direction(){return $.fn.swipey.DIRECTIONS.HORIZONTAL}setGesturesEnabled(e){this._isGesturesEnabled=e}isGesturesEnabled(){return this._isGesturesEnabled}goToLower(e){this._$ele.swipeAnimation("gotoLower",e)}goToUpper(e){this._$ele.swipeAnimation("gotoUpper",e)}onAnimation(e,t){}onUpper(e){}onLower(e){}threshold(){return 30}constructor(){this._isGesturesEnabled=!0}init(e,t){this._$ele=e,e.swipeAnimation({animation:this.animation(),target:t,bounds:this.bounds.bind(this),bindEvents:this.bindEvents(),context:this.context.bind(this),direction:this.direction(),enableGestures:this.isGesturesEnabled.bind(this),onAnimation:this.onAnimation.bind(this),onLower:this.onLower.bind(this),onUpper:this.onUpper.bind(this),threshold:this.threshold(),disableMouse:!0})}}}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/compiler"),require("lodash-es")):"function"==typeof define&&define.amd?define(["exports","@angular/compiler","lodash-es"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.transpiler={}),e.ng.compiler,e._)}(this,function(e,t,i){"use strict";const n=[{from:"@angular/forms",name:"FormsModule",as:"ngFormsModule"}],a=[{from:"@angular/forms",name:"ReactiveFormsModule",as:"ngReactiveFormsModule"}],s=[{from:"ngx-bootstrap/datepicker",name:"BsDatepickerModule",as:"ngx_BsDatepickerModule"}],o=[{from:"ngx-bootstrap/carousel",name:"CarouselModule",as:"ngxCarouselModule",forRoot:!0}],r=[{from:"ngx-bootstrap/dropdown",name:"BsDropdownModule",as:"ngxBsDropdownModule",forRoot:!0}],l=[{from:"ngx-bootstrap/timepicker",name:"TimepickerModule",as:"ngx_TimepickerModule",forRoot:!0}],c=[...n,{from:"ngx-bootstrap/pagination",name:"PaginationModule",as:"ngxPaginationModule",forRoot:!0},{from:"@wm/components/data/pagination",name:"PaginationComponent"}],d=[{from:"@wm/components/basic/anchor",name:"AnchorComponent"}],p=[...n,{from:"ngx-bootstrap/typeahead",name:"TypeaheadModule",as:"ngxTypeaheadModule",forRoot:!0},{from:"@wm/components/basic/search",name:"ScrollableDirective"},{from:"@wm/components/basic/search",name:"SearchComponent"}],m=[{from:"@wm/components/base",name:"PartialParamHandlerDirective"},{from:"@wm/components/base",name:"PartialContainerDirective"}],h=[...m,{from:"@wm/components/containers/accordion",name:"AccordionPaneComponent"}],u=[...m,{from:"@wm/components/base",name:"ContainerDirective"}],g=[{from:"@wm/components/containers/linear-layout",name:"LinearLayoutItemDirective"}],v=[...g,{from:"@wm/components/containers/linear-layout",name:"LinearLayoutDirective"}],f=[...m,{from:"@wm/components/containers/tabs",name:"TabPaneComponent"}],b=[...f,{from:"@wm/components/containers/tabs",name:"TabsComponent"}],y=[...m,{from:"@wm/components/containers/wizard",name:"WizardStepComponent"}],w=[...n,{from:"@wm/components/containers/wizard",name:"WizardActionDirective"},...y,{from:"@wm/components/containers/wizard",name:"WizardComponent"}],P=[{from:"@wm/components/containers/layout-grid",name:"LayoutGridColumnDirective"}],C=[{from:"@wm/components/containers/layout-grid",name:"LayoutGridRowDirective"}],T=[...C,...P,{from:"@wm/components/containers/layout-grid",name:"LayoutgridDirective"}],O=[...m,{from:"@wm/components/containers/panel",name:"PanelComponent"}],I=[{from:"@wm/components/dialogs/design-dialog",name:"DialogComponent"}],D=[{from:"@wm/components/dialogs/login-dialog",name:"LoginDialogDirective"},...I],E=[{from:"@wm/components/dialogs/partial-dialog",name:"PartialDialogComponent"},...u],R=[{from:"@wm/components/navigation/menu",name:"NavItemDirective"}],S=[{from:"@wm/components/navigation/menu",name:"NavComponent"}],_=[...r,{from:"@wm/components/navigation/menu",name:"MenuDropdownComponent"},{from:"@wm/components/navigation/menu",name:"MenuDropdownComponent"},{from:"@wm/components/navigation/menu",name:"NavigationControlDirective"},...S,...R,{from:"@wm/components/navigation/menu",name:"MenuComponent"}],x=[..._,{from:"@wm/components/navigation/breadcrumb",name:"BreadcrumbComponent"}],A=[{from:"ngx-bootstrap/popover",name:"PopoverModule",as:"ngxPopoverModule",forRoot:!0},{from:"@wm/components/navigation/popover",name:"PopoverComponent"},...u],k=[...m,{from:"@wm/components/page/top-nav",name:"TopNavDirective"}],N=[...n,...s,{from:"@wm/components/input/calendar",name:"CalendarComponent"}],M=[...p,{from:"@wm/components/input/chips",name:"ChipsComponent"}],L=[...n,{from:"ngx-color-picker",name:"ColorPickerDirective",as:"ngx_ColorPickerDirective"},{from:"@wm/components/input/color-picker",name:"ColorPickerComponent"}],F=[...n,...s,...r,{from:"@wm/components/input/epoch/date",name:"DateComponent"}],$=[...n,...s,...l,...r,{from:"@wm/components/input/epoch/date-time",name:"DatetimeComponent"}],j=[...n,...s,...l,...r,{from:"@wm/components/input/epoch/time",name:"TimeComponent"}],V=[...n,{from:"@wm/components/input/slider",name:"SliderComponent"}],B=[...n,{from:"@wm/components/input/button",name:"ButtonComponent"}],G=[...n,{from:"@wm/components/input/button-group",name:"ButtonGroupDirective"}],W=[...n,{from:"@wm/components/input/checkbox",name:"CheckboxComponent"}],q=[...n,{from:"@wm/components/input/checkboxset",name:"CheckboxsetComponent"}],z=[...n,{from:"@wm/components/input/number",name:"NumberComponent"}],U=[...n,{from:"@wm/components/input/radioset",name:"RadiosetComponent"}],H=[...n,{from:"@wm/components/input/select",name:"SelectComponent"}],Y=[...n,{from:"@wm/components/input/switch",name:"SwitchComponent"}],X=[...n,{from:"@wm/components/input/text",name:"InputCalendarComponent"}],K=[...n,{from:"@wm/components/input/text",name:"InputColorComponent"}],Q=[...n,{from:"@wm/components/input/text",name:"InputEmailComponent"}],Z=[...n,{from:"@wm/components/input/text",name:"InputNumberComponent"}],J=[...n,{from:"@wm/components/input/text",name:"InputTextComponent"}],ee=[...n,{from:"@wm/components/input/textarea",name:"TextareaComponent"}],te=[{from:"@wm/components/data/card",name:"CardActionsDirective"}],ie=[...m,{from:"@wm/components/data/card",name:"CardContentComponent"}],ne=[{from:"@wm/components/data/card",name:"CardFooterDirective"}],ae=[...r,..._,...te,...ie,...ne,{from:"@wm/components/data/card",name:"CardComponent"}],se=[...c,{from:"@wm/components/data/list",name:"ListItemDirective"}],oe=[...c,...se,{from:"@wm/components/data/list",name:"ListComponent"}],re=[{from:"@wm/components/data/table",name:"TableRowDirective"},...u,...m],le=[{from:"@wm/components/data/table",name:"TableRowActionDirective"},...B,...d],ce=[...n,...a,...c,..._,{from:"ngx-bootstrap/tooltip",name:"TooltipModule",as:"ngxTooltipModule",forRoot:!0},...oe,{from:"@wm/components/data/table",name:"TableActionDirective"},{from:"@wm/components/data/table",name:"TableCUDDirective"},{from:"@wm/components/data/table",name:"TableFilterSortDirective"},{from:"@wm/components/data/table",name:"TableColumnDirective"},{from:"@wm/components/data/table",name:"TableColumnGroupDirective"},...re,...le,{from:"@wm/components/data/table",name:"TableComponent"}],de=[{from:"@wm/components/data/form",name:"FormActionDirective"}],pe=[{from:"@wm/components/data/form",name:"FormFieldDirective"}],me=[{from:"@wm/components/data/form",name:"LiveFilterDirective"}],he=[...n,...a,...de,{from:"@wm/components/data/form",name:"FormWidgetDirective"},...pe,{from:"@wm/components/data/form",name:"LiveActionsDirective"},{from:"@wm/components/data/form",name:"DependsonDirective"},...me,{from:"@wm/components/data/form",name:"LiveFormDirective"},{from:"@wm/components/input/caption-position",name:"CaptionPositionDirective"},{from:"@wm/components/data/form",name:"FormComponent"}],ue=[...m,{from:"@wm/components/page/footer",name:"FooterDirective"}],ge=[...m,{from:"@wm/components/page/header",name:"HeaderComponent"}],ve=[...m,{from:"@wm/components/page/left-panel",name:"LeftPanelDirective"}],fe=[...m,{from:"@wm/components/page/right-panel",name:"RightPanelDirective"}],be=[...o,{from:"@wm/components/advanced/carousel",name:"CarouselTemplateDirective"}],ye=[...o,...be,{from:"@wm/components/advanced/carousel",name:"CarouselDirective"}],we=[{from:"@wm/components/advanced/custom",name:"CustomWidgetContainerDirective"},{from:"@wm/components/advanced/custom",name:"CustomWidgetDirective"}],Pe=new Map([["wm-accordion",[{from:"@wm/components/containers/accordion",name:"AccordionDirective"}]],["wm-accordionpane",h],["wm-anchor",d],["wm-alertdialog",[{from:"@wm/components/dialogs/alert-dialog",name:"AlertDialogComponent"}]],["wm-audio",[{from:"@wm/components/basic/audio",name:"AudioComponent"}]],["wm-button",B],["wm-buttongroup",G],["wm-breadcrumb",x],["wm-calendar",N],["wm-card",ae],["wm-card-actions",te],["wm-card-content",ie],["wm-card-footer",ne],["wm-carousel",ye],["wm-carousel-content",be],["wm-carousel-template",be],["wm-chart",[{from:"@wm/components/chart",name:"ChartComponent"},{from:"@wm/components/base",name:"RedrawableDirective"}]],["wm-checkbox",W],["wm-checkboxset",q],["wm-chips",M],["wm-colorpicker",L],["wm-confirmdialog",[{from:"@wm/components/dialogs/confirm-dialog",name:"ConfirmDialogComponent"}]],["wm-container",u],["wm-param",[{from:"@wm/components/base",name:"PartialParamDirective"}]],["wm-content",[{from:"@wm/components/page",name:"ContentComponent"}]],["wm-currency",[{from:"@wm/components/input/currency",name:"CurrencyComponent"}]],["wm-date",F],["wm-datetime",$],["wm-dialog",I],["wm-dialogactions",[{from:"@wm/components/dialogs",name:"DialogFooterDirective"}]],["wm-footer",ue],["wm-form",he],["wm-form-action",de],["wm-form-field",pe],["wm-filter-field",me],["wm-fileupload",[{from:"@wm/components/input/file-upload",name:"FileUploadComponent"}]],["wm-gridrow",C],["wm-gridcolumn",P],["wm-header",ge],["wm-html",[{from:"@wm/components/basic/html",name:"HtmlDirective"}]],["wm-icon",[{from:"@wm/components/basic/icon",name:"IconComponent"}]],["wm-iframe",[{from:"@wm/components/basic/iframe",name:"IframeComponent"}]],["wm-iframedialog",[{from:"@wm/components/dialogs/iframe-dialog",name:"IframeDialogComponent"}]],["wm-label",[{from:"@wm/components/basic/label",name:"LabelDirective"}]],["wm-layout",[{from:"@wm/components/page",name:"LayoutDirective"}]],["wm-layoutgrid",T],["wm-left-panel",ve],["wm-linearlayout",v],["wm-linearlayoutitem",g],["wm-list",oe],["wm-livetable",[{from:"@wm/components/data/live-table",name:"LiveTableComponent"}]],["wm-login",[{from:"@wm/components/advanced/login",name:"LoginComponent"}]],["wm-custom",we],["wm-custom-widget",we],["wm-logindialog",D],["wm-marquee",[{from:"@wm/components/advanced/marquee",name:"MarqueeDirective"}]],["wm-menu",_],["wm-message",[{from:"@wm/components/base",name:"MessageComponent"}]],["wm-nav",S],["wm-navbar",[{from:"@wm/components/navigation/navbar",name:"NavbarComponent"}]],["wm-nav-item",R],["wm-number",z],["wm-partial",[{from:"@wm/components/base",name:"PartialDirective"}]],["wm-page",[{from:"@wm/components/page",name:"PageDirective"}]],["wm-page-content",[{from:"@wm/components/page",name:"PageContentComponent"}]],["spa-page-content",[{from:"@wm/components/page",name:"SpaPageDirective"}]],["wm-pagedialog",E],["wm-pagination",c],["wm-panel",O],["wm-panel-footer",O],["wm-picture",[{from:"@wm/components/basic/picture",name:"PictureDirective"}]],["wm-popover",A],["wm-progress-bar",[{from:"@wm/components/basic/progress/progress-bar",name:"ProgressBarComponent"}]],["wm-prefab",[{from:"@wm/components/prefab",name:"PrefabDirective"}]],["wm-prefab-container",[{from:"@wm/components/prefab",name:"PrefabContainerDirective"}]],["wm-progress-circle",[{from:"@wm/components/basic/progress/progress-circle",name:"ProgressCircleComponent"}]],["wm-radioset",U],["wm-rating",[{from:"@wm/components/input/rating",name:"RatingComponent"}]],["wm-richtexteditor",[{from:"@wm/components/basic/rich-text-editor",name:"RichTextEditorComponent"}]],["wm-right-panel",fe],["wm-select",H],["wm-search",p],["wm-slider",V],["wm-spinner",[{from:"@wm/components/basic/spinner",name:"SpinnerComponent"}]],["wm-switch",Y],["wm-table",ce],["wm-tabs",b],["wm-tabpane",f],["wm-text",[...J,...X,...K,...Q,...Z]],["wm-textarea",ee],["wm-time",j],["wm-tile",[{from:"@wm/components/containers/tile",name:"TileDirective"}]],["wm-top-nav",k],["wm-tree",[{from:"@wm/components/basic/tree",name:"TreeComponent"}]],["wm-video",[{from:"@wm/components/basic/video",name:"VideoComponent"}]],["wm-wizard",w],["wm-wizardstep",w],["wm-repeat-template",[{from:"@wm/components/base",name:"RepeatTemplateDirective"}]],["wm-composite",[{from:"@wm/components/input/composite",name:"CompositeDirective"},{from:"@wm/components/input/caption-position",name:"CaptionPositionDirective"}]],["accessroles",[{from:"@wm/runtime/base",name:"AccessrolesDirective"}]],["showindevice",[{from:"@wm/components/base",name:"ShowInDeviceDirective"}]],["lazyload",[{from:"@wm/components/base",name:"LazyLoadDirective"}]],["toDate",[{from:"@wm/components/base",name:"ToDatePipe"}]],["toCurrency",[{from:"@wm/components/base",name:"ToCurrencyPipe"}]],["numberToString",[{from:"@wm/components/base",name:"NumberToStringPipe"}]],["stringToNumber",[{from:"@wm/components/base",name:"StringToNumberPipe"}]],["timeFromNow",[{from:"@wm/components/base",name:"TimeFromNowPipe"}]],["prefix",[{from:"@wm/components/base",name:"PrefixPipe"}]],["suffix",[{from:"@wm/components/base",name:"SuffixPipe"}]],["custom",[{from:"@wm/components/base",name:"CustomPipe"}]]]),Ce={COMMENTS_FORMAT:/\/\*((?!\*\/).|\n)+\*\//g,SELECTOR_FORMAT:/[^\{\}]*\{/gi,SELECTOR_EXCLUDE_FORMAT:/(@keyframes|@media|@font-face|@comment[0-9]+|from|to|[0-9]+%)\b/i},Te={accessroles:"*accessroles","ng-if":"*ngIf",showindevice:"*wmShowInDevice","ng-class":"[ngClass]","data-ng-class":"[ngClass]","data-ng-src":"src","ng-src":"src","data-ng-href":"href","ng-href":"href","ng-disabled":"disabled","data-ng-disabled":"disabled","ng-model":'[ngModelOptions]="{standalone: true}" [(ngModel)]'},Oe=e=>e?(e=e.trim()).startsWith("bind:")?e.substr(5):void 0:null,Ie=e=>(""+e).replace(/&/g,"&amp;").replace(/'/g,"&apos;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),De=new Map,Ee=new t.HtmlParser,Re=()=>"",Se={},_e=e=>new t.Element(e,[],[],[],!1,Se,Se,Se,!1),xe=".wm-app",Ae=e=>{let t=Te[e.name];const i=e.valueSpan?e.value:void 0;if(t)return"accessroles"===e.name||"showindevice"===e.name?[t,`'${i}'`]:[t,Ie(i)];if("o"===(n=e.name)[0]&&"n"===n[1]&&"-"===n[2])return(e=>[`${e.name.substr(3)}.event`,e.value])(e);var n;const a=Oe(e.value);return a?((e,t)=>[`${e.name}.bind`,Ie(t)])(e,a):[e.name,Ie(i)]},ke=e=>{const t=e.split(".");if("Variables"===t[0]||"Widgets"===t[0])return`${t[0]}.${t[1]}`},Ne=(()=>{const e=new Map,t=["required"];return{set:i=>{i.forEach((i,n)=>{t.includes(n)&&e.set(n,i)})},get:t=>{const i=new Map;return e.forEach((e,n)=>{!t.get(n)&&i.set(n,e)}),i},clear:()=>{e.clear()}}})(),Me=e=>{let t="";return e.forEach((i,n)=>{t+=` ${n}`,i&&(i=i.trim(),"[ngClass]"===n&&i.startsWith("{")&&(i=i.replace(/"/g,"'")),"show.bind"===n&&"true"===e.get("deferload")&&(i=i+'" *lazyLoad="'+`&apos;${i.replace(/&apos/g,"&quot").replace(/&quot/g,"\\&quot")}&apos;`),t+=`="${i}"`)}),t},Le=["padding","borderwidth","margin"],Fe="unset",$e=e=>{Array.from(e.keys()).forEach(t=>{if(Le.includes(t)){const i={},n=e.get(t);e.delete(t),((e,t,i)=>{let n,a,s,o,r,l=t,c="";function d(t,i){i===Fe&&(i=""),e[l+t+c]=i}"borderwidth"===t&&(c="width",l="border"),n=i,-1!==n.indexOf(Fe)?(n=n.split(" "),a=n[0],s=n[1]||n[0],o=n[2]||n[0],r=n[3]||n[1]||n[0],d("top",a),d("right",s),d("bottom",o),d("left",r)):("borderwidth"===t&&(l="borderwidth"),e[l]=i)})(i,t,n),Object.keys(i).forEach(t=>{i[t]&&e.set(t,i[t])})}})},je=(e,n,a)=>{const s=De.get(e.name);let o,r,l;s&&(o=s.pre||Re,r=s.post||Re,l=s.template||Re);let c,d,p,m="";a||(a=[]);if(e instanceof t.Element){let h;s&&(d=((e,t,i)=>{if(!e.requires)return[];let n=e.requires;return"string"==typeof n&&(n=[n]),Array.isArray(n)?n.map(n=>{for(let t=i.length-1;t>=0;t--)if("tableName"===i[t].name)return e[i[t].value];for(let e=t.length-1;e>=0;e--)if(t[e].nodeName===n)return t[e].provide}):[]})(s,a,e.attrs),p=new Map,l(e,p,...d)),c=(e=>{const t=new Map;if(e.forEach(e=>{let[i,n]=Ae(e);t.set(i,n)}),t.get("dataset.bind")){const e=ke(t.get("dataset.bind"));e&&t.set("datasource.bind",e)}return t})(e.attrs),$e(c);const u=e.name.replace(":svg:svg","svg").replace(":svg:","svg:");if(s){if(m=o(c,p,...d),s.provide){if(h={nodeName:e.name,provide:i.isFunction(s.provide)?s.provide(c,p,...d):s.provide},"wm-table"===e.name){const t=De.get("wm-table-column");t[i.find(e.attrs,e=>"name"===e.name).value+h.provide.get("table_reference")]=h.provide,De.set("wm-table-column",t)}a.push(h)}}else m=`<${u} ${Me(c)}>`;e.children.forEach(e=>{if(e.attrs){let t,a,s,o;if(e.attrs.forEach(function(e){"showindevice"===e.name?(t=e,n(Pe.get("showindevice"))):"accessroles"===e.name?(a=e,n(Pe.get("accessroles"))):"deferload"===e.name?(s=e,n(Pe.get("lazyload"))):"show"===e.name&&(o=e)}),t&&a||t&&s||a&&s){const n=t?_e("ng-container"):"",r=a?_e("ng-container"):"",l=s?_e("ng-container"):"";let c,d;if(n&&n.attrs.push(t),r&&r.attrs.push(a),l&&(l.attrs.push(s),o&&l.attrs.push(o)),i.remove(e.attrs,function(e){return"showindevice"===e.name||"accessroles"===e.name||"deferload"===e.name}),t&&a?(c=n,d=r):t&&s?(c=n,d=l):a&&s&&(c=l,d=r),c.children=[e],d.children=[c],t&&a&&s){const t=l;t.children=[d],e=t}else e=d}}return m+=je(e,n,a)}),s?(h&&a.splice(a.indexOf(h),1),m+=r(c,p,...d)):e.endSourceSpan&&!t.getHtmlTagDefinition(e.name).isVoid&&(m+=`</${u}>`)}else e instanceof t.Text&&(m+=e.value);if(n(Pe.get(e.name)),s&&s.imports){let e=[];e="function"==typeof s.imports?s.imports(c):s.imports,e.forEach(e=>{n(Pe.get(e))})}return m};e.WIDGET_IMPORTS=Pe,e.clearChildAttrs=()=>(Ne.clear(),""),e.createCompilerElement=_e,e.getAttrMarkup=Me,e.getBoundToExpr=Oe,e.getChildAttrs=e=>Me(Ne.get(e)),e.getDataSource=ke,e.getFormMarkupAttr=e=>{if(e.get("datavalue.bind")){const t=ke(e.get("datavalue.bind"));e.set("datavaluesource.bind",t)}return Me(e)},e.processNode=je,e.register=(e,t)=>De.set(e,t()),e.scopeComponentStyles=(e,t,i="")=>{e=e.toLowerCase();const n={};let a=0;if(i.startsWith("/*DISABLE_SCOPING*/"))return i;i=(i=i.replace(Ce.COMMENTS_FORMAT,e=>{const t=`@comment${a++}{`;return n[t]=e,t})).replace(Ce.SELECTOR_FORMAT,i=>{if(!Ce.SELECTOR_EXCLUDE_FORMAT.test(i)){const n=i.match(/\S/).index;let a="";n>0&&(a=i.substring(0,n),i=i.substring(n)),!i.startsWith("/*")&&i.trim().length>0&&(i=i.split(",").map(i=>{let n=xe;const a=(i=i.trim()).indexOf(" ");if(i.startsWith(xe)){if(!(a>0))return i;n=i.substring(0,a),i=i.substring(a+1)}return 0===t||"PAGE"===t?i=`${n} app-page-${e} ${i}`:1===t||"PREFAB"===t?i=`${n} app-prefab-${e} ${i}`:2===t||"PARTIAL"===t?i=`${n} app-partial-${e} ${i}`:3!==t&&"WIDGET"!==t||(i=`${n} app-custom-${e} ${i}`),i}).join(",")),i=a+i}return i});for(const e in n)i=i.replace(e,n[e]);return i},e.setChildAttrs=e=>(Ne.set(e),""),e.transpile=(e="")=>{if(!e.length)return;let t=[];const n=Ee.parse(e,"");if(n.errors.length)return;let a="";for(const e of n.rootNodes)a+=je(e,e=>{e&&(t=t.concat(e))});return t=i.uniqWith(t,i.isEqual),t=i.sortBy(t,["from","name"]),{markup:a,requiredWMComponents:t}}}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common/http"),require("rxjs"),require("@wm/core"),require("@wavemaker-ai/variables"),require("lodash-es")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/common/http","rxjs","@wm/core","@wavemaker-ai/variables","lodash-es"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.http={}),e.ng.core,e.ng.common.http,e.rxjs,e.wm.core,e.wm_common_variables,e._)}(this,function(e,t,i,n,a,s,o){"use strict";function r(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var l,c=r(t),d=r(i);!function(e){e[e.Sent=0]="Sent",e[e.UploadProgress=1]="UploadProgress",e[e.ResponseHeader=2]="ResponseHeader",e[e.DownloadProgress=3]="DownloadProgress",e[e.Response=4]="Response",e[e.User=5]="User"}(l||(l={}));class p extends a.AbstractHttpService{constructor(e){super(),this.httpClient=e,this.nonBodyTypeMethods=["GET","DELETE","HEAD","OPTIONS","JSONP"],this.sessionTimeoutObservable=new n.Subject,this.sessionTimeoutQueue=[],this.sessionTimeoutSubscriptions=[]}handleSessionTimeout(e,t){this.sessionTimeoutQueue.push({requestInfo:e,sub401:t}),this.on401()}generateRequest(e){let t=new i.HttpHeaders,n=new i.HttpParams;const a=e.headers,s=e.params,r=e.responseType,l=e.withCredentials;let c,d;e.isDirectCall||(t=t.append("X-Requested-With","XMLHttpRequest")),a&&Object.entries(a).forEach(([e,i])=>{(o.isNumber(i)||o.isBoolean(i))&&(i=i.toString()),t=t.append(e,i)}),s&&Object.entries(s).forEach(([e,t])=>n=n.append(e,t));const p={headers:t,params:n,responseType:r,withCredentials:l};return o.includes(this.nonBodyTypeMethods,e.method&&e.method.toUpperCase())&&void 0===e.data?(c=p,d=null):(c=e.data,d=p),new i.HttpRequest(e.method,e.url,c,d)}sendCallAsObservable(e,t){const i=this.generateRequest(e);return this.httpClient.request(i)}sendCall(e,t,i){return new Promise((n,a)=>{t._observable=this.sendCallAsObservable(e,i).subscribe(e=>{e&&e.type&&n(e)},e=>{a(e)})})}send(e){const t=this.generateRequest(e);return new Promise((e,i)=>{this.httpClient.request(t).toPromise().then(t=>{e(t)},t=>{if(this.isPlatformSessionTimeout(t))t._401Subscriber.asObservable().subscribe(t=>{e(t)},e=>{i(e)});else{const e=s.getErrMessage(t,this.getLocale());i({error:e,details:t})}})})}cancel(e,t){e._observable&&e._observable.unsubscribe(),t&&t._uploadProgress&&t._uploadProgress.unsubscribe()}setLocale(e){this.localeObject=e}getLocale(){return this.localeObject}getHeader(e,t){return e.headers.get(t)}isPlatformSessionTimeout(e){return 401===e.status&&"Session Not Found"===this.getHeader(e,"x-wm-login-errormessage")}get(e,t){return(t=t||{}).url=e,t.method="get",this.send(t).then(e=>e.body)}post(e,t,i){return(i=i||{}).url=e,i.method="post",i.data=t,this.send(i)}put(e,t,i){return(i=i||{}).url=e,i.method="put",i.data=t,this.send(i)}patch(e,t,i){return(i=i||{}).url=e,i.method="patch",i.data=t,this.send(i)}delete(e,t){return(t=t||{}).url=e,t.method="delete",this.send(t)}head(e,t){return(t=t||{}).url=e,t.method="head",this.send(t)}jsonp(e,t){return(t=t||{}).url=e,t.method="jsonp",this.send(t)}upload(e,t,n){const a=new i.HttpRequest("POST",e,t,{reportProgress:!0});return this.httpClient.request(a)}uploadFile(e,t,i,n){return new Promise((a,s)=>{i.request=this.upload(e,t,n).subscribe(e=>{if(e.type===l.UploadProgress){const t=Math.round(100*e.loaded/e.total);n.notify(t)}e.type===l.Response&&a(e.body)},e=>{s(e)})})}registerOnSessionTimeout(e){const t=this.sessionTimeoutObservable.asObservable().subscribe(e);return this.sessionTimeoutSubscriptions.push(t),()=>{t.unsubscribe();const e=this.sessionTimeoutSubscriptions.indexOf(t);e>-1&&this.sessionTimeoutSubscriptions.splice(e,1)}}on401(){this.sessionTimeoutObservable.next(void 0)}pushToSessionFailureQueue(e){this.sessionTimeoutQueue.push({callback:e})}executeSessionFailureRequests(){const e=this.sessionTimeoutQueue,t=this;t.sessionTimeoutQueue=[],e.forEach(e=>{o.isFunction(e.callback)?e.callback():(e.requestInfo.headers.headers.delete("x-wm-xsrf-token"),t.httpClient.request(e.requestInfo).subscribe(t=>{t&&t.type&&e.sub401&&e.sub401.next(t)},t=>{e.sub401.error(t)}))})}ngOnDestroy(){this.sessionTimeoutSubscriptions.forEach(e=>{e&&!e.closed&&e.unsubscribe()}),this.sessionTimeoutSubscriptions=[],this.sessionTimeoutObservable&&(this.sessionTimeoutObservable.complete(),this.sessionTimeoutObservable=null),this.sessionTimeoutQueue=[],this.localeObject=null}static{this.\u0275fac=c.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:c,type:p,deps:[{token:d.HttpClient}],target:c.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=c.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:c,type:p,providedIn:"root"})}}c.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:c,type:p,decorators:[{type:t.Injectable,args:[{providedIn:"root"}]}],ctorParameters:()=>[{type:d.HttpClient}]});class m{constructor(){this.headers=[]}wmToAngularRequest(e){let t;return t=new i.HttpRequest(e.method,e.url),t=t.clone(),t.body=e.body,t.method=e.method,t.responseType=e.responseType,t.reportProgress=e.reportProgress,t.urlWithParams=e.url,t.withCredentials=e.withCredentials,e.headers.forEach((e,i)=>{t.headers=t.headers.append(i,e)}),t}angularToWmRequest(e){let t=new m,i=new Map;return t.body=e.body,t.method=e.method,t.responseType=e.responseType,t.reportProgress=e.reportProgress,t.url=e.urlWithParams,t.withCredentials=e.withCredentials,e.headers.keys().forEach(t=>{i.set(t,e.headers.headers.get(t.toLowerCase())[0])}),t.headers=i,t}}class h extends m{constructor(){super()}wmToAngularResponse(e){let t;return t=new i.HttpResponse,t=t.clone(),t.body=e.body,t.error=e.error,t.message=e.message,t.url=e.url,t.ok=e.ok,t.status=e.status,t.statusText=e.statusText,e.headers.forEach((e,i)=>{t.headers=t.headers.append(i,e)}),t}angularToWmResponse(e){let t,i=new Map;return t=new h,t.body=e.body,t.error=e.error,t.message=e.message,t.url=e.url,t.ok=e.ok,t.status=e.status,t.statusText=e.statusText,e.headers.keys().forEach(t=>{i.set(t,e.headers.headers.get(t.toLowerCase())[0])}),t.headers=i,t}}e.HttpServiceImpl=p,e.WmHttpRequest=m,e.WmHttpResponse=h}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("rxjs"),require("@wm/core"),require("lodash-es"),require("moment")):"function"==typeof define&&define.amd?define(["exports","@angular/core","rxjs","@wm/core","lodash-es","moment"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.oAuth={}),e.ng.core,e.rxjs,e.wm.core,e._,e.momentLib)}(this,function(e,t,i,n,a,s){"use strict";function o(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var r=o(t),l=o(n);const c=o(s).default||window.moment,d=".access_token",p="pkce",m="implicit";let h,u;const g=e=>{let t,i,n;const s=e.urlParams;if(n={url:"services/oauth2/:providerId/authorizationUrl",method:"GET"},e.config){n.url=(e.config.url||"")+n.url,n.method=e.config.method||n.method,n.headers=n.headers||{};for(const i in e.config.headers)t=e.config.headers[i],n.headers[i]=t}if(s)for(i in s)s.hasOwnProperty(i)&&(t=s[i],a.isUndefined(t)||null===t||(n.url=n.url.replace(new RegExp(":"+i,"g"),t)));return e.params&&(n.params=e.params),a.isUndefined(e.data)||(n.data=e.data),e.dataParams&&(n.data.params=e.dataParams),e.headers&&(n.headers=e.headers),n.byPassResult=e.byPassResult,n.isDirectCall=e.isDirectCall,n.isExtURL=e.isExtURL,n.preventMultiple=e.preventMultiple,n.responseType=e.responseType,n},v={},f="WM_RUN_",b="width=400,height=600",y=e=>{const t=w(e);localStorage.removeItem(t)};function w(e){let t;return t=f+n._WM_APP_PROJECT.id+"_"+e+d,t}function P(e,t){const i=w(e);localStorage.setItem(i,t)}function C(e,t,i,n,a,s){const o=e+d,r=localStorage.getItem(o);if((!n||n.origin===window.location.origin)&&r)if(E(s,p)){const n="client_id="+s.clientId+"&code="+r+"&grant_type=authorization_code&code_verifier="+h+"&redirect_uri="+u;a.send({method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},url:s.accessTokenUrl,data:n}).then(function(n){T(e,t,i,o,n.body.access_token)})}else T(e,t,i,o,r)}function T(e,t,i,n,a){i(e),localStorage.removeItem(n),P(e,a),window.removeEventListener("message",v[e]),setTimeout(()=>{delete v[e],t&&t(a)})}function O(e,t,i,n,a,s){!function(){const e="dummy_key";localStorage.setItem(e,e),localStorage.removeItem(e)}();const o=c.duration(c().format("HH:mm"),"HH:mm").subtract(n),r=k(e,!0);r?(a.accesstoken_retrieved=!0,P(e,r),localStorage.removeItem(e+d),s(e),t&&t()):o.minutes()>1&&t&&!a.accesstoken_retrieved?t("error"):setTimeout(()=>{O(e,t,i,n,a,s)},3e3)}function I(e,t,i,n){e&&v[t]&&(e.closed?E(n,p)||(window.removeEventListener("message",v[t]),delete v[t],i&&i("error")):setTimeout(I.bind(void 0,e,t,i,n),3e3))}function D(e,t,i,n,a,s,o,r,l){E(s,m)&&(e=x(t,s,o,null,r,l)),window.open(e,"_blank",b),O(t,i,n,c.duration(c().format("HH:mm"),"HH:mm"),{accesstoken_retrieved:!1},a)}function E(e,t){let i=a.get(e,"oauth2Flow");return i=i?i.toLowerCase():i,t===p&&!0===a.get(e,"oAuth2Pkce.enabled")&&(i=p),i===t}function R(e,t,i,n,a){v[e]=C.bind(void 0,e,t,i,null,n,a),window.addEventListener("message",v[e],!1)}function S(e,t,i,n,s,o,r,l,c){if(E(s,m))_(e=x(t,s,o,null,r,l),t,i,n,s,o,r,l,c);else if(E(s,p)){let p;if(h=function(){const e=new Uint32Array(28);return window.crypto.getRandomValues(e),Array.from(e,e=>("0"+e.toString(16)).substr(-2)).join("")}(),"plain"===a.get(s,"oAuth2Pkce.challengeMethod"))p=h,_(e=x(t,s,o,p,r,l),t,i,n,s,o,r,l,c);else{const a=function(e){const t=(new TextEncoder).encode(e),i=new jsSHA("SHA-256","UINT8ARRAY",{encoding:"UTF8"});return i.update(t),i.getHash("ARRAYBUFFER")}(h);d=a,p=btoa(String.fromCharCode.apply(null,new Uint8Array(d))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""),_(e=x(t,s,o,p,r,l),t,i,n,s,o,r,l,c)}}else _(e,t,i,n,s,o,r,l,c);var d}function _(e,t,i,n,a,s,o,r,l){let c;c=window.open(e,"_blank",b),R(t,i,n,l,a),I(c,t,i,a)}function x(e,t,i,s,o,r){u=window.location.href.split("/#/")[0]+"/oAuthCallback.html";const l=t.clientId,c=t.scopes.map(function(e){return e.name}).join(" ");let h;!0===n.getWmProjectProperties().isTestRuntime&&(u=location.protocol+"//"+window.location.host+"/studio/oAuthCallback.html"),"MOBILE"===i&&(u=r+"oAuthCallback.html");const g=E(t,m)?m:p;h={providerId:e,suffix:d,requestSourceType:i,flow:g,scheme:o};const v=t.authorizationUrl.split("?");let f;f=1===v.length?"?":v.length>1&&""!==v[1]?"&":"";const b=t.authorizationUrl+f+"client_id="+l+"&redirect_uri="+u+"&state="+encodeURIComponent(JSON.stringify(h))+"&scope="+encodeURIComponent(c);let y;if(g===m){y=b+"&response_type="+(t.responseType?t.responseType:"token")}else y=b+"&response_type=code&code_challenge="+s+"&code_challenge_method="+a.get(t,"oAuth2Pkce.challengeMethod");return y}function A(e,t,i,a,s,o,r,l,c,d,h){const u=E(l,m)||E(l,p)?e:e.body;o({name:t,url:u,invoke:()=>{n.isIE()?D(e,t,i,a,r,l,c,d,h):S(u,t,i,r,l,c,d,h,s)}})}const k=(e,t)=>{const i=w(e);return t?localStorage.getItem(e+d):localStorage.getItem(i)},N=(e,t,i,a,s,o,r,l,c,d)=>{let h="WEB";if(e)n.isIE()?D(e,t,i,a,r):S(e,t,i,r,l,h,s);else{if(!E(l,m)&&!E(l,p))return function(e,t){const i=g({urlParams:{projectId:n._WM_APP_PROJECT.id,providerId:e.providerId},params:{requestSourceType:e.requestSourceType}});return t.send(i)}({providerId:t,requestSourceType:h},s).then(e=>{A(e,t,i,a,s,o,r,l,h,c,d)});A(e,t,i,a,s,o,r,l,h,c,d)}};class M{constructor(e){this.httpService=e,this.providers=new i.Subject,this.providersConfig=[]}getOAuthProvidersAsObservable(){return this.providers.asObservable()}addProviderConfig(e){a.find(this.providersConfig,{name:e.name})||this.providersConfig.push(e),this.providers.next(this.providersConfig)}removeProviderConfig(e){a.remove(this.providersConfig,t=>t.name===e),this.providers.next(this.providersConfig)}perfromOAuthorization(e,t,i,n,a,s,o){N(e,t,i,n,this.httpService,this.addProviderConfig.bind(this),this.removeProviderConfig.bind(this),a,s,o)}getAccessToken(e,t){return k(e,t)}removeAccessToken(e){y(e)}ngOnDestroy(){this.providers&&(this.providers.complete(),this.providers=null),this.providersConfig=[]}static{this.\u0275fac=r.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:r,type:M,deps:[{token:l.AbstractHttpService}],target:r.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=r.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:r,type:M})}}r.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:r,type:M,decorators:[{type:t.Injectable}],ctorParameters:()=>[{type:l.AbstractHttpService}]}),e.OAuthService=M,e.getAccessToken=k,e.parseConfig=g,e.performAuthorization=N,e.removeAccessToken=y}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@angular/router"),require("@wm/core"),require("lodash-es")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/common","@angular/router","@wm/core","lodash-es"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.security={}),e.ng.core,e.ng.common,e.ng.router,e.wm.core,e._)}(this,function(e,t,i,n,a,s){"use strict";function o(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var r=o(t),l=o(i),c=o(n),d=o(a);const p="wm_xsrf_token";class m{constructor(e,t,i,n,a){this.injector=e,this.$http=t,this.routerService=i,this.activatedRoute=n,this._location=a,this.requestQueue={},this.queryParamsSubscriptions=[],this.appSubscriptions=[]}isLoaded(){return this.config}get(){return this.config}load(e){return this.loadPromise?this.loadPromise:_WM_APP_PROPERTIES?.securityEnabled?!e&&this.config?Promise.resolve(this.config):(this.loadPromise=new Promise((e,t)=>{this.$http.send({url:"services/security/info",method:"GET"}).then(t=>{this.config=t.body,_WM_APP_PROPERTIES.securityInfo=this.config,this.lastLoggedInUser=a.getClonedObject(this.loggedInUser),this.loggedInUser=this.config.userInfo,e(t.body)}).catch(e=>{t(e)}).finally(()=>{this.loadPromise=null})}),this.loadPromise):Promise.resolve(null)}getWebConfig(e,t){this.get()?a.triggerFn(e,this.get()):this.load().then(t=>{a.triggerFn(e,t)},t)}getConfig(e,t){function i(e,t,i){s.forEach(this.requestQueue[e],e=>a.triggerFn(e[t],i)),this.requestQueue[e]=null}this.get()?a.triggerFn(e,this.get()):(this.requestQueue.config=this.requestQueue.config||[],this.requestQueue.config.push({success:e,error:t}),this.requestQueue.config.length>1||this.getWebConfig(function(e){(e=e||{}).homePage=a.getWmProjectProperties().homePage,e.userInfo,this.config=e,this.lastLoggedInUser=a.getClonedObject(this.loggedInUser),this.loggedInUser=e.userInfo,i.call(this,"config","success",this.get())}.bind(this),function(e){i.call(this,"config","error",e)}.bind(this)))}getLastLoggedInUsername(){return this.lastLoggedInUser&&this.lastLoggedInUser.userName}getCurrentRoutePage(){const e=this._location.path();let t=e.indexOf("?");return t=-1===t?e.length:t-1,e.substr(1,t)}getCurrentRouteQueryParam(e){let t;return this.activatedRoute.queryParams.subscribe(i=>{t=i[e]}).unsubscribe(),t}isNoPageLoaded(){return!s.isEmpty(this.getCurrentRoutePage())}getPageByLoggedInUser(){const e=this;return new Promise(t=>{let i;e.getConfig(n=>{n.securityEnabled&&n.authenticated?(i=n.userInfo.landingPage||a.getWmProjectProperties().homePage,e.isXsrfEnabled()):i=a.getWmProjectProperties().homePage,t(i)},function(){t(a.getWmProjectProperties().homePage)})})}loadPageByUserRole(e){const t=this;return this.getPageByLoggedInUser().then(i=>{(t.isNoPageLoaded()||e)&&(t.getCurrentRoutePage()===i?window.location.reload():t.routerService.navigate([`/${i}`]))})}navigateOnLogin(){this.loadPageByUserRole(!0)}getRedirectPage(e,t){const i=a.getWmProjectProperties().homePage,n=s.get(e,"loginConfig.pageName");let o,r=t||this.getCurrentRoutePage();return r!==i&&r!==n||(o=this.getCurrentRouteQueryParam("redirectTo"),r=s.isEmpty(o)?void 0:o),r}getRedirectedRouteQueryParams(){let e={};return this.activatedRoute.queryParams.subscribe(t=>{s.forEach(t,(t,i)=>{e[i]=t})}).unsubscribe(),e}getQueryString(e){const t=[];return s.forEach(e,function(e,i){t.push(i+"="+e)}),s.join(t,"&")}appLogin(e,t,i){let n="";return s.each(e,function(e,t){n+=(n?"&":"")+encodeURIComponent(t)+"="+encodeURIComponent(e)}),this.$http.send({method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},url:"j_spring_security_check",data:n}).then(e=>{e.body&&e.body[p],this.injector.get(a.App).notify("userLoggedIn",{}),a.triggerFn(t,e)},i)}isAuthenticated(e,t){this.getConfig(function(t){a.triggerFn(e,t.authenticated)},t)}appLogout(e,t){return this.$http.send({target:"Security",url:"j_spring_security_logout",method:"POST",responseType:"text",byPassResult:!0}).then(t=>{s.set(this.get(),"authenticated",!1),s.set(this.get(),"userInfo",null),this.injector.get(a.App).notify("userLoggedOut",{}),a.triggerFn(e,t)},t)}getCookieByName(e){return"cookie"}isXsrfEnabled(){return this.getCookieByName(p)}onUserLogin(){return new Promise((e,t)=>{this.getConfig(t=>{if(t.securityEnabled)if(t.authenticated)e();else{const t=this.injector.get(a.App).subscribe("userLoggedIn",()=>{e(),t();const i=this.appSubscriptions.indexOf(t);i>-1&&this.appSubscriptions.splice(i,1)});this.appSubscriptions.push(t)}else e()},t)})}getLoggedInUser(){return new Promise((e,t)=>{this.getConfig(i=>{i&&i.userInfo?e(i.userInfo):t()},t)})}authInBrowser(){return Promise.reject("This authInBrowser should not be called")}ngOnDestroy(){this.queryParamsSubscriptions.forEach(e=>{e&&e.unsubscribe&&e.unsubscribe()}),this.queryParamsSubscriptions=[],this.appSubscriptions.forEach(e=>{e&&e()}),this.appSubscriptions=[],this.config=null,this.lastLoggedInUser=null,this.loggedInUser=null,this.requestQueue=null,this.loadPromise=null}static{this.\u0275fac=r.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:r,type:m,deps:[{token:r.Injector},{token:d.AbstractHttpService},{token:c.Router},{token:c.ActivatedRoute},{token:l.Location}],target:r.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=r.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:r,type:m})}}r.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:r,type:m,decorators:[{type:t.Injectable}],ctorParameters:()=>[{type:r.Injector},{type:d.AbstractHttpService},{type:c.Router},{type:c.ActivatedRoute},{type:l.Location}]}),e.SecurityService=m}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@wm/core"),require("@angular/core"),require("@wavemaker/focus-trap"),require("lodash-es"),require("moment"),require("@angular/platform-browser"),require("rxjs"),require("@wm/security"),require("rxjs/operators"),require("@angular/forms"),require("@swipey"),require("@angular/common"),require("moment-timezone/moment-timezone"),require("tslib")):"function"==typeof define&&define.amd?define(["exports","@wm/core","@angular/core","@wavemaker/focus-trap","lodash-es","moment","@angular/platform-browser","rxjs","@wm/security","rxjs/operators","@angular/forms","@swipey","@angular/common","moment-timezone/moment-timezone","tslib"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.base={}),e.wm.core,e.ng.core,e.focusTrap,e._,e.momentLib,e.ng.platformBrowser,e.rxjs,e.wm.security,e.rxjs.operators,e.ng.forms,e.swipey,e.ng.common,e.momentLib$1,e.tslib)}(this,function(e,t,i,n,a,s,o,r,l,c,d,p,m,h,u){"use strict";function g(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var v=g(t),f=g(i),b=g(s),y=g(o),w=g(m),P=g(h);const C=new i.InjectionToken("WidgetConfig");class T{}class O{}const I=new i.InjectionToken("Context Provider Reference"),D=new Set([t.FormWidgetType.SELECT,t.FormWidgetType.CHECKBOXSET,t.FormWidgetType.RADIOSET,t.FormWidgetType.SWITCH,t.FormWidgetType.AUTOCOMPLETE,t.FormWidgetType.CHIPS,t.FormWidgetType.TYPEAHEAD,t.FormWidgetType.RATING]),E=(e,t)=>{if(t){let i;return t.replace(/\[(\w+)\]/g,".$1").split(".").forEach(t=>{i=i&&i[t]||(a.isNull(e)?e:e[t])}),i}return e},R=(e,i,n)=>{let s;const o=i.field,r=i.expression,l=i.bindExpression;return l?(s=l.replace("bind:",""),t.checkIsCustomPipeExpression(s)&&(s+=": __1"),s=(e=>{let t,i,n,a,s,o,r,l,c,d="";for(e=e.replace(/\$\[data\[\$i\]/g,"$[__1"),n=0;n<e.length;n++)if(t=e[n],i=e[n+1],"$"===t&&"["===i){for(o=1,c=!1,r=!1,a=n+2;a<e.length;a++)if(s=e[a]," "!==s&&(c||(r='"'===e[a]||"'"===e[a],c=!0),"["===s?o++:"]"===s&&o--,!o)){l=e.substring(n+2,a),d+=r?"__1["+l+"]":l;break}n=a}else d+=t;return d})(s)):s=r||o,l||r?t.$parseExpr(s)(n,Object.assign({},e,{__1:e})):a.get(e,o)},S=(e,t)=>{if(!e||!t)return!1;t=-1===t.indexOf("?")?t:t.substring(0,t.indexOf("?")),e=-1===e.indexOf("?")?e:e.substring(0,e.indexOf("?"));return new RegExp("^(#/|#)"+t+"$").test(e)},_=(e,t)=>e.some(e=>!!S(e.link,t)||(e.children?_(e.children,t):void 0)),x=e=>D.has(e),A=(e,i,n)=>(t.isValidWebURL(e)||(e||(e=t.isValidWebURL(n)?n:n||"resources/images/imagelists/default-image.png"),!e||t._WM_APP_PROJECT.isPreview||t.isValidImageUrl(e)||e.startsWith(t._WM_APP_PROJECT.cdnUrl)||e.startsWith("services")||e.startsWith("/")||(e=(t._WM_APP_PROJECT.cdnUrl||"")+e),e=i?t.encodeUrl(e):e,t.stringStartsWith(e,"services/prefabs")),e),k=e=>""===e||"none"===e?e:"url("+A(e)+")";function N(e,t,n){return{provide:t,useExisting:i.forwardRef(()=>e),multi:n}}function M(e){return N(e,T)}const L=(...e)=>e.join("_"),F={number:["number","integer","big_integer","short","float","big_decimal","double","long","byte"],string:["string","text"],character:["character"],date:["date","time","timestamp","datetime"]},j={number:["exact","notequals","lessthan","lessthanequal","greaterthan","greaterthanequal","null","isnotnull"],string:["anywhereignorecase","anywhere","startignorecase","start","endignorecase","end","exactignorecase","exact","notequalsignorecase","notequals","null","isnotnull","empty","isnotempty","nullorempty"],character:["exactignorecase","exact","notequalsignorecase","notequals","null","isnotnull","empty","isnotempty","nullorempty"],date:["exact","lessthan","lessthanequal","greaterthan","greaterthanequal","null","notequals","isnotnull"]},V={boolean:["exact","null","isnotnull"],clob:[],blob:[]},B=e=>{let t=[];return a.isArray(e)?(e.forEach(e=>{t=t.concat(B(e))}),t):a.isObject(e)?(a.forEach(e,(e,i)=>{e&&(t=t.concat(i.split(" ")))}),t):void 0},G=(e,t)=>{let i,n;const s=e.toAdd||e,o=e.toRemove||t;return a.isObject(e)?(i=a.isArray(s)?s:B(s||[]),n=o?a.isArray(o)?o:B(o):[]):(i=s?[s]:[],n=o?[o]:[]),{toAdd:i,toRemove:n}},W=(e,i,n,s)=>{let o,r,l,c,d,p;s||(s={}),a.forEach(e,(e,m)=>{a.includes(m,".")&&(c=a.split(m,"."),r=c[0],l=c[1],p=!0),s.noModifyTitle?o=m:a.isString(m)?(o=t.prettifyLabel(m),o=t.deHyphenate(o),o=n?t.initCaps(n)+" "+o:o):o=m,m=n?n+"."+m:m,p?(d=a.split(o," "),d=d.length>1?d[d.length-2]+" "+d[d.length-1]:d[0]):d=o;const h=s.setBindingField?{displayName:d,field:m,relatedTable:r,relatedField:l||o}:{displayName:d,relatedTable:r,relatedField:l||o};if(!a.isObject(e)||a.isArray(e)&&!e[0]){if(s.upperBound&&s.columnCount===s.upperBound)return;i.terminals.push(h),s.columnCount+=1}else s.columnCount!==s.upperBound&&i.objects.push(h),a.isArray(e)&&e[0]?W(e[0],i,m+"[0]",s):W(e,i,m,s)})},q=()=>{};var z;e.Live_Operations=void 0,(z=e.Live_Operations||(e.Live_Operations={})).INSERT="insert",z.UPDATE="update",z.DELETE="delete",z.READ="read";const U="All Fields",H={EMPTY_KEY:"EMPTY_NULL_FILTER",EMPTY_VALUE:"No Value",LABEL_KEY:"key",LABEL_VALUE:"value",NULL_EMPTY:["null","empty"],NULL:"null",EMPTY:"empty"};function Y(e){return a.includes([t.FormWidgetType.AUTOCOMPLETE,t.FormWidgetType.TYPEAHEAD,t.FormWidgetType.CHIPS],e)}const X=(e,i,n)=>{const s=t.debounce(()=>{a.isFunction(n)&&n(i)},300);s();const o=i?a.isObject(i)?i:JSON.parse(i):{},r=e.registerDestroyListener?e.registerDestroyListener.bind(e):q,l=t.processFilterExpBindNode(e,o).subscribe(e=>{i=JSON.stringify(e.filterExpressions),s()});r(()=>l.unsubscribe())},K=(e,i)=>{const n={};let s;return i["is-related"]?(n.tableName=i["lookup-type"],s=i["lookup-field"],n.distinctField=s,n.aliasColumn=s.replace(".","$"),n.filterExpr=i.filterexpressions?a.isObject(i.filterexpressions)?i.filterexpressions:JSON.parse(i.filterexpressions):{}):(n.tableName=e.execute(t.DataSource.Operation.GET_ENTITY_NAME),s=i.field||i.key,n.distinctField=s,n.aliasColumn=s),n};function Q(e,i,n){let a;return new Promise((s,o)=>{!x(i[n])||i.isDataSetBound&&"filterwidget"!==n||(a=K(e,i),e.execute(t.DataSource.Operation.GET_DISTINCT_DATA_BY_FIELDS,{fields:a.distinctField,entityName:a.tableName,pagesize:i.limit,filterExpr:i.filterexpressions?JSON.parse(i.filterexpressions):{}}).then(e=>{s({field:i,data:e.data,aliasColumn:a.aliasColumn})},o))})}function Z(e,t){if(Y(e[t.widget]))return e.datafield=t.aliasColumn||H.LABEL_KEY,e.searchkey=t.distinctField||H.LABEL_KEY,void(e.displaylabel=e.displayfield=t.aliasColumn||H.LABEL_VALUE);e.datafield=H.LABEL_KEY,e.displayfield=H.LABEL_VALUE}function J(e,i,n){const s=[t.FormWidgetType.SELECT,t.FormWidgetType.RADIOSET],o={},r=[];n.isEnableEmptyFilter&&a.includes(s,e[n.widget])&&!e["is-range"]&&!e.multiple&&(o[H.LABEL_KEY]=H.EMPTY_KEY,o[H.LABEL_VALUE]=n.EMPTY_VALUE||H.EMPTY_VALUE,r.push(o)),a.each(i,e=>{const t=e[n.aliasColumn],i={};null!==t&&""!==t&&(i[H.LABEL_KEY]=t,i[H.LABEL_VALUE]=t,r.push(i))}),Z(e,n),e.dataset=r}function ee(e,t,i){if(e&&t&&!t.isDataSetBound)if(Y(t[i.widget])){const n=K(e,t);t.dataoptions=n,Z(t,Object.assign(i||{},n)),t.datasource=e}else X(t.viewParent,t.filterexpressions,n=>{t.filterexpressions=n,Q(e,t,i.widget).then(e=>{J(e.field,e.data,{aliasColumn:e.aliasColumn,widget:i.widget,isEnableEmptyFilter:ae(i.enableemptyfilter),EMPTY_VALUE:i.EMPTY_VALUE})})})}function te(e){return t.isDefined(e)&&""!==e&&null!==e}function ie(e,t){let i;return te(e)&&te(t)?i=[e,t]:te(e)?i=e:te(t)&&(i=t),i}function ne(e,i){let n;return te(e)&&te(i)?n=t.MatchMode.BETWEEN:te(e)?n=t.MatchMode.GREATER:te(i)&&(n=t.MatchMode.LESSER),n}function ae(e){return e&&a.intersection(e.split(","),H.NULL_EMPTY).length>0}function se(e){let i;const n=a.split(e,",");return 2===a.intersection(n,H.NULL_EMPTY).length?i=t.MatchMode.NULLOREMPTY:a.includes(n,H.NULL)?i=t.MatchMode.NULL:a.includes(n,H.EMPTY)&&(i=t.MatchMode.EMPTY),i}const oe=e=>a.isUndefined(e)||a.isNull(e)?[]:(a.isString(e)&&(e=e.split(",").map(Function.prototype.call,String.prototype.trim)),a.isArray(e)||(e=[e]),e);const re=b.default||window.moment,le=re.localeData(),ce=t.getClonedObject(le._calendar),de=le._calendarDay||{lastDay:"[Yesterday]",lastWeek:"[Last] dddd",nextDay:"[Tomorrow]",nextWeek:"dddd",sameDay:"[Today]",sameElse:"L"},pe="alphabet",me="Others",he={HOUR:"hour",DAY:"day",WEEK:"week",MONTH:"month",YEAR:"year"},ue="yyyy-MM-dd",ge="w 'Week', yyyy",ve="MMM, yyyy",fe="YYYY",be="hh:mm a",ye=(e,t,i)=>{if(!t)return a.cloneDeep(e);const n=t.split(","),s=[],o=[];return n.forEach(e=>{const t=e.split(":");s.push(i?i+"."+t[0]:t[0]),o.push(t[1])}),a.orderBy(e,s,o)},we=e=>(a.isString(e)&&(e=a.split(e,",").map(e=>e.trim())),e),Pe=(e,i,n,s)=>{if(e&&"wm-search"===e.widgetType)if(e.groupby)if(a.includes(e.groupby,"(")){const a=t.$parseEvent(e.groupby);n.groupby=a(i,{row:n.dataObject||n})}else n.groupby=Ie(e.groupby,e.match,s,e.dateformat,e.datePipe,e.appDefaults,n);else n.groupby=""},Ce=(e,t,i,n,s,o,r,l)=>{i===he.DAY&&(le._calendar=de),e=a.orderBy(e,e=>{const i=a.get(r?e[r]:e,t);if(i)return a.toLower(i)});const c=a.groupBy(e,Ie.bind(void 0,t,i,r,s,o,l));return le._calendar=ce,c},Te=(e,i,n,a)=>"timestamp"===i?e:t.getFormattedDate(a,e,i||n),Oe=(e,t,i,n,a)=>{let s,o=re(e),r=i;const l=re(),c=function(){return"["+Te(this.valueOf(),r,ue,n)+"]"};switch(t){case he.HOUR:r=r||a.timeFormat,o.isValid()||(o=re((new Date).toDateString()+" "+e),o.isValid()&&(le._calendar.sameDay=function(){return"["+Te(this.valueOf(),r,be,n)+"]"})),o=o.startOf("hour"),le._calendar.sameElse=c,s=o.calendar(l);break;case he.WEEK:s=Te(o.valueOf(),r,ge,n);break;case he.MONTH:s=Te(o.valueOf(),r,ve,n);break;case he.YEAR:s=o.format(fe);break;case he.DAY:r=r||a.dateFormat,o=o.startOf("day"),le._calendar.sameElse=c,s=o.calendar(l)}return"Invalid date"===s?me:s},Ie=(e,t,i,n,s,o,r)=>{let l=a.get(i?r[i]:r,e);return a.isUndefined(l)||a.isNull(l)||""===l.toString().trim()?me:(t===pe&&(l=l.substr(0,1)),a.includes(a.values(he),t)&&(l=Oe(l,t,n,s,o)),l)};const De="default",Ee="label",Re=(e,t,i,n)=>{a.forEach(e,e=>{if(a.get(e,"isGroup"))if(e.field===i){const i=e.columns?.findIndex(e=>e?.field===t.field);-1==i?e.columns[n]=t:e.columns[i]=t}else Re(e.columns,t,i,n)})},Se=e=>"true"===e||"false"!==e&&(/^\d+$/.test(e)?+e:e),_e={integer:["number","text","select","checkboxset","radioset","rating","slider","currency","autocomplete","chips"],big_integer:["number","text","select","checkboxset","radioset","rating","slider","currency","autocomplete","chips"],short:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],float:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],big_decimal:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],number:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],double:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],long:["number","text","select","checkboxset","radioset","rating","slider","currency","autocomplete","chips"],byte:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],string:["text","number","textarea","password","richtext","select","checkboxset","radioset","date","time","timestamp","switch","currency","autocomplete","chips","colorpicker"],character:["text","number","textarea","password","richtext","select","checkboxset","radioset","switch","currency","autocomplete","chips"],text:["text","number","textarea","password","richtext","select","checkboxset","radioset","date","time","timestamp","switch","currency","autocomplete","chips","colorpicker"],date:["date","text","number","select","checkboxset","radioset","autocomplete","chips"],time:["time","text","number","select","checkboxset","radioset","autocomplete","chips"],timestamp:["timestamp","text","number","select","checkboxset","radioset","autocomplete","chips"],datetime:["datetime","text","select","checkboxset","radioset","autocomplete","chips"],boolean:["checkbox","radioset","toggle","iconbutton-toggle","select"],list:["select","radioset","checkboxset","switch","autocomplete","chips"],clob:["text","textarea","richtext"],blob:["upload"],file:["upload"],custom:["text","number","textarea","password","checkbox","toggle","slider","richtext","currency","switch","select","checkboxset","radioset","date","time","timestamp","rating","datetime","autocomplete","chips","colorpicker"]},xe="wm-form-field-",Ae=(()=>{const e=new Map;for(const i in t.FormWidgetType)e.set(xe+t.FormWidgetType[i],new Map);return e})(),ke=e=>Ae.get(e),Ne=(e,t)=>{Ae.set(e,t),window.WM_LOADED_COMPONENTS=[...window.WM_LOADED_COMPONENTS||[],e]};var Me;e.PROP_TYPE=void 0,(Me=e.PROP_TYPE||(e.PROP_TYPE={}))[Me.BOOLEAN=1]="BOOLEAN",Me[Me.NUMBER=2]="NUMBER",Me[Me.STRING=3]="STRING";const Le={type:e.PROP_TYPE.STRING},Fe={type:e.PROP_TYPE.NUMBER},$e={type:e.PROP_TYPE.BOOLEAN},je={arrayType:!0};var Ve;e.APPLY_STYLES_TYPE=void 0,(Ve=e.APPLY_STYLES_TYPE||(e.APPLY_STYLES_TYPE={}))[Ve.CONTAINER=0]="CONTAINER",Ve[Ve.SCROLLABLE_CONTAINER=1]="SCROLLABLE_CONTAINER",Ve[Ve.INNER_SHELL=2]="INNER_SHELL",Ve[Ve.SHELL=3]="SHELL";const Be={backgroundattachment:"backgroundAttachment",backgroundcolor:"backgroundColor",backgroundgradient:"backgroundGradient",backgroundimage:"backgroundImage",backgroundposition:"backgroundPosition",backgroundrepeat:"backgroundRepeat",backgroundsize:"backgroundSize",bordercolor:"borderColor",borderradius:"borderRadius",borderstyle:"borderStyle",borderwidth:"borderWidth",borderbottomwidth:"borderBottomWidth",borderleftwidth:"borderLeftWidth",borderrightwidth:"borderRightWidth",bordertopwidth:"borderTopWidth",color:"color",cursor:"cursor",display:"display",fontsize:"fontSize",fontfamily:"fontFamily",fontstyle:"fontStyle",fontunit:"fontunit",fontvariant:"fontVariant",fontweight:"fontWeight",height:"height",horizontalalign:"textAlign",lineheight:"lineHeight",margin:"margin",marginbottom:"marginBottom",marginleft:"marginLeft",marginright:"marginRight",margintop:"marginTop",opacity:"opacity",overflow:"overflow",padding:"padding",paddingbottom:"paddingBottom",paddingleft:"paddingLeft",paddingright:"paddingRight",paddingtop:"paddingTop",picturesource:"backgroundImage",textalign:"textAlign",textdecoration:"textDecoration",verticalalign:"verticalAlign",visibility:"visibility",whitespace:"whiteSpace",width:"width",wordbreak:"wordbreak",zindex:"zIndex"},Ge=e=>!!Be[e],We={height:!0,overflow:!0,padding:!0,paddingbottom:!0,paddingleft:!0,paddingright:!0,paddingtop:!0},qe={textalign:!0},ze={textalign:!0,width:!0};function Ue(i,n,a,s){const o=Object.create(null);s&&s.forEach(e=>o[e]=!0),n.registerStyleChangeListener((s,r)=>{if(!(o[s]||a===e.APPLY_STYLES_TYPE.SHELL&&We[s])){if(a===e.APPLY_STYLES_TYPE.INNER_SHELL){if(!We[s])return;"height"===s&&t.setCSS(i,"overflow",r?"auto":"")}if(a!==e.APPLY_STYLES_TYPE.CONTAINER||!qe[s]){if(a===e.APPLY_STYLES_TYPE.SCROLLABLE_CONTAINER){if(ze[s])return;"height"===s&&t.setCSS(i,"overflow",r?"auto":"")}"fontsize"===s||"fontunit"===s?t.setCSS(i,"fontSize",""===n.fontsize?"":n.fontsize+(n.fontunit||"px")):"backgroundimage"===s?t.setCSS(i,"backgroundImage",n.picturesource||k(r)):Be[s]&&t.setCSS(i,Be[s],r)}}})}const He=new Map,Ye=new t.IDGenerator("widget-id"),Xe=new Map([["tap","click"]]),Ke={BLOCK:"block",INLINE_BLOCK:"inline-block",INLINE:"inline"},Qe=new Set(["readonly","autofocus","disabled","startchecked","multiple","selected","required","controls","autoplay","loop","muted","show"]),Ze=e=>Qe.has(e),Je=new Set(["width","height","iconheight","iconwidth","popoverwidth","popoverheight","imagewidth","imageheight"]),et=e=>Je.has(e),tt=(i,n,s)=>{const o=i.widgetId,r=i[n];t.isChangeFromWatch()||t.$unwatch(L(o,n)),t.resetChangeFromWatch();const l=ke(i.getWidgetSubType()),c=l?l.get(n):void 0;if(c){const i=c.type;i&&(s=((i,n,a)=>{if(a===e.PROP_TYPE.BOOLEAN)return t.toBoolean(n,Ze(i)&&i);if(a===e.PROP_TYPE.NUMBER){const e=+n;return"tabindex"!==i||!isNaN(e)||null!=n&&""!==n?e:0}return n})(n,s,i))}if(s!==r||t.isObject(s)||t.isObject(r)){if(et(n))s=t.toDimension(s);else if(a.startsWith(s,"resources/")||a.startsWith(s,"./resources/")){a.startsWith(s,"./resources/")&&(s=s.slice(2));const e=i;if(void 0===e._parentPrefab_){let t=i.$element.parent().closest('[prefabname][prefabname!="__self__"]').attr("prefabname");void 0===t&&(t=i.viewParent.prefabName),e._parentPrefab_=t||""}e._parentPrefab_&&"__self__"!==e._parentPrefab_?s=(t._WM_APP_PROJECT.isPreview?"./app/prefabs":`${t._WM_APP_PROJECT.cdnUrl}resources`)+`/${e._parentPrefab_}/${s}`:c&&s!=c.value&&(s=(t._WM_APP_PROJECT.isPreview?"":t._WM_APP_PROJECT.cdnUrl)+s)}i[n]=s,Ge(n)?i.notifyStyleChange(n,s,r):("conditionalclass"===n&&(s=G(s,r)),c&&i.notifyPropertyChange(n,s,r)),t.$appDigest()}},it={set:(e,t,i)=>(tt(e,t,i),!0),get:(e,t)=>{const i=e[t];return a.isFunction(i)?i.bind(e):i}},nt=window.requestAnimationFrame;let at=[];class st{static create(e,t,i){if(window.Proxy)return new Proxy(e,it);{const t=Object.create(e);return n=()=>{for(const t in e)a.isFunction(e[t])&&"constructor"!==t&&"super"!==t&&!a.startsWith(t,"ng")&&(e[t]=e[t].bind(e))},at.length||nt(()=>{at.forEach(e=>e()),at=[]}),at.push(n),Object.keys(Be).forEach(i=>{Object.defineProperty(t,i,{get:()=>e[i],set:t=>tt(e,i,t)})}),i&&i.forEach((i,n)=>{Object.defineProperty(t,n,{get:()=>e[n],set:t=>tt(e,n,t)})}),t}var n}}class ot{get $element(){return $(this.nativeElement)}constructor(e,n,s,l){this.inj=e,this.isAttached=!1,this.styleChange=new r.ReplaySubject,this.propertyChange=new r.Subject,this.readyState=new r.Subject,this.destroy=new r.Subject,this.eventHandlers=new Map,this.toBeSetupEventsQueue=[],this.__cloneable__=!1,this.$attrs=new Map,this.isMuted=!1,this.customInjectorMap={};const c=e.get(i.ElementRef);this.nativeElement=c.nativeElement,this.viewParentApp=e?e.get(t.App):i.inject(t.App),this.widgetType=n.widgetType,this.widgetSubType=n.widgetSubType||n.widgetType,this.viewContainerRef=e.get(i.ViewContainerRef);let d=this.inj._lView;this.viewParent=t.findParent(d,this.viewParentApp),this.context=this.inj._lView[8],this.displayType=n.displayType||Ke.BLOCK,this.widget=this.createProxy(),this.eventManager=e.get(o.EventManager),this.nativeElement.widget=this.widget,this.appLocale=e.get(t.App).appLocale||{},this.initContext(),n.hostClass&&t.addClass(this.nativeElement,n.hostClass),this.widgetId=this.generateWidgetId(),this.trackId=this.generateWidgetId(),t.setAttr(this.nativeElement,"widget-id",this.widgetId,!0),this.registerStyleChangeListener(this.onStyleChange,this),this.registerPropertyChangeListener(this.onPropertyChange,this),l?(this.delayedInit=!0,l.then(e=>{let t="wm-form-field-custom-widget"===this.widgetSubType,i=this.widgetSubType.startsWith("wm-custom-");(t||i)&&(this.customWidgetSubType=t?"wm-form-field-"+a.last(this.formWidget.config.widgetType.split("-")):this.config.widgetType),this.initWidget(),this.setInitProps(),e&&e()})):this.initWidget(),s&&a.extend(this.context,s)}getNativeElement(){return this.nativeElement}getWidgetType(){return this.widgetType}getWidgetSubType(){return this.widgetSubType}getWidget(){return this.widget}setProperty(e,t){this.widget[e]=t}getViewParent(){return this.viewParent}notifyStyleChange(e,t,i){this.styleChange.next({key:e,nv:t,ov:i})}notifyPropertyChange(e,t,i){this.propertyChange.next({key:e,nv:t,ov:i})}registerStyleChangeListener(e,t){t&&(e=e.bind(t)),this.styleChange.subscribe(({key:t,nv:i,ov:n})=>e(t,i,n))}registerReadyStateListener(e,t){t&&(e=e.bind(t)),this.readyState.isStopped?e():this.readyState.subscribe(()=>e())}registerPropertyChangeListener(e,t){t&&(e=e.bind(t)),this.propertyChange.subscribe(({key:t,nv:i,ov:n})=>e(t,i,n))}registerDestroyListener(e,t){e&&(t&&(e=e.bind(t)),this.destroy.subscribe(()=>{},()=>{},()=>{try{e&&"function"==typeof e&&e()}catch(e){}}))}getDisplayType(){return this.displayType}createProxy(){return st.create(this,this.widgetSubType,ke(this.widgetSubType))}initContext(){const e=this.context||{},t=this.inj.get(I,{});if(this.viewParent!==e?this.context=e:this.context={},t){let e={};a.isArray(t)?a.forEach(t,t=>{Object.assign(e,t)}):e=t,this.context=Object.assign({},e,this.context)}}setWidgetProperty(e,t){this.widget[e]=t}getAttr(e){return this.$attrs.get(e)}getAppInstance(){return this.inj.get(t.App)}generateWidgetId(){return Ye.nextUid()}onPropertyChange(e,i,n){if("show"===e)this.nativeElement.hidden=!i;else if("hint"===e)t.setAttr(this.nativeElement,"title",i);else if("class"===e)t.switchClass(this.nativeElement,i,n);else if("name"===e||"tabindex"===e)t.setAttr(this.nativeElement,e,i),"name"===e&&i&&((e,i,n,a)=>{t.isDefined(e.Widgets)&&(a&&delete e.Widgets[a],n&&(e.Widgets[n]=i))})(this.viewParent,this.widget,i,n);else if("conditionalclass"===e)s=i.toAdd,o=i.toRemove,r=this.nativeElement,o&&o.length&&t.removeClass(r,a.join(o," ")),s&&s.length&&t.addClass(r,a.join(s," "));else if("autoplay"===e){const e="wm-audio"===this.widgetType?"audio":"video";this.nativeElement.querySelector(e).load()}else"conditionalstyle"===e?((e,i,n)=>{i&&a.isObject(i)&&Object.keys(i||{}).forEach(function(e){t.setCSS(n,e,"")});e&&a.isObject(e)&&t.setCSSFromObj(n,e)})(i,n,this.nativeElement):"animation"===e?t.addClass(this.nativeElement,"animated "+i):"disabled"===e?!0===i?t.setAttr(this.nativeElement,"disabled","true",!0):t.removeAttr(this.nativeElement,"disabled",!0):"autofocus"===e&&i&&this.focus();var s,o,r}onStyleChange(e,t,i){}registerWidget(e){this.registerDestroyListener(((e,i,n,a)=>{let s=!1;return He.set(n,e),a&&t.isDefined(i.Widgets)&&(s=!0,i.Widgets[a]=e),()=>{He.delete(n),s&&delete i.Widgets[a]}})(this.widget,this.viewParent,this.widgetId,e))}getMappedEventName(e){return Xe.get(e)||e}handleEvent(e,t,i,n,a){this.eventManager.addEventListener(e,t,e=>{if(n.$event=e,"delayed"!==a)return i();setTimeout(()=>i(),150)})}processEventAttr(e,i,n,s){const o=t.$parseEvent(i),r=this.context;r.widget=s?s.widget:this.widget;const l=o.bind(void 0,s?this.viewParent.viewParent:this.viewParent,r);let c=s?s.widget:this,d=s?s.nativeElement:this.nativeElement;const p=()=>{let i;t.$invokeWatchers(!0);try{return r.$event=r.$event||new window.CustomEvent(e),i=l(),i instanceof Promise?i.then(e=>e,t=>{const i=c.name||c.widgetId||"unknown";return console.error(`Error in promise returned by event callback "${e}" on widget "${i}":`,t),t}):i}catch(t){const i=c.name||c.widgetId||"unknown",n=t.message||String(t);return console.error(`Error executing event callback "${e}" on widget "${i}":`,n),void console.error("Event expression context:",{eventName:e,widgetName:i,locals:r})}};s&&!s.widget.eventHandlers&&(s.widget.eventHandlers=new Map),c.eventHandlers.set(this.getMappedEventName(e),{callback:p,locals:r});const m=a.camelCase(`on-${e}`);c[m]=p,this.toBeSetupEventsQueue.push(()=>{this.handleEvent(d,this.getMappedEventName(e),p,r,n)})}processBindAttr(e,i,n){n||this.initState.delete(e);let a=n?n.widget.viewParent.viewParent:this.viewParent,s=n?n.widget.context:this.context,o=n?n.widget:this.widget,r=n?n.widget.isMuted:this.isMuted,l=n?n.widget.widgetProps:this.widgetProps,c=n?n.widget.widgetId:this.widgetId;const d=l.get(e)||{};["class","style","ngclass","ngstyle"].includes(e.toLowerCase())&&(d.throttle=100),this.registerDestroyListener(t.$watch(i,a,s,t=>{e.startsWith("base-")&&o.updateData&&o.updateData(e,t),o[e]=t},L(c,e),"datasource"===e,d,()=>r))}removePropertyBinding(e){t.$unwatch(L(this.widgetId,e))}invokeEventCallback(e,t){const i=this.eventHandlers.get(e);if(i){const n=i.callback,a=i.locals||{};if(n)try{return n(Object.assign(a,t))}catch(t){const i=this.name||this.widgetId||"unknown",n=t?.message||String(t);return console.error(`Error executing event callback "${e}" on widget "${i}":`,n),void console.error("Full error:",t)}}}processAttr(e,i,n){const{0:a,1:s,2:o,length:r}=e.split(".");"bind"===s?("show"!==a||this.widgetSubType.startsWith("wm-custom-")||(this.nativeElement.hidden=!0),this.processBindAttr(a,i,n)):"event"!==s||this.nativeElement.hasAttribute("wmwidgetcontainer")?1===r&&("class"===e?t.removeClass(this.nativeElement,i):"tabindex"!==e&&"name"!==e||t.removeAttr(this.nativeElement,e),this.initState.set(a,i)):this.processEventAttr(a,i,o,n)}getAttributes(){let e=this.inj._tNode.attrs,t=Array.from(this.nativeElement.attributes).map(e=>e.name);return null===e||a.forEach(e,(e,i)=>{if("number"==typeof e)return!1;if("string"==typeof e&&i%2==0){let i=e.toLowerCase();if(t.includes(i)){let n=t.indexOf(i);t[n]=e}}}),t.sort()}processAttrs(){a.map(this.getAttributes(),e=>{let t=this.nativeElement.attributes[e].value;this.$attrs.set(e,t),this.processAttr(e,t)})}initWidget(){this.initState=new Map;const e=ke(this.widgetSubType);if(this.customWidgetSubType){ke(this.customWidgetSubType).forEach((t,i)=>{e.set(i,t)})}e.forEach((e,i)=>{t.isDefined(e.value)&&this.initState.set(i,e.value)}),this.widgetProps=e,this.processAttrs(),this.registerWidget(this.initState.get("name"))}setInitProps(){this.initState.get("name")&&(this.widget.name=this.initState.get("name")),this.initState.forEach((e,t)=>{(this.widgetProps.get(t)||Ge(t))&&"name"!==t&&(this.widget[t]=e)}),this.initState.clear(),this.initState=void 0,this.readyState.next(null),this.readyState.complete()}hasEventCallback(e){return this.eventHandlers.has(e)}focus(){let e=this.$element[0].querySelector("[focus-target]");e||(e=this.$element[0]),e.focus()}execute(e,t){}mute(){this.isMuted=!0}unmute(){this.isMuted=!1}createCustomInjector(e,t){if(this.customInjectorMap[e]){const i=this.customInjectorMap[e].context;return i!==t&&(Object.keys(i).forEach(e=>{e in t||delete i[e]}),Object.assign(i,t)),this.customInjectorMap[e].injector}const n=i.Injector.create({providers:[{provide:"EXPLICIT_CONTEXT",useFactory:()=>t}]});return this.customInjectorMap[e]={context:t,injector:n},n}ngOnAttach(){this.isAttached=!0}ngOnDetach(){this.isAttached=!1}ngOnInit(){this.delayedInit||this.setInitProps()}ngAfterViewInit(){if(this.toBeSetupEventsQueue.length)for(const e of this.toBeSetupEventsQueue)e();this.toBeSetupEventsQueue.length=0,this.isAttached=!0}ngAfterContentInit(){}ngOnDestroy(){this.isDestroyed=!0,this.widget=Object.create(null),this.styleChange.complete(),this.propertyChange.complete(),this.destroy.complete(),this.isAttached=!1,this.context&&(Object.keys(this.context).forEach(e=>{delete this.context[e]}),this.context=null)}static{this.\u0275fac=function(e){return new(e||ot)(f.\u0275\u0275inject(f.Injector),f.\u0275\u0275inject(C),f.\u0275\u0275inject("EXPLICIT_CONTEXT",8),f.\u0275\u0275inject(Promise))}}static{this.\u0275prov=f.\u0275\u0275defineInjectable({token:ot,factory:ot.\u0275fac})}}("undefined"==typeof ngDevMode||ngDevMode)&&f.\u0275setClassMetadata(ot,[{type:i.Injectable}],()=>[{type:f.Injector},{type:void 0,decorators:[{type:i.Inject,args:[C]}]},{type:void 0,decorators:[{type:i.Inject,args:["EXPLICIT_CONTEXT"]},{type:i.Optional}]},{type:Promise}],null);class rt extends ot{static{this.\u0275fac=(()=>{let e;return function(t){return(e||(e=f.\u0275\u0275getInheritedFactory(rt)))(t||rt)}})()}static{this.\u0275prov=f.\u0275\u0275defineInjectable({token:rt,factory:rt.\u0275fac})}}("undefined"==typeof ngDevMode||ngDevMode)&&f.\u0275setClassMetadata(rt,[{type:i.Injectable}],null,null);class lt{constructor(e){this.redraw=()=>{const t=e.$element.closest("[wmtabpane]"),i=e.$element.closest("[wmaccordionpane]").find(".panel-heading");if(!(t.length&&!t.hasClass("active")||i.length&&!i.hasClass("active")))return e.widgetType.startsWith("wm-prefab")?void Object.entries(e.Widgets||{}).forEach(([e,t])=>{"function"==typeof t.redraw&&t.redraw()}):e.redraw&&e.redraw()}}static{this.\u0275fac=function(e){return new(e||lt)(f.\u0275\u0275directiveInject(T,2))}}static{this.\u0275dir=f.\u0275\u0275defineDirective({type:lt,selectors:[["","redrawable",""]]})}}("undefined"==typeof ngDevMode||ngDevMode)&&f.\u0275setClassMetadata(lt,[{type:i.Directive,args:[{standalone:!0,selector:"[redrawable]"}]}],()=>[{type:void 0,decorators:[{type:i.Self},{type:i.Inject,args:[T]}]}],null);class ct extends rt{constructor(e,t,i){super(e,t,i)}updateRedrawableComponents(e){a.pickBy(e,e=>{e&&e.nativeElement&&e.nativeElement.hasAttribute("redrawable")&&!a.includes(this.reDrawableComponents._results,e)&&this.reDrawableComponents._results.push(e),e&&e.Widgets&&this.updateRedrawableComponents(e.Widgets)})}redrawChildren(){this.content&&this.Widgets&&this.updateRedrawableComponents(this.Widgets),setTimeout(()=>{this.reDrawableComponents&&this.reDrawableComponents.forEach(e=>e.redraw())},100)}onPropertyChange(e,t,i){super.onPropertyChange(e,t,i),"show"===e&&t&&this.redrawChildren()}ngOnDestroy(){this.reDrawableComponents&&(this.reDrawableComponents._results&&(this.reDrawableComponents._results.length=0),this.reDrawableComponents.reset([])),this.Widgets&&(Object.keys(this.Widgets).forEach(e=>{delete this.Widgets[e]}),this.Widgets=null),this.content=null,super.ngOnDestroy()}static{this.\u0275fac=function(e){f.\u0275\u0275invalidFactory()}}static{this.\u0275dir=f.\u0275\u0275defineDirective({type:ct,contentQueries:function(e,t,i){if(1&e&&f.\u0275\u0275contentQuery(i,lt,5),2&e){let e;f.\u0275\u0275queryRefresh(e=f.\u0275\u0275loadQuery())&&(t.reDrawableComponents=e)}},features:[f.\u0275\u0275InheritDefinitionFeature]})}}("undefined"==typeof ngDevMode||ngDevMode)&&f.\u0275setClassMetadata(ct,[{type:i.Directive}],()=>[{type:f.Injector},{type:void 0},{type:void 0}],{reDrawableComponents:[{type:i.ContentChildren,args:[lt,{descendants:!0}]}]});const dt=e=>{if(e)return/^(\/|#\/|#)(?!\W).*/.test(e)?`#/${e=a.first(e.match(/[\w]+.*/g))||""}`:a.startsWith(e,"www.")?`//${e}`:e};class pt extends rt{constructor(e,t,i){super(e,t,i),this.nodes=[],this.nodes$=new r.Subject,this._resetNodes=a.debounce(this.resetNodes,50),this.securityService=this.inj.get(l.SecurityService),this.binditemlabel=this.nativeElement.getAttribute("itemlabel.bind"),this.binditemhint=this.nativeElement.getAttribute("itemhint.bind"),this.binditemicon=this.nativeElement.getAttribute("itemicon.bind"),this.binditemaction=this.nativeElement.getAttribute("itemaction.bind"),this.binditembadge=this.nativeElement.getAttribute("itembadge.bind"),this.binditemchildren=this.nativeElement.getAttribute("itemchildren.bind"),this.binditemid=this.nativeElement.getAttribute("itemid.bind"),this.binditemlink=this.nativeElement.getAttribute("itemlink.bind"),this.binditemtarget=this.nativeElement.getAttribute("itemtarget.bind"),this.binduserrole=this.nativeElement.getAttribute("userrole.bind"),this.bindisactive=this.nativeElement.getAttribute("isactive.bind")}getNode(e,i){const n=this.viewParent.pageScope||this.viewParent,s=R(i,{field:this.itemchildren,bindExpression:this.binditemchildren},n)||a.get(i,e.childrenField),o={action:R(i,{field:this.itemaction,bindExpression:this.binditemaction},n)||a.get(i,e.actionField),badge:R(i,{field:this.itembadge,bindExpression:this.binditembadge},n)||a.get(i,e.badgeField),children:Array.isArray(s)?this.getNodes(s):[],class:a.get(i,e.classField),disabled:i.disabled,icon:R(i,{field:this.itemicon,bindExpression:this.binditemicon},n)||a.get(i,e.iconField),id:R(i,{field:this.itemid,bindExpression:this.binditemid},n)||a.get(i,e.idField),label:R(i,{field:this.itemlabel,bindExpression:this.binditemlabel},n)||a.get(i,e.labelField),hint:R(i,{field:this.itemhint,bindExpression:this.binditemhint},n)||a.get(i,e.hintField),link:dt(R(i,{field:this.itemlink,bindExpression:this.binditemlink},n)||a.get(i,e.linkField)),target:dt(R(i,{field:this.itemtarget,bindExpression:this.binditemtarget},n)||a.get(i,e.targetField)),role:R(i,{field:this.userrole,bindExpression:this.binduserrole},n),isactive:R(i,{field:this.isactive,bindExpression:this.bindisactive},n),value:this.datafield?"All Fields"===this.datafield?i:t.findValueOf(i,this.datafield):i};return a.omitBy(o,a.isUndefined)}resetItemFieldMap(){this._itemFieldMap=null}getItemFieldsMap(){return this._itemFieldMap||(this._itemFieldMap={idField:this.itemid||"itemid",iconField:this.itemicon||"icon",labelField:this.itemlabel||"label",hintField:this.itemhint||"hint",linkField:this.itemlink||"link",targetField:this.itemtarget||"target",badgeField:this.itembadge||"badge",childrenField:this.itemchildren||"children",classField:this.itemclass||"class",actionField:this.itemaction||"action",isactiveField:this.isactive||"isactive"}),this._itemFieldMap}prepareNodeDataSet(e){return(e=oe(e)).map(e=>t.isObject(e)?e:{label:e,value:e})}getNodes(e=this.dataset||{}){let i=ye(this.prepareNodeDataSet(e),this.orderby)||[];if(i.length){const e=this.userrole,n=this.getItemFieldsMap();i=i.reduce((i,a)=>(t.validateAccessRoles(a[e],this.securityService.loggedInUser)&&i.push(this.getNode(n,a)),i),[])}return i}resetNodes(){this.resetItemFieldMap(),this.nodes=this.getNodes(),t.$appDigest(),this.nodes$.next(null)}onPropertyChange(e,t,i){switch(e){case"dataset":case"itemicon":case"itemlabel":case"itemhint":case"itemlink":case"itemtarget":case"itemclass":case"itemchildren":case"isactive":case"orderby":this._resetNodes()}super.onPropertyChange(e,t,i)}ngOnDestroy(){this._resetNodes&&this._resetNodes.cancel&&(this._resetNodes.cancel(),this._resetNodes=null),this.nodes$&&(this.nodes$.complete(),this.nodes$=null),this.nodes=[],this.dataset=null,this._itemFieldMap=null,this.binditemlabel=null,this.binditemhint=null,this.binditemicon=null,this.binditemaction=null,this.binditembadge=null,this.binditemchildren=null,this.binditemlink=null,this.binditemtarget=null,this.binduserrole=null,this.bindisactive=null,this.binditemid=null,super.ngOnDestroy()}static{this.\u0275fac=function(e){f.\u0275\u0275invalidFactory()}}static{this.\u0275prov=f.\u0275\u0275defineInjectable({token:pt,factory:pt.\u0275fac})}}("undefined"==typeof ngDevMode||ngDevMode)&&f.\u0275setClassMetadata(pt,[{type:i.Injectable}],()=>[{type:f.Injector},{type:void 0},{type:void 0,decorators:[{type:i.Inject,args:["EXPLICIT_CONTEXT"]},{type:i.Optional}]}],null);class mt{get name(){return this.componentInstance.name}async _renderPartial(e){if(e)try{this.vcRef.clear(),t.$invokeWatchers(!0);const i=this.resolvePrefabContext(),n=await this.partialRefProvider.getComponentFactoryRef(e,t.ComponentType.PARTIAL,{prefab:i});if(!n)return void console.error(`Failed to load partial component: ${e}`);const a=this.vcRef.createComponent(n,{index:0,environmentInjector:this.envInjector,injector:this.inj});a.instance&&i&&(a.instance.prefabName=i),this.$target||(this.$target=this.elRef.nativeElement.querySelector("[partial-container-target]")||this.elRef.nativeElement),this.$target.innerHTML="",this.$target.appendChild(a.location.nativeElement),this.contentInitialized=!0,setTimeout(()=>this.onLoadSuccess(),200)}catch(t){console.error(`Error rendering partial ${e}:`,t)}}resolvePrefabContext(){const e=$(this.elRef.nativeElement).closest(".app-prefab");return e.length?e.attr("prefabname"):this.componentInstance.viewParent?.prefabName?this.componentInstance.viewParent.prefabName:void 0}onLoadSuccess(){this.componentInstance.invokeEventCallback("load"),this.app.notify("partialLoaded")}constructor(e,i,n,s,o,r,l,d){this.componentInstance=e,this.vcRef=i,this.elRef=n,this.inj=s,this.envInjector=o,this.app=r,this.partialRefProvider=d,this.contentInitialized=!1,this.renderPartial=a.debounce(this._renderPartial,200),e.registerPropertyChangeListener((i,n,a)=>{"content"===i&&("isInlineContent"in e&&(e.isInlineContent=!(n&&""!==n)),e.$lazyLoad?e.$lazyLoad=()=>{this.renderPartial(n),e.$lazyLoad=t.noop}:this.renderPartial(n))});const p=e.params$.pipe(c.filter(()=>this.contentInitialized),c.debounceTime(200)).subscribe(()=>this.renderPartial(e.content));e.registerDestroyListener(()=>p.unsubscribe())}ngOnDestroy(){this.vcRef&&this.vcRef.clear(),this.renderPartial&&this.renderPartial.cancel&&this.renderPartial.cancel(),this.renderPartial=null,this.$target=null,this.contentInitialized=!1}static{this.\u0275fac=function(e){return new(e||mt)(f.\u0275\u0275directiveInject(T,2),f.\u0275\u0275directiveInject(f.ViewContainerRef),f.\u0275\u0275directiveInject(f.ElementRef),f.\u0275\u0275directiveInject(f.Injector),f.\u0275\u0275directiveInject(f.EnvironmentInjector),f.\u0275\u0275directiveInject(v.App),f.\u0275\u0275injectAttribute("content"),f.\u0275\u0275directiveInject(v.PartialRefProvider))}}static{this.\u0275dir=f.\u0275\u0275defineDirective({type:mt,selectors:[["","partialContainer",""]]})}}("undefined"==typeof ngDevMode||ngDevMode)&&f.\u0275setClassMetadata(mt,[{type:i.Directive,args:[{standalone:!0,selector:"[partialContainer]"}]}],()=>[{type:void 0,decorators:[{type:i.Self},{type:i.Inject,args:[T]}]},{type:f.ViewContainerRef},{type:f.ElementRef},{type:f.Injector},{type:f.EnvironmentInjector},{type:v.App},{type:void 0,decorators:[{type:i.Attribute,args:["content"]}]},{type:v.PartialRefProvider}],null);class ht{constructor(e,t,i,n,a,s,o,r){this.componentInstance=e,this.vcRef=t,this.elRef=i,this.inj=n,this.envInjector=a,this.app=s,this.customWidgetRefProvider=r,this.loadCustomWidget(o)}async loadCustomWidget(e){if(e)try{const i=await this.customWidgetRefProvider.getComponentFactoryRef(e,t.ComponentType.WIDGET);if(!i)return void console.error(`Failed to load custom widget: ${e}`);const n=this.vcRef.createComponent(i,{index:0,environmentInjector:this.envInjector,injector:this.inj});this.elRef.nativeElement.appendChild(n.location.nativeElement)}catch(t){console.error(`Error creating custom widget ${e}:`,t)}else console.error("Custom widget name is required")}ngOnDestroy(){this.vcRef&&this.vcRef.clear(),this.elRef=null}static{this.\u0275fac=function(e){return new(e||ht)(f.\u0275\u0275directiveInject(T,2),f.\u0275\u0275directiveInject(f.ViewContainerRef),f.\u0275\u0275directiveInject(f.ElementRef),f.\u0275\u0275directiveInject(f.Injector),f.\u0275\u0275directiveInject(f.EnvironmentInjector),f.\u0275\u0275directiveInject(v.App),f.\u0275\u0275injectAttribute("widgetname"),f.\u0275\u0275directiveInject(v.CustomWidgetRefProvider))}}static{this.\u0275dir=f.\u0275\u0275defineDirective({type:ht,selectors:[["","customWidgetContainer","","widgetname",""]]})}}("undefined"==typeof ngDevMode||ngDevMode)&&f.\u0275setClassMetadata(ht,[{type:i.Directive,args:[{standalone:!0,selector:"[customWidgetContainer][widgetname]"}]}],()=>[{type:void 0,decorators:[{type:i.Self},{type:i.Inject,args:[T]}]},{type:f.ViewContainerRef},{type:f.ElementRef},{type:f.Injector},{type:f.EnvironmentInjector},{type:v.App},{type:void 0,decorators:[{type:i.Attribute,args:["widgetname"]}]},{type:v.CustomWidgetRefProvider}],null);const ut={pattern:"regexp",max:"maxvalue",min:"minvalue",required:"required",maxlength:"maxchars",mindate:"mindate",maxdate:"maxdate",excludedates:"excludedates",excludedays:"excludedays",invalidNumber:"invalidNumber"};const gt={widgetType:"wm-item-template"};class vt extends rt{static{this.initializeProps=void Ne("wm-item-template",new Map([["content",Le]]))}get $index(){return this.context.index}set wmItemTemplate(e){this.widget.content=e}constructor(e,t,i,n){super(e,gt,n),this.app=i,this.nativeElement=t.nativeElement,this.context=this.inj._lView[8]}ngOnInit(){super.ngOnInit(),this.partialParams.item=this.userComponentParams.dataObject}ngOnDestroy(){this.context&&(Object.keys(this.context).forEach(e=>{delete this.context[e]}),this.context=null),this.partialParams&&(Object.keys(this.partialParams).forEach(e=>{delete this.partialParams[e]}),this.partialParams=null),this.userComponentParams=null,this.content=null,this.viewContainerRef=null,super.ngOnDestroy()}static{this.\u0275fac=function(e){return new(e||vt)(f.\u0275\u0275directiveInject(f.Injector),f.\u0275\u0275directiveInject(f.ElementRef),f.\u0275\u0275directiveInject(v.App),f.\u0275\u0275directiveInject("EXPLICIT_CONTEXT",8))}}static{this.\u0275dir=f.\u0275\u0275defineDirective({type:vt,selectors:[["","wmItemTemplate",""]],inputs:{userComponentParams:"userComponentParams",wmItemTemplate:"wmItemTemplate"},exportAs:["itemTemplateRef"],features:[f.\u0275\u0275ProvidersFeature([M(vt)]),f.\u0275\u0275InheritDefinitionFeature]})}}("undefined"==typeof ngDevMode||ngDevMode)&&f.\u0275setClassMetadata(vt,[{type:i.Directive,args:[{standalone:!0,selector:"[wmItemTemplate]",exportAs:"itemTemplateRef",providers:[M(vt)]}]}],()=>[{type:f.Injector},{type:f.ElementRef},{type:v.App},{type:void 0,decorators:[{type:i.Inject,args:["EXPLICIT_CONTEXT"]},{type:i.Optional}]}],{userComponentParams:[{type:i.Input}],wmItemTemplate:[{type:i.Input}]});const ft={widgetType:"wm-repeat-template",hostClass:"app-repeat-item"};class bt extends rt{static{this.initializeProps=void Ne("wm-repeat-template",new Map([["show",$e]]))}constructor(e,t){super(e,ft,t),Ue(this.nativeElement,this)}static{this.\u0275fac=function(e){return new(e||bt)(f.\u0275\u0275directiveInject(f.Injector),f.\u0275\u0275directiveInject("EXPLICIT_CONTEXT",8))}}static{this.\u0275dir=f.\u0275\u0275defineDirective({type:bt,selectors:[["","wmRepeatTemplate",""]],exportAs:["repeatItemRef"],features:[f.\u0275\u0275InheritDefinitionFeature]})}}("undefined"==typeof ngDevMode||ngDevMode)&&f.\u0275setClassMetadata(bt,[{type:i.Directive,args:[{standalone:!0,selector:"[wmRepeatTemplate]",exportAs:"repeatItemRef"}]}],()=>[{type:f.Injector},{type:void 0,decorators:[{type:i.Inject,args:["EXPLICIT_CONTEXT"]},{type:i.Optional}]}],null);const yt=["wmMessage",""],wt={widgetType:"wm-message",hostClass:"alert app-message"};class Pt extends rt{static{this.initializeProps=void Ne("wm-message",new Map([["animation",Le],["caption",{value:"Message",...Le}],["class",Le],["hideclose",{value:!1,...$e}],["name",Le],["show",{value:!0,...$e}],["type",{value:"success",...Le}]]))}constructor(e,t){super(e,wt,t),this.messageClass="",this.messageIconClass="",this.type="",Ue(this.nativeElement,this)}showMessage(e,t){e&&(this.caption=e),t&&this.setWidgetProperty("type",t),this.setWidgetProperty("show",!0)}hideMessage(){this.setWidgetProperty("show",!1)}dismiss(e){this.hideMessage(),this.invokeEventCallback("close",{$event:e})}onMessageTypeChange(e){let i,n;switch(e){case"success":i="alert-success",n="wm-sl-l sl-check";break;case"error":i="alert-danger",n="wi wi-cancel";break;case"warn":case"warning":i="alert-warning",n="wm-sl-l sl-alarm-bell";break;case"info":i="alert-info",n="wi wi-info";break;case"loading":i="alert-info alert-loading",n="fa fa-spinner fa-spin"}t.switchClass(this.nativeElement,i,this.messageClass),this.messageClass=i,this.messageIconClass=n}onPropertyChange(e,t,i){"type"===e?this.onMessageTypeChange(t):super.onPropertyChange(e,t,i)}static{this.\u0275fac=function(e){return new(e||Pt)(f.\u0275\u0275directiveInject(f.Injector),f.\u0275\u0275directiveInject("EXPLICIT_CONTEXT",8))}}static{this.\u0275cmp=f.\u0275\u0275defineComponent({type:Pt,selectors:[["","wmMessage",""]],exportAs:["wmMessage"],features:[f.\u0275\u0275ProvidersFeature([M(Pt)]),f.\u0275\u0275InheritDefinitionFeature],attrs:yt,decls:5,vars:7,consts:[["aria-hidden","true",3,"title"],[3,"innerHtml"],["title","Close","type","button","aria-label","Close",1,"btn-transparent","close",3,"click","hidden"],["aria-hidden","true"]],template:function(e,t){1&e&&(f.\u0275\u0275domElement(0,"i",0)(1,"span",1),f.\u0275\u0275domElementStart(2,"button",2),f.\u0275\u0275domListener("click",function(e){return t.dismiss(e)}),f.\u0275\u0275domElementStart(3,"span",3),f.\u0275\u0275text(4,"\xd7"),f.\u0275\u0275domElementEnd()()),2&e&&(f.\u0275\u0275classMap(f.\u0275\u0275interpolate2("icon ",t.type," ",t.messageIconClass)),f.\u0275\u0275domProperty("title",t.type+"Alert"),f.\u0275\u0275advance(),f.\u0275\u0275domProperty("innerHTML",t.caption,f.\u0275\u0275sanitizeHtml),f.\u0275\u0275advance(),f.\u0275\u0275domProperty("hidden",t.hideclose))},encapsulation:2})}}("undefined"==typeof ngDevMode||ngDevMode)&&f.\u0275setClassMetadata(Pt,[{type:i.Component,args:[{standalone:!0,selector:"[wmMessage]",providers:[M(Pt)],exportAs:"wmMessage",template:'<i aria-hidden="true" [title]="type + \'Alert\'" class="icon {{type}} {{messageIconClass}}"></i>\n<span [innerHtml]="caption"></span>\n<button title="Close" type="button" class="btn-transparent close" [hidden]="hideclose" (click)="dismiss($event)" aria-label="Close">\n <span aria-hidden="true">&times;</span>\n</button>\n'}]}],()=>[{type:f.Injector},{type:void 0,decorators:[{type:i.Inject,args:["EXPLICIT_CONTEXT"]},{type:i.Optional}]}],null),("undefined"==typeof ngDevMode||ngDevMode)&&f.\u0275setClassDebugInfo(Pt,{className:"MessageComponent",filePath:"widgets/common/message/message.component.ts",lineNumber:23});class Ct extends p.SwipeAnimation{constructor(e,i,n){super(),this.$el=e,this.app=i,this.onPullToRefresh=n,this.count=0;this.$el.prepend('<div class="refresh-container"></div>'),this.infoContainer=this.$el.find(".refresh-container"),t.isIos()&&this.infoContainer.addClass("ios-refresh-container"),this.init(this.$el)}threshold(){return 10}direction(){return $.fn.swipey.DIRECTIONS.VERTICAL}subscribe(){this.cancelSubscription=this.app.subscribe("toggle-variable-state",e=>{e.active&&this.animationInProgress?(this.count++,this.wait()):this.count>0&&this.count--,!this.count&&this.animationInProgress&&this.stopAnimation()})}bounds(e,i){const n=this.$el[0].iscroll;return i<0||n&&!isNaN(n.y)&&0!==n.y?{lower:void 0,upper:void 0}:(this.spinner||(this.spinner=t.isIos()?new Ot(this.infoContainer):new Tt(this.infoContainer),this.subscribe()),{lower:0,center:0,upper:t.isIos()?0:150,strict:!t.isIos()})}context(){return this.infoContainer.show(),t.isIos()&&this.infoContainer.addClass("entry"),{spin:e=>{this.spinner.setRotation(2*e)}}}animation(){return t.isIos()?{css:{transform:"translate3d(0, ${{$D + $d}}px, 0)",spin:"${{spin($d)}}"}}:{target:this.infoContainer,css:{transform:"translate3d(0, ${{$D + $d}}px, 0)",spin:"${{spin($d)}}",opacity:"${{min(($D + $d) / 100, 1)}}"}}}onAnimation(){this.animationInProgress=!0,this.spinner.start(),this.onPullToRefresh&&this.onPullToRefresh(),setTimeout(()=>{this.runAnimation||this.stopAnimation()})}stopAnimation(){setTimeout(()=>{this.runAnimation=!1,this.animationInProgress=!1,this.spinner.stop(),this.infoContainer.hide(),t.setCSS(this.infoContainer[0],"transform","none"),t.isIos()||t.setCSS(this.infoContainer[0],"opacity",0),this.infoContainer.removeClass("entry")},800)}wait(){this.runAnimation=!0}destroy(){this.cancelSubscription&&(this.cancelSubscription(),this.cancelSubscription=null),this.animationInProgress&&this.stopAnimation(),this.spinner&&(this.spinner.stop(),this.spinner=null),this.infoContainer&&(this.infoContainer.remove(),this.infoContainer=null)}}class Tt{constructor(e,t){this.$el=e,this.options=t||{}}polarToCartesian(e,t,i,n){const a=(n-90)*Math.PI/180;return{x:e+i*Math.cos(a),y:t+i*Math.sin(a)}}describeArc(e,t,i,n,a){const s=this.polarToCartesian(e,t,i,a),o=this.polarToCartesian(e,t,i,n),r=a-n<=180?"0":"1";return["M",s.x,s.y,"A",i,i,0,r,0,o.x,o.y,"L",o.x,o.y].join(" ")}init(){if(this.initialized)return;const e=$('<svg><path id="arc1"/></svg>'),t=$('<div class="android-spinner"></div>');t.append(e),this.$el.append(t),this.cx=t.outerWidth()/2,this.cy=t.outerHeight()/2,this.r=.6*this.cx,this.path=t.find("path"),this.initialized=!0,this.container=t}setRotation(e){this.init(),this.path.attr("d",this.describeArc(this.cx,this.cy,this.r,0,e))}start(){this.init();const e=this,t=this.options.time||1800;let i=0;this.container.addClass("spin"),this.intervalId=setInterval(()=>{let t;i+=10,t=i>720?i=0:i>360?720-i:i,e.path.attr("d",this.describeArc(e.cx,e.cy,e.r,0,t))},10*t/360)}stop(){this.intervalId&&(clearInterval(this.intervalId),this.intervalId=0),this.container.removeClass("spin")}}class Ot{constructor(e){this.$el=e}init(){if(this.svg)return;const e=$('<div class="ios-spinner"><svg></svg></div>'),t=e.find("svg");this.$el.append(e);const i=e.width();for(let e=0;e<12;e++)t[0].innerHTML+=`<line y1="${.15*i}" y2="${.3*i}"\n transform="translate(${.5*i}, ${.5*i}) rotate(${30*e})">\n </line>`;e.append(t),this.svg=t}setRotation(e){this.init(),this.svg.css("transform",`rotateZ( ${30*Math.round(e/30)}deg)`)}start(){this.init();let e=0;this.intervalId=setInterval(()=>{e+=10,this.setRotation(e)},20)}stop(){this.intervalId&&(clearInterval(this.intervalId),this.intervalId=0)}}const It={widgetType:"wm-partial",hostClass:"app-partial clearfix"};class Dt extends rt{static{this.initializeProps=void Ne("wm-partial",new Map([["name",Le]]))}constructor(e,t,i){super(e,It,i),this.viewport=t,this.registerDestroyListener(this.viewport.subscribe("resize",e=>this.callback("resize",e))),this.registerDestroyListener(this.viewport.subscribe("orientationchange",e=>this.callback("orientationchange",e)))}callback(e,t){t=a.assign({widget:this},t),this.invokeEventCallback(e,t)}ngOnAttach(){this.callback("attach")}ngOnDetach(){this.callback("detach")}ngOnDestroy(){this.callback("destroy"),super.ngOnDestroy()}static{this.\u0275fac=function(e){return new(e||Dt)(f.\u0275\u0275directiveInject(f.Injector),f.\u0275\u0275directiveInject(v.Viewport),f.\u0275\u0275directiveInject("EXPLICIT_CONTEXT",8))}}static{this.\u0275dir=f.\u0275\u0275defineDirective({type:Dt,selectors:[["","wmPartial",""]],features:[f.\u0275\u0275ProvidersFeature([M(Dt)]),f.\u0275\u0275InheritDefinitionFeature]})}}var Et;("undefined"==typeof ngDevMode||ngDevMode)&&f.\u0275setClassMetadata(Dt,[{type:i.Directive,args:[{standalone:!0,selector:"[wmPartial]",providers:[M(Dt)]}]}],()=>[{type:f.Injector},{type:v.Viewport},{type:void 0,decorators:[{type:i.Inject,args:["EXPLICIT_CONTEXT"]},{type:i.Optional}]}],null),function(e){e.LEFT_PANEL="page-left-panel",e.RIGHT_PANEL="page-right-panel",e.SWIPE_ELEM="page-left-panel-icon",e.CONTENT="app-content-column",e.HEADER="page-header",e.SEARCH="app-search"}(Et||(Et={}));const Rt=e=>`[data-role='${e}']`,St=(e,t)=>{"string"==typeof e&&(e=document.querySelector(e)),e&&(e.removeEventListener("click",t),e.addEventListener("click",t))},_t=(e,i)=>{if(t.isMobile()){if(e)try{e.widget.collapse()}catch(e){}i&&t.setCSS(i,"display","none")}},xt=(e,i)=>{$(e).each((e,n)=>{const a=$('<a class="app-header-action"><i class="wi wi-search"></i></a>');$(n).before(a),St(a,()=>((e,i)=>{"none"===$(e).css("display")?(_t(i),t.setCSS(e,"display","inline-table")):_t(i,e)})(n,i))})},At=[],kt=[];class Nt{constructor(){this.dialogRefsCollection=new Map,this.appConfirmDialog="_app-confirm-dialog"}register(e,t,i){e&&(this.dialogRefsCollection.get(e)?this.dialogRefsCollection.get(e).set(i,t):this.dialogRefsCollection.set(e,new Map([[i,t]])))}getDialogRefsCollection(){return this.dialogRefsCollection}deRegister(e,t){e&&this.dialogRefsCollection.get(e)&&this.dialogRefsCollection.get(e).delete(t)}getDialogRef(e,t){const i=this.dialogRefsCollection.get(e);let n;return t?(n=i.get(t),n||(t.pageName||t.partialName||t.prefabName?console.error('No dialog with the name "'+e+'" found in the given scope.'):i.forEach((t,i)=>{i&&"Common"===i.partialName?n=t:console.error('No dialog with the name "'+e+'" found in the App scope.')}))):1===i.size?n=i.entries().next().value[1]:console.error("There are multiple instances of this dialog name. Please provide the Page/Partial/App instance in which the dialog exists."),n}open(e,t,i){const n=this.getDialogRef(e,t);n&&n.open(i)}close(e,t,i){const n=this.getDialogRef(e,t);n&&(n.closeCallBackFn=i,n.close())}closeAllDialogs(){a.forEach(At.reverse(),e=>{e.close()})}showAppConfirmDialog(e){this.open(this.getAppConfirmDialog(),void 0,e)}closeAppConfirmDialog(){this.close(this.getAppConfirmDialog())}getAppConfirmDialog(){return this.appConfirmDialog}setAppConfirmDialog(e){this.appConfirmDialog=e}addToOpenedDialogs(e){At.push(e)}getLastOpenedDialog(){return At[At.length-1]}removeFromOpenedDialogs(e){if(-1!==At.indexOf(e)&&At.splice(At.indexOf(e),1),0===At.length&&t.isMobile()){$("body > app-root")[0].removeAttribute("aria-hidden")}}getOpenedDialogs(){return At}addToClosedDialogs(e){kt.push(e)}removeFromClosedDialogs(e){-1!==kt.indexOf(e)&&kt.splice(kt.indexOf(e),1)}getDialogRefFromClosedDialogs(){return kt[kt.length-1]}static{this.\u0275fac=function(e){return new(e||Nt)}}static{this.\u0275prov=f.\u0275\u0275defineInjectable({token:Nt,factory:Nt.\u0275fac})}}("undefined"==typeof ngDevMode||ngDevMode)&&f.\u0275setClassMetadata(Nt,[{type:i.Injectable}],()=>[],null);class Mt{constructor(e,t){this.pipeName=e,this.customPipeManager=t,this.pipeRef=this.customPipeManager?this.customPipeManager.getCustomPipe(e):null,this.isCustomPipe=this.pipeRef&&a.isFunction(this.pipeRef.formatter)}customFormatter(e,t,i){try{return this.pipeRef.formatter(...t,i)}catch(t){return e}}}const Lt=P.default||window.moment,Ft=e=>{let t;return a.isDate(e)||isNaN(e)||(e=parseInt(e,10)),t=Lt(e).valueOf()||Lt((new Date).toDateString()+" "+e).valueOf(),t};class $t{transform(e,t,i,n,a,s,o,r){i=a&&!o?`1.${s.length}-16`:i;const l=r?r.number:void 0;return this.decimalPipe.transform(e,i,n||l||t)}constructor(e){this.decimalPipe=e}static{this.\u0275fac=function(e){return new(e||$t)(f.\u0275\u0275directiveInject(w.DecimalPipe,16))}}static{this.\u0275pipe=f.\u0275\u0275definePipe({name:"trailingZeroDecimalPipe",type:$t,pure:!0})}}("undefined"==typeof ngDevMode||ngDevMode)&&f.\u0275setClassMetadata($t,[{type:i.Pipe,args:[{standalone:!0,name:"trailingZeroDecimalPipe"}]}],()=>[{type:w.DecimalPipe}],null);class jt extends Mt{returnFn(e,t,i){return this.isCustomPipe?(t&&(t[0]=e),this.customFormatter(e,t,i)):e}transform(e,i,n,a){let s;if("null"===e||""===e)return this.returnFn("",arguments,this.app.Variables);if(!t.isDefined(e))return this.returnFn("",arguments,this.app.Variables);if(s=Ft(e),s){if("timestamp"===i)return this.returnFn(s,arguments,this.app.Variables);if("UTC"===i)return this.returnFn(new Date(s).toISOString(),arguments,this.app.Variables);let o;const r=this.i18nService?this.i18nService.getTimezone(a):n;return o=r&&(e===s||t.hasOffsetStr(e))?Lt(s).tz(r).format(i.replaceAll("y","Y").replaceAll("d","D").replace("a","A")):this.datePipe.transform(s,i),this.returnFn(o,arguments,this.app.Variables)}return this.returnFn("",arguments,this.app.Variables)}constructor(e,t,i,n){super("toDate",n),this.datePipe=e,this.i18nService=t,this.app=i,this.customPipeManager=n}static{this.\u0275fac=function(e){return new(e||jt)(f.\u0275\u0275directiveInject(w.DatePipe,16),f.\u0275\u0275directiveInject(v.AbstractI18nService,16),f.\u0275\u0275directiveInject(v.App,16),f.\u0275\u0275directiveInject(v.CustomPipeManager,16))}}static{this.\u0275pipe=f.\u0275\u0275definePipe({name:"toDate",type:jt,pure:!0})}}("undefined"==typeof ngDevMode||ngDevMode)&&f.\u0275setClassMetadata(jt,[{type:i.Pipe,args:[{standalone:!0,name:"toDate"}]}],()=>[{type:w.DatePipe},{type:v.AbstractI18nService},{type:v.App},{type:v.CustomPipeManager}],null);class Vt{transform(e,t){if(t&&!String(t).match(/^(\d+)?\.((\d+)(-(\d+))?)?$/)&&(t="1."+t+"-"+t),!isNaN(+e)){const i=this.i18nService&&this.i18nService.getwidgetLocale()?this.i18nService.getwidgetLocale():void 0,n=i?i.number:null;return this.decimalPipe.transform(e,t,n)}}constructor(e,t){this.decimalPipe=e,this.i18nService=t}static{this.\u0275fac=function(e){return new(e||Vt)(f.\u0275\u0275directiveInject(w.DecimalPipe,16),f.\u0275\u0275directiveInject(t.AbstractI18nService,16))}}static{this.\u0275pipe=f.\u0275\u0275definePipe({name:"toNumber",type:Vt,pure:!0})}}("undefined"==typeof ngDevMode||ngDevMode)&&f.\u0275setClassMetadata(Vt,[{type:i.Pipe,args:[{standalone:!0,name:"toNumber"}]}],()=>[{type:w.DecimalPipe},{type:v.AbstractI18nService,decorators:[{type:i.Inject,args:[t.AbstractI18nService]}]}],null);class Bt{transform(e,i,n){const s=(t.CURRENCY_INFO[i]||{}).symbol||i||"";let o=new Vt(this.decimalPipe,this.i18nService).transform(e,n);const r=a.startsWith(o,"-");return r&&(o=o.replace("-","")),o?r?"-"+s+o:s+o:""}constructor(e,t){this.decimalPipe=e,this.i18nService=t}static{this.\u0275fac=function(e){return new(e||Bt)(f.\u0275\u0275directiveInject(w.DecimalPipe,16),f.\u0275\u0275directiveInject(t.AbstractI18nService,16))}}static{this.\u0275pipe=f.\u0275\u0275definePipe({name:"toCurrency",type:Bt,pure:!0})}}("undefined"==typeof ngDevMode||ngDevMode)&&f.\u0275setClassMetadata(Bt,[{type:i.Pipe,args:[{standalone:!0,name:"toCurrency"}]}],()=>[{type:w.DecimalPipe},{type:v.AbstractI18nService,decorators:[{type:i.Inject,args:[t.AbstractI18nService]}]}],null);class Gt{transform(e,t){return a.isUndefined(e)||null===e||""===e?e:(t||"")+e}static{this.\u0275fac=function(e){return new(e||Gt)}}static{this.\u0275pipe=f.\u0275\u0275definePipe({name:"prefix",type:Gt,pure:!0})}}("undefined"==typeof ngDevMode||ngDevMode)&&f.\u0275setClassMetadata(Gt,[{type:i.Pipe,args:[{standalone:!0,name:"prefix"}]}],null,null);class Wt{transform(e,t){return a.isUndefined(e)||null===e||""===e?e:e+(t||"")}static{this.\u0275fac=function(e){return new(e||Wt)}}static{this.\u0275pipe=f.\u0275\u0275definePipe({name:"suffix",type:Wt,pure:!0})}}("undefined"==typeof ngDevMode||ngDevMode)&&f.\u0275setClassMetadata(Wt,[{type:i.Pipe,args:[{standalone:!0,name:"suffix"}]}],null,null);class qt{constructor(e,t){this.app=e,this.custmeUserPipe=t}transform(e,t){let i=[];for(let e=2;e<arguments.length;e++)i.push(arguments[e]);let n=this.custmeUserPipe.getCustomPipe(t);if(!n||!a.isFunction(n.formatter))return console.warn("formatter is not defined, please check the custom pipes documentation"),e;try{return n.formatter(e,...i,this.app.Variables)}catch(i){return console.error("Pipe name: "+t,i),e}}static{this.\u0275fac=function(e){return new(e||qt)(f.\u0275\u0275directiveInject(v.App,16),f.\u0275\u0275directiveInject(v.CustomPipeManager,16))}}static{this.\u0275pipe=f.\u0275\u0275definePipe({name:"custom",type:qt,pure:!0})}}("undefined"==typeof ngDevMode||ngDevMode)&&f.\u0275setClassMetadata(qt,[{type:i.Pipe,args:[{standalone:!0,name:"custom"}]}],()=>[{type:v.App},{type:v.CustomPipeManager}],null);class zt{transform(e){let i;if(t.isDefined(e))return i=Ft(e),i?Lt(i).fromNow():void 0}static{this.\u0275fac=function(e){return new(e||zt)}}static{this.\u0275pipe=f.\u0275\u0275definePipe({name:"timeFromNow",type:zt,pure:!0})}}("undefined"==typeof ngDevMode||ngDevMode)&&f.\u0275setClassMetadata(zt,[{type:i.Pipe,args:[{standalone:!0,name:"timeFromNow"}]}],null,null);class Ut extends Vt{static{this.\u0275fac=(()=>{let e;return function(t){return(e||(e=f.\u0275\u0275getInheritedFactory(Ut)))(t||Ut)}})()}static{this.\u0275pipe=f.\u0275\u0275definePipe({name:"numberToString",type:Ut,pure:!0})}}("undefined"==typeof ngDevMode||ngDevMode)&&f.\u0275setClassMetadata(Ut,[{type:i.Pipe,args:[{standalone:!0,name:"numberToString"}]}],null,null);class Ht{transform(e){return Number(e)||void 0}static{this.\u0275fac=function(e){return new(e||Ht)}}static{this.\u0275pipe=f.\u0275\u0275definePipe({name:"stringToNumber",type:Ht,pure:!0})}}("undefined"==typeof ngDevMode||ngDevMode)&&f.\u0275setClassMetadata(Ht,[{type:i.Pipe,args:[{standalone:!0,name:"stringToNumber"}]}],null,null);class Yt{transform(e,t,i){return e?a.isObject(t)?a.filter(e,t):a.filter(e,e=>a.includes(e[t],i)):[]}static{this.\u0275fac=function(e){return new(e||Yt)}}static{this.\u0275pipe=f.\u0275\u0275definePipe({name:"filter",type:Yt,pure:!0})}}("undefined"==typeof ngDevMode||ngDevMode)&&f.\u0275setClassMetadata(Yt,[{type:i.Pipe,args:[{standalone:!0,name:"filter"}]}],null,null);class Xt{transform(e,t){let i=0;for(;e>=1024;)e/=1024,i++;return e.toFixed(+t)+" "+["bytes","KB","MB","GB","TB","PB"][i]}static{this.\u0275fac=function(e){return new(e||Xt)}}static{this.\u0275pipe=f.\u0275\u0275definePipe({name:"filesize",type:Xt,pure:!0})}}("undefined"==typeof ngDevMode||ngDevMode)&&f.\u0275setClassMetadata(Xt,[{type:i.Pipe,args:[{standalone:!0,name:"filesize"}]}],null,null);class Kt{transform(e){return"fa "+({zip:"fa-file-zip-o",pdf:"fa-file-pdf-o",rar:"fa-file-archive-o",txt:"fa-file-text-o",ppt:"fa-file-powerpoint-o",pot:"fa-file-powerpoint-o",pps:"fa-file-powerpoint-o",pptx:"fa-file-powerpoint-o",potx:"fa-file-powerpoint-o",ppsx:"fa-file-powerpoint-o",mpg:"fa-file-movie-o",mp4:"fa-file-movie-o",mov:"fa-file-movie-o",avi:"fa-file-movie-o",mp3:"fa-file-audio-o",docx:"fa-file-word-o",js:"fa-file-code-o",md:"fa-file-code-o",html:"fa-file-code-o",css:"fa-file-code-o",xlsx:"fa-file-excel-o",png:"fa-file-image-o",jpg:"fa-file-image-o",jpeg:"fa-file-image-o",file:"fa-file-o",default:"fa-file-o"}[e]||"fa-file-o")}static{this.\u0275fac=function(e){return new(e||Kt)}}static{this.\u0275pipe=f.\u0275\u0275definePipe({name:"fileIconClass",type:Kt,pure:!0})}}("undefined"==typeof ngDevMode||ngDevMode)&&f.\u0275setClassMetadata(Kt,[{type:i.Pipe,args:[{standalone:!0,name:"fileIconClass"}]}],null,null);class Qt{transform(e){return{success:"wi wi-check-circle text-success",error:"wi wi-error text-danger"}[e.toLowerCase()]}static{this.\u0275fac=function(e){return new(e||Qt)}}static{this.\u0275pipe=f.\u0275\u0275definePipe({name:"stateClass",type:Qt,pure:!0})}}("undefined"==typeof ngDevMode||ngDevMode)&&f.\u0275setClassMetadata(Qt,[{type:i.Pipe,args:[{standalone:!0,name:"stateClass"}]}],null,null);class Zt{transform(e,i){return t.replace(e,i)}static{this.\u0275fac=function(e){return new(e||Zt)}}static{this.\u0275pipe=f.\u0275\u0275definePipe({name:"templateReplace",type:Zt,pure:!0})}}("undefined"==typeof ngDevMode||ngDevMode)&&f.\u0275setClassMetadata(Zt,[{type:i.Pipe,args:[{standalone:!0,name:"templateReplace"}]}],null,null);class Jt{transform(e){return{"audio/aac":".aac","application/x-abiword":".abw","application/vnd.android.package-archive":".apk","video/x-msvideo":".avi","application/vnd.amazon.ebook":".azw","application/octet-stream":".bin","image/bmp":".bmp","application/x-bzip":".bz","application/x-bzip2":".bz2","application/x-csh":".csh","text/css":".css","text/csv":".csv","application/msword":".doc","application/vnd.openxmlformats-officedocument.wordprocessingml.document":".docx","application/vnd.ms-fontobject":".eot","application/epub+zip":".epub","application/ecmascript":".es","image/gif":".gif","text/html":".html","image/x-icon":".ico","text/calendar":".ics","application/java-archive":".jar","image/jpeg":[".jpeg",".jpg"],"application/javascript":".js","application/json":".json","audio/midi":".mid","audio/x-midi":".midi","video/mpeg":".mpeg","application/vnd.apple.installer+xml":"mpkg","application/vnd.oasis.opendocument.presentation":".odp","application/vnd.oasis.opendocument.spreadsheet":".ods","application/vnd.oasis.opendocument.text":".odt","audio/ogg":".oga","video/ogg":".ogv","application/ogg":".ogx","font/otf":".otf","image/png":".png","application/pdf":".pdf","application/vnd.ms-powerpoint":".ppt","application/vnd.openxmlformats-officedocument.presentationml.presentation":".pptx","application/x-rar-compressed":".rar","application/rtf":".rtf","application/x-sh":".sh","image/svg+xml":".svg","application/x-shockwave-flash":".swf","application/x-tar":".tar","image/tiff":".tiff","application/typescript":".ts","font/ttf":".ttf","text/plain":".txt","application/vnd.visio":".vsd","audio/wav":".wav","audio/webm":".weba","video/webm":".webm","image/webp":".webp","font/woff":".woff","font/woff2":".woff2","application/xhtml+xml":".xhtml","application/vnd.ms-excel":".xls","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":".xlsx","application/xml":".xml","application/vnd.mozilla.xul+xml":".xul","application/zip":".zip","video/3gpp":".3gp","audio/3gpp":".3gp","video/3gpp2":".3g2","audio/3gpp2":".3g2","application/x-7z-compressed":".7z"}[e]}static{this.\u0275fac=function(e){return new(e||Jt)}}static{this.\u0275pipe=f.\u0275\u0275definePipe({name:"fileExtensionFromMime",type:Jt,pure:!0})}}("undefined"==typeof ngDevMode||ngDevMode)&&f.\u0275setClassMetadata(Jt,[{type:i.Pipe,args:[{standalone:!0,name:"fileExtensionFromMime"}]}],null,null);class ei{constructor(e){this.domSanitizer=e}transform(e,t){if(null==e)return"";switch(t){case"html":case i.SecurityContext.HTML:return this.domSanitizer.bypassSecurityTrustHtml(e);case"style":case i.SecurityContext.STYLE:return this.domSanitizer.bypassSecurityTrustStyle(e);case"script":case i.SecurityContext.SCRIPT:return this.domSanitizer.bypassSecurityTrustScript(e);case"url":case i.SecurityContext.URL:return this.domSanitizer.bypassSecurityTrustUrl(e);case"resource":case i.SecurityContext.RESOURCE_URL:return this.domSanitizer.bypassSecurityTrustResourceUrl(e)}}static{this.\u0275fac=function(e){return new(e||ei)(f.\u0275\u0275directiveInject(y.DomSanitizer,16))}}static{this.\u0275pipe=f.\u0275\u0275definePipe({name:"trustAs",type:ei,pure:!0})}}("undefined"==typeof ngDevMode||ngDevMode)&&f.\u0275setClassMetadata(ei,[{type:i.Pipe,args:[{standalone:!0,name:"trustAs"}]}],()=>[{type:y.DomSanitizer}],null);class ti{constructor(e){this.domSanitizer=e}transform(e,t){if(null==e)return"";switch(t){case"html":case i.SecurityContext.HTML:return this.domSanitizer.sanitize(i.SecurityContext.HTML,e);case"style":case i.SecurityContext.STYLE:return this.domSanitizer.sanitize(i.SecurityContext.STYLE,e);case"script":case i.SecurityContext.SCRIPT:return this.domSanitizer.sanitize(i.SecurityContext.SCRIPT,e);case"url":case i.SecurityContext.URL:return this.domSanitizer.sanitize(i.SecurityContext.URL,e);case"resource":case i.SecurityContext.RESOURCE_URL:return this.domSanitizer.sanitize(i.SecurityContext.RESOURCE_URL,e);case"none":case i.SecurityContext.NONE:return this.domSanitizer.sanitize(i.SecurityContext.NONE,e)}}static{this.\u0275fac=function(e){return new(e||ti)(f.\u0275\u0275directiveInject(y.DomSanitizer,16))}}static{this.\u0275pipe=f.\u0275\u0275definePipe({name:"sanitize",type:ti,pure:!0})}}("undefined"==typeof ngDevMode||ngDevMode)&&f.\u0275setClassMetadata(ti,[{type:i.Pipe,args:[{standalone:!0,name:"sanitize"}]}],()=>[{type:y.DomSanitizer}],null);class ii{transform(e,i,n){return t.transformFileURI(A(e,i,n))}static{this.\u0275fac=function(e){return new(e||ii)}}static{this.\u0275pipe=f.\u0275\u0275definePipe({name:"image",type:ii,pure:!0})}}("undefined"==typeof ngDevMode||ngDevMode)&&f.\u0275setClassMetadata(ii,[{type:i.Pipe,args:[{standalone:!0,name:"image"}]}],null,null);const ni=new Map([["direction",Le],["wrap",$e],["alignment",Le],["gap",Le],["columngap",Le],["clipcontent",Le],["position",Le],["overflow",Le],["zindex",Le],["padding",Le],["width",Le],["height",Le],["positionvalue",Le],["class",Le],["conditionalclass",je],["conditionalstyle",je]]),ai={"top-left":{jc:"flex-start",ai:"flex-start"},"top-center":{jc:"center",ai:"flex-start"},"top-right":{jc:"flex-end",ai:"flex-start"},"middle-left":{jc:"flex-start",ai:"center"},"middle-center":{jc:"center",ai:"center"},"middle-right":{jc:"flex-end",ai:"center"},"bottom-left":{jc:"flex-start",ai:"flex-end"},"bottom-center":{jc:"center",ai:"flex-end"},"bottom-right":{jc:"flex-end",ai:"flex-end"},start:{jc:"space-between",ai:"flex-start"},center:{jc:"space-between",ai:"center"},end:{jc:"space-between",ai:"flex-end"}};function si(e={}){return function(i){const n=i.prototype,a=n.onPropertyChange,s=n.onStyleChange,o=n.ngOnDestroy,l=n.ngAfterViewInit,c=e=>null!=e&&""!==e,d=e=>c(e)&&["row","column"].includes(e),p=e=>c(e)&&"auto"!==e?isNaN(Number(e))?e:`${e}px`:"",m=e=>(e.__al_store||(e.__al_store={dir:void 0,wrap:void 0,align:void 0,gap:void 0,cg:void 0,z:void 0,pos:void 0,overflow:void 0,clip:void 0,inset:void 0,padding:void 0,width:void 0,height:void 0,isViewInitialized:!1,needsFlex:!1,needsOverflow:!1,needsPosition:!1,watches:new Set,destroySub:new r.Subject}),e.__al_store),h=(e,t)=>{const i=m(e);return Object.assign(i,t),i},u=(i,n,a)=>{const s=m(i);if(s.watches.has(n))return;s.watches.add(n);const o=a.replace("bind:",""),r=e.bindParent?e.bindParent.split(".").reduce((e,t)=>e?.[t],i):i.viewParent;if(r){const e=t.$watch(o,r,i,e=>{i.setProperty&&i.setProperty(n,e)});s.destroySub.subscribe(()=>{"function"==typeof e&&e()})}};n.ngOnDestroy=function(){const e=this.__al_store;e&&e.destroySub&&(e.destroySub.next(),e.destroySub.complete()),o&&o.apply(this)},n.ngAfterViewInit=function(){const i=this.app||this.injector?.get(t.App);if(i?.isPrism){const t=m(this);if(h(this,{isViewInitialized:!0}),e.targetSelector){const e=g(this);e&&e.css({width:"100%",height:"100%","box-sizing":"border-box"})}if(t.needsFlex&&v(this),t.needsOverflow&&f(this),t.needsPosition&&b(this),Promise.resolve().then(()=>{c(t.width)&&y(this,"width",t.width),c(t.height)&&y(this,"height",t.height)}),c(t.padding)){const e=g(this);e&&e.css("padding",t.padding)}}l&&l.apply(this)};const g=t=>{if(e.targetSelector){const i=t.nativeElement.querySelector(e.targetSelector);return i?$(i):null}return t.$element},v=e=>{const t=m(e),i=g(e);if(!i)return;const n={};let a=!1;const s=()=>a&&d(t.dir);if(d(t.dir)&&(n["flex-direction"]=t.dir,a=!0,"column"===t.dir&&h(e,{wrap:!1})),c(t.wrap)&&(n["flex-wrap"]=t.wrap?"wrap":"nowrap",a=!0),c(t.align)){const e=ai[t.align]||ai["top-left"],i="row"===(t.dir||"row"),s=i?e.jc:e.ai,o=i?e.ai:e.jc;t.wrap?(n["justify-content"]=s,n["align-items"]=o,"auto"===t.cg&&"auto"===t.gap?n["align-content"]=s:"auto"===t.cg&&"auto"!==t.gap?n["align-content"]=o:"auto"!==t.cg&&"auto"===t.gap?n["align-content"]="space-between":n["align-content"]=o):(n["align-content"]="","auto"===t.gap?(n["justify-content"]=e.jc,n["align-items"]=e.ai):(n["justify-content"]=i?e.jc:e.ai,n["align-items"]=i?e.ai:e.jc)),a=!0}if(c(t.gap)||c(t.cg)){const e=p(t.gap),n=p(t.cg);setTimeout(()=>{s()&&(t.wrap?i.css({"row-gap":e,"column-gap":n}):i.css({gap:e}))}),(e||t.wrap&&n)&&(a=!0)}else""===t.gap&&""===t.cg&&(i.css({"row-gap":"","column-gap":"",gap:""}),a=!0);s()&&(n.display="flex",i.css(n))},f=e=>{const t=m(e),i=g(e);if(!i)return;const n=t.overflow?.toLowerCase();if(t.clip)switch(n){case"vertical":i.css({"overflow-x":"hidden","overflow-y":"scroll"});break;case"horizontal":i.css({"overflow-x":"scroll","overflow-y":"hidden"});break;case"both directions":case"both":i.css({overflow:"scroll"});break;case"no scrolling":case"none":i.css({overflow:"hidden"})}else i.css({overflow:""})},b=e=>{const t=m(e),i=e?.$element;if(!i)return;if(!c(t.pos))return void i.css({position:"","z-index":t.z||"",top:"",right:"",bottom:"",left:""});const n=("sticky"!==t.pos||c(t.inset)?t.inset||"":"0px auto auto 0px").split(/\s+/).filter(Boolean);let a,s,o,r;1===n.length?a=s=o=r=n[0]:2===n.length?(a=o=n[0],s=r=n[1]):3===n.length?(a=n[0],s=r=n[1],o=n[2]):4===n.length&&(a=n[0],s=n[1],o=n[2],r=n[3]);const l={position:t.pos||"","z-index":t.z||"",top:a&&"auto"!==a?a:"",right:s&&"auto"!==s?s:"",bottom:o&&"auto"!==o?o:"",left:r&&"auto"!==r?r:""};i.css(l)},y=(e,t,i)=>{const n=e.$element;if(!n)return;const a={},s="width"===t?"min-width":"min-height",o=n[0],r=o?.parentElement,l=r?getComputedStyle(r):null,c=l&&["flex","inline-flex"].includes(l.display);let d=!1;if(c){const e=l.flexDirection,i=["row","row-reverse"].includes(e);d="width"===t&&i||"height"===t&&!i}"fill"===i?c?(a[t]="",d?(a["flex-grow"]="1",a["flex-shrink"]="",a[s]="0"):a["align-self"]="stretch"):a[t]="100%":("hug"===i&&(a[t]="fit-content"),c?d?(a["flex-grow"]="",a["flex-shrink"]="0",a[s]=""):a["align-self"]="":(a["flex-grow"]="",a["flex-shrink"]="0",a["align-self"]="",a[s]="")),n.css(a)};n.onPropertyChange=function(e,i,n){const s=this.app||this.injector?.get(t.App);if(s?.isPrism){const n=m(this);switch(["position","positionvalue","conditionalclass","conditionalstyle"].includes(e)&&i&&("string"==typeof i&&i.startsWith("bind:")?u(this,e,i):"object"==typeof i&&Array.isArray(i.toAdd)&&i.toAdd.forEach(t=>{"string"==typeof t&&t.startsWith("bind:")&&u(this,e,t)})),e){case"direction":h(this,{dir:i,needsFlex:!0});break;case"wrap":h(this,{wrap:t.toBoolean(i),needsFlex:!0});break;case"alignment":h(this,{align:i,needsFlex:!0});break;case"gap":h(this,{gap:i,needsFlex:!0});break;case"columngap":h(this,{cg:i,needsFlex:!0});break;case"position":h(this,{pos:i,needsPosition:!0});break;case"clipcontent":h(this,{clip:t.toBoolean(i),needsOverflow:!0});break;case"positionvalue":h(this,{inset:i,needsPosition:!0})}n.isViewInitialized&&(n.needsFlex&&v(this),n.needsOverflow&&f(this),n.needsPosition&&b(this))}a&&a.apply(this,[e,i,n])},n.onStyleChange=function(e,i,n){const a=this.app||this.injector?.get(t.App);if(a?.isPrism){const t=m(this),n=t.isViewInitialized;switch(e){case"width":case"height":h(this,{[e]:i}),n&&y(this,e,i);break;case"padding":if(h(this,{padding:i}),n){const e=g(this);e&&e.css("padding",i)}break;case"overflow":h(this,{overflow:i,needsOverflow:!0}),n&&f(this);break;case"zindex":h(this,{z:i}),i?.startsWith("bind:")&&u(this,e,i),void 0!==t.pos&&(h(this,{needsPosition:!0}),n&&b(this));break;case"backgroundimage":i?.startsWith("bind:")&&u(this,e,i)}}s&&s.apply(this,[e,i,n])}}}const oi="app-container",ri={widgetType:"wm-container",hostClass:oi};e.ContainerDirective=class i extends ct{static{this.initializeProps=void Ne("wm-container",new Map([["animation",Le],["class",Le],["conditionalclass",je],["conditionalstyle",je],["content",Le],["name",Le],["show",{value:!0,...$e}],...ni]))}constructor(i,n,a){super(i,ri,n),this.app=a,this.isPrism=!1,t.addClass(this.nativeElement,oi),Ue(this.nativeElement,this,e.APPLY_STYLES_TYPE.CONTAINER),this.isPrism=this.app.isPrism}static{this.\u0275fac=function(e){return new(e||i)(f.\u0275\u0275directiveInject(f.Injector),f.\u0275\u0275directiveInject("EXPLICIT_CONTEXT",8),f.\u0275\u0275directiveInject(v.App))}}static{this.\u0275dir=f.\u0275\u0275defineDirective({type:i,selectors:[["","wmContainer",""]],features:[f.\u0275\u0275ProvidersFeature([M(i)]),f.\u0275\u0275InheritDefinitionFeature]})}},e.ContainerDirective=u.__decorate([si(),u.__metadata("design:paramtypes",[i.Injector,Object,t.App])],e.ContainerDirective),("undefined"==typeof ngDevMode||ngDevMode)&&f.\u0275setClassMetadata(e.ContainerDirective,[{type:i.Directive,args:[{standalone:!0,selector:"[wmContainer]",providers:[M(e.ContainerDirective)]}]}],()=>[{type:f.Injector},{type:void 0,decorators:[{type:i.Inject,args:["EXPLICIT_CONTEXT"]},{type:i.Optional}]},{type:v.App}],null);class li{constructor(e,n,s,o={}){this.templateRef=n,this.viewContainer=s,this.context={};let r=e?e.get(t.App):i.inject(t.App),l=e._lView;this.viewParent=t.findParent(l,r),a.extend(this.context,e._lView[8],o)}set lazyLoad(e){if(this.unSubscribeFn&&"function"==typeof this.unSubscribeFn){try{this.unSubscribeFn()}catch(e){console.warn("Error unsubscribing from previous lazyLoad watcher:",e)}this.unSubscribeFn=null}this.unSubscribeFn=t.$watch(e,this.viewParent,this.context,e=>{if(!this.embeddedView&&e&&(this.embeddedView=this.viewContainer.createEmbeddedView(this.templateRef,this.context),this.unSubscribeFn&&"function"==typeof this.unSubscribeFn))try{this.unSubscribeFn(),this.unSubscribeFn=null}catch(e){console.warn("Error unsubscribing from lazyLoad watcher:",e),this.unSubscribeFn=null}})}ngOnDestroy(){if(this.unSubscribeFn&&"function"==typeof this.unSubscribeFn){try{this.unSubscribeFn()}catch(e){console.warn("Error unsubscribing from lazyLoad watcher in ngOnDestroy:",e)}this.unSubscribeFn=null}this.context&&(Object.keys(this.context).forEach(e=>{delete this.context[e]}),this.context=null),this.embeddedView&&(this.embeddedView=null)}static{this.\u0275fac=function(e){return new(e||li)(f.\u0275\u0275directiveInject(f.Injector),f.\u0275\u0275directiveInject(f.TemplateRef),f.\u0275\u0275directiveInject(f.ViewContainerRef),f.\u0275\u0275directiveInject("EXPLICIT_CONTEXT",8))}}static{this.\u0275dir=f.\u0275\u0275defineDirective({type:li,selectors:[["","lazyLoad",""]],inputs:{lazyLoad:"lazyLoad"}})}}("undefined"==typeof ngDevMode||ngDevMode)&&f.\u0275setClassMetadata(li,[{type:i.Directive,args:[{standalone:!0,selector:"[lazyLoad]"}]}],()=>[{type:f.Injector},{type:f.TemplateRef},{type:f.ViewContainerRef},{type:void 0,decorators:[{type:i.Inject,args:["EXPLICIT_CONTEXT"]},{type:i.Optional}]}],{lazyLoad:[{type:i.Input}]});class ci{constructor(e){this.widgetRef=e,this.widgetRef.partialParams={},this.widgetRef.pageParams=this.widgetRef.partialParams,this.widgetRef.params$=new r.Subject}registerParams(e,i,n,s){this.widgetRef.partialParams[e]=i,!i&&n?this.widgetRef.registerDestroyListener(t.$watch(n,this.widgetRef.getViewParent(),a.get(this.widgetRef,"context"),t=>{this.widgetRef.partialParams[e]=t,this.widgetRef.params$.next()})):this.widgetRef.params$.next()}ngOnDestroy(){this.widgetRef.params$&&this.widgetRef.params$.complete(),this.widgetRef.partialParams&&(Object.keys(this.widgetRef.partialParams).forEach(e=>{delete this.widgetRef.partialParams[e]}),this.widgetRef.partialParams=null),this.widgetRef.pageParams=null}static{this.\u0275fac=function(e){return new(e||ci)(f.\u0275\u0275directiveInject(T,2))}}static{this.\u0275dir=f.\u0275\u0275defineDirective({type:ci,selectors:[["","partialContainer",""]]})}}("undefined"==typeof ngDevMode||ngDevMode)&&f.\u0275setClassMetadata(ci,[{type:i.Directive,args:[{standalone:!0,selector:"[partialContainer]"}]}],()=>[{type:void 0,decorators:[{type:i.Self},{type:i.Inject,args:[T]}]}],null);class di{constructor(e,t,i){this.bindValue=e,this.type=t,this.partialParamsProvider=i}ngOnInit(){this.partialParamsProvider.registerParams(this.name,this.value,this.bindValue,this.type)}static{this.\u0275fac=function(e){return new(e||di)(f.\u0275\u0275injectAttribute("value.bind"),f.\u0275\u0275injectAttribute("type"),f.\u0275\u0275directiveInject(ci))}}static{this.\u0275dir=f.\u0275\u0275defineDirective({type:di,selectors:[["","wmParam",""]],inputs:{name:"name",value:"value"}})}}("undefined"==typeof ngDevMode||ngDevMode)&&f.\u0275setClassMetadata(di,[{type:i.Directive,args:[{standalone:!0,selector:"[wmParam]"}]}],()=>[{type:void 0,decorators:[{type:i.Attribute,args:["value.bind"]}]},{type:void 0,decorators:[{type:i.Attribute,args:["type"]}]},{type:ci}],{name:[{type:i.Input}],value:[{type:i.Input}]});class pi{set textContent(e){let t=e;null==e&&(t=""),this.elRef.nativeElement.textContent=t}constructor(e){this.elRef=e}static{this.\u0275fac=function(e){return new(e||pi)(f.\u0275\u0275directiveInject(f.ElementRef))}}static{this.\u0275dir=f.\u0275\u0275defineDirective({type:pi,selectors:[["","textContent",""]],inputs:{textContent:"textContent"}})}}("undefined"==typeof ngDevMode||ngDevMode)&&f.\u0275setClassMetadata(pi,[{type:i.Directive,args:[{standalone:!0,selector:"[textContent]"}]}],()=>[{type:f.ElementRef}],{textContent:[{type:i.Input}]});class mi{constructor(e,t,i,n){this.viewContainerRef=e,this.templateRef=i,this.context={},a.extend(this.context,t._lView[8],n),this.boundOnResize=this.onResize.bind(this),window.addEventListener("resize",this.boundOnResize)}set wmShowInDevice(e){this.devices=e.split(","),this.onResize()}onResize(e){const i=getComputedStyle(document.documentElement).getPropertyValue("--screen-lg")||"1200px",n=getComputedStyle(document.documentElement).getPropertyValue("--screen-md")||"992px",a=getComputedStyle(document.documentElement).getPropertyValue("--screen-sm")||"768px",s=getComputedStyle(document.documentElement).getPropertyValue("--screen-lg-tab-landscape")||"1366px",o=getComputedStyle(document.documentElement).getPropertyValue("--screen-lg-tab-portrait")||"1024px",r=parseFloat(i)-1+"px",l=parseFloat(n)-1+"px",c=parseFloat(a)-1+"px";this.devices.indexOf("lg")>-1&&window.matchMedia("(min-width: "+i+")").matches&&!t.isLargeTabletLandscape(s,o)||this.devices.indexOf("md")>-1&&(t.isLargeTabletLandscape(s,o)||window.matchMedia("(min-width: "+n+") and (max-width: "+r+")").matches&&!t.isLargeTabletPortrait(s,o))||this.devices.indexOf("sm")>-1&&(window.matchMedia("(min-width: "+a+") and (max-width: "+l+")").matches||t.isLargeTabletPortrait(s,o))||this.devices.indexOf("xs")>-1&&window.matchMedia("(max-width: "+c+")").matches||this.devices.indexOf("all")>-1?this.embeddedView||(this.embeddedView=this.viewContainerRef.createEmbeddedView(this.templateRef,this.context)):(this.viewContainerRef.clear(),this.embeddedView="")}ngOnDestroy(){this.boundOnResize&&(window.removeEventListener("resize",this.boundOnResize),this.boundOnResize=null),this.embeddedView&&(this.viewContainerRef.clear(),this.embeddedView=null),this.context&&(Object.keys(this.context).forEach(e=>{delete this.context[e]}),this.context=null)}static{this.\u0275fac=function(e){return new(e||mi)(f.\u0275\u0275directiveInject(f.ViewContainerRef),f.\u0275\u0275directiveInject(f.Injector),f.\u0275\u0275directiveInject(f.TemplateRef),f.\u0275\u0275directiveInject("EXPLICIT_CONTEXT",8))}}static{this.\u0275dir=f.\u0275\u0275defineDirective({type:mi,selectors:[["","wmShowInDevice",""]],inputs:{wmShowInDevice:"wmShowInDevice"}})}}("undefined"==typeof ngDevMode||ngDevMode)&&f.\u0275setClassMetadata(mi,[{type:i.Directive,args:[{standalone:!0,selector:"[wmShowInDevice]"}]}],()=>[{type:f.ViewContainerRef},{type:f.Injector},{type:f.TemplateRef},{type:void 0,decorators:[{type:i.Inject,args:["EXPLICIT_CONTEXT"]},{type:i.Optional}]}],{wmShowInDevice:[{type:i.Input}]}),e.ALLFIELDS=U,e.AUTOCLOSE_TYPE={OUTSIDECLICK:"outsideClick",ALWAYS:"always",DISABLED:"disabled"},e.AUTO_LAYOUT_PROPS=ni,e.AutoLayout=si,e.BaseComponent=ot,e.BaseContainerComponent=ct,e.BaseFieldValidations=class{constructor(e,t,i,n,a,s){this.instance=e,this.formwidget=t,this.widgettype=i,this.widgetControl=n,this.widgetContext=a,this.defaultValidatorMessages=[],s&&(this.tableFieldType=s)}getDefaultValidators(){const e=[];return this.instance.show?(this.widgettype!==t.FormWidgetType.DATE&&this.widgettype!==t.FormWidgetType.TIME&&this.widgettype!==t.FormWidgetType.DATETIME&&this.instance.required&&(this.widgettype===t.FormWidgetType.CHECKBOX&&1!=this.instance.checkedvalue?e.push(d.Validators.pattern(this.instance.checkedvalue)):this.widgettype===t.FormWidgetType.CHECKBOX||this.widgettype===t.FormWidgetType.TOGGLE?e.push(d.Validators.requiredTrue):e.push(d.Validators.required)),this.instance.maxchars&&e.push(d.Validators.maxLength(this.instance.maxchars)),this.instance.minvalue&&e.push(d.Validators.min(this.instance.minvalue)),this.instance.maxvalue&&this.widgettype!==t.FormWidgetType.RATING&&e.push(d.Validators.max(this.instance.maxvalue)),this.instance.regexp&&e.push(d.Validators.pattern(this.instance.regexp)),this.formwidget&&a.isFunction(this.formwidget.validate)&&e.push(this.formwidget.validate.bind(this.formwidget)),this.widgettype!==t.FormWidgetType.DATE&&this.widgettype!==t.FormWidgetType.TIME&&this.widgettype!==t.FormWidgetType.DATETIME||!this.instance.required||e.push(d.Validators.required),e):e}setUpValidators(e){if(!this.hasValidators&&(this.instance._validators=this.getDefaultValidators(),e&&this.instance._validators.push(e),this.widgetContext.ngform)){this.widgetControl.setValidators(this.instance._validators);const e={};this.formwidget&&(this.instance.value===this.formwidget.prevDatavalue||this.isNullOrEmptyOrFalsy(this.instance.value))&&(e.emitEvent=!1),this.widgetControl.updateValueAndValidity(e)}}getPromiseList(e){const t=[];return a.forEach(e,(e,i)=>{let n=e;e instanceof Function&&e.bind&&(n=e(this.widgetControl,this.widgetContext)),n instanceof Promise&&t.push(n)}),t}setAsyncValidators(e){if(this._asyncValidatorFn=()=>()=>Promise.all(this.getPromiseList(e)).then(()=>(this.instance.validationmessage="",null),e=>{if(e.hasOwnProperty("errorMessage"))this.instance.validationmessage=a.get(e,"errorMessage");else{const t=a.keys(e);this.instance.validationmessage=e[t[0]].toString()}return e}).then(e=>{const t=()=>{setTimeout(()=>{"PENDING"===this.widgetControl.status?t():this.instance.onStatusChange(this.widgetControl.status,this.tableFieldType)},100)};return t(),e}),this.widgetControl.setAsyncValidators([this._asyncValidatorFn()]),this.widgetContext.ngform.touched){const e={};this.formwidget&&(this.instance.value===this.formwidget.prevDatavalue||this.isNullOrEmptyOrFalsy(this.instance.value))&&(e.emitEvent=!1),this.widgetControl.updateValueAndValidity(e)}}isDefaultValidator(e){return a.get(t.VALIDATOR,a.toUpper(e))}setDefaultValidator(e,t){t&&t instanceof Function?this.watchDefaultValidatorExpr(t.bind(void 0,this.widgetControl,this.widgetContext),e):("custom-widget"===this.widgettype&&(this.instance.formWidget.baseWidget[e]=t),this.instance.widget[e]=t,this.instance[e]=t)}setValidators(e){let t=a.cloneDeep(e);this.hasValidators=!0,this._syncValidators=[],a.forEach(t,(e,i)=>{if(e&&e instanceof Function)t[i]=e.bind(void 0,this.widgetControl,this.widgetContext),this._syncValidators.push(t[i]);else{const n=a.get(e,"type");if(this.defaultValidatorMessages[n]=a.get(e,"errorMessage"),this.isDefaultValidator(n)){const s=a.get(e,"validator");this.setDefaultValidator(n,s),t[i]=""}}}),this._syncValidators=a.filter(t,e=>{if(e)return e}),this.applyDefaultValidators()}observeOn(e,t){a.forEach(e,e=>{const i=a.find(this.widgetContext[t],{key:e});i&&(i.notifyForFields||(i.notifyForFields=[]),i.notifyForFields.push(this.instance))})}validate(){if(this.applyDefaultValidators(),this._asyncValidatorFn){const e={};this.formwidget&&(this.instance.value===this.formwidget.prevDatavalue||this.isNullOrEmptyOrFalsy(this.instance.value))&&(e.emitEvent=!1),this.widgetControl.setAsyncValidators([this._asyncValidatorFn()]),this.widgetControl.updateValueAndValidity(e)}this.widgetContext.ngform.touched&&this.widgetControl.markAsTouched()}watchDefaultValidatorExpr(e,i){const n=`${this.instance.widgetId}_`+i+"_formField";t.$unwatch(n),this.instance.registerDestroyListener(t.$watch("boundFn(fn)",a.extend(this.instance,this.instance.viewParent),{fn:e},(e,t)=>{this.instance.widget[i]=e,this.applyDefaultValidators()},n))}isNullOrEmptyOrFalsy(e){return a.isEmpty(e)}applyDefaultValidators(){const e=this.getDefaultValidators(),t={};this.formwidget&&(this.instance.value===this.formwidget.prevDatavalue||this.isNullOrEmptyOrFalsy(this.instance.value))&&(t.emitEvent=!1),this.widgetControl.setValidators(a.concat(this._syncValidators||[],e)),this.widgetControl.updateValueAndValidity(t),this.setCustomValidationMessage()}setCustomValidationMessage(){const e=this.widgetControl&&this.widgetControl.errors;if(e)if(e.hasOwnProperty("errorMessage"))this.instance.validationmessage=a.get(e,"errorMessage");else{const t=a.keys(e)[0],i=a.get(ut,t)||this.formwidget.validateType;if(i){const e=a.get(this.defaultValidatorMessages,i)||this.instance.validationmessage;this.instance.validationmessage=e&&e instanceof Function?e(this.widgetControl,this.widgetContext):e}else this.instance.validationmessage=""}}destroy(){this.instance=null,this.formwidget=null,this.widgetControl=null,this.widgetContext=null,this._syncValidators&&(this._syncValidators=[]),this._asyncValidatorFn=null,this.defaultValidatorMessages&&(this.defaultValidatorMessages=[])}},e.Context=I,e.CustomPipe=qt,e.CustomWidgetContainerDirective=ht,e.DEBOUNCE_TIMES={PAGINATION_DEBOUNCE_TIME:250},e.DISPLAY_TYPE=Ke,e.DataSetItem=class{},e.DatasetAwareNavComponent=pt,e.DialogRef=O,e.DialogServiceImpl=Nt,e.EDIT_MODE={QUICK_EDIT:"quickedit",INLINE:"inline",FORM:"form",DIALOG:"dialog"},e.EVENTS_MAP=Xe,e.FileExtensionFromMimePipe=Jt,e.FileIconClassPipe=Kt,e.FileSizePipe=Xt,e.FilterPipe=Yt,e.INPUTMODE={FINANCIAL:"financial",NATURAL:"natural"},e.ImagePipe=ii,e.ItemTemplateDirective=vt,e.LIVE_CONSTANTS=H,e.LazyLoadDirective=li,e.MessageComponent=Pt,e.NAVIGATION_TYPE={ADVANCED:"Advanced",BASIC:"Basic",CLASSIC:"Classic",INLINE:"Inline",NONE:"None",ONDEMAND:"On-Demand",PAGER:"Pager",SCROLL:"Scroll"},e.NumberToStringPipe=Ut,e.PROP_ANY=je,e.PROP_BOOLEAN=$e,e.PROP_NUMBER=Fe,e.PROP_STRING=Le,e.PartialContainerDirective=mt,e.PartialDirective=Dt,e.PartialParamDirective=di,e.PartialParamHandlerDirective=ci,e.PrefixPipe=Gt,e.PullToRefresh=Ct,e.RedrawableDirective=lt,e.RepeatTemplateDirective=bt,e.SanitizePipe=ti,e.ShowInDeviceDirective=mi,e.StateClassPipe=Qt,e.StringToNumberPipe=Ht,e.StylableComponent=rt,e.SuffixPipe=Wt,e.TemplateReplacePipe=Zt,e.TextContentDirective=pi,e.TimeFromNowPipe=zt,e.ToCurrencyPipe=Bt,e.ToDatePipe=jt,e.ToNumberPipe=Vt,e.TrailingZeroDecimalPipe=$t,e.TrustAsPipe=ei,e.WidgetConfig=C,e.WidgetRef=T,e.applyFilterOnField=function(e,i,n,s,o={}){const r=i.field||i.key,l=a.filter(n,{"filter-on":r});s=i["is-range"]?ie(i.minValue,i.maxValue):t.isDefined(s)?s:i.value,!e||o.isFirst&&(a.isUndefined(s)||""===s)||a.forEach(l,n=>{const r=n.field||n.key,l=i["lookup-field"]||i._primaryKey,c=n["edit-widget-type"]||n.widgettype;let d,p,m,h={},u=n["filter-on"];x(c)&&!n.isDataSetBound&&u!==r&&(i&&i["is-related"]&&(u+="."+l),t.isDefined(s)?(m=i["is-range"]?ne(i.minValue,i.maxValue):ae(o.enableemptyfilter)&&s===H.EMPTY_KEY?se(o.enableemptyfilter):t.MatchMode.EQUALS,d=a.isObject(s)&&!a.isArray(s)?s[l]:s,h[u]={value:d,matchMode:m}):h={},p=r,Y(c)&&n.dataoptions?n.dataoptions.filterFields=h:e.execute(t.DataSource.Operation.GET_DISTINCT_DATA_BY_FIELDS,{fields:p,filterFields:h,pagesize:n.limit}).then(e=>{J(n,e.data,{aliasColumn:p,widget:o.widget||"widgettype",isEnableEmptyFilter:ae(o.enableemptyfilter),EMPTY_VALUE:o.EMPTY_VALUE})},q))})},e.configureDnD=(e,t,i,n,a)=>{const s=Object.assign({containment:e,delay:100,opacity:.8,helper:"clone",zIndex:1050,tolerance:"pointer",start:i,update:n,sort:a},t);e.sortable(s)},e.convertDataToObject=we,e.createArrayFrom=oe,e.extractDataAsArray=e=>a.isUndefined(e)||a.isNull(e)||""===a.trim(e)?[]:(a.isString(e)&&(e=a.split(e,",").map(e=>e.trim())),a.isArray(e)||(e=[e]),e),e.extractDataSourceName=e=>{if(!e)return;let t;const i=e.split(".");return i.length>1&&"Variables"===i[0]&&(t=i[1]),t},e.fetchDistinctValues=function(e,t,i){a.isEmpty(t)||t.forEach(t=>{ee(e,t,i)})},e.fetchRelatedFieldData=function(e,i,n){let s,o;const r=n.relatedField,l=n.datafield;e&&(s=e.execute(t.DataSource.Operation.GET_RELATED_PRIMARY_KEYS,r),i.datafield=l,i._primaryKey=a.isEmpty(s)?void 0:s[0],i.compareby=s&&s.join(","),o=l===U?void 0:l,i.displayfield=o=i.displayfield||o||i._primaryKey,Y(i[n.widget])?(i.dataoptions={relatedField:r,filterExpr:i.filterexpressions?i.filterexpressions:{}},i.datasource=e,i.searchkey=i.searchkey||o,i.displaylabel=i.displayfield=i.displaylabel||o,i.showPendingSpinner&&(i.showPendingSpinner=!1)):X(i.viewParent,i.filterexpressions,n=>{i.filterexpressions=n,e.execute(t.DataSource.Operation.GET_RELATED_TABLE_DATA,{relatedField:r,pagesize:i.limit,orderBy:i.orderby?a.replace(i.orderby,/:/g," "):"",filterFields:{},filterExpr:i.filterexpressions?i.filterexpressions:{}}).then(e=>{i.dataset=e.data,i.displayfield=i.displayfield||a.head(a.keys(a.get(e,"[0]"))),i.showPendingSpinner&&(i.showPendingSpinner=!1)},q)}))},e.filterDate=Te,e.getBackGroundImageUrl=k,e.getConditionalClasses=G,e.getContainerTargetClass=e=>".wm-app",e.getCurrentWidgets=(e,t)=>{const i=Array.from(e.querySelectorAll("[widget-id]"));return Object.assign(t,i.reduce((e,t)=>(e[t.widget.name]=t.widget,e),{}))},e.getDataTableFilterWidget=e=>{let i=_e[e]&&_e[e][0];return e===t.DataType.BOOLEAN&&(i=t.FormWidgetType.SELECT),a.includes([t.FormWidgetType.TEXT,t.FormWidgetType.NUMBER,t.FormWidgetType.SELECT,t.FormWidgetType.AUTOCOMPLETE,t.FormWidgetType.DATE,t.FormWidgetType.TIME,t.FormWidgetType.DATETIME],i)?i:t.FormWidgetType.TEXT},e.getDefaultValue=(e,i,n)=>n?n===t.FormWidgetType.NUMBER||n===t.FormWidgetType.SLIDER||n===t.FormWidgetType.CURRENCY?isNaN(Number(e))?null:Number(e):n===t.FormWidgetType.CHECKBOX||n===t.FormWidgetType.TOGGLE||n===t.FormWidgetType.ICONBUTTONTOGGLE?Se(e):e:t.isNumberType(i)?isNaN(Number(e))?null:Number(e):i===t.DataType.BOOLEAN?Se(e):e,e.getDefaultViewModeWidget=e=>a.includes(["checkbox","toggle","iconbutton-toggle","rating"],e)?De:Ee,e.getDistinctFieldProperties=K,e.getDistinctValues=Q,e.getDistinctValuesForField=ee,e.getEditModeWidget=e=>e["related-entity-name"]&&e["primary-key"]?t.FormWidgetType.SELECT:_e[e.type]&&_e[e.type][0]||t.FormWidgetType.TEXT,e.getEmptyMatchMode=se,e.getEnableEmptyFilter=ae,e.getEvaluatedData=R,e.getFieldLayoutConfig=(e,i,n)=>{let s="",o="";return"top"===(i=i||"top")||"floating"===i?(n&&"android"===n||t.isAndroid())&&(s=o="col-xs-12"):e&&a.forEach(a.split(e," "),function(e){const t=a.split(e,"-"),i=t[0];let n,r;n=parseInt(t[1],10),r=12-n,r=r<=0?12:r,s+=" col-"+i+"-"+n,o+=" col-"+i+"-"+r}),{captionCls:s,widgetCls:o}},e.getFieldTypeWidgetTypesMap=()=>_e,e.getImageUrl=A,e.getKeyboardFocusableElements=e=>{const t=e.querySelectorAll("a, button, input, textarea, select, details, iframe, embed, object, summary dialog, audio[controls], video[controls], [contenteditable]");return Array.from(t).filter(e=>!e.hasAttribute("disabled")&&!e.hasAttribute("hidden")&&(!e.hasAttribute("tabindex")||e.hasAttribute("tabindex")&&!e.getAttribute("tabindex").startsWith("-")))},e.getMatchModeMsgs=e=>({start:e.LABEL_STARTS_WITH,startignorecase:e.LABEL_STARTS_WITH_IGNORECASE,end:e.LABEL_ENDS_WITH,endignorecase:e.LABEL_ENDS_WITH_IGNORECASE,anywhere:e.LABEL_CONTAINS,anywhereignorecase:e.LABEL_CONTAINS_IGNORECASE,exact:e.LABEL_IS_EQUAL_TO,exactignorecase:e.LABEL_IS_EQUAL_TO_IGNORECASE,notequals:e.LABEL_IS_NOT_EQUAL_TO,notequalsignorecase:e.LABEL_IS_NOT_EQUAL_TO_IGNORECASE,lessthan:e.LABEL_LESS_THAN,lessthanequal:e.LABEL_LESS_THAN_OR_EQUALS_TO,greaterthan:e.LABEL_GREATER_THAN,greaterthanequal:e.LABEL_GREATER_THAN_OR_EQUALS_TO,null:e.LABEL_IS_NULL,isnotnull:e.LABEL_IS_NOT_NULL,empty:e.LABEL_IS_EMPTY,isnotempty:e.LABEL_IS_NOT_EMPTY,nullorempty:e.LABEL_IS_NULL_OR_EMPTY,in:e.LABEL_IN,notin:e.LABEL_NOT_IN,between:e.LABEL_BETWEEN}),e.getMatchModeTypesMap=e=>(e&&(j.number.push("in","notin","between"),j.date.push("between"),j.string.push("in","notin"),j.character.push("in","notin")),a.forEach(F,(e,t)=>{a.forEach(e,e=>{V[e]=j[t]})}),V.default=a.union(j.number,j.string,j.character,j.date,j.date),V),e.getObjValueByKey=E,e.getOrderByExpr=e=>{e=e||[];const t=[];return a.forEach(e,e=>{e.direction&&t.push(e.property+" "+e.direction.toLowerCase())}),a.join(t,",")},e.getOrderedDataset=ye,e.getRangeFieldValue=ie,e.getRangeMatchMode=ne,e.getRowOperationsColumn=()=>({field:"rowOperations",type:"custom",displayName:"Actions",width:"120px",readonly:!0,sortable:!1,searchable:!1,resizable:!1,selectable:!1,show:!0,operations:[],opConfig:{},pcDisplay:!0,mobileDisplay:!0,tabletDisplay:!0,include:!0,isRowOperation:!0}),e.getUniqObjsByDataField=(e,t,i,n)=>{let s;const o=t===U;return s=o?a.uniqWith(e,a.isEqual):a.uniqBy(e,"key"),!i||n?s:a.filter(s,e=>(o||a.trim(e.key))&&a.trim(e.label))},e.getWatchIdentifier=L,e.getWidgetPropsByType=ke,e.groupData=(e,i,n,s,o,r,l,c,d)=>{let p={};if(a.includes(n,"(")){const s=t.$parseEvent(n);p=a.groupBy(i,t=>s(e.viewParent,{row:t.dataObject||t}))}else p=Ce(i,n,s,o,r,l,c,d);return((e,t,i)=>{const n=[];return a.forEach(a.keys(e),(s,o)=>{const r=ye(e[s],i,"dataObject");n.push({key:s,data:a.sortBy(r,e=>(e._groupIndex=o+1,a.get(e,t)||a.get(e.dataObject,t)))})}),n})(p,n,o)},e.handleHeaderClick=e=>{const t=$(e.target).closest(".item-group"),i=t.find("li.list-group-header .app-icon");i.hasClass("wi-chevron-down")?i.removeClass("wi-chevron-down").addClass("wi-chevron-up"):i.removeClass("wi-chevron-up").addClass("wi-chevron-down"),t.find(".group-list-item").toggle()},e.hasLinkToCurrentPage=_,e.interpolateBindExpressions=X,e.isActiveNavItem=S,e.isBooleanAttr=Ze,e.isDataSetWidget=x,e.isDimensionProp=et,e.isStyle=Ge,e.parseValueByType=(e,i,n,a)=>n?n===t.FormWidgetType.SLIDER||n===t.FormWidgetType.CURRENCY?isNaN(Number(e))?null:a?e:Number(e):n===t.FormWidgetType.NUMBER?isNaN(Number(e))||null==e?null:a?e:Number(e):n===t.FormWidgetType.CHECKBOX||n===t.FormWidgetType.TOGGLE||n===t.FormWidgetType.ICONBUTTONTOGGLE?Se(e):e:t.isNumberType(i)?isNaN(Number(e))||null==e?null:Number(e):i===t.DataType.BOOLEAN?Se(e):e,e.performDataOperation=function(i,n,a){return new Promise((s,o)=>{if(i.execute(t.DataSource.Operation.SUPPORTS_CRUD)){let r;switch(a.operationType){case e.Live_Operations.UPDATE:r=t.DataSource.Operation.UPDATE_RECORD;break;case e.Live_Operations.INSERT:r=t.DataSource.Operation.INSERT_RECORD;break;case e.Live_Operations.DELETE:r=t.DataSource.Operation.DELETE_RECORD}i.execute(r,n).then(e=>function(e,t,i){e.error?i(e):t(e)}(e,s,o),o)}else if(i.execute(t.DataSource.Operation.IS_API_AWARE))if("wm.CrudVariable"===i.category){const e="insert"===a.operationType?"create":"delete"===a.operationType?"delete":"update";i.execute(t.DataSource.Operation.INVOKE,{skipNotification:!0,operation:e,inputFields:n}).then(s,o)}else i.execute(t.DataSource.Operation.SET_INPUT,n),i.execute(t.DataSource.Operation.INVOKE,{skipNotification:!0}).then(s,o);else s(n)})},e.prepareFieldDefs=(e,i)=>{let n;const s={objects:[],terminals:[]};if(e||(e=[]),i||(i={}),i.setBindingField=!0,i.columnCount=0,n=(e=>{let i;return a.isArray(e)?a.isObject(e[0])?(i=t.getClonedObject(e[0]),a.forEach(e,(e,t)=>{if(t+1>=10)return!1;a.assignWith(i,e,(e,t)=>null==e?t:e)})):i=e[0]:i=e,i})(e),W(n,s,"",i),!i||i&&!i.filter)return s.terminals;switch(i.filter){case"all":return s;case"objects":return s.objects;case"terminals":return s.terminals}return s},e.propNameCSSKeyMap=Be,e.provideAs=N,e.provideAsDialogRef=function(e){return N(e,O)},e.provideAsWidgetRef=M,e.refreshDataSource=function(e,i){return new Promise((n,a)=>{e?e.execute(t.DataSource.Operation.LIST_RECORDS,{filterFields:i.filterFields||{},orderBy:i.orderBy,page:i.page||1,logicalOp:i.condition||""}).then(n,a):a()})},e.register=Ne,e.registerFormWidget=(e,t)=>{const i=xe+e,n=Ae.get(i);n&&t.forEach((e,t)=>n.set(t,e))},e.setFocusTrap=(e,t,i)=>n.createFocusTrap(e,{onActivate:()=>e.classList.add("is-active"),onDeactivate:()=>e.classList.remove("is-active"),allowOutsideClick:t,setReturnFocus:i}),e.setHeaderConfig=Re,e.setHeaderConfigForTable=(e,t,i,n)=>{i?Re(e,t,i,n):e[n]=t},e.setItemByCompare=(e,i,n)=>{a.forEach(e,e=>{if(t.isEqualWithFields(e.value,i,n))return e.selected=!0,!1})},e.styler=Ue,e.toggleAllHeaders=e=>{const t=$(e.nativeElement).find(".item-group");t.find(".group-list-item").toggle();const i=t.find("li.list-group-header .app-icon");i&&a.forEach(i,e=>{const t=$(e);t.hasClass("wi-chevron-down")?t.removeClass("wi-chevron-down").addClass("wi-chevron-up"):t.removeClass("wi-chevron-up").addClass("wi-chevron-down")})},e.transformData=function(e,t){let i,n,s,o,r,l,c;return e=e||[],a.isArray(e)?a.isString(e[0])&&(n=[],a.forEach(e,e=>{i={},i[t.split(".").join("-")]=e,n.push(i)}),e=n):(a.isString(e)&&(s=t.substring(t.indexOf(".")+1,t.length).split("."),o=[],r=s.length,l={},c=l,s.forEach((t,i)=>{o.forEach(e=>{c=l[e]}),c[t]=i===r-1?e:{},o.push(t)}),e=l),e=[e]),e},e.transformDataWithKeys=e=>{const t=[];if(a.isObject(e[0])||a.isObject(e)&&!(e instanceof Array)){const i=Object.keys(e[0]||e);a.forEach(i,(e,i)=>{t.push({key:e,label:e,value:e,index:i+1})})}return t},e.transformFormData=(e,i,n,s,o,r)=>{const l=[];if(i)return i=we(i),a.isUndefined(o)&&(o=1),a.isString(i)?(i=i.split(",").map(e=>e.trim())).forEach((i,n)=>{const a={key:i,value:i,label:t.isDefined(i)&&null!==i?i.toString():"",index:o+n};Pe(r,e,a,"value"),l.push(a)}):a.isArray(i)&&!a.isObject(i[0])?i.forEach((i,n)=>{const a={key:i,value:i,label:t.isDefined(i)&&null!==i?i.toString():"",index:o+n};Pe(r,e,a,"value"),l.push(a)}):i instanceof Array||!a.isObject(i)?(n||(n=U),i.forEach((i,c)=>{const d=n===U?o+c:E(i,n);if(!a.isUndefined(d)&&!a.isNull(d)){const a=R(i,{field:s.displayField,expression:s.displayExpr,bindExpression:s.bindDisplayExpr},e),p={key:d,label:t.isDefined(a)&&null!==a?a.toString():"",value:n===U?i:d,dataObject:i,index:o+c};(s.displayImgSrc||s.bindDisplayImgSrc)&&(p.imgSrc=R(i,{expression:s.displayImgSrc,bindExpression:s.bindDisplayImgSrc},e)),Pe(r,e,p,"dataObject"),l.push(p)}})):a.forEach(i,(n,s)=>{const c={key:a.trim(s),value:s,label:t.isDefined(n)&&null!==n?n.toString():"",index:o,dataObject:i};Pe(r,e,c,"value"),l.push(c)}),l},e.unsupportedStatePersistenceTypes=["On-Demand","Scroll"],e.updateDeviceView=(e,i=!1)=>{const n=e.querySelector(Rt(Et.LEFT_PANEL)),a=e.querySelector(Rt(Et.RIGHT_PANEL)),s=e.querySelector(Rt(Et.HEADER)),o=s&&s.querySelector(`.${Et.SEARCH}`);((e,t,i,n=!1)=>{n||St(t,_t.bind(void 0,e,i))})(n,e.querySelector(`.${Et.CONTENT}`),o,i),n?((e,i)=>{St(Rt(Et.SWIPE_ELEM),()=>{e&&(e.widget.toggle(),e.classList.contains("visible")&&i&&t.setCSS(i,"display","none"))})})(n,o):$(s).find(Rt(Et.SWIPE_ELEM)).remove(),a&&(e=>{St(e,_t)})(a),o&&xt(o,n)},e.widgetIdGenerator=Ye}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@wm/transpiler"),require("@wm/core"),require("@angular/compiler"),require("lodash-es")):"function"==typeof define&&define.amd?define(["exports","@wm/transpiler","@wm/core","@angular/compiler","lodash-es"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.buildTask={}),e.wm.transpiler,e.wm.core,e.ng.compiler,e._)}(this,function(e,t,i,n,a){"use strict";const s="carousel",o=new i.IDGenerator("wm_carousel_ref_");t.register("wm-carousel",()=>({pre:(e,i)=>{const n=o.nextUid();let a="";return e?.get("height")?.endsWith("%")&&(a=`height:${parseInt(e.get("height"),10)}vh`,e.set("height","100%")),e?.get("width")&&(a+=a?";":`width:${e.get("width")}`),i.set("carousel_ref",n),`<div class="app-carousel carousel" style="${a}"><${s} wmCarousel #${n}="wmCarousel" ${t.getAttrMarkup(e)} interval="0" [ngClass]="${n}.navigationClass">`},post:()=>`</${s}></div>`,template:e=>{if((e=>e.attrs.find(e=>"type"===e.name&&"dynamic"===e.value))(e)){const n=e.attrs.find(e=>"dataset"===e.name),a=e.attrs.find(e=>"name"===e.name);if(!n)return;const s=t.getBoundToExpr(n.value);if(!s)return;i.updateTemplateAttrs(e,s,a.value)}},provide:(e,t)=>{const i=new Map;return i.set("carousel_ref",t.get("carousel_ref")),i}}));var r=Object.freeze({__proto__:null,default:()=>{}});const l="slide";let c=1;t.register("wm-carousel-content",()=>({pre:e=>`<${l} wmCarouselTemplate ${t.getAttrMarkup(e)}>`,post:()=>`</${l}>`})),t.register("wm-carousel-template",()=>({requires:["wm-carousel"],pre:(e,i,n)=>{const a=n.get("carousel_ref");return`@if(!${a}.fieldDefs){<div >{{${a}.nodatamessage}}</div>}\n @for (item of ${a}.fieldDefs; track item; let i = $index) {\n <${l} wmCarouselTemplate #carouselTemplateRef="carouselTemplateRef" ${t.getAttrMarkup(e)}>\n <ng-container [ngTemplateOutlet]="carouselTempRef${c}"\n [ngTemplateOutletContext]="{item:item, index:i}"\n [ngTemplateOutletInjector]="${a}.createCustomInjector('carousel_item_' + carouselTemplateRef.trackId, {item:item, index:i})"></ng-container>\n </${l}>\n }\n <ng-template #carouselTempRef${c++} let-item="item" let-index="index">`},post:()=>"</ng-template>"}));var d=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-login",()=>({pre:e=>`<div wmLogin ${t.getAttrMarkup(e)} eventsource.bind="Actions.loginAction">`,post:()=>"</div>",provide:()=>{const e=new Map;return e.set("isLogin",!0),e}}));var p=Object.freeze({__proto__:null,default:()=>{}});const m="marquee";t.register("wm-marquee",()=>({pre:e=>`<${m} onmouseover="this.stop();" onmouseout="this.start();" wmMarquee role="marquee" aria-live="off" ${t.getAttrMarkup(e)}>`,post:()=>`</${m}>`}));var h=Object.freeze({__proto__:null,default:()=>{}});const u=new i.IDGenerator("wm_anchor");t.register("wm-anchor",()=>({pre:e=>{const i=u.nextUid();return`<a wmAnchor #${i}="wmAnchor" role="link" data-identifier="anchor" [attr.aria-label]="${i}.arialabel || (${i}.badgevalue ? ${i}.caption + ' ' + ${i}.badgevalue : ${i}.caption) || null" ${t.getAttrMarkup(e)}>`},post:()=>"</a>"}));var g=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-audio",()=>({pre:e=>`<div wmAudio ${t.getAttrMarkup(e)}>`,post:()=>"</div>"}));var v=Object.freeze({__proto__:null,default:()=>{}});const f=new i.IDGenerator("wm_html");t.register("wm-html",()=>({pre:e=>{const i=f.nextUid();return`<div wmHtml #${i}="wmHtml" role="application" [attr.aria-label]="${i}.arialabel || 'HTML content'" ${t.getAttrMarkup(e)}>`},post:()=>"</div>"}));var b=Object.freeze({__proto__:null,default:()=>{}});const y="span";t.register("wm-icon",()=>({pre:e=>`<${y} wmIcon ${t.getAttrMarkup(e)}>`,post:()=>`</${y}>`}));var w=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-iframe",()=>({pre:e=>`<div wmIframe ${t.getAttrMarkup(e)}>`,post:()=>"</div>"}));var P=Object.freeze({__proto__:null,default:()=>{}});let C="p";const T=new i.IDGenerator("wm_label");t.register("wm-label",()=>({pre:e=>{if(e.get("notag"))C="label";else{if(!e.get("type")){const t=e.get("class")?e.get("class").split(" ").filter(e=>["h1","h2","h3","h4","h5","h6","p"].includes(e)):[];e.set("type",t.length?t[0]:"p")}C=e.get("type")}const i=T.nextUid();return`<${C} wmLabel #${i}="wmLabel" ${t.getAttrMarkup(e)}>`},post:()=>`</${C}>`}));var O=Object.freeze({__proto__:null,default:()=>{}});const I=new i.IDGenerator("wm_picture");t.register("wm-picture",()=>({pre:e=>{const i=I.nextUid();return`<img wmPicture #${i}="wmPicture" [alt]="${i}.alttext" wmImageCache="${e.get("offline")||"true"}" [attr.aria-label]="${i}.arialabel || 'Image'" ${t.getAttrMarkup(e)}>`}}));var D=Object.freeze({__proto__:null,default:()=>{}});const E=new i.IDGenerator("wm_spinner");t.register("wm-spinner",()=>({pre:e=>{const i=E.nextUid();return`<div wmSpinner #${i}="wmSpinner" role="alert" [attr.aria-label]="${i}.arialabel || 'Loading...'" aria-live="assertive" aria-busy="true" ${t.getAttrMarkup(e)}>`},post:()=>"</div>"}));var R=Object.freeze({__proto__:null,default:()=>{}});const S=(e,t)=>e.attrs.find(e=>e.name===t),_=(e,t)=>{const i=S(e,t);if(i)return i.value};t.register("wm-progress-bar",()=>({template:e=>{const i=_(e,"dataset"),n=t.getBoundToExpr(i);if(n){let t=_(e,"type"),i=_(e,"datavalue");const s=(a=n,new RegExp(`bind:(${a}|${a}\\[\\$i])\\.`,"g"));t&&t.includes(n)&&(t=t.replace(s,""),S(e,"type").value=t),i&&i.includes(n)&&(i=i.replace(s,""),S(e,"datavalue").value=i)}var a},pre:e=>`<div wmProgressBar ${t.getAttrMarkup(e)}>`,post:()=>"</div>"}));var x=Object.freeze({__proto__:null,default:()=>{}});const A=new i.IDGenerator("wm_progress_circle");t.register("wm-progress-circle",()=>({pre:e=>{const i=A.nextUid();return`<div wmProgressCircle #${i}="wmProgressCircle" role="progressbar" [attr.aria-label]="${i}.arialabel || 'circle-progress'" [attr.hint]="${i}.hint" [attr.aria-valuetext]="${i}.displayValue" [attr.aria-valuemin]="${i}.minvalue" [attr.aria-valuemax]="${i}.maxvalue" ${t.getAttrMarkup(e)}>`},post:()=>"</div>"}));var k=Object.freeze({__proto__:null,default:()=>{}});const N=new i.IDGenerator("wm_richtexteditor");t.register("wm-richtexteditor",()=>({pre:e=>{const i=N.nextUid();return`<div wmRichTextEditor #${i}="wmRichTextEditor" role="textbox" [attr.aria-label]="${i}.arialabel || 'Richtext editor'" ${t.getFormMarkupAttr(e)}>`},post:()=>"</div>"}));var M=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-search",()=>({pre:e=>`<div wmSearch ${t.getFormMarkupAttr(e)} ${i.getNgModelAttr(e)}>`,post:()=>"</div>"}));var L=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-tree",()=>({pre:e=>`<ul wmTree class="ztree" ${t.getAttrMarkup(e)}>`,post:()=>"</ul>"}));var F=Object.freeze({__proto__:null});t.register("wm-card",()=>({pre:e=>`<div wmCard ${t.getAttrMarkup(e)}>`,post:()=>"</div>"}));var $=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-card-content",()=>({pre:e=>`<div wmCardContent partialContainer ${t.getAttrMarkup(e)}>`,post:()=>"</div>"}));var j=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-card-actions",()=>({pre:e=>`<div wmCardActions ${t.getAttrMarkup(e)}>`,post:()=>"</div>"}));var V=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-card-footer",()=>({pre:e=>`<div wmCardFooter ${t.getAttrMarkup(e)}>`,post:()=>"</div>"}));var B=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-chart",()=>({pre:e=>`<div wmChart redrawable aria-label="${e.get("type")} Chart" ${t.getAttrMarkup(e)}>`,post:()=>"</div>"}));var G=Object.freeze({__proto__:null,default:()=>{}});const W=new i.IDGenerator("wm_accordion_ref_");t.register("wm-accordion",()=>({pre:(e,i)=>{const n=W.nextUid();return i.set("accordion_ref",n),`<div wmAccordion #${n}="wmAccordion" ${t.getAttrMarkup(e)}>`},post:()=>"</div>",template:(e,n)=>{if((e=>e.attrs.find(e=>"type"===e.name&&"dynamic"===e.value))(e)){const n=e.attrs.find(e=>"dataset"===e.name),a=e.attrs.find(e=>"name"===e.name);if(!n)return;const s=t.getBoundToExpr(n.value);if(!s)return;i.updateTemplateAttrs(e,s,a.value)}},provide:(e,t)=>{const i=new Map;return i.set("accordion_ref",t.get("accordion_ref")),i}}));var q=Object.freeze({__proto__:null,default:()=>{}});const z=new i.IDGenerator("wm_accordionpane");t.register("wm-accordionpane",()=>({pre:e=>`<div #${z.nextUid()}="wmAccordionPane" wmAccordionPane partialContainer wm-navigable-element="true" ${t.getAttrMarkup(e)}>`,post:()=>"</div>"}));var U=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-container",()=>({pre:e=>`<div wmContainer partialContainer wmSmoothscroll="${e.get("smoothscroll")||"false"}" ${t.getAttrMarkup(e)}>`,post:()=>"</div>"}));var H=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-gridcolumn",()=>({pre:e=>`<div wmLayoutGridColumn ${t.getAttrMarkup(e)}>`,post:()=>"</div>"}));var Y=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-gridrow",()=>({pre:e=>`<div wmLayoutGridRow ${t.getAttrMarkup(e)}>`,post:()=>"</div>"}));var X=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-layoutgrid",()=>({pre:e=>`<div wmLayoutGrid ${t.getAttrMarkup(e)}>`,post:()=>"</div>"}));var K=Object.freeze({__proto__:null,default:()=>{}});const Q="div",Z=new i.IDGenerator("wm_panel");t.register("wm-panel",()=>({pre:e=>{const i=Z.nextUid();return`<${Q} wmPanel #${i}="wmPanel" partialContainer wm-navigable-element="true" ${t.getAttrMarkup(e)}>`},post:()=>`</${Q}>`})),t.register("wm-panel-footer",()=>({pre:e=>`<${Q} wmPanelFooter ${t.getAttrMarkup(e)}>`,post:()=>`</${Q}>`}));var J=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-segmented-control",()=>({pre:e=>`<div wmSegmentedControl ${t.getAttrMarkup(e)}>`,post:()=>"</div>"}));var ee=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-segment-content",()=>({pre:e=>`<li wmSegmentContent partialContainer wmSmoothscroll=${e.get("smoothscroll")||"false"} wm-navigable-element="true" ${t.getAttrMarkup(e)}>`,post:()=>"</li>"}));var te=Object.freeze({__proto__:null,default:()=>{}});let ie=1;t.register("wm-repeat-template",()=>({requires:["wm-accordion","wm-tabs","wm-wizard"],pre:(e,i,n,a,s)=>{const o=n&&n.get("accordion_ref")||a&&a.get("tabs_ref")||s&&s.get("wizard_ref");if(o)return`@if(${o}.fieldDefs && !${o}.fieldDefs.length){<div>{{${o}.nodatamessage}}</div>}\n @for (item of ${o}.fieldDefs; track item; let i = $index) {\n <div wmRepeatTemplate #repeatItemRef="repeatItemRef" ${t.getAttrMarkup(e)}>\n <ng-container [ngTemplateOutlet]="widgetRef${ie}"\n [ngTemplateOutletContext]="{item:item, index:i}"\n [ngTemplateOutletInjector]="${o}.createCustomInjector('dynamic_pane_' + repeatItemRef.trackId, {item:item, index:i})"></ng-container>\n </div>\n }\n <ng-template #widgetRef${ie++} let-item="item" let-index="index">`},post:()=>"</ng-template>"}));var ne=Object.freeze({__proto__:null,default:()=>{}});const ae=new i.IDGenerator("wm_tabs_ref_");t.register("wm-tabs",()=>({pre:(e,i)=>{const n=ae.nextUid();return i.set("tabs_ref",n),`<div wmTabs #${n}="wmTabs" ${t.getAttrMarkup(e)}>`},post:()=>"</div>",template:(e,n)=>{if((e=>e.attrs.find(e=>"type"===e.name&&"dynamic"===e.value))(e)){const n=e.attrs.find(e=>"dataset"===e.name),a=e.attrs.find(e=>"name"===e.name);if(!n)return;const s=t.getBoundToExpr(n.value);if(!s)return;i.updateTemplateAttrs(e,s,a.value)}},provide:(e,t)=>{const i=new Map;return i.set("tabs_ref",t.get("tabs_ref")),i}}));var se=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-tabpane",()=>({pre:e=>`<div wmTabPane partialContainer ${t.getAttrMarkup(e)} wm-navigable-element="true" role="tabpanel">`,post:()=>"</div>"}));var oe=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-tile",()=>({pre:e=>`<div wmTile wm-navigable-element="true" ${t.getAttrMarkup(e)}>`,post:()=>"</div>"}));var re=Object.freeze({__proto__:null,default:()=>{}});const le=new i.IDGenerator("wm_wizard_ref_");t.register("wm-wizard",()=>({pre:(e,i)=>{const n=le.nextUid();return i.set("wizard_ref",n),`<div wmWizard #${n}="wmWizard" ${t.getAttrMarkup(e)}>`},post:()=>"</div>",template:(e,n)=>{if((e=>e.attrs.find(e=>"type"===e.name&&"dynamic"===e.value))(e)){const n=e.attrs.find(e=>"dataset"===e.name),a=e.attrs.find(e=>"name"===e.name);if(!n)return;const s=t.getBoundToExpr(n.value);if(!s)return;i.updateTemplateAttrs(e,s,a.value)}},provide:(e,t)=>{const i=new Map;return i.set("wizard_ref",t.get("wizard_ref")),i}}));var ce=Object.freeze({__proto__:null,default:()=>{}});const de="form",pe=new i.IDGenerator("wizard_step_id_");t.register("wm-wizardstep",()=>({pre:e=>{const i=pe.nextUid();return`<${de} wmWizardStep partialContainer #${i}="wmWizardStep" ${t.getAttrMarkup(e)}>\n <ng-template [ngIf]="${i}.isInitialized">`},post:()=>`</ng-template></${de}>`}));var me=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-wizardaction",()=>({pre:e=>`<ng-template #wizardAction><div wmWizardAction ${t.getAttrMarkup(e)}>`,post:()=>"</div></ng-template>"}));var he=Object.freeze({__proto__:null,default:()=>{}});const ue="button",ge=new i.IDGenerator("wm_barcodescanner");t.register("wm-barcodescanner",()=>({pre:e=>{const i=ge.nextUid();return`<${ue} wmBarcodescanner #${i}="wmBarcodescanner" [attr.aria-label]="${i}.arialabel || 'Barcode scanner'" ${t.getAttrMarkup(e)}>`},post:()=>`</${ue}>`}));var ve=Object.freeze({__proto__:null,default:()=>{}});const fe="button",be=new i.IDGenerator("wm_camera");t.register("wm-camera",()=>({pre:e=>{const i=be.nextUid();return`<${fe} type='button' wmCamera #${i}="wmCamera" [attr.aria-label]="${i}.arialabel || 'Camera'" ${t.getAttrMarkup(e)}>`},post:()=>`</${fe}>`}));var ye=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-alertdialog",()=>({pre:e=>`<div wmAlertDialog wm-navigable-element="true" ${t.getAttrMarkup(e)}>`,post:()=>"</div>"}));var we=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-confirmdialog",()=>({pre:e=>`<div wmConfirmDialog wm-navigable-element="true" ${t.getAttrMarkup(e)}>`,post:()=>"</div>"}));var Pe=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-dialogactions",()=>({pre:e=>`<ng-template #dialogFooter><div wmDialogFooter data-identfier="actions" ${t.getAttrMarkup(e)}>`,post:()=>"</div></ng-template>"}));var Ce=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-dialog",()=>({pre:e=>`<div wmDialog ${t.getAttrMarkup(e)} aria-modal="true" role="dialog" wm-navigable-element="true"><ng-template #dialogBody>`,post:()=>"</ng-template></div>"}));var Te=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-iframedialog",()=>({pre:e=>`<div wmIframeDialog wm-navigable-element="true" ${t.getAttrMarkup(e)}>`,post:()=>"</div>"}));var Oe=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-logindialog",()=>({pre:e=>`<div wmDialog wmLoginDialog ${t.getAttrMarkup(e)} eventsource.bind="Actions.loginAction" wm-navigable-element="true"><ng-template #dialogBody>`,post:()=>"</ng-template></div>"}));var Ie=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-pagedialog",()=>({pre:(e,i)=>{const n=e.get("content");e.delete("content");const a=e.get("content.bind");e.delete("content.bind");const s=e.get("load.event");e.delete("load.event");let o="",r="";s&&(o=`load.event="${s}"`),a?r=`content.bind="${a}"`:n&&(r=`content="${n}"`);let l="";return r&&(i.set("hasPartialContent",!0),l+=`<ng-template><div wmContainer #partial partialContainer ${r} width="100%" height="100%" ${o}>`),`<div wmPartialDialog ${t.getAttrMarkup(e)}>${l}`},post:(e,t)=>{let i="";return t.get("hasPartialContent")&&(i="</div></ng-template>"),`${i}</div>`}}));var De=Object.freeze({__proto__:null,default:()=>{}});const Ee="quickedit",Re="form",Se="dialog",_e={integer:["number","text","select","checkboxset","radioset","rating","slider","currency","autocomplete","chips"],big_integer:["number","text","select","checkboxset","radioset","rating","slider","currency","autocomplete","chips"],short:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],float:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],big_decimal:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],number:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],double:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],long:["number","text","select","checkboxset","radioset","rating","slider","currency","autocomplete","chips"],byte:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],string:["text","number","textarea","password","richtext","select","checkboxset","radioset","date","time","timestamp","switch","currency","autocomplete","chips","colorpicker"],character:["text","number","textarea","password","richtext","select","checkboxset","radioset","switch","currency","autocomplete","chips"],text:["text","number","textarea","password","richtext","select","checkboxset","radioset","date","time","timestamp","switch","currency","autocomplete","chips","colorpicker"],date:["date","text","number","select","checkboxset","radioset","autocomplete","chips"],time:["time","text","number","select","checkboxset","radioset","autocomplete","chips"],timestamp:["timestamp","text","number","select","checkboxset","radioset","autocomplete","chips"],datetime:["datetime","text","select","checkboxset","radioset","autocomplete","chips"],boolean:["checkbox","radioset","toggle","select"],list:["select","radioset","checkboxset","switch","autocomplete","chips"],clob:["text","textarea","richtext"],blob:["upload"],file:["upload"],custom:["text","number","textarea","password","checkbox","toggle","slider","richtext","currency","switch","select","checkboxset","radioset","date","time","timestamp","rating","datetime","autocomplete","chips","colorpicker"]},xe=new Set([i.FormWidgetType.SELECT,i.FormWidgetType.CHECKBOXSET,i.FormWidgetType.RADIOSET,i.FormWidgetType.SWITCH,i.FormWidgetType.AUTOCOMPLETE,i.FormWidgetType.CHIPS,i.FormWidgetType.TYPEAHEAD,i.FormWidgetType.RATING]),Ae=e=>{let t=_e[e]&&_e[e][0];e===i.DataType.BOOLEAN&&(t=i.FormWidgetType.SELECT);return[i.FormWidgetType.TEXT,i.FormWidgetType.NUMBER,i.FormWidgetType.SELECT,i.FormWidgetType.AUTOCOMPLETE,i.FormWidgetType.DATE,i.FormWidgetType.TIME,i.FormWidgetType.DATETIME].includes(t)?t:i.FormWidgetType.TEXT},ke=new i.IDGenerator("formfield_"),Ne=new Map([[i.FormWidgetType.SELECT,["Select Min value","Select Max value","Select value"]],[i.FormWidgetType.DATETIME,["Select Min date time","Select Max date time","Select date time"]],[i.FormWidgetType.TIME,["Select Min time","Select Max time","Select time"]],[i.FormWidgetType.DATE,["Select Min date","Select Max date","Select date"]],[i.FormWidgetType.TEXTAREA,["","","Enter value"]],[i.FormWidgetType.RICHTEXT,["","","Enter value"]],[i.FormWidgetType.COLORPICKER,["Select Color","Select Color","Select Color"]],[i.FormWidgetType.CHIPS,["","","Type here..."]],[i.FormWidgetType.PASSWORD,["Enter Min value","Enter Max value","Enter value"]],[i.FormWidgetType.NUMBER,["Enter Min value","Enter Max value","Enter value"]],[i.FormWidgetType.TEXT,["Enter Min value","Enter Max value","Enter value"]],[i.FormWidgetType.CURRENCY,["Enter Min value","Enter Max value","Enter value"]],[i.FormWidgetType.AUTOCOMPLETE,["","","Search"]]]),Me=(e,t,i)=>{const n=1===i?"maxplaceholder":"placeholder";let a=e.get(n);a||""===a||(a=Ne.get(t)&&Ne.get(t)[i],a&&e.set(n,a))},Le=(e,t)=>{let n="";if("custom-widget"===t.widgetType)for(let[t,i]of e)t.startsWith("prop-")&&(n+=t+'="'+i+'" ');const a=e.get("name"),s=e.get("widgetname"),o=(e.get("key")||a||"").trim(),r=t.isMaxWidget?`formControlName="${o}_max"`:t.isInList?`[formControlName]="${t.counter}._fieldName"`:`formControlName="${o}"`,l=t.isMaxWidget?"#formWidgetMax":"#formWidget",c=a?t.isMaxWidget?`name="${a}_formWidgetMax"`:`name="${a}_formWidget"`:"",d=`[ngClass]="${e.get("ngclass")}"`,p=`[class.hidden]="!${t.pCounter}.isUpdateMode && ${t.counter}.viewmodewidget !== 'default'" ${r} ${t.eventsTmpl} ${d} ${l} ${c} ${s?`widgetname=${s} ${n}`:""}`;return i.getFormWidgetTemplate(t.widgetType,p,e,{counter:t.counter,pCounter:t.pCounter})},Fe=(e,t,n)=>{if("true"===e.get("is-related"))return`${n}.getDisplayExpr()`;if(t===i.FormWidgetType.PASSWORD)return"'********'";let a=`${n}.value`;return t===i.FormWidgetType.DATETIME||t===i.FormWidgetType.TIMESTAMP?(a+=` | toDate:${n}.formWidget.datepattern || 'yyyy-MM-dd hh:mm:ss a'`,a):t===i.FormWidgetType.TIME?(a+=` | toDate:${n}.formWidget.timepattern || 'hh:mm a'`,a):t===i.FormWidgetType.DATE?(a+=` | toDate:${n}.formWidget.datepattern || 'yyyy-MMM-dd'`,a):t===i.FormWidgetType.RATING||t===i.FormWidgetType.UPLOAD?"":(s=t,xe.has(s)&&"All Fields"===e.get("datafield")?`${n}.getDisplayExpr()`:`${n}.getCaption()`);var s},$e=e=>({requires:["wm-form","wm-liveform","wm-livefilter","wm-list"],pre:(n,a,s,o,r,l)=>{const c=ke.nextUid(),d=s||o||r,p=d&&d.get("form_reference")||"form",m=n.get("widget")||i.FormWidgetType.TEXT,h=e?"form-field":"filter-field",u="wmform-field-error-"+i.generateGUId(),g=`@if (${c}._control?.invalid && ${c}._control?.touched && ${p}.isUpdateMode) {\n <p class="help-block text-danger" aria-hidden="false" role="alert" aria-live="assertive" [attr.aria-label]="${c}.validationmessage" id="${u}">\n <span aria-hidden="true" [textContent]="${c}.validationmessage"></span>\n </p>}`,v=m===i.FormWidgetType.UPLOAD?"":(e=>{const i=new Map;return e.has("focus.event")||e.set("focus.event",""),e.has("blur.event")||e.set("blur.event",""),e.forEach((t,n)=>{n.endsWith(".event")&&("focus.event"===n?t=`_onFocusField($event);${t}`:"blur.event"===n&&(t=`_onBlurField($event);${t}`),i.set(n,t),e.delete(n))}),t.getFormMarkupAttr(i)})(n),f=p===(l&&l.get("parent_form_reference"));return n.set("__validationId",u),n.set("__widgetType",m),n.delete("widget"),a.set("counter",c),"true"===n.get("is-range")?(Me(n,m,0),Me(n,m,1)):Me(n,m,2),`<div data-role="${h}" [formGroup]="${p}.ngform" wmFormField wmCaptionPosition #${c}="wmFormField" widgettype="${m}" ${t.getFormMarkupAttr(n)}>\n <div class="live-field form-group app-composite-widget clearfix caption-{{${p}.captionposition}}" widget="${m}">\n <label [hidden]="!${c}.displayname" class="app-label control-label formfield-label {{${p}._captionClass}}"\n [ngStyle]="{width: ${p}.captionsize}" [ngClass]="{'text-danger': ${c}._control?.invalid && ${c}._control?.touched && ${p}.isUpdateMode,\n required: ${p}.isUpdateMode && ${c}.required}" [textContent]="${c}.displayname"> </label>\n <div [ngClass]="${c}.displayname ? ${p}._widgetClass : 'col-sm-12'">\n <span class="form-control-static app-label"\n [hidden]="${p}.isUpdateMode || ${c}.viewmodewidget === 'default' || ${c}.widgettype === 'upload'" [innerHTML]="${Fe(n,m,c)}"></span>\n ${((e,t,i,n,a,s)=>{if("true"!==e.get("is-range"))return Le(e,{widgetType:t,eventsTmpl:i,counter:n,pCounter:a,isInList:s});const o="col-sm-6";return`<div class="${o}">${Le(e,{widgetType:t,eventsTmpl:i,counter:n,pCounter:a})}</div>\n <div class="${o}">${Le(e,{widgetType:t,eventsTmpl:i,counter:n,pCounter:a,isMaxWidget:!0})}</div>`})(n,m,v,c,p,f)}\n @if(${c}.showPendingSpinner){ <span aria-hidden="true" class="form-field-spinner fa fa-circle-o-notch fa-spin form-control-feedback"></span>}\n @if(!(${c}._control?.invalid && ${c}._control?.touched) && ${p}.isUpdateMode){ <p class="help-block" aria-hidden="true" role="alert" aria-live="polite" [textContent]="${c}.hint"></p> }\n ${g}\n </div>\n </div>`},post:()=>"</div>",provide:(e,t)=>{const i=new Map;return i.set("form_reference",t.get("counter")),i},imports:e=>{const t=e.get("__widgetType")||e.get("type"),n=i.getRequiredFormWidget(t);e.delete("__widgetType");let a=[];return t&&[i.FormWidgetType.DATE,i.FormWidgetType.DATETIME,i.FormWidgetType.TIME,i.FormWidgetType.TIMESTAMP].includes(t)&&a.push("toDate"),[n,"wm-form",...a]}});t.register("wm-form-field",$e.bind(void 0,!0)),t.register("wm-filter-field",$e.bind(void 0,!1));var je=Object.freeze({__proto__:null,default:()=>{}});const Ve=e=>({pre:i=>`<div wmFormAction name="${i.get("name")||i.get("key")}" ${t.getAttrMarkup(i)} ${e}>`,post:()=>"</div>"});t.register("wm-form-action",Ve.bind(void 0,"")),t.register("wm-filter-action",Ve.bind(void 0,' update-mode="true" '));var Be=Object.freeze({__proto__:null,default:()=>{}});const Ge="form",We=new i.IDGenerator("form_"),qe=new Set(["wm-text","wm-textarea","wm-checkbox","wm-slider","wm-richtexteditor","wm-currency","wm-switch","wm-select","wm-checkboxset","wm-radioset","wm-date","wm-time","wm-timestamp","wm-upload","wm-rating","wm-datetime","wm-search","wm-chips","wm-colorpicker","wm-table"]);let ze;const Ue=(e=[])=>{e.forEach(e=>{if("wm-form-field"===e.name&&ze++,qe.has(e.name)){let t=e.attrs.find(e=>"key"===e.name||"name"===e.name);if(t=t&&t.value,!t){let i=e.attrs.find(e=>"datavalue"===e.name);if(i&&i.value){const e=/\((.*)\)/;i=i.value.match(e),i&&i.length>1&&(t=i[1].replace(/["']/g,""))}}e.attrs.push(new n.Attribute("formControlName",t,1,1,1,void 0,void 0)),e.attrs.push(new n.Attribute("wmFormWidget","",1,1,1,void 0,void 0))}Ue(e.children)})},He=(e="")=>({requires:["wm-livetable","wm-login"],template:e=>{ze=0,Ue(e.children)},pre:(i,n,a,s)=>{let o,r;const l=s&&s.get("isLogin")?"app-login":"",c=We.nextUid(),d=i.get("dependson")?`dependson="${i.get("dependson")}"`:"";d&&i.set("dependsontable",i.get("dependson"));const p="page"===i.get("formlayout")?"app-device-liveform panel liveform-inline":"",m=["title","title.bind","iconclass","iconclass.bind","width"];i.delete("dependson");const h=`<${Ge} wmForm data-role="${l}" ${e} #${c} ngNativeValidate [formGroup]="${c}.ngform" [noValidate]="${c}.validationtype !== 'html'"\n class="${p}" [class]="${c}.captionAlignClass" [autocomplete]="${c}.autocomplete ? 'on' : 'off'" captionposition=${i.get("captionposition")}`;if(i.set("numberOfFields",`${ze}`),n.set("counter",c),(e=>{if(e.get("formdata.bind")){const i=t.getDataSource(e.get("formdata.bind"));i&&e.set("formdatasource.bind",i)}})(i),"dialog"===i.get("formlayout")){r=a?a.get("liveform_dialog_id"):`liveform_dialog_id_${c}`,i.set("dialogId",r);const e=new Map;return m.forEach(t=>{i.get(t)&&e.set(t,i.get(t))}),i.set("width","100%"),o=t.getAttrMarkup(i),`<div data-identifier="liveform" init-widget class="app-liveform liveform-dialog" ${d} dialogid="${r}">\n <div wmDialog class="app-liveform-dialog" name="${r}" role="form" ${t.getAttrMarkup(e)} modal="true">\n <ng-template #dialogBody>\n ${h} ${o}>`}let u="",g="";if("page"===i.get("formlayout")){const e=`device_liveform_header_${c}`,n=new Map;n.set("title",i.get("title")),n.set("backbtnclick.event",i.get("backbtnclick.event")),g=`<ng-template #buttonRef let-btn="btn">\n <button wmButton name="{{btn.key}}" class="navbar-btn btn-primary btn-transparent" iconclass.bind="btn.iconclass" show.bind="btn.show"\n (click)="${c}.invokeActionEvent($event, btn.action)" type.bind="btn.type" hint.bind="btn.title" shortcutkey.bind="btn.shortcutkey" disabled.bind="btn.disabled"\n tabindex.bind="btn.tabindex" [class.hidden]="btn.updateMode ? !${c}.isUpdateMode : ${c}.isUpdateMode"></button>\n </ng-template>`,u=`<header wmMobileNavbar name="${e}" ${t.getAttrMarkup(n)}>\n @for (btn of ${c}.buttonArray; track btn; let i = $index) {\n <ng-container\n [ngTemplateOutlet]="buttonRef"\n [ngTemplateOutletContext]="{btn:btn}"\n [ngTemplateOutletInjector]="${c}.createCustomInjector('mobile_' + i, {item:item, index:i})">\n </ng-container>\n }\n </header>\n <div class="form-elements panel-body" >`}o=t.getAttrMarkup(i);return`${d?`<div ${d}>`:""}${h} ${o}>\n ${g} ${u}`},post:e=>"dialog"===e.get("formlayout")?"</form></ng-template></div></div>":"page"===e.get("formlayout")?`</div></${Ge}>`:e.get("dependsontable")?`</${Ge}></div>`:`</${Ge}>`,provide:(e,t)=>{const i=new Map;return i.set("form_reference",t.get("counter")),i},imports:e=>"dialog"===e.get("formlayout")?["wm-dialog"]:[]});t.register("wm-form",He),t.register("wm-liveform",()=>He("wmLiveForm")),t.register("wm-livefilter",()=>He("wmLiveFilter"));var Ye=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-calendar",()=>({pre:e=>`<div wmCalendar redrawable style="width:100%" role="region" aria-label="${e.get("view")?e.get("view")+" view":"month view"}" ${t.getAttrMarkup(e)}>`,post:()=>"</div>"}));var Xe=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-chips",()=>({pre:e=>`<ul wmChips ${t.getAttrMarkup(e)} ${i.getNgModelAttr(e)}>`,post:()=>"</ul>"}));var Ke=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-colorpicker",()=>({pre:e=>`<div wmColorPicker ${t.getAttrMarkup(e)} ${t.getChildAttrs(e)} ${i.getNgModelAttr(e)}>`,post:()=>"</div>"}));var Qe=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-currency",()=>({pre:e=>`<div wmCurrency ${t.getAttrMarkup(e)} ${t.getChildAttrs(e)} ${i.getNgModelAttr(e)}>`,post:()=>"</div>"}));var Ze=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-buttongroup",()=>({pre:e=>`<div wmButtonGroup role="group" ${t.getAttrMarkup(e)}>`,post:()=>"</div>"}));var Je=Object.freeze({__proto__:null,default:()=>{}});const et="button",tt=new i.IDGenerator("wm_button");t.register("wm-button",()=>({pre:e=>{const i=tt.nextUid();return`<${et} wmButton #${i}="wmButton" [attr.aria-label]="${i}.arialabel || (${i}.badgevalue ? ${i}.caption + ' ' + ${i}.badgevalue : ${i}.caption) || null" ${t.getAttrMarkup(e)}>`},post:()=>`</${et}>`}));var it=Object.freeze({__proto__:null,default:()=>{}});const nt="div";t.register("wm-checkbox",()=>({pre:e=>"button"===e.get("type")?`<${nt} wmCheckbox ${t.getFormMarkupAttr(e)} ${t.getChildAttrs(e)} ${i.getNgModelAttr(e)}>`:`<${nt} wmCheckbox ${t.getFormMarkupAttr(e)} ${t.getChildAttrs(e)} ${i.getNgModelAttr(e)} style="height:100%">`,post:()=>`</${nt}>`}));var at=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-checkboxset",()=>({pre:e=>`<ul role="group" wmCheckboxset ${t.getFormMarkupAttr(e)} ${t.getChildAttrs(e)} ${i.getNgModelAttr(e)}>`,post:()=>"</ul>"}));var st=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-composite",()=>({pre:e=>`<div wmComposite wmCaptionPosition ${t.setChildAttrs(e)} ${t.getAttrMarkup(e)}>`,post:()=>`</div${t.clearChildAttrs()}>`}));var ot=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-number",()=>({pre:e=>`<div wmNumber ${t.getFormMarkupAttr(e)} ${t.getChildAttrs(e)} ${i.getNgModelAttr(e)}>`,post:()=>"</div>"}));var rt=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-radioset",()=>({pre:e=>`<ul role="radiogroup" wmRadioset ${e.get("hint")?` title="${e.get("hint")}" `:""} ${t.getFormMarkupAttr(e)} ${t.getChildAttrs(e)}\n ${i.getNgModelAttr(e)}>`,post:()=>"</ul>"}));var lt=Object.freeze({__proto__:null,default:()=>{}});const ct="wm-select";t.register("wm-select",()=>({pre:e=>`<${ct} ${t.getFormMarkupAttr(e)} ${t.getChildAttrs(e)} ${i.getNgModelAttr(e)}>`,post:()=>`</${ct}>`}));var dt=Object.freeze({__proto__:null,default:()=>{}});const pt=new i.IDGenerator("wm_switch");t.register("wm-switch",()=>({pre:e=>{const n=pt.nextUid();return`<div wmSwitch #${n}="wmSwitch" role="group" [attr.aria-label]="${n}.arialabel || 'Switch choose options'" ${t.getFormMarkupAttr(e)} ${i.getNgModelAttr(e)}>`},post:()=>"</div>"}));var mt=Object.freeze({__proto__:null,default:()=>{}});const ht="wm-input";t.register("wm-text",()=>({pre:e=>`<${ht} ${t.getFormMarkupAttr(e)} ${t.getChildAttrs(e)} ${i.getNgModelAttr(e)}>`,post:()=>`</${ht}>`}));var ut=Object.freeze({__proto__:null,default:()=>{}});const gt="wm-textarea";t.register("wm-textarea",()=>({pre:e=>`<${gt} ${t.getFormMarkupAttr(e)} ${t.getChildAttrs(e)} ${i.getNgModelAttr(e)}>`,post:()=>`</${gt}>`}));var vt=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-datetime",()=>({pre:e=>`<div wmDateTime ${t.getFormMarkupAttr(e)} ${t.getChildAttrs(e)} ${i.getNgModelAttr(e)}>`,post:()=>"</div>"}));var ft=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-date",()=>({pre:e=>`<div wmDate ${t.getFormMarkupAttr(e)} ${t.getChildAttrs(e)} ${i.getNgModelAttr(e)}>`,post:()=>"</div>"}));var bt=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-time",()=>({pre:e=>`<div wmTime ${t.getFormMarkupAttr(e)} ${t.getChildAttrs(e)} ${i.getNgModelAttr(e)}>`,post:()=>"</div>"}));var yt=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-fileupload",()=>({pre:e=>{if(e.get("select.event")){const i=t.getDataSource(e.get("select.event"));e.set("datasource.bind",i)}if(e.get("delete.event")){const i=t.getDataSource(e.get("delete.event"));e.set("deletedatasource.bind",i)}return`<div wmFileUpload ${t.getAttrMarkup(e)}>`},post:()=>"</div>"}));var wt=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-rating",()=>({pre:e=>`<div wmRating ${t.getFormMarkupAttr(e)} ${i.getNgModelAttr(e)}>`,post:()=>"</div>"}));var Pt=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-slider",()=>({pre:e=>`<div wmSlider ${t.getAttrMarkup(e)} ${i.getNgModelAttr(e)}>`,post:()=>"</div>"}));var Ct=Object.freeze({__proto__:null,default:()=>{}});function Tt(e,t,i,a){const s=e.attrs.find(e=>e.name===t);s&&i.attrs.push(new n.Attribute(a,s.value,s.sourceSpan,s.keySpan,s.valueSpan,void 0,void 0))}t.register("wm-media-list",()=>({template:e=>{let t;const i=e.attrs.find(e=>"dataset"===e.name),a=(e=[])=>{e.forEach(e=>{e.name&&"wm-list"!==e.name&&(e.attrs.forEach(e=>{e.value.startsWith(`bind:${t}.data[$i]`)?e.value=e.value.replace(`${t}.data[$i]`,"item"):e.value.startsWith(`bind:${t}`)&&(e.value=e.value.replace(t,"item"))}),a(e.children))})};i&&i.value.startsWith("bind:")&&(t=i.value.replace("bind:","")),t&&a(e.children);const s=e.children.find(e=>e instanceof n.Element&&"wm-media-template"===e.name);null!=s&&(Tt(s,"width",e,"thumbnailwidth"),Tt(s,"height",e,"thumbnailheight"))},pre:e=>`<div wmMediaList ${t.getAttrMarkup(e)}>`,post:()=>"</div>"}));var Ot=Object.freeze({__proto__:null,default:()=>{}});const It="ng-template";t.register("wm-media-template",()=>({pre:()=>`<${It} #mediaListTemplate let-item="item" let-index="index">`,post:()=>`</${It}>`}));var Dt=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-list",()=>({requires:["wm-form","wm-liveform"],template:(e,a)=>{const s=e.attrs.find(e=>"dataset"===e.name),o=e.attrs.find(e=>"name"===e.name);if(!s)return;const r=t.getBoundToExpr(s.value);if(!r)return;i.updateTemplateAttrs(e,r,o.value,"itemRef.");const l=(e.children||[]).find(e=>e instanceof n.Element&&"wm-listtemplate"===e?.name);if(l){const e={};(l.attrs||[]).forEach(t=>{e[t.name]=t.value}),a.set("listTemplateAttrs",JSON.stringify(e))}else a.set("listTemplateAttrs",null)},pre:(e,i,n,a)=>{const s=n||a;i.set("form_reference",s&&s.get("form_reference"));const o=i.get("listTemplateAttrs");if(o){const t=o.replace(/"/g,"&quot;");e.set("itemattrs",t)}return`<div wmList wmLiveActions ${t.getAttrMarkup(e)}>`},post:()=>"</div>",provide:(e,t)=>{const i=new Map;return i.set("parent_form_reference",t.get("form_reference")),i}})),t.register("wm-listtemplate",()=>({pre:()=>'<ng-template #listTemplate let-item="item" let-$index="$index" let-itemRef="itemRef" let-$first="$first" let-$last="$last" let-currentItemWidgets="currentItemWidgets" >',post:()=>"</ng-template>"})),t.register("wm-list-action-template",()=>({template:e=>{e.attrs.find(e=>"position"===e.name).value;e.children.filter(e=>e instanceof n.Element&&"wm-button"===e.name).forEach(t=>{!function(e,t,i,a){const s=e.attrs.find(e=>e.name===t);s&&i.attrs.push(new n.Attribute(a,s.value,s.sourceSpan,s.keySpan,s.valueSpan,void 0,void 0))}(e,"position",t,"swipe-position")})},pre:(e,i)=>"left"===e.get("position")?`<ng-template #listLeftActionTemplate>\n <li class="app-list-item-action-panel app-list-item-left-action-panel actionMenu" ${t.getAttrMarkup(e)}>`:"right"===e.get("position")?`<ng-template #listRightActionTemplate>\n <li class="app-list-item-action-panel app-list-item-right-action-panel actionMenu" ${t.getAttrMarkup(e)}>`:void 0,post:()=>"</li></ng-template>"}));var Et=Object.freeze({__proto__:null,default:()=>{}});const Rt=new i.IDGenerator("liveform_dialog_id_");t.register("wm-livetable",()=>({pre:(e,i)=>{const n=Rt.nextUid();return i.set("counter",n),`<div wmLiveTable ${t.getAttrMarkup(e)} dialogid="${n}">`},post:()=>"</div>",provide:(e,t)=>{const i=new Map;return i.set("liveform_dialog_id",t.get("counter")),i}}));var St=Object.freeze({__proto__:null,default:()=>{}});const _t=new i.IDGenerator("wm_message");t.register("wm-message",()=>({pre:e=>`<p wmMessage tabindex="0" #${_t.nextUid()}="wmMessage" ${t.getAttrMarkup(e)}>`,post:()=>"</p>"}));var xt=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-breadcrumb",()=>({pre:e=>`<ol wmBreadcrumb ${t.getAttrMarkup(e)}>`,post:()=>"</ol>"}));var At=Object.freeze({__proto__:null,default:()=>{}});const kt="div";t.register("wm-menu",()=>({pre:e=>{const i=e.get("width");let n="";if(i){return n=["%","px"].some(e=>i.includes(e))?`[ngStyle]="{'width': '${i}'}"`:`[ngStyle]="{'width': '${i}px'}"`,`<${kt} wmMenu dropdown ${t.getAttrMarkup(e)} ${n}>`}return`<${kt} wmMenu dropdown ${t.getAttrMarkup(e)}>`},post:()=>`</${kt}>`}));var Nt=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-nav-item",()=>({pre:e=>`<li wmNavItem role="listitem" ${t.getAttrMarkup(e)}>`,post:()=>"</li>"}));var Mt=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-nav",()=>({pre:e=>`<ul wmNav data-element-type="wmNav" data-role="page-header" role="list" ${t.getAttrMarkup(e)}>`,post:()=>"</ul>"}));var Lt=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-navbar",()=>({pre:e=>`<nav wmNavbar data-element-type="wmNavbar" role="navigation" ${t.getAttrMarkup(e)}>`,post:()=>"</nav>"}));var Ft=Object.freeze({__proto__:null,default:()=>{}});const $t="wm-popover";t.register("wm-popover",()=>({requires:["wm-table"],pre:(e,i,n)=>{let a;if("inline"!==e.get("contentsource")){const t=e.get("content"),n=e.get("content.bind");let s="";t?s=`content="${t}"`:n&&(s=`content.bind="${n}"`),a=`<div wmContainer #partial partialContainer ${s}>`,i.set("hasPopoverContent",!0)}let s=`<${$t} wmPopover ${t.getAttrMarkup(e)}>`;return s+=`<ng-template ${n?'let-row="row"':""}><div tabindex="0" class="popover-start sr-only" aria-label="">popover content start</div>`,a&&(s+=`${a||""}`),s},post:(e,t)=>{let i="";return t.get("hasPopoverContent")&&(i+="</div>"),`${i}<div tabindex="0" class="popover-end sr-only" aria-label="">popover content ended</div></ng-template></${$t}>`}}));var jt=Object.freeze({__proto__:null,default:()=>{}});const Vt=(e,t)=>e&&e.children.find(e=>e instanceof n.Element&&e.name===t),Bt=(e,t)=>{let i;if(t)return a.forEach(t.children,t=>(t instanceof n.Element&&(t.name===e?i=t:t.children&&(i=Bt(e,t))),!i)),i},Gt=new i.IDGenerator("wm_page");t.register("wm-page",()=>({template:e=>{let t=Vt(Vt(e,"wm-content"),"wm-page-content");t||(t=Bt("wm-page-content",Bt("wm-content",e))),t&&(t.children.unshift(new n.Text("@if (compilePageContent) {\n",null,void 0,void 0)),t.children.push(new n.Text("\n{{onPageContentReady()}}\n}",null,void 0,void 0)))},pre:e=>{const i=Gt.nextUid();return`<div wmPage #${i}="wmPage" data-role="pageContainer" [attr.aria-label]="${i}.arialabel" ${t.getAttrMarkup(e)}>`},post:()=>"</div>"}));var Wt=Object.freeze({__proto__:null,default:()=>{}});const qt=new i.IDGenerator("wm_layout");t.register("wm-layout",()=>({pre:e=>{const i=qt.nextUid();return`<div wmLayout #${i}="wmLayout" data-role="pageContainer" [attr.aria-label]="${i}.arialabel" ${t.getAttrMarkup(e)}>`},post:()=>"</div>"}));var zt=Object.freeze({__proto__:null,default:()=>{}});const Ut="router-outlet";t.register("wm-router-outlet",()=>({pre:e=>`<div wmRouterOutlet name="wmRouterOutlet" ${t.getAttrMarkup(e)}><${Ut} (activate)="onActivate($event)">`,post:()=>`</${Ut}></div>`}));var Ht=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-pagination",()=>({pre:e=>`<nav wmPagination data-identifier="pagination" aria-label="Page navigation" ${t.getAttrMarkup(e)}>`,post:()=>"</nav>"}));var Yt=Object.freeze({__proto__:null,default:()=>{}});const Xt="main";t.register("wm-content",()=>({pre:e=>`<${Xt} wmContent data-role="page-content" role="main" ${t.getAttrMarkup(e)}>`,post:()=>`</${Xt}>`}));var Kt=Object.freeze({__proto__:null,default:()=>{}});const Qt="footer",Zt=new i.IDGenerator("wm_footer");t.register("wm-footer",()=>({pre:e=>{const i=Zt.nextUid();return`<${Qt} wmFooter #${i}="wmFooter" partialContainer data-role="page-footer" role="contentinfo" [attr.aria-label]="${i}.arialabel || 'Page footer'" ${t.getAttrMarkup(e)}>`},post:()=>`</${Qt}>`}));var Jt=Object.freeze({__proto__:null,default:()=>{}});const ei="header",ti=new i.IDGenerator("wm_header");t.register("wm-header",()=>({pre:e=>{const i=ti.nextUid();return`<${ei} wmHeader #${i}="wmHeader" partialContainer data-role="page-header" role="banner" [attr.aria-label]="${i}.arialabel || 'Page header'" ${t.getAttrMarkup(e)}>`},post:()=>`</${ei}>`}));var ii=Object.freeze({__proto__:null,default:()=>{}});const ni="aside",ai=new i.IDGenerator("wm_left_panel");t.register("wm-left-panel",()=>({pre:e=>{const i=ai.nextUid();return`<${ni} wmLeftPanel #${i}="wmLeftPanel" partialContainer data-role="page-left-panel" [attr.aria-label]="${i}.arialabel || 'Left navigation panel'" wmSmoothscroll="${e.get("smoothscroll")||"false"}" ${t.getAttrMarkup(e)}>`},post:()=>`</${ni}>`}));var si=Object.freeze({__proto__:null,default:()=>{}});const oi="header";t.register("wm-mobile-navbar",()=>({pre:e=>`<${oi} wmMobileNavbar ${t.getAttrMarkup(e)}>`,post:()=>`</${oi}>`}));var ri=Object.freeze({__proto__:null,default:()=>{}});const li="aside",ci=new i.IDGenerator("wm_right_panel");t.register("wm-right-panel",()=>({pre:e=>{const i=ci.nextUid();return`<${li} wmRightPanel #${i}="wmRightPanel" partialContainer data-role="page-right-panel" role="complementary" [attr.aria-label]="${i}.arialabel || 'Right navigation panel'" ${t.getAttrMarkup(e)}>`},post:()=>`</${li}>`}));var di=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-page-content",()=>({template:e=>{for(let t of e.attrs)if("spa"===t.name&&"true"===t.value){e.children.push(new n.Text("{{onPageContentReady()}}",null,void 0,void 0));break}},pre:e=>`<div wmPageContent ${e.get("spa")?"wmSpaPage":""} wmSmoothscroll="${e.get("smoothscroll")||"false"}" ${t.getAttrMarkup(e)}>`,post:()=>"</div>",imports:e=>e.get("spa")?["spa-page-content"]:[]}));var pi=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-mobile-tabbar",()=>({pre:e=>`<div wmMobileTabbar ${t.getAttrMarkup(e)}>`,post:()=>"</div>"}));var mi=Object.freeze({__proto__:null,default:()=>{}});const hi="section",ui=new i.IDGenerator("wm_top_nav");t.register("wm-top-nav",()=>({pre:e=>{const i=ui.nextUid();return`<${hi} wmTopNav #${i}="wmTopNav" partialContainer data-role="page-topnav" role="navigation" [attr.aria-label]="${i}.arialabel || 'Second level navigation'" ${t.getAttrMarkup(e)}>`},post:()=>`</${hi}>`}));var gi=Object.freeze({__proto__:null,default:()=>{}});const vi="section";t.register("wm-partial",()=>({template:e=>{e.children.unshift(new n.Text("@if (compileContent) {\n",null,void 0,void 0)),e.children.push(new n.Text("\n}",null,void 0,void 0))},pre:e=>`<${vi} wmPartial data-role="partial" ${t.getAttrMarkup(e)}>`,post:()=>`</${vi}>`}));var fi=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-param",()=>({pre:e=>`<div wmParam hidden ${t.getAttrMarkup(e)}>`,post:()=>"</div>"}));var bi=Object.freeze({__proto__:null,default:()=>{}});const yi="section";t.register("wm-prefab",()=>({pre:e=>`<${yi} wmPrefab redrawable data-role="prefab" ${t.getAttrMarkup(e)}>`,post:()=>`</${yi}>`}));var wi=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-prefab-container",()=>({template:e=>{e.children.unshift(new n.Text("@if (compileContent) {\n",null,void 0,void 0)),e.children.push(new n.Text("\n}",null,void 0,void 0))},pre:e=>`<div wmPrefabContainer ${t.getAttrMarkup(e)}>`,post:()=>"</div>"}));var Pi=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-table-action",()=>({pre:e=>`<div name="${e.get("name")||e.get("key")}" wmTableAction ${t.getAttrMarkup(e)}>`,post:()=>"</div>"}));var Ci=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-table-column-group",()=>({pre:e=>`<div wmTableColumnGroup ${t.getAttrMarkup(e)}>`,post:()=>"</div>"}));var Ti=Object.freeze({__proto__:null,default:()=>{}});const Oi=new i.IDGenerator("data_table_form_"),Ii=new Set(["wm-text","wm-textarea","wm-checkbox","wm-slider","wm-currency","wm-switch","wm-select","wm-checkboxset","wm-radioset","wm-date","wm-time","wm-timestamp","wm-rating","wm-datetime","wm-search","wm-chips","wm-colorpicker"]),Di=(e=[])=>{let t=[];e.forEach(e=>{if(Ii.has(e.name)){if("wm-checkbox"===e.name&&(t=e.attrs.filter(function(e){return"formControlName"===e.name}),t.length))return;e.attrs.push(new n.Attribute("[ngModelOptions]","{standalone: true}",1,1,1,void 0,void 0))}Di(e.children)})},Ei=(e,n,a,s)=>{const o={},r=e.get("binding"),l=e.get("edit-widget-type")||((c={type:e.get("type"),"related-entity-name":e.get("related-entity-name"),"primary-key":e.get("primary-key")})["related-entity-name"]&&c["primary-key"]?i.FormWidgetType.SELECT:_e[c.type]&&_e[c.type][0]||i.FormWidgetType.TEXT);var c;let d="",p="",m="";l===i.FormWidgetType.UPLOAD?(o.uploadProps={formName:Oi.nextUid(),name:r},o.counter=s):(d=n?"#inlineWidgetNew":"#inlineWidget",p=n?`formControlName="${r}_new"`:`formControlName="${r}"`,m="wmFormWidget"),o.inputType="editinputtype";const h=n?"#inlineWidgetTmplNew":"#inlineWidgetTmpl",u=l===i.FormWidgetType.UPLOAD?"":(e=>{let t="";return e.forEach((e,i)=>{i.endsWith(".event")&&(t+=`${i}="${e}" `)}),t})(e),g=(e=>{const i=new Map;return["disabled","disabled.bind"].forEach(t=>{e.get(t)&&(i.set(t,e.get(t)),e.delete(t))}),t.getAttrMarkup(i)})(e),v=`${d} ${m} key="${r}" data-field-name="${r}" ${p} ${u} ${g}`,f=n?"getPendingSpinnerStatusNew":"getPendingSpinnerStatus";return`<ng-template ${h} let-row="row" let-getControl="getControl" let-getValidationMessage="getValidationMessage" let-${f}="${f}">\n <div data-col-identifier="${r}" >\n ${i.getFormWidgetTemplate(l,v,e,o)}\n ${Ri(a)}\n @if(${f}()){\n <div class="overlay"><span aria-hidden="true" class="form-field-spinner fa fa-circle-o-notch fa-spin form-control-feedback"></span></div>\n }\n @if(getValidationMessage()){<span class="sr-only" >{{getValidationMessage()}}</span>}\n </div>\n </ng-template>`},Ri=e=>{let t="";if("bottom"===e)t='@if(getValidationMessage() && getControl() && getControl().invalid && getControl().touched){<span class="help-block text-danger" >{{getValidationMessage()}}</span>}';else t='@if(getValidationMessage() && getControl() && getControl().invalid && getControl().touched){<span placement="top" container="body" tooltip="{{getValidationMessage()}}" class="app-label text-danger wi wi-error">\n </span>}';return t};t.register("wm-table-column",()=>({requires:["wm-table"],template:(e,t)=>{if(e.children.length){if(1===e.children.length&&e.children[0]instanceof n.Text&&0===e.children[0].value.trim().length)return;t.set("customExpression",!0),Di(e.children)}},pre:(e,n,a)=>{let s="",o="",r="",l="";if(a){const n=a.get("table_reference");s="multicolumn"===a.get("filtermode")&&"false"!==e.get("searchable")?((e,n)=>{const a=e.get("filterwidget")||Ae(e.get("type")||i.DataType.STRING),s=e.get("binding"),o=e.get("type")||"string";let r,l;const c=e.get("filterdataset.bind");"autocomplete"===e.get("filterwidget")&&(c&&(r=`dataset.bind="${c}" datasource.bind="${t.getDataSource(c)}"`),l=`submit.event="changeFn('${s}')"`);const d=`#filterWidget formControlName="${s+"_filter"}" ${r} ${l} change.event="changeFn('${s}')"\n disabled.bind="isDisabled('${s}')"`;return`<ng-template #filterTmpl let-changeFn="changeFn" let-isDisabled="isDisabled">\n <div class="input-group ${a}" data-col-identifier="${s}">\n ${i.getFormWidgetTemplate(a,d,e,{inputType:"filterinputtype"})}\n @if(${n}.showClearIcon('${s}')){\n <span class="input-group-addon filter-clear-icon" >\n <button class="btn-transparent btn app-button" aria-label="Clear button" type="button" (click)="${n}.clearRowFilter('${s}')">\n <i class="app-icon wi wi-clear" aria-hidden="true"></i>\n </button>\n </span>\n }\n <span class="input-group-addon" dropdown container="body" (onShown)="${n}.adjustContainer('${s}');">\n <button class="btn-transparent btn app-button" type="button" dropdownToggle><i class="app-icon wi wi-filter-list"></i></button>\n <ul class="matchmode-dropdown dropdown-menu" *dropdownMenu>\n @for (matchMode of ${n}.matchModeTypesMap['${o}']; track matchMode) {\n <li [ngClass]="{active: matchMode === (${n}.rowFilter['${s}'].matchMode || ${n}.matchModeTypesMap['${o}'][0])}">\n <a href="javascript:void(0);" (click)="${n}.onFilterConditionSelect('${s}', matchMode)" [innerText]="${n}.matchModeMsgs[matchMode]"></a>\n </li>\n }\n </ul>\n </span>\n </div></ng-template>`})(e,n):"";const c=a.get("editmode"),d=c!==Se&&c!==Re&&"true"!==e.get("readonly");o=d?Ei(e,!1,a.get("errorstyle"),n):"",r=d&&c===Ee&&"false"!==a.get("shownewrow")?Ei(e,!0,e.get("errorstyle")):"",l=` [formGroup]="${n}.ngform" `}const c=e.get("formatpattern"),d='<ng-template #customExprTmpl let-row="row" let-colDef="colDef" let-editRow="editRow" let-deleteRow="deleteRow" let-addNewRow="addNewRow">';let p="",m="";return n.get("customExpression")?(e.set("customExpression","true"),p=`${d}<div data-col-identifier="${e.get("binding")}">`):(c&&"None"!==c||i.isDateTimeType(e.get("type")))&&(m=(e=>{const t=`row.getProperty('${e.get("binding")}')`;let n=e.get("custompipeformat")||e.get("formatpattern"),a="";switch(!i.isDateTimeType(e.get("type"))||n&&"None"!==n||(e.set("formatpattern","toDate"),e.delete("datepattern"),n="toDate"),n){case"toDate":a=`{{${t} | toDate: colDef.datepattern}}`;break;case"toCurrency":e.get("currencypattern")&&(a=`{{${t} | toCurrency: '${e.get("currencypattern")}`,e.get("fractionsize")?a+=`': ${e.get("fractionsize")}}}`:a+="'}}");break;case"numberToString":e.get("fractionsize")&&(a=`{{${t} | numberToString: '${e.get("fractionsize")}'}}`);break;case"stringToNumber":a=`{{${t} | stringToNumber}}`;break;case"timeFromNow":a=`{{${t} | timeFromNow}}`;break;case"prefix":e.get("prefix")&&(a=`{{${t} | prefix: '${e.get("prefix")}'}}`);break;case"suffix":e.get("suffix")&&(a=`{{${t} | suffix: '${e.get("suffix")}'}}`);break;default:i.checkIsCustomPipeExpression(n)&&(a=`{{${t} | ${n} : row}}`)}return a})(e),m&&(n.set("customExpression",!0),e.set("customExpression","true"),p=`${d}<div data-col-identifier="${e.get("binding")}" title="${m}">${m}`)),`<div wmTableColumn ${t.getAttrMarkup(e)} ${l}>\n ${s}\n ${o}\n ${r}\n ${p}`},post:(e,t)=>{let i="";return t.get("customExpression")&&(i="</div></ng-template>"),`${i}</div>`},imports:e=>{const t=e.get("edit-widget-type"),n=e.get("filterwidget")||Ae(e.get("type")||i.DataType.STRING),a=e.get("custompipeformat")||e.get("formatpattern");let s=[];return a&&(i.checkIsCustomPipeExpression(a)?s.push("custom"):s.push(a)),[i.getRequiredFormWidget(t),i.getRequiredFormWidget(n),"wm-table",...s]}}));var Si=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-table-row",()=>({pre:e=>`<div wmTableRow ${t.getAttrMarkup(e)}>\n ${(e=>{const t="anchor"===e.get("widget-type")?"a":"button",n="anchor"===e.get("widget-type")?"wmAnchor":"wmButton",a=e.get("expandtitle")||e.get("display-name")||"Collapse/Expand";return`<ng-template #rowExpansionActionTmpl let-row="row">\n <${t} ${n}\n title="${a}"\n ${i.getRowActionAttrs(e)}\n class="${e.get("class")} row-expansion-button"\n iconclass="${e.get("collapseicon")}"\n type="button" aria-label="${a}"></${t}>\n </ng-template>`})(e)}\n <ng-template #rowExpansionTmpl let-row="row" let-rowDef="rowDef" let-containerLoad="containerLoad">\n <div wmContainer partialContainer content.bind="rowDef.content" load.event="containerLoad(widget)"\n [ngStyle]="{'height': rowDef.height, 'overflow-y': 'auto'}">\n @for (param of rowDef.partialParams | keyvalue; track param) {\n <div wmParam hidden\n [name]="param.key" [value]="param.value"></div>\n }`,post:()=>"</div></ng-template></div>"}));var _i=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-table-row-action",()=>({pre:e=>`<div wmTableRowAction ${t.getAttrMarkup(e)}>\n ${(e=>{const t=e.get("action"),n=t?` click.event.delayed="${t}" `:"",a=t&&t.includes("editRow(")?'<button type="button" aria-label="Save edit icon" class="save row-action-button btn app-button btn-transparent save-edit-row-button hidden" title="{{appLocale?.LABEL_SAVE || \'Save\'}}">\n <i class="wi wi-done" aria-hidden="true"></i>\n </button>\n <button type="button" aria-label="Cancel edit icon" class="cancel row-action-button btn app-button btn-transparent cancel-edit-row-button hidden" title="{{appLocale?.LABEL_CANCEL || \'Cancel\'}}">\n <i class="wi wi-cancel" aria-hidden="true"></i>\n </button>':"",s=t?t.includes("editRow(")?"edit edit-row-button":t.includes("deleteRow(")?"delete delete-row-button":"":"",o=e.get("tabindex")?`tabindex="${e.get("tabindex")}"`:"",r="anchor"===e.get("widget-type")?"a":"button";return`<ng-template #rowActionTmpl let-row="row">\n <${r} ${"anchor"===e.get("widget-type")?"wmAnchor":"wmButton"} data-action-key="${e.get("key")}"\n ${i.getRowActionAttrs(e)}\n class="row-action row-action-button ${e.get("class")} ${s}"\n iconclass="${e.get("iconclass")}"\n ${n}\n ${o}\n type="button"></${r}>\n ${a}\n </ng-template>`})(e)}`,post:()=>"</div>"}));var xi=Object.freeze({__proto__:null,default:()=>{}});const Ai=new i.IDGenerator("table_");let ki=0;function Ni(e,t){let i=0;e.forEach(e=>{const a=e.name,s=void 0!==t?t:i;"wm-table-column"!==a&&"wm-table-column-group"!==a||(e.attrs.push(new n.Attribute("index",""+ki,1,1,1,void 0,void 0)),e.attrs.push(new n.Attribute("headerIndex",""+s,1,1,1,void 0,void 0)),"wm-table-column-group"===a&&Ni(e.children,i),ki++,i++)})}t.register("wm-table",()=>({template:(e,n)=>{if(e.children.length){const t=e.children.some(e=>"wm-table-column"===e.name||"wm-table-column-group"===e.name);Ni(e.children),n.set("isdynamictable",t?"false":"true");const i=e.children.some(e=>"wm-table-row"===e.name);n.set("isrowexpansionenabled",i?"true":"false")}else n.set("isdynamictable","true");const a=e.attrs.find(e=>"dataset"===e.name),s=e.attrs.find(e=>"name"===e.name);if(!a)return;const o=t.getBoundToExpr(a.value);o&&i.updateTemplateAttrs(e,o,s.value,"","row")},pre:(e,i)=>{const n=Ai.nextUid();return i.set("counter",n),e.set("isdynamictable",i.get("isdynamictable")),e.set("isrowexpansionenabled",i.get("isrowexpansionenabled")),e.set("table_reference",n),`<div wmTable="${n}" wmTableFilterSort wmTableCUD #${n} data-identifier="table" ${t.getAttrMarkup(e)}>`},post:()=>"</div>",provide:(e,t)=>{const i=new Map;return i.set("table_reference",t.get("counter")),i.set("filtermode",e.get("filtermode")),i.set("errorstyle",e.get("errorstyle")),i.set("editmode",e.get("editmode")),i.set("shownewrow",e.get("shownewrow")),i}}));var Mi=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-video",()=>({pre:e=>`<div wmVideo ${t.getAttrMarkup(e)}>`,post:()=>"</div>"}));var Li=Object.freeze({__proto__:null,default:()=>{}});const Fi="parentLinearLayout.spacing";t.register("wm-linearlayout",()=>({requires:["wm-linearlayout"],pre:(e,i,n)=>{let a=e.get("spacing");return e.set("spacing",a&&"0"!==a||!n?a:n.get(Fi)),`<div wmLinearLayout ${t.getAttrMarkup(e)}>`},post:()=>"</div>",provide:(e,t)=>{const i=new Map;return i.set(Fi,e.get("spacing")),i}}));var $i=Object.freeze({__proto__:null,default:()=>{}});t.register("wm-linearlayoutitem",()=>({pre:e=>`<div wmLinearLayoutItem ${t.getAttrMarkup(e)}>`,post:()=>"</div>"}));var ji=Object.freeze({__proto__:null,default:()=>{}});const Vi=new i.IDGenerator("wm_custom_widget");t.register("wm-custom-widget",()=>({pre:e=>`<div wmWidgetContainer customWidgetContainer #${Vi.nextUid()}="wmWidgetContainer" ${t.getAttrMarkup(e)}>`,post:()=>"</div>"}));var Bi=Object.freeze({__proto__:null,default:()=>{}});const Gi="section";t.register("wm-custom-widget-container",()=>({template:e=>{e.children.unshift(new n.Text("@if (compileContent) {\n",null,void 0,void 0)),e.children.push(new n.Text("\n}",null,void 0,void 0))},pre:e=>`<${Gi} wmCustomWidget data-role="widget" ${t.getAttrMarkup(e)}>`,post:()=>`</${Gi}>`}));var Wi=Object.freeze({__proto__:null,default:()=>{}});e.accordionBuild=q,e.accordionPaneBuild=U,e.alertDlgBuild=we,e.anchorBuild=g,e.audioBuild=v,e.barcodeScannerBuild=ve,e.breadcrumbBuild=At,e.buttonBuild=it,e.buttonGroupBuild=Je,e.calendarBuild=Xe,e.cameraBuild=ye,e.cardActionsBuild=V,e.cardBuild=$,e.cardContentBuild=j,e.cardFooterBuild=B,e.carouselBuild=r,e.carouselTemplateBuild=d,e.chartBuild=G,e.checkboxBuild=at,e.checkboxSetBuild=st,e.chipsBuild=Ke,e.colorPickerBuild=Qe,e.compositeBuild=ot,e.confirmDlgBuild=Pe,e.containerBuild=H,e.contentBuild=Kt,e.currencyBuild=Ze,e.customWidgetBuild=Bi,e.customWidgetWrapperBuild=Wi,e.dateBuild=bt,e.dateTimeBuild=ft,e.dlgBuild=Te,e.dlgFooterBuild=Ce,e.fileUploadBuild=wt,e.footerBuild=Jt,e.formActionBuild=Be,e.formBuild=Ye,e.formFieldBuild=je,e.headerBuild=ii,e.htmlBuild=b,e.iconBuild=w,e.iframeBuild=P,e.iframeDlgBuild=Oe,e.initComponentsBuildTask=()=>{},e.labelBuild=O,e.layoutBuild=zt,e.leftPanelBuild=si,e.lgBuild=K,e.lgcolBuild=Y,e.lgrowBuild=X,e.linearLayoutBuild=$i,e.linearLayoutItemBuild=ji,e.listBuild=Et,e.liveTableBuild=St,e.loginBuild=p,e.loginDlgBuild=Ie,e.marqueeBuild=h,e.mediaListBuild=Ot,e.mediaListItemBuild=Dt,e.menuBuild=Nt,e.messageBuild=xt,e.mobileNavbarBuild=ri,e.navBuild=Lt,e.navItemBuild=Mt,e.navbarBuild=Ft,e.numberBuild=rt,e.pageBuild=Wt,e.pageContentBuild=pi,e.paginationBuild=Yt,e.panelBuild=J,e.partialBuild=fi,e.partialDlgBuild=De,e.partialParamBuild=bi,e.pictureBuild=D,e.popoverBuild=jt,e.prefabBuild=wi,e.prefabContainerBuild=Pi,e.progressBarBuild=x,e.progressCircleBuild=k,e.radiosetBuild=lt,e.ratingBuild=Pt,e.repeatTemplateBuild=ne,e.rightPanelBuild=di,e.routerOutletBuild=Ht,e.rteBuild=M,e.searchBuild=L,e.segContentBuild=te,e.segControlBuild=ee,e.selectBuild=dt,e.sliderBuild=Ct,e.spinnerBuild=R,e.switchBuild=mt,e.tabBarBuild=mi,e.tabPaneBuild=oe,e.tableActionBuild=Ci,e.tableBuild=Mi,e.tableColumnBuild=Si,e.tableColumnGroupBuild=Ti,e.tableRowActionBuild=xi,e.tableRowBuild=_i,e.tabsBuild=se,e.textAreaBuild=vt,e.textBuild=ut,e.tileBuild=re,e.timeBuild=yt,e.topNavBuild=gi,e.treeBuild=F,e.videoBuild=Li,e.wizardActionBuild=he,e.wizardBuild=ce,e.wizardStepBuild=me,Object.keys(t).forEach(function(i){"default"===i||Object.prototype.hasOwnProperty.call(e,i)||Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[i]}})})}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@wm/core"),require("@wm/components/base"),require("lodash-es")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@wm/core","@wm/components/base","lodash-es"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.input=e.wm.components.input||{},e.wm.components.input.baseForm={}),e.ng.core,e.wm.core,e.wm.components.base,e._)}(this,function(exports,i0,core,base,lodashEs){"use strict";function _interopNamespaceDefault(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var i0__namespace=_interopNamespaceDefault(i0);class BaseFormComponent extends base.StylableComponent{constructor(e,t,i,n){super(e,t,i,n),this.inj=e,this.binddatavalue=this.$element.attr("datavalue.bind")}set datavalue(e){this.dataval=e}get datavalue(){return this.dataval}updateBoundVariable(value){let binddatavalue=this.binddatavalue;this.datavaluesource&&this.datavaluesource.execute(core.DataSource.Operation.IS_API_AWARE)||this.datavaluesource&&!this.datavaluesource.twoWayBinding||!binddatavalue||binddatavalue.startsWith("Widgets.")||binddatavalue.startsWith("itemRef.currentItemWidgets")||(binddatavalue=binddatavalue.replace(/\[\$i\]/g,"[0]"),binddatavalue=binddatavalue.replace(/\[(.*?)\]/g,(_match,key)=>{try{const value=eval(`this.viewParent.${key}`);return"string"==typeof value||"number"==typeof value?`[${value}]`:"[0]"}catch{return"[0]"}}),lodashEs.has(this.context,binddatavalue.split(".")[0])&&lodashEs.has(this.context,binddatavalue)?lodashEs.set(this.context,binddatavalue,value):lodashEs.has(this.viewParent,binddatavalue)&&this.viewParent.containerWidget?._isCustom||lodashEs.has(this.viewParent,binddatavalue)&&"Page"===this.datavaluesource?.owner?lodashEs.set(this.viewParent,binddatavalue,value):lodashEs.has(this.viewParent?.App,binddatavalue)&&"App"===this.datavaluesource?.owner&&lodashEs.set(this.viewParent.App,binddatavalue,value))}invokeOnChange(e,t){t&&this.datavalue!==this.prevDatavalue&&(this.updateBoundVariable(e),this.invokeEventCallback("change",{$event:t,newVal:e,oldVal:this.prevDatavalue})),this.prevDatavalue=e}updatePrevDatavalue(e){this.prevDatavalue=e}getPrevDataValue(){return this.prevDatavalue}ngAfterViewInit(){super.ngAfterViewInit(),$(this.nativeElement).parents().closest("[wmList]").length&&(this.boundKeydownHandler=function(e){37!==e.keyCode&&38!==e.keyCode&&39!==e.keyCode&&40!==e.keyCode||e.stopPropagation()},this.$element.keydown(this.boundKeydownHandler))}ngOnDestroy(){this.boundKeydownHandler&&(this.$element.off("keydown",this.boundKeydownHandler),this.boundKeydownHandler=null),this.prevDatavalue=null,this.datavaluesource=null,this.binddatavalue=null,super.ngOnDestroy()}static{this.\u0275fac=i0__namespace.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:i0__namespace,type:BaseFormComponent,deps:[{token:i0__namespace.Injector},{token:base.WidgetConfig},{token:"EXPLICIT_CONTEXT",optional:!0},{token:Promise}],target:i0__namespace.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=i0__namespace.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:i0__namespace,type:BaseFormComponent})}}i0__namespace.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:i0__namespace,type:BaseFormComponent,decorators:[{type:i0.Injectable}],ctorParameters:()=>[{type:i0__namespace.Injector},{type:void 0,decorators:[{type:i0.Inject,args:[base.WidgetConfig]}]},{type:void 0,decorators:[{type:i0.Inject,args:["EXPLICIT_CONTEXT"]},{type:i0.Optional}]},{type:Promise}]}),exports.BaseFormComponent=BaseFormComponent}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common"),require("@angular/core"),require("@wm/components/base")):"function"==typeof define&&define.amd?define(["exports","@angular/common","@angular/core","@wm/components/base"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.input=e.wm.components.input||{},e.wm.components.input.button={}),e.ng.common,e.ng.core,e.wm.components.base)}(this,function(e,t,i,n){"use strict";function a(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var s=a(t),o=a(i);const r={widgetType:"wm-button",hostClass:"btn app-button",displayType:n.DISPLAY_TYPE.INLINE_BLOCK};class l extends n.StylableComponent{static{this.initializeProps=void n.register("wm-button",new Map([["animation",n.PROP_STRING],["badgevalue",n.PROP_STRING],["caption",n.PROP_STRING],["class",n.PROP_STRING],["conditionalclass",n.PROP_ANY],["conditionalstyle",n.PROP_ANY],["disabled",n.PROP_BOOLEAN],["hint",n.PROP_STRING],["arialabel",n.PROP_STRING],["iconclass",n.PROP_STRING],["iconheight",n.PROP_STRING],["iconmargin",n.PROP_STRING],["iconposition",n.PROP_STRING],["iconurl",n.PROP_STRING],["iconwidth",n.PROP_STRING],["name",n.PROP_STRING],["shortcutkey",n.PROP_STRING],["show",{value:!0,...n.PROP_BOOLEAN}],["tabindex",{value:0,...n.PROP_NUMBER}],["type",n.PROP_STRING]]))}constructor(e,t){super(e,r,t),n.styler(this.nativeElement,this)}static{this.\u0275fac=o.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:o,type:l,deps:[{token:o.Injector},{token:"EXPLICIT_CONTEXT",optional:!0}],target:o.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=o.\u0275\u0275ngDeclareComponent({minVersion:"17.0.0",version:"20.3.19",type:l,isStandalone:!0,selector:"button[wmButton]",host:{properties:{type:"this.type",tabIndex:"this.tabindex",disabled:"this.disabled","attr.accesskey":"this.shortcutkey","attr.icon-position":"this.iconposition"}},providers:[n.provideAsWidgetRef(l)],exportAs:["wmButton"],usesInheritance:!0,ngImport:o,template:'@if (iconurl) {\n <img data-identifier="img" alt="button image" class="button-image-icon" [src]="iconurl | image" [ngStyle]="{width:iconwidth, height:iconheight, margin:iconmargin}"/>\n}\n@if (iconclass) {\n <i class="app-icon {{iconclass}}" aria-hidden="true" [ngStyle]="{width:iconwidth, height:iconheight, margin:iconmargin, fontSize:iconwidth}"></i>\n}\n@if (iconclass) {\n <span class="sr-only">{{caption}} {{appLocale.LABEL_ICON}}</span>\n}\n<span class="btn-caption" [innerHTML]="caption"></span>\n<ng-content select=".caret"></ng-content>\n@if (badgevalue) {\n <span class="badge pull-right" [textContent]="badgevalue"></span>\n}\n',dependencies:[{kind:"ngmodule",type:t.CommonModule},{kind:"directive",type:s.NgStyle,selector:"[ngStyle]",inputs:["ngStyle"]},{kind:"directive",type:n.TextContentDirective,selector:"[textContent]",inputs:["textContent"]},{kind:"pipe",type:n.ImagePipe,name:"image"}]})}}o.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:o,type:l,decorators:[{type:i.Component,args:[{standalone:!0,imports:[t.CommonModule,n.TextContentDirective,n.ImagePipe],selector:"button[wmButton]",providers:[n.provideAsWidgetRef(l)],exportAs:"wmButton",template:'@if (iconurl) {\n <img data-identifier="img" alt="button image" class="button-image-icon" [src]="iconurl | image" [ngStyle]="{width:iconwidth, height:iconheight, margin:iconmargin}"/>\n}\n@if (iconclass) {\n <i class="app-icon {{iconclass}}" aria-hidden="true" [ngStyle]="{width:iconwidth, height:iconheight, margin:iconmargin, fontSize:iconwidth}"></i>\n}\n@if (iconclass) {\n <span class="sr-only">{{caption}} {{appLocale.LABEL_ICON}}</span>\n}\n<span class="btn-caption" [innerHTML]="caption"></span>\n<ng-content select=".caret"></ng-content>\n@if (badgevalue) {\n <span class="badge pull-right" [textContent]="badgevalue"></span>\n}\n'}]}],ctorParameters:()=>[{type:o.Injector},{type:void 0,decorators:[{type:i.Inject,args:["EXPLICIT_CONTEXT"]},{type:i.Optional}]}],propDecorators:{type:[{type:i.HostBinding,args:["type"]}],tabindex:[{type:i.HostBinding,args:["tabIndex"]}],disabled:[{type:i.HostBinding,args:["disabled"]}],shortcutkey:[{type:i.HostBinding,args:["attr.accesskey"]}],iconposition:[{type:i.HostBinding,args:["attr.icon-position"]}]}}),e.ButtonComponent=l}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/forms"),require("@angular/core"),require("@wm/components/input/base-form")):"function"==typeof define&&define.amd?define(["exports","@angular/forms","@angular/core","@wm/components/input/base-form"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.input=e.wm.components.input||{},e.wm.components.input.baseFormCustom={}),e.ng.forms,e.ng.core,e.wm.components.input.baseForm)}(this,function(e,t,i,n){"use strict";var a,s,o=(a=i,s=Object.create(null),a&&Object.keys(a).forEach(function(e){if("default"!==e){var t=Object.getOwnPropertyDescriptor(a,e);Object.defineProperty(s,e,t.get?t:{enumerable:!0,get:function(){return a[e]}})}}),s.default=a,Object.freeze(s));function r(e){return t=>e?function(e){switch(typeof e){case"object":return!(!e||!e.length&&!Object.keys(e).length);case"number":return!!e||0===e;default:return!(null==e||""===e)}}(t.value)?null:{required:!0}:null}class l extends n.BaseFormComponent{constructor(){super(...arguments),this._onChange=()=>{},this._onTouched=()=>{}}ngOnInit(){super.ngOnInit(),this._formControl=this.inj.get(t.FormControlName,null)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}writeValue(e){if(!this.isDestroyed){if(this._formControl){if(this._formControl.valueAccessor.widgetSubType.startsWith("wm-custom-"))return;this.datavalue=e,this.onPropertyChange("datavalue",e),this.updatePrevDatavalue(e)}e!==this.datavalue&&this._onChange(this.datavalue)}}get formControl(){return this._formControl}invokeOnChange(e,t,i){this._onChange&&this._onChange(e),t?super.invokeOnChange(e,t):i&&this.updatePrevDatavalue(e)}invokeOnTouched(e){this._onTouched&&this._onTouched(),e&&this.invokeEventCallback("blur",{$event:e})}invokeOnFocus(e){this.invokeEventCallback("focus",{$event:e})}validate(e){return this.show?r(this.required)(e):null}ngOnDestroy(){this._formControl=null,this._onChange=null,this._onTouched=null,super.ngOnDestroy()}static{this.\u0275fac=o.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:o,type:l,deps:null,target:o.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=o.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:o,type:l})}}o.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:o,type:l,decorators:[{type:i.Injectable}]}),e.BaseFormCustomComponent=l}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("rxjs"),require("@wm/core"),require("@wm/components/base"),require("@wm/components/input/base-form-custom"),require("lodash-es")):"function"==typeof define&&define.amd?define(["exports","@angular/core","rxjs","@wm/core","@wm/components/base","@wm/components/input/base-form-custom","lodash-es"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.input=e.wm.components.input||{},e.wm.components.input.datasetawareform={}),e.ng.core,e.rxjs,e.wm.core,e.wm.components.base,e.wm.components.input.baseFormCustom,e._)}(this,function(e,t,i,n,a,s,o){"use strict";var r,l,c=(r=t,l=Object.create(null),r&&Object.keys(r).forEach(function(e){if("default"!==e){var t=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(l,e,t.get?t:{enumerable:!0,get:function(){return r[e]}})}}),l.default=r,Object.freeze(l));class d extends s.BaseFormCustomComponent{get modelByKey(){return this._modelByKey}set modelByKey(e){this.selectByKey(e),this.invokeOnChange(this._modelByValue)}get datavalue(){return this._modelByValue}set datavalue(e){this.multiple&&(e=a.extractDataAsArray(e)),this._modelByValue=e,this.selectByValue(e),this.datavalue$.next(e),this.invokeOnChange(e,void 0,!0)}constructor(e,t,s,r,l){super(e,t,s,l),this.groupby=r,this.datasetItems=[],this.acceptsArray=!1,this.dataset$=new i.Subject,this.datavalue$=new i.Subject,this._debouncedInitDatasetItems=null,this.allowempty=!0,this._debounceDatavalueUpdation=o.debounce(e=>{!n.isDefined(this._modelByKey)||o.isArray(this._modelByKey)&&!this._modelByKey.length?(this.toBeProcessedDatavalue=e,this._modelByValue=""):n.isDefined(this.toBeProcessedDatavalue)&&(n.isDefined(this._modelByValue)||(this._modelByValue=!this.multiple&&o.isArray(this.toBeProcessedDatavalue)?this.toBeProcessedDatavalue[0]:this.toBeProcessedDatavalue),this.toBeProcessedDatavalue=void 0),this.initDisplayValues()},150),this.datePipe=this.inj.get(a.ToDatePipe),this.appDefaults=this.inj.get(n.AppDefaults),this.binddisplayexpression=this.nativeElement.getAttribute("displayexpression.bind"),this.binddisplayimagesrc=this.nativeElement.getAttribute("displayimagesrc.bind"),this.binddisplaylabel=this.nativeElement.getAttribute("displaylabel.bind"),this._debouncedInitDatasetItems=n.debounce(()=>{this.initDatasetItems(),n.$appDigest()},150),this.handleHeaderClick=n.noop,this.cancelLocaleChangeSubscription=this.getAppInstance().subscribe("locale-changed",()=>{this._debouncedInitDatasetItems&&this._debouncedInitDatasetItems()})}selectByKey(e){if(this.resetDatasetItems(),this.datasetItems.length){if(this.multiple&&!o.isArray(e)&&(e=[e]),this._modelByKey=e,this.multiple)this._modelByValue=[],e.forEach(e=>{const t=o.find(this.datasetItems,t=>o.toString(t.key)===o.toString(e));t&&(t.selected=!0,this._modelByValue=[...this._modelByValue,t.value])});else{this._modelByValue="";const t=o.find(this.datasetItems,t=>o.toString(t.key)===o.toString(e));t&&(t.selected=!0,this._modelByValue=t.value)}this.initDisplayValues()}}selectByValue(e){if(this.resetDatasetItems(),(!n.isDefined(e)||""===e||o.isNull(e)||e instanceof Array&&!e.length)&&(this._modelByKey=void 0,!this.allowempty||!n.isDefined(e)))return;if(this.acceptsArray&&!o.isArray(e)&&(e=this.allowempty?[e]:a.extractDataAsArray(e)),!this.datasetItems.length&&n.isDefined(e))return void(this.toBeProcessedDatavalue=e);const t=this.datafield===a.ALLFIELDS?"dataObject":"key";if(o.isArray(e))this._modelByKey=[],e.forEach(e=>{const i=o.find(this.datasetItems,i=>"dataObject"===t&&this.compareby&&this.compareby.length?n.isEqualWithFields(i[t],e,this.compareby):o.isObject(i.value)?o.isEqual(i.value,e):o.toString(i.value).toLowerCase()===o.toString(e).toLowerCase());i&&(i.selected=!0,this._modelByKey.push(i.key))});else{this._modelByKey=void 0;const i=o.find(this.datasetItems,i=>"dataObject"===t&&this.compareby&&this.compareby.length?n.isEqualWithFields(i[t],e,this.compareby):o.isObject(i.value)?o.isEqual(i.value,e):o.toString(i.value).toLowerCase()===o.toString(e).toLowerCase());i&&(i.selected=!0,this._modelByKey=i.key)}this._debounceDatavalueUpdation(e)}initDisplayValues(){const e=[];this.datasetItems.forEach(t=>{t.selected&&e.push(t.label)}),this.displayValue=this.multiple?e:e[0]||"",this.viewParent.containerWidget&&this.viewParent.containerWidget._isCustom&&(this.viewParent.containerWidget.displayValue=this.displayValue.length?this.displayValue:"")}initDatasetItems(){if(!this.dataset||o.isEmpty(this.dataset))return this.datasetItems=[],void this.dataset$.next(this.datasetItems);const e=a.getOrderedDataset(a.convertDataToObject(this.dataset),this.orderby);if(this.usekeys)this.datasetItems=a.transformDataWithKeys(e);else{const t=a.transformFormData(this.viewParent,e,this.datafield,{displayField:this.displayfield||this.displaylabel,displayExpr:this.displayexpression,bindDisplayExpr:this.binddisplayexpression||this.binddisplaylabel,bindDisplayImgSrc:this.binddisplayimagesrc,displayImgSrc:this.displayimagesrc});this.datasetItems=[...a.getUniqObjsByDataField(t,this.datafield,this.displayfield||this.displaylabel,n.toBoolean(this.allowempty))]}this.postDatasetItemsInit()}postDatasetItemsInit(){if(this.datasetItems.length&&!this._defaultQueryInvoked){const e=n.isDefined(this.toBeProcessedDatavalue)?this.toBeProcessedDatavalue:this.datavalue;this.selectByValue(e)}this.dataset$.next(this.datasetItems)}resetDatasetItems(){this.datasetItems.forEach(e=>e.selected=!1)}setTemplate(e){this.content=e,this.viewParent&&this.viewParent.prefabName&&(this.prefabName=this.viewParent.prefabName)}getGroupedData(){return this.datasetItems.length?a.groupData(this,a.convertDataToObject(this.datasetItems),this.groupby,this.match,this.orderby,this.dateformat,this.datePipe,"dataObject",this.appDefaults):[]}datasetSubscription(){const e=this.dataset$.subscribe(()=>{this.groupedData=this.getGroupedData()});this.registerDestroyListener(()=>e.unsubscribe())}setGroupData(){this.datasetSubscription(),this.groupedData=this.getGroupedData()}onPropertyChange(e,t,i){switch(super.onPropertyChange(e,t,i),e){case"dataset":case"datafield":case"displayfield":case"displaylabel":case"displayexpression":case"orderby":case"usekeys":this._debouncedInitDatasetItems&&this._debouncedInitDatasetItems();break;case"required":case"datavalue":this._onChange(this.datavalue);break;case"groupby":case"match":"wm-search"!==this.widgetType&&"wm-chips"!==this.widgetType&&this.setGroupData()}}ngOnInit(){super.ngOnInit(),this.groupby&&"wm-search"!==this.widgetType&&"wm-chips"!==this.widgetType&&this.setGroupData(),this.groupby&&this.collapsible&&(this.handleHeaderClick=a.handleHeaderClick,this.toggleAllHeaders=a.toggleAllHeaders.bind(void 0,this))}ngOnDestroy(){this.cancelLocaleChangeSubscription&&this.cancelLocaleChangeSubscription(),this.dataset$&&this.dataset$.complete(),this.datavalue$&&this.datavalue$.complete(),this.datasetItems=[],this.groupedData&&(this.groupedData=[]),this._modelByKey=null,this._modelByValue=null,this.toBeProcessedDatavalue=null,super.ngOnDestroy()}static{this.\u0275fac=c.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:c,type:d,deps:[{token:c.Injector},{token:a.WidgetConfig},{token:"EXPLICIT_CONTEXT",optional:!0},{token:"groupby",attribute:!0},{token:Promise}],target:c.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=c.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:c,type:d})}}c.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:c,type:d,decorators:[{type:t.Injectable}],ctorParameters:()=>[{type:c.Injector},{type:void 0,decorators:[{type:t.Inject,args:[a.WidgetConfig]}]},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]},{type:void 0,decorators:[{type:t.Attribute,args:["groupby"]}]},{type:Promise}]}),e.DatasetAwareFormComponent=d}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@wm/core"),require("@wm/components/base"),require("@wm/components/input/base-form-custom"),require("lodash-es"),require("tslib"),require("@angular/common"),require("@angular/forms"),require("angular-imask")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@wm/core","@wm/components/base","@wm/components/input/base-form-custom","lodash-es","tslib","@angular/common","@angular/forms","angular-imask"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.input=e.wm.components.input||{},e.wm.components.input.text={}),e.ng.core,e.wm.core,e.wm.components.base,e.wm.components.input.baseFormCustom,e._,e.tslib,e.ng.common,e.ng.forms,e.angularIMask)}(this,function(e,t,i,n,a,s,o,r,l,c){"use strict";function d(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var p=d(t),m=d(r),h=d(l),u=d(c);class g extends a.BaseFormCustomComponent{onPropertyChange(e,t,n){"tabindex"!==e&&("required"===e&&this._onChange(this.datavalue),"updateon"===e&&(this.ngModelOptions.updateOn="default"===t?"change":"blur"),"class"===e?this.inputEl.nativeElement&&i.switchClass(this.inputEl.nativeElement,t,n):"datavalue"===e?(this.updatePrevDatavalue(t),this._onChange(this.datavalue)):super.onPropertyChange(e,t,n))}handleChange(e){this.autotrim&&this.datavalue&&s.isString(this.datavalue)&&(this.datavalue=this.datavalue.trim()),this.invokeOnChange(this.datavalue,{type:"change"},this.ngModel.valid)}handleEvent(e,t,i,n){"change"!==t&&"blur"!==t&&super.handleEvent(this.inputEl.nativeElement,t,i,n)}handleBlur(e){this.invokeOnTouched(e)}flushViewChanges(e){const t=s.get(this.imask,"maskRef.unmaskedValue");e=t||e,this.ngModel.update.next(e),i.$appDigest()}ngAfterViewInit(){super.ngAfterViewInit(),this.class&&i.addClass(this.inputEl.nativeElement,this.class),n.styler(this.inputEl.nativeElement,this)}constructor(e,t,i){super(e,t,i),this.ngModelOptions={updateOn:"",standalone:!0};let n=this.nativeElement.getAttribute("updateon")||"blur";n="default"===n?"change":n,this.ngModelOptions.updateOn=n}static{this.\u0275fac=p.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:p,type:g,deps:[{token:p.Injector},{token:n.WidgetConfig},{token:"EXPLICIT_CONTEXT",optional:!0}],target:p.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=p.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:p,type:g})}}p.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:p,type:g,decorators:[{type:t.Injectable}],ctorParameters:()=>[{type:p.Injector},{type:void 0,decorators:[{type:t.Inject,args:[n.WidgetConfig]}]},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}]}),e.NumberLocale=class extends g{constructor(e,t,i,n,a){super(e,t,a),this.i18nService=i,this.trailingZeroDecimalPipe=n,this.isDefaultQuery=!0,this.decimalValue="",this.invalidPattern=!1,this.selectedLocale=i.getSelectedLocale(),this.DECIMAL=r.getLocaleNumberSymbol(this.localefilter||this.selectedLocale,r.NumberSymbol.Decimal),this.GROUP=r.getLocaleNumberSymbol(this.localefilter||this.selectedLocale,r.NumberSymbol.Group),this.numberfilter="1.0-16",this.resetValidations()}set datavalue(e){if(this.lastValIsDecimal=!1,s.includes([null,void 0,""],e)){const t=this.inputEl.nativeElement,i=this.prevDatavalue;return this.displayValue=t.value=this.proxyModel=null,this.resetValidations(),void(!i&&0!=i&&null!=i||this.isDefaultQuery||(this.handleChange(e),this._onChange()))}if(this.isDefaultQuery){const t=s.isString(e)&&s.includes(e,this.DECIMAL),i=t?e.split(this.DECIMAL):s.isString(e)&&e.split(".");let a=this.getAttr("decimalplaces");const o=""!==a&&void 0!==a?Number(a):NaN;this.inputmode!==n.INPUTMODE.NATURAL||isNaN(o)?(this.decimalValue=i[1]||"",e=t?e:this.transformNumber(e)):(0===o&&(this.decimalValue="",e=t?i[0]:this.transformNumber(i[0])),o>0&&(this.decimalValue=i[1]&&i[1].substring(0,o)||"",e=t?this.decimalValue.length?`${i[0]}${this.DECIMAL}${this.decimalValue}`:i[0]:Number.parseFloat(String(e)).toFixed(o)))}const t=e.toString();let i;i=/\d/.test(t)?this.parseNumber(t):NaN,isNaN(i)&&t[t.length-1]===this.DECIMAL&&"change"===this.ngModelOptions.updateOn&&this.$element.find("input:focus").length&&(this.lastValIsDecimal=!0),!this.lastValIsDecimal&&this.isValid(i)?(this.proxyModel=i,this.updateDisplayText(),this.isDefaultQuery||this.handleChange(i)):(this.displayValue=e.toString(),this.proxyModel=null,this.handleChange(null))}get datavalue(){return this.proxyModel}resetValidations(){this.isInvalidNumber=!1,this.numberNotInRange=!1}isValid(e){let t=!1;return this.inputmode===n.INPUTMODE.NATURAL&&!isNaN(this.decimalplaces)&&this.decimalplaces>=0?t=this.countDecimals(e)>this.decimalplaces:!Number.isInteger(this.step)&&this.countDecimals(e)>this.countDecimals(this.step)&&(t=!0),isNaN(e)||!isFinite(e)||t?(this.isInvalidNumber=!0,!1):e!==this.getValueInRange(e)?(this.numberNotInRange=!0,!0):(this.resetValidations(),!0)}getValueInRange(e){return!isNaN(this.minvalue)&&e<this.minvalue?(this.validateType="minvalue",this.minvalue):!isNaN(this.maxvalue)&&e>this.maxvalue?(this.validateType="maxvalue",this.maxvalue):e}transformNumber(e,t){const i=t||this.numberfilter;return this.trailingZeroDecimalPipe.transform(e,this.selectedLocale,i,this.localefilter,this.trailingzero,this.decimalValue,!!t,this.i18nService?.getwidgetLocale())}resetCursorPosition(e){const t=this.inputEl.nativeElement;let i=t.value.length-e;i=i<0?0:i,t.setSelectionRange(i,i)}parseNumber(e){const t=e.split(this.inputmode===n.INPUTMODE.FINANCIAL?e.indexOf(this.DECIMAL)>-1?this.DECIMAL:".":this.DECIMAL);if(!t.length)return null;if(t.length>2)return NaN;if(""===t[1])return NaN;const i=Number(t[0].split(this.GROUP).join("")),a=Number(`0.${t[1]||0}`);if(Number.isNaN(i)||Number.isNaN(a))return NaN;const s=t.length>1?parseFloat((i+a).toFixed(t[1].length)):i+a;return 0===i?Object.is(0,i)?s:i-a:i>0?s:i-a}updateDisplayText(){const e=this.inputEl.nativeElement,t=e.selectionStart,i=e.value;if(!this.isDefaultQuery){const e=i.split(this.DECIMAL);this.decimalValue=e[1]||""}const a=this.stepLength();if(this.inputmode===n.INPUTMODE.FINANCIAL&&a?(this.displayValue=e.value=this.transformNumber(this.proxyModel,`1.${a}-${a}`),this.decimalValue=this.decimalValue.replace(/\D/g,"")):this.displayValue=e.value=this.transformNumber(this.proxyModel),this.trailingzero){const e=new RegExp(this.regexPattern);this.invalidPattern=!e.test(this.displayValue)}"default"!==this.updateon||this.isDefaultQuery||this.resetCursorPosition(i.length-t)}stepLength(){if("INPUTMODE.NATURAL"===this.inputmode&&!isNaN(this.decimalplaces)&&this.decimalplaces>=0)return this.decimalplaces;const e=this.step.toString().split(".");return 1===e.length?void 0:e[1].length}isNaturalCurrency(){return this.inputmode===n.INPUTMODE.NATURAL&&"wm-currency"===this.widgetType&&!!this.trailingzero}onInputChange(e){const t=this.stepLength(),a=this.getPrevDataValue();if(!i.isDefined(e)||""===e&&!this.datavalue&&0!=this.datavalue)return;if("wm-number"===this.widgetType?this.inputmode==n.INPUTMODE.FINANCIAL?null==a&&null==this.datavalue||a==this.datavalue||this.handleChange(e):null==a&&null==this.datavalue||this.handleChange(e):this.handleChange(e),!t||this.inputmode!==n.INPUTMODE.FINANCIAL)return;let s;if(this.isDefaultQuery)s=parseFloat(e);else{s=parseInt(e.toString().replace(/\D/g,""))*this.step}isNaN(s)?"blur"!==this.ngModelOptions.updateOn&&(this.datavalue=void 0,this.handleChange(null)):"change"===this.ngModelOptions.updateOn?(this.datavalue=parseFloat(s.toFixed(t)),this.handleChange(this.datavalue)):this.displayValue=s.toFixed(t)}checkForTrailingZeros(e){const t=this.stepLength(),i=!this.trailingzero&&this.inputmode===n.INPUTMODE.FINANCIAL;if(this.lastValIsDecimal&&this.onModelChange(this.displayValue),(i||this.isNaturalCurrency())&&t&&this.datavalue){let n;(i&&"focus"===e.type||this.isNaturalCurrency()&&"blur"===e.type)&&(n=`1.${t}-${t}`),this.displayValue=this.transformNumber(this.datavalue,n)}}countDecimals(e){const t=Number(e);if(0===t)return 0;if(Number.isNaN(t))return 0;const i=t.toExponential().match(/^-?\d*\.?(\d+)?e([+-]\d+)$/);if(i){const e=i[1]?i[1].length:0,t=parseInt(i[2]);return Math.max(0,e-t)}const n=t.toString(),a=s.includes(n,this.DECIMAL)?n.split(this.DECIMAL):n.split(".");return a[1]?a[1].length:0}onArrowPress(e,t){if(e.preventDefault(),this.readonly||0===this.step)return;const i=e.target.value.replace(/,/g,"");let n,a;if(n=i&&!isNaN(parseFloat(i))?parseFloat(i):this.proxyModel,this.numberNotInRange){const e=this.parseNumber(this.inputEl.nativeElement.value);isNaN(e)||(a=this.getValueInRange(e),n=e,this.resetValidations())}else s.isUndefined(n)||s.isNull(n)?(n=a=this.getValueInRange(this.minvalue||0),this.resetValidations()):a=this.getValueInRange(n+("UP"===t?this.step:-this.step));if("UP"===t&&n<=a||"DOWN"===t&&n>=a){const e=Math.max(this.countDecimals(n),this.countDecimals(this.step));this.proxyModel=s.round(a,e),this.updateDisplayText(),this.handleChange(this.proxyModel)}}validate(e){return this.isInvalidNumber?(this.validateType="",{invalidNumber:{valid:!1}}):this.numberNotInRange?{numberNotInRange:{valid:!1}}:this.invalidPattern?{pattern:{valid:!1}}:(this.validateType="",this.show&&this.required?e.value||0===e.value?null:{required:!0}:null)}validateInputEntry(e){if(this.isDefaultQuery=!1,e.ctrlKey||s.includes(["Backspace","ArrowRight","ArrowLeft","Tab","Enter","Delete"],e.key))return;const t=new RegExp(`^[\\d\\s-,.e+${this.GROUP}${this.DECIMAL}]$`,"i"),i=e.target?.value||"";if(this.inputmode,n.INPUTMODE.FINANCIAL,i){if(parseInt(i.toString().replace(/\D/g,"")).toString().length>15){const e=window.getSelection();return!(!e||!e.toString()||e.focusNode!==this.nativeElement)}}if(!t.test(e.key))return!1;if(this.inputmode===n.INPUTMODE.NATURAL&&!isNaN(this.decimalplaces)){if(0===this.decimalplaces&&this.DECIMAL===e.key)return!1;const t=s.includes(i,this.DECIMAL)?i.split(this.DECIMAL):i.split("."),n=e.target.selectionStart>t[0].length;if(this.decimalplaces>0&&this.countDecimals(i)>=this.decimalplaces&&n)return!1}return(!s.includes(i,",")||","!==i[i.length-1]||","!==e.key)&&((!s.includes(i,this.DECIMAL)||e.key!==this.DECIMAL)&&((!s.intersection(s.toArray(i),["e","E"]).length||!s.includes("eE",e.key))&&((!s.includes(i,"+")&&!s.includes(i,"-")||"+"!==e.key&&"-"!==e.key)&&(!(!i&&"Space"===e.code)&&void 0))))}onBackspace(e){this.isDefaultQuery=!1}onDelete(e){this.isDefaultQuery=!1}onEnter(e){this.datavalue=e.target.value}onModelChange(e){(this.inputmode===n.INPUTMODE.NATURAL||this.inputmode===n.INPUTMODE.FINANCIAL&&"blur"===this.ngModelOptions.updateOn)&&(this.datavalue=e)}onPropertyChange(e,t,i){"minvalue"===e||"maxvalue"===e?this.isValid(t):"datavalue"!==e||i?"regexp"===e?this.regexPattern=t:super.onPropertyChange(e,t,i):this.isNaturalCurrency()?this.checkForTrailingZeros({type:"blur"}):this.onInputChange(t)}onPaste(e){const t=e.clipboardData.getData("text");for(const i of t){const t=new KeyboardEvent("keypress",{key:i});if(!1===this.validateInputEntry(t))return void e.preventDefault()}}},e.NumberLocale=o.__decorate([o.__param(4,t.Inject("EXPLICIT_CONTEXT")),o.__param(4,t.Optional()),o.__metadata("design:paramtypes",[t.Injector,Object,i.AbstractI18nService,n.TrailingZeroDecimalPipe,Object])],e.NumberLocale);const v=new Map([["autocomplete",{value:!0,...n.PROP_BOOLEAN}],["autotrim",{value:!0,...n.PROP_BOOLEAN}],["autofocus",n.PROP_BOOLEAN],["class",n.PROP_STRING],["datasource",n.PROP_ANY],["datavalue",n.PROP_STRING],["disabled",n.PROP_BOOLEAN],["hint",n.PROP_STRING],["arialabel",n.PROP_STRING],["maxvalue",n.PROP_NUMBER],["minvalue",n.PROP_NUMBER],["name",n.PROP_STRING],["placeholder",{value:"Enter text",...n.PROP_STRING}],["readonly",n.PROP_BOOLEAN],["required",n.PROP_BOOLEAN],["shortcutkey",n.PROP_STRING],["show",{value:!0,...n.PROP_BOOLEAN}],["step",n.PROP_NUMBER],["tabindex",{value:0,...n.PROP_NUMBER}],["type",n.PROP_STRING],["updateon",n.PROP_STRING],["conditionalclass",n.PROP_ANY],["conditionalstyle",n.PROP_ANY]]),f={widgetType:"wm-input-calendar",hostClass:"app-input-wrapper"};class b extends g{static{this.initializeProps=void n.register("wm-input-calendar",v)}constructor(e,t){super(e,f,t)}ngOnDestroy(){this.inputEl=null,this.ngModel=null,super.ngOnDestroy()}static{this.\u0275fac=p.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:p,type:b,deps:[{token:p.Injector},{token:"EXPLICIT_CONTEXT",optional:!0}],target:p.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=p.\u0275\u0275ngDeclareComponent({minVersion:"14.0.0",version:"20.3.19",type:b,isStandalone:!0,selector:'wm-input[type="date"], wm-input[type="datetime-local"], wm-input[type="month"], wm-input[type="time"], wm-input[type="week"]',providers:[n.provideAs(b,l.NG_VALUE_ACCESSOR,!0),n.provideAs(b,l.NG_VALIDATORS,!0),n.provideAsWidgetRef(b)],viewQueries:[{propertyName:"inputEl",first:!0,predicate:["input"],descendants:!0,static:!0},{propertyName:"ngModel",first:!0,predicate:l.NgModel,descendants:!0}],usesInheritance:!0,ngImport:p,template:'<input class="form-control app-textbox"\n focus-target\n [type]="type"\n [attr.name]="name"\n [(ngModel)]="datavalue"\n [ngModelOptions]="{standalone: true}"\n [readonly]="readonly"\n [required]="required"\n [disabled]="disabled"\n [min]="minvalue"\n [max]="maxvalue"\n [step]="step"\n [attr.tabindex]="tabindex"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n [attr.aria-label]="arialabel || type + \' field\'"\n [autofocus]="autofocus"\n (blur)="handleBlur($event)"\n (ngModelChange)="handleChange($event)"\n [autocomplete]="autocomplete ? \'on\' : \'off\'"\n [ngClass]="conditionalclass"\n [ngStyle]="conditionalstyle"\n #input>\n',dependencies:[{kind:"ngmodule",type:r.CommonModule},{kind:"directive",type:m.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"directive",type:m.NgStyle,selector:"[ngStyle]",inputs:["ngStyle"]},{kind:"ngmodule",type:l.FormsModule},{kind:"directive",type:h.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:h.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:h.RequiredValidator,selector:":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]",inputs:["required"]},{kind:"directive",type:h.NgModel,selector:"[ngModel]:not([formControlName]):not([formControl])",inputs:["name","disabled","ngModel","ngModelOptions"],outputs:["ngModelChange"],exportAs:["ngModel"]}]})}}p.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:p,type:b,decorators:[{type:t.Component,args:[{standalone:!0,imports:[r.CommonModule,l.FormsModule],selector:'wm-input[type="date"], wm-input[type="datetime-local"], wm-input[type="month"], wm-input[type="time"], wm-input[type="week"]',providers:[n.provideAs(b,l.NG_VALUE_ACCESSOR,!0),n.provideAs(b,l.NG_VALIDATORS,!0),n.provideAsWidgetRef(b)],template:'<input class="form-control app-textbox"\n focus-target\n [type]="type"\n [attr.name]="name"\n [(ngModel)]="datavalue"\n [ngModelOptions]="{standalone: true}"\n [readonly]="readonly"\n [required]="required"\n [disabled]="disabled"\n [min]="minvalue"\n [max]="maxvalue"\n [step]="step"\n [attr.tabindex]="tabindex"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n [attr.aria-label]="arialabel || type + \' field\'"\n [autofocus]="autofocus"\n (blur)="handleBlur($event)"\n (ngModelChange)="handleChange($event)"\n [autocomplete]="autocomplete ? \'on\' : \'off\'"\n [ngClass]="conditionalclass"\n [ngStyle]="conditionalstyle"\n #input>\n'}]}],ctorParameters:()=>[{type:p.Injector},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}],propDecorators:{inputEl:[{type:t.ViewChild,args:["input",{static:!0}]}],ngModel:[{type:t.ViewChild,args:[l.NgModel]}]}});const y=new Map([["autocomplete",{value:!0,...n.PROP_BOOLEAN}],["autofocus",n.PROP_BOOLEAN],["autotrim",{value:!0,...n.PROP_BOOLEAN}],["class",n.PROP_STRING],["datavaluesource",n.PROP_ANY],["datavalue",n.PROP_STRING],["disabled",n.PROP_BOOLEAN],["hint",n.PROP_STRING],["arialabel",n.PROP_STRING],["name",n.PROP_STRING],["placeholder",{value:"Enter text",...n.PROP_STRING}],["readonly",n.PROP_BOOLEAN],["required",n.PROP_BOOLEAN],["shortcutkey",n.PROP_STRING],["show",{value:!0,...n.PROP_BOOLEAN}],["tabindex",{value:0,...n.PROP_NUMBER}],["type",{value:"color",...n.PROP_STRING}],["updateon",n.PROP_STRING],["conditionalclass",n.PROP_ANY],["conditionalstyle",n.PROP_ANY]]),w={widgetType:"wm-input-color",hostClass:"app-input-wrapper"};class P extends g{static{this.initializeProps=void n.register("wm-input-color",y)}constructor(e,t){super(e,w,t)}ngOnDestroy(){this.inputEl=null,this.ngModel=null,super.ngOnDestroy()}static{this.\u0275fac=p.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:p,type:P,deps:[{token:p.Injector},{token:"EXPLICIT_CONTEXT",optional:!0}],target:p.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=p.\u0275\u0275ngDeclareComponent({minVersion:"14.0.0",version:"20.3.19",type:P,isStandalone:!0,selector:'wm-input[type="color"]',providers:[n.provideAs(P,l.NG_VALUE_ACCESSOR,!0),n.provideAs(P,l.NG_VALIDATORS,!0),n.provideAsWidgetRef(P)],viewQueries:[{propertyName:"inputEl",first:!0,predicate:["input"],descendants:!0,static:!0},{propertyName:"ngModel",first:!0,predicate:l.NgModel,descendants:!0}],usesInheritance:!0,ngImport:p,template:'<input class="form-control app-textbox"\n focus-target\n [type]="type"\n [attr.name]="name"\n [(ngModel)]="datavalue"\n [ngModelOptions]="{standalone: true}"\n [readonly]="readonly"\n [required]="required"\n [disabled]="disabled"\n [maxlength]="maxchars"\n [attr.tabindex]="tabindex"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n [attr.aria-label]="arialabel"\n [autofocus]="autofocus"\n [ngClass]="conditionalclass"\n [ngStyle]="conditionalstyle"\n (blur)="handleBlur($event)"\n (ngModelChange)="handleChange($event)"\n #input>\n',dependencies:[{kind:"ngmodule",type:r.CommonModule},{kind:"directive",type:m.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"directive",type:m.NgStyle,selector:"[ngStyle]",inputs:["ngStyle"]},{kind:"ngmodule",type:l.FormsModule},{kind:"directive",type:h.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:h.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:h.RequiredValidator,selector:":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]",inputs:["required"]},{kind:"directive",type:h.MaxLengthValidator,selector:"[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]",inputs:["maxlength"]},{kind:"directive",type:h.NgModel,selector:"[ngModel]:not([formControlName]):not([formControl])",inputs:["name","disabled","ngModel","ngModelOptions"],outputs:["ngModelChange"],exportAs:["ngModel"]}]})}}p.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:p,type:P,decorators:[{type:t.Component,args:[{standalone:!0,imports:[r.CommonModule,l.FormsModule],selector:'wm-input[type="color"]',providers:[n.provideAs(P,l.NG_VALUE_ACCESSOR,!0),n.provideAs(P,l.NG_VALIDATORS,!0),n.provideAsWidgetRef(P)],template:'<input class="form-control app-textbox"\n focus-target\n [type]="type"\n [attr.name]="name"\n [(ngModel)]="datavalue"\n [ngModelOptions]="{standalone: true}"\n [readonly]="readonly"\n [required]="required"\n [disabled]="disabled"\n [maxlength]="maxchars"\n [attr.tabindex]="tabindex"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n [attr.aria-label]="arialabel"\n [autofocus]="autofocus"\n [ngClass]="conditionalclass"\n [ngStyle]="conditionalstyle"\n (blur)="handleBlur($event)"\n (ngModelChange)="handleChange($event)"\n #input>\n'}]}],ctorParameters:()=>[{type:p.Injector},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}],propDecorators:{inputEl:[{type:t.ViewChild,args:["input",{static:!0}]}],ngModel:[{type:t.ViewChild,args:[l.NgModel]}]}});const C=new Map([["autocomplete",{value:!0,...n.PROP_BOOLEAN}],["autofocus",n.PROP_BOOLEAN],["autotrim",{value:!0,...n.PROP_BOOLEAN}],["class",n.PROP_STRING],["datavaluesource",n.PROP_ANY],["datavalue",n.PROP_STRING],["disabled",n.PROP_BOOLEAN],["hint",n.PROP_STRING],["arialabel",n.PROP_STRING],["maxchars",n.PROP_NUMBER],["name",n.PROP_STRING],["placeholder",{value:"Enter text",...n.PROP_STRING}],["readonly",n.PROP_BOOLEAN],["regexp",n.PROP_STRING],["required",n.PROP_BOOLEAN],["shortcutkey",n.PROP_STRING],["show",{value:!0,...n.PROP_BOOLEAN}],["tabindex",{value:0,...n.PROP_NUMBER}],["type",{value:"email",...n.PROP_STRING}],["updateon",n.PROP_STRING],["conditionalclass",n.PROP_ANY],["conditionalstyle",n.PROP_ANY]]),T={widgetType:"wm-input-email",hostClass:"app-input-wrapper"};class O extends g{static{this.initializeProps=void n.register("wm-input-email",C)}constructor(e,t){super(e,T,t)}ngOnDestroy(){this.inputEl=null,this.ngModel=null,super.ngOnDestroy()}static{this.\u0275fac=p.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:p,type:O,deps:[{token:p.Injector},{token:"EXPLICIT_CONTEXT",optional:!0}],target:p.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=p.\u0275\u0275ngDeclareComponent({minVersion:"14.0.0",version:"20.3.19",type:O,isStandalone:!0,selector:'wm-input[type="email"]',providers:[n.provideAs(O,l.NG_VALUE_ACCESSOR,!0),n.provideAs(O,l.NG_VALIDATORS,!0),n.provideAsWidgetRef(O)],viewQueries:[{propertyName:"inputEl",first:!0,predicate:["input"],descendants:!0,static:!0},{propertyName:"ngModel",first:!0,predicate:l.NgModel,descendants:!0}],usesInheritance:!0,ngImport:p,template:'<input class="form-control app-textbox"\n focus-target\n [type]="type"\n [attr.name]="name"\n [(ngModel)]="datavalue"\n [ngModelOptions]="ngModelOptions"\n [readonly]="readonly"\n [required]="required"\n [disabled]="disabled"\n [maxlength]="maxchars"\n [pattern]="regexp"\n [attr.tabindex]="tabindex"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n [attr.aria-label]="arialabel"\n [autofocus]="autofocus"\n [ngClass]="conditionalclass"\n [ngStyle]="conditionalstyle"\n (blur)="handleBlur($event)"\n (ngModelChange)="handleChange($event)"\n [autocomplete]="autocomplete ? \'on\' : \'off\'"\n (keyup.enter)="flushViewChanges(input.value)"\n email\n #input>\n',dependencies:[{kind:"ngmodule",type:r.CommonModule},{kind:"directive",type:m.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"directive",type:m.NgStyle,selector:"[ngStyle]",inputs:["ngStyle"]},{kind:"ngmodule",type:l.FormsModule},{kind:"directive",type:h.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:h.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:h.RequiredValidator,selector:":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]",inputs:["required"]},{kind:"directive",type:h.MaxLengthValidator,selector:"[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]",inputs:["maxlength"]},{kind:"directive",type:h.PatternValidator,selector:"[pattern][formControlName],[pattern][formControl],[pattern][ngModel]",inputs:["pattern"]},{kind:"directive",type:h.EmailValidator,selector:"[email][formControlName],[email][formControl],[email][ngModel]",inputs:["email"]},{kind:"directive",type:h.NgModel,selector:"[ngModel]:not([formControlName]):not([formControl])",inputs:["name","disabled","ngModel","ngModelOptions"],outputs:["ngModelChange"],exportAs:["ngModel"]}]})}}p.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:p,type:O,decorators:[{type:t.Component,args:[{standalone:!0,imports:[r.CommonModule,l.FormsModule],selector:'wm-input[type="email"]',providers:[n.provideAs(O,l.NG_VALUE_ACCESSOR,!0),n.provideAs(O,l.NG_VALIDATORS,!0),n.provideAsWidgetRef(O)],template:'<input class="form-control app-textbox"\n focus-target\n [type]="type"\n [attr.name]="name"\n [(ngModel)]="datavalue"\n [ngModelOptions]="ngModelOptions"\n [readonly]="readonly"\n [required]="required"\n [disabled]="disabled"\n [maxlength]="maxchars"\n [pattern]="regexp"\n [attr.tabindex]="tabindex"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n [attr.aria-label]="arialabel"\n [autofocus]="autofocus"\n [ngClass]="conditionalclass"\n [ngStyle]="conditionalstyle"\n (blur)="handleBlur($event)"\n (ngModelChange)="handleChange($event)"\n [autocomplete]="autocomplete ? \'on\' : \'off\'"\n (keyup.enter)="flushViewChanges(input.value)"\n email\n #input>\n'}]}],ctorParameters:()=>[{type:p.Injector},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}],propDecorators:{inputEl:[{type:t.ViewChild,args:["input",{static:!0}]}],ngModel:[{type:t.ViewChild,args:[l.NgModel]}]}});const I=new Map([["autocomplete",{value:!0,...n.PROP_BOOLEAN}],["autofocus",n.PROP_BOOLEAN],["autotrim",{value:!0,...n.PROP_BOOLEAN}],["class",n.PROP_STRING],["datavaluesource",n.PROP_ANY],["datavalue",n.PROP_STRING],["disabled",n.PROP_BOOLEAN],["hint",n.PROP_STRING],["arialabel",n.PROP_STRING],["maxchars",n.PROP_NUMBER],["maxvalue",n.PROP_NUMBER],["minvalue",n.PROP_NUMBER],["name",n.PROP_STRING],["placeholder",{value:"Enter text",...n.PROP_STRING}],["readonly",n.PROP_BOOLEAN],["regexp",n.PROP_STRING],["required",n.PROP_BOOLEAN],["shortcutkey",n.PROP_STRING],["show",{value:!0,...n.PROP_BOOLEAN}],["step",n.PROP_NUMBER],["tabindex",{value:0,...n.PROP_NUMBER}],["type",{value:"number",...n.PROP_STRING}],["updateon",n.PROP_STRING],["conditionalclass",n.PROP_ANY],["conditionalstyle",n.PROP_ANY]]),D=new Map([["autocomplete",{value:!0,...n.PROP_BOOLEAN}],["autofocus",n.PROP_BOOLEAN],["autotrim",{value:!0,...n.PROP_BOOLEAN}],["class",n.PROP_STRING],["datavaluesource",n.PROP_ANY],["datavalue",n.PROP_STRING],["disabled",n.PROP_BOOLEAN],["displayformat",n.PROP_STRING],["hint",n.PROP_STRING],["arialabel",n.PROP_STRING],["maxchars",n.PROP_NUMBER],["name",n.PROP_STRING],["placeholder",{value:"Enter text",...n.PROP_STRING}],["readonly",n.PROP_BOOLEAN],["regexp",n.PROP_STRING],["required",n.PROP_BOOLEAN],["shortcutkey",n.PROP_STRING],["show",{value:!0,...n.PROP_BOOLEAN}],["showdisplayformaton",{value:"always",...n.PROP_ANY}],["tabindex",{value:0,...n.PROP_NUMBER}],["type",{value:"text",...n.PROP_STRING}],["updateon",n.PROP_STRING],["conditionalclass",n.PROP_ANY],["conditionalstyle",n.PROP_ANY],["trailingiconclass",n.PROP_STRING],["leadingiconclass",n.PROP_STRING]]),E={widgetType:"wm-input-text",hostClass:"app-input-wrapper"};class R extends g{static{this.initializeProps=(()=>{n.register("wm-input-text",D),n.registerFormWidget(i.FormWidgetType.PASSWORD,new Map(D));const e=new Map(D),t=t=>{t.forEach((t,i)=>e.set(i,t))};t(v),t(y),t(C),t(I),n.registerFormWidget(i.FormWidgetType.TEXT,new Map(e))})()}constructor(e,t){super(e,E,t),this.lazy=!1}onPropertyChange(e,t,i){switch(e){case"displayformat":this.maskVal=this.displayformat,this.checkForDisplayFormat();break;case"showdisplayformaton":this.lazy="keypress"===t;break;default:super.onPropertyChange(e,t,i)}}get computedClasses(){return{"with-leading-icon":this.leadingiconclass,"with-trailing-icon":this.trailingiconclass,..."string"==typeof this.conditionalclass?{[this.conditionalclass]:!0}:this.conditionalclass||{}}}get mask(){return!(!this.displayformat||!(!this.placeholder||this.placeholder&&this.isFocused))&&{mask:this.maskVal,lazy:this.lazy,definitions:{9:/\d/,A:/[a-zA-Z]/,a:/[a-z]/,"*":/\w/}}}checkForDisplayFormat(e){this.displayformat?(this.isFocused=!!(e&&"focus"===e.type||this.datavalue),!this.isFocused&&this.imask&&this.imask.maskRef?(this.imask.maskRef.updateOptions({lazy:!0}),!this.datavalue&&this.imask.maskRef.value&&(this.imask.maskRef.value=this.datavalue)):setTimeout(()=>{if(this.imask&&this.imask.maskRef&&this.imask.maskRef.value){const e=this.imask.maskRef.value.indexOf("_"),t=e>=0?this.imask.maskRef.value.slice(0,e).length:this.imask.maskRef.value.length;t!==this.imask.maskRef.cursorPos&&this.imask.maskRef.updateCursor(t)}},50)):this.imask&&this.imask.maskRef&&(this.imask.maskRef.updateOptions({lazy:!0}),this.inputEl.nativeElement.value=this.datavalue)}ngOnInit(){super.ngOnInit(),this.isFocused=!!this.datavalue}iconClickEvent(e,t){this.invokeEventCallback(t,{$event:e})}ngOnDestroy(){this.inputEl=null,this.ngModel=null,this.imask=null,super.ngOnDestroy()}static{this.\u0275fac=p.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:p,type:R,deps:[{token:p.Injector},{token:"EXPLICIT_CONTEXT",optional:!0}],target:p.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=p.\u0275\u0275ngDeclareComponent({minVersion:"14.0.0",version:"20.3.19",type:R,isStandalone:!0,selector:'wm-input[type="text"], wm-input:not([type]), wm-input[type="password"], wm-input[type="search"], wm-input[type="tel"], wm-input[type="url"]',providers:[n.provideAs(R,l.NG_VALUE_ACCESSOR,!0),n.provideAs(R,l.NG_VALIDATORS,!0),n.provideAsWidgetRef(R)],viewQueries:[{propertyName:"inputEl",first:!0,predicate:["input"],descendants:!0,static:!0},{propertyName:"ngModel",first:!0,predicate:l.NgModel,descendants:!0},{propertyName:"imask",first:!0,predicate:["input"],descendants:!0,read:c.IMaskDirective}],usesInheritance:!0,ngImport:p,template:'<button class="btn-leading-icon" type="button" name="leadingIcon" *ngIf="leadingiconclass" (click)="iconClickEvent($event, \'leadingiconclick\')">\n <i aria-hidden="true" [ngClass]="leadingiconclass"></i>\n</button>\n<input class="form-control app-textbox"\n focus-target\n [type]="type"\n [attr.name]="name"\n [attr.aria-label]="arialabel"\n [(ngModel)]="datavalue"\n [imask]="mask"\n [unmask]="true"\n [ngModelOptions]="ngModelOptions"\n [readonly]="readonly"\n [required]="required"\n [disabled]="disabled"\n [maxlength]="maxchars"\n [pattern]="regexp"\n [attr.tabindex]="tabindex"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n [autofocus]="autofocus"\n [ngClass]="computedClasses"\n [ngStyle]="conditionalstyle"\n (ngModelChange)="handleChange($event)"\n (blur)="handleBlur($event); checkForDisplayFormat($event)"\n (focus)="checkForDisplayFormat($event)"\n [autocomplete]="autocomplete ? \'on\' : \'off\'"\n (keyup.enter)="flushViewChanges(input.value)"\n #input>\n<button class="btn-trailing-icon" type="button" name="trailingIcon" *ngIf="trailingiconclass" (click)="iconClickEvent($event, \'trailingiconclick\')">\n <i aria-hidden="true" [ngClass]="trailingiconclass"></i>\n</button>\n',dependencies:[{kind:"ngmodule",type:r.CommonModule},{kind:"directive",type:m.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"directive",type:m.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"directive",type:m.NgStyle,selector:"[ngStyle]",inputs:["ngStyle"]},{kind:"ngmodule",type:l.FormsModule},{kind:"directive",type:h.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:h.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:h.RequiredValidator,selector:":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]",inputs:["required"]},{kind:"directive",type:h.MaxLengthValidator,selector:"[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]",inputs:["maxlength"]},{kind:"directive",type:h.PatternValidator,selector:"[pattern][formControlName],[pattern][formControl],[pattern][ngModel]",inputs:["pattern"]},{kind:"directive",type:h.NgModel,selector:"[ngModel]:not([formControlName]):not([formControl])",inputs:["name","disabled","ngModel","ngModelOptions"],outputs:["ngModelChange"],exportAs:["ngModel"]},{kind:"ngmodule",type:c.IMaskModule},{kind:"directive",type:u.IMaskDirective,selector:"[imask]",inputs:["imask","unmask","imaskElement"],outputs:["accept","complete"],exportAs:["imask"]}]})}}p.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:p,type:R,decorators:[{type:t.Component,args:[{standalone:!0,imports:[r.CommonModule,l.FormsModule,c.IMaskModule],selector:'wm-input[type="text"], wm-input:not([type]), wm-input[type="password"], wm-input[type="search"], wm-input[type="tel"], wm-input[type="url"]',providers:[n.provideAs(R,l.NG_VALUE_ACCESSOR,!0),n.provideAs(R,l.NG_VALIDATORS,!0),n.provideAsWidgetRef(R)],template:'<button class="btn-leading-icon" type="button" name="leadingIcon" *ngIf="leadingiconclass" (click)="iconClickEvent($event, \'leadingiconclick\')">\n <i aria-hidden="true" [ngClass]="leadingiconclass"></i>\n</button>\n<input class="form-control app-textbox"\n focus-target\n [type]="type"\n [attr.name]="name"\n [attr.aria-label]="arialabel"\n [(ngModel)]="datavalue"\n [imask]="mask"\n [unmask]="true"\n [ngModelOptions]="ngModelOptions"\n [readonly]="readonly"\n [required]="required"\n [disabled]="disabled"\n [maxlength]="maxchars"\n [pattern]="regexp"\n [attr.tabindex]="tabindex"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n [autofocus]="autofocus"\n [ngClass]="computedClasses"\n [ngStyle]="conditionalstyle"\n (ngModelChange)="handleChange($event)"\n (blur)="handleBlur($event); checkForDisplayFormat($event)"\n (focus)="checkForDisplayFormat($event)"\n [autocomplete]="autocomplete ? \'on\' : \'off\'"\n (keyup.enter)="flushViewChanges(input.value)"\n #input>\n<button class="btn-trailing-icon" type="button" name="trailingIcon" *ngIf="trailingiconclass" (click)="iconClickEvent($event, \'trailingiconclick\')">\n <i aria-hidden="true" [ngClass]="trailingiconclass"></i>\n</button>\n'}]}],ctorParameters:()=>[{type:p.Injector},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}],propDecorators:{inputEl:[{type:t.ViewChild,args:["input",{static:!0}]}],ngModel:[{type:t.ViewChild,args:[l.NgModel]}],imask:[{type:t.ViewChild,args:["input",{read:c.IMaskDirective}]}]}});const S={widgetType:"wm-input-number",hostClass:"app-input-wrapper"};class _ extends g{static{this.initializeProps=void n.register("wm-input-number",I)}constructor(e,t){super(e,S,t)}onArrowPress(e){0===this.step&&e.preventDefault()}validateInputEntry(e){if("e"===e.key&&-1!==e.target.value.indexOf(e.key))return!1}ngOnDestroy(){this.inputEl=null,this.ngModel=null,super.ngOnDestroy()}static{this.\u0275fac=p.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:p,type:_,deps:[{token:p.Injector},{token:"EXPLICIT_CONTEXT",optional:!0}],target:p.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=p.\u0275\u0275ngDeclareComponent({minVersion:"14.0.0",version:"20.3.19",type:_,isStandalone:!0,selector:'wm-input[type="number"]',providers:[n.provideAs(_,l.NG_VALUE_ACCESSOR,!0),n.provideAs(_,l.NG_VALIDATORS,!0),n.provideAsWidgetRef(_)],viewQueries:[{propertyName:"inputEl",first:!0,predicate:["input"],descendants:!0,static:!0},{propertyName:"ngModel",first:!0,predicate:l.NgModel,descendants:!0}],usesInheritance:!0,ngImport:p,template:'<input class="form-control app-textbox"\n [ngClass]="{\'step-hidden\': step === 0}"\n focus-target\n [type]="type"\n [attr.name]="name"\n [(ngModel)]="datavalue"\n [ngModelOptions]="ngModelOptions"\n [readonly]="readonly"\n [required]="required"\n [disabled]="disabled"\n [maxlength]="maxchars"\n [min]="minvalue"\n [max]="maxvalue"\n [step]="step"\n [attr.tabindex]="tabindex"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n [attr.aria-label]="arialabel"\n [autofocus]="autofocus"\n [ngClass]="conditionalclass"\n [ngStyle]="conditionalstyle"\n (blur)="handleBlur($event)"\n (ngModelChange)="handleChange($event)"\n [autocomplete]="autocomplete ? \'on\' : \'off\'"\n (keyup.enter)="flushViewChanges(input.value)"\n (keydown.ArrowUp)="onArrowPress($event)"\n (keydown.ArrowDown)="onArrowPress($event)"\n (keypress)="validateInputEntry($event)"\n #input>\n',dependencies:[{kind:"ngmodule",type:r.CommonModule},{kind:"directive",type:m.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"directive",type:m.NgStyle,selector:"[ngStyle]",inputs:["ngStyle"]},{kind:"ngmodule",type:l.FormsModule},{kind:"directive",type:h.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:h.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:h.RequiredValidator,selector:":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]",inputs:["required"]},{kind:"directive",type:h.MaxLengthValidator,selector:"[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]",inputs:["maxlength"]},{kind:"directive",type:h.NgModel,selector:"[ngModel]:not([formControlName]):not([formControl])",inputs:["name","disabled","ngModel","ngModelOptions"],outputs:["ngModelChange"],exportAs:["ngModel"]}]})}}p.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:p,type:_,decorators:[{type:t.Component,args:[{standalone:!0,imports:[r.CommonModule,l.FormsModule],selector:'wm-input[type="number"]',providers:[n.provideAs(_,l.NG_VALUE_ACCESSOR,!0),n.provideAs(_,l.NG_VALIDATORS,!0),n.provideAsWidgetRef(_)],template:'<input class="form-control app-textbox"\n [ngClass]="{\'step-hidden\': step === 0}"\n focus-target\n [type]="type"\n [attr.name]="name"\n [(ngModel)]="datavalue"\n [ngModelOptions]="ngModelOptions"\n [readonly]="readonly"\n [required]="required"\n [disabled]="disabled"\n [maxlength]="maxchars"\n [min]="minvalue"\n [max]="maxvalue"\n [step]="step"\n [attr.tabindex]="tabindex"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n [attr.aria-label]="arialabel"\n [autofocus]="autofocus"\n [ngClass]="conditionalclass"\n [ngStyle]="conditionalstyle"\n (blur)="handleBlur($event)"\n (ngModelChange)="handleChange($event)"\n [autocomplete]="autocomplete ? \'on\' : \'off\'"\n (keyup.enter)="flushViewChanges(input.value)"\n (keydown.ArrowUp)="onArrowPress($event)"\n (keydown.ArrowDown)="onArrowPress($event)"\n (keypress)="validateInputEntry($event)"\n #input>\n'}]}],ctorParameters:()=>[{type:p.Injector},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}],propDecorators:{inputEl:[{type:t.ViewChild,args:["input",{static:!0}]}],ngModel:[{type:t.ViewChild,args:[l.NgModel]}]}}),e.BaseInput=g,e.InputCalendarComponent=b,e.InputColorComponent=P,e.InputEmailComponent=O,e.InputNumberComponent=_,e.InputTextComponent=R}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@wm/core"),require("lodash-es")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@wm/core","lodash-es"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.input=e.wm.components.input||{},e.wm.components.input.captionposition={}),e.ng.core,e.wm.core,e._)}(this,function(e,t,i,n){"use strict";function a(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var s=a(t),o=a(i);class r{constructor(e,i){this.skipFloatPositionWidgets=["radioset","checkboxset","richtext","switch","chips","checkbox","slider","rating","toggle","upload"],this.elementRef=e.get(t.ElementRef),this.nativeEl=this.elementRef.nativeElement,this.app=i}onBlurCb(){let e;this.inputEl.length>1&&this.inputEl.hasClass("mobile-input")&&n.forEach(this.inputEl,t=>{$(t).hasClass("mobile-input")&&t.value&&(e=t.value)}),this.inputEl.val()||e||(this.compositeEle.classList.remove("float-active"),this.inputEl.removeAttr("placeholder"))}onFocusCb(){this.compositeEle.classList.add("float-active"),this.inputEl.attr("placeholder",this.placeholder)}checkForSelectPlaceholder(){const e=this.nativeEl.querySelector("#placeholderOption");e&&e.textContent&&!$(this.nativeEl).find("select").is(":focus")&&!$(this.inputEl.closest("[widget-id]")).attr("datavalue")&&(e.textContent="")}setDefaultValueAnimation(){!this._isPlaceholderBound&&this.inputEl.attr("placeholder")&&(this.placeholder=this.inputEl.attr("placeholder"),this.inputEl.removeAttr("placeholder")),this.checkForSelectPlaceholder(),(this.inputEl.val()&&!this.inputEl.is("select")||$(this.inputEl.closest("[widget-id]")).attr("datavalue")||$(this.inputEl.parent("[widget-id]")).attr("datavalue.bind")||this.nativeEl.getAttribute("defaultvalue")||this.nativeEl.getAttribute("displayformat")||$(this.nativeEl).find("select option:selected").text()||$(this.nativeEl).find("select").attr("multiple"))&&this.compositeEle.classList.add("float-active")}observeForPlaceholderAttrChange(){this._attrObserver=new MutationObserver(e=>{e.forEach(e=>{"placeholder"===e.attributeName&&this.inputEl.attr("placeholder")&&!this.compositeEle.classList.contains("float-active")&&(this.placeholder=this.inputEl.attr("placeholder"),this.inputEl.removeAttr("placeholder"))})});this._attrObserver.observe(this.inputEl[0],{attributes:!0,childList:!1,characterData:!1})}checkForRightAlignedForm(){const e=$(this.compositeEle);if(e.closest(".align-right").length&&e.find(".input-group-btn").length){const t=e.find("label");e.find("[wmdatetime]").length?t.addClass("input-grp-dt-icon"):t.addClass("input-grp-icon")}}ngAfterViewInit(){this.compositeEle=this.nativeEl;const e=this.nativeEl.widget;let t=e.$attrs.get("captionposition");if(e.form&&(t=e.form.$attrs.get("captionposition"),this.compositeEle=this.nativeEl.querySelector(".app-composite-widget"),this._isPlaceholderBound=this.nativeEl.getAttribute("placeholder.bind")),"floating"===t){if(e.form){const e=this.nativeEl.getAttribute("widgettype");this.skipFloatPositionWidgets.indexOf(e)>-1&&(this.compositeEle.classList.remove("caption-floating"),this.compositeEle.classList.add("caption-top")),this.checkForRightAlignedForm()}this.inputEl=$(this.nativeEl).find("input, select, textarea"),this._isPlaceholderBound||(this._isPlaceholderBound=this.inputEl.closest("[widget-id]").attr("placeholder.bind")),setTimeout(this.setDefaultValueAnimation.bind(this),0),this.inputEl.focus(this.onFocusCb.bind(this)),this.inputEl.blur(this.onBlurCb.bind(this)),this._isPlaceholderBound&&this.observeForPlaceholderAttrChange()}}ngOnInit(){this.labelAnimationSubscription=this.app.subscribe("captionPositionAnimate",e=>{const t=this.inputEl&&this.inputEl.is(":focus");if(e.displayVal||e.isFocused||e.isSelectMultiple||t)e.nativeEl.addClass("float-active"),!e.displayVal&&t&&this.inputEl.attr("placeholder",this.placeholder);else if(e.nativeEl.removeClass("float-active"),this.inputEl){const e=this.nativeEl.querySelector("#placeholderOption");(this.inputEl.attr("placeholder")||e)&&(e?e.textContent="":(this.placeholder=this.inputEl.attr("placeholder"),this.inputEl.removeAttr("placeholder")))}})}ngOnDestroy(){this.labelAnimationSubscription&&this.labelAnimationSubscription(),this._attrObserver&&this._attrObserver.disconnect()}static{this.\u0275fac=s.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:s,type:r,deps:[{token:s.Injector},{token:o.App}],target:s.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=s.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:r,isStandalone:!0,selector:"[wmCaptionPosition]",ngImport:s})}}s.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:s,type:r,decorators:[{type:t.Directive,args:[{standalone:!0,selector:"[wmCaptionPosition]"}]}],ctorParameters:()=>[{type:s.Injector},{type:o.App}]}),e.CaptionPositionDirective=r}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@wm/components/base")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@wm/components/base"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.input=e.wm.components.input||{},e.wm.components.input.buttongroup={}),e.ng.core,e.wm.components.base)}(this,function(e,t,i){"use strict";var n,a,s=(n=t,a=Object.create(null),n&&Object.keys(n).forEach(function(e){if("default"!==e){var t=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(a,e,t.get?t:{enumerable:!0,get:function(){return n[e]}})}}),a.default=n,Object.freeze(a));const o={widgetType:"wm-buttongroup",hostClass:"btn-group app-button-group"};class r extends i.StylableComponent{static{this.initializeProps=void i.register("wm-buttongroup",new Map([["class",i.PROP_STRING],["name",i.PROP_STRING],["show",{value:!0,...i.PROP_BOOLEAN}],["vertical",i.PROP_BOOLEAN]]))}handleClick(e){const t=$(e.target).closest(".app-button");this.$element.find(".app-button").removeClass("selected"),t.addClass("selected")}constructor(e,t){super(e,o,t),i.styler(this.nativeElement,this,i.APPLY_STYLES_TYPE.CONTAINER)}static{this.\u0275fac=s.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:s,type:r,deps:[{token:s.Injector},{token:"EXPLICIT_CONTEXT",optional:!0}],target:s.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=s.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:r,isStandalone:!0,selector:"[wmButtonGroup]",host:{listeners:{click:"handleClick($event)"},properties:{"class.btn-group-vertical":"this.vertical"}},providers:[i.provideAsWidgetRef(r)],usesInheritance:!0,ngImport:s})}}s.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:s,type:r,decorators:[{type:t.Directive,args:[{standalone:!0,selector:"[wmButtonGroup]",providers:[i.provideAsWidgetRef(r)]}]}],ctorParameters:()=>[{type:s.Injector},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}],propDecorators:{vertical:[{type:t.HostBinding,args:["class.btn-group-vertical"]}],handleClick:[{type:t.HostListener,args:["click",["$event"]]}]}}),e.ButtonGroupDirective=r}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common"),require("@angular/forms"),require("@angular/core"),require("@wm/core"),require("@wm/components/base"),require("@wm/components/input/base-form-custom")):"function"==typeof define&&define.amd?define(["exports","@angular/common","@angular/forms","@angular/core","@wm/core","@wm/components/base","@wm/components/input/base-form-custom"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.input=e.wm.components.input||{},e.wm.components.input.checkbox={}),e.ng.common,e.ng.forms,e.ng.core,e.wm.core,e.wm.components.base,e.wm.components.input.baseFormCustom)}(this,function(e,t,i,n,a,s,o){"use strict";function r(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var l=r(t),c=r(i),d=r(n);const p=new Map([["caption",s.PROP_STRING],["class",s.PROP_STRING],["conditionalclass",s.PROP_ANY],["conditionalstyle",s.PROP_ANY],["checkedvalue",{value:!0,...s.PROP_STRING}],["datavaluesource",s.PROP_ANY],["datavalue",s.PROP_STRING],["disabled",s.PROP_BOOLEAN],["hint",s.PROP_STRING],["arialabel",s.PROP_STRING],["name",s.PROP_STRING],["readonly",s.PROP_BOOLEAN],["required",s.PROP_BOOLEAN],["shortcutkey",s.PROP_STRING],["show",{value:!0,...s.PROP_BOOLEAN}],["tabindex",{value:0,...s.PROP_NUMBER}],["uncheckedvalue",{value:!1,...s.PROP_STRING}],["unselectedicon",s.PROP_STRING],["selectedicon",s.PROP_STRING]]),m="app-checkbox checkbox",h={widgetType:"wm-checkbox",hostClass:m},u=(e,t)=>{if(null===e)return t;if(!0===e||"true"===e)return!0;if(!1===e||"false"===e)return!1;const i=parseInt(e,10);return isNaN(i)?e:i};class g extends o.BaseFormCustomComponent{static{this.initializeProps=(s.register("wm-checkbox",p),s.registerFormWidget(a.FormWidgetType.CHECKBOX,p),s.registerFormWidget(a.FormWidgetType.TOGGLE,p),void s.registerFormWidget(a.FormWidgetType.ICONBUTTONTOGGLE,p))}get datavalue(){return a.isDefined(this.proxyModel)?this.proxyModel?this._checkedvalue:this._uncheckedvalue:void 0}set datavalue(e){this.proxyModel=a.isDefined(e)&&""!==e?e===this._checkedvalue:void 0,this.updatePrevDatavalue(this.datavalue)}constructor(e,t,i,n,s){h.hostClass="button"===n?"app-iconbutton-toggle":m,super(e,h,s),this.type=n,this._caption="&nbsp",this._checkedvalue=u(t,!0),this._uncheckedvalue=u(i,!1),a.toggleClass(this.nativeElement,"app-toggle","toggle"===n)}onPropertyChange(e,t,i){"tabindex"!==e&&("required"!==e?"caption"===e?a.isDefined(t)&&""!==t?this._caption=t:this._caption="&nbsp;":"checkedvalue"===e?this._checkedvalue=u(t,!0):"uncheckedvalue"===e?this._uncheckedvalue=u(t,!1):"datavalue"===e?(this.datavalue=u(t),this._onChange(this.datavalue)):super.onPropertyChange(e,t,i):this._onChange(this.datavalue))}handleEvent(e,t,i,n){if("change"!==t&&"blur"!==t){const e="tap"===t?this.nativeElement.querySelector("label"):this.checkboxEl.nativeElement;super.handleEvent(e,t,i,n)}}handleChange(e){this.invokeOnChange(this.datavalue,{type:"change"},this.ngModel.valid)}onKeyDown(e){e.preventDefault(),this.checkboxEl.nativeElement.click()}ngAfterViewInit(){super.ngAfterViewInit(),s.styler(this.nativeElement.querySelector("label"),this)}ngOnDestroy(){this.ngModel=null,this.checkboxEl=null,super.ngOnDestroy()}static{this.\u0275fac=d.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:d,type:g,deps:[{token:d.Injector},{token:"checkedvalue",attribute:!0},{token:"uncheckedvalue",attribute:!0},{token:"type",attribute:!0},{token:"EXPLICIT_CONTEXT",optional:!0}],target:d.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=d.\u0275\u0275ngDeclareComponent({minVersion:"14.0.0",version:"20.3.19",type:g,isStandalone:!0,selector:"[wmCheckbox]",host:{listeners:{"keydown.enter":'onKeyDown($event,"ENTER")'}},providers:[s.provideAs(g,i.NG_VALUE_ACCESSOR,!0),s.provideAs(g,i.NG_VALIDATORS,!0),s.provideAsWidgetRef(g)],viewQueries:[{propertyName:"ngModel",first:!0,predicate:i.NgModel,descendants:!0},{propertyName:"checkboxEl",first:!0,predicate:["checkbox"],descendants:!0,read:n.ElementRef,static:!0}],usesInheritance:!0,ngImport:d,template:'<label [ngClass]="{\'unchecked\': !proxyModel, \'disabled\': (disabled || readonly), \'required\': (required && _caption), \'icon-button-toggle\': type === \'button\'}">\n <input type="checkbox"\n #checkbox\n [attr.name]="name"\n [attr.aria-label]="arialabel"\n focus-target\n [(ngModel)]="proxyModel"\n [ngModelOptions]="{standalone: true}"\n [readonly]="readonly"\n [required]="required"\n [disabled]="disabled || readonly"\n [attr.accesskey]="shortcutkey"\n [tabindex]="tabindex"\n (blur)="invokeOnTouched($event)"\n (ngModelChange)="handleChange($event)">\n <span class="caption" [innerHtml]="_caption" *ngIf="type != \'button\' && type != \'toggle\'"></span>\n \x3c!-- Icon toggle button --\x3e\n <span class="caption fa-xs text-center" *ngIf="type == \'toggle\'">\n <span name="unselectedIcon" class="start-icon" [ngClass]="unselectedicon" *ngIf="!proxyModel"></span>\n <span name="selectedIcon" class="end-icon" [ngClass]="selectedicon" *ngIf="proxyModel"></span>\n </span>\n <span class="toggle-icon" [ngClass]="unselectedicon" *ngIf="type === \'button\' && !proxyModel"></span>\n <span class="toggle-icon" *ngIf="proxyModel && type === \'button\'" [ngClass]="selectedicon"></span>\n <img alt="Checkbox Image" aria-hidden="true" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" class="switch"/>\n</label>\n<input type="hidden" class="ng-hide model-holder" aria-hidden="true" tabindex="-1" [disabled]="disabled" [value]="proxyModel">\n',dependencies:[{kind:"ngmodule",type:t.CommonModule},{kind:"directive",type:l.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"directive",type:l.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"ngmodule",type:i.FormsModule},{kind:"directive",type:c.CheckboxControlValueAccessor,selector:"input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]"},{kind:"directive",type:c.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:c.CheckboxRequiredValidator,selector:"input[type=checkbox][required][formControlName],input[type=checkbox][required][formControl],input[type=checkbox][required][ngModel]"},{kind:"directive",type:c.NgModel,selector:"[ngModel]:not([formControlName]):not([formControl])",inputs:["name","disabled","ngModel","ngModelOptions"],outputs:["ngModelChange"],exportAs:["ngModel"]}]})}}d.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:d,type:g,decorators:[{type:n.Component,args:[{standalone:!0,imports:[t.CommonModule,i.FormsModule],selector:"[wmCheckbox]",providers:[s.provideAs(g,i.NG_VALUE_ACCESSOR,!0),s.provideAs(g,i.NG_VALIDATORS,!0),s.provideAsWidgetRef(g)],template:'<label [ngClass]="{\'unchecked\': !proxyModel, \'disabled\': (disabled || readonly), \'required\': (required && _caption), \'icon-button-toggle\': type === \'button\'}">\n <input type="checkbox"\n #checkbox\n [attr.name]="name"\n [attr.aria-label]="arialabel"\n focus-target\n [(ngModel)]="proxyModel"\n [ngModelOptions]="{standalone: true}"\n [readonly]="readonly"\n [required]="required"\n [disabled]="disabled || readonly"\n [attr.accesskey]="shortcutkey"\n [tabindex]="tabindex"\n (blur)="invokeOnTouched($event)"\n (ngModelChange)="handleChange($event)">\n <span class="caption" [innerHtml]="_caption" *ngIf="type != \'button\' && type != \'toggle\'"></span>\n \x3c!-- Icon toggle button --\x3e\n <span class="caption fa-xs text-center" *ngIf="type == \'toggle\'">\n <span name="unselectedIcon" class="start-icon" [ngClass]="unselectedicon" *ngIf="!proxyModel"></span>\n <span name="selectedIcon" class="end-icon" [ngClass]="selectedicon" *ngIf="proxyModel"></span>\n </span>\n <span class="toggle-icon" [ngClass]="unselectedicon" *ngIf="type === \'button\' && !proxyModel"></span>\n <span class="toggle-icon" *ngIf="proxyModel && type === \'button\'" [ngClass]="selectedicon"></span>\n <img alt="Checkbox Image" aria-hidden="true" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" class="switch"/>\n</label>\n<input type="hidden" class="ng-hide model-holder" aria-hidden="true" tabindex="-1" [disabled]="disabled" [value]="proxyModel">\n'}]}],ctorParameters:()=>[{type:d.Injector},{type:void 0,decorators:[{type:n.Attribute,args:["checkedvalue"]}]},{type:void 0,decorators:[{type:n.Attribute,args:["uncheckedvalue"]}]},{type:void 0,decorators:[{type:n.Attribute,args:["type"]}]},{type:void 0,decorators:[{type:n.Inject,args:["EXPLICIT_CONTEXT"]},{type:n.Optional}]}],propDecorators:{ngModel:[{type:n.ViewChild,args:[i.NgModel]}],checkboxEl:[{type:n.ViewChild,args:["checkbox",{static:!0,read:n.ElementRef}]}],onKeyDown:[{type:n.HostListener,args:["keydown.enter",["$event",'"ENTER"']]}]}}),e.CheckboxComponent=g,e.unStringify=u}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common"),require("@angular/core"),require("@angular/forms"),require("@wm/core"),require("@wm/components/base"),require("@wm/components/input/dataset-aware-form"),require("lodash-es")):"function"==typeof define&&define.amd?define(["exports","@angular/common","@angular/core","@angular/forms","@wm/core","@wm/components/base","@wm/components/input/dataset-aware-form","lodash-es"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.input=e.wm.components.input||{},e.wm.components.input.checkboxset={}),e.ng.common,e.ng.core,e.ng.forms,e.wm.core,e.wm.components.base,e.wm.components.input.datasetawareform,e._)}(this,function(e,t,i,n,a,s,o,r){"use strict";function l(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var c=l(t),d=l(i);const p=new Map([["class",s.PROP_STRING],["collapsible",s.PROP_BOOLEAN],["compareby",s.PROP_STRING],["datafield",s.PROP_STRING],["dataset",{value:"Option 1, Option 2, Option 3",...s.PROP_ANY}],["datavaluesource",s.PROP_ANY],["datavalue",s.PROP_STRING],["dateformat",s.PROP_STRING],["disabled",s.PROP_BOOLEAN],["displayexpression",s.PROP_STRING],["displayfield",s.PROP_STRING],["displayValue",s.PROP_STRING],["groupby",s.PROP_STRING],["itemclass",{value:"",...s.PROP_STRING}],["itemsperrow",{value:"xs-1 sm-1 md-1 lg-1",...s.PROP_STRING}],["listclass",{value:"",...s.PROP_STRING}],["match",s.PROP_STRING],["name",s.PROP_STRING],["orderby",s.PROP_STRING],["readonly",s.PROP_BOOLEAN],["required",s.PROP_BOOLEAN],["show",{value:!0,...s.PROP_BOOLEAN}],["showcount",s.PROP_BOOLEAN],["showindevice",{displayType:"inline-block",value:"all",...s.PROP_STRING}],["tabindex",{value:0,...s.PROP_NUMBER}],["usekeys",s.PROP_BOOLEAN],["layout",s.PROP_STRING]]),m={widgetType:"wm-checkboxset",hostClass:"app-checkboxset list-group inline"};class h extends o.DatasetAwareFormComponent{static{this.initializeProps=(s.register("wm-checkboxset",p),void s.registerFormWidget(a.FormWidgetType.CHECKBOXSET,new Map(p)))}constructor(e,t){super(e,m,t),this.layout="",this.eventListeners=new Map,s.styler(this.nativeElement,this),this.multiple=!0}triggerInvokeOnChange(e,t){this.modelByKey=e,this.viewParent.containerWidget&&this.viewParent.containerWidget.updateDataValue&&this.viewParent.containerWidget.updateDataValue(this.datavalue),this.invokeOnTouched(),this.invokeOnChange(this.datavalue,t||{},!0)}onCheckboxLabelClick(e,t){if(!$(e.target).is("input"))return;const i=this.nativeElement.querySelectorAll("input:checked"),n=[];r.forEach(i,e=>{n.push(e.value)}),this.triggerInvokeOnChange(n,e)}handleEvent(e,t,i,n){if("click"===t){const a=e=>{if($(e.target).is("input"))return n.$event=e,i()},s=this.eventManager.addEventListener(e,t,a);this.eventListeners.set(e,s)}else r.includes(["change"],t)||super.handleEvent(e,t,i,n)}onKeyDown(e){e.preventDefault(),e.target.click()}onPropertyChange(e,t,i){"tabindex"!==e&&("required"!==e?("layout"===e&&this.handleLayout(t),"itemsperrow"===e?a.setListClass(this):super.onPropertyChange(e,t,i)):this._onChange(this.datavalue))}handleLayout(e){const t="vertical"===e?"column":"row";this.$element.css({display:"flex",flexDirection:t})}ngOnDestroy(){this.eventListeners&&this.eventListeners.size>0&&(this.eventListeners.forEach(e=>{e&&"function"==typeof e&&e()}),this.eventListeners.clear(),this.eventListeners=null),super.ngOnDestroy()}static{this.\u0275fac=d.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:d,type:h,deps:[{token:d.Injector},{token:"EXPLICIT_CONTEXT",optional:!0}],target:d.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=d.\u0275\u0275ngDeclareComponent({minVersion:"17.0.0",version:"20.3.19",type:h,isStandalone:!0,selector:"[wmCheckboxset]",host:{listeners:{"keydown.enter":'onKeyDown($event,"ENTER")'}},providers:[s.provideAs(h,n.NG_VALUE_ACCESSOR,!0),s.provideAs(h,n.NG_VALIDATORS,!0),s.provideAsWidgetRef(h)],exportAs:["wmCheckboxset"],usesInheritance:!0,ngImport:d,template:'@if (!groupby) {\n @for (item of datasetItems; track item; let i = $index) {\n <li [ngClass]="[\'checkbox\', \'app-checkbox\', itemclass, itemsPerRowClass]"\n [class.active]="item.selected"\n [wmItemTemplate]="content" [userComponentParams]="item" partialContainer\n (click)="onCheckboxLabelClick($event, item.key)" role="presentation">\n \x3c!-- Default item template --\x3e\n @if (!content) {\n <label class="app-checkboxset-label" [ngClass]="{\'disabled\':disabled || readonly}" [title]="item.label">\n <input [name]="\'checkboxset_\' + widgetId" [tabindex]="tabindex"\n type="checkbox"\n [disabled]="disabled || readonly" [attr.data-attr-index]="i"\n [value]="item.key" [tabindex]="tabindex" [checked]="item.selected"/>\n <span class="caption" [textContent]="item.label"></span>\n </label>\n }\n \x3c!-- Custom partial template --\x3e\n @if (content) {\n <label class="app-checkboxset-label" [ngClass]="{\'disabled\':disabled || readonly}" >\n <input [name]="\'checkboxset_\' + widgetId" [tabindex]="tabindex"\n type="checkbox"\n [disabled]="disabled || readonly" [attr.data-attr-index]="i"\n [value]="item.key" [tabindex]="tabindex" [checked]="item.selected"/>\n <span class="caption customTemplate" partial-container-target></span>\n </label>\n }\n </li>\n }\n} @else {\n @for (groupObj of groupedData; track groupObj; let groupindex = $index) {\n <li class="app-list-item-group" role="presentation">\n <ul class="item-group" [attr.aria-labelledby]="\'group_\' + widgetId + \'_\' + groupindex">\n <li [id]="\'group_\' + widgetId + \'_\' + groupindex" aria-hidden="true" class="list-group-header" (click)="handleHeaderClick($event)" [title]="groupObj.key" [ngClass]="{\'collapsible-content\': collapsible}">\n <h4 class="group-title" [attr.aria-label]="\'Group \'+groupObj.key">{{groupObj.key}}\n <div class="header-action">\n @if (collapsible) {\n <i class="app-icon wi action wi-chevron-up" title="{{appLocale.LABEL_COLLAPSE}}/{{appLocale.LABEL_EXPAND}}"></i>\n }\n @if (showcount) {\n <span class="label label-default" [textContent]="groupObj.data.length"></span>\n }\n </div>\n </h4>\n </li>\n @for (item of groupObj.data; track item; let i = $index) {\n <li\n [ngClass]="[\'checkbox\', \'app-checkbox\', \'group-list-item\', itemclass, itemsPerRowClass]"\n [class.active]="item.selected"\n [wmItemTemplate]="content" [userComponentParams]="item" partialContainer\n (click)="onCheckboxLabelClick($event, item)">\n \x3c!-- Default item template --\x3e\n @if (!content) {\n <label class="app-checkboxset-label" [ngClass]="{\'disabled\':disabled || readonly}" [title]="item.label">\n <input [name]="\'checkboxset_\' + widgetId" type="checkbox"\n [tabindex]="tabindex"\n [disabled]="disabled || readonly" [attr.data-attr-index]="i"\n [value]="item.key" [tabindex]="tabindex" [checked]="item.selected"/>\n <span class="caption" [textContent]="item.label"></span>\n </label>\n }\n \x3c!-- Custom partial template --\x3e\n @if (content) {\n <label class="app-checkboxset-label" [ngClass]="{\'disabled\':disabled || readonly}" >\n <input [name]="\'checkboxset_\' + widgetId" type="checkbox"\n [tabindex]="tabindex"\n [disabled]="disabled || readonly" [attr.data-attr-index]="i"\n [value]="item.key" [tabindex]="tabindex" [checked]="item.selected"/>\n <span class="caption" partial-container-target></span>\n </label>\n }\n </li>\n }\n </ul>\n </li>\n }\n}\n<input [disabled]="disabled || readonly" hidden class="model-holder">\n@if (readonly || disabled) {\n <div class="readonly-wrapper"></div>\n}\n\n\x3c!-- This template will be displayed when groupby is specified. --\x3e\n',dependencies:[{kind:"ngmodule",type:t.CommonModule},{kind:"directive",type:c.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"directive",type:s.TextContentDirective,selector:"[textContent]",inputs:["textContent"]},{kind:"directive",type:s.ItemTemplateDirective,selector:"[wmItemTemplate]",inputs:["userComponentParams","wmItemTemplate"],exportAs:["itemTemplateRef"]},{kind:"directive",type:s.PartialParamHandlerDirective,selector:"[partialContainer]"},{kind:"directive",type:s.PartialContainerDirective,selector:"[partialContainer]"}]})}}d.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:d,type:h,decorators:[{type:i.Component,args:[{standalone:!0,imports:[t.CommonModule,s.TextContentDirective,s.ItemTemplateDirective,s.PartialParamHandlerDirective,s.PartialContainerDirective],selector:"[wmCheckboxset]",exportAs:"wmCheckboxset",providers:[s.provideAs(h,n.NG_VALUE_ACCESSOR,!0),s.provideAs(h,n.NG_VALIDATORS,!0),s.provideAsWidgetRef(h)],template:'@if (!groupby) {\n @for (item of datasetItems; track item; let i = $index) {\n <li [ngClass]="[\'checkbox\', \'app-checkbox\', itemclass, itemsPerRowClass]"\n [class.active]="item.selected"\n [wmItemTemplate]="content" [userComponentParams]="item" partialContainer\n (click)="onCheckboxLabelClick($event, item.key)" role="presentation">\n \x3c!-- Default item template --\x3e\n @if (!content) {\n <label class="app-checkboxset-label" [ngClass]="{\'disabled\':disabled || readonly}" [title]="item.label">\n <input [name]="\'checkboxset_\' + widgetId" [tabindex]="tabindex"\n type="checkbox"\n [disabled]="disabled || readonly" [attr.data-attr-index]="i"\n [value]="item.key" [tabindex]="tabindex" [checked]="item.selected"/>\n <span class="caption" [textContent]="item.label"></span>\n </label>\n }\n \x3c!-- Custom partial template --\x3e\n @if (content) {\n <label class="app-checkboxset-label" [ngClass]="{\'disabled\':disabled || readonly}" >\n <input [name]="\'checkboxset_\' + widgetId" [tabindex]="tabindex"\n type="checkbox"\n [disabled]="disabled || readonly" [attr.data-attr-index]="i"\n [value]="item.key" [tabindex]="tabindex" [checked]="item.selected"/>\n <span class="caption customTemplate" partial-container-target></span>\n </label>\n }\n </li>\n }\n} @else {\n @for (groupObj of groupedData; track groupObj; let groupindex = $index) {\n <li class="app-list-item-group" role="presentation">\n <ul class="item-group" [attr.aria-labelledby]="\'group_\' + widgetId + \'_\' + groupindex">\n <li [id]="\'group_\' + widgetId + \'_\' + groupindex" aria-hidden="true" class="list-group-header" (click)="handleHeaderClick($event)" [title]="groupObj.key" [ngClass]="{\'collapsible-content\': collapsible}">\n <h4 class="group-title" [attr.aria-label]="\'Group \'+groupObj.key">{{groupObj.key}}\n <div class="header-action">\n @if (collapsible) {\n <i class="app-icon wi action wi-chevron-up" title="{{appLocale.LABEL_COLLAPSE}}/{{appLocale.LABEL_EXPAND}}"></i>\n }\n @if (showcount) {\n <span class="label label-default" [textContent]="groupObj.data.length"></span>\n }\n </div>\n </h4>\n </li>\n @for (item of groupObj.data; track item; let i = $index) {\n <li\n [ngClass]="[\'checkbox\', \'app-checkbox\', \'group-list-item\', itemclass, itemsPerRowClass]"\n [class.active]="item.selected"\n [wmItemTemplate]="content" [userComponentParams]="item" partialContainer\n (click)="onCheckboxLabelClick($event, item)">\n \x3c!-- Default item template --\x3e\n @if (!content) {\n <label class="app-checkboxset-label" [ngClass]="{\'disabled\':disabled || readonly}" [title]="item.label">\n <input [name]="\'checkboxset_\' + widgetId" type="checkbox"\n [tabindex]="tabindex"\n [disabled]="disabled || readonly" [attr.data-attr-index]="i"\n [value]="item.key" [tabindex]="tabindex" [checked]="item.selected"/>\n <span class="caption" [textContent]="item.label"></span>\n </label>\n }\n \x3c!-- Custom partial template --\x3e\n @if (content) {\n <label class="app-checkboxset-label" [ngClass]="{\'disabled\':disabled || readonly}" >\n <input [name]="\'checkboxset_\' + widgetId" type="checkbox"\n [tabindex]="tabindex"\n [disabled]="disabled || readonly" [attr.data-attr-index]="i"\n [value]="item.key" [tabindex]="tabindex" [checked]="item.selected"/>\n <span class="caption" partial-container-target></span>\n </label>\n }\n </li>\n }\n </ul>\n </li>\n }\n}\n<input [disabled]="disabled || readonly" hidden class="model-holder">\n@if (readonly || disabled) {\n <div class="readonly-wrapper"></div>\n}\n\n\x3c!-- This template will be displayed when groupby is specified. --\x3e\n'}]}],ctorParameters:()=>[{type:d.Injector},{type:void 0,decorators:[{type:i.Inject,args:["EXPLICIT_CONTEXT"]},{type:i.Optional}]}],propDecorators:{onKeyDown:[{type:i.HostListener,args:["keydown.enter",["$event",'"ENTER"']]}]}}),e.CheckboxsetComponent=h}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@wm/core"),require("@wm/components/base")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@wm/core","@wm/components/base"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.input=e.wm.components.input||{},e.wm.components.input.composite={}),e.ng.core,e.wm.core,e.wm.components.base)}(this,function(e,t,i,n){"use strict";var a,s,o=(a=t,s=Object.create(null),a&&Object.keys(a).forEach(function(e){if("default"!==e){var t=Object.getOwnPropertyDescriptor(a,e);Object.defineProperty(s,e,t.get?t:{enumerable:!0,get:function(){return a[e]}})}}),s.default=a,Object.freeze(s));const r={widgetType:"wm-form-group",hostClass:"form-group app-composite-widget clearfix"},l={left:"caption-left",right:"caption-right",top:"caption-top",floating:"caption-floating"};class c extends n.StylableComponent{static{this.initializeProps=void n.register("wm-form-group",new Map([["captionposition",n.PROP_STRING],["name",n.PROP_STRING],["required",n.PROP_BOOLEAN],["show",{value:!0,...n.PROP_BOOLEAN}]]))}constructor(e,t){super(e,r,t),n.styler(this.nativeElement,this,n.APPLY_STYLES_TYPE.CONTAINER)}onPropertyChange(e,t,n){"captionposition"===e?i.switchClass(this.nativeElement,l[t],l[n]):"required"===e?(this.required=t,this.assignRequiredToSubComponents()):super.onPropertyChange(e,t,n)}assignRequiredToSubComponents(){this.required&&this.componentRefs&&setTimeout(()=>{this.componentRefs&&this.componentRefs.forEach(e=>e.widget.required=!0)},50)}ngAfterViewInit(){super.ngAfterViewInit(),i.addForIdAttributes(this.nativeElement),this.assignRequiredToSubComponents()}ngOnDestroy(){this.componentRefs&&(this.componentRefs=null),super.ngOnDestroy()}static{this.\u0275fac=o.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:o,type:c,deps:[{token:o.Injector},{token:"EXPLICIT_CONTEXT",optional:!0}],target:o.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=o.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:c,isStandalone:!0,selector:"div[wmComposite]",providers:[n.provideAsWidgetRef(c)],queries:[{propertyName:"componentRefs",predicate:n.WidgetRef,descendants:!0}],usesInheritance:!0,ngImport:o})}}o.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:o,type:c,decorators:[{type:t.Directive,args:[{standalone:!0,selector:"div[wmComposite]",providers:[n.provideAsWidgetRef(c)]}]}],ctorParameters:()=>[{type:o.Injector},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}],propDecorators:{componentRefs:[{type:t.ContentChildren,args:[n.WidgetRef,{descendants:!0}]}]}}),e.CompositeDirective=c}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common"),require("@angular/core"),require("@angular/forms"),require("@wm/core"),require("@wm/components/base"),require("@wm/components/input/dataset-aware-form"),require("lodash-es")):"function"==typeof define&&define.amd?define(["exports","@angular/common","@angular/core","@angular/forms","@wm/core","@wm/components/base","@wm/components/input/dataset-aware-form","lodash-es"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.input=e.wm.components.input||{},e.wm.components.input.radioset={}),e.ng.common,e.ng.core,e.ng.forms,e.wm.core,e.wm.components.base,e.wm.components.input.datasetawareform,e._)}(this,function(e,t,i,n,a,s,o,r){"use strict";function l(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var c=l(t),d=l(i);const p=new Map([["class",s.PROP_STRING],["collapsible",s.PROP_BOOLEAN],["compareby",s.PROP_STRING],["datafield",s.PROP_STRING],["dataset",{value:"Option 1, Option 2, Option 3",...s.PROP_ANY}],["datavaluesource",s.PROP_ANY],["datavalue",s.PROP_ANY],["dateformat",s.PROP_STRING],["disabled",s.PROP_BOOLEAN],["displayexpression",s.PROP_STRING],["displayfield",s.PROP_STRING],["displayValue",s.PROP_STRING],["groupby",s.PROP_STRING],["itemclass",{value:"",...s.PROP_STRING}],["itemsperrow",{value:"xs-1 sm-1 md-1 lg-1",...s.PROP_STRING}],["listclass",{value:"",...s.PROP_STRING}],["match",s.PROP_STRING],["name",s.PROP_STRING],["orderby",s.PROP_STRING],["readonly",s.PROP_BOOLEAN],["required",s.PROP_BOOLEAN],["show",{value:!0,...s.PROP_BOOLEAN}],["showcount",s.PROP_BOOLEAN],["showindevice",{displayType:"inline-block",value:"all",...s.PROP_STRING}],["tabindex",{value:0,...s.PROP_NUMBER}],["usekeys",s.PROP_BOOLEAN],["hint",s.PROP_STRING],["layout",s.PROP_STRING]]),m={widgetType:"wm-radioset",hostClass:"app-radioset list-group inline"};class h extends o.DatasetAwareFormComponent{static{this.initializeProps=(s.register("wm-radioset",p),void s.registerFormWidget(a.FormWidgetType.RADIOSET,new Map(p)))}constructor(e,t){super(e,m,t),this.layout="",this.eventListeners=new Map,s.styler(this.nativeElement,this),this.multiple=!1}triggerInvokeOnChange(e,t){this.modelByKey=e,this.viewParent.containerWidget&&this.viewParent.containerWidget.updateDataValue&&this.viewParent.containerWidget.updateDataValue(this.datavalue),this.invokeOnTouched(),this.invokeOnChange(this.datavalue,t||{},!0)}onRadioLabelClick(e,t){$(e.target).is("input")&&this.triggerInvokeOnChange(t,e)}handleEvent(e,t,i,n){if("click"===t){const a=e=>{if($(e.target).is("input"))return n.$event=e,i()},s=this.eventManager.addEventListener(e,t,a);this.eventListeners.set(e,s)}else r.includes(["change"],t)||super.handleEvent(e,t,i,n)}onPropertyChange(e,t,i){"tabindex"!==e&&("layout"===e&&this.handleLayout(t),"itemsperrow"===e?a.setListClass(this):super.onPropertyChange(e,t,i))}handleLayout(e){const t="vertical"===e?"column":"row";this.$element.css({display:"flex",flexDirection:t})}ngOnDestroy(){this.eventListeners&&this.eventListeners.size>0&&(this.eventListeners.forEach(e=>{e&&"function"==typeof e&&e()}),this.eventListeners.clear(),this.eventListeners=null),super.ngOnDestroy()}static{this.\u0275fac=d.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:d,type:h,deps:[{token:d.Injector},{token:"EXPLICIT_CONTEXT",optional:!0}],target:d.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=d.\u0275\u0275ngDeclareComponent({minVersion:"17.0.0",version:"20.3.19",type:h,isStandalone:!0,selector:"[wmRadioset]",providers:[s.provideAs(h,n.NG_VALUE_ACCESSOR,!0),s.provideAs(h,n.NG_VALIDATORS,!0),s.provideAsWidgetRef(h)],exportAs:["wmRadioset"],usesInheritance:!0,ngImport:d,template:'@if (!groupby) {\n @for (item of datasetItems; track item; let i = $index) {\n <li [ngClass]="[\'radio\', \'app-radio\', itemclass, itemsPerRowClass]"\n [class.active]="item.selected"\n [wmItemTemplate]="content" [userComponentParams]="item" partialContainer\n (click)="onRadioLabelClick($event, item.key)" role="presentation">\n \x3c!-- Default item template --\x3e\n @if (!content) {\n <label class="app-radioset-label"\n [ngClass]="{\'disabled\':disabled || readonly}">\n <input [attr.data-attr-index]="i" [checked]="item.selected" [disabled]="disabled || readonly"\n [name]="\'radioset_\' + widgetId" [tabindex]="tabindex" [value]="item.key"\n type="radio"/>\n <span class="caption" [textContent]="item.label"></span>\n </label>\n }\n \x3c!-- Custom partial template --\x3e\n @if (content) {\n <label class="app-radioset-label"\n [ngClass]="{\'disabled\':disabled || readonly}">\n <input [attr.data-attr-index]="i" [checked]="item.selected" [disabled]="disabled || readonly"\n [name]="\'radioset_\' + widgetId" [tabindex]="tabindex" [value]="item.key"\n type="radio"/>\n <span class="caption customTemplate" partial-container-target></span>\n </label>\n }\n </li>\n }\n} @else {\n @for (groupObj of groupedData; track groupObj; let groupindex = $index) {\n <li class="app-list-item-group" role="presentation" >\n <ul class="item-group" [attr.aria-labelledby]="\'group_\' + widgetId + \'_\' + groupindex">\n <li [id]="\'group_\' + widgetId + \'_\' + groupindex" aria-hidden="true" class="list-group-header" (click)="handleHeaderClick($event)" [title]="groupObj.key" [ngClass]="{\'collapsible-content\': collapsible}">\n <h4 class="group-title" [attr.aria-label]="\'Group \'+groupObj.key">{{groupObj.key}}\n <div class="header-action">\n @if (collapsible) {\n <i class="app-icon wi action wi-chevron-up" title="{{appLocale.LABEL_COLLAPSE}}/{{appLocale.LABEL_EXPAND}}"></i>\n }\n @if (showcount) {\n <span class="label label-default" [textContent]="groupObj.data.length"></span>\n }\n </div>\n </h4>\n </li>\n @for (item of groupObj.data; track item; let i = $index) {\n <li\n [ngClass]="[\'radio\', \'app-radio\', \'group-list-item\', itemclass, itemsPerRowClass]"\n [class.active]="item.selected"\n [wmItemTemplate]="content" [userComponentParams]="item" partialContainer\n (click)="onRadioLabelClick($event, item)">\n \x3c!-- Default item template --\x3e\n @if (!content) {\n <label class="app-radioset-label"\n [ngClass]="{\'disabled\':disabled || readonly}">\n <input [attr.data-attr-index]="i" [name]="\'radioset_\' + widgetId" type="radio"\n [value]="item.key" [disabled]="disabled || readonly" [tabindex]="tabindex" [checked]="item.selected"/>\n <span class="caption" [textContent]="item.label"></span>\n </label>\n }\n \x3c!-- Custom partial template --\x3e\n @if (content) {\n <label class="app-radioset-label"\n [ngClass]="{\'disabled\':disabled || readonly}">\n <input [attr.data-attr-index]="i" [name]="\'radioset_\' + widgetId" type="radio"\n [value]="item.key" [disabled]="disabled || readonly" [tabindex]="tabindex" [checked]="item.selected"/>\n <span class="caption customTemplate" partial-container-target></span>\n </label>\n }\n </li>\n }\n </ul>\n </li>\n }\n}\n\n<input [disabled]="disabled || readonly" hidden class="model-holder">\n@if (readonly || disabled) {\n <div aria-readonly="true" class="readonly-wrapper"></div>\n}\n\n\x3c!-- This template will be displayed when groupby is specified. --\x3e\n',dependencies:[{kind:"ngmodule",type:t.CommonModule},{kind:"directive",type:c.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"directive",type:s.TextContentDirective,selector:"[textContent]",inputs:["textContent"]},{kind:"directive",type:s.ItemTemplateDirective,selector:"[wmItemTemplate]",inputs:["userComponentParams","wmItemTemplate"],exportAs:["itemTemplateRef"]},{kind:"directive",type:s.PartialParamHandlerDirective,selector:"[partialContainer]"},{kind:"directive",type:s.PartialContainerDirective,selector:"[partialContainer]"}]})}}d.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:d,type:h,decorators:[{type:i.Component,args:[{standalone:!0,imports:[t.CommonModule,s.TextContentDirective,s.ItemTemplateDirective,s.PartialParamHandlerDirective,s.PartialContainerDirective],selector:"[wmRadioset]",exportAs:"wmRadioset",providers:[s.provideAs(h,n.NG_VALUE_ACCESSOR,!0),s.provideAs(h,n.NG_VALIDATORS,!0),s.provideAsWidgetRef(h)],template:'@if (!groupby) {\n @for (item of datasetItems; track item; let i = $index) {\n <li [ngClass]="[\'radio\', \'app-radio\', itemclass, itemsPerRowClass]"\n [class.active]="item.selected"\n [wmItemTemplate]="content" [userComponentParams]="item" partialContainer\n (click)="onRadioLabelClick($event, item.key)" role="presentation">\n \x3c!-- Default item template --\x3e\n @if (!content) {\n <label class="app-radioset-label"\n [ngClass]="{\'disabled\':disabled || readonly}">\n <input [attr.data-attr-index]="i" [checked]="item.selected" [disabled]="disabled || readonly"\n [name]="\'radioset_\' + widgetId" [tabindex]="tabindex" [value]="item.key"\n type="radio"/>\n <span class="caption" [textContent]="item.label"></span>\n </label>\n }\n \x3c!-- Custom partial template --\x3e\n @if (content) {\n <label class="app-radioset-label"\n [ngClass]="{\'disabled\':disabled || readonly}">\n <input [attr.data-attr-index]="i" [checked]="item.selected" [disabled]="disabled || readonly"\n [name]="\'radioset_\' + widgetId" [tabindex]="tabindex" [value]="item.key"\n type="radio"/>\n <span class="caption customTemplate" partial-container-target></span>\n </label>\n }\n </li>\n }\n} @else {\n @for (groupObj of groupedData; track groupObj; let groupindex = $index) {\n <li class="app-list-item-group" role="presentation" >\n <ul class="item-group" [attr.aria-labelledby]="\'group_\' + widgetId + \'_\' + groupindex">\n <li [id]="\'group_\' + widgetId + \'_\' + groupindex" aria-hidden="true" class="list-group-header" (click)="handleHeaderClick($event)" [title]="groupObj.key" [ngClass]="{\'collapsible-content\': collapsible}">\n <h4 class="group-title" [attr.aria-label]="\'Group \'+groupObj.key">{{groupObj.key}}\n <div class="header-action">\n @if (collapsible) {\n <i class="app-icon wi action wi-chevron-up" title="{{appLocale.LABEL_COLLAPSE}}/{{appLocale.LABEL_EXPAND}}"></i>\n }\n @if (showcount) {\n <span class="label label-default" [textContent]="groupObj.data.length"></span>\n }\n </div>\n </h4>\n </li>\n @for (item of groupObj.data; track item; let i = $index) {\n <li\n [ngClass]="[\'radio\', \'app-radio\', \'group-list-item\', itemclass, itemsPerRowClass]"\n [class.active]="item.selected"\n [wmItemTemplate]="content" [userComponentParams]="item" partialContainer\n (click)="onRadioLabelClick($event, item)">\n \x3c!-- Default item template --\x3e\n @if (!content) {\n <label class="app-radioset-label"\n [ngClass]="{\'disabled\':disabled || readonly}">\n <input [attr.data-attr-index]="i" [name]="\'radioset_\' + widgetId" type="radio"\n [value]="item.key" [disabled]="disabled || readonly" [tabindex]="tabindex" [checked]="item.selected"/>\n <span class="caption" [textContent]="item.label"></span>\n </label>\n }\n \x3c!-- Custom partial template --\x3e\n @if (content) {\n <label class="app-radioset-label"\n [ngClass]="{\'disabled\':disabled || readonly}">\n <input [attr.data-attr-index]="i" [name]="\'radioset_\' + widgetId" type="radio"\n [value]="item.key" [disabled]="disabled || readonly" [tabindex]="tabindex" [checked]="item.selected"/>\n <span class="caption customTemplate" partial-container-target></span>\n </label>\n }\n </li>\n }\n </ul>\n </li>\n }\n}\n\n<input [disabled]="disabled || readonly" hidden class="model-holder">\n@if (readonly || disabled) {\n <div aria-readonly="true" class="readonly-wrapper"></div>\n}\n\n\x3c!-- This template will be displayed when groupby is specified. --\x3e\n'}]}],ctorParameters:()=>[{type:d.Injector},{type:void 0,decorators:[{type:i.Inject,args:["EXPLICIT_CONTEXT"]},{type:i.Optional}]}]}),e.RadiosetComponent=h}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common"),require("@angular/forms"),require("@angular/core"),require("@wm/core"),require("@wm/components/base"),require("@wm/components/input/dataset-aware-form")):"function"==typeof define&&define.amd?define(["exports","@angular/common","@angular/forms","@angular/core","@wm/core","@wm/components/base","@wm/components/input/dataset-aware-form"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.input=e.wm.components.input||{},e.wm.components.input.select={}),e.ng.common,e.ng.forms,e.ng.core,e.wm.core,e.wm.components.base,e.wm.components.input.datasetawareform)}(this,function(e,t,i,n,a,s,o){"use strict";function r(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var l=r(t),c=r(i),d=r(n);const p=new Map([["autofocus",s.PROP_BOOLEAN],["class",{value:"",...s.PROP_STRING}],["compareby",s.PROP_STRING],["datafield",s.PROP_STRING],["dataset",s.PROP_ANY],["datavaluesource",s.PROP_ANY],["datavalue",s.PROP_STRING],["dateformat",s.PROP_STRING],["disabled",s.PROP_BOOLEAN],["displayexpression",s.PROP_STRING],["displayfield",s.PROP_STRING],["displayValue",s.PROP_STRING],["groupby",s.PROP_STRING],["hint",s.PROP_STRING],["arialabel",s.PROP_STRING],["match",s.PROP_STRING],["multiple",{value:!1,...s.PROP_BOOLEAN}],["name",s.PROP_STRING],["orderby",s.PROP_STRING],["placeholder",s.PROP_STRING],["readonly",s.PROP_BOOLEAN],["required",s.PROP_BOOLEAN],["shortcutkey",s.PROP_STRING],["show",{value:!0,...s.PROP_BOOLEAN}],["tabindex",{value:0,...s.PROP_NUMBER}],["usekeys",s.PROP_BOOLEAN]]),m={widgetType:"wm-select",hostClass:"app-select-wrapper"};class h extends o.DatasetAwareFormComponent{static{this.initializeProps=(s.register("wm-select",p),s.registerFormWidget(a.FormWidgetType.SELECT,new Map(p)),void s.registerFormWidget(a.FormWidgetType.TYPEAHEAD,new Map(p)))}set datasource(e){e&&e.execute&&e.execute(a.DataSource.Operation.IS_BOUND_TO_LOCALE)&&(this.datavalue=e.execute(a.DataSource.Operation.GET_DEFAULT_LOCALE))}constructor(e,t){super(e,m,t),this.acceptsArray=!0;const i=this.dataset$.subscribe(()=>{if(a.isIos()||a.isSafari())if(this.datavalue){this.datasetItems.find(e=>e.selected)||setTimeout(()=>{this.placeholder||(this.selectEl.nativeElement.value=""),this.modelByKey=void 0},100)}else setTimeout(()=>{this.placeholder||(this.selectEl.nativeElement.value="")},100)});this.registerDestroyListener(()=>i.unsubscribe())}ngAfterViewInit(){super.ngAfterViewInit(),s.styler(this.selectEl.nativeElement,this)}handleEvent(e,t,i,n){["blur","change"].includes(t)||super.handleEvent(this.selectEl.nativeElement,t,i,n)}onSelectValueChange(e){if(this.readonly)return this.placeholder?this.selectEl.nativeElement.value=this.placeholder:this.selectEl.nativeElement.value="",void(this.datavalue=this.prevDatavalue);this.invokeOnTouched(),this.invokeOnChange(this.datavalue,e||{},!0)}onPropertyChange(e,t,i){if("required"!==e){if("class"!==e&&"tabindex"!==e)"readonly"===e&&(!0===t?a.setAttr(this.selectEl.nativeElement,"readonly","readonly"):a.removeAttr(this.selectEl.nativeElement,"readonly")),super.onPropertyChange(e,t,i);else if("class"===e){this.selectEl.nativeElement.classList.contains("ng-untouched")&&this.selectEl.nativeElement.classList.contains("ng-valid")&&t.includes("ng-untouched")&&t.includes("ng-invalid")&&setTimeout(()=>{this.selectEl.nativeElement.classList.contains("ng-untouched")&&this.selectEl.nativeElement.classList.contains("ng-valid")&&this.selectEl.nativeElement.classList.contains("ng-invalid")&&this.selectEl.nativeElement.classList.remove("ng-invalid")})}}else this._onChange(this.datavalue)}checkForFloatingLabel(e){const t=$(this.selectEl.nativeElement).closest(".app-composite-widget.caption-floating");if(this.placeholder||!a.isIos()&&!a.isSafari()||this.removePlaceholderOption(),t.length>0){const i=this.selectEl.nativeElement.querySelector("#placeholderOption");"mousedown"===e.type&&(!this.datavalue||this.datavalue&&""===$(this.selectEl).find("select option:selected").text()&&this.placeholder)?this.placeholder&&(i.textContent=this.placeholder):this.datavalue||(this.placeholder&&(i.textContent=""),t.removeClass("float-active"))}}removePlaceholderOption(){const e=$(this.selectEl.nativeElement).find("#placeholderOption");e.length&&(e.remove(),this.datavalue||(this.selectEl.nativeElement.value=""))}ngOnDestroy(){this.selectEl=null,super.ngOnDestroy()}static{this.\u0275fac=d.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:d,type:h,deps:[{token:d.Injector},{token:"EXPLICIT_CONTEXT",optional:!0}],target:d.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=d.\u0275\u0275ngDeclareComponent({minVersion:"17.0.0",version:"20.3.19",type:h,isStandalone:!0,selector:"wm-select",providers:[s.provideAs(h,i.NG_VALUE_ACCESSOR,!0),s.provideAs(h,i.NG_VALIDATORS,!0),s.provideAsWidgetRef(h)],viewQueries:[{propertyName:"selectEl",first:!0,predicate:["select"],descendants:!0,read:n.ElementRef,static:!0}],usesInheritance:!0,ngImport:d,template:'\x3c!--Updated focus with mousedown event. IOS devices not allow update of option value after opening dropdown--\x3e\n<select #select\n focus-target\n [ngClass]="[\'app-select form-control\', class]"\n [disabled]="disabled"\n [required]="required"\n [tabindex]="tabindex"\n [attr.accesskey]="shortcutkey"\n [(ngModel)]="modelByKey"\n [ngModelOptions]="{standalone: true}"\n [multiple]="multiple"\n (change)="onSelectValueChange($event)"\n (mousedown)="checkForFloatingLabel($event)"\n (blur)="invokeOnTouched($event); checkForFloatingLabel($event)"\n [attr.name]="name"\n [attr.aria-label]="arialabel"\n [autofocus]="autofocus">\n\n <option selected\n value="undefined"\n [textContent]="placeholder"\n id="placeholderOption"\n [hidden]="!placeholder"></option>\n\n @if (groupby) {\n @for (groupObj of groupedData; track groupObj) {\n <optgroup\n [label]="groupObj.key">\n @for (item of groupObj.data; track item) {\n <option\n [value]="item.key"\n [selected]="item.selected"\n [textContent]="item.label"\n ></option>\n }\n </optgroup>\n }\n }\n\n @if (!groupby) {\n @for (item of datasetItems; track item) {\n <option\n [value]="item.key"\n [selected]="item.selected"\n [textContent]="item.label"\n ></option>\n }\n }\n</select>\n',dependencies:[{kind:"ngmodule",type:t.CommonModule},{kind:"directive",type:l.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"directive",type:s.TextContentDirective,selector:"[textContent]",inputs:["textContent"]},{kind:"ngmodule",type:i.FormsModule},{kind:"directive",type:c.NgSelectOption,selector:"option",inputs:["ngValue","value"]},{kind:"directive",type:c.\u0275NgSelectMultipleOption,selector:"option",inputs:["ngValue","value"]},{kind:"directive",type:c.SelectMultipleControlValueAccessor,selector:"select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]",inputs:["compareWith"]},{kind:"directive",type:c.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:c.RequiredValidator,selector:":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]",inputs:["required"]},{kind:"directive",type:c.NgModel,selector:"[ngModel]:not([formControlName]):not([formControl])",inputs:["name","disabled","ngModel","ngModelOptions"],outputs:["ngModelChange"],exportAs:["ngModel"]}]})}}d.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:d,type:h,decorators:[{type:n.Component,args:[{standalone:!0,imports:[t.CommonModule,s.TextContentDirective,i.FormsModule],selector:"wm-select",providers:[s.provideAs(h,i.NG_VALUE_ACCESSOR,!0),s.provideAs(h,i.NG_VALIDATORS,!0),s.provideAsWidgetRef(h)],template:'\x3c!--Updated focus with mousedown event. IOS devices not allow update of option value after opening dropdown--\x3e\n<select #select\n focus-target\n [ngClass]="[\'app-select form-control\', class]"\n [disabled]="disabled"\n [required]="required"\n [tabindex]="tabindex"\n [attr.accesskey]="shortcutkey"\n [(ngModel)]="modelByKey"\n [ngModelOptions]="{standalone: true}"\n [multiple]="multiple"\n (change)="onSelectValueChange($event)"\n (mousedown)="checkForFloatingLabel($event)"\n (blur)="invokeOnTouched($event); checkForFloatingLabel($event)"\n [attr.name]="name"\n [attr.aria-label]="arialabel"\n [autofocus]="autofocus">\n\n <option selected\n value="undefined"\n [textContent]="placeholder"\n id="placeholderOption"\n [hidden]="!placeholder"></option>\n\n @if (groupby) {\n @for (groupObj of groupedData; track groupObj) {\n <optgroup\n [label]="groupObj.key">\n @for (item of groupObj.data; track item) {\n <option\n [value]="item.key"\n [selected]="item.selected"\n [textContent]="item.label"\n ></option>\n }\n </optgroup>\n }\n }\n\n @if (!groupby) {\n @for (item of datasetItems; track item) {\n <option\n [value]="item.key"\n [selected]="item.selected"\n [textContent]="item.label"\n ></option>\n }\n }\n</select>\n'}]}],ctorParameters:()=>[{type:d.Injector},{type:void 0,decorators:[{type:n.Inject,args:["EXPLICIT_CONTEXT"]},{type:n.Optional}]}],propDecorators:{selectEl:[{type:n.ViewChild,args:["select",{static:!0,read:n.ElementRef}]}]}}),e.SelectComponent=h}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common"),require("@angular/core"),require("@angular/forms"),require("@wm/core"),require("@wm/components/base"),require("@wm/components/input/dataset-aware-form"),require("lodash-es")):"function"==typeof define&&define.amd?define(["exports","@angular/common","@angular/core","@angular/forms","@wm/core","@wm/components/base","@wm/components/input/dataset-aware-form","lodash-es"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.input=e.wm.components.input||{},e.wm.components.input.switch={}),e.ng.common,e.ng.core,e.ng.forms,e.wm.core,e.wm.components.base,e.wm.components.input.datasetawareform,e._)}(this,function(e,t,i,n,a,s,o,r){"use strict";function l(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var c=l(t),d=l(i);const p=new Map([["class",s.PROP_STRING],["compareby",s.PROP_STRING],["datafield",s.PROP_STRING],["dataset",{value:"yes, no, maybe",...s.PROP_ANY}],["datavaluesource",s.PROP_ANY],["datavalue",s.PROP_STRING],["disabled",s.PROP_BOOLEAN],["displayexpression",s.PROP_STRING],["displayfield",s.PROP_STRING],["hint",s.PROP_ANY],["arialabel",s.PROP_STRING],["iconclass",s.PROP_STRING],["checkediconclass",{value:"",...s.PROP_STRING}],["name",s.PROP_STRING],["orderby",s.PROP_STRING],["required",s.PROP_BOOLEAN],["show",{value:!0,...s.PROP_BOOLEAN}],["tabindex",{value:0,...s.PROP_NUMBER}]]),m={widgetType:"wm-switch",hostClass:"app-switch"};class h extends o.DatasetAwareFormComponent{static{this.initializeProps=(s.register("wm-switch",p),s.registerFormWidget(a.FormWidgetType.SWITCH,new Map(p)),void s.registerFormWidget(a.FormWidgetType.TOGGLE,new Map(p)))}constructor(e,t){super(e,m,t),this.options=[],this._debounceSetSelectedValue=null,this.multiple="true"===this.getAttr("multiple"),this.checkediconclass=this.getAttr("checkediconclass"),this._debounceSetSelectedValue=a.debounce(e=>{this.setSelectedValue(),this.updateHighlighter(e),e&&a.$appDigest()},200);const i=this.dataset$.subscribe(()=>this.updateSwitchOptions());this.registerDestroyListener(()=>i.unsubscribe());const n=this.datavalue$.subscribe(()=>{this._debounceSetSelectedValue&&this._debounceSetSelectedValue(!0)});this.registerDestroyListener(()=>n.unsubscribe())}ngAfterViewInit(){super.ngAfterViewInit(),s.styler(this.nativeElement,this)}onStyleChange(e,t,i){"height"===e?a.setCSS(this.nativeElement,"overflow",t?"auto":""):super.onStyleChange(e,t,i)}setSelectedValue(){(a.isDefined(this.datavalue)||a.isDefined(this.toBeProcessedDatavalue))&&(this.selectedItem=r.find(this.datasetItems,{selected:!0}))}updateSwitchOptions(){this.datasetItems.length&&!this.multiple&&(this.btnwidth=100/this.datasetItems.length,a.setCSS(this.nativeElement.querySelector(".app-switch-overlay"),"width",this.btnwidth+"%")),this._debounceSetSelectedValue&&this._debounceSetSelectedValue(!0)}updateHighlighter(e){const t=$(this.nativeElement).find("span.app-switch-overlay");this.setSelectedValue();let i,n=this.selectedItem?r.findIndex(this.datasetItems,{key:this.selectedItem.key}):-1;null==n&&(n=-1),i=n*this.btnwidth,e?t.css("left",i+"%"):t.animate({left:i+"%"},300)}selectOptAtIndex(e){if(!this.datasetItems.length)return;const t=this.datasetItems[e];this._modelByValue=t.value}selectOpt(e,t,i){if(e.preventDefault(),!this.disabled){if(this.multiple){const e=[];this.datasetItems[t].selected=!this.datasetItems[t].selected,r.forEach(this.datasetItems,t=>{t.selected&&e.push(t.key)}),this.modelByKey=e,this.selectedItem=r.find(this.datasetItems,{selected:!0})}else{if(this.modelByKey=i.key,!this.multiple&&this.selectedItem&&t===r.findIndex(this.datasetItems,{key:this.selectedItem.key})){if(2!==this.datasetItems.length)return;t=1===t?0:1}this.selectedItem=this.datasetItems[t],this.updateHighlighter()}this.invokeOnTouched(),this.invokeOnChange(this.datavalue,e||{},!0),a.$appDigest()}}onPropertyChange(e,t,i){"disabled"!==e||a.toBoolean(t)?("hint"===e&&(r.isUndefined(t)||r.isNull(t)||""===r.trim(t)?this.hint=[]:r.isArray(t)||(this.hint=[t])),super.onPropertyChange(e,t,i)):this.nativeElement.removeAttribute(e)}ngOnDestroy(){this._debounceSetSelectedValue=null,this.options=[],this.selectedItem=null,this.hint&&(this.hint=[]),super.ngOnDestroy()}static{this.\u0275fac=d.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:d,type:h,deps:[{token:d.Injector},{token:"EXPLICIT_CONTEXT",optional:!0}],target:d.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=d.\u0275\u0275ngDeclareComponent({minVersion:"17.0.0",version:"20.3.19",type:h,isStandalone:!0,selector:"[wmSwitch]",providers:[s.provideAs(h,n.NG_VALUE_ACCESSOR,!0),s.provideAsWidgetRef(h)],exportAs:["wmSwitch"],usesInheritance:!0,ngImport:d,template:'<div role="group" class="btn-group btn-group-justified" [ngClass]="{\'multi-select\': multiple}">\n @for (opt of datasetItems; track opt) {\n <a\n focus-target\n href="javascript:void(0);"\n class="btn btn-default"\n [title]="hint?hint:opt.key"\n [name]="\'wm-switch-\' + opt.key"\n role="button"\n [title]="hint?.[opt.index-1]?hint[opt.index-1]:(hint?.[0]?hint[0]:(opt[displayfield]||opt.label))"\n [ngClass]="{\'selected\': opt.selected, \'disabled\': disabled}"\n [attr.aria-pressed]="opt.selected ? true : false"\n (click)="selectOpt($event, $index, opt)"\n >\n @if (opt.dataObject && opt.dataObject[iconclass] && (!opt.selected ||!checkediconclass)) {\n <i aria-hidden="true" [ngClass]="[\'app-icon\', opt.dataObject[iconclass] || opt[\'icon\']]"></i>\n }\n @if (opt.selected && checkediconclass) {\n <i aria-hidden="true" [ngClass]="[checkediconclass]"></i>\n }\n <span class="caption" [textContent]="opt[displayfield] || opt.label"></span>\n </a>\n }\n</div>\n@if (!multiple) {\n <span [title]="selectedItem ? selectedItem.label : modelByKey" aria-hidden="true"\n class="btn btn-primary app-switch-overlay switch-handle">\n <i [ngClass]="[checkediconclass]"></i>\n <span class="caption">{{selectedItem ? selectedItem.label : modelByKey}}</span>\n </span>\n}\n<input [name]="name" class="model-holder ng-hide" [disabled]="disabled" [value]="modelByKey" [required]="required" aria-hidden="true">\n',dependencies:[{kind:"ngmodule",type:t.CommonModule},{kind:"directive",type:c.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"directive",type:s.TextContentDirective,selector:"[textContent]",inputs:["textContent"]}]})}}d.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:d,type:h,decorators:[{type:i.Component,args:[{standalone:!0,imports:[t.CommonModule,s.TextContentDirective],selector:"[wmSwitch]",providers:[s.provideAs(h,n.NG_VALUE_ACCESSOR,!0),s.provideAsWidgetRef(h)],exportAs:"wmSwitch",template:'<div role="group" class="btn-group btn-group-justified" [ngClass]="{\'multi-select\': multiple}">\n @for (opt of datasetItems; track opt) {\n <a\n focus-target\n href="javascript:void(0);"\n class="btn btn-default"\n [title]="hint?hint:opt.key"\n [name]="\'wm-switch-\' + opt.key"\n role="button"\n [title]="hint?.[opt.index-1]?hint[opt.index-1]:(hint?.[0]?hint[0]:(opt[displayfield]||opt.label))"\n [ngClass]="{\'selected\': opt.selected, \'disabled\': disabled}"\n [attr.aria-pressed]="opt.selected ? true : false"\n (click)="selectOpt($event, $index, opt)"\n >\n @if (opt.dataObject && opt.dataObject[iconclass] && (!opt.selected ||!checkediconclass)) {\n <i aria-hidden="true" [ngClass]="[\'app-icon\', opt.dataObject[iconclass] || opt[\'icon\']]"></i>\n }\n @if (opt.selected && checkediconclass) {\n <i aria-hidden="true" [ngClass]="[checkediconclass]"></i>\n }\n <span class="caption" [textContent]="opt[displayfield] || opt.label"></span>\n </a>\n }\n</div>\n@if (!multiple) {\n <span [title]="selectedItem ? selectedItem.label : modelByKey" aria-hidden="true"\n class="btn btn-primary app-switch-overlay switch-handle">\n <i [ngClass]="[checkediconclass]"></i>\n <span class="caption">{{selectedItem ? selectedItem.label : modelByKey}}</span>\n </span>\n}\n<input [name]="name" class="model-holder ng-hide" [disabled]="disabled" [value]="modelByKey" [required]="required" aria-hidden="true">\n'}]}],ctorParameters:()=>[{type:d.Injector},{type:void 0,decorators:[{type:i.Inject,args:["EXPLICIT_CONTEXT"]},{type:i.Optional}]}]}),e.SwitchComponent=h}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common"),require("@angular/forms"),require("@angular/core"),require("@wm/core"),require("@wm/components/base"),require("@wm/components/input/text")):"function"==typeof define&&define.amd?define(["exports","@angular/common","@angular/forms","@angular/core","@wm/core","@wm/components/base","@wm/components/input/text"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.input=e.wm.components.input||{},e.wm.components.input.number={}),e.ng.common,e.ng.forms,e.ng.core,e.wm.core,e.wm.components.base,e.wm.components.input.text)}(this,function(e,t,i,n,a,s,o){"use strict";function r(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var l=r(t),c=r(i),d=r(n),p=r(a),m=r(s);const h=new Map([["autofocus",s.PROP_BOOLEAN],["class",s.PROP_STRING],["datavaluesource",s.PROP_ANY],["datavalue",s.PROP_STRING],["disabled",s.PROP_BOOLEAN],["hint",s.PROP_STRING],["arialabel",s.PROP_STRING],["localefilter",s.PROP_STRING],["minvalue",s.PROP_NUMBER],["maxvalue",s.PROP_NUMBER],["name",s.PROP_STRING],["numberfilter",s.PROP_STRING],["placeholder",{value:"Enter number",...s.PROP_STRING}],["readonly",s.PROP_BOOLEAN],["regexp",s.PROP_STRING],["required",s.PROP_BOOLEAN],["shortcutkey",s.PROP_STRING],["show",{value:!0,...s.PROP_BOOLEAN}],["step",{value:1,...s.PROP_NUMBER}],["tabindex",{value:0,...s.PROP_NUMBER}],["trailingzero",{value:!1,...s.PROP_BOOLEAN}],["updateon",s.PROP_STRING],["inputmode",{value:"natural",...s.PROP_STRING}],["decimalplaces",s.PROP_NUMBER],["conditionalclass",s.PROP_ANY],["conditionalstyle",s.PROP_ANY]]),u={widgetType:"wm-number",hostClass:"app-input-wrapper"};class g extends o.NumberLocale{static{this.initializeProps=(s.register("wm-number",h),void s.registerFormWidget(a.FormWidgetType.NUMBER,new Map(h)))}constructor(e,t,i,n){super(e,u,t,i,n)}ngOnDestroy(){this.inputEl=null,this.ngModel=null,super.ngOnDestroy()}static{this.\u0275fac=d.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:d,type:g,deps:[{token:d.Injector},{token:p.AbstractI18nService},{token:m.TrailingZeroDecimalPipe},{token:"EXPLICIT_CONTEXT",optional:!0}],target:d.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=d.\u0275\u0275ngDeclareComponent({minVersion:"14.0.0",version:"20.3.19",type:g,isStandalone:!0,selector:"[wmNumber]",providers:[s.provideAs(g,i.NG_VALUE_ACCESSOR,!0),s.provideAs(g,i.NG_VALIDATORS,!0),s.provideAsWidgetRef(g)],viewQueries:[{propertyName:"inputEl",first:!0,predicate:["input"],descendants:!0,static:!0},{propertyName:"ngModel",first:!0,predicate:i.NgModel,descendants:!0,static:!0}],usesInheritance:!0,ngImport:d,template:'<input class="form-control app-textbox app-number-input"\n inputmode="decimal"\n focus-target\n [attr.name]="name"\n type="text"\n [ngModel]="displayValue"\n [readonly]="readonly"\n [disabled]="disabled"\n [pattern]="regexp"\n [attr.tabindex]="tabindex"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n [attr.aria-label]="arialabel"\n [autofocus]="autofocus"\n [ngClass]="conditionalclass"\n [ngStyle]="conditionalstyle"\n (ngModelChange)="onModelChange($event)"\n (blur)="handleBlur($event); checkForTrailingZeros($event);"\n (focus)="checkForTrailingZeros($event)"\n (input)="onInputChange($event.target.value)"\n [ngModelOptions]="ngModelOptions"\n [required]="required"\n (keypress)="validateInputEntry($event)"\n (paste)="onPaste($event)"\n (keydown.backspace)="onBackspace($event)"\n (keydown.delete)="onDelete($event)"\n (keydown.enter)="onEnter($event)"\n (keydown.ArrowUp)="onArrowPress($event, \'UP\')"\n (keydown.ArrowDown)="onArrowPress($event, \'DOWN\')"\n #input>\n',dependencies:[{kind:"ngmodule",type:t.CommonModule},{kind:"directive",type:l.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"directive",type:l.NgStyle,selector:"[ngStyle]",inputs:["ngStyle"]},{kind:"ngmodule",type:i.FormsModule},{kind:"directive",type:c.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:c.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:c.RequiredValidator,selector:":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]",inputs:["required"]},{kind:"directive",type:c.PatternValidator,selector:"[pattern][formControlName],[pattern][formControl],[pattern][ngModel]",inputs:["pattern"]},{kind:"directive",type:c.NgModel,selector:"[ngModel]:not([formControlName]):not([formControl])",inputs:["name","disabled","ngModel","ngModelOptions"],outputs:["ngModelChange"],exportAs:["ngModel"]}]})}}d.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:d,type:g,decorators:[{type:n.Component,args:[{standalone:!0,imports:[t.CommonModule,i.FormsModule],selector:"[wmNumber]",providers:[s.provideAs(g,i.NG_VALUE_ACCESSOR,!0),s.provideAs(g,i.NG_VALIDATORS,!0),s.provideAsWidgetRef(g)],template:'<input class="form-control app-textbox app-number-input"\n inputmode="decimal"\n focus-target\n [attr.name]="name"\n type="text"\n [ngModel]="displayValue"\n [readonly]="readonly"\n [disabled]="disabled"\n [pattern]="regexp"\n [attr.tabindex]="tabindex"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n [attr.aria-label]="arialabel"\n [autofocus]="autofocus"\n [ngClass]="conditionalclass"\n [ngStyle]="conditionalstyle"\n (ngModelChange)="onModelChange($event)"\n (blur)="handleBlur($event); checkForTrailingZeros($event);"\n (focus)="checkForTrailingZeros($event)"\n (input)="onInputChange($event.target.value)"\n [ngModelOptions]="ngModelOptions"\n [required]="required"\n (keypress)="validateInputEntry($event)"\n (paste)="onPaste($event)"\n (keydown.backspace)="onBackspace($event)"\n (keydown.delete)="onDelete($event)"\n (keydown.enter)="onEnter($event)"\n (keydown.ArrowUp)="onArrowPress($event, \'UP\')"\n (keydown.ArrowDown)="onArrowPress($event, \'DOWN\')"\n #input>\n'}]}],ctorParameters:()=>[{type:d.Injector},{type:p.AbstractI18nService},{type:m.TrailingZeroDecimalPipe},{type:void 0,decorators:[{type:n.Inject,args:["EXPLICIT_CONTEXT"]},{type:n.Optional}]}],propDecorators:{inputEl:[{type:n.ViewChild,args:["input",{static:!0}]}],ngModel:[{type:n.ViewChild,args:[i.NgModel,{static:!0}]}]}}),e.NumberComponent=g}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common"),require("@angular/forms"),require("@angular/core"),require("@wm/components/base"),require("@wm/core"),require("@wm/components/input/text")):"function"==typeof define&&define.amd?define(["exports","@angular/common","@angular/forms","@angular/core","@wm/components/base","@wm/core","@wm/components/input/text"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.input=e.wm.components.input||{},e.wm.components.input.textarea={}),e.ng.common,e.ng.forms,e.ng.core,e.wm.components.base,e.wm.core,e.wm.components.input.text)}(this,function(e,t,i,n,a,s,o){"use strict";function r(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var l=r(t),c=r(i),d=r(n);const p=new Map([["autofocus",a.PROP_BOOLEAN],["autotrim",{value:!0,...a.PROP_BOOLEAN}],["class",a.PROP_STRING],["datavaluesource",a.PROP_ANY],["datavalue",a.PROP_STRING],["disabled",a.PROP_BOOLEAN],["hint",a.PROP_STRING],["arialabel",a.PROP_STRING],["maxchars",a.PROP_NUMBER],["name",a.PROP_STRING],["placeholder",{value:"Place your text",...a.PROP_STRING}],["readonly",a.PROP_BOOLEAN],["required",a.PROP_BOOLEAN],["shortcutkey",a.PROP_STRING],["show",{value:!0,...a.PROP_BOOLEAN}],["tabindex",{value:0,...a.PROP_NUMBER}],["updateon",a.PROP_STRING],["limitdisplaytext",a.PROP_STRING],["charlength",a.PROP_NUMBER],["conditionalclass",a.PROP_ANY],["conditionalstyle",a.PROP_ANY]]),m={widgetType:"wm-textarea",hostClass:"app-input-wrapper"};class h extends o.BaseInput{static{this.initializeProps=(a.register("wm-textarea",p),void a.registerFormWidget(s.FormWidgetType.TEXTAREA,new Map(p)))}constructor(e,t){super(e,m,t),this.charlength=0}onInputChange(){this.charlength=this.inputEl.nativeElement.value.length}ngAfterViewChecked(){this.charlength=this.inputEl.nativeElement.value.length}ngOnDestroy(){this.inputEl=null,this.ngModel=null,super.ngOnDestroy()}static{this.\u0275fac=d.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:d,type:h,deps:[{token:d.Injector},{token:"EXPLICIT_CONTEXT",optional:!0}],target:d.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=d.\u0275\u0275ngDeclareComponent({minVersion:"17.0.0",version:"20.3.19",type:h,isStandalone:!0,selector:"wm-textarea",providers:[a.provideAs(h,i.NG_VALUE_ACCESSOR,!0),a.provideAs(h,i.NG_VALIDATORS,!0),a.provideAsWidgetRef(h)],viewQueries:[{propertyName:"inputEl",first:!0,predicate:["textarea"],descendants:!0,static:!0},{propertyName:"ngModel",first:!0,predicate:i.NgModel,descendants:!0}],usesInheritance:!0,ngImport:d,template:'<textarea class="form-control app-textarea"\n focus-target\n [attr.name]="name"\n [(ngModel)]="datavalue"\n [ngModelOptions]="ngModelOptions"\n [readonly]="readonly"\n [required]="required"\n [disabled]="disabled"\n [maxlength]="maxchars"\n [attr.tabindex]="tabindex"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n [attr.aria-label]="arialabel"\n aria-multiline="true"\n [autofocus]="autofocus"\n [ngClass]="conditionalclass"\n [ngStyle]="conditionalstyle"\n (blur)="handleBlur($event)"\n (input)="onInputChange()"\n (ngModelChange)="handleChange($event); onInputChange();"\n #textarea\n></textarea>\n\n@if (maxchars) {\n <div class="textarea-count" >{{limitdisplaytext}}</div>\n}\n',dependencies:[{kind:"ngmodule",type:t.CommonModule},{kind:"directive",type:l.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"directive",type:l.NgStyle,selector:"[ngStyle]",inputs:["ngStyle"]},{kind:"ngmodule",type:i.FormsModule},{kind:"directive",type:c.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:c.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:c.RequiredValidator,selector:":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]",inputs:["required"]},{kind:"directive",type:c.MaxLengthValidator,selector:"[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]",inputs:["maxlength"]},{kind:"directive",type:c.NgModel,selector:"[ngModel]:not([formControlName]):not([formControl])",inputs:["name","disabled","ngModel","ngModelOptions"],outputs:["ngModelChange"],exportAs:["ngModel"]}]})}}d.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:d,type:h,decorators:[{type:n.Component,args:[{standalone:!0,imports:[t.CommonModule,i.FormsModule],selector:"wm-textarea",providers:[a.provideAs(h,i.NG_VALUE_ACCESSOR,!0),a.provideAs(h,i.NG_VALIDATORS,!0),a.provideAsWidgetRef(h)],template:'<textarea class="form-control app-textarea"\n focus-target\n [attr.name]="name"\n [(ngModel)]="datavalue"\n [ngModelOptions]="ngModelOptions"\n [readonly]="readonly"\n [required]="required"\n [disabled]="disabled"\n [maxlength]="maxchars"\n [attr.tabindex]="tabindex"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n [attr.aria-label]="arialabel"\n aria-multiline="true"\n [autofocus]="autofocus"\n [ngClass]="conditionalclass"\n [ngStyle]="conditionalstyle"\n (blur)="handleBlur($event)"\n (input)="onInputChange()"\n (ngModelChange)="handleChange($event); onInputChange();"\n #textarea\n></textarea>\n\n@if (maxchars) {\n <div class="textarea-count" >{{limitdisplaytext}}</div>\n}\n'}]}],ctorParameters:()=>[{type:d.Injector},{type:void 0,decorators:[{type:n.Inject,args:["EXPLICIT_CONTEXT"]},{type:n.Optional}]}],propDecorators:{inputEl:[{type:n.ViewChild,args:["textarea",{static:!0}]}],ngModel:[{type:n.ViewChild,args:[i.NgModel]}]}}),e.TextareaComponent=h}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common"),require("@angular/core"),require("@wm/core"),require("@wm/components/base")):"function"==typeof define&&define.amd?define(["exports","@angular/common","@angular/core","@wm/core","@wm/components/base"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.basic=e.wm.components.basic||{},e.wm.components.basic.anchor={}),e.ng.common,e.ng.core,e.wm.core,e.wm.components.base)}(this,function(e,t,i,n,a){"use strict";function s(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var o=s(t),r=s(i),l=s(n);const c={widgetType:"wm-anchor",hostClass:"app-anchor",displayType:a.DISPLAY_TYPE.INLINE_BLOCK},d=/Actions.goToPage_(\w+)\.invoke\(\)/g,p=e=>{e.preventDefault()};class m extends a.StylableComponent{static{this.initializeProps=void a.register("wm-anchor",new Map([["animation",a.PROP_STRING],["badgevalue",a.PROP_STRING],["caption",{value:"Link",...a.PROP_STRING}],["class",a.PROP_STRING],["conditionalclass",a.PROP_ANY],["conditionalstyle",a.PROP_ANY],["encodeurl",a.PROP_BOOLEAN],["hint",a.PROP_STRING],["arialabel",a.PROP_STRING],["hyperlink",{value:"",...a.PROP_STRING}],["iconclass",a.PROP_STRING],["iconheight",a.PROP_STRING],["iconmargin",a.PROP_STRING],["iconposition",a.PROP_STRING],["iconurl",a.PROP_STRING],["iconwidth",a.PROP_STRING],["name",a.PROP_STRING],["shortcutkey",a.PROP_STRING],["show",{value:!0,...a.PROP_BOOLEAN}],["tabindex",{value:0,...a.PROP_NUMBER}],["target",{value:"_self",...a.PROP_STRING}]]))}constructor(e,t,i){super(e,c,i),this.app=t,this._eventNotifier=new n.EventNotifier,a.styler(this.nativeElement,this)}processEventAttr(e,t,i){if(super.processEventAttr(e,t,i),!this.hasNavigationToCurrentPageExpr){const e=this.inj.get(n.App);t.split(";").map(Function.prototype.call,String.prototype.trim).some(t=>{d.lastIndex=0;const i=d.exec(t),n=i&&i.length>0;return n&&!this.hasGoToPageExpr&&(this.hasGoToPageExpr=!0,this.goToPageName=i[1]),n&&i[1]===e.activePageName})&&(this.hasNavigationToCurrentPageExpr=!0)}}onActive(e){this._eventNotifier.subscribe("on-active",e)}handleEvent(e,t,i,n,a){super.handleEvent(e,t,e=>{this.hasGoToPageExpr&&n.$event&&n.$event.preventDefault(),i()},n,a)}onPropertyChange(e,t,i){if("hyperlink"===e){if(!t)return n.setAttr(this.nativeElement,"href","javascript:void(0)"),void this.nativeElement.addEventListener("contextmenu",p);this.encodeurl&&(t=n.encodeUrl(t)),t.startsWith("www.")&&(t=`//${t}`),n.setAttr(this.nativeElement,"href",t),this.nativeElement.removeEventListener("contextmenu",p)}else super.onPropertyChange(e,t,i)}init(){this.hasNavigationToCurrentPageExpr&&(n.addClass(this.nativeElement,"active"),n.setAttr(this.nativeElement,"aria-current","page")),(this.hyperlink&&n.getRouteNameFromLink(this.hyperlink)===`/${this.app.activePageName}`||this.hasNavigationToCurrentPageExpr)&&this._eventNotifier.notify("on-active",{})}ngAfterViewInit(){super.ngAfterViewInit(),this.init(),this.hasGoToPageExpr&&(this.cancelSubscription&&(this.cancelSubscription(),this.cancelSubscription=null),this.cancelSubscription=this.app.subscribe("highlightActiveLink",e=>{this.hasNavigationToCurrentPageExpr&&this.goToPageName!==this.app.activePageName&&(this.hasNavigationToCurrentPageExpr=!1,n.removeClass(this.nativeElement,"active"),n.removeAttr(this.nativeElement,"aria-current")),this.goToPageName===e.pageName&&(this.hasNavigationToCurrentPageExpr=!0,n.addClass(this.nativeElement,"active"),n.setAttr(this.nativeElement,"aria-current","page"))}))}ngOnAttach(){this.init(),super.ngOnAttach()}ngOnDestroy(){this.cancelSubscription&&(this.cancelSubscription(),this.cancelSubscription=null),this._eventNotifier.destroy(),this.nativeElement&&this.nativeElement.removeEventListener("contextmenu",p),super.ngOnDestroy()}static{this.\u0275fac=r.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:r,type:m,deps:[{token:r.Injector},{token:l.App},{token:"EXPLICIT_CONTEXT",optional:!0}],target:r.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=r.\u0275\u0275ngDeclareComponent({minVersion:"17.0.0",version:"20.3.19",type:m,isStandalone:!0,selector:"a[wmAnchor]",host:{properties:{target:"this.target","attr.accesskey":"this.shortcutkey","attr.icon-position":"this.iconposition"}},providers:[a.provideAsWidgetRef(m)],exportAs:["wmAnchor"],usesInheritance:!0,ngImport:r,template:'@if (iconurl) {\n <img data-identifier="img" alt="Image" class="anchor-image-icon" [src]="iconurl | image" [ngStyle]="{width:iconwidth, height:iconheight, margin:iconmargin}"/>\n}\n@if (iconclass) {\n <i class="app-icon {{iconclass}}" aria-hidden="true" [ngStyle]="{width:iconwidth, height:iconheight, margin:iconmargin}"></i>\n}\n@if (iconclass) {\n <span class="sr-only">{{caption}} {{appLocale.LABEL_ICON}}</span>\n}\n<span class="anchor-caption" [innerHTML]="caption"></span>\n<ng-content select=".caret"></ng-content>\n@if (badgevalue) {\n <span class="badge pull-right" [textContent]="badgevalue"></span>\n}\n',dependencies:[{kind:"ngmodule",type:t.CommonModule},{kind:"directive",type:o.NgStyle,selector:"[ngStyle]",inputs:["ngStyle"]},{kind:"directive",type:a.TextContentDirective,selector:"[textContent]",inputs:["textContent"]},{kind:"pipe",type:a.ImagePipe,name:"image"}]})}}r.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:r,type:m,decorators:[{type:i.Component,args:[{standalone:!0,imports:[t.CommonModule,a.ImagePipe,a.TextContentDirective],selector:"a[wmAnchor]",providers:[a.provideAsWidgetRef(m)],exportAs:"wmAnchor",template:'@if (iconurl) {\n <img data-identifier="img" alt="Image" class="anchor-image-icon" [src]="iconurl | image" [ngStyle]="{width:iconwidth, height:iconheight, margin:iconmargin}"/>\n}\n@if (iconclass) {\n <i class="app-icon {{iconclass}}" aria-hidden="true" [ngStyle]="{width:iconwidth, height:iconheight, margin:iconmargin}"></i>\n}\n@if (iconclass) {\n <span class="sr-only">{{caption}} {{appLocale.LABEL_ICON}}</span>\n}\n<span class="anchor-caption" [innerHTML]="caption"></span>\n<ng-content select=".caret"></ng-content>\n@if (badgevalue) {\n <span class="badge pull-right" [textContent]="badgevalue"></span>\n}\n'}]}],ctorParameters:()=>[{type:r.Injector},{type:l.App},{type:void 0,decorators:[{type:i.Inject,args:["EXPLICIT_CONTEXT"]},{type:i.Optional}]}],propDecorators:{target:[{type:i.HostBinding,args:["target"]}],shortcutkey:[{type:i.HostBinding,args:["attr.accesskey"]}],iconposition:[{type:i.HostBinding,args:["attr.icon-position"]}]}}),e.AnchorComponent=m,e.disableContextMenu=p}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@wm/components/base")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@wm/components/base"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.basic=e.wm.components.basic||{},e.wm.components.basic.audio={}),e.ng.core,e.wm.components.base)}(this,function(e,t,i){"use strict";var n,a,s=(n=t,a=Object.create(null),n&&Object.keys(n).forEach(function(e){if("default"!==e){var t=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(a,e,t.get?t:{enumerable:!0,get:function(){return n[e]}})}}),a.default=n,Object.freeze(a));const o={widgetType:"wm-audio",hostClass:"app-audio",displayType:i.DISPLAY_TYPE.INLINE_BLOCK};class r extends i.StylableComponent{static{this.initializeProps=void i.register("wm-audio",new Map([["audiopreload",{value:"none",...i.PROP_STRING}],["audiosupportmessage",{value:"Your browser does not support the audio tag.",...i.PROP_STRING}],["autoplay",i.PROP_BOOLEAN],["class",i.PROP_STRING],["controls",i.PROP_BOOLEAN],["hint",i.PROP_STRING],["arialabel",i.PROP_STRING],["loop",i.PROP_BOOLEAN],["mp3format",i.PROP_STRING],["muted",i.PROP_BOOLEAN],["name",i.PROP_STRING],["show",{value:!0,...i.PROP_BOOLEAN}],["tabindex",{value:0,...i.PROP_NUMBER}]]))}constructor(e,t){super(e,o,t),i.styler(this.nativeElement,this)}onPropertyChange(e,t,i){"tabindex"!==e&&super.onPropertyChange(e,t,i)}static{this.\u0275fac=s.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:s,type:r,deps:[{token:s.Injector},{token:"EXPLICIT_CONTEXT",optional:!0}],target:s.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=s.\u0275\u0275ngDeclareComponent({minVersion:"14.0.0",version:"20.3.19",type:r,isStandalone:!0,selector:"[wmAudio]",providers:[i.provideAsWidgetRef(r)],usesInheritance:!0,ngImport:s,template:'<audio [attr.aria-label]="arialabel || \'Audio\'" [attr.hint]="hint" [autoplay]="autoplay"\n [controls]="controls" [loop]="loop" [muted]="muted" [preload]="audiopreload" [src]="mp3format | trustAs: \'resource\'"\n name="wmAudio" [tabindex]="tabindex">\n <source type="audio/mp3" [src]="mp3format | trustAs: \'resource\'">\n {{audiosupportmessage}}\n</audio>\n',dependencies:[{kind:"pipe",type:i.TrustAsPipe,name:"trustAs"}]})}}s.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:s,type:r,decorators:[{type:t.Component,args:[{standalone:!0,imports:[i.TrustAsPipe],selector:"[wmAudio]",providers:[i.provideAsWidgetRef(r)],template:'<audio [attr.aria-label]="arialabel || \'Audio\'" [attr.hint]="hint" [autoplay]="autoplay"\n [controls]="controls" [loop]="loop" [muted]="muted" [preload]="audiopreload" [src]="mp3format | trustAs: \'resource\'"\n name="wmAudio" [tabindex]="tabindex">\n <source type="audio/mp3" [src]="mp3format | trustAs: \'resource\'">\n {{audiosupportmessage}}\n</audio>\n'}]}],ctorParameters:()=>[{type:s.Injector},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}]}),e.AudioComponent=r}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@wm/core"),require("@wm/components/base")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@wm/core","@wm/components/base"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.basic=e.wm.components.basic||{},e.wm.components.basic.html={}),e.ng.core,e.wm.core,e.wm.components.base)}(this,function(e,t,i,n){"use strict";function a(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var s=a(t),o=a(n);const r={widgetType:"wm-html",hostClass:"app-html-container"};class l extends n.StylableComponent{static{this.initializeProps=void n.register("wm-html",new Map([["class",n.PROP_STRING],["content",n.PROP_STRING],["hint",n.PROP_STRING],["arialabel",n.PROP_STRING],["name",n.PROP_STRING],["show",{value:!0,...n.PROP_BOOLEAN}]]))}constructor(e,t,a,s,o){super(e,r,o),this.boundContent=a,this.sanitizePipe=s,t&&i.setCSS(this.nativeElement,"overflow","auto"),n.styler(this.nativeElement,this)}ngOnInit(){super.ngOnInit(),this.boundContent&&(this.nativeElement.innerHTML=""),!this.content&&this.nativeElement.innerHTML&&(this.content=this.nativeElement.innerHTML)}onPropertyChange(e,n,a){if(!this.isDestroyed)if("content"===e){let e=this.nativeElement.getAttribute("content.bind"),a=!!e&&(n&&e.includes("trustAs:"));"object"==typeof n&&a?i.setProperty(this.nativeElement,"innerHTML",n[Object.keys(n)[0]]):this.sanitizePipe?i.setProperty(this.nativeElement,"innerHTML",this.sanitizePipe.transform(n,t.SecurityContext.HTML)):i.setProperty(this.nativeElement,"textContent",n)}else super.onPropertyChange(e,n,a)}static{this.\u0275fac=s.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:s,type:l,deps:[{token:s.Injector},{token:"height",attribute:!0},{token:"content.bind",attribute:!0},{token:o.SanitizePipe},{token:"EXPLICIT_CONTEXT",optional:!0}],target:s.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=s.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:l,isStandalone:!0,selector:"[wmHtml]",providers:[n.provideAsWidgetRef(l)],exportAs:["wmHtml"],usesInheritance:!0,ngImport:s})}}s.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:s,type:l,decorators:[{type:t.Directive,args:[{standalone:!0,selector:"[wmHtml]",providers:[n.provideAsWidgetRef(l)],exportAs:"wmHtml"}]}],ctorParameters:()=>[{type:s.Injector},{type:void 0,decorators:[{type:t.Attribute,args:["height"]}]},{type:void 0,decorators:[{type:t.Attribute,args:["content.bind"]}]},{type:o.SanitizePipe},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}]}),e.HtmlDirective=l}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@wm/components/base")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@wm/components/base"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.basic=e.wm.components.basic||{},e.wm.components.basic.icon={}),e.ng.core,e.wm.components.base)}(this,function(e,t,i){"use strict";var n,a,s=(n=t,a=Object.create(null),n&&Object.keys(n).forEach(function(e){if("default"!==e){var t=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(a,e,t.get?t:{enumerable:!0,get:function(){return n[e]}})}}),a.default=n,Object.freeze(a));const o={widgetType:"wm-icon",hostClass:"app-icon-wrapper"};class r extends i.StylableComponent{static{this.initializeProps=void i.register("wm-icon",new Map([["animation",i.PROP_STRING],["caption",i.PROP_STRING],["class",i.PROP_STRING],["conditionalclass",i.PROP_ANY],["conditionalstyle",i.PROP_ANY],["hint",i.PROP_STRING],["arialabel",i.PROP_STRING],["iconclass",{value:"wm-sl-l sl-user",...i.PROP_STRING}],["iconposition",{value:"left",...i.PROP_STRING}],["iconsize",i.PROP_STRING],["iconurl",i.PROP_STRING],["name",i.PROP_STRING],["show",{value:!0,...i.PROP_BOOLEAN}]]))}constructor(e,t){super(e,o,t),i.styler(this.nativeElement,this)}static{this.\u0275fac=s.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:s,type:r,deps:[{token:s.Injector},{token:"EXPLICIT_CONTEXT",optional:!0}],target:s.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=s.\u0275\u0275ngDeclareComponent({minVersion:"17.0.0",version:"20.3.19",type:r,isStandalone:!0,selector:"[wmIcon]",host:{properties:{"attr.icon-position":"this.iconposition","style.fontSize":"this.iconsize"}},providers:[i.provideAsWidgetRef(r)],usesInheritance:!0,ngImport:s,template:'<i class="app-icon {{iconclass}}"></i>\n@if (iconclass) {\n <span class="sr-only">{{ arialabel || caption || appLocale.LABEL_ICON }}</span>\n}\n@if (caption) {\n <label [textContent]="caption" aria-hidden="true" class="app-label"></label>\n}\n',dependencies:[{kind:"directive",type:i.TextContentDirective,selector:"[textContent]",inputs:["textContent"]}]})}}s.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:s,type:r,decorators:[{type:t.Component,args:[{standalone:!0,imports:[i.TextContentDirective],selector:"[wmIcon]",providers:[i.provideAsWidgetRef(r)],template:'<i class="app-icon {{iconclass}}"></i>\n@if (iconclass) {\n <span class="sr-only">{{ arialabel || caption || appLocale.LABEL_ICON }}</span>\n}\n@if (caption) {\n <label [textContent]="caption" aria-hidden="true" class="app-label"></label>\n}\n'}]}],ctorParameters:()=>[{type:s.Injector},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}],propDecorators:{iconposition:[{type:t.HostBinding,args:["attr.icon-position"]}],iconsize:[{type:t.HostBinding,args:["style.fontSize"]}]}}),e.IconComponent=r}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@wm/components/base"),require("@angular/core"),require("@wm/core")):"function"==typeof define&&define.amd?define(["exports","@wm/components/base","@angular/core","@wm/core"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.basic=e.wm.components.basic||{},e.wm.components.basic.iframe={}),e.wm.components.base,e.ng.core,e.wm.core)}(this,function(e,t,i,n){"use strict";function a(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var s=a(t),o=a(i);const r={widgetType:"wm-iframe",hostClass:"embed-responsive app-iframe"};class l extends t.StylableComponent{static{this.initializeProps=void t.register("wm-iframe",new Map([["class",t.PROP_STRING],["encodeurl",t.PROP_BOOLEAN],["height",{value:"150px",...t.PROP_STRING}],["iframesrc",t.PROP_STRING],["name",t.PROP_STRING],["show",{value:!0,...t.PROP_BOOLEAN}],["width",{value:"300px",...t.PROP_STRING}],["hint",t.PROP_STRING],["arialabel",t.PROP_STRING]]))}constructor(e,i,n){super(e,r,n),this.trustAsPipe=i,this.showContentLoadError=!1,t.styler(this.nativeElement,this)}computeIframeSrc(){if(this.showContentLoadError=!1,this._iframesrc=void 0,this.iframesrc){let e=this.iframesrc;this.encodeurl&&(e=n.encodeUrl(this.iframesrc));const t=this.trustAsPipe.transform(e,i.SecurityContext.RESOURCE_URL);n.isInsecureContentRequest(e)&&(this.showContentLoadError=!0,this.errorMsg=`${this.appLocale.MESSAGE_ERROR_CONTENT_DISPLAY} ${this.iframesrc}`,this.hintMsg=this.errorMsg),this._iframesrc=t}}onPropertyChange(e,t,i){"iframesrc"===e||"encodeurl"===e?this.computeIframeSrc():super.onPropertyChange(e,t,i)}static{this.\u0275fac=o.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:o,type:l,deps:[{token:o.Injector},{token:s.TrustAsPipe},{token:"EXPLICIT_CONTEXT",optional:!0}],target:o.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=o.\u0275\u0275ngDeclareComponent({minVersion:"17.0.0",version:"20.3.19",type:l,isStandalone:!0,selector:"[wmIframe]",providers:[t.provideAsWidgetRef(l)],usesInheritance:!0,ngImport:o,template:'<iframe class="embed-responsive-item iframe-content" role="document"\n scrolling="auto"\n marginheight="0"\n marginwidth="0"\n frameborder="0"\n [name]="name"\n [attr.src]="_iframesrc"\n [attr.aria-label]="arialabel || \'iframe\'"\n seamless="seamless">\n</iframe>\n@if (showContentLoadError) {\n <div class="wm-content-info readonly-wrapper">\n <p class="wm-message" [title]="hintMsg" [textContent]="errMsg"></p>\n </div>\n}\n',dependencies:[{kind:"directive",type:t.TextContentDirective,selector:"[textContent]",inputs:["textContent"]}]})}}o.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:o,type:l,decorators:[{type:i.Component,args:[{standalone:!0,imports:[t.TextContentDirective],selector:"[wmIframe]",providers:[t.provideAsWidgetRef(l)],template:'<iframe class="embed-responsive-item iframe-content" role="document"\n scrolling="auto"\n marginheight="0"\n marginwidth="0"\n frameborder="0"\n [name]="name"\n [attr.src]="_iframesrc"\n [attr.aria-label]="arialabel || \'iframe\'"\n seamless="seamless">\n</iframe>\n@if (showContentLoadError) {\n <div class="wm-content-info readonly-wrapper">\n <p class="wm-message" [title]="hintMsg" [textContent]="errMsg"></p>\n </div>\n}\n'}]}],ctorParameters:()=>[{type:o.Injector},{type:s.TrustAsPipe},{type:void 0,decorators:[{type:i.Inject,args:["EXPLICIT_CONTEXT"]},{type:i.Optional}]}]}),e.IframeComponent=l}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@wm/core"),require("@wm/components/base"),require("lodash-es")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@wm/core","@wm/components/base","lodash-es"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.basic=e.wm.components.basic||{},e.wm.components.basic.label={}),e.ng.core,e.wm.core,e.wm.components.base,e._)}(this,function(e,t,i,n,a){"use strict";function s(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var o=s(t),r=s(n);const l={widgetType:"wm-label",hostClass:"app-label",displayType:n.DISPLAY_TYPE.INLINE_BLOCK};class c extends n.StylableComponent{static{this.initializeProps=void n.register("wm-label",new Map([["animation",n.PROP_STRING],["caption",{value:"Label",...n.PROP_STRING}],["class",n.PROP_STRING],["conditionalclass",n.PROP_ANY],["conditionalstyle",n.PROP_ANY],["type",n.PROP_STRING],["notag",n.PROP_BOOLEAN],["hint",n.PROP_STRING],["name",n.PROP_STRING],["required",n.PROP_BOOLEAN],["show",{value:!0,...n.PROP_BOOLEAN}]]))}constructor(e,t,i){super(e,l,i),this.sanitizePipe=t,n.styler(this.nativeElement,this)}onPropertyChange(e,n,s){if(!this.isDestroyed)if("caption"===e){let e=this.nativeElement.getAttribute("caption.bind"),s=!!e&&(n&&e.includes("trustAs:"));const o=e=>"string"!=typeof e?e:e.replace(/\d{5,}/g,e=>e.replace(/(.{9})(?=.)/g,"$1\u200b"));a.isObject(n)&&!s?i.setProperty(this.nativeElement,"textContent",JSON.stringify(n)):a.isObject(n)&&s?i.setProperty(this.nativeElement,"innerHTML",n[Object.keys(n)[0]]):this.sanitizePipe?i.setProperty(this.nativeElement,"innerHTML",this.sanitizePipe.transform(o(n),t.SecurityContext.HTML)):i.setProperty(this.nativeElement,"textContent",o(n))}else"required"===e?i.toggleClass(this.nativeElement,"required",n):super.onPropertyChange(e,n,s)}ngOnDestroy(){super.ngOnDestroy(),this.sanitizePipe=null}static{this.\u0275fac=o.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:o,type:c,deps:[{token:o.Injector},{token:r.SanitizePipe},{token:"EXPLICIT_CONTEXT",optional:!0}],target:o.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=o.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:c,isStandalone:!0,selector:"[wmLabel]",providers:[n.provideAsWidgetRef(c)],exportAs:["wmLabel"],usesInheritance:!0,ngImport:o})}}o.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:o,type:c,decorators:[{type:t.Directive,args:[{standalone:!0,selector:"[wmLabel]",providers:[n.provideAsWidgetRef(c)],exportAs:"wmLabel"}]}],ctorParameters:()=>[{type:o.Injector},{type:r.SanitizePipe},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}]}),e.LabelDirective=c}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@wm/core"),require("@wm/components/base")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@wm/core","@wm/components/base"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.basic=e.wm.components.basic||{},e.wm.components.basic.picture={}),e.ng.core,e.wm.core,e.wm.components.base)}(this,function(e,t,i,n){"use strict";function a(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var s=a(t),o=a(n);const r={widgetType:"wm-picture",hostClass:"app-picture",displayType:n.DISPLAY_TYPE.INLINE_BLOCK};class l extends n.StylableComponent{static{this.initializeProps=(()=>{const e=new Map([["animation",n.PROP_STRING],["class",n.PROP_STRING],["conditionalclass",n.PROP_ANY],["conditionalstyle",n.PROP_ANY],["encodeurl",n.PROP_STRING],["hint",n.PROP_STRING],["arialabel",n.PROP_STRING],["name",n.PROP_STRING],["pictureaspect",{value:"None",...n.PROP_STRING}],["alttext",{value:"Image alt text not provided",...n.PROP_STRING}],["pictureplaceholder",n.PROP_STRING],["picturesource",n.PROP_STRING],["resizemode",{value:"fill",...n.PROP_STRING}],["shape",n.PROP_STRING],["show",{value:!0,...n.PROP_BOOLEAN}],["tabindex",{value:0,...n.PROP_NUMBER}]]);n.register("wm-picture",e)})()}constructor(e,t,i){super(e,r,i),this.imagePipe=t,n.styler(this.nativeElement,this)}setImgSource(){this.imgSource=this.imagePipe.transform(this.picturesource,this.encodeurl,this.pictureplaceholder)}onPropertyChange(e,t,n){if("pictureaspect"===e){let e="",n="";switch(t){case"None":e=this.width,n=this.height;break;case"H":e="100%";break;case"V":n="100%";break;case"Both":e="100%",n="100%"}i.setCSS(this.nativeElement,"width",e,!0),i.setCSS(this.nativeElement,"height",n,!0)}else"encodeurl"===e||"pictureplaceholder"===e?this.setImgSource():"shape"===e?i.switchClass(this.nativeElement,`img-${t}`,`img-${n}`):"resizemode"===e&&i.setCSS(this.nativeElement,"object-fit",t);super.onPropertyChange(e,t,n)}onStyleChange(e,t,i){"picturesource"===e?this.setImgSource():super.onStyleChange(e,t,i)}ngOnInit(){this.setImgSource(),super.ngOnInit()}static{this.\u0275fac=s.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:s,type:l,deps:[{token:s.Injector},{token:o.ImagePipe},{token:"EXPLICIT_CONTEXT",optional:!0}],target:s.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=s.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:l,isStandalone:!0,selector:"img[wmPicture]",host:{properties:{src:"this.imgSource"}},providers:[n.provideAsWidgetRef(l)],exportAs:["wmPicture"],usesInheritance:!0,ngImport:s})}}s.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:s,type:l,decorators:[{type:t.Directive,args:[{standalone:!0,selector:"img[wmPicture]",providers:[n.provideAsWidgetRef(l)],exportAs:"wmPicture"}]}],ctorParameters:()=>[{type:s.Injector},{type:o.ImagePipe},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}],propDecorators:{imgSource:[{type:t.HostBinding,args:["src"]}]}}),e.PictureDirective=l}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common"),require("@wm/components/base"),require("@angular/core"),require("@wm/core"),require("lodash-es")):"function"==typeof define&&define.amd?define(["exports","@angular/common","@wm/components/base","@angular/core","@wm/core","lodash-es"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.basic=e.wm.components.basic||{},e.wm.components.basic.spinner={}),e.ng.common,e.wm.components.base,e.ng.core,e.wm.core,e._)}(this,function(e,t,i,n,a,s){"use strict";function o(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var r=o(t),l=o(i),c=o(n);const d={widgetType:"wm-spinner",hostClass:"app-spinner"};class p extends i.StylableComponent{static{this.initializeProps=void i.register("wm-spinner",new Map([["animation",{value:"spin",PROP_STRING:i.PROP_STRING}],["caption",{value:"Loading...",...i.PROP_STRING}],["class",i.PROP_STRING],["iconclass",{value:"fa fa-circle-o-notch fa-spin",...i.PROP_STRING}],["iconsize",i.PROP_STRING],["image",i.PROP_STRING],["imageheight",i.PROP_STRING],["imagewidth",{value:"20px",...i.PROP_STRING}],["name",i.PROP_STRING],["show",{value:!0,...i.PROP_BOOLEAN}],["type",{value:"icon",...i.PROP_STRING}],["servicevariabletotrack",i.PROP_STRING],["hint",i.PROP_STRING],["arialabel",i.PROP_STRING]]))}get spinnerMessages(){return this._spinnerMessages}set spinnerMessages(e){this.showCaption=s.isEmpty(e),this._spinnerMessages=e}listenOnDataSource(){const e=s.split(this.servicevariabletotrack,",");this.toggleVariableStateSubscription=this.getAppInstance().subscribe("toggle-variable-state",t=>{const i=t.variable.execute(a.DataSource.Operation.GET_NAME);s.includes(e,i)&&a.validateDataSourceCtx(t.variable,this.getViewParent())&&(this.widget.show=t.active)})}constructor(e,t,n){super(e,d,n),this.imagePipe=t,this.iconclass="",this.animation="",this.showCaption=!0,i.styler(this.nativeElement,this)}onPropertyChange(e,t,i){"image"===e?this.picture=this.imagePipe.transform(t):"animation"===e?this.animation="spin"===t?"fa-spin":t||"":super.onPropertyChange(e,t,i)}ngOnInit(){super.ngOnInit(),this.servicevariabletotrack&&(this.widget.show=!1,this.listenOnDataSource())}ngOnDestroy(){this.toggleVariableStateSubscription&&(this.toggleVariableStateSubscription(),this.toggleVariableStateSubscription=null),super.ngOnDestroy()}static{this.\u0275fac=c.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:c,type:p,deps:[{token:c.Injector},{token:l.ImagePipe},{token:"EXPLICIT_CONTEXT",optional:!0}],target:c.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=c.\u0275\u0275ngDeclareComponent({minVersion:"17.0.0",version:"20.3.19",type:p,isStandalone:!0,selector:"[wmSpinner]",providers:[i.provideAsWidgetRef(p)],exportAs:["wmSpinner"],usesInheritance:!0,ngImport:c,template:'<div class="spinner-message">\n @if (type === \'image\') {\n <span class="spinner-image animated infinite" [ngClass]="animation" aria-hidden="true"\n [ngStyle]="{width: imagewidth, height: imageheight, backgroundImage: \'url(\' + picture + \')\', backgroundSize: imagewidth}"\n ></span>\n }\n @if (type === \'icon\') {\n <i class="spinner-image animated infinite" aria-hidden="true" [ngClass]="[iconclass, animation]" [style.fonSize]="iconsize"></i>\n }\n @if (showCaption) {\n <span class="spinner-text" [innerHTML]="caption"></span>\n }\n @if (!showCaption && spinnerMessages) {\n <div class="spinner-messages">\n @for (value of spinnerMessages; track value) {\n <p [textContent]="value"></p>\n }\n </div>\n }\n</div>\n',dependencies:[{kind:"ngmodule",type:t.CommonModule},{kind:"directive",type:r.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"directive",type:r.NgStyle,selector:"[ngStyle]",inputs:["ngStyle"]},{kind:"directive",type:i.TextContentDirective,selector:"[textContent]",inputs:["textContent"]}]})}}c.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:c,type:p,decorators:[{type:n.Component,args:[{standalone:!0,imports:[t.CommonModule,i.TextContentDirective],selector:"[wmSpinner]",providers:[i.provideAsWidgetRef(p)],exportAs:"wmSpinner",template:'<div class="spinner-message">\n @if (type === \'image\') {\n <span class="spinner-image animated infinite" [ngClass]="animation" aria-hidden="true"\n [ngStyle]="{width: imagewidth, height: imageheight, backgroundImage: \'url(\' + picture + \')\', backgroundSize: imagewidth}"\n ></span>\n }\n @if (type === \'icon\') {\n <i class="spinner-image animated infinite" aria-hidden="true" [ngClass]="[iconclass, animation]" [style.fonSize]="iconsize"></i>\n }\n @if (showCaption) {\n <span class="spinner-text" [innerHTML]="caption"></span>\n }\n @if (!showCaption && spinnerMessages) {\n <div class="spinner-messages">\n @for (value of spinnerMessages; track value) {\n <p [textContent]="value"></p>\n }\n </div>\n }\n</div>\n'}]}],ctorParameters:()=>[{type:c.Injector},{type:l.ImagePipe},{type:void 0,decorators:[{type:n.Inject,args:["EXPLICIT_CONTEXT"]},{type:n.Optional}]}]}),e.SpinnerComponent=p}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@wm/core"),require("@wm/components/base")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@wm/core","@wm/components/base"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.basic=e.wm.components.basic||{},e.wm.components.basic.video={}),e.ng.core,e.wm.core,e.wm.components.base)}(this,function(e,t,i,n){"use strict";function a(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var s=a(t),o=a(n);const r={widgetType:"wm-video",hostClass:"app-video",displayType:n.DISPLAY_TYPE.INLINE_BLOCK};class l extends n.StylableComponent{static{this.initializeProps=void n.register("wm-video",new Map([["autoplay",n.PROP_BOOLEAN],["class",n.PROP_STRING],["controls",n.PROP_BOOLEAN],["hint",n.PROP_STRING],["arialabel",n.PROP_STRING],["loop",n.PROP_BOOLEAN],["mp4format",n.PROP_STRING],["muted",n.PROP_BOOLEAN],["name",n.PROP_STRING],["oggformat",n.PROP_STRING],["show",{value:!0,...n.PROP_BOOLEAN}],["subtitlelang",{value:"en",...n.PROP_STRING}],["subtitlesource",n.PROP_STRING],["tabindex",{value:0,...n.PROP_NUMBER}],["videoposter",{value:"resources/images/imagelists/default-image.png",...n.PROP_STRING}],["videopreload",{value:"none",...n.PROP_STRING}],["videosupportmessage",{value:"Your browser does not support the video tag.",...n.PROP_STRING}],["webmformat",n.PROP_STRING]]))}constructor(e,t,i){super(e,r,i),this.trustAsPipe=t,this.subtitlelang="en",n.styler(this.nativeElement,this)}onPropertyChange(e,n,a){if("subtitlesource"===e){let e=this.nativeElement.querySelector("track");e&&i.removeNode(e,!0),e=i.createElement("track",{kind:"subtitles",label:this.subtitlelang,srclang:this.subtitlelang,src:this.trustAsPipe.transform(n,t.SecurityContext.RESOURCE_URL),default:""},!0),i.appendNode(e,this.nativeElement.querySelector("video"))}else if("mp4format"===e)this.mp4format=i.transformFileURI(n);else if("webmformat"===e)this.webmformat=i.transformFileURI(n);else if("oggformat"===e)this.oggformat=i.transformFileURI(n);else if("tabindex"===e)return;super.onPropertyChange(e,n,a)}static{this.\u0275fac=s.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:s,type:l,deps:[{token:s.Injector},{token:o.TrustAsPipe},{token:"EXPLICIT_CONTEXT",optional:!0}],target:s.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=s.\u0275\u0275ngDeclareComponent({minVersion:"17.0.0",version:"20.3.19",type:l,isStandalone:!0,selector:"[wmVideo]",providers:[n.provideAsWidgetRef(l)],usesInheritance:!0,ngImport:s,template:'<video [attr.aria-label]="arialabel || \'video\'" [preload]="videopreload"\n [src]="mp4format | trustAs: \'resource\'"\n [muted]="muted"\n [poster]="videoposter | image"\n [controls]="controls"\n [loop]="loop"\n [autoplay]="autoplay" [tabindex]="tabindex">\n @if (mp4format) {\n <source type="video/mp4" [src]="mp4format | trustAs: \'resource\'">\n }\n @if (webmformat) {\n <source type="video/webm" [src]="webmformat | trustAs: \'resource\'">\n }\n @if (oggformat) {\n <source type="video/ogg" [src]="oggformat | trustAs: \'resource\'">\n }\n {{videosupportmessage}}\n</video>\n',dependencies:[{kind:"pipe",type:n.TrustAsPipe,name:"trustAs"},{kind:"pipe",type:n.ImagePipe,name:"image"}]})}}s.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:s,type:l,decorators:[{type:t.Component,args:[{standalone:!0,imports:[n.TrustAsPipe,n.ImagePipe],selector:"[wmVideo]",providers:[n.provideAsWidgetRef(l)],template:'<video [attr.aria-label]="arialabel || \'video\'" [preload]="videopreload"\n [src]="mp4format | trustAs: \'resource\'"\n [muted]="muted"\n [poster]="videoposter | image"\n [controls]="controls"\n [loop]="loop"\n [autoplay]="autoplay" [tabindex]="tabindex">\n @if (mp4format) {\n <source type="video/mp4" [src]="mp4format | trustAs: \'resource\'">\n }\n @if (webmformat) {\n <source type="video/webm" [src]="webmformat | trustAs: \'resource\'">\n }\n @if (oggformat) {\n <source type="video/ogg" [src]="oggformat | trustAs: \'resource\'">\n }\n {{videosupportmessage}}\n</video>\n'}]}],ctorParameters:()=>[{type:s.Injector},{type:o.TrustAsPipe},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}]}),e.VideoComponent=l}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("lodash-es")):"function"==typeof define&&define.amd?define(["exports","lodash-es"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.basic=e.wm.components.basic||{},e.wm.components.basic.progress=e.wm.components.basic.progress||{},e.wm.components.basic.progress.progressUtils={}),e._)}(this,function(e,t){"use strict";e.calculatePercent=(e,i=0,n=0)=>{const a=(e-i)/(n-i)*100;return t.isNaN(a)?(console.warn("Circle Progress Bar: One of the properties Min, Max or datavalue is not a valid number"),0):Math.abs(a)},e.getDecimalCount=e=>{const t=(e=(e=e||"9").replace(/\%$/,"")).lastIndexOf(".");return-1===t?0:e.length-t-1},e.isPercentageValue=e=>!!t.isString(e)&&"%"===(e=e.trim()).charAt(e.length-1)}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@wm/core"),require("@wm/components/base"),require("@wm/components/basic/progress/progress-utils"),require("lodash-es")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@wm/core","@wm/components/base","@wm/components/basic/progress/progress-utils","lodash-es"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.basic=e.wm.components.basic||{},e.wm.components.basic.progress=e.wm.components.basic.progress||{},e.wm.components.basic.progress.progressBar={}),e.ng.core,e.wm.core,e.wm.components.base,e.wm.components.basic.progress.progressUtils,e._)}(this,function(e,t,i,n,a,s){"use strict";var o,r,l=(o=t,r=Object.create(null),o&&Object.keys(o).forEach(function(e){if("default"!==e){var t=Object.getOwnPropertyDescriptor(o,e);Object.defineProperty(r,e,t.get?t:{enumerable:!0,get:function(){return o[e]}})}}),r.default=o,Object.freeze(r));const c={widgetType:"wm-progress-bar",hostClass:"progress app-progress"},d={default:"","default-striped":"progress-bar-striped",success:"progress-bar-success","success-striped":"progress-bar-success progress-bar-striped",info:"progress-bar-info","info-striped":"progress-bar-info progress-bar-striped",warning:"progress-bar-warning","warning-striped":"progress-bar-warning progress-bar-striped",danger:"progress-bar-danger","danger-striped":"progress-bar-danger progress-bar-striped"};class p extends n.StylableComponent{static{this.initializeProps=void n.register("wm-progress-bar",new Map([["captionplacement",{value:"hidden",...n.PROP_STRING}],["class",n.PROP_STRING],["dataset",n.PROP_ANY],["datavalue",n.PROP_STRING],["displayformat",n.PROP_STRING],["hint",n.PROP_STRING],["arialabel",n.PROP_STRING],["maxvalue",{value:100,...n.PROP_NUMBER}],["minvalue",{value:0,...n.PROP_NUMBER}],["name",n.PROP_STRING],["show",{value:!0,...n.PROP_BOOLEAN}],["tabindex",{value:0,...n.PROP_NUMBER}],["type",{value:"default",...n.PROP_STRING}]]))}constructor(e,t,i,a){super(e,c,a),this.data=[{cls:d.default,progressBarWidth:"0%",displayValue:"0"}],this.hasDataset=!(!t&&!i),n.styler(this.nativeElement,this),this._prepareData=s.debounce(()=>this.prepareData(),50)}onTypeChange(){this.hasDataset||this.data[0]&&(this.data[0].cls=d[this.type])}getFormattedDisplayVal(e){const t=this.displayformat||"9";return e=(e=parseFloat(""+e)).toFixed(a.getDecimalCount(t)),t.includes("%")&&(e=`${e}%`),e}prepareData(){if(this.dataset&&s.isArray(this.dataset)&&this.type&&this.datavalue)this.data=this.dataset.map(e=>{const t=i.findValueOf(e,this.datavalue).toString();let n=t;return t&&!t.includes("%")&&(n=`${t}%`),{cls:d[i.findValueOf(e,this.type)],progressBarWidth:n,displayValue:this.getFormattedDisplayVal(t)}});else{let e=0,t=0;if(this.datavalue)if(a.isPercentageValue(this.datavalue)){e=t=this.datavalue||"0%"}else if(i.isDefined(this.datavalue)){const i=+this.maxvalue-+this.minvalue||1;e=t=100*(+this.datavalue-+this.minvalue)/i+"%"}this.data[0].displayValue=this.getFormattedDisplayVal(t),this.data[0].progressBarWidth=e,this.data[0].cls=d[this.type]}}onPropertyChange(e,t,i){if("type"===e)this.onTypeChange();else if("minvalue"===e||"maxvalue"===e||"datavalue"===e||"dataset"===e||"displayformat"===e)this._prepareData();else{if("tabindex"===e)return;super.onPropertyChange(e,t,i)}}static{this.\u0275fac=l.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:l,type:p,deps:[{token:l.Injector},{token:"dataset",attribute:!0},{token:"dataset.bind",attribute:!0},{token:"EXPLICIT_CONTEXT",optional:!0}],target:l.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=l.\u0275\u0275ngDeclareComponent({minVersion:"17.0.0",version:"20.3.19",type:p,isStandalone:!0,selector:"[wmProgressBar]",providers:[n.provideAsWidgetRef(p)],usesInheritance:!0,ngImport:l,template:'@for (bar of data; track bar) {\n <div class="multi-bar progress-bar {{bar.cls}}" [style.width]="bar.progressBarWidth"\n role="progressbar" [attr.aria-valuenow]="datavalue" [attr.aria-valuemin]="minvalue" [attr.aria-valuemax]="maxvalue"\n [attr.aria-label]="arialabel || \'Progress bar\'" [tabindex]="tabindex">\n <span class="app-progress-label" [attr.data-caption-placement]="captionplacement">{{bar.displayValue}}</span>\n </div>\n}\n'})}}l.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:l,type:p,decorators:[{type:t.Component,args:[{standalone:!0,selector:"[wmProgressBar]",providers:[n.provideAsWidgetRef(p)],template:'@for (bar of data; track bar) {\n <div class="multi-bar progress-bar {{bar.cls}}" [style.width]="bar.progressBarWidth"\n role="progressbar" [attr.aria-valuenow]="datavalue" [attr.aria-valuemin]="minvalue" [attr.aria-valuemax]="maxvalue"\n [attr.aria-label]="arialabel || \'Progress bar\'" [tabindex]="tabindex">\n <span class="app-progress-label" [attr.data-caption-placement]="captionplacement">{{bar.displayValue}}</span>\n </div>\n}\n'}]}],ctorParameters:()=>[{type:l.Injector},{type:void 0,decorators:[{type:t.Attribute,args:["dataset"]}]},{type:void 0,decorators:[{type:t.Attribute,args:["dataset.bind"]}]},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}]}),e.ProgressBarComponent=p,e.TYPE_CLASS_MAP=d}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("ng-circle-progress"),require("@angular/core"),require("@wm/components/base"),require("@wm/components/basic/progress/progress-utils"),require("lodash-es")):"function"==typeof define&&define.amd?define(["exports","ng-circle-progress","@angular/core","@wm/components/base","@wm/components/basic/progress/progress-utils","lodash-es"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.basic=e.wm.components.basic||{},e.wm.components.basic.progress=e.wm.components.basic.progress||{},e.wm.components.basic.progress.progressCircle={}),e.ngCircleProgress,e.ng.core,e.wm.components.base,e.wm.components.basic.progress.progressUtils,e._)}(this,function(e,t,i,n,a,s){"use strict";function o(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var r=o(t),l=o(i);const c={widgetType:"wm-progress-circle",hostClass:"progress app-progress circle"},d={responsive:!0,innerStrokeWidth:10,outerStrokeWidth:10,unitsFontSize:"15",space:-10,toFixed:0,maxPercent:100,showSubtitle:!1,clockwise:!0,startFromZero:!1,renderOnClick:!1,innerStrokeColor:"",outerStrokeColor:""},p={default:"",success:"progress-circle-success",info:"progress-circle-info",warning:"progress-circle-warning",danger:"progress-circle-danger"};class m extends n.StylableComponent{static{this.initializeProps=void n.register("wm-progress-circle",new Map([["captionplacement",{value:"inside",...n.PROP_STRING}],["class",n.PROP_STRING],["dataset",n.PROP_ANY],["datavalue",{value:"30",...n.PROP_STRING}],["displayformat",{value:"9%",...n.PROP_STRING}],["hint",n.PROP_STRING],["arialabel",n.PROP_STRING],["maxvalue",{value:100,...n.PROP_NUMBER}],["minvalue",{value:0,...n.PROP_NUMBER}],["name",n.PROP_STRING],["show",{value:!0,...n.PROP_BOOLEAN}],["subtitle",n.PROP_STRING],["tabindex",{value:0,...n.PROP_NUMBER}],["title",n.PROP_STRING],["type",{value:"default",...n.PROP_STRING}]]))}constructor(e,t){super(e,c,t),n.styler(this.nativeElement,this),this.options=s.clone(d),this.redraw=s.debounce(this._redraw,100)}_redraw(){this.circleRef.render();let e=$(this.nativeElement).find("svg text tspan:first");this.displayValue=this.options.showUnits?e?.text()+"%":e?.text()}ngAfterViewInit(){super.ngAfterViewInit(),this.invokeEventCallback("beforerender",{$event:{}}),this.options=Object.assign(this.circleRef.options,this.options)}getDefaultOptions(){return this.options}getLib(){return"ng-circle-progress"}overrideDefaults(e){s.extend(this.options,e)}updateDisplayValueFormat(){this.options.showTitle=this.options.showSubtitle="inside"===this.captionplacement,this.options.showUnits=!this.title&&this.options.showTitle&&a.isPercentageValue(this.displayformat),this.options.toFixed=a.getDecimalCount(this.displayformat),this.options.showTitle&&(this.options.title=this.title||"auto",this.options.showSubtitle=!!this.subtitle,this.options.subtitle=this.subtitle||""),this.redraw()}onPropertyChange(e,t,i){switch(e){case"type":this.$element.removeClass(p[i]),this.$element.addClass(p[t]);break;case"minvalue":case"maxvalue":case"datavalue":a.isPercentageValue(this.datavalue)?this.percentagevalue=parseFloat(this.datavalue):this.percentagevalue=a.calculatePercent(parseFloat(this.datavalue),this.minvalue,this.maxvalue);break;case"displayformat":case"captionplacement":case"title":case"subtitle":this.updateDisplayValueFormat()}super.onPropertyChange(e,t,i)}ngOnDestroy(){this.circleRef=null,this.redraw&&"function"==typeof this.redraw.cancel&&this.redraw.cancel(),this.redraw=null,super.ngOnDestroy()}static{this.\u0275fac=l.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:l,type:m,deps:[{token:l.Injector},{token:"EXPLICIT_CONTEXT",optional:!0}],target:l.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=l.\u0275\u0275ngDeclareComponent({minVersion:"14.0.0",version:"20.3.19",type:m,isStandalone:!0,selector:"[wmProgressCircle]",providers:[n.provideAsWidgetRef(m)],viewQueries:[{propertyName:"circleRef",first:!0,predicate:t.CircleProgressComponent,descendants:!0,static:!0}],exportAs:["wmProgressCircle"],usesInheritance:!0,ngImport:l,template:'<circle-progress [percent]="percentagevalue" [options]="options"></circle-progress>\n',dependencies:[{kind:"ngmodule",type:t.NgCircleProgressModule},{kind:"component",type:r.CircleProgressComponent,selector:"circle-progress",inputs:["name","class","backgroundGradient","backgroundColor","backgroundGradientStopColor","backgroundOpacity","backgroundStroke","backgroundStrokeWidth","backgroundPadding","radius","space","percent","toFixed","maxPercent","renderOnClick","units","unitsFontSize","unitsFontWeight","unitsColor","outerStrokeGradient","outerStrokeWidth","outerStrokeColor","outerStrokeGradientStopColor","outerStrokeLinecap","innerStrokeColor","innerStrokeWidth","titleFormat","title","titleColor","titleFontSize","titleFontWeight","subtitleFormat","subtitle","subtitleColor","subtitleFontSize","subtitleFontWeight","imageSrc","imageHeight","imageWidth","animation","animateTitle","animateSubtitle","animationDuration","showTitle","showSubtitle","showUnits","showImage","showBackground","showInnerStroke","clockwise","responsive","startFromZero","showZeroOuterStroke","lazy","options"],outputs:["onClick"]}]})}}l.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:l,type:m,decorators:[{type:i.Component,args:[{standalone:!0,imports:[t.NgCircleProgressModule],selector:"[wmProgressCircle]",providers:[n.provideAsWidgetRef(m)],exportAs:"wmProgressCircle",template:'<circle-progress [percent]="percentagevalue" [options]="options"></circle-progress>\n'}]}],ctorParameters:()=>[{type:l.Injector},{type:void 0,decorators:[{type:i.Inject,args:["EXPLICIT_CONTEXT"]},{type:i.Optional}]}],propDecorators:{circleRef:[{type:i.ViewChild,args:[t.CircleProgressComponent,{static:!0}]}]}}),e.ProgressCircleComponent=m,e.TYPE_CLASS_MAP_PC=p}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/forms"),require("@wm/core"),require("@wm/components/base"),require("@wm/components/input/base-form-custom"),require("lodash-es")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/forms","@wm/core","@wm/components/base","@wm/components/input/base-form-custom","lodash-es"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.basic=e.wm.components.basic||{},e.wm.components.basic.richtexteditor={}),e.ng.core,e.ng.forms,e.wm.core,e.wm.components.base,e.wm.components.input.baseFormCustom,e._)}(this,function(e,t,i,n,a,s,o){"use strict";function r(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var l=r(t),c=r(a);const d=new Map([["class",a.PROP_STRING],["datavaluesource",a.PROP_ANY],["datavalue",a.PROP_STRING],["height",a.PROP_STRING],["hint",a.PROP_STRING],["arialabel",a.PROP_STRING],["name",a.PROP_STRING],["placeholder",a.PROP_STRING],["readonly",a.PROP_BOOLEAN],["show",{value:!0,...a.PROP_BOOLEAN}],["showpreview",{value:!1,...a.PROP_BOOLEAN}],["tabindex",{value:0,...a.PROP_NUMBER}]]),p={widgetType:"wm-richtexteditor",hostClass:"app-richtexteditor clearfix"};class m extends s.BaseFormCustomComponent{static{this.initializeProps=(a.register("wm-richtexteditor",d),void a.registerFormWidget(n.FormWidgetType.RICHTEXT,new Map(d)))}get htmlcontent(){return this.performEditorOperation("code")}get datavalue(){return this.htmlcontent}set datavalue(e){null!=e&&(this.$hiddenInputEle.val(e),this.performEditorOperation("reset"),this.performEditorOperation("code",e))}constructor(e,i,n,s){super(e,p,s),this.sanitizePipe=i,this.ngZone=n,this._operationStack=[],this.isEditorLoaded=!1,this.EDITOR_DEFAULT_OPTIONS={toolbar:[["misc",["undo","redo"]],["style",["style"]],["fontname",["fontname"]],["fontsize",["fontsize"]],["height",["height"]],["style",["bold","italic","underline","clear"]],["font",["strikethrough","superscript","subscript"]],["color",["color"]],["insert",["table","picture","link","video","hr"]],["para",["ul","ol","paragraph"]],["misc",["codeview","fullscreen","help"]]],callbacks:{onInit:()=>{this.isEditorLoaded=!0,this._operationStack.length&&(this._operationStack.forEach(e=>{const t=Array.from(e.keys())[0],i=e.get(t);this.performEditorOperation(t,i)}),this._operationStack=[])},onChange:(e,i)=>{this.proxyModel=this.sanitizePipe.transform(e,t.SecurityContext.HTML),this.invokeOnChange(e,(()=>{let e;return"function"==typeof Event?e=new Event("change"):(e=document.createEvent("Event"),e.initEvent("change",!0,!0)),e})(),!0),this.invokeOnTouched()}},fontNames:["Arial","Arial Black","Comic Sans MS","Courier New","Merriweather"],placeholder:"write here...",minHeight:100,disableResizeEditor:!0},a.styler(this.nativeElement,this,a.APPLY_STYLES_TYPE.CONTAINER,["height"]),(()=>{if(!$.summernote.__overidden){const e=$.summernote.ui_template().button.bind($.summernote);$.summernote.ui_template.button=(...t)=>{const i=e(...t),n=i.callback;return i.callback=(e,t)=>(e.addClass("btn"),n(e,t)),i},$.summernote.__overidden=!0}})()}ngOnInit(){this.$richTextEditor=$(this.nativeElement.querySelector("[richTextEditor]")),this.$hiddenInputEle=$(this.nativeElement.querySelector("input.model-holder")),super.ngOnInit(),this.initEditor(),$(".note-editable").attr("aria-label","textbox")}initEditor(){this.ngZone.runOutsideAngular(()=>{this.invokeEventCallback("beforerender",{$event:{}}),this.$richTextEditor.summernote(this.EDITOR_DEFAULT_OPTIONS)})}getDefaultOptions(){return this.EDITOR_DEFAULT_OPTIONS}getLib(){return"summernote"}overrideDefaults(e){o.extend(this.EDITOR_DEFAULT_OPTIONS,e)}onPropertyChange(e,t,i){"placeholder"===e?this.performEditorOperation("placeholder",t):"disabled"===e||"readonly"===e?this.performEditorOperation(t?"disable":"enable"):super.onPropertyChange(e,t,i)}onStyleChange(e,t,i){"height"===e&&this.performEditorOperation("height",t)}performEditorOperation(e,t){if(!this.isEditorLoaded){const i=new Map;return i.set(e,t),void this._operationStack.push(i)}if("height"===e)n.setCSS(this.nativeElement.querySelector("div.note-editable"),e,t,!0);else{if("placeholder"!==e){if(1===arguments.length&&"code"===e&&this.$richTextEditor.summernote("isEmpty")){const e=this.$richTextEditor.summernote("code");return""===e?e:void 0}return this.$richTextEditor.summernote(e,t)}n.setAttr(this.nativeElement,e,t),n.setHtml(this.nativeElement.querySelector("div.note-placeholder"),t,!0)}}getCurrentPosition(){return this.performEditorOperation("createRange")}undo(){this.performEditorOperation("undo")}focus(){this.performEditorOperation("focus")}ngOnDestroy(){this.performEditorOperation("destroy"),super.ngOnDestroy()}static{this.\u0275fac=l.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:l,type:m,deps:[{token:l.Injector},{token:c.SanitizePipe},{token:l.NgZone},{token:"EXPLICIT_CONTEXT",optional:!0}],target:l.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=l.\u0275\u0275ngDeclareComponent({minVersion:"17.0.0",version:"20.3.19",type:m,isStandalone:!0,selector:"div[wmRichTextEditor]",providers:[a.provideAs(m,i.NG_VALUE_ACCESSOR,!0),a.provideAsWidgetRef(m)],exportAs:["wmRichTextEditor"],usesInheritance:!0,ngImport:l,template:'<div richTextEditor></div>\n@if (showpreview) {\n <div [innerHTML]="proxyModel" class="ta-preview"></div>\n}\n<input class="model-holder" [disabled]="disabled" hidden>\n'})}}l.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:l,type:m,decorators:[{type:t.Component,args:[{standalone:!0,selector:"div[wmRichTextEditor]",providers:[a.provideAs(m,i.NG_VALUE_ACCESSOR,!0),a.provideAsWidgetRef(m)],exportAs:"wmRichTextEditor",template:'<div richTextEditor></div>\n@if (showpreview) {\n <div [innerHTML]="proxyModel" class="ta-preview"></div>\n}\n<input class="model-holder" [disabled]="disabled" hidden>\n'}]}],ctorParameters:()=>[{type:l.Injector},{type:c.SanitizePipe},{type:l.NgZone},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}]}),e.RichTextEditorComponent=m}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common"),require("@angular/forms"),require("@angular/core"),require("rxjs"),require("rxjs/operators"),require("ngx-bootstrap/typeahead"),require("@wm/core"),require("@wm/components/base"),require("@wm/components/input/dataset-aware-form"),require("lodash-es")):"function"==typeof define&&define.amd?define(["exports","@angular/common","@angular/forms","@angular/core","rxjs","rxjs/operators","ngx-bootstrap/typeahead","@wm/core","@wm/components/base","@wm/components/input/dataset-aware-form","lodash-es"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.basic=e.wm.components.basic||{},e.wm.components.basic.search={}),e.ng.common,e.ng.forms,e.ng.core,e.rxjs,e.rxjs.operators,e.ngxBootstrap.typeahead,e.wm.core,e.wm.components.base,e.wm.components.input.datasetawareform,e._)}(this,function(e,t,i,n,a,s,o,r,l,c,d){"use strict";function p(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var m=p(t),h=p(i),u=p(n),g=p(o),v=p(r);class f{constructor(e){this.searchRef=n.inject(T),this.elementRef=e.get(n.ElementRef)}ngAfterContentInit(){this.boundNotifyParent=this.notifyParent.bind(this),this.elementRef.nativeElement.addEventListener("scroll",this.boundNotifyParent),this.searchRef.dropdownEl=$(this.elementRef.nativeElement),this.searchRef.onDropdownOpen()}ngAfterViewInit(){if(!this.searchRef.isMobileAutoComplete()){const e=this.searchRef.$element.find("input").first();this.searchRef.dropdownEl.width(e.outerWidth())}}notifyParent(e){this.searchRef.onScroll(this.elementRef.nativeElement,e)}ngOnDestroy(){this.elementRef&&this.elementRef.nativeElement&&this.boundNotifyParent&&(this.elementRef.nativeElement.removeEventListener("scroll",this.boundNotifyParent),this.boundNotifyParent=null)}static{this.\u0275fac=u.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:u,type:f,deps:[{token:u.Injector}],target:u.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=u.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:f,isStandalone:!0,selector:"[scrollableHandler]",ngImport:u})}}u.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:u,type:f,decorators:[{type:n.Directive,args:[{standalone:!0,selector:"[scrollableHandler]"}]}],ctorParameters:()=>[{type:u.Injector}]});const b=new Map([["casesensitive",{value:!1,...l.PROP_BOOLEAN}],["class",l.PROP_STRING],["datacompletemsg",{value:"No more data to load",...l.PROP_STRING}],["datafield",{value:"All Fields",...l.PROP_STRING}],["dataoptions",l.PROP_ANY],["dataset",l.PROP_ANY],["datasource",l.PROP_ANY],["datavalue",l.PROP_STRING],["datavaluesource",l.PROP_ANY],["dateformat",l.PROP_STRING],["disabled",l.PROP_BOOLEAN],["displayimagesrc",l.PROP_STRING],["displaylabel",l.PROP_STRING],["displayexpression",l.PROP_STRING],["dropup",l.PROP_BOOLEAN],["groupby",l.PROP_STRING],["hint",l.PROP_STRING],["arialabel",l.PROP_STRING],["imagewidth",{value:"16px",...l.PROP_STRING}],["limit",l.PROP_NUMBER],["loadingdatamsg",{value:"Loading items...",...l.PROP_STRING}],["match",l.PROP_STRING],["matchmode",l.PROP_STRING],["minchars",l.PROP_NUMBER],["name",l.PROP_STRING],["navsearchbar",{value:!1,...l.PROP_BOOLEAN}],["orderby",l.PROP_STRING],["placeholder",{value:"Search",...l.PROP_STRING}],["position",l.PROP_STRING],["query",l.PROP_STRING],["readonly",l.PROP_BOOLEAN],["required",l.PROP_BOOLEAN],["searchkey",l.PROP_STRING],["searchon",{value:"typing",...l.PROP_STRING}],["shortcutkey",l.PROP_STRING],["show",{value:!0,...l.PROP_BOOLEAN}],["showclear",{value:!1,...l.PROP_BOOLEAN}],["showsearchicon",l.PROP_BOOLEAN],["tabindex",{value:0,...l.PROP_NUMBER}],["type",{value:"search",...l.PROP_STRING}],["debouncetime",{value:250,...l.PROP_NUMBER}],["width",l.PROP_STRING],["clearsearchiconclass",{value:"wi wi-close",...l.PROP_STRING}],["backsearchiconclass",{value:"wi wi-arrow-left",...l.PROP_STRING}],["searchiconclass",{value:"wm-sl-l sl-search",...l.PROP_STRING}]]);class y{applyFilter(e,t,i){return e=d.isNumber(e)?e.toString():e,d.includes(i,"start")?d.startsWith(e,t):d.includes(i,"end")?d.endsWith(e,t):d.includes(i,"exact")?d.isEqual(e,t):d.includes(e,t)}filter(e){const t=e.dataset;let i=e.casesensitive;const n=e.matchMode;n&&!d.includes(n,"ignorecase")&&(i=!0);let a,s=e.query;return new Promise((o,r)=>{if(e.searchKey){const t=d.split(e.searchKey,",");a=d.filter(e.dataset,e=>t.some(t=>{let a=d.get(e,t),o=s;return i||(a=d.toLower(d.toString(a)),o=d.toLower(d.toString(o))),this.applyFilter(a,o,n)}))}else a=d.isArray(t)&&d.isObject(t[0])?d.filter(t,e=>{let t=d.values(e).join(" ");return i||(t=d.toLower(t),s=d.toLower(s)),this.applyFilter(t,s)}):d.filter(t,e=>(i||(e=d.toLower(e),s=d.toLower(s)),this.applyFilter(e,s,n)));o({data:a,hasMoreData:!1,isLastPage:!0})})}}class w{filter(e){return this.filterData(e).then(t=>this.onFilterSuccess(e,t),()=>this.onFilterFailure())}filterData(e){if(e.dataoptions){const t=e.dataoptions,i=e.datasource.execute(r.DataSource.Operation.GET_REQUEST_PARAMS,e);if(t.relatedField)return new Promise((n,a)=>{l.interpolateBindExpressions(e.viewParent,t.filterExpr,s=>{i.filterExpr=t.filterExpr=s,t.filterExpr=s,e.datasource.execute(r.DataSource.Operation.GET_RELATED_TABLE_DATA,d.assign({relatedField:t.relatedField},i)).then(n,a)})});if(t.distinctField)return e.datasource.execute(r.DataSource.Operation.GET_DISTINCT_DATA_BY_FIELDS,{pagesize:e.limit||e.pagesize,page:e.page,fields:t.distinctField,entityName:t.tableName,filterFields:d.assign(t.filterFields,i.filterFields),filterExpr:r.getClonedObject(t.filterExpr||{})})}return e.datasource.execute(r.DataSource.Operation.SEARCH_RECORDS,e)}isLast(e,t,i,n){if(t===r.AppConstants.INT_MAX_VALUE)return 0!==n&&n<i;return e===(t>i?Math.ceil(t/i):t<0?0:1)}getTransformedData(e,t){const i=e.operation+"Result",n=t[i];if(n){const e={};d.set(e,i,n),t=[e]}else t=[t];return t}onFilterFailure(){return[]}isLastPageForDistinctApi(e,t,i,n){return t>1&&!n&&d.isEmpty(e)&&i===r.AppConstants.INT_MAX_VALUE}onFilterSuccess(e,t){let i,n,a,s,o=t.data;const l=d.split(e.binddataset,"."),c=d.slice(l,d.indexOf(l,"dataSet")+1).join(".");return new Promise((l,p)=>{const m=t.pagination;if(e.datasource.execute(r.DataSource.Operation.IS_PAGEABLE)&&(a=m.number+1,n=this.isLast(a,e.limit>0&&e.limit||m.totalElements,m.size,m.numberOfElements),s=!0,this.isLastPageForDistinctApi(o,a,m.totalElements,n)))return n=!0,void l({data:[],isLastPage:n,hasMoreData:a>1,isPaginatedData:s,page:a});if(c){if(d.isArray(o)){const e=c.lastIndexOf("[$i]");if(e>-1){const t=c.substr(e+5);i=o.map(e=>r.findValueOf(e,t))}}else d.isObject(o)&&(i=d.get(o,c));o=i||o}d.isArray(o)||(o=this.getTransformedData(e.datasource,o)),o.length?l({data:o,isLastPage:n,hasMoreData:a>1,isPaginatedData:s,page:a}):l({data:[],isLastPage:n,hasMoreData:a>1,isPaginatedData:s,page:a})})}}class P{static{this.remoteDataProvider=new w}static{this.localDataProvider=new y}filter(e){let t;const i=e.datasource&&e.datasource.execute(r.DataSource.Operation.IS_UPDATE_REQUIRED,e.hasData);return t=!e.isLocalFilter&&(e.dataoptions||e.datasource&&e.datasource.execute(r.DataSource.Operation.IS_API_AWARE)&&e.searchKey&&i)?P.remoteDataProvider.filter(e):P.localDataProvider.filter(e),t.then(t=>(this.updateDataset=e.datasource&&!e.datasource.execute(r.DataSource.Operation.SUPPORTS_CRUD)&&i,this.hasMoreData=t.hasMoreData,this.isLastPage=t.isLastPage,this.page=t.page,this.isPaginatedData=t.isPaginatedData,t))}}const C={widgetType:"wm-search",hostClass:"input-group"};class T extends c.DatasetAwareFormComponent{static{this.initializeProps=(l.register("wm-search",b),l.registerFormWidget(r.FormWidgetType.AUTOCOMPLETE,new Map(b)),void l.registerFormWidget(r.FormWidgetType.TYPEAHEAD,new Map(b)))}get datasource(){return this._datasource}set datasource(e){this._datasource=e;const t=this.datavalue||this.toBeProcessedDatavalue;this.updateByDatavalue(t)}constructor(e,t,i,n,o){super(e,C,o),this.binddatavalue=i,this.binddataset=n,this.query="",this.page=1,this.allowempty=!1,this.app=t,r.addClass(this.nativeElement,"app-search",!0),this.typeaheadDataSource=a.Observable.create(e=>{this.listenQuery&&(this._defaultQueryInvoked=!1,this._loadingItems=!0,e.next(this.query)),this.lastSelectedIndex&&(this.typeahead._container=void 0)}).pipe(s.filter(()=>(this._loadingItems=!1,0===this.minchars||this.query&&this.query.length>=this.minchars)),s.mergeMap(e=>this.getDataSourceAsObservable(e))),this.dataProvider=new P;const l=this.datavalue$.subscribe(e=>{const t=d.isArray(e)?e[0]:e;if(null===t||""===t)return this._modelByValue="",this.query=this.queryModel="",void(this._lastResult=void 0);this._unsubscribeDv||(this._defaultQueryInvoked=!1,d.isObject(e)||this.prevDatavalue===e||(this._modelByKey=void 0,this.query=this.queryModel=""),this.updateByDatavalue(e)),this.showClosebtn=""!==this.query});this.registerDestroyListener(()=>l.unsubscribe());const c=this.dataset$.subscribe(()=>{this.startIndex=this.datasetItems.length,this._lastResult=void 0;const e=this.datavalue||this.toBeProcessedDatavalue;r.isDefined(e)&&this.updateByDataset(e)});this.registerDestroyListener(()=>c.unsubscribe())}clearSearch(e,t){this.query="",this.onInputChange(e),this.dataProvider&&(this.dataProvider.isLastPage=!1),this.listenQuery=!1,t&&(this.listenQuery=!0,this._unsubscribeDv=!1,this.loadMoreData()),this.invokeEventCallback("clearsearch"),this._loadingItems=!1,e&&this.$element.find(".app-search-input").focus()}clearText(){this.query="",this.showClosebtn=!1}closeSearch(){this._loadingItems=!1,this.page=1,this.insertAtIndex(this.elIndex),this.elIndex=void 0,this.parentEl=void 0,this.$element.removeClass("full-screen"),this._domUpdated&&(this._domUpdated=!1),this.listenQuery=!1,this._unsubscribeDv=!0,this.typeahead.hide()}renderMobileAutoComplete(){r.isDefined(this.elIndex)||(this.parentEl=this.$element.parent(),this.elIndex=this.parentEl.children().index(this.$element)),this.$element.hasClass("full-screen")||(this._domUpdated=!0,this.$element.addClass("full-screen"),"inline"===this.position&&this.$element.addClass(this.position)),this.$element.hasClass("full-screen")&&this.$element.find(".app-search-input").focus()}getDataSourceAsObservable(e){if(this._lastQuery===e&&!d.get(this.dataoptions,"filterFields")&&r.isDefined(this._lastResult))return this._loadingItems=!1,a.of(this._lastResult);if("autocomplete"===this.type&&this.searchkey&&this.query&&this.datavalue){let e=[];const t=d.split(this.searchkey,",");let i;if(this.binddisplaylabel&&(e=d.split(this.binddisplaylabel,"+"),1===e.length))if(d.includes(e[0],"|"))i=!0;else{i=/\[(.*?)\]/.exec(e[0])[1]}if(e.length>1||i&&!d.includes(t,i)||this.displayexpression&&!d.includes(t,this.displayexpression))return this._loadingItems=!1,a.of([])}return this._lastQuery=this.query,a.from(this.getDataSource(e))}handleEvent(e,t,i,n){d.includes(["blur","focus","select","submit","change"],t)||super.handleEvent(e,t,i,n)}highlight(e,t){if(this.typeaheadContainer)return e.value=e.item.label.toString(),this.typeaheadContainer.highlight(e,t)}insertAtIndex(e){if(0===e)this.parentEl.prepend(this.$element);else{this.parentEl.children().eq(e).length?this.$element.insertBefore(this.parentEl.children().eq(e)):this.$element.insertAfter(this.parentEl.children().eq(e-1))}}isMobileAutoComplete(){return"autocomplete"===this.type&&r.isMobile()}isQueryEntered(){return this.showclear&&this.showClosebtn}loadMoreData(e){this.dataProvider&&!this.dataProvider.isLastPage&&(this.page=e?this.page+1:this.page,this.isScrolled=!0,this._loadingItems=!0,e&&(this._lastQuery=void 0),this.typeahead.onInput({target:{value:d.trim(this.query)||"0"}}))}onFocusOut(){this._unsubscribeDv=!1,this._loadingItems=!1,this.page=1,!this._domUpdated&&this._isOpen&&(this.listenQuery=!1),this._isOpen=!1,this._domUpdated&&this.typeahead&&this.typeahead._container&&(this.typeahead._container.isFocused=!0)}onInputChange(e){this.result=[],this.page=1,this.listenQuery=this.isUpdateOnKeyPress(),this._modelByValue=void 0,""===this.query?(this.queryModel="",this._modelByValue="",this.updatePrevDatavalue(this._lastQuery),this.invokeOnChange(this._modelByValue,{},!0),this.invokeEventCallback("clear",{$event:e}),e&&9!==e.which&&this.invokeEventCallback("submit",{$event:e})):this.invokeEventCallback("change",{$event:e,newVal:this._modelByValue||this.query,oldVal:this.prevDatavalue}),this.showClosebtn=""!==this.query}handleEnterEvent(e){d.get(this.typeahead,"matches.length")||this.onSearchSelect(e)}onSearchSelect(e){let t;const i=this.typeaheadContainer?.active?.value===this.query;if(this.typeaheadContainer&&this.typeaheadContainer.active&&i&&(t=this.typeaheadContainer.active.item),e=this.eventData(e,t||{}),!this.isUpdateOnKeyPress())return this.listenQuery=!0,void this.typeahead.onInput({target:{value:this.query}});this.typeaheadContainer&&this.liElements.length&&i?this.typeaheadContainer.selectActiveMatch():(this.queryModel=this.query,this.invokeEventCallback("submit",{$event:e}))}invokeOnBeforeServiceCall(e){this.invokeEventCallback("beforeservicecall",{inputData:e})}onDropdownOpen(){this.clearData&&this.typeahead.hide();if(d.debounce(()=>{this._isOpen=!0,this.typeaheadContainer=this.typeahead._container||this.typeahead._typeahead.instance,this.typeaheadContainer.liElements=this.liElements,this.typeaheadContainer.ulElement=this.ulElement,r.adjustContainerPosition($("typeahead-container"),this.nativeElement,this.typeahead._typeahead,$("typeahead-container .dropdown-menu"))})(),this.isMobileAutoComplete()){this.$element.hasClass("full-screen")||this.renderMobileAutoComplete();const e=this.dropdownEl.closest("typeahead-container");e.insertAfter(this.$element.find("input").first());const t=this.$element.closest(".app-content").height();e.css({position:"relative",top:0,height:t+"px"}),this.showClosebtn=this.query&&""!==this.query,!this.dataProvider||d.isUndefined(this.dataProvider.isLastPage)||this.dataProvider.isLastPage||this.triggerSearch()}}selectNext(){const e=this.typeaheadContainer.matches;if(!e)return;const t=e.indexOf(this.typeaheadContainer.active);!this._loadingItems&&this.dataProvider&&!this.dataProvider.isLastPage&&t+1>e.length-1&&(this.lastSelectedIndex=t,this.loadMoreData(!0))}setLastActiveMatchAsSelected(){this.lastSelectedIndex&&(this.typeaheadContainer._active=this.typeaheadContainer.matches[this.lastSelectedIndex],this.typeaheadContainer.nextActiveMatch(),this.lastSelectedIndex=void 0)}triggerSearch(){if(!this.dataProvider||this.dataProvider.isLastPage||!this.$element.hasClass("full-screen"))return;const e=this.dropdownEl,t=e.find("li").last();t.length&&e.length&&e.height()+e.position().top>t.height()+t.position().top&&this.loadMoreData(!0)}isUpdateOnKeyPress(){return"typing"===this.searchon}debounceDefaultQuery(e){this._defaultQueryInvoked=!0,this.getDataSource(e,!0).then(e=>{e.length?(this.queryModel=e,this._lastQuery=this.query=this.queryModel[0].label||"",this._modelByValue=this.queryModel[0].value,this._modelByKey=this.queryModel[0].key,this.showClosebtn=""!==this.query):(this._modelByValue=void 0,this.queryModel=void 0,this.query=""),this.clearData&&d.get(this.typeahead,"_typeahead.isShown")&&this.typeahead.hide()})}updateByDatavalue(e){this.updateByDataset(e),this.updateByDataSource(e)}updateByDataSource(e){if(r.isDefined(e)&&!d.isObject(e)&&this.datasource&&!r.isDefined(this._modelByKey)&&this.datafield!==l.ALLFIELDS){if(r.isDefined(this.queryModel)&&!d.isEmpty(this.queryModel))return void this.updateDatavalueFromQueryModel();!this._defaultQueryInvoked&&this.datasource.execute(r.DataSource.Operation.SUPPORTS_CRUD)&&this.debounceDefaultQuery(e)}}updateDatavalueFromQueryModel(){r.isDefined(this.queryModel)&&(this._modelByValue=d.isArray(this.queryModel)?this.queryModel[0].value:this.queryModel,this._modelByKey=d.isArray(this.queryModel)?this.queryModel[0].key:this.queryModel,this.toBeProcessedDatavalue=void 0)}updateByDataset(e){if(this._defaultQueryInvoked&&this.searchkey)return;const t=d.find(this.datasetItems,t=>d.isObject(t.value)?d.isEqual(t.value,e):d.toString(t.value).toLowerCase()===d.toString(e).toLowerCase());if(t)this.queryModel=[t];else if(this.datafield===l.ALLFIELDS&&d.isObject(e))this.queryModel=this.getTransformedData(l.extractDataAsArray(e));else if(this.prevDatavalue!==e)return this.queryModel=void 0,void(this.query="");this.updateDatavalueFromQueryModel(),this._lastQuery=this.query=r.isDefined(this.queryModel)&&this.queryModel.length?d.get(this.queryModel[0],"label"):"",this.showClosebtn=""!==this.query}handleFocus(e){"search"===this.type&&this.query===this._lastQuery&&this._lastResult&&this.typeahead.keyUpEventEmitter.emit(this.query)}notifySubscriber(){const e=$(this.nativeElement).closest(".app-composite-widget.caption-floating");e.length>0&&this.app.notify("captionPositionAnimate",{displayVal:!0,nativeEl:e})}getDataSource(e,t,i){if(t&&this.datafield===l.ALLFIELDS)return this._loadingItems=!1,Promise.resolve([]);const n={dataset:this.dataset?l.convertDataToObject(this.dataset):void 0,binddataset:this.binddataset,datasource:this.datasource,datafield:this.datafield,hasData:this.dataset&&this.dataset.length,query:e,isLocalFilter:!this.searchkey,searchKey:t?this.datafield:this.searchkey,matchMode:t?"startignorecase":this.matchmode,casesensitive:this.casesensitive,isformfield:this.isformfield,orderby:this.orderby,limit:this.limit,pagesize:this.pagesize,page:this.page,onBeforeservicecall:this.invokeOnBeforeServiceCall.bind(this)};return this.dataoptions&&(n.dataoptions=this.dataoptions,n.viewParent=this.viewParent),this._loadingItems=!0,this.dataProvider.filter(n).then(e=>{e=e.data||e,!this.dataProvider||r.isDefined(this.dataset)&&this.dataset.length||!this.dataProvider.updateDataset||(this.dataset=e),this.dataProvider&&this.dataProvider.hasMoreData?this.formattedDataset=this.formattedDataset.concat(e):this.formattedDataset=e,this.formattedDataset.length>20&&!r.isDefined(this.limit)&&(this.typeahead.typeaheadOptionsLimit=this.formattedDataset.length),this.dataProvider&&this._isOpen&&this.isMobileAutoComplete()&&!d.isUndefined(this.dataProvider.isLastPage)&&!this.dataProvider.isLastPage&&this.triggerSearch();const t=this.getTransformedData(this.formattedDataset,i);return this.result=d.map(t,"value"),t},e=>(this._loadingItems=!1,[])).then(t=>(this.isScrolled&&(d.debounce(()=>{this.setLastActiveMatchAsSelected()},30)(),this.isScrolled=!1),t.length||(this._modelByValue=void 0,this.queryModel=e),this._unsubscribeDv&&(t=[]),this._loadingItems=!1,this._lastResult=t,t))}getContext(e){return e&&d.get(e,"widget")?this.getContext(e.viewParent):e}getTransformedData(e,t,i){r.isDefined(t)&&t++;const n=l.transformFormData(this.getContext(this.viewParent),e,this.datafield,{displayField:this.displaylabel||this.displayfield,displayExpr:i?"":this.displayexpression,bindDisplayExpr:i?"":this.binddisplaylabel,bindDisplayImgSrc:this.binddisplayimagesrc,displayImgSrc:this.displayimagesrc},t,this);return l.getUniqObjsByDataField(n,this.datafield,this.displayfield||this.displaylabel,r.toBoolean(this.allowempty))}onScroll(e,t){const i=e.scrollHeight,n=e.clientHeight;!this._loadingItems&&this.dataProvider&&!this.dataProvider.isLastPage&&e.scrollTop+n>=i&&this.loadMoreData(!0)}ngOnInit(){super.ngOnInit(),r.isDefined(this.minchars)||("autocomplete"===this.type?this.minchars=0:this.minchars=1),this.listenQuery=this.isUpdateOnKeyPress(),this.showsearchicon=r.isDefined(this.showsearchicon)?this.showsearchicon:"search"===this.type}ngAfterViewInit(){super.ngAfterViewInit(),l.styler(this.nativeElement,this),this.containerTarget=l.getContainerTargetClass(this.nativeElement)}ngAfterViewChecked(){const e=$(".app-search-input");e&&e.removeAttr("aria-expanded")}eventData(e,t){return e&&(e.data={item:t.dataObject,model:t.value,label:t.label,query:this.query}),e}typeaheadOnSelect(e,t){const i=e.item;this.queryModel=i,i.selected=!0,this.query=i.label,this.showClosebtn=""!==this.query,t=t||this.$typeaheadEvent,this._modelByKey=i.key,this._modelByValue=i.value,t=this.eventData(t,i),this.invokeOnTouched(),this.invokeOnChange(this.datavalue,t||{}),this.datavalue!==this.prevDatavalue&&this.updateBoundVariable(this.datavalue),this.$element.hasClass("full-screen")&&this.closeSearch(),this.invokeEventCallback("select",{$event:t,selectedValue:this.datavalue}),this.invokeEventCallback("submit",{$event:t}),this.updatePrevDatavalue(this.datavalue)}onPropertyChange(e,t,i){"tabindex"!==e&&("autocomplete"===this.type&&"displaylabel"===e&&this.displaylabel&&(!this.displayexpression||this.displayexpression&&!this.datasource)&&(this.displayexpression=this.displaylabel,this.displaylabel=void 0),"displaylabel"===e&&this.dataoptions&&null===this.binddisplaylabel&&(this.query=d.get(this._modelByValue,t)||this._modelByValue),"disabled"===e&&(!1===t?this.clearData=!1:(this.clearData=!0,d.get(this.typeahead,"_typeahead.isShown")&&this.typeahead.hide())),super.onPropertyChange(e,t,i))}ngOnDestroy(){this.liElements=null,this.dataProvider&&(this.dataProvider=null),this.typeahead&&(this.typeahead=null),this.queryModel=null,this.query="",super.ngOnDestroy()}static{this.\u0275fac=u.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:u,type:T,deps:[{token:u.Injector},{token:v.App},{token:"datavalue.bind",attribute:!0},{token:"dataset.bind",attribute:!0},{token:"EXPLICIT_CONTEXT",optional:!0}],target:u.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=u.\u0275\u0275ngDeclareComponent({minVersion:"17.0.0",version:"20.3.19",type:T,isStandalone:!0,selector:"[wmSearch]",providers:[l.provideAs(T,i.NG_VALUE_ACCESSOR,!0),l.provideAs(T,i.NG_VALIDATORS,!0),l.provideAsWidgetRef(T)],viewQueries:[{propertyName:"typeahead",first:!0,predicate:o.TypeaheadDirective,descendants:!0},{propertyName:"ulElement",first:!0,predicate:["ulElement"],descendants:!0},{propertyName:"liElements",predicate:["liElements"],descendants:!0}],usesInheritance:!0,ngImport:u,template:'<ng-template #customItemTemplate let-model="item" let-index="index" let-query="query" let-match="match">\n \x3c!-- Default item template --\x3e\n @if (!content) {\n <a>\n @if (model.imgSrc) {\n <img [src]="model.imgSrc" alt="Search" [style.width]="imagewidth">\n }\n <span [title]="model.label" [innerHtml]="highlight(match, query) || model.label"></span>\n </a>\n }\n \x3c!-- Custom partial template --\x3e\n @if (content) {\n <a [ngClass]="{customTemplate: content}" partialContainer [wmItemTemplate]="content" [userComponentParams]="match.item">\n <div partial-container-target></div>\n </a>\n }\n</ng-template>\n\n<ng-template #customListTemplate let-matches="matches" let-itemTemplate="itemTemplate" let-query="query">\n <ul #ulElement class="app-search dropdown-menu" scrollableHandler>\n @for (match of matches; track match; let i = $index) {\n <li #liElements [ngClass]="{active: typeaheadContainer && typeaheadContainer.isActive(match), \'list-group-header\': match && match.isHeader()}"\n (mouseenter)="typeaheadContainer.selectActive(match);"\n (click)="match && !match.isHeader() && typeaheadContainer.selectMatch(match, $event); $typeaheadEvent = $event; notifySubscriber();">\n \x3c!-- itemTemplate comes from the <input> --\x3e\n @if (match.isHeader()) {\n <h4 class="group-title">{{match.value}}</h4>\n }\n @if (!match.isHeader()) {\n <ng-container [ngTemplateOutlet]="itemTemplate"\n [ngTemplateOutletContext]="{item: match.item, index: i, match: match, query: query}">\n </ng-container>\n }\n </li>\n }\n <div class="status" [hidden]="_loadingItems || !(datacompletemsg && dataProvider?.isLastPage)">\n <span [textContent]="datacompletemsg"></span>\n </div>\n <div class="status" [hidden]="!_loadingItems">\n <i class="fa fa-circle-o-notch fa-spin"></i>\n <span [textContent]="loadingdatamsg"></span>\n </div>\n </ul>\n</ng-template>\n\n\x3c!--This template is for search inside mobile navbar.--\x3e\n@if (navsearchbar) {\n <input [title]="query || \'\'" type="text" class="app-textbox form-control list-of-objs app-search-input" [placeholder]="placeholder || \'\'"\n focus-target\n container="body"\n [disabled]="disabled"\n [attr.accesskey]="shortcutkey"\n autocomplete="off"\n [(ngModel)]="query"\n [ngModelOptions]="{standalone: true}"\n [readonly]="readonly"\n [typeahead]="typeaheadDataSource"\n [typeaheadWaitMs]="debouncetime"\n [typeaheadItemTemplate]="customItemTemplate"\n [optionsListTemplate]="customListTemplate"\n (input)="onInputChange($event)"\n (keydown)="listenQuery = true"\n (keydown.enter)="$typeaheadEvent = $event;handleEnterEvent($event)"\n (keydown.arrowdown)="selectNext($event)"\n (blur)="invokeOnTouched($event)"\n (click)="handleFocus($event);"\n (focus)="_unsubscribeDv = false; listenQuery = true; handleFocus($event); invokeOnFocus($event);"\n (focusout)="onFocusOut()"\n [typeaheadMinLength]="minchars"\n [typeaheadOptionsLimit]="limit"\n (typeaheadLoading)="_loadingItems"\n (typeaheadOnSelect)="typeaheadOnSelect($event)"\n typeaheadOptionField="label"\n [typeaheadGroupField]="groupby ? \'groupby\' : null"\n [typeaheadAsync]="true"\n [typeaheadScrollable]="true"\n [adaptivePosition]="true"\n [typeaheadOptionsInScrollableView]="optionslimitinscrollableview"\n [dropup]="dropup"\n [tabindex]="tabindex"\n [attr.name]="name"\n [attr.aria-label]="arialabel || \'Search field\'"/>\n <i class="btn-close wi wi-cancel" [hidden]="!showClosebtn" (click)="clearSearch($event);"></i>\n} @else {\n <button type="button" class="btn btn-icon form-control-feedback back-btn" aria-hidden="true" (click)="closeSearch()"><i class="app-icon {{backsearchiconclass}}"></i></button>\n <span class="sr-only">Back button</span>\n <input [title]="query || \'\'" type="text" class="app-textbox form-control list-of-objs app-search-input" [placeholder]="placeholder || \'\'"\n focus-target\n [container]="containerTarget || \'.wm-app\'"\n [disabled]="disabled"\n [attr.accesskey]="shortcutkey"\n autocomplete="off"\n [(ngModel)]="query"\n [ngModelOptions]="{standalone: true}"\n [readonly]="readonly"\n [typeahead]="typeaheadDataSource"\n [typeaheadWaitMs]="debouncetime"\n [typeaheadItemTemplate]="customItemTemplate"\n [optionsListTemplate]="customListTemplate"\n (input)="onInputChange($event)"\n (keydown)="listenQuery = true"\n (keydown.enter)="$typeaheadEvent = $event;handleEnterEvent($event)"\n (keydown.arrowdown)="selectNext($event)"\n (blur)="invokeOnTouched($event); onFocusOut()"\n (click)="handleFocus($event);"\n (focus)="_unsubscribeDv = false; listenQuery = true; handleFocus($event); invokeOnFocus($event)"\n [typeaheadMinLength]="minchars"\n [typeaheadOptionsLimit]="limit"\n (typeaheadLoading)="_loadingItems"\n (typeaheadOnSelect)="typeaheadOnSelect($event)"\n typeaheadOptionField="label"\n [typeaheadGroupField]="groupby ? \'groupby\' : null"\n [typeaheadAsync]="true"\n [typeaheadScrollable]="true"\n [adaptivePosition]="true"\n [typeaheadOptionsInScrollableView]="optionslimitinscrollableview"\n [tabindex]="tabindex"\n [dropup]="dropup"\n [attr.name]="name"\n [attr.aria-label]="arialabel || \'Search field\'">\n <input class="model-holder" ng-model="proxyModel" ng-required="required" tabindex="-1" aria-hidden="true">\n @if (_loadingItems) {\n <span aria-hidden="true" class="fa fa-circle-o-notch fa-spin form-control-feedback"></span>\n }\n <button type="button" class="btn btn-icon form-control-feedback clear-btn" [ngClass]="{\'show-btn\': isQueryEntered()}" (click)="clearSearch($event, true)"><i class="app-icon {{clearsearchiconclass}}"></i></button>\n <span class="sr-only">Clear button</span>\n @if (showsearchicon) {\n <span [ngClass]="{\'disabled\': disabled}" class="input-group-addon">\n <form>\n <button title="Search" [disabled]="disabled" class="app-search-button btn btn-icon" type="submit"\n (click)="onSearchSelect($event)">\n <i class="app-icon {{searchiconclass}}"></i></button>\n </form>\n </span>\n }\n }\n \x3c!--This template is for both web and fullscreen mode in mobile.--\x3e\n',dependencies:[{kind:"ngmodule",type:t.CommonModule},{kind:"directive",type:m.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"directive",type:m.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]},{kind:"ngmodule",type:i.FormsModule},{kind:"directive",type:h.\u0275NgNoValidate,selector:"form:not([ngNoForm]):not([ngNativeValidate])"},{kind:"directive",type:h.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:h.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:h.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:h.NgModel,selector:"[ngModel]:not([formControlName]):not([formControl])",inputs:["name","disabled","ngModel","ngModelOptions"],outputs:["ngModelChange"],exportAs:["ngModel"]},{kind:"directive",type:h.NgForm,selector:"form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]",inputs:["ngFormOptions"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:f,selector:"[scrollableHandler]"},{kind:"ngmodule",type:o.TypeaheadModule},{kind:"directive",type:g.TypeaheadDirective,selector:"[typeahead]",inputs:["typeahead","typeaheadMinLength","adaptivePosition","isAnimated","typeaheadWaitMs","typeaheadOptionsLimit","typeaheadOptionField","typeaheadGroupField","typeaheadOrderBy","typeaheadAsync","typeaheadLatinize","typeaheadSingleWords","typeaheadWordDelimiters","typeaheadMultipleSearch","typeaheadMultipleSearchDelimiters","typeaheadPhraseDelimiters","typeaheadItemTemplate","optionsListTemplate","typeaheadScrollable","typeaheadOptionsInScrollableView","typeaheadHideResultsOnBlur","typeaheadSelectFirstItem","typeaheadIsFirstItemActive","container","dropup"],outputs:["typeaheadLoading","typeaheadNoResults","typeaheadOnSelect","typeaheadOnPreview","typeaheadOnBlur"],exportAs:["bs-typeahead"]},{kind:"directive",type:l.TextContentDirective,selector:"[textContent]",inputs:["textContent"]},{kind:"directive",type:l.ItemTemplateDirective,selector:"[wmItemTemplate]",inputs:["userComponentParams","wmItemTemplate"],exportAs:["itemTemplateRef"]},{kind:"directive",type:l.PartialParamHandlerDirective,selector:"[partialContainer]"},{kind:"directive",type:l.PartialContainerDirective,selector:"[partialContainer]"}]})}}u.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:u,type:T,decorators:[{type:n.Component,args:[{standalone:!0,imports:[t.CommonModule,i.FormsModule,f,o.TypeaheadModule,l.TextContentDirective,l.ItemTemplateDirective,l.PartialParamHandlerDirective,l.PartialContainerDirective],selector:"[wmSearch]",providers:[l.provideAs(T,i.NG_VALUE_ACCESSOR,!0),l.provideAs(T,i.NG_VALIDATORS,!0),l.provideAsWidgetRef(T)],template:'<ng-template #customItemTemplate let-model="item" let-index="index" let-query="query" let-match="match">\n \x3c!-- Default item template --\x3e\n @if (!content) {\n <a>\n @if (model.imgSrc) {\n <img [src]="model.imgSrc" alt="Search" [style.width]="imagewidth">\n }\n <span [title]="model.label" [innerHtml]="highlight(match, query) || model.label"></span>\n </a>\n }\n \x3c!-- Custom partial template --\x3e\n @if (content) {\n <a [ngClass]="{customTemplate: content}" partialContainer [wmItemTemplate]="content" [userComponentParams]="match.item">\n <div partial-container-target></div>\n </a>\n }\n</ng-template>\n\n<ng-template #customListTemplate let-matches="matches" let-itemTemplate="itemTemplate" let-query="query">\n <ul #ulElement class="app-search dropdown-menu" scrollableHandler>\n @for (match of matches; track match; let i = $index) {\n <li #liElements [ngClass]="{active: typeaheadContainer && typeaheadContainer.isActive(match), \'list-group-header\': match && match.isHeader()}"\n (mouseenter)="typeaheadContainer.selectActive(match);"\n (click)="match && !match.isHeader() && typeaheadContainer.selectMatch(match, $event); $typeaheadEvent = $event; notifySubscriber();">\n \x3c!-- itemTemplate comes from the <input> --\x3e\n @if (match.isHeader()) {\n <h4 class="group-title">{{match.value}}</h4>\n }\n @if (!match.isHeader()) {\n <ng-container [ngTemplateOutlet]="itemTemplate"\n [ngTemplateOutletContext]="{item: match.item, index: i, match: match, query: query}">\n </ng-container>\n }\n </li>\n }\n <div class="status" [hidden]="_loadingItems || !(datacompletemsg && dataProvider?.isLastPage)">\n <span [textContent]="datacompletemsg"></span>\n </div>\n <div class="status" [hidden]="!_loadingItems">\n <i class="fa fa-circle-o-notch fa-spin"></i>\n <span [textContent]="loadingdatamsg"></span>\n </div>\n </ul>\n</ng-template>\n\n\x3c!--This template is for search inside mobile navbar.--\x3e\n@if (navsearchbar) {\n <input [title]="query || \'\'" type="text" class="app-textbox form-control list-of-objs app-search-input" [placeholder]="placeholder || \'\'"\n focus-target\n container="body"\n [disabled]="disabled"\n [attr.accesskey]="shortcutkey"\n autocomplete="off"\n [(ngModel)]="query"\n [ngModelOptions]="{standalone: true}"\n [readonly]="readonly"\n [typeahead]="typeaheadDataSource"\n [typeaheadWaitMs]="debouncetime"\n [typeaheadItemTemplate]="customItemTemplate"\n [optionsListTemplate]="customListTemplate"\n (input)="onInputChange($event)"\n (keydown)="listenQuery = true"\n (keydown.enter)="$typeaheadEvent = $event;handleEnterEvent($event)"\n (keydown.arrowdown)="selectNext($event)"\n (blur)="invokeOnTouched($event)"\n (click)="handleFocus($event);"\n (focus)="_unsubscribeDv = false; listenQuery = true; handleFocus($event); invokeOnFocus($event);"\n (focusout)="onFocusOut()"\n [typeaheadMinLength]="minchars"\n [typeaheadOptionsLimit]="limit"\n (typeaheadLoading)="_loadingItems"\n (typeaheadOnSelect)="typeaheadOnSelect($event)"\n typeaheadOptionField="label"\n [typeaheadGroupField]="groupby ? \'groupby\' : null"\n [typeaheadAsync]="true"\n [typeaheadScrollable]="true"\n [adaptivePosition]="true"\n [typeaheadOptionsInScrollableView]="optionslimitinscrollableview"\n [dropup]="dropup"\n [tabindex]="tabindex"\n [attr.name]="name"\n [attr.aria-label]="arialabel || \'Search field\'"/>\n <i class="btn-close wi wi-cancel" [hidden]="!showClosebtn" (click)="clearSearch($event);"></i>\n} @else {\n <button type="button" class="btn btn-icon form-control-feedback back-btn" aria-hidden="true" (click)="closeSearch()"><i class="app-icon {{backsearchiconclass}}"></i></button>\n <span class="sr-only">Back button</span>\n <input [title]="query || \'\'" type="text" class="app-textbox form-control list-of-objs app-search-input" [placeholder]="placeholder || \'\'"\n focus-target\n [container]="containerTarget || \'.wm-app\'"\n [disabled]="disabled"\n [attr.accesskey]="shortcutkey"\n autocomplete="off"\n [(ngModel)]="query"\n [ngModelOptions]="{standalone: true}"\n [readonly]="readonly"\n [typeahead]="typeaheadDataSource"\n [typeaheadWaitMs]="debouncetime"\n [typeaheadItemTemplate]="customItemTemplate"\n [optionsListTemplate]="customListTemplate"\n (input)="onInputChange($event)"\n (keydown)="listenQuery = true"\n (keydown.enter)="$typeaheadEvent = $event;handleEnterEvent($event)"\n (keydown.arrowdown)="selectNext($event)"\n (blur)="invokeOnTouched($event); onFocusOut()"\n (click)="handleFocus($event);"\n (focus)="_unsubscribeDv = false; listenQuery = true; handleFocus($event); invokeOnFocus($event)"\n [typeaheadMinLength]="minchars"\n [typeaheadOptionsLimit]="limit"\n (typeaheadLoading)="_loadingItems"\n (typeaheadOnSelect)="typeaheadOnSelect($event)"\n typeaheadOptionField="label"\n [typeaheadGroupField]="groupby ? \'groupby\' : null"\n [typeaheadAsync]="true"\n [typeaheadScrollable]="true"\n [adaptivePosition]="true"\n [typeaheadOptionsInScrollableView]="optionslimitinscrollableview"\n [tabindex]="tabindex"\n [dropup]="dropup"\n [attr.name]="name"\n [attr.aria-label]="arialabel || \'Search field\'">\n <input class="model-holder" ng-model="proxyModel" ng-required="required" tabindex="-1" aria-hidden="true">\n @if (_loadingItems) {\n <span aria-hidden="true" class="fa fa-circle-o-notch fa-spin form-control-feedback"></span>\n }\n <button type="button" class="btn btn-icon form-control-feedback clear-btn" [ngClass]="{\'show-btn\': isQueryEntered()}" (click)="clearSearch($event, true)"><i class="app-icon {{clearsearchiconclass}}"></i></button>\n <span class="sr-only">Clear button</span>\n @if (showsearchicon) {\n <span [ngClass]="{\'disabled\': disabled}" class="input-group-addon">\n <form>\n <button title="Search" [disabled]="disabled" class="app-search-button btn btn-icon" type="submit"\n (click)="onSearchSelect($event)">\n <i class="app-icon {{searchiconclass}}"></i></button>\n </form>\n </span>\n }\n }\n \x3c!--This template is for both web and fullscreen mode in mobile.--\x3e\n'}]}],ctorParameters:()=>[{type:u.Injector},{type:v.App},{type:void 0,decorators:[{type:n.Attribute,args:["datavalue.bind"]}]},{type:void 0,decorators:[{type:n.Attribute,args:["dataset.bind"]}]},{type:void 0,decorators:[{type:n.Inject,args:["EXPLICIT_CONTEXT"]},{type:n.Optional}]}],propDecorators:{typeahead:[{type:n.ViewChild,args:[o.TypeaheadDirective]}],ulElement:[{type:n.ViewChild,args:["ulElement"]}],liElements:[{type:n.ViewChildren,args:["liElements"]}]}}),e.ScrollableDirective=f,e.SearchComponent=T}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@wm/components/base"),require("@wm/core"),require("lodash-es")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@wm/components/base","@wm/core","lodash-es"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.basic=e.wm.components.basic||{},e.wm.components.basic.tree={}),e.ng.core,e.wm.components.base,e.wm.core,e._)}(this,function(e,t,i,n,a){"use strict";function s(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var o=s(t),r=s(n);class l{static{this.\u0275fac=o.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:o,type:l,deps:[],target:o.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=o.\u0275\u0275ngDeclareComponent({minVersion:"14.0.0",version:"20.3.19",type:l,isStandalone:!0,selector:"wm-tree-node-template-host",inputs:{template:"template",userComponentParams:"userComponentParams"},ngImport:o,template:'\n <span class="wm-tree-node-inner" [wmItemTemplate]="template" [userComponentParams]="userComponentParams" partialContainer>\n <span partial-container-target></span>\n </span>\n ',isInline:!0,dependencies:[{kind:"directive",type:i.ItemTemplateDirective,selector:"[wmItemTemplate]",inputs:["userComponentParams","wmItemTemplate"],exportAs:["itemTemplateRef"]},{kind:"directive",type:i.PartialParamHandlerDirective,selector:"[partialContainer]"},{kind:"directive",type:i.PartialContainerDirective,selector:"[partialContainer]"}]})}}o.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:o,type:l,decorators:[{type:t.Component,args:[{selector:"wm-tree-node-template-host",standalone:!0,imports:[i.ItemTemplateDirective,i.PartialParamHandlerDirective,i.PartialContainerDirective],template:'\n <span class="wm-tree-node-inner" [wmItemTemplate]="template" [userComponentParams]="userComponentParams" partialContainer>\n <span partial-container-target></span>\n </span>\n '}]}],propDecorators:{template:[{type:t.Input}],userComponentParams:[{type:t.Input}]}});const c={widgetType:"wm-tree",hostClass:"app-tree"},d="plus-minus",p="selectedNodeId",m="selectedNodePath";class h extends i.StylableComponent{static{this.initializeProps=void i.register("wm-tree",new Map([["class",i.PROP_STRING],["template",i.PROP_STRING],["dataset",{value:"node1, node2, node3",...i.PROP_ANY}],["datavalue",i.PROP_STRING],["levels",{value:0,...i.PROP_NUMBER}],["name",i.PROP_STRING],["nodeaction",i.PROP_STRING],["nodechildren",i.PROP_STRING],["nodeclick",{value:"none",...i.PROP_STRING}],["nodeicon",i.PROP_STRING],["nodeid",i.PROP_STRING],["nodelabel",i.PROP_STRING],["orderby",i.PROP_STRING],["statehandler",{value:"none",...i.PROP_STRING}],["show",{value:!0,...i.PROP_BOOLEAN}],["tabindex",{value:0,...i.PROP_NUMBER}],["treeicons",i.PROP_STRING]]))}constructor(e,n,a,s,o,r,l,d){super(e,c,d),this.binddatavalue=n,this.bindnodelabel=a,this.bindnodeicon=s,this.bindnodechildren=o,this.bindnodeid=r,this.nodeTemplateRefs=[],this.setting={data:{simpleData:{enable:!1}},view:{dblClickExpand:!1,fontCss:{"font-awesome":!0},switchIcon:{}},check:{},callback:{}},this.addDiyDom=(e,t)=>{if(!this.template)return;const i=$("#"+t.tId+"_a");if(!i.length||i.find(".wm-tree-node-template-host").length)return;$("#"+t.tId+"_switch").hide(),$("#"+t.tId+"_span").hide();const n=document.createElement("span");n.className="wm-tree-node-template-host wm-tree-node-item",t.disabled&&n.classList.add("wm-tree-node-disabled"),i.append(n),this.mountTreeNodeTemplateHost(n,t)},this.ngZone=e.get(t.NgZone),this.applicationRef=e.get(t.ApplicationRef),this.environmentInjector=e.get(t.EnvironmentInjector),this.statePersistence=l,i.styler(this.nativeElement,this,i.APPLY_STYLES_TYPE.CONTAINER),this.setting.view.nodeClasses=this.setNodeClasses,this.setting.callback.onClick=this.onClick.bind(this),this.setting.callback.onExpand=this.onExpand.bind(this),this.setting.callback.onCollapse=this.onCollapse.bind(this)}onPropertyChange(e,t,i){switch(e){case"dataset":this.nodes=this.getNodes(t),this.renderTree();break;case"levels":this.level=t,this.renderTree();break;case"nodeicon":this.nodeicon=t,this.renderTree();break;case"nodelabel":this.nodelabel=t,this.renderTree();break;case"nodechildren":this.nodechildren=t,this.renderTree();break;case"orderby":this.orderby=t,this.renderTree();break;case"treeicons":this.treeicons=t,this.renderTree();break;case"template":this.template=t,this.renderTree();break;case"class":this.treeClass=t,this.setTreeTemplate(this.treeClass),super.onPropertyChange(e,t,i),this.renderTree();break;case"statehandler":super.onPropertyChange(e,t,i),"none"!==String(t||"").toLowerCase()&&this.zTree&&this.nodes?.length&&setTimeout(()=>this.restorePersistedSelectionAfterStatehandlerChange(),0);break;default:super.onPropertyChange(e,t,i)}}setTemplate(e){this.template=e,this.viewParent&&this.viewParent.prefabName&&(this.prefabName=this.viewParent.prefabName),this.renderTree()}destroyNodeTemplateHostRefs(){this.nodeTemplateRefs.forEach(e=>e.destroy()),this.nodeTemplateRefs=[]}refreshTreeNodeTemplateHosts(){this.template&&this.nodeTemplateRefs.length&&this.ngZone.run(()=>{for(const e of this.nodeTemplateRefs)try{e.changeDetectorRef.detectChanges()}catch{}})}buildCustomTemplateItemProxy(e){const t=e.data,i=t&&"object"==typeof t?n.getClonedObject(t):t,a=this,s=Object.create(e);s.toggleExpand=t=>{t&&(t.preventDefault?.(),t.stopPropagation?.()),e.isParent&&a.expandNode(e,!e.open,!0)},Object.defineProperty(s,"isSelected",{enumerable:!0,configurable:!0,get:()=>!!a.zTree?.isSelectedNode?.(e)});return{...i,_node:Object.create(s)}}mountTreeNodeTemplateHost(e,i){const n=t.createComponent(l,{environmentInjector:this.environmentInjector,elementInjector:this.inj,hostElement:e});n.setInput("template",this.template),n.setInput("userComponentParams",{dataObject:this.buildCustomTemplateItemProxy(i)}),this.applicationRef.attachView(n.hostView),n.changeDetectorRef.detectChanges(),this.nodeTemplateRefs.push(n)}ngOnDestroy(){this.destroyNodeTemplateHostRefs(),super.ngOnDestroy()}expandTree(e,t,i){t.map(t=>{const n=t.children;n&&i<e?(t.open=!0,this.expandTree(e,n,i+1)):i=0})}setTreeTemplate(e){const t=e?.split(" ");t?.length&&(t.includes("Classic")?this.setting.check.enable=!1:t.includes("Checkbox")?(this.setting.check.enable=!0,this.setting.check.chkStyle="checkbox"):t.includes("Radio")&&(this.setting.check.enable=!0,this.setting.check.chkStyle="radio",this.setting.check.radioType="all"))}getNodesFromString(e){return e.split(",").map(e=>({label:e&&e.trim()}))}getNodes(e){let t;if(a.isArray(e))t=i.getOrderedDataset(e,this.orderby);else if(a.isObject(e))t=[e];else if(a.isString(e)&&!a.isEmpty(e)){const n=e.trim();if(n){if(n.startsWith("[")||n.startsWith("{"))try{const e=JSON.parse(n);a.isArray(e)?t=i.getOrderedDataset(e,this.orderby):a.isObject(e)&&(t=[e])}catch{}t||(t=this.getNodesFromString(n))}}return t}setNodeClasses(e,t){const i=[];return t.icon&&i.push(`${t.icon}`),t.disabled&&i.push("wm-tree-node-disabled"),i.length?{add:i}:""}changeTreeIcons(e){let t=$('ul[name="'+this.name+'"] li span.button.switch');$(t).map((t,i)=>{$(i).addClass(e),$(i).on("click",function(t){setTimeout(()=>{$(i).addClass(e)},0)})})}getPath(e,t){return t=null===e.getParentNode()?"/"+e.name+t:this.getPath(e.getParentNode(),t)+"/"+e.name}onClick(e,t,i,n){if(!i.disabled){if("expand"===this.nodeclick){var a=this.zTree.getSelectedNodes();a.length>0&&this.expandNode(a[0],!a[0].open,!0)}this.selectNode(e,i)}}onExpand(e,t,i){let a=this,s=this.getPath(i,"");const o={$event:e,$item:n.getClonedObject(i.data),$path:s};this.invokeEventCallback("expand",o);const r=i.children;r?.map(e=>{if(e.isParent){let t=$(`#${e.tId}_switch`);$(t).addClass(a.treeicons||d),$(t).on("click",function(e){setTimeout(()=>{$(t).addClass(a.treeicons||d)},0)})}}),this.refreshTreeNodeTemplateHosts()}onCollapse(e,t,i){let a=this.getPath(i,"");const s={$event:e,$item:n.getClonedObject(i.data),$path:a};this.invokeEventCallback("collapse",s),this.refreshTreeNodeTemplateHosts()}constructZTreeData(e,t){e.forEach(e=>{const s={},o=i.getEvaluatedData(e,{field:this.nodelabel,bindExpression:this.bindnodelabel},this.viewParent),r=null!=o&&""!==o?o:e.label??e.key??e.name??"",l=i.getEvaluatedData(e,{field:this.nodeicon,bindExpression:this.bindnodeicon},this.viewParent)||e.icon,c=i.getEvaluatedData(e,{field:this.nodeid,bindExpression:this.bindnodeid},this.viewParent),d=i.getEvaluatedData(e,{field:this.nodechildren,bindExpression:this.bindnodechildren},this.viewParent)||e.children;s.name=null==r?"":String(r),this.template||(s.icon=l),s.nodeId=c,s.data=n.getClonedObject(e),e.selected&&(s.selected=!0),e.disabled&&(s.disabled=!0,s.chkDisabled=!0),null!=e.iconSkin&&""!==e.iconSkin&&(s.iconSkin=e.iconSkin),null!=e.iconOpen&&""!==e.iconOpen&&(s.iconOpen=e.iconOpen),null!=e.iconClose&&""!==e.iconClose&&(s.iconClose=e.iconClose),a.isArray(d)&&d.length&&(s.children=[],this.constructZTreeData(d,s.children)),t.push(s)})}renderTree(){this.destroyNodeTemplateHostRefs(),this.setting.view.addDiyDom=this.template?this.addDiyDom:function(e,t){if(t.disabled){$("#"+t.tId+"_switch").addClass("wm-tree-node-disabled")}},this.nativeElement.classList.toggle("app-tree-custom",!!this.template),this.zTreeNodes=[],this.nodes?.length&&(this.nativeElement.setAttribute("id",this.name),this.constructZTreeData(this.nodes,this.zTreeNodes),this.level>0&&this.expandTree(this.level,this.zTreeNodes,0)),this.zTree=$.fn.zTree.init($('ul[name="'+this.name+'"]'),this.setting,this.zTreeNodes),$.fn.zTreeKeyboardNavigation(this.zTree,$('ul[name="'+this.name+'"]'),null,this.treeicons||d),this.postRenderTree()}isStatePersistenceEnabled(){return!!this.statePersistence.computeMode(this.statehandler)}clearPersistedTreeSelection(){this.isStatePersistenceEnabled()&&(this.statePersistence.removeWidgetState(this,p),this.statePersistence.removeWidgetState(this,m))}persistTreeSelection(e,t){if(!this.isStatePersistenceEnabled())return;const i={[m]:e};null!=t&&""!==t&&(i[p]=t),this.statePersistence.setWidgetState(this,i)}readPersistedTreeSelection(){return this.isStatePersistenceEnabled()?this.statePersistence.getWidgetState(this):void 0}hasPersistedTreeSelection(e){if(!e||"object"!=typeof e)return!1;const t=a.get(e,p),i=a.get(e,m),n=null!=t&&""!==t,s="string"==typeof i&&i.length>0;return n||s}restorePersistedSelectionAfterStatehandlerChange(){if(!this.zTree||!this.isStatePersistenceEnabled())return;const e=this.readPersistedTreeSelection();this.hasPersistedTreeSelection(e)&&this.restoreTreeSelectionFromPersistedState(e)}getAllZTreeNodesFlat(){return this.zTree?this.zTree.transformToArray(this.zTree.getNodes()):[]}nodeIdLookupCandidates(e){const t=[],i=e=>{null==e||""===e||t.includes(e)||t.push(e)};return i(e),i(String(e)),"string"!=typeof e||""===e.trim()||Number.isNaN(Number(e))||i(Number(e)),t}findZTreeNodeByStoredNodeId(e){if(!this.zTree||null==e||""===e)return null;const t=this.nodeIdLookupCandidates(e);if("function"==typeof this.zTree.getNodeByParam)for(const e of t){const t=this.zTree.getNodeByParam("nodeId",e,null);if(t)return t}return this.getAllZTreeNodesFlat().find(e=>void 0!==e.nodeId&&null!==e.nodeId&&t.some(t=>String(e.nodeId)===String(t)))||null}findZTreeNodeByStoredPath(e){return e&&this.zTree&&this.getAllZTreeNodesFlat().find(t=>this.treePathsEqual(this.getPath(t,""),e))||null}applyStoredSelectionToTree(e){e&&this.zTree&&!e.disabled&&(this.expandAncestors(e),this.zTree.selectNode(e,!1),this.selectNode(void 0,e),this.expandNode(e,!0,!1))}restoreTreeSelectionFromPersistedState(e){if(!this.zTree||!e)return!1;const t=a.get(e,p);if(null!=t&&""!==t){const e=this.findZTreeNodeByStoredNodeId(t);if(e)return this.applyStoredSelectionToTree(e),!0}const i=a.get(e,m);if("string"==typeof i&&i.length){const e=this.findZTreeNodeByStoredPath(i);if(e)return this.applyStoredSelectionToTree(e),!0}return!1}treePathsEqual(e,t){if(e===t)return!0;const i=e=>(e.startsWith("/")?e:"/"+e).replace(/\/+/g,"/");return i(e)===i(t)}expandAncestors(e){if(!this.zTree||!e?.getParentNode)return;const t=[];let i=e.getParentNode();for(;i;)t.push(i),i=i.getParentNode();for(let e=t.length-1;e>=0;e--)this.zTree.expandNode(t[e],!0,!1,!1,!0)}setChecked(e,t){t.checked=e.checked;const n=i.getEvaluatedData(t,{field:this.nodechildren,bindExpression:this.bindnodechildren},this.viewParent)||t.children;n?.length&&n.forEach((t,i)=>{this.setChecked(e.children[i],t)})}selectNode(e,t){if($(`.app-tree[name=${this.name}] li[treenode].selected`).removeClass("selected"),!t)return this.clearPersistedTreeSelection(),void this.refreshTreeNodeTemplateHosts();if(t.disabled)return;$(`#${t.tId}:has(.curSelectedNode)`).addClass("selected");const i=(this.treeClass||"").split(" ");(i.includes("Checkbox")||i.includes("Radio"))&&this.setChecked(t,t.data);const a=this.getPath(t,"");this.selecteditem=n.getClonedObject(t.data)||{},this.selecteditem.path=a,this.persistTreeSelection(a,t.nodeId);const s={$event:e,$item:n.getClonedObject(t.data),$path:a},o=t.data[this.nodeaction||"action"];o&&n.$parseEvent(o)(this),this.invokeEventCallback("select",s),this.refreshTreeNodeTemplateHosts()}expandNode(e,t,i){this.zTree.expandNode(e,t,!1,!1,i);const n=$(`#${e.tId}_switch`);$(n).addClass(this.treeicons||d),this.refreshTreeNodeTemplateHosts()}postRenderTree(){setTimeout(()=>{this.changeTreeIcons(this.treeicons||d),this.syncSelectionAfterZTreeRender()},200)}syncSelectionAfterZTreeRender(){if(!this.zTree)return;const e=this.getAllZTreeNodesFlat().find(e=>e.selected&&!e.disabled);if(e)return this.zTree.selectNode(e,!1),this.selectNode(void 0,e),void this.expandNode(e,!0,!1);const t=this.readPersistedTreeSelection();this.hasPersistedTreeSelection(t)&&this.restoreTreeSelectionFromPersistedState(t)||this.applyDatavalueDefaultSelection()}applyDatavalueDefaultSelection(){if(!this.datavalue||this.selecteditem)return;const e=this.zTree.getNodes();if(!e?.length)return;let t;if("FirstNode"===this.datavalue)t=e.find(e=>!e.disabled)??null;else if("LastNode"===this.datavalue)for(let i=e.length-1;i>=0;i--)if(!e[i].disabled){t=e[i];break}t&&(this.zTree.selectNode(t,!1),this.selectNode(void 0,t),this.expandNode(t,!0,!1))}selectById(e){const t=this.findZTreeNodeByStoredNodeId(e);t&&this.applyStoredSelectionToTree(t)}deselectById(e){this.selecteditem={},this.clearPersistedTreeSelection()}static{this.\u0275fac=o.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:o,type:h,deps:[{token:o.Injector},{token:"datavalue.bind",attribute:!0},{token:"nodelabel.bind",attribute:!0},{token:"nodeicon.bind",attribute:!0},{token:"nodechildren.bind",attribute:!0},{token:"nodeid.bind",attribute:!0},{token:r.StatePersistence},{token:"EXPLICIT_CONTEXT",optional:!0}],target:o.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=o.\u0275\u0275ngDeclareComponent({minVersion:"14.0.0",version:"20.3.19",type:h,isStandalone:!0,selector:"ul[wmTree]",providers:[i.provideAsWidgetRef(h)],usesInheritance:!0,ngImport:o,template:'<ul #wmTree class="ztree" id="ztree"></ul> ',encapsulation:o.ViewEncapsulation.None})}}o.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:o,type:h,decorators:[{type:t.Component,args:[{standalone:!0,selector:"ul[wmTree]",providers:[i.provideAsWidgetRef(h)],encapsulation:t.ViewEncapsulation.None,template:'<ul #wmTree class="ztree" id="ztree"></ul> '}]}],ctorParameters:()=>[{type:o.Injector},{type:void 0,decorators:[{type:t.Attribute,args:["datavalue.bind"]}]},{type:void 0,decorators:[{type:t.Attribute,args:["nodelabel.bind"]}]},{type:void 0,decorators:[{type:t.Attribute,args:["nodeicon.bind"]}]},{type:void 0,decorators:[{type:t.Attribute,args:["nodechildren.bind"]}]},{type:void 0,decorators:[{type:t.Attribute,args:["nodeid.bind"]}]},{type:r.StatePersistence},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}]}),e.TreeComponent=h}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@wm/core"),require("@wm/components/base"),require("lodash-es"),require("moment"),require("@fullcalendar/core"),require("@fullcalendar/daygrid"),require("@fullcalendar/timegrid"),require("@fullcalendar/list"),require("@fullcalendar/interaction"),require("@fullcalendar/core/locales-all")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@wm/core","@wm/components/base","lodash-es","moment","@fullcalendar/core","@fullcalendar/daygrid","@fullcalendar/timegrid","@fullcalendar/list","@fullcalendar/interaction","@fullcalendar/core/locales-all"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.input=e.wm.components.input||{},e.wm.components.input.calendar={}),e.ng.core,e.wm.core,e.wm.components.base,e._,e.momentLib,e.core,e.dayGridPlugin,e.timeGridPlugin,e.listPlugin,e.interactionPlugin,e.allLocales)}(this,function(e,t,i,n,a,s,o,r,l,c,d,p){"use strict";function m(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var h=m(t),u=m(i),g=m(s);const v=g.default||window.moment,f={start:"prev next today",center:"title",end:"dayGridMonth dayGridWeek dayGridDay"},b="basic",y="list",w="Year",P="Month",C="Week",T="Day",O="Today",I="none",D="single",E={START:"00:00",END:"24:00"},R=e=>{const t=(e=v(e)).format("YYYY"),i=e.format("MM")-1,n=e.format("DD"),a=e.format("HH"),s=e.format("mm"),o=e.format("ss");return new Date(t,i,n,a,s,o)},S={widgetType:"wm-calendar",hostClass:"app-calendar"};class _ extends n.StylableComponent{static{this.initializeProps=(()=>{const e=new Map([["calendartype",{value:"basic",...n.PROP_STRING}],["class",n.PROP_STRING],["tabindex",{value:0,...n.PROP_NUMBER}],["controls",{value:"navigation, today, year, month, week, day",...n.PROP_STRING}],["dataset",n.PROP_ANY],["datavalue",n.PROP_STRING],["eventallday",n.PROP_STRING],["eventclass",n.PROP_STRING],["eventend",n.PROP_STRING],["eventstart",n.PROP_STRING],["eventtitle",n.PROP_STRING],["name",n.PROP_STRING],["show",{value:!0,...n.PROP_BOOLEAN}],["showindevice",{displayType:"inline-block",value:"all",...n.PROP_STRING}],["view",n.PROP_STRING],["selectionmode",n.PROP_STRING]]);n.register("wm-calendar",e)})()}selectDate(){let e,t;a.isObject(this.datavalue)&&!a.isDate(this.datavalue)?(e=v(this.datavalue.start),t=v(this.datavalue.end)):(e=v(this.datavalue),t=v(this.datavalue).add(1,"day").startOf("day")),this.$fullCalendar.gotoDate(v(e)._d),this.$fullCalendar.select(e.valueOf(),t.valueOf())}gotoDate(){this.$fullCalendar.gotoDate(v(this.datavalue)._d)}gotoNextYear(){this.$fullCalendar.nextYear()}gotoPrevYear(){this.$fullCalendar.prevYear()}gotoMonth(e){let t=this.$fullCalendar.getDate();const i=t.getMonth();t=v(t),i<e?this.$fullCalendar.gotoDate(t.add(e-i-1,"M").valueOf()):this.$fullCalendar.gotoDate(t.subtract(i-e+1,"M").valueOf())}gotoNextMonth(){const e=v(this.$fullCalendar.getDate());this.$fullCalendar.gotoDate(e.add(1,"M").valueOf())}gotoPrevMonth(){const e=v(this.$fullCalendar.getDate());this.$fullCalendar.gotoDate(e.subtract(1,"M").valueOf())}rerenderEvents(){this.$fullCalendar.render()}setSelectedData(e,t){let i=this.dataset;if(!i)return;const n=[],a=this.eventstart||"start",s=this.eventend||"end",o=v(new Date(e)).format("MM/DD/YYYY"),r=v(new Date(t)).subtract(1,"days").format("MM/DD/YYYY");return i=i.data||i,i.forEach(e=>{if(!e[a])return;const t=v(new Date(e[a])).format("MM/DD/YYYY"),i=v(new Date(e[s]||e[a])).format("MM/DD/YYYY");v(t).isSameOrAfter(o)&&v(i).isSameOrBefore(r)&&n.push(e)}),n}eventDrop(e){let t=this.convertEventObjForOldAndNewData(e.event),i=this.convertEventObjForOldAndNewData(e.oldEvent);this.invokeEventCallback("eventdrop",{$event:e.jsEvent,$newData:t,$oldData:i,$delta:e.delta,$revertFunc:e.revert,$ui:{},$view:e.view})}getDefaultDate(){if(this.datavalue)return new Date(this.datavalue)}getDefaultOptions(){return this.calendarOptions}getLib(){return"fullcalendar"}select(e){this.selecteddates={start:R(e.start),end:R(e.end)},this.selecteddata=this.setSelectedData(e.start,e.end),this.invokeEventCallback("select",{$start:e.start.valueOf(),$end:e.end.valueOf(),$view:e.view,$data:this.selecteddata})}unselect(){this.$fullCalendar.unselect()}convertEventObj(e){if(!e.extendedProps._eventMetadata)return e;const t=e.extendedProps._eventMetadata;return Object.setPrototypeOf(t,e),t}convertEventObjForOldAndNewData(e){const t=e.extendedProps;return a.extend(e,t),e}eventResize(e){let t=this.convertEventObjForOldAndNewData(e.event),i=this.convertEventObjForOldAndNewData(e.oldEvent);this.invokeEventCallback("eventresize",{$event:e.jsEvent,$newData:t,$oldData:i,$delta:e.delta,$revertFunc:e.revert,$ui:{},$view:e.view})}onEventChangeStart(e){this.oldData=i.getClonedObject(e)}eventClick(e){let t=this.convertEventObj(e.event);this.invokeEventCallback("eventclick",{$event:e.jsEvent,$data:t,$view:e.view})}eventDidMount(e){let t=this.convertEventObj(e.event);this.calendartype===y&&this.$element.find(".fc-list-table").addClass("table"),this.invokeEventCallback("eventrender",{$event:e.el,$data:t,$view:e.view})}viewDidMount(e){this.calendartype===y&&this.$element.find(".fc-list-table").addClass("table"),this.invokeEventCallback("viewrender",{$view:e})}datesSet(e){this.currentview={start:v(e.start).format("YYYY-MM-DD"),end:v(e.end).format("YYYY-MM-DD")}}dateClick(e){const t=R(e.date).valueOf();this.invokeEventCallback("dateclick",{$dateInfo:t})}updateCalendarHeaderOptions(){const e=this.controls,t=this.calendartype,i=new RegExp("\\bday\\b","g");let n="",s="";e&&t&&(a.includes(e,"navigation")&&(n+=" prev next"),a.includes(e,"today")&&(n+=" today"),a.includes(e,"year")&&(s+=t===y?"listYear":""),a.includes(e,"month")&&(s+=t===y?" listMonth":" dayGridMonth"),a.includes(e,"week")&&(s+=t===b?" dayGridWeek":t===y?" listWeek":" timeGridWeek"),i.test(e)&&(s+=t===b?" dayGridDay":t===y?" listDay":" timeGridDay")," "===n.charAt(0)&&(n=n.substring(1))," "===s.charAt(0)&&(s=s.substring(1)),a.extend(this.calendarOptions.calendar.headerToolbar,{start:n,end:s}))}constructor(e,t,n){super(e,S,n),this.controls="navigation, today, year, month, week, day",this.eventSources=[],this.dataSetEvents={events:[]},this.changesStack=[],this.calendarOptions={calendar:{height:600,eventSources:this.eventSources,editable:!0,locale:i.getSessionStorageItem("selectedLocale")||"en",selectable:!1,longPressDelay:i.isMobile()?1:1e3,headerToolbar:f,nextDayThreshold:E,views:{month:{dayMaxEventsRow:!0}},unselectAuto:!1,eventDrop:this.eventDrop.bind(this),eventResizeStart:this.onEventChangeStart.bind(this),eventDragStart:this.onEventChangeStart.bind(this),eventResize:this.eventResize.bind(this),eventClick:this.eventClick.bind(this),select:this.select.bind(this),eventDidMount:this.eventDidMount.bind(this),viewDidMount:this.viewDidMount.bind(this),datesSet:this.datesSet.bind(this),dateClick:this.dateClick.bind(this)}},this.dayClass=[],this.eventSources.push(this.dataSetEvents);let a=window.FullCalendar?window.FullCalendar:o.Calendar;a.__wm_locale_initialized||(t.initCalendarLocale(),a.__wm_locale_initialized=!0),this.cancelLocaleChangeSubscription=this.getAppInstance().subscribe("locale-changed",e=>{this.setLocale(),this.applyCalendarOptions("option","locale",e.fullCalendar||"en"),this.redraw()})}ngOnInit(){super.ngOnInit(),n.styler(this.nativeElement,this,n.APPLY_STYLES_TYPE.CONTAINER,["height"]),this.setLocale()}onStyleChange(e,t,i){super.onStyleChange(e,t,i),"height"===e&&(this.calendarOptions.calendar.height=this.calculateHeight(t),this.updateCalendarOptions("option","height",this.calendarOptions.calendar.height))}onPropertyChange(e,t,s){switch(super.onPropertyChange(e,t,s),e){case"selectionmode":t!==I?(this.calendarOptions.calendar.selectable=!0,this.updateCalendarOptions("option","selectable",!0),t===D?(this.calendarOptions.calendar.selectConstraint={startTime:"00:00",endTime:"24:00"},this.updateCalendarOptions("option","selectConstraint",this.calendarOptions.calendar.selectConstraint)):this.updateCalendarOptions("option","selectConstraint",{})):(this.calendarOptions.calendar.selectable=!1,this.updateCalendarOptions("option","selectable",!1));break;case"view":"month"!==t||this.calendartype===y?this.calendarOptions.calendar.defaultView=this.calendartype+a.capitalize(t):this.calendarOptions.calendar.defaultView=t,this.updateCalendarOptions("changeView",this.calendarOptions.calendar.defaultView);break;case"calendartype":this.calendartype=t||"dayGrid";case"controls":this.updateCalendarHeaderOptions();break;case"dataset":let e;this.dataset=t,e=n.createArrayFrom(i.getClonedObject(t)),e=this.constructCalendarDataset(e),this.dataSetEvents.events=e.filter(e=>{if(e.start=e.start||e.end,e.start)return!0}),this.renderEventDataSet();break;case"show":this.$fullCalendar?.changeView(this.getViewType(this.view?this.view:"dayGridMonth"))}}calculateHeight(e){const t=$(this.nativeElement).parent(),i=e||"650px";let n,s=t.css("height");return a.includes(i,"%")?(a.includes(s,"%")&&(s=t.height()),n=parseInt(s,10)*Number(i.replace(/\%/g,""))/100):n=parseInt(i,10),this.calendarOptions.calendar.views.month.eventLimit=parseInt(""+n/200,10)+1,n}ngAfterViewInit(){super.ngAfterViewInit();const e=this._calendar.nativeElement;let t;window.FullCalendar?t=window.FullCalendar.Calendar:(t=o.Calendar,this.calendarOptions.calendar={...this.calendarOptions.calendar,plugins:[r,l,c,c,d],locales:p});const i=new t(e,this.calendarOptions.calendar);this.$fullCalendar=i,this.invokeEventCallback("beforerender",{$event:{}}),i.render(),this.changesStack.length&&(this.changesStack.forEach(e=>{this.applyCalendarOptions(e.operationType,e.argumentKey,e.argumentValue)}),this.changesStack.length=0),$(".fc-prev-button").attr("aria-label","prev"),$(".fc-next-button").attr("aria-label","next"),$(".fc-today-button").attr("aria-label","today"),setTimeout(()=>{this.$fullCalendar.changeView(this.getViewType(this.view?this.view:"dayGridMonth"))},50)}constructCalendarDataset(e){const t={title:this.eventtitle||"title",allDay:this.eventallday||"allday",start:this.eventstart||"start",end:this.eventend||"end",className:this.eventclass||"className"};return e.forEach(e=>{e._eventMetadata=a.clone(e),a.isEmpty(e._eventMetadata.url)&&delete e._eventMetadata.url,a.isEmpty(e.url)&&delete e.url,a.mapKeys(t,(t,i)=>{let s;s="title"===i?n.getEvaluatedData(e,{expression:t},this.viewParent):"allDay"===i?!!a.get(e,t):a.get(e,t),s&&(e[i]=s)})}),e}setLocale(){const e=a.get(this.appLocale,"LABEL_CALENDAR_YEAR")||w,t=a.get(this.appLocale,"LABEL_CALENDAR_MONTH")||P,i=a.get(this.appLocale,"LABEL_CALENDAR_WEEK")||C,n=a.get(this.appLocale,"LABEL_CALENDAR_DAY")||T,s=a.get(this.appLocale,"LABEL_CALENDAR_TODAY")||O;this.calendarOptions.calendar.buttonText={year:e,month:t,week:i,day:n,today:s,listYear:e,listMonth:t,listWeek:i,listDay:n}}overrideDefaults(e){a.isObject(e)&&Object.entries(e).map(e=>this.$fullCalendar.setOption(e[0],e[1]))}updateCalendarOptions(e,t,i){this.$fullCalendar?this.applyCalendarOptions(e,t,i):this.changesStack.push({operationType:e,argumentKey:t,argumentValue:i})}redraw(){this.updateCalendarOptions("render"),this.$fullCalendar?.changeView(this.getViewType(this.view?this.view:"dayGridMonth"))}onValueChange(e){this.proxyModel=e;const t=this.proxyModel&&v(this.proxyModel).startOf("day").format("YYYY/MM/DD"),i=this.eventData[t],n=v(this.proxyModel),a=v(this.proxyModel).endOf("day");this.selecteddata=i,this.selecteddates={start:v(t).valueOf(),end:v(t).endOf("day").valueOf()},this.calendarOptions.calendar.select(n.valueOf(),a.valueOf(),{},this,i),i&&this.calendarOptions.calendar.eventClick(i,{},this)}addEventSource(e){if(a.isEmpty(e))console.warn("addEventSource method requires an object as a parameter.");else if("google"===e.source){if(!e.googleCalendarApiKey||!e.googleCalendarId)return void console.warn("For google calendar integration, 'googleCalendarApiKey' and 'googleCalendarId' should be passed in the parameter object.");this.$fullCalendar.setOption("googleCalendarApiKey",e.googleCalendarApiKey),this.$fullCalendar.addEventSource({googleCalendarId:e.googleCalendarId})}}getViewType(e){const t=this.calendartype,i=this.view;let n;return n="month"===i?t===y?"listMonth":"dayGridMonth":"week"===i?t===b?"dayGridWeek":t===y?"listWeek":"timeGridWeek":"day"===i?t===b?"dayGridDay":t===y?"listDay":"timeGridDay":"year"===i?t===y?"listYear":"":e,n}applyCalendarOptions(e,t,i){switch(e){case"render":this.$fullCalendar.render();break;case"option":this.$fullCalendar.setOption(t,i);break;case"changeView":const e=this.getViewType(t);this.$fullCalendar.changeView(e)}}renderEventDataSet(){const e=this;this.$fullCalendar.batchRendering(function(){const t=e.$fullCalendar.getEvents();a.each(t,function(t){e.$fullCalendar.getEventById(t.id).remove()}),a.each(e.dataSetEvents.events,function(t){e.$fullCalendar.addEvent(t)})})}ngOnDestroy(){this.cancelLocaleChangeSubscription&&this.cancelLocaleChangeSubscription()}static{this.\u0275fac=h.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:h,type:_,deps:[{token:h.Injector},{token:u.AbstractI18nService},{token:"EXPLICIT_CONTEXT",optional:!0}],target:h.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=h.\u0275\u0275ngDeclareComponent({minVersion:"14.0.0",version:"20.3.19",type:_,isStandalone:!0,selector:"[wmCalendar]",providers:[n.provideAsWidgetRef(_)],viewQueries:[{propertyName:"_calendar",first:!0,predicate:["calendar"],descendants:!0},{propertyName:"_datepicker",first:!0,predicate:["datepicker"],descendants:!0}],usesInheritance:!0,ngImport:h,template:"<div #calendar></div>\n",encapsulation:h.ViewEncapsulation.None})}}h.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:h,type:_,decorators:[{type:t.Component,args:[{standalone:!0,selector:"[wmCalendar]",providers:[n.provideAsWidgetRef(_)],encapsulation:t.ViewEncapsulation.None,template:"<div #calendar></div>\n"}]}],ctorParameters:()=>[{type:h.Injector},{type:u.AbstractI18nService},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}],propDecorators:{_calendar:[{type:t.ViewChild,args:["calendar"]}],_datepicker:[{type:t.ViewChild,args:["datepicker"]}]}}),e.CalendarComponent=_}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common"),require("@angular/core"),require("@angular/forms"),require("@wm/core"),require("@wm/components/base"),require("@wm/components/input/dataset-aware-form"),require("@wm/components/basic/search"),require("lodash-es")):"function"==typeof define&&define.amd?define(["exports","@angular/common","@angular/core","@angular/forms","@wm/core","@wm/components/base","@wm/components/input/dataset-aware-form","@wm/components/basic/search","lodash-es"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.input=e.wm.components.input||{},e.wm.components.input.chips={}),e.ng.common,e.ng.core,e.ng.forms,e.wm.core,e.wm.components.base,e.wm.components.input.datasetawareform,e.wm.components.basic.search,e._)}(this,function(e,t,i,n,a,s,o,r,l){"use strict";function c(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var d=c(t),p=c(i);const m=new Map([["allowonlyselect",s.PROP_BOOLEAN],["autofocus",s.PROP_BOOLEAN],["chipclass",s.PROP_STRING],["class",s.PROP_STRING],["compareby",s.PROP_STRING],["datafield",s.PROP_STRING],["dataoptions",s.PROP_ANY],["dataset",{value:"Option 1, Option 2, Option 3",...s.PROP_ANY}],["datasource",s.PROP_ANY],["datavalue",s.PROP_ANY],["datavaluesource",s.PROP_ANY],["dateformat",s.PROP_STRING],["disabled",s.PROP_BOOLEAN],["displayexpression",s.PROP_STRING],["displayfield",s.PROP_STRING],["displayimagesrc",s.PROP_STRING],["enablereorder",s.PROP_BOOLEAN],["groupby",s.PROP_STRING],["inputposition",{value:"last",...s.PROP_STRING}],["inputwidth",{value:"default",...s.PROP_STRING}],["limit",s.PROP_NUMBER],["loadingdatamsg",{value:"Loading items...",...s.PROP_STRING}],["match",s.PROP_STRING],["matchmode",s.PROP_STRING],["maxsize",s.PROP_NUMBER],["minchars",{value:1,...s.PROP_NUMBER}],["name",s.PROP_STRING],["navsearchbar",{value:!1,...s.PROP_BOOLEAN}],["orderby",s.PROP_STRING],["placeholder",{value:"Type here..",...s.PROP_STRING}],["query",s.PROP_STRING],["readonly",s.PROP_BOOLEAN],["searchkey",s.PROP_STRING],["shortcutkey",s.PROP_STRING],["show",{value:!0,...s.PROP_BOOLEAN}],["showsearchicon",s.PROP_BOOLEAN],["tabindex",{value:0,...s.PROP_NUMBER}],["type",{value:"search",...s.PROP_STRING}],["debouncetime",{value:250,...s.PROP_NUMBER}],["datacompletemsg",{value:"No more data to load",...s.PROP_STRING}]]),h={widgetType:"wm-chips",hostClass:"app-chips nav nav-pills list-inline"};class u extends o.DatasetAwareFormComponent{static{this.initializeProps=(s.register("wm-chips",m),void s.registerFormWidget(a.FormWidgetType.CHIPS,new Map(m)))}get datasource(){return this._datasource}set datasource(e){this._datasource=e,this.searchComponent.datasource=e,this._debounceUpdateQueryModel&&this._debounceUpdateQueryModel(this.datavalue||this.toBeProcessedDatavalue)}constructor(e,t,i,n,o,r,c,d){super(e,h,d),this.bindDisplayField=t,this.bindDisplayExpr=i,this.bindDisplayImgSrc=n,this.bindDataField=o,this.bindDataSet=r,this.bindChipclass=c,this.chipsList=[],this.maxSizeReached="Max size reached",this._unsubscribeDv=!1,this._debounceUpdateQueryModel=null,s.styler(this.nativeElement,this),a.isDefined(this.showsearchicon)||(this.showsearchicon=!1),this.multiple=!0,this.nextItemIndex=0,this._debounceUpdateQueryModel=a.debounce(e=>{this.updateQueryModel(e).then(()=>{this.bindChipclass&&l.forEach(this.chipsList,(e,t)=>{this.registerChipItemClass(e,t)})})},150);const p=this.dataset$.subscribe(()=>{this.searchComponent.dataset=this.dataset,this.searchComponent._lastResult=void 0,this.nextItemIndex=this.datasetItems.length,this._debounceUpdateQueryModel&&this._debounceUpdateQueryModel(this.datavalue||this.toBeProcessedDatavalue)});this.registerDestroyListener(()=>p.unsubscribe());const m=this.datavalue$.subscribe(e=>{this._unsubscribeDv||(this.chipsList=[],this._debounceUpdateQueryModel&&this._debounceUpdateQueryModel(e))});this.registerDestroyListener(()=>m.unsubscribe())}ngOnInit(){super.ngOnInit(),this.searchComponent.multiple=!0,this.searchComponent.binddisplayimagesrc=this.bindDisplayImgSrc,this.searchComponent.displayimagesrc=this.displayimagesrc,this.searchComponent.binddisplaylabel=this.bindDisplayExpr,this.searchComponent.displaylabel=this.displayfield,this.searchComponent.datafield=this.bindDataField||this.datafield,this.searchComponent.binddataset=this.bindDataSet,this.searchComponent.dataset=this.dataset,this.searchComponent.searchkey=this.searchkey,this.searchComponent.limit=this.limit,this.searchComponent.debouncetime=this.debouncetime,this.searchComponent.matchmode=this.matchmode,this.getTransformedData=(e,t)=>this.searchComponent.getTransformedData([e],this.nextItemIndex++,t)}ngAfterViewInit(){super.ngAfterViewInit(),this.enablereorder&&this.configureDnD()}registerChipItemClass(e,t){if(this.bindChipclass){const i=`${this.widgetId}_chipItemClass_${t}`;a.$unwatch(i),this.registerDestroyListener(a.$watch(this.bindChipclass,this.viewParent,{item:e,$index:t},(e,i)=>{this.applyItemClass(s.getConditionalClasses(e,i),t)},i))}}applyItemClass(e,t){const i=this.nativeElement.querySelectorAll(".chip-item").item(t);i?$(i).removeClass(e.toRemove).addClass(e.toAdd):setTimeout(()=>{const i=this.nativeElement.querySelectorAll(".chip-item").item(t);i&&$(i).removeClass(e.toRemove).addClass(e.toAdd)},50)}removeDuplicates(){this.chipsList=s.getUniqObjsByDataField(this.chipsList,this.datafield,this.displayfield||this.displaylabel)}updateQueryModel(e){const t=[];if(!e)return this.chipsList=[],Promise.resolve();let i=l.clone(e);const n=this.chipsList;this.chipsList=[],this.maxsize&&i.length>this.maxsize&&(this._modelByValue=i=l.slice(i,0,this.maxsize),e=i);const o=[];return i.forEach((t,i)=>{const a=l.find(this.datasetItems,e=>l.isObject(e.value)?l.isEqual(e.value,t):l.toString(e.value)===l.toString(t));if(a)this.chipsList.push(a);else if(this.datafield!==s.ALLFIELDS)o.push(t);else if(this.datafield===s.ALLFIELDS){let a,s=!1;if(l.isObject(t)){const e=n.find(e=>l.isEqual(e.value,t));e&&(s=e.iscustom)}else a=this.createCustomDataModel(t),s=!0,a&&e.splice(i,1,a);a=a||t;const o=this.getTransformedData(a,s)[0];s&&(o.iscustom=s),this.chipsList.push(o)}}),o.length&&t.push(this.getDefaultModel(o,this.nextItemIndex).then(t=>{this.chipsList=this.chipsList.concat(t||[]),i.forEach((t,i)=>{if(!l.find(this.chipsList,e=>e.value.toString()===t.toString())){if(this.allowonlyselect){const i=e.indexOf(t);return void(i>-1&&e.splice(i,1))}const i=this.getTransformedData(t,!0)[0];i.iscustom=!0,this.chipsList.push(i)}})})),this.resetSearchModel(!0),Promise.all(t).then(()=>{this._modelByValue=e,this.removeDuplicates(),this.updateMaxSize(),a.$appDigest()})}resetSearchModel(e){this._unsubscribeDv=!0,this.searchComponent.clearSearch(void 0,!this.minchars&&!e),this._unsubscribeDv=!1}addItem(e,t){const i=t;let n,o;if(i&&a.isDefined(i.datavalue)&&""!==i.queryModel){if(!i.query||!l.trim(i.query))return;o=i.queryModel}else{if(this.allowonlyselect)return;let e;if(this.datafield===s.ALLFIELDS&&!l.isObject(this.searchComponent.query)&&l.trim(this.searchComponent.query)&&(e=this.createCustomDataModel(this.searchComponent.query),!e))return void this.resetSearchModel();const t=e||l.trim(this.searchComponent.query);if(t){o=this.getTransformedData(t,!0)[0],o.iscustom=!0}}a.isDefined(o)&&""!==o&&(n=this.invokeEventCallback("beforeadd",{$event:e,newItem:o}),a.isDefined(n)&&!a.toBoolean(n)||(this.isDuplicate(o)?this.resetSearchModel():(this.registerChipItemClass(o,this.chipsList.length),this.chipsList.push(o),this.datavalue?this._modelByValue=[...this._modelByValue,o.value]:this._modelByValue=[o.value],this._unsubscribeDv=!0,this.invokeOnTouched(),this.invokeOnChange(this._modelByValue,e||{},!0),this.invokeEventCallback("add",{$event:e,$item:o}),this.updateMaxSize(),this.resetSearchModel(),!e||"Enter"!==e.key&&13!==e.keyCode||this.stopEvent(e))))}createCustomDataModel(e){const t=this.displayfield||(this.datafield!==s.ALLFIELDS?this.datafield:void 0);if(t){const i={};return i[t]=e,i}}isDuplicate(e){return this.datafield===s.ALLFIELDS?l.findIndex(this.chipsList,{value:e.value})>-1:l.findIndex(this.chipsList,{key:e.key})>-1}updateMaxSize(){this.saturate=this.maxsize>0&&this.chipsList.length===this.maxsize}getDefaultModel(e,t){return this.nextItemIndex++,this.searchComponent.getDataSource(e,!0,t).then(t=>l.filter(e,e=>{l.find(t,{value:e})}))}handleChipClick(e,t){this.readonly||(e.currentTarget.focus(),this.invokeEventCallback("chipclick",{$event:e,$item:t}))}handleChipFocus(e,t){this.readonly||(t.active=!0,this.invokeEventCallback("chipselect",{$event:e,$item:t}))}stopEvent(e){(e.target?.value??"").trim()&&(e.stopPropagation(),e.preventDefault())}onTextDelete(e){a.isAppleProduct&&this.onInputClear(e)}onInputClear(e){this.chipsList&&this.chipsList.length&&!this.searchComponent.query&&(this.$element.find("li.chip-item > a.app-chip").last().focus(),this.stopEvent(e))}onBackspace(e,t,i){this.readonly||this.removeItem(e,t,i,!0)}onDelete(e,t,i){this.readonly||this.removeItem(e,t,i)}onArrowLeft(e,t){this.readonly||(this.searchComponent.query||a.isDefined(t)||a.isDefined(e)?t>0?this.$element.find("li.chip-item > a.app-chip").get(t-1).focus():this.focusSearchBox():this.$element.find("li.chip-item > a.app-chip").last().focus())}onArrowRight(e,t){this.readonly||(this.searchComponent.query||a.isDefined(t)||a.isDefined(e)?t<this.chipsList.length-1?this.$element.find("li.chip-item > a.app-chip").get(t+1).focus():this.focusSearchBox():this.$element.find("li.chip-item > a.app-chip").first().focus())}focusSearchBox(){this.$element.find(".app-chip-input > input.app-textbox").focus()}removeItem(e,t,i,n){e.stopPropagation();const s=l.isArray(i)?i:[i],o=l.max(s),r=l.reduce(s,(e,t)=>(e.push(this.chipsList[t]),e),[]),c=this.invokeEventCallback("beforeremove",{$event:e,$item:1===r.length?r[0]:r});if(a.isDefined(c)&&!a.toBoolean(c))return;const d=l.clone(this.datavalue);setTimeout(()=>{const e=this.chipsList.length,t=this.$element.find("li.chip-item > a.app-chip");e&&n?e-1<o?t.get(e-1).focus():(this.chipsList[o].active=!0,t.get(o).focus()):this.focusSearchBox()});l.pullAt(this.chipsList,s).forEach(e=>{this._modelByValue=l.filter(this._modelByValue,t=>!(l.isObject(t)?l.isEqual(t,e.value):l.toString(t)===l.toString(e.value)))}),this._unsubscribeDv=!1,this.invokeOnChange(this._modelByValue,e,!0),this.invokeEventCallback("change",{$event:e,newVal:this.datavalue,oldVal:d}),this.updateMaxSize(),this.invokeEventCallback("remove",{$event:e,$item:1===r.length?r[0]:r})}swapElementsInArray(e,t,i){const n=l.pullAt(e,i)[0];e.splice(t,0,n)}resetReorder(){this.$element.removeData("oldIndex")}invokeOnBeforeServiceCall(e){this.invokeEventCallback("beforeservicecall",{inputData:e})}handleEvent(e,t,i,n){"remove"!==t&&"beforeremove"!==t&&"chipselect"!==t&&"chipclick"!==t&&"add"!==t&&"reorder"!==t&&"change"!==t&&super.handleEvent(e,t,i,n)}configureDnD(){s.configureDnD(this.$element,{items:"> li:not(.app-chip-search)",placeholder:"chip-placeholder"},this.onReorderStart.bind(this),this.update.bind(this))}onReorderStart(e,t){const i=t.helper;i.width(i.width()+1),this.$element.data("oldIndex",t.item.index()-("first"===this.inputposition?1:0))}update(e,t){let i,n,s;if(n=t.item.index()-("first"===this.inputposition?1:0),s=this.$element.data("oldIndex"),n=this.chipsList.length===n?n-1:n,i={oldIndex:s,newIndex:n,item:this.chipsList[s]},n===s)return void this.resetReorder();i.item=this.chipsList[s];const o=this.invokeEventCallback("beforereorder",{$event:e,$data:this.chipsList,$changedItem:i});a.isDefined(o)&&!1===a.toBoolean(o)?this.resetReorder():(this.swapElementsInArray(this.chipsList,n,s),this.swapElementsInArray(this._modelByValue,n,s),i.item=this.chipsList[n],this.chipsList=[...this.chipsList],this.resetReorder(),this.invokeEventCallback("reorder",{$event:e,$data:this.chipsList,$changedItem:i}))}onPropertyChange(e,t,i){if("tabindex"!==e){if("dataoptions"===e&&(this.searchComponent.dataoptions=t),"datafield"===e&&(this.searchComponent.datafield=this.datafield),"displayfield"===e&&(this.searchComponent.displaylabel=this.displayfield),"displayexpression"===e&&(this.searchComponent.binddisplaylabel=this.binddisplayexpression?this.binddisplayexpression:this.displayexpression),"displayimagesrc"===e&&(this.searchComponent.binddisplayimagesrc=this.binddisplayimagesrc?this.binddisplayimagesrc:this.displayimagesrc),"limit"===e&&(this.searchComponent.limit=this.limit),"matchmode"===e&&(this.searchComponent.matchmode=this.matchmode),"groupby"===e&&(this.searchComponent.groupby=this.groupby),"enablereorder"===e){this.$element.hasClass("ui-sortable")?this.$element.sortable("option","disabled",!t):t&&this.configureDnD();const e=this.$element.find(".chip-item a.app-chip");t?(e.removeClass("no-drag"),e.off("dragstart")):(e.addClass("no-drag"),e.on("dragstart",e=>(e.preventDefault(),!1)))}if("readonly"===e&&(t?this.$element.addClass("readonly"):this.$element.removeClass("readonly")),"inputposition"===e){const e=this.$element.find("li.app-chip-search");"first"===t?this.$element.prepend(e):this.$element.append(e)}"autofocus"===e&&t&&setTimeout(()=>{const e=this.$element.find(".app-chip-input > input.app-textbox");e&&e.length&&this.focusSearchBox()}),super.onPropertyChange(e,t,i)}}ngOnDestroy(){if(this.chipsList=[],this._debounceUpdateQueryModel=null,this.searchComponent=null,this.enablereorder&&this.$element)try{this.$element.sortable("destroy")}catch(e){}this.getTransformedData=null,this._classExpr=null,super.ngOnDestroy()}static{this.\u0275fac=p.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:p,type:u,deps:[{token:p.Injector},{token:"displayfield.bind",attribute:!0},{token:"displayexpression.bind",attribute:!0},{token:"displayimagesrc.bind",attribute:!0},{token:"datafield.bind",attribute:!0},{token:"dataset.bind",attribute:!0},{token:"chipclass.bind",attribute:!0},{token:"EXPLICIT_CONTEXT",optional:!0}],target:p.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=p.\u0275\u0275ngDeclareComponent({minVersion:"17.0.0",version:"20.3.19",type:u,isStandalone:!0,selector:"[wmChips]",providers:[s.provideAs(u,n.NG_VALUE_ACCESSOR,!0),s.provideAsWidgetRef(u)],viewQueries:[{propertyName:"searchComponent",first:!0,predicate:r.SearchComponent,descendants:!0,static:!0}],usesInheritance:!0,ngImport:p,template:'@for (item of chipsList; track item) {\n <li class="chip-item {{chipclass && !bindChipclass ? chipclass : \'\'}}"\n [ngClass]="{\'active\': item.active, \'disabled\': disabled}">\n <a href="javascript:void(0)" class="app-chip"\n (click)="handleChipClick($event, item)"\n (keydown.delete)="onDelete($event, item, $index)"\n (keydown.backspace)="onBackspace($event, item, $index)"\n (keydown.arrowleft)="onArrowLeft(item, $index)"\n (keydown.arrowright)="onArrowRight(item, $index)"\n (focus)="handleChipFocus($event, item)"\n (blur)="readonly ? 0 : item.active = false"\n [ngClass]="{\'no-drag\': !enablereorder,\'chip-duplicate bg-danger\': item.isDuplicate, \'chip-picture\': item.imgSrc}">\n @if (item.imgSrc) {\n <img data-identifier="img" alt="Chip Image" class="button-image-icon" [src]="item.imgSrc"/>\n }\n <span class="app-chip-title" [textContent]="item.label" [title]="item.label"></span>\n @if (!readonly) {\n <button type="button" [attr.aria-label]="\'Clear \' + item.label" class="btn btn-transparent"\n (click)="removeItem($event, item, $index);">\n <i class="app-icon wi wi-close"></i>\n </button>\n }\n </a>\n </li>\n}\n<li class="app-chip-search" [ngClass]="{\'full-width\': inputwidth === \'full\'}">\n <div #search wmSearch class="app-chip-input"\n name="app-chip-search"\n submit.event="addItem($event, widget)"\n beforeservicecall.event="invokeOnBeforeServiceCall(inputData)"\n disabled.bind="disabled || readonly || saturate"\n datafield.bind="datafield"\n allowonlyselect.bind="allowonlyselect"\n searchkey.bind="searchkey"\n orderby.bind="orderby"\n placeholder.bind="saturate ? maxSizeReached : placeholder"\n showsearchicon.bind="showsearchicon"\n tabindex.bind="tabindex"\n minchars.bind="minchars"\n debouncetime.bind="debouncetime"\n matchmode.bind="matchmode"\n datacompletemsg.bind = "datacompletemsg"\n groupby.bind="groupby"\n match.bind="match"\n dateformat.bind="dateformat"\n (keydown.enter)="stopEvent($event)"\n (keydown.delete)="onTextDelete($event)"\n (keydown.backspace)="onInputClear($event)"\n (keydown.arrowleft)="onArrowLeft()"\n (keydown.arrowright)="onArrowRight()">\n </div>\n</li>\n',dependencies:[{kind:"ngmodule",type:t.CommonModule},{kind:"directive",type:d.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"directive",type:s.TextContentDirective,selector:"[textContent]",inputs:["textContent"]},{kind:"component",type:r.SearchComponent,selector:"[wmSearch]"}]})}}p.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:p,type:u,decorators:[{type:i.Component,args:[{standalone:!0,imports:[t.CommonModule,s.TextContentDirective,r.SearchComponent],selector:"[wmChips]",providers:[s.provideAs(u,n.NG_VALUE_ACCESSOR,!0),s.provideAsWidgetRef(u)],template:'@for (item of chipsList; track item) {\n <li class="chip-item {{chipclass && !bindChipclass ? chipclass : \'\'}}"\n [ngClass]="{\'active\': item.active, \'disabled\': disabled}">\n <a href="javascript:void(0)" class="app-chip"\n (click)="handleChipClick($event, item)"\n (keydown.delete)="onDelete($event, item, $index)"\n (keydown.backspace)="onBackspace($event, item, $index)"\n (keydown.arrowleft)="onArrowLeft(item, $index)"\n (keydown.arrowright)="onArrowRight(item, $index)"\n (focus)="handleChipFocus($event, item)"\n (blur)="readonly ? 0 : item.active = false"\n [ngClass]="{\'no-drag\': !enablereorder,\'chip-duplicate bg-danger\': item.isDuplicate, \'chip-picture\': item.imgSrc}">\n @if (item.imgSrc) {\n <img data-identifier="img" alt="Chip Image" class="button-image-icon" [src]="item.imgSrc"/>\n }\n <span class="app-chip-title" [textContent]="item.label" [title]="item.label"></span>\n @if (!readonly) {\n <button type="button" [attr.aria-label]="\'Clear \' + item.label" class="btn btn-transparent"\n (click)="removeItem($event, item, $index);">\n <i class="app-icon wi wi-close"></i>\n </button>\n }\n </a>\n </li>\n}\n<li class="app-chip-search" [ngClass]="{\'full-width\': inputwidth === \'full\'}">\n <div #search wmSearch class="app-chip-input"\n name="app-chip-search"\n submit.event="addItem($event, widget)"\n beforeservicecall.event="invokeOnBeforeServiceCall(inputData)"\n disabled.bind="disabled || readonly || saturate"\n datafield.bind="datafield"\n allowonlyselect.bind="allowonlyselect"\n searchkey.bind="searchkey"\n orderby.bind="orderby"\n placeholder.bind="saturate ? maxSizeReached : placeholder"\n showsearchicon.bind="showsearchicon"\n tabindex.bind="tabindex"\n minchars.bind="minchars"\n debouncetime.bind="debouncetime"\n matchmode.bind="matchmode"\n datacompletemsg.bind = "datacompletemsg"\n groupby.bind="groupby"\n match.bind="match"\n dateformat.bind="dateformat"\n (keydown.enter)="stopEvent($event)"\n (keydown.delete)="onTextDelete($event)"\n (keydown.backspace)="onInputClear($event)"\n (keydown.arrowleft)="onArrowLeft()"\n (keydown.arrowright)="onArrowRight()">\n </div>\n</li>\n'}]}],ctorParameters:()=>[{type:p.Injector},{type:void 0,decorators:[{type:i.Attribute,args:["displayfield.bind"]}]},{type:void 0,decorators:[{type:i.Attribute,args:["displayexpression.bind"]}]},{type:void 0,decorators:[{type:i.Attribute,args:["displayimagesrc.bind"]}]},{type:void 0,decorators:[{type:i.Attribute,args:["datafield.bind"]}]},{type:void 0,decorators:[{type:i.Attribute,args:["dataset.bind"]}]},{type:void 0,decorators:[{type:i.Attribute,args:["chipclass.bind"]}]},{type:void 0,decorators:[{type:i.Inject,args:["EXPLICIT_CONTEXT"]},{type:i.Optional}]}],propDecorators:{searchComponent:[{type:i.ViewChild,args:[r.SearchComponent,{static:!0}]}]}}),e.ChipsComponent=u}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/forms"),require("ngx-color-picker"),require("@angular/core"),require("@angular/common"),require("@wm/core"),require("@wm/components/base"),require("@wm/components/input/base-form-custom")):"function"==typeof define&&define.amd?define(["exports","@angular/forms","ngx-color-picker","@angular/core","@angular/common","@wm/core","@wm/components/base","@wm/components/input/base-form-custom"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.input=e.wm.components.input||{},e.wm.components.input.colorpicker={}),e.ng.forms,e.ngxColorpicker,e.ng.core,e.ng.common,e.wm.core,e.wm.components.base,e.wm.components.input.baseFormCustom)}(this,function(e,t,i,n,a,s,o,r){"use strict";function l(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var c=l(t),d=l(n);const p=new Map([["autoclose",{value:"outsideClick",...o.PROP_STRING}],["class",o.PROP_STRING],["datavalue",o.PROP_STRING],["disabled",o.PROP_BOOLEAN],["hint",o.PROP_STRING],["arialabel",o.PROP_STRING],["name",o.PROP_STRING],["placeholder",{value:"Select Color",...o.PROP_STRING}],["readonly",o.PROP_BOOLEAN],["required",o.PROP_BOOLEAN],["shortcutkey",o.PROP_STRING],["show",{value:!0,...o.PROP_BOOLEAN}],["tabindex",{value:0,...o.PROP_NUMBER}]]),m={widgetType:"wm-colorpicker",hostClass:"input-group app-colorpicker",displayType:"inline-block"};class h extends r.BaseFormCustomComponent{static{this.initializeProps=(o.register("wm-colorpicker",p),void o.registerFormWidget(s.FormWidgetType.COLORPICKER,new Map(p)))}constructor(e,t){super(e,m,t),o.styler(this.nativeElement,this)}colorPickerToggleChange(e){const t=this.nativeElement.querySelector(".color-picker");t&&(e?s.removeClass(t,"hidden"):s.addClass(t,"hidden"))}colorPickerOpen(e){if($(".hex-text input").attr("placeholder","Enter hex color code"),this.autoclose===o.AUTOCLOSE_TYPE.ALWAYS){this.nativeElement.querySelector(".color-picker").onclick=()=>this.cpDirective.closeDialog()}}open(){this.cpDirective.openDialog()}close(){this.cpDirective.closeDialog()}handleEvent(e,t,i,n){"change"!==t&&"blur"!==t&&super.handleEvent(this.inputEl.nativeElement,t,i,n)}handleChange(e){this.invokeOnChange(this.datavalue,{type:"change"},this.ngModel.valid)}onPropertyChange(e,t,i){"tabindex"!==e&&("required"!==e?"datavalue"!==e?("autoclose"===e&&(this.outsideclick=t===o.AUTOCLOSE_TYPE.OUTSIDECLICK||t===o.AUTOCLOSE_TYPE.ALWAYS),super.onPropertyChange(e,t,i)):this._onChange(t):this._onChange(this.datavalue))}ngOnDestroy(){this.ngModel=null,this.inputEl=null,this.cpDirective=null,super.ngOnDestroy()}static{this.\u0275fac=d.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:d,type:h,deps:[{token:d.Injector},{token:"EXPLICIT_CONTEXT",optional:!0}],target:d.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=d.\u0275\u0275ngDeclareComponent({minVersion:"14.0.0",version:"20.3.19",type:h,isStandalone:!0,selector:"[wmColorPicker]",providers:[o.provideAs(h,t.NG_VALUE_ACCESSOR,!0),o.provideAs(h,t.NG_VALIDATORS,!0),o.provideAsWidgetRef(h),i.ColorPickerService],viewQueries:[{propertyName:"ngModel",first:!0,predicate:t.NgModel,descendants:!0},{propertyName:"inputEl",first:!0,predicate:["input"],descendants:!0,read:n.ElementRef,static:!0},{propertyName:"cpDirective",first:!0,predicate:i.ColorPickerDirective,descendants:!0}],usesInheritance:!0,ngImport:d,template:'<input aria-haspopup="true" class="form-control app-textbox"\n #input\n focus-target\n [attr.name]="name"\n [attr.aria-label]="arialabel"\n [(colorPicker)]="datavalue"\n (colorPickerChange)="handleChange($event);"\n (cpToggleChange)="colorPickerToggleChange($event)"\n [cpPosition]="\'bottom\'"\n [cpCloseClickOutside]="outsideclick"\n (colorPickerOpen)="colorPickerOpen($event)"\n [attr.placeholder]="placeholder"\n [disabled]="readonly || disabled"\n [required]="required"\n [tabindex]="tabindex"\n [(ngModel)]="datavalue"\n (ngModelChange)="handleChange($event);"\n [ngModelOptions]="{updateOn: \'change\', standalone: true}"\n (blur)="invokeOnTouched($event)"\n [attr.accesskey]="shortcutkey">\n<span class="input-group-addon colorpicker-container">\n <i class="colored-box" [style.backgroundColor]="datavalue">&nbsp;</i>\n</span>\n',dependencies:[{kind:"ngmodule",type:a.CommonModule},{kind:"ngmodule",type:t.FormsModule},{kind:"directive",type:c.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:c.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:c.RequiredValidator,selector:":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]",inputs:["required"]},{kind:"directive",type:c.NgModel,selector:"[ngModel]:not([formControlName]):not([formControl])",inputs:["name","disabled","ngModel","ngModelOptions"],outputs:["ngModelChange"],exportAs:["ngModel"]},{kind:"directive",type:i.ColorPickerDirective,selector:"[colorPicker]",inputs:["colorPicker","cpWidth","cpHeight","cpToggle","cpDisabled","cpIgnoredElements","cpFallbackColor","cpColorMode","cpCmykEnabled","cpOutputFormat","cpAlphaChannel","cpDisableInput","cpDialogDisplay","cpSaveClickOutside","cpCloseClickOutside","cpUseRootViewContainer","cpPosition","cpPositionOffset","cpPositionRelativeToArrow","cpOKButton","cpOKButtonText","cpOKButtonClass","cpCancelButton","cpCancelButtonText","cpCancelButtonClass","cpEyeDropper","cpPresetLabel","cpPresetColors","cpPresetColorsClass","cpMaxPresetColorsLength","cpPresetEmptyMessage","cpPresetEmptyMessageClass","cpAddColorButton","cpAddColorButtonText","cpAddColorButtonClass","cpRemoveColorButtonClass","cpArrowPosition","cpExtraTemplate"],outputs:["cpInputChange","cpToggleChange","cpSliderChange","cpSliderDragEnd","cpSliderDragStart","colorPickerOpen","colorPickerClose","colorPickerCancel","colorPickerSelect","colorPickerChange","cpCmykColorChange","cpPresetColorsChange"],exportAs:["ngxColorPicker"]}]})}}d.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:d,type:h,decorators:[{type:n.Component,args:[{standalone:!0,imports:[a.CommonModule,t.FormsModule,i.ColorPickerDirective],selector:"[wmColorPicker]",providers:[o.provideAs(h,t.NG_VALUE_ACCESSOR,!0),o.provideAs(h,t.NG_VALIDATORS,!0),o.provideAsWidgetRef(h),i.ColorPickerService],template:'<input aria-haspopup="true" class="form-control app-textbox"\n #input\n focus-target\n [attr.name]="name"\n [attr.aria-label]="arialabel"\n [(colorPicker)]="datavalue"\n (colorPickerChange)="handleChange($event);"\n (cpToggleChange)="colorPickerToggleChange($event)"\n [cpPosition]="\'bottom\'"\n [cpCloseClickOutside]="outsideclick"\n (colorPickerOpen)="colorPickerOpen($event)"\n [attr.placeholder]="placeholder"\n [disabled]="readonly || disabled"\n [required]="required"\n [tabindex]="tabindex"\n [(ngModel)]="datavalue"\n (ngModelChange)="handleChange($event);"\n [ngModelOptions]="{updateOn: \'change\', standalone: true}"\n (blur)="invokeOnTouched($event)"\n [attr.accesskey]="shortcutkey">\n<span class="input-group-addon colorpicker-container">\n <i class="colored-box" [style.backgroundColor]="datavalue">&nbsp;</i>\n</span>\n'}]}],ctorParameters:()=>[{type:d.Injector},{type:void 0,decorators:[{type:n.Inject,args:["EXPLICIT_CONTEXT"]},{type:n.Optional}]}],propDecorators:{ngModel:[{type:n.ViewChild,args:[t.NgModel]}],inputEl:[{type:n.ViewChild,args:["input",{static:!0,read:n.ElementRef}]}],cpDirective:[{type:n.ViewChild,args:[i.ColorPickerDirective]}]}}),e.ColorPickerComponent=h}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/forms"),require("@angular/core"),require("@wm/core"),require("@wm/components/base"),require("@wm/components/input/text")):"function"==typeof define&&define.amd?define(["exports","@angular/forms","@angular/core","@wm/core","@wm/components/base","@wm/components/input/text"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.input=e.wm.components.input||{},e.wm.components.input.currency={}),e.ng.forms,e.ng.core,e.wm.core,e.wm.components.base,e.wm.components.input.text)}(this,function(e,t,i,n,a,s){"use strict";function o(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var r=o(t),l=o(i),c=o(n),d=o(a);const p=new Map([["class",a.PROP_STRING],["currency",a.PROP_STRING],["datavalue",a.PROP_STRING],["disabled",a.PROP_BOOLEAN],["hint",a.PROP_STRING],["arialabel",a.PROP_STRING],["maxvalue",a.PROP_NUMBER],["minvalue",a.PROP_NUMBER],["name",a.PROP_STRING],["placeholder",{value:"Enter value",...a.PROP_STRING}],["readonly",a.PROP_BOOLEAN],["required",a.PROP_BOOLEAN],["shortcutkey",a.PROP_STRING],["show",{value:!0,...a.PROP_BOOLEAN}],["step",{value:1,...a.PROP_NUMBER}],["tabindex",{value:0,...a.PROP_NUMBER}],["trailingzero",{value:!1,...a.PROP_BOOLEAN}],["inputmode",{value:"natural",...a.PROP_STRING}]]),m={widgetType:"wm-currency",hostClass:"input-group app-currency"};class h extends s.NumberLocale{static{this.initializeProps=(a.register("wm-currency",p),void a.registerFormWidget(n.FormWidgetType.CURRENCY,new Map(p)))}constructor(e,t,i,a,s){super(e,m,i,a,s),this.appDefaults=t,this.currencyCode=this.appDefaults.currencyCode||"USD",this.currencySymbol=n.CURRENCY_INFO[this.appDefaults.currencyCode||"USD"].symbol}onPropertyChange(e,t,i){"currency"===e?(this.currencyCode=t,this.currencySymbol=n.CURRENCY_INFO[this.currencyCode||this.appDefaults.currencyCode].symbol):super.onPropertyChange(e,t,i)}ngOnDestroy(){this.ngModel=null,this.inputEl=null,super.ngOnDestroy()}static{this.\u0275fac=l.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:l,type:h,deps:[{token:l.Injector},{token:c.AppDefaults},{token:c.AbstractI18nService},{token:d.TrailingZeroDecimalPipe},{token:"EXPLICIT_CONTEXT",optional:!0}],target:l.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=l.\u0275\u0275ngDeclareComponent({minVersion:"14.0.0",version:"20.3.19",type:h,isStandalone:!0,selector:"[wmCurrency]",providers:[a.provideAs(h,t.NG_VALUE_ACCESSOR,!0),a.provideAs(h,t.NG_VALIDATORS,!0),a.provideAsWidgetRef(h)],viewQueries:[{propertyName:"ngModel",first:!0,predicate:t.NgModel,descendants:!0,static:!0},{propertyName:"inputEl",first:!0,predicate:["input"],descendants:!0,read:i.ElementRef,static:!0}],usesInheritance:!0,ngImport:l,template:'<span class="input-group-addon" [textContent]="currencySymbol"></span>\n<input class="form-control app-textbox app-currency-input"\n #input\n role="textbox"\n type="text"\n inputmode="decimal"\n focus-target\n [autofocus]="autofocus"\n [readonly]="readonly"\n [disabled]="disabled"\n [required]="required"\n [pattern]="regexp"\n [attr.name]="name"\n [attr.aria-label]="arialabel || currencyCode"\n [attr.tabindex]="tabindex"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n [ngModel]="displayValue"\n [ngModelOptions]="ngModelOptions"\n\n (focus)="checkForTrailingZeros($event)"\n (input)="onInputChange($event.target.value)"\n (paste)="onPaste($event)"\n (blur)="handleBlur($event); checkForTrailingZeros($event);"\n (ngModelChange)="onModelChange($event)"\n (keydown)="validateInputEntry($event);"\n (keydown.enter)="onEnter($event)"\n (keydown.ArrowUp)="onArrowPress($event, \'UP\')"\n (keydown.ArrowDown)="onArrowPress($event, \'DOWN\')">\n',dependencies:[{kind:"directive",type:a.TextContentDirective,selector:"[textContent]",inputs:["textContent"]},{kind:"ngmodule",type:t.FormsModule},{kind:"directive",type:r.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:r.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:r.RequiredValidator,selector:":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]",inputs:["required"]},{kind:"directive",type:r.PatternValidator,selector:"[pattern][formControlName],[pattern][formControl],[pattern][ngModel]",inputs:["pattern"]},{kind:"directive",type:r.NgModel,selector:"[ngModel]:not([formControlName]):not([formControl])",inputs:["name","disabled","ngModel","ngModelOptions"],outputs:["ngModelChange"],exportAs:["ngModel"]}]})}}l.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:l,type:h,decorators:[{type:i.Component,args:[{standalone:!0,imports:[a.TextContentDirective,t.FormsModule],selector:"[wmCurrency]",providers:[a.provideAs(h,t.NG_VALUE_ACCESSOR,!0),a.provideAs(h,t.NG_VALIDATORS,!0),a.provideAsWidgetRef(h)],template:'<span class="input-group-addon" [textContent]="currencySymbol"></span>\n<input class="form-control app-textbox app-currency-input"\n #input\n role="textbox"\n type="text"\n inputmode="decimal"\n focus-target\n [autofocus]="autofocus"\n [readonly]="readonly"\n [disabled]="disabled"\n [required]="required"\n [pattern]="regexp"\n [attr.name]="name"\n [attr.aria-label]="arialabel || currencyCode"\n [attr.tabindex]="tabindex"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n [ngModel]="displayValue"\n [ngModelOptions]="ngModelOptions"\n\n (focus)="checkForTrailingZeros($event)"\n (input)="onInputChange($event.target.value)"\n (paste)="onPaste($event)"\n (blur)="handleBlur($event); checkForTrailingZeros($event);"\n (ngModelChange)="onModelChange($event)"\n (keydown)="validateInputEntry($event);"\n (keydown.enter)="onEnter($event)"\n (keydown.ArrowUp)="onArrowPress($event, \'UP\')"\n (keydown.ArrowDown)="onArrowPress($event, \'DOWN\')">\n'}]}],ctorParameters:()=>[{type:l.Injector},{type:c.AppDefaults},{type:c.AbstractI18nService},{type:d.TrailingZeroDecimalPipe},{type:void 0,decorators:[{type:i.Inject,args:["EXPLICIT_CONTEXT"]},{type:i.Optional}]}],propDecorators:{ngModel:[{type:i.ViewChild,args:[t.NgModel,{static:!0}]}],inputEl:[{type:i.ViewChild,args:["input",{static:!0,read:i.ElementRef}]}]}}),e.CurrencyComponent=h}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core")):"function"==typeof define&&define.amd?define(["exports","@angular/core"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.input=e.wm.components.input||{},e.wm.components.input.epoch=e.wm.components.input.epoch||{},e.wm.components.input.epoch.picker={}),e.ng.core)}(this,function(e,t){"use strict";var i,n,a=(i=t,n=Object.create(null),i&&Object.keys(i).forEach(function(e){if("default"!==e){var t=Object.getOwnPropertyDescriptor(i,e);Object.defineProperty(n,e,t.get?t:{enumerable:!0,get:function(){return i[e]}})}}),n.default=i,Object.freeze(n));class s{static{this.\u0275fac=a.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:a,type:s,deps:[],target:a.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=a.\u0275\u0275ngDeclareComponent({minVersion:"14.0.0",version:"20.3.19",type:s,isStandalone:!0,selector:"wm-pickergroup",ngImport:a,template:'\n <div class="app-picker-group">\n <ng-content></ng-content>\n </div>\n ',isInline:!0})}}a.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:a,type:s,decorators:[{type:t.Component,args:[{standalone:!0,selector:"wm-pickergroup",template:'\n <div class="app-picker-group">\n <ng-content></ng-content>\n </div>\n '}]}]});class o{constructor(e){this.inj=e,this.change=new t.EventEmitter,this._selectedIndex=0,this._options=[],this.noOfEmptyElements=2,this.$el=$(e.get(t.ElementRef).nativeElement)}set selectedValue(e){this._selectedValue=e,this.reRender()}get selectedValue(){return this._selectedValue}set options(e){this._options=e.map(e=>({label:e.label,value:void 0!==e.value?e.value:e.label})),this.reRender()}get options(){return this._options}reRender(){this._selectedIndex=this.options.findIndex(e=>e.value===this.selectedValue),this.pickerAnimator?.select(this._selectedIndex+this.noOfEmptyElements)}set selectedIndex(e){this._selectedIndex=e,this._selectedValue=this.options[e].value,this.change.emit(this.options[e])}get selectedIndex(){return this._selectedIndex}ngAfterViewInit(){this.pickerAnimator=new r(this)}static{this.\u0275fac=a.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:a,type:o,deps:[{token:a.Injector}],target:a.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=a.\u0275\u0275ngDeclareComponent({minVersion:"17.0.0",version:"20.3.19",type:o,isStandalone:!0,selector:"wm-picker",inputs:{selectedValue:"selectedValue",options:"options"},outputs:{change:"change"},ngImport:a,template:'\n <div class="app-picker">\n <div class="app-picker-option-container">\n <div class="app-picker-option app-picker-empty-option">E</div>\n <div class="app-picker-option app-picker-empty-option">E</div>\n @for (option of options; track option; let i = $index) {\n <div class="app-picker-option">\n {{option.label}}\n </div>\n }\n <div class="app-picker-option app-picker-empty-option">E</div>\n <div class="app-picker-option app-picker-empty-option">E</div>\n </div>\n <div class="app-picker-ruler"></div>\n </div>\n ',isInline:!0})}}a.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:a,type:o,decorators:[{type:t.Component,args:[{selector:"wm-picker",standalone:!0,template:'\n <div class="app-picker">\n <div class="app-picker-option-container">\n <div class="app-picker-option app-picker-empty-option">E</div>\n <div class="app-picker-option app-picker-empty-option">E</div>\n @for (option of options; track option; let i = $index) {\n <div class="app-picker-option">\n {{option.label}}\n </div>\n }\n <div class="app-picker-option app-picker-empty-option">E</div>\n <div class="app-picker-option app-picker-empty-option">E</div>\n </div>\n <div class="app-picker-ruler"></div>\n </div>\n '}]}],ctorParameters:()=>[{type:a.Injector}],propDecorators:{change:[{type:t.Output}],selectedValue:[{type:t.Input}],options:[{type:t.Input}]}});class r{constructor(e){this.picker=e;let t=e.selectedIndex+e.noOfEmptyElements;const i=e=>t+Math.floor(e/16);this.select(t),this.getElement().swipey({direction:$.fn.swipey.DIRECTIONS.VERTICAL,threshold:10,target:e.$el,onSwipe:(e,t)=>{this.select(i(-1*t.length))},onSwipeEnd:(n,a)=>{const s=i(-1*a.length);this.select(s),t=e.selectedIndex+e.noOfEmptyElements}})}getElement(){return this.picker.$el.find(".app-picker-option-container:first")}getOptionElements(){return this.getElement().find(".app-picker-option")}select(e){const t=this.getOptionElements();if(e<this.picker.noOfEmptyElements||e>=t.length-this.picker.noOfEmptyElements)return;this.getElement().find(".app-picker-option.app-picker-option-selected").removeClass("app-picker-option-selected"),t.eq(e).addClass("app-picker-option-selected"),this.picker.selectedIndex=e-this.picker.noOfEmptyElements;const i=e-this.picker.noOfEmptyElements,n=e+this.picker.noOfEmptyElements;t.each((t,a)=>{if(t>=i&&t<=n){const i=30*(t-e),n=1-.3*Math.abs(t-e);$(a).css({transform:"perspective(500px) rotateX("+i+"deg)",opacity:n}).show()}else $(a).hide()})}}e.PickerComponent=o,e.PickerGroupComponent=s}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common"),require("@angular/core"),require("ngx-bootstrap/datepicker"),require("ngx-bootstrap/modal"),require("@wm/core"),require("lodash-es"),require("@wm/components/input/epoch/picker"),require("ngx-bootstrap/dropdown"),require("moment")):"function"==typeof define&&define.amd?define(["exports","@angular/common","@angular/core","ngx-bootstrap/datepicker","ngx-bootstrap/modal","@wm/core","lodash-es","@wm/components/input/epoch/picker","ngx-bootstrap/dropdown","moment"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.input=e.wm.components.input||{},e.wm.components.input.epoch=e.wm.components.input.epoch||{},e.wm.components.input.epoch.dateTimePicker={}),e.ng.common,e.ng.core,e.ngxBootstrap.datepicker,e.ngxBootstrap.modal,e.wm.core,e._,e.wm.components.input.epoch.picker,e.ngxBootstrap.dropdown,e.momentLib)}(this,function(e,t,i,n,a,s,o,r,l,c){"use strict";function d(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var p=d(i),m=d(n),h=d(a);const u=d(c).default||window.moment;class g{constructor(e,t){this.inj=e,this.bsModalService=t,this.isDateOpen=!0,this.isTimeOpen=!1,this.mode="DATE_TIME",this.placement="MODAL",this.change=new i.EventEmitter,this._value=new Date,this.changedValue=null,this.appLocale=e.get(s.App).appLocale||{}}set value(e){e=e||new Date,this._value=e,this.changedValue=e}set bsDatepickerConfig(e){this._bsDatepickerConfig=e,this._bsDatepickerConfig.showClearButton=!1,this._bsDatepickerConfig.showTodayButton=!1}set excludedDaysToDisable(e){this._bsDatepickerConfig.daysDisabled=e}get bsDatepickerConfig(){return this._bsDatepickerConfig}set displayFormat(e){e&&(this._displayFormat=e.replace(/y/g,"Y").replace(/d/g,"D").replace("a","A"))}validateSelectedDate(){if(!this.changedValue)return!0;const e=u(this.changedValue),t=this._bsDatepickerConfig?.minDate,i=this._bsDatepickerConfig?.maxDate;if(t&&("DATE"===this.mode&&u(t).startOf("day").toDate()>this.changedValue||"DATE"!==this.mode&&t>this.changedValue))return!1;if(i&&("DATE"===this.mode&&u(i).endOf("day").toDate()<this.changedValue||"DATE"!==this.mode&&i<this.changedValue))return!1;if(this._bsDatepickerConfig?.daysDisabled?.indexOf(e.day())>=0)return!1;const n=e.startOf("day").toDate().getTime();return!this.excludedDatesToDisable?.find(e=>e.getTime()===n)}get displayFormat(){if(this._displayFormat)return this._displayFormat}hightlightToday(){const e=(new Date).getDate().toString();o.filter($(`body > modal-container .date-picker-modal span:contains(${e})`).not(".is-other-month,.current-date"),t=>{$(t).text()===e&&$(t).addClass("current-date text-info")})}hideOnClick(){$("body>modal-container .date-picker-modal .app-datetime-picker").click(e=>e.stopPropagation()),$("body>modal-container .date-picker-modal").click(()=>this.onCancelClick())}getDateLabel(){return u(this.changedValue).format(this.displayFormat)}openDatePicker(){this.isTimeOpen=!1,this.isDateOpen=!0}openTimePicker(){this.isTimeOpen=!0,this.isDateOpen=!1}onDateUpdate(e){const t=this.changedValue;"DATE"===this.mode?(e.setHours(0),e.setMinutes(0),e.setSeconds(0),e.setMilliseconds(0)):t&&e&&(e.setHours(t.getHours()),e.setMinutes(t.getMinutes()),e.setSeconds(t.getSeconds()),e.setMilliseconds(t.getMilliseconds())),this.changedValue=e,"DATE"===this.mode&&t!==e&&this.validateSelectedDate()&&this.onOkClick()}onTimeUpdate(e){this.changedValue=e}show(){this.reset(),this.modalRef=this.bsModalService.show(this.datetimepickerTemplate,{animated:!0,backdrop:"static",class:"date-picker-modal modal-dialog-centered"}),setTimeout(()=>{this.hideOnClick()},500)}clear(){this.changedValue=null,this.triggerChange(),this.hideModal()}setToday(){const e=u().startOf("day").toDate();this.onDateUpdate(e)}reset(){this.changedValue=this._value}hideModal(){this.modalRef?.id&&this.bsModalService.hide(this.modalRef.id)}onCancelClick(){this.changedValue=this._value,this.hideModal()}onOkClick(){this.validateSelectedDate()&&this.triggerChange(),this.hideModal()}triggerChange(){this.value!==this.changedValue&&this.change.emit(this.changedValue)}ngAfterViewInit(){}ngOnDestroy(){this.hideModal()}static{this.\u0275fac=p.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:p,type:g,deps:[{token:p.Injector},{token:h.BsModalService}],target:p.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=p.\u0275\u0275ngDeclareComponent({minVersion:"17.0.0",version:"20.3.19",type:g,isStandalone:!0,selector:"wm-datetimepicker",inputs:{mode:"mode",placement:"placement",_bsDatepickerConfig:["config","_bsDatepickerConfig"],minTime:"minTime",maxTime:"maxTime",_displayFormat:"_displayFormat",excludedDatesToDisable:"excludedDatesToDisable",value:"value",bsDatepickerConfig:["config","bsDatepickerConfig"],excludedDaysToDisable:"excludedDaysToDisable",displayFormat:"displayFormat"},outputs:{change:"change"},viewQueries:[{propertyName:"datetimepickerTemplate",first:!0,predicate:["datetimepickerTemplate"],descendants:!0,static:!0}],ngImport:p,template:'\n <ng-template #datetimepickerTemplate>\n <div class="app-datetime-picker">\n <div class="modal-body">\n <div class="mobile-datetime-picker-options">\n \n </div>\n @if (mode === \'DATE_TIME\' || mode === \'DATE\') {\n <bs-datepicker-inline\n [bsConfig]="bsDatepickerConfig"\n [datesDisabled]="excludedDatesToDisable"\n bsDatepicker\n [bsValue]="changedValue"\n (bsValueChange)="onDateUpdate($event)"\n >\n </bs-datepicker-inline>\n }\n @if (mode === \'DATE_TIME\' || mode === \'TIME\') {\n <wm-timepicker\n [value]="changedValue"\n [min]="minTime"\n [max]="maxTime"\n (change)="onTimeUpdate($event)"\n ></wm-timepicker>\n }\n <span class="text-primary date-picker-value">\n {{getDateLabel()}}\n </span>\n </div>\n <div class="modal-footer">\n @if (mode === \'DATE_TIME\' || mode === \'DATE\') {\n <button\n class="btn btn-secondary today-btn"\n (click)="setToday()">{{appLocale.LABEL_TODAY_DATE || "Today" }}</button>\n }\n @if (mode === \'DATE_TIME\' || mode === \'TIME\') {\n <button\n class="btn btn-primary pull-right ok-btn"\n (click)="onOkClick()">{{appLocale.LABEL_OK || "Ok" }}</button>\n }\n <button\n class="btn btn-secondary pull-right clear-btn"\n (click)="clear()">{{appLocale.LABEL_CLEAR_DATE || "Clear" }}</button>\n </div>\n </div>\n </ng-template>\n ',isInline:!0,dependencies:[{kind:"ngmodule",type:t.CommonModule},{kind:"ngmodule",type:n.BsDatepickerModule},{kind:"directive",type:m.BsDatepickerDirective,selector:"[bsDatepicker]",inputs:["placement","triggers","outsideClick","container","outsideEsc","isDisabled","minDate","maxDate","ignoreMinMaxErrors","minMode","daysDisabled","datesDisabled","datesEnabled","dateCustomClasses","dateTooltipTexts","isOpen","bsValue","bsConfig"],outputs:["onShown","onHidden","bsValueChange"],exportAs:["bsDatepicker"]},{kind:"directive",type:m.BsDatepickerInlineDirective,selector:"bs-datepicker-inline",inputs:["bsConfig","isDisabled","minDate","maxDate","dateCustomClasses","dateTooltipTexts","datesEnabled","datesDisabled","bsValue"],outputs:["bsValueChange"],exportAs:["bsDatepickerInline"]},{kind:"ngmodule",type:l.BsDropdownModule}]})}}p.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:p,type:g,decorators:[{type:i.Component,args:[{standalone:!0,imports:[t.CommonModule,n.BsDatepickerModule,l.BsDropdownModule],selector:"wm-datetimepicker",template:'\n <ng-template #datetimepickerTemplate>\n <div class="app-datetime-picker">\n <div class="modal-body">\n <div class="mobile-datetime-picker-options">\n \n </div>\n @if (mode === \'DATE_TIME\' || mode === \'DATE\') {\n <bs-datepicker-inline\n [bsConfig]="bsDatepickerConfig"\n [datesDisabled]="excludedDatesToDisable"\n bsDatepicker\n [bsValue]="changedValue"\n (bsValueChange)="onDateUpdate($event)"\n >\n </bs-datepicker-inline>\n }\n @if (mode === \'DATE_TIME\' || mode === \'TIME\') {\n <wm-timepicker\n [value]="changedValue"\n [min]="minTime"\n [max]="maxTime"\n (change)="onTimeUpdate($event)"\n ></wm-timepicker>\n }\n <span class="text-primary date-picker-value">\n {{getDateLabel()}}\n </span>\n </div>\n <div class="modal-footer">\n @if (mode === \'DATE_TIME\' || mode === \'DATE\') {\n <button\n class="btn btn-secondary today-btn"\n (click)="setToday()">{{appLocale.LABEL_TODAY_DATE || "Today" }}</button>\n }\n @if (mode === \'DATE_TIME\' || mode === \'TIME\') {\n <button\n class="btn btn-primary pull-right ok-btn"\n (click)="onOkClick()">{{appLocale.LABEL_OK || "Ok" }}</button>\n }\n <button\n class="btn btn-secondary pull-right clear-btn"\n (click)="clear()">{{appLocale.LABEL_CLEAR_DATE || "Clear" }}</button>\n </div>\n </div>\n </ng-template>\n '}]}],ctorParameters:()=>[{type:p.Injector},{type:h.BsModalService}],propDecorators:{datetimepickerTemplate:[{type:i.ViewChild,args:["datetimepickerTemplate",{static:!0}]}],mode:[{type:i.Input}],placement:[{type:i.Input}],_bsDatepickerConfig:[{type:i.Input,args:["config"]}],minTime:[{type:i.Input}],maxTime:[{type:i.Input}],_displayFormat:[{type:i.Input}],change:[{type:i.Output}],excludedDatesToDisable:[{type:i.Input}],value:[{type:i.Input}],bsDatepickerConfig:[{type:i.Input,args:["config"]}],excludedDaysToDisable:[{type:i.Input}],displayFormat:[{type:i.Input}]}});class v{constructor(e){this.inj=e,this.options={hour:[],minute:[],second:[],meridian:["AM","PM"]},this.value=new Date,this.min=null,this.max=null,this.change=new i.EventEmitter,this.options.hour=this.populateNumbers(0,23),this.options.minute=this.populateNumbers(0,59),this.options.second=this.populateNumbers(0,59)}populateNumbers(e,t){const i=[];for(let n=e;n<=t;n++)i.push({label:(n<10?"0":"")+n,value:n});return i}set({index:e,value:t},i){"HOUR"===i?this.value=u(this.value).hour(parseInt(t)).toDate():"MINUTE"===i?this.value=u(this.value).minute(parseInt(t)).toDate():"SECOND"===i?this.value=u(this.value).second(parseInt(t)).toDate():"MERIDIAN"===i&&(this.value=u(this.value).minute(t).toDate()),this.min&&this.value<this.min&&(this.value=this.min),this.max&&this.value>this.max&&(this.value=this.max),this.change.emit(this.value)}get hour(){return u(this.value).hour()}get minute(){return u(this.value).minute()}get second(){return u(this.value).second()}get meridian(){return"AM"}onDateUpdate(e){}ngAfterViewInit(){}static{this.\u0275fac=p.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:p,type:v,deps:[{token:p.Injector}],target:p.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=p.\u0275\u0275ngDeclareComponent({minVersion:"14.0.0",version:"20.3.19",type:v,isStandalone:!0,selector:"wm-timepicker",inputs:{value:"value",min:"min",max:"max"},outputs:{change:"change"},ngImport:p,template:'\n <wm-pickergroup>\n <wm-picker\n [options]="options.hour"\n [selectedValue]="hour"\n (change)="set($event, \'HOUR\')"></wm-picker>\n <span class="app-time-separator">:</span>\n <wm-picker\n [options]="options.minute"\n [selectedValue]="minute"\n (change)="set($event, \'MINUTE\')"></wm-picker>\n <span class="app-time-separator">:</span>\n <wm-picker\n [options]="options.minute"\n [selectedValue]="second"\n (change)="set($event, \'SECOND\')"></wm-picker>\n </wm-pickergroup>\n ',isInline:!0,dependencies:[{kind:"component",type:r.PickerGroupComponent,selector:"wm-pickergroup"},{kind:"component",type:r.PickerComponent,selector:"wm-picker",inputs:["selectedValue","options"],outputs:["change"]}]})}}p.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:p,type:v,decorators:[{type:i.Component,args:[{selector:"wm-timepicker",standalone:!0,template:'\n <wm-pickergroup>\n <wm-picker\n [options]="options.hour"\n [selectedValue]="hour"\n (change)="set($event, \'HOUR\')"></wm-picker>\n <span class="app-time-separator">:</span>\n <wm-picker\n [options]="options.minute"\n [selectedValue]="minute"\n (change)="set($event, \'MINUTE\')"></wm-picker>\n <span class="app-time-separator">:</span>\n <wm-picker\n [options]="options.minute"\n [selectedValue]="second"\n (change)="set($event, \'SECOND\')"></wm-picker>\n </wm-pickergroup>\n ',imports:[r.PickerGroupComponent,r.PickerComponent]}]}],ctorParameters:()=>[{type:p.Injector}],propDecorators:{value:[{type:i.Input}],min:[{type:i.Input}],max:[{type:i.Input}],change:[{type:i.Output}]}}),e.DateTimePickerComponent=g,e.TimePickerComponent=v}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("ngx-bootstrap/dropdown"),require("ngx-bootstrap/timepicker"),require("@wm/core"),require("@wm/components/base"),require("@wm/components/input/base-form-custom"),require("ngx-bootstrap/datepicker"),require("@wm/components/input/epoch/date-time-picker"),require("lodash-es"),require("moment")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/common","ngx-bootstrap/dropdown","ngx-bootstrap/timepicker","@wm/core","@wm/components/base","@wm/components/input/base-form-custom","ngx-bootstrap/datepicker","@wm/components/input/epoch/date-time-picker","lodash-es","moment"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.input=e.wm.components.input||{},e.wm.components.input.epoch=e.wm.components.input.epoch||{},e.wm.components.input.epoch.baseDateTime={}),e.ng.core,e.ng.common,e.ngxBootstrap.dropdown,e.ngxBootstrap.timepicker,e.wm.core,e.wm.components.base,e.wm.components.input.baseFormCustom,e.ngxBootstrap.datepicker,e.wm.components.input.epoch.dateTimePicker,e._,e.momentLib)}(this,function(e,t,i,n,a,s,o,r,l,c,d,p){"use strict";function m(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var h=m(t);const u=m(p).default||window.moment,g="CURRENT_DATE",v=["January","February","March","April","May","June","July","August","September","October","November","December"],f="default",b="default";class y extends r.BaseFormCustomComponent{get timeZone(){return this.inj.get(s.AbstractI18nService).getTimezone(this)}safeReplaceMeridians(e){return"string"==typeof e?e.replace(this.meridians[0],this.am).replace(this.meridians[1],this.pm):e}constructor(e,t,n){super(e,t,n),this.isReadOnly=!1,this.clicked=!1,this.showampmbuttons=!0,this.formatsByLocale={timezone:""},this._dateOptions=new l.BsDatepickerConfig,this.i18nService=this.inj.get(s.AbstractI18nService),this.invokeEventCallback("beforeload"),this.datePipe=this.inj.get(o.ToDatePipe),this.selectedLocale=this.i18nService.getSelectedLocale(),this._dateOptions.todayPosition="left",this._dateOptions.clearPosition="right",this.meridians=i.getLocaleDayPeriods(this.selectedLocale,i.FormStyle.Format,i.TranslationWidth.Abbreviated),this.loadNativeDateInput=s.isMobile()&&!this.showcustompicker,this.am=this.i18nService.getLocalizedMessage("LABEL_AM")||"AM",this.pm=this.i18nService.getLocalizedMessage("LABEL_PM")||"PM",this.cancelLocaleChangeSubscription=this.getAppInstance().subscribe("locale-changed",e=>{this.datePipe.datePipe.locale=e.angular,this._dateOptions.todayButtonLabel=this.i18nService.getLocalizedMessage("LABEL_TODAY_DATE"),this._dateOptions.clearButtonLabel=this.i18nService.getLocalizedMessage("LABEL_CLEAR_DATE")})}isDropDownDisplayEnabledOnInput(e){return e===f}isDataEntryModeEnabledOnInput(e){return e===b}showValidation(e,t,i,n){if(i)return console.warn("min max date validation failed ",n),$(e.target).val(t)}resetDisplayInput(){$(this.nativeElement).find(".display-input").val("")}validate(e){return this.invalidDateTimeFormat?{invalidDateTimeFormat:{valid:!1}}:!d.isUndefined(this.dateNotInRange)&&this.dateNotInRange?{dateNotInRange:{valid:!1}}:!d.isUndefined(this.timeNotInRange)&&this.timeNotInRange?{timeNotInRange:{valid:!1}}:this.show&&this.required?e.value?null:{required:!0}:(this.validateType="",null)}formatValidation(e,t,i){const n=this.datepattern||this.timepattern,a=this.timeZone,o=s.getFormattedDate(this.datePipe,e,n,a,null,null,this);if(t=t.trim())if("timestamp"===n){if(!d.isNaN(t)&&d.parseInt(t)!==o)return this.invalidDateTimeFormat=!0,this.validateType="incorrectformat",this.invokeOnChange(this.datavalue,void 0,!1),!1}else if(i&&(t=s.getFormattedDate(this.datePipe,t,n,a)),t?.replace(this.am,this.meridians[0])?.replace(this.pm,this.meridians[1])!==o)return this.invalidDateTimeFormat=!0,this.validateType="incorrectformat",this.invokeOnChange(this.datavalue,void 0,!1),!1;return!0}minDateMaxDateValidationOnInput(e,t,i,n){if(e){const a=e;e=u(e).startOf("day").toDate();const o=u(s.getDateObj(this.mindate)).startOf("day").toDate(),r=u(s.getDateObj(this.maxdate)).startOf("day").toDate();if(this.mindate&&e<o){const e=`${this.appLocale.LABEL_MINDATE_VALIDATION_MESSAGE} ${this.mindate}.`;return this.invokeOnChange(this.datavalue,void 0,!1),n&&s.getFormattedDate(this.datePipe,o,this.datepattern,this.timeZone,null,null,this)===i?$(t.target).val(i):(this.dateNotInRange=!0,this.validateType="mindate",this.showValidation(t,i,n,e))}if(this.maxdate&&e>r){const e=`${this.appLocale.LABEL_MAXDATE_VALIDATION_MESSAGE} ${this.maxdate}.`;return this.invokeOnChange(this.datavalue,void 0,!1),n&&s.getFormattedDate(this.datePipe,r,this.datepattern,this.timeZone,null,null,this)===i?$(t.target).val(i):(this.dateNotInRange=!0,this.validateType="maxdate",this.showValidation(t,i,n,e))}if(this.excludedates){let e;if(e=d.isString(this.excludedates)?d.split(this.excludedates,","):this.excludedates,e=e.map(e=>s.getFormattedDate(this.datePipe,e,this.datepattern,this.timeZone,null,null,this)),e.indexOf(s.getFormattedDate(this.datePipe,a,this.datepattern,this.timeZone,null,null,this))>-1)return this.dateNotInRange=!0,this.validateType="excludedates",void this.invokeOnChange(this.datavalue,void 0,!1)}if(this.excludedays){const e=d.split(this.excludedays,","),t=d.get(a,"getDay")?a.getDay():a;if(e.indexOf(t.toString())>-1)return this.dateNotInRange=!0,this.validateType="excludedays",void this.invokeOnChange(this.datavalue,void 0,!1)}}n||(this.dateNotInRange=!1,this.invokeOnChange(this.datavalue,void 0,!1))}isOtheryear(e){return 0===e.getMonth()&&11===this.activeDate.getMonth()||11===e.getMonth()&&0===this.activeDate.getMonth()}showDatePickerModal(e){this.activeDate=e||new Date,this.setNextData(this.activeDate),this.datetimepickerComponent.show(),setTimeout(()=>{this.addDatepickerMouseEvents(),this.setActiveDateFocus(this.activeDate,!0)},500)}goToOtherMonthOryear(e,t){const i=$(`.bs-datepicker-head .${e}`);i.attr("disabled")||(i.trigger("click"),"days"===t?this.loadDays():"month"===t?this.loadMonths():"year"===t&&this.loadYears())}setActiveDateFocus(e,t,i){this.setNextData(e),this.clicked=!1;const n=this.activeDate.getMonth();t||(e.getMonth()<n?this.isOtheryear(e)?this.goToOtherMonthOryear("next","days"):this.goToOtherMonthOryear("previous","days"):e.getMonth()>n&&(this.isOtheryear(e)?this.goToOtherMonthOryear("previous","days"):this.goToOtherMonthOryear("next","days"))),setTimeout(()=>{const t=e.getDate().toString();d.filter($(`span:contains(${t})`).not(".is-other-month"),i=>{$(".bs-datepicker-head .current").first().text(),$(".bs-datepicker-head .current").eq(1).text(),(new Date).toLocaleString("default",{month:"long"}),$(i).text()===t&&($(i).hasClass("selected")&&$(i).parent().attr("aria-selected","true"),$(i).attr("aria-label",u(e).format("dddd, MMMM Do YYYY")),$("[bsdatepickerdaydecorator]").not(".is-other-month").attr("tabindex","-1"),$(i).attr("tabindex","0"),setTimeout(()=>{$(i).focus()},10),this.activeDate=e)})})}getMonth(e,t){const i=new Date(e);let n=i.getMonth();const a=i.getFullYear();n+=t;const s=new Date(a,n),o=s.toLocaleString("en-US",{month:"long"});return{date:s,fullMonth:o}}setFocusForMonthOrDay(){const e=$(".bs-datepicker-head .current").first().text(),t=$(".bs-datepicker-body");if(t.find("table.months").length>0){d.parseInt(e)!==this.activeDate.getFullYear()&&this.loadMonths();const t=new Date(d.parseInt(e),this.activeDate.getMonth(),this.activeDate.getDate());this.setActiveMonthFocus(t,!0)}else if(t.find("table.days").length>0){const t=v.indexOf(e);t!==this.activeDate.getMonth()&&this.loadDays();const i=new Date(this.activeDate.getFullYear(),t,1);this.setActiveDateFocus(i,!0)}}setFocusForCurrentMonthOryear(){const e=$(".bs-datepicker-body");e.find("table.months").length>0?(this.loadMonths(),this.setActiveMonthFocus(this.activeDate,!0)):e.find("table.years").length>0&&(this.loadYears(),this.setActiveYearFocus(this.activeDate,!0))}setFocusForDate(e){const t=$(".bs-datepicker-body");if(t.find("table.months").length>0){this.loadMonths();const t=new Date(this.activeDate.getFullYear()+e,0,this.activeDate.getDate());this.setActiveMonthFocus(t,!0)}else if(t.find("table.years").length>0){this.loadYears();const e=t.find("table.years span").first().text(),i=new Date(d.parseInt(e),this.activeDate.getMonth(),this.activeDate.getDate());this.setActiveYearFocus(i,!0)}else if(t.find("table.days").length>0){this.loadDays();const[e,t]=$(".bs-datepicker-head .current").map((e,t)=>$(t).text().trim()).get(),i=new Date(`${e} 1, ${t}`).getMonth(),n=d.parseInt(t,10),a=e=>e.getFullYear()===n&&e.getMonth()===i;let s=this.mindate&&a(new Date(this.mindate))?new Date(this.mindate):this.maxdate&&a(new Date(this.maxdate))?new Date(this.maxdate):new Date(n,i,1);this.setActiveDateFocus(s,!0)}}addDatepickerKeyboardEvents(e,t){this.elementScope=e;const i=document.querySelector(`.${e.dateContainerCls}`);s.setAttr(i,"tabindex","0"),i.onkeydown=e=>{if("Escape"===e.key){this.elementScope.hideDatepickerDropdown();const e=this.elementScope.nativeElement.querySelector(".display-input");setTimeout(()=>e.focus())}},this.loadDays(),this.setActiveDateFocus(this.activeDate,void 0,!0)}setNextData(e){this.next=this.getMonth(e,1),this.prev=this.getMonth(e,-1)}loadDays(){setTimeout(()=>{$("[bsdatepickerdaydecorator]").not(".is-other-month").attr("tabindex","0"),this.addKeyBoardEventsForDays(),this.addDatepickerMouseEvents()})}addKeyBoardEventsForDays(){$(".bs-datepicker-body").keydown(e=>{let t;if("ArrowDown"===e.key)e.preventDefault(),t=u(this.activeDate).add(7,"days").toDate(),this.setActiveDateFocus(t);else if(e.ctrlKey&&"ArrowUp"===e.key)$(".bs-datepicker-head .current").first().click(),this.loadMonths(),this.setActiveMonthFocus(this.activeDate);else if("ArrowUp"===e.key)e.preventDefault(),t=u(this.activeDate).add(-7,"days").toDate(),this.setActiveDateFocus(t);else if("ArrowLeft"===e.key)t=u(this.activeDate).add(-1,"days").toDate(),this.setActiveDateFocus(t);else if("ArrowRight"===e.key)t=u(this.activeDate).add(1,"days").toDate(),this.setActiveDateFocus(t);else if("PageUp"===e.key)e.preventDefault(),t=u(this.activeDate).add(-1,"month").toDate(),this.setActiveDateFocus(t);else if("PageDown"===e.key)e.preventDefault(),t=u(this.activeDate).add(1,"month").toDate(),this.setActiveDateFocus(t);else if("Enter"===e.key){if($(document.activeElement).hasClass("disabled"))return;$(document.activeElement).click(),this.elementScope.hideDatepickerDropdown();const e=this.elementScope.nativeElement.querySelector(".display-input");setTimeout(()=>e.focus())}}),this.focusBlurDatePickerHeadButtons()}focusBlurDatePickerHeadButtons(){const e=$(".bs-datepicker-head button");e.on("focus",function(){$(this).css("background-color","#9AA0A3")}),e.on("blur",function(){$(this).css("background-color","")})}loadMonths(){setTimeout(()=>{this.addKeyBoardEventsForMonths(),this.addDatepickerMouseEvents()})}addKeyBoardEventsForMonths(){$(".bs-datepicker-body").keydown(e=>{let t;if(e.ctrlKey&&"ArrowDown"===e.key||"Enter"===e.key){if($(document.activeElement).parent().hasClass("disabled"))return;$(document.activeElement).click(),this.loadDays();const e=new Date(this.activeDate.getFullYear(),this.activeDate.getMonth(),1);this.setActiveDateFocus(e)}else e.ctrlKey&&"ArrowUp"===e.key?($(".bs-datepicker-head .current").first().click(),this.loadYears(),this.setActiveYearFocus(this.activeDate)):"ArrowDown"===e.key?(e.preventDefault(),t=u(this.activeDate).add(3,"month").toDate(),this.setActiveMonthFocus(t)):"ArrowUp"===e.key?(e.preventDefault(),t=u(this.activeDate).add(-3,"month").toDate(),this.setActiveMonthFocus(t)):"ArrowLeft"===e.key?(t=u(this.activeDate).add(-1,"month").toDate(),this.setActiveMonthFocus(t)):"ArrowRight"===e.key&&(t=u(this.activeDate).add(1,"month").toDate(),this.setActiveMonthFocus(t))}),this.focusBlurDatePickerHeadButtons()}loadYears(){setTimeout(()=>{this.addKeyBoardEventsForYears(),this.addDatepickerMouseEvents()})}setActiveMonthFocus(e,t){this.setNextData(e);const i=v[e.getMonth()];t||(e.getFullYear()<this.activeDate.getFullYear()?this.goToOtherMonthOryear("previous","month"):e.getFullYear()>this.activeDate.getFullYear()&&this.goToOtherMonthOryear("next","month")),setTimeout(()=>{$(".bs-datepicker-body table.months span").attr("tabindex","-1"),$(`.bs-datepicker-body table.months span:contains(${i})`).attr("tabindex","0"),$(`.bs-datepicker-body table.months span:contains(${i})`).focus(),this.activeDate=e})}addKeyBoardEventsForYears(){$(".bs-datepicker-body").keydown(e=>{let t;if(e.ctrlKey&&"ArrowDown"===e.key||"Enter"===e.key){if($(document.activeElement).parent().hasClass("disabled"))return;$(document.activeElement).click(),this.loadMonths(),this.setActiveMonthFocus(this.activeDate)}else"ArrowDown"===e.key?(e.preventDefault(),t=u(this.activeDate).add(4,"year").toDate(),this.setActiveYearFocus(t)):"ArrowUp"===e.key?(e.preventDefault(),t=u(this.activeDate).add(-4,"year").toDate(),this.setActiveYearFocus(t)):"ArrowLeft"===e.key?(t=u(this.activeDate).add(-1,"year").toDate(),this.setActiveYearFocus(t)):"ArrowRight"===e.key&&(t=u(this.activeDate).add(1,"year").toDate(),this.setActiveYearFocus(t))}),this.focusBlurDatePickerHeadButtons()}setActiveYearFocus(e,t){const i=e.getFullYear(),n=$(".bs-datepicker-body table.years span"),a=n.first().text(),s=n.last().text();t||(e.getFullYear()<d.parseInt(a)?this.goToOtherMonthOryear("previous","year"):e.getFullYear()>d.parseInt(s)&&this.goToOtherMonthOryear("next","year")),setTimeout(()=>{$(".bs-datepicker-body table.years span").attr("tabindex","-1"),$(`.bs-datepicker-body table.years span:contains(${i})`).attr("tabindex","0"),$(`.bs-datepicker-body table.years span:contains(${i})`).focus(),this.activeDate=e})}focusTimePickerPopover(e){this.elementScope=e,this.elementScope.ngZone.runOutsideAngular(()=>{setTimeout(()=>{$("timepicker .form-group").first().find("> input.form-control").focus()},10)})}bindTimePickerKeyboardEvents(){setTimeout(()=>{const e=$("body").find("> bs-dropdown-container timepicker");e.attr("tabindex",0),this.addEventsOnTimePicker(e)})}focusOnInputEl(){$(this.nativeElement).closest(".caption-floating").length>0&&setTimeout(()=>{$(this.nativeElement).find(".app-textbox").focus()},100)}isValidDate(e){return e&&e instanceof Date&&!isNaN(e.getTime())}timeFormatValidation(){const e=$(this.nativeElement).find("input").val()?.replace(this.am,this.meridians[0])?.replace(this.pm,this.meridians[1]),t=s.getNativeDateObject(e,{meridians:this.meridians,pattern:this.datepattern});this.formatValidation(t,e)&&(this.invalidDateTimeFormat=!1,this.invokeOnChange(this.datavalue,void 0,!1))}updateTimeValue(e,t,i){let n=e.find('input[aria-label="minutes"]'),a=e.find('input[aria-label="seconds"]');n.value=a.value="00",t.length<2?setTimeout(()=>{"minutes"===i?this.bsTimePicker.updateMinutes(n):this.bsTimePicker.updateSeconds(a)},500):"minutes"===i?this.bsTimePicker.updateMinutes(n):this.bsTimePicker.updateSeconds(a)}addEventsOnTimePicker(e){const t=e.find(".bs-timepicker-field");t.first().on("keyup",i=>{const n=i.target.value;d.forEach(t,(t,a)=>{if(i.target!==t&&""===t.value&&n.length){const t=1===a?"minutes":"seconds";this.updateTimeValue(e,n,t)}})}),this.removeKeyupListener=()=>{t.first().off("keyup")},e.on("keydown",e=>{const t=$(e.target),i=t.parent(),n=this.elementScope;let a,o;if("Escape"===e.key&&n.hideTimepickerDropdown(),t.hasClass("bs-timepicker-field")){if(i.is(":first-child")?(e.shiftKey&&"Tab"===e.key||"Enter"===e.key||"Escape"===e.key)&&(n.setIsTimeOpen(!1),this.focus(),a=!0,o=!0):i.is(":last-child")||i.next().next().find("button.disabled").length?"Tab"!==e.key&&"Escape"!==e.key&&"Enter"!==e.key||(n.setIsTimeOpen(!1),this.focus(),a=!0,o=!0):"Enter"!==e.key&&"Escape"!==e.key||(n.setIsTimeOpen(!1),this.focus(),a=!0,o=!0),a&&e.stopPropagation(),o&&e.preventDefault(),n.mintime&&n.maxtime&&!this.isValidDate(n.bsTimeValue)&&("ArrowDown"===e.key?n.bsTimeValue=n.maxTime:"ArrowUp"===e.key&&(n.bsTimeValue=n.minTime)),"Tab"===e.key){this.invalidDateTimeFormat=!1,this.invokeOnChange(this.datavalue,void 0,!1);const e=this.datepattern||this.timepattern;s.getFormattedDate(n.datePipe,n.bsTimeValue,e,this.timeZone,null,null,this)===n.displayValue&&$(this.nativeElement).find(".display-input").val(n.displayValue)}"ArrowDown"!==e.key&&"ArrowUp"!==e.key||this.timeFormatValidation()}else t.hasClass("btn-default")&&("Tab"!==e.key&&"Escape"!==e.key||(n.setIsTimeOpen(!1),this.focus()))}),e.find("a").on("click",e=>{const t=this.elementScope,i=$(e.target);t.mintime&&t.maxtime&&!this.isValidDate(t.bsTimeValue)&&(i.find("span").hasClass("bs-chevron-down")?t.bsTimeValue=t.maxTime:i.find("span").hasClass("bs-chevron-up")&&(t.bsTimeValue=t.minTime)),this.timeFormatValidation()})}updateFormat(e){"datepattern"===e?(this._dateOptions.dateInputFormat=this.datepattern,this.showseconds=d.includes(this.datepattern,"s"),this.ismeridian=d.includes(this.datepattern,"h")):"timepattern"===e&&(this.showseconds=d.includes(this.timepattern,"s"),this.ismeridian=d.includes(this.timepattern,"h"))}getMobileInput(){return this.nativeElement.querySelector(".mobile-input")}onDateTimeInputBlur(){const e=this.getMobileInput();if(e){const t=this.nativeElement.children;for(let e=0;e<t.length;e++)t[e].classList.remove("add-opacity");e.classList.remove("remove-opacity")}}onDateTimeInputFocus(e=!1){if(!this.loadNativeDateInput)return;const t=this.getMobileInput();if(e){const e=this.nativeElement.children;for(let t=0;t<e.length;t++)e[t].classList.add("add-opacity");return void t.classList.add("remove-opacity")}t&&this._triggeredByUser&&(t.focus(),t.click())}addDatepickerMouseEvents(){$(".bs-datepicker-head .previous span").attr("aria-hidden","true"),$(".bs-datepicker-head .next span").attr("aria-hidden","true"),$(".bs-datepicker-head").on("click",".previous",e=>{this.next=this.getMonth(this.activeDate,0),this.prev=this.getMonth(this.activeDate,-2),this.clicked=!0,e.originalEvent&&this.setFocusForDate(-1);var t=this.getMonth(this.activeDate,-1);setTimeout(()=>{$(".bs-datepicker-head .previous span").attr("aria-hidden","true"),$(".bs-datepicker-head .next span").attr("aria-hidden","true"),$(".bs-datepicker-head .next").attr("aria-label",`Next Month, ${this.next.fullMonth} ${this.next.date.getFullYear()}`),$(".bs-datepicker-head .previous").attr("aria-label",`Previous Month, ${this.prev.fullMonth} ${this.prev.date.getFullYear()}`),$(".bs-datepicker-head .current").first().append(`<h2 aria-hidden="false" aria-atomic="true" aria-live='polite' class="sr-only">Changed to Previous Month, ${t.fullMonth} and year ${t.date.getFullYear()}</h2>`),$(".bs-datepicker-head").on("focus",".current",function(){$(".bs-datepicker-head .current").find("h2").remove()}),$(".bs-datepicker-head .previous").focus()})}),$(".bs-datepicker-head").on("click",".next",e=>{this.next=this.getMonth(this.activeDate,2),this.prev=this.getMonth(this.activeDate,0),this.clicked=!0,e.originalEvent&&this.setFocusForDate(1);var t=this.getMonth(this.activeDate,1);setTimeout(()=>{$(".bs-datepicker-head .previous span").attr("aria-hidden","true"),$(".bs-datepicker-head .next span").attr("aria-hidden","true"),$(".bs-datepicker-head .next").attr("aria-label",`Next Month, ${this.next.fullMonth} ${this.next.date.getFullYear()}`),$(".bs-datepicker-head .previous").attr("aria-label",`Previous Month, ${this.prev.fullMonth} ${this.prev.date.getFullYear()}`),$(".bs-datepicker-head .current").first().append(`<h2 aria-hidden="false" aria-atomic="true" aria-live='polite' class="sr-only">Changed to Next Month, ${t.fullMonth} and year ${t.date.getFullYear()}</h2>`),$(".bs-datepicker-head").on("focus",".current",function(){$(".bs-datepicker-head .current").find("h2").remove()}),$(".bs-datepicker-head .next").focus()})}),$(".bs-datepicker-head").on("click",".current",e=>{e.originalEvent&&this.setFocusForCurrentMonthOryear()}),$(".bs-datepicker-body").on("click",".bs-datepicker-action-buttons",e=>{e.stopPropagation(),e.originalEvent&&this.setFocusForMonthOrDay()}),$(".bs-datepicker-head .next").attr("aria-label",`Next Month, ${this.next.fullMonth} ${this.next.date.getFullYear()}`),$(".bs-datepicker-head .previous").attr("aria-label",`Previous Month, ${this.prev.fullMonth} ${this.prev.date.getFullYear()}`)}blurDateInput(e){const t=this.nativeElement.querySelector(".display-input");e&&setTimeout(()=>t.blur())}getPeriod(){if(!this.elementScope.bsTimeValue)return"AM";return this.elementScope.bsTimeValue.getHours()>=12?"PM":"AM"}setPeriod(e){const t=this.elementScope.bsTimeValue;if(!(t&&t instanceof Date))return;const i=new Date(t),n=i.getHours();if("AM"===e&&n>=12?i.setHours(n-12):"PM"===e&&n<12&&i.setHours(n+12),"wm-time"===this.elementScope.widgetType){this.elementScope.minTime&&this.elementScope.maxTime&&(i<this.elementScope.minTime||i>this.elementScope.maxTime)||this.elementScope.onTimeChange(i)}else this.elementScope.onModelUpdate(i)}onPropertyChange(e,t,i){const n=this.formControl?.pristine;"tabindex"!==e&&("showampmbuttons"===e&&(this.showampmbuttons=t),"required"!==e?("datepattern"===e?this.updateFormat(e):"viewmode"===e?this._dateOptions.minMode=this.viewmode:"showweeks"===e?this._dateOptions.showWeekNumbers=t:"mindate"===e?(this._dateOptions.minDate=t===g?this.mindate=new Date:s.getDateObj(t),this.minDateMaxDateValidationOnInput(this.datavalue)):"maxdate"===e?(this._dateOptions.maxDate=t===g?this.maxdate=new Date:s.getDateObj(t),this.minDateMaxDateValidationOnInput(this.datavalue)):"excludedates"===e||"excludedays"===e?(this.excludedays&&(this.excludedDaysToDisable=d.split(this.excludedays,",").map(e=>+e)),this.excludedates&&(this.excludedDatesToDisable=this.excludedates,d.isString(this.excludedates)&&(this.excludedDatesToDisable=d.split(this.excludedates,",")),this.excludedDatesToDisable=this.excludedDatesToDisable.map(e=>s.getDateObj(e))),this.minDateMaxDateValidationOnInput(this.datavalue)):"selectfromothermonth"===e?this._dateOptions.selectFromOtherMonth=t:"todaybutton"===e?this._dateOptions.showTodayButton=t:"clearbutton"===e?this._dateOptions.showClearButton=t:"todaybuttonlabel"===e?this._dateOptions.todayButtonLabel=this.i18nService.getLocalizedMessage(t)||t:"clearbuttonlabel"===e?this._dateOptions.clearButtonLabel=this.i18nService.getLocalizedMessage(t)||t:"showcustompicker"===e?this.loadNativeDateInput=s.isMobile()&&!this.showcustompicker:"adaptiveposition"===e?this._dateOptions.adaptivePosition=t:super.onPropertyChange(e,t,i),"mindate"!==e&&"maxdate"!==e&&"excludedates"!==e&&"excludedays"!==e||!n||this.formControl?.control?.markAsPristine()):this._onChange(this.datavalue))}ngAfterViewInit(){super.ngAfterViewInit(),this.containerTarget=o.getContainerTargetClass(this.nativeElement),this.isReadOnly="undefined"!=this.dataentrymode&&!this.isDataEntryModeEnabledOnInput(this.dataentrymode);const e=this.getMobileInput();e&&setTimeout(()=>{e.style.width="100%",e.style.height="100%"})}ngOnDestroy(){this.dateOnShowSubscription&&this.dateOnShowSubscription.unsubscribe(),this.cancelLocaleChangeSubscription&&this.cancelLocaleChangeSubscription(),super.ngOnDestroy()}ngOnDetach(){this.datetimepickerComponent?.hideModal()}setTimezone(e){this.i18nService.setTimezone(e,this)}ngOnInit(){if(super.ngOnInit(),this.dateNotInRange||this.timeNotInRange||this.invalidDateTimeFormat){const e=s.getFormattedDate(this.datePipe,this.datavalue,this.datepattern||this.timepattern,this.timeZone,null,null,this),t=this.datavalue;this.datavalue=void 0,setTimeout(()=>{$(this.nativeElement).find(".display-input").val(this.safeReplaceMeridians(e)),this.minDateMaxDateValidationOnInput(e),this.invokeOnChange(t,{},!1)})}}static{this.\u0275fac=h.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:h,type:y,deps:"invalid",target:h.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=h.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:y,isStandalone:!0,viewQueries:[{propertyName:"bsDropdown",first:!0,predicate:n.BsDropdownDirective,descendants:!0},{propertyName:"bsTimePicker",first:!0,predicate:a.TimepickerComponent,descendants:!0},{propertyName:"datetimepickerComponent",first:!0,predicate:c.DateTimePickerComponent,descendants:!0}],usesInheritance:!0,ngImport:h})}}h.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:h,type:y,decorators:[{type:t.Directive}],ctorParameters:()=>[{type:h.Injector},{type:void 0},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}],propDecorators:{bsDropdown:[{type:t.ViewChild,args:[n.BsDropdownDirective]}],bsTimePicker:[{type:t.ViewChild,args:[a.TimepickerComponent]}],datetimepickerComponent:[{type:t.ViewChild,args:[c.DateTimePickerComponent]}]}}),e.BaseDateTimeComponent=y,e.getTimepickerConfig=function(e){return Object.assign(new a.TimepickerConfig,{meridians:[e.getLocalizedMessage("LABEL_AM")||"AM",e.getLocalizedMessage("LABEL_PM")||"PM"]})}}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("angular-imask"),require("@angular/core"),require("@angular/forms"),require("ngx-bootstrap/datepicker"),require("@wm/core"),require("@wm/components/base"),require("@wm/components/input/epoch/base-date-time"),require("imask"),require("moment"),require("lodash-es"),require("@wm/components/input/epoch/date-time-picker")):"function"==typeof define&&define.amd?define(["exports","angular-imask","@angular/core","@angular/forms","ngx-bootstrap/datepicker","@wm/core","@wm/components/base","@wm/components/input/epoch/base-date-time","imask","moment","lodash-es","@wm/components/input/epoch/date-time-picker"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.input=e.wm.components.input||{},e.wm.components.input.epoch=e.wm.components.input.epoch||{},e.wm.components.input.epoch.date={}),e.angularIMask,e.ng.core,e.ng.forms,e.ngxBootstrap.datepicker,e.wm.core,e.wm.components.base,e.wm.components.input.epoch.baseDateTime,e.IMask,e.momentLib,e._,e.wm.components.input.epoch.dateTimePicker)}(this,function(e,t,i,n,a,s,o,r,l,c,d,p){"use strict";function m(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var h=m(t),u=m(i),g=m(a),v=m(s),f=m(c);const b=new Map([["autofocus",o.PROP_BOOLEAN],["class",o.PROP_STRING],["dataentrymode",{value:"default",...o.PROP_STRING}],["datavaluesource",o.PROP_ANY],["datavalue",o.PROP_STRING],["datepattern",o.PROP_STRING],["disabled",o.PROP_BOOLEAN],["excludedays",o.PROP_STRING],["excludedates",o.PROP_STRING],["hint",o.PROP_STRING],["arialabel",o.PROP_STRING],["maxdate",o.PROP_STRING],["mindate",o.PROP_STRING],["name",o.PROP_STRING],["outputformat",{value:"yyyy-MM-dd",...o.PROP_STRING}],["placeholder",{value:"Select Date",...o.PROP_STRING}],["readonly",o.PROP_BOOLEAN],["required",o.PROP_BOOLEAN],["shortcutkey",o.PROP_STRING],["show",{value:!0,...o.PROP_BOOLEAN}],["showdropdownon",{value:"default",...o.PROP_STRING}],["showbuttonbar",{value:!0,...o.PROP_BOOLEAN}],["showcustompicker",{value:!1,...o.PROP_BOOLEAN}],["showindevice",{displayType:"inline-block",value:"all",...o.PROP_STRING}],["showweeks",{value:!1,...o.PROP_BOOLEAN}],["tabindex",{value:0,...o.PROP_NUMBER}],["selectfromothermonth",{value:!0,...o.PROP_BOOLEAN}],["todaybutton",{value:!0,...o.PROP_BOOLEAN}],["clearbutton",{value:!0,...o.PROP_BOOLEAN}],["adaptiveposition",{value:!0,...o.PROP_BOOLEAN}],["todaybuttonlabel",{value:"LABEL_TODAY_DATE",...o.PROP_STRING}],["clearbuttonlabel",{value:"LABEL_CLEAR_DATE",...o.PROP_STRING}],["showdateformatasplaceholder",o.PROP_BOOLEAN],["viewmode",{value:"day",...o.PROP_STRING}]]),y=f.default||window.moment;const w={widgetType:"wm-date",hostClass:"app-date input-group"};class P extends r.BaseDateTimeComponent{static{this.initializeProps=(o.register("wm-date",b),void o.registerFormWidget(s.FormWidgetType.DATE,new Map(b)))}get timestamp(){return this.bsDataValue?this.bsDataValue.valueOf():void 0}get dateInputFormat(){return this._dateOptions.dateInputFormat||"yyyy-MM-dd"}get displayValue(){return this.showdateformatasplaceholder&&this.imask?.maskRef&&this.maskDateInputFormat?s.getFormattedDate(this.datePipe,this.bsDataValue,this.maskDateInputFormat,this.timeZone,null,this.isCurrentDate,this)||"":s.getFormattedDate(this.datePipe,this.bsDataValue,this.dateInputFormat,this.timeZone,null,this.isCurrentDate,this)||""}get nativeDisplayValue(){return s.getFormattedDate(this.datePipe,this.bsDataValue,"yyyy-MM-dd",this.timeZone,null,this.isCurrentDate,this)||""}get datavalue(){return s.getFormattedDate(this.datePipe,this.bsDataValue,this.outputformat,this.timeZone,null,this.isCurrentDate,this)||""}set datavalue(e){"CURRENT_DATE"===e?(setTimeout(()=>{this.bsDataValue=this.timeZone?s.getMomentLocaleObject(this.timeZone):new Date},50),this.isCurrentDate=!0):(this.bsDataValue=e?s.getDateObj(e,{isNativePicker:this.loadNativeDateInput},this.timeZone):void 0,this.isCurrentDate=!1),this.invokeOnChange(this.datavalue,void 0,!0),this.cdRef.detectChanges()}constructor(e,t,i,n){super(e,w,n),this.cdRef=t,this.appDefaults=i,this.isOpen=!1,this.isEnterPressedOnDateInput=!1,this.showdateformatasplaceholder=!1,o.styler(this.nativeElement,this),this.dateContainerCls=`app-date-${this.widgetId}`,this._dateOptions.containerClass=`app-date ${this.dateContainerCls}`,this._dateOptions.showWeekNumbers=!1,this._dateOptions.customTodayClass="current-date",this._bsDefaultLoadCheck=!0,this.datepattern=this.appDefaults.dateFormat||s.getDisplayDateTimeFormat(s.FormWidgetType.DATE),this.updateFormat("datepattern")}onDisplayDateChange(e,t=!1){if(this.updateIMask(),this.isEnterPressedOnDateInput)return void(this.isEnterPressedOnDateInput=!1);let i=e.target.value;this.showdateformatasplaceholder&&i===this.maskDateInputFormatPlaceholder&&(i="");const n=s.getDateObj(i,{pattern:this.datepattern,isNativePicker:t});this.formatValidation(n,i,t)&&(t&&this.minDateMaxDateValidationOnInput(n,e,this.displayValue,t)||this.setDataValue(n))}setDataValue(e){if(this.invalidDateTimeFormat=!1,this.minDateMaxDateValidationOnInput(e),s.getFormattedDate(this.datePipe,e,this.dateInputFormat,this.timeZone,null,this.isCurrentDate,this)===this.displayValue&&$(this.nativeElement).find(".display-input").val(this.displayValue),!this.dateNotInRange&&(e?(this.bsDataValue=e,this.updateIMask()):this.bsDataValue=void 0,this.datavalue===this.getPrevDataValue())){const e=s.getFormattedDate(this.datePipe,this.datavalue,this.dateInputFormat,this.timeZone,null,this.isCurrentDate,this);$(this.nativeElement).find(".display-input").val(e)}this.invokeOnChange(this.datavalue,{},!0)}onDatePickerOpen(){this.isOpen=!0,this.activeDate=this.bsDataValue?this.bsDataValue:this.timeZone?s.getMomentLocaleObject(this.timeZone):new Date,this.updateIMask(),this.bsDatePickerDirective&&(this.dateNotInRange||this.invalidDateTimeFormat)&&(this.bsDatePickerDirective._bsValue=null),this.$element.find(".model-holder").width("1px");$("bs-datepicker-container").attr("aria-label","Use Arrow keys to navigate dates, Choose Date from datepicker"),$(".bs-calendar-container").removeAttr("role");const e=$(".bs-datepicker-container")[0];if(this.focusTrap=o.setFocusTrap(e,!0),this.focusTrap.activate(),this.addDatepickerKeyboardEvents(this,!1),s.adjustContainerPosition($("bs-datepicker-container"),this.nativeElement,this.bsDatePickerDirective._datepicker),s.adjustContainerRightEdges($("bs-datepicker-container"),this.nativeElement,this.bsDatePickerDirective._datepicker),this.timeZone){const e=document.querySelector(`.${this.dateContainerCls} .bs-datepicker-buttons .btn-today-wrapper button`),t=i=>{const n=s.getMomentLocaleObject(this.timeZone);new Date(this.bsDataValue).toDateString()!==new Date(n).toDateString()&&(this.bsDataValue=n),e.removeEventListener("click",t)};e.addEventListener("click",t)}}onInputBlur(e){this.updateIMask(),$(e.relatedTarget).hasClass("current-date")||(this.invokeOnTouched(),this.invokeEventCallback("blur",{$event:e}))}updateIMask(){this.imask?.maskRef?.updateValue()}hideDatepickerDropdown(){this.invokeOnTouched(),this.isOpen=!1,this.focusTrap?.deactivate(),this.isEnterPressedOnDateInput=!1,this.deregisterEventListener&&this.deregisterEventListener(),this.blurDateInput(this.isOpen)}handleEvent(e,t,i,n){d.includes(["blur","focus","change","click"],t)||super.handleEvent(e,t,i,n)}toggleDpDropdown(e,t=!1){this.loadNativeDateInput&&(t||this.onDateTimeInputFocus()),"click"===e.type&&this.invokeEventCallback("click",{$event:e}),e.target&&$(e.target).is("input")&&!this.isDropDownDisplayEnabledOnInput(this.showdropdownon)?e.stopPropagation():(this.bsDatePickerDirective.toggle(),this.addBodyClickListener(this.bsDatePickerDirective.isOpen))}addBodyClickListener(e){if(!e)return;const t=document.querySelector("body");setTimeout(()=>{const e=t.querySelector(`.${this.dateContainerCls}`);this.deregisterEventListener=s.addEventListenerOnElement(t,e,this.nativeElement,"click",this.isDropDownDisplayEnabledOnInput(this.showdropdownon),()=>{this.isOpen=!1},0,!0)},350)}onDisplayKeydown(e){if(this.isDropDownDisplayEnabledOnInput(this.showdropdownon))if(e.stopPropagation(),"Enter"===e.key){const t=s.getDateObj(e.target.value,{pattern:this.datepattern});e.preventDefault();const i=s.getFormattedDate(this.datePipe,t,this.dateInputFormat,this.timeZone,null,this.isCurrentDate,this);let n=e.target.value.trim();this.showdateformatasplaceholder&&n===this.maskDateInputFormatPlaceholder&&(n=""),n&&"timestamp"===this.datepattern?d.isNaN(n)||d.parseInt(n)===i||(this.invalidDateTimeFormat=!0,this.invokeOnChange(this.datavalue,e,!1)):n&&n!==i?(this.invalidDateTimeFormat=!0,this.invokeOnChange(this.datavalue,e,!1)):(this.invalidDateTimeFormat=!1,this.isEnterPressedOnDateInput=!0,this.bsDatePickerDirective.bsValue=n?t:"",this.updateIMask()),this.toggleDpDropdown(e)}else this.hideDatepickerDropdown();else this.hideDatepickerDropdown()}onDateChange(e){this._bsDefaultLoadCheck?this._bsDefaultLoadCheck=!1:this.setDataValue(e)}onPropertyChange(e,t,i){"showdateformatasplaceholder"===e?(this.showdateformatasplaceholder=t,this.imask?.destroyMask(),this.showdateformatasplaceholder&&"timestamp"!==this.datepattern&&(this.mask=function(e,t){if("timestamp"==e)return!1;let i=e.toUpperCase().replace(/E/g,"d");return i.split("D").length-1==1&&(i=i.replace("D","DD")),i.split("M").length-1==1&&(i=i.replace("M","MM")),{mask:Date,pattern:i,format:e=>y(e,i).format(i),parse:e=>y(e,i).toDate(),blocks:{YYYY:{mask:l.MaskedRange,from:1900,to:9999,placeholderChar:"Y",maxLength:4},YYY:{mask:l.MaskedRange,from:900,to:999,placeholderChar:"Y",maxLength:3},YY:{mask:l.MaskedRange,from:0,to:99,placeholderChar:"Y",maxLength:2},Y:{mask:l.MaskedRange,from:1900,to:9999,placeholderChar:"Y",maxLength:4},M:{mask:l.MaskedRange,from:1,to:12,placeholderChar:"M",maxLength:2},MM:{mask:l.MaskedRange,from:1,to:12,placeholderChar:"M",maxLength:2},MMM:{mask:l.MaskedEnum,enum:Array.from({length:12},(e,i)=>new Date(0,i).toLocaleString(t,{month:"short"})),placeholderChar:"M",maxLength:3},MMMM:{mask:l.MaskedEnum,enum:Array.from({length:12},(e,i)=>new Date(0,i).toLocaleString(t,{month:"long"})),placeholderChar:"M",maxLength:4},DD:{mask:l.MaskedRange,from:1,to:31,placeholderChar:"D",maxLength:2},D:{mask:l.MaskedRange,from:1,to:31,placeholderChar:"D",maxLength:2},ddd:{mask:l.MaskedEnum,enum:Array.from({length:7},(e,i)=>new Date(0,0,i+1).toLocaleString(t,{weekday:"short"})),placeholderChar:"E",maxLength:3},dddd:{mask:l.MaskedEnum,enum:Array.from({length:7},(e,i)=>new Date(0,0,i+1).toLocaleString(t,{weekday:"long"})),placeholderChar:"E",minLength:6}},autofix:!0,lazy:!1,overwrite:!0,skipInvalid:!0}}(this.datepattern,this.selectedLocale),this.maskDateInputFormat=this.dateInputFormat,this.maskDateInputFormat=this.dateInputFormat.split("d").length-1==1?this.maskDateInputFormat.replace("d","dd"):this.maskDateInputFormat,this.maskDateInputFormat=this.dateInputFormat.split("M").length-1==1?this.maskDateInputFormat.replace("M","MM"):this.maskDateInputFormat,this.maskDateInputFormatPlaceholder=this.maskDateInputFormat.toUpperCase().replace("EEEE","EEEEEE").replace("MMMM","MMM"),this.updateIMask())):super.onPropertyChange(e,t,i)}ngOnDestroy(){this.deregisterEventListener&&(this.deregisterEventListener(),this.deregisterEventListener=null),this.bsDatePickerDirective=null,this.imask=null,this.focusTrap&&(this.focusTrap.deactivate(),this.focusTrap=null),this.removeKeyupListener&&(this.removeKeyupListener(),this.removeKeyupListener=null),super.ngOnDestroy()}static{this.\u0275fac=u.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:u,type:P,deps:[{token:u.Injector},{token:u.ChangeDetectorRef},{token:v.AppDefaults},{token:"EXPLICIT_CONTEXT",optional:!0}],target:u.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=u.\u0275\u0275ngDeclareComponent({minVersion:"17.0.0",version:"20.3.19",type:P,isStandalone:!0,selector:"[wmDate]",providers:[o.provideAs(P,n.NG_VALUE_ACCESSOR,!0),o.provideAs(P,n.NG_VALIDATORS,!0),o.provideAsWidgetRef(P)],viewQueries:[{propertyName:"bsDatePickerDirective",first:!0,predicate:a.BsDatepickerDirective,descendants:!0},{propertyName:"imask",first:!0,predicate:["dateInput"],descendants:!0,read:t.IMaskDirective}],usesInheritance:!0,ngImport:u,template:'<input class="form-control app-textbox app-dateinput display-input"\n focus-target\n type="text"\n [name]="name"\n #dateInput\n [imask]="mask"\n [unmask]="true"\n [tabindex]="loadNativeDateInput ? \'-1\' : tabindex"\n [attr.aria-hidden]="!!loadNativeDateInput"\n [value]="displayValue"\n (click)="toggleDpDropdown($event, true)"\n (focus)="onDateTimeInputFocus(); invokeOnFocus($event); updateIMask()"\n (blur)="onInputBlur($event)"\n [disabled]="disabled || readonly"\n [autofocus]="autofocus"\n [required]="required"\n [readOnly]="isReadOnly"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n [attr.aria-label]="arialabel"\n (change)="onDisplayDateChange($event)"\n (keydown)="_triggeredByUser = true; onDisplayKeydown($event);">\n\n<span class="input-group-btn">\n <button type="button"\n class="btn btn-default btn-time"\n [tabindex]="loadNativeDateInput ? \'-1\' : tabindex"\n [attr.aria-hidden]="!!loadNativeDateInput"\n [disabled]="disabled || readonly"\n [attr.aria-label]="displayValue ? \'Change Date \' + displayValue : \'Choose date by pressing enter\'"\n aria-haspopup="true"\n [attr.aria-expanded]="isOpen"\n (click)="toggleDpDropdown($event, false)">\n <i aria-hidden="true"\n class="app-icon wm-sl-l sl-calendar"></i>\n </button>\n</span>\n<div style="width: 0;display: inline-block;">\n <input class="model-holder"\n aria-label="datepicker dropdownmenu"\n aria-controls="date"\n [tabindex]="-1"\n [attr.aria-hidden]="!!loadNativeDateInput"\n [container]="containerTarget || \'.wm-app\'"\n [bsConfig]="_dateOptions"\n [isOpen]="isOpen"\n #datepicker="bsDatepicker"\n bsDatepicker\n [daysDisabled]="excludedDaysToDisable"\n [datesDisabled]="excludedDatesToDisable"\n placement="bottom right"\n [isDisabled]="disabled || readonly"\n [bsValue]="bsDataValue"\n (onShown)="onDatePickerOpen()"\n (onHidden)="hideDatepickerDropdown()"\n (bsValueChange)="onDateChange($event)">\n</div>\n\n@if (loadNativeDateInput) {\n <wm-datetimepicker\n dateTimePicker\n mode="DATE"\n [config]="_dateOptions"\n [placement]="modal"\n [excludedDaysToDisable]="excludedDaysToDisable"\n [excludedDatesToDisable]="excludedDatesToDisable"\n [displayFormat]="dateInputFormat"\n [value]="bsDataValue"\n (change)="onDateChange($event)">\n </wm-datetimepicker>\n <div class="mobile-input mobile-datepicker-container"\n [tabindex]="tabindex || 0"\n (click)="!(disabled || readonly) && showDatePickerModal(bsDataValue)"\n (focus)="onDateTimeInputFocus(true); invokeOnFocus($event);"\n (blur)="onDateTimeInputBlur(); invokeOnTouched($event)"\n [attr.aria-label]="displayValue ? \'Change Date \' + displayValue : arialabel || \'Choose Date\'"\n role="button">\n </div>\n}\n',dependencies:[{kind:"component",type:p.DateTimePickerComponent,selector:"wm-datetimepicker",inputs:["mode","placement","config","minTime","maxTime","_displayFormat","excludedDatesToDisable","value","excludedDaysToDisable","displayFormat"],outputs:["change"]},{kind:"ngmodule",type:t.IMaskModule},{kind:"directive",type:h.IMaskDirective,selector:"[imask]",inputs:["imask","unmask","imaskElement"],outputs:["accept","complete"],exportAs:["imask"]},{kind:"ngmodule",type:a.BsDatepickerModule},{kind:"directive",type:g.BsDatepickerDirective,selector:"[bsDatepicker]",inputs:["placement","triggers","outsideClick","container","outsideEsc","isDisabled","minDate","maxDate","ignoreMinMaxErrors","minMode","daysDisabled","datesDisabled","datesEnabled","dateCustomClasses","dateTooltipTexts","isOpen","bsValue","bsConfig"],outputs:["onShown","onHidden","bsValueChange"],exportAs:["bsDatepicker"]},{kind:"directive",type:g.BsDatepickerInputDirective,selector:"input[bsDatepicker]"}]})}}u.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:u,type:P,decorators:[{type:i.Component,args:[{standalone:!0,imports:[p.DateTimePickerComponent,t.IMaskModule,a.BsDatepickerModule],selector:"[wmDate]",providers:[o.provideAs(P,n.NG_VALUE_ACCESSOR,!0),o.provideAs(P,n.NG_VALIDATORS,!0),o.provideAsWidgetRef(P)],template:'<input class="form-control app-textbox app-dateinput display-input"\n focus-target\n type="text"\n [name]="name"\n #dateInput\n [imask]="mask"\n [unmask]="true"\n [tabindex]="loadNativeDateInput ? \'-1\' : tabindex"\n [attr.aria-hidden]="!!loadNativeDateInput"\n [value]="displayValue"\n (click)="toggleDpDropdown($event, true)"\n (focus)="onDateTimeInputFocus(); invokeOnFocus($event); updateIMask()"\n (blur)="onInputBlur($event)"\n [disabled]="disabled || readonly"\n [autofocus]="autofocus"\n [required]="required"\n [readOnly]="isReadOnly"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n [attr.aria-label]="arialabel"\n (change)="onDisplayDateChange($event)"\n (keydown)="_triggeredByUser = true; onDisplayKeydown($event);">\n\n<span class="input-group-btn">\n <button type="button"\n class="btn btn-default btn-time"\n [tabindex]="loadNativeDateInput ? \'-1\' : tabindex"\n [attr.aria-hidden]="!!loadNativeDateInput"\n [disabled]="disabled || readonly"\n [attr.aria-label]="displayValue ? \'Change Date \' + displayValue : \'Choose date by pressing enter\'"\n aria-haspopup="true"\n [attr.aria-expanded]="isOpen"\n (click)="toggleDpDropdown($event, false)">\n <i aria-hidden="true"\n class="app-icon wm-sl-l sl-calendar"></i>\n </button>\n</span>\n<div style="width: 0;display: inline-block;">\n <input class="model-holder"\n aria-label="datepicker dropdownmenu"\n aria-controls="date"\n [tabindex]="-1"\n [attr.aria-hidden]="!!loadNativeDateInput"\n [container]="containerTarget || \'.wm-app\'"\n [bsConfig]="_dateOptions"\n [isOpen]="isOpen"\n #datepicker="bsDatepicker"\n bsDatepicker\n [daysDisabled]="excludedDaysToDisable"\n [datesDisabled]="excludedDatesToDisable"\n placement="bottom right"\n [isDisabled]="disabled || readonly"\n [bsValue]="bsDataValue"\n (onShown)="onDatePickerOpen()"\n (onHidden)="hideDatepickerDropdown()"\n (bsValueChange)="onDateChange($event)">\n</div>\n\n@if (loadNativeDateInput) {\n <wm-datetimepicker\n dateTimePicker\n mode="DATE"\n [config]="_dateOptions"\n [placement]="modal"\n [excludedDaysToDisable]="excludedDaysToDisable"\n [excludedDatesToDisable]="excludedDatesToDisable"\n [displayFormat]="dateInputFormat"\n [value]="bsDataValue"\n (change)="onDateChange($event)">\n </wm-datetimepicker>\n <div class="mobile-input mobile-datepicker-container"\n [tabindex]="tabindex || 0"\n (click)="!(disabled || readonly) && showDatePickerModal(bsDataValue)"\n (focus)="onDateTimeInputFocus(true); invokeOnFocus($event);"\n (blur)="onDateTimeInputBlur(); invokeOnTouched($event)"\n [attr.aria-label]="displayValue ? \'Change Date \' + displayValue : arialabel || \'Choose Date\'"\n role="button">\n </div>\n}\n'}]}],ctorParameters:()=>[{type:u.Injector},{type:u.ChangeDetectorRef},{type:v.AppDefaults},{type:void 0,decorators:[{type:i.Inject,args:["EXPLICIT_CONTEXT"]},{type:i.Optional}]}],propDecorators:{bsDatePickerDirective:[{type:i.ViewChild,args:[a.BsDatepickerDirective]}],imask:[{type:i.ViewChild,args:["dateInput",{read:t.IMaskDirective}]}]}}),e.DateComponent=P}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/forms"),require("@angular/common"),require("@wm/components/input/epoch/date-time-picker"),require("@angular/core"),require("ngx-bootstrap/datepicker"),require("ngx-bootstrap/timepicker"),require("@wm/core"),require("@wm/components/base"),require("@wm/components/input/epoch/base-date-time"),require("lodash-es"),require("ngx-bootstrap/dropdown"),require("moment")):"function"==typeof define&&define.amd?define(["exports","@angular/forms","@angular/common","@wm/components/input/epoch/date-time-picker","@angular/core","ngx-bootstrap/datepicker","ngx-bootstrap/timepicker","@wm/core","@wm/components/base","@wm/components/input/epoch/base-date-time","lodash-es","ngx-bootstrap/dropdown","moment"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.input=e.wm.components.input||{},e.wm.components.input.epoch=e.wm.components.input.epoch||{},e.wm.components.input.epoch.dateTime={}),e.ng.forms,e.ng.common,e.wm.components.input.epoch.dateTimePicker,e.ng.core,e.ngxBootstrap.datepicker,e.ngxBootstrap.timepicker,e.wm.core,e.wm.components.base,e.wm.components.input.epoch.baseDateTime,e._,e.ngxBootstrap.dropdown,e.momentLib)}(this,function(e,t,i,n,a,s,o,r,l,c,d,p,m){"use strict";function h(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var u=h(t),g=h(i),v=h(a),f=h(s),b=h(o),y=h(r),w=h(p),P=h(m);const C=new Map([["autofocus",l.PROP_BOOLEAN],["class",l.PROP_STRING],["dataentrymode",{value:"default",...l.PROP_STRING}],["datavaluesource",l.PROP_ANY],["datavalue",l.PROP_STRING],["datepattern",l.PROP_STRING],["disabled",l.PROP_BOOLEAN],["excludedays",l.PROP_STRING],["excludedates",l.PROP_STRING],["hint",l.PROP_STRING],["arialabel",l.PROP_STRING],["hourstep",{value:1,...l.PROP_NUMBER}],["maxdate",l.PROP_STRING],["mindate",l.PROP_STRING],["minutestep",{value:15,...l.PROP_NUMBER}],["name",l.PROP_STRING],["outputformat",{value:"timestamp",...l.PROP_STRING}],["placeholder",{value:"Select date time",...l.PROP_STRING}],["readonly",l.PROP_BOOLEAN],["required",l.PROP_BOOLEAN],["secondsstep",{value:1,...l.PROP_NUMBER}],["shortcutkey",l.PROP_STRING],["show",{value:!0,...l.PROP_BOOLEAN}],["showdropdownon",{value:"default",...l.PROP_STRING}],["showbuttonbar",l.PROP_BOOLEAN],["showcustompicker",{value:!1,...l.PROP_BOOLEAN}],["showindevice",{displayType:"inline-block",value:"all",...l.PROP_STRING}],["showweeks",l.PROP_BOOLEAN],["tabindex",{value:0,...l.PROP_NUMBER}],["timestamp",l.PROP_STRING],["selectfromothermonth",{value:!0,...l.PROP_BOOLEAN}],["todaybutton",{value:!0,...l.PROP_BOOLEAN}],["clearbutton",{value:!0,...l.PROP_BOOLEAN}],["adaptiveposition",{value:!0,...l.PROP_BOOLEAN}],["todaybuttonlabel",{value:"LABEL_TODAY_DATE",...l.PROP_STRING}],["clearbuttonlabel",{value:"LABEL_CLEAR_DATE",...l.PROP_STRING}],["showampmbuttons",{value:!1,...l.PROP_BOOLEAN}]]),T=P.default||window.moment,O={widgetType:"wm-datetime",hostClass:"app-datetime input-group"},I="CURRENT_DATE";class D extends c.BaseDateTimeComponent{static{this.initializeProps=(l.register("wm-datetime",C),l.registerFormWidget(r.FormWidgetType.DATETIME,new Map(C)),void l.registerFormWidget(r.FormWidgetType.TIMESTAMP,new Map(C)))}get timestamp(){return this.proxyModel?this.proxyModel.valueOf():void 0}get dateInputFormat(){return this._dateOptions.dateInputFormat||"yyyy-MM-ddTHH:mm:ss"}get displayValue(){const e=r.getFormattedDate(this.datePipe,this.proxyModel,this.dateInputFormat,this.timeZone,this.key,this.isCurrentDate,this)||"";return this.safeReplaceMeridians(e)}get nativeDisplayValue(){return r.getFormattedDate(this.datePipe,this.proxyModel,"yyyy-MM-ddTHH:mm:ss",this.timeZone,this.key,this.isCurrentDate,this)||""}get datavalue(){return this.isCurrentDate&&!this.proxyModel?I:r.getFormattedDate(this.datePipe,this.proxyModel,this.outputformat,this.timeZone,null,null,this)}set datavalue(e){e===I?(this.isCurrentDate=!0,this.setTimeInterval()):(this.proxyModel=e?r.getDateObj(e,{isNativePicker:this.loadNativeDateInput},this.timeZone):void 0,this.clearTimeInterval(),this.isCurrentDate=!1),this.bsTimeValue=this.bsDateValue=this.proxyModel,this.cdRef.detectChanges()}constructor(e,t,i,n,a,s){super(e,O,s),this.ngZone=t,this.cdRef=i,this.appDefaults=n,this.isEnterPressedOnDateInput=!1,this.isTimeOpen=!1,this.isDateOpen=!1,this.isCurrentDate=!1,this._debouncedOnChange=d.debounce(this.invokeOnChange,10),this.registerDestroyListener(()=>this.clearTimeInterval()),l.styler(this.nativeElement,this),this.app=a,this.dateContainerCls=`app-date-${this.widgetId}`,this._dateOptions.containerClass=`app-date ${this.dateContainerCls}`,this._dateOptions.showWeekNumbers=!1,this._dateOptions.customTodayClass="current-date",this.datepattern=this.appDefaults.dateTimeFormat||r.getDisplayDateTimeFormat(r.FormWidgetType.DATETIME),this.updateFormat("datepattern")}setTimeInterval(){this.timeinterval||(this.timeinterval=setInterval(()=>{const e=this.timeZone?r.getMomentLocaleObject(this.timeZone):new Date;this.onModelUpdate(e)},1e3))}clearTimeInterval(){this.timeinterval&&(clearInterval(this.timeinterval),this.timeinterval=null)}toggleTimePicker(e,t){this.loadNativeDateInput?this.onDateTimeInputFocus():(this.isTimeOpen=e,t&&"click"===t.type&&this.invokeEventCallback("click",{$event:t}),this.addTimepickerClickListener(this.isTimeOpen))}addTimepickerClickListener(e){if(!e)return;const t=document.querySelector("body");setTimeout(()=>{const e=$(t).find(">bs-dropdown-container .dropdown-menu").get(0);this.deregisterTimepickeEventListener=r.addEventListenerOnElement(t,e,this.nativeElement,"click",this.isDropDownDisplayEnabledOnInput(this.showdropdownon),()=>{this.toggleTimePicker(!1)},0,!0)},350)}setIsTimeOpen(e){this.isTimeOpen=e}hideTimepickerDropdown(){this.invokeOnTouched(),this.toggleTimePicker(!1),this.deregisterTimepickeEventListener&&this.deregisterTimepickeEventListener();const e=$(this.nativeElement).closest(".app-composite-widget.caption-floating");e.length>0&&this.app.notify("captionPositionAnimate",{displayVal:this.displayValue,nativeEl:e})}onTimepickerOpen(){const e=document.querySelectorAll("timepicker");d.forEach(e,e=>{r.addClass(e.parentElement,"app-datetime",!0)}),this.bsDropdown&&(this.dateNotInRange||this.invalidDateTimeFormat)&&(this.bsTimeValue=null),this.bsDatePickerDirective.hide(),this.focusTimePickerPopover(this),this.bindTimePickerKeyboardEvents(),r.adjustContainerPosition($("bs-dropdown-container"),this.nativeElement,this.bsDropdown._dropdown,$("bs-dropdown-container .dropdown-menu"))}onDatePickerOpen(){this.isDateOpen=!this.isDateOpen,this.toggleTimePicker(!1),this.$element.find(".model-holder").width("1px");$("bs-datepicker-container").attr("aria-label","Use Arrow keys to navigate dates, Choose Date from datepicker"),$(".bs-calendar-container").removeAttr("role");const e=$(".bs-datepicker-container")[0];this.focusTrap=l.setFocusTrap(e,!0),this.focusTrap.activate(),this.bsDateValue?this.activeDate=this.bsDateValue:this.activeDate=new Date,this.addDatepickerKeyboardEvents(this,!0),r.adjustContainerPosition($("bs-datepicker-container"),this.nativeElement,this.bsDatePickerDirective._datepicker)}onModelUpdate(e,t){if("date"===t){this.invalidDateTimeFormat=!1;const t=r.getFormattedDate(this.datePipe,e,this.dateInputFormat,this.timeZone,this.key,this.isCurrentDate,this);this.safeReplaceMeridians(t)===this.displayValue&&$(this.nativeElement).find(".display-input").val(this.displayValue)}if(e&&!this.bsDateValue&&this.timeZone&&(e=r.getMomentLocaleObject(this.timeZone,e)),this.minDateMaxDateValidationOnInput(e),!e)return this.bsDateValue&&this.bsTimePicker&&(""===this.bsTimePicker.hours||""===this.bsTimePicker.minutes||""===this.bsTimePicker.seconds)?this.bsDateValue=this.bsTimeValue=this.proxyModel=T(this.bsDateValue).startOf("day").toDate():this.bsDateValue=this.bsTimeValue=this.proxyModel=void 0,void((e!==this.datavalue||!this.datavalue&&this.prevDatavalue)&&this._debouncedOnChange(this.datavalue,{},!0));if("date"===t&&this.isDateOpen&&this.toggleTimePicker(!0),this.dateNotInRange||this.invalidDateTimeFormat)this.proxyModel=e;else if(this.proxyModel=e,this.proxyModel&&(this.bsDateValue=this.bsTimeValue=e),this.datavalue===this.getPrevDataValue()){const e=r.getFormattedDate(this.datePipe,this.datavalue,this.datepattern,this.timeZone,null,null,this)||"";$(this.nativeElement).find(".display-input").val(e?.replace(this.meridians[0],this.am)?.replace(this.meridians[1],this.pm))}this._debouncedOnChange(this.datavalue,{},!0),this.cdRef.detectChanges();const i=$(".bs-timepicker-field");if(this.timeZone&&"datetimestamp"===this.key&&i.length){const t=r.getFormattedDate(this.datePipe,e,this.getTimePattern(),this.timeZone,this.key,null,this);this.updateTimepickerFields(this.safeReplaceMeridians(t),i)}}getTimePattern(){let e;const t=this.datepattern.toLowerCase().indexOf("h");let i=this.datepattern.toLowerCase().indexOf(":ss");i>-1?i+=3:(i=this.datepattern.toLowerCase().indexOf(":mm"),i>-1&&(i+=3));const n=this.datepattern.toLowerCase().indexOf("a");return e=this.datepattern.substr(t,i),n>-1&&(e+=" a"),e}updateTimepickerFields(e,t){const i=$("timepicker button.text-center"),n=e.split(" "),a=n[0].split(":");for(let e=0;e<t.length;e++)t[e].value=a[e];i?.html()?.trim()!==n[1]&&i.text(n[1])}preventTpClose(e){e.stopImmediatePropagation()}toggleDpDropdown(e,t=!1){this.loadNativeDateInput?t||this.onDateTimeInputFocus():("click"===e.type&&this.invokeEventCallback("click",{$event:e}),e.target&&$(e.target).is("input")&&!this.isDropDownDisplayEnabledOnInput(this.showdropdownon)?e.stopPropagation():(this.bsDatePickerDirective&&(this.dateNotInRange||this.invalidDateTimeFormat)&&(this.bsDatePickerDirective._bsValue=null),this.bsDatePickerDirective.toggle(),this.addBodyClickListener(this.bsDatePickerDirective.isOpen)))}addBodyClickListener(e){if(!e)return;const t=document.querySelector("body");setTimeout(()=>{const e=t.querySelector(`.${this.dateContainerCls}`);this.deregisterDatepickerEventListener=r.addEventListenerOnElement(t,e,this.nativeElement,"click",this.isDropDownDisplayEnabledOnInput(this.showdropdownon),()=>{this.bsDatePickerDirective.hide()},0,!0)},350)}hideDatepickerDropdown(){this.isDateOpen=!1,this.focusTrap?.deactivate(),this.invokeOnTouched(),this.bsDatePickerDirective.hide(),this.bsDateValue&&this.toggleTimePicker(!0),this.isEnterPressedOnDateInput=!1,this.deregisterDatepickerEventListener&&this.deregisterDatepickerEventListener();const e=$(this.nativeElement).closest(".app-composite-widget.caption-floating");e.length>0&&this.app.notify("captionPositionAnimate",{displayVal:this.displayValue,nativeEl:e}),this.blurDateInput(this.isDateOpen)}onDateChange(e,t){if(this.isEnterPressedOnDateInput)return void(this.isEnterPressedOnDateInput=!1);let i=e.target.value.trim();i=i?r.getNativeDateObject(i?.replace(this.am,this.meridians[0])?.replace(this.pm,this.meridians[1]),{pattern:this.loadNativeDateInput?this.outputformat:this.datepattern,meridians:this.meridians,isNativePicker:this.loadNativeDateInput}):void 0,this.formatValidation(i,e.target.value,t)&&(t&&this.minDateMaxDateValidationOnInput(i,e,this.displayValue,t)||(this.invalidDateTimeFormat=!1,this.onModelUpdate(i)))}onDisplayKeydown(e){if(this.isDropDownDisplayEnabledOnInput(this.showdropdownon)){e.stopPropagation();let t=e.target.value.trim();if("Enter"===e.key||"ArrowDown"===e.key){t=t?r.getNativeDateObject(t,{pattern:this.loadNativeDateInput?this.outputformat:this.datepattern,meridians:this.meridians}):void 0,e.preventDefault();const i=r.getFormattedDate(this.datePipe,t,this.dateInputFormat,this.timeZone,this.key,this.isCurrentDate,this),n=this.safeReplaceMeridians(i),a=e.target.value.trim();a&&"timestamp"===this.datepattern?d.isNaN(a)||d.parseInt(a)===i||(this.invalidDateTimeFormat=!0,this.invokeOnChange(this.datavalue,e,!1)):a&&a!==n?(this.invalidDateTimeFormat=!0,this.invokeOnChange(this.datavalue,e,!1)):(this.invalidDateTimeFormat=!1,this.isEnterPressedOnDateInput=!0,this.bsDatePickerDirective.bsValue=t),this.toggleDpDropdown(e)}else this.hideDatepickerDropdown(),this.hideTimepickerDropdown()}else this.hideDatepickerDropdown(),this.hideTimepickerDropdown()}isValid(e){if(!e){const e=$(this.nativeElement).find("input").val()?.replace(this.am,this.meridians[0])?.replace(this.pm,this.meridians[1]),t=r.getNativeDateObject(e,{pattern:this.loadNativeDateInput?this.outputformat:this.datepattern,meridians:this.meridians,isNativePicker:this.loadNativeDateInput});if(!this.formatValidation(t,e))return}}handleEvent(e,t,i,n){d.includes(["blur","focus","change","click"],t)||super.handleEvent(e,t,i,n)}onInputBlur(e){$(e.relatedTarget).hasClass("current-date")||(this.invokeOnTouched(),this.invokeEventCallback("blur",{$event:e}))}static{this.\u0275fac=v.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:v,type:D,deps:[{token:v.Injector},{token:v.NgZone},{token:v.ChangeDetectorRef},{token:y.AppDefaults},{token:y.App},{token:"EXPLICIT_CONTEXT",optional:!0}],target:v.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=v.\u0275\u0275ngDeclareComponent({minVersion:"17.0.0",version:"20.3.19",type:D,isStandalone:!0,selector:"[wmDateTime]",providers:[l.provideAs(D,t.NG_VALUE_ACCESSOR,!0),l.provideAs(D,t.NG_VALIDATORS,!0),l.provideAsWidgetRef(D),{provide:o.TimepickerConfig,deps:[r.AbstractI18nService],useFactory:c.getTimepickerConfig}],viewQueries:[{propertyName:"bsDatePickerDirective",first:!0,predicate:s.BsDatepickerDirective,descendants:!0}],usesInheritance:!0,ngImport:v,template:'<div dropdown\n [isOpen]="isTimeOpen"\n autoClose="false"\n [container]="\'body\'"\n (onShown)="onTimepickerOpen()"\n style="display: inherit;">\n <input class="form-control app-textbox display-input"\n [attr.aria-label]="arialabel"\n focus-target\n [name]="name"\n [tabindex]="loadNativeDateInput ? \'-1\' : tabindex"\n [attr.aria-hidden]="!!loadNativeDateInput"\n type="text"\n [value]="displayValue"\n (click)="toggleDpDropdown($event, true)"\n (focus)="onDateTimeInputFocus(); invokeOnFocus($event);"\n (blur)="onInputBlur($event)"\n (change)="onDateChange($event)"\n [autofocus]="autofocus"\n [disabled]="disabled || readonly || isCurrentDate"\n [required]="required"\n [readOnly]="isReadOnly"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n (keydown)="_triggeredByUser = true; onDisplayKeydown($event)">\n\n <span class="input-group-btn">\n <button type="button"\n class="btn btn-default btn-date"\n [tabindex]="loadNativeDateInput ? \'-1\' : tabindex"\n [attr.aria-hidden]="!!loadNativeDateInput"\n [disabled]="disabled || readonly || isCurrentDate"\n [attr.aria-label]="displayValue ? \'Change Date \' + displayValue : \'Choose date by pressing enter\'"\n aria-haspopup="true"\n [attr.aria-expanded]="isDateOpen"\n (click)="toggleDpDropdown($event, false)">\n <i aria-hidden="true"\n class="app-icon wm-sl-l sl-calendar"></i>\n </button>\n <button type="button"\n class="btn btn-default btn-time"\n [tabindex]="loadNativeDateInput ? \'-1\' : tabindex"\n [attr.aria-hidden]="!!loadNativeDateInput"\n [disabled]="disabled || readonly || isCurrentDate"\n aria-label="Select time"\n aria-haspopup="true"\n aria-expanded="false"\n (click)="toggleTimePicker(!isTimeOpen, $event)">\n <i aria-hidden="true"\n class="app-icon wm-sl-l sl-time"></i>\n </button>\n </span>\n <div style="width: 0;display: inline-block;">\n <input class="model-holder"\n aria-label="datepicker dropdownmenu"\n aria-controls="date"\n focus-target\n [tabindex]="-1"\n [attr.aria-hidden]="!!loadNativeDateInput"\n [container]="containerTarget || \'.wm-app\'"\n [bsConfig]="_dateOptions"\n [isOpen]="isDateOpen"\n placement="bottom right"\n (onShown)="onDatePickerOpen()"\n (onHidden)="hideDatepickerDropdown()"\n [daysDisabled]="excludedDaysToDisable"\n [datesDisabled]="excludedDatesToDisable"\n #datepicker=bsDatepicker\n bsDatepicker\n [isDisabled]="disabled || readonly || isCurrentDate"\n [bsValue]="bsDateValue"\n (bsValueChange)="onModelUpdate($event, \'date\')">\n </div>\n <div *dropdownMenu\n class="dropdown-menu"\n aria-label="timepicker dropdown"\n aria-controls="time"\n (click)="preventTpClose($event)">\n <timepicker class="model-holder"\n [showMeridian]="ismeridian"\n [readonlyInput]="disabled || readonly || isCurrentDate"\n [(ngModel)]="bsTimeValue"\n [ngModelOptions]="{standalone: true}"\n [min]="minTime"\n [max]="maxTime"\n [hourStep]="hourstep"\n [minuteStep]="minutestep"\n [secondsStep]="secondsstep"\n [mousewheel]="true"\n [arrowkeys]="true"\n (isValid)="isValid($event)"\n [showSeconds]="showseconds"\n (ngModelChange)="onModelUpdate($event, \'time\')"\n [ngClass]="{ \'showbuttons\': showampmbuttons }"></timepicker>\n @if (ismeridian && showampmbuttons) {\n <div class="ampm-toggle text-center">\n <button class="meridian-btn mb-1" [ngClass]="{ \'active btn-secondary\': getPeriod() === \'AM\' }" (click)="setPeriod(\'AM\')">{{appLocale.LABEL_AM ||"AM"}}</button><br>\n <button class="meridian-btn" [ngClass]="{ \'active btn-secondary\': getPeriod() === \'PM\' }" (click)="setPeriod(\'PM\')">{{appLocale.LABEL_PM ||"PM"}}</button>\n </div>\n }\n </div>\n </div>\n@if (loadNativeDateInput) {\n <wm-datetimepicker\n dateTimePicker\n [config]="_dateOptions"\n [placement]="modal"\n [excludedDaysToDisable]="excludedDaysToDisable"\n [excludedDatesToDisable]="excludedDatesToDisable"\n [displayFormat]="dateInputFormat"\n [value]="bsDateValue"\n (change)="onModelUpdate($event, \'date\')">\n </wm-datetimepicker>\n <div class="mobile-input mobile-datepicker-container"\n [tabindex]="tabindex || 0"\n (click)="!(disabled || readonly) && showDatePickerModal(bsDateValue)"\n [attr.aria-label]="displayValue ? \'Change Date \' + displayValue : arialabel || \'Choose Date\'"\n (focus)="onDateTimeInputFocus(true); invokeOnFocus($event)"\n (blur)="onDateTimeInputBlur(); invokeOnTouched($event)"\n role="button">\n </div>\n}\n',dependencies:[{kind:"ngmodule",type:t.FormsModule},{kind:"directive",type:u.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:u.NgModel,selector:"[ngModel]:not([formControlName]):not([formControl])",inputs:["name","disabled","ngModel","ngModelOptions"],outputs:["ngModelChange"],exportAs:["ngModel"]},{kind:"component",type:n.DateTimePickerComponent,selector:"wm-datetimepicker",inputs:["mode","placement","config","minTime","maxTime","_displayFormat","excludedDatesToDisable","value","excludedDaysToDisable","displayFormat"],outputs:["change"]},{kind:"ngmodule",type:p.BsDropdownModule},{kind:"directive",type:w.BsDropdownMenuDirective,selector:"[bsDropdownMenu],[dropdownMenu]",exportAs:["bs-dropdown-menu"]},{kind:"directive",type:w.BsDropdownDirective,selector:"[bsDropdown], [dropdown]",inputs:["placement","triggers","container","dropup","autoClose","isAnimated","insideClick","isDisabled","isOpen"],outputs:["isOpenChange","onShown","onHidden"],exportAs:["bs-dropdown"]},{kind:"ngmodule",type:s.BsDatepickerModule},{kind:"directive",type:f.BsDatepickerDirective,selector:"[bsDatepicker]",inputs:["placement","triggers","outsideClick","container","outsideEsc","isDisabled","minDate","maxDate","ignoreMinMaxErrors","minMode","daysDisabled","datesDisabled","datesEnabled","dateCustomClasses","dateTooltipTexts","isOpen","bsValue","bsConfig"],outputs:["onShown","onHidden","bsValueChange"],exportAs:["bsDatepicker"]},{kind:"directive",type:f.BsDatepickerInputDirective,selector:"input[bsDatepicker]"},{kind:"ngmodule",type:o.TimepickerModule},{kind:"component",type:b.TimepickerComponent,selector:"timepicker",inputs:["hourStep","minuteStep","secondsStep","readonlyInput","disabled","mousewheel","arrowkeys","showSpinners","showMeridian","showMinutes","showSeconds","meridians","min","max","hoursPlaceholder","minutesPlaceholder","secondsPlaceholder"],outputs:["isValid","meridianChange"]},{kind:"ngmodule",type:i.CommonModule},{kind:"directive",type:g.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]}]})}}v.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:v,type:D,decorators:[{type:a.Component,args:[{standalone:!0,imports:[t.FormsModule,n.DateTimePickerComponent,p.BsDropdownModule,s.BsDatepickerModule,o.TimepickerModule,i.CommonModule],selector:"[wmDateTime]",providers:[l.provideAs(D,t.NG_VALUE_ACCESSOR,!0),l.provideAs(D,t.NG_VALIDATORS,!0),l.provideAsWidgetRef(D),{provide:o.TimepickerConfig,deps:[r.AbstractI18nService],useFactory:c.getTimepickerConfig}],template:'<div dropdown\n [isOpen]="isTimeOpen"\n autoClose="false"\n [container]="\'body\'"\n (onShown)="onTimepickerOpen()"\n style="display: inherit;">\n <input class="form-control app-textbox display-input"\n [attr.aria-label]="arialabel"\n focus-target\n [name]="name"\n [tabindex]="loadNativeDateInput ? \'-1\' : tabindex"\n [attr.aria-hidden]="!!loadNativeDateInput"\n type="text"\n [value]="displayValue"\n (click)="toggleDpDropdown($event, true)"\n (focus)="onDateTimeInputFocus(); invokeOnFocus($event);"\n (blur)="onInputBlur($event)"\n (change)="onDateChange($event)"\n [autofocus]="autofocus"\n [disabled]="disabled || readonly || isCurrentDate"\n [required]="required"\n [readOnly]="isReadOnly"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n (keydown)="_triggeredByUser = true; onDisplayKeydown($event)">\n\n <span class="input-group-btn">\n <button type="button"\n class="btn btn-default btn-date"\n [tabindex]="loadNativeDateInput ? \'-1\' : tabindex"\n [attr.aria-hidden]="!!loadNativeDateInput"\n [disabled]="disabled || readonly || isCurrentDate"\n [attr.aria-label]="displayValue ? \'Change Date \' + displayValue : \'Choose date by pressing enter\'"\n aria-haspopup="true"\n [attr.aria-expanded]="isDateOpen"\n (click)="toggleDpDropdown($event, false)">\n <i aria-hidden="true"\n class="app-icon wm-sl-l sl-calendar"></i>\n </button>\n <button type="button"\n class="btn btn-default btn-time"\n [tabindex]="loadNativeDateInput ? \'-1\' : tabindex"\n [attr.aria-hidden]="!!loadNativeDateInput"\n [disabled]="disabled || readonly || isCurrentDate"\n aria-label="Select time"\n aria-haspopup="true"\n aria-expanded="false"\n (click)="toggleTimePicker(!isTimeOpen, $event)">\n <i aria-hidden="true"\n class="app-icon wm-sl-l sl-time"></i>\n </button>\n </span>\n <div style="width: 0;display: inline-block;">\n <input class="model-holder"\n aria-label="datepicker dropdownmenu"\n aria-controls="date"\n focus-target\n [tabindex]="-1"\n [attr.aria-hidden]="!!loadNativeDateInput"\n [container]="containerTarget || \'.wm-app\'"\n [bsConfig]="_dateOptions"\n [isOpen]="isDateOpen"\n placement="bottom right"\n (onShown)="onDatePickerOpen()"\n (onHidden)="hideDatepickerDropdown()"\n [daysDisabled]="excludedDaysToDisable"\n [datesDisabled]="excludedDatesToDisable"\n #datepicker=bsDatepicker\n bsDatepicker\n [isDisabled]="disabled || readonly || isCurrentDate"\n [bsValue]="bsDateValue"\n (bsValueChange)="onModelUpdate($event, \'date\')">\n </div>\n <div *dropdownMenu\n class="dropdown-menu"\n aria-label="timepicker dropdown"\n aria-controls="time"\n (click)="preventTpClose($event)">\n <timepicker class="model-holder"\n [showMeridian]="ismeridian"\n [readonlyInput]="disabled || readonly || isCurrentDate"\n [(ngModel)]="bsTimeValue"\n [ngModelOptions]="{standalone: true}"\n [min]="minTime"\n [max]="maxTime"\n [hourStep]="hourstep"\n [minuteStep]="minutestep"\n [secondsStep]="secondsstep"\n [mousewheel]="true"\n [arrowkeys]="true"\n (isValid)="isValid($event)"\n [showSeconds]="showseconds"\n (ngModelChange)="onModelUpdate($event, \'time\')"\n [ngClass]="{ \'showbuttons\': showampmbuttons }"></timepicker>\n @if (ismeridian && showampmbuttons) {\n <div class="ampm-toggle text-center">\n <button class="meridian-btn mb-1" [ngClass]="{ \'active btn-secondary\': getPeriod() === \'AM\' }" (click)="setPeriod(\'AM\')">{{appLocale.LABEL_AM ||"AM"}}</button><br>\n <button class="meridian-btn" [ngClass]="{ \'active btn-secondary\': getPeriod() === \'PM\' }" (click)="setPeriod(\'PM\')">{{appLocale.LABEL_PM ||"PM"}}</button>\n </div>\n }\n </div>\n </div>\n@if (loadNativeDateInput) {\n <wm-datetimepicker\n dateTimePicker\n [config]="_dateOptions"\n [placement]="modal"\n [excludedDaysToDisable]="excludedDaysToDisable"\n [excludedDatesToDisable]="excludedDatesToDisable"\n [displayFormat]="dateInputFormat"\n [value]="bsDateValue"\n (change)="onModelUpdate($event, \'date\')">\n </wm-datetimepicker>\n <div class="mobile-input mobile-datepicker-container"\n [tabindex]="tabindex || 0"\n (click)="!(disabled || readonly) && showDatePickerModal(bsDateValue)"\n [attr.aria-label]="displayValue ? \'Change Date \' + displayValue : arialabel || \'Choose Date\'"\n (focus)="onDateTimeInputFocus(true); invokeOnFocus($event)"\n (blur)="onDateTimeInputBlur(); invokeOnTouched($event)"\n role="button">\n </div>\n}\n'}]}],ctorParameters:()=>[{type:v.Injector},{type:v.NgZone},{type:v.ChangeDetectorRef},{type:y.AppDefaults},{type:y.App},{type:void 0,decorators:[{type:a.Inject,args:["EXPLICIT_CONTEXT"]},{type:a.Optional}]}],propDecorators:{bsDatePickerDirective:[{type:a.ViewChild,args:[s.BsDatepickerDirective]}]}}),e.DatetimeComponent=D}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/forms"),require("@wm/components/input/epoch/date-time-picker"),require("@angular/common"),require("@angular/core"),require("ngx-bootstrap/timepicker"),require("@wm/core"),require("@wm/components/base"),require("@wm/components/input/epoch/base-date-time"),require("lodash-es"),require("ngx-bootstrap/dropdown"),require("moment")):"function"==typeof define&&define.amd?define(["exports","@angular/forms","@wm/components/input/epoch/date-time-picker","@angular/common","@angular/core","ngx-bootstrap/timepicker","@wm/core","@wm/components/base","@wm/components/input/epoch/base-date-time","lodash-es","ngx-bootstrap/dropdown","moment"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.input=e.wm.components.input||{},e.wm.components.input.epoch=e.wm.components.input.epoch||{},e.wm.components.input.epoch.time={}),e.ng.forms,e.wm.components.input.epoch.dateTimePicker,e.ng.common,e.ng.core,e.ngxBootstrap.timepicker,e.wm.core,e.wm.components.base,e.wm.components.input.epoch.baseDateTime,e._,e.ngxBootstrap.dropdown,e.momentLib)}(this,function(e,t,i,n,a,s,o,r,l,c,d,p){"use strict";function m(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var h=m(t),u=m(n),g=m(a),v=m(s),f=m(o),b=m(d),y=m(p);const w=new Map([["autofocus",r.PROP_BOOLEAN],["class",r.PROP_STRING],["dataentrymode",{value:"default",...r.PROP_STRING}],["datavaluesource",r.PROP_ANY],["datavalue",r.PROP_STRING],["disabled",r.PROP_BOOLEAN],["hint",r.PROP_STRING],["arialabel",r.PROP_STRING],["hourstep",{value:1,...r.PROP_NUMBER}],["maxtime",r.PROP_STRING],["mintime",r.PROP_STRING],["minutestep",{value:15,...r.PROP_NUMBER}],["name",r.PROP_STRING],["outputformat",{value:"HH:mm:ss",...r.PROP_STRING}],["placeholder",{value:"Select time",...r.PROP_STRING}],["readonly",r.PROP_BOOLEAN],["required",r.PROP_BOOLEAN],["shortcutkey",r.PROP_STRING],["show",{value:!0,...r.PROP_BOOLEAN}],["showdropdownon",{value:"default",...r.PROP_STRING}],["showcustompicker",{value:!1,...r.PROP_BOOLEAN}],["secondsstep",{value:1,...r.PROP_NUMBER}],["tabindex",{value:0,...r.PROP_NUMBER}],["timepattern",r.PROP_STRING],["timestamp",r.PROP_STRING],["showampmbuttons",{value:!1,...r.PROP_BOOLEAN}]]),P=y.default||window.moment,C="CURRENT_TIME",T={widgetType:"wm-time",hostClass:"input-group app-timeinput"};class O extends l.BaseDateTimeComponent{static{this.initializeProps=(r.register("wm-time",w),void r.registerFormWidget(o.FormWidgetType.TIME,new Map(w)))}get timestamp(){return this.bsTimeValue?this.bsTimeValue.valueOf():void 0}get datavalue(){return this.isCurrentTime&&!this.bsTimeValue?C:o.getFormattedDate(this.datePipe,this.bsTimeValue,this.outputformat,this.timeZone,null,null,this)||""}set datavalue(e){e?e===C?(this.isCurrentTime=!0,this.setTimeInterval()):(this.clearTimeInterval(),this.bsTimeValue=o.getNativeDateObject(e,{pattern:this.loadNativeDateInput?this.outputformat:void 0,isNativePicker:this.loadNativeDateInput}),this.isCurrentTime=!1,this.mintimeMaxtimeValidation()):(this.bsTimeValue=void 0,this.clearTimeInterval(),this.isCurrentTime=!1),this.invokeOnChange(this.datavalue),o.$appDigest()}get displayValue(){const e=o.getFormattedDate(this.datePipe,this.bsTimeValue,this.timepattern,this.timeZone,null,null,this)||"";return this.safeReplaceMeridians(e)}get nativeDisplayValue(){return o.getFormattedDate(this.datePipe,this.bsTimeValue,"HH:mm:ss",this.timeZone,null,null,this)||""}constructor(e,t,i,n,a){super(e,T,a),this.ngZone=t,this.appDefaults=i,this.status={isopen:!1},r.styler(this.nativeElement,this),this.registerDestroyListener(()=>this.clearTimeInterval()),this.timepattern=this.appDefaults.timeFormat||o.getDisplayDateTimeFormat(o.FormWidgetType.TIME),this.updateFormat("timepattern"),this.app=n}onPropertyChange(e,t,i){const n=this.formControl?.pristine;"tabindex"!==e&&("timepattern"===e&&this.updateFormat("timepattern"),"mintime"===e?(this.minTime=o.getNativeDateObject(t,{pattern:this.loadNativeDateInput?this.outputformat:void 0,isNativePicker:this.loadNativeDateInput}),this.mintimeMaxtimeValidation()):"maxtime"===e?(this.maxTime=o.getNativeDateObject(t,{pattern:this.loadNativeDateInput?this.outputformat:void 0,isNativePicker:this.loadNativeDateInput}),this.mintimeMaxtimeValidation()):super.onPropertyChange(e,t,i),"mintime"!==e&&"maxtime"!==e||!n||this.formControl?.control?.markAsPristine())}setValidateType(e,t,i){this.timeNotInRange&&(i<e?this.validateType="mintime":i>t&&(this.validateType="maxtime"))}mintimeMaxtimeValidation(){this.timeNotInRange=this.minTime&&this.maxTime&&(this.bsTimeValue<this.minTime||this.bsTimeValue>this.maxTime),this.setValidateType(this.minTime,this.maxTime,this.bsTimeValue),this.invokeOnChange(this.datavalue,void 0,!1)}toggleDropdown(e,t=!1){this.loadNativeDateInput?t||this.onDateTimeInputFocus():("click"===e.type&&this.invokeEventCallback("click",{$event:e}),e.target&&$(e.target).is("input")&&!this.isDropDownDisplayEnabledOnInput(this.showdropdownon)||(this.ngZone.run(()=>{this.status.isopen=!this.status.isopen}),this.addBodyClickListener(this.status.isopen)))}preventTpClose(e){e.stopImmediatePropagation();const t=$(this.nativeElement).closest(".app-composite-widget.caption-floating");t.length>0&&this.app.notify("captionPositionAnimate",{displayVal:this.displayValue,nativeEl:t})}addBodyClickListener(e){if(!e)return;const t=document.querySelector("body");setTimeout(()=>{const e=$(t).find(">bs-dropdown-container .dropdown-menu").get(0);this.deregisterEventListener=o.addEventListenerOnElement(t,e,this.nativeElement,"click",this.isDropDownDisplayEnabledOnInput(this.showdropdownon),()=>{this.status.isopen=!1},0,!0)},350)}onDisplayKeydown(e){this.isDropDownDisplayEnabledOnInput(this.showdropdownon)?(e.stopPropagation(),"Enter"===e.key||"ArrowDown"===e.key?(e.preventDefault(),this.toggleDropdown(e)):this.hideTimepickerDropdown()):this.hideTimepickerDropdown()}onDisplayTimeChange(e){const t=o.getNativeDateObject(e.target.value?.replace(this.am,this.meridians[0])?.replace(this.pm,this.meridians[1]),{meridians:this.meridians,pattern:this.loadNativeDateInput?this.outputformat:void 0,isNativePicker:this.loadNativeDateInput});this.formatValidation(t,e.target.value)&&(this.invalidDateTimeFormat=!1,this.onTimeChange(t))}onInputBlur(e){$(e.relatedTarget).hasClass("bs-timepicker-field")||(this.invokeOnTouched(),this.invokeEventCallback("blur",{$event:e}))}onTimeChange(e,t){let i,n,a;if(t&&(e=o.getNativeDateObject(e.target.value,{pattern:this.loadNativeDateInput?this.outputformat:void 0,isNativePicker:this.loadNativeDateInput})),e?(this.timeNotInRange=this.minTime&&this.maxTime&&(e<this.minTime||e>this.maxTime),this.setValidateType(this.minTime,this.maxTime,e),this.timeNotInRange||(this.bsTimeValue=e)):this.bsTimePicker&&this.bsTimePicker.min&&this.bsTimePicker.max&&(a=P(new Date(this.bsTimePicker.min)).format("A"),P(new Date(this.bsTimePicker.max)).format("A"),i=this.bsTimePicker.hours+":"+(this.bsTimePicker.minutes||0)+":"+(this.bsTimePicker.seconds||0)+(this.bsTimePicker.showMeridian?" "+a:""),n=o.getNativeDateObject(i,{pattern:this.loadNativeDateInput?this.outputformat:void 0,isNativePicker:this.loadNativeDateInput}),this.bsTimePicker.meridian=a?.replace(this.meridians[0],this.am)?.replace(this.meridians[1],this.pm),this.timeNotInRange=this.bsTimePicker.min>n||this.bsTimePicker.max<n,(this.timeNotInRange||this.invalidDateTimeFormat)&&(this.bsTimeValue=this.getPrevDataValue(),setTimeout(()=>{const e=o.getFormattedDate(this.datePipe,i,this.timepattern,this.timeZone,null,null,this)||"";$(this.nativeElement).find(".display-input").val(this.safeReplaceMeridians(e))})),this.setValidateType(this.bsTimePicker.min,this.bsTimePicker.max,n),this.timeNotInRange||(this.bsTimeValue=n)),!this.timeNotInRange&&this.datavalue===this.getPrevDataValue()){const e=o.getFormattedDate(this.datePipe,this.datavalue,this.timepattern,this.timeZone,null,null,this)||"";$(this.nativeElement).find(".display-input").val(this.safeReplaceMeridians(e))}this.invokeOnTouched(),this.invokeOnChange(this.datavalue,{},!0)}setTimeInterval(){this.timeinterval||(this.timeinterval=setInterval(()=>{const e=this.timeZone?o.getMomentLocaleObject(this.timeZone):new Date;e.setSeconds(e.getSeconds()+1),this.datavalue=C,this.onTimeChange(e)},1e3))}clearTimeInterval(){this.timeinterval&&(clearInterval(this.timeinterval),this.timeinterval=null)}setIsTimeOpen(e){this.status.isopen=e}handleEvent(e,t,i,n){c.includes(["blur","focus","change","click"],t)||super.handleEvent(e,t,i,n)}hideTimepickerDropdown(){this.invokeOnTouched(),this.status.isopen=!1,this.deregisterEventListener&&this.deregisterEventListener(),this.removeKeyupListener();const e=$(this.nativeElement).closest(".app-composite-widget.caption-floating");e.length>0&&this.app.notify("captionPositionAnimate",{displayVal:this.displayValue,nativeEl:e}),this.blurDateInput(!0)}isValid(e){if(!e){const e=$(this.nativeElement).find("input").val()?.replace(this.am,this.meridians[0])?.replace(this.pm,this.meridians[1]),t=o.getNativeDateObject(e,{meridians:this.meridians,pattern:this.loadNativeDateInput?this.outputformat:void 0,isNativePicker:this.loadNativeDateInput});if(!this.formatValidation(t,e))return}}onShown(){const e=document.querySelectorAll("timepicker");c.forEach(e,e=>{o.addClass(e.parentElement,"app-datetime",!0)}),this.bsDropdown&&(this.timeNotInRange||this.invalidDateTimeFormat)&&(this.bsTimeValue=null),this.focusTimePickerPopover(this),this.bindTimePickerKeyboardEvents(),o.adjustContainerPosition($("bs-dropdown-container"),this.nativeElement,this.bsDropdown._dropdown,$("bs-dropdown-container .dropdown-menu"))}assignModel(){this.displayInputElem||(this.displayInputElem=this.getMobileInput()),this.displayInputElem.value=c.get(this,"nativeDisplayValue")}static{this.\u0275fac=g.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:g,type:O,deps:[{token:g.Injector},{token:g.NgZone},{token:f.AppDefaults},{token:f.App},{token:"EXPLICIT_CONTEXT",optional:!0}],target:g.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=g.\u0275\u0275ngDeclareComponent({minVersion:"17.0.0",version:"20.3.19",type:O,isStandalone:!0,selector:"[wmTime]",providers:[r.provideAs(O,t.NG_VALUE_ACCESSOR,!0),r.provideAs(O,t.NG_VALIDATORS,!0),r.provideAsWidgetRef(O),{provide:s.TimepickerConfig,deps:[o.AbstractI18nService],useFactory:l.getTimepickerConfig}],usesInheritance:!0,ngImport:g,template:'<div dropdown [isOpen]="status.isopen" (onShown)="onShown()" (onHidden)="hideTimepickerDropdown()" [container]="\'body\'" style="display: inherit">\n <input [attr.aria-label]="arialabel" class="form-control app-textbox display-input"\n focus-target\n [tabindex]="tabindex"\n [name]="name"\n type="text"\n role="timer"\n [value]="displayValue"\n [disabled]="disabled || readonly || isCurrentTime"\n [autofocus]="autofocus"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n [attr.aria-atomic]="isCurrentTime ? \'true\' : \'false\'"\n [required]="required"\n [readOnly]="isReadOnly"\n (click)="toggleDropdown($event, true)"\n (focus)="onDateTimeInputFocus(); invokeOnFocus($event);"\n (blur)="onInputBlur($event)"\n (change)="onDisplayTimeChange($event)"\n (keydown)="_triggeredByUser = true; onDisplayKeydown($event)">\n <span class="input-group-btn dropdown-toggle">\n <button type="button" class="btn btn-default btn-date" [tabindex]="tabindex" [disabled]="disabled || readonly || isCurrentTime" aria-label="Select time" aria-haspopup="true" aria-expanded="false" (click)="toggleDropdown($event, false)"><i aria-hidden="true" class="app-icon wm-sl-l sl-time"></i></button>\n </span>\n <div *dropdownMenu class="dropdown-menu" (click)="preventTpClose($event)">\n <timepicker class="model-holder"\n [showMeridian]="ismeridian"\n [readonlyInput]="isDisabled"\n [(ngModel)]="bsTimeValue"\n [ngModelOptions]="{standalone: true}"\n [disabled]="disabled || readonly || isCurrentTime"\n [min]="minTime"\n [max]="maxTime"\n [hourStep]="hourstep"\n [minuteStep]="minutestep"\n [secondsStep]="secondsstep"\n [mousewheel]="true"\n [arrowkeys]="true"\n (isValid)="isValid($event)"\n [showSeconds]="showseconds" (ngModelChange)="onTimeChange($event)"\n [ngClass]="{ \'showbuttons\': showampmbuttons }"></timepicker>\n @if (ismeridian && showampmbuttons) {\n <div class="ampm-toggle text-center">\n <button class="meridian-btn mb-1" [ngClass]="{ \'active btn-secondary\': getPeriod() === \'AM\' }" (click)="setPeriod(\'AM\')">{{appLocale.LABEL_AM ||"AM"}}</button><br>\n <button class="meridian-btn" [ngClass]="{ \'active btn-secondary\': getPeriod() === \'PM\' }" (click)="setPeriod(\'PM\')">{{appLocale.LABEL_PM ||"PM"}}</button>\n </div>\n }\n </div>\n</div>\n@if (loadNativeDateInput) {\n <wm-datetimepicker\n dateTimePicker\n mode="TIME"\n [minTime]="minTime"\n [maxTime]="maxTime"\n [placement]="modal"\n [displayFormat]="timepattern"\n [value]="bsTimeValue"\n (change)="onTimeChange($event)">\n </wm-datetimepicker>\n <div class="mobile-input mobile-datepicker-container"\n tabindex="1000000"\n (click)="!(disabled || readonly) && showDatePickerModal(bsTimeValue)"\n [attr.aria-label]="displayValue ? \'Change time \' + displayValue : arialabel || \'Select time\'"\n (focus)="onDateTimeInputFocus(true); invokeOnFocus($event); assignModel()"\n (blur)="onDateTimeInputBlur(); invokeOnTouched($event)"\n role="button">\n </div>\n}\n',dependencies:[{kind:"ngmodule",type:t.FormsModule},{kind:"directive",type:h.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:h.NgModel,selector:"[ngModel]:not([formControlName]):not([formControl])",inputs:["name","disabled","ngModel","ngModelOptions"],outputs:["ngModelChange"],exportAs:["ngModel"]},{kind:"component",type:i.DateTimePickerComponent,selector:"wm-datetimepicker",inputs:["mode","placement","config","minTime","maxTime","_displayFormat","excludedDatesToDisable","value","excludedDaysToDisable","displayFormat"],outputs:["change"]},{kind:"ngmodule",type:d.BsDropdownModule},{kind:"directive",type:b.BsDropdownMenuDirective,selector:"[bsDropdownMenu],[dropdownMenu]",exportAs:["bs-dropdown-menu"]},{kind:"directive",type:b.BsDropdownDirective,selector:"[bsDropdown], [dropdown]",inputs:["placement","triggers","container","dropup","autoClose","isAnimated","insideClick","isDisabled","isOpen"],outputs:["isOpenChange","onShown","onHidden"],exportAs:["bs-dropdown"]},{kind:"ngmodule",type:s.TimepickerModule},{kind:"component",type:v.TimepickerComponent,selector:"timepicker",inputs:["hourStep","minuteStep","secondsStep","readonlyInput","disabled","mousewheel","arrowkeys","showSpinners","showMeridian","showMinutes","showSeconds","meridians","min","max","hoursPlaceholder","minutesPlaceholder","secondsPlaceholder"],outputs:["isValid","meridianChange"]},{kind:"ngmodule",type:n.CommonModule},{kind:"directive",type:u.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]}]})}}g.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:g,type:O,decorators:[{type:a.Component,args:[{standalone:!0,imports:[t.FormsModule,i.DateTimePickerComponent,d.BsDropdownModule,s.TimepickerModule,n.CommonModule],selector:"[wmTime]",providers:[r.provideAs(O,t.NG_VALUE_ACCESSOR,!0),r.provideAs(O,t.NG_VALIDATORS,!0),r.provideAsWidgetRef(O),{provide:s.TimepickerConfig,deps:[o.AbstractI18nService],useFactory:l.getTimepickerConfig}],template:'<div dropdown [isOpen]="status.isopen" (onShown)="onShown()" (onHidden)="hideTimepickerDropdown()" [container]="\'body\'" style="display: inherit">\n <input [attr.aria-label]="arialabel" class="form-control app-textbox display-input"\n focus-target\n [tabindex]="tabindex"\n [name]="name"\n type="text"\n role="timer"\n [value]="displayValue"\n [disabled]="disabled || readonly || isCurrentTime"\n [autofocus]="autofocus"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n [attr.aria-atomic]="isCurrentTime ? \'true\' : \'false\'"\n [required]="required"\n [readOnly]="isReadOnly"\n (click)="toggleDropdown($event, true)"\n (focus)="onDateTimeInputFocus(); invokeOnFocus($event);"\n (blur)="onInputBlur($event)"\n (change)="onDisplayTimeChange($event)"\n (keydown)="_triggeredByUser = true; onDisplayKeydown($event)">\n <span class="input-group-btn dropdown-toggle">\n <button type="button" class="btn btn-default btn-date" [tabindex]="tabindex" [disabled]="disabled || readonly || isCurrentTime" aria-label="Select time" aria-haspopup="true" aria-expanded="false" (click)="toggleDropdown($event, false)"><i aria-hidden="true" class="app-icon wm-sl-l sl-time"></i></button>\n </span>\n <div *dropdownMenu class="dropdown-menu" (click)="preventTpClose($event)">\n <timepicker class="model-holder"\n [showMeridian]="ismeridian"\n [readonlyInput]="isDisabled"\n [(ngModel)]="bsTimeValue"\n [ngModelOptions]="{standalone: true}"\n [disabled]="disabled || readonly || isCurrentTime"\n [min]="minTime"\n [max]="maxTime"\n [hourStep]="hourstep"\n [minuteStep]="minutestep"\n [secondsStep]="secondsstep"\n [mousewheel]="true"\n [arrowkeys]="true"\n (isValid)="isValid($event)"\n [showSeconds]="showseconds" (ngModelChange)="onTimeChange($event)"\n [ngClass]="{ \'showbuttons\': showampmbuttons }"></timepicker>\n @if (ismeridian && showampmbuttons) {\n <div class="ampm-toggle text-center">\n <button class="meridian-btn mb-1" [ngClass]="{ \'active btn-secondary\': getPeriod() === \'AM\' }" (click)="setPeriod(\'AM\')">{{appLocale.LABEL_AM ||"AM"}}</button><br>\n <button class="meridian-btn" [ngClass]="{ \'active btn-secondary\': getPeriod() === \'PM\' }" (click)="setPeriod(\'PM\')">{{appLocale.LABEL_PM ||"PM"}}</button>\n </div>\n }\n </div>\n</div>\n@if (loadNativeDateInput) {\n <wm-datetimepicker\n dateTimePicker\n mode="TIME"\n [minTime]="minTime"\n [maxTime]="maxTime"\n [placement]="modal"\n [displayFormat]="timepattern"\n [value]="bsTimeValue"\n (change)="onTimeChange($event)">\n </wm-datetimepicker>\n <div class="mobile-input mobile-datepicker-container"\n tabindex="1000000"\n (click)="!(disabled || readonly) && showDatePickerModal(bsTimeValue)"\n [attr.aria-label]="displayValue ? \'Change time \' + displayValue : arialabel || \'Select time\'"\n (focus)="onDateTimeInputFocus(true); invokeOnFocus($event); assignModel()"\n (blur)="onDateTimeInputBlur(); invokeOnTouched($event)"\n role="button">\n </div>\n}\n'}]}],ctorParameters:()=>[{type:g.Injector},{type:g.NgZone},{type:f.AppDefaults},{type:f.App},{type:void 0,decorators:[{type:a.Inject,args:["EXPLICIT_CONTEXT"]},{type:a.Optional}]}]}),e.TimeComponent=O}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common"),require("@angular/core"),require("rxjs"),require("@wm/core"),require("@wm/components/base"),require("lodash-es")):"function"==typeof define&&define.amd?define(["exports","@angular/common","@angular/core","rxjs","@wm/core","@wm/components/base","lodash-es"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.input=e.wm.components.input||{},e.wm.components.input.fileupload={}),e.ng.common,e.ng.core,e.rxjs,e.wm.core,e.wm.components.base,e._)}(this,function(e,t,i,n,a,s,o){"use strict";function r(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var l=r(t),c=r(i),d=r(a);const p={widgetType:"wm-fileupload",hostClass:"app-fileupload"};class m extends s.StylableComponent{static{this.initializeProps=(s.register("wm-fileupload",new Map([["caption",s.PROP_STRING],["name",s.PROP_STRING],["hint",s.PROP_STRING],["arialabel",s.PROP_STRING],["tabindex",s.PROP_NUMBER],["multiple",s.PROP_BOOLEAN],["fileuploadmessage",s.PROP_STRING],["show",{value:!0,...s.PROP_BOOLEAN}],["disabled",s.PROP_BOOLEAN],["contenttype",s.PROP_STRING],["maxfilesize",s.PROP_NUMBER],["iconclass",{value:"wi wi-file-upload",...s.PROP_STRING}],["cleariconclass",{value:"",...s.PROP_STRING}],["cleariconhint",{value:"Clear",...s.PROP_STRING}],["class",s.PROP_STRING],["uploadpath",{...s.PROP_STRING}],["datasource",s.PROP_STRING],["selectedFiles",s.PROP_STRING],["destination",s.PROP_STRING],["filelistheight",s.PROP_NUMBER],["width",{value:"auto",...s.PROP_STRING}],["showprogressbar",s.PROP_BOOLEAN],["showprogressbarpercentage",s.PROP_BOOLEAN],["deleteiconhint",{value:"Delete",...s.PROP_STRING}]])),void s.registerFormWidget(a.FormWidgetType.UPLOAD,new Map([["disabled",s.PROP_BOOLEAN],["extensions",s.PROP_STRING],["filetype",s.PROP_STRING],["multiple",s.PROP_BOOLEAN],["readonly",s.PROP_BOOLEAN],["required",s.PROP_BOOLEAN]])))}isValidFile(e,t,i,n){let s,r;return!t||(r=o.toLower(t).split(","),(o.includes(r,"image/*")||o.includes(r,"image")&&n)&&(s=a.isImageFile(e),s)||(o.includes(r,"audio/*")||o.includes(r,"audio")&&n)&&(s=a.isAudioFile(e),s)||(o.includes(r,"video/*")||o.includes(r,"video")&&n)&&(s=a.isVideoFile(e),s)||o.includes(r,"."+o.toLower(i))&&(s=!0),s)}getValidFiles(e){const t=[],i=[],n=parseFloat(this.maxfilesize)*this.FILESIZE_MB||this.FILESIZE_MB,a=(this.maxfilesize||"1")+"MB";return this.chooseFilter===this.DEVICE_CONTENTTYPES.FILES&&(this.chooseFilter=""),o.forEach(e,e=>{if(!this.isValidFile(e.name,this.chooseFilter,this.getFileExtension(e.name),this._isMobileType)){const t=`${this.appLocale.LABEL_FILE_EXTENTION_VALIDATION_MESSAGE} ${this.chooseFilter}`;return void this.handleErrorFiles("INVALID_FILE_EXTENSION",t,e,i)}if(e.size>n){const t=`${this.appLocale.LABEL_FILE_EXCEED_VALIDATION_MESSAGE} ${a}`;return void this.handleErrorFiles("INVALID_FILE_SIZE",t,e,i)}t.push(e)}),{validFiles:t,errorFiles:i}}handleErrorFiles(e,t,i,n){this.hasEventCallback("error")||this.app.notifyApp(t,"Error");const a={key:e,message:t};i.error=a,n.push(i)}getCaption(e,t,i){return o.includes(this.DEFAULT_CAPTIONS,e)?t&&!i?this.DEFAULT_CAPTIONS.MULTIPLE_SELECT:this.DEFAULT_CAPTIONS.SELECT:e}changeServerUploadPath(e){this.selectedUploadTypePath=e}getFileExtension(e){return e&&o.includes(e,".")?e.substring(e.lastIndexOf(".")+1):"file"}onSelectEventCall(e,t){t.forEach(e=>{e.uniqueId=this.idGenerator.nextUid()}),this.selectedFiles=t,this.uploadedFiles=this.multiple?[...this.uploadedFiles,...t]:t,setTimeout(()=>{this.invokeEventCallback("select",{$event:$.extend(e.$files||{},t),selectedFiles:t})})}onFileElemClick(e){this.highlightDropArea=!0,this.$element.find(".file-input")[0].value=null,e.stopPropagation(),window.addEventListener("focus",this.boundDisableDropZone)}disableDropZone(){this.highlightDropArea=!1,window.removeEventListener("focus",this.boundDisableDropZone)}clear(e){this.selectedFiles=e?this.clearFile(this.selectedFiles,e):[],this.uploadedFiles=e?this.clearFile(this.uploadedFiles,e):[]}clearFile(e,t){return e.filter(e=>e?._response?.fileName!==t?._response?.fileName||e?.name!==t?.name||e!==t)}setClearIconClass(e){this.cleariconclass=e}setClearIconHint(e){this.cleariconhint=e}onFileSelect(e,t){let i;const a=this.getValidFiles(t);t=a.validFiles,"change"===e.type&&(this.selectedFolders=[]),o.isEmpty(a.errorFiles)||this.invokeEventCallback("error",{$event:e,files:a.errorFiles}),t.length&&(i=this.invokeEventCallback("beforeselect",{$event:$.extend(e.$files||{},t),files:t}),this.datasource?this.uploadProgressSubscription||(this.progressObservable=new n.Subject,this.datasource._progressObservable=this.progressObservable,this.uploadProgressSubscription=this.datasource._progressObservable.asObservable().subscribe(t=>{o.forEach(this.uploadedFiles,i=>{i.name===t.fileName&&i.uniqueId===t.uniqueId&&(i.progress=t.progress,100===i.progress?i.status="success":(i.status=t.status,t.errMsg&&(i.errMsg=t.errMsg,this.invokeEventCallback("error",{$event:e,files:i}))))})})):this.selectedFiles=t,!1!==i&&this.onSelectEventCall(e,t))}onFileDelete(e,t){if(!t)return;!1!==this.invokeEventCallback("beforedelete",{$event:t})&&this.dialogService.showAppConfirmDialog({title:"Delete file",message:"Are you sure you want to delete this file?",oktext:"Ok",canceltext:"Cancel",onOk:()=>{this.deletedatasource&&(this.deletedatasource.setInput("file",t._response.fileName||t.name),this.deleteProgressSubscription||(this.deleteFileObservable=new n.Subject,this.deletedatasource._deleteFileObservable=this.deleteFileObservable,this.deletedatasource._deleteFileObservable.asObservable().subscribe(e=>{"success"===e.status&&(this.selectedFiles=this.selectedFiles.filter(e=>t!==e)||[],this.uploadedFiles=this.uploadedFiles.filter(e=>t!==e)||[])}))),this.invokeEventCallback("delete",{$event:t}),this.dialogService.closeAppConfirmDialog()},onCancel:()=>{this.dialogService.closeAppConfirmDialog()},onOpen:()=>{$(".cancel-action").focus()}})}dragOverHandler(e){e.preventDefault(),e.stopPropagation()}onFileDrop(e){e.preventDefault();let t=[];this.selectedFolders=[];const i=e.dataTransfer.items;if(i.length>0){for(var n=0;n<i.length;n++)i[n].webkitGetAsEntry().isFile?t.push(i[n].getAsFile()):i[n].webkitGetAsEntry().isDirectory&&this.selectedFolders.push(i[n].getAsFile());this.onFileSelect(e,t)}}dragOverCb(e){e.preventDefault(),$(this.nativeElement).find("#dropzone").addClass("highlight-drop-box")}dropCb(){$(this.nativeElement).find("#dropzone").removeClass("highlight-drop-box")}triggerFileSelect(){this.$element.find(".file-input").trigger("click")}abortFileUpload(e){this.datasource.execute(a.DataSource.Operation.CANCEL,e)}isMimeType(e){return this.defaultAllowedExtensions.includes("image/*")&&a.isImageFile(e)||this.defaultAllowedExtensions.includes("audio/*")&&a.isAudioFile(e)||this.defaultAllowedExtensions.includes("video/*")&&a.isVideoFile(e)}onPropertyChange(e,t,i){switch(e){case"uploadpath":this.changeServerUploadPath(t);break;case"contenttype":this.defaultAllowedExtensions.includes("*/*")?this.chooseFilter=t.split(" ").join(","):(this.chooseFilter=t.split(" ").filter(e=>this.defaultAllowedExtensions.includes(e)||this.isMimeType(e)).join(","),o.isEmpty(this.chooseFilter)&&(this.chooseFilter=this.defaultAllowedExtensions));break;case"multiple":this.formName=this.name+(this.multiple?"-multiple-fileupload":"-single-fileupload"),this.caption=this.getCaption(this.caption,this.multiple,this._isMobileType);break;case"fileuploadmessage":this.fileUploadMessage=t}super.onPropertyChange(e,t,i)}constructor(e,t,i,n,s){super(e,p,s),this.app=t,this.onSelectEvt=i,this.dialogService=n,this.selectedFiles=[],this.uploadedFiles=[],this.selectedFolders=[],this.fileTransfers={},this.caption="Upload",this.formName="",this.DEFAULT_CAPTIONS={MULTIPLE_SELECT:"Drop your files here.",SELECT:"Select"},this.DEVICE_CONTENTTYPES={IMAGE:"image",VIDEO:"video",AUDIO:"audio",FILES:"files"},this.FILESIZE_MB=1048576,this.CONSTANT_FILE_SERVICE="FileService",this.uploadData={file:void 0,uploadPath:void 0},this.allowedFileUploadExtensions=a.getWmProjectProperties().allowedFileUploadExtensions,this.defaultAllowedExtensions=this.allowedFileUploadExtensions.split(",").map(e=>e.trim()).map(e=>e.endsWith("/*")?e:`.${e}`),this.chooseFilter=this.defaultAllowedExtensions.includes("*/*")?"":this.defaultAllowedExtensions,this.fileUploadMessage="Drop your files here or click here to browse",this.idGenerator=new a.IDGenerator("file-"),this.uploadUrl="services"}ngOnInit(){super.ngOnInit(),this.boundDragOverCb=this.dragOverCb.bind(this),this.boundDropCb=this.dropCb.bind(this),this.boundDisableDropZone=this.disableDropZone.bind(this),document.addEventListener("dragover",this.boundDragOverCb),document.addEventListener("drop",this.boundDropCb),document.addEventListener("mouseleave",this.boundDropCb)}ngAfterViewInit(){s.styler(this.nativeElement.querySelector(".app-button, .drop-box"),this)}ngOnDestroy(){this.boundDragOverCb&&(document.removeEventListener("dragover",this.boundDragOverCb),this.boundDragOverCb=null),this.boundDropCb&&(document.removeEventListener("drop",this.boundDropCb),document.removeEventListener("mouseleave",this.boundDropCb),this.boundDropCb=null),this.boundDisableDropZone&&(window.removeEventListener("focus",this.boundDisableDropZone),this.boundDisableDropZone=null),super.ngOnDestroy();[this.uploadProgressSubscription,this.deleteProgressSubscription].forEach(e=>{e&&e.unsubscribe()})}static{this.\u0275fac=c.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:c,type:m,deps:[{token:c.Injector},{token:d.App},{token:"select.event",attribute:!0},{token:d.AbstractDialogService},{token:"EXPLICIT_CONTEXT",optional:!0}],target:c.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=c.\u0275\u0275ngDeclareComponent({minVersion:"17.0.0",version:"20.3.19",type:m,isStandalone:!0,selector:"[wmFileUpload]",providers:[s.provideAsWidgetRef(m)],usesInheritance:!0,ngImport:c,template:'<div class="app-fileupload" init-widget>\n \x3c!-- drag and drop files UI in web --\x3e\n @if (!_isMobileType && multiple) {\n <div class="app-multi-file-upload">\n <div id="dropzone" class="drop-box" (click)="triggerFileSelect()" [ngClass]="{\'highlight-drop-box\' : highlightDropArea}" (dragover)="dragOverHandler($event);" (drop)="onFileDrop($event);">\n <i class="{{iconclass}}"></i>\n <div class="message">\n <label [innerHtml]="caption" class="upload-label"></label>\n <form class="form-horizontal" name="{{formName}}">\n @if (multiple) {\n <input class="file-input" [attr.aria-label]="hint || \'File selection field\'" type="file" name="files" [disabled]="disabled" [accept]="chooseFilter" (click)="onFileElemClick($event)" (change)="onFileSelect($event, $event.target.files)" multiple >\n }\n <a class="app-anchor upload-label" href="javascript:void(0);">{{ fileUploadMessage }}</a>\n </form>\n @if (chooseFilter) {\n <label [innerHtml]="chooseFilter + \' only \'" class="upload-extensions"></label>\n }\n @if (chooseFilter && maxfilesize) {\n <span class="upload-extensions"> . </span>\n }\n @if (maxfilesize) {\n <label [innerHtml]="maxfilesize + \'MB max\'" class="upload-extensions"></label>\n }\n </div>\n </div>\n </div>\n }\n \x3c!-- single file upload in web and single , multiple file upload UI in mobile runmode --\x3e\n @if ((!multiple || _isMobileType)) {\n <div class="app-single-file-upload">\n <div class="app-button-wrapper">\n <form class="form-horizontal" name="{{formName}}">\n \x3c!-- support for file upload in Mobileapp in its runmode (Web) --\x3e\n @if (multiple) {\n <input (change)="onFileSelect($event, $event.target.files)" (click)="onFileElemClick($event)"\n [accept]="chooseFilter" [attr.aria-label]="arialabel || \'File selection field\'" [disabled]="disabled" class="file-input"\n multiple name="files" type="file">\n }\n @if (!multiple) {\n <input (change)="onFileSelect($event, $event.target.files)" (click)="onFileElemClick($event)"\n [accept]="chooseFilter" [attr.aria-label]="arialabel || \'File selection field\'" [disabled]="disabled" class="file-input"\n name="files" type="file">\n }\n <button id="dropzone" focus-target class="app-button btn btn-default" [ngClass]="{\'highlight-drop-box\' : highlightDropArea}">\n <i class="{{iconclass}}" aria-hidden="true"></i>\n <span class="caption" [innerHTML]="caption"></span>\n </button>\n </form>\n </div>\n <div class="app-files-upload-status single"></div>\n </div>\n }\n \x3c!-- list of selectedfiles UI --\x3e\n @if (uploadedFiles.length > 0) {\n <ul class="list-group file-upload" [ngStyle]="{height: filelistheight, overflow: overflow}"\n tabindex="0">\n @for (ft of uploadedFiles; track ft) {\n @if (ft.status !== \'abort\') {\n <li class="list-group-item file-upload-status" tabindex="0">\n <div class="media upload-file-list">\n <div class="media-left media-middle file-icon {{getFileExtension(ft.name) | fileIconClass}}" title="{{getFileExtension(ft.name)}}"></div>\n <div class="media-body media-middle file-details">\n <p class="uploaddetails col-md-3">\n <span class="upload-title">{{ ft.storageName || ft.name }}</span>\n @if (ft.status === \'success\' && (!datasource || (datasource && ft._response?.success))) {\n <span\n class="status-icon {{ft.status | stateClass }}"></span>\n }\n <br/>\n @if (ft.fileLength !== 0) {\n <span class="filesize">{{ft.size | filesize:0}}</span>\n }\n @if (ft.status === \'error\') {\n <span\n class="status-icon {{ft.status | stateClass }}"\n title="{{ft.errMsg || appLocale.MESSAGE_FILE_UPLOAD_FAILED}}"></span>\n }\n @if (ft.status === \'error\') {\n <span class="error-message">Upload Failed</span>\n }\n </p>\n @if (ft.status === \'onProgress\' || showprogressbar) {\n <div\n class="progress col-md-7 upload-progress">\n <div [ngClass]="ft.status === \'error\' ? \'progress-bar-danger\' : \'progress-bar-info\'"\n [ngStyle]="{width: (ft.progress +\'%\')}"\n class="progress-bar progress-bar-striped"></div>\n </div>\n }\n @if ((ft.status === \'onProgress\' || showprogressbar && showprogressbarpercentage) && ft.progress ) {\n <div\n class="col-md-1 upload-progress-percentage">{{ ft.progress + \'%\' }}\n </div>\n }\n </div>\n @if (ft.status === \'onProgress\' || ft.status === \'queued\') {\n <div class="media-right media-middle">\n <a href="javascript:void(0)" class="btn btn-transparent file-upload-stop" type="button"\n (click)="abortFileUpload(ft)">\n <i class="wi wi-close"></i>\n </a>\n </div>\n }\n <div class="media-right media-middle">\n @if (cleariconclass !== \'\' && ft.status !== \'onProgress\') {\n <a href="javascript:void(0)" (click)="clear(ft)"\n class="btn btn-transparent btn-default status-icon" title="{{cleariconhint}}" type="button">\n <i class="{{cleariconclass}}"></i>\n </a>\n }\n </div>\n @if (ft.status === \'success\' && (!datasource || (datasource && ft._response?.success))) {\n <div class="media-right media-middle">\n <a href="javascript:void(0)" (click)="onFileDelete($event, ft)"\n class="btn btn-transparent btn-default status-icon" title="{{deleteiconhint}}" type="button">\n <i class="wi wi-delete"></i>\n </a>\n </div>\n }\n </div>\n </li>\n }\n }\n </ul>\n }\n \x3c!-- list of selectedfolders UI to show the error in title --\x3e\n @if (selectedFolders.length > 0) {\n <ul class="list-group file-upload" [ngStyle]="{height: filelistheight, overflow: overflow}" title="{{appLocale.MESSAGE_FOLDER_UPLOADS_NOT_ALLOWED}}" >\n @for (ft of selectedFolders; track ft) {\n <li class="list-group-item file-upload-status">\n <div class="media upload-file-list">\n <div class="media-left media-middle file-icon fa fa-folder-o"></div>\n <div class="media-body media-middle file-details">\n <p class="uploaddetails">\n <label class="upload-title">{{ft.name}}</label><br/>\n </p>\n </div>\n <div class="media-right media-middle" >\n <span class="status-icon wi wi-cancel text-danger"></span>\n </div>\n </div>\n </li>\n }\n </ul>\n }\n</div>\n',dependencies:[{kind:"ngmodule",type:t.CommonModule},{kind:"directive",type:l.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"directive",type:l.NgStyle,selector:"[ngStyle]",inputs:["ngStyle"]},{kind:"pipe",type:s.FileIconClassPipe,name:"fileIconClass"},{kind:"pipe",type:s.StateClassPipe,name:"stateClass"},{kind:"pipe",type:s.FileSizePipe,name:"filesize"}]})}}c.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:c,type:m,decorators:[{type:i.Component,args:[{standalone:!0,imports:[t.CommonModule,s.FileIconClassPipe,s.StateClassPipe,s.FileSizePipe],selector:"[wmFileUpload]",providers:[s.provideAsWidgetRef(m)],template:'<div class="app-fileupload" init-widget>\n \x3c!-- drag and drop files UI in web --\x3e\n @if (!_isMobileType && multiple) {\n <div class="app-multi-file-upload">\n <div id="dropzone" class="drop-box" (click)="triggerFileSelect()" [ngClass]="{\'highlight-drop-box\' : highlightDropArea}" (dragover)="dragOverHandler($event);" (drop)="onFileDrop($event);">\n <i class="{{iconclass}}"></i>\n <div class="message">\n <label [innerHtml]="caption" class="upload-label"></label>\n <form class="form-horizontal" name="{{formName}}">\n @if (multiple) {\n <input class="file-input" [attr.aria-label]="hint || \'File selection field\'" type="file" name="files" [disabled]="disabled" [accept]="chooseFilter" (click)="onFileElemClick($event)" (change)="onFileSelect($event, $event.target.files)" multiple >\n }\n <a class="app-anchor upload-label" href="javascript:void(0);">{{ fileUploadMessage }}</a>\n </form>\n @if (chooseFilter) {\n <label [innerHtml]="chooseFilter + \' only \'" class="upload-extensions"></label>\n }\n @if (chooseFilter && maxfilesize) {\n <span class="upload-extensions"> . </span>\n }\n @if (maxfilesize) {\n <label [innerHtml]="maxfilesize + \'MB max\'" class="upload-extensions"></label>\n }\n </div>\n </div>\n </div>\n }\n \x3c!-- single file upload in web and single , multiple file upload UI in mobile runmode --\x3e\n @if ((!multiple || _isMobileType)) {\n <div class="app-single-file-upload">\n <div class="app-button-wrapper">\n <form class="form-horizontal" name="{{formName}}">\n \x3c!-- support for file upload in Mobileapp in its runmode (Web) --\x3e\n @if (multiple) {\n <input (change)="onFileSelect($event, $event.target.files)" (click)="onFileElemClick($event)"\n [accept]="chooseFilter" [attr.aria-label]="arialabel || \'File selection field\'" [disabled]="disabled" class="file-input"\n multiple name="files" type="file">\n }\n @if (!multiple) {\n <input (change)="onFileSelect($event, $event.target.files)" (click)="onFileElemClick($event)"\n [accept]="chooseFilter" [attr.aria-label]="arialabel || \'File selection field\'" [disabled]="disabled" class="file-input"\n name="files" type="file">\n }\n <button id="dropzone" focus-target class="app-button btn btn-default" [ngClass]="{\'highlight-drop-box\' : highlightDropArea}">\n <i class="{{iconclass}}" aria-hidden="true"></i>\n <span class="caption" [innerHTML]="caption"></span>\n </button>\n </form>\n </div>\n <div class="app-files-upload-status single"></div>\n </div>\n }\n \x3c!-- list of selectedfiles UI --\x3e\n @if (uploadedFiles.length > 0) {\n <ul class="list-group file-upload" [ngStyle]="{height: filelistheight, overflow: overflow}"\n tabindex="0">\n @for (ft of uploadedFiles; track ft) {\n @if (ft.status !== \'abort\') {\n <li class="list-group-item file-upload-status" tabindex="0">\n <div class="media upload-file-list">\n <div class="media-left media-middle file-icon {{getFileExtension(ft.name) | fileIconClass}}" title="{{getFileExtension(ft.name)}}"></div>\n <div class="media-body media-middle file-details">\n <p class="uploaddetails col-md-3">\n <span class="upload-title">{{ ft.storageName || ft.name }}</span>\n @if (ft.status === \'success\' && (!datasource || (datasource && ft._response?.success))) {\n <span\n class="status-icon {{ft.status | stateClass }}"></span>\n }\n <br/>\n @if (ft.fileLength !== 0) {\n <span class="filesize">{{ft.size | filesize:0}}</span>\n }\n @if (ft.status === \'error\') {\n <span\n class="status-icon {{ft.status | stateClass }}"\n title="{{ft.errMsg || appLocale.MESSAGE_FILE_UPLOAD_FAILED}}"></span>\n }\n @if (ft.status === \'error\') {\n <span class="error-message">Upload Failed</span>\n }\n </p>\n @if (ft.status === \'onProgress\' || showprogressbar) {\n <div\n class="progress col-md-7 upload-progress">\n <div [ngClass]="ft.status === \'error\' ? \'progress-bar-danger\' : \'progress-bar-info\'"\n [ngStyle]="{width: (ft.progress +\'%\')}"\n class="progress-bar progress-bar-striped"></div>\n </div>\n }\n @if ((ft.status === \'onProgress\' || showprogressbar && showprogressbarpercentage) && ft.progress ) {\n <div\n class="col-md-1 upload-progress-percentage">{{ ft.progress + \'%\' }}\n </div>\n }\n </div>\n @if (ft.status === \'onProgress\' || ft.status === \'queued\') {\n <div class="media-right media-middle">\n <a href="javascript:void(0)" class="btn btn-transparent file-upload-stop" type="button"\n (click)="abortFileUpload(ft)">\n <i class="wi wi-close"></i>\n </a>\n </div>\n }\n <div class="media-right media-middle">\n @if (cleariconclass !== \'\' && ft.status !== \'onProgress\') {\n <a href="javascript:void(0)" (click)="clear(ft)"\n class="btn btn-transparent btn-default status-icon" title="{{cleariconhint}}" type="button">\n <i class="{{cleariconclass}}"></i>\n </a>\n }\n </div>\n @if (ft.status === \'success\' && (!datasource || (datasource && ft._response?.success))) {\n <div class="media-right media-middle">\n <a href="javascript:void(0)" (click)="onFileDelete($event, ft)"\n class="btn btn-transparent btn-default status-icon" title="{{deleteiconhint}}" type="button">\n <i class="wi wi-delete"></i>\n </a>\n </div>\n }\n </div>\n </li>\n }\n }\n </ul>\n }\n \x3c!-- list of selectedfolders UI to show the error in title --\x3e\n @if (selectedFolders.length > 0) {\n <ul class="list-group file-upload" [ngStyle]="{height: filelistheight, overflow: overflow}" title="{{appLocale.MESSAGE_FOLDER_UPLOADS_NOT_ALLOWED}}" >\n @for (ft of selectedFolders; track ft) {\n <li class="list-group-item file-upload-status">\n <div class="media upload-file-list">\n <div class="media-left media-middle file-icon fa fa-folder-o"></div>\n <div class="media-body media-middle file-details">\n <p class="uploaddetails">\n <label class="upload-title">{{ft.name}}</label><br/>\n </p>\n </div>\n <div class="media-right media-middle" >\n <span class="status-icon wi wi-cancel text-danger"></span>\n </div>\n </div>\n </li>\n }\n </ul>\n }\n</div>\n'}]}],ctorParameters:()=>[{type:c.Injector},{type:d.App},{type:void 0,decorators:[{type:i.Attribute,args:["select.event"]}]},{type:d.AbstractDialogService},{type:void 0,decorators:[{type:i.Inject,args:["EXPLICIT_CONTEXT"]},{type:i.Optional}]}]}),e.FileUploadComponent=m}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common"),require("@angular/forms"),require("@angular/core"),require("@wm/core"),require("@wm/components/base"),require("@wm/components/input/dataset-aware-form"),require("lodash-es")):"function"==typeof define&&define.amd?define(["exports","@angular/common","@angular/forms","@angular/core","@wm/core","@wm/components/base","@wm/components/input/dataset-aware-form","lodash-es"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.input=e.wm.components.input||{},e.wm.components.input.rating={}),e.ng.common,e.ng.forms,e.ng.core,e.wm.core,e.wm.components.base,e.wm.components.input.datasetawareform,e._)}(this,function(e,t,i,n,a,s,o,r){"use strict";function l(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var c=l(t),d=l(i),p=l(n);const m=new Map([["caption",s.PROP_STRING],["class",s.PROP_STRING],["datafield",s.PROP_STRING],["dataset",s.PROP_ANY],["datavaluesource",s.PROP_ANY],["datavalue",s.PROP_STRING],["displayexpression",s.PROP_STRING],["displayfield",s.PROP_STRING],["iconcolor",s.PROP_STRING],["activeiconclass",{value:"wi wi-star",...s.PROP_STRING}],["inactiveiconclass",{value:"wi wi-star-border",...s.PROP_STRING}],["iconsize",s.PROP_STRING],["maxvalue",{value:5,...s.PROP_NUMBER}],["name",s.PROP_STRING],["orderby",s.PROP_STRING],["readonly",s.PROP_BOOLEAN],["show",{value:!0,...s.PROP_BOOLEAN}],["showcaptions",{value:!0,...s.PROP_BOOLEAN}],["tabindex",{value:0,...s.PROP_NUMBER}],["usekeys",s.PROP_BOOLEAN]]),h={widgetType:"wm-rating",hostClass:"app-ratings"};class u extends o.DatasetAwareFormComponent{static{this.initializeProps=(s.register("wm-rating",m),void s.registerFormWidget(a.FormWidgetType.RATING,new Map(m)))}get selectedRatingValue(){return this._selectedRatingValue}set selectedRatingValue(e){this._selectedRatingValue=e,this.calculateRatingsWidth()}constructor(e,t){super(e,h,t),this.isDecimal=!1,this.activeiconclass="",this.inactiveiconclass="",this._id=a.generateGUId(),s.styler(this.nativeElement,this);const i=this.dataset$.subscribe(()=>{this.prepareRatingDataset()});this.registerDestroyListener(()=>i.unsubscribe());const n=this.datavalue$.subscribe(()=>this.onDatavalueChange(this.datavalue));this.registerDestroyListener(()=>n.unsubscribe())}handleEvent(e,t,i,n){"change"!==t&&"blur"!==t&&super.handleEvent(this.ratingEl.nativeElement,t,i,n)}prepareRatingDataset(){this.datasetItems.length||(this.ratingItems=[],this.caption="");let e=[],t=this.datasetItems;const i=parseInt(this.maxvalue||this.datasetItems.length,10),n=(i>10?10:i)||5;t.length&&t.length>n&&(t=r.slice(t,0,n));for(let i=n;i>0;i--)if(t.length){if(!(i>t.length)){t=s.getOrderedDataset(t,"index:desc"),e=e.concat(t);break}e.push({key:i,value:i,index:i,label:i})}else e.push({key:i,value:i,index:i,label:i});this.ratingItems=e,t.length||(this.datasetItems=e),this.onDatavalueChange(this.datavalue)}onRatingClick(e,t){this.modelByKey=t.key,this.selectedRatingValue=t.index,this.showcaptions||(this.caption=t.label),this.invokeOnTouched(),this.invokeOnChange(this.datavalue,e||{},!0)}onDatavalueChange(e){if(r.isEmpty(this.datasetItems))this.selectedRatingValue=0;else{let t=r.find(this.datasetItems,{selected:!0});t||r.isUndefined(e)||(t=r.find(this.datasetItems,function(t){return r.toString(t.index)===e}),t&&(t.selected=!0)),t||(this.modelByKey=void 0,this.caption=""),this.selectedRatingValue=t?t.index:0,t&&(this.caption=t.label)}this.readonly&&(this.selectedRatingValue||isNaN(e)||(this.selectedRatingValue=parseFloat(e)<=this.maxvalue?e:this.maxvalue),this.ratingsWidth=this.calculateRatingsWidth(e)),!this.readonly||isNaN(e)||Number.isInteger(parseFloat(e))||(this._modelByKey=e,this._modelByValue=e,this.isDecimal=!0,this.ratingsWidth=this.calculateRatingsWidth(this.getPrevDataValue()),this.caption=this.selectedRatingValue)}calculateRatingsWidth(e){const t=parseFloat(this.selectedRatingValue),i=parseInt(this.maxvalue||this.datasetItems.length,10)||5;if(void 0===(e=e||this.datavalue)||""===e||null===e||t<=0)return this.caption="","0%";return Math.min(t,i)/i*100+"%"}onPropertyChange(e,t,i){if("readonly"===e)this.isDecimal=!1,t&&(this.ratingsWidth=this.calculateRatingsWidth(),this.onDatavalueChange(this.getPrevDataValue()));else if("maxvalue"===e){this.starsArray=Array(this.maxvalue);let e=this.datavalue;this.prepareRatingDataset(),this.resetDatasetItems(),r.isUndefined(e)||(this.datavalue=e)}else super.onPropertyChange(e,t,i)}onTouchStart(e){this.touchEnabled=!0,this.onTouchStart=a.noop}onMouseleave(){this.caption=this.displayValue}onMouseOver(e,t){this.caption=t.label,!this.touchEnabled&&!e.target.classList.contains("rating-label-hover")&&e.target.classList.add("rating-label-hover")}ngOnDestroy(){this.ratingEl=null,this.ratingItems&&(this.ratingItems=[]),super.ngOnDestroy()}static{this.\u0275fac=p.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:p,type:u,deps:[{token:p.Injector},{token:"EXPLICIT_CONTEXT",optional:!0}],target:p.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=p.\u0275\u0275ngDeclareComponent({minVersion:"17.0.0",version:"20.3.19",type:u,isStandalone:!0,selector:"[wmRating]",providers:[s.provideAs(u,i.NG_VALUE_ACCESSOR,!0),s.provideAsWidgetRef(u)],viewQueries:[{propertyName:"ratingEl",first:!0,predicate:["ratingInput"],descendants:!0,read:n.ElementRef}],usesInheritance:!0,ngImport:p,template:'<div (focus)="onFocus($event)" [(ngModel)]="modelByKey" [ngModelOptions]="{standalone: true}"\n class="ratings-wrapper" ngDefaultControl>\n <div [class.hidden]="readonly && isDecimal" [class.disabled]="readonly" class="rating-style">\n @for (rate of ratingItems; track rate) {\n <label\n [ngClass]="{active : rate.index <= selectedRatingValue}"\n [ngStyle]="{\'font-size\' :iconsize, color: rate.index <= selectedRatingValue && iconcolor}"\n [title]="rate.label || rate.index"\n (touchstart)="onTouchStart($event)"\n (mouseleave)="onMouseleave($event, rate)"\n (mouseover)="onMouseOver($event, rate)"\n [for]="_id + \'-\' + rate.index">\n <i class="app-icon {{rate.index <= selectedRatingValue ? activeiconclass : inactiveiconclass}}" aria-hidden="true"></i>\n <input #ratingInput type="radio" role="radio" [attr.aria-label]="(rate.label || rate.index) + \' out of \' + ratingItems.length + \' ratings\'" [attr.aria-checked]="rate.label === datavalue ? \'true\' : \'false\'"\n [id]="_id + \'-\' + rate.index" (click)="onRatingClick($event, rate)" name="ratings-id" [value]="rate.key || rate.index"/>\n </label>\n }\n </div>\n <div class="ratings-container readonly" [class.hidden]="!isDecimal" [ngStyle]="{ \'font-size\': iconsize }">\n <div class="ratings-base">\n <i class="app-icon {{inactiveiconclass}}" *ngFor="let s of starsArray"></i>\n </div>\n <div class="ratings active" [ngStyle]="{ width: ratingsWidth, color: iconcolor }">\n <i class="app-icon {{activeiconclass}}" *ngFor="let s of starsArray"></i>\n </div>\n </div>\n @if (showcaptions) {\n <label class="caption" [textContent]="caption"></label>\n }\n</div>\n',dependencies:[{kind:"ngmodule",type:t.CommonModule},{kind:"directive",type:c.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"directive",type:c.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:c.NgStyle,selector:"[ngStyle]",inputs:["ngStyle"]},{kind:"directive",type:s.TextContentDirective,selector:"[textContent]",inputs:["textContent"]},{kind:"ngmodule",type:i.FormsModule},{kind:"directive",type:d.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:d.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:d.NgModel,selector:"[ngModel]:not([formControlName]):not([formControl])",inputs:["name","disabled","ngModel","ngModelOptions"],outputs:["ngModelChange"],exportAs:["ngModel"]}]})}}p.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:p,type:u,decorators:[{type:n.Component,args:[{standalone:!0,imports:[t.CommonModule,s.TextContentDirective,i.FormsModule],selector:"[wmRating]",providers:[s.provideAs(u,i.NG_VALUE_ACCESSOR,!0),s.provideAsWidgetRef(u)],template:'<div (focus)="onFocus($event)" [(ngModel)]="modelByKey" [ngModelOptions]="{standalone: true}"\n class="ratings-wrapper" ngDefaultControl>\n <div [class.hidden]="readonly && isDecimal" [class.disabled]="readonly" class="rating-style">\n @for (rate of ratingItems; track rate) {\n <label\n [ngClass]="{active : rate.index <= selectedRatingValue}"\n [ngStyle]="{\'font-size\' :iconsize, color: rate.index <= selectedRatingValue && iconcolor}"\n [title]="rate.label || rate.index"\n (touchstart)="onTouchStart($event)"\n (mouseleave)="onMouseleave($event, rate)"\n (mouseover)="onMouseOver($event, rate)"\n [for]="_id + \'-\' + rate.index">\n <i class="app-icon {{rate.index <= selectedRatingValue ? activeiconclass : inactiveiconclass}}" aria-hidden="true"></i>\n <input #ratingInput type="radio" role="radio" [attr.aria-label]="(rate.label || rate.index) + \' out of \' + ratingItems.length + \' ratings\'" [attr.aria-checked]="rate.label === datavalue ? \'true\' : \'false\'"\n [id]="_id + \'-\' + rate.index" (click)="onRatingClick($event, rate)" name="ratings-id" [value]="rate.key || rate.index"/>\n </label>\n }\n </div>\n <div class="ratings-container readonly" [class.hidden]="!isDecimal" [ngStyle]="{ \'font-size\': iconsize }">\n <div class="ratings-base">\n <i class="app-icon {{inactiveiconclass}}" *ngFor="let s of starsArray"></i>\n </div>\n <div class="ratings active" [ngStyle]="{ width: ratingsWidth, color: iconcolor }">\n <i class="app-icon {{activeiconclass}}" *ngFor="let s of starsArray"></i>\n </div>\n </div>\n @if (showcaptions) {\n <label class="caption" [textContent]="caption"></label>\n }\n</div>\n'}]}],ctorParameters:()=>[{type:p.Injector},{type:void 0,decorators:[{type:n.Inject,args:["EXPLICIT_CONTEXT"]},{type:n.Optional}]}],propDecorators:{ratingEl:[{type:n.ViewChild,args:["ratingInput",{read:n.ElementRef}]}]}}),e.RatingComponent=u}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@wm/components/base"),require("@angular/forms"),require("@angular/core"),require("@wm/components/input/base-form-custom"),require("@wm/core"),require("@angular/common")):"function"==typeof define&&define.amd?define(["exports","@wm/components/base","@angular/forms","@angular/core","@wm/components/input/base-form-custom","@wm/core","@angular/common"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.input=e.wm.components.input||{},e.wm.components.input.slider={}),e.wm.components.base,e.ng.forms,e.ng.core,e.wm.components.input.baseFormCustom,e.wm.core,e.ng.common)}(this,function(e,t,i,n,a,s,o){"use strict";function r(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var l=r(i),c=r(n),d=r(s),p=r(o);const m=new Map([["class",t.PROP_STRING],["datavalue",t.PROP_STRING],["disabled",t.PROP_BOOLEAN],["hint",t.PROP_STRING],["arialabel",t.PROP_STRING],["maxvalue",t.PROP_NUMBER],["minvalue",t.PROP_NUMBER],["name",t.PROP_STRING],["readonly",t.PROP_BOOLEAN],["shortcutkey",t.PROP_STRING],["show",{value:!0,...t.PROP_BOOLEAN}],["step",t.PROP_NUMBER],["tabindex",{value:0,...t.PROP_NUMBER}],["showmarkers",{value:!1,...t.PROP_BOOLEAN}],["markerlabeltext",t.PROP_ANY],["showicons",t.PROP_BOOLEAN],["starticon",{value:"wi wi-minus",...t.PROP_STRING}],["endicon",{value:"wi wi-plus",...t.PROP_STRING}],["rangelabelposition",{value:"bottom",...t.PROP_STRING}]]),h={widgetType:"wm-slider",hostClass:"app-slider slider"},u={top:"range-label-top",side:"range-label-side",bottom:"range-label-bottom"};class g extends a.BaseFormCustomComponent{static{this.initializeProps=(t.register("wm-slider",m),void t.registerFormWidget(s.FormWidgetType.SLIDER,new Map(m)))}constructor(e,i,n){super(e,h,i),this.app=n,this.isPrism=!1,t.styler(this.nativeElement,this),this.isPrism=this.app.isPrism}handleEvent(e,t,i,n){"change"!==t&&"blur"!==t&&super.handleEvent(e,t,i,n)}handleChange(e){this.updateSliderValue(),this.invokeOnChange(this.datavalue,{type:"change"},this.ngModel.valid)}updateSliderValue(){const e=100-((Number(this.datavalue)||0)-(this.minvalue||0))/((this.maxvalue||100)-(this.minvalue||0))*100,t=this.nativeElement.querySelector(".slider-control");if(t){const i=Math.min(100,Math.max(0,e));t.style.setProperty("--end",`${i}%`)}}onPropertyChange(e,t,i){"tabindex"!==e&&("showmarkers"===e||"markerlabeltext"===e||"minvalue"===e||"maxvalue"===e||"step"===e?this.showmarkers&&this.renderMarkers():"rangelabelposition"===e?s.switchClass(this.nativeElement,u[t],u[i]):"datavalue"===e&&(this.datavalue=""===t||null===t?this.datavalue??50:t,this.updateSliderValue()),super.onPropertyChange(e,t,i))}renderMarkers(){const e=this.nativeElement.querySelector(".range-input"),i=e?.offsetWidth-9||0,n=this.step>0?Math.floor((this.maxvalue||100-this.minvalue||0)/this.step)+1:0,a=t.convertDataToObject(this.markerlabeltext);this.markerItems=[];for(let e=0;e<n;e++){const t=i/(n-1)*e,s=a?.[e]?.dataValue??(Array.isArray(a)?"object"==typeof a[e]&&a[e]?.title?a[e].title:a[e]:`${e}`),o=Array.isArray(a)&&"object"==typeof a[e]&&a[e]?.position?a[e].position:"up";this.markerItems.push({label:s,position:o,left:t})}}ngAfterViewInit(){super.ngAfterViewInit(),this.showmarkers&&setTimeout(()=>{this.renderMarkers()},40),this.datavalue&&setTimeout(()=>{this.updateSliderValue()})}decrementButtonClick(e){if(e.preventDefault(),e.stopPropagation(),this.disabled)return;const t=Number(this.step)||1,i=Number(this.minvalue)||0;let n=Number(this.datavalue??50);n-=t,n<=i||(isNaN(i)||(n=Math.max(n,i)),this.datavalue=n,this.handleChange())}incrementButtonClick(e){if(e.preventDefault(),e.stopPropagation(),this.disabled)return;const t=Number(this.step)||1,i=Number(this.maxvalue)||100;let n=Number(this.datavalue??50);n+=t,n>=i||(isNaN(i)||(n=Math.min(n,i)),this.datavalue=n,this.handleChange())}ngOnDestroy(){this.ngModel=null,this.markerItems&&(this.markerItems=[]),super.ngOnDestroy()}static{this.\u0275fac=c.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:c,type:g,deps:[{token:c.Injector},{token:"EXPLICIT_CONTEXT",optional:!0},{token:d.App}],target:c.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=c.\u0275\u0275ngDeclareComponent({minVersion:"17.0.0",version:"20.3.19",type:g,isStandalone:!0,selector:"[wmSlider]",providers:[t.provideAs(g,i.NG_VALUE_ACCESSOR,!0),t.provideAsWidgetRef(g)],viewQueries:[{propertyName:"ngModel",first:!0,predicate:i.NgModel,descendants:!0}],usesInheritance:!0,ngImport:c,template:'@if (isPrism) {\n<div class="slider-container">\n @if (showicons) {\n <button class="btn-icon" type="button" name="decrementButton" (click)="decrementButtonClick($event)">\n <i aria-hidden="true" [ngClass]="starticon"></i></button>\n }\n <div class="slider-control">\n @if(!showmarkers){\n <span [textContent]="minvalue||0" class="app-slider-value pull-left"></span>\n <span [textContent]="maxvalue||100" class="app-slider-value pull-right"></span>\n }\n <input class="range-input" type="range" aria-orientation="horizontal" focus-target [title]="datavalue"\n [attr.min]="minvalue" [attr.max]="maxvalue" [attr.step]="step" [(ngModel)]="datavalue"\n [ngModelOptions]="{ standalone: true }" [disabled]="disabled||readonly" [attr.accesskey]="shortcutkey"\n [attr.aria-label]="arialabel" (blur)="invokeOnTouched($event)" (ngModelChange)="handleChange($event)"\n [attr.name]="name" [tabindex]="tabindex" />\n <p class="active-slider"></p>\n </div>\n @if (showicons) {\n <button class="btn-icon" type="button" name="incrementButton" (click)="incrementButtonClick($event)">\n <i aria-hidden="true" [ngClass]="endicon"></i>\n </button>\n }\n</div>\n\n} @else {\n @if(!showmarkers){\n <span [textContent]="minvalue||0" class="app-slider-value pull-left"></span>\n <span [textContent]="maxvalue||100" class="app-slider-value pull-right"></span>\n}\n<input class="range-input" aria-orientation="horizontal"\n focus-target\n type="range" [title]="datavalue"\n [attr.min]="minvalue"\n [attr.max]="maxvalue"\n [attr.step]="step"\n [(ngModel)]="datavalue"\n [ngModelOptions]="{standalone: true}"\n [disabled]="disabled||readonly"\n [attr.accesskey]="shortcutkey"\n [attr.aria-label]="arialabel"\n (blur)="invokeOnTouched($event)"\n (ngModelChange)="handleChange($event)"\n [attr.name]="name"\n [tabindex]="tabindex"/>\n}\n@if (readonly || disabled) {\n <div aria-readonly="true" class="readonly-wrapper"></div>\n}\n@if(showmarkers){\n <div class="marker-container">\n@for (marker of markerItems; track marker) {\n <div class="marker-wrapper"\n [ngStyle]="{ left: marker.left + \'px\' }"\n [attr.title]="marker.label">\n <div class="marker-label" [ngClass]="marker.position" [attr.title]="marker.label">\n {{ marker.label }}\n </div>\n <div class="marker-dot" [attr.title]="marker.label"></div>\n </div>\n }\n </div>\n\n}\n',dependencies:[{kind:"directive",type:t.TextContentDirective,selector:"[textContent]",inputs:["textContent"]},{kind:"ngmodule",type:i.FormsModule},{kind:"directive",type:l.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:l.RangeValueAccessor,selector:"input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]"},{kind:"directive",type:l.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:l.NgModel,selector:"[ngModel]:not([formControlName]):not([formControl])",inputs:["name","disabled","ngModel","ngModelOptions"],outputs:["ngModelChange"],exportAs:["ngModel"]},{kind:"ngmodule",type:o.CommonModule},{kind:"directive",type:p.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"directive",type:p.NgStyle,selector:"[ngStyle]",inputs:["ngStyle"]}]})}}c.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:c,type:g,decorators:[{type:n.Component,args:[{standalone:!0,imports:[t.TextContentDirective,i.FormsModule,o.CommonModule],selector:"[wmSlider]",providers:[t.provideAs(g,i.NG_VALUE_ACCESSOR,!0),t.provideAsWidgetRef(g)],template:'@if (isPrism) {\n<div class="slider-container">\n @if (showicons) {\n <button class="btn-icon" type="button" name="decrementButton" (click)="decrementButtonClick($event)">\n <i aria-hidden="true" [ngClass]="starticon"></i></button>\n }\n <div class="slider-control">\n @if(!showmarkers){\n <span [textContent]="minvalue||0" class="app-slider-value pull-left"></span>\n <span [textContent]="maxvalue||100" class="app-slider-value pull-right"></span>\n }\n <input class="range-input" type="range" aria-orientation="horizontal" focus-target [title]="datavalue"\n [attr.min]="minvalue" [attr.max]="maxvalue" [attr.step]="step" [(ngModel)]="datavalue"\n [ngModelOptions]="{ standalone: true }" [disabled]="disabled||readonly" [attr.accesskey]="shortcutkey"\n [attr.aria-label]="arialabel" (blur)="invokeOnTouched($event)" (ngModelChange)="handleChange($event)"\n [attr.name]="name" [tabindex]="tabindex" />\n <p class="active-slider"></p>\n </div>\n @if (showicons) {\n <button class="btn-icon" type="button" name="incrementButton" (click)="incrementButtonClick($event)">\n <i aria-hidden="true" [ngClass]="endicon"></i>\n </button>\n }\n</div>\n\n} @else {\n @if(!showmarkers){\n <span [textContent]="minvalue||0" class="app-slider-value pull-left"></span>\n <span [textContent]="maxvalue||100" class="app-slider-value pull-right"></span>\n}\n<input class="range-input" aria-orientation="horizontal"\n focus-target\n type="range" [title]="datavalue"\n [attr.min]="minvalue"\n [attr.max]="maxvalue"\n [attr.step]="step"\n [(ngModel)]="datavalue"\n [ngModelOptions]="{standalone: true}"\n [disabled]="disabled||readonly"\n [attr.accesskey]="shortcutkey"\n [attr.aria-label]="arialabel"\n (blur)="invokeOnTouched($event)"\n (ngModelChange)="handleChange($event)"\n [attr.name]="name"\n [tabindex]="tabindex"/>\n}\n@if (readonly || disabled) {\n <div aria-readonly="true" class="readonly-wrapper"></div>\n}\n@if(showmarkers){\n <div class="marker-container">\n@for (marker of markerItems; track marker) {\n <div class="marker-wrapper"\n [ngStyle]="{ left: marker.left + \'px\' }"\n [attr.title]="marker.label">\n <div class="marker-label" [ngClass]="marker.position" [attr.title]="marker.label">\n {{ marker.label }}\n </div>\n <div class="marker-dot" [attr.title]="marker.label"></div>\n </div>\n }\n </div>\n\n}\n'}]}],ctorParameters:()=>[{type:c.Injector},{type:void 0,decorators:[{type:n.Inject,args:["EXPLICIT_CONTEXT"]},{type:n.Optional}]},{type:d.App}],propDecorators:{ngModel:[{type:n.ViewChild,args:[i.NgModel]}]}}),e.SliderComponent=g}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common"),require("@wm/components/basic/spinner"),require("@angular/core"),require("@wm/core"),require("@wm/components/base"),require("lodash-es"),require("moment")):"function"==typeof define&&define.amd?define(["exports","@angular/common","@wm/components/basic/spinner","@angular/core","@wm/core","@wm/components/base","lodash-es","moment"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.chart={}),e.ng.common,e.wm.components.basic.spinner,e.ng.core,e.wm.core,e.wm.components.base,e._,e.momentLib)}(this,function(e,t,i,n,a,s,o,r){"use strict";function l(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var c=l(t),d=l(n),p=l(a),m=l(r);const h=m.default||window.moment,u=["Column","Line","Area","Cumulative Line","Bar","Pie","Donut","Bubble"],g=["circle","square","diamond","cross","triangle-up","triangle-down"],v=["01/01/2001","01/01/2002","01/01/2003"],f={Terrestrial:{colors:["#1f77b4","#aec7e8","#ff7f0e","#ffbb78","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5","#8c564b","#c49c94","#e377c2","#f7b6d2","#7f7f7f","#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5"],tooltip:{backgroundColor:"#de7d28",textColor:"#FFFFFF"}},Annabelle:{colors:["#393b79","#5254a3","#6b6ecf","#9c9ede","#637939","#8ca252","#b5cf6b","#cedb9c","#8c6d31","#bd9e39","#e7ba52","#e7cb94","#843c39","#ad494a","#d6616b","#e7969c","#7b4173","#a55194","#ce6dbd","#de9ed6"],tooltip:{backgroundColor:"#2e306f",textColor:"#FFFFFF"}},Azure:{colors:["#3182bd","#6baed6","#9ecae1","#c6dbef","#e6550d","#fd8d3c","#fdae6b","#fdd0a2","#31a354","#74c476","#a1d99b","#c7e9c0","#756bb1","#9e9ac8","#bcbddc","#dadaeb","#636363","#969696","#bdbdbd","#d9d9d9"],tooltip:{backgroundColor:"#3182bd",textColor:"#FFFFFF"}},Retro:{colors:["#0ca7a1","#ffa615","#334957","#acc5c2","#988f90","#8accc9","#515151","#f27861","#36c9fd","#794668","#0f709d","#0d2738","#44be78","#4a1839","#6a393f","#557d8b","#6c331c","#1c1c1c","#861500","#09562a"],tooltip:{backgroundColor:"#80513a",textColor:"#FFFFFF"}},Mellow:{colors:["#f0dcbf","#88c877","#aeb918","#2e2c23","#ddddd2","#dfe956","#4c963b","#5d3801","#e1eec3","#cd8472","#fcfab3","#9a4635","#9295ad","#2e3f12","#565677","#557d8b","#4f4d02","#0c0c1b","#833324","#24120e"],tooltip:{backgroundColor:"#7c9e73",textColor:"#FFFFFF"}},Orient:{colors:["#a80000","#cc6c3c","#f0e400","#000084","#fccc6c","#009c6c","#cc309c","#78cc00","#fc84e4","#48e4fc","#4878d8","#186c0c","#606060","#a8a8a8","#000000","#d7d7d7","#75a06e","#190d0b","#888888","#694b84"],tooltip:{backgroundColor:"#c14242",textColor:"#FFFFFF"}},GrayScale:{colors:["#141414","#353535","#5b5b5b","#848484","#a8a8a8","#c3c3c3","#e0e0e0","#c8c8c8","#a5a5a5","#878787","#656565","#4e4e4e","#303030","#1c1c1c","#4f4f4f","#3b3b3b","#757575","#606060","#868686","#c1c1c1"],tooltip:{backgroundColor:"#575757",textColor:"#FFFFFF"}},Flyer:{colors:["#3f454c","#5a646e","#848778","#cededf","#74c4dd","#0946ed","#380bb1","#000ff0","#f54a23","#1db262","#bca3aa","#ffa500","#a86b32","#63a18c","#56795e","#934343","#b75f5f","#752d2d","#4e1111","#920606"],tooltip:{backgroundColor:"#47637c",textColor:"#FFFFFF"}},Luminosity:{colors:["#FFFFFF","#e4e4e4","#00bcd4","#f0dd2f","#00aabf","#018376","#e91e63","#39e5d4","#ff6d6d","#00ff76","#ff9800","#969696","#ff4200","#e00000","#95cbe5","#5331ff","#fff4a7","#e7a800","#0061e4","#d5e7ff"],tooltip:{backgroundColor:"#47637c",textColor:"#FFFFFF"}}},b=["xaxislabel","yaxislabel","xunits","yunits","xnumberformat","xdateformat","ynumberformat","showvalues","showlabels","viewtype","areaviewtype","staggerlabels","reducexticks","offsettop","offsetbottom","offsetright","offsetleft","barspacing","xaxislabeldistance","yaxislabeldistance","theme","labeltype","donutratio","showlabelsoutside","showxdistance","showydistance","shape","nodatamessage","captions","showxaxis","showyaxis","centerlabel","customcolors","showlegend","legendtype","xdomain","ydomain","tooltips","linethickness","highlightpoints","interpolation","labelthreshold"],y={small:.3,medium:.5,large:.8},w={small:.3,medium:.6,large:.7},P=o.invert(y),C=o.invert(w),T={Thousand:{prefix:"K",divider:1e3},Million:{prefix:"M",divider:1e6},Billion:{prefix:"B",divider:1e9}},O="#preview-chart",I=["Column","Line","Pie","Bar","Donut","Bubble"],D=["Line","Area","Cumulative Line"],E=["Cumulative Line","Area"],R="Europe",S="Asia",_="America",x="Australia",A=e=>"Bar"===e,k=e=>"Donut"===e,N=e=>"Bubble"===e,M=e=>"Area"===e,L=e=>(e=>"Pie"===e)(e)||k(e),F=e=>o.includes(I,e)||!o.includes(u,e),j=e=>o.includes(D,e),V=(e,t)=>"value"===t?y[e]:"key"===t?P[e]:void 0,B=(e,t)=>"value"===t?w[e]:"key"===t?C[e]:void 0,G=e=>((e,t,i)=>{let n=[],a=[],s=[],o=[],r=[],l=[],c=[],d=[],p=[],m=[];switch(e){case"jsonFormat":n=[{x:"01/01/2001",y:4e6},{x:"01/01/2002",y:1e6},{x:"01/01/2003",y:5e6}],a=[{x:"01/01/2001",y:3e6},{x:"01/01/2002",y:4e6},{x:"01/01/2003",y:7e6}],s=[{x:"01/01/2001",y:2e6},{x:"01/01/2002",y:8e6},{x:"01/01/2003",y:6e6}],m[0]={values:n,key:R},t>=2&&(m[1]={values:a,key:S}),t>=3&&(m[2]={values:s,key:_});break;case"lineChartFormat":n=[{x:1,y:4e6},{x:2,y:1e6},{x:3,y:5e6}],a=[{x:1,y:3e6},{x:2,y:4e6},{x:3,y:7e6}],s=[{x:1,y:2e6},{x:2,y:8e6},{x:3,y:6e6}],m[0]={values:n,key:R},t>=2&&(m[1]={values:a,key:S}),t>=3&&(m[2]={values:s,key:_});break;case"arrayFormat":o=[[1,4e6],[2,1e6],[3,5e6]],r=[[1,3e6],[2,4e6],[3,7e6]],l=[[1,2e6],[2,8e6],[3,6e6]],m[0]={values:o,key:R},t>=2&&(m[1]={values:r,key:S}),t>=3&&(m[2]={values:l,key:_});break;case"bubbleFormat":c=[{x:80.66,y:33739900,size:78,shape:i="random"===i?g[Math.floor(Math.random()*g.length)]:i},{x:79.84,y:81902300,size:90,shape:i},{x:78.6,y:5523100,size:45,shape:i}],d=[{x:72.73,y:79716200,size:98,shape:i},{x:80.05,y:61801600,size:20,shape:i},{x:72.49,y:73137200,size:34,shape:i}],p=[{x:68.09,y:33739900,size:45,shape:i},{x:81.55,y:7485600,size:78,shape:i},{x:68.6,y:14185e4,size:56,shape:i}],m[0]={values:c,key:R},t>=2&&(m[1]={values:d,key:S}),t>=3&&(m[2]={values:p,key:_});break;case"pieChartFormat":m=[{x:R,y:1e6},{x:S,y:2e6},{x:_,y:3e6},{x:x,y:4e6}]}return m})((e=>{const t=e.type;return(e=>"Line"===e)(t)?"lineChartFormat":L(t)?"pieChartFormat":N(t)?"bubbleFormat":F(t)?"jsonFormat":"arrayFormat"})(e),o.split(e.yaxisdatakey,",").length,e.shape),W=(e,t)=>{return!("Min"!==e[t+"domain"]||(i=e.type,!(e=>"Column"===e)(i)&&!M(i)));var i},q=e=>!(!o.isFinite(e.min)||!o.isFinite(e.max)),z=e=>{const t=Math.floor(e);return Math.abs(e)-t>0?e-.1:t-1},U=(e,t)=>isNaN(parseInt(e,10))?t(e,"value"):e,H=(e,t)=>("%c"==(e=e||"%x")&&(e="%a %b %e %X %Y"),d3.timeFormat(e)(new Date(h(h(t).format()).valueOf()))),Y=(e,t)=>{let i,n,a;if(e){let s;s="Thousand"==e||"Million"==e||"Billion"==e?d3.format(",.2s"):"%"==e?d3.format(".2%"):".f"==e?d3.format(".2f"):d3.format(e),i=s(t),n=T[e]&&T[e].divider||0,a=T[e]&&T[e].prefix,a&&0!==n&&(i=d3.format(".2f")(t/n)+a)}else i=t>=1e3?d3.format(".1s")(t):t;var s;return i=(s=i)?("number"==typeof s?s.toString():s).replace(/\.0+([A-Za-z]*)$/,"$1").replace(/\.([1-9]+)0+([A-Za-z]*)$/,".$1$2"):s,i},X=(e,t,i,n)=>{d3.selectAll(".nvtooltip").style("opacity",0),e.tooltip.contentGenerator((e,a)=>{let s,o=e.data.x;return s=Y(a?.ynumberformat||i?.ynumberformat||t?.ynumberformat,e.data.y),L(i.type)&&(n=e.data.x,o=""),'<table><tbody><tr class="value"><b>'+o+'</b></tr><tr><td class="legend-color-guide"><div style="background-color:'+e.color+';"></div></td><td class="key">'+n+'</td><td class="value">'+s+"</td></tr></tbody></table>"})},K=(e,t,i,n,s)=>{n=((e,t)=>(t&&!a.isEmptyObject(t)||(t={}),o.forEach(b,i=>{o.isUndefined(t[i])&&(t[i]=e[i])}),t))(e,n);let r,l,c,d,p,m,h,g,P,C=[];const T={},O={};switch(e.type){case"Column":m=U(n.barspacing,V)||y.medium,r=nv.models.multiBarChart().x(e=>e.x).y(e=>e.y).reduceXTicks(n.reducexticks).rotateLabels(0).showControls(!1).stacked("Stacked"===n.viewtype).groupSpacing(m);break;case"Cumulative Line":r=nv.models.cumulativeLineChart().x(e=>e[0]).y(e=>e[1]).showControls(!1).useInteractiveGuideline(n.tooltips).interpolate(n.interpolation);break;case"Line":r=nv.models.lineChart().useInteractiveGuideline(n.tooltips).interpolate(n.interpolation);break;case"Area":r=nv.models.stackedAreaChart().x(e=>e.x).y(e=>e.y).clipEdge(!0).showControls(!1).style(n.areaviewtype).useInteractiveGuideline(n.tooltips).interpolate(n.interpolation);break;case"Bar":m=U(n.barspacing,V)||y.medium,r=nv.models.multiBarHorizontalChart().x(e=>e.x).y(e=>e.y).showControls(!1).stacked("Stacked"===n.viewtype).showValues(n.showvalues).groupSpacing(m);break;case"Pie":case"Donut":d=(e=>{const t={};switch(e){case"hide":t.showlabels=!1;break;case"inside":t.showlabels=!0,t.showlabelsoutside=!1;break;case"outside":t.showlabels=!0,t.showlabelsoutside=!0}return t})(n.showlabels,n.showlabelsoutside),p=U(n.donutratio,B)||w.medium,r=nv.models.pieChart().x(e=>e.x).y(e=>e.y).showLabels(d.showlabels).labelType(n.labeltype).valueFormat(d3.format("%")).title(n.centerlabel).labelThreshold(n.labelthreshold||.01).labelsOutside(d.showlabelsoutside),k(e.type)&&r.donut(!0).donutRatio(p),"key-value"===n.labeltype&&r.labelType(e=>e.data.x+" "+e.data.y);break;case"Bubble":r=nv.models.scatterChart().x(e=>e.x).y(e=>e.y).showDistX(n.showxdistance).showDistY(n.showydistance)}var I;return t&&(T.min=t.min.x||t.min[0],T.max=t.max.x||t.max[0],q(T)&&(T.min=z(T.min),r.xDomain([T.min,T.max]))),i&&(O.min=i.min.y||i.min[1],O.max=i.max.y||i.max[1],q(O)&&(O.min=z(O.min),r.yDomain([O.min,O.max]))),r.legend.vers(n.legendtype&&n.legendtype.toLowerCase()||"furious"),o.includes(u,e.type)||(r=nv.models.multiBarChart().x(e=>e.x).y(e=>e.y)),L(e.type)?("percent"===n.labeltype?r.valueFormat(d3.format("%")):r.valueFormat(e=>Y(n.ynumberformat,e)),X(r,n,e)):(r.showXAxis(n.showxaxis).showYAxis(n.showyaxis),r.legendPosition(n.showlegend),l=n.xaxislabel||a.prettifyLabels(e.xaxisdatakey)||"x caption",c=n.yaxislabel||a.prettifyLabels(e.yaxisdatakey)||"y caption",e.yaxisdatakey&&e.yaxisdatakey.split(",").length>1&&(P=!0),P||N(e.type)||X(r,n,e,c),l+=n.xunits?"("+n.xunits+")":"",c+=n.yunits?"("+n.yunits+")":"",r.xAxis.axisLabel(l).axisLabelDistance(n.xaxislabeldistance).staggerLabels(n.staggerlabels),n.xdateformat||s&&!N(e.type)?j(e.type)?r.xAxis.tickFormat(t=>(g=s?v[t-1]:e.xDataKeyArr[t],H(n.xdateformat,g))):r.xAxis.tickFormat(e=>H(n.xdateformat,e)):n.xnumberformat?r.xAxis.tickFormat(e=>Y(n.xnumberformat,e)):j(e.type)&&r.xAxis.tickFormat(t=>e.xDataKeyArr[t]),r.yAxis.axisLabel(c).axisLabelDistance(n.yaxislabeldistance).staggerLabels(n.staggerlabels).tickFormat(e=>Y(n?.ynumberformat,e)),A(e.type)&&r.valueFormat(e=>Y(n?.ynumberformat,e))),o.isString(n.customcolors)&&n.customcolors&&(C=o.split(n.customcolors,",")),o.isArray(n.customcolors)&&(C=n.customcolors),h="false"!==(I=n.showlegend)&&!1!==I&&("true"===I||!0===I||"hide"!==I),r.showLegend(h).margin({top:n.offsettop,right:n.offsetright,bottom:n.offsetbottom,left:n.offsetleft}).color(C.length?C:f[n.theme].colors),r.tooltip.enabled(n.tooltips),e.message=n.nodatamessage||"No data found",r.noData(e.message),j(e.type)&&e.highlightpoints&&r.dispatch.on("stateChange",()=>{setTimeout(()=>Q(e),100)}),!e.showlegend||"Donut"!==e.type&&"Pie"!==e.type||"right"===e.showlegend&&r.legendPosition("right"),r},Q=(e,t)=>{const i=e.$id;j(e.type)&&(((e,t)=>{t=t||1.5;const i=(e?d3.select("#wmChart"+e+" svg"):d3.select(O+" svg")).selectAll(".nv-line");0!==i.size()&&i.style("stroke-width",t)})(i,e.linethickness),((e,t)=>{const i=e?d3.select("#wmChart"+e+" svg"):d3.select(O+" svg");t?i.selectAll(".nv-point").style("stroke-width","6px").style("fill-opacity","0.95").style("stroke-opacity","0.95"):i.selectAll(".nv-point").style("stroke-width","0px").style("fill-opacity","0")})(i,e.highlightpoints))},Z={widgetType:"wm-chart",hostClass:"app-chart"},J="none",ee=["aggregation","aggregationcolumn","groupby","orderby"],te={Column:"rect.nv-bar",Bar:"g.nv-bar",Area:".nv-stackedarea .nv-point","Cumulative Line":".nv-cumulativeLine .nv-scatterWrap path.nv-point",Line:".nv-lineChart .nv-scatterWrap path.nv-point",Pie:".nv-pieChart .nv-slice path",Donut:".nv-pieChart .nv-slice path",Bubble:".nv-scatterChart .nv-point-paths path"},ie={fontunit:"font-size",fontsize:"font-size",color:"fill",fontfamily:"font-family",fontweight:"font-weight",fontstyle:"font-style",textdecoration:"text-decoration"},ne={average:"AVG",count:"COUNT",maximum:"MAX",minimum:"MIN",sum:"SUM"},ae=e=>!0===e||"true"===e||!1!==e&&"false"!==e&&e,se=e=>{let t;const i=[],n=[];return o.forEach(o.split(e,","),function(e){t=o.split(e,":"),i.push(t[0]),n.push(t[1])}),{columns:i,orders:n}},oe=e=>e?e.replace(/\./g,"$"):null,re=(e,t)=>{const i=d3.select("#wmChart"+t+" svg").selectAll("text");i.empty()||i.style(e)};class le extends s.StylableComponent{static{this.initializeProps=void s.register("wm-chart",new Map([["aggregation",{value:"none",...s.PROP_STRING}],["aggregationcolumn",s.PROP_STRING],["areaviewtype",{value:"stack",...s.PROP_STRING}],["barspacing",{value:"medium",...s.PROP_STRING}],["bubblesize",s.PROP_STRING],["centerlabel",s.PROP_STRING],["class",s.PROP_STRING],["customcolors",s.PROP_ANY],["dataset",s.PROP_ANY],["datasource",s.PROP_STRING],["donutratio",{value:"medium",...s.PROP_STRING}],["formattype",{value:"",PROP_STRING:s.PROP_STRING}],["groupby",s.PROP_STRING],["height",{value:"210px",PROP_STRING:s.PROP_STRING}],["highlightpoints",s.PROP_BOOLEAN],["iconclass",s.PROP_STRING],["interpolation",{value:"linear",...s.PROP_STRING}],["labelthreshold",{value:.01,...s.PROP_NUMBER}],["labeltype",{value:"percent",...s.PROP_STRING}],["legendtype",{value:"furious",...s.PROP_STRING}],["linethickness",s.PROP_STRING],["loadingdatamsg",{value:"Loading...",...s.PROP_STRING}],["name",s.PROP_STRING],["nodatamessage",{value:"No Data Available.",...s.PROP_STRING}],["offset",s.PROP_STRING],["offsetbottom",{value:55,...s.PROP_NUMBER}],["offsetleft",{value:75,...s.PROP_NUMBER}],["offsetright",{value:25,...s.PROP_NUMBER}],["offsettop",{value:25,...s.PROP_NUMBER}],["orderby",s.PROP_STRING],["reducexticks",{value:!0,...s.PROP_BOOLEAN}],["shape",{value:"circle",...s.PROP_STRING}],["show",{value:!0,...s.PROP_BOOLEAN}],["showlabels",{value:"outside",...s.PROP_STRING}],["showlabelsoutside",{value:!0,...s.PROP_BOOLEAN}],["showlegend",{value:"top",...s.PROP_STRING}],["showvalues",{value:!1,...s.PROP_BOOLEAN}],["showxaxis",{value:!0,...s.PROP_BOOLEAN}],["showxdistance",{value:!1,...s.PROP_BOOLEAN}],["showyaxis",{value:!0,...s.PROP_BOOLEAN}],["showydistance",{value:!1,...s.PROP_BOOLEAN}],["staggerlabels",{value:!1,...s.PROP_BOOLEAN}],["subheading",s.PROP_STRING],["theme",s.PROP_STRING],["title",s.PROP_STRING],["tooltips",{value:!0,...s.PROP_BOOLEAN}],["type",s.PROP_STRING],["viewtype",{value:"Grouped",...s.PROP_STRING}],["xaxisdatakey",s.PROP_STRING],["xaxislabel",s.PROP_STRING],["xaxislabeldistance",{value:12,...s.PROP_NUMBER}],["xdateformat",s.PROP_STRING],["xdomain",{value:"Default",...s.PROP_STRING}],["xnumberformat",s.PROP_STRING],["xunits",s.PROP_STRING],["yaxisdatakey",s.PROP_STRING],["yaxislabel",s.PROP_STRING],["yaxislabeldistance",{value:12,...s.PROP_NUMBER}],["ydomain",{value:"Default",...s.PROP_STRING}],["ynumberformat",s.PROP_STRING],["yunits",s.PROP_STRING]]))}isGroupByEnabled(){return!(!this.groupby||this.groupby===J)}isValidAxis(){return!this.binddataset||this.xaxisdatakey&&this.yaxisdatakey}isAggregationEnabled(){return!(!this.isGroupByEnabled()||this.aggregation===J||!this.aggregationcolumn)}isDataFilteringEnabled(){return this.isAggregationEnabled()||!this.isVisuallyGrouped&&this.orderby}getxAxisVal(e,t,i){const n=o.get(e,t);return j(this.type)&&!a.isNumberType(this.xAxisDataType)?(this.xDataKeyArr.push(n),n instanceof Date?n:i):n}getXMinMaxValues(e){if(!e)return;const t={};return t.min=o.minBy(e.values,e=>e.x||e[0]),t.max=o.maxBy(e.values,e=>e.x||e[0]),t}getYMinMaxValues(e){const t={},i=[],n=[];if(e)return o.forEach(e,e=>{i.push(o.minBy(e.values,function(e){return e.y||e[1]})),n.push(o.maxBy(e.values,function(e){return e.y||e[1]}))}),t.min=o.minBy(i,e=>e.y||e[1]),t.max=o.maxBy(n,e=>e.y||e[1]),t}getValidData(e){return 1===e.length&&void 0===e[0]?[]:e}valueFinder(e,t,i,n,a){const s=this.getxAxisVal(e,t,n),r=o.get(e,i),l=parseFloat(r)||r,c=parseFloat(e[this.bubblesize])||2;let d={};var p;return F(this.type)?(d.x=s,d.y=l,N(this.type)&&(d.size=c,d.shape=a||"circle")):(p=this.type,o.includes(E,p)&&(d=[s,l])),d._dataObj=e,d}setErrMsg(e){this.showNoDataMsg&&(this.showContentLoadError=!0,this.invalidConfig=!0,this.errMsg="")}processChartData(){if(this.sampleData=G(this),this.xDataKeyArr=[],!this.binddataset)return this.xDataKeyArr=v,this.sampleData;if(!this.chartData||!this.chartData.length)return[];let e,t=[],i=[],n=[];const s=this.xaxisdatakey,r=this.yaxisdatakey?this.yaxisdatakey.split(","):[],l=this.chartData;return o.isArray(l)&&(L(this.type)?(e=r[0],t=o.map(l,(t,i)=>{if(!a.isEmptyObject(l[i]))return this.valueFinder(l[i],s,e)}),t=this.getValidData(t)):(N(this.type)&&(i="random"===this.shape?g:this.shape),r.forEach((e,r)=>{n=o.map(l,(t,n)=>{if(!a.isEmptyObject(l[n]))return this.valueFinder(l[n],s,e,n,o.isArray(i)&&i[r]||this.shape)}),n=this.getValidData(n),t.push({values:n,key:a.prettifyLabels(e)})}))),t}setChartData(e){e&&(this._processedData=e)}getChartData(){return this._processedData}getVisuallyGroupedData(e,t){let i,n,a={},s=[];const r=[],l=M(this.type),c=o.first(o.split(this.yaxisdatakey,","));return this.xDataKeyArr=[],e=o.orderBy(e,o.split(this.groupby,",")),this.orderby&&(i=se(this.orderby),e=o.orderBy(e,i.columns,i.orders)),e=o.groupBy(e,t),l&&(n=o.max(o.map(e,e=>e.length))),o.forEach(e,(e,t)=>{s=M?o.fill(new Array(n),[0,0]):[],o.forEachRight(e,(e,t)=>{s[t]=this.valueFinder(e,this.xaxisdatakey,c,t)}),a={key:t,values:s},r.push(a)}),r}getGroupingDetails(){if(this.isGroupByEnabled()&&!this.isAggregationEnabled()){let e,t,i,n=!1,a=[];const s=this.groupby&&this.groupby!==J?this.groupby.split(","):[],r=this.yaxisdatakey?this.yaxisdatakey.split(","):[];return s.length>1&&(s.every((t,a)=>this.xaxisdatakey===t||-1!==$.inArray(t,r)||(n=!0,e=t,i=a,s.splice(i,1),!1)),e&&a.push(e),s.length&&(a=o.concat(a,s))),this.xaxisdatakey!==this.aggregationcolumn&&a.push(this.xaxisdatakey),o.forEach(r,e=>{e!==this.aggregationcolumn&&a.push(e)}),t=a.join(","),this.isVisuallyGrouped=n,{expression:t,isVisuallyGrouped:n,visualGroupingColumn:e}}return{expression:"",isVisuallyGrouped:!1,visualGroupingColumn:""}}getAggregatedData(e){const t=this.datasource,i=this.yaxisdatakey?this.yaxisdatakey.split(","):[],n={};let s,r,l,c=[],d=[];t&&(this.isGroupByEnabled()&&(d=o.split(this.groupby,",")),this.orderby&&(s=o.replace(this.orderby,/:/g," "),c=o.uniq(o.concat(c,d,[this.aggregationcolumn])),l=se(this.orderby).columns,o.forEach(o.intersection(c,l),e=>{r=oe(e),s=o.replace(s,e,r)})),this.isAggregationEnabled()&&(n.groupByFields=d,n.aggregations=[{field:this.aggregationcolumn,type:ne[this.aggregation],alias:oe(this.aggregationcolumn)}]),t.execute("getAggregatedData",{aggregations:n,sort:s}).then(t=>{const n=[],s=oe(this.aggregationcolumn),r=oe(this.xaxisdatakey),l=[];i.forEach(e=>l.push(oe(e))),o.forEach(t.body.content,e=>{const t={};this.isAggregationEnabled()&&(t[this.aggregationcolumn]=e[s],t[this.aggregationcolumn]=o.get(e,s)||o.get(e,this.aggregationcolumn)),t[this.xaxisdatakey]=o.get(e,r)||o.get(e,this.xaxisdatakey),i.forEach((i,n)=>{t[i]=e[l[n]],t[i]=o.get(e,l[n])||o.get(e,i)}),n.push(t)}),this.chartData=n,a.triggerFn(e)},()=>{this.chartData=[],this.setErrMsg("MESSAGE_ERROR_FETCH_DATA"),a.triggerFn(e)}))}setLabelsMaxWidth(){let e,t,i,n,a,s,o,r,l,c,d,p;const m=parseInt(this.fontsize,10)||12,h=A(this.type);e=$("#wmChart"+this.$id+" svg").find("g.nv-x").find("g.tick").find("text"),e.each(function(){const e=$(this);let i,s;if(e.text()&&"1"===e.css("opacity"))return i=e.parent().attr("transform").split(","),n=parseFloat(i[0].substr(10)),a=parseFloat(i[1]||"0"),!h&&n>0?s=n:a>0&&(s=a),t?(t=s-t,!1):(t=s,!0)}),h?(c=$("#wmChart"+this.$id+" svg>g.nv-wrap>g>g.nv-barsWrap")[0],d=$("#wmChart"+this.$id+" svg>g.nv-wrap>g>g.nv-y")[0],p=$("#wmChart"+this.$id+" svg")[0],s=c?c.getBoundingClientRect().height:0,l=d?p.getBoundingClientRect().width-d.getBoundingClientRect().width:p.getBoundingClientRect().width,i=Math.round(l/m),t<m&&(o=s/m,r=Math.ceil(this.chartData.length/o),d3.select("#wmChart"+this.$id+" svg").select("g.nv-x").selectAll("g.tick").select("text").each(function(e,t){t%r!==0&&d3.select(this).attr("opacity",0)}))):i=Math.round(t/m),i=Math.abs(i),e.each(function(){this.textContent.length>i&&(this.textContent=this.textContent.substr(0,i)+"...")})}getDefaultColumns(){let e,t,i,n;const s=[],o=this.datasource.execute(a.DataSource.Operation.GET_PROPERTIES_MAP)||[];for(i=0;i<o.length&&s.length<=2;i+=1)e=o[i].type,!o[i].isRelated&&a.isNumberType(e)?s.push(o[i].fieldName):"string"!==e||t||(t=o[i].fieldName);return t&&s.length>0&&!N(this.type)&&(n=s[0],s[0]=t,s[1]=n),s}attachClickEvent(){let e;d3.select("#wmChart"+this.$id+" svg").selectAll(te[this.type]).style("pointer-events","all").on("click",(t,i,n)=>{switch(this.type){case"Column":case"Bar":e=i._dataObj;break;case"Pie":case"Donut":e=i.data._dataObj;break;case"Area":case"Cumulative Line":case"Line":e=i[0]._dataObj;break;case"Bubble":e=i}this.selecteditem=e,this.invokeEventCallback("select",{$event:t,selectedChartItem:i,selectedItem:this.selecteditem})})}postPlotProcess(e){let t,i,n,s;const r={},l=this.$element;Q(this),L(this.type)?this.showlabelsoutside||(t=d3.select("#wmChart"+this.$id+" svg"),i=t.select(".nv-pieLabels").selectAll(".nv-label"),n=t.select(".nv-pie").selectAll(".nv-slice"),s=[],n&&n.length&&(n.each(function(){d3.select(this).attr("transform",function(e){s.push((e=>{const t=90*(e.startAngle+e.endAngle)/Math.PI-90;return t>90?t-180:t})(e))})}),i.each(function(e,t){const i=d3.select(this);$(i[0][0]).find("text").attr("transform","rotate("+s[t]+")")}))):this.setLabelsMaxWidth(),o.forEach(ie,(e,t)=>{r[e]="fontsize"===t||"fontunit"===t?this.fontsize+this.fontunit:this[t]}),re(r,this.$id),a.triggerFn(this._resizeFn&&this._resizeFn.clear),this._resizeFn=nv.utils.windowResize(()=>{l[0].getBoundingClientRect().height&&(e.update(),Q(this),L(this.type)||this.setLabelsMaxWidth())})}configureChart(){let e,t,i,n;if(this._processedData.length>0&&(W(this,"x")&&(e=this.binddataset?this.getXMinMaxValues(this._processedData[0]):{min:{x:1},max:{x:5}}),W(this,"y")&&(t=this.binddataset?this.getYMinMaxValues(this._processedData):{min:{y:1},max:{y:5}})),!L(this.type)||this.binddataset&&this.scopedataset||(this._processedData=a.getClonedObject(this.scopedataset||this._processedData)),i=K(this,e,t,null,!this.binddataset),o.isArray(this._processedData)){const e=$("#wmChart"+this.$id+" svg").find("g.nv-x").find("g.tick");return e&&e.length&&e.remove(),n=this.invokeEventCallback("beforerender",{chartInstance:i}),n&&(i=n),this.chart=i,d3.select("#wmChart"+this.$id+" svg").datum(this._processedData).call(this.chart),this.postPlotProcess(i),i}}plotChart(){const e=this.$element;this.chartData=this.invokeEventCallback("transform")||this.chartData,this.isVisuallyGrouped&&!L(this.type)?this._processedData=this.chartData:this._processedData=this.processChartData(),e[0].getBoundingClientRect().height&&(this.clearCanvas&&(e.find("svg").replaceWith("<svg></svg>"),this.clearCanvas=!1),this.isValidAxis()||(this._processedData=[]),nv.addGraph(()=>this.configureChart(),()=>{setTimeout(()=>{this.attachClickEvent()},600)}),this.isLoadInProgress=!1)}get isLiveVariable(){const e=this.datasource;return e&&"wm.LiveVariable"===e.category}plotChartProxy(){this.showContentLoadError=!1,this.invalidConfig=!1,this.isLoadInProgress=!0;const e=this.getGroupingDetails();this.binddataset&&this.isLiveVariable&&(this.filterFields||this.isDataFilteringEnabled())?this.getAggregatedData(()=>this.plotChart()):(this.dataset&&this.isLiveVariable&&(this.chartData=this.dataset,this.isGroupByEnabled()&&e.isVisuallyGrouped&&(this.chartData=this.getVisuallyGroupedData(this.chartData,e.visualGroupingColumn))),this.plotChart())}setDefaultAxisOptions(){const e=this.getDefaultColumns();this.xaxisdatakey=e[0]||null,this.yaxisdatakey=e[1]||null}getCutomizedOptions(e,t){const i=o.split(this.groupby,","),n=o.split(this.aggregationcolumn,",");if(!this.binddataset)return t;let a;switch(this.axisoptions||(this.axisoptions=t),e){case"xaxisdatakey":this.isGroupByEnabled()&&(a=i);break;case"yaxisdatakey":this.isAggregationEnabled()?a=n:this.isLiveVariable&&(a=this.numericColumns);break;case"groupby":this.isLiveVariable&&this.nonPrimaryColumns&&this.nonPrimaryColumns.length&&(a=this.nonPrimaryColumns);break;case"aggregationcolumn":this.isLiveVariable&&this.isAggregationEnabled()&&"count"!==this.aggregation&&(a=this.numericColumns);break;case"orderby":this.isLiveVariable&&this.isAggregationEnabled()&&(a=o.uniq(o.concat(i,n)));break;case"bubblesize":this.numericColumns&&this.numericColumns.length&&(a=this.numericColumns)}return a||t||this.axisoptions}setNumericandNonPrimaryColumns(){let e,t;const i=this.datasource.execute(a.DataSource.Operation.GET_PROPERTIES_MAP);this.numericColumns=[],this.nonPrimaryColumns=[],this.dataset&&!o.isEmpty(i)&&(e=[]),e&&(o.forEach(Object.keys(e),i=>{t=e[i].type,a.isNumberType(t)&&this.numericColumns.push(i),"true"!==e[i].isRelatedPk&&e[i].isPrimaryKey||this.nonPrimaryColumns.push(i)}),this.numericColumns=this.numericColumns.sort(),this.nonPrimaryColumns=this.nonPrimaryColumns.sort())}handleDataSet(e){this.errMsg="",e||this.binddataset||(this.isVisuallyGrouped=!1,this.axisoptions=null),this.chartData=this.isLiveVariable?e||"":e&&""===e.dataValue&&1===o.keys(e).length?"":e,!o.isArray(this.chartData)&&o.isObject(this.chartData)&&(this.chartData=[this.chartData]),e&&e.filterFields&&(this.filterFields=e.filterFields),this.chartData&&this._plotChartProxy()}setDonutCenterLabel(e){let t,i;t=d3.select("#wmChart"+this.$id+" svg"),i=t.select(".nv-wrap.nv-pie").select(".nv-pie"),i.text(""),i.append("text").attr("dy",".35em").attr("text-anchor","middle").attr("class","nv-pie-title").text(e).each(function(e){var t=d3.select(this),i=d3.select(this.parentElement),n=Number(i.node().getBoundingClientRect().width)-30,a=this.getComputedTextLength();t.attr("data-scale",n/a)}).style("font-size",function(){var e=16*d3.select(this).attr("data-scale");return e>24?24:e+"px"})}onPropertyChange(e,t,i){switch(super.onPropertyChange(e,t,i),e){case"dataset":this.handleDataSet(t);break;case"centerlabel":this.chart&&(this.chart.title(t),this.setDonutCenterLabel(t));break;case"type":L(this.type)?(this.offsettop=20,this.offsetright=0,this.offsetbottom=0,this.offsetleft=0):"Pie"!==i&&"Donut"!==i||(this.offsettop=25,this.offsetright=25,this.offsetbottom=55,this.offsetleft=75),i!==t&&(this.clearCanvas=!0),this._plotChartProxy();break;default:this._plotChartProxy()}o.includes(ee,e)&&this._plotChartProxy()}handleLoading(e){const t=this.datasource;t&&t.execute(a.DataSource.Operation.IS_API_AWARE)&&a.isDataSourceEqual(e.variable,t)&&(this.variableInflight=e.active,this.isLoadInProgress=e.active)}hideTooltip(){d3.selectAll(".nvtooltip").style("opacity",0)}onStyleChange(e,t,i){const n={};switch(super.onStyleChange(e,t,i),e){case"fontsize":case"fontunit":case"color":case"fontfamily":case"fontweight":case"fontstyle":case"textdecoration":n[ie[e]]="fontsize"===e||"fontunit"===e?this.fontsize+this.fontunit:t,re(n,this.$id)}}constructor(e,t,i){super(e,Z,i),this.app=t,this.iconclass="",this.nonPrimaryColumns=[],this.xDataKeyArr=[],this.chartData=[],this._processedData=[],this._subsciptions=[],this._plotChartProxy=o.debounce(this.plotChartProxy.bind(this),100),this.redraw=this._plotChartProxy.bind(this),s.styler(this.nativeElement,this,s.APPLY_STYLES_TYPE.CONTAINER,["fontsize","fontunit","color","fontfamily","fontweight","fontstyle","textdecoration"]),this.$id=this.widgetId||Math.random(),a.removeAttr(this.nativeElement,"title"),this.chartReady=!1,this.binddataset=this.nativeElement.getAttribute("dataset.bind"),this._subsciptions.push(this.app.subscribe("toggle-variable-state",this.handleLoading.bind(this))),this._subsciptions.push(this.app.subscribe("iscroll-start",()=>{this.hideTooltip()}))}ngAfterViewInit(){super.ngAfterViewInit(),o.includes(["outside","inside","hide"],this.showlabels)||(this.showlabels=ae(this.showlabels),this.showlabelsoutside=ae(this.showlabelsoutside),this.showlabels=this.showlabels?this.showlabelsoutside?"outside":"inside":"hide"),this.theme||(this.theme=L(this.type)?"Azure":"Terrestrial"),this.nativeElement.setAttribute("id","wmChart"+this.$id),this.binddataset||this.nativeElement.getAttribute("scopedataset")||this._plotChartProxy()}ngOnDestroy(){this.hideTooltip(),this._subsciptions&&(this._subsciptions.forEach(e=>{e()}),this._subsciptions=[]),this.chart&&(this.chart=null),this._resizeFn&&(this._resizeFn=null),this.chartData=[],this._processedData=[],this.sampleData=[],this.xDataKeyArr=[],this.nonPrimaryColumns=[],super.ngOnDestroy()}static{this.\u0275fac=d.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:d,type:le,deps:[{token:d.Injector},{token:p.App},{token:"EXPLICIT_CONTEXT",optional:!0}],target:d.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=d.\u0275\u0275ngDeclareComponent({minVersion:"17.0.0",version:"20.3.19",type:le,isStandalone:!0,selector:"div[wmChart]",host:{properties:{"class.panel":"this.title"}},providers:[s.provideAsWidgetRef(le)],usesInheritance:!0,ngImport:d,template:'@if (title) {\n <div class="panel-heading">\n <h3 class="panel-title">\n <div class="pull-left"><i class="app-icon panel-icon {{iconclass}}" [class.ng-hide]="!iconclass"></i></div>\n <div class="heading" [innerHTML]="title"></div>\n @if (subheading) {\n <div class="description" [innerHTML]="subheading"></div>\n }\n </h3>\n </div>\n}\n<div class="app-chart-inner" [ngClass]="{\'loading\':isLoadInProgress, \'panel-body\': title}">\n <svg></svg>\n @if (showContentLoadError && showNoDataMsg) {\n <div class="wm-content-info readonly-wrapper">\n <p class="wm-message" [title]="hintMsg" [ngClass]="{\'error\': invalidConfig}" [innerText]="errMsg"></p>\n </div>\n }\n <div wmSpinner show.bind="isLoadInProgress" caption.bind="loadingdatamsg"></div>\n</div>\n',styles:[".nvtooltip h3,.nvtooltip p{margin:0;text-align:center}.nv-distx,.nv-disty,.nv-noninteractive,.nvd3 .nv-axis,.nvd3 .nv-interactiveGuideLine,.nvd3.nv-pie .nv-label,.nvd3.nv-sparklineplus g.nv-hoverValue,.nvtooltip{pointer-events:none}.nvd3 .nv-axis{opacity:1}.nvd3 .nv-axis path{fill:none;stroke:#000;stroke-opacity:.75;shape-rendering:crispEdges}.nvd3 .nv-axis .zero line,.nvd3 .nv-axis line.zero,.nvd3 .nv-axis path.domain{stroke-opacity:.75}.nvd3 .nv-axis.nv-x path.domain{stroke-opacity:0}.nvd3 .nv-axis line{fill:none;stroke:#e5e5e5;shape-rendering:crispEdges}.nvd3 .nv-axis .nv-axisMaxMin text,.nvtooltip table td.key.total{font-weight:700}.nvd3 .x .nv-axis .nv-axisMaxMin text,.nvd3 .x2 .nv-axis .nv-axisMaxMin text,.nvd3 .x3 .nv-axis .nv-axisMaxMin text{text-anchor:middle}.nvd3 .nv-axis.nv-disabled,.nvd3 .nv-controlsWrap .nv-legend .nv-check-box .nv-check{opacity:0}.nvd3 .nv-bars rect{fill-opacity:.75;-webkit-transition:fill-opacity .25s linear;transition:fill-opacity .25s linear}.nvd3 .nv-bars rect.hover,.nvd3 .nv-boxplot circle:hover,.nvd3 .nv-boxplot rect:hover,.nvd3 .nv-candlestickBar .nv-ticks rect:hover,.nvd3 .nv-discretebar .nv-groups rect:hover,.nvd3 .nv-multibar .nv-groups rect:hover,.nvd3 .nv-multibarHorizontal .nv-groups rect:hover,.nvd3 .nv-scatter .nv-point.hover,.nvd3.nv-bullet .nv-measure:hover,.nvd3.nv-linePlusBar .nv-bar rect:hover,.nvd3.nv-pie .hover path{fill-opacity:1}.nvd3 .nv-bars .hover rect{fill:#add8e6}.nvd3 .nv-bars text{fill:#0000}.nvd3 .nv-bars .hover text{fill:#000}.nvd3 .nv-discretebar .nv-groups rect,.nvd3 .nv-multibar .nv-groups rect,.nvd3 .nv-multibarHorizontal .nv-groups rect{stroke-opacity:0;-webkit-transition:fill-opacity .25s linear;transition:fill-opacity .25s linear}.nvd3 .nv-discretebar .nv-groups text,.nvd3 .nv-multibarHorizontal .nv-groups text{font-weight:700;fill:#000;stroke:#0000}.nvd3 .nv-boxplot circle{fill-opacity:.5}.nvd3 line.nv-boxplot-median{stroke:#000}.nv-boxplot-tick:hover{stroke-width:2.5px}.nvd3.nv-bullet{font:10px sans-serif}.nvd3.nv-bullet .nv-measure{fill-opacity:.8}.nvd3.nv-bullet .nv-marker{stroke:#000;stroke-width:2px}.nvd3.nv-bullet .nv-markerTriangle{stroke:#000;fill:#fff;stroke-width:1.5px}.nvd3.nv-bullet .nv-markerLine{stroke:#000;stroke-width:1.5px}.nvd3.nv-bullet .nv-tick line{stroke:#666;stroke-width:.5px}.nvd3.nv-bullet .nv-range.nv-s0{fill:#eee}.nvd3.nv-bullet .nv-range.nv-s1{fill:#ddd}.nvd3.nv-bullet .nv-range.nv-s2{fill:#ccc}.nvd3.nv-bullet .nv-title{font-size:14px;font-weight:700}.nvd3.nv-bullet .nv-subtitle{fill:#999}.nvd3.nv-bullet .nv-range{fill:#bababa;fill-opacity:.4}.nvd3.nv-bullet .nv-range:hover{fill-opacity:.7}.nvd3.nv-candlestickBar .nv-ticks .nv-tick,.nvd3.nv-ohlcBar .nv-ticks .nv-tick{stroke-width:1px}.nvd3.nv-candlestickBar .nv-ticks .nv-tick.hover,.nvd3.nv-ohlcBar .nv-ticks .nv-tick.hover{stroke-width:2px}.nvd3.nv-candlestickBar .nv-ticks .nv-tick.positive rect,.nvd3.nv-sparklineplus .nv-maxValue{stroke:#2ca02c;fill:#2ca02c}.nvd3.nv-candlestickBar .nv-ticks .nv-tick.negative rect,.nvd3.nv-sparklineplus .nv-minValue{stroke:#d62728;fill:#d62728}.with-transitions .nv-candlestickBar .nv-ticks .nv-tick,.with-transitions .nvd3 .nv-groups .nv-point{-webkit-transition:stroke-width .25s linear,stroke-opacity .25s linear;transition:stroke-width .25s linear,stroke-opacity .25s linear}.nvd3.nv-candlestickBar .nv-ticks line{stroke:#333}.nv-force-node{stroke:#fff;stroke-width:1.5px}.nv-force-link{stroke:#999;stroke-opacity:.6}.nv-force-node text{stroke-width:0}.nvd3 .nv-check-box .nv-box{fill-opacity:0;stroke-width:2}.nvd3 .nv-check-box .nv-check{fill-opacity:0;stroke-width:4}.nvd3 .nv-hoverArea,.nvd3 .nv-series.nv-disabled .nv-check-box .nv-check,.nvd3.nv-line .nvd3.nv-scatter .nv-groups .nv-point,.nvd3.nv-pie .nv-label rect{fill-opacity:0;stroke-opacity:0}.nvd3.nv-linePlusBar .nv-bar rect{fill-opacity:.75}.nvd3 .nv-groups path.nv-line,.nvd3.nv-sparkline path{fill:none}.nvd3 .nv-groups path.nv-area{stroke:none}.nvd3.nv-scatter.nv-single-point .nv-groups .nv-point{fill-opacity:.5!important;stroke-opacity:.5!important}.nvd3 .nv-groups .nv-point.hover,.nvd3.nv-scatter .nv-groups .nv-point.hover{stroke-width:7px;fill-opacity:.95!important;stroke-opacity:.95!important}.nvd3 .nv-point-paths path{stroke:#aaa;stroke-opacity:0;fill:#eee;fill-opacity:0}.nvd3 .nv-indexLine{cursor:ew-resize}svg.nvd3-svg{-webkit-user-select:none;-ms-user-select:none;user-select:none;display:block;width:100%;height:100%}.nvtooltip.with-3d-shadow,.with-3d-shadow .nvtooltip{-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px #0003;border-radius:5px}.nvd3 text{font:12px Arial,sans-serif}.nvtooltip h3,.nvtooltip table td.key{font-weight:400}.nvd3 .title{font:700 14px Arial,sans-serif}.nvd3 .nv-background{fill:#fff;fill-opacity:0}.nvd3.nv-noData{font-size:18px;font-weight:700}.nv-brush .selection{fill-opacity:.125;shape-rendering:crispEdges}.nv-brush .handle path{fill:#eee;stroke:#666}.nvd3 .nv-legend .nv-series{cursor:pointer}.nvd3 .nv-legend .nv-disabled circle{fill-opacity:0}.nvd3 .nv-brush .selection{fill-opacity:0!important}.nvd3 .nv-brushBackground rect{stroke:#000;stroke-width:.4;fill:#fff;fill-opacity:.7}@media print{.nvd3 text{stroke-width:0;fill-opacity:1}}.nvd3.nv-ohlcBar .nv-ticks .nv-tick.positive{stroke:#2ca02c}.nvd3.nv-ohlcBar .nv-ticks .nv-tick.negative{stroke:#d62728}.nvd3 .background path{fill:none;stroke:#eee;stroke-opacity:.4;shape-rendering:crispEdges}.nvd3 .foreground path{fill:none;stroke-opacity:.7}.nvd3 .nv-parallelCoordinates-brush .selection{fill:#fff;fill-opacity:.6;stroke:gray;shape-rendering:crispEdges}.nvd3 .nv-parallelCoordinates .hover{fill-opacity:1;stroke-width:3px}.nvd3 .missingValuesline line{fill:none;stroke:#000;stroke-width:1;stroke-opacity:1;stroke-dasharray:5,5}.nvd3.nv-pie path{stroke-opacity:0;-webkit-transition:fill-opacity .25s linear,stroke-width .25s linear,stroke-opacity .25s linear;transition:fill-opacity .25s linear,stroke-width .25s linear,stroke-opacity .25s linear;stroke:#fff;stroke-width:1px;stroke-opacity:1;fill-opacity:.7}.nvd3.nv-pie .nv-pie-title{font-size:24px;fill:#13c4f996}.nvd3.nv-pie .nv-slice text{stroke:#000;stroke-width:0}.nvd3 .nv-groups .nv-point.hover{stroke-width:20px;stroke-opacity:.5}.nvd3.nv-sparklineplus .nv-hoverValue line{stroke:#333;stroke-width:1.5px}.nvd3.nv-sparklineplus,.nvd3.nv-sparklineplus g{pointer-events:all}.nvd3.nv-sparklineplus .nv-xValue,.nvd3.nv-sparklineplus .nv-yValue{stroke-width:0;font-size:.9em;font-weight:400}.nvd3.nv-sparklineplus .nv-yValue{stroke:#f66}.nvd3.nv-sparklineplus .nv-currentValue{font-weight:700;font-size:1.1em}.nvd3.nv-stackedarea path.nv-area{fill-opacity:.7;stroke-opacity:0;-webkit-transition:fill-opacity .25s linear,stroke-opacity .25s linear;transition:fill-opacity .25s linear,stroke-opacity .25s linear}.nvd3.nv-stackedarea path.nv-area.hover{fill-opacity:.9}.nvd3.nv-stackedarea .nv-groups .nv-point{stroke-opacity:0;fill-opacity:0}.nvtooltip{position:absolute;background-color:#fff;color:#000;padding:1px;border:1px solid rgba(0,0,0,.5);z-index:10000;display:block;font-family:Arial,sans-serif;font-size:13px;text-align:left;white-space:nowrap;-webkit-user-select:none;-ms-user-select:none;user-select:none;background:#fffc;border-radius:4px}.nvtooltip.with-transitions,.with-transitions .nvtooltip{-webkit-transition:opacity 50ms linear .2s;transition:opacity 50ms linear .2s}.nvtooltip.x-nvtooltip,.nvtooltip.y-nvtooltip{padding:8px}.nvtooltip h3{padding:4px 14px;line-height:18px;background-color:#f7f7f7bf;color:#000;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.nvtooltip p{padding:5px 14px}.nvtooltip span{display:inline-block;margin:2px 0}.nvtooltip table{margin:6px;border-spacing:0}.nvtooltip table td{padding:2px 9px 2px 0;vertical-align:middle}.nvtooltip table td.value{text-align:right;font-weight:700}.nvtooltip table td.percent{color:#a9a9a9}.nvtooltip table tr.highlight td{padding:1px 9px 1px 0;border-bottom-style:solid;border-bottom-width:1px;border-top-style:solid;border-top-width:1px}.nvtooltip table td.legend-color-guide div{vertical-align:middle;width:12px;height:12px;border:1px solid #999}.nvtooltip .footer{padding:3px;text-align:center}.nvtooltip-pending-removal{pointer-events:none;display:none}.nvd3 line.nv-guideline{stroke:#ccc}\n"],dependencies:[{kind:"ngmodule",type:t.CommonModule},{kind:"directive",type:c.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"component",type:i.SpinnerComponent,selector:"[wmSpinner]",exportAs:["wmSpinner"]}],encapsulation:d.ViewEncapsulation.None})}}d.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:d,type:le,decorators:[{type:n.Component,args:[{standalone:!0,imports:[t.CommonModule,i.SpinnerComponent],selector:"div[wmChart]",providers:[s.provideAsWidgetRef(le)],encapsulation:n.ViewEncapsulation.None,template:'@if (title) {\n <div class="panel-heading">\n <h3 class="panel-title">\n <div class="pull-left"><i class="app-icon panel-icon {{iconclass}}" [class.ng-hide]="!iconclass"></i></div>\n <div class="heading" [innerHTML]="title"></div>\n @if (subheading) {\n <div class="description" [innerHTML]="subheading"></div>\n }\n </h3>\n </div>\n}\n<div class="app-chart-inner" [ngClass]="{\'loading\':isLoadInProgress, \'panel-body\': title}">\n <svg></svg>\n @if (showContentLoadError && showNoDataMsg) {\n <div class="wm-content-info readonly-wrapper">\n <p class="wm-message" [title]="hintMsg" [ngClass]="{\'error\': invalidConfig}" [innerText]="errMsg"></p>\n </div>\n }\n <div wmSpinner show.bind="isLoadInProgress" caption.bind="loadingdatamsg"></div>\n</div>\n',styles:[".nvtooltip h3,.nvtooltip p{margin:0;text-align:center}.nv-distx,.nv-disty,.nv-noninteractive,.nvd3 .nv-axis,.nvd3 .nv-interactiveGuideLine,.nvd3.nv-pie .nv-label,.nvd3.nv-sparklineplus g.nv-hoverValue,.nvtooltip{pointer-events:none}.nvd3 .nv-axis{opacity:1}.nvd3 .nv-axis path{fill:none;stroke:#000;stroke-opacity:.75;shape-rendering:crispEdges}.nvd3 .nv-axis .zero line,.nvd3 .nv-axis line.zero,.nvd3 .nv-axis path.domain{stroke-opacity:.75}.nvd3 .nv-axis.nv-x path.domain{stroke-opacity:0}.nvd3 .nv-axis line{fill:none;stroke:#e5e5e5;shape-rendering:crispEdges}.nvd3 .nv-axis .nv-axisMaxMin text,.nvtooltip table td.key.total{font-weight:700}.nvd3 .x .nv-axis .nv-axisMaxMin text,.nvd3 .x2 .nv-axis .nv-axisMaxMin text,.nvd3 .x3 .nv-axis .nv-axisMaxMin text{text-anchor:middle}.nvd3 .nv-axis.nv-disabled,.nvd3 .nv-controlsWrap .nv-legend .nv-check-box .nv-check{opacity:0}.nvd3 .nv-bars rect{fill-opacity:.75;-webkit-transition:fill-opacity .25s linear;transition:fill-opacity .25s linear}.nvd3 .nv-bars rect.hover,.nvd3 .nv-boxplot circle:hover,.nvd3 .nv-boxplot rect:hover,.nvd3 .nv-candlestickBar .nv-ticks rect:hover,.nvd3 .nv-discretebar .nv-groups rect:hover,.nvd3 .nv-multibar .nv-groups rect:hover,.nvd3 .nv-multibarHorizontal .nv-groups rect:hover,.nvd3 .nv-scatter .nv-point.hover,.nvd3.nv-bullet .nv-measure:hover,.nvd3.nv-linePlusBar .nv-bar rect:hover,.nvd3.nv-pie .hover path{fill-opacity:1}.nvd3 .nv-bars .hover rect{fill:#add8e6}.nvd3 .nv-bars text{fill:#0000}.nvd3 .nv-bars .hover text{fill:#000}.nvd3 .nv-discretebar .nv-groups rect,.nvd3 .nv-multibar .nv-groups rect,.nvd3 .nv-multibarHorizontal .nv-groups rect{stroke-opacity:0;-webkit-transition:fill-opacity .25s linear;transition:fill-opacity .25s linear}.nvd3 .nv-discretebar .nv-groups text,.nvd3 .nv-multibarHorizontal .nv-groups text{font-weight:700;fill:#000;stroke:#0000}.nvd3 .nv-boxplot circle{fill-opacity:.5}.nvd3 line.nv-boxplot-median{stroke:#000}.nv-boxplot-tick:hover{stroke-width:2.5px}.nvd3.nv-bullet{font:10px sans-serif}.nvd3.nv-bullet .nv-measure{fill-opacity:.8}.nvd3.nv-bullet .nv-marker{stroke:#000;stroke-width:2px}.nvd3.nv-bullet .nv-markerTriangle{stroke:#000;fill:#fff;stroke-width:1.5px}.nvd3.nv-bullet .nv-markerLine{stroke:#000;stroke-width:1.5px}.nvd3.nv-bullet .nv-tick line{stroke:#666;stroke-width:.5px}.nvd3.nv-bullet .nv-range.nv-s0{fill:#eee}.nvd3.nv-bullet .nv-range.nv-s1{fill:#ddd}.nvd3.nv-bullet .nv-range.nv-s2{fill:#ccc}.nvd3.nv-bullet .nv-title{font-size:14px;font-weight:700}.nvd3.nv-bullet .nv-subtitle{fill:#999}.nvd3.nv-bullet .nv-range{fill:#bababa;fill-opacity:.4}.nvd3.nv-bullet .nv-range:hover{fill-opacity:.7}.nvd3.nv-candlestickBar .nv-ticks .nv-tick,.nvd3.nv-ohlcBar .nv-ticks .nv-tick{stroke-width:1px}.nvd3.nv-candlestickBar .nv-ticks .nv-tick.hover,.nvd3.nv-ohlcBar .nv-ticks .nv-tick.hover{stroke-width:2px}.nvd3.nv-candlestickBar .nv-ticks .nv-tick.positive rect,.nvd3.nv-sparklineplus .nv-maxValue{stroke:#2ca02c;fill:#2ca02c}.nvd3.nv-candlestickBar .nv-ticks .nv-tick.negative rect,.nvd3.nv-sparklineplus .nv-minValue{stroke:#d62728;fill:#d62728}.with-transitions .nv-candlestickBar .nv-ticks .nv-tick,.with-transitions .nvd3 .nv-groups .nv-point{-webkit-transition:stroke-width .25s linear,stroke-opacity .25s linear;transition:stroke-width .25s linear,stroke-opacity .25s linear}.nvd3.nv-candlestickBar .nv-ticks line{stroke:#333}.nv-force-node{stroke:#fff;stroke-width:1.5px}.nv-force-link{stroke:#999;stroke-opacity:.6}.nv-force-node text{stroke-width:0}.nvd3 .nv-check-box .nv-box{fill-opacity:0;stroke-width:2}.nvd3 .nv-check-box .nv-check{fill-opacity:0;stroke-width:4}.nvd3 .nv-hoverArea,.nvd3 .nv-series.nv-disabled .nv-check-box .nv-check,.nvd3.nv-line .nvd3.nv-scatter .nv-groups .nv-point,.nvd3.nv-pie .nv-label rect{fill-opacity:0;stroke-opacity:0}.nvd3.nv-linePlusBar .nv-bar rect{fill-opacity:.75}.nvd3 .nv-groups path.nv-line,.nvd3.nv-sparkline path{fill:none}.nvd3 .nv-groups path.nv-area{stroke:none}.nvd3.nv-scatter.nv-single-point .nv-groups .nv-point{fill-opacity:.5!important;stroke-opacity:.5!important}.nvd3 .nv-groups .nv-point.hover,.nvd3.nv-scatter .nv-groups .nv-point.hover{stroke-width:7px;fill-opacity:.95!important;stroke-opacity:.95!important}.nvd3 .nv-point-paths path{stroke:#aaa;stroke-opacity:0;fill:#eee;fill-opacity:0}.nvd3 .nv-indexLine{cursor:ew-resize}svg.nvd3-svg{-webkit-user-select:none;-ms-user-select:none;user-select:none;display:block;width:100%;height:100%}.nvtooltip.with-3d-shadow,.with-3d-shadow .nvtooltip{-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px #0003;border-radius:5px}.nvd3 text{font:12px Arial,sans-serif}.nvtooltip h3,.nvtooltip table td.key{font-weight:400}.nvd3 .title{font:700 14px Arial,sans-serif}.nvd3 .nv-background{fill:#fff;fill-opacity:0}.nvd3.nv-noData{font-size:18px;font-weight:700}.nv-brush .selection{fill-opacity:.125;shape-rendering:crispEdges}.nv-brush .handle path{fill:#eee;stroke:#666}.nvd3 .nv-legend .nv-series{cursor:pointer}.nvd3 .nv-legend .nv-disabled circle{fill-opacity:0}.nvd3 .nv-brush .selection{fill-opacity:0!important}.nvd3 .nv-brushBackground rect{stroke:#000;stroke-width:.4;fill:#fff;fill-opacity:.7}@media print{.nvd3 text{stroke-width:0;fill-opacity:1}}.nvd3.nv-ohlcBar .nv-ticks .nv-tick.positive{stroke:#2ca02c}.nvd3.nv-ohlcBar .nv-ticks .nv-tick.negative{stroke:#d62728}.nvd3 .background path{fill:none;stroke:#eee;stroke-opacity:.4;shape-rendering:crispEdges}.nvd3 .foreground path{fill:none;stroke-opacity:.7}.nvd3 .nv-parallelCoordinates-brush .selection{fill:#fff;fill-opacity:.6;stroke:gray;shape-rendering:crispEdges}.nvd3 .nv-parallelCoordinates .hover{fill-opacity:1;stroke-width:3px}.nvd3 .missingValuesline line{fill:none;stroke:#000;stroke-width:1;stroke-opacity:1;stroke-dasharray:5,5}.nvd3.nv-pie path{stroke-opacity:0;-webkit-transition:fill-opacity .25s linear,stroke-width .25s linear,stroke-opacity .25s linear;transition:fill-opacity .25s linear,stroke-width .25s linear,stroke-opacity .25s linear;stroke:#fff;stroke-width:1px;stroke-opacity:1;fill-opacity:.7}.nvd3.nv-pie .nv-pie-title{font-size:24px;fill:#13c4f996}.nvd3.nv-pie .nv-slice text{stroke:#000;stroke-width:0}.nvd3 .nv-groups .nv-point.hover{stroke-width:20px;stroke-opacity:.5}.nvd3.nv-sparklineplus .nv-hoverValue line{stroke:#333;stroke-width:1.5px}.nvd3.nv-sparklineplus,.nvd3.nv-sparklineplus g{pointer-events:all}.nvd3.nv-sparklineplus .nv-xValue,.nvd3.nv-sparklineplus .nv-yValue{stroke-width:0;font-size:.9em;font-weight:400}.nvd3.nv-sparklineplus .nv-yValue{stroke:#f66}.nvd3.nv-sparklineplus .nv-currentValue{font-weight:700;font-size:1.1em}.nvd3.nv-stackedarea path.nv-area{fill-opacity:.7;stroke-opacity:0;-webkit-transition:fill-opacity .25s linear,stroke-opacity .25s linear;transition:fill-opacity .25s linear,stroke-opacity .25s linear}.nvd3.nv-stackedarea path.nv-area.hover{fill-opacity:.9}.nvd3.nv-stackedarea .nv-groups .nv-point{stroke-opacity:0;fill-opacity:0}.nvtooltip{position:absolute;background-color:#fff;color:#000;padding:1px;border:1px solid rgba(0,0,0,.5);z-index:10000;display:block;font-family:Arial,sans-serif;font-size:13px;text-align:left;white-space:nowrap;-webkit-user-select:none;-ms-user-select:none;user-select:none;background:#fffc;border-radius:4px}.nvtooltip.with-transitions,.with-transitions .nvtooltip{-webkit-transition:opacity 50ms linear .2s;transition:opacity 50ms linear .2s}.nvtooltip.x-nvtooltip,.nvtooltip.y-nvtooltip{padding:8px}.nvtooltip h3{padding:4px 14px;line-height:18px;background-color:#f7f7f7bf;color:#000;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.nvtooltip p{padding:5px 14px}.nvtooltip span{display:inline-block;margin:2px 0}.nvtooltip table{margin:6px;border-spacing:0}.nvtooltip table td{padding:2px 9px 2px 0;vertical-align:middle}.nvtooltip table td.value{text-align:right;font-weight:700}.nvtooltip table td.percent{color:#a9a9a9}.nvtooltip table tr.highlight td{padding:1px 9px 1px 0;border-bottom-style:solid;border-bottom-width:1px;border-top-style:solid;border-top-width:1px}.nvtooltip table td.legend-color-guide div{vertical-align:middle;width:12px;height:12px;border:1px solid #999}.nvtooltip .footer{padding:3px;text-align:center}.nvtooltip-pending-removal{pointer-events:none;display:none}.nvd3 line.nv-guideline{stroke:#ccc}\n"]}]}],ctorParameters:()=>[{type:d.Injector},{type:p.App},{type:void 0,decorators:[{type:n.Inject,args:["EXPLICIT_CONTEXT"]},{type:n.Optional}]}],propDecorators:{title:[{type:n.HostBinding,args:["class.panel"]}]}}),e.ChartComponent=le}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common"),require("@wm/components/input/button"),require("@angular/core"),require("@wm/core"),require("@wm/components/base"),require("@wm/components/basic/anchor"),require("@angular/router"),require("lodash-es"),require("ngx-bootstrap/dropdown")):"function"==typeof define&&define.amd?define(["exports","@angular/common","@wm/components/input/button","@angular/core","@wm/core","@wm/components/base","@wm/components/basic/anchor","@angular/router","lodash-es","ngx-bootstrap/dropdown"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.navigation=e.wm.components.navigation||{},e.wm.components.navigation.menu={}),e.ng.common,e.wm.components.input.button,e.ng.core,e.wm.core,e.wm.components.base,e.wm.components.basic.anchor,e.ng.router,e._,e.ngxBootstrap.dropdown)}(this,function(e,t,i,n,a,s,o,r,l,c){"use strict";function d(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var p=d(t),m=d(n),h=d(a),u=d(r),g=d(c);const v=e=>{e.preventDefault()};class f{set wmNavigationControl(e){this._link=e,this.boundContextMenuHandler&&(this.nativeElement.removeEventListener("contextmenu",this.boundContextMenuHandler),this.boundContextMenuHandler=null),e&&!this.disableMenuContext?a.setAttr(this.nativeElement,"href",e):(a.setAttr(this.nativeElement,"href","javascript:void(0)"),this.boundContextMenuHandler=v,this.nativeElement.addEventListener("contextmenu",this.boundContextMenuHandler))}constructor(e){this.nativeElement=e.nativeElement}ngOnDestroy(){this.boundContextMenuHandler&&(this.nativeElement.removeEventListener("contextmenu",this.boundContextMenuHandler),this.boundContextMenuHandler=null)}static{this.\u0275fac=m.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:m,type:f,deps:[{token:m.ElementRef}],target:m.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=m.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:f,isStandalone:!0,selector:"[wmNavigationControl]",inputs:{disableMenuContext:"disableMenuContext",wmNavigationControl:"wmNavigationControl"},ngImport:m})}}m.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:m,type:f,decorators:[{type:n.Directive,args:[{standalone:!0,selector:"[wmNavigationControl]"}]}],ctorParameters:()=>[{type:m.ElementRef}],propDecorators:{disableMenuContext:[{type:n.Input}],wmNavigationControl:[{type:n.Input}]}});const b={widgetType:"wm-nav-item",hostClass:"app-nav-item"};class y extends s.StylableComponent{static{this.initializeProps=void s.register("wm-nav-item",new Map([["class",s.PROP_STRING],["name",s.PROP_STRING],["show",{value:!0,...s.PROP_BOOLEAN}]]))}makeActive(){const e=this.nativeElement.parentNode;$(e).find("> li.active").removeClass("active"),this.isAttached&&a.addClass(this.nativeElement,"active")}constructor(e,t){super(e,b,t),s.styler(this.nativeElement,this,s.APPLY_STYLES_TYPE.CONTAINER)}ngAfterViewInit(){this.innerLink&&this.innerLink.onActive(()=>this.makeActive())}ngOnDetach(){a.removeClass(this.nativeElement,"active",!0),super.ngOnDetach()}ngOnDestroy(){this.innerLink=null,super.ngOnDestroy()}static{this.\u0275fac=m.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:m,type:y,deps:[{token:m.Injector},{token:"EXPLICIT_CONTEXT",optional:!0}],target:m.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=m.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:y,isStandalone:!0,selector:"[wmNavItem]",host:{listeners:{click:"makeActive()","keydown.enter":"makeActive()"}},providers:[s.provideAsWidgetRef(y)],queries:[{propertyName:"innerLink",first:!0,predicate:o.AnchorComponent,descendants:!0}],exportAs:["navItemRef"],usesInheritance:!0,ngImport:m})}}m.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:m,type:y,decorators:[{type:n.Directive,args:[{standalone:!0,selector:"[wmNavItem]",exportAs:"navItemRef",providers:[s.provideAsWidgetRef(y)]}]}],ctorParameters:()=>[{type:m.Injector},{type:void 0,decorators:[{type:n.Inject,args:["EXPLICIT_CONTEXT"]},{type:n.Optional}]}],propDecorators:{innerLink:[{type:n.ContentChild,args:[o.AnchorComponent]}],makeActive:[{type:n.HostListener,args:["click"]},{type:n.HostListener,args:["keydown.enter"]}]}});const w={widgetType:"wm-nav",hostClass:"nav app-nav"},P={pills:"nav-pills",tabs:"nav-tabs",navbar:"navbar-nav"};class C extends s.DatasetAwareNavComponent{static{this.initializeProps=void s.register("wm-nav",new Map([["autoclose",{value:"always",...s.PROP_STRING}],["autoopen",{value:"never",...s.PROP_STRING}],["class",s.PROP_STRING],["dataset",s.PROP_ANY],["iconposition",{value:"left",...s.PROP_STRING}],["isactive",s.PROP_STRING],["itemlabel",s.PROP_STRING],["itemhint",s.PROP_STRING],["itemlink",s.PROP_STRING],["itemicon",s.PROP_STRING],["itemclass",s.PROP_STRING],["itemchildren",s.PROP_STRING],["itemaction",s.PROP_STRING],["itembadge",s.PROP_STRING],["itemtarget",s.PROP_STRING],["layout",s.PROP_STRING],["name",s.PROP_STRING],["orderby",s.PROP_STRING],["show",{value:!0,...s.PROP_BOOLEAN}],["showonhover",{value:!1,...s.PROP_BOOLEAN}],["type",s.PROP_STRING],["userrole",s.PROP_STRING]]))}get activePageName(){return this.app.activePageName}constructor(e,t,i,n,o,r,c){super(e,w,c),this.cdRef=t,this.route=i,this.userDefinedExecutionContext=n,this.app=o,s.styler(this.nativeElement,this,s.APPLY_STYLES_TYPE.CONTAINER),this.disableMenuContext=!!r,this.pageScope=this.viewParent;const d=this.nodes$.subscribe(()=>{if(!l.isEmpty(this.nodes)){let e=!1;const t=(i,n)=>{l.forEach(i,i=>{if(!e)return i.isactive?(e=!0,this.selecteditem=n?l.omit(i,["children","value"]):i.value,this.invokeEventCallback("select",{$event:{},$item:i.value}),a.triggerItemAction(this,i),n||(i._selected=!0),!1):void(l.isEmpty(i.children)||t(i.children,"menu"))})};t(this.nodes)}});this.registerDestroyListener(()=>d.unsubscribe())}setNavType(e){a.addClass(this.nativeElement,P[e])}setNavLayout(e){a.addClass(this.nativeElement,`nav-${e}`)}onNavSelect(e,t){e.preventDefault();const i=l.find(this.nodes,"_selected");i&&delete i._selected,this.selecteditem=t.value,this.invokeEventCallback("select",{$event:e,$item:t.value}),a.triggerItemAction(this,t)}ngOnInit(){super.ngOnInit(),this.setNavType(this.type),this.setNavLayout(this.layout)}onMenuItemSelect(e,t,i){this.selecteditem=l.omit(i,["children","value"]),this.invokeEventCallback("select",{$event:e,$item:this.selecteditem})}ngOnDestroy(){this.selecteditem=null,this.pageScope=null,this.itemActionFn=null,super.ngOnDestroy()}static{this.\u0275fac=m.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:m,type:C,deps:[{token:m.Injector},{token:m.ChangeDetectorRef},{token:u.Router},{token:h.UserDefinedExecutionContext},{token:h.App},{token:"select.event",attribute:!0},{token:"EXPLICIT_CONTEXT",optional:!0}],target:m.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=m.\u0275\u0275ngDeclareComponent({minVersion:"17.0.0",version:"20.3.19",type:C,isStandalone:!0,selector:"[wmNav]",providers:[s.provideAsWidgetRef(C)],usesInheritance:!0,ngImport:m,template:'<ng-template #menuRef let-item="item" let-index="index">\n <div wmMenu dropdown\n type="anchor"\n autoclose.bind="autoclose"\n iconclass.bind="item.icon"\n autoopen.bind="autoopen"\n caption.bind="item.label"\n hint.bind="item.hint"\n dataset.bind="item.children"\n badgevalue.bind="item.badge"\n iconposition.bind="iconposition"\n showonhover.bind="showonhover"\n select.event="onMenuItemSelect($event, widget, $item)"></div>\n</ng-template>\n\n<ng-template #anchorRef let-item="item" let-index="index" let-liRef="liRef">\n <a wmAnchor\n [disableMenuContext]="disableMenuContext || !!item.action"\n [wmNavigationControl]="item.link"\n [attr.aria-current]="item._selected || (!isactive && item.link === \'#/\' + activePageName) ? \'page\' : \'\'"\n caption.bind="item.label"\n hint.bind="item.hint"\n iconclass.bind="item.icon"\n badgevalue.bind="item.badge"\n iconposition.bind="iconposition"\n click.event="onNavSelect($event, item)"></a>\n</ng-template>\n\n@for (item of nodes; track item; let index = $index) {\n <li #liRef="navItemRef"\n [ngClass]="{active: item._selected || (!isactive && item.link === \'#/\' + activePageName)}"\n class="app-nav-item {{item.class}}"\n wmNavItem>\n @if (!item.children.length) {\n <ng-container [ngTemplateOutlet]="anchorRef"\n [ngTemplateOutletContext]="{item: item, index:index, liRef: liRef}"\n [ngTemplateOutletInjector]="createCustomInjector(\'anchor_\' + liRef.trackId, {item: item, index:index, liRef: liRef})"\n ></ng-container>\n }\n @if (item.children.length) {\n <ng-container [ngTemplateOutlet]="menuRef"\n [ngTemplateOutletContext]="{item: item, index:index}"\n [ngTemplateOutletInjector]="createCustomInjector(\'menu_\' + liRef.trackId, {item: item, index:index})"\n ></ng-container>\n }\n </li>\n}\n\n@if (!nodes.length) {\n <ng-content select="[wmNavItem]"></ng-content>\n}\n',dependencies:[{kind:"ngmodule",type:m.forwardRef(()=>t.CommonModule)},{kind:"directive",type:m.forwardRef(()=>p.NgClass),selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"directive",type:m.forwardRef(()=>p.NgTemplateOutlet),selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]},{kind:"ngmodule",type:m.forwardRef(()=>c.BsDropdownModule)},{kind:"directive",type:m.forwardRef(()=>g.BsDropdownDirective),selector:"[bsDropdown], [dropdown]",inputs:["placement","triggers","container","dropup","autoClose","isAnimated","insideClick","isDisabled","isOpen"],outputs:["isOpenChange","onShown","onHidden"],exportAs:["bs-dropdown"]},{kind:"component",type:m.forwardRef(()=>o.AnchorComponent),selector:"a[wmAnchor]",exportAs:["wmAnchor"]},{kind:"component",type:m.forwardRef(()=>W),selector:"[wmMenu]"},{kind:"directive",type:m.forwardRef(()=>y),selector:"[wmNavItem]",exportAs:["navItemRef"]}]})}}m.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:m,type:C,decorators:[{type:n.Component,args:[{standalone:!0,imports:[t.CommonModule,c.BsDropdownModule,o.AnchorComponent,n.forwardRef(()=>W),y],selector:"[wmNav]",providers:[s.provideAsWidgetRef(C)],template:'<ng-template #menuRef let-item="item" let-index="index">\n <div wmMenu dropdown\n type="anchor"\n autoclose.bind="autoclose"\n iconclass.bind="item.icon"\n autoopen.bind="autoopen"\n caption.bind="item.label"\n hint.bind="item.hint"\n dataset.bind="item.children"\n badgevalue.bind="item.badge"\n iconposition.bind="iconposition"\n showonhover.bind="showonhover"\n select.event="onMenuItemSelect($event, widget, $item)"></div>\n</ng-template>\n\n<ng-template #anchorRef let-item="item" let-index="index" let-liRef="liRef">\n <a wmAnchor\n [disableMenuContext]="disableMenuContext || !!item.action"\n [wmNavigationControl]="item.link"\n [attr.aria-current]="item._selected || (!isactive && item.link === \'#/\' + activePageName) ? \'page\' : \'\'"\n caption.bind="item.label"\n hint.bind="item.hint"\n iconclass.bind="item.icon"\n badgevalue.bind="item.badge"\n iconposition.bind="iconposition"\n click.event="onNavSelect($event, item)"></a>\n</ng-template>\n\n@for (item of nodes; track item; let index = $index) {\n <li #liRef="navItemRef"\n [ngClass]="{active: item._selected || (!isactive && item.link === \'#/\' + activePageName)}"\n class="app-nav-item {{item.class}}"\n wmNavItem>\n @if (!item.children.length) {\n <ng-container [ngTemplateOutlet]="anchorRef"\n [ngTemplateOutletContext]="{item: item, index:index, liRef: liRef}"\n [ngTemplateOutletInjector]="createCustomInjector(\'anchor_\' + liRef.trackId, {item: item, index:index, liRef: liRef})"\n ></ng-container>\n }\n @if (item.children.length) {\n <ng-container [ngTemplateOutlet]="menuRef"\n [ngTemplateOutletContext]="{item: item, index:index}"\n [ngTemplateOutletInjector]="createCustomInjector(\'menu_\' + liRef.trackId, {item: item, index:index})"\n ></ng-container>\n }\n </li>\n}\n\n@if (!nodes.length) {\n <ng-content select="[wmNavItem]"></ng-content>\n}\n'}]}],ctorParameters:()=>[{type:m.Injector},{type:m.ChangeDetectorRef},{type:u.Router},{type:h.UserDefinedExecutionContext},{type:h.App},{type:void 0,decorators:[{type:n.Attribute,args:["select.event"]}]},{type:void 0,decorators:[{type:n.Inject,args:["EXPLICIT_CONTEXT"]},{type:n.Optional}]}]});const T={"pull-right":"fa-caret-left","dropinline-menu":"fa-caret-down","pull-left":"fa-caret-right"},O="horizontal";class I{constructor(e,t,i,s){this.app=e,this.userDefinedExecutionContext=t,this.parentNav=i,this.menuRef=n.inject(W),this.onSelect=(e,t)=>{if(this.nativeElement!==$(e.target).closest(".app-menu-item").get(0))return;"outsideClick"===this.menuRef.autoclose&&e.stopPropagation(),e.preventDefault();const i={$event:e,$item:t};this.menuRef.onMenuItemSelect(i);const n=l.clone(t);n.target=n.target||this.menuRef.linktarget,a.triggerItemAction(this,n)},this.nativeElement=s.nativeElement,a.addClass(this.nativeElement,"app-menu-item"),this.menualign=T[this.menuRef.menualign]||T["pull-left"]}ngOnInit(){this.parentNav&&(s.hasLinkToCurrentPage([this.item],this.menuRef.route.url)&&a.addClass(this.nativeElement,"active"),this.highlightActiveLinkSubscription=this.app.subscribe("highlightActiveLink",e=>{a.toggleClass(this.nativeElement,"active",s.hasLinkToCurrentPage([this.item],this.menuRef.route.url))}))}getInitialKeyMovements(){const e=l.clone(R);return this.menuRef.menulayout===O?(e.MOVE_UP="LEFT-ARROW",e.MOVE_LEFT="UP-ARROW",e.MOVE_RIGHT="DOWN-ARROW",e.MOVE_DOWN="RIGHT-ARROW"):this.menuRef.menuposition===S.DOWN_LEFT||this.menuRef.menuposition===S.UP_LEFT?(e.MOVE_LEFT="RIGHT-ARROW",e.MOVE_RIGHT="LEFT-ARROW"):"inline"===this.menuRef.menuposition&&(e.MOVE_UP="LEFT-ARROW",e.MOVE_LEFT="UP-ARROW",e.MOVE_RIGHT="DOWN-ARROW",e.MOVE_DOWN="RIGHT-ARROW"),e}onKeyDown(e,t){const i=$(this.nativeElement),n=$(this.nativeElement).closest("ul.dropdown-menu"),a=this.menuRef.$element.find("> ul.dropdown-menu"),s=this.getInitialKeyMovements();if(l.includes(["LEFT-ARROW","RIGHT-ARROW","UP-ARROW","DOWN-ARROW"],t)&&e.preventDefault(),t===s.ON_TAB&&a.children().last()[0]===this.nativeElement||t===s.ON_SHIFT_TAB&&a.children().first()[0]===this.nativeElement||t===s.ON_ESCAPE)e.preventDefault(),this.menuRef.bsDropdown.hide();else if(t===s.ON_ENTER&&!this.item.link||t===s.MOVE_RIGHT)e.stopPropagation(),this.item.children.length?(i.toggleClass("open"),i.find("li").first().find("> a").focus()):i.find("> a").focus();else if(t===s.MOVE_LEFT||t===s.ON_TAB&&n.children().last()[0]===this.nativeElement||t===s.ON_SHIFT_TAB&&n.children().first()[0]===this.nativeElement){if(a[0]!==n[0]){const t=n.parent();t.toggleClass("open").find("li.open").removeClass("open"),t.find("> a").focus(),e.preventDefault(),e.stopPropagation()}}else t===s.MOVE_UP?a[0]===n[0]&&a.find("> li").first()[0]===this.nativeElement||(e.stopPropagation(),i.prev().find("> a").focus()):t===s.MOVE_DOWN?(e.stopPropagation(),a.find("> li").last()[0]===this.nativeElement&&(this.menuRef.menulayout!==O&&this.menuRef.menuposition===S.UP_RIGHT||this.menuRef.menuposition===S.UP_LEFT)?this.menuRef.bsDropdown.hide():i.next().find("> a").focus()):t===s.ON_ENTER?this.onSelect(e,this.item):e.stopPropagation()}ngOnDestroy(){this.highlightActiveLinkSubscription&&this.highlightActiveLinkSubscription()}static{this.\u0275fac=m.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:m,type:I,deps:[{token:h.App},{token:h.UserDefinedExecutionContext},{token:C,optional:!0},{token:m.ElementRef}],target:m.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=m.\u0275\u0275ngDeclareComponent({minVersion:"17.0.0",version:"20.3.19",type:I,isStandalone:!0,selector:"li[wmMenuDropdownItem]",inputs:{item:"item"},host:{listeners:{"keydown.tab":'onKeyDown($event,"TAB")',"keydown.shift.tab":'onKeyDown($event,"SHIFT-TAB")',"keydown.escape":'onKeyDown($event,"ESC")',"keydown.enter":'onKeyDown($event,"ENTER")',"keydown.arrowup":'onKeyDown($event,"UP-ARROW")',"keydown.arrowdown":'onKeyDown($event,"DOWN-ARROW")',"keydown.arrowright":'onKeyDown($event,"RIGHT-ARROW")',"keydown.arrowleft":'onKeyDown($event,"LEFT-ARROW")',click:"onSelect($event,item)"}},ngImport:m,template:'<a href="javascript:void(0);" [title]="item.label" [wmNavigationControl]="item.link" [disableMenuContext]="menuRef.disableMenuContext || !!item.action">\n @if (item.children.length) {\n <span class="pull-right fa caret {{menualign}}"></span>\n }\n <i class="app-icon {{item.icon}}"></i>\n <span class="anchor-caption">{{item.label}}</span>\n @if (item.badge) {\n <span class="badge pull-right" [textContent]="item.badge"></span>\n }\n</a>\n@if (item.children.length) {\n <ul wmMenuDropdown [items]="item.children"></ul>\n}',dependencies:[{kind:"directive",type:m.forwardRef(()=>s.TextContentDirective),selector:"[textContent]",inputs:["textContent"]},{kind:"component",type:m.forwardRef(()=>E),selector:"ul[wmMenuDropdown]",inputs:["items"]},{kind:"directive",type:m.forwardRef(()=>f),selector:"[wmNavigationControl]",inputs:["disableMenuContext","wmNavigationControl"]}]})}}m.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:m,type:I,decorators:[{type:n.Component,args:[{standalone:!0,imports:[s.TextContentDirective,n.forwardRef(()=>E),f],selector:"li[wmMenuDropdownItem]",template:'<a href="javascript:void(0);" [title]="item.label" [wmNavigationControl]="item.link" [disableMenuContext]="menuRef.disableMenuContext || !!item.action">\n @if (item.children.length) {\n <span class="pull-right fa caret {{menualign}}"></span>\n }\n <i class="app-icon {{item.icon}}"></i>\n <span class="anchor-caption">{{item.label}}</span>\n @if (item.badge) {\n <span class="badge pull-right" [textContent]="item.badge"></span>\n }\n</a>\n@if (item.children.length) {\n <ul wmMenuDropdown [items]="item.children"></ul>\n}'}]}],ctorParameters:()=>[{type:h.App},{type:h.UserDefinedExecutionContext},{type:C,decorators:[{type:n.Optional}]},{type:m.ElementRef}],propDecorators:{item:[{type:n.Input}],onKeyDown:[{type:n.HostListener,args:["keydown.tab",["$event",'"TAB"']]},{type:n.HostListener,args:["keydown.shift.tab",["$event",'"SHIFT-TAB"']]},{type:n.HostListener,args:["keydown.escape",["$event",'"ESC"']]},{type:n.HostListener,args:["keydown.enter",["$event",'"ENTER"']]},{type:n.HostListener,args:["keydown.arrowup",["$event",'"UP-ARROW"']]},{type:n.HostListener,args:["keydown.arrowdown",["$event",'"DOWN-ARROW"']]},{type:n.HostListener,args:["keydown.arrowright",["$event",'"RIGHT-ARROW"']]},{type:n.HostListener,args:["keydown.arrowleft",["$event",'"LEFT-ARROW"']]}],onSelect:[{type:n.HostListener,args:["click",["$event","item"]]}]}});const D={scale:{name:"wmScaleInLeft","down,right":"wmScaleInLeft","down,left":"wmScaleInRight","up,right":"wmScaleInTopLeft","up,left":"wmScaleInTopRight"},fade:{name:"fadeIn","down,right":"fadeIn","down,left":"fadeIn","up,right":"fadeIn","up,left":"fadeIn"},slide:{name:"wmSlideInDown","down,right":"wmSlideInDown","down,left":"wmSlideInDown","up,right":"wmSlideInUp","up,left":"wmSlideInUp"}};class E{constructor(e){this.menuRef=n.inject(W),this.nativeElement=e.nativeElement,this.hasExecutedCallback=!1,a.addClass(this.nativeElement,"dropdown-menu")}ngAfterViewInit(){const e=this.menuRef.animateitems;let t="";e&&(t=`animated ${D[e][this.menuRef.menuposition]||D[e].name}`),a.addClass(this.nativeElement,`dropdown-menu ${this.menuRef.menualign} ${t}`,!0),this.getParentWidget()}getParentWidget(){const e=$(this.menuRef.nativeElement).closest("table, ul.list-group");e&&$(e).has(this.menuRef.nativeElement).length>0&&this.createObserver(this,this.callback)}callback(e,t){if(!this.hasExecutedCallback){const t=this,i=this.menuRef.menuposition?.split(",")||[];e.forEach(e=>{if(e.isIntersecting)i[0]="down",t.menuRef.menuposition=i.length>1?i.join():"down,right",t.nativeElement.parentElement?.classList.add("dropdown"),t.menuRef.setMenuPosition();else{i[0]="up",t.menuRef.menuposition=i.length>1?i.join():"up,right",t.nativeElement.parentElement?.classList.add("dropup"),t.menuRef.setMenuPosition();const e=t.nativeElement.parentElement?.parentElement;"BS-DROPDOWN-CONTAINER"===e.tagName.toUpperCase()&&t.nativeElement.parentElement?.parentElement?.classList.add("parent-position")}}),this.hasExecutedCallback=!0}}createObserver(e,t){new IntersectionObserver(t.bind(this),{root:null,threshold:1,once:!0}).observe(e.nativeElement)}static{this.\u0275fac=m.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:m,type:E,deps:[{token:m.ElementRef}],target:m.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=m.\u0275\u0275ngDeclareComponent({minVersion:"17.0.0",version:"20.3.19",type:E,isStandalone:!0,selector:"ul[wmMenuDropdown]",inputs:{items:"items"},ngImport:m,template:'@for (item of items; track item) {\n <li wmMenuDropdownItem\n [item]="item"\n [ngClass]="{disabled: item.disabled, \'dropdown-submenu\': item.children.length > 0}"\n class="{{item.class}}"\n role="menuitem">\n </li>\n}\n',dependencies:[{kind:"ngmodule",type:t.CommonModule},{kind:"directive",type:p.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"component",type:I,selector:"li[wmMenuDropdownItem]",inputs:["item"]}]})}}m.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:m,type:E,decorators:[{type:n.Component,args:[{standalone:!0,imports:[t.CommonModule,I],selector:"ul[wmMenuDropdown]",template:'@for (item of items; track item) {\n <li wmMenuDropdownItem\n [item]="item"\n [ngClass]="{disabled: item.disabled, \'dropdown-submenu\': item.children.length > 0}"\n class="{{item.class}}"\n role="menuitem">\n </li>\n}\n'}]}],ctorParameters:()=>[{type:m.ElementRef}],propDecorators:{items:[{type:n.Input}]}});const R={MOVE_UP:"UP-ARROW",MOVE_LEFT:"LEFT-ARROW",MOVE_RIGHT:"RIGHT-ARROW",MOVE_DOWN:"DOWN-ARROW",ON_ENTER:"ENTER",ON_MOUSE_ENTER:"MOUSE-ENTER",ON_MOUSE_LEAVE:"MOUSE-LEAVE",ON_TAB:"TAB",ON_SHIFT_TAB:"SHIFT-TAB",ON_ESCAPE:"ESC"},S={UP_LEFT:"up,left",UP_RIGHT:"up,right",DOWN_LEFT:"down,left",DOWN_RIGHT:"down,right",INLINE:"inline"},_="down,right",x="down,left",A="up,right",k="up,left",N="inline",M="fa-caret-up",L="fa-caret-down",F="pull-left",j="pull-right",V="activepage",B="always",G={widgetType:"wm-menu",hostClass:"dropdown app-menu"};class W extends s.DatasetAwareNavComponent{static{this.initializeProps=void s.register("wm-menu",new Map([["accessroles",{value:"Everyone",...s.PROP_STRING}],["animateitems",s.PROP_STRING],["autoclose",{value:"always",...s.PROP_STRING}],["autoopen",{value:"never",...s.PROP_STRING}],["caption",s.PROP_STRING],["class",s.PROP_STRING],["dataset",{value:"Menu Item 1, Menu Item 2, Menu Item 3",...s.PROP_ANY}],["hint",{value:"",...s.PROP_STRING}],["arialabel",s.PROP_STRING],["isactive",s.PROP_STRING],["iconclass",s.PROP_STRING],["iconposition",{value:"left",...s.PROP_STRING}],["itemaction",s.PROP_STRING],["itemchildren",s.PROP_STRING],["itemclass",s.PROP_STRING],["itemicon",s.PROP_STRING],["itemlabel",s.PROP_STRING],["itemlink",s.PROP_STRING],["itemtarget",s.PROP_STRING],["linktarget",{value:"_self",...s.PROP_STRING}],["menuclass",s.PROP_STRING],["menulayout",s.PROP_STRING],["menuposition",s.PROP_STRING],["name",s.PROP_STRING],["orderby",s.PROP_STRING],["shortcutkey",s.PROP_STRING],["show",{value:!0,...s.PROP_BOOLEAN}],["showonhover",{value:!1,...s.PROP_BOOLEAN}],["tabindex",{value:0,...s.PROP_NUMBER}],["type",{value:"menu",...s.PROP_STRING}],["userrole",s.PROP_STRING]]))}onShow(){this._menuposition=this.menuposition,this._selectFirstItem&&setTimeout(()=>{this.$element.find("> ul[wmmenudropdown] li.app-menu-item").first().find("> a").focus()}),a.$appDigest()}onHide(){this.$element.find("li").removeClass("open"),this._selectFirstItem=!1,this.menuposition=this._menuposition?this._menuposition:S.DOWN_RIGHT,this.setMenuPosition(),a.$appDigest()}onKeyDown(e,t){const i=l.clone(R);this.menuposition===S.UP_RIGHT?(i.MOVE_UP="DOWN-ARROW",i.MOVE_DOWN="UP-ARROW"):this.menuposition===S.UP_LEFT?(i.MOVE_UP="DOWN-ARROW",i.MOVE_DOWN="UP-ARROW",i.MOVE_LEFT="RIGHT-ARROW",i.MOVE_RIGHT="LEFT-ARROW"):this.menuposition===S.DOWN_LEFT&&(i.MOVE_LEFT="RIGHT-ARROW",i.MOVE_RIGHT="LEFT-ARROW"),l.includes([i.MOVE_DOWN,i.MOVE_RIGHT],t)?this.bsDropdown.isOpen?this.$element.find("> ul[wmmenudropdown] li.app-menu-item").first().find("> a").focus():(this._selectFirstItem=!0,this.bsDropdown.show()):t===i.ON_ENTER||t===i.ON_MOUSE_ENTER&&this.showonhover?this.bsDropdown.toggle(!0):(l.includes([i.MOVE_UP,i.MOVE_LEFT],t)||t==i.ON_MOUSE_LEAVE&&this.autoclose==s.AUTOCLOSE_TYPE.ALWAYS&&this.showonhover)&&this.bsDropdown.hide(),e.preventDefault()}constructor(e,t,i,n,o,r,c,d){super(e,G,d),this.route=t,this.userDefinedExecutionContext=i,this.app=n,this.bsDropdown=o,this.parentNav=r,this.selectEventCB=c,this.menuCaret="fa-caret-down",this._selectFirstItem=!1,this.disableMenuContext=r?!!r.disableMenuContext:!!c;const p=this.nodes$.subscribe(()=>{if(!l.isEmpty(this.nodes)){if(s.hasLinkToCurrentPage(this.nodes,this.route.url)&&a.addClass(this.nativeElement.querySelector(".dropdown-toggle"),"active"),this.parentNav)return;let e=!1;const t=i=>{l.forEach(i,i=>{if(!e)return i.isactive?(e=!0,this.onMenuItemSelect({$event:{},$item:i}),a.triggerItemAction(this,i),!1):void(l.isEmpty(i.children)||t(i.children))})};t(this.nodes)}});this.registerDestroyListener(()=>p.unsubscribe())}resetNodes(){super.resetNodes(),(this.autoopen===V&&s.hasLinkToCurrentPage(this.nodes,this.route.url)||this.autoopen===B)&&this.bsDropdown.show()}ngOnInit(){super.ngOnInit(),this.setMenuPosition();const e=this.app.subscribe("highlightActiveLink",e=>{a.toggleClass(this.nativeElement.querySelector(".dropdown-toggle"),"active",s.hasLinkToCurrentPage(this.nodes,this.route.url))});this.registerDestroyListener(()=>e())}onPropertyChange(e,t,i){"tabindex"!==e&&"autoclose"===e?(this.bsDropdown.autoClose=t!==s.AUTOCLOSE_TYPE.DISABLED,this.autoclose=t):super.onPropertyChange(e,t,i)}setMenuPosition(){switch(this.menuposition){case _:a.removeClass(this.nativeElement,"dropup"),this.menualign=F,this.menuCaret=L;break;case x:a.removeClass(this.nativeElement,"dropup"),this.menualign=j,this.menuCaret=L;break;case k:a.addClass(this.nativeElement,"dropup"),this.menualign=j,this.menuCaret=M;break;case A:a.addClass(this.nativeElement,"dropup"),this.menualign=F,this.menuCaret=M;break;case N:this.menualign="dropinline-menu"}}onMenuItemSelect(e){const{$event:t}=e,i=e.$item.value;this.invokeEventCallback("select",{$event:t,$item:i})}ngAfterViewInit(){super.ngAfterViewInit(),void 0!==this.widget.tabindex&&"number"==typeof this.widget.tabindex&&isNaN(this.widget.tabindex)&&(this.widget.tabindex=0,this.tabindex=0),s.styler(this.nativeElement.querySelector(".dropdown-toggle"),this)}static{this.\u0275fac=m.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:m,type:W,deps:[{token:m.Injector},{token:u.Router},{token:h.UserDefinedExecutionContext},{token:h.App},{token:g.BsDropdownDirective,optional:!0,self:!0},{token:C,optional:!0},{token:"select.event",attribute:!0},{token:"EXPLICIT_CONTEXT",optional:!0}],target:m.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=m.\u0275\u0275ngDeclareComponent({minVersion:"17.0.0",version:"20.3.19",type:W,isStandalone:!0,selector:"[wmMenu]",host:{listeners:{onShown:"onShow()",onHidden:"onHide()","keydown.arrowup":'onKeyDown($event,"UP-ARROW")',mouseenter:'onKeyDown($event,"MOUSE-ENTER")',mouseleave:'onKeyDown($event,"MOUSE-LEAVE")',"keydown.arrowdown":'onKeyDown($event,"DOWN-ARROW")',"keydown.arrowright":'onKeyDown($event,"RIGHT-ARROW")',"keydown.arrowleft":'onKeyDown($event,"LEFT-ARROW")',"keydown.enter":'onKeyDown($event,"ENTER")'}},providers:[s.provideAsWidgetRef(W)],usesInheritance:!0,ngImport:m,template:'\n\n<ng-template #innerTemplate>\n <i class="app-icon {{iconclass}}"></i>\n <span class="caption" [textContent]="caption"></span>\n <span class="pull-right caret fa {{menuCaret}}"></span>\n</ng-template>\n\n@if (type === \'anchor\') {\n <a wmAnchor\n dropdownToggle\n [attr.aria-label]="arialabel || \'Menu\'"\n href="javascript:void(0);"\n role="button"\n aria-haspopup="true"\n aria-expanded="false"\n hint.bind="hint"\n class="dropdown-toggle {{menuclass}}"\n shortcutkey.bind="shortcutkey"\n tabindex.bind="tabindex"\n caption.bind="caption"\n iconclass.bind="iconclass"\n iconposition.bind="iconposition"\n badgevalue.bind="badgevalue"\n >\n <span class="pull-right caret fa" [ngClass]="[menuCaret]"></span>\n </a>\n} @else {\n <button wmButton\n dropdownToggle\n aria-haspopup="true"\n aria-expanded="false"\n [attr.aria-label]="arialabel || \'Menu\'"\n class="btn app-button dropdown-toggle {{menuclass}}"\n hint.bind="hint"\n shortcutkey.bind="shortcutkey"\n tabindex.bind="tabindex"\n caption.bind="caption"\n iconclass.bind="iconclass"\n iconposition.bind="iconposition"\n type="button">\n <span class="pull-right caret fa" [ngClass]="[menuCaret]"></span>\n </button>\n}\n\n<ul *dropdownMenu [items]="nodes" [ngClass]="menulayout" class="icon-position-{{iconposition}}" role="menubar"\nwmMenuDropdown></ul>\n',dependencies:[{kind:"ngmodule",type:c.BsDropdownModule},{kind:"directive",type:g.BsDropdownMenuDirective,selector:"[bsDropdownMenu],[dropdownMenu]",exportAs:["bs-dropdown-menu"]},{kind:"directive",type:g.BsDropdownToggleDirective,selector:"[bsDropdownToggle],[dropdownToggle]",exportAs:["bs-dropdown-toggle"]},{kind:"ngmodule",type:t.CommonModule},{kind:"directive",type:p.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"directive",type:s.TextContentDirective,selector:"[textContent]",inputs:["textContent"]},{kind:"component",type:o.AnchorComponent,selector:"a[wmAnchor]",exportAs:["wmAnchor"]},{kind:"component",type:i.ButtonComponent,selector:"button[wmButton]",exportAs:["wmButton"]},{kind:"component",type:E,selector:"ul[wmMenuDropdown]",inputs:["items"]}]})}}m.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:m,type:W,decorators:[{type:n.Component,args:[{standalone:!0,imports:[c.BsDropdownModule,t.CommonModule,s.TextContentDirective,o.AnchorComponent,i.ButtonComponent,E],selector:"[wmMenu]",providers:[s.provideAsWidgetRef(W)],template:'\n\n<ng-template #innerTemplate>\n <i class="app-icon {{iconclass}}"></i>\n <span class="caption" [textContent]="caption"></span>\n <span class="pull-right caret fa {{menuCaret}}"></span>\n</ng-template>\n\n@if (type === \'anchor\') {\n <a wmAnchor\n dropdownToggle\n [attr.aria-label]="arialabel || \'Menu\'"\n href="javascript:void(0);"\n role="button"\n aria-haspopup="true"\n aria-expanded="false"\n hint.bind="hint"\n class="dropdown-toggle {{menuclass}}"\n shortcutkey.bind="shortcutkey"\n tabindex.bind="tabindex"\n caption.bind="caption"\n iconclass.bind="iconclass"\n iconposition.bind="iconposition"\n badgevalue.bind="badgevalue"\n >\n <span class="pull-right caret fa" [ngClass]="[menuCaret]"></span>\n </a>\n} @else {\n <button wmButton\n dropdownToggle\n aria-haspopup="true"\n aria-expanded="false"\n [attr.aria-label]="arialabel || \'Menu\'"\n class="btn app-button dropdown-toggle {{menuclass}}"\n hint.bind="hint"\n shortcutkey.bind="shortcutkey"\n tabindex.bind="tabindex"\n caption.bind="caption"\n iconclass.bind="iconclass"\n iconposition.bind="iconposition"\n type="button">\n <span class="pull-right caret fa" [ngClass]="[menuCaret]"></span>\n </button>\n}\n\n<ul *dropdownMenu [items]="nodes" [ngClass]="menulayout" class="icon-position-{{iconposition}}" role="menubar"\nwmMenuDropdown></ul>\n'}]}],ctorParameters:()=>[{type:m.Injector},{type:u.Router},{type:h.UserDefinedExecutionContext},{type:h.App},{type:g.BsDropdownDirective,decorators:[{type:n.Self},{type:n.Optional}]},{type:C,decorators:[{type:n.Optional}]},{type:void 0,decorators:[{type:n.Attribute,args:["select.event"]}]},{type:void 0,decorators:[{type:n.Inject,args:["EXPLICIT_CONTEXT"]},{type:n.Optional}]}],propDecorators:{onShow:[{type:n.HostListener,args:["onShown"]}],onHide:[{type:n.HostListener,args:["onHidden"]}],onKeyDown:[{type:n.HostListener,args:["keydown.arrowup",["$event",'"UP-ARROW"']]},{type:n.HostListener,args:["mouseenter",["$event",'"MOUSE-ENTER"']]},{type:n.HostListener,args:["mouseleave",["$event",'"MOUSE-LEAVE"']]},{type:n.HostListener,args:["keydown.arrowdown",["$event",'"DOWN-ARROW"']]},{type:n.HostListener,args:["keydown.arrowright",["$event",'"RIGHT-ARROW"']]},{type:n.HostListener,args:["keydown.arrowleft",["$event",'"LEFT-ARROW"']]},{type:n.HostListener,args:["keydown.enter",["$event",'"ENTER"']]}]}});const q=["itemlabel","itemicon","itemlink","itemaction","itemchildren","userrole"];class z extends s.BaseContainerComponent{constructor(e,t,i){super(e,t,i),this.pageScope=this.viewParent,this.binditemlabel=this.nativeElement.getAttribute("itemlabel.bind"),this.binditemicon=this.nativeElement.getAttribute("itemicon.bind"),this.binditemaction=this.nativeElement.getAttribute("itemaction.bind"),this.binditemlink=this.nativeElement.getAttribute("itemlink.bind"),this.binduserrole=this.nativeElement.getAttribute("userrole.bind"),this.binditemchildren=this.nativeElement.getAttribute("itemchildren.bind")}onPropertyChange(e,t,i){l.includes(q,e)&&this.menuRef?this.menuRef.itemlabel=t:super.onPropertyChange(e,t,i)}ngAfterViewInit(){super.ngAfterViewInit(),this.menuRefQL.first&&this.setMenuProperty(),this.menuRefQLSubscription=this.menuRefQL.changes.subscribe(e=>{e.first&&(this.setMenuProperty(),this.menuRefQLSubscription&&(this.menuRefQLSubscription.unsubscribe(),this.menuRefQLSubscription=null))})}ngOnDestroy(){this.menuRefQLSubscription&&(this.menuRefQLSubscription.unsubscribe(),this.menuRefQLSubscription=null),this.menuRefQL=null,this.menuRef=null,super.ngOnDestroy()}setMenuProperty(){this.menuRefQL.first&&this.menuRefQL.first&&(this.menuRef=this.menuRefQL.first,q.forEach(e=>{const t=`bind${e}`;this[t]&&(this.menuRef[t]=this[t]),this.menuRef[e]=this[e]}))}static{this.\u0275fac=m.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:m,type:z,deps:"invalid",target:m.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=m.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:z,isStandalone:!0,viewQueries:[{propertyName:"menuRefQL",predicate:W,descendants:!0}],usesInheritance:!0,ngImport:m})}}m.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:m,type:z,decorators:[{type:n.Directive}],ctorParameters:()=>[{type:void 0},{type:void 0},{type:void 0,decorators:[{type:n.Inject,args:["EXPLICIT_CONTEXT"]},{type:n.Optional}]}],propDecorators:{menuRefQL:[{type:n.ViewChildren,args:[W]}]}}),e.KEYBOARD_MOVEMENTS=R,e.MENU_POSITION=S,e.MenuAdapterComponent=z,e.MenuComponent=W,e.MenuDropdownComponent=E,e.MenuDropdownItemComponent=I,e.NavComponent=C,e.NavItemDirective=y,e.NavigationControlDirective=f,e.disableContextMenu=v}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common"),require("@angular/core"),require("@wm/components/base")):"function"==typeof define&&define.amd?define(["exports","@angular/common","@angular/core","@wm/components/base"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.navigation=e.wm.components.navigation||{},e.wm.components.navigation.navbar={}),e.ng.common,e.ng.core,e.wm.components.base)}(this,function(e,t,i,n){"use strict";function a(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var s=a(t),o=a(i);const r={widgetType:"wm-navbar",hostClass:"navbar navbar-default app-navbar"};class l extends n.StylableComponent{static{this.initializeProps=void n.register("wm-navbar",new Map([["class",{value:"",...n.PROP_STRING}],["homelink",n.PROP_STRING],["imgsrc",n.PROP_STRING],["menuiconclass",{value:"wi wi-more-vert",...n.PROP_STRING}],["name",n.PROP_STRING],["show",{value:!0,...n.PROP_BOOLEAN}],["title",n.PROP_STRING]]))}constructor(e,t){super(e,r,t),n.styler(this.nativeElement,this,n.APPLY_STYLES_TYPE.CONTAINER)}toggleCollapse(){const e=$(this.navContent.nativeElement);e.animate({height:"toggle"}),e.hasClass("in")?setTimeout(()=>this.toggleNavCollapse(),500):this.toggleNavCollapse()}toggleNavCollapse(){this.navContent.nativeElement.classList.toggle("in")}ngOnDestroy(){this.navContent=null,super.ngOnDestroy()}static{this.\u0275fac=o.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:o,type:l,deps:[{token:o.Injector},{token:"EXPLICIT_CONTEXT",optional:!0}],target:o.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=o.\u0275\u0275ngDeclareComponent({minVersion:"17.0.0",version:"20.3.19",type:l,isStandalone:!0,selector:"[wmNavbar]",providers:[n.provideAsWidgetRef(l)],viewQueries:[{propertyName:"navContent",first:!0,predicate:["navContent"],descendants:!0,static:!0}],usesInheritance:!0,ngImport:o,template:'<div class="container-fluid">\n <div class="navbar-header">\n <button type="button" class="btn-transparent navbar-toggle collapsed" data-toggle="collapse" (click)="toggleCollapse()" aria-expanded="false">\n <span class="sr-only">Toggle navigation</span>\n <i [ngClass]="menuiconclass"></i>\n </button>\n @if (title || imgsrc) {\n <a class="navbar-brand" [href]="(homelink | trustAs: \'resource\') || \'#/\'">\n @if (imgsrc) {\n <img data-identifier="img" class="brand-image" [alt]="Brand" height="20" [src]="imgsrc | image"/>\n }\n <span class="title" [textContent]="title"></span>\n </a>\n }\n </div>\n <div class="collapse navbar-collapse" #navContent>\n <ng-content></ng-content>\n </div>\n</div>',dependencies:[{kind:"ngmodule",type:t.CommonModule},{kind:"directive",type:s.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"directive",type:n.TextContentDirective,selector:"[textContent]",inputs:["textContent"]},{kind:"pipe",type:n.TrustAsPipe,name:"trustAs"}]})}}o.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:o,type:l,decorators:[{type:i.Component,args:[{standalone:!0,imports:[t.CommonModule,n.TextContentDirective,n.TrustAsPipe],selector:"[wmNavbar]",providers:[n.provideAsWidgetRef(l)],template:'<div class="container-fluid">\n <div class="navbar-header">\n <button type="button" class="btn-transparent navbar-toggle collapsed" data-toggle="collapse" (click)="toggleCollapse()" aria-expanded="false">\n <span class="sr-only">Toggle navigation</span>\n <i [ngClass]="menuiconclass"></i>\n </button>\n @if (title || imgsrc) {\n <a class="navbar-brand" [href]="(homelink | trustAs: \'resource\') || \'#/\'">\n @if (imgsrc) {\n <img data-identifier="img" class="brand-image" [alt]="Brand" height="20" [src]="imgsrc | image"/>\n }\n <span class="title" [textContent]="title"></span>\n </a>\n }\n </div>\n <div class="collapse navbar-collapse" #navContent>\n <ng-content></ng-content>\n </div>\n</div>'}]}],ctorParameters:()=>[{type:o.Injector},{type:void 0,decorators:[{type:i.Inject,args:["EXPLICIT_CONTEXT"]},{type:i.Optional}]}],propDecorators:{navContent:[{type:i.ViewChild,args:["navContent",{static:!0}]}]}}),e.NavbarComponent=l}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/router"),require("@angular/common"),require("@wm/core"),require("@wm/components/base")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/router","@angular/common","@wm/core","@wm/components/base"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.navigation=e.wm.components.navigation||{},e.wm.components.navigation.breadcrumb={}),e.ng.core,e.ng.router,e.ng.common,e.wm.core,e.wm.components.base)}(this,function(e,t,i,n,a,s){"use strict";function o(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var r=o(t),l=o(i),c=o(n);const d={widgetType:"wm-breadcrumb",hostClass:"breadcrumb app-breadcrumb"};class p extends s.DatasetAwareNavComponent{static{this.initializeProps=void s.register("wm-breadcrumb",new Map([["class",s.PROP_STRING],["dataset",s.PROP_ANY],["itemlabel",s.PROP_STRING],["itemid",s.PROP_STRING],["itemlink",s.PROP_STRING],["itemicon",s.PROP_STRING],["itemchildren",s.PROP_STRING],["itemclass",s.PROP_STRING],["itemtarget",s.PROP_STRING],["name",s.PROP_STRING],["show",{value:!0,...s.PROP_BOOLEAN}]]))}constructor(e,t,i,n,a){super(e,d,a),this.route=t,this.location=i,s.styler(this.nativeElement,this,s.APPLY_STYLES_TYPE.CONTAINER),this.disableMenuContext=!!n}getPath(e,t,i=[]){return t.forEach(t=>e.isPathFound?i:t.id===e.key?(e.isPathFound=!0,i.push(t),i):void(t.children.length&&(i.push(t),this.getPath(e,t.children,i),e.isPathFound||i.pop()))),i}getCurrentRoute(){return this.location.path().substr(1).split("?")[0]}resetNodes(){super.resetNodes(),(this.itemid||this.binditemid)&&(this.nodes=this.getPath({key:this.getCurrentRoute(),isPathFound:!1},this.nodes))}onItemClick(e,t){e.preventDefault();const i={$item:t.value,$event:e},n=!(!1===this.invokeEventCallback("beforenavigate",i)),s=t.target;let o=t.link;if(o&&n)if(!o.startsWith("#/")||s&&"_self"!==s)a.openLink(o,s);else{const e=a.getUrlParams(o);o=a.getRouteNameFromLink(o),this.route.navigate([o],{queryParams:e})}}static{this.\u0275fac=r.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:r,type:p,deps:[{token:r.Injector},{token:l.Router},{token:c.Location},{token:"beforenavigate.event",attribute:!0},{token:"EXPLICIT_CONTEXT",optional:!0}],target:r.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=r.\u0275\u0275ngDeclareComponent({minVersion:"17.0.0",version:"20.3.19",type:p,isStandalone:!0,selector:"[wmBreadcrumb]",providers:[s.provideAsWidgetRef(p)],usesInheritance:!0,ngImport:r,template:'@for (item of nodes; track item; let last = $last; let index = $index) {\n <li [class.active]="last" class="{{item.class}}">\n <i class="{{item.icon}}"></i>\n @if (!last) {\n <a [title]="item.label" href="javascript:void(0)" [wmNavigationControl]="item.link" [disableMenuContext]="disableMenuContext || !!item.action" (click)="onItemClick($event, item)" [textContent]="item.label"></a>\n }\n @if (last) {\n <a [title]="item.label" [textContent]="item.label" href="javascript:void(0)" class="text-muted"\n tabindex="0" aria-current="page"></a>\n }\n </li>\n}\n',dependencies:[{kind:"directive",type:s.TextContentDirective,selector:"[textContent]",inputs:["textContent"]}]})}}r.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:r,type:p,decorators:[{type:t.Component,args:[{standalone:!0,imports:[s.TextContentDirective],selector:"[wmBreadcrumb]",providers:[s.provideAsWidgetRef(p)],template:'@for (item of nodes; track item; let last = $last; let index = $index) {\n <li [class.active]="last" class="{{item.class}}">\n <i class="{{item.icon}}"></i>\n @if (!last) {\n <a [title]="item.label" href="javascript:void(0)" [wmNavigationControl]="item.link" [disableMenuContext]="disableMenuContext || !!item.action" (click)="onItemClick($event, item)" [textContent]="item.label"></a>\n }\n @if (last) {\n <a [title]="item.label" [textContent]="item.label" href="javascript:void(0)" class="text-muted"\n tabindex="0" aria-current="page"></a>\n }\n </li>\n}\n'}]}],ctorParameters:()=>[{type:r.Injector},{type:l.Router},{type:c.Location},{type:void 0,decorators:[{type:t.Attribute,args:["beforenavigate.event"]}]},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}]}),e.BreadcrumbComponent=p}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common"),require("@angular/core"),require("ngx-bootstrap/popover"),require("@wm/core"),require("@wm/components/base"),require("@wm/components/basic/anchor")):"function"==typeof define&&define.amd?define(["exports","@angular/common","@angular/core","ngx-bootstrap/popover","@wm/core","@wm/components/base","@wm/components/basic/anchor"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.navigation=e.wm.components.navigation||{},e.wm.components.navigation.popover={}),e.ng.common,e.ng.core,e.ngxBootstrap.popover,e.wm.core,e.wm.components.base,e.wm.components.basic.anchor)}(this,function(e,t,i,n,a,s,o){"use strict";function r(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var l=r(t),c=r(i),d=r(n),p=r(a);const m={widgetType:"wm-popover",hostClass:"app-popover-wrapper"},h={click:"click",hover:"mouseenter:click",default:"click mouseenter"};let u;class g extends s.StylableComponent{static{this.initializeProps=void s.register("wm-popover",new Map([["autoclose",{value:"outsideClick",...s.PROP_STRING}],["badgevalue",s.PROP_STRING],["caption",{value:"Link",...s.PROP_STRING}],["class",s.PROP_STRING],["conditionalclass",s.PROP_ANY],["content",s.PROP_STRING],["contentanimation",s.PROP_STRING],["contentsource",{value:"partial",...s.PROP_STRING}],["encodeurl",s.PROP_BOOLEAN],["hint",s.PROP_STRING],["arialabel",s.PROP_STRING],["hyperlink",{value:"javascript:void(0)",PROP_STRING:s.PROP_STRING}],["iconclass",s.PROP_STRING],["iconheight",s.PROP_STRING],["iconmargin",s.PROP_STRING],["iconposition",s.PROP_STRING],["iconurl",s.PROP_STRING],["iconwidth",s.PROP_STRING],["interaction",{value:"click",...s.PROP_STRING}],["name",s.PROP_STRING],["popoverarrow",{value:!0,...s.PROP_BOOLEAN}],["popoverheight",s.PROP_STRING],["popoverplacement",{value:"bottom",...s.PROP_STRING}],["popoverwidth",s.PROP_STRING],["shortcutkey",s.PROP_STRING],["show",{value:!0,...s.PROP_BOOLEAN}],["tabindex",{value:0,...s.PROP_NUMBER}],["title",s.PROP_STRING],["adaptiveposition",{value:!0,...s.PROP_BOOLEAN}]]))}static{this.activePopovers=[]}constructor(e,t,i,n){super(e,m,i),this.app=t,this.cdr=n,this.isOpen=!1,this.canPopoverOpen=!0,this.isClosingProgrammatically=!1,this.isHandlingClick=!1,this.preventFocusShift=!1,this.popoverContainerCls=`app-popover-${this.widgetId}`,this.isPrism=this.app.isPrism}setupDocumentClickHandler(){this.documentClickHandler&&document.removeEventListener("click",this.documentClickHandler,!0),this.documentClickHandler=e=>{if(!this.isOpen)return;const t=e.target;this.isHandlingClick=!0;try{if(!!(t.closest("bs-datepicker-container")||t.closest(".bs-datepicker-container")||t.closest("bs-daterangepicker-container")||t.closest(".bs-daterangepicker-container")||t.closest("bs-timepicker")||t.closest(".bs-timepicker")||t.closest(".dropdown-menu")))return;const i=g.activePopovers.findIndex(e=>{const i=document.querySelector(`.${e.popoverContainerCls}`);return i?.contains(t)});if(this.anchorRef?.nativeElement?.contains(t))return e.preventDefault(),e.stopPropagation(),void(this.isOpen?this.close():this.open());-1===i?this.outsideclick&&this.closeAllPopovers():this.closeInnerPopovers(i)}finally{setTimeout(()=>{this.isHandlingClick=!1},0)}},document.addEventListener("click",this.documentClickHandler,!0)}closeAllPopovers(){g.activePopovers.forEach(e=>{e.outsideclick&&(e.isClosingProgrammatically=!0,e.close())})}closeInnerPopovers(e){for(let t=e+1;t<g.activePopovers.length;t++){const e=g.activePopovers[t];e.outsideclick&&(e.isClosingProgrammatically=!0,e.close())}}isChildPopover(){return!!$(this.nativeElement).closest(".popover").length}open(e){this.preventFocusShift=e??!1,this.isHandlingClick||(this.showPopover(),g.activePopovers.includes(this)||g.activePopovers.push(this),this.cdr.detectChanges())}close(){if(this.isOpen){this.isClosingProgrammatically=!0,this.isOpen=!1,this.bsPopoverDirective&&this.bsPopoverDirective.hide();const e=g.activePopovers.indexOf(this);e>-1&&g.activePopovers.splice(e,1),this.cdr.detectChanges()}}onHidden(){this.isChildPopover()&&!this.isClosingProgrammatically||(this.invokeEventCallback("hide",{$event:{type:"hide"}}),this.isOpen=!1,u===this&&(u=null)),this.isClosingProgrammatically=!1}setFocusToPopoverLink(){setTimeout(()=>this.anchorRef.nativeElement.focus(),10)}adjustPopoverArrowPosition(e,t){this.arrowPositionSubscription&&(this.arrowPositionSubscription.unsubscribe(),this.arrowPositionSubscription=null),this.arrowPositionSubscription=this.bsPopoverDirective._popover._ngZone.onStable.subscribe(()=>{e.find(".popover-arrow").css("left",t+"px")})}calculatePopoverPostion(e){const t=$(e);let i=t.offset().left;const n=t[0].offsetWidth,s=$(window).width(),o=this.anchorRef.nativeElement.getBoundingClientRect();if(i<0){a.adjustContainerPosition(t,this.nativeElement,this.bsPopoverDirective._popover);const e=4,i=o.left+o.width/2-e;this.adjustPopoverArrowPosition(t,i)}i+n>s&&(a.adjustContainerRightEdges(t,this.nativeElement,this.bsPopoverDirective._popover),setTimeout(()=>{i=t.offset().left;const e=i-(i+n-s);let a;a=i<=100?o.left+o.width/2-i:o.left+o.width/2-e,s>500&&(a+=30),this.adjustPopoverArrowPosition(t,a)}))}onShown(){const e=a.findRootContainer(this.$element);e&&$("body > popover-container").wrap("<"+e+"/>"),this.isChildPopover()||(u&&u!==this&&u.autoclose!==s.AUTOCLOSE_TYPE.DISABLED&&(u.isClosingProgrammatically=!0,u.close()),u=this),this.isOpen=!0,g.activePopovers.includes(this)||g.activePopovers.push(this);const t=document.querySelector(`.${this.popoverContainerCls}`);t&&(t.setAttribute("data-popover-id",this.widgetId),t.addEventListener("click",e=>{e.stopPropagation()}),this.isPrism&&this.applyVariantClass(t)),a.setCSSFromObj(t,{height:this.popoverheight,minWidth:this.popoverwidth,width:this.popoverwidth}),this.popoverarrow||a.addClass(t.querySelector(".arrow"),"hidden"),"hover"!==this.interaction&&"default"!==this.interaction||(t.onmouseenter=()=>clearTimeout(this.closePopoverTimeout),t.onmouseleave=()=>this.hidePopover(),this.anchorRef.nativeElement.onmouseenter=()=>clearTimeout(this.closePopoverTimeout),this.anchorRef.nativeElement.onmouseleave=()=>this.hidePopover()),this.outsideclick&&this.setupDocumentClickHandler(),setTimeout(()=>{this.anchorRef?.nativeElement&&this.anchorRef.nativeElement.removeAttribute("aria-describedby")});const i=this.eventManager.addEventListener(t,"keydown.esc",()=>{this.isOpen=!1,this.setFocusToPopoverLink(),i()}),n=t.querySelector(".popover-start"),o=t.querySelector(".popover-end");if(n.onkeydown=e=>{e.shiftKey&&"Tab"===e.key&&(this.bsPopoverDirective.hide(),e.preventDefault(),this.setFocusToPopoverLink(),this.isOpen=!1)},o.onkeydown=e=>{e.shiftKey||"Tab"!==e.key||(this.bsPopoverDirective.hide(),e.preventDefault(),this.setFocusToPopoverLink(),this.isOpen=!1)},this.autoclose===s.AUTOCLOSE_TYPE.ALWAYS&&(t.onclick=()=>this.close()),this.preventFocusShift){const e=document.activeElement;setTimeout(()=>e?.focus(),0)}else setTimeout(()=>n.focus(),50);setTimeout(()=>{this.adaptiveposition||this.calculatePopoverPostion(t),this.triggerPopoverEvents()})}triggerPopoverEvents(){"partial"===this.contentsource?this.partialLoadedSubscription=this.app.subscribe("partialLoaded",()=>{if(this.partialLoadedSubscription&&(this.partialLoadedSubscription(),this.partialLoadedSubscription=null),!this.partialRef||!this.partialRef.nativeElement)return;const e=this.partialRef.nativeElement;let t;e&&(t=e.widget,this.Widgets=t.Widgets,this.Variables=t.Variables,this.Actions=t.Actions,this.invokeEventCallback("load"),this.invokeEventCallback("show",{$event:{type:"show"}}))}):(this.Widgets=this.viewParent.Widgets,this.Variables=this.viewParent.Variables,this.Actions=this.viewParent.Actions,this.invokeEventCallback("show",{$event:{type:"show"}}))}hidePopover(){this.isClosingProgrammatically=!0,this.closePopoverTimeout=setTimeout(()=>this.isOpen=!1,500)}showPopover(){this.bsPopoverDirective.show()}onPopoverAnchorKeydown(e){this.canPopoverOpen&&"Enter"===e.key&&(e.stopPropagation(),e.preventDefault(),this.showPopover())}onPropertyChange(e,t,i){"class"!==e&&"tabindex"!==e&&("contentsource"===e&&("partial"!==this.contentsource||this.content||(this.canPopoverOpen=!1)),"content"===e&&t&&(this.canPopoverOpen=!0),"autoclose"===e&&(this.outsideclick=t===s.AUTOCLOSE_TYPE.OUTSIDECLICK||t===s.AUTOCLOSE_TYPE.ALWAYS),super.onPropertyChange(e,t,i))}ngOnInit(){super.ngOnInit(),this.event=h[this.interaction]}ngAfterViewInit(){super.ngAfterViewInit(),s.styler(this.anchorRef.nativeElement,this),this.containerTarget=s.getContainerTargetClass(this.nativeElement)}ngOnDetach(){this.bsPopoverDirective.hide()}ngOnDestroy(){this.partialLoadedSubscription&&(this.partialLoadedSubscription(),this.partialLoadedSubscription=null),this.arrowPositionSubscription&&(this.arrowPositionSubscription.unsubscribe(),this.arrowPositionSubscription=null),this.isOpen&&this.bsPopoverDirective&&this.bsPopoverDirective.hide(),this.closePopoverTimeout&&(clearTimeout(this.closePopoverTimeout),this.closePopoverTimeout=null),this.documentClickHandler&&(document.removeEventListener("click",this.documentClickHandler,!0),this.documentClickHandler=null);const e=g.activePopovers.indexOf(this);e>-1&&g.activePopovers.splice(e,1),this.closePopoverTimeout&&clearTimeout(this.closePopoverTimeout),this.anchorRef?.nativeElement&&(this.anchorRef.nativeElement.onmouseenter=null,this.anchorRef.nativeElement.onmouseleave=null),this.bsPopoverDirective=null,this.anchorRef=null,this.popoverTemplate=null,this.partialRef=null,super.ngOnDestroy()}applyVariantClass(e){if(!e)return;(this.class||"").split(/\s+/).filter(e=>e.startsWith("popover-")).forEach(t=>e.classList.add(t))}static{this.\u0275fac=c.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:c,type:g,deps:[{token:c.Injector},{token:p.App},{token:"EXPLICIT_CONTEXT",optional:!0},{token:c.ChangeDetectorRef}],target:c.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=c.\u0275\u0275ngDeclareComponent({minVersion:"14.0.0",version:"20.3.19",type:g,isStandalone:!0,selector:"wm-popover",providers:[s.provideAsWidgetRef(g)],queries:[{propertyName:"popoverTemplate",first:!0,predicate:i.TemplateRef,descendants:!0},{propertyName:"partialRef",first:!0,predicate:["partial"],descendants:!0}],viewQueries:[{propertyName:"bsPopoverDirective",first:!0,predicate:n.PopoverDirective,descendants:!0},{propertyName:"anchorRef",first:!0,predicate:["anchor"],descendants:!0,static:!0}],usesInheritance:!0,ngImport:c,template:'<a [popover]="popoverTemplate"\n [popoverContext]="context"\n [popoverTitle]="title"\n [placement]="popoverplacement"\n [outsideClick]="false"\n [triggers]="event"\n (onShown)="onShown()"\n (onHidden)="onHidden()"\n containerClass="app-popover animated {{contentanimation}} {{popoverContainerCls}}"\n [container]="containerTarget || \'.wm-app\'"\n [isOpen]="isOpen"\n [tabindex]="tabindex"\n [name]="name"\n [class]="class"\n [ngClass]="{\'disable-popover\': !canPopoverOpen}"\n [adaptivePosition]="adaptiveposition"\n boundariesElement="window"\n [attr.aria-label]="arialabel || (badgevalue ? caption + \' \' + badgevalue : caption) || \'Popover menu\'"\n [attr.aria-expanded]="isOpen"\n role="button"\n #anchor\n name.bind="name"\n wmAnchor\n animation.bind="animation"\n badgevalue.bind="badgevalue"\n caption.bind="caption"\n encodeurl.bind="encodeurl"\n hint.bind="hint"\n hyperlink.bind="hyperlink"\n iconurl.bind="iconurl"\n iconwidth.bind="iconwidth"\n iconheight.bind="iconheight"\n iconmargin.bind="iconmargin"\n iconclass.bind="iconclass"\n iconposition.bind="iconposition"\n shortcutkey.bind="shortcutkey"\n tabindex.bind="tabindex"\n (keydown)="onPopoverAnchorKeydown($event)">\n</a>\n',dependencies:[{kind:"ngmodule",type:t.CommonModule},{kind:"directive",type:l.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"ngmodule",type:n.PopoverModule},{kind:"directive",type:d.PopoverDirective,selector:"[popover]",inputs:["adaptivePosition","boundariesElement","popover","popoverContext","popoverTitle","placement","outsideClick","triggers","container","containerClass","isOpen","delay"],outputs:["onShown","onHidden"],exportAs:["bs-popover"]},{kind:"component",type:o.AnchorComponent,selector:"a[wmAnchor]",exportAs:["wmAnchor"]}]})}}c.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:c,type:g,decorators:[{type:i.Component,args:[{standalone:!0,imports:[t.CommonModule,n.PopoverModule,o.AnchorComponent],selector:"wm-popover",providers:[s.provideAsWidgetRef(g)],template:'<a [popover]="popoverTemplate"\n [popoverContext]="context"\n [popoverTitle]="title"\n [placement]="popoverplacement"\n [outsideClick]="false"\n [triggers]="event"\n (onShown)="onShown()"\n (onHidden)="onHidden()"\n containerClass="app-popover animated {{contentanimation}} {{popoverContainerCls}}"\n [container]="containerTarget || \'.wm-app\'"\n [isOpen]="isOpen"\n [tabindex]="tabindex"\n [name]="name"\n [class]="class"\n [ngClass]="{\'disable-popover\': !canPopoverOpen}"\n [adaptivePosition]="adaptiveposition"\n boundariesElement="window"\n [attr.aria-label]="arialabel || (badgevalue ? caption + \' \' + badgevalue : caption) || \'Popover menu\'"\n [attr.aria-expanded]="isOpen"\n role="button"\n #anchor\n name.bind="name"\n wmAnchor\n animation.bind="animation"\n badgevalue.bind="badgevalue"\n caption.bind="caption"\n encodeurl.bind="encodeurl"\n hint.bind="hint"\n hyperlink.bind="hyperlink"\n iconurl.bind="iconurl"\n iconwidth.bind="iconwidth"\n iconheight.bind="iconheight"\n iconmargin.bind="iconmargin"\n iconclass.bind="iconclass"\n iconposition.bind="iconposition"\n shortcutkey.bind="shortcutkey"\n tabindex.bind="tabindex"\n (keydown)="onPopoverAnchorKeydown($event)">\n</a>\n'}]}],ctorParameters:()=>[{type:c.Injector},{type:p.App},{type:void 0,decorators:[{type:i.Inject,args:["EXPLICIT_CONTEXT"]},{type:i.Optional}]},{type:c.ChangeDetectorRef}],propDecorators:{bsPopoverDirective:[{type:i.ViewChild,args:[n.PopoverDirective]}],anchorRef:[{type:i.ViewChild,args:["anchor",{static:!0}]}],popoverTemplate:[{type:i.ContentChild,args:[i.TemplateRef]}],partialRef:[{type:i.ContentChild,args:["partial"]}]}}),e.PopoverComponent=g}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("ngx-bootstrap/modal"),require("@wm/core"),require("@wm/components/base"),require("@angular/common"),require("@angular/router")):"function"==typeof define&&define.amd?define(["exports","@angular/core","ngx-bootstrap/modal","@wm/core","@wm/components/base","@angular/common","@angular/router"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.dialogs={}),e.ng.core,e.ngxBootstrap.modal,e.wm.core,e.wm.components.base,e.ng.common,e.ng.router)}(this,function(e,t,i,n,a,s,o){"use strict";function r(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var l=r(t),c=r(i),d=r(n),p=r(s);class m{constructor(e,t,i,a){this.dialogRef=t,this.renderer=a,n.addClass(e.nativeElement,"app-dialog-body modal-body"),this.bsModalShownSubscription=i.onShown.subscribe(()=>{const t=$(e.nativeElement).closest(".app-dialog")[0],i=$(e.nativeElement).closest(".modal-content")[0];let a=$("body.wm-app")[0];if(!a){const e=$("body > .modal-backdrop")[0],t=$("body > modal-container")[0];a=$(".wm-app")[0],a&&t&&(e&&this.renderer.appendChild(a,e),this.renderer.appendChild(a,t))}const s=this.dialogRef.sheet,o=this.dialogRef.sheetPosition;s&&($(t).addClass("modal-sheet"),$(t).addClass(n.getSheetPositionClass(o)));const r=this.dialogRef.animation;r&&($(i).addClass("animated"),$(i).addClass(r));const l=this.dialogRef.width,c=this.dialogRef.height;c&&setTimeout(t=>{n.setCSS($(e.nativeElement)[0],"height",c)}),t&&(l&&n.setCSS(t,"width",l),n.setAttr(t,"tabindex",this.dialogRef.tabindex),n.setAttr(t,"name",this.dialogRef.name)),this.bsModalShownSubscription&&(this.bsModalShownSubscription.unsubscribe(),this.bsModalShownSubscription=null)})}ngOnDestroy(){this.bsModalShownSubscription&&(this.bsModalShownSubscription.unsubscribe(),this.bsModalShownSubscription=null),this.dialogRef=null}static{this.\u0275fac=l.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:l,type:m,deps:[{token:l.ElementRef},{token:a.DialogRef},{token:c.BsModalService},{token:l.Renderer2}],target:l.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=l.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:m,isStandalone:!0,selector:"div[wmDialogBody]",host:{properties:{"style.height":"this.height"}},ngImport:l})}}l.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:l,type:m,decorators:[{type:t.Directive,args:[{standalone:!0,selector:"div[wmDialogBody]"}]}],ctorParameters:()=>[{type:l.ElementRef},{type:void 0,decorators:[{type:t.Inject,args:[a.DialogRef]}]},{type:c.BsModalService},{type:l.Renderer2}],propDecorators:{height:[{type:t.HostBinding,args:["style.height"]}]}});const h={widgetType:"wm-dialogfooter",hostClass:"app-dialog-footer modal-footer"};class u extends a.BaseComponent{static{this.initializeProps=void a.register("wm-dialogfooter",new Map([["class",a.PROP_STRING],["name",a.PROP_STRING],["show",{value:!0,...a.PROP_BOOLEAN}]]))}constructor(e,t){super(e,h,t)}static{this.\u0275fac=l.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:l,type:u,deps:[{token:l.Injector},{token:"EXPLICIT_CONTEXT",optional:!0}],target:l.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=l.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:u,isStandalone:!0,selector:"div[wmDialogFooter]",providers:[a.provideAsWidgetRef(u)],usesInheritance:!0,ngImport:l})}}l.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:l,type:u,decorators:[{type:t.Directive,args:[{standalone:!0,selector:"div[wmDialogFooter]",providers:[a.provideAsWidgetRef(u)]}]}],ctorParameters:()=>[{type:l.Injector},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}]});class g extends a.BaseComponent{constructor(e,t,a,s){super(e,t,s),this.modalOptions=a,this.titleId="wmdialog-"+n.generateGUId(),this.dialogOriginFocusStack=[],this.dialogService=e.get(n.AbstractDialogService),this.bsModal=e.get(i.BsModalService);const r=e.get(o.Router),l=[this.bsModal.onShown.subscribe(({id:e})=>{const t=this.dialogService.getLastOpenedDialog();t!==this||this.dialogId||((e=>{e&&setTimeout(()=>{const t=n.findRootContainer(e.$element);t&&$("body > modal-container > div").wrap("<"+t+"/>"),e.invokeEventCallback("opened",{$event:{type:"opened"}});const i=[$("[aria-labelledby= "+e.titleId+"]")[0].querySelectorAll('a, button, input, textarea, select, details, iframe, embed, object, summary dialog, audio[controls], video[controls], [contenteditable], [tabindex]:not([tabindex="-1"])')].filter(e=>!e[0].hasAttribute("disabled")&&!e[0].hasAttribute("hidden"))[0];$(i[0]).focus();const a=e.dialogService.getOpenedDialogs();if(a.length>1){const t=Number($("[aria-labelledby= "+a[a.length-2].titleId+"]").css("z-index"));$("[aria-labelledby= "+e.dialogService.getLastOpenedDialog().titleId+"]").css("z-index",t+2),$("bs-modal-backdrop").css("z-index",t+1)}})})(t),this.dialogId=e)}),this.bsModal.onShow.subscribe(()=>{}),this.bsModal.onHidden.subscribe(e=>{let t=this.dialogService.getDialogRefFromClosedDialogs();this.dialogId&&e?.id===this.dialogId?t=this:"esc"!==e&&"backdrop-click"!==e||(t=this.dialogService.getLastOpenedDialog()),t===this&&(this.dialogId=null,this.dialogService.removeFromOpenedDialogs(t),this.dialogService.removeFromClosedDialogs(t),(e=>{if(e){e.invokeEventCallback("close"),e.dialogRef=void 0;const t=e.dialogService.getOpenedDialogs();if(t.length>=1){const e=Number($("[aria-labelledby= "+t[t.length-1].titleId+"]").css("z-index"));$("bs-modal-backdrop").css("z-index",e-1)}}})(t),t.closeCallBackFn&&t.closeCallBackFn())}),this.bsModal.onHide.subscribe(()=>{}),r.events.subscribe(e=>{e instanceof o.NavigationEnd&&this.close()})];this.registerDestroyListener(()=>{this.dialogService.removeFromOpenedDialogs(this),this.dialogService.removeFromClosedDialogs(this),l.forEach(e=>e.unsubscribe())})}open(e){if(!this.dialogService.getOpenedDialogs().some(e=>e===this)){if(this.dialogService.addToOpenedDialogs(this),Object.assign(this.context,e),this.modalOptions.ariaLabelledBy=this.titleId,this.dialogOriginFocusStack.push(document.activeElement),this.dialogRef=this.bsModal.show(this.getTemplateRef(),this.modalOptions),1===this.dialogService.getOpenedDialogs().length&&n.isMobile()){$("body > app-root")[0].setAttribute("aria-hidden","true")}$(".cdk-focus-trap-anchor").removeAttr("aria-hidden")}}close(){if(this.dialogRef){const e=this.dialogOriginFocusStack.pop();this.dialogService.addToClosedDialogs(this),this.dialogRef.hide(),e?.focus()}}register(e){this.dialogService.register(this.name,this,e)}deRegister(e){this.dialogService.deRegister(this.name,e)}onPropertyChange(e,t,i){"class"!==e&&"name"!==e&&"tabindex"!==e&&("animation"===e&&(this.modalOptions.class=this.modalOptions.class.replace(" animated "+i,""),t&&(this.modalOptions.class=this.modalOptions.class+" animated "+t)),super.onPropertyChange(e,t,i))}ngOnDestroy(){this.close(),this.deRegister(this.viewParent),super.ngOnDestroy()}static{this.\u0275fac=l.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:l,type:g,deps:[{token:l.Injector},{token:a.WidgetConfig},{token:c.ModalOptions},{token:"EXPLICIT_CONTEXT",optional:!0}],target:l.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=l.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:l,type:g})}}l.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:l,type:g,decorators:[{type:t.Injectable}],ctorParameters:()=>[{type:l.Injector},{type:void 0,decorators:[{type:t.Inject,args:[a.WidgetConfig]}]},{type:c.ModalOptions},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}]});const v="21px";class f{get isClosable(){return n.toBoolean(this.closable)}constructor(e,t,i){this.dialogRef=t,this.app=i,this.iconwidth=v,this.iconheight=v,this.closable=!0,this.headinglevel="h4",n.addClass(e.nativeElement,"app-dialog-header modal-header"),this.isPrism=this.app.isPrism}closeDialog(){this.dialogRef.close()}static{this.\u0275fac=l.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:l,type:f,deps:[{token:l.ElementRef},{token:a.DialogRef},{token:d.App}],target:l.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=l.\u0275\u0275ngDeclareComponent({minVersion:"17.0.0",version:"20.3.19",type:f,isStandalone:!0,selector:"div[wmDialogHeader]",inputs:{iconwidth:"iconwidth",iconheight:"iconheight",iconmargin:"iconmargin",iconclass:"iconclass",iconurl:"iconurl",closable:"closable",heading:"heading",headinglevel:"headinglevel",subheading:"subheading",titleid:"titleid",title:"title"},ngImport:l,template:'@if (isClosable) {\n <button (click)="closeDialog();"\n [attr.aria-label]="\'Close \' + (title ? title : \'\') + \' dialog\'" class="app-dialog-close close" [ngClass]="{\'btn-text\': isPrism}" [attr.title]="title ? \'Close \' + title + \' dialog\' : dialogRef.appLocale.LABEL_CLOSE" >\n <span class="app-icon wi wi-clear" aria-hidden="true"></span>\n </button>\n}\n\n@switch (headinglevel) {\n @case (\'h1\') {\n <h1 class="app-dialog-title modal-title">\n <ng-container *ngTemplateOutlet="headerTemplate"></ng-container>\n </h1>\n }\n @case (\'h2\') {\n <h2 class="app-dialog-title modal-title">\n <ng-container *ngTemplateOutlet="headerTemplate"></ng-container>\n </h2>\n }\n @case (\'h3\') {\n <h3 class="app-dialog-title modal-title">\n <ng-container *ngTemplateOutlet="headerTemplate"></ng-container>\n </h3>\n }\n @case (\'h4\') {\n <h4 class="app-dialog-title modal-title">\n <ng-container *ngTemplateOutlet="headerTemplate"></ng-container>\n </h4>\n }\n @case (\'h5\') {\n <h5 class="app-dialog-title modal-title">\n <ng-container *ngTemplateOutlet="headerTemplate"></ng-container>\n </h5>\n }\n @case (\'h6\') {\n <h6 class="app-dialog-title modal-title">\n <ng-container *ngTemplateOutlet="headerTemplate"></ng-container>\n </h6>\n }\n @default {\n <h4 class="app-dialog-title modal-title">\n <ng-container *ngTemplateOutlet="headerTemplate"></ng-container>\n </h4>\n }\n}\n\n<ng-template #headerTemplate>\n @if (iconclass && !iconurl) {\n <i [ngClass]="iconclass" [ngStyle]="{width: iconwidth, height: iconheight, margin: iconmargin}"></i>\n }\n @if (iconurl) {\n <img data-identifier="img" [src]="iconurl | image" [ngStyle]="{width: iconwidth, height: iconheight, margin: iconmargin}"/>\n }\n <span class="dialog-heading" [textContent]="heading" [id]="titleid"></span>\n @if (subheading) {\n <span class="dialog-sub-heading" [title]="subheading" [textContent]="subheading"></span>\n }\n</ng-template>\n',dependencies:[{kind:"ngmodule",type:s.CommonModule},{kind:"directive",type:p.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"directive",type:p.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]},{kind:"directive",type:p.NgStyle,selector:"[ngStyle]",inputs:["ngStyle"]},{kind:"directive",type:a.TextContentDirective,selector:"[textContent]",inputs:["textContent"]},{kind:"pipe",type:a.ImagePipe,name:"image"}]})}}l.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:l,type:f,decorators:[{type:t.Component,args:[{standalone:!0,imports:[s.CommonModule,a.TextContentDirective,a.ImagePipe],selector:"div[wmDialogHeader]",template:'@if (isClosable) {\n <button (click)="closeDialog();"\n [attr.aria-label]="\'Close \' + (title ? title : \'\') + \' dialog\'" class="app-dialog-close close" [ngClass]="{\'btn-text\': isPrism}" [attr.title]="title ? \'Close \' + title + \' dialog\' : dialogRef.appLocale.LABEL_CLOSE" >\n <span class="app-icon wi wi-clear" aria-hidden="true"></span>\n </button>\n}\n\n@switch (headinglevel) {\n @case (\'h1\') {\n <h1 class="app-dialog-title modal-title">\n <ng-container *ngTemplateOutlet="headerTemplate"></ng-container>\n </h1>\n }\n @case (\'h2\') {\n <h2 class="app-dialog-title modal-title">\n <ng-container *ngTemplateOutlet="headerTemplate"></ng-container>\n </h2>\n }\n @case (\'h3\') {\n <h3 class="app-dialog-title modal-title">\n <ng-container *ngTemplateOutlet="headerTemplate"></ng-container>\n </h3>\n }\n @case (\'h4\') {\n <h4 class="app-dialog-title modal-title">\n <ng-container *ngTemplateOutlet="headerTemplate"></ng-container>\n </h4>\n }\n @case (\'h5\') {\n <h5 class="app-dialog-title modal-title">\n <ng-container *ngTemplateOutlet="headerTemplate"></ng-container>\n </h5>\n }\n @case (\'h6\') {\n <h6 class="app-dialog-title modal-title">\n <ng-container *ngTemplateOutlet="headerTemplate"></ng-container>\n </h6>\n }\n @default {\n <h4 class="app-dialog-title modal-title">\n <ng-container *ngTemplateOutlet="headerTemplate"></ng-container>\n </h4>\n }\n}\n\n<ng-template #headerTemplate>\n @if (iconclass && !iconurl) {\n <i [ngClass]="iconclass" [ngStyle]="{width: iconwidth, height: iconheight, margin: iconmargin}"></i>\n }\n @if (iconurl) {\n <img data-identifier="img" [src]="iconurl | image" [ngStyle]="{width: iconwidth, height: iconheight, margin: iconmargin}"/>\n }\n <span class="dialog-heading" [textContent]="heading" [id]="titleid"></span>\n @if (subheading) {\n <span class="dialog-sub-heading" [title]="subheading" [textContent]="subheading"></span>\n }\n</ng-template>\n'}]}],ctorParameters:()=>[{type:l.ElementRef},{type:g,decorators:[{type:t.Inject,args:[a.DialogRef]}]},{type:d.App}],propDecorators:{iconwidth:[{type:t.Input}],iconheight:[{type:t.Input}],iconmargin:[{type:t.Input}],iconclass:[{type:t.Input}],iconurl:[{type:t.Input}],closable:[{type:t.Input}],heading:[{type:t.Input}],headinglevel:[{type:t.Input}],subheading:[{type:t.Input}],titleid:[{type:t.Input}],title:[{type:t.Input}]}}),e.BaseDialog=g,e.DialogBodyDirective=m,e.DialogFooterDirective=u,e.DialogHeaderComponent=f}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@wm/core"),require("@wm/components/base"),require("@wm/components/dialogs"),require("@wm/components/input/button")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@wm/core","@wm/components/base","@wm/components/dialogs","@wm/components/input/button"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.dialogs=e.wm.components.dialogs||{},e.wm.components.dialogs.alertdialog={}),e.ng.core,e.wm.core,e.wm.components.base,e.wm.components.dialogs,e.wm.components.input.button)}(this,function(e,t,i,n,a,s){"use strict";function o(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var r=o(t),l=o(i);const c={widgetType:"wm-alertdialog"},d={information:"info",error:"danger",success:"success",warning:"warning"};class p extends a.BaseDialog{static{this.initializeProps=void n.register("wm-alertdialog",new Map([["alerttype",{value:"error",...n.PROP_STRING}],["animation",n.PROP_STRING],["class",n.PROP_STRING],["closable",{value:!0,PROP_BOOLEAN:n.PROP_BOOLEAN}],["iconclass",{value:"wi wi-warning",PROP_STRING:n.PROP_STRING}],["iconheight",n.PROP_STRING],["iconmargin",n.PROP_STRING],["iconurl",n.PROP_STRING],["iconwidth",n.PROP_STRING],["message",{value:"Am an alert box!",...n.PROP_STRING}],["modal",{value:!1,...n.PROP_BOOLEAN}],["name",n.PROP_STRING],["oktext",{value:"OK",...n.PROP_STRING}],["tabindex",{value:0,...n.PROP_NUMBER}],["headinglevel",{value:"h4",...n.PROP_STRING}],["title",{value:"Alert",...n.PROP_STRING}]]))}constructor(e,t,n,a,s,o){null==n&&(n=!1);const r=!i.toBoolean(n)||"static";super(e,c,{class:`app-dialog modal-dialog app-alert-dialog ${t||""}`,backdrop:r,keyboard:!i.toBoolean(n)},s),this.app=o,this.isPrism=this.app.isPrism}getTemplateRef(){return this.dialogTemplate}onOk(e){this.invokeEventCallback("ok",{$event:e})}ngOnInit(){super.ngOnInit(),this.alerttype=d[this.alerttype]??this.alerttype,this.register(this.viewParent)}ngOnDestroy(){this.dialogTemplate=null,super.ngOnDestroy()}static{this.\u0275fac=r.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:r,type:p,deps:[{token:r.Injector},{token:"class",attribute:!0},{token:"modal",attribute:!0},{token:"closable",attribute:!0},{token:"EXPLICIT_CONTEXT",optional:!0},{token:l.App}],target:r.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=r.\u0275\u0275ngDeclareComponent({minVersion:"14.0.0",version:"20.3.19",type:p,isStandalone:!0,selector:"div[wmAlertDialog]",providers:[n.provideAsWidgetRef(p),n.provideAsDialogRef(p)],viewQueries:[{propertyName:"dialogTemplate",first:!0,predicate:["dialogTemplate"],descendants:!0,static:!0}],usesInheritance:!0,ngImport:r,template:'<ng-template #dialogTemplate>\n <div wmDialogHeader [closable]="closable"\n [iconclass]="iconclass"\n [iconurl]="iconurl"\n [iconwidth]="iconwidth"\n [iconheight]="iconheight"\n [iconmargin]="iconmargin"\n [heading]="title"\n [headinglevel]="headinglevel"\n [title]="title"\n [titleid]="titleId"></div>\n <div wmDialogBody>\n <p class="app-dialog-message text-{{alerttype}}" [class.app-label]="isPrism" [textContent]="message"></p>\n </div>\n <div wmDialogFooter>\n <button (click)="onOk($event)" [attr.aria-label]="oktext" caption.bind="oktext" class="btn-primary ok-action"\n wmButton></button>\n </div>\n</ng-template>\n',dependencies:[{kind:"directive",type:n.TextContentDirective,selector:"[textContent]",inputs:["textContent"]},{kind:"directive",type:a.DialogBodyDirective,selector:"div[wmDialogBody]"},{kind:"directive",type:a.DialogFooterDirective,selector:"div[wmDialogFooter]"},{kind:"component",type:a.DialogHeaderComponent,selector:"div[wmDialogHeader]",inputs:["iconwidth","iconheight","iconmargin","iconclass","iconurl","closable","heading","headinglevel","subheading","titleid","title"]},{kind:"component",type:s.ButtonComponent,selector:"button[wmButton]",exportAs:["wmButton"]}]})}}r.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:r,type:p,decorators:[{type:t.Component,args:[{standalone:!0,imports:[n.TextContentDirective,a.DialogBodyDirective,a.DialogFooterDirective,a.DialogHeaderComponent,s.ButtonComponent],selector:"div[wmAlertDialog]",providers:[n.provideAsWidgetRef(p),n.provideAsDialogRef(p)],template:'<ng-template #dialogTemplate>\n <div wmDialogHeader [closable]="closable"\n [iconclass]="iconclass"\n [iconurl]="iconurl"\n [iconwidth]="iconwidth"\n [iconheight]="iconheight"\n [iconmargin]="iconmargin"\n [heading]="title"\n [headinglevel]="headinglevel"\n [title]="title"\n [titleid]="titleId"></div>\n <div wmDialogBody>\n <p class="app-dialog-message text-{{alerttype}}" [class.app-label]="isPrism" [textContent]="message"></p>\n </div>\n <div wmDialogFooter>\n <button (click)="onOk($event)" [attr.aria-label]="oktext" caption.bind="oktext" class="btn-primary ok-action"\n wmButton></button>\n </div>\n</ng-template>\n'}]}],ctorParameters:()=>[{type:r.Injector},{type:void 0,decorators:[{type:t.Attribute,args:["class"]}]},{type:void 0,decorators:[{type:t.Attribute,args:["modal"]}]},{type:void 0,decorators:[{type:t.Attribute,args:["closable"]}]},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]},{type:l.App}],propDecorators:{dialogTemplate:[{type:t.ViewChild,args:["dialogTemplate",{static:!0}]}]}}),e.AlertDialogComponent=p}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@wm/core"),require("@wm/components/base"),require("@wm/components/dialogs"),require("@wm/components/input/button")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@wm/core","@wm/components/base","@wm/components/dialogs","@wm/components/input/button"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.dialogs=e.wm.components.dialogs||{},e.wm.components.dialogs.confirmdialog={}),e.ng.core,e.wm.core,e.wm.components.base,e.wm.components.dialogs,e.wm.components.input.button)}(this,function(e,t,i,n,a,s){"use strict";var o,r,l=(o=t,r=Object.create(null),o&&Object.keys(o).forEach(function(e){if("default"!==e){var t=Object.getOwnPropertyDescriptor(o,e);Object.defineProperty(r,e,t.get?t:{enumerable:!0,get:function(){return o[e]}})}}),r.default=o,Object.freeze(r));const c={widgetType:"wm-confirmdialog"};class d extends a.BaseDialog{static{this.initializeProps=void n.register("wm-confirmdialog",new Map([["animation",n.PROP_STRING],["canceltext",{value:"CANCEL",...n.PROP_STRING}],["class",n.PROP_STRING],["closable",{value:!0,PROP_BOOLEAN:n.PROP_BOOLEAN}],["iconclass",{value:"wm-sl-l sl-check",PROP_STRING:n.PROP_STRING}],["iconheight",n.PROP_STRING],["iconmargin",n.PROP_STRING],["iconurl",n.PROP_STRING],["iconwidth",n.PROP_STRING],["message",{value:"I am confirm box!",...n.PROP_STRING}],["modal",{value:!1,...n.PROP_BOOLEAN}],["name",n.PROP_STRING],["oktext",{value:"OK",...n.PROP_STRING}],["tabindex",{value:0,...n.PROP_NUMBER}],["headinglevel",{value:"h4",...n.PROP_STRING}],["title",{value:"Confirm",...n.PROP_STRING}]]))}constructor(e,t,n,a,s){null==n&&(n=!1);super(e,c,{class:`app-dialog modal-dialog app-confirm-dialog ${t||""}`,backdrop:"static",keyboard:!i.toBoolean(n)},s)}onEscape(e){}getTemplateRef(){return this.dialogTemplate}onOk(e){this.invokeEventCallback("ok",{$event:e})}onCancel(e){this.invokeEventCallback("cancel",{$event:e})}ngOnInit(){super.ngOnInit(),this.register(this.viewParent)}ngOnDestroy(){this.dialogTemplate=null,super.ngOnDestroy()}static{this.\u0275fac=l.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:l,type:d,deps:[{token:l.Injector},{token:"class",attribute:!0},{token:"modal",attribute:!0},{token:"closable",attribute:!0},{token:"EXPLICIT_CONTEXT",optional:!0}],target:l.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=l.\u0275\u0275ngDeclareComponent({minVersion:"14.0.0",version:"20.3.19",type:d,isStandalone:!0,selector:"div[wmConfirmDialog]",host:{listeners:{"window:keydown.esc":"onEscape($event)"}},providers:[n.provideAsWidgetRef(d),n.provideAsDialogRef(d)],viewQueries:[{propertyName:"dialogTemplate",first:!0,predicate:["dialogTemplate"],descendants:!0,static:!0}],usesInheritance:!0,ngImport:l,template:'<ng-template #dialogTemplate>\n <div wmDialogHeader [closable]="closable"\n [iconclass]="iconclass"\n [iconurl]="iconurl"\n [iconwidth]="iconwidth"\n [iconheight]="iconheight"\n [iconmargin]="iconmargin"\n [heading]="title"\n [headinglevel]="headinglevel"\n [title]="title"\n [titleid]="titleId"></div>\n <div wmDialogBody>\n <p class="app-dialog-message {{messageclass}}">{{ message }}</p>\n </div>\n <div wmDialogFooter>\n <button (click)="onCancel($event)" [attr.aria-label]="canceltext" caption.bind="canceltext" class="btn-default cancel-action"\n wmButton></button>\n <button (click)="onOk($event)" [attr.aria-label]="oktext" caption.bind="oktext" class="btn-primary ok-action"\n wmButton></button>\n </div>\n</ng-template>\n',dependencies:[{kind:"directive",type:a.DialogBodyDirective,selector:"div[wmDialogBody]"},{kind:"directive",type:a.DialogFooterDirective,selector:"div[wmDialogFooter]"},{kind:"component",type:a.DialogHeaderComponent,selector:"div[wmDialogHeader]",inputs:["iconwidth","iconheight","iconmargin","iconclass","iconurl","closable","heading","headinglevel","subheading","titleid","title"]},{kind:"component",type:s.ButtonComponent,selector:"button[wmButton]",exportAs:["wmButton"]}]})}}l.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:l,type:d,decorators:[{type:t.Component,args:[{standalone:!0,imports:[a.DialogBodyDirective,a.DialogFooterDirective,a.DialogHeaderComponent,s.ButtonComponent],selector:"div[wmConfirmDialog]",providers:[n.provideAsWidgetRef(d),n.provideAsDialogRef(d)],template:'<ng-template #dialogTemplate>\n <div wmDialogHeader [closable]="closable"\n [iconclass]="iconclass"\n [iconurl]="iconurl"\n [iconwidth]="iconwidth"\n [iconheight]="iconheight"\n [iconmargin]="iconmargin"\n [heading]="title"\n [headinglevel]="headinglevel"\n [title]="title"\n [titleid]="titleId"></div>\n <div wmDialogBody>\n <p class="app-dialog-message {{messageclass}}">{{ message }}</p>\n </div>\n <div wmDialogFooter>\n <button (click)="onCancel($event)" [attr.aria-label]="canceltext" caption.bind="canceltext" class="btn-default cancel-action"\n wmButton></button>\n <button (click)="onOk($event)" [attr.aria-label]="oktext" caption.bind="oktext" class="btn-primary ok-action"\n wmButton></button>\n </div>\n</ng-template>\n'}]}],ctorParameters:()=>[{type:l.Injector},{type:void 0,decorators:[{type:t.Attribute,args:["class"]}]},{type:void 0,decorators:[{type:t.Attribute,args:["modal"]}]},{type:void 0,decorators:[{type:t.Attribute,args:["closable"]}]},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}],propDecorators:{dialogTemplate:[{type:t.ViewChild,args:["dialogTemplate",{static:!0}]}],onEscape:[{type:t.HostListener,args:["window:keydown.esc",["$event"]]}]}}),e.ConfirmDialogComponent=d}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@wm/core"),require("@wm/components/base"),require("@wm/components/dialogs"),require("@angular/common")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@wm/core","@wm/components/base","@wm/components/dialogs","@angular/common"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.dialogs=e.wm.components.dialogs||{},e.wm.components.dialogs.designdialog={}),e.ng.core,e.wm.core,e.wm.components.base,e.wm.components.dialogs,e.ng.common)}(this,function(e,t,i,n,a,s){"use strict";var o,r,l=(o=t,r=Object.create(null),o&&Object.keys(o).forEach(function(e){if("default"!==e){var t=Object.getOwnPropertyDescriptor(o,e);Object.defineProperty(r,e,t.get?t:{enumerable:!0,get:function(){return o[e]}})}}),r.default=o,Object.freeze(r));const c={widgetType:"wm-dialog"};class d extends a.BaseDialog{static{this.initializeProps=void n.register("wm-dialog",new Map([["animation",n.PROP_STRING],["class",n.PROP_STRING],["closable",{value:!0,...n.PROP_BOOLEAN}],["iconclass",{value:"wi wi-file-text",PROP_STRING:n.PROP_STRING}],["iconheight",n.PROP_STRING],["iconmargin",n.PROP_STRING],["iconurl",n.PROP_STRING],["iconwidth",n.PROP_STRING],["modal",{value:!0,...n.PROP_BOOLEAN}],["name",n.PROP_STRING],["showheader",{value:!0,...n.PROP_BOOLEAN}],["tabindex",{value:0,...n.PROP_NUMBER}],["title",{value:"Information",...n.PROP_STRING}],["headinglevel",{value:"h4",...n.PROP_STRING}],["eventsource",n.PROP_ANY]]))}constructor(e,t,n,a,s,o,r,l){null==n&&(n=!0),null==a&&(a=!0),r[0].closeDialog=()=>this.close();const d=!i.toBoolean(n)||"static";super(e,c,{class:`app-dialog modal-dialog ${t||""}`,backdrop:d,keyboard:!!i.toBoolean(a)||!i.toBoolean(n)},l),this.isDialogComponent=!0,this.sheet=s,this.sheetPosition=o}getTemplateRef(){return this.dialogTemplate}ngOnInit(){super.ngOnInit(),this.register(this.viewParent)}onPropertyChange(e,t,i){"sheet"===e&&(this.sheet=t),"sheetposition"===e&&(this.sheetPosition=t),"title"===e&&this.nativeElement.setAttribute("title",t)}ngOnDestroy(){this.dialogTemplate=null,this.dialogBody=null,this.dialogFooter=null,super.ngOnDestroy()}static{this.\u0275fac=l.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:l,type:d,deps:[{token:l.Injector},{token:"class",attribute:!0},{token:"modal",attribute:!0},{token:"closable",attribute:!0},{token:"sheet",attribute:!0},{token:"sheetposition",attribute:!0},{token:n.Context,self:!0},{token:"EXPLICIT_CONTEXT",optional:!0}],target:l.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=l.\u0275\u0275ngDeclareComponent({minVersion:"17.0.0",version:"20.3.19",type:d,isStandalone:!0,selector:"div[wmDialog]",providers:[n.provideAsWidgetRef(d),n.provideAsDialogRef(d),{provide:n.Context,useFactory:()=>({}),multi:!0}],queries:[{propertyName:"dialogBody",first:!0,predicate:["dialogBody"],descendants:!0,read:t.TemplateRef},{propertyName:"dialogFooter",first:!0,predicate:["dialogFooter"],descendants:!0,read:t.TemplateRef}],viewQueries:[{propertyName:"dialogTemplate",first:!0,predicate:["dialogTemplate"],descendants:!0,read:t.TemplateRef,static:!0}],usesInheritance:!0,ngImport:l,template:'<ng-template #dialogTemplate>\n @if (showheader) {\n <div wmDialogHeader [closable]="closable"\n [iconclass]="iconclass"\n [iconurl]="iconurl"\n [iconwidth]="iconwidth"\n [iconheight]="iconheight"\n [iconmargin]="iconmargin"\n [heading]="title"\n [headinglevel]="headinglevel"\n [title]="title"\n [titleid]="titleId"\n ></div>\n } @else if (!showheader && title) {\n <h4 [id]="titleId" class="sr-only">\n {{ title }}\n </h4>\n }\n <div wmDialogBody>\n <ng-container *ngTemplateOutlet="dialogBody"></ng-container>\n </div>\n <ng-container *ngTemplateOutlet="dialogFooter"></ng-container>\n</ng-template>\n',dependencies:[{kind:"directive",type:a.DialogBodyDirective,selector:"div[wmDialogBody]"},{kind:"component",type:a.DialogHeaderComponent,selector:"div[wmDialogHeader]",inputs:["iconwidth","iconheight","iconmargin","iconclass","iconurl","closable","heading","headinglevel","subheading","titleid","title"]},{kind:"directive",type:s.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]}]})}}l.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:l,type:d,decorators:[{type:t.Component,args:[{standalone:!0,imports:[a.DialogBodyDirective,a.DialogHeaderComponent,s.NgTemplateOutlet],selector:"div[wmDialog]",providers:[n.provideAsWidgetRef(d),n.provideAsDialogRef(d),{provide:n.Context,useFactory:()=>({}),multi:!0}],template:'<ng-template #dialogTemplate>\n @if (showheader) {\n <div wmDialogHeader [closable]="closable"\n [iconclass]="iconclass"\n [iconurl]="iconurl"\n [iconwidth]="iconwidth"\n [iconheight]="iconheight"\n [iconmargin]="iconmargin"\n [heading]="title"\n [headinglevel]="headinglevel"\n [title]="title"\n [titleid]="titleId"\n ></div>\n } @else if (!showheader && title) {\n <h4 [id]="titleId" class="sr-only">\n {{ title }}\n </h4>\n }\n <div wmDialogBody>\n <ng-container *ngTemplateOutlet="dialogBody"></ng-container>\n </div>\n <ng-container *ngTemplateOutlet="dialogFooter"></ng-container>\n</ng-template>\n'}]}],ctorParameters:()=>[{type:l.Injector},{type:void 0,decorators:[{type:t.Attribute,args:["class"]}]},{type:void 0,decorators:[{type:t.Attribute,args:["modal"]}]},{type:void 0,decorators:[{type:t.Attribute,args:["closable"]}]},{type:void 0,decorators:[{type:t.Attribute,args:["sheet"]}]},{type:void 0,decorators:[{type:t.Attribute,args:["sheetposition"]}]},{type:Array,decorators:[{type:t.Self},{type:t.Inject,args:[n.Context]}]},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}],propDecorators:{dialogTemplate:[{type:t.ViewChild,args:["dialogTemplate",{static:!0,read:t.TemplateRef}]}],dialogBody:[{type:t.ContentChild,args:["dialogBody",{read:t.TemplateRef}]}],dialogFooter:[{type:t.ContentChild,args:["dialogFooter",{read:t.TemplateRef}]}]}}),e.DialogComponent=d}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/platform-browser"),require("@wm/core"),require("@wm/components/base"),require("tslib")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/platform-browser","@wm/core","@wm/components/base","tslib"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.page={}),e.ng.core,e.ng.platformBrowser,e.wm.core,e.wm.components.base,e.tslib)}(this,function(e,t,i,n,a,s){"use strict";function o(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var r=o(t),l=o(i),c=o(n);const d={widgetType:"wm-page",hostClass:"app-page container"};class p extends a.StylableComponent{static{this.initializeProps=void a.register("wm-page",new Map([["cache",{value:!1,...a.PROP_BOOLEAN}],["refreshdataonattach",{value:!0,...a.PROP_BOOLEAN}],["pagetitle",a.PROP_STRING],["hint",a.PROP_STRING],["arialabel",a.PROP_STRING]]))}onPropertyChange(e,t,i){"pagetitle"===e?this.titleService.setTitle(t):super.onPropertyChange(e,t,i)}constructor(e,t,i,a){super(e,d,a),this.titleService=t,this.viewport=i,this._eventNotifier=new n.EventNotifier(!1),this.refreshdataonattach=!0}notify(e,...t){this._eventNotifier.notify.apply(this._eventNotifier,arguments)}subscribe(e,t){return this._eventNotifier.subscribe(e,t)}ngAfterViewInit(){setTimeout(()=>{this._eventNotifier.start(),a.updateDeviceView(this.nativeElement,this.getAppInstance().isTabletApplicationType)},1),this.registerDestroyListener(this.viewport.subscribe("resize",e=>{this.invokeEventCallback("resize",{$event:e.$event,widget:this,data:e.data})})),this.registerDestroyListener(this.viewport.subscribe("orientationchange",e=>{this.invokeEventCallback("orientationchange",{$event:e.$event,widget:this,data:e.data})}))}ngOnAttach(){this.titleService.setTitle(this.pagetitle),this.invokeEventCallback("attach",{widget:this}),this.notify("attach",{refreshData:this.refreshdataonattach})}ngOnDetach(){this.invokeEventCallback("detach",{widget:this}),this.notify("detach")}ngOnDestroy(){this.invokeEventCallback("destroy",{widget:this}),this._eventNotifier.destroy()}static{this.\u0275fac=r.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:r,type:p,deps:[{token:r.Injector},{token:l.Title},{token:c.Viewport},{token:"EXPLICIT_CONTEXT",optional:!0}],target:r.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=r.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:p,isStandalone:!0,selector:"[wmPage]",providers:[a.provideAsWidgetRef(p)],exportAs:["wmPage"],usesInheritance:!0,ngImport:r})}}r.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:r,type:p,decorators:[{type:t.Directive,args:[{standalone:!0,selector:"[wmPage]",providers:[a.provideAsWidgetRef(p)],exportAs:"wmPage"}]}],ctorParameters:()=>[{type:r.Injector},{type:l.Title},{type:c.Viewport},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}]});const m={widgetType:"wm-layout",hostClass:"app-page container"};class h extends a.StylableComponent{static{this.initializeProps=void a.register("wm-layout",new Map([]))}constructor(e,t){super(e,m,t),this._eventNotifier=new n.EventNotifier(!1)}notify(e,...t){this._eventNotifier.notify.apply(this._eventNotifier,arguments)}ngAfterViewInit(){setTimeout(()=>{a.updateDeviceView(this.nativeElement,this.getAppInstance().isTabletApplicationType)},1)}ngOnDestroy(){this._eventNotifier&&(this._eventNotifier.destroy(),this._eventNotifier=null),super.ngOnDestroy()}static{this.\u0275fac=r.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:r,type:h,deps:[{token:r.Injector},{token:"EXPLICIT_CONTEXT",optional:!0}],target:r.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=r.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:h,isStandalone:!0,selector:"[wmLayout]",providers:[a.provideAsWidgetRef(h)],exportAs:["wmLayout"],usesInheritance:!0,ngImport:r})}}r.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:r,type:h,decorators:[{type:t.Directive,args:[{standalone:!0,selector:"[wmLayout]",providers:[a.provideAsWidgetRef(h)],exportAs:"wmLayout"}]}],ctorParameters:()=>[{type:r.Injector},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}]});const u={widgetType:"wm-page-content",hostClass:"app-page-content app-content-column"};e.PageContentComponent=class e extends a.StylableComponent{static{this.initializeProps=void a.register("wm-page-content",new Map([["class",a.PROP_STRING],["columnwidth",a.PROP_NUMBER],["content",a.PROP_STRING],["name",a.PROP_STRING],["pulltorefresh",{value:!1,...a.PROP_BOOLEAN}],...a.AUTO_LAYOUT_PROPS,["direction",{value:"column",...a.PROP_STRING}],["alignment",{value:"top-left",...a.PROP_STRING}]]))}constructor(e,t,i){super(e,u,i),this.app=t,a.styler(this.nativeElement,this,a.APPLY_STYLES_TYPE.CONTAINER),this.registerDestroyListener(this.app.subscribe("pullToRefresh:enable",()=>{this.childPullToRefresh=!0,this.initPullToRefresh()}))}onPropertyChange(e,t,i){"columnwidth"===e?n.switchClass(this.nativeElement,`col-md-${t} col-sm-${t}`,`col-md-${i} col-sm-${i}`):"pulltorefresh"===e&&t?setTimeout(()=>{this.initPullToRefresh()}):super.onPropertyChange(e,t,i)}initPullToRefresh(){const e=this.hasEventCallback("pulltorefresh");!this.pullToRefreshIns&&(this.childPullToRefresh||e)&&this.pulltorefresh&&(this.pullToRefreshIns=new a.PullToRefresh($(this.nativeElement),this.app,()=>{e?this.invokeEventCallback("pulltorefresh"):this.app.notify("pulltorefresh")}),this.registerDestroyListener(()=>{this.pullToRefreshIns&&this.pullToRefreshIns.destroy&&(this.pullToRefreshIns.destroy(),this.pullToRefreshIns=null)}))}ngOnDestroy(){this.pullToRefreshIns&&this.pullToRefreshIns.destroy&&(this.pullToRefreshIns.destroy(),this.pullToRefreshIns=null),super.ngOnDestroy()}static{this.\u0275fac=r.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:r,type:e,deps:[{token:r.Injector},{token:c.App},{token:"EXPLICIT_CONTEXT",optional:!0}],target:r.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=r.\u0275\u0275ngDeclareComponent({minVersion:"14.0.0",version:"20.3.19",type:e,isStandalone:!0,selector:"[wmPageContent]",providers:[a.provideAsWidgetRef(e)],usesInheritance:!0,ngImport:r,template:"<ng-content></ng-content>"})}},e.PageContentComponent=s.__decorate([a.AutoLayout(),s.__metadata("design:paramtypes",[t.Injector,n.App,Object])],e.PageContentComponent),r.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:r,type:e.PageContentComponent,decorators:[{type:t.Component,args:[{standalone:!0,selector:"[wmPageContent]",providers:[a.provideAsWidgetRef(e.PageContentComponent)],template:"<ng-content></ng-content>"}]}],ctorParameters:()=>[{type:r.Injector},{type:c.App},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}]});const g={widgetType:"wm-content",hostClass:"app-content clearfix"};class v extends a.StylableComponent{static{this.initializeProps=void a.register("wm-content",new Map([["name",a.PROP_STRING],["class",a.PROP_STRING]]))}constructor(e,t){super(e,g,t),a.styler(this.nativeElement,this)}static{this.\u0275fac=r.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:r,type:v,deps:[{token:r.Injector},{token:"EXPLICIT_CONTEXT",optional:!0}],target:r.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=r.\u0275\u0275ngDeclareComponent({minVersion:"14.0.0",version:"20.3.19",type:v,isStandalone:!0,selector:"[wmContent]",providers:[a.provideAsWidgetRef(v)],usesInheritance:!0,ngImport:r,template:'<div class="row app-content-row clearfix">\n <ng-content></ng-content>\n</div>'})}}r.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:r,type:v,decorators:[{type:t.Component,args:[{standalone:!0,selector:"[wmContent]",providers:[a.provideAsWidgetRef(v)],template:'<div class="row app-content-row clearfix">\n <ng-content></ng-content>\n</div>'}]}],ctorParameters:()=>[{type:r.Injector},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}]});const f={widgetType:"wm-spa-page",hostClass:"app-spa-page"};class b extends a.StylableComponent{static{this.initializeProps=void a.register("wm-spa-page",new Map([["cache",{value:!1,...a.PROP_BOOLEAN}],["refreshdataonattach",{value:!0,...a.PROP_BOOLEAN}],["pagetitle",a.PROP_STRING],["hint",a.PROP_STRING]]))}onPropertyChange(e,t,i){"pagetitle"===e?this.titleService.setTitle(t):super.onPropertyChange(e,t,i)}constructor(e,t,i,a){super(e,f,a),this.titleService=t,this.viewport=i,this._eventNotifier=new n.EventNotifier(!1),this.refreshdataonattach=!0}notify(e,...t){this._eventNotifier.notify.apply(this._eventNotifier,arguments)}subscribe(e,t){return this._eventNotifier.subscribe(e,t)}ngAfterViewInit(){setTimeout(()=>{this._eventNotifier.start(),a.updateDeviceView(this.nativeElement,this.getAppInstance().isTabletApplicationType)},1),this.registerDestroyListener(this.viewport.subscribe("resize",e=>{this.invokeEventCallback("resize",{$event:e.$event,widget:this,data:e.data})})),this.registerDestroyListener(this.viewport.subscribe("orientationchange",e=>{this.invokeEventCallback("orientationchange",{$event:e.$event,widget:this,data:e.data})}))}ngOnAttach(){this.titleService.setTitle(this.pagetitle),this.invokeEventCallback("attach",{widget:this}),this.notify("attach",{refreshData:this.refreshdataonattach})}ngOnDetach(){this.invokeEventCallback("detach",{widget:this}),this.notify("detach")}ngOnDestroy(){this.invokeEventCallback("destroy",{widget:this}),this._eventNotifier.destroy()}static{this.\u0275fac=r.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:r,type:b,deps:[{token:r.Injector},{token:l.Title},{token:c.Viewport},{token:"EXPLICIT_CONTEXT",optional:!0}],target:r.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=r.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:b,isStandalone:!0,selector:"[wmSpaPage]",providers:[a.provideAsWidgetRef(b)],exportAs:["wmSpaPage"],usesInheritance:!0,ngImport:r})}}r.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:r,type:b,decorators:[{type:t.Directive,args:[{standalone:!0,selector:"[wmSpaPage]",providers:[a.provideAsWidgetRef(b)],exportAs:"wmSpaPage"}]}],ctorParameters:()=>[{type:r.Injector},{type:l.Title},{type:c.Viewport},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}]});const y={widgetType:"wm-router-outlet",hostClass:"app-content-column-wrapper"};class w extends a.StylableComponent{static{this.initializeProps=void a.register("wm-router-outlet",new Map([["columnwidth",a.PROP_NUMBER],["name",a.PROP_STRING]]))}constructor(e,t,i){super(e,y,t),this.app=i,this.isPrism=this.app.isPrism}onPropertyChange(e,t,i){"columnwidth"!==e||this.isPrism?super.onPropertyChange(e,t,i):n.switchClass(this.nativeElement,`col-md-${t} col-sm-${t}`,`col-md-${i} col-sm-${i}`)}static{this.\u0275fac=r.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:r,type:w,deps:[{token:r.Injector},{token:"EXPLICIT_CONTEXT",optional:!0},{token:c.App}],target:r.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=r.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:w,isStandalone:!0,selector:"[wmRouterOutlet]",providers:[a.provideAsWidgetRef(w)],usesInheritance:!0,ngImport:r})}}r.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:r,type:w,decorators:[{type:t.Directive,args:[{standalone:!0,selector:"[wmRouterOutlet]",providers:[a.provideAsWidgetRef(w)]}]}],ctorParameters:()=>[{type:r.Injector},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]},{type:c.App}]}),e.ContentComponent=v,e.LayoutDirective=h,e.PageDirective=p,e.RouterOutletDirective=w,e.SpaPageDirective=b}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@wm/components/base")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@wm/components/base"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.page=e.wm.components.page||{},e.wm.components.page.footer={}),e.ng.core,e.wm.components.base)}(this,function(e,t,i){"use strict";var n,a,s=(n=t,a=Object.create(null),n&&Object.keys(n).forEach(function(e){if("default"!==e){var t=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(a,e,t.get?t:{enumerable:!0,get:function(){return n[e]}})}}),a.default=n,Object.freeze(a));const o={widgetType:"wm-footer",hostClass:"app-footer clearfix"};class r extends i.StylableComponent{static{this.initializeProps=void i.register("wm-footer",new Map([["name",i.PROP_STRING],["class",i.PROP_STRING],["content",i.PROP_STRING],["hint",i.PROP_STRING],["arialabel",i.PROP_STRING]]))}constructor(e,t){super(e,o,t),i.styler(this.nativeElement,this,i.APPLY_STYLES_TYPE.CONTAINER)}static{this.\u0275fac=s.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:s,type:r,deps:[{token:s.Injector},{token:"EXPLICIT_CONTEXT",optional:!0}],target:s.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=s.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:r,isStandalone:!0,selector:"[wmFooter]",providers:[i.provideAsWidgetRef(r)],exportAs:["wmFooter"],usesInheritance:!0,ngImport:s})}}s.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:s,type:r,decorators:[{type:t.Directive,args:[{standalone:!0,selector:"[wmFooter]",providers:[i.provideAsWidgetRef(r)],exportAs:"wmFooter"}]}],ctorParameters:()=>[{type:s.Injector},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}]}),e.FooterDirective=r}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@wm/components/base")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@wm/components/base"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.page=e.wm.components.page||{},e.wm.components.page.header={}),e.ng.core,e.wm.components.base)}(this,function(e,t,i){"use strict";var n,a,s=(n=t,a=Object.create(null),n&&Object.keys(n).forEach(function(e){if("default"!==e){var t=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(a,e,t.get?t:{enumerable:!0,get:function(){return n[e]}})}}),a.default=n,Object.freeze(a));const o={widgetType:"wm-header",hostClass:"app-header clearfix"};class r extends i.StylableComponent{static{this.initializeProps=void i.register("wm-header",new Map([["name",i.PROP_STRING],["class",i.PROP_STRING],["content",i.PROP_STRING],["hint",i.PROP_STRING],["arialabel",i.PROP_STRING]]))}constructor(e,t){super(e,o,t),this.isInlineContent=!0,i.styler(this.nativeElement,this,i.APPLY_STYLES_TYPE.CONTAINER)}static{this.\u0275fac=s.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:s,type:r,deps:[{token:s.Injector},{token:"EXPLICIT_CONTEXT",optional:!0}],target:s.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=s.\u0275\u0275ngDeclareComponent({minVersion:"17.0.0",version:"20.3.19",type:r,isStandalone:!0,selector:"[wmHeader]",providers:[i.provideAsWidgetRef(r)],exportAs:["wmHeader"],usesInheritance:!0,ngImport:s,template:'<div class="app-header-menu" data-role="page-left-panel-icon">\n <a class="app-header-action" href="javascript:void(0)" aria-expanded="false" aria-label="Expand Left navigation" role="button">\n <i class="wi wi-menu"></i>\n </a>\n</div>\n<div class="app-header-container" partial-container-target>\n @if (isInlineContent) {\n <ng-content></ng-content>\n }\n</div>\n'})}}s.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:s,type:r,decorators:[{type:t.Component,args:[{standalone:!0,selector:"[wmHeader]",providers:[i.provideAsWidgetRef(r)],exportAs:"wmHeader",template:'<div class="app-header-menu" data-role="page-left-panel-icon">\n <a class="app-header-action" href="javascript:void(0)" aria-expanded="false" aria-label="Expand Left navigation" role="button">\n <i class="wi wi-menu"></i>\n </a>\n</div>\n<div class="app-header-container" partial-container-target>\n @if (isInlineContent) {\n <ng-content></ng-content>\n }\n</div>\n'}]}],ctorParameters:()=>[{type:s.Injector},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}]}),e.HeaderComponent=r}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/router"),require("@wm/core"),require("@wm/components/base"),require("@wm/components/page"),require("@swipey")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/router","@wm/core","@wm/components/base","@wm/components/page","@swipey"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.page=e.wm.components.page||{},e.wm.components.page.leftpanel={}),e.ng.core,e.ng.router,e.wm.core,e.wm.components.base,e.wm.components.page,e.swipey)}(this,function(e,t,i,n,a,s,o){"use strict";function r(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var l=r(t),c=r(i),d=r(n),p=r(s);class m extends o.SwipeAnimation{constructor(e){super(),this.leftPanel=e,this.init(this.leftPanel.$ele,this.leftPanel.$page)}bounds(t,i){let n=0;return this.setGesturesEnabled(this.leftPanel.isGesturesEnabled()),this._width||(this._pageContainerWidth=this.leftPanel.$page.width(),this._leftPanelWidth=this.leftPanel.$ele.width(),this._maxX=this._leftPanelWidth/this._pageContainerWidth*100,this._width=this.leftPanel.animation===e.AnimationType.SLIDE_IN?this._pageContainerWidth:this._leftPanelWidth),this._expanded=this.leftPanel.expanded,this._expanded?{center:this._leftPanelWidth,lower:-(this._leftPanelWidth-n)}:(this.leftPanel.app.isTabletApplicationType&&(n=53.32),t&&(t.pageX||t.touches&&t.touches[0].pageX)>n+100?{strict:!0}:{center:0,upper:this._leftPanelWidth-n})}context(){return{w:this._width,pageW:this._pageContainerWidth,leftW:this._leftPanelWidth,maxX:this._maxX,limit:(e,t,i)=>t<e?e:t>i?i:t}}animation(){return this._$animatedElements=this.leftPanel.$ele,this.leftPanel.animation===e.AnimationType.SLIDE_IN?(this._$animatedElements=this._$animatedElements.add(this.leftPanel.$page),this.leftPanel.app.isTabletApplicationType?[{target:this.leftPanel.$ele,css:{transform:"translate3d(${{ limit(-100, -($d * 100 / leftW), 0) + '%' }}, 0, 0)"}},{target:this.leftPanel.$page,css:{transform:"translate3d(${{ (($d) * 100 / pageW) + '%' }}, 0, 0)",width:"${{ (pageW - $d) + 'px' }}","z-index":101}}]:[{target:this.leftPanel.$ele,css:{transform:"translate3d(-100%, 0, 0)",opacity:1,"z-index":101}},{target:this.leftPanel.$page,css:{transform:"translate3d(${{ limit( 0, ((($D + $d) * 100 / w)), maxX ) + '%' }}, 0, 0)",opacity:1,"z-index":101}}]):{transform:"translate3d(${{ limit( -100, ((($D + $d) * 100 / w) - 100), 0 ) + '%'}}, 0, 0)",opacity:1,"z-index":101}}onLower(){this._expanded=!1,this.leftPanel.collapse(),this.resetTransition(),n.$appDigest()}onUpper(){this._expanded=!0,this.leftPanel.expand(),this.resetTransition(),n.$appDigest()}resetTransition(){this._$animatedElements&&setTimeout(()=>{this._$animatedElements.css({transform:"",opacity:"","z-index":"",width:""})},100)}}const h={widgetType:"wm-left-panel",hostClass:"app-left-panel left-panel-collapsed"};var u;e.AnimationType=void 0,(u=e.AnimationType||(e.AnimationType={})).SLIDE_IN="slide-in",u.SLIDE_OVER="slide-over";class g extends a.StylableComponent{static{this.initializeProps=void a.register("wm-left-panel",new Map([["animation",{value:"slide-in",...a.PROP_STRING}],["class",a.PROP_STRING],["columnwidth",{value:3,...a.PROP_NUMBER}],["content",a.PROP_STRING],["gestures",{value:"on",...a.PROP_STRING}],["name",a.PROP_STRING],["xscolumnwidth",{value:10,...a.PROP_NUMBER}],["hint",a.PROP_STRING],["arialabel",a.PROP_STRING]]))}constructor(e,t,s,o,r,l,c,d){super(o,h,l),this.app=e,this.page=t,this.layout=s,a.styler(this.nativeElement,this,a.APPLY_STYLES_TYPE.CONTAINER),this.$ele=this.$element,this.$page=this.getAttr("spa")&&s&&s.$element||t&&t.$element,n.addClass(this.$page[0],"left-panel-collapsed-container"),this.columnwidth&&this.setLeftPanelWidth(["md","sm"],this.columnwidth),this.app.isTabletApplicationType&&n.addClass(this.nativeElement,"wm-tablet-app-left-panel");const p=r.events.subscribe(e=>{e instanceof i.NavigationStart&&this.collapse()});this.registerDestroyListener(()=>p.unsubscribe()),c||(c="drawer"),this.$element.addClass(n.getNavClass(c)),d&&(this.$element.addClass(n.getNavClass(d)),n.addClass(this.$page[0],n.getNavClass(d)))}collapse(){n.addClass(this.nativeElement,"swipee-transition"),n.switchClass(this.nativeElement,"left-panel-collapsed","left-panel-expanded"),this.expanded&&setTimeout(()=>{const e=$(".app-header-action");e.attr("aria-expanded","false"),e.focus()},50),n.isMobile()&&n.addClass(this.nativeElement,"hidden"),this.expanded=!1,n.switchClass(this.$page[0],"left-panel-collapsed-container","left-panel-expanded-container"),this.animation===e.AnimationType.SLIDE_IN&&(this.setPageWidthAndPosition(["md","sm"],null,this.columnwidth),this.setPageWidthAndPosition(["xs"],null,this.xscolumnwidth)),this._destroyCollapseActionListener&&this._destroyCollapseActionListener(),(this.getAttr("spa")&&this.layout||this.page).notify("wmLeftPanel:collapse")}expand(){n.removeClass(this.nativeElement,"hidden"),n.removeClass(this.nativeElement,"swipee-transition"),n.switchClass(this.nativeElement,"left-panel-expanded","left-panel-collapsed"),this.expanded=!0,this.app.isTabletApplicationType&&this.animation===e.AnimationType.SLIDE_IN||(this._destroyCollapseActionListener=this.listenForCollapseAction()),n.switchClass(this.$page[0],"left-panel-expanded-container","left-panel-collapsed-container"),this.animation===e.AnimationType.SLIDE_IN&&(this.setPageWidthAndPosition(["md","sm"],this.columnwidth),this.setPageWidthAndPosition(["xs"],this.xscolumnwidth)),(this.getAttr("spa")&&this.layout||this.page).notify("wmLeftPanel:expand"),$(".app-header-action").attr("aria-expanded",`${this.expanded}`);const t=a.getKeyboardFocusableElements(this.nativeElement),i=t[0],s=t[t.length-1];setTimeout(()=>{$(i).focus()},50),$(i).on("keydown",e=>{e.shiftKey&&"Tab"===e.key&&this.collapse()}),$(s).on("keydown",e=>{"Tab"===e.key&&this.collapse()}),this.$element.on("keydown",e=>{"Escape"===e.key&&this.collapse()})}isGesturesEnabled(){return"on"===this.gestures}isVisible(){return this.expanded}onPropertyChange(t,i,a){switch(t){case"animation":i===e.AnimationType.SLIDE_IN?(n.removeClass(this.$page[0],"slide-over-left-panel-container"),n.addClass(this.$page[0],"slide-in-left-panel-container"),this.setPageWidthAndPosition(["md","sm"],this.columnwidth),this.setPageWidthAndPosition(["xs"],this.xscolumnwidth)):i===e.AnimationType.SLIDE_OVER&&(n.removeClass(this.$page[0],"slide-in-left-panel-container"),n.addClass(this.$page[0],"slide-over-left-panel-container")),this._leftPanelAnimator=new m(this),n.switchClass(this.nativeElement,i,a);break;case"columnwidth":this.setLeftPanelWidth(["md","sm"],i,a),this.animation===e.AnimationType.SLIDE_IN&&this.setPageWidthAndPosition(["md","sm"],i,a);break;case"expanded":n.toggleClass(this.nativeElement,"left-panel-expanded",i),n.toggleClass(this.nativeElement,"left-panel-collapsed",!i);break;case"xscolumnwidth":this.setLeftPanelWidth(["xs"],i,a),this.animation===e.AnimationType.SLIDE_IN&&this.setPageWidthAndPosition(["xs"],i,a);break;default:super.onPropertyChange(t,i,a)}}toggle(){this.app.isTabletApplicationType?setTimeout(()=>{this.expanded?this.collapse():this.expand()},50):this.$ele.swipeAnimation(this.expanded?"gotoLower":"gotoUpper")}listenForCollapseAction(){const e="click.leftNavToggle";let t=!1;return this.$ele.on(e,()=>{t=!0}),this.$page.on(e,()=>{t||this.toggle(),t=!1}),()=>{this.$ele.off(e),this.$page.off(e)}}setLeftPanelWidth(e,t,i){e.forEach(e=>{t&&n.addClass(this.nativeElement,`col-${e}-${t}`),i&&n.removeClass(this.nativeElement,`col-${e}-${i}`)})}setPageWidthAndPosition(e,t,i){e.forEach(e=>{t&&n.addClass(this.$page[0],`left-panel-container-${e}-${12-t}`),i&&n.removeClass(this.$page[0],`left-panel-container-${e}-${12-i}`)})}ngOnDestroy(){this._destroyCollapseActionListener&&(this._destroyCollapseActionListener(),this._destroyCollapseActionListener=null),this._leftPanelAnimator&&(this._leftPanelAnimator=null),this.$ele=null,this.$page=null,super.ngOnDestroy()}static{this.\u0275fac=l.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:l,type:g,deps:[{token:d.App},{token:p.PageDirective,optional:!0},{token:p.LayoutDirective,optional:!0},{token:l.Injector},{token:c.Router},{token:"EXPLICIT_CONTEXT",optional:!0},{token:"navtype",attribute:!0},{token:"navheight",attribute:!0}],target:l.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=l.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:g,isStandalone:!0,selector:"[wmLeftPanel]",providers:[a.provideAsWidgetRef(g)],exportAs:["wmLeftPanel"],usesInheritance:!0,ngImport:l})}}l.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:l,type:g,decorators:[{type:t.Directive,args:[{standalone:!0,selector:"[wmLeftPanel]",providers:[a.provideAsWidgetRef(g)],exportAs:"wmLeftPanel"}]}],ctorParameters:()=>[{type:d.App},{type:p.PageDirective,decorators:[{type:t.Optional}]},{type:p.LayoutDirective,decorators:[{type:t.Optional}]},{type:l.Injector},{type:c.Router},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]},{type:void 0,decorators:[{type:t.Attribute,args:["navtype"]}]},{type:void 0,decorators:[{type:t.Attribute,args:["navheight"]}]}]}),e.LeftPanelDirective=g}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@wm/core"),require("@wm/components/base")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@wm/core","@wm/components/base"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.page=e.wm.components.page||{},e.wm.components.page.rightpanel={}),e.ng.core,e.wm.core,e.wm.components.base)}(this,function(e,t,i,n){"use strict";var a,s,o=(a=t,s=Object.create(null),a&&Object.keys(a).forEach(function(e){if("default"!==e){var t=Object.getOwnPropertyDescriptor(a,e);Object.defineProperty(s,e,t.get?t:{enumerable:!0,get:function(){return a[e]}})}}),s.default=a,Object.freeze(s));const r={widgetType:"wm-right-panel",hostClass:"app-right-panel"};class l extends n.StylableComponent{static{this.initializeProps=void n.register("wm-right-panel",new Map([["class",n.PROP_STRING],["columnwidth",n.PROP_NUMBER],["content",n.PROP_STRING],["name",n.PROP_STRING],["hint",n.PROP_STRING],["arialabel",n.PROP_STRING]]))}constructor(e,t,a){super(e,r,t),n.styler(this.nativeElement,this,n.APPLY_STYLES_TYPE.CONTAINER),a||(a="drawer"),this.$element.addClass(i.getNavClass(a))}onPropertyChange(e,t,n){"columnwidth"===e?i.switchClass(this.nativeElement,`col-sm-${t}`,n?` col-sm-${n}`:""):super.onPropertyChange(e,t,n)}static{this.\u0275fac=o.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:o,type:l,deps:[{token:o.Injector},{token:"EXPLICIT_CONTEXT",optional:!0},{token:"navtype",attribute:!0}],target:o.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=o.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:l,isStandalone:!0,selector:"[wmRightPanel]",providers:[n.provideAsWidgetRef(l)],exportAs:["wmRightPanel"],usesInheritance:!0,ngImport:o})}}o.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:o,type:l,decorators:[{type:t.Directive,args:[{standalone:!0,selector:"[wmRightPanel]",providers:[n.provideAsWidgetRef(l)],exportAs:"wmRightPanel"}]}],ctorParameters:()=>[{type:o.Injector},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]},{type:void 0,decorators:[{type:t.Attribute,args:["navtype"]}]}]}),e.RightPanelDirective=l}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@wm/components/base")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@wm/components/base"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.page=e.wm.components.page||{},e.wm.components.page.topnav={}),e.ng.core,e.wm.components.base)}(this,function(e,t,i){"use strict";var n,a,s=(n=t,a=Object.create(null),n&&Object.keys(n).forEach(function(e){if("default"!==e){var t=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(a,e,t.get?t:{enumerable:!0,get:function(){return n[e]}})}}),a.default=n,Object.freeze(a));const o={widgetType:"wm-top-nav",hostClass:"app-top-nav"};class r extends i.StylableComponent{static{this.initializeProps=void i.register("wm-top-nav",new Map([["name",i.PROP_STRING],["content",i.PROP_STRING],["hint",i.PROP_STRING],["arialabel",i.PROP_STRING],["class",i.PROP_STRING]]))}constructor(e,t){super(e,o,t),i.styler(this.nativeElement,this)}static{this.\u0275fac=s.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:s,type:r,deps:[{token:s.Injector},{token:"EXPLICIT_CONTEXT",optional:!0}],target:s.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=s.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:r,isStandalone:!0,selector:"[wmTopNav]",providers:[i.provideAsWidgetRef(r)],exportAs:["wmTopNav"],usesInheritance:!0,ngImport:s})}}s.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:s,type:r,decorators:[{type:t.Directive,args:[{standalone:!0,selector:"[wmTopNav]",providers:[i.provideAsWidgetRef(r)],exportAs:"wmTopNav"}]}],ctorParameters:()=>[{type:s.Injector},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}]}),e.TopNavDirective=r}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@wm/core"),require("@wm/components/base"),require("lodash-es")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@wm/core","@wm/components/base","lodash-es"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.prefab={}),e.ng.core,e.wm.core,e.wm.components.base,e._)}(this,function(e,t,i,n,a){"use strict";function s(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var o=s(t),r=s(i);const l=new Map([["animation",n.PROP_STRING],["class",{value:"",...n.PROP_STRING}],["name",n.PROP_STRING],["show",{value:!0,...n.PROP_BOOLEAN}]]),c=new Set;class d extends n.StylableComponent{constructor(e,t,a,s,o){const r=`wm-prefab-${s}`,l={widgetType:r,hostClass:"app-prefab"};let c=i.noop;super(e,l,o,new Promise(e=>c=e)),this.propsReady=c,this.prefabName=s,this.widgetType=r,this.name=t.nativeElement.getAttribute("name"),n.styler(this.nativeElement,this),this.registerReadyStateListener(()=>{super.onPropertyChange("name",this.name)})}onStyleChange(e,t,n){"height"===e&&i.setCSS(this.nativeElement,"overflow","auto")}setProps(e){e&&e.properties&&(c.has(this.widgetType)||n.register(this.widgetType,this.prepareProps(e.properties)),this.propsReady())}handleEvent(){}prepareProps(e={}){const t=new Map(l);return Object.entries(e).forEach(([e,i])=>{let s=n.PROP_TYPE.STRING;"boolean"===i.type?s=n.PROP_TYPE.BOOLEAN:"number"===i.type?s=n.PROP_TYPE.NUMBER:"string"!==i.type&&(s=i.type),t.set(e,{type:s,value:a.startsWith(i.value,"bind:")?void 0:i.value})}),c.add(this.widgetType),t}ngOnDestroy(){this.invokeEventCallback("destroy",{widget:this})}static{this.\u0275fac=o.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:o,type:d,deps:[{token:o.Injector},{token:o.ElementRef},{token:o.ChangeDetectorRef},{token:"prefabname",attribute:!0},{token:"EXPLICIT_CONTEXT",optional:!0}],target:o.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=o.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:d,isStandalone:!0,selector:"section[wmPrefab]",providers:[n.provideAsWidgetRef(d)],usesInheritance:!0,ngImport:o})}}o.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:o,type:d,decorators:[{type:t.Directive,args:[{standalone:!0,selector:"section[wmPrefab]",providers:[n.provideAsWidgetRef(d)]}]}],ctorParameters:()=>[{type:o.Injector},{type:o.ElementRef},{type:o.ChangeDetectorRef},{type:void 0,decorators:[{type:t.Attribute,args:["prefabname"]}]},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}]});const p={widgetType:"wm-prefab-container",hostClass:"app-prefab-container full-height"};class m extends n.StylableComponent{static{this.initializeProps=void n.register("wm-prefab-container",new Map([["class",n.PROP_STRING],["name",n.PROP_STRING],["show",{value:!0,...n.PROP_BOOLEAN}]]))}constructor(e,t,i){super(e,p,i),this.viewport=t,n.styler(this.nativeElement,this),this.registerDestroyListener(this.viewport.subscribe("resize",e=>this.callback("resize",e))),this.registerDestroyListener(this.viewport.subscribe("orientationchange",e=>this.callback("orientationchange",e)))}callback(e,t){t=a.assign({widget:this},t),this.invokeEventCallback(e,t)}ngOnAttach(){this.callback("attach")}ngOnDetach(){this.callback("detach")}ngOnDestroy(){this.callback("destroy"),super.ngOnDestroy()}static{this.\u0275fac=o.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:o,type:m,deps:[{token:o.Injector},{token:r.Viewport},{token:"EXPLICIT_CONTEXT",optional:!0}],target:o.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=o.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:m,isStandalone:!0,selector:"[wmPrefabContainer]",providers:[n.provideAsWidgetRef(m)],usesInheritance:!0,ngImport:o})}}o.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:o,type:m,decorators:[{type:t.Directive,args:[{standalone:!0,selector:"[wmPrefabContainer]",providers:[n.provideAsWidgetRef(m)]}]}],ctorParameters:()=>[{type:o.Injector},{type:r.Viewport},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}]}),e.PrefabContainerDirective=m,e.PrefabDirective=d}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common"),require("@angular/forms"),require("@angular/core"),require("@wm/core"),require("@wm/components/base"),require("lodash-es"),require("ngx-bootstrap/pagination"),require("ngx-bootstrap/dropdown")):"function"==typeof define&&define.amd?define(["exports","@angular/common","@angular/forms","@angular/core","@wm/core","@wm/components/base","lodash-es","ngx-bootstrap/pagination","ngx-bootstrap/dropdown"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.data=e.wm.components.data||{},e.wm.components.data.pagination={}),e.ng.common,e.ng.forms,e.ng.core,e.wm.core,e.wm.components.base,e._,e.ngxBootstrap.pagination,e.ngxBootstrap.dropdown)}(this,function(e,t,i,n,a,s,o,r,l){"use strict";function c(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var d=c(t),p=c(i),m=c(n),h=c(r),u=c(l);const g={widgetType:"wm-pagination",hostClass:"app-datanavigator clearfix"},v={Pager:{small:"pager-sm",large:"pager-lg"},Basic:{small:"pagination-sm",large:"pagination-lg"},Classic:{small:"pagination-sm",large:"pagination-lg"}};class f extends s.StylableComponent{static{this.initializeProps=void s.register("wm-pagination",new Map([["boundarylinks",{value:!1,...s.PROP_BOOLEAN}],["class",s.PROP_STRING],["dataset",s.PROP_ANY],["directionlinks",{value:!0,...s.PROP_BOOLEAN}],["forceellipses",{value:!0,...s.PROP_BOOLEAN}],["allowpagesizechange",{value:!1,...s.PROP_BOOLEAN}],["allowpagesizechange",{value:!1,...s.PROP_BOOLEAN}],["pagesizeoptions",{value:"",...s.PROP_STRING}],["maxResults",s.PROP_NUMBER],["maxsize",{value:5,...s.PROP_NUMBER}],["name",s.PROP_STRING],["navigation",{value:"Basic",...s.PROP_STRING}],["navigationalign",{value:"left",...s.PROP_STRING}],["navigationsize",s.PROP_STRING],["show",{value:!0,...s.PROP_BOOLEAN}],["showrecordcount",s.PROP_BOOLEAN],["tabindex",{value:0,...s.PROP_NUMBER}]]))}_setAriaForBasicNavigation(){o.forEach(this.nativeElement.getElementsByTagName("a"),e=>{e.setAttribute("href","javascript:void(0);");const t=e.querySelector("span");"true"===t?.dataset.isacitvepage&&e.setAttribute("aria-current","true"),"true"===t?.dataset.isdisabled?e.setAttribute("aria-disabled","true"):e.removeAttribute("aria-disabled")})}constructor(e,t,i){super(e,g,i),this.parent=t,this.resultEmitter=new n.EventEmitter,this.maxResultsEmitter=new n.EventEmitter,this.defaultPageSizeOptions=[],this.focusedIndex=0,this.dn={currentPage:1},this.pageCount=0,this.isDisableNext=!0,this.isDisablePrevious=!0,this.isDisableFirst=!0,this.isDisableLast=!0,this._debouncedApplyDataset=a.debounce(()=>this.widget.dataset=this.dataset,s.DEBOUNCE_TIMES.PAGINATION_DEBOUNCE_TIME),this._debouncedPageChanged=a.debounce(e=>{const t=e&&e.page,i=e&&(e.pagesize||e.itemsPerPage)||this.maxResults;if(t!==this.dn.currentPage||this.maxResults!==i){const e=this.parent||this;this.dn.currentPage=t,this.maxResults=i,this.maxResultsEmitter.emit(this.maxResults),e.invokeEventCallback("paginationchange",{$event:void 0,$index:this.dn.currentPage}),this.goToPage(),"Basic"===this.navigation&&this._setAriaForBasicNavigation()}},s.DEBOUNCE_TIMES.PAGINATION_DEBOUNCE_TIME),s.styler(this.nativeElement,this),this._initTimeoutId=setTimeout(()=>{!this.isDestroyed&&this.parent&&(this.allowpagesizechange=this.parent.allowpagesizechange,this.allowpagesizechange&&(this.defaultPageSizeOptions=this.normalizeToNumberArray(this.parent?.pagesizeoptions)))},0)}normalizeToNumberArray(e){if(!e)return[];let t;if(Array.isArray(e))t=e;else{if("string"!=typeof e)return[];{const i=e.trim();if(i.startsWith("[")&&i.endsWith("]"))try{t=JSON.parse(i)}catch{t=[]}else t=i.split(",")}}return t.map(e=>Number(e)).filter(e=>!isNaN(e)).sort((e,t)=>e-t)}setResult(e){this.result=e,this.resultEmitter.emit(this.result)}updateNavSize(){const e=v[this.navcontrols];e&&this.navigationsize?this.navigationClass=e[this.navigationsize]:this.navigationClass=""}resetPageNavigation(){this.pageCount=0,this.dn.currentPage=1,this.dataSize=0}calculatePagingValues(){this.pageCount=this.dataSize>this.maxResults?Math.ceil(this.dataSize/this.maxResults):this.dataSize<0?0:1,this.dn.currentPage=this.dn.currentPage||1}setDefaultPagingValues(e,t,i){e||t?(this.maxResults=t||this.maxResults,this.dataSize=a.isDefined(e)?e:this.dataSize,this.dn.currentPage=i||this.dn.currentPage,this.calculatePagingValues()):(this.pageCount=1,this.dn.currentPage=1,this.maxResults=e,this.dataSize=e),this.maxResultsEmitter.emit(this.maxResults)}checkDataSize(e,t,i){-1===e||e===a.AppConstants.INT_MAX_VALUE?(this.prevshowrecordcount=this.showrecordcount,this.isDisableLast=!0,this.isDisableCount=!0,this.showrecordcount=!1,t<i&&(this.isDisableNext=!0)):(this.isDisableCount=!1,this.showrecordcount=this.prevshowrecordcount||this.showrecordcount)}disableNavigation(){const e=1===this.dn.currentPage,t=this.dn.currentPage===this.pageCount;this.pagination?.next?(this.isDisableFirst=this.isDisablePrevious=!this.pagination.prev,this.isDisableNext=this.isDisableLast=!this.pagination.next):(this.isDisableFirst=this.isDisablePrevious=e,this.isDisableNext=this.isDisableLast=t),this.isDisableCurrent=e&&t,this.dataset&&this.dataset.length&&this.isDisableNext&&this.parent.onDemandLoad&&"wm-table"===this.parent.widgetType&&this.parent.callDataGridMethod("hideLoadingIndicator",this.isDisableNext,this.parent.infScroll)}isDataSourceHasPaging(){return this.datasource&&this.datasource.execute(a.DataSource.Operation.IS_PAGEABLE)}getPaginationStartIndex(){const e=this.datasource?._paginationConfig?.paginationStartIndex;return a.isDefined(e)&&"page"===this.datasource?._paginationConfig?.type?Number(e):1}getPageDetails(e,t,i){this.rowSummary=a.isDefined(e)&&a.isDefined(t)&&a.isDefined(i)?{startIndex:e,endIndex:t,totalRecords:i}:{}}setNonPageableData(e){let t,i,n,s;t=o.isArray(e)?e.length:o.isEmpty(e)?0:1,i=this.options&&this.options.maxResults||t,this.allowpagesizechange&&(i=this.maxResults),n=this.datasource&&(this.datasource.execute(a.DataSource.Operation.IS_API_AWARE)||"wm-table"===this.parent.widgetType&&this.parent.gridOptions.isNavTypeScrollOrOndemand()&&(o.get(this.parent,"gridOptions.lastActionPerformed")===this.parent.gridOptions.ACTIONS.DATASET_UPDATE||!o.get(this.parent,"gridOptions.isNextPageData")))?1:this.dn.currentPage||1,this.setDefaultPagingValues(t,i,n),this.disableNavigation(),s=(this.dn.currentPage-1)*this.maxResults,this.getPageDetails(s+1,Math.min(s+this.maxResults,e?.length),e?.length),this.setResult(o.isArray(e)?e.slice(s,s+this.maxResults):e)}setPagingValues(e){let t,i,n,r,l,c={};this.__fullData=e,this.binddataset?(l=this.datasource||{},c=l._options||{},e?this.isDataSourceHasPaging()?(this.pagination=this.datasource.execute(a.DataSource.Operation.GET_PAGING_OPTIONS)||{},this.filterFields=c.filterFields||{},this.logicalOp=c.logicalOp||"",this.sortOptions=c.orderBy||(o.isArray(this.pagination.sort)?s.getOrderByExpr(this.pagination.sort):""),t=this.pagination.totalElements,i=this.pagination.size=Number(this.pagination.size)?this.pagination.size:o.get(this.datasource.dataSet,this.pagination.size),this.pagination.numberOfElements=Number(this.pagination.numberOfElements)?this.pagination.numberOfElements:o.get(this.datasource.dataSet,this.pagination.numberOfElements),this.pagination.numberOfElements>0?(a.isDefined(this.pagination.number)&&1===this.getPaginationStartIndex()&&(this.dn.currentPage=this.pagination.number+1),n=this.dn.currentPage||1):n=1,this.setDefaultPagingValues(t,i,n),this.disableNavigation(),this.checkDataSize(t,this.pagination.numberOfElements,this.pagination.size),r=(n-1)*this.maxResults,this.getPageDetails(r+1,r+Number(this.pagination.numberOfElements),t),this.setResult(e)):o.isString(e)||this.setNonPageableData(e):(this.setResult(e),this.resetPageNavigation()),"Basic"===this.navigation&&this._setAriaForBasicNavigation()):e&&!o.isString(e)&&this.setNonPageableData(e)}isFirstPage(){return 1===this.dn.currentPage||!this.dn.currentPage}isLastPage(){return this.dn.currentPage===this.pageCount}goToLastPage(e,t,i){this.isLastPage()?e&&this.goToPage(t,i):(this.dn.currentPage=this.pageCount,this.goToPage(t,i))}goToFirstPage(e,t,i){this.isFirstPage()?e&&this.goToPage(t,i):(this.dn.currentPage=1,this.goToPage(t,i))}goToPage(e,t){this.firstRow=(this.dn.currentPage-1)*this.maxResults;const i=this.parent.statePersistence.computeMode(this.statehandler),n=this.parent.allowpagesizechange;if(i&&"none"!==i.toLowerCase()&&("wm-table"===this.parent.widgetType||"wm-list"===this.parent.widgetType)){if(this.parent._selectedItemsExist=!0,this.isFirstPage()&&!n)this.parent.statePersistence.removeWidgetState(this.parent,"pagination");else if(s.unsupportedStatePersistenceTypes.indexOf(this.parent.navigation)<0){const e={pagination:this.dn.currentPage};n&&(e.pagesize=this.maxResults),this.parent.statePersistence.setWidgetState(this.parent,e)}else"wm-list"!==this.parent.widgetType&&"wm-table"!==this.parent.widgetType||console.warn("Retain State handling on Widget "+this.parent.name+" is not supported for current pagination type.");this.parent.currentpage=this.dn.currentPage,this.parent.nativeElement?.setAttribute("currentpage",this.dn.currentPage)}this.getPageData(e,t)}onPageDataReady(e,t,i){this.disableNavigation(),this.invokeSetRecord(e,t),a.triggerFn(i)}getPageData(e,t){let i,n;if(this.isDataSourceHasPaging()){let i=this.dn.currentPage;this.isEditNotInCurrentPage()&&"delete"!==this.parent.gridOptions.lastActionPerformed&&(i=this.parent.actionRowPage),this.datasource.execute(a.DataSource.Operation.LIST_RECORDS,{page:i-1+this.getPaginationStartIndex(),size:this.maxResults,filterFields:this.filterFields,orderBy:this.sortOptions,logicalOp:this.logicalOp,matchMode:"anywhereignorecase"}).then(i=>{this.onPageDataReady(e,i&&i.data,t),n=(this.dn.currentPage-1)*this.maxResults,this.getPageDetails(n+1,n+Number(this.pagination?.numberOfElements),this.pagination?.totalElements),a.$appDigest()},e=>{})}else n=this.isEditNotInCurrentPage()?(this.parent.actionRowPage-1)*this.maxResults:(this.dn.currentPage-1)*this.maxResults,i=o.isArray(this.__fullData)?this.__fullData.slice(n,n+this.maxResults):this.__fullData,this.getPageDetails(n+1,Math.min(n+this.maxResults,this.__fullData?.length),this.__fullData?.length),this.setResult(i),this.onPageDataReady(e,i,t)}isEditNotInCurrentPage(){const e=this.dn.currentPage;return"wm-table"===this.parent.widgetType&&e===this.parent.currentPage&&this.parent.actionRowPage&&this.parent.actionRowPage<e}invokeSetRecord(e,t){const i={currentPage:this.dn.currentPage,size:this.maxResults,totalElements:this.dataSize,totalPages:this.pageCount};this.parent?this.parent.invokeEventCallback("setrecord",{$event:e,$data:t,$index:this.dn.currentPage,pageInfo:i,data:t}):this.invokeEventCallback("setrecord",{$event:e,$data:t,$index:this.dn.currentPage,pageInfo:i,data:t})}validateCurrentPage(e,t){return!e||!(isNaN(this.dn.currentPage)||this.dn.currentPage<=0||this.pageCount&&(this.dn.currentPage>this.pageCount||o.isNull(this.dn.currentPage)))||(this.dn.currentPage<=0?(this.dn.currentPage=1,this.goToPage(e)):this.dn.currentPage>this.pageCount&&(this.dn.currentPage=this.pageCount,this.goToPage(e)),!1)}onModelChange(e){this.validateCurrentPage(e)&&this.goToPage(e)}onKeyDown(e){const t=$(e.target).closest("a");return"KeyE"===e.code?(t.addClass("ng-invalid"),!1):(t.removeClass("ng-invalid"),!0)}pageChanged(e){this._debouncedPageChanged(e)}navigatePage(e,t,i,n){switch(a.isDefined(this.parent.isDataLoading)&&!this.isDisableNext&&(this.parent.isDataLoading=!0,this.parent.infScroll&&(this.parent.variableInflight=!0,this.parent.callDataGridMethod("showLoadingIndicator",this.parent.loadingdatamsg,!0))),"wm-table"===this.parent.widgetType&&this.parent.gridOptions.isNavTypeScrollOrOndemand()&&(this.parent.gridOptions.setLastActionPerformed(this.parent.gridOptions.ACTIONS.DEFAULT),this.parent.gridOptions.setIsDatasetUpdated(!1)),this.invokeEventCallback("paginationchange",{$event:void 0,$index:this.dn.currentPage}),this.dn.currentPage=+this.dn.currentPage,e){case"first":return this.pagination?.next&&this.datasource?.pagination&&(this.datasource.pagination.isNext=!1,this.datasource.pagination.isPrev=!1),void this.goToFirstPage(i,t,n);case"prev":if(!(this.pagination?.next||!this.isFirstPage()&&this.validateCurrentPage(t,n)))return;this.pagination?.next&&(this.datasource.pagination.isNext=!1,this.datasource.pagination.isPrev=!0),this.dn.currentPage-=1;break;case"next":if(!(this.pagination?.next||!this.isLastPage()&&this.validateCurrentPage(t,n)))return;this.pagination?.next&&(this.datasource.pagination.isNext=!0,this.datasource.pagination.isPrev=!1),this.dn.currentPage+=1;break;case"last":return void this.goToLastPage(i,t,n)}this.goToPage(t,n)}setBindDataSet(e,t,i,n,s,o,r){const l=e.split(".");let c;if(this.statehandler=r,"Variables"!==l[0]&&"Widgets"!==l[0]||(c=`${l[0]}.${l[1]}.pagination`),!s&&n&&!o)return this.dataset=n,void(this._debouncedApplyDataset&&this._debouncedApplyDataset());this.binddataset=e,setTimeout(()=>{this.registerDestroyListener(a.$watch(e,t,o?i:{},e=>{e?(this.dataset=e,this._debouncedApplyDataset&&this._debouncedApplyDataset()):this.widget.dataset=e})),c&&this.registerDestroyListener(a.$watch(c,t,{},()=>{this._debouncedApplyDataset&&this._debouncedApplyDataset()}))}),o||(this.datasource=i)}setDataSource(e){this.datasource=e}onPropertyChange(e,t,i){let n;if("dataset"===e){let e;if(e=this.parent&&this.parent.onDataNavigatorDataSetChange?this.parent.onDataNavigatorDataSetChange(t):t,"wm-table"===this.parent.widgetType&&(this.parent._triggeredByUser=!1),e?.length)if(this.isDataSourceHasPaging()){const t=o.get(e,"pagination.size")||o.get(this.datasource,"pagination.size"),i=o.get(e,"pagination.totalElements")||o.get(this.datasource,"pagination.totalElements"),n=this.parent.statePersistence.getWidgetState(this.parent);if(this.actualPageSize=n?.actualpagesize||t,this.actualPageSize=Number(this.actualPageSize)?this.actualPageSize:o.get(this.datasource.dataSet,this.actualPageSize),this.defaultPageSizeOptions.length>0?this.pageSizeOptions=[...this.defaultPageSizeOptions]:this.pageSizeOptions=o.range(this.actualPageSize,Math.max(this.actualPageSize+1,this.actualPageSize+i),this.actualPageSize),n?.selectedItem&&n.actualpagesize!==n.pagesize){this.prevPageSize||(this.prevPageSize=this.actualPageSize||e?.length);const t=this.handleStateParamsforNewPageSize(n.selectedItem,this.prevPageSize,e?.length);t&&(this.parent.statePersistence.setWidgetState(this.parent,{pagination:1,pagesize:this.maxResults,actualpagesize:this.actualPageSize||this.maxResults,selectedItem:t}),this.prevPageSize=void 0)}}else n=this.parent.getActualPageSize(),this.defaultPageSizeOptions.length>0?this.pageSizeOptions=[...this.defaultPageSizeOptions]:this.pageSizeOptions=o.range(n,e.length+n,n);this.isEditNotInCurrentPage()?this.setResult(e):this.setPagingValues(e)}else"navigation"===e?("Advanced"===t&&(this.navigation="Classic"),this.updateNavSize(),this.navcontrols=t):"navigationsize"===e?this.updateNavSize():"navigationalign"===e?a.switchClass(this.nativeElement,`text-${t}`,`text-${i}`):"maxResults"===e?this.setPagingValues(this.dataset):super.onPropertyChange(e,t,i)}handleStateParamsforNewPageSize(e,t,i){return e.map(({page:e,index:n})=>{const a=(e-1)*t+n;return{page:Math.floor(a/i)+1,index:a%i}})}onDropdownKeydown(e,t){const i=$("ul#dropdown-basic a.dropdown-item"),n=this.pageSizeOptions.length-1;let a;switch(e.key){case"ArrowDown":case"Tab":e.preventDefault(),"Tab"===e.key&&e.shiftKey?this.focusedIndex=t-1<0?n:t-1:this.focusedIndex=t+1>n?0:t+1;break;case"ArrowUp":e.preventDefault(),this.focusedIndex=t-1<0?n:t-1;break;case"Enter":return e.preventDefault(),a=this.pageSizeOptions[this.focusedIndex],this.onPageSizeChange(e,a),void this.closeDropdown();case"Escape":return e.preventDefault(),void this.closeDropdown();default:return}setTimeout(()=>{i.eq(this.focusedIndex)?.focus()})}closeDropdown(){this.bsDropdown.hide();$('button[aria-controls="dropdown-basic"]').focus()}onOpenChange(e){e&&(this.focusedIndex=0,setTimeout(()=>{const e=$("ul#dropdown-basic a.dropdown-item").eq(this.focusedIndex);e?.focus()},0))}onPageSizeChange(e,t){const i=this.parent.statePersistence.getWidgetState(this.parent);let n;i?.selectedItem&&(n=this.handleStateParamsforNewPageSize(i.selectedItem,this.maxResults,+t)),this.actualPageSize=this.actualPageSize||this.maxResults,this.maxResults=+t,this.maxResultsEmitter.emit(this.maxResults),this.isDataSourceHasPaging()&&this.datasource&&(this.datasource.maxResults=this.maxResults),n?this.parent.statePersistence.setWidgetState(this.parent,{pagination:1,pagesize:this.maxResults,actualpagesize:this.actualPageSize||this.maxResults,selectedItem:n}):this.parent.statePersistence.setWidgetState(this.parent,{pagination:1,pagesize:this.maxResults,actualpagesize:this.actualPageSize||this.maxResults}),this.navigatePage("first",e,!0),this.calculatePagingValues(),this.nativeElement.closest("popover-container, .popover")&&(e.stopPropagation(),this.bsDropdown.hide())}onDropDownShown(e){const t=e?._element?.nativeElement;t&&(a.adjustVerticalPosition($(t),this.nativeElement?.querySelector(".items-per-page div"),this.bsDropdown._dropdown,$(t?.querySelector('ul[id="dropdown-basic"]'))),this.dropdownScrollHandler=()=>{this.onDropdownScroll()},window.addEventListener("scroll",this.dropdownScrollHandler,!0))}onDropdownScroll(){}onDropdownHidden(){this.dropdownScrollHandler&&window.removeEventListener("scroll",this.dropdownScrollHandler,!0),this.dropdownScrollHandler=void 0}ngAfterViewInit(){this.nativeElement.onclick=e=>{e.stopPropagation()}}ngOnDestroy(){this.dropdownScrollHandler&&window.removeEventListener("scroll",this.dropdownScrollHandler,!0),this._initTimeoutId&&(clearTimeout(this._initTimeoutId),this._initTimeoutId=null),this.resultEmitter&&this.resultEmitter.complete(),this.maxResultsEmitter&&this.maxResultsEmitter.complete(),this._debouncedApplyDataset=null,this._debouncedPageChanged=null,this.dataset=null,this.__fullData=null,this.result=null,this.filterFields=null,this.sortOptions=null,this.options=null,this.pageSizeOptions&&(this.pageSizeOptions=[]),this.defaultPageSizeOptions&&(this.defaultPageSizeOptions=[]),this.datasource=null,this.parent=null,super.ngOnDestroy()}static{this.\u0275fac=m.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:m,type:f,deps:[{token:m.Injector},{token:s.WidgetRef,skipSelf:!0},{token:"EXPLICIT_CONTEXT",optional:!0}],target:m.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=m.\u0275\u0275ngDeclareComponent({minVersion:"17.0.0",version:"20.3.19",type:f,isStandalone:!0,selector:"[wmPagination]",outputs:{resultEmitter:"resultEmitter",maxResultsEmitter:"maxResultsEmitter"},providers:[s.provideAsWidgetRef(f)],viewQueries:[{propertyName:"bsDropdown",first:!0,predicate:l.BsDropdownDirective,descendants:!0}],usesInheritance:!0,ngImport:m,template:'\n@if (navcontrols === \'Classic\') {\n<ul class="pagination advanced {{navigationClass}}">\n @if (allowpagesizechange && pageSizeOptions?.[0]<rowSummary?.totalRecords) {\n <li class="items-per-page">\n <label [title]="appLocale.LABEL_ITEMS_PER_PAGE" class="app-label">{{appLocale.LABEL_ITEMS_PER_PAGE}} :</label>\n\n <div class="btn-group" dropdown container="body" (onShown)="onDropDownShown($event)" (onHidden)="onDropdownHidden()" (isOpenChange)="onOpenChange($event)">\n <button id="button-basic" dropdownToggle type="button" class="btn app-button dropdown-toggle"\n aria-controls="dropdown-basic">\n {{maxResults}} <span class="caret"></span>\n </button>\n <ul id="dropdown-basic" *dropdownMenu class="dropdown-menu pagesize-options"\n role="menu" aria-labelledby="button-basic">\n @for (option of pageSizeOptions; track option; let i = $index) {\n <li role="menuitem" [ngClass]="{ \'active\': option == maxResults }">\n <a class="dropdown-item" (click)="onPageSizeChange($event, option)" (keydown)="onDropdownKeydown($event, i)"\n [attr.tabindex]="i === focusedIndex ? 0 : -1">{{option}}</a>\n </li>\n }\n </ul>\n </div>\n </li>\n @if (rowSummary?.totalRecords) {\n <li class="item-range">\n <div>\n <span>{{rowSummary.startIndex}} - {{rowSummary.endIndex}}</span>\n <span>of</span>\n <span>{{rowSummary.totalRecords}}</span>\n </div>\n </li>\n }\n }\n @if (!(dataSize<=maxResults)) {\n <li [ngClass]="{\'disabled\':isDisableFirst}">\n <a [title]="appLocale.LABEL_FIRST" name="first" href="javascript:void(0);"\n [attr.aria-disabled]="isDisableFirst"\n (click)="navigatePage(\'first\', $event)">\n <span aria-hidden="true"><i class="wi wi-first-page"></i></span>\n <span class="sr-only">Go to first page {{ isDisableFirst ? \' , Disabled\' : \'\'}}</span>\n </a>\n </li>\n }\n @if (!(dataSize<=maxResults)) {\n <li [ngClass]="{\'disabled\':isDisablePrevious}">\n <a [title]="appLocale.LABEL_PREVIOUS" name="prev" href="javascript:void(0);"\n [attr.aria-disabled]="isDisablePrevious"\n (click)="navigatePage(\'prev\', $event)">\n <span aria-hidden="true"><i class="wi wi-chevron-left"></i></span>\n <span class="sr-only">Go to previous page {{ isDisablePrevious ? \', Disabled\' : \'\'}}</span>\n </a>\n </li>\n }\n @if (!(dataSize<=maxResults)) {\n <li class="pagecount disabled">\n <a href="javascript:void(0);" aria-label="Change Page Number">\n <input [(ngModel)]="dn.currentPage" [attr.aria-label]="\'Showing Page \' + dn.currentPage + \' of \' + pageCount" [disabled]="isDisableCurrent"\n [ngModelOptions]="{standalone: true}"\n type="number"\n (keydown)="onKeyDown($event)" (change)="onModelChange($event)" class="form-control"/>\n </a>\n </li>\n }\n @if (!(dataSize<=maxResults)) {\n <li class="disabled">\n <a [hidden]="isDisableCount"> / {{pageCount}}</a>\n </li>\n }\n @if (!(dataSize<=maxResults)) {\n <li [ngClass]="{\'disabled\':isDisableNext}">\n <a [title]="appLocale.LABEL_NEXT" name="next" href="javascript:void(0);"\n [attr.aria-disabled]="isDisableNext"\n (click)="navigatePage(\'next\', $event)">\n <span aria-hidden="true"><i class="wi wi-chevron-right"></i></span>\n <span class="sr-only">Go to next page {{ isDisableNext ? \' , Disabled\' : \'\'}}</span>\n </a>\n </li>\n }\n @if (!(dataSize<=maxResults)) {\n <li [ngClass]="{\'disabled\':isDisableLast}">\n <a [title]="appLocale.LABEL_LAST" name="last" href="javascript:void(0);"\n [attr.aria-disabled]="isDisableLast"\n (click)="navigatePage(\'last\', $event)">\n <span aria-hidden="true"><i class="wi wi-last-page"></i></span>\n <span class="sr-only">Go to last page {{ isDisableLast ? \' , Disabled\' : \'\'}}</span>\n </a>\n </li>\n }\n @if (showrecordcount) {\n <li class="totalcount disabled">\n <a href="javascript:void(0);" tabindex="-1" aria-disabled="true">{{appLocale.LABEL_TOTAL_RECORDS}}: {{dataSize}}</a>\n </li>\n }\n</ul>\n}\n@if (navcontrols === \'Pager\') {\n <ul class="pager {{navigationClass}}">\n @if (allowpagesizechange && pageSizeOptions?.[0]<rowSummary?.totalRecords) {\n <li class="items-per-page">\n <label [title]="appLocale.LABEL_ITEMS_PER_PAGE" class="app-label">{{appLocale.LABEL_ITEMS_PER_PAGE}} :</label>\n\n <div class="btn-group" dropdown container="body" (onShown)="onDropDownShown($event)" (onHidden)="onDropdownHidden()" (isOpenChange)="onOpenChange($event)">\n <button id="button-basic" dropdownToggle type="button" class="btn app-button dropdown-toggle"\n aria-controls="dropdown-basic">\n {{maxResults}} <span class="caret"></span>\n </button>\n <ul id="dropdown-basic" *dropdownMenu class="dropdown-menu pagesize-options"\n role="menu" aria-labelledby="button-basic">\n @for (option of pageSizeOptions; track option; let i = $index) {\n <li role="menuitem" [ngClass]="{ \'active\': option == maxResults }">\n <a class="dropdown-item" (click)="onPageSizeChange($event, option)" (keydown)="onDropdownKeydown($event, i)"\n [attr.tabindex]="i === focusedIndex ? 0 : -1">{{option}}</a>\n </li>\n }\n </ul>\n </div>\n </li>\n @if (rowSummary?.totalRecords) {\n <li class="item-range">\n <div>\n <span>{{rowSummary.startIndex}} - {{rowSummary.endIndex}}</span>\n <span>of</span>\n <span>{{rowSummary.totalRecords}}</span>\n </div>\n </li>\n }\n }\n@if (!(dataSize<=maxResults)) {\n <li class="previous" [ngClass]="{\'disabled\':isDisablePrevious}">\n <a href="javascript:void(0);" (click)="navigatePage(\'prev\', $event)"\n [attr.aria-disabled]="isDisablePrevious">\n <span aria-hidden="true"><i class="wi wi-chevron-left"></i></span>\n {{appLocale.LABEL_PREVIOUS}}\n <span class="sr-only">{{ isDisablePrevious ? \' , Disabled\' : \'\'}}</span>\n </a>\n </li>\n <li class="next" [ngClass]="{\'disabled\':isDisableNext}">\n <a href="javascript:void(0);" (click)="navigatePage(\'next\', $event)"\n [attr.aria-disabled]="isDisableNext">\n <span aria-hidden="true"><i class="wi wi-chevron-right"></i></span>\n {{appLocale.LABEL_NEXT}}\n <span class="sr-only">{{ isDisableNext ? \' , Disabled\' : \'\'}}</span>\n </a>\n </li>\n }\n </ul>\n}\n\n@if (navcontrols === \'Basic\') {\n @if (allowpagesizechange && pageSizeOptions?.[0]<rowSummary?.totalRecords) {\n <div class="items-per-page">\n <label [title]="appLocale.LABEL_ITEMS_PER_PAGE" class="app-label">{{appLocale.LABEL_ITEMS_PER_PAGE }} :</label>\n\n <div class="btn-group" dropdown container="body" (onShown)="onDropDownShown($event)" (onHidden)="onDropdownHidden()" (isOpenChange)="onOpenChange($event)">\n <button id="button-basic" dropdownToggle type="button" class="btn app-button dropdown-toggle"\n aria-controls="dropdown-basic">\n {{maxResults}} <span class="caret"></span>\n </button>\n <ul id="dropdown-basic" *dropdownMenu class="dropdown-menu pagesize-options"\n role="menu" aria-labelledby="button-basic">\n @for (option of pageSizeOptions; track option; let i = $index) {\n <li role="menuitem" [ngClass]="{ \'active\': option == maxResults }">\n <a class="dropdown-item" (click)="onPageSizeChange($event, option)" (keydown)="onDropdownKeydown($event, i)"\n [attr.tabindex]="i === focusedIndex ? 0 : -1">{{option}}</a>\n </li>\n }\n </ul>\n </div>\n </div>\n @if (rowSummary?.totalRecords) {\n <div class="item-range">\n <div>\n <span>{{rowSummary.startIndex}} - {{rowSummary.endIndex}}</span>\n <span>of</span>\n <span>{{rowSummary.totalRecords}}</span>\n </div>\n </div>\n }\n }\n @if (!(dataSize<=maxResults)) {\n <pagination class="pagination basic" [ngClass]="navigationClass" role="navigation"\n [itemsPerPage]="maxResults" [totalItems]="dataSize"\n (pageChanged)="pageChanged($event)" [ngModelOptions]="{standalone:true}" [ngModel]="dn.currentPage"\n [attr.aria-label]="\'Showing Page \' + dn.currentPage + \' of \' + pageCount + \' pages\'"\n [boundaryLinks]="boundarylinks" [maxSize]="maxsize"\n [directionLinks]="directionlinks"\n firstText="Firtst" lastText="Last"\n [customPreviousTemplate]="prevTemplate"\n [customNextTemplate]="nextTemplate"\n [customPageTemplate]="pageTemplate"></pagination>\n }\n}\n\n@if (navcontrols === \'Basic\' && showrecordcount) {\n <ul class="pagination">\n <li class="totalcount disabled basiccount">\n <a href="javascript:void(0);" tabindex="-1" aria-disabled="true">{{appLocale.LABEL_TOTAL_RECORDS}}: {{dataSize}}</a>\n </li>\n </ul>\n}\n\n<ng-template #pageTemplate let-page>\n <span class="sr-only" [attr.data-isacitvepage]="page.active">{{\'Page \'}}</span>\n {{page.number}}\n @if (page.active) {\n <span class="sr-only"> {{\', Showing page \' + page.number + \' of \' + pageCount}}</span>\n }\n</ng-template>\n<ng-template #prevTemplate let-disabled="disabled">\n <span class="sr-only" [attr.data-isdisabled]="disabled">Go to Previous page {{disabled ? \', Disabled\' : \'\'}}</span>\n</ng-template>\n<ng-template #nextTemplate let-disabled="disabled">\n <span class="sr-only" [attr.data-isdisabled]="disabled">Go to Next page {{disabled ? \', Disabled\' : \'\'}}</span>\n</ng-template>\n',dependencies:[{kind:"ngmodule",type:t.CommonModule},{kind:"directive",type:d.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"ngmodule",type:i.FormsModule},{kind:"directive",type:p.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:p.NumberValueAccessor,selector:"input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]"},{kind:"directive",type:p.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:p.NgModel,selector:"[ngModel]:not([formControlName]):not([formControl])",inputs:["name","disabled","ngModel","ngModelOptions"],outputs:["ngModelChange"],exportAs:["ngModel"]},{kind:"ngmodule",type:r.PaginationModule},{kind:"component",type:h.PaginationComponent,selector:"pagination",inputs:["align","maxSize","boundaryLinks","directionLinks","firstText","previousText","nextText","lastText","rotate","pageBtnClass","disabled","customPageTemplate","customNextTemplate","customPreviousTemplate","customFirstTemplate","customLastTemplate","itemsPerPage","totalItems"],outputs:["numPages","pageChanged"]},{kind:"ngmodule",type:l.BsDropdownModule},{kind:"directive",type:u.BsDropdownMenuDirective,selector:"[bsDropdownMenu],[dropdownMenu]",exportAs:["bs-dropdown-menu"]},{kind:"directive",type:u.BsDropdownToggleDirective,selector:"[bsDropdownToggle],[dropdownToggle]",exportAs:["bs-dropdown-toggle"]},{kind:"directive",type:u.BsDropdownDirective,selector:"[bsDropdown], [dropdown]",inputs:["placement","triggers","container","dropup","autoClose","isAnimated","insideClick","isDisabled","isOpen"],outputs:["isOpenChange","onShown","onHidden"],exportAs:["bs-dropdown"]}]})}}m.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:m,type:f,decorators:[{type:n.Component,args:[{standalone:!0,imports:[t.CommonModule,i.FormsModule,r.PaginationModule,l.BsDropdownModule],selector:"[wmPagination]",providers:[s.provideAsWidgetRef(f)],template:'\n@if (navcontrols === \'Classic\') {\n<ul class="pagination advanced {{navigationClass}}">\n @if (allowpagesizechange && pageSizeOptions?.[0]<rowSummary?.totalRecords) {\n <li class="items-per-page">\n <label [title]="appLocale.LABEL_ITEMS_PER_PAGE" class="app-label">{{appLocale.LABEL_ITEMS_PER_PAGE}} :</label>\n\n <div class="btn-group" dropdown container="body" (onShown)="onDropDownShown($event)" (onHidden)="onDropdownHidden()" (isOpenChange)="onOpenChange($event)">\n <button id="button-basic" dropdownToggle type="button" class="btn app-button dropdown-toggle"\n aria-controls="dropdown-basic">\n {{maxResults}} <span class="caret"></span>\n </button>\n <ul id="dropdown-basic" *dropdownMenu class="dropdown-menu pagesize-options"\n role="menu" aria-labelledby="button-basic">\n @for (option of pageSizeOptions; track option; let i = $index) {\n <li role="menuitem" [ngClass]="{ \'active\': option == maxResults }">\n <a class="dropdown-item" (click)="onPageSizeChange($event, option)" (keydown)="onDropdownKeydown($event, i)"\n [attr.tabindex]="i === focusedIndex ? 0 : -1">{{option}}</a>\n </li>\n }\n </ul>\n </div>\n </li>\n @if (rowSummary?.totalRecords) {\n <li class="item-range">\n <div>\n <span>{{rowSummary.startIndex}} - {{rowSummary.endIndex}}</span>\n <span>of</span>\n <span>{{rowSummary.totalRecords}}</span>\n </div>\n </li>\n }\n }\n @if (!(dataSize<=maxResults)) {\n <li [ngClass]="{\'disabled\':isDisableFirst}">\n <a [title]="appLocale.LABEL_FIRST" name="first" href="javascript:void(0);"\n [attr.aria-disabled]="isDisableFirst"\n (click)="navigatePage(\'first\', $event)">\n <span aria-hidden="true"><i class="wi wi-first-page"></i></span>\n <span class="sr-only">Go to first page {{ isDisableFirst ? \' , Disabled\' : \'\'}}</span>\n </a>\n </li>\n }\n @if (!(dataSize<=maxResults)) {\n <li [ngClass]="{\'disabled\':isDisablePrevious}">\n <a [title]="appLocale.LABEL_PREVIOUS" name="prev" href="javascript:void(0);"\n [attr.aria-disabled]="isDisablePrevious"\n (click)="navigatePage(\'prev\', $event)">\n <span aria-hidden="true"><i class="wi wi-chevron-left"></i></span>\n <span class="sr-only">Go to previous page {{ isDisablePrevious ? \', Disabled\' : \'\'}}</span>\n </a>\n </li>\n }\n @if (!(dataSize<=maxResults)) {\n <li class="pagecount disabled">\n <a href="javascript:void(0);" aria-label="Change Page Number">\n <input [(ngModel)]="dn.currentPage" [attr.aria-label]="\'Showing Page \' + dn.currentPage + \' of \' + pageCount" [disabled]="isDisableCurrent"\n [ngModelOptions]="{standalone: true}"\n type="number"\n (keydown)="onKeyDown($event)" (change)="onModelChange($event)" class="form-control"/>\n </a>\n </li>\n }\n @if (!(dataSize<=maxResults)) {\n <li class="disabled">\n <a [hidden]="isDisableCount"> / {{pageCount}}</a>\n </li>\n }\n @if (!(dataSize<=maxResults)) {\n <li [ngClass]="{\'disabled\':isDisableNext}">\n <a [title]="appLocale.LABEL_NEXT" name="next" href="javascript:void(0);"\n [attr.aria-disabled]="isDisableNext"\n (click)="navigatePage(\'next\', $event)">\n <span aria-hidden="true"><i class="wi wi-chevron-right"></i></span>\n <span class="sr-only">Go to next page {{ isDisableNext ? \' , Disabled\' : \'\'}}</span>\n </a>\n </li>\n }\n @if (!(dataSize<=maxResults)) {\n <li [ngClass]="{\'disabled\':isDisableLast}">\n <a [title]="appLocale.LABEL_LAST" name="last" href="javascript:void(0);"\n [attr.aria-disabled]="isDisableLast"\n (click)="navigatePage(\'last\', $event)">\n <span aria-hidden="true"><i class="wi wi-last-page"></i></span>\n <span class="sr-only">Go to last page {{ isDisableLast ? \' , Disabled\' : \'\'}}</span>\n </a>\n </li>\n }\n @if (showrecordcount) {\n <li class="totalcount disabled">\n <a href="javascript:void(0);" tabindex="-1" aria-disabled="true">{{appLocale.LABEL_TOTAL_RECORDS}}: {{dataSize}}</a>\n </li>\n }\n</ul>\n}\n@if (navcontrols === \'Pager\') {\n <ul class="pager {{navigationClass}}">\n @if (allowpagesizechange && pageSizeOptions?.[0]<rowSummary?.totalRecords) {\n <li class="items-per-page">\n <label [title]="appLocale.LABEL_ITEMS_PER_PAGE" class="app-label">{{appLocale.LABEL_ITEMS_PER_PAGE}} :</label>\n\n <div class="btn-group" dropdown container="body" (onShown)="onDropDownShown($event)" (onHidden)="onDropdownHidden()" (isOpenChange)="onOpenChange($event)">\n <button id="button-basic" dropdownToggle type="button" class="btn app-button dropdown-toggle"\n aria-controls="dropdown-basic">\n {{maxResults}} <span class="caret"></span>\n </button>\n <ul id="dropdown-basic" *dropdownMenu class="dropdown-menu pagesize-options"\n role="menu" aria-labelledby="button-basic">\n @for (option of pageSizeOptions; track option; let i = $index) {\n <li role="menuitem" [ngClass]="{ \'active\': option == maxResults }">\n <a class="dropdown-item" (click)="onPageSizeChange($event, option)" (keydown)="onDropdownKeydown($event, i)"\n [attr.tabindex]="i === focusedIndex ? 0 : -1">{{option}}</a>\n </li>\n }\n </ul>\n </div>\n </li>\n @if (rowSummary?.totalRecords) {\n <li class="item-range">\n <div>\n <span>{{rowSummary.startIndex}} - {{rowSummary.endIndex}}</span>\n <span>of</span>\n <span>{{rowSummary.totalRecords}}</span>\n </div>\n </li>\n }\n }\n@if (!(dataSize<=maxResults)) {\n <li class="previous" [ngClass]="{\'disabled\':isDisablePrevious}">\n <a href="javascript:void(0);" (click)="navigatePage(\'prev\', $event)"\n [attr.aria-disabled]="isDisablePrevious">\n <span aria-hidden="true"><i class="wi wi-chevron-left"></i></span>\n {{appLocale.LABEL_PREVIOUS}}\n <span class="sr-only">{{ isDisablePrevious ? \' , Disabled\' : \'\'}}</span>\n </a>\n </li>\n <li class="next" [ngClass]="{\'disabled\':isDisableNext}">\n <a href="javascript:void(0);" (click)="navigatePage(\'next\', $event)"\n [attr.aria-disabled]="isDisableNext">\n <span aria-hidden="true"><i class="wi wi-chevron-right"></i></span>\n {{appLocale.LABEL_NEXT}}\n <span class="sr-only">{{ isDisableNext ? \' , Disabled\' : \'\'}}</span>\n </a>\n </li>\n }\n </ul>\n}\n\n@if (navcontrols === \'Basic\') {\n @if (allowpagesizechange && pageSizeOptions?.[0]<rowSummary?.totalRecords) {\n <div class="items-per-page">\n <label [title]="appLocale.LABEL_ITEMS_PER_PAGE" class="app-label">{{appLocale.LABEL_ITEMS_PER_PAGE }} :</label>\n\n <div class="btn-group" dropdown container="body" (onShown)="onDropDownShown($event)" (onHidden)="onDropdownHidden()" (isOpenChange)="onOpenChange($event)">\n <button id="button-basic" dropdownToggle type="button" class="btn app-button dropdown-toggle"\n aria-controls="dropdown-basic">\n {{maxResults}} <span class="caret"></span>\n </button>\n <ul id="dropdown-basic" *dropdownMenu class="dropdown-menu pagesize-options"\n role="menu" aria-labelledby="button-basic">\n @for (option of pageSizeOptions; track option; let i = $index) {\n <li role="menuitem" [ngClass]="{ \'active\': option == maxResults }">\n <a class="dropdown-item" (click)="onPageSizeChange($event, option)" (keydown)="onDropdownKeydown($event, i)"\n [attr.tabindex]="i === focusedIndex ? 0 : -1">{{option}}</a>\n </li>\n }\n </ul>\n </div>\n </div>\n @if (rowSummary?.totalRecords) {\n <div class="item-range">\n <div>\n <span>{{rowSummary.startIndex}} - {{rowSummary.endIndex}}</span>\n <span>of</span>\n <span>{{rowSummary.totalRecords}}</span>\n </div>\n </div>\n }\n }\n @if (!(dataSize<=maxResults)) {\n <pagination class="pagination basic" [ngClass]="navigationClass" role="navigation"\n [itemsPerPage]="maxResults" [totalItems]="dataSize"\n (pageChanged)="pageChanged($event)" [ngModelOptions]="{standalone:true}" [ngModel]="dn.currentPage"\n [attr.aria-label]="\'Showing Page \' + dn.currentPage + \' of \' + pageCount + \' pages\'"\n [boundaryLinks]="boundarylinks" [maxSize]="maxsize"\n [directionLinks]="directionlinks"\n firstText="Firtst" lastText="Last"\n [customPreviousTemplate]="prevTemplate"\n [customNextTemplate]="nextTemplate"\n [customPageTemplate]="pageTemplate"></pagination>\n }\n}\n\n@if (navcontrols === \'Basic\' && showrecordcount) {\n <ul class="pagination">\n <li class="totalcount disabled basiccount">\n <a href="javascript:void(0);" tabindex="-1" aria-disabled="true">{{appLocale.LABEL_TOTAL_RECORDS}}: {{dataSize}}</a>\n </li>\n </ul>\n}\n\n<ng-template #pageTemplate let-page>\n <span class="sr-only" [attr.data-isacitvepage]="page.active">{{\'Page \'}}</span>\n {{page.number}}\n @if (page.active) {\n <span class="sr-only"> {{\', Showing page \' + page.number + \' of \' + pageCount}}</span>\n }\n</ng-template>\n<ng-template #prevTemplate let-disabled="disabled">\n <span class="sr-only" [attr.data-isdisabled]="disabled">Go to Previous page {{disabled ? \', Disabled\' : \'\'}}</span>\n</ng-template>\n<ng-template #nextTemplate let-disabled="disabled">\n <span class="sr-only" [attr.data-isdisabled]="disabled">Go to Next page {{disabled ? \', Disabled\' : \'\'}}</span>\n</ng-template>\n'}]}],ctorParameters:()=>[{type:m.Injector},{type:void 0,decorators:[{type:n.SkipSelf},{type:n.Inject,args:[s.WidgetRef]}]},{type:void 0,decorators:[{type:n.Inject,args:["EXPLICIT_CONTEXT"]},{type:n.Optional}]}],propDecorators:{resultEmitter:[{type:n.Output}],maxResultsEmitter:[{type:n.Output}],bsDropdown:[{type:n.ViewChild,args:[l.BsDropdownDirective]}]}}),e.PaginationComponent=f}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common"),require("@wm/components/base"),require("@wm/components/basic/picture"),require("@wm/components/navigation/menu"),require("@angular/core"),require("@wm/core")):"function"==typeof define&&define.amd?define(["exports","@angular/common","@wm/components/base","@wm/components/basic/picture","@wm/components/navigation/menu","@angular/core","@wm/core"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.data=e.wm.components.data||{},e.wm.components.data.card={}),e.ng.common,e.wm.components.base,e.wm.components.basic.picture,e.wm.components.navigation.menu,e.ng.core,e.wm.core)}(this,function(e,t,i,n,a,s,o){"use strict";function r(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var l=r(t),c=r(s);const d={widgetType:"wm-card",hostClass:"app-card card app-panel"};class p extends a.MenuAdapterComponent{static{this.initializeProps=void i.register("wm-card",new Map([["actions",i.PROP_STRING],["animation",i.PROP_STRING],["class",i.PROP_STRING],["iconclass",i.PROP_STRING],["iconurl",i.PROP_STRING],["imageheight",{value:"200px",...i.PROP_STRING}],["itemaction",i.PROP_STRING],["itemchildren",i.PROP_STRING],["itemicon",i.PROP_STRING],["itemlabel",i.PROP_STRING],["itemlink",i.PROP_STRING],["name",i.PROP_STRING],["picturesource",i.PROP_STRING],["picturetitle",{value:"",...i.PROP_STRING}],["show",{value:!0,...i.PROP_BOOLEAN}],["subheading",i.PROP_STRING],["title",i.PROP_STRING],["userrole",i.PROP_STRING]]))}constructor(e,t,n){super(e,d,n),this.render2=t,i.styler(this.nativeElement,this,i.APPLY_STYLES_TYPE.SHELL)}ngAfterViewInit(){super.ngAfterViewInit(),i.styler(this.cardContainerElRef.nativeElement,this,i.APPLY_STYLES_TYPE.INNER_SHELL)}ngOnInit(){super.ngOnInit(),o.removeAttr(this.nativeElement.parentElement,"tabindex"),o.setAttr(this.nativeElement,"tabindex",0),this.keydownListener=this.render2.listen(this.nativeElement,"keydown.Enter",e=>{e.preventDefault(),this.nativeElement.click()})}onPropertyChange(e,t,i){"title"===e||"subheading"===e||"iconclass"===e||"iconurl"===e||"actions"===e?this.showHeader=!!(this.title||this.subheading||this.iconclass||this.iconurl||this.actions):super.onPropertyChange(e,t,i)}ngOnDestroy(){this.keydownListener&&(this.keydownListener(),this.keydownListener=null),this.cardContainerElRef=null,super.ngOnDestroy()}static{this.\u0275fac=c.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:c,type:p,deps:[{token:c.Injector},{token:c.Renderer2},{token:"EXPLICIT_CONTEXT",optional:!0}],target:c.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=c.\u0275\u0275ngDeclareComponent({minVersion:"17.0.0",version:"20.3.19",type:p,isStandalone:!0,selector:"[wmCard]",providers:[i.provideAsWidgetRef(p)],viewQueries:[{propertyName:"cardContainerElRef",first:!0,predicate:["cardContainerWrapper"],descendants:!0,static:!0}],usesInheritance:!0,ngImport:c,template:'@if (showHeader) {\n <div class="app-card-header panel-heading">\n @if (iconclass || iconurl) {\n <div class="app-card-avatar">\n @if (iconclass && !iconurl) {\n <i class="app-icon" [ngClass]="iconclass"></i>\n }\n @if (iconurl) {\n <img class="img-circle" [src]="iconurl" />\n }\n </div>\n }\n <div class="app-card-header-text">\n <h4 class="card-heading" [textContent]="title"></h4>\n <h5 class="card-subheading text-muted" [textContent]="subheading"></h5>\n </div>\n @if (actions) {\n <div class="panel-actions">\n \x3c!-- TODO(punith) need to bind autoclose--\x3e\n <div wmMenu dropdown\n [autoClose]="autoclose !== \'disabled\'"\n class="panel-action"\n type="anchor"\n iconclass="wm-sl-l sl-more-menu-vertical"\n menuposition="down,left"\n hint="Actions"\n caption=""\n dataset.bind="actions">\n </div>\n </div>\n }\n </div>\n}\n@if (picturesource) {\n <div class="app-card-image" [ngStyle]="{\'max-height\':imageheight}">\n <img wmPicture class="card-image" picturesource.bind="picturesource" hint.bind="picturetitle" />\n </div>\n}\n<div #cardContainerWrapper>\n <ng-content ngProjectAs="[wmCardContent]"></ng-content>\n</div>\n<div>\n <ng-content ngProjectAs="[wmCardActions]"></ng-content>\n</div>\n<div>\n <ng-content ngProjectAs="[wmCardFooter]"></ng-content>\n</div>\n',dependencies:[{kind:"ngmodule",type:t.CommonModule},{kind:"directive",type:l.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"directive",type:l.NgStyle,selector:"[ngStyle]",inputs:["ngStyle"]},{kind:"directive",type:i.TextContentDirective,selector:"[textContent]",inputs:["textContent"]},{kind:"directive",type:n.PictureDirective,selector:"img[wmPicture]",exportAs:["wmPicture"]},{kind:"component",type:a.MenuComponent,selector:"[wmMenu]"}]})}}c.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:c,type:p,decorators:[{type:s.Component,args:[{standalone:!0,imports:[t.CommonModule,i.TextContentDirective,n.PictureDirective,a.MenuComponent],selector:"[wmCard]",providers:[i.provideAsWidgetRef(p)],template:'@if (showHeader) {\n <div class="app-card-header panel-heading">\n @if (iconclass || iconurl) {\n <div class="app-card-avatar">\n @if (iconclass && !iconurl) {\n <i class="app-icon" [ngClass]="iconclass"></i>\n }\n @if (iconurl) {\n <img class="img-circle" [src]="iconurl" />\n }\n </div>\n }\n <div class="app-card-header-text">\n <h4 class="card-heading" [textContent]="title"></h4>\n <h5 class="card-subheading text-muted" [textContent]="subheading"></h5>\n </div>\n @if (actions) {\n <div class="panel-actions">\n \x3c!-- TODO(punith) need to bind autoclose--\x3e\n <div wmMenu dropdown\n [autoClose]="autoclose !== \'disabled\'"\n class="panel-action"\n type="anchor"\n iconclass="wm-sl-l sl-more-menu-vertical"\n menuposition="down,left"\n hint="Actions"\n caption=""\n dataset.bind="actions">\n </div>\n </div>\n }\n </div>\n}\n@if (picturesource) {\n <div class="app-card-image" [ngStyle]="{\'max-height\':imageheight}">\n <img wmPicture class="card-image" picturesource.bind="picturesource" hint.bind="picturetitle" />\n </div>\n}\n<div #cardContainerWrapper>\n <ng-content ngProjectAs="[wmCardContent]"></ng-content>\n</div>\n<div>\n <ng-content ngProjectAs="[wmCardActions]"></ng-content>\n</div>\n<div>\n <ng-content ngProjectAs="[wmCardFooter]"></ng-content>\n</div>\n'}]}],ctorParameters:()=>[{type:c.Injector},{type:c.Renderer2},{type:void 0,decorators:[{type:s.Inject,args:["EXPLICIT_CONTEXT"]},{type:s.Optional}]}],propDecorators:{cardContainerElRef:[{type:s.ViewChild,args:["cardContainerWrapper",{static:!0}]}]}});const m={widgetType:"wm-card-actions",hostClass:"app-card-actions"};class h extends i.StylableComponent{static{this.initializeProps=void i.register("wm-card-actions",new Map([["class",i.PROP_STRING],["name",i.PROP_STRING],["show",{value:!0,...i.PROP_BOOLEAN}]]))}constructor(e,t){super(e,m,t),i.styler(this.nativeElement,this,i.APPLY_STYLES_TYPE.CONTAINER)}static{this.\u0275fac=c.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:c,type:h,deps:[{token:c.Injector},{token:"EXPLICIT_CONTEXT",optional:!0}],target:c.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=c.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:h,isStandalone:!0,selector:"[wmCardActions]",usesInheritance:!0,ngImport:c})}}c.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:c,type:h,decorators:[{type:s.Directive,args:[{standalone:!0,selector:"[wmCardActions]"}]}],ctorParameters:()=>[{type:c.Injector},{type:void 0,decorators:[{type:s.Inject,args:["EXPLICIT_CONTEXT"]},{type:s.Optional}]}]});const u={widgetType:"wm-card-content",hostClass:"app-card-content card-body card-block"};class g extends i.StylableComponent{static{this.initializeProps=void i.register("wm-card-content",new Map([["class",i.PROP_STRING],["content",i.PROP_STRING],["name",i.PROP_STRING],["show",{value:!0,...i.PROP_BOOLEAN}]]))}constructor(e,t){super(e,u,t)}ngAfterViewInit(){super.ngAfterViewInit(),i.styler(this.cardContentContainerElRef.nativeElement,this,i.APPLY_STYLES_TYPE.CONTAINER)}ngOnDestroy(){this.cardContentContainerElRef=null,super.ngOnDestroy()}static{this.\u0275fac=c.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:c,type:g,deps:[{token:c.Injector},{token:"EXPLICIT_CONTEXT",optional:!0}],target:c.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=c.\u0275\u0275ngDeclareComponent({minVersion:"14.0.0",version:"20.3.19",type:g,isStandalone:!0,selector:"div[wmCardContent]",providers:[i.provideAsWidgetRef(g)],viewQueries:[{propertyName:"cardContentContainerElRef",first:!0,predicate:["cardContentContainer"],descendants:!0}],usesInheritance:!0,ngImport:c,template:"<div partial-container-target #cardContentContainer>\n <ng-content></ng-content>\n</div>"})}}c.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:c,type:g,decorators:[{type:s.Component,args:[{standalone:!0,selector:"div[wmCardContent]",providers:[i.provideAsWidgetRef(g)],template:"<div partial-container-target #cardContentContainer>\n <ng-content></ng-content>\n</div>"}]}],ctorParameters:()=>[{type:c.Injector},{type:void 0,decorators:[{type:s.Inject,args:["EXPLICIT_CONTEXT"]},{type:s.Optional}]}],propDecorators:{cardContentContainerElRef:[{type:s.ViewChild,args:["cardContentContainer"]}]}});const v={widgetType:"wm-card-footer",hostClass:"app-card-footer text-muted card-footer"};class f extends i.StylableComponent{static{this.initializeProps=void i.register("wm-card-footer",new Map([["class",i.PROP_STRING],["name",i.PROP_STRING],["show",{value:!0,...i.PROP_BOOLEAN}]]))}constructor(e,t){super(e,v,t),i.styler(this.nativeElement,this,i.APPLY_STYLES_TYPE.CONTAINER)}static{this.\u0275fac=c.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:c,type:f,deps:[{token:c.Injector},{token:"EXPLICIT_CONTEXT",optional:!0}],target:c.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=c.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:f,isStandalone:!0,selector:"[wmCardFooter]",usesInheritance:!0,ngImport:c})}}c.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:c,type:f,decorators:[{type:s.Directive,args:[{standalone:!0,selector:"[wmCardFooter]"}]}],ctorParameters:()=>[{type:c.Injector},{type:void 0,decorators:[{type:s.Inject,args:["EXPLICIT_CONTEXT"]},{type:s.Optional}]}]}),e.CardActionsDirective=h,e.CardComponent=p,e.CardContentComponent=g,e.CardFooterDirective=f}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("tslib"),require("@angular/common"),require("@wm/components/base"),require("@angular/core"),require("@wm/core"),require("@wm/components/data/pagination"),require("@wm/components/input/button"),require("rxjs"),require("@wm/components/input/base-form"),require("lodash-es")):"function"==typeof define&&define.amd?define(["exports","tslib","@angular/common","@wm/components/base","@angular/core","@wm/core","@wm/components/data/pagination","@wm/components/input/button","rxjs","@wm/components/input/base-form","lodash-es"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.data=e.wm.components.data||{},e.wm.components.data.list={}),e.tslib,e.ng.common,e.wm.components.base,e.ng.core,e.wm.core,e.wm.components.data.pagination,e.wm.components.input.button,e.rxjs,e.wm.components.input.baseForm,e._)}(this,function(e,t,i,n,a,s,o,r,l,c,d){"use strict";function p(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var m=p(i),h=p(n),u=p(a),g=p(s);const v={widgetType:"wm-listtemplate"};e.ListItemDirective=class t extends n.StylableComponent{static{this.initializeProps=void n.register("wm-listtemplate",new Map([...n.AUTO_LAYOUT_PROPS]))}onFocus(){this.listComponent.lastSelectedItem=this}get $index(){return this.context.$index}get $even(){return this.context.even}get $odd(){return this.context.odd}get $first(){return this.context.first}get $last(){return this.context.last}get currentItemWidgets(){const e=Array.from(this.nativeElement.querySelectorAll("[widget-id]"));return Object.assign(this._currentItemWidgets,e.reduce((e,t)=>(e[t.widget.name]=t.widget,e),{}))}set wmListItem(e){this.item=e}constructor(t,i,s,o,r){super(t,v,r),this.app=s,this.renderer=o,this.destroySub=new l.Subject,this.destroy$=this.destroySub.asObservable(),this.itemClass="",this._currentItemWidgets={},this.trackId=n.widgetIdGenerator.nextUid(),this.isActive=!1,this.disableItem=!1,this._viewParent=a.inject(e.ListComponent,{optional:!0}),n.styler(this.nativeElement,this,n.APPLY_STYLES_TYPE.CONTAINER),this.viewContainerRef=t.get(a.ViewContainerRef),this.nativeElement=i.nativeElement,this.listComponent=this._viewParent,this.context=this.inj._lView[8],this.itemClassWatcher(this.listComponent),this.disableItemWatcher(this.listComponent),this.itemAttrsHandler(),$(this.nativeElement).data("listItemContext",this)}itemAttrsHandler(){const e=this.listComponent.itemAttrsMap;e&&Object.keys(e).forEach(t=>{const i=e[t];this.setProperty(t,i)})}registerWatch(e,t){this.destroy$.subscribe(s.$watch(e,this.listComponent.viewParent,this,t))}itemClassWatcher(e){e.binditemclass?this.registerWatch(e.binditemclass,e=>this.itemClass=e||""):this.itemClass=e.itemclass}disableItemWatcher(e){e.binddisableitem?this.registerWatch(e.binddisableitem,e=>this.disableItem=e||!1):this.disableItem=e.disableitem||!1}setUpCUDHandlers(){const e=this.nativeElement.querySelector(".edit-list-item"),t=this.nativeElement.querySelector(".delete-list-item");e&&(this.boundEditHandler=e=>{this.listComponent.update()},e.addEventListener("click",this.boundEditHandler)),t&&(this.boundDeleteHandler=e=>{this.listComponent.delete()},t.addEventListener("click",this.boundDeleteHandler))}ngOnInit(){super.ngOnInit(),this.listComponent.mouseEnterCB&&(this.boundMouseEnterHandler=e=>{this.listComponent.invokeEventCallback("mouseenter",{widget:this,$event:e})},this.nativeElement.addEventListener("mouseenter",this.boundMouseEnterHandler)),this.listComponent.mouseLeaveCB&&(this.boundMouseLeaveHandler=e=>{this.listComponent.invokeEventCallback("mouseleave",{widget:this,$event:e})},this.nativeElement.addEventListener("mouseleave",this.boundMouseLeaveHandler)),$(this.nativeElement).attr("listitemindex",this.$index)}ngAfterViewInit(){super.ngAfterViewInit(),this.setUpCUDHandlers();Array.from(this.nativeElement.querySelectorAll("[widget-id]")).forEach(e=>{e.widget instanceof c.BaseFormComponent&&(e.widget.$attrs.get("datavaluesource.bind")||(e.widget.datavaluesource=this.listComponent.datasource))})}ngOnDestroy(){if(this.boundMouseEnterHandler&&this.nativeElement){try{this.nativeElement.removeEventListener("mouseenter",this.boundMouseEnterHandler)}catch(e){}this.boundMouseEnterHandler=null}if(this.boundMouseLeaveHandler&&this.nativeElement){try{this.nativeElement.removeEventListener("mouseleave",this.boundMouseLeaveHandler)}catch(e){}this.boundMouseLeaveHandler=null}if(this.nativeElement){const e=this.nativeElement.querySelector(".edit-list-item");if(e&&this.boundEditHandler){try{e.removeEventListener("click",this.boundEditHandler)}catch(e){}this.boundEditHandler=null}const t=this.nativeElement.querySelector(".delete-list-item");if(t&&this.boundDeleteHandler){try{t.removeEventListener("click",this.boundDeleteHandler)}catch(e){}this.boundDeleteHandler=null}}if(this.context&&(Object.keys(this.context).forEach(e=>{delete this.context[e]}),this.context=null),this.viewContainerRef&&(this.viewContainerRef=null),this.destroySub){try{this.destroySub.closed||(this.destroySub.next(null),this.destroySub.complete())}catch(e){}this.destroySub=null}super.ngOnDestroy()}static{this.\u0275fac=u.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:u,type:t,deps:[{token:u.Injector},{token:u.ElementRef},{token:g.App},{token:u.Renderer2},{token:"EXPLICIT_CONTEXT",optional:!0}],target:u.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=u.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:t,isStandalone:!0,selector:"[wmListItem]",inputs:{wmListItem:"wmListItem"},host:{listeners:{focus:"onFocus()"},properties:{"class.active":"this.isActive","class.disable-item":"this.disableItem"}},exportAs:["listItemRef"],usesInheritance:!0,ngImport:u})}},e.ListItemDirective=t.__decorate([n.AutoLayout({bindParent:"listComponent.viewParent"}),t.__metadata("design:paramtypes",[a.Injector,a.ElementRef,s.App,a.Renderer2,Object])],e.ListItemDirective),u.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:u,type:e.ListItemDirective,decorators:[{type:a.Directive,args:[{standalone:!0,selector:"[wmListItem]",exportAs:"listItemRef"}]}],ctorParameters:()=>[{type:u.Injector},{type:u.ElementRef},{type:g.App},{type:u.Renderer2},{type:void 0,decorators:[{type:a.Inject,args:["EXPLICIT_CONTEXT"]},{type:a.Optional}]}],propDecorators:{isActive:[{type:a.HostBinding,args:["class.active"]}],disableItem:[{type:a.HostBinding,args:["class.disable-item"]}],onFocus:[{type:a.HostListener,args:["focus"]}],wmListItem:[{type:a.Input}]}});const f={widgetType:"wm-list",hostClass:"app-livelist app-panel"};e.ListComponent=class t extends n.StylableComponent{static{this.initializeProps=void n.register("wm-list",new Map([["boundarylinks",{value:!1,...n.PROP_BOOLEAN}],["class",n.PROP_STRING],["collapsible",n.PROP_BOOLEAN],["dateformat",n.PROP_STRING],["dataset",n.PROP_ANY],["datasource",n.PROP_ANY],["direction",{value:"vertical",...n.PROP_STRING}],["directionlinks",{value:!0,...n.PROP_BOOLEAN}],["disableitem",n.PROP_BOOLEAN],["enablereorder",n.PROP_BOOLEAN],["forceellipses",{value:!0,...n.PROP_BOOLEAN}],["groupby",n.PROP_STRING],["iconclass",n.PROP_STRING],["itemclass",{value:"",...n.PROP_STRING}],["itemsperrow",n.PROP_STRING],["listclass",{value:"list-group",...n.PROP_STRING}],["multiselect",n.PROP_BOOLEAN],["loadingdatamsg",{value:"Loading...",...n.PROP_STRING}],["loadingicon",{value:"fa fa-circle-o-notch",...n.PROP_STRING}],["match",n.PROP_STRING],["maxsize",{value:5,...n.PROP_NUMBER}],["name",n.PROP_STRING],["navigation",n.PROP_STRING],["navigationalign",{value:"left",...n.PROP_STRING}],["nodatamessage",{value:"No data found",...n.PROP_STRING}],["ondemandmessage",{value:"Load More",...n.PROP_STRING}],["orderby",n.PROP_STRING],["paginationclass",n.PROP_STRING],["pagesize",n.PROP_NUMBER],["pulltorefresh",{value:!1,...n.PROP_BOOLEAN}],["selectfirstitem",n.PROP_BOOLEAN],["selectionlimit",n.PROP_NUMBER],["show",{value:!0,...n.PROP_BOOLEAN}],["showcount",n.PROP_BOOLEAN],["showrecordcount",n.PROP_BOOLEAN],["statehandler",{value:"none",...n.PROP_STRING}],["subheading",n.PROP_STRING],["tabindex",{value:0,...n.PROP_NUMBER}],["title",n.PROP_STRING],["allowpagesizechange",{value:!1,...n.PROP_BOOLEAN}],["pagesizeoptions",{value:"5,10,20,50,100",...n.PROP_STRING}],...n.AUTO_LAYOUT_PROPS]))}constructor(e,t,i,a,o,r,l,c,p,m,h,u,g,v,b){let y=s.noop;const w=new Promise(e=>y=e);super(e,f,b,w),this.allowpagesizechange=!1,this.itemAttrsMap={},this.hasAutolayout=!1,this.propsInitPromise=w,this.promiseResolverFn=y,n.styler(this.nativeElement,this,n.APPLY_STYLES_TYPE.SHELL),this.cdRef=t,this.ngZone=r,this.datePipe=i,this.statePersistence=g,this.paginationService=v,this._pageLoad=!0,this.binditemclass=l,this.binddisableitem=c,this.binddataset=p,this.mouseEnterCB=h,this.mouseLeaveCB=u,this.binddatasource=m,this.app=a,this.appDefaults=o,this.variableInflight=!1,this.noDataFound=!p,this.titleId="wmlist-"+s.generateGUId(),this._listenerDestroyers=[this.app.subscribe("check-state-persistence-options",e=>{let t=d.get(this.datasource,"name");t||(t=n.extractDataSourceName(this.binddatasource)),d.get(e,"variable.name")===t&&this.handleStateParams(e)}),this.app.subscribe("toggle-variable-state",this.handleLoading.bind(this)),this.app.subscribe("setup-cud-listener",e=>{this.nativeElement.getAttribute("name")===e&&(this._isDependent=!0)})]}get selecteditem(){return this.multiselect?s.getClonedObject(this._items):d.isEmpty(this._items)?{}:s.getClonedObject(this._items[0])}set selecteditem(e){this._items.length=0,this.deselectListItems(),d.isArray(e)?e.forEach(e=>this.selectItem(e)):this.selectItem(e),s.$appDigest()}getWidgets(e,t){let i;const n=[];if(e)return s.isDefined(t)?(t=+t||0,i=d.get(this.listItems.toArray(),t),i?[d.get(i.currentItemWidgets,e)]:void 0):(d.forEach(this.listItems.toArray(),t=>{i=d.get(t.currentItemWidgets,e),i&&n.push(i)}),n)}getItem(e){return this.getListItemByIndex(e)}getIndex(t){return t instanceof e.ListItemDirective?this.getListItemIndex(t):t?this.fieldDefs.findIndex(e=>d.isEqual(e,t)):void 0}getUpdatedPageSize(){return this.updatedPageSize}create(){this._isDependent&&this.triggerWMEvent("insert")}editRow(e){if(this._isDependent){let t;e&&(t=this.getItemRefByIndexOrModel(e).item),this.triggerWMEvent("update",t)}}update(e){this.editRow(e)}deleteRow(e){if(this._isDependent){let t;e&&(t=this.getItemRefByIndexOrModel(e).item),this.triggerWMEvent("delete",t)}}delete(e){this.deleteRow(e)}handleLoading(e){const t=this.datasource;t&&t.execute(s.DataSource.Operation.IS_API_AWARE)&&s.isDataSourceEqual(e.variable,t)&&this.ngZone.run(()=>{this.handleStateParams(e),this.variableInflight=e.active;const t=e.data?.pagination?.totalElements;d.isUndefined(t)?this.noDataFound=d.isEmpty(e.data?.data):this.noDataFound=0===t})}triggerListItemSelection(e,t){if(e&&e[0]){const i=e.data("listItemContext");i.listComponent===this&&this.onItemClick(t,i)}}execute(e,t){return![s.DataSource.Operation.IS_API_AWARE,s.DataSource.Operation.IS_PAGEABLE,s.DataSource.Operation.SUPPORTS_SERVER_FILTER].includes(e)&&this.datasource.execute(e,t)}handleKeyDown(e,t){e.stopPropagation(),13===e.keyCode||9===e.keyCode||(e.target.classList.contains("form-control")||e.target.classList.contains("note-editable"))&&32===e.keyCode||e.preventDefault();const i=this.listItems;let n=this.getListItemIndex(this.lastSelectedItem);if(this.multiselect){const a=this.getListItemIndex(this.firstSelectedItem),o=d.isArray(this.selecteditem)?this.selecteditem.length:s.isObject(this.selecteditem)?1:0;"selectPrev"===t?n>0&&(n<=a&&this.checkSelectionLimit(o)?(this.lastSelectedItem=this.getListItemByIndex(n-1),this.toggleListItemSelection(this.lastSelectedItem)):n>a?(this.toggleListItemSelection(this.getListItemByIndex(n)),this.lastSelectedItem=this.getListItemByIndex(n-1)):this.invokeEventCallback("selectionlimitexceed",{$event:e})):"selectNext"===t&&n<i.length-1&&(n>=a&&this.checkSelectionLimit(o)?(this.lastSelectedItem=this.getListItemByIndex(n+1),this.toggleListItemSelection(this.lastSelectedItem)):n<a?(this.toggleListItemSelection(this.getListItemByIndex(n)),this.lastSelectedItem=this.getListItemByIndex(n+1)):this.invokeEventCallback("selectionlimitexceed",{$event:e}))}if("focusPrev"===t)if(this.isListElementMovable){if(n=n<=0?0:n,0===n)return;this.lastSelectedItem=this.getListItemByIndex(n);this.getListItemByIndex(n-1).nativeElement.before(this.lastSelectedItem.nativeElement),this.lastSelectedItem.nativeElement.focus(),this.statePersistence.removeWidgetState(this,"selectedItem");const e=this.listItems.toArray();[e[n-1],e[n]]=[e[n],e[n-1]],this.listItems.reset(e),this.currentIndex=n,this.ariaText="selected "}else n=n<=0?0:n-1,this.lastSelectedItem=this.getListItemByIndex(n),this.lastSelectedItem.nativeElement.focus(),this.currentIndex=n+1,this.ariaText="selected ";else if("focusNext"===t)if(this.isListElementMovable){if(n=n<i.length-1?n:i.length-1,n===this.listItems.length-1)return;this.lastSelectedItem=this.getListItemByIndex(n);this.getListItemByIndex(n+1).nativeElement.after(this.lastSelectedItem.nativeElement),this.lastSelectedItem.nativeElement.focus(),this.statePersistence.removeWidgetState(this,"selectedItem");const e=this.listItems.toArray();[e[n],e[n+1]]=[e[n+1],e[n]],this.listItems.reset(e),this.currentIndex=n+2,this.ariaText="selected "}else n=n<i.length-1?n+1:i.length-1,this.lastSelectedItem=this.getListItemByIndex(n),this.lastSelectedItem.nativeElement.focus(),this.currentIndex=n+1,this.ariaText="selected ";else if("select"===t){if(-1===n||!$(e.target).closest(this.lastSelectedItem.nativeElement)){const t=$(e.target).closest("li.app-list-item");n=t.closest("ul.app-livelist-container").find("li.app-list-item").index(t)}this.onItemClick(e,this.getListItemByIndex(n))}else if("space"===t){if(!this.enablereorder)return;this.isListElementMovable=!this.isListElementMovable,this.onItemClick(e,this.getListItemByIndex(n)),this.currentIndex=n+1,this.isListElementMovable?(this.ariaText=`Item ${this.currentIndex} grabbed, current position `,this.$ulEle.data("oldIndex",n)):(this.ariaText=`Item ${this.currentIndex} dropped, final position `,this.onUpdate(e,void 0,n))}}getActualPageSize(){return this.actualPageSize||20}onPropertyChange(e,t,i){if("dataset"===e){if(!t&&this.binddatasource&&!this.datasource)return;this.onDataSetChange(t)}else if("datasource"===e)this.allowpagesizechange&&(this.datasource.maxResults=this.pagesize||this.datasource.maxResults),this.dataset&&this.onDataSetChange(this.dataset);else if("navigation"===e){if("Advanced"===t)return void(this.navigation="Classic");s.switchClass(this.nativeElement,t,i),this.onNavigationTypeChange(t),this.dataNavigator&&(this.dataNavigator.navigationClass=this.paginationclass)}else if("itemsperrow"===e)s.setListClass(this);else{if("tabindex"===e)return;"pulltorefresh"===e&&t?(this.app.notify("pullToRefresh:enable"),this.subscribeToPullToRefresh()):"paginationclass"===e?this.dataNavigator&&setTimeout(()=>this.dataNavigator.navigationClass=t):"pagesize"===e?(this.actualPageSize=t,this.setDefaultPageSize(t)):"enablereorder"===e?t&&this.$ulEle?(this.$ulEle.attr("aria-describedby",this.titleId),this.configureDnD(),this.$ulEle.sortable("enable")):this.$ulEle&&!t&&(this.$ulEle.removeAttr("aria-describedby"),this.$ulEle.sortable("disable")):"multiselect"===e?this.selectedItemWidgets=t?[]:{}:"allowpagesizechange"===e?(this.allowpagesizechange=t,this.dataNavigator.allowpagesizechange=t):"pagesizeoptions"===e?(this.prevPagesizeoptions=this.sanitizeCommaSeparatedIntegers(i),this.pagesizeoptions=this.sanitizeCommaSeparatedIntegers(t),this.allowpagesizechange&&this.setDefaultPageSize(t)):super.onPropertyChange(e,t,i)}}setDefaultPageSize(e){if(this.allowpagesizechange){const t=this.statePersistence.getWidgetState(this);d.get(t,"pagesize")?(e=d.get(t,"pagesize"),this.pagesize=e):this.pagesizeoptions&&(e=this.pagesizeoptions?.split(",").map(Number).sort((e,t)=>e-t)[0],this.pagesize=e),this.isPageSizeOptionsChanged()&&(this.dataNavigator.defaultPageSizeOptions=this.pagesizeoptions?.split(",").map(Number).sort((e,t)=>e-t)||[],this.dataNavigator.pageSizeOptions=[...this.dataNavigator.defaultPageSizeOptions])}this.updatedPageSize=e,this.dataNavigator.updatedPageSize=e,this.dataNavigator.options={maxResults:e},this.dataNavigator.widget.maxResults=e,this.dataNavigator.maxResults=e,this.datasource&&(this.datasource.maxResults=this.pagesize||this.datasource.maxResults)}isPageSizeOptionsChanged(){return!d.isEqual(this.prevPagesizeoptions,this.pagesizeoptions)}selectPageSize(e){(this.allowpagesizechange||e)&&((e<this.dataNavigator.pageSizeOptions[0]||e>this.dataNavigator.pageSizeOptions[this.dataNavigator.pageSizeOptions.length-1]||!this.dataNavigator.pageSizeOptions.includes(Number(e)))&&(e=this.dataNavigator.pageSizeOptions[0]),this.dataNavigator.onPageSizeChange(void 0,e))}sanitizeCommaSeparatedIntegers(e){if(!e)return"";return Array.from(new Set(e.split(",").map(e=>e.trim()).filter(e=>/^-?\d+$/.test(e)).map(e=>Math.abs(parseInt(e,10))))).join(",")}onItemClick(e,t){let i;if(!t.disableItem){if(this.firstSelectedItem=this.firstSelectedItem||t,i=d.isArray(this.selecteditem)?this.selecteditem.length:s.isObject(this.selecteditem)?1:0,this.multiselect&&s.isMobile())this.checkSelectionLimit(i)||t.isActive?this.toggleListItemSelection(t):this.invokeEventCallback("selectionlimitexceed",{$event:e});else if((e.ctrlKey||e.metaKey)&&this.multiselect)this.checkSelectionLimit(i)||t.isActive?(this.firstSelectedItem=this.lastSelectedItem=t,this.toggleListItemSelection(t)):this.invokeEventCallback("selectionlimitexceed",{$event:e});else if(e.shiftKey&&this.multiselect){let i=t.context.index,n=this.firstSelectedItem.context.index;i>n&&(n=[i,i=n][0]),this.checkSelectionLimit(n-i)?(this.clearSelectedItems(),this.listItems.forEach(e=>{const t=e.context.index;t>=i&&t<=n&&this.toggleListItemSelection(e)}),this.lastSelectedItem=t):this.invokeEventCallback("selectionlimitexceed",{$event:e})}else(!t.isActive||i>1)&&(this.clearSelectedItems(),this.toggleListItemSelection(t),this.firstSelectedItem=this.lastSelectedItem=t);s.$appDigest()}}clear(){this.updateFieldDefs([])}deselectItem(e){const t=this.getItemRefByIndexOrModel(e);t&&t.isActive&&this.toggleListItemSelection(t)}selectItem(e,t){const i=this.getItemRefByIndexOrModel(e);i&&(i.isActive||this.toggleListItemSelection(i,t),i.nativeElement.focus())}ngOnInit(){super.ngOnInit(),this.handleHeaderClick=s.noop,setTimeout(()=>{this.debouncedFetchNextDatasetOnScroll=this.paginationService.debouncedFetchNextDatasetOnScroll(this.dataNavigator,n.DEBOUNCE_TIMES.PAGINATION_DEBOUNCE_TIME,this)},0),this._items=[],this.fieldDefs=[],this.reorderProps={minIndex:null,maxIndex:null};const e=this.nativeElement.getAttribute("direction"),t="row"===e||"column"===e;this.hasAutolayout=t||["wrap","alignment","gap","columngap"].some(e=>this.nativeElement.hasAttribute(e))}ngAfterViewInit(){this.promiseResolverFn(),this.propsInitPromise.then(()=>{super.ngAfterViewInit(),this.setUpCUDHandlers(),this.selectedItemWidgets=this.multiselect?[]:{};var e=$(this.nativeElement).find(".app-livelist-container");this.enablereorder&&!this.groupby&&(e&&e.attr("aria-describedby",this.titleId),this.configureDnD()),this.enablereorder||e&&e.removeAttr("aria-describedby"),this.groupby&&this.collapsible&&(this.handleHeaderClick=n.handleHeaderClick,this.toggleAllHeaders=n.toggleAllHeaders.bind(void 0,this)),s.setListClass(this)}),this.setupHandlers();const e=this.nativeElement.querySelector("ul.app-livelist-container");n.styler(e,this,n.APPLY_STYLES_TYPE.CONTAINER),this.enablereorder&&e&&e.setAttribute("aria-describedby",this.titleId),this.enablereorder||e&&e.removeAttribute("aria-describedby"),this._readItemAttrsFromHost()}ngOnDestroy(){this._listAnimator&&this._listAnimator.$btnSubscription&&(this._listAnimator.$btnSubscription.unsubscribe(),this._listAnimator=null),this._listenerDestroyers&&(this._listenerDestroyers.forEach(e=>e&&e()),this._listenerDestroyers=[]),this.navigatorResultWatch&&(this.navigatorResultWatch.unsubscribe(),this.navigatorResultWatch=null),this.navigatorMaxResultWatch&&(this.navigatorMaxResultWatch.unsubscribe(),this.navigatorMaxResultWatch=null),this.listItemsChangesSubscription&&(this.listItemsChangesSubscription.unsubscribe(),this.listItemsChangesSubscription=null);const e=this.nativeElement?.querySelector("ul.app-livelist-container");if(e&&this.boundClickHandler){try{e.removeEventListener("click",this.boundClickHandler,!0)}catch(e){}this.boundClickHandler=null}if(this.$ulEle&&this.$ulEle.sortable){try{this.$ulEle.sortable("destroy")}catch(e){}this.$ulEle=null}this.listItems&&(this.listItems=null),this.btnComponents&&(this.btnComponents=null),this.dataNavigator=null,this.listTemplate=null,this.listLeftActionTemplate=null,this.listRightActionTemplate=null,this.fieldDefs=[],this._items=[],this.groupedData=null,Array.isArray(this.selectedItemWidgets)?this.selectedItemWidgets=[]:this.selectedItemWidgets={};const t=document.getElementsByClassName("add-list-item")[0];t&&this.boundAddItemHandler&&(t.removeEventListener("click",this.boundAddItemHandler),this.boundAddItemHandler=null),this.debouncedFetchNextDatasetOnScroll=null,this.firstSelectedItem=null,this.lastSelectedItem=null,this.reorderProps=null,super.ngOnDestroy()}ngOnDetach(){super.ngOnDetach(),this._pageLoad=!0}handleEvent(e,t,i,n){const a={tap:"click",doubletap:"dblclick"};d.includes(["click","tap","dblclick","doubletap"],t)&&this.eventManager.addEventListener(this.nativeElement,a[t]||t,e=>{const i=$(e.target).closest(".app-list-item");if(i.length){const n=i.data("listItemContext");n.disableItem||this.invokeEventCallback(t,{widget:n,$event:e,item:n.item})}})}getConfiguredState(){const e=this.statePersistence.computeMode(this.statehandler);return e&&e.toLowerCase()}handleStateParams(e){if(this._pageLoad&&"none"!==this.getConfiguredState()){this._pageLoad=!1;const t=this.statePersistence.getWidgetState(this);d.get(t,"pagination")&&(e.options=e.options||{},e.options.page=t.pagination),d.get(t,"selectedItem")&&(this._selectedItemsExist=!0)}}triggerWMEvent(e,t){s.$invokeWatchers(!0);let i=this.multiselect?d.last(this.selecteditem):this.selecteditem;t&&(i=t),this.app.notify("wm-event",{eventName:e,widgetName:this.name,row:i})}resetNavigation(){this.showNavigation=!1,this.navControls=void 0,this.infScroll=!1,this.onDemandLoad=!1}enableBasicNavigation(){this.navControls=n.NAVIGATION_TYPE.BASIC,this.showNavigation=!0}enableInlineNavigation(){this.navControls=n.NAVIGATION_TYPE.INLINE}enableClassicNavigation(){this.navControls=n.NAVIGATION_TYPE.CLASSIC,this.showNavigation=!0}enablePagerNavigation(){this.navControls=n.NAVIGATION_TYPE.PAGER,this.showNavigation=!0}setNavigationTypeNone(){this.navControls=n.NAVIGATION_TYPE.NONE,this.showNavigation=!1}enableInfiniteScroll(){this.infScroll=!0}enableOnDemandLoad(){this.onDemandLoad=!0,this.showNavigation=!0}onNavigationTypeChange(e){switch(this.resetNavigation(),e){case n.NAVIGATION_TYPE.BASIC:this.enableBasicNavigation();break;case n.NAVIGATION_TYPE.INLINE:this.enableInlineNavigation();break;case n.NAVIGATION_TYPE.ADVANCED:case n.NAVIGATION_TYPE.CLASSIC:this.enableClassicNavigation();break;case n.NAVIGATION_TYPE.PAGER:this.enablePagerNavigation();break;case n.NAVIGATION_TYPE.NONE:this.setNavigationTypeNone();break;case n.NAVIGATION_TYPE.SCROLL:this.enableInfiniteScroll();break;case n.NAVIGATION_TYPE.ONDEMAND:this.enableOnDemandLoad()}}updateFieldDefs(e){this.infScroll||this.onDemandLoad?[this.fieldDefs,this.currentPage]=this.paginationService.updateFieldsOnPagination(this,e):this.fieldDefs=e,this.orderby&&(this.fieldDefs=n.getOrderedDataset(this.fieldDefs,this.orderby)),this.groupby&&(this.groupedData=n.groupData(this,this.fieldDefs,this.groupby,this.match,this.orderby,this.dateformat,this.datePipe,void 0,this.appDefaults)),this.fieldDefs.length||(this.noDataFound=!0,this.selecteditem=void 0),s.$appDigest(),this.listItems.setDirty()}onDataChange(e){d.isEmpty(e)?this.updateFieldDefs([]):(this.noDataFound=!1,this.isDataChanged=!0,this.datasource&&this.datasource.execute(s.DataSource.Operation.IS_API_AWARE)&&(e=d.cloneDeep(e)),s.isObject(e)&&!d.isArray(e)&&(e=d.isEmpty(e)?[]:[e]),d.isString(e)&&(e=e.split(",")),this.datasource&&"App"===this.datasource.owner&&(this.infScroll||this.onDemandLoad)&&!this.currentPage&&this.datasource.execute(s.DataSource.Operation.GET_PAGING_OPTIONS).number>0&&(e=this.datasource.execute(s.DataSource.Operation.LIST_RECORDS,{page:1})),d.isArray(e)&&(e.length&&this.invokeEventCallback("beforedatarender",{$data:e}),this.updateFieldDefs(e)))}setupDataSource(){const e=this.dataNavigator;e.options={maxResults:this.pagesize||20},this.dataNavigatorWatched=!0,this.navigatorResultWatch&&this.navigatorResultWatch.unsubscribe(),this.navigatorResultWatch=e.resultEmitter.subscribe(e=>{this.onDataChange(e)},!0),this.navigatorMaxResultWatch&&this.navigatorMaxResultWatch.unsubscribe(),this.navigatorMaxResultWatch=e.maxResultsEmitter.subscribe(e=>{this.pagesize=e}),e.maxResults=this.pagesize||20,this.removePropertyBinding("dataset");const t=this.getAttr("datasetboundexpr");this.dataNavigator.setBindDataSet(this.binddataset,this.viewParent,t?this.context:this.datasource,this.dataset,this.binddatasource,t,this.statehandler)}onDataSetChange(e){if("wm.Variable"===d.get(this.datasource,"category")&&"none"!==this.getConfiguredState()&&this._pageLoad){const e=this.statePersistence.getWidgetState(this);this._pageLoad=!1,this.allowpagesizechange?(d.get(e,"pagination")||d.get(e,"pagesize"))&&this.dataNavigator.pageChanged({page:e.pagination||1,pagesize:e.pagesize},!0):d.get(e,"pagination")&&this.dataNavigator.pageChanged({page:e.pagination},!0),d.get(e,"selectedItem")&&(this._selectedItemsExist=!0)}this.dataNavigatorWatched?this.navigation&&this.navigation!==n.NAVIGATION_TYPE.NONE&&this.dataNavigator.setDataSource(this.datasource):this.navigation&&this.navigation!==n.NAVIGATION_TYPE.NONE?this.setupDataSource():this.onDataChange(e)}deselectListItems(){this.listItems.forEach(e=>e.isActive=!1)}clearSelectedItems(){this.deselectListItems(),this._items.length=0,s.$appDigest()}getListItemByModel(e){return this.listItems.find(t=>{let i=t.item;if(this.groupby&&!d.has(e,"_groupIndex")&&(i=d.clone(i),delete i._groupIndex),d.isEqual(i,e))return!0})||null}updateSelectedItemsWidgets(e){let t,i={};const a=d.get(this.dataNavigator,"dn.currentPage")||1;"none"!==this.getConfiguredState()&&(t=this.statePersistence.getWidgetState(this)||{},d.get(t,"selectedItem")&&(this.multiselect&&1===this.selecteditem.length?t.selectedItem=[]:d.remove(t.selectedItem,function(e){return e.page===a}))),this.multiselect&&(this.selectedItemWidgets.length=0),this.listItems.forEach((e,n)=>{e.isActive&&(this.multiselect?this.selectedItemWidgets.push(e.currentItemWidgets):this.selectedItemWidgets=e.currentItemWidgets,i={page:a,index:n},d.get(t,"selectedItem")&&this.multiselect?d.some(t.selectedItem,i)||t.selectedItem.push(i):t.selectedItem=[i])}),"none"===this.getConfiguredState()||e||(n.unsupportedStatePersistenceTypes.indexOf(this.navigation)<0?(this.statePersistence.removeWidgetState(this,"selectedItem"),this.statePersistence.setWidgetState(this,{selectedItem:t.selectedItem})):console.warn("Retain State handling on Widget "+this.name+" is not supported for current pagination type."))}toggleListItemSelection(e,t){if(e&&!e.disableItem){let i=e.item;this.groupby&&d.has(i,"_groupIndex")&&(i=d.clone(i),delete i._groupIndex),e.isActive?(this._items=d.pullAllWith(this._items,[i],d.isEqual),e.isActive=!1):(this.multiselect||this.clearSelectedItems(),this._items.push(i),this.invokeEventCallback("select",{widget:e,$data:i}),e.isActive=!0),this.updateSelectedItemsWidgets(t)}}onListRender(e){if(this.isDataChanged&&(s.$invokeWatchers(!0),this.invokeEventCallback("render",{$data:this.fieldDefs})),this.isDataChanged&&"none"!==this.getConfiguredState()&&e.length&&this._selectedItemsExist){const e=this.statePersistence.getWidgetState(this);if(d.get(e,"selectedItem")){this._selectedItemsExist=!1;const t=d.isArray(this.selecteditem)?this.selecteditem.length:d.toNumber(!d.isEmpty(this.selecteditem)),i=d.get(this.dataNavigator,"dn.currentPage")||1;e.pagination=e.pagination||1,t!==e.selectedItem.length&&e.pagination===i&&e.selectedItem.forEach(e=>{e.page===i&&this.selectItem(e.index,!0)})}}const t=d.isArray(this.selecteditem)?this.selecteditem:[this.selecteditem];if(this.firstSelectedItem=this.lastSelectedItem=null,!e.length||!this.selectfirstitem||this._items.length&&this.multiselect||!1===this._selectedItemsExist)this.deselectListItems(),t.forEach(e=>{const t=this.getListItemByModel(e);t&&(t.isActive=!0,this.lastSelectedItem=t,t.nativeElement.focus())});else{const t=e.first;t.disableItem||!this.isDataChanged||(this.infScroll||this.onDemandLoad)&&this._items.length||(this.clearSelectedItems(),this.firstSelectedItem=this.lastSelectedItem=t,this.selectItem(0))}if(this.fieldDefs.length&&this.infScroll){this.$element.closest("[wmsmoothscroll]");const e=this.$element.closest(".modal-body"),t=this.$element.find("ul").height(),i=window.innerHeight-140;s.isMobile()&&e.length&&t>i&&this.$element.css("height",i+"px"),setTimeout(()=>this.paginationService.bindScrollEvt(this,"> ul",n.DEBOUNCE_TIMES.PAGINATION_DEBOUNCE_TIME),500)}this.isDataChanged=!1}setupHandlers(){this.listItemsChangesSubscription=this.listItems.changes.subscribe(e=>{this.onListRender(e),this.cdRef.detectChanges()}),this.boundClickHandler=e=>{let t=$(e.target).closest(".app-list-item");for(;t.get(0)&&t.closest("ul.app-livelist-container").get(0)!==e.currentTarget;)t=t.parent().closest(".app-list-item");this.triggerListItemSelection(t,e)};const e=this.nativeElement.querySelector("ul.app-livelist-container");e&&e.addEventListener("click",this.boundClickHandler,!0)}onReorderStart(e,t){t.placeholder.height(t.item.height()),this.$ulEle.data("oldIndex",t.item.index())}onSort(e,t){if(this.infScroll){const e=this.$ulEle.find(`[listitemindex=${this.fieldDefs.length-1}]`).offset();e&&e.top<t.offset.top&&(this.paginationService.bindScrollEvt(this,"> ul",n.DEBOUNCE_TIMES.PAGINATION_DEBOUNCE_TIME),this.debouncedFetchNextDatasetOnScroll())}}onUpdate(e,t,i){const n=this.fieldDefs,a=void 0===t?i:t.item.index(),s=this.$ulEle.data("oldIndex"),o=d.min([a,s]),r=d.max([a,s]),l=d.pullAt(n,s)[0];if(l){"none"!==this.getConfiguredState()&&this.statePersistence.removeWidgetState(this,"selectedItem"),this.reorderProps.minIndex=d.min([o,this.reorderProps.minIndex]),this.reorderProps.maxIndex=d.max([r,this.reorderProps.maxIndex]),n.splice(a,0,l),this.cdRef.markForCheck(),this.cdRef.detectChanges();const t={oldIndex:s,newIndex:a,item:n[a]};this.invokeEventCallback("reorder",{$event:e,$data:n,$changedItem:t}),this.$ulEle.removeData("oldIndex")}}configureDnD(){let e;const t=$(document).find(".modal");e=this.getAttr("height")?"parent":t.length?t[t.length-1]:"body";const i={appendTo:e},a=$(this.nativeElement);this.$ulEle=a.find(".app-livelist-container"),n.configureDnD(this.$ulEle,i,this.onReorderStart.bind(this),this.onUpdate.bind(this),this.onSort.bind(this)),this.$ulEle.droppable({accept:".app-list-item"})}checkSelectionLimit(e){return!this.selectionlimit||e<this.selectionlimit}getListItemByIndex(e){return this.listItems.toArray()[e]}getListItemIndex(e){return this.listItems.toArray().indexOf(e)}getItemRefByIndexOrModel(e){let t;return t=d.isNumber(e)?this.getListItemByIndex(e):this.getListItemByModel(e),t}beforePaginationChange(e,t){this.invokeEventCallback("paginationchange",{$event:e,$index:t})}trackByFn(e){return e}subscribeToPullToRefresh(){this._listenerDestroyers.push(this.app.subscribe("pulltorefresh",()=>{this.datasource&&this.datasource.listRecords&&this.datasource.listRecords()}))}setUpCUDHandlers(){const e=document.getElementsByClassName("add-list-item")[0];e&&(this.boundAddItemHandler=e=>{this.create()},e.addEventListener("click",this.boundAddItemHandler))}_readItemAttrsFromHost(){const e=this.nativeElement.getAttribute("itemattrs");if(e)try{this.itemAttrsMap=JSON.parse(e)}catch(t){console.warn("list.component: failed to parse itemattrs JSON",t,e),this.itemAttrsMap={}}else this.itemAttrsMap={}}static{this.\u0275fac=u.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:u,type:t,deps:[{token:u.Injector},{token:u.ChangeDetectorRef},{token:h.ToDatePipe},{token:g.App},{token:g.AppDefaults},{token:u.NgZone},{token:"itemclass.bind",attribute:!0},{token:"disableitem.bind",attribute:!0},{token:"dataset.bind",attribute:!0},{token:"datasource.bind",attribute:!0},{token:"mouseenter.event",attribute:!0},{token:"mouseleave.event",attribute:!0},{token:g.StatePersistence},{token:g.PaginationService},{token:"EXPLICIT_CONTEXT",optional:!0}],target:u.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=u.\u0275\u0275ngDeclareComponent({minVersion:"17.0.0",version:"20.3.19",type:t,isStandalone:!0,selector:"div[wmList]",providers:[n.provideAsWidgetRef(t)],queries:[{propertyName:"listTemplate",first:!0,predicate:["listTemplate"],descendants:!0},{propertyName:"listLeftActionTemplate",first:!0,predicate:["listLeftActionTemplate"],descendants:!0},{propertyName:"listRightActionTemplate",first:!0,predicate:["listRightActionTemplate"],descendants:!0},{propertyName:"btnComponents",predicate:r.ButtonComponent}],viewQueries:[{propertyName:"dataNavigator",first:!0,predicate:o.PaginationComponent,descendants:!0},{propertyName:"listItems",predicate:e.ListItemDirective,descendants:!0}],usesInheritance:!0,ngImport:u,template:'@if (title || subheading || iconclass) {\n <div class="panel-heading">\n <h3 class="panel-title">\n <div class="pull-left">\n <i class="app-icon panel-icon {{iconclass}}" aria-hidden="true" [hidden]="!iconclass"></i>\n </div>\n <div class="pull-left">\n <div class="heading" [innerHTML]="title"></div>\n <div class="description" [innerHTML]="subheading"></div>\n </div>\n </h3>\n </div>\n}\n\n@if (navigation === \'Inline\' && !noDataFound) {\n <div class="app-datanavigator" [attr.aria-disabled]="dataNavigator.isDisablePrevious" aria-label="Page navigation">\n <ul class="pager">\n <li class="previous" [ngClass]="{\'disabled\': (dataNavigator ? dataNavigator.isDisablePrevious : true)}">\n <a href="javascript:void(0);" (click)="dataNavigator.navigatePage(\'prev\', $event)"\n [attr.aria-disabled]="dataNavigator.isDisablePrevious">\n <i class="wi wi-chevron-left" aria-hidden="true"></i>\n <span class="sr-only">Go to Previous page {{dataNavigator.isDisablePrevious ? \', Disabled\' : \'\'}}</span>\n </a>\n </li>\n </ul>\n </div>\n}\n@if (navigation === \'Inline\' && !noDataFound) {\n <div aria-live="polite" aria-atomic="true" class="sr-only"> {{\'Page \' + dataNavigator.dn.currentPage + \' of \' + dataNavigator.pageCount }}</div>\n}\n\n<div>\n @if (enablereorder) {\n <div id={{titleId}} class="sr-only">\n Press space bar to toggle drag drop mode, use arrow keys to move selected elements.\n </div>\n }\n\n @if (listItems && enablereorder && currentIndex) {\n <div aria-live="assertive" class="sr-only" >\n {{ariaText + currentIndex + \' of \' + listItems.length}}\n </div>\n }\n</div>\n\n<ul [attr.tabindex]="tabindex" class="list-group app-livelist-container clearfix {{direction === \'horizontal\' ? \'app-horizontal-list\': \'\'}} {{listclass}}" role="list"\n [class.list-group-autolayout]="hasAutolayout"\n (keydown.enter)="handleKeyDown($event, \'select\')"\n\n (keydown.space)="handleKeyDown($event, \'space\')"\n\n (keydown.arrowup)="handleKeyDown($event, \'focusPrev\')"\n (keydown.arrowdown)="handleKeyDown($event, \'focusNext\')"\n (keydown.arrowleft)="handleKeyDown($event, \'focusPrev\')"\n (keydown.arrowright)="handleKeyDown($event, \'focusNext\')"\n\n (keydown.shift.arrowup)="handleKeyDown($event, \'selectPrev\')"\n (keydown.shift.arrowdown)="handleKeyDown($event, \'selectNext\')"\n (keydown.shift.arrowleft)="handleKeyDown($event, \'selectPrev\')"\n (keydown.shift.arrowright)="handleKeyDown($event, \'selectNext\')"\n [hidden]="noDataFound && !variableInflight"\n >\n @if (!groupby) {\n @for (item of fieldDefs; track item) {\n <li class="app-list-item {{direction === \'horizontal\' ? \'\' : itemsPerRowClass}}" [ngClass]="listItemRef.itemClass"\n [wmListItem]="item"\n #listItemRef="listItemRef"\n [attr.tabindex]="tabindex"\n role="listitem">\n <ng-container [ngTemplateOutlet]="listTemplate"\n [ngTemplateOutletInjector]="createCustomInjector(\'falt_\' + listItemRef.trackId, {item: item, row: item, $index: $index, itemRef: listItemRef, $first: $first, $last: $last, currentItemWidgets: listItemRef.currentItemWidgets})"\n [ngTemplateOutletContext]="{item: item, row: item, $index: $index, itemRef: listItemRef, $first: $first, $last: $last, currentItemWidgets: listItemRef.currentItemWidgets}"></ng-container>\n </li>\n }\n } @else {\n @for (groupObj of groupedData; track groupObj; let groupIndex = $index) {\n <li class="app-list-item-group clearfix">\n <ul [attr.tabindex]="tabindex" class="list-group item-group" [ngClass]="listclass" [class.list-group-autolayout]="hasAutolayout">\n <li class="app-list-item-header list-item list-group-header" (click)="handleHeaderClick($event)" [ngClass]="{\'collapsible-content\': collapsible}">\n <h4>{{groupObj.key}}\n <div class="header-action">\n @if (collapsible) {\n <i class="app-icon wi action wi-chevron-up"></i>\n }\n @if (showcount) {\n <span class="label label-default">{{groupObj.data.length}}</span>\n }\n </div>\n </h4>\n </li>\n <li class="list-group-container">\n <ul class="list-group clearfix {{direction === \'horizontal\' ? \'app-horizontal-list\': \'\'}}" [class.list-group-autolayout]="hasAutolayout">\n @for (item of groupObj.data; track trackByFn($index, item)) {\n <li [attr.tabindex]="tabindex"\n class="app-list-item group-list-item {{itemsPerRowClass}}"\n [ngClass]="listItemRef.itemClass"\n [wmListItem]="item" #listItemRef="listItemRef">\n <ng-container [ngTemplateOutlet]="listTemplate"\n [ngTemplateOutletInjector]="createCustomInjector(\'group_\' + listItemRef.trackId, {item: item, row: item, $index: $index, itemRef: listItemRef, $first: $first, $last: $last, currentItemWidgets: listItemRef.currentItemWidgets})"\n [ngTemplateOutletContext]="{item: item, row: item, $index: $index, itemRef: listItemRef, $first: $first, $last: $last, currentItemWidgets: listItemRef.currentItemWidgets}"></ng-container>\n </li>\n }\n </ul>\n </li>\n </ul>\n </li>\n }\n }\n <ng-container [ngTemplateOutlet]="listLeftActionTemplate"></ng-container>\n <ng-container [ngTemplateOutlet]="listRightActionTemplate"></ng-container>\n</ul>\n\n@if (noDataFound && !variableInflight) {\n <div class="no-data-msg" [textContent]="nodatamessage"></div>\n}\n\n@if (variableInflight && !pulltorefresh) {\n <div class="loading-data-msg">\n <span>\n <i class="app-icon panel-icon fa-spin" aria-hidden="true" [ngClass]="loadingicon"></i>\n <span class="sr-only">Loading</span>\n <span class="loading-text" [textContent]="loadingdatamsg"></span>\n </span>\n </div>\n}\n\n@if (navigation === \'Inline\' && !noDataFound) {\n <div class="app-datanavigator" [attr.aria-disabled]="dataNavigator.isDisableNext">\n <ul class="pager">\n <li class="next" [ngClass]="{\'disabled\': (dataNavigator ? dataNavigator.isDisableNext : true)}">\n <a href="javascript:void(0);" (click)="dataNavigator.navigatePage(\'next\', $event)"\n [attr.aria-disabled]="dataNavigator.isDisableNext">\n <i class="wi wi-chevron-right" aria-hidden="true"></i>\n <span class="sr-only">Go to Next page {{dataNavigator.isDisableNext ? \', Disabled\' : \'\'}}</span>\n </a>\n </li>\n </ul>\n </div>\n}\n\n@if (navigation !== \'None\') {\n <div class="panel-footer" [hidden]="!showNavigation || (onDemandLoad && dataNavigator.isDisableNext) || (dataNavigator?.dataSize <= pagesize && !allowpagesizechange) || (!dataNavigator.dataSize && !dataNavigator.datasource?.pagination?.next)">\n <nav wmPagination\n navigationalign.bind="navigationalign"\n navigation.bind="navControls"\n showrecordcount.bind="showrecordcount"\n maxsize.bind="maxsize"\n boundarylinks.bind="boundarylinks"\n forceellipses.bind="forceellipses"\n directionlinks.bind="directionlinks"\n show.bind="!onDemandLoad"\n paginationchange.event="beforePaginationChange($event, $index)"\n ></nav>\n @if (onDemandLoad) {\n <a href="javascript:void(0);"\n (click)="dataNavigator.navigatePage(\'next\', $event)"\n class="app-button btn btn-block"\n [ngClass]="paginationclass"\n [textContent]="ondemandmessage"\n ></a>\n }\n </div>\n}\n\n\x3c!--This template will be displayed when groupby is specified--\x3e\n',dependencies:[{kind:"ngmodule",type:i.CommonModule},{kind:"directive",type:m.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"directive",type:m.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]},{kind:"directive",type:n.TextContentDirective,selector:"[textContent]",inputs:["textContent"]},{kind:"component",type:o.PaginationComponent,selector:"[wmPagination]",outputs:["resultEmitter","maxResultsEmitter"]},{kind:"directive",type:e.ListItemDirective,selector:"[wmListItem]",inputs:["wmListItem"],exportAs:["listItemRef"]}]})}},e.ListComponent=t.__decorate([n.AutoLayout({targetSelector:"ul"}),t.__metadata("design:paramtypes",[a.Injector,a.ChangeDetectorRef,n.ToDatePipe,s.App,s.AppDefaults,a.NgZone,String,String,String,String,String,String,s.StatePersistence,s.PaginationService,Object])],e.ListComponent),u.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:u,type:e.ListComponent,decorators:[{type:a.Component,args:[{standalone:!0,imports:[i.CommonModule,n.TextContentDirective,o.PaginationComponent,e.ListItemDirective],selector:"div[wmList]",providers:[n.provideAsWidgetRef(e.ListComponent)],template:'@if (title || subheading || iconclass) {\n <div class="panel-heading">\n <h3 class="panel-title">\n <div class="pull-left">\n <i class="app-icon panel-icon {{iconclass}}" aria-hidden="true" [hidden]="!iconclass"></i>\n </div>\n <div class="pull-left">\n <div class="heading" [innerHTML]="title"></div>\n <div class="description" [innerHTML]="subheading"></div>\n </div>\n </h3>\n </div>\n}\n\n@if (navigation === \'Inline\' && !noDataFound) {\n <div class="app-datanavigator" [attr.aria-disabled]="dataNavigator.isDisablePrevious" aria-label="Page navigation">\n <ul class="pager">\n <li class="previous" [ngClass]="{\'disabled\': (dataNavigator ? dataNavigator.isDisablePrevious : true)}">\n <a href="javascript:void(0);" (click)="dataNavigator.navigatePage(\'prev\', $event)"\n [attr.aria-disabled]="dataNavigator.isDisablePrevious">\n <i class="wi wi-chevron-left" aria-hidden="true"></i>\n <span class="sr-only">Go to Previous page {{dataNavigator.isDisablePrevious ? \', Disabled\' : \'\'}}</span>\n </a>\n </li>\n </ul>\n </div>\n}\n@if (navigation === \'Inline\' && !noDataFound) {\n <div aria-live="polite" aria-atomic="true" class="sr-only"> {{\'Page \' + dataNavigator.dn.currentPage + \' of \' + dataNavigator.pageCount }}</div>\n}\n\n<div>\n @if (enablereorder) {\n <div id={{titleId}} class="sr-only">\n Press space bar to toggle drag drop mode, use arrow keys to move selected elements.\n </div>\n }\n\n @if (listItems && enablereorder && currentIndex) {\n <div aria-live="assertive" class="sr-only" >\n {{ariaText + currentIndex + \' of \' + listItems.length}}\n </div>\n }\n</div>\n\n<ul [attr.tabindex]="tabindex" class="list-group app-livelist-container clearfix {{direction === \'horizontal\' ? \'app-horizontal-list\': \'\'}} {{listclass}}" role="list"\n [class.list-group-autolayout]="hasAutolayout"\n (keydown.enter)="handleKeyDown($event, \'select\')"\n\n (keydown.space)="handleKeyDown($event, \'space\')"\n\n (keydown.arrowup)="handleKeyDown($event, \'focusPrev\')"\n (keydown.arrowdown)="handleKeyDown($event, \'focusNext\')"\n (keydown.arrowleft)="handleKeyDown($event, \'focusPrev\')"\n (keydown.arrowright)="handleKeyDown($event, \'focusNext\')"\n\n (keydown.shift.arrowup)="handleKeyDown($event, \'selectPrev\')"\n (keydown.shift.arrowdown)="handleKeyDown($event, \'selectNext\')"\n (keydown.shift.arrowleft)="handleKeyDown($event, \'selectPrev\')"\n (keydown.shift.arrowright)="handleKeyDown($event, \'selectNext\')"\n [hidden]="noDataFound && !variableInflight"\n >\n @if (!groupby) {\n @for (item of fieldDefs; track item) {\n <li class="app-list-item {{direction === \'horizontal\' ? \'\' : itemsPerRowClass}}" [ngClass]="listItemRef.itemClass"\n [wmListItem]="item"\n #listItemRef="listItemRef"\n [attr.tabindex]="tabindex"\n role="listitem">\n <ng-container [ngTemplateOutlet]="listTemplate"\n [ngTemplateOutletInjector]="createCustomInjector(\'falt_\' + listItemRef.trackId, {item: item, row: item, $index: $index, itemRef: listItemRef, $first: $first, $last: $last, currentItemWidgets: listItemRef.currentItemWidgets})"\n [ngTemplateOutletContext]="{item: item, row: item, $index: $index, itemRef: listItemRef, $first: $first, $last: $last, currentItemWidgets: listItemRef.currentItemWidgets}"></ng-container>\n </li>\n }\n } @else {\n @for (groupObj of groupedData; track groupObj; let groupIndex = $index) {\n <li class="app-list-item-group clearfix">\n <ul [attr.tabindex]="tabindex" class="list-group item-group" [ngClass]="listclass" [class.list-group-autolayout]="hasAutolayout">\n <li class="app-list-item-header list-item list-group-header" (click)="handleHeaderClick($event)" [ngClass]="{\'collapsible-content\': collapsible}">\n <h4>{{groupObj.key}}\n <div class="header-action">\n @if (collapsible) {\n <i class="app-icon wi action wi-chevron-up"></i>\n }\n @if (showcount) {\n <span class="label label-default">{{groupObj.data.length}}</span>\n }\n </div>\n </h4>\n </li>\n <li class="list-group-container">\n <ul class="list-group clearfix {{direction === \'horizontal\' ? \'app-horizontal-list\': \'\'}}" [class.list-group-autolayout]="hasAutolayout">\n @for (item of groupObj.data; track trackByFn($index, item)) {\n <li [attr.tabindex]="tabindex"\n class="app-list-item group-list-item {{itemsPerRowClass}}"\n [ngClass]="listItemRef.itemClass"\n [wmListItem]="item" #listItemRef="listItemRef">\n <ng-container [ngTemplateOutlet]="listTemplate"\n [ngTemplateOutletInjector]="createCustomInjector(\'group_\' + listItemRef.trackId, {item: item, row: item, $index: $index, itemRef: listItemRef, $first: $first, $last: $last, currentItemWidgets: listItemRef.currentItemWidgets})"\n [ngTemplateOutletContext]="{item: item, row: item, $index: $index, itemRef: listItemRef, $first: $first, $last: $last, currentItemWidgets: listItemRef.currentItemWidgets}"></ng-container>\n </li>\n }\n </ul>\n </li>\n </ul>\n </li>\n }\n }\n <ng-container [ngTemplateOutlet]="listLeftActionTemplate"></ng-container>\n <ng-container [ngTemplateOutlet]="listRightActionTemplate"></ng-container>\n</ul>\n\n@if (noDataFound && !variableInflight) {\n <div class="no-data-msg" [textContent]="nodatamessage"></div>\n}\n\n@if (variableInflight && !pulltorefresh) {\n <div class="loading-data-msg">\n <span>\n <i class="app-icon panel-icon fa-spin" aria-hidden="true" [ngClass]="loadingicon"></i>\n <span class="sr-only">Loading</span>\n <span class="loading-text" [textContent]="loadingdatamsg"></span>\n </span>\n </div>\n}\n\n@if (navigation === \'Inline\' && !noDataFound) {\n <div class="app-datanavigator" [attr.aria-disabled]="dataNavigator.isDisableNext">\n <ul class="pager">\n <li class="next" [ngClass]="{\'disabled\': (dataNavigator ? dataNavigator.isDisableNext : true)}">\n <a href="javascript:void(0);" (click)="dataNavigator.navigatePage(\'next\', $event)"\n [attr.aria-disabled]="dataNavigator.isDisableNext">\n <i class="wi wi-chevron-right" aria-hidden="true"></i>\n <span class="sr-only">Go to Next page {{dataNavigator.isDisableNext ? \', Disabled\' : \'\'}}</span>\n </a>\n </li>\n </ul>\n </div>\n}\n\n@if (navigation !== \'None\') {\n <div class="panel-footer" [hidden]="!showNavigation || (onDemandLoad && dataNavigator.isDisableNext) || (dataNavigator?.dataSize <= pagesize && !allowpagesizechange) || (!dataNavigator.dataSize && !dataNavigator.datasource?.pagination?.next)">\n <nav wmPagination\n navigationalign.bind="navigationalign"\n navigation.bind="navControls"\n showrecordcount.bind="showrecordcount"\n maxsize.bind="maxsize"\n boundarylinks.bind="boundarylinks"\n forceellipses.bind="forceellipses"\n directionlinks.bind="directionlinks"\n show.bind="!onDemandLoad"\n paginationchange.event="beforePaginationChange($event, $index)"\n ></nav>\n @if (onDemandLoad) {\n <a href="javascript:void(0);"\n (click)="dataNavigator.navigatePage(\'next\', $event)"\n class="app-button btn btn-block"\n [ngClass]="paginationclass"\n [textContent]="ondemandmessage"\n ></a>\n }\n </div>\n}\n\n\x3c!--This template will be displayed when groupby is specified--\x3e\n'}]}],ctorParameters:()=>[{type:u.Injector},{type:u.ChangeDetectorRef},{type:h.ToDatePipe},{type:g.App},{type:g.AppDefaults},{type:u.NgZone},{type:void 0,decorators:[{type:a.Attribute,args:["itemclass.bind"]}]},{type:void 0,decorators:[{type:a.Attribute,args:["disableitem.bind"]}]},{type:void 0,decorators:[{type:a.Attribute,args:["dataset.bind"]}]},{type:void 0,decorators:[{type:a.Attribute,args:["datasource.bind"]}]},{type:void 0,decorators:[{type:a.Attribute,args:["mouseenter.event"]}]},{type:void 0,decorators:[{type:a.Attribute,args:["mouseleave.event"]}]},{type:g.StatePersistence},{type:g.PaginationService},{type:void 0,decorators:[{type:a.Inject,args:["EXPLICIT_CONTEXT"]},{type:a.Optional}]}],propDecorators:{listTemplate:[{type:a.ContentChild,args:["listTemplate"]}],listLeftActionTemplate:[{type:a.ContentChild,args:["listLeftActionTemplate"]}],listRightActionTemplate:[{type:a.ContentChild,args:["listRightActionTemplate"]}],btnComponents:[{type:a.ContentChildren,args:[r.ButtonComponent]}],dataNavigator:[{type:a.ViewChild,args:[o.PaginationComponent]}],listItems:[{type:a.ViewChildren,args:[e.ListItemDirective]}]}})}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common"),require("@wm/components/basic/anchor"),require("@wm/components/input/button"),require("@wm/components/navigation/menu"),require("@angular/core"),require("@angular/forms"),require("@wm/core"),require("rxjs"),require("@wm/components/base"),require("@wm/components/data/pagination"),require("@wm/components/data/list"),require("rxjs/operators"),require("lodash-es"),require("ngx-bootstrap/dropdown"),require("moment")):"function"==typeof define&&define.amd?define(["exports","@angular/common","@wm/components/basic/anchor","@wm/components/input/button","@wm/components/navigation/menu","@angular/core","@angular/forms","@wm/core","rxjs","@wm/components/base","@wm/components/data/pagination","@wm/components/data/list","rxjs/operators","lodash-es","ngx-bootstrap/dropdown","moment"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.data=e.wm.components.data||{},e.wm.components.data.table={}),e.ng.common,e.wm.components.basic.anchor,e.wm.components.input.button,e.wm.components.navigation.menu,e.ng.core,e.ng.forms,e.wm.core,e.rxjs,e.wm.components.base,e.wm.components.data.pagination,e.wm.components.data.list,e.rxjs.operators,e._,e.ngxBootstrap.dropdown,e.momentLib)}(this,function(e,t,i,n,a,s,o,r,l,c,d,p,m,h,u,g){"use strict";function v(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var f=v(t),b=v(s),y=v(o),w=v(r),P=v(c),C=v(p),T=v(u),O=v(g);const I={widgetType:"wm-table",hostClass:"app-grid app-panel panel"},D={EXCEL:"fa fa-file-excel-o",CSV:"fa fa-file-text-o"},E="rowOperations",R="5,10,20,50,100",S=()=>{};class _ extends c.StylableComponent{static{this.initializeProps=void c.register("wm-table",new Map([["boundarylinks",{value:!1,...c.PROP_BOOLEAN}],["class",c.PROP_STRING],["confirmdelete",{value:"Are you sure you want to delete this?",...c.PROP_STRING}],["currentpage",{value:1,...c.PROP_NUMBER}],["datasource",c.PROP_STRING],["dataset",c.PROP_ANY],["deletecanceltext",c.PROP_STRING],["deleteoktext",c.PROP_STRING],["deletemessage",{value:"Record deleted successfully",...c.PROP_STRING}],["directionlinks",{value:!0,...c.PROP_BOOLEAN}],["editmode",c.PROP_STRING],["errorstyle",{value:"hover",...c.PROP_STRING}],["enablecolumnselection",{value:!1,...c.PROP_BOOLEAN}],["enablesort",{value:!0,...c.PROP_BOOLEAN}],["errormessage",c.PROP_STRING],["exportformat",c.PROP_STRING],["exportdatasize",{value:100,...c.PROP_NUMBER}],["filtermode",c.PROP_STRING],["filteronkeypress",{value:!1,...c.PROP_BOOLEAN}],["caseinsensitive",{value:!1,...c.PROP_BOOLEAN}],["filternullrecords",{value:!0,...c.PROP_BOOLEAN}],["forceellipses",{value:!0,...c.PROP_BOOLEAN}],["formposition",c.PROP_STRING],["gridclass",{value:"table-hover",...c.PROP_STRING}],["gridfirstrowselect",c.PROP_BOOLEAN],["iconclass",c.PROP_STRING],["insertmessage",{value:"Record added successfully",...c.PROP_STRING}],["isdynamictable",c.PROP_BOOLEAN],["isrowexpansionenabled",c.PROP_BOOLEAN],["isrowselectable",{value:!1,...c.PROP_BOOLEAN}],["allowpagesizechange",{value:!1,...c.PROP_BOOLEAN}],["pagesizeoptions",{value:"5,10,20,50,100",...c.PROP_STRING}],["loadingdatamsg",{value:"Loading...",...c.PROP_STRING}],["loadingicon",{value:"fa fa-circle-o-notch fa-spin",...c.PROP_STRING}],["maxsize",{value:5,...c.PROP_NUMBER}],["multiselect",c.PROP_BOOLEAN],["multiselecttitle",c.PROP_ANY],["multiselectarialabel",c.PROP_ANY],["name",c.PROP_STRING],["navigation",{value:"Basic",...c.PROP_STRING}],["navigationalign",{value:"left",...c.PROP_STRING}],["nodatamessage",{value:"No data found.",...c.PROP_STRING}],["ondemandmessage",{value:"Load More",...c.PROP_STRING}],["showviewlessbutton",{value:!1,...c.PROP_BOOLEAN}],["viewlessmessage",{value:"View Less",...c.PROP_STRING}],["pagesize",c.PROP_NUMBER],["radioselect",c.PROP_BOOLEAN],["headerselectall",{value:!1,...c.PROP_BOOLEAN}],["radioselecttitle",c.PROP_ANY],["radioselectarialabel",c.PROP_ANY],["rowclass",c.PROP_STRING],["rowngclass",c.PROP_STRING],["searchlabel",{value:"Search",...c.PROP_STRING}],["show",{value:!0,...c.PROP_BOOLEAN}],["showheader",{value:!0,...c.PROP_BOOLEAN}],["shownewrow",{value:!0,...c.PROP_BOOLEAN}],["showrecordcount",c.PROP_BOOLEAN],["showrowindex",c.PROP_BOOLEAN],["spacing",{value:"normal",...c.PROP_STRING}],["statehandler",{value:"none",...c.PROP_STRING}],["subheading",c.PROP_STRING],["tabindex",{value:0,...c.PROP_NUMBER}],["title",c.PROP_STRING],["updatemessage",{value:"Record updated successfully",...c.PROP_STRING}]]))}set gridData(e){if(this.isDataLoading=!1,this.variableInflight&&h.isEmpty(e))return;if(this.variableInflight=!1,e&&0===e.length?this.callDataGridMethod("setStatus","nodata",this.nodatamessage):this.callDataGridMethod("setStatus","ready"),this.gridOptions.isNavTypeScrollOrOndemand()){if([this._gridData,this.currentPage]=this.paginationService.updateFieldsOnPagination(this,e),this.gridOptions.lastActionPerformed===this.gridOptions.ACTIONS.EDIT){const t=h.floor(this.actionRowIndex%this.pagesize);this._gridData.splice(this.actionRowIndex,1,e[t])}this.setDataGridOption("isLastPage",!!this.dataNavigator.isDisableNext),this.$element.find(".on-demand-datagrid").length||this.dataNavigator.isDisableNext||!this.onDemandLoad?this._gridData&&this._gridData.length&&(this.dataNavigator.isDisableNext||!this.isDataLoading)&&this.callDataGridMethod("hideLoadingIndicator",this.dataNavigator.isDisableNext,this.infScroll):this.gridOptions.addLoadMoreBtn()}else this._gridData=e;let t,i=0;if(this._onChange(this._gridData),this._onTouched(),r.isDefined(e)){if(this.gridOptions.bindScrollEvt(),this.isNavigationEnabled()&&this.dataNavigator.dn.currentPage&&(i=(this.dataNavigator.dn.currentPage-1)*(this.dataNavigator.maxResults||1)+1,this.setDataGridOption("startRowIndex",i)),t=this.callDataGridMethod("getOptions"),!t)return;if(!t.colDefs.length&&this.fieldDefs.length&&this.setDataGridOption("colDefs",r.getClonedObject(this.fieldDefs)),!this.isdynamictable&&!h.isEmpty(e)&&t.colDefs.length)try{this.invokeEventCallback("beforedatarender",{$data:this._gridData,$columns:this.columns,data:this._gridData,columns:this.columns})}catch(e){console.warn("Error in beforedatarender event callback, continuing with table rendering:",e)}this.setDataGridOption("data",r.getClonedObject(this._gridData))}}get gridData(){return this._gridData||[]}get selecteditem(){return this.multiselect?r.getClonedObject(this.items):h.isEmpty(this.items)?{}:r.getClonedObject(this.items[0])}set selecteditem(e){this.items.length=0,this.callDataGridMethod("selectRows",e)}onKeyPress(e){13===e.which&&this.invokeEventCallback("enterkeypress",{$event:e,$data:this.gridData})}constructor(e,t,i,n,a,s,o,d,p,u,g,v,f,b,y){super(e,I,y),this.inj=e,this.envInjector=t,this.fb=i,this.app=n,this.dynamicComponentProvider=a,this.statePersistence=s,this.paginationService=o,this.viewport=d,this.parentList=p,this.binddataset=u,this.binddatasource=g,this.readonlygrid=v,this.ngZone=f,this.trustAsPipe=b,this.rowActionsCompiledTl={},this.rowFilterCompliedTl={},this.inlineCompliedTl={},this.inlineNewCompliedTl={},this.customExprCompiledTl={},this.customExprCompiledSummaryTl={},this.rowDefInstances={},this.rowDefMap={},this.rowExpansionActionTl={},this.columns={},this.formfields={},this.enablesort=!0,this.showviewlessbutton=!1,this.primaryKey=[],this.selectedItems=[],this.selectedItemChange=new l.Subject,this.selectedItemChange$=this.selectedItemChange.asObservable(),this.actions=[],this._actions={header:[],footer:[]},this.exportOptions=[],this.headerConfig=[],this.items=[],this.rowActions=[],this.shownavigation=!1,this.showFirstRow=!1,this.documentClickBind=S,this.prevFilterExpression=[],this.fieldDefs=[],this.rowDef={},this.rowInstance={},this.fullFieldDefs=[],this.variableInflight=!0,this.applyProps=new Map,this.redraw=h.debounce(this._redraw,150),this.debouncedHandleLoading=h.debounce(this.handleLoading,350),this.rowFilter={},this._searchSortHandler=S,this.searchSortHandler=(...e)=>{this._searchSortHandler.apply(this,e)},this.onRowFilterChange=S,this.onFilterConditionSelect=S,this.showClearIcon=S,this.clearRowFilter=S,this.adjustContainer=S,this._pageLoad=!0,this.gridOptions={data:[],colDefs:[],startRowIndex:1,mode:"",sortInfo:{field:"",direction:""},filtermode:"",filteronkeypress:!1,isrowselectable:!1,searchLabel:"",rowActions:[],headerConfig:[],rowClass:"",editmode:"",formPosition:"",isMobile:!1,rowExpansionEnabled:!1,rowDef:{position:"0"},name:"",messages:{selectField:"Select Field"},securityUtils:{pipeTransform:{}},navigation:"",isdynamictable:"",deletedRowIndex:-1,lastActionPerformed:"scroll",isSearchTrigerred:!1,isDatasetUpdated:!1,isDataUpdatedByUser:!1,showviewlessbutton:!1,ondemandmessage:"",allowpagesizechange:!1,pagesizeoptions:R,viewlessmessage:"",loadingdatamsg:"",isNextPageData:void 0,enableSort:!0,multiselect:!1,showRadioColumn:!1,enableColumnSelection:!1,multiselecttitle:"",multiselectarialabel:"",radioselecttitle:"",headerselectall:!1,radioselectarialabel:"",ACTIONS:{DELETE:"delete",EDIT:"edit",SEARCH_OR_SORT:"search_or_sort",DEFAULT:"scroll",FILTER_CRITERIA:"filter",DATASET_UPDATE:"dataset_update"},actionRowIndex:void 0,actionRowPage:void 0,isLastPage:!1,getCurrentPage:()=>h.get(this.dataNavigator,"dn.currentPage")||1,setCurrentPage:e=>{h.set(this.dataNavigator,"dn.currentPage",e||1)},getDataSource:()=>this.datasource,getPageSize:()=>this.pagesize,getUpdatedPageSize:()=>this.updatedPageSize,getPageCount:()=>this.dataNavigator.pageCount,enableNavigation:()=>{this.dataNavigator.widget.isDisableNext=!1,this.dataNavigator.widget.isDisableLast=!1,this.gridOptions.mode="viewless"},setDeletedRowIndex:e=>{this.setDataGridOption("deletedRowIndex",e)},setLastActionPerformed:e=>{this.setDataGridOption("lastActionPerformed",e||this.gridOptions.lastActionPerformed)},isNavTypeScrollOrOndemand:()=>"Scroll"===this.gridOptions.navigation||"On-Demand"===this.gridOptions.navigation,setIsSearchTrigerred:e=>{this.setDataGridOption("isSearchTrigerred",e)},setIsDatasetUpdated:e=>{this.setDataGridOption("isDatasetUpdated",e)},setIsNextPageData:e=>{this.setDataGridOption("isNextPageData",e)},setIsDataUpdatedByUser:e=>{this.setDataGridOption("isDataUpdatedByUser",e)},onDataRender:()=>{this.ngZone.run(()=>{this.gridData.length&&this.invokeEventCallback("datarender",{$data:this.gridData,data:this.gridData}),this.multiselect||(this.items.length=0),this.infScroll||this.onDemandLoad||this.callDataGridMethod("selectRows",this.items),this.selectedItems=this.callDataGridMethod("getSelectedRows"),this.selectedItems.length&&this.selectedItemChange.next(this.selectedItems),this._isPageSearch&&this.filterInfo&&this.searchSortHandler(this.filterInfo,void 0,"search")})},getParentTableData:()=>{const e=$(this.nativeElement).closest("tr");return{parentId:e.prev("tr.app-datagrid-row")?.attr("data-row-id"),parentPage:e.closest("div.app-grid.app-panel.panel")?.attr("currentpage")||1}},onRowSelect:(e,t)=>{this.ngZone.run(()=>{this.selectedItems=this.callDataGridMethod("getSelectedRows"),this.selectedItems.length&&this.selectedItemChange.next(this.selectedItems);const i=this.addRowIndex(e);if(this.selectedItems.length&&i.$index&&"none"!==this.getConfiguredState()&&this.dataNavigator&&c.unsupportedStatePersistenceTypes.indexOf(this.navigation)<0){const e=this.gridOptions.getParentTableData(),t=e.parentId?{page:this.dataNavigator.dn.currentPage,index:i.$index-1,parentRowIndex:e.parentId,parentCurrentPage:e.parentPage}:{page:this.dataNavigator.dn.currentPage,index:i.$index-1},n=this.statePersistence.getWidgetState(this);h.get(n,"selectedItem")&&this.multiselect?(h.some(n.selectedItem,t)||n.selectedItem.push(t),this.statePersistence.setWidgetState(this,{selectedItem:n.selectedItem})):this.statePersistence.setWidgetState(this,{selectedItem:[t]})}else console.warn("Retain State handling on Widget "+this.name+" is not supported for current pagination type.");this.invokeEventCallback("rowselect",{$data:i,$event:t,row:i})})},assignSelectedItems:(e,t,i)=>{this.ngZone.run(()=>{this.multiselect?-1===h.findIndex(this.items,e)&&(void 0===i?._selected||1==i?._selected||this.gridfirstrowselect&&0==i?.rowId&&!this.showFirstRow)&&(this.items.push(e),0==i?.rowId&&(this.showFirstRow=!0)):(this.items.length=0,this.items.push(e))})},onRowDblClick:(e,t)=>{const i=this.addRowIndex(e);this.invokeEventCallback("rowdblclick",{$data:i,$event:t,row:i})},onRowDeselect:(e,t)=>{this.multiselect&&this.ngZone.run(()=>{this.items=h.pullAllWith(this.items,[e],h.isEqual),this.selectedItems=this.callDataGridMethod("getSelectedRows"),this.invokeEventCallback("rowdeselect",{$data:e,$event:t,row:e});const i=this.addRowIndex(e);if("none"!==this.getConfiguredState()&&c.unsupportedStatePersistenceTypes.indexOf(this.navigation)<0){const e=this.gridOptions.getParentTableData(),t=e.parentId?{page:this.dataNavigator.dn.currentPage,index:i.$index-1,parentRowIndex:e.parentId,parentCurrentPage:e.parentPage}:{page:this.dataNavigator.dn.currentPage,index:i.$index-1},n=this.statePersistence.getWidgetState(this);h.get(n,"selectedItem")&&(h.remove(n.selectedItem,function(e){return h.isEqual(e,t)}),this.statePersistence.removeWidgetState(this,"selectedItem"),n.selectedItem.length>0&&this.statePersistence.setWidgetState(this,{selectedItem:n.selectedItem}))}else console.warn("Retain State handling on Widget "+this.name+" is not supported for current pagination type.")})},callOnRowDeselectEvent:(e,t)=>{this.items=this.selectedItems=this.callDataGridMethod("getSelectedRows"),this.invokeEventCallback("rowdeselect",{$data:e,$event:t,row:e})},callOnRowClickEvent:(e,t)=>{this.ngZone.run(()=>{if(t&&t.hasOwnProperty("originalEvent")){const i=this.addRowIndex(e);this.invokeEventCallback("rowclick",{$data:i,$event:t,row:i})}})},closePopover:r.closePopover,onColumnSelect:(e,t)=>{this.selectedColumns=this.callDataGridMethod("getSelectedColumns"),this.invokeEventCallback("columnselect",{$data:e,$event:t})},onColumnDeselect:(e,t)=>{this.selectedColumns=this.callDataGridMethod("getSelectedColumns"),this.invokeEventCallback("columndeselect",{$data:e,$event:t})},onHeaderClick:(e,t)=>{this.invokeEventCallback("headerclick",{$event:t,$data:e,column:e})},selectAllRows:(e,t)=>{if(this.headerselectall&&this.multiselect){const i=this.dataNavigator.dataSize,n=this.dataNavigator.maxResults;if(e){const e={selectedItem:[]},a=Math.ceil(i/n);for(let t=1;t<=a;t++){const a=Math.min(n,i-(t-1)*n);for(let i=0;i<a;i++)e.selectedItem.push({page:t,index:i})}this.items=[...this.__fullData],this.selectedItems=this.callDataGridMethod("getSelectedRows"),this.selectedItems.length&&this.selectedItemChange.next(this.selectedItems),this.statePersistence.setWidgetState(this,e),this.__fullData.forEach(e=>{this.invokeEventCallback("rowselect",{$data:r.getClonedObject(e),$event:t,row:r.getClonedObject(e)})})}else this.items=this.selectedItems=[],this.statePersistence.setWidgetState(this,{selectedItem:null}),this.__fullData.forEach(e=>{const i=r.getClonedObject(e);this.invokeEventCallback("rowdeselect",{$data:i,$event:t,row:i})})}},onRowDelete:(e,t,i,n,a)=>{this.ngZone.run(()=>{this.deleteRecord(h.extend({},a,{row:e,cancelRowDeleteCallback:t,evt:i,callBack:n}))})},onRowInsert:(e,t,i,n)=>{this.insertRecord(h.extend({},n,{row:e,event:t,callBack:i}))},beforeRowUpdate:(e,t)=>{this._liveTableParent&&this._liveTableParent.updateRow(e,t),this.prevData=r.getClonedObject(e)},afterRowUpdate:(e,t,i,n)=>{r.muteWatchers(),this.updateRecord(h.extend({},n,{row:e,prevData:n.rowindex?n.rowindex:this.prevData,event:t,callBack:i})),setTimeout(()=>{r.unMuteWatchers()},10)},onBeforeRowUpdate:(e,t,i)=>this.invokeEventCallback("beforerowupdate",{$event:t,$data:e,row:e,options:i}),onBeforeRowInsert:(e,t,i)=>this.invokeEventCallback("beforerowinsert",{$event:t,$data:e,row:e,options:i}),onBeforeRowDelete:(e,t,i)=>{const n=this.addRowIndex(e);return this.invokeEventCallback("beforerowdelete",{$event:t,row:n,options:i})},onFormRender:(e,t,i,n)=>{const a=n?"inlineInstanceNew":"inlineInstance";setTimeout(()=>{this.formWidgets={},this.fieldDefs.forEach(e=>{e[a]&&(this.formWidgets[e.field]=e[a],e[a].context&&(e[a].context.formWidgets=this.formWidgets),this.setDisabledOnField(i,e,a))}),this.invokeEventCallback("formrender",{$event:t,formWidgets:this.formWidgets,$operation:i})},250)},onBeforeFormRender:(e,t,i)=>this.invokeEventCallback("beforeformrender",{$event:t,row:e,$operation:i}),registerRowNgClassWatcher:(e,t)=>{if(!this.rowngclass)return;const i=this.getClonedRowObject(e),n=`${this.widgetId}_rowNgClass_${t}`;r.$unwatch(n),this.registerDestroyListener(r.$watch(this.rowngclass,this.viewParent,{row:i},(e,i)=>{this.callDataGridMethod("applyRowNgClass",c.getConditionalClasses(e,i),t)},n))},registerColNgClassWatcher:(e,t,i,n,a)=>{if(!t["col-ng-class"])return;const s=this.getClonedRowObject(e),o=a?`${this.widgetId}_summaryRow_colNgClass_${i}_${n}`:`${this.widgetId}_colNgClass_${i}_${n}`;r.$unwatch(o),this.registerDestroyListener(r.$watch(t["col-ng-class"],this.viewParent,{row:s},(e,t)=>{this.callDataGridMethod("applyColNgClass",c.getConditionalClasses(e,t),i,n)},o))},registerCollapseOrExpandTitleWatch:(e,t,i,n,a)=>{const s=this.getClonedRowObject(t),o=`${this.widgetId}_${n}_${i}`;r.$unwatch(o),this.registerDestroyListener(r.$watch(e,this.viewParent,{row:s},(e,t)=>{a.removeAttribute(`${n}.bind`),a.setAttribute(n,e),"expandtitle"===n&&a.setAttribute("title",e)},o))},clearCustomExpression:()=>{this.customExprViewRef.clear(),this.customExprCompiledTl={},this.customExprCompiledSummaryTl={}},clearRowDetailExpression:()=>{this.rowDetailViewRef.clear(),this.rowDefMap={},this.rowDefInstances={}},generateCustomExpressions:(e,t,i)=>{const n=this.getClonedRowObject(e),a=(e,a)=>{if(!e)return;const s={},o={row:n,colDef:s};this.addEventsToContext(o);const r=`customExpr_${a??"x"}_${t}`,l=this.customExprViewRef.createEmbeddedView(e,o,{injector:this.createCustomInjector(r,o)}).rootNodes[0],c=l.getAttribute("data-col-identifier");h.extend(s,this.columns[c]),i?this.customExprCompiledSummaryTl[c+t]=l:this.customExprCompiledTl[c+t]=l};this.isdynamictable?this.fieldDefs.forEach(e=>{a(e.customExprTmpl,e?.field?String(e.field):void 0)}):this.customExprTmpl.forEach((e,t)=>a(e,t))},generateRowExpansionCell:(e,t)=>{const i=this.getClonedRowObject(e);this.rowExpansionActionTmpl.forEach(e=>{const n={row:i};this.rowExpansionActionTl[t]=this.rowExpansionActionViewRef.createEmbeddedView(e,n,{injector:this.createCustomInjector(`rowExpansionAction_${t}`,n)}).rootNodes})},getRowExpansionAction:e=>this.rowExpansionActionTl[e],generateRowDetailView:(e,t,i,n,a,s)=>{const o=this.getClonedRowObject(t),l=r.getClonedObject(this.rowDef);if(!1===this.rowInstance.invokeEventCallback("beforerowexpand",{$event:e,$data:l,row:o}))return;if(!l.content)return;if(s(),this.rowDefMap[i]&&this.rowDefMap[i].content===l.content)return void this.rowInstance.invokeEventCallback("rowexpand",{$event:e,row:o,$data:this.rowDefInstances[i]});this.rowDefMap[i]=l,n.empty(),n.hide(),a.show();const c={row:o,item:o,$implicit:o,rowDef:l,containerLoad:t=>{setTimeout(()=>{a.hide(),n.show(),this.rowDefInstances[i]=t,this.rowInstance.invokeEventCallback("rowexpand",{$event:e,row:o,$data:t})},500)}},d=this.rowDetailViewRef.createEmbeddedView(this.rowExpansionTmpl,c,{injector:this.createCustomInjector(`rowDetail_${i}`,c)}).rootNodes[0];n[0].appendChild(d),r.$appDigest()},onBeforeRowCollapse:(e,t,i)=>this.rowInstance.invokeEventCallback("beforerowcollapse",{$event:e,row:t,$data:this.rowDefInstances[i]}),onRowCollapse:(e,t)=>{this.rowInstance.invokeEventCallback("rowcollapse",{$event:e,row:t})},getCustomExpression:(e,t,i)=>{let n;return n=i?this.customExprCompiledSummaryTl[e+t]:this.customExprCompiledTl[e+t],n||""},clearRowActions:()=>{this.rowActionsViewRef.clear(),this.rowActionsCompiledTl={},this.rowExpansionActionViewRef.clear(),this.rowExpansionActionTl={}},generateRowActions:(e,t)=>{const i=this.getClonedRowObject(e);this.rowActionsCompiledTl[t]=[],this.rowActionTmpl.forEach(e=>{const n={row:i};this.rowActionsCompiledTl[t].push(...this.rowActionsViewRef.createEmbeddedView(e,n,{injector:this.createCustomInjector(`rowActions_${t}`,n)}).rootNodes)})},getRowAction:e=>this.rowActionsCompiledTl[e],generateInlineEditRow:(e,t)=>{const i=this.getClonedRowObject(e);if(t)return this.inlineEditNewViewRef.clear(),this.inlineNewCompliedTl={},this.inlineWidgetNewTmpl.forEach(e=>{let t;const n={row:i,getControl:()=>this.ngform.controls[t+"_new"]||{},getValidationMessage:()=>this.columns[t]&&this.columns[t].validationmessage,getPendingSpinnerStatusNew:()=>this.columns[t]&&this.columns[t].showPendingSpinnerNew},a=this.inlineEditNewViewRef.createEmbeddedView(e,n,{injector:this.createCustomInjector(`inlineNew_${this.widgetId}`,n)}).rootNodes[0];t=a.getAttribute("data-col-identifier"),this.inlineNewCompliedTl[t]=a}),void this.clearForm(!0);this.inlineEditViewRef.clear(),this.inlineCompliedTl={},this.clearForm(),this.inlineWidgetTmpl.forEach(e=>{let t;const n={row:i,getControl:()=>this.ngform.controls[t]||{},getValidationMessage:()=>this.columns[t]&&this.columns[t].validationmessage,getPendingSpinnerStatus:()=>this.columns[t]&&this.columns[t].showPendingSpinner},a=this.inlineEditViewRef.createEmbeddedView(e,n,{injector:this.createCustomInjector(`inline_${this.widgetId}`,n)}).rootNodes[0];t=a.getAttribute("data-col-identifier"),this.inlineCompliedTl[t]=a})},getInlineEditWidget:(e,t,i)=>i?(this.gridOptions.setFieldValue(e+"_new",t),this.inlineNewCompliedTl[e]):(this.gridOptions.setFieldValue(e,t),this.inlineCompliedTl[e]),setFieldValue:(e,t)=>{const i=this.ngform.controls&&this.ngform.controls[e];i&&i.setValue(t)},getFieldValue:e=>{const t=this.ngform.controls&&this.ngform.controls[e];return t&&t.value},addLoadMoreBtn:()=>{this.callDataGridMethod("addLoadMoreBtn",this.ondemandmessage,this.loadingdatamsg,e=>{this.gridOptions.setIsNextPageData(!0),this.gridOptions.setIsDataUpdatedByUser(!1),"viewless"===this.gridOptions.mode?(this.dataNavigator.navigatePage("first",e,!0),this.gridOptions.mode=""):(this.dataNavigator.navigatePage("next",e),this.isDataLoading=!0)},this.infScroll)},bindScrollEvt:()=>{this._gridData&&this._gridData.length&&this.infScroll&&setTimeout(()=>{this.paginationService.bindScrollEvt(this,"tbody",c.DEBOUNCE_TIMES.PAGINATION_DEBOUNCE_TIME)},0)},generateFilterRow:()=>{this.filterViewRef.clear(),this.rowFilterCompliedTl={},this.filterTmpl.forEach(e=>{const t={changeFn:this.onRowFilterChange.bind(this),isDisabled:e=>this.emptyMatchModes.indexOf(this.rowFilter[e]&&this.rowFilter[e].matchMode)>-1},i=this.filterViewRef.createEmbeddedView(e,t,{injector:this.createCustomInjector(`filter_${this.widgetId}`,t)}).rootNodes[0];this.rowFilterCompliedTl[i.getAttribute("data-col-identifier")]=i})},getFilterWidget:e=>this.rowFilterCompliedTl[e],setGridEditMode:e=>{this.ngZone.run(()=>{this.isGridEditMode=e,r.$appDigest()})},setGridState:e=>{this.isLoading="loading"===e},setActionRowIndex:e=>{this.gridOptions.isNavTypeScrollOrOndemand()&&(this.actionRowIndex=parseInt(e),this.setDataGridOption("actionRowIndex",this.actionRowIndex),h.isNaN(this.actionRowIndex)||(this.actionRowPage=Math.floor(this.actionRowIndex/this.pagesize)+1,this.setDataGridOption("actionRowPage",this.actionRowPage||this.gridOptions.actionRowPage)))},clearActionRowIndex:()=>{this.isRowDeleted||!this.infScroll&&!this.onDemandLoad||this.clearActionRowVars()},noChangesDetected:()=>{this.toggleMessage(!0,"info",this.appLocale.MESSAGE_NO_CHANGES,"")},redrawWidgets:()=>{this.fieldDefs.forEach(e=>{r.triggerFn(e.inlineInstance&&e.inlineInstance.redraw),r.triggerFn(e.inlineInstanceNew&&e.inlineInstanceNew.redraw),r.triggerFn(e.filterInstance&&e.filterInstance.redraw)})},searchHandler:this.searchSortHandler.bind(this),sortHandler:this.searchSortHandler.bind(this),timeoutCall:(e,t)=>{setTimeout(e,t)},runInNgZone:e=>{this.ngZone.run(e)},safeApply:()=>{r.$appDigest()},setTouched:e=>{const t=this.ngform.controls[e];t&&t.markAsTouched()},clearForm:this.clearForm.bind(this),callLoadInlineWidgetData:()=>{this.fullFieldDefs.forEach(e=>{h.isUndefined(e.isDataSetBound)&&r.triggerFn(e.loadInlineWidgetData&&e.loadInlineWidgetData.bind(e))})},applyValidations:(e,t)=>{t?r.triggerFn(e.applyNewRowValidations&&e.applyNewRowValidations.bind(e)):r.triggerFn(e.applyValidations&&e.applyValidations.bind(e))},removeValidations:e=>{this.fullFieldDefs.forEach(t=>{t.readonly||"rowOperations"===t.binding||(e?r.triggerFn(t.removeNewRowValidations&&t.removeNewRowValidations.bind(t)):r.triggerFn(t.removeValidations&&t.removeValidations.bind(t)))})}},this._selectedItemsExist=!1,this._onChange=()=>{},this._onTouched=()=>{},c.styler(this.nativeElement,this),this.ngform=i.group({}),this.addEventsToContext(this.context);[this.app.subscribe("check-state-persistence-options",e=>{let t=h.get(this.datasource,"name");if(t||(t=c.extractDataSourceName(this.binddatasource)),h.get(e,"variable.name")===t&&this._pageLoad&&"none"!==this.getConfiguredState()){this._pageLoad=!1;const t=this.statePersistence.getWidgetState(this);t?e=this.handleStateParams(t,e):this.setDataGridOption("selectFirstRow",this.gridfirstrowselect)}}),this.app.subscribe("toggle-variable-state",e=>{if(this.datasource&&this.datasource.execute(r.DataSource.Operation.IS_API_AWARE)&&r.isDataSourceEqual(e.variable,this.datasource)){if(this._pageLoad&&"none"!==this.getConfiguredState()){this._pageLoad=!1;const t=this.statePersistence.getWidgetState(this);t?e=this.handleStateParams(t,e):this.setDataGridOption("selectFirstRow",this.gridfirstrowselect)}r.isDefined(this.variableInflight)?this.debouncedHandleLoading(e):this.handleLoading(e)}}),this.app.subscribe("setup-cud-listener",e=>{this.name===e&&(this._isDependent=!0,this.selectedItemChangeSubscription&&this.selectedItemChangeSubscription.unsubscribe(),this.selectedItemChangeSubscription=this.selectedItemChange$.pipe(m.debounceTime(250)).subscribe(this.triggerWMEvent.bind(this)))})].forEach(e=>this.registerDestroyListener(e)),this.deleteoktext=this.appLocale.LABEL_OK,this.deletecanceltext=this.appLocale.LABEL_CANCEL}ngAfterContentInit(){super.ngAfterContentInit(),this.headerConfig=this.headerConfig.filter(this.filterEmptyValues.bind(this)),h.remove(this.fieldDefs,e=>void 0===e);this._liveTableParent&&(this.isPartOfLiveGrid=!0),!this.readonlygrid&&this.editmode||("true"===this.readonlygrid?this.editmode="":this.isPartOfLiveGrid?this.editmode="inline"===this.isPartOfLiveGrid.formlayout?c.EDIT_MODE.FORM:c.EDIT_MODE.DIALOG:this.editmode=this.readonlygrid?c.EDIT_MODE.INLINE:""),this.gridOptions.colDefs=this.fullFieldDefs,this.gridOptions.rowActions=this.rowActions,this.gridOptions.headerConfig=this.headerConfig,this.gridOptions.rowClass=this.rowclass,this.gridOptions.editmode=this.editmode,this.gridOptions.formPosition=this.formposition,this.gridOptions.filtermode=this.filtermode,this.gridOptions.filteronkeypress=this.filteronkeypress,this.gridOptions.isrowselectable=this.isrowselectable,this.gridOptions.allowpagesizechange=this.allowpagesizechange,this.gridOptions.searchLabel=this.searchlabel,this.gridOptions.isMobile=r.isMobile(),this.gridOptions.name=this.name,this.gridOptions.securityUtils.pipeTransform=this.trustAsPipe,this.gridOptions.navigation=this.navigation,this.gridOptions.isdynamictable=this.isdynamictable,this.gridOptions.showviewlessbutton=this.showviewlessbutton,this.gridOptions.ondemandmessage=this.ondemandmessage,this.gridOptions.viewlessmessage=this.viewlessmessage,this.gridOptions.loadingdatamsg=this.loadingdatamsg,this.gridOptions.pagesizeoptions=this.sanitizeCommaSeparatedIntegers(this.pagesizeoptions),this.pagesizeoptions=this.gridOptions.pagesizeoptions,this.gridOptions.multiselecttitle=this.multiselecttitle,this.gridOptions.multiselectarialabel=this.multiselectarialabel,this.gridOptions.radioselecttitle=this.radioselecttitle,this.gridOptions.headerselectall=this.headerselectall,this.gridOptions.radioselectarialabel=this.radioselectarialabel,h.isEmpty(this.gridData)||(this.gridOptions.data=r.getClonedObject(this.gridData)),this.gridOptions.messages={selectField:this.appLocale.MESSAGE_SELECT_FIELD},this.datagridElement=$(this._tableElement.nativeElement),this.gridElement=this.$element,this.$element.css({position:"relative"}),h.forEach({showrowindex:"showRowIndex",multiselect:"multiselect",radioselect:"showRadioColumn",filternullrecords:"filterNullRecords",enablesort:"enableSort",showheader:"showHeader",enablecolumnselection:"enableColumnSelection",shownewrow:"showNewRow",gridfirstrowselect:"selectFirstRow",isrowselectable:"isrowselectable",allowpagesizechange:"allowpagesizechange"},(e,t)=>{r.isDefined(this[t])&&(this.gridOptions[e]="true"===this[t]||!0===this[t])}),"none"!==this.statehandler&&(this.gridOptions.selectFirstRow=!1),this.renderOperationColumns(),this.gridOptions.colDefs=this.fieldDefs,this.datagridElement.datatable(this.gridOptions),this.callDataGridMethod("setStatus","loading",this.loadingdatamsg),this.applyProps.forEach(e=>this.callDataGridMethod(...e)),this.editmode===c.EDIT_MODE.QUICK_EDIT&&(this.documentClickBind=this._documentClickBind.bind(this),document.addEventListener("click",this.documentClickBind))}getConfiguredState(){const e=this.statePersistence.computeMode(this.statehandler);return e&&e.toLowerCase()}handleStateParams(e,t){return h.get(e,"selectedItem")&&(this._selectedItemsExist=!0),t.options=t.options||{},h.get(e,"pagination")?(t.options.page=e.pagination,h.get(e,"sort")&&(this.sortStateHandler(e),t.options.orderBy=h.get(e,"sort.field")+" "+h.get(e,"sort.direction")),h.get(e,"search")&&(setTimeout(()=>{this.searchStateHandler(e)},500),t.options.filterFields=this.getFilterFields(e.search))):(t.options.page=1,h.get(e,"search")&&(setTimeout(()=>{this.searchStateHandler(e)},500),t.options.filterFields=this.getFilterFields(e.search)),h.get(e,"sort")&&(this.sortStateHandler(e),t.options.orderBy=h.get(e,"sort.field")+" "+h.get(e,"sort.direction"))),t}triggerWMEvent(e){"dialog"!==this.editmode&&(r.$invokeWatchers(!0),this.app.notify("wm-event",{eventName:"selectedItemChange",widgetName:this.name,row:e,table:this}))}sortStateHandler(e){const t=this.datagridElement.find('th[data-col-field="'+h.get(e,"sort.field")+'"] .sort-icon');"asc"===h.get(e,"sort.direction")&&t.length?t.addClass("asc wi wi-long-arrow-up"):"desc"===h.get(e,"sort.direction")&&t.length&&t.addClass("desc wi wi-long-arrow-down")}searchStateHandler(e){if(h.isArray(e.search))h.forEach(e.search,e=>{this.rowFilter[e.field]&&(this.rowFilter[e.field].value=e.value,this.rowFilter[e.field].matchMode=e.matchMode,this.rowFilter[e.field].type=e.type,$(this.rowFilterCompliedTl[e.field]).length&&("integer"===e.type?parseInt(e.value):e.value,$(this.rowFilterCompliedTl[e.field]).find("input").val(e.value)))});else{const t=this.datagridElement;t.find('[data-element="dgSearchText"]').val(e.search.value),t.find('[data-element="dgFilterValue"]').val(e.search.field)}}filterEmptyValues(e){return e.columns&&(e.columns=e.columns.filter(this.filterEmptyValues.bind(this))),void 0!==e}compareFilterExpressions(e,t){return!(e.length!==t.length||!h.isEqual(e,t))}setLastActionToFilterCriteria(){this.prevFilterExpression=h.get(this.datasource,"filterExpressions.rules")?r.getClonedObject(this.datasource.filterExpressions.rules):r.getClonedObject([].concat(this.datasource.dataBinding)),this.gridOptions.setLastActionPerformed(this.gridOptions.ACTIONS.FILTER_CRITERIA),this.gridOptions.setIsSearchTrigerred(!0)}setLastActionToDatasetUpdate(){this.gridOptions.setLastActionPerformed(this.gridOptions.ACTIONS.DATASET_UPDATE),this.gridOptions.setCurrentPage(1),this.gridOptions.setIsDatasetUpdated(!0)}checkIfVarFiltersApplied(){if(!h.isEmpty(h.get(this.datasource,"filterExpressions.rules"))||!h.isEmpty(h.get(this.datasource,"dataBinding"))){const e=h.get(this.datasource,"filterExpressions.rules")?this.datasource.filterExpressions.rules:[].concat(this.datasource.dataBinding);this.compareFilterExpressions(this.prevFilterExpression,e)||this.setLastActionToFilterCriteria()}}getActualPageSize(){return this.actualPageSize||5}watchVariableDataSet(e){if(this.isDestroyed)return;let t;if(this.gridOptions.isNavTypeScrollOrOndemand()&&this.checkIfVarFiltersApplied(),"wm.Variable"===h.get(this.datasource,"category")&&this._pageLoad&&"none"!==this.getConfiguredState()){const e=this.statePersistence.getWidgetState(this);this._pageLoad=!1,h.get(e,"selectedItem")?this._selectedItemsExist=!0:this.setDataGridOption("selectFirstRow",this.gridfirstrowselect),h.get(e,"search")&&(this.searchStateHandler(e),this.searchSortHandler(e.search,void 0,"search",!0)),h.get(e,"sort")&&(this.searchSortHandler(e.sort,void 0,"sort",!0),this.sortStateHandler(e)),this.gridOptions.allowpagesizechange?(h.get(e,"pagination")||h.get(e,"pagesize"))&&this.dataNavigator.pageChanged({page:e.pagination||1,pagesize:e.pagesize},!0):h.get(e,"pagination")&&this.dataNavigator.pageChanged({page:e.pagination},!0)}if(this.dataNavigatorWatched&&h.isUndefined(e)&&this.__fullData)return;this.variableInflight&&!this.infScroll&&this.callDataGridMethod("setStatus","loading",this.loadingdatamsg),t=r.getValidJSON(e),t&&(e=t);const i=this.getSortExpr(),n=i.split(" ");if(i&&n.length&&(this.sortInfo={direction:n[1],field:n[0]}),!this.isDataValid())return void(this.variableInflight&&(this.variableInflight=!1,this.setGridData([])));if(e){if(this.shownavigation&&!this.dataNavigatorWatched)return void this.enablePageNavigation()}else this.resetPageNavigation(),""!==e&&void 0!==e&&"wm.Variable"!==h.get(this.datasource,"category")||(this.variableInflight=!1),this.variableInflight||this.callDataGridMethod("setStatus","nodata",this.nodatamessage),this.setDataGridOption("selectFirstRow",this.gridfirstrowselect);if(!this.isNavigationEnabled()&&e&&this.checkFiltersApplied(this.getSortExpr()),!h.isObject(e)||""===e||e&&""===e.dataValue)return void(this.variableInflight?(this.variableInflight=!1,this.setGridData([])):this.setGridData([]));e&&(this.populateGridData(e),this.refreshRowFilterDataFromDataset());const a=this.statePersistence.getWidgetState(this);h.get(a,"search")&&h.isArray(a.search)&&h.forEach(a.search,e=>{const t=$(this.rowFilterCompliedTl[e.field])?.find("[widget-id]")?.prop("tagName")?.toLowerCase();if("wm-select"===t&&e.value){const t=$(this.rowFilterCompliedTl[e.field]).find("select");t?.find("option")?.filter((t,i)=>i.textContent.trim()===e.value)?.prop("selected",!0)}})}ngOnDestroy(){if(document.removeEventListener("click",this.documentClickBind),this.navigatorResultWatch&&(this.navigatorResultWatch.unsubscribe(),this.navigatorResultWatch=null),this.navigatorMaxResultWatch&&(this.navigatorMaxResultWatch.unsubscribe(),this.navigatorMaxResultWatch=null),this.customExprViewRef&&this.customExprViewRef.clear(),this.rowActionsViewRef&&this.rowActionsViewRef.clear(),this.filterViewRef&&this.filterViewRef.clear(),this.inlineEditViewRef&&this.inlineEditViewRef.clear(),this.inlineEditNewViewRef&&this.inlineEditNewViewRef.clear(),this.rowDetailViewRef&&this.rowDetailViewRef.clear(),this.rowExpansionActionViewRef&&this.rowExpansionActionViewRef.clear(),this.dynamicTableRef&&this.dynamicTableRef.clear(),this.rowActionsCompiledTl={},this.rowFilterCompliedTl={},this.inlineCompliedTl={},this.inlineNewCompliedTl={},this.customExprCompiledTl={},this.customExprCompiledSummaryTl={},this.rowDefInstances={},this.rowDefMap={},this.rowExpansionActionTl={},this._dynamicContext&&(Object.keys(this._dynamicContext).forEach(e=>{delete this._dynamicContext[e]}),this._dynamicContext=null),this._gridData=[],this.items=[],this.selectedItems=[],this.fieldDefs=[],this.fullFieldDefs=[],this.__fullData=null,this.datagridElement&&this.datagridElement.datatable)try{this.datagridElement.datatable("destroy")}catch(e){}this._dynamicContext&&(Object.keys(this._dynamicContext).forEach(e=>{delete this._dynamicContext[e]}),this._dynamicContext=null),this.columns={},this.formfields={},this.rowFilter={},this.actions=[],this._actions={header:[],footer:[]},this.exportOptions=[],this.headerConfig=[],this.rowActions=[],this.rowActionTmpl&&this.rowActionTmpl.reset([]),this.filterTmpl&&this.filterTmpl.reset([]),this.inlineWidgetTmpl&&this.inlineWidgetTmpl.reset([]),this.inlineWidgetNewTmpl&&this.inlineWidgetNewTmpl.reset([]),this.customExprTmpl&&this.customExprTmpl.reset([]),this.rowExpansionActionTmpl&&this.rowExpansionActionTmpl.reset([]),this.rowExpansionTmpl=null,this.selectedItemChange&&(this.selectedItemChange.complete(),this.selectedItemChange=null),this.dataNavigator=null,this._tableElement=null,super.ngOnDestroy()}addRowIndex(e){const t=r.getClonedObject(e),i=h.indexOf(this.gridOptions.data,e);return i<0?e:(t.$index=i+1,t.$isFirst=1===t.$index,t.$isLast=this.gridData.length===t.$index,t)}addEventsToContext(e){e.addNewRow=()=>this.addNewRow(),e.deleteRow=()=>this.deleteRow(),e.editRow=()=>this.editRow()}execute(e,t){return![r.DataSource.Operation.IS_API_AWARE,r.DataSource.Operation.IS_PAGEABLE,r.DataSource.Operation.SUPPORTS_SERVER_FILTER].includes(e)&&(this.datasource?this.datasource.execute(e,t):{})}isNavigationEnabled(){return this.shownavigation&&this.dataNavigator&&this.dataNavigatorWatched}getClonedRowObject(e){const t=r.getClonedObject(e);return t.getProperty=e=>h.get(t,e),t.$isFirst=1===t.$index,t.$isLast=this.gridData.length===t.$index,delete t.$$index,delete t.$$pk,t}handleLoading(e){this.variableInflight=e.active,e.active?this.callDataGridMethod("setStatus","loading",this.loadingdatamsg):!this.isGridEditMode&&h.isEmpty(this.dataset)?this.callDataGridMethod("setStatus","nodata",this.nodatamessage):this.callDataGridMethod("setStatus","ready")}setDisabledOnField(e,t,i){"new"===e||!t["primary-key"]||"assigned"!==t.generator||t["related-entity-name"]||t.period||(t[i].disabled=!0)}resetFormControl(e){e.markAsUntouched(),e.markAsPristine()}clearForm(e){const t=this.ngform.controls;h.keys(this.ngform.controls).forEach(i=>{!i.endsWith("_filter")&&(i.endsWith("_new")&&e||!i.endsWith("_new")&&!e)&&(t[i].setValue(""),this.resetFormControl(t[i]),t[i].clearValidators(),t[i].clearAsyncValidators())})}showFieldBasedOnScreenType(e){let t;return t=r.isMobile()&&this.viewport.isMobileType?e.mobileDisplay:this.viewport.isTabletType?e.tabletDisplay:e.pcDisplay,t}isEmptyRecord(e){let t,i;return Object.keys(e).every((n,a)=>(t=e[n],i=this.fieldDefs.length&&r.isDefined(this.fieldDefs[a])&&this.showFieldBasedOnScreenType(this.fieldDefs[a])||!0,!i||(null==t||""===t)))}removeEmptyRecords(e){const t=e;let i=[];return t&&t.length&&(i=t.filter(e=>e&&!this.isEmptyRecord(e))),i}setGridData(e){const t=this.filternullrecords?this.removeEmptyRecords(e):e;"wm.Variable"!==h.get(this.datasource,"category")&&void 0!==h.get(this.datasource,"category")||(this.variableInflight=!1),this.variableInflight||(t&&0===t.length?this.callDataGridMethod("setStatus","nodata",this.nodatamessage):this.callDataGridMethod("setStatus","ready")),this.gridData=t}setDataGridOption(e,t,i=!1){if(!this.datagridElement||!this.datagridElement.datatable||!this.datagridElement.datatable("instance"))return void(this.gridOptions[e]=t);const n={};!r.isDefined(t)||h.isEqual(t,this.gridOptions[e])&&!i||(n[e]=t,this.datagridElement.datatable("option",n),this.gridOptions[e]=t)}callDataGridMethod(...e){if(this.datagridElement&&this.datagridElement.datatable("instance"))return this.datagridElement.datatable.apply(this.datagridElement,e);this.applyProps.set(e[1],e)}renderOperationColumns(){let e,t;const i=c.getRowOperationsColumn(),n={name:i.field,field:i.field,isPredefined:!0};this.fieldDefs.length&&(e=h.find(this.fullFieldDefs,{field:E,type:"custom"}),h.remove(this.fieldDefs,{type:"custom",field:E}),h.remove(this.headerConfig,{field:i.field}),this.rowActions.length&&(e?(t=e.rowactionsposition?h.toNumber(e.rowactionsposition):this.fieldDefs.length,this.fieldDefs.splice(t,0,e),0===t?this.headerConfig.unshift(n):this.headerConfig.push(n)):(this.fieldDefs.push(i),this.headerConfig.push(n))),this.setDataGridOption("headerConfig",this.headerConfig))}enablePageNavigation(){this.dataset&&this.binddataset&&this.dataNavigator&&(this.dataNavigatorWatched=!0,this.navigatorResultWatch&&this.navigatorResultWatch.unsubscribe(),this.navigatorResultWatch=this.dataNavigator.resultEmitter.subscribe(e=>{r.isDefined(e)?("wm.Variable"===h.get(this.datasource,"category")&&h.isArray(this.dataset)&&(this.gridOptions?.data||[]).forEach((e,t)=>{const i=this.widget?.dataset?.[t];if(i&&JSON.stringify(e)!==JSON.stringify(i)){const t=Array.isArray(this.items)?this.items.findIndex(t=>JSON.stringify(t)===JSON.stringify(e)):-1;-1!==t&&(this.items[t]={...i})}}),h.isEqual(this.dataset,e)?this.watchVariableDataSet(e):h.isArray(e)?this.widget.dataset=[].concat(e):h.isObject(e)?this.widget.dataset=h.extend({},e):this.widget.dataset=e):this.widget.dataset=void 0},!0),this.navigatorMaxResultWatch&&this.navigatorMaxResultWatch.unsubscribe(),this.navigatorMaxResultWatch=this.dataNavigator.maxResultsEmitter.subscribe(e=>{this.pagesize=e}),this.__fullData=this.dataset,this.dataNavigator.widget.maxResults=this.pagesize||5,this.dataNavigator.options={maxResults:this.pagesize||5},this.removePropertyBinding("dataset"),this.dataNavigator.setBindDataSet(this.binddataset,this.viewParent,this.datasource,this.dataset,this.binddatasource,void 0,this.statehandler))}resetPageNavigation(){this.dataNavigator&&this.dataNavigator.resetPageNavigation()}isDataValid(){let e;const t=this.dataset||{};return t.error&&(e=t.error),t.data&&t.data.error&&t.data.errorMessage&&(e=t.data.errorMessage),!e||(this.setGridData([]),this.callDataGridMethod("setStatus","error",e),!1)}populateGridData(e){let t;if(e=c.transformData(e,this.name),!this.isNavigationEnabled()&&this._isClientSearch?(t=r.getClonedObject(e),t=this.getSearchResult(t,this.filterInfo),t=this.getSortResult(t,this.sortInfo),this.serverData=t):this.serverData=e,this.isdynamictable?this.createGridColumns(this.serverData):this.setGridData(this.serverData),"none"!==this.getConfiguredState()&&this._selectedItemsExist&&e.length){const e=this.statePersistence.getWidgetState(this);let t;if(h.get(e,"selectedItem")){const i=this.gridOptions.getParentTableData();t=e.selectedItem.filter(e=>e.page===this.dataNavigator.dn.currentPage),this._selectedItemsExist=!1,t.length&&this.selecteditem.length!==e.selectedItem.length&&(h.isArray(this.selecteditem)?t.forEach(e=>{(!i.parentId||i.parentId&&e.parentRowIndex===i.parentId&&e.parentCurrentPage===i.parentPage)&&this.selectItem(e.index,void 0)}):this.selecteditem=t.map(function(e){return e.index}))}}}async generateDynamicColumns(e){if(this.fieldDefs=[],this.filterTmpl._results=[],h.isEmpty(e))return;let t="";e.forEach(e=>{let i="",n="";h.forEach(e,(e,t)=>{h.isUndefined(e)||""===e||("customExpression"===t?n=e:i+=` ${t}="${e}"`)}),t+=`<wm-table-column ${i} tableName="${this.name}${this.$attrs.get("table_reference")}">${n}</wm-table-column>`}),this.dynamicTableRef.clear(),this._dynamicContext||(this._dynamicContext=Object.create(this.viewParent),this._dynamicContext[this.getAttr("wmTable")]=this),this.noOfColumns=e.length;try{const e=`app-table-dynamic-${this.widgetId}`,i=await this.dynamicComponentProvider.getComponentFactoryRef(e,t,{noCache:!0,transpile:!0});if(!i)return void console.error(`Failed to create dynamic table component: ${e}`);const n=this.dynamicTableRef.createComponent(i,{index:0,environmentInjector:this.envInjector,injector:this.inj});r.extendProto(n.instance,this._dynamicContext);const a=this.$element.find(".dynamic-table-container")[0];a?a.appendChild(n.location.nativeElement):console.error("Dynamic table container element not found")}catch(e){console.error("Error creating dynamic table component:",e)}}prepareColDefs(e){let t,i,n=0,a=0;this.fieldDefs=[],this.headerConfig=[],this.columns={},i=e,t=c.prepareFieldDefs(i),h.forEach(t,e=>{e.binding=e.field,e.caption=e.displayName,e.pcDisplay=!0,e.mobileDisplay=!0,e.tabletDisplay=!0,e.searchable=!0,e.showinfilter=!0,e.type="string",e.index=n,e.headerIndex=a,n++,a++}),t.forEach(e=>{this.columns[e.field]=e});try{this.invokeEventCallback("beforedatarender",{$data:e,$columns:this.columns,data:e,columns:this.columns})}catch(e){console.warn("Error in beforedatarender event callback, continuing with table rendering:",e)}t=[],h.forEach(this.columns,e=>{t.push(e)}),this.generateDynamicColumns(t)}createGridColumns(e){const t=e&&!e.error;t&&!h.isArray(e)&&(e=[e]),h.isEmpty(e)?this.setGridData(e):t&&(this.prepareColDefs(e),this.serverData=e,this.setGridData(this.serverData))}getSortExpr(){let e,t;return this.datasource&&this.datasource.execute(r.DataSource.Operation.IS_PAGEABLE)&&(t=this.datasource.execute(r.DataSource.Operation.GET_PAGING_OPTIONS),e=h.isEmpty(t)?"":c.getOrderByExpr(t.sort)),e||""}onPropertyChange(e,t,i){if(this.isDestroyed)return;let n;switch(e){case"datasource":this.allowpagesizechange&&this.datasource&&(this.datasource.maxResults=this.pagesize||this.datasource.maxResults),t&&!1===t.startUpdate&&(this.variableInflight=!1,this.callDataGridMethod("setStatus","nodata",this.nodatamessage)),this.datasource&&"wm.Variable"!==h.get(this.datasource,"category")&&(this.headerselectall=!1,this.setDataGridOption("headerselectall",!1)),this.watchVariableDataSet(this.dataset),this.onDataSourceChange();break;case"dataset":if(this.gridOptions.isNavTypeScrollOrOndemand()&&1===this.gridOptions.getCurrentPage()&&this.gridOptions.setIsNextPageData(!1),this.binddatasource&&!this.datasource)return void(this.variableInflight&&(this.variableInflight=!1,this.callDataGridMethod("setStatus","nodata",this.nodatamessage)));this.parentList&&!this.datasource&&h.startsWith(this.binddataset,"item")&&(this.datasource=r.getDatasourceFromExpr(this.widget.$attrs.get("datasetboundexpr"),this)),this.gridOptions.isNavTypeScrollOrOndemand()&&(this.gridOptions.isNextPageData?this.gridOptions.setIsDataUpdatedByUser(!1):(this.gridOptions.setIsDataUpdatedByUser(!0),this.setLastActionToDatasetUpdate(),this.gridOptions.setIsNextPageData(!1))),("wm.Variable"!==h.get(this.datasource,"category")||!this._pageLoad||"none"===this.getConfiguredState()||this.parentList&&h.startsWith(this.binddataset,"item"))&&this.watchVariableDataSet(t);break;case"filtermode":this.setDataGridOption("filtermode",t);break;case"searchlabel":this.setDataGridOption("searchLabel",t);break;case"navigation":if("Advanced"===t)return void(this.navigation="Classic");"None"!==t&&(this.shownavigation=!0),this.setDataGridOption("navigation",this.navigation),this.onDemandLoad=t===c.NAVIGATION_TYPE.ONDEMAND,this.infScroll=t===c.NAVIGATION_TYPE.SCROLL,this.navControls=t;break;case"gridfirstrowselect":this.setDataGridOption("selectFirstRow",t);break;case"gridclass":this.callDataGridMethod("option","cssClassNames.grid",t);break;case"nodatamessage":this.callDataGridMethod("option","dataStates.nodata",t);break;case"loadingdatamsg":this.callDataGridMethod("option","dataStates.loading",t);break;case"loadingicon":this.callDataGridMethod("option","loadingicon",t);break;case"spacing":this.callDataGridMethod("option","spacing",t),this.navigationSize="condensed"===t?"small":"";break;case"exportformat":this.exportOptions=[],t&&h.forEach(h.split(t,","),e=>{this.exportOptions.push({label:e,icon:D[e]})});break;case"shownewrow":n=t||h.some(this.actions,e=>h.includes(e.action,"addNewRow()")),this.callDataGridMethod("option","actionsEnabled.new",n);break;case"pagesize":this.actualPageSize=t,this.setDefaultPageSize(t);break;case"currentpage":this.nativeElement?.setAttribute("currentpage",t);break;case"ondemandmessage":t&&this.$element.find(".on-demand-datagrid > a").text(t),this.setDataGridOption("ondemandmessage",t),this.gridOptions.ondemandmessage=t;break;case"allowpagesizechange":if(this.gridOptions.allowpagesizechange=t,this.allowpagesizechange=t,this.dataNavigator.allowpagesizechange=t,t){const e=this.sanitizeCommaSeparatedIntegers(this.pagesizeoptions);this.gridOptions.pagesizeoptions=e,this.pagesizeoptions=e,this.prevPagesizeoptions="",this.setDefaultPageSize(this.pagesize||this.actualPageSize||this.gridOptions.getPageSize())}break;case"pagesizeoptions":this.prevPagesizeoptions=this.sanitizeCommaSeparatedIntegers(i),this.gridOptions.pagesizeoptions=this.sanitizeCommaSeparatedIntegers(t),this.pagesizeoptions=this.gridOptions.pagesizeoptions,this.allowpagesizechange&&this.setDefaultPageSize(this.pagesize||this.actualPageSize||this.gridOptions.getPageSize());break;case"showheader":this.setDataGridOption("showHeader",t);break;case"enablesort":this.setDataGridOption("enableSort",t);break;case"enablecolumnselection":this.setDataGridOption("enableColumnSelection",t);break;case"isrowselectable":this.setDataGridOption("isrowselectable",t);break;case"multiselect":this.setDataGridOption("multiselect",t);break;case"radioselect":this.setDataGridOption("showRadioColumn",t);break;case"multiselecttitle":this.setDataGridOption("multiselecttitle",t),this.gridOptions.multiselecttitle=t;break;case"multiselectarialabel":this.setDataGridOption("multiselectarialabel",t),this.gridOptions.multiselectarialabel=t;break;case"radioselecttitle":this.setDataGridOption("radioselecttitle",t),this.gridOptions.radioselecttitle=t;break;case"radioselectarialabel":this.setDataGridOption("radioselectarialabel",t),this.gridOptions.radioselectarialabel=t;break;case"viewlessmessage":this.setDataGridOption("viewlessmessage",t),this.gridOptions.viewlessmessage=t;break;case"show":t?this.invokeEventCallback("show"):this.invokeEventCallback("hide");default:super.onPropertyChange(e,t,i)}}setDefaultPageSize(e){let t=this.statePersistence.getWidgetState(this);if(this.gridOptions.allowpagesizechange){const i=this.getNormalizedPageSizeOptionsArray(this.pagesizeoptions);h.get(t,"pagesize")?(e=h.get(t,"pagesize"),this.pagesize=e):this.pagesizeoptions&&i.length&&(e=i[0],this.pagesize=e),this.updatedPageSize=e,this.isPageSizeOptionsChanged()&&(this.dataNavigator.defaultPageSizeOptions=i,this.dataNavigator.pageSizeOptions=[...this.dataNavigator.defaultPageSizeOptions])}this.dataNavigator.options={maxResults:e},this.dataNavigator.widget.maxResults=e,this.dataNavigator.maxResults=e,this.datasource&&(this.datasource.maxResults=this.pagesize||this.datasource.maxResults)}isPageSizeOptionsChanged(){return!h.isEqual(this.prevPagesizeoptions,this.pagesizeoptions)}selectPageSize(e){(this.allowpagesizechange||e)&&((e<this.dataNavigator.pageSizeOptions[0]||e>this.dataNavigator.pageSizeOptions[this.dataNavigator.pageSizeOptions.length-1]||!this.dataNavigator.pageSizeOptions.includes(Number(e)))&&(e=this.dataNavigator.pageSizeOptions[0]),this.dataNavigator.onPageSizeChange(void 0,e))}sanitizeCommaSeparatedIntegers(e){if(null==e||""===e)return R;let t;if(Array.isArray(e))t=e;else{if("string"!=typeof e)return R;{const i=e.trim();if(i.startsWith("[")&&i.endsWith("]"))try{t=JSON.parse(i)}catch{t=[]}else t=i.split(",")}}return Array.from(new Set(t.map(e=>String(e).trim()).filter(e=>/^-?\d+$/.test(e)).map(e=>Math.abs(parseInt(e,10))))).join(",")||R}getNormalizedPageSizeOptionsArray(e){return this.sanitizeCommaSeparatedIntegers(e).split(",").map(Number).filter(e=>!h.isNaN(e)).sort((e,t)=>e-t)}onDataSourceChange(){this.fieldDefs.forEach(e=>{r.triggerFn(e.onDataSourceChange&&e.onDataSourceChange.bind(e))})}refreshRowFilterDataFromDataset(){"multicolumn"===this.filtermode&&this.fieldDefs.forEach(e=>{r.triggerFn(e.loadFilterData&&e.loadFilterData.bind(e))})}clearActionRowVars(){this.actionRowIndex=void 0,this.actionRowPage=void 0,this.setDataGridOption("actionRowIndex",void 0),this.setDataGridOption("actionRowPage",void 0)}onStyleChange(e,t,i){switch(e){case"width":this.callDataGridMethod("setGridDimensions","width",t);break;case"height":this.callDataGridMethod("setGridDimensions","height",t)}super.onStyleChange(e,t,i)}populateActions(){this._actions.header=[],this._actions.footer=[],h.forEach(this.actions,e=>{h.includes(e.position,"header")&&this._actions.header.push(e),h.includes(e.position,"footer")&&this._actions.footer.push(e)})}renderDynamicFilterColumn(e){this.isdynamictable&&this.filterTmpl._results.push(e)}registerColumns(e,t){if(r.isMobile()&&this.viewport.isMobileType){if(!e.mobileDisplay)return}else if(this.viewport.isTabletType){if(!e.tabletDisplay)return}else if(!e.pcDisplay)return;e["primary-key"]&&this.primaryKey.push(e.field),this.fieldDefs[t]=e;const i=this.fieldDefs.length;this.fullFieldDefs.push(e),this.rowFilter[e.field]={value:void 0},this.fieldDefs.forEach(e=>{this.columns[e.field]=e}),this.isdynamictable&&i===this.noOfColumns&&(this.renderOperationColumns(),this.setDataGridOption("colDefs",this.fieldDefs))}registerFormField(e,t){this.formfields[e]=t}registerActions(e){this.actions.push(e),this.populateActions()}registerRow(e,t){this.rowDef=e,this.rowInstance=t,this.callDataGridMethod("option","cssClassNames.rowExpandIcon",this.rowDef.expandicon),this.callDataGridMethod("option","cssClassNames.rowCollapseIcon",this.rowDef.collapseicon),this.gridOptions.rowExpansionEnabled=!0,this.gridOptions.rowDef=this.rowDef}registerRowActions(e){this.rowActions.push(e)}selectItem(e,t){t&&(this.serverData=t),h.isObject(e)&&(e=h.omitBy(e,e=>h.isArray(e)&&h.isEmpty(e))),this.callDataGridMethod("selectRow",e,!0)}deselectItem(e){this.callDataGridMethod("deselectRow",e)}onDataNavigatorDataSetChange(e){let t;return this.__fullData=e,this.checkFiltersApplied(this.getSortExpr()),this._isClientSearch?(t=r.getClonedObject(this.__fullData),h.isObject(t)&&!h.isArray(t)&&(t=[t]),t=this.getSearchResult(t,this.filterInfo),t=this.getSortResult(t,this.sortInfo),t):e}toggleMessage(e,t,i,n){e&&i&&this.app.notifyApp(i,t,n)}export(e){let t;const i=h.isEmpty(this.sortInfo)?"":this.sortInfo.field+" "+this.sortInfo.direction,n={};let a,s;this.fieldDefs.forEach(e=>{if(e.field===E||!e.show)return;const t={header:e.displayName};e.exportexpression?t.expression=e.exportexpression:t.field=e.field,n[e.field]=t}),t=this.getFilterFields(this.filterInfo),s={matchMode:"anywhereignorecase",filterFields:t,orderBy:i,exportType:e.label,logicalOp:"AND",exportSize:this.exportdatasize,columns:n},a=this.invokeEventCallback("beforeexport",{$data:s}),!1!==a&&(s.fields=h.values(s.columns),this.datasource.execute(r.DataSource.Operation.DOWNLOAD,{data:s}))}expandRow(e){this.callDataGridMethod("expandRow",e)}collapseRow(e){this.callDataGridMethod("collapseRow",e)}_documentClickBind(e){const t=e.target;this.$element[0].contains(t)||e.target.doctype||(e=>{let t=!1;return[".dropdown-menu",".uib-typeahead-match",".modal-dialog",".toast"].forEach(i=>{if(e.closest(i).length)return t=!0,!1}),t||["bsdatepickerdaydecorator"].forEach(i=>{if(e[0].hasAttribute(i))return t=!0,!1}),t})($(t))||this.callDataGridMethod("saveRow")}_redraw(e){e?this.datagridElement.datatable(this.gridOptions):setTimeout(()=>{this.callDataGridMethod("setColGroupWidths"),this.callDataGridMethod("addOrRemoveScroll")})}invokeActionEvent(e,t){r.$parseEvent(t)(this.viewParent,Object.assign(this.context,{$event:e}))}handleEvent(e,t,i,n){"select"!==t&&super.handleEvent(this.nativeElement,t,i,n)}triggerUploadEvent(e,t,i,n){const a={$event:e,row:n};this.columns[i]&&("change"===t&&(a.newVal=e.target.files,a.oldVal=this.columns[i]._oldUploadVal,this.columns[i]._oldUploadVal=a.newVal),this.columns[i].invokeEventCallback(t,a))}registerFormWidget(){}writeValue(){}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}ngOnDetach(){super.ngOnDetach(),"wm.Variable"===h.get(this.datasource,"category")&&"none"!==this.getConfiguredState()?this._pageLoad=!1:this._pageLoad=!0}static{this.\u0275fac=b.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:b,type:_,deps:[{token:b.Injector},{token:b.EnvironmentInjector},{token:y.FormBuilder},{token:w.App},{token:w.DynamicComponentRefProvider},{token:w.StatePersistence},{token:w.PaginationService},{token:w.Viewport},{token:C.ListComponent,optional:!0},{token:"dataset.bind",attribute:!0},{token:"datasource.bind",attribute:!0},{token:"readonlygrid",attribute:!0},{token:b.NgZone},{token:P.TrustAsPipe},{token:"EXPLICIT_CONTEXT",optional:!0}],target:b.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=b.\u0275\u0275ngDeclareComponent({minVersion:"17.0.0",version:"20.3.19",type:_,isStandalone:!0,selector:"[wmTable]",host:{listeners:{keypress:"onKeyPress($event)"}},providers:[c.provideAs(_,o.NG_VALUE_ACCESSOR,!0),c.provideAsWidgetRef(_)],queries:[{propertyName:"rowExpansionTmpl",first:!0,predicate:["rowExpansionTmpl"],descendants:!0},{propertyName:"rowActionTmpl",predicate:["rowActionTmpl"],descendants:!0},{propertyName:"filterTmpl",predicate:["filterTmpl"],descendants:!0},{propertyName:"inlineWidgetTmpl",predicate:["inlineWidgetTmpl"],descendants:!0},{propertyName:"inlineWidgetNewTmpl",predicate:["inlineWidgetTmplNew"],descendants:!0},{propertyName:"customExprTmpl",predicate:["customExprTmpl"],descendants:!0},{propertyName:"rowExpansionActionTmpl",predicate:["rowExpansionActionTmpl"],descendants:!0}],viewQueries:[{propertyName:"dataNavigator",first:!0,predicate:d.PaginationComponent,descendants:!0,static:!0},{propertyName:"_tableElement",first:!0,predicate:["datagridElement"],descendants:!0,static:!0},{propertyName:"rowActionsViewRef",first:!0,predicate:["rowActionsView"],descendants:!0,read:s.ViewContainerRef,static:!0},{propertyName:"filterViewRef",first:!0,predicate:["multiColumnFilterView"],descendants:!0,read:s.ViewContainerRef,static:!0},{propertyName:"inlineEditViewRef",first:!0,predicate:["inlineEditView"],descendants:!0,read:s.ViewContainerRef,static:!0},{propertyName:"inlineEditNewViewRef",first:!0,predicate:["inlineEditNewView"],descendants:!0,read:s.ViewContainerRef,static:!0},{propertyName:"customExprViewRef",first:!0,predicate:["customExprView"],descendants:!0,read:s.ViewContainerRef,static:!0},{propertyName:"rowDetailViewRef",first:!0,predicate:["rowDetailView"],descendants:!0,read:s.ViewContainerRef,static:!0},{propertyName:"rowExpansionActionViewRef",first:!0,predicate:["rowExpansionActionView"],descendants:!0,read:s.ViewContainerRef,static:!0},{propertyName:"dynamicTableRef",first:!0,predicate:["dynamicTable"],descendants:!0,read:s.ViewContainerRef,static:!0}],usesInheritance:!0,ngImport:b,template:'@if (title || subheading || iconclass || exportOptions.length || _actions.header.length) {\n <div class="panel-heading">\n <h3 class="panel-title">\n <div class="pull-left">\n @if (iconclass) {\n <i class="app-icon panel-icon {{iconclass}}"></i>\n }\n </div>\n <div class="pull-left">\n <div class="heading" [innerHTML]="title"></div>\n <div class="description" [innerHTML]="subheading"></div>\n </div>\n @if (exportOptions.length || _actions.header.length) {\n <div class="panel-actions app-datagrid-actions">\n @for (btn of _actions.header; track btn; let index = $index) {\n <ng-container\n [ngTemplateOutlet]="btn.widgetType === \'button\' ? buttonRef : anchorRef"\n [ngTemplateOutletContext]="{btn:btn}"\n [ngTemplateOutletInjector]="createCustomInjector(\'actions_header_\' + index, {btn:btn})">\n </ng-container>\n }\n @if (exportOptions.length) {\n <div wmMenu dropdown caption.bind="appLocale.LABEL_EXPORT" autoclose="always" attr.name="{{name}}-export"\n dataset.bind="exportOptions" select.event="export($item)" menuposition="down,left"></div>\n }\n </div>\n }\n </h3>\n </div>\n}\n<div class="app-datagrid" #datagridElement></div>\n\n<div class="panel-footer clearfix" [hidden]="!_actions.footer.length && (!shownavigation || (onDemandLoad && dataNavigator.isDisableNext)) ">\n <div class="app-datagrid-paginator" [hidden]="(!dataNavigator?.dataSize && !dataNavigator.datasource?.pagination?.next) || !shownavigation || (onDemandLoad && dataNavigator.isDisableNext)">\n <nav wmPagination show.bind="shownavigation" navigationalign.bind="navigationalign"\n navigationsize.bind="navigationSize"\n navigation.bind="navControls" showrecordcount.bind="showrecordcount" maxsize.bind="maxsize"\n boundarylinks.bind="boundarylinks"\n forceellipses.bind="forceellipses" directionlinks.bind="directionlinks"></nav>\n </div>\n @if (_actions.footer.length) {\n <div class="app-datagrid-actions">\n @for (btn of _actions.footer; track btn; let index = $index) {\n <ng-container\n [ngTemplateOutlet]="btn.widgetType === \'button\' ? buttonRef : anchorRef"\n [ngTemplateOutletContext]="{btn:btn}"\n [ngTemplateOutletInjector]="createCustomInjector(\'actions_footer_\' + index, {btn:btn})">\n </ng-container>\n }\n </div>\n }\n</div>\n\n<ng-template #buttonRef let-btn="btn">\n <button wmButton caption.bind="btn.displayName" show.bind="btn.show" class.bind="btn.class" iconclass.bind="btn.iconclass" (click)="invokeActionEvent($event, btn.action)"\n [ngClass]="{\'btn-sm\': spacing === \'condensed\', \'disabled-new\': btn.key === \'addNewRow\' && (isGridEditMode || isLoading)}"\n type="button" shortcutkey.bind="btn.shortcutkey" tabindex.bind="btn.tabindex" hint.bind="btn.title" [attr.aria-label]="btn.displayName" disabled.bind="btn.disabled" conditionalclass.bind="btn.conditionalclass" conditionalstyle.bind="btn.conditionalstyle"></button>\n</ng-template>\n\n<ng-template #anchorRef let-btn="btn">\n <a wmAnchor caption.bind="btn.displayName" show.bind="btn.show" class.bind="btn.class" iconclass.bind="btn.iconclass" (click)="invokeActionEvent($event, btn.action)"\n [ngClass]="{\'btn-sm\': spacing === \'condensed\', \'disabled-new\': btn.key === \'addNewRow\' && (isGridEditMode || isLoading)}"\n shortcutkey.bind="btn.shortcutkey" tabindex.bind="btn.tabindex" hint.bind="btn.title"\n hyperlink.bind="btn.hyperlink" target.bind="btn.target" conditionalclass.bind="btn.conditionalclass" conditionalstyle.bind="btn.conditionalstyle"></a>\n</ng-template>\n\n<div hidden>\n <ng-container #multiColumnFilterView></ng-container>\n\n <ng-container #inlineEditView></ng-container>\n\n <ng-container #inlineEditNewView></ng-container>\n\n <ng-container #rowActionsView></ng-container>\n\n <ng-container #rowExpansionActionView></ng-container>\n\n <ng-container #customExprView></ng-container>\n\n <ng-container #dynamicTable></ng-container>\n\n <ng-container #rowDetailView></ng-container>\n\n <div class="dynamic-table-container"></div>\n</div>\n',dependencies:[{kind:"ngmodule",type:t.CommonModule},{kind:"directive",type:f.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"directive",type:f.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]},{kind:"component",type:i.AnchorComponent,selector:"a[wmAnchor]",exportAs:["wmAnchor"]},{kind:"component",type:d.PaginationComponent,selector:"[wmPagination]",outputs:["resultEmitter","maxResultsEmitter"]},{kind:"component",type:n.ButtonComponent,selector:"button[wmButton]",exportAs:["wmButton"]},{kind:"ngmodule",type:u.BsDropdownModule},{kind:"directive",type:T.BsDropdownDirective,selector:"[bsDropdown], [dropdown]",inputs:["placement","triggers","container","dropup","autoClose","isAnimated","insideClick","isDisabled","isOpen"],outputs:["isOpenChange","onShown","onHidden"],exportAs:["bs-dropdown"]},{kind:"component",type:a.MenuComponent,selector:"[wmMenu]"}]})}}b.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:b,type:_,decorators:[{type:s.Component,args:[{standalone:!0,imports:[t.CommonModule,i.AnchorComponent,d.PaginationComponent,n.ButtonComponent,u.BsDropdownModule,a.MenuComponent],selector:"[wmTable]",providers:[c.provideAs(_,o.NG_VALUE_ACCESSOR,!0),c.provideAsWidgetRef(_)],template:'@if (title || subheading || iconclass || exportOptions.length || _actions.header.length) {\n <div class="panel-heading">\n <h3 class="panel-title">\n <div class="pull-left">\n @if (iconclass) {\n <i class="app-icon panel-icon {{iconclass}}"></i>\n }\n </div>\n <div class="pull-left">\n <div class="heading" [innerHTML]="title"></div>\n <div class="description" [innerHTML]="subheading"></div>\n </div>\n @if (exportOptions.length || _actions.header.length) {\n <div class="panel-actions app-datagrid-actions">\n @for (btn of _actions.header; track btn; let index = $index) {\n <ng-container\n [ngTemplateOutlet]="btn.widgetType === \'button\' ? buttonRef : anchorRef"\n [ngTemplateOutletContext]="{btn:btn}"\n [ngTemplateOutletInjector]="createCustomInjector(\'actions_header_\' + index, {btn:btn})">\n </ng-container>\n }\n @if (exportOptions.length) {\n <div wmMenu dropdown caption.bind="appLocale.LABEL_EXPORT" autoclose="always" attr.name="{{name}}-export"\n dataset.bind="exportOptions" select.event="export($item)" menuposition="down,left"></div>\n }\n </div>\n }\n </h3>\n </div>\n}\n<div class="app-datagrid" #datagridElement></div>\n\n<div class="panel-footer clearfix" [hidden]="!_actions.footer.length && (!shownavigation || (onDemandLoad && dataNavigator.isDisableNext)) ">\n <div class="app-datagrid-paginator" [hidden]="(!dataNavigator?.dataSize && !dataNavigator.datasource?.pagination?.next) || !shownavigation || (onDemandLoad && dataNavigator.isDisableNext)">\n <nav wmPagination show.bind="shownavigation" navigationalign.bind="navigationalign"\n navigationsize.bind="navigationSize"\n navigation.bind="navControls" showrecordcount.bind="showrecordcount" maxsize.bind="maxsize"\n boundarylinks.bind="boundarylinks"\n forceellipses.bind="forceellipses" directionlinks.bind="directionlinks"></nav>\n </div>\n @if (_actions.footer.length) {\n <div class="app-datagrid-actions">\n @for (btn of _actions.footer; track btn; let index = $index) {\n <ng-container\n [ngTemplateOutlet]="btn.widgetType === \'button\' ? buttonRef : anchorRef"\n [ngTemplateOutletContext]="{btn:btn}"\n [ngTemplateOutletInjector]="createCustomInjector(\'actions_footer_\' + index, {btn:btn})">\n </ng-container>\n }\n </div>\n }\n</div>\n\n<ng-template #buttonRef let-btn="btn">\n <button wmButton caption.bind="btn.displayName" show.bind="btn.show" class.bind="btn.class" iconclass.bind="btn.iconclass" (click)="invokeActionEvent($event, btn.action)"\n [ngClass]="{\'btn-sm\': spacing === \'condensed\', \'disabled-new\': btn.key === \'addNewRow\' && (isGridEditMode || isLoading)}"\n type="button" shortcutkey.bind="btn.shortcutkey" tabindex.bind="btn.tabindex" hint.bind="btn.title" [attr.aria-label]="btn.displayName" disabled.bind="btn.disabled" conditionalclass.bind="btn.conditionalclass" conditionalstyle.bind="btn.conditionalstyle"></button>\n</ng-template>\n\n<ng-template #anchorRef let-btn="btn">\n <a wmAnchor caption.bind="btn.displayName" show.bind="btn.show" class.bind="btn.class" iconclass.bind="btn.iconclass" (click)="invokeActionEvent($event, btn.action)"\n [ngClass]="{\'btn-sm\': spacing === \'condensed\', \'disabled-new\': btn.key === \'addNewRow\' && (isGridEditMode || isLoading)}"\n shortcutkey.bind="btn.shortcutkey" tabindex.bind="btn.tabindex" hint.bind="btn.title"\n hyperlink.bind="btn.hyperlink" target.bind="btn.target" conditionalclass.bind="btn.conditionalclass" conditionalstyle.bind="btn.conditionalstyle"></a>\n</ng-template>\n\n<div hidden>\n <ng-container #multiColumnFilterView></ng-container>\n\n <ng-container #inlineEditView></ng-container>\n\n <ng-container #inlineEditNewView></ng-container>\n\n <ng-container #rowActionsView></ng-container>\n\n <ng-container #rowExpansionActionView></ng-container>\n\n <ng-container #customExprView></ng-container>\n\n <ng-container #dynamicTable></ng-container>\n\n <ng-container #rowDetailView></ng-container>\n\n <div class="dynamic-table-container"></div>\n</div>\n'}]}],ctorParameters:()=>[{type:b.Injector},{type:b.EnvironmentInjector},{type:y.FormBuilder},{type:w.App},{type:w.DynamicComponentRefProvider},{type:w.StatePersistence},{type:w.PaginationService},{type:w.Viewport},{type:C.ListComponent,decorators:[{type:s.Optional}]},{type:void 0,decorators:[{type:s.Attribute,args:["dataset.bind"]}]},{type:void 0,decorators:[{type:s.Attribute,args:["datasource.bind"]}]},{type:void 0,decorators:[{type:s.Attribute,args:["readonlygrid"]}]},{type:b.NgZone},{type:P.TrustAsPipe},{type:void 0,decorators:[{type:s.Inject,args:["EXPLICIT_CONTEXT"]},{type:s.Optional}]}],propDecorators:{dataNavigator:[{type:s.ViewChild,args:[d.PaginationComponent,{static:!0}]}],_tableElement:[{type:s.ViewChild,args:["datagridElement",{static:!0}]}],rowActionTmpl:[{type:s.ContentChildren,args:["rowActionTmpl",{descendants:!0}]}],rowActionsViewRef:[{type:s.ViewChild,args:["rowActionsView",{static:!0,read:s.ViewContainerRef}]}],filterTmpl:[{type:s.ContentChildren,args:["filterTmpl",{descendants:!0}]}],filterViewRef:[{type:s.ViewChild,args:["multiColumnFilterView",{static:!0,read:s.ViewContainerRef}]}],inlineWidgetTmpl:[{type:s.ContentChildren,args:["inlineWidgetTmpl",{descendants:!0}]}],inlineEditViewRef:[{type:s.ViewChild,args:["inlineEditView",{static:!0,read:s.ViewContainerRef}]}],inlineWidgetNewTmpl:[{type:s.ContentChildren,args:["inlineWidgetTmplNew",{descendants:!0}]}],inlineEditNewViewRef:[{type:s.ViewChild,args:["inlineEditNewView",{static:!0,read:s.ViewContainerRef}]}],customExprTmpl:[{type:s.ContentChildren,args:["customExprTmpl",{descendants:!0}]}],customExprViewRef:[{type:s.ViewChild,args:["customExprView",{static:!0,read:s.ViewContainerRef}]}],rowExpansionActionTmpl:[{type:s.ContentChildren,args:["rowExpansionActionTmpl",{descendants:!0}]}],rowExpansionTmpl:[{type:s.ContentChild,args:["rowExpansionTmpl"]}],rowDetailViewRef:[{type:s.ViewChild,args:["rowDetailView",{static:!0,read:s.ViewContainerRef}]}],rowExpansionActionViewRef:[{type:s.ViewChild,args:["rowExpansionActionView",{static:!0,read:s.ViewContainerRef}]}],dynamicTableRef:[{type:s.ViewChild,args:["dynamicTable",{static:!0,read:s.ViewContainerRef}]}],onKeyPress:[{type:s.HostListener,args:["keypress",["$event"]]}]}});const x="new",A="edit",k="delete";class N{constructor(e,t,i){this.table=e,this.dialogService=t,this.app=i,e.initiateSelectItem=this.initiateSelectItem.bind(this),e.updateVariable=this.updateVariable.bind(this),e.updateRecord=this.updateRecord.bind(this),e.deleteRecord=this.deleteRecord.bind(this),e.insertRecord=this.insertRecord.bind(this),e.editRow=this.editRow.bind(this),e.addNewRow=this.addNewRow.bind(this),e.addRow=this.addNewRow.bind(this),e.deleteRow=this.deleteRow.bind(this),e.onRecordDelete=this.onRecordDelete.bind(this),e.hideEditRow=this.hideEditRow.bind(this),e.saveRow=this.saveRow.bind(this),e.cancelRow=this.cancelRow.bind(this)}selectItemOnSuccess(e,t,i){setTimeout(()=>{t||this.table.selectItem(e,this.table.dataset),r.triggerFn(i)},250)}initiateSelectItem(e,t,i,n,a){this.table.gridOptions.isNavTypeScrollOrOndemand()&&!this.table.dataNavigator.isDisableNext&&this.table.isNewRowInserted?this.table.isNewRowInserted=!1:("last"===e&&(n||(this.table.dataNavigator.dataSize+=1),this.table.isNavigationEnabled()||(e="current")),this.table.dataNavigator.calculatePagingValues(),this.table.dataNavigator.__fullData=this.table.__fullData,this.table.dataNavigator.navigatePage(e,null,!0,()=>{(this.table.isNavigationEnabled()||n)&&this.selectItemOnSuccess(t,i,a),"quickedit"!==this.table.editmode||i||this.table.callDataGridMethod("setActiveRow",t)}))}updateVariable(e,t){const i=this.table.datasource;if(i&&(i.execute(r.DataSource.Operation.FETCH_DISTINCT_VALUES),!this.table.isNavigationEnabled())){const n=this.table.sortInfo,a=n&&n.direction?n.field+" "+n.direction:"";c.refreshDataSource(i,{page:1,filterFields:this.table.getFilterFields(this.table.filterInfo),orderBy:a,matchMode:"anywhereignorecase"}).then(()=>{r.$appDigest(),this.selectItemOnSuccess(e,!0,t)})}}insertSuccessHandler(e,t){if(e.error)this.table.invokeEventCallback("error",{$event:t.event,$operation:x,$data:e.error}),this.table.onError||this.table.toggleMessage(!0,"error",this.table.errormessage||e.error),r.triggerFn(t.error,e);else{if(this.table.gridOptions.isNavTypeScrollOrOndemand()&&(this.table.isNewRowInserted=!0),t.event){const e=$(t.event.target).closest("tr");this.table.callDataGridMethod("hideRowEditMode",e)}this.table.onRowinsert||this.table.toggleMessage(!0,"success",this.table.insertmessage),this.table.datasource.execute(r.DataSource.Operation.SUPPORTS_CRUD)?(this.table.initiateSelectItem(this.table.getNavigationTargetBySortInfo(),e,void 0,!1,t.callBack),this.updateVariable(e,t.callBack)):this.table.datasource.execute(r.DataSource.Operation.IS_API_AWARE)||this.table.initiateSelectItem(this.table.getNavigationTargetBySortInfo(),e,void 0,!1,t.callBack),r.triggerFn(t.success,e),this.table.invokeEventCallback("rowinsert",{$event:t.event,$data:e,row:e})}}generatePath(e){let t,i,n=this.table.widget.$attrs.get("datasetboundexpr");if(h.startsWith(e,"item")&&n){h.startsWith(n,"Widgets.")&&(n=r.extractCurrentItemExpr(n,this.table));const e=this.table.$element.parents(".app-list-item"),a=h.map(e,e=>h.parseInt($(e).attr("listitemindex")));for(let e=a.length-1;e>=0;e--)n=n.replace("$i",a[e]);i=h.last(a),t=n.replace(/^Variables\..*\.dataSet([^.])*(\.|$)/g,"")}else{/^Variables\..*\.dataSet([\[][0-9]])/g.test(e)&&(i=h.parseInt(e.replace(/^Variables\..*\.dataSet([\[])/g,""))),t=e.replace(/^Variables\..*\.dataSet([^.])*(\.|$)/g,"")}return{path:t,index:i}}insertRecord(e){const t=this.table.datasource;if(!t)return;const i=t.pagination&&t.pagination.number+1,n={row:e.row,skipNotification:!0,period:e.period};if(t.execute(r.DataSource.Operation.SUPPORTS_CRUD)||!t.execute(r.DataSource.Operation.IS_API_AWARE)||"wm.CrudVariable"===t.category){if(!t.execute(r.DataSource.Operation.IS_API_AWARE)){const i=this.generatePath(this.table.binddataset);return t.execute(r.DataSource.Operation.ADD_ITEM,{item:e.row,path:i.path,parentIndex:i.index}),void this.insertSuccessHandler(e.row,e)}t.execute(r.DataSource.Operation.INSERT_RECORD,n).then(n=>{this.insertSuccessHandler(n,e),"wm.CrudVariable"===t.category&&t.execute(r.DataSource.Operation.LIST_RECORDS,{skipToggleState:!0,operation:"list",page:i})},t=>{this.table.invokeEventCallback("error",{$event:e.event,$operation:x,$data:t}),this.table.onError||this.table.toggleMessage(!0,"error",this.table.errormessage||t),r.triggerFn(e.error,t),r.triggerFn(e.callBack,void 0,!0)})}else this.table.invokeEventCallback("rowinsert",{$event:e.event,row:e.row})}updateSuccessHandler(e,t){if(e.error)this.table.invokeEventCallback("error",{$event:t.event,$operation:A,$data:e.error}),this.table.onError||this.table.toggleMessage(!0,"error",this.table.errormessage||e.error),r.triggerFn(t.error,e);else{if(t.event){const e=$(t.event.target).closest("tr");this.table.callDataGridMethod("hideRowEditMode",e)}this.table.onRowupdate||this.table.toggleMessage(!0,"success",this.table.updatemessage),this.table.datasource.execute(r.DataSource.Operation.SUPPORTS_CRUD)?(this.table.initiateSelectItem("current",e,void 0,!1,t.callBack),this.updateVariable(e,t.callBack)):this.table.datasource.execute(r.DataSource.Operation.IS_API_AWARE)||this.table.initiateSelectItem("current",e,void 0,"wm.Variable"===this.table.datasource.category,t.callBack),r.triggerFn(t.success,e),this.table.invokeEventCallback("rowupdate",{$event:t.event,$data:e,row:e})}}updateRecord(e){const t=this.table.datasource;if(!t)return;const i=t.pagination&&t.pagination.number+1,n={row:e.row,prevData:e.prevData,skipNotification:!0,period:e.period};if(t.execute(r.DataSource.Operation.SUPPORTS_CRUD)||!t.execute(r.DataSource.Operation.IS_API_AWARE)||"wm.CrudVariable"===t.category){if(!t.execute(r.DataSource.Operation.IS_API_AWARE)){const i=this.generatePath(this.table.binddataset);return t.execute(r.DataSource.Operation.SET_ITEM,{prevItem:e.prevData,item:e.row,path:i.path,parentIndex:i.index}),void this.updateSuccessHandler(e.row,e)}t.execute(r.DataSource.Operation.UPDATE_RECORD,n).then(n=>{this.updateSuccessHandler(n,e),"wm.CrudVariable"===t.category&&t.execute(r.DataSource.Operation.LIST_RECORDS,{skipToggleState:!0,operation:"list",page:i})},t=>{this.table.invokeEventCallback("error",{$event:e.event,$operation:A,$data:t}),this.table.onError||this.table.toggleMessage(!0,"error",this.table.errormessage||t),r.triggerFn(e.error,t),r.triggerFn(e.callBack,void 0,!0)})}else this.table.invokeEventCallback("rowupdate",{$event:e.event,row:e.row})}onRecordDelete(e){let t;this.table.dataNavigator&&(this.table.dataNavigator.dataSize-=1,this.table.dataNavigator.calculatePagingValues(),t=this.table.dataNavigator.pageCount<this.table.dataNavigator.dn.currentPage?"prev":void 0,this.table.dataNavigator.__fullData=this.table.__fullData,this.table.dataNavigator.navigatePage(t,null,!0,()=>{setTimeout(()=>{r.triggerFn(e)},void 0,!1)}))}deleteSuccessHandler(e,t,i,n){t&&t.error?this.table.onError||this.table.toggleMessage(!0,"error",this.table.errormessage||t.error):(this.onRecordDelete(n),this.table.datasource.execute(r.DataSource.Operation.SUPPORTS_CRUD)&&this.updateVariable(e,n),this.table.onRowdelete||this.table.toggleMessage(!0,"success",this.table.deletemessage),this.table.invokeEventCallback("rowdelete",{$event:i,$data:e,row:e}),this.table.invokeEventCallback("rowdeleted",{$event:i,$data:e,row:e}))}deleteFn(e){const t=this.table.datasource;let i,n;if(t){if((this.table.onDemandLoad||this.table.infScroll)&&(this.table.isRowDeleted=!0),"wm.CrudVariable"===t.category&&(this.triggerWMEvent("resetEditMode"),t.pagination&&(i=t.pagination.last&&1===t.pagination.numberOfElements,n=i?t.pagination.number:t.pagination.number+1)),t.execute(r.DataSource.Operation.SUPPORTS_CRUD)||!t.execute(r.DataSource.Operation.IS_API_AWARE)||this.table._isDependent||"wm.CrudVariable"===t.category){if(!t.execute(r.DataSource.Operation.IS_API_AWARE)){const i=this.generatePath(this.table.binddataset);return t.execute(r.DataSource.Operation.REMOVE_ITEM,{item:e.row,path:i.path,parentIndex:i.index}),void this.deleteSuccessHandler(e.row,void 0,e.evt,e.callBack)}t.execute(r.DataSource.Operation.DELETE_RECORD,{row:e.row,skipNotification:!0,period:e.period}).then(i=>{this.deleteSuccessHandler(i,e.row,e.evt,e.callBack),"wm.CrudVariable"===t.category&&t.execute(r.DataSource.Operation.LIST_RECORDS,{skipToggleState:!0,operation:"list",page:n})},t=>{this.table.isRowDeleted&&(this.table.isRowDeleted=!1),r.triggerFn(e.callBack,void 0,!0),this.table.invokeEventCallback("error",{$event:e.evt,$operation:k,$data:t}),this.table.onError||this.table.toggleMessage(!0,"error",this.table.errormessage||t)})}else this.table.invokeEventCallback("rowdelete",{$event:e.evt,row:e.row});r.triggerFn(e.cancelRowDeleteCallback)}}deleteRecord(e){if(!this.table.confirmdelete)return this.deleteFn(e),void r.triggerFn(e.cancelRowDeleteCallback);this.dialogService.showAppConfirmDialog({title:this.app.appLocale.MESSAGE_DELETE_RECORD||"Delete Record",iconclass:"wi wi-delete fa-lg",message:this.table.confirmdelete,oktext:this.table.deleteoktext,canceltext:this.table.deletecanceltext,onOk:()=>{this.deleteFn(e),this.dialogService.closeAppConfirmDialog()},onCancel:()=>{r.triggerFn(e.cancelRowDeleteCallback),this.dialogService.closeAppConfirmDialog()},onOpen:()=>{$(".cancel-action").focus()},onEscape:()=>{r.triggerFn(e.cancelRowDeleteCallback)}})}editRow(e){let t;this.table._isDependent?this.triggerWMEvent("update"):(e&&e.target?this.table.callDataGridMethod("toggleEditRow",e,{selectRow:!0,action:"edit"}):"form"===this.table.editmode||"dialog"===this.table.editmode?(t=e||this.table.selectedItems[0],this.table.gridOptions.beforeRowUpdate(t)):setTimeout(()=>{t=this.table.datagridElement.find("tr.active"),t.length&&this.table.callDataGridMethod("toggleEditRow",void 0,{$row:t,action:"edit"})}),this.table._triggeredByUser=!0,this.table.gridOptions.setIsDataUpdatedByUser(!1))}addNewRow(){this.table.isGridEditMode||(this.table._triggeredByUser=!0,this.table.gridOptions.setIsDataUpdatedByUser(!1),this.table.callDataGridMethod("addNewRow"),this.table._liveTableParent?this.table._liveTableParent.addNewRow():this.table._isDependent&&this.triggerWMEvent("insert"))}triggerWMEvent(e,t){r.$invokeWatchers(!0),this.app.notify("wm-event",{eventName:e,widgetName:this.table.name,row:this.table.selecteditem,dataSource:t})}deleteRow(e){let t;e&&e.target?this.table.callDataGridMethod("deleteRowAndUpdateSelectAll",e):setTimeout(()=>{t=e||this.table.selectedItems[0],this.deleteRecord({row:t})}),this.table._triggeredByUser=!0,this.table.gridOptions.setIsDataUpdatedByUser(!1)}hideEditRow(){const e=this.table.datagridElement.find("tr.row-editing");e.length&&this.table.callDataGridMethod("hideRowEditMode",e)}saveRow(){this.table.callDataGridMethod("saveRow")}cancelRow(){const e=this.table.datagridElement.find("tr.row-editing");e.length&&this.table.callDataGridMethod("cancelEdit",e)}ngOnDestroy(){this.table=null,this.dialogService=null,this.app=null}static{this.\u0275fac=b.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:b,type:N,deps:[{token:_,self:!0},{token:w.AbstractDialogService},{token:w.App}],target:b.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=b.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:N,isStandalone:!0,selector:"[wmTableCUD]",ngImport:b})}}b.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:b,type:N,decorators:[{type:s.Directive,args:[{standalone:!0,selector:"[wmTableCUD]"}]}],ctorParameters:()=>[{type:void 0,decorators:[{type:s.Self},{type:s.Inject,args:[_]}]},{type:w.AbstractDialogService},{type:w.App}]});const M=O.default||window.moment,L=["null","empty","nullorempty","isnotnull","isnotempty"],F=(e,t)=>{if(r.isDefined(e)&&""!==e)return r.isNumberType(t)?h.toNumber(e):t===r.DataType.DATETIME?M(e).valueOf():h.toString(e).toLowerCase()},j=(e,t,i=[])=>{const n=F(t.value,t.type);let a;return!r.isDefined(n)&&!h.includes(L,t.matchMode)||r.isNumberType(t.type)&&h.isNull(t.value)?e:e=e.filter(e=>{let s;switch(t.field?a=F(h.get(e,t.field),t.type):(a=[],h.forEach(e,(t,n)=>{if(h.includes(i,n))a.push(t);else{const t=h.filter(h.range(i.length),e=>i[e].includes(n));h.forEach(t,t=>{const n=h.get(e,i[t]);a.indexOf(n)<0&&a.push(n)})}}),a=a.join(" ").toLowerCase()),t.matchMode){case"start":s=h.startsWith(a,n);break;case"end":s=h.endsWith(a,n);break;case"exact":s=h.isEqual(a,n);break;case"notequals":s=!h.isEqual(a,n);break;case"null":s=h.isNull(a);break;case"isnotnull":s=!h.isNull(a);break;case"empty":s=h.isEmpty(a);break;case"isnotempty":s=!h.isEmpty(a);break;case"nullorempty":s=h.isNull(a)||h.isEmpty(a);break;case"lessthan":s=a<n;break;case"lessthanequal":s=a<=n;break;case"greaterthan":s=a>n;break;case"greaterthanequal":s=a>=n;break;default:s=r.isNumberType(t.type)?h.isEqual(a,n):h.includes(a,n)}return s})},V=(e,t,i=[])=>{const n=t&&t.field;n?(e[n]={value:t.value,logicalOp:"AND"},t.matchMode&&(e[n].matchMode=t.matchMode)):function(e,t,i){i.forEach(function(i){e[i]={value:t.value,type:t.value.type,logicalOp:"OR"},t.matchMode&&(e[i].matchMode=t.matchMode)})}(e,t,i)},B=(e,t)=>{t.field&&(e[t.field]={value:t.value,matchMode:t.matchMode,type:t.type})},G=(e,t)=>{e.push({field:t.key?t.key:"",matchMode:t.matchMode,type:t.type,value:t.value})};class W{constructor(e){this.table=e,e._searchSortHandler=this.searchSortHandler.bind(this),e.getSearchResult=this.getSearchResult.bind(this),e.getSortResult=this.getSortResult.bind(this),e.checkFiltersApplied=this.checkFiltersApplied.bind(this),e.getFilterFields=this.getFilterFields.bind(this),e.onRowFilterChange=this.onRowFilterChange.bind(this),e.onFilterConditionSelect=this.onFilterConditionSelect.bind(this),e.showClearIcon=this.showClearIcon.bind(this),e.clearRowFilter=this.clearRowFilter.bind(this),e.matchModeTypesMap=c.getMatchModeTypesMap(),e.matchModeMsgs=c.getMatchModeMsgs(e.appLocale),e.emptyMatchModes=L,e.getNavigationTargetBySortInfo=this.getNavigationTargetBySortInfo.bind(this),e.refreshData=this.refreshData.bind(this),e.clearFilter=this.clearFilter.bind(this),e.adjustContainer=this.adjustContainer.bind(this)}adjustContainer(e){setTimeout(()=>{r.adjustContainerRightEdges($("bs-dropdown-container"),this.table.rowFilterCompliedTl[e],this.table,$("bs-dropdown-container .dropdown-menu"))})}getNavigationTargetBySortInfo(){return this.table.sortInfo&&"desc"===this.table.sortInfo.direction&&h.includes(this.table.primaryKey,this.table.sortInfo.field)?"first":"last"}getTableVisibleCols(){const e=[];return h.forEach(this.table.columns,(t,i)=>{"true"===h.toLower(h.toString(t.showinfilter))&&"rowOperations"!==i&&t.searchable&&e.push(i)}),e}invokeSetFilterfieldBasedOnFieldval(e,t){if(e.field)V(t,e);else if(!h.isEmpty(e)){const i=this.getTableVisibleCols();V(t,e,i)}}getFilterFields(e){e=e||{};const t={};return h.isArray(e)?h.forEach(e,e=>{this.invokeSetFilterfieldBasedOnFieldval(e,t)}):this.invokeSetFilterfieldBasedOnFieldval(e,t),t}getLogicalOperator(e){let t="";for(const i in e){t=e[i].logicalOp||"";break}return t}resetSortStatus(e){let t;!h.isEmpty(this.table.sortInfo)&&this.table.datasource&&(t=this.table.sortInfo.field+" "+this.table.sortInfo.direction,(e=this.table.datasource.execute(r.DataSource.Operation.GET_OPTIONS).orderBy||e)&&(e=h.head(h.split(e,","))),t!==e&&(this.table.callDataGridMethod("resetSortIcons"),this.table.sortInfo={},this.table.setDataGridOption("sortInfo",{})))}clearFilter(e){let t;this.table.filterInfo={},"multicolumn"===this.table.filtermode?(this.table.fieldDefs.forEach(e=>{e.resetFilter&&e.resetFilter()}),e||this.table.onRowFilterChange()):"search"===this.table.filtermode&&(t=this.table.datagridElement,t.find('[data-element="dgSearchText"]').val(""),t.find('[data-element="dgFilterValue"]').val(""),e||t.find(".app-search-button").trigger("click"))}checkFiltersApplied(e){if(this.table.datasource)return this.table.datasource.execute(r.DataSource.Operation.SUPPORTS_SERVER_FILTER)?(h.isEmpty(this.table.datasource.execute(r.DataSource.Operation.GET_OPTIONS).filterFields)&&this.clearFilter(!0),void this.resetSortStatus(e)):void(this.table.datasource.execute(r.DataSource.Operation.IS_PAGEABLE)&&this.resetSortStatus(e))}getSearchResult(e,t){const i=this.getTableVisibleCols();return t?(h.isArray(t)?t.forEach(t=>{e=j(e,t,i)}):e=j(e,t,i),e):e}parseDateString(e){if("string"!=typeof e)return NaN;const t=e.trim();if(!t)return NaN;const i=Date.parse(e);if(/^[A-Za-z]+/.test(t)&&/\d+$/.test(t)&&!/\b(?:Jan(?:uary)?|Feb(?:ruary)?|Mar(?:ch)?|Apr(?:il)?|May|Jun(?:e)?|Jul(?:y)?|Aug(?:ust)?|Sep(?:t(?:ember)?)?|Oct(?:ober)?|Nov(?:ember)?|Dec(?:ember)?)\b/i.test(t))return NaN;if(isNaN(i)){const t=e?.split(/[-/\s]+/)?.map(Number)||[];return new Date(t[2],t[1]-1,t[0]).getTime()}return i}getSortResult(e,t){if(t&&t.direction){const i=h.find(e,e=>{const i=h.get(e,t.field);return"string"==typeof i&&!!i.trim()}),n=i?h.get(i,t.field):void 0,a="string"==typeof n?this.parseDateString(n):NaN;e=isNaN(a)?(t.sortBy?this.table.columns[t.sortBy]?.caseinsensitive:this.table.columns[t.field]?.caseinsensitive)?h.orderBy(e,[e=>{const i=h.get(e,t.field);return null==i||""===i?1:0},e=>{const i=h.get(e,t.field);return"string"==typeof i?i.toLowerCase():i},e=>h.get(e,t.field)],["asc",t.direction,t.direction]):h.orderBy(e,t.field,t.direction):h.orderBy(e,[e=>{const i=h.get(e,t.field);return null==i||""===i?1:0},e=>{const i=this.parseDateString(h.get(e,t.field));return isNaN(i)?1:0},e=>this.parseDateString(h.get(e,t.field))],["asc","asc",t.direction])}return e}handleClientSideSortSearch(e,t,i){let n;this.table._isClientSearch=!0,n=this.table.isNavigationEnabled()?r.getClonedObject(this.table.__fullData):r.getClonedObject(this.table.dataset),"search"===i?this.table.filterInfo=e:this.table.sortInfo=e,h.isObject(n)&&!h.isArray(n)&&(n=[n]),n=this.getSearchResult(n,this.table.filterInfo),n=this.getSortResult(n,this.table.sortInfo),this.table.serverData=n,"sort"===i&&this.table.invokeEventCallback("sort",{$event:t,$data:{data:this.table.serverData,sortDirection:this.table.sortInfo.direction,colDef:this.table.columns[this.table.sortInfo.field]}}),this.table.isNavigationEnabled()?(this.table.dataNavigator.dn.currentPage=1,this.table.dataNavigator.setPagingValues(n)):this.table.setGridData(this.table.serverData)}handleSinglePageSearch(e){this.table._isPageSearch=!0;let t=r.getClonedObject(this.table.gridData);const i=this.table.datagridElement.find("tbody tr.app-datagrid-row");this.table.filterInfo=e,t=this.getSearchResult(t,e),h.forEach(this.table.gridData,(e,n)=>{const a=$(i[n]);h.find(t,t=>h.isEqual(t,e))?a.show():a.hide()}),t&&t.length?(this.table.callDataGridMethod("setStatus","ready"),this.table.gridfirstrowselect&&!this.table.multiselect&&this.table.callDataGridMethod("selectFirstRow",!0,!0)):(this.table.callDataGridMethod("setStatus","nodata",this.table.nodatamessage),this.table.selecteditem=void 0),this.table.callDataGridMethod("updateSelectAllCheckboxState")}handleServerSideSearch(e){if(this.table.filterInfo=e,!this.table.datasource)return;const t=this.table.sortInfo,i=t&&t.direction?t.field+" "+t.direction:"",n=this.getFilterFields(e),a=this.getLogicalOperator(n);c.refreshDataSource(this.table.datasource,{page:1,filterFields:n,orderBy:i,condition:a}).then(()=>{r.$appDigest()},()=>{this.table.toggleMessage(!0,"error",this.table.nodatamessage)})}handleSeverSideSort(e,t,i){this.table.gridOptions.sortInfo.field=e.field,this.table.gridOptions.sortInfo.direction=e.direction,this.table.sortInfo=r.getClonedObject(e);const n=e&&e.direction?e.field+" "+e.direction:"",a=this.getFilterFields(this.table.filterInfo),s=this.getLogicalOperator(a);i||"none"===this.table.getConfiguredState()||this.table.statePersistence.removeWidgetState(this.table,"pagination"),c.refreshDataSource(this.table.datasource,{page:1,filterFields:a,orderBy:n,condition:s}).then(i=>{r.$appDigest();const n=i&&i.data?i.data:i;this.table.invokeEventCallback("sort",{$event:t,$data:{data:n,sortDirection:e.direction,colDef:this.table.columns[e.field]}})})}searchHandler(e,t,i,n){let a;a=h.isArray(e)?e.filter(function(e){return void 0!==e.matchMode&&void 0!==e.value||void 0!==e.value&&""===e.field}):{field:e.field,value:e.value,type:e.type},"none"!==this.table.getConfiguredState()&&c.unsupportedStatePersistenceTypes.indexOf(this.table.navigation)<0?(h.isArray(e)&&a.length||e.value?(this.table.statePersistence.removeWidgetState(this.table,"search"),this.table.statePersistence.setWidgetState(this.table,{search:a})):this.table.statePersistence.removeWidgetState(this.table,"search"),n||(this.table.statePersistence.removeWidgetState(this.table,"pagination"),this.table.statePersistence.removeWidgetState(this.table,"selectedItem"))):console.warn("Retain State handling on Widget "+this.table.name+" is not supported for current pagination type.");let s=r.getClonedObject(e);const o=this.table.datasource;if(!o&&!this.table.dataset)return;let l;const d={};h.isArray(s)?s.forEach(e=>{B(d,e)}):B(d,s),l=this.table.invokeEventCallback("beforefilter",{$event:t,$data:d,columns:d}),!1!==l&&(s=[],h.isEmpty(d)&&!h.isEmpty(a)?h.isArray(a)?h.forEach(a,e=>{G(s,e)}):G(s,a):h.forEach(d,(e,t)=>{s.push({field:t,matchMode:e.matchMode,type:e.type,value:e.value})}),o&&o.execute(r.DataSource.Operation.SUPPORTS_SERVER_FILTER)?this.handleServerSideSearch(s):o&&o.execute(r.DataSource.Operation.IS_API_AWARE)&&o.execute(r.DataSource.Operation.IS_PAGEABLE)?this.handleSinglePageSearch(s):this.handleClientSideSortSearch(s,t,i))}sortHandler(e,t,i,n){const a=this.table.datasource;if(a||this.table.dataset){if(!n&&"none"!==this.table.getConfiguredState()&&c.unsupportedStatePersistenceTypes.indexOf(this.table.navigation)<0){const t={direction:e.direction,field:e.field};e.direction?this.table.statePersistence.setWidgetState(this.table,{sort:t}):this.table.statePersistence.removeWidgetState(this.table,"sort"),this.table.statePersistence.removeWidgetState(this.table,"selectedItem")}else console.warn("Retain State handling on Widget "+this.table.name+" is not supported for current pagination type.");a&&a.execute(r.DataSource.Operation.IS_SORTABLE)?this.handleSeverSideSort(e,t,n):this.handleClientSideSortSearch(e,t,i)}}setLastActionPerformedToSearchSort(){this.table.gridOptions.setLastActionPerformed(this.table.gridOptions.ACTIONS.SEARCH_OR_SORT),this.table.gridOptions.setIsSearchTrigerred(!0)}searchSortHandler(e,t,i,n){"change"===(t?t.type:"")&&"multicolumn"!==this.table.filtermode?t.stopPropagation():(this.setLastActionPerformedToSearchSort(),"search"===i?this.searchHandler(e,t,i,n):this.sortHandler(e,t,i,n))}showClearIcon(e){const t=this.table.rowFilter[e]&&this.table.rowFilter[e].value;return r.isDefined(t)&&""!==t&&null!==t}clearRowFilter(e){this.table.rowFilter&&this.table.rowFilter[e]&&(this.table.columns[e].resetFilter(),this.onRowFilterChange(e))}onFilterConditionSelect(e,t){this.table.rowFilter[e]=this.table.rowFilter[e]||{},this.table.rowFilter[e].matchMode=t,h.includes(this.table.emptyMatchModes,t)?(this.table.columns[e].resetFilter(),this.table.onRowFilterChange()):r.isDefined(this.table.rowFilter[e].value)&&""!==this.table.rowFilter[e].value?this.table.onRowFilterChange():setTimeout(()=>{this.table.columns[e].filterInstance.focus()})}getFilterOnFieldValues(e){if(!this.table.datasource||!this.table.datasource.execute(r.DataSource.Operation.SUPPORTS_DISTINCT_API))return;const t=e.field,i=this.table.fullFieldDefs,n=h.filter(i,{filteronfilter:t}),a=h.get(this.table.rowFilter,[t,"value"]);h.forEach(n,e=>{const t=e.filteronfilter,i=e.field,n={},s=e.filterwidget;c.isDataSetWidget(s)&&t!==i&&!e.isFilterDataSetBound&&(n[t]=r.isDefined(a)&&""!==a&&null!==a?{value:a}:{},s===r.FormWidgetType.AUTOCOMPLETE&&e.filterInstance.dataoptions?e.filterInstance.dataoptions.filterFields=n:this.table.datasource.execute(r.DataSource.Operation.GET_DISTINCT_DATA_BY_FIELDS,{fields:i,filterFields:n}).then(t=>{e.filterdataset=t.data}))})}onRowFilterChange(e){const t=[],i=h.find(this.table.fullFieldDefs,{field:e});h.forEach(this.table.rowFilter,(e,n)=>{(r.isDefined(e.value)&&""!==e.value||h.includes(this.table.emptyMatchModes,e.matchMode))&&(i&&n===i.field&&(e.type=e.type||i.type,e.matchMode=e.matchMode||h.get(this.table.matchModeTypesMap[e.type],0)),t.push({field:n,value:e.value,matchMode:e.matchMode,type:e.type}))}),this.table.gridOptions.searchHandler(t,void 0,"search"),i&&this.getFilterOnFieldValues(i)}refreshData(e){if(!this.table.datasource)return;const t=e?this.table.dataNavigator.dn.currentPage:1,i=this.table.sortInfo,n=i&&i.direction?i.field+" "+i.direction:"",a=this.getFilterFields(this.table.filterInfo),s=this.getLogicalOperator(a);c.refreshDataSource(this.table.datasource,{page:t,filterFields:a,orderBy:n,condition:s})}ngOnDestroy(){this.table=null}static{this.\u0275fac=b.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:b,type:W,deps:[{token:_,self:!0}],target:b.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=b.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:W,isStandalone:!0,selector:"[wmTableFilterSort]",ngImport:b})}}b.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:b,type:W,decorators:[{type:s.Directive,args:[{standalone:!0,selector:"[wmTableFilterSort]"}]}],ctorParameters:()=>[{type:void 0,decorators:[{type:s.Self},{type:s.Inject,args:[_]}]}]});const q={widgetType:"wm-table-action",hostClass:""};class z extends c.BaseComponent{static{this.initializeProps=void c.register("wm-table-action",new Map([["accessroles",c.PROP_STRING],["action",c.PROP_STRING],["caption",c.PROP_STRING],["class",c.PROP_STRING],["conditionalclass",c.PROP_ANY],["conditionalstyle",c.PROP_ANY],["disabled",{value:!1,...c.PROP_BOOLEAN}],["display-name",c.PROP_STRING],["hyperlink",c.PROP_STRING],["icon",c.PROP_STRING],["iconclass",c.PROP_STRING],["key",c.PROP_STRING],["position",{value:"footer",...c.PROP_STRING}],["shortcutkey",c.PROP_STRING],["show",{value:!0,...c.PROP_BOOLEAN}],["tabindex",{value:0,...c.PROP_NUMBER}],["title",c.PROP_STRING],["target",c.PROP_STRING],["widget-type",{value:"button",...c.PROP_STRING}]]))}constructor(e,t,i){super(e,q,i),this.table=t}populateAction(){this.buttonDef={key:this.key,displayName:this["display-name"]||this.caption||"",show:this.show,class:this.class||"",iconclass:this.iconclass||"",title:h.isUndefined(this.title)?this["display-name"]||"":this.title,action:this.action,accessroles:this.accessroles,shortcutkey:this.shortcutkey,disabled:this.disabled,tabindex:this.tabindex,icon:this.icon,position:this.position,widgetType:this["widget-type"],hyperlink:this.hyperlink,target:this.target||"",conditionalclass:this.conditionalclass||"",conditionalstyle:this.conditionalstyle||{}},this._propsInitialized=!0}ngOnInit(){super.ngOnInit(),this.populateAction(),this.table.registerActions(this.buttonDef)}onPropertyChange(e,t){this._propsInitialized&&("display-name"===e?this.buttonDef.displayName=t:this.buttonDef[e]=t)}ngOnDestroy(){this.table=null,this.buttonDef=null,super.ngOnDestroy()}static{this.\u0275fac=b.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:b,type:z,deps:[{token:b.Injector},{token:_,optional:!0},{token:"EXPLICIT_CONTEXT",optional:!0}],target:b.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=b.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:z,isStandalone:!0,selector:"[wmTableAction]",providers:[c.provideAsWidgetRef(z)],usesInheritance:!0,ngImport:b})}}b.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:b,type:z,decorators:[{type:s.Directive,args:[{standalone:!0,selector:"[wmTableAction]",providers:[c.provideAsWidgetRef(z)]}]}],ctorParameters:()=>[{type:b.Injector},{type:_,decorators:[{type:s.Optional}]},{type:void 0,decorators:[{type:s.Inject,args:["EXPLICIT_CONTEXT"]},{type:s.Optional}]}]});const U={widgetType:"wm-table-column-group",hostClass:""};class H extends c.BaseComponent{static{this.initializeProps=void c.register("wm-table-column-group",new Map([["backgroundcolor",c.PROP_STRING],["caption",c.PROP_STRING],["col-class",c.PROP_STRING],["name",c.PROP_STRING],["textalignment",{value:"center",...c.PROP_STRING}]]))}constructor(e,t,i,n){super(e,U,n),this.group=t,this.table=i,this.config={}}populateConfig(){this.config={field:this.name,displayName:this.caption||"",columns:[],isGroup:!0,accessroles:this.accessroles,textAlignment:this.textalignment||"center",backgroundColor:this.backgroundcolor,class:this["col-class"]}}onPropertyChange(e,t,i){"caption"===e?(this.config.displayName=t||"",this.table.callDataGridMethod("setColumnProp",this.config.field,"displayName",t,!0)):super.onPropertyChange(e,t,i)}ngOnInit(){super.ngOnInit(),this.populateConfig();const e=parseInt(this.getAttr("headerIndex"),10),t=parseInt(this.getAttr("index"),10),i=this.group&&this.group.name;c.setHeaderConfigForTable(this.table.headerConfig,this.config,i,i?t:e)}ngOnDestroy(){this.table=null,this.group=null,this.config=null,super.ngOnDestroy()}static{this.\u0275fac=b.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:b,type:H,deps:[{token:b.Injector},{token:H,optional:!0,skipSelf:!0},{token:_,optional:!0},{token:"EXPLICIT_CONTEXT",optional:!0}],target:b.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=b.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:H,isStandalone:!0,selector:"[wmTableColumnGroup]",providers:[c.provideAsWidgetRef(H)],usesInheritance:!0,ngImport:b})}}b.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:b,type:H,decorators:[{type:s.Directive,args:[{standalone:!0,selector:"[wmTableColumnGroup]",providers:[c.provideAsWidgetRef(H)]}]}],ctorParameters:()=>[{type:b.Injector},{type:H,decorators:[{type:s.SkipSelf},{type:s.Optional}]},{type:_,decorators:[{type:s.Optional}]},{type:void 0,decorators:[{type:s.Inject,args:["EXPLICIT_CONTEXT"]},{type:s.Optional}]}]});const Y={widgetType:"wm-table-column",hostClass:""};let X=["datafield","displayfield","placeholder","searchkey","sortby","matchmode","displaylabel","groupby","match","dateformat","showcount","collapsible","checkedvalue","uncheckedvalue","showdropdownon","dataentrymode","autoclose","dataset","outputformat"];X=[...X,"maxchars","regexp","minvalue","maxvalue","step","required","mindate","maxdate","excludedates","excludedays","mintime","maxtime"];class K{constructor(e){this.widget=e}focus(){this.widget.focus()}setProperty(e,t){e="value"===e?"datavalue":e,this.widget[e]=t}getProperty(e){return e="value"===e?"datavalue":e,this.widget[e]}}class Q extends c.BaseComponent{static{this.initializeProps=void c.register("wm-table-column",new Map([["accessroles",c.PROP_STRING],["autoclose",{value:"outsideClick",...c.PROP_STRING}],["backgroundcolor",c.PROP_STRING],["binding",c.PROP_STRING],["caption",c.PROP_STRING],["checkedvalue",c.PROP_STRING],["col-class",c.PROP_STRING],["collapsible",c.PROP_BOOLEAN],["col-ng-class",c.PROP_STRING],["currencypattern",c.PROP_STRING],["customExpression",c.PROP_BOOLEAN],["dataentrymode",{value:"default",...c.PROP_STRING}],["datafield",c.PROP_STRING],["dataoptions",c.PROP_ANY],["dataset",c.PROP_ANY],["datasource",c.PROP_STRING],["dateformat",c.PROP_STRING],["datepattern",c.PROP_STRING],["debouncetime",{value:250,...c.PROP_NUMBER}],["defaultvalue",c.PROP_STRING],["disabled",c.PROP_BOOLEAN],["displayfield",c.PROP_STRING],["displaylabel",c.PROP_STRING],["editdatepattern",c.PROP_STRING],["outputformat",c.PROP_STRING],["edit-widget-type",c.PROP_STRING],["showineditmode",c.PROP_BOOLEAN],["editinputtype",c.PROP_STRING],["exportexpression",c.PROP_STRING],["filterdataset",c.PROP_STRING],["filterdatafield",c.PROP_STRING],["filterdisplayfield",c.PROP_STRING],["filterdisplaylabel",c.PROP_STRING],["filterexpressions",{value:"{}",...c.PROP_STRING}],["filtersearchkey",c.PROP_STRING],["filter-on",c.PROP_STRING],["filteronfilter",c.PROP_STRING],["filterplaceholder",c.PROP_STRING],["filterwidget",c.PROP_STRING],["filterinputtype",c.PROP_STRING],["formatpattern",c.PROP_STRING],["custompipeformat",c.PROP_STRING],["fractionsize",c.PROP_STRING],["generator",c.PROP_STRING],["groupby",c.PROP_STRING],["limit",c.PROP_NUMBER],["match",c.PROP_STRING],["matchmode",c.PROP_STRING],["maxchars",c.PROP_NUMBER],["maxvalue",c.PROP_NUMBER],["step",c.PROP_NUMBER],["mobiledisplay",{value:!0,...c.PROP_BOOLEAN}],["minvalue",c.PROP_NUMBER],["maxdate",c.PROP_STRING],["mindate",c.PROP_STRING],["excludedays",c.PROP_STRING],["excludedates",c.PROP_STRING],["maxtime",c.PROP_STRING],["mintime",c.PROP_STRING],["pcdisplay",{value:!0,...c.PROP_BOOLEAN}],["period",c.PROP_BOOLEAN],["placeholder",c.PROP_STRING],["prefix",c.PROP_STRING],["primary-key",c.PROP_BOOLEAN],["readonly",c.PROP_BOOLEAN],["regexp",c.PROP_ANY],["related-entity-name",c.PROP_STRING],["required",c.PROP_BOOLEAN],["rowactionsposition",c.PROP_STRING],["searchkey",c.PROP_STRING],["sortby",c.PROP_STRING],["searchable",{value:!0,...c.PROP_BOOLEAN}],["showinfilter",{value:!1,...c.PROP_BOOLEAN}],["suffix",c.PROP_STRING],["show",{value:!0,...c.PROP_BOOLEAN}],["showcount",c.PROP_BOOLEAN],["showdropdownon",{value:"default",...c.PROP_STRING}],["sortable",{value:!0,...c.PROP_BOOLEAN}],["caseinsensitive",{value:!1,...c.PROP_BOOLEAN}],["tabletdisplay",{value:!0,...c.PROP_BOOLEAN}],["textalignment",{value:"left",...c.PROP_STRING}],["textcolor",c.PROP_STRING],["type",{value:"string",...c.PROP_STRING}],["uncheckedvalue",c.PROP_STRING],["validationmessage",c.PROP_STRING],["widget-type",c.PROP_STRING],["width",c.PROP_STRING]]))}constructor(e,t,i,n,a,s,o){super(e,Y,o),this.appDefaults=t,this.table=i,this.group=n,this.bindfilterdataset=a,this.binddataset=s,this.syncValidators=[],this.asyncValidators=[],this.observeOnFields=[],this.aggregate={sum:()=>h.sum(this._getColumnData()),average:(e=2)=>h.round(h.mean(this._getColumnData()),e),count:()=>this._getColumnData().length,minimum:()=>h.min(this._getColumnData()),maximum:()=>h.max(this._getColumnData()),percent:(e,t=2)=>h.round(h.sum(this._getColumnData())/e*100,t)},this.notifyForFields=[]}get dataoptions(){return this._dataoptions}set dataoptions(e){this._dataoptions=e}get datasource(){return this._datasource}set datasource(e){this._datasource=e}ngOnInit(){super.ngOnInit(),this.populateFieldDef();const e=parseInt(this.getAttr("index"),10),t=parseInt(this.getAttr("headerIndex"),10),i=this.group&&this.group.name;if(c.setHeaderConfigForTable(this.table.headerConfig,{field:this.field,displayName:this.displayName},i,i?e:t),this.table.registerColumns(this.widget,e),this._isRowFilter="multicolumn"===this.table.filtermode&&this.searchable,this._isInlineEditable=!this.readonly&&this.table.editmode!==c.EDIT_MODE.DIALOG&&this.table.editmode!==c.EDIT_MODE.FORM,this._isNewEditableRow=this._isInlineEditable&&this.table.editmode===c.EDIT_MODE.QUICK_EDIT&&this.table.shownewrow,this.setUpControls(),this._propsInitialized=!0,this.getFormControl()){const e=this.getFormControl().statusChanges.pipe(m.debounceTime(100)).subscribe(e=>this.onStatusChange(e,"inlineInstance"));this.registerDestroyListener(()=>e.unsubscribe()),this.fieldValidations=new c.BaseFieldValidations(this,this.inlineInstance,this.editWidgetType,this.getFormControl(),this.table,"inlineInstance")}if(this._checkNewEditableRowControl()){const e=this.getFormControl("_new").statusChanges.pipe(m.debounceTime(100)).subscribe(e=>this.onStatusChange(e,"inlineInstanceNew"));this.registerDestroyListener(()=>e.unsubscribe()),this.fieldValidations_new=new c.BaseFieldValidations(this,this.inlineInstanceNew,this.editWidgetType,this.getFormControl("_new"),this.table,"inlineInstanceNew")}}ngAfterContentInit(){if(this._isRowFilter){const e=this._filterInstances.changes.subscribe(e=>{this.filterInstance=e.first&&e.first.widget,this.setUpFilterWidget()});this.registerDestroyListener(()=>e.unsubscribe())}if(this._isInlineEditable){const e=this._inlineInstances.changes.subscribe(e=>{this.inlineInstance=e.first&&e.first.widget,this.fieldValidations.formwidget=e.first,this.table.registerFormField(this.binding,new K(this.inlineInstance)),this.setUpInlineWidget("inlineInstance")});if(this.registerDestroyListener(()=>e.unsubscribe()),this._isNewEditableRow){const e=this._inlineInstancesNew.changes.subscribe(e=>{this.inlineInstanceNew=e.first&&e.first.widget,this.fieldValidations_new.formwidget=e.first,this.setUpInlineWidget("inlineInstanceNew")});this.registerDestroyListener(()=>e.unsubscribe())}}this.registerReadyStateListener(()=>{this.key=this.field||this.binding}),super.ngAfterContentInit(),this.table.isdynamictable&&this.table.inlineWidgetTmpl._results.push(this.inlineWidthTempRef)}ngAfterViewInit(){this.filterTemplateRef&&this.table.renderDynamicFilterColumn(this.filterTemplateRef)}applyValidations(){this.getFormControl()&&(this.syncValidators.length>0&&this.fieldValidations.setValidators(this.syncValidators),this.fieldValidations.setUpValidators(),this.asyncValidators.length>0&&this.fieldValidations.setAsyncValidators(this.asyncValidators),this.observeOnFields.length>0&&this.fieldValidations.observeOn(this.observeOnFields,"columns"))}removeValidations(){if(this.isDestroyed||!this.table||!this.table.ngform)return;this.table.ngform.markAsUntouched();const e=this.getFormControl();e&&(e.clearValidators(),e.clearAsyncValidators(),e.updateValueAndValidity())}applyNewRowValidations(){!this.isDestroyed&&this.table&&this.table.ngform&&this._checkNewEditableRowControl()&&(this.syncValidators.length>0&&this.fieldValidations_new.setValidators(this.syncValidators),this.fieldValidations_new.setUpValidators(),this.asyncValidators.length>0&&this.fieldValidations_new.setAsyncValidators(this.asyncValidators),this.observeOnFields.length>0&&this.fieldValidations_new.observeOn(this.observeOnFields,"columns"))}removeNewRowValidations(){if(this.isDestroyed||!this.table||!this.table.ngform)return;if(this.table.ngform.markAsUntouched(),!this._checkNewEditableRowControl())return;const e=this.getFormControl("_new");e&&(e.clearValidators(),e.clearAsyncValidators(),e.updateValueAndValidity())}addFormControl(e){if(this.isDestroyed||!this.table||!this.table.ngform)return;const t=e?this.binding+e:this.binding;this.table.ngform.addControl(t,this.table.fb.control(""))}getFormControl(e){if(this.isDestroyed||!this.table||!this.table.ngform)return null;const t=e?this.binding+e:this.binding;return this.table.ngform.controls[t]||null}_checkNewEditableRowControl(){return this._isNewEditableRow&&this.getFormControl("_new")}setUpControls(){if(this._isInlineEditable){if(this.editWidgetType===r.FormWidgetType.UPLOAD)return;this.addFormControl();const e=this.getFormControl();if(e){const t=e.valueChanges.pipe(m.debounceTime(200)).subscribe(e=>this.onValueChange(e,"inlineInstance"));this.registerDestroyListener(()=>t.unsubscribe())}if(this._isNewEditableRow){this.addFormControl("_new");const e=this.getFormControl("_new");if(e){const t=e.valueChanges.pipe(m.debounceTime(200)).subscribe(e=>this.onValueChange(e,"inlineInstanceNew"));this.registerDestroyListener(()=>t.unsubscribe())}}}if(this._isRowFilter&&(this.addFormControl("_filter"),this.filterControl=this.getFormControl("_filter"),this.filterControl)){const e=this.filterControl.valueChanges.subscribe(this.onFilterValueChange.bind(this));this.registerDestroyListener(()=>e.unsubscribe())}}resetFilter(){this.filterControl&&this.filterControl.setValue(""),this.filterwidget===r.FormWidgetType.AUTOCOMPLETE&&(this.filterInstance.query="",this.filterInstance.queryModel="")}onFilterValueChange(e){this.table.rowFilter[this.field].value=e,!this.isDestroyed&&this.table&&this.table.datasource&&null!=e&&c.applyFilterOnField(this.table.datasource,this.widget,this.table.fieldDefs,e,{widget:"filterwidget"})}get datavalue(){return this[this.activeControlType]&&this[this.activeControlType].datavalue}set datavalue(e){const t=this.getFormControl("inlineInstanceNew"===this.activeControlType?"_new":void 0);t&&t&&this.editWidgetType!==r.FormWidgetType.UPLOAD&&t.setValue(e)}get value(){return this.datavalue}set value(e){this.datavalue=e}onValueChange(e,t){!this.isDestroyed&&this.table&&(null!==e&&c.applyFilterOnField(this.table.datasource,this.widget,this.table.fieldDefs,e,{widget:"edit-widget-type"}),this.table.ngform&&this.table.ngform.touched&&(this.activeControlType=t,"inlineInstance"===t?(this.notifyChanges(),this.fieldValidations.setCustomValidationMessage()):this._isNewEditableRow&&(this.notifyChanges("_new"),this.fieldValidations_new.setCustomValidationMessage())))}loadFilterData(){this._isRowFilter&&c.isDataSetWidget(this.filterwidget)&&!this.bindfilterdataset&&(this.table.datasource.execute(r.DataSource.Operation.SUPPORTS_DISTINCT_API)?(this.relatedEntityName&&(this.widget["is-related"]=!0,this.widget["lookup-type"]=this.relatedEntityName,this.widget["lookup-field"]=h.last(h.split(this.field,"."))),this.filterwidget===r.FormWidgetType.AUTOCOMPLETE?this.filterInstance&&(this.filterInstance.dataoptions=c.getDistinctFieldProperties(this.table.datasource,this),this.filterInstance.datasource=this.table.datasource):c.getDistinctValues(this.table.datasource,this.widget,"filterwidget").then(e=>{this._filterDataSet=e.data,this.setFilterWidgetDataSet()})):this.registerDestroyListener(r.$watch(this.table.binddataset,this.viewParent,{},e=>this.widget.filterdataset=e,c.getWatchIdentifier(this.widgetId,"filterdataset"))))}loadInlineWidgetData(){if(c.isDataSetWidget(this["edit-widget-type"])&&!this.binddataset&&!this.readonly){const e=this.table.datasource;if(this["related-entity-name"]&&this["primary-key"]){this.isDataSetBound=!0;const t=h.split(this.binding,".");this.showPendingSpinner=!0,c.fetchRelatedFieldData(e,this.widget,{relatedField:h.head(t),datafield:h.last(t),widget:"edit-widget-type"})}else e.execute(r.DataSource.Operation.SUPPORTS_DISTINCT_API)&&c.getDistinctValuesForField(e,this.widget,{widget:"edit-widget-type"})}}onDataSourceChange(){this.loadFilterData(),this.table.editmode===c.EDIT_MODE.QUICK_EDIT&&this.loadInlineWidgetData()}setFilterWidgetDataSet(){this.filterInstance&&(this.filterInstance.dataset=this._filterDataSet)}setUpFilterWidget(){this.filterInstance.registerReadyStateListener(()=>{if(c.isDataSetWidget(this.filterwidget)){const e=h.last(this.binding.split("."));this.filterInstance.dataset=this._filterDataSet,this.filterInstance.datafield=this.filterdatafield||e,this.filterInstance.displayfield=this.filterdisplayfield||e,this.filterwidget===r.FormWidgetType.AUTOCOMPLETE&&(this.filterInstance.displaylabel=this.filterdisplaylabel||e,this.filterInstance.searchkey=this.filtersearchkey||e)}this.filterwidget===r.FormWidgetType.TIME&&(this.filterInstance.timepattern=this.appDefaults.timeFormat||"hh:mm:ss a"),this.filterInstance.placeholder=this.filterplaceholder||""})}notifyChanges(e){h.forEach(this.notifyForFields,t=>{e&&this._isNewEditableRow?t.fieldValidations_new.validate():t.fieldValidations.validate()})}observeOn(e){this.observeOnFields=h.cloneDeep(e)}setUpValidators(){this.fieldValidations.setUpValidators(),this._checkNewEditableRowControl()&&this.fieldValidations_new.setUpValidators()}setAsyncValidators(e){this.asyncValidators=h.cloneDeep(e)}setValidators(e){this.syncValidators=h.cloneDeep(e)}boundFn(e){return e()}onStatusChange(e,t){this["showPendingSpinner"+("inlineInstance"===t?"":"New")]="PENDING"===e}setSummaryRowData(e){const t=e instanceof Array?e:[e];this._invokeSummaryRowData(t)}_invokeSummaryRowData(e){h.forEach(e,(e,t)=>{const i=e;if(i instanceof Promise)i.then(e=>{this.table.callDataGridMethod("setSummaryRowDef",this.key,e,t,!0)});else if(i.value&&i.value instanceof Promise){const e=i;i.value.then(i=>{e.value=i,this.table.callDataGridMethod("setSummaryRowDef",this.key,e,t,!0)})}this.table.callDataGridMethod("setSummaryRowDef",this.key,i,t)})}_getColumnData(){return h.map(this.table.dataset,this.binding)}setInlineWidgetProp(e,t,i){"datepattern"===t&&this.editWidgetType===r.FormWidgetType.TIME&&(t="timepattern"),this[e]&&r.isDefined(i)&&(this[e][t]=i)}setUpInlineWidget(e){this[e].registerReadyStateListener(()=>{c.isDataSetWidget(this["edit-widget-type"])&&(this[e].dataset=this.dataset),X.forEach(t=>{this.setInlineWidgetProp(e,t,this[t])}),this[e].datasource=this._datasource,this[e].dataoptions=this._dataoptions,this.setInlineWidgetProp(e,"datepattern",this.editdatepattern)})}getStyleDef(){return`width: ${this.width||""}; background-color: ${this.backgroundcolor||""}; color: ${this.textcolor||""};`}populateFieldDef(){if(this.width="px"===this.width?"":this.width||"",this.field=this.binding,this.displayName=this.caption||"",this.pcDisplay=this.pcdisplay,this.mobileDisplay=this.mobiledisplay,this.tabletDisplay=this.tabletdisplay,this.textAlignment=this.textalignment,this.backgroundColor=this.backgroundcolor,this.textColor=this.textcolor,this.primaryKey=this["primary-key"],this.relatedEntityName=this["related-entity-name"],this.style=this.getStyleDef(),this.class=this["col-class"],this.ngclass=this["col-ng-class"],this.formatpattern="toNumber"===this.formatpattern?"numberToString":this.formatpattern,this.searchable="blob"!==this.type&&"clob"!==this.type&&this.searchable,this.showinfilter=!this.nativeElement.hasAttribute("showinfilter")||this.table&&this.table.isdynamictable?this.show:this.nativeElement.getAttribute("showinfilter"),this.limit=this.limit?+this.limit:void 0,this.editWidgetType=this["edit-widget-type"]=this["edit-widget-type"]||c.getEditModeWidget(this),this.filterOn=this["filter-on"],this.readonly=r.isDefined(this.getAttr("readonly"))?"true"===this.getAttr("readonly"):this["related-entity-name"]?!this["primary-key"]:h.includes(["identity","uniqueid","sequence"],this.generator),this.filterwidget=this.filterwidget||c.getDataTableFilterWidget(this.type||"string"),this.isFilterDataSetBound=!!this.bindfilterdataset,this.defaultvalue=c.getDefaultValue(this.defaultvalue,this.type,this.editWidgetType),this.caseinsensitive=!!this.getAttr("caseinsensitive"),this.sortby=this.sortby||this.getAttr("sortby")||"",r.isDateTimeType(this.type)&&"toDate"===this.formatpattern&&!this.datepattern){const e=r.getDisplayDateTimeFormat(this.type);this.type===r.DataType.DATE?this.datepattern=this.appDefaults.dateFormat||e:this.type===r.DataType.TIME?this.datepattern=this.appDefaults.timeFormat||e:this.type!==r.DataType.TIMESTAMP&&this.type!==r.DataType.DATETIME||(this.datepattern=this.appDefaults.dateTimeFormat||e)}}onPropertyChange(e,t,i){if(this._propsInitialized){switch(e){case"caption":this.displayName=t||"",this.setProperty("displayName",this.displayName);const i=this.group&&this.group.name,n=i?parseInt(this.getAttr("index"),10):parseInt(this.getAttr("headerIndex"),10);this.table.headerConfig.some(e=>this.field==e.field)?this.table.headerConfig.map(e=>{this.field==e.field&&(e.displayName=this.displayName)}):c.setHeaderConfigForTable(this.table.headerConfig,{field:this.field,displayName:this.displayName},i,n);break;case"defaultvalue":this.defaultvalue=c.getDefaultValue(this.defaultvalue,this.type,this.editWidgetType);break;case"show":this.table.redraw(!1),this.showinfilter=this.nativeElement.hasAttribute("showinfilter")?this.nativeElement.getAttribute("showinfilter"):t;break;case"filterdataset":this._filterDataSet=t,this.setFilterWidgetDataSet();break;case"editdatepattern":this.setInlineWidgetProp("inlineInstance","datepattern",t),this.setInlineWidgetProp("inlineInstanceNew","datepattern",t);break;case"showinfilter":this.showinfilter=t;break;case"sortable":this.table&&this.table.callDataGridMethod("refreshSortHeader");break;default:X.includes(e)&&(this.setInlineWidgetProp("inlineInstance",e,t),this.setInlineWidgetProp("inlineInstanceNew",e,t))}super.onPropertyChange(e,t,i)}}setProperty(e,t){if(this[e]=t,"displayName"===e)this.table.callDataGridMethod("setColumnProp",this.field,e,t);else this.table.redraw(!0)}ngOnDestroy(){if(this._filterInstances)try{this._filterInstances.reset([])}catch(e){}if(this._inlineInstances)try{this._inlineInstances.reset([])}catch(e){}if(this._inlineInstancesNew)try{this._inlineInstancesNew.reset([])}catch(e){}if(this.filterInstance=null,this.inlineInstance=null,this.inlineInstanceNew=null,this.customExprTmpl=null,this.inlineWidthTempRef=null,this.filterTemplateRef=null,this._filterDataSet=null,this.dataset=null,this._dataoptions=null,this._datasource=null,this.fieldValidations){try{this.fieldValidations.destroy()}catch(e){}this.fieldValidations=null}if(this.fieldValidations_new){try{this.fieldValidations_new.destroy()}catch(e){}this.fieldValidations_new=null}this.syncValidators=[],this.asyncValidators=[],this.filterControl=null,this.notifyForFields&&(this.notifyForFields=[]),this.observeOnFields&&(this.observeOnFields=[]),this.table=null,this.group=null,super.ngOnDestroy()}static{this.\u0275fac=b.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:b,type:Q,deps:[{token:b.Injector},{token:w.AppDefaults},{token:_,optional:!0},{token:H,optional:!0},{token:"filterdataset.bind",attribute:!0},{token:"dataset.bind",attribute:!0},{token:"EXPLICIT_CONTEXT",optional:!0}],target:b.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=b.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:Q,isStandalone:!0,selector:"[wmTableColumn]",providers:[c.provideAsWidgetRef(Q)],queries:[{propertyName:"customExprTmpl",first:!0,predicate:["customExprTmpl"],descendants:!0},{propertyName:"inlineWidthTempRef",first:!0,predicate:["inlineWidgetTmpl"],descendants:!0},{propertyName:"filterTemplateRef",first:!0,predicate:["filterTmpl"],descendants:!0},{propertyName:"_filterInstances",predicate:["filterWidget"],descendants:!0},{propertyName:"_inlineInstances",predicate:["inlineWidget"],descendants:!0},{propertyName:"_inlineInstancesNew",predicate:["inlineWidgetNew"],descendants:!0}],usesInheritance:!0,ngImport:b})}}b.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:b,type:Q,decorators:[{type:s.Directive,args:[{standalone:!0,selector:"[wmTableColumn]",providers:[c.provideAsWidgetRef(Q)]}]}],ctorParameters:()=>[{type:b.Injector},{type:w.AppDefaults},{type:_,decorators:[{type:s.Optional}]},{type:H,decorators:[{type:s.Optional}]},{type:void 0,decorators:[{type:s.Attribute,args:["filterdataset.bind"]}]},{type:void 0,decorators:[{type:s.Attribute,args:["dataset.bind"]}]},{type:void 0,decorators:[{type:s.Inject,args:["EXPLICIT_CONTEXT"]},{type:s.Optional}]}],propDecorators:{_filterInstances:[{type:s.ContentChildren,args:["filterWidget",{descendants:!0}]}],_inlineInstances:[{type:s.ContentChildren,args:["inlineWidget",{descendants:!0}]}],_inlineInstancesNew:[{type:s.ContentChildren,args:["inlineWidgetNew",{descendants:!0}]}],customExprTmpl:[{type:s.ContentChild,args:["customExprTmpl"]}],inlineWidthTempRef:[{type:s.ContentChild,args:["inlineWidgetTmpl"]}],filterTemplateRef:[{type:s.ContentChild,args:["filterTmpl"]}]}});const Z={widgetType:"wm-table-row",hostClass:""};class J extends c.BaseComponent{static{this.initializeProps=void c.register("wm-table-row",new Map([["class",c.PROP_STRING],["closeothers",{value:!0,...c.PROP_BOOLEAN}],["content",c.PROP_STRING],["columnwidth",{value:"50px",...c.PROP_STRING}],["collapseicon",c.PROP_STRING],["collapsetitle",c.PROP_STRING],["expandtitle",c.PROP_STRING],["expandicon",c.PROP_STRING],["height",c.PROP_STRING],["position",{value:"0",...c.PROP_STRING}]]))}constructor(e,t,i){super(e,Z,i),this.table=t}populateConfig(){this.config={closeothers:this.closeothers,content:this.content,columnwidth:this.columnwidth,expandicon:this.expandicon,expandtitle:this.expandtitle,collapsetitle:this.collapsetitle,collapseicon:this.collapseicon,height:this.height,position:this.position}}ngOnInit(){super.ngOnInit(),this.populateConfig(),this.table.registerRow(this.config,this)}onPropertyChange(e,t){"content"===e&&this.config&&(this.config.content=this.content)}ngOnDestroy(){this.table=null,this.config=null,super.ngOnDestroy()}static{this.\u0275fac=b.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:b,type:J,deps:[{token:b.Injector},{token:_,optional:!0,skipSelf:!0},{token:"EXPLICIT_CONTEXT",optional:!0}],target:b.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=b.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:J,isStandalone:!0,selector:"[wmTableRow]",providers:[c.provideAsWidgetRef(J)],usesInheritance:!0,ngImport:b})}}b.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:b,type:J,decorators:[{type:s.Directive,args:[{standalone:!0,selector:"[wmTableRow]",providers:[c.provideAsWidgetRef(J)]}]}],ctorParameters:()=>[{type:b.Injector},{type:_,decorators:[{type:s.Optional},{type:s.SkipSelf}]},{type:void 0,decorators:[{type:s.Inject,args:["EXPLICIT_CONTEXT"]},{type:s.Optional}]}]});const ee={widgetType:"wm-table-row-action",hostClass:""};class te extends c.BaseComponent{static{this.initializeProps=void c.register("wm-table-row-action",new Map([["accessroles",c.PROP_STRING],["action",c.PROP_STRING],["caption",c.PROP_STRING],["class ",{value:"btn-secondary",...c.PROP_STRING}],["disabled",{value:!1,...c.PROP_BOOLEAN}],["display-name",c.PROP_STRING],["hyperlink",c.PROP_STRING],["iconclass",c.PROP_STRING],["key",c.PROP_STRING],["show",{value:!0,...c.PROP_BOOLEAN}],["tabindex",{value:0,...c.PROP_NUMBER}],["target",c.PROP_STRING],["title",c.PROP_STRING],["widget-type",{value:"button",...c.PROP_STRING}]]))}constructor(e,t,i,n){super(e,ee,n),this.table=t,i[0].editRow=e=>this.table.editRow(e),i[0].deleteRow=e=>this.table.deleteRow(e),i[0].addNewRow=e=>this.table.addNewRow(e)}getTitle(){return h.isUndefined(this.title)?this["display-name"]||"":this.title}populateAction(){this.buttonDef={key:this.key,displayName:this["display-name"]||this.caption||"",show:this.show,class:this.class||"",iconclass:this.iconclass||"",title:this.getTitle(),action:this.action,accessroles:this.accessroles,disabled:this.disabled,tabindex:this.tabindex?+this.tabindex:void 0,widgetType:this["widget-type"]||"button",hyperlink:this.hyperlink,target:this.target||"",conditionalclass:this.conditionalclass||"",conditionalstyle:this.conditionalstyle||{}}}ngOnInit(){super.ngOnInit(),this.populateAction(),this.table.registerRowActions(this.buttonDef)}ngOnDestroy(){this.table=null,this.buttonDef=null,super.ngOnDestroy()}static{this.\u0275fac=b.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:b,type:te,deps:[{token:b.Injector},{token:_,optional:!0},{token:c.Context,self:!0},{token:"EXPLICIT_CONTEXT",optional:!0}],target:b.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=b.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:te,isStandalone:!0,selector:"[wmTableRowAction]",providers:[c.provideAsWidgetRef(te),{provide:c.Context,useFactory:()=>({}),multi:!0}],usesInheritance:!0,ngImport:b})}}b.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:b,type:te,decorators:[{type:s.Directive,args:[{standalone:!0,selector:"[wmTableRowAction]",providers:[c.provideAsWidgetRef(te),{provide:c.Context,useFactory:()=>({}),multi:!0}]}]}],ctorParameters:()=>[{type:b.Injector},{type:_,decorators:[{type:s.Optional}]},{type:Array,decorators:[{type:s.Self},{type:s.Inject,args:[c.Context]}]},{type:void 0,decorators:[{type:s.Inject,args:["EXPLICIT_CONTEXT"]},{type:s.Optional}]}]}),e.TableActionDirective=z,e.TableCUDDirective=N,e.TableColumnDirective=Q,e.TableColumnGroupDirective=H,e.TableComponent=_,e.TableFilterSortDirective=W,e.TableRowActionDirective=te,e.TableRowDirective=J}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("rxjs/operators"),require("@wm/core"),require("@wm/components/base"),require("@wm/components/data/table")):"function"==typeof define&&define.amd?define(["exports","@angular/core","rxjs/operators","@wm/core","@wm/components/base","@wm/components/data/table"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.data=e.wm.components.data||{},e.wm.components.data.livetable={}),e.ng.core,e.rxjs.operators,e.wm.core,e.wm.components.base,e.wm.components.data.table)}(this,function(e,t,i,n,a,s){"use strict";function o(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var r=o(t),l=o(n);const c={widgetType:"wm-livetable",hostClass:"app-livegrid"};class d extends a.StylableComponent{static{this.initializeProps=void a.register("wm-livetable",new Map([["class",a.PROP_STRING],["formlayout",a.PROP_STRING],["name",a.PROP_STRING],["show",{value:!0,...a.PROP_BOOLEAN}]]))}constructor(e,t,i,n,s,o,r,l){super(e,c,l),this.dialogService=n,this.app=s,this.$queue=[],this.tableOptions={multiselect:!1,setGridEditMode:""},a.styler(this.nativeElement,this),"dialog"===o&&(this.isLayoutDialog=!0,this.dialogId=r)}ngAfterContentInit(){if(super.ngAfterContentInit(),this.table){this.table._liveTableParent=this;const e=()=>{"function"==typeof this.table.datagridElement.datatable&&this.table.datagridElement.datatable("instance")?(this.table.datagridElement.datatable("option",this.tableOptions),this.selectedItemChangeSubscription=this.table.selectedItemChange$.pipe(i.debounceTime(250)).subscribe(this.onSelectedItemChange.bind(this)),this.isLayoutDialog||this.form||this.table.datagridElement.datatable("option",{beforeRowUpdate:()=>{this.showErrorMessage()},beforeRowDelete:()=>{this.showErrorMessage()},beforeRowInsert:()=>{this.showErrorMessage()}})):setTimeout(e,50)};setTimeout(e,0)}}openDialog(){this.dialogService.open(this.dialogId,this.viewParent),n.$appDigest()}closeDialog(){this.dialogService.close(this.dialogId,this.viewParent)}focusFirstInput(){const e=$(this.form.$element).find("input").first();e.focus(),e.select()}onDialogOpen(e){const t=this?.form?.formFields?.[0]?.$attrs??new Map,i=["defaultvalue","defaultvalue.bind"].some(e=>t.has(e));if("update"==e||i){1!=$("form [wmformfield]").first().find("div[widget='autocomplete']").length&&"autocomplete"!=this?.form?.formFields?.[0]?.widgettype&&this.focusFirstInput()}else this.focusFirstInput()}setFormData(e){this.form.isDestroyed||(this.form.getWidget().formdata=e)}_addNewRow(){this.form.isSelected=!0,this.setFormData(""),this.form.new(),this.isLayoutDialog&&this.onDialogOpen("add")}addNewRow(){if(this.isLayoutDialog)return this.openDialog(),void this.$queue.push(this._addNewRow.bind(this));this._addNewRow()}_updateRow(e,t){this.setFormData(e),this.form.isSelected=!0,this.form.edit(),this.isLayoutDialog&&(this.form.isUpdateMode="dblclick"!==t||this.form.updateMode,this.onDialogOpen("update"))}updateRow(e,t){if(this.isLayoutDialog)return this.openDialog(),void this.$queue.push(this._updateRow.bind(this,e,t));this._updateRow(e,t)}onSelectedItemChange(e){let t;this.form&&this.table&&(e&&e.length>0&&!this.form.isSelected&&(this.form.isSelected=!0),e&&e.length>0?(t=this.table.multiselect?e[0]:e[e.length-1],this.setFormData(n.getClonedObject(t)),this.form.isUpdateMode&&this.form.edit()):(this.form.isSelected=!1,this.setFormData(""),this.form.clearData()))}onCancel(){this.form.isUpdateMode=!1,this.isLayoutDialog&&this.closeDialog()}onResult(e,t,i,a){switch(this.form.isUpdateMode=n.isDefined(a)?a:!!i,e){case"insert":this.table.gridOptions.isNavTypeScrollOrOndemand()&&(this.table.isNewRowInserted=!0),i?(this.table.gridfirstrowselect=!1,this.table.initiateSelectItem(this.table.getNavigationTargetBySortInfo(),t,!0)):this.table.initiateSelectItem(this.table.getNavigationTargetBySortInfo(),t);break;case"update":i?(this.table.gridfirstrowselect=!1,this.table.initiateSelectItem("current",t,!0)):this.table.initiateSelectItem("current",t);break;case"delete":this.table.onRecordDelete()}this.table.updateVariable(),this.isLayoutDialog&&(i?"insert"===e?this.form.new():"update"===e&&this.form.edit():this.closeDialog())}showErrorMessage(){this.app.notifyApp(this.appLocale.LABEL_ACCESS_DENIED,"error")}onFormReady(e){this.form=e,setTimeout(()=>{n.triggerFn(this.$queue.pop())})}ngOnDestroy(){this.selectedItemChangeSubscription&&(this.selectedItemChangeSubscription.unsubscribe(),this.selectedItemChangeSubscription=null),this.table=null,this.$queue=[],super.ngOnDestroy()}static{this.\u0275fac=r.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:r,type:d,deps:[{token:r.Injector},{token:r.ElementRef},{token:r.ChangeDetectorRef},{token:l.AbstractDialogService},{token:l.App},{token:"formlayout",attribute:!0},{token:"dialogid",attribute:!0},{token:"EXPLICIT_CONTEXT",optional:!0}],target:r.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=r.\u0275\u0275ngDeclareComponent({minVersion:"14.0.0",version:"20.3.19",type:d,isStandalone:!0,selector:"[wmLiveTable]",providers:[a.provideAsWidgetRef(d)],queries:[{propertyName:"table",first:!0,predicate:s.TableComponent,descendants:!0}],usesInheritance:!0,ngImport:r,template:"<ng-content></ng-content>"})}}r.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:r,type:d,decorators:[{type:t.Component,args:[{standalone:!0,selector:"[wmLiveTable]",providers:[a.provideAsWidgetRef(d)],template:"<ng-content></ng-content>"}]}],ctorParameters:()=>[{type:r.Injector},{type:r.ElementRef},{type:r.ChangeDetectorRef},{type:l.AbstractDialogService},{type:l.App},{type:void 0,decorators:[{type:t.Attribute,args:["formlayout"]}]},{type:void 0,decorators:[{type:t.Attribute,args:["dialogid"]}]},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}],propDecorators:{table:[{type:t.ContentChild,args:[s.TableComponent]}]}}),e.LiveTableComponent=d}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common"),require("@wm/components/basic/anchor"),require("@wm/components/input/button"),require("@angular/core"),require("@angular/forms"),require("@wm/core"),require("@wm/components/base"),require("@wm/components/prefab"),require("@wm/components/data/list"),require("lodash-es"),require("@wm/components/data/table"),require("rxjs/operators"),require("@wm/components/data/live-table")):"function"==typeof define&&define.amd?define(["exports","@angular/common","@wm/components/basic/anchor","@wm/components/input/button","@angular/core","@angular/forms","@wm/core","@wm/components/base","@wm/components/prefab","@wm/components/data/list","lodash-es","@wm/components/data/table","rxjs/operators","@wm/components/data/live-table"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.data=e.wm.components.data||{},e.wm.components.data.form={}),e.ng.common,e.wm.components.basic.anchor,e.wm.components.input.button,e.ng.core,e.ng.forms,e.wm.core,e.wm.components.base,e.wm.components.prefab,e.wm.components.data.list,e._,e.wm.components.data.table,e.rxjs.operators,e.wm.components.data.livetable)}(this,function(e,t,i,n,a,s,o,r,l,c,d,p,m,h){"use strict";function u(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var g=u(t),v=u(a),f=u(s),b=u(o),y=u(r),w=u(l),P=u(c),C=u(h);const T=new Map([["autocomplete",{value:!1,...r.PROP_BOOLEAN}],["captionalign",{value:"left",...r.PROP_STRING}],["captionposition",{value:"left",...r.PROP_STRING}],["captionsize",r.PROP_STRING],["captionwidth",{value:"xs-12 sm-3 md-3 lg-3",...r.PROP_STRING}],["class",r.PROP_STRING],["collapsible",r.PROP_BOOLEAN],["dataset",r.PROP_ANY],["datasource",r.PROP_STRING],["expanded",{value:!0,...r.PROP_BOOLEAN}],["formdatasource",r.PROP_STRING],["name",r.PROP_STRING],["numberOfFields",r.PROP_NUMBER],["show",{value:!0,...r.PROP_BOOLEAN}],["showindevice",{displayType:"inline-block",value:"all",...r.PROP_STRING}],["subheading",r.PROP_STRING],["tabindex",{value:0,...r.PROP_NUMBER}],["title",r.PROP_STRING],["itemsperrow",r.PROP_STRING]]),O={widgetType:"wm-form",hostClass:"panel app-panel app-form"},I={widgetType:"wm-form",hostClass:"app-form app-login-form"},D={widgetType:"wm-liveform",hostClass:"panel app-panel app-liveform liveform-inline"},E={widgetType:"wm-livefilter",hostClass:"panel app-panel app-livefilter clearfix liveform-inline"},R=(e,t)=>{let i="";return d.forEach(e,(e,t)=>{i=`${i} ${t}="${e}"`}),`<wm-gridcolumn columnwidth="${t}">\n <wm-form-field ${i}></wm-form-field>\n </wm-gridcolumn>`},S=(e,t)=>{const i=e.find("form.ng-invalid:visible, [formControlName].ng-invalid:visible").first();let n=t;return i.is("form")&&(n=t&&t.controls[i.attr("formControlName")||i.attr("name")],n)?S(i,n):{ngForm:n,$ele:i}},_=(e,t,i)=>{if(!t.valid)if(t.controls)d.forEach(t.controls,(t,i)=>{_(e,t,i)});else{let n=e.$element.find(`[wmformfield][key="${i}"]`);n.length||(n=e.$element.find(`[wmformfield][name="${i}"]`)),n[0].setAttribute("__errormsg",n[0].getAttribute("__validationId"));const a=(e=>{switch(e.getAttribute("widgettype")){case"select":return e.querySelector("select");case"textarea":return e.querySelector("textarea");default:return e.querySelector("input")}})(n[0]);a?.setAttribute("aria-invalid",t.invalid),a?.setAttribute("aria-describedby",n[0].getAttribute("__validationId")),t.markAsTouched()}};class x extends r.StylableComponent{static{this.initializeProps=(()=>{const e=new Map(T);e.set("action",r.PROP_STRING),e.set("defaultmode",{value:"Edit",...r.PROP_STRING}),e.set("metadata",r.PROP_STRING),e.set("method",r.PROP_STRING),e.set("postmessage",{value:"Data posted successfully",...r.PROP_STRING}),e.set("target",r.PROP_STRING),e.set("enctype",r.PROP_STRING),e.set("errormessage",{value:"An error occured. Please try again!",...r.PROP_STRING}),e.set("messagelayout",{value:"Inline",...r.PROP_STRING}),e.set("formdata",r.PROP_STRING),e.set("novalidate",r.PROP_BOOLEAN),e.set("validationtype",{value:"default",...r.PROP_STRING}),e.set("iconclass",r.PROP_STRING),e.set("readonly",{value:!1,...r.PROP_BOOLEAN}),r.register("wm-form",e)})()}set isLayoutDialog(e){e&&o.removeClass(this.nativeElement,"panel app-panel liveform-inline"),this._isLayoutDialog=e}get isLayoutDialog(){return this._isLayoutDialog}set isUpdateMode(e){this._isUpdateMode=e,this.formFields.forEach(t=>{t.setReadOnlyState(e)})}get isUpdateMode(){return this._isUpdateMode}submit(e){this._debouncedSubmitForm(e)}onReset(){this.reset()}onKeydownHandler(e){this._triggeredByUser=!0}get parentFormArray(){return this.parentForm&&this.isParentList&&this.parentForm.ngform.get(this.parentList.name)}get isParentList(){if(this.parentList&&this.parentForm&&!o.isDefined(this._formIsInList)){const e=this.$element.closest('.app-livelist[name="'+this.parentList.name+'"]');e.length&&(this._formIsInList=!e.find('form[widget-id="'+this.parentForm.widgetId+'"]').length)}return o.isDefined(this._formIsInList)?this._formIsInList:this.parentList}constructor(e,t,i,n,a,s,l,c,p,m,h,u,g,v,f,b,y,w,P,C,T,R){super(e,((e,t,i)=>{let n=O;return null!==e?n=D:null!==t?n=E:"app-login"===i&&(n=I),n})(y,w,P),R),this.envInjector=t,this.fb=i,this.app=n,this.dialogService=a,this.dynamicComponentProvider=s,this.ngZone=l,this.parentList=c,this.parentForm=p,this.parentPrefab=m,this.parentPartial=h,this.onBeforeSubmitEvt=u,this.onSubmitEvt=g,this.onBeforeRenderEvt=v,this.binddataset=f,this.bindformdata=b,this._widgetClass="",this._captionClass="",this.formFields=[],this.formfields={},this.formWidgets={},this.filterWidgets={},this.buttonArray=[],this.dataoutput={},this.formdata={},this.statusMessage={caption:"",type:""},this.primaryKey=[],this._debouncedUpdateFieldSource=d.debounce(this.updateFieldSource,350),this.validationMessages=[],this._debouncedSubmitForm=o.debounce(e=>{this.ngZone.run(()=>{this.submitForm(e)})},250),r.styler(this.nativeElement,this),o.removeAttr(this.nativeElement,"title"),this.isUpdateMode=!0,this.dialogId=this.nativeElement.getAttribute("dialogId"),this.ngform=i.group({}),this.bindingValue=C||T;const S=this.ngform.valueChanges.subscribe(this.updateDataOutput.bind(this));this.registerDestroyListener(()=>S.unsubscribe()),this.elScope=this,this.addEventsToContext(this.context)}ngAfterContentInit(){setTimeout(()=>{this.componentRefs.forEach(e=>{e.name&&(this.formWidgets[e.name]=e)})},250)}ngAfterViewInit(){this.parentForm&&this.parentForm.ngform&&this.isParentList&&(d.get(this.parentForm.ngform.controls,this.parentList.name)||this.parentForm.ngform.setControl(this.parentList.name,new s.FormArray([])),this.parentFormArray.push(this.ngform),this.formArrayIndex=this.parentFormArray.length-1),this.addInnerNgFormToForm(this.bindingValue),setTimeout(()=>{$(this.nativeElement).find('div[data-role="form-field"], div[data-role="filter-field"]').addClass(this.itemsPerRowClass)})}findOperationType(){}addInnerNgFormToForm(e){if(this.parentForm&&this.parentForm.ngform){if(this.isParentList)return;const t=this.parentPrefab||this.parentPartial;if(t){let i;i=this.parentPrefab?t.$element.find("[wmprefabcontainer]"):t.$element;const n=i.find("form").first();d.get(n[0],"widget.widgetId")===this.widgetId&&(n.isParentList||n.siblings("form").length||(e=d.get(t,"name")))}let i=1,n=e;for(;this.parentForm.ngform.controls.hasOwnProperty(n);)n=`${e}_${i}`,i++;this.formGroupName=n,this.parentForm.ngform.addControl(n,this.ngform)}}addEventsToContext(e){e.cancel=()=>this.cancel(),e.reset=()=>this.reset(),e.save=e=>this.save(e),e.saveAndNew=()=>this.saveAndNew(),e.saveAndView=()=>this.saveAndView(),e.delete=()=>this.delete(),e.new=()=>this.new(),e.edit=()=>this.edit(),e.highlightInvalidFields=()=>this.highlightInvalidFields(),e.filter=()=>this.filter(),e.clearFilter=()=>this.clearFilter(),e.submit=e=>this.submit(e)}setValidationOnInnerForms(e){const t=this.getNativeElement().querySelectorAll(".app-form");d.forEach(t,t=>{const i=t.widget;let n=d.get(i,"formGroupName")||i.name;o.isDefined(i.formArrayIndex)&&(n=n+"["+i.formArrayIndex+"]");let a=i;for(;d.get(a,"parentForm");){let e=a.parentForm.formGroupName||a.parentForm.name;a.parentForm.parentFormArray&&(e=e+"["+a.parentForm.formArrayIndex+"]"),n=e+"."+n,a=a.parentForm}this.setValidationOnFields(i,n,e)})}setValidationOnFields(e,t,i){const n=e.ngform.controls,a=e.formFields;a&&d.forEach(n,(n,s)=>{const o=a.find(e=>e.key===s);!o||i&&!n.touched||(o.nativeElement.querySelector("input")?.setAttribute("aria-invalid",n.invalid),this.prepareValidationObj(n,s,o,t),this.prepareValidationObj.call(e,n,s,o,t))})}prepareValidationObj(e,t,i,n){const a=this.validationMessages.findIndex(e=>e.field===t&&e.fullyQualifiedFormName===n);e.invalid?-1===a?this.validationMessages.push({field:t,value:i.value,errorType:d.keys(e.errors),message:i.validationmessage||"",getElement:()=>i.$element.find("[focus-target]"),formName:d.last(n.split(".")),fullyQualifiedFormName:n}):(this.validationMessages[a].value=i.value,this.validationMessages[a].errorType=d.keys(e.errors)):e.valid&&a>-1&&this.validationMessages.splice(a,1)}setValidationMsgs(e){!this.formFields.length&&d.isEmpty(this.ngform.controls)||(this.setValidationOnFields(this,this.name,e),this.setValidationOnInnerForms(e))}handleEvent(e,t,i,n){"submit"!==t&&super.handleEvent(this.nativeElement,t,i,n)}updateFieldSource(){this.formdatasource&&this.formdatasource.execute(o.DataSource.Operation.IS_API_AWARE)||this.formdatasource&&!this.formdatasource.twoWayBinding||this.formFields.forEach(e=>{e.setFormWidget("datavaluesource",this.formdatasource),e.setFormWidget("binddatavalue",`${this.bindformdata}.${e.key}`)})}highlightInvalidFields(){_(this,this.ngform,"")}validateFieldsOnSubmit(){if(this.setValidationMsgs(),"delete"!==this.operationType&&("html"===this.validationtype||"default"===this.validationtype)&&this.ngform&&this.ngform.invalid){if(this.ngform.invalid){"default"===this.validationtype&&this.highlightInvalidFields();const e=S(this.$element,this.ngform),t=e.ngForm;let i=e.$ele;i=i.parent().find("[focus-target]");const n=e?.$ele?.parent()?.find("input[type=checkbox], input[type=radio], input[type=file]")?.first();if(i.length){i.hasClass("app-search-input")||i.focus();const e=t&&t.controls[i.attr("formControlName")||i.attr("name")];return e&&e.markAsTouched&&e.markAsTouched(),o.$appDigest(),!0}return n&&n.length&&n.focus(),!0}return!1}return!1}onPropertyChange(e,t,i){switch(e){case"captionalign":this.captionAlignClass="align-"+t;break;case"captionposition":case"captionwidth":this.setLayoutConfig();break;case"captionsize":this.captionsize=t;break;case"novalidate":this.widget.validationtype=!0===t||"true"===t?"none":"default";break;case"formdata":if(d.isEqual(t,i))break;d.isArray(t)?this.setFormData(d.last(t)):this.setFormData(t),!this.isDataSourceUpdated&&this.datasource&&this.onDataSourceChange();break;case"defaultmode":this.isLayoutDialog||(this.updateMode=!(!t||"Edit"!==t),this.isUpdateMode=this.updateMode);break;case"datasource":this.onDataSourceChange();break;case"formdatasource":this.onFormDataSourceChange();break;case"metadata":this.generateFormFields();break;case"dataset":this.getFormFields().forEach(e=>{!e.isDataSetBound&&d.get(e.formWidget,"dataset$")&&e.formWidget.dataset$.next()});break;case"readonly":this.setReadonlyFields(),t?this?.buttonArray?.forEach(e=>e.disabled=!0):this.formWidgets&&Object.values(this.formWidgets).forEach(e=>{const t=e;"wm-form-action"===t.widgetType&&t.buttonDef&&(t.buttonDef.disabled=t.disabled??!1)});break;case"itemsperrow":o.setListClass(this);break;default:super.onPropertyChange(e,t,i)}}onResultCb(e,t,i){const n={$event:i,$data:e,$operation:this.operationType};this.invokeEventCallback("result",n),t?this.invokeEventCallback("success",n):this.invokeEventCallback("error",n)}toggleMessage(e,t,i,n){let a;e&&t?(a="error"===i&&this.errormessage?this.errormessage:t,"Inline"===this.messagelayout?(a=this.checkAppServiceErrorMsg(i)||a,this.statusMessage={caption:a||"",type:i},this.messageRef&&this.messageRef.showMessage(this.statusMessage.caption,this.statusMessage.type),o.isElementInViewport(this.$element[0])||o.scrollToElement(this.$element[0])):this.app.notifyApp(a,i,n)):this.statusMessage.caption=""}checkAppServiceErrorMsg(e){const t=d.get(this.app,"Actions.appNotification");if(t&&"error"===e)return t.getMessage()}clearMessage(){this.toggleMessage(!1)}setLayoutConfig(){let e;e=r.getFieldLayoutConfig(this.captionwidth,this.captionposition,d.get(this.app.selectedViewPort,"os")),this._widgetClass=e.widgetCls,this._captionClass=e.captionCls,o.$appDigest()}registerFormWidget(e){const t=e.name||e.key;this.formWidgets[t]=e}registerFormFields(e){const t=this.formFields.push(e);this.formfields[e.key]=e,this.registerFormWidget(e),this._debouncedUpdateFieldSource(),this.parentForm&&(this.parentForm.formFields.push(e),this.parentForm.formfields[e.key]=e,this.parentForm.setFormData(this.parentForm.formdata,this.formFields,this.formdata||{})),t!==this.numberOfFields||d.isEmpty(this.formdata)||(this.onDataSourceChange(),d.isArray(this.formdata)?this.setFormData(d.last(this.formdata)):this.setFormData(this.formdata))}registerActions(e){this.buttonArray.push(e)}updateFormDataOutput(e){d.forEach(this.ngform.value,(t,i)=>{d.find(this.formFields,{key:i})||(e[i]=t)}),this.dataoutput=e}constructDataObject(){const e={};return this.getFormFields().forEach(t=>{let i,n;if(n=t.datavalue||t._control.value,n=null===n||""===n?void 0:n,"file"===t.type&&(n=o.getFiles(this.name,t.key+"_formWidget",t.multiple)),i=t.key||t.target||t.name,t.form.widgetId!==this.widgetId&&t.form.formGroupName){const a=d.get(e,t.form.formGroupName,{});a[i]=n,d.set(e,t.form.formGroupName,a)}else if("number"==typeof t.form.formArrayIndex&&t.form.isParentList&&!this.parentForm){const a=d.get(e,t.form.parentList.name,[]);a[t.form.formArrayIndex]=a[t.form.formArrayIndex]||{},a[t.form.formArrayIndex][i]=n,d.set(e,t.form.parentList.name,a)}else d.set(e,i,n)}),this.updateFormDataOutput(e),this.dataoutput}updateDataOutput(){this.constructDataObject(),this.ngform.touched&&this.setValidationMsgs(!0)}getFormFields(){return d.filter(this.formFields,e=>e.form.name===this.name)}setFieldValue(e,t,i){const n=e.key||e.name,a=i||t;a&&(!i&&e.defaultvalue?e.value=e.defaultvalue:(a.hasOwnProperty(n)||d.includes(n,".")&&a.hasOwnProperty(d.split(n,".")[0]))&&(e.value=d.get(a,n)),this.dirty&&!this._triggeredByUser&&this.markAsPristine());const s=e.form.formGroupName;s&&d.get(t,s)&&this.setFormData.call(e.form,t[s]),d.get(e.form,"parentFormArray")&&this.setFormDataFromParentFormData.call(e.form,t)}setFormData(e,t,i){(t||this.formFields).forEach(t=>{this.setFieldValue(t,e,i),t.fieldValidations&&t.fieldValidations.setCustomValidationMessage()}),this.constructDataObject()}resetFormState(){this.validationMessages.length&&(this.validationMessages=[]),this.ngform&&(this.ngform.markAsUntouched(),this.ngform.markAsPristine())}reset(){this.resetFormState(),this.formFields.forEach(e=>{e.value="","upload"===e.widgettype||e.type===o.DataType.BLOB?this.resetFileUploadWidget(e,!0):"slider"===e.widgettype&&this.resetSliderWidget(e),e.nativeElement.querySelector("input")?.removeAttribute("aria-invalid")}),this.constructDataObject(),this.clearMessage()}resetSliderWidget(e){const t=this.$element.find('[name="'+e.key+'_formWidget"]').closest(".slider-control");t.length&&t.css("--end","50%")}savePrevformFields(){this.prevformFields=o.getClonedObject(this.formFields.map(e=>({key:e.key,type:e.type,widgettype:e.widgettype,outputformat:e.outputformat,value:e.value})))}savePrevDataValues(){this.prevDataValues=this.formFields.map(e=>({key:e.key,value:e.value}))}setReadonlyFields(){this.formFields.forEach(e=>{e.setReadOnlyState()})}resetFileUploadWidget(e,t){this.$element.find('[name="'+e.key+'_formWidget"]').val(""),e._control.reset(),t||(e.href="",e.value=null)}emptyDataModel(){this.formFields.forEach(e=>{o.isDefined(e)&&(e.type===o.DataType.BLOB?this.resetFileUploadWidget(e):e.datavalue="")})}setDefaultValues(){this.formFields.forEach(e=>{this.onFieldDefaultValueChange(e,e.defaultvalue)})}setOperationType(e){this.operationType=e||"insert"}new(){this.resetFormState(),this.operationType=r.Live_Operations.INSERT,this.clearMessage(),this.isSelected&&this.savePrevformFields(),this.emptyDataModel(),setTimeout(()=>{this.setDefaultValues(),this.savePrevDataValues(),this.constructDataObject()}),this.isUpdateMode=!0}edit(){this.resetFormState(),this.clearMessage(),this.operationType=r.Live_Operations.UPDATE,this.isSelected&&(this.savePrevformFields(),this.savePrevDataValues()),this.prevDataObject=o.getClonedObject(this.formdata||{}),this.setReadonlyFields(),this.isUpdateMode=!0,o.$appDigest()}triggerWMEvent(e){const t=this.nativeElement.getAttribute("dependsontable");t&&(o.$invokeWatchers(!0),this.app.notify("wm-event",{eventName:e,widgetName:t}))}submitForm(e){let t,i,n;const a=this.datasource;if(this.validateFieldsOnSubmit())return;i=o.getClonedObject(this.constructDataObject());const s=()=>({$event:e,$formData:i,$data:i});if(this.onBeforeSubmitEvt){if(!1===this.invokeEventCallback("beforesubmit",s()))return;this.resetFormState()}else this.resetFormState();if(this.onSubmitEvt||a)if(a){const l=a.pagination&&a.pagination.number+1,c=this.operationType?this.operationType:"insert";r.performDataOperation(a,i,{operationType:c}).then(e=>("wm.CrudVariable"===a.category&&(this.triggerWMEvent("resetEditMode"),this.datasource.execute(o.DataSource.Operation.LIST_RECORDS,{skipToggleState:!0,operation:"list",page:l,preventMissingOpMsg:!0}),this.dialogId&&this.closeDialog()),o.isDefined(e.body)?(n=o.getValidJSON(e.body),n=o.isDefined(n)?n:e.body):n=e,{result:n,status:!0,message:this.postmessage,type:"success"}),e=>(t=this.errormessage||e.error||e,o.$appDigest(),{result:d.get(e,"error")||e,status:!1,message:t,type:"error"})).then(t=>{("error"===t.type&&!this.onError||"success"===t.type&&!this.onSuccess)&&this.toggleMessage(!0,t.message,t.type),this.invokeEventCallback("submit",s()),this.onResultCb(t.result,t.status,e)})}else this.invokeEventCallback("submit",s()),this.onResultCb({},!0,e);else this.onResultCb({},!0,e)}closeDialog(){this.dialogService.close(this.dialogId)}showButtons(e){return d.some(this.buttonArray,t=>d.includes(t.position,e)&&t.updateMode===this.isUpdateMode)}expandCollapsePanel(){this.collapsible&&(this.expanded=!this.expanded)}onDataSourceUpdate(e,t,i){t?this.new():(this.setFormData(e),this.closeDialog()),this.isUpdateMode=!o.isDefined(i)||i}getNearestParentFormData(e){return e.parentForm?e.bindformdata||!d.get(e.parentForm,"formdata")||d.isEmpty(e.parentForm.formdata)?this.getNearestParentFormData(e.parentForm):e.parentForm.formdata:{}}setFormDataFromParentFormData(e){if(d.isEmpty(this.formdata)&&this.parentForm&&e)if(this.parentFormArray){let t=d.get(e,this.parentList.name);if(t)d.isArray(t)||(t=[t]),this.parentFormArray.patchValue(t),this.bindformdata||(this.formdata=t[this.formArrayIndex]),this.setFormData(this.formdata);else if(this.isParentList&&this.parentForm.formGroupName){const t=d.get(e,this.parentForm.formGroupName);this.setFormDataFromParentFormData(t)}}else this.setFormData(e)}onDataSourceChange(){if(d.get(this.formFields,"length")&&!this.bindformdata){this.isDataSourceUpdated=!0;const e=this.getNearestParentFormData(this);this.setFormDataFromParentFormData(e)}}onFormDataSourceChange(){this.updateFieldSource()}onFieldDefaultValueChange(e,t){e.value=r.parseValueByType(t,void 0,e.widgettype,e.trailingzero),this.dirty&&!this._triggeredByUser&&this.markAsPristine()}onFieldValueChange(){}async generateFormFields(){let e,t;d.isUndefined(this._isGridLayoutPresent)&&(this._isGridLayoutPresent=this.$element.find(".panel-body [wmlayoutgrid]").length>0),this._isGridLayoutPresent?(t=this.$element.find(".form-elements [wmlayoutgrid]").first(),e=Number(t.attr("columns"))||1):(t=this.$element.find(".form-elements .dynamic-form-container"),t.length||(this.$element.find(".form-elements").prepend('<div class="dynamic-form-container"></div>'),t=this.$element.find(".form-elements .dynamic-form-container")),e=1);const i=12/e;let n,a,s="",r=0,l=this.metadata?this.metadata.data||this.metadata:[];if(this.formFields=[],!d.isEmpty(l)&&(this.onBeforeRenderEvt&&(a=this.invokeEventCallback("beforerender",{$metadata:l}),a&&(l=a)),d.isArray(l))){for(;l[r];){let t="";for(n=0;n<e;n++)l[r]&&(t+=R(l[r],i)),r++;s+=`<wm-gridrow>${t}</wm-gridrow>`}this._isGridLayoutPresent||(s=`<wm-layoutgrid>${s}</wm-layoutgrid>`),this.dynamicFormRef.clear(),this._dynamicContext||(this._dynamicContext=Object.create(this.viewParent),this._dynamicContext.form=this);try{const e=`app-form-dynamic-${this.widgetId}`,i=await this.dynamicComponentProvider.getComponentFactoryRef(e,s,{noCache:!0,transpile:!0});if(!i)return void console.error(`Failed to create dynamic form component: ${e}`);const n=this.dynamicFormRef.createComponent(i,{index:0,environmentInjector:this.envInjector,injector:this.inj});o.extendProto(n.instance,this._dynamicContext),t[0]?t[0].appendChild(n.location.nativeElement):console.error("Form grid layout element not found"),this.setFormData(this.formdata)}catch(e){console.error("Error creating dynamic form component:",e)}}}get mode(){return this.operationType||this.findOperationType()}get dirty(){return this.ngform&&this.ngform.dirty}markAsPristine(e=!1){this.ngform.markAsPristine({onlySelf:e})}markAsDirty(e=!1){this.ngform.markAsDirty({onlySelf:e})}get invalid(){return this.ngform&&this.ngform.invalid}get touched(){return this.ngform&&this.ngform.touched}get valid(){return this.ngform&&this.ngform.valid}get pristine(){return this.ngform&&this.ngform.pristine}markAsTouched(e=!1){this.ngform.markAsTouched({onlySelf:e})}markAsUntouched(e=!1){this.ngform.markAsUntouched({onlySelf:e})}invokeActionEvent(e,t){o.$parseEvent(t)(this.viewParent,Object.assign(this.context,{$event:e}))}ngOnDestroy(){const e=this.parentForm&&d.get(this.parentForm,"ngform.controls");if(e){if(d.get(this.parentList,"name")&&e.hasOwnProperty(this.parentList.name)){const e=d.findIndex(this.parentList.getWidgets(this.name),{widgetId:this.widgetId});this.parentForm.ngform.controls[this.parentList.name].removeAt(e)}this.formGroupName&&e.hasOwnProperty(this.formGroupName)?this.parentForm.ngform.removeControl(this.formGroupName):this.parentForm.ngform.removeControl(this.name)}this.dynamicFormRef&&this.dynamicFormRef.clear(),this._dynamicContext&&(Object.keys(this._dynamicContext).forEach(e=>{delete this._dynamicContext[e]}),this._dynamicContext=null),this.formFields=[],this.formWidgets={},this.filterWidgets={},this.buttonArray=[],this.validationMessages=[],this.formdata={},this.dataoutput={},this.formfields={},this.prevDataValues=null,this.prevDataObject=null,this.prevformFields=null,this._debouncedUpdateFieldSource=null,this._debouncedSubmitForm=null,super.ngOnDestroy()}static{this.\u0275fac=v.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:v,type:x,deps:[{token:v.Injector},{token:v.EnvironmentInjector},{token:f.FormBuilder},{token:b.App},{token:b.AbstractDialogService},{token:b.DynamicComponentRefProvider},{token:v.NgZone},{token:P.ListComponent,optional:!0},{token:x,optional:!0,skipSelf:!0},{token:w.PrefabDirective,optional:!0,skipSelf:!0},{token:y.PartialDirective,optional:!0,skipSelf:!0},{token:"beforesubmit.event",attribute:!0},{token:"submit.event",attribute:!0},{token:"beforerender.event",attribute:!0},{token:"dataset.bind",attribute:!0},{token:"formdata.bind",attribute:!0},{token:"wmLiveForm",attribute:!0},{token:"wmLiveFilter",attribute:!0},{token:"data-role",attribute:!0},{token:"key",attribute:!0},{token:"name",attribute:!0},{token:"EXPLICIT_CONTEXT",optional:!0}],target:v.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=v.\u0275\u0275ngDeclareComponent({minVersion:"17.0.0",version:"20.3.19",type:x,isStandalone:!0,selector:"form[wmForm]",host:{listeners:{submit:"submit($event)",reset:"onReset()",keydown:"onKeydownHandler($event)"},properties:{action:"this.action"}},providers:[r.provideAsWidgetRef(x)],queries:[{propertyName:"componentRefs",predicate:r.WidgetRef,descendants:!0}],viewQueries:[{propertyName:"dynamicFormRef",first:!0,predicate:["dynamicForm"],descendants:!0,read:a.ViewContainerRef,static:!0},{propertyName:"messageRef",first:!0,predicate:r.MessageComponent,descendants:!0}],usesInheritance:!0,ngImport:v,template:'<ng-template #content><ng-content></ng-content></ng-template>\n\n@if (formlayout === \'page\') {\n <ng-container *ngTemplateOutlet="content"></ng-container>\n} @else {\n @if (!isLayoutDialog && (title || subheading || iconclass || showButtons(\'header\'))) {\n <div class="panel-heading">\n <h3 class="panel-title">\n <div class="pull-left">\n @if (iconclass) {\n <i class="app-icon panel-icon" aria-hidden="true" [ngClass]="iconclass"></i>\n }\n </div>\n <div class="pull-left">\n <div class="heading" [innerHTML]="title"></div>\n <div class="description" [innerHTML]="subheading"></div>\n </div>\n <div class="form-action panel-actions basic-btn-grp">\n @for (btn of buttonArray | filter : \'position\' : \'header\'; track btn; let index = $index) {\n <ng-container\n [ngTemplateOutlet]="btn.widgetType === \'button\' ? buttonRef : anchorRef"\n [ngTemplateOutletContext]="{btn:btn}"\n [ngTemplateOutletInjector]="createCustomInjector(\'action_header_\' + index, {btn:btn})">\n </ng-container>\n }\n @if (collapsible) {\n <button type="button" class="app-icon wi panel-action" [title]="expanded? (appLocale?.LABEL_COLLAPSE||\'Collapse\'):(appLocale?.LABEL_EXPAND||\'Expand\')"\n [ngClass]="expanded ? \'wi-minus\': \'wi-plus\'" (click)="expandCollapsePanel();"></button>\n }\n </div>\n </h3>\n </div>\n }\n <div class="panel-body" [ngClass]="{\'form-elements\': isLayoutDialog, \'form-body\': !isLayoutDialog}" [class.hidden]="!expanded">\n @if (!!statusMessage.caption) {\n <p wmMessage [attr.aria-hidden]="!statusMessage.caption" [attr.aria-label]="statusMessage.caption" caption.bind="statusMessage.caption" type.bind="statusMessage.type"></p>\n }\n <div [ngClass]="{\'form-elements\': !isLayoutDialog, \'form-content\': isLayoutDialog}">\n <ng-container *ngTemplateOutlet="content"></ng-container>\n </div>\n <div class="basic-btn-grp form-action panel-footer clearfix" [ngClass]="{\'modal-footer\': isLayoutDialog}" [class.hidden]="!expanded || !showButtons(\'footer\')">\n @for (btn of buttonArray | filter : \'position\' : \'footer\'; track btn; let index = $index) {\n <ng-container\n [ngTemplateOutlet]="btn.widgetType === \'button\' ? buttonRef : anchorRef"\n [ngTemplateOutletContext]="{btn:btn}"\n [ngTemplateOutletInjector]="createCustomInjector(\'action_footer_\' + index, {btn:btn})">\n </ng-container>\n }\n </div>\n </div>\n}\n\n\n\n<ng-template #buttonRef let-btn="btn">\n <button wmButton name="{{btn.key}}" caption.bind="btn.displayName" class.bind="btn.class" iconclass.bind="btn.iconclass" show.bind="btn.show"\n (click)="invokeActionEvent($event, btn.action)" type.bind="btn.type" hint.bind="btn.title" shortcutkey.bind="btn.shortcutkey" disabled.bind="ngform.status === \'PENDING\' || btn.disabled"\n tabindex.bind="btn.tabindex" [attr.aria-label]="btn.displayName" [class.hidden]="btn.updateMode ? !isUpdateMode : isUpdateMode"></button>\n</ng-template>\n\n<ng-template #anchorRef let-btn="btn">\n <a wmAnchor name="{{btn.key}}" caption.bind="btn.displayName" class.bind="btn.class" iconclass.bind="btn.iconclass" show.bind="btn.show"\n (click)="invokeActionEvent($event, btn.action)" hint.bind="btn.title" shortcutkey.bind="btn.shortcutkey"\n hyperlink.bind="btn.hyperlink" target.bind="btn.target"\n tabindex.bind="btn.tabindex" [class.hidden]="btn.updateMode ? !isUpdateMode : isUpdateMode"></a>\n</ng-template>\n\n<ng-container #dynamicForm></ng-container>\n',dependencies:[{kind:"ngmodule",type:t.CommonModule},{kind:"directive",type:g.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"directive",type:g.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]},{kind:"component",type:i.AnchorComponent,selector:"a[wmAnchor]",exportAs:["wmAnchor"]},{kind:"component",type:n.ButtonComponent,selector:"button[wmButton]",exportAs:["wmButton"]},{kind:"component",type:r.MessageComponent,selector:"[wmMessage]",exportAs:["wmMessage"]},{kind:"pipe",type:r.FilterPipe,name:"filter"}]})}}v.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:v,type:x,decorators:[{type:a.Component,args:[{standalone:!0,imports:[t.CommonModule,r.FilterPipe,i.AnchorComponent,n.ButtonComponent,r.MessageComponent],selector:"form[wmForm]",providers:[r.provideAsWidgetRef(x)],template:'<ng-template #content><ng-content></ng-content></ng-template>\n\n@if (formlayout === \'page\') {\n <ng-container *ngTemplateOutlet="content"></ng-container>\n} @else {\n @if (!isLayoutDialog && (title || subheading || iconclass || showButtons(\'header\'))) {\n <div class="panel-heading">\n <h3 class="panel-title">\n <div class="pull-left">\n @if (iconclass) {\n <i class="app-icon panel-icon" aria-hidden="true" [ngClass]="iconclass"></i>\n }\n </div>\n <div class="pull-left">\n <div class="heading" [innerHTML]="title"></div>\n <div class="description" [innerHTML]="subheading"></div>\n </div>\n <div class="form-action panel-actions basic-btn-grp">\n @for (btn of buttonArray | filter : \'position\' : \'header\'; track btn; let index = $index) {\n <ng-container\n [ngTemplateOutlet]="btn.widgetType === \'button\' ? buttonRef : anchorRef"\n [ngTemplateOutletContext]="{btn:btn}"\n [ngTemplateOutletInjector]="createCustomInjector(\'action_header_\' + index, {btn:btn})">\n </ng-container>\n }\n @if (collapsible) {\n <button type="button" class="app-icon wi panel-action" [title]="expanded? (appLocale?.LABEL_COLLAPSE||\'Collapse\'):(appLocale?.LABEL_EXPAND||\'Expand\')"\n [ngClass]="expanded ? \'wi-minus\': \'wi-plus\'" (click)="expandCollapsePanel();"></button>\n }\n </div>\n </h3>\n </div>\n }\n <div class="panel-body" [ngClass]="{\'form-elements\': isLayoutDialog, \'form-body\': !isLayoutDialog}" [class.hidden]="!expanded">\n @if (!!statusMessage.caption) {\n <p wmMessage [attr.aria-hidden]="!statusMessage.caption" [attr.aria-label]="statusMessage.caption" caption.bind="statusMessage.caption" type.bind="statusMessage.type"></p>\n }\n <div [ngClass]="{\'form-elements\': !isLayoutDialog, \'form-content\': isLayoutDialog}">\n <ng-container *ngTemplateOutlet="content"></ng-container>\n </div>\n <div class="basic-btn-grp form-action panel-footer clearfix" [ngClass]="{\'modal-footer\': isLayoutDialog}" [class.hidden]="!expanded || !showButtons(\'footer\')">\n @for (btn of buttonArray | filter : \'position\' : \'footer\'; track btn; let index = $index) {\n <ng-container\n [ngTemplateOutlet]="btn.widgetType === \'button\' ? buttonRef : anchorRef"\n [ngTemplateOutletContext]="{btn:btn}"\n [ngTemplateOutletInjector]="createCustomInjector(\'action_footer_\' + index, {btn:btn})">\n </ng-container>\n }\n </div>\n </div>\n}\n\n\n\n<ng-template #buttonRef let-btn="btn">\n <button wmButton name="{{btn.key}}" caption.bind="btn.displayName" class.bind="btn.class" iconclass.bind="btn.iconclass" show.bind="btn.show"\n (click)="invokeActionEvent($event, btn.action)" type.bind="btn.type" hint.bind="btn.title" shortcutkey.bind="btn.shortcutkey" disabled.bind="ngform.status === \'PENDING\' || btn.disabled"\n tabindex.bind="btn.tabindex" [attr.aria-label]="btn.displayName" [class.hidden]="btn.updateMode ? !isUpdateMode : isUpdateMode"></button>\n</ng-template>\n\n<ng-template #anchorRef let-btn="btn">\n <a wmAnchor name="{{btn.key}}" caption.bind="btn.displayName" class.bind="btn.class" iconclass.bind="btn.iconclass" show.bind="btn.show"\n (click)="invokeActionEvent($event, btn.action)" hint.bind="btn.title" shortcutkey.bind="btn.shortcutkey"\n hyperlink.bind="btn.hyperlink" target.bind="btn.target"\n tabindex.bind="btn.tabindex" [class.hidden]="btn.updateMode ? !isUpdateMode : isUpdateMode"></a>\n</ng-template>\n\n<ng-container #dynamicForm></ng-container>\n'}]}],ctorParameters:()=>[{type:v.Injector},{type:v.EnvironmentInjector},{type:f.FormBuilder},{type:b.App},{type:b.AbstractDialogService},{type:b.DynamicComponentRefProvider},{type:v.NgZone},{type:P.ListComponent,decorators:[{type:a.Optional}]},{type:x,decorators:[{type:a.SkipSelf},{type:a.Optional}]},{type:w.PrefabDirective,decorators:[{type:a.SkipSelf},{type:a.Optional}]},{type:y.PartialDirective,decorators:[{type:a.SkipSelf},{type:a.Optional}]},{type:void 0,decorators:[{type:a.Attribute,args:["beforesubmit.event"]}]},{type:void 0,decorators:[{type:a.Attribute,args:["submit.event"]}]},{type:void 0,decorators:[{type:a.Attribute,args:["beforerender.event"]}]},{type:void 0,decorators:[{type:a.Attribute,args:["dataset.bind"]}]},{type:void 0,decorators:[{type:a.Attribute,args:["formdata.bind"]}]},{type:void 0,decorators:[{type:a.Attribute,args:["wmLiveForm"]}]},{type:void 0,decorators:[{type:a.Attribute,args:["wmLiveFilter"]}]},{type:void 0,decorators:[{type:a.Attribute,args:["data-role"]}]},{type:void 0,decorators:[{type:a.Attribute,args:["key"]}]},{type:void 0,decorators:[{type:a.Attribute,args:["name"]}]},{type:void 0,decorators:[{type:a.Inject,args:["EXPLICIT_CONTEXT"]},{type:a.Optional}]}],propDecorators:{dynamicFormRef:[{type:a.ViewChild,args:["dynamicForm",{static:!0,read:a.ViewContainerRef}]}],messageRef:[{type:a.ViewChild,args:[r.MessageComponent]}],componentRefs:[{type:a.ContentChildren,args:[r.WidgetRef,{descendants:!0}]}],action:[{type:a.HostBinding,args:["action"]}],submit:[{type:a.HostListener,args:["submit",["$event"]]}],onReset:[{type:a.HostListener,args:["reset"]}],onKeydownHandler:[{type:a.HostListener,args:["keydown",["$event"]]}]}});class A{constructor(e,t,i,n,a,s){this.componentInstance=i,this.name=a,this.key=s,this.fb=n,this.parent=e||t,this.ngform=this.parent.ngform,this.componentInstance.registerPropertyChangeListener((e,t)=>{"datavalue"===e&&this._control?this._control.setValue(t):"name"!==e||this._control||this.addControl(this.key||t)})}get _control(){const e=this.key||this.name;if(e)return this.ngform&&this.ngform.controls[e]}addControl(e){this.ngform.addControl(e,this.createControl())}createControl(){return this.fb.control(this.componentInstance.datavalue)}ngOnInit(){const e=this.key||this.name;e&&!this._control&&(this.addControl(e),this.parent.registerFormWidget(this.componentInstance))}ngOnDestroy(){this.ngform=null,this.fb=null,this.parent=null,this.componentInstance=null}static{this.\u0275fac=v.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:v,type:A,deps:[{token:x,optional:!0},{token:p.TableComponent,optional:!0},{token:r.WidgetRef,self:!0},{token:f.FormBuilder},{token:"name",attribute:!0},{token:"key",attribute:!0}],target:v.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=v.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:A,isStandalone:!0,selector:"[wmFormWidget]",ngImport:v})}}v.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:v,type:A,decorators:[{type:a.Directive,args:[{standalone:!0,selector:"[wmFormWidget]"}]}],ctorParameters:()=>[{type:void 0,decorators:[{type:a.Optional},{type:a.Inject,args:[x]}]},{type:void 0,decorators:[{type:a.Optional},{type:a.Inject,args:[p.TableComponent]}]},{type:void 0,decorators:[{type:a.Self},{type:a.Inject,args:[r.WidgetRef]}]},{type:f.FormBuilder},{type:void 0,decorators:[{type:a.Attribute,args:["name"]}]},{type:void 0,decorators:[{type:a.Attribute,args:["key"]}]}]});const k={widgetType:"wm-form-action",hostClass:""};class N extends r.BaseComponent{static{this.initializeProps=void r.register("wm-form-action",new Map([["accessroles",r.PROP_STRING],["action",r.PROP_STRING],["class",r.PROP_STRING],["binding",r.PROP_STRING],["disabled",r.PROP_BOOLEAN],["display-name",r.PROP_STRING],["hyperlink",r.PROP_STRING],["iconclass",r.PROP_STRING],["iconname",r.PROP_STRING],["key",r.PROP_STRING],["position",{value:"footer",...r.PROP_STRING}],["shortcutkey",r.PROP_STRING],["show",{value:!0,...r.PROP_BOOLEAN}],["tabindex",{value:0,...r.PROP_NUMBER}],["target",r.PROP_STRING],["title",r.PROP_STRING],["type",{value:"button",...r.PROP_STRING}],["update-mode",{value:!0,...r.PROP_BOOLEAN}],["widget-type",{value:"button",...r.PROP_STRING}]]))}constructor(e,t,i){super(e,k,i),this.form=t}populateAction(){this.buttonDef={key:this.key||this.binding,displayName:this["display-name"],show:this.show,class:this.class?this.class:"button"===this["widget-type"]?"btn-secondary":"",iconclass:this.iconclass||"",title:d.isUndefined(this.title)?this["display-name"]||"":this.title,action:this.action,accessroles:this.accessroles,shortcutkey:this.shortcutkey,disabled:this.disabled||this.form.readonly,tabindex:this.tabindex,iconname:this.iconname,type:this.type,updateMode:this["update-mode"],position:this.position,widgetType:this["widget-type"],hyperlink:this.hyperlink,target:this.target},this._propsInitialized=!0}ngOnInit(){super.ngOnInit(),this.populateAction(),this.form.registerActions(this.buttonDef)}onPropertyChange(e,t,i){if(this._propsInitialized)switch(e){case"disabled":this.buttonDef[e]=t||this.form.readonly;break;case"display-name":this.buttonDef.displayName=t;default:this.buttonDef[e]=t}}ngOnDestroy(){this.form=null,this.buttonDef=null,super.ngOnDestroy()}static{this.\u0275fac=v.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:v,type:N,deps:[{token:v.Injector},{token:x,optional:!0},{token:"EXPLICIT_CONTEXT",optional:!0}],target:v.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=v.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:N,isStandalone:!0,selector:"[wmFormAction]",providers:[r.provideAsWidgetRef(N)],usesInheritance:!0,ngImport:v})}}v.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:v,type:N,decorators:[{type:a.Directive,args:[{standalone:!0,selector:"[wmFormAction]",providers:[r.provideAsWidgetRef(N)]}]}],ctorParameters:()=>[{type:v.Injector},{type:x,decorators:[{type:a.Optional}]},{type:void 0,decorators:[{type:a.Inject,args:["EXPLICIT_CONTEXT"]},{type:a.Optional}]}]});const M=()=>({custom:!0}),L={image:"image/*",video:"video/*",audio:"audio/*"};class F extends r.StylableComponent{static{this.initializeProps=(()=>{const e=new Map([["dataentrymode",{value:"default",...r.PROP_STRING}],["debouncetime",{value:250,...r.PROP_NUMBER}],["defaultvalue",r.PROP_STRING],["displayname",r.PROP_STRING],["display-name",r.PROP_STRING],["field",r.PROP_STRING],["filterexpressions",r.PROP_STRING],["filter-on",r.PROP_STRING],["generator",r.PROP_STRING],["hint",r.PROP_STRING],["inputtype",r.PROP_STRING],["is-primary-key",r.PROP_BOOLEAN],["is-range",r.PROP_BOOLEAN],["is-related",r.PROP_BOOLEAN],["isformfield",{value:!0}],["key",r.PROP_STRING],["limit",r.PROP_NUMBER],["lookup-type",r.PROP_STRING],["lookup-field",r.PROP_STRING],["name",r.PROP_STRING],["matchmode",r.PROP_STRING],["maxdefaultvalue",r.PROP_STRING],["maxplaceholder",r.PROP_STRING],["mobile-display",{value:!0,...r.PROP_BOOLEAN}],["period",r.PROP_BOOLEAN],["pc-display",{value:!0,...r.PROP_BOOLEAN}],["placeholder",r.PROP_STRING],["primary-key",r.PROP_BOOLEAN],["related-entity-name",r.PROP_STRING],["required",r.PROP_BOOLEAN],["show",{value:!0,...r.PROP_BOOLEAN}],["tablet-display",{value:!0,...r.PROP_BOOLEAN}],["type",r.PROP_STRING],["validationmessage",r.PROP_STRING],["viewmodewidget",r.PROP_STRING],["widgettype",r.PROP_STRING]]);for(const t in o.FormWidgetType){const i="wm-form-field-"+o.FormWidgetType[t],n=r.getWidgetPropsByType(i);e.forEach((e,t)=>{null==n.get(t)&&n.set(t,e)})}})()}onKeydownHandler(e){this._triggeredByUser=!0}handleClick(e){this._clicktriggeredByUser=!0}constructor(e,t,i,n,a,s,r,l,c,d,p,m,h,u,g,v,f,b,y,w){const P={widgetType:"wm-form-field",hostClass:"",widgetSubType:"wm-form-field-"+(p||o.FormWidgetType.TEXT).trim()};let C=o.noop;super(e,P,w,new Promise(e=>C=e)),this._initPropsRes=C,this.app=a,this.fieldDefConfig={},this.class="",this.binddataset=l,this.binddisplayimagesrc=h,this.binddisplayexpression=c,this.bindChipclass=r,this.binddisplaylabel=d,this.form=t,this.fb=i,this.viewport=n,this._fieldName=u||m,this.isRange=g,this.excludeProps=new Set(["type","name"]),this.widgettype=p,this.parentList=s,this.notifyForFields=[],(this.binddataset||this.$element.attr("dataset"))&&(this.isDataSetBound=!0),y[0]._onFocusField=this._onFocusField.bind(this),y[0]._onBlurField=this._onBlurField.bind(this),this._debounceSetUpValidators=o.debounce(()=>this.setUpValidators(),500)}_onFocusField(e){this._activeField=!0,$(e.target).closest(".live-field").addClass("active")}getActiveElement(){switch(this.nativeElement.getAttribute("widgettype")){case"select":return this.nativeElement.querySelector("select");case"textarea":return this.nativeElement.querySelector("textarea");default:return this.nativeElement.querySelector("input")}}setAriaAttributes(){const e=this.getActiveElement();this.ngform.controls[this._fieldName].invalid&&this.ngform.controls[this._fieldName].touched&&this.form.isUpdateMode?(this.nativeElement.setAttribute("__errormsg",`${this.nativeElement.getAttribute("__validationId")}`),e?.setAttribute("aria-invalid",`${this.ngform.controls[this._fieldName].invalid}`),e?.setAttribute("aria-describedby",`${this.nativeElement.getAttribute("__validationId")}`)):(this.nativeElement.removeAttribute("__errormsg"),e?.removeAttribute("aria-invalid"),e?.removeAttribute("aria-describedby"))}_onBlurField(e){$(e.target).closest(".live-field").removeClass("active"),this.nativeElement.querySelector("p.text-danger"),this.setAriaAttributes(),this._activeField=!1,this._triggeredByUser=!1,this._clicktriggeredByUser=!1}evaluateExpr(e,t,i){if(i&&t||(t=Object.keys(e)[0]))return r.getEvaluatedData(e,{field:t,expression:i},this.viewParent)}getDisplayExpr(){const e=[],t=this.value,i=this.displayfield||this.displaylabel,n=this.displayexpression;return d.isObject(t)?(d.isArray(t)?d.forEach(t,t=>{d.isObject(t)&&e.push(this.evaluateExpr(t,i,n))}):e.push(this.evaluateExpr(t,i,n)),d.join(e,",")):null==t?"":this.value}getCaption(){return void 0===this.value||null===this.value?d.get(this.form.dataoutput,this._fieldName)||"":this.value}notifyChanges(){d.forEach(this.notifyForFields,e=>{e.fieldValidations.validate()})}observeOn(e){this.fieldValidations.observeOn(e,"formfields")}setUpValidators(e){this.fieldValidations.setUpValidators(e)}setAsyncValidators(e){this.fieldValidations.setAsyncValidators(e)}setValidators(e){this.fieldValidations.setValidators(e)}setFormWidget(e,t){this.formWidget&&this.formWidget.widget&&("inputtype"===e&&this.widgettype===o.FormWidgetType.TEXT&&(e="type"),this.formWidget.widget[e]=t)}boundFn(e){return e()}setMaxFormWidget(e,t){this.formWidgetMax&&(this.formWidgetMax.widget[e]=t)}onPropertyChange(e,t,i){const n=this.form.dirty;if("tabindex"!==e&&super.onPropertyChange(e,t,i),!this.excludeProps.has(e)){if(this.widgettype===o.FormWidgetType.UPLOAD)return"required"===e&&this._debounceSetUpValidators(),void super.onPropertyChange(e,t,i);switch(this.setFormWidget(e,t),"placeholder"!==e&&this.setMaxFormWidget(e,t),e){case"defaultvalue":this.form.onFieldDefaultValueChange(this,t);break;case"maxdefaultvalue":this.maxValue=t,this.setMaxFormWidget("datavalue",t),this.form.onMaxDefaultValueChange();break;case"maxplaceholder":this.setMaxFormWidget("placeholder",t);break;case"required":n!==this.form.dirty&&this.form.markAsPristine();case"maxchars":case"minvalue":case"maxvalue":case"regexp":case"show":this._debounceSetUpValidators();break;case"primary-key":t&&this.form.setPrimaryKey(this._fieldName);break;case"display-name":this.displayname=t;break;case"readonly":this.setReadOnlyState()}}}onStyleChange(e,t,i){"width"===e&&this.$element.css("width",t),this.setFormWidget(e,t),this.setMaxFormWidget(e,t),super.onStyleChange(e,t,i)}get datavalue(){return this.formWidget&&this.formWidget.datavalue}set datavalue(e){this._control&&this.widgettype!==o.FormWidgetType.UPLOAD&&this._control.setValue(e)}get value(){return this.datavalue}set value(e){this.datavalue=e}get maxValue(){return this.formWidgetMax&&this.formWidgetMax.datavalue}set maxValue(e){this._maxControl&&this._maxControl.setValue(e)}get minValue(){return this.value}set minValue(e){this.value=e}get _control(){return this.ngform&&this.ngform.controls[this._fieldName]}get _maxControl(){return this.ngform&&this.ngform.controls[this._fieldName+"_max"]}get displayValue(){return this.formWidget&&this.formWidget.displayValue}get timestamp(){return this.formWidget&&this.formWidget.timestamp}get charlength(){return this.formWidget&&this.formWidget.charlength}createControl(){return this.fb.control(void 0,{validators:this._validators})}onValueChange(e){if(!this.isDestroyed){const t=$(this.nativeElement).find(".caption-floating");if(t.length>0){const i=o.isDefined(e)&&""!==e&&null!==e||t.find("input").val()||t.find("input:-webkit-autofill").length;this.app.notify("captionPositionAnimate",{displayVal:i,nativeEl:t,isSelectMultiple:this.formWidget&&this.formWidget.multiple,isFocused:this._activeField})}this.setAriaAttributes(),this.form.onFieldValueChange(this,e),this.notifyChanges(),(this.$element.find(".active").length>0||this.form.touched)&&((this._triggeredByUser||o.isMobile()&&this._clicktriggeredByUser&&o.isDateTimeType(this.widgettype))&&this.ngform.controls[this._fieldName].markAsTouched(),this.fieldValidations.setCustomValidationMessage())}}onStatusChange(e){this.isDestroyed||(this.showPendingSpinner="PENDING"===e,"PENDING"===e?this.formWidget.disabled=!0:this.formWidget.disabled!==this.disabled&&(this.formWidget.disabled=this.disabled))}setValidationMessage(e){setTimeout(()=>{this.validationmessage=e,this.setUpValidators(M)})}setReadOnlyState(){let e;e=!this.form.isUpdateMode||(!this["primary-key"]||this["is-related"]||this.period?this.readonly:!("assigned"===this.generator&&"update"!==this.form.operationType)),e=e||this.form.readonly,this.setFormWidget("readonly",e)}resetDisplayInput(){o.isDefined(this.value)&&""!==this.value||this.formWidget&&this.formWidget.resetDisplayInput&&this.formWidget.resetDisplayInput()}reset(){this._control&&this._control.reset()}triggerUploadEvent(e,t){const i={$event:e};"change"===t&&(i.newVal=e.target.files,i.oldVal=this._oldUploadVal,this._oldUploadVal=i.newVal),this.invokeEventCallback(t,i)}registerFormField(){const e=this._fieldName;if(this.parentList&&this.form.parentList!==this.parentList){let t=1,i=e;for(;this.ngform.controls.hasOwnProperty(i);)i=`${e}_${t}`,t++;this.ngform.addControl(i,this.createControl()),this._fieldName=i}else this.ngform.addControl(e,this.createControl());const t=this._control.valueChanges.pipe(m.debounceTime(200)).subscribe(this.onValueChange.bind(this));this.registerDestroyListener(()=>t.unsubscribe());const i=this._control.statusChanges.pipe(m.debounceTime(100)).subscribe(this.onStatusChange.bind(this));if(this.registerDestroyListener(()=>i.unsubscribe()),"true"===this.isRange){this.ngform.addControl(e+"_max",this.createControl());const t=this._maxControl.valueChanges.pipe(m.debounceTime(200)).subscribe(this.onValueChange.bind(this));this.registerDestroyListener(()=>t.unsubscribe())}this.value=d.get(this.form.formdata,this._fieldName)}ngOnInit(){this.ngform=this.form.ngform,this.registerFormField(),this.fieldValidations=new r.BaseFieldValidations(this,this.formWidget,this.widgettype,this._control,this.form),super.ngOnInit()}prepareFormWidget(){this._initPropsRes(),this.setFormWidget("binddisplaylabel",this.binddisplaylabel),this.setFormWidget("binddisplayexpression",this.binddisplayexpression),this.setFormWidget("binddisplayimagesrc",this.binddisplayimagesrc),this.setFormWidget("bindChipclass",this.bindChipclass),this.setFormWidget("binddataset",this.binddataset),this.registerReadyStateListener(()=>{if(this.key=this._fieldName||this.target||this.binding,this.viewmodewidget=this.viewmodewidget||r.getDefaultViewModeWidget(this.widgettype),this.widgettype===o.FormWidgetType.UPLOAD){let e;e=this.filetype?L[this.filetype]:"",this.permitted=e+(this.extensions?(e?",":"")+this.extensions:"")}o.isMobile()&&this.viewport.isMobileType?this["mobile-display"]||(this.widget.show=!1):this.viewport.isTabletType?this["tablet-display"]||(this.widget.show=!1):this["pc-display"]||(this.widget.show=!1),this.fieldDefConfig.displaname=this.displayname,this.fieldDefConfig.show=this.show,this.fieldDefConfig.isRelated=this["is-related"],this.fieldDefConfig.inputtype=this.inputtype,this.fieldDefConfig.generator=this.generator,this.fieldDefConfig.placeholder=this.placeholder,this.fieldDefConfig.primaryKey=this["primary-key"],this.fieldDefConfig.required=this.required,this.fieldDefConfig._readonly=this.readonly,this.fieldDefConfig.regexp=this.regexp,this.fieldDefConfig.type=this.type,this.fieldDefConfig.key=this.key,this.fieldDefConfig.mobileDisplay=this["mobile-display"],this.fieldDefConfig.name=this.name,this.fieldDefConfig.pcDisplay=this["pc-display"],this.fieldDefConfig.tabletDisplay=this["tablet-display"],this.fieldDefConfig.validationmessage=this.validationmessage,this.fieldDefConfig.viewmodewidget=this.viewmodewidget,this.fieldDefConfig.widget=this.widgettype,this.form.registerFormFields(this.widget),o.addForIdAttributes(this.nativeElement),this.setReadOnlyState()})}ngAfterContentInit(){super.ngAfterContentInit(),"wm-form-field-custom-widget"===this.widgetSubType&&this.formWidget.nativeElement&&(this.formWidget=this.formWidget.nativeElement.widget),this.formWidget&&("wm-form-field-custom-widget"===this.widgetSubType?this.formWidget.configSubject.asObservable().subscribe(()=>{this.prepareFormWidget()}):this.prepareFormWidget())}ngOnDestroy(){if(this.fieldValidations){try{this.fieldValidations.destroy()}catch(e){}this.fieldValidations=null}this.notifyForFields&&(this.notifyForFields=[]),this._debounceSetUpValidators=null,this.formWidget=null,this.formWidgetMax=null,this.fieldDefConfig&&(this.fieldDefConfig={}),super.ngOnDestroy()}static{this.\u0275fac=v.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:v,type:F,deps:[{token:v.Injector},{token:x},{token:f.FormBuilder},{token:b.Viewport},{token:b.App},{token:P.ListComponent,optional:!0},{token:"chipclass.bind",attribute:!0},{token:"dataset.bind",attribute:!0},{token:"displayexpression.bind",attribute:!0},{token:"displaylabel.bind",attribute:!0},{token:"widgettype",attribute:!0},{token:"name",attribute:!0},{token:"displayimagesrc.bind",attribute:!0},{token:"key",attribute:!0},{token:"is-range",attribute:!0},{token:"pc-display",attribute:!0},{token:"mobile-display",attribute:!0},{token:"tablet-display",attribute:!0},{token:r.Context,self:!0},{token:"EXPLICIT_CONTEXT",optional:!0}],target:v.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=v.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:F,isStandalone:!0,selector:"[wmFormField]",host:{listeners:{keydown:"onKeydownHandler($event)",click:"handleClick($event)"}},providers:[r.provideAsWidgetRef(F),r.provideAs(F,s.NG_VALUE_ACCESSOR,!0),{provide:r.Context,useFactory:()=>({}),multi:!0}],queries:[{propertyName:"formWidget",first:!0,predicate:["formWidget"],descendants:!0,static:!0},{propertyName:"formWidgetMax",first:!0,predicate:["formWidgetMax"],descendants:!0}],exportAs:["wmFormField"],usesInheritance:!0,ngImport:v})}}v.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:v,type:F,decorators:[{type:a.Directive,args:[{standalone:!0,selector:"[wmFormField]",exportAs:"wmFormField",providers:[r.provideAsWidgetRef(F),r.provideAs(F,s.NG_VALUE_ACCESSOR,!0),{provide:r.Context,useFactory:()=>({}),multi:!0}]}]}],ctorParameters:()=>[{type:v.Injector},{type:x},{type:f.FormBuilder},{type:b.Viewport},{type:b.App},{type:P.ListComponent,decorators:[{type:a.Optional}]},{type:void 0,decorators:[{type:a.Attribute,args:["chipclass.bind"]}]},{type:void 0,decorators:[{type:a.Attribute,args:["dataset.bind"]}]},{type:void 0,decorators:[{type:a.Attribute,args:["displayexpression.bind"]}]},{type:void 0,decorators:[{type:a.Attribute,args:["displaylabel.bind"]}]},{type:void 0,decorators:[{type:a.Attribute,args:["widgettype"]}]},{type:void 0,decorators:[{type:a.Attribute,args:["name"]}]},{type:String,decorators:[{type:a.Attribute,args:["displayimagesrc.bind"]}]},{type:void 0,decorators:[{type:a.Attribute,args:["key"]}]},{type:void 0,decorators:[{type:a.Attribute,args:["is-range"]}]},{type:void 0,decorators:[{type:a.Attribute,args:["pc-display"]}]},{type:void 0,decorators:[{type:a.Attribute,args:["mobile-display"]}]},{type:void 0,decorators:[{type:a.Attribute,args:["tablet-display"]}]},{type:Array,decorators:[{type:a.Self},{type:a.Inject,args:[r.Context]}]},{type:void 0,decorators:[{type:a.Inject,args:["EXPLICIT_CONTEXT"]},{type:a.Optional}]}],propDecorators:{formWidget:[{type:a.ContentChild,args:["formWidget",{static:!0}]}],formWidgetMax:[{type:a.ContentChild,args:["formWidgetMax"]}],onKeydownHandler:[{type:a.HostListener,args:["keydown",["$event"]]}],handleClick:[{type:a.HostListener,args:["click",["$event"]]}]}});class j{constructor(e,t,i){this.subscribedWidget=e,this.app=t,this.dialogService=i,e.addRow=this.addRow.bind(this),e.updateRow=this.updateRow.bind(this),e.deleteRow=this.deleteRow.bind(this),e.call=this.call.bind(this)}addRow(){this.app.notify("wm-event",{eventName:r.Live_Operations.INSERT,widgetName:this.subscribedWidget.name,row:this.subscribedWidget.selecteditem})}updateRow(){this.app.notify("wm-event",{eventName:r.Live_Operations.UPDATE,widgetName:this.subscribedWidget.name,row:this.subscribedWidget.selecteditem})}deleteRow(){this.app.notify("wm-event",{eventName:r.Live_Operations.DELETE,widgetName:this.subscribedWidget.name,row:this.subscribedWidget.selecteditem})}successHandler(e,t){o.triggerFn(e.success,t)}errorHandler(e,t){this.app.notifyApp(t,"error","ERROR"),o.triggerFn(e.error,t)}getRecords(e,t){let i,n;"None"!==this.subscribedWidget.navigation&&this.subscribedWidget.dataNavigator?(n=this.subscribedWidget.dataNavigator,t===r.Live_Operations.DELETE?(n.dataSize-=1,n.calculatePagingValues(),i=n.pageCount<n.dn.currentPage?"prev":void 0):(i=t===r.Live_Operations.INSERT?"last":"current","last"===i&&(n.dataSize+=1),n.calculatePagingValues()),n.navigatePage(i,null,!0,t=>{this.successHandler(e,t)})):this.subscribedWidget.datasource.execute(o.DataSource.Operation.LIST_RECORDS,{skipToggleState:!0}).then(t=>{this.successHandler(e,t)},t=>{this.errorHandler(e,t)})}performCUDOperation(e,t,i){r.performDataOperation(this.subscribedWidget.datasource,e,{operationType:t}).then(e=>{e.error?this.errorHandler(i,e.error):("wm.CrudVariable"===this.subscribedWidget.datasource.category&&"delete"===t?this.subscribedWidget.datasource.execute(o.DataSource.Operation.LIST_RECORDS,{skipToggleState:!0}).then(e=>{this.successHandler(i,e)},e=>{this.errorHandler(i,e)}):this.getRecords(i,t),"delete"===t&&this.app.notifyApp(this.app.appLocale.MESSAGE_DELETE_RECORD_SUCCESS,"success"))},e=>{this.errorHandler(i,e)})}insertRecord(e,t,i){this.performCUDOperation(e,t,i)}updateRecord(e,t,i){this.performCUDOperation(e,t,i)}deleteRecord(e,t,i){this.dialogService.showAppConfirmDialog({title:this.app.appLocale.MESSAGE_DELETE_RECORD||"Delete Record",iconclass:"wi wi-delete fa-lg",message:this.subscribedWidget.confirmdelete||"Are you sure you want to delete this?",oktext:this.subscribedWidget.deleteoktext||"Ok",canceltext:this.subscribedWidget.deletecanceltext||"Cancel",onOk:()=>{this.performCUDOperation(e,t,i),this.dialogService.closeAppConfirmDialog()},onCancel:()=>{o.triggerFn(i.cancelDeleteCallback),this.dialogService.closeAppConfirmDialog()}})}performOperation(e,t){const i={row:t.row,prevData:{},rowData:{},transform:!0,skipNotification:!0};switch(e===r.Live_Operations.UPDATE&&(i.rowData=t.rowData,i.prevData=t.prevData),e){case r.Live_Operations.INSERT:this.insertRecord(i,e,t);break;case r.Live_Operations.UPDATE:this.updateRecord(i,e,t);break;case r.Live_Operations.DELETE:this.deleteRecord(i,e,t);break;case r.Live_Operations.READ:this.getRecords(t,e)}}call(e,t,i,n){t.success=i,t.error=n,this.performOperation(e,t)}ngOnDestroy(){this.subscribedWidget=null,this.app=null,this.dialogService=null}static{this.\u0275fac=v.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:v,type:j,deps:[{token:c.ListComponent,self:!0},{token:b.App},{token:b.AbstractDialogService}],target:v.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=v.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:j,isStandalone:!0,selector:"[wmLiveActions]",ngImport:v})}}v.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:v,type:j,decorators:[{type:a.Directive,args:[{standalone:!0,selector:"[wmLiveActions]"}]}],ctorParameters:()=>[{type:void 0,decorators:[{type:a.Self},{type:a.Inject,args:[c.ListComponent]}]},{type:b.App},{type:b.AbstractDialogService}]});class V{constructor(e,t,i,n){this.dialogService=i,this.app=n,e&&(this.isLayoutDialog=!0,this.dialogId=e),this.dependson=t,this.eventSubscription=this.app.subscribe("wm-event",this.handleEvent.bind(this))}openFormDialog(){this.dialogService.open(this.dialogId)}onUpdate(e,t,i){this.editMode=i||this.editMode,this.form.operationType=r.Live_Operations.UPDATE,this.form.isSelected=!0;let n=this.currentFormData;e&&t&&(n=t.multiselect?e[0]:e[e.length-1]),this.form.setFormData(n),this.form.edit(),this.editMode||(this.form.isUpdateMode=!1)}onInsert(){this.form.operationType=r.Live_Operations.INSERT,this.form.isSelected=!0,this.form.setFormData({}),this.form.new()}handleEvent(e){if(this.dependson===e.widgetName)switch(this.currentOp=e.eventName,e.eventName){case r.Live_Operations.UPDATE:this.currentFormData=e.row,this.isLayoutDialog?this.openFormDialog():this.onUpdate(void 0,void 0,!0);break;case r.Live_Operations.INSERT:this.isLayoutDialog?this.openFormDialog():this.onInsert();break;case r.Live_Operations.DELETE:this.app.Widgets[this.dependson].call("delete",{row:e.row});break;case r.Live_Operations.READ:this.isLayoutDialog||(this.form.isUpdateMode=!1);break;case"rerender":e.dataSource&&e.dataSource.execute(o.DataSource.Operation.LIST_RECORDS,{skipToggleState:!0,operation:"list"});break;case"selectedItemChange":e.table&&this.onUpdate(e.row,e.table);break;case"resetEditMode":this.editMode=!1}}onFormRender(){this.form&&this.isLayoutDialog&&(this.form.isLayoutDialog=!0,setTimeout(()=>{this.currentOp===r.Live_Operations.UPDATE?this.onUpdate(void 0,void 0,!0):this.currentOp===r.Live_Operations.INSERT&&this.onInsert()},250))}ngAfterContentInit(){this.formChildren.first?this.form=this.formChildren.first:this.formSubscription=this.formChildren.changes.subscribe(e=>{this.form=e.first,this.onFormRender()}),this.app.notify("setup-cud-listener",this.dependson)}ngOnDestroy(){this.formSubscription&&this.formSubscription.unsubscribe(),this.eventSubscription&&this.eventSubscription()}static{this.\u0275fac=v.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:v,type:V,deps:[{token:"dialogid",attribute:!0},{token:"dependson",attribute:!0},{token:b.AbstractDialogService},{token:b.App}],target:v.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=v.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:V,isStandalone:!0,selector:"[dependson]",queries:[{propertyName:"formChildren",predicate:x,descendants:!0}],ngImport:v})}}v.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:v,type:V,decorators:[{type:a.Directive,args:[{standalone:!0,selector:"[dependson]"}]}],ctorParameters:()=>[{type:void 0,decorators:[{type:a.Attribute,args:["dialogid"]}]},{type:void 0,decorators:[{type:a.Attribute,args:["dependson"]}]},{type:b.AbstractDialogService},{type:b.App}],propDecorators:{formChildren:[{type:a.ContentChildren,args:[x,{descendants:!0}]}]}});const B="EMPTY_NULL_FILTER";class G{static{this.initializeProps=(()=>{const e=new Map(T);e.set("autoupdate",r.PROP_BOOLEAN),e.set("enableemptyfilter",{value:" ",...r.PROP_STRING}),e.set("pagesize",{value:20,...r.PROP_NUMBER}),e.set("iconclass",{value:"wi wi-filter-list",...r.PROP_STRING}),r.register("wm-livefilter",e)})()}constructor(e){this.form=e,this._filter=o.debounce(e=>{this.filter(e)},250),e.clearFilter=this.clearFilter.bind(this),e.applyFilter=this.applyFilter.bind(this),e.filter=this.filter.bind(this),e.filterOnDefault=this.filterOnDefault.bind(this),e.execute=this.execute.bind(this),e.onFieldDefaultValueChange=this.onFieldDefaultValueChange.bind(this),e.onMaxDefaultValueChange=this.onMaxDefaultValueChange.bind(this),e.onDataSourceChange=this.onDataSourceChange.bind(this),e.onFieldValueChange=this.onFieldValueChange.bind(this),e.submitForm=this.submitForm.bind(this),e.registerFormWidget=this.registerFormWidget.bind(this)}execute(e,t){return e===o.DataSource.Operation.LIST_RECORDS||e===o.DataSource.Operation.DOWNLOAD?this.applyFilter(t):e===o.DataSource.Operation.GET_OPTIONS?this._options||{}:e===o.DataSource.Operation.GET_PAGING_OPTIONS?this.form.pagination:this.form.datasource?e===o.DataSource.Operation.FETCH_DISTINCT_VALUES?r.fetchDistinctValues(this.form.datasource,this.form.formFields,{widget:"widgettype",enableemptyfilter:this.form.enableemptyfilter,EMPTY_VALUE:this.form.appLocale.LABEL_NO_VALUE}):this.form.datasource.execute(e,t):{}}onFieldDefaultValueChange(e,t){e.minValue=t,e.value=t,this.filterOnDefault()}onFieldValueChange(e,t){r.applyFilterOnField(this.form.datasource,e.widget,this.form.formFields,t,{EMPTY_VALUE:this.form.appLocale.LABEL_NO_VALUE}),this.form.autoupdate&&o.isDefined(t)&&this._filter()}onMaxDefaultValueChange(){setTimeout(()=>{this.filterOnDefault()})}onDataSourceChange(){const e=this.form.datasource;e&&(this.form.formFields.forEach(t=>{r.isDataSetWidget(t.widgettype)&&(r.getDistinctValuesForField(e,t.widget,{widget:"widgettype",enableemptyfilter:this.form.enableemptyfilter,EMPTY_VALUE:this.form.appLocale.LABEL_NO_VALUE}),r.applyFilterOnField(e,t.widget,this.form.formFields,t.value,{isFirst:!0,EMPTY_VALUE:this.form.appLocale.LABEL_NO_VALUE}))}),this._filter(this._options))}clearFilter(){this.form.resetFormState(),this.form.formFields.forEach(e=>{!e.readonly&&e.show&&(e.widgettype!==o.FormWidgetType.AUTOCOMPLETE&&e.widgettype!==o.FormWidgetType.TYPEAHEAD||this.form.$element.find("div[name="+e.name+"] input").val(""),e["is-range"]?(e.minValue="",e.maxValue=""):(e.value="",e.resetDisplayInput()))}),setTimeout(()=>{this._filter()})}submitForm(){this.filter()}applyFilter(e){return(e=e?e.data||e:{}).page=e.page||1,e.orderBy=o.isDefined(e.orderBy)?e.orderBy:this.orderBy,this.filter(e)}filter(e){if(!this.form.datasource)return;const t={},i={};let n,a,s=1;s=(e=e||{}).page||s,n=o.isDefined(e.orderBy)?e.orderBy:this.orderBy||"",this.orderBy=n,this.form.formFields.forEach(e=>{const t="div[name="+e.name+"] input",n=this.form.$element;let a;if((e.widgettype===o.FormWidgetType.AUTOCOMPLETE||e.widgettype===o.FormWidgetType.TYPEAHEAD)&&n)return a=n.find(t),void(e["is-range"]?i[e.field]={minValue:o.isDefined(e.minValue)?e.minValue:a.first().val(),maxValue:o.isDefined(e.maxValue)?e.maxValue:a.last().val()}:i[e.field]={value:o.isDefined(e.value)?e.value:a.val()});e["is-range"]?i[e.field]={minValue:e.minValue,maxValue:e.maxValue}:i[e.field]={value:e.value}});try{if(a=this.form.invokeEventCallback("beforeservicecall",{$data:i}),!1===a)return;if(a&&a.error)return void this.form.toggleMessage(!0,a.error,"error","ERROR");this.form.formFields.forEach(e=>{e["is-range"]?(e._minValue=i[e.field].minValue,e._maxValue=i[e.field].maxValue):e._value=i[e.field].value})}catch(e){if("Abort"===e.message)return}return this.form.formFields.forEach(e=>{let i,n,a=e.field;const s=e._minValue,l=e._maxValue;if(e["is-related"]&&(a+="."+e["lookup-field"]),e["is-range"])i=r.getRangeFieldValue(s,l),n=r.getRangeMatchMode(s,l),o.isDefined(i)&&(t[a]={value:i,matchMode:n,logicalOp:"AND"});else{switch(e.widgettype){case o.FormWidgetType.SELECT:case o.FormWidgetType.RADIOSET:r.getEnableEmptyFilter(this.form.enableemptyfilter)&&e._value===B?(n=r.getEmptyMatchMode(this.form.enableemptyfilter),i=e._value):e.type===o.DataType.BOOLEAN?o.isDefined(e._value)&&""!==e._value&&(i=JSON.parse(e._value)):i=e._value;break;case o.FormWidgetType.CHECKBOXSET:case o.FormWidgetType.CHIPS:e._value&&e._value.length&&(i=e._value);break;case o.FormWidgetType.CHECKBOX:case o.FormWidgetType.TOGGLE:case o.FormWidgetType.ICONBUTTONTOGGLE:o.isDefined(e._value)&&""!==e._value&&(i=e.type===o.DataType.BOOLEAN?JSON.parse(e._value):e._value);break;default:i=e._value}o.isDefined(i)&&""!==i&&null!==i&&(t[a]={},n?(t[a].matchMode=n,i=void 0):(e.type===o.DataType.STRING||e.isRelated)&&(t[a].matchMode=n||e.matchmode||this.form.datasource.execute(o.DataSource.Operation.GET_MATCH_MODE)),t[a].value=i,t[a].logicalOp="AND",t[a].type=e.type)}}),e.exportType?this.form.datasource.execute(o.DataSource.Operation.DOWNLOAD,{data:{matchMode:"anywhereignorecase",filterFields:t,orderBy:n,exportType:e.exportType,logicalOp:"AND",exportSize:e.exportSize,fields:e.fields,fileName:e.fileName}}):this.form.datasource.execute(o.DataSource.Operation.LIST_RECORDS,{filterFields:t,orderBy:n,page:s,pagesize:this.form.pagesize||20,skipDataSetUpdate:!0,inFlightBehavior:"executeAll"}).then(e=>{const t=e.data;return this.form.pagination=e.pagination,t.error?(this.form.toggleMessage(!0,t.error,"error","ERROR"),this.form.onResultCb(t,!1)):(this._options={page:s,orderBy:n},this.form.result=o.getClonedObject(t),this.form.onResultCb(t,!0)),o.$appDigest(),this.form.result},e=>(this.form.toggleMessage(!0,e,"error","ERROR"),this.form.onResultCb(e,!1),e))}filterOnDefault(){d.find(this.form.formFields,e=>o.isDefined(e.value)||o.isDefined(e.minValue)||o.isDefined(e.maxValue))&&this._filter(this._options)}registerFormWidget(e){const t=e.key||e.name;this.form.filterWidgets[t]=e}ngOnDestroy(){this._filter&&this._filter.cancel&&(this._filter.cancel(),this._filter=null),this.form=null,this._options=null,this.orderBy=null}static{this.\u0275fac=v.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:v,type:G,deps:[{token:x,self:!0}],target:v.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=v.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:G,isStandalone:!0,selector:"[wmLiveFilter]",ngImport:v})}}v.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:v,type:G,decorators:[{type:a.Directive,args:[{standalone:!0,selector:"[wmLiveFilter]"}]}],ctorParameters:()=>[{type:void 0,decorators:[{type:a.Self},{type:a.Inject,args:[x]}]}]});class W{static{this.initializeProps=(()=>{const e=new Map(T);e.set("defaultmode",{value:"View",...r.PROP_STRING}),e.set("formlayout",{value:"inline",...r.PROP_STRING}),e.set("insertmessage",{value:"Record added successfully",...r.PROP_STRING}),e.set("updatemessage",{value:"Record updated successfully",...r.PROP_STRING}),e.set("deletemessage",{value:"Record deleted successfully",...r.PROP_STRING}),e.set("errormessage",{value:"An error occured. Please try again!",...r.PROP_STRING}),e.set("messagelayout",{value:"Toaster",...r.PROP_STRING}),e.set("formdata",r.PROP_STRING),e.set("novalidate",r.PROP_BOOLEAN),e.set("validationtype",{value:"default",...r.PROP_STRING}),e.set("iconclass",r.PROP_STRING),r.register("wm-liveform",e)})()}onKeydownHandler(e){this._triggeredByUser=!0}constructor(e,t,i,n,a){this.form=e,this.datePipe=i,this.dialogService=n,this._debouncedSavePrevDataValues=o.debounce(()=>{this.savePrevDataValues()},250),t?(this.form.parentForm||(this.form._liveTableParent=t),this.form.isLayoutDialog=t.isLayoutDialog,t.onFormReady(this.form)):this.form.isLayoutDialog="dialog"===a,e.cancel=this.cancel.bind(this),e.reset=this.reset.bind(this),e.delete=this.delete.bind(this),e.save=this.save.bind(this),e.saveAndNew=this.saveAndNew.bind(this),e.saveAndView=this.saveAndView.bind(this),e.setPrimaryKey=this.setPrimaryKey.bind(this),e.constructDataObject=this.constructDataObject.bind(this),e.changeDataObject=this.setFormData.bind(this),e.setFormData=this.setFormData.bind(this),e.findOperationType=this.findOperationType.bind(this),e.clearData=this.clearData.bind(this),e.onFieldDefaultValueChange=this.onFieldDefaultValueChange.bind(this),e.onDataSourceChange=this.onDataSourceChange.bind(this),e.onFieldValueChange=this.onFieldValueChange.bind(this),e.submitForm=this.submitForm.bind(this),e.form_registerFormFields=e.registerFormFields,e.registerFormFields=this.registerFormFields.bind(this)}registerFormFields(e){const t=this.form.getFormFields();this.form.form_registerFormFields(e),this.form.isDataSourceUpdated&&this._updateFieldOnDataSourceChange(e,t)}_updateFieldOnDataSourceChange(e,t){!e.isDataSetBound&&r.isDataSetWidget(e.widgettype)&&(e["is-related"]?(e.isDataSetBound=!0,r.fetchRelatedFieldData(this.form.datasource,e.widget,{relatedField:e.key,datafield:r.ALLFIELDS,widget:"widgettype"})):(r.getDistinctValuesForField(this.form.datasource,e.widget,{widget:"widgettype",enableemptyfilter:this.form.enableemptyfilter}),r.applyFilterOnField(this.form.datasource,e.widget,t,e.value,{isFirst:!0})))}onDataSourceChange(){d.get(this.form.formFields,"length")&&(this.form.isDataSourceUpdated=!0);const e=this.form.getFormFields();e.forEach(t=>{this._updateFieldOnDataSourceChange(t,e)})}onFieldDefaultValueChange(e,t){"update"!==this.form.operationType&&(o.isDefined(t)&&null!==t&&""!==t&&"null"!==t?e.value=r.parseValueByType(t,e.type,e.widgettype,e.trailingzero):e.value=void 0,this.form.dirty&&!this._triggeredByUser&&this.form.markAsPristine(),this._debouncedSavePrevDataValues())}onFieldValueChange(e,t){r.applyFilterOnField(this.form.datasource,e.widget,this.form.formFields,t)}getBlobURL(e,t,i){let n,a,s="";return null!=i&&this.form.datasource?(n=this.form.datasource.execute(o.DataSource.Operation.GET_PRIMARY_KEY)||[],a=e[n[0]],s+=this.form.datasource.execute(o.DataSource.Operation.GET_BLOB_URL,{primaryValue:a,columnName:t}),s+="?"+Math.random(),s):s}setFormData(e,t){e&&((t=t||this.form.formFields).forEach(t=>{const i=d.get(e,t.key||t.name);(e=>e.widgettype===o.DataType.TIME||e.type===o.DataType.TIME&&!e.widgettype)(t)?t.value=(e=>{if(e){const t=(new Date).toDateString();return new Date(`${t} ${e}`).getTime()}})(i):t.type===o.DataType.BLOB?(this.form.resetFileUploadWidget(t,!0),t.href=this.getBlobURL(e,t.key,i),t.value=d.isString(i)?"":i):this.form.setFieldValue(t,e)}),this.savePrevDataValues(),this.form.constructDataObject())}onDataSourceUpdate(e,t,i){t?this.form.new():(this.form.setFormData(e),this.closeDialog()),this.form.isUpdateMode=!o.isDefined(i)||i}savePrevformFields(){this.form.prevformFields=o.getClonedObject(this.form.formFields.map(e=>({key:e.key,type:e.type,widgettype:e.widgettype,outputformat:e.outputformat,value:e.value})))}getPrevformFields(){this.form.formFields.map(e=>{const t=this.form.prevformFields.find(t=>t.key===e.key);e.value=t.value})}getDataObject(){return this.form.operationType===r.Live_Operations.INSERT?{}:o.isDefined(this.form.prevDataObject)&&!o.isEmptyObject(this.form.prevDataObject)?o.getClonedObject(this.form.prevDataObject):o.getClonedObject(this.form.formdata||{})}constructDataObject(e){const t=this.getDataObject(),i=this.form.name;let n;return n=e?this.form.prevformFields:this.form.getFormFields(),n.forEach(e=>{let n,a;const s=d.split(e.key,"."),r=s[0]||e.key;e.widgettype&&o.isDateTimeType(e.widgettype)||o.isDateTimeType(e.type)?e.value?(n=o.getValidDateObject(e.value),a=e.outputformat===o.DataType.TIMESTAMP||e.type===o.DataType.TIMESTAMP?e.value?n:null:e.outputformat?this.datePipe.transform(n,e.outputformat):e.value):a=void 0:a=e.type===o.DataType.BLOB?o.getFiles(i,r+"_formWidget",e.multiple):e.type===o.DataType.LIST?e.value||void 0:null===e.value||""===e.value?void 0:e.value,1===s.length?t[r]=a:(t[r]=t[r]||{},t[r][s[1]]=a)}),e?t:(this.form.updateFormDataOutput(t),this.form.dataoutput)}setPrimaryKey(e){this.form.primaryKey=this.form.primaryKey||[],-1===this.form.primaryKey.indexOf(e)&&this.form.primaryKey.push(e)}findOperationType(){let e,t=!1;const i=this.form.datasource&&this.form.datasource.execute(o.DataSource.Operation.GET_OPERATION_TYPE);return i&&"read"!==i?i:(this.form.primaryKey&&!d.isEmpty(this.form.formdata)&&(1===this.form.primaryKey.length?this.form.formdata[this.form.primaryKey[0]]&&(e=r.Live_Operations.UPDATE):0===this.form.primaryKey.length?(d.forEach(this.form.formdata,e=>{e&&(t=!0)}),t&&(e=r.Live_Operations.UPDATE)):(t=d.some(this.form.primaryKey,e=>{if(this.form.formdata[e])return!0}),t&&(e=r.Live_Operations.UPDATE))),e||r.Live_Operations.INSERT)}getPrevDataValues(){const e=d.fromPairs(d.map(this.form.prevDataValues,e=>[e.key,e.value]));return this.form.formFields.forEach(t=>{t.value=e[t.key]||"",t.resetDisplayInput()}),e}savePrevDataValues(){this.form.prevDataValues=this.form.formFields.map(e=>({key:e.key,value:e.value}))}clearData(){this.form.toggleMessage(!1),this.form.emptyDataModel()}setReadonlyFields(){this.form.formFields.forEach(e=>{e.setReadOnlyState()})}reset(){let e;this.form.resetFormState(),e=this.getPrevDataValues(),this.form.formFields.forEach(t=>{t.type!==o.DataType.BLOB&&"upload"!==t.widgettype||(this.form.resetFileUploadWidget(t,!0),t.href=this.getBlobURL(e,t.key,t.value)),t.nativeElement.querySelector("input")?.removeAttribute("aria-invalid")}),this.form.constructDataObject()}closeDialog(){this.form.isLayoutDialog&&this.dialogService.close(this.form.dialogId)}cancel(){this.form.clearMessage(),this.form.isUpdateMode=!1,this.form.reset(),this.form.isSelected&&this.getPrevformFields(),this.form.isUpdateMode=!1,this.form._liveTableParent?this.form._liveTableParent.onCancel():this.closeDialog(),o.$appDigest()}delete(e){this.form.resetFormState(),this.form.operationType=r.Live_Operations.DELETE,this.form.prevDataObject=o.getClonedObject(this.form.formdata||{}),this.form.save(void 0,void 0,void 0,e)}saveAndNew(){this.save(void 0,!0,!0)}saveAndView(){this.save(void 0,!1)}submitForm(e){this.save(e)}save(e,t,i){if(!this.form.datasource)return;let n,a,s,l;const c={};if(s=this.form.operationType=this.form.operationType||this.findOperationType(),!this.form.validateFieldsOnSubmit()){n=o.getClonedObject(this.form.constructDataObject()),a=this.form.prevformFields?this.form.constructDataObject(!0):n;try{if(l=this.form.invokeEventCallback("beforeservicecall",{$event:e,$operation:this.form.operationType,$data:n,options:c}),!1===l)return;if(l&&l.error)return void this.form.toggleMessage(!0,l.error,"error")}catch(e){if("Abort"===e.message)return}if(this.form.operationType===r.Live_Operations.UPDATE&&this.form.ngform&&this.form.ngform.pristine&&this.form.isSelected&&d.isEqual(n,a))return this.form.toggleMessage(!0,this.form.appLocale.MESSAGE_NO_CHANGES,"info",""),void o.$appDigest();c.row=n,c.transform=!0,c.skipNotification=!0,s===r.Live_Operations.UPDATE&&(c.rowData=this.form.formdata,c.prevData=a),r.performDataOperation(this.form.datasource,c,{operationType:s}).then(e=>{const n=s===r.Live_Operations.INSERT?this.form.insertmessage:s===r.Live_Operations.UPDATE?this.form.updatemessage:this.form.deletemessage;let a;return s===r.Live_Operations.DELETE?(a=c.row,this.form.emptyDataModel(),this.form.prevDataValues=[],this.form.isSelected=!1):a=e,this.form.onSuccess||this.form.toggleMessage(!0,n,"success"),this.form._liveTableParent?this.form._liveTableParent.onResult(s,e,i,t):(this.form.datasource.execute(o.DataSource.Operation.LIST_RECORDS,{skipToggleState:!0}),this.onDataSourceUpdate(e,i,t)),{result:a,status:!0}},e=>(this.form.onError||this.form.toggleMessage(!0,e,"error"),o.$appDigest(),{result:e,status:!1})).then(t=>{this.form.resetFormState(),this.form.onResultCb(t.result,t.status,e)})}}ngOnDestroy(){this._debouncedSavePrevDataValues&&this._debouncedSavePrevDataValues.cancel&&(this._debouncedSavePrevDataValues.cancel(),this._debouncedSavePrevDataValues=null),this.form=null}static{this.\u0275fac=v.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:v,type:W,deps:[{token:x,self:!0},{token:C.LiveTableComponent,optional:!0},{token:y.ToDatePipe},{token:b.AbstractDialogService},{token:"formlayout",attribute:!0}],target:v.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=v.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:W,isStandalone:!0,selector:"[wmLiveForm]",host:{listeners:{keydown:"onKeydownHandler($event)"}},ngImport:v})}}v.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:v,type:W,decorators:[{type:a.Directive,args:[{standalone:!0,selector:"[wmLiveForm]"}]}],ctorParameters:()=>[{type:void 0,decorators:[{type:a.Self},{type:a.Inject,args:[x]}]},{type:C.LiveTableComponent,decorators:[{type:a.Optional}]},{type:y.ToDatePipe},{type:b.AbstractDialogService},{type:void 0,decorators:[{type:a.Attribute,args:["formlayout"]}]}],propDecorators:{onKeydownHandler:[{type:a.HostListener,args:["keydown",["$event"]]}]}}),e.DependsonDirective=V,e.FormActionDirective=N,e.FormComponent=x,e.FormFieldDirective=F,e.FormWidgetDirective=A,e.LiveActionsDirective=j,e.LiveFilterDirective=G,e.LiveFormDirective=W}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@wm/core"),require("@wm/components/base"),require("@wm/components/dialogs"),require("@wm/components/basic/iframe"),require("@wm/components/input/button")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@wm/core","@wm/components/base","@wm/components/dialogs","@wm/components/basic/iframe","@wm/components/input/button"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.dialogs=e.wm.components.dialogs||{},e.wm.components.dialogs.iframedialog={}),e.ng.core,e.wm.core,e.wm.components.base,e.wm.components.dialogs,e.wm.components.basic.iframe,e.wm.components.input.button)}(this,function(e,t,i,n,a,s,o){"use strict";var r,l,c=(r=t,l=Object.create(null),r&&Object.keys(r).forEach(function(e){if("default"!==e){var t=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(l,e,t.get?t:{enumerable:!0,get:function(){return r[e]}})}}),l.default=r,Object.freeze(l));const d={widgetType:"wm-iframedialog"};class p extends a.BaseDialog{static{this.initializeProps=void n.register("wm-iframedialog",new Map([["animation",n.PROP_STRING],["class",n.PROP_STRING],["closable",{value:!0,PROP_BOOLEAN:n.PROP_BOOLEAN}],["encodeurl",{value:!1,...n.PROP_BOOLEAN}],["height",{value:"400px",...n.PROP_STRING}],["iconclass",{value:"wi wi-globe",PROP_STRING:n.PROP_STRING}],["iconheight",n.PROP_STRING],["iconmargin",n.PROP_STRING],["iconurl",n.PROP_STRING],["iconwidth",n.PROP_STRING],["modal",{value:!1,...n.PROP_BOOLEAN}],["name",n.PROP_STRING],["oktext",{value:"OK",...n.PROP_STRING}],["showactions",{value:!0,...n.PROP_BOOLEAN}],["showheader",{value:!0,...n.PROP_BOOLEAN}],["tabindex",{value:0,...n.PROP_NUMBER}],["headinglevel",{value:"h4",...n.PROP_STRING}],["title",{value:"External Content",...n.PROP_STRING}],["url",{value:"//www.wavemaker.com",...n.PROP_STRING}]]))}constructor(e,t,n,a,s){null==n&&(n=!1);const o=!i.toBoolean(n)||"static";super(e,d,{class:`app-dialog modal-dialog app-iframe-dialog ${t||""}`,backdrop:o,keyboard:!i.toBoolean(n)},s)}getTemplateRef(){return this.dialogTemplate}onOk(e){this.invokeEventCallback("ok",{$event:e})}ngOnInit(){super.ngOnInit(),this.register(this.viewParent)}ngOnDestroy(){this.dialogTemplate=null,super.ngOnDestroy()}static{this.\u0275fac=c.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:c,type:p,deps:[{token:c.Injector},{token:"class",attribute:!0},{token:"modal",attribute:!0},{token:"closable",attribute:!0},{token:"EXPLICIT_CONTEXT",optional:!0}],target:c.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=c.\u0275\u0275ngDeclareComponent({minVersion:"17.0.0",version:"20.3.19",type:p,isStandalone:!0,selector:"div[wmIframeDialog]",providers:[n.provideAsWidgetRef(p),n.provideAsDialogRef(p)],viewQueries:[{propertyName:"dialogTemplate",first:!0,predicate:["dialogTemplate"],descendants:!0,static:!0}],usesInheritance:!0,ngImport:c,template:'<ng-template #dialogTemplate>\n @if (showheader) {\n <div wmDialogHeader [closable]="closable"\n [iconclass]="iconclass"\n [iconurl]="iconurl"\n [iconwidth]="iconwidth"\n [iconheight]="iconheight"\n [iconmargin]="iconmargin"\n [heading]="title"\n [headinglevel]="headinglevel"\n [title]="title"\n [titleid]="titleId"\n ></div>\n }@else if (!showheader && title) {\n <h4 [id]="titleId" class="sr-only">\n {{ title }}\n </h4>\n }\n <div wmDialogBody>\n <div wmIframe encodeurl.bind="encodeurl" iframesrc.bind="url" height.bind="height" width.bind="width" hint.bind="hint"></div>\n </div>\n @if (showactions) {\n <div wmDialogFooter>\n <button (click)="onOk($event)" [attr.aria-label]="oktext" caption.bind="oktext" class="btn-primary ok-action"\n wmButton></button>\n </div>\n }\n</ng-template>\n',dependencies:[{kind:"component",type:s.IframeComponent,selector:"[wmIframe]"},{kind:"directive",type:a.DialogBodyDirective,selector:"div[wmDialogBody]"},{kind:"directive",type:a.DialogFooterDirective,selector:"div[wmDialogFooter]"},{kind:"component",type:a.DialogHeaderComponent,selector:"div[wmDialogHeader]",inputs:["iconwidth","iconheight","iconmargin","iconclass","iconurl","closable","heading","headinglevel","subheading","titleid","title"]},{kind:"component",type:o.ButtonComponent,selector:"button[wmButton]",exportAs:["wmButton"]}]})}}c.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:c,type:p,decorators:[{type:t.Component,args:[{standalone:!0,imports:[s.IframeComponent,a.DialogBodyDirective,a.DialogFooterDirective,a.DialogHeaderComponent,o.ButtonComponent],selector:"div[wmIframeDialog]",providers:[n.provideAsWidgetRef(p),n.provideAsDialogRef(p)],template:'<ng-template #dialogTemplate>\n @if (showheader) {\n <div wmDialogHeader [closable]="closable"\n [iconclass]="iconclass"\n [iconurl]="iconurl"\n [iconwidth]="iconwidth"\n [iconheight]="iconheight"\n [iconmargin]="iconmargin"\n [heading]="title"\n [headinglevel]="headinglevel"\n [title]="title"\n [titleid]="titleId"\n ></div>\n }@else if (!showheader && title) {\n <h4 [id]="titleId" class="sr-only">\n {{ title }}\n </h4>\n }\n <div wmDialogBody>\n <div wmIframe encodeurl.bind="encodeurl" iframesrc.bind="url" height.bind="height" width.bind="width" hint.bind="hint"></div>\n </div>\n @if (showactions) {\n <div wmDialogFooter>\n <button (click)="onOk($event)" [attr.aria-label]="oktext" caption.bind="oktext" class="btn-primary ok-action"\n wmButton></button>\n </div>\n }\n</ng-template>\n'}]}],ctorParameters:()=>[{type:c.Injector},{type:void 0,decorators:[{type:t.Attribute,args:["class"]}]},{type:void 0,decorators:[{type:t.Attribute,args:["modal"]}]},{type:void 0,decorators:[{type:t.Attribute,args:["closable"]}]},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}],propDecorators:{dialogTemplate:[{type:t.ViewChild,args:["dialogTemplate",{static:!0}]}]}}),e.IframeDialogComponent=p}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@wm/core"),require("@wm/components/base"),require("@wm/components/data/form")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@wm/core","@wm/components/base","@wm/components/data/form"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.dialogs=e.wm.components.dialogs||{},e.wm.components.dialogs.logindialog={}),e.ng.core,e.wm.core,e.wm.components.base,e.wm.components.data.form)}(this,function(e,t,i,n,a){"use strict";function s(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var o=s(t),r=s(n);class l{constructor(e,t){this.contexts=e,this.dialogRef=t,this.contexts[0].doLogin=()=>this.doLogin()}hideMsg(){this.msgCmp&&this.msgCmp.hideMessage()}showError(e){this.msgCmp&&this.msgCmp.showMessage(e,"error")}showLoading(){this.msgCmp&&this.msgCmp.showMessage("Loading...","loading")}onSuccess(){this.hideMsg()}onError(e){this.showError(e)}getLoginDetails(){return this.formCmp.first.dataoutput}doLogin(){const e=this.getLoginDetails(),t=this.dialogRef.eventsource;t&&e.j_username&&e.j_password&&(this.showLoading(),t.invoke({loginInfo:e},this.onSuccess.bind(this),this.onError.bind(this)))}ngAfterViewInit(){this.dialogOpenSubscription=this.dialogRef.bsModal.onShown.subscribe(()=>{setTimeout(()=>{this.dialogRef.$element.find(".app-textbox").keypress(e=>{13===e.which&&(e.stopPropagation(),i.$appDigest(),this.doLogin())})})})}ngOnDestroy(){this.dialogOpenSubscription.unsubscribe()}static{this.\u0275fac=o.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:o,type:l,deps:[{token:n.Context,self:!0},{token:r.DialogRef,self:!0}],target:o.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=o.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:l,isStandalone:!0,selector:"[wmDialog][wmLoginDialog]",queries:[{propertyName:"msgCmp",first:!0,predicate:n.MessageComponent,descendants:!0},{propertyName:"formCmp",predicate:a.FormComponent}],ngImport:o})}}o.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:o,type:l,decorators:[{type:t.Directive,args:[{standalone:!0,selector:"[wmDialog][wmLoginDialog]"}]}],ctorParameters:()=>[{type:Array,decorators:[{type:t.Self},{type:t.Inject,args:[n.Context]}]},{type:r.DialogRef,decorators:[{type:t.Self}]}],propDecorators:{formCmp:[{type:t.ContentChildren,args:[a.FormComponent]}],msgCmp:[{type:t.ContentChild,args:[n.MessageComponent]}]}}),e.LoginDialogDirective=l}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@wm/core"),require("@wm/components/base"),require("@wm/components/dialogs"),require("@wm/components/input/button"),require("@angular/common")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@wm/core","@wm/components/base","@wm/components/dialogs","@wm/components/input/button","@angular/common"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.dialogs=e.wm.components.dialogs||{},e.wm.components.dialogs.partialdialog={}),e.ng.core,e.wm.core,e.wm.components.base,e.wm.components.dialogs,e.wm.components.input.button,e.ng.common)}(this,function(e,t,i,n,a,s,o){"use strict";function r(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var l=r(t),c=r(i);const d={widgetType:"wm-partialdialog"};class p extends a.BaseDialog{static{this.initializeProps=void n.register("wm-partialdialog",new Map([["animation",n.PROP_STRING],["class",n.PROP_STRING],["closable",{value:!0,PROP_BOOLEAN:n.PROP_BOOLEAN}],["content",n.PROP_STRING],["iconclass",{value:"wi wi-file",PROP_STRING:n.PROP_STRING}],["iconheight",n.PROP_STRING],["iconmargin",n.PROP_STRING],["iconurl",n.PROP_STRING],["iconwidth",n.PROP_STRING],["modal",{value:!1,...n.PROP_BOOLEAN}],["name",n.PROP_STRING],["oktext",{value:"OK",...n.PROP_STRING}],["showactions",{value:!0,...n.PROP_BOOLEAN}],["tabindex",{value:0,...n.PROP_NUMBER}],["headinglevel",{value:"h4",...n.PROP_STRING}],["title",{value:"Page Content",...n.PROP_STRING}]]))}constructor(e,t,n,a,s,o){null==a&&(a=!1);const r=!i.toBoolean(a)||"static";super(e,d,{class:`app-dialog modal-dialog app-page-dialog ${n||""}`,backdrop:r,keyboard:!i.toBoolean(a)},o),this.app=t}getTemplateRef(){return this.dialogTemplate}onOk(e){this.invokeEventCallback("ok",{$event:e})}ngOnInit(){super.ngOnInit(),this.register(this.viewParent)}setPartialLoadListener(){this.partialLoadedSubscription&&(this.partialLoadedSubscription(),this.partialLoadedSubscription=null),this.partialLoadedSubscription=this.app.subscribe("partialLoaded",()=>{const e=this.partialRef?.nativeElement;let t;e&&(t=e.widget,this.Widgets=t.Widgets,this.Variables=t.Variables,this.Actions=t.Actions),this.partialLoadedSubscription&&(this.partialLoadedSubscription(),this.partialLoadedSubscription=null)})}open(e){super.open(e),this.setPartialLoadListener()}ngOnDestroy(){this.partialLoadedSubscription&&(this.partialLoadedSubscription(),this.partialLoadedSubscription=null),this.partialRef=null,this.dialogContent=null,super.ngOnDestroy()}static{this.\u0275fac=l.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:l,type:p,deps:[{token:l.Injector},{token:c.App},{token:"class",attribute:!0},{token:"modal",attribute:!0},{token:"closable",attribute:!0},{token:"EXPLICIT_CONTEXT",optional:!0}],target:l.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=l.\u0275\u0275ngDeclareComponent({minVersion:"17.0.0",version:"20.3.19",type:p,isStandalone:!0,selector:"div[wmPartialDialog]",providers:[n.provideAsWidgetRef(p),n.provideAsDialogRef(p)],queries:[{propertyName:"dialogContent",first:!0,predicate:t.TemplateRef,descendants:!0},{propertyName:"partialRef",first:!0,predicate:["partial"],descendants:!0}],viewQueries:[{propertyName:"dialogTemplate",first:!0,predicate:["dialogTemplate"],descendants:!0,static:!0}],usesInheritance:!0,ngImport:l,template:'<ng-template #dialogTemplate>\n <div wmDialogHeader [closable]="closable"\n [iconclass]="iconclass"\n [iconurl]="iconurl"\n [iconwidth]="iconwidth"\n [iconheight]="iconheight"\n [iconmargin]="iconmargin"\n [heading]="title"\n [headinglevel]="headinglevel"\n [title]="title"\n [titleid]="titleId"\n ></div>\n <div wmDialogBody>\n <ng-container *ngTemplateOutlet="dialogContent"></ng-container>\n </div>\n @if (showactions) {\n <div wmDialogFooter>\n <button (click)="onOk($event)" [attr.aria-label]="oktext" caption.bind="oktext" class="btn-primary ok-action"\n wmButton></button>\n </div>\n }\n</ng-template>\n',dependencies:[{kind:"directive",type:a.DialogBodyDirective,selector:"div[wmDialogBody]"},{kind:"directive",type:a.DialogFooterDirective,selector:"div[wmDialogFooter]"},{kind:"component",type:a.DialogHeaderComponent,selector:"div[wmDialogHeader]",inputs:["iconwidth","iconheight","iconmargin","iconclass","iconurl","closable","heading","headinglevel","subheading","titleid","title"]},{kind:"component",type:s.ButtonComponent,selector:"button[wmButton]",exportAs:["wmButton"]},{kind:"directive",type:o.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]}]})}}l.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:l,type:p,decorators:[{type:t.Component,args:[{standalone:!0,imports:[a.DialogBodyDirective,a.DialogFooterDirective,a.DialogHeaderComponent,s.ButtonComponent,o.NgTemplateOutlet],selector:"div[wmPartialDialog]",providers:[n.provideAsWidgetRef(p),n.provideAsDialogRef(p)],template:'<ng-template #dialogTemplate>\n <div wmDialogHeader [closable]="closable"\n [iconclass]="iconclass"\n [iconurl]="iconurl"\n [iconwidth]="iconwidth"\n [iconheight]="iconheight"\n [iconmargin]="iconmargin"\n [heading]="title"\n [headinglevel]="headinglevel"\n [title]="title"\n [titleid]="titleId"\n ></div>\n <div wmDialogBody>\n <ng-container *ngTemplateOutlet="dialogContent"></ng-container>\n </div>\n @if (showactions) {\n <div wmDialogFooter>\n <button (click)="onOk($event)" [attr.aria-label]="oktext" caption.bind="oktext" class="btn-primary ok-action"\n wmButton></button>\n </div>\n }\n</ng-template>\n'}]}],ctorParameters:()=>[{type:l.Injector},{type:c.App},{type:void 0,decorators:[{type:t.Attribute,args:["class"]}]},{type:void 0,decorators:[{type:t.Attribute,args:["modal"]}]},{type:void 0,decorators:[{type:t.Attribute,args:["closable"]}]},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}],propDecorators:{dialogTemplate:[{type:t.ViewChild,args:["dialogTemplate",{static:!0}]}],dialogContent:[{type:t.ContentChild,args:[t.TemplateRef]}],partialRef:[{type:t.ContentChild,args:["partial"]}]}}),e.PartialDialogComponent=p}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("tslib"),require("@angular/common"),require("@angular/core"),require("@wm/core"),require("@wm/components/base"),require("lodash-es")):"function"==typeof define&&define.amd?define(["exports","tslib","@angular/common","@angular/core","@wm/core","@wm/components/base","lodash-es"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.containers=e.wm.components.containers||{},e.wm.components.containers.accordion={}),e.tslib,e.ng.common,e.ng.core,e.wm.core,e.wm.components.base,e._)}(this,function(e,t,i,n,a,s,o){"use strict";function r(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var l=r(i),c=r(n),d=r(a);const p={widgetType:"wm-accordion",hostClass:"app-accordion panel-group"};class m extends s.StylableComponent{static{this.initializeProps=void s.register("wm-accordion",new Map([["class",s.PROP_STRING],["closeothers",{value:!0,...s.PROP_BOOLEAN}],["dataset",s.PROP_ANY],["defaultpaneindex",{value:0,...s.PROP_NUMBER}],["name",s.PROP_STRING],["nodatamessage",{value:"No Data Found",...s.PROP_STRING}],["show",{value:!0,...s.PROP_BOOLEAN}],["statehandler",{value:"none",...s.PROP_STRING}],["tabindex",{value:0,...s.PROP_NUMBER}],["type",s.PROP_STRING]]))}constructor(e,t,i,n){let o=a.noop;super(e,p,n,new Promise(e=>o=e)),this.dynamicComponentRefs=[],this.promiseResolverFn=o,this.statePersistence=t,this.dynamicComponentProvider=i,this.dynamicPanes=[],this.dynamicPaneIndex=0,s.styler(this.nativeElement,this,s.APPLY_STYLES_TYPE.SCROLLABLE_CONTAINER)}notifyChange(e,t,i){if(t){this.closePanesExcept(e);const t=this.getPaneIndexByRef(e);this.activePane=e.getWidget(),i&&this.invokeEventCallback("change",{$event:i,newPaneIndex:t,oldPaneIndex:this.activePaneIndex}),this.activePaneIndex=t}const n=this.statePersistence.computeMode(this.statehandler);if(i&&n&&"none"!==n.toLowerCase()){const e=[];this.panes.forEach(function(t){t.isActive&&e.push(t.name)}),e.length?this.statePersistence.setWidgetState(this,e):this.statePersistence.removeWidgetState(this)}}registerDynamicPane(e){this.dynamicPanes.push(e);if(this.dynamicPanes.length===this.dynamicPaneIndex)for(let e=0;e<this.dynamicPanes.length;e++){const t=o.find(this.dynamicPanes,t=>t.dynamicPaneIndex===e);o.find(this.panes.toArray(),t)||(this.panes.reset([...this.panes.toArray(),t]),t.active&&t.expand())}}addPane(e){o.isArray(e)||(e=[e]);const t=[];return o.forEach(e,(e,i)=>{const n=o.find(this.panes.toArray(),{name:e.name}),a=o.indexOf(t,e.name);if(n||a>0)return void console.warn(`The tab pane with name ${e.name} already exists`);let s="",r="";this.dynamicPaneIndex++;const l=e.name?e.name:`accordionpane${this.panes.toArray().length+(i+1)}`;t.push(l);const c=o.get(e,"params");o.forEach(e,(e,t)=>{"params"!==t&&(r=`${r} ${t}="${e}"`)}),o.forEach(c,(e,t)=>{s=`${s} <wm-param name="${t}" value="${e}"></wm-param>`});const d=`<wm-accordionpane dynamicPaneIndex="${this.dynamicPaneIndex-1}" isdynamic="true" name="${l}" ${r}>\n ${s}\n </wm-accordionpane>`;this._dynamicContext||(this._dynamicContext=Object.create(this.viewParent),this._dynamicContext[this.getAttr("wmAccordian")]=this),this.dynamicComponentProvider.addComponent(this.getNativeElement(),d,this._dynamicContext,{inj:this.inj}).then(e=>{e&&this.dynamicComponentRefs.push(e)})}),t}removePane(e){const t=this.getPaneRefByName(e);t&&t.remove()}isValidPaneIndex(e){return e>=0&&e<this.panes.length}getPaneRefByName(e){return o.find(this.panes.toArray(),{name:e})}getPaneIndexByRef(e){return this.panes.toArray().indexOf(e)}getPaneRefByIndex(e){return this.panes.toArray()[e]}closePanesExcept(e){o.isNumber(e)&&(e=this.getPaneRefByIndex(e)),this.closeothers&&this.panes.forEach(t=>{t!==e&&t.collapse()})}expandPane(e){this.closePanesExcept(e),this.panes.toArray()[e].expand()}onDataChange(e){this.fieldDefs=s.createArrayFrom(e)}getWidgets(e,t){let i;const n=[];if(e)return a.isDefined(t)?(t=+t||0,i=o.get(this.panes.toArray(),t),i?[o.get(i.currentAccordionWidgets,e)]:void 0):(o.forEach(this.panes.toArray(),t=>{i=o.get(t.currentAccordionWidgets,e),i&&n.push(i)}),n)}get currentAccordionPaneIndex(){return this.activePaneIndex}get isFirstAccordionPane(){return this.panes.first.widgetId===this.activePane.widgetId}get isLastAccordionPane(){return this.panes.last.widgetId===this.activePane.widgetId}onPropertyChange(e,t,i){if("defaultpaneindex"===e)this.defaultpaneindex=t;else if("dataset"===e)this.onDataChange(t);else if("statehandler"===e){const e=this.statePersistence.getWidgetState(this);let i=[];"none"!==t&&o.isArray(e)?e.forEach(e=>{i=this.panes.filter(function(t){return e===t.name}),i.length?this.expandPane(this.getPaneIndexByRef(i[0])):console.warn("Accordion pane name "+e+" in State is incorrect.")}):this.isValidPaneIndex(this.defaultpaneindex)&&this.expandPane(this.defaultpaneindex)}else{if("tabindex"===e)return;super.onPropertyChange(e,t,i)}}ngAfterContentInit(){super.ngAfterContentInit(),this.promiseResolverFn(),this.panesChangesSubscription=this.panes.changes.subscribe(e=>{this.panes.length&&this.expandPane(this.defaultpaneindex)})}ngOnDestroy(){this.panesChangesSubscription&&(this.panesChangesSubscription.unsubscribe(),this.panesChangesSubscription=null),this.dynamicComponentRefs&&this.dynamicComponentRefs.length&&(this.dynamicComponentRefs.forEach(e=>{e&&e.destroy&&e.destroy()}),this.dynamicComponentRefs=[]),this._dynamicContext&&(Object.keys(this._dynamicContext).forEach(e=>{delete this._dynamicContext[e]}),this._dynamicContext=null),this.dynamicPanes&&(this.dynamicPanes=[]),this.fieldDefs=null,this.activePane=null,super.ngOnDestroy()}static{this.\u0275fac=c.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:c,type:m,deps:[{token:c.Injector},{token:d.StatePersistence},{token:d.DynamicComponentRefProvider},{token:"EXPLICIT_CONTEXT",optional:!0}],target:c.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=c.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:m,isStandalone:!0,selector:"div[wmAccordion]",providers:[s.provideAsWidgetRef(m)],queries:[{propertyName:"panes",predicate:c.forwardRef(()=>e.AccordionPaneComponent)}],exportAs:["wmAccordion"],usesInheritance:!0,ngImport:c})}}c.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:c,type:m,decorators:[{type:n.Directive,args:[{standalone:!0,selector:"div[wmAccordion]",exportAs:"wmAccordion",providers:[s.provideAsWidgetRef(m)]}]}],ctorParameters:()=>[{type:c.Injector},{type:d.StatePersistence},{type:d.DynamicComponentRefProvider},{type:void 0,decorators:[{type:n.Inject,args:["EXPLICIT_CONTEXT"]},{type:n.Optional}]}],propDecorators:{panes:[{type:n.ContentChildren,args:[n.forwardRef(()=>e.AccordionPaneComponent)]}]}});const h={widgetType:"wm-accordionpane",hostClass:"app-accordion-panel panel"};e.AccordionPaneComponent=class e extends s.StylableComponent{static{this.initializeProps=void s.register("wm-accordionpane",new Map([["active",s.PROP_BOOLEAN],["badgetype",{value:"default",...s.PROP_STRING}],["badgevalue",s.PROP_STRING],["class",s.PROP_STRING],["content",s.PROP_STRING],["dynamicPaneIndex",s.PROP_NUMBER],["iconclass",s.PROP_STRING],["isdefaultpane",s.PROP_BOOLEAN],["isdynamic",s.PROP_STRING],["name",s.PROP_STRING],["show",{value:!0,...s.PROP_BOOLEAN}],["smoothscroll",{value:!1,...s.PROP_BOOLEAN}],["subheading",s.PROP_STRING],["tabindex",{value:0,...s.PROP_NUMBER}],["title",{value:"Title",...s.PROP_STRING}],...s.AUTO_LAYOUT_PROPS]))}constructor(e,t,i,n){super(e,h,i),this.accordionRef=t,this.app=n,this.isActive=!1,this.$lazyLoad=a.noop,this._currentAccordionWidgets={},s.styler(this.nativeElement,this,s.APPLY_STYLES_TYPE.SHELL),a.removeAttr(this.nativeElement,"title")}expand(e){this.isActive||(this.isActive=!0,this.$lazyLoad(),this.redrawChildren(),this.invokeEventCallback("expand",{$event:e}),this.notifyParent(!0,e))}collapse(e){this.isActive&&(this.isActive=!1,this.invokeEventCallback("collapse",{$event:e}),this.notifyParent(!1,e))}remove(){const e=this.accordionRef.getPaneIndexByRef(this);this.isActive&&this.accordionRef.panes.length>1&&(this===this.accordionRef.panes.last?this.accordionRef.panes.toArray()[e-1].expand():this.accordionRef.panes.toArray()[e+1].expand());const t=this.accordionRef.panes.toArray();t.splice(this.accordionRef.getPaneIndexByRef(this),1),this.accordionRef.panes.reset([...t]),this.nativeElement.remove()}toggle(e){this.isActive?this.collapse(e):this.expand(e)}redrawChildren(){setTimeout(()=>{this.reDrawableComponents&&this.reDrawableComponents.forEach(e=>e.redraw())},100)}notifyParent(e,t){this.accordionRef.notifyChange(this,e,t)}get currentAccordionWidgets(){return s.getCurrentWidgets(this.nativeElement,this._currentAccordionWidgets)}onPropertyChange(e,t,i){if("content"===e)this.isActive&&setTimeout(()=>this.$lazyLoad(),100);else{if("tabindex"===e)return;super.onPropertyChange(e,t,i)}}ngAfterViewInit(){super.ngAfterViewInit(),s.styler(this.nativeElement.querySelector(".panel-body"),this,s.APPLY_STYLES_TYPE.INNER_SHELL),this.isdynamic&&this.accordionRef.registerDynamicPane(this)}ngOnDestroy(){this.reDrawableComponents&&(this.reDrawableComponents=null),this.$lazyLoad=null,super.ngOnDestroy()}static{this.\u0275fac=c.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:c,type:e,deps:[{token:c.Injector},{token:m},{token:"EXPLICIT_CONTEXT",optional:!0},{token:d.App}],target:c.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=c.\u0275\u0275ngDeclareComponent({minVersion:"14.0.0",version:"20.3.19",type:e,isStandalone:!0,selector:"div[wmAccordionPane]",providers:[s.provideAsWidgetRef(e)],queries:[{propertyName:"reDrawableComponents",predicate:s.RedrawableDirective,descendants:!0}],exportAs:["wmAccordionPane"],usesInheritance:!0,ngImport:c,template:'<div class="panel-heading clearfix" (click)="toggle($event)" [ngClass]="{active: isActive}">\n <h3 class="panel-title">\n <a [attr.aria-expanded]="isActive" [tabindex]="tabindex"\n class="accordion-toggle clearfix"\n href="javascript:void(0);" role="button">\n <div class="pull-left">\n <i class="app-icon panel-icon {{iconclass}}" [hidden]="!iconclass"></i>\n </div>\n <div class="pull-left">\n <div class="heading" [innerHTML]="title"></div>\n <div class="description" [innerHTML]="subheading"></div>\n </div>\n <div class="panel-actions pull-right">\n \x3c!-- added class as badge, app-label since it needs this classes to trigger the badge tokens --\x3e\n <span class="badge app-label label-{{badgetype}}">{{ badgevalue }}</span>\n <span class="app-icon panel-action wi"\n title="{{appLocale.LABEL_COLLAPSE}}/{{appLocale.LABEL_EXPAND}}">\n <i [ngClass]="isActive ? \'wi-minus\' : \'wi-plus\'"></i>\n </span>\n </div>\n </a>\n </h3>\n</div>\n<div [ngClass]="isActive ? \'collapse in\' : \'collapse\'" class="panel-collapse collapse">\n <div class="panel-body" partial-container-target>\n <ng-content></ng-content>\n </div>\n</div>\n',dependencies:[{kind:"ngmodule",type:i.CommonModule},{kind:"directive",type:l.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]}]})}},e.AccordionPaneComponent=t.__decorate([s.AutoLayout({targetSelector:".panel-body"}),t.__metadata("design:paramtypes",[n.Injector,m,Object,a.App])],e.AccordionPaneComponent),c.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:c,type:e.AccordionPaneComponent,decorators:[{type:n.Component,args:[{standalone:!0,imports:[i.CommonModule],selector:"div[wmAccordionPane]",providers:[s.provideAsWidgetRef(e.AccordionPaneComponent)],exportAs:"wmAccordionPane",template:'<div class="panel-heading clearfix" (click)="toggle($event)" [ngClass]="{active: isActive}">\n <h3 class="panel-title">\n <a [attr.aria-expanded]="isActive" [tabindex]="tabindex"\n class="accordion-toggle clearfix"\n href="javascript:void(0);" role="button">\n <div class="pull-left">\n <i class="app-icon panel-icon {{iconclass}}" [hidden]="!iconclass"></i>\n </div>\n <div class="pull-left">\n <div class="heading" [innerHTML]="title"></div>\n <div class="description" [innerHTML]="subheading"></div>\n </div>\n <div class="panel-actions pull-right">\n \x3c!-- added class as badge, app-label since it needs this classes to trigger the badge tokens --\x3e\n <span class="badge app-label label-{{badgetype}}">{{ badgevalue }}</span>\n <span class="app-icon panel-action wi"\n title="{{appLocale.LABEL_COLLAPSE}}/{{appLocale.LABEL_EXPAND}}">\n <i [ngClass]="isActive ? \'wi-minus\' : \'wi-plus\'"></i>\n </span>\n </div>\n </a>\n </h3>\n</div>\n<div [ngClass]="isActive ? \'collapse in\' : \'collapse\'" class="panel-collapse collapse">\n <div class="panel-body" partial-container-target>\n <ng-content></ng-content>\n </div>\n</div>\n'}]}],ctorParameters:()=>[{type:c.Injector},{type:m},{type:void 0,decorators:[{type:n.Inject,args:["EXPLICIT_CONTEXT"]},{type:n.Optional}]},{type:d.App}],propDecorators:{reDrawableComponents:[{type:n.ContentChildren,args:[s.RedrawableDirective,{descendants:!0}]}]}}),e.AccordionDirective=m}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@wm/components/base"),require("@wm/core")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@wm/components/base","@wm/core"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.containers=e.wm.components.containers||{},e.wm.components.containers.layoutgrid={}),e.ng.core,e.wm.components.base,e.wm.core)}(this,function(e,t,i,n){"use strict";function a(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var s=a(t),o=a(n);const r={widgetType:"wm-layoutgrid",hostClass:"app-grid-layout clearfix"};class l extends i.BaseContainerComponent{static{this.initializeProps=void i.register("wm-layoutgrid",new Map([["class",i.PROP_STRING],["name",i.PROP_STRING],["show",{value:!0,...i.PROP_BOOLEAN}]]))}constructor(e,t){super(e,r,t),i.styler(this.nativeElement,this,i.APPLY_STYLES_TYPE.CONTAINER)}static{this.\u0275fac=s.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:s,type:l,deps:[{token:s.Injector},{token:"EXPLICIT_CONTEXT",optional:!0}],target:s.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=s.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:l,isStandalone:!0,selector:"[wmLayoutGrid]",providers:[i.provideAsWidgetRef(l)],usesInheritance:!0,ngImport:s})}}s.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:s,type:l,decorators:[{type:t.Directive,args:[{standalone:!0,selector:"[wmLayoutGrid]",providers:[i.provideAsWidgetRef(l)]}]}],ctorParameters:()=>[{type:s.Injector},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}]});const c={widgetType:"wm-layout-grid-row",hostClass:"app-grid-row clearfix"};class d extends i.StylableComponent{static{this.initializeProps=void i.register("wm-layout-grid-row",new Map([["class",i.PROP_STRING],["name",i.PROP_STRING],["show",{value:!0,...i.PROP_BOOLEAN}]]))}constructor(e,t){super(e,c,t),i.styler(this.nativeElement,this,i.APPLY_STYLES_TYPE.CONTAINER)}static{this.\u0275fac=s.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:s,type:d,deps:[{token:s.Injector},{token:"EXPLICIT_CONTEXT",optional:!0}],target:s.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=s.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:d,isStandalone:!0,selector:"[wmLayoutGridRow]",providers:[i.provideAsWidgetRef(d)],usesInheritance:!0,ngImport:s})}}s.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:s,type:d,decorators:[{type:t.Directive,args:[{standalone:!0,selector:"[wmLayoutGridRow]",providers:[i.provideAsWidgetRef(d)]}]}],ctorParameters:()=>[{type:s.Injector},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}]});const p={widgetType:"wm-gridcolumn",hostClass:"app-grid-column"};class m extends i.StylableComponent{static{this.initializeProps=void i.register("wm-gridcolumn",new Map([["class",i.PROP_STRING],["name",i.PROP_STRING],["columnwidth",i.PROP_NUMBER],["show",{value:!0,...i.PROP_BOOLEAN}],["xscolumnwidth",i.PROP_NUMBER]]))}constructor(e,t,a,s){super(e,p,s),this.viewport=a,t&&n.setCSS(this.nativeElement,"overflow","auto"),i.styler(this.nativeElement,this,i.APPLY_STYLES_TYPE.CONTAINER)}onPropertyChange(e,t,i){"columnwidth"===e?(this.viewport.isMobileType&&!this.getAttr("xscolumnwidth")||!this.viewport.isMobileType)&&n.switchClass(this.nativeElement,`col-sm-${t}`,i?`col-sm-${i}`:""):super.onPropertyChange(e,t,i)}static{this.\u0275fac=s.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:s,type:m,deps:[{token:s.Injector},{token:"height",attribute:!0},{token:o.Viewport},{token:"EXPLICIT_CONTEXT",optional:!0}],target:s.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=s.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:m,isStandalone:!0,selector:"[wmLayoutGridColumn]",providers:[i.provideAsWidgetRef(m)],usesInheritance:!0,ngImport:s})}}s.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:s,type:m,decorators:[{type:t.Directive,args:[{standalone:!0,selector:"[wmLayoutGridColumn]",providers:[i.provideAsWidgetRef(m)]}]}],ctorParameters:()=>[{type:s.Injector},{type:void 0,decorators:[{type:t.Attribute,args:["height"]}]},{type:o.Viewport},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}]}),e.LayoutGridColumnDirective=m,e.LayoutGridRowDirective=d,e.LayoutgridDirective=l}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@wm/components/base")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@wm/components/base"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.containers=e.wm.components.containers||{},e.wm.components.containers.linearlayout={}),e.ng.core,e.wm.components.base)}(this,function(e,t,i){"use strict";var n,a,s=(n=t,a=Object.create(null),n&&Object.keys(n).forEach(function(e){if("default"!==e){var t=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(a,e,t.get?t:{enumerable:!0,get:function(){return n[e]}})}}),a.default=n,Object.freeze(a));const o={widgetType:"wm-linearlayout",hostClass:"app-linear-layout clearfix"},r={left:"flex-start",right:"flex-end",center:"center"},l={top:"flex-start",bottom:"flex-end",center:"center"};class c extends i.BaseContainerComponent{static{this.initializeProps=void i.register("wm-linearlayout",new Map([["class",i.PROP_STRING],["direction",i.PROP_STRING],["horizontalalign",i.PROP_STRING],["name",i.PROP_STRING],["show",{value:!0,...i.PROP_BOOLEAN}],["spacing",i.PROP_STRING],["verticalalign",i.PROP_STRING]]))}constructor(e,t){super(e,o,t),i.styler(this.nativeElement,this,i.APPLY_STYLES_TYPE.CONTAINER)}removeClass(e,t){e.removeClass((e,i)=>i.split(" ").filter(e=>e.startsWith(t)).join(" "))}changeDirection(e,t){this.removeClass(e,"app-linear-layout-direction"),e.addClass("app-linear-layout-direction-"+t),"row"===t||"row-reverse"===t?e.css("justify-content",r[this.horizontalalign]):"column"!==t&&"column-reverse"!==t||e.css("justify-content",l[this.verticalalign]),e.css("flex-direction",t)}onStyleChange(e,t,i){"horizontalalign"===e?"row"===this.direction||"row-reverse"===this.direction?this.$element.css("justify-content",r[t]):this.$element.css("align-items",r[t]):"verticalalign"===e&&("column"===this.direction||"column-reverse"===this.direction?this.$element.css("justify-content",l[t]):this.$element.css("align-items",l[t])),super.onStyleChange(e,t,i)}onPropertyChange(e,t,i){switch(e){case"direction":this.changeDirection(this.$element,t);break;case"horizontalalign":this.$element.css("justify-content",r[t]);break;case"verticalalign":this.$element.css("justify-content",l[t]);break;case"spacing":this.removeClass(this.$element,"app-linear-layout-spacing"),this.$element.addClass("app-linear-layout-spacing-"+t)}super.onPropertyChange(e,t,i)}static{this.\u0275fac=s.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:s,type:c,deps:[{token:s.Injector},{token:"EXPLICIT_CONTEXT",optional:!0}],target:s.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=s.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:c,isStandalone:!0,selector:"[wmLinearLayout]",providers:[i.provideAsWidgetRef(c)],usesInheritance:!0,ngImport:s})}}s.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:s,type:c,decorators:[{type:t.Directive,args:[{standalone:!0,selector:"[wmLinearLayout]",providers:[i.provideAsWidgetRef(c)]}]}],ctorParameters:()=>[{type:s.Injector},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}]});const d={widgetType:"wm-linearlayoutitem",hostClass:"app-linear-layout-item clearfix"};class p extends i.StylableComponent{static{this.initializeProps=void i.register("wm-linearlayoutitem",new Map([["class",i.PROP_STRING],["flexgrow",i.PROP_NUMBER],["name",i.PROP_STRING],["show",{value:!0,...i.PROP_BOOLEAN}]]))}constructor(e,t){super(e,d,t),i.styler(this.nativeElement,this,i.APPLY_STYLES_TYPE.CONTAINER)}onPropertyChange(e,t,i){if("flexgrow"===e)this.$element.css("flex-grow",t);super.onPropertyChange(e,t,i)}static{this.\u0275fac=s.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:s,type:p,deps:[{token:s.Injector},{token:"EXPLICIT_CONTEXT",optional:!0}],target:s.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=s.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:p,isStandalone:!0,selector:"[wmLinearLayoutItem]",providers:[i.provideAsWidgetRef(p)],usesInheritance:!0,ngImport:s})}}s.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:s,type:p,decorators:[{type:t.Directive,args:[{standalone:!0,selector:"[wmLinearLayoutItem]",providers:[i.provideAsWidgetRef(p)]}]}],ctorParameters:()=>[{type:s.Injector},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}]}),e.LinearLayoutDirective=c,e.LinearLayoutItemDirective=p}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common"),require("@wm/components/base"),require("@angular/core"),require("@wm/core"),require("ngx-bootstrap/dropdown"),require("@wm/components/navigation/menu"),require("lodash-es")):"function"==typeof define&&define.amd?define(["exports","@angular/common","@wm/components/base","@angular/core","@wm/core","ngx-bootstrap/dropdown","@wm/components/navigation/menu","lodash-es"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.containers=e.wm.components.containers||{},e.wm.components.containers.panel={}),e.ng.common,e.wm.components.base,e.ng.core,e.wm.core,e.ngxBootstrap.dropdown,e.wm.components.navigation.menu,e._)}(this,function(e,t,i,n,a,s,o,r){"use strict";function l(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var c=l(t),d=l(n),p=l(s);const m={widgetType:"wm-panel",hostClass:"app-panel panel"};class h extends o.MenuAdapterComponent{static{this.initializeProps=void i.register("wm-panel",new Map([["actions",{}],["animation",i.PROP_STRING],["autoclose",i.PROP_STRING],["badgetype",{value:"default",...i.PROP_STRING}],["badgevalue",i.PROP_STRING],["class",i.PROP_STRING],["closable",i.PROP_BOOLEAN],["collapsible",i.PROP_BOOLEAN],["conditionalclass",i.PROP_ANY],["conditionalstyle",i.PROP_ANY],["content",i.PROP_STRING],["datafield",i.PROP_STRING],["enablefullscreen",i.PROP_BOOLEAN],["expanded",{value:!0,...i.PROP_BOOLEAN}],["fullscreen",i.PROP_BOOLEAN],["helptext",i.PROP_STRING],["iconclass",i.PROP_STRING],["iconheight",i.PROP_STRING],["iconmargin",i.PROP_STRING],["iconurl",i.PROP_STRING],["iconwidth",i.PROP_STRING],["itemaction",i.PROP_STRING],["itemchildren",i.PROP_STRING],["itemicon",i.PROP_STRING],["itemlabel",i.PROP_STRING],["itemlink",i.PROP_STRING],["name",i.PROP_STRING],["show",{value:!0,...i.PROP_BOOLEAN}],["subheading",i.PROP_STRING],["title",i.PROP_STRING],["userrole",i.PROP_STRING],["hint",i.PROP_STRING]]))}get hideFooter(){return!this.hasFooter||!this.expanded}get showHeader(){return this.iconurl||this.iconclass||this.collapsible||this.actions||this.title||this.subheading||this.enablefullscreen}constructor(e,t){super(e,m,t),this.$lazyLoad=a.noop,this.expanded=!0,this.helpClass="",this.helptext="",i.styler(this.nativeElement,this,i.APPLY_STYLES_TYPE.SHELL),this.fullScreenTitle=`${this.appLocale.LABEL_FULLSCREEN}/${this.appLocale.LABEL_EXITFULLSCREEN}`,this.expandCollapseTitle=`${this.appLocale.LABEL_COLLAPSE}/${this.appLocale.LABEL_EXPAND}`,a.removeAttr(this.nativeElement,"title")}toggle(e){this.collapsible&&(this.invokeEventCallback(this.expanded?"collapse":"expand",{$event:e}),this.expanded=!this.expanded,this.expanded&&(this.$lazyLoad(),this.reDrawChildren()))}expand(e){this.expanded||this.toggle(e)}collapse(e){this.expanded&&this.toggle(e)}toggleFullScreen(e){this.enablefullscreen&&(this.invokeEventCallback(this.fullscreen?"exitfullscreen":"fullscreen",{$event:e}),this.fullscreen=!this.fullscreen,a.toggleClass(this.nativeElement,"fullscreen",this.fullscreen),this.reDrawChildren()),this.computeDimensions()}toggleHelp(){this.helpClass=this.helpClass?"":"show-help",a.toggleClass(this.nativeElement,"show-help",!!this.helpClass),a.$appDigest()}menuActionItemClick(e,t){this.selectedAction=r.omit(t,["children","value"]),this.invokeEventCallback("actionsclick",{$event:e,$item:this.selectedAction})}close(e){this.getWidget().show=!1,this.invokeEventCallback("close",{$event:e})}computeDimensions(){const e=this.panelHeader.nativeElement.offsetHeight,t=this.nativeElement.querySelector(".panel-footer"),i=this.panelContent.nativeElement,n=window.innerHeight;let s;s=this.fullscreen?this.hideFooter?n-e:n-(t.offsetHeight+e):this.height||"",a.setCSS(i,"height",s)}reDrawChildren(){setTimeout(()=>{this.reDrawableComponents&&this.reDrawableComponents.forEach(e=>e.redraw())},100)}onPropertyChange(e,t,i){"expanded"===e?this.expanded=t:"content"===e?setTimeout(()=>{!this.expanded&&this.collapsible||this.$lazyLoad()},20):super.onPropertyChange(e,t,i)}ngAfterContentInit(){super.ngAfterContentInit(),this.hasFooter=!!this.nativeElement.querySelector("[wmPanelFooter]"),i.styler(this.panelBody.nativeElement,this,i.APPLY_STYLES_TYPE.INNER_SHELL)}ngOnDestroy(){this.panelHeader=null,this.panelContent=null,this.panelBody=null,this.reDrawableComponents&&(this.reDrawableComponents=null),this.$lazyLoad=null,super.ngOnDestroy()}static{this.\u0275fac=d.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:d,type:h,deps:[{token:d.Injector},{token:"EXPLICIT_CONTEXT",optional:!0}],target:d.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=d.\u0275\u0275ngDeclareComponent({minVersion:"17.0.0",version:"20.3.19",type:h,isStandalone:!0,selector:"[wmPanel]",providers:[i.provideAsWidgetRef(h)],queries:[{propertyName:"reDrawableComponents",predicate:i.RedrawableDirective,descendants:!0}],viewQueries:[{propertyName:"panelHeader",first:!0,predicate:["panelHeading"],descendants:!0},{propertyName:"panelContent",first:!0,predicate:["panelContent"],descendants:!0,static:!0},{propertyName:"panelBody",first:!0,predicate:["panelBody"],descendants:!0,static:!0}],exportAs:["wmPanel"],usesInheritance:!0,ngImport:d,template:'@if (showHeader) {\n <div class="panel-heading {{helpClass}}" #panelHeading>\n <div class="panel-title">\n <a href="javascript:void(0)" class="panel-toggle" (click)="toggle($event)" [attr.aria-expanded]="!!expanded">\n <div class="pull-left">\n @if (iconclass && !iconurl) {\n <i class="app-icon panel-icon {{iconclass}}"></i>\n }\n @if (iconurl) {\n <img data-identifier="img" title="iconurl" alt="Panel icon" class="panel-image-icon"\n [src]="iconurl | image"\n [ngStyle]="{width: iconwidth ,height: iconheight, margin: iconmargin}" />\n }\n </div>\n <div class="pull-left">\n <div class="heading" [innerHTML]="title" [title]="title"></div>\n <div class="description" [innerHTML]="subheading"></div>\n </div>\n </a>\n <div class="panel-actions">\n @if (badgevalue) {\n <span\n class="app-badge label label-{{badgetype}}">{{badgevalue}}</span>\n }\n @if (actions) {\n <div wmMenu aria-label="dropdown" dropdown type="anchor" class="panel-action" dataset.bind="actions"\n caption="" menuposition="down,left" iconclass="wi wi-more-vert"\n autoclose.bind="autoclose" datafield.bind="datafield" select.event="menuActionItemClick($event,$item)">\n </div>\n }\n @if (helptext) {\n <button type="button" aria-label="Help" class="app-icon panel-action wi" [title]="appLocale.LABEL_HELP"\n (click)="toggleHelp()"><i class="wi-question"></i></button>\n }\n @if (collapsible) {\n <button type="button" aria-label="Collapse/Expand" class="app-icon wi panel-action"\n [title]="expandCollapseTitle" (click)="toggle($event);" [attr.aria-expanded]="!!expanded"><i\n [ngClass]="expanded ? \'wi-minus\' : \'wi-plus\'"></i></button>\n }\n @if (enablefullscreen) {\n <button type="button" aria-label="Fullscreen/Exit" class="app-icon panel-action wi"\n [title]="fullScreenTitle" (click)="toggleFullScreen($event);"><i\n [ngClass]="fullscreen ? \'wi-fullscreen-exit\' : \'wi-fullscreen\'"></i></button>\n }\n @if (closable) {\n <button type="button" aria-label="Close button" class="app-icon panel-action"\n title="{{appLocale.LABEL_CLOSE}}" (click)="close($event)"><i\n class="wi wi-close"></i></button>\n }\n </div>\n </div>\n </div>\n }\n <div class="panel-content" [hidden]="!expanded" #panelContent>\n \x3c!-- Todo Bandhavya - implement smooth scroll --\x3e\n <div partial-container-target #panelBody [ngClass]="[\'panel-body\', helpClass]">\n <ng-content></ng-content>\n </div>\n <aside class="panel-help-message" [ngClass]="helpClass">\n <h5 class="panel-help-header" [textContent]="appLocale.LABEL_HELP"></h5>\n <div class="panel-help-content" [innerHTML]="helptext | trustAs : \'html\'"></div>\n </aside>\n </div>\n <div class="app-panel-footer panel-footer clearfix" [hidden]="hideFooter">\n <ng-content select="[wmPanelFooter]"></ng-content>\n </div>\n',dependencies:[{kind:"ngmodule",type:s.BsDropdownModule},{kind:"directive",type:p.BsDropdownDirective,selector:"[bsDropdown], [dropdown]",inputs:["placement","triggers","container","dropup","autoClose","isAnimated","insideClick","isDisabled","isOpen"],outputs:["isOpenChange","onShown","onHidden"],exportAs:["bs-dropdown"]},{kind:"ngmodule",type:t.CommonModule},{kind:"directive",type:c.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"directive",type:c.NgStyle,selector:"[ngStyle]",inputs:["ngStyle"]},{kind:"directive",type:i.TextContentDirective,selector:"[textContent]",inputs:["textContent"]},{kind:"component",type:o.MenuComponent,selector:"[wmMenu]"},{kind:"pipe",type:i.TrustAsPipe,name:"trustAs"}]})}}d.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:d,type:h,decorators:[{type:n.Component,args:[{standalone:!0,imports:[s.BsDropdownModule,t.CommonModule,i.TextContentDirective,i.TrustAsPipe,o.MenuComponent],selector:"[wmPanel]",providers:[i.provideAsWidgetRef(h)],exportAs:"wmPanel",template:'@if (showHeader) {\n <div class="panel-heading {{helpClass}}" #panelHeading>\n <div class="panel-title">\n <a href="javascript:void(0)" class="panel-toggle" (click)="toggle($event)" [attr.aria-expanded]="!!expanded">\n <div class="pull-left">\n @if (iconclass && !iconurl) {\n <i class="app-icon panel-icon {{iconclass}}"></i>\n }\n @if (iconurl) {\n <img data-identifier="img" title="iconurl" alt="Panel icon" class="panel-image-icon"\n [src]="iconurl | image"\n [ngStyle]="{width: iconwidth ,height: iconheight, margin: iconmargin}" />\n }\n </div>\n <div class="pull-left">\n <div class="heading" [innerHTML]="title" [title]="title"></div>\n <div class="description" [innerHTML]="subheading"></div>\n </div>\n </a>\n <div class="panel-actions">\n @if (badgevalue) {\n <span\n class="app-badge label label-{{badgetype}}">{{badgevalue}}</span>\n }\n @if (actions) {\n <div wmMenu aria-label="dropdown" dropdown type="anchor" class="panel-action" dataset.bind="actions"\n caption="" menuposition="down,left" iconclass="wi wi-more-vert"\n autoclose.bind="autoclose" datafield.bind="datafield" select.event="menuActionItemClick($event,$item)">\n </div>\n }\n @if (helptext) {\n <button type="button" aria-label="Help" class="app-icon panel-action wi" [title]="appLocale.LABEL_HELP"\n (click)="toggleHelp()"><i class="wi-question"></i></button>\n }\n @if (collapsible) {\n <button type="button" aria-label="Collapse/Expand" class="app-icon wi panel-action"\n [title]="expandCollapseTitle" (click)="toggle($event);" [attr.aria-expanded]="!!expanded"><i\n [ngClass]="expanded ? \'wi-minus\' : \'wi-plus\'"></i></button>\n }\n @if (enablefullscreen) {\n <button type="button" aria-label="Fullscreen/Exit" class="app-icon panel-action wi"\n [title]="fullScreenTitle" (click)="toggleFullScreen($event);"><i\n [ngClass]="fullscreen ? \'wi-fullscreen-exit\' : \'wi-fullscreen\'"></i></button>\n }\n @if (closable) {\n <button type="button" aria-label="Close button" class="app-icon panel-action"\n title="{{appLocale.LABEL_CLOSE}}" (click)="close($event)"><i\n class="wi wi-close"></i></button>\n }\n </div>\n </div>\n </div>\n }\n <div class="panel-content" [hidden]="!expanded" #panelContent>\n \x3c!-- Todo Bandhavya - implement smooth scroll --\x3e\n <div partial-container-target #panelBody [ngClass]="[\'panel-body\', helpClass]">\n <ng-content></ng-content>\n </div>\n <aside class="panel-help-message" [ngClass]="helpClass">\n <h5 class="panel-help-header" [textContent]="appLocale.LABEL_HELP"></h5>\n <div class="panel-help-content" [innerHTML]="helptext | trustAs : \'html\'"></div>\n </aside>\n </div>\n <div class="app-panel-footer panel-footer clearfix" [hidden]="hideFooter">\n <ng-content select="[wmPanelFooter]"></ng-content>\n </div>\n'}]}],ctorParameters:()=>[{type:d.Injector},{type:void 0,decorators:[{type:n.Inject,args:["EXPLICIT_CONTEXT"]},{type:n.Optional}]}],propDecorators:{panelHeader:[{type:n.ViewChild,args:["panelHeading",{static:!1}]}],panelContent:[{type:n.ViewChild,args:["panelContent",{static:!0}]}],panelBody:[{type:n.ViewChild,args:["panelBody",{static:!0}]}],reDrawableComponents:[{type:n.ContentChildren,args:[i.RedrawableDirective,{descendants:!0}]}]}}),e.PanelComponent=h}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common"),require("@wm/components/base"),require("@angular/core"),require("@wm/core"),require("@swipey"),require("tslib"),require("lodash-es")):"function"==typeof define&&define.amd?define(["exports","@angular/common","@wm/components/base","@angular/core","@wm/core","@swipey","tslib","lodash-es"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.containers=e.wm.components.containers||{},e.wm.components.containers.tabs={}),e.ng.common,e.wm.components.base,e.ng.core,e.wm.core,e.swipey,e.tslib,e._)}(this,function(e,t,i,n,a,s,o,r){"use strict";function l(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var c=l(t),d=l(n),p=l(a);class m extends s.SwipeAnimation{constructor(e){super(),this.tabs=e,this._$el=$(this.tabs.getNativeElement()).find(">.tab-content"),this.init(this._$el)}calibrate(){const e=this.tabs.getActiveTabIndex(),t=this._$el.find(">.tab-pane");let i=0,n=0,a=[];return t.each((t,s)=>($(s).prop("hidden")||(n++,t===e&&(i=n-1),a.push(s)),!0)),{activeTabIndex:i,noOfTabs:n,panes:a}}bounds(){const{activeTabIndex:e,noOfTabs:t,panes:i}=this.calibrate(),n=$(i[0]).width(),a=-1*e*n;return this.clearContentFocus(),{strict:!1,lower:e===t-1?0:-n,center:a,upper:0===e?a:n}}context(){return{w:this._$el.width()}}animation(){return{transform:"translate3d(${{ ($D + $d)/w * 100 + '%'}}, 0, 0)","-webkit-transform":"translate3d(${{ ($D + $d)/w * 100 + '%'}}, 0, 0)"}}clearContentFocus(){let e=this._$el.find(">.tab-pane.active");e.length&&e.find(document.activeElement).length&&document.activeElement.blur()}transitionTabIntoView(){const{activeTabIndex:e,noOfTabs:t,panes:i}=this.calibrate(),n=100*t+"%";a.setCSSFromObj(this._$el[0],{maxWidth:n,width:n}),a.addClass(this.tabs.getNativeElement(),"has-transition");const s=100/t+"%";i.forEach(e=>{a.setCSS(e,"width",s)}),a.setCSS(this._$el[0],"transform",`translate3d(${-1*e/t*100}%, 0, 0)`)}onUpper(e){this.tabs.prev(e),a.$appDigest()}onLower(e){this.tabs.next(e),a.$appDigest()}threshold(){return 5}}const h={widgetType:"wm-tabpane",hostClass:"tab-pane"};e.TabPaneComponent=class e extends i.StylableComponent{static{this.initializeProps=void i.register("wm-tabpane",new Map([["active",i.PROP_BOOLEAN],["badgevalue",i.PROP_STRING],["badgetype",{value:"default",...i.PROP_STRING}],["class",i.PROP_STRING],["content",i.PROP_STRING],["disabled",i.PROP_BOOLEAN],["dynamicPaneIndex",i.PROP_NUMBER],["heading",i.PROP_STRING],["isdefaulttab",i.PROP_STRING],["isdynamic",i.PROP_BOOLEAN],["name",i.PROP_STRING],["paneicon",i.PROP_STRING],["show",{value:!0,...i.PROP_BOOLEAN}],["smoothscroll",{value:!1,...i.PROP_BOOLEAN}],["title",{value:"Tab Title",...i.PROP_STRING}],...i.AUTO_LAYOUT_PROPS]))}constructor(e,t,i,s,o){super(e,h,s),this.heading=t,this.title=i,this.app=o,this._isFirstLoad=!0,this._isOnLoadTriggered=!1,this.$lazyLoad=a.noop,this._currentTabWidgets={},this.isActive=!1,this.disabled=!1,this.tabsRef=n.inject(g),a.removeAttr(this.nativeElement,"title")}invokeOnSelectCallback(e){this.invokeEventCallback("select",{$event:e})}select(e,t){this.isActive||this.disabled||(this.isActive=!0,this.$lazyLoad(),this.redrawChildren(),this.notifyParent(e,t))}tabpaneHeaderClick(e,t){this.invokeEventCallback("headerclick",{$event:e,paneIndex:t})}deselect(){this.isActive&&(this.isActive=!1,this.invokeEventCallback("deselect"))}remove(){this.isActive&&(this===this.tabsRef.panes.last?this.tabsRef.prev():this.tabsRef.next());const e=this.tabsRef.panes.toArray();e.splice(this.tabsRef.getPaneIndexByRef(this),1),this.tabsRef.panes.reset([...e]),this.nativeElement.remove(),this.tabsRef.$element.find(`.tab-header[data-paneid='${this.$element.attr("widget-id")}'] a`).remove()}redrawChildren(){setTimeout(()=>{this.reDrawableComponents&&this.reDrawableComponents.forEach(e=>e.redraw()),this._isOnLoadTriggered||this.content||(this.invokeEventCallback("load"),this._isOnLoadTriggered=!0)},100)}notifyParent(e,t){this.tabsRef.notifyChange(this,e,t)}handleSwipeLeft(){this.tabsRef.next()}handleSwipeRight(){this.tabsRef.prev()}handleEvent(e,t,i,n){"select"!==t&&super.handleEvent(this.nativeElement,t,i,n)}get currentTabWidgets(){return i.getCurrentWidgets(this.nativeElement,this._currentTabWidgets)}onPropertyChange(e,t,i){"content"===e?this.isActive&&setTimeout(()=>this.$lazyLoad(),100):"show"===e?(this.nativeElement.hidden=!t,this._isFirstLoad?this.tabsRef.selectDefaultPaneByIndex(this.tabsRef.defaultpaneindex):!t&&this.isActive?this.tabsRef.next():!t&&this.isActive||this.tabsRef.tabsAnimator?.transitionTabIntoView(),this._isFirstLoad=!1):super.onPropertyChange(e,t,i)}ngOnInit(){super.ngOnInit(),this.title=this.title||this.heading}ngAfterViewInit(){i.styler(this.nativeElement.querySelector(".tab-body"),this,i.APPLY_STYLES_TYPE.CONTAINER),super.ngAfterViewInit(),this.isdynamic&&this.tabsRef.registerDynamicTab(this)}ngOnDestroy(){this.reDrawableComponents&&(this.reDrawableComponents=null),this.$lazyLoad=null,super.ngOnDestroy()}static{this.\u0275fac=d.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:d,type:e,deps:[{token:d.Injector},{token:"heading",attribute:!0},{token:"title",attribute:!0},{token:"EXPLICIT_CONTEXT",optional:!0},{token:p.App}],target:d.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=d.\u0275\u0275ngDeclareComponent({minVersion:"14.0.0",version:"20.3.19",type:e,isStandalone:!0,selector:"div[wmTabPane]",host:{properties:{"class.active":"this.isActive","class.disabled":"this.disabled"}},providers:[i.provideAsWidgetRef(e)],queries:[{propertyName:"reDrawableComponents",predicate:i.RedrawableDirective,descendants:!0}],usesInheritance:!0,ngImport:d,template:'<div class="tab-body" partial-container-target >\n <ng-content></ng-content>\n</div>'})}},e.TabPaneComponent=o.__decorate([i.AutoLayout({targetSelector:".tab-body"}),o.__metadata("design:paramtypes",[n.Injector,Object,Object,Object,a.App])],e.TabPaneComponent),d.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:d,type:e.TabPaneComponent,decorators:[{type:n.Component,args:[{standalone:!0,selector:"div[wmTabPane]",providers:[i.provideAsWidgetRef(e.TabPaneComponent)],template:'<div class="tab-body" partial-container-target >\n <ng-content></ng-content>\n</div>'}]}],ctorParameters:()=>[{type:d.Injector},{type:void 0,decorators:[{type:n.Attribute,args:["heading"]}]},{type:void 0,decorators:[{type:n.Attribute,args:["title"]}]},{type:void 0,decorators:[{type:n.Inject,args:["EXPLICIT_CONTEXT"]},{type:n.Optional}]},{type:p.App}],propDecorators:{isActive:[{type:n.HostBinding,args:["class.active"]}],disabled:[{type:n.HostBinding,args:["class.disabled"]}],reDrawableComponents:[{type:n.ContentChildren,args:[i.RedrawableDirective,{descendants:!0}]}]}});const u={widgetType:"wm-tabs",hostClass:"app-tabs clearfix"};class g extends i.StylableComponent{static{this.initializeProps=(()=>{const e=new Map([["class",i.PROP_STRING],["dataset",i.PROP_ANY],["defaultpaneindex",{value:0,...i.PROP_NUMBER}],["justified",i.PROP_BOOLEAN],["tabsposition",{value:"top",...i.PROP_STRING}],["name",i.PROP_STRING],["nodatamessage",{value:"No Data Found",...i.PROP_STRING}],["show",{value:!0,...i.PROP_BOOLEAN}],["statehandler",{value:"none",...i.PROP_STRING}],["transition",i.PROP_STRING],["type",i.PROP_STRING],["iconposition",i.PROP_STRING],["autotabactivation",{value:!0,...i.PROP_BOOLEAN}]]);i.register("wm-tabs",e)})()}constructor(e,t,n,s,o,r){let l=a.noop;super(e,u,r,new Promise(e=>l=e)),this.dynamicComponentRefs=[],this.iconposition="",this.transition=n,this.tabsposition=s,this.statePersistence=o,this.dynamicComponentProvider=t,this.dynamicTabs=[],this.dynamicPaneIndex=0,this.promiseResolverFn=l,i.styler(this.nativeElement,this,i.APPLY_STYLES_TYPE.CONTAINER)}animateIn(e){const t=$(e);t.siblings(".active").removeClass("active"),t.addClass("active");const i=this.nativeElement.querySelector("ul.nav.nav-tabs"),n=t.prev();n.length?i.scrollLeft=n[0].offsetLeft:i.scrollLeft=0}registerDynamicTab(e){this.dynamicTabs.push(e);if(this.dynamicTabs.length===this.dynamicPaneIndex)for(let e=0;e<this.dynamicTabs.length;e++){const t=r.find(this.dynamicTabs,t=>t.dynamicPaneIndex===e);r.find(this.panes.toArray(),t)||(this.panes.reset([...this.panes.toArray(),t]),t.active&&setTimeout(()=>{t.select()},20))}}addPane(e){r.isArray(e)||(e=[e]);const t=[];return r.forEach(e,(e,i)=>{const n=r.find(this.panes.toArray(),{name:e.name}),a=r.indexOf(t,e.name);if(n||a>0)return void console.warn(`The tab pane with name ${e.name} already exists`);let s="",o="";this.dynamicPaneIndex++;const l=e.name?e.name:`tabpane${this.panes.toArray().length+(i+1)}`;t.push(l);const c=r.get(e,"params");r.forEach(e,(e,t)=>{"params"!==t&&(o=`${o} ${t}="${e}"`)}),r.forEach(c,(e,t)=>{s=`${s} <wm-param name="${t}" value="${e}"></wm-param>`});const d=`<wm-tabpane dynamicPaneIndex="${this.dynamicPaneIndex-1}" isdynamic="true" name="${l}" ${o}>\n ${s}\n </wm-tabpane>`;this._dynamicContext||(this._dynamicContext=Object.create(this.viewParent),this._dynamicContext[this.getAttr("wmTab")]=this),this.dynamicComponentProvider.addComponent(this.getNativeElement().querySelector(".tab-content"),d,this._dynamicContext,{inj:this.inj}).then(e=>{e&&this.dynamicComponentRefs.push(e)})}),t}removePane(e){const t=this.getPaneRefByName(e);t&&t.remove()}notifyChange(e,t,i){if(!this.isSelectableTab(e))return;let n;r.isEmpty(this.activeTab)||this.activeTab.deselect(),this.activeTab=e.getWidget();const a=this.getPaneIndexByRef(e),s=this.statePersistence.computeMode(this.statehandler);if(!this.isPageLoadCall&&s&&"none"!==s.toLowerCase()?this.statePersistence.setWidgetState(this,this.activeTab.name):(this.defaultpaneindex=this.getPaneIndexByRef(e),this.isPageLoadCall=!1),e.invokeOnSelectCallback(t),t&&this.invokeEventCallback("change",{$event:t,newPaneIndex:a,oldPaneIndex:this._oldPaneIndex||0}),this._oldPaneIndex=a,t&&(n=$(t.target).closest("li.tab-header")),!t||!n||!n.length){n=this.nativeElement.querySelector(`li[data-paneid=${e.widgetId}]`);!!!$(n).closest(".app-tabs").parent().closest(".app-tabs").length&&i&&$(n).children().focus()}this.animateIn(n),this.canSlide()&&(this.tabsAnimator||(this.tabsAnimator=new m(this),this.tabsAnimator.setGesturesEnabled(this.canSlide())),this.tabsAnimator.transitionTabIntoView())}goToTab(e){if(this.isValidPaneIndex(e-1)){this.getPaneRefByIndex(e-1).select()}}getPaneIndexByRef(e){return this.panes.toArray().indexOf(e)}getActiveTabIndex(){return r.findIndex(this.panes.toArray(),{isActive:!0})}isValidPaneIndex(e){return e>=0&&e<this.panes.length}getPaneRefByIndex(e){return this.panes.toArray()[e]}getPaneRefByName(e){return r.find(this.panes.toArray(),{name:e})}isSelectableTab(e){return e.show&&!e.disabled}canSlide(){return"slide"===this.transition&&!this.vertical}getSelectableTabAfterIndex(e){for(let t=e+1;t<this.panes.length;t++){const e=this.getPaneRefByIndex(t);if(this.isSelectableTab(e))return e}if(e===this.panes.length-1){const e=this.getPaneRefByIndex(0);if(this.isSelectableTab(e))return e}}getSelectableTabBeforeIndex(e){for(let t=e-1;t>=0;t--){const e=this.getPaneRefByIndex(t);if(this.isSelectableTab(e))return e}if(0===e){const e=this.getPaneRefByIndex(this.panes.length-1);if(this.isSelectableTab(e))return e}}next(e,t){const i=this.getSelectableTabAfterIndex(this.getActiveTabIndex());i&&i.select(e,t)}prev(e,t){const i=this.getSelectableTabBeforeIndex(this.getActiveTabIndex());i&&i.select(e,t)}selectDefaultPaneByIndex(e){if(!this.isValidPaneIndex(e))return;let t=this.getPaneRefByIndex(e);this.isSelectableTab(t)||(t=this.getSelectableTabAfterIndex(0)),t&&t.select()}setTabsPosition(){const e=this.nativeElement.children[0];this.vertical="left"===this.tabsposition||"right"===this.tabsposition,a.removeClass(this.nativeElement,"inverted"),"bottom"!==this.tabsposition&&"right"!==this.tabsposition||(a.appendNode(e,this.nativeElement),a.addClass(this.nativeElement,"inverted"))}onDataChange(e){this.fieldDefs=i.createArrayFrom(e),setTimeout(()=>this.selectDefaultPaneByIndex(this.defaultpaneindex||0))}getWidgets(e,t){let i;const n=[];if(e)return a.isDefined(t)?(t=+t||0,i=r.get(this.panes.toArray(),t),i?[r.get(i.currentTabWidgets,e)]:void 0):(r.forEach(this.panes.toArray(),t=>{i=r.get(t.currentTabWidgets,e),i&&n.push(i)}),n)}get currentTabPaneIndex(){return this.getActiveTabIndex()}get isFirstTabPane(){return this.panes.first.widgetId===this.activeTab.widgetId}get isLastTabPane(){return this.panes.last.widgetId===this.activeTab.widgetId}onPropertyChange(e,t,i){if("defaultpaneindex"===e)this.defaultpaneindex=t;else if("dataset"===e)this.onDataChange(t);else if("statehandler"===e){this.isPageLoadCall=!0;const e=this.statePersistence.getWidgetState(this);if("none"!==t&&e){const t=this.panes.filter(function(t){return e===t.name});if(t.length){const e=this.getPaneIndexByRef(t[0]);setTimeout(()=>this.selectDefaultPaneByIndex(e),20)}else console.warn("Tab pane name "+e+" in State is incorrect. Falling back to the default pane"),setTimeout(()=>this.selectDefaultPaneByIndex(this.defaultpaneindex||0),20)}else setTimeout(()=>this.selectDefaultPaneByIndex(this.defaultpaneindex||0),20)}else"autotabactivation"===e?this.autoActivation=t:super.onPropertyChange(e,t,i)}registerTabsScroll(){setTimeout(()=>{const e=this.$element.find("> ul");let t;t=e.children().last().position(),t&&t.left>e.width()&&e.on("mousewheel",t=>{const i=e[0].scrollLeft,n=-1*t.originalEvent.wheelDelta;t.stopPropagation(),t.preventDefault(),e.animate({scrollLeft:i+n},{duration:10})})})}onkeydown(e){let t;switch(e.key){case"ArrowLeft":case"ArrowUp":t=this.autoActivation?(this.prev(null,!0),null):this.getSelectableTabBeforeIndex(this.getSelectedPaneIndex());break;case"ArrowRight":case"ArrowDown":t=this.autoActivation?(this.next(null,!0),null):this.getSelectableTabAfterIndex(this.getSelectedPaneIndex());break;case"Enter":{const t=this.getSelectableTabAfterIndex(this.getSelectedPaneIndex()-1);if(t){const e=new KeyboardEvent("keydown",{key:"Enter",code:"Enter",bubbles:!0,cancelable:!0});t.nativeElement.dispatchEvent(e),t.select(e,!0)}return void e.preventDefault()}default:return}t&&(this.nativeElement.querySelector("li.select")?.classList.remove("select"),this.nativeElement.querySelector(`li[data-paneid="${t.widgetId}"]`)?.classList.add("select")),e.preventDefault()}ngAfterContentInit(){this.promiseResolverFn(),super.ngAfterContentInit(),this.setTabsPosition(),this.panesChangesSubscription=this.panes.changes.subscribe(e=>{this.panes.length&&this.selectDefaultPaneByIndex(this.defaultpaneindex||0)})}ngAfterViewInit(){super.ngAfterViewInit(),this.registerTabsScroll()}getSelectedPaneIndex(){const e=this.panes.toArray().findIndex(e=>this.nativeElement.querySelector(`li[data-paneid="${e.widgetId}"]`)?.classList.contains("select"));return e>=0?e:this.getActiveTabIndex()}ngOnDestroy(){this.panesChangesSubscription&&(this.panesChangesSubscription.unsubscribe(),this.panesChangesSubscription=null),this.dynamicComponentRefs&&this.dynamicComponentRefs.length&&(this.dynamicComponentRefs.forEach(e=>{e&&e.destroy&&e.destroy()}),this.dynamicComponentRefs=[]),this._dynamicContext&&(Object.keys(this._dynamicContext).forEach(e=>{delete this._dynamicContext[e]}),this._dynamicContext=null),this.dynamicTabs&&(this.dynamicTabs=[]),this.tabsAnimator&&(this.tabsAnimator=null),this.fieldDefs=null,this.activeTab=null,super.ngOnDestroy()}static{this.\u0275fac=d.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:d,type:g,deps:[{token:d.Injector},{token:p.DynamicComponentRefProvider},{token:"transition",attribute:!0},{token:"tabsposition",attribute:!0},{token:p.StatePersistence},{token:"EXPLICIT_CONTEXT",optional:!0}],target:d.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=d.\u0275\u0275ngDeclareComponent({minVersion:"17.0.0",version:"20.3.19",type:g,isStandalone:!0,selector:"div[wmTabs]",host:{properties:{"attr.icon-position":"this.iconposition"}},providers:[i.provideAsWidgetRef(g)],queries:[{propertyName:"panes",predicate:e.TabPaneComponent}],exportAs:["wmTabs"],usesInheritance:!0,ngImport:d,template:'<ul class="nav nav-tabs" [ngClass]="{\'nav-stacked\': vertical, \'nav-justified\': justified}" role="tablist">\n @for (pane of panes; track pane; let i = $index) {\n <li class="tab-header" [attr.data-paneid]="pane.widgetId" [ngClass]="{\'active\': pane.isActive, \'disabled\': pane.disabled}"\n [hidden]="!pane.show" role="presentation">\n <a [attr.aria-label]="pane.badgevalue ? pane.title + \' \' + pane.badgevalue : pane.title"\n [attr.icon-position]="iconposition"\n [attr.title]="pane.title"\n [tabindex]="pane.isActive ? \'0\' : \'-1\'"\n class="tab-heading" href="javascript:void(0);"\n [attr.aria-selected]="pane.isActive" role="tab" (click)="pane.select($event); pane.tabpaneHeaderClick($event, i);" (keydown)="onkeydown($event)">\n @if (pane.paneicon) {\n <i [ngClass]="[\'app-icon\', pane.paneicon]"></i>\n }\n <span [textContent]="pane.title"></span>\n @if (pane.badgevalue) {\n <span class="label label-{{pane.badgetype}}" [textContent]="pane.badgevalue"></span>\n }\n </a>\n </li>\n }\n</ul>\n@if (type !== \'dynamic\') {\n <div class="tab-content" [ngClass]="{\'tab-stacked\': vertical, \'tab-justified\': justified}">\n <ng-content ngProjectAs="div[wmTabPane]"></ng-content>\n </div>\n}\n@if (type === \'dynamic\') {\n <div class="tab-content" [ngClass]="{\'tab-stacked\': vertical, \'tab-justified\': justified}">\n @if (fieldDefs && !fieldDefs.length) {\n <div>{{nodatamessage}}</div>\n }\n <ng-content select="div[wmRepeatTemplate]"></ng-content>\n </div>\n}\n',dependencies:[{kind:"ngmodule",type:t.CommonModule},{kind:"directive",type:c.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"directive",type:i.TextContentDirective,selector:"[textContent]",inputs:["textContent"]}]})}}d.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:d,type:g,decorators:[{type:n.Component,args:[{standalone:!0,imports:[t.CommonModule,i.TextContentDirective],selector:"div[wmTabs]",exportAs:"wmTabs",providers:[i.provideAsWidgetRef(g)],template:'<ul class="nav nav-tabs" [ngClass]="{\'nav-stacked\': vertical, \'nav-justified\': justified}" role="tablist">\n @for (pane of panes; track pane; let i = $index) {\n <li class="tab-header" [attr.data-paneid]="pane.widgetId" [ngClass]="{\'active\': pane.isActive, \'disabled\': pane.disabled}"\n [hidden]="!pane.show" role="presentation">\n <a [attr.aria-label]="pane.badgevalue ? pane.title + \' \' + pane.badgevalue : pane.title"\n [attr.icon-position]="iconposition"\n [attr.title]="pane.title"\n [tabindex]="pane.isActive ? \'0\' : \'-1\'"\n class="tab-heading" href="javascript:void(0);"\n [attr.aria-selected]="pane.isActive" role="tab" (click)="pane.select($event); pane.tabpaneHeaderClick($event, i);" (keydown)="onkeydown($event)">\n @if (pane.paneicon) {\n <i [ngClass]="[\'app-icon\', pane.paneicon]"></i>\n }\n <span [textContent]="pane.title"></span>\n @if (pane.badgevalue) {\n <span class="label label-{{pane.badgetype}}" [textContent]="pane.badgevalue"></span>\n }\n </a>\n </li>\n }\n</ul>\n@if (type !== \'dynamic\') {\n <div class="tab-content" [ngClass]="{\'tab-stacked\': vertical, \'tab-justified\': justified}">\n <ng-content ngProjectAs="div[wmTabPane]"></ng-content>\n </div>\n}\n@if (type === \'dynamic\') {\n <div class="tab-content" [ngClass]="{\'tab-stacked\': vertical, \'tab-justified\': justified}">\n @if (fieldDefs && !fieldDefs.length) {\n <div>{{nodatamessage}}</div>\n }\n <ng-content select="div[wmRepeatTemplate]"></ng-content>\n </div>\n}\n'}]}],ctorParameters:()=>[{type:d.Injector},{type:p.DynamicComponentRefProvider},{type:void 0,decorators:[{type:n.Attribute,args:["transition"]}]},{type:void 0,decorators:[{type:n.Attribute,args:["tabsposition"]}]},{type:p.StatePersistence},{type:void 0,decorators:[{type:n.Inject,args:["EXPLICIT_CONTEXT"]},{type:n.Optional}]}],propDecorators:{iconposition:[{type:n.HostBinding,args:["attr.icon-position"]}],panes:[{type:n.ContentChildren,args:[e.TabPaneComponent]}]}}),e.TabsComponent=g}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@wm/components/base")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@wm/components/base"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.containers=e.wm.components.containers||{},e.wm.components.containers.tile={}),e.ng.core,e.wm.components.base)}(this,function(e,t,i){"use strict";var n,a,s=(n=t,a=Object.create(null),n&&Object.keys(n).forEach(function(e){if("default"!==e){var t=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(a,e,t.get?t:{enumerable:!0,get:function(){return n[e]}})}}),a.default=n,Object.freeze(a));const o={widgetType:"wm-tile",hostClass:"app-tile"};class r extends i.StylableComponent{static{this.initializeProps=void i.register("wm-tile",new Map([["animation",i.PROP_STRING],["class",i.PROP_STRING],["conditionalclass",i.PROP_ANY],["conditionalstyle",i.PROP_ANY],["name",i.PROP_STRING],["show",{value:!0,...i.PROP_BOOLEAN}]]))}constructor(e,t){super(e,o,t),i.styler(this.nativeElement,this,i.APPLY_STYLES_TYPE.CONTAINER)}static{this.\u0275fac=s.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:s,type:r,deps:[{token:s.Injector},{token:"EXPLICIT_CONTEXT",optional:!0}],target:s.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=s.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:r,isStandalone:!0,selector:"[wmTile]",providers:[i.provideAsWidgetRef(r)],usesInheritance:!0,ngImport:s})}}s.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:s,type:r,decorators:[{type:t.Directive,args:[{standalone:!0,selector:"[wmTile]",providers:[i.provideAsWidgetRef(r)]}]}],ctorParameters:()=>[{type:s.Injector},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}]}),e.TileDirective=r}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common"),require("@wm/components/base"),require("@angular/core"),require("@wm/core"),require("@angular/forms"),require("lodash-es")):"function"==typeof define&&define.amd?define(["exports","@angular/common","@wm/components/base","@angular/core","@wm/core","@angular/forms","lodash-es"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.containers=e.wm.components.containers||{},e.wm.components.containers.wizard={}),e.ng.common,e.wm.components.base,e.ng.core,e.wm.core,e.ng.forms,e._)}(this,function(e,t,i,n,a,s,o){"use strict";function r(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var l=r(t),c=r(n),d=r(a),p=r(s);const m={widgetType:"wm-wizardstep",hostClass:"app-wizard-step-content"};class h extends i.StylableComponent{static{this.initializeProps=void i.register("wm-wizardstep",new Map([["class",i.PROP_STRING],["content",i.PROP_STRING],["doneiconclass",{value:"wi wi-done",...i.PROP_STRING}],["dynamicStepIndex",i.PROP_NUMBER],["enableskip",{value:!1,...i.PROP_BOOLEAN}],["iconclass",{value:"wi wi-person",...i.PROP_STRING}],["isdynamic",i.PROP_STRING],["name",i.PROP_STRING],["show",{value:!0,...i.PROP_BOOLEAN}],["subtitle",i.PROP_STRING],["title",{value:"Step Title",...i.PROP_STRING}]]))}get isCurrent(){return this.active}get isValid(){return(this.ngForm.valid||this.ngForm.disabled)&&this.areEmbeddedFormsValid()}areEmbeddedFormsValid(){for(const e of this.getAllEmbeddedForms())if(e.widget&&e.widget.ngform&&!e.widget.ngform.valid)return!1;return!0}getAllEmbeddedForms(){return this.$element.find("form")}get enableNext(){return!this.disablenext}get enableDone(){return!this.disabledone}get enablePrev(){return!this.disableprevious}set active(e){const t=this.active;this.status=1,e&&!t&&this.redrawChildren()}get active(){return 1===this.status}set done(e){e&&(this.status=3)}get done(){return 3===this.status}set disabled(e){e&&(this.status=2)}get disabled(){return 2===this.status}constructor(e,t,i){super(e,m,i),this.ngForm=t,this.$lazyLoad=a.noop,this.isDone=!1,this.nextCBInProgress=!1,this.prevCBInProgress=!1,this.status=2,this._currentWizardWidgets={},this.wizardComponent=this.inj.get(g)}invokeNextCB(e){return this.invokeEventCallback("next",{currentStep:this,stepIndex:e})}invokePrevCB(e){return this.invokeEventCallback("prev",{currentStep:this,stepIndex:e})}invokeSkipCB(e){return this.invokeEventCallback("skip",{currentStep:this,stepIndex:e})}redrawChildren(){setTimeout(()=>{if(this.reDrawableComponents&&this.reDrawableComponents.forEach(e=>e.redraw()),this.wizardComponent){const e=this.wizardComponent.getCurrentStepIndex();this.invokeEventCallback("load",{stepIndex:e})}},100)}remove(){this.active&&(this===this.wizardComponent.steps.last?this.wizardComponent.prev():this.wizardComponent.next());const e=this.wizardComponent.steps.toArray();e.splice(this.wizardComponent.getStepIndexByRef(this),1),this.wizardComponent.steps.reset([...e]),this.nativeElement.remove()}get currentWizardWidgets(){return i.getCurrentWidgets(this.nativeElement,this._currentWizardWidgets)}onPropertyChange(e,t,i){"content"===e?setTimeout(()=>this.$lazyLoad(),100):super.onPropertyChange(e,t,i)}ngOnInit(){super.ngOnInit()}ngAfterViewInit(){super.ngAfterViewInit(),this.isdynamic&&this.wizardComponent.registerDynamicStep(this)}ngOnDestroy(){this.reDrawableComponents&&this.reDrawableComponents.reset([]),this.wizardComponent=null,super.ngOnDestroy()}static{this.\u0275fac=c.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:c,type:h,deps:[{token:c.Injector},{token:p.NgForm,self:!0},{token:"EXPLICIT_CONTEXT",optional:!0}],target:c.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=c.\u0275\u0275ngDeclareComponent({minVersion:"14.0.0",version:"20.3.19",type:h,isStandalone:!0,selector:"form[wmWizardStep]",host:{properties:{"class.active":"this.isCurrent"}},providers:[i.provideAsWidgetRef(h),s.NgForm],queries:[{propertyName:"reDrawableComponents",predicate:i.RedrawableDirective,descendants:!0}],exportAs:["wmWizardStep"],usesInheritance:!0,ngImport:c,template:"<ng-content partial-container-target></ng-content>",isInline:!0})}}c.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:c,type:h,decorators:[{type:n.Component,args:[{standalone:!0,selector:"form[wmWizardStep]",template:"<ng-content partial-container-target></ng-content>",providers:[i.provideAsWidgetRef(h),s.NgForm],exportAs:"wmWizardStep"}]}],ctorParameters:()=>[{type:c.Injector},{type:p.NgForm,decorators:[{type:n.Self}]},{type:void 0,decorators:[{type:n.Inject,args:["EXPLICIT_CONTEXT"]},{type:n.Optional}]}],propDecorators:{reDrawableComponents:[{type:n.ContentChildren,args:[i.RedrawableDirective,{descendants:!0}]}],isCurrent:[{type:n.HostBinding,args:["class.active"]}]}});const u={widgetType:"wm-wizard",hostClass:"app-wizard panel clearfix"};class g extends i.StylableComponent{static{this.initializeProps=void i.register("wm-wizard",new Map([["actionsalignment",{value:"right",...i.PROP_STRING}],["cancelable",{value:!0,...i.PROP_BOOLEAN}],["cancelbtnlabel",{value:"Cancel",...i.PROP_STRING}],["class",{value:"classic",...i.PROP_STRING}],["dataset",i.PROP_ANY],["defaultstep",{value:"none",...i.PROP_STRING}],["defaultstepindex",{value:0,...i.PROP_NUMBER}],["donebtnlabel",{value:"Done",...i.PROP_STRING}],["enablenext",{value:!1,...i.PROP_BOOLEAN}],["name",i.PROP_STRING],["nextbtnlabel",{value:"Next",...i.PROP_STRING}],["nodatamessage",{value:"No Data Found",...i.PROP_STRING}],["previousbtnlabel",{value:"Previous",...i.PROP_STRING}],["show",{value:!0,...i.PROP_BOOLEAN}],["stepstyle",{value:"auto",...i.PROP_STRING}],["type",i.PROP_STRING]]))}get hasPrevStep(){return!this._isFirstStep(this.currentStep)}get hasNextStep(){return!this._isLastStep(this.currentStep)}get showDoneBtn(){if(this.currentStep)return!this.hasNextStep&&this.currentStep.enableDone}get enablePrev(){if(this.currentStep)return this.currentStep.enablePrev}get enableNext(){if(this.currentStep)return!!this.enablenext||this.currentStep.enableNext&&this.currentStep.isValid}wizardHostClassString(){const e="string"==typeof this.class?this.class:"",t=this.nativeElement?.className;return`${e} ${"string"==typeof t?t:t?.baseVal||""}`.trim()}get showWizardStepIcons(){const e=this.wizardHostClassString();return!!e&&(e.includes("iconstepper")||e.includes("tabstepper"))}get isTabStepperWizard(){const e=this.wizardHostClassString();return e.includes("tabstepper")&&!e.includes("iconstepper")}stepIconClassOrDefault(e){const t=e?.iconclass;return"string"==typeof t&&t.trim()?t.trim():"wi wi-person"}hasNonEmptyIconClass(e){const t=e?.iconclass;return"string"==typeof t&&""!==t.trim()}shouldShowPrimaryStepIcon(e){if(!e||!this.showWizardStepIcons)return!1;if(!e.isDone)return this.hasNonEmptyIconClass(e);const t=e.doneiconclass;return!("string"==typeof t&&""!==t.trim())&&this.hasNonEmptyIconClass(e)}shouldRenderWizardStepNumberSpan(e){return!this.showWizardStepIcons||(this.isTabStepperWizard?!(e.isDone&&!this.hasNonEmptyDoneIconClass(e))&&(this.shouldShowPrimaryStepIcon(e)||e.isDone&&this.hasNonEmptyDoneIconClass(e)):!this.wizardHostClassString().includes("iconstepper")||(this.shouldShowPrimaryStepIcon(e)||e.isDone&&this.hasNonEmptyDoneIconClass(e)))}hasNonEmptyDoneIconClass(e){const t=e?.doneiconclass;return"string"==typeof t&&""!==t.trim()}get enableDone(){if(this.currentStep)return this.currentStep.enableDone&&this.currentStep.isValid}get currentStepIndex(){return this.getStepIndexByRef(this.currentStep)}get isFirstStep(){return this._isFirstStep(this.currentStep)}get isLastStep(){return this._isLastStep(this.currentStep)}constructor(e,t,n,s){let o=a.noop;super(e,u,s,new Promise(e=>o=e)),this._isFirstLoad=!0,this.isPromise=e=>e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch,i.styler(this.nativeElement,this,i.APPLY_STYLES_TYPE.SHELL),this.promiseResolverFn=o,this.message={caption:"",type:""},this.wizContext=n[0],this.dynamicComponentProvider=t,this.dynamicWizard=[],this.dynamicStepIndex=0}registerDynamicStep(e){this.dynamicWizard.push(e);if(this.dynamicWizard.length===this.dynamicStepIndex)for(let e=0;e<this.dynamicWizard.length;e++){const t=o.find(this.dynamicWizard,t=>t.dynamicStepIndex===e);o.find(this.steps.toArray(),t)||(this.steps.reset([...this.steps.toArray(),t]),t.active&&setTimeout(()=>{t.select()},20))}}addStep(e){o.isArray(e)||(e=[e]);const t=[];return o.forEach(e,(e,i)=>{const n=o.find(this.steps.toArray(),{name:e.name}),a=o.indexOf(t,e.name);if(n||a>0)return void console.warn(`The wizard step with name ${e.name} already exists`);let s="",r="";this.dynamicStepIndex++;const l=e.name?e.name:`wizardstep${this.steps.toArray().length+(i+1)}`;t.push(l);const c=o.get(e,"params");o.forEach(e,(e,t)=>{"params"!==t&&(r=`${r} ${t}="${e}"`)}),o.forEach(c,(e,t)=>{s=`${s} <wm-param name="${t}" value="${e}"></wm-param>`});const d=`<wm-wizardstep dynamicStepIndex="${this.dynamicStepIndex-1}" isdynamic="true" name="${l}" ${r}>\n ${s}\n </wm-wizardstep>`;this._dynamicContext||(this._dynamicContext=Object.create(this.viewParent),this._dynamicContext[this.getAttr("wmWizard")]=this),this.dynamicComponentProvider.addComponent(this.getNativeElement().querySelector(".app-wizard-body"),d,this._dynamicContext,{inj:this.inj})}),t}removeStep(e){const t=o.isString(e)?this.getStepRefByName(e):o.isNumber(e)?this.getStepRefByIndex(e):null;t?t.remove():console.warn(`Could not find step with name or index '${e}' to remove`)}getNextValidStepFormIndex(e){for(let t=e;t<this.steps.length;t++){const e=this.getStepRefByIndex(t);if(e.show)return e}}getPreviousValidStepFormIndex(e){for(let t=e;t>=0;t--){const e=this.getStepRefByIndex(t);if(e.show)return e}}getCurrentStepIndex(){return this.getStepIndexByRef(this.currentStep)}getStepRefByIndex(e){return this.steps.toArray()[e]}getStepIndexByRef(e){return this.steps.toArray().indexOf(e)}getStepRefByName(e){return this.steps.find(t=>t.name===e)}setDefaultStep(e){if(e&&e.show){this.currentStep=e,e.active=!0,e.isInitialized=!0;let t=this.getStepIndexByRef(e)-1;for(;t>=0;){const e=this.getStepRefByIndex(t);e.done=!0,e.isInitialized=!0,t--}}else(e=this.getNextValidStepFormIndex(0))&&this.setDefaultStep(e);this.addMoreText()}onWizardHeaderClick(e,t){t.done&&(this.steps.forEach((e,i)=>{i<this.getStepIndexByRef(t)?(e.done=!0,e.isDone=!0):(e.disabled=!0,e.isDone=!1)}),this.currentStep=t,this.currentStep.active=!0,this.addMoreText())}handleNext(e,t,i){if(this.isPromise(e))e.then(e=>{this.currentStep.nextCBInProgress=!1,!1!==e&&this.extendNextFn(t,i)},e=>{this.currentStep.nextCBInProgress=!1});else{if(this.currentStep.nextCBInProgress=!1,!1===e)return;this.extendNextFn(t,i)}}next(e="next"){if(this.currentStep.nextCBInProgress)return;const t=this.currentStep,i=this.getCurrentStepIndex();if("skip"===e){this.currentStep.nextCBInProgress=!0;const e=t.invokeSkipCB(i);this.handleNext(e,t,i)}else if(this.currentStep.isValid&&"next"===e){this.currentStep.nextCBInProgress=!0;const e=t.invokeNextCB(i);this.handleNext(e,t,i)}else if(this.enablenext&&!this.currentStep.isValid){Array.from(this.currentStep.getAllEmbeddedForms())?.forEach(e=>{e.widget.highlightInvalidFields()});const e=this.currentStep.nativeElement?.querySelector("input.ng-invalid");e?.focus()}}extendNextFn(e,t){const i=this.getNextValidStepFormIndex(t+1);if(i){i.isInitialized=!0,e.isDone=!0,e.done=!0,i.active=!0,this.currentStep=i;this.nativeElement.querySelectorAll("li[data-stepid]").forEach(e=>{e.classList.remove("active");const t=e.querySelector("a");t&&t.setAttribute("tabindex","-1")});const t=this.nativeElement.querySelector(`li[data-stepid="${i.widgetId}"]`),n=t?.querySelector("a");t&&n&&(t.classList.add("active"),n.setAttribute("tabindex","0"),n.focus()),this.updateStepFocus()}this.addMoreText()}prev(){if(this.currentStep.prevCBInProgress)return;const e=this.currentStep,t=this.getCurrentStepIndex();this.currentStep.prevCBInProgress=!0;const i=e.invokePrevCB(t);if(this.isPromise(i))i.then(i=>{this.currentStep.prevCBInProgress=!1,!1!==i&&this.extendPrevFn(e,t)},e=>{this.currentStep.prevCBInProgress=!1});else{if(this.currentStep.prevCBInProgress=!1,!1===i)return;this.extendPrevFn(e,t)}}extendPrevFn(e,t){const i=this.getPreviousValidStepFormIndex(t-1);if(i){e.isDone=!1,e.disabled=!0,i.active=!0,this.currentStep=i;this.nativeElement.querySelectorAll("li[data-stepid]").forEach(e=>{e.classList.remove("active");const t=e.querySelector("a");t&&t.setAttribute("tabindex","-1")});const t=this.nativeElement.querySelector(`li[data-stepid="${i.widgetId}"]`),n=t?.querySelector("a");t&&n&&(t.classList.add("active"),n.setAttribute("tabindex","0"),n.focus()),this.updateStepFocus()}this.addMoreText()}skip(){this.next("skip")}gotoStep(e){let t;if(o.isString(e)){if(t=this.steps.toArray().map(e=>e.name).indexOf(e),-1===t)return void console.error(`Could not find step '${e}'`)}else{if(!(o.isNumber(e)&&e>=0))return void console.error("Invalid step name or index provided");t=e}const i=this.getStepRefByIndex(t);i?.show?this.onWizardHeaderClick(event,i):console.error("The gotoStep function cannot navigate to hidden steps")}done(){this.currentStep.isDone=!0,this.invokeEventCallback("done",{steps:this.steps.toArray()})}cancel(){this.invokeEventCallback("cancel",{steps:this.steps.toArray()})}addMoreText(){setTimeout(()=>{if($(window).width()<768){$(".app-wizard-step.active .subtitle-wrapper .step-title").css({height:"auto",display:"block"});var e=$(".app-wizard-step.active .subtitle-wrapper .step-title").height();$(".read_more").css("display","none"),$(".app-wizard-step.active .subtitle-wrapper").removeClass("readmore_subtitle"),e>44&&($(".app-wizard-step.active .subtitle-wrapper .step-title").css({height:"44px",display:"-webkit-box"}),$(".app-wizard-step.active .read_more").css("display","block"),$(".app-wizard-step.finished .read_more").css("display","none"),$(".app-wizard-step.default .read_more").css("display","none"),$(".app-wizard-step>a").css("height","100px"))}})}readMoreSubtitle(){$(".app-wizard-step.active .subtitle-wrapper").addClass("readmore_subtitle"),$(".app-wizard-step.active .read_more").css("display","none"),$(document).on("mouseup",function(e){var t=$(".subtitle-wrapper");t.is(e.target)||0!==t.has(e.target).length||($(".app-wizard-step.active .subtitle-wrapper").removeClass("readmore_subtitle"),$(".app-wizard-step.active .read_more").css("display","block"),$(document).off("mouseup"))})}_isFirstStep(e){return this.steps.first===e}_isLastStep(e){return this.steps.last===e}onDataChange(e){this.fieldDefs=i.createArrayFrom(e)}updateStepFocus(){setTimeout(()=>{const e=this.nativeElement.querySelector(".app-wizard-heading li.active a");e?.focus()})}onPropertyChange(e,t,i){"stepstyle"===e?this.stepClass="justified"===t?"nav-justified":"":"dataset"===e?this.onDataChange(t):"defaultstep"===e?this.setDefaultStep(this.getStepRefByName(t)):"actionsalignment"===e?this.nativeElement.querySelector("div.app-wizard-actions")?.classList.replace(i,t):super.onPropertyChange(e,t,i)}ngAfterContentInit(){super.ngAfterContentInit(),this.promiseResolverFn(),this.wizContext.hasNextStep=()=>this.hasNextStep,this.wizContext.hasPreviousStep=()=>this.hasPrevStep,this.wizContext.hasNoNextStep=()=>this.showDoneBtn,this.wizContext.cancelable=()=>this.cancelable,this.wizContext.skippable=()=>this.currentStep?.enableskip,this.wizContext.next=()=>this.next(),this.wizContext.previous=()=>this.prev(),this.wizContext.done=()=>this.done(),this.wizContext.cancel=()=>this.cancel(),this.wizContext.skip=()=>this.skip(),this.wizContext.nextbtnlabel=()=>this.nextbtnlabel,this.wizContext.previousbtnlabel=()=>this.previousbtnlabel,this.wizContext.donebtnlabel=()=>this.donebtnlabel,this.wizContext.cancelbtnlabel=()=>this.cancelbtnlabel,this.wizContext.actionsalignment=()=>this.actionsalignment,this.wizContext.disableNext=()=>!this.enableNext,this.wizContext.disablePrevious=()=>!this.enablePrev,this.wizContext.disableDone=()=>!this.enableDone,this.stepsSubscription=this.steps.changes.subscribe(()=>{this.steps.length>1&&"dynamic"===this.type&&this._isFirstLoad&&(this.setDefaultStep(this.getStepRefByIndex(this.defaultstepindex)),this._isFirstLoad=!1)})}isSelectableStep(e){return e.show&&!e.disabled}getSelectableStepBeforeIndex(e){for(let t=e-1;t>=0;t--){const e=this.getStepRefByIndex(t);if(this.isSelectableStep(e))return e}if(0===e){const e=this.getStepRefByIndex(this.steps.length-1);if(this.isSelectableStep(e))return e}}getSelectableStepAfterIndex(e){for(let t=e+1;t<this.steps.length;t++){const e=this.getStepRefByIndex(t);if(this.isSelectableStep(e))return e}if(e===this.steps.length-1){const e=this.getStepRefByIndex(0);if(this.isSelectableStep(e))return e}}getWidgets(e,t){let i;const n=[];if(e)return a.isDefined(t)?(t=+t||0,i=o.get(this.steps.toArray(),t),i?[o.get(i.currentWizardWidgets,e)]:void 0):(o.forEach(this.steps.toArray(),t=>{i=o.get(t.currentWizardWidgets,e),i&&n.push(i)}),n)}ngAfterViewInit(){super.ngAfterViewInit(),i.styler(this.nativeElement.querySelector(".panel-body"),this,i.APPLY_STYLES_TYPE.INNER_SHELL),setTimeout(()=>{$(window).width()<768&&$(".app-wizard").removeClass("vertical")})}ngAfterViewChecked(){this.nativeElement.querySelectorAll("div.app-wizard-actions").forEach(e=>e?.classList.add(this.actionsalignment)),this.nativeElement.querySelectorAll("div.app-wizard-actions-right").forEach(e=>e?.classList.remove("app-container"))}getActiveStepIndex(){return o.findIndex(this.steps.toArray(),{isCurrent:!0})}onkeydown(e){let t;switch(e.key){case"ArrowLeft":case"ArrowUp":e.preventDefault(),t=this.autoActivation?null:this.getSelectableStepBeforeIndex(this.getSelectedStepIndex());break;case"ArrowRight":case"ArrowDown":e.preventDefault(),t=this.autoActivation?null:this.getSelectableStepAfterIndex(this.getSelectedStepIndex());break;case"Enter":case" ":case"Spacebar":e.preventDefault(),setTimeout(()=>{const t=this.nativeElement.querySelector("li.active"),i=t.closest("li[data-stepid]"),n=t.closest(".app-wizard-heading");if(i&&n){const t=i.getAttribute("data-stepid"),n=this.steps.toArray().findIndex(e=>e.widgetId===t),a=this.steps.toArray()[n];if(a&&a!==this.currentStep){this.onWizardHeaderClick(e,a);this.nativeElement.querySelectorAll("li[data-stepid]").forEach(e=>{e.setAttribute("tabindex","-1")});const t=i.querySelector("a");t&&(t.setAttribute("tabindex","0"),t.focus())}}},0);break;default:return}if(t){this.nativeElement.querySelector("li.active")?.classList.remove("active"),this.nativeElement.querySelector(`li[data-stepid="${t.widgetId}"]`)?.classList.add("active");const e=this.nativeElement.querySelector(".app-wizard-heading li.active a");this.nativeElement.querySelectorAll("li[data-stepid] a").forEach(e=>{e.setAttribute("tabindex","-1")}),e.setAttribute("tabindex","0"),e?.focus()}}getSelectedStepIndex(){const e=this.steps.toArray().findIndex(e=>this.nativeElement.querySelector(`li[data-stepid="${e.widgetId}"]`)?.classList.contains("active"));return e>=0?e:this.getActiveStepIndex()}ngOnDestroy(){this.stepsSubscription&&(this.stepsSubscription.unsubscribe(),this.stepsSubscription=null),$(document).off("mouseup"),this.wizContext&&(Object.keys(this.wizContext).forEach(e=>{delete this.wizContext[e]}),this.wizContext=null),this._dynamicContext&&(Object.keys(this._dynamicContext).forEach(e=>{delete this._dynamicContext[e]}),this._dynamicContext=null),this.dynamicWizard&&(this.dynamicWizard=[]),this.currentStep=null,super.ngOnDestroy()}static{this.\u0275fac=c.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:c,type:g,deps:[{token:c.Injector},{token:d.DynamicComponentRefProvider},{token:i.Context,self:!0},{token:"EXPLICIT_CONTEXT",optional:!0}],target:c.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=c.\u0275\u0275ngDeclareComponent({minVersion:"17.0.0",version:"20.3.19",type:g,isStandalone:!0,selector:"div[wmWizard]",providers:[i.provideAsWidgetRef(g),{provide:i.Context,useFactory:()=>({}),multi:!0}],queries:[{propertyName:"wizardAction",first:!0,predicate:["wizardAction"],read:n.TemplateRef},{propertyName:"steps",predicate:h}],exportAs:["wmWizard"],usesInheritance:!0,ngImport:c,template:'<div class="app-wizard-heading">\n <ul class="app-wizard-steps nav nav-pills {{stepClass}}">\n @for (step of steps; track step; let i = $index) {\n <li class="app-wizard-step" [hidden]="!step.show"\n [ngClass]="{finished: step.done, active: step.active, default: step.disabled}"\n (click)="onWizardHeaderClick($event, step)" [attr.data-stepid]="step.widgetId">\n <a href="javascript:void(0)" [attr.aria-current]="step.active ? \'step\' : null"\n [attr.aria-disabled]="step.disabled" [attr.aria-label]=\'step.subtitle ? "step " + (i + 1) + " " + step.title + " " + step.subtitle : "step " + (i + 1) + " " + step.title\' [attr.title]= "step.title"\n [ngClass]="{\'title-center-align\':class && class.includes(\'classic\') && !step.subtitle}" [tabindex]="step.active ? \'0\' : \'-1\'" (keydown)="onkeydown($event)">\n @if (class && class.includes(\'classic\')) {\n <span class="arrow"></span>\n }\n @if (shouldRenderWizardStepNumberSpan(step)) {\n <span class="wizard-step-number">\n @if (class && class.includes(\'number\') && !step.isDone && !showWizardStepIcons) {\n <span class="count">{{i+1}}</span>\n }\n @if (class && (class.includes(\'dottedstepper\') || class.includes(\'text-inline\') && !showWizardStepIcons) && !step.isDone) {\n <i class="dottedstepper"></i>\n }\n @if (class && (class.includes(\'dottedstepper\') || class.includes(\'number\')) && step.isDone) {\n <i class="app-icon wi wi-done"></i>\n }\n @if (shouldShowPrimaryStepIcon(step)) {\n <i class="app-icon {{ stepIconClassOrDefault(step) }}"></i>\n }\n @if (showWizardStepIcons && step.isDone && hasNonEmptyDoneIconClass(step)) {\n <i class="app-icon {{ step.doneiconclass }}"></i>\n }\n </span>\n }\n <span class="title-wrapper">\n @if (class && class.includes(\'text-inline\')) {\n <span>{{\'0\' + (i+1)}}</span>\n }\n <span class="step-title" [textContent]="step.title"></span>\n </span>\n @if (step.subtitle) {\n <span class="subtitle-wrapper" [attr.title]="step.subtitle">\n <span class="step-title" [textContent]="step.subtitle"></span>\n <a class="read_more" (click)="readMoreSubtitle()" style="display:none">more</a>\n </span>\n }\n </a>\n </li>\n }\n </ul>\n</div>\n@if (type !== \'dynamic\') {\n<div class="app-wizard-body panel-body">\n @if (message.caption) {\n <p wmMessage caption.bind="message.caption" type.bind="message.type"></p>\n }\n <ng-content ngProjectAs="form[wmWizardStep]"></ng-content>\n</div>\n}\n@if (type === \'dynamic\') {\n<div class="app-wizard-body panel-body">\n @if(!fieldDefs?.length) {\n <div>{{nodatamessage}}</div>\n }\n <ng-content select="div[wmRepeatTemplate]"></ng-content>\n</div>\n}\n@if(fieldDefs && fieldDefs.length || type !== \'dynamic\') {\n <ng-container *ngTemplateOutlet="wizardAction"></ng-container>\n}\n',dependencies:[{kind:"ngmodule",type:t.CommonModule},{kind:"directive",type:l.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"directive",type:l.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]},{kind:"directive",type:i.TextContentDirective,selector:"[textContent]",inputs:["textContent"]}]})}}c.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:c,type:g,decorators:[{type:n.Component,args:[{standalone:!0,imports:[t.CommonModule,i.TextContentDirective],selector:"div[wmWizard]",providers:[i.provideAsWidgetRef(g),{provide:i.Context,useFactory:()=>({}),multi:!0}],exportAs:"wmWizard",template:'<div class="app-wizard-heading">\n <ul class="app-wizard-steps nav nav-pills {{stepClass}}">\n @for (step of steps; track step; let i = $index) {\n <li class="app-wizard-step" [hidden]="!step.show"\n [ngClass]="{finished: step.done, active: step.active, default: step.disabled}"\n (click)="onWizardHeaderClick($event, step)" [attr.data-stepid]="step.widgetId">\n <a href="javascript:void(0)" [attr.aria-current]="step.active ? \'step\' : null"\n [attr.aria-disabled]="step.disabled" [attr.aria-label]=\'step.subtitle ? "step " + (i + 1) + " " + step.title + " " + step.subtitle : "step " + (i + 1) + " " + step.title\' [attr.title]= "step.title"\n [ngClass]="{\'title-center-align\':class && class.includes(\'classic\') && !step.subtitle}" [tabindex]="step.active ? \'0\' : \'-1\'" (keydown)="onkeydown($event)">\n @if (class && class.includes(\'classic\')) {\n <span class="arrow"></span>\n }\n @if (shouldRenderWizardStepNumberSpan(step)) {\n <span class="wizard-step-number">\n @if (class && class.includes(\'number\') && !step.isDone && !showWizardStepIcons) {\n <span class="count">{{i+1}}</span>\n }\n @if (class && (class.includes(\'dottedstepper\') || class.includes(\'text-inline\') && !showWizardStepIcons) && !step.isDone) {\n <i class="dottedstepper"></i>\n }\n @if (class && (class.includes(\'dottedstepper\') || class.includes(\'number\')) && step.isDone) {\n <i class="app-icon wi wi-done"></i>\n }\n @if (shouldShowPrimaryStepIcon(step)) {\n <i class="app-icon {{ stepIconClassOrDefault(step) }}"></i>\n }\n @if (showWizardStepIcons && step.isDone && hasNonEmptyDoneIconClass(step)) {\n <i class="app-icon {{ step.doneiconclass }}"></i>\n }\n </span>\n }\n <span class="title-wrapper">\n @if (class && class.includes(\'text-inline\')) {\n <span>{{\'0\' + (i+1)}}</span>\n }\n <span class="step-title" [textContent]="step.title"></span>\n </span>\n @if (step.subtitle) {\n <span class="subtitle-wrapper" [attr.title]="step.subtitle">\n <span class="step-title" [textContent]="step.subtitle"></span>\n <a class="read_more" (click)="readMoreSubtitle()" style="display:none">more</a>\n </span>\n }\n </a>\n </li>\n }\n </ul>\n</div>\n@if (type !== \'dynamic\') {\n<div class="app-wizard-body panel-body">\n @if (message.caption) {\n <p wmMessage caption.bind="message.caption" type.bind="message.type"></p>\n }\n <ng-content ngProjectAs="form[wmWizardStep]"></ng-content>\n</div>\n}\n@if (type === \'dynamic\') {\n<div class="app-wizard-body panel-body">\n @if(!fieldDefs?.length) {\n <div>{{nodatamessage}}</div>\n }\n <ng-content select="div[wmRepeatTemplate]"></ng-content>\n</div>\n}\n@if(fieldDefs && fieldDefs.length || type !== \'dynamic\') {\n <ng-container *ngTemplateOutlet="wizardAction"></ng-container>\n}\n'}]}],ctorParameters:()=>[{type:c.Injector},{type:d.DynamicComponentRefProvider},{type:Array,decorators:[{type:n.Self},{type:n.Inject,args:[i.Context]}]},{type:void 0,decorators:[{type:n.Inject,args:["EXPLICIT_CONTEXT"]},{type:n.Optional}]}],propDecorators:{steps:[{type:n.ContentChildren,args:[h]}],wizardAction:[{type:n.ContentChild,args:["wizardAction",{read:n.TemplateRef,descendants:!1}]}]}});const v={widgetType:"wm-wizardaction",hostClass:"app-wizard-actions panel-footer "};class f extends i.BaseComponent{static{this.initializeProps=void i.register("wm-wizardaction",new Map([["class",i.PROP_STRING],["name",i.PROP_STRING],["show",{value:!0,...i.PROP_BOOLEAN}]]))}constructor(e,t){super(e,v,t)}static{this.\u0275fac=c.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:c,type:f,deps:[{token:c.Injector},{token:"EXPLICIT_CONTEXT",optional:!0}],target:c.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=c.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:f,isStandalone:!0,selector:"div[wmWizardAction]",providers:[i.provideAsWidgetRef(f)],exportAs:["wmWizardAction"],usesInheritance:!0,ngImport:c})}}c.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:c,type:f,decorators:[{type:n.Directive,args:[{standalone:!0,selector:"div[wmWizardAction]",providers:[i.provideAsWidgetRef(f)],exportAs:"wmWizardAction"}]}],ctorParameters:()=>[{type:c.Injector},{type:void 0,decorators:[{type:n.Inject,args:["EXPLICIT_CONTEXT"]},{type:n.Optional}]}]}),e.WizardActionDirective=f,e.WizardComponent=g,e.WizardStepComponent=h}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("ngx-bootstrap/carousel"),require("@wm/components/base"),require("@swipey"),require("lodash-es")):"function"==typeof define&&define.amd?define(["exports","@angular/core","ngx-bootstrap/carousel","@wm/components/base","@swipey","lodash-es"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.advanced=e.wm.components.advanced||{},e.wm.components.advanced.carousel={}),e.ng.core,e.ngxBootstrap.carousel,e.wm.components.base,e.swipey,e._)}(this,function(e,t,i,n,a,s){"use strict";function o(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var r=o(t),l=o(i);class c extends a.SwipeAnimation{constructor(e,t,i){super(),this.carousel=e,this.interval=t,this.ngZone=i,this._activeIndex=0,this._animationPaused=!1,this._pauseCaroselTill=0,this._oldIndex=0;const n=this;this._$el=$(this.carousel.getNativeElement()).find(">.carousel"),this.init(this._$el.find(">.carousel-inner")),this._items=this._$el.find(">.carousel-inner >.carousel-item"),this._indicators=this._$el.find(">.carousel-indicators"),this._indicators.find("li").each(function(e){$(this).on("click",()=>{n._activeIndex=e,n.setActiveItem(),n.carousel.onChangeCB(n._activeIndex,n._oldIndex),n._oldIndex=n._activeIndex})}),this._$el.find(">.left.carousel-control").on("click",()=>{this._swiping||(this._pauseCaroselTill=Date.now()+this.interval,this.goToUpper())}),this._$el.find(">.right.carousel-control").on("click",()=>{this._swiping||(this._pauseCaroselTill=Date.now()+this.interval,this.goToLower())}),this.setActiveItem(),this.interval&&this.start(),$("carousel slide").removeAttr("aria-hidden")}bounds(){return this._width=this._items.width(),this._swiping=!0,{lower:-this._width,center:0,upper:this._width}}context(){return{w:this._width}}animation(){return[{target:this.getTarget.bind(this),css:{transform:"translate3d(${{ (($D + $d) / w) * 100 + '%'}}, 0, 0)","-webkit-transform":"translate3d(${{ (($D + $d) / w) * 100 + '%'}}, 0, 0)"}}]}onUpper(){this.resetTransition(),this._activeIndex-=1,this.setActiveItem(),this._swiping=!1}onLower(){this.resetTransition(),this._activeIndex+=1,this.setActiveItem(),this._swiping=!1}onAnimation(){const e=(this._items.length+this._activeIndex)%this._items.length;this.carousel.onChangeCB(e,this._oldIndex),this._oldIndex=e;const t=s.findIndex(this._items,this._$el.find(">.carousel-inner >.carousel-item.active")[0]);this._$el.find(">.left.carousel-control").attr("aria-label",(0===t?this._items.length:t)+" of "+this._items.length),this._$el.find(">.right.carousel-control").attr("aria-label",(t===this._items.length-1?1:t+2)+" of "+this._items.length)}start(){this.ngZone.runOutsideAngular(()=>{this._intervalId=setInterval(()=>{!this._swiping&&this._pauseCaroselTill<Date.now()&&this.goToLower(600)},this.interval)})}pause(){this._animationPaused=!0,this._intervalId||this.start()}resume(){this._animationPaused=!1}stop(){this._intervalId&&(clearInterval(this._intervalId),this._intervalId=0)}threshold(){return 5}getTarget(){const e=this._items.length,t=this._items.eq((e+this._activeIndex)%e),i=this._items.eq((e+this._activeIndex-1)%e),n=this._items.eq((e+this._activeIndex+1)%e);return t.add(n).add(i)}resetTransition(){this.getTarget().css({"-webkit-transition":"none","-webkit-transform":"",transition:"none",transform:""})}setActiveItem(){const e=this._items,t=this._activeIndex-1,i=this._activeIndex+1;1!==e.length?(this._indicators.find(">.active").removeClass("active"),this._indicators.find("> li").eq((e.length+this._activeIndex)%e.length).addClass("active"),e.filter(".active").removeClass("active"),e.addClass("left-item"),e.eq((e.length+t)%e.length).addClass("left-item").removeClass("right-item"),e.eq((e.length+this._activeIndex)%e.length).removeClass("left-item right-item").addClass("active"),e.eq((e.length+i)%e.length).addClass("right-item").removeClass("left-item")):e.eq(0).removeClass("left-item right-item")}}const d={widgetType:"wm-carousel"},p={indicators:"hide-navs",navs:"hide-indicators",none:"hide-both"};class m extends n.StylableComponent{static{this.initializeProps=void n.register("wm-carousel",new Map([["animation",{value:"auto",...n.PROP_STRING}],["animationinterval",{value:3,...n.PROP_NUMBER}],["controls",{value:"both",...n.PROP_STRING}],["dataset",n.PROP_ANY],["name",n.PROP_STRING],["nodatamessage",{value:"No Data Found",...n.PROP_STRING}],["show",n.PROP_BOOLEAN]]))}constructor(e,t,i,a){super(t,d,a),this.component=e,this.ngZone=i,n.styler(this.nativeElement,this)}onDataChange(e){this.fieldDefs=n.createArrayFrom(e)}stopAnimation(){this.animator&&this.animator.stop()}startAnimation(){this.animator&&(this.animator.interval=1e3*this.animationinterval,this.animator.start())}onSlidesRender(e){this.fieldDefs&&this.fieldDefs.length&&(this.currentslide=this.fieldDefs[0]),e.length&&setTimeout(()=>{this.animator=new c(this,this.interval,this.ngZone)},50)}setupHandlers(){this.slidesChangesSubscription=this.slides.changes.subscribe(e=>{this.triggerAnimation(e)}),this.slides.setDirty()}onChangeCB(e,t){this.currentslide=this.fieldDefs&&this.fieldDefs[e],this.previousslide=this.fieldDefs&&this.fieldDefs[t],this.invokeEventCallback("change",{newIndex:e,oldIndex:t})}ngAfterContentInit(){this.triggerAnimation(this.slides),this.setupHandlers()}ngOnDestroy(){this.stopAnimation(),this.slidesChangesSubscription&&(this.slidesChangesSubscription.unsubscribe(),this.slidesChangesSubscription=null),this.slides&&(this.slides=null),this.animator=null,this.fieldDefs=null,super.ngOnDestroy()}setanimationinterval(){this.interval="auto"===this.animation?1e3*this.animationinterval:0}triggerAnimation(e){this.stopAnimation(),this.onSlidesRender(e)}ngOnInit(){super.ngOnInit(),this.setanimationinterval()}onPropertyChange(e,t,i){"dataset"===e?this.onDataChange(t):"controls"===e?this.navigationClass=p[this.controls]:"animation"===e||"animationinterval"===e?("animationinterval"===e&&(this.stopAnimation(),this.setanimationinterval()),"none"===this.animation?this.stopAnimation():this.startAnimation()):super.onPropertyChange(e,t,i)}static{this.\u0275fac=r.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:r,type:m,deps:[{token:l.CarouselComponent},{token:r.Injector},{token:r.NgZone},{token:"EXPLICIT_CONTEXT",optional:!0}],target:r.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=r.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:m,isStandalone:!0,selector:"[wmCarousel]",queries:[{propertyName:"slides",predicate:i.SlideComponent}],exportAs:["wmCarousel"],usesInheritance:!0,ngImport:r})}}r.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:r,type:m,decorators:[{type:t.Directive,args:[{standalone:!0,selector:"[wmCarousel]",exportAs:"wmCarousel"}]}],ctorParameters:()=>[{type:l.CarouselComponent},{type:r.Injector},{type:r.NgZone},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}],propDecorators:{slides:[{type:t.ContentChildren,args:[i.SlideComponent]}]}});const h={widgetType:"wm-carousel-template",hostClass:"app-carousel-item"};class u extends n.StylableComponent{static{this.initializeProps=void n.register("wm-carousel-template",new Map([["show",n.PROP_BOOLEAN]]))}constructor(e,t){super(e,h,t),n.styler(this.nativeElement,this)}static{this.\u0275fac=r.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:r,type:u,deps:[{token:r.Injector},{token:"EXPLICIT_CONTEXT",optional:!0}],target:r.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=r.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:u,isStandalone:!0,selector:"[wmCarouselTemplate]",exportAs:["carouselTemplateRef"],usesInheritance:!0,ngImport:r})}}r.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:r,type:u,decorators:[{type:t.Directive,args:[{standalone:!0,selector:"[wmCarouselTemplate]",exportAs:"carouselTemplateRef"}]}],ctorParameters:()=>[{type:r.Injector},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}]}),e.CarouselAnimator=c,e.CarouselDirective=m,e.CarouselTemplateDirective=u}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@wm/components/base")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@wm/components/base"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.advanced=e.wm.components.advanced||{},e.wm.components.advanced.marquee={}),e.ng.core,e.wm.components.base)}(this,function(e,t,i){"use strict";var n,a,s=(n=t,a=Object.create(null),n&&Object.keys(n).forEach(function(e){if("default"!==e){var t=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(a,e,t.get?t:{enumerable:!0,get:function(){return n[e]}})}}),a.default=n,Object.freeze(a));const o={widgetType:"wm-marquee",hostClass:"app-marquee app-container"};class r extends i.StylableComponent{static{this.initializeProps=void i.register("wm-marquee",new Map([["class",i.PROP_STRING],["direction",i.PROP_STRING],["name",i.PROP_STRING],["scrollamount",i.PROP_NUMBER],["scrolldelay",i.PROP_NUMBER],["show",{value:!0,...i.PROP_BOOLEAN}]]))}constructor(e,t){super(e,o,t),i.styler(this.nativeElement,this)}static{this.\u0275fac=s.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:s,type:r,deps:[{token:s.Injector},{token:"EXPLICIT_CONTEXT",optional:!0}],target:s.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=s.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:r,isStandalone:!0,selector:"[wmMarquee]",providers:[i.provideAsWidgetRef(r)],usesInheritance:!0,ngImport:s})}}s.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:s,type:r,decorators:[{type:t.Directive,args:[{standalone:!0,selector:"[wmMarquee]",providers:[i.provideAsWidgetRef(r)]}]}],ctorParameters:()=>[{type:s.Injector},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}]}),e.MarqueeDirective=r}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@wm/components/base"),require("@wm/components/data/form"),require("@wm/components/input/button"),require("lodash-es")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@wm/components/base","@wm/components/data/form","@wm/components/input/button","lodash-es"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.advanced=e.wm.components.advanced||{},e.wm.components.advanced.login={}),e.ng.core,e.wm.components.base,e.wm.components.data.form,e.wm.components.input.button,e._)}(this,function(e,t,i,n,a,s){"use strict";var o,r,l=(o=t,r=Object.create(null),o&&Object.keys(o).forEach(function(e){if("default"!==e){var t=Object.getOwnPropertyDescriptor(o,e);Object.defineProperty(r,e,t.get?t:{enumerable:!0,get:function(){return o[e]}})}}),r.default=o,Object.freeze(r));const c={widgetType:"wm-login",hostClass:"app-login"};class d extends i.StylableComponent{static{this.initializeProps=void i.register("wm-login",new Map([["errormessage",i.PROP_STRING],["eventsource",i.PROP_ANY]]))}constructor(e,t){super(e,c,t),i.styler(this.nativeElement,this,i.APPLY_STYLES_TYPE.CONTAINER)}onSuccessCB(){this.invokeEventCallback("success")}onErrorCB(e){this.loginMessage={type:"error",caption:this.errormessage||e||this.appLocale.LABEL_INVALID_USERNAME_OR_PASSWORD,show:!0},this.messageCmp.showMessage(this.loginMessage.caption,this.loginMessage.type),this.invokeEventCallback("error")}getLoginDetails(){return this.formCmp.dataoutput}doLogin(){this.eventsource?this.formCmp.ngform.valid&&this.eventsource.invoke({loginInfo:this.getLoginDetails()},this.onSuccessCB.bind(this),this.onErrorCB.bind(this)):console.warn('Default action "loginAction" does not exist. Either create the Action or assign an event to onSubmit of the login widget')}initLoginButtonActions(){this.boundLoginButtonClick=e=>{this.nativeElement.hasAttribute("submit.event")||this.loginBtnCmp.getNativeElement().hasAttribute("click.event")||this.loginBtnCmp.getNativeElement().hasAttribute("tap.event")||this.doLogin()},this.loginBtnCmp.getNativeElement().addEventListener("click",this.boundLoginButtonClick)}ngAfterViewInit(){super.ngAfterViewInit(),this.boundFormSubmit=e=>e.preventDefault(),this.formCmp.getNativeElement().addEventListener("submit",this.boundFormSubmit),this.buttonComponents.forEach(e=>{if("loginButton"===e.getNativeElement().getAttribute("name")||s.includes(e.getNativeElement().classList,"app-login-button")){if(this.loginBtnCmp)return;this.loginBtnCmp=e,this.initLoginButtonActions()}})}ngOnDestroy(){this.loginBtnCmp&&this.boundLoginButtonClick&&(this.loginBtnCmp.getNativeElement().removeEventListener("click",this.boundLoginButtonClick),this.boundLoginButtonClick=null),this.formCmp&&this.boundFormSubmit&&(this.formCmp.getNativeElement().removeEventListener("submit",this.boundFormSubmit),this.boundFormSubmit=null),this.buttonComponents=null,this.messageCmp=null,this.formCmp=null,this.loginBtnCmp=null,super.ngOnDestroy()}static{this.\u0275fac=l.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:l,type:d,deps:[{token:l.Injector},{token:"EXPLICIT_CONTEXT",optional:!0}],target:l.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=l.\u0275\u0275ngDeclareComponent({minVersion:"14.0.0",version:"20.3.19",type:d,isStandalone:!0,selector:"div[wmLogin]",providers:[i.provideAsWidgetRef(d)],queries:[{propertyName:"formCmp",first:!0,predicate:n.FormComponent,descendants:!0},{propertyName:"buttonComponents",predicate:a.ButtonComponent,descendants:!0}],viewQueries:[{propertyName:"messageCmp",first:!0,predicate:i.MessageComponent,descendants:!0,static:!0}],usesInheritance:!0,ngImport:l,template:'<p wmMessage class="app-login-message" #message show.bind="loginMessage.show" caption.bind="loginMessage.caption" type.bind="loginMessage.type"></p>\n<ng-content></ng-content>\n',dependencies:[{kind:"component",type:i.MessageComponent,selector:"[wmMessage]",exportAs:["wmMessage"]}]})}}l.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:l,type:d,decorators:[{type:t.Component,args:[{standalone:!0,imports:[i.MessageComponent],selector:"div[wmLogin]",providers:[i.provideAsWidgetRef(d)],template:'<p wmMessage class="app-login-message" #message show.bind="loginMessage.show" caption.bind="loginMessage.caption" type.bind="loginMessage.type"></p>\n<ng-content></ng-content>\n'}]}],ctorParameters:()=>[{type:l.Injector},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}],propDecorators:{formCmp:[{type:t.ContentChild,args:[n.FormComponent]}],buttonComponents:[{type:t.ContentChildren,args:[a.ButtonComponent,{descendants:!0}]}],messageCmp:[{type:t.ViewChild,args:[i.MessageComponent,{static:!0}]}]}}),e.LoginComponent=d}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@wm/core"),require("@wm/components/base"),require("lodash-es"),require("@angular/forms"),require("@wm/components/input/dataset-aware-form"),require("rxjs")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@wm/core","@wm/components/base","lodash-es","@angular/forms","@wm/components/input/dataset-aware-form","rxjs"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.advanced=e.wm.components.advanced||{},e.wm.components.advanced.custom={}),e.ng.core,e.wm.core,e.wm.components.base,e._,e.ng.forms,e.wm.components.input.datasetawareform,e.rxjs)}(this,function(e,t,i,n,a,s,o,r){"use strict";function l(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var c=l(t),d=l(i);const p=new Map([["class",n.PROP_STRING],["hint",n.PROP_STRING],["name",n.PROP_STRING],["widgetname",n.PROP_STRING],["show",{value:!0,...n.PROP_BOOLEAN}]]),m=new Set;let h={};class u extends o.DatasetAwareFormComponent{static{this.initializeProps=void n.register("wm-custom-widget",p)}constructor(e,t,a,s){const o=`wm-custom-${a}`,l={widgetType:o,hostClass:"app-html-container"};let c=i.noop;super(e,l,s,void 0,new Promise(e=>c=e)),this.props={},this.baseWidget={},this._isCustom=!0,this.propsReady=c,this.configSubject=new r.Subject,this.onErroSubject=new r.Subject,this.widgetType=o,this.name=t.nativeElement.getAttribute("name"),n.styler(this.nativeElement,this),this.registerReadyStateListener(()=>{super.onPropertyChange("name",this.name)}),this.registerPropertyChangeListener((e,t,i)=>{if(!e.startsWith("prop-"))return;const n=e.slice(5);this.props.hasOwnProperty(n)&&this.props[n]!==t&&(this.props[n]=t)})}get datavalue(){if(this.nativeElement.children.length){let e=this.nativeElement.children[0].children[0].widget.viewParent.datavalue;return this.updateDataValue(e),e}}set datavalue(e){this.nativeElement.children.length&&(this.nativeElement.children[0].children[0].widget.viewParent.datavalue=e)}setBaseWidgetName(e){let t=[];t=e.split("-").map(e=>e="wm"!==e?a.capitalize(e):e),this.baseWidgetName=t.join("")}setProps(e,t){this.config=e,this.baseWidgetName=this.config.projectPropsOn||this.config.widgetType.split("wm-")[1],this.configSubject.next(null),e.customClasses&&i.addClass(this.nativeElement,e.customClasses),this.asAttr=this.nativeElement.children[0].children[0].hasAttribute("as"),this.baseWidget=this.nativeElement.children[0].children[0].querySelector(`[name=${this.baseWidgetName}]`)?.widget,e&&e.properties&&(m.has(this.widgetType)?this.props=Object.assign(this.props,a.cloneDeep(h[this.widgetType])):n.register(this.widgetType,this.prepareProps(e.properties)),this.propsReady(t))}prepareProps(e={}){const t=new Map(p);return Object.entries(e).forEach(([e,i])=>{let a=n.PROP_TYPE.STRING;"boolean"===i.type?a=n.PROP_TYPE.BOOLEAN:"number"===i.type?a=n.PROP_TYPE.NUMBER:"string"!==i.type&&(a=i.type),t.set(`prop-${e}`,{type:a,value:_.startsWith(i.value,"bind:")?void 0:i.value}),this.props[e]=i.value}),m.add(this.widgetType),h[this.widgetType]=this.props,t}updateDataValue(e){this.formControl&&this.formControl.control&&e!==this.formControl.control.value&&(this.formControl.control.setValue(e),this.formControl.control.invalid&&this.onErroSubject.next(null))}updateData(e,t){let i=e.replace("base-","");this.asAttr?(this[this.baseWidgetName][i]=t,this.nativeElement.children[0].children[0].widget.viewParent[this.baseWidgetName][i]=t,this[this.baseWidgetName].initDatasetItems()):(this[i]=t,this.nativeElement.children[0].children[0].widget.viewParent[i]=t),this.formControl&&"datavalue"===i&&this.updateDataValue(t)}static{this.\u0275fac=c.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:c,type:u,deps:[{token:c.Injector},{token:c.ElementRef},{token:"widgetname",attribute:!0},{token:"EXPLICIT_CONTEXT",optional:!0}],target:c.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=c.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:u,isStandalone:!0,selector:"[wmWidgetContainer]",providers:[n.provideAs(u,s.NG_VALUE_ACCESSOR,!0),n.provideAs(u,s.NG_VALIDATORS,!0),n.provideAsWidgetRef(u)],exportAs:["wmWidgetContainer"],usesInheritance:!0,ngImport:c})}}c.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:c,type:u,decorators:[{type:t.Directive,args:[{standalone:!0,selector:"[wmWidgetContainer]",providers:[n.provideAs(u,s.NG_VALUE_ACCESSOR,!0),n.provideAs(u,s.NG_VALIDATORS,!0),n.provideAsWidgetRef(u)],exportAs:"wmWidgetContainer"}]}],ctorParameters:()=>[{type:c.Injector},{type:c.ElementRef},{type:void 0,decorators:[{type:t.Attribute,args:["widgetname"]}]},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}]});const g={widgetType:"wm-custom-widget-container",hostClass:"app-custom-widget-container clearfix"};class v extends n.StylableComponent{static{this.initializeProps=void n.register("wm-custom-widget-container",new Map([["name",n.PROP_STRING],["class",n.PROP_STRING]]))}constructor(e,t){super(e,g),this.viewport=t,this.registerDestroyListener(this.viewport.subscribe("resize",e=>this.callback("resize",e))),this.registerDestroyListener(this.viewport.subscribe("orientationchange",e=>this.callback("orientationchange",e)))}ngAfterContentInit(){let e=this.nativeElement.closest("[customwidgetcontainer]")||this.nativeElement.closest("[wmwidgetcontainer]"),t={},i=Array.from(n.getWidgetPropsByType("wm-custom-widget-container").keys());for(let n=0;n<e.attributes.length;n++){let a=e.attributes.item(n);a.value&&""!==a.value&&!i.includes(a.name)&&(t[a.name]=a.value)}this.processChildren(this.nativeElement.children,t)}processChildren(e,t){let i=this.$element.attr("base");Array.from(e).forEach(e=>{if(e.getAttribute("name")!==i)this.processChildren(e.children,t);else for(const[i,n]of Object.entries(t))i.includes(".event")||i.includes(".bind")?this.processAttr(i,n,{widget:e.widget,nativeElement:e}):e.widget[i]=n})}callback(e,t){t=_.assign({widget:this},t),this.invokeEventCallback(e,t)}ngOnAttach(){this.callback("attach")}ngOnDetach(){this.callback("detach")}ngOnDestroy(){this.callback("destroy"),super.ngOnDestroy()}static{this.\u0275fac=c.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:c,type:v,deps:[{token:c.Injector},{token:d.Viewport}],target:c.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=c.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:v,isStandalone:!0,selector:"[wmCustomWidget]",providers:[n.provideAsWidgetRef(v)],usesInheritance:!0,ngImport:c})}}c.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:c,type:v,decorators:[{type:t.Directive,args:[{standalone:!0,selector:"[wmCustomWidget]",providers:[n.provideAsWidgetRef(v)]}]}],ctorParameters:()=>[{type:c.Injector},{type:d.Viewport}]}),e.CustomWidgetContainerDirective=u,e.CustomWidgetDirective=v}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@wavemaker-ai/variables"),require("@wm/core"),require("lodash-es"),require("moment"),require("angular2-websocket/angular2-websocket"),require("@metrichor/jmespath"),require("@angular/core"),require("@angular/router"),require("@wm/oAuth"),require("@wm/security")):"function"==typeof define&&define.amd?define(["exports","@wavemaker-ai/variables","@wm/core","lodash-es","moment","angular2-websocket/angular2-websocket","@metrichor/jmespath","@angular/core","@angular/router","@wm/oAuth","@wm/security"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.variables={}),e.wm_common_variables,e.wm.core,e._,e.momentLib,e.angularWebSocket,e.jmespath,e.ng.core,e.ng.router,e.wm.oAuth,e.wm.security)}(this,function(e,t,i,n,a,s,o,r,l,c,d){"use strict";function p(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var m=p(i),h=p(a),u=p(r),g=p(l),v=p(c),f=p(d);const b={isStudioMode:!1,isRunMode:!0,XSRF_COOKIE_NAME:"wm_xsrf_token",DEFAULT_TIMER_DELAY:500,WIDGET_DOESNT_EXIST:"The widget you're trying to navigate to doesn't exist on this page"},y={CATEGORY:{MODEL:"wm.Variable",LIVE:"wm.LiveVariable",CRUD:"wm.CrudVariable",SERVICE:"wm.ServiceVariable",WEBSOCKET:"wm.WebSocketVariable",NAVIGATION:"wm.NavigationAction",NOTIFICATION:"wm.NotificationAction",TIMER:"wm.TimerAction",LOGIN:"wm.LoginAction",LOGOUT:"wm.LogoutAction"},EVENTS:["onBefore","onBeforeUpdate","onResult","onBeforeOpen","onOpen","onBeforeMessageSend","onMessageReceive","onProgress","onError","onBeforeDatasetReady","onCanUpdate","onClick","onHide","onOk","onCancel","onBeforeClose","onClose","onTimerFire","onSuccess","onOnline","onOffline"],EVENT:{CAN_UPDATE:"onCanUpdate",BEFORE:"onBefore",BEFORE_UPDATE:"onBeforeUpdate",PREPARE_SETDATA:"onBeforeDatasetReady",RESULT:"onResult",ERROR:"onError",ABORT:"onAbort",PROGRESS:"onProgress",CLICK:"onClick",HIDE:"onHide",OK:"onOk",CANCEL:"onCancel",CLOSE:"onClose",TIMER_FIRE:"onTimerFire",SUCCESS:"onSuccess",BEFORE_OPEN:"onBeforeOpen",OPEN:"onOpen",BEFORE_SEND:"onBeforeMessageSend",MESSAGE_RECEIVE:"onMessageReceive",BEFORE_CLOSE:"onBeforeClose"},OWNER:{APP:"App",PAGE:"Page"},REST_SUPPORTED_SERVICES:["JavaService","SoapService","FeedService","RestService","SecurityServiceType","DataService","WebSocketService","OpenAPIService"],PAGINATION_PARAMS:["page","size","sort"],REST_SERVICE:{BASE_PATH_KEY:"x-WM-BASE_PATH",RELATIVE_PATH_KEY:"x-WM-RELATIVE_PATH",OAUTH_PROVIDER_KEY:"x-WM-PROVIDER_ID",AUTH_HDR_KEY:"Authorization",SECURITY_DEFN:{BASIC:"basic",OAUTH2:"oauth2"},AUTH_TYPE:{BASIC:"BASIC",OAUTH:"OAUTH2",NONE:"NONE"},CONTENT_TYPE_KEY:"x-WM-CONTENT_TYPE",ACCESSTOKEN_PLACEHOLDER:{LEFT:"",RIGHT:".access_token"},ERR_TYPE:{NO_ACCESSTOKEN:"missing_accesstoken",NO_CREDENTIALS:"no_credentials",METADATA_MISSING:"metadata_missing",CRUD_OPERATION_MISSING:"crud_operation_missing",USER_UNAUTHORISED:"user_unauthorised",REQUIRED_FIELD_MISSING:"required_field_missing"},ERR_MSG:{NO_ACCESSTOKEN:"Access token missing",NO_CREDENTIALS:"No credentials present",METADATA_MISSING:'Metadata missing for "$variable"',USER_UNAUTHORISED:"Unauthorized User",CRUD_OPERATION_MISSING:'Operation "$operation" not allowed for "$variable"',REQUIRED_FIELD_MISSING:'Required field(s) missing: "${0}"'},UNCLOAKED_HEADERS:["CONTENT-TYPE","ACCEPT","CONTENT-LENGTH","ACCEPT-ENCODING","ACCEPT-LANGUAGE"],PREFIX:{AUTH_HDR_VAL:{BASIC:"Basic",OAUTH:"Bearer"},CLOAK_HEADER_KEY:"X-WM-"}},SERVICE_TYPE:{JAVA:"JavaService",REST:"RestService",SOAP:"SoapService",FEED:"FeedService",DATA:"DataService",SECURITY:"SecurityServiceType",WEBSOCKET:"WebSocketService",OPENAPI:"OpenAPIService"},CONTROLLER_TYPE:{QUERY:"QueryExecution",PROCEDURE:"ProcedureExecution"},HTTP_STATUS_CODE:{CORS_FAILURE:-1,UNAUTHORIZED:401,FORBIDDEN:403},EXPORT_TYPES_MAP:{EXCEL:".xlsx",CSV:".csv"},DEFAULT_VAR:{NOTIFICATION:"appNotification"}},w={NON_BODY_HTTP_METHODS:["GET","HEAD"],CONTENT_TYPES:{FORM_URL_ENCODED:"application/x-www-form-urlencoded",MULTIPART_FORMDATA:"multipart/form-data",OCTET_STREAM:"application/octet-stream"}},P={WM_DATA_JSON:"wm_data_json",WM_HTTP_JSON:"wm_httpRequestDetails"},C=t.$rootScope,T=h.default||window.moment;e.appManager=void 0,e.httpService=void 0,e.metadataService=void 0,e.navigationService=void 0,e.routerService=void 0,e.toasterService=void 0,e.oauthService=void 0,e.securityService=void 0,e.dialogService=void 0;const O=/^\[("|')[\w\W]*(\1)\]$/,I=new Map,D=new Map,E=(e,t)=>{let i,a,s=n.noop;D.has(e)&&(s=D.get(e).cancel),s(),i=n.debounce(function(){a=e[t](),a instanceof Promise&&a.catch(n.noop)},100),D.set(e,i),i()},R=(t,i)=>{switch(t){case"appManager":e.appManager=i;break;case"http":e.httpService=i;break;case"metadata":e.metadataService=i;break;case"navigationService":e.navigationService=i;break;case"router":e.routerService=i;break;case"toaster":e.toasterService=i;break;case"oAuth":e.oauthService=i;break;case"security":e.securityService=i;break;case"dialog":e.dialogService=i}},S=(e,t,a,s,o)=>{const r=t[e],l=t._context;let c;e!==y.EVENT.ERROR||o||r||(c=l.Actions[y.DEFAULT_VAR.NOTIFICATION],c&&(a=c.getMessage()||a,a=n.isString(a)?a:"An error has occured. Please check the app logs.",c.invoke({message:a},void 0,void 0)));const d=i.$parseEvent(t[e]);return e===y.EVENT.BEFORE_UPDATE?"wm.LiveVariable"===t.category&&"read"===t.operation?d(t._context,{variable:t,dataFilter:a,options:s}):d(t._context,{variable:t,inputData:a,options:s}):d(t._context,{variable:t,data:a,options:s})},_=e=>{setTimeout(()=>{i.triggerFn(e)},500)},x=(e,t)=>{e=n.split(e,"&"),n.forEach(e,function(e){e=n.split(e,"="),t[e[0]]=decodeURIComponent(n.join(n.slice(e,1),"="))})},A=(t,n,a)=>{const s=t.url,o=t.method,r=t.dataParams||t.data,l=t.headers;l["Content-Type"]=l["Content-Type"]||"application/x-www-form-urlencoded",e.httpService.send({target:"WebService",action:"invokeRuntimeRestCall",method:o,url:s,headers:l,data:r,responseType:"arraybuffer"}).then(function(e){setTimeout(()=>{((e,t,n,a)=>{let s,o,r,l,c,d,p,m="";const h=t.get("Content-Disposition");if(h&&-1!==h.indexOf("attachment")&&(s=/filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/,o=s.exec(h),null!==o&&o[1]&&(m=o[1].replace(/['"]/g,""))),r=t.get("Content-Type"),l=new Blob([e],{type:r}),void 0!==window.navigator.msSaveBlob)window.navigator.msSaveBlob(l,m)?_(n):i.triggerFn(a);else{if(c=window.URL||window.webkitURL,d=c.createObjectURL(l),m){const e=document.createElement("a");let t;void 0===e.download?(t=new FileReader,t.onloadend=function(){const e=t.result.replace(/^data:[^;]*;/,"data:attachment/file;");p=window.open(e,"_blank"),p||(window.location.href=e)},t.onload=_.bind(void 0,n),t.onerror=a,t.readAsDataURL(l)):(e.href=d,e.download=m,document.body.appendChild(e),e.click(),_(n))}else p=window.open(d,"_blank"),p||(window.location.href=d),_(n);setTimeout(()=>{c.revokeObjectURL(d)},100)}})(e.body,e.headers,n,a)},900)},function(e){i.triggerFn(a,e)})},k=(e,t,n)=>{let a,s=e.target;const o=n[t];return O.test(s)?a=o:(s=s.substr(0,s.lastIndexOf(".")),a=e.target===t?n:s?i.findValueOf(o,s,!0):o),a},N=e=>{let t;return t=O.test(e)?e.replace(/^(\[["'])|(["']\])$/g,""):e.split(".").pop(),t},M=(e,t,i,a,s,o)=>{const r=N(e),l=k(t,i,a);s=n.isUndefined(s)?t.value:s,l&&(l[r]=s),((e,t,i,a,s)=>{switch(a.category){case y.CATEGORY.LIVE:"read"===a.operation?("dataBinding"===e?n.forEach(t,function(e,t){a.filterFields[t]={value:e}}):a.filterFields[e]={value:t,type:i},a.autoUpdate&&!n.isUndefined(t)&&n.isFunction(a.listRecords)&&!s&&E(a,"listRecords")):("dataBinding"===e?a.inputFields=t:a.inputFields[e]=t,a.autoUpdate&&!n.isUndefined(t)&&n.isFunction(a[a.operation+"Record"])&&!s&&E(a,a.operation+"Record"));break;case y.CATEGORY.CRUD:"list"===a.operationType&&a.autoUpdate&&!n.isUndefined(t)&&n.isFunction(a.invoke)&&!s&&E(a,"invoke");break;case y.CATEGORY.SERVICE:case y.CATEGORY.LOGIN:a.autoUpdate&&!n.isUndefined(t)&&n.isFunction(a.invoke)&&!s&&E(a,"invoke")}})(r,s,t.type,a,o)},L=(e,t,a,s)=>{const o=e.target,r=k(e,a,s),l=N(o),c=t.registerDestroyListener?t.registerDestroyListener.bind(t):n.noop;if(i.stringStartsWith(e.value,"bind:")){const d=(t,c)=>{t===c&&n.isUndefined(t)||!(!n.isUndefined(t)||n.isUndefined(c)&&n.isUndefined(r[l]))||(n.includes(["blob","file"],e.type)||(t=i.getClonedObject(t)),M(o,e,a,s,t),I.has(s)||I.set(s,{}),n.set(I.get(s),[s.name,a,o],t),n.isObject(t)&&((e,t,i)=>{const a=n.keys(n.get(I.get(i),[i.name,t])),s=N(e);let o;o=n.filter(a,function(e){return e!==s&&n.includes(e,s)||(s===t||"dataBinding"===s)&&e!==s}),o.length&&n.forEach(o,function(e){M(e,{target:e},t,i,n.get(I.get(i),[i.name,t,e]))})})(o,a,s))};c(i.$watch(e.value.replace("bind:",""),t,{},d,void 0,void 0,void 0,()=>s.isMuted))}else n.isUndefined(e.value)||(M(o,e,a,s,e.value,!0),a!==l&&(I.has(s)||I.set(s,{}),n.set(I.get(s),[s.name,a,o],e.value)))},F=(e,t,i,a)=>{a=a||"dataBinding";const s=e[i=i||"dataBinding"];e[i]={},e["_bind"+i]=s,s&&n.isArray(s)&&s.forEach(function(i){"wm.Variable"===e.category&&"dataBinding"===i.target&&(i.target="dataSet"),L(i,t,a,e)})},j=(e,t,a,s,o,r)=>{n.isEmpty(e.headers)?((e,t,a,s)=>{"/"===e.url[1]&&"/"===e.url[2]&&(e.url=e.url.slice(0,1)+e.url.slice(2));let o,r,l,c,d="";const p="fileDownloadIFrame",m="fileDownloadForm",h="Content-Type",u=e.url,g=n.get(e.headers,h),v=n.pickBy(e.headers,function(e,t){return t!==h});o=$("#"+p),o.length&&o.first().remove(),o=$('<iframe id="'+p+'" name="'+p+'" class="ng-hide"></iframe>'),r=$('<form id="'+m+'" name="'+m+'"></form>'),d+=-1!==u.indexOf("?")?u.substring(u.indexOf("?")+1):"",d+=g===w.CONTENT_TYPES.FORM_URL_ENCODED?(d?"&":"")+e.dataParams:"",r.attr({target:o.attr("name"),action:u,method:e.method,enctype:n.isEmpty(e.data)&&n.isEmpty(d)?w.CONTENT_TYPES.MULTIPART_FORMDATA:g}),n.includes(w.NON_BODY_HTTP_METHODS,n.toUpper(e.method))&&x(d,v),n.isEmpty(e.data)?c=n.isEmpty(a)?v:a:(x(e.data,v),c=v),n.forEach(c,function(e,t){l=$('<input type="hidden">'),l.attr({name:t,value:e}),r.append(l)}),$("body").append(o),setTimeout(function(){let e=!1;o.on("load",function(){if(e)return;const t=o.contents().find("body").text();if(t&&t.trim()){let n;e=!0;try{n={error:JSON.parse(t.trim())}}catch(e){n=""}i.triggerFn(s,n)}}),o.contents().find("body").append(r),r.submit(),setTimeout(()=>{e||(e=!0,i.triggerFn(t))},2e3)},100)})(e,s,r,o):A(e,s,o)},V=()=>window.File&&window.FileReader&&window.FileList&&window.Blob,B=E,G=(t,a)=>{let s;return n.isDate(t)?s=t.getTime():(isNaN(t)||(t=parseInt(t,10)),s=t&&T(t).valueOf()),isNaN(s)&&a!==i.DataType.TIME||a===i.DataType.TIMESTAMP?s:(a!==i.DataType.TIME||s||(s=T((new Date).toDateString()+" "+t).valueOf()),t&&e.appManager.getPipe("date").transform(s,(e=>i.DEFAULT_FORMATS[n.toUpper(e)])(a)))},W=(e,t)=>(n.includes(t,".")&&(t=n.toLower(i.extractType(t))),n.isArray(e)?n.map(e,function(e){return G(e,t)}):G(e,t));class q{initBinding(e,t,i){F(e,e._context,t,i)}notifyInflight(t,i,n){e.appManager.notify("toggle-variable-state",{variable:t,active:i,data:n})}}class z{initBinding(e,t,i){F(e,e._context,t,i)}notifyInflight(t,i,n,a){e.appManager.notify("toggle-variable-state",{variable:t,active:i,data:n,options:a})}setRequestTrackId(e,t){const i=e?.headers?.get("x-wm-request-track-id");i&&(t._requestTrackId=i)}httpCall(t,i,n){return new Promise((a,s)=>{i._observable=e.httpService.sendCallAsObservable(t,n).subscribe(e=>{e&&e.type&&(this.setRequestTrackId(e,i),a(e))},t=>{if(this.setRequestTrackId(t,i),e.httpService.isPlatformSessionTimeout(t)){this.notifyInflight(i,!1,t);const e=t._401Subscriber.asObservable().subscribe(t=>{a(t),e&&!e.closed&&e.unsubscribe()},t=>{s(t),e&&!e.closed&&e.unsubscribe()})}else s(t)})})}prepareCallbackOptions(e,t){let i={};return i.xhrObj=e,t&&n.extend(i,t),i}}class U{static setPaginationQueryParams(e,t,i){t.parameters.forEach(t=>{let n;n="offset"===i.type||i.input.offset?"offset":"page",t.name===i.input[n].split(".")[0]?t.sampleValue=e.pagination.page:t.name===i.input.size.split(".")[0]&&(t.sampleValue=e.pagination.size)})}static setVariablePagination(e,t,i){e.pagination||(e.pagination={empty:!1}),e.pagination.size=t.size,e.pagination.page=t.page||0,e.pagination.totalElements=t.totalElements,e.pagination.numberOfElements=e.pagination.size,e.pagination.number=i.page?i.page-1:0,e.pagination.totalPages=e.pagination.totalElements/e.pagination.size,e.pagination.totalElements%e.pagination.size===0?e.pagination.totalPages=parseInt(e.pagination.totalPages):e.pagination.totalPages=parseInt(e.pagination.totalPages)+1,t.next?(e.pagination.next=t.next,e.pagination.prev=t.prev,e.pagination.last=!t.next,e.pagination.first=!t.prev):(e.pagination.first=e.pagination.page<=1,e.pagination.last=""===t.hasMoreItems?!(e.pagination.page<e.pagination.totalPages):!t.hasMoreItems)}static setPaginationItems(e,t,i,a,s){if(n.startsWith(e,"$body")){const n=e.replace("$body.","");try{i[a]=o.jmespath.search(t,n)}catch{console.warn(`${e} expression needs to be corrected as per JMES guidelines`)}}else if(n.startsWith(e,"$header")){const t=e.replace("$header.",""),n=Object.fromEntries(s.headers),r=t.split(".");try{i[a]=o.jmespath.search(n,r[0].toLowerCase())}catch{console.warn(`${e} expression needs to be corrected as per JMES guidelines`)}if(i[a]?.length){let t=i[a].join();if(1===r.length)i[a]=t;else{let n=r.slice(1).join(".");const s=JSON.parse(t);/[!@#$%^&*()+\=\[\]{};':"\\|,<>\/?]+/.test(n)&&(n="headerResp."+n);try{i[a]=o.jmespath.search(s,n)}catch{console.warn(`${e} expression needs to be corrected as per JMES guidelines`)}}}}}static getPaginationInfo(e,t){return e?.paginationInfo?e.paginationInfo:t._paginationConfig}static checkPaginationAtQuery(e,t,i){const a=this.getPaginationInfo(e,t);if(!(i&&i.page&&a?.input.size&&t.pagination))return;let s;s="offset"===a.type||a.input.offset?"offset":"page";const o=a.input[s].split(".")[0],r=n.find(e.parameters,function(e){return e.name===o});!n.isEmpty(t.dataBinding)&&r&&"query"===r.parameterType&&(a.output?.page||"offset"===a.type?t.pagination.page=this.getOffsetInfo(t,i):t.pagination.page=i.page,this.setPaginationQueryParams(t,e,a))}static getOffsetInfo(e,t){return e.pagination.size*(t.page?t.page-1:1)}static setPaginationAtReq(e,t,i,a,s,o,r){let l,c={},d={};l="offset"===e.type||e.input.offset?"offset":"page";const p=e.input[l].split(".")[0],m=n.find(t.parameters,function(e){return e.name===p});if("header"===m?.parameterType)n.set(c,e.input[l],i.pagination.page),n.set(c,e.input.size,i.pagination.size),a[p]=JSON.stringify(c[p]),d.headers=a;else if("body"===m?.parameterType){const t=JSON.parse(m.sampleValue),a=e.input[l].split(".")[1];if(t&&t[a]){const o=e.input[l].split(".").splice(1).join(".");"offset"!==l?n.set(c,o,i.pagination.page):n.set(c,o,this.getOffsetInfo(i,r)),n.set(c,e.input.size.split(".").splice(1).join("."),i.pagination.size),t[a]=c[a],s=JSON.stringify(t),d.requestBody=s}}else if(i.pagination.next&&m)if("path"===m.parameterType){const e=t.relativePath.split("/"),n="{"+m.name+"}",a=e.indexOf(n);let s,r,l;s=i.pagination.isNext?i.pagination.next.split("/"):i.pagination.prev.split("/"),t.directPath?(l=new URL(o),r=l.pathname.split("/"),r[a]=s[a],l.pathname=r.join("/"),o=l.href,d.url=o):(r=o.split("/"),r[a+1]=s[a],o=r.join("/"),d.url=o)}else if("query"===m.parameterType){const e=o.split("?");let t;t=i.pagination.isNext?i.pagination.next.split("?"):i.pagination.prev.split("?"),e[1]=t[1],o=e.join("?"),d.url=o}return d}static setParameterVal(e,t,i,a){const s=this.getPaginationInfo(i,a).input[e].split(".")[0],o=n.find(i.parameters,function(e){return e.name===s});t[e]=n.result(o,"sampleValue")}static generatePaginationRes(e,t,i,a,s,o){let r={};const l=t.output;if(l?.next)l&&(this.setPaginationItems(l.next,i,r,"next",a),this.setPaginationItems(l.prev,i,r,"prev",a));else{if(l?.size?this.setPaginationItems(l.size,i,r,"size",a):this.setParameterVal("size",r,e,o),l?.page?this.setPaginationItems(l.page,i,r,"page",a):"offset"!==t.type&&this.setParameterVal("page",r,e,o),n.startsWith(l?.totalElements,"$minValue")){const e=l.totalElements.replace("$minValue=",""),t=r.page?r.page:s.page,i=r.size*t;!o.pagination||o.pagination.totalElements>i?r.totalElements=parseInt(e):r.totalElements=i+1}else l?.totalElements?this.setPaginationItems(l.totalElements,i,r,"totalElements",a):"offset"===t.type||t.input.offset?r.totalElements=r.size*(s.page?s.page:1)+1:r.totalElements=r.size*r.page+1;l?.hasMoreItems?this.setPaginationItems(l.hasMoreItems,i,r,"hasMoreItems",a):r.hasMoreItems=""}return r}}const H=(e,t,a)=>{const s=n.toLower(i.extractType(n.get(t,"items.type")||t.type)),o=b.isStudioMode?t["x-WM-CONTENT_TYPE"]:t.contentType;if(V())return"file"===s||"string"!==o&&o?n.isArray(a)&&"file"===s?n.forEach(a,function(n){e.append(t.name,n&&n.content||i.getBlob(n),n.name)}):e.append(t.name,i.getBlob(a,o),a&&a.name):(n.isObject(a)&&(a=JSON.stringify(a)),e.append(t.name,a)),e},Y=(e,t)=>{const a={},s=[];let o;return n.forEach(t,function(t){o=n.get(e,t.name),n.isUndefined(o)||""===o||null===o||t.readOnly?t.required&&s.push(t.name||t.id):(o=i.isDateTimeType(t.type)?W(o,t.type):o,n.isArray(o)&&"string"===n.toLower(i.extractType(t.type))&&(o=n.join(o,",")),a[t.name]=o)}),{requestBody:a,missingParams:s}};class X{static constructRequestParams(t,a,s,o){if(t=t||{},null===a)return{error:{type:y.REST_SERVICE.ERR_TYPE.USER_UNAUTHORISED,message:y.REST_SERVICE.ERR_MSG.USER_UNAUTHORISED,field:"_wmServiceOperationInfo"}};if(n.isEmpty(a))return{error:{type:y.REST_SERVICE.ERR_TYPE.METADATA_MISSING,message:y.REST_SERVICE.ERR_MSG.METADATA_MISSING,field:"_wmServiceOperationInfo"}};if(a&&a.invalid)return{error:{type:y.REST_SERVICE.ERR_TYPE.CRUD_OPERATION_MISSING,message:y.REST_SERVICE.ERR_MSG.CRUD_OPERATION_MISSING,field:"_wmServiceOperationInfo"}};const r=a.directPath||"",l=a.basePath?a.basePath+a.relativePath:a.relativePath,c=(e=>n.includes(["QueryExecution","ProcedureExecution"],e.controller)&&n.includes(["put","post"],e.operationType))(t);let d,p,m,h,u,g,v,f,b,T,O,I,D,E,R,S,_="",x={},A=[],k=null;function N(){return T||(T=new FormData,T)}if(E=n.get(a.securityDefinitions,"0"),E)switch(E.type){case y.REST_SERVICE.SECURITY_DEFN.OAUTH2:if(M=E[y.REST_SERVICE.OAUTH_PROVIDER_KEY],L=null,R=e.oauthService.getAccessToken(M,L),!R)return{error:{type:y.REST_SERVICE.ERR_TYPE.NO_ACCESSTOKEN,message:y.REST_SERVICE.ERR_MSG.NO_ACCESSTOKEN},securityDefnObj:E};x[y.REST_SERVICE.AUTH_HDR_KEY]=y.REST_SERVICE.PREFIX.AUTH_HDR_VAL.OAUTH+" "+R;break;case y.REST_SERVICE.SECURITY_DEFN.BASIC:if(v=s.wm_auth_username,f=s.wm_auth_password,!v||!f)return{error:{type:y.REST_SERVICE.ERR_TYPE.NO_CREDENTIALS,message:y.REST_SERVICE.ERR_MSG.NO_CREDENTIALS},securityDefnObj:E};x[y.REST_SERVICE.AUTH_HDR_KEY]=y.REST_SERVICE.PREFIX.AUTH_HDR_VAL.BASIC+" "+btoa(v+":"+f),k={type:y.REST_SERVICE.AUTH_TYPE.BASIC}}var M,L;if(U.checkPaginationAtQuery(a,t,o),a.proxySettings=a.proxySettings||{web:!0,mobile:!1},b=a.httpMethod||a.methodType,O=a.proxySettings.web,S=a.proxySettings.withCredentials,m=O?l:r,n.forEach(a.parameters,function(e){function o(){s?(I=s[e.name]&&n.isObject(s[e.name])?s[e.name]:s,D=n.get(a,["definitions",e.type])):(I=r||{},D=e.children)}let r=e.sampleValue;if(i.isDefined(r)&&null!==r&&""!==r||c&&"file"!==e.type)switch(t.serviceType===y.SERVICE_TYPE.DATA&&i.isDateTimeType(e.type)&&(r=W(r,e.type)),n.isArray(r)&&"string"===n.toLower(i.extractType(e.type))&&t.serviceType===y.SERVICE_TYPE.DATA&&(r=n.join(r,",")),e.parameterType.toUpperCase()){case"QUERY":if(n.isNull(r)&&(l=t.controller,h=t.serviceType,l===y.CONTROLLER_TYPE.QUERY&&h===y.SERVICE_TYPE.DATA))break;_?_+="&"+e.name+"="+encodeURIComponent(r):_="?"+e.name+"="+encodeURIComponent(r);break;case"PATH":u=new RegExp("\\s*\\{\\s*"+e.name+"(:\\.\\+)?\\s*\\}\\s*"),m=m.replace(u,r);break;case"HEADER":x[e.name]=r;break;case"BODY":c?(o(),d=Y(I,D),p=d.requestBody,A=n.concat(A,d.missingParams)):p=r;break;case"FORMDATA":c&&e.name===P.WM_DATA_JSON?(o(),d=Y(I,D),p=H(N(),e,d.requestBody),A=n.concat(A,d.missingParams)):p=H(N(),e,r)}else e.required&&A.push(e.name||e.id);var l,h}),A.length)return{error:{type:y.REST_SERVICE.ERR_TYPE.REQUIRED_FIELD_MISSING,field:A.join(","),message:i.replace(y.REST_SERVICE.ERR_MSG.REQUIRED_FIELD_MISSING,[A.join(",")]),skipDefaultNotification:!0}};n.includes(w.NON_BODY_HTTP_METHODS,n.toUpper(b))||a.consumes&&a.consumes[0]===w.CONTENT_TYPES.MULTIPART_FORMDATA||(x["Content-Type"]=a.consumes&&a.consumes[0]||"application/json"),n.includes(a.consumes,w.CONTENT_TYPES.FORM_URL_ENCODED)&&!n.includes(w.NON_BODY_HTTP_METHODS,(b||"").toUpperCase())?(_&&(p=(p?p+"&":"")+_.substring(1)),x["Content-Type"]=w.CONTENT_TYPES.FORM_URL_ENCODED):m+=_,O&&(x=t.serviceType!==y.SERVICE_TYPE.REST&&t.serviceType!==y.SERVICE_TYPE.OPENAPI||a.skipCloakHeaders?x:(e=>{const t={},i=y.REST_SERVICE.UNCLOAKED_HEADERS,a=y.REST_SERVICE.PREFIX.CLOAK_HEADER_KEY;return n.forEach(e,function(e,s){n.includes(i,s.toUpperCase())?t[s]=e:t[a+s]=e}),t})(x),t.getPrefabName()&&-1!==y.REST_SUPPORTED_SERVICES.indexOf(t.serviceType)?(m="prefabs/"+t.getPrefabName()+m,h="invokePrefabRestService"):t.getPrefabName()||(m="services"+m),m=C.project.deployedUrl+m);const F=U.getPaginationInfo(a,t);if(F&&t.pagination){const e=U.setPaginationAtReq(F,a,t,x,p,m,o);e&&(e.headers?x=e.headers:e.requestBody?p=e.requestBody:e.url&&(m=e.url))}return g={projectID:C.project.id,url:m,target:h,method:b,headers:x,data:p,authDetails:k,isDirectCall:!O,isExtURL:t.serviceType===y.SERVICE_TYPE.REST,withCredentials:S},g}static isFileUploadRequest(e){return"FileService"===e.service&&"uploadFile"===e.operation}static excludePaginationParams(e){return n.map(n.reject(e,e=>n.includes(y.PAGINATION_PARAMS,e.name)),function(e){return e.name})}}const K=new Map,Q={Variable:z,Action:q,"wm.NavigationAction":class extends q{invoke(t,i){((t,i)=>{let a;t.dataSet=i&&i.data||t.dataSet;const s=t.dataBinding.pageName||t.pageName,o=t.operation,r=n.clone(t.dataSet),l=n.isNil(i?.cacheable)?t.cacheable:i.cacheable;switch(i=i||{},n.isNil(l)||n.isString(l)&&""===l.trim()||(r._cache_page=l),o){case"goToPreviousPage":e.navigationService.goToPrevious();break;case"gotoPage":e.navigationService.goToPage(s,{transition:t.pageTransitions,$event:i.$event,urlParams:r,cacheable:t.cacheable});break;case"gotoView":a=t.dataBinding&&t.dataBinding.viewName||t.viewName;break;case"gotoTab":a=t.dataBinding&&t.dataBinding.tabName||t.tabName;break;case"gotoAccordion":a=t.dataBinding&&t.dataBinding.accordionName||t.accordionName;break;case"gotoSegment":a=t.dataBinding&&t.dataBinding.segmentName||t.segmentName}a&&e.navigationService.goToView(a,{pageName:s,transition:t.pageTransitions,$event:i.$event,urlParams:r},t)})(t,i)}},"wm.NotificationAction":class extends q{onToasterClick(e){S("onClick",e,"")}onToasterHide(e){S("onHide",e,"")}notifyViaToaster(t,i){const n=(i.class||t.dataBinding.class||"info").toLowerCase(),a=i.message||t.dataBinding.text,s=i.title,o="toast-"+(i.position||t.dataBinding.toasterPosition||"bottom right").replace(" ","-"),r=t.dataBinding.page;let l,c=parseInt(i.duration||t.dataBinding.duration,null);if(c||(c=0!==c&&"success"===n?3e3:0),l=t.dataBinding.content&&"page"===t.dataBinding.content&&r?e.toasterService.showCustom(r,{positionClass:o,timeOut:c,partialParams:t._binddataSet,context:t._context}):e.toasterService.show(n,s,a||null,{positionClass:o,timeOut:c,enableHtml:!0}),t.onClick){const e=l.onTap.subscribe(this.onToasterClick.bind(this,t));l&&!l._subscriptions&&(l._subscriptions=[]),l&&l._subscriptions&&l._subscriptions.push(e)}if(t.onHide){const e=l.onHidden.subscribe(this.onToasterHide.bind(this,t));l&&!l._subscriptions&&(l._subscriptions=[]),l&&l._subscriptions&&l._subscriptions.push(e)}}getDialogConfig(t,i,n,a){return{title:i.title||t.dataBinding.title,text:i.message||t.dataBinding.text,okButtonText:i.okButtonText||t.dataBinding.okButtonText||"OK",cancelButtonText:i.cancelButtonText||t.dataBinding.cancelButtonText||"CANCEL",alerttype:i.alerttype||t.dataBinding.alerttype||"information",onOk:()=>{e.dialogService.close(n,void 0,a)},onCancel:()=>{S("onCancel",t,i.data),e.dialogService.close(n,void 0)},onClose:()=>{S("onClose",t,i.data)}}}notifyViaDialog(t,a){const s="PREFAB"===i.getWmProjectProperties().type,o=(s?"Prefab":"Common")+n.capitalize(t.operation)+"Dialog";let r=this.getDialogConfig(t,a,o,()=>S("onOk",t,a.data));r=s?r:{notification:r},e.dialogService.open(o,void 0,r)}notify(e,t,i,n){t=t||{},"toast"===e.operation?this.notifyViaToaster(e,t):this.notifyViaDialog(e,t)}getMessage(e){return e.dataBinding.text}setMessage(e,t){return n.isString(t)&&(e.dataBinding.text=t),e.dataBinding.text}getOkButtonText(e){return e.dataBinding.okButtonText}setOkButtonText(e,t){return n.isString(t)&&(e.dataBinding.okButtonText=t),e.dataBinding.okButtonText}getToasterDuration(e){return e.dataBinding.duration}setToasterDuration(e,t){return e.dataBinding.duration=t,e.dataBinding.duration}getToasterClass(e){return e.dataBinding.class}setToasterClass(e,t){return n.isString(t)&&(e.dataBinding.class=t),e.dataBinding.class}getToasterPosition(e){return e.dataBinding.class}setToasterPosition(e,t){return n.isString(t)&&(e.dataBinding.position=t),e.dataBinding.position}getAlertType(e){return e.dataBinding.alerttype}setAlertType(e,t){return n.isString(t)&&(e.dataBinding.alerttype=t),e.dataBinding.alerttype}getCancelButtonText(e){return e.dataBinding.cancelButtonText}setCancelButtonText(e,t){return n.isString(t)&&(e.dataBinding.cancelButtonText=t),e.dataBinding.cancelButtonText}},"wm.LoginAction":class extends q{validate(e){let t,i,a;for(i in["rememberme","remembermecheck"].forEach(t=>{n.isBoolean(e[t])&&(a=t)}),a=a||"j_rememberme",e[a]=!!n.isBoolean(e[a])&&e[a],e)if(e.hasOwnProperty(i)&&(""===e[i]||void 0===e[i])){t="Please provide required credentials";break}return t}migrateOldParams(e){const t={},i={usernametext:"j_username",username:"j_username",passwordtext:"j_password",password:"j_password",remembermecheck:"j_rememberme",rememberme:"j_rememberme"};return n.each(e,function(e,n){i[n]?t[i[n]]=e:t[n]=e}),t}redirectToAppBasePath(){e.routerService.navigate(["/"]).then(e=>{e&&window.location.reload()})}login(t,a,s,o){let r;const l=(a=a||{}).loginInfo||a.input||t.dataBinding,c=this.validate(l);if(c)return i.triggerFn(o,c),void S("onError",t,c);let d=i.getClonedObject(l);const p=S(y.EVENT.BEFORE_UPDATE,t,d);if(n.isObject(p))d=p;else if(!1===p)return void i.triggerFn(o);d=this.migrateOldParams(d);const m=n.get(e.securityService.get(),"userInfo.userName");this.notifyInflight(t,!0),t.promise=e.securityService.appLogin(d,a=>{e.dialogService.close("CommonLoginDialog"),e.appManager.reloadAppData().then(o=>{S(y.EVENT.RESULT,t,n.get(o,"userInfo")),r=S(y.EVENT.PREPARE_SETDATA,t,n.get(o,"userInfo")),r&&n.set(o,"userInfo",r),this.notifyInflight(t,!1,a),i.triggerFn(s),setTimeout(()=>{if(S(y.EVENT.SUCCESS,t,n.get(o,"userInfo")),t.useDefaultSuccessHandler){const t=m===d.j_username;m&&!t||e.appManager.executeSessionFailureRequests();const i=e.securityService.getCurrentRouteQueryParam("redirectTo"),a=e.appManager.noRedirect(),s=e.securityService.getRedirectedRouteQueryParams();if(s.redirectTo&&delete s.redirectTo,e.appManager.noRedirect(!1),m)if(n.isEmpty(i)){const i=e.securityService.get(),a=n.get(i,"loginConfig.sessionTimeout.type")||"PAGE";t&&"DIALOG"===a||this.redirectToAppBasePath()}else m===d.j_username?e.routerService.navigate([`/${i}`],{queryParams:s}):this.redirectToAppBasePath();else n.isEmpty(i)?a||e.routerService.navigate(["/"]):e.routerService.navigate([`/${i}`],{queryParams:s})}S(y.EVENT.CAN_UPDATE,t,n.get(o,"userInfo"))})})},e=>{S(y.EVENT.RESULT,t,e),this.notifyInflight(t,!1,e);const n=e.error||"Invalid credentials.",a=e.details;b.isRunMode&&S("onError",t,n,a,!0),i.triggerFn(o,n,a),S(y.EVENT.CAN_UPDATE,t,e)})}},"wm.LogoutAction":class extends q{logout(t,n,a,s){let o,r,l,c;o=function(e,n,a){b.isStudioMode||S("onError",t,e,a),i.triggerFn(s,e,a)},l=S(y.EVENT.BEFORE_UPDATE,t,null),!1!==l?e.securityService.isAuthenticated(n=>{n?(this.notifyInflight(t,!0),t.promise=e.securityService.appLogout(n=>{let s=n.body;s=i.getValidJSON(s),e.appManager.reloadAppData().then(()=>{this.notifyInflight(t,!1,s),S(y.EVENT.RESULT,t,s),c=S(y.EVENT.PREPARE_SETDATA,t,s),c&&(s=c),setTimeout(()=>{S(y.EVENT.SUCCESS,t,s),S(y.EVENT.CAN_UPDATE,t,s)})}),s&&s.result?window.location.href=s.result:t.useDefaultSuccessHandler&&(r=t.redirectTo,r&&"login.html"!==r&&"index.html"!==r||(r=""),e.routerService.navigate([`/${r}`]),setTimeout(()=>{window.location.reload()})),i.triggerFn(a)},o)):o("No authenticated user to logout.")},e=>{this.notifyInflight(t,!1,e),o(e)}):i.triggerFn(s)}},"wm.WebSocketVariable":class extends z{constructor(){super(...arguments),this.scope_var_socket_map=new Map,this.PROPERTY={SERVICE:"service",DATA_UPDATE_STRATEGY:"dataUpdateStrategy",DATA_LIMIT:"dataLimit"},this.DATA_UPDATE_STRATEGY={REFRESH:"refresh",PREPEND:"prepend",APPEND:"append"}}shouldAppendData(e){return(e=e||this)[this.PROPERTY.DATA_UPDATE_STRATEGY]!==this.DATA_UPDATE_STRATEGY.REFRESH}shouldAppendLast(e){return e[this.PROPERTY.DATA_UPDATE_STRATEGY]===this.DATA_UPDATE_STRATEGY.APPEND}getDataLimit(e){return e.dataLimit}getURL(t){const i=t.getPrefabName(),a=i?n.get(e.metadataService.getByOperationId(t.operationId,i),"wmServiceOperationInfo"):n.get(e.metadataService.getByOperationId(t.operationId),"wmServiceOperationInfo"),s=t.dataBinding;n.forEach(a.parameters,function(e){e.sampleValue=s[e.name]}),$.extend(a,{skipCloakHeaders:!0});const o=X.constructRequestParams(t,a,s);if(!o.error||!o.error.message)return o.url;this._onSocketError(t,{data:o.error.message})}_onSocketMessage(e,t){let a,s,o,r,l=n.get(t,"data");l=i.getValidJSON(l)||i.xmlToJson(l)||l;const c=S(y.EVENT.MESSAGE_RECEIVE,e,l,t);l=i.isDefined(c)?c:l,this.shouldAppendData(e)?(e.dataSet=e.dataSet||[],a=e.dataSet.length,s=this.getDataLimit(e),o=this.shouldAppendLast(e),s&&a>=s&&(o?e.dataSet.shift():e.dataSet.pop()),r=o?a:0,e.dataSet.splice(r,0,l)):e.dataSet=i.isDefined(c)?c:l}_onBeforeSend(e,t){return S(y.EVENT.BEFORE_SEND,e,t)}_onBeforeSocketClose(e,t){return S(y.EVENT.BEFORE_CLOSE,e,n.get(t,"data"),t)}_onBeforeSocketOpen(e,t){return S(y.EVENT.BEFORE_OPEN,e,n.get(t,"data"),t)}_onSocketOpen(e,t){if(e._socketConnected=!0,S(y.EVENT.OPEN,e,n.get(t,"data"),t),e.startUpdate){const t=n.get(e,"dataBinding.RequestBody");t&&setTimeout(()=>{this.send(e,t)},0)}}freeSocket(e){this.scope_var_socket_map.get(e)&&(e._socket=null),this.scope_var_socket_map.delete(e)}_onSocketClose(e,t){e._socketConnected=!1,this.freeSocket(e),S(y.EVENT.CLOSE,e,n.get(t,"data"),t)}_onSocketError(e,t){e._socketConnected=!1,this.freeSocket(e),S(y.EVENT.ERROR,e,n.get(t,"data")||"Error while connecting with "+e.service,t)}getSocket(e){const t=this.getURL(e);let n=this.scope_var_socket_map.get(e);return n||(i.isInsecureContentRequest(t)?void i.triggerFn(this._onSocketError.bind(this,e)):(n=new s.$WebSocket(t),n.onOpen(this._onSocketOpen.bind(this,e)),n.onError(this._onSocketError.bind(this,e)),n.onMessage(this._onSocketMessage.bind(this,e)),n.onClose(this._onSocketClose.bind(this,e)),this.scope_var_socket_map.set(e,n),e._socket=n,n))}open(e,t,n){if(!1===this._onBeforeSocketOpen(e))return void i.triggerFn(n);const a=this.getSocket(e);return i.triggerFn(t),a}close(e){const t=this._onBeforeSocketClose(e),i=this.getSocket(e);!1!==t&&i&&(i.close(),this.freeSocket(e))}send(e,t){const a=this.getSocket(e);if(!a)return void console.error("WebSocket connection not established");if(!(t=t||n.get(e,"dataBinding.RequestBody")))return void console.warn("No message to send");const s=this._onBeforeSend(e,t);if(!1!==s){t=i.isDefined(s)?s:t,t=i.isObject(t)?JSON.stringify(t):t;try{a.send(t,0)}catch(t){console.error("Error sending message:",t),this._onSocketError(e,{data:t.message})}}}}};class Z{static get(e){return K.has(e)?K.get(e):K.set(e,new Q[e]).get(e)}}const J=()=>Z.get(y.CATEGORY.NAVIGATION);class ee extends t.BaseAction{constructor(e){super(),Object.assign(this,e)}invoke(e){J().invoke(this,e)}navigate(e){this.invoke(e)}init(){J().initBinding(this,"dataBinding","dataBinding"),J().initBinding(this,"dataSet","dataSet")}}const te=()=>Z.get(y.CATEGORY.NOTIFICATION);class ie extends t.BaseAction{constructor(e){super(),Object.assign(this,e)}execute(e,t){const n=super.execute(e,t);return i.isDefined(n)?n:new Promise((n,a)=>{switch(e){case i.DataSource.Operation.INVOKE:this.invoke(t,n,a);break;case i.DataSource.Operation.NOTIFY:this.notify(t,n,a);break;default:a(`${e} operation is not supported on this data source`)}})}notify(e,t,i){te().notify(this,e,t,i)}invoke(e,t,i){this.notify(e,t,i)}getMessage(){return te().getMessage(this)}setMessage(e){return te().setMessage(this,e)}clearMessage(){return te().setMessage(this,"")}getOkButtonText(){return te().getOkButtonText(this)}setOkButtonText(e){return te().setOkButtonText(this,e)}getToasterDuration(){return te().getToasterDuration(this)}setToasterDuration(e){return te().setToasterDuration(this,e)}getToasterClass(){return te().getToasterClass(this)}setToasterClass(e){return te().setToasterClass(this,e)}getToasterPosition(){return te().getToasterPosition(this)}setToasterPosition(e){return te().setToasterPosition(this,e)}getAlertType(){return te().getAlertType(this)}setAlertType(e){return te().setAlertType(this,e)}getCancelButtonText(){return te().getCancelButtonText(this)}setCancelButtonText(e){return te().setCancelButtonText(this,e)}init(){te().initBinding(this,"dataBinding","dataBinding"),te().initBinding(this,"dataSet","dataSet")}}const ne=()=>Z.get(y.CATEGORY.LOGIN);class ae extends t.BaseAction{constructor(e){super(),Object.assign(this,e)}login(e,t,i){return ne().login(this,e,t,i)}invoke(e,t,i){return this.login(e,t,i)}cancel(){}init(){ne().initBinding(this,"dataBinding","dataBinding")}}class se extends t.BaseAction{constructor(e){super(),Object.assign(this,e)}logout(e,t,i){Z.get(y.CATEGORY.LOGOUT).logout(this,e,t,i)}invoke(e,t,i){this.logout(e,t,i)}cancel(){}}const oe=()=>Z.get(y.CATEGORY.WEBSOCKET);class re extends t.ApiAwareVariable{constructor(e){super(),Object.assign(this,e)}open(e,t){return oe().open(this,e,t)}close(){return oe().close(this)}update(){return oe().update(this)}send(e){return oe().send(this,e)}cancel(){return this.close()}invoke(e,t,i){this.open(t,i)}init(){oe().initBinding(this)}}class le{static create(e,i){let n;switch(e.category){case t.VARIABLE_CONSTANTS.CATEGORY.MODEL:n=new t.ModelVariable(e);break;case t.VARIABLE_CONSTANTS.CATEGORY.SERVICE:n=new t.ServiceVariable(e);break;case t.VARIABLE_CONSTANTS.CATEGORY.LIVE:n=new t.LiveVariable(e);break;case t.VARIABLE_CONSTANTS.CATEGORY.CRUD:n=new t.CrudVariable(e);break;case t.VARIABLE_CONSTANTS.CATEGORY.NAVIGATION:n=new ee(e);break;case t.VARIABLE_CONSTANTS.CATEGORY.NOTIFICATION:n=new ie(e);break;case t.VARIABLE_CONSTANTS.CATEGORY.LOGIN:n=new ae(e);break;case t.VARIABLE_CONSTANTS.CATEGORY.LOGOUT:n=new se(e);break;case t.VARIABLE_CONSTANTS.CATEGORY.TIMER:n=new t.TimerAction(e);break;case t.VARIABLE_CONSTANTS.CATEGORY.WEBSOCKET:n=new re(e)}return n._context=i,n.__cloneable__=!1,n}}class ce{constructor(e){this.$http=e,this.CONTEXT_APP="app"}isLoaded(){return!!this.metadataMap&&this.metadataMap.has(this.CONTEXT_APP)}load(e){let t,n=e?e+"-prefab-servicedefs.json":"app-servicedefs.json";const a=i._WM_APP_PROJECT.cdnUrl+"servicedefs/"+n,s="./services/"+(e?`prefabs/${e}/`:"")+"servicedefs";return t=i._WM_APP_PROJECT.isPreview||"DYNAMIC"===_WM_APP_PROPERTIES?.serviceDefSources?s:a,new Promise((i,n)=>{this.$http.send({url:t,method:"GET"}).then(t=>{this.metadataMap=this.metadataMap||new Map,this.providerMap=this.providerMap||new Map,t.body=t.body||{},this.metadataMap.set(e||this.CONTEXT_APP,t.body.serviceDefs),t.body.securityDefinitions&&this.providerMap.set(e||this.CONTEXT_APP,t.body.securityDefinitions.oauthProvider),i(t.body.serviceDefs)},n)})}getByOperationId(e,t){t=t||this.CONTEXT_APP;const i=this.metadataMap.get(t);return i&&i[e]}getByProviderId(e,t){t=t||this.CONTEXT_APP;const i=this.providerMap.get(t);return i&&i[e]}getByCrudId(e,t){t=t||this.CONTEXT_APP;const i=this.metadataMap.get(t);let n=[];for(let t in i)i[t]&&i[t].crudOperationId===e&&n.push(i[t]);return n}static{this.\u0275fac=u.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:u,type:ce,deps:[{token:m.AbstractHttpService}],target:u.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=u.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:u,type:ce})}}u.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:u,type:ce,decorators:[{type:r.Injectable}],ctorParameters:()=>[{type:m.AbstractHttpService}]});class de{format(t,i){return e.appManager.getPipe("date").transform(t,i)}}class pe{constructor(e,i,n,a,s,o,r,l){this.httpService=e,this.metadataService=i,this.navigationService=n,this.routerService=a,this.toasterService=s,this.oAuthService=o,this.securityService=r,this.dialogService=l,R("http",this.httpService),R("metadata",this.metadataService),R("navigationService",this.navigationService),R("router",this.routerService),R("toaster",this.toasterService),R("oAuth",this.oAuthService),R("security",this.securityService),R("dialog",this.dialogService),t.wmSetDependency("oAuth",this.oAuthService),t.wmSetDependency("security",this.securityService),t.wmSetDependency("metadata",this.metadataService),t.wmSetDependency("http",this.httpService)}bulkCancel(e){Object.keys(e).forEach(t=>{const i=e[t];n.isFunction(i.cancel)&&i.cancel()})}triggerStartUpdate(e){return Promise.all(Object.keys(e).map(t=>e[t]).filter(e=>e?.startUpdate&&e.invoke).map(e=>e.invoke()))}processBindExp(e,a,s){const o=t.getTarget(s),r=t.getTargetNodeKey(e.target);let l=n.isArray(e.value)?e.value[0]:e.value;if(l)if(l.startsWith&&l.startsWith("bind:")){const t=i.$watch(l.replace("bind:",""),a,{},s.invokeOnParamChange.bind(s,e),void 0,void 0,e,()=>s.isMuted);l=a.registerDestroyListener?a.registerDestroyListener(t):t}else n.isUndefined(e.value)||(t.setValueToNode(e.target,e,o,s,e.value,!0),o!==r&&(t.internalBoundNodeMap.has(s)||t.internalBoundNodeMap.set(s,{}),n.set(t.internalBoundNodeMap.get(s),[s.name,o,e.target],e.value)));return{name:e.target,value:l}}processBinding(e,t,i,a){const s=e[i=i||"dataBinding"];e[i]={},e["_bind"+i]=s,s&&n.isArray(s)&&s.forEach(i=>{"wm.Variable"===e.category&&"dataBinding"===i.target&&(i.target="dataSet"),this.processBindExp(i,t,e)})}isVariableSeperated(e,t){return"wm.Variable"===e[t].category||"wm.ServiceVariable"===e[t].category||"wm.LiveVariable"===e[t].category||"wm.CrudVariable"===e[t].category}getBindSourceTarget(e){return"wm.LiveVariable"===e.category?"read"===e.operation?"filterFields":"inputFields":"wm.ModelVariable"===e.category?"dataSet":"dataBinding"}register(e,n,a){const s={Variables:{},Actions:{},callback:this.triggerStartUpdate};let o;for(const e in n){if(o=le.create(n[e],a),o.init(),this.isVariableSeperated(n,e)){this.processBinding(o,a,"dataBinding",this.getBindSourceTarget(o)),o.httpService=this.httpService,o.dateFormatter=new de;const e=o.subscribe("afterInvoke",()=>i.$invokeWatchers(!0));o._eventSubscriptions||(o._eventSubscriptions=[]),o._eventSubscriptions.push(e),"wm.LiveVariable"===o.category&&"read"===o.operation&&i.processFilterExpBindNode(o._context,o.filterExpressions,o),"wm.CrudVariable"!==o.category&&"wm.ServiceVariable"!==o.category||(o.simulateFileDownload=j)}if(this.isVariableSeperated(n,e)||"wm.TimerAction"===n[e].category)for(const e in y.EVENT)o[y.EVENT[e]]&&(o[y.EVENT[e]]=i.$parseEvent(o[y.EVENT[e]]));o instanceof t.BaseAction?s.Actions[e]=o:s.Variables[e]=o}return a.registerDestroyListener&&a.registerDestroyListener(()=>{this.bulkCancel(s.Variables),this.bulkCancel(s.Actions)}),s}destroy(){}registerDependency(e,i){R(e,i),t.wmSetDependency(e,i)}static{this.\u0275fac=u.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:u,type:pe,deps:[{token:m.AbstractHttpService},{token:ce},{token:m.AbstractNavigationService},{token:g.Router},{token:m.AbstractToasterService},{token:v.OAuthService},{token:f.SecurityService},{token:m.AbstractDialogService}],target:u.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=u.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:u,type:pe})}}u.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:u,type:pe,decorators:[{type:r.Injectable}],ctorParameters:()=>[{type:m.AbstractHttpService},{type:ce},{type:m.AbstractNavigationService},{type:g.Router},{type:m.AbstractToasterService},{type:v.OAuthService},{type:f.SecurityService},{type:m.AbstractDialogService}]}),e.$rootScope=C,e.CONSTANTS=b,e.DB_CONSTANTS={DATABASE_MATCH_MODES:{like:"LIKE",start:"STARTING_WITH",startignorecase:"STARTING_WITH_IGNORECASE",end:"ENDING_WITH",endignorecase:"ENDING_WITH_IGNORECASE",anywhere:"CONTAINING",anywhereignorecase:"CONTAINING_IGNORECASE",nowhere:"DOES_NOT_CONTAIN",nowhereignorecase:"DOES_NOT_CONTAIN_IGNORECASE",exact:"EQUALS",exactignorecase:"EQUALS_IGNORECASE",notequals:"NOT_EQUALS",notequalsignorecase:"NOT_EQUALS_IGNORECASE",between:"BETWEEN",in:"IN",notin:"NOTIN",lessthan:"LESS_THAN",lessthanequal:"LESS_THAN_OR_EQUALS",greaterthan:"GREATER_THAN",greaterthanequal:"GREATER_THAN_OR_EQUALS",null:"NULL",isnotnull:"IS_NOT_NULL",empty:"EMPTY",isnotempty:"IS_NOT_EMPTY",nullorempty:"NULL_OR_EMPTY"},DATABASE_EMPTY_MATCH_MODES:["NULL","IS_NOT_NULL","EMPTY","IS_NOT_EMPTY","NULL_OR_EMPTY"],DATABASE_RANGE_MATCH_MODES:["IN","NOTIN","BETWEEN","LESS_THAN","LESS_THAN_OR_EQUALS","GREATER_THAN","GREATER_THAN_OR_EQUALS","NOT_EQUALS"],DATABASE_NULL_EMPTY_MATCH:{NULL:"NULL",IS_NOT_NULL:"IS_NOT_NULL",EMPTY:"NULL",IS_NOT_EMPTY:"IS_NOT_NULL",NULL_OR_EMPTY:"NULL"},DATABASE_MATCH_MODES_WITH_QUERY:{LIKE:"${0} like ${1}",STARTING_WITH:"${0} like ${1}",STARTING_WITH_IGNORECASE:"${0} like ${1}",ENDING_WITH:"${0} like ${1}",ENDING_WITH_IGNORECASE:"${0} like ${1}",CONTAINING:"${0} like ${1}",CONTAINING_IGNORECASE:"${0} like ${1}",DOES_NOT_CONTAIN:"${0} not like ${1}",DOES_NOT_CONTAIN_IGNORECASE:"${0} not like ${1}",EQUALS:"${0}=${1}",EQUALS_IGNORECASE:"${0}=${1}",NOT_EQUALS:"${0}!=${1}",NOT_EQUALS_IGNORECASE:"${0}!=${1}",BETWEEN:"${0} between ${1}",IN:"${0} in ${1}",NOTIN:"${0} not in ${1}",LESS_THAN:"${0}<${1}",LESS_THAN_OR_EQUALS:"${0}<=${1}",GREATER_THAN:"${0}>${1}",GREATER_THAN_OR_EQUALS:"${0}>=${1}",NULL:"${0} is null",IS_NOT_NULL:"${0} is not null",EMPTY:"${0}=''",IS_NOT_EMPTY:"${0}<>''",NULL_OR_EMPTY:"${0} is null or ${0}=''"},DATABASE_STRING_MODES:["LIKE","STARTING_WITH","STARTING_WITH_IGNORECASE","ENDING_WITH","ENDING_WITH_IGNORECASE","CONTAINING","CONTAINING_IGNORECASE","DOES_NOT_CONTAIN","DOES_NOT_CONTAIN_IGNORECASE","EQUALS","EQUALS_IGNORECASE","NOT_EQUALS","NOT_EQUALS_IGNORECASE"]},e.Formatter=de,e.MODE_CONSTANTS={LIGHT:"light",DEFAULT:"default",COLOR:"color",FONT:"font",SPACE:"space",RADIUS:"radius",MODE_KEY:"app-mode"},e.MetadataService=ce,e.SWAGGER_CONSTANTS=P,e.VARIABLE_CONSTANTS=y,e.VARIABLE_URLS={DATABASE:{searchTableData:{url:"/:service/:dataModelName/:entityName/search?page=:page&size=:size&:sort",method:"POST"},searchTableDataWithQuery:{url:"/:service/:dataModelName/:entityName/filter?page=:page&size=:size&:sort",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"}},readTableData:{url:"/:service/:dataModelName/:entityName?page=:page&size=:size&:sort",method:"GET"},insertTableData:{url:"/:service/:dataModelName/:entityName",method:"POST"},insertMultiPartTableData:{url:"/:service/:dataModelName/:entityName",method:"POST",headers:{}},updateTableData:{url:"/:service/:dataModelName/:entityName/:id",method:"PUT"},updateMultiPartTableData:{url:"/:service/:dataModelName/:entityName/:id",method:"POST",headers:{}},deleteTableData:{url:"/:service/:dataModelName/:entityName/:id",method:"DELETE"},updateCompositeTableData:{url:"/:service/:dataModelName/:entityName/composite-id?:id",method:"PUT"},periodUpdateCompositeTableData:{url:"/:service/:dataModelName/:entityName/composite-id/periods?:id",method:"PUT"},updateMultiPartCompositeTableData:{url:"/:service/:dataModelName/:entityName/composite-id?:id",method:"POST",headers:{}},deleteCompositeTableData:{url:"/:service/:dataModelName/:entityName/composite-id?:id",method:"DELETE"},periodDeleteCompositeTableData:{url:"/:service/:dataModelName/:entityName/composite-id/periods?:id",method:"DELETE"},getDistinctDataByFields:{url:"/:service/:dataModelName/:entityName/aggregations?page=:page&size=:size&:sort",method:"POST"},exportTableData:{url:"/services/:dataModelName/:entityName/export?:sort",method:"POST"},readTableRelatedData:{url:"/:service/:dataModelName/:entityName/:id/:relatedFieldName?page=:page&size=:size&:sort",method:"GET"},executeNamedQuery:{url:"/:service/:dataModelName/queryExecutor/queries/:queryName?page=:page&size=:size&:queryParams",method:"GET"},executeCustomQuery:{url:"/:service/:dataModelName/queries/execute?page=:page&size=:size",method:"POST"},executeAggregateQuery:{url:"/services/:dataModelName/:entityName/aggregations?page=:page&size=:size&sort=:sort",method:"POST"},executeNamedProcedure:{url:"/:service/:dataModelName/procedureExecutor/procedure/execute/:procedureName?page=:page&size=:size&:procedureParams",method:"GET"},countTableDataWithQuery:{url:"/:service/:dataModelName/:entityName/count?:queryParams",method:"GET"}},oauthConfiguration:{getAuthorizationUrl:{url:"services/oauth2/:providerId/authorizationUrl",method:"GET"}}},e.VariableManagerFactory=Z,e.VariablesService=pe,e.WS_CONSTANTS=w,e.debounceVariableCall=B,e.formatDate=W,e.formatExportExpression=e=>(n.forEach(e,function(e){e.expression&&(e.expression="${"+e.expression+"}")}),e),e.getEvaluatedOrderBy=(e,t)=>{let i,a;return!t||n.isEmpty(t)?e:e?(e=n.split(e,","),t=n.split(t,","),i=n.map(t,function(e){return n.split(n.trim(e)," ")[0]}),n.remove(e,function(e){return n.includes(i,n.split(n.trim(e)," ")[0])}),a=e.length?","+n.join(e,","):"",n.join(t,",")+a):t},e.initiateCallback=S,e.isFileUploadSupported=V,e.processBinding=F,e.setDependency=R,e.setInput=(e,t,a,s)=>{e=e||{};let o,r,l={};if(n.isObject(s))switch(s.type){case"file":a=i.getBlob(a,s.contentType);break;case"number":a=n.isNumber(a)?a:parseInt(a,10)}return n.isObject(t)?l=t:t.indexOf(".")>-1?(o=t.split("."),r=o.pop(),e=i.findValueOf(e,o.join("."),!0),l[t=r]=a):l[t]=a,n.forEach(l,function(t,i){e[i]=t}),e},e.simulateFileDownload=j}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/router"),require("@angular/common"),require("@wm/core"),require("@wm/security"),require("@wm/variables"),require("lodash-es"),require("@wm/components/page"),require("rxjs"),require("@wm/components/base"),require("tslib"),require("@wm/components/input/checkboxset"),require("@wm/components/input/radioset"),require("@wm/components/prefab"),require("@angular/platform-browser"),require("@angular/common/http"),require("@angular/forms"),require("ngx-toastr"),require("@wm/components/dialogs"),require("@wm/components/dialogs/confirm-dialog"),require("@wm/components/dialogs/design-dialog"),require("@wm/http"),require("@wm/oAuth"),require("moment-timezone/moment-timezone"),require("ngx-bootstrap/chronos"),require("ngx-bootstrap/datepicker"),require("@wm/components/dialogs/alert-dialog"),require("ngx-bootstrap/utils"),require("rxjs/operators"),require("@wm/transpiler"),require("@wm/build-task"),require("@wm/components/page/footer"),require("@wm/components/page/header"),require("@wm/components/page/left-panel"),require("@wm/components/page/right-panel"),require("@wm/components/page/top-nav"),require("@wm/components/basic/anchor"),require("@wm/components/basic/audio"),require("@wm/components/basic/html"),require("@wm/components/basic/icon"),require("@wm/components/basic/iframe"),require("@wm/components/basic/label"),require("@wm/components/basic/picture"),require("@wm/components/basic/spinner"),require("@wm/components/basic/video"),require("@wm/components/basic/progress/progress-bar"),require("@wm/components/basic/progress/progress-circle"),require("@wm/components/basic/rich-text-editor"),require("@wm/components/basic/search"),require("@wm/components/basic/tree"),require("@wm/components/input/calendar"),require("@wm/components/input/chips"),require("@wm/components/input/color-picker"),require("@wm/components/input/currency"),require("@wm/components/input/epoch/date"),require("@wm/components/input/epoch/date-time"),require("@wm/components/input/epoch/time"),require("@wm/components/input/epoch/date-time-picker"),require("@wm/components/input/epoch/picker"),require("@wm/components/input/file-upload"),require("@wm/components/input/button"),require("@wm/components/input/button-group"),require("@wm/components/input/caption-position"),require("@wm/components/input/checkbox"),require("@wm/components/input/composite"),require("@wm/components/input/number"),require("@wm/components/input/select"),require("@wm/components/input/switch"),require("@wm/components/input/text"),require("@wm/components/input/textarea"),require("@wm/components/input/rating"),require("@wm/components/input/slider"),require("@wm/components/data/card"),require("@wm/components/data/form"),require("@wm/components/data/list"),require("@wm/components/data/live-table"),require("@wm/components/data/pagination"),require("@wm/components/data/table"),require("@wm/components/chart"),require("@wm/components/containers/accordion"),require("@wm/components/containers/linear-layout"),require("@wm/components/containers/layout-grid"),require("@wm/components/containers/panel"),require("@wm/components/containers/tabs"),require("@wm/components/containers/tile"),require("@wm/components/containers/wizard"),require("@wm/components/dialogs/iframe-dialog"),require("@wm/components/dialogs/login-dialog"),require("@wm/components/dialogs/partial-dialog"),require("@wm/components/navigation/breadcrumb"),require("@wm/components/navigation/menu"),require("@wm/components/navigation/navbar"),require("@wm/components/navigation/popover"),require("@wm/components/advanced/carousel"),require("@wm/components/advanced/login"),require("@wm/components/advanced/marquee"),require("@wm/components/advanced/custom"),require("ngx-bootstrap/timepicker"),require("ngx-bootstrap/dropdown"),require("ngx-bootstrap/pagination"),require("ngx-bootstrap/typeahead"),require("ngx-bootstrap/progressbar"),require("ngx-bootstrap/carousel"),require("ngx-bootstrap/popover"),require("ng-circle-progress"),require("ngx-bootstrap/tooltip")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/router","@angular/common","@wm/core","@wm/security","@wm/variables","lodash-es","@wm/components/page","rxjs","@wm/components/base","tslib","@wm/components/input/checkboxset","@wm/components/input/radioset","@wm/components/prefab","@angular/platform-browser","@angular/common/http","@angular/forms","ngx-toastr","@wm/components/dialogs","@wm/components/dialogs/confirm-dialog","@wm/components/dialogs/design-dialog","@wm/http","@wm/oAuth","moment-timezone/moment-timezone","ngx-bootstrap/chronos","ngx-bootstrap/datepicker","@wm/components/dialogs/alert-dialog","ngx-bootstrap/utils","rxjs/operators","@wm/transpiler","@wm/build-task","@wm/components/page/footer","@wm/components/page/header","@wm/components/page/left-panel","@wm/components/page/right-panel","@wm/components/page/top-nav","@wm/components/basic/anchor","@wm/components/basic/audio","@wm/components/basic/html","@wm/components/basic/icon","@wm/components/basic/iframe","@wm/components/basic/label","@wm/components/basic/picture","@wm/components/basic/spinner","@wm/components/basic/video","@wm/components/basic/progress/progress-bar","@wm/components/basic/progress/progress-circle","@wm/components/basic/rich-text-editor","@wm/components/basic/search","@wm/components/basic/tree","@wm/components/input/calendar","@wm/components/input/chips","@wm/components/input/color-picker","@wm/components/input/currency","@wm/components/input/epoch/date","@wm/components/input/epoch/date-time","@wm/components/input/epoch/time","@wm/components/input/epoch/date-time-picker","@wm/components/input/epoch/picker","@wm/components/input/file-upload","@wm/components/input/button","@wm/components/input/button-group","@wm/components/input/caption-position","@wm/components/input/checkbox","@wm/components/input/composite","@wm/components/input/number","@wm/components/input/select","@wm/components/input/switch","@wm/components/input/text","@wm/components/input/textarea","@wm/components/input/rating","@wm/components/input/slider","@wm/components/data/card","@wm/components/data/form","@wm/components/data/list","@wm/components/data/live-table","@wm/components/data/pagination","@wm/components/data/table","@wm/components/chart","@wm/components/containers/accordion","@wm/components/containers/linear-layout","@wm/components/containers/layout-grid","@wm/components/containers/panel","@wm/components/containers/tabs","@wm/components/containers/tile","@wm/components/containers/wizard","@wm/components/dialogs/iframe-dialog","@wm/components/dialogs/login-dialog","@wm/components/dialogs/partial-dialog","@wm/components/navigation/breadcrumb","@wm/components/navigation/menu","@wm/components/navigation/navbar","@wm/components/navigation/popover","@wm/components/advanced/carousel","@wm/components/advanced/login","@wm/components/advanced/marquee","@wm/components/advanced/custom","ngx-bootstrap/timepicker","ngx-bootstrap/dropdown","ngx-bootstrap/pagination","ngx-bootstrap/typeahead","ngx-bootstrap/progressbar","ngx-bootstrap/carousel","ngx-bootstrap/popover","ng-circle-progress","ngx-bootstrap/tooltip"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.runtime=e.wm.runtime||{},e.wm.runtime.base={}),e.ng.core,e.ng.router,e.ng.common,e.wm.core,e.wm.security,e.wm.variables,e._,e.wm.components.page,e.rxjs,e.wm.components.base,e.tslib,e.wm.components.input.checkboxset,e.wm.components.input.radioset,e.wm.components.prefab,e.ng.platformBrowser,e.ng.common.http,e.ng.forms,e.ngxToastr,e.wm.components.dialogs,e.wm.components.dialogs.confirmdialog,e.wm.components.dialogs.designdialog,e.wm.http,e.wm.oAuth,e.momentLib,e.ngxBootstrap.chronos,e.ngxBootstrap.datepicker,e.wm.components.dialogs.alertdialog,e.ngxBootstrap.utils,e.rxjs.operators,e.wm.transpiler,e.wm.buildTask,e.wm.components.page.footer,e.wm.components.page.header,e.wm.components.page.leftpanel,e.wm.components.page.rightpanel,e.wm.components.page.topnav,e.wm.components.basic.anchor,e.wm.components.basic.audio,e.wm.components.basic.html,e.wm.components.basic.icon,e.wm.components.basic.iframe,e.wm.components.basic.label,e.wm.components.basic.picture,e.wm.components.basic.spinner,e.wm.components.basic.video,e.wm.components.basic.progress.progressBar,e.wm.components.basic.progress.progressCircle,e.wm.components.basic.richtexteditor,e.wm.components.basic.search,e.wm.components.basic.tree,e.wm.components.input.calendar,e.wm.components.input.chips,e.wm.components.input.colorpicker,e.wm.components.input.currency,e.wm.components.input.epoch.date,e.wm.components.input.epoch.dateTime,e.wm.components.input.epoch.time,e.wm.components.input.epoch.dateTimePicker,e.wm.components.input.epoch.picker,e.wm.components.input.fileupload,e.wm.components.input.button,e.wm.components.input.buttongroup,e.wm.components.input.captionposition,e.wm.components.input.checkbox,e.wm.components.input.composite,e.wm.components.input.number,e.wm.components.input.select,e.wm.components.input.switch,e.wm.components.input.text,e.wm.components.input.textarea,e.wm.components.input.rating,e.wm.components.input.slider,e.wm.components.data.card,e.wm.components.data.form,e.wm.components.data.list,e.wm.components.data.livetable,e.wm.components.data.pagination,e.wm.components.data.table,e.wm.components.chart,e.wm.components.containers.accordion,e.wm.components.containers.linearlayout,e.wm.components.containers.layoutgrid,e.wm.components.containers.panel,e.wm.components.containers.tabs,e.wm.components.containers.tile,e.wm.components.containers.wizard,e.wm.components.dialogs.iframedialog,e.wm.components.dialogs.logindialog,e.wm.components.dialogs.partialdialog,e.wm.components.navigation.breadcrumb,e.wm.components.navigation.menu,e.wm.components.navigation.navbar,e.wm.components.navigation.popover,e.wm.components.advanced.carousel,e.wm.components.advanced.login,e.wm.components.advanced.marquee,e.wm.components.advanced.custom,e.ngxBootstrap.timepicker,e.ngxBootstrap.dropdown,e.ngxBootstrap.pagination,e.ngxBootstrap.typeahead,e.ngxBootstrap.progressbar,e.ngxBootstrap.carousel,e.ngxBootstrap.popover,e.ngCircleProgress,e.ngxBootstrap.tooltip)}(this,function(e,t,i,n,a,s,o,r,l,c,d,p,m,h,u,g,v,f,b,y,w,P,C,T,O,I,D,E,R,S,x,A,k,N,M,L,F,j,V,B,G,W,q,z,U,H,Y,X,K,Q,Z,J,ee,te,ie,ne,ae,se,oe,re,le,ce,de,pe,me,he,ue,ge,ve,fe,be,ye,we,Pe,Ce,Te,Oe,Ie,De,Ee,Re,Se,_e,xe,Ae,ke,Ne,Me,Le,Fe,$e,je,Ve,Be,Ge,We,qe,ze,Ue,He,Ye,Xe,Ke,Qe,Ze,Je,et){"use strict";function tt(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var it,nt,at=tt(t),st=tt(i),ot=tt(n),rt=tt(a),lt=tt(s),ct=tt(o),dt=tt(g),pt=tt(v),mt=tt(b),ht=tt(T),ut=tt(O),gt=tt(D);e.ComponentType=void 0,(it=e.ComponentType||(e.ComponentType={}))[it.PAGE=0]="PAGE",it[it.PREFAB=1]="PREFAB",it[it.PARTIAL=2]="PARTIAL",it[it.WIDGET=3]="WIDGET";class vt{clearComponentFactoryRefCache(){}}class ft{}class bt{}class yt{}class wt{}class Pt{}!function(e){e.HIDE_TEMPLATES_SHOW_CASE="hide-templates-show-case",e.SHOW_TEMPLATES_SHOW_CASE="show-templates-show-case",e.UPDATE_LOCATION="update-location-path",e.SELECT_TEMPLATE="select-template",e.TEMPLATEBUNDLE_CONFIG="template-bundle-config",e.ON_LOAD="on-load"}(nt||(nt={}));class Ct{static{this.SERVICE_NAME="AppManagerService"}constructor(e,t,i,n,a,s,o,l,c,d){this.$http=e,this.$security=t,this.$dialog=i,this.$router=n,this.$app=a,this.$variables=s,this.$metadata=o,this.$spinner=l,this.$i18n=c,this.$datePipe=d,this.appVariablesLoaded=!1,this.appVariablesFired=!1,this._noRedirect=!1,this.appSubscriptions=[],this.sessionTimeoutUnsubscribe=this.$http.registerOnSessionTimeout(this.handle401.bind(this)),this.$variables.registerDependency("appManager",this),this.appSubscriptions.push(this.$app.subscribe("toggle-variable-state",e=>{const t=e.variable,i=e.active;if(!r.isEmpty(r.trim(t.spinnerContext)))if(i){let e;if(t._spinnerId&&t._spinnerId.length&&r.forEach(t._spinnerId,i=>{i.slice(0,i.lastIndexOf("_"))!==t._id||!this.$spinner.messagesByContext||!this.$spinner.messagesByContext[t.spinnerContext]||t.spinnerMessage!==this.$spinner.messagesByContext[t.spinnerContext].finalMessage&&t.spinnerMessage!==this.$spinner.messagesByContext[t.spinnerContext][i]||(e=!0)}),!e){t._spinnerId=t._spinnerId||[];const e=this.$spinner.show(t.spinnerMessage,t._id+"_"+Date.now(),t.spinnerclass,t.spinnerContext);t._spinnerId.push(e)}}else this.$spinner.hide(t._spinnerId.shift())})),this.appSubscriptions.push(this.$app.subscribe("userLoggedIn",()=>{this.setLandingPage(),this.lastLoggedUserId&&this.$security.getConfig(e=>{e&&e.userInfo.userId!==this.lastLoggedUserId&&this.$app.clearPageCache()},null)})),this.appSubscriptions.push(this.$app.subscribe("userLoggedOut",()=>this.setLandingPage().then(()=>{this.$app.clearPageCache()}))),this.appSubscriptions.push(this.$app.subscribe("http401",(e={})=>this.handle401(e.page,e.options)))}showLoginDialog(){this.$spinner.hide("globalSpinner"),this.$dialog.open("CommonLoginDialog"),a.$appDigest()}loadAppJS(){}loadCommonPage(){}loadSecurityConfig(e){return this.$security.load(e).then(e=>(this.$app.landingPageName||this.setLandingPage(),e))}loadMetadata(){return this.$metadata.load()}loadAppVariables(e){if(this.appVariablesLoaded)return Promise.resolve();const t=e=>{const t=this.$variables.register("app",e,this.$app);r.extend(this.$app.Variables,t.Variables),r.extend(this.$app.Actions,t.Actions),this.updateLoggedInUserVariable(),this.updateSupportedLocaleVariable(),this.appVariablesLoaded=!0,this.appVariablesFired=!1};return a.isDefined(e)?(t(e),Promise.resolve()):this.$http.get("./app.variables.json").then(e=>t(e))}isAppVariablesFired(e){return a.isDefined(e)&&(this.appVariablesFired=e),this.appVariablesFired}clearLoggedInUserVariable(e){e.isAuthenticated=!1,e.roles=[],e.name=void 0,e.id=void 0,e.tenantId=void 0}updateLoggedInUserVariable(){const e=r.get(this.$app,"Variables.loggedInUser.dataSet");if(e)return this.$security.load().then(()=>{const t=this.$security.get();if(!(t&&t.securityEnabled&&t.authenticated))throw this.clearLoggedInUserVariable(e),e.isSecurityEnabled=t&&t.securityEnabled,null;return e.isAuthenticated=t.authenticated,e.roles=t.userInfo.userRoles,e.name=t.userInfo.userName,e.id=t.userInfo.userId,e.tenantId=t.userInfo.tenantId,e.userAttributes=t.userInfo.userAttributes,t}).catch(t=>{e.isAuthenticated=!1,e.roles=[],e.name=void 0,e.id=void 0,e.tenantId=void 0,e.userAttributes={}})}updateSupportedLocaleVariable(){r.get(this.$app,"Variables.supportedLocale")}handleSSOLogin(e,t){let i,n="";i=t&&t.queryParams||this.$security.getRedirectedRouteQueryParams(),i=this.$security.getQueryString(i),i=i?"?"+i:"";const s=this.$security.getCurrentRoutePage(),o=a.getWmProjectProperties().homePage;s&&(s!==o||i)&&(n="?redirectPage="+encodeURIComponent(s)),document.body.textContent=r.get(this.getAppLocale(),["MESSAGE_LOGIN_REDIRECTION"])||"Redirecting to sso login...";const l=this.getDeployedURL()+"services/security/ssologin"+n+i;if(window.self!==window.top)try{window.parent&&window.location.origin===window.parent.origin?"WM_PREVIEW_WINDOW"===window.parent.name&&(window.parent.location.href=window.self.location.href,window.parent.name=""):window.location.href=l}catch(e){window.location.href=l}else window.location.href=l}handle401(e,t){let i,n,a,s;const o="DIALOG",l="PAGE",c="SSO",d=this.$security.get();let p={};if(a=d.loginConfig,this.lastLoggedUserId=d.userInfo&&d.userInfo.userId,d.userInfo&&d.userInfo.userName){switch(d.authenticated=!1,i=a.sessionTimeout||{type:o},n=i.type.toUpperCase(),n){case o:this.showLoginDialog();break;case l:e||(e=this.$security.getCurrentRoutePage()),p.redirectTo=e,p=r.merge(p,this.$security.getRedirectedRouteQueryParams()),e!==i.pageName&&this.$router.navigate([i.pageName],{queryParams:p});break;case c:this.handleSSOLogin(d,t)}this.setLandingPage()}else switch(s=a.type.toUpperCase(),s){case o:this.noRedirect(!0),this.showLoginDialog();break;case l:e=this.$security.getRedirectPage(d,e),p.redirectTo=e;const i=t&&t.queryParams||this.$security.getRedirectedRouteQueryParams();p=r.merge(p,i),this.$router.navigate([a.pageName],{queryParams:p}),this.$app.landingPageName=a.pageName;break;case c:this.handleSSOLogin(d,t)}}reloadAppData(){return this.loadSecurityConfig(!0).then(()=>this.loadMetadata().then(()=>this.updateLoggedInUserVariable().then(e=>Promise.resolve(this.beforeAppReady()).then(()=>Promise.resolve(e)))))}noRedirect(e){return r.isUndefined(e)||(this._noRedirect=e),this._noRedirect}executeSessionFailureRequests(){this.$http.executeSessionFailureRequests()}pushToSessionFailureRequests(e){this.$http.pushToSessionFailureQueue(e)}getDeployedURL(){return this.$app.deployedUrl?this.$app.deployedUrl:o.$rootScope.project.deployedUrl}getCustomUrlScheme(){return this.$app.customUrlScheme}notify(e,t){this.$app.notify(e,t)}subscribe(e,t){return this.$app.subscribe(e,t)}getActivePage(){return this.$app.activePage}getAppLocale(){return this.$app.appLocale}getSelectedLocale(){return this.$i18n.getSelectedLocale()}notifyApp(e,t,i){this.$app.notifyApp(e,t,i)}appOnBeforeServiceCall(e){return a.triggerFn(this.$app.onBeforeServiceCall,e)}appOnServiceSuccess(e,t){return a.triggerFn(this.$app.onServiceSuccess,e,t)}appOnServiceError(e,t){return a.triggerFn(this.$app.onServiceError,e,t)}appVariablesReady(){a.triggerFn(this.$app.onAppVariablesReady)}beforeAppReady(){return a.triggerFn(this.$app.onBeforeAppReady)}getPipe(e){if("date"===e)return this.$datePipe}setLandingPage(){return this.$security.getPageByLoggedInUser().then(e=>this.$app.landingPageName=e)}isPrefabType(){return this.$app.isPrefabType}isTemplateBundleType(){return this.$app.isTemplateBundleType}postMessage(e){window.top.postMessage(e,"*")}showTemplate(e){const t=this.templates[e];this.$router.navigate([t.id])}postTemplateBundleInfo(){return window.onmessage=e=>{const t=e.data;if(!r.isObject(t))return;switch(t.key){case nt.HIDE_TEMPLATES_SHOW_CASE:break;case nt.SELECT_TEMPLATE:this.showTemplate(t.templateIndex)}},setTimeout(()=>{this.postMessage({key:nt.ON_LOAD})}),a.fetchContent("json","./config.json",!0,e=>{this.templates=[],e.error||(this.templates=e.templates,this.postMessage({key:nt.TEMPLATEBUNDLE_CONFIG,config:e}))})}postAppTypeInfo(){if(this.isTemplateBundleType())return this.postTemplateBundleInfo()}initAppModes(){let e=It();this.$app.setMode(e),this.windowMessageListener=e=>{const{key:t,modes:i,shouldPersist:n}=e.data||{};"switch-mode"===t&&i&&this.$app.setMode(i,!n)},window.addEventListener("message",this.windowMessageListener)}ngOnDestroy(){this.appSubscriptions.forEach(e=>{e&&e()}),this.appSubscriptions=[],this.sessionTimeoutUnsubscribe&&(this.sessionTimeoutUnsubscribe(),this.sessionTimeoutUnsubscribe=null),this.windowMessageListener&&(window.removeEventListener("message",this.windowMessageListener),this.windowMessageListener=null),this.templates=null,this.lastLoggedUserId=null}static{this.\u0275fac=at.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Ct,deps:[{token:rt.AbstractHttpService},{token:lt.SecurityService},{token:rt.AbstractDialogService},{token:st.Router},{token:rt.App},{token:ct.VariablesService},{token:ct.MetadataService},{token:rt.AbstractSpinnerService},{token:rt.AbstractI18nService},{token:ot.DatePipe}],target:at.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=at.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Ct})}}at.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Ct,decorators:[{type:t.Injectable}],ctorParameters:()=>[{type:rt.AbstractHttpService},{type:lt.SecurityService},{type:rt.AbstractDialogService},{type:st.Router},{type:rt.App},{type:ct.VariablesService},{type:ct.MetadataService},{type:rt.AbstractSpinnerService},{type:rt.AbstractI18nService},{type:ot.DatePipe}]});const Tt=e=>"__self__"===e,Ot=e=>{const t=a._WM_APP_PROJECT.isPreview?"app/prefabs":a._WM_APP_PROJECT.cdnUrl+"resources";return Tt(e)?".":t+`/${e}`},It=()=>{let e=localStorage.getItem("wm-app-modes")||"{}";try{e=JSON.parse(e)}catch(t){console.error("Error parsing modes",t.message),e={}}return e},Dt=new Set,Et=new Map,Rt=new Set,St=(e,t)=>{let i=e;return a.stringStartsWith(e,"http://|https://|//")||(i=t+i),i};class _t{constructor(e,t){this.$metadata=e,this.prefabConfigProvider=t}getConfig(e){return this.prefabConfigProvider.getConfig(e)}loadServiceDefs(e){return Tt(e)?Promise.resolve():this.$metadata.load(e)}loadStyles(e,{resources:{styles:t}}={resources:{styles:[]}}){const i=Ot(e),n=t.map(e=>{if(!r.endsWith(e,"/pages/Main/Main.css"))return St(e,i)}).filter(e=>!!e);return a.loadStyleSheets(n),Promise.resolve()}loadScripts(e,{resources:{scripts:t}}={resources:{scripts:[]}}){const i=Ot(e),n=(t=t.filter(e=>!e.startsWith("npm://"))).map(e=>St(e,i));return a.loadScripts(n,!0)}setInProgress(e){let t,i;const n=new Promise((e,n)=>{t=e,i=n});n.resolve=t,n.reject=i,Et.set(e,n)}resolveInProgress(e){Et.get(e)&&(Et.get(e).resolve(),Et.delete(e))}loadDependencies(e){return Rt.has(e)?Promise.resolve():Dt.has(e)?Promise.reject(""):Et.get(e)?Et.get(e):(this.setInProgress(e),this.getConfig(e).then(t=>Promise.all([this.loadStyles(e,t),this.loadScripts(e,t),this.loadServiceDefs(e)]).then(()=>{this.resolveInProgress(e),Rt.add(e)})))}static{this.\u0275fac=at.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:_t,deps:[{token:ct.MetadataService},{token:ft}],target:at.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=at.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:_t})}}at.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:_t,decorators:[{type:t.Injectable}],ctorParameters:()=>[{type:ct.MetadataService},{type:ft}]});class xt{constructor(){this.fragments=0,this.isPageComponent=!0,this.fragmentsLoaded$=new c.Subject}init(){this.viewInitSubscription=this.viewInit$.subscribe(a.noop,a.noop,()=>{this.isViewInitialized=!0,this.isReady()})}cleanupFragmentMonitor(){this.viewInitSubscription&&(this.viewInitSubscription.unsubscribe(),this.viewInitSubscription=null),this.viewInit$&&!this.viewInit$.closed&&this.viewInit$.complete(),this.viewInit$=null,this.fragmentsLoaded$&&!this.fragmentsLoaded$.closed&&this.fragmentsLoaded$.complete(),this.fragmentsLoaded$=null}registerFragment(){this.fragments++}resolveFragment(){this.fragments--,this.isReady()}isReady(){this.isViewInitialized&&!this.fragments&&(this.registerFragment=a.noop,this.resolveFragment=a.noop,this.fragmentsLoaded$.complete())}static{this.\u0275fac=at.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:xt,deps:[],target:at.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=at.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:xt,isStandalone:!0,ngImport:at})}}at.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:xt,decorators:[{type:t.Directive}],ctorParameters:()=>[]});const At={};class kt extends xt{constructor(){super(...arguments),this.compileContent=!1,this.destroy$=new c.Subject,this.viewInit$=new c.Subject}getContainerWidgetInjector(){return this.containerWidget.inj||this.containerWidget.injector}init(){this.App=this.injector?this.injector.get(a.App):t.inject(a.App),this.containerWidget=this.injector?this.injector.get(d.WidgetRef):t.inject(d.WidgetRef),this.i18nService=this.injector?this.injector.get(a.AbstractI18nService):t.inject(a.AbstractI18nService),this.scriptLoaderService=this.injector?this.injector.get(a.ScriptLoaderService):t.inject(a.ScriptLoaderService),this.Viewport=this.injector?this.injector.get(a.Viewport):t.inject(a.Viewport),this.viewParent=this.containerWidget.viewParent,this.viewParent.registerFragment&&this.viewParent.registerFragment(),this.registerExpressions(),this.initUserScript(),this.registerWidgets(),this.initVariables(),this.activePageName=this.App.activePageName,this.registerPageParams(),this.defineI18nProps(),this.viewInit$.subscribe(a.noop,a.noop,()=>{this.pageParams=this.containerWidget.partialParams}),this.spa?this.pageDirective=this.injector?this.injector.get(l.SpaPageDirective,null):t.inject(l.SpaPageDirective,{optional:!0}):this.pageDirective=this.injector?this.injector.get(l.PageDirective,null):t.inject(l.PageDirective,{optional:!0}),this.pageDirective&&(this.registerDestroyListener(this.pageDirective.subscribe("attach",e=>this.ngOnAttach(e.refreshData))),this.registerDestroyListener(this.pageDirective.subscribe("detach",()=>this.ngOnDetach()))),super.init()}registerWidgets(){"Common"===this.partialName?this.Widgets=At:this.Widgets=Object.create(At),this.containerWidget.Widgets=this.Widgets}registerDestroyListener(e){this.destroy$.subscribe(a.noop,a.noop,()=>e())}initUserScript(){try{this.viewParent.prefabName&&(this.viewParent.Prefab?this.Prefab=this.viewParent.Prefab:this.Prefab=this.viewParent),this.evalUserScript(this,this.App,this.injector?this.injector.get(a.UtilsService):t.inject(a.UtilsService))}catch(e){console.error(`Error in evaluating partial (${this.partialName}) script\n`,e)}}initVariables(){const e=(this.injector?this.injector.get(o.VariablesService):t.inject(o.VariablesService)).register(this.partialName,this.getVariables(),this);this.Variables=Object.create(this.App.Variables),this.Actions=Object.create(this.App.Actions),this.containerWidget.Variables=this.Variables,this.containerWidget.Actions=this.Actions,Object.entries(e.Variables).forEach(([e,t])=>this.Variables[e]=t),Object.entries(e.Actions).forEach(([e,t])=>this.Actions[e]=t),this.viewInit$.subscribe(a.noop,a.noop,()=>{a.$invokeWatchers(!0,!0),e.callback(e.Variables).catch(a.noop),e.callback(e.Actions)})}registerExpressions(){const e=this.getExpressions();r.each(e,(e,t)=>{a.registerFnByExpr(t,e[0],e[1])})}registerPageParams(){this.pageParams=this.containerWidget.partialParams}defineI18nProps(){this.appLocale=this.i18nService.getAppLocale()}invokeOnReady(){let e;this.containerWidget.userComponentParams&&(e=this.containerWidget.userComponentParams),this.onReady(e),this.viewParent.resolveFragment&&this.viewParent.resolveFragment()}loadScripts(){return new Promise(e=>{const t=this.partialDirective?.$element.attr("scripts-to-load");t?this.scriptLoaderService.load(...t.split(",")).then(e):e()})}mute(){const e=e=>{e&&e.mute&&e.mute()};r.each(this.Widgets,e),r.each(this.Variables,e),r.each(this.Actions,e)}unmute(){const e=e=>{e&&e.unmute&&e.unmute()};r.each(this.Widgets,e),r.each(this.Variables,e),r.each(this.Actions,e)}ngAfterViewInit(){this.loadScripts().then(()=>{this.compileContent=!0,setTimeout(()=>{this.viewInit$.complete(),this.fragmentsLoaded$.subscribe(a.noop,a.noop,()=>this.invokeOnReady())},100)})}ngOnDestroy(){this.destroy$&&(this.destroy$.complete(),this.destroy$=null),this.viewInit$&&!this.viewInit$.closed&&(this.viewInit$.complete(),this.viewInit$=null),this.App=null,this.containerWidget=null,this.i18nService=null,this.appLocale=null,this.partialDirective=null,this.pageDirective=null,this.Prefab=null,this.scriptLoaderService=null,this.Viewport=null,this.route=null,this.appManager=null,this.navigationService=null,this.router=null,this.pageParams=null,this.viewParent=null,this.cleanupFragmentMonitor()}ngOnAttach(e){if(this.unmute(),e){const e=e=>{e&&e.startUpdate&&e.invoke&&e.invoke()};r.each(this.Variables,e),r.each(this.Actions,e)}r.each(this.Widgets,e=>e&&e.ngOnAttach&&e.ngOnAttach())}ngOnDetach(){this.mute(),r.each(this.Widgets,e=>e&&e.ngOnDetach&&e.ngOnDetach())}onReady(e){}static{this.\u0275fac=at.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:kt,deps:null,target:at.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=at.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:kt,isStandalone:!0,viewQueries:[{propertyName:"partialDirective",first:!0,predicate:d.PartialDirective,descendants:!0}],usesInheritance:!0,ngImport:at})}}at.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:kt,decorators:[{type:t.Directive}],propDecorators:{partialDirective:[{type:t.ViewChild,args:[d.PartialDirective]}]}});const Nt="_cache_page",Mt="REUSE_ROUTE_STRATEGY.MAX_CACHE_SIZE",Lt="REUSE_ROUTE_STRATEGY.MAX_CACHE_AGE";e.WmDefaultRouteReuseStrategy=class{constructor(e,t){this.paramsToIgnore=["wm_state",Nt],this.getSize=e=>e?Object.keys(e).length:0,this.cache=new a.LRUCache(e,t,(e,t)=>{this.currentRouteKey===e?this.cache.set(e,t):t.componentRef.destroy()})}getKey(e){const t=Object.keys(e.queryParams).filter(e=>!this.paramsToIgnore.includes(e)).map(t=>t+"="+e.queryParams[t]).sort().join("&");let i=e.params.pageName;return e.data.pageName&&e.routeConfig.path===e.data.pageName&&(i=e.data.pageName),i&&i+(t?`?${t}`:"")}isSameQueryParams(e,t){try{const i=e.queryParams,n=t.queryParams,a=i?this.getSize(i):0,s=n?this.getSize(n):0;return 0===a&&0===s||a===s&&JSON.stringify(i)===JSON.stringify(n)}catch(e){return!1}}isCacheEnabled(e,t){const i=e.queryParams[Nt];return r.isNil(i)?t:"true"===i||!0===i}shouldDetach(e){const t=this.getKey(e);return!!this.isCacheEnabled(e,!!e.data[Nt])||(this.cache.delete(t),!1)}shouldAttach(e){const t=this.getKey(e);this.currentRouteKey=t;const i=this.cache.get(t);return!(!i||!this.isCacheEnabled(e,!!i[Nt]))||(this.cache.delete(t),!1)}store(e,t){if(t){const i=this.getKey(e);t[Nt]=!!e.data[Nt],this.cache.set(i,t)}}retrieve(e){const t=this.getKey(e);return this.cache.get(t)}reset(e){if(!e)return this.cache.clear();{this.cache.delete(e);const t=e+="?",i=[];for(let e of this.cache.keys())e.startsWith(t)&&i.push(e);i.forEach(e=>this.cache.delete(e))}}},e.WmDefaultRouteReuseStrategy=p.__decorate([p.__param(0,t.Inject(Mt)),p.__param(1,t.Inject(Lt)),p.__metadata("design:paramtypes",[Number,Number])],e.WmDefaultRouteReuseStrategy);class Ft extends e.WmDefaultRouteReuseStrategy{constructor(){super()}isSameRoute(e,t){if(e.routeConfig&&"prefab-preview"===e.routeConfig.path)return!1;const i=e.params,n=t.params,a=this.getSize(i),s=this.getSize(n);return 0===a&&0===s||a===s&&(i.pageName===n.pageName&&this.isSameQueryParams(e,t))}shouldReuseRoute(e,t){return this.isSameRoute(e,t)}}class $t extends e.WmDefaultRouteReuseStrategy{constructor(){super()}isSameRoute(e,t){return!e.routeConfig&&!t.routeConfig||e.routeConfig===t.routeConfig&&(e.routeConfig!==t.routeConfig||(!(!e.data.layoutName||!t.data.layoutName)||this.isSameQueryParams(e,t)))}shouldReuseRoute(e,t){return this.isSameRoute(e,t)}}class jt extends xt{constructor(){super(...arguments),this.startupVariablesLoaded=!1,this.pageTransitionCompleted=!1,this.destroy$=new c.Subject,this.viewInit$=new c.Subject,this.formatsByLocale={timezone:""}}static{this.lastPageSnapShot=null}init(){a.muteWatchers(),this.App=this.injector?this.injector.get(a.App):t.inject(a.App),this.route=this.injector?this.injector.get(i.ActivatedRoute):t.inject(i.ActivatedRoute),this.appManager=this.injector?this.injector.get(Ct):t.inject(Ct),this.navigationService=this.injector?this.injector.get(a.AbstractNavigationService):t.inject(a.AbstractNavigationService),this.scriptLoaderService=this.injector?this.injector.get(a.ScriptLoaderService):t.inject(a.ScriptLoaderService),this.i18nService=this.injector?this.injector.get(a.AbstractI18nService):t.inject(a.AbstractI18nService),this.router=this.injector?this.injector.get(i.Router):t.inject(i.Router),this.Viewport=this.injector?this.injector.get(a.Viewport):t.inject(a.Viewport),this.registerExpressions(),this.initUserScript(),this.registerWidgets(),this.initVariables(),this.App.lastActivePageName=this.App.activePageName,this.App.activePageName=this.pageName,this.App.activePage=this,this.activePageName=this.pageName,this.registerPageParams(),this.defineI18nProps(),super.init()}registerWidgets(){this.Widgets=Object.create(At),this.App.Widgets=Object.create(this.Widgets)}initUserScript(){try{this.evalUserScript(this,this.App,this.injector?this.injector.get(a.UtilsService):t.inject(a.UtilsService))}catch(e){console.error(`Error in evaluating page (${this.pageName}) script\n`,e)}}registerPageParams(){const e=this.route.queryParams.subscribe(e=>this.pageParams=this.App.pageParams=r.extend({},e));this.registerDestroyListener(()=>e.unsubscribe())}registerDestroyListener(e){this.destroy$.subscribe(a.noop,a.noop,()=>e())}defineI18nProps(){this.appLocale=this.i18nService.getAppLocale()}initVariables(){const e=(this.injector?this.injector.get(o.VariablesService):t.inject(o.VariablesService)).register(this.pageName,this.getVariables(),this);this.Variables=Object.create(this.App.Variables),this.Actions=Object.create(this.App.Actions),Object.entries(e.Variables).forEach(([e,t])=>this.Variables[e]=t),Object.entries(e.Actions).forEach(([e,t])=>this.Actions[e]=t);const i=this.viewInit$.subscribe(a.noop,a.noop,()=>{this.appManager.isAppVariablesFired()||(e.callback(this.App.Variables).catch(a.noop).then(()=>{this.appManager.notify("app-variables-data-loaded",{pageName:this.pageName})}),e.callback(this.App.Actions),this.appManager.appVariablesReady(),this.appManager.isAppVariablesFired(!0)),e.callback(e.Variables).catch(a.noop).then(()=>{this.appManager.notify("page-variables-data-loaded",{pageName:this.pageName}),this.startupVariablesLoaded=!0,setTimeout(()=>{this.showPageContent=!0},100)}),e.callback(e.Actions),i.unsubscribe()})}setTimezone(e){this.i18nService.setTimezone(e,this)}registerExpressions(){const e=this.getExpressions();r.each(e,(e,t)=>{a.registerFnByExpr(t,e[0],e[1])})}runPageTransition(e){e=e||this.navigationService.getPageTransition();const t=jt.lastPageSnapShot;return new Promise(i=>{if(e&&!e.startsWith("none")&&t){const n=t.parent(),a=t=>{!i||t&&t.pseudoElement||(n.off("animationend",a),n.removeClass(e),n.children().first().remove(),i(),i=null)};e="page-transition page-transition-"+e,t.addClass("page-exit"),this.$page.addClass("page-entry"),n.addClass(e),n.on("animationend",a),setTimeout(a,1e3)}else i()}).then(()=>{this.$page&&this.$page.removeClass("page-entry"),t&&(t.remove(),jt.lastPageSnapShot=null),this.pageTransitionCompleted=!0})}invokeOnReady(){this.onReady(),this.appManager.notify("pageReady",{name:this.pageName,instance:this}),(this.App.onPageReady||a.noop)(this.pageName,this);const e=a.getWmProjectProperties()?.homePage;window.top.name!==window.name&&e===this.pageName&&window.top.postMessage({key:"onHomepageLoad"},"*")}loadScripts(){return new Promise(e=>{const t=this.pageDirective&&this.pageDirective.$element.attr("scripts-to-load");t?this.scriptLoaderService.load(...t.split(",")).then(e):e()})}restoreLastPageSnapshot(){}savePageSnapShot(){jt.lastPageSnapShot&&jt.lastPageSnapShot.remove()}saveScrollPosition(){const e=(t,i,n=!0,a=t)=>{n&&t.children().each((t,n)=>e($(n),i));const s=a.scrollLeft(),o=a.scrollTop();(s>0||o>0)&&t.attr(i,s+","+o)};e(this.$page,"data-scroll-position"),this.$page.attr("data-window-scroll-position",window.scrollX+","+window.scrollY)}restoreScrollPosition(){const e=(t,i,n=!0,a=t)=>{const s=(t.attr(i)||"").split(",");s.length>1&&(a.scrollLeft(s[0]),a.scrollTop(s[1])),t.removeAttr(i),n&&t.children().each((t,n)=>e($(n),i))};e(this.$page,"data-scroll-position"),e(this.$page,"data-window-scroll-position",!1,$(window))}canDeactivate(e){let t;return t=this.onBeforePageLeave(),!1!==t&&(t=(this.App.onBeforePageLeave||a.noop)(this.App.activePageName,this.App.activePage,e)),void 0===t||t}ngAfterViewInit(){this.route.snapshot.data[Nt]=this.canReuse(),this.pageDirective&&(this.$page=this.pageDirective.$element.parent(),a.isIos()&&this.$page.addClass("ios-page"),a.isAndroid()&&this.$page.addClass("android-page")),this.restoreLastPageSnapshot(),this.loadScripts().then(()=>{this.runPageTransition().then(()=>{this.compilePageContent=!0,setTimeout(()=>{this.onPageContentReady=()=>{this.fragmentsLoaded$.subscribe(a.noop,a.noop,()=>{this.invokeOnReady()}),a.unMuteWatchers(),this.viewInit$.complete(),this.onPageContentReady=a.noop}},0)})})}ngOnDestroy(){this.savePageSnapShot(),this.destroy$&&(this.destroy$.complete(),this.destroy$=null),this.viewInit$&&!this.viewInit$.closed&&(this.viewInit$.complete(),this.viewInit$=null),this.App=null,this.route=null,this.appManager=null,this.navigationService=null,this.router=null,this.pageParams=null,this.i18nService=null,this.appLocale=null,this.pageDirective=null,this.$page=null,this.scriptLoaderService=null,this.Viewport=null,this.cleanupFragmentMonitor()}captureApplicationThumbnail(){const e=this;"true"===localStorage.getItem("captureApplicationThumbnail")&&this.App.landingPageName===this.pageName&&!this.App.isApplicationThumbnailCaptured&&html2canvas(document.body).then(t=>{try{e.App.isApplicationThumbnailCaptured=!0;const i=t.toDataURL("image/png");console.log(i);const n=document.createElement("a");n.href=i,n.download="screenshot.jpg",n.click()}catch(e){console.error("Error in html2canvas then block:",e)}}).catch(e=>{console.error("Error in html2canvas promise:",e)})}onReady(){}onBeforePageReady(){}onBeforePageLeave(){}onPageContentReady(){}canReuse(){return!(!this.pageDirective||!this.pageDirective.cache)}mute(){const e=e=>{e&&e.mute&&e.mute()};r.each(this.Widgets,e),r.each(this.Variables,e),r.each(this.Actions,e)}unmute(e=this){const t=e=>{e&&e.unmute&&e.unmute()};r.each(this.Widgets,t),r.each(this.Variables,t),r.each(this.Actions,t)}ngOnAttach(){if(this.route.snapshot.data[Nt]=this.canReuse(),this.registerPageParams(),this.App.lastActivePageName=this.App.activePageName,this.App.activePageName=this.pageName,this.App.activePage=this,this.activePageName=this.pageName,this.restoreLastPageSnapshot(),this.unmute(),this.App.Widgets=Object.create(this.Widgets),this.pageDirective&&this.pageDirective.refreshdataonattach){const e=e=>{e&&e.startUpdate&&e.invoke&&e.invoke()};r.each(this.Variables,e),r.each(this.Actions,e)}this.runPageTransition().then(()=>{setTimeout(()=>this.restoreScrollPosition(),100),r.each(this.Widgets,e=>e&&e.ngOnAttach&&e.ngOnAttach()),this.appManager.notify("pageAttach",{name:this.pageName,instance:this})})}ngOnDetach(){this.saveScrollPosition(),this.savePageSnapShot(),this.mute(),r.each(this.Widgets,e=>e&&e.ngOnDetach&&e.ngOnDetach()),this.appManager.notify("pageDetach",{name:this.pageName,instance:this})}ngAfterContentInit(){this.onBeforePageReady()}static clear(){jt.lastPageSnapShot&&(jt.lastPageSnapShot.remove(),jt.lastPageSnapShot=null)}static{this.\u0275fac=at.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:jt,deps:null,target:at.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=at.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:jt,isStandalone:!0,host:{listeners:{"window:beforeunload":"canDeactivate()"}},viewQueries:[{propertyName:"pageDirective",first:!0,predicate:l.PageDirective,descendants:!0}],usesInheritance:!0,ngImport:at})}}at.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:jt,decorators:[{type:t.Directive}],propDecorators:{pageDirective:[{type:t.ViewChild,args:[l.PageDirective]}],canDeactivate:[{type:t.HostListener,args:["window:beforeunload"]}]}});class Vt extends xt{constructor(){super(...arguments),this.BaseWidget={},this.compileContent=!1,this.destroy$=new c.Subject,this.viewInit$=new c.Subject,this.invokeEvent=e=>{this.events[e]()}}getContainerWidgetInjector(){return this.containerWidget.inj||this.containerWidget.injector}init(){let e;const i=new Promise(t=>e=t);this.App=this.injector?this.injector.get(a.App):t.inject(a.App),this.containerWidget=this.injector?this.injector.get(d.WidgetRef):t.inject(d.WidgetRef),this.i18nService=this.injector?this.injector.get(a.AbstractI18nService):t.inject(a.AbstractI18nService),this.scriptLoaderService=this.injector?this.injector.get(a.ScriptLoaderService):t.inject(a.ScriptLoaderService),this.Viewport=this.injector?this.injector.get(a.Viewport):t.inject(a.Viewport),this.customwidgetConfigProvider=this.injector?this.injector.get(bt):t.inject(bt),this.viewParent=this.containerWidget.viewParent,this.viewParent.registerFragment&&this.viewParent.registerFragment(),this.registerExpressions(),this.initUserScript(),this.registerPropsInContainerWidget(e),i.then(()=>this.registerEvents()),this.registerWidgets(),this.initVariables(),this.activePageName=this.App.activePageName,this.registerProps(),this.defineI18nProps(),this.viewInit$.subscribe(a.noop,a.noop,()=>{this.props=this.containerWidget.props}),this.spa?this.pageDirective=this.injector?this.injector.get(l.SpaPageDirective,null):t.inject(l.SpaPageDirective,{optional:!0}):this.pageDirective=this.injector?this.injector.get(l.PageDirective,null):t.inject(l.PageDirective,{optional:!0}),this.pageDirective&&(this.registerDestroyListener(this.pageDirective.subscribe("attach",e=>this.ngOnAttach(e.refreshData))),this.registerDestroyListener(this.pageDirective.subscribe("detach",()=>this.ngOnDetach()))),this.containerWidget.onErroSubject.asObservable().subscribe(()=>{if(this.onValidStatusChange)return this.onValidStatusChange()}),super.init()}registerWidgets(){this.Widgets=Object.create(At),this.App.Widgets=Object.create(this.Widgets)}initializeComponentData(e){Array.from(e).forEach(e=>{if(e.hasAttribute("wmcustomwidget")){const t=e.getAttribute("as")||"";if(!t)return;let i,n=[];switch(n=t.split("-").map(e=>e="wm"!==e?r.capitalize(e):e),i=n.join(""),i){case"wmCheckboxset":this[i]=new m.CheckboxsetComponent(this.injector,void 0),this[i]._select=(e,t)=>{const n=[];r.forEach(this[i].datasetItems,t=>{t.key===e.key&&(t.selected=!t.selected),t.selected&&n.push(t.key)}),this[i].triggerInvokeOnChange(n,t)};break;case"wmRadioset":this[i]=new h.RadiosetComponent(this.injector,void 0),this[i]._select=(e,t)=>{this[i].triggerInvokeOnChange(e.key,t)}}for(let[e,t]of this.containerWidget.$attrs)if(e.startsWith("base-")){let n=e.replace("base-","");this[i][n]=t,"datavalue"===n&&this.containerWidget.formControl&&this.containerWidget.updateDataValue(t)}this[i].initDatasetItems(),this.containerWidget[i]=this[i]}else this.initializeComponentData(e.children)})}registerBaseWidget(){this.initializeComponentData(this.containerWidget.nativeElement.children)}registerEvents(){this.events={},this.containerWidget.eventHandlers.forEach((e,t)=>{this.events[t]=(...e)=>{this.containerWidget.invokeEventCallback(t,{$event:e[0],$data:e[1]})}})}registerDestroyListener(e){this.destroy$.subscribe(a.noop,a.noop,()=>e())}registerChangeListeners(){this.containerWidget.registerPropertyChangeListener(this.onPropertyChange),this.containerWidget.registerStyleChangeListener(this.onPropertyChange)}get datavalue(){if(this.getDatavalue)return this.getDatavalue()}set datavalue(e){this.datavalue=e}initUserScript(){try{this.viewParent.prefabName&&(this.viewParent.Prefab?this.Prefab=this.viewParent.Prefab:this.Prefab=this.viewParent),this.evalUserScript(this,this.App,this.injector?this.injector.get(a.UtilsService):t.inject(a.UtilsService))}catch(e){console.error(`Error in evaluating partial (${this.customWidgetName}) script\n`,e)}}initVariables(){const e=(this.injector?this.injector.get(o.VariablesService):t.inject(o.VariablesService)).register(this.customWidgetName,this.getVariables(),this);this.Variables=Object.create(this.App.Variables),this.Actions=Object.create(this.App.Actions),this.containerWidget.Variables=this.Variables,this.containerWidget.Actions=this.Actions,Object.entries(e.Variables).forEach(([e,t])=>this.Variables[e]=t),Object.entries(e.Actions).forEach(([e,t])=>this.Actions[e]=t),this.viewInit$.subscribe(a.noop,a.noop,()=>{a.$invokeWatchers(!0,!0),e.callback(e.Variables).catch(a.noop),e.callback(e.Actions)})}registerExpressions(){}registerProps(){this.props=this.containerWidget.props}defineI18nProps(){this.appLocale=this.i18nService.getAppLocale()}invokeOnReady(){let e;this.containerWidget.userComponentParams&&(e=this.containerWidget.userComponentParams),this.onReady(e),this.viewParent.resolveFragment&&this.viewParent.resolveFragment()}loadScripts(){}registerPropsInContainerWidget(e){this.customwidgetConfigProvider.getConfig(this.customWidgetName).then(t=>{t&&Object.entries(t.properties||{}).forEach(([e,t])=>{let i;const n=_.trim(t.value);_.startsWith(n,"bind:")&&(i=n.replace("bind:","")),Object.defineProperty(this,e,{get:()=>this.containerWidget[e],set:t=>this.containerWidget.widget[e]=t}),i&&this.registerDestroyListener(a.$watch(i,this,{},t=>this.containerWidget.widget[e]=t))}),this.containerWidget.setProps(t,e),a.isIE()&&(this.containerWidget.widget=this.containerWidget.createProxy())})}mute(){const e=e=>{e&&e.mute&&e.mute()};_.each(this.Widgets,e),_.each(this.Variables,e),_.each(this.Actions,e)}unmute(){const e=e=>{e&&e.unmute&&e.unmute()};_.each(this.Widgets,e),_.each(this.Variables,e),_.each(this.Actions,e)}ngAfterViewInit(){this.registerChangeListeners(),this.registerBaseWidget(),setTimeout(()=>{this.viewInit$.complete(),this.fragmentsLoaded$.subscribe(a.noop,a.noop,()=>this.invokeOnReady())},100)}ngOnDestroy(){this.destroy$&&!this.destroy$.closed&&(this.destroy$.complete(),this.destroy$=null),this.viewInit$&&!this.viewInit$.closed&&(this.viewInit$.complete(),this.viewInit$=null),this.fragmentsLoaded$&&!this.fragmentsLoaded$.closed&&(this.fragmentsLoaded$.complete(),this.fragmentsLoaded$=null),this.Widgets=null,this.BaseWidget=null,this.Variables=null,this.Actions=null,this.App=null,this.containerWidget=null,this.i18nService=null,this.appLocale=null,this.pageDirective=null,this.Prefab=null,this.scriptLoaderService=null,this.customwidgetConfigProvider=null,this.Viewport=null,this.route=null,this.appManager=null,this.navigationService=null,this.router=null,this.props=null,this.events=null,this.viewParent=null,this.cleanupFragmentMonitor()}ngOnAttach(e){if(this.unmute(),e){const e=e=>{e&&e.startUpdate&&e.invoke&&e.invoke()};_.each(this.Variables,e),_.each(this.Actions,e)}_.each(this.Widgets,e=>e&&e.ngOnAttach&&e.ngOnAttach())}ngOnDetach(){this.mute(),_.each(this.Widgets,e=>e&&e.ngOnDetach&&e.ngOnDetach())}onPropertyChange(){}onReady(e){}static{this.\u0275fac=at.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Vt,deps:null,target:at.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=at.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:Vt,isStandalone:!0,usesInheritance:!0,ngImport:at})}}at.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Vt,decorators:[{type:t.Directive}]});class Bt extends xt{constructor(){super(...arguments),this.compileContent=!1,this.scriptsLoaded=!1,this.destroy$=new c.Subject,this.viewInit$=new c.Subject}getContainerWidgetInjector(){return this.containerWidget.inj||this.containerWidget.injector}init(){this.App=this.injector.get(a.App),this.containerWidget=this.injector?this.injector.get(d.WidgetRef):t.inject(d.WidgetRef),this.prefabMngr=this.injector?this.injector.get(_t):t.inject(_t),this.i18nService=this.injector?this.injector.get(a.AbstractI18nService):t.inject(a.AbstractI18nService),this.scriptLoaderService=this.injector?this.injector.get(a.ScriptLoaderService):t.inject(a.ScriptLoaderService),this.Viewport=this.injector?this.injector.get(a.Viewport):t.inject(a.Viewport),this.viewParent=this.containerWidget.viewParent,this.viewParent.registerFragment&&this.viewParent.registerFragment(),this.spa?this.pageDirective=this.injector?this.injector.get(l.SpaPageDirective,null):t.inject(l.SpaPageDirective,{optional:!0}):this.pageDirective=this.injector?this.injector.get(l.PageDirective,null):t.inject(l.PageDirective,{optional:!0}),this.pageDirective&&(this.registerDestroyListener(this.pageDirective.subscribe("attach",e=>this.ngOnAttach(e.refreshData))),this.registerDestroyListener(this.pageDirective.subscribe("detach",()=>this.ngOnDetach()))),this.registerExpressions(),this.initUserScript(),this.registerWidgets(),this.initVariables(),this.registerProps(),this.defineI18nProps(),super.init()}registerWidgets(){this.Widgets={},this.containerWidget.Widgets=this.Widgets}initUserScript(){try{this.evalUserScript(this,this.App,this.injector.get(a.UtilsService))}catch(e){console.error(`Error in evaluating prefab (${this.prefabName}) script\n`,e)}}registerChangeListeners(){this.containerWidget.registerPropertyChangeListener(this.onPropertyChange),this.containerWidget.registerStyleChangeListener(this.onPropertyChange)}registerDestroyListener(e){this.destroy$.subscribe(a.noop,a.noop,()=>e())}defineI18nProps(){this.appLocale=this.i18nService.getPrefabLocaleBundle(this.prefabName)}registerProps(){this.prefabMngr.getConfig(this.prefabName).then(e=>{e&&(this.displayName=e.displayName,Object.entries(e.properties||{}).forEach(([e,t])=>{let i;const n=r.trim(t.value);r.startsWith(n,"bind:")&&(i=n.replace("bind:","")),Object.defineProperty(this,e,{get:()=>this.containerWidget[e],set:t=>this.containerWidget.widget[e]=t}),i&&this.registerDestroyListener(a.$watch(i,this,{},t=>this.containerWidget.widget[e]=t))}),Object.entries(e.events||{}).forEach(([e,t])=>{this[e]=(...t)=>{const i=e.substr(2).toLowerCase();this.containerWidget.invokeEventCallback(i,{$event:t[0],$data:t[1]})}}),Object.entries(e.methods||{}).forEach(([e,t])=>{this.containerWidget[e]=(...t)=>{try{if(this[e])return this[e].apply(this,t)}catch(t){console.warn(`error in executing prefab-${this.prefabName} method-${e}`)}}})),this.containerWidget.setProps(e),a.isIE()&&(this.containerWidget.widget=this.containerWidget.createProxy())})}initVariables(){const e=this.injector.get(o.VariablesService).register(this.prefabName,this.getVariables(),this);this.Variables={},this.Actions={},this.containerWidget.Variables=this.Variables,this.containerWidget.Actions=this.Actions,Object.entries(e.Variables).forEach(([e,t])=>this.Variables[e]=t),Object.entries(e.Actions).forEach(([e,t])=>this.Actions[e]=t),this.viewInit$.subscribe(a.noop,a.noop,()=>{e.callback(e.Variables).catch(a.noop),e.callback(e.Actions)})}registerExpressions(){const e=this.getExpressions();r.each(e,(e,t)=>{a.registerFnByExpr(t,e[0],e[1])})}invokeOnReady(){a.$invokeWatchers(!0,!0),this.onReady(),this.viewParent.resolveFragment&&this.viewParent.resolveFragment(),this.containerWidget.invokeEventCallback("load")}loadScripts(){return new Promise(e=>{if(!this.prefabContainerDirective)return void e();const t=this.prefabContainerDirective.$element.attr("scripts-to-load");t?this.scriptLoaderService.load(...t.split(",")).then(e):e()})}mute(){const e=e=>{e&&e.mute&&e.mute()};r.each(this.Widgets,e),r.each(this.Variables,e),r.each(this.Actions,e)}unmute(){const e=e=>{e&&e.unmute&&e.unmute()};r.each(this.Widgets,e),r.each(this.Variables,e),r.each(this.Actions,e)}ngOnAttach(e){if(this.unmute(),e){const e=e=>{e&&e.startUpdate&&e.invoke&&e.invoke()};r.each(this.Variables,e),r.each(this.Actions,e)}r.each(this.Widgets,e=>e&&e.ngOnAttach&&e.ngOnAttach())}ngOnDetach(){this.mute(),r.each(this.Widgets,e=>e&&e.ngOnDetach&&e.ngOnDetach())}ngAfterViewChecked(){!this.scriptsLoaded&&this.prefabContainerDirective&&(this.scriptsLoaded=!0,this.loadScripts().then(()=>{this.compileContent=!0,this.registerChangeListeners(),setTimeout(()=>{this.viewInit$.complete(),this.fragmentsLoaded$.subscribe(a.noop,a.noop,()=>this.invokeOnReady())},100)}))}ngOnDestroy(){this.destroy$&&(this.destroy$.complete(),this.destroy$=null),this.viewInit$&&!this.viewInit$.closed&&(this.viewInit$.complete(),this.viewInit$=null),this.App=null,this.containerWidget=null,this.prefabMngr=null,this.i18nService=null,this.appLocale=null,this.prefabContainerDirective=null,this.scriptLoaderService=null,this.pageDirective=null,this.Viewport=null,this.viewParent=null,this.cleanupFragmentMonitor()}onPropertyChange(){}onReady(){}static{this.\u0275fac=at.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Bt,deps:null,target:at.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=at.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:Bt,isStandalone:!0,viewQueries:[{propertyName:"prefabContainerDirective",first:!0,predicate:u.PrefabContainerDirective,descendants:!0}],usesInheritance:!0,ngImport:at})}}at.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Bt,decorators:[{type:t.Directive}],propDecorators:{prefabContainerDirective:[{type:t.ViewChild,args:[u.PrefabContainerDirective,{static:!1}]}]}});class Gt{registerExpressions(){const e=this.getExpressions();r.each(e,(e,t)=>{a.registerFnByExpr(t,e[0],e[1])})}overrideRouterOutlet(){const e=this.routerOutlet.attach,t=this.routerOutlet.detach;this.routerOutlet.attach=(t,i)=>{e.call(this.routerOutlet,t,i),t.instance.ngOnAttach()},this.routerOutlet.detach=()=>t.call(this.routerOutlet)}ngAfterViewInit(){setTimeout(()=>{this.overrideRouterOutlet()},10)}init(){this.App=this.injector.get(a.App),this.App.activeLayoutName=this.layoutName,this.App.layoutPages=this.layoutPages,this.registerExpressions()}ngOnDestroy(){this.App=null,this.routerOutlet=null,this.pageDirective=null,this.layoutPages=null,this.layoutName=null}canReuse(){}ngOnAttach(){}ngOnDetach(){}onActivate(e){r.extend(this,e)}static{this.\u0275fac=at.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Gt,deps:[],target:at.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=at.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:Gt,isStandalone:!0,viewQueries:[{propertyName:"routerOutlet",first:!0,predicate:i.RouterOutlet,descendants:!0},{propertyName:"pageDirective",first:!0,predicate:l.PageDirective,descendants:!0}],ngImport:at})}}at.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Gt,decorators:[{type:t.Directive}],propDecorators:{routerOutlet:[{type:t.ViewChild,args:[i.RouterOutlet]}],pageDirective:[{type:t.ViewChild,args:[l.PageDirective]}]}});const Wt={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},qt=/%COMP%/g,zt="%COMP%",Ut=`_nghost-${zt}`,Ht=`_ngcontent-${zt}`;function Yt(e){return Ht.replace(qt,e)}function Xt(e){return Ut.replace(qt,e)}function Kt(e,t,i){for(let n=0;n<t.length;n++){let a=t[n];Array.isArray(a)?Kt(e,a,i):(a=a.replace(qt,e),i.push(a))}return i}class Qt{constructor(e,t,i,n){this.eventManager=e,this.sharedStylesHost=t,this.appId=i,this.doc=n,this.rendererByCompId=new Map,this.defaultRenderer=new Zt(e,n)}createRenderer(e,i){if(!e||!i)return this.defaultRenderer;switch(i.encapsulation){case t.ViewEncapsulation.Emulated:{let t=this.rendererByCompId.get(i.id);return t||(t=new ti(this.eventManager,this.sharedStylesHost,i,this.appId,this.doc),this.rendererByCompId.set(i.id,t)),t.applyToHost(e),t}case 1:case t.ViewEncapsulation.ShadowDom:return new ii(this.eventManager,this.sharedStylesHost,e,i,this.doc);default:if(!this.rendererByCompId.has(i.id)){const e=Kt(i.id,i.styles,[]);this.sharedStylesHost.addStyles(e),this.rendererByCompId.set(i.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}static{this.\u0275fac=at.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Qt,deps:[{token:dt.EventManager},{token:dt.\u0275SharedStylesHost},{token:t.APP_ID},{token:n.DOCUMENT}],target:at.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=at.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Qt})}}at.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Qt,decorators:[{type:t.Injectable}],ctorParameters:()=>[{type:dt.EventManager},{type:dt.\u0275SharedStylesHost},{type:void 0,decorators:[{type:t.Inject,args:[t.APP_ID]}]},{type:Document,decorators:[{type:t.Inject,args:[n.DOCUMENT]}]}]});let Zt=class{constructor(e,t){this.eventManager=e,this.doc=t,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(e,t){return t?document.createElementNS(Wt[t]||t,e):document.createElement(e)}createComment(e){return document.createComment(e)}createText(e){return document.createTextNode(e)}appendChild(e,t){(ei(e)?e.content:e).appendChild(t)}insertBefore(e,t,i){if(e){(ei(e)?e.content:e).insertBefore(t,i)}}removeChild(e,t){t.remove()}selectRootElement(e,t){let i="string"==typeof e?document.querySelector(e):e;if(!i)throw new Error(`The selector "${e}" did not match any elements`);return t||(i.textContent=""),i}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}resetStyles(e){[].slice.call(e).forEach(function(t){e.style.removeProperty(t)})}applyStyles(e,t){if(t){return t.split(";").forEach(function(t){const i=t.split(":");let n,a;2===i.length&&(n=i[0].trim(),a=i[1].trim(),e.style[n]=a)}),t}}setAttribute(e,t,i,n){if(n){t=n+":"+t;const a=Wt[n];a?e.setAttributeNS(a,t,i):e.setAttribute(t,i)}else"style"===t?(this.resetStyles(e),this.applyStyles(e,i)):e.setAttribute(t,i)}removeAttribute(e,t,i){if(i){const n=Wt[i];n?e.removeAttributeNS(n,t):e.removeAttribute(`${i}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,i,n,a){a&(t.RendererStyleFlags2.DashCase|t.RendererStyleFlags2.Important)?e.style.setProperty(i,n,a&t.RendererStyleFlags2.Important?"important":""):e.style[i]=n}removeStyle(e,i,n){n&t.RendererStyleFlags2.DashCase?e.style.removeProperty(i):e.style[i]=""}setProperty(e,t,i){t&&t.charCodeAt(0)===Jt||null!=e&&(e[t]=i)}setValue(e,t){e.nodeValue=t}listen(e,t,i){if(t&&t.charCodeAt(0)===Jt)return()=>{};if("string"==typeof e&&!(e=n.\u0275getDOM().getGlobalEventTarget(this.doc,e)))throw new Error(`Unsupported event target ${e} for event ${t}`);return this.eventManager.addEventListener(e,t,(a=i,e=>{if("__ngUnwrap__"===e)return a;!1===a(e)&&(e.preventDefault(),e.returnValue=!1)}));var a}};Zt=p.__decorate([p.__param(1,t.Inject(n.DOCUMENT)),p.__metadata("design:paramtypes",[g.EventManager,Document])],Zt);const Jt="@".charCodeAt(0);function ei(e){return"TEMPLATE"===e.tagName&&void 0!==e.content}let ti=class extends Zt{constructor(e,t,i,n,a){super(e,a),this.component=i,this.doc=a;const s=Kt(n+"-"+i.id,i.styles,[]);t.addStyles(s),this.contentAttr=Yt(n+"-"+i.id),this.hostAttr=Xt(n+"-"+i.id)}applyToHost(e){super.setAttribute(e,this.hostAttr,"")}createElement(e,t){const i=super.createElement(e,t);return super.setAttribute(i,this.contentAttr,""),i}};ti=p.__decorate([p.__param(4,t.Inject(n.DOCUMENT)),p.__metadata("design:paramtypes",[g.EventManager,g.\u0275SharedStylesHost,Object,String,Document])],ti);let ii=class extends Zt{constructor(e,t,i,n,a){super(e,a),this.sharedStylesHost=t,this.hostEl=i,this.doc=a,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const s=Kt(n.id,n.styles,[]);for(let e=0;e<s.length;e++){const t=document.createElement("style");t.textContent=s[e],this.shadowRoot.appendChild(t)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}appendChild(e,t){return super.appendChild(this.nodeOrShadowRoot(e),t)}insertBefore(e,t,i){return super.insertBefore(this.nodeOrShadowRoot(e),t,i)}removeChild(e,t){return super.removeChild(null,t)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}};ii=p.__decorate([p.__param(4,t.Inject(n.DOCUMENT)),p.__metadata("design:paramtypes",[g.EventManager,g.\u0275SharedStylesHost,Object,Object,Document])],ii);
2
+ /**
3
+ * @license
4
+ * Copyright Google LLC All Rights Reserved.
5
+ *
6
+ * Use of this source code is governed by an MIT-style license that can be
7
+ * found in the LICENSE file at https://angular.io/license
8
+ */
9
+ class ni{constructor(){this._stylesSet=new Set}addStyles(e){const t=new Set;e.forEach(e=>{this._stylesSet.has(e)||(this._stylesSet.add(e),t.add(e))}),this.onStylesAdded(t)}onStylesAdded(e){}getAllStyles(){return Array.from(this._stylesSet)}static{this.\u0275fac=at.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:ni,deps:[],target:at.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=at.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:ni})}}at.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:ni,decorators:[{type:t.Injectable}]});class ai extends ni{constructor(e){super(),this._doc=e,this._hostNodes=new Map,this._hostNodes.set(e.head,[])}_addStylesToHost(e,t,i){const n=document.querySelector('meta[name="CSP-NONCE"]')?.getAttribute("content")||"wm-csp-nonce";e.forEach(e=>{const a=this._doc.createElement("style");a.textContent=e,a.setAttribute("nonce",n),i.push(t.appendChild(a))})}addHost(e){const t=[];this._addStylesToHost(this._stylesSet,e,t),this._hostNodes.set(e,t)}removeHost(e){const t=this._hostNodes.get(e);t&&t.forEach(si),this._hostNodes.delete(e)}onStylesAdded(e){this._hostNodes.forEach((t,i)=>{this._addStylesToHost(e,i,t)})}ngOnDestroy(){this._hostNodes.forEach(e=>e.forEach(si))}static{this.\u0275fac=at.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:ai,deps:[{token:n.DOCUMENT}],target:at.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=at.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:ai})}}function si(e){n.\u0275getDOM().remove(e)}at.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:ai,decorators:[{type:t.Injectable}],ctorParameters:()=>[{type:void 0,decorators:[{type:t.Inject,args:[n.DOCUMENT]}]}]});class oi extends xt{constructor(){super(...arguments),this.startupVariablesLoaded=!1,this.pageTransitionCompleted=!1,this.destroy$=new c.Subject,this.viewInit$=new c.Subject,this.formatsByLocale={timezone:""}}static{this.lastPageSnapShot=null}init(){a.muteWatchers(),this.App=this.injector?this.injector.get(a.App):t.inject(a.App),this.route=this.injector?this.injector.get(i.ActivatedRoute):t.inject(i.ActivatedRoute),this.appManager=this.injector?this.injector.get(Ct):t.inject(Ct),this.navigationService=this.injector?this.injector.get(a.AbstractNavigationService):t.inject(a.AbstractNavigationService),this.scriptLoaderService=this.injector?this.injector.get(a.ScriptLoaderService):t.inject(a.ScriptLoaderService),this.i18nService=this.injector?this.injector.get(a.AbstractI18nService):t.inject(a.AbstractI18nService),this.router=this.injector?this.injector.get(i.Router):t.inject(i.Router),this.Viewport=this.injector?this.injector.get(a.Viewport):t.inject(a.Viewport),this.layoutDirective=this.injector?this.injector.get(l.LayoutDirective):t.inject(l.LayoutDirective),this.registerExpressions(),this.initUserScript(),this.registerWidgets(),this.initVariables(),this.App.lastActivePageName=this.App.activePageName,this.App.activePageName=this.pageName,this.App.activePage=this,this.activePageName=this.pageName,this.registerPageParams(),this.defineI18nProps(),super.init()}registerWidgets(){this.Widgets=Object.create(At),this.App.Widgets=Object.create(this.Widgets)}initUserScript(){try{this.evalUserScript(this,this.App,this.injector?this.injector.get(a.UtilsService):t.inject(a.UtilsService))}catch(e){console.error(`Error in evaluating page (${this.pageName}) script\n`,e)}}registerPageParams(){const e=this.route.queryParams.subscribe(e=>this.pageParams=this.App.pageParams=r.extend({},e));this.registerDestroyListener(()=>e.unsubscribe())}registerDestroyListener(e){this.destroy$.subscribe(a.noop,a.noop,()=>e())}defineI18nProps(){this.appLocale=this.i18nService.getAppLocale()}initVariables(){const e=(this.injector?this.injector.get(o.VariablesService):t.inject(o.VariablesService)).register(this.pageName,this.getVariables(),this);this.Variables=Object.create(this.App.Variables),this.Actions=Object.create(this.App.Actions),Object.entries(e.Variables).forEach(([e,t])=>this.Variables[e]=t),Object.entries(e.Actions).forEach(([e,t])=>this.Actions[e]=t);const i=this.viewInit$.subscribe(a.noop,a.noop,()=>{this.appManager.isAppVariablesFired()||(e.callback(this.App.Variables).catch(a.noop).then(()=>{this.appManager.notify("app-variables-data-loaded",{pageName:this.pageName})}),e.callback(this.App.Actions),this.appManager.appVariablesReady(),this.appManager.isAppVariablesFired(!0)),e.callback(e.Variables).catch(a.noop).then(()=>{this.appManager.notify("page-variables-data-loaded",{pageName:this.pageName}),this.startupVariablesLoaded=!0,setTimeout(()=>{this.showPageContent=!0},100)}),e.callback(e.Actions),i.unsubscribe()})}setTimezone(e){this.i18nService.setTimezone(e,this)}registerExpressions(){const e=this.getExpressions();r.each(e,(e,t)=>{a.registerFnByExpr(t,e[0],e[1])})}runPageTransition(e){e=e||this.navigationService.getPageTransition();const t=oi.lastPageSnapShot;return new Promise(i=>{if(e&&!e.startsWith("none")&&t){const n=t.parent(),a=t=>{!i||t&&t.pseudoElement||(n.off("animationend",a),n.removeClass(e),n.children().first().remove(),i(),i=null)};e="page-transition page-transition-"+e,t.addClass("page-exit"),this.$page.addClass("page-entry"),n.addClass(e),n.on("animationend",a),setTimeout(a,1e3)}else i()}).then(()=>{this.$page&&this.$page.removeClass("page-entry"),t&&(t.remove(),oi.lastPageSnapShot=null),this.pageTransitionCompleted=!0})}invokeOnReady(){this.onReady(),this.appManager.notify("highlightActiveLink",{pageName:this.pageName}),this.appManager.notify("pageReady",{name:this.pageName,instance:this}),(this.App.onPageReady||a.noop)(this.pageName,this)}loadScripts(){return new Promise(e=>{const t=this.spaPageDirective&&this.spaPageDirective.$element.attr("scripts-to-load");t?this.scriptLoaderService.load(...t.split(",")).then(e):e()})}restoreLastPageSnapshot(){}savePageSnapShot(){oi.lastPageSnapShot&&oi.lastPageSnapShot.remove()}saveScrollPosition(){const e=(t,i,n=!0,a=t)=>{n&&t.children().each((t,n)=>e($(n),i));const s=a.scrollLeft(),o=a.scrollTop();(s>0||o>0)&&t.attr(i,s+","+o)};e(this.$page,"data-scroll-position"),this.$page.attr("data-window-scroll-position",window.scrollX+","+window.scrollY)}restoreScrollPosition(){const e=(t,i,n=!0,a=t)=>{const s=(t.attr(i)||"").split(",");s.length>1&&(a.scrollLeft(s[0]),a.scrollTop(s[1])),t.removeAttr(i),n&&t.children().each((t,n)=>e($(n),i))};e(this.$page,"data-scroll-position"),e(this.$page,"data-window-scroll-position",!1,$(window))}canDeactivate(e){let t;return t=this.onBeforePageLeave(),!1!==t&&(t=(this.App.onBeforePageLeave||a.noop)(this.App.activePageName,this.App.activePage,e)),void 0===t||t}ngAfterViewInit(){this.route.snapshot.data[Nt]=this.canReuse(),this.layoutDirective&&(this.$page=this.layoutDirective.$element.parent(),a.isIos()&&this.$page.addClass("ios-page"),a.isAndroid()&&this.$page.addClass("android-page")),this.restoreLastPageSnapshot(),this.loadScripts().then(()=>{this.runPageTransition().then(()=>{this.compilePageContent=!0,setTimeout(()=>{this.onPageContentReady=()=>{this.fragmentsLoaded$.subscribe(a.noop,a.noop,()=>{this.invokeOnReady()}),a.unMuteWatchers(),this.viewInit$.complete(),this.onPageContentReady=a.noop}},0)})})}ngOnDestroy(){this.savePageSnapShot(),this.destroy$&&!this.destroy$.closed&&(this.destroy$.complete(),this.destroy$=null),this.viewInit$&&!this.viewInit$.closed&&(this.viewInit$.complete(),this.viewInit$=null),this.fragmentsLoaded$&&!this.fragmentsLoaded$.closed&&(this.fragmentsLoaded$.complete(),this.fragmentsLoaded$=null),this.App=null,this.route=null,this.appManager=null,this.navigationService=null,this.router=null,this.pageParams=null,this.i18nService=null,this.appLocale=null,this.layoutDirective=null,this.spaPageDirective=null,this.$page=null,this.scriptLoaderService=null,this.Viewport=null,this.cleanupFragmentMonitor()}onReady(){}onBeforePageReady(){}onBeforePageLeave(){}onPageContentReady(){}canReuse(){return!(!this.spaPageDirective||!this.spaPageDirective.cache)}mute(){const e=e=>{e&&e.mute&&e.mute()};r.each(this.Widgets,e),r.each(this.Variables,e),r.each(this.Actions,e)}unmute(e=this){const t=e=>{e&&e.unmute&&e.unmute()};r.each(this.Widgets,t),r.each(this.Variables,t),r.each(this.Actions,t)}ngOnAttach(){if(this.route.snapshot.data[Nt]=this.canReuse(),this.registerPageParams(),this.App.lastActivePageName=this.App.activePageName,this.App.activePageName=this.pageName,this.App.activePage=this,this.activePageName=this.pageName,this.restoreLastPageSnapshot(),this.unmute(),this.App.Widgets=Object.create(this.Widgets),this.spaPageDirective&&this.spaPageDirective.refreshdataonattach){const e=e=>{e&&e.startUpdate&&e.invoke&&e.invoke()};r.each(this.Variables,e),r.each(this.Actions,e)}this.runPageTransition().then(()=>{setTimeout(()=>this.restoreScrollPosition(),100),r.each(this.Widgets,e=>e&&e.ngOnAttach&&e.ngOnAttach()),this.appManager.notify("pageAttach",{name:this.pageName,instance:this})}),this.appManager.notify("highlightActiveLink",{pageName:this.pageName})}ngOnDetach(){this.saveScrollPosition(),this.savePageSnapShot(),this.mute(),r.each(this.Widgets,e=>e&&e.ngOnDetach&&e.ngOnDetach()),this.appManager.notify("pageDetach",{name:this.pageName,instance:this})}ngAfterContentInit(){this.onBeforePageReady()}static clear(){oi.lastPageSnapShot&&(oi.lastPageSnapShot.remove(),oi.lastPageSnapShot=null)}static{this.\u0275fac=at.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:oi,deps:null,target:at.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=at.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:oi,isStandalone:!0,host:{listeners:{"window:beforeunload":"canDeactivate()"}},viewQueries:[{propertyName:"spaPageDirective",first:!0,predicate:l.SpaPageDirective,descendants:!0}],usesInheritance:!0,ngImport:at})}}var ri;at.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:oi,decorators:[{type:t.Directive}],propDecorators:{spaPageDirective:[{type:t.ViewChild,args:[l.SpaPageDirective]}],canDeactivate:[{type:t.HostListener,args:["window:beforeunload"]}]}}),function(e){e.EVERYONE="Everyone",e.ANONYMOUS="Anonymous",e.AUTHENTICATED="Authenticated"}(ri||(ri={}));class li{constructor(e,t,i,n,a){this.templateRef=e,this.viewContainerRef=t,this.securityService=i,this.inj=n,this.processed=!1,this.context={};const s=this.securityService.get();this.securityEnabled=r.get(s,"securityEnabled"),this.isUserAuthenticated=r.get(s,"authenticated"),this.userRoles=r.get(s,"userInfo.userRoles"),r.extend(this.context,n._lView[8],a)}getWidgetRolesArrayFromStr(e){const t=/&#44;/g;return""===(e=e||"")?[]:r.split(e,",").map(function(e){return r.trim(e).replace(t,",")})}matchRoles(e,t){return e.some(function(e){return r.includes(t,e)})}hasAccessToWidget(e,t){return!!r.includes(e,ri.EVERYONE)||(!(!r.includes(e,ri.ANONYMOUS)||this.isUserAuthenticated)||(!(!r.includes(e,ri.AUTHENTICATED)||!this.isUserAuthenticated)||this.isUserAuthenticated&&this.matchRoles(e,t)))}set accessroles(e){if(this.processed)return;this.processed=!0;const t=this.getWidgetRolesArrayFromStr(e);!this.securityEnabled||this.hasAccessToWidget(t,this.userRoles)?this.viewContainerRef.createEmbeddedView(this.templateRef,this.context):this.viewContainerRef.clear()}ngOnDestroy(){this.context&&(Object.keys(this.context).forEach(e=>{delete this.context[e]}),this.context=null)}static{this.\u0275fac=at.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:li,deps:[{token:at.TemplateRef},{token:at.ViewContainerRef},{token:lt.SecurityService},{token:at.Injector},{token:"EXPLICIT_CONTEXT",optional:!0}],target:at.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=at.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:li,isStandalone:!0,selector:"[accessroles]",inputs:{accessroles:"accessroles"},ngImport:at})}}at.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:li,decorators:[{type:t.Directive,args:[{standalone:!0,selector:"[accessroles]"}]}],ctorParameters:()=>[{type:at.TemplateRef},{type:at.ViewContainerRef},{type:lt.SecurityService},{type:at.Injector},{type:void 0,decorators:[{type:t.Inject,args:["EXPLICIT_CONTEXT"]},{type:t.Optional}]}],propDecorators:{accessroles:[{type:t.Input}]}});class ci{constructor(){}static{this.\u0275fac=at.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:ci,deps:[],target:at.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=at.\u0275\u0275ngDeclareComponent({minVersion:"17.0.0",version:"20.3.19",type:ci,isStandalone:!0,selector:"app-spinner",inputs:{show:"show",spinnermessages:"spinnermessages",classname:"classname",arialabel:"arialabel"},ngImport:at,template:'\n @if (show) {\n <div class="app-spinner" [ngClass]="classname">\n <div class="spinner-message">\n <i class="spinner-image animated infinite fa fa-circle-o-notch fa-spin"></i>\n <div class="spinner-messages">\n @for (value of spinnermessages; track value) {\n <p [textContent]="value"></p>\n }\n </div>\n </div>\n </div>\n }\n ',isInline:!0,dependencies:[{kind:"ngmodule",type:n.CommonModule},{kind:"directive",type:ot.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"directive",type:d.TextContentDirective,selector:"[textContent]",inputs:["textContent"]}]})}}at.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:ci,decorators:[{type:t.Component,args:[{standalone:!0,imports:[n.CommonModule,d.TextContentDirective],selector:"app-spinner",template:'\n @if (show) {\n <div class="app-spinner" [ngClass]="classname">\n <div class="spinner-message">\n <i class="spinner-image animated infinite fa fa-circle-o-notch fa-spin"></i>\n <div class="spinner-messages">\n @for (value of spinnermessages; track value) {\n <p [textContent]="value"></p>\n }\n </div>\n </div>\n </div>\n }\n '}]}],ctorParameters:()=>[],propDecorators:{show:[{type:t.Input}],spinnermessages:[{type:t.Input}],classname:[{type:t.Input}],arialabel:[{type:t.Input}]}});class di extends b.Toast{constructor(e,t){super(e,t),this.toastrService=e,this.toastPackage=t,this.watchers=[],this.params={},this.pagename=this.message||"",this.generateParams()}generateParams(){r.forEach(this.options.partialParams,e=>{r.isString(e.value)&&0===e.value.indexOf("bind:")?this.watchers.push(a.$watch(e.value.substr(5),this.options.context,{},t=>{this.params[e.name]=t,a.$appDigest()})):this.params[e.name]=e.value})}async generateDynamicComponent(){const e=$(".parent-custom-toast");this.customToastRef.clear(),e[0].appendChild(this.customToastRef.createEmbeddedView(this.customToastTmpl).rootNodes[0])}ngAfterViewInit(){this.generateDynamicComponent()}ngOnDestroy(){r.forEach(this.watchers,e=>e()),super.ngOnDestroy()}static{this.\u0275fac=at.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:di,deps:[{token:mt.ToastrService},{token:mt.ToastPackage}],target:at.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=at.\u0275\u0275ngDeclareComponent({minVersion:"17.0.0",version:"20.3.19",type:di,isStandalone:!0,selector:"[custom-toaster-component]",viewQueries:[{propertyName:"customToastRef",first:!0,predicate:["customToast"],descendants:!0,read:t.ViewContainerRef,static:!0},{propertyName:"customToastTmpl",first:!0,predicate:["customToastTmpl"],descendants:!0}],usesInheritance:!0,ngImport:at,template:'\n <div class="parent-custom-toast"></div>\n <ng-container #customToast></ng-container>\n <ng-template #customToastTmpl>\n <div wmContainer partialContainer content.bind="pagename">\n @for (param of params | keyvalue; track param) {\n <div wmParam hidden\n [name]="param.key" [value]="param.value"></div>\n }\n </div>\n </ng-template>',isInline:!0,dependencies:[{kind:"ngmodule",type:n.CommonModule},{kind:"directive",type:d.ContainerDirective,selector:"[wmContainer]"},{kind:"directive",type:d.PartialParamHandlerDirective,selector:"[partialContainer]"},{kind:"directive",type:d.PartialContainerDirective,selector:"[partialContainer]"},{kind:"directive",type:d.PartialParamDirective,selector:"[wmParam]",inputs:["name","value"]},{kind:"pipe",type:ot.KeyValuePipe,name:"keyvalue"}]})}}at.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:di,decorators:[{type:t.Component,args:[{standalone:!0,imports:[n.CommonModule,d.ContainerDirective,d.PartialParamHandlerDirective,d.PartialContainerDirective,d.PartialParamDirective],selector:"[custom-toaster-component]",template:'\n <div class="parent-custom-toast"></div>\n <ng-container #customToast></ng-container>\n <ng-template #customToastTmpl>\n <div wmContainer partialContainer content.bind="pagename">\n @for (param of params | keyvalue; track param) {\n <div wmParam hidden\n [name]="param.key" [value]="param.value"></div>\n }\n </div>\n </ng-template>',preserveWhitespaces:!1}]}],ctorParameters:()=>[{type:mt.ToastrService},{type:mt.ToastPackage}],propDecorators:{customToastRef:[{type:t.ViewChild,args:["customToast",{static:!0,read:t.ViewContainerRef}]}],customToastTmpl:[{type:t.ViewChild,args:["customToastTmpl"]}]}});class pi{constructor(e,t,i,n,a){this.route=e,this.securityService=t,this.router=i,this.app=n,this.appManger=a}parseSearchParams(e){const t={};return new URLSearchParams(e).forEach((e,i)=>t[i]=e),t}ngOnInit(){this.app.isPrefabType?this.router.navigate(["prefab-preview"]):this.app.isApplicationType?this.securityService.getPageByLoggedInUser().then(e=>{const{search:t,hash:i,origin:n,pathname:a}=window.location,s=this.parseSearchParams(t),o=!!t,r=i.includes("?");if(o&&!r){const i=`${n}${a}#/${e}${t}`;history.replaceState(null,"",i)}this.router.navigate([e],{queryParams:s,replaceUrl:!0})}):(this.router.navigate([a.getWmProjectProperties().homePage]),this.appManger.postAppTypeInfo())}static{this.\u0275fac=at.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:pi,deps:[{token:st.ActivatedRoute},{token:lt.SecurityService},{token:st.Router},{token:rt.App},{token:Ct}],target:at.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=at.\u0275\u0275ngDeclareComponent({minVersion:"14.0.0",version:"20.3.19",type:pi,isStandalone:!0,selector:"app-empty-page",ngImport:at,template:"<div></div>",isInline:!0})}}at.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:pi,decorators:[{type:t.Component,args:[{standalone:!0,selector:"app-empty-page",template:"<div></div>"}]}],ctorParameters:()=>[{type:st.ActivatedRoute},{type:lt.SecurityService},{type:st.Router},{type:rt.App},{type:Ct}]});class mi{setPipeData(){this._pipeData=[this.preparePipeMeta(n.AsyncPipe,"async",!1,[t.ChangeDetectorRef]),this.preparePipeMeta(n.SlicePipe,"slice",!1),this.preparePipeMeta(n.PercentPipe,"percent",!0,[this._locale]),this.preparePipeMeta(n.I18nPluralPipe,"i18nPlural",!0,[n.NgLocalization]),this.preparePipeMeta(n.I18nSelectPipe,"i18nSelect",!0),this.preparePipeMeta(n.KeyValuePipe,"keyvalue",!1,[t.KeyValueDiffers]),this.preparePipeMeta(d.FileIconClassPipe,"fileIconClass",!0),this.preparePipeMeta(d.FileExtensionFromMimePipe,"fileExtensionFromMime",!0),this.preparePipeMeta(d.StateClassPipe,"stateClass",!0),this.preparePipeMeta(d.FileSizePipe,"filesize",!0),this.preparePipeMeta(d.FilterPipe,"filter",!0),this.preparePipeMeta(n.UpperCasePipe,"uppercase",!0),this.preparePipeMeta(n.LowerCasePipe,"lowercase",!0),this.preparePipeMeta(n.JsonPipe,"json",!1),this.preparePipeMeta(n.DecimalPipe,"number",!0,[this._locale]),this.preparePipeMeta(n.TitleCasePipe,"titlecase",!0),this.preparePipeMeta(n.CurrencyPipe,"currency",!0,[this._locale]),this.preparePipeMeta(n.DatePipe,"date",!0,[this._locale]),this.preparePipeMeta(d.ToDatePipe,"toDate",!0,[new n.DatePipe(this._locale),void 0,this.injector.get(a.App),this.injector.get(a.CustomPipeManager)]),this.preparePipeMeta(d.ToNumberPipe,"toNumber",!0,[new n.DecimalPipe(this._locale),this.i18service]),this.preparePipeMeta(d.ToCurrencyPipe,"toCurrency",!0,[new n.DecimalPipe(this._locale),this.i18service]),this.preparePipeMeta(d.PrefixPipe,"prefix",!0),this.preparePipeMeta(d.SuffixPipe,"suffix",!0),this.preparePipeMeta(d.TimeFromNowPipe,"timeFromNow",!0),this.preparePipeMeta(d.NumberToStringPipe,"numberToString",!0,[new n.DecimalPipe(this._locale)]),this.preparePipeMeta(d.StringToNumberPipe,"stringToNumber",!0),this.preparePipeMeta(d.CustomPipe,"custom",!0,[this.injector.get(a.App),this.injector.get(a.CustomPipeManager)]),this.preparePipeMeta(d.TrustAsPipe,"trustAs",!0,[this.domSanitizer]),this.preparePipeMeta(d.SanitizePipe,"sanitize",!0,[this.domSanitizer]),this.preparePipeMeta(d.TemplateReplacePipe,"templateReplace",!0)]}unknownPipe(e){throw Error(`The pipe '${e}' could not be found`)}constructor(e,t,i,n){this.compiler=e,this.injector=t,this.domSanitizer=i,this.i18service=n,this._locale=a.getSessionStorageItem("selectedLocale")||"en",this.preparePipeMeta=(e,t,i,n=[])=>({type:{reference:e,diDeps:n},name:t,pure:i}),this._pipeData=[],this._pipeMeta=new Map,this.setPipeData(),this._pipeData.forEach(e=>{this._pipeMeta.set(e.name,e)}),this.formatsByLocale=this.i18service?this.i18service.getwidgetLocale():{}}meta(e){const t=this._pipeMeta.get(e);return t||this.unknownPipe(e),t}getPipeNameVsIsPureMap(){const e=new Map;return this._pipeMeta.forEach((t,i)=>{e.set(i,t.pure)}),e}resolveDep(e){return this.injector.get(e.token.identifier.reference)}getInstance(e){const{type:{reference:t,diDeps:i}}=this.meta(e);if(t||this.unknownPipe(e),i.length){const e=[];for(const t of i)e.push(t);return new t(...e)}return new t}static{this.\u0275fac=at.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:mi,deps:[{token:at.Compiler},{token:at.Injector},{token:dt.DomSanitizer},{token:rt.AbstractI18nService}],target:at.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=at.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:mi,providedIn:"root"})}}at.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:mi,decorators:[{type:t.Injectable,args:[{providedIn:"root"}]}],ctorParameters:()=>[{type:at.Compiler},{type:at.Injector},{type:dt.DomSanitizer},{type:rt.AbstractI18nService}]});class hi{constructor(e,t){this.pipeProvider=e,this.$app=t,this.supportedPipes=["toDate","toCurrency","prefix","suffix","numberToString","stringToNumber","timeFromNow","trustAs","sanitize"],a.setPipeProvider(e),this.$app.isApplicationType&&this.supportedPipes.push("custom")}getPipe(e){if(this.supportedPipes.includes(e))return this.pipeProvider.getInstance(e);throw Error(`The pipe '${e}' could not be found`)}static{this.\u0275fac=at.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:hi,deps:[{token:mi},{token:rt.App}],target:at.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=at.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:hi,providedIn:"root"})}}at.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:hi,decorators:[{type:t.Injectable,args:[{providedIn:"root"}]}],ctorParameters:()=>[{type:mi},{type:rt.App}]});const ui=ut.default||window.moment,gi={DialogService:a.AbstractDialogService,i18nService:a.AbstractI18nService,PipeService:hi,statePersistence:a.StatePersistence,SpinnerService:a.AbstractSpinnerService,StatePersistenceService:a.StatePersistence,Viewport:a.Viewport,ToasterService:a.AbstractToasterService,Utils:a.UtilsService,CONSTANTS:a.ConstantService,FIELD_TYPE:a.FieldTypeService,FIELD_WIDGET:a.FieldWidgetService,DynamicComponentService:a.DynamicComponentRefProvider},vi=(...e)=>{},fi=function(){const e=this.httpService,t=function(t,i){const n=Array.from(arguments).slice(1);return Promise.resolve(e[t].apply(e,n))},i=function(){return t.apply(void 0,["send",...Array.from(arguments)])};return["get","post","head","put","delete","jsonp","patch"].forEach(e=>i[e]=t.bind(void 0,e)),i};class bi{reload(){window.location.reload()}constructor(e,t,i,n,s,o){this.inj=e,this.i18nService=t,this.statePersistence=i,this.httpService=n,this.securityService=s,this.routeReuseStrategy=o,this.Variables={},this.Actions={},this.onAppVariablesReady=vi,this.onBeforeAppReady=vi,this.onSessionTimeout=vi,this.onPageReady=vi,this.onBeforePageLeave=vi,this.onBeforeServiceCall=vi,this.onServiceSuccess=vi,this.onServiceError=vi,this.dynamicComponentContainerRef={},this.changeLocale=this.i18nService.setSelectedLocale.bind(this.i18nService),this.getSelectedLocale=this.i18nService.getSelectedLocale.bind(this.i18nService),this.setTimezone=this.i18nService.setTimezone.bind(this.i18nService),this.setwidgetLocale=this.i18nService.setwidgetLocale.bind(this.i18nService),this._eventNotifier=new a.EventNotifier,this.landingPageName=a.getWmProjectProperties().homePage;const r=a.getWmProjectProperties();this.projectName=r.name,this.isPrefabType="PREFAB"===r.type,this.isApplicationType="APPLICATION"===r.type,this.isTemplateBundleType="TEMPLATEBUNDLE"===r.type,this.targetPlatform=r.platformType,this.isPrism="PRISM"===r.template,this.sessionTimeoutUnsubscribe=this.httpService.registerOnSessionTimeout(this.on401.bind(this)),this.appLocale=this.i18nService.getAppLocale(),this.httpService.setLocale(this.appLocale)}clearPageCache(t){this.routeReuseStrategy instanceof e.WmDefaultRouteReuseStrategy&&this.routeReuseStrategy.reset(t)}notify(e,...t){this._eventNotifier.notify.apply(this._eventNotifier,arguments)}importModule(e){return"moment"===e?ui:"moment-tz-data"===e?this.i18nService.setTimezoneEarly():void 0}getDependency(e){if(r.isString(e)){if("HttpService"===e)return fi.call(this);let t=gi[e]&&this.inj.get(gi[e]);if(!t&&this.inj.records?.values){const t=this.inj.records.values();let i=t?.next();for(;i&&!i.done;){if(i?.value?.value?.constructor?.SERVICE_NAME===e)return i.value.value;i=t.next()}}return t}return this.inj.get(e)}on401(){const e=r.get(this.securityService.get(),"userInfo");r.isEmpty(e)||this.onSessionTimeout()}subscribe(e,t){return this._eventNotifier.subscribe(e,t)}notifyApp(e,t,i){const n=r.get(this,"Actions.appNotification"),s=-1!==["PROCESS_REJECTED_IN_QUEUE"].indexOf(e);if(n){if(s)return void console.warn("App Error",e);t=t||"success",e=n.getMessage()||e,n.invoke({message:e,title:a.isDefined(i)?i:t.toUpperCase(),class:t,duration:"ERROR"===t.toUpperCase()?0:void 0})}else console.warn('The default Action "appNotification" doesn\'t exist in the app. App notified following error:\n',e)}registerExpressions(e){r.each(e,(e,t)=>{a.registerFnByExpr(t,e[0],e[1])})}hasOwnObjectProperty(e,t){return!(!e||"object"!=typeof e)&&Object.prototype.hasOwnProperty.call(e,t)}setMode(e,t=!1){const i=document.getElementsByTagName("html")[0];if(!i)return;r.isObject(e)||(e={});const n=Object.entries(e);n.length&&(n.forEach(([e,t])=>{t===o.MODE_CONSTANTS.LIGHT||t===o.MODE_CONSTANTS.DEFAULT?i.removeAttribute(e):i.setAttribute(e,t)}),t&&localStorage.setItem("wm-app-modes",JSON.stringify(e)))}ngOnDestroy(){this._eventNotifier&&(this._eventNotifier.destroy(),this._eventNotifier=null),this.sessionTimeoutUnsubscribe&&(this.sessionTimeoutUnsubscribe(),this.sessionTimeoutUnsubscribe=null),this.Variables=null,this.Actions=null,this.appLocale=null,this.modes=null,this.dynamicComponentContainerRef=null}static{this.\u0275fac=at.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:bi,deps:[{token:at.Injector},{token:rt.AbstractI18nService},{token:rt.StatePersistence},{token:rt.AbstractHttpService},{token:lt.SecurityService},{token:st.RouteReuseStrategy}],target:at.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=at.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:bi})}}at.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:bi,decorators:[{type:t.Injectable}],ctorParameters:()=>[{type:at.Injector},{type:rt.AbstractI18nService},{type:rt.StatePersistence},{type:rt.AbstractHttpService},{type:lt.SecurityService},{type:st.RouteReuseStrategy}]});class yi extends a.AbstractToasterService{constructor(e){super(),this.toaster=e}_showToaster(e,t,i,n){if(r.isNumber(n)&&(n={timeOut:n}),(n=n||{}).timeOut=a.isDefined(n.timeOut)?n.timeOut:0,n.enableHtml=a.isDefined(n.enableHtml),n.positionClass=n.positionClass||"toast-bottom-right",n.toastClass="toast",t||i){!n.bodyOutputType&&r.isObject(i)&&(i=JSON.stringify(i));const a=this.toaster[e];if(a)return a.call(this.toaster,i,t,n)}}success(e,t){return this._showToaster("success",e,t,{timeOut:5e3})}error(e,t){return this._showToaster("error",e,t,{timeOut:0})}info(e,t){return this._showToaster("info",e,t,{timeOut:0})}warn(e,t){return this._showToaster("warning",e,t,{timeOut:0})}show(e,t,i,n){return this._showToaster(e,t,i,n)}hide(e){e?this.toaster.clear(e.toastId):this.toaster.clear()}showCustom(e,t){if(e)return(t=t||{}).toastComponent=di,t.toastClass="custom-toaster",t.timeOut=a.isDefined(t.timeOut)?t.timeOut:0,t.enableHtml=a.isDefined(t.enableHtml),t.positionClass=t.positionClass||"toast-bottom-right",t.toastClass="toast",this.toaster.show(e,"",t)}setToasterConfig(e){r.isObject(e)?r.merge(this.toaster.toastrConfig,e):console.warn("Please pass a valid options object, For Example : {maxOpened: 1, autoDismiss: true}")}static{this.\u0275fac=at.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:yi,deps:[{token:mt.ToastrService}],target:at.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=at.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:yi})}}at.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:yi,decorators:[{type:t.Injectable}],ctorParameters:()=>[{type:mt.ToastrService}]});const wi=ut.default||window.moment,Pi=["ar","ar-001","ar-ae","ar-bh","ar-dz","ar-eg","ar-iq","ar-jo","ar-kw","ar-lb","ar-ly","ar-ma","ar-om","ar-qa","ar-sa","ar-sd","ar-sy","ar-tn","ar-ye","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","pnb","ps","sd","ug","ur","yi"];class Ci extends a.AbstractI18nService{get app(){return this.inj.get(a.App)}constructor(e,t,i,n){super(),this.$http=e,this.bsLocaleService=t,this.appDefaults=i,this.inj=n,this.defaultSupportedLocale="en",this._isAngularLocaleLoaded=!1,this.formatsByLocale={timezone:"",number:""},this.bundleLoaded={},this.appLocale={},this.prefabLocale=new Map}updateLocaleDirection(){let e="ltr";Pi.includes(this.selectedLocale)&&(e="rtl"),a.setCSS(document.body,"direction",e)}init(){this.messages={},Object.setPrototypeOf(this.appLocale,this.messages)}getSelectedLocale(){return this.selectedLocale}getDefaultSupportedLocale(){return this.defaultSupportedLocale}getAppLocale(){return this.appLocale}getPrefabLocaleBundle(e){return this.prefabLocale.has(e)||this.prefabLocale.set(e,Object.create(this.appLocale)),this.prefabLocale.get(e)}extendPrefabMessages(e){e.prefabMessages&&Object.keys(e.prefabMessages).forEach(t=>{let i=this.prefabLocale.get(t);i||(i=Object.create(this.appLocale),this.prefabLocale.set(t,i)),Object.assign(i,e.prefabMessages[t])})}extendMessages(e){Object.assign(this.messages,e)}loadResource(e){return this.$http.get(e).toPromise().catch(()=>{console.warn(`error loading locale resource from ${e}`),Promise.resolve({})})}loadAppLocaleBundle(){const e=a._WM_APP_PROJECT.isPreview||"DYNAMIC"===_WM_APP_PROPERTIES?.languageBundleSources?"":a._WM_APP_PROJECT.cdnUrl;return this.loadResource(e+`resources/i18n/${this.selectedLocale}.json`).then(e=>{this.extendMessages(e.messages),this.extendPrefabMessages(e),this.appDefaults.setFormats(e.formats),this.bundleLoaded.app=!0,this.notifyLocaleChanged()})}loadMomentLocaleBundle(e){if(this.selectedLocale!==this.defaultSupportedLocale)if(a._WM_APP_PROJECT.isPreview){const t=`${a._WM_APP_PROJECT.cdnUrl}locales/moment/${e}.js`;a.loadScripts([t],!0).then(()=>{this.loadScriptForMoment(e)})}else this.loadScriptForMoment(e);else wi.locale(this.defaultSupportedLocale)}loadScriptForMoment(e){wi.locale(this.selectedLocale);let t=wi.localeData(e);t=t&&t._config,I.defineLocale(this.selectedLocale,t),this.bsLocaleService.use(this.getSelectedLocale()||this.defaultSupportedLocale),this.bundleLoaded.moment=!0,this.notifyLocaleChanged()}loadAngularLocaleBundle(e){return new Promise(t=>{const i=a._WM_APP_PROJECT.cdnUrl||a._WM_APP_PROJECT.ngDest;if(this.selectedLocale===this.defaultSupportedLocale)return void t();const n=i+`locales/angular/global/${e}.js`;a.loadScripts([n],!0).then(()=>{this._isAngularLocaleLoaded=!0,t()},t)})}loadMomentTimeZoneBundle(){const e=a._WM_APP_PROJECT.cdnUrl||a._WM_APP_PROJECT.ngDest;window.moment=wi;const t=e+"locales/moment-timezone/moment-timezone-with-data.js";return a.loadScripts([t],!0)}loadLocaleBundles(e){e.moment?this.loadMomentLocaleBundle(e.moment):this.selectedLocale===this.defaultSupportedLocale&&(this.bsLocaleService.use(this.getSelectedLocale()||this.defaultSupportedLocale),this.bundleLoaded.moment=!0),e.fullCalendar&&window.FullCalendar?(this.bundleLoaded.fullCalendar=!0,this.notifyLocaleChanged()):this.bundleLoaded.fullCalendar=!0;const t=[this.loadAngularLocaleBundle(e.angular)];return e.angular&&t.push(this.loadAppLocaleBundle()),Promise.all(t)}setTimezone(e,t){new Promise(i=>{this.loadMomentTimeZoneBundle().then(()=>{let n=e;const a=(e=n.timezone).indexOf("+");a>-1&&(a>0&&(e=e.substr(a)),n.timezone=r.find(wi.tz.names(),t=>e===wi.tz(t).format("Z"))),wi.tz.setDefault(e);const s=t&&t.formatsByLocale?t.formatsByLocale:this.formatsByLocale;Object.assign(s,n),i()},i)})}setTimezoneEarly(){return this.loadMomentTimeZoneBundle()}getTimezone(e){const t=r.get(this.app,"activePage.formatsByLocale.timezone"),i=r.get(e,"formatsByLocale.timezone");return i||(t||this.formatsByLocale.timezone)}getFormatsByLocale(){return this.formatsByLocale}setSelectedLocale(e){r.isObject(e)&&(e=e.datavalue);const t=a.getWmProjectProperties().supportedLanguages[e],i=Object.keys(a.getWmProjectProperties().supportedLanguages);return r.includes(i,e)&&e&&e!==this.selectedLocale?(a.setSessionStorageItem("selectedLocale",e),this.selectedLocale=e,this.init(),this.bundleLoaded.moment=!1,this.bundleLoaded.fullCalendar=!1,this.bundleLoaded.app=!1,this.bundleLoaded.angular=!1,this.bundleLoaded.libLocale=t,this.loadLocaleBundles(t).then(()=>{this.updateLocaleDirection(),this.bundleLoaded.angular=!0,this.notifyLocaleChanged()})):Promise.resolve()}deduceAppLocale(){const e=this.getAcceptedLanguages(),t=a.getWmProjectProperties().defaultLanguage;e.push(t);let i=a.getWmProjectProperties().preferBrowserLang;i=!i||("true"===i||!0===i);let n=Object.keys(a.getWmProjectProperties().supportedLanguages)||[this.defaultSupportedLocale],s=i?void 0:t;const o=a.getSessionStorageItem("selectedLocale")||s||r.intersection(e,n)[0]||this.defaultSupportedLocale;n=n||[o];return o||n[0]}loadDefaultLocale(){Date.prototype.month=Date.prototype.getMonth;const e=this.deduceAppLocale();return this.setSelectedLocale(e)}getLocalizedMessage(e,...t){return a.replace(this.appLocale[e],t)}getAcceptedLanguages(){let e;return e=decodeURIComponent(a.getWmProjectProperties().preferredLanguage||""),e=e.split(",").map(function(e){return e.split(";")[0]}),r.map(e,r.toLower)}initCalendarLocale(){return Promise.resolve()}isAngularLocaleLoaded(){return this._isAngularLocaleLoaded}setwidgetLocale(e){this.formatsByLocale.number=e.number}getwidgetLocale(){return this.formatsByLocale}notifyLocaleChanged(){this.bundleLoaded.moment&&this.bundleLoaded.fullCalendar&&this.bundleLoaded.angular&&this.bundleLoaded.app&&this.app.notify("locale-changed",this.bundleLoaded.libLocale)}static{this.\u0275fac=at.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Ci,deps:[{token:pt.HttpClient},{token:gt.BsLocaleService},{token:rt.AppDefaults},{token:at.Injector}],target:at.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=at.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Ci})}}at.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Ci,decorators:[{type:t.Injectable}],ctorParameters:()=>[{type:pt.HttpClient},{type:gt.BsLocaleService},{type:rt.AppDefaults},{type:at.Injector}]});class Ti extends a.AbstractSpinnerService{constructor(){super(),this.spinnerId=0,this.messageSource=new c.Subject,this.messagesByContext={}}getMessageSource(){return this.messageSource}showContextSpinner(e,t,i){const n=$('[name="'+e+'"]');if(this.messagesByContext[e]=this.messagesByContext[e]||{},0!==Object.keys(this.messagesByContext[e]).length)this.messagesByContext[e][i]=t,this.messagesByContext[e].finalMessage=this.messagesByContext[e].finalMessage+" "+this.messagesByContext[e][i],n.find(".spinner-messages-container").html(this.messagesByContext[e].finalMessage);else{const a=$('<div class="app-spinner">\n <div class="spinner-message" aria-label="loading gif">\n <i class="spinner-image animated infinite fa fa-circle-o-notch fa-spin"></i>\n <div class="spinner-messages">\n <p class="spinner-messages-container"></p>\n </div>\n </div>\n </div>');this.messagesByContext[e][i]=t,this.messagesByContext[e].finalMessage=this.messagesByContext[e][i],a.find(".spinner-messages-container").html(this.messagesByContext[e].finalMessage),n.prepend(a)}return i}showAppSpinner(e,t){const i="page";this.messagesByContext[i]=this.messagesByContext[i]||{},this.messagesByContext[i][t]=e,this.messageSource.next({show:!0,message:e,messages:r.values(this.messagesByContext[i])})}hideContextSpinner(e,t){delete this.messagesByContext[e][t],1===Object.keys(this.messagesByContext[e]).length&&(this.messagesByContext[e]={});$('[name="'+e+'"]').find(".app-spinner").remove()}show(e,t,i,n,a){return t=t||++this.spinnerId,n&&"page"!==n?this.showContextSpinner(n,e,t):(this.showAppSpinner(e,t),t)}hide(e){const t=r.findKey(this.messagesByContext,function(t){return r.includes(r.keys(t),e)})||"page";if("page"===t)if(e){delete this.messagesByContext[t][e];const i=r.values(this.messagesByContext[t]);this.messageSource.next({show:!!i.length,messages:r.values(this.messagesByContext[t])})}else this.messagesByContext[t]={};else this.hideContextSpinner(t,e)}ngOnDestroy(){this.messageSource&&(this.messageSource.complete(),this.messageSource=null),this.messagesByContext&&(Object.keys(this.messagesByContext).forEach(e=>{delete this.messagesByContext[e]}),this.messagesByContext=null)}static{this.\u0275fac=at.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Ti,deps:[],target:at.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=at.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Ti})}}at.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Ti,decorators:[{type:t.Injectable}],ctorParameters:()=>[]});const Oi="body >app-root";class Ii{constructor(e,t,n){this.app=e,this.router=t,this.zone=n,this.history=new Ei,this.isPageAddedToHistory=!1,this.router.events.subscribe(e=>{if(e instanceof i.NavigationStart){const t=e.url,i={};let n;this.isPageAddedToHistory||(this.isPageAddedToHistory=!1,t.indexOf("?")>0?(t.substr(t.indexOf("?")+1).split("&").forEach(e=>{const t=e.split("=");i[t[0]]=t[1]}),n=t.substr(0,t.indexOf("?"))):n=t,"/"===n[0]&&(n=n.substr(1)),n&&(delete i.name,this.history.push(new Di(n,i,this.transition))))}})}getPageTransition(){return r.isEmpty(this.transition)||r.isEqual("none",this.transition)?null:this.transition}goToPage(e,t){this.transition=t.transition||"",this.history.getCurrentPage()&&(this.isPageAddedToHistory=!0),this.history.push(new Di(e,t.urlParams,this.transition)),this.zone.run(()=>this.router.navigate([`/${e}`],{queryParams:t.urlParams}))}goToPrevious(){this.history.getPagesCount()&&(this.transition=this.history.getCurrentPage().transition,r.isEmpty(this.transition)||(this.transition+="-exit"),this.history.pop(),this.isPageAddedToHistory=!0,window.history.back())}goToView(e,t,i){const n=(t=t||{}).pageName,a=t.transition||"",s=t.$event,r=this.app.activePage,l=i&&i._context&&i._context.prefabName;if(this.app.isPrefabType)this.goToElementView($(Oi).find('[name="'+e+'"]'),e,n,i);else if(n===r.activePageName||l)l&&this.isPrefabWithNameExists(l)?this.goToElementView($('[prefabName="'+l+'"]').find('[name="'+e+'"]'),e,n,i):n&&n!==r.activePageName?this.app.notifyApp(o.CONSTANTS.WIDGET_DOESNT_EXIST,"error"):this.goToElementView($(Oi).find('[name="'+e+'"]'),e,n,i);else if(this.isPartialWithNameExists(n))this.goToElementView($('[partialcontainer][content="'+n+'"]').find('[name="'+e+'"]'),e,n,i);else{this.goToPage(n,{viewName:e,$event:s,transition:a,urlParams:t.urlParams});const o=this.app.subscribe("pageReady",t=>{this.goToElementView($(Oi).find('[name="'+e+'"]'),e,n,i),o()})}}goToElementView(e,t,i,n){let a,s;const o=this.app.activePage;if(e.length)switch(this.app.isPrefabType||i!==o.activePageName||(e=this.getViewElementInActivePage(e)),a=e[0].widget,a.widgetType){case"wm-accordionpane":this.showAncestors(e,n),a.expand();break;case"wm-tabpane":this.showAncestors(e,n),a.select();break;case"wm-segment-content":this.showAncestors(e,n),a.navigate();break;case"wm-panel":a.expanded=!0}else s=this.showAncestorDialog(t),setTimeout(()=>{s&&this.goToElementView($('[name="'+t+'"]'),t,i,n)})}getViewElementInActivePage(e){let t;return e.length>1&&(t=r.filter(e,e=>{if(r.isEmpty($(e).closest('[data-role = "partial"]'))&&r.isEmpty($(e).closest("[wmprefabcontainer]")))return e}),t&&(e=$(t))),e}isPartialWithNameExists(e){return $('[partialcontainer][content="'+e+'"]').length}isPrefabWithNameExists(e){return $('[prefabName="'+e+'"]').length}showAncestors(e,t){e.parents('[wm-navigable-element="true"]').toArray().reverse().forEach(e=>{const t=e.widget;switch(t.widgetType){case"wm-accordionpane":t.expand();break;case"wm-tabpane":t.select();break;case"wm-segment-content":t.navigate();break;case"wm-panel":t.expanded=!0}})}showAncestorDialog(e){let t;return $("app-root [dialogtype]").each(function(){const i=$(this);if($(i.html()).find('[name="'+e+'"]').length)return t=i.attr("name"),!1}),t}static{this.\u0275fac=at.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Ii,deps:[{token:rt.App},{token:st.Router},{token:at.NgZone}],target:at.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=at.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Ii})}}at.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Ii,decorators:[{type:t.Injectable}],ctorParameters:()=>[{type:rt.App},{type:st.Router},{type:at.NgZone}]});class Di{constructor(e,t,i){this.name=e,this.urlParams=t,this.transition=i,this.transition=r.isEmpty(this.transition)?null:this.transition}isEqual(e){return e&&e.name===this.name&&r.isEqual(e.urlParams,this.urlParams)}}class Ei{constructor(){this.stack=[]}getCurrentPage(){return this.currentPage}getPagesCount(){return this.stack.length}isLastVisitedPage(e){return this.getLastPage().isEqual(e)}push(e){this.currentPage&&this.stack.push(this.currentPage),this.currentPage=e}pop(){return this.currentPage=this.stack.pop(),this.currentPage}getLastPage(){return this.stack.length>0?this.stack[this.stack.length-1]:void 0}}class Ri{constructor(){}setFormats(e){const t=e.date,i=e.time,n=t&&i?t+" "+i:void 0,a=e.currency;this.dateFormat=t,this.timeFormat=i,this.dateTimeFormat=n,this.currencyCode=a}static{this.\u0275fac=at.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Ri,deps:[],target:at.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=at.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Ri})}}at.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Ri,decorators:[{type:t.Injectable}],ctorParameters:()=>[]});let Si=!1;class _i{constructor(e,t){this.securityService=e,this.appManager=t}loadSecurityConfig(){return Si?Promise.resolve(!0):this.appManager.loadSecurityConfig().then(()=>Si=!0)}isAuthenticated(){return this.loadSecurityConfig().then(()=>new Promise((e,t)=>{this.securityService.isAuthenticated(e,t)}))}canActivate(e){return this.isAuthenticated().then(t=>t?Promise.resolve(!0):(this.appManager.handle401(e.routeConfig.path,{queryParams:e.queryParams}),Promise.resolve(!1)))}static{this.\u0275fac=at.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:_i,deps:[{token:lt.SecurityService},{token:Ct}],target:at.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=at.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:_i})}}at.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:_i,decorators:[{type:t.Injectable}],ctorParameters:()=>[{type:lt.SecurityService},{type:Ct}]});class xi{constructor(e,t,i,n,a){this.securityService=e,this.authGuard=t,this.toasterService=i,this.app=n,this.appManager=a}canActivate(e){const t=e.data.allowedRoles;return this.authGuard.isAuthenticated().then(i=>{if(i){const e=this.securityService.get().userInfo.userRoles;return r.intersection(t,e).length>0?Promise.resolve(!0):(this.appManager.notifyApp(this.app.appLocale.LABEL_ACCESS_DENIED||"Access Denied","error"),Promise.resolve(!1))}return this.appManager.handle401(e.routeConfig.path,{queryParams:e.queryParams}),Promise.resolve(!1)})}static{this.\u0275fac=at.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:xi,deps:[{token:lt.SecurityService},{token:_i},{token:rt.AbstractToasterService},{token:rt.App},{token:Ct}],target:at.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=at.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:xi})}}at.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:xi,decorators:[{type:t.Injectable}],ctorParameters:()=>[{type:lt.SecurityService},{type:_i},{type:rt.AbstractToasterService},{type:rt.App},{type:Ct}]});class Ai{constructor(e,t){this.app=e,this.appManager=t}canActivate(e){return this.appManager.notifyApp(this.app.appLocale.MESSAGE_PAGE_NOT_FOUND||"The page you are trying to reach is not available","error"),Promise.resolve(!1)}static{this.\u0275fac=at.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Ai,deps:[{token:rt.App},{token:Ct}],target:at.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=at.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Ai})}}at.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Ai,decorators:[{type:t.Injectable}],ctorParameters:()=>[{type:rt.App},{type:Ct}]});let ki=!1;class Ni{constructor(e,t,i,n){this.inj=e,this.app=t,this.utilService=i,this.appJsProvider=n,this.appManager=this.inj.get(Ct)}async resolve(){if(ki)return!0;try{(await this.appJsProvider.getAppScriptFn())(this.app,this.utilService,this.inj)}catch(e){console.warn("Error in executing app.js",e)}return ki=!0,!0}static{this.\u0275fac=at.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Ni,deps:[{token:at.Injector},{token:rt.App},{token:rt.UtilsService},{token:yt}],target:at.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=at.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Ni})}}at.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Ni,decorators:[{type:t.Injectable}],ctorParameters:()=>[{type:at.Injector},{type:rt.App},{type:rt.UtilsService},{type:yt}]});let Mi=!1;class Li{constructor(e,t,i){this.appManager=e,this.appJsProvider=t,this.customPipeManager=i}resolve(){return!(!this.appManager.isPrefabType()&&!this.appManager.isTemplateBundleType())||(Mi||(this.appJsProvider.loadFormatterConfigScript(this.loadedFormatterScript.bind(this)),Mi=!0),Mi)}loadedFormatterScript(e){try{let t=e;t||console.warn("Please return valid formatter object");for(let e in t)this.customPipeManager.setCustomPipe(e,t[e])}catch(e){console.warn("Error in reading formatters.js",e)}}static{this.\u0275fac=at.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Li,deps:[{token:Ct},{token:Pt},{token:rt.CustomPipeManager}],target:at.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=at.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Li})}}at.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Li,decorators:[{type:t.Injectable}],ctorParameters:()=>[{type:Ct},{type:Pt},{type:rt.CustomPipeManager}]});class Fi{constructor(e){this.i18nService=e}resolve(){return this.i18nService.loadDefaultLocale()}static{this.\u0275fac=at.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Fi,deps:[{token:rt.AbstractI18nService}],target:at.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=at.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Fi})}}at.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Fi,decorators:[{type:t.Injectable}],ctorParameters:()=>[{type:rt.AbstractI18nService}]});class $i{constructor(e,t,n,s,o,r,l,c,d,p,m){let h;this.elRef=n,this.oAuthService=s,this.dialogService=o,this.spinnerService=r,this.router=c,this.app=d,this.appManager=p,this.customIconsLoaderService=m,this.startApp=!1,this.isApplicationType=!1,this.enableSkipToMainContent="true"===a.getWmProjectProperties().enableSkipToMainContent||!0===a.getWmProjectProperties().enableSkipToMainContent,this.retryCount=0,this.appLocale={},this.spinner={show:!1,messages:[],arialabel:""},this.isOAuthDialogOpen=!1,a.setPipeProvider(e),a.setNgZone(l),a.setAppRef(t),this.appLocale=d.appLocale,this.isApplicationType="APPLICATION"===a.getWmProjectProperties().type,this.isApplicationType&&this.customIconsLoaderService.load(),s.getOAuthProvidersAsObservable().subscribe(e=>{this.providersConfig=e,e.length?this.showOAuthDialog():this.closeOAuthDialog()}),this.spinnerService.getMessageSource().asObservable().subscribe(e=>{setTimeout(()=>{this.spinner.show=e.show,this.spinner.messages=e.messages,this.spinner.arialabel=e.messages.toString()})}),R.setTheme("bs5");let u=a.noop;this.router.events.subscribe(e=>{if(e instanceof i.NavigationStart){let t=e.url.split("?")[0];t=t.substring(1),t||(this.app.activeLayoutName="",this.app.layoutPages=[]),h=this.app.activeLayoutName&&this.app.layoutPages&&this.app.layoutPages.length&&this.app.layoutPages.includes(t)?this.spinnerService.show("","wmRouterOutlet","","wmRouterOutlet"):this.spinnerService.show("","globalSpinner");const i=document.querySelector("app-page-outlet");i&&a.addClass(i,"page-load-in-progress");const n=Date.now();u=()=>{this.spinnerService.hide(h);const e=document.querySelector("app-page-outlet");e&&a.removeClass(e,"page-load-in-progress"),u=a.noop,this.app.activePageLoadTime=Date.now()-n}}else(e instanceof i.NavigationEnd||e instanceof i.NavigationCancel||e instanceof i.NavigationError)&&setTimeout(()=>{u()},1e3)}),this.appManager.subscribe("pageReady",()=>{u()}),this.appManager.subscribe("pageAttach",()=>{u()})}showOAuthDialog(){this.isOAuthDialogOpen||(this.isOAuthDialogOpen=!0,this.dialogService.open("oAuthLoginDialog",this))}closeOAuthDialog(){this.isOAuthDialogOpen&&(this.isOAuthDialogOpen=!1,this.dialogService.close("oAuthLoginDialog",this))}start(){setTimeout(()=>{this.startApp=!0}),setTimeout(()=>{this.app.dynamicComponentContainerRef=this.dynamicComponentContainerRef,this.overrideRouterOutlet()},10)}overrideRouterOutlet(){const e=this.routerOutlet.attach,t=this.routerOutlet.detach;this.routerOutlet.attach=(t,i)=>{e.call(this.routerOutlet,t,i),t.instance.ngOnAttach()},this.routerOutlet.detach=()=>{this.app.activePage.ngOnDetach();return t.call(this.routerOutlet)}}skipToAppContent(e){e.preventDefault(),this.retryCount=0,this.tryFocusContent()}tryFocusContent(){const e=document.querySelector(".app-page-content");e?(e.setAttribute("tabindex","-1"),e.focus({preventScroll:!1}),e.scrollIntoView({behavior:"smooth"})):this.retryCount<10&&(this.retryCount++,setTimeout(()=>this.tryFocusContent(),100))}ngAfterViewInit(){document.documentElement.setAttribute("lang",a.getWmProjectProperties().defaultLanguage),this.start(),this.enableSkipToMainContent&&(this.navigationEndSubscription=this.router.events.pipe(S.filter(e=>e instanceof i.NavigationEnd)).subscribe(()=>{const e=document.getElementById("app-focus-start");e&&e.focus()}))}ngDoCheck(){a.$invokeWatchers()}ngOnDestroy(){this.navigationEndSubscription&&this.navigationEndSubscription.unsubscribe()}static{this.\u0275fac=at.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:$i,deps:[{token:mi},{token:at.ApplicationRef},{token:at.ElementRef},{token:ht.OAuthService},{token:rt.AbstractDialogService},{token:rt.AbstractSpinnerService},{token:at.NgZone},{token:st.Router},{token:rt.App},{token:Ct},{token:rt.CustomIconsLoaderService}],target:at.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=at.\u0275\u0275ngDeclareComponent({minVersion:"17.0.0",version:"20.3.19",type:$i,isStandalone:!0,selector:"app-root",viewQueries:[{propertyName:"routerOutlet",first:!0,predicate:i.RouterOutlet,descendants:!0},{propertyName:"dynamicComponentContainerRef",first:!0,predicate:["dynamicComponent"],descendants:!0,read:t.ViewContainerRef}],ngImport:at,template:'@if (startApp) {\n @if(enableSkipToMainContent) {\n <div id="app-focus-start" tabindex="-1"></div>\n <a href="javascript:void(0);" class="skip" (click)="skipToAppContent($event)">{{appLocale.LABEL_SKIP_TO_MAIN_CONTENT || \'Skip to main content\'}}</a>\n }\n <router-outlet></router-outlet>\n @if (isApplicationType) {\n <div wmContainer partialContainer content="Common" hidden class="ng-hide"></div>\n }\n <app-spinner name="globalspinner" classname="global-spinner" role="alert" aria-live="assertive" [attr.aria-label]="spinner.arialabel || \'Loading\'" [show]="spinner.show" [spinnermessages]="spinner.messages"></app-spinner>\n <div wmDialog name="oAuthLoginDialog" title="Application is requesting you to sign in with"\n close.event="closeOAuthDialog()">\n <ng-template #dialogBody>\n <ul class="list-items">\n @for (provider of providersConfig; track provider) {\n <li class="list-item">\n <button class="btn" (click)="provider.invoke()">{{provider.name}}</button>\n </li>\n }\n </ul>\n </ng-template>\n </div>\n <div wmConfirmDialog name="_app-confirm-dialog" title.bind="title" message.bind="message" oktext.bind="oktext"\n canceltext.bind="canceltext" closable="false" iconclass.bind="iconclass"\n escape.event="onEscape()" ok.event="onOk()" cancel.event="onCancel()" close.event="onClose()" opened.event="onOpen()"></div>\n @if (!isApplicationType) {\n <div wmConfirmDialog name="PrefabConfirmDialog" title.bind="title" message.bind="text" oktext.bind="okButtonText"\n canceltext.bind="cancelButtonText" closable="false" iconclass.bind="iconclass"\n escape.event="onEscape()" ok.event="onOk()" cancel.event="onCancel()" close.event="onClose()" opened.event="onOpen()"></div>\n }\n @if (!isApplicationType) {\n <div wmAlertDialog name="PrefabAlertDialog" title.bind="title" message.bind="text" oktext.bind="okButtonText"\n canceltext.bind="cancelButtonText" closable="false" iconclass.bind="iconclass"\n escape.event="onEscape()" ok.event="onOk()" cancel.event="onCancel()" close.event="onClose()" opened.event="onOpen()"></div>\n }\n <div wmAppExt></div>\n <i id="wm-mobile-display"></i>\n}\n\x3c!--Dummy container to create the component dynamically--\x3e\n<ng-container #dynamicComponent></ng-container>\n',dependencies:[{kind:"ngmodule",type:n.CommonModule},{kind:"directive",type:i.RouterOutlet,selector:"router-outlet",inputs:["name","routerOutletData"],outputs:["activate","deactivate","attach","detach"],exportAs:["outlet"]},{kind:"component",type:E.AlertDialogComponent,selector:"div[wmAlertDialog]"},{kind:"component",type:w.ConfirmDialogComponent,selector:"div[wmConfirmDialog]"},{kind:"component",type:P.DialogComponent,selector:"div[wmDialog]"},{kind:"component",type:ci,selector:"app-spinner",inputs:["show","spinnermessages","classname","arialabel"]},{kind:"directive",type:d.ContainerDirective,selector:"[wmContainer]"},{kind:"directive",type:d.PartialParamHandlerDirective,selector:"[partialContainer]"},{kind:"directive",type:d.PartialContainerDirective,selector:"[partialContainer]"}],encapsulation:at.ViewEncapsulation.None})}}at.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:$i,decorators:[{type:t.Component,args:[{standalone:!0,imports:[n.CommonModule,i.RouterOutlet,E.AlertDialogComponent,w.ConfirmDialogComponent,P.DialogComponent,ci,d.ContainerDirective,d.PartialParamHandlerDirective,d.PartialContainerDirective],selector:"app-root",encapsulation:t.ViewEncapsulation.None,template:'@if (startApp) {\n @if(enableSkipToMainContent) {\n <div id="app-focus-start" tabindex="-1"></div>\n <a href="javascript:void(0);" class="skip" (click)="skipToAppContent($event)">{{appLocale.LABEL_SKIP_TO_MAIN_CONTENT || \'Skip to main content\'}}</a>\n }\n <router-outlet></router-outlet>\n @if (isApplicationType) {\n <div wmContainer partialContainer content="Common" hidden class="ng-hide"></div>\n }\n <app-spinner name="globalspinner" classname="global-spinner" role="alert" aria-live="assertive" [attr.aria-label]="spinner.arialabel || \'Loading\'" [show]="spinner.show" [spinnermessages]="spinner.messages"></app-spinner>\n <div wmDialog name="oAuthLoginDialog" title="Application is requesting you to sign in with"\n close.event="closeOAuthDialog()">\n <ng-template #dialogBody>\n <ul class="list-items">\n @for (provider of providersConfig; track provider) {\n <li class="list-item">\n <button class="btn" (click)="provider.invoke()">{{provider.name}}</button>\n </li>\n }\n </ul>\n </ng-template>\n </div>\n <div wmConfirmDialog name="_app-confirm-dialog" title.bind="title" message.bind="message" oktext.bind="oktext"\n canceltext.bind="canceltext" closable="false" iconclass.bind="iconclass"\n escape.event="onEscape()" ok.event="onOk()" cancel.event="onCancel()" close.event="onClose()" opened.event="onOpen()"></div>\n @if (!isApplicationType) {\n <div wmConfirmDialog name="PrefabConfirmDialog" title.bind="title" message.bind="text" oktext.bind="okButtonText"\n canceltext.bind="cancelButtonText" closable="false" iconclass.bind="iconclass"\n escape.event="onEscape()" ok.event="onOk()" cancel.event="onCancel()" close.event="onClose()" opened.event="onOpen()"></div>\n }\n @if (!isApplicationType) {\n <div wmAlertDialog name="PrefabAlertDialog" title.bind="title" message.bind="text" oktext.bind="okButtonText"\n canceltext.bind="cancelButtonText" closable="false" iconclass.bind="iconclass"\n escape.event="onEscape()" ok.event="onOk()" cancel.event="onCancel()" close.event="onClose()" opened.event="onOpen()"></div>\n }\n <div wmAppExt></div>\n <i id="wm-mobile-display"></i>\n}\n\x3c!--Dummy container to create the component dynamically--\x3e\n<ng-container #dynamicComponent></ng-container>\n'}]}],ctorParameters:()=>[{type:mi},{type:at.ApplicationRef},{type:at.ElementRef},{type:ht.OAuthService},{type:rt.AbstractDialogService},{type:rt.AbstractSpinnerService},{type:at.NgZone},{type:st.Router},{type:rt.App},{type:Ct},{type:rt.CustomIconsLoaderService}],propDecorators:{routerOutlet:[{type:t.ViewChild,args:[i.RouterOutlet]}],dynamicComponentContainerRef:[{type:t.ViewChild,args:["dynamicComponent",{read:t.ViewContainerRef}]}]}});class ji{constructor(){this.wmHttpRequest=new C.WmHttpRequest,this.wmHttpResponse=new C.WmHttpResponse}createSubject(){return new c.Subject}isAbsoluteUrl(e){return/^[a-z][a-z0-9+.-]*:\/\//i.test(e)}intercept(e,t){let i,n=!1;if(this.isAbsoluteUrl(e.url)||(n=-1!==e.url.indexOf("services/")||-1!==e.url.indexOf("j_spring_security_check")||-1!==e.url.indexOf("j_spring_security_logout")||-1!==e.url.indexOf("oAuthCallback.html")||e.url.startsWith("resources/")||e.url.startsWith("prefabs/")),n){let t=a._WM_APP_PROJECT.apiUrl+e.url;e=e.clone({url:t})}return c.from(Promise.resolve().then(()=>{if(o.appManager&&o.appManager.appOnBeforeServiceCall){const t=this.wmHttpRequest.angularToWmRequest(e);return o.appManager.appOnBeforeServiceCall(t)}return null})).pipe(c.switchMap(i=>(i&&(e=this.wmHttpRequest.wmToAngularRequest(i)),t.handle(e))),S.tap(e=>{if(e&&4===e.type&&o.appManager&&o.appManager.appOnServiceSuccess){const t=this.wmHttpResponse.angularToWmResponse(e);i=o.appManager.appOnServiceSuccess(t.body,t),i&&(i=this.wmHttpResponse.wmToAngularResponse(i),r.extend(e,i))}},t=>{if(t._401Subscriber=this.createSubject(),o.httpService.isPlatformSessionTimeout(t)&&o.httpService.handleSessionTimeout(e,t._401Subscriber),o.appManager&&o.appManager.appOnServiceError){const e=this.wmHttpResponse.angularToWmResponse(t);i=o.appManager.appOnServiceError(e.message,e),i&&(i=this.wmHttpResponse.wmToAngularResponse(i),r.extend(t,i))}}))}static{this.\u0275fac=at.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:ji,deps:[],target:at.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=at.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:ji})}}at.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:ji,decorators:[{type:t.Injectable}],ctorParameters:()=>[]});class Vi{constructor(t,i,n,a,s,o,r){this.componentInstance=t,this.vcRef=i,this.elRef=n,this.prefabMngr=a,this.injector=s,this.envInjector=o,this.componentRefProvider=r;const l=this.componentInstance.prefabName;this.prefabMngr.loadDependencies(l).then(async()=>{const t=await this.componentRefProvider.getComponentFactoryRef(l,e.ComponentType.PREFAB);if(t)try{const e=this.vcRef.createComponent(t,{index:0,environmentInjector:this.envInjector,injector:this.injector});this.elRef.nativeElement.appendChild(e.location.nativeElement)}catch(e){console.error(`Error creating prefab component ${l}:`,e)}else console.error(`Failed to load prefab component: ${l}`)}).catch(e=>{console.error(`Error loading dependencies for prefab ${l}:`,e)})}ngOnDestroy(){this.vcRef&&this.vcRef.clear(),this.elRef=null}static{this.\u0275fac=at.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Vi,deps:[{token:d.WidgetRef,self:!0},{token:at.ViewContainerRef},{token:at.ElementRef},{token:_t},{token:at.Injector},{token:at.EnvironmentInjector},{token:vt}],target:at.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=at.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"20.3.19",type:Vi,isStandalone:!0,selector:"[wmPrefab][prefabname]",ngImport:at})}}at.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Vi,decorators:[{type:t.Directive,args:[{standalone:!0,selector:"[wmPrefab][prefabname]"}]}],ctorParameters:()=>[{type:void 0,decorators:[{type:t.Self},{type:t.Inject,args:[d.WidgetRef]}]},{type:at.ViewContainerRef},{type:at.ElementRef},{type:_t},{type:at.Injector},{type:at.EnvironmentInjector},{type:vt}]});const Bi="PREFAB";class Gi{constructor(e){this.prefabManager=e,this.windowMessageListener=e=>{if((e.data&&e.data.context)!==Bi)return;const t=e.data.action,i=e.data.payload;"init"===t?this.init():"set-property"===t?this.setProperty(i):"get-outbound-properties"===t?this.getOutboundProps():"invoke-script"===t&&this.invokeScript(i)},window.addEventListener("message",this.windowMessageListener)}postMessage(e,t){const i={context:Bi,action:e,payload:t};window.top.postMessage(i,"*")}setupEventListeners(){this.prefabInstance.invokeEventCallback=(e,t={})=>{this.postMessage("event-log",{name:e,data:t})}}init(){this.previewMode=!0,this.readyStateSubscription=this.prefabInstance.readyState.subscribe(()=>{},()=>{},()=>{this.prefabManager.getConfig("__self__").then(e=>{this.config=e,this.postMessage("config",e),this.setupEventListeners()})})}setProperty(e){this.prefabInstance.widget[e.name]=e.value}isOutBoundProp(e){return"out-bound"===e.bindable||"in-out-bound"===e.bindable}getOutboundProps(){const e={};for(const[t,i]of Object.entries(this.config.properties||{}))this.isOutBoundProp(i)&&(e[t]=this.prefabInstance.widget[t]);this.postMessage("outbound-properties",e)}invokeScript(e){const t=`\n return ${e.script};`,i=new Function("Prefab",t)(this.prefabInstance);this.postMessage("method-output",{methodName:e.methodName,output:i})}ngAfterViewInit(){this.setupEventListeners(),this.postMessage("init")}ngOnDestroy(){this.windowMessageListener&&(window.removeEventListener("message",this.windowMessageListener),this.windowMessageListener=null),this.readyStateSubscription&&(this.readyStateSubscription.unsubscribe(),this.readyStateSubscription=null),this.prefabInstance=null,this.config=null}static{this.\u0275fac=at.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Gi,deps:[{token:_t}],target:at.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=at.\u0275\u0275ngDeclareComponent({minVersion:"14.0.0",version:"20.3.19",type:Gi,isStandalone:!0,selector:"wm-prefab-preview",viewQueries:[{propertyName:"prefabInstance",first:!0,predicate:u.PrefabDirective,descendants:!0,static:!0}],ngImport:at,template:'\n <div class="prefab-preview row">\n <section wmPrefab name="prefab-preview" prefabname="__self__"></section>\n </div>\n ',isInline:!0,dependencies:[{kind:"directive",type:u.PrefabDirective,selector:"section[wmPrefab]"},{kind:"directive",type:Vi,selector:"[wmPrefab][prefabname]"}]})}}at.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Gi,decorators:[{type:t.Component,args:[{standalone:!0,imports:[u.PrefabDirective,Vi],selector:"wm-prefab-preview",template:'\n <div class="prefab-preview row">\n <section wmPrefab name="prefab-preview" prefabname="__self__"></section>\n </div>\n '}]}],ctorParameters:()=>[{type:_t}],propDecorators:{prefabInstance:[{type:t.ViewChild,args:[u.PrefabDirective,{static:!0}]}]}}),A.initComponentsBuildTask();const Wi=new Map,qi=e=>/^[a-zA-Z][a-zA-Z0-9-]*$/.test(e);let zi=1;const Ui=(e,i,a="")=>{if(!qi(e))throw new Error(`Invalid selector: ${e}`);if(!("string"==typeof(s=i)&&s.trim().length>0))throw new Error("Invalid markup");var s;return t.Component({template:i,styles:[a],encapsulation:t.ViewEncapsulation.None,selector:e,standalone:!0,imports:[n.CommonModule,f.FormsModule,f.ReactiveFormsModule,...nn],schemas:[t.CUSTOM_ELEMENTS_SCHEMA,t.NO_ERRORS_SCHEMA]})(class{constructor(){this.isDynamicComponent=!0}})};class Hi{constructor(){this.appManager=t.inject(Ct),this.envInjector=t.inject(t.EnvironmentInjector),this.injector=t.inject(t.Injector),this.appRef=t.inject(t.ApplicationRef)}normalize(e={}){return{selector:e.selector??"wm-dynamic-component-"+zi++,transpile:!a.isDefined(e.transpile)||e.transpile,noCache:!a.isDefined(e.noCache)||e.noCache,styles:e.styles??"",inj:e.inj??this.injector}}async getComponentFactoryRef(e,t,i={}){if(!qi(e))throw new Error(`Invalid selector: ${e}`);const n=this.normalize(i);if(!n.noCache&&Wi.has(e))return Wi.get(e);try{const i=n.transpile?x.transpile(t).markup:t,a=Ui(e,i,n.styles);return n.noCache||Wi.set(e,a),a}catch(t){throw this.handleError(t,e),t}}async addComponent(e,i,n={},s={}){if(!(e instanceof HTMLElement))throw new Error("Invalid target element");const o=this.normalize(s);try{const s=await this.getComponentFactoryRef(o.selector,i,o),r=t.createComponent(s,{environmentInjector:this.envInjector,elementInjector:o.inj});return Object.keys(n).length&&a.extendProto(r.instance,n),this.appRef.attachView(r.hostView),e.appendChild(r.location.nativeElement),r.onDestroy(()=>this.appRef.detachView(r.hostView)),r}catch(e){throw this.handleError(e,o.selector),e}}clearCache(){Wi.clear()}getCacheSize(){return Wi.size}handleError(e,t){const i=e instanceof Error?e.message:"Unknown error";console.error(`Error creating component [${t}]:`,i,e),this.appManager.notifyApp?.(`Failed to create component: ${i}`,"error")}static{this.\u0275fac=at.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Hi,deps:[],target:at.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=at.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Hi})}}at.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Hi,decorators:[{type:t.Injectable}]});class Yi{canDeactivate(e,t,i,n){return function(){let e;const t=n?n.url:void 0;return e=this.app.activePage&&this.app.activePage.onBeforePageLeave(t),!1!==e&&(e=(this.app.onBeforePageLeave||a.noop)(this.app.activePageName,this.app.activePage,t)),void 0===e||e}.apply(e)}static{this.\u0275fac=at.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Yi,deps:[],target:at.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=at.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Yi})}}at.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Yi,decorators:[{type:t.Injectable}]});class Xi{canDeactivate(e,t,i,n){const a=n?n.url:void 0;return!e.canDeactivate||e.canDeactivate(a)}static{this.\u0275fac=at.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Xi,deps:[],target:at.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=at.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Xi})}}at.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:Xi,decorators:[{type:t.Injectable}]});const Ki=()=>{let e=document.querySelector('[name="deployUrl"]')&&document.querySelector('[name="deployUrl"]').getAttribute("content");a._WM_APP_PROJECT.isPreview=!e;const t=document.querySelector('[name="apiUrl"]')&&document.querySelector('[name="apiUrl"]').getAttribute("content");e||(e=document.querySelector('[name="cdnUrl"]')&&document.querySelector('[name="cdnUrl"]').getAttribute("content")),a._WM_APP_PROJECT.id=location.href.split("/")[3],a._WM_APP_PROJECT.apiUrl=t||"./",a._WM_APP_PROJECT.cdnUrl=e||"ng-bundle/",a._WM_APP_PROJECT.ngDest="ng-bundle/";try{__webpack_require__.p=__webpack_public_path__=e}catch(e){}};var Qi;function Zi(e,t){return{provide:e,useValue:t}}function Ji(e,t){return async()=>(Ki(),await t.resolve(),e.loadDefaultLocale())}function en(e){return Ki(),e.deduceAppLocale()}!function(e){e.IOS="ios",e.ANDROID="android"}(Qi||(Qi={}));const tn=[li,ci,di,$i,Vi,Gi,pi],nn=[w.ConfirmDialogComponent,P.DialogComponent,y.DialogBodyDirective,y.DialogFooterDirective,y.DialogHeaderComponent,d.ContainerDirective,d.ItemTemplateDirective,d.RepeatTemplateDirective,d.LazyLoadDirective,d.MessageComponent,d.PartialDirective,d.PartialParamHandlerDirective,d.PartialParamDirective,d.PartialContainerDirective,d.CustomWidgetContainerDirective,d.RedrawableDirective,d.ShowInDeviceDirective,d.TextContentDirective,d.ToDatePipe,d.FileIconClassPipe,d.FileExtensionFromMimePipe,d.FilterPipe,d.FileSizePipe,d.ToNumberPipe,d.ToCurrencyPipe,d.PrefixPipe,d.SuffixPipe,d.TimeFromNowPipe,d.NumberToStringPipe,d.StateClassPipe,d.StringToNumberPipe,d.TrailingZeroDecimalPipe,d.TrustAsPipe,d.ImagePipe,d.CustomPipe,d.SanitizePipe,D.BsDatepickerModule,Ue.TimepickerModule,He.BsDropdownModule,Ye.PaginationModule,Xe.TypeaheadModule,Ke.ProgressbarModule,Qe.CarouselModule,Ze.PopoverModule,Je.NgCircleProgressModule,et.TooltipModule,j.AnchorComponent,V.AudioComponent,B.HtmlDirective,G.IconComponent,W.IframeComponent,q.LabelDirective,z.PictureDirective,U.SpinnerComponent,H.VideoComponent,Y.ProgressBarComponent,X.ProgressCircleComponent,K.RichTextEditorComponent,Q.SearchComponent,Q.ScrollableDirective,Z.TreeComponent,J.CalendarComponent,ee.ChipsComponent,te.ColorPickerComponent,ie.CurrencyComponent,ne.DateComponent,ae.DatetimeComponent,se.TimeComponent,oe.DateTimePickerComponent,oe.TimePickerComponent,re.PickerComponent,re.PickerGroupComponent,le.FileUploadComponent,ce.ButtonComponent,de.ButtonGroupDirective,pe.CaptionPositionDirective,me.CheckboxComponent,m.CheckboxsetComponent,he.CompositeDirective,ue.NumberComponent,h.RadiosetComponent,ge.SelectComponent,ve.SwitchComponent,fe.InputCalendarComponent,fe.InputColorComponent,fe.InputEmailComponent,fe.InputNumberComponent,fe.InputTextComponent,be.TextareaComponent,ye.RatingComponent,we.SliderComponent,Pe.CardComponent,Pe.CardActionsDirective,Pe.CardContentComponent,Pe.CardFooterDirective,Ce.FormComponent,Ce.FormWidgetDirective,Ce.FormActionDirective,Ce.FormFieldDirective,Ce.LiveActionsDirective,Ce.DependsonDirective,Ce.LiveFilterDirective,Ce.LiveFormDirective,Te.ListComponent,Te.ListItemDirective,Oe.LiveTableComponent,Ie.PaginationComponent,De.TableComponent,De.TableCUDDirective,De.TableFilterSortDirective,De.TableActionDirective,De.TableColumnDirective,De.TableColumnGroupDirective,De.TableRowDirective,De.TableRowActionDirective,Ee.ChartComponent,Re.AccordionPaneComponent,Re.AccordionDirective,Se.LinearLayoutDirective,Se.LinearLayoutItemDirective,_e.LayoutgridDirective,_e.LayoutGridRowDirective,_e.LayoutGridColumnDirective,xe.PanelComponent,Ae.TabPaneComponent,Ae.TabsComponent,ke.TileDirective,Ne.WizardActionDirective,Ne.WizardStepComponent,Ne.WizardComponent,E.AlertDialogComponent,Me.IframeDialogComponent,Le.LoginDialogDirective,Fe.PartialDialogComponent,$e.BreadcrumbComponent,je.MenuComponent,je.MenuDropdownComponent,je.MenuDropdownItemComponent,je.NavigationControlDirective,je.NavComponent,je.NavItemDirective,Ve.NavbarComponent,Be.PopoverComponent,Ge.CarouselDirective,Ge.CarouselTemplateDirective,We.LoginComponent,qe.MarqueeDirective,ze.CustomWidgetDirective,ze.CustomWidgetContainerDirective,l.PageDirective,l.LayoutDirective,l.ContentComponent,l.PageContentComponent,l.SpaPageDirective,l.RouterOutletDirective,k.FooterDirective,N.HeaderComponent,M.LeftPanelDirective,L.RightPanelDirective,F.TopNavDirective,u.PrefabDirective,u.PrefabContainerDirective];$.fn.swipeAnimation.expressionEvaluator=a.$parseExpr;class an{static addCustomEventPolyfill(){if("function"==typeof window.CustomEvent)return!1;const e=(e,t)=>{t=t||{bubbles:!1,cancelable:!1,detail:null};const i=document.createEvent("CustomEvent");return i.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),i};e.prototype=window.Event.prototype,window.CustomEvent=e}static forRoot(){return{ngModule:an,providers:[{provide:a.App,useClass:bi},{provide:a.AbstractToasterService,useClass:yi},{provide:a.AbstractI18nService,useClass:Ci},{provide:a.AbstractSpinnerService,useClass:Ti},{provide:a.AbstractNavigationService,useClass:Ii},{provide:a.AppDefaults,useClass:Ri},{provide:a.DynamicComponentRefProvider,useClass:Hi},{provide:t.APP_INITIALIZER,useFactory:Ji,deps:[a.AbstractI18nService,Ni],multi:!0},{provide:t.LOCALE_ID,useFactory:en,deps:[a.AbstractI18nService]},{provide:v.HTTP_INTERCEPTORS,useClass:ji,multi:!0},hi,n.DecimalPipe,n.DatePipe,Ct,_t,_i,xi,Ai,Yi,Ni,Li,Fi,s.SecurityService,T.OAuthService,o.VariablesService,o.MetadataService,Zi(Mt,10),Zi(Lt,1800)]}}constructor(e,t){an.addCustomEventPolyfill(),this.getDeviceDetails().then(i=>{e.selectedViewPort={os:i.os,category:i.selectedDeviceCategory},t.update(i),e.notify("on-viewport-details",i.os)})}getDeviceDetails(){return new Promise(function(e,t){const i={key:"on-load"};window.top!==window?(window.top.postMessage(i,"*"),window.onmessage=function(t){const i=t.data;a.isObject(i)&&"switch-device"===i.key&&e(i.device)}):a.isIphone()||a.isIpod()||a.isIpad()?e({os:Qi.IOS}):e({os:Qi.ANDROID})})}static{this.\u0275fac=at.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:an,deps:[{token:rt.App},{token:rt.Viewport}],target:at.\u0275\u0275FactoryTarget.NgModule})}static{this.\u0275mod=at.\u0275\u0275ngDeclareNgModule({minVersion:"14.0.0",version:"20.3.19",ngImport:at,type:an,imports:[n.CommonModule,i.RouterModule,v.HttpClientModule,f.FormsModule,f.ReactiveFormsModule,li,ci,di,$i,Vi,Gi,pi,b.ToastrModule,w.ConfirmDialogComponent,P.DialogComponent,y.DialogBodyDirective,y.DialogFooterDirective,y.DialogHeaderComponent,d.ContainerDirective,d.ItemTemplateDirective,d.RepeatTemplateDirective,d.LazyLoadDirective,d.MessageComponent,d.PartialDirective,d.PartialParamHandlerDirective,d.PartialParamDirective,d.PartialContainerDirective,d.CustomWidgetContainerDirective,d.RedrawableDirective,d.ShowInDeviceDirective,d.TextContentDirective,d.ToDatePipe,d.FileIconClassPipe,d.FileExtensionFromMimePipe,d.FilterPipe,d.FileSizePipe,d.ToNumberPipe,d.ToCurrencyPipe,d.PrefixPipe,d.SuffixPipe,d.TimeFromNowPipe,d.NumberToStringPipe,d.StateClassPipe,d.StringToNumberPipe,d.TrailingZeroDecimalPipe,d.TrustAsPipe,d.ImagePipe,d.CustomPipe,d.SanitizePipe,D.BsDatepickerModule,Ue.TimepickerModule,He.BsDropdownModule,Ye.PaginationModule,Xe.TypeaheadModule,Ke.ProgressbarModule,Qe.CarouselModule,Ze.PopoverModule,Je.NgCircleProgressModule,et.TooltipModule,j.AnchorComponent,V.AudioComponent,B.HtmlDirective,G.IconComponent,W.IframeComponent,q.LabelDirective,z.PictureDirective,U.SpinnerComponent,H.VideoComponent,Y.ProgressBarComponent,X.ProgressCircleComponent,K.RichTextEditorComponent,Q.SearchComponent,Q.ScrollableDirective,Z.TreeComponent,J.CalendarComponent,ee.ChipsComponent,te.ColorPickerComponent,ie.CurrencyComponent,ne.DateComponent,ae.DatetimeComponent,se.TimeComponent,oe.DateTimePickerComponent,oe.TimePickerComponent,re.PickerComponent,re.PickerGroupComponent,le.FileUploadComponent,ce.ButtonComponent,de.ButtonGroupDirective,pe.CaptionPositionDirective,me.CheckboxComponent,m.CheckboxsetComponent,he.CompositeDirective,ue.NumberComponent,h.RadiosetComponent,ge.SelectComponent,ve.SwitchComponent,fe.InputCalendarComponent,fe.InputColorComponent,fe.InputEmailComponent,fe.InputNumberComponent,fe.InputTextComponent,be.TextareaComponent,ye.RatingComponent,we.SliderComponent,Pe.CardComponent,Pe.CardActionsDirective,Pe.CardContentComponent,Pe.CardFooterDirective,Ce.FormComponent,Ce.FormWidgetDirective,Ce.FormActionDirective,Ce.FormFieldDirective,Ce.LiveActionsDirective,Ce.DependsonDirective,Ce.LiveFilterDirective,Ce.LiveFormDirective,Te.ListComponent,Te.ListItemDirective,Oe.LiveTableComponent,Ie.PaginationComponent,De.TableComponent,De.TableCUDDirective,De.TableFilterSortDirective,De.TableActionDirective,De.TableColumnDirective,De.TableColumnGroupDirective,De.TableRowDirective,De.TableRowActionDirective,Ee.ChartComponent,Re.AccordionPaneComponent,Re.AccordionDirective,Se.LinearLayoutDirective,Se.LinearLayoutItemDirective,_e.LayoutgridDirective,_e.LayoutGridRowDirective,_e.LayoutGridColumnDirective,xe.PanelComponent,Ae.TabPaneComponent,Ae.TabsComponent,ke.TileDirective,Ne.WizardActionDirective,Ne.WizardStepComponent,Ne.WizardComponent,E.AlertDialogComponent,Me.IframeDialogComponent,Le.LoginDialogDirective,Fe.PartialDialogComponent,$e.BreadcrumbComponent,je.MenuComponent,je.MenuDropdownComponent,je.MenuDropdownItemComponent,je.NavigationControlDirective,je.NavComponent,je.NavItemDirective,Ve.NavbarComponent,Be.PopoverComponent,Ge.CarouselDirective,Ge.CarouselTemplateDirective,We.LoginComponent,qe.MarqueeDirective,ze.CustomWidgetDirective,ze.CustomWidgetContainerDirective,l.PageDirective,l.LayoutDirective,l.ContentComponent,l.PageContentComponent,l.SpaPageDirective,l.RouterOutletDirective,k.FooterDirective,N.HeaderComponent,M.LeftPanelDirective,L.RightPanelDirective,F.TopNavDirective,u.PrefabDirective,u.PrefabContainerDirective],exports:[f.FormsModule,f.ReactiveFormsModule,Vi,li,n.CommonModule,i.RouterModule,v.HttpClientModule,b.ToastrModule,w.ConfirmDialogComponent,P.DialogComponent,y.DialogBodyDirective,y.DialogFooterDirective,y.DialogHeaderComponent,d.ContainerDirective,d.ItemTemplateDirective,d.RepeatTemplateDirective,d.LazyLoadDirective,d.MessageComponent,d.PartialDirective,d.PartialParamHandlerDirective,d.PartialParamDirective,d.PartialContainerDirective,d.CustomWidgetContainerDirective,d.RedrawableDirective,d.ShowInDeviceDirective,d.TextContentDirective,d.ToDatePipe,d.FileIconClassPipe,d.FileExtensionFromMimePipe,d.FilterPipe,d.FileSizePipe,d.ToNumberPipe,d.ToCurrencyPipe,d.PrefixPipe,d.SuffixPipe,d.TimeFromNowPipe,d.NumberToStringPipe,d.StateClassPipe,d.StringToNumberPipe,d.TrailingZeroDecimalPipe,d.TrustAsPipe,d.ImagePipe,d.CustomPipe,d.SanitizePipe,D.BsDatepickerModule,Ue.TimepickerModule,He.BsDropdownModule,Ye.PaginationModule,Xe.TypeaheadModule,Ke.ProgressbarModule,Qe.CarouselModule,Ze.PopoverModule,Je.NgCircleProgressModule,et.TooltipModule,j.AnchorComponent,V.AudioComponent,B.HtmlDirective,G.IconComponent,W.IframeComponent,q.LabelDirective,z.PictureDirective,U.SpinnerComponent,H.VideoComponent,Y.ProgressBarComponent,X.ProgressCircleComponent,K.RichTextEditorComponent,Q.SearchComponent,Q.ScrollableDirective,Z.TreeComponent,J.CalendarComponent,ee.ChipsComponent,te.ColorPickerComponent,ie.CurrencyComponent,ne.DateComponent,ae.DatetimeComponent,se.TimeComponent,oe.DateTimePickerComponent,oe.TimePickerComponent,re.PickerComponent,re.PickerGroupComponent,le.FileUploadComponent,ce.ButtonComponent,de.ButtonGroupDirective,pe.CaptionPositionDirective,me.CheckboxComponent,m.CheckboxsetComponent,he.CompositeDirective,ue.NumberComponent,h.RadiosetComponent,ge.SelectComponent,ve.SwitchComponent,fe.InputCalendarComponent,fe.InputColorComponent,fe.InputEmailComponent,fe.InputNumberComponent,fe.InputTextComponent,be.TextareaComponent,ye.RatingComponent,we.SliderComponent,Pe.CardComponent,Pe.CardActionsDirective,Pe.CardContentComponent,Pe.CardFooterDirective,Ce.FormComponent,Ce.FormWidgetDirective,Ce.FormActionDirective,Ce.FormFieldDirective,Ce.LiveActionsDirective,Ce.DependsonDirective,Ce.LiveFilterDirective,Ce.LiveFormDirective,Te.ListComponent,Te.ListItemDirective,Oe.LiveTableComponent,Ie.PaginationComponent,De.TableComponent,De.TableCUDDirective,De.TableFilterSortDirective,De.TableActionDirective,De.TableColumnDirective,De.TableColumnGroupDirective,De.TableRowDirective,De.TableRowActionDirective,Ee.ChartComponent,Re.AccordionPaneComponent,Re.AccordionDirective,Se.LinearLayoutDirective,Se.LinearLayoutItemDirective,_e.LayoutgridDirective,_e.LayoutGridRowDirective,_e.LayoutGridColumnDirective,xe.PanelComponent,Ae.TabPaneComponent,Ae.TabsComponent,ke.TileDirective,Ne.WizardActionDirective,Ne.WizardStepComponent,Ne.WizardComponent,E.AlertDialogComponent,Me.IframeDialogComponent,Le.LoginDialogDirective,Fe.PartialDialogComponent,$e.BreadcrumbComponent,je.MenuComponent,je.MenuDropdownComponent,je.MenuDropdownItemComponent,je.NavigationControlDirective,je.NavComponent,je.NavItemDirective,Ve.NavbarComponent,Be.PopoverComponent,Ge.CarouselDirective,Ge.CarouselTemplateDirective,We.LoginComponent,qe.MarqueeDirective,ze.CustomWidgetDirective,ze.CustomWidgetContainerDirective,l.PageDirective,l.LayoutDirective,l.ContentComponent,l.PageContentComponent,l.SpaPageDirective,l.RouterOutletDirective,k.FooterDirective,N.HeaderComponent,M.LeftPanelDirective,L.RightPanelDirective,F.TopNavDirective,u.PrefabDirective,u.PrefabContainerDirective]})}static{this.\u0275inj=at.\u0275\u0275ngDeclareInjector({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:an,providers:[{provide:g.\u0275SharedStylesHost,useClass:ai},{provide:g.\u0275DomRendererFactory2,useClass:Qt},{provide:a.AbstractDialogService,useClass:d.DialogServiceImpl},d.ToDatePipe,d.FilterPipe,d.TrailingZeroDecimalPipe,d.TrustAsPipe,d.ImagePipe,d.CustomPipe,d.SanitizePipe,Location,s.SecurityService,C.HttpServiceImpl],imports:[n.CommonModule,i.RouterModule,v.HttpClientModule,f.FormsModule,f.ReactiveFormsModule,ci,di,$i,b.ToastrModule,w.ConfirmDialogComponent,P.DialogComponent,y.DialogHeaderComponent,d.MessageComponent,D.BsDatepickerModule,Ue.TimepickerModule,He.BsDropdownModule,Ye.PaginationModule,Xe.TypeaheadModule,Ke.ProgressbarModule,Qe.CarouselModule,Ze.PopoverModule,Je.NgCircleProgressModule,et.TooltipModule,j.AnchorComponent,V.AudioComponent,G.IconComponent,W.IframeComponent,U.SpinnerComponent,H.VideoComponent,Y.ProgressBarComponent,X.ProgressCircleComponent,K.RichTextEditorComponent,Q.SearchComponent,Z.TreeComponent,J.CalendarComponent,ee.ChipsComponent,te.ColorPickerComponent,ie.CurrencyComponent,ne.DateComponent,ae.DatetimeComponent,se.TimeComponent,oe.DateTimePickerComponent,oe.TimePickerComponent,re.PickerComponent,re.PickerGroupComponent,le.FileUploadComponent,ce.ButtonComponent,me.CheckboxComponent,m.CheckboxsetComponent,ue.NumberComponent,h.RadiosetComponent,ge.SelectComponent,ve.SwitchComponent,fe.InputCalendarComponent,fe.InputColorComponent,fe.InputEmailComponent,fe.InputNumberComponent,fe.InputTextComponent,be.TextareaComponent,ye.RatingComponent,we.SliderComponent,Pe.CardComponent,Pe.CardContentComponent,Ce.FormComponent,Te.ListComponent,Oe.LiveTableComponent,Ie.PaginationComponent,De.TableComponent,Ee.ChartComponent,Re.AccordionPaneComponent,xe.PanelComponent,Ae.TabPaneComponent,Ae.TabsComponent,Ne.WizardStepComponent,Ne.WizardComponent,E.AlertDialogComponent,Me.IframeDialogComponent,Fe.PartialDialogComponent,$e.BreadcrumbComponent,je.MenuComponent,je.MenuDropdownComponent,je.MenuDropdownItemComponent,je.NavComponent,Ve.NavbarComponent,Be.PopoverComponent,We.LoginComponent,l.ContentComponent,l.PageContentComponent,N.HeaderComponent,f.FormsModule,f.ReactiveFormsModule,n.CommonModule,i.RouterModule,v.HttpClientModule,b.ToastrModule,D.BsDatepickerModule,Ue.TimepickerModule,He.BsDropdownModule,Ye.PaginationModule,Xe.TypeaheadModule,Ke.ProgressbarModule,Qe.CarouselModule,Ze.PopoverModule,Je.NgCircleProgressModule,et.TooltipModule]})}}at.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:an,decorators:[{type:t.NgModule,args:[{imports:[n.CommonModule,i.RouterModule,v.HttpClientModule,f.FormsModule,f.ReactiveFormsModule,...tn,b.ToastrModule,...nn],exports:[f.FormsModule,f.ReactiveFormsModule,Vi,li,n.CommonModule,i.RouterModule,v.HttpClientModule,b.ToastrModule,...nn],providers:[{provide:g.\u0275SharedStylesHost,useClass:ai},{provide:g.\u0275DomRendererFactory2,useClass:Qt},{provide:a.AbstractDialogService,useClass:d.DialogServiceImpl},d.ToDatePipe,d.FilterPipe,d.TrailingZeroDecimalPipe,d.TrustAsPipe,d.ImagePipe,d.CustomPipe,d.SanitizePipe,Location,s.SecurityService,C.HttpServiceImpl]}]}],ctorParameters:()=>[{type:rt.App},{type:rt.Viewport}]});class sn{constructor(e,t){this.appManager=e,this.app=t}resolve(){return this.appManager.initAppModes(),this.appManager.beforeAppReady()}static{this.\u0275fac=at.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:sn,deps:[{token:Ct},{token:rt.App}],target:at.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=at.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:sn})}}at.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:sn,decorators:[{type:t.Injectable}],ctorParameters:()=>[{type:Ct},{type:rt.App}]});let on=!1;class rn{constructor(e,t){this.appManager=e,this.appVariablesProvider=t}resolve(){return!!on||Promise.all([this.appManager.loadSecurityConfig(),this.appManager.loadMetadata(),this.appVariablesProvider.getAppVariables()]).then(e=>this.appManager.loadAppVariables(e[2])).then(()=>on=!0)}static{this.\u0275fac=at.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:rn,deps:[{token:Ct},{token:wt}],target:at.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=at.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:rn,providedIn:"root"})}}at.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:rn,decorators:[{type:t.Injectable,args:[{providedIn:"root"}]}],ctorParameters:()=>[{type:Ct},{type:wt}]});let ln=!1;class cn{constructor(e){this.appManager=e}resolve(){return ln||this.appManager.loadMetadata().then(()=>ln=!0)}static{this.\u0275fac=at.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:cn,deps:[{token:Ct}],target:at.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=at.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:cn,providedIn:"root"})}}at.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:cn,decorators:[{type:t.Injectable,args:[{providedIn:"root"}]}],ctorParameters:()=>[{type:Ct}]});class dn{constructor(e){this.appManager=e,this.loaded=this.appManager.isPrefabType()||this.appManager.isTemplateBundleType()||!a.getWmProjectProperties().securityEnabled}resolve(){return this.loaded||this.appManager.loadSecurityConfig().then(()=>{this.loaded=!0})}static{this.\u0275fac=at.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:dn,deps:[{token:Ct}],target:at.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=at.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:dn,providedIn:"root"})}}at.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:at,type:dn,decorators:[{type:t.Injectable,args:[{providedIn:"root"}]}],ctorParameters:()=>[{type:Ct}]}),e.AccessrolesDirective=li,e.AppBeforeLoadResolve=sn,e.AppComponent=$i,e.AppDefaultsService=Ri,e.AppExtensionJSResolve=Li,e.AppExtensionProvider=Pt,e.AppJSProvider=yt,e.AppJSResolve=Ni,e.AppManagerService=Ct,e.AppRef=bi,e.AppSpinnerComponent=ci,e.AppVariablesProvider=wt,e.AppVariablesResolve=rn,e.AuthGuard=_i,e.BaseCustomWidgetComponent=Vt,e.BaseLayoutComponent=Gt,e.BasePageComponent=jt,e.BasePartialComponent=kt,e.BasePrefabComponent=Bt,e.BaseSpaPageComponent=oi,e.CACHE_PAGE=Nt,e.COMPONENT_VARIABLE=zt,e.CONTENT_ATTR=Ht,e.CanDeactivateNgPageGuard=Xi,e.CanDeactivatePageGuard=Yi,e.ComponentRefProvider=vt,e.CustomToasterComponent=di,e.CustomwidgetConfigProvider=bt,e.DynamicComponentRefProviderService=Hi,e.EmptyPageComponent=pi,e.FragmentMonitor=xt,e.HOST_ATTR=Ut,e.HttpCallInterceptor=ji,e.I18nResolve=Fi,e.I18nServiceImpl=Ci,e.InitializeApp=Ji,e.MAX_CACHE_AGE=Lt,e.MAX_CACHE_SIZE=Mt,e.MetadataResolve=cn,e.NAMESPACE_URIS=Wt,e.NavigationServiceImpl=Ii,e.PageNotFoundGuard=Ai,e.PipeProvider=mi,e.PipeService=hi,e.PrefabConfigProvider=ft,e.PrefabDirective=Vi,e.PrefabManagerService=_t,e.PrefabPreviewComponent=Gi,e.REQUIRED_MODULES_FOR_DYNAMIC_COMPONENTS=nn,e.RoleGuard=xi,e.RuntimeBaseModule=an,e.SecurityConfigResolve=dn,e.SharedStylesHost=ni,e.SpinnerServiceImpl=Ti,e.ToasterServiceImpl=yi,e.WMDomRendererFactory2=Qt,e.WMDomSharedStylesHost=ai,e.WM_MODULES_FOR_ROOT=[],e.WmNgRouteReuseStrategy=$t,e.WmRouteReuseStrategy=Ft,e.commonPartialWidgets=At,e.flattenStyles=Kt,e.getModesFromLocalStorage=It,e.getPrefabBaseUrl=Ot,e.getPrefabConfigUrl=e=>`${Ot(e)}/config.json`,e.getPrefabMinJsonUrl=e=>`${Ot(e)}/pages/Main/page.min.json`,e.getPrefabPartialJsonUrl=(e,t)=>`${Ot(e)}/pages/${t}/page.min.json`,e.isPrefabInPreview=Tt,e.setAngularLocale=en,e.shimContentAttribute=Yt,e.shimHostAttribute=Xt}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("lodash-es"),require("@angular/platform-browser"),require("@wm/core"),require("@wm/runtime/base"),require("@angular/router"),require("@angular/common/http"),require("@angular/platform-browser/animations"),require("@wm/variables"),require("@wm/security"),require("@wm/http"),require("@wm/oAuth"),require("ngx-toastr"),require("ngx-bootstrap/modal"),require("ngx-bootstrap/datepicker"),require("ng-circle-progress"),require("@angular/common"),require("tslib"),require("@wm/transpiler"),require("@wavemaker-ai/custom-widgets-m3"),require("@angular/forms"),require("@wm/components/page"),require("@wm/components/base"),require("@wm/components/basic/progress/progress-bar"),require("@wm/components/prefab"),require("ngx-bootstrap/typeahead"),require("ngx-bootstrap/timepicker"),require("ngx-bootstrap/progressbar"),require("ngx-bootstrap/pagination"),require("ngx-bootstrap/tooltip"),require("ngx-bootstrap/dropdown"),require("ngx-bootstrap/popover"),require("ngx-bootstrap/carousel"),require("@wm/components/basic/anchor"),require("@wm/components/basic/audio"),require("@wm/components/basic/html"),require("@wm/components/basic/icon"),require("@wm/components/basic/iframe"),require("@wm/components/basic/label"),require("@wm/components/basic/picture"),require("@wm/components/basic/spinner"),require("@wm/components/basic/video"),require("@wm/components/basic/progress/progress-circle"),require("@wm/components/basic/rich-text-editor"),require("@wm/components/basic/search"),require("@wm/components/basic/tree"),require("@wm/components/input/button"),require("@wm/components/input/button-group"),require("@wm/components/input/caption-position"),require("@wm/components/input/checkbox"),require("@wm/components/input/checkboxset"),require("@wm/components/input/composite"),require("@wm/components/input/number"),require("@wm/components/input/radioset"),require("@wm/components/input/select"),require("@wm/components/input/switch"),require("@wm/components/input/text"),require("@wm/components/input/textarea"),require("@wm/components/input/calendar"),require("@wm/components/input/chips"),require("@wm/components/input/color-picker"),require("@wm/components/input/currency"),require("@wm/components/input/epoch/date"),require("@wm/components/input/epoch/date-time"),require("@wm/components/input/epoch/time"),require("@wm/components/input/epoch/date-time-picker"),require("@wm/components/input/epoch/picker"),require("@wm/components/input/file-upload"),require("@wm/components/input/rating"),require("@wm/components/input/slider"),require("@wm/components/data/card"),require("@wm/components/data/form"),require("@wm/components/data/list"),require("@wm/components/data/live-table"),require("@wm/components/data/pagination"),require("@wm/components/data/table"),require("@wm/components/chart"),require("@wm/components/containers/accordion"),require("@wm/components/containers/linear-layout"),require("@wm/components/containers/layout-grid"),require("@wm/components/containers/panel"),require("@wm/components/containers/tabs"),require("@wm/components/containers/tile"),require("@wm/components/containers/wizard"),require("@wm/components/dialogs/alert-dialog"),require("@wm/components/dialogs/iframe-dialog"),require("@wm/components/dialogs/login-dialog"),require("@wm/components/dialogs/partial-dialog"),require("@wm/components/navigation/breadcrumb"),require("@wm/components/navigation/menu"),require("@wm/components/navigation/navbar"),require("@wm/components/navigation/popover"),require("@wm/components/advanced/carousel"),require("@wm/components/advanced/login"),require("@wm/components/advanced/marquee"),require("@wm/components/advanced/custom"),require("@wm/components/page/footer"),require("@wm/components/page/header"),require("@wm/components/page/left-panel"),require("@wm/components/page/right-panel"),require("@wm/components/page/top-nav")):"function"==typeof define&&define.amd?define(["exports","@angular/core","lodash-es","@angular/platform-browser","@wm/core","@wm/runtime/base","@angular/router","@angular/common/http","@angular/platform-browser/animations","@wm/variables","@wm/security","@wm/http","@wm/oAuth","ngx-toastr","ngx-bootstrap/modal","ngx-bootstrap/datepicker","ng-circle-progress","@angular/common","tslib","@wm/transpiler","@wavemaker-ai/custom-widgets-m3","@angular/forms","@wm/components/page","@wm/components/base","@wm/components/basic/progress/progress-bar","@wm/components/prefab","ngx-bootstrap/typeahead","ngx-bootstrap/timepicker","ngx-bootstrap/progressbar","ngx-bootstrap/pagination","ngx-bootstrap/tooltip","ngx-bootstrap/dropdown","ngx-bootstrap/popover","ngx-bootstrap/carousel","@wm/components/basic/anchor","@wm/components/basic/audio","@wm/components/basic/html","@wm/components/basic/icon","@wm/components/basic/iframe","@wm/components/basic/label","@wm/components/basic/picture","@wm/components/basic/spinner","@wm/components/basic/video","@wm/components/basic/progress/progress-circle","@wm/components/basic/rich-text-editor","@wm/components/basic/search","@wm/components/basic/tree","@wm/components/input/button","@wm/components/input/button-group","@wm/components/input/caption-position","@wm/components/input/checkbox","@wm/components/input/checkboxset","@wm/components/input/composite","@wm/components/input/number","@wm/components/input/radioset","@wm/components/input/select","@wm/components/input/switch","@wm/components/input/text","@wm/components/input/textarea","@wm/components/input/calendar","@wm/components/input/chips","@wm/components/input/color-picker","@wm/components/input/currency","@wm/components/input/epoch/date","@wm/components/input/epoch/date-time","@wm/components/input/epoch/time","@wm/components/input/epoch/date-time-picker","@wm/components/input/epoch/picker","@wm/components/input/file-upload","@wm/components/input/rating","@wm/components/input/slider","@wm/components/data/card","@wm/components/data/form","@wm/components/data/list","@wm/components/data/live-table","@wm/components/data/pagination","@wm/components/data/table","@wm/components/chart","@wm/components/containers/accordion","@wm/components/containers/linear-layout","@wm/components/containers/layout-grid","@wm/components/containers/panel","@wm/components/containers/tabs","@wm/components/containers/tile","@wm/components/containers/wizard","@wm/components/dialogs/alert-dialog","@wm/components/dialogs/iframe-dialog","@wm/components/dialogs/login-dialog","@wm/components/dialogs/partial-dialog","@wm/components/navigation/breadcrumb","@wm/components/navigation/menu","@wm/components/navigation/navbar","@wm/components/navigation/popover","@wm/components/advanced/carousel","@wm/components/advanced/login","@wm/components/advanced/marquee","@wm/components/advanced/custom","@wm/components/page/footer","@wm/components/page/header","@wm/components/page/left-panel","@wm/components/page/right-panel","@wm/components/page/top-nav"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.runtime=e.wm.runtime||{},e.wm.runtime.dynamic={}),e.ng.core,e._,e.ng.platformBrowser,e.wm.core,e.wm.runtime.base,e.ng.router,e.ng.common.http,e.ng.platformBrowser.animations,e.wm.variables,e.wm.security,e.wm.http,e.wm.oAuth,e.ngxToastr,e.ngxBootstrap.modal,e.ngxBootstrap.datepicker,e.ngCircleProgress,e.ng.common,e.tslib,e.wm.transpiler,e.wm_custom_widgets,e.ng.forms,e.wm.components.page,e.wm.components.base,e.wm.components.basic.progress.progressBar,e.wm.components.prefab,e.ngxBootstrap.typeahead,e.ngxBootstrap.timepicker,e.ngxBootstrap.progressbar,e.ngxBootstrap.pagination,e.ngxBootstrap.tooltip,e.ngxBootstrap.dropdown,e.ngxBootstrap.popover,e.ngxBootstrap.carousel,e.wm.components.basic.anchor,e.wm.components.basic.audio,e.wm.components.basic.html,e.wm.components.basic.icon,e.wm.components.basic.iframe,e.wm.components.basic.label,e.wm.components.basic.picture,e.wm.components.basic.spinner,e.wm.components.basic.video,e.wm.components.basic.progress.progressCircle,e.wm.components.basic.richtexteditor,e.wm.components.basic.search,e.wm.components.basic.tree,e.wm.components.input.button,e.wm.components.input.buttongroup,e.wm.components.input.captionposition,e.wm.components.input.checkbox,e.wm.components.input.checkboxset,e.wm.components.input.composite,e.wm.components.input.number,e.wm.components.input.radioset,e.wm.components.input.select,e.wm.components.input.switch,e.wm.components.input.text,e.wm.components.input.textarea,e.wm.components.input.calendar,e.wm.components.input.chips,e.wm.components.input.colorpicker,e.wm.components.input.currency,e.wm.components.input.epoch.date,e.wm.components.input.epoch.dateTime,e.wm.components.input.epoch.time,e.wm.components.input.epoch.dateTimePicker,e.wm.components.input.epoch.picker,e.wm.components.input.fileupload,e.wm.components.input.rating,e.wm.components.input.slider,e.wm.components.data.card,e.wm.components.data.form,e.wm.components.data.list,e.wm.components.data.livetable,e.wm.components.data.pagination,e.wm.components.data.table,e.wm.components.chart,e.wm.components.containers.accordion,e.wm.components.containers.linearlayout,e.wm.components.containers.layoutgrid,e.wm.components.containers.panel,e.wm.components.containers.tabs,e.wm.components.containers.tile,e.wm.components.containers.wizard,e.wm.components.dialogs.alertdialog,e.wm.components.dialogs.iframedialog,e.wm.components.dialogs.logindialog,e.wm.components.dialogs.partialdialog,e.wm.components.navigation.breadcrumb,e.wm.components.navigation.menu,e.wm.components.navigation.navbar,e.wm.components.navigation.popover,e.wm.components.advanced.carousel,e.wm.components.advanced.login,e.wm.components.advanced.marquee,e.wm.components.advanced.custom,e.wm.components.page.footer,e.wm.components.page.header,e.wm.components.page.leftpanel,e.wm.components.page.rightpanel,e.wm.components.page.topnav)}(this,function(e,t,i,n,a,s,o,r,l,c,d,p,m,h,u,g,v,f,b,y,w,P,C,T,O,I,D,E,R,S,_,x,A,k,N,M,L,F,j,V,B,G,W,q,z,U,H,Y,X,K,Q,Z,J,ee,te,ie,ne,ae,se,oe,re,le,ce,de,pe,me,he,ue,ge,ve,fe,be,ye,we,Pe,Ce,Te,Oe,Ie,De,Ee,Re,Se,_e,xe,Ae,ke,Ne,Me,Le,Fe,$e,je,Ve,Be,Ge,We,qe,ze,Ue,He,Ye){"use strict";function Xe(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var Ke=Xe(t),Qe=Xe(a),Ze=Xe(s),Je=Xe(o),et=Xe(r),tt=Xe(c),it=Xe(d),nt=Xe(w);class at{constructor(e,t,i,n,a,s,o,r,l,c,d,p,m,h){this.injector=e,this.envInjector=t,this.route=i,this.vcRef=n,this.appRef=a,this.metadataService=s,this.securityService=o,this.appManager=r,this.app=l,this.ngZone=c,this.elRef=d,this.spinnerService=p,this.componentRefProvider=m,this.router=h}getTargetNode(){return this.elRef.nativeElement}resetViewContainer(){this.vcRef.clear();this.getTargetNode().innerHTML=""}renderPage(e){const i=this.getTargetNode();this.appManager.loadAppVariables().then(async()=>{const n=await this.componentRefProvider.getComponentFactoryRef(e,s.ComponentType.PAGE);if(!n)return console.error(`Failed to load page component: ${e}`),void s.BasePageComponent.clear();try{const e=t.Injector.create({providers:[{provide:o.ActivatedRoute,useValue:this.route}],parent:this.injector}),a=this.vcRef.createComponent(n,{index:0,environmentInjector:this.envInjector,injector:e});this.instance=a.instance,i.appendChild(a.location.nativeElement),this.vcRef.length>1&&this.vcRef.remove(1)}catch(t){console.error(`Error creating page component ${e}:`,t),s.BasePageComponent.clear()}}).catch(t=>{console.error(`Error loading app variables for page ${e}:`,t),s.BasePageComponent.clear()})}renderPrefabPreviewPage(){this.router.navigate(["prefab-preview"])}loadPage(e){this.ngZone.run(()=>{e&&this.renderPage(e)})}ngOnInit(){this.app.isPrefabType?this.renderPrefabPreviewPage():($(this.getTargetNode()).find(">div").first().remove(),this.subscription=this.route.params.subscribe(({pageName:e})=>{this.loadPage(e)}))}ngOnDestroy(){this.vcRef.clear(),this.subscription&&(this.subscription.unsubscribe(),this.subscription=null),this.instance=null}ngOnAttach(){this.getTargetNode().appendChild(this.instance.$page[0]),this.instance.ngOnAttach()}ngOnDetach(){this.instance.ngOnDetach()}static{this.\u0275fac=Ke.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:Ke,type:at,deps:[{token:Ke.Injector},{token:Ke.EnvironmentInjector},{token:Je.ActivatedRoute},{token:Ke.ViewContainerRef},{token:Ke.ApplicationRef},{token:tt.MetadataService},{token:it.SecurityService},{token:Ze.AppManagerService},{token:Qe.App},{token:Ke.NgZone},{token:Ke.ElementRef},{token:Qe.AbstractSpinnerService},{token:Ze.ComponentRefProvider},{token:Je.Router}],target:Ke.\u0275\u0275FactoryTarget.Component})}static{this.\u0275cmp=Ke.\u0275\u0275ngDeclareComponent({minVersion:"14.0.0",version:"20.3.19",type:at,isStandalone:!0,selector:"app-page-outlet",ngImport:Ke,template:"<div></div>",isInline:!0})}}Ke.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:Ke,type:at,decorators:[{type:t.Component,args:[{standalone:!0,selector:"app-page-outlet",template:"<div></div>"}]}],ctorParameters:()=>[{type:Ke.Injector},{type:Ke.EnvironmentInjector},{type:Je.ActivatedRoute},{type:Ke.ViewContainerRef},{type:Ke.ApplicationRef},{type:tt.MetadataService},{type:it.SecurityService},{type:Ze.AppManagerService},{type:Qe.App},{type:Ke.NgZone},{type:Ke.ElementRef},{type:Qe.AbstractSpinnerService},{type:Ze.ComponentRefProvider},{type:Je.Router}]});const st=[{path:"",pathMatch:"full",component:s.EmptyPageComponent},{path:"prefab-preview",pathMatch:"full",component:s.PrefabPreviewComponent},{path:":pageName",pathMatch:"full",component:at,canDeactivate:[s.CanDeactivatePageGuard]}];class ot extends s.CustomwidgetConfigProvider{constructor(){super()}getConfig(e){return new Promise((t,i)=>{Promise.resolve(window.resourceCache.get(`./custom-widgets/${e}/page.min.json`)).then(e=>{t(e.config)})})}static{this.\u0275fac=Ke.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:Ke,type:ot,deps:[],target:Ke.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=Ke.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:Ke,type:ot})}}Ke.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:Ke,type:ot,decorators:[{type:t.Injectable}],ctorParameters:()=>[]});class rt extends s.AppJSProvider{constructor(e){super(),this.$http=e}getAppScriptFn(){return this.$http.get("./app.js",{responseType:"text"}).toPromise().then(e=>new Function("App","Utils","Injector",e))}static{this.\u0275fac=Ke.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:Ke,type:rt,deps:[{token:et.HttpClient}],target:Ke.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=Ke.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:Ke,type:rt,providedIn:"root"})}}Ke.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:Ke,type:rt,decorators:[{type:t.Injectable,args:[{providedIn:"root"}]}],ctorParameters:()=>[{type:et.HttpClient}]});const lt=new Map;class ct{get(e,t){const i=lt.get(e);return i?Promise.resolve(i):this.$http.get(e).then(i=>(t&&lt.set(e,i),i))}clearCache(){lt.clear()}constructor(e){this.$http=e}static{this.\u0275fac=Ke.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:Ke,type:ct,deps:[{token:Qe.AbstractHttpService}],target:Ke.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=Ke.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:Ke,type:ct})}}Ke.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:Ke,type:ct,decorators:[{type:t.Injectable}],ctorParameters:()=>[{type:Qe.AbstractHttpService}]});class dt extends s.AppVariablesProvider{constructor(e,t){super(),this.resourceManager=e,this.app=t}async getAppVariables(){return this.app.isPrefabType?{}:this.resourceManager.get("./app.variables.json")}static{this.\u0275fac=Ke.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:Ke,type:dt,deps:[{token:ct},{token:Qe.App}],target:Ke.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=Ke.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:Ke,type:dt,providedIn:"root"})}}Ke.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:Ke,type:dt,decorators:[{type:t.Injectable,args:[{providedIn:"root"}]}],ctorParameters:()=>[{type:ct},{type:Qe.App}]});class pt extends s.AppExtensionProvider{loadFormatterConfigScript(e){try{a.appendScriptToHead(e)}catch(e){console.warn("Error while loading the formatters.js file")}}static{this.\u0275fac=Ke.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:Ke,type:pt,deps:null,target:Ke.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=Ke.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:Ke,type:pt,providedIn:"root"})}}Ke.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:Ke,type:pt,decorators:[{type:t.Injectable,args:[{providedIn:"root"}]}]});const mt=new Map,ht=new Map([[s.ComponentType.PAGE,new Map],[s.ComponentType.PARTIAL,new Map],[s.ComponentType.PREFAB,new Map],[s.ComponentType.WIDGET,new Map]]),ut=new Map;window.resourceCache=mt;const gt=e=>{try{return decodeURIComponent(e.replace(/\+/g," "))}catch{return e}},vt=[...s.REQUIRED_MODULES_FOR_DYNAMIC_COMPONENTS,f.CommonModule,P.FormsModule,P.ReactiveFormsModule,T.PartialDirective,C.PageDirective,s.AccessrolesDirective,s.AppSpinnerComponent,s.CustomToasterComponent,s.AppComponent,s.PrefabDirective,s.PrefabPreviewComponent,s.EmptyPageComponent,C.LayoutDirective,C.ContentComponent,C.PageContentComponent,C.SpaPageDirective,C.RouterOutletDirective,O.ProgressBarComponent,I.PrefabContainerDirective],ft={[s.ComponentType.PAGE]:{Base:s.BasePageComponent,prefix:"app-page-",ctx:"Page"},[s.ComponentType.PARTIAL]:{Base:s.BasePartialComponent,prefix:"app-partial-",ctx:"Partial"},[s.ComponentType.PREFAB]:{Base:s.BasePrefabComponent,prefix:"app-prefab-",ctx:"Prefab"},[s.ComponentType.WIDGET]:{Base:s.BaseCustomWidgetComponent,prefix:"app-custom-",ctx:"Widget"}},bt=(e,n,o,r,l,c)=>{const{Base:d,prefix:p,ctx:m}=ft[n],h=p+e;let u=class extends d{constructor(t){super(),this.injector=t,this.isDynamicComponent=!0,this.injector=t,n===s.ComponentType.PAGE?this.pageName=e:n===s.ComponentType.PARTIAL?this.partialName=e:n===s.ComponentType.PREFAB?this.prefabName=e:n===s.ComponentType.WIDGET&&(this.customWidgetName=e),super.init()}evalUserScript(e,t,n){((e,t,n,a,s,o)=>{let r=ut.get(t);("Partial"!==n||i.isUndefined(a.Prefab))&&r||(r=new Function(n,"App","Utils",e),ut.set(t,r)),r(a,s,o)})(l,h,m,e,t,n)}getVariables(){try{return JSON.parse(c)||{}}catch{return{}}}getExpressions(){return{}}};return u=b.__decorate([b.__param(0,t.Inject(t.Injector)),b.__metadata("design:paramtypes",[t.Injector])],u),t.Component({template:o,styles:[r],encapsulation:t.ViewEncapsulation.None,selector:h,standalone:!0,imports:[...vt],providers:[{provide:a.UserDefinedExecutionContext,useExisting:u}],schemas:[t.CUSTOM_ELEMENTS_SCHEMA,t.NO_ERRORS_SCHEMA]})(u)};class yt extends s.ComponentRefProvider{constructor(){super(),this.cache=new Map,this.app=t.inject(a.App),this.appManager=t.inject(s.AppManagerService),this.resourceMngr=t.inject(ct)}async loadFragment(e,t,i){const n=((e,t,i)=>t===s.ComponentType.PAGE||t===s.ComponentType.PARTIAL?i?.prefab?s.getPrefabPartialJsonUrl(i.prefab,e):`./pages/${e}/page.min.json`:t===s.ComponentType.PREFAB?s.getPrefabMinJsonUrl(e):`./custom-widgets/${e}/page.min.json`)(e,t,i);if(mt.has(n))return mt.get(n);const o=(async()=>{try{const i=t===s.ComponentType.WIDGET&&!nt[e]||t!==s.ComponentType.WIDGET?await this.resourceMngr.get(n,!0):nt[e];return{markup:y.transpile(gt(i.markup)).markup,script:gt(i.script),styles:y.scopeComponentStyles(e,t,gt(i.styles)),variables:a.getValidJSON(gt(i.variables)),...i.config&&{config:a.getValidJSON(gt(i.config))}}}catch(e){const t=e?.details?.status;throw{404:this.app.appLocale?.MESSAGE_PAGE_NOT_FOUND||"Page not available",403:this.app.appLocale?.LABEL_ACCESS_DENIED||"Access Denied"}[t]||"Unknown error loading component"}})();return mt.set(n,o),o}async getComponentFactoryRef(e,t,n){const a=n?.prefab?`${n.prefab}${e}`:e,s=`${t}-${a}`,o=ht.get(t);if(o?.has(a))return o.get(a);if(this.cache.has(s))return this.cache.get(s);try{const{markup:i,script:r,styles:l,variables:c}=await this.loadFragment(e,t,n),d=bt(e,t,i,l,r,JSON.stringify(c));return this.cache.set(s,d),o?.set(a,d),d}catch(n){const a=i.isString(n)?n:"Error loading component, check console";return console.error(`Failed to load ${t} component '${e}':`,n),void this.appManager.notifyApp(a,"error")}}clearComponentFactoryRefCache(){this.resourceMngr.clearCache(),mt.clear(),this.cache.clear(),ht.forEach(e=>e.clear())}static{this.\u0275fac=Ke.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:Ke,type:yt,deps:[],target:Ke.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=Ke.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:Ke,type:yt})}}Ke.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:Ke,type:yt,decorators:[{type:t.Injectable}],ctorParameters:()=>[]});const wt=new Map;class Pt extends s.PrefabConfigProvider{constructor(e){super(),this.resourceMngr=e}getConfig(e){const t=wt.get(e);return t?Promise.resolve(t):this.resourceMngr.get(s.getPrefabConfigUrl(e)).then(t=>(wt.set(e,t),t))}static{this.\u0275fac=Ke.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"20.3.19",ngImport:Ke,type:Pt,deps:[{token:ct}],target:Ke.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=Ke.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"20.3.19",ngImport:Ke,type:Pt})}}Ke.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.19",ngImport:Ke,type:Pt,decorators:[{type:t.Injectable}],ctorParameters:()=>[{type:ct}]});const Ct=[t.importProvidersFrom(u.ModalModule.forRoot(),h.ToastNoAnimationModule.forRoot({maxOpened:1,autoDismiss:!0}),g.BsDatepickerModule.forRoot(),v.NgCircleProgressModule.forRoot())],Tt={build:()=>new XMLHttpRequest},Ot=a.getWmProjectProperties().xsrf_header_name||"X-WM-XSRF-TOKEN",It=()=>{let e=document.querySelector('[name="deployUrl"]')&&document.querySelector('[name="deployUrl"]').getAttribute("content");a._WM_APP_PROJECT.isPreview=!e;const t=document.querySelector('[name="apiUrl"]')&&document.querySelector('[name="apiUrl"]').getAttribute("content");e||(e=document.querySelector('[name="cdnUrl"]')&&document.querySelector('[name="cdnUrl"]').getAttribute("content")),a._WM_APP_PROJECT.id=location.href.split("/")[3],a._WM_APP_PROJECT.apiUrl=t||"./",a._WM_APP_PROJECT.cdnUrl=e||"ng-bundle/",a._WM_APP_PROJECT.ngDest="ng-bundle/";try{__webpack_require__.p=__webpack_public_path__=e}catch(e){}};const Dt={providers:[t.provideZoneChangeDetection({eventCoalescing:!0,runCoalescing:!0}),{provide:r.HTTP_INTERCEPTORS,useClass:s.HttpCallInterceptor,multi:!0},o.provideRouter(st,o.withHashLocation(),o.withComponentInputBinding()),l.provideAnimations(),{provide:f.XhrFactory,useValue:Tt},r.provideHttpClient(r.withInterceptorsFromDi(),r.withXsrfConfiguration({cookieName:"wm_xsrf_token",headerName:Ot})),{provide:r.HttpXhrBackend,useFactory:()=>new r.HttpXhrBackend(Tt)},{provide:t.RendererFactory2,useClass:s.WMDomRendererFactory2},{provide:a.AbstractHttpService,useClass:p.HttpServiceImpl},{provide:a.App,useClass:s.AppRef},{provide:a.AbstractToasterService,useClass:s.ToasterServiceImpl},{provide:a.AbstractI18nService,useClass:s.I18nServiceImpl},{provide:a.AbstractSpinnerService,useClass:s.SpinnerServiceImpl},{provide:a.AbstractNavigationService,useClass:s.NavigationServiceImpl},{provide:a.AbstractDialogService,useClass:T.DialogServiceImpl},{provide:a.AppDefaults,useClass:s.AppDefaultsService},{provide:a.DynamicComponentRefProvider,useClass:s.DynamicComponentRefProviderService},{provide:s.AppJSProvider,useClass:rt},{provide:s.AppVariablesProvider,useClass:dt},{provide:s.AppExtensionProvider,useClass:pt},{provide:s.ComponentRefProvider,useClass:yt},{provide:a.PartialRefProvider,useClass:yt},{provide:a.CustomWidgetRefProvider,useClass:yt},{provide:s.CustomwidgetConfigProvider,useClass:ot},{provide:s.PrefabConfigProvider,useClass:Pt},{provide:o.RouteReuseStrategy,useClass:s.WmRouteReuseStrategy},ct,s.PipeService,a.CustomIconsLoaderService,a.Viewport,f.DecimalPipe,T.SanitizePipe,T.ToDatePipe,T.FilterPipe,T.TrailingZeroDecimalPipe,T.TrustAsPipe,T.ImagePipe,T.CustomPipe,f.Location,f.DatePipe,s.AppManagerService,s.PrefabManagerService,s.AuthGuard,s.RoleGuard,s.PageNotFoundGuard,s.CanDeactivatePageGuard,s.AppJSResolve,s.AppVariablesResolve,s.AppExtensionJSResolve,s.I18nResolve,s.AppBeforeLoadResolve,d.SecurityService,m.OAuthService,c.VariablesService,c.MetadataService,{provide:s.MAX_CACHE_SIZE,useValue:10},{provide:s.MAX_CACHE_AGE,useValue:1800},...Ct,{provide:t.APP_INITIALIZER,useFactory:function(e,t,i,n,a,s){return async()=>(It(),await t.resolve(),await n.resolve(),await a.resolve(),await e.loadDefaultLocale(),i.resolve())},deps:[a.AbstractI18nService,s.AppJSResolve,s.AppBeforeLoadResolve,s.AppVariablesResolve,s.AppExtensionJSResolve,s.PipeService],multi:!0},{provide:t.LOCALE_ID,useFactory:function(e){return It(),e.deduceAppLocale()},deps:[a.AbstractI18nService]}]},Et="debugMode";"true"!==sessionStorage.getItem(Et)&&t.enableProdMode(),fetch("./font.config.js").then(e=>e.text()).then(e=>{a.setPreviewProperties({fontConfig:e});(new a.CustomIconsLoaderService).load()}),console.time("bootstrap"),document.addEventListener("DOMContentLoaded",()=>{new Promise(e=>{e()}).then(()=>n.bootstrapApplication(s.AppComponent,Dt)).then(e=>{window.addEventListener("unload",()=>{e.components.map(e=>e?.destroy())})}).catch(e=>console.error("Error bootstrapping app:",e))}),window.debugMode=function(e){i.isEmpty(e)&&(e=!0);const t=e?"true":"false";sessionStorage.getItem(Et)!==t&&(sessionStorage.setItem(Et,t),window.location.reload())};const Rt=o.RouterModule.forRoot(st,{useHash:!0,scrollPositionRestoration:"top"}),St=h.ToastNoAnimationModule.forRoot({maxOpened:1,autoDismiss:!0}),_t=a.getWmProjectProperties().xsrf_header_name,xt={cookieName:"wm_xsrf_token"};_t&&(xt.headerName=_t);const At=r.HttpClientXsrfModule.withOptions(xt),kt=u.ModalModule.forRoot(),Nt=g.BsDatepickerModule.forRoot(),Mt=E.TimepickerModule.forRoot(),Lt=x.BsDropdownModule.forRoot(),Ft=S.PaginationModule.forRoot(),$t=D.TypeaheadModule.forRoot(),jt=R.ProgressbarModule.forRoot(),Vt=k.CarouselModule.forRoot(),Bt=A.PopoverModule.forRoot(),Gt=v.NgCircleProgressModule.forRoot({}),Wt=_.TooltipModule.forRoot(),qt=[g.BsDatepickerModule,E.TimepickerModule,x.BsDropdownModule,S.PaginationModule,D.TypeaheadModule,R.ProgressbarModule,k.CarouselModule,A.PopoverModule,v.NgCircleProgressModule,_.TooltipModule,N.AnchorComponent,M.AudioComponent,L.HtmlDirective,F.IconComponent,j.IframeComponent,V.LabelDirective,B.PictureDirective,G.SpinnerComponent,W.VideoComponent,O.ProgressBarComponent,q.ProgressCircleComponent,z.RichTextEditorComponent,U.SearchComponent,U.ScrollableDirective,H.TreeComponent,oe.CalendarComponent,re.ChipsComponent,le.ColorPickerComponent,ce.CurrencyComponent,de.DateComponent,pe.DatetimeComponent,me.TimeComponent,he.DateTimePickerComponent,he.TimePickerComponent,ue.PickerComponent,ue.PickerGroupComponent,ge.FileUploadComponent,Y.ButtonComponent,X.ButtonGroupDirective,K.CaptionPositionDirective,Q.CheckboxComponent,Z.CheckboxsetComponent,J.CompositeDirective,ee.NumberComponent,te.RadiosetComponent,ie.SelectComponent,ne.SwitchComponent,ae.InputCalendarComponent,ae.InputColorComponent,ae.InputEmailComponent,ae.InputNumberComponent,ae.InputTextComponent,se.TextareaComponent,ve.RatingComponent,fe.SliderComponent,be.CardComponent,be.CardActionsDirective,be.CardContentComponent,be.CardFooterDirective,ye.FormComponent,ye.FormWidgetDirective,ye.FormActionDirective,ye.FormFieldDirective,ye.LiveActionsDirective,ye.DependsonDirective,ye.LiveFilterDirective,ye.LiveFormDirective,we.ListComponent,we.ListItemDirective,Pe.LiveTableComponent,Ce.PaginationComponent,Te.TableComponent,Te.TableCUDDirective,Te.TableFilterSortDirective,Te.TableActionDirective,Te.TableColumnDirective,Te.TableColumnGroupDirective,Te.TableRowDirective,Te.TableRowActionDirective,Oe.ChartComponent,Ie.AccordionPaneComponent,Ie.AccordionDirective,De.LinearLayoutDirective,De.LinearLayoutItemDirective,Ee.LayoutgridDirective,Ee.LayoutGridRowDirective,Ee.LayoutGridColumnDirective,Re.PanelComponent,Se.TabPaneComponent,Se.TabsComponent,_e.TileDirective,xe.WizardActionDirective,xe.WizardStepComponent,xe.WizardComponent,Ae.AlertDialogComponent,ke.IframeDialogComponent,Ne.LoginDialogDirective,Me.PartialDialogComponent,Le.BreadcrumbComponent,Fe.MenuComponent,Fe.MenuDropdownComponent,Fe.MenuDropdownItemComponent,Fe.NavigationControlDirective,Fe.NavComponent,Fe.NavItemDirective,$e.NavbarComponent,je.PopoverComponent,Ve.CarouselDirective,Ve.CarouselTemplateDirective,Be.LoginComponent,Ge.MarqueeDirective,We.CustomWidgetDirective,We.CustomWidgetContainerDirective,C.PageDirective,C.LayoutDirective,C.ContentComponent,C.PageContentComponent,C.SpaPageDirective,C.RouterOutletDirective,qe.FooterDirective,ze.HeaderComponent,Ue.LeftPanelDirective,He.RightPanelDirective,Ye.TopNavDirective,I.PrefabDirective,I.PrefabContainerDirective];s.REQUIRED_MODULES_FOR_DYNAMIC_COMPONENTS.push(...qt),s.REQUIRED_MODULES_FOR_DYNAMIC_COMPONENTS.push(P.FormsModule,P.ReactiveFormsModule),e.AppModule=class{constructor(e,t,i){this.app=e,this.inj=t,this.componentRefProvider=i}},e.AppModule=b.__decorate([t.NgModule({declarations:[at],imports:[n.BrowserModule,l.BrowserAnimationsModule,f.CommonModule,o.RouterModule,r.HttpClientModule,kt,Nt,Mt,Lt,Ft,$t,Wt,jt,Vt,Bt,Gt,Rt,St,At,s.WM_MODULES_FOR_ROOT],providers:[ct,{provide:s.AppJSProvider,useClass:rt},{provide:s.AppVariablesProvider,useClass:dt},{provide:s.AppExtensionProvider,useClass:pt},{provide:s.ComponentRefProvider,useClass:yt},{provide:a.PartialRefProvider,useClass:yt},{provide:a.CustomWidgetRefProvider,useClass:yt},{provide:s.CustomwidgetConfigProvider,useClass:ot},{provide:s.PrefabConfigProvider,useClass:Pt},{provide:o.RouteReuseStrategy,useClass:s.WmRouteReuseStrategy},{provide:a.AbstractHttpService,useClass:p.HttpServiceImpl}],bootstrap:[s.AppComponent]}),b.__metadata("design:paramtypes",[a.App,t.Injector,s.ComponentRefProvider])],e.AppModule),e.AppExtensionProviderService=pt,e.AppJSProviderService=rt,e.AppResourceManagerService=ct,e.AppVariablesProviderService=dt,e.ComponentRefProviderService=yt,e.PageWrapperComponent=at,e.PrefabConfigProviderService=Pt,e.bsDatePickerModule=Nt,e.bsDropdownModule=Lt,e.carouselModule=Vt,e.httpClientXsrfModule=At,e.modalModule=kt,e.ngCircleProgressModule=Gt,e.paginationModule=Ft,e.popoverModule=Bt,e.progressbarModule=jt,e.routerModule=Rt,e.timepickerModule=Mt,e.toastrModule=St,e.tooltipModule=Wt,e.typeaheadModule=$t});