@minecraft/creator-tools
Version:
Minecraft Creator Tools command line and libraries.
11 lines • 351 kB
JavaScript
/*!-----------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.48.0(0037b13fb5d186fdf1e7df51a9416a2de2b8c670)
* Released under the MIT license
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
*-----------------------------------------------------------*/(function(){var X=["require","exports","vs/editor/common/core/range","vs/editor/common/core/offsetRange","vs/editor/common/core/position","vs/base/common/errors","vs/base/common/strings","vs/base/common/arrays","vs/editor/common/diff/defaultLinesDiffComputer/algorithms/diffAlgorithm","vs/base/common/event","vs/editor/common/core/lineRange","vs/base/common/arraysFind","vs/base/common/assert","vs/base/common/lifecycle","vs/base/common/objects","vs/editor/common/diff/defaultLinesDiffComputer/utils","vs/editor/common/diff/rangeMapping","vs/base/common/platform","vs/base/common/uri","vs/nls","vs/base/common/functional","vs/base/common/iterator","vs/base/common/linkedList","vs/base/common/map","vs/base/common/stopwatch","vs/base/common/diff/diff","vs/base/common/types","vs/base/common/codiconsUtil","vs/base/common/uint","vs/editor/common/core/characterClassifier","vs/editor/common/core/wordHelper","vs/editor/common/diff/defaultLinesDiffComputer/algorithms/myersDiffAlgorithm","vs/editor/common/diff/defaultLinesDiffComputer/linesSliceCharSequence","vs/editor/common/diff/linesDiffComputer","vs/base/common/cache","vs/base/common/color","vs/base/common/diff/diffChange","vs/base/common/keyCodes","vs/base/common/lazy","vs/base/common/cancellation","vs/base/common/hash","vs/base/common/codiconsLibrary","vs/base/common/codicons","vs/editor/common/core/selection","vs/editor/common/core/wordCharacterClassifier","vs/editor/common/diff/defaultLinesDiffComputer/heuristicSequenceOptimizations","vs/editor/common/diff/defaultLinesDiffComputer/lineSequence","vs/editor/common/diff/defaultLinesDiffComputer/algorithms/dynamicProgrammingDiffing","vs/editor/common/diff/defaultLinesDiffComputer/computeMovedLines","vs/editor/common/diff/defaultLinesDiffComputer/defaultLinesDiffComputer","vs/editor/common/diff/legacyLinesDiffComputer","vs/editor/common/diff/linesDiffComputers","vs/editor/common/languages/defaultDocumentColorsComputer","vs/editor/common/languages/linkComputer","vs/editor/common/languages/supports/inplaceReplaceSupport","vs/editor/common/model","vs/editor/common/model/prefixSumComputer","vs/editor/common/model/mirrorTextModel","vs/editor/common/model/textModelSearch","vs/editor/common/services/findSectionHeaders","vs/editor/common/services/unicodeTextModelHighlighter","vs/editor/common/standalone/standaloneEnums","vs/editor/common/tokenizationRegistry","vs/nls!vs/base/common/platform","vs/nls!vs/base/common/worker/simpleWorker","vs/base/common/process","vs/base/common/path","vs/nls!vs/editor/common/languages","vs/editor/common/languages","vs/editor/common/services/editorBaseApi","vs/base/common/worker/simpleWorker","vs/editor/common/services/editorSimpleWorker"],Z=function(O){for(var n=[],r=0,x=O.length;r<x;r++)n[r]=X[O[r]];return n};const Re=this,Ae=typeof global=="object"?global:{};var ue;(function(O){O.global=Re;class n{get isWindows(){return this._detect(),this._isWindows}get isNode(){return this._detect(),this._isNode}get isElectronRenderer(){return this._detect(),this._isElectronRenderer}get isWebWorker(){return this._detect(),this._isWebWorker}get isElectronNodeIntegrationWebWorker(){return this._detect(),this._isElectronNodeIntegrationWebWorker}constructor(){this._detected=!1,this._isWindows=!1,this._isNode=!1,this._isElectronRenderer=!1,this._isWebWorker=!1,this._isElectronNodeIntegrationWebWorker=!1}_detect(){this._detected||(this._detected=!0,this._isWindows=n._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 O.global.importScripts=="function",this._isElectronNodeIntegrationWebWorker=this._isWebWorker&&typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.electron<"u"&&process.type==="worker")}static _isWindows(){return typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.indexOf("Windows")>=0?!0:typeof process<"u"?process.platform==="win32":!1}}O.Environment=n})(ue||(ue={}));var ue;(function(O){class n{constructor(d,g,p){this.type=d,this.detail=g,this.timestamp=p}}O.LoaderEvent=n;class r{constructor(d){this._events=[new n(1,"",d)]}record(d,g){this._events.push(new n(d,g,O.Utilities.getHighPerformanceTimestamp()))}getEvents(){return this._events}}O.LoaderEventRecorder=r;class x{record(d,g){}getEvents(){return[]}}x.INSTANCE=new x,O.NullLoaderEventRecorder=x})(ue||(ue={}));var ue;(function(O){class n{static fileUriToFilePath(x,A){if(A=decodeURI(A).replace(/%23/g,"#"),x){if(/^file:\/\/\//.test(A))return A.substr(8);if(/^file:\/\//.test(A))return A.substr(5)}else if(/^file:\/\//.test(A))return A.substr(7);return A}static startsWith(x,A){return x.length>=A.length&&x.substr(0,A.length)===A}static endsWith(x,A){return x.length>=A.length&&x.substr(x.length-A.length)===A}static containsQueryString(x){return/^[^\#]*\?/gi.test(x)}static isAbsolutePath(x){return/^((http:\/\/)|(https:\/\/)|(file:\/\/)|(\/))/.test(x)}static forEachProperty(x,A){if(x){let d;for(d in x)x.hasOwnProperty(d)&&A(d,x[d])}}static isEmpty(x){let A=!0;return n.forEachProperty(x,()=>{A=!1}),A}static recursiveClone(x){if(!x||typeof x!="object"||x instanceof RegExp||!Array.isArray(x)&&Object.getPrototypeOf(x)!==Object.prototype)return x;let A=Array.isArray(x)?[]:{};return n.forEachProperty(x,(d,g)=>{g&&typeof g=="object"?A[d]=n.recursiveClone(g):A[d]=g}),A}static generateAnonymousModule(){return"===anonymous"+n.NEXT_ANONYMOUS_ID+++"==="}static isAnonymousModule(x){return n.startsWith(x,"===anonymous")}static getHighPerformanceTimestamp(){return this.PERFORMANCE_NOW_PROBED||(this.PERFORMANCE_NOW_PROBED=!0,this.HAS_PERFORMANCE_NOW=O.global.performance&&typeof O.global.performance.now=="function"),this.HAS_PERFORMANCE_NOW?O.global.performance.now():Date.now()}}n.NEXT_ANONYMOUS_ID=1,n.PERFORMANCE_NOW_PROBED=!1,n.HAS_PERFORMANCE_NOW=!1,O.Utilities=n})(ue||(ue={}));var ue;(function(O){function n(A){if(A instanceof Error)return A;const d=new Error(A.message||String(A)||"Unknown Error");return A.stack&&(d.stack=A.stack),d}O.ensureError=n;class r{static validateConfigurationOptions(d){function g(p){if(p.phase==="loading"){console.error('Loading "'+p.moduleId+'" failed'),console.error(p),console.error("Here are the modules that depend on it:"),console.error(p.neededBy);return}if(p.phase==="factory"){console.error('The factory function of "'+p.moduleId+'" has thrown an exception'),console.error(p),console.error("Here are the modules that depend on it:"),console.error(p.neededBy);return}}if(d=d||{},typeof d.baseUrl!="string"&&(d.baseUrl=""),typeof d.isBuild!="boolean"&&(d.isBuild=!1),typeof d.paths!="object"&&(d.paths={}),typeof d.config!="object"&&(d.config={}),typeof d.catchError>"u"&&(d.catchError=!1),typeof d.recordStats>"u"&&(d.recordStats=!1),typeof d.urlArgs!="string"&&(d.urlArgs=""),typeof d.onError!="function"&&(d.onError=g),Array.isArray(d.ignoreDuplicateModules)||(d.ignoreDuplicateModules=[]),d.baseUrl.length>0&&(O.Utilities.endsWith(d.baseUrl,"/")||(d.baseUrl+="/")),typeof d.cspNonce!="string"&&(d.cspNonce=""),typeof d.preferScriptTags>"u"&&(d.preferScriptTags=!1),d.nodeCachedData&&typeof d.nodeCachedData=="object"&&(typeof d.nodeCachedData.seed!="string"&&(d.nodeCachedData.seed="seed"),(typeof d.nodeCachedData.writeDelay!="number"||d.nodeCachedData.writeDelay<0)&&(d.nodeCachedData.writeDelay=1e3*7),!d.nodeCachedData.path||typeof d.nodeCachedData.path!="string")){const p=n(new Error("INVALID cached data configuration, 'path' MUST be set"));p.phase="configuration",d.onError(p),d.nodeCachedData=void 0}return d}static mergeConfigurationOptions(d=null,g=null){let p=O.Utilities.recursiveClone(g||{});return O.Utilities.forEachProperty(d,(o,a)=>{o==="ignoreDuplicateModules"&&typeof p.ignoreDuplicateModules<"u"?p.ignoreDuplicateModules=p.ignoreDuplicateModules.concat(a):o==="paths"&&typeof p.paths<"u"?O.Utilities.forEachProperty(a,(v,e)=>p.paths[v]=e):o==="config"&&typeof p.config<"u"?O.Utilities.forEachProperty(a,(v,e)=>p.config[v]=e):p[o]=O.Utilities.recursiveClone(a)}),r.validateConfigurationOptions(p)}}O.ConfigurationOptionsUtil=r;class x{constructor(d,g){if(this._env=d,this.options=r.mergeConfigurationOptions(g),this._createIgnoreDuplicateModulesMap(),this._createSortedPathsRules(),this.options.baseUrl===""&&this.options.nodeRequire&&this.options.nodeRequire.main&&this.options.nodeRequire.main.filename&&this._env.isNode){let p=this.options.nodeRequire.main.filename,o=Math.max(p.lastIndexOf("/"),p.lastIndexOf("\\"));this.options.baseUrl=p.substring(0,o+1)}}_createIgnoreDuplicateModulesMap(){this.ignoreDuplicateModulesMap={};for(let d=0;d<this.options.ignoreDuplicateModules.length;d++)this.ignoreDuplicateModulesMap[this.options.ignoreDuplicateModules[d]]=!0}_createSortedPathsRules(){this.sortedPathsRules=[],O.Utilities.forEachProperty(this.options.paths,(d,g)=>{Array.isArray(g)?this.sortedPathsRules.push({from:d,to:g}):this.sortedPathsRules.push({from:d,to:[g]})}),this.sortedPathsRules.sort((d,g)=>g.from.length-d.from.length)}cloneAndMerge(d){return new x(this._env,r.mergeConfigurationOptions(d,this.options))}getOptionsLiteral(){return this.options}_applyPaths(d){let g;for(let p=0,o=this.sortedPathsRules.length;p<o;p++)if(g=this.sortedPathsRules[p],O.Utilities.startsWith(d,g.from)){let a=[];for(let v=0,e=g.to.length;v<e;v++)a.push(g.to[v]+d.substr(g.from.length));return a}return[d]}_addUrlArgsToUrl(d){return O.Utilities.containsQueryString(d)?d+"&"+this.options.urlArgs:d+"?"+this.options.urlArgs}_addUrlArgsIfNecessaryToUrl(d){return this.options.urlArgs?this._addUrlArgsToUrl(d):d}_addUrlArgsIfNecessaryToUrls(d){if(this.options.urlArgs)for(let g=0,p=d.length;g<p;g++)d[g]=this._addUrlArgsToUrl(d[g]);return d}moduleIdToPaths(d){if(this._env.isNode&&this.options.amdModulesPattern instanceof RegExp&&!this.options.amdModulesPattern.test(d))return this.isBuild()?["empty:"]:["node|"+d];let g=d,p;if(!O.Utilities.endsWith(g,".js")&&!O.Utilities.isAbsolutePath(g)){p=this._applyPaths(g);for(let o=0,a=p.length;o<a;o++)this.isBuild()&&p[o]==="empty:"||(O.Utilities.isAbsolutePath(p[o])||(p[o]=this.options.baseUrl+p[o]),!O.Utilities.endsWith(p[o],".js")&&!O.Utilities.containsQueryString(p[o])&&(p[o]=p[o]+".js"))}else!O.Utilities.endsWith(g,".js")&&!O.Utilities.containsQueryString(g)&&(g=g+".js"),p=[g];return this._addUrlArgsIfNecessaryToUrls(p)}requireToUrl(d){let g=d;return O.Utilities.isAbsolutePath(g)||(g=this._applyPaths(g)[0],O.Utilities.isAbsolutePath(g)||(g=this.options.baseUrl+g)),this._addUrlArgsIfNecessaryToUrl(g)}isBuild(){return this.options.isBuild}shouldInvokeFactory(d){return!!(!this.options.isBuild||O.Utilities.isAnonymousModule(d)||this.options.buildForceInvokeFactory&&this.options.buildForceInvokeFactory[d])}isDuplicateMessageIgnoredFor(d){return this.ignoreDuplicateModulesMap.hasOwnProperty(d)}getConfigForModule(d){if(this.options.config)return this.options.config[d]}shouldCatchError(){return this.options.catchError}shouldRecordStats(){return this.options.recordStats}onError(d){this.options.onError(d)}}O.Configuration=x})(ue||(ue={}));var ue;(function(O){class n{constructor(a){this._env=a,this._scriptLoader=null,this._callbackMap={}}load(a,v,e,s){if(!this._scriptLoader)if(this._env.isWebWorker)this._scriptLoader=new A;else if(this._env.isElectronRenderer){const{preferScriptTags:h}=a.getConfig().getOptionsLiteral();h?this._scriptLoader=new r:this._scriptLoader=new d(this._env)}else this._env.isNode?this._scriptLoader=new d(this._env):this._scriptLoader=new r;let u={callback:e,errorback:s};if(this._callbackMap.hasOwnProperty(v)){this._callbackMap[v].push(u);return}this._callbackMap[v]=[u],this._scriptLoader.load(a,v,()=>this.triggerCallback(v),h=>this.triggerErrorback(v,h))}triggerCallback(a){let v=this._callbackMap[a];delete this._callbackMap[a];for(let e=0;e<v.length;e++)v[e].callback()}triggerErrorback(a,v){let e=this._callbackMap[a];delete this._callbackMap[a];for(let s=0;s<e.length;s++)e[s].errorback(v)}}class r{attachListeners(a,v,e){let s=()=>{a.removeEventListener("load",u),a.removeEventListener("error",h)},u=m=>{s(),v()},h=m=>{s(),e(m)};a.addEventListener("load",u),a.addEventListener("error",h)}load(a,v,e,s){if(/^node\|/.test(v)){let u=a.getConfig().getOptionsLiteral(),h=g(a.getRecorder(),u.nodeRequire||O.global.nodeRequire),m=v.split("|"),f=null;try{f=h(m[1])}catch(y){s(y);return}a.enqueueDefineAnonymousModule([],()=>f),e()}else{let u=document.createElement("script");u.setAttribute("async","async"),u.setAttribute("type","text/javascript"),this.attachListeners(u,e,s);const{trustedTypesPolicy:h}=a.getConfig().getOptionsLiteral();h&&(v=h.createScriptURL(v)),u.setAttribute("src",v);const{cspNonce:m}=a.getConfig().getOptionsLiteral();m&&u.setAttribute("nonce",m),document.getElementsByTagName("head")[0].appendChild(u)}}}function x(o){const{trustedTypesPolicy:a}=o.getConfig().getOptionsLiteral();try{return(a?self.eval(a.createScript("","true")):new Function("true")).call(self),!0}catch{return!1}}class A{constructor(){this._cachedCanUseEval=null}_canUseEval(a){return this._cachedCanUseEval===null&&(this._cachedCanUseEval=x(a)),this._cachedCanUseEval}load(a,v,e,s){if(/^node\|/.test(v)){const u=a.getConfig().getOptionsLiteral(),h=g(a.getRecorder(),u.nodeRequire||O.global.nodeRequire),m=v.split("|");let f=null;try{f=h(m[1])}catch(y){s(y);return}a.enqueueDefineAnonymousModule([],function(){return f}),e()}else{const{trustedTypesPolicy:u}=a.getConfig().getOptionsLiteral();if(!(/^((http:)|(https:)|(file:))/.test(v)&&v.substring(0,self.origin.length)!==self.origin)&&this._canUseEval(a)){fetch(v).then(m=>{if(m.status!==200)throw new Error(m.statusText);return m.text()}).then(m=>{m=`${m}
//# sourceURL=${v}`,(u?self.eval(u.createScript("",m)):new Function(m)).call(self),e()}).then(void 0,s);return}try{u&&(v=u.createScriptURL(v)),importScripts(v),e()}catch(m){s(m)}}}}class d{constructor(a){this._env=a,this._didInitialize=!1,this._didPatchNodeRequire=!1}_init(a){this._didInitialize||(this._didInitialize=!0,this._fs=a("fs"),this._vm=a("vm"),this._path=a("path"),this._crypto=a("crypto"))}_initNodeRequire(a,v){const{nodeCachedData:e}=v.getConfig().getOptionsLiteral();if(!e||this._didPatchNodeRequire)return;this._didPatchNodeRequire=!0;const s=this,u=a("module");function h(m){const f=m.constructor;let y=function(N){try{return m.require(N)}finally{}};return y.resolve=function(N,R){return f._resolveFilename(N,m,!1,R)},y.resolve.paths=function(N){return f._resolveLookupPaths(N,m)},y.main=process.mainModule,y.extensions=f._extensions,y.cache=f._cache,y}u.prototype._compile=function(m,f){const y=u.wrap(m.replace(/^#!.*/,"")),_=v.getRecorder(),N=s._getCachedDataPath(e,f),R={filename:f};let w;try{const E=s._fs.readFileSync(N);w=E.slice(0,16),R.cachedData=E.slice(16),_.record(60,N)}catch{_.record(61,N)}const i=new s._vm.Script(y,R),l=i.runInThisContext(R),c=s._path.dirname(f),L=h(this),b=[this.exports,L,this,f,c,process,Ae,Buffer],C=l.apply(this.exports,b);return s._handleCachedData(i,y,N,!R.cachedData,v),s._verifyCachedData(i,y,N,w,v),C}}load(a,v,e,s){const u=a.getConfig().getOptionsLiteral(),h=g(a.getRecorder(),u.nodeRequire||O.global.nodeRequire),m=u.nodeInstrumenter||function(y){return y};this._init(h),this._initNodeRequire(h,a);let f=a.getRecorder();if(/^node\|/.test(v)){let y=v.split("|"),_=null;try{_=h(y[1])}catch(N){s(N);return}a.enqueueDefineAnonymousModule([],()=>_),e()}else{v=O.Utilities.fileUriToFilePath(this._env.isWindows,v);const y=this._path.normalize(v),_=this._getElectronRendererScriptPathOrUri(y),N=!!u.nodeCachedData,R=N?this._getCachedDataPath(u.nodeCachedData,v):void 0;this._readSourceAndCachedData(y,R,f,(w,i,l,c)=>{if(w){s(w);return}let L;i.charCodeAt(0)===d._BOM?L=d._PREFIX+i.substring(1)+d._SUFFIX:L=d._PREFIX+i+d._SUFFIX,L=m(L,y);const b={filename:_,cachedData:l},C=this._createAndEvalScript(a,L,b,e,s);this._handleCachedData(C,L,R,N&&!l,a),this._verifyCachedData(C,L,R,c,a)})}}_createAndEvalScript(a,v,e,s,u){const h=a.getRecorder();h.record(31,e.filename);const m=new this._vm.Script(v,e),f=m.runInThisContext(e),y=a.getGlobalAMDDefineFunc();let _=!1;const N=function(){return _=!0,y.apply(null,arguments)};return N.amd=y.amd,f.call(O.global,a.getGlobalAMDRequireFunc(),N,e.filename,this._path.dirname(e.filename)),h.record(32,e.filename),_?s():u(new Error(`Didn't receive define call in ${e.filename}!`)),m}_getElectronRendererScriptPathOrUri(a){if(!this._env.isElectronRenderer)return a;let v=a.match(/^([a-z])\:(.*)/i);return v?`file:///${(v[1].toUpperCase()+":"+v[2]).replace(/\\/g,"/")}`:`file://${a}`}_getCachedDataPath(a,v){const e=this._crypto.createHash("md5").update(v,"utf8").update(a.seed,"utf8").update(process.arch,"").digest("hex"),s=this._path.basename(v).replace(/\.js$/,"");return this._path.join(a.path,`${s}-${e}.code`)}_handleCachedData(a,v,e,s,u){a.cachedDataRejected?this._fs.unlink(e,h=>{u.getRecorder().record(62,e),this._createAndWriteCachedData(a,v,e,u),h&&u.getConfig().onError(h)}):s&&this._createAndWriteCachedData(a,v,e,u)}_createAndWriteCachedData(a,v,e,s){let u=Math.ceil(s.getConfig().getOptionsLiteral().nodeCachedData.writeDelay*(1+Math.random())),h=-1,m=0,f;const y=()=>{setTimeout(()=>{f||(f=this._crypto.createHash("md5").update(v,"utf8").digest());const _=a.createCachedData();if(!(_.length===0||_.length===h||m>=5)){if(_.length<h){y();return}h=_.length,this._fs.writeFile(e,Buffer.concat([f,_]),N=>{N&&s.getConfig().onError(N),s.getRecorder().record(63,e),y()})}},u*Math.pow(4,m++))};y()}_readSourceAndCachedData(a,v,e,s){if(!v)this._fs.readFile(a,{encoding:"utf8"},s);else{let u,h,m,f=2;const y=_=>{_?s(_):--f===0&&s(void 0,u,h,m)};this._fs.readFile(a,{encoding:"utf8"},(_,N)=>{u=N,y(_)}),this._fs.readFile(v,(_,N)=>{!_&&N&&N.length>0?(m=N.slice(0,16),h=N.slice(16),e.record(60,v)):e.record(61,v),y()})}}_verifyCachedData(a,v,e,s,u){s&&(a.cachedDataRejected||setTimeout(()=>{const h=this._crypto.createHash("md5").update(v,"utf8").digest();s.equals(h)||(u.getConfig().onError(new Error(`FAILED TO VERIFY CACHED DATA, deleting stale '${e}' now, but a RESTART IS REQUIRED`)),this._fs.unlink(e,m=>{m&&u.getConfig().onError(m)}))},Math.ceil(5e3*(1+Math.random()))))}}d._BOM=65279,d._PREFIX="(function (require, define, __filename, __dirname) { ",d._SUFFIX=`
});`;function g(o,a){if(a.__$__isRecorded)return a;const v=function(s){o.record(33,s);try{return a(s)}finally{o.record(34,s)}};return v.__$__isRecorded=!0,v}O.ensureRecordedNodeRequire=g;function p(o){return new n(o)}O.createScriptLoader=p})(ue||(ue={}));var ue;(function(O){class n{constructor(o){let a=o.lastIndexOf("/");a!==-1?this.fromModulePath=o.substr(0,a+1):this.fromModulePath=""}static _normalizeModuleId(o){let a=o,v;for(v=/\/\.\//;v.test(a);)a=a.replace(v,"/");for(a=a.replace(/^\.\//g,""),v=/\/(([^\/])|([^\/][^\/\.])|([^\/\.][^\/])|([^\/][^\/][^\/]+))\/\.\.\//;v.test(a);)a=a.replace(v,"/");return a=a.replace(/^(([^\/])|([^\/][^\/\.])|([^\/\.][^\/])|([^\/][^\/][^\/]+))\/\.\.\//,""),a}resolveModule(o){let a=o;return O.Utilities.isAbsolutePath(a)||(O.Utilities.startsWith(a,"./")||O.Utilities.startsWith(a,"../"))&&(a=n._normalizeModuleId(this.fromModulePath+a)),a}}n.ROOT=new n(""),O.ModuleIdResolver=n;class r{constructor(o,a,v,e,s,u){this.id=o,this.strId=a,this.dependencies=v,this._callback=e,this._errorback=s,this.moduleIdResolver=u,this.exports={},this.error=null,this.exportsPassedIn=!1,this.unresolvedDependenciesCount=this.dependencies.length,this._isComplete=!1}static _safeInvokeFunction(o,a){try{return{returnedValue:o.apply(O.global,a),producedError:null}}catch(v){return{returnedValue:null,producedError:v}}}static _invokeFactory(o,a,v,e){return o.shouldInvokeFactory(a)?o.shouldCatchError()?this._safeInvokeFunction(v,e):{returnedValue:v.apply(O.global,e),producedError:null}:{returnedValue:null,producedError:null}}complete(o,a,v,e){this._isComplete=!0;let s=null;if(this._callback)if(typeof this._callback=="function"){o.record(21,this.strId);let u=r._invokeFactory(a,this.strId,this._callback,v);s=u.producedError,o.record(22,this.strId),!s&&typeof u.returnedValue<"u"&&(!this.exportsPassedIn||O.Utilities.isEmpty(this.exports))&&(this.exports=u.returnedValue)}else this.exports=this._callback;if(s){let u=O.ensureError(s);u.phase="factory",u.moduleId=this.strId,u.neededBy=e(this.id),this.error=u,a.onError(u)}this.dependencies=null,this._callback=null,this._errorback=null,this.moduleIdResolver=null}onDependencyError(o){return this._isComplete=!0,this.error=o,this._errorback?(this._errorback(o),!0):!1}isComplete(){return this._isComplete}}O.Module=r;class x{constructor(){this._nextId=0,this._strModuleIdToIntModuleId=new Map,this._intModuleIdToStrModuleId=[],this.getModuleId("exports"),this.getModuleId("module"),this.getModuleId("require")}getMaxModuleId(){return this._nextId}getModuleId(o){let a=this._strModuleIdToIntModuleId.get(o);return typeof a>"u"&&(a=this._nextId++,this._strModuleIdToIntModuleId.set(o,a),this._intModuleIdToStrModuleId[a]=o),a}getStrModuleId(o){return this._intModuleIdToStrModuleId[o]}}class A{constructor(o){this.id=o}}A.EXPORTS=new A(0),A.MODULE=new A(1),A.REQUIRE=new A(2),O.RegularDependency=A;class d{constructor(o,a,v){this.id=o,this.pluginId=a,this.pluginParam=v}}O.PluginDependency=d;class g{constructor(o,a,v,e,s=0){this._env=o,this._scriptLoader=a,this._loaderAvailableTimestamp=s,this._defineFunc=v,this._requireFunc=e,this._moduleIdProvider=new x,this._config=new O.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=[],this._requireFunc.moduleManager=this}reset(){return new g(this._env,this._scriptLoader,this._defineFunc,this._requireFunc,this._loaderAvailableTimestamp)}getGlobalAMDDefineFunc(){return this._defineFunc}getGlobalAMDRequireFunc(){return this._requireFunc}static _findRelevantLocationInStack(o,a){let v=u=>u.replace(/\\/g,"/"),e=v(o),s=a.split(/\n/);for(let u=0;u<s.length;u++){let h=s[u].match(/(.*):(\d+):(\d+)\)?$/);if(h){let m=h[1],f=h[2],y=h[3],_=Math.max(m.lastIndexOf(" ")+1,m.lastIndexOf("(")+1);if(m=m.substr(_),m=v(m),m===e){let N={line:parseInt(f,10),col:parseInt(y,10)};return N.line===1&&(N.col-=53),N}}}throw new Error("Could not correlate define call site for needle "+o)}getBuildInfo(){if(!this._config.isBuild())return null;let o=[],a=0;for(let v=0,e=this._modules2.length;v<e;v++){let s=this._modules2[v];if(!s)continue;let u=this._buildInfoPath[s.id]||null,h=this._buildInfoDefineStack[s.id]||null,m=this._buildInfoDependencies[s.id];o[a++]={id:s.strId,path:u,defineLocation:u&&h?g._findRelevantLocationInStack(u,h):null,dependencies:m,shim:null,exports:s.exports}}return o}getRecorder(){return this._recorder||(this._config.shouldRecordStats()?this._recorder=new O.LoaderEventRecorder(this._loaderAvailableTimestamp):this._recorder=O.NullLoaderEventRecorder.INSTANCE),this._recorder}getLoaderEvents(){return this.getRecorder().getEvents()}enqueueDefineAnonymousModule(o,a){if(this._currentAnonymousDefineCall!==null)throw new Error("Can only have one anonymous define call per script file");let v=null;this._config.isBuild()&&(v=new Error("StackLocation").stack||null),this._currentAnonymousDefineCall={stack:v,dependencies:o,callback:a}}defineModule(o,a,v,e,s,u=new n(o)){let h=this._moduleIdProvider.getModuleId(o);if(this._modules2[h]){this._config.isDuplicateMessageIgnoredFor(o)||console.warn("Duplicate definition of module '"+o+"'");return}let m=new r(h,o,this._normalizeDependencies(a,u),v,e,u);this._modules2[h]=m,this._config.isBuild()&&(this._buildInfoDefineStack[h]=s,this._buildInfoDependencies[h]=(m.dependencies||[]).map(f=>this._moduleIdProvider.getStrModuleId(f.id))),this._resolve(m)}_normalizeDependency(o,a){if(o==="exports")return A.EXPORTS;if(o==="module")return A.MODULE;if(o==="require")return A.REQUIRE;let v=o.indexOf("!");if(v>=0){let e=a.resolveModule(o.substr(0,v)),s=a.resolveModule(o.substr(v+1)),u=this._moduleIdProvider.getModuleId(e+"!"+s),h=this._moduleIdProvider.getModuleId(e);return new d(u,h,s)}return new A(this._moduleIdProvider.getModuleId(a.resolveModule(o)))}_normalizeDependencies(o,a){let v=[],e=0;for(let s=0,u=o.length;s<u;s++)v[e++]=this._normalizeDependency(o[s],a);return v}_relativeRequire(o,a,v,e){if(typeof a=="string")return this.synchronousRequire(a,o);this.defineModule(O.Utilities.generateAnonymousModule(),a,v,e,null,o)}synchronousRequire(o,a=new n(o)){let v=this._normalizeDependency(o,a),e=this._modules2[v.id];if(!e)throw new Error("Check dependency list! Synchronous require cannot resolve module '"+o+"'. This is the first mention of this module!");if(!e.isComplete())throw new Error("Check dependency list! Synchronous require cannot resolve module '"+o+"'. This module has not been resolved completely yet.");if(e.error)throw e.error;return e.exports}configure(o,a){let v=this._config.shouldRecordStats();a?this._config=new O.Configuration(this._env,o):this._config=this._config.cloneAndMerge(o),this._config.shouldRecordStats()&&!v&&(this._recorder=null)}getConfig(){return this._config}_onLoad(o){if(this._currentAnonymousDefineCall!==null){let a=this._currentAnonymousDefineCall;this._currentAnonymousDefineCall=null,this.defineModule(this._moduleIdProvider.getStrModuleId(o),a.dependencies,a.callback,null,a.stack)}}_createLoadError(o,a){let v=this._moduleIdProvider.getStrModuleId(o),e=(this._inverseDependencies2[o]||[]).map(u=>this._moduleIdProvider.getStrModuleId(u));const s=O.ensureError(a);return s.phase="loading",s.moduleId=v,s.neededBy=e,s}_onLoadError(o,a){const v=this._createLoadError(o,a);this._modules2[o]||(this._modules2[o]=new r(o,this._moduleIdProvider.getStrModuleId(o),[],()=>{},null,null));let e=[];for(let h=0,m=this._moduleIdProvider.getMaxModuleId();h<m;h++)e[h]=!1;let s=!1,u=[];for(u.push(o),e[o]=!0;u.length>0;){let h=u.shift(),m=this._modules2[h];m&&(s=m.onDependencyError(v)||s);let f=this._inverseDependencies2[h];if(f)for(let y=0,_=f.length;y<_;y++){let N=f[y];e[N]||(u.push(N),e[N]=!0)}}s||this._config.onError(v)}_hasDependencyPath(o,a){let v=this._modules2[o];if(!v)return!1;let e=[];for(let u=0,h=this._moduleIdProvider.getMaxModuleId();u<h;u++)e[u]=!1;let s=[];for(s.push(v),e[o]=!0;s.length>0;){let h=s.shift().dependencies;if(h)for(let m=0,f=h.length;m<f;m++){let y=h[m];if(y.id===a)return!0;let _=this._modules2[y.id];_&&!e[y.id]&&(e[y.id]=!0,s.push(_))}}return!1}_findCyclePath(o,a,v){if(o===a||v===50)return[o];let e=this._modules2[o];if(!e)return null;let s=e.dependencies;if(s)for(let u=0,h=s.length;u<h;u++){let m=this._findCyclePath(s[u].id,a,v+1);if(m!==null)return m.push(o),m}return null}_createRequire(o){let a=(v,e,s)=>this._relativeRequire(o,v,e,s);return a.toUrl=v=>this._config.requireToUrl(o.resolveModule(v)),a.getStats=()=>this.getLoaderEvents(),a.hasDependencyCycle=()=>this._hasDependencyCycle,a.config=(v,e=!1)=>{this.configure(v,e)},a.__$__nodeRequire=O.global.nodeRequire,a}_loadModule(o){if(this._modules2[o]||this._knownModules2[o])return;this._knownModules2[o]=!0;let a=this._moduleIdProvider.getStrModuleId(o),v=this._config.moduleIdToPaths(a),e=/^@[^\/]+\/[^\/]+$/;this._env.isNode&&(a.indexOf("/")===-1||e.test(a))&&v.push("node|"+a);let s=-1,u=h=>{if(s++,s>=v.length)this._onLoadError(o,h);else{let m=v[s],f=this.getRecorder();if(this._config.isBuild()&&m==="empty:"){this._buildInfoPath[o]=m,this.defineModule(this._moduleIdProvider.getStrModuleId(o),[],null,null,null),this._onLoad(o);return}f.record(10,m),this._scriptLoader.load(this,m,()=>{this._config.isBuild()&&(this._buildInfoPath[o]=m),f.record(11,m),this._onLoad(o)},y=>{f.record(12,m),u(y)})}};u(null)}_loadPluginDependency(o,a){if(this._modules2[a.id]||this._knownModules2[a.id])return;this._knownModules2[a.id]=!0;let v=e=>{this.defineModule(this._moduleIdProvider.getStrModuleId(a.id),[],e,null,null)};v.error=e=>{this._config.onError(this._createLoadError(a.id,e))},o.load(a.pluginParam,this._createRequire(n.ROOT),v,this._config.getOptionsLiteral())}_resolve(o){let a=o.dependencies;if(a)for(let v=0,e=a.length;v<e;v++){let s=a[v];if(s===A.EXPORTS){o.exportsPassedIn=!0,o.unresolvedDependenciesCount--;continue}if(s===A.MODULE){o.unresolvedDependenciesCount--;continue}if(s===A.REQUIRE){o.unresolvedDependenciesCount--;continue}let u=this._modules2[s.id];if(u&&u.isComplete()){if(u.error){o.onDependencyError(u.error);return}o.unresolvedDependenciesCount--;continue}if(this._hasDependencyPath(s.id,o.id)){this._hasDependencyCycle=!0,console.warn("There is a dependency cycle between '"+this._moduleIdProvider.getStrModuleId(s.id)+"' and '"+this._moduleIdProvider.getStrModuleId(o.id)+"'. The cyclic path follows:");let h=this._findCyclePath(s.id,o.id,0)||[];h.reverse(),h.push(s.id),console.warn(h.map(m=>this._moduleIdProvider.getStrModuleId(m)).join(` =>
`)),o.unresolvedDependenciesCount--;continue}if(this._inverseDependencies2[s.id]=this._inverseDependencies2[s.id]||[],this._inverseDependencies2[s.id].push(o.id),s instanceof d){let h=this._modules2[s.pluginId];if(h&&h.isComplete()){this._loadPluginDependency(h.exports,s);continue}let m=this._inversePluginDependencies2.get(s.pluginId);m||(m=[],this._inversePluginDependencies2.set(s.pluginId,m)),m.push(s),this._loadModule(s.pluginId);continue}this._loadModule(s.id)}o.unresolvedDependenciesCount===0&&this._onModuleComplete(o)}_onModuleComplete(o){let a=this.getRecorder();if(o.isComplete())return;let v=o.dependencies,e=[];if(v)for(let m=0,f=v.length;m<f;m++){let y=v[m];if(y===A.EXPORTS){e[m]=o.exports;continue}if(y===A.MODULE){e[m]={id:o.strId,config:()=>this._config.getConfigForModule(o.strId)};continue}if(y===A.REQUIRE){e[m]=this._createRequire(o.moduleIdResolver);continue}let _=this._modules2[y.id];if(_){e[m]=_.exports;continue}e[m]=null}const s=m=>(this._inverseDependencies2[m]||[]).map(f=>this._moduleIdProvider.getStrModuleId(f));o.complete(a,this._config,e,s);let u=this._inverseDependencies2[o.id];if(this._inverseDependencies2[o.id]=null,u)for(let m=0,f=u.length;m<f;m++){let y=u[m],_=this._modules2[y];_.unresolvedDependenciesCount--,_.unresolvedDependenciesCount===0&&this._onModuleComplete(_)}let h=this._inversePluginDependencies2.get(o.id);if(h){this._inversePluginDependencies2.delete(o.id);for(let m=0,f=h.length;m<f;m++)this._loadPluginDependency(o.exports,h[m])}}}O.ModuleManager=g})(ue||(ue={}));var Y,ue;(function(O){const n=new O.Environment;let r=null;const x=function(p,o,a){typeof p!="string"&&(a=o,o=p,p=null),(typeof o!="object"||!Array.isArray(o))&&(a=o,o=null),o||(o=["require","exports","module"]),p?r.defineModule(p,o,a,null,null):r.enqueueDefineAnonymousModule(o,a)};x.amd={jQuery:!0};const A=function(p,o=!1){r.configure(p,o)},d=function(){if(arguments.length===1){if(arguments[0]instanceof Object&&!Array.isArray(arguments[0])){A(arguments[0]);return}if(typeof arguments[0]=="string")return r.synchronousRequire(arguments[0])}if((arguments.length===2||arguments.length===3)&&Array.isArray(arguments[0])){r.defineModule(O.Utilities.generateAnonymousModule(),arguments[0],arguments[1],arguments[2],null);return}throw new Error("Unrecognized require call")};d.config=A,d.getConfig=function(){return r.getConfig().getOptionsLiteral()},d.reset=function(){r=r.reset()},d.getBuildInfo=function(){return r.getBuildInfo()},d.getStats=function(){return r.getLoaderEvents()},d.define=x;function g(){if(typeof O.global.require<"u"||typeof require<"u"){const p=O.global.require||require;if(typeof p=="function"&&typeof p.resolve=="function"){const o=O.ensureRecordedNodeRequire(r.getRecorder(),p);O.global.nodeRequire=o,d.nodeRequire=o,d.__$__nodeRequire=o}}n.isNode&&!n.isElectronRenderer&&!n.isElectronNodeIntegrationWebWorker?module.exports=d:(n.isElectronRenderer||(O.global.define=x),O.global.require=d)}O.init=g,(typeof O.global.define!="function"||!O.global.define.amd)&&(r=new O.ModuleManager(n,O.createScriptLoader(n),x,d,O.Utilities.getHighPerformanceTimestamp()),typeof O.global.require<"u"&&typeof O.global.require!="function"&&d.config(O.global.require),Y=function(){return x.apply(null,arguments)},Y.amd=x.amd,typeof doNotInitLoader>"u"&&g())})(ue||(ue={})),Y(X[19],Z([0,1]),function(O,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.localize=v,n.localize2=e,n.getConfiguredDefaultLocale=s,n.setPseudoTranslation=u,n.create=h,n.load=m;let r=typeof document<"u"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;const x="i-default";function A(f,y){let _;return y.length===0?_=f:_=f.replace(/\{(\d+)\}/g,(N,R)=>{const w=R[0],i=y[w];let l=N;return typeof i=="string"?l=i:(typeof i=="number"||typeof i=="boolean"||i===void 0||i===null)&&(l=String(i)),l}),r&&(_="\uFF3B"+_.replace(/[aouei]/g,"$&$&")+"\uFF3D"),_}function d(f,y){let _=f[y];return _||(_=f["*"],_)?_:null}function g(f){return f.charAt(f.length-1)==="/"?f:f+"/"}async function p(f,y,_){const N=g(f)+g(y)+"vscode/"+g(_),R=await fetch(N);if(R.ok)return await R.json();throw new Error(`${R.status} - ${R.statusText}`)}function o(f){return function(y,_){const N=Array.prototype.slice.call(arguments,2);return A(f[y],N)}}function a(f){return(y,_,...N)=>({value:A(f[y],N),original:A(_,N)})}function v(f,y,..._){return A(y,_)}function e(f,y,..._){const N=A(y,_);return{value:N,original:N}}function s(f){}function u(f){r=f}function h(f,y){var _;return{localize:o(y[f]),localize2:a(y[f]),getConfiguredDefaultLocale:(_=y.getConfiguredDefaultLocale)!==null&&_!==void 0?_:N=>{}}}function m(f,y,_,N){var R;const w=(R=N["vs/nls"])!==null&&R!==void 0?R:{};if(!f||f.length===0)return _({localize:v,localize2:e,getConfiguredDefaultLocale:()=>{var b;return(b=w.availableLanguages)===null||b===void 0?void 0:b["*"]}});const i=w.availableLanguages?d(w.availableLanguages,f):null,l=i===null||i===x;let c=".nls";l||(c=c+"."+i);const L=b=>{Array.isArray(b)?(b.localize=o(b),b.localize2=a(b)):(b.localize=o(b[f]),b.localize2=a(b[f])),b.getConfiguredDefaultLocale=()=>{var C;return(C=w.availableLanguages)===null||C===void 0?void 0:C["*"]},_(b)};typeof w.loadBundle=="function"?w.loadBundle(f,i,(b,C)=>{b?y([f+".nls"],L):L(C)}):w.translationServiceUrl&&!l?(async()=>{var b;try{const C=await p(w.translationServiceUrl,i,f);return L(C)}catch(C){if(!i.includes("-"))return console.error(C),y([f+".nls"],L);try{const E=i.split("-")[0],S=await p(w.translationServiceUrl,E,f);return(b=w.availableLanguages)!==null&&b!==void 0||(w.availableLanguages={}),w.availableLanguages["*"]=E,L(S)}catch(E){return console.error(E),y([f+".nls"],L)}}})():y([f+c],L,b=>{if(c===".nls"){console.error("Failed trying to load default language strings",b);return}console.error(`Failed to load message bundle for language ${i}. Falling back to the default language:`,b),y([f+".nls"],L)})}}),function(){const O=globalThis.MonacoEnvironment,n=O&&O.baseUrl?O.baseUrl:"../../../";function r(v,e){var s;if(O?.createTrustedTypesPolicy)try{return O.createTrustedTypesPolicy(v,e)}catch(u){console.warn(u);return}try{return(s=self.trustedTypes)===null||s===void 0?void 0:s.createPolicy(v,e)}catch(u){console.warn(u);return}}const x=r("amdLoader",{createScriptURL:v=>v,createScript:(v,...e)=>{const s=e.slice(0,-1).join(","),u=e.pop().toString();return`(function anonymous(${s}) { ${u}
})`}});function A(){try{return(x?globalThis.eval(x.createScript("","true")):new Function("true")).call(globalThis),!0}catch{return!1}}function d(){return new Promise((v,e)=>{if(typeof globalThis.define=="function"&&globalThis.define.amd)return v();const s=n+"vs/loader.js";if(!(/^((http:)|(https:)|(file:))/.test(s)&&s.substring(0,globalThis.origin.length)!==globalThis.origin)&&A()){fetch(s).then(h=>{if(h.status!==200)throw new Error(h.statusText);return h.text()}).then(h=>{h=`${h}
//# sourceURL=${s}`,(x?globalThis.eval(x.createScript("",h)):new Function(h)).call(globalThis),v()}).then(void 0,e);return}x?importScripts(x.createScriptURL(s)):importScripts(s),v()})}function g(){require.config({baseUrl:n,catchError:!0,trustedTypesPolicy:x,amdModulesPattern:/^vs\//})}function p(v){d().then(()=>{g(),require([v],function(e){setTimeout(function(){const s=e.create((u,h)=>{globalThis.postMessage(u,h)},null);for(globalThis.onmessage=u=>s.onmessage(u.data,u.ports);a.length>0;){const u=a.shift();s.onmessage(u.data,u.ports)}},0)})})}typeof globalThis.define=="function"&&globalThis.define.amd&&g();let o=!0;const a=[];globalThis.onmessage=v=>{if(!o){a.push(v);return}o=!1,p(v.data)}}(),Y(X[7],Z([0,1]),function(O,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Permutation=n.CallbackIterable=n.ArrayQueue=n.booleanComparator=n.numberComparator=n.CompareResult=void 0,n.tail=r,n.tail2=x,n.equals=A,n.removeFastWithoutKeepingOrder=d,n.binarySearch=g,n.binarySearch2=p,n.quickSelect=o,n.groupBy=a,n.groupAdjacentBy=v,n.forEachAdjacent=e,n.forEachWithNeighbors=s,n.coalesce=u,n.coalesceInPlace=h,n.isFalsyOrEmpty=m,n.isNonEmptyArray=f,n.distinct=y,n.firstOrDefault=_,n.range=N,n.arrayInsert=R,n.pushToStart=w,n.pushToEnd=i,n.pushMany=l,n.asArray=c,n.insertInto=L,n.splice=b,n.compareBy=S,n.tieBreakComparators=M,n.reverseOrder=k;function r(F,I=0){return F[F.length-(1+I)]}function x(F){if(F.length===0)throw new Error("Invalid tail call");return[F.slice(0,F.length-1),F[F.length-1]]}function A(F,I,W=(V,z)=>V===z){if(F===I)return!0;if(!F||!I||F.length!==I.length)return!1;for(let V=0,z=F.length;V<z;V++)if(!W(F[V],I[V]))return!1;return!0}function d(F,I){const W=F.length-1;I<W&&(F[I]=F[W]),F.pop()}function g(F,I,W){return p(F.length,V=>W(F[V],I))}function p(F,I){let W=0,V=F-1;for(;W<=V;){const z=(W+V)/2|0,U=I(z);if(U<0)W=z+1;else if(U>0)V=z-1;else return z}return-(W+1)}function o(F,I,W){if(F=F|0,F>=I.length)throw new TypeError("invalid index");const V=I[Math.floor(I.length*Math.random())],z=[],U=[],se=[];for(const he of I){const de=W(he,V);de<0?z.push(he):de>0?U.push(he):se.push(he)}return F<z.length?o(F,z,W):F<z.length+se.length?se[0]:o(F-(z.length+se.length),U,W)}function a(F,I){const W=[];let V;for(const z of F.slice(0).sort(I))!V||I(V[0],z)!==0?(V=[z],W.push(V)):V.push(z);return W}function*v(F,I){let W,V;for(const z of F)V!==void 0&&I(V,z)?W.push(z):(W&&(yield W),W=[z]),V=z;W&&(yield W)}function e(F,I){for(let W=0;W<=F.length;W++)I(W===0?void 0:F[W-1],W===F.length?void 0:F[W])}function s(F,I){for(let W=0;W<F.length;W++)I(W===0?void 0:F[W-1],F[W],W+1===F.length?void 0:F[W+1])}function u(F){return F.filter(I=>!!I)}function h(F){let I=0;for(let W=0;W<F.length;W++)F[W]&&(F[I]=F[W],I+=1);F.length=I}function m(F){return!Array.isArray(F)||F.length===0}function f(F){return Array.isArray(F)&&F.length>0}function y(F,I=W=>W){const W=new Set;return F.filter(V=>{const z=I(V);return W.has(z)?!1:(W.add(z),!0)})}function _(F,I){return F.length>0?F[0]:I}function N(F,I){let W=typeof I=="number"?F:0;typeof I=="number"?W=F:(W=0,I=F);const V=[];if(W<=I)for(let z=W;z<I;z++)V.push(z);else for(let z=W;z>I;z--)V.push(z);return V}function R(F,I,W){const V=F.slice(0,I),z=F.slice(I);return V.concat(W,z)}function w(F,I){const W=F.indexOf(I);W>-1&&(F.splice(W,1),F.unshift(I))}function i(F,I){const W=F.indexOf(I);W>-1&&(F.splice(W,1),F.push(I))}function l(F,I){for(const W of I)F.push(W)}function c(F){return Array.isArray(F)?F:[F]}function L(F,I,W){const V=C(F,I),z=F.length,U=W.length;F.length=z+U;for(let se=z-1;se>=V;se--)F[se+U]=F[se];for(let se=0;se<U;se++)F[se+V]=W[se]}function b(F,I,W,V){const z=C(F,I);let U=F.splice(z,W);return U===void 0&&(U=[]),L(F,z,V),U}function C(F,I){return I<0?Math.max(I+F.length,0):Math.min(I,F.length)}var E;(function(F){function I(U){return U<0}F.isLessThan=I;function W(U){return U<=0}F.isLessThanOrEqual=W;function V(U){return U>0}F.isGreaterThan=V;function z(U){return U===0}F.isNeitherLessOrGreaterThan=z,F.greaterThan=1,F.lessThan=-1,F.neitherLessOrGreaterThan=0})(E||(n.CompareResult=E={}));function S(F,I){return(W,V)=>I(F(W),F(V))}function M(...F){return(I,W)=>{for(const V of F){const z=V(I,W);if(!E.isNeitherLessOrGreaterThan(z))return z}return E.neitherLessOrGreaterThan}}const D=(F,I)=>F-I;n.numberComparator=D;const T=(F,I)=>(0,n.numberComparator)(F?1:0,I?1:0);n.booleanComparator=T;function k(F){return(I,W)=>-F(I,W)}class q{constructor(I){this.items=I,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(I){let W=this.firstIdx;for(;W<this.items.length&&I(this.items[W]);)W++;const V=W===this.firstIdx?null:this.items.slice(this.firstIdx,W);return this.firstIdx=W,V}takeFromEndWhile(I){let W=this.lastIdx;for(;W>=0&&I(this.items[W]);)W--;const V=W===this.lastIdx?null:this.items.slice(W+1,this.lastIdx+1);return this.lastIdx=W,V}peek(){if(this.length!==0)return this.items[this.firstIdx]}dequeue(){const I=this.items[this.firstIdx];return this.firstIdx++,I}takeCount(I){const W=this.items.slice(this.firstIdx,this.firstIdx+I);return this.firstIdx+=I,W}}n.ArrayQueue=q;class H{constructor(I){this.iterate=I}toArray(){const I=[];return this.iterate(W=>(I.push(W),!0)),I}filter(I){return new H(W=>this.iterate(V=>I(V)?W(V):!0))}map(I){return new H(W=>this.iterate(V=>W(I(V))))}findLast(I){let W;return this.iterate(V=>(I(V)&&(W=V),!0)),W}findLastMaxBy(I){let W,V=!0;return this.iterate(z=>((V||E.isGreaterThan(I(z,W)))&&(V=!1,W=z),!0)),W}}n.CallbackIterable=H,H.empty=new H(F=>{});class Q{constructor(I){this._indexMap=I}static createSortPermutation(I,W){const V=Array.from(I.keys()).sort((z,U)=>W(I[z],I[U]));return new Q(V)}apply(I){return I.map((W,V)=>I[this._indexMap[V]])}inverse(){const I=this._indexMap.slice();for(let W=0;W<this._indexMap.length;W++)I[this._indexMap[W]]=W;return new Q(I)}}n.Permutation=Q}),Y(X[11],Z([0,1]),function(O,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MonotonousArray=void 0,n.findLast=r,n.findLastIdx=x,n.findLastMonotonous=A,n.findLastIdxMonotonous=d,n.findFirstMonotonous=g,n.findFirstIdxMonotonousOrArrLen=p,n.findFirstMaxBy=a,n.findLastMaxBy=v,n.findFirstMinBy=e,n.findMaxIdxBy=s,n.mapFindFirst=u;function r(h,m,f){const y=x(h,m);if(y!==-1)return h[y]}function x(h,m,f=h.length-1){for(let y=f;y>=0;y--){const _=h[y];if(m(_))return y}return-1}function A(h,m){const f=d(h,m);return f===-1?void 0:h[f]}function d(h,m,f=0,y=h.length){let _=f,N=y;for(;_<N;){const R=Math.floor((_+N)/2);m(h[R])?_=R+1:N=R}return _-1}function g(h,m){const f=p(h,m);return f===h.length?void 0:h[f]}function p(h,m,f=0,y=h.length){let _=f,N=y;for(;_<N;){const R=Math.floor((_+N)/2);m(h[R])?N=R:_=R+1}return _}class o{constructor(m){this._array=m,this._findLastMonotonousLastIdx=0}findLastMonotonous(m){if(o.assertInvariants){if(this._prevFindLastPredicate){for(const y of this._array)if(this._prevFindLastPredicate(y)&&!m(y))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=m}const f=d(this._array,m,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=f+1,f===-1?void 0:this._array[f]}}n.MonotonousArray=o,o.assertInvariants=!1;function a(h,m){if(h.length===0)return;let f=h[0];for(let y=1;y<h.length;y++){const _=h[y];m(_,f)>0&&(f=_)}return f}function v(h,m){if(h.length===0)return;let f=h[0];for(let y=1;y<h.length;y++){const _=h[y];m(_,f)>=0&&(f=_)}return f}function e(h,m){return a(h,(f,y)=>-m(f,y))}function s(h,m){if(h.length===0)return-1;let f=0;for(let y=1;y<h.length;y++){const _=h[y];m(_,h[f])>0&&(f=y)}return f}function u(h,m){for(const f of h){const y=m(f);if(y!==void 0)return y}}}),Y(X[34],Z([0,1]),function(O,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CachedFunction=n.LRUCachedFunction=void 0;class r{constructor(d,g=JSON.stringify){this.fn=d,this._computeKey=g,this.lastCache=void 0,this.lastArgKey=void 0}get(d){const g=this._computeKey(d);return this.lastArgKey!==g&&(this.lastArgKey=g,this.lastCache=this.fn(d)),this.lastCache}}n.LRUCachedFunction=r;class x{get cachedValues(){return this._map}constructor(d){this.fn=d,this._map=new Map}get(d){if(this._map.has(d))return this._map.get(d);const g=this.fn(d);return this._map.set(d,g),g}}n.CachedFunction=x}),Y(X[35],Z([0,1]),function(O,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Color=n.HSVA=n.HSLA=n.RGBA=void 0;function r(p,o){const a=Math.pow(10,o);return Math.round(p*a)/a}class x{constructor(o,a,v,e=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,o))|0,this.g=Math.min(255,Math.max(0,a))|0,this.b=Math.min(255,Math.max(0,v))|0,this.a=r(Math.max(Math.min(1,e),0),3)}static equals(o,a){return o.r===a.r&&o.g===a.g&&o.b===a.b&&o.a===a.a}}n.RGBA=x;class A{constructor(o,a,v,e){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,o),0)|0,this.s=r(Math.max(Math.min(1,a),0),3),this.l=r(Math.max(Math.min(1,v),0),3),this.a=r(Math.max(Math.min(1,e),0),3)}static equals(o,a){return o.h===a.h&&o.s===a.s&&o.l===a.l&&o.a===a.a}static fromRGBA(o){const a=o.r/255,v=o.g/255,e=o.b/255,s=o.a,u=Math.max(a,v,e),h=Math.min(a,v,e);let m=0,f=0;const y=(h+u)/2,_=u-h;if(_>0){switch(f=Math.min(y<=.5?_/(2*y):_/(2-2*y),1),u){case a:m=(v-e)/_+(v<e?6:0);break;case v:m=(e-a)/_+2;break;case e:m=(a-v)/_+4;break}m*=60,m=Math.round(m)}return new A(m,f,y,s)}static _hue2rgb(o,a,v){return v<0&&(v+=1),v>1&&(v-=1),v<1/6?o+(a-o)*6*v:v<1/2?a:v<2/3?o+(a-o)*(2/3-v)*6:o}static toRGBA(o){const a=o.h/360,{s:v,l:e,a:s}=o;let u,h,m;if(v===0)u=h=m=e;else{const f=e<.5?e*(1+v):e+v-e*v,y=2*e-f;u=A._hue2rgb(y,f,a+1/3),h=A._hue2rgb(y,f,a),m=A._hue2rgb(y,f,a-1/3)}return new x(Math.round(u*255),Math.round(h*255),Math.round(m*255),s)}}n.HSLA=A;class d{constructor(o,a,v,e){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,o),0)|0,this.s=r(Math.max(Math.min(1,a),0),3),this.v=r(Math.max(Math.min(1,v),0),3),this.a=r(Math.max(Math.min(1,e),0),3)}static equals(o,a){return o.h===a.h&&o.s===a.s&&o.v===a.v&&o.a===a.a}static fromRGBA(o){const a=o.r/255,v=o.g/255,e=o.b/255,s=Math.max(a,v,e),u=Math.min(a,v,e),h=s-u,m=s===0?0:h/s;let f;return h===0?f=0:s===a?f=((v-e)/h%6+6)%6:s===v?f=(e-a)/h+2:f=(a-v)/h+4,new d(Math.round(f*60),m,s,o.a)}static toRGBA(o){const{h:a,s:v,v:e,a:s}=o,u=e*v,h=u*(1-Math.abs(a/60%2-1)),m=e-u;let[f,y,_]=[0,0,0];return a<60?(f=u,y=h):a<120?(f=h,y=u):a<180?(y=u,_=h):a<240?(y=h,_=u):a<300?(f=h,_=u):a<=360&&(f=u,_=h),f=Math.round((f+m)*255),y=Math.round((y+m)*255),_=Math.round((_+m)*255),new x(f,y,_,s)}}n.HSVA=d;class g{static fromHex(o){return g.Format.CSS.parseHex(o)||g.red}static equals(o,a){return!o&&!a?!0:!o||!a?!1:o.equals(a)}get hsla(){return this._hsla?this._hsla:A.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:d.fromRGBA(this.rgba)}constructor(o){if(o)if(o instanceof x)this.rgba=o;else if(o instanceof A)this._hsla=o,this.rgba=A.toRGBA(o);else if(o instanceof d)this._hsva=o,this.rgba=d.toRGBA(o);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(o){return!!o&&x.equals(this.rgba,o.rgba)&&A.equals(this.hsla,o.hsla)&&d.equals(this.hsva,o.hsva)}getRelativeLuminance(){const o=g._relativeLuminanceForComponent(this.rgba.r),a=g._relativeLuminanceForComponent(this.rgba.g),v=g._relativeLuminanceForComponent(this.rgba.b),e=.2126*o+.7152*a+.0722*v;return r(e,4)}static _relativeLuminanceForComponent(o){const a=o/255;return a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(o){const a=this.getRelativeLuminance(),v=o.getRelativeLuminance();return a>v}isDarkerThan(o){const a=this.getRelativeLuminance(),v=o.getRelativeLuminance();return a<v}lighten(o){return new g(new A(this.hsla.h,this.hsla.s,this.hsla.l+this.hsla.l*o,this.hsla.a))}darken(o){return new g(new A(this.hsla.h,this.hsla.s,this.hsla.l-this.hsla.l*o,this.hsla.a))}transparent(o){const{r:a,g:v,b:e,a:s}=this.rgba;return new g(new x(a,v,e,s*o))}isTransparent(){return this.rgba.a===0}isOpaque(){return this.rgba.a===1}opposite(){return new g(new x(255-this.rgba.r,255-this.rgba.g,255-this.rgba.b,this.rgba.a))}makeOpaque(o){if(this.isOpaque()||o.rgba.a!==1)return this;const{r:a,g:v,b:e,a:s}=this.rgba;return new g(new x(o.rgba.r-s*(o.rgba.r-a),o.rgba.g-s*(o.rgba.g-v),o.rgba.b-s*(o.rgba.b-e),1))}toString(){return this._toString||(this._toString=g.Format.CSS.format(this)),this._toString}static getLighterColor(o,a,v){if(o.isLighterThan(a))return o;v=v||.5;const e=o.getRelativeLuminance(),s=a.getRelativeLuminance();return v=v*(s-e)/s,o.lighten(v)}static getDarkerColor(o,a,v){if(o.isDarkerThan(a))return o;v=v||.5;const e=o.getRelativeLuminance(),s=a.getRelativeLuminance();return v=v*(e-s)/e,o.darken(v)}}n.Color=g,g.white=new g(new x(255,255,255,1)),g.black=new g(new x(0,0,0,1)),g.red=new g(new x(255,0,0,1)),g.blue=new g(new x(0,0,255,1)),g.green=new g(new x(0,255,0,1)),g.cyan=new g(new x(0,255,255,1)),g.lightgrey=new g(new x(211,211,211,1)),g.transparent=new g(new x(0,0,0,0)),function(p){let o;(function(a){let v;(function(e){function s(i){return i.rgba.a===1?`rgb(${i.rgba.r}, ${i.rgba.g}, ${i.rgba.b})`:p.Format.CSS.formatRGBA(i)}e.formatRGB=s;function u(i){return`rgba(${i.rgba.r}, ${i.rgba.g}, ${i.rgba.b}, ${+i.rgba.a.toFixed(2)})`}e.formatRGBA=u;function h(i){return i.hsla.a===1?`hsl(${i.hsla.h}, ${(i.hsla.s*100).toFixed(2)}%, ${(i.hsla.l*100).toFixed(2)}%)`:p.Format.CSS.formatHSLA(i)}e.formatHSL=h;function m(i){return`hsla(${i.hsla.h}, ${(i.hsla.s*100).toFixed(2)}%, ${(i.hsla.l*100).toFixed(2)}%, ${i.hsla.a.toFixed(2)})`}e.formatHSLA=m;function f(i){const l=i.toString(16);return l.length!==2?"0"+l:l}function y(i){return`#${f(i.rgba.r)}${f(i.rgba.g)}${f(i.rgba.b)}`}e.formatHex=y;function _(i,l=!1){return l&&i.rgba.a===1?p.Format.CSS.formatHex(i):`#${f(i.rgba.r)}${f(i.rgba.g)}${f(i.rgba.b)}${f(Math.round(i.rgba.a*255))}`}e.formatHexA=_;function N(i){return i.i