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