forked from systemjs/systemjs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnamed-exports.min.js.map
1 lines (1 loc) · 3.48 KB
/
named-exports.min.js.map
1
{"version":3,"file":"named-exports.min.js","sources":["../../src/extras/named-exports.js"],"sourcesContent":["/*\n * Named exports support for legacy module formats in SystemJS 2.0\n */\n(function (global) {\n var systemJSPrototype = global.System.constructor.prototype;\n \n // hook System.register to know the last declaration binding\n var lastRegisterDeclare;\n var systemRegister = systemJSPrototype.register;\n systemJSPrototype.register = function (name, deps, declare) {\n lastRegisterDeclare = typeof name === 'string' ? declare : deps;\n systemRegister.apply(this, arguments);\n };\n\n var getRegister = systemJSPrototype.getRegister;\n systemJSPrototype.getRegister = function () {\n var register = getRegister.call(this);\n // if it is an actual System.register call, then its ESM\n // -> dont add named exports\n if (!register || register[1] === lastRegisterDeclare || register[1].length === 0)\n return register;\n \n // otherwise it was provided by a custom instantiator\n // -> extend the registration with named exports support\n var registerDeclare = register[1];\n register[1] = function (_export, _context) {\n // hook the _export function to note the default export\n var defaultExport, hasDefaultExport = false;\n var declaration = registerDeclare.call(this, function (name, value) {\n if (typeof name === 'object' && name.__useDefault)\n defaultExport = name.default, hasDefaultExport = true;\n else if (name === 'default')\n defaultExport = value;\n else if (name === '__useDefault')\n hasDefaultExport = true;\n _export(name, value);\n }, _context);\n // hook the execute function\n var execute = declaration.execute;\n if (execute)\n declaration.execute = function () {\n execute.call(this);\n // do a bulk export of the default export object\n // to export all its names as named exports\n if (hasDefaultExport && typeof defaultExport === 'object')\n for (var exportName in defaultExport) {\n // default is not a named export\n if (exportName !== 'default') {\n _export(exportName, defaultExport[exportName]);\n }\n }\n };\n return declaration;\n };\n return register;\n };\n})(typeof self !== 'undefined' ? self : global);\n"],"names":["global","lastRegisterDeclare","systemJSPrototype","System","constructor","prototype","systemRegister","register","name","deps","declare","apply","this","arguments","getRegister","call","length","registerDeclare","_export","_context","defaultExport","hasDefaultExport","declaration","value","__useDefault","default","execute","exportName","self"],"mappings":"CAGA,SAAWA,GACT,IAGIC,EAHAC,EAAoBF,EAAOG,OAAOC,YAAYC,UAI9CC,EAAiBJ,EAAkBK,SACvCL,EAAkBK,SAAW,SAAUC,EAAMC,EAAMC,GACjDT,EAAsC,iBAATO,EAAoBE,EAAUD,EAC3DH,EAAeK,MAAMC,KAAMC,YAG7B,IAAIC,EAAcZ,EAAkBY,YACpCZ,EAAkBY,YAAc,WAC9B,IAAIP,EAAWO,EAAYC,KAAKH,MAGhC,IAAKL,GAAYA,EAAS,KAAON,GAA8C,IAAvBM,EAAS,GAAGS,OAClE,OAAOT,EAIT,IAAIU,EAAkBV,EAAS,GA8B/B,OA7BAA,EAAS,GAAK,SAAUW,EAASC,GAE/B,IAAIC,EAAeC,GAAmB,EAClCC,EAAcL,EAAgBF,KAAKH,MAAM,SAAUJ,EAAMe,GACvC,iBAATf,GAAqBA,EAAKgB,cACnCJ,EAAgBZ,EAAKiB,QAASJ,GAAmB,GACjC,YAATb,EACPY,EAAgBG,EACA,iBAATf,IACPa,GAAmB,GACrBH,EAAQV,EAAMe,KACbJ,GAECO,EAAUJ,EAAYI,QAc1B,OAbIA,IACFJ,EAAYI,QAAU,WAIpB,GAHAA,EAAQX,KAAKH,MAGTS,GAA6C,iBAAlBD,EAC7B,IAAK,IAAIO,KAAcP,EAEF,YAAfO,GACFT,EAAQS,EAAYP,EAAcO,MAIrCL,GAEFf,GAnDX,CAqDmB,oBAATqB,KAAuBA,KAAO5B"}