A rewrite of Rabia in client-side Javascript.