Relativistic theory of the spherical electrostatic analyzer