Three-manifold invariant from functional integration