Existence of bifurcating periodic solutions of planar periodic systems at resonance