Semi-infinite flags. II: Local and global intersection cohomology of quasimaps spaces Locally stable holomorphic maps and their application to a global moduli problem for some kinds of analytic subvarieties 