{"version":3,"file":"vendors-319a6989.b149463909b5e91f4e75.bundle.js","mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AClaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAoBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACzIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;AC7oBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;AC9PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;AC7GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;ACvIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC/VA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;ACzaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACnSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACpDA;AACA;AACA;AACA","sources":["webpack://app/./node_modules/aurelia-bootstrap-datetimepicker/dist/commonjs/abp-datetime-picker.js","webpack://app/./node_modules/aurelia-bootstrap-datetimepicker/dist/commonjs/index.js","webpack://app/./node_modules/aurelia-bootstrap-datetimepicker/dist/commonjs/picker-config.js","webpack://app/./node_modules/aurelia-bootstrap-datetimepicker/dist/commonjs/picker-global-options.js","webpack://app/./node_modules/aurelia-bootstrapper/dist/native-modules/aurelia-bootstrapper.js","webpack://app/./node_modules/aurelia-dependency-injection/dist/native-modules/aurelia-dependency-injection.js","webpack://app/./node_modules/aurelia-dialog/dist/native-modules/aurelia-dialog.js","webpack://app/./node_modules/aurelia-dialog/dist/native-modules/chunk.js","webpack://app/./node_modules/aurelia-event-aggregator/dist/native-modules/aurelia-event-aggregator.js","webpack://app/./node_modules/aurelia-fetch-client/dist/native-modules/aurelia-fetch-client.js","webpack://app/./node_modules/aurelia-framework/dist/native-modules/aurelia-framework.js","webpack://app/./node_modules/aurelia-history-browser/dist/native-modules/aurelia-history-browser.js","webpack://app/./node_modules/aurelia-history/dist/native-modules/aurelia-history.js","webpack://app/./node_modules/aurelia-bootstrap-datetimepicker/dist/commonjs/abp-datetime-picker.html"],"sourcesContent":["'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.AbpDatetimePickerCustomElement = undefined;\n\nvar _dec, _dec2, _dec3, _dec4, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15;\n\nvar _aureliaFramework = require('aurelia-framework');\n\nvar _moment = require('moment');\n\nvar _moment2 = _interopRequireDefault(_moment);\n\nvar _jquery = require('jquery');\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nrequire('eonasdan-bootstrap-datetimepicker');\n\nvar _pickerGlobalOptions = require('./picker-global-options');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _initDefineProp(target, property, descriptor, context) {\n if (!descriptor) return;\n Object.defineProperty(target, property, {\n enumerable: descriptor.enumerable,\n configurable: descriptor.configurable,\n writable: descriptor.writable,\n value: descriptor.initializer ? descriptor.initializer.call(context) : void 0\n });\n}\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {\n var desc = {};\n Object['ke' + 'ys'](descriptor).forEach(function (key) {\n desc[key] = descriptor[key];\n });\n desc.enumerable = !!desc.enumerable;\n desc.configurable = !!desc.configurable;\n\n if ('value' in desc || desc.initializer) {\n desc.writable = true;\n }\n\n desc = decorators.slice().reverse().reduce(function (desc, decorator) {\n return decorator(target, property, desc) || desc;\n }, desc);\n\n if (context && desc.initializer !== void 0) {\n desc.value = desc.initializer ? desc.initializer.call(context) : void 0;\n desc.initializer = undefined;\n }\n\n if (desc.initializer === void 0) {\n Object['define' + 'Property'](target, property, desc);\n desc = null;\n }\n\n return desc;\n}\n\nfunction _initializerWarningHelper(descriptor, context) {\n throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');\n}\n\nvar AbpDatetimePickerCustomElement = exports.AbpDatetimePickerCustomElement = (_dec = (0, _aureliaFramework.inject)(Element), _dec2 = (0, _aureliaFramework.bindable)({ defaultBindingMode: _aureliaFramework.bindingMode.twoWay }), _dec3 = (0, _aureliaFramework.bindable)({ defaultBindingMode: _aureliaFramework.bindingMode.twoWay }), _dec4 = (0, _aureliaFramework.bindable)({ defaultBindingMode: _aureliaFramework.bindingMode.twoWay }), _dec(_class = (_class2 = function () {\n function AbpDatetimePickerCustomElement(elm) {\n var _this = this;\n\n _classCallCheck(this, AbpDatetimePickerCustomElement);\n\n _initDefineProp(this, 'element', _descriptor, this);\n\n _initDefineProp(this, 'model', _descriptor2, this);\n\n _initDefineProp(this, 'value', _descriptor3, this);\n\n _initDefineProp(this, 'placeholder', _descriptor4, this);\n\n _initDefineProp(this, 'iconBase', _descriptor5, this);\n\n _initDefineProp(this, 'withDateIcon', _descriptor6, this);\n\n _initDefineProp(this, 'bootstrapVersion', _descriptor7, this);\n\n _initDefineProp(this, 'buttonClass', _descriptor8, this);\n\n _initDefineProp(this, 'readonly', _descriptor9, this);\n\n _initDefineProp(this, 'options', _descriptor10, this);\n\n _initDefineProp(this, 'onHide', _descriptor11, this);\n\n _initDefineProp(this, 'onShow', _descriptor12, this);\n\n _initDefineProp(this, 'onChange', _descriptor13, this);\n\n _initDefineProp(this, 'onError', _descriptor14, this);\n\n _initDefineProp(this, 'onUpdate', _descriptor15, this);\n\n this._events = {};\n this._methods = {};\n\n this.elm = elm;\n\n elm.focus = function () {\n return _this.input.focus();\n };\n }\n\n AbpDatetimePickerCustomElement.prototype.attached = function attached() {\n var _this2 = this;\n\n this.domElm = (0, _jquery2.default)(this.elm).find('.date');\n\n var pickerOptions = this.options || {};\n if (!this.options || this.options && !this.options.icons) {\n pickerOptions.icons = this.attachIconBase();\n }\n\n this.applyExposeEvents();\n this.exposeMethods();\n\n this.options = Object.assign({}, _pickerGlobalOptions.globalPickerOptions, pickerOptions);\n this.domElm.datetimepicker(this.options);\n\n this.domElm.on('dp.change', function (e) {\n if ((0, _moment2.default)(e.date, _this2._format, true).isValid()) {\n _this2.model = (0, _moment2.default)(e.date, _this2._format, true).toDate();\n _this2.value = (0, _moment2.default)(e.date, _this2._format, true).format(_this2._format);\n } else if (!e.date) {\n _this2.model = null;\n _this2.value = null;\n }\n });\n\n this.element = {\n events: this._events,\n options: pickerOptions,\n methods: this._methods\n };\n };\n\n AbpDatetimePickerCustomElement.prototype.attachIconBase = function attachIconBase() {\n var icons = void 0;\n\n if (this.iconBase === 'font-awesome') {\n icons = {\n time: 'fa fa-clock-o',\n date: 'fa fa-calendar',\n up: 'fa fa-arrow-up',\n down: 'fa fa-arrow-down',\n previous: 'fa fa-chevron-left',\n next: 'fa fa-chevron-right',\n today: 'fa fa-calendar-check-o',\n clear: 'fa fa-trash',\n close: 'fa fa-window-close'\n };\n } else if (this.iconBase === 'font-awesome-5') {\n icons = {\n time: 'far fa-clock',\n date: 'fas fa-calendar-alt',\n up: 'fas fa-arrow-up',\n down: 'fas fa-arrow-down',\n previous: 'fas fa-chevron-left',\n next: 'fas fa-chevron-right',\n today: 'far fa-calendar-check',\n clear: 'fas fa-trash',\n close: 'fas fa-window-close'\n };\n } else {\n icons = {\n time: 'glyphicon glyphicon-time',\n date: 'glyphicon glyphicon-calendar',\n up: 'glyphicon glyphicon-chevron-up',\n down: 'glyphicon glyphicon-chevron-down',\n previous: 'glyphicon glyphicon-chevron-left',\n next: 'glyphicon glyphicon-chevron-right',\n today: 'glyphicon glyphicon-screenshot',\n clear: 'glyphicon glyphicon-trash',\n close: 'glyphicon glyphicon-remove'\n };\n }\n return icons;\n };\n\n AbpDatetimePickerCustomElement.prototype.bind = function bind() {\n var pickerOptions = this.options || this.elm.getAttribute('options');\n this.options = Object.assign({}, _pickerGlobalOptions.globalPickerOptions, pickerOptions);\n\n if (this.options) {\n this._format = this._originalDateFormat = this.options.hasOwnProperty('format') ? this.options.format : 'YYYY-MM-DD';\n }\n if (this.model) {\n this._originalDateObject = (0, _moment2.default)(this.model, this._format, true).toDate() || this.elm.getAttribute('model');\n }\n this._originalValue = this.value || this.elm.getAttribute('value');\n var value = this._originalValue || this._originalDateObject;\n\n if (value && (0, _moment2.default)(value, this._format, true).isValid()) {\n if (!this.model) {\n this.model = (0, _moment2.default)(value, this._format, true).toDate();\n }\n if (!this.value) {\n this.value = (0, _moment2.default)(value, this._format, true).format(this._format);\n }\n }\n };\n\n AbpDatetimePickerCustomElement.prototype.applyExposeEvents = function applyExposeEvents() {\n var _this3 = this;\n\n this.domElm.on('dp.hide', function (e) {\n if (typeof _this3.onHide === 'function') {\n _this3.onHide(e);\n }\n if (typeof _this3._events.onHide === 'function') {\n _this3._events.onHide(e);\n }\n });\n\n this.domElm.on('dp.show', function (e) {\n if (typeof _this3.onShow === 'function') {\n _this3.onShow(e);\n }\n if (typeof _this3._events.onShow === 'function') {\n _this3._events.onShow(e);\n }\n });\n\n this.domElm.on('dp.change', function (e) {\n if (typeof _this3.onChange === 'function') {\n _this3.onChange(e);\n }\n if (typeof _this3._events.onChange === 'function') {\n _this3._events.onChange(e);\n }\n });\n\n this.domElm.on('dp.error', function (e) {\n if (typeof _this3.onError === 'function') {\n _this3.onError(e);\n }\n if (typeof _this3._events.onError === 'function') {\n _this3._events.onError(e);\n }\n });\n\n this.domElm.on('dp.update', function (e) {\n if (typeof _this3.onUpdate === 'function') {\n _this3.onUpdate(e);\n }\n if (typeof _this3._events.onUpdate === 'function') {\n _this3._events.onUpdate(e);\n }\n });\n };\n\n AbpDatetimePickerCustomElement.prototype.blur = function blur() {\n var event = _aureliaFramework.DOM.createCustomEvent('blur');\n this.elm.dispatchEvent(event);\n };\n\n AbpDatetimePickerCustomElement.prototype.constructMethod = function constructMethod(methodType, methodName) {\n var _this4 = this;\n\n switch (methodType) {\n case 'getterSetter':\n return function (value) {\n if (value) {\n return _this4.domElm.data('DateTimePicker')[methodName](value);\n }\n return _this4.domElm.data('DateTimePicker')[methodName]();\n };\n case 'caller':\n case 'getter':\n default:\n return function (value) {\n return _this4.domElm.data('DateTimePicker')[methodName]();\n };\n }\n };\n\n AbpDatetimePickerCustomElement.prototype.exposeMethods = function exposeMethods() {\n var _this5 = this;\n\n var methodList = [{ name: 'allowInputToggle', type: 'getterSetter' }, { name: 'calendarWeeks', type: 'getterSetter' }, { name: 'clear', type: 'caller' }, { name: 'collapse', type: 'getterSetter' }, { name: 'date', type: 'getterSetter' }, { name: 'daysOfWeekDisabled', type: 'getterSetter' }, { name: 'dayViewHeaderFormat', type: 'getterSetter' }, { name: 'defaultDate', type: 'getterSetter' }, { name: 'destroy', type: 'caller' }, { name: 'debug', type: 'caller' }, { name: 'disable', type: 'caller' }, { name: 'disabledDates', type: 'getterSetter' }, { name: 'disabledHours', type: 'getterSetter' }, { name: 'disabledTimeIntervals', type: 'getterSetter' }, { name: 'enable', type: 'caller' }, { name: 'enabledDates', type: 'getterSetter' }, { name: 'enabledHours', type: 'getterSetter' }, { name: 'extraFormats', type: 'getterSetter' }, { name: 'focusOnShow', type: 'getterSetter' }, { name: 'format', type: 'getterSetter' }, { name: 'hide', type: 'caller' }, { name: 'icons', type: 'getterSetter' }, { name: 'ignoreReadonly', type: 'getterSetter' }, { name: 'inline', type: 'getterSetter' }, { name: 'keepInvalid', type: 'getterSetter' }, { name: 'keyBinds', type: 'getterSetter' }, { name: 'locale', type: 'getterSetter' }, { name: 'maxDate', type: 'getterSetter' }, { name: 'minDate', type: 'getterSetter' }, { name: 'options', type: 'getterSetter' }, { name: 'parseInputDate', type: 'getterSetter' }, { name: 'show', type: 'caller' }, { name: 'showClear', type: 'getterSetter' }, { name: 'showClose', type: 'getterSetter' }, { name: 'showTodayButton', type: 'getterSetter' }, { name: 'sideBySide', type: 'getterSetter' }, { name: 'stepping', type: 'getterSetter' }, { name: 'toggle', type: 'caller' }, { name: 'toolbarplacement', type: 'getterSetter' }, { name: 'tooltips', type: 'getterSetter' }, { name: 'useCurrent', type: 'getterSetter' }, { name: 'useStrict', type: 'getterSetter' }, { name: 'viewDate', type: 'getterSetter' }, { name: 'viewMode', type: 'getterSetter' }, { name: 'widgetPositioning', type: 'getterSetter' }];\n\n var methods = {};\n methodList.forEach(function (method) {\n methods[method.name] = _this5.constructMethod(method.type, method.name);\n });\n\n this._methods = methods;\n };\n\n AbpDatetimePickerCustomElement.prototype.detached = function detached() {\n if (this.domElm && this.domElm.data('DateTimePicker') && this.domElm.data('DateTimePicker').destroy) {\n this.domElm.data('DateTimePicker').destroy();\n }\n };\n\n AbpDatetimePickerCustomElement.prototype.getOption = function getOption(optionName) {\n var domElm = (0, _jquery2.default)(this.elm).find('.input-group.date');\n if (domElm && typeof domElm.data === 'function' && domElm.data('DateTimePicker')) {\n var options = domElm.data('DateTimePicker').options();\n return options.hasOwnProperty(optionName) ? options[optionName] : null;\n }\n return null;\n };\n\n AbpDatetimePickerCustomElement.prototype.modelChanged = function modelChanged(newValue, oldValue) {\n if (!(0, _moment2.default)(newValue, this._format, true).isValid() && newValue !== null) {\n throw new Error('Datetimepicker, model.bind must be of type Date');\n }\n if (newValue !== oldValue && newValue) {\n if (!oldValue || !(0, _moment2.default)(newValue).isSame(oldValue)) {\n this.value = (0, _moment2.default)(newValue, this._format, true).format(this._format);\n }\n }\n };\n\n AbpDatetimePickerCustomElement.prototype.optionsChanged = function optionsChanged(newValue, oldValue) {\n if (newValue !== oldValue && newValue && this.domElm && this.domElm.data('DateTimePicker')) {\n var newFormat = newValue.format;\n if (newFormat && this._format !== newFormat && (0, _moment2.default)(this.model, newFormat).isValid()) {\n this._format = newFormat;\n this.model = (0, _moment2.default)(this.model, this._format).toDate();\n }\n this.domElm.data('DateTimePicker').options(newValue);\n }\n };\n\n AbpDatetimePickerCustomElement.prototype.valueChanged = function valueChanged(newValue, oldValue) {\n if (newValue !== oldValue && newValue) {\n if ((0, _moment2.default)(newValue, this._format, true).isValid()) {\n if (!oldValue || !(0, _moment2.default)(newValue, this._format, true).isSame(oldValue)) {\n this.model = (0, _moment2.default)(newValue, this._format, true).toDate();\n }\n }\n }\n };\n\n AbpDatetimePickerCustomElement.prototype.parseBool = function parseBool(value) {\n return (/^(true|1)$/i.test(value)\n );\n };\n\n AbpDatetimePickerCustomElement.prototype.showCalendar = function showCalendar() {\n this.domElm.data('DateTimePicker').show();\n };\n\n return AbpDatetimePickerCustomElement;\n}(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'element', [_dec2], {\n enumerable: true,\n initializer: null\n}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'model', [_dec3], {\n enumerable: true,\n initializer: null\n}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'value', [_dec4], {\n enumerable: true,\n initializer: null\n}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, 'placeholder', [_aureliaFramework.bindable], {\n enumerable: true,\n initializer: function initializer() {\n return '';\n }\n}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, 'iconBase', [_aureliaFramework.bindable], {\n enumerable: true,\n initializer: function initializer() {\n return _pickerGlobalOptions.globalExtraOptions.iconBase;\n }\n}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, 'withDateIcon', [_aureliaFramework.bindable], {\n enumerable: true,\n initializer: function initializer() {\n return _pickerGlobalOptions.globalExtraOptions.withDateIcon;\n }\n}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, 'bootstrapVersion', [_aureliaFramework.bindable], {\n enumerable: true,\n initializer: function initializer() {\n return _pickerGlobalOptions.globalExtraOptions.bootstrapVersion;\n }\n}), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, 'buttonClass', [_aureliaFramework.bindable], {\n enumerable: true,\n initializer: function initializer() {\n return _pickerGlobalOptions.globalExtraOptions.buttonClass;\n }\n}), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, 'readonly', [_aureliaFramework.bindable], {\n enumerable: true,\n initializer: function initializer() {\n return false;\n }\n}), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, 'options', [_aureliaFramework.bindable], {\n enumerable: true,\n initializer: function initializer() {\n return {};\n }\n}), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, 'onHide', [_aureliaFramework.bindable], {\n enumerable: true,\n initializer: null\n}), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, 'onShow', [_aureliaFramework.bindable], {\n enumerable: true,\n initializer: null\n}), _descriptor13 = _applyDecoratedDescriptor(_class2.prototype, 'onChange', [_aureliaFramework.bindable], {\n enumerable: true,\n initializer: null\n}), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, 'onError', [_aureliaFramework.bindable], {\n enumerable: true,\n initializer: null\n}), _descriptor15 = _applyDecoratedDescriptor(_class2.prototype, 'onUpdate', [_aureliaFramework.bindable], {\n enumerable: true,\n initializer: null\n})), _class2)) || _class);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.PickerConfig = exports.AbpDatetimePickerCustomElement = undefined;\nexports.configure = configure;\n\nvar _abpDatetimePicker = require('./abp-datetime-picker');\n\nvar _pickerConfig = require('./picker-config');\n\nfunction configure(aurelia, callback) {\n aurelia.globalResources('./abp-datetime-picker');\n\n var config = new _pickerConfig.PickerConfig();\n\n if (typeof callback === 'function') {\n callback(config);\n }\n}\n\nexports.AbpDatetimePickerCustomElement = _abpDatetimePicker.AbpDatetimePickerCustomElement;\nexports.PickerConfig = _pickerConfig.PickerConfig;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.PickerConfig = undefined;\n\nvar _pickerGlobalOptions = require('./picker-global-options');\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar PickerConfig = exports.PickerConfig = function PickerConfig() {\n _classCallCheck(this, PickerConfig);\n\n this.extra = _pickerGlobalOptions.globalExtraOptions;\n this.options = _pickerGlobalOptions.globalPickerOptions;\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar globalExtraOptions = exports.globalExtraOptions = {\n buttonClass: 'btn btn-outline-secondary',\n bootstrapVersion: 3,\n iconBase: 'glyphicon',\n withDateIcon: true\n};\n\nvar globalPickerOptions = exports.globalPickerOptions = {\n allowInputToggle: true\n};","import 'aurelia-polyfills';\nimport { PLATFORM, isInitialized } from 'aurelia-pal';\n\nvar bootstrapPromises = [];\r\nvar startResolve;\r\nvar startPromise = new Promise(function (resolve) { return startResolve = resolve; });\r\nvar host = PLATFORM.global;\r\nvar isNodeLike = typeof process !== 'undefined' && !process.browser;\r\nfunction ready() {\r\n if (!host.document || host.document.readyState === 'complete') {\r\n return Promise.resolve();\r\n }\r\n return new Promise(function (resolve) {\r\n host.document.addEventListener('DOMContentLoaded', completed);\r\n host.addEventListener('load', completed);\r\n function completed() {\r\n host.document.removeEventListener('DOMContentLoaded', completed);\r\n host.removeEventListener('load', completed);\r\n resolve();\r\n }\r\n });\r\n}\r\nfunction createLoader() {\r\n if (PLATFORM.Loader) {\r\n return Promise.resolve(new PLATFORM.Loader());\r\n }\r\n if (typeof AURELIA_WEBPACK_2_0 === 'undefined') {\r\n if (typeof __webpack_require__ !== 'undefined') {\r\n var m = __webpack_require__(require.resolve('aurelia-loader-webpack'));\r\n return Promise.resolve(new m.WebpackLoader());\r\n }\r\n if (host.System && typeof host.System.config === 'function') {\r\n return host.System.normalize('aurelia-bootstrapper').then(function (bsn) {\r\n return host.System.normalize('aurelia-loader-default', bsn);\r\n }).then(function (loaderName) {\r\n return host.System.import(loaderName).then(function (m) { return new m.DefaultLoader(); });\r\n });\r\n }\r\n if (typeof host.require === 'function' && typeof host.define === 'function' && typeof host.define.amd === 'object') {\r\n return new Promise(function (resolve, reject) { return host.require(['aurelia-loader-default'], function (m) { return resolve(new m.DefaultLoader()); }, reject); });\r\n }\r\n if (isNodeLike && typeof module !== 'undefined' && typeof module.require !== 'undefined') {\r\n var m = module.require('aurelia-loader-nodejs');\r\n return Promise.resolve(new m.NodeJsLoader());\r\n }\r\n }\r\n return Promise.reject('No PLATFORM.Loader is defined and there is neither a System API (ES6) or a Require API (AMD) globally available to load your app.');\r\n}\r\nfunction initializePal(loader) {\r\n if (isInitialized)\r\n return Promise.resolve();\r\n var type;\r\n var isRenderer = isNodeLike && (process.type === 'renderer' || process.versions['node-webkit']);\r\n if (isNodeLike && !isRenderer) {\r\n type = 'nodejs';\r\n }\r\n else if (typeof window !== 'undefined') {\r\n type = 'browser';\r\n }\r\n else if (typeof self !== 'undefined') {\r\n type = 'worker';\r\n }\r\n else {\r\n throw new Error('Could not determine platform implementation to load.');\r\n }\r\n return loader.loadModule('aurelia-pal-' + type)\r\n .then(function (palModule) { return type === 'nodejs' && !isInitialized && palModule.globalize() || palModule.initialize(); });\r\n}\r\nfunction preparePlatform(loader) {\r\n var map = function (moduleId, relativeTo) {\r\n return loader.normalize(moduleId, relativeTo)\r\n .then(function (normalized) {\r\n loader.map(moduleId, normalized);\r\n return normalized;\r\n });\r\n };\r\n return initializePal(loader)\r\n .then(function () { return loader.normalize('aurelia-bootstrapper'); })\r\n .then(function (bootstrapperName) {\r\n var frameworkPromise = map(PLATFORM.moduleName('aurelia-framework', { exports: ['Aurelia'] }), bootstrapperName);\r\n return Promise.all([\r\n frameworkPromise,\r\n frameworkPromise.then(function (frameworkName) { return map('aurelia-dependency-injection', frameworkName); }),\r\n map('aurelia-router', bootstrapperName),\r\n map('aurelia-logging-console', bootstrapperName)\r\n ]);\r\n })\r\n .then(function (_a) {\r\n var frameworkName = _a[0];\r\n return loader.loadModule(frameworkName);\r\n })\r\n .then(function (fx) { return startResolve(function () { return new fx.Aurelia(loader); }); });\r\n}\r\nfunction config(appHost, configModuleId, aurelia) {\r\n aurelia.host = appHost;\r\n aurelia.configModuleId = configModuleId || null;\r\n if (configModuleId) {\r\n return aurelia.loader\r\n .loadModule(configModuleId)\r\n .then(function (customConfig) {\r\n if (!customConfig.configure) {\r\n throw new Error(\"Cannot initialize module '\".concat(configModuleId, \"' without a configure function.\"));\r\n }\r\n return customConfig.configure(aurelia);\r\n });\r\n }\r\n aurelia.use\r\n .standardConfiguration()\r\n .developmentLogging();\r\n return aurelia.start().then(function () { return aurelia.setRoot(); });\r\n}\r\nfunction run() {\r\n return ready()\r\n .then(createLoader)\r\n .then(preparePlatform)\r\n .then(function () {\r\n var appHosts = host.document.querySelectorAll('[aurelia-app],[data-aurelia-app]');\r\n for (var i = 0, ii = appHosts.length; i < ii; ++i) {\r\n var appHost = appHosts[i];\r\n var mainModuleId = appHost.getAttribute('aurelia-app') || appHost.getAttribute('data-aurelia-app');\r\n bootstrap(config.bind(null, appHost, mainModuleId));\r\n }\r\n var toConsole = console.error.bind(console);\r\n var bootstraps = bootstrapPromises.map(function (p) { return p.catch(toConsole); });\r\n bootstrapPromises = null;\r\n return Promise.all(bootstraps);\r\n });\r\n}\r\nfunction bootstrap(configure) {\r\n var p = startPromise.then(function (factory) { return configure(factory()); });\r\n if (bootstrapPromises)\r\n bootstrapPromises.push(p);\r\n return p;\r\n}\r\nvar starting = run();\n\nexport { bootstrap, starting };\n//# sourceMappingURL=aurelia-bootstrapper.js.map\n","import { metadata, protocol } from 'aurelia-metadata';\nimport { AggregateError } from 'aurelia-pal';\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n\r\nfunction __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nfunction __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\n\nfunction isInjectable(potentialTarget) {\r\n return !!potentialTarget;\r\n}\r\nfunction autoinject(potentialTarget) {\r\n var deco = function (target) {\r\n if (!target.hasOwnProperty('inject')) {\r\n target.inject = (metadata.getOwn(metadata.paramTypes, target) ||\r\n _emptyParameters).slice();\r\n if (target.inject && target.inject.length > 0) {\r\n if (target.inject[target.inject.length - 1] === Object) {\r\n target.inject.splice(-1, 1);\r\n }\r\n }\r\n }\r\n };\r\n if (isInjectable(potentialTarget)) {\r\n return deco(potentialTarget);\r\n }\r\n return deco;\r\n}\r\nfunction inject() {\r\n var rest = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n rest[_i] = arguments[_i];\r\n }\r\n return function (target, _key, descriptor) {\r\n if (typeof descriptor === 'number') {\r\n autoinject(target);\r\n if (rest.length === 1) {\r\n target.inject[descriptor] = rest[0];\r\n }\r\n return;\r\n }\r\n if (descriptor) {\r\n var fn = descriptor.value;\r\n fn.inject = rest;\r\n }\r\n else {\r\n target.inject = rest;\r\n }\r\n };\r\n}\n\nvar resolver = protocol.create('aurelia:resolver', function (target) {\r\n if (!(typeof target.get === 'function')) {\r\n return 'Resolvers must implement: get(container: Container, key: any): any';\r\n }\r\n return true;\r\n});\r\nvar Strategy;\r\n(function (Strategy) {\r\n Strategy[Strategy[\"instance\"] = 0] = \"instance\";\r\n Strategy[Strategy[\"singleton\"] = 1] = \"singleton\";\r\n Strategy[Strategy[\"transient\"] = 2] = \"transient\";\r\n Strategy[Strategy[\"function\"] = 3] = \"function\";\r\n Strategy[Strategy[\"array\"] = 4] = \"array\";\r\n Strategy[Strategy[\"alias\"] = 5] = \"alias\";\r\n})(Strategy || (Strategy = {}));\r\nfunction isStrategy(actual, expected, state) {\r\n return actual === expected;\r\n}\r\nvar StrategyResolver = (function () {\r\n function StrategyResolver(strategy, state) {\r\n this.strategy = strategy;\r\n this.state = state;\r\n }\r\n StrategyResolver.prototype.get = function (container, key) {\r\n if (isStrategy(this.strategy, Strategy.instance, this.state)) {\r\n return this.state;\r\n }\r\n if (isStrategy(this.strategy, Strategy.singleton, this.state)) {\r\n var singleton = container.invoke(this.state);\r\n this.state = singleton;\r\n this.strategy = 0;\r\n return singleton;\r\n }\r\n if (isStrategy(this.strategy, Strategy.transient, this.state)) {\r\n return container.invoke(this.state);\r\n }\r\n if (isStrategy(this.strategy, Strategy.function, this.state)) {\r\n return this.state(container, key, this);\r\n }\r\n if (isStrategy(this.strategy, Strategy.array, this.state)) {\r\n return this.state[0].get(container, key);\r\n }\r\n if (isStrategy(this.strategy, Strategy.alias, this.state)) {\r\n return container.get(this.state);\r\n }\r\n throw new Error('Invalid strategy: ' + this.strategy);\r\n };\r\n StrategyResolver = __decorate([\r\n resolver(),\r\n __metadata(\"design:paramtypes\", [Number, Object])\r\n ], StrategyResolver);\r\n return StrategyResolver;\r\n}());\r\nvar Lazy = (function () {\r\n function Lazy(key) {\r\n this._key = key;\r\n }\r\n Lazy_1 = Lazy;\r\n Lazy.prototype.get = function (container) {\r\n var _this = this;\r\n return function () { return container.get(_this._key); };\r\n };\r\n Lazy.of = function (key) {\r\n return new Lazy_1(key);\r\n };\r\n var Lazy_1;\r\n Lazy = Lazy_1 = __decorate([\r\n resolver(),\r\n __metadata(\"design:paramtypes\", [Object])\r\n ], Lazy);\r\n return Lazy;\r\n}());\r\nvar All = (function () {\r\n function All(key) {\r\n this._key = key;\r\n }\r\n All_1 = All;\r\n All.prototype.get = function (container) {\r\n return container.getAll(this._key);\r\n };\r\n All.of = function (key) {\r\n return new All_1(key);\r\n };\r\n var All_1;\r\n All = All_1 = __decorate([\r\n resolver(),\r\n __metadata(\"design:paramtypes\", [Object])\r\n ], All);\r\n return All;\r\n}());\r\nvar Optional = (function () {\r\n function Optional(key, checkParent) {\r\n if (checkParent === void 0) { checkParent = true; }\r\n this._key = key;\r\n this._checkParent = checkParent;\r\n }\r\n Optional_1 = Optional;\r\n Optional.prototype.get = function (container) {\r\n if (container.hasResolver(this._key, this._checkParent)) {\r\n return container.get(this._key);\r\n }\r\n return null;\r\n };\r\n Optional.of = function (key, checkParent) {\r\n if (checkParent === void 0) { checkParent = true; }\r\n return new Optional_1(key, checkParent);\r\n };\r\n var Optional_1;\r\n Optional = Optional_1 = __decorate([\r\n resolver(),\r\n __metadata(\"design:paramtypes\", [Object, Boolean])\r\n ], Optional);\r\n return Optional;\r\n}());\r\nvar Parent = (function () {\r\n function Parent(key) {\r\n this._key = key;\r\n }\r\n Parent_1 = Parent;\r\n Parent.prototype.get = function (container) {\r\n return container.parent ? container.parent.get(this._key) : null;\r\n };\r\n Parent.of = function (key) {\r\n return new Parent_1(key);\r\n };\r\n var Parent_1;\r\n Parent = Parent_1 = __decorate([\r\n resolver(),\r\n __metadata(\"design:paramtypes\", [Object])\r\n ], Parent);\r\n return Parent;\r\n}());\r\nvar Factory = (function () {\r\n function Factory(key) {\r\n this._key = key;\r\n }\r\n Factory_1 = Factory;\r\n Factory.prototype.get = function (container) {\r\n var fn = this._key;\r\n var resolver = container.getResolver(fn);\r\n if (resolver && resolver.strategy === Strategy.function) {\r\n fn = resolver.state;\r\n }\r\n return function () {\r\n var rest = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n rest[_i] = arguments[_i];\r\n }\r\n return container.invoke(fn, rest);\r\n };\r\n };\r\n Factory.of = function (key) {\r\n return new Factory_1(key);\r\n };\r\n var Factory_1;\r\n Factory = Factory_1 = __decorate([\r\n resolver(),\r\n __metadata(\"design:paramtypes\", [Object])\r\n ], Factory);\r\n return Factory;\r\n}());\r\nvar NewInstance = (function () {\r\n function NewInstance(key) {\r\n var dynamicDependencies = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n dynamicDependencies[_i - 1] = arguments[_i];\r\n }\r\n this.key = key;\r\n this.asKey = key;\r\n this.dynamicDependencies = dynamicDependencies;\r\n }\r\n NewInstance_1 = NewInstance;\r\n NewInstance.prototype.get = function (container) {\r\n var dynamicDependencies = this.dynamicDependencies.length > 0\r\n ? this.dynamicDependencies.map(function (dependency) {\r\n return dependency['protocol:aurelia:resolver']\r\n ? dependency.get(container)\r\n : container.get(dependency);\r\n })\r\n : undefined;\r\n var fn = this.key;\r\n var resolver = container.getResolver(fn);\r\n if (resolver && resolver.strategy === 3) {\r\n fn = resolver.state;\r\n }\r\n var instance = container.invoke(fn, dynamicDependencies);\r\n container.registerInstance(this.asKey, instance);\r\n return instance;\r\n };\r\n NewInstance.prototype.as = function (key) {\r\n this.asKey = key;\r\n return this;\r\n };\r\n NewInstance.of = function (key) {\r\n var dynamicDependencies = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n dynamicDependencies[_i - 1] = arguments[_i];\r\n }\r\n return new (NewInstance_1.bind.apply(NewInstance_1, [void 0, key].concat(dynamicDependencies)))();\r\n };\r\n var NewInstance_1;\r\n NewInstance = NewInstance_1 = __decorate([\r\n resolver(),\r\n __metadata(\"design:paramtypes\", [Object, Object])\r\n ], NewInstance);\r\n return NewInstance;\r\n}());\r\nfunction getDecoratorDependencies(target) {\r\n autoinject(target);\r\n return target.inject;\r\n}\r\nfunction lazy(keyValue) {\r\n return function (target, _key, index) {\r\n var inject$$1 = getDecoratorDependencies(target);\r\n inject$$1[index] = Lazy.of(keyValue);\r\n };\r\n}\r\nfunction all(keyValue) {\r\n return function (target, _key, index) {\r\n var inject$$1 = getDecoratorDependencies(target);\r\n inject$$1[index] = All.of(keyValue);\r\n };\r\n}\r\nfunction optional(checkParentOrTarget) {\r\n if (checkParentOrTarget === void 0) { checkParentOrTarget = true; }\r\n var deco = function (checkParent) {\r\n return function (target, _key, index) {\r\n var inject$$1 = getDecoratorDependencies(target);\r\n inject$$1[index] = Optional.of(inject$$1[index], checkParent);\r\n };\r\n };\r\n if (typeof checkParentOrTarget === 'boolean') {\r\n return deco(checkParentOrTarget);\r\n }\r\n return deco(true);\r\n}\r\nfunction parent(target, _key, index) {\r\n var inject$$1 = getDecoratorDependencies(target);\r\n inject$$1[index] = Parent.of(inject$$1[index]);\r\n}\r\nfunction factory(keyValue) {\r\n return function (target, _key, index) {\r\n var inject$$1 = getDecoratorDependencies(target);\r\n inject$$1[index] = Factory.of(keyValue);\r\n };\r\n}\r\nfunction newInstance(asKeyOrTarget) {\r\n var dynamicDependencies = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n dynamicDependencies[_i - 1] = arguments[_i];\r\n }\r\n var deco = function (asKey) {\r\n return function (target, _key, index) {\r\n var inject$$1 = getDecoratorDependencies(target);\r\n inject$$1[index] = NewInstance.of.apply(NewInstance, [inject$$1[index]].concat(dynamicDependencies));\r\n if (!!asKey) {\r\n inject$$1[index].as(asKey);\r\n }\r\n };\r\n };\r\n if (arguments.length >= 1) {\r\n return deco(asKeyOrTarget);\r\n }\r\n return deco();\r\n}\n\nfunction validateKey(key) {\r\n if (key === null || key === undefined) {\r\n throw new Error('key/value cannot be null or undefined. Are you trying to inject/register something that doesn\\'t exist with DI?');\r\n }\r\n}\r\nvar _emptyParameters = Object.freeze([]);\r\nmetadata.registration = 'aurelia:registration';\r\nmetadata.invoker = 'aurelia:invoker';\r\nvar resolverDecorates = resolver.decorates;\r\nvar InvocationHandler = (function () {\r\n function InvocationHandler(fn, invoker, dependencies) {\r\n this.fn = fn;\r\n this.invoker = invoker;\r\n this.dependencies = dependencies;\r\n }\r\n InvocationHandler.prototype.invoke = function (container, dynamicDependencies) {\r\n return dynamicDependencies !== undefined\r\n ? this.invoker.invokeWithDynamicDependencies(container, this.fn, this.dependencies, dynamicDependencies)\r\n : this.invoker.invoke(container, this.fn, this.dependencies);\r\n };\r\n return InvocationHandler;\r\n}());\r\nfunction invokeWithDynamicDependencies(container, fn, staticDependencies, dynamicDependencies) {\r\n var i = staticDependencies.length;\r\n var args = new Array(i);\r\n var lookup;\r\n while (i--) {\r\n lookup = staticDependencies[i];\r\n if (lookup === null || lookup === undefined) {\r\n throw new Error('Constructor Parameter with index ' +\r\n i +\r\n ' cannot be null or undefined. Are you trying to inject/register something that doesn\\'t exist with DI?');\r\n }\r\n else {\r\n args[i] = container.get(lookup);\r\n }\r\n }\r\n if (dynamicDependencies !== undefined) {\r\n args = args.concat(dynamicDependencies);\r\n }\r\n return Reflect.construct(fn, args);\r\n}\r\nvar classInvoker = {\r\n invoke: function (container, Type, deps) {\r\n var instances = deps.map(function (dep) { return container.get(dep); });\r\n return Reflect.construct(Type, instances);\r\n },\r\n invokeWithDynamicDependencies: invokeWithDynamicDependencies\r\n};\r\nfunction getDependencies(f) {\r\n if (!f.hasOwnProperty('inject')) {\r\n return [];\r\n }\r\n if (typeof f.inject === 'function') {\r\n return f.inject();\r\n }\r\n return f.inject;\r\n}\r\nvar Container = (function () {\r\n function Container(configuration) {\r\n if (configuration === undefined) {\r\n configuration = {};\r\n }\r\n this._configuration = configuration;\r\n this._onHandlerCreated = configuration.onHandlerCreated;\r\n this._handlers =\r\n configuration.handlers || (configuration.handlers = new Map());\r\n this._resolvers = new Map();\r\n this.root = this;\r\n this.parent = null;\r\n }\r\n Container.prototype.makeGlobal = function () {\r\n Container.instance = this;\r\n return this;\r\n };\r\n Container.prototype.setHandlerCreatedCallback = function (onHandlerCreated) {\r\n this._onHandlerCreated = onHandlerCreated;\r\n this._configuration.onHandlerCreated = onHandlerCreated;\r\n };\r\n Container.prototype.registerInstance = function (key, instance) {\r\n return this.registerResolver(key, new StrategyResolver(0, instance === undefined ? key : instance));\r\n };\r\n Container.prototype.registerSingleton = function (key, fn) {\r\n return this.registerResolver(key, new StrategyResolver(1, fn === undefined ? key : fn));\r\n };\r\n Container.prototype.registerTransient = function (key, fn) {\r\n return this.registerResolver(key, new StrategyResolver(2, fn === undefined ? key : fn));\r\n };\r\n Container.prototype.registerHandler = function (key, handler) {\r\n return this.registerResolver(key, new StrategyResolver(3, handler));\r\n };\r\n Container.prototype.registerAlias = function (originalKey, aliasKey) {\r\n return this.registerResolver(aliasKey, new StrategyResolver(5, originalKey));\r\n };\r\n Container.prototype.registerResolver = function (key, resolver$$1) {\r\n validateKey(key);\r\n var allResolvers = this._resolvers;\r\n var result = allResolvers.get(key);\r\n if (result === undefined) {\r\n allResolvers.set(key, resolver$$1);\r\n }\r\n else if (result.strategy === 4) {\r\n result.state.push(resolver$$1);\r\n }\r\n else {\r\n allResolvers.set(key, new StrategyResolver(4, [result, resolver$$1]));\r\n }\r\n return resolver$$1;\r\n };\r\n Container.prototype.autoRegister = function (key, fn) {\r\n fn = fn === undefined ? key : fn;\r\n if (typeof fn === 'function') {\r\n var registration = metadata.get(metadata.registration, fn);\r\n if (registration === undefined) {\r\n return this.registerResolver(key, new StrategyResolver(1, fn));\r\n }\r\n return registration.registerResolver(this, key, fn);\r\n }\r\n return this.registerResolver(key, new StrategyResolver(0, fn));\r\n };\r\n Container.prototype.autoRegisterAll = function (fns) {\r\n var i = fns.length;\r\n while (i--) {\r\n this.autoRegister(fns[i]);\r\n }\r\n };\r\n Container.prototype.unregister = function (key) {\r\n this._resolvers.delete(key);\r\n };\r\n Container.prototype.hasResolver = function (key, checkParent) {\r\n if (checkParent === void 0) { checkParent = false; }\r\n validateKey(key);\r\n return (this._resolvers.has(key) ||\r\n (checkParent &&\r\n this.parent !== null &&\r\n this.parent.hasResolver(key, checkParent)));\r\n };\r\n Container.prototype.getResolver = function (key) {\r\n return this._resolvers.get(key);\r\n };\r\n Container.prototype.get = function (key) {\r\n validateKey(key);\r\n if (key === Container) {\r\n return this;\r\n }\r\n if (resolverDecorates(key)) {\r\n return key.get(this, key);\r\n }\r\n var resolver$$1 = this._resolvers.get(key);\r\n if (resolver$$1 === undefined) {\r\n if (this.parent === null) {\r\n return this.autoRegister(key).get(this, key);\r\n }\r\n var registration = metadata.get(metadata.registration, key);\r\n if (registration === undefined) {\r\n return this.parent._get(key);\r\n }\r\n return registration.registerResolver(this, key, key).get(this, key);\r\n }\r\n return resolver$$1.get(this, key);\r\n };\r\n Container.prototype._get = function (key) {\r\n var resolver$$1 = this._resolvers.get(key);\r\n if (resolver$$1 === undefined) {\r\n if (this.parent === null) {\r\n return this.autoRegister(key).get(this, key);\r\n }\r\n return this.parent._get(key);\r\n }\r\n return resolver$$1.get(this, key);\r\n };\r\n Container.prototype.getAll = function (key) {\r\n validateKey(key);\r\n var resolver$$1 = this._resolvers.get(key);\r\n if (resolver$$1 === undefined) {\r\n if (this.parent === null) {\r\n return _emptyParameters;\r\n }\r\n return this.parent.getAll(key);\r\n }\r\n if (resolver$$1.strategy === 4) {\r\n var state = resolver$$1.state;\r\n var i = state.length;\r\n var results = new Array(i);\r\n while (i--) {\r\n results[i] = state[i].get(this, key);\r\n }\r\n return results;\r\n }\r\n return [resolver$$1.get(this, key)];\r\n };\r\n Container.prototype.createChild = function () {\r\n var child = new Container(this._configuration);\r\n child.root = this.root;\r\n child.parent = this;\r\n return child;\r\n };\r\n Container.prototype.invoke = function (fn, dynamicDependencies) {\r\n try {\r\n var handler = this._handlers.get(fn);\r\n if (handler === undefined) {\r\n handler = this._createInvocationHandler(fn);\r\n this._handlers.set(fn, handler);\r\n }\r\n return handler.invoke(this, dynamicDependencies);\r\n }\r\n catch (e) {\r\n throw new AggregateError(\"Error invoking \" + fn.name + \". Check the inner error for details.\", e, true);\r\n }\r\n };\r\n Container.prototype._createInvocationHandler = function (fn) {\r\n var dependencies;\r\n if (fn.inject === undefined) {\r\n dependencies =\r\n metadata.getOwn(metadata.paramTypes, fn) || _emptyParameters;\r\n }\r\n else {\r\n dependencies = [];\r\n var ctor = fn;\r\n while (typeof ctor === 'function') {\r\n dependencies.push.apply(dependencies, getDependencies(ctor));\r\n ctor = Object.getPrototypeOf(ctor);\r\n }\r\n }\r\n var invoker = metadata.getOwn(metadata.invoker, fn) || classInvoker;\r\n var handler = new InvocationHandler(fn, invoker, dependencies);\r\n return this._onHandlerCreated !== undefined\r\n ? this._onHandlerCreated(handler)\r\n : handler;\r\n };\r\n return Container;\r\n}());\n\nfunction invoker(value) {\r\n return function (target) {\r\n metadata.define(metadata.invoker, value, target);\r\n };\r\n}\r\nfunction invokeAsFactory(potentialTarget) {\r\n var deco = function (target) {\r\n metadata.define(metadata.invoker, FactoryInvoker.instance, target);\r\n };\r\n return potentialTarget ? deco(potentialTarget) : deco;\r\n}\r\nvar FactoryInvoker = (function () {\r\n function FactoryInvoker() {\r\n }\r\n FactoryInvoker.prototype.invoke = function (container, fn, dependencies) {\r\n var i = dependencies.length;\r\n var args = new Array(i);\r\n while (i--) {\r\n args[i] = container.get(dependencies[i]);\r\n }\r\n return fn.apply(undefined, args);\r\n };\r\n FactoryInvoker.prototype.invokeWithDynamicDependencies = function (container, fn, staticDependencies, dynamicDependencies) {\r\n var i = staticDependencies.length;\r\n var args = new Array(i);\r\n while (i--) {\r\n args[i] = container.get(staticDependencies[i]);\r\n }\r\n if (dynamicDependencies !== undefined) {\r\n args = args.concat(dynamicDependencies);\r\n }\r\n return fn.apply(undefined, args);\r\n };\r\n return FactoryInvoker;\r\n}());\r\nFactoryInvoker.instance = new FactoryInvoker();\n\nfunction registration(value) {\r\n return function (target) {\r\n metadata.define(metadata.registration, value, target);\r\n };\r\n}\r\nfunction transient(key) {\r\n return registration(new TransientRegistration(key));\r\n}\r\nfunction singleton(keyOrRegisterInChild, registerInChild) {\r\n if (registerInChild === void 0) { registerInChild = false; }\r\n return registration(new SingletonRegistration(keyOrRegisterInChild, registerInChild));\r\n}\r\nvar TransientRegistration = (function () {\r\n function TransientRegistration(key) {\r\n this._key = key;\r\n }\r\n TransientRegistration.prototype.registerResolver = function (container, key, fn) {\r\n var existingResolver = container.getResolver(this._key || key);\r\n return existingResolver === undefined\r\n ? container.registerTransient((this._key || key), fn)\r\n : existingResolver;\r\n };\r\n return TransientRegistration;\r\n}());\r\nvar SingletonRegistration = (function () {\r\n function SingletonRegistration(keyOrRegisterInChild, registerInChild) {\r\n if (registerInChild === void 0) { registerInChild = false; }\r\n if (typeof keyOrRegisterInChild === 'boolean') {\r\n this._registerInChild = keyOrRegisterInChild;\r\n }\r\n else {\r\n this._key = keyOrRegisterInChild;\r\n this._registerInChild = registerInChild;\r\n }\r\n }\r\n SingletonRegistration.prototype.registerResolver = function (container, key, fn) {\r\n var targetContainer = this._registerInChild ? container : container.root;\r\n var existingResolver = targetContainer.getResolver(this._key || key);\r\n return existingResolver === undefined\r\n ? targetContainer.registerSingleton(this._key || key, fn)\r\n : existingResolver;\r\n };\r\n return SingletonRegistration;\r\n}());\n\nexport { _emptyParameters, InvocationHandler, Container, autoinject, inject, invoker, invokeAsFactory, FactoryInvoker, registration, transient, singleton, TransientRegistration, SingletonRegistration, resolver, Strategy, StrategyResolver, Lazy, All, Optional, Parent, Factory, NewInstance, getDecoratorDependencies, lazy, all, optional, parent, factory, newInstance };\n","import { a as Renderer, b as createDialogCancelError, c as invokeLifecycle, d as DialogController } from './chunk.js';\nexport { d as DialogController, a as Renderer, b as createDialogCancelError, e as createDialogCloseError } from './chunk.js';\nimport { DOM } from 'aurelia-pal';\nimport { Container } from 'aurelia-dependency-injection';\nimport { ViewSlot, CompositionEngine } from 'aurelia-templating';\n\nvar DefaultDialogSettings = (function () {\r\n function DefaultDialogSettings() {\r\n this.lock = true;\r\n this.startingZIndex = 1000;\r\n this.centerHorizontalOnly = false;\r\n this.rejectOnCancel = false;\r\n this.ignoreTransitions = false;\r\n this.restoreFocus = function (lastActiveElement) { return lastActiveElement.focus(); };\r\n }\r\n return DefaultDialogSettings;\r\n}());\n\nvar RENDERRERS = {\r\n ux: function () { return import('./ux-dialog-renderer.js').then(function (m) { return m.DialogRenderer; }); },\r\n native: function () { return import('./native-dialog-renderer.js').then(function (m) { return m.NativeDialogRenderer; }); }\r\n};\r\nvar DEFAULT_RESOURCES = {\r\n 'ux-dialog': function () { return import('./ux-dialog.js').then(function (m) { return m.UxDialog; }); },\r\n 'ux-dialog-header': function () { return import('./ux-dialog-header.js').then(function (m) { return m.UxDialogHeader; }); },\r\n 'ux-dialog-body': function () { return import('./ux-dialog-body.js').then(function (m) { return m.UxDialogBody; }); },\r\n 'ux-dialog-footer': function () { return import('./ux-dialog-footer.js').then(function (m) { return m.UxDialogFooter; }); },\r\n 'attach-focus': function () { return import('./attach-focus.js').then(function (m) { return m.AttachFocus; }); }\r\n};\r\nvar DEFAULT_CSS_TEXT = function () { return import('./default-styles.js').then(function (cssM) { return cssM['default']; }); };\r\nvar DialogConfiguration = (function () {\r\n function DialogConfiguration(frameworkConfiguration, applySetter) {\r\n var _this = this;\r\n this.renderer = 'ux';\r\n this.cssText = DEFAULT_CSS_TEXT;\r\n this.resources = [];\r\n this.fwConfig = frameworkConfiguration;\r\n this.settings = frameworkConfiguration.container.get(DefaultDialogSettings);\r\n applySetter(function () { return _this._apply(); });\r\n }\r\n DialogConfiguration.prototype._apply = function () {\r\n var _this = this;\r\n var renderer = this.renderer;\r\n var cssText = this.cssText;\r\n return Promise\r\n .all([\r\n typeof renderer === 'string' ? RENDERRERS[renderer]() : renderer,\r\n cssText\r\n ? typeof cssText === 'string'\r\n ? cssText\r\n : cssText()\r\n : ''\r\n ])\r\n .then(function (_a) {\r\n var rendererImpl = _a[0], $cssText = _a[1];\r\n var fwConfig = _this.fwConfig;\r\n fwConfig.transient(Renderer, rendererImpl);\r\n if ($cssText) {\r\n DOM.injectStyles($cssText);\r\n }\r\n return Promise\r\n .all(_this.resources.map(function (name) { return DEFAULT_RESOURCES[name](); }))\r\n .then(function (modules) {\r\n fwConfig.globalResources(modules);\r\n });\r\n });\r\n };\r\n DialogConfiguration.prototype.useDefaults = function () {\r\n return this\r\n .useRenderer('ux')\r\n .useCSS(DEFAULT_CSS_TEXT)\r\n .useStandardResources();\r\n };\r\n DialogConfiguration.prototype.useStandardResources = function () {\r\n Object.keys(DEFAULT_RESOURCES).forEach(this.useResource, this);\r\n return this;\r\n };\r\n DialogConfiguration.prototype.useResource = function (resourceName) {\r\n this.resources.push(resourceName);\r\n return this;\r\n };\r\n DialogConfiguration.prototype.useRenderer = function (renderer, settings) {\r\n this.renderer = renderer;\r\n if (settings) {\r\n Object.assign(this.settings, settings);\r\n }\r\n return this;\r\n };\r\n DialogConfiguration.prototype.useCSS = function (cssText) {\r\n this.cssText = cssText;\r\n return this;\r\n };\r\n return DialogConfiguration;\r\n}());\n\nfunction whenClosed(onfulfilled, onrejected) {\r\n return this.then(function (r) { return r.wasCancelled ? r : r.closeResult; }).then(onfulfilled, onrejected);\r\n}\r\nfunction asDialogOpenPromise(promise) {\r\n promise.whenClosed = whenClosed;\r\n return promise;\r\n}\r\nvar DialogService = (function () {\r\n function DialogService(container, compositionEngine, defaultSettings) {\r\n this.controllers = [];\r\n this.hasOpenDialog = false;\r\n this.hasActiveDialog = false;\r\n this.container = container;\r\n this.compositionEngine = compositionEngine;\r\n this.defaultSettings = defaultSettings;\r\n }\r\n DialogService.prototype.validateSettings = function (settings) {\r\n if (!settings.viewModel && !settings.view) {\r\n throw new Error('Invalid Dialog Settings. You must provide \"viewModel\", \"view\" or both.');\r\n }\r\n };\r\n DialogService.prototype.createCompositionContext = function (childContainer, host, settings) {\r\n return {\r\n container: childContainer.parent,\r\n childContainer: childContainer,\r\n bindingContext: null,\r\n viewResources: null,\r\n model: settings.model,\r\n view: settings.view,\r\n viewModel: settings.viewModel,\r\n viewSlot: new ViewSlot(host, true),\r\n host: host\r\n };\r\n };\r\n DialogService.prototype.ensureViewModel = function (compositionContext) {\r\n if (typeof compositionContext.viewModel === 'object') {\r\n return Promise.resolve(compositionContext);\r\n }\r\n return this.compositionEngine.ensureViewModel(compositionContext);\r\n };\r\n DialogService.prototype._cancelOperation = function (rejectOnCancel) {\r\n if (!rejectOnCancel) {\r\n return { wasCancelled: true };\r\n }\r\n throw createDialogCancelError();\r\n };\r\n DialogService.prototype.composeAndShowDialog = function (compositionContext, dialogController) {\r\n var _this = this;\r\n if (!compositionContext.viewModel) {\r\n compositionContext.bindingContext = { controller: dialogController };\r\n }\r\n return this.compositionEngine\r\n .compose(compositionContext)\r\n .then(function (controller) {\r\n dialogController.controller = controller;\r\n return dialogController.renderer\r\n .showDialog(dialogController)\r\n .then(function () {\r\n _this.controllers.push(dialogController);\r\n _this.hasActiveDialog = _this.hasOpenDialog = !!_this.controllers.length;\r\n }, function (reason) {\r\n if (controller.viewModel) {\r\n invokeLifecycle(controller.viewModel, 'deactivate');\r\n }\r\n return Promise.reject(reason);\r\n });\r\n });\r\n };\r\n DialogService.prototype.createSettings = function (settings) {\r\n settings = Object.assign({}, this.defaultSettings, settings);\r\n if (typeof settings.keyboard !== 'boolean' && !settings.keyboard) {\r\n settings.keyboard = !settings.lock;\r\n }\r\n if (typeof settings.overlayDismiss !== 'boolean') {\r\n settings.overlayDismiss = !settings.lock;\r\n }\r\n Object.defineProperty(settings, 'rejectOnCancel', {\r\n writable: false,\r\n configurable: true,\r\n enumerable: true\r\n });\r\n this.validateSettings(settings);\r\n return settings;\r\n };\r\n DialogService.prototype.open = function (settings) {\r\n var _this = this;\r\n if (settings === void 0) { settings = {}; }\r\n settings = this.createSettings(settings);\r\n var childContainer = settings.childContainer || this.container.createChild();\r\n var resolveCloseResult;\r\n var rejectCloseResult;\r\n var closeResult = new Promise(function (resolve, reject) {\r\n resolveCloseResult = resolve;\r\n rejectCloseResult = reject;\r\n });\r\n var dialogController = childContainer.invoke(DialogController, [settings, resolveCloseResult, rejectCloseResult]);\r\n childContainer.registerInstance(DialogController, dialogController);\r\n closeResult.then(function () {\r\n removeController(_this, dialogController);\r\n }, function () {\r\n removeController(_this, dialogController);\r\n });\r\n var compositionContext = this.createCompositionContext(childContainer, dialogController.renderer.getDialogContainer(), dialogController.settings);\r\n var openResult = this.ensureViewModel(compositionContext).then(function (compositionContext) {\r\n if (!compositionContext.viewModel) {\r\n return true;\r\n }\r\n return invokeLifecycle(compositionContext.viewModel, 'canActivate', dialogController.settings.model);\r\n }).then(function (canActivate) {\r\n if (!canActivate) {\r\n return _this._cancelOperation(dialogController.settings.rejectOnCancel);\r\n }\r\n return _this.composeAndShowDialog(compositionContext, dialogController)\r\n .then(function () { return ({ controller: dialogController, closeResult: closeResult, wasCancelled: false }); });\r\n });\r\n return asDialogOpenPromise(openResult);\r\n };\r\n DialogService.prototype.closeAll = function () {\r\n return Promise.all(this.controllers.slice(0).map(function (controller) {\r\n if (!controller.settings.rejectOnCancel) {\r\n return controller.cancel().then(function (result) {\r\n if (result.wasCancelled) {\r\n return controller;\r\n }\r\n return null;\r\n });\r\n }\r\n return controller.cancel().then(function () { return null; }).catch(function (reason) {\r\n if (reason.wasCancelled) {\r\n return controller;\r\n }\r\n throw reason;\r\n });\r\n })).then(function (unclosedControllers) { return unclosedControllers.filter(function (unclosed) { return !!unclosed; }); });\r\n };\r\n DialogService.inject = [Container, CompositionEngine, DefaultDialogSettings];\r\n return DialogService;\r\n}());\r\nfunction removeController(service, dialogController) {\r\n var i = service.controllers.indexOf(dialogController);\r\n if (i !== -1) {\r\n service.controllers.splice(i, 1);\r\n service.hasActiveDialog = service.hasOpenDialog = !!service.controllers.length;\r\n }\r\n}\n\nfunction configure(frameworkConfig, callback) {\r\n var applyConfig = null;\r\n var config = new DialogConfiguration(frameworkConfig, function (apply) { applyConfig = apply; });\r\n if (typeof callback === 'function') {\r\n callback(config);\r\n }\r\n else {\r\n config.useDefaults();\r\n }\r\n return applyConfig();\r\n}\n\nexport { DefaultDialogSettings, DialogConfiguration, DialogService, configure };\n//# sourceMappingURL=aurelia-dialog.js.map\n","var Renderer = (function () {\r\n function Renderer() {\r\n }\r\n Renderer.prototype.getDialogContainer = function () {\r\n throw new Error('DialogRenderer must implement getDialogContainer().');\r\n };\r\n Renderer.prototype.showDialog = function (dialogController) {\r\n throw new Error('DialogRenderer must implement showDialog().');\r\n };\r\n Renderer.prototype.hideDialog = function (dialogController) {\r\n throw new Error('DialogRenderer must implement hideDialog().');\r\n };\r\n return Renderer;\r\n}());\n\nfunction createDialogCancelError(output) {\r\n var error = new Error('Operation cancelled.');\r\n error.wasCancelled = true;\r\n error.output = output;\r\n return error;\r\n}\n\nfunction createDialogCloseError(output) {\r\n var error = new Error();\r\n error.wasCancelled = false;\r\n error.output = output;\r\n return error;\r\n}\n\nfunction invokeLifecycle(instance, name, model) {\r\n if (typeof instance[name] === 'function') {\r\n return new Promise(function (resolve) {\r\n resolve(instance[name](model));\r\n }).then(function (result) {\r\n if (result !== null && result !== undefined) {\r\n return result;\r\n }\r\n return true;\r\n });\r\n }\r\n return Promise.resolve(true);\r\n}\n\nvar DialogController = (function () {\r\n function DialogController(renderer, settings, resolve, reject) {\r\n this.resolve = resolve;\r\n this.reject = reject;\r\n this.settings = settings;\r\n this.renderer = renderer;\r\n }\r\n DialogController.prototype.releaseResources = function (result) {\r\n var _this = this;\r\n return invokeLifecycle(this.controller.viewModel || {}, 'deactivate', result)\r\n .then(function () { return _this.renderer.hideDialog(_this); })\r\n .then(function () {\r\n _this.controller.unbind();\r\n });\r\n };\r\n DialogController.prototype.cancelOperation = function () {\r\n if (!this.settings.rejectOnCancel) {\r\n return { wasCancelled: true };\r\n }\r\n throw createDialogCancelError();\r\n };\r\n DialogController.prototype.ok = function (output) {\r\n return this.close(true, output);\r\n };\r\n DialogController.prototype.cancel = function (output) {\r\n return this.close(false, output);\r\n };\r\n DialogController.prototype.error = function (output) {\r\n var _this = this;\r\n var closeError = createDialogCloseError(output);\r\n return this.releaseResources(closeError).then(function () { _this.reject(closeError); });\r\n };\r\n DialogController.prototype.close = function (ok, output) {\r\n var _this = this;\r\n if (this.closePromise) {\r\n return this.closePromise;\r\n }\r\n var dialogResult = { wasCancelled: !ok, output: output };\r\n return this.closePromise = invokeLifecycle(this.controller.viewModel || {}, 'canDeactivate', dialogResult)\r\n .catch(function (reason) {\r\n _this.closePromise = undefined;\r\n return Promise.reject(reason);\r\n }).then(function (canDeactivate) {\r\n if (!canDeactivate) {\r\n _this.closePromise = undefined;\r\n return _this.cancelOperation();\r\n }\r\n return _this.releaseResources(dialogResult).then(function () {\r\n if (!_this.settings.rejectOnCancel || ok) {\r\n _this.resolve(dialogResult);\r\n }\r\n else {\r\n _this.reject(createDialogCancelError(output));\r\n }\r\n return { wasCancelled: false };\r\n }).catch(function (reason) {\r\n _this.closePromise = undefined;\r\n return Promise.reject(reason);\r\n });\r\n });\r\n };\r\n DialogController.inject = [Renderer];\r\n return DialogController;\r\n}());\n\nexport { Renderer as a, createDialogCancelError as b, invokeLifecycle as c, DialogController as d, createDialogCloseError as e };\n//# sourceMappingURL=chunk.js.map\n","\n\nimport * as LogManager from 'aurelia-logging';\n\nvar logger = LogManager.getLogger('event-aggregator');\n\nvar Handler = function () {\n function Handler(messageType, callback) {\n \n\n this.messageType = messageType;\n this.callback = callback;\n }\n\n Handler.prototype.handle = function handle(message) {\n if (message instanceof this.messageType) {\n this.callback.call(null, message);\n }\n };\n\n return Handler;\n}();\n\nfunction invokeCallback(callback, data, event) {\n try {\n callback(data, event);\n } catch (e) {\n logger.error(e);\n }\n}\n\nfunction invokeHandler(handler, data) {\n try {\n handler.handle(data);\n } catch (e) {\n logger.error(e);\n }\n}\n\nexport var EventAggregator = function () {\n function EventAggregator() {\n \n\n this.eventLookup = {};\n this.messageHandlers = [];\n }\n\n EventAggregator.prototype.publish = function publish(event, data) {\n var subscribers = void 0;\n var i = void 0;\n\n if (!event) {\n throw new Error('Event was invalid.');\n }\n\n if (typeof event === 'string') {\n subscribers = this.eventLookup[event];\n if (subscribers) {\n subscribers = subscribers.slice();\n i = subscribers.length;\n\n while (i--) {\n invokeCallback(subscribers[i], data, event);\n }\n }\n } else {\n subscribers = this.messageHandlers.slice();\n i = subscribers.length;\n\n while (i--) {\n invokeHandler(subscribers[i], event);\n }\n }\n };\n\n EventAggregator.prototype.subscribe = function subscribe(event, callback) {\n var handler = void 0;\n var subscribers = void 0;\n\n if (!event) {\n throw new Error('Event channel/type was invalid.');\n }\n\n if (typeof event === 'string') {\n handler = callback;\n subscribers = this.eventLookup[event] || (this.eventLookup[event] = []);\n } else {\n handler = new Handler(event, callback);\n subscribers = this.messageHandlers;\n }\n\n subscribers.push(handler);\n\n return {\n dispose: function dispose() {\n var idx = subscribers.indexOf(handler);\n if (idx !== -1) {\n subscribers.splice(idx, 1);\n }\n }\n };\n };\n\n EventAggregator.prototype.subscribeOnce = function subscribeOnce(event, callback) {\n var sub = this.subscribe(event, function (a, b) {\n sub.dispose();\n return callback(a, b);\n });\n\n return sub;\n };\n\n return EventAggregator;\n}();\n\nexport function includeEventsIn(obj) {\n var ea = new EventAggregator();\n\n obj.subscribeOnce = function (event, callback) {\n return ea.subscribeOnce(event, callback);\n };\n\n obj.subscribe = function (event, callback) {\n return ea.subscribe(event, callback);\n };\n\n obj.publish = function (event, data) {\n ea.publish(event, data);\n };\n\n return ea;\n}\n\nexport function configure(config) {\n config.instance(EventAggregator, includeEventsIn(config.aurelia));\n}","import { PLATFORM, DOM } from 'aurelia-pal';\n\nfunction json(body, replacer) {\r\n return JSON.stringify((body !== undefined ? body : {}), replacer);\r\n}\n\nvar retryStrategy = {\r\n fixed: 0,\r\n incremental: 1,\r\n exponential: 2,\r\n random: 3\r\n};\r\nvar defaultRetryConfig = {\r\n maxRetries: 3,\r\n interval: 1000,\r\n strategy: retryStrategy.fixed\r\n};\r\nvar RetryInterceptor = (function () {\r\n function RetryInterceptor(retryConfig) {\r\n this.retryConfig = Object.assign({}, defaultRetryConfig, retryConfig || {});\r\n if (this.retryConfig.strategy === retryStrategy.exponential &&\r\n this.retryConfig.interval <= 1000) {\r\n throw new Error('An interval less than or equal to 1 second is not allowed when using the exponential retry strategy');\r\n }\r\n }\r\n RetryInterceptor.prototype.request = function (request) {\r\n var $r = request;\r\n if (!$r.retryConfig) {\r\n $r.retryConfig = Object.assign({}, this.retryConfig);\r\n $r.retryConfig.counter = 0;\r\n }\r\n $r.retryConfig.requestClone = request.clone();\r\n return request;\r\n };\r\n RetryInterceptor.prototype.response = function (response, request) {\r\n delete request.retryConfig;\r\n return response;\r\n };\r\n RetryInterceptor.prototype.responseError = function (error, request, httpClient) {\r\n var retryConfig = request.retryConfig;\r\n var requestClone = retryConfig.requestClone;\r\n return Promise.resolve().then(function () {\r\n if (retryConfig.counter < retryConfig.maxRetries) {\r\n var result = retryConfig.doRetry ? retryConfig.doRetry(error, request) : true;\r\n return Promise.resolve(result).then(function (doRetry) {\r\n if (doRetry) {\r\n retryConfig.counter++;\r\n return new Promise(function (resolve) { return PLATFORM.global.setTimeout(resolve, calculateDelay(retryConfig) || 0); })\r\n .then(function () {\r\n var newRequest = requestClone.clone();\r\n if (typeof (retryConfig.beforeRetry) === 'function') {\r\n return retryConfig.beforeRetry(newRequest, httpClient);\r\n }\r\n return newRequest;\r\n })\r\n .then(function (newRequest) {\r\n return httpClient.fetch(Object.assign(newRequest, { retryConfig: retryConfig }));\r\n });\r\n }\r\n delete request.retryConfig;\r\n throw error;\r\n });\r\n }\r\n delete request.retryConfig;\r\n throw error;\r\n });\r\n };\r\n return RetryInterceptor;\r\n}());\r\nfunction calculateDelay(retryConfig) {\r\n var interval = retryConfig.interval, strategy = retryConfig.strategy, minRandomInterval = retryConfig.minRandomInterval, maxRandomInterval = retryConfig.maxRandomInterval, counter = retryConfig.counter;\r\n if (typeof (strategy) === 'function') {\r\n return retryConfig.strategy(counter);\r\n }\r\n switch (strategy) {\r\n case (retryStrategy.fixed):\r\n return retryStrategies[retryStrategy.fixed](interval);\r\n case (retryStrategy.incremental):\r\n return retryStrategies[retryStrategy.incremental](counter, interval);\r\n case (retryStrategy.exponential):\r\n return retryStrategies[retryStrategy.exponential](counter, interval);\r\n case (retryStrategy.random):\r\n return retryStrategies[retryStrategy.random](counter, interval, minRandomInterval, maxRandomInterval);\r\n default:\r\n throw new Error('Unrecognized retry strategy');\r\n }\r\n}\r\nvar retryStrategies = [\r\n function (interval) { return interval; },\r\n function (retryCount, interval) { return interval * retryCount; },\r\n function (retryCount, interval) { return retryCount === 1 ? interval : Math.pow(interval, retryCount) / 1000; },\r\n function (retryCount, interval, minRandomInterval, maxRandomInterval) {\r\n if (minRandomInterval === void 0) { minRandomInterval = 0; }\r\n if (maxRandomInterval === void 0) { maxRandomInterval = 60000; }\r\n return Math.random() * (maxRandomInterval - minRandomInterval) + minRandomInterval;\r\n }\r\n];\n\nvar HttpClientConfiguration = (function () {\r\n function HttpClientConfiguration() {\r\n this.baseUrl = '';\r\n this.defaults = {};\r\n this.interceptors = [];\r\n }\r\n HttpClientConfiguration.prototype.withBaseUrl = function (baseUrl) {\r\n this.baseUrl = baseUrl;\r\n return this;\r\n };\r\n HttpClientConfiguration.prototype.withDefaults = function (defaults) {\r\n this.defaults = defaults;\r\n return this;\r\n };\r\n HttpClientConfiguration.prototype.withInterceptor = function (interceptor) {\r\n this.interceptors.push(interceptor);\r\n return this;\r\n };\r\n HttpClientConfiguration.prototype.useStandardConfiguration = function () {\r\n var standardConfig = { credentials: 'same-origin' };\r\n Object.assign(this.defaults, standardConfig, this.defaults);\r\n return this.rejectErrorResponses();\r\n };\r\n HttpClientConfiguration.prototype.rejectErrorResponses = function () {\r\n return this.withInterceptor({ response: rejectOnError });\r\n };\r\n HttpClientConfiguration.prototype.withRetry = function (config) {\r\n var interceptor = new RetryInterceptor(config);\r\n return this.withInterceptor(interceptor);\r\n };\r\n return HttpClientConfiguration;\r\n}());\r\nfunction rejectOnError(response) {\r\n if (!response.ok) {\r\n throw response;\r\n }\r\n return response;\r\n}\n\nvar HttpClient = (function () {\r\n function HttpClient() {\r\n this.activeRequestCount = 0;\r\n this.isRequesting = false;\r\n this.isConfigured = false;\r\n this.baseUrl = '';\r\n this.defaults = null;\r\n this.interceptors = [];\r\n if (typeof fetch === 'undefined') {\r\n throw new Error('HttpClient requires a Fetch API implementation, but the current environment doesn\\'t support it. You may need to load a polyfill such as https://github.com/github/fetch');\r\n }\r\n }\r\n HttpClient.prototype.configure = function (config) {\r\n var normalizedConfig;\r\n if (typeof config === 'object') {\r\n normalizedConfig = { defaults: config };\r\n }\r\n else if (typeof config === 'function') {\r\n normalizedConfig = new HttpClientConfiguration();\r\n normalizedConfig.baseUrl = this.baseUrl;\r\n normalizedConfig.defaults = Object.assign({}, this.defaults);\r\n normalizedConfig.interceptors = this.interceptors;\r\n var c = config(normalizedConfig);\r\n if (HttpClientConfiguration.prototype.isPrototypeOf(c)) {\r\n normalizedConfig = c;\r\n }\r\n }\r\n else {\r\n throw new Error('invalid config');\r\n }\r\n var defaults = normalizedConfig.defaults;\r\n if (defaults && Headers.prototype.isPrototypeOf(defaults.headers)) {\r\n throw new Error('Default headers must be a plain object.');\r\n }\r\n var interceptors = normalizedConfig.interceptors;\r\n if (interceptors && interceptors.length) {\r\n if (interceptors.filter(function (x) { return RetryInterceptor.prototype.isPrototypeOf(x); }).length > 1) {\r\n throw new Error('Only one RetryInterceptor is allowed.');\r\n }\r\n var retryInterceptorIndex = interceptors.findIndex(function (x) { return RetryInterceptor.prototype.isPrototypeOf(x); });\r\n if (retryInterceptorIndex >= 0 && retryInterceptorIndex !== interceptors.length - 1) {\r\n throw new Error('The retry interceptor must be the last interceptor defined.');\r\n }\r\n }\r\n this.baseUrl = normalizedConfig.baseUrl;\r\n this.defaults = defaults;\r\n this.interceptors = normalizedConfig.interceptors || [];\r\n this.isConfigured = true;\r\n return this;\r\n };\r\n HttpClient.prototype.fetch = function (input, init) {\r\n var _this = this;\r\n trackRequestStart(this);\r\n var request = this.buildRequest(input, init);\r\n return processRequest(request, this.interceptors, this).then(function (result) {\r\n var response = null;\r\n if (Response.prototype.isPrototypeOf(result)) {\r\n response = Promise.resolve(result);\r\n }\r\n else if (Request.prototype.isPrototypeOf(result)) {\r\n request = result;\r\n response = fetch(result);\r\n }\r\n else {\r\n throw new Error(\"An invalid result was returned by the interceptor chain. Expected a Request or Response instance, but got [\" + result + \"]\");\r\n }\r\n return processResponse(response, _this.interceptors, request, _this);\r\n })\r\n .then(function (result) {\r\n if (Request.prototype.isPrototypeOf(result)) {\r\n return _this.fetch(result);\r\n }\r\n return result;\r\n })\r\n .then(function (result) {\r\n trackRequestEnd(_this);\r\n return result;\r\n }, function (error) {\r\n trackRequestEnd(_this);\r\n throw error;\r\n });\r\n };\r\n HttpClient.prototype.buildRequest = function (input, init) {\r\n var defaults = this.defaults || {};\r\n var request;\r\n var body;\r\n var requestContentType;\r\n var parsedDefaultHeaders = parseHeaderValues(defaults.headers);\r\n if (Request.prototype.isPrototypeOf(input)) {\r\n request = input;\r\n requestContentType = new Headers(request.headers).get('Content-Type');\r\n }\r\n else {\r\n if (!init) {\r\n init = {};\r\n }\r\n body = init.body;\r\n var bodyObj = body ? { body: body } : null;\r\n var requestInit = Object.assign({}, defaults, { headers: {} }, init, bodyObj);\r\n requestContentType = new Headers(requestInit.headers).get('Content-Type');\r\n request = new Request(getRequestUrl(this.baseUrl, input), requestInit);\r\n }\r\n if (!requestContentType) {\r\n if (new Headers(parsedDefaultHeaders).has('content-type')) {\r\n request.headers.set('Content-Type', new Headers(parsedDefaultHeaders).get('content-type'));\r\n }\r\n else if (body && isJSON(body)) {\r\n request.headers.set('Content-Type', 'application/json');\r\n }\r\n }\r\n setDefaultHeaders(request.headers, parsedDefaultHeaders);\r\n if (body && Blob.prototype.isPrototypeOf(body) && body.type) {\r\n request.headers.set('Content-Type', body.type);\r\n }\r\n return request;\r\n };\r\n HttpClient.prototype.get = function (input, init) {\r\n return this.fetch(input, init);\r\n };\r\n HttpClient.prototype.post = function (input, body, init) {\r\n return callFetch(this, input, body, init, 'POST');\r\n };\r\n HttpClient.prototype.put = function (input, body, init) {\r\n return callFetch(this, input, body, init, 'PUT');\r\n };\r\n HttpClient.prototype.patch = function (input, body, init) {\r\n return callFetch(this, input, body, init, 'PATCH');\r\n };\r\n HttpClient.prototype.delete = function (input, body, init) {\r\n return callFetch(this, input, body, init, 'DELETE');\r\n };\r\n return HttpClient;\r\n}());\r\nvar absoluteUrlRegexp = /^([a-z][a-z0-9+\\-.]*:)?\\/\\//i;\r\nfunction trackRequestStart(client) {\r\n client.isRequesting = !!(++client.activeRequestCount);\r\n if (client.isRequesting) {\r\n var evt_1 = DOM.createCustomEvent('aurelia-fetch-client-request-started', { bubbles: true, cancelable: true });\r\n setTimeout(function () { return DOM.dispatchEvent(evt_1); }, 1);\r\n }\r\n}\r\nfunction trackRequestEnd(client) {\r\n client.isRequesting = !!(--client.activeRequestCount);\r\n if (!client.isRequesting) {\r\n var evt_2 = DOM.createCustomEvent('aurelia-fetch-client-requests-drained', { bubbles: true, cancelable: true });\r\n setTimeout(function () { return DOM.dispatchEvent(evt_2); }, 1);\r\n }\r\n}\r\nfunction parseHeaderValues(headers) {\r\n var parsedHeaders = {};\r\n for (var name_1 in headers || {}) {\r\n if (headers.hasOwnProperty(name_1)) {\r\n parsedHeaders[name_1] = (typeof headers[name_1] === 'function') ? headers[name_1]() : headers[name_1];\r\n }\r\n }\r\n return parsedHeaders;\r\n}\r\nfunction getRequestUrl(baseUrl, url) {\r\n if (absoluteUrlRegexp.test(url)) {\r\n return url;\r\n }\r\n return (baseUrl || '') + url;\r\n}\r\nfunction setDefaultHeaders(headers, defaultHeaders) {\r\n for (var name_2 in defaultHeaders || {}) {\r\n if (defaultHeaders.hasOwnProperty(name_2) && !headers.has(name_2)) {\r\n headers.set(name_2, defaultHeaders[name_2]);\r\n }\r\n }\r\n}\r\nfunction processRequest(request, interceptors, http) {\r\n return applyInterceptors(request, interceptors, 'request', 'requestError', http);\r\n}\r\nfunction processResponse(response, interceptors, request, http) {\r\n return applyInterceptors(response, interceptors, 'response', 'responseError', request, http);\r\n}\r\nfunction applyInterceptors(input, interceptors, successName, errorName) {\r\n var interceptorArgs = [];\r\n for (var _i = 4; _i < arguments.length; _i++) {\r\n interceptorArgs[_i - 4] = arguments[_i];\r\n }\r\n return (interceptors || [])\r\n .reduce(function (chain, interceptor) {\r\n var successHandler = interceptor[successName];\r\n var errorHandler = interceptor[errorName];\r\n return chain.then(successHandler && (function (value) { return successHandler.call.apply(successHandler, [interceptor, value].concat(interceptorArgs)); }) || identity, errorHandler && (function (reason) { return errorHandler.call.apply(errorHandler, [interceptor, reason].concat(interceptorArgs)); }) || thrower);\r\n }, Promise.resolve(input));\r\n}\r\nfunction isJSON(str) {\r\n try {\r\n JSON.parse(str);\r\n }\r\n catch (err) {\r\n return false;\r\n }\r\n return true;\r\n}\r\nfunction identity(x) {\r\n return x;\r\n}\r\nfunction thrower(x) {\r\n throw x;\r\n}\r\nfunction callFetch(client, input, body, init, method) {\r\n if (!init) {\r\n init = {};\r\n }\r\n init.method = method;\r\n if (body) {\r\n init.body = body;\r\n }\r\n return client.fetch(input, init);\r\n}\n\nexport { json, retryStrategy, RetryInterceptor, HttpClientConfiguration, HttpClient };\n","import { Container } from 'aurelia-dependency-injection';\nexport * from 'aurelia-dependency-injection';\nexport * from 'aurelia-binding';\nexport * from 'aurelia-metadata';\nimport { HtmlBehaviorResource, ViewEngine, BindingLanguage, TemplatingEngine, CompositionTransaction, ViewSlot, ViewResources } from 'aurelia-templating';\nexport * from 'aurelia-templating';\nimport { Loader } from 'aurelia-loader';\nexport * from 'aurelia-loader';\nexport * from 'aurelia-task-queue';\nimport { join, relativeToFile } from 'aurelia-path';\nexport * from 'aurelia-path';\nimport { DOM, PLATFORM } from 'aurelia-pal';\nexport * from 'aurelia-pal';\nimport * as TheLogManager from 'aurelia-logging';\nexport { TheLogManager as LogManager };\n\nvar logger = TheLogManager.getLogger('aurelia');\r\nvar extPattern = /\\.[^/.]+$/;\r\nfunction runTasks(config, tasks) {\r\n var current;\r\n var next = function () {\r\n current = tasks.shift();\r\n if (current) {\r\n return Promise.resolve(current(config)).then(next);\r\n }\r\n return Promise.resolve();\r\n };\r\n return next();\r\n}\r\nfunction loadPlugin(fwConfig, loader, info) {\r\n logger.debug(\"Loading plugin \".concat(info.moduleId, \".\"));\r\n if (typeof info.moduleId === 'string') {\r\n fwConfig.resourcesRelativeTo = info.resourcesRelativeTo;\r\n var id = info.moduleId;\r\n if (info.resourcesRelativeTo.length > 1) {\r\n return loader.normalize(info.moduleId, info.resourcesRelativeTo[1])\r\n .then(function (normalizedId) { return _loadPlugin(normalizedId); });\r\n }\r\n return _loadPlugin(id);\r\n }\r\n else if (typeof info.configure === 'function') {\r\n if (fwConfig.configuredPlugins.indexOf(info.configure) !== -1) {\r\n return Promise.resolve();\r\n }\r\n fwConfig.configuredPlugins.push(info.configure);\r\n return Promise.resolve(info.configure.call(null, fwConfig, info.config || {}));\r\n }\r\n throw new Error(invalidConfigMsg(info.moduleId || info.configure, 'plugin'));\r\n function _loadPlugin(moduleId) {\r\n return loader.loadModule(moduleId).then(function (m) {\r\n if ('configure' in m) {\r\n if (fwConfig.configuredPlugins.indexOf(m.configure) !== -1) {\r\n return Promise.resolve();\r\n }\r\n return Promise.resolve(m.configure(fwConfig, info.config || {})).then(function () {\r\n fwConfig.configuredPlugins.push(m.configure);\r\n fwConfig.resourcesRelativeTo = null;\r\n logger.debug(\"Configured plugin \".concat(info.moduleId, \".\"));\r\n });\r\n }\r\n fwConfig.resourcesRelativeTo = null;\r\n logger.debug(\"Loaded plugin \".concat(info.moduleId, \".\"));\r\n });\r\n }\r\n}\r\nfunction loadResources(aurelia, resourcesToLoad, appResources) {\r\n if (Object.keys(resourcesToLoad).length === 0) {\r\n return Promise.resolve();\r\n }\r\n var viewEngine = aurelia.container.get(ViewEngine);\r\n return Promise.all(Object.keys(resourcesToLoad).map(function (n) { return _normalize(resourcesToLoad[n]); }))\r\n .then(function (loads) {\r\n var names = [];\r\n var importIds = [];\r\n loads.forEach(function (l) {\r\n names.push(undefined);\r\n importIds.push(l.importId);\r\n });\r\n return viewEngine.importViewResources(importIds, names, appResources);\r\n });\r\n function _normalize(load) {\r\n var moduleId = load.moduleId;\r\n var ext = getExt(moduleId);\r\n if (isOtherResource(moduleId)) {\r\n moduleId = removeExt(moduleId);\r\n }\r\n return aurelia.loader.normalize(moduleId, load.relativeTo)\r\n .then(function (normalized) {\r\n return {\r\n name: load.moduleId,\r\n importId: isOtherResource(load.moduleId) ? addOriginalExt(normalized, ext) : normalized\r\n };\r\n });\r\n }\r\n function isOtherResource(name) {\r\n var ext = getExt(name);\r\n if (!ext)\r\n return false;\r\n if (ext === '')\r\n return false;\r\n if (ext === '.js' || ext === '.ts')\r\n return false;\r\n return true;\r\n }\r\n function removeExt(name) {\r\n return name.replace(extPattern, '');\r\n }\r\n function addOriginalExt(normalized, ext) {\r\n return removeExt(normalized) + '.' + ext;\r\n }\r\n}\r\nfunction getExt(name) {\r\n var match = name.match(extPattern);\r\n if (match && match.length > 0) {\r\n return (match[0].split('.'))[1];\r\n }\r\n}\r\nfunction loadBehaviors(config) {\r\n return Promise.all(config.behaviorsToLoad.map(function (m) { return m.load(config.container, m.target); })).then(function () {\r\n config.behaviorsToLoad = null;\r\n });\r\n}\r\nfunction assertProcessed(plugins) {\r\n if (plugins.processed) {\r\n throw new Error('This config instance has already been applied. To load more plugins or global resources, create a new FrameworkConfiguration instance.');\r\n }\r\n}\r\nfunction invalidConfigMsg(cfg, type) {\r\n return \"Invalid \".concat(type, \" [\").concat(cfg, \"], \").concat(type, \" must be specified as functions or relative module IDs.\");\r\n}\r\nvar FrameworkConfiguration = (function () {\r\n function FrameworkConfiguration(aurelia) {\r\n var _this = this;\r\n this.aurelia = aurelia;\r\n this.container = aurelia.container;\r\n this.info = [];\r\n this.processed = false;\r\n this.preTasks = [];\r\n this.postTasks = [];\r\n this.behaviorsToLoad = [];\r\n this.configuredPlugins = [];\r\n this.resourcesToLoad = {};\r\n this.preTask(function () { return aurelia.loader.normalize('aurelia-bootstrapper', undefined)\r\n .then(function (name) { return _this.bootstrapperName = name; }); });\r\n this.postTask(function () { return loadResources(aurelia, _this.resourcesToLoad, aurelia.resources); });\r\n }\r\n FrameworkConfiguration.prototype.instance = function (type, instance) {\r\n this.container.registerInstance(type, instance);\r\n return this;\r\n };\r\n FrameworkConfiguration.prototype.singleton = function (type, implementation) {\r\n this.container.registerSingleton(type, implementation);\r\n return this;\r\n };\r\n FrameworkConfiguration.prototype.transient = function (type, implementation) {\r\n this.container.registerTransient(type, implementation);\r\n return this;\r\n };\r\n FrameworkConfiguration.prototype.preTask = function (task) {\r\n assertProcessed(this);\r\n this.preTasks.push(task);\r\n return this;\r\n };\r\n FrameworkConfiguration.prototype.postTask = function (task) {\r\n assertProcessed(this);\r\n this.postTasks.push(task);\r\n return this;\r\n };\r\n FrameworkConfiguration.prototype.feature = function (plugin, config) {\r\n if (config === void 0) { config = {}; }\r\n switch (typeof plugin) {\r\n case 'string':\r\n var hasIndex = /\\/index$/i.test(plugin);\r\n var moduleId = hasIndex || getExt(plugin) ? plugin : plugin + '/index';\r\n var root = hasIndex ? plugin.slice(0, -6) : plugin;\r\n this.info.push({ moduleId: moduleId, resourcesRelativeTo: [root, ''], config: config });\r\n break;\r\n case 'function':\r\n this.info.push({ configure: plugin, config: config || {} });\r\n break;\r\n default:\r\n throw new Error(invalidConfigMsg(plugin, 'feature'));\r\n }\r\n return this;\r\n };\r\n FrameworkConfiguration.prototype.globalResources = function (resources) {\r\n var _this = this;\r\n assertProcessed(this);\r\n var toAdd = Array.isArray(resources) ? resources : arguments;\r\n var resource;\r\n var resourcesRelativeTo = this.resourcesRelativeTo || ['', ''];\r\n for (var i = 0, ii = toAdd.length; i < ii; ++i) {\r\n resource = toAdd[i];\r\n switch (typeof resource) {\r\n case 'string':\r\n var parent_1 = resourcesRelativeTo[0];\r\n var grandParent = resourcesRelativeTo[1];\r\n var name_1 = resource;\r\n if ((resource.startsWith('./') || resource.startsWith('../')) && parent_1 !== '') {\r\n name_1 = join(parent_1, resource);\r\n }\r\n this.resourcesToLoad[name_1] = { moduleId: name_1, relativeTo: grandParent };\r\n break;\r\n case 'function':\r\n var meta = this.aurelia.resources.autoRegister(this.container, resource);\r\n if (meta instanceof HtmlBehaviorResource && meta.elementName !== null) {\r\n if (this.behaviorsToLoad.push(meta) === 1) {\r\n this.postTask(function () { return loadBehaviors(_this); });\r\n }\r\n }\r\n break;\r\n default:\r\n throw new Error(invalidConfigMsg(resource, 'resource'));\r\n }\r\n }\r\n return this;\r\n };\r\n FrameworkConfiguration.prototype.globalName = function (resourcePath, newName) {\r\n assertProcessed(this);\r\n this.resourcesToLoad[resourcePath] = { moduleId: newName, relativeTo: '' };\r\n return this;\r\n };\r\n FrameworkConfiguration.prototype.plugin = function (plugin, pluginConfig) {\r\n assertProcessed(this);\r\n var info;\r\n switch (typeof plugin) {\r\n case 'string':\r\n info = { moduleId: plugin, resourcesRelativeTo: [plugin, ''], config: pluginConfig || {} };\r\n break;\r\n case 'function':\r\n info = { configure: plugin, config: pluginConfig || {} };\r\n break;\r\n default:\r\n throw new Error(invalidConfigMsg(plugin, 'plugin'));\r\n }\r\n this.info.push(info);\r\n return this;\r\n };\r\n FrameworkConfiguration.prototype._addNormalizedPlugin = function (name, config) {\r\n var _this = this;\r\n var plugin = { moduleId: name, resourcesRelativeTo: [name, ''], config: config || {} };\r\n this.info.push(plugin);\r\n this.preTask(function () {\r\n var relativeTo = [name, _this.bootstrapperName];\r\n plugin.moduleId = name;\r\n plugin.resourcesRelativeTo = relativeTo;\r\n return Promise.resolve();\r\n });\r\n return this;\r\n };\r\n FrameworkConfiguration.prototype.defaultBindingLanguage = function () {\r\n return this._addNormalizedPlugin('aurelia-templating-binding');\r\n };\r\n FrameworkConfiguration.prototype.router = function () {\r\n return this._addNormalizedPlugin('aurelia-templating-router');\r\n };\r\n FrameworkConfiguration.prototype.history = function () {\r\n return this._addNormalizedPlugin('aurelia-history-browser');\r\n };\r\n FrameworkConfiguration.prototype.defaultResources = function () {\r\n return this._addNormalizedPlugin('aurelia-templating-resources');\r\n };\r\n FrameworkConfiguration.prototype.eventAggregator = function () {\r\n return this._addNormalizedPlugin('aurelia-event-aggregator');\r\n };\r\n FrameworkConfiguration.prototype.basicConfiguration = function () {\r\n return this.defaultBindingLanguage().defaultResources().eventAggregator();\r\n };\r\n FrameworkConfiguration.prototype.standardConfiguration = function () {\r\n return this.basicConfiguration().history().router();\r\n };\r\n FrameworkConfiguration.prototype.developmentLogging = function (level) {\r\n var _this = this;\r\n var logLevel = level ? TheLogManager.logLevel[level] : undefined;\r\n if (logLevel === undefined) {\r\n logLevel = TheLogManager.logLevel.debug;\r\n }\r\n this.preTask(function () {\r\n return _this.aurelia.loader.normalize('aurelia-logging-console', _this.bootstrapperName).then(function (name) {\r\n return _this.aurelia.loader.loadModule(name).then(function (m) {\r\n TheLogManager.addAppender(new m.ConsoleAppender());\r\n TheLogManager.setLevel(logLevel);\r\n });\r\n });\r\n });\r\n return this;\r\n };\r\n FrameworkConfiguration.prototype.apply = function () {\r\n var _this = this;\r\n if (this.processed) {\r\n return Promise.resolve();\r\n }\r\n return runTasks(this, this.preTasks).then(function () {\r\n var loader = _this.aurelia.loader;\r\n var info = _this.info;\r\n var current;\r\n var next = function () {\r\n current = info.shift();\r\n if (current) {\r\n return loadPlugin(_this, loader, current).then(next);\r\n }\r\n _this.processed = true;\r\n _this.configuredPlugins = null;\r\n return Promise.resolve();\r\n };\r\n return next().then(function () { return runTasks(_this, _this.postTasks); });\r\n });\r\n };\r\n return FrameworkConfiguration;\r\n}());\n\nfunction preventActionlessFormSubmit() {\r\n DOM.addEventListener('submit', function (evt) {\r\n var target = evt.target;\r\n var action = target.action;\r\n if (target.tagName.toLowerCase() === 'form' && !action) {\r\n evt.preventDefault();\r\n }\r\n }, false);\r\n}\r\nvar Aurelia = (function () {\r\n function Aurelia(loader, container, resources) {\r\n this.loader = loader || new PLATFORM.Loader();\r\n this.container = container || (new Container()).makeGlobal();\r\n this.resources = resources || new ViewResources();\r\n this.use = new FrameworkConfiguration(this);\r\n this.logger = TheLogManager.getLogger('aurelia');\r\n this.hostConfigured = false;\r\n this.host = null;\r\n this.use.instance(Aurelia, this);\r\n this.use.instance(Loader, this.loader);\r\n this.use.instance(ViewResources, this.resources);\r\n }\r\n Aurelia.prototype.start = function () {\r\n var _this = this;\r\n if (this._started) {\r\n return this._started;\r\n }\r\n this.logger.info('Aurelia Starting');\r\n return this._started = this.use.apply().then(function () {\r\n preventActionlessFormSubmit();\r\n if (!_this.container.hasResolver(BindingLanguage)) {\r\n var message = 'You must configure Aurelia with a BindingLanguage implementation.';\r\n _this.logger.error(message);\r\n throw new Error(message);\r\n }\r\n _this.logger.info('Aurelia Started');\r\n var evt = DOM.createCustomEvent('aurelia-started', { bubbles: true, cancelable: true });\r\n DOM.dispatchEvent(evt);\r\n return _this;\r\n });\r\n };\r\n Aurelia.prototype.enhance = function (bindingContext, applicationHost) {\r\n var _this = this;\r\n if (bindingContext === void 0) { bindingContext = {}; }\r\n if (applicationHost === void 0) { applicationHost = null; }\r\n this._configureHost(applicationHost || DOM.querySelectorAll('body')[0]);\r\n return new Promise(function (resolve) {\r\n var engine = _this.container.get(TemplatingEngine);\r\n _this.root = engine.enhance({ container: _this.container, element: _this.host, resources: _this.resources, bindingContext: bindingContext });\r\n _this.root.attached();\r\n _this._onAureliaComposed();\r\n resolve(_this);\r\n });\r\n };\r\n Aurelia.prototype.setRoot = function (root, applicationHost) {\r\n var _this = this;\r\n if (root === void 0) { root = null; }\r\n if (applicationHost === void 0) { applicationHost = null; }\r\n var instruction = {};\r\n if (this.root && this.root.viewModel && this.root.viewModel.router) {\r\n this.root.viewModel.router.deactivate();\r\n this.root.viewModel.router.reset();\r\n }\r\n this._configureHost(applicationHost);\r\n var engine = this.container.get(TemplatingEngine);\r\n var transaction = this.container.get(CompositionTransaction);\r\n delete transaction.initialComposition;\r\n if (!root) {\r\n if (this.configModuleId) {\r\n root = relativeToFile('./app', this.configModuleId);\r\n }\r\n else {\r\n root = 'app';\r\n }\r\n }\r\n instruction.viewModel = root;\r\n instruction.container = instruction.childContainer = this.container;\r\n instruction.viewSlot = this.hostSlot;\r\n instruction.host = this.host;\r\n return engine.compose(instruction).then(function (r) {\r\n _this.root = r;\r\n instruction.viewSlot.attached();\r\n _this._onAureliaComposed();\r\n return _this;\r\n });\r\n };\r\n Aurelia.prototype._configureHost = function (applicationHost) {\r\n if (this.hostConfigured) {\r\n return;\r\n }\r\n applicationHost = applicationHost || this.host;\r\n if (!applicationHost || typeof applicationHost === 'string') {\r\n this.host = DOM.getElementById(applicationHost || 'applicationHost');\r\n }\r\n else {\r\n this.host = applicationHost;\r\n }\r\n if (!this.host) {\r\n throw new Error('No applicationHost was specified.');\r\n }\r\n this.hostConfigured = true;\r\n this.host.aurelia = this;\r\n this.hostSlot = new ViewSlot(this.host, true);\r\n this.hostSlot.transformChildNodesIntoView();\r\n this.container.registerInstance(DOM.boundary, this.host);\r\n };\r\n Aurelia.prototype._onAureliaComposed = function () {\r\n var evt = DOM.createCustomEvent('aurelia-composed', { bubbles: true, cancelable: true });\r\n setTimeout(function () { return DOM.dispatchEvent(evt); }, 1);\r\n };\r\n return Aurelia;\r\n}());\n\nexport { Aurelia, FrameworkConfiguration };\n//# sourceMappingURL=aurelia-framework.js.map\n","import { History } from 'aurelia-history';\nimport { DOM, PLATFORM } from 'aurelia-pal';\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nfunction __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\n\nvar LinkHandler = (function () {\r\n function LinkHandler() {\r\n }\r\n LinkHandler.prototype.activate = function (history) { };\r\n LinkHandler.prototype.deactivate = function () { };\r\n return LinkHandler;\r\n}());\r\nvar DefaultLinkHandler = (function (_super) {\r\n __extends(DefaultLinkHandler, _super);\r\n function DefaultLinkHandler() {\r\n var _this = _super.call(this) || this;\r\n _this.handler = function (e) {\r\n var _a = DefaultLinkHandler.getEventInfo(e), shouldHandleEvent = _a.shouldHandleEvent, href = _a.href;\r\n if (shouldHandleEvent) {\r\n e.preventDefault();\r\n _this.history.navigate(href);\r\n }\r\n };\r\n return _this;\r\n }\r\n DefaultLinkHandler.prototype.activate = function (history) {\r\n if (history._hasPushState) {\r\n this.history = history;\r\n DOM.addEventListener('click', this.handler, true);\r\n }\r\n };\r\n DefaultLinkHandler.prototype.deactivate = function () {\r\n DOM.removeEventListener('click', this.handler, true);\r\n };\r\n DefaultLinkHandler.getEventInfo = function (event) {\r\n var $event = event;\r\n var info = {\r\n shouldHandleEvent: false,\r\n href: null,\r\n anchor: null\r\n };\r\n var target = DefaultLinkHandler.findClosestAnchor($event.target);\r\n if (!target || !DefaultLinkHandler.targetIsThisWindow(target)) {\r\n return info;\r\n }\r\n if (hasAttribute(target, 'download')\r\n || hasAttribute(target, 'router-ignore')\r\n || hasAttribute(target, 'data-router-ignore')) {\r\n return info;\r\n }\r\n if ($event.altKey || $event.ctrlKey || $event.metaKey || $event.shiftKey) {\r\n return info;\r\n }\r\n var href = target.getAttribute('href');\r\n info.anchor = target;\r\n info.href = href;\r\n var leftButtonClicked = $event.which === 1;\r\n var isRelative = href && !(href.charAt(0) === '#' || (/^[a-z]+:/i).test(href));\r\n info.shouldHandleEvent = leftButtonClicked && isRelative;\r\n return info;\r\n };\r\n DefaultLinkHandler.findClosestAnchor = function (el) {\r\n while (el) {\r\n if (el.tagName === 'A') {\r\n return el;\r\n }\r\n el = el.parentNode;\r\n }\r\n };\r\n DefaultLinkHandler.targetIsThisWindow = function (target) {\r\n var targetWindow = target.getAttribute('target');\r\n var win = PLATFORM.global;\r\n return !targetWindow ||\r\n targetWindow === win.name ||\r\n targetWindow === '_self';\r\n };\r\n return DefaultLinkHandler;\r\n}(LinkHandler));\r\nvar hasAttribute = function (el, attr) { return el.hasAttribute(attr); };\n\nvar BrowserHistory = (function (_super) {\r\n __extends(BrowserHistory, _super);\r\n function BrowserHistory(linkHandler) {\r\n var _this = _super.call(this) || this;\r\n _this._isActive = false;\r\n _this._checkUrlCallback = _this._checkUrl.bind(_this);\r\n _this.location = PLATFORM.location;\r\n _this.history = PLATFORM.history;\r\n _this.linkHandler = linkHandler;\r\n return _this;\r\n }\r\n BrowserHistory.prototype.activate = function (options) {\r\n if (this._isActive) {\r\n throw new Error('History has already been activated.');\r\n }\r\n var $history = this.history;\r\n var wantsPushState = !!options.pushState;\r\n this._isActive = true;\r\n var normalizedOptions = this.options = Object.assign({}, { root: '/' }, this.options, options);\r\n var rootUrl = this.root = ('/' + normalizedOptions.root + '/').replace(rootStripper, '/');\r\n var wantsHashChange = this._wantsHashChange = normalizedOptions.hashChange !== false;\r\n var hasPushState = this._hasPushState = !!(normalizedOptions.pushState && $history && $history.pushState);\r\n var eventName;\r\n if (hasPushState) {\r\n eventName = 'popstate';\r\n }\r\n else if (wantsHashChange) {\r\n eventName = 'hashchange';\r\n }\r\n PLATFORM.addEventListener(eventName, this._checkUrlCallback);\r\n if (wantsHashChange && wantsPushState) {\r\n var $location = this.location;\r\n var atRoot = $location.pathname.replace(/[^\\/]$/, '$&/') === rootUrl;\r\n if (!hasPushState && !atRoot) {\r\n var fragment = this.fragment = this._getFragment(null, true);\r\n $location.replace(rootUrl + $location.search + '#' + fragment);\r\n return true;\r\n }\r\n else if (hasPushState && atRoot && $location.hash) {\r\n var fragment = this.fragment = this._getHash().replace(routeStripper, '');\r\n $history.replaceState({}, DOM.title, rootUrl + fragment + $location.search);\r\n }\r\n }\r\n if (!this.fragment) {\r\n this.fragment = this._getFragment('');\r\n }\r\n this.linkHandler.activate(this);\r\n if (!normalizedOptions.silent) {\r\n return this._loadUrl('');\r\n }\r\n };\r\n BrowserHistory.prototype.deactivate = function () {\r\n var handler = this._checkUrlCallback;\r\n PLATFORM.removeEventListener('popstate', handler);\r\n PLATFORM.removeEventListener('hashchange', handler);\r\n this._isActive = false;\r\n this.linkHandler.deactivate();\r\n };\r\n BrowserHistory.prototype.getAbsoluteRoot = function () {\r\n var $location = this.location;\r\n var origin = createOrigin($location.protocol, $location.hostname, $location.port);\r\n return \"\" + origin + this.root;\r\n };\r\n BrowserHistory.prototype.navigate = function (fragment, _a) {\r\n var _b = _a === void 0 ? {} : _a, _c = _b.trigger, trigger = _c === void 0 ? true : _c, _d = _b.replace, replace = _d === void 0 ? false : _d;\r\n var location = this.location;\r\n if (fragment && absoluteUrl.test(fragment)) {\r\n location.href = fragment;\r\n return true;\r\n }\r\n if (!this._isActive) {\r\n return false;\r\n }\r\n fragment = this._getFragment(fragment || '');\r\n if (this.fragment === fragment && !replace) {\r\n return false;\r\n }\r\n this.fragment = fragment;\r\n var url = this.root + fragment;\r\n if (fragment === '' && url !== '/') {\r\n url = url.slice(0, -1);\r\n }\r\n if (this._hasPushState) {\r\n url = url.replace('//', '/');\r\n this.history[replace ? 'replaceState' : 'pushState']({}, DOM.title, url);\r\n }\r\n else if (this._wantsHashChange) {\r\n updateHash(location, fragment, replace);\r\n }\r\n else {\r\n location.assign(url);\r\n }\r\n if (trigger) {\r\n return this._loadUrl(fragment);\r\n }\r\n return true;\r\n };\r\n BrowserHistory.prototype.navigateBack = function () {\r\n this.history.back();\r\n };\r\n BrowserHistory.prototype.setTitle = function (title) {\r\n DOM.title = title;\r\n };\r\n BrowserHistory.prototype.setState = function (key, value) {\r\n var $history = this.history;\r\n var state = Object.assign({}, $history.state);\r\n var _a = this.location, pathname = _a.pathname, search = _a.search, hash = _a.hash;\r\n state[key] = value;\r\n $history.replaceState(state, null, \"\" + pathname + search + hash);\r\n };\r\n BrowserHistory.prototype.getState = function (key) {\r\n var state = Object.assign({}, this.history.state);\r\n return state[key];\r\n };\r\n BrowserHistory.prototype.getHistoryIndex = function () {\r\n var historyIndex = this.getState('HistoryIndex');\r\n if (historyIndex === undefined) {\r\n historyIndex = this.history.length - 1;\r\n this.setState('HistoryIndex', historyIndex);\r\n }\r\n return historyIndex;\r\n };\r\n BrowserHistory.prototype.go = function (movement) {\r\n this.history.go(movement);\r\n };\r\n BrowserHistory.prototype._getHash = function () {\r\n return this.location.hash.substr(1);\r\n };\r\n BrowserHistory.prototype._getFragment = function (fragment, forcePushState) {\r\n var rootUrl;\r\n if (!fragment) {\r\n if (this._hasPushState || !this._wantsHashChange || forcePushState) {\r\n var location_1 = this.location;\r\n fragment = location_1.pathname + location_1.search;\r\n rootUrl = this.root.replace(trailingSlash, '');\r\n if (!fragment.indexOf(rootUrl)) {\r\n fragment = fragment.substr(rootUrl.length);\r\n }\r\n }\r\n else {\r\n fragment = this._getHash();\r\n }\r\n }\r\n return '/' + fragment.replace(routeStripper, '');\r\n };\r\n BrowserHistory.prototype._checkUrl = function () {\r\n var current = this._getFragment('');\r\n if (current !== this.fragment) {\r\n this._loadUrl('');\r\n }\r\n };\r\n BrowserHistory.prototype._loadUrl = function (fragmentOverride) {\r\n var fragment = this.fragment = this._getFragment(fragmentOverride);\r\n return this.options.routeHandler ?\r\n this.options.routeHandler(fragment) :\r\n false;\r\n };\r\n BrowserHistory.inject = [LinkHandler];\r\n return BrowserHistory;\r\n}(History));\r\nvar routeStripper = /^#?\\/*|\\s+$/g;\r\nvar rootStripper = /^\\/+|\\/+$/g;\r\nvar trailingSlash = /\\/$/;\r\nvar absoluteUrl = /^([a-z][a-z0-9+\\-.]*:)?\\/\\//i;\r\nfunction updateHash($location, fragment, replace) {\r\n if (replace) {\r\n var href = $location.href.replace(/(javascript:|#).*$/, '');\r\n $location.replace(href + '#' + fragment);\r\n }\r\n else {\r\n $location.hash = '#' + fragment;\r\n }\r\n}\r\nfunction createOrigin(protocol, hostname, port) {\r\n return protocol + \"//\" + hostname + (port ? ':' + port : '');\r\n}\n\nfunction configure(config) {\r\n var $config = config;\r\n $config.singleton(History, BrowserHistory);\r\n $config.transient(LinkHandler, DefaultLinkHandler);\r\n}\n\nexport { BrowserHistory, DefaultLinkHandler, LinkHandler, configure };\n//# sourceMappingURL=aurelia-history-browser.js.map\n","\n\nfunction mi(name) {\n throw new Error('History must implement ' + name + '().');\n}\n\nexport var History = function () {\n function History() {\n \n }\n\n History.prototype.activate = function activate(options) {\n mi('activate');\n };\n\n History.prototype.deactivate = function deactivate() {\n mi('deactivate');\n };\n\n History.prototype.getAbsoluteRoot = function getAbsoluteRoot() {\n mi('getAbsoluteRoot');\n };\n\n History.prototype.navigate = function navigate(fragment, options) {\n mi('navigate');\n };\n\n History.prototype.navigateBack = function navigateBack() {\n mi('navigateBack');\n };\n\n History.prototype.setTitle = function setTitle(title) {\n mi('setTitle');\n };\n\n History.prototype.setState = function setState(key, value) {\n mi('setState');\n };\n\n History.prototype.getState = function getState(key) {\n mi('getState');\n };\n\n History.prototype.getHistoryIndex = function getHistoryIndex() {\n mi('getHistoryIndex');\n };\n\n History.prototype.go = function go(movement) {\n mi('go');\n };\n\n return History;\n}();","// Module\nvar code = \"\\r\\n\";\n// Exports\nexport default code;"],"names":[],"sourceRoot":""}