计算积分 $\int_0^{\frac{\pi}{4}} \mathrm{~d} \theta \int_0^{\tan \theta \sec \theta} \mathrm{e}^{r \cos \theta} r \mathrm{~d} r+\int_{\frac{\pi}{4}}^{\frac{\pi}{2}} \mathrm{~d} \theta \int_0^{\frac{1}{\sin \theta}} \mathrm{e}^{r \cos \theta} r \mathrm{~d} r=$.
$\text{A.}$ e
$\text{B.}$ ${e}^{-1}$
$\text{C.}$ 0
$\text{D.}$ 1