Let $\triangle ABC$ be an isosceles triangle with $AB=AC$ and $BC=14$. The triangle is inscribed in a circle $\omega$. Let $D$ be a point on the ray $BC$ such that $CD=6$. The intersection of $AD$ and $\omega$ is point $E$. Given that $AE=7$, find $AC^2$.

Let's think step by step and output the final answer within \boxed{}.
user