wrapped offline.js in commonJS