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