require.js 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508
  1. /** vim: et:ts=4:sw=4:sts=4
  2. * @license RequireJS 2.3.6 Copyright jQuery Foundation and other contributors.
  3. * Released under MIT license, https://github.com/requirejs/requirejs/blob/master/LICENSE
  4. */
  5. var requirejs, requireAlias, define;
  6. !function (global, setTimeout) {
  7. var req, s, head, baseElement, dataMain, src, interactiveScript, currentlyAddingScript, mainScript, subPath,
  8. version = "2.3.6", commentRegExp = /\/\*[\s\S]*?\*\/|([^:"'=]|^)\/\/.*$/gm,
  9. cjsRequireRegExp = /[^.]\s*requireAlias\s*\(\s*["']([^'"\s]+)["']\s*\)/g, jsSuffixRegExp = /\.js$/,
  10. currDirRegExp = /^\.\//, op = Object.prototype, ostring = op.toString, hasOwn = op.hasOwnProperty,
  11. isBrowser = !("undefined" == typeof window || "undefined" == typeof navigator || !window.document),
  12. isWebWorker = !isBrowser && "undefined" != typeof importScripts,
  13. readyRegExp = isBrowser && "PLAYSTATION 3" === navigator.platform ? /^complete$/ : /^(complete|loaded)$/,
  14. defContextName = "_", isOpera = "undefined" != typeof opera && "[object Opera]" === opera.toString(),
  15. contexts = {}, cfg = {}, globalDefQueue = [], useInteractive = !1;
  16. function commentReplace(e, t) {
  17. return t || ""
  18. }
  19. function isFunction(e) {
  20. return "[object Function]" === ostring.call(e)
  21. }
  22. function isArray(e) {
  23. return "[object Array]" === ostring.call(e)
  24. }
  25. function each(e, t) {
  26. var i;
  27. if (e) for (i = 0; i < e.length && (!e[i] || !t(e[i], i, e)); i += 1) ;
  28. }
  29. function eachReverse(e, t) {
  30. var i;
  31. if (e) for (i = e.length - 1; -1 < i && (!e[i] || !t(e[i], i, e)); i -= 1) ;
  32. }
  33. function hasProp(e, t) {
  34. return hasOwn.call(e, t)
  35. }
  36. function getOwn(e, t) {
  37. return hasProp(e, t) && e[t]
  38. }
  39. function eachProp(e, t) {
  40. var i;
  41. for (i in e) if (hasProp(e, i) && t(e[i], i)) break
  42. }
  43. function mixin(i, e, r, n) {
  44. return e && eachProp(e, function (e, t) {
  45. !r && hasProp(i, t) || (!n || "object" != typeof e || !e || isArray(e) || isFunction(e) || e instanceof RegExp ? i[t] = e : (i[t] || (i[t] = {}), mixin(i[t], e, r, n)))
  46. }), i
  47. }
  48. function bind(e, t) {
  49. return function () {
  50. return t.apply(e, arguments)
  51. }
  52. }
  53. function scripts() {
  54. return document.getElementsByTagName("script")
  55. }
  56. function defaultOnError(e) {
  57. throw e
  58. }
  59. function getGlobal(e) {
  60. if (!e) return e;
  61. var t = global;
  62. return each(e.split("."), function (e) {
  63. t = t[e]
  64. }), t
  65. }
  66. function makeError(e, t, i, r) {
  67. var n = new Error(t + "\nhttps://requirejs.org/docs/errors.html#" + e);
  68. return n.requireType = e, n.requireModules = r, i && (n.originalError = i), n
  69. }
  70. if (void 0 === define) {
  71. if (void 0 !== requirejs) {
  72. if (isFunction(requirejs)) return;
  73. cfg = requirejs, requirejs = void 0
  74. }
  75. void 0 === requireAlias || isFunction(requireAlias) || (cfg = requireAlias, requireAlias = void 0), req = requirejs = function (e, t, i, r) {
  76. var n, o, a = defContextName;
  77. return isArray(e) || "string" == typeof e || (o = e, isArray(t) ? (e = t, t = i, i = r) : e = []), o && o.context && (a = o.context), (n = getOwn(contexts, a)) || (n = contexts[a] = req.s.newContext(a)), o && n.configure(o), n.requireAlias(e, t, i)
  78. }, req.config = function (e) {
  79. return req(e)
  80. }, req.nextTick = void 0 !== setTimeout ? function (e) {
  81. setTimeout(e, 4)
  82. } : function (e) {
  83. e()
  84. }, requireAlias || (requireAlias = req), req.version = version, req.jsExtRegExp = /^\/|:|\?|\.js$/, req.isBrowser = isBrowser, s = req.s = {
  85. contexts: contexts,
  86. newContext: newContext
  87. }, req({}), each(["toUrl", "undef", "defined", "specified"], function (t) {
  88. req[t] = function () {
  89. var e = contexts[defContextName];
  90. return e.requireAlias[t].apply(e, arguments)
  91. }
  92. }), isBrowser && (head = s.head = document.getElementsByTagName("head")[0], baseElement = document.getElementsByTagName("base")[0], baseElement && (head = s.head = baseElement.parentNode)), req.onError = defaultOnError, req.createNode = function (e, t, i) {
  93. var r = e.xhtml ? document.createElementNS("http://www.w3.org/1999/xhtml", "html:script") : document.createElement("script");
  94. return r.type = e.scriptType || "text/javascript", r.charset = "utf-8", r.async = !0, r
  95. }, req.load = function (t, i, r) {
  96. var e, n = t && t.config || {};
  97. if (isBrowser) return (e = req.createNode(n, i, r)).setAttribute("data-requirecontext", t.contextName), e.setAttribute("data-requiremodule", i), !e.attachEvent || e.attachEvent.toString && e.attachEvent.toString().indexOf("[native code") < 0 || isOpera ? (e.addEventListener("load", t.onScriptLoad, !1), e.addEventListener("error", t.onScriptError, !1)) : (useInteractive = !0, e.attachEvent("onreadystatechange", t.onScriptLoad)), e.src = r, n.onNodeCreated && n.onNodeCreated(e, n, i, r), currentlyAddingScript = e, baseElement ? head.insertBefore(e, baseElement) : head.appendChild(e), currentlyAddingScript = null, e;
  98. if (isWebWorker) try {
  99. setTimeout(function () {
  100. }, 0), importScripts(r), t.completeLoad(i)
  101. } catch (e) {
  102. t.onError(makeError("importscripts", "importScripts failed for " + i + " at " + r, e, [i]))
  103. }
  104. }, isBrowser && !cfg.skipDataMain && eachReverse(scripts(), function (e) {
  105. if (head || (head = e.parentNode), dataMain = e.getAttribute("data-main")) return mainScript = dataMain, cfg.baseUrl || -1 !== mainScript.indexOf("!") || (mainScript = (src = mainScript.split("/")).pop(), subPath = src.length ? src.join("/") + "/" : "./", cfg.baseUrl = subPath), mainScript = mainScript.replace(jsSuffixRegExp, ""), req.jsExtRegExp.test(mainScript) && (mainScript = dataMain), cfg.deps = cfg.deps ? cfg.deps.concat(mainScript) : [mainScript], !0
  106. }), define = function (e, i, t) {
  107. var r, n;
  108. "string" != typeof e && (t = i, i = e, e = null), isArray(i) || (t = i, i = null), !i && isFunction(t) && (i = [], t.length && (t.toString().replace(commentRegExp, commentReplace).replace(cjsRequireRegExp, function (e, t) {
  109. i.push(t)
  110. }), i = (1 === t.length ? ["requireAlias"] : ["requireAlias", "exports", "module"]).concat(i))), useInteractive && (r = currentlyAddingScript || getInteractiveScript()) && (e || (e = r.getAttribute("data-requiremodule")), n = contexts[r.getAttribute("data-requirecontext")]), n ? (n.defQueue.push([e, i, t]), n.defQueueMap[e] = !0) : globalDefQueue.push([e, i, t])
  111. }, define.amd = {jQuery: !0}, req.exec = function (text) {
  112. return eval(text)
  113. }, req(cfg)
  114. }
  115. function newContext(u) {
  116. var i, e, l, c, d, g = {waitSeconds: 7, baseUrl: "./", paths: {}, bundles: {}, pkgs: {}, shim: {}, config: {}},
  117. p = {}, f = {}, r = {}, h = [], m = {}, n = {}, v = {}, x = 1, b = 1;
  118. function q(e, t, i) {
  119. var r, n, o, a, s, u, c, d, p, f, l = t && t.split("/"), h = g.map, m = h && h["*"];
  120. if (e && (u = (e = e.split("/")).length - 1, g.nodeIdCompat && jsSuffixRegExp.test(e[u]) && (e[u] = e[u].replace(jsSuffixRegExp, "")), "." === e[0].charAt(0) && l && (e = l.slice(0, l.length - 1).concat(e)), function (e) {
  121. var t, i;
  122. for (t = 0; t < e.length; t++) if ("." === (i = e[t])) e.splice(t, 1), t -= 1; else if (".." === i) {
  123. if (0 === t || 1 === t && ".." === e[2] || ".." === e[t - 1]) continue;
  124. 0 < t && (e.splice(t - 1, 2), t -= 2)
  125. }
  126. }(e), e = e.join("/")), i && h && (l || m)) {
  127. e:for (o = (n = e.split("/")).length; 0 < o; o -= 1) {
  128. if (s = n.slice(0, o).join("/"), l) for (a = l.length; 0 < a; a -= 1) if ((r = getOwn(h, l.slice(0, a).join("/"))) && (r = getOwn(r, s))) {
  129. c = r, d = o;
  130. break e
  131. }
  132. !p && m && getOwn(m, s) && (p = getOwn(m, s), f = o)
  133. }
  134. !c && p && (c = p, d = f), c && (n.splice(0, d, c), e = n.join("/"))
  135. }
  136. return getOwn(g.pkgs, e) || e
  137. }
  138. function E(t) {
  139. isBrowser && each(scripts(), function (e) {
  140. if (e.getAttribute("data-requiremodule") === t && e.getAttribute("data-requirecontext") === l.contextName) return e.parentNode.removeChild(e), !0
  141. })
  142. }
  143. function w(e) {
  144. var t = getOwn(g.paths, e);
  145. if (t && isArray(t) && 1 < t.length) return t.shift(), l.requireAlias.undef(e), l.makeRequire(null, {skipMap: !0})([e]), !0
  146. }
  147. function y(e) {
  148. var t, i = e ? e.indexOf("!") : -1;
  149. return -1 < i && (t = e.substring(0, i), e = e.substring(i + 1, e.length)), [t, e]
  150. }
  151. function S(e, t, i, r) {
  152. var n, o, a, s, u = null, c = t ? t.name : null, d = e, p = !0, f = "";
  153. return e || (p = !1, e = "_@r" + (x += 1)), u = (s = y(e))[0], e = s[1], u && (u = q(u, c, r), o = getOwn(m, u)), e && (u ? f = i ? e : o && o.normalize ? o.normalize(e, function (e) {
  154. return q(e, c, r)
  155. }) : -1 === e.indexOf("!") ? q(e, c, r) : e : (u = (s = y(f = q(e, c, r)))[0], f = s[1], i = !0, n = l.nameToUrl(f))), {
  156. prefix: u,
  157. name: f,
  158. parentMap: t,
  159. unnormalized: !!(a = !u || o || i ? "" : "_unnormalized" + (b += 1)),
  160. url: n,
  161. originalName: d,
  162. isDefine: p,
  163. id: (u ? u + "!" + f : f) + a
  164. }
  165. }
  166. function k(e) {
  167. var t = e.id, i = getOwn(p, t);
  168. return i || (i = p[t] = new l.Module(e)), i
  169. }
  170. function M(e, t, i) {
  171. var r = e.id, n = getOwn(p, r);
  172. !hasProp(m, r) || n && !n.defineEmitComplete ? (n = k(e)).error && "error" === t ? i(n.error) : n.on(t, i) : "defined" === t && i(m[r])
  173. }
  174. function O(i, e) {
  175. var t = i.requireModules, r = !1;
  176. e ? e(i) : (each(t, function (e) {
  177. var t = getOwn(p, e);
  178. t && (t.error = i, t.events.error && (r = !0, t.emit("error", i)))
  179. }), r || req.onError(i))
  180. }
  181. function j() {
  182. globalDefQueue.length && (each(globalDefQueue, function (e) {
  183. var t = e[0];
  184. "string" == typeof t && (l.defQueueMap[t] = !0), h.push(e)
  185. }), globalDefQueue = [])
  186. }
  187. function P(e) {
  188. delete p[e], delete f[e]
  189. }
  190. function R() {
  191. var e, r, t = 1e3 * g.waitSeconds, n = t && l.startTime + t < (new Date).getTime(), o = [], a = [], s = !1,
  192. u = !0;
  193. if (!i) {
  194. if (i = !0, eachProp(f, function (e) {
  195. var t = e.map, i = t.id;
  196. if (e.enabled && (t.isDefine || a.push(e), !e.error)) if (!e.inited && n) w(i) ? s = r = !0 : (o.push(i), E(i)); else if (!e.inited && e.fetched && t.isDefine && (s = !0, !t.prefix)) return u = !1
  197. }), n && o.length) return (e = makeError("timeout", "Load timeout for modules: " + o, null, o)).contextName = l.contextName, O(e);
  198. u && each(a, function (e) {
  199. !function n(o, a, s) {
  200. var e = o.map.id;
  201. o.error ? o.emit("error", o.error) : (a[e] = !0, each(o.depMaps, function (e, t) {
  202. var i = e.id, r = getOwn(p, i);
  203. !r || o.depMatched[t] || s[i] || (getOwn(a, i) ? (o.defineDep(t, m[i]), o.check()) : n(r, a, s))
  204. }), s[e] = !0)
  205. }(e, {}, {})
  206. }), n && !r || !s || !isBrowser && !isWebWorker || d || (d = setTimeout(function () {
  207. d = 0, R()
  208. }, 50)), i = !1
  209. }
  210. }
  211. function a(e) {
  212. hasProp(m, e[0]) || k(S(e[0], null, !0)).init(e[1], e[2])
  213. }
  214. function o(e, t, i, r) {
  215. e.detachEvent && !isOpera ? r && e.detachEvent(r, t) : e.removeEventListener(i, t, !1)
  216. }
  217. function s(e) {
  218. var t = e.currentTarget || e.srcElement;
  219. return o(t, l.onScriptLoad, "load", "onreadystatechange"), o(t, l.onScriptError, "error"), {
  220. node: t,
  221. id: t && t.getAttribute("data-requiremodule")
  222. }
  223. }
  224. function T() {
  225. var e;
  226. for (j(); h.length;) {
  227. if (null === (e = h.shift())[0]) return O(makeError("mismatch", "Mismatched anonymous define() module: " + e[e.length - 1]));
  228. a(e)
  229. }
  230. l.defQueueMap = {}
  231. }
  232. return c = {
  233. requireAlias: function (e) {
  234. return e.requireAlias ? e.requireAlias : e.requireAlias = l.makeRequire(e.map)
  235. }, exports: function (e) {
  236. if (e.usingExports = !0, e.map.isDefine) return e.exports ? m[e.map.id] = e.exports : e.exports = m[e.map.id] = {}
  237. }, module: function (e) {
  238. return e.module ? e.module : e.module = {
  239. id: e.map.id, uri: e.map.url, config: function () {
  240. return getOwn(g.config, e.map.id) || {}
  241. }, exports: e.exports || (e.exports = {})
  242. }
  243. }
  244. }, (e = function (e) {
  245. this.events = getOwn(r, e.id) || {}, this.map = e, this.shim = getOwn(g.shim, e.id), this.depExports = [], this.depMaps = [], this.depMatched = [], this.pluginMaps = {}, this.depCount = 0
  246. }).prototype = {
  247. init: function (e, t, i, r) {
  248. r = r || {}, this.inited || (this.factory = t, i ? this.on("error", i) : this.events.error && (i = bind(this, function (e) {
  249. this.emit("error", e)
  250. })), this.depMaps = e && e.slice(0), this.errback = i, this.inited = !0, this.ignore = r.ignore, r.enabled || this.enabled ? this.enable() : this.check())
  251. }, defineDep: function (e, t) {
  252. this.depMatched[e] || (this.depMatched[e] = !0, this.depCount -= 1, this.depExports[e] = t)
  253. }, fetch: function () {
  254. if (!this.fetched) {
  255. this.fetched = !0, l.startTime = (new Date).getTime();
  256. var e = this.map;
  257. if (!this.shim) return e.prefix ? this.callPlugin() : this.load();
  258. l.makeRequire(this.map, {enableBuildCallback: !0})(this.shim.deps || [], bind(this, function () {
  259. return e.prefix ? this.callPlugin() : this.load()
  260. }))
  261. }
  262. }, load: function () {
  263. var e = this.map.url;
  264. n[e] || (n[e] = !0, l.load(this.map.id, e))
  265. }, check: function () {
  266. if (this.enabled && !this.enabling) {
  267. var t, e, i = this.map.id, r = this.depExports, n = this.exports, o = this.factory;
  268. if (this.inited) {
  269. if (this.error) this.emit("error", this.error); else if (!this.defining) {
  270. if (this.defining = !0, this.depCount < 1 && !this.defined) {
  271. if (isFunction(o)) {
  272. if (this.events.error && this.map.isDefine || req.onError !== defaultOnError) try {
  273. n = l.execCb(i, o, r, n)
  274. } catch (e) {
  275. t = e
  276. } else n = l.execCb(i, o, r, n);
  277. if (this.map.isDefine && void 0 === n && ((e = this.module) ? n = e.exports : this.usingExports && (n = this.exports)), t) return t.requireMap = this.map, t.requireModules = this.map.isDefine ? [this.map.id] : null, t.requireType = this.map.isDefine ? "define" : "requireAlias", O(this.error = t)
  278. } else n = o;
  279. if (this.exports = n, this.map.isDefine && !this.ignore && (m[i] = n, req.onResourceLoad)) {
  280. var a = [];
  281. each(this.depMaps, function (e) {
  282. a.push(e.normalizedMap || e)
  283. }), req.onResourceLoad(l, this.map, a)
  284. }
  285. P(i), this.defined = !0
  286. }
  287. this.defining = !1, this.defined && !this.defineEmitted && (this.defineEmitted = !0, this.emit("defined", this.exports), this.defineEmitComplete = !0)
  288. }
  289. } else hasProp(l.defQueueMap, i) || this.fetch()
  290. }
  291. }, callPlugin: function () {
  292. var u = this.map, c = u.id, e = S(u.prefix);
  293. this.depMaps.push(e), M(e, "defined", bind(this, function (e) {
  294. var o, t, i, r = getOwn(v, this.map.id), n = this.map.name,
  295. a = this.map.parentMap ? this.map.parentMap.name : null,
  296. s = l.makeRequire(u.parentMap, {enableBuildCallback: !0});
  297. return this.map.unnormalized ? (e.normalize && (n = e.normalize(n, function (e) {
  298. return q(e, a, !0)
  299. }) || ""), M(t = S(u.prefix + "!" + n, this.map.parentMap, !0), "defined", bind(this, function (e) {
  300. this.map.normalizedMap = t, this.init([], function () {
  301. return e
  302. }, null, {enabled: !0, ignore: !0})
  303. })), void ((i = getOwn(p, t.id)) && (this.depMaps.push(t), this.events.error && i.on("error", bind(this, function (e) {
  304. this.emit("error", e)
  305. })), i.enable()))) : r ? (this.map.url = l.nameToUrl(r), void this.load()) : ((o = bind(this, function (e) {
  306. this.init([], function () {
  307. return e
  308. }, null, {enabled: !0})
  309. })).error = bind(this, function (e) {
  310. this.inited = !0, (this.error = e).requireModules = [c], eachProp(p, function (e) {
  311. 0 === e.map.id.indexOf(c + "_unnormalized") && P(e.map.id)
  312. }), O(e)
  313. }), o.fromText = bind(this, function (e, t) {
  314. var i = u.name, r = S(i), n = useInteractive;
  315. t && (e = t), n && (useInteractive = !1), k(r), hasProp(g.config, c) && (g.config[i] = g.config[c]);
  316. try {
  317. req.exec(e)
  318. } catch (e) {
  319. return O(makeError("fromtexteval", "fromText eval for " + c + " failed: " + e, e, [c]))
  320. }
  321. n && (useInteractive = !0), this.depMaps.push(r), l.completeLoad(i), s([i], o)
  322. }), void e.load(u.name, s, o, g))
  323. })), l.enable(e, this), this.pluginMaps[e.id] = e
  324. }, enable: function () {
  325. (f[this.map.id] = this).enabled = !0, this.enabling = !0, each(this.depMaps, bind(this, function (e, t) {
  326. var i, r, n;
  327. if ("string" == typeof e) {
  328. if (e = S(e, this.map.isDefine ? this.map : this.map.parentMap, !1, !this.skipMap), this.depMaps[t] = e, n = getOwn(c, e.id)) return void (this.depExports[t] = n(this));
  329. this.depCount += 1, M(e, "defined", bind(this, function (e) {
  330. this.undefed || (this.defineDep(t, e), this.check())
  331. })), this.errback ? M(e, "error", bind(this, this.errback)) : this.events.error && M(e, "error", bind(this, function (e) {
  332. this.emit("error", e)
  333. }))
  334. }
  335. i = e.id, r = p[i], hasProp(c, i) || !r || r.enabled || l.enable(e, this)
  336. })), eachProp(this.pluginMaps, bind(this, function (e) {
  337. var t = getOwn(p, e.id);
  338. t && !t.enabled && l.enable(e, this)
  339. })), this.enabling = !1, this.check()
  340. }, on: function (e, t) {
  341. var i = this.events[e];
  342. i || (i = this.events[e] = []), i.push(t)
  343. }, emit: function (e, t) {
  344. each(this.events[e], function (e) {
  345. e(t)
  346. }), "error" === e && delete this.events[e]
  347. }
  348. }, (l = {
  349. config: g,
  350. contextName: u,
  351. registry: p,
  352. defined: m,
  353. urlFetched: n,
  354. defQueue: h,
  355. defQueueMap: {},
  356. Module: e,
  357. makeModuleMap: S,
  358. nextTick: req.nextTick,
  359. onError: O,
  360. configure: function (e) {
  361. if (e.baseUrl && "/" !== e.baseUrl.charAt(e.baseUrl.length - 1) && (e.baseUrl += "/"), "string" == typeof e.urlArgs) {
  362. var i = e.urlArgs;
  363. e.urlArgs = function (e, t) {
  364. return (-1 === t.indexOf("?") ? "?" : "&") + i
  365. }
  366. }
  367. var r = g.shim, n = {paths: !0, bundles: !0, config: !0, map: !0};
  368. eachProp(e, function (e, t) {
  369. n[t] ? (g[t] || (g[t] = {}), mixin(g[t], e, !0, !0)) : g[t] = e
  370. }), e.bundles && eachProp(e.bundles, function (e, t) {
  371. each(e, function (e) {
  372. e !== t && (v[e] = t)
  373. })
  374. }), e.shim && (eachProp(e.shim, function (e, t) {
  375. isArray(e) && (e = {deps: e}), !e.exports && !e.init || e.exportsFn || (e.exportsFn = l.makeShimExports(e)), r[t] = e
  376. }), g.shim = r), e.packages && each(e.packages, function (e) {
  377. var t;
  378. t = (e = "string" == typeof e ? {name: e} : e).name, e.location && (g.paths[t] = e.location), g.pkgs[t] = e.name + "/" + (e.main || "main").replace(currDirRegExp, "").replace(jsSuffixRegExp, "")
  379. }), eachProp(p, function (e, t) {
  380. e.inited || e.map.unnormalized || (e.map = S(t, null, !0))
  381. }), (e.deps || e.callback) && l.requireAlias(e.deps || [], e.callback)
  382. },
  383. makeShimExports: function (t) {
  384. return function () {
  385. var e;
  386. return t.init && (e = t.init.apply(global, arguments)), e || t.exports && getGlobal(t.exports)
  387. }
  388. },
  389. makeRequire: function (o, a) {
  390. function s(e, t, i) {
  391. var r, n;
  392. return a.enableBuildCallback && t && isFunction(t) && (t.__requireJsBuild = !0), "string" == typeof e ? isFunction(t) ? O(makeError("requireargs", "Invalid requireAlias call"), i) : o && hasProp(c, e) ? c[e](p[o.id]) : req.get ? req.get(l, e, o, s) : (r = S(e, o, !1, !0).id, hasProp(m, r) ? m[r] : O(makeError("notloaded", 'Module name "' + r + '" has not been loaded yet for context: ' + u + (o ? "" : ". Use requireAlias([])")))) : (T(), l.nextTick(function () {
  393. T(), (n = k(S(null, o))).skipMap = a.skipMap, n.init(e, t, i, {enabled: !0}), R()
  394. }), s)
  395. }
  396. return a = a || {}, mixin(s, {
  397. isBrowser: isBrowser, toUrl: function (e) {
  398. var t, i = e.lastIndexOf("."), r = e.split("/")[0];
  399. return -1 !== i && (!("." === r || ".." === r) || 1 < i) && (t = e.substring(i, e.length), e = e.substring(0, i)), l.nameToUrl(q(e, o && o.id, !0), t, !0)
  400. }, defined: function (e) {
  401. return hasProp(m, S(e, o, !1, !0).id)
  402. }, specified: function (e) {
  403. return e = S(e, o, !1, !0).id, hasProp(m, e) || hasProp(p, e)
  404. }
  405. }), o || (s.undef = function (i) {
  406. j();
  407. var e = S(i, o, !0), t = getOwn(p, i);
  408. t.undefed = !0, E(i), delete m[i], delete n[e.url], delete r[i], eachReverse(h, function (e, t) {
  409. e[0] === i && h.splice(t, 1)
  410. }), delete l.defQueueMap[i], t && (t.events.defined && (r[i] = t.events), P(i))
  411. }), s
  412. },
  413. enable: function (e) {
  414. getOwn(p, e.id) && k(e).enable()
  415. },
  416. completeLoad: function (e) {
  417. var t, i, r, n = getOwn(g.shim, e) || {}, o = n.exports;
  418. for (j(); h.length;) {
  419. if (null === (i = h.shift())[0]) {
  420. if (i[0] = e, t) break;
  421. t = !0
  422. } else i[0] === e && (t = !0);
  423. a(i)
  424. }
  425. if (l.defQueueMap = {}, r = getOwn(p, e), !t && !hasProp(m, e) && r && !r.inited) {
  426. if (!(!g.enforceDefine || o && getGlobal(o))) return w(e) ? void 0 : O(makeError("nodefine", "No define call for " + e, null, [e]));
  427. a([e, n.deps || [], n.exportsFn])
  428. }
  429. R()
  430. },
  431. nameToUrl: function (e, t, i) {
  432. var r, n, o, a, s, u, c = getOwn(g.pkgs, e);
  433. if (c && (e = c), u = getOwn(v, e)) return l.nameToUrl(u, t, i);
  434. if (req.jsExtRegExp.test(e)) a = e + (t || ""); else {
  435. for (r = g.paths, o = (n = e.split("/")).length; 0 < o; o -= 1) if (s = getOwn(r, n.slice(0, o).join("/"))) {
  436. isArray(s) && (s = s[0]), n.splice(0, o, s);
  437. break
  438. }
  439. a = n.join("/"), a = ("/" === (a += t || (/^data\:|^blob\:|\?/.test(a) || i ? "" : ".js")).charAt(0) || a.match(/^[\w\+\.\-]+:/) ? "" : g.baseUrl) + a
  440. }
  441. return g.urlArgs && !/^blob\:/.test(a) ? a + g.urlArgs(e, a) : a
  442. },
  443. load: function (e, t) {
  444. req.load(l, e, t)
  445. },
  446. execCb: function (e, t, i, r) {
  447. return t.apply(r, i)
  448. },
  449. onScriptLoad: function (e) {
  450. if ("load" === e.type || readyRegExp.test((e.currentTarget || e.srcElement).readyState)) {
  451. interactiveScript = null;
  452. var t = s(e);
  453. l.completeLoad(t.id)
  454. }
  455. },
  456. onScriptError: function (e) {
  457. var i = s(e);
  458. if (!w(i.id)) {
  459. var r = [];
  460. return eachProp(p, function (e, t) {
  461. 0 !== t.indexOf("_@r") && each(e.depMaps, function (e) {
  462. if (e.id === i.id) return r.push(t), !0
  463. })
  464. }), O(makeError("scripterror", 'Script error for "' + i.id + (r.length ? '", needed by: ' + r.join(", ") : '"'), e, [i.id]))
  465. }
  466. }
  467. }).requireAlias = l.makeRequire(), l
  468. }
  469. function getInteractiveScript() {
  470. return interactiveScript && "interactive" === interactiveScript.readyState || eachReverse(scripts(), function (e) {
  471. if ("interactive" === e.readyState) return interactiveScript = e
  472. }), interactiveScript
  473. }
  474. }(this, "undefined" == typeof setTimeout ? void 0 : setTimeout);