WASHINGTON — States have broad authority to force online retailers to collect potentially billions of dollars worth of sales taxes, the U.S. Supreme Court ruled on Thursday, siding against e-commerce companies in their high-profile fight with South Dakota.The justices, in a 5-4 ruling against Wayfair Inc, Overstock.com Inc and Newegg Inc, overturned a 1992 Supreme Court precedent that had barred states from requiring businesses with no “physical presence” in that state, like out-of-state online retailers, to collect sales taxes.The ruling opens the door to a new revenue stream to fill state coffers — up to $13 billion annually, according to a federal report — while imperiling a competitive advantage that e-commerce companies had over brick-and-mortar rivals that already must collect sales tax.Shares of online retailers fell sharply following the ruling, with Wayfair down 3.8 percent, Overstock off 2.1 percent and Etsy Inc shares off 4.4 percent.