Additive manufacturing of flexible energy harvesting and storage device