AMC 12 2023 A Problem 16

Consider the set of complex numbers z satisfying \left|1+z+z^{2}\right|=4. The maximum value of the imaginary part of z can be written in the form \dfrac{\sqrt{m}}{n}, where m and n are relatively prime positive integers. What is m+n?

Answer Choices
A. 20
B. 21
C. 22
D. 23
E. 24