we have our own require which caches modules conveyed in the body of text/lispyscript tags
434291
function(name) {
    if (cache[name]) {
        return cache[name]
    } else {
        if (require) {
            return require(name)
        } else if (window.require) {
            return window.require(name)

        } else {
            throw new Error("Cannot find module " + name)
        }
    }
}
972645
function loadIncludeProperties() {
  var libPath = this.fullPath('/include');
  if (fs.existsSync(libPath) && fs.statSync(libPath).isDirectory()) {
    var files = protos.util.ls(libPath, this.regex.jsFile);
    files.forEach(function(file) {
      var key = inflect.camelize(file.replace(this.regex.jsFile, ''), true);
      var data = protos.require(libPath + "/" + file, true); // Don't use module cache (allow reloading)
      if (this[key] && typeof this[key] == 'object') {
         _.extend(this[key], data);
      } else {
        this[key] = data;
      }
    }, this);
  }
  this.emit('includes_loaded');
}
434962
function(target) {
                // Only store the `module` in the local cache since `module.exports` may not be accurate
                // if there was a circular dependency
                var module = localCache[target] || (localCache[target] = requireModule(target, dirname));
                return module.exports;
            }
1092718
function searchCache(moduleName, callback) {
        // Resolve the module identified by the specified name
        var mod = module.constructor._resolveFilename(moduleName, module);

        // Check if the module has been resolved and found within
        // the cache
        if (mod && (mod = module.constructor._cache[mod]) !== undefined) {
            // Recursively go over the results
            (function run(mod) {
                // Go over each of the module's children and
                // run over it
                mod.children.forEach(function (child) {
                    return run(child);
                });

                // Call the specified callback providing the
                // found module
                callback(mod);
            })(mod);
        }
    }
1049768
function watchModules(paths) {

    paths || (paths = []);

    if (!Array.isArray(paths)) { paths = [paths]; }

    // for all directories / files in `config.watch` array
    paths.forEach(function(watchPath) {

      // watch modules for changes
      this.watch(watchPath, function(eventPath, stat) {

        // delete from the warm cache, the next require will be fresh
        var cached = require.cache[path.resolve(eventPath)];
        var children;

        if (!cached) return;

        cached.children.forEach(function(module) {
          delete require.cache[module.id]
        });
        delete require.cache[cached.parent.id];
        delete require.cache[path.resolve(eventPath)]

      });

    }.bind(this));
  }
247813
function getCustomConfiguration(){
    for(var i = 0; i < cacheModules.length; i++){
      var cacheModule = cacheModules[i];
      if(isEmpty(cacheModule)){
        log(true, 'Cache module at index ' + i + ' is \'empty\'.');
        continue;
      }
      cacheModule = addSettings(cacheModule);
      self.caches.push(cacheModule);
    }
  }
342010
function loadUses() {
          var globs = Array.prototype.slice.call(arguments, 0);
          var path = require('path');
          utils.forEach(globs, function(patt) {
            var files = glob.sync(patt, {});
            utils.forEach(files, function(file) {
              require(path.join(process.cwd(), file));
            });
          });

          return moduleInstance;
        }
828352
def load
      load_source_and_set_module
      module_callbacks if @module
      yield if block_given? # load dependencies
      detect_additions { load_commands } if load_commands?
      set_library_commands
      loaded_correctly? && (@loaded = true)
    end
1351748
function requireExtended(name) {
  var module = require(name);
  if (module && module.__esModule === true && typeof module.default !== 'undefined') {
    if (typeof module.__module !== 'undefined') {
      // if __module is specified as a named export, add it to the default export
      _.defaults(module.default, {__module: module.__module})
    }
    return module.default;
  }
  return module;
}
193476
function makeRequire(module) {
		var mrequire = function(id, fn) { return require(module, id, fn); };
		mrequire.resolve = function(id) { return getModule(module, id).uri; };
		mrequire.toUrl = function(id) {
			return getModule(module, id.replace(/\.[^.\\\/]+$/, ''))
				.uri.replace(/\.js$/i, id.match(/\.[^.\\\/]+$/));
		};
		mrequire.cache = modules;
		mrequire.main = main;
		mrequire.map = mapUrlToIds; // allow mapping multiple module ids to a url
		return mrequire;
	}
269452
function nodeModules() {
  return fs.readdirSync('node_modules')
           .filter(dir => ['.bin'].indexOf(dir) === -1)
           .reduce((modules, m) => {
             modules[m] = 'commonjs2 ' + m
             return modules
           }, {})
}
867132
function load(module) {
    var toTransform,
		transformedModule = {};

    if (typeof module === "string") {
        toTransform = require(module);
    } else {
        toTransform = module;
    }

    for (var item in toTransform) {
        // transform only sync/async methods to promiseable since having utility methods also promiseable
        // could do more harm than good.
        if (typeof toTransform[item] === "function" && isFunctionPromiseable( toTransform, item, toTransform[item] )) {
            transformedModule[item] = rebuildAsPromise( toTransform, item, toTransform[item] );
        } else {
			transformedModule[item] = toTransform[item];
		}
    }

    return transformedModule;
}
315627
function scriptTag(src, callback)  {
		
		var elem = doc.createElement('script');		
		elem.type = 'text/' + (src.type || 'javascript');
		elem.src = src.src || src;  
			
		elem.onreadystatechange = elem.onload = function() {
			var state = elem.readyState;

			if (!callback.done && (!state || /loaded|complete/.test(state))) {
				callback.call();
				callback.done = true;
			}
			
			// cleanup. IE runs into trouble
			if (!ie) {			
				head.removeChild(elem);
			}
		}; 
		
		head.appendChild(elem); 
	}
85058
function _loadFile(filename){
  var module = require(filename);
  delete require.cache[require.resolve(filename)];
  return module;
}
768270
function require(name, jumped){
    if (cache[name]) return cache[name].exports;
    if (modules[name]) return call(name, require);
    throw new Error('cannot find module "' + name + '"');
  }
427359
function loadScript(buf, filePath) {
  var submodule = Module._cache[filePath]

  if (!submodule) {
    submodule = new Module(filePath, module)
    submodule.filename = filePath
    submodule.paths = Module._nodeModulePaths(dirname(filePath))
    submodule._compile(String(buf), filePath)
    submodule.loaded = true
    Module._cache[filePath] = submodule
  }

  return submodule.exports
}
884074
function patchRequire(require) {
        if (require.patched) {
            return require;
        }
        function fromPackageJson(module, dir) {
            var pkgPath, pkgContents, pkg;
            pkgPath = fs.pathJoin(dir, module, 'package.json');
            if (!fs.exists(pkgPath)) {
                return;
            }
            pkgContents = fs.read(pkgPath);
            if (!pkgContents) {
                return;
            }
            try {
                pkg = JSON.parse(pkgContents);
            } catch (e) {
                return;
            }
            if (typeof pkg === "object" && pkg.main) {
                return fs.absolute(fs.pathJoin(dir, module, pkg.main));
            }
        }
        function resolveFile(path, dir) {
            var extensions = ['js', 'coffee', 'json'];
            var basenames = [path, path + '/index'];
            var paths = [];
            var nodejsScript = fromPackageJson(path, dir);
            if (nodejsScript) {
                return nodejsScript;
            }
            basenames.forEach(function(basename) {
                paths.push(fs.absolute(fs.pathJoin(dir, basename)));
                extensions.forEach(function(extension) {
                    paths.push(fs.absolute(fs.pathJoin(dir, [basename, extension].join('.'))));
                });
            });
            for (var i = 0; i < paths.length; i++) {
                if (fs.isFile(paths[i])) {
                    return paths[i];
                }
            }
            return null;
        }
        function getCurrentScriptRoot() {
            if ((phantom.casperScriptBaseDir || "").indexOf(fs.workingDirectory) === 0) {
                return phantom.casperScriptBaseDir;
            }
            return fs.absolute(fs.pathJoin(fs.workingDirectory, phantom.casperScriptBaseDir));
        }
        function casperBuiltinPath(path) {
            return resolveFile(path, fs.pathJoin(phantom.casperPath, 'modules'));
        }
        function nodeModulePath(path) {
            var resolved, prevBaseDir;
            var baseDir = getCurrentScriptRoot();
            do {
                resolved = resolveFile(path, fs.pathJoin(baseDir, 'node_modules'));
                prevBaseDir = baseDir;
                baseDir = fs.absolute(fs.pathJoin(prevBaseDir, '..'));
            } while (!resolved && baseDir !== '/' && prevBaseDir !== '/' && baseDir !== prevBaseDir);
            return resolved;
        }
        function localModulePath(path) {
            return resolveFile(path, phantom.casperScriptBaseDir || fs.workingDirectory);
        }
        var patchedRequire = function patchedRequire(path) {
            try {
                return require(casperBuiltinPath(path) ||
                               nodeModulePath(path)    ||
                               localModulePath(path)   ||
                               path);
            } catch (e) {
                throw new CasperError("Can't find module " + path);
            }
        };
        patchedRequire.cache = require.cache;
        patchedRequire.extensions = require.extensions;
        patchedRequire.stubs = require.stubs;
        patchedRequire.patched = true;
        return patchedRequire;
    }