Comparing version 6.4.0 to 6.4.1
@@ -0,1 +1,5 @@ | ||
SystemJS 6.4.1 | ||
* Fix auto import handling of dynamic import races during loading phase (https://github.com/systemjs/systemjs/pull/2223) | ||
* Fix crossOrigin script attribute loading in Safari (https://github.com/systemjs/systemjs/pull/2222) | ||
SystemJS 6.4.0 | ||
@@ -2,0 +6,0 @@ * Dynamic import map extra support (https://github.com/systemjs/systemjs/pull/2217 @stevenvachon) |
108
dist/s.js
/* | ||
* SJS 6.4.0 | ||
* SJS 6.4.1 | ||
* Minimal SystemJS Build | ||
@@ -505,2 +505,10 @@ */ | ||
if (hasDocument) { | ||
window.addEventListener('error', function (evt) { | ||
lastWindowErrorUrl = evt.filename; | ||
lastWindowError = evt.error; | ||
}); | ||
var baseOrigin = location.origin; | ||
} | ||
systemJSPrototype.createScript = function (url) { | ||
@@ -510,3 +518,7 @@ var script = document.createElement('script'); | ||
script.async = true; | ||
script.crossOrigin = 'anonymous'; | ||
// Only add cross origin for actual cross origin | ||
// this is because Safari triggers for all | ||
// - https://bugs.webkit.org/show_bug.cgi?id=171566 | ||
if (!url.startsWith(baseOrigin + '/')) | ||
script.crossOrigin = 'anonymous'; | ||
script.src = url; | ||
@@ -516,5 +528,43 @@ return script; | ||
// Auto imports -> script tags can be inlined directly for load phase | ||
var lastAutoImportUrl, lastAutoImportDeps; | ||
var autoImportCandidates = {}; | ||
var systemRegister = systemJSPrototype.register; | ||
var timeoutCnt = 0; | ||
systemJSPrototype.register = function (deps, declare) { | ||
if (hasDocument && document.readyState === 'loading' && typeof deps !== 'string') { | ||
var scripts = document.getElementsByTagName('script'); | ||
var lastScript = scripts[scripts.length - 1]; | ||
var url = lastScript && lastScript.src; | ||
if (url) { | ||
lastAutoImportUrl = url; | ||
lastAutoImportDeps = deps; | ||
autoImportCandidates[url] = [deps, declare]; | ||
var loader = this; | ||
// This timeout ensures that if this is a dynamic script injection by SystemJS | ||
// that the auto import will be cleared after the timeout and hence will not | ||
// be auto imported | ||
timeoutCnt++; | ||
setTimeout(function () { | ||
if (autoImportCandidates[url]) | ||
loader.import(url); | ||
if (--timeoutCnt === 0 && document.readyState !== 'loading') | ||
autoImportCandidates = {}; | ||
}); | ||
} | ||
} | ||
else { | ||
lastAutoImportDeps = undefined; | ||
} | ||
return systemRegister.call(this, deps, declare); | ||
}; | ||
var lastWindowErrorUrl, lastWindowError; | ||
systemJSPrototype.instantiate = function (url, firstParentUrl) { | ||
var loader = this; | ||
var autoImportRegistration = autoImportCandidates[url]; | ||
if (autoImportRegistration) { | ||
delete autoImportCandidates[url]; | ||
return autoImportRegistration; | ||
} | ||
return new Promise(function (resolve, reject) { | ||
@@ -533,3 +583,7 @@ var script = systemJSPrototype.createScript(url); | ||
else { | ||
resolve(loader.getRegister()); | ||
var register = loader.getRegister(); | ||
// Clear any auto import registration for dynamic import scripts during load | ||
if (register && register[0] === lastAutoImportDeps) | ||
delete autoImportCandidates[lastAutoImportUrl]; | ||
resolve(register); | ||
} | ||
@@ -541,8 +595,2 @@ }); | ||
if (hasDocument) | ||
window.addEventListener('error', function (evt) { | ||
lastWindowErrorUrl = evt.filename; | ||
lastWindowError = evt.error; | ||
}); | ||
systemJSPrototype.resolve = function (id, parentUrl) { | ||
@@ -627,44 +675,2 @@ parentUrl = parentUrl || !true || baseUrl; | ||
/** | ||
* Auto-import <script src="system-module.js"></script> registrations | ||
* Allows the browser preloader to work directly with SystemJS optimization | ||
*/ | ||
var autoImports = {}; | ||
var systemRegister = systemJSPrototype.register; | ||
systemJSPrototype.register = function (deps, declare) { | ||
if (hasDocument && document.readyState === 'loading' && typeof deps !== 'string') { | ||
var scripts = document.getElementsByTagName('script'); | ||
var lastScript = scripts[scripts.length - 1]; | ||
if (lastScript && lastScript.src) { | ||
// Only import if not already in the registry. | ||
// This avoids re-importing an inline dynamic System.import dependency. | ||
// There is still a risk if a user dynamically injects a custom System.register script during DOM load that does an | ||
// anomymous registration that is able to execute before DOM load completion, and thus is incorrectly matched to the | ||
// last script when it wasn't causing a System.import of that last script, but this is deemed an acceptable edge case | ||
// since due to custom user registration injection. | ||
// Not using document.currentScript is done to ensure IE11 equivalence. | ||
if (!this[REGISTRY][lastScript.src]) { | ||
autoImports[lastScript.src] = [deps, declare]; | ||
// Auto import = immediately import the registration | ||
// It is up to the user to manage execution order for deep preloading. | ||
this.import(lastScript.src); | ||
} | ||
return; | ||
} | ||
} | ||
return systemRegister.call(this, deps, declare); | ||
}; | ||
var systemInstantiate$1 = systemJSPrototype.instantiate; | ||
systemJSPrototype.instantiate = function (url) { | ||
var autoImport = autoImports[url]; | ||
if (autoImport) { | ||
delete autoImports[url]; | ||
return autoImport; | ||
} | ||
return systemInstantiate$1.apply(this, arguments); | ||
}; | ||
/* | ||
@@ -671,0 +677,0 @@ * Supports loading System.register in workers |
@@ -1,2 +0,2 @@ | ||
!function(){function e(e,t){return(t||"")+" (SystemJS https://git.io/JvFET#"+e+")"}function t(e,t){if(-1!==e.indexOf("\\")&&(e=e.replace(/\\/g,"/")),"/"===e[0]&&"/"===e[1])return t.slice(0,t.indexOf(":")+1)+e;if("."===e[0]&&("/"===e[1]||"."===e[1]&&("/"===e[2]||2===e.length&&(e+="/"))||1===e.length&&(e+="/"))||"/"===e[0]){var n,r=t.slice(0,t.indexOf(":")+1);if(n="/"===t[r.length+1]?"file:"!==r?(n=t.slice(r.length+2)).slice(n.indexOf("/")+1):t.slice(8):t.slice(r.length+("/"===t[r.length])),"/"===e[0])return t.slice(0,t.length-n.length-1)+e;for(var i=n.slice(0,n.lastIndexOf("/")+1)+e,o=[],c=-1,s=0;i.length>s;s++)-1!==c?"/"===i[s]&&(o.push(i.slice(c,s+1)),c=-1):"."===i[s]?"."!==i[s+1]||"/"!==i[s+2]&&s+2!==i.length?"/"===i[s+1]||s+1===i.length?s+=1:c=s:(o.pop(),s+=2):c=s;return-1!==c&&o.push(i.slice(c)),t.slice(0,t.length-n.length)+o.join("")}}function n(e,n){return t(e,n)||(-1!==e.indexOf(":")?e:t("./"+e,n))}function r(e,t){for(var n in t)e[n]=t[n];return e}function i(e,n,r,i,o){for(var c in e){var f=t(c,r)||c,a=e[c];if("string"==typeof a){var l=u(i,t(a,r)||a,o);l?n[f]=l:s("W1",c,a)}}}function o(e,t){if(t[e])return e;var n=e.length;do{var r=e.slice(0,n+1);if(r in t)return r}while(-1!==(n=e.lastIndexOf("/",n-1)))}function c(e,t){var n=o(e,t);if(n){var r=t[n];if(null===r)return;if(n.length>=e.length||"/"===r[r.length-1])return r+e.slice(n.length);s("W2",n,r)}}function s(t,n,r){console.warn(e(t,[r,n].join(", ")))}function u(e,t,n){for(var r=e.scopes,i=n&&o(n,r);i;){var s=c(t,r[i]);if(s)return s;i=o(i.slice(0,i.lastIndexOf("/")),r)}return c(t,e.imports)||-1!==t.indexOf(":")&&t}function f(){this[x]={}}function a(t,n,r){var i=t[x][n];if(i)return i;var o=[],c=Object.create(null);w&&Object.defineProperty(c,w,{value:"Module"});var s=Promise.resolve().then((function(){return t.instantiate(n,r)})).then((function(r){if(!r)throw Error(e(2,n));var s=r[1]((function(e,t){i.h=!0;var n=!1;if("object"!=typeof e)e in c&&c[e]===t||(c[e]=t,n=!0);else{for(var r in e)t=e[r],r in c&&c[r]===t||(c[r]=t,n=!0);e.__esModule&&(c.__esModule=e.__esModule)}if(n)for(var s=0;o.length>s;s++){var u=o[s];u&&u(c)}return t}),2===r[1].length?{import:function(e){return t.import(e,n)},meta:t.createContext(n)}:void 0);return i.e=s.execute||function(){},[r[0],s.setters||[]]})),u=s.then((function(e){return Promise.all(e[0].map((function(r,i){var o=e[1][i];return Promise.resolve(t.resolve(r,n)).then((function(e){var r=a(t,e,n);return Promise.resolve(r.I).then((function(){return o&&(r.i.push(o),!r.h&&r.I||o(r.n)),r}))}))}))).then((function(e){i.d=e}),!1)}));return u.catch((function(e){i.e=null,i.er=e})),i=t[x][n]={id:n,i:o,n:c,I:s,L:u,h:!1,d:void 0,e:void 0,er:void 0,E:void 0,C:void 0}}function l(){[].forEach.call(document.querySelectorAll("script"),(function(e){if(!e.sp)if("systemjs-module"===e.type){if(e.sp=!0,!e.src)return;System.import("import:"===e.src.slice(0,7)?e.src.slice(7):n(e.src,d))}else"systemjs-importmap"===e.type&&(e.sp=!0,I=I.then((function(t){return e.src?fetch(e.src).then((function(e){return e.text()})).then((function(n){return h(t,n,e.src)})):h(t,e.innerHTML,d)})))}))}function h(t,o,c){try{var s=JSON.parse(o)}catch(u){throw Error(e(1))}return function(e,t,o){var c={imports:r({},o.imports),scopes:r({},o.scopes),depcache:r({},o.depcache)};if(e.imports&&i(e.imports,c.imports,t,o,null),e.scopes)for(var s in e.scopes){var u=n(s,t);i(e.scopes[s],c.scopes[u]||(c.scopes[u]={}),t,o,u)}if(e.depcache)for(var f in e.depcache){var a=n(f,t);c.depcache[a]=e.depcache[f]}return c}(s,c,t)}var d,p="undefined"!=typeof Symbol,v="undefined"!=typeof self,m="undefined"!=typeof document,g=v?self:global;if(m){var y=document.querySelector("base[href]");y&&(d=y.href)}if(!d&&"undefined"!=typeof location){var E=(d=location.href.split("#")[0].split("?")[0]).lastIndexOf("/");-1!==E&&(d=d.slice(0,E+1))}var O,S=p?Symbol():"#",w=p&&Symbol.toStringTag,x=p?Symbol():"@",P=f.prototype;P.import=function(e,t){var n=this;return Promise.resolve(n.prepareImport()).then((function(){return n.resolve(e,t)})).then((function(e){var t=a(n,e);return t.C||function(e,t){return t.C=function e(t,n,r){if(!r[n.id])return r[n.id]=!0,Promise.resolve(n.L).then((function(){return Promise.all(n.d.map((function(n){return e(t,n,r)})))}))}(e,t,{}).then((function(){return function e(t,n,r){function i(){try{var e=n.e.call(C);if(e)return e=e.then((function(){n.C=n.n,n.E=null}),(function(e){throw n.er=e,n.E=null,e})),n.E=n.E||e;n.C=n.n}catch(t){throw n.er=t,t}finally{n.L=n.I=void 0,n.e=null}}if(!r[n.id]){if(r[n.id]=!0,!n.e){if(n.er)throw n.er;return n.E?n.E:void 0}var o;return n.d.forEach((function(i){try{var c=e(t,i,r);c&&(o=o||[]).push(c)}catch(s){throw n.e=null,n.er=s,s}})),o?Promise.all(o).then(i,(function(e){throw n.e=null,n.er=e,e})):i()}}(e,t,{})})).then((function(){return t.n}))}(n,t)}))},P.createContext=function(e){return{url:e}},P.register=function(e,t){O=[e,t]},P.getRegister=function(){var e=O;return O=void 0,e};var b,j,C=Object.freeze(Object.create(null));g.System=new f,P.createScript=function(e){var t=document.createElement("script");return t.charset="utf-8",t.async=!0,t.crossOrigin="anonymous",t.src=e,t},P.instantiate=function(t,n){var r=this;return new Promise((function(i,o){var c=P.createScript(t);c.addEventListener("error",(function(){o(Error(e(3,[t,n].join(", "))))})),c.addEventListener("load",(function(){document.head.removeChild(c),b===t?o(j):i(r.getRegister())})),document.head.appendChild(c)}))},m&&window.addEventListener("error",(function(e){b=e.filename,j=e.error})),P.resolve=function(n,r){return u(this[S],t(n,r=r||d)||n,r)||function(t,n){throw Error(e(8,[t,n].join(", ")))}(n,r)};var I=Promise.resolve({imports:{},scopes:{},depcache:{}}),L=m;P.prepareImport=function(e){(L||e)&&(l(),L=!1);var t=this;return I.then((function(e){t[S]=e}))},m&&(l(),window.addEventListener("DOMContentLoaded",l));const M=P.instantiate;P.instantiate=function(e,t){var n=this[S].depcache[e];if(n)for(var r=0;n.length>r;r++)a(this,this.resolve(n[r],e),e);return M.call(this,e,t)};var _={},T=P.register;P.register=function(e,t){if(m&&"loading"===document.readyState&&"string"!=typeof e){var n=document.getElementsByTagName("script"),r=n[n.length-1];if(r&&r.src)return void(this[x][r.src]||(_[r.src]=[e,t],this.import(r.src)))}return T.call(this,e,t)};var J=P.instantiate;P.instantiate=function(e){var t=_[e];return t?(delete _[e],t):J.apply(this,arguments)},v&&"function"==typeof importScripts&&(P.instantiate=function(e){var t=this;return Promise.resolve().then((function(){return importScripts(e),t.getRegister()}))})}(); | ||
!function(){function e(e,t){return(t||"")+" (SystemJS https://git.io/JvFET#"+e+")"}function t(e,t){if(-1!==e.indexOf("\\")&&(e=e.replace(/\\/g,"/")),"/"===e[0]&&"/"===e[1])return t.slice(0,t.indexOf(":")+1)+e;if("."===e[0]&&("/"===e[1]||"."===e[1]&&("/"===e[2]||2===e.length&&(e+="/"))||1===e.length&&(e+="/"))||"/"===e[0]){var n,r=t.slice(0,t.indexOf(":")+1);if(n="/"===t[r.length+1]?"file:"!==r?(n=t.slice(r.length+2)).slice(n.indexOf("/")+1):t.slice(8):t.slice(r.length+("/"===t[r.length])),"/"===e[0])return t.slice(0,t.length-n.length-1)+e;for(var i=n.slice(0,n.lastIndexOf("/")+1)+e,o=[],c=-1,s=0;i.length>s;s++)-1!==c?"/"===i[s]&&(o.push(i.slice(c,s+1)),c=-1):"."===i[s]?"."!==i[s+1]||"/"!==i[s+2]&&s+2!==i.length?"/"===i[s+1]||s+1===i.length?s+=1:c=s:(o.pop(),s+=2):c=s;return-1!==c&&o.push(i.slice(c)),t.slice(0,t.length-n.length)+o.join("")}}function n(e,n){return t(e,n)||(-1!==e.indexOf(":")?e:t("./"+e,n))}function r(e,t){for(var n in t)e[n]=t[n];return e}function i(e,n,r,i,o){for(var c in e){var f=t(c,r)||c,a=e[c];if("string"==typeof a){var l=u(i,t(a,r)||a,o);l?n[f]=l:s("W1",c,a)}}}function o(e,t){if(t[e])return e;var n=e.length;do{var r=e.slice(0,n+1);if(r in t)return r}while(-1!==(n=e.lastIndexOf("/",n-1)))}function c(e,t){var n=o(e,t);if(n){var r=t[n];if(null===r)return;if(n.length>=e.length||"/"===r[r.length-1])return r+e.slice(n.length);s("W2",n,r)}}function s(t,n,r){console.warn(e(t,[r,n].join(", ")))}function u(e,t,n){for(var r=e.scopes,i=n&&o(n,r);i;){var s=c(t,r[i]);if(s)return s;i=o(i.slice(0,i.lastIndexOf("/")),r)}return c(t,e.imports)||-1!==t.indexOf(":")&&t}function f(){this[x]={}}function a(t,n,r){var i=t[x][n];if(i)return i;var o=[],c=Object.create(null);w&&Object.defineProperty(c,w,{value:"Module"});var s=Promise.resolve().then((function(){return t.instantiate(n,r)})).then((function(r){if(!r)throw Error(e(2,n));var s=r[1]((function(e,t){i.h=!0;var n=!1;if("object"!=typeof e)e in c&&c[e]===t||(c[e]=t,n=!0);else{for(var r in e)t=e[r],r in c&&c[r]===t||(c[r]=t,n=!0);e.__esModule&&(c.__esModule=e.__esModule)}if(n)for(var s=0;o.length>s;s++){var u=o[s];u&&u(c)}return t}),2===r[1].length?{import:function(e){return t.import(e,n)},meta:t.createContext(n)}:void 0);return i.e=s.execute||function(){},[r[0],s.setters||[]]})),u=s.then((function(e){return Promise.all(e[0].map((function(r,i){var o=e[1][i];return Promise.resolve(t.resolve(r,n)).then((function(e){var r=a(t,e,n);return Promise.resolve(r.I).then((function(){return o&&(r.i.push(o),!r.h&&r.I||o(r.n)),r}))}))}))).then((function(e){i.d=e}),!1)}));return u.catch((function(e){i.e=null,i.er=e})),i=t[x][n]={id:n,i:o,n:c,I:s,L:u,h:!1,d:void 0,e:void 0,er:void 0,E:void 0,C:void 0}}function l(){[].forEach.call(document.querySelectorAll("script"),(function(e){if(!e.sp)if("systemjs-module"===e.type){if(e.sp=!0,!e.src)return;System.import("import:"===e.src.slice(0,7)?e.src.slice(7):n(e.src,d))}else"systemjs-importmap"===e.type&&(e.sp=!0,R=R.then((function(t){return e.src?fetch(e.src).then((function(e){return e.text()})).then((function(n){return h(t,n,e.src)})):h(t,e.innerHTML,d)})))}))}function h(t,o,c){try{var s=JSON.parse(o)}catch(u){throw Error(e(1))}return function(e,t,o){var c={imports:r({},o.imports),scopes:r({},o.scopes),depcache:r({},o.depcache)};if(e.imports&&i(e.imports,c.imports,t,o,null),e.scopes)for(var s in e.scopes){var u=n(s,t);i(e.scopes[s],c.scopes[u]||(c.scopes[u]={}),t,o,u)}if(e.depcache)for(var f in e.depcache){var a=n(f,t);c.depcache[a]=e.depcache[f]}return c}(s,c,t)}var d,v="undefined"!=typeof Symbol,p="undefined"!=typeof self,m="undefined"!=typeof document,g=p?self:global;if(m){var y=document.querySelector("base[href]");y&&(d=y.href)}if(!d&&"undefined"!=typeof location){var E=(d=location.href.split("#")[0].split("?")[0]).lastIndexOf("/");-1!==E&&(d=d.slice(0,E+1))}var S,O=v?Symbol():"#",w=v&&Symbol.toStringTag,x=v?Symbol():"@",P=f.prototype;P.import=function(e,t){var n=this;return Promise.resolve(n.prepareImport()).then((function(){return n.resolve(e,t)})).then((function(e){var t=a(n,e);return t.C||function(e,t){return t.C=function e(t,n,r){if(!r[n.id])return r[n.id]=!0,Promise.resolve(n.L).then((function(){return Promise.all(n.d.map((function(n){return e(t,n,r)})))}))}(e,t,{}).then((function(){return function e(t,n,r){function i(){try{var e=n.e.call(C);if(e)return e=e.then((function(){n.C=n.n,n.E=null}),(function(e){throw n.er=e,n.E=null,e})),n.E=n.E||e;n.C=n.n}catch(t){throw n.er=t,t}finally{n.L=n.I=void 0,n.e=null}}if(!r[n.id]){if(r[n.id]=!0,!n.e){if(n.er)throw n.er;return n.E?n.E:void 0}var o;return n.d.forEach((function(i){try{var c=e(t,i,r);c&&(o=o||[]).push(c)}catch(s){throw n.e=null,n.er=s,s}})),o?Promise.all(o).then(i,(function(e){throw n.e=null,n.er=e,e})):i()}}(e,t,{})})).then((function(){return t.n}))}(n,t)}))},P.createContext=function(e){return{url:e}},P.register=function(e,t){S=[e,t]},P.getRegister=function(){var e=S;return S=void 0,e};var b,j,C=Object.freeze(Object.create(null));if(g.System=new f,m){window.addEventListener("error",(function(e){L=e.filename,M=e.error}));var I=location.origin}P.createScript=function(e){var t=document.createElement("script");return t.charset="utf-8",t.async=!0,e.startsWith(I+"/")||(t.crossOrigin="anonymous"),t.src=e,t};var L,M,_={},T=P.register,J=0;P.register=function(e,t){if(m&&"loading"===document.readyState&&"string"!=typeof e){var n=document.getElementsByTagName("script"),r=n[n.length-1],i=r&&r.src;if(i){b=i,j=e,_[i]=[e,t];var o=this;J++,setTimeout((function(){_[i]&&o.import(i),0==--J&&"loading"!==document.readyState&&(_={})}))}}else j=void 0;return T.call(this,e,t)},P.instantiate=function(t,n){var r=this,i=_[t];return i?(delete _[t],i):new Promise((function(i,o){var c=P.createScript(t);c.addEventListener("error",(function(){o(Error(e(3,[t,n].join(", "))))})),c.addEventListener("load",(function(){if(document.head.removeChild(c),L===t)o(M);else{var e=r.getRegister();e&&e[0]===j&&delete _[b],i(e)}})),document.head.appendChild(c)}))},P.resolve=function(n,r){return u(this[O],t(n,r=r||d)||n,r)||function(t,n){throw Error(e(8,[t,n].join(", ")))}(n,r)};var R=Promise.resolve({imports:{},scopes:{},depcache:{}}),W=m;P.prepareImport=function(e){(W||e)&&(l(),W=!1);var t=this;return R.then((function(e){t[O]=e}))},m&&(l(),window.addEventListener("DOMContentLoaded",l));const q=P.instantiate;P.instantiate=function(e,t){var n=this[O].depcache[e];if(n)for(var r=0;n.length>r;r++)a(this,this.resolve(n[r],e),e);return q.call(this,e,t)},p&&"function"==typeof importScripts&&(P.instantiate=function(e){var t=this;return Promise.resolve().then((function(){return importScripts(e),t.getRegister()}))})}(); | ||
//# sourceMappingURL=s.min.js.map |
/* | ||
* SystemJS 6.4.0 | ||
* SystemJS 6.4.1 | ||
*/ | ||
@@ -513,2 +513,10 @@ (function () { | ||
if (hasDocument) { | ||
window.addEventListener('error', function (evt) { | ||
lastWindowErrorUrl = evt.filename; | ||
lastWindowError = evt.error; | ||
}); | ||
var baseOrigin = location.origin; | ||
} | ||
systemJSPrototype.createScript = function (url) { | ||
@@ -518,3 +526,7 @@ var script = document.createElement('script'); | ||
script.async = true; | ||
script.crossOrigin = 'anonymous'; | ||
// Only add cross origin for actual cross origin | ||
// this is because Safari triggers for all | ||
// - https://bugs.webkit.org/show_bug.cgi?id=171566 | ||
if (!url.startsWith(baseOrigin + '/')) | ||
script.crossOrigin = 'anonymous'; | ||
script.src = url; | ||
@@ -524,5 +536,43 @@ return script; | ||
// Auto imports -> script tags can be inlined directly for load phase | ||
var lastAutoImportUrl, lastAutoImportDeps; | ||
var autoImportCandidates = {}; | ||
var systemRegister = systemJSPrototype.register; | ||
var timeoutCnt = 0; | ||
systemJSPrototype.register = function (deps, declare) { | ||
if (hasDocument && document.readyState === 'loading' && typeof deps !== 'string') { | ||
var scripts = document.getElementsByTagName('script'); | ||
var lastScript = scripts[scripts.length - 1]; | ||
var url = lastScript && lastScript.src; | ||
if (url) { | ||
lastAutoImportUrl = url; | ||
lastAutoImportDeps = deps; | ||
autoImportCandidates[url] = [deps, declare]; | ||
var loader = this; | ||
// This timeout ensures that if this is a dynamic script injection by SystemJS | ||
// that the auto import will be cleared after the timeout and hence will not | ||
// be auto imported | ||
timeoutCnt++; | ||
setTimeout(function () { | ||
if (autoImportCandidates[url]) | ||
loader.import(url); | ||
if (--timeoutCnt === 0 && document.readyState !== 'loading') | ||
autoImportCandidates = {}; | ||
}); | ||
} | ||
} | ||
else { | ||
lastAutoImportDeps = undefined; | ||
} | ||
return systemRegister.call(this, deps, declare); | ||
}; | ||
var lastWindowErrorUrl, lastWindowError; | ||
systemJSPrototype.instantiate = function (url, firstParentUrl) { | ||
var loader = this; | ||
var autoImportRegistration = autoImportCandidates[url]; | ||
if (autoImportRegistration) { | ||
delete autoImportCandidates[url]; | ||
return autoImportRegistration; | ||
} | ||
return new Promise(function (resolve, reject) { | ||
@@ -541,3 +591,7 @@ var script = systemJSPrototype.createScript(url); | ||
else { | ||
resolve(loader.getRegister()); | ||
var register = loader.getRegister(); | ||
// Clear any auto import registration for dynamic import scripts during load | ||
if (register && register[0] === lastAutoImportDeps) | ||
delete autoImportCandidates[lastAutoImportUrl]; | ||
resolve(register); | ||
} | ||
@@ -549,8 +603,2 @@ }); | ||
if (hasDocument) | ||
window.addEventListener('error', function (evt) { | ||
lastWindowErrorUrl = evt.filename; | ||
lastWindowError = evt.error; | ||
}); | ||
systemJSPrototype.resolve = function (id, parentUrl) { | ||
@@ -635,44 +683,2 @@ parentUrl = parentUrl || !true || baseUrl; | ||
/** | ||
* Auto-import <script src="system-module.js"></script> registrations | ||
* Allows the browser preloader to work directly with SystemJS optimization | ||
*/ | ||
var autoImports = {}; | ||
var systemRegister = systemJSPrototype.register; | ||
systemJSPrototype.register = function (deps, declare) { | ||
if (hasDocument && document.readyState === 'loading' && typeof deps !== 'string') { | ||
var scripts = document.getElementsByTagName('script'); | ||
var lastScript = scripts[scripts.length - 1]; | ||
if (lastScript && lastScript.src) { | ||
// Only import if not already in the registry. | ||
// This avoids re-importing an inline dynamic System.import dependency. | ||
// There is still a risk if a user dynamically injects a custom System.register script during DOM load that does an | ||
// anomymous registration that is able to execute before DOM load completion, and thus is incorrectly matched to the | ||
// last script when it wasn't causing a System.import of that last script, but this is deemed an acceptable edge case | ||
// since due to custom user registration injection. | ||
// Not using document.currentScript is done to ensure IE11 equivalence. | ||
if (!this[REGISTRY][lastScript.src]) { | ||
autoImports[lastScript.src] = [deps, declare]; | ||
// Auto import = immediately import the registration | ||
// It is up to the user to manage execution order for deep preloading. | ||
this.import(lastScript.src); | ||
} | ||
return; | ||
} | ||
} | ||
return systemRegister.call(this, deps, declare); | ||
}; | ||
var systemInstantiate$1 = systemJSPrototype.instantiate; | ||
systemJSPrototype.instantiate = function (url) { | ||
var autoImport = autoImports[url]; | ||
if (autoImport) { | ||
delete autoImports[url]; | ||
return autoImport; | ||
} | ||
return systemInstantiate$1.apply(this, arguments); | ||
}; | ||
/* | ||
@@ -679,0 +685,0 @@ * Supports loading System.register in workers |
/* | ||
* SystemJS 6.4.0 | ||
* SystemJS 6.4.1 | ||
*/ | ||
!function(){function e(e,t){return(t||"")+" (SystemJS Error#"+e+" https://git.io/JvFET#"+e+")"}function t(e,t){if(-1!==e.indexOf("\\")&&(e=e.replace(/\\/g,"/")),"/"===e[0]&&"/"===e[1])return t.slice(0,t.indexOf(":")+1)+e;if("."===e[0]&&("/"===e[1]||"."===e[1]&&("/"===e[2]||2===e.length&&(e+="/"))||1===e.length&&(e+="/"))||"/"===e[0]){var n,r=t.slice(0,t.indexOf(":")+1);if(n="/"===t[r.length+1]?"file:"!==r?(n=t.slice(r.length+2)).slice(n.indexOf("/")+1):t.slice(8):t.slice(r.length+("/"===t[r.length])),"/"===e[0])return t.slice(0,t.length-n.length-1)+e;for(var i=n.slice(0,n.lastIndexOf("/")+1)+e,o=[],u=-1,c=0;i.length>c;c++)-1!==u?"/"===i[c]&&(o.push(i.slice(u,c+1)),u=-1):"."===i[c]?"."!==i[c+1]||"/"!==i[c+2]&&c+2!==i.length?"/"===i[c+1]||c+1===i.length?c+=1:u=c:(o.pop(),c+=2):u=c;return-1!==u&&o.push(i.slice(u)),t.slice(0,t.length-n.length)+o.join("")}}function n(e,n){return t(e,n)||(-1!==e.indexOf(":")?e:t("./"+e,n))}function r(e,t){for(var n in t)e[n]=t[n];return e}function i(e,n,r,i,o){for(var u in e){var a=t(u,r)||u,f=e[u];if("string"==typeof f){var l=s(i,t(f,r)||f,o);l?n[a]=l:c("W1",u,f,"bare specifier did not resolve")}}}function o(e,t){if(t[e])return e;var n=e.length;do{var r=e.slice(0,n+1);if(r in t)return r}while(-1!==(n=e.lastIndexOf("/",n-1)))}function u(e,t){var n=o(e,t);if(n){var r=t[n];if(null===r)return;if(n.length>=e.length||"/"===r[r.length-1])return r+e.slice(n.length);c("W2",n,r,"should have a trailing '/'")}}function c(t,n,r,i){console.warn(e(t,"Package target "+i+", resolving target '"+r+"' for "+n))}function s(e,t,n){for(var r=e.scopes,i=n&&o(n,r);i;){var c=u(t,r[i]);if(c)return c;i=o(i.slice(0,i.lastIndexOf("/")),r)}return u(t,e.imports)||-1!==t.indexOf(":")&&t}function a(){this[j]={}}function f(e){return e.id}function l(e,t,n,r){if(e.onload(n,t.id,t.d&&t.d.map(f),!!r),n)throw n}function d(t,n,r){var i=t[j][n];if(i)return i;var o=[],u=Object.create(null);w&&Object.defineProperty(u,w,{value:"Module"});var c=Promise.resolve().then((function(){return t.instantiate(n,r)})).then((function(r){if(!r)throw Error(e(2,"Module "+n+" did not instantiate"));var c=r[1]((function(e,t){i.h=!0;var n=!1;if("object"!=typeof e)e in u&&u[e]===t||(u[e]=t,n=!0);else{for(var r in e)t=e[r],r in u&&u[r]===t||(u[r]=t,n=!0);e.__esModule&&(u.__esModule=e.__esModule)}if(n)for(var c=0;o.length>c;c++){var s=o[c];s&&s(u)}return t}),2===r[1].length?{import:function(e){return t.import(e,n)},meta:t.createContext(n)}:void 0);return i.e=c.execute||function(){},[r[0],c.setters||[]]})),s=(c=c.catch((function(e){l(t,i,e,!0)}))).then((function(e){return Promise.all(e[0].map((function(r,i){var o=e[1][i];return Promise.resolve(t.resolve(r,n)).then((function(e){var r=d(t,e,n);return Promise.resolve(r.I).then((function(){return o&&(r.i.push(o),!r.h&&r.I||o(r.n)),r}))}))}))).then((function(e){i.d=e}),(function(e){l(t,i,e,!1)}))}));return s.catch((function(e){i.e=null,i.er=e})),i=t[j][n]={id:n,i:o,n:u,I:c,L:s,h:!1,d:void 0,e:void 0,er:void 0,E:void 0,C:void 0}}function h(){[].forEach.call(document.querySelectorAll("script"),(function(e){if(!e.sp)if("systemjs-module"===e.type){if(e.sp=!0,!e.src)return;System.import("import:"===e.src.slice(0,7)?e.src.slice(7):n(e.src,v))}else"systemjs-importmap"===e.type&&(e.sp=!0,M=M.then((function(t){return e.src?fetch(e.src).then((function(e){return e.text()})).then((function(n){return p(t,n,e.src)})):p(t,e.innerHTML,v)})))}))}function p(t,o,u){try{var c=JSON.parse(o)}catch(s){throw Error(e(1,"systemjs-importmap contains invalid JSON"))}return function(e,t,o){var u={imports:r({},o.imports),scopes:r({},o.scopes),depcache:r({},o.depcache)};if(e.imports&&i(e.imports,u.imports,t,o,null),e.scopes)for(var c in e.scopes){var s=n(c,t);i(e.scopes[c],u.scopes[s]||(u.scopes[s]={}),t,o,s)}if(e.depcache)for(var a in e.depcache){var f=n(a,t);u.depcache[f]=e.depcache[a]}return u}(c,u,t)}var v,m="undefined"!=typeof Symbol,g="undefined"!=typeof self,y="undefined"!=typeof document,b=g?self:global;if(y){var E=document.querySelector("base[href]");E&&(v=E.href)}if(!v&&"undefined"!=typeof location){var S=(v=location.href.split("#")[0].split("?")[0]).lastIndexOf("/");-1!==S&&(v=v.slice(0,S+1))}var x,O=m?Symbol():"#",w=m&&Symbol.toStringTag,j=m?Symbol():"@",P=a.prototype;P.import=function(e,t){var n=this;return Promise.resolve(n.prepareImport()).then((function(){return n.resolve(e,t)})).then((function(e){var t=d(n,e);return t.C||function(e,t){return t.C=function e(t,n,r){if(!r[n.id])return r[n.id]=!0,Promise.resolve(n.L).then((function(){return Promise.all(n.d.map((function(n){return e(t,n,r)})))}))}(e,t,{}).then((function(){return function e(t,n,r){function i(){try{var e=n.e.call(L);if(e)return e=e.then((function(){n.C=n.n,n.E=null,l(t,n,null,!0)}),(function(e){n.er=e,n.E=null,l(t,n,e,!0)})),n.E=n.E||e;n.C=n.n,l(t,n,null,!0)}catch(r){n.er=r,l(t,n,r,!0)}finally{n.L=n.I=void 0,n.e=null}}if(!r[n.id]){if(r[n.id]=!0,!n.e){if(n.er)throw n.er;return n.E?n.E:void 0}var o;return n.d.forEach((function(i){try{var u=e(t,i,r);u&&(o=o||[]).push(u)}catch(c){n.e=null,n.er=c,l(t,n,c,!1)}})),o?Promise.all(o).then(i,(function(e){n.e=null,n.er=e,l(t,n,e,!1)})):i()}}(e,t,{})})).then((function(){return t.n}))}(n,t)}))},P.createContext=function(e){return{url:e}},P.onload=function(){},P.register=function(e,t){x=[e,t]},P.getRegister=function(){var e=x;return x=void 0,e};var C,I,L=Object.freeze(Object.create(null));b.System=new a,P.createScript=function(e){var t=document.createElement("script");return t.charset="utf-8",t.async=!0,t.crossOrigin="anonymous",t.src=e,t},P.instantiate=function(t,n){var r=this;return new Promise((function(i,o){var u=P.createScript(t);u.addEventListener("error",(function(){o(Error(e(3,"Error loading "+t+(n?" from "+n:""))))})),u.addEventListener("load",(function(){document.head.removeChild(u),C===t?o(I):i(r.getRegister())})),document.head.appendChild(u)}))},y&&window.addEventListener("error",(function(e){C=e.filename,I=e.error})),P.resolve=function(n,r){return s(this[O],t(n,r=r||v)||n,r)||function(t,n){throw Error(e(8,"Unable to resolve bare specifier '"+t+(n?"' from "+n:"'")))}(n,r)};var M=Promise.resolve({imports:{},scopes:{},depcache:{}}),W=y;P.prepareImport=function(e){(W||e)&&(h(),W=!1);var t=this;return M.then((function(e){t[O]=e}))},y&&(h(),window.addEventListener("DOMContentLoaded",h));const A=P.instantiate;P.instantiate=function(e,t){var n=this[O].depcache[e];if(n)for(var r=0;n.length>r;r++)d(this,this.resolve(n[r],e),e);return A.call(this,e,t)};var R={},T=P.register;P.register=function(e,t){if(y&&"loading"===document.readyState&&"string"!=typeof e){var n=document.getElementsByTagName("script"),r=n[n.length-1];if(r&&r.src)return void(this[j][r.src]||(R[r.src]=[e,t],this.import(r.src)))}return T.call(this,e,t)};var _=P.instantiate;P.instantiate=function(e){var t=R[e];return t?(delete R[e],t):_.apply(this,arguments)},g&&"function"==typeof importScripts&&(P.instantiate=function(e){var t=this;return Promise.resolve().then((function(){return importScripts(e),t.getRegister()}))}),function(e){function t(t){return!e.hasOwnProperty(t)||!isNaN(t)&&e.length>t||a&&e[t]&&"undefined"!=typeof window&&e[t].parent===window}var n,r,i,o=e.System.constructor.prototype,u=o.import;o.import=function(o,c){return function(){for(var o in n=r=void 0,e)t(o)||(n?r||(r=o):n=o,i=o)}(),u.call(this,o,c)};var c=[[],function(){return{}}],s=o.getRegister;o.getRegister=function(){var o=s.call(this);if(o)return o;var u,a=function(){var o,u=0;for(var c in e)if(!t(c)){if(0===u&&c!==n||1===u&&c!==r)return c;u++,o=c}if(o!==i)return o}();if(!a)return c;try{u=e[a]}catch(f){return c}return[[],function(e){return{execute:function(){e({default:u,__useDefault:!0})}}}]};var a="undefined"!=typeof navigator&&-1!==navigator.userAgent.indexOf("Trident")}("undefined"!=typeof self?self:global),function(t){var n=t.System.constructor.prototype,r=n.instantiate;n.shouldFetch=function(e){var t=e.split("?")[0].split("#")[0];return t.slice(t.lastIndexOf(".")).match(/\.(css|html|json|wasm)$/)},n.fetch=function(e){return fetch(e)},n.instantiate=function(t,n){var i=this;return this.shouldFetch(t)?this.fetch(t).then((function(r){if(!r.ok)throw Error(e(7,r.status+" "+r.statusText+", loading "+t+(n?" from "+n:"")));var o=r.headers.get("content-type");if(!o)throw Error(e(4,'Missing header "Content-Type", loading '+t+(n?" from "+n:"")));if(o.match(/^(text|application)\/(x-)?javascript(;|$)/))return r.text().then((function(e){return(0,eval)(e),i.getRegister()}));if(o.match(/^application\/json(;|$)/))return r.text().then((function(e){return[[],function(t){return{execute:function(){t("default",JSON.parse(e))}}}]}));if(o.match(/^text\/css(;|$)/))return r.text().then((function(e){return[[],function(t){return{execute:function(){var n=new CSSStyleSheet;n.replaceSync(e),t("default",n)}}}]}));if(o.match(/^application\/wasm(;|$)/))return(WebAssembly.compileStreaming?WebAssembly.compileStreaming(r):r.arrayBuffer().then(WebAssembly.compile)).then((function(e){var t=[],n=[],r={};return WebAssembly.Module.imports&&WebAssembly.Module.imports(e).forEach((function(e){var i=e.module;-1===t.indexOf(i)&&(t.push(i),n.push((function(e){r[i]=e})))})),[t,function(t){return{setters:n,execute:function(){return WebAssembly.instantiate(e,r).then((function(e){t(e.exports)}))}}}]}));throw Error(e(4,'Unknown module type "'+o+'"'))})):r.apply(this,arguments)}}("undefined"!=typeof self?self:global);var N="undefined"!=typeof Symbol&&Symbol.toStringTag;P.get=function(e){var t=this[j][e];if(t&&null===t.e&&!t.E)return t.er?null:t.n},P.set=function(t,n){try{new URL(t)}catch(u){console.warn(Error(e("W3",'"'+t+'" is not a valid URL to set in the module registry')))}var r;N&&"Module"===n[N]?r=n:(r=Object.assign(Object.create(null),n),N&&Object.defineProperty(r,N,{value:"Module"}));var i=Promise.resolve(r),o=this[j][t]||(this[j][t]={id:t,i:[],h:!1,d:[],e:null,er:void 0,E:void 0});return!o.e&&!o.E&&(Object.assign(o,{n:r,I:void 0,L:void 0,C:i}),r)},P.has=function(e){return!!this[j][e]},P.delete=function(e){var t=this[j],n=t[e];if(!n||null!==n.e||n.E)return!1;var r=n.i;return n.d&&n.d.forEach((function(e){var t=e.i.indexOf(n);-1!==t&&e.i.splice(t,1)})),delete t[e],function(){var n=t[e];if(!n||!r||null!==n.e||n.E)return!1;r.forEach((function(e){n.i.push(e),e(n.n)})),r=null}};var J="undefined"!=typeof Symbol&&Symbol.iterator;P.entries=function(){var e,t,n=this,r=Object.keys(n[j]),i=0,o={next:function(){for(;void 0!==(t=r[i++])&&void 0===(e=n.get(t)););return{done:void 0===t,value:void 0!==t&&[t,e]}}};return o[J]=function(){return this},o}}(); | ||
!function(){function e(e,t){return(t||"")+" (SystemJS Error#"+e+" https://git.io/JvFET#"+e+")"}function t(e,t){if(-1!==e.indexOf("\\")&&(e=e.replace(/\\/g,"/")),"/"===e[0]&&"/"===e[1])return t.slice(0,t.indexOf(":")+1)+e;if("."===e[0]&&("/"===e[1]||"."===e[1]&&("/"===e[2]||2===e.length&&(e+="/"))||1===e.length&&(e+="/"))||"/"===e[0]){var n,r=t.slice(0,t.indexOf(":")+1);if(n="/"===t[r.length+1]?"file:"!==r?(n=t.slice(r.length+2)).slice(n.indexOf("/")+1):t.slice(8):t.slice(r.length+("/"===t[r.length])),"/"===e[0])return t.slice(0,t.length-n.length-1)+e;for(var i=n.slice(0,n.lastIndexOf("/")+1)+e,o=[],u=-1,c=0;i.length>c;c++)-1!==u?"/"===i[c]&&(o.push(i.slice(u,c+1)),u=-1):"."===i[c]?"."!==i[c+1]||"/"!==i[c+2]&&c+2!==i.length?"/"===i[c+1]||c+1===i.length?c+=1:u=c:(o.pop(),c+=2):u=c;return-1!==u&&o.push(i.slice(u)),t.slice(0,t.length-n.length)+o.join("")}}function n(e,n){return t(e,n)||(-1!==e.indexOf(":")?e:t("./"+e,n))}function r(e,t){for(var n in t)e[n]=t[n];return e}function i(e,n,r,i,o){for(var u in e){var a=t(u,r)||u,f=e[u];if("string"==typeof f){var l=s(i,t(f,r)||f,o);l?n[a]=l:c("W1",u,f,"bare specifier did not resolve")}}}function o(e,t){if(t[e])return e;var n=e.length;do{var r=e.slice(0,n+1);if(r in t)return r}while(-1!==(n=e.lastIndexOf("/",n-1)))}function u(e,t){var n=o(e,t);if(n){var r=t[n];if(null===r)return;if(n.length>=e.length||"/"===r[r.length-1])return r+e.slice(n.length);c("W2",n,r,"should have a trailing '/'")}}function c(t,n,r,i){console.warn(e(t,"Package target "+i+", resolving target '"+r+"' for "+n))}function s(e,t,n){for(var r=e.scopes,i=n&&o(n,r);i;){var c=u(t,r[i]);if(c)return c;i=o(i.slice(0,i.lastIndexOf("/")),r)}return u(t,e.imports)||-1!==t.indexOf(":")&&t}function a(){this[j]={}}function f(e){return e.id}function l(e,t,n,r){if(e.onload(n,t.id,t.d&&t.d.map(f),!!r),n)throw n}function d(t,n,r){var i=t[j][n];if(i)return i;var o=[],u=Object.create(null);w&&Object.defineProperty(u,w,{value:"Module"});var c=Promise.resolve().then((function(){return t.instantiate(n,r)})).then((function(r){if(!r)throw Error(e(2,"Module "+n+" did not instantiate"));var c=r[1]((function(e,t){i.h=!0;var n=!1;if("object"!=typeof e)e in u&&u[e]===t||(u[e]=t,n=!0);else{for(var r in e)t=e[r],r in u&&u[r]===t||(u[r]=t,n=!0);e.__esModule&&(u.__esModule=e.__esModule)}if(n)for(var c=0;o.length>c;c++){var s=o[c];s&&s(u)}return t}),2===r[1].length?{import:function(e){return t.import(e,n)},meta:t.createContext(n)}:void 0);return i.e=c.execute||function(){},[r[0],c.setters||[]]})),s=(c=c.catch((function(e){l(t,i,e,!0)}))).then((function(e){return Promise.all(e[0].map((function(r,i){var o=e[1][i];return Promise.resolve(t.resolve(r,n)).then((function(e){var r=d(t,e,n);return Promise.resolve(r.I).then((function(){return o&&(r.i.push(o),!r.h&&r.I||o(r.n)),r}))}))}))).then((function(e){i.d=e}),(function(e){l(t,i,e,!1)}))}));return s.catch((function(e){i.e=null,i.er=e})),i=t[j][n]={id:n,i:o,n:u,I:c,L:s,h:!1,d:void 0,e:void 0,er:void 0,E:void 0,C:void 0}}function h(){[].forEach.call(document.querySelectorAll("script"),(function(e){if(!e.sp)if("systemjs-module"===e.type){if(e.sp=!0,!e.src)return;System.import("import:"===e.src.slice(0,7)?e.src.slice(7):n(e.src,p))}else"systemjs-importmap"===e.type&&(e.sp=!0,N=N.then((function(t){return e.src?fetch(e.src).then((function(e){return e.text()})).then((function(n){return v(t,n,e.src)})):v(t,e.innerHTML,p)})))}))}function v(t,o,u){try{var c=JSON.parse(o)}catch(s){throw Error(e(1,"systemjs-importmap contains invalid JSON"))}return function(e,t,o){var u={imports:r({},o.imports),scopes:r({},o.scopes),depcache:r({},o.depcache)};if(e.imports&&i(e.imports,u.imports,t,o,null),e.scopes)for(var c in e.scopes){var s=n(c,t);i(e.scopes[c],u.scopes[s]||(u.scopes[s]={}),t,o,s)}if(e.depcache)for(var a in e.depcache){var f=n(a,t);u.depcache[f]=e.depcache[a]}return u}(c,u,t)}var p,m="undefined"!=typeof Symbol,g="undefined"!=typeof self,y="undefined"!=typeof document,b=g?self:global;if(y){var E=document.querySelector("base[href]");E&&(p=E.href)}if(!p&&"undefined"!=typeof location){var S=(p=location.href.split("#")[0].split("?")[0]).lastIndexOf("/");-1!==S&&(p=p.slice(0,S+1))}var x,O=m?Symbol():"#",w=m&&Symbol.toStringTag,j=m?Symbol():"@",P=a.prototype;P.import=function(e,t){var n=this;return Promise.resolve(n.prepareImport()).then((function(){return n.resolve(e,t)})).then((function(e){var t=d(n,e);return t.C||function(e,t){return t.C=function e(t,n,r){if(!r[n.id])return r[n.id]=!0,Promise.resolve(n.L).then((function(){return Promise.all(n.d.map((function(n){return e(t,n,r)})))}))}(e,t,{}).then((function(){return function e(t,n,r){function i(){try{var e=n.e.call(L);if(e)return e=e.then((function(){n.C=n.n,n.E=null,l(t,n,null,!0)}),(function(e){n.er=e,n.E=null,l(t,n,e,!0)})),n.E=n.E||e;n.C=n.n,l(t,n,null,!0)}catch(r){n.er=r,l(t,n,r,!0)}finally{n.L=n.I=void 0,n.e=null}}if(!r[n.id]){if(r[n.id]=!0,!n.e){if(n.er)throw n.er;return n.E?n.E:void 0}var o;return n.d.forEach((function(i){try{var u=e(t,i,r);u&&(o=o||[]).push(u)}catch(c){n.e=null,n.er=c,l(t,n,c,!1)}})),o?Promise.all(o).then(i,(function(e){n.e=null,n.er=e,l(t,n,e,!1)})):i()}}(e,t,{})})).then((function(){return t.n}))}(n,t)}))},P.createContext=function(e){return{url:e}},P.onload=function(){},P.register=function(e,t){x=[e,t]},P.getRegister=function(){var e=x;return x=void 0,e};var C,I,L=Object.freeze(Object.create(null));if(b.System=new a,y){window.addEventListener("error",(function(e){W=e.filename,T=e.error}));var M=location.origin}P.createScript=function(e){var t=document.createElement("script");return t.charset="utf-8",t.async=!0,e.startsWith(M+"/")||(t.crossOrigin="anonymous"),t.src=e,t};var W,T,A={},R=P.register,_=0;P.register=function(e,t){if(y&&"loading"===document.readyState&&"string"!=typeof e){var n=document.getElementsByTagName("script"),r=n[n.length-1],i=r&&r.src;if(i){C=i,I=e,A[i]=[e,t];var o=this;_++,setTimeout((function(){A[i]&&o.import(i),0==--_&&"loading"!==document.readyState&&(A={})}))}}else I=void 0;return R.call(this,e,t)},P.instantiate=function(t,n){var r=this,i=A[t];return i?(delete A[t],i):new Promise((function(i,o){var u=P.createScript(t);u.addEventListener("error",(function(){o(Error(e(3,"Error loading "+t+(n?" from "+n:""))))})),u.addEventListener("load",(function(){if(document.head.removeChild(u),W===t)o(T);else{var e=r.getRegister();e&&e[0]===I&&delete A[C],i(e)}})),document.head.appendChild(u)}))},P.resolve=function(n,r){return s(this[O],t(n,r=r||p)||n,r)||function(t,n){throw Error(e(8,"Unable to resolve bare specifier '"+t+(n?"' from "+n:"'")))}(n,r)};var N=Promise.resolve({imports:{},scopes:{},depcache:{}}),J=y;P.prepareImport=function(e){(J||e)&&(h(),J=!1);var t=this;return N.then((function(e){t[O]=e}))},y&&(h(),window.addEventListener("DOMContentLoaded",h));const $=P.instantiate;P.instantiate=function(e,t){var n=this[O].depcache[e];if(n)for(var r=0;n.length>r;r++)d(this,this.resolve(n[r],e),e);return $.call(this,e,t)},g&&"function"==typeof importScripts&&(P.instantiate=function(e){var t=this;return Promise.resolve().then((function(){return importScripts(e),t.getRegister()}))}),function(e){function t(t){return!e.hasOwnProperty(t)||!isNaN(t)&&e.length>t||a&&e[t]&&"undefined"!=typeof window&&e[t].parent===window}var n,r,i,o=e.System.constructor.prototype,u=o.import;o.import=function(o,c){return function(){for(var o in n=r=void 0,e)t(o)||(n?r||(r=o):n=o,i=o)}(),u.call(this,o,c)};var c=[[],function(){return{}}],s=o.getRegister;o.getRegister=function(){var o=s.call(this);if(o)return o;var u,a=function(){var o,u=0;for(var c in e)if(!t(c)){if(0===u&&c!==n||1===u&&c!==r)return c;u++,o=c}if(o!==i)return o}();if(!a)return c;try{u=e[a]}catch(f){return c}return[[],function(e){return{execute:function(){e({default:u,__useDefault:!0})}}}]};var a="undefined"!=typeof navigator&&-1!==navigator.userAgent.indexOf("Trident")}("undefined"!=typeof self?self:global),function(t){var n=t.System.constructor.prototype,r=n.instantiate;n.shouldFetch=function(e){var t=e.split("?")[0].split("#")[0];return t.slice(t.lastIndexOf(".")).match(/\.(css|html|json|wasm)$/)},n.fetch=function(e){return fetch(e)},n.instantiate=function(t,n){var i=this;return this.shouldFetch(t)?this.fetch(t).then((function(r){if(!r.ok)throw Error(e(7,r.status+" "+r.statusText+", loading "+t+(n?" from "+n:"")));var o=r.headers.get("content-type");if(!o)throw Error(e(4,'Missing header "Content-Type", loading '+t+(n?" from "+n:"")));if(o.match(/^(text|application)\/(x-)?javascript(;|$)/))return r.text().then((function(e){return(0,eval)(e),i.getRegister()}));if(o.match(/^application\/json(;|$)/))return r.text().then((function(e){return[[],function(t){return{execute:function(){t("default",JSON.parse(e))}}}]}));if(o.match(/^text\/css(;|$)/))return r.text().then((function(e){return[[],function(t){return{execute:function(){var n=new CSSStyleSheet;n.replaceSync(e),t("default",n)}}}]}));if(o.match(/^application\/wasm(;|$)/))return(WebAssembly.compileStreaming?WebAssembly.compileStreaming(r):r.arrayBuffer().then(WebAssembly.compile)).then((function(e){var t=[],n=[],r={};return WebAssembly.Module.imports&&WebAssembly.Module.imports(e).forEach((function(e){var i=e.module;-1===t.indexOf(i)&&(t.push(i),n.push((function(e){r[i]=e})))})),[t,function(t){return{setters:n,execute:function(){return WebAssembly.instantiate(e,r).then((function(e){t(e.exports)}))}}}]}));throw Error(e(4,'Unknown module type "'+o+'"'))})):r.apply(this,arguments)}}("undefined"!=typeof self?self:global);var k="undefined"!=typeof Symbol&&Symbol.toStringTag;P.get=function(e){var t=this[j][e];if(t&&null===t.e&&!t.E)return t.er?null:t.n},P.set=function(t,n){try{new URL(t)}catch(u){console.warn(Error(e("W3",'"'+t+'" is not a valid URL to set in the module registry')))}var r;k&&"Module"===n[k]?r=n:(r=Object.assign(Object.create(null),n),k&&Object.defineProperty(r,k,{value:"Module"}));var i=Promise.resolve(r),o=this[j][t]||(this[j][t]={id:t,i:[],h:!1,d:[],e:null,er:void 0,E:void 0});return!o.e&&!o.E&&(Object.assign(o,{n:r,I:void 0,L:void 0,C:i}),r)},P.has=function(e){return!!this[j][e]},P.delete=function(e){var t=this[j],n=t[e];if(!n||null!==n.e||n.E)return!1;var r=n.i;return n.d&&n.d.forEach((function(e){var t=e.i.indexOf(n);-1!==t&&e.i.splice(t,1)})),delete t[e],function(){var n=t[e];if(!n||!r||null!==n.e||n.E)return!1;r.forEach((function(e){n.i.push(e),e(n.n)})),r=null}};var U="undefined"!=typeof Symbol&&Symbol.iterator;P.entries=function(){var e,t,n=this,r=Object.keys(n[j]),i=0,o={next:function(){for(;void 0!==(t=r[i++])&&void 0===(e=n.get(t)););return{done:void 0===t,value:void 0!==t&&[t,e]}}};return o[U]=function(){return this},o}}(); | ||
//# sourceMappingURL=system.min.js.map |
{ | ||
"name": "systemjs", | ||
"version": "6.4.0", | ||
"version": "6.4.1", | ||
"main": "dist/system-node.cjs", | ||
@@ -5,0 +5,0 @@ "exports": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
449220
7949
35