/gep/hart.js long-poll utils factored out