| 1 |
|
| 2 |
// modules are defined as an array |
| 3 |
// [ module function, map of requireuires ] |
| 4 |
// |
| 5 |
// map of requireuires is short require name -> numeric require |
| 6 |
// |
| 7 |
// anything defined in a previous bundle is accessed via the |
| 8 |
// orig method which is the requireuire for previous bundles |
| 9 |
|
| 10 |
(function() { |
| 11 |
|
| 12 |
function outer(modules, cache, entry) { |
| 13 |
// Save the require from previous bundle to this closure if any |
| 14 |
var previousRequire = typeof require == "function" && require; |
| 15 |
|
| 16 |
function newRequire(name, jumped){ |
| 17 |
if(!cache[name]) { |
| 18 |
if(!modules[name]) { |
| 19 |
// if we cannot find the module within our internal map or |
| 20 |
// cache jump to the current global require ie. the last bundle |
| 21 |
// that was added to the page. |
| 22 |
var currentRequire = typeof require == "function" && require; |
| 23 |
if (!jumped && currentRequire) return currentRequire(name, true); |
| 24 |
|
| 25 |
// If there are other bundles on this page the require from the |
| 26 |
// previous one is saved to 'previousRequire'. Repeat this as |
| 27 |
// many times as there are bundles until the module is found or |
| 28 |
// we exhaust the require chain. |
| 29 |
if (previousRequire) return previousRequire(name, true); |
| 30 |
var err = new Error('Cannot find module \'' + name + '\''); |
| 31 |
err.code = 'MODULE_NOT_FOUND'; |
| 32 |
throw err; |
| 33 |
} |
| 34 |
var m = cache[name] = {exports:{}}; |
| 35 |
modules[name][0].call(m.exports, function(x){ |
| 36 |
var id = modules[name][1][x]; |
| 37 |
return newRequire(id ? id : x); |
| 38 |
},m,m.exports,outer,modules,cache,entry); |
| 39 |
} |
| 40 |
return cache[name].exports; |
| 41 |
} |
| 42 |
for(var i=0;i<entry.length;i++) newRequire(entry[i]); |
| 43 |
|
| 44 |
// Override the current require with this new one |
| 45 |
return newRequire; |
| 46 |
} |
| 47 |
|
| 48 |
return outer; |
| 49 |
|
| 50 |
})() |