UNPKG

oimp

Version:

A CLI tool for generating OI problem and packages

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