/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import{Qk as m,al as p}from"./YCOWKBW5.js";import{a as E}from"./ALDX5YZO.js";var C={};E(C,{JsxEmit:()=>c,ModuleKind:()=>u,ModuleResolutionKind:()=>_,NewLineKind:()=>l,ScriptTarget:()=>b,getJavaScriptWorker:()=>v,getTypeScriptWorker:()=>x,javascriptDefaults:()=>d,typescriptDefaults:()=>f,typescriptVersion:()=>L});var h="5.9.3";var u=(t=>(t[t.None=0]="None",t[t.CommonJS=1]="CommonJS",t[t.AMD=2]="AMD",t[t.UMD=3]="UMD",t[t.System=4]="System",t[t.ES2015=5]="ES2015",t[t.ESNext=99]="ESNext",t))(u||{}),c=(t=>(t[t.None=0]="None",t[t.Preserve=1]="Preserve",t[t.React=2]="React",t[t.ReactNative=3]="ReactNative",t[t.ReactJSX=4]="ReactJSX",t[t.ReactJSXDev=5]="ReactJSXDev",t))(c||{}),l=(t=>(t[t.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",t[t.LineFeed=1]="LineFeed",t))(l||{}),b=(t=>(t[t.ES3=0]="ES3",t[t.ES5=1]="ES5",t[t.ES2015=2]="ES2015",t[t.ES2016=3]="ES2016",t[t.ES2017=4]="ES2017",t[t.ES2018=5]="ES2018",t[t.ES2019=6]="ES2019",t[t.ES2020=7]="ES2020",t[t.ESNext=99]="ESNext",t[t.JSON=100]="JSON",t[t.Latest=99]="Latest",t))(b||{}),_=(t=>(t[t.Classic=1]="Classic",t[t.NodeJs=2]="NodeJs",t))(_||{}),n=class{constructor(i,r,e,o,s){this._onDidChange=new m,this._onDidExtraLibsChange=new m,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(i),this.setDiagnosticsOptions(r),this.setWorkerOptions(e),this.setInlayHintsOptions(o),this.setModeConfiguration(s),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get modeConfiguration(){return this._modeConfiguration}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(i,r){let e;if(typeof r>"u"?e=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:e=r,this._extraLibs[e]&&this._extraLibs[e].content===i)return{dispose:()=>{}};let o=1;return this._removedExtraLibs[e]&&(o=this._removedExtraLibs[e]+1),this._extraLibs[e]&&(o=this._extraLibs[e].version+1),this._extraLibs[e]={content:i,version:o},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let s=this._extraLibs[e];s&&s.version===o&&(delete this._extraLibs[e],this._removedExtraLibs[e]=o,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(i){for(let r in this._extraLibs)this._removedExtraLibs[r]=this._extraLibs[r].version;if(this._extraLibs=Object.create(null),i&&i.length>0)for(let r of i){let e=r.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,o=r.content,s=1;this._removedExtraLibs[e]&&(s=this._removedExtraLibs[e]+1),this._extraLibs[e]={content:o,version:s}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(i){this._compilerOptions=i||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(i){this._diagnosticsOptions=i||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(i){this._workerOptions=i||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(i){this._inlayHintsOptions=i||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(i){}setEagerModelSync(i){this._eagerModelSync=i}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(i){this._modeConfiguration=i||Object.create(null),this._onDidChange.fire(void 0)}},L=h,g={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,diagnostics:!0,documentRangeFormattingEdits:!0,signatureHelp:!0,onTypeFormattingEdits:!0,codeActions:!0,inlayHints:!0},f=new n({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},g),d=new n({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},g),x=()=>a().then(t=>t.getTypeScriptWorker()),v=()=>a().then(t=>t.getJavaScriptWorker());function a(){return import("./RCAKZ3SD.js")}p.onLanguage("typescript",()=>a().then(t=>t.setupTypeScript(f)));p.onLanguage("javascript",()=>a().then(t=>t.setupJavaScript(d)));export{f as a,C as b};
