Artemi Panarin scored his fifth career hat trick and finished with a four-point night as the New York Rangers won their third in a row and eighth in the last 10 in a tighter-than-expected 6-5 win over the San Jose Sharks.