Development of functional ionic liquids for separation and recovery of rare earth elements