{"version":3,"file":"app-31743c5a.9729664bca28a8e6916d.bundle.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAmBA;AAAA;AAjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAnGA;;;;;;;;;;;;;;;;;;;;;;;;;;AChBA;AACA;AACA;AAEA;AAGA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AAAA;AAFA;AAGA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AACA;AAEA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAEA;AACA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAEA;AACA;AACA;AACA;AAAA;AAEA;AACA;AACA;AAAA;AAEA;AACA;AACA;AACA;AAAA;AACA;AAEA;AACA;AACA;AAAA;AAEA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AAEA;AACA;AAAA;AAEA;AACA;AAAA;AAEA;AACA;AACA;AACA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAEA;AACA;AACA;AAAA;AAEA;AAAA;AAAA;AACA;AAAA;AACA;AAEA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AACA;AAEA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAoBA;AAEA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAEA;AAAA;AAAA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;;AAaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC5hBA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AAKA;AACA;AAEA;AACA;AACA;AAEA;AACA;AAIA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AAMA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AAKA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AAKA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAQA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AAMA;AACA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;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;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA;AACA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAQA;AACA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA;AACA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAUA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAQA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAUA;AACA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAEA;AACA;AACA;AAEA;AACA;AAeA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAEA;AACA;AACA;AAEA;AACA;AAUA;AACA;;;;;;;;;;;;;;;;ACzfA;AAEA;AAQA;AAAA;AANA;AACA;AAEA;AAIA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AA7BA;;;;;;;;;;;;;;;;ACFA;AAEA;AAUA;AAAA;AARA;AACA;AAEA;AACA;AACA;AAIA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AACA;AA5CA;;;;;;;;;;;;;;;;ACFA;AAEA;AAYA;AAAA;AAXA;AAGA;AACA;AACA;AACA;AACA;AAAA;AAKA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;;AAEA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;ACzMA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AAaA;AAAA;AAXA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AApIA;;;;;;;;;;;;;;;;;ACRA;;AAEA;AACA;AAiBA;AAAA;AAhBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;;AAEA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AAAA;AAAA;AACA;AACA;AAEA;AAAA;AAAA;AACA;AACA;AACA;AACA;;AAEA;AACA;AAAA;AAAA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;AClHA;AACA;AAEA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;ACRA;AACA;AACA;AACA;AACA;AAEA;AA2BA;AAAA;AAzBA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AAEA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AAEA;AAWA;AAAA;AAVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;;;;;;;;;;;;;;;;;;;;;;;AC1aA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAWA;AAAA;AATA;AAEA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAMA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACtPA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AAKA;AAAA;AAHA;AAIA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AAAA;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;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AAAA;AAEA;AAAA;AAEA;AACA;AACA;AAAA;AAEA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACpSA;AAGA;AAAA;AAFA;AA4vBA;AACA;AA1vBA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AAAA;AAAA;AAAA;AACA;;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;;AAEA;AACA;AAIA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;AAEA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AAKA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AACA;AACA;AACA;AACA;AAEA;;AAEA;AACA;AACA;AACA;AAAA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AACA;AAEA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AAIA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AAKA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAEA;AACA;AACA;AACA;AAEA;AAEA;AAIA;AAEA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AAMA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;;AAEA;AACA;AAEA;AACA;AAGA;AAEA;AACA;AAEA;AACA;AACA;AAEA;AACA;;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAEA;;;;;;;;;;;;;;;;;;AC9lCA;AACA;AACA;AAEA;AAIA;AAAA;AACA;AACA;AAEA;AACA;AACA;AAVA;;;;;;;;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACPA;AACA;AACA;AACA;;;;;;;;;;;;ACHA;AACA;AACA;AACA","sources":["webpack://www.zeusteam.com/./src/common/bootstrapper.js","webpack://www.zeusteam.com/./src/common/common.js","webpack://www.zeusteam.com/./src/common/constants.js","webpack://www.zeusteam.com/./src/common/content.js","webpack://www.zeusteam.com/./src/common/dialogs/confirm/confirm-dialog.js","webpack://www.zeusteam.com/./src/common/drawer.js","webpack://www.zeusteam.com/./src/common/i18n.js","webpack://www.zeusteam.com/./src/common/models.js","webpack://www.zeusteam.com/./src/common/polyfills.js","webpack://www.zeusteam.com/./src/common/sanitizer.js","webpack://www.zeusteam.com/./src/common/security.js","webpack://www.zeusteam.com/./src/common/server.js","webpack://www.zeusteam.com/./src/common/ui.js","webpack://www.zeusteam.com/./src/common/utils.js","webpack://www.zeusteam.com/./src/footer.js","webpack://www.zeusteam.com/./src/footer.scss","webpack://www.zeusteam.com/./src/common/dialogs/confirm/confirm-dialog.html","webpack://www.zeusteam.com/./src/footer.html"],"sourcesContent":["import { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { Security } from 'common/security';\r\nimport { I18n } from 'common/i18n';\r\nimport { UiWidgets } from 'services/ui-widgets';\r\nimport { Tasks } from 'services/tasks';\r\nimport { Messages } from 'services/messages';\r\nimport { Menus } from 'services/menus';\r\nimport { Carriers } from 'services/carriers';\r\nimport { MemberConfig } from 'services/member-config';\r\nimport { Dashboards } from 'services/dashboards';\r\nimport { Config } from 'services/config';\r\nimport { Api } from 'common/server';\r\nimport { AgentNumbers } from 'services/agent-numbers';\r\nimport { ToDos } from 'services/to-dos';\r\nimport { c } from 'common/common';\r\n\r\nexport class Bootstrapper {\r\n static inject = [EventAggregator, Security, I18n, UiWidgets, Tasks, Messages, Menus, Carriers, MemberConfig, Dashboards, Config, Api, AgentNumbers, ToDos];\r\n _ea;\r\n _security;\r\n _i18n;\r\n _uiWidgets;\r\n _tasks;\r\n _messages;\r\n _menus;\r\n _carriers;\r\n _memberConfig;\r\n _dashboards;\r\n _config;\r\n _api;\r\n _agentNumbers;\r\n _toDos;\r\n\r\n _handlers = [];\r\n\r\n constructor(ea, security, i18n, uiWidgets, tasks, messages, menus, carriers, memberConfig, dashboards, config, api, agentNumbers, toDos) {\r\n this._ea = ea;\r\n this._security = security;\r\n this._i18n = i18n;\r\n this._uiWidgets = uiWidgets;\r\n this._tasks = tasks;\r\n this._messages = messages;\r\n this._menus = menus;\r\n this._carriers = carriers;\r\n this._memberConfig = memberConfig;\r\n this._dashboards = dashboards;\r\n this._config = config;\r\n this._api = api;\r\n this._agentNumbers = agentNumbers;\r\n this._toDos = toDos;\r\n\r\n this._handlers.push(this._ea.subscribe(c.EventKeys.loginAuthenticationUpdated, () => {\r\n if (this._security.isAuthenticated) return;\r\n this._handleLogout();\r\n }));\r\n }\r\n\r\n async forApp() {\r\n try {\r\n await this._security.loadState();\r\n const initializers = [\r\n this._config.initialize(),\r\n this._i18n.initialize(),\r\n this._uiWidgets.initialize(),\r\n this._api.initialize(),\r\n ];\r\n await Promise.all(initializers);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n async forLogin() {\r\n try {\r\n const initializers = [\r\n this._memberConfig.initialize(),\r\n this._dashboards.initialize(),\r\n ];\r\n await Promise.all(initializers);\r\n await this._menus.initialize();\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n /**\r\n * Process any of the API calls that can complete AFTER login in the background\r\n */\r\n forLoginBackground() {\r\n window.setTimeout(() => this._forLoginBackground(), 2500);\r\n }\r\n\r\n async _forLoginBackground() {\r\n try {\r\n const initializers = [\r\n this._messages.initialize(),\r\n this._tasks.initialize(),\r\n this._toDos.initialize(),\r\n ];\r\n await Promise.all(initializers);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n _handleLogout() {\r\n this._tasks.dispose();\r\n this._messages.dispose();\r\n this._menus.dispose()\r\n this._carriers.dispose();\r\n this._memberConfig.dispose();\r\n this._dashboards.dispose();\r\n this._agentNumbers.dispose();\r\n this._toDos.dispose();\r\n }\r\n}\r\n","import environment from '../../config/environment.json';\r\nimport { Capacitor } from '@capacitor/core';\r\nconst ShortUniqueId = require('short-unique-id');\r\n\r\nclass Geography {\r\n\tusStates = [];\r\n\r\n\tconstructor() {\r\n\t\tthis.loadUsStates();\r\n\t}\r\n\r\n\tloadUsStates() {\r\n\t\tthis.usStates.push(new UsState('Alabama', 'AL'));\r\n\t\tthis.usStates.push(new UsState('Alaska', 'AK'));\r\n\t\tthis.usStates.push(new UsState('Arizona', 'AZ'));\r\n\t\tthis.usStates.push(new UsState('Arkansas', 'AR'));\r\n\t\tthis.usStates.push(new UsState('California', 'CA'));\r\n\t\tthis.usStates.push(new UsState('Colorado', 'CO'));\r\n\t\tthis.usStates.push(new UsState('Connecticut', 'CT'));\r\n\t\tthis.usStates.push(new UsState('Washington DC', 'DC'));\r\n\t\tthis.usStates.push(new UsState('Delaware', 'DE'));\r\n\t\tthis.usStates.push(new UsState('Florida', 'FL'));\r\n\t\tthis.usStates.push(new UsState('Georgia', 'GA'));\r\n\t\tthis.usStates.push(new UsState('Hawaii', 'HI'));\r\n\t\tthis.usStates.push(new UsState('Idaho', 'ID'));\r\n\t\tthis.usStates.push(new UsState('Illinois', 'IL'));\r\n\t\tthis.usStates.push(new UsState('Indiana', 'IN'));\r\n\t\tthis.usStates.push(new UsState('Iowa', 'IA'));\r\n\t\tthis.usStates.push(new UsState('Kansas', 'KS'));\r\n\t\tthis.usStates.push(new UsState('Kentucky', 'KY'));\r\n\t\tthis.usStates.push(new UsState('Louisiana', 'LA'));\r\n\t\tthis.usStates.push(new UsState('Maine', 'ME'));\r\n\t\tthis.usStates.push(new UsState('Maryland', 'MD'));\r\n\t\tthis.usStates.push(new UsState('Massachusetts', 'MA'));\r\n\t\tthis.usStates.push(new UsState('Michigan', 'MI'));\r\n\t\tthis.usStates.push(new UsState('Minnesota', 'MN'));\r\n\t\tthis.usStates.push(new UsState('Mississippi', 'MS'));\r\n\t\tthis.usStates.push(new UsState('Missouri', 'MO'));\r\n\t\tthis.usStates.push(new UsState('Montana', 'MT'));\r\n\t\tthis.usStates.push(new UsState('Nebraska', 'NE'));\r\n\t\tthis.usStates.push(new UsState('Nevada', 'NV'));\r\n\t\tthis.usStates.push(new UsState('New Hampshire', 'NH'));\r\n\t\tthis.usStates.push(new UsState('New Jersey', 'NJ'));\r\n\t\tthis.usStates.push(new UsState('New Mexico', 'NM'));\r\n\t\tthis.usStates.push(new UsState('New York', 'NY'));\r\n\t\tthis.usStates.push(new UsState('North Carolina', 'NC'));\r\n\t\tthis.usStates.push(new UsState('North Dakota', 'ND'));\r\n\t\tthis.usStates.push(new UsState('Ohio', 'OH'));\r\n\t\tthis.usStates.push(new UsState('Oklahoma', 'OK'));\r\n\t\tthis.usStates.push(new UsState('Oregon', 'OR'));\r\n\t\tthis.usStates.push(new UsState('Pennsylvania', 'PA'));\r\n\t\tthis.usStates.push(new UsState('Rhode Island', 'RI'));\r\n\t\tthis.usStates.push(new UsState('South Carolina', 'SC'));\r\n\t\tthis.usStates.push(new UsState('South Dakota', 'SD'));\r\n\t\tthis.usStates.push(new UsState('Tennessee', 'TN'));\r\n\t\tthis.usStates.push(new UsState('Texas', 'TX'));\r\n\t\tthis.usStates.push(new UsState('Utah', 'UT'));\r\n\t\tthis.usStates.push(new UsState('Vermont', 'VT'));\r\n\t\tthis.usStates.push(new UsState('Virginia', 'VA'));\r\n\t\tthis.usStates.push(new UsState('Washington', 'WA'));\r\n\t\tthis.usStates.push(new UsState('West Virginia', 'WV'));\r\n\t\tthis.usStates.push(new UsState('Wisconsin', 'WI'));\r\n\t\tthis.usStates.push(new UsState('Wyoming', 'WY'));\r\n\t}\r\n}\r\nclass UsState {\r\n\tname = '';\r\n\tabbr = '';\r\n\tconstructor(name, abbr){\r\n\t\tthis.name = name;\r\n\t\tthis.abbr = abbr;\r\n\t}\r\n}\r\n\r\nclass EventKeys {\r\n loginAuthenticationUpdated = 'zeus.login-authentication-updated';\r\n login = {\r\n timedOut: 'zeus.login.timed-out',\r\n };\r\n memberUpdated = 'zeus.member-updated';\r\n\tsearchAndSelectMemberSelected = 'zeus.search-and-select-member-selected';\r\n uiWidgetUpdated = 'zeus.content.uiwidget.updated';\r\n reloadUiWidget = 'zeus.content.reload-uiwidget';\r\n openContentEditor = 'zeus.content.open-editor';\r\n tasks = {\r\n updated: 'zeus.tasks.updated',\r\n };\r\n messages = {\r\n updated: 'zeus.messages.updated',\r\n };\r\n site = {\r\n openLightbox: 'zeus.site.open-lightbox',\r\n openProfile: 'zeus.show-member-profile-popup',\r\n openPolicy: 'zeus.show-policy-popup',\r\n openLead: 'zeus.show-lead-popup',\r\n leadClosed: 'zeus.lead-popup-closed',\r\n openRightPanel: 'zeus.site.open-right-panel',\r\n modeChanged: 'zeus.site.mode-changed',\r\n setPageTitle: 'zeus.site.set-page-title',\r\n hideRegistrationLinks: 'zeus.site.hide-registration-links',\r\n };\r\n menu = {\r\n changed: 'zeus.menu.changed',\r\n reset: 'zeus.menu.reset',\r\n updated: 'zeus.menu.updated',\r\n };\r\n navigation = {\r\n changing: 'zeus.navigation.changing',\r\n changed: 'zeus.navigation.changed',\r\n };\r\n dashboard = {\r\n updated: 'zeus.dashboard.updated',\r\n syncTimePeriod: 'zeus.dashboard.syncTimePeriod',\r\n builderDetached: 'zeus.dashboard.builderDetached',\r\n };\r\n newClientVersion = 'zeus.new-client-version';\r\n keyboard = {\r\n opened: 'zeus.keyboard.opened',\r\n closed: 'zeus.keyboard.closed',\r\n };\r\n toDos = {\r\n updated: 'zeus.todos.updated',\r\n todayUpdated: 'zeus.todos.todayUpdated',\r\n toDoUpdated: (aboutId) => { return `zeus-todos.toDoUpdated-${aboutId}`; },\r\n };\r\n notes = {\r\n updated: 'zeus.notes.updated',\r\n };\r\n onboarding = {\r\n completed: 'zeus.onboarding.completed',\r\n };\r\n agent = {\r\n profileImageUpdated: 'zeus.agent.profile-image-updated',\r\n profileUpdated: 'zeus.agent.profile-updated',\r\n configUpdated: 'zeus.agent.config-updated',\r\n };\r\n lead = {\r\n updated: 'zeus.lead.updated',\r\n profileUpdated: 'zeus.lead.profile-updated',\r\n tabHeader: 'zeus.lead.tab-header',\r\n changeScriptType: 'zeus.lead.change-script-type',\r\n changeScriptPerson: 'zeus.lead.change-script-person',\r\n deleted: 'zeus.lead.deleted',\r\n };\r\n mentor = {\r\n assigned: 'zeus.mentor.assigned',\r\n removed: 'zeus.mentor.removed',\r\n };\r\n fileFor = {\r\n updated: (forId) => { return `zeus.file-for.updated-${forId}`; }\r\n };\r\n}\r\n\r\nclass RegEx {\r\n strongPassword = /^.*(?=.{6,})(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[~!@#$%^&*()<>{}|\\? \"]).*$/;\r\n isNumber = /\\d/g;\r\n zipCode = /\\d{5}(-\\d{4})?/;\r\n phoneNumber = /^[\\+]?[(]?[0-9]{3}[)]?[-\\s\\.]?[0-9]{3}[-\\s\\.]?[0-9]{4,6}$/im;\r\n slug = /^[0-9A-Za-z\\-]+$/;\r\n ssn = /^\\d{3}-?\\d{2}-?\\d{4}$/;\r\n guid = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;\r\n email = /^((([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(\\\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))$/i;\r\n}\r\n\r\nclass Helpers {\r\n _uidGenerator = new ShortUniqueId();\r\n\r\n uniqueId(length = undefined) {\r\n if (length !== undefined) {\r\n return this._uidGenerator.randomUUID(length);\r\n }\r\n\r\n var idstr = String.fromCharCode(Math.floor((Math.random()*25)+65));\r\n do { \r\n var ascicode = Math.floor((Math.random()*42)+48);\r\n if (ascicode < 58 || ascicode > 64){\r\n idstr += String.fromCharCode(ascicode);\r\n } \r\n } while (idstr.length<32);\r\n\r\n return (idstr);\r\n }\r\n\r\n camelize(word) {\r\n return `${word.substr(0,1).toLowerCase()}${word.substr(1)}`;\r\n }\r\n\r\n replaceAll(str, find, replace) {\r\n if (str.replaceAll) return str.replaceAll(find, replace);\r\n // not new browser, use old regex method\r\n return str.replace(new RegExp(find, 'g'), replace);\r\n }\r\n\r\n replaceVariables(security, value, urlEncode = false, forMember = undefined) {\r\n const baseUrl = siteUrlBase();\r\n const member = forMember ?? security.agent;\r\n const cell = member.cell ?? member.cellPhone;\r\n return value\r\n .replace(/{{firstName}}/g, member ? urlEncode ? encodeURIComponent(member.firstName) : member.firstName : '')\r\n .replace(/{{lastName}}/g, member ? urlEncode ? encodeURIComponent(member.lastName) : member.lastName : '')\r\n .replace(/{{email}}/g, member ? urlEncode ? encodeURIComponent(member.email) : member.email : '')\r\n .replace(/{{cell}}/g, member ? urlEncode ? encodeURIComponent(cell) : cell : '')\r\n .replace(/{{agentID}}/g, member ? urlEncode ? encodeURIComponent(member.agentID) : member.agentID : '')\r\n .replace(/{{agentIDNoDash}}/g, member && member.agentID ? urlEncode ? encodeURIComponent(member.agentID.replace('-', '')) : member.agentID.replace('-', '') : '')\r\n .replace(/{{signUpLink}}/g, urlEncode ? encodeURIComponent(security.signUpLink(member)) : security.signUpLink(member))\r\n .replace(/{{directUplineFirstName}}/g, member ? urlEncode ? encodeURIComponent(member.directUplineFirstName) : member.directUplineFirstName : '')\r\n .replace(/{{directUplineLastName}}/g, member ? urlEncode ? encodeURIComponent(member.directUplineLastName) : member.directUplineLastName : '')\r\n .replace(/{{directUplineEmail}}/g, member ? urlEncode ? encodeURIComponent(member.directUplineEmail) : member.directUplineEmail : '')\r\n .replace(/{{directUplineCell}}/g, member ? urlEncode ? encodeURIComponent(member.directUplineCell) : member.directUplineCell : '')\r\n .replace(/{{agencyFirstName}}/g, member ? urlEncode ? encodeURIComponent(member.agencyFirstName) : member.agencyFirstName : '')\r\n .replace(/{{agencyLastName}}/g, member ? urlEncode ? encodeURIComponent(member.agencyLastName) : member.agencyLastName : '')\r\n .replace(/{{agencyEmail}}/g, member ? urlEncode ? encodeURIComponent(member.agencyEmail) : member.agencyEmail : '')\r\n .replace(/{{agencyCell}}/g, member ? urlEncode ? encodeURIComponent(member.agencyCell) : member.agencyCell : '')\r\n .replace(/{{agencyAgentID}}/g, member && member.agencyAgentID ? urlEncode ? encodeURIComponent(member.agencyAgentID) : member.agencyAgentID : '')\r\n .replace(/{{agencyAgentIDNoDash}}/g, member && member.agencyAgentID ? urlEncode ? encodeURIComponent(member.agencyAgentID.replace('-', '')) : member.agencyAgentID.replace('-', '') : '')\r\n .replace(/{{siteUrl}}/g, urlEncode ? encodeURIComponent(baseUrl) : baseUrl)\r\n ;\r\n }\r\n\r\n formatNumber(value, decimals, removeInsignificantDigits = false) {\r\n try {\r\n if (value === null || value === undefined) return '-';\r\n if (isNaN(value)) return value;\r\n if (decimals === undefined || decimals === null) decimals = 0;\r\n const roundedValue = this.round(value, decimals);\r\n if (isNaN(roundedValue)) return roundedValue;\r\n let formattedValue = roundedValue.toLocaleString();\r\n let decimalIndex = formattedValue.indexOf('.');\r\n if (decimals === 2 && !removeInsignificantDigits) {\r\n if (decimalIndex < 0) formattedValue += '.00';\r\n else if (decimalIndex === formattedValue.length - 2) formattedValue += '0';\r\n else if (decimalIndex === formattedValue.length - 1) formattedValue += '00';\r\n }\r\n return formattedValue;\r\n } catch (err) {\r\n console.log(err);\r\n return value;\r\n }\r\n }\r\n \r\n formatMoney(number, decimals = 2) {\r\n const decPlaces = decimals;\r\n const decSep = '.';\r\n const thouSep = ',';\r\n let sign = number < 0 ? '-' : '';\r\n let i = String(parseInt(number = Math.abs(Number(number) || 0).toFixed(decPlaces), 10));\r\n let j = i.length;\r\n j = j > 3 ? j % 3 : 0;\r\n \r\n return sign + (j ? i.substr(0, j) + thouSep : '') + i.substr(j).replace(/(\\decSep{3})(?=\\decSep)/g, '$1' + thouSep) + (decPlaces ? decSep + Math.abs(number - i).toFixed(decPlaces).slice(2) : '');\r\n }\r\n \r\n round(num, decimals = 2) {\r\n try {\r\n const rounded = +(Math.round(num + `e+${decimals}`) + `e-${decimals}`);\r\n return rounded;\r\n } catch (err) {\r\n return num;\r\n }\r\n }\r\n\r\n keyify(str) {\r\n return str.replace(/\\s/g, '-').toLowerCase();\r\n }\r\n\r\n encodeJsProperty(value) {\r\n if (!value) return value;\r\n return value.replace(/'/g, '{APOS}');\r\n }\r\n\r\n decodeJsProperty(value) {\r\n if (!value) return value;\r\n return value.replace(/{APOS}/g, '\\'');\r\n }\r\n\r\n contrastingFontColor(hexcolor) {\r\n try {\r\n // If a leading # is provided, remove it\r\n if (hexcolor.slice(0, 1) === '#') hexcolor = hexcolor.slice(1);\r\n // If a three-character hexcode, make six-character\r\n if (hexcolor.length === 3) {\r\n hexcolor = hexcolor.split('').map((hex) => {\r\n return hex + hex;\r\n }).join('');\r\n }\r\n // Convert to RGB value\r\n let r = parseInt(hexcolor.substr(0, 2), 16);\r\n let g = parseInt(hexcolor.substr(2, 2), 16);\r\n let b = parseInt(hexcolor.substr(4, 2), 16);\r\n // Get YIQ ratio\r\n let yiq = ((r * 299) + (g * 587) + (b * 114)) / 1000;\r\n // Check contrast\r\n return (yiq >= 128) ? '#000000' : '#ffffff';\r\n } catch (err) {\r\n return '#ffffff';\r\n }\r\n }\r\n\r\n stringToColor(str) {\r\n let hash = 0;\r\n str.split('').forEach(char => {\r\n hash = char.charCodeAt(0) + ((hash << 5) - hash)\r\n })\r\n let color = '#'\r\n for (let i = 0; i < 3; i++) {\r\n const value = (hash >> (i * 8)) & 0xff\r\n color += value.toString(16).padStart(2, '0')\r\n }\r\n const fontColor = this.contrastingFontColor(color);\r\n return {\r\n backgroundColor: color,\r\n fontColor,\r\n };\r\n }\r\n}\r\n\r\nclass FlexGrid {\r\n\r\n sizes = {\r\n xxsmall: 'xxs',\r\n xxs: 'xxs',\r\n xsmall: 'xs',\r\n xs: 'xs',\r\n small: 'sm',\r\n sm: 'sm',\r\n medium: 'md',\r\n md: 'md',\r\n large: 'lg',\r\n lg: 'lg',\r\n xlarge: 'xl',\r\n xl: 'xl'\r\n };\r\n\r\n types = {\r\n string: 'string',\r\n number: 'number',\r\n money: 'money',\r\n date: 'date',\r\n bool: 'bool',\r\n html: 'html',\r\n action: 'action',\r\n member: 'member'\r\n };\r\n\r\n column(key, size, name, type, metadata) {\r\n return {\r\n key: key,\r\n size: size,\r\n name: name,\r\n type: type,\r\n metadata: metadata\r\n };\r\n }\r\n\r\n cellData(key, value, cssClass) {\r\n return {\r\n key: key,\r\n value: value,\r\n cssClass: cssClass\r\n };\r\n }\r\n}\r\n\r\n\r\nvar c = {\r\n\tGeography: new Geography(),\r\n EventKeys: new EventKeys(),\r\n RegEx: new RegEx(),\r\n Helpers: new Helpers(),\r\n FlexGrid: new FlexGrid()\r\n};\r\n\r\nfunction isVideoUrl(linkSrc) {\r\n if (!linkSrc) return false;\r\n if (linkSrc.indexOf('vimeo.com') >= 0) return true;\r\n if (linkSrc.indexOf('youtu.be') >= 0) return true;\r\n if (linkSrc.indexOf('.mp4') >= 0) return true;\r\n return false;\r\n}\r\n\r\nfunction openVideo(src, ea, fullHeight = false) {\r\n let videoSrc;\r\n if (src.indexOf('https://vimeo.com/') === 0) {\r\n const startIndex = 'https://vimeo.com/'.length;\r\n const nextSlash = src.indexOf('/', startIndex + 1);\r\n const vimeoId = src.substr(startIndex, nextSlash - startIndex);\r\n videoSrc = `https://player.vimeo.com/video/${encodeURIComponent(vimeoId)}?autoplay=1`;\r\n } else if (src.indexOf('https://www.vimeo.com/') === 0) {\r\n const startIndex = 'https://www.vimeo.com/'.length;\r\n const nextSlash = src.indexOf('/', startIndex + 1);\r\n const vimeoId = src.substr(startIndex, nextSlash - startIndex);\r\n videoSrc = `https://player.vimeo.com/video/${encodeURIComponent(vimeoId)}?autoplay=1`;\r\n } else if (src.indexOf('https://youtu.be/') === 0) {\r\n const startIndex = 'https://youtu.be/'.length;\r\n const youTubeId = src.substr(startIndex);\r\n videoSrc = `https://www.youtube.com/embed/${encodeURIComponent(youTubeId)}`;\r\n } else {\r\n // try to play the video as linked\r\n videoSrc = src;\r\n }\r\n ea.publish(c.EventKeys.site.openLightbox, { embedSrc: videoSrc, fullHeight });\r\n}\r\n\r\nfunction getQsValue(name, url = window.location.href) {\r\n name = name.replace(/[\\[\\]]/g, '\\\\$&');\r\n var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'), results = regex.exec(url);\r\n if (!results) return null;\r\n if (!results[2]) return '';\r\n return decodeURIComponent(results[2].replace(/\\+/g, ' '));\r\n}\r\n\r\nfunction siteUrlBase() {\r\n try {\r\n if (Capacitor.isNativePlatform()) return environment.url;\r\n let baseUrl = window.location.origin;\r\n if (environment.url.toLowerCase() === baseUrl.toLowerCase()) return environment.url;\r\n return baseUrl;\r\n } catch (err) {\r\n console.log(err);\r\n return environment.url;\r\n }\r\n}\r\n\r\nfunction apiUrlBase() {\r\n try {\r\n if (Capacitor.isNativePlatform()) return environment.api;\r\n return environment.api;\r\n //let baseUrl = window.location.origin;\r\n //if (environment.url.toLowerCase() === baseUrl.toLowerCase()) return environment.api;\r\n //return baseUrl;\r\n } catch (err) {\r\n console.log(err);\r\n return environment.api;\r\n }\r\n}\r\n\r\nclass SocialMedia {\r\n link(key) {\r\n switch (key) {\r\n case 'twitter': return 'https://x.com/';\r\n case 'linkedin': return 'https://linkedin.com/in/';\r\n case 'facebook': return 'https://facebook.com/';\r\n case 'instagram': return 'https://www.instagram.com/';\r\n case 'snapchat': return 'https://www.snapchat.com/add/';\r\n case 'whatsapp': return 'https://wa.me/';\r\n case 'tiktok': return 'https://tiktok.com/';\r\n }\r\n }\r\n \r\n linkStarter(socialMediaKey) {\r\n let link = this.link(socialMediaKey);\r\n if (link && link !== socialMediaKey) return link;\r\n return '';\r\n }\r\n \r\n updateLink(socialMedia) {\r\n socialMedia.link = `${this.link(socialMedia.key)}${socialMedia.value}`;\r\n }\r\n}\r\n\r\nconst socialMedia = new SocialMedia();\r\n\r\n/**\r\n * Event listeners created with arrow functions can't be removed\r\n * Use this utility to add and remove event handlers to any scope\r\n *\r\n * let handler = eventListener(window, 'resize', () => { console.log(this); });\r\n * handler.dispose();\r\n *\r\n * @export\r\n * @param {any} scope\r\n * @param {String} type - the type of event to listen for\r\n * @param {Function} handler - can be () => { do something }\r\n * @param {boolean} [capture=false]\r\n * @returns {Function} to remove the event listener\r\n */\r\nfunction eventListener(scope, type, handler, capture = false) {\r\n scope.addEventListener(type, handler, capture);\r\n return {\r\n dispose: () => {\r\n scope.removeEventListener(type, handler, capture);\r\n }\r\n };\r\n}\r\n\r\nfunction distinctArray(array) {\r\n var a = array.concat();\r\n for(var i=0; i 3 ? j % 3 : 0;\r\n return s + (j ? i.substr(0, j) + t : '') + i.substr(j).replace(/(\\d{3})(?=\\d)/g, '$1' + t) + (cee ? d + Math.abs(n - i).toFixed(cee).slice(2) : '');\r\n};\r\n\r\nString.prototype.datePickerDate = function() {\r\n let value = this;\r\n if (!value) return null;\r\n return new Date(value).toISOString().substring(0, 10);\r\n}\r\n","import { UI_MODE } from 'common/ui';\r\n\r\nexport const ROLE = {\r\n Admin: 'Admin',\r\n CarrierAdmin: 'CarrierAdmin',\r\n WebsiteAdmin: 'WebsiteAdmin',\r\n AgentAdmin: 'AgentAdmin',\r\n RoleAssigner: 'RoleAssigner',\r\n HierarchyViewer: 'HierarchyViewer',\r\n DashboardAdmin: 'DashboardAdmin',\r\n PolicyAdmin: 'PolicyAdmin',\r\n PolicyReviewer: 'PolicyReviewer',\r\n Translator: 'Translator',\r\n ResourceAdmin: 'ResourceAdmin',\r\n BetaTester: 'BetaTester',\r\n BackOffice: 'BackOffice',\r\n Contracting: 'Contracting',\r\n Mentor: 'Mentor',\r\n LeadAdmin: 'LeadAdmin',\r\n LeadManager: 'LeadManager',\r\n LeadScript: 'LeadScript',\r\n TrainingAdmin: 'TrainingAdmin',\r\n FastWillAdvisor: 'FastWillAdvisor',\r\n};\r\n\r\nexport const TIME_PERIOD = {\r\n All: 'All',\r\n Today: 'Today',\r\n Yesterday: 'Yesterday',\r\n ThisWeek: 'ThisWeek',\r\n ThisMonth: 'ThisMonth',\r\n WTD: 'wtd',\r\n MTD: 'mtd',\r\n YTD: 'ytd',\r\n LastMonth: 'LastMonth',\r\n PriorWeek: 'prior-week',\r\n PriorMonth: 'prior-month',\r\n PriorYear: 'prior-year',\r\n SixMonthRolling: '6-month-rolling',\r\n Custom: 'custom',\r\n\r\n common: (includeCustom = true) => {\r\n const list = [TIME_PERIOD.Today, TIME_PERIOD.Yesterday, TIME_PERIOD.WTD, TIME_PERIOD.PriorWeek, TIME_PERIOD.MTD, TIME_PERIOD.PriorMonth, TIME_PERIOD.YTD];\r\n if (includeCustom) list.push(TIME_PERIOD.Custom);\r\n return list;\r\n },\r\n\r\n default: () => {\r\n return TIME_PERIOD.WTD;\r\n }\r\n};\r\n\r\nexport const REPORT_TIME_PERIOD = {\r\n DTD: 'dtd',\r\n WTD: 'wtd',\r\n MTD: 'mtd',\r\n YTD: 'ytd',\r\n\r\n all: () => {\r\n return [\r\n REPORT_TIME_PERIOD.WTD,\r\n REPORT_TIME_PERIOD.MTD,\r\n REPORT_TIME_PERIOD.YTD,\r\n ];\r\n },\r\n}\r\n\r\nexport const POLICY_DATE_TYPE = {\r\n SUBMITTED: 'Submitted',\r\n PAID: 'Paid',\r\n\r\n all: () => {\r\n return [\r\n POLICY_DATE_TYPE.SUBMITTED,\r\n POLICY_DATE_TYPE.PAID,\r\n ];\r\n },\r\n}\r\n\r\nexport const POLICY_STATUS_GROUP = {\r\n Pending: 'Pending',\r\n ClosedNeverInForce: 'ClosedNeverInForce',\r\n InForce: 'InForce',\r\n NoLongerInForce: 'NoLongerInForce',\r\n\r\n all: () => {\r\n return [\r\n POLICY_STATUS_GROUP.Pending,\r\n POLICY_STATUS_GROUP.ClosedNeverInForce,\r\n POLICY_STATUS_GROUP.InForce,\r\n POLICY_STATUS_GROUP.NoLongerInForce,\r\n ];\r\n },\r\n}\r\n\r\nexport const REPORT_FOR = {\r\n INDIVIDUAL: 'Individual',\r\n AGENCY: 'Agency',\r\n MASTER_AGENCY: 'MasterAgency',\r\n\r\n all: () => {\r\n return [\r\n REPORT_FOR.INDIVIDUAL,\r\n REPORT_FOR.AGENCY,\r\n REPORT_FOR.MASTER_AGENCY,\r\n ];\r\n },\r\n}\r\n\r\nexport const METRIC_TYPE = {\r\n Count: 'Count',\r\n PolicyStatusGroup: 'PolicyStatusGroup',\r\n Premium: 'Premium',\r\n\r\n all: () => {\r\n return [\r\n METRIC_TYPE.Count,\r\n METRIC_TYPE.PolicyStatusGroup,\r\n METRIC_TYPE.Premium,\r\n ];\r\n },\r\n}\r\n\r\nexport const AGENT_METRIC_TYPE = {\r\n Count: 'Count',\r\n PolicyStatusGroup: 'PolicyStatusGroup',\r\n Premium: 'Premium',\r\n Prospect: 'Prospect',\r\n RegisteredRep: 'RegisteredRep',\r\n Recruit: 'Recruit',\r\n\r\n all: () => {\r\n return [\r\n AGENT_METRIC_TYPE.Count,\r\n AGENT_METRIC_TYPE.PolicyStatusGroup,\r\n AGENT_METRIC_TYPE.Premium,\r\n AGENT_METRIC_TYPE.Prospect,\r\n AGENT_METRIC_TYPE.RegisteredRep,\r\n AGENT_METRIC_TYPE.Recruit,\r\n ];\r\n },\r\n}\r\n\r\nexport const LOB = {\r\n Life: 'life',\r\n Annuity: 'annuity',\r\n HMA: 'hma',\r\n Ancillary: 'ancillary',\r\n\r\n all: () => {\r\n return [\r\n LOB.Life,\r\n LOB.Annuity,\r\n LOB.HMA,\r\n LOB.Ancillary,\r\n ];\r\n },\r\n defaultLines: () => { return [LOB.Life]; }\r\n};\r\n\r\nexport const UNDERWRITING = {\r\n Guaranteed: 'guaranteed',\r\n FullyUnderwritten: 'fully-underwritten',\r\n Simplified: 'simplified',\r\n\r\n all: () => {\r\n return [ UNDERWRITING.Guaranteed, UNDERWRITING.FullyUnderwritten, UNDERWRITING.Simplified ];\r\n },\r\n}\r\n\r\nexport const CHART_COLORS = {\r\n Classic: (mode) => {\r\n const classic = [ '#619ED6', '#6BA547', '#F7D027', '#E48F1B', '#B77EA3', '#E64345', '#60CEED', '#9CF168', '#F7EA4A', '#FBC543', '#FFC9ED', '#E6696E' ];\r\n switch (mode) {\r\n case UI_MODE.dark: return classic;\r\n default: return classic;\r\n }\r\n },\r\n KpiProgress: (mode) => {\r\n switch (mode) {\r\n case UI_MODE.dark: return ['#efefef', 'transparent'];\r\n default: return ['#666666', 'transparent'];\r\n }\r\n },\r\n KpiCurrent: (mode) => {\r\n switch (mode) {\r\n case UI_MODE.dark: return ['#B8D935', 'transparent'];\r\n default: return ['#B8D935', '#F4FBDB'];\r\n }\r\n },\r\n KpiPrior1: (mode) => {\r\n switch (mode) {\r\n case UI_MODE.dark: return ['#619ed6', 'transparent'];\r\n default: return ['#619ed6', '#dbe9f5'];\r\n }\r\n },\r\n KpiPrior2: (mode) => {\r\n switch (mode) {\r\n case UI_MODE.dark: return ['#F7D027', 'transparent'];\r\n default: return ['#F7D027', '#FDF5D3'];\r\n }\r\n },\r\n};\r\n\r\nexport const COLORS = {\r\n Theme: [ '#619ED6', '#6BA547', '#F7D027', '#E48F1B', '#B77EA3', '#E64345', '#60CEED', '#9CF168', '#F7EA4A', '#FBC543', '#FFC9ED', '#E6696E' ],\r\n ThemeBg: [ 'rgba(97,158,214,0.2)', 'rgba(107,165,71,0.2)', 'rgba(247,208,39,0.2)', 'rgba(228,143,27,0.2)', 'rgba(183,126,163,0.2)', 'rgba(230,67,69,0.2)', 'rgba(96,206,237,0.2)', 'rgba(156,241,104,0.2)', 'rgba(247,234,74,0.2)', 'rgba(251,197,67,0.2)', 'rgba(255,201,237,0.2)', 'rgba(230,105,110,0.2)' ]\r\n}\r\n\r\nexport const WIDGET = {\r\n ChartType: {\r\n Pie: 'pie',\r\n Bar: 'bar',\r\n Leaderboard: 'leaderboard',\r\n all: () => {\r\n return [\r\n WIDGET.ChartType.Pie,\r\n WIDGET.ChartType.Bar,\r\n WIDGET.ChartType.Leaderboard\r\n ];\r\n },\r\n default: () => { return WIDGET.ChartType.Pie; }\r\n },\r\n View: {\r\n Personal: 'personal',\r\n Team: 'team',\r\n Agency: 'agency',\r\n Downline: 'downline',\r\n Company: 'company',\r\n Mentor: 'mentor',\r\n all: (security, includeCompany, includeMentor = false) => {\r\n const isDashboardAdmin = security.isInRole([ROLE.DashboardAdmin]);\r\n const views = [];\r\n views.push(WIDGET.View.Personal);\r\n if (security.isTeam() || isDashboardAdmin) views.push(WIDGET.View.Team);\r\n if (security.isAgency() || isDashboardAdmin) views.push(WIDGET.View.Agency);\r\n views.push(WIDGET.View.Downline);\r\n if (includeCompany && security.isInRole(ROLE.DashboardAdmin)) views.push(WIDGET.View.Company);\r\n if (includeMentor && security.isInRole(ROLE.Mentor)) views.push(WIDGET.View.Mentor);\r\n return views;\r\n },\r\n default: () => { return WIDGET.View.Personal; }\r\n },\r\n GroupBy: {\r\n Agent: 'agent',\r\n Team: 'team',\r\n Agency: 'agency',\r\n Carrier: 'carrier',\r\n all: (security) => {\r\n const isDashboardAdmin = security.isInRole([ROLE.DashboardAdmin]);\r\n const groupBys = [];\r\n groupBys.push(WIDGET.GroupBy.Agent);\r\n if (security.isTeam() || isDashboardAdmin) groupBys.push(WIDGET.GroupBy.Team);\r\n if (security.isAgency() || isDashboardAdmin) groupBys.push(WIDGET.GroupBy.Agency);\r\n groupBys.push(WIDGET.GroupBy.Carrier);\r\n return groupBys;\r\n },\r\n forAgents: (security) => {\r\n const isDashboardAdmin = security.isInRole([ROLE.DashboardAdmin]);\r\n const groupBys = [];\r\n groupBys.push(WIDGET.GroupBy.Agent);\r\n if (security.isTeam() || isDashboardAdmin) groupBys.push(WIDGET.GroupBy.Team);\r\n if (security.isAgency() || isDashboardAdmin) groupBys.push(WIDGET.GroupBy.Agency);\r\n return groupBys;\r\n },\r\n default: () => { return WIDGET.GroupBy.Agent; }\r\n },\r\n Period: {\r\n Day: 'day',\r\n Week: 'week',\r\n Month: 'month',\r\n Year: 'year',\r\n All: 'all',\r\n all: () => {\r\n return [\r\n WIDGET.Period.Day,\r\n WIDGET.Period.Week,\r\n WIDGET.Period.Month,\r\n WIDGET.Period.Year\r\n ];\r\n },\r\n default: () => { return WIDGET.Period.Month; },\r\n toReportTimePeriod: (period) => {\r\n switch (period) {\r\n case WIDGET.Period.Day: return REPORT_TIME_PERIOD.DTD;\r\n case WIDGET.Period.Week: return REPORT_TIME_PERIOD.WTD;\r\n case WIDGET.Period.Month: return REPORT_TIME_PERIOD.MTD;\r\n case WIDGET.Period.Year: return REPORT_TIME_PERIOD.YTD;\r\n default: return period;\r\n }\r\n }\r\n },\r\n PolicyStatusGroup: {\r\n Submitted: 'submitted',\r\n Issued: 'issued',\r\n Paid: 'paid',\r\n Pending: 'pending',\r\n ClosedNeverInForce: 'closed-never-in-force',\r\n NoLongerInForce: 'no-longer-in-force',\r\n all: () => {\r\n return [\r\n WIDGET.PolicyStatusGroup.Submitted,\r\n WIDGET.PolicyStatusGroup.Issued,\r\n WIDGET.PolicyStatusGroup.Paid,\r\n WIDGET.PolicyStatusGroup.Pending,\r\n WIDGET.PolicyStatusGroup.ClosedNeverInForce,\r\n WIDGET.PolicyStatusGroup.NoLongerInForce\r\n ];\r\n },\r\n default: () => { return WIDGET.PolicyStatusGroup.Paid; }\r\n }\r\n};\r\n\r\nexport const COMMISSION = {\r\n GroupBy: {\r\n Date: 'date',\r\n Policy: 'policy',\r\n Client: 'client',\r\n Carrier: 'carrier',\r\n all: () => {\r\n return [\r\n COMMISSION.GroupBy.Date,\r\n COMMISSION.GroupBy.Policy,\r\n COMMISSION.GroupBy.Carrier,\r\n COMMISSION.GroupBy.Client,\r\n ];\r\n },\r\n default: () => { return COMMISSION.GroupBy.Date; }\r\n },\r\n};\r\n\r\nexport const CREDIT_TYPE = {\r\n SubmittedGross: 'submitted-gross',\r\n SubmittedActual: 'submitted-actual',\r\n SubmittedBonus: 'submitted-bonus',\r\n IssuedGross: 'issued-gross',\r\n IssuedActual: 'issued-actual',\r\n IssuedPromotion: 'issued-promotion',\r\n IssuedHierarchyBonus: 'issued-hierarchy-bonus',\r\n ContestBonus: 'contest-bonus',\r\n all: () => {\r\n return [\r\n CREDIT_TYPE.SubmittedGross,\r\n CREDIT_TYPE.SubmittedActual,\r\n CREDIT_TYPE.SubmittedBonus,\r\n CREDIT_TYPE.IssuedGross,\r\n CREDIT_TYPE.IssuedActual,\r\n CREDIT_TYPE.IssuedPromotion,\r\n CREDIT_TYPE.IssuedHierarchyBonus,\r\n CREDIT_TYPE.ContestBonus\r\n ];\r\n },\r\n};\r\n\r\nexport const KPI = {\r\n requiresPolicyStatus: (metric) => { return metric === KPI.Metric.Applications || metric === KPI.Metric.Premium; },\r\n requiresLineOfBusiness: (metric) => { return metric === KPI.Metric.Applications || metric === KPI.Metric.Premium; },\r\n requiresPremiumType: (metric) => { return metric === KPI.Metric.Premium; },\r\n Metric: {\r\n Applications: 'applications',\r\n Premium: 'premium',\r\n Prospects: 'prospects',\r\n RegisteredReps: 'registered-reps',\r\n Recruits: 'recruits',\r\n WritingAgents: 'writing-agents',\r\n all: () => {\r\n return [\r\n KPI.Metric.Applications,\r\n KPI.Metric.Premium,\r\n KPI.Metric.Prospects,\r\n KPI.Metric.RegisteredReps,\r\n KPI.Metric.Recruits,\r\n KPI.Metric.WritingAgents\r\n ];\r\n },\r\n default: () => { return KPI.Metric.Premium; }\r\n },\r\n PremiumType: {\r\n SubmittedGross: 'submitted-gross',\r\n SubmittedActual: 'submitted-actual',\r\n SubmittedBonus: 'submitted-bonus',\r\n IssuedGross: 'issued-gross',\r\n IssuedActual: 'issued-actual',\r\n IssuedPromotion: 'issued-promotion',\r\n IssuedHierarchyBonus: 'issued-hierarchy-bonus',\r\n ContestBonus: 'contest-bonus',\r\n all: () => {\r\n return [\r\n KPI.PremiumType.SubmittedGross,\r\n KPI.PremiumType.SubmittedActual,\r\n KPI.PremiumType.SubmittedBonus,\r\n KPI.PremiumType.IssuedGross,\r\n KPI.PremiumType.IssuedActual,\r\n KPI.PremiumType.IssuedPromotion,\r\n KPI.PremiumType.IssuedHierarchyBonus,\r\n KPI.PremiumType.ContestBonus\r\n ];\r\n },\r\n default: () => { return KPI.PremiumType.IssuedActual; },\r\n toPolicyPremium: (premiumType) => {\r\n switch (premiumType) {\r\n case KPI.PremiumType.SubmittedGross: return 'submittedGross';\r\n case KPI.PremiumType.SubmittedActual: return 'submittedActual';\r\n case KPI.PremiumType.SubmittedBonus: return 'submittedBonus';\r\n case KPI.PremiumType.IssuedGross: return 'issuedGross';\r\n case KPI.PremiumType.IssuedActual: return 'issuedActual';\r\n case KPI.PremiumType.IssuedPromotion: return 'issuedPromotion';\r\n case KPI.PremiumType.IssuedHierarchyBonus: return 'issuedHierarchyBonus';\r\n case KPI.PremiumType.ContestBonus: return 'contestBonus';\r\n default: return '';\r\n }\r\n }\r\n }\r\n};\r\n\r\nexport const ABOUT_TYPE = {\r\n Agent: 'Agent',\r\n Policy: 'Policy',\r\n Client: 'Client',\r\n Carrier: 'Carrier',\r\n Lead: 'Lead',\r\n};\r\n\r\nexport const PERSON_TYPE = {\r\n Agent: 'agent',\r\n Client: 'client',\r\n Lead: 'lead',\r\n\r\n visible: () => {\r\n return [PERSON_TYPE.Agent, PERSON_TYPE.Lead];\r\n },\r\n\r\n properties: (personType) => {\r\n switch (personType) {\r\n case PERSON_TYPE.Agent: return AGENT_PROPERTY;\r\n case PERSON_TYPE.Lead: return LEAD_PROPERTY;\r\n default: return null;\r\n }\r\n },\r\n};\r\n\r\nexport const AGENT_PROPERTY = {\r\n LpfnId: { id: 'agentID', translationKey: 'profile-agent-id', type: 'String' },\r\n LifeLevel: { id: 'lifeLevel', translationKey: 'life-level', type: 'Level' },\r\n AnnuityLevel: { id: 'annuityLevel', translationKey: 'annuity-level', type: 'Level' },\r\n HmaLevel: { id: 'hmaLevel', translationKey: 'hma-level', type: 'Level' },\r\n CellPhone: { id: 'cellPhone', translationKey: 'profile-cell', type: 'Phone' },\r\n BusinessPhone: { id: 'businessPhone', translationKey: 'business-phone', type: 'Phone' },\r\n Email: { id: 'email', translationKey: 'email', type: 'String' },\r\n FirstContractDate: { id: 'firstContractDate', translationKey: 'agent-first-contract', type: 'Date' },\r\n FirstPolicyPaidDate: { id: 'firstPaidPolicyDate', translationKey: 'agent-first-policy-paid', type: 'Date' },\r\n FirstPolicySubmitDate: { id: 'firstSubmittedPolicyDate', translationKey: 'agent-first-policy-submitted', type: 'Date' },\r\n IsAgency: { id: 'isAgency', translationKey: 'profile-is-agency', type: 'Boolean' },\r\n IsTeam: { id: 'isTeam', translationKey: 'profile-is-team', type: 'Boolean' },\r\n RegistrationDate: { id: 'registeredDate', translationKey: 'registered-date', type: 'Date' },\r\n\r\n find: (id) => {\r\n return AGENT_PROPERTY.tagOptions().find(x => x.id === id);\r\n },\r\n\r\n tagOptions: () => {\r\n return [\r\n AGENT_PROPERTY.LpfnId,\r\n AGENT_PROPERTY.LifeLevel,\r\n AGENT_PROPERTY.AnnuityLevel,\r\n AGENT_PROPERTY.HmaLevel,\r\n AGENT_PROPERTY.CellPhone,\r\n AGENT_PROPERTY.BusinessPhone,\r\n AGENT_PROPERTY.Email,\r\n AGENT_PROPERTY.FirstContractDate,\r\n AGENT_PROPERTY.FirstPolicyPaidDate,\r\n AGENT_PROPERTY.FirstPolicySubmitDate,\r\n AGENT_PROPERTY.IsAgency,\r\n AGENT_PROPERTY.IsTeam,\r\n AGENT_PROPERTY.RegistrationDate,\r\n ];\r\n },\r\n};\r\n\r\nexport const LEAD_PROPERTY = {\r\n Email: { id: 'email', translationKey: 'email', type: 'String', propertyBag: true },\r\n Cell: { id: 'cellPhone', translationKey: 'lead:cell', type: 'Phone' },\r\n City: { id: 'city', translationKey: 'city', type: 'String' },\r\n State: { id: 'state', translationKey: 'state', type: 'String' },\r\n County: { id: 'county', translationKey: 'county', type: 'String' },\r\n Disposition: { id: 'disposition', translationKey: 'lead:disposition', type: 'LeadDisposition' },\r\n Status: { id: 'leadStatus', translationKey: 'lead:status', type: 'LeadStatus' },\r\n LastWorkedDate: { id: 'lastWorkedDate', translationKey: 'worked', type: 'Date' },\r\n \r\n find: (id) => {\r\n return LEAD_PROPERTY.tagOptions().find(x => x.id === id);\r\n },\r\n\r\n tagOptions: () => {\r\n return [\r\n LEAD_PROPERTY.Email,\r\n LEAD_PROPERTY.Cell,\r\n LEAD_PROPERTY.City,\r\n LEAD_PROPERTY.State,\r\n LEAD_PROPERTY.County,\r\n LEAD_PROPERTY.Disposition,\r\n LEAD_PROPERTY.Status,\r\n LEAD_PROPERTY.LastWorkedDate,\r\n ];\r\n },\r\n};\r\n","import { EventAggregator } from 'aurelia-event-aggregator';\r\n\r\nexport class Content {\r\n static inject = [EventAggregator];\r\n _ea;\r\n _fileCallback;\r\n\r\n _initialized = false;\r\n _structuredPages = {};\r\n\r\n constructor(ea) {\r\n this._ea = ea;\r\n }\r\n\r\n initialize() {\r\n this._fileManagerEl = document.getElementById('zeusFileManagerEl');\r\n this._fileManagerEl.addEventListener('fileSelected', (e) => this.fileSelected(e));\r\n this._initialized = true;\r\n }\r\n\r\n async fileManager(fileCallback, fileType = 'all') {\r\n if (!this._initialized) this.initialize();\r\n this._fileCallback = fileCallback;\r\n this._ea.publish('zeus-open-file-manager', { fileType });\r\n }\r\n\r\n fileSelected(e) {\r\n if (!e || !e.detail) return;\r\n e.detail.path = `api/file/${e.detail.id}`;\r\n this._fileCallback(e.detail);\r\n }\r\n}\r\n","import { DialogController } from 'aurelia-dialog';\r\n\r\nexport class ConfirmDialog {\r\n static inject = [Element, DialogController];\r\n _element;\r\n dialogController;\r\n\r\n inputIsNumber = false;\r\n inputLabel;\r\n validateHeaderValue;\r\n key;\r\n\r\n constructor(element, dialogController) {\r\n this._element = element;\r\n this.dialogController = dialogController;\r\n }\r\n\r\n activate(model) {\r\n this.key = model.key;\r\n this.messageObject = model.messageObject;\r\n this.okButtonClass = model.okButtonClass;\r\n this.showInput = model.showInput;\r\n this.inputLabel = model.inputLabel;\r\n this.value = model.inputValue || undefined;\r\n\r\n if (model.inputNumber) {\r\n this.inputIsNumber = true;\r\n this.minNumber = model.inputNumber.min;\r\n this.maxNumber = model.inputNumber.max;\r\n this.numberStep = model.inputNumber.step;\r\n }\r\n }\r\n\r\n attached() {\r\n window.setTimeout(() => {\r\n try {\r\n this._element.closest('ux-dialog-container').style.zIndex = 999999;\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }, 0);\r\n }\r\n\r\n confirm() {\r\n this.dialogController.ok({ value: this.value });\r\n }\r\n}\r\n","import { LpfnUtil } from 'common/utils';\r\n\r\nexport class Drawer {\r\n element;\r\n\r\n defaultOptions = {\r\n overlay: true,\r\n direction: 'end',\r\n baseClass: 'drawer',\r\n overlayClass: 'drawer-overlay'\r\n };\r\n\r\n options = {};\r\n\r\n constructor(element, options) {\r\n this.element = element;\r\n this.options = options;\r\n this._init();\r\n }\r\n\r\n _init() {\r\n this.options = LpfnUtil.deepExtend({}, this.defaultOptions, this.options);\r\n this.uid = LpfnUtil.getUniqueId('drawer');\r\n this.overlayElement = null;\r\n this.name = this.element.getAttribute('data-kt-drawer-name');\r\n this.shown = false;\r\n this.lastWidth;\r\n this.toggleElement = null;\r\n\r\n this.element.setAttribute('data-kt-drawer', 'true');\r\n\r\n this.update();\r\n }\r\n\r\n toggle() {\r\n if (this.shown === true) {\r\n this.hide();\r\n } else {\r\n this.show();\r\n }\r\n }\r\n\r\n hide() {\r\n this.shown = false;\r\n\r\n this._deleteOverlay();\r\n\r\n document.body.removeAttribute('data-kt-drawer-' + this.name, 'on');\r\n document.body.removeAttribute('data-kt-drawer');\r\n\r\n LpfnUtil.removeClass(this.element, this.options.baseClass);\r\n LpfnUtil.removeClass(this.element, this.options.baseClass + '-on');\r\n\r\n if (this.toggleElement !== null) {\r\n LpfnUtil.removeClass(this.toggleElement, 'active');\r\n }\r\n }\r\n\r\n show() {\r\n this.shown = true;\r\n\r\n this._createOverlay();\r\n document.body.setAttribute('data-kt-drawer-' + this.name, 'on');\r\n document.body.setAttribute('data-kt-drawer', 'on');\r\n\r\n LpfnUtil.addClass(this.element, this.options.baseClass);\r\n LpfnUtil.addClass(this.element, this.options.baseClass + '-on');\r\n\r\n if (this.toggleElement !== null) {\r\n LpfnUtil.addClass(this.toggleElement, 'active');\r\n }\r\n }\r\n\r\n update() {\r\n var width = this._getWidth();\r\n var direction = this._getOption('direction');\r\n\r\n var top = this._getOption('top');\r\n var bottom = this._getOption('bottom');\r\n var start = this._getOption('start');\r\n var end = this._getOption('end');\r\n\r\n // Reset state\r\n if (LpfnUtil.hasClass(this.element, this.options.baseClass + '-on') === true && String(document.body.getAttribute('data-kt-drawer-' + this.name + '-')) === 'on') {\r\n this.shown = true;\r\n } else {\r\n this.shown = false;\r\n } \r\n\r\n // Activate/deactivate\r\n if (this._getOption('activate') === true ) {\r\n LpfnUtil.addClass(this.element, this.options.baseClass);\r\n LpfnUtil.addClass(this.element, this.options.baseClass + '-' + direction);\r\n \r\n LpfnUtil.css(this.element, 'width', width, true);\r\n this.lastWidth = width;\r\n\r\n if (top) {\r\n LpfnUtil.css(this.element, 'top', top);\r\n }\r\n\r\n if (bottom) {\r\n LpfnUtil.css(this.element, 'bottom', bottom);\r\n }\r\n\r\n if (start) {\r\n LpfnUtil.css(this.element, 'left', start);\r\n }\r\n\r\n if (end) {\r\n LpfnUtil.css(this.element, 'right', end);\r\n }\r\n } else {\r\n LpfnUtil.removeClass(this.element, this.options.baseClass);\r\n LpfnUtil.removeClass(this.element, this.options.baseClass + '-' + direction);\r\n\r\n LpfnUtil.css(this.element, 'width', '');\r\n\r\n if (top) {\r\n LpfnUtil.css(this.element, 'top', '');\r\n }\r\n\r\n if (bottom) {\r\n LpfnUtil.css(this.element, 'bottom', '');\r\n }\r\n\r\n if (start) {\r\n if (LpfnUtil.isRTL()) {\r\n LpfnUtil.css(this.element, 'right', '');\r\n } else {\r\n LpfnUtil.css(this.element, 'left', '');\r\n }\r\n }\r\n\r\n if (end) {\r\n if (LpfnUtil.isRTL()) {\r\n LpfnUtil.css(this.element, 'left', '');\r\n } else {\r\n LpfnUtil.css(this.element, 'right', '');\r\n }\r\n }\r\n\r\n this.hide();\r\n }\r\n }\r\n\r\n _createOverlay() {\r\n if (this._getOption('overlay') === true) {\r\n this.overlayElement = document.createElement('DIV');\r\n\r\n LpfnUtil.css(this.overlayElement, 'z-index', LpfnUtil.css(this.element, 'z-index') - 1); // update\r\n\r\n document.body.append(this.overlayElement);\r\n\r\n LpfnUtil.addClass(this.overlayElement, this._getOption('overlay-class'));\r\n\r\n LpfnUtil.addEvent(this.overlayElement, 'click', (e) => {\r\n e.preventDefault();\r\n this.hide();\r\n });\r\n }\r\n }\r\n\r\n _deleteOverlay() {\r\n if (this.overlayElement !== null ) {\r\n LpfnUtil.remove(this.overlayElement);\r\n }\r\n }\r\n\r\n _getOption(name) {\r\n if (this.element.hasAttribute('data-kt-drawer-' + name) === true) {\r\n var attr = this.element.getAttribute('data-kt-drawer-' + name);\r\n var value = LpfnUtil.getResponsiveValue(attr);\r\n\r\n if (value !== null && String(value) === 'true') {\r\n value = true;\r\n } else if (value !== null && String(value) === 'false') {\r\n value = false;\r\n }\r\n\r\n return value;\r\n } else {\r\n var optionName = LpfnUtil.snakeToCamel(name);\r\n\r\n if (this.options[optionName]) {\r\n return LpfnUtil.getResponsiveValue(this.options[optionName]);\r\n } else {\r\n return null;\r\n }\r\n }\r\n }\r\n\r\n _getWidth() {\r\n var width = this._getOption('width');\r\n\r\n if (width === 'auto') {\r\n width = LpfnUtil.css(this.element, 'width');\r\n }\r\n\r\n return width;\r\n }\r\n}\r\n\r\n","import { I18N } from 'aurelia-i18n';\r\nimport { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { BindingSignaler } from 'aurelia-templating-resources';\r\nimport { signalBindings } from 'aurelia-binding';\r\nimport { Api } from 'common/server';\r\nimport moment from 'moment';\r\nimport 'moment/locale/es'; // this will include this file in the bundle so it can be loaded\r\n\r\nexport class I18n {\r\n static inject = [I18N, EventAggregator, BindingSignaler, Api];\r\n _ai18n;\r\n _ea;\r\n _bindingSignaler;\r\n _api;\r\n\r\n currentLocale = '';\r\n language = null;\r\n nf = null;\r\n supportedLanguages = [];\r\n defaultLocale = 'en';\r\n\r\n constructor(i18n, ea, bindingSignaler, api) {\r\n this._ai18n = i18n;\r\n this._ea = ea;\r\n this._bindingSignaler = bindingSignaler;\r\n this._api = api;\r\n\r\n this.currentLocale = this._ai18n.getLocale() || 'en-US';\r\n if (this.currentLocale !== 'en-US') {\r\n this._ai18n.setLocale(this.currentLocale).then(() => {\r\n this._loadMoment();\r\n });\r\n } else {\r\n this._loadMoment();\r\n }\r\n }\r\n\r\n initialize() {\r\n return this._loadSupportedLanguages();\r\n }\r\n\r\n languageName(locale) {\r\n for (let i = 0; i < this.supportedLanguages.length; i++) {\r\n if (this.supportedLanguages[i].locale !== locale) continue;\r\n return this.supportedLanguages[i].name;\r\n }\r\n return locale;\r\n }\r\n\r\n _loadMoment() {\r\n moment.locale(this.currentLocale);\r\n if (moment.locale() !== this.currentLocale) {\r\n // default to en, importing the locale files set the moment locale to the last one imported\r\n moment.locale(this.defaultLocale);\r\n }\r\n }\r\n\r\n async _loadSupportedLanguages() {\r\n try {\r\n const data = await this._api.get('content/supported-languages');\r\n for (var i = 0; i < data.length; i++) {\r\n let lang = { locale: data[i], name: this.tr(`i18n-languages-${data[i]}`) };\r\n this.supportedLanguages.push(lang);\r\n if (lang.locale === this.currentLocale) this.language = lang;\r\n else if (this.currentLocale.indexOf(lang.locale) === 0) this.language = lang;\r\n }\r\n if (!this.language && this.supportedLanguages.length > 0) this.language = this.supportedLanguages[0];\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n clear() {\r\n localStore.clear('i18nextLng'); //from language detector\r\n }\r\n\r\n async setLocale(locale) {\r\n try {\r\n if (locale === this._ai18n.getLocale()) return;\r\n const fromLocale = this.currentLocale;\r\n this.currentLocale = locale;\r\n await this._loadMoment();\r\n await this._ai18n.setLocale(this.currentLocale);\r\n await this.reloadTranslations(fromLocale);\r\n } catch (err) {\r\n console.log(err);\r\n this.currentLocale = this.defaultLocale;\r\n await this._loadMoment();\r\n await this._ai18n.setLocale(this.currentLocale);\r\n }\r\n }\r\n\r\n async loadNamespace(ns) {\r\n return new Promise((resolve, reject) => {\r\n this._ai18n.i18next.loadNamespaces(ns, () => {\r\n resolve();\r\n });\r\n });\r\n }\r\n\r\n async reloadTranslations(fromLocale) {\r\n try {\r\n await this._ai18n.i18next.reloadResources();\r\n if (fromLocale) this._ea.publish('i18n:locale:changed', { oldValue: fromLocale, newValue: this.currentLocale });\r\n this._bindingSignaler.signal('aurelia-translation-signal');\r\n signalBindings('locale-changed');\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n tr(key, data) {\r\n if (typeof data === 'object') return this._ai18n.tr(key, data);\r\n if (data != null && data != undefined) return this._ai18n.tr(key, {count: data});\r\n return this._ai18n.tr(key);\r\n }\r\n\r\n formatDate(value, formatter) {\r\n if (!value) return null;\r\n if (!formatter) formatter = 'lll';\r\n return moment(value).format(formatter)\r\n }\r\n\r\n formatNumber(value, decimals, prefix = '', addPlusIfPositive = false) {\r\n var n = Number(value);\r\n if (n === NaN) return value;\r\n if (decimals === 0) n = n.toFixed(0);\r\n else if (decimals) n = n.toFixed(decimals);\r\n let plusMinus = (addPlusIfPositive && n > 0) ? '+' : '';\r\n if (addPlusIfPositive && n < 0) {\r\n plusMinus = '-';\r\n n *= -1;\r\n }\r\n return `${plusMinus}${prefix}${n.toLocaleString()}`;\r\n }\r\n\r\n boolToYesNo(value) {\r\n if (typeof value === 'string') return value === 'true' ? this.tr('yes') : this.tr('no');\r\n return value ? this.tr('yes') : this.tr('no'); \r\n }\r\n}\r\n","import moment from 'moment';\r\n\r\n/* sign-up */\r\nclass Registration {\r\n\tfirstName = '';\r\n\tlastName = '';\r\n\tdateOfBirth = '';\r\n\temail = '';\r\n\tpassword = '';\r\n\tstreetAddress = '';\r\n\tstreetAddress2 = '';\r\n\tcity = '';\r\n\tstate = '';\r\n\tzip = '';\r\n\tcellPhone = '';\r\n\tisLicensedLife = false;\r\n\tisLicensedHealth = false;\r\n\tparentMemberId = '';\r\n nationalProducerNumber = '';\r\n\r\n\tconstructor() {\r\n\t}\r\n}\r\n\r\n/* update profile */\r\nclass MemberUpdate {\r\n\tid = '';\r\n\tfirstName = '';\r\n\tlastName = '';\r\n\tfullName = '';\r\n\tteamName = '';\r\n\temail = '';\r\n\tdateOfBirth = '';\r\n\tstreetAddress = '';\r\n\tstreetAddress2 = '';\r\n\tcity = '';\r\n\tstate = '';\r\n\tzip = '';\r\n\tbusinessPhone = '';\r\n\tcellPhone = '';\r\n\tisLicensedLife = false;\r\n\tisLicensedHealth = false;\r\n nationalProducerNumber = '';\r\n}\r\n\r\n/* profile */\r\nclass MemberProfile {\r\n\tid = '';\r\n\tfirstName = '';\r\n\tlastName = '';\r\n\tfullName = '';\r\n\temail = '';\r\n\tpassword = '';\r\n\tdateOfBirth = '';\r\n\tstreetAddress = '';\r\n\tstreetAddress2 = '';\r\n\tcity = '';\r\n\tstate = '';\r\n\tzip = '';\r\n\tbusinessPhone = '';\r\n\tcellPhone = '';\r\n\tisLicensedLife = false;\r\n\tisLicensedHealth = false;\r\n\tparentMemberId = '';\r\n\tlifeLevel = '';\r\n\timageUrl = '';\r\n isActive = false;\r\n inactiveReason = '';\r\n}\r\n\r\n/* parent */\r\nclass MiniMemberProfile {\r\n\tid = '';\r\n\tfullName = '';\r\n\temail = '';\r\n\tphone = '';\r\n\timageUrl = '';\r\n}\r\n\r\n/* reset password */\r\nclass ResetPassword {\r\n\temail = '';\r\n}\r\n\r\nclass ResetPasswordConfirmation {\r\n\temail = '';\r\n\tpassword = '';\r\n\ttoken = '';\r\n}\r\n\r\n/* FileKey */\r\nclass FileKey {\r\n\tid = '';\r\n\trequestedByUserId = '';\r\n}\r\n\r\nvar m = {\r\n\tRegistration: Registration,\r\n\tMemberUpdate: MemberUpdate,\r\n\tMemberProfile: MemberProfile,\r\n\tMiniMemberProfile: MiniMemberProfile,\r\n\tResetPassword: ResetPassword,\r\n\tResetPasswordConfirmation: ResetPasswordConfirmation,\r\n\tFileKey: FileKey,\r\n};\r\n\r\nexport {\r\n\tm\r\n}\r\n","// Element.matches() polyfill\r\nif (!Element.prototype.matches) {\r\n Element.prototype.matches = function(s) {\r\n var matches = (this.document || this.ownerDocument).querySelectorAll(s),\r\n i = matches.length;\r\n while (--i >= 0 && matches.item(i) !== this) {}\r\n return i > -1;\r\n };\r\n}\r\n\r\n/**\r\n * Element.closest() polyfill\r\n * https://developer.mozilla.org/en-US/docs/Web/API/Element/closest#Polyfill\r\n */\r\nif (!Element.prototype.closest) {\r\n\tElement.prototype.closest = function (s) {\r\n\t\tvar el = this;\r\n\t\tvar ancestor = this;\r\n\t\tif (!document.documentElement.contains(el)) return null;\r\n\t\tdo {\r\n\t\t\tif (ancestor.matches(s)) return ancestor;\r\n\t\t\tancestor = ancestor.parentElement;\r\n\t\t} while (ancestor !== null);\r\n\t\treturn null;\r\n\t};\r\n}\r\n\r\n/**\r\n * ChildNode.remove() polyfill\r\n * https://gomakethings.com/removing-an-element-from-the-dom-the-es6-way/\r\n * @author Chris Ferdinandi\r\n * @license MIT\r\n */\r\n(function (elem) {\r\n\tfor (var i = 0; i < elem.length; i++) {\r\n\t\tif (!window[elem[i]] || 'remove' in window[elem[i]].prototype) continue;\r\n\t\twindow[elem[i]].prototype.remove = function () {\r\n\t\t\tthis.parentNode.removeChild(this);\r\n\t\t};\r\n\t}\r\n})(['Element', 'CharacterData', 'DocumentType']);\r\n\r\n\r\n//\r\n// requestAnimationFrame polyfill by Erik Möller.\r\n// With fixes from Paul Irish and Tino Zijdel\r\n//\r\n// http://paulirish.com/2011/requestanimationframe-for-smart-animating/\r\n// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating\r\n//\r\n// MIT license\r\n//\r\n(function() {\r\n var lastTime = 0;\r\n var vendors = ['webkit', 'moz'];\r\n for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {\r\n window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];\r\n window.cancelAnimationFrame =\r\n window[vendors[x] + 'CancelAnimationFrame'] || window[vendors[x] + 'CancelRequestAnimationFrame'];\r\n }\r\n\r\n if (!window.requestAnimationFrame)\r\n window.requestAnimationFrame = function(callback) {\r\n var currTime = new Date().getTime();\r\n var timeToCall = Math.max(0, 16 - (currTime - lastTime));\r\n var id = window.setTimeout(function() {\r\n callback(currTime + timeToCall);\r\n }, timeToCall);\r\n lastTime = currTime + timeToCall;\r\n return id;\r\n };\r\n\r\n if (!window.cancelAnimationFrame)\r\n window.cancelAnimationFrame = function(id) {\r\n clearTimeout(id);\r\n };\r\n}());\r\n\r\n// Source: https://github.com/jserz/js_piece/blob/master/DOM/ParentNode/prepend()/prepend().md\r\n(function(arr) {\r\n arr.forEach(function(item) {\r\n if (item.hasOwnProperty('prepend')) {\r\n return;\r\n }\r\n Object.defineProperty(item, 'prepend', {\r\n configurable: true,\r\n enumerable: true,\r\n writable: true,\r\n value: function prepend() {\r\n var argArr = Array.prototype.slice.call(arguments),\r\n docFrag = document.createDocumentFragment();\r\n\r\n argArr.forEach(function(argItem) {\r\n var isNode = argItem instanceof Node;\r\n docFrag.appendChild(isNode ? argItem : document.createTextNode(String(argItem)));\r\n });\r\n\r\n this.insertBefore(docFrag, this.firstChild);\r\n }\r\n });\r\n });\r\n})([Element.prototype, Document.prototype, DocumentFragment.prototype]);\r\n\r\n// getAttributeNames\r\nif (Element.prototype.getAttributeNames == undefined) {\r\n Element.prototype.getAttributeNames = function () {\r\n var attributes = this.attributes;\r\n var length = attributes.length;\r\n var result = new Array(length);\r\n for (var i = 0; i < length; i++) {\r\n result[i] = attributes[i].name;\r\n }\r\n return result;\r\n };\r\n}\r\n","import { HTMLSanitizer } from 'aurelia-templating-resources';\r\nimport * as DOMPurify from 'dompurify';\r\n\r\nexport class Sanitizer extends HTMLSanitizer {\r\n sanitize(input) {\r\n const config = { ADD_TAGS: ['iframe'], ADD_ATTR: ['allow', 'allowfullscreen', 'frameborder', 'scrolling'] };\r\n return !!input ? DOMPurify.sanitize(input, config) : '';\r\n }\r\n}","import { inject } from 'aurelia-framework';\r\nimport { HttpClient } from 'aurelia-http-client';\r\nimport { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { c, siteUrlBase, apiUrlBase } from './common';\r\nimport { ROLE } from './constants';\r\n\r\n@inject(HttpClient, EventAggregator)\r\nexport class Security {\r\n _config;\r\n\r\n tokenKey = 'zeus.t';\r\n _authenticatedMemberIdKey = 'zeus.mid';\r\n isAdminKey = 'zeus.ia';\r\n originKey = 'zeus.o';\r\n searchKey = 'zeus.memberSearchKey';\r\n searchResultsKey = 'zeus.memberSearchResultsKey';\r\n\tisAuthenticated = false;\r\n\tauthenticatedMemberId;\r\n\tisAdmin = false;\r\n agentKey = 'zeus.agent';\r\n agent = {};\r\n inRolesKey = 'zeus.inroles';\r\n inRoles = [];\r\n SHADOWER_KEY = 'zeus.shadower';\r\n shadower;\r\n isShadow = false;\r\n isAssistant = false;\r\n shadowUserId = undefined;\r\n\ttoken = '';\r\n\tloginErrorMessage = '';\r\n\tbaseUiUrl = '';\r\n\tbaseApiUrl = '';\r\n\r\n\tconstructor(http, eventAggregator, i18n, config) {\r\n\t this.http = http;\r\n\t this._ea = eventAggregator;\r\n\t this._i18n = i18n;\r\n this._config = config;\r\n\t\tthis.baseUiUrl = siteUrlBase();\r\n\t\tthis.baseApiUrl = apiUrlBase();\r\n\r\n\t\tthis.http = http.configure(x => {\r\n\t\t\tx.withHeader(\"Accept\", \"application/json\");\r\n\t\t\tx.withHeader(\"Content-Type\", \"application/json\");\r\n\t\t});\r\n\t}\r\n\r\n profileName(agent) {\r\n if (agent) return agent.firstName;\r\n if (!this.agent) return '';\r\n console.log(this.agent);\r\n return this.agent.firstName;\r\n }\r\n\r\n setProfileName(id, firstName, lastName) {\r\n if (id !== this.authenticatedMemberId) return;\r\n this.agent.firstName = firstName;\r\n this.agent.lastName = lastName;\r\n }\r\n\r\n isTeam() {\r\n if (!this.agent) return false;\r\n return this.agent.isTeam;\r\n }\r\n\r\n isAgency() {\r\n if (!this.agent) return false;\r\n return this.agent.isAgency;\r\n }\r\n\r\n isMasterAgency() {\r\n if (!this.agent) return false;\r\n return this.agent.isMasterAgency;\r\n }\r\n\r\n teamType() {\r\n if (this.isMasterAgency()) return 'master-agency';\r\n if (this.isAgency()) return 'agency';\r\n return 'team';\r\n }\r\n\r\n /**\r\n * Determine whether the level should be displayed. Assistants cannot see their level, but can see the level of those below\r\n * @param {Guid} forMemberId - the ID of the member\r\n * @returns {boolean}\r\n */\r\n canSeeLevel(forMemberId) {\r\n if (!this.isAssistant) return true;\r\n if (forMemberId === this.authenticatedMemberId) return false;\r\n return true;\r\n }\r\n\r\n /**\r\n * Determine whether the commissions should be displayed\r\n * @returns {boolean}\r\n */\r\n canSeeCommissions() {\r\n if (this.isAssistant) return false;\r\n return this.isInRole(ROLE.BetaTester);\r\n }\r\n \r\n isInRole(value) {\r\n try {\r\n if (!value) return false;\r\n if (!this.inRoles || !this.inRoles.length) return false;\r\n let checkRoles = [];\r\n if (Array.isArray(value)) checkRoles = value;\r\n else checkRoles = value.indexOf(',') >= 0 ? value.split(',') : [value];\r\n let isInAtLeastOneRole = false;\r\n checkRoles.forEach(role => {\r\n if (this.inRoles.indexOf(role) >= 0) isInAtLeastOneRole = true;\r\n });\r\n return isInAtLeastOneRole;\r\n } catch (err) {\r\n console.log(err);\r\n return false;\r\n }\r\n }\r\n\r\n isLevel(level) {\r\n try {\r\n if (!this.agent || !this.agent.lifeLevel) return false;\r\n return this.agent.lifeLevel === level;\r\n } catch (err) {\r\n console.log(err);\r\n return false;\r\n }\r\n }\r\n\r\n isInMinimumLevel(minimumLevel) {\r\n try {\r\n // Levels must be number based: L01\r\n if (!this.agent || !this.agent.lifeLevel) return false;\r\n if (this.agent.lifeLevel === 'home-office') return true;\r\n const levelNumber = parseInt(this.agent.lifeLevel.replace(/\\D/g, ''));\r\n const minimumLevelNumber = parseInt(minimumLevel.replace(/\\D/g, ''));\r\n return levelNumber >= minimumLevelNumber;\r\n } catch (err) {\r\n console.log(err);\r\n return false;\r\n }\r\n }\r\n\r\n signUpLink(forAgent) {\r\n let url = `${this.baseUiUrl}/#sign-up/`;\r\n if (forAgent) {\r\n url += forAgent.email;\r\n }\r\n if (!this.agent) return null;\r\n if (!forAgent) {\r\n if (!this.agent || !this.agent.email) return '';\r\n url += this.agent.email;\r\n }\r\n return url;\r\n }\r\n\r\n openShareLink(config, forAgent, zIndex) {\r\n const member = forAgent ?? this.agent;\r\n if (!member) return null;\r\n console.log(member);\r\n const shareLinkTemplate = config.value('shareLinkTemplate');\r\n console.log(shareLinkTemplate);\r\n const memberShareLink = c.Helpers.replaceVariables(this, shareLinkTemplate, true, member);\r\n console.log(memberShareLink);\r\n this._ea.publish(c.EventKeys.site.openLightbox, { embedSrc: memberShareLink, zIndex });\r\n }\r\n\r\n canAccessAdmin() {\r\n if (this.isAdmin) return true;\r\n return this.isInRole(this.accessAdminRoles());\r\n }\r\n\r\n accessAdminRoles() {\r\n return [ROLE.Admin, ROLE.AgentAdmin, ROLE.WebsiteAdmin, ROLE.PolicyReviewer, ROLE.PolicyAdmin, ROLE.LeadManager];\r\n }\r\n\r\n showAdminToggle() {\r\n if (this.isAdmin) return true;\r\n return this.isInRole([ROLE.Admin, ROLE.CarrierAdmin, ROLE.WebsiteAdmin, ROLE.Translator, ROLE.ResourceAdmin, ROLE.TrainingAdmin]);\r\n }\r\n\r\n canEditContent() {\r\n return this.isInRole([ROLE.Admin, ROLE.WebsiteAdmin, ROLE.Translator]);\r\n }\r\n\r\n canHaveAgentSite() {\r\n return true;\r\n\t}\r\n\tcanShareLink() {\r\n\t return true;\r\n\t}\r\n\tcanAccessCorporateEvents() {\r\n\t return true;\r\n\t}\r\n\tcanBePromoted() {\r\n\t return true;\r\n\t}\r\n\tcanAccessBranding() {\r\n\t return true;\r\n\t}\r\n\tcanOnlyCreateLevelLists() {\r\n\t return false;\r\n\t}\r\n isAuthenticatedMember(memberId) {\r\n if (!this.authenticatedMemberId || !memberId) return false;\r\n return this.authenticatedMemberId.toLowerCase() === memberId.toLowerCase();\r\n }\r\n\r\n\tloadState() {\r\n\t\tthis.setToken(this.fromLocalStore(this.tokenKey), false);\r\n\r\n\t\tlet authenticatedMemberIdValue = this.fromLocalStore(this._authenticatedMemberIdKey);\r\n\t\tif (authenticatedMemberIdValue !== null) this.authenticatedMemberId = authenticatedMemberIdValue;\r\n\r\n\t\tvar isAdminValue = this.fromLocalStore(this.isAdminKey);\r\n\t\tif (isAdminValue !== null && isAdminValue === true || isAdminValue === false) {\r\n\t\t\tthis.isAdmin = isAdminValue;\r\n\t\t}\r\n\t\tvar agentValue = this.fromLocalStore(this.agentKey);\r\n\t\tif (agentValue) {\r\n\t\t this.agent = JSON.parse(agentValue);\r\n if (this.agent) this.agent.id = this.authenticatedMemberId;\r\n if (this.agent && !this.agent.fullName) this.agent.fullName = `${this.agent.firstName} ${this.agent.lastName}`;\r\n if (this.agent && !this.agent.directUplineFirstName) {\r\n this.agent.directUplineFirstName = '';\r\n this.agent.directUplineLastName = '';\r\n this.agent.directUplineEmail = '';\r\n this.agent.directUplineCell = '';\r\n }\r\n if (this.agent && !this.agent.teamFirstName) {\r\n this.agent.teamFirstName = '';\r\n this.agent.teamLastName = '';\r\n this.agent.teamEmail = '';\r\n this.agent.teamCell = '';\r\n }\r\n if (this.agent && !this.agent.agencyFirstName) {\r\n this.agent.agencyFirstName = '';\r\n this.agent.agencyLastName = '';\r\n this.agent.agencyEmail = '';\r\n this.agent.agencyCell = '';\r\n }\r\n if (this.agent) {\r\n if (this.agent.isBaseshop) { this.agent.isAgency = this.agent.isBaseshop; delete this.agent.isBaseshop; }\r\n if (this.agent.baseshopFirstName) { this.agent.agencyFirstName = this.agent.baseshopFirstName; delete this.agent.baseshopFirstName; }\r\n if (this.agent.baseshopLastName) { this.agent.agencyLastName = this.agent.baseshopLastName; delete this.agent.baseshopLastName; }\r\n if (this.agent.baseshopEmail) { this.agent.agencyEmail = this.agent.baseshopEmail; delete this.agent.baseshopEmail; }\r\n if (this.agent.baseshopCell) { this.agent.agencyCell = this.agent.baseshopCell; delete this.agent.baseshopCell; }\r\n }\r\n\t }\r\n const inRolesValue = this.fromLocalStore(this.inRolesKey);\r\n this.inRoles = inRolesValue ? JSON.parse(inRolesValue) : [];\r\n\r\n const shadowerValue = this.fromLocalStore(this.SHADOWER_KEY);\r\n this.shadower = shadowerValue ? JSON.parse(shadowerValue) : undefined;\r\n this.shadowUserId = this.shadower ? this.shadower.userId : '';\r\n this.isShadow = this.shadower ? true : false;\r\n this.isAssistant = this.shadower ? this.shadower.isAssistant : false;\r\n\r\n\t\tthis.setBodyClasses();\r\n\t}\r\n\r\n\tsetOrigin(origin) {\r\n\t\tlocalStorage.setItem(this.originKey, origin);\r\n\t}\r\n\tgetOrigin() {\r\n\t\tvar origin = this.fromLocalStore(this.originKey);\r\n\t\tlocalStorage.removeItem(this.originKey);\r\n\t\treturn origin;\r\n\t}\r\n\r\n\tasync login(username, password) {\r\n try {\r\n\t\t\tconst response = await this.http.post(this.baseApiUrl + '/Token', 'grant_type=password&username=' + encodeURIComponent(username) + '&password=' + encodeURIComponent(password));\r\n var authResponse = new AuthenticationResponse(response);\r\n if (!authResponse.isAuthenticated) {\r\n this.setToken('', true);\r\n this.loginErrorMessage = authResponse.errorDescription;\r\n return LoginResult.InvalidLogin;\r\n }\r\n\r\n this.setToken(authResponse.token, true);\r\n\r\n this.authenticatedMemberId = authResponse.authenticatedMemberId;\r\n localStorage.setItem(this._authenticatedMemberIdKey, this.authenticatedMemberId)\r\n\r\n this.isAdmin = authResponse.isAdmin;\r\n localStorage.setItem(this.isAdminKey, this.isAdmin);\r\n\r\n this.agent = authResponse.agent;\r\n if (this.agent && !this.agent.fullName) this.agent.fullName = `${this.agent.firstName} ${this.agent.lastName}`;\r\n localStorage.setItem(this.agentKey, JSON.stringify(this.agent));\r\n\r\n this.inRoles = authResponse.inRoles;\r\n localStorage.setItem(this.inRolesKey, JSON.stringify(this.inRoles));\r\n\r\n this.shadower = authResponse.shadower;\r\n if (this.shadower) localStorage.setItem(this.SHADOWER_KEY, JSON.stringify(this.shadower));\r\n this.shadowUserId = this.shadower ? this.shadower.userId : '';\r\n this.isShadow = this.shadower ? true : false;\r\n this.isAssistant = this.shadower ? this.shadower.isAssistant : false;\r\n \r\n this.setBodyClasses();\r\n\r\n this._ea.publish(c.EventKeys.loginAuthenticationUpdated, { authenticated: true });\r\n return LoginResult.Authenticated;\r\n } catch (err) {\r\n this.setToken(\"\", true);\r\n var authResponse = new AuthenticationResponse(err);\r\n this.loginErrorMessage = authResponse.errorDescription;\r\n this.authenticatedMemberId = null;\r\n this.isAdmin = false;\r\n this.agent = {};\r\n this.inRoles = [];\r\n localStorage.setItem(this.isAdminKey, 'false');\r\n if (authResponse.error === 'invalid_terms') {\r\n return LoginResult.TermsNotAggreedTo;\r\n }\r\n if (authResponse.error === 'invalid_registration') {\r\n return LoginResult.InvalidRegistrationNoDirectUpline;\r\n }\r\n return LoginResult.InvalidLogin;\r\n }\r\n\t}\r\n\r\n\tlogout() {\r\n\t this.setToken(\"\", true);\r\n\t this.authenticatedMemberId = null;\r\n\t this.isAdmin = false;\r\n\t\tlocalStorage.removeItem(this.isAdminKey);\r\n\t\tlocalStorage.removeItem(this.searchKey);\r\n\t\tlocalStorage.removeItem(this.searchResultsKey);\r\n\t\tlocalStorage.removeItem(this.agentKey);\r\n\t\tlocalStorage.removeItem(this.inRolesKey);\r\n\t\tlocalStorage.removeItem(this.SHADOWER_KEY);\r\n\t\t$('body').removeClass('admin-tools-on');\r\n\t\t$('body').removeClass('members');\r\n\t\tthis._ea.publish(c.EventKeys.loginAuthenticationUpdated, { authenticated: false });\r\n\t}\r\n\r\n\tsetToken(token, setLocalStore) {\r\n\t\tif (token === null) token = \"\";\r\n\t\tthis.token = token;\r\n\t\tthis.isAuthenticated = token.length !== 0;\r\n\t\tif (setLocalStore === true && !this.isAuthenticated) {\r\n\t\t\tlocalStorage.removeItem(this.tokenKey);\r\n\t\t} else if (setLocalStore === true) {\r\n\t\t localStorage.setItem(this.tokenKey, token);\r\n\t\t}\r\n\r\n\t\tthis.setBodyClasses();\r\n\t}\r\n\r\n\tsetBodyClasses() {\r\n\t\tif (this.isAuthenticated) {\r\n\t\t\t$(\"body\").addClass(\"members\");\r\n\t\t} else {\r\n\t\t\t$(\"body\").removeClass(\"members\");\r\n\t\t}\r\n\t}\r\n\r\n\tfromLocalStore(key) {\r\n\t\ttry {\r\n\t\t var lsValue = localStorage.getItem(key);\r\n\t\t if (lsValue === 'true') return true;\r\n\t\t if (lsValue === 'false') return false;\r\n\t\t return lsValue;\r\n\t\t} catch (err) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}\r\n\r\n completeOnboarding() {\r\n if (!this.agent) return;\r\n this.agent.onboardingComplete = true;\r\n localStorage.setItem(this.agentKey, JSON.stringify(this.agent));\r\n this._ea.publish(c.EventKeys.menu.changed, { area: 'members' });\r\n this._ea.publish(c.EventKeys.onboarding.completed);\r\n }\r\n}\r\n\r\nexport class AuthenticationResponse {\r\n\tisAuthenticated = false;\r\n\ttoken = '';\r\n\terror = '';\r\n\terrorDescription = '';\r\n\tauthenticatedMemberId;\r\n\tisAdmin = false;\r\n agent = {};\r\n inRoles = [];\r\n shadower = undefined;\r\n\r\n\tconstructor(httpResponse) {\r\n\t\tvar data = JSON.parse(httpResponse.response);\r\n\t\tif (httpResponse.statusCode !== 200) {\r\n\t\t\tthis.isAuthenticated = false;\r\n\t\t\tthis.error = data.error;\r\n\t\t\tthis.errorDescription = data.error_description;\r\n\t\t} else if (!data.access_token) {\r\n\t\t\tthis.isAuthenticated = false;\r\n\t\t\tthis.error = \"Error\";\r\n\t\t\tthis.errorDescription = \"Unknown Error\";\r\n\t\t} else {\r\n\t\t\tthis.isAuthenticated = true;\r\n\t\t\tthis.token = data.access_token;\r\n\t\t\tthis.authenticatedMemberId = data.memberId;\r\n\t\t\tthis.isAdmin = data.isAdmin === \"true\" ? true : false;\r\n this.agent = JSON.parse(data.agentJson);\r\n if (this.agent && !this.agent.fullName) this.agent.fullName = `${this.agent.firstName} ${this.agent.lastName}`;\r\n if (this.agent) this.agent.id = this.authenticatedMemberId;\r\n this.inRoles = JSON.parse(data.rolesJson || '[]');\r\n this.shadower = data.shadower ? JSON.parse(data.shadower) : null;\r\n }\r\n\t}\r\n}\r\n\r\nclass LoginResults {\r\n\tconstructor() {\r\n\t\t//console.log('LoginResults ctor');\r\n\t\tthis.Authenticated = 1;\r\n\t\tthis.InvalidLogin = 2;\r\n\t\tthis.TermsNotAggreedTo = 3;\r\n\t\tthis.InvalidRegistrationNoDirectUpline = 4;\r\n\t}\r\n}\r\n\r\nvar _LoginResults = new LoginResults();\r\nexport var LoginResult = _LoginResults;\r\n","import { inject } from 'aurelia-framework';\r\nimport { Router } from 'aurelia-router';\r\nimport { HttpClient } from 'aurelia-http-client';\r\nimport { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { Security } from 'common/security';\r\nimport { Notifier } from 'common/ui';\r\nimport { c, apiUrlBase } from 'common/common';\r\n\r\n@inject(HttpClient, Router, EventAggregator, Security, Notifier)\r\nexport class Api {\r\n _ea;\r\n\r\n authHeader = '';\r\n\tbaseUrl = '';\r\n\tbaseApiUrl = '';\r\n\tisDevelopment = false;\r\n\thasSecurityNotice = false;\r\n _additionalHeaders = [];\r\n\r\n\tconstructor(http, router, ea, security, notifier) {\r\n\t\tthis.baseUrl = apiUrlBase();\r\n\t\tthis.baseApiUrl = this.baseUrl + \"/api/\";\r\n\t\tthis.isDevelopment = this.baseUrl.indexOf(\"localhost\") >= 0;\r\n\r\n this.security = security;\r\n\t\tthis.router = router;\r\n this._ea = ea;\r\n\t\tthis.notifier = notifier;\r\n\t\t//this.http = http;\r\n\t\tthis.authHeader = \"Authorization\";\r\n\t\tvar d = new Date();\r\n\t\tvar timezoneOffset = d.getTimezoneOffset();\r\n const me = this;\r\n\t\tthis.http = http.configure(x => {\r\n\t\t\tx.withHeader(\"Accept\", \"application/json\");\r\n\t\t\tx.withHeader(\"Content-Type\", \"application/json\");\r\n\t\t\tx.withHeader(\"X-LEGACY-TimezoneOffset\", timezoneOffset);\r\n x.withInterceptor({\r\n request(message) {\r\n me._additionalHeaders.forEach(h => {\r\n message.headers.add(h.key, h.value);\r\n });\r\n return message;\r\n },\r\n });\r\n\t\t});\r\n\t}\r\n\r\n async initialize() {\r\n // Don't await, don't want to hold up; the UI display just to get the IP address\r\n this._loadIp();\r\n }\r\n\r\n async _loadIp() {\r\n try {\r\n const httpClient = new HttpClient();\r\n const response = await httpClient.get('https://api.ipify.org?format=json');\r\n var data = JSON.parse(response.response);\r\n if (data.ip) this.addHeader('X-LEGACY-ip', data.ip);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n\tauthHeaderValue() {\r\n\t\treturn \"Bearer \" + this.security.token;\r\n\t}\r\n\r\n\tshadowHeaderValue() {\r\n return this.security.shadowUserId;\r\n }\r\n\r\n addHeader(key, value) {\r\n this._additionalHeaders.push({ key, value });\r\n }\r\n\r\n clearHeaders() {\r\n this._additionalHeaders = [];\r\n }\r\n\r\n\tresetSecurityCheck() {\r\n\t\tthis.hasSecurityNotice = false;\r\n\t}\r\n\r\n post(api, payload) {\r\n return this.postData(api, payload);\r\n }\r\n\r\n\tpostData(api, payload) {\r\n\t\tvar me = this;\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tthis.http.createRequest(this.getFullUrl(api))\r\n\t\t\t\t.asPost()\r\n\t\t\t\t.withContent(payload)\r\n\t\t\t\t.withHeader(me.authHeader, me.authHeaderValue())\r\n .withHeader('X-LEGACY-ShadowUserId', me.shadowHeaderValue())\r\n\t\t\t\t.send().then(httpResponse => {\r\n\t\t\t\t\tif (!(httpResponse.statusCode === 200 || httpResponse.statusCode === 201)) { // OK, Created\r\n\t\t\t\t\t\treject(httpResponse.statusText);\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvar data;\r\n\t\t\t\t\tif (httpResponse.response != null && httpResponse.response != \"\") data = JSON.parse(httpResponse.response);\r\n\t\t\t\t\tresolve(data);\r\n\t\t\t\t}).catch(error => {\r\n\t\t\t\t\tif (error.response === \"\") {\r\n\t\t\t\t\t\treject(\"Error\"); \r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvar httpResponse = JSON.parse(error.response);\r\n\t\t\t\t\treject(httpResponse.message);\r\n\t\t\t\t});\r\n\t\t});\r\n\t}\r\n\r\n put(api, payload) {\r\n return this.updateData(api, payload);\r\n }\r\n\r\n\tupdateData(api, payload) {\r\n\t\tvar me = this;\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tme.http.createRequest(me.getFullUrl(api))\r\n\t\t\t\t.asPut()\r\n\t\t\t\t.withContent(payload)\r\n\t\t\t\t.withHeader(me.authHeader, me.authHeaderValue())\r\n .withHeader('X-LEGACY-ShadowUserId', me.shadowHeaderValue())\r\n\t\t\t\t.send().then(httpResponse => {\r\n\t\t\t\t\tif (!(httpResponse.statusCode === 200)) {\r\n\t\t\t\t\t\treject(httpResponse.statusText);\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvar data = JSON.parse(httpResponse.response);\r\n\t\t\t\t\tresolve(data);\r\n\t\t\t\t}).catch(error => {\r\n\t\t\t\t\tvar httpResponse = JSON.parse(error.response);\r\n\t\t\t\t\treject(httpResponse.message);\r\n\t\t\t\t});\r\n\t\t});\r\n\t}\r\n\r\n get(api) {\r\n return this.getData(api);\r\n }\r\n\r\n\tgetData(api) {\r\n\t var me = this;\r\n\t var ms = (new Date).getTime();\r\n\t if (api.indexOf('?') >= 0) api += '&no-cache=' + ms; else api += '?no-cache=' + ms;\r\n\t return new Promise((resolve, reject) => {\r\n\r\n\t if (me.security.isAuthenticated) {\r\n\t me.http.createRequest(me.getFullUrl(api))\r\n .asGet()\r\n .withHeader(me.authHeader, me.authHeaderValue())\r\n\t\t\t\t\t.withHeader('X-LEGACY-ShadowUserId', me.shadowHeaderValue())\r\n .send().then(httpResponse => {\r\n if (httpResponse.statusCode !== 200) {\r\n reject(httpResponse.statusText);\r\n return;\r\n }\r\n var data = JSON.parse(httpResponse.response);\r\n resolve(data);\r\n }).catch(error => {\r\n if (error.statusCode === 401) {\r\n if (me.hasSecurityNotice) {\r\n reject(\"Unauthorized\");\r\n return;\r\n }\r\n me.notifier.error('login-sign-in-for-security-message');\r\n me.hasSecurityNotice = true;\r\n me._ea.publish(c.EventKeys.login.timedOut);\r\n return this.router.navigate('logout', true);\r\n }\r\n reject(\"An error occurred\");\r\n });\r\n\t } else {\r\n\t me.http.createRequest(me.getFullUrl(api))\r\n .asGet()\r\n .send().then(httpResponse => {\r\n if (httpResponse.statusCode !== 200) {\r\n reject(httpResponse.statusText);\r\n return;\r\n }\r\n var data = JSON.parse(httpResponse.response);\r\n resolve(data);\r\n }).catch(error => {\r\n if (error.statusCode === 401) {\r\n if (me.hasSecurityNotice) {\r\n reject(\"Unauthorized\");\r\n return;\r\n }\r\n me.notifier.error('login-sign-in-for-security-message');\r\n me.hasSecurityNotice = true;\r\n me._ea.publish(c.EventKeys.login.timedOut);\r\n return this.router.navigate('logout', true);\r\n }\r\n reject(\"An error occurred\");\r\n });\r\n\t }\r\n\t });\r\n\t}\r\n\r\n delete(api, payload) {\r\n return this.deleteData(api, payload);\r\n }\r\n\r\n deleteData(api, payload) {\r\n\t\tvar me = this;\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tme.http.createRequest(me.getFullUrl(api))\r\n\t\t\t\t.asDelete()\r\n .withContent(payload)\r\n\t\t\t\t.withHeader(me.authHeader, me.authHeaderValue())\r\n .withHeader('X-LEGACY-ShadowUserId', me.shadowHeaderValue())\r\n\t\t\t\t.send().then(httpResponse => {\r\n\t\t\t\t\tif (httpResponse.statusCode !== 200) {\r\n\t\t\t\t\t\treject(httpResponse.statusText);\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n if (httpResponse.response) {\r\n try {\r\n var data = JSON.parse(httpResponse.response);\r\n resolve(data);\r\n } catch (dataErr) {\r\n console.log(dataErr);\r\n resolve(true);\r\n }\r\n }\r\n\t\t\t\t\tresolve(true);\r\n\t\t\t\t}).catch(error => {\r\n\t\t\t\t\tvar message = \"An error occurred\";\r\n\t\t\t\t\tif (error.response) {\r\n\t\t\t\t\t\tvar data = JSON.parse(error.response);\r\n\t\t\t\t\t\tif (data) message = data.message;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treject(message);\r\n\t\t\t\t});\r\n\t\t});\r\n\t}\r\n\r\n\tgetFullUrl(api) {\r\n\t\tif (api.indexOf('http') != 0) api = this.baseApiUrl + api;\r\n\t\treturn api;\r\n\t}\r\n\r\n}\r\n","import { inject } from 'aurelia-framework';\r\nimport { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { Router } from 'aurelia-router';\r\nimport { I18N } from 'aurelia-i18n';\r\nimport toastr from 'toastr';\r\nimport { c, apiUrlBase, eventListener } from 'common/common';\r\nimport { LpfnUtil } from 'common/utils';\r\n\r\nexport const UI_MODE = {\r\n\tdark: 'dark',\r\n\tlight: 'light',\r\n};\r\n\r\n@inject(I18N)\r\nexport class Notifier {\r\n constructor(i18n) {\r\n this.ai18n = i18n;\r\n toastr.options.timeOut = 4000;\r\n toastr.options.closeButton = true;\r\n toastr.options.positionClass = 'toast-top-center';\r\n\t}\r\n\r\n success(key, data, timeout = undefined, sticky = false) {\r\n const options = {};\r\n if (sticky) options.timeOut = 0;\r\n if (timeout) options.timeOut = timeout;\r\n if (typeof data === 'object') {\r\n toastr.success(this.ai18n.tr(key, data), undefined, options);\r\n return;\r\n }\r\n toastr.success(this.ai18n.tr(key), undefined, options);\r\n }\r\n\r\n\tsuccessText(message) {\r\n\t toastr.success(message);\r\n\t}\r\n\r\n\terrorText(message, sticky = false) {\r\n const options = {};\r\n if (sticky) options.timeOut = 0;\r\n\t\ttoastr.error(message, undefined, options);\r\n\t}\r\n\r\n\terror(key, sticky = false, data = null) {\r\n const options = {};\r\n if (sticky) options.timeOut = 0;\r\n\t\tif (typeof data === 'object') {\r\n\t\t\ttoastr.error(this.ai18n.tr(key, data), undefined, options);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\ttoastr.error(this.ai18n.tr(key), undefined, options);\r\n\t}\r\n\r\n info(key, titleKey = undefined, sticky = false, data = undefined) {\r\n const options = {};\r\n if (sticky) options.timeOut = 0;\r\n\t\tif (typeof data === 'object') {\r\n\t\t\ttoastr.info(this.ai18n.tr(key, data), this.ai18n.tr(titleKey), options);\r\n\t\t\treturn;\r\n\t\t}\r\n\t toastr.info(this.ai18n.tr(key), this.ai18n.tr(titleKey), options);\r\n\t}\r\n\r\n\tgeneralError(err) {\r\n if (err) {\r\n if (err.message) toastr.error(err.message);\r\n const translatedError = this.ai18n.tr(err);\r\n if (translatedError === err) toastr.error(translatedError);\r\n else toastr.error(this.ai18n.tr(err));\r\n return;\r\n }\r\n toastr.error(this.ai18n.tr('error-occurred'));\r\n\t}\r\n}\r\n\r\n@inject(Router, EventAggregator)\r\nexport class Page {\r\n\trouter;\r\n\t_ea;\r\n\r\n\tconstructor(router, ea) {\r\n\t this.router = router;\r\n\t\tthis._ea = ea;\r\n\t}\r\n\r\n\ttrack(pageId) {\r\n\t\tvar host = window.location.host;\r\n\t\tif (host.indexOf('localhost') >= 0) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// ga('send', 'pageview', '#/' + pageId);\r\n\t}\r\n\r\n\tscrollToTop() {\r\n\t\twindow.scrollTo(0, 0);\r\n\t}\r\n\r\n\tgetCurrentRoute() {\r\n\t\tlet currentInstruction = this.router.currentInstruction;\r\n\t\tif (!currentInstruction) return '';\r\n\t\tlet currentRoute = currentInstruction.fragment;\r\n\t\tif (!currentRoute) return '';\r\n\t\tif (typeof currentRoute !== 'string') return '';\r\n\t\treturn currentRoute;\r\n\t}\r\n\r\n\texportData(api, apiUrl, exportUrl, postData) {\r\n\t if (exportUrl.indexOf('/api/') !== 0) exportUrl = '/api/' + exportUrl;\r\n\t\tvar me = this;\r\n\t\treturn new Promise(function(resolve, reject) {\r\n\t\t\tif (!postData) {\r\n\t\t\t\tapi.getData(apiUrl).then(data => {\r\n\t\t\t\t\tme.exportHandler(data, exportUrl);\r\n\t\t\t\t\tresolve();\r\n\t\t\t\t}).catch(error => {\r\n\t\t\t\t\tvar notifier = new Notifier();\r\n\t\t\t\t\tnotifier.generalError();\r\n\t\t\t\t\tresolve();\r\n\t\t\t\t});\r\n\t\t\t} else {\r\n\t\t\t\tapi.postData(apiUrl, postData).then(data => {\r\n\t\t\t\t\tme.exportHandler(data, exportUrl);\r\n\t\t\t\t\tresolve();\r\n\t\t\t\t}).catch(error => {\r\n\t\t\t\t\tvar notifier = new Notifier();\r\n\t\t\t\t\tnotifier.generalError();\r\n\t\t\t\t\tresolve();\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n async export(api, url, postData, inline = false, callback) {\r\n const keyUrl = `${url}-key`;\r\n\t\tconst me = this;\r\n\t\treturn new Promise(function(resolve, reject) {\r\n\t\t\tif (!postData) {\r\n\t\t\t\tapi.get(keyUrl).then(data => {\r\n\t\t\t\t\tme.exportHandler(data, url, inline, callback);\r\n\t\t\t\t\tresolve();\r\n\t\t\t\t}).catch(error => {\r\n console.log(error);\r\n\t\t\t\t\tconst notifier = new Notifier();\r\n\t\t\t\t\tnotifier.generalError();\r\n\t\t\t\t\tresolve();\r\n\t\t\t\t});\r\n\t\t\t} else {\r\n\t\t\t\tapi.post(keyUrl, postData).then(data => {\r\n\t\t\t\t\tme.exportHandler(data, url, inline, callback);\r\n\t\t\t\t\tresolve();\r\n\t\t\t\t}).catch(error => {\r\n console.log(error);\r\n\t\t\t\t\tconst notifier = new Notifier();\r\n\t\t\t\t\tnotifier.generalError();\r\n\t\t\t\t\tresolve();\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\texportHandler(data, exportUrl, inline, callback) {\r\n\t if (exportUrl.indexOf('/api/') !== 0) exportUrl = `/api/${exportUrl}`;\r\n\t\tconst src = `${apiUrlBase()}${exportUrl}?fileKey=${data.id}&memberId=${data.requestedByUserId}`;\r\n\t\tif (callback) {\r\n\t\t\tcallback(src);\r\n\t\t} else if (inline) {\r\n\t\t\tthis._ea.publish(c.EventKeys.site.openLightbox, { embedSrc: src, fullHeight: true, zIndex: 2010 });\r\n\t\t} else {\r\n\t\t\t$('body').append(``);\r\n\t\t}\r\n\t}\r\n\r\n\tappContentFullHeight() {\r\n\t\ttry {\r\n\t\t\tconst el = document.getElementById('kt_app_content_container');\r\n\t\t\tif (el) el.classList.add('zeus-full-height');\r\n\t\t} catch (err) {\r\n\t\t\tconsole.log(err);\r\n\t\t}\r\n\t}\r\n\r\n\tappContentRegularHeight() {\r\n\t\ttry {\r\n\t\t\tconst el = document.getElementById('kt_app_content_container');\r\n\t\t\tif (el) el.classList.remove('zeus-full-height');\r\n\t\t} catch (err) {\r\n\t\t\tconsole.log(err);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nexport class Slideshow {\r\n initialize(id, options) {\r\n options = options || {};\r\n var randomizeStartIndex = options.randomizeStartIndex || false;\r\n var numberOfSlides = options.numberOfSlides || 0;\r\n var showDirectionNav = options.showDirectionNav || true;\r\n var showControlNav = options.showControlNav || true;\r\n var pauseTime = options.pauseTime || 3000;\r\n var startSlideIndex = 0;\r\n if (randomizeStartIndex) {\r\n var max = numberOfSlides - 1;\r\n var min = 0;\r\n startSlideIndex = Math.floor(Math.random() * (max - min + 1)) + min;\r\n }\r\n }\r\n}\r\n\r\nexport class Device {\r\n\tisMobile() {\r\n\t\tvar check = false;\r\n\t\t(function(a) {if(/(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(a.substr(0,4)))check = true})(navigator.userAgent||navigator.vendor||window.opera);\r\n\t\treturn check;\r\n\t}\r\n\r\n\tisMobileSize() {\r\n\t\tconst width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;\r\n\t\tconst height = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;\r\n\t\t// If either height or width is less than 600 pixels, this will be counted as mobile size\r\n\t\treturn width < 600 || height < 600;\r\n\t}\r\n}\r\n\r\n\r\nexport class ContentFullHeight {\r\n\t_handlers = [];\r\n\t_el;\r\n\r\n\tinitialize(el) {\r\n\t\tthis._el = el;\r\n\t\tthis._handlers.push(eventListener(window, 'resize', (e) => {\r\n\t\t\tlet timer;\r\n\t\t\tLpfnUtil.throttle(timer, () => { this._setContentHeight(); }, 200);\r\n\t\t}));\r\n\t\tthis._setContentHeight();\r\n\t}\r\n\r\n\t_setContentHeight() {\r\n if (!this._el) return;\r\n\t\tthis._el.style.height = 'auto';\r\n const height = this._appContentHeight();\r\n this._el.style.height = `${height}px`;\r\n\t}\r\n\r\n\t_appContentHeight() {\r\n\t\tconst headerEl = document.getElementById('kt_app_header');\r\n\t\tconst footerEl = document.getElementById('kt_app_footer');\r\n\t\treturn footerEl.offsetTop - headerEl.clientHeight - 30; // 30px padding in content\r\n\t}\r\n\t\r\n\tdispose() {\r\n\t\tthis._handlers.forEach(h => h.dispose());\r\n\t\tthis._handlers = [];\r\n\t}\r\n}\r\n\r\nexport function screenSize(reduceWidthBy = 0, reduceHeightBy = 0) {\r\n try {\r\n const width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;\r\n const height = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;\r\n return { width: width - reduceWidthBy, height: height - reduceHeightBy };\r\n } catch (err) {\r\n return {};\r\n }\r\n}\r\n\r\n\r\nexport class Logger {\r\n\tlog(message) {\r\n\t\tif (typeof message == 'Object') {\r\n\t\t\t//console.log(JSON.stringify(message));\r\n\t\t} else {\r\n\t\t\t//console.log(message);\r\n\t\t}\r\n\t}\r\n\tlogObject(obj) {\r\n\t\t//console.log(JSON.stringify(obj));\r\n\t}\r\n}\r\n\r\nexport function mode() {\r\n\ttry {\r\n\t\tconst fontColor = getComputedStyle(document.body).getPropertyValue('--bs-body-color');\r\n\t\tconst mode = document.body.parentNode.getAttribute('data-theme');\r\n\r\n\t\treturn {\r\n\t\t\tmode,\r\n\t\t\tfontColor,\r\n\t\t};\r\n\t} catch (err) {\r\n\t\tconsole.log(err);\r\n\t}\r\n}\r\n","class Utils {\r\n resizeHandlers = [];\r\n\r\n constructor() {\r\n this._windowResizeHandler();\r\n }\r\n\r\n /**\r\n * Handle window resize event with some\r\n * delay to attach event handlers upon resize complete\r\n */\r\n _windowResizeHandler() {\r\n var _runResizeHandlers = () => {\r\n // reinitialize other subscribed elements\r\n for (var i = 0; i < this.resizeHandlers.length; i++) {\r\n var each = this.resizeHandlers[i];\r\n if (each && each.call) each.call();\r\n }\r\n };\r\n\r\n var timer;\r\n\r\n window.addEventListener('resize', () => {\r\n this.throttle(timer, function() {\r\n _runResizeHandlers();\r\n }, 200);\r\n });\r\n };\r\n \r\n /**\r\n * Adds window resize event handler.\r\n * @param {function} callback function.\r\n */\r\n addResizeHandler(cb) {\r\n this.resizeHandlers.push(cb);\r\n }\r\n\r\n /**\r\n * Removes window resize event handler.\r\n * @param {function} callback function.\r\n */\r\n removeResizeHandler(cb) {\r\n for (var i = 0; i < this.resizeHandlers.length; i++) {\r\n if (cb === this.resizeHandlers[i]) {\r\n delete this.resizeHandlers[i];\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Trigger window resize handlers.\r\n */\r\n runResizeHandlers() {\r\n _runResizeHandlers();\r\n }\r\n\r\n resize() {\r\n window.dispatchEvent(new Event('resize'));\r\n }\r\n\r\n /**\r\n * Get GET parameter value from URL.\r\n * @param {string} paramName Parameter name.\r\n * @returns {string}\r\n */\r\n getURLParam(paramName) {\r\n var searchString = window.location.search.substring(1),\r\n i, val, params = searchString.split(\"&\");\r\n\r\n for (i = 0; i < params.length; i++) {\r\n val = params[i].split(\"=\");\r\n if (val[0] == paramName) {\r\n return unescape(val[1]);\r\n }\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Gets browser window viewport size. Ref:\r\n * http://andylangton.co.uk/articles/javascript/get-viewport-size-javascript/\r\n * @returns {object}\r\n */\r\n getViewPort() {\r\n var e = window,\r\n a = 'inner';\r\n if (!('innerWidth' in window)) {\r\n a = 'client';\r\n e = document.documentElement || document.body;\r\n }\r\n\r\n return {\r\n width: e[a + 'Width'],\r\n height: e[a + 'Height']\r\n };\r\n }\r\n\r\n /**\r\n * Checks whether given device mode is currently activated.\r\n * @param {string} mode Responsive mode name(e.g: desktop,\r\n * desktop-and-tablet, tablet, tablet-and-mobile, mobile)\r\n * @returns {boolean}\r\n */\r\n isBreakpointUp(mode) {\r\n var width = this.getViewPort().width;\r\n var breakpoint = this.getBreakpoint(mode);\r\n\r\n return (width >= breakpoint);\r\n }\r\n\r\n isBreakpointDown(mode) {\r\n var width = this.getViewPort().width;\r\n var breakpoint = this.getBreakpoint(mode);\r\n\r\n return (width < breakpoint);\r\n }\r\n\r\n getViewportWidth() {\r\n return this.getViewPort().width;\r\n }\r\n\r\n /**\r\n * Generates unique ID for give prefix.\r\n * @param {string} prefix Prefix for generated ID\r\n * @returns {boolean}\r\n */\r\n getUniqueId(prefix) {\r\n return prefix + Math.floor(Math.random() * (new Date()).getTime());\r\n }\r\n\r\n /**\r\n * Gets window width for give breakpoint mode.\r\n * @param {string} mode Responsive mode name(e.g: xl, lg, md, sm)\r\n * @returns {number}\r\n */\r\n getBreakpoint(breakpoint) {\r\n var value = this.getCssVariableValue('--kt-' + breakpoint);\r\n\r\n if ( value ) {\r\n value = parseInt(value.trim());\r\n } \r\n\r\n return value;\r\n }\r\n\r\n /**\r\n * Simulates delay\r\n */\r\n sleep(milliseconds) {\r\n var start = new Date().getTime();\r\n for (var i = 0; i < 1e7; i++) {\r\n if ((new Date().getTime() - start) > milliseconds) {\r\n break;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Gets randomly generated integer value within given min and max range\r\n * @param {number} min Range start value\r\n * @param {number} max Range end value\r\n * @returns {number}\r\n */\r\n getRandomInt(min, max) {\r\n return Math.floor(Math.random() * (max - min + 1)) + min;\r\n }\r\n\r\n triggerCustomEvent(el, eventName, data) {\r\n const event = new CustomEvent(eventName, { detail: data });\r\n el.dispatchEvent(event);\r\n }\r\n\r\n outerWidth(el, margin) {\r\n var width;\r\n\r\n if (margin === true) {\r\n width = parseFloat(el.offsetWidth);\r\n width += parseFloat(this.css(el, 'margin-left')) + parseFloat(this.css(el, 'margin-right'));\r\n\r\n return parseFloat(width);\r\n } else {\r\n width = parseFloat(el.offsetWidth);\r\n\r\n return width;\r\n }\r\n }\r\n\r\n offset(el) {\r\n var rect, win;\r\n\r\n if ( !el ) {\r\n return;\r\n }\r\n\r\n // Return zeros for disconnected and hidden (display: none) elements (gh-2310)\r\n // Support: IE <=11 only\r\n // Running getBoundingClientRect on a\r\n // disconnected node in IE throws an error\r\n\r\n if ( !el.getClientRects().length ) {\r\n return { top: 0, left: 0 };\r\n }\r\n\r\n // Get document-relative position by adding viewport scroll to viewport-relative gBCR\r\n rect = el.getBoundingClientRect();\r\n win = el.ownerDocument.defaultView;\r\n\r\n return {\r\n top: rect.top + win.pageYOffset,\r\n left: rect.left + win.pageXOffset,\r\n right: window.innerWidth - (el.offsetLeft + el.offsetWidth)\r\n };\r\n }\r\n\r\n height(el) {\r\n return this.css(el, 'height');\r\n }\r\n\r\n outerHeight(el, withMargin) {\r\n var height = el.offsetHeight;\r\n var style;\r\n\r\n if (typeof withMargin !== 'undefined' && withMargin === true) {\r\n style = getComputedStyle(el);\r\n height += parseInt(style.marginTop) + parseInt(style.marginBottom);\r\n\r\n return height;\r\n } else {\r\n return height;\r\n }\r\n }\r\n\r\n getRelativeTopPosition(el, container) {\r\n return el.offsetTop - container.offsetTop;\r\n }\r\n\r\n animate(from, to, duration, update, easing, done) {\r\n /**\r\n * TinyAnimate.easings\r\n * Adapted from jQuery Easing\r\n */\r\n var easings = {};\r\n var easing;\r\n\r\n easings.linear = function(t, b, c, d) {\r\n return c * t / d + b;\r\n };\r\n\r\n easing = easings.linear;\r\n\r\n // Early bail out if called incorrectly\r\n if (typeof from !== 'number' ||\r\n typeof to !== 'number' ||\r\n typeof duration !== 'number' ||\r\n typeof update !== 'function') {\r\n return;\r\n }\r\n\r\n // Create mock done() function if necessary\r\n if (typeof done !== 'function') {\r\n done = function() {};\r\n }\r\n\r\n // Pick implementation (requestAnimationFrame | setTimeout)\r\n var rAF = window.requestAnimationFrame || function(callback) {\r\n window.setTimeout(callback, 1000 / 50);\r\n };\r\n\r\n // Animation loop\r\n var canceled = false;\r\n var change = to - from;\r\n\r\n function loop(timestamp) {\r\n var time = (timestamp || +new Date()) - start;\r\n\r\n if (time >= 0) {\r\n update(easing(time, from, change, duration));\r\n }\r\n if (time >= 0 && time >= duration) {\r\n update(to);\r\n done();\r\n } else {\r\n rAF(loop);\r\n }\r\n }\r\n\r\n update(from);\r\n\r\n // Start animation loop\r\n var start = window.performance && window.performance.now ? window.performance.now() : +new Date();\r\n\r\n rAF(loop);\r\n }\r\n\r\n getScroll(element, method) {\r\n // The passed in `method` value should be 'Top' or 'Left'\r\n method = 'scroll' + method;\r\n return (element == window || element == document) ? (\r\n self[(method == 'scrollTop') ? 'pageYOffset' : 'pageXOffset'] ||\r\n (browserSupportsBoxModel && document.documentElement[method]) ||\r\n document.body[method]\r\n ) : element[method];\r\n }\r\n\r\n css(el, styleProp, value, important) {\r\n if (!el) {\r\n return;\r\n }\r\n\r\n if (value !== undefined) {\r\n if ( important === true ) {\r\n el.style.setProperty(styleProp, value, 'important');\r\n } else {\r\n el.style[styleProp] = value;\r\n }\r\n } else {\r\n var defaultView = (el.ownerDocument || document).defaultView;\r\n\r\n // W3C standard way:\r\n if (defaultView && defaultView.getComputedStyle) {\r\n // sanitize property name to css notation\r\n // (hyphen separated words eg. font-Size)\r\n styleProp = styleProp.replace(/([A-Z])/g, \"-$1\").toLowerCase();\r\n\r\n return defaultView.getComputedStyle(el, null).getPropertyValue(styleProp);\r\n } else if (el.currentStyle) { // IE\r\n // sanitize property name to camelCase\r\n styleProp = styleProp.replace(/\\-(\\w)/g, function(str, letter) {\r\n return letter.toUpperCase();\r\n });\r\n\r\n value = el.currentStyle[styleProp];\r\n\r\n // convert other units to pixels on IE\r\n if (/^\\d+(em|pt|%|ex)?$/i.test(value)) {\r\n return (function(value) {\r\n var oldLeft = el.style.left, oldRsLeft = el.runtimeStyle.left;\r\n\r\n el.runtimeStyle.left = el.currentStyle.left;\r\n el.style.left = value || 0;\r\n value = el.style.pixelLeft + \"px\";\r\n el.style.left = oldLeft;\r\n el.runtimeStyle.left = oldRsLeft;\r\n\r\n return value;\r\n })(value);\r\n }\r\n\r\n return value;\r\n }\r\n }\r\n }\r\n\r\n slide(el, dir, speed, callback) {\r\n if (!el || (dir == 'up' && this.visible(el) === false) || (dir == 'down' && this.visible(el) === true)) {\r\n return;\r\n }\r\n\r\n speed = (speed ? speed : 600);\r\n var calcHeight = this.actualHeight(el);\r\n var calcPaddingTop = false;\r\n var calcPaddingBottom = false;\r\n\r\n if (dir == 'up') { // up\r\n el.style.cssText = 'display: block; overflow: hidden;';\r\n\r\n if (calcPaddingTop) {\r\n this.animate(0, calcPaddingTop, speed, function(value) {\r\n el.style.paddingTop = (calcPaddingTop - value) + 'px';\r\n }, 'linear');\r\n }\r\n\r\n if (calcPaddingBottom) {\r\n this.animate(0, calcPaddingBottom, speed, function(value) {\r\n el.style.paddingBottom = (calcPaddingBottom - value) + 'px';\r\n }, 'linear');\r\n }\r\n\r\n this.animate(0, calcHeight, speed, function(value) {\r\n el.style.height = (calcHeight - value) + 'px';\r\n }, 'linear', function() {\r\n el.style.height = '';\r\n el.style.display = 'none';\r\n\r\n if (typeof callback === 'function') {\r\n callback();\r\n }\r\n });\r\n } else if (dir == 'down') { // down\r\n el.style.cssText = 'display: block; overflow: hidden;';\r\n\r\n if (calcPaddingTop) {\r\n this.animate(0, calcPaddingTop, speed, function(value) {//\r\n el.style.paddingTop = value + 'px';\r\n }, 'linear', function() {\r\n el.style.paddingTop = '';\r\n });\r\n }\r\n\r\n if (calcPaddingBottom) {\r\n this.animate(0, calcPaddingBottom, speed, function(value) {\r\n el.style.paddingBottom = value + 'px';\r\n }, 'linear', function() {\r\n el.style.paddingBottom = '';\r\n });\r\n }\r\n\r\n this.animate(0, calcHeight, speed, function(value) {\r\n el.style.height = value + 'px';\r\n }, 'linear', function() {\r\n el.style.height = '';\r\n el.style.display = '';\r\n el.style.overflow = '';\r\n\r\n if (typeof callback === 'function') {\r\n callback();\r\n }\r\n });\r\n }\r\n }\r\n\r\n slideUp(el, speed, callback) {\r\n this.slide(el, 'up', speed, callback);\r\n }\r\n\r\n slideDown(el, speed, callback) {\r\n this.slide(el, 'down', speed, callback);\r\n }\r\n\r\n show(el, display) {\r\n if (typeof el !== 'undefined') {\r\n el.style.display = (display ? display : 'block');\r\n }\r\n }\r\n\r\n hide(el) {\r\n if (typeof el !== 'undefined') {\r\n el.style.display = 'none';\r\n }\r\n }\r\n\r\n animateClass(el, animationName, callback) {\r\n var animation;\r\n var animations = {\r\n animation: 'animationend',\r\n OAnimation: 'oAnimationEnd',\r\n MozAnimation: 'mozAnimationEnd',\r\n WebkitAnimation: 'webkitAnimationEnd',\r\n msAnimation: 'msAnimationEnd',\r\n };\r\n\r\n for (var t in animations) {\r\n if (el.style[t] !== undefined) {\r\n animation = animations[t];\r\n }\r\n }\r\n \r\n this.addClass(el, animationName);\r\n\r\n this.one(el, animation, function() {\r\n this.removeClass(el, animationName);\r\n });\r\n\r\n if (callback) {\r\n this.one(el, animation, callback);\r\n }\r\n }\r\n\r\n transitionEnd(el, callback) {\r\n var transition;\r\n var transitions = {\r\n transition: 'transitionend',\r\n OTransition: 'oTransitionEnd',\r\n MozTransition: 'mozTransitionEnd',\r\n WebkitTransition: 'webkitTransitionEnd',\r\n msTransition: 'msTransitionEnd'\r\n };\r\n\r\n for (var t in transitions) {\r\n if (el.style[t] !== undefined) {\r\n transition = transitions[t];\r\n }\r\n }\r\n\r\n this.one(el, transition, callback);\r\n }\r\n\r\n animationEnd(el, callback) {\r\n var animation;\r\n var animations = {\r\n animation: 'animationend',\r\n OAnimation: 'oAnimationEnd',\r\n MozAnimation: 'mozAnimationEnd',\r\n WebkitAnimation: 'webkitAnimationEnd',\r\n msAnimation: 'msAnimationEnd'\r\n };\r\n\r\n for (var t in animations) {\r\n if (el.style[t] !== undefined) {\r\n animation = animations[t];\r\n }\r\n }\r\n\r\n this.one(el, animation, callback);\r\n }\r\n\r\n animateDelay(el, value) {\r\n var vendors = ['webkit-', 'moz-', 'ms-', 'o-', ''];\r\n for (var i = 0; i < vendors.length; i++) {\r\n this.css(el, vendors[i] + 'animation-delay', value);\r\n }\r\n }\r\n\r\n animateDuration(el, value) {\r\n var vendors = ['webkit-', 'moz-', 'ms-', 'o-', ''];\r\n for (var i = 0; i < vendors.length; i++) {\r\n this.css(el, vendors[i] + 'animation-duration', value);\r\n }\r\n }\r\n\r\n scrollTo(target, offset, duration) {\r\n var duration = duration ? duration : 500;\r\n var targetPos = target ? this.offset(target).top : 0;\r\n var scrollPos = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;\r\n var from, to;\r\n\r\n if (offset) {\r\n targetPos = targetPos - offset;\r\n }\r\n\r\n from = scrollPos;\r\n to = targetPos;\r\n\r\n this.animate(from, to, duration, function(value) {\r\n document.documentElement.scrollTop = value;\r\n document.body.parentNode.scrollTop = value;\r\n document.body.scrollTop = value;\r\n }); //, easing, done\r\n }\r\n\r\n scrollTop(offset, duration) {\r\n this.scrollTo(null, offset, duration);\r\n }\r\n\r\n\r\n\r\n scrollToElm(container, elm, durationSeconds) {\r\n const pos = this.getRelativePos(elm, container);\r\n this.smoothScrollTo(container, pos.top , durationSeconds/1000);\r\n }\r\n \r\n getRelativePos(elm, containerNode) {\r\n let pPos = containerNode ? containerNode.getBoundingClientRect() : elm.parentNode.getBoundingClientRect(); // parent pos\r\n let cPos = elm.getBoundingClientRect(); // target pos\r\n let pos = {};\r\n \r\n pos.top = cPos.top - pPos.top + elm.parentNode.scrollTop,\r\n pos.right = cPos.right - pPos.right,\r\n pos.bottom = cPos.bottom - pPos.bottom,\r\n pos.left = cPos.left - pPos.left;\r\n \r\n return pos;\r\n }\r\n \r\n smoothScrollTo(element, to, duration, onDone) {\r\n let start = element.scrollTop,\r\n change = to - start,\r\n startTime = performance.now(),\r\n val, now, elapsed, t;\r\n \r\n const animateScroll = () => {\r\n now = performance.now();\r\n elapsed = (now - startTime)/1000;\r\n t = (elapsed/duration);\r\n \r\n element.scrollTop = start + change * this.easeInOutQuad(t);\r\n \r\n if( t < 1 )\r\n window.requestAnimationFrame(animateScroll);\r\n else\r\n onDone && onDone();\r\n };\r\n \r\n animateScroll();\r\n }\r\n \r\n easeInOutQuad(t) {\r\n return t<.5 ? 2*t*t : -1+(4-2*t)*t;\r\n }\r\n\r\n isArray(obj) {\r\n return obj && Array.isArray(obj);\r\n }\r\n\r\n uniqueArray(array) {\r\n return [...new Set(array)];\r\n }\r\n\r\n getDocumentHeight() {\r\n var body = document.body;\r\n var html = document.documentElement;\r\n\r\n return Math.max( body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight );\r\n }\r\n\r\n getScrollTop() {\r\n return (document.scrollingElement || document.documentElement).scrollTop;\r\n }\r\n\r\n colorLighten(color, amount) {\r\n const addLight = function(color, amount){\r\n let cc = parseInt(color,16) + amount;\r\n let c = (cc > 255) ? 255 : (cc);\r\n c = (c.toString(16).length > 1 ) ? c.toString(16) : `0${c.toString(16)}`;\r\n return c;\r\n }\r\n\r\n color = (color.indexOf(\"#\")>=0) ? color.substring(1,color.length) : color;\r\n amount = parseInt((255*amount)/100);\r\n \r\n return color = `#${addLight(color.substring(0,2), amount)}${addLight(color.substring(2,4), amount)}${addLight(color.substring(4,6), amount)}`;\r\n }\r\n\r\n colorDarken(color, amount) {\r\n const subtractLight = function(color, amount){\r\n let cc = parseInt(color,16) - amount;\r\n let c = (cc < 0) ? 0 : (cc);\r\n c = (c.toString(16).length > 1 ) ? c.toString(16) : `0${c.toString(16)}`;\r\n\r\n return c;\r\n }\r\n \r\n color = (color.indexOf(\"#\")>=0) ? color.substring(1,color.length) : color;\r\n amount = parseInt((255*amount)/100);\r\n\r\n return color = `#${subtractLight(color.substring(0,2), amount)}${subtractLight(color.substring(2,4), amount)}${subtractLight(color.substring(4,6), amount)}`;\r\n }\r\n\r\n componentToHex(c) {\r\n let hex = c.toString(16);\r\n return hex.length == 1 ? '0' + hex : hex;\r\n }\r\n \r\n rgbToHex(r, g, b) {\r\n return '#' + componentToHex(r) + componentToHex(g) + componentToHex(b);\r\n }\r\n\r\n hexToRgb(hex) {\r\n try {\r\n let result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\r\n return result ? {\r\n r: parseInt(result[1], 16),\r\n g: parseInt(result[2], 16),\r\n b: parseInt(result[3], 16)\r\n } : null;\r\n } catch (err) {\r\n return null;\r\n }\r\n }\r\n\r\n hexToRgbString(hex, opacity, defaultColor = 'transparent') {\r\n let rgb = this.hexToRgb(hex);\r\n if (!rgb) {\r\n if (defaultColor !== 'transparent') {\r\n rgb = this.hexToRgb(defaultColor);\r\n }\r\n if (!rgb) return defaultColor;\r\n }\r\n if (opacity) return `rgba(${rgb.r},${rgb.g},${rgb.b},${opacity})`;\r\n return `rgb(${rgb.r},${rgb.g},${rgb.b})`;\r\n }\r\n\r\n // Throttle function: Input as function which needs to be throttled and delay is the time interval in milliseconds\r\n throttle(timer, func, delay) {\r\n // If setTimeout is already scheduled, no need to do anything\r\n if (timer) {\r\n return;\r\n }\r\n\r\n // Schedule a setTimeout after delay seconds\r\n timer = setTimeout(function () {\r\n func();\r\n\r\n // Once setTimeout function execution is finished, timerId = undefined so that in
\r\n // the next scroll event function execution can be scheduled by the setTimeout\r\n timer = undefined;\r\n }, delay);\r\n }\r\n\r\n // Debounce function: Input as function which needs to be debounced and delay is the debounced time in milliseconds\r\n debounce(timer, func, delay) {\r\n // Cancels the setTimeout method execution\r\n clearTimeout(timer)\r\n\r\n // Executes the func after delay time.\r\n timer = setTimeout(func, delay);\r\n }\r\n\r\n getResponsiveValue(value, defaultValue) {\r\n var width = this.getViewPort().width;\r\n var result;\r\n\r\n value = this.parseJson(value);\r\n\r\n if (typeof value === 'object') {\r\n var resultKey;\r\n var resultBreakpoint = -1;\r\n var breakpoint;\r\n\r\n for (var key in value) {\r\n if (key === 'default') {\r\n breakpoint = 0;\r\n } else {\r\n breakpoint = this.getBreakpoint(key) ? this.getBreakpoint(key) : parseInt(key);\r\n }\r\n\r\n if (breakpoint <= width && breakpoint > resultBreakpoint) {\r\n resultKey = key;\r\n resultBreakpoint = breakpoint;\r\n }\r\n }\r\n\r\n if (resultKey) {\r\n result = value[resultKey];\r\n } else {\r\n result = value;\r\n }\r\n } else {\r\n result = value;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isInViewport(element) {\r\n const rect = element.getBoundingClientRect();\r\n\r\n return (\r\n rect.top >= 0 &&\r\n rect.left >= 0 &&\r\n rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&\r\n rect.right <= (window.innerWidth || document.documentElement.clientWidth)\r\n );\r\n }\r\n\r\n inViewportHandler(element, callback, callbackAdditionalData) {\r\n try {\r\n const observer = new IntersectionObserver((entries, opts) => {\r\n entries.forEach(entry => {\r\n callback(entry.isIntersecting, callbackAdditionalData);\r\n }); \r\n }, { root: null, threshold: .5 });\r\n observer.observe(element);\r\n return {\r\n dispose: () => {\r\n observer.unobserve(element);\r\n },\r\n }\r\n } catch (err) {\r\n console.log('no IntersectionObserver support');\r\n }\r\n }\r\n\r\n inViewportOnIntersection = (entries, opts) => {\r\n entries.forEach(entry => entry.target.classList.toggle('visible', entry.isIntersecting));\r\n }\r\n\r\n isHexColor(code) {\r\n return /^#[0-9A-F]{6}$/i.test(code);\r\n }\r\n\r\n /**\r\n * Checks whether the element has given classes\r\n * @param {object} el jQuery element object\r\n * @param {string} Classes string\r\n * @returns {boolean}\r\n */\r\n hasClasses(el, classes) {\r\n if (!el) return;\r\n\r\n var classesArr = classes.split(\" \");\r\n\r\n for (var i = 0; i < classesArr.length; i++) {\r\n if (this.hasClass(el, classesArr[i].trim()) == false) return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n hasClass(el, className) {\r\n if (!el) return;\r\n\r\n return el.classList ? el.classList.contains(className) : new RegExp('\\\\b' + className + '\\\\b').test(el.className);\r\n }\r\n\r\n addClass(el, className) {\r\n if (!el || typeof className === 'undefined') return;\r\n\r\n var classNames = className.split(' ');\r\n\r\n if (el.classList) {\r\n for (var i = 0; i < classNames.length; i++) {\r\n if (classNames[i] && classNames[i].length > 0) {\r\n el.classList.add(classNames[i].trim());\r\n }\r\n }\r\n } else if (!this.hasClass(el, className)) {\r\n for (var x = 0; x < classNames.length; x++) {\r\n el.className += ' ' + classNames[x].trim();\r\n }\r\n }\r\n }\r\n\r\n removeClass(el, className) {\r\n if (!el || typeof className === 'undefined') return;\r\n\r\n var classNames = className.split(' ');\r\n\r\n if (el.classList) {\r\n for (var i = 0; i < classNames.length; i++) {\r\n el.classList.remove(classNames[i].trim());\r\n }\r\n } else if (this.hasClass(el, className)) {\r\n for (var x = 0; x < classNames.length; x++) {\r\n el.className = el.className.replace(new RegExp('\\\\b' + classNames[x].trim() + '\\\\b', 'g'), '');\r\n }\r\n }\r\n }\r\n\r\n visible(el) {\r\n return !(el.offsetWidth === 0 && el.offsetHeight === 0);\r\n }\r\n\r\n isVisibleInContainer(el, container) {\r\n const eleTop = el.offsetTop;\r\n const eleBottom = eleTop + el.clientHeight;\r\n \r\n const containerTop = container.scrollTop;\r\n const containerBottom = containerTop + container.clientHeight;\r\n \r\n // The element is fully visible in the container\r\n return (\r\n (eleTop >= containerTop && eleBottom <= containerBottom) ||\r\n // Some part of the element is visible in the container\r\n (eleTop < containerTop && containerTop < eleBottom) ||\r\n (eleTop < containerBottom && containerBottom < eleBottom)\r\n );\r\n }\r\n\r\n actualCss(el, prop, cache) {\r\n var css = '';\r\n\r\n if (el instanceof HTMLElement === false) {\r\n return;\r\n }\r\n\r\n if (!el.getAttribute('kt-hidden-' + prop) || cache === false) {\r\n var value;\r\n\r\n // the element is hidden so:\r\n // making the el block so we can meassure its height but still be hidden\r\n css = el.style.cssText;\r\n el.style.cssText = 'position: absolute; visibility: hidden; display: block;';\r\n\r\n if (prop == 'width') {\r\n value = el.offsetWidth;\r\n } else if (prop == 'height') {\r\n value = el.offsetHeight;\r\n }\r\n\r\n el.style.cssText = css;\r\n\r\n // store it in cache\r\n el.setAttribute('kt-hidden-' + prop, value);\r\n\r\n return parseFloat(value);\r\n } else {\r\n // store it in cache\r\n return parseFloat(el.getAttribute('kt-hidden-' + prop));\r\n }\r\n }\r\n\r\n actualHeight(el, cache) {\r\n return this.actualCss(el, 'height', cache);\r\n }\r\n\r\n actualWidth(el, cache) {\r\n return this.actualCss(el, 'width', cache);\r\n }\r\n\r\n /**\r\n * Throttle function: Input as function which needs to be throttled and delay is the time interval in milliseconds\r\n * @param {*} timer \r\n * @param {*} func \r\n * @param {*} delay \r\n * @returns \r\n */\r\n throttle(timer, func, delay) {\r\n if (timer) return;\r\n\r\n timer = setTimeout(() => {\r\n func();\r\n timer = undefined;\r\n }, delay);\r\n }\r\n\r\n /**\r\n * Debounce function: Input as function which needs to be debounced and delay is the debounced time in milliseconds\r\n * @param {*} timer \r\n * @param {*} func \r\n * @param {*} delay \r\n */\r\n debounce(timer, func, delay) {\r\n clearTimeout(timer)\r\n timer = setTimeout(func, delay);\r\n }\r\n\r\n /**\r\n * Deep extend: $.extend(true, {}, objA, objB);\r\n * @param {Object} out \r\n * @returns {Object}\r\n */\r\n deepExtend(out) {\r\n out = out || {};\r\n for (var i = 1; i < arguments.length; i++) {\r\n var obj = arguments[i];\r\n if (!obj) continue;\r\n\r\n for (var key in obj) {\r\n if (!obj.hasOwnProperty(key)) {\r\n continue;\r\n }\r\n\r\n // based on https://javascriptweblog.wordpress.com/2011/08/08/fixing-the-javascript-typeof-operator/\r\n if ( Object.prototype.toString.call(obj[key]) === '[object Object]' ) {\r\n out[key] = this.deepExtend(out[key], obj[key]);\r\n continue;\r\n }\r\n out[key] = obj[key];\r\n }\r\n }\r\n return out;\r\n }\r\n\r\n /**\r\n * extend: $.extend({}, objA, objB);\r\n */\r\n extend(out) {\r\n out = out || {};\r\n for (var i = 1; i < arguments.length; i++) {\r\n if (!arguments[i])\r\n continue;\r\n\r\n for (var key in arguments[i]) {\r\n if (arguments[i].hasOwnProperty(key))\r\n out[key] = arguments[i][key];\r\n }\r\n }\r\n return out;\r\n }\r\n\r\n snakeToCamel(s){\r\n return s.replace(/(\\-\\w)/g, function(m){return m[1].toUpperCase();});\r\n }\r\n\r\n parseJson(json) {\r\n if (typeof json === 'string') {\r\n json = json.replace(/'/g, \"\\\"\");\r\n\r\n var jsonStr = json.replace(/(\\w+:)|(\\w+ :)/g, (matched) => {\r\n return '\"' + matched.substring(0, matched.length - 1) + '\":';\r\n });\r\n\r\n try {\r\n json = JSON.parse(jsonStr);\r\n } catch(e) { }\r\n }\r\n\r\n return json;\r\n }\r\n\r\n addEvent(el, type, handler) {\r\n if (typeof el !== 'undefined' && el !== null) {\r\n el.addEventListener(type, handler);\r\n }\r\n }\r\n\r\n removeEvent(el, type, handler) {\r\n if (el !== null) {\r\n el.removeEventListener(type, handler);\r\n }\r\n }\r\n\r\n remove(el) {\r\n if (el && el.parentNode) {\r\n el.parentNode.removeChild(el);\r\n }\r\n }\r\n\r\n find(parent, query) {\r\n if ( parent !== null) {\r\n return parent.querySelector(query);\r\n } else {\r\n return null;\r\n }\r\n }\r\n\r\n findAll(parent, query) {\r\n if ( parent !== null ) {\r\n return parent.querySelectorAll(query);\r\n } else {\r\n return null;\r\n }\r\n }\r\n\r\n insertAfter(el, referenceNode) {\r\n return referenceNode.parentNode.insertBefore(el, referenceNode.nextSibling);\r\n }\r\n\r\n parents(elem, selector) {\r\n // Set up a parent array\r\n var parents = [];\r\n\r\n // Push each parent element to the array\r\n for ( ; elem && elem !== document; elem = elem.parentNode ) {\r\n if (selector) {\r\n if (elem.matches(selector)) {\r\n parents.push(elem);\r\n }\r\n continue;\r\n }\r\n parents.push(elem);\r\n }\r\n\r\n // Return our parent array\r\n return parents;\r\n }\r\n\r\n children(el, selector, log) {\r\n if (!el || !el.childNodes) {\r\n return null;\r\n }\r\n\r\n var result = [],\r\n i = 0,\r\n l = el.childNodes.length;\r\n\r\n for (var i; i < l; ++i) {\r\n if (el.childNodes[i].nodeType == 1 && this.matches(el.childNodes[i], selector, log)) {\r\n result.push(el.childNodes[i]);\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n child(el, selector, log) {\r\n var children = this.children(el, selector, log);\r\n\r\n return children ? children[0] : null;\r\n }\r\n\r\n matches(el, selector, log) {\r\n var p = Element.prototype;\r\n var f = p.matches || p.webkitMatchesSelector || p.mozMatchesSelector || p.msMatchesSelector || function(s) {\r\n return [].indexOf.call(document.querySelectorAll(s), this) !== -1;\r\n };\r\n\r\n if (el && el.tagName) {\r\n return f.call(el, selector);\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n getCssVariableValue(variableName) {\r\n var hex = getComputedStyle(document.documentElement).getPropertyValue(variableName);\r\n if ( hex && hex.length > 0 ) {\r\n hex = hex.trim();\r\n }\r\n\r\n return hex;\r\n }\r\n\r\n /**\r\n * Gets highest z-index of the given element parents\r\n * @param {object} el jQuery element object\r\n * @returns {number}\r\n */\r\n getHighestZindex(el) {\r\n var position, value;\r\n\r\n while (el && el !== document) {\r\n // Ignore z-index if position is set to a value where z-index is ignored by the browser\r\n // This makes behavior of this function consistent across browsers\r\n // WebKit always returns auto if the element is positioned\r\n position = this.css(el, 'position');\r\n\r\n if (position === \"absolute\" || position === \"relative\" || position === \"fixed\") {\r\n // IE returns 0 when zIndex is not specified\r\n // other browsers return a string\r\n // we ignore the case of nested elements with an explicit value of 0\r\n //
\r\n value = parseInt(this.css(el, 'z-index'));\r\n\r\n if (!isNaN(value) && value !== 0) {\r\n return value;\r\n }\r\n }\r\n\r\n el = el.parentNode;\r\n }\r\n\r\n return 1;\r\n }\r\n}\r\n\r\nexport const LpfnUtil = new Utils();\r\n","import { Versions } from 'services/versions';\r\nimport { Security } from 'common/security';\r\nimport { Config } from 'services/config';\r\n\r\nexport class Footer {\r\n static inject = [Versions, Security, Config];\r\n currentYear = new Date().getFullYear();\r\n\r\n constructor(versions, security, config) {\r\n this.version = versions.version;\r\n this.security = security;\r\n\r\n this.corporateSite = config.json('corporateSiteJson');\r\n }\r\n}","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"zeus-footer {\\n width: 100%;\\n}\\n\\n.zeus-footer {\\n display: flex;\\n justify-content: space-between;\\n width: 100%;\\n align-items: center;\\n}\\n\\n.zeus-site-version {\\n font-size: 75%;\\n color: #999;\\n}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/footer.scss\"],\"names\":[],\"mappings\":\"AAAA;EACI,WAAA;AACJ;;AAEA;EACI,aAAA;EACA,8BAAA;EACA,WAAA;EACA,mBAAA;AACJ;;AAEA;EACI,cAAA;EACA,WAAA;AACJ\",\"sourcesContent\":[\"zeus-footer {\\r\\n width: 100%;\\r\\n}\\r\\n\\r\\n.zeus-footer {\\r\\n display: flex;\\r\\n justify-content: space-between;\\r\\n width: 100%;\\r\\n align-items: center;\\r\\n}\\r\\n\\r\\n.zeus-site-version {\\r\\n font-size: 75%;\\r\\n color: #999;\\r\\n}\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Module\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\";\n// Exports\nexport default code;"],"names":[],"sourceRoot":""}