The Gross-Zagier-Zhang formula over function fields