Chile declares state of emergency after 8.2 earthquake