es6-module-loader
Advanced tools
Comparing version 0.8.0 to 0.8.1
{ | ||
"name": "es6-module-loader", | ||
"version": "0.8.0", | ||
"version": "0.8.1", | ||
"description": "An ES6 Module Loader polyfill based on the latest spec.", | ||
@@ -8,3 +8,3 @@ "homepage": "https://github.com/ModuleLoader/es6-module-loader", | ||
"dependencies": { | ||
"traceur": "0.0.55" | ||
"traceur": "0.0.56" | ||
}, | ||
@@ -11,0 +11,0 @@ "keywords": [ |
@@ -655,2 +655,3 @@ /* | ||
load.module = { | ||
name: load.name, | ||
module: module | ||
@@ -740,5 +741,9 @@ }; | ||
if (depModule.importers) { | ||
module.dependencies.push(depModule); | ||
depModule.importers.push(module); | ||
module.dependencies.push(depModule); | ||
} | ||
else { | ||
// track dynamic records as null module records as already linked | ||
module.dependencies.push(null); | ||
} | ||
@@ -806,2 +811,6 @@ // run the setter for this dependency | ||
var dep = deps[i]; | ||
// dynamic dependencies are empty in module.dependencies | ||
// as they are already linked | ||
if (!dep) | ||
continue; | ||
if (indexOf.call(seen, dep) == -1) { | ||
@@ -1062,2 +1071,4 @@ err = ensureEvaluated(dep, seen, loader); | ||
options.modules = 'instantiate'; | ||
options.sourceMaps = true; | ||
options.filename = load.address; | ||
var output = compiler.stringToTree({content: load.source, options: options}); | ||
@@ -1071,2 +1082,3 @@ checkForErrors(output); | ||
checkForErrors(output); | ||
var source = output.js; | ||
@@ -1324,2 +1336,11 @@ var sourceMap = output.generatedSourceMap; | ||
// percent encode each path part | ||
if (isBrowser) { | ||
var outParts = outPath.split('/'); | ||
for (var i = 0, l = outParts.length; i < l; i++) { | ||
outParts[i] = encodeURIComponent(outParts[i]); | ||
} | ||
outPath = outParts.join('/'); | ||
} | ||
return toAbsoluteURL(this.baseURL, outPath); | ||
@@ -1346,2 +1367,8 @@ }, | ||
// note we have to export before runing "init" below | ||
if (typeof exports === 'object') | ||
module.exports = System; | ||
global.System = System; | ||
// <script type="module"> support | ||
@@ -1385,7 +1412,2 @@ // allow a data-init function callback once loaded | ||
if (typeof exports === 'object') | ||
module.exports = System; | ||
global.System = System; | ||
})(typeof global !== 'undefined' ? global : this); |
/* | ||
* es6-module-loader v0.8.0 | ||
* es6-module-loader v0.8.1 | ||
* https://github.com/ModuleLoader/es6-module-loader | ||
* Copyright (c) 2014 Guy Bedford, Luke Hoban, Addy Osmani; Licensed MIT | ||
*/ | ||
!function(__global){function __eval(__source,__global,load){__curRegister=System.register,System.register=function(a,b,c){"string"!=typeof a&&(c=b,b=a),load.declare=c,load.depsList=b};try{eval('(function() { var __moduleName = "'+(load.name||"").replace('"','"')+'"; '+__source+" \n }).call(__global);")}catch(e){throw("SyntaxError"==e.name||"TypeError"==e.name)&&(e.message="Evaluating "+(load.name||load.address)+"\n "+e.message),e}System.register=__curRegister}!function(){function a(a){return{status:"loading",name:a,linkSets:[],dependencies:[],metadata:{}}}function b(a,b,c){return new z(g({step:c.address?"fetch":"locate",loader:a,moduleName:b,moduleMetadata:c&&c.metadata||{},moduleSource:c.source,moduleAddress:c.address}))}function c(b,c,e,f){return new z(function(a){a(b.loaderObj.normalize(c,e,f))}).then(function(c){var e;if(b.modules[c])return e=a(c),e.status="linked",e;for(var f=0,g=b.loads.length;g>f;f++)if(e=b.loads[f],e.name==c)return e;return e=a(c),b.loads.push(e),d(b,e),e})}function d(a,b){e(a,b,z.resolve().then(function(){return a.loaderObj.locate({name:b.name,metadata:b.metadata})}))}function e(a,b,c){f(a,b,c.then(function(c){return"loading"==b.status?(b.address=c,a.loaderObj.fetch({name:b.name,metadata:b.metadata,address:c})):void 0}))}function f(a,b,d){d.then(function(c){return"loading"==b.status?a.loaderObj.translate({name:b.name,metadata:b.metadata,address:b.address,source:c}):void 0}).then(function(c){return"loading"==b.status?(b.source=c,a.loaderObj.instantiate({name:b.name,metadata:b.metadata,address:b.address,source:c})):void 0}).then(function(d){if("loading"==b.status){if(void 0===d)b.address=b.address||"anon"+ ++B,b.isDeclarative=!0,a.loaderObj.parse(b);else{if("object"!=typeof d)throw TypeError("Invalid instantiate return value");b.depsList=d.deps||[],b.execute=d.execute,b.isDeclarative=!1}b.dependencies=[];for(var e=b.depsList,f=[],g=0,h=e.length;h>g;g++)(function(d,e){f.push(c(a,d,b.name,b.address).then(function(a){if(b.dependencies[e]={key:d,value:a.name},"linked"!=a.status)for(var c=b.linkSets.concat([]),f=0,g=c.length;g>f;f++)i(c[f],a)}))})(e[g],g);return z.all(f)}}).then(function(){b.status="loaded";for(var a=b.linkSets.concat([]),c=0,d=a.length;d>c;c++)k(a[c],b)})["catch"](function(a){b.status="failed",b.exception=a;for(var c=b.linkSets.concat([]),d=0,e=c.length;e>d;d++)l(c[d],a)})}function g(b){return function(c){var g=b.loader,i=b.moduleName,j=b.step;if(g.modules[i])throw new TypeError('"'+i+'" already exists in the module table');for(var k=0,l=g.loads.length;l>k;k++)if(g.loads[k].name==i)throw new TypeError('"'+i+'" already loading');var m=a(i);m.metadata=b.moduleMetadata;var n=h(g,m);g.loads.push(m),c(n.done),"locate"==j?d(g,m):"fetch"==j?e(g,m,z.resolve(b.moduleAddress)):(m.address=b.moduleAddress,f(g,m,z.resolve(b.moduleSource)))}}function h(a,b){var c={loader:a,loads:[],startingLoad:b,loadingCount:0};return c.done=new z(function(a,b){c.resolve=a,c.reject=b}),i(c,b),c}function i(a,b){for(var c=0,d=a.loads.length;d>c;c++)if(a.loads[c]==b)return;a.loads.push(b),b.linkSets.push(a),"loaded"!=b.status&&a.loadingCount++;for(var e=a.loader,c=0,d=b.dependencies.length;d>c;c++){var f=b.dependencies[c].value;if(!e.modules[f])for(var g=0,h=e.loads.length;h>g;g++)if(e.loads[g].name==f){i(a,e.loads[g]);break}}}function j(a){try{o(a)}catch(b){return l(a,b),!0}}function k(a,b){if(a.loadingCount--,!(a.loadingCount>0)){var c=a.startingLoad;if(a.loader.loaderObj.execute===!1){for(var d=[].concat(a.loads),e=0,f=d.length;f>e;e++){var b=d[e];b.module=b.isDeclarative?{name:b.name,module:E({}),evaluated:!0}:{module:E({})},b.status="linked",m(a.loader,b)}return a.resolve(c)}var g=j(a);g||a.resolve(c)}}function l(a,b){for(var c=a.loader,d=a.loads.concat([]),e=0,f=d.length;f>e;e++){var g=d[e];c.loaderObj.failed=c.loaderObj.failed||[],-1==A.call(c.loaderObj.failed,g)&&c.loaderObj.failed.push(g);var h=A.call(g.linkSets,a);if(g.linkSets.splice(h,1),0==g.linkSets.length){var i=A.call(a.loader.loads,g);-1!=i&&a.loader.loads.splice(i,1)}}a.reject(b)}function m(a,b){if(a.loaderObj.trace){a.loaderObj.loads||(a.loaderObj.loads={});var c={};b.dependencies.forEach(function(a){c[a.key]=a.value}),a.loaderObj.loads[b.name]={name:b.name,deps:b.dependencies.map(function(a){return a.key}),depMap:c,address:b.address,metadata:b.metadata,source:b.source,kind:b.isDeclarative?"declarative":"dynamic"}}b.name&&(a.modules[b.name]=b.module);var d=A.call(a.loads,b);-1!=d&&a.loads.splice(d,1);for(var e=0,f=b.linkSets.length;f>e;e++)d=A.call(b.linkSets[e].loads,b),-1!=d&&b.linkSets[e].loads.splice(d,1);b.linkSets.splice(0,b.linkSets.length)}function n(a,b,c,d){if(c[a.groupIndex]=c[a.groupIndex]||[],-1==A.call(c[a.groupIndex],a)){c[a.groupIndex].push(a);for(var e=0,f=b.length;f>e;e++)for(var g=b[e],h=0;h<a.dependencies.length;h++)if(g.name==a.dependencies[h].value){var i=a.groupIndex+(g.isDeclarative!=a.isDeclarative);if(void 0===g.groupIndex||g.groupIndex<i){if(g.groupIndex&&(c[g.groupIndex].splice(A.call(c[g.groupIndex],g),1),0==c[g.groupIndex].length))throw new TypeError("Mixed dependency cycle detected");g.groupIndex=i}n(g,b,c,d)}}}function o(a){var b=a.loader;if(a.loads.length){var c=[],d=a.loads[0];d.groupIndex=0,n(d,a.loads,c,b);for(var e=d.isDeclarative==c.length%2,f=c.length-1;f>=0;f--){for(var g=c[f],h=0;h<g.length;h++){var i=g[h];if(e)q(i,a.loads,b);else{var j=i.execute();if(!(j&&j instanceof w))throw new TypeError("Execution must define a Module instance");i.module={module:j},i.status="linked"}m(b,i)}e=!e}}}function p(a){return C[a]||(C[a]={name:a,dependencies:[],module:new w,importers:[]})}function q(a,b,c){if(!a.module){var d=a.module=p(a.name),e=a.module.module,f=a.declare.call(__global,function(a,b){d.locked=!0,e[a]=b;for(var c=0,f=d.importers.length;f>c;c++){var g=d.importers[c];if(!g.locked){var h=A.call(g.dependencies,d);g.setters[h](e)}}return d.locked=!1,b});d.setters=f.setters,d.execute=f.execute;for(var g=0,h=a.dependencies.length;h>g;g++){var i=a.dependencies[g].value,j=c.modules[i];if(!j)for(var k=0;k<b.length;k++)b[k].name==i&&(b[k].module?j=p(i):(q(b[k],b,c),j=b[k].module));j.importers&&(j.importers.push(d),d.dependencies.push(j)),d.setters[g]&&d.setters[g](j.module)}a.status="linked"}}function r(a,b){return t(b.module,[],a),b.module.module}function s(a){try{a.execute.call(__global)}catch(b){return b}}function t(a,b,c){var d=u(a,b,c);if(d)throw d}function u(a,b,c){if(!a.evaluated&&a.dependencies){b.push(a);for(var d,e=a.dependencies,f=0,g=e.length;g>f;f++){var h=e[f];if(-1==A.call(b,h)&&(d=u(h,b,c)))return d+"\n in module "+h.name}if(a.failed)return new Error("Module failed execution.");if(!a.evaluated)return a.evaluated=!0,d=s(a),d?a.failed=!0:Object.preventExtensions&&Object.preventExtensions(a.module),a.execute=void 0,d}}function v(a){if("object"!=typeof a)throw new TypeError("Options must be an object");a.normalize&&(this.normalize=a.normalize),a.locate&&(this.locate=a.locate),a.fetch&&(this.fetch=a.fetch),a.translate&&(this.translate=a.translate),a.instantiate&&(this.instantiate=a.instantiate),this._loader={loaderObj:this,loads:[],modules:{}},y(this,"global",{get:function(){return __global}})}function w(){}function x(a,b){return D[a]=b,b.then(function(){D[a]=void 0}),b["catch"](function(){D[a]=void 0}),b}var y,z=__global.Promise||require("when/es6-shim/Promise");!function(){try{Object.defineProperty({},"a",{})&&(y=Object.defineProperty)}catch(a){y=function(a,b,c){try{a[b]=c.value||c.get.call(a)}catch(d){}}}}(),console.assert=console.assert||function(){};var A=Array.prototype.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},B=0,C={},D={};v.prototype={constructor:v,define:function(a,b,c){if(D[a])throw new TypeError("Module is already loading.");return x(a,new z(g({step:"translate",loader:this._loader,moduleName:a,moduleMetadata:c&&c.metadata||{},moduleSource:b,moduleAddress:c&&c.address})))},"delete":function(a){return this._loader.modules[a]?delete this._loader.modules[a]:!1},get:function(a){return this._loader.modules[a]?(t(this._loader.modules[a],[],this),this._loader.modules[a].module):void 0},has:function(a){return!!this._loader.modules[a]},"import":function(a,c){var d=this;return z.resolve(d.normalize(a,c&&c.name,c&&c.address)).then(function(a){var e=d._loader;return e.modules[a]?(t(e.modules[a],[],e._loader),e.modules[a].module):D[a]||x(a,b(e,a,c||{}).then(function(b){return delete D[a],r(e,b)}))})},load:function(a){return this._loader.modules[a]?(t(this._loader.modules[a],[],this._loader),z.resolve(this._loader.modules[a].module)):D[a]||x(a,b(this._loader,a,{}))},module:function(b,c){var d=a();d.address=c&&c.address;var e=h(this._loader,d),g=z.resolve(b),i=this._loader,j=e.done.then(function(){return r(i,d)});return f(i,d,g),j},newModule:function(a){if("object"!=typeof a)throw new TypeError("Expected object");var b=new w;for(var c in a)!function(c){y(b,c,{configurable:!1,enumerable:!0,get:function(){return a[c]}})}(c);return Object.preventExtensions&&Object.preventExtensions(b),b},set:function(a,b){if(!(b instanceof w))throw new TypeError("Loader.set("+a+", module) must be a module");this._loader.modules[a]={module:b}},normalize:function(a){return a},locate:function(a){return a.name},fetch:function(){throw new TypeError("Fetch not implemented")},translate:function(a){return a.source},parse:function(){throw new TypeError("Loader.parse is not implemented")},instantiate:function(){}};var E=v.prototype.newModule;!function(){function a(a,b){if(a.errors.length){for(var c=0,d=a.errors.length;d>c;c++);throw new Error("Parse of "+b.name+", "+b.address+" failed, "+a.errors.length)}}var b;v.prototype.parse=function(c){if(!b)if("undefined"==typeof window)b=require("traceur");else{if(!__global.traceur)throw new TypeError("Include Traceur for module syntax support");b=__global.traceur}c.isDeclarative=!0;var d=new b.Compiler,e=System.traceurOptions||{};e.modules="instantiate";var f=d.stringToTree({content:c.source,options:e});a(f),f=d.treeToTree(f),a(f),f=d.treeToString(f),a(f);var g=f.js,h=f.generatedSourceMap;__global.btoa&&h&&(g+="\n//# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(h)))+"\n"),__eval(g,__global,c)}}(),"object"==typeof exports&&(module.exports=v),__global.Reflect=__global.Reflect||{},__global.Reflect.Loader=__global.Reflect.Loader||v,__global.Reflect.global=__global.Reflect.global||__global,__global.LoaderPolyfill=v}();var __curRegister}("undefined"!=typeof global?global:this),function(a){function b(a){var b=String(a).replace(/^\s+|\s+$/g,"").match(/^([^:\/?#]+:)?(\/\/(?:[^:@]*(?::[^:@]*)?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);return b?{href:b[0]||"",protocol:b[1]||"",authority:b[2]||"",host:b[3]||"",hostname:b[4]||"",port:b[5]||"",pathname:b[6]||"",search:b[7]||"",hash:b[8]||""}:null}function c(a){var b=[];return a.replace(/^(\.\.?(\/|$))+/,"").replace(/\/(\.(\/|$))+/g,"/").replace(/\/\.\.$/,"/../").replace(/\/?[^\/]*/g,function(a){"/.."===a?b.pop():b.push(a)}),b.join("").replace(/^\//,"/"===a.charAt(0)?"/":"")}function d(a,d){return d=b(d||""),a=b(a||""),d&&a?(d.protocol||a.protocol)+(d.protocol||d.authority?d.authority:a.authority)+c(d.protocol||d.authority||"/"===d.pathname.charAt(0)?d.pathname:d.pathname?(a.authority&&!a.pathname?"/":"")+a.pathname.slice(0,a.pathname.lastIndexOf("/")+1)+d.pathname:a.pathname)+(d.protocol||d.authority||d.pathname?d.search:d.search||a.search)+d.hash:null}function e(){document.removeEventListener("DOMContentLoaded",e,!1),window.removeEventListener("load",e,!1),f()}function f(){for(var a=document.getElementsByTagName("script"),b=0;b<a.length;b++){var c=a[b];if("module"==c.type){var d=c.innerHTML;l.module(d)["catch"](function(a){setTimeout(function(){throw a})})}}}var g,h="undefined"!=typeof window,i=a.Reflect&&a.Reflect.Loader||require("./loader"),j=a.Promise||require("when/es6-shim/Promise");if(h)g=function(a,b,c){function d(){b(f.responseText)}function e(){c(f.statusText+": "+a||"XHR error")}var f=new XMLHttpRequest,g=!0;if(!("withCredentials"in f)){var h=/^(\w+:)?\/\/([^\/]+)/.exec(a);h&&(g=h[2]===window.location.host,h[1]&&(g&=h[1]===window.location.protocol))}g||(f=new XDomainRequest,f.onload=d,f.onerror=e,f.ontimeout=e),f.onreadystatechange=function(){4===f.readyState&&(200===f.status||0==f.status&&f.responseText?d():e())},f.open("GET",a,!0),f.send(null)};else{var k;g=function(a,b,c){return k=k||require("fs"),k.readFile(a,function(a,d){return a?c(a):(b(d+""),void 0)})}}var l=new i({global:h?window:a,strict:!0,normalize:function(a,b){if("string"!=typeof a)throw new TypeError("Module name must be a string");var c=a.split("/");if(0==c.length)throw new TypeError("No module name provided");var d=0,e=!1,f=0;if("."==c[0]){if(d++,d==c.length)throw new TypeError('Illegal module name "'+a+'"');e=!0}else{for(;".."==c[d];)if(d++,d==c.length)throw new TypeError('Illegal module name "'+a+'"');d&&(e=!0),f=d}for(var g=d;g<c.length;g++){var h=c[g];if(""==h||"."==h||".."==h)throw new TypeError('Illegal module name "'+a+'"')}if(!e)return a;{var i=[],j=(b||"").split("/");j.length-1-f}return i=i.concat(j.splice(0,j.length-1-f)),i=i.concat(c.splice(d,c.length-d)),i.join("/")},locate:function(a){var b,c=a.name,e="";for(var f in this.paths){var g=f.split("*");if(g.length>2)throw new TypeError("Only one wildcard in a path is permitted");if(1==g.length){if(c==f&&f.length>e.length){e=f;break}}else c.substr(0,g[0].length)==g[0]&&c.substr(c.length-g[1].length)==g[1]&&(e=f,b=c.substr(g[0].length,c.length-g[1].length-g[0].length))}var h=this.paths[e];return b&&(h=h.replace("*",b)),d(this.baseURL,h)},fetch:function(a){var b=this;return new j(function(c,e){g(d(b.baseURL,a.address),function(a){c(a)},e)})}});if(h){var m=window.location.href.split("#")[0].split("?")[0];l.baseURL=m.substring(0,m.lastIndexOf("/")+1)}else l.baseURL=process.cwd()+"/";if(l.paths={"*":"*.js"},h){var n=document.getElementsByTagName("script");n=n[n.length-1],"complete"===document.readyState?setTimeout(f):document.addEventListener&&(document.addEventListener("DOMContentLoaded",e,!1),window.addEventListener("load",e,!1)),n.getAttribute("data-init")&&window[n.getAttribute("data-init")]()}"object"==typeof exports&&(module.exports=l),a.System=l}("undefined"!=typeof global?global:this); | ||
!function(__global){function __eval(__source,__global,load){__curRegister=System.register,System.register=function(a,b,c){"string"!=typeof a&&(c=b,b=a),load.declare=c,load.depsList=b};try{eval('(function() { var __moduleName = "'+(load.name||"").replace('"','"')+'"; '+__source+" \n }).call(__global);")}catch(e){throw("SyntaxError"==e.name||"TypeError"==e.name)&&(e.message="Evaluating "+(load.name||load.address)+"\n "+e.message),e}System.register=__curRegister}!function(){function a(a){return{status:"loading",name:a,linkSets:[],dependencies:[],metadata:{}}}function b(a,b,c){return new z(g({step:c.address?"fetch":"locate",loader:a,moduleName:b,moduleMetadata:c&&c.metadata||{},moduleSource:c.source,moduleAddress:c.address}))}function c(b,c,e,f){return new z(function(a){a(b.loaderObj.normalize(c,e,f))}).then(function(c){var e;if(b.modules[c])return e=a(c),e.status="linked",e;for(var f=0,g=b.loads.length;g>f;f++)if(e=b.loads[f],e.name==c)return e;return e=a(c),b.loads.push(e),d(b,e),e})}function d(a,b){e(a,b,z.resolve().then(function(){return a.loaderObj.locate({name:b.name,metadata:b.metadata})}))}function e(a,b,c){f(a,b,c.then(function(c){return"loading"==b.status?(b.address=c,a.loaderObj.fetch({name:b.name,metadata:b.metadata,address:c})):void 0}))}function f(a,b,d){d.then(function(c){return"loading"==b.status?a.loaderObj.translate({name:b.name,metadata:b.metadata,address:b.address,source:c}):void 0}).then(function(c){return"loading"==b.status?(b.source=c,a.loaderObj.instantiate({name:b.name,metadata:b.metadata,address:b.address,source:c})):void 0}).then(function(d){if("loading"==b.status){if(void 0===d)b.address=b.address||"anon"+ ++B,b.isDeclarative=!0,a.loaderObj.parse(b);else{if("object"!=typeof d)throw TypeError("Invalid instantiate return value");b.depsList=d.deps||[],b.execute=d.execute,b.isDeclarative=!1}b.dependencies=[];for(var e=b.depsList,f=[],g=0,h=e.length;h>g;g++)(function(d,e){f.push(c(a,d,b.name,b.address).then(function(a){if(b.dependencies[e]={key:d,value:a.name},"linked"!=a.status)for(var c=b.linkSets.concat([]),f=0,g=c.length;g>f;f++)i(c[f],a)}))})(e[g],g);return z.all(f)}}).then(function(){b.status="loaded";for(var a=b.linkSets.concat([]),c=0,d=a.length;d>c;c++)k(a[c],b)})["catch"](function(a){b.status="failed",b.exception=a;for(var c=b.linkSets.concat([]),d=0,e=c.length;e>d;d++)l(c[d],a)})}function g(b){return function(c){var g=b.loader,i=b.moduleName,j=b.step;if(g.modules[i])throw new TypeError('"'+i+'" already exists in the module table');for(var k=0,l=g.loads.length;l>k;k++)if(g.loads[k].name==i)throw new TypeError('"'+i+'" already loading');var m=a(i);m.metadata=b.moduleMetadata;var n=h(g,m);g.loads.push(m),c(n.done),"locate"==j?d(g,m):"fetch"==j?e(g,m,z.resolve(b.moduleAddress)):(m.address=b.moduleAddress,f(g,m,z.resolve(b.moduleSource)))}}function h(a,b){var c={loader:a,loads:[],startingLoad:b,loadingCount:0};return c.done=new z(function(a,b){c.resolve=a,c.reject=b}),i(c,b),c}function i(a,b){for(var c=0,d=a.loads.length;d>c;c++)if(a.loads[c]==b)return;a.loads.push(b),b.linkSets.push(a),"loaded"!=b.status&&a.loadingCount++;for(var e=a.loader,c=0,d=b.dependencies.length;d>c;c++){var f=b.dependencies[c].value;if(!e.modules[f])for(var g=0,h=e.loads.length;h>g;g++)if(e.loads[g].name==f){i(a,e.loads[g]);break}}}function j(a){try{o(a)}catch(b){return l(a,b),!0}}function k(a,b){if(a.loadingCount--,!(a.loadingCount>0)){var c=a.startingLoad;if(a.loader.loaderObj.execute===!1){for(var d=[].concat(a.loads),e=0,f=d.length;f>e;e++){var b=d[e];b.module=b.isDeclarative?{name:b.name,module:E({}),evaluated:!0}:{module:E({})},b.status="linked",m(a.loader,b)}return a.resolve(c)}var g=j(a);g||a.resolve(c)}}function l(a,b){for(var c=a.loader,d=a.loads.concat([]),e=0,f=d.length;f>e;e++){var g=d[e];c.loaderObj.failed=c.loaderObj.failed||[],-1==A.call(c.loaderObj.failed,g)&&c.loaderObj.failed.push(g);var h=A.call(g.linkSets,a);if(g.linkSets.splice(h,1),0==g.linkSets.length){var i=A.call(a.loader.loads,g);-1!=i&&a.loader.loads.splice(i,1)}}a.reject(b)}function m(a,b){if(a.loaderObj.trace){a.loaderObj.loads||(a.loaderObj.loads={});var c={};b.dependencies.forEach(function(a){c[a.key]=a.value}),a.loaderObj.loads[b.name]={name:b.name,deps:b.dependencies.map(function(a){return a.key}),depMap:c,address:b.address,metadata:b.metadata,source:b.source,kind:b.isDeclarative?"declarative":"dynamic"}}b.name&&(a.modules[b.name]=b.module);var d=A.call(a.loads,b);-1!=d&&a.loads.splice(d,1);for(var e=0,f=b.linkSets.length;f>e;e++)d=A.call(b.linkSets[e].loads,b),-1!=d&&b.linkSets[e].loads.splice(d,1);b.linkSets.splice(0,b.linkSets.length)}function n(a,b,c,d){if(c[a.groupIndex]=c[a.groupIndex]||[],-1==A.call(c[a.groupIndex],a)){c[a.groupIndex].push(a);for(var e=0,f=b.length;f>e;e++)for(var g=b[e],h=0;h<a.dependencies.length;h++)if(g.name==a.dependencies[h].value){var i=a.groupIndex+(g.isDeclarative!=a.isDeclarative);if(void 0===g.groupIndex||g.groupIndex<i){if(g.groupIndex&&(c[g.groupIndex].splice(A.call(c[g.groupIndex],g),1),0==c[g.groupIndex].length))throw new TypeError("Mixed dependency cycle detected");g.groupIndex=i}n(g,b,c,d)}}}function o(a){var b=a.loader;if(a.loads.length){var c=[],d=a.loads[0];d.groupIndex=0,n(d,a.loads,c,b);for(var e=d.isDeclarative==c.length%2,f=c.length-1;f>=0;f--){for(var g=c[f],h=0;h<g.length;h++){var i=g[h];if(e)q(i,a.loads,b);else{var j=i.execute();if(!(j&&j instanceof w))throw new TypeError("Execution must define a Module instance");i.module={name:i.name,module:j},i.status="linked"}m(b,i)}e=!e}}}function p(a){return C[a]||(C[a]={name:a,dependencies:[],module:new w,importers:[]})}function q(a,b,c){if(!a.module){var d=a.module=p(a.name),e=a.module.module,f=a.declare.call(__global,function(a,b){d.locked=!0,e[a]=b;for(var c=0,f=d.importers.length;f>c;c++){var g=d.importers[c];if(!g.locked){var h=A.call(g.dependencies,d);g.setters[h](e)}}return d.locked=!1,b});d.setters=f.setters,d.execute=f.execute;for(var g=0,h=a.dependencies.length;h>g;g++){var i=a.dependencies[g].value,j=c.modules[i];if(!j)for(var k=0;k<b.length;k++)b[k].name==i&&(b[k].module?j=p(i):(q(b[k],b,c),j=b[k].module));j.importers?(d.dependencies.push(j),j.importers.push(d)):d.dependencies.push(null),d.setters[g]&&d.setters[g](j.module)}a.status="linked"}}function r(a,b){return t(b.module,[],a),b.module.module}function s(a){try{a.execute.call(__global)}catch(b){return b}}function t(a,b,c){var d=u(a,b,c);if(d)throw d}function u(a,b,c){if(!a.evaluated&&a.dependencies){b.push(a);for(var d,e=a.dependencies,f=0,g=e.length;g>f;f++){var h=e[f];if(h&&-1==A.call(b,h)&&(d=u(h,b,c)))return d+"\n in module "+h.name}if(a.failed)return new Error("Module failed execution.");if(!a.evaluated)return a.evaluated=!0,d=s(a),d?a.failed=!0:Object.preventExtensions&&Object.preventExtensions(a.module),a.execute=void 0,d}}function v(a){if("object"!=typeof a)throw new TypeError("Options must be an object");a.normalize&&(this.normalize=a.normalize),a.locate&&(this.locate=a.locate),a.fetch&&(this.fetch=a.fetch),a.translate&&(this.translate=a.translate),a.instantiate&&(this.instantiate=a.instantiate),this._loader={loaderObj:this,loads:[],modules:{}},y(this,"global",{get:function(){return __global}})}function w(){}function x(a,b){return D[a]=b,b.then(function(){D[a]=void 0}),b["catch"](function(){D[a]=void 0}),b}var y,z=__global.Promise||require("when/es6-shim/Promise");!function(){try{Object.defineProperty({},"a",{})&&(y=Object.defineProperty)}catch(a){y=function(a,b,c){try{a[b]=c.value||c.get.call(a)}catch(d){}}}}(),console.assert=console.assert||function(){};var A=Array.prototype.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},B=0,C={},D={};v.prototype={constructor:v,define:function(a,b,c){if(D[a])throw new TypeError("Module is already loading.");return x(a,new z(g({step:"translate",loader:this._loader,moduleName:a,moduleMetadata:c&&c.metadata||{},moduleSource:b,moduleAddress:c&&c.address})))},"delete":function(a){return this._loader.modules[a]?delete this._loader.modules[a]:!1},get:function(a){return this._loader.modules[a]?(t(this._loader.modules[a],[],this),this._loader.modules[a].module):void 0},has:function(a){return!!this._loader.modules[a]},"import":function(a,c){var d=this;return z.resolve(d.normalize(a,c&&c.name,c&&c.address)).then(function(a){var e=d._loader;return e.modules[a]?(t(e.modules[a],[],e._loader),e.modules[a].module):D[a]||x(a,b(e,a,c||{}).then(function(b){return delete D[a],r(e,b)}))})},load:function(a){return this._loader.modules[a]?(t(this._loader.modules[a],[],this._loader),z.resolve(this._loader.modules[a].module)):D[a]||x(a,b(this._loader,a,{}))},module:function(b,c){var d=a();d.address=c&&c.address;var e=h(this._loader,d),g=z.resolve(b),i=this._loader,j=e.done.then(function(){return r(i,d)});return f(i,d,g),j},newModule:function(a){if("object"!=typeof a)throw new TypeError("Expected object");var b=new w;for(var c in a)!function(c){y(b,c,{configurable:!1,enumerable:!0,get:function(){return a[c]}})}(c);return Object.preventExtensions&&Object.preventExtensions(b),b},set:function(a,b){if(!(b instanceof w))throw new TypeError("Loader.set("+a+", module) must be a module");this._loader.modules[a]={module:b}},normalize:function(a){return a},locate:function(a){return a.name},fetch:function(){throw new TypeError("Fetch not implemented")},translate:function(a){return a.source},parse:function(){throw new TypeError("Loader.parse is not implemented")},instantiate:function(){}};var E=v.prototype.newModule;!function(){function a(a,b){if(a.errors.length){for(var c=0,d=a.errors.length;d>c;c++);throw new Error("Parse of "+b.name+", "+b.address+" failed, "+a.errors.length)}}var b;v.prototype.parse=function(c){if(!b)if("undefined"==typeof window)b=require("traceur");else{if(!__global.traceur)throw new TypeError("Include Traceur for module syntax support");b=__global.traceur}c.isDeclarative=!0;var d=new b.Compiler,e=System.traceurOptions||{};e.modules="instantiate",e.sourceMaps=!0,e.filename=c.address;var f=d.stringToTree({content:c.source,options:e});a(f),f=d.treeToTree(f),a(f),f=d.treeToString(f),a(f);var g=f.js,h=f.generatedSourceMap;__global.btoa&&h&&(g+="\n//# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(h)))+"\n"),__eval(g,__global,c)}}(),"object"==typeof exports&&(module.exports=v),__global.Reflect=__global.Reflect||{},__global.Reflect.Loader=__global.Reflect.Loader||v,__global.Reflect.global=__global.Reflect.global||__global,__global.LoaderPolyfill=v}();var __curRegister}("undefined"!=typeof global?global:this),function(a){function b(a){var b=String(a).replace(/^\s+|\s+$/g,"").match(/^([^:\/?#]+:)?(\/\/(?:[^:@]*(?::[^:@]*)?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);return b?{href:b[0]||"",protocol:b[1]||"",authority:b[2]||"",host:b[3]||"",hostname:b[4]||"",port:b[5]||"",pathname:b[6]||"",search:b[7]||"",hash:b[8]||""}:null}function c(a){var b=[];return a.replace(/^(\.\.?(\/|$))+/,"").replace(/\/(\.(\/|$))+/g,"/").replace(/\/\.\.$/,"/../").replace(/\/?[^\/]*/g,function(a){"/.."===a?b.pop():b.push(a)}),b.join("").replace(/^\//,"/"===a.charAt(0)?"/":"")}function d(a,d){return d=b(d||""),a=b(a||""),d&&a?(d.protocol||a.protocol)+(d.protocol||d.authority?d.authority:a.authority)+c(d.protocol||d.authority||"/"===d.pathname.charAt(0)?d.pathname:d.pathname?(a.authority&&!a.pathname?"/":"")+a.pathname.slice(0,a.pathname.lastIndexOf("/")+1)+d.pathname:a.pathname)+(d.protocol||d.authority||d.pathname?d.search:d.search||a.search)+d.hash:null}function e(){document.removeEventListener("DOMContentLoaded",e,!1),window.removeEventListener("load",e,!1),f()}function f(){for(var a=document.getElementsByTagName("script"),b=0;b<a.length;b++){var c=a[b];if("module"==c.type){var d=c.innerHTML;l.module(d)["catch"](function(a){setTimeout(function(){throw a})})}}}var g,h="undefined"!=typeof window,i=a.Reflect&&a.Reflect.Loader||require("./loader"),j=a.Promise||require("when/es6-shim/Promise");if(h)g=function(a,b,c){function d(){b(f.responseText)}function e(){c(f.statusText+": "+a||"XHR error")}var f=new XMLHttpRequest,g=!0;if(!("withCredentials"in f)){var h=/^(\w+:)?\/\/([^\/]+)/.exec(a);h&&(g=h[2]===window.location.host,h[1]&&(g&=h[1]===window.location.protocol))}g||(f=new XDomainRequest,f.onload=d,f.onerror=e,f.ontimeout=e),f.onreadystatechange=function(){4===f.readyState&&(200===f.status||0==f.status&&f.responseText?d():e())},f.open("GET",a,!0),f.send(null)};else{var k;g=function(a,b,c){return k=k||require("fs"),k.readFile(a,function(a,d){return a?c(a):(b(d+""),void 0)})}}var l=new i({global:h?window:a,strict:!0,normalize:function(a,b){if("string"!=typeof a)throw new TypeError("Module name must be a string");var c=a.split("/");if(0==c.length)throw new TypeError("No module name provided");var d=0,e=!1,f=0;if("."==c[0]){if(d++,d==c.length)throw new TypeError('Illegal module name "'+a+'"');e=!0}else{for(;".."==c[d];)if(d++,d==c.length)throw new TypeError('Illegal module name "'+a+'"');d&&(e=!0),f=d}for(var g=d;g<c.length;g++){var h=c[g];if(""==h||"."==h||".."==h)throw new TypeError('Illegal module name "'+a+'"')}if(!e)return a;{var i=[],j=(b||"").split("/");j.length-1-f}return i=i.concat(j.splice(0,j.length-1-f)),i=i.concat(c.splice(d,c.length-d)),i.join("/")},locate:function(a){var b,c=a.name,e="";for(var f in this.paths){var g=f.split("*");if(g.length>2)throw new TypeError("Only one wildcard in a path is permitted");if(1==g.length){if(c==f&&f.length>e.length){e=f;break}}else c.substr(0,g[0].length)==g[0]&&c.substr(c.length-g[1].length)==g[1]&&(e=f,b=c.substr(g[0].length,c.length-g[1].length-g[0].length))}var i=this.paths[e];if(b&&(i=i.replace("*",b)),h){for(var j=i.split("/"),k=0,l=j.length;l>k;k++)j[k]=encodeURIComponent(j[k]);i=j.join("/")}return d(this.baseURL,i)},fetch:function(a){var b=this;return new j(function(c,e){g(d(b.baseURL,a.address),function(a){c(a)},e)})}});if(h){var m=window.location.href.split("#")[0].split("?")[0];l.baseURL=m.substring(0,m.lastIndexOf("/")+1)}else l.baseURL=process.cwd()+"/";if(l.paths={"*":"*.js"},"object"==typeof exports&&(module.exports=l),a.System=l,h){var n=document.getElementsByTagName("script");n=n[n.length-1],"complete"===document.readyState?setTimeout(f):document.addEventListener&&(document.addEventListener("DOMContentLoaded",e,!1),window.addEventListener("load",e,!1)),n.getAttribute("data-init")&&window[n.getAttribute("data-init")]()}}("undefined"!=typeof global?global:this); |
/* | ||
* es6-module-loader v0.8.0 | ||
* es6-module-loader v0.8.1 | ||
* https://github.com/ModuleLoader/es6-module-loader | ||
* Copyright (c) 2014 Guy Bedford, Luke Hoban, Addy Osmani; Licensed MIT | ||
*/ | ||
!function(a){"object"==typeof exports?module.exports=a():"function"==typeof define&&define.amd?define(a):"undefined"!=typeof window?window.Promise=a():"undefined"!=typeof global?global.Promise=a():"undefined"!=typeof self&&(self.Promise=a())}(function(){var a;return function b(a,c,d){function e(g,h){if(!c[g]){if(!a[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};a[g][0].call(j.exports,function(b){var c=a[g][1][b];return e(c?c:b)},j,j.exports,b,a,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b){var c=a("../lib/decorators/unhandledRejection"),d=c(a("../lib/Promise"));b.exports="undefined"!=typeof global?global.Promise=d:"undefined"!=typeof self?self.Promise=d:d},{"../lib/Promise":2,"../lib/decorators/unhandledRejection":6}],2:[function(b,c){!function(a){"use strict";a(function(a){var b=a("./makePromise"),c=a("./Scheduler"),d=a("./async");return b({scheduler:new c(d)})})}("function"==typeof a&&a.amd?a:function(a){c.exports=a(b)})},{"./Scheduler":4,"./async":5,"./makePromise":7}],3:[function(b,c){!function(a){"use strict";a(function(){function a(a){this.head=this.tail=this.length=0,this.buffer=new Array(1<<a)}return a.prototype.push=function(a){return this.length===this.buffer.length&&this._ensureCapacity(2*this.length),this.buffer[this.tail]=a,this.tail=this.tail+1&this.buffer.length-1,++this.length,this.length},a.prototype.shift=function(){var a=this.buffer[this.head];return this.buffer[this.head]=void 0,this.head=this.head+1&this.buffer.length-1,--this.length,a},a.prototype._ensureCapacity=function(a){var b,c=this.head,d=this.buffer,e=new Array(a),f=0;if(0===c)for(b=this.length;b>f;++f)e[f]=d[f];else{for(a=d.length,b=this.tail;a>c;++f,++c)e[f]=d[c];for(c=0;b>c;++f,++c)e[f]=d[c]}this.buffer=e,this.head=0,this.tail=this.length},a})}("function"==typeof a&&a.amd?a:function(a){c.exports=a()})},{}],4:[function(b,c){!function(a){"use strict";a(function(a){function b(a){this._async=a,this._queue=new d(15),this._afterQueue=new d(5),this._running=!1;var b=this;this.drain=function(){b._drain()}}function c(a){for(;a.length>0;)a.shift().run()}var d=a("./Queue");return b.prototype.enqueue=function(a){this._add(this._queue,a)},b.prototype.afterQueue=function(a){this._add(this._afterQueue,a)},b.prototype._drain=function(){c(this._queue),this._running=!1,c(this._afterQueue)},b.prototype._add=function(a,b){a.push(b),this._running||(this._running=!0,this._async(this.drain))},b})}("function"==typeof a&&a.amd?a:function(a){c.exports=a(b)})},{"./Queue":3}],5:[function(b,c){!function(a){"use strict";a(function(a){var b,c;return b="undefined"!=typeof process&&null!==process&&"function"==typeof process.nextTick?function(a){process.nextTick(a)}:(c="function"==typeof MutationObserver&&MutationObserver||"function"==typeof WebKitMutationObserver&&WebKitMutationObserver)?function(a,b){function c(){var a=d;d=void 0,a()}var d,e=a.createElement("div"),f=new b(c);return f.observe(e,{attributes:!0}),function(a){d=a,e.setAttribute("class","x")}}(document,c):function(a){try{return a("vertx").runOnLoop||a("vertx").runOnContext}catch(b){}var c=setTimeout;return function(a){c(a,0)}}(a)})}("function"==typeof a&&a.amd?a:function(a){c.exports=a(b)})},{}],6:[function(b,c){!function(a){"use strict";a(function(a){function b(a){var b="object"==typeof a&&a.stack?a.stack:c(a);return a instanceof Error?b:b+" (WARNING: non-Error used)"}function c(a){var b=String(a);return"[object Object]"===b&&"undefined"!=typeof JSON&&(b=d(a,b)),b}function d(a,b){try{return JSON.stringify(a)}catch(a){return b}}function e(a){throw a}function f(){}var g=a("../timer");return function(a){function d(a){a.handled||(n.push(a),k("Potentially unhandled rejection ["+a.id+"] "+b(a.value)))}function h(a){var b=n.indexOf(a);b>=0&&(n.splice(b,1),l("Handled previous rejection ["+a.id+"] "+c(a.value)))}function i(a,b){m.push(a,b),o||(o=!0,o=g.set(j,0))}function j(){for(o=!1;m.length>0;)m.shift()(m.shift())}var k=f,l=f;"undefined"!=typeof console&&(k="undefined"!=typeof console.error?function(a){}:function(a){},l="undefined"!=typeof console.info?function(a){}:function(a){}),a.onPotentiallyUnhandledRejection=function(a){i(d,a)},a.onPotentiallyUnhandledRejectionHandled=function(a){i(h,a)},a.onFatalRejection=function(a){i(e,a.value)};var m=[],n=[],o=!1;return a}})}("function"==typeof a&&a.amd?a:function(a){c.exports=a(b)})},{"../timer":8}],7:[function(b,c){!function(a){"use strict";a(function(){return function(a){function b(a,b){this._handler=a===l?b:c(a)}function c(a){function b(a){e.resolve(a)}function c(a){e.reject(a)}function d(a){e.notify(a)}var e=new n;try{a(b,c,d)}catch(f){c(f)}return e}function d(a){return A(a)?a:new b(l,new p(j(a)))}function e(a){return new b(l,new p(new s(a)))}function f(){return P}function g(){return new b(l,new n)}function h(a){function c(a,b,c){this[a]=b,0===--i&&c.become(new r(this))}var d,e,f,g,h=new n,i=a.length>>>0,j=new Array(i);for(d=0;d<a.length;++d)if(f=a[d],void 0!==f||d in a)if(B(f))if(e=A(f)?f._handler.join():k(f),g=e.state(),0===g)e.fold(c,d,j,h);else{if(!(g>0)){h.become(e);break}j[d]=e.value,--i}else j[d]=f,--i;else--i;return 0===i&&h.become(new r(j)),new b(l,h)}function i(a){if(Object(a)===a&&0===a.length)return f();var c,d,e=new n;for(c=0;c<a.length;++c)d=a[c],void 0!==d&&c in a&&j(d).visit(e,e.resolve,e.reject);return new b(l,e)}function j(a){return A(a)?a._handler.join():B(a)?k(a):new r(a)}function k(a){try{var b=a.then;return"function"==typeof b?new q(b,a):new r(a)}catch(c){return new s(c)}}function l(){}function m(){}function n(a,c){b.createContext(this,c),this.consumers=void 0,this.receiver=a,this.handler=void 0,this.resolved=!1}function o(a){this.handler=a}function p(a){o.call(this,a)}function q(a,b){n.call(this),K.enqueue(new y(a,b,this))}function r(a){b.createContext(this),this.value=a}function s(a){b.createContext(this),this.id=++N,this.value=a,this.handled=!1,this.reported=!1,this._report()}function t(a,b){this.rejection=a,this.context=b}function u(a){this.rejection=a}function v(){return new s(new TypeError("Promise cycle"))}function w(a,b){this.continuation=a,this.handler=b}function x(a,b){this.handler=b,this.value=a}function y(a,b,c){this._then=a,this.thenable=b,this.resolver=c}function z(a,b,c,d,e){try{a.call(b,c,d,e)}catch(f){d(f)}}function A(a){return a instanceof b}function B(a){return("object"==typeof a||"function"==typeof a)&&null!==a}function C(a,c,d,e){return"function"!=typeof a?e.become(c):(b.enterContext(c),F(a,c.value,d,e),b.exitContext(),void 0)}function D(a,c,d,e,f){return"function"!=typeof a?f.become(d):(b.enterContext(d),G(a,c,d.value,e,f),b.exitContext(),void 0)}function E(a,c,d,e,f){return"function"!=typeof a?f.notify(c):(b.enterContext(d),H(a,c,e,f),b.exitContext(),void 0)}function F(a,b,c,d){try{d.become(j(a.call(c,b)))}catch(e){d.become(new s(e))}}function G(a,b,c,d,e){try{a.call(d,b,c,e)}catch(f){e.become(new s(f))}}function H(a,b,c,d){try{d.notify(a.call(c,b))}catch(e){d.notify(e)}}function I(a,b){b.prototype=L(a.prototype),b.prototype.constructor=b}function J(){}var K=a.scheduler,L=Object.create||function(a){function b(){}return b.prototype=a,new b};b.resolve=d,b.reject=e,b.never=f,b._defer=g,b._handler=j,b.prototype.then=function(a,c){var d=this._handler;if("function"!=typeof a&&d.join().state()>0)return new b(l,d);var e=this._beget(),f=e._handler;return d.chain(f,d.receiver,a,c,arguments.length>2?arguments[2]:void 0),e},b.prototype["catch"]=function(a){return this.then(void 0,a)},b.prototype._beget=function(){var a=this._handler,b=new n(a.receiver,a.join().context);return new this.constructor(l,b)},b.all=h,b.race=i,l.prototype.when=l.prototype.become=l.prototype.notify=l.prototype.fail=l.prototype._unreport=l.prototype._report=J,l.prototype._state=0,l.prototype.state=function(){return this._state},l.prototype.join=function(){for(var a=this;void 0!==a.handler;)a=a.handler;return a},l.prototype.chain=function(a,b,c,d,e){this.when({resolver:a,receiver:b,fulfilled:c,rejected:d,progress:e})},l.prototype.visit=function(a,b,c,d){this.chain(M,a,b,c,d)},l.prototype.fold=function(a,b,c,d){this.visit(d,function(d){a.call(c,b,d,this)},d.reject,d.notify)},I(l,m),m.prototype.become=function(a){a.fail()};var M=new m;I(l,n),n.prototype._state=0,n.prototype.resolve=function(a){this.become(j(a))},n.prototype.reject=function(a){this.resolved||this.become(new s(a))},n.prototype.join=function(){if(!this.resolved)return this;for(var a=this;void 0!==a.handler;)if(a=a.handler,a===this)return this.handler=v();return a},n.prototype.run=function(){var a=this.consumers,b=this.join();this.consumers=void 0;for(var c=0;c<a.length;++c)b.when(a[c])},n.prototype.become=function(a){this.resolved||(this.resolved=!0,this.handler=a,void 0!==this.consumers&&K.enqueue(this),void 0!==this.context&&a._report(this.context))},n.prototype.when=function(a){this.resolved?K.enqueue(new w(a,this.handler)):void 0===this.consumers?this.consumers=[a]:this.consumers.push(a)},n.prototype.notify=function(a){this.resolved||K.enqueue(new x(a,this))},n.prototype.fail=function(a){var b="undefined"==typeof a?this.context:a;this.resolved&&this.handler.join().fail(b)},n.prototype._report=function(a){this.resolved&&this.handler.join()._report(a)},n.prototype._unreport=function(){this.resolved&&this.handler.join()._unreport()},I(l,o),o.prototype._report=function(a){this.join()._report(a)},o.prototype._unreport=function(){this.join()._unreport()},I(o,p),p.prototype.when=function(a){K.enqueue(new w(a,this))},I(n,q),I(l,r),r.prototype._state=1,r.prototype.fold=function(a,b,c,d){D(a,b,this,c,d)},r.prototype.when=function(a){C(a.fulfilled,this,a.receiver,a.resolver)};var N=0;I(l,s),s.prototype._state=-1,s.prototype.fold=function(a,b,c,d){d.become(this)},s.prototype.when=function(a){"function"==typeof a.rejected&&this._unreport(),C(a.rejected,this,a.receiver,a.resolver)},s.prototype._report=function(a){K.afterQueue(new t(this,a))},s.prototype._unreport=function(){this.handled=!0,K.afterQueue(new u(this))},s.prototype.fail=function(a){b.onFatalRejection(this,void 0===a?this.context:a)},t.prototype.run=function(){this.rejection.handled||(this.rejection.reported=!0,b.onPotentiallyUnhandledRejection(this.rejection,this.context))},u.prototype.run=function(){this.rejection.reported&&b.onPotentiallyUnhandledRejectionHandled(this.rejection)},b.createContext=b.enterContext=b.exitContext=b.onPotentiallyUnhandledRejection=b.onPotentiallyUnhandledRejectionHandled=b.onFatalRejection=J;var O=new l,P=new b(l,O);return w.prototype.run=function(){this.handler.join().when(this.continuation)},x.prototype.run=function(){var a=this.handler.consumers;if(void 0!==a)for(var b,c=0;c<a.length;++c)b=a[c],E(b.progress,this.value,this.handler,b.receiver,b.resolver)},y.prototype.run=function(){function a(a){d.resolve(a)}function b(a){d.reject(a)}function c(a){d.notify(a)}var d=this.resolver;z(this._then,this.thenable,a,b,c)},b}})}("function"==typeof a&&a.amd?a:function(a){c.exports=a()})},{}],8:[function(b,c){!function(a){"use strict";a(function(a){var b,c,d,e;b=a;try{c=b("vertx"),d=function(a,b){return c.setTimer(b,a)},e=c.cancelTimer}catch(f){d=function(a,b){return setTimeout(a,b)},e=function(a){return clearTimeout(a)}}return{set:d,clear:e}})}("function"==typeof a&&a.amd?a:function(a){c.exports=a(b)})},{}]},{},[1])(1)}),function(__global){function __eval(__source,__global,load){__curRegister=System.register,System.register=function(a,b,c){"string"!=typeof a&&(c=b,b=a),load.declare=c,load.depsList=b};try{eval('(function() { var __moduleName = "'+(load.name||"").replace('"','"')+'"; '+__source+" \n }).call(__global);")}catch(e){throw("SyntaxError"==e.name||"TypeError"==e.name)&&(e.message="Evaluating "+(load.name||load.address)+"\n "+e.message),e}System.register=__curRegister}!function(){function a(a){return{status:"loading",name:a,linkSets:[],dependencies:[],metadata:{}}}function b(a,b,c){return new z(g({step:c.address?"fetch":"locate",loader:a,moduleName:b,moduleMetadata:c&&c.metadata||{},moduleSource:c.source,moduleAddress:c.address}))}function c(b,c,e,f){return new z(function(a){a(b.loaderObj.normalize(c,e,f))}).then(function(c){var e;if(b.modules[c])return e=a(c),e.status="linked",e;for(var f=0,g=b.loads.length;g>f;f++)if(e=b.loads[f],e.name==c)return e;return e=a(c),b.loads.push(e),d(b,e),e})}function d(a,b){e(a,b,z.resolve().then(function(){return a.loaderObj.locate({name:b.name,metadata:b.metadata})}))}function e(a,b,c){f(a,b,c.then(function(c){return"loading"==b.status?(b.address=c,a.loaderObj.fetch({name:b.name,metadata:b.metadata,address:c})):void 0}))}function f(a,b,d){d.then(function(c){return"loading"==b.status?a.loaderObj.translate({name:b.name,metadata:b.metadata,address:b.address,source:c}):void 0}).then(function(c){return"loading"==b.status?(b.source=c,a.loaderObj.instantiate({name:b.name,metadata:b.metadata,address:b.address,source:c})):void 0}).then(function(d){if("loading"==b.status){if(void 0===d)b.address=b.address||"anon"+ ++B,b.isDeclarative=!0,a.loaderObj.parse(b);else{if("object"!=typeof d)throw TypeError("Invalid instantiate return value");b.depsList=d.deps||[],b.execute=d.execute,b.isDeclarative=!1}b.dependencies=[];for(var e=b.depsList,f=[],g=0,h=e.length;h>g;g++)(function(d,e){f.push(c(a,d,b.name,b.address).then(function(a){if(b.dependencies[e]={key:d,value:a.name},"linked"!=a.status)for(var c=b.linkSets.concat([]),f=0,g=c.length;g>f;f++)i(c[f],a)}))})(e[g],g);return z.all(f)}}).then(function(){b.status="loaded";for(var a=b.linkSets.concat([]),c=0,d=a.length;d>c;c++)k(a[c],b)})["catch"](function(a){b.status="failed",b.exception=a;for(var c=b.linkSets.concat([]),d=0,e=c.length;e>d;d++)l(c[d],a)})}function g(b){return function(c){var g=b.loader,i=b.moduleName,j=b.step;if(g.modules[i])throw new TypeError('"'+i+'" already exists in the module table');for(var k=0,l=g.loads.length;l>k;k++)if(g.loads[k].name==i)throw new TypeError('"'+i+'" already loading');var m=a(i);m.metadata=b.moduleMetadata;var n=h(g,m);g.loads.push(m),c(n.done),"locate"==j?d(g,m):"fetch"==j?e(g,m,z.resolve(b.moduleAddress)):(m.address=b.moduleAddress,f(g,m,z.resolve(b.moduleSource)))}}function h(a,b){var c={loader:a,loads:[],startingLoad:b,loadingCount:0};return c.done=new z(function(a,b){c.resolve=a,c.reject=b}),i(c,b),c}function i(a,b){for(var c=0,d=a.loads.length;d>c;c++)if(a.loads[c]==b)return;a.loads.push(b),b.linkSets.push(a),"loaded"!=b.status&&a.loadingCount++;for(var e=a.loader,c=0,d=b.dependencies.length;d>c;c++){var f=b.dependencies[c].value;if(!e.modules[f])for(var g=0,h=e.loads.length;h>g;g++)if(e.loads[g].name==f){i(a,e.loads[g]);break}}}function j(a){try{o(a)}catch(b){return l(a,b),!0}}function k(a,b){if(a.loadingCount--,!(a.loadingCount>0)){var c=a.startingLoad;if(a.loader.loaderObj.execute===!1){for(var d=[].concat(a.loads),e=0,f=d.length;f>e;e++){var b=d[e];b.module=b.isDeclarative?{name:b.name,module:E({}),evaluated:!0}:{module:E({})},b.status="linked",m(a.loader,b)}return a.resolve(c)}var g=j(a);g||a.resolve(c)}}function l(a,b){for(var c=a.loader,d=a.loads.concat([]),e=0,f=d.length;f>e;e++){var g=d[e];c.loaderObj.failed=c.loaderObj.failed||[],-1==A.call(c.loaderObj.failed,g)&&c.loaderObj.failed.push(g);var h=A.call(g.linkSets,a);if(g.linkSets.splice(h,1),0==g.linkSets.length){var i=A.call(a.loader.loads,g);-1!=i&&a.loader.loads.splice(i,1)}}a.reject(b)}function m(a,b){if(a.loaderObj.trace){a.loaderObj.loads||(a.loaderObj.loads={});var c={};b.dependencies.forEach(function(a){c[a.key]=a.value}),a.loaderObj.loads[b.name]={name:b.name,deps:b.dependencies.map(function(a){return a.key}),depMap:c,address:b.address,metadata:b.metadata,source:b.source,kind:b.isDeclarative?"declarative":"dynamic"}}b.name&&(a.modules[b.name]=b.module);var d=A.call(a.loads,b);-1!=d&&a.loads.splice(d,1);for(var e=0,f=b.linkSets.length;f>e;e++)d=A.call(b.linkSets[e].loads,b),-1!=d&&b.linkSets[e].loads.splice(d,1);b.linkSets.splice(0,b.linkSets.length)}function n(a,b,c,d){if(c[a.groupIndex]=c[a.groupIndex]||[],-1==A.call(c[a.groupIndex],a)){c[a.groupIndex].push(a);for(var e=0,f=b.length;f>e;e++)for(var g=b[e],h=0;h<a.dependencies.length;h++)if(g.name==a.dependencies[h].value){var i=a.groupIndex+(g.isDeclarative!=a.isDeclarative);if(void 0===g.groupIndex||g.groupIndex<i){if(g.groupIndex&&(c[g.groupIndex].splice(A.call(c[g.groupIndex],g),1),0==c[g.groupIndex].length))throw new TypeError("Mixed dependency cycle detected");g.groupIndex=i}n(g,b,c,d)}}}function o(a){var b=a.loader;if(a.loads.length){var c=[],d=a.loads[0];d.groupIndex=0,n(d,a.loads,c,b);for(var e=d.isDeclarative==c.length%2,f=c.length-1;f>=0;f--){for(var g=c[f],h=0;h<g.length;h++){var i=g[h];if(e)q(i,a.loads,b);else{var j=i.execute();if(!(j&&j instanceof w))throw new TypeError("Execution must define a Module instance");i.module={module:j},i.status="linked"}m(b,i)}e=!e}}}function p(a){return C[a]||(C[a]={name:a,dependencies:[],module:new w,importers:[]})}function q(a,b,c){if(!a.module){var d=a.module=p(a.name),e=a.module.module,f=a.declare.call(__global,function(a,b){d.locked=!0,e[a]=b;for(var c=0,f=d.importers.length;f>c;c++){var g=d.importers[c];if(!g.locked){var h=A.call(g.dependencies,d);g.setters[h](e)}}return d.locked=!1,b});d.setters=f.setters,d.execute=f.execute;for(var g=0,h=a.dependencies.length;h>g;g++){var i=a.dependencies[g].value,j=c.modules[i];if(!j)for(var k=0;k<b.length;k++)b[k].name==i&&(b[k].module?j=p(i):(q(b[k],b,c),j=b[k].module));j.importers&&(j.importers.push(d),d.dependencies.push(j)),d.setters[g]&&d.setters[g](j.module)}a.status="linked"}}function r(a,b){return t(b.module,[],a),b.module.module}function s(a){try{a.execute.call(__global)}catch(b){return b}}function t(a,b,c){var d=u(a,b,c);if(d)throw d}function u(a,b,c){if(!a.evaluated&&a.dependencies){b.push(a);for(var d,e=a.dependencies,f=0,g=e.length;g>f;f++){var h=e[f];if(-1==A.call(b,h)&&(d=u(h,b,c)))return d+"\n in module "+h.name}if(a.failed)return new Error("Module failed execution.");if(!a.evaluated)return a.evaluated=!0,d=s(a),d?a.failed=!0:Object.preventExtensions&&Object.preventExtensions(a.module),a.execute=void 0,d}}function v(a){if("object"!=typeof a)throw new TypeError("Options must be an object");a.normalize&&(this.normalize=a.normalize),a.locate&&(this.locate=a.locate),a.fetch&&(this.fetch=a.fetch),a.translate&&(this.translate=a.translate),a.instantiate&&(this.instantiate=a.instantiate),this._loader={loaderObj:this,loads:[],modules:{}},y(this,"global",{get:function(){return __global}})}function w(){}function x(a,b){return D[a]=b,b.then(function(){D[a]=void 0}),b["catch"](function(){D[a]=void 0}),b}var y,z=__global.Promise||require("when/es6-shim/Promise");!function(){try{Object.defineProperty({},"a",{})&&(y=Object.defineProperty)}catch(a){y=function(a,b,c){try{a[b]=c.value||c.get.call(a)}catch(d){}}}}(),console.assert=console.assert||function(){};var A=Array.prototype.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},B=0,C={},D={};v.prototype={constructor:v,define:function(a,b,c){if(D[a])throw new TypeError("Module is already loading.");return x(a,new z(g({step:"translate",loader:this._loader,moduleName:a,moduleMetadata:c&&c.metadata||{},moduleSource:b,moduleAddress:c&&c.address})))},"delete":function(a){return this._loader.modules[a]?delete this._loader.modules[a]:!1},get:function(a){return this._loader.modules[a]?(t(this._loader.modules[a],[],this),this._loader.modules[a].module):void 0},has:function(a){return!!this._loader.modules[a]},"import":function(a,c){var d=this;return z.resolve(d.normalize(a,c&&c.name,c&&c.address)).then(function(a){var e=d._loader;return e.modules[a]?(t(e.modules[a],[],e._loader),e.modules[a].module):D[a]||x(a,b(e,a,c||{}).then(function(b){return delete D[a],r(e,b)}))})},load:function(a){return this._loader.modules[a]?(t(this._loader.modules[a],[],this._loader),z.resolve(this._loader.modules[a].module)):D[a]||x(a,b(this._loader,a,{}))},module:function(b,c){var d=a();d.address=c&&c.address;var e=h(this._loader,d),g=z.resolve(b),i=this._loader,j=e.done.then(function(){return r(i,d)});return f(i,d,g),j},newModule:function(a){if("object"!=typeof a)throw new TypeError("Expected object");var b=new w;for(var c in a)!function(c){y(b,c,{configurable:!1,enumerable:!0,get:function(){return a[c]}})}(c);return Object.preventExtensions&&Object.preventExtensions(b),b},set:function(a,b){if(!(b instanceof w))throw new TypeError("Loader.set("+a+", module) must be a module");this._loader.modules[a]={module:b}},normalize:function(a){return a},locate:function(a){return a.name},fetch:function(){throw new TypeError("Fetch not implemented")},translate:function(a){return a.source},parse:function(){throw new TypeError("Loader.parse is not implemented")},instantiate:function(){}};var E=v.prototype.newModule;!function(){function a(a,b){if(a.errors.length){for(var c=0,d=a.errors.length;d>c;c++);throw new Error("Parse of "+b.name+", "+b.address+" failed, "+a.errors.length)}}var b;v.prototype.parse=function(c){if(!b)if("undefined"==typeof window)b=require("traceur");else{if(!__global.traceur)throw new TypeError("Include Traceur for module syntax support");b=__global.traceur}c.isDeclarative=!0;var d=new b.Compiler,e=System.traceurOptions||{};e.modules="instantiate";var f=d.stringToTree({content:c.source,options:e});a(f),f=d.treeToTree(f),a(f),f=d.treeToString(f),a(f);var g=f.js,h=f.generatedSourceMap;__global.btoa&&h&&(g+="\n//# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(h)))+"\n"),__eval(g,__global,c)}}(),"object"==typeof exports&&(module.exports=v),__global.Reflect=__global.Reflect||{},__global.Reflect.Loader=__global.Reflect.Loader||v,__global.Reflect.global=__global.Reflect.global||__global,__global.LoaderPolyfill=v}();var __curRegister}("undefined"!=typeof global?global:this),function(a){function b(a){var b=String(a).replace(/^\s+|\s+$/g,"").match(/^([^:\/?#]+:)?(\/\/(?:[^:@]*(?::[^:@]*)?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);return b?{href:b[0]||"",protocol:b[1]||"",authority:b[2]||"",host:b[3]||"",hostname:b[4]||"",port:b[5]||"",pathname:b[6]||"",search:b[7]||"",hash:b[8]||""}:null}function c(a){var b=[];return a.replace(/^(\.\.?(\/|$))+/,"").replace(/\/(\.(\/|$))+/g,"/").replace(/\/\.\.$/,"/../").replace(/\/?[^\/]*/g,function(a){"/.."===a?b.pop():b.push(a)}),b.join("").replace(/^\//,"/"===a.charAt(0)?"/":"")}function d(a,d){return d=b(d||""),a=b(a||""),d&&a?(d.protocol||a.protocol)+(d.protocol||d.authority?d.authority:a.authority)+c(d.protocol||d.authority||"/"===d.pathname.charAt(0)?d.pathname:d.pathname?(a.authority&&!a.pathname?"/":"")+a.pathname.slice(0,a.pathname.lastIndexOf("/")+1)+d.pathname:a.pathname)+(d.protocol||d.authority||d.pathname?d.search:d.search||a.search)+d.hash:null}function e(){document.removeEventListener("DOMContentLoaded",e,!1),window.removeEventListener("load",e,!1),f()}function f(){for(var a=document.getElementsByTagName("script"),b=0;b<a.length;b++){var c=a[b];if("module"==c.type){var d=c.innerHTML;l.module(d)["catch"](function(a){setTimeout(function(){throw a})})}}}var g,h="undefined"!=typeof window,i=a.Reflect&&a.Reflect.Loader||require("./loader"),j=a.Promise||require("when/es6-shim/Promise");if(h)g=function(a,b,c){function d(){b(f.responseText)}function e(){c(f.statusText+": "+a||"XHR error")}var f=new XMLHttpRequest,g=!0;if(!("withCredentials"in f)){var h=/^(\w+:)?\/\/([^\/]+)/.exec(a);h&&(g=h[2]===window.location.host,h[1]&&(g&=h[1]===window.location.protocol))}g||(f=new XDomainRequest,f.onload=d,f.onerror=e,f.ontimeout=e),f.onreadystatechange=function(){4===f.readyState&&(200===f.status||0==f.status&&f.responseText?d():e())},f.open("GET",a,!0),f.send(null)};else{var k;g=function(a,b,c){return k=k||require("fs"),k.readFile(a,function(a,d){return a?c(a):(b(d+""),void 0)})}}var l=new i({global:h?window:a,strict:!0,normalize:function(a,b){if("string"!=typeof a)throw new TypeError("Module name must be a string");var c=a.split("/");if(0==c.length)throw new TypeError("No module name provided");var d=0,e=!1,f=0;if("."==c[0]){if(d++,d==c.length)throw new TypeError('Illegal module name "'+a+'"');e=!0}else{for(;".."==c[d];)if(d++,d==c.length)throw new TypeError('Illegal module name "'+a+'"');d&&(e=!0),f=d}for(var g=d;g<c.length;g++){var h=c[g];if(""==h||"."==h||".."==h)throw new TypeError('Illegal module name "'+a+'"')}if(!e)return a;{var i=[],j=(b||"").split("/");j.length-1-f}return i=i.concat(j.splice(0,j.length-1-f)),i=i.concat(c.splice(d,c.length-d)),i.join("/")},locate:function(a){var b,c=a.name,e="";for(var f in this.paths){var g=f.split("*");if(g.length>2)throw new TypeError("Only one wildcard in a path is permitted");if(1==g.length){if(c==f&&f.length>e.length){e=f;break}}else c.substr(0,g[0].length)==g[0]&&c.substr(c.length-g[1].length)==g[1]&&(e=f,b=c.substr(g[0].length,c.length-g[1].length-g[0].length))}var h=this.paths[e];return b&&(h=h.replace("*",b)),d(this.baseURL,h)},fetch:function(a){var b=this;return new j(function(c,e){g(d(b.baseURL,a.address),function(a){c(a)},e)})}});if(h){var m=window.location.href.split("#")[0].split("?")[0];l.baseURL=m.substring(0,m.lastIndexOf("/")+1)}else l.baseURL=process.cwd()+"/";if(l.paths={"*":"*.js"},h){var n=document.getElementsByTagName("script");n=n[n.length-1],"complete"===document.readyState?setTimeout(f):document.addEventListener&&(document.addEventListener("DOMContentLoaded",e,!1),window.addEventListener("load",e,!1)),n.getAttribute("data-init")&&window[n.getAttribute("data-init")]()}"object"==typeof exports&&(module.exports=l),a.System=l}("undefined"!=typeof global?global:this); | ||
!function(a){"object"==typeof exports?module.exports=a():"function"==typeof define&&define.amd?define(a):"undefined"!=typeof window?window.Promise=a():"undefined"!=typeof global?global.Promise=a():"undefined"!=typeof self&&(self.Promise=a())}(function(){var a;return function b(a,c,d){function e(g,h){if(!c[g]){if(!a[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};a[g][0].call(j.exports,function(b){var c=a[g][1][b];return e(c?c:b)},j,j.exports,b,a,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b){var c=a("../lib/decorators/unhandledRejection"),d=c(a("../lib/Promise"));b.exports="undefined"!=typeof global?global.Promise=d:"undefined"!=typeof self?self.Promise=d:d},{"../lib/Promise":2,"../lib/decorators/unhandledRejection":6}],2:[function(b,c){!function(a){"use strict";a(function(a){var b=a("./makePromise"),c=a("./Scheduler"),d=a("./async");return b({scheduler:new c(d)})})}("function"==typeof a&&a.amd?a:function(a){c.exports=a(b)})},{"./Scheduler":4,"./async":5,"./makePromise":7}],3:[function(b,c){!function(a){"use strict";a(function(){function a(a){this.head=this.tail=this.length=0,this.buffer=new Array(1<<a)}return a.prototype.push=function(a){return this.length===this.buffer.length&&this._ensureCapacity(2*this.length),this.buffer[this.tail]=a,this.tail=this.tail+1&this.buffer.length-1,++this.length,this.length},a.prototype.shift=function(){var a=this.buffer[this.head];return this.buffer[this.head]=void 0,this.head=this.head+1&this.buffer.length-1,--this.length,a},a.prototype._ensureCapacity=function(a){var b,c=this.head,d=this.buffer,e=new Array(a),f=0;if(0===c)for(b=this.length;b>f;++f)e[f]=d[f];else{for(a=d.length,b=this.tail;a>c;++f,++c)e[f]=d[c];for(c=0;b>c;++f,++c)e[f]=d[c]}this.buffer=e,this.head=0,this.tail=this.length},a})}("function"==typeof a&&a.amd?a:function(a){c.exports=a()})},{}],4:[function(b,c){!function(a){"use strict";a(function(a){function b(a){this._async=a,this._queue=new d(15),this._afterQueue=new d(5),this._running=!1;var b=this;this.drain=function(){b._drain()}}function c(a){for(;a.length>0;)a.shift().run()}var d=a("./Queue");return b.prototype.enqueue=function(a){this._add(this._queue,a)},b.prototype.afterQueue=function(a){this._add(this._afterQueue,a)},b.prototype._drain=function(){c(this._queue),this._running=!1,c(this._afterQueue)},b.prototype._add=function(a,b){a.push(b),this._running||(this._running=!0,this._async(this.drain))},b})}("function"==typeof a&&a.amd?a:function(a){c.exports=a(b)})},{"./Queue":3}],5:[function(b,c){!function(a){"use strict";a(function(a){var b,c;return b="undefined"!=typeof process&&null!==process&&"function"==typeof process.nextTick?function(a){process.nextTick(a)}:(c="function"==typeof MutationObserver&&MutationObserver||"function"==typeof WebKitMutationObserver&&WebKitMutationObserver)?function(a,b){function c(){var a=d;d=void 0,a()}var d,e=a.createElement("div"),f=new b(c);return f.observe(e,{attributes:!0}),function(a){d=a,e.setAttribute("class","x")}}(document,c):function(a){try{return a("vertx").runOnLoop||a("vertx").runOnContext}catch(b){}var c=setTimeout;return function(a){c(a,0)}}(a)})}("function"==typeof a&&a.amd?a:function(a){c.exports=a(b)})},{}],6:[function(b,c){!function(a){"use strict";a(function(a){function b(a){var b="object"==typeof a&&a.stack?a.stack:c(a);return a instanceof Error?b:b+" (WARNING: non-Error used)"}function c(a){var b=String(a);return"[object Object]"===b&&"undefined"!=typeof JSON&&(b=d(a,b)),b}function d(a,b){try{return JSON.stringify(a)}catch(a){return b}}function e(a){throw a}function f(){}var g=a("../timer");return function(a){function d(a){a.handled||(n.push(a),k("Potentially unhandled rejection ["+a.id+"] "+b(a.value)))}function h(a){var b=n.indexOf(a);b>=0&&(n.splice(b,1),l("Handled previous rejection ["+a.id+"] "+c(a.value)))}function i(a,b){m.push(a,b),o||(o=!0,o=g.set(j,0))}function j(){for(o=!1;m.length>0;)m.shift()(m.shift())}var k=f,l=f;"undefined"!=typeof console&&(k="undefined"!=typeof console.error?function(a){}:function(a){},l="undefined"!=typeof console.info?function(a){}:function(a){}),a.onPotentiallyUnhandledRejection=function(a){i(d,a)},a.onPotentiallyUnhandledRejectionHandled=function(a){i(h,a)},a.onFatalRejection=function(a){i(e,a.value)};var m=[],n=[],o=!1;return a}})}("function"==typeof a&&a.amd?a:function(a){c.exports=a(b)})},{"../timer":8}],7:[function(b,c){!function(a){"use strict";a(function(){return function(a){function b(a,b){this._handler=a===l?b:c(a)}function c(a){function b(a){e.resolve(a)}function c(a){e.reject(a)}function d(a){e.notify(a)}var e=new n;try{a(b,c,d)}catch(f){c(f)}return e}function d(a){return z(a)?a:new b(l,new o(j(a)))}function e(a){return new b(l,new o(new r(a)))}function f(){return O}function g(){return new b(l,new n)}function h(a){function c(a,b,c){this[a]=b,0===--i&&c.become(new q(this))}var d,e,f,g,h=new n,i=a.length>>>0,j=new Array(i);for(d=0;d<a.length;++d)if(f=a[d],void 0!==f||d in a)if(A(f))if(e=z(f)?f._handler.join():k(f),g=e.state(),0===g)e.fold(c,d,j,h);else{if(!(g>0)){h.become(e);break}j[d]=e.value,--i}else j[d]=f,--i;else--i;return 0===i&&h.become(new q(j)),new b(l,h)}function i(a){if(Object(a)===a&&0===a.length)return f();var c,d,e=new n;for(c=0;c<a.length;++c)d=a[c],void 0!==d&&c in a&&j(d).visit(e,e.resolve,e.reject);return new b(l,e)}function j(a){return z(a)?a._handler.join():A(a)?k(a):new q(a)}function k(a){try{var b=a.then;return"function"==typeof b?new p(b,a):new q(a)}catch(c){return new r(c)}}function l(){}function m(){}function n(a,c){b.createContext(this,c),this.consumers=void 0,this.receiver=a,this.handler=void 0,this.resolved=!1}function o(a){this.handler=a}function p(a,b){n.call(this),J.enqueue(new x(a,b,this))}function q(a){b.createContext(this),this.value=a}function r(a){b.createContext(this),this.id=++M,this.value=a,this.handled=!1,this.reported=!1,this._report()}function s(a,b){this.rejection=a,this.context=b}function t(a){this.rejection=a}function u(){return new r(new TypeError("Promise cycle"))}function v(a,b){this.continuation=a,this.handler=b}function w(a,b){this.handler=b,this.value=a}function x(a,b,c){this._then=a,this.thenable=b,this.resolver=c}function y(a,b,c,d,e){try{a.call(b,c,d,e)}catch(f){d(f)}}function z(a){return a instanceof b}function A(a){return("object"==typeof a||"function"==typeof a)&&null!==a}function B(a,c,d,e){return"function"!=typeof a?e.become(c):(b.enterContext(c),E(a,c.value,d,e),b.exitContext(),void 0)}function C(a,c,d,e,f){return"function"!=typeof a?f.become(d):(b.enterContext(d),F(a,c,d.value,e,f),b.exitContext(),void 0)}function D(a,c,d,e,f){return"function"!=typeof a?f.notify(c):(b.enterContext(d),G(a,c,e,f),b.exitContext(),void 0)}function E(a,b,c,d){try{d.become(j(a.call(c,b)))}catch(e){d.become(new r(e))}}function F(a,b,c,d,e){try{a.call(d,b,c,e)}catch(f){e.become(new r(f))}}function G(a,b,c,d){try{d.notify(a.call(c,b))}catch(e){d.notify(e)}}function H(a,b){b.prototype=K(a.prototype),b.prototype.constructor=b}function I(){}var J=a.scheduler,K=Object.create||function(a){function b(){}return b.prototype=a,new b};b.resolve=d,b.reject=e,b.never=f,b._defer=g,b._handler=j,b.prototype.then=function(a,c){var d=this._handler;if("function"!=typeof a&&d.join().state()>0)return new b(l,d);var e=this._beget(),f=e._handler;return d.chain(f,d.receiver,a,c,arguments.length>2?arguments[2]:void 0),e},b.prototype["catch"]=function(a){return this.then(void 0,a)},b.prototype._beget=function(){var a=this._handler,b=new n(a.receiver,a.join().context);return new this.constructor(l,b)},b.all=h,b.race=i,l.prototype.when=l.prototype.become=l.prototype.notify=l.prototype.fail=l.prototype._unreport=l.prototype._report=I,l.prototype._state=0,l.prototype.state=function(){return this._state},l.prototype.join=function(){for(var a=this;void 0!==a.handler;)a=a.handler;return a},l.prototype.chain=function(a,b,c,d,e){this.when({resolver:a,receiver:b,fulfilled:c,rejected:d,progress:e})},l.prototype.visit=function(a,b,c,d){this.chain(L,a,b,c,d)},l.prototype.fold=function(a,b,c,d){this.visit(d,function(d){a.call(c,b,d,this)},d.reject,d.notify)},H(l,m),m.prototype.become=function(a){a.fail()};var L=new m;H(l,n),n.prototype._state=0,n.prototype.resolve=function(a){this.become(j(a))},n.prototype.reject=function(a){this.resolved||this.become(new r(a))},n.prototype.join=function(){if(!this.resolved)return this;for(var a=this;void 0!==a.handler;)if(a=a.handler,a===this)return this.handler=u();return a},n.prototype.run=function(){var a=this.consumers,b=this.join();this.consumers=void 0;for(var c=0;c<a.length;++c)b.when(a[c])},n.prototype.become=function(a){this.resolved||(this.resolved=!0,this.handler=a,void 0!==this.consumers&&J.enqueue(this),void 0!==this.context&&a._report(this.context))},n.prototype.when=function(a){this.resolved?J.enqueue(new v(a,this.handler)):void 0===this.consumers?this.consumers=[a]:this.consumers.push(a)},n.prototype.notify=function(a){this.resolved||J.enqueue(new w(a,this))},n.prototype.fail=function(a){var b="undefined"==typeof a?this.context:a;this.resolved&&this.handler.join().fail(b)},n.prototype._report=function(a){this.resolved&&this.handler.join()._report(a)},n.prototype._unreport=function(){this.resolved&&this.handler.join()._unreport()},H(l,o),o.prototype.when=function(a){J.enqueue(new v(a,this))},o.prototype._report=function(a){this.join()._report(a)},o.prototype._unreport=function(){this.join()._unreport()},H(n,p),H(l,q),q.prototype._state=1,q.prototype.fold=function(a,b,c,d){C(a,b,this,c,d)},q.prototype.when=function(a){B(a.fulfilled,this,a.receiver,a.resolver)};var M=0;H(l,r),r.prototype._state=-1,r.prototype.fold=function(a,b,c,d){d.become(this)},r.prototype.when=function(a){"function"==typeof a.rejected&&this._unreport(),B(a.rejected,this,a.receiver,a.resolver)},r.prototype._report=function(a){J.afterQueue(new s(this,a))},r.prototype._unreport=function(){this.handled=!0,J.afterQueue(new t(this))},r.prototype.fail=function(a){b.onFatalRejection(this,void 0===a?this.context:a)},s.prototype.run=function(){this.rejection.handled||(this.rejection.reported=!0,b.onPotentiallyUnhandledRejection(this.rejection,this.context))},t.prototype.run=function(){this.rejection.reported&&b.onPotentiallyUnhandledRejectionHandled(this.rejection)},b.createContext=b.enterContext=b.exitContext=b.onPotentiallyUnhandledRejection=b.onPotentiallyUnhandledRejectionHandled=b.onFatalRejection=I;var N=new l,O=new b(l,N);return v.prototype.run=function(){this.handler.join().when(this.continuation)},w.prototype.run=function(){var a=this.handler.consumers;if(void 0!==a)for(var b,c=0;c<a.length;++c)b=a[c],D(b.progress,this.value,this.handler,b.receiver,b.resolver)},x.prototype.run=function(){function a(a){d.resolve(a)}function b(a){d.reject(a)}function c(a){d.notify(a)}var d=this.resolver;y(this._then,this.thenable,a,b,c)},b}})}("function"==typeof a&&a.amd?a:function(a){c.exports=a()})},{}],8:[function(b,c){!function(a){"use strict";a(function(a){var b,c,d,e;b=a;try{c=b("vertx"),d=function(a,b){return c.setTimer(b,a)},e=c.cancelTimer}catch(f){d=function(a,b){return setTimeout(a,b)},e=function(a){return clearTimeout(a)}}return{set:d,clear:e}})}("function"==typeof a&&a.amd?a:function(a){c.exports=a(b)})},{}]},{},[1])(1)}),function(__global){function __eval(__source,__global,load){__curRegister=System.register,System.register=function(a,b,c){"string"!=typeof a&&(c=b,b=a),load.declare=c,load.depsList=b};try{eval('(function() { var __moduleName = "'+(load.name||"").replace('"','"')+'"; '+__source+" \n }).call(__global);")}catch(e){throw("SyntaxError"==e.name||"TypeError"==e.name)&&(e.message="Evaluating "+(load.name||load.address)+"\n "+e.message),e}System.register=__curRegister}!function(){function a(a){return{status:"loading",name:a,linkSets:[],dependencies:[],metadata:{}}}function b(a,b,c){return new z(g({step:c.address?"fetch":"locate",loader:a,moduleName:b,moduleMetadata:c&&c.metadata||{},moduleSource:c.source,moduleAddress:c.address}))}function c(b,c,e,f){return new z(function(a){a(b.loaderObj.normalize(c,e,f))}).then(function(c){var e;if(b.modules[c])return e=a(c),e.status="linked",e;for(var f=0,g=b.loads.length;g>f;f++)if(e=b.loads[f],e.name==c)return e;return e=a(c),b.loads.push(e),d(b,e),e})}function d(a,b){e(a,b,z.resolve().then(function(){return a.loaderObj.locate({name:b.name,metadata:b.metadata})}))}function e(a,b,c){f(a,b,c.then(function(c){return"loading"==b.status?(b.address=c,a.loaderObj.fetch({name:b.name,metadata:b.metadata,address:c})):void 0}))}function f(a,b,d){d.then(function(c){return"loading"==b.status?a.loaderObj.translate({name:b.name,metadata:b.metadata,address:b.address,source:c}):void 0}).then(function(c){return"loading"==b.status?(b.source=c,a.loaderObj.instantiate({name:b.name,metadata:b.metadata,address:b.address,source:c})):void 0}).then(function(d){if("loading"==b.status){if(void 0===d)b.address=b.address||"anon"+ ++B,b.isDeclarative=!0,a.loaderObj.parse(b);else{if("object"!=typeof d)throw TypeError("Invalid instantiate return value");b.depsList=d.deps||[],b.execute=d.execute,b.isDeclarative=!1}b.dependencies=[];for(var e=b.depsList,f=[],g=0,h=e.length;h>g;g++)(function(d,e){f.push(c(a,d,b.name,b.address).then(function(a){if(b.dependencies[e]={key:d,value:a.name},"linked"!=a.status)for(var c=b.linkSets.concat([]),f=0,g=c.length;g>f;f++)i(c[f],a)}))})(e[g],g);return z.all(f)}}).then(function(){b.status="loaded";for(var a=b.linkSets.concat([]),c=0,d=a.length;d>c;c++)k(a[c],b)})["catch"](function(a){b.status="failed",b.exception=a;for(var c=b.linkSets.concat([]),d=0,e=c.length;e>d;d++)l(c[d],a)})}function g(b){return function(c){var g=b.loader,i=b.moduleName,j=b.step;if(g.modules[i])throw new TypeError('"'+i+'" already exists in the module table');for(var k=0,l=g.loads.length;l>k;k++)if(g.loads[k].name==i)throw new TypeError('"'+i+'" already loading');var m=a(i);m.metadata=b.moduleMetadata;var n=h(g,m);g.loads.push(m),c(n.done),"locate"==j?d(g,m):"fetch"==j?e(g,m,z.resolve(b.moduleAddress)):(m.address=b.moduleAddress,f(g,m,z.resolve(b.moduleSource)))}}function h(a,b){var c={loader:a,loads:[],startingLoad:b,loadingCount:0};return c.done=new z(function(a,b){c.resolve=a,c.reject=b}),i(c,b),c}function i(a,b){for(var c=0,d=a.loads.length;d>c;c++)if(a.loads[c]==b)return;a.loads.push(b),b.linkSets.push(a),"loaded"!=b.status&&a.loadingCount++;for(var e=a.loader,c=0,d=b.dependencies.length;d>c;c++){var f=b.dependencies[c].value;if(!e.modules[f])for(var g=0,h=e.loads.length;h>g;g++)if(e.loads[g].name==f){i(a,e.loads[g]);break}}}function j(a){try{o(a)}catch(b){return l(a,b),!0}}function k(a,b){if(a.loadingCount--,!(a.loadingCount>0)){var c=a.startingLoad;if(a.loader.loaderObj.execute===!1){for(var d=[].concat(a.loads),e=0,f=d.length;f>e;e++){var b=d[e];b.module=b.isDeclarative?{name:b.name,module:E({}),evaluated:!0}:{module:E({})},b.status="linked",m(a.loader,b)}return a.resolve(c)}var g=j(a);g||a.resolve(c)}}function l(a,b){for(var c=a.loader,d=a.loads.concat([]),e=0,f=d.length;f>e;e++){var g=d[e];c.loaderObj.failed=c.loaderObj.failed||[],-1==A.call(c.loaderObj.failed,g)&&c.loaderObj.failed.push(g);var h=A.call(g.linkSets,a);if(g.linkSets.splice(h,1),0==g.linkSets.length){var i=A.call(a.loader.loads,g);-1!=i&&a.loader.loads.splice(i,1)}}a.reject(b)}function m(a,b){if(a.loaderObj.trace){a.loaderObj.loads||(a.loaderObj.loads={});var c={};b.dependencies.forEach(function(a){c[a.key]=a.value}),a.loaderObj.loads[b.name]={name:b.name,deps:b.dependencies.map(function(a){return a.key}),depMap:c,address:b.address,metadata:b.metadata,source:b.source,kind:b.isDeclarative?"declarative":"dynamic"}}b.name&&(a.modules[b.name]=b.module);var d=A.call(a.loads,b);-1!=d&&a.loads.splice(d,1);for(var e=0,f=b.linkSets.length;f>e;e++)d=A.call(b.linkSets[e].loads,b),-1!=d&&b.linkSets[e].loads.splice(d,1);b.linkSets.splice(0,b.linkSets.length)}function n(a,b,c,d){if(c[a.groupIndex]=c[a.groupIndex]||[],-1==A.call(c[a.groupIndex],a)){c[a.groupIndex].push(a);for(var e=0,f=b.length;f>e;e++)for(var g=b[e],h=0;h<a.dependencies.length;h++)if(g.name==a.dependencies[h].value){var i=a.groupIndex+(g.isDeclarative!=a.isDeclarative);if(void 0===g.groupIndex||g.groupIndex<i){if(g.groupIndex&&(c[g.groupIndex].splice(A.call(c[g.groupIndex],g),1),0==c[g.groupIndex].length))throw new TypeError("Mixed dependency cycle detected");g.groupIndex=i}n(g,b,c,d)}}}function o(a){var b=a.loader;if(a.loads.length){var c=[],d=a.loads[0];d.groupIndex=0,n(d,a.loads,c,b);for(var e=d.isDeclarative==c.length%2,f=c.length-1;f>=0;f--){for(var g=c[f],h=0;h<g.length;h++){var i=g[h];if(e)q(i,a.loads,b);else{var j=i.execute();if(!(j&&j instanceof w))throw new TypeError("Execution must define a Module instance");i.module={name:i.name,module:j},i.status="linked"}m(b,i)}e=!e}}}function p(a){return C[a]||(C[a]={name:a,dependencies:[],module:new w,importers:[]})}function q(a,b,c){if(!a.module){var d=a.module=p(a.name),e=a.module.module,f=a.declare.call(__global,function(a,b){d.locked=!0,e[a]=b;for(var c=0,f=d.importers.length;f>c;c++){var g=d.importers[c];if(!g.locked){var h=A.call(g.dependencies,d);g.setters[h](e)}}return d.locked=!1,b});d.setters=f.setters,d.execute=f.execute;for(var g=0,h=a.dependencies.length;h>g;g++){var i=a.dependencies[g].value,j=c.modules[i];if(!j)for(var k=0;k<b.length;k++)b[k].name==i&&(b[k].module?j=p(i):(q(b[k],b,c),j=b[k].module));j.importers?(d.dependencies.push(j),j.importers.push(d)):d.dependencies.push(null),d.setters[g]&&d.setters[g](j.module)}a.status="linked"}}function r(a,b){return t(b.module,[],a),b.module.module}function s(a){try{a.execute.call(__global)}catch(b){return b}}function t(a,b,c){var d=u(a,b,c);if(d)throw d}function u(a,b,c){if(!a.evaluated&&a.dependencies){b.push(a);for(var d,e=a.dependencies,f=0,g=e.length;g>f;f++){var h=e[f];if(h&&-1==A.call(b,h)&&(d=u(h,b,c)))return d+"\n in module "+h.name}if(a.failed)return new Error("Module failed execution.");if(!a.evaluated)return a.evaluated=!0,d=s(a),d?a.failed=!0:Object.preventExtensions&&Object.preventExtensions(a.module),a.execute=void 0,d}}function v(a){if("object"!=typeof a)throw new TypeError("Options must be an object");a.normalize&&(this.normalize=a.normalize),a.locate&&(this.locate=a.locate),a.fetch&&(this.fetch=a.fetch),a.translate&&(this.translate=a.translate),a.instantiate&&(this.instantiate=a.instantiate),this._loader={loaderObj:this,loads:[],modules:{}},y(this,"global",{get:function(){return __global}})}function w(){}function x(a,b){return D[a]=b,b.then(function(){D[a]=void 0}),b["catch"](function(){D[a]=void 0}),b}var y,z=__global.Promise||require("when/es6-shim/Promise");!function(){try{Object.defineProperty({},"a",{})&&(y=Object.defineProperty)}catch(a){y=function(a,b,c){try{a[b]=c.value||c.get.call(a)}catch(d){}}}}(),console.assert=console.assert||function(){};var A=Array.prototype.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},B=0,C={},D={};v.prototype={constructor:v,define:function(a,b,c){if(D[a])throw new TypeError("Module is already loading.");return x(a,new z(g({step:"translate",loader:this._loader,moduleName:a,moduleMetadata:c&&c.metadata||{},moduleSource:b,moduleAddress:c&&c.address})))},"delete":function(a){return this._loader.modules[a]?delete this._loader.modules[a]:!1},get:function(a){return this._loader.modules[a]?(t(this._loader.modules[a],[],this),this._loader.modules[a].module):void 0},has:function(a){return!!this._loader.modules[a]},"import":function(a,c){var d=this;return z.resolve(d.normalize(a,c&&c.name,c&&c.address)).then(function(a){var e=d._loader;return e.modules[a]?(t(e.modules[a],[],e._loader),e.modules[a].module):D[a]||x(a,b(e,a,c||{}).then(function(b){return delete D[a],r(e,b)}))})},load:function(a){return this._loader.modules[a]?(t(this._loader.modules[a],[],this._loader),z.resolve(this._loader.modules[a].module)):D[a]||x(a,b(this._loader,a,{}))},module:function(b,c){var d=a();d.address=c&&c.address;var e=h(this._loader,d),g=z.resolve(b),i=this._loader,j=e.done.then(function(){return r(i,d)});return f(i,d,g),j},newModule:function(a){if("object"!=typeof a)throw new TypeError("Expected object");var b=new w;for(var c in a)!function(c){y(b,c,{configurable:!1,enumerable:!0,get:function(){return a[c]}})}(c);return Object.preventExtensions&&Object.preventExtensions(b),b},set:function(a,b){if(!(b instanceof w))throw new TypeError("Loader.set("+a+", module) must be a module");this._loader.modules[a]={module:b}},normalize:function(a){return a},locate:function(a){return a.name},fetch:function(){throw new TypeError("Fetch not implemented")},translate:function(a){return a.source},parse:function(){throw new TypeError("Loader.parse is not implemented")},instantiate:function(){}};var E=v.prototype.newModule;!function(){function a(a,b){if(a.errors.length){for(var c=0,d=a.errors.length;d>c;c++);throw new Error("Parse of "+b.name+", "+b.address+" failed, "+a.errors.length)}}var b;v.prototype.parse=function(c){if(!b)if("undefined"==typeof window)b=require("traceur");else{if(!__global.traceur)throw new TypeError("Include Traceur for module syntax support");b=__global.traceur}c.isDeclarative=!0;var d=new b.Compiler,e=System.traceurOptions||{};e.modules="instantiate",e.sourceMaps=!0,e.filename=c.address;var f=d.stringToTree({content:c.source,options:e});a(f),f=d.treeToTree(f),a(f),f=d.treeToString(f),a(f);var g=f.js,h=f.generatedSourceMap;__global.btoa&&h&&(g+="\n//# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(h)))+"\n"),__eval(g,__global,c)}}(),"object"==typeof exports&&(module.exports=v),__global.Reflect=__global.Reflect||{},__global.Reflect.Loader=__global.Reflect.Loader||v,__global.Reflect.global=__global.Reflect.global||__global,__global.LoaderPolyfill=v}();var __curRegister}("undefined"!=typeof global?global:this),function(a){function b(a){var b=String(a).replace(/^\s+|\s+$/g,"").match(/^([^:\/?#]+:)?(\/\/(?:[^:@]*(?::[^:@]*)?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);return b?{href:b[0]||"",protocol:b[1]||"",authority:b[2]||"",host:b[3]||"",hostname:b[4]||"",port:b[5]||"",pathname:b[6]||"",search:b[7]||"",hash:b[8]||""}:null}function c(a){var b=[];return a.replace(/^(\.\.?(\/|$))+/,"").replace(/\/(\.(\/|$))+/g,"/").replace(/\/\.\.$/,"/../").replace(/\/?[^\/]*/g,function(a){"/.."===a?b.pop():b.push(a)}),b.join("").replace(/^\//,"/"===a.charAt(0)?"/":"")}function d(a,d){return d=b(d||""),a=b(a||""),d&&a?(d.protocol||a.protocol)+(d.protocol||d.authority?d.authority:a.authority)+c(d.protocol||d.authority||"/"===d.pathname.charAt(0)?d.pathname:d.pathname?(a.authority&&!a.pathname?"/":"")+a.pathname.slice(0,a.pathname.lastIndexOf("/")+1)+d.pathname:a.pathname)+(d.protocol||d.authority||d.pathname?d.search:d.search||a.search)+d.hash:null}function e(){document.removeEventListener("DOMContentLoaded",e,!1),window.removeEventListener("load",e,!1),f()}function f(){for(var a=document.getElementsByTagName("script"),b=0;b<a.length;b++){var c=a[b];if("module"==c.type){var d=c.innerHTML;l.module(d)["catch"](function(a){setTimeout(function(){throw a})})}}}var g,h="undefined"!=typeof window,i=a.Reflect&&a.Reflect.Loader||require("./loader"),j=a.Promise||require("when/es6-shim/Promise");if(h)g=function(a,b,c){function d(){b(f.responseText)}function e(){c(f.statusText+": "+a||"XHR error")}var f=new XMLHttpRequest,g=!0;if(!("withCredentials"in f)){var h=/^(\w+:)?\/\/([^\/]+)/.exec(a);h&&(g=h[2]===window.location.host,h[1]&&(g&=h[1]===window.location.protocol))}g||(f=new XDomainRequest,f.onload=d,f.onerror=e,f.ontimeout=e),f.onreadystatechange=function(){4===f.readyState&&(200===f.status||0==f.status&&f.responseText?d():e())},f.open("GET",a,!0),f.send(null)};else{var k;g=function(a,b,c){return k=k||require("fs"),k.readFile(a,function(a,d){return a?c(a):(b(d+""),void 0)})}}var l=new i({global:h?window:a,strict:!0,normalize:function(a,b){if("string"!=typeof a)throw new TypeError("Module name must be a string");var c=a.split("/");if(0==c.length)throw new TypeError("No module name provided");var d=0,e=!1,f=0;if("."==c[0]){if(d++,d==c.length)throw new TypeError('Illegal module name "'+a+'"');e=!0}else{for(;".."==c[d];)if(d++,d==c.length)throw new TypeError('Illegal module name "'+a+'"');d&&(e=!0),f=d}for(var g=d;g<c.length;g++){var h=c[g];if(""==h||"."==h||".."==h)throw new TypeError('Illegal module name "'+a+'"')}if(!e)return a;{var i=[],j=(b||"").split("/");j.length-1-f}return i=i.concat(j.splice(0,j.length-1-f)),i=i.concat(c.splice(d,c.length-d)),i.join("/")},locate:function(a){var b,c=a.name,e="";for(var f in this.paths){var g=f.split("*");if(g.length>2)throw new TypeError("Only one wildcard in a path is permitted");if(1==g.length){if(c==f&&f.length>e.length){e=f;break}}else c.substr(0,g[0].length)==g[0]&&c.substr(c.length-g[1].length)==g[1]&&(e=f,b=c.substr(g[0].length,c.length-g[1].length-g[0].length))}var i=this.paths[e];if(b&&(i=i.replace("*",b)),h){for(var j=i.split("/"),k=0,l=j.length;l>k;k++)j[k]=encodeURIComponent(j[k]);i=j.join("/")}return d(this.baseURL,i)},fetch:function(a){var b=this;return new j(function(c,e){g(d(b.baseURL,a.address),function(a){c(a)},e)})}});if(h){var m=window.location.href.split("#")[0].split("?")[0];l.baseURL=m.substring(0,m.lastIndexOf("/")+1)}else l.baseURL=process.cwd()+"/";if(l.paths={"*":"*.js"},"object"==typeof exports&&(module.exports=l),a.System=l,h){var n=document.getElementsByTagName("script");n=n[n.length-1],"complete"===document.readyState?setTimeout(f):document.addEventListener&&(document.addEventListener("DOMContentLoaded",e,!1),window.addEventListener("load",e,!1)),n.getAttribute("data-init")&&window[n.getAttribute("data-init")]()}}("undefined"!=typeof global?global:this); |
@@ -655,2 +655,3 @@ /* | ||
load.module = { | ||
name: load.name, | ||
module: module | ||
@@ -740,5 +741,9 @@ }; | ||
if (depModule.importers) { | ||
module.dependencies.push(depModule); | ||
depModule.importers.push(module); | ||
module.dependencies.push(depModule); | ||
} | ||
else { | ||
// track dynamic records as null module records as already linked | ||
module.dependencies.push(null); | ||
} | ||
@@ -806,2 +811,6 @@ // run the setter for this dependency | ||
var dep = deps[i]; | ||
// dynamic dependencies are empty in module.dependencies | ||
// as they are already linked | ||
if (!dep) | ||
continue; | ||
if (indexOf.call(seen, dep) == -1) { | ||
@@ -1062,2 +1071,4 @@ err = ensureEvaluated(dep, seen, loader); | ||
options.modules = 'instantiate'; | ||
options.sourceMaps = true; | ||
options.filename = load.address; | ||
var output = compiler.stringToTree({content: load.source, options: options}); | ||
@@ -1071,2 +1082,3 @@ checkForErrors(output); | ||
checkForErrors(output); | ||
var source = output.js; | ||
@@ -1073,0 +1085,0 @@ var sourceMap = output.generatedSourceMap; |
@@ -203,2 +203,11 @@ /* | ||
// percent encode each path part | ||
if (isBrowser) { | ||
var outParts = outPath.split('/'); | ||
for (var i = 0, l = outParts.length; i < l; i++) { | ||
outParts[i] = encodeURIComponent(outParts[i]); | ||
} | ||
outPath = outParts.join('/'); | ||
} | ||
return toAbsoluteURL(this.baseURL, outPath); | ||
@@ -225,2 +234,8 @@ }, | ||
// note we have to export before runing "init" below | ||
if (typeof exports === 'object') | ||
module.exports = System; | ||
global.System = System; | ||
// <script type="module"> support | ||
@@ -264,7 +279,2 @@ // allow a data-init function callback once loaded | ||
if (typeof exports === 'object') | ||
module.exports = System; | ||
global.System = System; | ||
})(typeof global !== 'undefined' ? global : this); |
{ | ||
"name": "es6-module-loader", | ||
"description": "An ES6 Module Loader shim", | ||
"version": "0.8.0", | ||
"version": "0.8.1", | ||
"homepage": "https://github.com/ModuleLoader/es6-module-loader", | ||
@@ -44,5 +44,5 @@ "author": { | ||
"dependencies": { | ||
"traceur": "0.0.55", | ||
"traceur": "0.0.56", | ||
"when": "^3.4.2" | ||
} | ||
} |
@@ -20,3 +20,3 @@ # ES6 Module Loader Polyfill | ||
_The current version is tested against **[Traceur 0.0.55](https://github.com/google/traceur-compiler/tree/0.0.55)**._ | ||
_The current version is tested against **[Traceur 0.0.56](https://github.com/google/traceur-compiler/tree/0.0.56)**._ | ||
@@ -27,5 +27,5 @@ _Note the ES6 module specification is still in draft, and subject to change._ | ||
Download both [es6-module-loader.js](https://raw.githubusercontent.com/ModuleLoader/es6-module-loader/v0.8.0/dist/es6-module-loader.js) and traceur.js into the same folder. | ||
Download both [es6-module-loader.js](https://raw.githubusercontent.com/ModuleLoader/es6-module-loader/v0.8.1/dist/es6-module-loader.js) and traceur.js into the same folder. | ||
If using ES6 syntax (optional), include [`traceur.js`](https://raw.githubusercontent.com/jmcriffey/bower-traceur/0.0.55/traceur.js) in the page first then include `es6-module-loader.js`: | ||
If using ES6 syntax (optional), include [`traceur.js`](https://raw.githubusercontent.com/jmcriffey/bower-traceur/0.0.56/traceur.js) in the page first then include `es6-module-loader.js`: | ||
@@ -182,3 +182,3 @@ ```html | ||
2. If using additional ES6 features apart from modules syntax, load [`traceur-runtime.js`](https://raw.githubusercontent.com/jmcriffey/bower-traceur/0.0.55/traceur-runtime.js) (also included in the `bin` folder when installing Traceur through Bower or npm). Then include `es6-module-loader.js` and then apply the register extension before doing the import or loading the bundle as a script: | ||
2. If using additional ES6 features apart from modules syntax, load [`traceur-runtime.js`](https://raw.githubusercontent.com/jmcriffey/bower-traceur/0.0.56/traceur-runtime.js) (also included in the `bin` folder when installing Traceur through Bower or npm). Then include `es6-module-loader.js` and then apply the register extension before doing the import or loading the bundle as a script: | ||
@@ -185,0 +185,0 @@ ```html |
@@ -147,3 +147,6 @@ | ||
test('Locate', System.locate({ name: '@abc/def' }), 'http://example.org/a/@abc/def.js'); | ||
if (typeof window != 'undefined') | ||
test('Locate', System.locate({ name: '@abc/def' }), 'http://example.org/a/%40abc/def.js'); | ||
else | ||
test('Locate', System.locate({ name: '@abc/def' }), 'http://example.org/a/@abc/def.js'); | ||
test('Locate', System.locate({ name: 'abc/def' }), 'http://example.org/a/abc/def.js'); | ||
@@ -150,0 +153,0 @@ |
Sorry, the diff of this file is too big to display
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
240069
5218
+ Addedtraceur@0.0.56(transitive)
- Removedtraceur@0.0.55(transitive)
Updatedtraceur@0.0.56