Electronic structure of the self-trapped exciton in sodium chloride