Mortgage rates hit 6.78%, a three-week high, as demand weakens