72-75ed-4c49-a9aa-d56b70fc405f](2025-08-11 11:29:29) - Proceso de subida de imagen iniciado, data: {"source":"webhook","RefAL":"MAR-131172","MarcaId":"4597192000278610494","user":"vbenavides@arochilindner.com"} [c17f0272-75ed-4c49-a9aa-d56b70fc405f](2025-08-11 11:29:36) - Tokens generados: 1000.64290b765071a174c4cd899fa75b4916.2da5f34c7498ab56e9b856ced95d054f [c17f0272-75ed-4c49-a9aa-d56b70fc405f](2025-08-11 11:29:36) - Intento 0 el registro no contiene foto asociada [c17f0272-75ed-4c49-a9aa-d56b70fc405f](2025-08-11 11:29:36) - ERROR al obtener imagen, intento: 1 , respuesta: null [c17f0272-75ed-4c49-a9aa-d56b70fc405f](2025-08-11 11:29:39) - Intento 1 el registro no contiene foto asociada [c17f0272-75ed-4c49-a9aa-d56b70fc405f](2025-08-11 11:29:39) - ERROR al obtener imagen, intento: 2 , respuesta: null [c17f0272-75ed-4c49-a9aa-d56b70fc405f](2025-08-11 11:29:42) - Intento 2 el registro no contiene foto asociada [c17f0272-75ed-4c49-a9aa-d56b70fc405f](2025-08-11 11:29:42) - ERROR al obtener imagen, intento: 3 , respuesta: null [c17f0272-75ed-4c49-a9aa-d56b70fc405f](2025-08-11 11:29:44) - No se pudo encontrar una imagen asociada a registro de CRM \n [3c0ba10e-deff-4f2a-b4df-7911900fd3ef](2025-08-11 12:11:34) - Proceso de subida de imagen iniciado, data: {"source":"webhook","RefAL":"MAR-131173","MarcaId":"4597192000278613562","user":"vgomez@arochilindner.com"} [3c0ba10e-deff-4f2a-b4df-7911900fd3ef](2025-08-11 12:11:41) - Tokens generados: 1000.64290b765071a174c4cd899fa75b4916.2da5f34c7498ab56e9b856ced95d054f [3c0ba10e-deff-4f2a-b4df-7911900fd3ef](2025-08-11 12:11:42) - Intento 0 el registro no contiene foto asociada [3c0ba10e-deff-4f2a-b4df-7911900fd3ef](2025-08-11 12:11:42) - ERROR al obtener imagen, intento: 1 , respuesta: null [3c0ba10e-deff-4f2a-b4df-7911900fd3ef](2025-08-11 12:11:44) - Intento 1 el registro no contiene foto asociada [3c0ba10e-deff-4f2a-b4df-7911900fd3ef](2025-08-11 12:11:44) - ERROR al obtener imagen, intento: 2 , respuesta: null [3c0ba10e-deff-4f2a-b4df-7911900fd3ef](2025-08-11 12:11:47) - Intento 2 el registro no contiene foto asociada [3c0ba10e-deff-4f2a-b4df-7911900fd3ef](2025-08-11 12:11:47) - ERROR al obtener imagen, intento: 3 , respuesta: null [3c0ba10e-deff-4f2a-b4df-7911900fd3ef](2025-08-11 12:11:49) - No se pudo encontrar una imagen asociada a registro de CRM \n [67f556a1-d57f-41cd-8f7a-0dceaeaf2276](2025-08-11 12:13:41) - Proceso de subida de imagen iniciado, data: {"source":"webhook","RefAL":"MAR-131174","MarcaId":"4597192000278613631","user":"vgomez@arochilindner.com"} [67f556a1-d57f-41cd-8f7a-0dceaeaf2276](2025-08-11 12:13:48) - Tokens generados: 1000.64290b765071a174c4cd899fa75b4916.2da5f34c7498ab56e9b856ced95d054f [67f556a1-d57f-41cd-8f7a-0dceaeaf2276](2025-08-11 12:13:49) - Intento 0 el registro no contiene foto asociada [67f556a1-d57f-41cd-8f7a-0dceaeaf2276](2025-08-11 12:13:49) - ERROR al obtener imagen, intento: 1 , respuesta: null [67f556a1-d57f-41cd-8f7a-0dceaeaf2276](2025-08-11 12:13:51) - Intento 1 el registro no contiene foto asociada [67f556a1-d57f-41cd-8f7a-0dceaeaf2276](2025-08-11 12:13:51) - ERROR al obtener imagen, intento: 2 , respuesta: null [67f556a1-d57f-41cd-8f7a-0dceaeaf2276](2025-08-11 12:13:53) - Intento 2 el registro no contiene foto asociada [67f556a1-d57f-41cd-8f7a-0dceaeaf2276](2025-08-11 12:13:53) - ERROR al obtener imagen, intento: 3 , respuesta: null [67f556a1-d57f-41cd-8f7a-0dceaeaf2276](2025-08-11 12:13:55) - No se pudo encontrar una imagen asociada a registro de CRM \n [f3033d54-7e6f-41d2-ae3d-4c857b400115](2025-08-11 12:17:09) - Proceso de subida de imagen iniciado, data: {"source":"webhook","RefAL":"MAR-131175","MarcaId":"4597192000278671941","user":"rmendoza@arochilindner.com"} [f3033d54-7e6f-41d2-ae3d-4c857b400115](2025-08-11 12:17:16) - Tokens generados: 1000.64290b765071a174c4cd899fa75b4916.2da5f34c7498ab56e9b856ced95d054f [f3033d54-7e6f-41d2-ae3d-4c857b400115](2025-08-11 12:17:16) - Intento 0 el registro no contiene foto asociada [f3033d54-7e6f-41d2-ae3d-4c857b400115](2025-08-11 12:17:16) - ERROR al obtener imagen, intento: 1 , respuesta: null [f303return;let t;return i=>(t||(t=(e()||Promise.resolve([])).then(s=>s?C9(s):{})),t.then(s=>!!s[i]))}function tA(e){if(!e)return;let t;return i=>{if(!t){const s=e();t=s?C9(s):{}}return!!t[i]}}function C9(e){const t={};for(const i of e)t[i]=!0;return t}function I9(e){return e.flatMap(t=>t.patterns.map(i=>t.baseUri?{baseUri:t.baseUri,pattern:i}:i))}var iA={matchLines:100,charsPerLine:1e4},uB=!1,hB=class{constructor(e,t,i){this.id=e,this.dependencies=t,this.callback=i}},Fa;(function(e){e[e.Uninitialized=1]="Uninitialized",e[e.InitializedInternal=2]="InitializedInternal",e[e.InitializedExternal=3]="InitializedExternal"})(Fa||(Fa={}));var dB=class QN{static{this.INSTANCE=new QN}constructor(){this.a=typeof self=="object"&&self.constructor&&self.constructor.name==="DedicatedWorkerGlobalScope",this.b=typeof document=="object",this.c=[],this.d=Fa.Uninitialized}g(){if(this.d===Fa.Uninitialized){if(globalThis.define){this.d=Fa.InitializedExternal;return}}else return;this.d=Fa.InitializedInternal,globalThis.define=(t,i,s)=>{typeof t!="string"&&(s=i,i=t,t=null),(typeof i!="object"||!Array.isArray(i))&&(s=i,i=null),this.c.push(new hB(t,i,s))},globalThis.define.amd=!0,this.b?this.f=globalThis._VSCODE_WEB_PACKAGE_TTP??window.trustedTypes?.createPolicy("amdLoader",{createScriptURL(t){if(t.startsWith(window.location.origin)||t.startsWith(`${V.vscodeFileResource}://${Ek}`))return t;throw new Error(`[trusted_script_src] Invalid script url: ${t}`)}}):this.a&&(this.f=globalThis._VSCODE_WEB_PACKAGE_TTP??globalThis.trustedTypes?.createPolicy("amdLoader",{createScriptURL(t){return t}}))}async load(t){if(this.g(),this.d===Fa.InitializedExternal)return new Promise(o=>{const a=At();globalThis.define(a,[t],function(c){o(c)})});const i=await(this.a?this.i(t):this.b?this.h(t):this.j(t));if(!i){console.warn(`Did not receive a define call from script ${t}`);return}const s={},r=[],n=[];if(Array.isArray(i.dependencies))for(const o of i.dependencies)o==="exports"?r.push(s):n.push(o);if(n.length>0)throw new Error(`Cannot resolve dependencies for script ${t}. The dependencies are: ${n.join(", ")}`);return typeof i.callback=="function"?i.callback(...r)??s:i.callback}h(t){return new Promise((i,s)=>{const r=document.createElement("script");r.setAttribute("async","async"),r.setAttribute("type","text/javascript");const n=()=>{r.removeEventListener("load",o),r.removeEventListener("error",a)},o=c=>{n(),i(this.c.pop())},a=c=>{n(),s(c)};r.addEventListener("load",o),r.addEventListener("error",a),this.f&&(t=this.f.createScriptURL(t)),r.setAttribute("src",t),window.document.getElementsByTagName("head")[0].appendChild(r)})}async i(t){return this.f&&(t=this.f.createScriptURL(t)),await import(t),this.c.pop()}async j(t){try{const i=(await import("fs")).default,s=(await import("vm")).default,r=(await import("module")).default,n=y.parse(t).fsPath,o=i.readFileSync(n).toString(),a=r.wrap(o.replace(/^#!.*/,""));return new s.Script(a).runInThisContext().apply(),this.c.pop()}catch(i){throw i}}},sA=new Map;async function rA(e,t,i){i===void 0&&(i=!!(globalThis._VSCODE_PRODUCT_JSON??globalThis.vscode?.context?.configuration()?.product)?.commit);const s=t?`${e}/${t}`:e;if(sA.has(s))return sA.get(s);let r;if(/^\w[\w\d+.-]*:\/\//.test(s))r=s;else{const c=`${uB&&i&&!jo?kO:xO}/${s}`;r=vf.asBrowserUri(c).toString(!0)}const n=dB.INSTANCE.load(r);return sA.set(s,n),n}var pm="utf8",nA="utf8bom",gm="utf16be",mm="utf16le",vm=[254,255],oA=[255,254],Vh=[239,187,191],fB=512,pB=512,gB=512*8,mB=512*128,$9;(function(e){e[e.STREAM_IS_BINARY=1]="STREAM_IS_BINARY"})($9||($9={}));var vB=class extends Error{constructor(e,t){super(e),this.decodeStreamErrorKind=t}},wB=class XN{static async create(t){let i;if(t!==pm)i=(await rA("@vscode/iconv-lite-umd","lib/iconv-lite-umd.js")).getDecoder(D9(t));else{const s=new TextDecoder;i={write(r){return s.decode(r,{stream:!0})},end(){return s.decode()}}}return new XN(i)}constructor(t){this.a=t}write(t){return this.a.write(t)}end(){return this.a.end()}};function bB(e,t){const i=t.minBytesRequiredForDetection??(t.guessEncoding?gB:pB);return new Promise((s,r)=>{const n=yf(h=>h.join("")),o=[];let a=0,c;const l=new Ke,u=async()=>{try{const h=await DB({buffer:_.concat(o),bytesRead:a},t.guessEncoding,t.candidateGuessEncodings);if(h.seemsBinary&&t.acceptTextOnly)throw new vB("Stream is binary but only text is accepted for decoding",1);h.encoding=await t.overwriteEncoding(h.encoding),c=await wB.create(h.encoding);const f=c.write(_.concat(o).buffer);n.write(f),o.length=0,a=0,s({stream:n,detected:h})}catch(h){l.cancel(),n.destroy(),r(h)}};n0(e,{onData:async h=>{c?n.write(c.write(h.buffer)):(o.push(h),a+=h.byteLength,a>=i&&(e.pause(),await u(),setTimeout(()=>e.resume())))},onError:h=>n.error(h),onEnd:async()=>{c||await u(),n.end(c?.end())}},l.token)})}async function yB(e,t,i){const r=(await rA("@vscode/iconv-lite-umd","lib/iconv-lite-umd.js")).getEncoder(D9(t),i);let n=!1,o=!1;return{read(){if(o)return null;const a=e.read();if(typeof a!="string"){if(o=!0,!n&&i?.addBOM)switch(t){case pm:case nA:return _.wrap(Uint8Array.from(Vh));case gm:return _.wrap(Uint8Array.from(vm));case mm:return _.wrap(Uint8Array.from(oA))}const c=r.end();return c&&c.length>0?(n=!0,_.wrap(c)):null}return n=!0,_.wrap(r.write(a))}}}function D9(e){return e===nA||e===null?pm:e}function AB(e,t){if(!e||tCB(a))),t.length===0&&(t=void 0));let n;try{n=i.detect(r,t?{detectEncodings:t}:void 0)}catch{return null}if(!n?.encoding)return null;const o=n.encoding.toLowerCase();return 0<=SB.indexOf(o)?null:kB(n.encoding)}var xB={ibm866:"cp866",big5:"cp950"};function P9(e){return e.replace(/[^a-zA-Z0-9]/g,"").toLowerCase()}function kB(e){const t=P9(e);return xB[t]||t}function CB(e){const t=P9(e),i=PB[t];return i?i.guessableName:void 0}function IB(e){let t="";for(let i=0;i({seemsBinary:!1,encoding:o})):{seemsBinary:n,encoding:r}}var aA={utf8:{labelLong:"UTF-8",labelShort:"UTF-8",order:1,alias:"utf8bom",guessableName:"UTF-8"},utf8bom:{labelLong:"UTF-8 with BOM",labelShort:"UTF-8 with BOM",encodeOnly:!0,order:2,alias:"utf8"},utf16le:{labelLong:"UTF-16 LE",labelShort:"UTF-16 LE",order:3,guessableName:"UTF-16LE"},utf16be:{labelLong:"UTF-16 BE",labelShort:"UTF-16 BE",order:4,guessableName:"UTF-16BE"},windows1252:{labelLong:"Western (Windows 1252)",labelShort:"Windows 1252",order:5,guessableName:"windows-1252"},iso88591:{labelLong:"Western (ISO 8859-1)",labelShort:"ISO 8859-1",order:6},iso88593:{labelLong:"Western (ISO 8859-3)",labelShort:"ISO 8859-3",order:7},iso885915:{labelLong:"Western (ISO 8859-15)",labelShort:"ISO 8859-15",order:8},macroman:{labelLong:"Western (Mac Roman)",labelShort:"Mac Roman",order:9},cp437:{labelLong:"DOS (CP 437)",labelShort:"CP437",order:10},windows1256:{labelLong:"Arabic (Windows 1256)",labelShort:"Windows 1256",order:11},iso88596:{labelLong:"Arabic (ISO 8859-6)",labelShort:"ISO 8859-6",order:12},windows1257:{labelLong:"Baltic (Windows 1257)",labelShort:"Windows 1257",order:13},iso88594:{labelLong:"Baltic (ISO 8859-4)",labelShort:"ISO 8859-4",order:14},iso885914:{labelLong:"Celtic (ISO 8859-14)",labelShort:"ISO 8859-14",order:15},windows1250:{labelLong:"Central European (Windows 1250)",labelShort:"Windows 1250",order:16,guessableName:"windows-1250"},iso88592:{labelLong:"Central European (ISO 8859-2)",labelShort:"ISO 8859-2",order:17,guessableName:"ISO-8859-2"},cp852:{labelLong:"Central European (CP 852)",labelShort:"CP 852",order:18},windows1251:{labelLong:"Cyrillic (Windows 1251)",labelShort:"Windows 1251",order:19,guessableName:"windows-1251"},cp866:{labelLong:"Cyrillic (CP 866)",labelShort:"CP 866",order:20,guessableName:"IBM866"},cp1125:{labelLong:"Cyrillic (CP 1125)",labelShort:"CP 1125",order:21,guessableName:"IBM1125"},iso88595:{labelLong:"Cyrillic (ISO 8859-5)",labelShort:"ISO 8859-5",order:22,guessableName:"ISO-8859-5"},koi8r:{labelLong:"Cyrillic (KOI8-R)",labelShort:"KOI8-R",order:23,guessableName:"KOI8-R"},koi8u:{labelLong:"Cyrillic (KOI8-U)",labelShort:"KOI8-U",order:24},iso885913:{labelLong:"Estonian (ISO 8859-13)",labelShort:"ISO 8859-13",order:25},windows1253:{labelLong:"Greek (Windows 1253)",labelShort:"Windows 1253",order:26,guessableName:"windows-1253"},iso88597:{labelLong:"Greek (ISO 8859-7)",labelShort:"ISO 8859-7",order:27,guessableName:"ISO-8859-7"},windows1255:{labelLong:"Hebrew (Windows 1255)",labelShort:"Windows 1255",order:28,guessableName:"windows-1255"},iso88598:{labelLong:"Hebrew (ISO 8859-8)",labelShort:"ISO 8859-8",order:29,guessableName:"ISO-8859-8"},iso885910:{labelLong:"Nordic (ISO 8859-10)",labelShort:"ISO 8859-10",order:30},iso885916:{labelLong:"Romanian (ISO 8859-16)",labelShort:"ISO 8859-16",order:31},windows1254:{labelLong:"Turkish (Windows 1254)",labelShort:"Windows 1254",order:32},iso88599:{labelLong:"Turkish (ISO 8859-9)",labelShort:"ISO 8859-9",order:33},windows1258:{labelLong:"Vietnamese (Windows 1258)",labelShort:"Windows 1258",order:34},gbk:{labelLong:"Simplified Chinese (GBK)",labelShort:"GBK",order:35},gb18030:{labelLong:"Simplified Chinese (GB18030)",labelShort:"GB18030",order:36},cp950:{labelLong:"Traditional Chinese (Big5)",labelShort:"Big5",order:37,guessableName:"Big5"},big5hkscs:{labelLong:"Traditional Chinese (Big5-HKSCS)",labelShort:"Big5-HKSCS",order:38},shiftjis:{labelLong:"Japanese (Shift JIS)",labelShort:"Shift JIS",order:39,guessableName:"SHIFT_JIS"},eucjp:{labelLong:"Japanese (EUC-JP)",labelShort:"EUC-JP",order:40,guessableName:"EUC-JP"},euckr:{labelLong:"Korean (EUC-KR)",labelShort:"EUC-KR",order:41,guessableName:"EUC-KR"},windows874:{labelLong:"Thai (Windows 874)",labelShort:"Windows 874",order:42},iso885911:{labelLong:"Latin/Thai (ISO 8859-11)",labelShort:"ISO 8859-11",order:43},koi8ru:{labelLong:"Cyrillic (KOI8-RU)",labelShort:"KOI8-RU",order:44},koi8t:{labelLong:"Tajik (KOI8-T)",labelShort:"KOI8-T",order:45},gb2312:{labelLong:"Simplified Chinese (GB 2312)",labelShort:"GB 2312",order:46,guessableName:"GB2312"},cp865:{labelLong:"Nordic DOS (CP 865)",labelShort:"CP 865",order:47},cp850:{labelLong:"Western European DOS (CP 850)",labelShort:"CP 850",order:48}},PB=(()=>{const e={};for(const t in aA)aA[t].guessableName&&(e[t]=aA[t]);return e})(),Vre=W("textFileService"),T9;(function(e){e[e.FILE_IS_BINARY=0]="FILE_IS_BINARY"})(T9||(T9={}));var M9;(function(e){e[e.SAVED=0]="SAVED",e[e.DIRTY=1]="DIRTY",e[e.PENDING_SAVE=2]="PENDING_SAVE",e[e.CONFLICT=3]="CONFLICT",e[e.ORPHAN=4]="ORPHAN",e[e.ERROR=5]="ERROR"})(M9||(M9={}));var N9;(function(e){e[e.EDITOR=1]="EDITOR",e[e.REFERENCE=2]="REFERENCE",e[e.OTHER=3]="OTHER"})(N9||(N9={}));var L9;(function(e){e[e.Encode=0]="Encode",e[e.Decode=1]="Decode"})(L9||(L9={}));function TB(e){let t=!1;return{read(){return t?null:(t=!0,e)}}}function Gh(e,t,i){return new uc(s=>wm(s,i)).isEqual(e,t)}function MB(e,t,i){return Gh(e.uri,t.uri,i)?0:_o(e.uri.toString(),t.uri.toString())}function NB(e,t,i){return e.index!==t.index?e.indexi(o,a,s)),n=t.slice(0).sort((o,a)=>i(o,a,s));return ER(r,n,(o,a)=>i(o,a,s))}function wm(e,t){const i=t.getCapabilities(e.scheme);return!(i&&i&1024)}var cA=class XE extends JU{static toExtHostWorkspace(t,i,s,r){if(!t)return{workspace:null,added:[],removed:[]};const{id:n,name:o,folders:a,configuration:c,transient:l,isUntitled:u,isAgentSessionsWorkspace:h}=t,f=[],p=i;i?a.forEach((S,E)=>{const C=y.revive(S.uri),O=XE.q(s||i,C,r);O?(O.name=S.name,O.index=S.index,f.push(O)):f.push({uri:C,name:S.name,index:E})}):f.push(...a.map(({uri:S,name:E,index:C})=>({uri:y.revive(S),name:E,index:C}))),f.sort((S,E)=>S.indexwm(S,r)),{added:v,removed:b}=R9(p?p.workspaceFolders:[],g.workspaceFolders,MB,r);return{workspace:g,added:v,removed:b}}static q(t,i,s){for(let r=0;rnew _0(l)),r,n,c,a),this.u=i,this.v=o,this.s=[],this.t=Yn.forUris(c,()=>!0),s.forEach(l=>{this.s.push(l),this.t.set(l.uri,l)})}get name(){return this.u}get isUntitled(){return this.v}get workspaceFolders(){return this.s.slice(0)}getWorkspaceFolder(t,i){return i&&this.t.get(t)&&(t=dc(t)),this.t.findSubstr(t)}resolveWorkspaceFolder(t){return this.t.get(t)}},lA=class{constructor(t,i,s,r,n){this.c=new $,this.onDidChangeWorkspace=this.c.event,this.g=new $,this.onDidGrantWorkspaceTrust=this.g.event,this.h=new $,this.onDidChangeWorkspaceTrustedFolders=this.h.event,this.v=[],this.w=!1,this.x=new Map,this.C=0,this.D=new uu,this.F=new Map,this.j=r,this.t=s,this.u=n,this.k=new _U,this.l=new ms,this.q=t.getProxy(Q.MainThreadWorkspace),this.s=t.getProxy(Q.MainThreadMessageService);const o=i.workspace;this.n=o?new cA(o.id,o.name,[],!!o.transient,o.configuration?y.revive(o.configuration):null,!!o.isUntitled,!!o.isAgentSessionsWorkspace,a=>wm(a,s)):void 0}$initializeWorkspace(t,i){this.w=i,this.$acceptWorkspaceData(t),this.l.open()}waitForInitializeCall(){return this.l.wait()}get workspace(){return this.y}get name(){return this.y?this.y.name:void 0}get isAgentSessionsWorkspace(){return this.y?.isAgentSessionsWorkspace??!1}get workspaceFile(){if(this.y&&this.y.configuration)return this.y.isUntitled?y.from({scheme:V.untitled,path:ji(dc(this.y.configuration))}):this.y.configuration}get y(){return this.o||this.n}getWorkspaceFolders(){if(this.y)return this.y.workspaceFolders.slice(0)}async getWorkspaceFolders2(){if(await this.l.wait(),!!this.y)return this.y.workspaceFolders.slice(0)}updateWorkspaceFolders(t,i,s,...r){const n=[];if(Array.isArray(r)&&r.forEach(u=>{y.isUri(u.uri)&&!n.some(h=>Gh(h.uri,u.uri,this.t))&&n.push({uri:u.uri,name:u.name||t0(u.uri)})}),this.o||[i,s].some(u=>typeof u!="number"||u<0)||s===0&&n.length===0)return!1;const o=this.y?this.y.workspaceFolders:[];if(i+s>o.length)return!1;const a=o.slice(0);a.splice(i,s,...n.map(u=>({uri:u.uri,name:u.name||t0(u.uri),index:void 0})));for(let u=0;up!==u&&Gh(h.uri,f.uri,this.t)))return!1}a.forEach((u,h)=>u.index=h);const{added:c,removed:l}=R9(o,a,NB,this.t);if(c.length===0&&l.length===0)return!1;if(this.q){const u=t.displayName||t.name;this.q.$updateWorkspaceFolders(u,i,s,n).then(void 0,h=>{this.o=void 0;const f={source:{identifier:t.identifier,label:t.displayName||t.name}};this.s.$showMessage(qU.Error,d(3056,null,u,h.toString()),f,[])})}return this.z(a),!0}getWorkspaceFolder(t,i){if(this.y)return this.y.getWorkspaceFolder(t,i)}async getWorkspaceFolder2(t,i){if(await this.l.wait(),!!this.y)return this.y.getWorkspaceFolder(t,i)}async resolveWorkspaceFolder(t){if(await this.l.wait(),!!this.y)return this.y.resolveWorkspaceFolder(t)}getPath(){if(!this.y)return;const{folders:t}=this.y;if(t.length!==0)return t[0].uri.fsPath}getRelativePath(t,i){let s,r="";if(typeof t=="string"?(s=y.file(t),r=t):typeof t<"u"&&(s=t,r=t.fsPath),!s)return r;const n=this.getWorkspaceFolder(s,!0);if(!n)return r;typeof i>"u"&&this.y&&(i=this.y.folders.length>1);let o=Ck(n.uri,s);return i&&n.name&&(o=`${n.name}/${o}`),o}z(t){this.y&&(this.o=cA.toExtHostWorkspace({id:this.y.id,name:this.y.name,configuration:this.y.configuration,folders:t,isUntitled:this.y.isUntitled},this.y,void 0,this.t).workspace||void 0)}$acceptWorkspaceData(t){const{workspace:i,added:s,removed:r}=cA.toExtHostWorkspace(t,this.n,this.o,this.t);this.n=i||void 0,this.o=void 0,this.c.fire(Object.freeze({added:s,removed:r}))}findFiles(t,i,s,r,n=De.None){this.j.trace(`extHostWorkspace#findFiles: fileSearch, extension: ${r.value}, entryPoint: findFiles`);let o="",a=!0;return i===null?a=!1:i!==void 0&&(typeof i=="string"?o=i:o=i.pattern),this.A({type:"include",value:t},{exclude:[o],maxResults:s,useExcludeSettings:a?dn.FilesExclude:dn.None,useIgnoreFiles:{local:!1}},n)}findFiles2(t,i={},s,r=De.None){return this.j.trace(`extHostWorkspace#findFiles2New: fileSearch, extension: ${s.value}, entryPoint: findFiles2New`),this.A({type:"filePatterns",value:t},i,r)}async A(t,i,s){if(s.isCancellationRequested)return Promise.resolve([]);const r=t.type==="include"?[t.value]:t.value??[];if(!Array.isArray(r))throw console.error("Invalid file pattern provided",r),new Error(`Invalid file pattern provided ${JSON.stringify(r)}`);const n=r.map(o=>{const a=O9(i.exclude),c={ignoreSymlinks:typeof i.followSymlinks=="boolean"?!i.followSymlinks:void 0,disregardIgnoreFiles:typeof i.useIgnoreFiles?.local=="boolean"?!i.useIgnoreFiles.local:void 0,disregardGlobalIgnoreFiles:typeof i.useIgnoreFiles?.global=="boolean"?!i.useIgnoreFiles.global:void 0,disregardParentIgnoreFiles:typeof i.useIgnoreFiles?.parent=="boolean"?!i.useIgnoreFiles.parent:void 0,disregardExcludeSettings:i.useExcludeSettings!==void 0&&i.useExcludeSettings===dn.None,disregardSearchExcludeSettings:i.useExcludeSettings!==void 0&&i.useExcludeSettings!==dn.SearchAndFilesExclude,maxResults:i.maxResults,excludePattern:a.length>0?a:void 0,_reason:"startFileSearch",shouldGlobSearch:t.type==="include"?void 0:!0},l=bm(qi.from(o)),u=l?.folder;return t.type==="include"?c.includePattern=l?.pattern:c.filePattern=l?.pattern,{folder:u,options:c}});return this.B(n,s)}async B(t,i){const r=(await Promise.all(t?.map(a=>this.q.$startFileSearch(a.folder??null,a.options,i).then(c=>Array.isArray(c)?c.map(l=>y.revive(l)):[]))??[])).flat(),n=new uc(a=>wm(a,this.t)),o=new Map;for(const a of r){const c=n.getComparisonKey(a);o.has(c)||o.set(c,a)}return Array.from(o.values())}findTextInFiles2(t,i,s,r=De.None){this.j.trace(`extHostWorkspace#findTextInFiles2: textSearch, extension: ${s.value}, entryPoint: findTextInFiles2`);const n=f=>{if(!i)return{folder:void 0,options:{}};const p=f?bm(qi.from(f)):void 0,g=i.exclude?O9(i.exclude):void 0;return{options:{ignoreSymlinks:typeof i.followSymlinks=="boolean"?!i.followSymlinks:void 0,disregardIgnoreFiles:typeof i.useIgnoreFiles?.local=="boolean"?!i.useIgnoreFiles?.local:void 0,disregardGlobalIgnoreFiles:typeof i.useIgnoreFiles?.global=="boolean"?!i.useIgnoreFiles?.global:void 0,disregardParentIgnoreFiles:typeof i.useIgnoreFiles?.parent=="boolean"?!i.useIgnoreFiles?.parent:void 0,disregardExcludeSettings:i.useExcludeSettings!==void 0&&i.useExcludeSettings===dn.None,disregardSearchExcludeSettings:i.useExcludeSettings!==void 0&&i.useExcludeSettings!==dn.SearchAndFilesExclude,fileEncoding:i.encoding,maxResults:i.maxResults,previewOptions:i.previewOptions?{matchLines:i.previewOptions?.numMatchLines??100,charsPerLine:i.previewOptions?.charsPerLine??1e4}:void 0,surroundingContext:i.surroundingContext,includePattern:p?.pattern,excludePattern:g},folder:p?.folder}},a=(i?.include?.map(f=>n(f))??[n(void 0)]).filter(f=>!!f),c=new X,l=c.add(new $),u=this.findTextInFilesBase(t,a,(f,p)=>l.fire({result:f,uri:p}),r);return{results:new Hk(async f=>{c.add(l.event(p=>{const g=p.result,v=p.uri;Xy(g)?f.emitOne(new hn(v,g.rangeLocations.map(b=>({previewRange:new Ce(b.preview.startLineNumber,b.preview.startColumn,b.preview.endLineNumber,b.preview.endColumn),sourceRange:new Ce(b.source.startLineNumber,b.source.startColumn,b.source.endLineNumber,b.source.endColumn)})),g.previewText)):f.emitOne(new hm(v,g.text,g.lineNumber))})),await u}),complete:u.then(f=>(c.dispose(),{limitHit:f?.limitHit??!1}))}}async findTextInFilesBase(t,i,s,r=De.None){const n=this.k.getNext();let o=!1;if(r.onCancellationRequested(a=>{o=!0}),this.v[n]=a=>{if(o)return;const c=y.revive(a.resource);a.results.forEach(l=>{const u=ei(l);s(u,c)})},r.isCancellationRequested)return{};try{const a=await Promise.all(i?.map(c=>this.q.$startTextSearch(t,c.folder??null,c.options,n,r)||{})??[]);return delete this.v[n],a.reduce((c,l)=>({limitHit:c?.limitHit||(l?.limitHit??!1),message:[c?.message??[],l?.message??[]].flat()}),{})??{limitHit:!1}}catch(a){throw delete this.v[n],a}}async findTextInFiles(t,i,s,r,n=De.None){this.j.trace(`extHostWorkspace#findTextInFiles: textSearch, extension: ${r.value}, entryPoint: findTextInFiles`);const o=typeof i.previewOptions>"u"?{matchLines:100,charsPerLine:1e4}:i.previewOptions,a=bm(qi.from(i.include)),c=typeof i.exclude=="string"?i.exclude:i.exclude?i.exclude.pattern:void 0,l={ignoreSymlinks:typeof i.followSymlinks=="boolean"?!i.followSymlinks:void 0,disregardIgnoreFiles:typeof i.useIgnoreFiles=="boolean"?!i.useIgnoreFiles:void 0,disregardGlobalIgnoreFiles:typeof i.useGlobalIgnoreFiles=="boolean"?!i.useGlobalIgnoreFiles:void 0,disregardParentIgnoreFiles:typeof i.useParentIgnoreFiles=="boolean"?!i.useParentIgnoreFiles:void 0,disregardExcludeSettings:typeof i.useDefaultExcludes=="boolean"?!i.useDefaultExcludes:!0,disregardSearchExcludeSettings:typeof i.useSearchExclude=="boolean"?!i.useSearchExclude:!0,fileEncoding:i.encoding,maxResults:i.maxResults,previewOptions:o,surroundingContext:i.afterContext,includePattern:a?.pattern,excludePattern:c?[{pattern:c}]:void 0},u=(h,f)=>{Xy(h)?s({uri:f,preview:{text:h.previewText,matches:Kd(h.rangeLocations,p=>new Ce(p.preview.startLineNumber,p.preview.startColumn,p.preview.endLineNumber,p.preview.endColumn))},ranges:Kd(h.rangeLocations,p=>new Ce(p.source.startLineNumber,p.source.startColumn,p.source.endLineNumber,p.source.endColumn))}):s({uri:f,text:h.text,lineNumber:h.lineNumber})};return this.findTextInFilesBase(t,[{options:l,folder:a?.folder}],u,n)}$handleTextSearchResult(t,i){this.v[i]?.(t)}async save(t){const i=await this.q.$save(t,{saveAs:!1});return y.revive(i)}async saveAs(t){const i=await this.q.$save(t,{saveAs:!0});return y.revive(i)}saveAll(t){return this.q.$saveAll(t)}resolveProxy(t){return this.q.$resolveProxy(t)}lookupAuthorization(t){return this.q.$lookupAuthorization(t)}lookupKerberosAuthorization(t){return this.q.$lookupKerberosAuthorization(t)}loadCertificates(){return this.q.$loadCertificates()}get trusted(){return this.w}requestResourceTrust(t){return this.q.$requestResourceTrust(t)}requestWorkspaceTrust(t){return this.q.$requestWorkspaceTrust(t)}$onDidGrantWorkspaceTrust(){this.w||(this.w=!0,this.g.fire())}$onDidChangeWorkspaceTrustedFolders(){this.h.fire()}isResourceTrusted(t){return this.q.$isResourceTrusted(t)}registerEditSessionIdentityProvider(t,i){if(this.x.has(t))throw new Error(`A provider has already been registered for scheme ${t}`);this.x.set(t,i);const s=this.u.transformOutgoingScheme(t),r=this.C++;return this.q.$registerEditSessionIdentityProvider(r,s),se(()=>{this.x.delete(t),this.q.$unregisterEditSessionIdentityProvider(r)})}async $getEditSessionIdentifier(t,i){this.j.info("Getting edit session identifier for workspaceFolder",t);const s=await this.resolveWorkspaceFolder(y.revive(t));if(!s){this.j.warn("Unable to resolve workspace folder");return}this.j.info("Invoking #provideEditSessionIdentity for workspaceFolder",s);const r=this.x.get(s.uri.scheme);if(this.j.info(`Provider for scheme ${s.uri.scheme} is defined: `,!!r),!r)return;const n=await r.provideEditSessionIdentity(s,i);if(this.j.info("Provider returned edit session identifier: ",n),!!n)return n}async $provideEditSessionIdentityMatch(t,i,s,r){this.j.info("Getting edit session identifier for workspaceFolder",t);const n=await this.resolveWorkspaceFolder(y.revive(t));if(!n){this.j.warn("Unable to resolve workspace folder");return}this.j.info("Invoking #provideEditSessionIdentity for workspaceFolder",n);const o=this.x.get(n.uri.scheme);if(this.j.info(`Provider for scheme ${n.uri.scheme} is defined: `,!!o),!o)return;const a=await o.provideEditSessionIdentityMatch?.(i,s,r);if(this.j.info("Provider returned edit session identifier match result: ",a),!!a)return a}getOnWillCreateEditSessionIdentityEvent(t){return(i,s,r)=>{const n=function(a){i.call(s,a)};return n.extension=t,this.D.event(n,void 0,r)}}async $onWillCreateEditSessionIdentity(t,i,s){const r=await this.resolveWorkspaceFolder(y.revive(t));if(r===void 0)throw new Error("Unable to resolve workspace folder");await this.D.fireAsync({workspaceFolder:r},i,async(n,o)=>{const a=Date.now();await Promise.resolve(n),Date.now()-a>s&&this.j.warn("SLOW edit session create-participant",o.extension.identifier)}),i.isCancellationRequested}registerCanonicalUriProvider(t,i){if(this.F.has(t))throw new Error(`A provider has already been registered for scheme ${t}`);this.F.set(t,i);const s=this.u.transformOutgoingScheme(t),r=this.C++;return this.q.$registerCanonicalUriProvider(r,s),se(()=>{this.F.delete(t),this.q.$unregisterCanonicalUriProvider(r)})}async provideCanonicalUri(t,i,s){const r=this.F.get(t.scheme);if(!r)return;const n=await r.provideCanonicalUri?.(y.revive(t),i,s);if(n)return n}async $provideCanonicalUri(t,i,s){return this.provideCanonicalUri(y.revive(t),{targetScheme:i},s)}async decode(t,i){const[s,r]=this.G(i),n=await this.q.$resolveDecoding(s,r),o=(await bB(tF(_.wrap(t)),{...n,acceptTextOnly:!0,overwriteEncoding:a=>a===null||a===n.preferredEncoding?Promise.resolve(n.preferredEncoding):this.q.$validateDetectedEncoding(s,a,r)})).stream;return Wk(o,a=>a.join(""))}async encode(t,i){const[s,r]=this.G(i),{encoding:n,addBOM:o}=await this.q.$resolveEncoding(s,r);if(n===pm&&!o)return _.fromString(t).buffer;const a=await yB(TB(t),n,{addBOM:o});return eF(a).buffer}G(t){const i=pf(t?.uri)?t.uri:void 0,s=typeof t?.encoding=="string"?t.encoding:void 0;return[i,s?{encoding:s}:void 0]}};lA=__decorate([__param(0,Te),__param(1,Wt),__param(2,bc),__param(3,xe),__param(4,Cu)],lA);var Ts=W("IExtHostWorkspace");function bm(e){let t,i;if(e)return typeof e=="string"?t=e:(t=e.pattern,i=y.revive(e.baseUri)),{pattern:t,folder:i}}function O9(e){return(e?.map(t=>{if(typeof t=="string")return t===""?void 0:{pattern:t,uri:void 0};{const i=bm(t);return i?{pattern:i.pattern,uri:i.folder}:void 0}})??[]).filter(t=>!!t)}var F9;(function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"})(F9||(F9={}));var j9;(function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"})(j9||(j9={}));var U9;(function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"})(U9||(U9={}));var uA;(function(e){e.DEFAULT={allowTrailingComma:!0}})(uA||(uA={}));function LB(e,t=!1){let i=0;const s=e.length;let r="",n=0,o=16,a=0;function c(v){let b=0,S=0;for(;b=48&&E<=57)S=S*16+E-48;else if(E>=65&&E<=70)S=S*16+E-65+10;else if(E>=97&&E<=102)S=S*16+E-97+10;else break;i++,b++}return b=s){v+=e.substring(b,i),a=2;break}const S=e.charCodeAt(i);if(S===34){v+=e.substring(b,i),i++;break}if(S===92){if(v+=e.substring(b,i),i++,i>=s){a=2;break}switch(e.charCodeAt(i++)){case 34:v+='"';break;case 92:v+="\\";break;case 47:v+="/";break;case 98:v+="\b";break;case 102:v+="\f";break;case 110:v+=` `;break;case 114:v+="\r";break;case 116:v+=" ";break;case 117:{const C=c(4);C>=0?v+=String.fromCharCode(C):a=4;break}default:a=5}b=i;continue}if(S>=0&&S<=31)if(ym(S)){v+=e.substring(b,i),a=2;break}else a=6;i++}return v}function f(){if(r="",a=0,n=i,i>=s)return n=s,o=17;let v=e.charCodeAt(i);if(hA(v)){do i++,r+=String.fromCharCode(v),v=e.charCodeAt(i);while(hA(v));return o=15}if(ym(v))return i++,r+=String.fromCharCode(v),v===13&&e.charCodeAt(i)===10&&(i++,r+=` `),o=14;switch(v){case 123:return i++,o=1;case 125:return i++,o=2;case 91:return i++,o=3;case 93:return i++,o=4;case 58:return i++,o=6;case 44:return i++,o=5;case 34:return i++,r=h(),o=10;case 47:{const b=i-1;if(e.charCodeAt(i+1)===47){for(i+=2;i=12&&v<=15);return v}return{setPosition:l,getPosition:()=>i,scan:t?g:f,getToken:()=>o,getTokenValue:()=>r,getTokenOffset:()=>n,getTokenLength:()=>i-n,getTokenError:()=>a}}function hA(e){return e===32||e===9||e===11||e===12||e===160||e===5760||e>=8192&&e<=8203||e===8239||e===8287||e===12288||e===65279}function ym(e){return e===10||e===13||e===8232||e===8233}function Cl(e){return e>=48&&e<=57}var z9;(function(e){e[e.nullCharacter=0]="nullCharacter",e[e.maxAsciiCharacter=127]="maxAsciiCharacter",e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.lineSeparator=8232]="lineSeparator",e[e.paragraphSeparator=8233]="paragraphSeparator",e[e.nextLine=133]="nextLine",e[e.space=32]="space",e[e.nonBreakingSpace=160]="nonBreakingSpace",e[e.enQuad=8192]="enQuad",e[e.emQuad=8193]="emQuad",e[e.enSpace=8194]="enSpace",e[e.emSpace=8195]="emSpace",e[e.threePerEmSpace=8196]="threePerEmSpace",e[e.fourPerEmSpace=8197]="fourPerEmSpace",e[e.sixPerEmSpace=8198]="sixPerEmSpace",e[e.figureSpace=8199]="figureSpace",e[e.punctuationSpace=8200]="punctuationSpace",e[e.thinSpace=8201]="thinSpace",e[e.hairSpace=8202]="hairSpace",e[e.zeroWidthSpace=8203]="zeroWidthSpace",e[e.narrowNoBreakSpace=8239]="narrowNoBreakSpace",e[e.ideographicSpace=12288]="ideographicSpace",e[e.mathematicalSpace=8287]="mathematicalSpace",e[e.ogham=5760]="ogham",e[e._=95]="_",e[e.$=36]="$",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.ampersand=38]="ampersand",e[e.asterisk=42]="asterisk",e[e.at=64]="at",e[e.backslash=92]="backslash",e[e.bar=124]="bar",e[e.caret=94]="caret",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.closeParen=41]="closeParen",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.equals=61]="equals",e[e.exclamation=33]="exclamation",e[e.greaterThan=62]="greaterThan",e[e.lessThan=60]="lessThan",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.openParen=40]="openParen",e[e.percent=37]="percent",e[e.plus=43]="plus",e[e.question=63]="question",e[e.semicolon=59]="semicolon",e[e.singleQuote=39]="singleQuote",e[e.slash=47]="slash",e[e.tilde=126]="tilde",e[e.backspace=8]="backspace",e[e.formFeed=12]="formFeed",e[e.byteOrderMark=65279]="byteOrderMark",e[e.tab=9]="tab",e[e.verticalTab=11]="verticalTab"})(z9||(z9={}));function RB(e,t,i=uA.DEFAULT){const s=LB(e,!1);function r(H){return H?()=>H(s.getTokenOffset(),s.getTokenLength()):()=>!0}function n(H){return H?ie=>H(ie,s.getTokenOffset(),s.getTokenLength()):()=>!0}const o=r(t.onObjectBegin),a=n(t.onObjectProperty),c=r(t.onObjectEnd),l=r(t.onArrayBegin),u=r(t.onArrayEnd),h=n(t.onLiteralValue),f=n(t.onSeparator),p=r(t.onComment),g=n(t.onError),v=i&&i.disallowComments,b=i&&i.allowTrailingComma;function S(){for(;;){const H=s.scan();switch(s.getTokenError()){case 4:E(14);break;case 5:E(15);break;case 3:E(13);break;case 1:v||E(11);break;case 2:E(12);break;case 6:E(16);break}switch(H){case 12:case 13:v?E(10):p();break;case 16:E(1);break;case 15:case 14:break;default:return H}}}function E(H,ie=[],Ae=[]){if(g(H),ie.length+Ae.length>0){let re=s.getToken();for(;re!==17;){if(ie.indexOf(re)!==-1){S();break}else if(Ae.indexOf(re)!==-1)break;re=S()}}}function C(H){const ie=s.getTokenValue();return H?h(ie):a(ie),S(),!0}function O(){switch(s.getToken()){case 11:{let H=0;try{H=JSON.parse(s.getTokenValue()),typeof H!="number"&&(E(2),H=0)}catch{E(2)}h(H);break}case 7:h(null);break;case 8:h(!0);break;case 9:h(!1);break;default:return!1}return S(),!0}function F(){return s.getToken()!==10?(E(3,[],[2,5]),!1):(C(!1),s.getToken()===6?(f(":"),S(),B()||E(4,[],[2,5])):E(5,[],[2,5]),!0)}function G(){o(),S();let H=!1;for(;s.getToken()!==2&&s.getToken()!==17;){if(s.getToken()===5){if(H||E(4,[],[]),f(","),S(),s.getToken()===2&&b)break}else H&&E(6,[],[]);F()||E(4,[],[2,5]),H=!0}return c(),s.getToken()!==2?E(7,[2],[]):S(),!0}function j(){l(),S();let H=!1;for(;s.getToken()!==4&&s.getToken()!==17;){if(s.getToken()===5){if(H||E(4,[],[]),f(","),S(),s.getToken()===4&&b)break}else H&&E(6,[],[]);B()||E(4,[],[4,5]),H=!0}return u(),s.getToken()!==4?E(8,[4],[]):S(),!0}function B(){switch(s.getToken()){case 3:return j();case 1:return G();case 10:return C(!0);default:return O()}}return S(),s.getToken()===17?i.allowEmptyContent?!0:(E(4,[],[]),!1):B()?(s.getToken()!==17&&E(9,[],[]),!0):(E(4,[],[]),!1)}function Jh(e){return Object.isFrozen(e)?e:y0(e)}var Il=class Po{static createEmptyModel(t){return new Po({},[],[],void 0,t)}constructor(t,i,s,r,n){this.b=t,this.c=i,this.d=s,this.f=r,this.g=n,this.a=new Map}get rawConfiguration(){if(!this.h)if(this.f){const t=(Array.isArray(this.f)?this.f:[this.f]).map(i=>{if(i instanceof Po)return i;const s=new OB("",this.g);return s.parseRaw(i),s.configurationModel});this.h=t.reduce((i,s)=>s===i?s:i.merge(s),t[0])}else this.h=this;return this.h}get contents(){return this.b}get overrides(){return this.d}get keys(){return this.c}get raw(){if(this.f&&!(Array.isArray(this.f)&&this.f.every(t=>t instanceof Po)))return this.f}isEmpty(){return this.c.length===0&&Object.keys(this.b).length===0&&this.d.length===0}getValue(t){return t?pp(this.contents,t):this.contents}inspect(t,i){const s=this;return{get value(){return Jh(s.rawConfiguration.getValue(t))},get override(){return i?Jh(s.rawConfiguration.getOverrideValue(t,i)):void 0},get merged(){return Jh(i?s.rawConfiguration.override(i).getValue(t):s.rawConfiguration.getValue(t))},get overrides(){const r=[];for(const{contents:n,identifiers:o,keys:a}of s.rawConfiguration.overrides){const c=new Po(n,a,[],void 0,s.g).getValue(t);c!==void 0&&r.push({identifiers:o,value:c})}return r.length?Jh(r):void 0}}}getOverrideValue(t,i){const s=this.k(i);return s?t?pp(s,t):s:void 0}getKeysForOverrideIdentifier(t){const i=[];for(const s of this.overrides)s.identifiers.includes(t)&&i.push(...s.keys);return Lo(i)}getAllOverrideIdentifiers(){const t=[];for(const i of this.overrides)t.push(...i.identifiers);return Lo(t)}override(t){let i=this.a.get(t);return i||(i=this.i(t),this.a.set(t,i)),i}merge(...t){const i=ct(this.contents),s=ct(this.overrides),r=[...this.keys],n=this.f?Array.isArray(this.f)?[...this.f]:[this.f]:[this];for(const o of t)if(n.push(...o.f?Array.isArray(o.f)?o.f:[o.f]:[o]),!o.isEmpty()){this.j(i,o.contents);for(const a of o.overrides){const[c]=s.filter(l=>Ii(l.identifiers,a.identifiers));c?(this.j(c.contents,a.contents),c.keys.push(...a.keys),c.keys=Lo(c.keys)):s.push(ct(a))}for(const a of o.keys)r.indexOf(a)===-1&&r.push(a)}return new Po(i,r,s,!n.length||n.every(o=>o instanceof Po)?void 0:n,this.g)}i(t){const i=this.k(t);if(!i||typeof i!="object"||!Object.keys(i).length)return this;const s={};for(const r of Lo([...Object.keys(this.contents),...Object.keys(i)])){let n=this.contents[r];const o=i[r];o&&(typeof n=="object"&&typeof o=="object"?(n=ct(n),this.j(n,o)):n=o),s[r]=n}return new Po(s,this.keys,this.overrides,void 0,this.g)}j(t,i){for(const s of Object.keys(i)){if(s in t&&Ct(t[s])&&Ct(i[s])){this.j(t[s],i[s]);continue}t[s]=ct(i[s])}}k(t){let i=null,s=null;const r=n=>{n&&(s?this.j(s,n):s=ct(n))};for(const n of this.overrides)n.identifiers.length===1&&n.identifiers[0]===t?i=n.contents:n.identifiers.includes(t)&&r(n.contents);return r(i),s}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}addValue(t,i){this.l(t,i,!0)}setValue(t,i){this.l(t,i,!1)}removeValue(t){const i=this.keys.indexOf(t);i!==-1&&(this.keys.splice(i,1),JW(this.contents,t),Cr.test(t)&&this.overrides.splice(this.overrides.findIndex(s=>Ii(s.identifiers,Ju(t))),1))}l(t,i,s){if(tD(this.contents,t,i,r=>this.g.error(r)),s=s||this.keys.indexOf(t)===-1,s&&this.keys.push(t),Cr.test(t)){const r=this.contents[t],n=Ju(t),o={identifiers:n,keys:Object.keys(r),contents:jw(r,c=>this.g.error(c))},a=this.overrides.findIndex(c=>Ii(c.identifiers,n));a!==-1?this.overrides[a]=o:this.overrides.push(o)}}},OB=class{constructor(e,t){this.f=e,this.g=t,this.a=null,this.b=null,this.c=[],this.d=[]}get configurationModel(){return this.b||Il.createEmptyModel(this.g)}get restrictedConfigurations(){return this.c}get errors(){return this.d}parse(e,t){if(!qt(e)){const i=this.h(e);this.parseRaw(i,t)}}reparse(e){this.a&&this.parseRaw(this.a,e)}parseRaw(e,t){this.a=e;const{contents:i,keys:s,overrides:r,restricted:n,hasExcludedProperties:o}=this.i(e,t);this.b=new Il(i,s,r,o?[e]:void 0,this.g),this.c=n||[]}h(e){let t={},i=null,s=[];const r=[],n=[];function o(c){Array.isArray(s)?s.push(c):i!==null&&(s[i]=c)}const a={onObjectBegin:()=>{const c={};o(c),r.push(s),s=c,i=null},onObjectProperty:c=>{i=c},onObjectEnd:()=>{s=r.pop()},onArrayBegin:()=>{const c=[];o(c),r.push(s),s=c,i=null},onArrayEnd:()=>{s=r.pop()},onLiteralValue:o,onError:(c,l,u)=>{n.push({error:c,offset:l,length:u})}};if(e)try{RB(e,a),t=s[0]||{}}catch(c){this.g.error(`Error while parsing settings file ${this.f}: ${c}`),this.d=[c]}return t}i(e,t){const i=Qt.as(oo.Configuration),s=i.getConfigurationProperties(),r=i.getExcludedConfigurationProperties(),n=this.j(e,s,r,!0,t);e=n.raw;const o=jw(e,l=>this.g.error(`Conflict in settings file ${this.f}: ${l}`)),a=Object.keys(e),c=this.m(e,l=>this.g.error(`Conflict in settings file ${this.f}: ${l}`));return{contents:o,keys:a,overrides:c,restricted:n.restricted,hasExcludedProperties:n.hasExcludedProperties}}j(e,t,i,s,r){let n=!1;if(!r?.scopes&&!r?.skipRestricted&&!r?.skipUnregistered&&!r?.exclude?.length)return{raw:e,restricted:[],hasExcludedProperties:n};const o={},a=[];for(const c in e)if(Cr.test(c)&&s){const l=this.j(e[c],t,i,!1,r);o[c]=l.raw,n=n||l.hasExcludedProperties,a.push(...l.restricted)}else{const l=t[c];l?.restricted&&a.push(c),this.l(c,l,i,r)?o[c]=e[c]:n=!0}return{raw:o,restricted:a,hasExcludedProperties:n}}l(e,t,i,s){if(s.exclude?.includes(e))return!1;if(s.include?.includes(e))return!0;if(s.skipRestricted&&t?.restricted||s.skipUnregistered&&!t)return!1;const r=t??i[e],n=r?typeof r.scope<"u"?r.scope:4:void 0;return n===void 0||s.scopes===void 0?!0:s.scopes.includes(n)}m(e,t){const i=[];for(const s of Object.keys(e))if(Cr.test(s)){const r={},n=e[s];for(const o in n)r[o]=n[o];i.push({identifiers:Ju(s),keys:Object.keys(r),contents:jw(r,t)})}return i}},FB=class{constructor(e,t,i,s,r,n,o,a,c,l,u,h,f){this.a=e,this.b=t,this.c=i,this.overrideIdentifiers=s,this.d=r,this.f=n,this.g=o,this.h=a,this.i=c,this.j=l,this.k=u,this.l=h,this.m=f}get value(){return Jh(this.c)}n(e){return e?.value!==void 0||e?.override!==void 0||e?.overrides!==void 0?e:void 0}get q(){return this.p||(this.p=this.d.inspect(this.a,this.b.overrideIdentifier)),this.p}get defaultValue(){return this.q.merged}get default(){return this.n(this.q)}get s(){return this.r===void 0&&(this.r=this.f?this.f.inspect(this.a):null),this.r}get policyValue(){return this.s?.merged}get policy(){return this.s?.value!==void 0?{value:this.s.value}:void 0}get u(){return this.t===void 0&&(this.t=this.g?this.g.inspect(this.a):null),this.t}get applicationValue(){return this.u?.merged}get application(){return this.n(this.u)}get w(){return this.v||(this.v=this.h.inspect(this.a,this.b.overrideIdentifier)),this.v}get userValue(){return this.w.merged}get user(){return this.n(this.w)}get y(){return this.x||(this.x=this.i.inspect(this.a,this.b.overrideIdentifier)),this.x}get userLocalValue(){return this.y.merged}get userLocal(){return this.n(this.y)}get A(){return this.z||(this.z=this.j.inspect(this.a,this.b.overrideIdentifier)),this.z}get userRemoteValue(){return this.A.merged}get userRemote(){return this.n(this.A)}get D(){return this.B===void 0&&(this.B=this.k?this.k.inspect(this.a,this.b.overrideIdentifier):null),this.B}get workspaceValue(){return this.D?.merged}get workspace(){return this.n(this.D)}get F(){return this.E===void 0&&(this.E=this.l?this.l.inspect(this.a,this.b.overrideIdentifier):null),this.E}get workspaceFolderValue(){return this.F?.merged}get workspaceFolder(){return this.n(this.F)}get H(){return this.G===void 0&&(this.G=this.m.inspect(this.a,this.b.overrideIdentifier)),this.G}get memoryValue(){return this.H.merged}get memory(){return this.n(this.H)}},dA=class KN{constructor(t,i,s,r,n,o,a,c,l,u){this.j=t,this.l=i,this.m=s,this.n=r,this.p=n,this.q=o,this.r=a,this.s=c,this.t=l,this.u=u,this.h=null,this.i=new kt,this.v=null}getValue(t,i,s){return this.w(t,i,s).getValue(t)}updateValue(t,i,s={}){let r;s.resource?(r=this.t.get(s.resource),r||(r=Il.createEmptyModel(this.u),this.t.set(s.resource,r))):r=this.s,i===void 0?r.removeValue(t):r.setValue(t,i),s.resource||(this.h=null)}inspect(t,i,s){const r=this.w(t,i,s),n=this.A(i.resource,s),o=i.resource?this.t.get(i.resource)||this.s:this.s,a=new Set;for(const c of r.overrides)for(const l of c.identifiers)r.getOverrideValue(t,l)!==void 0&&a.add(l);return new FB(t,i,r.getValue(t),a.size?[...a]:void 0,this.j,this.l.isEmpty()?void 0:this.l,this.applicationConfiguration.isEmpty()?void 0:this.applicationConfiguration,this.userConfiguration,this.localUserConfiguration,this.remoteUserConfiguration,s?this.q:void 0,n||void 0,o)}keys(t){const i=this.A(void 0,t);return{default:this.j.keys.slice(0),policy:this.l.keys.slice(0),user:this.userConfiguration.keys.slice(0),workspace:this.q.keys.slice(0),workspaceFolder:i?i.keys.slice(0):[]}}updateDefaultConfiguration(t){this.j=t,this.h=null,this.i.clear()}updatePolicyConfiguration(t){this.l=t}updateApplicationConfiguration(t){this.m=t,this.h=null,this.i.clear()}updateLocalUserConfiguration(t){this.n=t,this.v=null,this.h=null,this.i.clear()}updateRemoteUserConfiguration(t){this.p=t,this.v=null,this.h=null,this.i.clear()}updateWorkspaceConfiguration(t){this.q=t,this.h=null,this.i.clear()}updateFolderConfiguration(t,i){this.r.set(t,i),this.i.delete(t)}deleteFolderConfiguration(t){this.folderConfigurations.delete(t),this.i.delete(t)}compareAndUpdateDefaultConfiguration(t,i){const s=[];if(!i){const{added:r,updated:n,removed:o}=So(this.j,t);i=[...r,...n,...o]}for(const r of i)for(const n of Ju(r)){const o=this.j.getKeysForOverrideIdentifier(n),a=t.getKeysForOverrideIdentifier(n),c=[...a.filter(l=>o.indexOf(l)===-1),...o.filter(l=>a.indexOf(l)===-1),...o.filter(l=>!Ai(this.j.override(n).getValue(l),t.override(n).getValue(l)))];s.push([n,c])}return this.updateDefaultConfiguration(t),{keys:i,overrides:s}}compareAndUpdatePolicyConfiguration(t){const{added:i,updated:s,removed:r}=So(this.l,t),n=[...i,...s,...r];return n.length&&this.updatePolicyConfiguration(t),{keys:n,overrides:[]}}compareAndUpdateApplicationConfiguration(t){const{added:i,updated:s,removed:r,overrides:n}=So(this.applicationConfiguration,t),o=[...i,...s,...r];return o.length&&this.updateApplicationConfiguration(t),{keys:o,overrides:n}}compareAndUpdateLocalUserConfiguration(t){const{added:i,updated:s,removed:r,overrides:n}=So(this.localUserConfiguration,t),o=[...i,...s,...r];return o.length&&this.updateLocalUserConfiguration(t),{keys:o,overrides:n}}compareAndUpdateRemoteUserConfiguration(t){const{added:i,updated:s,removed:r,overrides:n}=So(this.remoteUserConfiguration,t),o=[...i,...s,...r];return o.length&&this.updateRemoteUserConfiguration(t),{keys:o,overrides:n}}compareAndUpdateWorkspaceConfiguration(t){const{added:i,updated:s,removed:r,overrides:n}=So(this.workspaceConfiguration,t),o=[...i,...s,...r];return o.length&&this.updateWorkspaceConfiguration(t),{keys:o,overrides:n}}compareAndUpdateFolderConfiguration(t,i){const s=this.folderConfigurations.get(t),{added:r,updated:n,removed:o,overrides:a}=So(s,i),c=[...r,...n,...o];return(c.length||!s)&&this.updateFolderConfiguration(t,i),{keys:c,overrides:a}}compareAndDeleteFolderConfiguration(t){const i=this.folderConfigurations.get(t);if(!i)throw new Error("Unknown folder");this.deleteFolderConfiguration(t);const{added:s,updated:r,removed:n,overrides:o}=So(i,void 0);return{keys:[...s,...r,...n],overrides:o}}get defaults(){return this.j}get applicationConfiguration(){return this.m}get userConfiguration(){if(!this.v)if(this.p.isEmpty())this.v=this.n;else{const t=this.n.merge(this.p);this.v=new Il(t.contents,t.keys,t.overrides,void 0,this.u)}return this.v}get localUserConfiguration(){return this.n}get remoteUserConfiguration(){return this.p}get workspaceConfiguration(){return this.q}get folderConfigurations(){return this.r}w(t,i,s){let r=this.x(i,s);if(i.overrideIdentifier&&(r=r.override(i.overrideIdentifier)),!this.l.isEmpty()&&this.l.getValue(t)!==void 0){r=r.merge();for(const n of this.l.keys)r.setValue(n,this.l.getValue(n))}return r}x({resource:t},i){let s=this.y();if(i&&t){const r=i.getFolder(t);r&&(s=this.z(r.uri)||s);const n=this.t.get(t);n&&(s=s.merge(n))}return s}y(){return this.h||(this.h=this.j.merge(this.applicationConfiguration,this.userConfiguration,this.q,this.s)),this.h}z(t){let i=this.i.get(t);if(!i){const s=this.y(),r=this.r.get(t);r?(i=s.merge(r),this.i.set(t,i)):i=s}return i}A(t,i){if(i&&t){const s=i.getFolder(t);if(s)return this.r.get(s.uri)}}toData(){return{defaults:{contents:this.j.contents,overrides:this.j.overrides,keys:this.j.keys},policy:{contents:this.l.contents,overrides:this.l.overrides,keys:this.l.keys},application:{contents:this.applicationConfiguration.contents,overrides:this.applicationConfiguration.overrides,keys:this.applicationConfiguration.keys,raw:Array.isArray(this.applicationConfiguration.raw)?void 0:this.applicationConfiguration.raw},userLocal:{contents:this.localUserConfiguration.contents,overrides:this.localUserConfiguration.overrides,keys:this.localUserConfiguration.keys,raw:Array.isArray(this.localUserConfiguration.raw)?void 0:this.localUserConfiguration.raw},userRemote:{contents:this.remoteUserConfiguration.contents,overrides:this.remoteUserConfiguration.overrides,keys:this.remoteUserConfiguration.keys,raw:Array.isArray(this.remoteUserConfiguration.raw)?void 0:this.remoteUserConfiguration.raw},workspace:{contents:this.q.contents,overrides:this.q.overrides,keys:this.q.keys},folders:[...this.r.keys()].reduce((t,i)=>{const{contents:s,overrides:r,keys:n}=this.r.get(i);return t.push([i,{contents:s,overrides:r,keys:n}]),t},[])}}allKeys(){const t=new Set;return this.j.keys.forEach(i=>t.add(i)),this.userConfiguration.keys.forEach(i=>t.add(i)),this.q.keys.forEach(i=>t.add(i)),this.r.forEach(i=>i.keys.forEach(s=>t.add(s))),[...t.values()]}B(){const t=new Set;return this.j.getAllOverrideIdentifiers().forEach(i=>t.add(i)),this.userConfiguration.getAllOverrideIdentifiers().forEach(i=>t.add(i)),this.q.getAllOverrideIdentifiers().forEach(i=>t.add(i)),this.r.forEach(i=>i.getAllOverrideIdentifiers().forEach(s=>t.add(s))),[...t.values()]}D(t){const i=new Set;return this.j.getKeysForOverrideIdentifier(t).forEach(s=>i.add(s)),this.userConfiguration.getKeysForOverrideIdentifier(t).forEach(s=>i.add(s)),this.q.getKeysForOverrideIdentifier(t).forEach(s=>i.add(s)),this.r.forEach(s=>s.getKeysForOverrideIdentifier(t).forEach(r=>i.add(r))),[...i.values()]}static parse(t,i){const s=this.E(t.defaults,i),r=this.E(t.policy,i),n=this.E(t.application,i),o=this.E(t.userLocal,i),a=this.E(t.userRemote,i),c=this.E(t.workspace,i),l=t.folders.reduce((u,h)=>(u.set(y.revive(h[0]),this.E(h[1],i)),u),new kt);return new KN(s,r,n,o,a,c,l,Il.createEmptyModel(i),new kt,i)}static E(t,i){return new Il(t.contents,t.keys,t.overrides,t.raw,i)}},jB=class{constructor(e,t,i,s,r){this.change=e,this.f=t,this.g=i,this.h=s,this.i=r,this.a=` `,this.b=this.a.charCodeAt(0),this.c=46,this.affectedKeys=new Set,this.j=void 0;for(const n of e.keys)this.affectedKeys.add(n);for(const[,n]of e.overrides)for(const o of n)this.affectedKeys.add(o);this.d=this.a;for(const n of this.affectedKeys)this.d+=n+this.a}get previousConfiguration(){return!this.j&&this.f&&(this.j=dA.parse(this.f.data,this.i)),this.j}affectsConfiguration(e,t){const i=this.a+e,s=this.d.indexOf(i);if(s<0)return!1;const r=s+i.length;if(r>=this.d.length)return!1;const n=this.d.charCodeAt(r);if(n!==this.b&&n!==this.c)return!1;if(t){const o=this.previousConfiguration?this.previousConfiguration.getValue(e,t,this.f?.workspace):void 0,a=this.g.getValue(e,t,this.h);return!Ai(o,a)}return!0}};function So(e,t){const{added:i,removed:s,updated:r}=H9(t?.rawConfiguration,e?.rawConfiguration),n=[],o=e?.getAllOverrideIdentifiers()||[],a=t?.getAllOverrideIdentifiers()||[];if(t){const c=a.filter(l=>!o.includes(l));for(const l of c)n.push([l,t.getKeysForOverrideIdentifier(l)])}if(e){const c=o.filter(l=>!a.includes(l));for(const l of c)n.push([l,e.getKeysForOverrideIdentifier(l)])}if(t&&e){for(const c of o)if(a.includes(c)){const l=H9({contents:e.getOverrideValue(void 0,c)||{},keys:e.getKeysForOverrideIdentifier(c)},{contents:t.getOverrideValue(void 0,c)||{},keys:t.getKeysForOverrideIdentifier(c)});n.push([c,[...l.added,...l.removed,...l.updated]])}}return{added:i,removed:s,updated:r,overrides:n}}function H9(e,t){const i=e?t?e.keys.filter(n=>t.keys.indexOf(n)===-1):[...e.keys]:[],s=t?e?t.keys.filter(n=>e.keys.indexOf(n)===-1):[...t.keys]:[],r=[];if(e&&t){for(const n of t.keys)if(e.keys.indexOf(n)!==-1){const o=pp(t.contents,n),a=pp(e.contents,n);Ai(o,a)||r.push(n)}}return{added:i,removed:s,updated:r}}function Am(e,t){if(t){const i=t.split(".");let s=e;for(let r=0;s&&rthis.e)}$initializeConfiguration(t){this.e=new _B(this.a,this.c,t,this.b),this.d.open()}$acceptConfigurationChanged(t,i){this.getConfigProvider().then(s=>s.$acceptConfigurationChanged(t,i))}};fA=__decorate([__param(0,Te),__param(1,Ts),__param(2,xe)],fA);var _B=class{constructor(e,t,i,s){this.a=new $,this.b=e,this.f=s,this.c=t,this.e=dA.parse(i,s),this.d=this.k(i.configurationScopes)}get onDidChangeConfiguration(){return this.a&&this.a.event}$acceptConfigurationChanged(e,t){const i={data:this.e.toData(),workspace:this.c.workspace};this.e=dA.parse(e,this.f),this.d=this.k(e.configurationScopes),this.a.fire(this.j(t,i))}getConfiguration(e,t,i){const s=W9(t)||{},r=this.g(this.e.getValue(e,s,this.c.workspace));e&&this.h(e,s,i?.identifier);function n(a){if(a==null)return null;if(typeof a=="boolean")return a?2:5;switch(a){case Qc.Global:return 2;case Qc.Workspace:return 5;case Qc.WorkspaceFolder:return 6}}const o={has(a){return typeof Am(r,a)<"u"},get:(a,c)=>{this.h(e?`${e}.${a}`:a,s,i?.identifier);let l=Am(r,a);if(typeof l>"u")l=c;else{let u;const h=(f,p)=>{if(Ct(f)){let g;const v=()=>{u=u||ct(r),g=g||Am(u,p)};return new Proxy(f,{get:(b,S)=>{if(typeof S=="string"&&S.toLowerCase()==="tojson")return v(),()=>g;if(u)return g=g||Am(u,p),g[S];const E=b[S];return typeof S=="string"?h(E,`${p}.${S}`):E},set:(b,S,E)=>(v(),g&&(g[S]=E),!0),deleteProperty:(b,S)=>(v(),g&&delete g[S],!0),defineProperty:(b,S,E)=>(v(),g&&Object.defineProperty(g,S,E),!0)})}return Array.isArray(f)?ct(f):f};l=h(l,a)}return l},update:(a,c,l,u)=>{a=e?`${e}.${a}`:a;const h=n(l);return c!==void 0?this.b.$updateConfigurationOption(h,a,c,s,u):this.b.$removeConfigurationOption(h,a,s,u)},inspect:a=>{a=e?`${e}.${a}`:a;const c=this.e.inspect(a,s,this.c.workspace);if(c)return{key:a,defaultValue:ct(c.policy?.value??c.default?.value),globalLocalValue:ct(c.userLocal?.value),globalRemoteValue:ct(c.userRemote?.value),globalValue:ct(c.user?.value??c.application?.value),workspaceValue:ct(c.workspace?.value),workspaceFolderValue:ct(c.workspaceFolder?.value),defaultLanguageValue:ct(c.default?.override),globalLocalLanguageValue:ct(c.userLocal?.override),globalRemoteLanguageValue:ct(c.userRemote?.override),globalLanguageValue:ct(c.user?.override??c.application?.override),workspaceLanguageValue:ct(c.workspace?.override),workspaceFolderLanguageValue:ct(c.workspaceFolder?.override),languageIds:ct(c.overrideIdentifiers)}}};return typeof r=="object"&&Xr(o,r,!1),Object.freeze(o)}g(e){const t=i=>Ct(i)?new Proxy(i,{get:(s,r)=>t(s[r]),set:(s,r,n)=>{throw new Error(`TypeError: Cannot assign to read only property '${String(r)}' of object`)},deleteProperty:(s,r)=>{throw new Error(`TypeError: Cannot delete read only property '${String(r)}' of object`)},defineProperty:(s,r)=>{throw new Error(`TypeError: Cannot define property '${String(r)}' for a readonly object`)},setPrototypeOf:s=>{throw new Error("TypeError: Cannot set prototype for a readonly object")},isExtensible:()=>!1,preventExtensions:()=>!0}):i;return t(e)}h(e,t,i){const s=Cr.test(e)?5:this.d.get(e),r=i?`[${i.value}] `:"";if(s===5){typeof t?.resource>"u"&&this.f.warn(`${r}Accessing a resource scoped configuration without providing a resource is not expected. To get the effective value for '${e}', provide the URI of a resource or 'null' for any resource.`);return}if(s===4){t?.resource&&this.f.warn(`${r}Accessing a window scoped configuration for a resource is not expected. To associate '${e}' to a resource, define its scope to 'resource' in configuration contributions in 'package.json'.`);return}}j(e,t){const i=new jB(e,t,this.e,this.c.workspace,this.f);return Object.freeze({affectsConfiguration:(s,r)=>i.affectsConfiguration(s,W9(r))})}k(e){return e.reduce((t,i)=>(t.set(i[0],i[1]),t),new Map)}},bs=W("IExtHostConfiguration"),BB=class{constructor(e,t){this.versionId=e,this.removedDueToLooping=t}},Zh=class eL extends J{static isHostExtension(t,i,s){if(i.getExtensionDescription(t))return!1;const r=s.getExtensionDescription(t);return r?!!((r.main||r.browser)&&r.api==="none"):!1}constructor(t,i){super(),this.n=t,this.c=this.D(new $),this.onDidChange=this.c.event,this.f=0,this.g=i,this.q()}q(){this.g.sort(VB),this.h=new Gn,this.j=[],this.m=new Map;for(const t of this.g){if(this.h.has(t.identifier)){console.error("Extension `"+t.identifier.value+"` is already registered");continue}this.h.set(t.identifier,t),this.j.push(t);const i=this.n.readActivationEvents(t);for(const s of i)this.m.has(s)||this.m.set(s,[]),this.m.get(s).push(t)}}set(t){return this.g=t,this.q(),this.f++,this.c.fire(void 0),{versionId:this.f}}deltaExtensions(t,i){this.g=B9(this.g,i),this.g=this.g.concat(t);const s=eL.r(this.g);return this.g=B9(this.g,s.map(r=>r.identifier)),this.q(),this.f++,this.c.fire(void 0),new BB(this.f,s)}static r(t){const i=new class{constructor(){this.c=new Map,this.d=new Set,this.e=[]}addNode(a){this.d.has(a)||(this.d.add(a),this.e.push(a))}addArc(a,c){this.addNode(a),this.addNode(c),this.c.has(a)?this.c.get(a).push(c):this.c.set(a,[c])}getArcs(a){return this.c.has(a)?this.c.get(a):[]}hasOnlyGoodArcs(a,c){const l=i.getArcs(a);for(let u=0;ui.getArcs(a).length===0).forEach(a=>r.add(a));const n=i.getNodes().filter(a=>!r.has(a));let o;do{o=!1;for(let a=0;as.get(a))}containsActivationEvent(t){return this.m.has(t)}containsExtension(t){return this.h.has(t)}getExtensionDescriptionsForActivationEvent(t){const i=this.m.get(t);return i?i.slice(0):[]}getAllExtensionDescriptions(){return this.j.slice(0)}getSnapshot(){return new qB(this.f,this.getAllExtensionDescriptions())}getExtensionDescription(t){const i=this.h.get(t);return i||void 0}getExtensionDescriptionByUUID(t){for(const i of this.j)if(i.uuid===t)return i}getExtensionDescriptionByIdOrUUID(t,i){return this.getExtensionDescription(t)??(i?this.getExtensionDescriptionByUUID(i):void 0)}},qB=class{constructor(e,t){this.versionId=e,this.extensions=t}},_9;(function(e){e[e.Builtin=0]="Builtin",e[e.User=1]="User",e[e.Dev=2]="Dev"})(_9||(_9={}));function VB(e,t){const i=e.isBuiltin?0:e.isUnderDevelopment?2:1,s=t.isBuiltin?0:t.isUnderDevelopment?2:1;if(i!==s)return i-s;const r=_e.basename(e.extensionLocation.path),n=_e.basename(t.extensionLocation.path);return rn?1:0}function B9(e,t){const i=new Qo(t);return e.filter(s=>!i.has(s.identifier))}var Sm=class tL{static{this.NONE=new tL(!1,-1,-1,-1)}constructor(t,i,s,r){this.startup=t,this.codeLoadingTime=i,this.activateCallTime=s,this.activateResolvedTime=r}},pA=class{constructor(e){this.a=e,this.b=-1,this.c=-1,this.d=-1,this.f=-1,this.g=-1,this.h=-1}j(e,t){return e===-1||t===-1?-1:t-e}build(){return new Sm(this.a,this.j(this.b,this.c),this.j(this.d,this.f),this.j(this.g,this.h))}codeLoadingStart(){this.b=Date.now()}codeLoadingStop(){this.c=Date.now()}activateCallStart(){this.d=Date.now()}activateCallStop(){this.f=Date.now()}activateResolveStart(){this.g=Date.now()}activateResolveStop(){this.h=Date.now()}},Em=class{constructor(e,t,i,s,r,n){this.activationFailed=e,this.activationFailedError=t,this.activationTimes=i,this.module=s,this.exports=r,this.disposable=n}},GB=class extends Em{constructor(e){super(!1,null,e,{activate:void 0,deactivate:void