Power adapter with internal battery