Hydrogel nanoparticles and assemblies for bioapplications