Photocatalyzed synthesis of isochromanones and isobenzofuranones under batch and flow conditions