Let \( ABC \) be the triangle with \( AB=1 \), \( AC=3 \) and \( \angle BAC=\dfrac{\pi}{2} \). If a circle of radius \( r>0 \) touches the sides \( AB \), \( AC \) and also touches internally the circumcircle of the triangle \( ABC \), then the value of \( r \) is ________.