Representations of affine Nappi–Witten algebras