Studying all day long)
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 lines
5.6 KiB

{"version":3,"file":"amd.min.js","sources":["../../src/err-msg.js","../../src/extras/amd.js"],"sourcesContent":["export function errMsg(errCode, msg) {\n if (process.env.SYSTEM_PRODUCTION)\n return (msg || \"\") + \" (SystemJS https://git.io/JvFET#\" + errCode + \")\";\n else\n return (msg || \"\") + \" (SystemJS Error#\" + errCode + \" \" + \"https://git.io/JvFET#\" + errCode + \")\";\n}","import { errMsg } from '../err-msg.js';\n\n/*\n * Support for AMD loading\n */\n(function (global) {\n function unsupportedRequire () {\n throw Error(process.env.SYSTEM_PRODUCTION ? errMsg(5) : errMsg(5, 'AMD require not supported.'));\n }\n\n var requireExportsModule = ['require', 'exports', 'module'];\n\n function createAMDRegister (amdDefineDeps, amdDefineExec) {\n var exports = {};\n var module = { exports: exports };\n var depModules = [];\n var setters = [];\n var splice = 0;\n for (var i = 0; i < amdDefineDeps.length; i++) {\n var id = amdDefineDeps[i];\n var index = setters.length;\n if (id === 'require') {\n depModules[i] = unsupportedRequire;\n splice++;\n }\n else if (id === 'module') {\n depModules[i] = module;\n splice++;\n }\n else if (id === 'exports') {\n depModules[i] = exports;\n splice++;\n }\n else {\n createSetter(i);\n }\n if (splice)\n amdDefineDeps[index] = id;\n }\n if (splice)\n amdDefineDeps.length -= splice;\n var amdExec = amdDefineExec;\n return [amdDefineDeps, function (_export) {\n _export({ default: exports, __useDefault: true });\n return {\n setters: setters,\n execute: function () {\n var amdResult = amdExec.apply(exports, depModules);\n if (amdResult !== undefined)\n module.exports = amdResult;\n _export(module.exports);\n _export('default', module.exports);\n }\n };\n }];\n\n // needed to avoid iteration scope issues\n function createSetter(idx) {\n setters.push(function (ns) {\n depModules[idx] = ns.__useDefault ? ns.default : ns;\n });\n }\n }\n\n global.define = function (arg1, arg2, arg3) {\n var isNamedRegister = typeof arg1 === 'string';\n var name = isNamedRegister ? arg1 : null;\n var depArg = isNamedRegister ? arg2 : arg1;\n var execArg = isNamedRegister ? arg3 : arg2;\n\n // The System.register(deps, exec) arguments\n var deps, exec;\n\n // define([], function () {})\n if (Array.isArray(depArg)) {\n deps = depArg;\n exec = execArg;\n }\n // define({})\n else if (typeof depArg === 'object') {\n deps = [];\n exec = function () { return depArg };\n }\n // define(function () {})\n else if (typeof depArg === 'function') {\n deps = requireExportsModule;\n exec = depArg;\n } else {\n throw Error(process.env.SYSTEM_PRODUCTION ? errMsg(9) : errMsg(9, 'Invalid call to AMD define()'));\n }\n\n var amdRegister = createAMDRegister(deps, exec);\n\n if (isNamedRegister) {\n if (System.registerRegistry) {\n System.registerRegistry[name] = amdRegister;\n System.register(name, amdRegister[0], amdRegister[1]);\n } else\n console.warn(process.env.SYSTEM_PRODUCTION ? errMsg('W6') : errMsg('W6', 'Include named-register.js for full named define support'));\n // TODO: create new warning number and documentation for using named define without named-register extra\n System.register(amdRegister[0], amdRegister[1]);\n } else\n System.register(amdRegister[0], amdRegister[1]);\n };\n global.define.amd = {};\n})(typeof self !== 'undefined' ? self : global);\n"],"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"],"mappings":"YAAO,SAASA,EAAOC,EAASC,GAE5B,OAAQA,GAAO,IAAM,mCAAqCD,EAAU,KCGxE,SAAWE,GACT,SAASC,IACP,MAAMC,MAAsCL,EAAO,IAGrD,IAAIM,EAAuB,CAAC,UAAW,UAAW,UAsDlDH,EAAOI,OAAS,SAAUC,EAAMC,EAAMC,GACpC,IAMIC,EAAMC,EANNC,EAAkC,iBAATL,EACzBM,EAAOD,EAAkBL,EAAO,KAChCO,EAASF,EAAkBJ,EAAOD,EACl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