D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
thread-self
/
root
/
proc
/
self
/
root
/
usr
/
share
/
grafana
/
public
/
lib
/
monaco
/
min
/
vs
/
Filename :
loader.js
back
Copy
"use strict";/*!----------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(4b8a47f3570a4a05ace9d00ae0df044b55befcd5) * Released under the MIT license * https://github.com/microsoft/vscode/blob/main/LICENSE.txt *-----------------------------------------------------------*/var _amdLoaderGlobal=this,_commonjsGlobal=typeof global=="object"?global:{},AMDLoader;(function(d){d.global=_amdLoaderGlobal;var m=function(){function p(){this._detected=!1,this._isWindows=!1,this._isNode=!1,this._isElectronRenderer=!1,this._isWebWorker=!1,this._isElectronNodeIntegrationWebWorker=!1}return Object.defineProperty(p.prototype,"isWindows",{get:function(){return this._detect(),this._isWindows},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"isNode",{get:function(){return this._detect(),this._isNode},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"isElectronRenderer",{get:function(){return this._detect(),this._isElectronRenderer},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"isWebWorker",{get:function(){return this._detect(),this._isWebWorker},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"isElectronNodeIntegrationWebWorker",{get:function(){return this._detect(),this._isElectronNodeIntegrationWebWorker},enumerable:!1,configurable:!0}),p.prototype._detect=function(){this._detected||(this._detected=!0,this._isWindows=p._isWindows(),this._isNode=typeof module<"u"&&!!module.exports,this._isElectronRenderer=typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.electron<"u"&&process.type==="renderer",this._isWebWorker=typeof d.global.importScripts=="function",this._isElectronNodeIntegrationWebWorker=this._isWebWorker&&typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.electron<"u"&&process.type==="worker")},p._isWindows=function(){return typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.indexOf("Windows")>=0?!0:typeof process<"u"?process.platform==="win32":!1},p}();d.Environment=m})(AMDLoader||(AMDLoader={}));var AMDLoader;(function(d){var m=function(){function u(n,g,i){this.type=n,this.detail=g,this.timestamp=i}return u}();d.LoaderEvent=m;var p=function(){function u(n){this._events=[new m(1,"",n)]}return u.prototype.record=function(n,g){this._events.push(new m(n,g,d.Utilities.getHighPerformanceTimestamp()))},u.prototype.getEvents=function(){return this._events},u}();d.LoaderEventRecorder=p;var y=function(){function u(){}return u.prototype.record=function(n,g){},u.prototype.getEvents=function(){return[]},u.INSTANCE=new u,u}();d.NullLoaderEventRecorder=y})(AMDLoader||(AMDLoader={}));var AMDLoader;(function(d){var m=function(){function p(){}return p.fileUriToFilePath=function(y,u){if(u=decodeURI(u).replace(/%23/g,"#"),y){if(/^file:\/\/\//.test(u))return u.substr(8);if(/^file:\/\//.test(u))return u.substr(5)}else if(/^file:\/\//.test(u))return u.substr(7);return u},p.startsWith=function(y,u){return y.length>=u.length&&y.substr(0,u.length)===u},p.endsWith=function(y,u){return y.length>=u.length&&y.substr(y.length-u.length)===u},p.containsQueryString=function(y){return/^[^\#]*\?/gi.test(y)},p.isAbsolutePath=function(y){return/^((http:\/\/)|(https:\/\/)|(file:\/\/)|(\/))/.test(y)},p.forEachProperty=function(y,u){if(y){var n=void 0;for(n in y)y.hasOwnProperty(n)&&u(n,y[n])}},p.isEmpty=function(y){var u=!0;return p.forEachProperty(y,function(){u=!1}),u},p.recursiveClone=function(y){if(!y||typeof y!="object"||y instanceof RegExp||!Array.isArray(y)&&Object.getPrototypeOf(y)!==Object.prototype)return y;var u=Array.isArray(y)?[]:{};return p.forEachProperty(y,function(n,g){g&&typeof g=="object"?u[n]=p.recursiveClone(g):u[n]=g}),u},p.generateAnonymousModule=function(){return"===anonymous"+p.NEXT_ANONYMOUS_ID+++"==="},p.isAnonymousModule=function(y){return p.startsWith(y,"===anonymous")},p.getHighPerformanceTimestamp=function(){return this.PERFORMANCE_NOW_PROBED||(this.PERFORMANCE_NOW_PROBED=!0,this.HAS_PERFORMANCE_NOW=d.global.performance&&typeof d.global.performance.now=="function"),this.HAS_PERFORMANCE_NOW?d.global.performance.now():Date.now()},p.NEXT_ANONYMOUS_ID=1,p.PERFORMANCE_NOW_PROBED=!1,p.HAS_PERFORMANCE_NOW=!1,p}();d.Utilities=m})(AMDLoader||(AMDLoader={}));var AMDLoader;(function(d){function m(u){if(u instanceof Error)return u;var n=new Error(u.message||String(u)||"Unknown Error");return u.stack&&(n.stack=u.stack),n}d.ensureError=m;var p=function(){function u(){}return u.validateConfigurationOptions=function(n){function g(e){if(e.phase==="loading"){console.error('Loading "'+e.moduleId+'" failed'),console.error(e),console.error("Here are the modules that depend on it:"),console.error(e.neededBy);return}if(e.phase==="factory"){console.error('The factory function of "'+e.moduleId+'" has thrown an exception'),console.error(e),console.error("Here are the modules that depend on it:"),console.error(e.neededBy);return}}if(n=n||{},typeof n.baseUrl!="string"&&(n.baseUrl=""),typeof n.isBuild!="boolean"&&(n.isBuild=!1),typeof n.buildForceInvokeFactory!="object"&&(n.buildForceInvokeFactory={}),typeof n.paths!="object"&&(n.paths={}),typeof n.config!="object"&&(n.config={}),typeof n.catchError>"u"&&(n.catchError=!1),typeof n.recordStats>"u"&&(n.recordStats=!1),typeof n.urlArgs!="string"&&(n.urlArgs=""),typeof n.onError!="function"&&(n.onError=g),Array.isArray(n.ignoreDuplicateModules)||(n.ignoreDuplicateModules=[]),n.baseUrl.length>0&&(d.Utilities.endsWith(n.baseUrl,"/")||(n.baseUrl+="/")),typeof n.cspNonce!="string"&&(n.cspNonce=""),typeof n.preferScriptTags>"u"&&(n.preferScriptTags=!1),Array.isArray(n.nodeModules)||(n.nodeModules=[]),n.nodeCachedData&&typeof n.nodeCachedData=="object"&&(typeof n.nodeCachedData.seed!="string"&&(n.nodeCachedData.seed="seed"),(typeof n.nodeCachedData.writeDelay!="number"||n.nodeCachedData.writeDelay<0)&&(n.nodeCachedData.writeDelay=1e3*7),!n.nodeCachedData.path||typeof n.nodeCachedData.path!="string")){var i=m(new Error("INVALID cached data configuration, 'path' MUST be set"));i.phase="configuration",n.onError(i),n.nodeCachedData=void 0}return n},u.mergeConfigurationOptions=function(n,g){n===void 0&&(n=null),g===void 0&&(g=null);var i=d.Utilities.recursiveClone(g||{});return d.Utilities.forEachProperty(n,function(e,t){e==="ignoreDuplicateModules"&&typeof i.ignoreDuplicateModules<"u"?i.ignoreDuplicateModules=i.ignoreDuplicateModules.concat(t):e==="paths"&&typeof i.paths<"u"?d.Utilities.forEachProperty(t,function(r,o){return i.paths[r]=o}):e==="config"&&typeof i.config<"u"?d.Utilities.forEachProperty(t,function(r,o){return i.config[r]=o}):i[e]=d.Utilities.recursiveClone(t)}),u.validateConfigurationOptions(i)},u}();d.ConfigurationOptionsUtil=p;var y=function(){function u(n,g){if(this._env=n,this.options=p.mergeConfigurationOptions(g),this._createIgnoreDuplicateModulesMap(),this._createNodeModulesMap(),this._createSortedPathsRules(),this.options.baseUrl===""){if(this.options.nodeRequire&&this.options.nodeRequire.main&&this.options.nodeRequire.main.filename&&this._env.isNode){var i=this.options.nodeRequire.main.filename,e=Math.max(i.lastIndexOf("/"),i.lastIndexOf("\\"));this.options.baseUrl=i.substring(0,e+1)}if(this.options.nodeMain&&this._env.isNode){var i=this.options.nodeMain,e=Math.max(i.lastIndexOf("/"),i.lastIndexOf("\\"));this.options.baseUrl=i.substring(0,e+1)}}}return u.prototype._createIgnoreDuplicateModulesMap=function(){this.ignoreDuplicateModulesMap={};for(var n=0;n<this.options.ignoreDuplicateModules.length;n++)this.ignoreDuplicateModulesMap[this.options.ignoreDuplicateModules[n]]=!0},u.prototype._createNodeModulesMap=function(){this.nodeModulesMap=Object.create(null);for(var n=0,g=this.options.nodeModules;n<g.length;n++){var i=g[n];this.nodeModulesMap[i]=!0}},u.prototype._createSortedPathsRules=function(){var n=this;this.sortedPathsRules=[],d.Utilities.forEachProperty(this.options.paths,function(g,i){Array.isArray(i)?n.sortedPathsRules.push({from:g,to:i}):n.sortedPathsRules.push({from:g,to:[i]})}),this.sortedPathsRules.sort(function(g,i){return i.from.length-g.from.length})},u.prototype.cloneAndMerge=function(n){return new u(this._env,p.mergeConfigurationOptions(n,this.options))},u.prototype.getOptionsLiteral=function(){return this.options},u.prototype._applyPaths=function(n){for(var g,i=0,e=this.sortedPathsRules.length;i<e;i++)if(g=this.sortedPathsRules[i],d.Utilities.startsWith(n,g.from)){for(var t=[],r=0,o=g.to.length;r<o;r++)t.push(g.to[r]+n.substr(g.from.length));return t}return[n]},u.prototype._addUrlArgsToUrl=function(n){return d.Utilities.containsQueryString(n)?n+"&"+this.options.urlArgs:n+"?"+this.options.urlArgs},u.prototype._addUrlArgsIfNecessaryToUrl=function(n){return this.options.urlArgs?this._addUrlArgsToUrl(n):n},u.prototype._addUrlArgsIfNecessaryToUrls=function(n){if(this.options.urlArgs)for(var g=0,i=n.length;g<i;g++)n[g]=this._addUrlArgsToUrl(n[g]);return n},u.prototype.moduleIdToPaths=function(n){if(this._env.isNode){var g=this.nodeModulesMap[n]===!0||this.options.amdModulesPattern instanceof RegExp&&!this.options.amdModulesPattern.test(n);if(g)return this.isBuild()?["empty:"]:["node|"+n]}var i=n,e;if(!d.Utilities.endsWith(i,".js")&&!d.Utilities.isAbsolutePath(i)){e=this._applyPaths(i);for(var t=0,r=e.length;t<r;t++)this.isBuild()&&e[t]==="empty:"||(d.Utilities.isAbsolutePath(e[t])||(e[t]=this.options.baseUrl+e[t]),!d.Utilities.endsWith(e[t],".js")&&!d.Utilities.containsQueryString(e[t])&&(e[t]=e[t]+".js"))}else!d.Utilities.endsWith(i,".js")&&!d.Utilities.containsQueryString(i)&&(i=i+".js"),e=[i];return this._addUrlArgsIfNecessaryToUrls(e)},u.prototype.requireToUrl=function(n){var g=n;return d.Utilities.isAbsolutePath(g)||(g=this._applyPaths(g)[0],d.Utilities.isAbsolutePath(g)||(g=this.options.baseUrl+g)),this._addUrlArgsIfNecessaryToUrl(g)},u.prototype.isBuild=function(){return this.options.isBuild},u.prototype.shouldInvokeFactory=function(n){return this.options.isBuild?this.options.buildForceInvokeFactory[n]||d.Utilities.isAnonymousModule(n):!0},u.prototype.isDuplicateMessageIgnoredFor=function(n){return this.ignoreDuplicateModulesMap.hasOwnProperty(n)},u.prototype.getConfigForModule=function(n){if(this.options.config)return this.options.config[n]},u.prototype.shouldCatchError=function(){return this.options.catchError},u.prototype.shouldRecordStats=function(){return this.options.recordStats},u.prototype.onError=function(n){this.options.onError(n)},u}();d.Configuration=y})(AMDLoader||(AMDLoader={}));var AMDLoader;(function(d){var m=function(){function e(t){this._env=t,this._scriptLoader=null,this._callbackMap={}}return e.prototype.load=function(t,r,o,s){var a=this;if(!this._scriptLoader)if(this._env.isWebWorker)this._scriptLoader=new u;else if(this._env.isElectronRenderer){var c=t.getConfig().getOptionsLiteral().preferScriptTags;c?this._scriptLoader=new p:this._scriptLoader=new n(this._env)}else this._env.isNode?this._scriptLoader=new n(this._env):this._scriptLoader=new p;var l={callback:o,errorback:s};if(this._callbackMap.hasOwnProperty(r)){this._callbackMap[r].push(l);return}this._callbackMap[r]=[l],this._scriptLoader.load(t,r,function(){return a.triggerCallback(r)},function(f){return a.triggerErrorback(r,f)})},e.prototype.triggerCallback=function(t){var r=this._callbackMap[t];delete this._callbackMap[t];for(var o=0;o<r.length;o++)r[o].callback()},e.prototype.triggerErrorback=function(t,r){var o=this._callbackMap[t];delete this._callbackMap[t];for(var s=0;s<o.length;s++)o[s].errorback(r)},e}(),p=function(){function e(){}return e.prototype.attachListeners=function(t,r,o){var s=function(){t.removeEventListener("load",a),t.removeEventListener("error",c)},a=function(l){s(),r()},c=function(l){s(),o(l)};t.addEventListener("load",a),t.addEventListener("error",c)},e.prototype.load=function(t,r,o,s){if(/^node\|/.test(r)){var a=t.getConfig().getOptionsLiteral(),c=g(t.getRecorder(),a.nodeRequire||d.global.nodeRequire),l=r.split("|"),f=null;try{f=c(l[1])}catch(M){s(M);return}t.enqueueDefineAnonymousModule([],function(){return f}),o()}else{var h=document.createElement("script");h.setAttribute("async","async"),h.setAttribute("type","text/javascript"),this.attachListeners(h,o,s);var v=t.getConfig().getOptionsLiteral().trustedTypesPolicy;v&&(r=v.createScriptURL(r)),h.setAttribute("src",r);var _=t.getConfig().getOptionsLiteral().cspNonce;_&&h.setAttribute("nonce",_),document.getElementsByTagName("head")[0].appendChild(h)}},e}();function y(e){var t=e.getConfig().getOptionsLiteral().trustedTypesPolicy;try{var r=t?self.eval(t.createScript("","true")):new Function("true");return r.call(self),!0}catch{return!1}}var u=function(){function e(){this._cachedCanUseEval=null}return e.prototype._canUseEval=function(t){return this._cachedCanUseEval===null&&(this._cachedCanUseEval=y(t)),this._cachedCanUseEval},e.prototype.load=function(t,r,o,s){if(/^node\|/.test(r)){var a=t.getConfig().getOptionsLiteral(),c=g(t.getRecorder(),a.nodeRequire||d.global.nodeRequire),l=r.split("|"),f=null;try{f=c(l[1])}catch(_){s(_);return}t.enqueueDefineAnonymousModule([],function(){return f}),o()}else{var h=t.getConfig().getOptionsLiteral().trustedTypesPolicy,v=/^((http:)|(https:)|(file:))/.test(r)&&r.substring(0,self.origin.length)!==self.origin;if(!v&&this._canUseEval(t)){fetch(r).then(function(_){if(_.status!==200)throw new Error(_.statusText);return _.text()}).then(function(_){_=_+` //# sourceURL=`+r;var M=h?self.eval(h.createScript("",_)):new Function(_);M.call(self),o()}).then(void 0,s);return}try{h&&(r=h.createScriptURL(r)),importScripts(r),o()}catch(_){s(_)}}},e}(),n=function(){function e(t){this._env=t,this._didInitialize=!1,this._didPatchNodeRequire=!1}return e.prototype._init=function(t){this._didInitialize||(this._didInitialize=!0,this._fs=t("fs"),this._vm=t("vm"),this._path=t("path"),this._crypto=t("crypto"))},e.prototype._initNodeRequire=function(t,r){var o=r.getConfig().getOptionsLiteral().nodeCachedData;if(!o||this._didPatchNodeRequire)return;this._didPatchNodeRequire=!0;var s=this,a=t("module");function c(l){var f=l.constructor,h=function(v){try{return l.require(v)}finally{}};return h.resolve=function(v,_){return f._resolveFilename(v,l,!1,_)},h.resolve.paths=function(v){return f._resolveLookupPaths(v,l)},h.main=process.mainModule,h.extensions=f._extensions,h.cache=f._cache,h}a.prototype._compile=function(l,f){var h=a.wrap(l.replace(/^#!.*/,"")),v=r.getRecorder(),_=s._getCachedDataPath(o,f),M={filename:f},E;try{var R=s._fs.readFileSync(_);E=R.slice(0,16),M.cachedData=R.slice(16),v.record(60,_)}catch{v.record(61,_)}var I=new s._vm.Script(h,M),D=I.runInThisContext(M),C=s._path.dirname(f),P=c(this),A=[this.exports,P,this,f,C,process,_commonjsGlobal,Buffer],b=D.apply(this.exports,A);return s._handleCachedData(I,h,_,!M.cachedData,r),s._verifyCachedData(I,h,_,E,r),b}},e.prototype.load=function(t,r,o,s){var a=this,c=t.getConfig().getOptionsLiteral(),l=g(t.getRecorder(),c.nodeRequire||d.global.nodeRequire),f=c.nodeInstrumenter||function(D){return D};this._init(l),this._initNodeRequire(l,t);var h=t.getRecorder();if(/^node\|/.test(r)){var v=r.split("|"),_=null;try{_=l(v[1])}catch(D){s(D);return}t.enqueueDefineAnonymousModule([],function(){return _}),o()}else{r=d.Utilities.fileUriToFilePath(this._env.isWindows,r);var M=this._path.normalize(r),E=this._getElectronRendererScriptPathOrUri(M),R=!!c.nodeCachedData,I=R?this._getCachedDataPath(c.nodeCachedData,r):void 0;this._readSourceAndCachedData(M,I,h,function(D,C,P,A){if(D){s(D);return}var b;C.charCodeAt(0)===e._BOM?b=e._PREFIX+C.substring(1)+e._SUFFIX:b=e._PREFIX+C+e._SUFFIX,b=f(b,M);var w={filename:E,cachedData:P},U=a._createAndEvalScript(t,b,w,o,s);a._handleCachedData(U,b,I,R&&!P,t),a._verifyCachedData(U,b,I,A,t)})}},e.prototype._createAndEvalScript=function(t,r,o,s,a){var c=t.getRecorder();c.record(31,o.filename);var l=new this._vm.Script(r,o),f=l.runInThisContext(o),h=t.getGlobalAMDDefineFunc(),v=!1,_=function(){return v=!0,h.apply(null,arguments)};return _.amd=h.amd,f.call(d.global,t.getGlobalAMDRequireFunc(),_,o.filename,this._path.dirname(o.filename)),c.record(32,o.filename),v?s():a(new Error("Didn't receive define call in "+o.filename+"!")),l},e.prototype._getElectronRendererScriptPathOrUri=function(t){if(!this._env.isElectronRenderer)return t;var r=t.match(/^([a-z])\:(.*)/i);return r?"file:///"+(r[1].toUpperCase()+":"+r[2]).replace(/\\/g,"/"):"file://"+t},e.prototype._getCachedDataPath=function(t,r){var o=this._crypto.createHash("md5").update(r,"utf8").update(t.seed,"utf8").update(process.arch,"").digest("hex"),s=this._path.basename(r).replace(/\.js$/,"");return this._path.join(t.path,s+"-"+o+".code")},e.prototype._handleCachedData=function(t,r,o,s,a){var c=this;t.cachedDataRejected?this._fs.unlink(o,function(l){a.getRecorder().record(62,o),c._createAndWriteCachedData(t,r,o,a),l&&a.getConfig().onError(l)}):s&&this._createAndWriteCachedData(t,r,o,a)},e.prototype._createAndWriteCachedData=function(t,r,o,s){var a=this,c=Math.ceil(s.getConfig().getOptionsLiteral().nodeCachedData.writeDelay*(1+Math.random())),l=-1,f=0,h=void 0,v=function(){setTimeout(function(){h||(h=a._crypto.createHash("md5").update(r,"utf8").digest());var _=t.createCachedData();if(!(_.length===0||_.length===l||f>=5)){if(_.length<l){v();return}l=_.length,a._fs.writeFile(o,Buffer.concat([h,_]),function(M){M&&s.getConfig().onError(M),s.getRecorder().record(63,o),v()})}},c*Math.pow(4,f++))};v()},e.prototype._readSourceAndCachedData=function(t,r,o,s){if(!r)this._fs.readFile(t,{encoding:"utf8"},s);else{var a=void 0,c=void 0,l=void 0,f=2,h=function(v){v?s(v):--f==0&&s(void 0,a,c,l)};this._fs.readFile(t,{encoding:"utf8"},function(v,_){a=_,h(v)}),this._fs.readFile(r,function(v,_){!v&&_&&_.length>0?(l=_.slice(0,16),c=_.slice(16),o.record(60,r)):o.record(61,r),h()})}},e.prototype._verifyCachedData=function(t,r,o,s,a){var c=this;!s||t.cachedDataRejected||setTimeout(function(){var l=c._crypto.createHash("md5").update(r,"utf8").digest();s.equals(l)||(a.getConfig().onError(new Error("FAILED TO VERIFY CACHED DATA, deleting stale '"+o+"' now, but a RESTART IS REQUIRED")),c._fs.unlink(o,function(f){f&&a.getConfig().onError(f)}))},Math.ceil(5e3*(1+Math.random())))},e._BOM=65279,e._PREFIX="(function (require, define, __filename, __dirname) { ",e._SUFFIX=` });`,e}();function g(e,t){if(t.__$__isRecorded)return t;var r=function(o){e.record(33,o);try{return t(o)}finally{e.record(34,o)}};return r.__$__isRecorded=!0,r}d.ensureRecordedNodeRequire=g;function i(e){return new m(e)}d.createScriptLoader=i})(AMDLoader||(AMDLoader={}));var AMDLoader;(function(d){var m=function(){function i(e){var t=e.lastIndexOf("/");t!==-1?this.fromModulePath=e.substr(0,t+1):this.fromModulePath=""}return i._normalizeModuleId=function(e){var t=e,r;for(r=/\/\.\//;r.test(t);)t=t.replace(r,"/");for(t=t.replace(/^\.\//g,""),r=/\/(([^\/])|([^\/][^\/\.])|([^\/\.][^\/])|([^\/][^\/][^\/]+))\/\.\.\//;r.test(t);)t=t.replace(r,"/");return t=t.replace(/^(([^\/])|([^\/][^\/\.])|([^\/\.][^\/])|([^\/][^\/][^\/]+))\/\.\.\//,""),t},i.prototype.resolveModule=function(e){var t=e;return d.Utilities.isAbsolutePath(t)||(d.Utilities.startsWith(t,"./")||d.Utilities.startsWith(t,"../"))&&(t=i._normalizeModuleId(this.fromModulePath+t)),t},i.ROOT=new i(""),i}();d.ModuleIdResolver=m;var p=function(){function i(e,t,r,o,s,a){this.id=e,this.strId=t,this.dependencies=r,this._callback=o,this._errorback=s,this.moduleIdResolver=a,this.exports={},this.error=null,this.exportsPassedIn=!1,this.unresolvedDependenciesCount=this.dependencies.length,this._isComplete=!1}return i._safeInvokeFunction=function(e,t){try{return{returnedValue:e.apply(d.global,t),producedError:null}}catch(r){return{returnedValue:null,producedError:r}}},i._invokeFactory=function(e,t,r,o){return e.shouldInvokeFactory(t)?e.shouldCatchError()?this._safeInvokeFunction(r,o):{returnedValue:r.apply(d.global,o),producedError:null}:{returnedValue:null,producedError:null}},i.prototype.complete=function(e,t,r,o){this._isComplete=!0;var s=null;if(this._callback)if(typeof this._callback=="function"){e.record(21,this.strId);var a=i._invokeFactory(t,this.strId,this._callback,r);s=a.producedError,e.record(22,this.strId),!s&&typeof a.returnedValue<"u"&&(!this.exportsPassedIn||d.Utilities.isEmpty(this.exports))&&(this.exports=a.returnedValue)}else this.exports=this._callback;if(s){var c=d.ensureError(s);c.phase="factory",c.moduleId=this.strId,c.neededBy=o(this.id),this.error=c,t.onError(c)}this.dependencies=null,this._callback=null,this._errorback=null,this.moduleIdResolver=null},i.prototype.onDependencyError=function(e){return this._isComplete=!0,this.error=e,this._errorback?(this._errorback(e),!0):!1},i.prototype.isComplete=function(){return this._isComplete},i}();d.Module=p;var y=function(){function i(){this._nextId=0,this._strModuleIdToIntModuleId=new Map,this._intModuleIdToStrModuleId=[],this.getModuleId("exports"),this.getModuleId("module"),this.getModuleId("require")}return i.prototype.getMaxModuleId=function(){return this._nextId},i.prototype.getModuleId=function(e){var t=this._strModuleIdToIntModuleId.get(e);return typeof t>"u"&&(t=this._nextId++,this._strModuleIdToIntModuleId.set(e,t),this._intModuleIdToStrModuleId[t]=e),t},i.prototype.getStrModuleId=function(e){return this._intModuleIdToStrModuleId[e]},i}(),u=function(){function i(e){this.id=e}return i.EXPORTS=new i(0),i.MODULE=new i(1),i.REQUIRE=new i(2),i}();d.RegularDependency=u;var n=function(){function i(e,t,r){this.id=e,this.pluginId=t,this.pluginParam=r}return i}();d.PluginDependency=n;var g=function(){function i(e,t,r,o,s){s===void 0&&(s=0),this._env=e,this._scriptLoader=t,this._loaderAvailableTimestamp=s,this._defineFunc=r,this._requireFunc=o,this._moduleIdProvider=new y,this._config=new d.Configuration(this._env),this._hasDependencyCycle=!1,this._modules2=[],this._knownModules2=[],this._inverseDependencies2=[],this._inversePluginDependencies2=new Map,this._currentAnonymousDefineCall=null,this._recorder=null,this._buildInfoPath=[],this._buildInfoDefineStack=[],this._buildInfoDependencies=[]}return i.prototype.reset=function(){return new i(this._env,this._scriptLoader,this._defineFunc,this._requireFunc,this._loaderAvailableTimestamp)},i.prototype.getGlobalAMDDefineFunc=function(){return this._defineFunc},i.prototype.getGlobalAMDRequireFunc=function(){return this._requireFunc},i._findRelevantLocationInStack=function(e,t){for(var r=function(M){return M.replace(/\\/g,"/")},o=r(e),s=t.split(/\n/),a=0;a<s.length;a++){var c=s[a].match(/(.*):(\d+):(\d+)\)?$/);if(c){var l=c[1],f=c[2],h=c[3],v=Math.max(l.lastIndexOf(" ")+1,l.lastIndexOf("(")+1);if(l=l.substr(v),l=r(l),l===o){var _={line:parseInt(f,10),col:parseInt(h,10)};return _.line===1&&(_.col-=53),_}}}throw new Error("Could not correlate define call site for needle "+e)},i.prototype.getBuildInfo=function(){if(!this._config.isBuild())return null;for(var e=[],t=0,r=0,o=this._modules2.length;r<o;r++){var s=this._modules2[r];if(s){var a=this._buildInfoPath[s.id]||null,c=this._buildInfoDefineStack[s.id]||null,l=this._buildInfoDependencies[s.id];e[t++]={id:s.strId,path:a,defineLocation:a&&c?i._findRelevantLocationInStack(a,c):null,dependencies:l,shim:null,exports:s.exports}}}return e},i.prototype.getRecorder=function(){return this._recorder||(this._config.shouldRecordStats()?this._recorder=new d.LoaderEventRecorder(this._loaderAvailableTimestamp):this._recorder=d.NullLoaderEventRecorder.INSTANCE),this._recorder},i.prototype.getLoaderEvents=function(){return this.getRecorder().getEvents()},i.prototype.enqueueDefineAnonymousModule=function(e,t){if(this._currentAnonymousDefineCall!==null)throw new Error("Can only have one anonymous define call per script file");var r=null;this._config.isBuild()&&(r=new Error("StackLocation").stack||null),this._currentAnonymousDefineCall={stack:r,dependencies:e,callback:t}},i.prototype.defineModule=function(e,t,r,o,s,a){var c=this;a===void 0&&(a=new m(e));var l=this._moduleIdProvider.getModuleId(e);if(this._modules2[l]){this._config.isDuplicateMessageIgnoredFor(e)||console.warn("Duplicate definition of module '"+e+"'");return}var f=new p(l,e,this._normalizeDependencies(t,a),r,o,a);this._modules2[l]=f,this._config.isBuild()&&(this._buildInfoDefineStack[l]=s,this._buildInfoDependencies[l]=(f.dependencies||[]).map(function(h){return c._moduleIdProvider.getStrModuleId(h.id)})),this._resolve(f)},i.prototype._normalizeDependency=function(e,t){if(e==="exports")return u.EXPORTS;if(e==="module")return u.MODULE;if(e==="require")return u.REQUIRE;var r=e.indexOf("!");if(r>=0){var o=t.resolveModule(e.substr(0,r)),s=t.resolveModule(e.substr(r+1)),a=this._moduleIdProvider.getModuleId(o+"!"+s),c=this._moduleIdProvider.getModuleId(o);return new n(a,c,s)}return new u(this._moduleIdProvider.getModuleId(t.resolveModule(e)))},i.prototype._normalizeDependencies=function(e,t){for(var r=[],o=0,s=0,a=e.length;s<a;s++)r[o++]=this._normalizeDependency(e[s],t);return r},i.prototype._relativeRequire=function(e,t,r,o){if(typeof t=="string")return this.synchronousRequire(t,e);this.defineModule(d.Utilities.generateAnonymousModule(),t,r,o,null,e)},i.prototype.synchronousRequire=function(e,t){t===void 0&&(t=new m(e));var r=this._normalizeDependency(e,t),o=this._modules2[r.id];if(!o)throw new Error("Check dependency list! Synchronous require cannot resolve module '"+e+"'. This is the first mention of this module!");if(!o.isComplete())throw new Error("Check dependency list! Synchronous require cannot resolve module '"+e+"'. This module has not been resolved completely yet.");if(o.error)throw o.error;return o.exports},i.prototype.configure=function(e,t){var r=this._config.shouldRecordStats();t?this._config=new d.Configuration(this._env,e):this._config=this._config.cloneAndMerge(e),this._config.shouldRecordStats()&&!r&&(this._recorder=null)},i.prototype.getConfig=function(){return this._config},i.prototype._onLoad=function(e){if(this._currentAnonymousDefineCall!==null){var t=this._currentAnonymousDefineCall;this._currentAnonymousDefineCall=null,this.defineModule(this._moduleIdProvider.getStrModuleId(e),t.dependencies,t.callback,null,t.stack)}},i.prototype._createLoadError=function(e,t){var r=this,o=this._moduleIdProvider.getStrModuleId(e),s=(this._inverseDependencies2[e]||[]).map(function(c){return r._moduleIdProvider.getStrModuleId(c)}),a=d.ensureError(t);return a.phase="loading",a.moduleId=o,a.neededBy=s,a},i.prototype._onLoadError=function(e,t){var r=this._createLoadError(e,t);this._modules2[e]||(this._modules2[e]=new p(e,this._moduleIdProvider.getStrModuleId(e),[],function(){},null,null));for(var o=[],s=0,a=this._moduleIdProvider.getMaxModuleId();s<a;s++)o[s]=!1;var c=!1,l=[];for(l.push(e),o[e]=!0;l.length>0;){var f=l.shift(),h=this._modules2[f];h&&(c=h.onDependencyError(r)||c);var v=this._inverseDependencies2[f];if(v)for(var s=0,a=v.length;s<a;s++){var _=v[s];o[_]||(l.push(_),o[_]=!0)}}c||this._config.onError(r)},i.prototype._hasDependencyPath=function(e,t){var r=this._modules2[e];if(!r)return!1;for(var o=[],s=0,a=this._moduleIdProvider.getMaxModuleId();s<a;s++)o[s]=!1;var c=[];for(c.push(r),o[e]=!0;c.length>0;){var l=c.shift(),f=l.dependencies;if(f)for(var s=0,a=f.length;s<a;s++){var h=f[s];if(h.id===t)return!0;var v=this._modules2[h.id];v&&!o[h.id]&&(o[h.id]=!0,c.push(v))}}return!1},i.prototype._findCyclePath=function(e,t,r){if(e===t||r===50)return[e];var o=this._modules2[e];if(!o)return null;var s=o.dependencies;if(s)for(var a=0,c=s.length;a<c;a++){var l=this._findCyclePath(s[a].id,t,r+1);if(l!==null)return l.push(e),l}return null},i.prototype._createRequire=function(e){var t=this,r=function(o,s,a){return t._relativeRequire(e,o,s,a)};return r.toUrl=function(o){return t._config.requireToUrl(e.resolveModule(o))},r.getStats=function(){return t.getLoaderEvents()},r.hasDependencyCycle=function(){return t._hasDependencyCycle},r.config=function(o,s){s===void 0&&(s=!1),t.configure(o,s)},r.__$__nodeRequire=d.global.nodeRequire,r},i.prototype._loadModule=function(e){var t=this;if(!(this._modules2[e]||this._knownModules2[e])){this._knownModules2[e]=!0;var r=this._moduleIdProvider.getStrModuleId(e),o=this._config.moduleIdToPaths(r),s=/^@[^\/]+\/[^\/]+$/;this._env.isNode&&(r.indexOf("/")===-1||s.test(r))&&o.push("node|"+r);var a=-1,c=function(l){if(a++,a>=o.length)t._onLoadError(e,l);else{var f=o[a],h=t.getRecorder();if(t._config.isBuild()&&f==="empty:"){t._buildInfoPath[e]=f,t.defineModule(t._moduleIdProvider.getStrModuleId(e),[],null,null,null),t._onLoad(e);return}h.record(10,f),t._scriptLoader.load(t,f,function(){t._config.isBuild()&&(t._buildInfoPath[e]=f),h.record(11,f),t._onLoad(e)},function(v){h.record(12,f),c(v)})}};c(null)}},i.prototype._loadPluginDependency=function(e,t){var r=this;if(!(this._modules2[t.id]||this._knownModules2[t.id])){this._knownModules2[t.id]=!0;var o=function(s){r.defineModule(r._moduleIdProvider.getStrModuleId(t.id),[],s,null,null)};o.error=function(s){r._config.onError(r._createLoadError(t.id,s))},e.load(t.pluginParam,this._createRequire(m.ROOT),o,this._config.getOptionsLiteral())}},i.prototype._resolve=function(e){var t=this,r=e.dependencies;if(r)for(var o=0,s=r.length;o<s;o++){var a=r[o];if(a===u.EXPORTS){e.exportsPassedIn=!0,e.unresolvedDependenciesCount--;continue}if(a===u.MODULE){e.unresolvedDependenciesCount--;continue}if(a===u.REQUIRE){e.unresolvedDependenciesCount--;continue}var c=this._modules2[a.id];if(c&&c.isComplete()){if(c.error){e.onDependencyError(c.error);return}e.unresolvedDependenciesCount--;continue}if(this._hasDependencyPath(a.id,e.id)){this._hasDependencyCycle=!0,console.warn("There is a dependency cycle between '"+this._moduleIdProvider.getStrModuleId(a.id)+"' and '"+this._moduleIdProvider.getStrModuleId(e.id)+"'. The cyclic path follows:");var l=this._findCyclePath(a.id,e.id,0)||[];l.reverse(),l.push(a.id),console.warn(l.map(function(v){return t._moduleIdProvider.getStrModuleId(v)}).join(` => `)),e.unresolvedDependenciesCount--;continue}if(this._inverseDependencies2[a.id]=this._inverseDependencies2[a.id]||[],this._inverseDependencies2[a.id].push(e.id),a instanceof n){var f=this._modules2[a.pluginId];if(f&&f.isComplete()){this._loadPluginDependency(f.exports,a);continue}var h=this._inversePluginDependencies2.get(a.pluginId);h||(h=[],this._inversePluginDependencies2.set(a.pluginId,h)),h.push(a),this._loadModule(a.pluginId);continue}this._loadModule(a.id)}e.unresolvedDependenciesCount===0&&this._onModuleComplete(e)},i.prototype._onModuleComplete=function(e){var t=this,r=this.getRecorder();if(!e.isComplete()){var o=e.dependencies,s=[];if(o)for(var a=0,c=o.length;a<c;a++){var l=o[a];if(l===u.EXPORTS){s[a]=e.exports;continue}if(l===u.MODULE){s[a]={id:e.strId,config:function(){return t._config.getConfigForModule(e.strId)}};continue}if(l===u.REQUIRE){s[a]=this._createRequire(e.moduleIdResolver);continue}var f=this._modules2[l.id];if(f){s[a]=f.exports;continue}s[a]=null}var h=function(R){return(t._inverseDependencies2[R]||[]).map(function(I){return t._moduleIdProvider.getStrModuleId(I)})};e.complete(r,this._config,s,h);var v=this._inverseDependencies2[e.id];if(this._inverseDependencies2[e.id]=null,v)for(var a=0,c=v.length;a<c;a++){var _=v[a],M=this._modules2[_];M.unresolvedDependenciesCount--,M.unresolvedDependenciesCount===0&&this._onModuleComplete(M)}var E=this._inversePluginDependencies2.get(e.id);if(E){this._inversePluginDependencies2.delete(e.id);for(var a=0,c=E.length;a<c;a++)this._loadPluginDependency(e.exports,E[a])}}},i}();d.ModuleManager=g})(AMDLoader||(AMDLoader={}));var define,AMDLoader;(function(d){var m=new d.Environment,p=null,y=function(i,e,t){typeof i!="string"&&(t=e,e=i,i=null),(typeof e!="object"||!Array.isArray(e))&&(t=e,e=null),e||(e=["require","exports","module"]),i?p.defineModule(i,e,t,null,null):p.enqueueDefineAnonymousModule(e,t)};y.amd={jQuery:!0};var u=function(i,e){e===void 0&&(e=!1),p.configure(i,e)},n=function(){if(arguments.length===1){if(arguments[0]instanceof Object&&!Array.isArray(arguments[0])){u(arguments[0]);return}if(typeof arguments[0]=="string")return p.synchronousRequire(arguments[0])}if((arguments.length===2||arguments.length===3)&&Array.isArray(arguments[0])){p.defineModule(d.Utilities.generateAnonymousModule(),arguments[0],arguments[1],arguments[2],null);return}throw new Error("Unrecognized require call")};n.config=u,n.getConfig=function(){return p.getConfig().getOptionsLiteral()},n.reset=function(){p=p.reset()},n.getBuildInfo=function(){return p.getBuildInfo()},n.getStats=function(){return p.getLoaderEvents()},n.define=y;function g(){if(typeof d.global.require<"u"||typeof require<"u"){var i=d.global.require||require;if(typeof i=="function"&&typeof i.resolve=="function"){var e=d.ensureRecordedNodeRequire(p.getRecorder(),i);d.global.nodeRequire=e,n.nodeRequire=e,n.__$__nodeRequire=e}}m.isNode&&!m.isElectronRenderer&&!m.isElectronNodeIntegrationWebWorker?(module.exports=n,require=n):(m.isElectronRenderer||(d.global.define=y),d.global.require=n)}d.init=g,(typeof d.global.define!="function"||!d.global.define.amd)&&(p=new d.ModuleManager(m,d.createScriptLoader(m),y,n,d.Utilities.getHighPerformanceTimestamp()),typeof d.global.require<"u"&&typeof d.global.require!="function"&&n.config(d.global.require),define=function(){return y.apply(null,arguments)},define.amd=y.amd,typeof doNotInitLoader>"u"&&g())})(AMDLoader||(AMDLoader={})); //# sourceMappingURL=loader.js.map