LPS-47103 Move events.js to module