Let a unit vector \( \hat{u} = x\hat{i} + y\hat{j} + z\hat{k} \) make angles \( \frac{\pi}{2}, \frac{\pi}{3} \), and \( \frac{2\pi}{3} \) with the vectors \( \frac{1}{\sqrt{2}} \hat{i} + \frac{1}{\sqrt{2}} \hat{k} \), \( \frac{1}{\sqrt{2}} \hat{j} + \frac{1}{\sqrt{2}} \hat{k} \), and \( \frac{1}{\sqrt{2}} \hat{i} + \frac{1}{\sqrt{2}} \hat{j} \) respectively. If \( \vec{v} = \frac{1}{\sqrt{2}} \hat{i} + \frac{1}{\sqrt{2}} \hat{j} + \frac{1}{\sqrt{2}} \hat{k} \), then \( |\hat{u} - \vec{v}|^2 \) is equal to