You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
5.8 KiB

8 months ago
{"version":3,"file":"##.min.js","names":["errMsg","errCode","msg","global","unsupportedRequire","Error","requireExportsModule","define","arg1","arg2","arg3","deps","exec","isNamedRegister","name","depArg","execArg","Array","isArray","amdRegister","amdDefineDeps","amdDefineExec","createSetter","idx","setters","push","ns","depModules","__useDefault","default","exports","module","splice","i","length","id","index","amdExec","_export","execute","amdResult","apply","undefined","createAMDRegister","System","registerRegistry","register","console","warn","amd","self"],"sources":["amd.js"],"sourcesContent":["(function () {\n\n function errMsg(errCode, msg) {\r\n return (msg || \"\") + \" (SystemJS Error#\" + errCode + \" \" + \"https://github.com/systemjs/systemjs/blob/main/docs/errors.md#\" + errCode + \")\";\r\n }\n\n /*\r\n * Support for AMD loading\r\n */\r\n (function (global) {\r\n function unsupportedRequire () {\r\n throw Error(errMsg(5, 'AMD require not supported.'));\r\n }\r\n\r\n var requireExportsModule = ['require', 'exports', 'module'];\r\n\r\n function createAMDRegister (amdDefineDeps, amdDefineExec) {\r\n var exports = {};\r\n var module = { exports: exports };\r\n var depModules = [];\r\n var setters = [];\r\n var splice = 0;\r\n for (var i = 0; i < amdDefineDeps.length; i++) {\r\n var id = amdDefineDeps[i];\r\n var index = setters.length;\r\n if (id === 'require') {\r\n depModules[i] = unsupportedRequire;\r\n splice++;\r\n }\r\n else if (id === 'module') {\r\n depModules[i] = module;\r\n splice++;\r\n }\r\n else if (id === 'exports') {\r\n depModules[i] = exports;\r\n splice++;\r\n }\r\n else {\r\n createSetter(i);\r\n }\r\n if (splice)\r\n amdDefineDeps[index] = id;\r\n }\r\n if (splice)\r\n amdDefineDeps.length -= splice;\r\n var amdExec = amdDefineExec;\r\n return [amdDefineDeps, function (_export) {\r\n _export({ default: exports, __useDefault: true });\r\n return {\r\n setters: setters,\r\n execute: function () {\r\n var amdResult = amdExec.apply(exports, depModules);\r\n if (amdResult !== undefined)\r\n module.exports = amdResult;\r\n _export(module.exports);\r\n _export('default', module.exports);\r\n }\r\n };\r\n }];\r\n\r\n // needed to avoid iteration scope issues\r\n function createSetter(idx) {\r\n setters.push(function (ns) {\r\n depModules[idx] = ns.__useDefault ? ns.default : ns;\r\n });\r\n }\r\n }\r\n\r\n global.define = function (arg1, arg2, arg3) {\r\n var isNamedRegister = typeof arg1 === 'string';\r\n var name = isNamedRegister ? arg1 : null;\r\n var depArg = isNamedRegister ? arg2 : arg1;\r\n var execArg = isNamedRegister ? arg3 : arg2;\r\n\r\n // The System.register(deps, exec) arguments\r\n var deps, exec;\r\n\r\n // define([], function () {})\r\n if (Array.isArray(depArg)) {\r\n deps = depArg;\r\n exec = execArg;\r\n }\r\n // define({})\r\n else if (typeof depArg === 'object') {\r\n deps = [];\r\n exec = function () { return depArg };\r\n }\r\n // define(function () {})\r\n else if (typeof depArg === 'function') {\r\n deps = requireExportsModule;\r\n exec = depArg;\r\n } else {\r\n throw Error(errMsg(9, 'Invalid call to AMD define()'));\r\n }\r\n\r\n var amdRegister = createAMDRegister(deps, exec);\r\n\r\n if (isNamedRegister) {\r\n if (System.registerRegistry) {\r\n System.registerRegistry[name] = amdRegister;\r\n System.register(name, amdRegister[0], amdRegister[1]);\r\n } else\r\n console.warn(errMsg('W6', 'Include named-register.js for full named define support'));\r\n // TODO: create new warning number and documentat