bolt-engine/jspm_packages/system.js

2 lines
23 KiB
JavaScript
Raw Normal View History

2015-01-22 19:26:00 +00:00
!function($__global){$__global.upgradeSystemLoader=function(){function e(e){var t=String(e).replace(/^\s+|\s+$/g,"").match(/^([^:\/?#]+:)?(\/\/(?:[^:@\/?#]*(?::[^:@\/?#]*)?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);return t?{href:t[0]||"",protocol:t[1]||"",authority:t[2]||"",host:t[3]||"",hostname:t[4]||"",port:t[5]||"",pathname:t[6]||"",search:t[7]||"",hash:t[8]||""}:null}function t(t,a){function r(e){var t=[];return e.replace(/^(\.\.?(\/|$))+/,"").replace(/\/(\.(\/|$))+/g,"/").replace(/\/\.\.$/,"/../").replace(/\/?[^\/]*/g,function(e){"/.."===e?t.pop():t.push(e)}),t.join("").replace(/^\//,"/"===e.charAt(0)?"/":"")}return a=e(a||""),t=e(t||""),a&&t?(a.protocol||t.protocol)+(a.protocol||a.authority?a.authority:t.authority)+r(a.protocol||a.authority||"/"===a.pathname.charAt(0)?a.pathname:a.pathname?(t.authority&&!t.pathname?"/":"")+t.pathname.slice(0,t.pathname.lastIndexOf("/")+1)+a.pathname:t.pathname)+(a.protocol||a.authority||a.pathname?a.search:a.search||t.search)+a.hash:null}function a(e){function t(e,t){var a=e.meta&&e.meta[t.name];if(a)for(var r in a)t.metadata[r]=t.metadata[r]||a[r]}var a=/^(\s*\/\*.*\*\/|\s*\/\/[^\n]*|\s*"[^"]+"\s*;?|\s*'[^']+'\s*;?)+/,r=/\/\*.*\*\/|\/\/[^\n]*|"[^"]+"\s*;?|'[^']+'\s*;?/g;e.meta={};var n=e.locate;e.locate=function(e){return t(this,e),n.call(this,e)};var o=e.translate;e.translate=function(e){var n=e.source.match(a);if(n)for(var i=n[0].match(r),s=0;s<i.length;s++){var l=i[s].length,u=i[s].substr(0,1);if(";"==i[s].substr(l-1,1)&&l--,'"'==u||"'"==u){var d=i[s].substr(1,i[s].length-3),c=d.substr(0,d.indexOf(" "));if(c){var f=d.substr(c.length+1,d.length-c.length-1);e.metadata[c]instanceof Array?e.metadata[c].push(f):e.metadata[c]||(e.metadata[c]=f)}}}return t(this,e),o.call(this,e)}}function r(e){function a(e){var a=this;"@traceur"==e.name&&(h=m);var r,n=e.source.lastIndexOf("\n");-1!=n&&"//# sourceMappingURL="==e.source.substr(n+1,21)&&(r=e.source.substr(n+22,e.source.length-n-22),"undefined"!=typeof t&&(r=t(e.address,r))),__eval(e.source,e.address,r),"@traceur"==e.name&&(a.global.traceurSystem=a.global.System,a.global.System=h)}function r(e){for(var t=[],a=0,r=e.length;r>a;a++)-1==p.call(t,e[a])&&t.push(e[a]);return t}function n(t,a,r,n){"string"!=typeof t&&(n=r,r=a,a=t,t=null),v=!0;var o;if(o="boolean"==typeof r?{declarative:!1,deps:a,execute:n,executingRequire:r}:{declarative:!0,deps:a,declare:r},t)o.name=t,e.defined[t]||(e.defined[t]=o);else if(o.declarative){if(g)throw new TypeError("Multiple anonymous System.register calls in the same module file.");g=o}}function o(e){if(!e.register){e.register=n,e.defined||(e.defined={});var t=e.onScriptLoad;e.onScriptLoad=function(e){t(e),g&&(e.metadata.entry=g),v&&(e.metadata.format=e.metadata.format||"register",e.metadata.registered=!0)}}}function i(e,t,a){if(a[e.groupIndex]=a[e.groupIndex]||[],-1==p.call(a[e.groupIndex],e)){a[e.groupIndex].push(e);for(var r=0,n=e.normalizedDeps.length;n>r;r++){var o=e.normalizedDeps[r],s=t.defined[o];if(s&&!s.evaluated){var l=e.groupIndex+(s.declarative!=e.declarative);if(void 0===s.groupIndex||s.groupIndex<l){if(s.groupIndex&&(a[s.groupIndex].splice(p.call(a[s.groupIndex],s),1),0==a[s.groupIndex].length))throw new TypeError("Mixed dependency cycle detected");s.groupIndex=l}i(s,t,a)}}}}function s(e,t){var a=t.defined[e];a.groupIndex=0;var r=[];i(a,t,r);for(var n=!!a.declarative==r.length%2,o=r.length-1;o>=0;o--){for(var s=r[o],l=0;l<s.length;l++){var d=s[l];n?u(d,t):c(d,t)}n=!n}}function l(e){return b[e]||(b[e]={name:e,dependencies:[],exports:{},importers:[]})}function u(e,t){if(!e.module){var a=e.module=l(e.name),r=e.module.exports,n=e.declare.call(t.global,function(e,t){a.locked=!0,r[e]=t;for(var n=0,o=a.importers.length;o>n;n++){var i=a.importers[n];if(!i.locked){var s=p.call(i.dependencies,a);i.setters[s](r)}}return a.locked=!1,t});if(a.setters=n.setters,a.execute=n.execute,!a.setters||!a.execute)throw new TypeError("Invalid System.register form for "+e.name);for(var o=0,i=e.normalizedDeps.length;i>o;o++){var s,d=e.normalizedDeps[o],c=t.defined[d],f=b[d];f?s=f.exports:c&&!c.declarativ
//# sourceMappingURL=system.js.map