Fix $k$ a number field, and let $C$ be a smooth geometrically integral affine curve over $k$. We can "associate" to $C$ a semi-abelian variety in the following way:

One knows that $C$ is a finite number of (closed) points away from its smooth compactification, which is a projective curve $X$. Let these points be denoted by $p_1,...,p_n$, they lie in $X(\bar{k})$. Let $D$ be the divisor in $\mathrm{Div}_\bar{k}(X)$ given by $$D = p_1+...+p_n.$$
In the book *Algebraic groups and class fields* by Serre, one can talk about the *generalized Jacobian* $J_D$ of $X$ which fits in the exact sequence $$0 \rightarrow T \rightarrow J_D \rightarrow J(X) \rightarrow 0,$$
where $T$ is an $(n-1)$-dimensional torus and $J(X)$ is the Jacobian of $X$, it is an abelian variety.

Thus $J_D$ is an extension of $J(X)$ by $T$ and by definition, it is a semi-abelian variety. I have the following questions:

- How is this extension defined? I know it is almost never true that this is the direct product $J_D = T \times J(X)$.
- Does one have a (canonical) map $C \rightarrow J_D$?