Socket
Socket
Sign inDemoInstall

systemjs

Package Overview
Dependencies
Maintainers
1
Versions
236
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

systemjs - npm Package Compare versions

Comparing version 6.1.10 to 6.2.0

9

CHANGELOG.md

@@ -0,1 +1,10 @@

SystemJS 6.2.0
* Adding new createScript / fetch / shouldFetch hooks (https://github.com/systemjs/systemjs/pull/2058)
* Fixing race conditions with named register modules (https://github.com/systemjs/systemjs/pull/2114)
SystemJS 6.1.10
* Fixing bug where named AMD modules were instantiated twice (https://github.com/systemjs/systemjs/pull/2104)
* Save bytes with setTimeout (https://github.com/systemjs/systemjs/pull/2105)
* Prefer import map resolution over registryRegistry resolution (https://github.com/systemjs/systemjs/pull/2108)
SystemJS 6.1.9

@@ -2,0 +11,0 @@ * Fix bug where url query params and hash broke module type file extension check (https://github.com/systemjs/systemjs/pull/2096 @LarsDenBakker)

19

dist/extras/amd.js

@@ -86,2 +86,5 @@ /*

const _firstNamedDefine = firstNamedDefine;
firstNamedDefine = null;
const register = getRegister.call(this);

@@ -92,14 +95,15 @@ // if its an actual System.register leave it

const _amdDefineDeps = amdDefineDeps;
amdDefineDeps = null;
// If the script registered a named module, return that module instead of re-instantiating it.
if (firstNamedDefine)
return firstNamedDefine;
if (_firstNamedDefine)
return _firstNamedDefine;
// otherwise AMD takes priority
// no registration -> attempt AMD detection
if (!amdDefineDeps)
if (!_amdDefineDeps)
return register || emptyInstantiation;
const registration = createAMDRegister(amdDefineDeps, amdDefineExec);
amdDefineDeps = null;
return registration;
return createAMDRegister(_amdDefineDeps, amdDefineExec);
};

@@ -146,5 +150,2 @@ let amdDefineDeps, amdDefineExec;

firstNamedDefine = define;
setTimeout(function () {
firstNamedDefine = null;
});
}

@@ -151,0 +152,0 @@

@@ -1,1 +0,1 @@

!function(t){const e=t.System.constructor.prototype,n=[[],function(){return{}}];function r(){throw Error("AMD require not supported.")}let o,s;function i(){}const u=["require","exports","module"];function f(t,e){const n={},o={exports:n},s=[],i=[];let u=0;for(let e=0;e<t.length;e++){const f=t[e],c=i.length;if("require"===f)s[e]=r,u++;else if("module"===f)s[e]=o,u++;else if("exports"===f)s[e]=n,u++;else{const t=e;i.push(function(e){s[t]=e.__useDefault?e.default:e})}u&&(t[c]=f)}u&&(t.length-=u);const f=e;return[t,function(t){return t({default:n,__useDefault:!0}),{setters:i,execute:function(){o.exports=f.apply(n,s)||o.exports,n!==o.exports&&t("default",o.exports)}}}]}let c;const l=e.register;e.register=function(t,e,n){c="string"==typeof t?n:e,l.apply(this,arguments)};const p=e.instantiate;e.instantiate=function(){return a=null,p.apply(this,arguments)};const g=e.getRegister;let a,y;function d(t,e){s||(s=e,setTimeout(function(){s=null})),o=e,System.registerRegistry[t]=System.getRegister(),o=null}e.getRegister=function(){if(o)return o;const t=g.call(this);if(t&&t[1]===c)return t;if(s)return s;if(!a)return t||n;const e=f(a,y);return a=null,e},t.define=function(t,e,n){if("string"==typeof t){if(a){if(!System.registerRegistry)throw Error("Include the named register extension for SystemJS named AMD support.");return d(t,f(e,n)),a=[],void(y=i)}System.registerRegistry&&d(t,f([].concat(e),n)),t=e,e=n}t instanceof Array?(a=t,y=e):"object"==typeof t?(a=[],y=function(){return t}):"function"==typeof t&&(a=u,y=t)},t.define.amd={}}("undefined"!=typeof self?self:global);
!function(t){const e=t.System.constructor.prototype,n=[[],function(){return{}}];function r(){throw Error("AMD require not supported.")}let o,s;function i(){}const u=["require","exports","module"];function f(t,e){const n={},o={exports:n},s=[],i=[];let u=0;for(let e=0;e<t.length;e++){const f=t[e],c=i.length;if("require"===f)s[e]=r,u++;else if("module"===f)s[e]=o,u++;else if("exports"===f)s[e]=n,u++;else{const t=e;i.push(function(e){s[t]=e.__useDefault?e.default:e})}u&&(t[c]=f)}u&&(t.length-=u);const f=e;return[t,function(t){return t({default:n,__useDefault:!0}),{setters:i,execute:function(){o.exports=f.apply(n,s)||o.exports,n!==o.exports&&t("default",o.exports)}}}]}let c;const l=e.register;e.register=function(t,e,n){c="string"==typeof t?n:e,l.apply(this,arguments)};const p=e.instantiate;e.instantiate=function(){return a=null,p.apply(this,arguments)};const g=e.getRegister;let a,y;function d(t,e){s||(s=e),o=e,System.registerRegistry[t]=System.getRegister(),o=null}e.getRegister=function(){if(o)return o;const t=s;s=null;const e=g.call(this);if(e&&e[1]===c)return e;const r=a;return a=null,t||(r?f(r,y):e||n)},t.define=function(t,e,n){if("string"==typeof t){if(a){if(!System.registerRegistry)throw Error("Include the named register extension for SystemJS named AMD support.");return d(t,f(e,n)),a=[],void(y=i)}System.registerRegistry&&d(t,f([].concat(e),n)),t=e,e=n}t instanceof Array?(a=t,y=e):"object"==typeof t?(a=[],y=function(){return t}):"function"==typeof t&&(a=u,y=t)},t.define.amd={}}("undefined"!=typeof self?self:global);

@@ -9,90 +9,90 @@ /*

systemJSPrototype.instantiate = function (url, parent) {
const loader = this;
const moduleTypesRegEx = /\.(css|html|json|wasm)$/;
systemJSPrototype.shouldFetch = function (url) {
const path = url.split('?')[0].split('#')[0];
const ext = path.slice(path.lastIndexOf('.'));
return ext.match(moduleTypesRegEx);
}
systemJSPrototype.fetch = function (url) {
return fetch(url);
};
switch (ext) {
case '.css':
return loadDynamicModule(function (_export, source) {
// Relies on a Constructable Stylesheet polyfill
const stylesheet = new CSSStyleSheet();
stylesheet.replaceSync(source);
_export('default', stylesheet);
});
case '.html':
return getSourceRes().then(function (res) {
return maybeJSFallback(res) || loadError("'.html' modules not implemented");
});
case '.json':
return loadDynamicModule(function (_export, source) {
_export('default', JSON.parse(source));
});
case '.wasm':
return getSourceRes().then(function (res) {
return maybeJSFallback(res) ||
(WebAssembly.compileStreaming ? WebAssembly.compileStreaming(res) : res.arrayBuffer().then(WebAssembly.compile));
})
.then(function (module) {
const deps = [];
const setters = [];
const importObj = {};
// we can only set imports if supported (eg early Safari doesnt support)
if (WebAssembly.Module.imports)
WebAssembly.Module.imports(module).forEach(function (impt) {
const key = impt.module;
if (deps.indexOf(key) === -1) {
deps.push(key);
setters.push(function (m) {
importObj[key] = m;
});
}
});
return [deps, function (_export) {
return {
setters: setters,
execute: function () {
return WebAssembly.instantiate(module, importObj)
.then(function (instance) {
_export(instance.exports);
});
}
};
}];
});
}
return instantiate.apply(this, arguments);
function getSourceRes () {
return fetch(url).then(function (res) {
systemJSPrototype.instantiate = function (url, parent) {
const loader = this;
if (this.shouldFetch(url)) {
return this.fetch(url)
.then(function (res) {
if (!res.ok)
loadError(res.status + ' ' + res.statusText);
return res;
throw Error(res.status + ' ' + res.statusText + ', loading ' + url + (parent ? ' from ' + parent : ''));
const contentType = res.headers.get('content-type');
if (contentType.match(/^(text|application)\/(x-)?javascript(;|$)/)) {
return res.text().then(function (source) {
(0, eval)(source);
return loader.getRegister();
});
}
else if (contentType.match(/^application\/json(;|$)/)) {
return res.text().then(function (source) {
return [[], function (_export) {
return {
execute: function () {
_export('default', JSON.parse(source));
}
};
}];
});
}
else if (contentType.match(/^text\/css(;|$)/)) {
return res.text().then(function (source) {
return [[], function (_export) {
return {
execute: function () {
// Relies on a Constructable Stylesheet polyfill
const stylesheet = new CSSStyleSheet();
stylesheet.replaceSync(source);
_export('default', stylesheet);
}
};
}];
});
}
else if (contentType.match(/^application\/wasm(;|$)/)) {
return (WebAssembly.compileStreaming ? WebAssembly.compileStreaming(res) : res.arrayBuffer().then(WebAssembly.compile))
.then(function (module) {
const deps = [];
const setters = [];
const importObj = {};
// we can only set imports if supported (eg early Safari doesnt support)
if (WebAssembly.Module.imports)
WebAssembly.Module.imports(module).forEach(function (impt) {
const key = impt.module;
if (deps.indexOf(key) === -1) {
deps.push(key);
setters.push(function (m) {
importObj[key] = m;
});
}
});
return [deps, function (_export) {
return {
setters: setters,
execute: function () {
return WebAssembly.instantiate(module, importObj)
.then(function (instance) {
_export(instance.exports);
});
}
};
}];
});
}
else {
throw new Error('Unknown module type "' + contentType + '"');
}
});
}
function maybeJSFallback (res) {
const contentType = res.headers.get('content-type');
// if the resource is sent as application/javascript, support eval-based execution
if (contentType && contentType.match(/^application\/javascript(;|$)/)) {
return res.text().then(function (source) {
(0, eval)(source);
return loader.getRegister();
});
}
}
function loadDynamicModule (createExec) {
return getSourceRes().then(function (res) {
return maybeJSFallback(res) || res.text().then(function (source) {
return [[], function (_export) {
return { execute: createExec(_export, source) };
}];
});
});
}
function loadError (msg) {
throw Error(msg + ', loading ' + url + (parent ? ' from ' + parent : ''));
}
return instantiate.apply(this, arguments);
};
})(typeof self !== 'undefined' ? self : global);

@@ -1,1 +0,1 @@

!function(t){const e=t.System.constructor.prototype,n=e.instantiate;e.instantiate=function(t,e){const r=this,s=t.split("?")[0].split("#")[0];switch(s.slice(s.lastIndexOf("."))){case".css":return c(function(t,e){const n=new CSSStyleSheet;n.replaceSync(e),t("default",n)});case".html":return u().then(function(t){return o(t)||i("'.html' modules not implemented")});case".json":return c(function(t,e){t("default",JSON.parse(e))});case".wasm":return u().then(function(t){return o(t)||(WebAssembly.compileStreaming?WebAssembly.compileStreaming(t):t.arrayBuffer().then(WebAssembly.compile))}).then(function(t){const e=[],n=[],r={};return WebAssembly.Module.imports&&WebAssembly.Module.imports(t).forEach(function(t){const s=t.module;-1===e.indexOf(s)&&(e.push(s),n.push(function(t){r[s]=t}))}),[e,function(e){return{setters:n,execute:function(){return WebAssembly.instantiate(t,r).then(function(t){e(t.exports)})}}}]})}return n.apply(this,arguments);function u(){return fetch(t).then(function(t){return t.ok||i(t.status+" "+t.statusText),t})}function o(t){const e=t.headers.get("content-type");if(e&&e.match(/^application\/javascript(;|$)/))return t.text().then(function(t){return(0,eval)(t),r.getRegister()})}function c(t){return u().then(function(e){return o(e)||e.text().then(function(e){return[[],function(n){return{execute:t(n,e)}}]})})}function i(n){throw Error(n+", loading "+t+(e?" from "+e:""))}}}("undefined"!=typeof self?self:global);
!function(t){const e=t.System.constructor.prototype,n=e.instantiate,s=/\.(css|html|json|wasm)$/;e.shouldFetch=function(t){const e=t.split("?")[0].split("#")[0];return e.slice(e.lastIndexOf(".")).match(s)},e.fetch=function(t){return fetch(t)},e.instantiate=function(t,e){const s=this;return this.shouldFetch(t)?this.fetch(t).then(function(n){if(!n.ok)throw Error(n.status+" "+n.statusText+", loading "+t+(e?" from "+e:""));const o=n.headers.get("content-type");if(o.match(/^(text|application)\/(x-)?javascript(;|$)/))return n.text().then(function(t){return(0,eval)(t),s.getRegister()});if(o.match(/^application\/json(;|$)/))return n.text().then(function(t){return[[],function(e){return{execute:function(){e("default",JSON.parse(t))}}}]});if(o.match(/^text\/css(;|$)/))return n.text().then(function(t){return[[],function(e){return{execute:function(){const n=new CSSStyleSheet;n.replaceSync(t),e("default",n)}}}]});if(o.match(/^application\/wasm(;|$)/))return(WebAssembly.compileStreaming?WebAssembly.compileStreaming(n):n.arrayBuffer().then(WebAssembly.compile)).then(function(t){const e=[],n=[],s={};return WebAssembly.Module.imports&&WebAssembly.Module.imports(t).forEach(function(t){const o=t.module;-1===e.indexOf(o)&&(e.push(o),n.push(function(t){s[o]=t}))}),[e,function(e){return{setters:n,execute:function(){return WebAssembly.instantiate(t,s).then(function(t){e(t.exports)})}}}]});throw new Error('Unknown module type "'+o+'"')}):n.apply(this,arguments)}}("undefined"!=typeof self?self:global);

@@ -38,3 +38,2 @@ /*

firstNamedDefine = define;
setTimeout(clearFirstNamedDefine);
}

@@ -63,4 +62,9 @@ return register.apply(this, arguments);

systemJSPrototype.getRegister = function () {
return firstNamedDefine || getRegister.call(this);
// Calling getRegister() because other extras need to know it was called so they can perform side effects
const register = getRegister.call(this);
const result = firstNamedDefine || register;
firstNamedDefine = null;
return result;
}
})(typeof self !== 'undefined' ? self : global);

@@ -1,1 +0,1 @@

!function(t){const e=t.System;c(e);const r=e.constructor.prototype,n=e.constructor,s=function(){n.call(this),c(this)};let i;function o(){i=null}function c(t){t.registerRegistry=Object.create(null)}s.prototype=r,e.constructor=s;const l=r.register;r.register=function(t,e,r){if("string"!=typeof t)return l.apply(this,arguments);const n=[e,r];return this.registerRegistry[t]=n,i||(i=n,setTimeout(o)),l.apply(this,arguments)};const u=r.resolve;r.resolve=function(t,e){try{return u.call(this,t,e)}catch(e){if(t in this.registerRegistry)return t;throw e}};const g=r.instantiate;r.instantiate=function(t,e){return this.registerRegistry[t]||g.call(this,t,e)};const f=r.getRegister;r.getRegister=function(){return i||f.call(this)}}("undefined"!=typeof self?self:global);
!function(t){const e=t.System;o(e);const r=e.constructor.prototype,n=e.constructor,s=function(){n.call(this),o(this)};let i;function o(t){t.registerRegistry=Object.create(null)}s.prototype=r,e.constructor=s;const c=r.register;r.register=function(t,e,r){if("string"!=typeof t)return c.apply(this,arguments);const n=[e,r];return this.registerRegistry[t]=n,i||(i=n),c.apply(this,arguments)};const l=r.resolve;r.resolve=function(t,e){try{return l.call(this,t,e)}catch(e){if(t in this.registerRegistry)return t;throw e}};const u=r.instantiate;r.instantiate=function(t,e){return this.registerRegistry[t]||u.call(this,t,e)};const g=r.getRegister;r.getRegister=function(){const t=g.call(this),e=i||t;return i=null,e}}("undefined"!=typeof self?self:global);
/*
* SJS 6.1.10
* SJS 6.2.0
* Minimal SystemJS Build

@@ -395,29 +395,31 @@ */

systemJSPrototype.createScript = function (url) {
const script = document.createElement('script');
script.charset = 'utf-8';
script.async = true;
script.crossOrigin = 'anonymous';
script.src = url;
return script;
};
let lastWindowErrorUrl, lastWindowError;
if (hasDocument)
window.addEventListener('error', function (evt) {
lastWindowErrorUrl = evt.filename;
lastWindowError = evt.error;
});
systemJSPrototype.instantiate = function (url, firstParentUrl) {
const loader = this;
return new Promise(function (resolve, reject) {
let err;
function windowErrorListener(evt) {
if (evt.filename === url)
err = evt.error;
}
window.addEventListener('error', windowErrorListener);
const script = document.createElement('script');
script.charset = 'utf-8';
script.async = true;
script.crossOrigin = 'anonymous';
const script = systemJSPrototype.createScript(url);
script.addEventListener('error', function () {
window.removeEventListener('error', windowErrorListener);
reject(Error('Error loading ' + url + (firstParentUrl ? ' from ' + firstParentUrl : '')));
});
script.addEventListener('load', function () {
window.removeEventListener('error', windowErrorListener);
document.head.removeChild(script);
// Note that if an error occurs that isn't caught by this if statement,
// that getRegister will return null and a "did not instantiate" error will be thrown.
if (err) {
reject(err);
if (lastWindowErrorUrl === url) {
reject(lastWindowError);
}

@@ -428,3 +430,2 @@ else {

});
script.src = url;
document.head.appendChild(script);

@@ -431,0 +432,0 @@ });

@@ -1,1 +0,1 @@

!function(){const e="undefined"!=typeof self,t="undefined"!=typeof document,n=e?self:global;let r;if(t){const e=document.querySelector("base[href]");e&&(r=e.href)}if(!r&&"undefined"!=typeof location){const e=(r=location.href.split("#")[0].split("?")[0]).lastIndexOf("/");-1!==e&&(r=r.slice(0,e+1))}const o=/\\/g;function i(e,t){if(-1!==e.indexOf("\\")&&(e=e.replace(o,"/")),"/"===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]){const n=t.slice(0,t.indexOf(":")+1);let r;if(r="/"===t[n.length+1]?"file:"!==n?(r=t.slice(n.length+2)).slice(r.indexOf("/")+1):t.slice(8):t.slice(n.length+("/"===t[n.length])),"/"===e[0])return t.slice(0,t.length-r.length-1)+e;const o=r.slice(0,r.lastIndexOf("/")+1)+e,i=[];let c=-1;for(let e=0;e<o.length;e++)-1!==c?"/"===o[e]&&(i.push(o.slice(c,e+1)),c=-1):"."===o[e]?"."!==o[e+1]||"/"!==o[e+2]&&e+2!==o.length?"/"===o[e+1]||e+1===o.length?e+=1:c=e:(i.pop(),e+=2):c=e;return-1!==c&&i.push(o.slice(c)),t.slice(0,t.length-r.length)+i.join("")}}const c="undefined"!=typeof Symbol,s=c&&Symbol.toStringTag,l=c?Symbol():"@";function u(){this[l]={}}const f=u.prototype;let d;f.prepareImport=function(){},f.import=function(e,t){const n=this;return Promise.resolve(n.prepareImport()).then(function(){return n.resolve(e,t)}).then(function(e){const t=function e(t,n,r){let o=t[l][n];if(o)return o;const i=[],c=Object.create(null);s&&Object.defineProperty(c,s,{value:"Module"});let u=Promise.resolve().then(function(){return t.instantiate(n,r)}).then(function(e){if(!e)throw Error("Module "+n+" did not instantiate");const r=e[1](function(e,t){o.h=!0;let n=!1;if("object"!=typeof e)e in c&&c[e]===t||(c[e]=t,n=!0);else{for(let t in e){let r=e[t];t in c&&c[t]===r||(c[t]=r,n=!0)}e.__esModule&&(c.__esModule=e.__esModule)}if(n)for(let e=0;e<i.length;e++)i[e](c);return t},2===e[1].length?{import:function(e){return t.import(e,n)},meta:t.createContext(n)}:void 0);return o.e=r.execute||function(){},[e[0],r.setters||[]]});const f=u.then(function(r){return Promise.all(r[0].map(function(o,i){const c=r[1][i];return Promise.resolve(t.resolve(o,n)).then(function(r){const o=e(t,r,n);return Promise.resolve(o.I).then(function(){return c&&(o.i.push(c),!o.h&&o.I||c(o.n)),o})})})).then(function(e){o.d=e})});return f.catch(function(e){o.e=null,o.er=e}),o=t[l][n]={id:n,i:i,n:c,I:u,L:f,h:!1,d:void 0,e:void 0,er:void 0,E:void 0,C:void 0}}(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){if(r[n.id])return;if(r[n.id]=!0,!n.e){if(n.er)throw n.er;return n.E?n.E:void 0}let o;return n.d.forEach(function(n){{const i=e(t,n,r);i&&(o=o||[]).push(i)}}),o?Promise.all(o).then(i):i();function i(){try{let e=n.e.call(h);if(e)return e=e.then(function(){n.C=n.n,n.E=null}),n.E=n.E||e;n.C=n.n}catch(e){throw n.er=e,e}finally{n.L=n.I=void 0,n.e=null}}}(e,t,{})}).then(function(){return t.n})}(n,t)})},f.createContext=function(e){return{url:e}},f.register=function(e,t){d=[e,t]},f.getRegister=function(){const e=d;return d=void 0,e};const h=Object.freeze(Object.create(null));n.System=new u;const a=f.register;function m(){Array.prototype.forEach.call(document.querySelectorAll("script[type=systemjs-module]"),function(e){var t,n;e.src&&System.import("import:"===e.src.slice(0,7)?e.src.slice(7):i(t=e.src,n=r)||(-1!==t.indexOf(":")?t:i("./"+t,n)))})}f.register=function(e,t){a.call(this,e,t)},f.instantiate=function(e,t){const n=this;return new Promise(function(r,o){let i;function c(t){t.filename===e&&(i=t.error)}window.addEventListener("error",c);const s=document.createElement("script");s.charset="utf-8",s.async=!0,s.crossOrigin="anonymous",s.addEventListener("error",function(){window.removeEventListener("error",c),o(Error("Error loading "+e+(t?" from "+t:"")))}),s.addEventListener("load",function(){window.removeEventListener("error",c),document.head.removeChild(s),i?o(i):r(n.getRegister())}),s.src=e,document.head.appendChild(s)})},t&&(window.addEventListener("DOMContentLoaded",m),m()),e&&"function"==typeof importScripts&&(f.instantiate=function(e){const t=this;return new Promise(function(n,r){try{importScripts(e)}catch(e){r(e)}n(t.getRegister())})}),f.resolve=function(e,t){const n=i(e,t||r);if(!n){if(-1!==e.indexOf(":"))return Promise.resolve(e);throw Error('Cannot resolve "'+e+(t?'" from '+t:'"'))}return Promise.resolve(n)}}();
!function(){const e="undefined"!=typeof self,t="undefined"!=typeof document,n=e?self:global;let r;if(t){const e=document.querySelector("base[href]");e&&(r=e.href)}if(!r&&"undefined"!=typeof location){const e=(r=location.href.split("#")[0].split("?")[0]).lastIndexOf("/");-1!==e&&(r=r.slice(0,e+1))}const o=/\\/g;function i(e,t){if(-1!==e.indexOf("\\")&&(e=e.replace(o,"/")),"/"===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]){const n=t.slice(0,t.indexOf(":")+1);let r;if(r="/"===t[n.length+1]?"file:"!==n?(r=t.slice(n.length+2)).slice(r.indexOf("/")+1):t.slice(8):t.slice(n.length+("/"===t[n.length])),"/"===e[0])return t.slice(0,t.length-r.length-1)+e;const o=r.slice(0,r.lastIndexOf("/")+1)+e,i=[];let c=-1;for(let e=0;e<o.length;e++)-1!==c?"/"===o[e]&&(i.push(o.slice(c,e+1)),c=-1):"."===o[e]?"."!==o[e+1]||"/"!==o[e+2]&&e+2!==o.length?"/"===o[e+1]||e+1===o.length?e+=1:c=e:(i.pop(),e+=2):c=e;return-1!==c&&i.push(o.slice(c)),t.slice(0,t.length-r.length)+i.join("")}}const c="undefined"!=typeof Symbol,s=c&&Symbol.toStringTag,l=c?Symbol():"@";function u(){this[l]={}}const f=u.prototype;let d;f.prepareImport=function(){},f.import=function(e,t){const n=this;return Promise.resolve(n.prepareImport()).then(function(){return n.resolve(e,t)}).then(function(e){const t=function e(t,n,r){let o=t[l][n];if(o)return o;const i=[],c=Object.create(null);s&&Object.defineProperty(c,s,{value:"Module"});let u=Promise.resolve().then(function(){return t.instantiate(n,r)}).then(function(e){if(!e)throw Error("Module "+n+" did not instantiate");const r=e[1](function(e,t){o.h=!0;let n=!1;if("object"!=typeof e)e in c&&c[e]===t||(c[e]=t,n=!0);else{for(let t in e){let r=e[t];t in c&&c[t]===r||(c[t]=r,n=!0)}e.__esModule&&(c.__esModule=e.__esModule)}if(n)for(let e=0;e<i.length;e++)i[e](c);return t},2===e[1].length?{import:function(e){return t.import(e,n)},meta:t.createContext(n)}:void 0);return o.e=r.execute||function(){},[e[0],r.setters||[]]});const f=u.then(function(r){return Promise.all(r[0].map(function(o,i){const c=r[1][i];return Promise.resolve(t.resolve(o,n)).then(function(r){const o=e(t,r,n);return Promise.resolve(o.I).then(function(){return c&&(o.i.push(c),!o.h&&o.I||c(o.n)),o})})})).then(function(e){o.d=e})});return f.catch(function(e){o.e=null,o.er=e}),o=t[l][n]={id:n,i:i,n:c,I:u,L:f,h:!1,d:void 0,e:void 0,er:void 0,E:void 0,C:void 0}}(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){if(r[n.id])return;if(r[n.id]=!0,!n.e){if(n.er)throw n.er;return n.E?n.E:void 0}let o;return n.d.forEach(function(n){{const i=e(t,n,r);i&&(o=o||[]).push(i)}}),o?Promise.all(o).then(i):i();function i(){try{let e=n.e.call(a);if(e)return e=e.then(function(){n.C=n.n,n.E=null}),n.E=n.E||e;n.C=n.n}catch(e){throw n.er=e,e}finally{n.L=n.I=void 0,n.e=null}}}(e,t,{})}).then(function(){return t.n})}(n,t)})},f.createContext=function(e){return{url:e}},f.register=function(e,t){d=[e,t]},f.getRegister=function(){const e=d;return d=void 0,e};const a=Object.freeze(Object.create(null));n.System=new u;const h=f.register;let p,m;function g(){Array.prototype.forEach.call(document.querySelectorAll("script[type=systemjs-module]"),function(e){var t,n;e.src&&System.import("import:"===e.src.slice(0,7)?e.src.slice(7):i(t=e.src,n=r)||(-1!==t.indexOf(":")?t:i("./"+t,n)))})}f.register=function(e,t){h.call(this,e,t)},f.createScript=function(e){const t=document.createElement("script");return t.charset="utf-8",t.async=!0,t.crossOrigin="anonymous",t.src=e,t},t&&window.addEventListener("error",function(e){p=e.filename,m=e.error}),f.instantiate=function(e,t){const n=this;return new Promise(function(r,o){const i=f.createScript(e);i.addEventListener("error",function(){o(Error("Error loading "+e+(t?" from "+t:"")))}),i.addEventListener("load",function(){document.head.removeChild(i),p===e?o(m):r(n.getRegister())}),document.head.appendChild(i)})},t&&(window.addEventListener("DOMContentLoaded",g),g()),e&&"function"==typeof importScripts&&(f.instantiate=function(e){const t=this;return new Promise(function(n,r){try{importScripts(e)}catch(e){r(e)}n(t.getRegister())})}),f.resolve=function(e,t){const n=i(e,t||r);if(!n){if(-1!==e.indexOf(":"))return Promise.resolve(e);throw Error('Cannot resolve "'+e+(t?'" from '+t:'"'))}return Promise.resolve(n)}}();
/*
* SystemJS 6.1.10
* SystemJS 6.2.0
*/

@@ -545,29 +545,31 @@ (function () {

systemJSPrototype.createScript = function (url) {
const script = document.createElement('script');
script.charset = 'utf-8';
script.async = true;
script.crossOrigin = 'anonymous';
script.src = url;
return script;
};
let lastWindowErrorUrl, lastWindowError;
if (hasDocument)
window.addEventListener('error', function (evt) {
lastWindowErrorUrl = evt.filename;
lastWindowError = evt.error;
});
systemJSPrototype.instantiate = function (url, firstParentUrl) {
const loader = this;
return new Promise(function (resolve, reject) {
let err;
function windowErrorListener(evt) {
if (evt.filename === url)
err = evt.error;
}
window.addEventListener('error', windowErrorListener);
const script = document.createElement('script');
script.charset = 'utf-8';
script.async = true;
script.crossOrigin = 'anonymous';
const script = systemJSPrototype.createScript(url);
script.addEventListener('error', function () {
window.removeEventListener('error', windowErrorListener);
reject(Error('Error loading ' + url + (firstParentUrl ? ' from ' + firstParentUrl : '')));
});
script.addEventListener('load', function () {
window.removeEventListener('error', windowErrorListener);
document.head.removeChild(script);
// Note that if an error occurs that isn't caught by this if statement,
// that getRegister will return null and a "did not instantiate" error will be thrown.
if (err) {
reject(err);
if (lastWindowErrorUrl === url) {
reject(lastWindowError);
}

@@ -578,3 +580,2 @@ else {

});
script.src = url;
document.head.appendChild(script);

@@ -716,89 +717,89 @@ });

systemJSPrototype.instantiate = function (url, parent) {
const loader = this;
const moduleTypesRegEx = /\.(css|html|json|wasm)$/;
systemJSPrototype.shouldFetch = function (url) {
const path = url.split('?')[0].split('#')[0];
const ext = path.slice(path.lastIndexOf('.'));
return ext.match(moduleTypesRegEx);
};
systemJSPrototype.fetch = function (url) {
return fetch(url);
};
switch (ext) {
case '.css':
return loadDynamicModule(function (_export, source) {
// Relies on a Constructable Stylesheet polyfill
const stylesheet = new CSSStyleSheet();
stylesheet.replaceSync(source);
_export('default', stylesheet);
});
case '.html':
return getSourceRes().then(function (res) {
return maybeJSFallback(res) || loadError("'.html' modules not implemented");
});
case '.json':
return loadDynamicModule(function (_export, source) {
_export('default', JSON.parse(source));
});
case '.wasm':
return getSourceRes().then(function (res) {
return maybeJSFallback(res) ||
(WebAssembly.compileStreaming ? WebAssembly.compileStreaming(res) : res.arrayBuffer().then(WebAssembly.compile));
})
.then(function (module) {
const deps = [];
const setters = [];
const importObj = {};
// we can only set imports if supported (eg early Safari doesnt support)
if (WebAssembly.Module.imports)
WebAssembly.Module.imports(module).forEach(function (impt) {
const key = impt.module;
if (deps.indexOf(key) === -1) {
deps.push(key);
setters.push(function (m) {
importObj[key] = m;
});
}
});
return [deps, function (_export) {
return {
setters: setters,
execute: function () {
return WebAssembly.instantiate(module, importObj)
.then(function (instance) {
_export(instance.exports);
});
}
};
}];
});
}
return instantiate.apply(this, arguments);
function getSourceRes () {
return fetch(url).then(function (res) {
systemJSPrototype.instantiate = function (url, parent) {
const loader = this;
if (this.shouldFetch(url)) {
return this.fetch(url)
.then(function (res) {
if (!res.ok)
loadError(res.status + ' ' + res.statusText);
return res;
throw Error(res.status + ' ' + res.statusText + ', loading ' + url + (parent ? ' from ' + parent : ''));
const contentType = res.headers.get('content-type');
if (contentType.match(/^(text|application)\/(x-)?javascript(;|$)/)) {
return res.text().then(function (source) {
(0, eval)(source);
return loader.getRegister();
});
}
else if (contentType.match(/^application\/json(;|$)/)) {
return res.text().then(function (source) {
return [[], function (_export) {
return {
execute: function () {
_export('default', JSON.parse(source));
}
};
}];
});
}
else if (contentType.match(/^text\/css(;|$)/)) {
return res.text().then(function (source) {
return [[], function (_export) {
return {
execute: function () {
// Relies on a Constructable Stylesheet polyfill
const stylesheet = new CSSStyleSheet();
stylesheet.replaceSync(source);
_export('default', stylesheet);
}
};
}];
});
}
else if (contentType.match(/^application\/wasm(;|$)/)) {
return (WebAssembly.compileStreaming ? WebAssembly.compileStreaming(res) : res.arrayBuffer().then(WebAssembly.compile))
.then(function (module) {
const deps = [];
const setters = [];
const importObj = {};
// we can only set imports if supported (eg early Safari doesnt support)
if (WebAssembly.Module.imports)
WebAssembly.Module.imports(module).forEach(function (impt) {
const key = impt.module;
if (deps.indexOf(key) === -1) {
deps.push(key);
setters.push(function (m) {
importObj[key] = m;
});
}
});
return [deps, function (_export) {
return {
setters: setters,
execute: function () {
return WebAssembly.instantiate(module, importObj)
.then(function (instance) {
_export(instance.exports);
});
}
};
}];
});
}
else {
throw new Error('Unknown module type "' + contentType + '"');
}
});
}
function maybeJSFallback (res) {
const contentType = res.headers.get('content-type');
// if the resource is sent as application/javascript, support eval-based execution
if (contentType && contentType.match(/^application\/javascript(;|$)/)) {
return res.text().then(function (source) {
(0, eval)(source);
return loader.getRegister();
});
}
}
function loadDynamicModule (createExec) {
return getSourceRes().then(function (res) {
return maybeJSFallback(res) || res.text().then(function (source) {
return [[], function (_export) {
return { execute: createExec(_export, source) };
}];
});
});
}
function loadError (msg) {
throw Error(msg + ', loading ' + url + (parent ? ' from ' + parent : ''));
}
return instantiate.apply(this, arguments);
};

@@ -805,0 +806,0 @@ })(typeof self !== 'undefined' ? self : global);

/*
* SystemJS 6.1.10
* SystemJS 6.2.0
*/
!function(){const t="undefined"!=typeof self,e="undefined"!=typeof document,n=t?self:global;let r;if(e){const t=document.querySelector("base[href]");t&&(r=t.href)}if(!r&&"undefined"!=typeof location){const t=(r=location.href.split("#")[0].split("?")[0]).lastIndexOf("/");-1!==t&&(r=r.slice(0,t+1))}const o=/\\/g;function i(t,e){if(-1!==t.indexOf("\\")&&(t=t.replace(o,"/")),"/"===t[0]&&"/"===t[1])return e.slice(0,e.indexOf(":")+1)+t;if("."===t[0]&&("/"===t[1]||"."===t[1]&&("/"===t[2]||2===t.length&&(t+="/"))||1===t.length&&(t+="/"))||"/"===t[0]){const n=e.slice(0,e.indexOf(":")+1);let r;if(r="/"===e[n.length+1]?"file:"!==n?(r=e.slice(n.length+2)).slice(r.indexOf("/")+1):e.slice(8):e.slice(n.length+("/"===e[n.length])),"/"===t[0])return e.slice(0,e.length-r.length-1)+t;const o=r.slice(0,r.lastIndexOf("/")+1)+t,i=[];let c=-1;for(let t=0;t<o.length;t++)-1!==c?"/"===o[t]&&(i.push(o.slice(c,t+1)),c=-1):"."===o[t]?"."!==o[t+1]||"/"!==o[t+2]&&t+2!==o.length?"/"===o[t+1]||t+1===o.length?t+=1:c=t:(i.pop(),t+=2):c=t;return-1!==c&&i.push(o.slice(c)),e.slice(0,e.length-r.length)+i.join("")}}function c(t,e){return i(t,e)||(-1!==t.indexOf(":")?t:i("./"+t,e))}function s(t,e){for(let n in e)t[n]=e[n];return t}function u(t,e,n,r,o){for(let c in t){const s=i(c,n)||c,u=t[c];if("string"!=typeof u)continue;const l=d(r,i(u,n)||u,o);l?e[s]=l:a(c,u,"bare specifier did not resolve")}}function l(t,e){if(e[t])return t;let n=t.length;do{const r=t.slice(0,n+1);if(r in e)return r}while(-1!==(n=t.lastIndexOf("/",n-1)))}function f(t,e){const n=l(t,e);if(n){const r=e[n];if(null===r)return;if(!(t.length>n.length&&"/"!==r[r.length-1]))return r+t.slice(n.length);a(n,r,"should have a trailing '/'")}}function a(t,e,n){console.warn("Package target "+n+", resolving target '"+e+"' for "+t)}function d(t,e,n){let r=n&&l(n,t.scopes);for(;r;){const n=f(e,t.scopes[r]);if(n)return n;r=l(r.slice(0,r.lastIndexOf("/")),t.scopes)}return f(e,t.imports)||-1!==e.indexOf(":")&&e}const h="undefined"!=typeof Symbol,p=h&&Symbol.toStringTag,m=h?Symbol():"@";function y(){this[m]={}}const g=y.prototype;function v(t){return t.id}function b(t,e,n){if(t.onload(n,e.id,e.d&&e.d.map(v)),n)throw n}let E;g.prepareImport=function(){},g.import=function(t,e){const n=this;return Promise.resolve(n.prepareImport()).then(function(){return n.resolve(t,e)}).then(function(t){const e=function t(e,n,r){let o=e[m][n];if(o)return o;const i=[],c=Object.create(null);p&&Object.defineProperty(c,p,{value:"Module"});let s=Promise.resolve().then(function(){return e.instantiate(n,r)}).then(function(t){if(!t)throw Error("Module "+n+" did not instantiate");const r=t[1](function(t,e){o.h=!0;let n=!1;if("object"!=typeof t)t in c&&c[t]===e||(c[t]=e,n=!0);else{for(let e in t){let r=t[e];e in c&&c[e]===r||(c[e]=r,n=!0)}t.__esModule&&(c.__esModule=t.__esModule)}if(n)for(let t=0;t<i.length;t++)i[t](c);return e},2===t[1].length?{import:function(t){return e.import(t,n)},meta:e.createContext(n)}:void 0);return o.e=r.execute||function(){},[t[0],r.setters||[]]});const u=(s=s.catch(function(t){b(e,o,t)})).then(function(r){return Promise.all(r[0].map(function(o,i){const c=r[1][i];return Promise.resolve(e.resolve(o,n)).then(function(r){const o=t(e,r,n);return Promise.resolve(o.I).then(function(){return c&&(o.i.push(c),!o.h&&o.I||c(o.n)),o})})})).then(function(t){o.d=t})});return u.catch(function(t){o.e=null,o.er=t}),o=e[m][n]={id:n,i:i,n:c,I:s,L:u,h:!1,d:void 0,e:void 0,er:void 0,E:void 0,C:void 0}}(n,t);return e.C||function(t,e){return e.C=function t(e,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 t(e,n,r)}))})}(t,e,{}).then(function(){return function t(e,n,r){if(r[n.id])return;if(r[n.id]=!0,!n.e){if(n.er)throw n.er;return n.E?n.E:void 0}let o;return n.d.forEach(function(i){try{const c=t(e,i,r);c&&(c.catch(function(t){b(e,n,t)}),(o=o||[]).push(c))}catch(t){b(e,n,t)}}),o?Promise.all(o).then(i):i();function i(){try{let t=n.e.call(O);if(t)return t=t.then(function(){n.C=n.n,n.E=null,b(e,n,null)},function(t){b(e,n,t)}),n.E=n.E||t;n.C=n.n,b(e,n,null)}catch(t){throw b(e,n,t),n.er=t,t}finally{n.L=n.I=void 0,n.e=null}}}(t,e,{})}).then(function(){return e.n})}(n,e)})},g.createContext=function(t){return{url:t}},g.onload=function(){},g.register=function(t,e){E=[t,e]},g.getRegister=function(){const t=E;return E=void 0,t};const O=Object.freeze(Object.create(null));n.System=new y;let w,S={imports:{},scopes:{}};e&&Array.prototype.forEach.call(document.querySelectorAll('script[type="systemjs-importmap"][src]'),function(t){t._j=fetch(t.src).then(function(t){return t.json()})}),g.prepareImport=function(){return w||(w=Promise.resolve(),e&&Array.prototype.forEach.call(document.querySelectorAll('script[type="systemjs-importmap"]'),function(t){w=w.then(function(){return(t._j||t.src&&fetch(t.src).then(function(t){return t.json()})||Promise.resolve(JSON.parse(t.innerHTML))).then(function(e){S=function(t,e,n){const r={imports:s({},n.imports),scopes:s({},n.scopes)};if(t.imports&&u(t.imports,r.imports,e,n,null),t.scopes)for(let o in t.scopes){const i=c(o,e);u(t.scopes[o],r.scopes[i]||(r.scopes[i]={}),e,n,i)}return r}(e,t.src||r,S)})})})),w},g.resolve=function(t,e){return d(S,i(t,e=e||r)||t,e)||function(t,e){throw Error("Unable to resolve specifier '"+t+(e?"' from "+e:"'"))}(t,e)};const x=g.register;function j(){Array.prototype.forEach.call(document.querySelectorAll("script[type=systemjs-module]"),function(t){t.src&&System.import("import:"===t.src.slice(0,7)?t.src.slice(7):c(t.src,r))})}g.register=function(t,e){x.call(this,t,e)},g.instantiate=function(t,e){const n=this;return new Promise(function(r,o){let i;function c(e){e.filename===t&&(i=e.error)}window.addEventListener("error",c);const s=document.createElement("script");s.charset="utf-8",s.async=!0,s.crossOrigin="anonymous",s.addEventListener("error",function(){window.removeEventListener("error",c),o(Error("Error loading "+t+(e?" from "+e:"")))}),s.addEventListener("load",function(){window.removeEventListener("error",c),document.head.removeChild(s),i?o(i):r(n.getRegister())}),s.src=t,document.head.appendChild(s)})},e&&(window.addEventListener("DOMContentLoaded",j),j()),t&&"function"==typeof importScripts&&(g.instantiate=function(t){const e=this;return new Promise(function(n,r){try{importScripts(t)}catch(t){r(t)}n(e.getRegister())})}),function(t){const e=t.System.constructor.prototype,n=-1!==navigator.userAgent.indexOf("Trident");let r,o,i;const c=e.import;e.import=function(e,s){return function(){r=o=void 0;for(let e in t)!t.hasOwnProperty(e)||!isNaN(e)&&e<t.length||n&&t[e]&&t[e].parent===window||(r?o||(o=e):r=e,i=e)}(),c.call(this,e,s)};const s=[[],function(){return{}}],u=e.getRegister;e.getRegister=function(){const e=u.call(this);if(e)return e;const c=function(){let e,c=0;for(let i in t)if(!(!t.hasOwnProperty(i)||!isNaN(i)&&i<t.length||n&&t[i]&&t[i].parent===window)){if(0===c&&i!==r||1===c&&i!==o)return i;c++,e=i}if(e!==i)return e}();if(!c)return s;let l;try{l=t[c]}catch(t){return s}return[[],function(t){return{execute:function(){t({default:l,__useDefault:!0})}}}]}}("undefined"!=typeof self?self:global),function(t){const e=t.System.constructor.prototype,n=e.instantiate;e.instantiate=function(t,e){const r=this,o=t.split("?")[0].split("#")[0];switch(o.slice(o.lastIndexOf("."))){case".css":return s(function(t,e){const n=new CSSStyleSheet;n.replaceSync(e),t("default",n)});case".html":return i().then(function(t){return c(t)||u("'.html' modules not implemented")});case".json":return s(function(t,e){t("default",JSON.parse(e))});case".wasm":return i().then(function(t){return c(t)||(WebAssembly.compileStreaming?WebAssembly.compileStreaming(t):t.arrayBuffer().then(WebAssembly.compile))}).then(function(t){const e=[],n=[],r={};return WebAssembly.Module.imports&&WebAssembly.Module.imports(t).forEach(function(t){const o=t.module;-1===e.indexOf(o)&&(e.push(o),n.push(function(t){r[o]=t}))}),[e,function(e){return{setters:n,execute:function(){return WebAssembly.instantiate(t,r).then(function(t){e(t.exports)})}}}]})}return n.apply(this,arguments);function i(){return fetch(t).then(function(t){return t.ok||u(t.status+" "+t.statusText),t})}function c(t){const e=t.headers.get("content-type");if(e&&e.match(/^application\/javascript(;|$)/))return t.text().then(function(t){return(0,eval)(t),r.getRegister()})}function s(t){return i().then(function(e){return c(e)||e.text().then(function(e){return[[],function(n){return{execute:t(n,e)}}]})})}function u(n){throw Error(n+", loading "+t+(e?" from "+e:""))}}}("undefined"!=typeof self?self:global);const P="undefined"!=typeof Symbol&&Symbol.toStringTag;g.get=function(t){const e=this[m][t];if(e&&null===e.e&&!e.E)return e.er?null:e.n},g.set=function(t,e){let n;P&&"Module"===e[P]?n=e:(n=Object.assign(Object.create(null),e),P&&Object.defineProperty(n,P,{value:"Module"}));const r=Promise.resolve(n),o=this[m][t]||(this[m][t]={id:t,i:[],h:!1,d:[],e:null,er:void 0,E:void 0});return!o.e&&!o.E&&(Object.assign(o,{n:n,I:void 0,L:void 0,C:r}),n)},g.has=function(t){return!!this[m][t]},g.delete=function(t){const e=this[m],n=e[t];if(!n||null!==n.e||n.E)return!1;let r=n.i;return n.d&&n.d.forEach(function(t){const e=t.i.indexOf(n);-1!==e&&t.i.splice(e,1)}),delete e[t],function(){const n=e[t];if(!n||!r||null!==n.e||n.E)return!1;r.forEach(function(t){n.i.push(t),t(n.n)}),r=null}};const A="undefined"!=typeof Symbol&&Symbol.iterator;g.entries=function(){const t=this,e=Object.keys(t[m]);let n,r,o=0;const i={next:function(){for(;void 0!==(r=e[o++])&&void 0===(n=t.get(r)););return{done:void 0===r,value:void 0!==r&&[r,n]}}};return i[A]=function(){return this},i}}();
!function(){const t="undefined"!=typeof self,e="undefined"!=typeof document,n=t?self:global;let r;if(e){const t=document.querySelector("base[href]");t&&(r=t.href)}if(!r&&"undefined"!=typeof location){const t=(r=location.href.split("#")[0].split("?")[0]).lastIndexOf("/");-1!==t&&(r=r.slice(0,t+1))}const o=/\\/g;function i(t,e){if(-1!==t.indexOf("\\")&&(t=t.replace(o,"/")),"/"===t[0]&&"/"===t[1])return e.slice(0,e.indexOf(":")+1)+t;if("."===t[0]&&("/"===t[1]||"."===t[1]&&("/"===t[2]||2===t.length&&(t+="/"))||1===t.length&&(t+="/"))||"/"===t[0]){const n=e.slice(0,e.indexOf(":")+1);let r;if(r="/"===e[n.length+1]?"file:"!==n?(r=e.slice(n.length+2)).slice(r.indexOf("/")+1):e.slice(8):e.slice(n.length+("/"===e[n.length])),"/"===t[0])return e.slice(0,e.length-r.length-1)+t;const o=r.slice(0,r.lastIndexOf("/")+1)+t,i=[];let c=-1;for(let t=0;t<o.length;t++)-1!==c?"/"===o[t]&&(i.push(o.slice(c,t+1)),c=-1):"."===o[t]?"."!==o[t+1]||"/"!==o[t+2]&&t+2!==o.length?"/"===o[t+1]||t+1===o.length?t+=1:c=t:(i.pop(),t+=2):c=t;return-1!==c&&i.push(o.slice(c)),e.slice(0,e.length-r.length)+i.join("")}}function c(t,e){return i(t,e)||(-1!==t.indexOf(":")?t:i("./"+t,e))}function s(t,e){for(let n in e)t[n]=e[n];return t}function u(t,e,n,r,o){for(let c in t){const s=i(c,n)||c,u=t[c];if("string"!=typeof u)continue;const l=d(r,i(u,n)||u,o);l?e[s]=l:a(c,u,"bare specifier did not resolve")}}function l(t,e){if(e[t])return t;let n=t.length;do{const r=t.slice(0,n+1);if(r in e)return r}while(-1!==(n=t.lastIndexOf("/",n-1)))}function f(t,e){const n=l(t,e);if(n){const r=e[n];if(null===r)return;if(!(t.length>n.length&&"/"!==r[r.length-1]))return r+t.slice(n.length);a(n,r,"should have a trailing '/'")}}function a(t,e,n){console.warn("Package target "+n+", resolving target '"+e+"' for "+t)}function d(t,e,n){let r=n&&l(n,t.scopes);for(;r;){const n=f(e,t.scopes[r]);if(n)return n;r=l(r.slice(0,r.lastIndexOf("/")),t.scopes)}return f(e,t.imports)||-1!==e.indexOf(":")&&e}const h="undefined"!=typeof Symbol,p=h&&Symbol.toStringTag,m=h?Symbol():"@";function y(){this[m]={}}const g=y.prototype;function v(t){return t.id}function b(t,e,n){if(t.onload(n,e.id,e.d&&e.d.map(v)),n)throw n}let x;g.prepareImport=function(){},g.import=function(t,e){const n=this;return Promise.resolve(n.prepareImport()).then(function(){return n.resolve(t,e)}).then(function(t){const e=function t(e,n,r){let o=e[m][n];if(o)return o;const i=[],c=Object.create(null);p&&Object.defineProperty(c,p,{value:"Module"});let s=Promise.resolve().then(function(){return e.instantiate(n,r)}).then(function(t){if(!t)throw Error("Module "+n+" did not instantiate");const r=t[1](function(t,e){o.h=!0;let n=!1;if("object"!=typeof t)t in c&&c[t]===e||(c[t]=e,n=!0);else{for(let e in t){let r=t[e];e in c&&c[e]===r||(c[e]=r,n=!0)}t.__esModule&&(c.__esModule=t.__esModule)}if(n)for(let t=0;t<i.length;t++)i[t](c);return e},2===t[1].length?{import:function(t){return e.import(t,n)},meta:e.createContext(n)}:void 0);return o.e=r.execute||function(){},[t[0],r.setters||[]]});const u=(s=s.catch(function(t){b(e,o,t)})).then(function(r){return Promise.all(r[0].map(function(o,i){const c=r[1][i];return Promise.resolve(e.resolve(o,n)).then(function(r){const o=t(e,r,n);return Promise.resolve(o.I).then(function(){return c&&(o.i.push(c),!o.h&&o.I||c(o.n)),o})})})).then(function(t){o.d=t})});return u.catch(function(t){o.e=null,o.er=t}),o=e[m][n]={id:n,i:i,n:c,I:s,L:u,h:!1,d:void 0,e:void 0,er:void 0,E:void 0,C:void 0}}(n,t);return e.C||function(t,e){return e.C=function t(e,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 t(e,n,r)}))})}(t,e,{}).then(function(){return function t(e,n,r){if(r[n.id])return;if(r[n.id]=!0,!n.e){if(n.er)throw n.er;return n.E?n.E:void 0}let o;return n.d.forEach(function(i){try{const c=t(e,i,r);c&&(c.catch(function(t){b(e,n,t)}),(o=o||[]).push(c))}catch(t){b(e,n,t)}}),o?Promise.all(o).then(i):i();function i(){try{let t=n.e.call(S);if(t)return t=t.then(function(){n.C=n.n,n.E=null,b(e,n,null)},function(t){b(e,n,t)}),n.E=n.E||t;n.C=n.n,b(e,n,null)}catch(t){throw b(e,n,t),n.er=t,t}finally{n.L=n.I=void 0,n.e=null}}}(t,e,{})}).then(function(){return e.n})}(n,e)})},g.createContext=function(t){return{url:t}},g.onload=function(){},g.register=function(t,e){x=[t,e]},g.getRegister=function(){const t=x;return x=void 0,t};const S=Object.freeze(Object.create(null));n.System=new y;let E,O={imports:{},scopes:{}};e&&Array.prototype.forEach.call(document.querySelectorAll('script[type="systemjs-importmap"][src]'),function(t){t._j=fetch(t.src).then(function(t){return t.json()})}),g.prepareImport=function(){return E||(E=Promise.resolve(),e&&Array.prototype.forEach.call(document.querySelectorAll('script[type="systemjs-importmap"]'),function(t){E=E.then(function(){return(t._j||t.src&&fetch(t.src).then(function(t){return t.json()})||Promise.resolve(JSON.parse(t.innerHTML))).then(function(e){O=function(t,e,n){const r={imports:s({},n.imports),scopes:s({},n.scopes)};if(t.imports&&u(t.imports,r.imports,e,n,null),t.scopes)for(let o in t.scopes){const i=c(o,e);u(t.scopes[o],r.scopes[i]||(r.scopes[i]={}),e,n,i)}return r}(e,t.src||r,O)})})})),E},g.resolve=function(t,e){return d(O,i(t,e=e||r)||t,e)||function(t,e){throw Error("Unable to resolve specifier '"+t+(e?"' from "+e:"'"))}(t,e)};const w=g.register;let j,P;function A(){Array.prototype.forEach.call(document.querySelectorAll("script[type=systemjs-module]"),function(t){t.src&&System.import("import:"===t.src.slice(0,7)?t.src.slice(7):c(t.src,r))})}g.register=function(t,e){w.call(this,t,e)},g.createScript=function(t){const e=document.createElement("script");return e.charset="utf-8",e.async=!0,e.crossOrigin="anonymous",e.src=t,e},e&&window.addEventListener("error",function(t){j=t.filename,P=t.error}),g.instantiate=function(t,e){const n=this;return new Promise(function(r,o){const i=g.createScript(t);i.addEventListener("error",function(){o(Error("Error loading "+t+(e?" from "+e:"")))}),i.addEventListener("load",function(){document.head.removeChild(i),j===t?o(P):r(n.getRegister())}),document.head.appendChild(i)})},e&&(window.addEventListener("DOMContentLoaded",A),A()),t&&"function"==typeof importScripts&&(g.instantiate=function(t){const e=this;return new Promise(function(n,r){try{importScripts(t)}catch(t){r(t)}n(e.getRegister())})}),function(t){const e=t.System.constructor.prototype,n=-1!==navigator.userAgent.indexOf("Trident");let r,o,i;const c=e.import;e.import=function(e,s){return function(){r=o=void 0;for(let e in t)!t.hasOwnProperty(e)||!isNaN(e)&&e<t.length||n&&t[e]&&t[e].parent===window||(r?o||(o=e):r=e,i=e)}(),c.call(this,e,s)};const s=[[],function(){return{}}],u=e.getRegister;e.getRegister=function(){const e=u.call(this);if(e)return e;const c=function(){let e,c=0;for(let i in t)if(!(!t.hasOwnProperty(i)||!isNaN(i)&&i<t.length||n&&t[i]&&t[i].parent===window)){if(0===c&&i!==r||1===c&&i!==o)return i;c++,e=i}if(e!==i)return e}();if(!c)return s;let l;try{l=t[c]}catch(t){return s}return[[],function(t){return{execute:function(){t({default:l,__useDefault:!0})}}}]}}("undefined"!=typeof self?self:global),function(t){const e=t.System.constructor.prototype,n=e.instantiate,r=/\.(css|html|json|wasm)$/;e.shouldFetch=function(t){const e=t.split("?")[0].split("#")[0];return e.slice(e.lastIndexOf(".")).match(r)},e.fetch=function(t){return fetch(t)},e.instantiate=function(t,e){const r=this;return this.shouldFetch(t)?this.fetch(t).then(function(n){if(!n.ok)throw Error(n.status+" "+n.statusText+", loading "+t+(e?" from "+e:""));const o=n.headers.get("content-type");if(o.match(/^(text|application)\/(x-)?javascript(;|$)/))return n.text().then(function(t){return(0,eval)(t),r.getRegister()});if(o.match(/^application\/json(;|$)/))return n.text().then(function(t){return[[],function(e){return{execute:function(){e("default",JSON.parse(t))}}}]});if(o.match(/^text\/css(;|$)/))return n.text().then(function(t){return[[],function(e){return{execute:function(){const n=new CSSStyleSheet;n.replaceSync(t),e("default",n)}}}]});if(o.match(/^application\/wasm(;|$)/))return(WebAssembly.compileStreaming?WebAssembly.compileStreaming(n):n.arrayBuffer().then(WebAssembly.compile)).then(function(t){const e=[],n=[],r={};return WebAssembly.Module.imports&&WebAssembly.Module.imports(t).forEach(function(t){const o=t.module;-1===e.indexOf(o)&&(e.push(o),n.push(function(t){r[o]=t}))}),[e,function(e){return{setters:n,execute:function(){return WebAssembly.instantiate(t,r).then(function(t){e(t.exports)})}}}]});throw new Error('Unknown module type "'+o+'"')}):n.apply(this,arguments)}}("undefined"!=typeof self?self:global);const I="undefined"!=typeof Symbol&&Symbol.toStringTag;g.get=function(t){const e=this[m][t];if(e&&null===e.e&&!e.E)return e.er?null:e.n},g.set=function(t,e){let n;I&&"Module"===e[I]?n=e:(n=Object.assign(Object.create(null),e),I&&Object.defineProperty(n,I,{value:"Module"}));const r=Promise.resolve(n),o=this[m][t]||(this[m][t]={id:t,i:[],h:!1,d:[],e:null,er:void 0,E:void 0});return!o.e&&!o.E&&(Object.assign(o,{n:n,I:void 0,L:void 0,C:r}),n)},g.has=function(t){return!!this[m][t]},g.delete=function(t){const e=this[m],n=e[t];if(!n||null!==n.e||n.E)return!1;let r=n.i;return n.d&&n.d.forEach(function(t){const e=t.i.indexOf(n);-1!==e&&t.i.splice(e,1)}),delete e[t],function(){const n=e[t];if(!n||!r||null!==n.e||n.E)return!1;r.forEach(function(t){n.i.push(t),t(n.n)}),r=null}};const C="undefined"!=typeof Symbol&&Symbol.iterator;g.entries=function(){const t=this,e=Object.keys(t[m]);let n,r,o=0;const i={next:function(){for(;void 0!==(r=e[o++])&&void 0===(n=t.get(r)););return{done:void 0===r,value:void 0!==r&&[r,n]}}};return i[C]=function(){return this},i}}();
{
"name": "systemjs",
"version": "6.1.10",
"version": "6.2.0",
"description": "Dynamic ES module loader",

@@ -5,0 +5,0 @@ "repository": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc