Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
80522 views
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 outer (modules, cache, entry) {
11
// Save the require from previous bundle to this closure if any
12
var previousRequire = typeof require == "function" && require;
13
14
function newRequire(name, jumped){
15
if(!cache[name]) {
16
if(!modules[name]) {
17
// if we cannot find the module within our internal map or
18
// cache jump to the current global require ie. the last bundle
19
// that was added to the page.
20
var currentRequire = typeof require == "function" && require;
21
if (!jumped && currentRequire) return currentRequire(name, true);
22
23
// If there are other bundles on this page the require from the
24
// previous one is saved to 'previousRequire'. Repeat this as
25
// many times as there are bundles until the module is found or
26
// we exhaust the require chain.
27
if (previousRequire) return previousRequire(name, true);
28
var err = new Error('Cannot find module \'' + name + '\'');
29
err.code = 'MODULE_NOT_FOUND';
30
throw err;
31
}
32
var m = cache[name] = {exports:{}};
33
modules[name][0].call(m.exports, function(x){
34
var id = modules[name][1][x];
35
return newRequire(id ? id : x);
36
},m,m.exports,outer,modules,cache,entry);
37
}
38
return cache[name].exports;
39
}
40
for(var i=0;i<entry.length;i++) newRequire(entry[i]);
41
42
// Override the current require with this new one
43
return newRequire;
44
})
45
46